diff --git a/Estimator/.env b/Estimator/.env deleted file mode 100644 index 9295097..0000000 --- a/Estimator/.env +++ /dev/null @@ -1,10 +0,0 @@ -# Microsoft Azure AD Configuration -CLIENT_SECRET=7aD8Q~d5K~_PzQv6KqDdrEnmyXHE60eVDpbcnaK_ -TENANT_ID=3fd97ea7-b124-41f1-855f-52d8ac3b16c7 -CLIENT_ID=3c846e71-9609-40e1-b458-0eb805e21b9f -REDIRECT_URI=https://pocketbase.ccllc.pro/api/oauth2-redirect - -# PocketBase Configuration -PB_DB=https://pocketbase.ccllc.pro -PB_COLLECTION=Job_Info_TestEnv -PB_AUTH_COLLECTION=Users \ No newline at end of file diff --git a/PBandGraphScaffold/.env b/PBandGraphScaffold/.env deleted file mode 100644 index 2d7dc97..0000000 --- a/PBandGraphScaffold/.env +++ /dev/null @@ -1,10 +0,0 @@ -# Microsoft Azure AD Configuration -CLIENT_SECRET=7aD8Q~d5K~_PzQv6KqDdrEnmyXHE60eVDpbcnaK_ -TENANT_ID=3fd97ea7-b124-41f1-855f-52d8ac3b16c7 -CLIENT_ID=3c846e71-9609-40e1-b458-0eb805e21b9f -REDIRECT_URI=https://pocketbase.ccllc.pro/api/oauth2-redirect - -# PocketBase Configuration -PB_DB=https://pocketbase.ccllc.pro -PB_COLLECTION=Job_Info_Prod -PB_AUTH_COLLECTION=Users \ No newline at end of file diff --git a/PBandGraphScaffold/README.md b/PBandGraphScaffold/README.md deleted file mode 100644 index a0df8f9..0000000 --- a/PBandGraphScaffold/README.md +++ /dev/null @@ -1,29 +0,0 @@ -# PBandGraph Scaffold (PocketBase + Microsoft Graph OAuth) - -Drop-in starter for the PBandGraphOauth pattern: -- Frontend: PocketBase OAuth with Microsoft provider, shows user display name (top-right), email (bottom-left), version (bottom-right). -- Backend: Hono + Bun, validates PocketBase `pbToken`, and ready to obtain Graph tokens via client credentials. - -## Files -- `server.ts` — Bun server with `/health` and `/api/submit` example (PocketBase write). -- `index.html` — Minimal UI for Microsoft login via PocketBase. -- `.env.example` — Required env vars (copy to `.env`). -- `package.json`, `tsconfig.json` — Project config. - -## Env vars (copy `.env.example` to `.env`) -- Azure AD: `CLIENT_ID`, `CLIENT_SECRET`, `TENANT_ID`, `REDIRECT_URI` -- PocketBase: `PB_DB`, `PB_COLLECTION`, `PB_AUTH_COLLECTION` -- Server: `PORT` (default 5500) - -## Run -```bash -cd PBandGraphScaffold -bun install -bun run dev -``` -Open http://localhost:5500 and click "Login with Microsoft". - -## Notes -- Graph token helper `getGraphToken()` is in `server.ts`; call it when you add Graph API routes. -- `/api/submit` currently writes the posted payload to `PB_COLLECTION` after validating `pbToken`; adjust fields as needed. -- Static file is served from `index.html` in this folder. diff --git a/PBandGraphScaffold/bun.lock b/PBandGraphScaffold/bun.lock deleted file mode 100644 index b0f2ea1..0000000 --- a/PBandGraphScaffold/bun.lock +++ /dev/null @@ -1,77 +0,0 @@ -{ - "lockfileVersion": 1, - "configVersion": 1, - "workspaces": { - "": { - "name": "pbandgraph-scaffold", - "dependencies": { - "@azure/msal-node": "^2.6.7", - "@microsoft/microsoft-graph-client": "^3.0.7", - "dotenv": "^17.2.3", - "hono": "^4.10.8", - "pocketbase": "^0.26.5", - }, - "devDependencies": { - "@types/bun": "latest", - "@types/node": "latest", - }, - }, - }, - "packages": { - "@azure/msal-common": ["@azure/msal-common@14.16.1", "", {}, "sha512-nyxsA6NA4SVKh5YyRpbSXiMr7oQbwark7JU9LMeg6tJYTSPyAGkdx61wPT4gyxZfxlSxMMEyAsWaubBlNyIa1w=="], - - "@azure/msal-node": ["@azure/msal-node@2.16.3", "", { "dependencies": { "@azure/msal-common": "14.16.1", "jsonwebtoken": "^9.0.0", "uuid": "^8.3.0" } }, "sha512-CO+SE4weOsfJf+C5LM8argzvotrXw252/ZU6SM2Tz63fEblhH1uuVaaO4ISYFuN4Q6BhTo7I3qIdi8ydUQCqhw=="], - - "@babel/runtime": ["@babel/runtime@7.28.4", "", {}, "sha512-Q/N6JNWvIvPnLDvjlE1OUBLPQHH6l3CltCEsHIujp45zQUSSh8K+gHnaEX45yAT1nyngnINhvWtzN+Nb9D8RAQ=="], - - "@microsoft/microsoft-graph-client": ["@microsoft/microsoft-graph-client@3.0.7", "", { "dependencies": { "@babel/runtime": "^7.12.5", "tslib": "^2.2.0" } }, "sha512-/AazAV/F+HK4LIywF9C+NYHcJo038zEnWkteilcxC1FM/uK/4NVGDKGrxx7nNq1ybspAroRKT4I1FHfxQzxkUw=="], - - "@types/bun": ["@types/bun@1.3.5", "", { "dependencies": { "bun-types": "1.3.5" } }, "sha512-RnygCqNrd3srIPEWBd5LFeUYG7plCoH2Yw9WaZGyNmdTEei+gWaHqydbaIRkIkcbXwhBT94q78QljxN0Sk838w=="], - - "@types/node": ["@types/node@25.0.3", "", { "dependencies": { "undici-types": "~7.16.0" } }, "sha512-W609buLVRVmeW693xKfzHeIV6nJGGz98uCPfeXI1ELMLXVeKYZ9m15fAMSaUPBHYLGFsVRcMmSCksQOrZV9BYA=="], - - "buffer-equal-constant-time": ["buffer-equal-constant-time@1.0.1", "", {}, "sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA=="], - - "bun-types": ["bun-types@1.3.5", "", { "dependencies": { "@types/node": "*" } }, "sha512-inmAYe2PFLs0SUbFOWSVD24sg1jFlMPxOjOSSCYqUgn4Hsc3rDc7dFvfVYjFPNHtov6kgUeulV4SxbuIV/stPw=="], - - "dotenv": ["dotenv@17.2.3", "", {}, "sha512-JVUnt+DUIzu87TABbhPmNfVdBDt18BLOWjMUFJMSi/Qqg7NTYtabbvSNJGOJ7afbRuv9D/lngizHtP7QyLQ+9w=="], - - "ecdsa-sig-formatter": ["ecdsa-sig-formatter@1.0.11", "", { "dependencies": { "safe-buffer": "^5.0.1" } }, "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ=="], - - "hono": ["hono@4.11.1", "", {}, "sha512-KsFcH0xxHes0J4zaQgWbYwmz3UPOOskdqZmItstUG93+Wk1ePBLkLGwbP9zlmh1BFUiL8Qp+Xfu9P7feJWpGNg=="], - - "jsonwebtoken": ["jsonwebtoken@9.0.3", "", { "dependencies": { "jws": "^4.0.1", "lodash.includes": "^4.3.0", "lodash.isboolean": "^3.0.3", "lodash.isinteger": "^4.0.4", "lodash.isnumber": "^3.0.3", "lodash.isplainobject": "^4.0.6", "lodash.isstring": "^4.0.1", "lodash.once": "^4.0.0", "ms": "^2.1.1", "semver": "^7.5.4" } }, "sha512-MT/xP0CrubFRNLNKvxJ2BYfy53Zkm++5bX9dtuPbqAeQpTVe0MQTFhao8+Cp//EmJp244xt6Drw/GVEGCUj40g=="], - - "jwa": ["jwa@2.0.1", "", { "dependencies": { "buffer-equal-constant-time": "^1.0.1", "ecdsa-sig-formatter": "1.0.11", "safe-buffer": "^5.0.1" } }, "sha512-hRF04fqJIP8Abbkq5NKGN0Bbr3JxlQ+qhZufXVr0DvujKy93ZCbXZMHDL4EOtodSbCWxOqR8MS1tXA5hwqCXDg=="], - - "jws": ["jws@4.0.1", "", { "dependencies": { "jwa": "^2.0.1", "safe-buffer": "^5.0.1" } }, "sha512-EKI/M/yqPncGUUh44xz0PxSidXFr/+r0pA70+gIYhjv+et7yxM+s29Y+VGDkovRofQem0fs7Uvf4+YmAdyRduA=="], - - "lodash.includes": ["lodash.includes@4.3.0", "", {}, "sha512-W3Bx6mdkRTGtlJISOvVD/lbqjTlPPUDTMnlXZFnVwi9NKJ6tiAk6LVdlhZMm17VZisqhKcgzpO5Wz91PCt5b0w=="], - - "lodash.isboolean": ["lodash.isboolean@3.0.3", "", {}, "sha512-Bz5mupy2SVbPHURB98VAcw+aHh4vRV5IPNhILUCsOzRmsTmSQ17jIuqopAentWoehktxGd9e/hbIXq980/1QJg=="], - - "lodash.isinteger": ["lodash.isinteger@4.0.4", "", {}, "sha512-DBwtEWN2caHQ9/imiNeEA5ys1JoRtRfY3d7V9wkqtbycnAmTvRRmbHKDV4a0EYc678/dia0jrte4tjYwVBaZUA=="], - - "lodash.isnumber": ["lodash.isnumber@3.0.3", "", {}, "sha512-QYqzpfwO3/CWf3XP+Z+tkQsfaLL/EnUlXWVkIk5FUPc4sBdTehEqZONuyRt2P67PXAk+NXmTBcc97zw9t1FQrw=="], - - "lodash.isplainobject": ["lodash.isplainobject@4.0.6", "", {}, "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA=="], - - "lodash.isstring": ["lodash.isstring@4.0.1", "", {}, "sha512-0wJxfxH1wgO3GrbuP+dTTk7op+6L41QCXbGINEmD+ny/G/eCqGzxyCsh7159S+mgDDcoarnBw6PC1PS5+wUGgw=="], - - "lodash.once": ["lodash.once@4.1.1", "", {}, "sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg=="], - - "ms": ["ms@2.1.3", "", {}, "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="], - - "pocketbase": ["pocketbase@0.26.5", "", {}, "sha512-SXcq+sRvVpNxfLxPB1C+8eRatL7ZY4o3EVl/0OdE3MeR9fhPyZt0nmmxLqYmkLvXCN9qp3lXWV/0EUYb3MmMXQ=="], - - "safe-buffer": ["safe-buffer@5.2.1", "", {}, "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ=="], - - "semver": ["semver@7.7.3", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q=="], - - "tslib": ["tslib@2.8.1", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="], - - "undici-types": ["undici-types@7.16.0", "", {}, "sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw=="], - - "uuid": ["uuid@8.3.2", "", { "bin": { "uuid": "dist/bin/uuid" } }, "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg=="], - } -} diff --git a/PBandGraphScaffold/index.html b/PBandGraphScaffold/index.html deleted file mode 100644 index ecebaff..0000000 --- a/PBandGraphScaffold/index.html +++ /dev/null @@ -1,191 +0,0 @@ - - - - - - PB + Microsoft Graph - - - - - - - - - - - -
- v1.0.0-alpha1 -
- - -
-
-

PB + Microsoft Graph

-

Sign in with Microsoft

-
- -
-

Sign in with your Microsoft account

- -
- - -
- - - - - diff --git a/PBandGraphScaffold/node_modules/.bin/semver b/PBandGraphScaffold/node_modules/.bin/semver deleted file mode 120000 index 5aaadf4..0000000 --- a/PBandGraphScaffold/node_modules/.bin/semver +++ /dev/null @@ -1 +0,0 @@ -../semver/bin/semver.js \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/.bin/uuid b/PBandGraphScaffold/node_modules/.bin/uuid deleted file mode 120000 index 588f70e..0000000 --- a/PBandGraphScaffold/node_modules/.bin/uuid +++ /dev/null @@ -1 +0,0 @@ -../uuid/dist/bin/uuid \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/LICENSE b/PBandGraphScaffold/node_modules/@azure/msal-common/LICENSE deleted file mode 100644 index 5cf7c8d..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) Microsoft Corporation. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/README.md b/PBandGraphScaffold/node_modules/@azure/msal-common/README.md deleted file mode 100644 index 4e74c69..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/README.md +++ /dev/null @@ -1,53 +0,0 @@ -# Microsoft Authentication Library for JavaScript (MSAL.js) Common Protocols Package - -[![npm version](https://img.shields.io/npm/v/@azure/msal-common.svg?style=flat)](https://www.npmjs.com/package/@azure/msal-common/) -[![npm version](https://img.shields.io/npm/dm/@azure/msal-common.svg)](https://nodei.co/npm/@azure/msal-common/) -[![codecov](https://codecov.io/gh/AzureAD/microsoft-authentication-library-for-js/branch/dev/graph/badge.svg?flag=msal-common)](https://codecov.io/gh/AzureAD/microsoft-authentication-library-for-js) - -| Getting Started | AAD Docs | Library Reference | -| --------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | - -1. [About](#about) -2. [FAQ](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/lib/msal-common/FAQ.md) -3. [Changelog](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/lib/msal-common/CHANGELOG.md) -4. [Releases](#releases) -5. [Prerequisites and Usage](#prerequisites-and-usage) -6. [Installation](#installation) -7. [Security Reporting](#security-reporting) -8. [License](#license) -9. [Code of Conduct](#we-value-and-adhere-to-the-microsoft-open-source-code-of-conduct) - -## About - -The MSAL library for JavaScript enables client-side JavaScript applications to authenticate users using [Azure AD](https://docs.microsoft.com/en-us/azure/active-directory/develop/v2-overview) work and school accounts (AAD), Microsoft personal accounts (MSA) and social identity providers like Facebook, Google, LinkedIn, Microsoft accounts, etc. through [Azure AD B2C](https://docs.microsoft.com/en-us/azure/active-directory-b2c/active-directory-b2c-overview#identity-providers) service. It also enables your app to get tokens to access [Microsoft Cloud](https://www.microsoft.com/enterprise) services such as [Microsoft Graph](https://graph.microsoft.io). - -The `@azure/msal-common` package described by the code in this folder serves as a common package dependency for the `@azure/msal-browser` package (and in the future, the msal-node package). Be aware that this is an internal library, and is subject to frequent change. **It is not meant for production consumption by itself.** - -## FAQ - -See [here](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/lib/msal-common/FAQ.md). - -## Prerequisites and Usage - -This library is not meant for production use. Please use one of these packages specific to the platform you are developing for: - -- [MSAL for Single Page Applications (SPAs)](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/lib/msal-browser) -- [MSAL for Node.js](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/lib/msal-node) - -## Installation - -### Via NPM: - - npm install @azure/msal-common - -## Security Reporting - -If you find a security issue with our libraries or services please report it to [secure@microsoft.com](mailto:secure@microsoft.com) with as much detail as possible. Your submission may be eligible for a bounty through the [Microsoft Bounty](http://aka.ms/bugbounty) program. Please do not post security issues to GitHub Issues or any other public site. We will contact you shortly upon receiving the information. We encourage you to get notifications of when security incidents occur by visiting [this page](https://technet.microsoft.com/en-us/security/dd252948) and subscribing to Security Advisory Alerts. - -## License - -Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT License (the "License"); - -## We Value and Adhere to the Microsoft Open Source Code of Conduct - -This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/browser/README.md b/PBandGraphScaffold/node_modules/@azure/msal-common/browser/README.md deleted file mode 100644 index 8bc9a06..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/browser/README.md +++ /dev/null @@ -1 +0,0 @@ -Do not remove or rename. This folder allows subpath imports in environments that don't understand the exports field. \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/browser/package.json b/PBandGraphScaffold/node_modules/@azure/msal-common/browser/package.json deleted file mode 100644 index b403b13..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/browser/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "main": "../lib/index-browser.cjs", - "module": "../dist/index-browser.mjs", - "types": "../lib/types/index-browser.d.ts" -} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/account/AccountInfo.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/account/AccountInfo.d.ts deleted file mode 100644 index dd065ae..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/account/AccountInfo.d.ts +++ /dev/null @@ -1,68 +0,0 @@ -import { TokenClaims } from "./TokenClaims.js"; -/** - * Account object with the following signature: - * - homeAccountId - Home account identifier for this account object - * - environment - Entity which issued the token represented by the domain of the issuer (e.g. login.microsoftonline.com) - * - tenantId - Full tenant or organizational id that this account belongs to - * - username - preferred_username claim of the id_token that represents this account - * - localAccountId - Local, tenant-specific account identifer for this account object, usually used in legacy cases - * - name - Full name for the account, including given name and family name - * - idToken - raw ID token - * - idTokenClaims - Object contains claims from ID token - * - nativeAccountId - The user's native account ID - * - tenantProfiles - Map of tenant profile objects for each tenant that the account has authenticated with in the browser - */ -export type AccountInfo = { - homeAccountId: string; - environment: string; - tenantId: string; - username: string; - localAccountId: string; - name?: string; - idToken?: string; - idTokenClaims?: TokenClaims & { - [key: string]: string | number | string[] | object | undefined | unknown; - }; - nativeAccountId?: string; - authorityType?: string; - tenantProfiles?: Map; -}; -/** - * Account details that vary across tenants for the same user - */ -export type TenantProfile = Pick & { - /** - * - isHomeTenant - True if this is the home tenant profile of the account, false if it's a guest tenant profile - */ - isHomeTenant?: boolean; -}; -export type ActiveAccountFilters = { - homeAccountId: string; - localAccountId: string; - tenantId?: string; - lastUpdatedAt?: string; -}; -/** - * Returns true if tenantId matches the utid portion of homeAccountId - * @param tenantId - * @param homeAccountId - * @returns - */ -export declare function tenantIdMatchesHomeTenant(tenantId?: string, homeAccountId?: string): boolean; -/** - * Build tenant profile - * @param homeAccountId - Home account identifier for this account object - * @param localAccountId - Local account identifer for this account object - * @param tenantId - Full tenant or organizational id that this account belongs to - * @param idTokenClaims - Claims from the ID token - * @returns - */ -export declare function buildTenantProfile(homeAccountId: string, localAccountId: string, tenantId: string, idTokenClaims?: TokenClaims): TenantProfile; -/** - * Replaces account info that varies by tenant profile sourced from the ID token claims passed in with the tenant-specific account info - * @param baseAccountInfo - * @param idTokenClaims - * @returns - */ -export declare function updateAccountTenantProfileData(baseAccountInfo: AccountInfo, tenantProfile?: TenantProfile, idTokenClaims?: TokenClaims, idTokenSecret?: string): AccountInfo; -//# sourceMappingURL=AccountInfo.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/account/AccountInfo.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/account/AccountInfo.d.ts.map deleted file mode 100644 index 523efde..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/account/AccountInfo.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AccountInfo.d.ts","sourceRoot":"","sources":["../../src/account/AccountInfo.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,WAAW,GAAG;IACtB,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,cAAc,EAAE,MAAM,CAAC;IACvB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,aAAa,CAAC,EAAE,WAAW,GAAG;QAC1B,CAAC,GAAG,EAAE,MAAM,GACN,MAAM,GACN,MAAM,GACN,MAAM,EAAE,GACR,MAAM,GACN,SAAS,GACT,OAAO,CAAC;KACjB,CAAC;IACF,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,cAAc,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;CAC/C,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,IAAI,CAC5B,WAAW,EACX,UAAU,GAAG,gBAAgB,GAAG,MAAM,CACzC,GAAG;IACA;;OAEG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;CAC1B,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;IAC/B,aAAa,EAAE,MAAM,CAAC;IACtB,cAAc,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,aAAa,CAAC,EAAE,MAAM,CAAC;CAC1B,CAAC;AAEF;;;;;GAKG;AACH,wBAAgB,yBAAyB,CACrC,QAAQ,CAAC,EAAE,MAAM,EACjB,aAAa,CAAC,EAAE,MAAM,GACvB,OAAO,CAMT;AAED;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAC9B,aAAa,EAAE,MAAM,EACrB,cAAc,EAAE,MAAM,EACtB,QAAQ,EAAE,MAAM,EAChB,aAAa,CAAC,EAAE,WAAW,GAC5B,aAAa,CAyBf;AAED;;;;;GAKG;AACH,wBAAgB,8BAA8B,CAC1C,eAAe,EAAE,WAAW,EAC5B,aAAa,CAAC,EAAE,aAAa,EAC7B,aAAa,CAAC,EAAE,WAAW,EAC3B,aAAa,CAAC,EAAE,MAAM,GACvB,WAAW,CAgCb"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/account/AccountInfo.mjs b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/account/AccountInfo.mjs deleted file mode 100644 index 7413635..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/account/AccountInfo.mjs +++ /dev/null @@ -1,82 +0,0 @@ -/*! @azure/msal-common v14.16.1 2025-08-05 */ -'use strict'; -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * Returns true if tenantId matches the utid portion of homeAccountId - * @param tenantId - * @param homeAccountId - * @returns - */ -function tenantIdMatchesHomeTenant(tenantId, homeAccountId) { - return (!!tenantId && - !!homeAccountId && - tenantId === homeAccountId.split(".")[1]); -} -/** - * Build tenant profile - * @param homeAccountId - Home account identifier for this account object - * @param localAccountId - Local account identifer for this account object - * @param tenantId - Full tenant or organizational id that this account belongs to - * @param idTokenClaims - Claims from the ID token - * @returns - */ -function buildTenantProfile(homeAccountId, localAccountId, tenantId, idTokenClaims) { - if (idTokenClaims) { - const { oid, sub, tid, name, tfp, acr } = idTokenClaims; - /** - * Since there is no way to determine if the authority is AAD or B2C, we exhaust all the possible claims that can serve as tenant ID with the following precedence: - * tid - TenantID claim that identifies the tenant that issued the token in AAD. Expected in all AAD ID tokens, not present in B2C ID Tokens. - * tfp - Trust Framework Policy claim that identifies the policy that was used to authenticate the user. Functions as tenant for B2C scenarios. - * acr - Authentication Context Class Reference claim used only with older B2C policies. Fallback in case tfp is not present, but likely won't be present anyway. - */ - const tenantId = tid || tfp || acr || ""; - return { - tenantId: tenantId, - localAccountId: oid || sub || "", - name: name, - isHomeTenant: tenantIdMatchesHomeTenant(tenantId, homeAccountId), - }; - } - else { - return { - tenantId, - localAccountId, - isHomeTenant: tenantIdMatchesHomeTenant(tenantId, homeAccountId), - }; - } -} -/** - * Replaces account info that varies by tenant profile sourced from the ID token claims passed in with the tenant-specific account info - * @param baseAccountInfo - * @param idTokenClaims - * @returns - */ -function updateAccountTenantProfileData(baseAccountInfo, tenantProfile, idTokenClaims, idTokenSecret) { - let updatedAccountInfo = baseAccountInfo; - // Tenant Profile overrides passed in account info - if (tenantProfile) { - // eslint-disable-next-line @typescript-eslint/no-unused-vars - const { isHomeTenant, ...tenantProfileOverride } = tenantProfile; - updatedAccountInfo = { ...baseAccountInfo, ...tenantProfileOverride }; - } - // ID token claims override passed in account info and tenant profile - if (idTokenClaims) { - // Ignore isHomeTenant, loginHint, and sid which are part of tenant profile but not base account info - // eslint-disable-next-line @typescript-eslint/no-unused-vars - const { isHomeTenant, ...claimsSourcedTenantProfile } = buildTenantProfile(baseAccountInfo.homeAccountId, baseAccountInfo.localAccountId, baseAccountInfo.tenantId, idTokenClaims); - updatedAccountInfo = { - ...updatedAccountInfo, - ...claimsSourcedTenantProfile, - idTokenClaims: idTokenClaims, - idToken: idTokenSecret, - }; - return updatedAccountInfo; - } - return updatedAccountInfo; -} - -export { buildTenantProfile, tenantIdMatchesHomeTenant, updateAccountTenantProfileData }; -//# sourceMappingURL=AccountInfo.mjs.map diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/account/AccountInfo.mjs.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/account/AccountInfo.mjs.map deleted file mode 100644 index b489950..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/account/AccountInfo.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3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C;QACjE,kBAAkB,GAAG,EAAE,GAAG,eAAe,EAAE,GAAG,qBAAqB,EAAE,CAAC;AACzE,KAAA;;AAGD,IAAA,IAAI,aAAa,EAAE;;;QAGf,MAAM,EAAE,YAAY,EAAE,GAAG,0BAA0B,EAAE,GACjD,kBAAkB,CACd,eAAe,CAAC,aAAa,EAC7B,eAAe,CAAC,cAAc,EAC9B,eAAe,CAAC,QAAQ,EACxB,aAAa,CAChB,CAAC;AAEN,QAAA,kBAAkB,GAAG;AACjB,YAAA,GAAG,kBAAkB;AACrB,YAAA,GAAG,0BAA0B;AAC7B,YAAA,aAAa,EAAE,aAAa;AAC5B,YAAA,OAAO,EAAE,aAAa;SACzB,CAAC;AAEF,QAAA,OAAO,kBAAkB,CAAC;AAC7B,KAAA;AAED,IAAA,OAAO,kBAAkB,CAAC;AAC9B;;;;"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/account/AuthToken.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/account/AuthToken.d.ts deleted file mode 100644 index 3065249..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/account/AuthToken.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { TokenClaims } from "./TokenClaims.js"; -/** - * Extract token by decoding the rawToken - * - * @param encodedToken - */ -export declare function extractTokenClaims(encodedToken: string, base64Decode: (input: string) => string): TokenClaims; -/** - * decode a JWT - * - * @param authToken - */ -export declare function getJWSPayload(authToken: string): string; -/** - * Determine if the token's max_age has transpired - */ -export declare function checkMaxAge(authTime: number, maxAge: number): void; -//# sourceMappingURL=AuthToken.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/account/AuthToken.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/account/AuthToken.d.ts.map deleted file mode 100644 index 6f82d67..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/account/AuthToken.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AuthToken.d.ts","sourceRoot":"","sources":["../../src/account/AuthToken.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAM/C;;;;GAIG;AACH,wBAAgB,kBAAkB,CAC9B,YAAY,EAAE,MAAM,EACpB,YAAY,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,GACxC,WAAW,CAWb;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAkBvD;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,CAUlE"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/account/AuthToken.mjs b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/account/AuthToken.mjs deleted file mode 100644 index 9e85861..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/account/AuthToken.mjs +++ /dev/null @@ -1,66 +0,0 @@ -/*! @azure/msal-common v14.16.1 2025-08-05 */ -'use strict'; -import { createClientAuthError } from '../error/ClientAuthError.mjs'; -import { tokenParsingError, nullOrEmptyToken, maxAgeTranspired } from '../error/ClientAuthErrorCodes.mjs'; - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * Extract token by decoding the rawToken - * - * @param encodedToken - */ -function extractTokenClaims(encodedToken, base64Decode) { - const jswPayload = getJWSPayload(encodedToken); - // token will be decoded to get the username - try { - // base64Decode() should throw an error if there is an issue - const base64Decoded = base64Decode(jswPayload); - return JSON.parse(base64Decoded); - } - catch (err) { - throw createClientAuthError(tokenParsingError); - } -} -/** - * decode a JWT - * - * @param authToken - */ -function getJWSPayload(authToken) { - if (!authToken) { - throw createClientAuthError(nullOrEmptyToken); - } - const tokenPartsRegex = /^([^\.\s]*)\.([^\.\s]+)\.([^\.\s]*)$/; - const matches = tokenPartsRegex.exec(authToken); - if (!matches || matches.length < 4) { - throw createClientAuthError(tokenParsingError); - } - /** - * const crackedToken = { - * header: matches[1], - * JWSPayload: matches[2], - * JWSSig: matches[3], - * }; - */ - return matches[2]; -} -/** - * Determine if the token's max_age has transpired - */ -function checkMaxAge(authTime, maxAge) { - /* - * per https://openid.net/specs/openid-connect-core-1_0.html#AuthRequest - * To force an immediate re-authentication: If an app requires that a user re-authenticate prior to access, - * provide a value of 0 for the max_age parameter and the AS will force a fresh login. - */ - const fiveMinuteSkew = 300000; // five minutes in milliseconds - if (maxAge === 0 || Date.now() - fiveMinuteSkew > authTime + maxAge) { - throw createClientAuthError(maxAgeTranspired); - } -} - -export { checkMaxAge, extractTokenClaims, getJWSPayload }; -//# sourceMappingURL=AuthToken.mjs.map diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/account/AuthToken.mjs.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/account/AuthToken.mjs.map deleted file mode 100644 index dfabcfe..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/account/AuthToken.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AuthToken.mjs","sources":["../../src/account/AuthToken.ts"],"sourcesContent":[null],"names":["ClientAuthErrorCodes.tokenParsingError","ClientAuthErrorCodes.nullOrEmptyToken","ClientAuthErrorCodes.maxAgeTranspired"],"mappings":";;;;;AAAA;;;AAGG;AAQH;;;;AAIG;AACa,SAAA,kBAAkB,CAC9B,YAAoB,EACpB,YAAuC,EAAA;AAEvC,IAAA,MAAM,UAAU,GAAG,aAAa,CAAC,YAAY,CAAC,CAAC;;IAG/C,IAAI;;AAEA,QAAA,MAAM,aAAa,GAAG,YAAY,CAAC,UAAU,CAAC,CAAC;AAC/C,QAAA,OAAO,IAAI,CAAC,KAAK,CAAC,aAAa,CAAgB,CAAC;AACnD,KAAA;AAAC,IAAA,OAAO,GAAG,EAAE;AACV,QAAA,MAAM,qBAAqB,CAACA,iBAAsC,CAAC,CAAC;AACvE,KAAA;AACL,CAAC;AAED;;;;AAIG;AACG,SAAU,aAAa,CAAC,SAAiB,EAAA;IAC3C,IAAI,CAAC,SAAS,EAAE;AACZ,QAAA,MAAM,qBAAqB,CAACC,gBAAqC,CAAC,CAAC;AACtE,KAAA;IACD,MAAM,eAAe,GAAG,sCAAsC,CAAC;IAC/D,MAAM,OAAO,GAAG,eAAe,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IAChD,IAAI,CAAC,OAAO,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE;AAChC,QAAA,MAAM,qBAAqB,CAACD,iBAAsC,CAAC,CAAC;AACvE,KAAA;AACD;;;;;;AAMG;AAEH,IAAA,OAAO,OAAO,CAAC,CAAC,CAAC,CAAC;AACtB,CAAC;AAED;;AAEG;AACa,SAAA,WAAW,CAAC,QAAgB,EAAE,MAAc,EAAA;AACxD;;;;AAIG;AACH,IAAA,MAAM,cAAc,GAAG,MAAM,CAAC;AAC9B,IAAA,IAAI,MAAM,KAAK,CAAC,IAAI,IAAI,CAAC,GAAG,EAAE,GAAG,cAAc,GAAG,QAAQ,GAAG,MAAM,EAAE;AACjE,QAAA,MAAM,qBAAqB,CAACE,gBAAqC,CAAC,CAAC;AACtE,KAAA;AACL;;;;"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/account/CcsCredential.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/account/CcsCredential.d.ts deleted file mode 100644 index 6b38952..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/account/CcsCredential.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -export type CcsCredential = { - credential: string; - type: CcsCredentialType; -}; -export declare const CcsCredentialType: { - readonly HOME_ACCOUNT_ID: "home_account_id"; - readonly UPN: "UPN"; -}; -export type CcsCredentialType = (typeof CcsCredentialType)[keyof typeof CcsCredentialType]; -//# sourceMappingURL=CcsCredential.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/account/CcsCredential.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/account/CcsCredential.d.ts.map deleted file mode 100644 index 07be818..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/account/CcsCredential.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"CcsCredential.d.ts","sourceRoot":"","sources":["../../src/account/CcsCredential.ts"],"names":[],"mappings":"AAKA,MAAM,MAAM,aAAa,GAAG;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,iBAAiB,CAAC;CAC3B,CAAC;AAEF,eAAO,MAAM,iBAAiB;;;CAGpB,CAAC;AACX,MAAM,MAAM,iBAAiB,GACzB,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,OAAO,iBAAiB,CAAC,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/account/CcsCredential.mjs b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/account/CcsCredential.mjs deleted file mode 100644 index 02ccc57..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/account/CcsCredential.mjs +++ /dev/null @@ -1,13 +0,0 @@ -/*! @azure/msal-common v14.16.1 2025-08-05 */ -'use strict'; -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -const CcsCredentialType = { - HOME_ACCOUNT_ID: "home_account_id", - UPN: "UPN", -}; - -export { CcsCredentialType }; -//# sourceMappingURL=CcsCredential.mjs.map diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/account/CcsCredential.mjs.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/account/CcsCredential.mjs.map deleted file mode 100644 index b809762..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/account/CcsCredential.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"CcsCredential.mjs","sources":["../../src/account/CcsCredential.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAAA;;;AAGG;AAOU,MAAA,iBAAiB,GAAG;AAC7B,IAAA,eAAe,EAAE,iBAAiB;AAClC,IAAA,GAAG,EAAE,KAAK;;;;;"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/account/ClientCredentials.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/account/ClientCredentials.d.ts deleted file mode 100644 index 4943680..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/account/ClientCredentials.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -export type ClientAssertionConfig = { - clientId: string; - tokenEndpoint?: string; -}; -export type ClientAssertionCallback = (config: ClientAssertionConfig) => Promise; -/** - * Client Assertion credential for Confidential Clients - */ -export type ClientAssertion = { - assertion: string | ClientAssertionCallback; - assertionType: string; -}; -/** - * Client Credentials set for Confidential Clients - */ -export type ClientCredentials = { - clientSecret?: string; - clientAssertion?: ClientAssertion; -}; -//# sourceMappingURL=ClientCredentials.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/account/ClientCredentials.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/account/ClientCredentials.d.ts.map deleted file mode 100644 index 24e21f8..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/account/ClientCredentials.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ClientCredentials.d.ts","sourceRoot":"","sources":["../../src/account/ClientCredentials.ts"],"names":[],"mappings":"AAKA,MAAM,MAAM,qBAAqB,GAAG;IAChC,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,CAAC,EAAE,MAAM,CAAC;CAC1B,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG,CAClC,MAAM,EAAE,qBAAqB,KAC5B,OAAO,CAAC,MAAM,CAAC,CAAC;AAErB;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG;IAC1B,SAAS,EAAE,MAAM,GAAG,uBAAuB,CAAC;IAC5C,aAAa,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC5B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,eAAe,CAAC,EAAE,eAAe,CAAC;CACrC,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/account/ClientInfo.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/account/ClientInfo.d.ts deleted file mode 100644 index cdc0b50..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/account/ClientInfo.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -/** - * Client info object which consists of two IDs. Need to add more info here. - */ -export type ClientInfo = { - uid: string; - utid: string; -}; -/** - * Function to build a client info object from server clientInfo string - * @param rawClientInfo - * @param crypto - */ -export declare function buildClientInfo(rawClientInfo: string, base64Decode: (input: string) => string): ClientInfo; -/** - * Function to build a client info object from cached homeAccountId string - * @param homeAccountId - */ -export declare function buildClientInfoFromHomeAccountId(homeAccountId: string): ClientInfo; -//# sourceMappingURL=ClientInfo.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/account/ClientInfo.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/account/ClientInfo.d.ts.map deleted file mode 100644 index b51cce6..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/account/ClientInfo.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ClientInfo.d.ts","sourceRoot":"","sources":["../../src/account/ClientInfo.ts"],"names":[],"mappings":"AAWA;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,eAAe,CAC3B,aAAa,EAAE,MAAM,EACrB,YAAY,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,GACxC,UAAU,CAaZ;AAED;;;GAGG;AACH,wBAAgB,gCAAgC,CAC5C,aAAa,EAAE,MAAM,GACtB,UAAU,CAiBZ"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/account/ClientInfo.mjs b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/account/ClientInfo.mjs deleted file mode 100644 index 352748e..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/account/ClientInfo.mjs +++ /dev/null @@ -1,46 +0,0 @@ -/*! @azure/msal-common v14.16.1 2025-08-05 */ -'use strict'; -import { createClientAuthError } from '../error/ClientAuthError.mjs'; -import { Separators, Constants } from '../utils/Constants.mjs'; -import { clientInfoEmptyError, clientInfoDecodingError } from '../error/ClientAuthErrorCodes.mjs'; - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * Function to build a client info object from server clientInfo string - * @param rawClientInfo - * @param crypto - */ -function buildClientInfo(rawClientInfo, base64Decode) { - if (!rawClientInfo) { - throw createClientAuthError(clientInfoEmptyError); - } - try { - const decodedClientInfo = base64Decode(rawClientInfo); - return JSON.parse(decodedClientInfo); - } - catch (e) { - throw createClientAuthError(clientInfoDecodingError); - } -} -/** - * Function to build a client info object from cached homeAccountId string - * @param homeAccountId - */ -function buildClientInfoFromHomeAccountId(homeAccountId) { - if (!homeAccountId) { - throw createClientAuthError(clientInfoDecodingError); - } - const clientInfoParts = homeAccountId.split(Separators.CLIENT_INFO_SEPARATOR, 2); - return { - uid: clientInfoParts[0], - utid: clientInfoParts.length < 2 - ? Constants.EMPTY_STRING - : clientInfoParts[1], - }; -} - -export { buildClientInfo, buildClientInfoFromHomeAccountId }; -//# sourceMappingURL=ClientInfo.mjs.map diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/account/ClientInfo.mjs.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/account/ClientInfo.mjs.map deleted file mode 100644 index 2d4e144..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/account/ClientInfo.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ClientInfo.mjs","sources":["../../src/account/ClientInfo.ts"],"sourcesContent":[null],"names":["ClientAuthErrorCodes.clientInfoEmptyError","ClientAuthErrorCodes.clientInfoDecodingError"],"mappings":";;;;;;AAAA;;;AAGG;AAgBH;;;;AAIG;AACa,SAAA,eAAe,CAC3B,aAAqB,EACrB,YAAuC,EAAA;IAEvC,IAAI,CAAC,aAAa,EAAE;AAChB,QAAA,MAAM,qBAAqB,CAACA,oBAAyC,CAAC,CAAC;AAC1E,KAAA;IAED,IAAI;AACA,QAAA,MAAM,iBAAiB,GAAW,YAAY,CAAC,aAAa,CAAC,CAAC;AAC9D,QAAA,OAAO,IAAI,CAAC,KAAK,CAAC,iBAAiB,CAAe,CAAC;AACtD,KAAA;AAAC,IAAA,OAAO,CAAC,EAAE;AACR,QAAA,MAAM,qBAAqB,CACvBC,uBAA4C,CAC/C,CAAC;AACL,KAAA;AACL,CAAC;AAED;;;AAGG;AACG,SAAU,gCAAgC,CAC5C,aAAqB,EAAA;IAErB,IAAI,CAAC,aAAa,EAAE;AAChB,QAAA,MAAM,qBAAqB,CACvBA,uBAA4C,CAC/C,CAAC;AACL,KAAA;AACD,IAAA,MAAM,eAAe,GAAa,aAAa,CAAC,KAAK,CACjD,UAAU,CAAC,qBAAqB,EAChC,CAAC,CACJ,CAAC;IACF,OAAO;AACH,QAAA,GAAG,EAAE,eAAe,CAAC,CAAC,CAAC;AACvB,QAAA,IAAI,EACA,eAAe,CAAC,MAAM,GAAG,CAAC;cACpB,SAAS,CAAC,YAAY;AACxB,cAAE,eAAe,CAAC,CAAC,CAAC;KAC/B,CAAC;AACN;;;;"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/account/TokenClaims.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/account/TokenClaims.d.ts deleted file mode 100644 index 797b7c3..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/account/TokenClaims.d.ts +++ /dev/null @@ -1,84 +0,0 @@ -/** - * Type which describes Id Token claims known by MSAL. - */ -export type TokenClaims = { - /** - * Audience - */ - aud?: string; - /** - * Issuer - */ - iss?: string; - /** - * Issued at - */ - iat?: number; - /** - * Not valid before - */ - nbf?: number; - /** - * Immutable object identifier, this ID uniquely identifies the user across applications - */ - oid?: string; - /** - * Immutable subject identifier, this is a pairwise identifier - it is unique to a particular application ID - */ - sub?: string; - /** - * Users' tenant or '9188040d-6c67-4c5b-b112-36a304b66dad' for personal accounts. - */ - tid?: string; - /** - * Trusted Framework Policy (B2C) The name of the policy that was used to acquire the ID token. - */ - tfp?: string; - /** - * Authentication Context Class Reference (B2C) Used only with older policies. - */ - acr?: string; - ver?: string; - upn?: string; - preferred_username?: string; - login_hint?: string; - emails?: string[]; - name?: string; - nonce?: string; - /** - * Expiration - */ - exp?: number; - home_oid?: string; - sid?: string; - cloud_instance_host_name?: string; - cnf?: { - kid: string; - }; - x5c_ca?: string[]; - ts?: number; - at?: string; - u?: string; - p?: string; - m?: string; - roles?: string[]; - amr?: string[]; - idp?: string; - auth_time?: number; - /** - * Region of the resource tenant - */ - tenant_region_scope?: string; - tenant_region_sub_scope?: string; -}; -/** - * Gets tenantId from available ID token claims to set as credential realm with the following precedence: - * 1. tid - if the token is acquired from an Azure AD tenant tid will be present - * 2. tfp - if the token is acquired from a modern B2C tenant tfp should be present - * 3. acr - if the token is acquired from a legacy B2C tenant acr should be present - * Downcased to match the realm case-insensitive comparison requirements - * @param idTokenClaims - * @returns - */ -export declare function getTenantIdFromIdTokenClaims(idTokenClaims?: TokenClaims): string | null; -//# sourceMappingURL=TokenClaims.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/account/TokenClaims.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/account/TokenClaims.d.ts.map deleted file mode 100644 index fc17f8a..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/account/TokenClaims.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"TokenClaims.d.ts","sourceRoot":"","sources":["../../src/account/TokenClaims.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG;IACtB;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,GAAG,CAAC,EAAE;QACF,GAAG,EAAE,MAAM,CAAC;KACf,CAAC;IACF,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,GAAG,CAAC,EAAE,MAAM,EAAE,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,uBAAuB,CAAC,EAAE,MAAM,CAAC;CACpC,CAAC;AAEF;;;;;;;;GAQG;AACH,wBAAgB,4BAA4B,CACxC,aAAa,CAAC,EAAE,WAAW,GAC5B,MAAM,GAAG,IAAI,CAOf"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/account/TokenClaims.mjs b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/account/TokenClaims.mjs deleted file mode 100644 index 84ed78e..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/account/TokenClaims.mjs +++ /dev/null @@ -1,25 +0,0 @@ -/*! @azure/msal-common v14.16.1 2025-08-05 */ -'use strict'; -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * Gets tenantId from available ID token claims to set as credential realm with the following precedence: - * 1. tid - if the token is acquired from an Azure AD tenant tid will be present - * 2. tfp - if the token is acquired from a modern B2C tenant tfp should be present - * 3. acr - if the token is acquired from a legacy B2C tenant acr should be present - * Downcased to match the realm case-insensitive comparison requirements - * @param idTokenClaims - * @returns - */ -function getTenantIdFromIdTokenClaims(idTokenClaims) { - if (idTokenClaims) { - const tenantId = idTokenClaims.tid || idTokenClaims.tfp || idTokenClaims.acr; - return tenantId || null; - } - return null; -} - -export { getTenantIdFromIdTokenClaims }; -//# sourceMappingURL=TokenClaims.mjs.map diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/account/TokenClaims.mjs.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/account/TokenClaims.mjs.map deleted file mode 100644 index 608066d..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/account/TokenClaims.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"TokenClaims.mjs","sources":["../../src/account/TokenClaims.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAAA;;;AAGG;AA4EH;;;;;;;;AAQG;AACG,SAAU,4BAA4B,CACxC,aAA2B,EAAA;AAE3B,IAAA,IAAI,aAAa,EAAE;AACf,QAAA,MAAM,QAAQ,GACV,aAAa,CAAC,GAAG,IAAI,aAAa,CAAC,GAAG,IAAI,aAAa,CAAC,GAAG,CAAC;QAChE,OAAO,QAAQ,IAAI,IAAI,CAAC;AAC3B,KAAA;AACD,IAAA,OAAO,IAAI,CAAC;AAChB;;;;"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/Authority.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/Authority.d.ts deleted file mode 100644 index 4cd38c4..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/Authority.d.ts +++ /dev/null @@ -1,255 +0,0 @@ -import { AuthorityType } from "./AuthorityType.js"; -import { OpenIdConfigResponse } from "./OpenIdConfigResponse.js"; -import { IUri } from "../url/IUri.js"; -import { INetworkModule } from "../network/INetworkModule.js"; -import { ProtocolMode } from "./ProtocolMode.js"; -import { ICacheManager } from "../cache/interface/ICacheManager.js"; -import { AuthorityOptions, StaticAuthorityOptions } from "./AuthorityOptions.js"; -import { CloudDiscoveryMetadata } from "./CloudDiscoveryMetadata.js"; -import { RegionDiscoveryMetadata } from "./RegionDiscoveryMetadata.js"; -import { AzureCloudOptions } from "../config/ClientConfiguration.js"; -import { Logger } from "../logger/Logger.js"; -import { IPerformanceClient } from "../telemetry/performance/IPerformanceClient.js"; -/** - * The authority class validates the authority URIs used by the user, and retrieves the OpenID Configuration Data from the - * endpoint. It will store the pertinent config data in this object for use during token calls. - * @internal - */ -export declare class Authority { - private _canonicalAuthority; - private _canonicalAuthorityUrlComponents; - protected networkInterface: INetworkModule; - protected cacheManager: ICacheManager; - private authorityOptions; - private metadata; - private regionDiscovery; - regionDiscoveryMetadata: RegionDiscoveryMetadata; - private logger; - protected performanceClient: IPerformanceClient | undefined; - protected correlationId: string; - private managedIdentity; - private static reservedTenantDomains; - constructor(authority: string, networkInterface: INetworkModule, cacheManager: ICacheManager, authorityOptions: AuthorityOptions, logger: Logger, correlationId: string, performanceClient?: IPerformanceClient, managedIdentity?: boolean); - /** - * Get {@link AuthorityType} - * @param authorityUri {@link IUri} - * @private - */ - private getAuthorityType; - get authorityType(): AuthorityType; - /** - * ProtocolMode enum representing the way endpoints are constructed. - */ - get protocolMode(): ProtocolMode; - /** - * Returns authorityOptions which can be used to reinstantiate a new authority instance - */ - get options(): AuthorityOptions; - /** - * A URL that is the authority set by the developer - */ - get canonicalAuthority(): string; - /** - * Sets canonical authority. - */ - set canonicalAuthority(url: string); - /** - * Get authority components. - */ - get canonicalAuthorityUrlComponents(): IUri; - /** - * Get hostname and port i.e. login.microsoftonline.com - */ - get hostnameAndPort(): string; - /** - * Get tenant for authority. - */ - get tenant(): string; - /** - * OAuth /authorize endpoint for requests - */ - get authorizationEndpoint(): string; - /** - * OAuth /token endpoint for requests - */ - get tokenEndpoint(): string; - get deviceCodeEndpoint(): string; - /** - * OAuth logout endpoint for requests - */ - get endSessionEndpoint(): string; - /** - * OAuth issuer for requests - */ - get selfSignedJwtAudience(): string; - /** - * Jwks_uri for token signing keys - */ - get jwksUri(): string; - /** - * Returns a flag indicating that tenant name can be replaced in authority {@link IUri} - * @param authorityUri {@link IUri} - * @private - */ - private canReplaceTenant; - /** - * Replaces tenant in url path with current tenant. Defaults to common. - * @param urlString - */ - private replaceTenant; - /** - * Replaces path such as tenant or policy with the current tenant or policy. - * @param urlString - */ - private replacePath; - /** - * The default open id configuration endpoint for any canonical authority. - */ - protected get defaultOpenIdConfigurationEndpoint(): string; - /** - * Boolean that returns whether or not tenant discovery has been completed. - */ - discoveryComplete(): boolean; - /** - * Perform endpoint discovery to discover aliases, preferred_cache, preferred_network - * and the /authorize, /token and logout endpoints. - */ - resolveEndpointsAsync(): Promise; - /** - * Returns metadata entity from cache if it exists, otherwiser returns a new metadata entity built - * from the configured canonical authority - * @returns - */ - private getCurrentMetadataEntity; - /** - * Updates cached metadata based on metadata source and sets the instance's metadata - * property to the same value - * @param metadataEntity - * @param cloudDiscoverySource - * @param endpointMetadataResult - */ - private updateCachedMetadata; - /** - * Update AuthorityMetadataEntity with new endpoints and return where the information came from - * @param metadataEntity - */ - private updateEndpointMetadata; - /** - * Updates endpoint metadata from local sources and returns where the information was retrieved from and the metadata config - * response if the source is hardcoded metadata - * @param metadataEntity - * @returns - */ - private updateEndpointMetadataFromLocalSources; - /** - * Compares the number of url components after the domain to determine if the cached - * authority metadata can be used for the requested authority. Protects against same domain different - * authority such as login.microsoftonline.com/tenant and login.microsoftonline.com/tfp/tenant/policy - * @param metadataEntity - */ - private isAuthoritySameType; - /** - * Parse authorityMetadata config option - */ - private getEndpointMetadataFromConfig; - /** - * Gets OAuth endpoints from the given OpenID configuration endpoint. - * - * @param hasHardcodedMetadata boolean - */ - private getEndpointMetadataFromNetwork; - /** - * Get OAuth endpoints for common authorities. - */ - private getEndpointMetadataFromHardcodedValues; - /** - * Update the retrieved metadata with regional information. - * User selected Azure region will be used if configured. - */ - private updateMetadataWithRegionalInformation; - /** - * Updates the AuthorityMetadataEntity with new aliases, preferred_network and preferred_cache - * and returns where the information was retrieved from - * @param metadataEntity - * @returns AuthorityMetadataSource - */ - private updateCloudDiscoveryMetadata; - private updateCloudDiscoveryMetadataFromLocalSources; - /** - * Parse cloudDiscoveryMetadata config or check knownAuthorities - */ - private getCloudDiscoveryMetadataFromConfig; - /** - * Called to get metadata from network if CloudDiscoveryMetadata was not populated by config - * - * @param hasHardcodedMetadata boolean - */ - private getCloudDiscoveryMetadataFromNetwork; - /** - * Helper function to determine if this host is included in the knownAuthorities config option - */ - private isInKnownAuthorities; - /** - * helper function to populate the authority based on azureCloudOptions - * @param authorityString - * @param azureCloudOptions - */ - static generateAuthority(authorityString: string, azureCloudOptions?: AzureCloudOptions): string; - /** - * Creates cloud discovery metadata object from a given host - * @param host - */ - static createCloudDiscoveryMetadataFromHost(host: string): CloudDiscoveryMetadata; - /** - * helper function to generate environment from authority object - */ - getPreferredCache(): string; - /** - * Returns whether or not the provided host is an alias of this authority instance - * @param host - */ - isAlias(host: string): boolean; - /** - * Returns whether or not the provided host is an alias of a known Microsoft authority for purposes of endpoint discovery - * @param host - */ - isAliasOfKnownMicrosoftAuthority(host: string): boolean; - /** - * Checks whether the provided host is that of a public cloud authority - * - * @param authority string - * @returns bool - */ - static isPublicCloudAuthority(host: string): boolean; - /** - * Rebuild the authority string with the region - * - * @param host string - * @param region string - */ - static buildRegionalAuthorityString(host: string, region: string, queryString?: string): string; - /** - * Replace the endpoints in the metadata object with their regional equivalents. - * - * @param metadata OpenIdConfigResponse - * @param azureRegion string - */ - static replaceWithRegionalInformation(metadata: OpenIdConfigResponse, azureRegion: string): OpenIdConfigResponse; - /** - * Transform CIAM_AUTHORIY as per the below rules: - * If no path segments found and it is a CIAM authority (hostname ends with .ciamlogin.com), then transform it - * - * NOTE: The transformation path should go away once STS supports CIAM with the format: `tenantIdorDomain.ciamlogin.com` - * `ciamlogin.com` can also change in the future and we should accommodate the same - * - * @param authority - */ - static transformCIAMAuthority(authority: string): string; -} -/** - * Extract tenantId from authority - */ -export declare function getTenantFromAuthorityString(authority: string): string | undefined; -export declare function formatAuthorityUri(authorityUri: string): string; -export declare function buildStaticAuthorityOptions(authOptions: Partial): StaticAuthorityOptions; -//# sourceMappingURL=Authority.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/Authority.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/Authority.d.ts.map deleted file mode 100644 index 663573e..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/Authority.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Authority.d.ts","sourceRoot":"","sources":["../../src/authority/Authority.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAEH,oBAAoB,EACvB,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAKtC,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAiB9D,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AAEpE,OAAO,EACH,gBAAgB,EAEhB,sBAAsB,EACzB,MAAM,uBAAuB,CAAC;AAS/B,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAErE,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAEvE,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AACrE,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAE7C,OAAO,EAAE,kBAAkB,EAAE,MAAM,gDAAgD,CAAC;AAKpF;;;;GAIG;AACH,qBAAa,SAAS;IAElB,OAAO,CAAC,mBAAmB,CAAY;IAEvC,OAAO,CAAC,gCAAgC,CAAc;IAEtD,SAAS,CAAC,gBAAgB,EAAE,cAAc,CAAC;IAE3C,SAAS,CAAC,YAAY,EAAE,aAAa,CAAC;IAEtC,OAAO,CAAC,gBAAgB,CAAmB;IAE3C,OAAO,CAAC,QAAQ,CAA0B;IAE1C,OAAO,CAAC,eAAe,CAAkB;IAElC,uBAAuB,EAAE,uBAAuB,CAAC;IAExD,OAAO,CAAC,MAAM,CAAS;IAEvB,SAAS,CAAC,iBAAiB,EAAE,kBAAkB,GAAG,SAAS,CAAC;IA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,8BAA8B,CACjC,QAAQ,EAAE,oBAAoB,EAC9B,WAAW,EAAE,MAAM,GACpB,oBAAoB;IAyBvB;;;;;;;;OAQG;IACH,MAAM,CAAC,sBAAsB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM;CAmB3D;AAED;;GAEG;AACH,wBAAgB,4BAA4B,CACxC,SAAS,EAAE,MAAM,GAClB,MAAM,GAAG,SAAS,CAsBpB;AAED,wBAAgB,kBAAkB,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,CAI/D;AAED,wBAAgB,2BAA2B,CACvC,WAAW,EAAE,OAAO,CAAC,gBAAgB,CAAC,GACvC,sBAAsB,CAoBxB"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/Authority.mjs b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/Authority.mjs deleted file mode 100644 index cbe2a6a..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/Authority.mjs +++ /dev/null @@ -1,860 +0,0 @@ -/*! @azure/msal-common v14.16.1 2025-08-05 */ -'use strict'; -import { AuthorityType } from './AuthorityType.mjs'; -import { isOpenIdConfigResponse } from './OpenIdConfigResponse.mjs'; -import { UrlString } from '../url/UrlString.mjs'; -import { createClientAuthError } from '../error/ClientAuthError.mjs'; -import { Constants, AuthorityMetadataSource, RegionDiscoveryOutcomes, AADAuthorityConstants } from '../utils/Constants.mjs'; -import { EndpointMetadata, getCloudDiscoveryMetadataFromHardcodedValues, getCloudDiscoveryMetadataFromNetworkResponse, InstanceDiscoveryMetadataAliases } from './AuthorityMetadata.mjs'; -import { createClientConfigurationError } from '../error/ClientConfigurationError.mjs'; -import { ProtocolMode } from './ProtocolMode.mjs'; -import { AzureCloudInstance } from './AuthorityOptions.mjs'; -import { isCloudInstanceDiscoveryResponse } from './CloudInstanceDiscoveryResponse.mjs'; -import { isCloudInstanceDiscoveryErrorResponse } from './CloudInstanceDiscoveryErrorResponse.mjs'; -import { RegionDiscovery } from './RegionDiscovery.mjs'; -import { AuthError } from '../error/AuthError.mjs'; -import { PerformanceEvents } from '../telemetry/performance/PerformanceEvent.mjs'; -import { invokeAsync } from '../utils/FunctionWrappers.mjs'; -import { generateAuthorityMetadataExpiresAt, updateAuthorityEndpointMetadata, isAuthorityMetadataExpired, updateCloudDiscoveryMetadata } from '../cache/utils/CacheHelpers.mjs'; -import { endpointResolutionError, endSessionEndpointNotSupported, openIdConfigError } from '../error/ClientAuthErrorCodes.mjs'; -import { invalidAuthorityMetadata, untrustedAuthority, invalidCloudDiscoveryMetadata } from '../error/ClientConfigurationErrorCodes.mjs'; - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * The authority class validates the authority URIs used by the user, and retrieves the OpenID Configuration Data from the - * endpoint. It will store the pertinent config data in this object for use during token calls. - * @internal - */ -class Authority { - constructor(authority, networkInterface, cacheManager, authorityOptions, logger, correlationId, performanceClient, managedIdentity) { - this.canonicalAuthority = authority; - this._canonicalAuthority.validateAsUri(); - this.networkInterface = networkInterface; - this.cacheManager = cacheManager; - this.authorityOptions = authorityOptions; - this.regionDiscoveryMetadata = { - region_used: undefined, - region_source: undefined, - region_outcome: undefined, - }; - this.logger = logger; - this.performanceClient = performanceClient; - this.correlationId = correlationId; - this.managedIdentity = managedIdentity || false; - this.regionDiscovery = new RegionDiscovery(networkInterface, this.logger, this.performanceClient, this.correlationId); - } - /** - * Get {@link AuthorityType} - * @param authorityUri {@link IUri} - * @private - */ - getAuthorityType(authorityUri) { - // CIAM auth url pattern is being standardized as: .ciamlogin.com - if (authorityUri.HostNameAndPort.endsWith(Constants.CIAM_AUTH_URL)) { - return AuthorityType.Ciam; - } - const pathSegments = authorityUri.PathSegments; - if (pathSegments.length) { - switch (pathSegments[0].toLowerCase()) { - case Constants.ADFS: - return AuthorityType.Adfs; - case Constants.DSTS: - return AuthorityType.Dsts; - } - } - return AuthorityType.Default; - } - // See above for AuthorityType - get authorityType() { - return this.getAuthorityType(this.canonicalAuthorityUrlComponents); - } - /** - * ProtocolMode enum representing the way endpoints are constructed. - */ - get protocolMode() { - return this.authorityOptions.protocolMode; - } - /** - * Returns authorityOptions which can be used to reinstantiate a new authority instance - */ - get options() { - return this.authorityOptions; - } - /** - * A URL that is the authority set by the developer - */ - get canonicalAuthority() { - return this._canonicalAuthority.urlString; - } - /** - * Sets canonical authority. - */ - set canonicalAuthority(url) { - this._canonicalAuthority = new UrlString(url); - this._canonicalAuthority.validateAsUri(); - this._canonicalAuthorityUrlComponents = null; - } - /** - * Get authority components. - */ - get canonicalAuthorityUrlComponents() { - if (!this._canonicalAuthorityUrlComponents) { - this._canonicalAuthorityUrlComponents = - this._canonicalAuthority.getUrlComponents(); - } - return this._canonicalAuthorityUrlComponents; - } - /** - * Get hostname and port i.e. login.microsoftonline.com - */ - get hostnameAndPort() { - return this.canonicalAuthorityUrlComponents.HostNameAndPort.toLowerCase(); - } - /** - * Get tenant for authority. - */ - get tenant() { - return this.canonicalAuthorityUrlComponents.PathSegments[0]; - } - /** - * OAuth /authorize endpoint for requests - */ - get authorizationEndpoint() { - if (this.discoveryComplete()) { - return this.replacePath(this.metadata.authorization_endpoint); - } - else { - throw createClientAuthError(endpointResolutionError); - } - } - /** - * OAuth /token endpoint for requests - */ - get tokenEndpoint() { - if (this.discoveryComplete()) { - return this.replacePath(this.metadata.token_endpoint); - } - else { - throw createClientAuthError(endpointResolutionError); - } - } - get deviceCodeEndpoint() { - if (this.discoveryComplete()) { - return this.replacePath(this.metadata.token_endpoint.replace("/token", "/devicecode")); - } - else { - throw createClientAuthError(endpointResolutionError); - } - } - /** - * OAuth logout endpoint for requests - */ - get endSessionEndpoint() { - if (this.discoveryComplete()) { - // ROPC policies may not have end_session_endpoint set - if (!this.metadata.end_session_endpoint) { - throw createClientAuthError(endSessionEndpointNotSupported); - } - return this.replacePath(this.metadata.end_session_endpoint); - } - else { - throw createClientAuthError(endpointResolutionError); - } - } - /** - * OAuth issuer for requests - */ - get selfSignedJwtAudience() { - if (this.discoveryComplete()) { - return this.replacePath(this.metadata.issuer); - } - else { - throw createClientAuthError(endpointResolutionError); - } - } - /** - * Jwks_uri for token signing keys - */ - get jwksUri() { - if (this.discoveryComplete()) { - return this.replacePath(this.metadata.jwks_uri); - } - else { - throw createClientAuthError(endpointResolutionError); - } - } - /** - * Returns a flag indicating that tenant name can be replaced in authority {@link IUri} - * @param authorityUri {@link IUri} - * @private - */ - canReplaceTenant(authorityUri) { - return (authorityUri.PathSegments.length === 1 && - !Authority.reservedTenantDomains.has(authorityUri.PathSegments[0]) && - this.getAuthorityType(authorityUri) === AuthorityType.Default && - this.protocolMode === ProtocolMode.AAD); - } - /** - * Replaces tenant in url path with current tenant. Defaults to common. - * @param urlString - */ - replaceTenant(urlString) { - return urlString.replace(/{tenant}|{tenantid}/g, this.tenant); - } - /** - * Replaces path such as tenant or policy with the current tenant or policy. - * @param urlString - */ - replacePath(urlString) { - let endpoint = urlString; - const cachedAuthorityUrl = new UrlString(this.metadata.canonical_authority); - const cachedAuthorityUrlComponents = cachedAuthorityUrl.getUrlComponents(); - const cachedAuthorityParts = cachedAuthorityUrlComponents.PathSegments; - const currentAuthorityParts = this.canonicalAuthorityUrlComponents.PathSegments; - currentAuthorityParts.forEach((currentPart, index) => { - let cachedPart = cachedAuthorityParts[index]; - if (index === 0 && - this.canReplaceTenant(cachedAuthorityUrlComponents)) { - const tenantId = new UrlString(this.metadata.authorization_endpoint).getUrlComponents().PathSegments[0]; - /** - * Check if AAD canonical authority contains tenant domain name, for example "testdomain.onmicrosoft.com", - * by comparing its first path segment to the corresponding authorization endpoint path segment, which is - * always resolved with tenant id by OIDC. - */ - if (cachedPart !== tenantId) { - this.logger.verbose(`Replacing tenant domain name ${cachedPart} with id ${tenantId}`); - cachedPart = tenantId; - } - } - if (currentPart !== cachedPart) { - endpoint = endpoint.replace(`/${cachedPart}/`, `/${currentPart}/`); - } - }); - return this.replaceTenant(endpoint); - } - /** - * The default open id configuration endpoint for any canonical authority. - */ - get defaultOpenIdConfigurationEndpoint() { - const canonicalAuthorityHost = this.hostnameAndPort; - if (this.canonicalAuthority.endsWith("v2.0/") || - this.authorityType === AuthorityType.Adfs || - (this.protocolMode !== ProtocolMode.AAD && - !this.isAliasOfKnownMicrosoftAuthority(canonicalAuthorityHost))) { - return `${this.canonicalAuthority}.well-known/openid-configuration`; - } - return `${this.canonicalAuthority}v2.0/.well-known/openid-configuration`; - } - /** - * Boolean that returns whether or not tenant discovery has been completed. - */ - discoveryComplete() { - return !!this.metadata; - } - /** - * Perform endpoint discovery to discover aliases, preferred_cache, preferred_network - * and the /authorize, /token and logout endpoints. - */ - async resolveEndpointsAsync() { - this.performanceClient?.addQueueMeasurement(PerformanceEvents.AuthorityResolveEndpointsAsync, this.correlationId); - const metadataEntity = this.getCurrentMetadataEntity(); - const cloudDiscoverySource = await invokeAsync(this.updateCloudDiscoveryMetadata.bind(this), PerformanceEvents.AuthorityUpdateCloudDiscoveryMetadata, this.logger, this.performanceClient, this.correlationId)(metadataEntity); - this.canonicalAuthority = this.canonicalAuthority.replace(this.hostnameAndPort, metadataEntity.preferred_network); - const endpointSource = await invokeAsync(this.updateEndpointMetadata.bind(this), PerformanceEvents.AuthorityUpdateEndpointMetadata, this.logger, this.performanceClient, this.correlationId)(metadataEntity); - this.updateCachedMetadata(metadataEntity, cloudDiscoverySource, { - source: endpointSource, - }); - this.performanceClient?.addFields({ - cloudDiscoverySource: cloudDiscoverySource, - authorityEndpointSource: endpointSource, - }, this.correlationId); - } - /** - * Returns metadata entity from cache if it exists, otherwiser returns a new metadata entity built - * from the configured canonical authority - * @returns - */ - getCurrentMetadataEntity() { - let metadataEntity = this.cacheManager.getAuthorityMetadataByAlias(this.hostnameAndPort); - if (!metadataEntity) { - metadataEntity = { - aliases: [], - preferred_cache: this.hostnameAndPort, - preferred_network: this.hostnameAndPort, - canonical_authority: this.canonicalAuthority, - authorization_endpoint: "", - token_endpoint: "", - end_session_endpoint: "", - issuer: "", - aliasesFromNetwork: false, - endpointsFromNetwork: false, - expiresAt: generateAuthorityMetadataExpiresAt(), - jwks_uri: "", - }; - } - return metadataEntity; - } - /** - * Updates cached metadata based on metadata source and sets the instance's metadata - * property to the same value - * @param metadataEntity - * @param cloudDiscoverySource - * @param endpointMetadataResult - */ - updateCachedMetadata(metadataEntity, cloudDiscoverySource, endpointMetadataResult) { - if (cloudDiscoverySource !== AuthorityMetadataSource.CACHE && - endpointMetadataResult?.source !== AuthorityMetadataSource.CACHE) { - // Reset the expiration time unless both values came from a successful cache lookup - metadataEntity.expiresAt = - generateAuthorityMetadataExpiresAt(); - metadataEntity.canonical_authority = this.canonicalAuthority; - } - const cacheKey = this.cacheManager.generateAuthorityMetadataCacheKey(metadataEntity.preferred_cache); - this.cacheManager.setAuthorityMetadata(cacheKey, metadataEntity); - this.metadata = metadataEntity; - } - /** - * Update AuthorityMetadataEntity with new endpoints and return where the information came from - * @param metadataEntity - */ - async updateEndpointMetadata(metadataEntity) { - this.performanceClient?.addQueueMeasurement(PerformanceEvents.AuthorityUpdateEndpointMetadata, this.correlationId); - const localMetadata = this.updateEndpointMetadataFromLocalSources(metadataEntity); - // Further update may be required for hardcoded metadata if regional metadata is preferred - if (localMetadata) { - if (localMetadata.source === - AuthorityMetadataSource.HARDCODED_VALUES) { - // If the user prefers to use an azure region replace the global endpoints with regional information. - if (this.authorityOptions.azureRegionConfiguration?.azureRegion) { - if (localMetadata.metadata) { - const hardcodedMetadata = await invokeAsync(this.updateMetadataWithRegionalInformation.bind(this), PerformanceEvents.AuthorityUpdateMetadataWithRegionalInformation, this.logger, this.performanceClient, this.correlationId)(localMetadata.metadata); - updateAuthorityEndpointMetadata(metadataEntity, hardcodedMetadata, false); - metadataEntity.canonical_authority = - this.canonicalAuthority; - } - } - } - return localMetadata.source; - } - // Get metadata from network if local sources aren't available - let metadata = await invokeAsync(this.getEndpointMetadataFromNetwork.bind(this), PerformanceEvents.AuthorityGetEndpointMetadataFromNetwork, this.logger, this.performanceClient, this.correlationId)(); - if (metadata) { - // If the user prefers to use an azure region replace the global endpoints with regional information. - if (this.authorityOptions.azureRegionConfiguration?.azureRegion) { - metadata = await invokeAsync(this.updateMetadataWithRegionalInformation.bind(this), PerformanceEvents.AuthorityUpdateMetadataWithRegionalInformation, this.logger, this.performanceClient, this.correlationId)(metadata); - } - updateAuthorityEndpointMetadata(metadataEntity, metadata, true); - return AuthorityMetadataSource.NETWORK; - } - else { - // Metadata could not be obtained from the config, cache, network or hardcoded values - throw createClientAuthError(openIdConfigError, this.defaultOpenIdConfigurationEndpoint); - } - } - /** - * Updates endpoint metadata from local sources and returns where the information was retrieved from and the metadata config - * response if the source is hardcoded metadata - * @param metadataEntity - * @returns - */ - updateEndpointMetadataFromLocalSources(metadataEntity) { - this.logger.verbose("Attempting to get endpoint metadata from authority configuration"); - const configMetadata = this.getEndpointMetadataFromConfig(); - if (configMetadata) { - this.logger.verbose("Found endpoint metadata in authority configuration"); - updateAuthorityEndpointMetadata(metadataEntity, configMetadata, false); - return { - source: AuthorityMetadataSource.CONFIG, - }; - } - this.logger.verbose("Did not find endpoint metadata in the config... Attempting to get endpoint metadata from the hardcoded values."); - // skipAuthorityMetadataCache is used to bypass hardcoded authority metadata and force a network metadata cache lookup and network metadata request if no cached response is available. - if (this.authorityOptions.skipAuthorityMetadataCache) { - this.logger.verbose("Skipping hardcoded metadata cache since skipAuthorityMetadataCache is set to true. Attempting to get endpoint metadata from the network metadata cache."); - } - else { - const hardcodedMetadata = this.getEndpointMetadataFromHardcodedValues(); - if (hardcodedMetadata) { - updateAuthorityEndpointMetadata(metadataEntity, hardcodedMetadata, false); - return { - source: AuthorityMetadataSource.HARDCODED_VALUES, - metadata: hardcodedMetadata, - }; - } - else { - this.logger.verbose("Did not find endpoint metadata in hardcoded values... Attempting to get endpoint metadata from the network metadata cache."); - } - } - // Check cached metadata entity expiration status - const metadataEntityExpired = isAuthorityMetadataExpired(metadataEntity); - if (this.isAuthoritySameType(metadataEntity) && - metadataEntity.endpointsFromNetwork && - !metadataEntityExpired) { - // No need to update - this.logger.verbose("Found endpoint metadata in the cache."); - return { source: AuthorityMetadataSource.CACHE }; - } - else if (metadataEntityExpired) { - this.logger.verbose("The metadata entity is expired."); - } - return null; - } - /** - * Compares the number of url components after the domain to determine if the cached - * authority metadata can be used for the requested authority. Protects against same domain different - * authority such as login.microsoftonline.com/tenant and login.microsoftonline.com/tfp/tenant/policy - * @param metadataEntity - */ - isAuthoritySameType(metadataEntity) { - const cachedAuthorityUrl = new UrlString(metadataEntity.canonical_authority); - const cachedParts = cachedAuthorityUrl.getUrlComponents().PathSegments; - return (cachedParts.length === - this.canonicalAuthorityUrlComponents.PathSegments.length); - } - /** - * Parse authorityMetadata config option - */ - getEndpointMetadataFromConfig() { - if (this.authorityOptions.authorityMetadata) { - try { - return JSON.parse(this.authorityOptions.authorityMetadata); - } - catch (e) { - throw createClientConfigurationError(invalidAuthorityMetadata); - } - } - return null; - } - /** - * Gets OAuth endpoints from the given OpenID configuration endpoint. - * - * @param hasHardcodedMetadata boolean - */ - async getEndpointMetadataFromNetwork() { - this.performanceClient?.addQueueMeasurement(PerformanceEvents.AuthorityGetEndpointMetadataFromNetwork, this.correlationId); - const options = {}; - /* - * TODO: Add a timeout if the authority exists in our library's - * hardcoded list of metadata - */ - const openIdConfigurationEndpoint = this.defaultOpenIdConfigurationEndpoint; - this.logger.verbose(`Authority.getEndpointMetadataFromNetwork: attempting to retrieve OAuth endpoints from ${openIdConfigurationEndpoint}`); - try { - const response = await this.networkInterface.sendGetRequestAsync(openIdConfigurationEndpoint, options); - const isValidResponse = isOpenIdConfigResponse(response.body); - if (isValidResponse) { - return response.body; - } - else { - this.logger.verbose(`Authority.getEndpointMetadataFromNetwork: could not parse response as OpenID configuration`); - return null; - } - } - catch (e) { - this.logger.verbose(`Authority.getEndpointMetadataFromNetwork: ${e}`); - return null; - } - } - /** - * Get OAuth endpoints for common authorities. - */ - getEndpointMetadataFromHardcodedValues() { - if (this.hostnameAndPort in EndpointMetadata) { - return EndpointMetadata[this.hostnameAndPort]; - } - return null; - } - /** - * Update the retrieved metadata with regional information. - * User selected Azure region will be used if configured. - */ - async updateMetadataWithRegionalInformation(metadata) { - this.performanceClient?.addQueueMeasurement(PerformanceEvents.AuthorityUpdateMetadataWithRegionalInformation, this.correlationId); - const userConfiguredAzureRegion = this.authorityOptions.azureRegionConfiguration?.azureRegion; - if (userConfiguredAzureRegion) { - if (userConfiguredAzureRegion !== - Constants.AZURE_REGION_AUTO_DISCOVER_FLAG) { - this.regionDiscoveryMetadata.region_outcome = - RegionDiscoveryOutcomes.CONFIGURED_NO_AUTO_DETECTION; - this.regionDiscoveryMetadata.region_used = - userConfiguredAzureRegion; - return Authority.replaceWithRegionalInformation(metadata, userConfiguredAzureRegion); - } - const autodetectedRegionName = await invokeAsync(this.regionDiscovery.detectRegion.bind(this.regionDiscovery), PerformanceEvents.RegionDiscoveryDetectRegion, this.logger, this.performanceClient, this.correlationId)(this.authorityOptions.azureRegionConfiguration - ?.environmentRegion, this.regionDiscoveryMetadata); - if (autodetectedRegionName) { - this.regionDiscoveryMetadata.region_outcome = - RegionDiscoveryOutcomes.AUTO_DETECTION_REQUESTED_SUCCESSFUL; - this.regionDiscoveryMetadata.region_used = - autodetectedRegionName; - return Authority.replaceWithRegionalInformation(metadata, autodetectedRegionName); - } - this.regionDiscoveryMetadata.region_outcome = - RegionDiscoveryOutcomes.AUTO_DETECTION_REQUESTED_FAILED; - } - return metadata; - } - /** - * Updates the AuthorityMetadataEntity with new aliases, preferred_network and preferred_cache - * and returns where the information was retrieved from - * @param metadataEntity - * @returns AuthorityMetadataSource - */ - async updateCloudDiscoveryMetadata(metadataEntity) { - this.performanceClient?.addQueueMeasurement(PerformanceEvents.AuthorityUpdateCloudDiscoveryMetadata, this.correlationId); - const localMetadataSource = this.updateCloudDiscoveryMetadataFromLocalSources(metadataEntity); - if (localMetadataSource) { - return localMetadataSource; - } - // Fallback to network as metadata source - const metadata = await invokeAsync(this.getCloudDiscoveryMetadataFromNetwork.bind(this), PerformanceEvents.AuthorityGetCloudDiscoveryMetadataFromNetwork, this.logger, this.performanceClient, this.correlationId)(); - if (metadata) { - updateCloudDiscoveryMetadata(metadataEntity, metadata, true); - return AuthorityMetadataSource.NETWORK; - } - // Metadata could not be obtained from the config, cache, network or hardcoded values - throw createClientConfigurationError(untrustedAuthority); - } - updateCloudDiscoveryMetadataFromLocalSources(metadataEntity) { - this.logger.verbose("Attempting to get cloud discovery metadata from authority configuration"); - this.logger.verbosePii(`Known Authorities: ${this.authorityOptions.knownAuthorities || - Constants.NOT_APPLICABLE}`); - this.logger.verbosePii(`Authority Metadata: ${this.authorityOptions.authorityMetadata || - Constants.NOT_APPLICABLE}`); - this.logger.verbosePii(`Canonical Authority: ${metadataEntity.canonical_authority || Constants.NOT_APPLICABLE}`); - const metadata = this.getCloudDiscoveryMetadataFromConfig(); - if (metadata) { - this.logger.verbose("Found cloud discovery metadata in authority configuration"); - updateCloudDiscoveryMetadata(metadataEntity, metadata, false); - return AuthorityMetadataSource.CONFIG; - } - // If the cached metadata came from config but that config was not passed to this instance, we must go to hardcoded values - this.logger.verbose("Did not find cloud discovery metadata in the config... Attempting to get cloud discovery metadata from the hardcoded values."); - if (this.options.skipAuthorityMetadataCache) { - this.logger.verbose("Skipping hardcoded cloud discovery metadata cache since skipAuthorityMetadataCache is set to true. Attempting to get cloud discovery metadata from the network metadata cache."); - } - else { - const hardcodedMetadata = getCloudDiscoveryMetadataFromHardcodedValues(this.hostnameAndPort); - if (hardcodedMetadata) { - this.logger.verbose("Found cloud discovery metadata from hardcoded values."); - updateCloudDiscoveryMetadata(metadataEntity, hardcodedMetadata, false); - return AuthorityMetadataSource.HARDCODED_VALUES; - } - this.logger.verbose("Did not find cloud discovery metadata in hardcoded values... Attempting to get cloud discovery metadata from the network metadata cache."); - } - const metadataEntityExpired = isAuthorityMetadataExpired(metadataEntity); - if (this.isAuthoritySameType(metadataEntity) && - metadataEntity.aliasesFromNetwork && - !metadataEntityExpired) { - this.logger.verbose("Found cloud discovery metadata in the cache."); - // No need to update - return AuthorityMetadataSource.CACHE; - } - else if (metadataEntityExpired) { - this.logger.verbose("The metadata entity is expired."); - } - return null; - } - /** - * Parse cloudDiscoveryMetadata config or check knownAuthorities - */ - getCloudDiscoveryMetadataFromConfig() { - // CIAM does not support cloud discovery metadata - if (this.authorityType === AuthorityType.Ciam) { - this.logger.verbose("CIAM authorities do not support cloud discovery metadata, generate the aliases from authority host."); - return Authority.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort); - } - // Check if network response was provided in config - if (this.authorityOptions.cloudDiscoveryMetadata) { - this.logger.verbose("The cloud discovery metadata has been provided as a network response, in the config."); - try { - this.logger.verbose("Attempting to parse the cloud discovery metadata."); - const parsedResponse = JSON.parse(this.authorityOptions.cloudDiscoveryMetadata); - const metadata = getCloudDiscoveryMetadataFromNetworkResponse(parsedResponse.metadata, this.hostnameAndPort); - this.logger.verbose("Parsed the cloud discovery metadata."); - if (metadata) { - this.logger.verbose("There is returnable metadata attached to the parsed cloud discovery metadata."); - return metadata; - } - else { - this.logger.verbose("There is no metadata attached to the parsed cloud discovery metadata."); - } - } - catch (e) { - this.logger.verbose("Unable to parse the cloud discovery metadata. Throwing Invalid Cloud Discovery Metadata Error."); - throw createClientConfigurationError(invalidCloudDiscoveryMetadata); - } - } - // If cloudDiscoveryMetadata is empty or does not contain the host, check knownAuthorities - if (this.isInKnownAuthorities()) { - this.logger.verbose("The host is included in knownAuthorities. Creating new cloud discovery metadata from the host."); - return Authority.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort); - } - return null; - } - /** - * Called to get metadata from network if CloudDiscoveryMetadata was not populated by config - * - * @param hasHardcodedMetadata boolean - */ - async getCloudDiscoveryMetadataFromNetwork() { - this.performanceClient?.addQueueMeasurement(PerformanceEvents.AuthorityGetCloudDiscoveryMetadataFromNetwork, this.correlationId); - const instanceDiscoveryEndpoint = `${Constants.AAD_INSTANCE_DISCOVERY_ENDPT}${this.canonicalAuthority}oauth2/v2.0/authorize`; - const options = {}; - /* - * TODO: Add a timeout if the authority exists in our library's - * hardcoded list of metadata - */ - let match = null; - try { - const response = await this.networkInterface.sendGetRequestAsync(instanceDiscoveryEndpoint, options); - let typedResponseBody; - let metadata; - if (isCloudInstanceDiscoveryResponse(response.body)) { - typedResponseBody = - response.body; - metadata = typedResponseBody.metadata; - this.logger.verbosePii(`tenant_discovery_endpoint is: ${typedResponseBody.tenant_discovery_endpoint}`); - } - else if (isCloudInstanceDiscoveryErrorResponse(response.body)) { - this.logger.warning(`A CloudInstanceDiscoveryErrorResponse was returned. The cloud instance discovery network request's status code is: ${response.status}`); - typedResponseBody = - response.body; - if (typedResponseBody.error === Constants.INVALID_INSTANCE) { - this.logger.error("The CloudInstanceDiscoveryErrorResponse error is invalid_instance."); - return null; - } - this.logger.warning(`The CloudInstanceDiscoveryErrorResponse error is ${typedResponseBody.error}`); - this.logger.warning(`The CloudInstanceDiscoveryErrorResponse error description is ${typedResponseBody.error_description}`); - this.logger.warning("Setting the value of the CloudInstanceDiscoveryMetadata (returned from the network) to []"); - metadata = []; - } - else { - this.logger.error("AAD did not return a CloudInstanceDiscoveryResponse or CloudInstanceDiscoveryErrorResponse"); - return null; - } - this.logger.verbose("Attempting to find a match between the developer's authority and the CloudInstanceDiscoveryMetadata returned from the network request."); - match = getCloudDiscoveryMetadataFromNetworkResponse(metadata, this.hostnameAndPort); - } - catch (error) { - if (error instanceof AuthError) { - this.logger.error(`There was a network error while attempting to get the cloud discovery instance metadata.\nError: ${error.errorCode}\nError Description: ${error.errorMessage}`); - } - else { - const typedError = error; - this.logger.error(`A non-MSALJS error was thrown while attempting to get the cloud instance discovery metadata.\nError: ${typedError.name}\nError Description: ${typedError.message}`); - } - return null; - } - // Custom Domain scenario, host is trusted because Instance Discovery call succeeded - if (!match) { - this.logger.warning("The developer's authority was not found within the CloudInstanceDiscoveryMetadata returned from the network request."); - this.logger.verbose("Creating custom Authority for custom domain scenario."); - match = Authority.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort); - } - return match; - } - /** - * Helper function to determine if this host is included in the knownAuthorities config option - */ - isInKnownAuthorities() { - const matches = this.authorityOptions.knownAuthorities.filter((authority) => { - return (authority && - UrlString.getDomainFromUrl(authority).toLowerCase() === - this.hostnameAndPort); - }); - return matches.length > 0; - } - /** - * helper function to populate the authority based on azureCloudOptions - * @param authorityString - * @param azureCloudOptions - */ - static generateAuthority(authorityString, azureCloudOptions) { - let authorityAzureCloudInstance; - if (azureCloudOptions && - azureCloudOptions.azureCloudInstance !== AzureCloudInstance.None) { - const tenant = azureCloudOptions.tenant - ? azureCloudOptions.tenant - : Constants.DEFAULT_COMMON_TENANT; - authorityAzureCloudInstance = `${azureCloudOptions.azureCloudInstance}/${tenant}/`; - } - return authorityAzureCloudInstance - ? authorityAzureCloudInstance - : authorityString; - } - /** - * Creates cloud discovery metadata object from a given host - * @param host - */ - static createCloudDiscoveryMetadataFromHost(host) { - return { - preferred_network: host, - preferred_cache: host, - aliases: [host], - }; - } - /** - * helper function to generate environment from authority object - */ - getPreferredCache() { - if (this.managedIdentity) { - return Constants.DEFAULT_AUTHORITY_HOST; - } - else if (this.discoveryComplete()) { - return this.metadata.preferred_cache; - } - else { - throw createClientAuthError(endpointResolutionError); - } - } - /** - * Returns whether or not the provided host is an alias of this authority instance - * @param host - */ - isAlias(host) { - return this.metadata.aliases.indexOf(host) > -1; - } - /** - * Returns whether or not the provided host is an alias of a known Microsoft authority for purposes of endpoint discovery - * @param host - */ - isAliasOfKnownMicrosoftAuthority(host) { - return InstanceDiscoveryMetadataAliases.has(host); - } - /** - * Checks whether the provided host is that of a public cloud authority - * - * @param authority string - * @returns bool - */ - static isPublicCloudAuthority(host) { - return Constants.KNOWN_PUBLIC_CLOUDS.indexOf(host) >= 0; - } - /** - * Rebuild the authority string with the region - * - * @param host string - * @param region string - */ - static buildRegionalAuthorityString(host, region, queryString) { - // Create and validate a Url string object with the initial authority string - const authorityUrlInstance = new UrlString(host); - authorityUrlInstance.validateAsUri(); - const authorityUrlParts = authorityUrlInstance.getUrlComponents(); - let hostNameAndPort = `${region}.${authorityUrlParts.HostNameAndPort}`; - if (this.isPublicCloudAuthority(authorityUrlParts.HostNameAndPort)) { - hostNameAndPort = `${region}.${Constants.REGIONAL_AUTH_PUBLIC_CLOUD_SUFFIX}`; - } - // Include the query string portion of the url - const url = UrlString.constructAuthorityUriFromObject({ - ...authorityUrlInstance.getUrlComponents(), - HostNameAndPort: hostNameAndPort, - }).urlString; - // Add the query string if a query string was provided - if (queryString) - return `${url}?${queryString}`; - return url; - } - /** - * Replace the endpoints in the metadata object with their regional equivalents. - * - * @param metadata OpenIdConfigResponse - * @param azureRegion string - */ - static replaceWithRegionalInformation(metadata, azureRegion) { - const regionalMetadata = { ...metadata }; - regionalMetadata.authorization_endpoint = - Authority.buildRegionalAuthorityString(regionalMetadata.authorization_endpoint, azureRegion); - regionalMetadata.token_endpoint = - Authority.buildRegionalAuthorityString(regionalMetadata.token_endpoint, azureRegion); - if (regionalMetadata.end_session_endpoint) { - regionalMetadata.end_session_endpoint = - Authority.buildRegionalAuthorityString(regionalMetadata.end_session_endpoint, azureRegion); - } - return regionalMetadata; - } - /** - * Transform CIAM_AUTHORIY as per the below rules: - * If no path segments found and it is a CIAM authority (hostname ends with .ciamlogin.com), then transform it - * - * NOTE: The transformation path should go away once STS supports CIAM with the format: `tenantIdorDomain.ciamlogin.com` - * `ciamlogin.com` can also change in the future and we should accommodate the same - * - * @param authority - */ - static transformCIAMAuthority(authority) { - let ciamAuthority = authority; - const authorityUrl = new UrlString(authority); - const authorityUrlComponents = authorityUrl.getUrlComponents(); - // check if transformation is needed - if (authorityUrlComponents.PathSegments.length === 0 && - authorityUrlComponents.HostNameAndPort.endsWith(Constants.CIAM_AUTH_URL)) { - const tenantIdOrDomain = authorityUrlComponents.HostNameAndPort.split(".")[0]; - ciamAuthority = `${ciamAuthority}${tenantIdOrDomain}${Constants.AAD_TENANT_DOMAIN_SUFFIX}`; - } - return ciamAuthority; - } -} -// Reserved tenant domain names that will not be replaced with tenant id -Authority.reservedTenantDomains = new Set([ - "{tenant}", - "{tenantid}", - AADAuthorityConstants.COMMON, - AADAuthorityConstants.CONSUMERS, - AADAuthorityConstants.ORGANIZATIONS, -]); -/** - * Extract tenantId from authority - */ -function getTenantFromAuthorityString(authority) { - const authorityUrl = new UrlString(authority); - const authorityUrlComponents = authorityUrl.getUrlComponents(); - /** - * For credential matching purposes, tenantId is the last path segment of the authority URL: - * AAD Authority - domain/tenantId -> Credentials are cached with realm = tenantId - * B2C Authority - domain/{tenantId}?/.../policy -> Credentials are cached with realm = policy - * tenantId is downcased because B2C policies can have mixed case but tfp claim is downcased - * - * Note that we may not have any path segments in certain OIDC scenarios. - */ - const tenantId = authorityUrlComponents.PathSegments.slice(-1)[0]?.toLowerCase(); - switch (tenantId) { - case AADAuthorityConstants.COMMON: - case AADAuthorityConstants.ORGANIZATIONS: - case AADAuthorityConstants.CONSUMERS: - return undefined; - default: - return tenantId; - } -} -function formatAuthorityUri(authorityUri) { - return authorityUri.endsWith(Constants.FORWARD_SLASH) - ? authorityUri - : `${authorityUri}${Constants.FORWARD_SLASH}`; -} -function buildStaticAuthorityOptions(authOptions) { - const rawCloudDiscoveryMetadata = authOptions.cloudDiscoveryMetadata; - let cloudDiscoveryMetadata = undefined; - if (rawCloudDiscoveryMetadata) { - try { - cloudDiscoveryMetadata = JSON.parse(rawCloudDiscoveryMetadata); - } - catch (e) { - throw createClientConfigurationError(invalidCloudDiscoveryMetadata); - } - } - return { - canonicalAuthority: authOptions.authority - ? formatAuthorityUri(authOptions.authority) - : undefined, - knownAuthorities: authOptions.knownAuthorities, - cloudDiscoveryMetadata: cloudDiscoveryMetadata, - }; -} - -export { Authority, buildStaticAuthorityOptions, formatAuthorityUri, getTenantFromAuthorityString }; -//# sourceMappingURL=Authority.mjs.map diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/Authority.mjs.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/Authority.mjs.map deleted file mode 100644 index 7dad2e4..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/Authority.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Authority.mjs","sources":["../../src/authority/Authority.ts"],"sourcesContent":[null],"names":["ClientAuthErrorCodes.endpointResolutionError","ClientAuthErrorCodes.endSessionEndpointNotSupported","CacheHelpers.generateAuthorityMetadataExpiresAt","CacheHelpers.updateAuthorityEndpointMetadata","ClientAuthErrorCodes.openIdConfigError","CacheHelpers.isAuthorityMetadataExpired","ClientConfigurationErrorCodes.invalidAuthorityMetadata","CacheHelpers.updateCloudDiscoveryMetadata","ClientConfigurationErrorCodes.untrustedAuthority","ClientConfigurationErrorCodes.invalidCloudDiscoveryMetadata"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;;;AAGG;AA0DH;;;;AAIG;MACU,SAAS,CAAA;AAkClB,IAAA,WAAA,CACI,SAAiB,EACjB,gBAAgC,EAChC,YAA2B,EAC3B,gBAAkC,EAClC,MAAc,EACd,aAAqB,EACrB,iBAAsC,EACtC,eAAyB,EAAA;AAEzB,QAAA,IAAI,CAAC,kBAAkB,GAAG,SAAS,CAAC;AACpC,QAAA,IAAI,CAAC,mBAAmB,CAAC,aAAa,EAAE,CAAC;AACzC,QAAA,IAAI,CAAC,gBAAgB,GAAG,gBAAgB,CAAC;AACzC,QAAA,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;AACjC,QAAA,IAAI,CAAC,gBAAgB,GAAG,gBAAgB,CAAC;QACzC,IAAI,CAAC,uBAAuB,GAAG;AAC3B,YAAA,WAAW,EAAE,SAAS;AACtB,YAAA,aAAa,EAAE,SAAS;AACxB,YAAA,cAAc,EAAE,SAAS;SAC5B,CAAC;AACF,QAAA,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;AACrB,QAAA,IAAI,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;AAC3C,QAAA,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B,CACvC,WAAsC,EAAA;AAEtC,IAAA,MAAM,yBAAyB,GAAG,WAAW,CAAC,sBAAsB,CAAC;IACrE,IAAI,sBAAsB,GACtB,SAAS,CAAC;AACd,IAAA,IAAI,yBAAyB,EAAE;QAC3B,IAAI;AACA,YAAA,sBAAsB,GAAG,IAAI,CAAC,KAAK,CAAC,yBAAyB,CAAC,CAAC;AAClE,SAAA;AAAC,QAAA,OAAO,CAAC,EAAE;AACR,YAAA,MAAM,8BAA8B,CAChCS,6BAA2D,CAC9D,CAAC;AACL,SAAA;AACJ,KAAA;IACD,OAAO;QACH,kBAAkB,EAAE,WAAW,CAAC,SAAS;AACrC,cAAE,kBAAkB,CAAC,WAAW,CAAC,SAAS,CAAC;AAC3C,cAAE,SAAS;QACf,gBAAgB,EAAE,WAAW,CAAC,gBAAgB;AAC9C,QAAA,sBAAsB,EAAE,sBAAsB;KACjD,CAAC;AACN;;;;"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/AuthorityFactory.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/AuthorityFactory.d.ts deleted file mode 100644 index 3118eea..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/AuthorityFactory.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { Authority } from "./Authority.js"; -import { INetworkModule } from "../network/INetworkModule.js"; -import { ICacheManager } from "../cache/interface/ICacheManager.js"; -import { AuthorityOptions } from "./AuthorityOptions.js"; -import { Logger } from "../logger/Logger.js"; -import { IPerformanceClient } from "../telemetry/performance/IPerformanceClient.js"; -/** - * Create an authority object of the correct type based on the url - * Performs basic authority validation - checks to see if the authority is of a valid type (i.e. aad, b2c, adfs) - * - * Also performs endpoint discovery. - * - * @param authorityUri - * @param networkClient - * @param protocolMode - * @internal - */ -export declare function createDiscoveredInstance(authorityUri: string, networkClient: INetworkModule, cacheManager: ICacheManager, authorityOptions: AuthorityOptions, logger: Logger, correlationId: string, performanceClient?: IPerformanceClient): Promise; -//# sourceMappingURL=AuthorityFactory.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/AuthorityFactory.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/AuthorityFactory.d.ts.map deleted file mode 100644 index 8f4b0c8..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/AuthorityFactory.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AuthorityFactory.d.ts","sourceRoot":"","sources":["../../src/authority/AuthorityFactory.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,SAAS,EAAsB,MAAM,gBAAgB,CAAC;AAC/D,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAK9D,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,kBAAkB,EAAE,MAAM,gDAAgD,CAAC;AAIpF;;;;;;;;;;GAUG;AACH,wBAAsB,wBAAwB,CAC1C,YAAY,EAAE,MAAM,EACpB,aAAa,EAAE,cAAc,EAC7B,YAAY,EAAE,aAAa,EAC3B,gBAAgB,EAAE,gBAAgB,EAClC,MAAM,EAAE,MAAM,EACd,aAAa,EAAE,MAAM,EACrB,iBAAiB,CAAC,EAAE,kBAAkB,GACvC,OAAO,CAAC,SAAS,CAAC,CAoCpB"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/AuthorityFactory.mjs b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/AuthorityFactory.mjs deleted file mode 100644 index f2175d7..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/AuthorityFactory.mjs +++ /dev/null @@ -1,39 +0,0 @@ -/*! @azure/msal-common v14.16.1 2025-08-05 */ -'use strict'; -import { Authority, formatAuthorityUri } from './Authority.mjs'; -import { createClientAuthError } from '../error/ClientAuthError.mjs'; -import { PerformanceEvents } from '../telemetry/performance/PerformanceEvent.mjs'; -import { invokeAsync } from '../utils/FunctionWrappers.mjs'; -import { endpointResolutionError } from '../error/ClientAuthErrorCodes.mjs'; - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * Create an authority object of the correct type based on the url - * Performs basic authority validation - checks to see if the authority is of a valid type (i.e. aad, b2c, adfs) - * - * Also performs endpoint discovery. - * - * @param authorityUri - * @param networkClient - * @param protocolMode - * @internal - */ -async function createDiscoveredInstance(authorityUri, networkClient, cacheManager, authorityOptions, logger, correlationId, performanceClient) { - performanceClient?.addQueueMeasurement(PerformanceEvents.AuthorityFactoryCreateDiscoveredInstance, correlationId); - const authorityUriFinal = Authority.transformCIAMAuthority(formatAuthorityUri(authorityUri)); - // Initialize authority and perform discovery endpoint check. - const acquireTokenAuthority = new Authority(authorityUriFinal, networkClient, cacheManager, authorityOptions, logger, correlationId, performanceClient); - try { - await invokeAsync(acquireTokenAuthority.resolveEndpointsAsync.bind(acquireTokenAuthority), PerformanceEvents.AuthorityResolveEndpointsAsync, logger, performanceClient, correlationId)(); - return acquireTokenAuthority; - } - catch (e) { - throw createClientAuthError(endpointResolutionError); - } -} - -export { createDiscoveredInstance }; -//# sourceMappingURL=AuthorityFactory.mjs.map diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/AuthorityFactory.mjs.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/AuthorityFactory.mjs.map deleted file mode 100644 index 6a9731c..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/AuthorityFactory.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AuthorityFactory.mjs","sources":["../../src/authority/AuthorityFactory.ts"],"sourcesContent":[null],"names":["ClientAuthErrorCodes.endpointResolutionError"],"mappings":";;;;;;;;AAAA;;;AAGG;AAeH;;;;;;;;;;AAUG;AACI,eAAe,wBAAwB,CAC1C,YAAoB,EACpB,aAA6B,EAC7B,YAA2B,EAC3B,gBAAkC,EAClC,MAAc,EACd,aAAqB,EACrB,iBAAsC,EAAA;IAEtC,iBAAiB,EAAE,mBAAmB,CAClC,iBAAiB,CAAC,wCAAwC,EAC1D,aAAa,CAChB,CAAC;IACF,MAAM,iBAAiB,GAAG,SAAS,CAAC,sBAAsB,CACtD,kBAAkB,CAAC,YAAY,CAAC,CACnC,CAAC;;AAGF,IAAA,MAAM,qBAAqB,GAAc,IAAI,SAAS,CAClD,iBAAiB,EACjB,aAAa,EACb,YAAY,EACZ,gBAAgB,EAChB,MAAM,EACN,aAAa,EACb,iBAAiB,CACpB,CAAC;IAEF,IAAI;QACA,MAAM,WAAW,CACb,qBAAqB,CAAC,qBAAqB,CAAC,IAAI,CAC5C,qBAAqB,CACxB,EACD,iBAAiB,CAAC,8BAA8B,EAChD,MAAM,EACN,iBAAiB,EACjB,aAAa,CAChB,EAAE,CAAC;AACJ,QAAA,OAAO,qBAAqB,CAAC;AAChC,KAAA;AAAC,IAAA,OAAO,CAAC,EAAE;AACR,QAAA,MAAM,qBAAqB,CACvBA,uBAA4C,CAC/C,CAAC;AACL,KAAA;AACL;;;;"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/AuthorityMetadata.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/AuthorityMetadata.d.ts deleted file mode 100644 index 4884a49..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/AuthorityMetadata.d.ts +++ /dev/null @@ -1,44 +0,0 @@ -import { Logger } from "../logger/Logger.js"; -import { AuthorityMetadataSource } from "../utils/Constants.js"; -import { StaticAuthorityOptions } from "./AuthorityOptions.js"; -import { CloudDiscoveryMetadata } from "./CloudDiscoveryMetadata.js"; -import { CloudInstanceDiscoveryResponse } from "./CloudInstanceDiscoveryResponse.js"; -import { OpenIdConfigResponse } from "./OpenIdConfigResponse.js"; -type RawMetadata = { - endpointMetadata: { - [key: string]: OpenIdConfigResponse; - }; - instanceDiscoveryMetadata: CloudInstanceDiscoveryResponse; -}; -export declare const rawMetdataJSON: RawMetadata; -export declare const EndpointMetadata: { - [key: string]: OpenIdConfigResponse; -}; -export declare const InstanceDiscoveryMetadata: CloudInstanceDiscoveryResponse; -export declare const InstanceDiscoveryMetadataAliases: Set; -/** - * Attempts to get an aliases array from the static authority metadata sources based on the canonical authority host - * @param staticAuthorityOptions - * @param logger - * @returns - */ -export declare function getAliasesFromStaticSources(staticAuthorityOptions: StaticAuthorityOptions, logger?: Logger): string[]; -/** - * Returns aliases for from the raw cloud discovery metadata passed in - * @param authorityHost - * @param rawCloudDiscoveryMetadata - * @returns - */ -export declare function getAliasesFromMetadata(authorityHost?: string, cloudDiscoveryMetadata?: CloudDiscoveryMetadata[], source?: AuthorityMetadataSource, logger?: Logger): string[] | null; -/** - * Get cloud discovery metadata for common authorities - */ -export declare function getCloudDiscoveryMetadataFromHardcodedValues(authorityHost: string): CloudDiscoveryMetadata | null; -/** - * Searches instance discovery network response for the entry that contains the host in the aliases list - * @param response - * @param authority - */ -export declare function getCloudDiscoveryMetadataFromNetworkResponse(response: CloudDiscoveryMetadata[], authorityHost: string): CloudDiscoveryMetadata | null; -export {}; -//# sourceMappingURL=AuthorityMetadata.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/AuthorityMetadata.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/AuthorityMetadata.d.ts.map deleted file mode 100644 index 99b8551..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/AuthorityMetadata.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AuthorityMetadata.d.ts","sourceRoot":"","sources":["../../src/authority/AuthorityMetadata.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,MAAM,EAAE,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/dist/authority/AuthorityMetadata.mjs b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/AuthorityMetadata.mjs deleted file mode 100644 index fe49326..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/AuthorityMetadata.mjs +++ /dev/null @@ -1,145 +0,0 @@ -/*! @azure/msal-common v14.16.1 2025-08-05 */ -'use strict'; -import { UrlString } from '../url/UrlString.mjs'; -import { AuthorityMetadataSource } from '../utils/Constants.mjs'; - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -const rawMetdataJSON = { - endpointMetadata: { - "login.microsoftonline.com": { - token_endpoint: "https://login.microsoftonline.com/{tenantid}/oauth2/v2.0/token", - jwks_uri: "https://login.microsoftonline.com/{tenantid}/discovery/v2.0/keys", - issuer: "https://login.microsoftonline.com/{tenantid}/v2.0", - authorization_endpoint: "https://login.microsoftonline.com/{tenantid}/oauth2/v2.0/authorize", - end_session_endpoint: "https://login.microsoftonline.com/{tenantid}/oauth2/v2.0/logout", - }, - "login.chinacloudapi.cn": { - token_endpoint: "https://login.chinacloudapi.cn/{tenantid}/oauth2/v2.0/token", - jwks_uri: "https://login.chinacloudapi.cn/{tenantid}/discovery/v2.0/keys", - issuer: "https://login.partner.microsoftonline.cn/{tenantid}/v2.0", - authorization_endpoint: "https://login.chinacloudapi.cn/{tenantid}/oauth2/v2.0/authorize", - end_session_endpoint: "https://login.chinacloudapi.cn/{tenantid}/oauth2/v2.0/logout", - }, - "login.microsoftonline.us": { - token_endpoint: "https://login.microsoftonline.us/{tenantid}/oauth2/v2.0/token", - jwks_uri: "https://login.microsoftonline.us/{tenantid}/discovery/v2.0/keys", - issuer: "https://login.microsoftonline.us/{tenantid}/v2.0", - authorization_endpoint: "https://login.microsoftonline.us/{tenantid}/oauth2/v2.0/authorize", - end_session_endpoint: "https://login.microsoftonline.us/{tenantid}/oauth2/v2.0/logout", - }, - }, - instanceDiscoveryMetadata: { - tenant_discovery_endpoint: "https://{canonicalAuthority}/v2.0/.well-known/openid-configuration", - metadata: [ - { - preferred_network: "login.microsoftonline.com", - preferred_cache: "login.windows.net", - aliases: [ - "login.microsoftonline.com", - "login.windows.net", - "login.microsoft.com", - "sts.windows.net", - ], - }, - { - preferred_network: "login.partner.microsoftonline.cn", - preferred_cache: "login.partner.microsoftonline.cn", - aliases: [ - "login.partner.microsoftonline.cn", - "login.chinacloudapi.cn", - ], - }, - { - preferred_network: "login.microsoftonline.de", - preferred_cache: "login.microsoftonline.de", - aliases: ["login.microsoftonline.de"], - }, - { - preferred_network: "login.microsoftonline.us", - preferred_cache: "login.microsoftonline.us", - aliases: [ - "login.microsoftonline.us", - "login.usgovcloudapi.net", - ], - }, - { - preferred_network: "login-us.microsoftonline.com", - preferred_cache: "login-us.microsoftonline.com", - aliases: ["login-us.microsoftonline.com"], - }, - ], - }, -}; -const EndpointMetadata = rawMetdataJSON.endpointMetadata; -const InstanceDiscoveryMetadata = rawMetdataJSON.instanceDiscoveryMetadata; -const InstanceDiscoveryMetadataAliases = new Set(); -InstanceDiscoveryMetadata.metadata.forEach((metadataEntry) => { - metadataEntry.aliases.forEach((alias) => { - InstanceDiscoveryMetadataAliases.add(alias); - }); -}); -/** - * Attempts to get an aliases array from the static authority metadata sources based on the canonical authority host - * @param staticAuthorityOptions - * @param logger - * @returns - */ -function getAliasesFromStaticSources(staticAuthorityOptions, logger) { - let staticAliases; - const canonicalAuthority = staticAuthorityOptions.canonicalAuthority; - if (canonicalAuthority) { - const authorityHost = new UrlString(canonicalAuthority).getUrlComponents().HostNameAndPort; - staticAliases = - getAliasesFromMetadata(authorityHost, staticAuthorityOptions.cloudDiscoveryMetadata?.metadata, AuthorityMetadataSource.CONFIG, logger) || - getAliasesFromMetadata(authorityHost, InstanceDiscoveryMetadata.metadata, AuthorityMetadataSource.HARDCODED_VALUES, logger) || - staticAuthorityOptions.knownAuthorities; - } - return staticAliases || []; -} -/** - * Returns aliases for from the raw cloud discovery metadata passed in - * @param authorityHost - * @param rawCloudDiscoveryMetadata - * @returns - */ -function getAliasesFromMetadata(authorityHost, cloudDiscoveryMetadata, source, logger) { - logger?.trace(`getAliasesFromMetadata called with source: ${source}`); - if (authorityHost && cloudDiscoveryMetadata) { - const metadata = getCloudDiscoveryMetadataFromNetworkResponse(cloudDiscoveryMetadata, authorityHost); - if (metadata) { - logger?.trace(`getAliasesFromMetadata: found cloud discovery metadata in ${source}, returning aliases`); - return metadata.aliases; - } - else { - logger?.trace(`getAliasesFromMetadata: did not find cloud discovery metadata in ${source}`); - } - } - return null; -} -/** - * Get cloud discovery metadata for common authorities - */ -function getCloudDiscoveryMetadataFromHardcodedValues(authorityHost) { - const metadata = getCloudDiscoveryMetadataFromNetworkResponse(InstanceDiscoveryMetadata.metadata, authorityHost); - return metadata; -} -/** - * Searches instance discovery network response for the entry that contains the host in the aliases list - * @param response - * @param authority - */ -function getCloudDiscoveryMetadataFromNetworkResponse(response, authorityHost) { - for (let i = 0; i < response.length; i++) { - const metadata = response[i]; - if (metadata.aliases.includes(authorityHost)) { - return metadata; - } - } - return null; -} - -export { EndpointMetadata, InstanceDiscoveryMetadata, InstanceDiscoveryMetadataAliases, getAliasesFromMetadata, getAliasesFromStaticSources, getCloudDiscoveryMetadataFromHardcodedValues, getCloudDiscoveryMetadataFromNetworkResponse, rawMetdataJSON }; -//# sourceMappingURL=AuthorityMetadata.mjs.map diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/AuthorityMetadata.mjs.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/AuthorityMetadata.mjs.map deleted file mode 100644 index 06a2a2b..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/AuthorityMetadata.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AuthorityMetadata.mjs","sources":["../../src/authority/AuthorityMetadata.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;AAAA;;;AAGG;AAeU,MAAA,cAAc,GAAgB;AACvC,IAAA,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;AAChB;;;;"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/AuthorityOptions.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/AuthorityOptions.d.ts deleted file mode 100644 index f0617ca..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/AuthorityOptions.d.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { ProtocolMode } from "./ProtocolMode.js"; -import { OIDCOptions } from "./OIDCOptions.js"; -import { AzureRegionConfiguration } from "./AzureRegionConfiguration.js"; -import { CloudInstanceDiscoveryResponse } from "./CloudInstanceDiscoveryResponse.js"; -export type AuthorityOptions = { - protocolMode: ProtocolMode; - OIDCOptions?: OIDCOptions | null; - knownAuthorities: Array; - cloudDiscoveryMetadata: string; - authorityMetadata: string; - skipAuthorityMetadataCache?: boolean; - azureRegionConfiguration?: AzureRegionConfiguration; - authority?: string; -}; -export type StaticAuthorityOptions = Partial> & { - canonicalAuthority?: string; - cloudDiscoveryMetadata?: CloudInstanceDiscoveryResponse; -}; -export declare const AzureCloudInstance: { - readonly None: "none"; - readonly AzurePublic: "https://login.microsoftonline.com"; - readonly AzurePpe: "https://login.windows-ppe.net"; - readonly AzureChina: "https://login.chinacloudapi.cn"; - readonly AzureGermany: "https://login.microsoftonline.de"; - readonly AzureUsGovernment: "https://login.microsoftonline.us"; -}; -export type AzureCloudInstance = (typeof AzureCloudInstance)[keyof typeof AzureCloudInstance]; -//# sourceMappingURL=AuthorityOptions.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/AuthorityOptions.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/AuthorityOptions.d.ts.map deleted file mode 100644 index 3323015..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/AuthorityOptions.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AuthorityOptions.d.ts","sourceRoot":"","sources":["../../src/authority/AuthorityOptions.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,EAAE,8BAA8B,EAAE,MAAM,qCAAqC,CAAC;AAErF,MAAM,MAAM,gBAAgB,GAAG;IAC3B,YAAY,EAAE,YAAY,CAAC;IAC3B,WAAW,CAAC,EAAE,WAAW,GAAG,IAAI,CAAC;IACjC,gBAAgB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAChC,sBAAsB,EAAE,MAAM,CAAC;IAC/B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,0BAA0B,CAAC,EAAE,OAAO,CAAC;IACrC,wBAAwB,CAAC,EAAE,wBAAwB,CAAC;IACpD,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG,OAAO,CACxC,IAAI,CAAC,gBAAgB,EAAE,kBAAkB,CAAC,CAC7C,GAAG;IACA,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,sBAAsB,CAAC,EAAE,8BAA8B,CAAC;CAC3D,CAAC;AAEF,eAAO,MAAM,kBAAkB;;;;;;;CAkBrB,CAAC;AACX,MAAM,MAAM,kBAAkB,GAC1B,CAAC,OAAO,kBAAkB,CAAC,CAAC,MAAM,OAAO,kBAAkB,CAAC,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/AuthorityOptions.mjs b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/AuthorityOptions.mjs deleted file mode 100644 index 8c748c4..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/AuthorityOptions.mjs +++ /dev/null @@ -1,23 +0,0 @@ -/*! @azure/msal-common v14.16.1 2025-08-05 */ -'use strict'; -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -const AzureCloudInstance = { - // AzureCloudInstance is not specified. - None: "none", - // Microsoft Azure public cloud - AzurePublic: "https://login.microsoftonline.com", - // Microsoft PPE - AzurePpe: "https://login.windows-ppe.net", - // Microsoft Chinese national/regional cloud - AzureChina: "https://login.chinacloudapi.cn", - // Microsoft German national/regional cloud ("Black Forest") - AzureGermany: "https://login.microsoftonline.de", - // US Government cloud - AzureUsGovernment: "https://login.microsoftonline.us", -}; - -export { AzureCloudInstance }; -//# sourceMappingURL=AuthorityOptions.mjs.map diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/AuthorityOptions.mjs.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/AuthorityOptions.mjs.map deleted file mode 100644 index 476b12e..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/AuthorityOptions.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AuthorityOptions.mjs","sources":["../../src/authority/AuthorityOptions.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAAA;;;AAGG;AAyBU,MAAA,kBAAkB,GAAG;;AAE9B,IAAA,IAAI,EAAE,MAAM;;AAGZ,IAAA,WAAW,EAAE,mCAAmC;;AAGhD,IAAA,QAAQ,EAAE,+BAA+B;;AAGzC,IAAA,UAAU,EAAE,gCAAgC;;AAG5C,IAAA,YAAY,EAAE,kCAAkC;;AAGhD,IAAA,iBAAiB,EAAE,kCAAkC;;;;;"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/AuthorityType.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/AuthorityType.d.ts deleted file mode 100644 index e05171a..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/AuthorityType.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -/** - * Authority types supported by MSAL. - */ -export declare const AuthorityType: { - readonly Default: 0; - readonly Adfs: 1; - readonly Dsts: 2; - readonly Ciam: 3; -}; -export type AuthorityType = (typeof AuthorityType)[keyof typeof AuthorityType]; -//# sourceMappingURL=AuthorityType.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/AuthorityType.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/AuthorityType.d.ts.map deleted file mode 100644 index 79340eb..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/AuthorityType.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AuthorityType.d.ts","sourceRoot":"","sources":["../../src/authority/AuthorityType.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,eAAO,MAAM,aAAa;;;;;CAKhB,CAAC;AACX,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,OAAO,aAAa,CAAC,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/AuthorityType.mjs b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/AuthorityType.mjs deleted file mode 100644 index 46b2fd0..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/AuthorityType.mjs +++ /dev/null @@ -1,18 +0,0 @@ -/*! @azure/msal-common v14.16.1 2025-08-05 */ -'use strict'; -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * Authority types supported by MSAL. - */ -const AuthorityType = { - Default: 0, - Adfs: 1, - Dsts: 2, - Ciam: 3, -}; - -export { AuthorityType }; -//# sourceMappingURL=AuthorityType.mjs.map diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/AuthorityType.mjs.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/AuthorityType.mjs.map deleted file mode 100644 index 9928e0c..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/AuthorityType.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AuthorityType.mjs","sources":["../../src/authority/AuthorityType.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAAA;;;AAGG;AAEH;;AAEG;AACU,MAAA,aAAa,GAAG;AACzB,IAAA,OAAO,EAAE,CAAC;AACV,IAAA,IAAI,EAAE,CAAC;AACP,IAAA,IAAI,EAAE,CAAC;AACP,IAAA,IAAI,EAAE,CAAC;;;;;"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/AzureRegion.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/AzureRegion.d.ts deleted file mode 100644 index 91d1032..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/AzureRegion.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export type AzureRegion = string; -//# sourceMappingURL=AzureRegion.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/AzureRegion.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/AzureRegion.d.ts.map deleted file mode 100644 index 02b58dc..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/AzureRegion.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AzureRegion.d.ts","sourceRoot":"","sources":["../../src/authority/AzureRegion.ts"],"names":[],"mappings":"AAMA,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/AzureRegionConfiguration.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/AzureRegionConfiguration.d.ts deleted file mode 100644 index 2aa1cd1..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/AzureRegionConfiguration.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { AzureRegion } from "./AzureRegion.js"; -export type AzureRegionConfiguration = { - azureRegion?: AzureRegion; - environmentRegion: string | undefined; -}; -//# sourceMappingURL=AzureRegionConfiguration.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/AzureRegionConfiguration.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/AzureRegionConfiguration.d.ts.map deleted file mode 100644 index 1cb612b..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/AzureRegionConfiguration.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AzureRegionConfiguration.d.ts","sourceRoot":"","sources":["../../src/authority/AzureRegionConfiguration.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAO/C,MAAM,MAAM,wBAAwB,GAAG;IACnC,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,iBAAiB,EAAE,MAAM,GAAG,SAAS,CAAC;CACzC,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/CloudDiscoveryMetadata.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/CloudDiscoveryMetadata.d.ts deleted file mode 100644 index 40a752e..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/CloudDiscoveryMetadata.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -export type CloudDiscoveryMetadata = { - preferred_network: string; - preferred_cache: string; - aliases: Array; -}; -//# sourceMappingURL=CloudDiscoveryMetadata.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/CloudDiscoveryMetadata.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/CloudDiscoveryMetadata.d.ts.map deleted file mode 100644 index 053f3df..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/CloudDiscoveryMetadata.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"CloudDiscoveryMetadata.d.ts","sourceRoot":"","sources":["../../src/authority/CloudDiscoveryMetadata.ts"],"names":[],"mappings":"AAKA,MAAM,MAAM,sBAAsB,GAAG;IACjC,iBAAiB,EAAE,MAAM,CAAC;IAC1B,eAAe,EAAE,MAAM,CAAC;IACxB,OAAO,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;CAC1B,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/CloudInstanceDiscoveryErrorResponse.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/CloudInstanceDiscoveryErrorResponse.d.ts deleted file mode 100644 index 1bdc4a5..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/CloudInstanceDiscoveryErrorResponse.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * The OpenID Configuration Endpoint Response type. Used by the authority class to get relevant OAuth endpoints. - */ -export type CloudInstanceDiscoveryErrorResponse = { - error: String; - error_description: String; - error_codes?: Array; - timestamp?: String; - trace_id?: String; - correlation_id?: String; - error_uri?: String; -}; -export declare function isCloudInstanceDiscoveryErrorResponse(response: object): boolean; -//# sourceMappingURL=CloudInstanceDiscoveryErrorResponse.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/CloudInstanceDiscoveryErrorResponse.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/CloudInstanceDiscoveryErrorResponse.d.ts.map deleted file mode 100644 index ac6e905..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/CloudInstanceDiscoveryErrorResponse.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"CloudInstanceDiscoveryErrorResponse.d.ts","sourceRoot":"","sources":["../../src/authority/CloudInstanceDiscoveryErrorResponse.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,MAAM,MAAM,mCAAmC,GAAG;IAC9C,KAAK,EAAE,MAAM,CAAC;IACd,iBAAiB,EAAE,MAAM,CAAC;IAC1B,WAAW,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,wBAAgB,qCAAqC,CACjD,QAAQ,EAAE,MAAM,GACjB,OAAO,CAKT"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/CloudInstanceDiscoveryErrorResponse.mjs b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/CloudInstanceDiscoveryErrorResponse.mjs deleted file mode 100644 index 5700d8f..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/CloudInstanceDiscoveryErrorResponse.mjs +++ /dev/null @@ -1,13 +0,0 @@ -/*! @azure/msal-common v14.16.1 2025-08-05 */ -'use strict'; -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -function isCloudInstanceDiscoveryErrorResponse(response) { - return (response.hasOwnProperty("error") && - response.hasOwnProperty("error_description")); -} - -export { isCloudInstanceDiscoveryErrorResponse }; -//# sourceMappingURL=CloudInstanceDiscoveryErrorResponse.mjs.map diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/CloudInstanceDiscoveryErrorResponse.mjs.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/CloudInstanceDiscoveryErrorResponse.mjs.map deleted file mode 100644 index 93e2e5b..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/CloudInstanceDiscoveryErrorResponse.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"CloudInstanceDiscoveryErrorResponse.mjs","sources":["../../src/authority/CloudInstanceDiscoveryErrorResponse.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAAA;;;AAGG;AAeG,SAAU,qCAAqC,CACjD,QAAgB,EAAA;AAEhB,IAAA,QACI,QAAQ,CAAC,cAAc,CAAC,OAAO,CAAC;AAChC,QAAA,QAAQ,CAAC,cAAc,CAAC,mBAAmB,CAAC,EAC9C;AACN;;;;"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/CloudInstanceDiscoveryResponse.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/CloudInstanceDiscoveryResponse.d.ts deleted file mode 100644 index b89b93e..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/CloudInstanceDiscoveryResponse.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { CloudDiscoveryMetadata } from "./CloudDiscoveryMetadata.js"; -/** - * The OpenID Configuration Endpoint Response type. Used by the authority class to get relevant OAuth endpoints. - */ -export type CloudInstanceDiscoveryResponse = { - tenant_discovery_endpoint: string; - metadata: Array; -}; -export declare function isCloudInstanceDiscoveryResponse(response: object): boolean; -//# sourceMappingURL=CloudInstanceDiscoveryResponse.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/CloudInstanceDiscoveryResponse.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/CloudInstanceDiscoveryResponse.d.ts.map deleted file mode 100644 index 138b08c..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/CloudInstanceDiscoveryResponse.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"CloudInstanceDiscoveryResponse.d.ts","sourceRoot":"","sources":["../../src/authority/CloudInstanceDiscoveryResponse.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAErE;;GAEG;AACH,MAAM,MAAM,8BAA8B,GAAG;IACzC,yBAAyB,EAAE,MAAM,CAAC;IAClC,QAAQ,EAAE,KAAK,CAAC,sBAAsB,CAAC,CAAC;CAC3C,CAAC;AAEF,wBAAgB,gCAAgC,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAK1E"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/CloudInstanceDiscoveryResponse.mjs b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/CloudInstanceDiscoveryResponse.mjs deleted file mode 100644 index 5d8ea31..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/CloudInstanceDiscoveryResponse.mjs +++ /dev/null @@ -1,13 +0,0 @@ -/*! @azure/msal-common v14.16.1 2025-08-05 */ -'use strict'; -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -function isCloudInstanceDiscoveryResponse(response) { - return (response.hasOwnProperty("tenant_discovery_endpoint") && - response.hasOwnProperty("metadata")); -} - -export { isCloudInstanceDiscoveryResponse }; -//# sourceMappingURL=CloudInstanceDiscoveryResponse.mjs.map diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/CloudInstanceDiscoveryResponse.mjs.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/CloudInstanceDiscoveryResponse.mjs.map deleted file mode 100644 index 9a4dc74..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/CloudInstanceDiscoveryResponse.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"CloudInstanceDiscoveryResponse.mjs","sources":["../../src/authority/CloudInstanceDiscoveryResponse.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAAA;;;AAGG;AAYG,SAAU,gCAAgC,CAAC,QAAgB,EAAA;AAC7D,IAAA,QACI,QAAQ,CAAC,cAAc,CAAC,2BAA2B,CAAC;AACpD,QAAA,QAAQ,CAAC,cAAc,CAAC,UAAU,CAAC,EACrC;AACN;;;;"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/ImdsOptions.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/ImdsOptions.d.ts deleted file mode 100644 index 96c42ef..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/ImdsOptions.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -export type ImdsOptions = { - headers?: { - Metadata: string; - }; -}; -//# sourceMappingURL=ImdsOptions.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/ImdsOptions.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/ImdsOptions.d.ts.map deleted file mode 100644 index 2551068..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/ImdsOptions.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ImdsOptions.d.ts","sourceRoot":"","sources":["../../src/authority/ImdsOptions.ts"],"names":[],"mappings":"AAKA,MAAM,MAAM,WAAW,GAAG;IACtB,OAAO,CAAC,EAAE;QACN,QAAQ,EAAE,MAAM,CAAC;KACpB,CAAC;CACL,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/OIDCOptions.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/OIDCOptions.d.ts deleted file mode 100644 index 60f8110..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/OIDCOptions.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { ServerResponseType } from "../utils/Constants.js"; -/** - * Options for the OIDC protocol mode. - */ -export type OIDCOptions = { - serverResponseType?: ServerResponseType; - defaultScopes?: Array; -}; -//# sourceMappingURL=OIDCOptions.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/OIDCOptions.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/OIDCOptions.d.ts.map deleted file mode 100644 index d973bc6..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/OIDCOptions.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"OIDCOptions.d.ts","sourceRoot":"","sources":["../../src/authority/OIDCOptions.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAE3D;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG;IACtB,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;IACxC,aAAa,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;CACjC,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/OpenIdConfigResponse.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/OpenIdConfigResponse.d.ts deleted file mode 100644 index dbb3f33..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/OpenIdConfigResponse.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -/** - * Tenant Discovery Response which contains the relevant OAuth endpoints and data needed for authentication and authorization. - */ -export type OpenIdConfigResponse = { - authorization_endpoint: string; - token_endpoint: string; - end_session_endpoint?: string; - issuer: string; - jwks_uri: string; -}; -export declare function isOpenIdConfigResponse(response: object): boolean; -//# sourceMappingURL=OpenIdConfigResponse.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/OpenIdConfigResponse.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/OpenIdConfigResponse.d.ts.map deleted file mode 100644 index 79fa72d..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/OpenIdConfigResponse.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"OpenIdConfigResponse.d.ts","sourceRoot":"","sources":["../../src/authority/OpenIdConfigResponse.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG;IAC/B,sBAAsB,EAAE,MAAM,CAAC;IAC/B,cAAc,EAAE,MAAM,CAAC;IACvB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAOhE"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/OpenIdConfigResponse.mjs b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/OpenIdConfigResponse.mjs deleted file mode 100644 index a64ab4f..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/OpenIdConfigResponse.mjs +++ /dev/null @@ -1,15 +0,0 @@ -/*! @azure/msal-common v14.16.1 2025-08-05 */ -'use strict'; -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -function isOpenIdConfigResponse(response) { - return (response.hasOwnProperty("authorization_endpoint") && - response.hasOwnProperty("token_endpoint") && - response.hasOwnProperty("issuer") && - response.hasOwnProperty("jwks_uri")); -} - -export { isOpenIdConfigResponse }; -//# sourceMappingURL=OpenIdConfigResponse.mjs.map diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/OpenIdConfigResponse.mjs.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/OpenIdConfigResponse.mjs.map deleted file mode 100644 index 05273e1..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/OpenIdConfigResponse.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"OpenIdConfigResponse.mjs","sources":["../../src/authority/OpenIdConfigResponse.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAAA;;;AAGG;AAaG,SAAU,sBAAsB,CAAC,QAAgB,EAAA;AACnD,IAAA,QACI,QAAQ,CAAC,cAAc,CAAC,wBAAwB,CAAC;AACjD,QAAA,QAAQ,CAAC,cAAc,CAAC,gBAAgB,CAAC;AACzC,QAAA,QAAQ,CAAC,cAAc,CAAC,QAAQ,CAAC;AACjC,QAAA,QAAQ,CAAC,cAAc,CAAC,UAAU,CAAC,EACrC;AACN;;;;"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/ProtocolMode.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/ProtocolMode.d.ts deleted file mode 100644 index 7b63cec..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/ProtocolMode.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -/** - * Protocol modes supported by MSAL. - */ -export declare const ProtocolMode: { - readonly AAD: "AAD"; - readonly OIDC: "OIDC"; -}; -export type ProtocolMode = (typeof ProtocolMode)[keyof typeof ProtocolMode]; -//# sourceMappingURL=ProtocolMode.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/ProtocolMode.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/ProtocolMode.d.ts.map deleted file mode 100644 index 5debc3a..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/ProtocolMode.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ProtocolMode.d.ts","sourceRoot":"","sources":["../../src/authority/ProtocolMode.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,eAAO,MAAM,YAAY;;;CAGf,CAAC;AACX,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,OAAO,YAAY,CAAC,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/ProtocolMode.mjs b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/ProtocolMode.mjs deleted file mode 100644 index 927f152..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/ProtocolMode.mjs +++ /dev/null @@ -1,16 +0,0 @@ -/*! @azure/msal-common v14.16.1 2025-08-05 */ -'use strict'; -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * Protocol modes supported by MSAL. - */ -const ProtocolMode = { - AAD: "AAD", - OIDC: "OIDC", -}; - -export { ProtocolMode }; -//# sourceMappingURL=ProtocolMode.mjs.map diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/ProtocolMode.mjs.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/ProtocolMode.mjs.map deleted file mode 100644 index 4af19d2..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/ProtocolMode.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ProtocolMode.mjs","sources":["../../src/authority/ProtocolMode.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAAA;;;AAGG;AAEH;;AAEG;AACU,MAAA,YAAY,GAAG;AACxB,IAAA,GAAG,EAAE,KAAK;AACV,IAAA,IAAI,EAAE,MAAM;;;;;"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/RegionDiscovery.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/RegionDiscovery.d.ts deleted file mode 100644 index 6c78184..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/RegionDiscovery.d.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { INetworkModule } from "../network/INetworkModule.js"; -import { RegionDiscoveryMetadata } from "./RegionDiscoveryMetadata.js"; -import { ImdsOptions } from "./ImdsOptions.js"; -import { IPerformanceClient } from "../telemetry/performance/IPerformanceClient.js"; -import { Logger } from "../logger/Logger.js"; -export declare class RegionDiscovery { - protected networkInterface: INetworkModule; - private logger; - protected performanceClient: IPerformanceClient | undefined; - protected correlationId: string | undefined; - protected static IMDS_OPTIONS: ImdsOptions; - constructor(networkInterface: INetworkModule, logger: Logger, performanceClient?: IPerformanceClient, correlationId?: string); - /** - * Detect the region from the application's environment. - * - * @returns Promise - */ - detectRegion(environmentRegion: string | undefined, regionDiscoveryMetadata: RegionDiscoveryMetadata): Promise; - /** - * Make the call to the IMDS endpoint - * - * @param imdsEndpointUrl - * @returns Promise> - */ - private getRegionFromIMDS; - /** - * Get the most recent version of the IMDS endpoint available - * - * @returns Promise - */ - private getCurrentVersion; -} -//# sourceMappingURL=RegionDiscovery.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/RegionDiscovery.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/RegionDiscovery.d.ts.map deleted file mode 100644 index 9741636..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/RegionDiscovery.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"RegionDiscovery.d.ts","sourceRoot":"","sources":["../../src/authority/RegionDiscovery.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAQ9D,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,gDAAgD,CAAC;AAGpF,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAE7C,qBAAa,eAAe;IAExB,SAAS,CAAC,gBAAgB,EAAE,cAAc,CAAC;IAE3C,OAAO,CAAC,MAAM,CAAS;IAEvB,SAAS,CAAC,iBAAiB,EAAE,kBAAkB,GAAG,SAAS,CAAC;IAE5D,SAAS,CAAC,aAAa,EAAE,MAAM,GAAG,SAAS,CAAC;IAE5C,SAAS,CAAC,MAAM,CAAC,YAAY,EAAE,WAAW,CAIxC;gBAGE,gBAAgB,EAAE,cAAc,EAChC,MAAM,EAAE,MAAM,EACd,iBAAiB,CAAC,EAAE,kBAAkB,EACtC,aAAa,CAAC,EAAE,MAAM;IAQ1B;;;;OAIG;IACU,YAAY,CACrB,iBAAiB,EAAE,MAAM,GAAG,SAAS,EACrC,uBAAuB,EAAE,uBAAuB,GACjD,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAoFzB;;;;;OAKG;YACW,iBAAiB;IAe/B;;;;OAIG;YACW,iBAAiB;CA6BlC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/RegionDiscovery.mjs b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/RegionDiscovery.mjs deleted file mode 100644 index e085d27..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/RegionDiscovery.mjs +++ /dev/null @@ -1,115 +0,0 @@ -/*! @azure/msal-common v14.16.1 2025-08-05 */ -'use strict'; -import { Constants, ResponseCodes, RegionDiscoverySources } from '../utils/Constants.mjs'; -import { PerformanceEvents } from '../telemetry/performance/PerformanceEvent.mjs'; -import { invokeAsync } from '../utils/FunctionWrappers.mjs'; - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -class RegionDiscovery { - constructor(networkInterface, logger, performanceClient, correlationId) { - this.networkInterface = networkInterface; - this.logger = logger; - this.performanceClient = performanceClient; - this.correlationId = correlationId; - } - /** - * Detect the region from the application's environment. - * - * @returns Promise - */ - async detectRegion(environmentRegion, regionDiscoveryMetadata) { - this.performanceClient?.addQueueMeasurement(PerformanceEvents.RegionDiscoveryDetectRegion, this.correlationId); - // Initialize auto detected region with the region from the envrionment - let autodetectedRegionName = environmentRegion; - // Check if a region was detected from the environment, if not, attempt to get the region from IMDS - if (!autodetectedRegionName) { - const options = RegionDiscovery.IMDS_OPTIONS; - try { - const localIMDSVersionResponse = await invokeAsync(this.getRegionFromIMDS.bind(this), PerformanceEvents.RegionDiscoveryGetRegionFromIMDS, this.logger, this.performanceClient, this.correlationId)(Constants.IMDS_VERSION, options); - if (localIMDSVersionResponse.status === - ResponseCodes.httpSuccess) { - autodetectedRegionName = localIMDSVersionResponse.body; - regionDiscoveryMetadata.region_source = - RegionDiscoverySources.IMDS; - } - // If the response using the local IMDS version failed, try to fetch the current version of IMDS and retry. - if (localIMDSVersionResponse.status === - ResponseCodes.httpBadRequest) { - const currentIMDSVersion = await invokeAsync(this.getCurrentVersion.bind(this), PerformanceEvents.RegionDiscoveryGetCurrentVersion, this.logger, this.performanceClient, this.correlationId)(options); - if (!currentIMDSVersion) { - regionDiscoveryMetadata.region_source = - RegionDiscoverySources.FAILED_AUTO_DETECTION; - return null; - } - const currentIMDSVersionResponse = await invokeAsync(this.getRegionFromIMDS.bind(this), PerformanceEvents.RegionDiscoveryGetRegionFromIMDS, this.logger, this.performanceClient, this.correlationId)(currentIMDSVersion, options); - if (currentIMDSVersionResponse.status === - ResponseCodes.httpSuccess) { - autodetectedRegionName = - currentIMDSVersionResponse.body; - regionDiscoveryMetadata.region_source = - RegionDiscoverySources.IMDS; - } - } - } - catch (e) { - regionDiscoveryMetadata.region_source = - RegionDiscoverySources.FAILED_AUTO_DETECTION; - return null; - } - } - else { - regionDiscoveryMetadata.region_source = - RegionDiscoverySources.ENVIRONMENT_VARIABLE; - } - // If no region was auto detected from the environment or from the IMDS endpoint, mark the attempt as a FAILED_AUTO_DETECTION - if (!autodetectedRegionName) { - regionDiscoveryMetadata.region_source = - RegionDiscoverySources.FAILED_AUTO_DETECTION; - } - return autodetectedRegionName || null; - } - /** - * Make the call to the IMDS endpoint - * - * @param imdsEndpointUrl - * @returns Promise> - */ - async getRegionFromIMDS(version, options) { - this.performanceClient?.addQueueMeasurement(PerformanceEvents.RegionDiscoveryGetRegionFromIMDS, this.correlationId); - return this.networkInterface.sendGetRequestAsync(`${Constants.IMDS_ENDPOINT}?api-version=${version}&format=text`, options, Constants.IMDS_TIMEOUT); - } - /** - * Get the most recent version of the IMDS endpoint available - * - * @returns Promise - */ - async getCurrentVersion(options) { - this.performanceClient?.addQueueMeasurement(PerformanceEvents.RegionDiscoveryGetCurrentVersion, this.correlationId); - try { - const response = await this.networkInterface.sendGetRequestAsync(`${Constants.IMDS_ENDPOINT}?format=json`, options); - // When IMDS endpoint is called without the api version query param, bad request response comes back with latest version. - if (response.status === ResponseCodes.httpBadRequest && - response.body && - response.body["newest-versions"] && - response.body["newest-versions"].length > 0) { - return response.body["newest-versions"][0]; - } - return null; - } - catch (e) { - return null; - } - } -} -// Options for the IMDS endpoint request -RegionDiscovery.IMDS_OPTIONS = { - headers: { - Metadata: "true", - }, -}; - -export { RegionDiscovery }; -//# sourceMappingURL=RegionDiscovery.mjs.map diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/RegionDiscovery.mjs.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/RegionDiscovery.mjs.map deleted file mode 100644 index 1e35181..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/RegionDiscovery.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"RegionDiscovery.mjs","sources":["../../src/authority/RegionDiscovery.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;AAAA;;;AAGG;MAiBU,eAAe,CAAA;AAgBxB,IAAA,WAAA,CACI,gBAAgC,EAChC,MAAc,EACd,iBAAsC,EACtC,aAAsB,EAAA;AAEtB,QAAA,IAAI,CAAC,gBAAgB,GAAG,gBAAgB,CAAC;AACzC,QAAA,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;AACrB,QAAA,IAAI,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;AAC3C,QAAA,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;KACtC;AAED;;;;AAIG;AACI,IAAA,MAAM,YAAY,CACrB,iBAAqC,EACrC,uBAAgD,EAAA;AAEhD,QAAA,IAAI,CAAC,iBAAiB,EAAE,mBAAmB,CACvC,iBAAiB,CAAC,2BAA2B,EAC7C,IAAI,CAAC,aAAa,CACrB,CAAC;;QAGF,IAAI,sBAAsB,GAAG,iBAAiB,CAAC;;QAG/C,IAAI,CAAC,sBAAsB,EAAE;AACzB,YAAA,MAAM,OAAO,GAAG,eAAe,CAAC,YAAY,CAAC;YAE7C,IAAI;AACA,gBAAA,MAAM,wBAAwB,GAAG,MAAM,WAAW,CAC9C,IA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AAQ,CAAC,IAAI;AACb,gBAAA,QAAQ,CAAC,IAAI,CAAC,iBAAiB,CAAC;gBAChC,QAAQ,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC,MAAM,GAAG,CAAC,EAC7C;gBACE,OAAO,QAAQ,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAAC;AAC9C,aAAA;AAED,YAAA,OAAO,IAAI,CAAC;AACf,SAAA;AAAC,QAAA,OAAO,CAAC,EAAE;AACR,YAAA,OAAO,IAAI,CAAC;AACf,SAAA;KACJ;;AArKD;AACiB,eAAA,CAAA,YAAY,GAAgB;AACzC,IAAA,OAAO,EAAE;AACL,QAAA,QAAQ,EAAE,MAAM;AACnB,KAAA;CACJ;;;;"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/RegionDiscoveryMetadata.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/RegionDiscoveryMetadata.d.ts deleted file mode 100644 index 359cf92..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/RegionDiscoveryMetadata.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { RegionDiscoveryOutcomes, RegionDiscoverySources } from "../utils/Constants.js"; -export type RegionDiscoveryMetadata = { - region_used?: string; - region_source?: RegionDiscoverySources; - region_outcome?: RegionDiscoveryOutcomes; -}; -//# sourceMappingURL=RegionDiscoveryMetadata.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/RegionDiscoveryMetadata.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/RegionDiscoveryMetadata.d.ts.map deleted file mode 100644 index 02c9954..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/authority/RegionDiscoveryMetadata.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"RegionDiscoveryMetadata.d.ts","sourceRoot":"","sources":["../../src/authority/RegionDiscoveryMetadata.ts"],"names":[],"mappings":"AAKA,OAAO,EACH,uBAAuB,EACvB,sBAAsB,EACzB,MAAM,uBAAuB,CAAC;AAE/B,MAAM,MAAM,uBAAuB,GAAG;IAClC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,sBAAsB,CAAC;IACvC,cAAc,CAAC,EAAE,uBAAuB,CAAC;CAC5C,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/broker/nativeBroker/INativeBrokerPlugin.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/broker/nativeBroker/INativeBrokerPlugin.d.ts deleted file mode 100644 index 58b4761..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/broker/nativeBroker/INativeBrokerPlugin.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -/// -/// -import { AccountInfo } from "../../account/AccountInfo.js"; -import { LoggerOptions } from "../../config/ClientConfiguration.js"; -import { NativeRequest } from "../../request/NativeRequest.js"; -import { NativeSignOutRequest } from "../../request/NativeSignOutRequest.js"; -import { AuthenticationResult } from "../../response/AuthenticationResult.js"; -export interface INativeBrokerPlugin { - isBrokerAvailable: boolean; - setLogger(loggerOptions: LoggerOptions): void; - getAccountById(accountId: string, correlationId: string): Promise; - getAllAccounts(clientId: string, correlationId: string): Promise; - acquireTokenSilent(request: NativeRequest): Promise; - acquireTokenInteractive(request: NativeRequest, windowHandle?: Buffer): Promise; - signOut(request: NativeSignOutRequest): Promise; -} -//# sourceMappingURL=INativeBrokerPlugin.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/broker/nativeBroker/INativeBrokerPlugin.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/broker/nativeBroker/INativeBrokerPlugin.d.ts.map deleted file mode 100644 index c436ffa..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/broker/nativeBroker/INativeBrokerPlugin.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"INativeBrokerPlugin.d.ts","sourceRoot":"","sources":["../../../src/broker/nativeBroker/INativeBrokerPlugin.ts"],"names":[],"mappings":";;AAKA,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAC/D,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAC7E,OAAO,EAAE,oBAAoB,EAAE,MAAM,wCAAwC,CAAC;AAE9E,MAAM,WAAW,mBAAmB;IAChC,iBAAiB,EAAE,OAAO,CAAC;IAC3B,SAAS,CAAC,aAAa,EAAE,aAAa,GAAG,IAAI,CAAC;IAC9C,cAAc,CACV,SAAS,EAAE,MAAM,EACjB,aAAa,EAAE,MAAM,GACtB,OAAO,CAAC,WAAW,CAAC,CAAC;IACxB,cAAc,CACV,QAAQ,EAAE,MAAM,EAChB,aAAa,EAAE,MAAM,GACtB,OAAO,CAAC,WAAW,EAAE,CAAC,CAAC;IAC1B,kBAAkB,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC;IAC1E,uBAAuB,CACnB,OAAO,EAAE,aAAa,EACtB,YAAY,CAAC,EAAE,MAAM,GACtB,OAAO,CAAC,oBAAoB,CAAC,CAAC;IACjC,OAAO,CAAC,OAAO,EAAE,oBAAoB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACzD"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/cache/CacheManager.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/cache/CacheManager.d.ts deleted file mode 100644 index 329f33a..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/cache/CacheManager.d.ts +++ /dev/null @@ -1,493 +0,0 @@ -import { AccountFilter, CredentialFilter, ValidCredentialType, AppMetadataFilter, AppMetadataCache, TokenKeys } from "./utils/CacheTypes.js"; -import { CacheRecord } from "./entities/CacheRecord.js"; -import { AccountEntity } from "./entities/AccountEntity.js"; -import { AccessTokenEntity } from "./entities/AccessTokenEntity.js"; -import { IdTokenEntity } from "./entities/IdTokenEntity.js"; -import { RefreshTokenEntity } from "./entities/RefreshTokenEntity.js"; -import { ICacheManager } from "./interface/ICacheManager.js"; -import { AccountInfo } from "../account/AccountInfo.js"; -import { AppMetadataEntity } from "./entities/AppMetadataEntity.js"; -import { ServerTelemetryEntity } from "./entities/ServerTelemetryEntity.js"; -import { ThrottlingEntity } from "./entities/ThrottlingEntity.js"; -import { ICrypto } from "../crypto/ICrypto.js"; -import { AuthorityMetadataEntity } from "./entities/AuthorityMetadataEntity.js"; -import { BaseAuthRequest } from "../request/BaseAuthRequest.js"; -import { Logger } from "../logger/Logger.js"; -import { StoreInCache } from "../request/StoreInCache.js"; -import { StaticAuthorityOptions } from "../authority/AuthorityOptions.js"; -import { IPerformanceClient } from "../telemetry/performance/IPerformanceClient.js"; -/** - * Interface class which implement cache storage functions used by MSAL to perform validity checks, and store tokens. - * @internal - */ -export declare abstract class CacheManager implements ICacheManager { - protected clientId: string; - protected cryptoImpl: ICrypto; - private commonLogger; - private staticAuthorityOptions?; - constructor(clientId: string, cryptoImpl: ICrypto, logger: Logger, staticAuthorityOptions?: StaticAuthorityOptions); - /** - * fetch the account entity from the platform cache - * @param accountKey - */ - abstract getAccount(accountKey: string, correlationId: string, logger?: Logger): AccountEntity | null; - /** - * Returns deserialized account if found in the cache, otherwiser returns null - */ - abstract getCachedAccountEntity(accountKey: string, correlationId: string): AccountEntity | null; - /** - * set account entity in the platform cache - * @param account - */ - abstract setAccount(account: AccountEntity, correlationId: string): void; - /** - * remove account entity from the platform cache if it's outdated - */ - abstract removeOutdatedAccount(accountKey: string, correlationId: string): void; - /** - * fetch the idToken entity from the platform cache - * @param idTokenKey - */ - abstract getIdTokenCredential(idTokenKey: string, correlationId: string): IdTokenEntity | null; - /** - * set idToken entity to the platform cache - * @param idToken - */ - abstract setIdTokenCredential(idToken: IdTokenEntity, correlationId: string): void; - /** - * fetch the idToken entity from the platform cache - * @param accessTokenKey - */ - abstract getAccessTokenCredential(accessTokenKey: string, correlationId: string): AccessTokenEntity | null; - /** - * set idToken entity to the platform cache - * @param accessToken - */ - abstract setAccessTokenCredential(accessToken: AccessTokenEntity, correlationId: string): void; - /** - * fetch the idToken entity from the platform cache - * @param refreshTokenKey - */ - abstract getRefreshTokenCredential(refreshTokenKey: string, correlationId: string): RefreshTokenEntity | null; - /** - * set idToken entity to the platform cache - * @param refreshToken - */ - abstract setRefreshTokenCredential(refreshToken: RefreshTokenEntity, correlationId: string): void; - /** - * fetch appMetadata entity from the platform cache - * @param appMetadataKey - */ - abstract getAppMetadata(appMetadataKey: string): AppMetadataEntity | null; - /** - * set appMetadata entity to the platform cache - * @param appMetadata - */ - abstract setAppMetadata(appMetadata: AppMetadataEntity, correlationId: string): void; - /** - * fetch server telemetry entity from the platform cache - * @param serverTelemetryKey - */ - abstract getServerTelemetry(serverTelemetryKey: string): ServerTelemetryEntity | null; - /** - * set server telemetry entity to the platform cache - * @param serverTelemetryKey - * @param serverTelemetry - */ - abstract setServerTelemetry(serverTelemetryKey: string, serverTelemetry: ServerTelemetryEntity, correlationId: string): void; - /** - * fetch cloud discovery metadata entity from the platform cache - * @param key - */ - abstract getAuthorityMetadata(key: string): AuthorityMetadataEntity | null; - /** - * - */ - abstract getAuthorityMetadataKeys(): Array; - /** - * set cloud discovery metadata entity to the platform cache - * @param key - * @param value - */ - abstract setAuthorityMetadata(key: string, value: AuthorityMetadataEntity): void; - /** - * fetch throttling entity from the platform cache - * @param throttlingCacheKey - */ - abstract getThrottlingCache(throttlingCacheKey: string): ThrottlingEntity | null; - /** - * set throttling entity to the platform cache - * @param throttlingCacheKey - * @param throttlingCache - */ - abstract setThrottlingCache(throttlingCacheKey: string, throttlingCache: ThrottlingEntity, correlationId: string): void; - /** - * Function to remove an item from cache given its key. - * @param key - */ - abstract removeItem(key: string, correlationId: string): void; - /** - * Function which retrieves all current keys from the cache. - */ - abstract getKeys(): string[]; - /** - * Function which retrieves all account keys from the cache - */ - abstract getAccountKeys(): string[]; - /** - * Function which retrieves all token keys from the cache - */ - abstract getTokenKeys(): TokenKeys; - /** - * Function which updates an outdated credential cache key - */ - abstract updateCredentialCacheKey(currentCacheKey: string, credential: ValidCredentialType, correlationId: string): string; - /** - * Returns all the accounts in the cache that match the optional filter. If no filter is provided, all accounts are returned. - * @param accountFilter - (Optional) filter to narrow down the accounts returned - * @returns Array of AccountInfo objects in cache - */ - getAllAccounts(correlationId: string, accountFilter?: AccountFilter): AccountInfo[]; - /** - * Gets first tenanted AccountInfo object found based on provided filters - */ - getAccountInfoFilteredBy(accountFilter: AccountFilter, correlationId: string): AccountInfo | null; - /** - * Returns a single matching - * @param accountFilter - * @returns - */ - getBaseAccountInfo(accountFilter: AccountFilter, correlationId: string): AccountInfo | null; - /** - * Matches filtered account entities with cached ID tokens that match the tenant profile-specific account filters - * and builds the account info objects from the matching ID token's claims - * @param cachedAccounts - * @param accountFilter - * @returns Array of AccountInfo objects that match account and tenant profile filters - */ - private buildTenantProfiles; - private getTenantedAccountInfoByFilter; - private getTenantProfilesFromAccountEntity; - private tenantProfileMatchesFilter; - private idTokenClaimsMatchTenantProfileFilter; - /** - * saves a cache record - * @param cacheRecord {CacheRecord} - * @param storeInCache {?StoreInCache} - * @param correlationId {?string} correlation id - */ - saveCacheRecord(cacheRecord: CacheRecord, correlationId: string, storeInCache?: StoreInCache): Promise; - /** - * saves access token credential - * @param credential - */ - private saveAccessToken; - /** - * Retrieve account entities matching all provided tenant-agnostic filters; if no filter is set, get all account entities in the cache - * Not checking for casing as keys are all generated in lower case, remember to convert to lower case if object properties are compared - * @param accountFilter - An object containing Account properties to filter by - */ - getAccountsFilteredBy(accountFilter: AccountFilter, correlationId: string): AccountEntity[]; - /** - * Returns true if the given key matches our account key schema. Also matches homeAccountId and/or tenantId if provided - * @param key - * @param homeAccountId - * @param tenantId - * @returns - */ - isAccountKey(key: string, homeAccountId?: string, tenantId?: string): boolean; - /** - * Returns true if the given key matches our credential key schema. - * @param key - */ - isCredentialKey(key: string): boolean; - /** - * Returns whether or not the given credential entity matches the filter - * @param entity - * @param filter - * @returns - */ - credentialMatchesFilter(entity: ValidCredentialType, filter: CredentialFilter): boolean; - /** - * retrieve appMetadata matching all provided filters; if no filter is set, get all appMetadata - * @param filter - */ - getAppMetadataFilteredBy(filter: AppMetadataFilter): AppMetadataCache; - /** - * retrieve authorityMetadata that contains a matching alias - * @param filter - */ - getAuthorityMetadataByAlias(host: string): AuthorityMetadataEntity | null; - /** - * Removes all accounts and related tokens from cache. - */ - removeAllAccounts(correlationId: string): Promise; - /** - * Removes the account and related tokens for a given account key - * @param account - */ - removeAccount(accountKey: string, correlationId: string): Promise; - /** - * Removes credentials associated with the provided account - * @param account - */ - removeAccountContext(account: AccountEntity, correlationId: string): Promise; - /** - * Migrates a single-tenant account and all it's associated alternate cross-tenant account objects in the - * cache into a condensed multi-tenant account object with tenant profiles. - * @param accountKey - * @param accountEntity - * @param logger - * @returns - */ - protected updateOutdatedCachedAccount(accountKey: string, accountEntity: AccountEntity | null, correlationId: string, logger?: Logger): AccountEntity | null; - /** - * returns a boolean if the given credential is removed - * @param credential - */ - removeAccessToken(key: string, correlationId: string): void; - /** - * Removes all app metadata objects from cache. - */ - removeAppMetadata(correlationId: string): boolean; - /** - * Retrieve AccountEntity from cache - * @param account - */ - readAccountFromCache(account: AccountInfo, correlationId: string): AccountEntity | null; - /** - * Retrieve IdTokenEntity from cache - * @param account {AccountInfo} - * @param tokenKeys {?TokenKeys} - * @param targetRealm {?string} - * @param performanceClient {?IPerformanceClient} - * @param correlationId {?string} - */ - getIdToken(account: AccountInfo, correlationId: string, tokenKeys?: TokenKeys, targetRealm?: string, performanceClient?: IPerformanceClient): IdTokenEntity | null; - /** - * Gets all idTokens matching the given filter - * @param filter - * @returns - */ - getIdTokensByFilter(filter: CredentialFilter, correlationId: string, tokenKeys?: TokenKeys): Map; - /** - * Validate the cache key against filter before retrieving and parsing cache value - * @param key - * @param filter - * @returns - */ - idTokenKeyMatchesFilter(inputKey: string, filter: CredentialFilter): boolean; - /** - * Removes idToken from the cache - * @param key - */ - removeIdToken(key: string, correlationId: string): void; - /** - * Removes refresh token from the cache - * @param key - */ - removeRefreshToken(key: string, correlationId: string): void; - /** - * Retrieve AccessTokenEntity from cache - * @param account {AccountInfo} - * @param request {BaseAuthRequest} - * @param tokenKeys {?TokenKeys} - * @param performanceClient {?IPerformanceClient} - * @param correlationId {?string} - */ - getAccessToken(account: AccountInfo, request: BaseAuthRequest, tokenKeys?: TokenKeys, targetRealm?: string, performanceClient?: IPerformanceClient): AccessTokenEntity | null; - /** - * Validate the cache key against filter before retrieving and parsing cache value - * @param key - * @param filter - * @param keyMustContainAllScopes - * @returns - */ - accessTokenKeyMatchesFilter(inputKey: string, filter: CredentialFilter, keyMustContainAllScopes: boolean): boolean; - /** - * Gets all access tokens matching the filter - * @param filter - * @returns - */ - getAccessTokensByFilter(filter: CredentialFilter, correlationId: string): AccessTokenEntity[]; - /** - * Helper to retrieve the appropriate refresh token from cache - * @param account {AccountInfo} - * @param familyRT {boolean} - * @param tokenKeys {?TokenKeys} - * @param performanceClient {?IPerformanceClient} - * @param correlationId {?string} - */ - getRefreshToken(account: AccountInfo, familyRT: boolean, correlationId: string, tokenKeys?: TokenKeys, performanceClient?: IPerformanceClient): RefreshTokenEntity | null; - /** - * Validate the cache key against filter before retrieving and parsing cache value - * @param key - * @param filter - */ - refreshTokenKeyMatchesFilter(inputKey: string, filter: CredentialFilter): boolean; - /** - * Retrieve AppMetadataEntity from cache - */ - readAppMetadataFromCache(environment: string): AppMetadataEntity | null; - /** - * Return the family_id value associated with FOCI - * @param environment - * @param clientId - */ - isAppMetadataFOCI(environment: string): boolean; - /** - * helper to match account ids - * @param value - * @param homeAccountId - */ - private matchHomeAccountId; - /** - * helper to match account ids - * @param entity - * @param localAccountId - * @returns - */ - private matchLocalAccountIdFromTokenClaims; - private matchLocalAccountIdFromTenantProfile; - /** - * helper to match names - * @param entity - * @param name - * @returns true if the downcased name properties are present and match in the filter and the entity - */ - private matchName; - /** - * helper to match usernames - * @param entity - * @param username - * @returns - */ - private matchUsername; - /** - * helper to match assertion - * @param value - * @param oboAssertion - */ - private matchUserAssertionHash; - /** - * helper to match environment - * @param value - * @param environment - */ - private matchEnvironment; - /** - * helper to match credential type - * @param entity - * @param credentialType - */ - private matchCredentialType; - /** - * helper to match client ids - * @param entity - * @param clientId - */ - private matchClientId; - /** - * helper to match family ids - * @param entity - * @param familyId - */ - private matchFamilyId; - /** - * helper to match realm - * @param entity - * @param realm - */ - private matchRealm; - /** - * helper to match nativeAccountId - * @param entity - * @param nativeAccountId - * @returns boolean indicating the match result - */ - private matchNativeAccountId; - /** - * helper to match loginHint which can be either: - * 1. login_hint ID token claim - * 2. username in cached account object - * 3. upn in ID token claims - * @param entity - * @param loginHint - * @returns - */ - private matchLoginHintFromTokenClaims; - /** - * Helper to match sid - * @param entity - * @param sid - * @returns true if the sid claim is present and matches the filter - */ - private matchSid; - private matchAuthorityType; - /** - * Returns true if the target scopes are a subset of the current entity's scopes, false otherwise. - * @param entity - * @param target - */ - private matchTarget; - /** - * Returns true if the credential's tokenType or Authentication Scheme matches the one in the request, false otherwise - * @param entity - * @param tokenType - */ - private matchTokenType; - /** - * Returns true if the credential's keyId matches the one in the request, false otherwise - * @param entity - * @param keyId - */ - private matchKeyId; - /** - * returns if a given cache entity is of the type appmetadata - * @param key - */ - private isAppMetadata; - /** - * returns if a given cache entity is of the type authoritymetadata - * @param key - */ - protected isAuthorityMetadata(key: string): boolean; - /** - * returns cache key used for cloud instance metadata - */ - generateAuthorityMetadataCacheKey(authority: string): string; - /** - * Helper to convert serialized data to object - * @param obj - * @param json - */ - static toObject(obj: T, json: object): T; -} -/** @internal */ -export declare class DefaultStorageClass extends CacheManager { - setAccount(): void; - getAccount(): AccountEntity; - getCachedAccountEntity(): AccountEntity | null; - setIdTokenCredential(): void; - getIdTokenCredential(): IdTokenEntity; - setAccessTokenCredential(): void; - getAccessTokenCredential(): AccessTokenEntity; - setRefreshTokenCredential(): void; - getRefreshTokenCredential(): RefreshTokenEntity; - setAppMetadata(): void; - getAppMetadata(): AppMetadataEntity; - setServerTelemetry(): void; - getServerTelemetry(): ServerTelemetryEntity; - setAuthorityMetadata(): void; - getAuthorityMetadata(): AuthorityMetadataEntity | null; - getAuthorityMetadataKeys(): Array; - setThrottlingCache(): void; - getThrottlingCache(): ThrottlingEntity; - removeItem(): boolean; - getKeys(): string[]; - getAccountKeys(): string[]; - getTokenKeys(): TokenKeys; - updateCredentialCacheKey(): string; - removeOutdatedAccount(): void; -} -//# sourceMappingURL=CacheManager.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/cache/CacheManager.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/cache/CacheManager.d.ts.map deleted file mode 100644 index 9889abe..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/cache/CacheManager.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"CacheManager.d.ts","sourceRoot":"","sources":["../../src/cache/CacheManager.ts"],"names":[],"mappings":"AAKA,OAAO,EACH,aAAa,EACb,gBAAgB,EAChB,mBAAmB,EACnB,iBAAiB,EACjB,gBAAgB,EAChB,SAAS,EAEZ,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAYxD,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AACtE,OAAO,EAAE,aAAa,EAAE,MAA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AAc;IAOtB;;;;OAIG;IACH,OAAO,CAAC,UAAU;IAIlB;;;OAGG;IACH,OAAO,CAAC,aAAa;IAIrB;;;OAGG;IACH,SAAS,CAAC,mBAAmB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO;IAInD;;OAEG;IACH,iCAAiC,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM;IAI5D;;;;OAIG;IACH,MAAM,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,GAAG,CAAC;CAM9C;AAED,gBAAgB;AAChB,qBAAa,mBAAoB,SAAQ,YAAY;IACjD,UAAU,IAAI,IAAI;IAGlB,UAAU,IAAI,aAAa;IAG3B,sBAAsB,IAAI,aAAa,GAAG,IAAI;IAG9C,oBAAoB,IAAI,IAAI;IAG5B,oBAAoB,IAAI,aAAa;IAGrC,wBAAwB,IAAI,IAAI;IAGhC,wBAAwB,IAAI,iBAAiB;IAG7C,yBAAyB,IAAI,IAAI;IAGjC,yBAAyB,IAAI,kBAAkB;IAG/C,cAAc,IAAI,IAAI;IAGtB,cAAc,IAAI,iBAAiB;IAGnC,kBAAkB,IAAI,IAAI;IAG1B,kBAAkB,IAAI,qBAAqB;IAG3C,oBAAoB,IAAI,IAAI;IAG5B,oBAAoB,IAAI,uBAAuB,GAAG,IAAI;IAGtD,wBAAwB,IAAI,KAAK,CAAC,MAAM,CAAC;IAGzC,kBAAkB,IAAI,IAAI;IAG1B,kBAAkB,IAAI,gBAAgB;IAGtC,UAAU,IAAI,OAAO;IAGrB,OAAO,IAAI,MAAM,EAAE;IAGnB,cAAc,IAAI,MAAM,EAAE;IAG1B,YAAY,IAAI,SAAS;IAGzB,wBAAwB,IAAI,MAAM;IAGlC,qBAAqB,IAAI,IAAI;CAGhC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/cache/CacheManager.mjs b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/cache/CacheManager.mjs deleted file mode 100644 index 62b598c..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/cache/CacheManager.mjs +++ /dev/null @@ -1,1249 +0,0 @@ -/*! @azure/msal-common v14.16.1 2025-08-05 */ -'use strict'; -import { Separators, CredentialType, AuthenticationScheme, THE_FAMILY_ID, APP_METADATA, AUTHORITY_METADATA_CONSTANTS } from '../utils/Constants.mjs'; -import { generateCredentialKey } from './utils/CacheHelpers.mjs'; -import { ScopeSet } from '../request/ScopeSet.mjs'; -import { AccountEntity } from './entities/AccountEntity.mjs'; -import { createClientAuthError } from '../error/ClientAuthError.mjs'; -import { updateAccountTenantProfileData, tenantIdMatchesHomeTenant } from '../account/AccountInfo.mjs'; -import { extractTokenClaims } from '../account/AuthToken.mjs'; -import { name, version } from '../packageMetadata.mjs'; -import { getAliasesFromStaticSources } from '../authority/AuthorityMetadata.mjs'; -import { createCacheError } from '../error/CacheError.mjs'; -import { AuthError } from '../error/AuthError.mjs'; -import { invalidCacheRecord, multipleMatchingAppMetadata, methodNotImplemented } from '../error/ClientAuthErrorCodes.mjs'; - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * Interface class which implement cache storage functions used by MSAL to perform validity checks, and store tokens. - * @internal - */ -class CacheManager { - constructor(clientId, cryptoImpl, logger, staticAuthorityOptions) { - this.clientId = clientId; - this.cryptoImpl = cryptoImpl; - this.commonLogger = logger.clone(name, version); - this.staticAuthorityOptions = staticAuthorityOptions; - } - /** - * Returns all the accounts in the cache that match the optional filter. If no filter is provided, all accounts are returned. - * @param accountFilter - (Optional) filter to narrow down the accounts returned - * @returns Array of AccountInfo objects in cache - */ - getAllAccounts(correlationId, accountFilter) { - return this.buildTenantProfiles(this.getAccountsFilteredBy(accountFilter || {}, correlationId), correlationId, accountFilter); - } - /** - * Gets first tenanted AccountInfo object found based on provided filters - */ - getAccountInfoFilteredBy(accountFilter, correlationId) { - const allAccounts = this.getAllAccounts(correlationId, accountFilter); - if (allAccounts.length > 1) { - // If one or more accounts are found, prioritize accounts that have an ID token - const sortedAccounts = allAccounts.sort((account) => { - return account.idTokenClaims ? -1 : 1; - }); - return sortedAccounts[0]; - } - else if (allAccounts.length === 1) { - // If only one account is found, return it regardless of whether a matching ID token was found - return allAccounts[0]; - } - else { - return null; - } - } - /** - * Returns a single matching - * @param accountFilter - * @returns - */ - getBaseAccountInfo(accountFilter, correlationId) { - const accountEntities = this.getAccountsFilteredBy(accountFilter, correlationId); - if (accountEntities.length > 0) { - return accountEntities[0].getAccountInfo(); - } - else { - return null; - } - } - /** - * Matches filtered account entities with cached ID tokens that match the tenant profile-specific account filters - * and builds the account info objects from the matching ID token's claims - * @param cachedAccounts - * @param accountFilter - * @returns Array of AccountInfo objects that match account and tenant profile filters - */ - buildTenantProfiles(cachedAccounts, correlationId, accountFilter) { - return cachedAccounts.flatMap((accountEntity) => { - return this.getTenantProfilesFromAccountEntity(accountEntity, correlationId, accountFilter?.tenantId, accountFilter); - }); - } - getTenantedAccountInfoByFilter(accountInfo, tokenKeys, tenantProfile, correlationId, tenantProfileFilter) { - let tenantedAccountInfo = null; - let idTokenClaims; - if (tenantProfileFilter) { - if (!this.tenantProfileMatchesFilter(tenantProfile, tenantProfileFilter)) { - return null; - } - } - const idToken = this.getIdToken(accountInfo, correlationId, tokenKeys, tenantProfile.tenantId); - if (idToken) { - idTokenClaims = extractTokenClaims(idToken.secret, this.cryptoImpl.base64Decode); - if (!this.idTokenClaimsMatchTenantProfileFilter(idTokenClaims, tenantProfileFilter)) { - // ID token sourced claims don't match so this tenant profile is not a match - return null; - } - } - // Expand tenant profile into account info based on matching tenant profile and if available matching ID token claims - tenantedAccountInfo = updateAccountTenantProfileData(accountInfo, tenantProfile, idTokenClaims, idToken?.secret); - return tenantedAccountInfo; - } - getTenantProfilesFromAccountEntity(accountEntity, correlationId, targetTenantId, tenantProfileFilter) { - const accountInfo = accountEntity.getAccountInfo(); - let searchTenantProfiles = accountInfo.tenantProfiles || new Map(); - const tokenKeys = this.getTokenKeys(); - // If a tenant ID was provided, only return the tenant profile for that tenant ID if it exists - if (targetTenantId) { - const tenantProfile = searchTenantProfiles.get(targetTenantId); - if (tenantProfile) { - // Reduce search field to just this tenant profile - searchTenantProfiles = new Map([ - [targetTenantId, tenantProfile], - ]); - } - else { - // No tenant profile for search tenant ID, return empty array - return []; - } - } - const matchingTenantProfiles = []; - searchTenantProfiles.forEach((tenantProfile) => { - const tenantedAccountInfo = this.getTenantedAccountInfoByFilter(accountInfo, tokenKeys, tenantProfile, correlationId, tenantProfileFilter); - if (tenantedAccountInfo) { - matchingTenantProfiles.push(tenantedAccountInfo); - } - }); - return matchingTenantProfiles; - } - tenantProfileMatchesFilter(tenantProfile, tenantProfileFilter) { - if (!!tenantProfileFilter.localAccountId && - !this.matchLocalAccountIdFromTenantProfile(tenantProfile, tenantProfileFilter.localAccountId)) { - return false; - } - if (!!tenantProfileFilter.name && - !(tenantProfile.name === tenantProfileFilter.name)) { - return false; - } - if (tenantProfileFilter.isHomeTenant !== undefined && - !(tenantProfile.isHomeTenant === tenantProfileFilter.isHomeTenant)) { - return false; - } - return true; - } - idTokenClaimsMatchTenantProfileFilter(idTokenClaims, tenantProfileFilter) { - // Tenant Profile filtering - if (tenantProfileFilter) { - if (!!tenantProfileFilter.localAccountId && - !this.matchLocalAccountIdFromTokenClaims(idTokenClaims, tenantProfileFilter.localAccountId)) { - return false; - } - if (!!tenantProfileFilter.loginHint && - !this.matchLoginHintFromTokenClaims(idTokenClaims, tenantProfileFilter.loginHint)) { - return false; - } - if (!!tenantProfileFilter.username && - !this.matchUsername(idTokenClaims.preferred_username, tenantProfileFilter.username)) { - return false; - } - if (!!tenantProfileFilter.name && - !this.matchName(idTokenClaims, tenantProfileFilter.name)) { - return false; - } - if (!!tenantProfileFilter.sid && - !this.matchSid(idTokenClaims, tenantProfileFilter.sid)) { - return false; - } - } - return true; - } - /** - * saves a cache record - * @param cacheRecord {CacheRecord} - * @param storeInCache {?StoreInCache} - * @param correlationId {?string} correlation id - */ - async saveCacheRecord(cacheRecord, correlationId, storeInCache) { - if (!cacheRecord) { - throw createClientAuthError(invalidCacheRecord); - } - try { - if (!!cacheRecord.account) { - this.setAccount(cacheRecord.account, correlationId); - } - if (!!cacheRecord.idToken && storeInCache?.idToken !== false) { - this.setIdTokenCredential(cacheRecord.idToken, correlationId); - } - if (!!cacheRecord.accessToken && - storeInCache?.accessToken !== false) { - await this.saveAccessToken(cacheRecord.accessToken, correlationId); - } - if (!!cacheRecord.refreshToken && - storeInCache?.refreshToken !== false) { - this.setRefreshTokenCredential(cacheRecord.refreshToken, correlationId); - } - if (!!cacheRecord.appMetadata) { - this.setAppMetadata(cacheRecord.appMetadata, correlationId); - } - } - catch (e) { - this.commonLogger?.error(`CacheManager.saveCacheRecord: failed`); - if (e instanceof AuthError) { - throw e; - } - else { - throw createCacheError(e); - } - } - } - /** - * saves access token credential - * @param credential - */ - async saveAccessToken(credential, correlationId) { - const accessTokenFilter = { - clientId: credential.clientId, - credentialType: credential.credentialType, - environment: credential.environment, - homeAccountId: credential.homeAccountId, - realm: credential.realm, - tokenType: credential.tokenType, - requestedClaimsHash: credential.requestedClaimsHash, - }; - const tokenKeys = this.getTokenKeys(); - const currentScopes = ScopeSet.fromString(credential.target); - tokenKeys.accessToken.forEach((key) => { - if (!this.accessTokenKeyMatchesFilter(key, accessTokenFilter, false)) { - return; - } - const tokenEntity = this.getAccessTokenCredential(key, correlationId); - if (tokenEntity && - this.credentialMatchesFilter(tokenEntity, accessTokenFilter)) { - const tokenScopeSet = ScopeSet.fromString(tokenEntity.target); - if (tokenScopeSet.intersectingScopeSets(currentScopes)) { - this.removeAccessToken(key, correlationId); - } - } - }); - this.setAccessTokenCredential(credential, correlationId); - } - /** - * Retrieve account entities matching all provided tenant-agnostic filters; if no filter is set, get all account entities in the cache - * Not checking for casing as keys are all generated in lower case, remember to convert to lower case if object properties are compared - * @param accountFilter - An object containing Account properties to filter by - */ - getAccountsFilteredBy(accountFilter, correlationId) { - const allAccountKeys = this.getAccountKeys(); - const matchingAccounts = []; - allAccountKeys.forEach((cacheKey) => { - if (!this.isAccountKey(cacheKey, accountFilter.homeAccountId)) { - // Don't parse value if the key doesn't match the account filters - return; - } - const entity = this.getAccount(cacheKey, correlationId, this.commonLogger); - // Match base account fields - if (!entity) { - return; - } - if (!!accountFilter.homeAccountId && - !this.matchHomeAccountId(entity, accountFilter.homeAccountId)) { - return; - } - if (!!accountFilter.username && - !this.matchUsername(entity.username, accountFilter.username)) { - return; - } - if (!!accountFilter.environment && - !this.matchEnvironment(entity, accountFilter.environment)) { - return; - } - if (!!accountFilter.realm && - !this.matchRealm(entity, accountFilter.realm)) { - return; - } - if (!!accountFilter.nativeAccountId && - !this.matchNativeAccountId(entity, accountFilter.nativeAccountId)) { - return; - } - if (!!accountFilter.authorityType && - !this.matchAuthorityType(entity, accountFilter.authorityType)) { - return; - } - // If at least one tenant profile matches the tenant profile filter, add the account to the list of matching accounts - const tenantProfileFilter = { - localAccountId: accountFilter?.localAccountId, - name: accountFilter?.name, - }; - const matchingTenantProfiles = entity.tenantProfiles?.filter((tenantProfile) => { - return this.tenantProfileMatchesFilter(tenantProfile, tenantProfileFilter); - }); - if (matchingTenantProfiles && matchingTenantProfiles.length === 0) { - // No tenant profile for this account matches filter, don't add to list of matching accounts - return; - } - matchingAccounts.push(entity); - }); - return matchingAccounts; - } - /** - * Returns true if the given key matches our account key schema. Also matches homeAccountId and/or tenantId if provided - * @param key - * @param homeAccountId - * @param tenantId - * @returns - */ - isAccountKey(key, homeAccountId, tenantId) { - if (key.split(Separators.CACHE_KEY_SEPARATOR).length < 3) { - // Account cache keys contain 3 items separated by '-' (each item may also contain '-') - return false; - } - if (homeAccountId && - !key.toLowerCase().includes(homeAccountId.toLowerCase())) { - return false; - } - if (tenantId && !key.toLowerCase().includes(tenantId.toLowerCase())) { - return false; - } - // Do not check environment as aliasing can cause false negatives - return true; - } - /** - * Returns true if the given key matches our credential key schema. - * @param key - */ - isCredentialKey(key) { - if (key.split(Separators.CACHE_KEY_SEPARATOR).length < 6) { - // Credential cache keys contain 6 items separated by '-' (each item may also contain '-') - return false; - } - const lowerCaseKey = key.toLowerCase(); - // Credential keys must indicate what credential type they represent - if (lowerCaseKey.indexOf(CredentialType.ID_TOKEN.toLowerCase()) === - -1 && - lowerCaseKey.indexOf(CredentialType.ACCESS_TOKEN.toLowerCase()) === - -1 && - lowerCaseKey.indexOf(CredentialType.ACCESS_TOKEN_WITH_AUTH_SCHEME.toLowerCase()) === -1 && - lowerCaseKey.indexOf(CredentialType.REFRESH_TOKEN.toLowerCase()) === - -1) { - return false; - } - if (lowerCaseKey.indexOf(CredentialType.REFRESH_TOKEN.toLowerCase()) > - -1) { - // Refresh tokens must contain the client id or family id - const clientIdValidation = `${CredentialType.REFRESH_TOKEN}${Separators.CACHE_KEY_SEPARATOR}${this.clientId}${Separators.CACHE_KEY_SEPARATOR}`; - const familyIdValidation = `${CredentialType.REFRESH_TOKEN}${Separators.CACHE_KEY_SEPARATOR}${THE_FAMILY_ID}${Separators.CACHE_KEY_SEPARATOR}`; - if (lowerCaseKey.indexOf(clientIdValidation.toLowerCase()) === -1 && - lowerCaseKey.indexOf(familyIdValidation.toLowerCase()) === -1) { - return false; - } - } - else if (lowerCaseKey.indexOf(this.clientId.toLowerCase()) === -1) { - // Tokens must contain the clientId - return false; - } - return true; - } - /** - * Returns whether or not the given credential entity matches the filter - * @param entity - * @param filter - * @returns - */ - credentialMatchesFilter(entity, filter) { - if (!!filter.clientId && !this.matchClientId(entity, filter.clientId)) { - return false; - } - if (!!filter.userAssertionHash && - !this.matchUserAssertionHash(entity, filter.userAssertionHash)) { - return false; - } - /* - * homeAccountId can be undefined, and we want to filter out cached items that have a homeAccountId of "" - * because we don't want a client_credential request to return a cached token that has a homeAccountId - */ - if (typeof filter.homeAccountId === "string" && - !this.matchHomeAccountId(entity, filter.homeAccountId)) { - return false; - } - if (!!filter.environment && - !this.matchEnvironment(entity, filter.environment)) { - return false; - } - if (!!filter.realm && !this.matchRealm(entity, filter.realm)) { - return false; - } - if (!!filter.credentialType && - !this.matchCredentialType(entity, filter.credentialType)) { - return false; - } - if (!!filter.familyId && !this.matchFamilyId(entity, filter.familyId)) { - return false; - } - /* - * idTokens do not have "target", target specific refreshTokens do exist for some types of authentication - * Resource specific refresh tokens case will be added when the support is deemed necessary - */ - if (!!filter.target && !this.matchTarget(entity, filter.target)) { - return false; - } - // If request OR cached entity has requested Claims Hash, check if they match - if (filter.requestedClaimsHash || entity.requestedClaimsHash) { - // Don't match if either is undefined or they are different - if (entity.requestedClaimsHash !== filter.requestedClaimsHash) { - return false; - } - } - // Access Token with Auth Scheme specific matching - if (entity.credentialType === - CredentialType.ACCESS_TOKEN_WITH_AUTH_SCHEME) { - if (!!filter.tokenType && - !this.matchTokenType(entity, filter.tokenType)) { - return false; - } - // KeyId (sshKid) in request must match cached SSH certificate keyId because SSH cert is bound to a specific key - if (filter.tokenType === AuthenticationScheme.SSH) { - if (filter.keyId && !this.matchKeyId(entity, filter.keyId)) { - return false; - } - } - } - return true; - } - /** - * retrieve appMetadata matching all provided filters; if no filter is set, get all appMetadata - * @param filter - */ - getAppMetadataFilteredBy(filter) { - const allCacheKeys = this.getKeys(); - const matchingAppMetadata = {}; - allCacheKeys.forEach((cacheKey) => { - // don't parse any non-appMetadata type cache entities - if (!this.isAppMetadata(cacheKey)) { - return; - } - // Attempt retrieval - const entity = this.getAppMetadata(cacheKey); - if (!entity) { - return; - } - if (!!filter.environment && - !this.matchEnvironment(entity, filter.environment)) { - return; - } - if (!!filter.clientId && - !this.matchClientId(entity, filter.clientId)) { - return; - } - matchingAppMetadata[cacheKey] = entity; - }); - return matchingAppMetadata; - } - /** - * retrieve authorityMetadata that contains a matching alias - * @param filter - */ - getAuthorityMetadataByAlias(host) { - const allCacheKeys = this.getAuthorityMetadataKeys(); - let matchedEntity = null; - allCacheKeys.forEach((cacheKey) => { - // don't parse any non-authorityMetadata type cache entities - if (!this.isAuthorityMetadata(cacheKey) || - cacheKey.indexOf(this.clientId) === -1) { - return; - } - // Attempt retrieval - const entity = this.getAuthorityMetadata(cacheKey); - if (!entity) { - return; - } - if (entity.aliases.indexOf(host) === -1) { - return; - } - matchedEntity = entity; - }); - return matchedEntity; - } - /** - * Removes all accounts and related tokens from cache. - */ - async removeAllAccounts(correlationId) { - const allAccountKeys = this.getAccountKeys(); - const removedAccounts = []; - allAccountKeys.forEach((cacheKey) => { - removedAccounts.push(this.removeAccount(cacheKey, correlationId)); - }); - await Promise.all(removedAccounts); - } - /** - * Removes the account and related tokens for a given account key - * @param account - */ - async removeAccount(accountKey, correlationId) { - const account = this.getAccount(accountKey, correlationId, this.commonLogger); - if (!account) { - return; - } - await this.removeAccountContext(account, correlationId); - this.removeItem(accountKey, correlationId); - } - /** - * Removes credentials associated with the provided account - * @param account - */ - async removeAccountContext(account, correlationId) { - const allTokenKeys = this.getTokenKeys(); - const accountId = account.generateAccountId(); - allTokenKeys.idToken.forEach((key) => { - if (key.indexOf(accountId) === 0) { - this.removeIdToken(key, correlationId); - } - }); - allTokenKeys.accessToken.forEach((key) => { - if (key.indexOf(accountId) === 0) { - this.removeAccessToken(key, correlationId); - } - }); - allTokenKeys.refreshToken.forEach((key) => { - if (key.indexOf(accountId) === 0) { - this.removeRefreshToken(key, correlationId); - } - }); - this.getKeys().forEach((key) => { - if (key.includes(accountId)) { - this.removeItem(key, correlationId); - } - }); - } - /** - * Migrates a single-tenant account and all it's associated alternate cross-tenant account objects in the - * cache into a condensed multi-tenant account object with tenant profiles. - * @param accountKey - * @param accountEntity - * @param logger - * @returns - */ - updateOutdatedCachedAccount(accountKey, accountEntity, correlationId, logger) { - // Only update if account entity is defined and has no tenantProfiles object (is outdated) - if (accountEntity && accountEntity.isSingleTenant()) { - this.commonLogger?.verbose("updateOutdatedCachedAccount: Found a single-tenant (outdated) account entity in the cache, migrating to multi-tenant account entity"); - // Get keys of all accounts belonging to user - const matchingAccountKeys = this.getAccountKeys().filter((key) => { - return key.startsWith(accountEntity.homeAccountId); - }); - // Get all account entities belonging to user - const accountsToMerge = []; - matchingAccountKeys.forEach((key) => { - const account = this.getCachedAccountEntity(key, correlationId); - if (account) { - accountsToMerge.push(account); - } - }); - // Set base account to home account if available, any account if not - const baseAccount = accountsToMerge.find((account) => { - return tenantIdMatchesHomeTenant(account.realm, account.homeAccountId); - }) || accountsToMerge[0]; - // Populate tenant profiles built from each account entity belonging to the user - baseAccount.tenantProfiles = accountsToMerge.map((account) => { - return { - tenantId: account.realm, - localAccountId: account.localAccountId, - name: account.name, - isHomeTenant: tenantIdMatchesHomeTenant(account.realm, account.homeAccountId), - }; - }); - const updatedAccount = CacheManager.toObject(new AccountEntity(), { - ...baseAccount, - }); - const newAccountKey = updatedAccount.generateAccountKey(); - // Clear cache of legacy account objects that have been collpsed into tenant profiles - matchingAccountKeys.forEach((key) => { - if (key !== newAccountKey) { - this.removeOutdatedAccount(accountKey, correlationId); - } - }); - // Cache updated account object - this.setAccount(updatedAccount, correlationId); - logger?.verbose("Updated an outdated account entity in the cache"); - return updatedAccount; - } - // No update is necessary - return accountEntity; - } - /** - * returns a boolean if the given credential is removed - * @param credential - */ - removeAccessToken(key, correlationId) { - const credential = this.getAccessTokenCredential(key, correlationId); - this.removeItem(key, correlationId); - if (!credential || - credential.credentialType.toLowerCase() !== - CredentialType.ACCESS_TOKEN_WITH_AUTH_SCHEME.toLowerCase() || - credential.tokenType !== AuthenticationScheme.POP) { - return; - } - // Remove Token Binding Key from key store for PoP Tokens Credentials - const kid = credential.keyId; - if (kid) { - void this.cryptoImpl.removeTokenBindingKey(kid).catch(() => { - this.commonLogger.error("Binding key could not be removed"); - }); - } - } - /** - * Removes all app metadata objects from cache. - */ - removeAppMetadata(correlationId) { - const allCacheKeys = this.getKeys(); - allCacheKeys.forEach((cacheKey) => { - if (this.isAppMetadata(cacheKey)) { - this.removeItem(cacheKey, correlationId); - } - }); - return true; - } - /** - * Retrieve AccountEntity from cache - * @param account - */ - readAccountFromCache(account, correlationId) { - const accountKey = AccountEntity.generateAccountCacheKey(account); - return this.getAccount(accountKey, correlationId, this.commonLogger); - } - /** - * Retrieve IdTokenEntity from cache - * @param account {AccountInfo} - * @param tokenKeys {?TokenKeys} - * @param targetRealm {?string} - * @param performanceClient {?IPerformanceClient} - * @param correlationId {?string} - */ - getIdToken(account, correlationId, tokenKeys, targetRealm, performanceClient) { - this.commonLogger.trace("CacheManager - getIdToken called"); - const idTokenFilter = { - homeAccountId: account.homeAccountId, - environment: account.environment, - credentialType: CredentialType.ID_TOKEN, - clientId: this.clientId, - realm: targetRealm, - }; - const idTokenMap = this.getIdTokensByFilter(idTokenFilter, correlationId, tokenKeys); - const numIdTokens = idTokenMap.size; - if (numIdTokens < 1) { - this.commonLogger.info("CacheManager:getIdToken - No token found"); - return null; - } - else if (numIdTokens > 1) { - let tokensToBeRemoved = idTokenMap; - // Multiple tenant profiles and no tenant specified, pick home account - if (!targetRealm) { - const homeIdTokenMap = new Map(); - idTokenMap.forEach((idToken, key) => { - if (idToken.realm === account.tenantId) { - homeIdTokenMap.set(key, idToken); - } - }); - const numHomeIdTokens = homeIdTokenMap.size; - if (numHomeIdTokens < 1) { - this.commonLogger.info("CacheManager:getIdToken - Multiple ID tokens found for account but none match account entity tenant id, returning first result"); - return idTokenMap.values().next().value; - } - else if (numHomeIdTokens === 1) { - this.commonLogger.info("CacheManager:getIdToken - Multiple ID tokens found for account, defaulting to home tenant profile"); - return homeIdTokenMap.values().next().value; - } - else { - // Multiple ID tokens for home tenant profile, remove all and return null - tokensToBeRemoved = homeIdTokenMap; - } - } - // Multiple tokens for a single tenant profile, remove all and return null - this.commonLogger.info("CacheManager:getIdToken - Multiple matching ID tokens found, clearing them"); - tokensToBeRemoved.forEach((idToken, key) => { - this.removeIdToken(key, correlationId); - }); - if (performanceClient && correlationId) { - performanceClient.addFields({ multiMatchedID: idTokenMap.size }, correlationId); - } - return null; - } - this.commonLogger.info("CacheManager:getIdToken - Returning ID token"); - return idTokenMap.values().next().value; - } - /** - * Gets all idTokens matching the given filter - * @param filter - * @returns - */ - getIdTokensByFilter(filter, correlationId, tokenKeys) { - const idTokenKeys = (tokenKeys && tokenKeys.idToken) || this.getTokenKeys().idToken; - const idTokens = new Map(); - idTokenKeys.forEach((key) => { - if (!this.idTokenKeyMatchesFilter(key, { - clientId: this.clientId, - ...filter, - })) { - return; - } - const idToken = this.getIdTokenCredential(key, correlationId); - if (idToken && this.credentialMatchesFilter(idToken, filter)) { - idTokens.set(key, idToken); - } - }); - return idTokens; - } - /** - * Validate the cache key against filter before retrieving and parsing cache value - * @param key - * @param filter - * @returns - */ - idTokenKeyMatchesFilter(inputKey, filter) { - const key = inputKey.toLowerCase(); - if (filter.clientId && - key.indexOf(filter.clientId.toLowerCase()) === -1) { - return false; - } - if (filter.homeAccountId && - key.indexOf(filter.homeAccountId.toLowerCase()) === -1) { - return false; - } - return true; - } - /** - * Removes idToken from the cache - * @param key - */ - removeIdToken(key, correlationId) { - this.removeItem(key, correlationId); - } - /** - * Removes refresh token from the cache - * @param key - */ - removeRefreshToken(key, correlationId) { - this.removeItem(key, correlationId); - } - /** - * Retrieve AccessTokenEntity from cache - * @param account {AccountInfo} - * @param request {BaseAuthRequest} - * @param tokenKeys {?TokenKeys} - * @param performanceClient {?IPerformanceClient} - * @param correlationId {?string} - */ - getAccessToken(account, request, tokenKeys, targetRealm, performanceClient) { - this.commonLogger.trace("CacheManager - getAccessToken called"); - const scopes = ScopeSet.createSearchScopes(request.scopes); - const authScheme = request.authenticationScheme || AuthenticationScheme.BEARER; - /* - * Distinguish between Bearer and PoP/SSH token cache types - * Cast to lowercase to handle "bearer" from ADFS - */ - const credentialType = authScheme && - authScheme.toLowerCase() !== - AuthenticationScheme.BEARER.toLowerCase() - ? CredentialType.ACCESS_TOKEN_WITH_AUTH_SCHEME - : CredentialType.ACCESS_TOKEN; - const accessTokenFilter = { - homeAccountId: account.homeAccountId, - environment: account.environment, - credentialType: credentialType, - clientId: this.clientId, - realm: targetRealm || account.tenantId, - target: scopes, - tokenType: authScheme, - keyId: request.sshKid, - requestedClaimsHash: request.requestedClaimsHash, - }; - const accessTokenKeys = (tokenKeys && tokenKeys.accessToken) || - this.getTokenKeys().accessToken; - const accessTokens = []; - accessTokenKeys.forEach((key) => { - // Validate key - if (this.accessTokenKeyMatchesFilter(key, accessTokenFilter, true)) { - const accessToken = this.getAccessTokenCredential(key, request.correlationId); - // Validate value - if (accessToken && - this.credentialMatchesFilter(accessToken, accessTokenFilter)) { - accessTokens.push(accessToken); - } - } - }); - const numAccessTokens = accessTokens.length; - if (numAccessTokens < 1) { - this.commonLogger.info("CacheManager:getAccessToken - No token found"); - return null; - } - else if (numAccessTokens > 1) { - this.commonLogger.info("CacheManager:getAccessToken - Multiple access tokens found, clearing them"); - accessTokens.forEach((accessToken) => { - void this.removeAccessToken(generateCredentialKey(accessToken), request.correlationId); - }); - if (performanceClient && request.correlationId) { - performanceClient.addFields({ multiMatchedAT: accessTokens.length }, request.correlationId); - } - return null; - } - this.commonLogger.info("CacheManager:getAccessToken - Returning access token"); - return accessTokens[0]; - } - /** - * Validate the cache key against filter before retrieving and parsing cache value - * @param key - * @param filter - * @param keyMustContainAllScopes - * @returns - */ - accessTokenKeyMatchesFilter(inputKey, filter, keyMustContainAllScopes) { - const key = inputKey.toLowerCase(); - if (filter.clientId && - key.indexOf(filter.clientId.toLowerCase()) === -1) { - return false; - } - if (filter.homeAccountId && - key.indexOf(filter.homeAccountId.toLowerCase()) === -1) { - return false; - } - if (filter.realm && key.indexOf(filter.realm.toLowerCase()) === -1) { - return false; - } - if (filter.requestedClaimsHash && - key.indexOf(filter.requestedClaimsHash.toLowerCase()) === -1) { - return false; - } - if (filter.target) { - const scopes = filter.target.asArray(); - for (let i = 0; i < scopes.length; i++) { - if (keyMustContainAllScopes && - !key.includes(scopes[i].toLowerCase())) { - // When performing a cache lookup a missing scope would be a cache miss - return false; - } - else if (!keyMustContainAllScopes && - key.includes(scopes[i].toLowerCase())) { - // When performing a cache write, any token with a subset of requested scopes should be replaced - return true; - } - } - } - return true; - } - /** - * Gets all access tokens matching the filter - * @param filter - * @returns - */ - getAccessTokensByFilter(filter, correlationId) { - const tokenKeys = this.getTokenKeys(); - const accessTokens = []; - tokenKeys.accessToken.forEach((key) => { - if (!this.accessTokenKeyMatchesFilter(key, filter, true)) { - return; - } - const accessToken = this.getAccessTokenCredential(key, correlationId); - if (accessToken && - this.credentialMatchesFilter(accessToken, filter)) { - accessTokens.push(accessToken); - } - }); - return accessTokens; - } - /** - * Helper to retrieve the appropriate refresh token from cache - * @param account {AccountInfo} - * @param familyRT {boolean} - * @param tokenKeys {?TokenKeys} - * @param performanceClient {?IPerformanceClient} - * @param correlationId {?string} - */ - getRefreshToken(account, familyRT, correlationId, tokenKeys, performanceClient) { - this.commonLogger.trace("CacheManager - getRefreshToken called"); - const id = familyRT ? THE_FAMILY_ID : undefined; - const refreshTokenFilter = { - homeAccountId: account.homeAccountId, - environment: account.environment, - credentialType: CredentialType.REFRESH_TOKEN, - clientId: this.clientId, - familyId: id, - }; - const refreshTokenKeys = (tokenKeys && tokenKeys.refreshToken) || - this.getTokenKeys().refreshToken; - const refreshTokens = []; - refreshTokenKeys.forEach((key) => { - // Validate key - if (this.refreshTokenKeyMatchesFilter(key, refreshTokenFilter)) { - const refreshToken = this.getRefreshTokenCredential(key, correlationId); - // Validate value - if (refreshToken && - this.credentialMatchesFilter(refreshToken, refreshTokenFilter)) { - refreshTokens.push(refreshToken); - } - } - }); - const numRefreshTokens = refreshTokens.length; - if (numRefreshTokens < 1) { - this.commonLogger.info("CacheManager:getRefreshToken - No refresh token found."); - return null; - } - // address the else case after remove functions address environment aliases - if (numRefreshTokens > 1 && performanceClient && correlationId) { - performanceClient.addFields({ multiMatchedRT: numRefreshTokens }, correlationId); - } - this.commonLogger.info("CacheManager:getRefreshToken - returning refresh token"); - return refreshTokens[0]; - } - /** - * Validate the cache key against filter before retrieving and parsing cache value - * @param key - * @param filter - */ - refreshTokenKeyMatchesFilter(inputKey, filter) { - const key = inputKey.toLowerCase(); - if (filter.familyId && - key.indexOf(filter.familyId.toLowerCase()) === -1) { - return false; - } - // If familyId is used, clientId is not in the key - if (!filter.familyId && - filter.clientId && - key.indexOf(filter.clientId.toLowerCase()) === -1) { - return false; - } - if (filter.homeAccountId && - key.indexOf(filter.homeAccountId.toLowerCase()) === -1) { - return false; - } - return true; - } - /** - * Retrieve AppMetadataEntity from cache - */ - readAppMetadataFromCache(environment) { - const appMetadataFilter = { - environment, - clientId: this.clientId, - }; - const appMetadata = this.getAppMetadataFilteredBy(appMetadataFilter); - const appMetadataEntries = Object.keys(appMetadata).map((key) => appMetadata[key]); - const numAppMetadata = appMetadataEntries.length; - if (numAppMetadata < 1) { - return null; - } - else if (numAppMetadata > 1) { - throw createClientAuthError(multipleMatchingAppMetadata); - } - return appMetadataEntries[0]; - } - /** - * Return the family_id value associated with FOCI - * @param environment - * @param clientId - */ - isAppMetadataFOCI(environment) { - const appMetadata = this.readAppMetadataFromCache(environment); - return !!(appMetadata && appMetadata.familyId === THE_FAMILY_ID); - } - /** - * helper to match account ids - * @param value - * @param homeAccountId - */ - matchHomeAccountId(entity, homeAccountId) { - return !!(typeof entity.homeAccountId === "string" && - homeAccountId === entity.homeAccountId); - } - /** - * helper to match account ids - * @param entity - * @param localAccountId - * @returns - */ - matchLocalAccountIdFromTokenClaims(tokenClaims, localAccountId) { - const idTokenLocalAccountId = tokenClaims.oid || tokenClaims.sub; - return localAccountId === idTokenLocalAccountId; - } - matchLocalAccountIdFromTenantProfile(tenantProfile, localAccountId) { - return tenantProfile.localAccountId === localAccountId; - } - /** - * helper to match names - * @param entity - * @param name - * @returns true if the downcased name properties are present and match in the filter and the entity - */ - matchName(claims, name) { - return !!(name.toLowerCase() === claims.name?.toLowerCase()); - } - /** - * helper to match usernames - * @param entity - * @param username - * @returns - */ - matchUsername(cachedUsername, filterUsername) { - return !!(cachedUsername && - typeof cachedUsername === "string" && - filterUsername?.toLowerCase() === cachedUsername.toLowerCase()); - } - /** - * helper to match assertion - * @param value - * @param oboAssertion - */ - matchUserAssertionHash(entity, userAssertionHash) { - return !!(entity.userAssertionHash && - userAssertionHash === entity.userAssertionHash); - } - /** - * helper to match environment - * @param value - * @param environment - */ - matchEnvironment(entity, environment) { - // Check static authority options first for cases where authority metadata has not been resolved and cached yet - if (this.staticAuthorityOptions) { - const staticAliases = getAliasesFromStaticSources(this.staticAuthorityOptions, this.commonLogger); - if (staticAliases.includes(environment) && - staticAliases.includes(entity.environment)) { - return true; - } - } - // Query metadata cache if no static authority configuration has aliases that match enviroment - const cloudMetadata = this.getAuthorityMetadataByAlias(environment); - if (cloudMetadata && - cloudMetadata.aliases.indexOf(entity.environment) > -1) { - return true; - } - return false; - } - /** - * helper to match credential type - * @param entity - * @param credentialType - */ - matchCredentialType(entity, credentialType) { - return (entity.credentialType && - credentialType.toLowerCase() === entity.credentialType.toLowerCase()); - } - /** - * helper to match client ids - * @param entity - * @param clientId - */ - matchClientId(entity, clientId) { - return !!(entity.clientId && clientId === entity.clientId); - } - /** - * helper to match family ids - * @param entity - * @param familyId - */ - matchFamilyId(entity, familyId) { - return !!(entity.familyId && familyId === entity.familyId); - } - /** - * helper to match realm - * @param entity - * @param realm - */ - matchRealm(entity, realm) { - return !!(entity.realm?.toLowerCase() === realm.toLowerCase()); - } - /** - * helper to match nativeAccountId - * @param entity - * @param nativeAccountId - * @returns boolean indicating the match result - */ - matchNativeAccountId(entity, nativeAccountId) { - return !!(entity.nativeAccountId && nativeAccountId === entity.nativeAccountId); - } - /** - * helper to match loginHint which can be either: - * 1. login_hint ID token claim - * 2. username in cached account object - * 3. upn in ID token claims - * @param entity - * @param loginHint - * @returns - */ - matchLoginHintFromTokenClaims(tokenClaims, loginHint) { - if (tokenClaims.login_hint === loginHint) { - return true; - } - if (tokenClaims.preferred_username === loginHint) { - return true; - } - if (tokenClaims.upn === loginHint) { - return true; - } - return false; - } - /** - * Helper to match sid - * @param entity - * @param sid - * @returns true if the sid claim is present and matches the filter - */ - matchSid(idTokenClaims, sid) { - return idTokenClaims.sid === sid; - } - matchAuthorityType(entity, authorityType) { - return !!(entity.authorityType && - authorityType.toLowerCase() === entity.authorityType.toLowerCase()); - } - /** - * Returns true if the target scopes are a subset of the current entity's scopes, false otherwise. - * @param entity - * @param target - */ - matchTarget(entity, target) { - const isNotAccessTokenCredential = entity.credentialType !== CredentialType.ACCESS_TOKEN && - entity.credentialType !== - CredentialType.ACCESS_TOKEN_WITH_AUTH_SCHEME; - if (isNotAccessTokenCredential || !entity.target) { - return false; - } - const entityScopeSet = ScopeSet.fromString(entity.target); - return entityScopeSet.containsScopeSet(target); - } - /** - * Returns true if the credential's tokenType or Authentication Scheme matches the one in the request, false otherwise - * @param entity - * @param tokenType - */ - matchTokenType(entity, tokenType) { - return !!(entity.tokenType && entity.tokenType === tokenType); - } - /** - * Returns true if the credential's keyId matches the one in the request, false otherwise - * @param entity - * @param keyId - */ - matchKeyId(entity, keyId) { - return !!(entity.keyId && entity.keyId === keyId); - } - /** - * returns if a given cache entity is of the type appmetadata - * @param key - */ - isAppMetadata(key) { - return key.indexOf(APP_METADATA) !== -1; - } - /** - * returns if a given cache entity is of the type authoritymetadata - * @param key - */ - isAuthorityMetadata(key) { - return key.indexOf(AUTHORITY_METADATA_CONSTANTS.CACHE_KEY) !== -1; - } - /** - * returns cache key used for cloud instance metadata - */ - generateAuthorityMetadataCacheKey(authority) { - return `${AUTHORITY_METADATA_CONSTANTS.CACHE_KEY}-${this.clientId}-${authority}`; - } - /** - * Helper to convert serialized data to object - * @param obj - * @param json - */ - static toObject(obj, json) { - for (const propertyName in json) { - obj[propertyName] = json[propertyName]; - } - return obj; - } -} -/** @internal */ -class DefaultStorageClass extends CacheManager { - setAccount() { - throw createClientAuthError(methodNotImplemented); - } - getAccount() { - throw createClientAuthError(methodNotImplemented); - } - getCachedAccountEntity() { - throw createClientAuthError(methodNotImplemented); - } - setIdTokenCredential() { - throw createClientAuthError(methodNotImplemented); - } - getIdTokenCredential() { - throw createClientAuthError(methodNotImplemented); - } - setAccessTokenCredential() { - throw createClientAuthError(methodNotImplemented); - } - getAccessTokenCredential() { - throw createClientAuthError(methodNotImplemented); - } - setRefreshTokenCredential() { - throw createClientAuthError(methodNotImplemented); - } - getRefreshTokenCredential() { - throw createClientAuthError(methodNotImplemented); - } - setAppMetadata() { - throw createClientAuthError(methodNotImplemented); - } - getAppMetadata() { - throw createClientAuthError(methodNotImplemented); - } - setServerTelemetry() { - throw createClientAuthError(methodNotImplemented); - } - getServerTelemetry() { - throw createClientAuthError(methodNotImplemented); - } - setAuthorityMetadata() { - throw createClientAuthError(methodNotImplemented); - } - getAuthorityMetadata() { - throw createClientAuthError(methodNotImplemented); - } - getAuthorityMetadataKeys() { - throw createClientAuthError(methodNotImplemented); - } - setThrottlingCache() { - throw createClientAuthError(methodNotImplemented); - } - getThrottlingCache() { - throw createClientAuthError(methodNotImplemented); - } - removeItem() { - throw createClientAuthError(methodNotImplemented); - } - getKeys() { - throw createClientAuthError(methodNotImplemented); - } - getAccountKeys() { - throw createClientAuthError(methodNotImplemented); - } - getTokenKeys() { - throw createClientAuthError(methodNotImplemented); - } - updateCredentialCacheKey() { - throw createClientAuthError(methodNotImplemented); - } - removeOutdatedAccount() { - throw createClientAuthError(methodNotImplemented); - } -} - -export { CacheManager, DefaultStorageClass }; -//# sourceMappingURL=CacheManager.mjs.map diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/cache/CacheManager.mjs.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/cache/CacheManager.mjs.map deleted file mode 100644 index a74928d..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/cache/CacheManager.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"CacheManager.mjs","sources":["../../src/cache/CacheManager.ts"],"sourcesContent":[null],"names":["ClientAuthErrorCodes.invalidCacheRecord","ClientAuthErrorCodes.multipleMatchingAppMetadata","ClientAuthErrorCodes.methodNot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AACA,oBAAyC,CAAC,CAAC;KAC1E;IACD,qBAAqB,GAAA;AACjB,QAAA,MAAM,qBAAqB,CAACA,oBAAyC,CAAC,CAAC;KAC1E;AACJ;;;;"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/cache/entities/AccessTokenEntity.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/cache/entities/AccessTokenEntity.d.ts deleted file mode 100644 index 790f2b1..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/cache/entities/AccessTokenEntity.d.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { CredentialEntity } from "./CredentialEntity.js"; -import { AuthenticationScheme } from "../../utils/Constants.js"; -/** - * Access token cache type - */ -export type AccessTokenEntity = CredentialEntity & { - /** Full tenant or organizational identifier that the account belongs to */ - realm: string; - /** Permissions that are included in the token, or for refresh tokens, the resource identifier. */ - target: string; - /** Absolute device time when entry was created in the cache. */ - cachedAt: string; - /** Token expiry time, calculated based on current UTC time in seconds. Represented as a string. */ - expiresOn: string; - /** Additional extended expiry time until when token is valid in case of server-side outage. Represented as string in UTC seconds. */ - extendedExpiresOn?: string; - /** Used for proactive refresh */ - refreshOn?: string; - /** Matches the authentication scheme for which the token was issued (i.e. Bearer or pop) */ - tokenType?: AuthenticationScheme; - /** Stringified claims object */ - requestedClaims?: string; - /** Matches the SHA 256 hash of the claims object included in the token request */ - requestedClaimsHash?: string; -}; -//# sourceMappingURL=AccessTokenEntity.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/cache/entities/AccessTokenEntity.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/cache/entities/AccessTokenEntity.d.ts.map deleted file mode 100644 index ebf709b..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/cache/entities/AccessTokenEntity.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AccessTokenEntity.d.ts","sourceRoot":"","sources":["../../../src/cache/entities/AccessTokenEntity.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAEhE;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG,gBAAgB,GAAG;IAC/C,2EAA2E;IAC3E,KAAK,EAAE,MAAM,CAAC;IACd,kGAAkG;IAClG,MAAM,EAAE,MAAM,CAAC;IACf,gEAAgE;IAChE,QAAQ,EAAE,MAAM,CAAC;IACjB,mGAAmG;IACnG,SAAS,EAAE,MAAM,CAAC;IAClB,qIAAqI;IACrI,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,iCAAiC;IACjC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,4FAA4F;IAC5F,SAAS,CAAC,EAAE,oBAAoB,CAAC;IACjC,gCAAgC;IAChC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,kFAAkF;IAClF,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAChC,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/cache/entities/AccountEntity.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/cache/entities/AccountEntity.d.ts deleted file mode 100644 index 01991be..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/cache/entities/AccountEntity.d.ts +++ /dev/null @@ -1,108 +0,0 @@ -import { Authority } from "../../authority/Authority.js"; -import { ICrypto } from "../../crypto/ICrypto.js"; -import { AccountInfo, TenantProfile } from "../../account/AccountInfo.js"; -import { AuthorityType } from "../../authority/AuthorityType.js"; -import { Logger } from "../../logger/Logger.js"; -import { TokenClaims } from "../../account/TokenClaims.js"; -/** - * Type that defines required and optional parameters for an Account field (based on universal cache schema implemented by all MSALs). - * - * Key : Value Schema - * - * Key: -- - * - * Value Schema: - * { - * homeAccountId: home account identifier for the auth scheme, - * environment: entity that issued the token, represented as a full host - * realm: Full tenant or organizational identifier that the account belongs to - * localAccountId: Original tenant-specific accountID, usually used for legacy cases - * username: primary username that represents the user, usually corresponds to preferred_username in the v2 endpt - * authorityType: Accounts authority type as a string - * name: Full name for the account, including given name and family name, - * lastModificationTime: last time this entity was modified in the cache - * lastModificationApp: - * nativeAccountId: Account identifier on the native device - * tenantProfiles: Array of tenant profile objects for each tenant that the account has authenticated with in the browser - * } - * @internal - */ -export declare class AccountEntity { - homeAccountId: string; - environment: string; - realm: string; - localAccountId: string; - username: string; - authorityType: string; - clientInfo?: string; - name?: string; - lastModificationTime?: string; - lastModificationApp?: string; - cloudGraphHostName?: string; - msGraphHost?: string; - nativeAccountId?: string; - tenantProfiles?: Array; - lastUpdatedAt?: string; - /** - * Generate Account Id key component as per the schema: - - */ - generateAccountId(): string; - /** - * Generate Account Cache Key as per the schema: -- - */ - generateAccountKey(): string; - /** - * Returns the AccountInfo interface for this account. - */ - getAccountInfo(): AccountInfo; - /** - * Returns true if the account entity is in single tenant format (outdated), false otherwise - */ - isSingleTenant(): boolean; - /** - * Generates account key from interface - * @param accountInterface - */ - static generateAccountCacheKey(accountInterface: AccountInfo): string; - /** - * Build Account cache from IdToken, clientInfo and authority/policy. Associated with AAD. - * @param accountDetails - */ - static createAccount(accountDetails: { - homeAccountId: string; - idTokenClaims?: TokenClaims; - clientInfo?: string; - cloudGraphHostName?: string; - msGraphHost?: string; - environment?: string; - nativeAccountId?: string; - tenantProfiles?: Array; - }, authority: Authority, base64Decode?: (input: string) => string): AccountEntity; - /** - * Creates an AccountEntity object from AccountInfo - * @param accountInfo - * @param cloudGraphHostName - * @param msGraphHost - * @returns - */ - static createFromAccountInfo(accountInfo: AccountInfo, cloudGraphHostName?: string, msGraphHost?: string): AccountEntity; - /** - * Generate HomeAccountId from server response - * @param serverClientInfo - * @param authType - */ - static generateHomeAccountId(serverClientInfo: string, authType: AuthorityType, logger: Logger, cryptoObj: ICrypto, idTokenClaims?: TokenClaims): string; - /** - * Validates an entity: checks for all expected params - * @param entity - */ - static isAccountEntity(entity: object): boolean; - /** - * Helper function to determine whether 2 accountInfo objects represent the same account - * @param accountA - * @param accountB - * @param compareClaims - If set to true idTokenClaims will also be compared to determine account equality - */ - static accountInfoIsEqual(accountA: AccountInfo | null, accountB: AccountInfo | null, compareClaims?: boolean): boolean; -} -//# sourceMappingURL=AccountEntity.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/cache/entities/AccountEntity.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/cache/entities/AccountEntity.d.ts.map deleted file mode 100644 index 841e0f2..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/cache/entities/AccountEntity.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AccountEntity.d.ts","sourceRoot":"","sources":["../../../src/cache/entities/AccountEntity.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAElD,OAAO,EACH,WAAW,EACX,aAAa,EAEhB,MAAM,8BAA8B,CAAC;AAKtC,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AACjE,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,EACH,WAAW,EAEd,MAAM,8BAA8B,CAAC;AAGtC;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,qBAAa,aAAa;IACtB,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,cAAc,EAAE,MAAM,CAAC;IACvB,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,mBAA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C,EAAE,WAAW,GAC5B,MAAM;IA2BT;;;OAGG;IACH,MAAM,CAAC,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO;IAe/C;;;;;OAKG;IACH,MAAM,CAAC,kBAAkB,CACrB,QAAQ,EAAE,WAAW,GAAG,IAAI,EAC5B,QAAQ,EAAE,WAAW,GAAG,IAAI,EAC5B,aAAa,CAAC,EAAE,OAAO,GACxB,OAAO;CA4Bb"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/cache/entities/AccountEntity.mjs b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/cache/entities/AccountEntity.mjs deleted file mode 100644 index 446cdad..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/cache/entities/AccountEntity.mjs +++ /dev/null @@ -1,254 +0,0 @@ -/*! @azure/msal-common v14.16.1 2025-08-05 */ -'use strict'; -import { Separators, CacheAccountType } from '../../utils/Constants.mjs'; -import { buildClientInfo } from '../../account/ClientInfo.mjs'; -import { buildTenantProfile } from '../../account/AccountInfo.mjs'; -import { createClientAuthError } from '../../error/ClientAuthError.mjs'; -import { AuthorityType } from '../../authority/AuthorityType.mjs'; -import { getTenantIdFromIdTokenClaims } from '../../account/TokenClaims.mjs'; -import { ProtocolMode } from '../../authority/ProtocolMode.mjs'; -import { invalidCacheEnvironment } from '../../error/ClientAuthErrorCodes.mjs'; - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * Type that defines required and optional parameters for an Account field (based on universal cache schema implemented by all MSALs). - * - * Key : Value Schema - * - * Key: -- - * - * Value Schema: - * { - * homeAccountId: home account identifier for the auth scheme, - * environment: entity that issued the token, represented as a full host - * realm: Full tenant or organizational identifier that the account belongs to - * localAccountId: Original tenant-specific accountID, usually used for legacy cases - * username: primary username that represents the user, usually corresponds to preferred_username in the v2 endpt - * authorityType: Accounts authority type as a string - * name: Full name for the account, including given name and family name, - * lastModificationTime: last time this entity was modified in the cache - * lastModificationApp: - * nativeAccountId: Account identifier on the native device - * tenantProfiles: Array of tenant profile objects for each tenant that the account has authenticated with in the browser - * } - * @internal - */ -class AccountEntity { - /** - * Generate Account Id key component as per the schema: - - */ - generateAccountId() { - const accountId = [this.homeAccountId, this.environment]; - return accountId.join(Separators.CACHE_KEY_SEPARATOR).toLowerCase(); - } - /** - * Generate Account Cache Key as per the schema: -- - */ - generateAccountKey() { - return AccountEntity.generateAccountCacheKey({ - homeAccountId: this.homeAccountId, - environment: this.environment, - tenantId: this.realm, - username: this.username, - localAccountId: this.localAccountId, - }); - } - /** - * Returns the AccountInfo interface for this account. - */ - getAccountInfo() { - return { - homeAccountId: this.homeAccountId, - environment: this.environment, - tenantId: this.realm, - username: this.username, - localAccountId: this.localAccountId, - name: this.name, - nativeAccountId: this.nativeAccountId, - authorityType: this.authorityType, - // Deserialize tenant profiles array into a Map - tenantProfiles: new Map((this.tenantProfiles || []).map((tenantProfile) => { - return [tenantProfile.tenantId, tenantProfile]; - })), - }; - } - /** - * Returns true if the account entity is in single tenant format (outdated), false otherwise - */ - isSingleTenant() { - return !this.tenantProfiles; - } - /** - * Generates account key from interface - * @param accountInterface - */ - static generateAccountCacheKey(accountInterface) { - const homeTenantId = accountInterface.homeAccountId.split(".")[1]; - const accountKey = [ - accountInterface.homeAccountId, - accountInterface.environment || "", - homeTenantId || accountInterface.tenantId || "", - ]; - return accountKey.join(Separators.CACHE_KEY_SEPARATOR).toLowerCase(); - } - /** - * Build Account cache from IdToken, clientInfo and authority/policy. Associated with AAD. - * @param accountDetails - */ - static createAccount(accountDetails, authority, base64Decode) { - const account = new AccountEntity(); - if (authority.authorityType === AuthorityType.Adfs) { - account.authorityType = CacheAccountType.ADFS_ACCOUNT_TYPE; - } - else if (authority.protocolMode === ProtocolMode.AAD) { - account.authorityType = CacheAccountType.MSSTS_ACCOUNT_TYPE; - } - else { - account.authorityType = CacheAccountType.GENERIC_ACCOUNT_TYPE; - } - let clientInfo; - if (accountDetails.clientInfo && base64Decode) { - clientInfo = buildClientInfo(accountDetails.clientInfo, base64Decode); - } - account.clientInfo = accountDetails.clientInfo; - account.homeAccountId = accountDetails.homeAccountId; - account.nativeAccountId = accountDetails.nativeAccountId; - const env = accountDetails.environment || - (authority && authority.getPreferredCache()); - if (!env) { - throw createClientAuthError(invalidCacheEnvironment); - } - account.environment = env; - // non AAD scenarios can have empty realm - account.realm = - clientInfo?.utid || - getTenantIdFromIdTokenClaims(accountDetails.idTokenClaims) || - ""; - // How do you account for MSA CID here? - account.localAccountId = - clientInfo?.uid || - accountDetails.idTokenClaims?.oid || - accountDetails.idTokenClaims?.sub || - ""; - /* - * In B2C scenarios the emails claim is used instead of preferred_username and it is an array. - * In most cases it will contain a single email. This field should not be relied upon if a custom - * policy is configured to return more than 1 email. - */ - const preferredUsername = accountDetails.idTokenClaims?.preferred_username || - accountDetails.idTokenClaims?.upn; - const email = accountDetails.idTokenClaims?.emails - ? accountDetails.idTokenClaims.emails[0] - : null; - account.username = preferredUsername || email || ""; - account.name = accountDetails.idTokenClaims?.name || ""; - account.cloudGraphHostName = accountDetails.cloudGraphHostName; - account.msGraphHost = accountDetails.msGraphHost; - if (accountDetails.tenantProfiles) { - account.tenantProfiles = accountDetails.tenantProfiles; - } - else { - const tenantProfile = buildTenantProfile(accountDetails.homeAccountId, account.localAccountId, account.realm, accountDetails.idTokenClaims); - account.tenantProfiles = [tenantProfile]; - } - return account; - } - /** - * Creates an AccountEntity object from AccountInfo - * @param accountInfo - * @param cloudGraphHostName - * @param msGraphHost - * @returns - */ - static createFromAccountInfo(accountInfo, cloudGraphHostName, msGraphHost) { - const account = new AccountEntity(); - account.authorityType = - accountInfo.authorityType || CacheAccountType.GENERIC_ACCOUNT_TYPE; - account.homeAccountId = accountInfo.homeAccountId; - account.localAccountId = accountInfo.localAccountId; - account.nativeAccountId = accountInfo.nativeAccountId; - account.realm = accountInfo.tenantId; - account.environment = accountInfo.environment; - account.username = accountInfo.username; - account.name = accountInfo.name; - account.cloudGraphHostName = cloudGraphHostName; - account.msGraphHost = msGraphHost; - // Serialize tenant profiles map into an array - account.tenantProfiles = Array.from(accountInfo.tenantProfiles?.values() || []); - return account; - } - /** - * Generate HomeAccountId from server response - * @param serverClientInfo - * @param authType - */ - static generateHomeAccountId(serverClientInfo, authType, logger, cryptoObj, idTokenClaims) { - // since ADFS/DSTS do not have tid and does not set client_info - if (!(authType === AuthorityType.Adfs || - authType === AuthorityType.Dsts)) { - // for cases where there is clientInfo - if (serverClientInfo) { - try { - const clientInfo = buildClientInfo(serverClientInfo, cryptoObj.base64Decode); - if (clientInfo.uid && clientInfo.utid) { - return `${clientInfo.uid}.${clientInfo.utid}`; - } - } - catch (e) { } - } - logger.warning("No client info in response"); - } - // default to "sub" claim - return idTokenClaims?.sub || ""; - } - /** - * Validates an entity: checks for all expected params - * @param entity - */ - static isAccountEntity(entity) { - if (!entity) { - return false; - } - return (entity.hasOwnProperty("homeAccountId") && - entity.hasOwnProperty("environment") && - entity.hasOwnProperty("realm") && - entity.hasOwnProperty("localAccountId") && - entity.hasOwnProperty("username") && - entity.hasOwnProperty("authorityType")); - } - /** - * Helper function to determine whether 2 accountInfo objects represent the same account - * @param accountA - * @param accountB - * @param compareClaims - If set to true idTokenClaims will also be compared to determine account equality - */ - static accountInfoIsEqual(accountA, accountB, compareClaims) { - if (!accountA || !accountB) { - return false; - } - let claimsMatch = true; // default to true so as to not fail comparison below if compareClaims: false - if (compareClaims) { - const accountAClaims = (accountA.idTokenClaims || - {}); - const accountBClaims = (accountB.idTokenClaims || - {}); - // issued at timestamp and nonce are expected to change each time a new id token is acquired - claimsMatch = - accountAClaims.iat === accountBClaims.iat && - accountAClaims.nonce === accountBClaims.nonce; - } - return (accountA.homeAccountId === accountB.homeAccountId && - accountA.localAccountId === accountB.localAccountId && - accountA.username === accountB.username && - accountA.tenantId === accountB.tenantId && - accountA.environment === accountB.environment && - accountA.nativeAccountId === accountB.nativeAccountId && - claimsMatch); - } -} - -export { AccountEntity }; -//# sourceMappingURL=AccountEntity.mjs.map diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/cache/entities/AccountEntity.mjs.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/cache/entities/AccountEntity.mjs.map deleted file mode 100644 index bc4ecd1..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/cache/entities/AccountEntity.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AccountEntity.mjs","sources":["../../../src/cache/entities/AccountEntity.ts"],"sourcesContent":[null],"names":["ClientAuthErrorCodes.invalidCacheEnvironment"],"mappings":";;;;;;;;;;;AAAA;;;AAGG;AAuBH;;;;;;;;;;;;;;;;;;;;;;AAsBG;MACU,aAAa,CAAA;AAiBtB;;AAEG;IACH,iBAAiB,GAAA;QACb,MAAM,SAAS,GAAkB,CAAC,IAAI,CAAC,aAAa,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;QACxE,OAAO,SAAS,CAAC,IAAI,CAAC,UAAU,CAAC,mBAAmB,CAAC,CAAC,WAAW,EAAE,CAAC;KACvE;AAED;;AAEG;IACH,kBAAkB,GAAA;QACd,OAAO,aAAa,CAAC,uBAAuB,CAAC;YACzC,aAAa,EAAE,IAAI,CAAC,aAAa;YACjC,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,QAAQ,EAAE,IAAI,CAAC,KAAK;YACpB,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,cAAc,EAAE,IAAI,CAAC,cAAc;AACtC,SAAA,CAAC,CAAC;KACN;AAED;;AAEG;IACH,cAAc,GAAA;QACV,OAAO;YACH,aAAa,EAAE,IAAI,CAAC,aAAa;YACjC,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,QAAQ,EAAE,IAAI,CAAC,KAAK;YACpB,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,cAAc,EAAE,IAAI,CAAC,cAAc;YACnC,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,eAAe,EAAE,IA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dist/cache/entities/AppMetadataEntity.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/cache/entities/AppMetadataEntity.d.ts deleted file mode 100644 index 6aaa4ca..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/cache/entities/AppMetadataEntity.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -/** - * App Metadata Cache Type - */ -export type AppMetadataEntity = { - /** clientId of the application */ - clientId: string; - /** entity that issued the token, represented as a full host */ - environment: string; - /** Family identifier, '1' represents Microsoft Family */ - familyId?: string; -}; -//# sourceMappingURL=AppMetadataEntity.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/cache/entities/AppMetadataEntity.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/cache/entities/AppMetadataEntity.d.ts.map deleted file mode 100644 index cae6fb8..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/cache/entities/AppMetadataEntity.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AppMetadataEntity.d.ts","sourceRoot":"","sources":["../../../src/cache/entities/AppMetadataEntity.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC5B,kCAAkC;IAClC,QAAQ,EAAE,MAAM,CAAC;IACjB,+DAA+D;IAC/D,WAAW,EAAE,MAAM,CAAC;IACpB,yDAAyD;IACzD,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/cache/entities/AuthorityMetadataEntity.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/cache/entities/AuthorityMetadataEntity.d.ts deleted file mode 100644 index 8e7b0a2..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/cache/entities/AuthorityMetadataEntity.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** @internal */ -export type AuthorityMetadataEntity = { - aliases: Array; - preferred_cache: string; - preferred_network: string; - canonical_authority: string; - authorization_endpoint: string; - token_endpoint: string; - end_session_endpoint?: string; - issuer: string; - aliasesFromNetwork: boolean; - endpointsFromNetwork: boolean; - expiresAt: number; - jwks_uri: string; -}; -//# sourceMappingURL=AuthorityMetadataEntity.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/cache/entities/AuthorityMetadataEntity.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/cache/entities/AuthorityMetadataEntity.d.ts.map deleted file mode 100644 index 2437f38..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/cache/entities/AuthorityMetadataEntity.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AuthorityMetadataEntity.d.ts","sourceRoot":"","sources":["../../../src/cache/entities/AuthorityMetadataEntity.ts"],"names":[],"mappings":"AAKA,gBAAgB;AAChB,MAAM,MAAM,uBAAuB,GAAG;IAClC,OAAO,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACvB,eAAe,EAAE,MAAM,CAAC;IACxB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,mBAAmB,EAAE,MAAM,CAAC;IAC5B,sBAAsB,EAAE,MAAM,CAAC;IAC/B,cAAc,EAAE,MAAM,CAAC;IACvB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf,kBAAkB,EAAE,OAAO,CAAC;IAC5B,oBAAoB,EAAE,OAAO,CAAC;IAC9B,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;CACpB,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/cache/entities/CacheRecord.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/cache/entities/CacheRecord.d.ts deleted file mode 100644 index 59a2bdb..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/cache/entities/CacheRecord.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { IdTokenEntity } from "./IdTokenEntity.js"; -import { AccessTokenEntity } from "./AccessTokenEntity.js"; -import { RefreshTokenEntity } from "./RefreshTokenEntity.js"; -import { AccountEntity } from "./AccountEntity.js"; -import { AppMetadataEntity } from "./AppMetadataEntity.js"; -/** @internal */ -export type CacheRecord = { - account?: AccountEntity | null; - idToken?: IdTokenEntity | null; - accessToken?: AccessTokenEntity | null; - refreshToken?: RefreshTokenEntity | null; - appMetadata?: AppMetadataEntity | null; -}; -//# sourceMappingURL=CacheRecord.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/cache/entities/CacheRecord.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/cache/entities/CacheRecord.d.ts.map deleted file mode 100644 index 1993d40..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/cache/entities/CacheRecord.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"CacheRecord.d.ts","sourceRoot":"","sources":["../../../src/cache/entities/CacheRecord.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAE3D,gBAAgB;AAChB,MAAM,MAAM,WAAW,GAAG;IACtB,OAAO,CAAC,EAAE,aAAa,GAAG,IAAI,CAAC;IAC/B,OAAO,CAAC,EAAE,aAAa,GAAG,IAAI,CAAC;IAC/B,WAAW,CAAC,EAAE,iBAAiB,GAAG,IAAI,CAAC;IACvC,YAAY,CAAC,EAAE,kBAAkB,GAAG,IAAI,CAAC;IACzC,WAAW,CAAC,EAAE,iBAAiB,GAAG,IAAI,CAAC;CAC1C,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/cache/entities/CredentialEntity.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/cache/entities/CredentialEntity.d.ts deleted file mode 100644 index d29ea3b..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/cache/entities/CredentialEntity.d.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { CredentialType, AuthenticationScheme } from "../../utils/Constants.js"; -/** - * Credential Cache Type - */ -export type CredentialEntity = { - /** Identifier for the user in their home tenant*/ - homeAccountId: string; - /** Entity that issued the token, represented as a full host */ - environment: string; - /** Type of credential */ - credentialType: CredentialType; - /** Client ID of the application */ - clientId: string; - /** Actual credential as a string */ - secret: string; - /** Family ID identifier, usually only used for refresh tokens */ - familyId?: string; - /** Full tenant or organizational identifier that the account belongs to */ - realm?: string; - /** Permissions that are included in the token, or for refresh tokens, the resource identifier. */ - target?: string; - /** Matches the SHA 256 hash of the obo_assertion for the OBO flow */ - userAssertionHash?: string; - /** Matches the authentication scheme for which the token was issued (i.e. Bearer or pop) */ - tokenType?: AuthenticationScheme; - /** KeyId for PoP and SSH tokens stored in the kid claim */ - keyId?: string; - /** Matches the SHA 256 hash of the claims object included in the token request */ - requestedClaimsHash?: string; - /** Timestamp when the entry was last updated */ - lastUpdatedAt?: string; -}; -//# sourceMappingURL=CredentialEntity.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/cache/entities/CredentialEntity.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/cache/entities/CredentialEntity.d.ts.map deleted file mode 100644 index 0d91f1b..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/cache/entities/CredentialEntity.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"CredentialEntity.d.ts","sourceRoot":"","sources":["../../../src/cache/entities/CredentialEntity.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAEhF;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC3B,kDAAkD;IAClD,aAAa,EAAE,MAAM,CAAC;IACtB,+DAA+D;IAC/D,WAAW,EAAE,MAAM,CAAC;IACpB,yBAAyB;IACzB,cAAc,EAAE,cAAc,CAAC;IAC/B,mCAAmC;IACnC,QAAQ,EAAE,MAAM,CAAC;IACjB,oCAAoC;IACpC,MAAM,EAAE,MAAM,CAAC;IACf,iEAAiE;IACjE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,2EAA2E;IAC3E,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kGAAkG;IAClG,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,qEAAqE;IACrE,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,4FAA4F;IAC5F,SAAS,CAAC,EAAE,oBAAoB,CAAC;IACjC,2DAA2D;IAC3D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kFAAkF;IAClF,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,gDAAgD;IAChD,aAAa,CAAC,EAAE,MAAM,CAAC;CAC1B,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/cache/entities/IdTokenEntity.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/cache/entities/IdTokenEntity.d.ts deleted file mode 100644 index f8cfff6..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/cache/entities/IdTokenEntity.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { CredentialEntity } from "./CredentialEntity.js"; -/** - * Id Token Cache Type - */ -export type IdTokenEntity = CredentialEntity & { - /** Full tenant or organizational identifier that the account belongs to */ - realm: string; -}; -//# sourceMappingURL=IdTokenEntity.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/cache/entities/IdTokenEntity.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/cache/entities/IdTokenEntity.d.ts.map deleted file mode 100644 index fef2e09..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/cache/entities/IdTokenEntity.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"IdTokenEntity.d.ts","sourceRoot":"","sources":["../../../src/cache/entities/IdTokenEntity.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAEzD;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,gBAAgB,GAAG;IAC3C,4EAA4E;IAC5E,KAAK,EAAE,MAAM,CAAC;CACjB,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/cache/entities/RefreshTokenEntity.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/cache/entities/RefreshTokenEntity.d.ts deleted file mode 100644 index 17b4b6d..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/cache/entities/RefreshTokenEntity.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { CredentialEntity } from "./CredentialEntity.js"; -/** - * Refresh Token Cache Type - */ -export type RefreshTokenEntity = CredentialEntity & { - expiresOn?: string; -}; -//# sourceMappingURL=RefreshTokenEntity.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/cache/entities/RefreshTokenEntity.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/cache/entities/RefreshTokenEntity.d.ts.map deleted file mode 100644 index 066110e..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/cache/entities/RefreshTokenEntity.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"RefreshTokenEntity.d.ts","sourceRoot":"","sources":["../../../src/cache/entities/RefreshTokenEntity.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAEzD;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG,gBAAgB,GAAG;IAChD,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/cache/entities/ServerTelemetryEntity.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/cache/entities/ServerTelemetryEntity.d.ts deleted file mode 100644 index 96f514d..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/cache/entities/ServerTelemetryEntity.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -export type ServerTelemetryEntity = { - failedRequests: Array; - errors: string[]; - cacheHits: number; - nativeBrokerErrorCode?: string; -}; -//# sourceMappingURL=ServerTelemetryEntity.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/cache/entities/ServerTelemetryEntity.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/cache/entities/ServerTelemetryEntity.d.ts.map deleted file mode 100644 index fab35bb..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/cache/entities/ServerTelemetryEntity.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ServerTelemetryEntity.d.ts","sourceRoot":"","sources":["../../../src/cache/entities/ServerTelemetryEntity.ts"],"names":[],"mappings":"AAKA,MAAM,MAAM,qBAAqB,GAAG;IAChC,cAAc,EAAE,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC;IACvC,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,qBAAqB,CAAC,EAAE,MAAM,CAAC;CAClC,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/cache/entities/ThrottlingEntity.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/cache/entities/ThrottlingEntity.d.ts deleted file mode 100644 index a641a95..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/cache/entities/ThrottlingEntity.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -export type ThrottlingEntity = { - throttleTime: number; - error?: string; - errorCodes?: Array; - errorMessage?: string; - subError?: string; -}; -//# sourceMappingURL=ThrottlingEntity.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/cache/entities/ThrottlingEntity.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/cache/entities/ThrottlingEntity.d.ts.map deleted file mode 100644 index 561e972..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/cache/entities/ThrottlingEntity.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ThrottlingEntity.d.ts","sourceRoot":"","sources":["../../../src/cache/entities/ThrottlingEntity.ts"],"names":[],"mappings":"AAKA,MAAM,MAAM,gBAAgB,GAAG;IAE3B,YAAY,EAAE,MAAM,CAAC;IAErB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC3B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/cache/interface/ICacheManager.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/cache/interface/ICacheManager.d.ts deleted file mode 100644 index c073c79..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/cache/interface/ICacheManager.d.ts +++ /dev/null @@ -1,167 +0,0 @@ -import { AccountFilter } from "../utils/CacheTypes.js"; -import { CacheRecord } from "../entities/CacheRecord.js"; -import { AccountEntity } from "../entities/AccountEntity.js"; -import { AccountInfo } from "../../account/AccountInfo.js"; -import { AppMetadataEntity } from "../entities/AppMetadataEntity.js"; -import { ServerTelemetryEntity } from "../entities/ServerTelemetryEntity.js"; -import { ThrottlingEntity } from "../entities/ThrottlingEntity.js"; -import { IdTokenEntity } from "../entities/IdTokenEntity.js"; -import { AccessTokenEntity } from "../entities/AccessTokenEntity.js"; -import { RefreshTokenEntity } from "../entities/RefreshTokenEntity.js"; -import { AuthorityMetadataEntity } from "../entities/AuthorityMetadataEntity.js"; -import { StoreInCache } from "../../request/StoreInCache.js"; -export interface ICacheManager { - /** - * fetch the account entity from the platform cache - * @param accountKey - */ - getAccount(accountKey: string, correlationId: string): AccountEntity | null; - /** - * set account entity in the platform cache - * @param account - */ - setAccount(account: AccountEntity, correlationId: string): void; - /** - * Returns true if the given key matches our account key schema. Also matches homeAccountId and/or tenantId if provided - * @param key - * @param homeAccountId - * @param tenantId - * @returns - */ - isAccountKey(key: string, homeAccountId?: string, tenantId?: string): boolean; - /** - * fetch the idToken entity from the platform cache - * @param idTokenKey - */ - getIdTokenCredential(idTokenKey: string, correlationId: string): IdTokenEntity | null; - /** - * set idToken entity to the platform cache - * @param idToken - */ - setIdTokenCredential(idToken: IdTokenEntity, correlationId: string): void; - /** - * fetch the idToken entity from the platform cache - * @param accessTokenKey - */ - getAccessTokenCredential(accessTokenKey: string, correlationId: string): AccessTokenEntity | null; - /** - * set idToken entity to the platform cache - * @param accessToken - */ - setAccessTokenCredential(accessToken: AccessTokenEntity, correlationId: string): void; - /** - * fetch the idToken entity from the platform cache - * @param refreshTokenKey - */ - getRefreshTokenCredential(refreshTokenKey: string, correlationId: string): RefreshTokenEntity | null; - /** - * set idToken entity to the platform cache - * @param refreshToken - */ - setRefreshTokenCredential(refreshToken: RefreshTokenEntity, correlationId: string): void; - /** - * fetch appMetadata entity from the platform cache - * @param appMetadataKey - */ - getAppMetadata(appMetadataKey: string): AppMetadataEntity | null; - /** - * set appMetadata entity to the platform cache - * @param appMetadata - */ - setAppMetadata(appMetadata: AppMetadataEntity, correlationId: string): void; - /** - * fetch server telemetry entity from the platform cache - * @param serverTelemetryKey - */ - getServerTelemetry(serverTelemetryKey: string): ServerTelemetryEntity | null; - /** - * set server telemetry entity to the platform cache - * @param serverTelemetryKey - * @param serverTelemetry - */ - setServerTelemetry(serverTelemetryKey: string, serverTelemetry: ServerTelemetryEntity, correlationId: string): void; - /** - * fetch cloud discovery metadata entity from the platform cache - * @param key - */ - getAuthorityMetadata(key: string): AuthorityMetadataEntity | null; - /** - * Get cache keys for authority metadata - */ - getAuthorityMetadataKeys(): Array; - /** - * set cloud discovery metadata entity to the platform cache - * @param key - * @param value - */ - setAuthorityMetadata(key: string, value: AuthorityMetadataEntity): void; - /** - * Provide an alias to find a matching AuthorityMetadataEntity in cache - * @param host - */ - getAuthorityMetadataByAlias(host: string): AuthorityMetadataEntity | null; - /** - * given an authority generates the cache key for authorityMetadata - * @param authority - */ - generateAuthorityMetadataCacheKey(authority: string): string; - /** - * fetch throttling entity from the platform cache - * @param throttlingCacheKey - */ - getThrottlingCache(throttlingCacheKey: string): ThrottlingEntity | null; - /** - * set throttling entity to the platform cache - * @param throttlingCacheKey - * @param throttlingCache - */ - setThrottlingCache(throttlingCacheKey: string, throttlingCache: ThrottlingEntity, correlationId: string): void; - /** - * Returns all accounts in cache - */ - getAllAccounts(correlationId: string): AccountInfo[]; - /** - * saves a cache record - * @param cacheRecord - */ - saveCacheRecord(cacheRecord: CacheRecord, correlationId: string, storeInCache?: StoreInCache): Promise; - /** - * retrieve accounts matching all provided filters; if no filter is set, get all accounts - * @param homeAccountId - * @param environment - * @param realm - */ - getAccountsFilteredBy(filter: AccountFilter, correlationId: string): AccountEntity[]; - /** - * Get AccountInfo object based on provided filters - * @param filter - */ - getAccountInfoFilteredBy(filter: AccountFilter, correlationId: string): AccountInfo | null; - /** - * Removes all accounts and related tokens from cache. - */ - removeAllAccounts(correlationId: string): Promise; - /** - * returns a boolean if the given account is removed - * @param account - */ - removeAccount(accountKey: string, correlationId: string): Promise; - /** - * returns a boolean if the given account is removed - * @param account - */ - removeAccountContext(account: AccountEntity, correlationId: string): Promise; - /** - * @param key - */ - removeIdToken(key: string, correlationId: string): void; - /** - * @param key - */ - removeAccessToken(key: string, correlationId: string): void; - /** - * @param key - */ - removeRefreshToken(key: string, correlationId: string): void; -} -//# sourceMappingURL=ICacheManager.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/cache/interface/ICacheManager.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/cache/interface/ICacheManager.d.ts.map deleted file mode 100644 index b47765d..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/cache/interface/ICacheManager.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ICacheManager.d.ts","sourceRoot":"","sources":["../../../src/cache/interface/ICacheManager.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAC7D,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AACrE,OAAO,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAC;AAC7E,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACnE,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAC7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AACrE,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AACvE,OAAO,EAAE,uBAAuB,EAAE,MAAM,wCAAwC,CAAC;AACjF,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAE7D,MAAM,WAAW,aAAa;IAC1B;;;OAGG;IACH,UAAU,CAAC,UAAU,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,GAAG,aAAa,GAAG,IAAI,CAAC;IAE5E;;;OAGG;IACH,UAAU,CAA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EAAE,aAAa,EACtB,aAAa,EAAE,MAAM,GACtB,OAAO,CAAC,IAAI,CAAC,CAAC;IAEjB;;OAEG;IACH,aAAa,CAAC,GAAG,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAExD;;OAEG;IACH,iBAAiB,CAAC,GAAG,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAE5D;;OAEG;IACH,kBAAkB,CAAC,GAAG,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;CAChE"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/cache/interface/ICachePlugin.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/cache/interface/ICachePlugin.d.ts deleted file mode 100644 index 056c6bb..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/cache/interface/ICachePlugin.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { TokenCacheContext } from "../persistence/TokenCacheContext.js"; -export interface ICachePlugin { - beforeCacheAccess: (tokenCacheContext: TokenCacheContext) => Promise; - afterCacheAccess: (tokenCacheContext: TokenCacheContext) => Promise; -} -//# sourceMappingURL=ICachePlugin.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/cache/interface/ICachePlugin.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/cache/interface/ICachePlugin.d.ts.map deleted file mode 100644 index 3ed936d..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/cache/interface/ICachePlugin.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ICachePlugin.d.ts","sourceRoot":"","sources":["../../../src/cache/interface/ICachePlugin.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AAExE,MAAM,WAAW,YAAY;IACzB,iBAAiB,EAAE,CAAC,iBAAiB,EAAE,iBAAiB,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC3E,gBAAgB,EAAE,CAAC,iBAAiB,EAAE,iBAAiB,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CAC7E"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/cache/interface/ISerializableTokenCache.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/cache/interface/ISerializableTokenCache.d.ts deleted file mode 100644 index 6701784..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/cache/interface/ISerializableTokenCache.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export interface ISerializableTokenCache { - deserialize: (cache: string) => void; - serialize: () => string; -} -//# sourceMappingURL=ISerializableTokenCache.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/cache/interface/ISerializableTokenCache.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/cache/interface/ISerializableTokenCache.d.ts.map deleted file mode 100644 index 41a6d84..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/cache/interface/ISerializableTokenCache.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ISerializableTokenCache.d.ts","sourceRoot":"","sources":["../../../src/cache/interface/ISerializableTokenCache.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,uBAAuB;IACpC,WAAW,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,SAAS,EAAE,MAAM,MAAM,CAAC;CAC3B"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/cache/persistence/TokenCacheContext.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/cache/persistence/TokenCacheContext.d.ts deleted file mode 100644 index 105ac2d..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/cache/persistence/TokenCacheContext.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { ISerializableTokenCache } from "../interface/ISerializableTokenCache.js"; -/** - * This class instance helps track the memory changes facilitating - * decisions to read from and write to the persistent cache - */ export declare class TokenCacheContext { - /** - * boolean indicating cache change - */ - hasChanged: boolean; - /** - * serializable token cache interface - */ - cache: ISerializableTokenCache; - constructor(tokenCache: ISerializableTokenCache, hasChanged: boolean); - /** - * boolean which indicates the changes in cache - */ - get cacheHasChanged(): boolean; - /** - * function to retrieve the token cache - */ - get tokenCache(): ISerializableTokenCache; -} -//# sourceMappingURL=TokenCacheContext.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/cache/persistence/TokenCacheContext.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/cache/persistence/TokenCacheContext.d.ts.map deleted file mode 100644 index 9105044..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/cache/persistence/TokenCacheContext.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"TokenCacheContext.d.ts","sourceRoot":"","sources":["../../../src/cache/persistence/TokenCacheContext.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,uBAAuB,EAAE,MAAM,yCAAyC,CAAC;AAElF;;;GAGG,CAAC,qBAAa,iBAAiB;IAC9B;;OAEG;IACH,UAAU,EAAE,OAAO,CAAC;IACpB;;OAEG;IACH,KAAK,EAAE,uBAAuB,CAAC;gBAEnB,UAAU,EAAE,uBAAuB,EAAE,UAAU,EAAE,OAAO;IAKpE;;OAEG;IACH,IAAI,eAAe,IAAI,OAAO,CAE7B;IAED;;OAEG;IACH,IAAI,UAAU,IAAI,uBAAuB,CAExC;CACJ"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/cache/persistence/TokenCacheContext.mjs b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/cache/persistence/TokenCacheContext.mjs deleted file mode 100644 index 84d272e..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/cache/persistence/TokenCacheContext.mjs +++ /dev/null @@ -1,30 +0,0 @@ -/*! @azure/msal-common v14.16.1 2025-08-05 */ -'use strict'; -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * This class instance helps track the memory changes facilitating - * decisions to read from and write to the persistent cache - */ class TokenCacheContext { - constructor(tokenCache, hasChanged) { - this.cache = tokenCache; - this.hasChanged = hasChanged; - } - /** - * boolean which indicates the changes in cache - */ - get cacheHasChanged() { - return this.hasChanged; - } - /** - * function to retrieve the token cache - */ - get tokenCache() { - return this.cache; - } -} - -export { TokenCacheContext }; -//# sourceMappingURL=TokenCacheContext.mjs.map diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/cache/persistence/TokenCacheContext.mjs.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/cache/persistence/TokenCacheContext.mjs.map deleted file mode 100644 index ee33cb1..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/cache/persistence/TokenCacheContext.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"TokenCacheContext.mjs","sources":["../../../src/cache/persistence/TokenCacheContext.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAAA;;;AAGG;AAIH;;;UAGiB,iBAAiB,CAAA;IAU9B,WAAY,CAAA,UAAmC,EAAE,UAAmB,EAAA;AAChE,QAAA,IAAI,CAAC,KAAK,GAAG,UAAU,CAAC;AACxB,QAAA,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;KAChC;AAED;;AAEG;AACH,IAAA,IAAI,eAAe,GAAA;QACf,OAAO,IAAI,CAAC,UAAU,CAAC;KAC1B;AAED;;AAEG;AACH,IAAA,IAAI,UAAU,GAAA;QACV,OAAO,IAAI,CAAC,KAAK,CAAC;KACrB;AACJ;;;;"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/cache/utils/CacheHelpers.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/cache/utils/CacheHelpers.d.ts deleted file mode 100644 index 555c282..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/cache/utils/CacheHelpers.d.ts +++ /dev/null @@ -1,95 +0,0 @@ -import { CloudDiscoveryMetadata } from "../../authority/CloudDiscoveryMetadata.js"; -import { OpenIdConfigResponse } from "../../authority/OpenIdConfigResponse.js"; -import { AuthenticationScheme } from "../../utils/Constants.js"; -import { AccessTokenEntity } from "../entities/AccessTokenEntity.js"; -import { AppMetadataEntity } from "../entities/AppMetadataEntity.js"; -import { AuthorityMetadataEntity } from "../entities/AuthorityMetadataEntity.js"; -import { CredentialEntity } from "../entities/CredentialEntity.js"; -import { IdTokenEntity } from "../entities/IdTokenEntity.js"; -import { RefreshTokenEntity } from "../entities/RefreshTokenEntity.js"; -/** - * Cache Key: ------- - * IdToken Example: uid.utid-login.microsoftonline.com-idtoken-app_client_id-contoso.com - * AccessToken Example: uid.utid-login.microsoftonline.com-accesstoken-app_client_id-contoso.com-scope1 scope2--pop - * RefreshToken Example: uid.utid-login.microsoftonline.com-refreshtoken-1-contoso.com - * @param credentialEntity - * @returns - */ -export declare function generateCredentialKey(credentialEntity: CredentialEntity): string; -/** - * Create IdTokenEntity - * @param homeAccountId - * @param authenticationResult - * @param clientId - * @param authority - */ -export declare function createIdTokenEntity(homeAccountId: string, environment: string, idToken: string, clientId: string, tenantId: string): IdTokenEntity; -/** - * Create AccessTokenEntity - * @param homeAccountId - * @param environment - * @param accessToken - * @param clientId - * @param tenantId - * @param scopes - * @param expiresOn - * @param extExpiresOn - */ -export declare function createAccessTokenEntity(homeAccountId: string, environment: string, accessToken: string, clientId: string, tenantId: string, scopes: string, expiresOn: number, extExpiresOn: number, base64Decode: (input: string) => string, refreshOn?: number, tokenType?: AuthenticationScheme, userAssertionHash?: string, keyId?: string, requestedClaims?: string, requestedClaimsHash?: string): AccessTokenEntity; -/** - * Create RefreshTokenEntity - * @param homeAccountId - * @param authenticationResult - * @param clientId - * @param authority - */ -export declare function createRefreshTokenEntity(homeAccountId: string, environment: string, refreshToken: string, clientId: string, familyId?: string, userAssertionHash?: string, expiresOn?: number): RefreshTokenEntity; -export declare function isCredentialEntity(entity: object): boolean; -/** - * Validates an entity: checks for all expected params - * @param entity - */ -export declare function isAccessTokenEntity(entity: object): boolean; -/** - * Validates an entity: checks for all expected params - * @param entity - */ -export declare function isIdTokenEntity(entity: object): boolean; -/** - * Validates an entity: checks for all expected params - * @param entity - */ -export declare function isRefreshTokenEntity(entity: object): boolean; -/** - * validates if a given cache entry is "Telemetry", parses - * @param key - * @param entity - */ -export declare function isServerTelemetryEntity(key: string, entity?: object): boolean; -/** - * validates if a given cache entry is "Throttling", parses - * @param key - * @param entity - */ -export declare function isThrottlingEntity(key: string, entity?: object): boolean; -/** - * Generate AppMetadata Cache Key as per the schema: appmetadata-- - */ -export declare function generateAppMetadataKey({ environment, clientId, }: AppMetadataEntity): string; -export declare function isAppMetadataEntity(key: string, entity: object): boolean; -/** - * Validates an entity: checks for all expected params - * @param entity - */ -export declare function isAuthorityMetadataEntity(key: string, entity: object): boolean; -/** - * Reset the exiresAt value - */ -export declare function generateAuthorityMetadataExpiresAt(): number; -export declare function updateAuthorityEndpointMetadata(authorityMetadata: AuthorityMetadataEntity, updatedValues: OpenIdConfigResponse, fromNetwork: boolean): void; -export declare function updateCloudDiscoveryMetadata(authorityMetadata: AuthorityMetadataEntity, updatedValues: CloudDiscoveryMetadata, fromNetwork: boolean): void; -/** - * Returns whether or not the data needs to be refreshed - */ -export declare function isAuthorityMetadataExpired(metadata: AuthorityMetadataEntity): boolean; -//# sourceMappingURL=CacheHelpers.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/cache/utils/CacheHelpers.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/cache/utils/CacheHelpers.d.ts.map deleted file mode 100644 index 0c71aa9..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/cache/utils/CacheHelpers.d.ts.map +++ /dev/null @@ -1 +0,0 @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AgB,+BAA+B,CAC3C,iBAAiB,EAAE,uBAAuB,EAC1C,aAAa,EAAE,oBAAoB,EACnC,WAAW,EAAE,OAAO,GACrB,IAAI,CAQN;AAED,wBAAgB,4BAA4B,CACxC,iBAAiB,EAAE,uBAAuB,EAC1C,aAAa,EAAE,sBAAsB,EACrC,WAAW,EAAE,OAAO,GACrB,IAAI,CAKN;AAED;;GAEG;AACH,wBAAgB,0BAA0B,CACtC,QAAQ,EAAE,uBAAuB,GAClC,OAAO,CAET"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/cache/utils/CacheHelpers.mjs b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/cache/utils/CacheHelpers.mjs deleted file mode 100644 index 1bf6fd6..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/cache/utils/CacheHelpers.mjs +++ /dev/null @@ -1,335 +0,0 @@ -/*! @azure/msal-common v14.16.1 2025-08-05 */ -'use strict'; -import { extractTokenClaims } from '../../account/AuthToken.mjs'; -import { createClientAuthError } from '../../error/ClientAuthError.mjs'; -import { Separators, CredentialType, AuthenticationScheme, SERVER_TELEM_CONSTANTS, ThrottlingConstants, APP_METADATA, AUTHORITY_METADATA_CONSTANTS } from '../../utils/Constants.mjs'; -import { nowSeconds } from '../../utils/TimeUtils.mjs'; -import { tokenClaimsCnfRequiredForSignedJwt } from '../../error/ClientAuthErrorCodes.mjs'; - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * Cache Key: ------- - * IdToken Example: uid.utid-login.microsoftonline.com-idtoken-app_client_id-contoso.com - * AccessToken Example: uid.utid-login.microsoftonline.com-accesstoken-app_client_id-contoso.com-scope1 scope2--pop - * RefreshToken Example: uid.utid-login.microsoftonline.com-refreshtoken-1-contoso.com - * @param credentialEntity - * @returns - */ -function generateCredentialKey(credentialEntity) { - const credentialKey = [ - generateAccountId(credentialEntity), - generateCredentialId(credentialEntity), - generateTarget(credentialEntity), - generateClaimsHash(credentialEntity), - generateScheme(credentialEntity), - ]; - return credentialKey.join(Separators.CACHE_KEY_SEPARATOR).toLowerCase(); -} -/** - * Create IdTokenEntity - * @param homeAccountId - * @param authenticationResult - * @param clientId - * @param authority - */ -function createIdTokenEntity(homeAccountId, environment, idToken, clientId, tenantId) { - const idTokenEntity = { - credentialType: CredentialType.ID_TOKEN, - homeAccountId: homeAccountId, - environment: environment, - clientId: clientId, - secret: idToken, - realm: tenantId, - }; - return idTokenEntity; -} -/** - * Create AccessTokenEntity - * @param homeAccountId - * @param environment - * @param accessToken - * @param clientId - * @param tenantId - * @param scopes - * @param expiresOn - * @param extExpiresOn - */ -function createAccessTokenEntity(homeAccountId, environment, accessToken, clientId, tenantId, scopes, expiresOn, extExpiresOn, base64Decode, refreshOn, tokenType, userAssertionHash, keyId, requestedClaims, requestedClaimsHash) { - const atEntity = { - homeAccountId: homeAccountId, - credentialType: CredentialType.ACCESS_TOKEN, - secret: accessToken, - cachedAt: nowSeconds().toString(), - expiresOn: expiresOn.toString(), - extendedExpiresOn: extExpiresOn.toString(), - environment: environment, - clientId: clientId, - realm: tenantId, - target: scopes, - tokenType: tokenType || AuthenticationScheme.BEARER, - }; - if (userAssertionHash) { - atEntity.userAssertionHash = userAssertionHash; - } - if (refreshOn) { - atEntity.refreshOn = refreshOn.toString(); - } - if (requestedClaims) { - atEntity.requestedClaims = requestedClaims; - atEntity.requestedClaimsHash = requestedClaimsHash; - } - /* - * Create Access Token With Auth Scheme instead of regular access token - * Cast to lower to handle "bearer" from ADFS - */ - if (atEntity.tokenType?.toLowerCase() !== - AuthenticationScheme.BEARER.toLowerCase()) { - atEntity.credentialType = CredentialType.ACCESS_TOKEN_WITH_AUTH_SCHEME; - switch (atEntity.tokenType) { - case AuthenticationScheme.POP: - // Make sure keyId is present and add it to credential - const tokenClaims = extractTokenClaims(accessToken, base64Decode); - if (!tokenClaims?.cnf?.kid) { - throw createClientAuthError(tokenClaimsCnfRequiredForSignedJwt); - } - atEntity.keyId = tokenClaims.cnf.kid; - break; - case AuthenticationScheme.SSH: - atEntity.keyId = keyId; - } - } - return atEntity; -} -/** - * Create RefreshTokenEntity - * @param homeAccountId - * @param authenticationResult - * @param clientId - * @param authority - */ -function createRefreshTokenEntity(homeAccountId, environment, refreshToken, clientId, familyId, userAssertionHash, expiresOn) { - const rtEntity = { - credentialType: CredentialType.REFRESH_TOKEN, - homeAccountId: homeAccountId, - environment: environment, - clientId: clientId, - secret: refreshToken, - }; - if (userAssertionHash) { - rtEntity.userAssertionHash = userAssertionHash; - } - if (familyId) { - rtEntity.familyId = familyId; - } - if (expiresOn) { - rtEntity.expiresOn = expiresOn.toString(); - } - return rtEntity; -} -function isCredentialEntity(entity) { - return (entity.hasOwnProperty("homeAccountId") && - entity.hasOwnProperty("environment") && - entity.hasOwnProperty("credentialType") && - entity.hasOwnProperty("clientId") && - entity.hasOwnProperty("secret")); -} -/** - * Validates an entity: checks for all expected params - * @param entity - */ -function isAccessTokenEntity(entity) { - if (!entity) { - return false; - } - return (isCredentialEntity(entity) && - entity.hasOwnProperty("realm") && - entity.hasOwnProperty("target") && - (entity["credentialType"] === CredentialType.ACCESS_TOKEN || - entity["credentialType"] === - CredentialType.ACCESS_TOKEN_WITH_AUTH_SCHEME)); -} -/** - * Validates an entity: checks for all expected params - * @param entity - */ -function isIdTokenEntity(entity) { - if (!entity) { - return false; - } - return (isCredentialEntity(entity) && - entity.hasOwnProperty("realm") && - entity["credentialType"] === CredentialType.ID_TOKEN); -} -/** - * Validates an entity: checks for all expected params - * @param entity - */ -function isRefreshTokenEntity(entity) { - if (!entity) { - return false; - } - return (isCredentialEntity(entity) && - entity["credentialType"] === CredentialType.REFRESH_TOKEN); -} -/** - * Generate Account Id key component as per the schema: - - */ -function generateAccountId(credentialEntity) { - const accountId = [ - credentialEntity.homeAccountId, - credentialEntity.environment, - ]; - return accountId.join(Separators.CACHE_KEY_SEPARATOR).toLowerCase(); -} -/** - * Generate Credential Id key component as per the schema: -- - */ -function generateCredentialId(credentialEntity) { - const clientOrFamilyId = credentialEntity.credentialType === CredentialType.REFRESH_TOKEN - ? credentialEntity.familyId || credentialEntity.clientId - : credentialEntity.clientId; - const credentialId = [ - credentialEntity.credentialType, - clientOrFamilyId, - credentialEntity.realm || "", - ]; - return credentialId.join(Separators.CACHE_KEY_SEPARATOR).toLowerCase(); -} -/** - * Generate target key component as per schema: - */ -function generateTarget(credentialEntity) { - return (credentialEntity.target || "").toLowerCase(); -} -/** - * Generate requested claims key component as per schema: - */ -function generateClaimsHash(credentialEntity) { - return (credentialEntity.requestedClaimsHash || "").toLowerCase(); -} -/** - * Generate scheme key componenet as per schema: - */ -function generateScheme(credentialEntity) { - /* - * PoP Tokens and SSH certs include scheme in cache key - * Cast to lowercase to handle "bearer" from ADFS - */ - return credentialEntity.tokenType && - credentialEntity.tokenType.toLowerCase() !== - AuthenticationScheme.BEARER.toLowerCase() - ? credentialEntity.tokenType.toLowerCase() - : ""; -} -/** - * validates if a given cache entry is "Telemetry", parses - * @param key - * @param entity - */ -function isServerTelemetryEntity(key, entity) { - const validateKey = key.indexOf(SERVER_TELEM_CONSTANTS.CACHE_KEY) === 0; - let validateEntity = true; - if (entity) { - validateEntity = - entity.hasOwnProperty("failedRequests") && - entity.hasOwnProperty("errors") && - entity.hasOwnProperty("cacheHits"); - } - return validateKey && validateEntity; -} -/** - * validates if a given cache entry is "Throttling", parses - * @param key - * @param entity - */ -function isThrottlingEntity(key, entity) { - let validateKey = false; - if (key) { - validateKey = key.indexOf(ThrottlingConstants.THROTTLING_PREFIX) === 0; - } - let validateEntity = true; - if (entity) { - validateEntity = entity.hasOwnProperty("throttleTime"); - } - return validateKey && validateEntity; -} -/** - * Generate AppMetadata Cache Key as per the schema: appmetadata-- - */ -function generateAppMetadataKey({ environment, clientId, }) { - const appMetaDataKeyArray = [ - APP_METADATA, - environment, - clientId, - ]; - return appMetaDataKeyArray - .join(Separators.CACHE_KEY_SEPARATOR) - .toLowerCase(); -} -/* - * Validates an entity: checks for all expected params - * @param entity - */ -function isAppMetadataEntity(key, entity) { - if (!entity) { - return false; - } - return (key.indexOf(APP_METADATA) === 0 && - entity.hasOwnProperty("clientId") && - entity.hasOwnProperty("environment")); -} -/** - * Validates an entity: checks for all expected params - * @param entity - */ -function isAuthorityMetadataEntity(key, entity) { - if (!entity) { - return false; - } - return (key.indexOf(AUTHORITY_METADATA_CONSTANTS.CACHE_KEY) === 0 && - entity.hasOwnProperty("aliases") && - entity.hasOwnProperty("preferred_cache") && - entity.hasOwnProperty("preferred_network") && - entity.hasOwnProperty("canonical_authority") && - entity.hasOwnProperty("authorization_endpoint") && - entity.hasOwnProperty("token_endpoint") && - entity.hasOwnProperty("issuer") && - entity.hasOwnProperty("aliasesFromNetwork") && - entity.hasOwnProperty("endpointsFromNetwork") && - entity.hasOwnProperty("expiresAt") && - entity.hasOwnProperty("jwks_uri")); -} -/** - * Reset the exiresAt value - */ -function generateAuthorityMetadataExpiresAt() { - return (nowSeconds() + - AUTHORITY_METADATA_CONSTANTS.REFRESH_TIME_SECONDS); -} -function updateAuthorityEndpointMetadata(authorityMetadata, updatedValues, fromNetwork) { - authorityMetadata.authorization_endpoint = - updatedValues.authorization_endpoint; - authorityMetadata.token_endpoint = updatedValues.token_endpoint; - authorityMetadata.end_session_endpoint = updatedValues.end_session_endpoint; - authorityMetadata.issuer = updatedValues.issuer; - authorityMetadata.endpointsFromNetwork = fromNetwork; - authorityMetadata.jwks_uri = updatedValues.jwks_uri; -} -function updateCloudDiscoveryMetadata(authorityMetadata, updatedValues, fromNetwork) { - authorityMetadata.aliases = updatedValues.aliases; - authorityMetadata.preferred_cache = updatedValues.preferred_cache; - authorityMetadata.preferred_network = updatedValues.preferred_network; - authorityMetadata.aliasesFromNetwork = fromNetwork; -} -/** - * Returns whether or not the data needs to be refreshed - */ -function isAuthorityMetadataExpired(metadata) { - return metadata.expiresAt <= nowSeconds(); -} - -export { createAccessTokenEntity, createIdTokenEntity, createRefreshTokenEntity, generateAppMetadataKey, generateAuthorityMetadataExpiresAt, generateCredentialKey, isAccessTokenEntity, isAppMetadataEntity, isAuthorityMetadataEntity, isAuthorityMetadataExpired, isCredentialEntity, isIdTokenEntity, isRefreshTokenEntity, isServerTelemetryEntity, isThrottlingEntity, updateAuthorityEndpointMetadata, updateCloudDiscoveryMetadata }; -//# sourceMappingURL=CacheHelpers.mjs.map diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/cache/utils/CacheHelpers.mjs.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/cache/utils/CacheHelpers.mjs.map deleted file mode 100644 index 7b5b1d7..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/cache/utils/CacheHelpers.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"CacheHelpers.mjs","sources":["../../../src/cache/utils/CacheHelpers.ts"],"sourcesContent":[null],"names":["TimeUtils.nowSeconds","ClientAuthErrorCodes.tokenClaimsCnfRequiredForSignedJwt"],"mappings":";;;;;;;;AAAA;;;AAGG;AA2BH;;;;;;;AAOG;AACG,SAAU,qBAAqB,CACjC,gBAAkC,EAAA;AAElC,IAAA,MAAM,aAAa,GAAG;QAClB,iBAAiB,CAAC,gBAAgB,CAAC;QACnC,oBAAoB,CAAC,gBAAgB,CAAC;QACtC,cAAc,CAAC,gBAAgB,CAAC;QAChC,kBAAkB,CAAC,gBAAgB,CAAC;QACpC,cAAc,CAAC,gBAAgB,CAAC;KACnC,CAAC;IAEF,OAAO,aAAa,CAAC,IAAI,CAAC,UAAU,CAAC,mBAAmB,CAAC,CAAC,WAAW,EAAE,CAAC;AAC5E,CAAC;AAED;;;;;;AAMG;AACG,SAAU,mBAAmB,CAC/B,aAAqB,EACrB,WAAmB,EACnB,OAAe,EACf,QAAgB,EAChB,QAAgB,EAAA;AAEhB,IAAA,MAAM,aAAa,GAAkB;QACjC,cAAc,EAAE,cAAc,CAAC,QAAQ;AACvC,QAAA,aAAa,EAAE,aAAa;AAC5B,QAA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kC,GAAA;AAC9C,IAAA,QACID,UAAoB,EAAE;QACtB,4BAA4B,CAAC,oBAAoB,EACnD;AACN,CAAC;SAEe,+BAA+B,CAC3C,iBAA0C,EAC1C,aAAmC,EACnC,WAAoB,EAAA;AAEpB,IAAA,iBAAiB,CAAC,sBAAsB;QACpC,aAAa,CAAC,sBAAsB,CAAC;AACzC,IAAA,iBAAiB,CAAC,cAAc,GAAG,aAAa,CAAC,cAAc,CAAC;AAChE,IAAA,iBAAiB,CAAC,oBAAoB,GAAG,aAAa,CAAC,oBAAoB,CAAC;AAC5E,IAAA,iBAAiB,CAAC,MAAM,GAAG,aAAa,CAAC,MAAM,CAAC;AAChD,IAAA,iBAAiB,CAAC,oBAAoB,GAAG,WAAW,CAAC;AACrD,IAAA,iBAAiB,CAAC,QAAQ,GAAG,aAAa,CAAC,QAAQ,CAAC;AACxD,CAAC;SAEe,4BAA4B,CACxC,iBAA0C,EAC1C,aAAqC,EACrC,WAAoB,EAAA;AAEpB,IAAA,iBAAiB,CAAC,OAAO,GAAG,aAAa,CAAC,OAAO,CAAC;AAClD,IAAA,iBAAiB,CAAC,eAAe,GAAG,aAAa,CAAC,eAAe,CAAC;AAClE,IAAA,iBAAiB,CAAC,iBAAiB,GAAG,aAAa,CAAC,iBAAiB,CAAC;AACtE,IAAA,iBAAiB,CAAC,kBAAkB,GAAG,WAAW,CAAC;AACvD,CAAC;AAED;;AAEG;AACG,SAAU,0BAA0B,CACtC,QAAiC,EAAA;IAEjC,OAAO,QAAQ,CAAC,SAAS,IAAIA,UAAoB,EAAE,CAAC;AACxD;;;;"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/cache/utils/CacheTypes.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/cache/utils/CacheTypes.d.ts deleted file mode 100644 index 125dc0c..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/cache/utils/CacheTypes.d.ts +++ /dev/null @@ -1,70 +0,0 @@ -import { AccountEntity } from "../entities/AccountEntity.js"; -import { IdTokenEntity } from "../entities/IdTokenEntity.js"; -import { AccessTokenEntity } from "../entities/AccessTokenEntity.js"; -import { RefreshTokenEntity } from "../entities/RefreshTokenEntity.js"; -import { AppMetadataEntity } from "../entities/AppMetadataEntity.js"; -import { ServerTelemetryEntity } from "../entities/ServerTelemetryEntity.js"; -import { ThrottlingEntity } from "../entities/ThrottlingEntity.js"; -import { AuthorityMetadataEntity } from "../entities/AuthorityMetadataEntity.js"; -import { AuthenticationScheme } from "../../utils/Constants.js"; -import { ScopeSet } from "../../request/ScopeSet.js"; -import { AccountInfo } from "../../account/AccountInfo.js"; -/** @internal */ -export type AccountCache = Record; -/** @internal */ -export type IdTokenCache = Record; -/** @internal */ -export type AccessTokenCache = Record; -/** @internal */ -export type RefreshTokenCache = Record; -/** @internal */ -export type AppMetadataCache = Record; -/** - * Object type of all accepted cache types - * @internal - */ -export type ValidCacheType = AccountEntity | IdTokenEntity | AccessTokenEntity | RefreshTokenEntity | AppMetadataEntity | AuthorityMetadataEntity | ServerTelemetryEntity | ThrottlingEntity | string; -/** - * Object type of all credential types - * @internal - */ -export type ValidCredentialType = IdTokenEntity | AccessTokenEntity | RefreshTokenEntity; -/** - * Account: -- - */ -export type AccountFilter = Omit, "idToken" | "idTokenClaims"> & { - realm?: string; - loginHint?: string; - sid?: string; - isHomeTenant?: boolean; -}; -export type TenantProfileFilter = Pick; -/** - * Credential: ------ - */ -export type CredentialFilter = { - homeAccountId?: string; - environment?: string; - credentialType?: string; - clientId?: string; - familyId?: string; - realm?: string; - target?: ScopeSet; - userAssertionHash?: string; - tokenType?: AuthenticationScheme; - keyId?: string; - requestedClaimsHash?: string; -}; -/** - * AppMetadata: appmetadata-- - */ -export type AppMetadataFilter = { - environment?: string; - clientId?: string; -}; -export type TokenKeys = { - idToken: string[]; - accessToken: string[]; - refreshToken: string[]; -}; -//# sourceMappingURL=CacheTypes.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/cache/utils/CacheTypes.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/cache/utils/CacheTypes.d.ts.map deleted file mode 100644 index 403e1a5..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/cache/utils/CacheTypes.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"CacheTypes.d.ts","sourceRoot":"","sources":["../../../src/cache/utils/CacheTypes.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAC7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AACrE,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AACvE,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AACrE,OAAO,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAC;AAC7E,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACnE,OAAO,EAAE,uBAAuB,EAAE,MAAM,wCAAwC,CAAC;AACjF,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAE3D,gBAAgB;AAChB,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;AACzD,gBAAgB;AAChB,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;AACzD,gBAAgB;AAChB,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAC;AACjE,gBAAgB;AAChB,MAAM,MAAM,iBAAiB,GAAG,MAAM,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAC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,MAAM,iBAAiB,GAAG;IAC5B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG;IACpB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,YAAY,EAAE,MAAM,EAAE,CAAC;CAC1B,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/client/AuthorizationCodeClient.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/client/AuthorizationCodeClient.d.ts deleted file mode 100644 index 3b84861..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/client/AuthorizationCodeClient.d.ts +++ /dev/null @@ -1,76 +0,0 @@ -import { BaseClient } from "./BaseClient.js"; -import { CommonAuthorizationUrlRequest } from "../request/CommonAuthorizationUrlRequest.js"; -import { CommonAuthorizationCodeRequest } from "../request/CommonAuthorizationCodeRequest.js"; -import { ClientConfiguration } from "../config/ClientConfiguration.js"; -import { AuthenticationResult } from "../response/AuthenticationResult.js"; -import { ServerAuthorizationCodeResponse } from "../response/ServerAuthorizationCodeResponse.js"; -import { CommonEndSessionRequest } from "../request/CommonEndSessionRequest.js"; -import { AuthorizationCodePayload } from "../response/AuthorizationCodePayload.js"; -import { IPerformanceClient } from "../telemetry/performance/IPerformanceClient.js"; -/** - * Oauth2.0 Authorization Code client - * @internal - */ -export declare class AuthorizationCodeClient extends BaseClient { - protected includeRedirectUri: boolean; - private oidcDefaultScopes; - constructor(configuration: ClientConfiguration, performanceClient?: IPerformanceClient); - /** - * Creates the URL of the authorization request letting the user input credentials and consent to the - * application. The URL target the /authorize endpoint of the authority configured in the - * application object. - * - * Once the user inputs their credentials and consents, the authority will send a response to the redirect URI - * sent in the request and should contain an authorization code, which can then be used to acquire tokens via - * acquireToken(AuthorizationCodeRequest) - * @param request - */ - getAuthCodeUrl(request: CommonAuthorizationUrlRequest): Promise; - /** - * API to acquire a token in exchange of 'authorization_code` acquired by the user in the first leg of the - * authorization_code_grant - * @param request - */ - acquireToken(request: CommonAuthorizationCodeRequest, authCodePayload?: AuthorizationCodePayload): Promise; - /** - * Handles the hash fragment response from public client code request. Returns a code response used by - * the client to exchange for a token in acquireToken. - * @param hashFragment - */ - handleFragmentResponse(serverParams: ServerAuthorizationCodeResponse, cachedState: string): AuthorizationCodePayload; - /** - * Used to log out the current user, and redirect the user to the postLogoutRedirectUri. - * Default behaviour is to redirect the user to `window.location.href`. - * @param authorityUri - */ - getLogoutUri(logoutRequest: CommonEndSessionRequest): string; - /** - * Executes POST request to token endpoint - * @param authority - * @param request - */ - private executeTokenRequest; - /** - * Generates a map for all the params to be sent to the service - * @param request - */ - private createTokenRequestBody; - /** - * This API validates the `AuthorizationCodeUrlRequest` and creates a URL - * @param request - */ - private createAuthCodeUrlQueryString; - /** - * This API validates the `EndSessionRequest` and creates a URL - * @param request - */ - private createLogoutUrlQueryString; - private addExtraQueryParams; - /** - * Helper to get sid from account. Returns null if idTokenClaims are not present or sid is not present. - * @param account - */ - private extractAccountSid; - private extractLoginHint; -} -//# sourceMappingURL=AuthorizationCodeClient.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/client/AuthorizationCodeClient.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/client/AuthorizationCodeClient.d.ts.map deleted file mode 100644 index 61f1c6f..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/client/AuthorizationCodeClient.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AuthorizationCodeClient.d.ts","sourceRoot":"","sources":["../../src/client/AuthorizationCodeClient.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,6BAA6B,EAAE,MAAM,6CAA6C,CAAC;AAC5F,OAAO,EAAE,8BAA8B,EAAE,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Scaffold/node_modules/@azure/msal-common/dist/client/AuthorizationCodeClient.mjs deleted file mode 100644 index 461d7b6..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/client/AuthorizationCodeClient.mjs +++ /dev/null @@ -1,465 +0,0 @@ -/*! @azure/msal-common v14.16.1 2025-08-05 */ -'use strict'; -import { BaseClient } from './BaseClient.mjs'; -import { RequestParameterBuilder } from '../request/RequestParameterBuilder.mjs'; -import { Separators, GrantType, AuthenticationScheme, PromptValue, HeaderNames } from '../utils/Constants.mjs'; -import { CLIENT_ID, RETURN_SPA_CODE } from '../constants/AADServerParamKeys.mjs'; -import { isOidcProtocolMode } from '../config/ClientConfiguration.mjs'; -import { ResponseHandler } from '../response/ResponseHandler.mjs'; -import { StringUtils } from '../utils/StringUtils.mjs'; -import { createClientAuthError } from '../error/ClientAuthError.mjs'; -import { UrlString } from '../url/UrlString.mjs'; -import { PopTokenGenerator } from '../crypto/PopTokenGenerator.mjs'; -import { nowSeconds } from '../utils/TimeUtils.mjs'; -import { buildClientInfo, buildClientInfoFromHomeAccountId } from '../account/ClientInfo.mjs'; -import { CcsCredentialType } from '../account/CcsCredential.mjs'; -import { createClientConfigurationError } from '../error/ClientConfigurationError.mjs'; -import { RequestValidator } from '../request/RequestValidator.mjs'; -import { PerformanceEvents } from '../telemetry/performance/PerformanceEvent.mjs'; -import { invokeAsync } from '../utils/FunctionWrappers.mjs'; -import { getClientAssertion } from '../utils/ClientAssertionUtils.mjs'; -import { requestCannotBeMade, authorizationCodeMissingFromServerResponse } from '../error/ClientAuthErrorCodes.mjs'; -import { logoutRequestEmpty, missingSshJwk } from '../error/ClientConfigurationErrorCodes.mjs'; - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * Oauth2.0 Authorization Code client - * @internal - */ -class AuthorizationCodeClient extends BaseClient { - constructor(configuration, performanceClient) { - super(configuration, performanceClient); - // Flag to indicate if client is for hybrid spa auth code redemption - this.includeRedirectUri = true; - this.oidcDefaultScopes = - this.config.authOptions.authority.options.OIDCOptions?.defaultScopes; - } - /** - * Creates the URL of the authorization request letting the user input credentials and consent to the - * application. The URL target the /authorize endpoint of the authority configured in the - * application object. - * - * Once the user inputs their credentials and consents, the authority will send a response to the redirect URI - * sent in the request and should contain an authorization code, which can then be used to acquire tokens via - * acquireToken(AuthorizationCodeRequest) - * @param request - */ - async getAuthCodeUrl(request) { - this.performanceClient?.addQueueMeasurement(PerformanceEvents.GetAuthCodeUrl, request.correlationId); - const queryString = await invokeAsync(this.createAuthCodeUrlQueryString.bind(this), PerformanceEvents.AuthClientCreateQueryString, this.logger, this.performanceClient, request.correlationId)(request); - return UrlString.appendQueryString(this.authority.authorizationEndpoint, queryString); - } - /** - * API to acquire a token in exchange of 'authorization_code` acquired by the user in the first leg of the - * authorization_code_grant - * @param request - */ - async acquireToken(request, authCodePayload) { - this.performanceClient?.addQueueMeasurement(PerformanceEvents.AuthClientAcquireToken, request.correlationId); - if (!request.code) { - throw createClientAuthError(requestCannotBeMade); - } - const reqTimestamp = nowSeconds(); - const response = await invokeAsync(this.executeTokenRequest.bind(this), PerformanceEvents.AuthClientExecuteTokenRequest, this.logger, this.performanceClient, request.correlationId)(this.authority, request); - // Retrieve requestId from response headers - const requestId = response.headers?.[HeaderNames.X_MS_REQUEST_ID]; - const responseHandler = new ResponseHandler(this.config.authOptions.clientId, this.cacheManager, this.cryptoUtils, this.logger, this.config.serializableCache, this.config.persistencePlugin, this.performanceClient); - // Validate response. This function throws a server error if an error is returned by the server. - responseHandler.validateTokenResponse(response.body); - return invokeAsync(responseHandler.handleServerTokenResponse.bind(responseHandler), PerformanceEvents.HandleServerTokenResponse, this.logger, this.performanceClient, request.correlationId)(response.body, this.authority, reqTimestamp, request, authCodePayload, undefined, undefined, undefined, requestId); - } - /** - * Handles the hash fragment response from public client code request. Returns a code response used by - * the client to exchange for a token in acquireToken. - * @param hashFragment - */ - handleFragmentResponse(serverParams, cachedState) { - // Handle responses. - const responseHandler = new ResponseHandler(this.config.authOptions.clientId, this.cacheManager, this.cryptoUtils, this.logger, null, null); - // Get code response - responseHandler.validateServerAuthorizationCodeResponse(serverParams, cachedState); - // throw when there is no auth code in the response - if (!serverParams.code) { - throw createClientAuthError(authorizationCodeMissingFromServerResponse); - } - return serverParams; - } - /** - * Used to log out the current user, and redirect the user to the postLogoutRedirectUri. - * Default behaviour is to redirect the user to `window.location.href`. - * @param authorityUri - */ - getLogoutUri(logoutRequest) { - // Throw error if logoutRequest is null/undefined - if (!logoutRequest) { - throw createClientConfigurationError(logoutRequestEmpty); - } - const queryString = this.createLogoutUrlQueryString(logoutRequest); - // Construct logout URI - return UrlString.appendQueryString(this.authority.endSessionEndpoint, queryString); - } - /** - * Executes POST request to token endpoint - * @param authority - * @param request - */ - async executeTokenRequest(authority, request) { - this.performanceClient?.addQueueMeasurement(PerformanceEvents.AuthClientExecuteTokenRequest, request.correlationId); - const queryParametersString = this.createTokenQueryParameters(request); - const endpoint = UrlString.appendQueryString(authority.tokenEndpoint, queryParametersString); - const requestBody = await invokeAsync(this.createTokenRequestBody.bind(this), PerformanceEvents.AuthClientCreateTokenRequestBody, this.logger, this.performanceClient, request.correlationId)(request); - let ccsCredential = undefined; - if (request.clientInfo) { - try { - const clientInfo = buildClientInfo(request.clientInfo, this.cryptoUtils.base64Decode); - ccsCredential = { - credential: `${clientInfo.uid}${Separators.CLIENT_INFO_SEPARATOR}${clientInfo.utid}`, - type: CcsCredentialType.HOME_ACCOUNT_ID, - }; - } - catch (e) { - this.logger.verbose("Could not parse client info for CCS Header: " + e); - } - } - const headers = this.createTokenRequestHeaders(ccsCredential || request.ccsCredential); - const thumbprint = { - clientId: request.tokenBodyParameters?.clientId || - this.config.authOptions.clientId, - authority: authority.canonicalAuthority, - scopes: request.scopes, - claims: request.claims, - authenticationScheme: request.authenticationScheme, - resourceRequestMethod: request.resourceRequestMethod, - resourceRequestUri: request.resourceRequestUri, - shrClaims: request.shrClaims, - sshKid: request.sshKid, - }; - return invokeAsync(this.executePostToTokenEndpoint.bind(this), PerformanceEvents.AuthorizationCodeClientExecutePostToTokenEndpoint, this.logger, this.performanceClient, request.correlationId)(endpoint, requestBody, headers, thumbprint, request.correlationId, PerformanceEvents.AuthorizationCodeClientExecutePostToTokenEndpoint); - } - /** - * Generates a map for all the params to be sent to the service - * @param request - */ - async createTokenRequestBody(request) { - this.performanceClient?.addQueueMeasurement(PerformanceEvents.AuthClientCreateTokenRequestBody, request.correlationId); - const parameterBuilder = new RequestParameterBuilder(request.correlationId, this.performanceClient); - parameterBuilder.addClientId(request.embeddedClientId || - request.tokenBodyParameters?.[CLIENT_ID] || - this.config.authOptions.clientId); - /* - * For hybrid spa flow, there will be a code but no verifier - * In this scenario, don't include redirect uri as auth code will not be bound to redirect URI - */ - if (!this.includeRedirectUri) { - // Just validate - RequestValidator.validateRedirectUri(request.redirectUri); - } - else { - // Validate and include redirect uri - parameterBuilder.addRedirectUri(request.redirectUri); - } - // Add scope array, parameter builder will add default scopes and dedupe - parameterBuilder.addScopes(request.scopes, true, this.oidcDefaultScopes); - // add code: user set, not validated - parameterBuilder.addAuthorizationCode(request.code); - // Add library metadata - parameterBuilder.addLibraryInfo(this.config.libraryInfo); - parameterBuilder.addApplicationTelemetry(this.config.telemetry.application); - parameterBuilder.addThrottling(); - if (this.serverTelemetryManager && !isOidcProtocolMode(this.config)) { - parameterBuilder.addServerTelemetry(this.serverTelemetryManager); - } - // add code_verifier if passed - if (request.codeVerifier) { - parameterBuilder.addCodeVerifier(request.codeVerifier); - } - if (this.config.clientCredentials.clientSecret) { - parameterBuilder.addClientSecret(this.config.clientCredentials.clientSecret); - } - if (this.config.clientCredentials.clientAssertion) { - const clientAssertion = this.config.clientCredentials.clientAssertion; - parameterBuilder.addClientAssertion(await getClientAssertion(clientAssertion.assertion, this.config.authOptions.clientId, request.resourceRequestUri)); - parameterBuilder.addClientAssertionType(clientAssertion.assertionType); - } - parameterBuilder.addGrantType(GrantType.AUTHORIZATION_CODE_GRANT); - parameterBuilder.addClientInfo(); - if (request.authenticationScheme === AuthenticationScheme.POP) { - const popTokenGenerator = new PopTokenGenerator(this.cryptoUtils, this.performanceClient); - let reqCnfData; - if (!request.popKid) { - const generatedReqCnfData = await invokeAsync(popTokenGenerator.generateCnf.bind(popTokenGenerator), PerformanceEvents.PopTokenGenerateCnf, this.logger, this.performanceClient, request.correlationId)(request, this.logger); - reqCnfData = generatedReqCnfData.reqCnfString; - } - else { - reqCnfData = this.cryptoUtils.encodeKid(request.popKid); - } - // SPA PoP requires full Base64Url encoded req_cnf string (unhashed) - parameterBuilder.addPopToken(reqCnfData); - } - else if (request.authenticationScheme === AuthenticationScheme.SSH) { - if (request.sshJwk) { - parameterBuilder.addSshJwk(request.sshJwk); - } - else { - throw createClientConfigurationError(missingSshJwk); - } - } - if (!StringUtils.isEmptyObj(request.claims) || - (this.config.authOptions.clientCapabilities && - this.config.authOptions.clientCapabilities.length > 0)) { - parameterBuilder.addClaims(request.claims, this.config.authOptions.clientCapabilities); - } - let ccsCred = undefined; - if (request.clientInfo) { - try { - const clientInfo = buildClientInfo(request.clientInfo, this.cryptoUtils.base64Decode); - ccsCred = { - credential: `${clientInfo.uid}${Separators.CLIENT_INFO_SEPARATOR}${clientInfo.utid}`, - type: CcsCredentialType.HOME_ACCOUNT_ID, - }; - } - catch (e) { - this.logger.verbose("Could not parse client info for CCS Header: " + e); - } - } - else { - ccsCred = request.ccsCredential; - } - // Adds these as parameters in the request instead of headers to prevent CORS preflight request - if (this.config.systemOptions.preventCorsPreflight && ccsCred) { - switch (ccsCred.type) { - case CcsCredentialType.HOME_ACCOUNT_ID: - try { - const clientInfo = buildClientInfoFromHomeAccountId(ccsCred.credential); - parameterBuilder.addCcsOid(clientInfo); - } - catch (e) { - this.logger.verbose("Could not parse home account ID for CCS Header: " + - e); - } - break; - case CcsCredentialType.UPN: - parameterBuilder.addCcsUpn(ccsCred.credential); - break; - } - } - if (request.embeddedClientId) { - parameterBuilder.addBrokerParameters({ - brokerClientId: this.config.authOptions.clientId, - brokerRedirectUri: this.config.authOptions.redirectUri, - }); - } - if (request.tokenBodyParameters) { - parameterBuilder.addExtraQueryParameters(request.tokenBodyParameters); - } - // Add hybrid spa parameters if not already provided - if (request.enableSpaAuthorizationCode && - (!request.tokenBodyParameters || - !request.tokenBodyParameters[RETURN_SPA_CODE])) { - parameterBuilder.addExtraQueryParameters({ - [RETURN_SPA_CODE]: "1", - }); - } - return parameterBuilder.createQueryString(); - } - /** - * This API validates the `AuthorizationCodeUrlRequest` and creates a URL - * @param request - */ - async createAuthCodeUrlQueryString(request) { - // generate the correlationId if not set by the user and add - const correlationId = request.correlationId || - this.config.cryptoInterface.createNewGuid(); - this.performanceClient?.addQueueMeasurement(PerformanceEvents.AuthClientCreateQueryString, correlationId); - const parameterBuilder = new RequestParameterBuilder(correlationId, this.performanceClient); - parameterBuilder.addClientId(request.embeddedClientId || - request.extraQueryParameters?.[CLIENT_ID] || - this.config.authOptions.clientId); - const requestScopes = [ - ...(request.scopes || []), - ...(request.extraScopesToConsent || []), - ]; - parameterBuilder.addScopes(requestScopes, true, this.oidcDefaultScopes); - // validate the redirectUri (to be a non null value) - parameterBuilder.addRedirectUri(request.redirectUri); - parameterBuilder.addCorrelationId(correlationId); - // add response_mode. If not passed in it defaults to query. - parameterBuilder.addResponseMode(request.responseMode); - // add response_type = code - parameterBuilder.addResponseTypeCode(); - // add library info parameters - parameterBuilder.addLibraryInfo(this.config.libraryInfo); - if (!isOidcProtocolMode(this.config)) { - parameterBuilder.addApplicationTelemetry(this.config.telemetry.application); - } - // add client_info=1 - parameterBuilder.addClientInfo(); - if (request.codeChallenge && request.codeChallengeMethod) { - parameterBuilder.addCodeChallengeParams(request.codeChallenge, request.codeChallengeMethod); - } - if (request.prompt) { - parameterBuilder.addPrompt(request.prompt); - } - if (request.domainHint) { - parameterBuilder.addDomainHint(request.domainHint); - } - // Add sid or loginHint with preference for login_hint claim (in request) -> sid -> loginHint (upn/email) -> username of AccountInfo object - if (request.prompt !== PromptValue.SELECT_ACCOUNT) { - // AAD will throw if prompt=select_account is passed with an account hint - if (request.sid && request.prompt === PromptValue.NONE) { - // SessionID is only used in silent calls - this.logger.verbose("createAuthCodeUrlQueryString: Prompt is none, adding sid from request"); - parameterBuilder.addSid(request.sid); - } - else if (request.account) { - const accountSid = this.extractAccountSid(request.account); - let accountLoginHintClaim = this.extractLoginHint(request.account); - if (accountLoginHintClaim && request.domainHint) { - this.logger.warning(`AuthorizationCodeClient.createAuthCodeUrlQueryString: "domainHint" param is set, skipping opaque "login_hint" claim. Please consider not passing domainHint`); - accountLoginHintClaim = null; - } - // If login_hint claim is present, use it over sid/username - if (accountLoginHintClaim) { - this.logger.verbose("createAuthCodeUrlQueryString: login_hint claim present on account"); - parameterBuilder.addLoginHint(accountLoginHintClaim); - try { - const clientInfo = buildClientInfoFromHomeAccountId(request.account.homeAccountId); - parameterBuilder.addCcsOid(clientInfo); - } - catch (e) { - this.logger.verbose("createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header"); - } - } - else if (accountSid && request.prompt === PromptValue.NONE) { - /* - * If account and loginHint are provided, we will check account first for sid before adding loginHint - * SessionId is only used in silent calls - */ - this.logger.verbose("createAuthCodeUrlQueryString: Prompt is none, adding sid from account"); - parameterBuilder.addSid(accountSid); - try { - const clientInfo = buildClientInfoFromHomeAccountId(request.account.homeAccountId); - parameterBuilder.addCcsOid(clientInfo); - } - catch (e) { - this.logger.verbose("createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header"); - } - } - else if (request.loginHint) { - this.logger.verbose("createAuthCodeUrlQueryString: Adding login_hint from request"); - parameterBuilder.addLoginHint(request.loginHint); - parameterBuilder.addCcsUpn(request.loginHint); - } - else if (request.account.username) { - // Fallback to account username if provided - this.logger.verbose("createAuthCodeUrlQueryString: Adding login_hint from account"); - parameterBuilder.addLoginHint(request.account.username); - try { - const clientInfo = buildClientInfoFromHomeAccountId(request.account.homeAccountId); - parameterBuilder.addCcsOid(clientInfo); - } - catch (e) { - this.logger.verbose("createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header"); - } - } - } - else if (request.loginHint) { - this.logger.verbose("createAuthCodeUrlQueryString: No account, adding login_hint from request"); - parameterBuilder.addLoginHint(request.loginHint); - parameterBuilder.addCcsUpn(request.loginHint); - } - } - else { - this.logger.verbose("createAuthCodeUrlQueryString: Prompt is select_account, ignoring account hints"); - } - if (request.nonce) { - parameterBuilder.addNonce(request.nonce); - } - if (request.state) { - parameterBuilder.addState(request.state); - } - if (request.claims || - (this.config.authOptions.clientCapabilities && - this.config.authOptions.clientCapabilities.length > 0)) { - parameterBuilder.addClaims(request.claims, this.config.authOptions.clientCapabilities); - } - if (request.embeddedClientId) { - parameterBuilder.addBrokerParameters({ - brokerClientId: this.config.authOptions.clientId, - brokerRedirectUri: this.config.authOptions.redirectUri, - }); - } - this.addExtraQueryParams(request, parameterBuilder); - if (request.nativeBroker) { - // signal ests that this is a WAM call - parameterBuilder.addNativeBroker(); - // pass the req_cnf for POP - if (request.authenticationScheme === AuthenticationScheme.POP) { - const popTokenGenerator = new PopTokenGenerator(this.cryptoUtils); - // req_cnf is always sent as a string for SPAs - let reqCnfData; - if (!request.popKid) { - const generatedReqCnfData = await invokeAsync(popTokenGenerator.generateCnf.bind(popTokenGenerator), PerformanceEvents.PopTokenGenerateCnf, this.logger, this.performanceClient, request.correlationId)(request, this.logger); - reqCnfData = generatedReqCnfData.reqCnfString; - } - else { - reqCnfData = this.cryptoUtils.encodeKid(request.popKid); - } - parameterBuilder.addPopToken(reqCnfData); - } - } - return parameterBuilder.createQueryString(); - } - /** - * This API validates the `EndSessionRequest` and creates a URL - * @param request - */ - createLogoutUrlQueryString(request) { - const parameterBuilder = new RequestParameterBuilder(request.correlationId, this.performanceClient); - if (request.postLogoutRedirectUri) { - parameterBuilder.addPostLogoutRedirectUri(request.postLogoutRedirectUri); - } - if (request.correlationId) { - parameterBuilder.addCorrelationId(request.correlationId); - } - if (request.idTokenHint) { - parameterBuilder.addIdTokenHint(request.idTokenHint); - } - if (request.state) { - parameterBuilder.addState(request.state); - } - if (request.logoutHint) { - parameterBuilder.addLogoutHint(request.logoutHint); - } - this.addExtraQueryParams(request, parameterBuilder); - return parameterBuilder.createQueryString(); - } - addExtraQueryParams(request, parameterBuilder) { - const hasRequestInstanceAware = request.extraQueryParameters && - request.extraQueryParameters.hasOwnProperty("instance_aware"); - // Set instance_aware flag if config auth param is set - if (!hasRequestInstanceAware && this.config.authOptions.instanceAware) { - request.extraQueryParameters = request.extraQueryParameters || {}; - request.extraQueryParameters["instance_aware"] = "true"; - } - if (request.extraQueryParameters) { - parameterBuilder.addExtraQueryParameters(request.extraQueryParameters); - } - } - /** - * Helper to get sid from account. Returns null if idTokenClaims are not present or sid is not present. - * @param account - */ - extractAccountSid(account) { - return account.idTokenClaims?.sid || null; - } - extractLoginHint(account) { - return account.idTokenClaims?.login_hint || null; - } -} - -export { AuthorizationCodeClient }; -//# sourceMappingURL=AuthorizationCodeClient.mjs.map diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/client/AuthorizationCodeClient.mjs.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/client/AuthorizationCodeClient.mjs.map deleted file mode 100644 index e921e60..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/client/AuthorizationCodeClient.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AuthorizationCodeClient.mjs","sources":["../../src/client/AuthorizationCodeClient.ts"],"sourcesContent":[null],"names":["ClientAuthErrorCodes.requestCannotBeMade","TimeUtils.nowSeconds","ClientAuthErrorCodes.authorizationCodeMissingFromServerResponse","ClientConfigurationErrorCodes.logoutRequestEmpty","AADServerParamKeys.CLIENT_ID","ClientConfigurationErrorCodes.missingSshJwk","AADServerParamKeys.RETURN_SPA_CODE"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;;;AAGG;AAoDH;;;AAGG;AACG,MAAO,uBAAwB,SAAQ,UAAU,CAAA;IAK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AAmB,CAAC,OAAO,EAAE,gBAAgB,CAAC,CAAC;AAEpD,QAAA,OAAO,gBAAgB,CAAC,iBAAiB,EAAE,CAAC;KAC/C;IAEO,mBAAmB,CACvB,OAAgE,EAChE,gBAAyC,EAAA;AAEzC,QAAA,MAAM,uBAAuB,GACzB,OAAO,CAAC,oBAAoB;AAC5B,YAAA,OAAO,CAAC,oBAAoB,CAAC,cAAc,CAAC,gBAAgB,CAAC,CAAC;;QAGlE,IAAI,CAAC,uBAAuB,IAAI,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,aAAa,EAAE;YACnE,OAAO,CAAC,oBAAoB,GAAG,OAAO,CAAC,oBAAoB,IAAI,EAAE,CAAC;AAClE,YAAA,OAAO,CAAC,oBAAoB,CAAC,gBAAgB,CAAC,GAAG,MAAM,CAAC;AAC3D,SAAA;QAED,IAAI,OAAO,CAAC,oBAAoB,EAAE;AAC9B,YAAA,gBAAgB,CAAC,uBAAuB,CACpC,OAAO,CAAC,oBAAoB,CAC/B,CAAC;AACL,SAAA;KACJ;AAED;;;AAGG;AACK,IAAA,iBAAiB,CAAC,OAAoB,EAAA;AAC1C,QAAA,OAAO,OAAO,CAAC,aAAa,EAAE,GAAG,IAAI,IAAI,CAAC;KAC7C;AAEO,IAAA,gBAAgB,CAAC,OAAoB,EAAA;AACzC,QAAA,OAAO,OAAO,CAAC,aAAa,EAAE,UAAU,IAAI,IAAI,CAAC;KACpD;AACJ;;;;"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/client/BaseClient.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/client/BaseClient.d.ts deleted file mode 100644 index d342958..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/client/BaseClient.d.ts +++ /dev/null @@ -1,59 +0,0 @@ -import { ClientConfiguration, CommonClientConfiguration } from "../config/ClientConfiguration.js"; -import { INetworkModule, NetworkRequestOptions } from "../network/INetworkModule.js"; -import { NetworkResponse } from "../network/NetworkResponse.js"; -import { ICrypto } from "../crypto/ICrypto.js"; -import { Authority } from "../authority/Authority.js"; -import { Logger } from "../logger/Logger.js"; -import { ServerAuthorizationTokenResponse } from "../response/ServerAuthorizationTokenResponse.js"; -import { CacheManager } from "../cache/CacheManager.js"; -import { ServerTelemetryManager } from "../telemetry/server/ServerTelemetryManager.js"; -import { RequestThumbprint } from "../network/RequestThumbprint.js"; -import { CcsCredential } from "../account/CcsCredential.js"; -import { IPerformanceClient } from "../telemetry/performance/IPerformanceClient.js"; -import { BaseAuthRequest } from "../request/BaseAuthRequest.js"; -/** - * Base application class which will construct requests to send to and handle responses from the Microsoft STS using the authorization code flow. - * @internal - */ -export declare abstract class BaseClient { - logger: Logger; - protected config: CommonClientConfiguration; - protected cryptoUtils: ICrypto; - protected cacheManager: CacheManager; - protected networkClient: INetworkModule; - protected serverTelemetryManager: ServerTelemetryManager | null; - authority: Authority; - protected performanceClient?: IPerformanceClient; - protected constructor(configuration: ClientConfiguration, performanceClient?: IPerformanceClient); - /** - * Creates default headers for requests to token endpoint - */ - protected createTokenRequestHeaders(ccsCred?: CcsCredential): Record; - /** - * Http post to token endpoint - * @param tokenEndpoint - * @param queryString - * @param headers - * @param thumbprint - */ - protected executePostToTokenEndpoint(tokenEndpoint: string, queryString: string, headers: Record, thumbprint: RequestThumbprint, correlationId: string, queuedEvent?: string): Promise>; - /** - * Wraps sendPostRequestAsync with necessary preflight and postflight logic - * @param thumbprint - Request thumbprint for throttling - * @param tokenEndpoint - Endpoint to make the POST to - * @param options - Body and Headers to include on the POST request - * @param correlationId - CorrelationId for telemetry - */ - sendPostRequest(thumbprint: RequestThumbprint, tokenEndpoint: string, options: NetworkRequestOptions, correlationId: string): Promise>; - /** - * Updates the authority object of the client. Endpoint discovery must be completed. - * @param updatedAuthority - */ - updateAuthority(cloudInstanceHostname: string, correlationId: string): Promise; - /** - * Creates query string for the /token request - * @param request - */ - createTokenQueryParameters(request: BaseAuthRequest): string; -} -//# sourceMappingURL=BaseClient.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/client/BaseClient.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/client/BaseClient.d.ts.map deleted file mode 100644 index 4e452d4..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/client/BaseClient.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"BaseClient.d.ts","sourceRoot":"","sources":["../../src/client/BaseClient.ts"],"names":[],"mappings":"AAKA,OAAO,EACH,mBAAmB,EAEnB,yBAAyB,EAC5B,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EACH,cAAc,EACd,qBAAqB,EACxB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAE7C,OAAO,EAAE,gCAAgC,EAAE,MAAM,iDAAiD,CAAC;AACnG,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,sBAAsB,EAAE,MAAM,+CAA+C,CAAC;AACvF,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AAEpE,OAAO,EAAE,aAAa,EAAqB,MAAM,6BAA6B,CAAC;AAE/E,OAAO,EAAE,kBAAkB,EAAE,MAAM,gDAAgD,CAAC;AAEpF,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAYhE;;;GAGG;AACH,8BAAsB,UAAU;IAErB,MAAM,EAAE,MAAM,CAAC;IAGtB,SAAS,CAAC,MAAM,EAAE,yBAAyB,CAAC;IAG5C,SAAS,CAAC,WAAW,EAAE,OAAO,CAAC;IAG/B,SAAS,CAAC,YAAY,EAAE,YAAY,CAAC;IAGrC,SAAS,CAAC,aAAa,EAAE,cAAc,CAAC;IAGxC,SAAS,CAAC,sBAAsB,EAAE,sBAAsB,GAAG,IAAI,CAAC;IAGzD,SAAS,EAAE,SAAS,CAAC;IAG5B,SAAS,CAAC,iBAAiB,CAAC,EAAE,kBAAkB,CAAC;IAEjD,SAAS,aACL,aAAa,EAAE,mBAAmB,EAClC,iBAAiB,CAAC,EAAE,kBAAkB;IA2B1C;;OAEG;IACH,SAAS,CAAC,yBAAyB,CAC/B,OAAO,CAAC,EAAE,aAAa,GACxB,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;IA8BzB;;;;;;OAMG;cACa,0BAA0B,CACtC,aAAa,EAAE,MAAM,EACrB,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC/B,UAAU,EAAE,iBAAiB,EAC7B,aAAa,EAAE,MAAM,EACrB,WAAW,CAAC,EAAE,MAAM,GACrB,OAAO,CAAC,eAAe,CAAC,gCAAgC,CAAC,CAAC;IA4B7D;;;;;;OAMG;IACG,eAAe,CAAC,CAAC,SAAS,gCAAgC,EAC5D,UAAU,EAAE,iBAAiB,EAC7B,aAAa,EAAE,MAAM,EACrB,OAAO,EAAE,qBAAqB,EAC9B,aAAa,EAAE,MAAM,GACtB,OAAO,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC;IAwE9B;;;OAGG;IACG,eAAe,CACjB,qBAAqB,EAAE,MAAM,EAC7B,aAAa,EAAE,MAAM,GACtB,OAAO,CAAC,IAAI,CAAC;IAkBhB;;;OAGG;IACH,0BAA0B,CAAC,OAAO,EAAE,eAAe,GAAG,MAAM;CAuB/D"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/client/BaseClient.mjs b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/client/BaseClient.mjs deleted file mode 100644 index 8c246b4..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/client/BaseClient.mjs +++ /dev/null @@ -1,168 +0,0 @@ -/*! @azure/msal-common v14.16.1 2025-08-05 */ -'use strict'; -import { buildClientConfiguration } from '../config/ClientConfiguration.mjs'; -import { Logger } from '../logger/Logger.mjs'; -import { HeaderNames, Constants } from '../utils/Constants.mjs'; -import { name, version } from '../packageMetadata.mjs'; -import { CcsCredentialType } from '../account/CcsCredential.mjs'; -import { buildClientInfoFromHomeAccountId } from '../account/ClientInfo.mjs'; -import { RequestParameterBuilder } from '../request/RequestParameterBuilder.mjs'; -import { createDiscoveredInstance } from '../authority/AuthorityFactory.mjs'; -import { PerformanceEvents } from '../telemetry/performance/PerformanceEvent.mjs'; -import { ThrottlingUtils } from '../network/ThrottlingUtils.mjs'; -import { AuthError } from '../error/AuthError.mjs'; -import { createClientAuthError } from '../error/ClientAuthError.mjs'; -import { NetworkError } from '../error/NetworkError.mjs'; -import { invokeAsync } from '../utils/FunctionWrappers.mjs'; -import { networkError } from '../error/ClientAuthErrorCodes.mjs'; - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * Base application class which will construct requests to send to and handle responses from the Microsoft STS using the authorization code flow. - * @internal - */ -class BaseClient { - constructor(configuration, performanceClient) { - // Set the configuration - this.config = buildClientConfiguration(configuration); - // Initialize the logger - this.logger = new Logger(this.config.loggerOptions, name, version); - // Initialize crypto - this.cryptoUtils = this.config.cryptoInterface; - // Initialize storage interface - this.cacheManager = this.config.storageInterface; - // Set the network interface - this.networkClient = this.config.networkInterface; - // Set TelemetryManager - this.serverTelemetryManager = this.config.serverTelemetryManager; - // set Authority - this.authority = this.config.authOptions.authority; - // set performance telemetry client - this.performanceClient = performanceClient; - } - /** - * Creates default headers for requests to token endpoint - */ - createTokenRequestHeaders(ccsCred) { - const headers = {}; - headers[HeaderNames.CONTENT_TYPE] = Constants.URL_FORM_CONTENT_TYPE; - if (!this.config.systemOptions.preventCorsPreflight && ccsCred) { - switch (ccsCred.type) { - case CcsCredentialType.HOME_ACCOUNT_ID: - try { - const clientInfo = buildClientInfoFromHomeAccountId(ccsCred.credential); - headers[HeaderNames.CCS_HEADER] = `Oid:${clientInfo.uid}@${clientInfo.utid}`; - } - catch (e) { - this.logger.verbose("Could not parse home account ID for CCS Header: " + - e); - } - break; - case CcsCredentialType.UPN: - headers[HeaderNames.CCS_HEADER] = `UPN: ${ccsCred.credential}`; - break; - } - } - return headers; - } - /** - * Http post to token endpoint - * @param tokenEndpoint - * @param queryString - * @param headers - * @param thumbprint - */ - async executePostToTokenEndpoint(tokenEndpoint, queryString, headers, thumbprint, correlationId, queuedEvent) { - if (queuedEvent) { - this.performanceClient?.addQueueMeasurement(queuedEvent, correlationId); - } - const response = await this.sendPostRequest(thumbprint, tokenEndpoint, { body: queryString, headers: headers }, correlationId); - if (this.config.serverTelemetryManager && - response.status < 500 && - response.status !== 429) { - // Telemetry data successfully logged by server, clear Telemetry cache - this.config.serverTelemetryManager.clearTelemetryCache(); - } - return response; - } - /** - * Wraps sendPostRequestAsync with necessary preflight and postflight logic - * @param thumbprint - Request thumbprint for throttling - * @param tokenEndpoint - Endpoint to make the POST to - * @param options - Body and Headers to include on the POST request - * @param correlationId - CorrelationId for telemetry - */ - async sendPostRequest(thumbprint, tokenEndpoint, options, correlationId) { - ThrottlingUtils.preProcess(this.cacheManager, thumbprint, correlationId); - let response; - try { - response = await invokeAsync((this.networkClient.sendPostRequestAsync.bind(this.networkClient)), PerformanceEvents.NetworkClientSendPostRequestAsync, this.logger, this.performanceClient, correlationId)(tokenEndpoint, options); - const responseHeaders = response.headers || {}; - this.performanceClient?.addFields({ - refreshTokenSize: response.body.refresh_token?.length || 0, - httpVerToken: responseHeaders[HeaderNames.X_MS_HTTP_VERSION] || "", - requestId: responseHeaders[HeaderNames.X_MS_REQUEST_ID] || "", - }, correlationId); - } - catch (e) { - if (e instanceof NetworkError) { - const responseHeaders = e.responseHeaders; - if (responseHeaders) { - this.performanceClient?.addFields({ - httpVerToken: responseHeaders[HeaderNames.X_MS_HTTP_VERSION] || "", - requestId: responseHeaders[HeaderNames.X_MS_REQUEST_ID] || - "", - contentTypeHeader: responseHeaders[HeaderNames.CONTENT_TYPE] || - undefined, - contentLengthHeader: responseHeaders[HeaderNames.CONTENT_LENGTH] || - undefined, - httpStatus: e.httpStatus, - }, correlationId); - } - throw e.error; - } - if (e instanceof AuthError) { - throw e; - } - else { - throw createClientAuthError(networkError); - } - } - ThrottlingUtils.postProcess(this.cacheManager, thumbprint, response, correlationId); - return response; - } - /** - * Updates the authority object of the client. Endpoint discovery must be completed. - * @param updatedAuthority - */ - async updateAuthority(cloudInstanceHostname, correlationId) { - this.performanceClient?.addQueueMeasurement(PerformanceEvents.UpdateTokenEndpointAuthority, correlationId); - const cloudInstanceAuthorityUri = `https://${cloudInstanceHostname}/${this.authority.tenant}/`; - const cloudInstanceAuthority = await createDiscoveredInstance(cloudInstanceAuthorityUri, this.networkClient, this.cacheManager, this.authority.options, this.logger, correlationId, this.performanceClient); - this.authority = cloudInstanceAuthority; - } - /** - * Creates query string for the /token request - * @param request - */ - createTokenQueryParameters(request) { - const parameterBuilder = new RequestParameterBuilder(request.correlationId, this.performanceClient); - if (request.embeddedClientId) { - parameterBuilder.addBrokerParameters({ - brokerClientId: this.config.authOptions.clientId, - brokerRedirectUri: this.config.authOptions.redirectUri, - }); - } - if (request.tokenQueryParameters) { - parameterBuilder.addExtraQueryParameters(request.tokenQueryParameters); - } - parameterBuilder.addCorrelationId(request.correlationId); - return parameterBuilder.createQueryString(); - } -} - -export { BaseClient }; -//# sourceMappingURL=BaseClient.mjs.map diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/client/BaseClient.mjs.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/client/BaseClient.mjs.map deleted file mode 100644 index 5b6caed..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/client/BaseClient.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"BaseClient.mjs","sources":["../../src/client/BaseClient.ts"],"sourcesContent":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,CAAC,MAAM,CAAC,WAAW,CAAC,QAAQ;AAChD,gBAAA,iBAAiB,EAAE,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,WAAW;AACzD,aAAA,CAAC,CAAC;AACN,SAAA;QAED,IAAI,OAAO,CAAC,oBAAoB,EAAE;AAC9B,YAAA,gBAAgB,CAAC,uBAAuB,CACpC,OAAO,CAAC,oBAAoB,CAC/B,CAAC;AACL,SAAA;AAED,QAAA,gBAAgB,CAAC,gBAAgB,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;AAEzD,QAAA,OAAO,gBAAgB,CAAC,iBAAiB,EAAE,CAAC;KAC/C;AACJ;;;;"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/client/RefreshTokenClient.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/client/RefreshTokenClient.d.ts deleted file mode 100644 index bb612fe..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/client/RefreshTokenClient.d.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { ClientConfiguration } from "../config/ClientConfiguration.js"; -import { BaseClient } from "./BaseClient.js"; -import { CommonRefreshTokenRequest } from "../request/CommonRefreshTokenRequest.js"; -import { AuthenticationResult } from "../response/AuthenticationResult.js"; -import { CommonSilentFlowRequest } from "../request/CommonSilentFlowRequest.js"; -import { IPerformanceClient } from "../telemetry/performance/IPerformanceClient.js"; -/** - * OAuth2.0 refresh token client - * @internal - */ -export declare class RefreshTokenClient extends BaseClient { - constructor(configuration: ClientConfiguration, performanceClient?: IPerformanceClient); - acquireToken(request: CommonRefreshTokenRequest): Promise; - /** - * Gets cached refresh token and attaches to request, then calls acquireToken API - * @param request - */ - acquireTokenByRefreshToken(request: CommonSilentFlowRequest): Promise; - /** - * makes a network call to acquire tokens by exchanging RefreshToken available in userCache; throws if refresh token is not cached - * @param request - */ - private acquireTokenWithCachedRefreshToken; - /** - * Constructs the network message and makes a NW call to the underlying secure token service - * @param request - * @param authority - */ - private executeTokenRequest; - /** - * Helper function to create the token request body - * @param request - */ - private createTokenRequestBody; -} -//# sourceMappingURL=RefreshTokenClient.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/client/RefreshTokenClient.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/client/RefreshTokenClient.d.ts.map deleted file mode 100644 index 6554e18..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/client/RefreshTokenClient.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"RefreshTokenClient.d.ts","sourceRoot":"","sources":["../../src/client/RefreshTokenClient.ts"],"names":[],"mappings":"AAKA,OAAO,EACH,mBAAmB,EAEtB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,yBAAyB,EAAE,MAAM,yCAAyC,CAAC;AAYpF,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAK3E,OAAO,EAAE,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AAoBhF,OAAO,EAAE,kBAAkB,EAAE,MAAM,gDAAgD,CAAC;AAQpF;;;GAGG;AACH,qBAAa,kBAAmB,SAAQ,UAAU;gBAE1C,aAAa,EAAE,mBAAmB,EAClC,iBAAiB,CAAC,EAAE,kBAAkB;IAI7B,YAAY,CACrB,OAAO,EAAE,yBAAyB,GACnC,OAAO,CAAC,oBAAoB,CAAC;IA8ChC;;;OAGG;IACU,0BAA0B,CACnC,OAAO,EAAE,uBAAuB,GACjC,OAAO,CAAC,oBAAoB,CAAC;IAsEhC;;;OAGG;YACW,kCAAkC;IAmFhD;;;;OAIG;YACW,mBAAmB;IAuDjC;;;OAGG;YACW,sBAAsB;CAyJvC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/client/RefreshTokenClient.mjs b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/client/RefreshTokenClient.mjs deleted file mode 100644 index 760c5d4..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/client/RefreshTokenClient.mjs +++ /dev/null @@ -1,246 +0,0 @@ -/*! @azure/msal-common v14.16.1 2025-08-05 */ -'use strict'; -import { isOidcProtocolMode } from '../config/ClientConfiguration.mjs'; -import { BaseClient } from './BaseClient.mjs'; -import { RequestParameterBuilder } from '../request/RequestParameterBuilder.mjs'; -import { GrantType, AuthenticationScheme, HeaderNames, Errors } from '../utils/Constants.mjs'; -import { CLIENT_ID } from '../constants/AADServerParamKeys.mjs'; -import { ResponseHandler } from '../response/ResponseHandler.mjs'; -import { PopTokenGenerator } from '../crypto/PopTokenGenerator.mjs'; -import { StringUtils } from '../utils/StringUtils.mjs'; -import { createClientConfigurationError } from '../error/ClientConfigurationError.mjs'; -import { createClientAuthError } from '../error/ClientAuthError.mjs'; -import { ServerError } from '../error/ServerError.mjs'; -import { nowSeconds, isTokenExpired } from '../utils/TimeUtils.mjs'; -import { UrlString } from '../url/UrlString.mjs'; -import { CcsCredentialType } from '../account/CcsCredential.mjs'; -import { buildClientInfoFromHomeAccountId } from '../account/ClientInfo.mjs'; -import { createInteractionRequiredAuthError, InteractionRequiredAuthError } from '../error/InteractionRequiredAuthError.mjs'; -import { PerformanceEvents } from '../telemetry/performance/PerformanceEvent.mjs'; -import { invokeAsync, invoke } from '../utils/FunctionWrappers.mjs'; -import { generateCredentialKey } from '../cache/utils/CacheHelpers.mjs'; -import { getClientAssertion } from '../utils/ClientAssertionUtils.mjs'; -import { tokenRequestEmpty, missingSshJwk } from '../error/ClientConfigurationErrorCodes.mjs'; -import { noAccountInSilentRequest } from '../error/ClientAuthErrorCodes.mjs'; -import { noTokensFound, refreshTokenExpired, badToken } from '../error/InteractionRequiredAuthErrorCodes.mjs'; - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -const DEFAULT_REFRESH_TOKEN_EXPIRATION_OFFSET_SECONDS = 300; // 5 Minutes -/** - * OAuth2.0 refresh token client - * @internal - */ -class RefreshTokenClient extends BaseClient { - constructor(configuration, performanceClient) { - super(configuration, performanceClient); - } - async acquireToken(request) { - this.performanceClient?.addQueueMeasurement(PerformanceEvents.RefreshTokenClientAcquireToken, request.correlationId); - const reqTimestamp = nowSeconds(); - const response = await invokeAsync(this.executeTokenRequest.bind(this), PerformanceEvents.RefreshTokenClientExecuteTokenRequest, this.logger, this.performanceClient, request.correlationId)(request, this.authority); - // Retrieve requestId from response headers - const requestId = response.headers?.[HeaderNames.X_MS_REQUEST_ID]; - const responseHandler = new ResponseHandler(this.config.authOptions.clientId, this.cacheManager, this.cryptoUtils, this.logger, this.config.serializableCache, this.config.persistencePlugin); - responseHandler.validateTokenResponse(response.body); - return invokeAsync(responseHandler.handleServerTokenResponse.bind(responseHandler), PerformanceEvents.HandleServerTokenResponse, this.logger, this.performanceClient, request.correlationId)(response.body, this.authority, reqTimestamp, request, undefined, undefined, true, request.forceCache, requestId); - } - /** - * Gets cached refresh token and attaches to request, then calls acquireToken API - * @param request - */ - async acquireTokenByRefreshToken(request) { - // Cannot renew token if no request object is given. - if (!request) { - throw createClientConfigurationError(tokenRequestEmpty); - } - this.performanceClient?.addQueueMeasurement(PerformanceEvents.RefreshTokenClientAcquireTokenByRefreshToken, request.correlationId); - // We currently do not support silent flow for account === null use cases; This will be revisited for confidential flow usecases - if (!request.account) { - throw createClientAuthError(noAccountInSilentRequest); - } - // try checking if FOCI is enabled for the given application - const isFOCI = this.cacheManager.isAppMetadataFOCI(request.account.environment); - // if the app is part of the family, retrive a Family refresh token if present and make a refreshTokenRequest - if (isFOCI) { - try { - return await invokeAsync(this.acquireTokenWithCachedRefreshToken.bind(this), PerformanceEvents.RefreshTokenClientAcquireTokenWithCachedRefreshToken, this.logger, this.performanceClient, request.correlationId)(request, true); - } - catch (e) { - const noFamilyRTInCache = e instanceof InteractionRequiredAuthError && - e.errorCode === - noTokensFound; - const clientMismatchErrorWithFamilyRT = e instanceof ServerError && - e.errorCode === Errors.INVALID_GRANT_ERROR && - e.subError === Errors.CLIENT_MISMATCH_ERROR; - // if family Refresh Token (FRT) cache acquisition fails or if client_mismatch error is seen with FRT, reattempt with application Refresh Token (ART) - if (noFamilyRTInCache || clientMismatchErrorWithFamilyRT) { - return invokeAsync(this.acquireTokenWithCachedRefreshToken.bind(this), PerformanceEvents.RefreshTokenClientAcquireTokenWithCachedRefreshToken, this.logger, this.performanceClient, request.correlationId)(request, false); - // throw in all other cases - } - else { - throw e; - } - } - } - // fall back to application refresh token acquisition - return invokeAsync(this.acquireTokenWithCachedRefreshToken.bind(this), PerformanceEvents.RefreshTokenClientAcquireTokenWithCachedRefreshToken, this.logger, this.performanceClient, request.correlationId)(request, false); - } - /** - * makes a network call to acquire tokens by exchanging RefreshToken available in userCache; throws if refresh token is not cached - * @param request - */ - async acquireTokenWithCachedRefreshToken(request, foci) { - this.performanceClient?.addQueueMeasurement(PerformanceEvents.RefreshTokenClientAcquireTokenWithCachedRefreshToken, request.correlationId); - // fetches family RT or application RT based on FOCI value - const refreshToken = invoke(this.cacheManager.getRefreshToken.bind(this.cacheManager), PerformanceEvents.CacheManagerGetRefreshToken, this.logger, this.performanceClient, request.correlationId)(request.account, foci, request.correlationId, undefined, this.performanceClient); - if (!refreshToken) { - throw createInteractionRequiredAuthError(noTokensFound); - } - if (refreshToken.expiresOn && - isTokenExpired(refreshToken.expiresOn, request.refreshTokenExpirationOffsetSeconds || - DEFAULT_REFRESH_TOKEN_EXPIRATION_OFFSET_SECONDS)) { - throw createInteractionRequiredAuthError(refreshTokenExpired); - } - // attach cached RT size to the current measurement - const refreshTokenRequest = { - ...request, - refreshToken: refreshToken.secret, - authenticationScheme: request.authenticationScheme || AuthenticationScheme.BEARER, - ccsCredential: { - credential: request.account.homeAccountId, - type: CcsCredentialType.HOME_ACCOUNT_ID, - }, - }; - try { - return await invokeAsync(this.acquireToken.bind(this), PerformanceEvents.RefreshTokenClientAcquireToken, this.logger, this.performanceClient, request.correlationId)(refreshTokenRequest); - } - catch (e) { - if (e instanceof InteractionRequiredAuthError && - e.subError === badToken) { - // Remove bad refresh token from cache - this.logger.verbose("acquireTokenWithRefreshToken: bad refresh token, removing from cache"); - const badRefreshTokenKey = generateCredentialKey(refreshToken); - this.cacheManager.removeRefreshToken(badRefreshTokenKey, request.correlationId); - } - throw e; - } - } - /** - * Constructs the network message and makes a NW call to the underlying secure token service - * @param request - * @param authority - */ - async executeTokenRequest(request, authority) { - this.performanceClient?.addQueueMeasurement(PerformanceEvents.RefreshTokenClientExecuteTokenRequest, request.correlationId); - const queryParametersString = this.createTokenQueryParameters(request); - const endpoint = UrlString.appendQueryString(authority.tokenEndpoint, queryParametersString); - const requestBody = await invokeAsync(this.createTokenRequestBody.bind(this), PerformanceEvents.RefreshTokenClientCreateTokenRequestBody, this.logger, this.performanceClient, request.correlationId)(request); - const headers = this.createTokenRequestHeaders(request.ccsCredential); - const thumbprint = { - clientId: request.tokenBodyParameters?.clientId || - this.config.authOptions.clientId, - authority: authority.canonicalAuthority, - scopes: request.scopes, - claims: request.claims, - authenticationScheme: request.authenticationScheme, - resourceRequestMethod: request.resourceRequestMethod, - resourceRequestUri: request.resourceRequestUri, - shrClaims: request.shrClaims, - sshKid: request.sshKid, - }; - return invokeAsync(this.executePostToTokenEndpoint.bind(this), PerformanceEvents.RefreshTokenClientExecutePostToTokenEndpoint, this.logger, this.performanceClient, request.correlationId)(endpoint, requestBody, headers, thumbprint, request.correlationId, PerformanceEvents.RefreshTokenClientExecutePostToTokenEndpoint); - } - /** - * Helper function to create the token request body - * @param request - */ - async createTokenRequestBody(request) { - this.performanceClient?.addQueueMeasurement(PerformanceEvents.RefreshTokenClientCreateTokenRequestBody, request.correlationId); - const correlationId = request.correlationId; - const parameterBuilder = new RequestParameterBuilder(correlationId, this.performanceClient); - parameterBuilder.addClientId(request.embeddedClientId || - request.tokenBodyParameters?.[CLIENT_ID] || - this.config.authOptions.clientId); - if (request.redirectUri) { - parameterBuilder.addRedirectUri(request.redirectUri); - } - parameterBuilder.addScopes(request.scopes, true, this.config.authOptions.authority.options.OIDCOptions?.defaultScopes); - parameterBuilder.addGrantType(GrantType.REFRESH_TOKEN_GRANT); - parameterBuilder.addClientInfo(); - parameterBuilder.addLibraryInfo(this.config.libraryInfo); - parameterBuilder.addApplicationTelemetry(this.config.telemetry.application); - parameterBuilder.addThrottling(); - if (this.serverTelemetryManager && !isOidcProtocolMode(this.config)) { - parameterBuilder.addServerTelemetry(this.serverTelemetryManager); - } - parameterBuilder.addRefreshToken(request.refreshToken); - if (this.config.clientCredentials.clientSecret) { - parameterBuilder.addClientSecret(this.config.clientCredentials.clientSecret); - } - if (this.config.clientCredentials.clientAssertion) { - const clientAssertion = this.config.clientCredentials.clientAssertion; - parameterBuilder.addClientAssertion(await getClientAssertion(clientAssertion.assertion, this.config.authOptions.clientId, request.resourceRequestUri)); - parameterBuilder.addClientAssertionType(clientAssertion.assertionType); - } - if (request.authenticationScheme === AuthenticationScheme.POP) { - const popTokenGenerator = new PopTokenGenerator(this.cryptoUtils, this.performanceClient); - let reqCnfData; - if (!request.popKid) { - const generatedReqCnfData = await invokeAsync(popTokenGenerator.generateCnf.bind(popTokenGenerator), PerformanceEvents.PopTokenGenerateCnf, this.logger, this.performanceClient, request.correlationId)(request, this.logger); - reqCnfData = generatedReqCnfData.reqCnfString; - } - else { - reqCnfData = this.cryptoUtils.encodeKid(request.popKid); - } - // SPA PoP requires full Base64Url encoded req_cnf string (unhashed) - parameterBuilder.addPopToken(reqCnfData); - } - else if (request.authenticationScheme === AuthenticationScheme.SSH) { - if (request.sshJwk) { - parameterBuilder.addSshJwk(request.sshJwk); - } - else { - throw createClientConfigurationError(missingSshJwk); - } - } - if (!StringUtils.isEmptyObj(request.claims) || - (this.config.authOptions.clientCapabilities && - this.config.authOptions.clientCapabilities.length > 0)) { - parameterBuilder.addClaims(request.claims, this.config.authOptions.clientCapabilities); - } - if (this.config.systemOptions.preventCorsPreflight && - request.ccsCredential) { - switch (request.ccsCredential.type) { - case CcsCredentialType.HOME_ACCOUNT_ID: - try { - const clientInfo = buildClientInfoFromHomeAccountId(request.ccsCredential.credential); - parameterBuilder.addCcsOid(clientInfo); - } - catch (e) { - this.logger.verbose("Could not parse home account ID for CCS Header: " + - e); - } - break; - case CcsCredentialType.UPN: - parameterBuilder.addCcsUpn(request.ccsCredential.credential); - break; - } - } - if (request.embeddedClientId) { - parameterBuilder.addBrokerParameters({ - brokerClientId: this.config.authOptions.clientId, - brokerRedirectUri: this.config.authOptions.redirectUri, - }); - } - if (request.tokenBodyParameters) { - parameterBuilder.addExtraQueryParameters(request.tokenBodyParameters); - } - return parameterBuilder.createQueryString(); - } -} - -export { RefreshTokenClient }; -//# sourceMappingURL=RefreshTokenClient.mjs.map diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/client/RefreshTokenClient.mjs.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/client/RefreshTokenClient.mjs.map deleted file mode 100644 index 94528f1..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/client/RefreshTokenClient.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"RefreshTokenClient.mjs","sources":["../../src/client/RefreshTokenClient.ts"],"sourcesContent":[null],"names":["TimeUtils.nowSeconds","ClientConfigurationErrorCodes.tokenRequestEmpty","ClientAuthErrorCodes.noAccountInSilentRequest","InteractionRequiredAuthErrorCodes.noTokensFound","TimeUtils.isTokenExpired","InteractionRequiredAuthErrorCodes.refreshTokenExpired","InteractionRequiredAuthErrorCodes.badToken","AADServerParamKeys.CLIENT_ID","ClientConfigurationErrorCodes.missingSshJwk"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;AAGG;AAkDH,MAAM,+CAA+C,GAAG,GAAG,CAAC;AAE5D;;;AAGG;AACG,MAAO,kBAAmB,SAAQ,UAAU,CAAA;IAC9C,WACI,CAAA,aAAkC,EAClC,iBAAsC,EAAA;AAEtC,QAAA,KAA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gBACV,KAAK,iBAAiB,CAAC,GAAG;oBACtB,gBAAgB,CAAC,SAAS,CACtB,OAAO,CAAC,aAAa,CAAC,UAAU,CACnC,CAAC;oBACF,MAAM;AACb,aAAA;AACJ,SAAA;QAED,IAAI,OAAO,CAAC,gBAAgB,EAAE;YAC1B,gBAAgB,CAAC,mBAAmB,CAAC;AACjC,gBAAA,cAAc,EAAE,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,QAAQ;AAChD,gBAAA,iBAAiB,EAAE,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,WAAW;AACzD,aAAA,CAAC,CAAC;AACN,SAAA;QAED,IAAI,OAAO,CAAC,mBAAmB,EAAE;AAC7B,YAAA,gBAAgB,CAAC,uBAAuB,CACpC,OAAO,CAAC,mBAAmB,CAC9B,CAAC;AACL,SAAA;AAED,QAAA,OAAO,gBAAgB,CAAC,iBAAiB,EAAE,CAAC;KAC/C;AACJ;;;;"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/client/SilentFlowClient.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/client/SilentFlowClient.d.ts deleted file mode 100644 index a4e960a..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/client/SilentFlowClient.d.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { BaseClient } from "./BaseClient.js"; -import { ClientConfiguration } from "../config/ClientConfiguration.js"; -import { CommonSilentFlowRequest } from "../request/CommonSilentFlowRequest.js"; -import { AuthenticationResult } from "../response/AuthenticationResult.js"; -import { CacheOutcome } from "../utils/Constants.js"; -import { IPerformanceClient } from "../telemetry/performance/IPerformanceClient.js"; -/** @internal */ -export declare class SilentFlowClient extends BaseClient { - constructor(configuration: ClientConfiguration, performanceClient?: IPerformanceClient); - /** - * Retrieves a token from cache if it is still valid, or uses the cached refresh token to renew - * the given token and returns the renewed token - * @param request - */ - acquireToken(request: CommonSilentFlowRequest): Promise; - /** - * Retrieves token from cache or throws an error if it must be refreshed. - * @param request - */ - acquireCachedToken(request: CommonSilentFlowRequest): Promise<[AuthenticationResult, CacheOutcome]>; - private setCacheOutcome; - /** - * Helper function to build response object from the CacheRecord - * @param cacheRecord - */ - private generateResultFromCacheRecord; -} -//# sourceMappingURL=SilentFlowClient.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/client/SilentFlowClient.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/client/SilentFlowClient.d.ts.map deleted file mode 100644 index c1659e9..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/client/SilentFlowClient.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"SilentFlowClient.d.ts","sourceRoot":"","sources":["../../src/client/SilentFlowClient.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AACvE,OAAO,EAAE,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AAChF,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAU3E,OAAO,EAAE,YAAY,EAAuB,MAAM,uBAAuB,CAAC;AAC1E,OAAO,EAAE,kBAAkB,EAAE,MAAM,gDAAgD,CAAC;AAQpF,gBAAgB;AAChB,qBAAa,gBAAiB,SAAQ,UAAU;gBAExC,aAAa,EAAE,mBAAmB,EAClC,iBAAiB,CAAC,EAAE,kBAAkB;IAK1C;;;;OAIG;IACG,YAAY,CACd,OAAO,EAAE,uBAAuB,GACjC,OAAO,CAAC,oBAAoB,CAAC;IA8ChC;;;OAGG;IACG,kBAAkB,CACpB,OAAO,EAAE,uBAAuB,GACjC,OAAO,CAAC,CAAC,oBAAoB,EAAE,YAAY,CAAC,CAAC;IAiHhD,OAAO,CAAC,eAAe;IAkBvB;;;OAGG;YACW,6BAA6B;CAqC9C"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/client/SilentFlowClient.mjs b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/client/SilentFlowClient.mjs deleted file mode 100644 index d088e69..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/client/SilentFlowClient.mjs +++ /dev/null @@ -1,151 +0,0 @@ -/*! @azure/msal-common v14.16.1 2025-08-05 */ -'use strict'; -import { BaseClient } from './BaseClient.mjs'; -import { wasClockTurnedBack, isTokenExpired } from '../utils/TimeUtils.mjs'; -import { RefreshTokenClient } from './RefreshTokenClient.mjs'; -import { ClientAuthError, createClientAuthError } from '../error/ClientAuthError.mjs'; -import { ResponseHandler } from '../response/ResponseHandler.mjs'; -import { OIDC_DEFAULT_SCOPES, CacheOutcome } from '../utils/Constants.mjs'; -import { StringUtils } from '../utils/StringUtils.mjs'; -import { extractTokenClaims, checkMaxAge } from '../account/AuthToken.mjs'; -import { PerformanceEvents } from '../telemetry/performance/PerformanceEvent.mjs'; -import { invokeAsync } from '../utils/FunctionWrappers.mjs'; -import { getTenantFromAuthorityString } from '../authority/Authority.mjs'; -import { tokenRefreshRequired, noAccountInSilentRequest, authTimeNotFound } from '../error/ClientAuthErrorCodes.mjs'; - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** @internal */ -class SilentFlowClient extends BaseClient { - constructor(configuration, performanceClient) { - super(configuration, performanceClient); - } - /** - * Retrieves a token from cache if it is still valid, or uses the cached refresh token to renew - * the given token and returns the renewed token - * @param request - */ - async acquireToken(request) { - try { - const [authResponse, cacheOutcome] = await this.acquireCachedToken({ - ...request, - scopes: request.scopes?.length - ? request.scopes - : [...OIDC_DEFAULT_SCOPES], - }); - // if the token is not expired but must be refreshed; get a new one in the background - if (cacheOutcome === CacheOutcome.PROACTIVELY_REFRESHED) { - this.logger.info("SilentFlowClient:acquireCachedToken - Cached access token's refreshOn property has been exceeded'. It's not expired, but must be refreshed."); - // refresh the access token in the background - const refreshTokenClient = new RefreshTokenClient(this.config, this.performanceClient); - refreshTokenClient - .acquireTokenByRefreshToken(request) - .catch(() => { - // do nothing, this is running in the background and no action is to be taken upon success or failure - }); - } - // return the cached token - return authResponse; - } - catch (e) { - if (e instanceof ClientAuthError && - e.errorCode === tokenRefreshRequired) { - const refreshTokenClient = new RefreshTokenClient(this.config, this.performanceClient); - return refreshTokenClient.acquireTokenByRefreshToken(request); - } - else { - throw e; - } - } - } - /** - * Retrieves token from cache or throws an error if it must be refreshed. - * @param request - */ - async acquireCachedToken(request) { - this.performanceClient?.addQueueMeasurement(PerformanceEvents.SilentFlowClientAcquireCachedToken, request.correlationId); - let lastCacheOutcome = CacheOutcome.NOT_APPLICABLE; - if (request.forceRefresh || - (!this.config.cacheOptions.claimsBasedCachingEnabled && - !StringUtils.isEmptyObj(request.claims))) { - // Must refresh due to present force_refresh flag. - this.setCacheOutcome(CacheOutcome.FORCE_REFRESH_OR_CLAIMS, request.correlationId); - throw createClientAuthError(tokenRefreshRequired); - } - // We currently do not support silent flow for account === null use cases; This will be revisited for confidential flow usecases - if (!request.account) { - throw createClientAuthError(noAccountInSilentRequest); - } - const requestTenantId = request.account.tenantId || - getTenantFromAuthorityString(request.authority); - const tokenKeys = this.cacheManager.getTokenKeys(); - const cachedAccessToken = this.cacheManager.getAccessToken(request.account, request, tokenKeys, requestTenantId, this.performanceClient); - if (!cachedAccessToken) { - // must refresh due to non-existent access_token - this.setCacheOutcome(CacheOutcome.NO_CACHED_ACCESS_TOKEN, request.correlationId); - throw createClientAuthError(tokenRefreshRequired); - } - else if (wasClockTurnedBack(cachedAccessToken.cachedAt) || - isTokenExpired(cachedAccessToken.expiresOn, this.config.systemOptions.tokenRenewalOffsetSeconds)) { - // must refresh due to the expires_in value - this.setCacheOutcome(CacheOutcome.CACHED_ACCESS_TOKEN_EXPIRED, request.correlationId); - throw createClientAuthError(tokenRefreshRequired); - } - else if (cachedAccessToken.refreshOn && - isTokenExpired(cachedAccessToken.refreshOn, 0)) { - // must refresh (in the background) due to the refresh_in value - lastCacheOutcome = CacheOutcome.PROACTIVELY_REFRESHED; - // don't throw ClientAuthError.createRefreshRequiredError(), return cached token instead - } - const environment = request.authority || this.authority.getPreferredCache(); - const cacheRecord = { - account: this.cacheManager.readAccountFromCache(request.account, request.correlationId), - accessToken: cachedAccessToken, - idToken: this.cacheManager.getIdToken(request.account, request.correlationId, tokenKeys, requestTenantId, this.performanceClient), - refreshToken: null, - appMetadata: this.cacheManager.readAppMetadataFromCache(environment), - }; - this.setCacheOutcome(lastCacheOutcome, request.correlationId); - if (this.config.serverTelemetryManager) { - this.config.serverTelemetryManager.incrementCacheHits(); - } - return [ - await invokeAsync(this.generateResultFromCacheRecord.bind(this), PerformanceEvents.SilentFlowClientGenerateResultFromCacheRecord, this.logger, this.performanceClient, request.correlationId)(cacheRecord, request), - lastCacheOutcome, - ]; - } - setCacheOutcome(cacheOutcome, correlationId) { - this.serverTelemetryManager?.setCacheOutcome(cacheOutcome); - this.performanceClient?.addFields({ - cacheOutcome: cacheOutcome, - }, correlationId); - if (cacheOutcome !== CacheOutcome.NOT_APPLICABLE) { - this.logger.info(`Token refresh is required due to cache outcome: ${cacheOutcome}`); - } - } - /** - * Helper function to build response object from the CacheRecord - * @param cacheRecord - */ - async generateResultFromCacheRecord(cacheRecord, request) { - this.performanceClient?.addQueueMeasurement(PerformanceEvents.SilentFlowClientGenerateResultFromCacheRecord, request.correlationId); - let idTokenClaims; - if (cacheRecord.idToken) { - idTokenClaims = extractTokenClaims(cacheRecord.idToken.secret, this.config.cryptoInterface.base64Decode); - } - // token max_age check - if (request.maxAge || request.maxAge === 0) { - const authTime = idTokenClaims?.auth_time; - if (!authTime) { - throw createClientAuthError(authTimeNotFound); - } - checkMaxAge(authTime, request.maxAge); - } - return ResponseHandler.generateAuthenticationResult(this.cryptoUtils, this.authority, cacheRecord, true, request, idTokenClaims); - } -} - -export { SilentFlowClient }; -//# sourceMappingURL=SilentFlowClient.mjs.map diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/client/SilentFlowClient.mjs.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/client/SilentFlowClient.mjs.map deleted file mode 100644 index a794a84..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/client/SilentFlowClient.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"SilentFlowClient.mjs","sources":["../../src/client/SilentFlowClient.ts"],"sourcesContent":[null],"names":["ClientAuthErrorCodes.tokenRefreshRequired","ClientAuthErrorCodes.noAccountInSilentRequest","TimeUtils.wasClockTurnedBack","TimeUtils.isTokenExpired","ClientAuthErrorCodes.authTimeNotFound"],"mappings":";;;;;;;;;;;;;;;AAAA;;;AAGG;AAwBH;AACM,MAAO,gBAAiB,SAAQ,UAAU,CAAA;IAC5C,WACI,CAAA,aAAkC,EAClC,iBAAsC,EAAA;AAEtC,QAAA,KAAK,CAAC,aAAa,EAAE,iBAAiB,CAAC,CAAC;KAC3C;AAED;;;;AAIG;IACH,MAAM,YAAY,CACd,OAAgC,EAAA;QAEhC,IAAI;YACA,MAAM,CAAC,YAAY,EAAE,YAAY,CAAC,GAAG,MAAM,IAAI,CAAC,kBAAkB,CAAC;AAC/D,gBAAA,GAAG,OAAO;AACV,gBAAA,MAAM,EAAE,OAAO,CAAC,MAAM,EAAE,MAAM;sBACxB,OAAO,CAAC,MAAM;AAChB,sBAAE,CAAC,GAAG,mBAAmB,CAAC;AACjC,aAAA,CAAC,CAAC;;AAGH,YAAA,IAAI,YAAY,KAAK,YAAY,CAAC,qBAAqB,EAAE;AACrD,gBAAA,IAAI,CAAC,MAAM,CAAC,IAAI,CACZ,6IAA6I,CAChJ,CAAC;;AAGF,gBAAA,MAAM,kBAAkB,GAAG,IAAI,kBAAkB,CAC7C,IAAI,CAAC,MAAM,EACX,IAAI,CAAC,iBAAiB,CACzB,CAAC;gBAEF,kBAAkB;qBACb,0BAA0B,CAAC,OAAO,CAAC;qBACnC,KAAK,CAAC,MAAK;;AAEZ,iBAAC,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A,IAAI,aAAsC,CAAC;QAC3C,IAAI,WAAW,CAAC,OAAO,EAAE;AACrB,YAAA,aAAa,GAAG,kBAAkB,CAC9B,WAAW,CAAC,OAAO,CAAC,MAAM,EAC1B,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,YAAY,CAC3C,CAAC;AACL,SAAA;;QAGD,IAAI,OAAO,CAAC,MAAM,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE;AACxC,YAAA,MAAM,QAAQ,GAAG,aAAa,EAAE,SAAS,CAAC;YAC1C,IAAI,CAAC,QAAQ,EAAE;AACX,gBAAA,MAAM,qBAAqB,CACvBC,gBAAqC,CACxC,CAAC;AACL,aAAA;AAED,YAAA,WAAW,CAAC,QAAQ,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;AACzC,SAAA;QAED,OAAO,eAAe,CAAC,4BAA4B,CAC/C,IAAI,CAAC,WAAW,EAChB,IAAI,CAAC,SAAS,EACd,WAAW,EACX,IAAI,EACJ,OAAO,EACP,aAAa,CAChB,CAAC;KACL;AACJ;;;;"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/config/AppTokenProvider.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/config/AppTokenProvider.d.ts deleted file mode 100644 index 7177ac7..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/config/AppTokenProvider.d.ts +++ /dev/null @@ -1,39 +0,0 @@ -/** - * Extensibility interface, which allows the app developer to return a token, based on the passed-in parameters, instead of fetching tokens from - * the Identity Provider (AAD). - * Developers need to construct and return an AppTokenProviderResult object back to MSAL. MSAL will cache the token response - * in the same way it would do if the result were comming from AAD. - * This extensibility point is only defined for the client_credential flow, i.e. acquireTokenByClientCredential and - * meant for Azure SDK to enhance Managed Identity support. - */ -export interface IAppTokenProvider { - (appTokenProviderParameters: AppTokenProviderParameters): Promise; -} -/** - * Input object for the IAppTokenProvider extensiblity. MSAL will create this object, which can be used - * to help create an AppTokenProviderResult. - * - * - correlationId - the correlation Id associated with the request - * - tenantId - the tenant Id for which the token must be provided - * - scopes - the scopes for which the token must be provided - * - claims - any extra claims that the token must satisfy - */ -export type AppTokenProviderParameters = { - readonly correlationId?: string; - readonly tenantId: string; - readonly scopes: Array; - readonly claims?: string; -}; -/** - * Output object for IAppTokenProvider extensiblity. - * - * - accessToken - the actual access token, typically in JWT format, that satisfies the request data AppTokenProviderParameters - * - expiresInSeconds - how long the tokens has before expiry, in seconds. Similar to the "expires_in" field in an AAD token response. - * - refreshInSeconds - how long the token has before it should be proactively refreshed. Similar to the "refresh_in" field in an AAD token response. - */ -export type AppTokenProviderResult = { - accessToken: string; - expiresInSeconds: number; - refreshInSeconds?: number; -}; -//# sourceMappingURL=AppTokenProvider.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/config/AppTokenProvider.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/config/AppTokenProvider.d.ts.map deleted file mode 100644 index 91a9c41..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/config/AppTokenProvider.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AppTokenProvider.d.ts","sourceRoot":"","sources":["../../src/config/AppTokenProvider.ts"],"names":[],"mappings":"AAKA;;;;;;;GAOG;AACH,MAAM,WAAW,iBAAiB;IAC9B,CACI,0BAA0B,EAAE,0BAA0B,GACvD,OAAO,CAAC,sBAAsB,CAAC,CAAC;CACtC;AAED;;;;;;;;GAQG;AACH,MAAM,MAAM,0BAA0B,GAAG;IACrC,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC/B,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;CAC5B,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,MAAM,sBAAsB,GAAG;IACjC,WAAW,EAAE,MAAM,CAAC;IACpB,gBAAgB,EAAE,MAAM,CAAC;IACzB,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC7B,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/config/ClientConfiguration.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/config/ClientConfiguration.d.ts deleted file mode 100644 index faf59c1..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/config/ClientConfiguration.d.ts +++ /dev/null @@ -1,155 +0,0 @@ -import { INetworkModule } from "../network/INetworkModule.js"; -import { ICrypto } from "../crypto/ICrypto.js"; -import { ILoggerCallback, LogLevel } from "../logger/Logger.js"; -import { Authority } from "../authority/Authority.js"; -import { AzureCloudInstance } from "../authority/AuthorityOptions.js"; -import { CacheManager } from "../cache/CacheManager.js"; -import { ServerTelemetryManager } from "../telemetry/server/ServerTelemetryManager.js"; -import { ICachePlugin } from "../cache/interface/ICachePlugin.js"; -import { ISerializableTokenCache } from "../cache/interface/ISerializableTokenCache.js"; -import { ClientCredentials } from "../account/ClientCredentials.js"; -/** - * Use the configuration object to configure MSAL Modules and initialize the base interfaces for MSAL. - * - * This object allows you to configure important elements of MSAL functionality: - * - authOptions - Authentication for application - * - cryptoInterface - Implementation of crypto functions - * - libraryInfo - Library metadata - * - telemetry - Telemetry options and data - * - loggerOptions - Logging for application - * - networkInterface - Network implementation - * - storageInterface - Storage implementation - * - systemOptions - Additional library options - * - clientCredentials - Credentials options for confidential clients - * @internal - */ -export type ClientConfiguration = { - authOptions: AuthOptions; - systemOptions?: SystemOptions; - loggerOptions?: LoggerOptions; - cacheOptions?: CacheOptions; - storageInterface?: CacheManager; - networkInterface?: INetworkModule; - cryptoInterface?: ICrypto; - clientCredentials?: ClientCredentials; - libraryInfo?: LibraryInfo; - telemetry?: TelemetryOptions; - serverTelemetryManager?: ServerTelemetryManager | null; - persistencePlugin?: ICachePlugin | null; - serializableCache?: ISerializableTokenCache | null; -}; -export type CommonClientConfiguration = { - authOptions: Required; - systemOptions: Required; - loggerOptions: Required; - cacheOptions: Required; - storageInterface: CacheManager; - networkInterface: INetworkModule; - cryptoInterface: Required; - libraryInfo: LibraryInfo; - telemetry: Required; - serverTelemetryManager: ServerTelemetryManager | null; - clientCredentials: ClientCredentials; - persistencePlugin: ICachePlugin | null; - serializableCache: ISerializableTokenCache | null; -}; -/** - * Use this to configure the auth options in the ClientConfiguration object - * - * - clientId - Client ID of your app registered with our Application registration portal : https://portal.azure.com/#blade/Microsoft_AAD_IAM/ActiveDirectoryMenuBlade/RegisteredAppsPreview in Microsoft Identity Platform - * - authority - You can configure a specific authority, defaults to " " or "https://login.microsoftonline.com/common" - * - knownAuthorities - An array of URIs that are known to be valid. Used in B2C scenarios. - * - cloudDiscoveryMetadata - A string containing the cloud discovery response. Used in AAD scenarios. - * - clientCapabilities - Array of capabilities which will be added to the claims.access_token.xms_cc request property on every network request. - * - protocolMode - Enum that represents the protocol that msal follows. Used for configuring proper endpoints. - * - skipAuthorityMetadataCache - A flag to choose whether to use or not use the local metadata cache during authority initialization. Defaults to false. - * - instanceAware - A flag of whether the STS will send back additional parameters to specify where the tokens should be retrieved from. - * - redirectUri - The redirect URI where authentication responses can be received by your application. It must exactly match one of the redirect URIs registered in the Azure portal. - * @internal - */ -export type AuthOptions = { - clientId: string; - authority: Authority; - redirectUri: string; - clientCapabilities?: Array; - azureCloudOptions?: AzureCloudOptions; - skipAuthorityMetadataCache?: boolean; - instanceAware?: boolean; -}; -/** - * Use this to configure token renewal info in the Configuration object - * - * - tokenRenewalOffsetSeconds - Sets the window of offset needed to renew the token before expiry - */ -export type SystemOptions = { - tokenRenewalOffsetSeconds?: number; - preventCorsPreflight?: boolean; -}; -/** - * Use this to configure the logging that MSAL does, by configuring logger options in the Configuration object - * - * - loggerCallback - Callback for logger - * - piiLoggingEnabled - Sets whether pii logging is enabled - * - logLevel - Sets the level at which logging happens - * - correlationId - Sets the correlationId printed by the logger - */ -export type LoggerOptions = { - loggerCallback?: ILoggerCallback; - piiLoggingEnabled?: boolean; - logLevel?: LogLevel; - correlationId?: string; -}; -/** - * Use this to configure credential cache preferences in the ClientConfiguration object - * - * - claimsBasedCachingEnabled - Sets whether tokens should be cached based on the claims hash. Default is false. - */ -export type CacheOptions = { - claimsBasedCachingEnabled?: boolean; -}; -/** - * Library-specific options - */ -export type LibraryInfo = { - sku: string; - version: string; - cpu: string; - os: string; -}; -/** - * AzureCloudInstance specific options - * - * - azureCloudInstance - string enum providing short notation for soverign and public cloud authorities - * - tenant - provision to provide the tenant info - */ -export type AzureCloudOptions = { - azureCloudInstance: AzureCloudInstance; - tenant?: string; -}; -export type TelemetryOptions = { - application: ApplicationTelemetry; -}; -/** - * Telemetry information sent on request - * - appName: Unique string name of an application - * - appVersion: Version of the application using MSAL - */ -export type ApplicationTelemetry = { - appName: string; - appVersion: string; -}; -export declare const DEFAULT_SYSTEM_OPTIONS: Required; -/** - * Function that sets the default options when not explicitly configured from app developer - * - * @param Configuration - * - * @returns Configuration - */ -export declare function buildClientConfiguration({ authOptions: userAuthOptions, systemOptions: userSystemOptions, loggerOptions: userLoggerOption, cacheOptions: userCacheOptions, storageInterface: storageImplementation, networkInterface: networkImplementation, cryptoInterface: cryptoImplementation, clientCredentials: clientCredentials, libraryInfo: libraryInfo, telemetry: telemetry, serverTelemetryManager: serverTelemetryManager, persistencePlugin: persistencePlugin, serializableCache: serializableCache, }: ClientConfiguration): CommonClientConfiguration; -/** - * Returns true if config has protocolMode set to ProtocolMode.OIDC, false otherwise - * @param ClientConfiguration - */ -export declare function isOidcProtocolMode(config: ClientConfiguration): boolean; -//# sourceMappingURL=ClientConfiguration.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/config/ClientConfiguration.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/config/ClientConfiguration.d.ts.map deleted file mode 100644 index 564ed45..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/config/ClientConfiguration.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ClientConfiguration.d.ts","sourceRoot":"","sources":["../../src/config/ClientConfiguration.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAiC,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC9E,OAAO,EAAE,eAAe,EAAU,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAMxE,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AACtE,OAAO,EAAE,YAAY,EAAuB,MAAM,0BAA0B,CAAC;AAC7E,OAAO,EAAE,sBAAsB,EAAE,MAAM,+CAA+C,CAAC;AACvF,OAAO,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAClE,OAAO,EAAE,uBAAuB,EAAE,MAAM,+CAA+C,CAAC;AACxF,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AAOpE;;;;;;;;;;;;;;GAcG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAC9B,WAAW,EAAE,WAAW,CAAC;IACzB,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,gBAAgB,CAAC,EAAE,YAAY,CAAC;IAChC,gBAAgB,CAAC,EAAE,cAAc,CAAC;IAClC,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;IACtC,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,SAAS,CAAC,EAAE,gBAAgB,CAAC;IAC7B,sBAAsB,CAAC,EAAE,sBAAsB,GAAG,IAAI,CAAC;IACvD,iBAAiB,CAAC,EAAE,YAAY,GAAG,IAAI,CAAC;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;AAgBD;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,mBAAmB,GAAG,OAAO,CAIvE"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/config/ClientConfiguration.mjs b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/config/ClientConfiguration.mjs deleted file mode 100644 index e266101..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/config/ClientConfiguration.mjs +++ /dev/null @@ -1,111 +0,0 @@ -/*! @azure/msal-common v14.16.1 2025-08-05 */ -'use strict'; -import { DEFAULT_CRYPTO_IMPLEMENTATION } from '../crypto/ICrypto.mjs'; -import { Logger, LogLevel } from '../logger/Logger.mjs'; -import { DEFAULT_TOKEN_RENEWAL_OFFSET_SEC, Constants } from '../utils/Constants.mjs'; -import { version } from '../packageMetadata.mjs'; -import { AzureCloudInstance } from '../authority/AuthorityOptions.mjs'; -import { DefaultStorageClass } from '../cache/CacheManager.mjs'; -import { ProtocolMode } from '../authority/ProtocolMode.mjs'; -import { createClientAuthError } from '../error/ClientAuthError.mjs'; -import { methodNotImplemented } from '../error/ClientAuthErrorCodes.mjs'; - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -const DEFAULT_SYSTEM_OPTIONS = { - tokenRenewalOffsetSeconds: DEFAULT_TOKEN_RENEWAL_OFFSET_SEC, - preventCorsPreflight: false, -}; -const DEFAULT_LOGGER_IMPLEMENTATION = { - loggerCallback: () => { - // allow users to not set loggerCallback - }, - piiLoggingEnabled: false, - logLevel: LogLevel.Info, - correlationId: Constants.EMPTY_STRING, -}; -const DEFAULT_CACHE_OPTIONS = { - claimsBasedCachingEnabled: false, -}; -const DEFAULT_NETWORK_IMPLEMENTATION = { - async sendGetRequestAsync() { - throw createClientAuthError(methodNotImplemented); - }, - async sendPostRequestAsync() { - throw createClientAuthError(methodNotImplemented); - }, -}; -const DEFAULT_LIBRARY_INFO = { - sku: Constants.SKU, - version: version, - cpu: Constants.EMPTY_STRING, - os: Constants.EMPTY_STRING, -}; -const DEFAULT_CLIENT_CREDENTIALS = { - clientSecret: Constants.EMPTY_STRING, - clientAssertion: undefined, -}; -const DEFAULT_AZURE_CLOUD_OPTIONS = { - azureCloudInstance: AzureCloudInstance.None, - tenant: `${Constants.DEFAULT_COMMON_TENANT}`, -}; -const DEFAULT_TELEMETRY_OPTIONS = { - application: { - appName: "", - appVersion: "", - }, -}; -/** - * Function that sets the default options when not explicitly configured from app developer - * - * @param Configuration - * - * @returns Configuration - */ -function buildClientConfiguration({ authOptions: userAuthOptions, systemOptions: userSystemOptions, loggerOptions: userLoggerOption, cacheOptions: userCacheOptions, storageInterface: storageImplementation, networkInterface: networkImplementation, cryptoInterface: cryptoImplementation, clientCredentials: clientCredentials, libraryInfo: libraryInfo, telemetry: telemetry, serverTelemetryManager: serverTelemetryManager, persistencePlugin: persistencePlugin, serializableCache: serializableCache, }) { - const loggerOptions = { - ...DEFAULT_LOGGER_IMPLEMENTATION, - ...userLoggerOption, - }; - return { - authOptions: buildAuthOptions(userAuthOptions), - systemOptions: { ...DEFAULT_SYSTEM_OPTIONS, ...userSystemOptions }, - loggerOptions: loggerOptions, - cacheOptions: { ...DEFAULT_CACHE_OPTIONS, ...userCacheOptions }, - storageInterface: storageImplementation || - new DefaultStorageClass(userAuthOptions.clientId, DEFAULT_CRYPTO_IMPLEMENTATION, new Logger(loggerOptions)), - networkInterface: networkImplementation || DEFAULT_NETWORK_IMPLEMENTATION, - cryptoInterface: cryptoImplementation || DEFAULT_CRYPTO_IMPLEMENTATION, - clientCredentials: clientCredentials || DEFAULT_CLIENT_CREDENTIALS, - libraryInfo: { ...DEFAULT_LIBRARY_INFO, ...libraryInfo }, - telemetry: { ...DEFAULT_TELEMETRY_OPTIONS, ...telemetry }, - serverTelemetryManager: serverTelemetryManager || null, - persistencePlugin: persistencePlugin || null, - serializableCache: serializableCache || null, - }; -} -/** - * Construct authoptions from the client and platform passed values - * @param authOptions - */ -function buildAuthOptions(authOptions) { - return { - clientCapabilities: [], - azureCloudOptions: DEFAULT_AZURE_CLOUD_OPTIONS, - skipAuthorityMetadataCache: false, - instanceAware: false, - ...authOptions, - }; -} -/** - * Returns true if config has protocolMode set to ProtocolMode.OIDC, false otherwise - * @param ClientConfiguration - */ -function isOidcProtocolMode(config) { - return (config.authOptions.authority.options.protocolMode === ProtocolMode.OIDC); -} - -export { DEFAULT_SYSTEM_OPTIONS, buildClientConfiguration, isOidcProtocolMode }; -//# sourceMappingURL=ClientConfiguration.mjs.map diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/config/ClientConfiguration.mjs.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/config/ClientConfiguration.mjs.map deleted file mode 100644 index c2916f6..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/config/ClientConfiguration.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ClientConfiguration.mjs","sources":["../../src/config/ClientConfiguration.ts"],"sourcesContent":[null],"names":["ClientAuthErrorCodes.methodNotImplemented"],"mappings":";;;;;;;;;;;;AAAA;;;AAGG;AAmKU,MAAA,sBAAsB,GAA4B;AAC3D,IAAA,yBAAyB,EAAE,gCAAgC;AAC3D,IAAA,oBAAoB,EAAE,KAAK;EAC7B;AAEF,MAAM,6BAA6B,GAA4B;IAC3D,cAAc,EAAE,MAAK;;KAEpB;AACD,IAAA,iBAAiB,EAAE,KAAK;IACxB,QAAQ,EAAE,QAAQ,CAAC,IAAI;IACvB,aAAa,EAAE,SAAS,CAAC,YAAY;CACxC,CAAC;AAEF,MAAM,qBAAqB,GAA2B;AAClD,IAAA,yBAAyB,EAAE,KAAK;CACnC,CAAC;AAEF,MAAM,8BAA8B,GAAmB;AACnD,IAAA,MAAM,mBAAmB,GAAA;AACrB,QAAA,MAAM,qBAAqB,CAACA,oBAAyC,CAAC,CAAC;KAC1E;AACD,IAAA,MAAM,oBAAoB,GAAA;AACtB,QAAA,MAAM,qBAA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AsB,EAAE,GAAG,iBAAiB,EAAE;AAClE,QAAA,aAAa,EAAE,aAAa;AAC5B,QAAA,YAAY,EAAE,EAAE,GAAG,qBAAqB,EAAE,GAAG,gBAAgB,EAAE;AAC/D,QAAA,gBAAgB,EACZ,qBAAqB;AACrB,YAAA,IAAI,mBAAmB,CACnB,eAAe,CAAC,QAAQ,EACxB,6BAA6B,EAC7B,IAAI,MAAM,CAAC,aAAa,CAAC,CAC5B;QACL,gBAAgB,EACZ,qBAAqB,IAAI,8BAA8B;QAC3D,eAAe,EAAE,oBAAoB,IAAI,6BAA6B;QACtE,iBAAiB,EAAE,iBAAiB,IAAI,0BAA0B;AAClE,QAAA,WAAW,EAAE,EAAE,GAAG,oBAAoB,EAAE,GAAG,WAAW,EAAE;AACxD,QAAA,SAAS,EAAE,EAAE,GAAG,yBAAyB,EAAE,GAAG,SAAS,EAAE;QACzD,sBAAsB,EAAE,sBAAsB,IAAI,IAAI;QACtD,iBAAiB,EAAE,iBAAiB,IAAI,IAAI;QAC5C,iBAAiB,EAAE,iBAAiB,IAAI,IAAI;KAC/C,CAAC;AACN,CAAC;AAED;;;AAGG;AACH,SAAS,gBAAgB,CAAC,WAAwB,EAAA;IAC9C,OAAO;AACH,QAAA,kBAAkB,EAAE,EAAE;AACtB,QAAA,iBAAiB,EAAE,2BAA2B;AAC9C,QAAA,0BAA0B,EAAE,KAAK;AACjC,QAAA,aAAa,EAAE,KAAK;AACpB,QAAA,GAAG,WAAW;KACjB,CAAC;AACN,CAAC;AAED;;;AAGG;AACG,SAAU,kBAAkB,CAAC,MAA2B,EAAA;AAC1D,IAAA,QACI,MAAM,CAAC,WAAW,CAAC,SAAS,CAAC,OAAO,CAAC,YAAY,KAAK,YAAY,CAAC,IAAI,EACzE;AACN;;;;"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/constants/AADServerParamKeys.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/constants/AADServerParamKeys.d.ts deleted file mode 100644 index b34ce8b..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/constants/AADServerParamKeys.d.ts +++ /dev/null @@ -1,56 +0,0 @@ -export declare const CLIENT_ID = "client_id"; -export declare const REDIRECT_URI = "redirect_uri"; -export declare const RESPONSE_TYPE = "response_type"; -export declare const RESPONSE_MODE = "response_mode"; -export declare const GRANT_TYPE = "grant_type"; -export declare const CLAIMS = "claims"; -export declare const SCOPE = "scope"; -export declare const ERROR = "error"; -export declare const ERROR_DESCRIPTION = "error_description"; -export declare const ACCESS_TOKEN = "access_token"; -export declare const ID_TOKEN = "id_token"; -export declare const REFRESH_TOKEN = "refresh_token"; -export declare const EXPIRES_IN = "expires_in"; -export declare const REFRESH_TOKEN_EXPIRES_IN = "refresh_token_expires_in"; -export declare const STATE = "state"; -export declare const NONCE = "nonce"; -export declare const PROMPT = "prompt"; -export declare const SESSION_STATE = "session_state"; -export declare const CLIENT_INFO = "client_info"; -export declare const CODE = "code"; -export declare const CODE_CHALLENGE = "code_challenge"; -export declare const CODE_CHALLENGE_METHOD = "code_challenge_method"; -export declare const CODE_VERIFIER = "code_verifier"; -export declare const CLIENT_REQUEST_ID = "client-request-id"; -export declare const X_CLIENT_SKU = "x-client-SKU"; -export declare const X_CLIENT_VER = "x-client-VER"; -export declare const X_CLIENT_OS = "x-client-OS"; -export declare const X_CLIENT_CPU = "x-client-CPU"; -export declare const X_CLIENT_CURR_TELEM = "x-client-current-telemetry"; -export declare const X_CLIENT_LAST_TELEM = "x-client-last-telemetry"; -export declare const X_MS_LIB_CAPABILITY = "x-ms-lib-capability"; -export declare const X_APP_NAME = "x-app-name"; -export declare const X_APP_VER = "x-app-ver"; -export declare const POST_LOGOUT_URI = "post_logout_redirect_uri"; -export declare const ID_TOKEN_HINT = "id_token_hint"; -export declare const DEVICE_CODE = "device_code"; -export declare const CLIENT_SECRET = "client_secret"; -export declare const CLIENT_ASSERTION = "client_assertion"; -export declare const CLIENT_ASSERTION_TYPE = "client_assertion_type"; -export declare const TOKEN_TYPE = "token_type"; -export declare const REQ_CNF = "req_cnf"; -export declare const OBO_ASSERTION = "assertion"; -export declare const REQUESTED_TOKEN_USE = "requested_token_use"; -export declare const ON_BEHALF_OF = "on_behalf_of"; -export declare const FOCI = "foci"; -export declare const CCS_HEADER = "X-AnchorMailbox"; -export declare const RETURN_SPA_CODE = "return_spa_code"; -export declare const NATIVE_BROKER = "nativebroker"; -export declare const LOGOUT_HINT = "logout_hint"; -export declare const SID = "sid"; -export declare const LOGIN_HINT = "login_hint"; -export declare const DOMAIN_HINT = "domain_hint"; -export declare const X_CLIENT_EXTRA_SKU = "x-client-xtra-sku"; -export declare const BROKER_CLIENT_ID = "brk_client_id"; -export declare const BROKER_REDIRECT_URI = "brk_redirect_uri"; -//# sourceMappingURL=AADServerParamKeys.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/constants/AADServerParamKeys.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/constants/AADServerParamKeys.d.ts.map deleted file mode 100644 index 0b24221..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/constants/AADServerParamKeys.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AADServerParamKeys.d.ts","sourceRoot":"","sources":["../../src/constants/AADServerParamKeys.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,SAAS,cAAc,CAAC;AACrC,eAAO,MAAM,YAAY,iBAAiB,CAAC;AAC3C,eAAO,MAAM,aAAa,kBAAkB,CAAC;AAC7C,eAAO,MAAM,aAAa,kBAAkB,CAAC;AAC7C,eAAO,MAAM,UAAU,eAAe,CAAC;AACvC,eAAO,MAAM,MAAM,WAAW,CAAC;AAC/B,eAAO,MAAM,KAAK,UAAU,CAAC;AAC7B,eAAO,MAAM,KAAK,UAAU,CAAC;AAC7B,eAAO,MAAM,iBAAiB,sBAAsB,CAAC;AACrD,eAAO,MAAM,YAAY,iBAAiB,CAAC;AA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,cAAc,CAAC;AACzC,eAAO,MAAM,mBAAmB,wBAAwB,CAAC;AACzD,eAAO,MAAM,YAAY,iBAAiB,CAAC;AAC3C,eAAO,MAAM,IAAI,SAAS,CAAC;AAC3B,eAAO,MAAM,UAAU,oBAAoB,CAAC;AAC5C,eAAO,MAAM,eAAe,oBAAoB,CAAC;AACjD,eAAO,MAAM,aAAa,iBAAiB,CAAC;AAC5C,eAAO,MAAM,WAAW,gBAAgB,CAAC;AACzC,eAAO,MAAM,GAAG,QAAQ,CAAC;AACzB,eAAO,MAAM,UAAU,eAAe,CAAC;AACvC,eAAO,MAAM,WAAW,gBAAgB,CAAC;AACzC,eAAO,MAAM,kBAAkB,sBAAsB,CAAC;AACtD,eAAO,MAAM,gBAAgB,kBAAkB,CAAC;AAChD,eAAO,MAAM,mBAAmB,qBAAqB,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/constants/AADServerParamKeys.mjs b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/constants/AADServerParamKeys.mjs deleted file mode 100644 index 14a960a..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/constants/AADServerParamKeys.mjs +++ /dev/null @@ -1,64 +0,0 @@ -/*! @azure/msal-common v14.16.1 2025-08-05 */ -'use strict'; -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -const CLIENT_ID = "client_id"; -const REDIRECT_URI = "redirect_uri"; -const RESPONSE_TYPE = "response_type"; -const RESPONSE_MODE = "response_mode"; -const GRANT_TYPE = "grant_type"; -const CLAIMS = "claims"; -const SCOPE = "scope"; -const ERROR = "error"; -const ERROR_DESCRIPTION = "error_description"; -const ACCESS_TOKEN = "access_token"; -const ID_TOKEN = "id_token"; -const REFRESH_TOKEN = "refresh_token"; -const EXPIRES_IN = "expires_in"; -const REFRESH_TOKEN_EXPIRES_IN = "refresh_token_expires_in"; -const STATE = "state"; -const NONCE = "nonce"; -const PROMPT = "prompt"; -const SESSION_STATE = "session_state"; -const CLIENT_INFO = "client_info"; -const CODE = "code"; -const CODE_CHALLENGE = "code_challenge"; -const CODE_CHALLENGE_METHOD = "code_challenge_method"; -const CODE_VERIFIER = "code_verifier"; -const CLIENT_REQUEST_ID = "client-request-id"; -const X_CLIENT_SKU = "x-client-SKU"; -const X_CLIENT_VER = "x-client-VER"; -const X_CLIENT_OS = "x-client-OS"; -const X_CLIENT_CPU = "x-client-CPU"; -const X_CLIENT_CURR_TELEM = "x-client-current-telemetry"; -const X_CLIENT_LAST_TELEM = "x-client-last-telemetry"; -const X_MS_LIB_CAPABILITY = "x-ms-lib-capability"; -const X_APP_NAME = "x-app-name"; -const X_APP_VER = "x-app-ver"; -const POST_LOGOUT_URI = "post_logout_redirect_uri"; -const ID_TOKEN_HINT = "id_token_hint"; -const DEVICE_CODE = "device_code"; -const CLIENT_SECRET = "client_secret"; -const CLIENT_ASSERTION = "client_assertion"; -const CLIENT_ASSERTION_TYPE = "client_assertion_type"; -const TOKEN_TYPE = "token_type"; -const REQ_CNF = "req_cnf"; -const OBO_ASSERTION = "assertion"; -const REQUESTED_TOKEN_USE = "requested_token_use"; -const ON_BEHALF_OF = "on_behalf_of"; -const FOCI = "foci"; -const CCS_HEADER = "X-AnchorMailbox"; -const RETURN_SPA_CODE = "return_spa_code"; -const NATIVE_BROKER = "nativebroker"; -const LOGOUT_HINT = "logout_hint"; -const SID = "sid"; -const LOGIN_HINT = "login_hint"; -const DOMAIN_HINT = "domain_hint"; -const X_CLIENT_EXTRA_SKU = "x-client-xtra-sku"; -const BROKER_CLIENT_ID = "brk_client_id"; -const BROKER_REDIRECT_URI = "brk_redirect_uri"; - -export { ACCESS_TOKEN, BROKER_CLIENT_ID, BROKER_REDIRECT_URI, CCS_HEADER, CLAIMS, CLIENT_ASSERTION, CLIENT_ASSERTION_TYPE, CLIENT_ID, CLIENT_INFO, CLIENT_REQUEST_ID, CLIENT_SECRET, CODE, CODE_CHALLENGE, CODE_CHALLENGE_METHOD, CODE_VERIFIER, DEVICE_CODE, DOMAIN_HINT, ERROR, ERROR_DESCRIPTION, EXPIRES_IN, FOCI, GRANT_TYPE, ID_TOKEN, ID_TOKEN_HINT, LOGIN_HINT, LOGOUT_HINT, NATIVE_BROKER, NONCE, OBO_ASSERTION, ON_BEHALF_OF, POST_LOGOUT_URI, PROMPT, REDIRECT_URI, REFRESH_TOKEN, REFRESH_TOKEN_EXPIRES_IN, REQUESTED_TOKEN_USE, REQ_CNF, RESPONSE_MODE, RESPONSE_TYPE, RETURN_SPA_CODE, SCOPE, SESSION_STATE, SID, STATE, TOKEN_TYPE, X_APP_NAME, X_APP_VER, X_CLIENT_CPU, X_CLIENT_CURR_TELEM, X_CLIENT_EXTRA_SKU, X_CLIENT_LAST_TELEM, X_CLIENT_OS, X_CLIENT_SKU, X_CLIENT_VER, X_MS_LIB_CAPABILITY }; -//# sourceMappingURL=AADServerParamKeys.mjs.map diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/constants/AADServerParamKeys.mjs.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/constants/AADServerParamKeys.mjs.map deleted file mode 100644 index 9355026..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/constants/AADServerParamKeys.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AADServerParamKeys.mjs","sources":["../../src/constants/AADServerParamKeys.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAAA;;;AAGG;AAEI,MAAM,SAAS,GAAG,YAAY;AAC9B,MAAM,YAAY,GAAG,eAAe;AACpC,MAAM,aAAa,GAAG,gBAAgB;AACtC,MAAM,aAAa,GAAG,gBAAgB;AACtC,MAAM,UAAU,GAAG,aAAa;AAChC,MAAM,MAAM,GAAG,SAAS;AACxB,MAAM,KAAK,GAAG,QAAQ;AACtB,MAAM,KAAK,GAAG,QAAQ;AACtB,MAAM,iBAAiB,GAAG,oBAAoB;AAC9C,MAAM,YAAY,GAAG,eAAe;AACpC,MAAM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,cAAc;AAClC,MAAM,GAAG,GAAG,MAAM;AAClB,MAAM,UAAU,GAAG,aAAa;AAChC,MAAM,WAAW,GAAG,cAAc;AAClC,MAAM,kBAAkB,GAAG,oBAAoB;AAC/C,MAAM,gBAAgB,GAAG,gBAAgB;AACzC,MAAM,mBAAmB,GAAG;;;;"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/crypto/ICrypto.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/crypto/ICrypto.d.ts deleted file mode 100644 index 716ba16..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/crypto/ICrypto.d.ts +++ /dev/null @@ -1,69 +0,0 @@ -import { BaseAuthRequest } from "../request/BaseAuthRequest.js"; -import { ShrOptions, SignedHttpRequest } from "./SignedHttpRequest.js"; -/** - * The PkceCodes type describes the structure - * of objects that contain PKCE code - * challenge and verifier pairs - */ -export type PkceCodes = { - verifier: string; - challenge: string; -}; -export type SignedHttpRequestParameters = Pick & { - correlationId?: string; -}; -/** - * Interface for crypto functions used by library - */ -export interface ICrypto { - /** - * Creates a guid randomly. - */ - createNewGuid(): string; - /** - * base64 Encode string - * @param input - */ - base64Encode(input: string): string; - /** - * base64 decode string - * @param input - */ - base64Decode(input: string): string; - /** - * base64 URL safe encoded string - */ - base64UrlEncode(input: string): string; - /** - * Stringifies and base64Url encodes input public key - * @param inputKid - * @returns Base64Url encoded public key - */ - encodeKid(inputKid: string): string; - /** - * Generates an JWK RSA S256 Thumbprint - * @param request - */ - getPublicKeyThumbprint(request: SignedHttpRequestParameters): Promise; - /** - * Removes cryptographic keypair from key store matching the keyId passed in - * @param kid - */ - removeTokenBindingKey(kid: string): Promise; - /** - * Removes all cryptographic keys from IndexedDB storage - */ - clearKeystore(): Promise; - /** - * Returns a signed proof-of-possession token with a given acces token that contains a cnf claim with the required kid. - * @param accessToken - */ - signJwt(payload: SignedHttpRequest, kid: string, shrOptions?: ShrOptions, correlationId?: string): Promise; - /** - * Returns the SHA-256 hash of an input string - * @param plainText - */ - hashString(plainText: string): Promise; -} -export declare const DEFAULT_CRYPTO_IMPLEMENTATION: ICrypto; -//# sourceMappingURL=ICrypto.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/crypto/ICrypto.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/crypto/ICrypto.d.ts.map deleted file mode 100644 index 9208dda..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/crypto/ICrypto.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ICrypto.d.ts","sourceRoot":"","sources":["../../src/crypto/ICrypto.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAEvE;;;;GAIG;AACH,MAAM,MAAM,SAAS,GAAG;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,2BAA2B,GAAG,IAAI,CAC1C,eAAe,EACb,uBAAuB,GACvB,oBAAoB,GACpB,WAAW,GACX,UAAU,GACV,YAAY,CACjB,GAAG;IACA,aAAa,CAAC,EAAE,MAAM,CAAC;CAC1B,CAAC;AAEF;;GAEG;AACH,MAAM,WAAW,OAAO;IACpB;;OAEG;IACH,aAAa,IAAI,MAAM,CAAC;IACxB;;;OAGG;IACH,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IACpC;;;OAGG;IACH,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IACpC;;OAEG;IACH,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IACvC;;;;OAIG;IACH,SAAS,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAAC;IACpC;;;OAGG;IACH,sBAAsB,CAClB,OAAO,EAAE,2BAA2B,GACrC,OAAO,CAAC,MAAM,CAAC,CAAC;IACnB;;;OAGG;IACH,qBAAqB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IACrD;;OAEG;IACH,aAAa,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC;IAClC;;;OAGG;IACH,OAAO,CACH,OAAO,EAAE,iBAAiB,EAC1B,GAAG,EAAE,MAAM,EACX,UAAU,CAAC,EAAE,UAAU,EACvB,aAAa,CAAC,EAAE,MAAM,GACvB,OAAO,CAAC,MAAM,CAAC,CAAC;IACnB;;;OAGG;IACH,UAAU,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;CAClD;AAED,eAAO,MAAM,6BAA6B,EAAE,OA+B3C,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/crypto/ICrypto.mjs b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/crypto/ICrypto.mjs deleted file mode 100644 index b8fcd9c..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/crypto/ICrypto.mjs +++ /dev/null @@ -1,44 +0,0 @@ -/*! @azure/msal-common v14.16.1 2025-08-05 */ -'use strict'; -import { createClientAuthError } from '../error/ClientAuthError.mjs'; -import { methodNotImplemented } from '../error/ClientAuthErrorCodes.mjs'; - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -const DEFAULT_CRYPTO_IMPLEMENTATION = { - createNewGuid: () => { - throw createClientAuthError(methodNotImplemented); - }, - base64Decode: () => { - throw createClientAuthError(methodNotImplemented); - }, - base64Encode: () => { - throw createClientAuthError(methodNotImplemented); - }, - base64UrlEncode: () => { - throw createClientAuthError(methodNotImplemented); - }, - encodeKid: () => { - throw createClientAuthError(methodNotImplemented); - }, - async getPublicKeyThumbprint() { - throw createClientAuthError(methodNotImplemented); - }, - async removeTokenBindingKey() { - throw createClientAuthError(methodNotImplemented); - }, - async clearKeystore() { - throw createClientAuthError(methodNotImplemented); - }, - async signJwt() { - throw createClientAuthError(methodNotImplemented); - }, - async hashString() { - throw createClientAuthError(methodNotImplemented); - }, -}; - -export { DEFAULT_CRYPTO_IMPLEMENTATION }; -//# sourceMappingURL=ICrypto.mjs.map diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/crypto/ICrypto.mjs.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/crypto/ICrypto.mjs.map deleted file mode 100644 index 2226692..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/crypto/ICrypto.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ICrypto.mjs","sources":["../../src/crypto/ICrypto.ts"],"sourcesContent":[null],"names":["ClientAuthErrorCodes.methodNotImplemented"],"mappings":";;;;;AAAA;;;AAGG;AA2FU,MAAA,6BAA6B,GAAY;IAClD,aAAa,EAAE,MAAa;AACxB,QAAA,MAAM,qBAAqB,CAACA,oBAAyC,CAAC,CAAC;KAC1E;IACD,YAAY,EAAE,MAAa;AACvB,QAAA,MAAM,qBAAqB,CAACA,oBAAyC,CAAC,CAAC;KAC1E;IACD,YAAY,EAAE,MAAa;AACvB,QAAA,MAAM,qBAAqB,CAACA,oBAAyC,CAAC,CAAC;KAC1E;IACD,eAAe,EAAE,MAAa;AAC1B,QAAA,MAAM,qBAAqB,CAACA,oBAAyC,CAAC,CAAC;KAC1E;IACD,SAAS,EAAE,MAAa;AACpB,QAAA,MAAM,qBAAqB,CAACA,oBAAyC,CAAC,CAAC;KAC1E;AACD,IAAA,MAAM,sBAAsB,GAAA;AACxB,QAAA,MAAM,qBAAqB,CAACA,oBAAyC,CAAC,CAAC;KAC1E;AACD,IAAA,MAAM,qBAAqB,GAAA;AACvB,QAAA,MAAM,qBAAqB,CAACA,oBAAyC,CAAC,CAAC;KAC1E;AACD,IAAA,MAAM,aAAa,GAAA;AACf,QAAA,MAAM,qBAAqB,CAACA,oBAAyC,CAAC,CAAC;KAC1E;AACD,IAAA,MAAM,OAAO,GAAA;AACT,QAAA,MAAM,qBAAqB,CAACA,oBAAyC,CAAC,CAAC;KAC1E;AACD,IAAA,MAAM,UAAU,GAAA;AACZ,QAAA,MAAM,qBAAqB,CAACA,oBAAyC,CAAC,CAAC;KAC1E;;;;;"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/crypto/IGuidGenerator.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/crypto/IGuidGenerator.d.ts deleted file mode 100644 index d56c883..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/crypto/IGuidGenerator.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export interface IGuidGenerator { - generateGuid(): string; - isGuid(guid: string): boolean; -} -//# sourceMappingURL=IGuidGenerator.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/crypto/IGuidGenerator.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/crypto/IGuidGenerator.d.ts.map deleted file mode 100644 index 5734ff3..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/crypto/IGuidGenerator.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"IGuidGenerator.d.ts","sourceRoot":"","sources":["../../src/crypto/IGuidGenerator.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,cAAc;IAC3B,YAAY,IAAI,MAAM,CAAC;IACvB,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;CACjC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/crypto/JoseHeader.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/crypto/JoseHeader.d.ts deleted file mode 100644 index 9f08a09..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/crypto/JoseHeader.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { JsonWebTokenTypes } from "../utils/Constants.js"; -export type JoseHeaderOptions = { - typ?: JsonWebTokenTypes; - alg?: string; - kid?: string; -}; -/** @internal */ -export declare class JoseHeader { - typ?: JsonWebTokenTypes; - alg?: string; - kid?: string; - constructor(options: JoseHeaderOptions); - /** - * Builds SignedHttpRequest formatted JOSE Header from the - * JOSE Header options provided or previously set on the object and returns - * the stringified header object. - * Throws if keyId or algorithm aren't provided since they are required for Access Token Binding. - * @param shrHeaderOptions - * @returns - */ - static getShrHeaderString(shrHeaderOptions: JoseHeaderOptions): string; -} -//# sourceMappingURL=JoseHeader.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/crypto/JoseHeader.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/crypto/JoseHeader.d.ts.map deleted file mode 100644 index 59ef1b6..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/crypto/JoseHeader.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"JoseHeader.d.ts","sourceRoot":"","sources":["../../src/crypto/JoseHeader.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE1D,MAAM,MAAM,iBAAiB,GAAG;IAC5B,GAAG,CAAC,EAAE,iBAAiB,CAAC;IACxB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,gBAAgB;AAChB,qBAAa,UAAU;IACZ,GAAG,CAAC,EAAE,iBAAiB,CAAC;IACxB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;gBAER,OAAO,EAAE,iBAAiB;IAMtC;;;;;;;OAOG;IACH,MAAM,CAAC,kBAAkB,CAAC,gBAAgB,EAAE,iBAAiB,GAAG,MAAM;CAoBzE"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/crypto/JoseHeader.mjs b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/crypto/JoseHeader.mjs deleted file mode 100644 index 3c1404f..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/crypto/JoseHeader.mjs +++ /dev/null @@ -1,46 +0,0 @@ -/*! @azure/msal-common v14.16.1 2025-08-05 */ -'use strict'; -import { createJoseHeaderError } from '../error/JoseHeaderError.mjs'; -import { JsonWebTokenTypes } from '../utils/Constants.mjs'; -import { missingKidError, missingAlgError } from '../error/JoseHeaderErrorCodes.mjs'; - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** @internal */ -class JoseHeader { - constructor(options) { - this.typ = options.typ; - this.alg = options.alg; - this.kid = options.kid; - } - /** - * Builds SignedHttpRequest formatted JOSE Header from the - * JOSE Header options provided or previously set on the object and returns - * the stringified header object. - * Throws if keyId or algorithm aren't provided since they are required for Access Token Binding. - * @param shrHeaderOptions - * @returns - */ - static getShrHeaderString(shrHeaderOptions) { - // KeyID is required on the SHR header - if (!shrHeaderOptions.kid) { - throw createJoseHeaderError(missingKidError); - } - // Alg is required on the SHR header - if (!shrHeaderOptions.alg) { - throw createJoseHeaderError(missingAlgError); - } - const shrHeader = new JoseHeader({ - // Access Token PoP headers must have type pop, but the type header can be overriden for special cases - typ: shrHeaderOptions.typ || JsonWebTokenTypes.Pop, - kid: shrHeaderOptions.kid, - alg: shrHeaderOptions.alg, - }); - return JSON.stringify(shrHeader); - } -} - -export { JoseHeader }; -//# sourceMappingURL=JoseHeader.mjs.map diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/crypto/JoseHeader.mjs.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/crypto/JoseHeader.mjs.map deleted file mode 100644 index 22d4d16..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/crypto/JoseHeader.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"JoseHeader.mjs","sources":["../../src/crypto/JoseHeader.ts"],"sourcesContent":[null],"names":["JoseHeaderErrorCodes.missingKidError","JoseHeaderErrorCodes.missingAlgError"],"mappings":";;;;;;AAAA;;;AAGG;AAcH;MACa,UAAU,CAAA;AAKnB,IAAA,WAAA,CAAY,OAA0B,EAAA;AAClC,QAAA,IAAI,CAAC,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC;AACvB,QAAA,IAAI,CAAC,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC;AACvB,QAAA,IAAI,CAAC,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC;KAC1B;AAED;;;;;;;AAOG;IACH,OAAO,kBAAkB,CAAC,gBAAmC,EAAA;;AAEzD,QAAA,IAAI,CAAC,gBAAgB,CAAC,GAAG,EAAE;AACvB,YAAA,MAAM,qBAAqB,CAACA,eAAoC,CAAC,CAAC;AACrE,SAAA;;AAGD,QAAA,IAAI,CAAC,gBAAgB,CAAC,GAAG,EAAE;AACvB,YAAA,MAAM,qBAAqB,CAACC,eAAoC,CAAC,CAAC;AACrE,SAAA;AAED,QAAA,MAAM,SAAS,GAAG,IAAI,UAAU,CAAC;;AAE7B,YAAA,GAAG,EAAE,gBAAgB,CAAC,GAAG,IAAI,iBAAiB,CAAC,GAAG;YAClD,GAAG,EAAE,gBAAgB,CAAC,GAAG;YACzB,GAAG,EAAE,gBAAgB,CAAC,GAAG;AAC5B,SAAA,CAAC,CAAC;AAEH,QAAA,OAAO,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;KACpC;AACJ;;;;"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/crypto/PopTokenGenerator.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/crypto/PopTokenGenerator.d.ts deleted file mode 100644 index 1a3818e..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/crypto/PopTokenGenerator.d.ts +++ /dev/null @@ -1,60 +0,0 @@ -import { ICrypto, SignedHttpRequestParameters } from "./ICrypto.js"; -import { IPerformanceClient } from "../telemetry/performance/IPerformanceClient.js"; -import { Logger } from "../logger/Logger.js"; -/** - * See eSTS docs for more info. - * - A kid element, with the value containing an RFC 7638-compliant JWK thumbprint that is base64 encoded. - * - xms_ksl element, representing the storage location of the key's secret component on the client device. One of two values: - * - sw: software storage - * - uhw: hardware storage - */ -type ReqCnf = { - kid: string; - xms_ksl: KeyLocation; -}; -export type ReqCnfData = { - kid: string; - reqCnfString: string; -}; -declare const KeyLocation: { - readonly SW: "sw"; - readonly UHW: "uhw"; -}; -export type KeyLocation = (typeof KeyLocation)[keyof typeof KeyLocation]; -/** @internal */ -export declare class PopTokenGenerator { - private cryptoUtils; - private performanceClient?; - constructor(cryptoUtils: ICrypto, performanceClient?: IPerformanceClient); - /** - * Generates the req_cnf validated at the RP in the POP protocol for SHR parameters - * and returns an object containing the keyid, the full req_cnf string and the req_cnf string hash - * @param request - * @returns - */ - generateCnf(request: SignedHttpRequestParameters, logger: Logger): Promise; - /** - * Generates key_id for a SHR token request - * @param request - * @returns - */ - generateKid(request: SignedHttpRequestParameters): Promise; - /** - * Signs the POP access_token with the local generated key-pair - * @param accessToken - * @param request - * @returns - */ - signPopToken(accessToken: string, keyId: string, request: SignedHttpRequestParameters): Promise; - /** - * Utility function to generate the signed JWT for an access_token - * @param payload - * @param kid - * @param request - * @param claims - * @returns - */ - signPayload(payload: string, keyId: string, request: SignedHttpRequestParameters, claims?: object): Promise; -} -export {}; -//# sourceMappingURL=PopTokenGenerator.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/crypto/PopTokenGenerator.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/crypto/PopTokenGenerator.d.ts.map deleted file mode 100644 index 2a6c8db..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/crypto/PopTokenGenerator.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"PopTokenGenerator.d.ts","sourceRoot":"","sources":["../../src/crypto/PopTokenGenerator.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/@azure/msal-common/dist/crypto/PopTokenGenerator.mjs b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/crypto/PopTokenGenerator.mjs deleted file mode 100644 index 9377bd3..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/crypto/PopTokenGenerator.mjs +++ /dev/null @@ -1,91 +0,0 @@ -/*! @azure/msal-common v14.16.1 2025-08-05 */ -'use strict'; -import { nowSeconds } from '../utils/TimeUtils.mjs'; -import { UrlString } from '../url/UrlString.mjs'; -import { PerformanceEvents } from '../telemetry/performance/PerformanceEvent.mjs'; -import { invokeAsync } from '../utils/FunctionWrappers.mjs'; - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -const KeyLocation = { - SW: "sw", - UHW: "uhw", -}; -/** @internal */ -class PopTokenGenerator { - constructor(cryptoUtils, performanceClient) { - this.cryptoUtils = cryptoUtils; - this.performanceClient = performanceClient; - } - /** - * Generates the req_cnf validated at the RP in the POP protocol for SHR parameters - * and returns an object containing the keyid, the full req_cnf string and the req_cnf string hash - * @param request - * @returns - */ - async generateCnf(request, logger) { - this.performanceClient?.addQueueMeasurement(PerformanceEvents.PopTokenGenerateCnf, request.correlationId); - const reqCnf = await invokeAsync(this.generateKid.bind(this), PerformanceEvents.PopTokenGenerateCnf, logger, this.performanceClient, request.correlationId)(request); - const reqCnfString = this.cryptoUtils.base64UrlEncode(JSON.stringify(reqCnf)); - return { - kid: reqCnf.kid, - reqCnfString, - }; - } - /** - * Generates key_id for a SHR token request - * @param request - * @returns - */ - async generateKid(request) { - this.performanceClient?.addQueueMeasurement(PerformanceEvents.PopTokenGenerateKid, request.correlationId); - const kidThumbprint = await this.cryptoUtils.getPublicKeyThumbprint(request); - return { - kid: kidThumbprint, - xms_ksl: KeyLocation.SW, - }; - } - /** - * Signs the POP access_token with the local generated key-pair - * @param accessToken - * @param request - * @returns - */ - async signPopToken(accessToken, keyId, request) { - return this.signPayload(accessToken, keyId, request); - } - /** - * Utility function to generate the signed JWT for an access_token - * @param payload - * @param kid - * @param request - * @param claims - * @returns - */ - async signPayload(payload, keyId, request, claims) { - // Deconstruct request to extract SHR parameters - const { resourceRequestMethod, resourceRequestUri, shrClaims, shrNonce, shrOptions, } = request; - const resourceUrlString = resourceRequestUri - ? new UrlString(resourceRequestUri) - : undefined; - const resourceUrlComponents = resourceUrlString?.getUrlComponents(); - return this.cryptoUtils.signJwt({ - at: payload, - ts: nowSeconds(), - m: resourceRequestMethod?.toUpperCase(), - u: resourceUrlComponents?.HostNameAndPort, - nonce: shrNonce || this.cryptoUtils.createNewGuid(), - p: resourceUrlComponents?.AbsolutePath, - q: resourceUrlComponents?.QueryString - ? [[], resourceUrlComponents.QueryString] - : undefined, - client_claims: shrClaims || undefined, - ...claims, - }, keyId, shrOptions, request.correlationId); - } -} - -export { PopTokenGenerator }; -//# sourceMappingURL=PopTokenGenerator.mjs.map diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/crypto/PopTokenGenerator.mjs.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/crypto/PopTokenGenerator.mjs.map deleted file mode 100644 index e6f985e..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/crypto/PopTokenGenerator.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"PopTokenGenerator.mjs","sources":["../../src/crypto/PopTokenGenerator.ts"],"sourcesContent":[null],"names":["TimeUtils.nowSeconds"],"mappings":";;;;;;;AAAA;;;AAGG;AA2BH,MAAM,WAAW,GAAG;AAChB,IAAA,EAAE,EAAE,IAAI;AACR,IAAA,GAAG,EAAE,KAAK;CACJ,CAAC;AAGX;MACa,iBAAiB,CAAA;IAI1B,WAAY,CAAA,WAAoB,EAAE,iBAAsC,EAAA;AACpE,QAAA,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;AAC/B,QAAA,IAAI,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;KAC9C;AAED;;;;;AAKG;AACH,IAAA,MAAM,WAAW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GAAG,OAAO,CAAC;QAEZ,MAAM,iBAAiB,GAAG,kBAAkB;AACxC,cAAE,IAAI,SAAS,CAAC,kBAAkB,CAAC;cACjC,SAAS,CAAC;AAChB,QAAA,MAAM,qBAAqB,GAAG,iBAAiB,EAAE,gBAAgB,EAAE,CAAC;AACpE,QAAA,OAAO,IAAI,CAAC,WAAW,CAAC,OAAO,CAC3B;AACI,YAAA,EAAE,EAAE,OAAO;AACX,YAAA,EAAE,EAAEA,UAAoB,EAAE;AAC1B,YAAA,CAAC,EAAE,qBAAqB,EAAE,WAAW,EAAE;YACvC,CAAC,EAAE,qBAAqB,EAAE,eAAe;YACzC,KAAK,EAAE,QAAQ,IAAI,IAAI,CAAC,WAAW,CAAC,aAAa,EAAE;YACnD,CAAC,EAAE,qBAAqB,EAAE,YAAY;YACtC,CAAC,EAAE,qBAAqB,EAAE,WAAW;AACjC,kBAAE,CAAC,EAAE,EAAE,qBAAqB,CAAC,WAAW,CAAC;AACzC,kBAAE,SAAS;YACf,aAAa,EAAE,SAAS,IAAI,SAAS;AACrC,YAAA,GAAG,MAAM;SACZ,EACD,KAAK,EACL,UAAU,EACV,OAAO,CAAC,aAAa,CACxB,CAAC;KACL;AACJ;;;;"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/crypto/SignedHttpRequest.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/crypto/SignedHttpRequest.d.ts deleted file mode 100644 index 960970f..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/crypto/SignedHttpRequest.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { JoseHeaderOptions } from "./JoseHeader.js"; -export type SignedHttpRequest = { - at?: string; - cnf?: object; - m?: string; - u?: string; - p?: string; - q?: [Array, string]; - ts?: number; - nonce?: string; - client_claims?: string; -}; -export type ShrOptions = { - header: JoseHeaderOptions; -}; -//# sourceMappingURL=SignedHttpRequest.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/crypto/SignedHttpRequest.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/crypto/SignedHttpRequest.d.ts.map deleted file mode 100644 index 39f2b40..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/crypto/SignedHttpRequest.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"SignedHttpRequest.d.ts","sourceRoot":"","sources":["../../src/crypto/SignedHttpRequest.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAEpD,MAAM,MAAM,iBAAiB,GAAG;IAC5B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,CAAC;IAC5B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,aAAa,CAAC,EAAE,MAAM,CAAC;CAC1B,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG;IACrB,MAAM,EAAE,iBAAiB,CAAC;CAC7B,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/AuthError.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/AuthError.d.ts deleted file mode 100644 index b3bceb8..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/AuthError.d.ts +++ /dev/null @@ -1,45 +0,0 @@ -import * as AuthErrorCodes from "./AuthErrorCodes.js"; -export { AuthErrorCodes }; -export declare const AuthErrorMessages: { - unexpected_error: string; - post_request_failed: string; -}; -/** - * AuthErrorMessage class containing string constants used by error codes and messages. - * @deprecated Use AuthErrorCodes instead - */ -export declare const AuthErrorMessage: { - unexpectedError: { - code: string; - desc: string; - }; - postRequestFailed: { - code: string; - desc: string; - }; -}; -/** - * General error class thrown by the MSAL.js library. - */ -export declare class AuthError extends Error { - /** - * Short string denoting error - */ - errorCode: string; - /** - * Detailed description of error - */ - errorMessage: string; - /** - * Describes the subclass of an error - */ - subError: string; - /** - * CorrelationId associated with the error - */ - correlationId: string; - constructor(errorCode?: string, errorMessage?: string, suberror?: string); - setCorrelationId(correlationId: string): void; -} -export declare function createAuthError(code: string, additionalMessage?: string): AuthError; -//# sourceMappingURL=AuthError.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/AuthError.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/AuthError.d.ts.map deleted file mode 100644 index cab6017..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/AuthError.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AuthError.d.ts","sourceRoot":"","sources":["../../src/error/AuthError.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,cAAc,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,CAAC;AAE1B,eAAO,MAAM,iBAAiB;;;CAI7B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;CAS5B,CAAC;AAEF;;GAEG;AACH,qBAAa,SAAU,SAAQ,KAAK;IAChC;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;gBAEV,SAAS,CAAC,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM;IAaxE,gBAAgB,CAAC,aAAa,EAAE,MAAM,GAAG,IAAI;CAGhD;AAED,wBAAgB,eAAe,CAC3B,IAAI,EAAE,MAAM,EACZ,iBAAiB,CAAC,EAAE,MAAM,GAC3B,SAAS,CAOX"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/AuthError.mjs b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/AuthError.mjs deleted file mode 100644 index 6fd7b78..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/AuthError.mjs +++ /dev/null @@ -1,56 +0,0 @@ -/*! @azure/msal-common v14.16.1 2025-08-05 */ -'use strict'; -import { Constants } from '../utils/Constants.mjs'; -import { unexpectedError, postRequestFailed } from './AuthErrorCodes.mjs'; -import * as AuthErrorCodes from './AuthErrorCodes.mjs'; -export { AuthErrorCodes }; - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -const AuthErrorMessages = { - [unexpectedError]: "Unexpected error in authentication.", - [postRequestFailed]: "Post request failed from the network, could be a 4xx/5xx or a network unavailability. Please check the exact error code for details.", -}; -/** - * AuthErrorMessage class containing string constants used by error codes and messages. - * @deprecated Use AuthErrorCodes instead - */ -const AuthErrorMessage = { - unexpectedError: { - code: unexpectedError, - desc: AuthErrorMessages[unexpectedError], - }, - postRequestFailed: { - code: postRequestFailed, - desc: AuthErrorMessages[postRequestFailed], - }, -}; -/** - * General error class thrown by the MSAL.js library. - */ -class AuthError extends Error { - constructor(errorCode, errorMessage, suberror) { - const errorString = errorMessage - ? `${errorCode}: ${errorMessage}` - : errorCode; - super(errorString); - Object.setPrototypeOf(this, AuthError.prototype); - this.errorCode = errorCode || Constants.EMPTY_STRING; - this.errorMessage = errorMessage || Constants.EMPTY_STRING; - this.subError = suberror || Constants.EMPTY_STRING; - this.name = "AuthError"; - } - setCorrelationId(correlationId) { - this.correlationId = correlationId; - } -} -function createAuthError(code, additionalMessage) { - return new AuthError(code, additionalMessage - ? `${AuthErrorMessages[code]} ${additionalMessage}` - : AuthErrorMessages[code]); -} - -export { AuthError, AuthErrorMessage, AuthErrorMessages, createAuthError }; -//# sourceMappingURL=AuthError.mjs.map diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/AuthError.mjs.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/AuthError.mjs.map deleted file mode 100644 index b29772f..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/AuthError.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AuthError.mjs","sources":["../../src/error/AuthError.ts"],"sourcesContent":[null],"names":["AuthErrorCodes.unexpectedError","AuthErrorCodes.postRequestFailed"],"mappings":";;;;;;;AAAA;;;AAGG;AAMU,MAAA,iBAAiB,GAAG;AAC7B,IAAA,CAACA,eAA8B,GAAG,qCAAqC;AACvE,IAAA,CAACC,iBAAgC,GAC7B,sIAAsI;EAC5I;AAEF;;;AAGG;AACU,MAAA,gBAAgB,GAAG;AAC5B,IAAA,eAAe,EAAE;QACb,IAAI,EAAED,eAA8B;AACpC,QAAA,IAAI,EAAE,iBAAiB,CAACA,eAA8B,CAAC;AAC1D,KAAA;AACD,IAAA,iBAAiB,EAAE;QACf,IAAI,EAAEC,iBAAgC;AACtC,QAAA,IAAI,EAAE,iBAAiB,CAACA,iBAAgC,CAAC;AAC5D,KAAA;EACH;AAEF;;AAEG;AACG,MAAO,SAAU,SAAQ,KAAK,CAAA;AAqBhC,IAAA,WAAA,CAAY,SAAkB,EAAE,YAAqB,EAAE,QAAiB,EAAA;QACpE,MAAM,WAAW,GAAG,YAAY;AAC5B,cAAE,CAAA,EAAG,SAAS,CAAA,EAAA,EAAK,YAAY,CAAE,CAAA;cAC/B,SAAS,CAAC;QAChB,KAAK,CAAC,WAAW,CAAC,CAAC;QACnB,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;QAEjD,IAAI,CAAC,SAAS,GAAG,SAAS,IAAI,SAAS,CAAC,YAAY,CAAC;QACrD,IAAI,CAAC,YAAY,GAAG,YAAY,IAAI,SAAS,CAAC,YAAY,CAAC;QAC3D,IAAI,CAAC,QAAQ,GAAG,QAAQ,IAAI,SAAS,CAAC,YAAY,CAAC;AACnD,QAAA,IAAI,CAAC,IAAI,GAAG,WAAW,CAAC;KAC3B;AAED,IAAA,gBAAgB,CAAC,aAAqB,EAAA;AAClC,QAAA,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;KACtC;AACJ,CAAA;AAEe,SAAA,eAAe,CAC3B,IAAY,EACZ,iBAA0B,EAAA;AAE1B,IAAA,OAAO,IAAI,SAAS,CAChB,IAAI,EACJ,iBAAiB;UACX,GAAG,iBAAiB,CAAC,IAAI,CAAC,CAAA,CAAA,EAAI,iBAAiB,CAAE,CAAA;AACnD,UAAE,iBAAiB,CAAC,IAAI,CAAC,CAChC,CAAC;AACN;;;;"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/AuthErrorCodes.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/AuthErrorCodes.d.ts deleted file mode 100644 index a320435..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/AuthErrorCodes.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -/** - * AuthErrorMessage class containing string constants used by error codes and messages. - */ -export declare const unexpectedError = "unexpected_error"; -export declare const postRequestFailed = "post_request_failed"; -//# sourceMappingURL=AuthErrorCodes.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/AuthErrorCodes.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/AuthErrorCodes.d.ts.map deleted file mode 100644 index 73f1721..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/AuthErrorCodes.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AuthErrorCodes.d.ts","sourceRoot":"","sources":["../../src/error/AuthErrorCodes.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,eAAO,MAAM,eAAe,qBAAqB,CAAC;AAClD,eAAO,MAAM,iBAAiB,wBAAwB,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/AuthErrorCodes.mjs b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/AuthErrorCodes.mjs deleted file mode 100644 index c938fe4..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/AuthErrorCodes.mjs +++ /dev/null @@ -1,14 +0,0 @@ -/*! @azure/msal-common v14.16.1 2025-08-05 */ -'use strict'; -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * AuthErrorMessage class containing string constants used by error codes and messages. - */ -const unexpectedError = "unexpected_error"; -const postRequestFailed = "post_request_failed"; - -export { postRequestFailed, unexpectedError }; -//# sourceMappingURL=AuthErrorCodes.mjs.map diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/AuthErrorCodes.mjs.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/AuthErrorCodes.mjs.map deleted file mode 100644 index dc79603..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/AuthErrorCodes.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AuthErrorCodes.mjs","sources":["../../src/error/AuthErrorCodes.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAAA;;;AAGG;AAEH;;AAEG;AACI,MAAM,eAAe,GAAG,mBAAmB;AAC3C,MAAM,iBAAiB,GAAG;;;;"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/CacheError.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/CacheError.d.ts deleted file mode 100644 index 113e38c..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/CacheError.d.ts +++ /dev/null @@ -1,27 +0,0 @@ -import * as CacheErrorCodes from "./CacheErrorCodes.js"; -export { CacheErrorCodes }; -export declare const CacheErrorMessages: { - cache_quota_exceeded: string; - cache_error_unknown: string; -}; -/** - * Error thrown when there is an error with the cache - */ -export declare class CacheError extends Error { - /** - * Short string denoting error - */ - errorCode: string; - /** - * Detailed description of error - */ - errorMessage: string; - constructor(errorCode: string, errorMessage?: string); -} -/** - * Helper function to wrap browser errors in a CacheError object - * @param e - * @returns - */ -export declare function createCacheError(e: unknown): CacheError; -//# sourceMappingURL=CacheError.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/CacheError.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/CacheError.d.ts.map deleted file mode 100644 index 616d1f8..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/CacheError.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"CacheError.d.ts","sourceRoot":"","sources":["../../src/error/CacheError.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,eAAe,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,CAAC;AAE3B,eAAO,MAAM,kBAAkB;;;CAI9B,CAAC;AAEF;;GAEG;AACH,qBAAa,UAAW,SAAQ,KAAK;IACjC;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;gBAET,SAAS,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,MAAM;CAcvD;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,OAAO,GAAG,UAAU,CAcvD"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/CacheError.mjs b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/CacheError.mjs deleted file mode 100644 index 70a03dc..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/CacheError.mjs +++ /dev/null @@ -1,51 +0,0 @@ -/*! @azure/msal-common v14.16.1 2025-08-05 */ -'use strict'; -import { cacheErrorUnknown, cacheQuotaExceeded } from './CacheErrorCodes.mjs'; -import * as CacheErrorCodes from './CacheErrorCodes.mjs'; -export { CacheErrorCodes }; - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -const CacheErrorMessages = { - [cacheQuotaExceeded]: "Exceeded cache storage capacity.", - [cacheErrorUnknown]: "Unexpected error occurred when using cache storage.", -}; -/** - * Error thrown when there is an error with the cache - */ -class CacheError extends Error { - constructor(errorCode, errorMessage) { - const message = errorMessage || - (CacheErrorMessages[errorCode] - ? CacheErrorMessages[errorCode] - : CacheErrorMessages[cacheErrorUnknown]); - super(`${errorCode}: ${message}`); - Object.setPrototypeOf(this, CacheError.prototype); - this.name = "CacheError"; - this.errorCode = errorCode; - this.errorMessage = message; - } -} -/** - * Helper function to wrap browser errors in a CacheError object - * @param e - * @returns - */ -function createCacheError(e) { - if (!(e instanceof Error)) { - return new CacheError(cacheErrorUnknown); - } - if (e.name === "QuotaExceededError" || - e.name === "NS_ERROR_DOM_QUOTA_REACHED" || - e.message.includes("exceeded the quota")) { - return new CacheError(cacheQuotaExceeded); - } - else { - return new CacheError(e.name, e.message); - } -} - -export { CacheError, CacheErrorMessages, createCacheError }; -//# sourceMappingURL=CacheError.mjs.map diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/CacheError.mjs.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/CacheError.mjs.map deleted file mode 100644 index 7cb1b23..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/CacheError.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"CacheError.mjs","sources":["../../src/error/CacheError.ts"],"sourcesContent":[null],"names":["CacheErrorCodes.cacheQuotaExceeded","CacheErrorCodes.cacheErrorUnknown"],"mappings":";;;;;;AAAA;;;AAGG;AAKU,MAAA,kBAAkB,GAAG;AAC9B,IAAA,CAACA,kBAAkC,GAAG,kCAAkC;AACxE,IAAA,CAACC,iBAAiC,GAC9B,qDAAqD;EAC3D;AAEF;;AAEG;AACG,MAAO,UAAW,SAAQ,KAAK,CAAA;IAWjC,WAAY,CAAA,SAAiB,EAAE,YAAqB,EAAA;QAChD,MAAM,OAAO,GACT,YAAY;aACX,kBAAkB,CAAC,SAAS,CAAC;AAC1B,kBAAE,kBAAkB,CAAC,SAAS,CAAC;kBAC7B,kBAAkB,CAACA,iBAAiC,CAAC,CAAC,CAAC;AAEjE,QAAA,KAAK,CAAC,CAAG,EAAA,SAAS,KAAK,OAAO,CAAA,CAAE,CAAC,CAAC;QAClC,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC;AAElD,QAAA,IAAI,CAAC,IAAI,GAAG,YAAY,CAAC;AACzB,QAAA,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;AAC3B,QAAA,IAAI,CAAC,YAAY,GAAG,OAAO,CAAC;KAC/B;AACJ,CAAA;AAED;;;;AAIG;AACG,SAAU,gBAAgB,CAAC,CAAU,EAAA;AACvC,IAAA,IAAI,EAAE,CAAC,YAAY,KAAK,CAAC,EAAE;AACvB,QAAA,OAAO,IAAI,UAAU,CAACA,iBAAiC,CAAC,CAAC;AAC5D,KAAA;AAED,IAAA,IACI,CAAC,CAAC,IAAI,KAAK,oBAAoB;QAC/B,CAAC,CAAC,IAAI,KAAK,4BAA4B;AACvC,QAAA,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,oBAAoB,CAAC,EAC1C;AACE,QAAA,OAAO,IAAI,UAAU,CAACD,kBAAkC,CAAC,CAAC;AAC7D,KAAA;AAAM,SAAA;QACH,OAAO,IAAI,UAAU,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC;AAC5C,KAAA;AACL;;;;"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/CacheErrorCodes.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/CacheErrorCodes.d.ts deleted file mode 100644 index 5546079..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/CacheErrorCodes.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export declare const cacheQuotaExceeded = "cache_quota_exceeded"; -export declare const cacheErrorUnknown = "cache_error_unknown"; -//# sourceMappingURL=CacheErrorCodes.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/CacheErrorCodes.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/CacheErrorCodes.d.ts.map deleted file mode 100644 index 37b8abd..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/CacheErrorCodes.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"CacheErrorCodes.d.ts","sourceRoot":"","sources":["../../src/error/CacheErrorCodes.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,kBAAkB,yBAAyB,CAAC;AACzD,eAAO,MAAM,iBAAiB,wBAAwB,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/CacheErrorCodes.mjs b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/CacheErrorCodes.mjs deleted file mode 100644 index e36a3a0..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/CacheErrorCodes.mjs +++ /dev/null @@ -1,11 +0,0 @@ -/*! @azure/msal-common v14.16.1 2025-08-05 */ -'use strict'; -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -const cacheQuotaExceeded = "cache_quota_exceeded"; -const cacheErrorUnknown = "cache_error_unknown"; - -export { cacheErrorUnknown, cacheQuotaExceeded }; -//# sourceMappingURL=CacheErrorCodes.mjs.map diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/CacheErrorCodes.mjs.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/CacheErrorCodes.mjs.map deleted file mode 100644 index ce795ad..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/CacheErrorCodes.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"CacheErrorCodes.mjs","sources":["../../src/error/CacheErrorCodes.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAAA;;;AAGG;AAEI,MAAM,kBAAkB,GAAG,uBAAuB;AAClD,MAAM,iBAAiB,GAAG;;;;"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/ClientAuthError.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/ClientAuthError.d.ts deleted file mode 100644 index ef750a9..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/ClientAuthError.d.ts +++ /dev/null @@ -1,238 +0,0 @@ -import { AuthError } from "./AuthError.js"; -import * as ClientAuthErrorCodes from "./ClientAuthErrorCodes.js"; -export { ClientAuthErrorCodes }; -/** - * ClientAuthErrorMessage class containing string constants used by error codes and messages. - */ -export declare const ClientAuthErrorMessages: { - client_info_decoding_error: string; - client_info_empty_error: string; - token_parsing_error: string; - null_or_empty_token: string; - endpoints_resolution_error: string; - network_error: string; - openid_config_error: string; - hash_not_deserialized: string; - invalid_state: string; - state_mismatch: string; - state_not_found: string; - nonce_mismatch: string; - auth_time_not_found: string; - max_age_transpired: string; - multiple_matching_tokens: string; - multiple_matching_accounts: string; - multiple_matching_appMetadata: string; - request_cannot_be_made: string; - cannot_remove_empty_scope: string; - cannot_append_scopeset: string; - empty_input_scopeset: string; - device_code_polling_cancelled: string; - device_code_expired: string; - device_code_unknown_error: string; - no_account_in_silent_request: string; - invalid_cache_record: string; - invalid_cache_environment: string; - no_account_found: string; - no_crypto_object: string; - unexpected_credential_type: string; - invalid_assertion: string; - invalid_client_credential: string; - token_refresh_required: string; - user_timeout_reached: string; - token_claims_cnf_required_for_signedjwt: string; - authorization_code_missing_from_server_response: string; - binding_key_not_removed: string; - end_session_endpoint_not_supported: string; - key_id_missing: string; - no_network_connectivity: string; - user_canceled: string; - missing_tenant_id_error: string; - method_not_implemented: string; - nested_app_auth_bridge_disabled: string; -}; -/** - * String constants used by error codes and messages. - * @deprecated Use ClientAuthErrorCodes instead - */ -export declare const ClientAuthErrorMessage: { - clientInfoDecodingError: { - code: string; - desc: string; - }; - clientInfoEmptyError: { - code: string; - desc: string; - }; - tokenParsingError: { - code: string; - desc: string; - }; - nullOrEmptyToken: { - code: string; - desc: string; - }; - endpointResolutionError: { - code: string; - desc: string; - }; - networkError: { - code: string; - desc: string; - }; - unableToGetOpenidConfigError: { - code: string; - desc: string; - }; - hashNotDeserialized: { - code: string; - desc: string; - }; - invalidStateError: { - code: string; - desc: string; - }; - stateMismatchError: { - code: string; - desc: string; - }; - stateNotFoundError: { - code: string; - desc: string; - }; - nonceMismatchError: { - code: string; - desc: string; - }; - authTimeNotFoundError: { - code: string; - desc: string; - }; - maxAgeTranspired: { - code: string; - desc: string; - }; - multipleMatchingTokens: { - code: string; - desc: string; - }; - multipleMatchingAccounts: { - code: string; - desc: string; - }; - multipleMatchingAppMetadata: { - code: string; - desc: string; - }; - tokenRequestCannotBeMade: { - code: string; - desc: string; - }; - removeEmptyScopeError: { - code: string; - desc: string; - }; - appendScopeSetError: { - code: string; - desc: string; - }; - emptyInputScopeSetError: { - code: string; - desc: string; - }; - DeviceCodePollingCancelled: { - code: string; - desc: string; - }; - DeviceCodeExpired: { - code: string; - desc: string; - }; - DeviceCodeUnknownError: { - code: string; - desc: string; - }; - NoAccountInSilentRequest: { - code: string; - desc: string; - }; - invalidCacheRecord: { - code: string; - desc: string; - }; - invalidCacheEnvironment: { - code: string; - desc: string; - }; - noAccountFound: { - code: string; - desc: string; - }; - noCryptoObj: { - code: string; - desc: string; - }; - unexpectedCredentialType: { - code: string; - desc: string; - }; - invalidAssertion: { - code: string; - desc: string; - }; - invalidClientCredential: { - code: string; - desc: string; - }; - tokenRefreshRequired: { - code: string; - desc: string; - }; - userTimeoutReached: { - code: string; - desc: string; - }; - tokenClaimsRequired: { - code: string; - desc: string; - }; - noAuthorizationCodeFromServer: { - code: string; - desc: string; - }; - bindingKeyNotRemovedError: { - code: string; - desc: string; - }; - logoutNotSupported: { - code: string; - desc: string; - }; - keyIdMissing: { - code: string; - desc: string; - }; - noNetworkConnectivity: { - code: string; - desc: string; - }; - userCanceledError: { - code: string; - desc: string; - }; - missingTenantIdError: { - code: string; - desc: string; - }; - nestedAppAuthBridgeDisabled: { - code: string; - desc: string; - }; -}; -/** - * Error thrown when there is an error in the client code running on the browser. - */ -export declare class ClientAuthError extends AuthError { - constructor(errorCode: string, additionalMessage?: string); -} -export declare function createClientAuthError(errorCode: string, additionalMessage?: string): ClientAuthError; -//# sourceMappingURL=ClientAuthError.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/ClientAuthError.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/ClientAuthError.d.ts.map deleted file mode 100644 index dec75e2..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/ClientAuthError.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ClientAuthError.d.ts","sourceRoot":"","sources":["../../src/error/ClientAuthError.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,KAAK,oBAAoB,MAAM,2BAA2B,CAAC;AAClE,OAAO,EAAE,oBAAoB,EAAE,CAAC;AAEhC;;GAEG;AAEH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgFnC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyNlC,CAAC;AAEF;;GAEG;AACH,qBAAa,eAAgB,SAAQ,SAAS;gBAC9B,SAAS,EAAE,MAAM,EAAE,iBAAiB,CAAC,EAAE,MAAM;CAW5D;AAED,wBAAgB,qBAAqB,CACjC,SAAS,EAAE,MAAM,EACjB,iBAAiB,CAAC,EAAE,MAAM,GAC3B,eAAe,CAEjB"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/ClientAuthError.mjs b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/ClientAuthError.mjs deleted file mode 100644 index aa45cee..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/ClientAuthError.mjs +++ /dev/null @@ -1,259 +0,0 @@ -/*! @azure/msal-common v14.16.1 2025-08-05 */ -'use strict'; -import { AuthError } from './AuthError.mjs'; -import { clientInfoDecodingError, clientInfoEmptyError, tokenParsingError, nullOrEmptyToken, endpointResolutionError, networkError, openIdConfigError, hashNotDeserialized, invalidState, stateMismatch, stateNotFound, nonceMismatch, authTimeNotFound, maxAgeTranspired, multipleMatchingTokens, multipleMatchingAccounts, multipleMatchingAppMetadata, requestCannotBeMade, cannotRemoveEmptyScope, cannotAppendScopeSet, emptyInputScopeSet, deviceCodePollingCancelled, deviceCodeExpired, deviceCodeUnknownError, noAccountInSilentRequest, invalidCacheRecord, invalidCacheEnvironment, noAccountFound, noCryptoObject, unexpectedCredentialType, invalidAssertion, invalidClientCredential, tokenRefreshRequired, userTimeoutReached, tokenClaimsCnfRequiredForSignedJwt, authorizationCodeMissingFromServerResponse, bindingKeyNotRemoved, endSessionEndpointNotSupported, keyIdMissing, noNetworkConnectivity, userCanceled, missingTenantIdError, nestedAppAuthBridgeDisabled, methodNotImplemented } from './ClientAuthErrorCodes.mjs'; -import * as ClientAuthErrorCodes from './ClientAuthErrorCodes.mjs'; -export { ClientAuthErrorCodes }; - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * ClientAuthErrorMessage class containing string constants used by error codes and messages. - */ -const ClientAuthErrorMessages = { - [clientInfoDecodingError]: "The client info could not be parsed/decoded correctly", - [clientInfoEmptyError]: "The client info was empty", - [tokenParsingError]: "Token cannot be parsed", - [nullOrEmptyToken]: "The token is null or empty", - [endpointResolutionError]: "Endpoints cannot be resolved", - [networkError]: "Network request failed", - [openIdConfigError]: "Could not retrieve endpoints. Check your authority and verify the .well-known/openid-configuration endpoint returns the required endpoints.", - [hashNotDeserialized]: "The hash parameters could not be deserialized", - [invalidState]: "State was not the expected format", - [stateMismatch]: "State mismatch error", - [stateNotFound]: "State not found", - [nonceMismatch]: "Nonce mismatch error", - [authTimeNotFound]: "Max Age was requested and the ID token is missing the auth_time variable." + - " auth_time is an optional claim and is not enabled by default - it must be enabled." + - " See https://aka.ms/msaljs/optional-claims for more information.", - [maxAgeTranspired]: "Max Age is set to 0, or too much time has elapsed since the last end-user authentication.", - [multipleMatchingTokens]: "The cache contains multiple tokens satisfying the requirements. " + - "Call AcquireToken again providing more requirements such as authority or account.", - [multipleMatchingAccounts]: "The cache contains multiple accounts satisfying the given parameters. Please pass more info to obtain the correct account", - [multipleMatchingAppMetadata]: "The cache contains multiple appMetadata satisfying the given parameters. Please pass more info to obtain the correct appMetadata", - [requestCannotBeMade]: "Token request cannot be made without authorization code or refresh token.", - [cannotRemoveEmptyScope]: "Cannot remove null or empty scope from ScopeSet", - [cannotAppendScopeSet]: "Cannot append ScopeSet", - [emptyInputScopeSet]: "Empty input ScopeSet cannot be processed", - [deviceCodePollingCancelled]: "Caller has cancelled token endpoint polling during device code flow by setting DeviceCodeRequest.cancel = true.", - [deviceCodeExpired]: "Device code is expired.", - [deviceCodeUnknownError]: "Device code stopped polling for unknown reasons.", - [noAccountInSilentRequest]: "Please pass an account object, silent flow is not supported without account information", - [invalidCacheRecord]: "Cache record object was null or undefined.", - [invalidCacheEnvironment]: "Invalid environment when attempting to create cache entry", - [noAccountFound]: "No account found in cache for given key.", - [noCryptoObject]: "No crypto object detected.", - [unexpectedCredentialType]: "Unexpected credential type.", - [invalidAssertion]: "Client assertion must meet requirements described in https://tools.ietf.org/html/rfc7515", - [invalidClientCredential]: "Client credential (secret, certificate, or assertion) must not be empty when creating a confidential client. An application should at most have one credential", - [tokenRefreshRequired]: "Cannot return token from cache because it must be refreshed. This may be due to one of the following reasons: forceRefresh parameter is set to true, claims have been requested, there is no cached access token or it is expired.", - [userTimeoutReached]: "User defined timeout for device code polling reached", - [tokenClaimsCnfRequiredForSignedJwt]: "Cannot generate a POP jwt if the token_claims are not populated", - [authorizationCodeMissingFromServerResponse]: "Server response does not contain an authorization code to proceed", - [bindingKeyNotRemoved]: "Could not remove the credential's binding key from storage.", - [endSessionEndpointNotSupported]: "The provided authority does not support logout", - [keyIdMissing]: "A keyId value is missing from the requested bound token's cache record and is required to match the token to it's stored binding key.", - [noNetworkConnectivity]: "No network connectivity. Check your internet connection.", - [userCanceled]: "User cancelled the flow.", - [missingTenantIdError]: "A tenant id - not common, organizations, or consumers - must be specified when using the client_credentials flow.", - [methodNotImplemented]: "This method has not been implemented", - [nestedAppAuthBridgeDisabled]: "The nested app auth bridge is disabled", -}; -/** - * String constants used by error codes and messages. - * @deprecated Use ClientAuthErrorCodes instead - */ -const ClientAuthErrorMessage = { - clientInfoDecodingError: { - code: clientInfoDecodingError, - desc: ClientAuthErrorMessages[clientInfoDecodingError], - }, - clientInfoEmptyError: { - code: clientInfoEmptyError, - desc: ClientAuthErrorMessages[clientInfoEmptyError], - }, - tokenParsingError: { - code: tokenParsingError, - desc: ClientAuthErrorMessages[tokenParsingError], - }, - nullOrEmptyToken: { - code: nullOrEmptyToken, - desc: ClientAuthErrorMessages[nullOrEmptyToken], - }, - endpointResolutionError: { - code: endpointResolutionError, - desc: ClientAuthErrorMessages[endpointResolutionError], - }, - networkError: { - code: networkError, - desc: ClientAuthErrorMessages[networkError], - }, - unableToGetOpenidConfigError: { - code: openIdConfigError, - desc: ClientAuthErrorMessages[openIdConfigError], - }, - hashNotDeserialized: { - code: hashNotDeserialized, - desc: ClientAuthErrorMessages[hashNotDeserialized], - }, - invalidStateError: { - code: invalidState, - desc: ClientAuthErrorMessages[invalidState], - }, - stateMismatchError: { - code: stateMismatch, - desc: ClientAuthErrorMessages[stateMismatch], - }, - stateNotFoundError: { - code: stateNotFound, - desc: ClientAuthErrorMessages[stateNotFound], - }, - nonceMismatchError: { - code: nonceMismatch, - desc: ClientAuthErrorMessages[nonceMismatch], - }, - authTimeNotFoundError: { - code: authTimeNotFound, - desc: ClientAuthErrorMessages[authTimeNotFound], - }, - maxAgeTranspired: { - code: maxAgeTranspired, - desc: ClientAuthErrorMessages[maxAgeTranspired], - }, - multipleMatchingTokens: { - code: multipleMatchingTokens, - desc: ClientAuthErrorMessages[multipleMatchingTokens], - }, - multipleMatchingAccounts: { - code: multipleMatchingAccounts, - desc: ClientAuthErrorMessages[multipleMatchingAccounts], - }, - multipleMatchingAppMetadata: { - code: multipleMatchingAppMetadata, - desc: ClientAuthErrorMessages[multipleMatchingAppMetadata], - }, - tokenRequestCannotBeMade: { - code: requestCannotBeMade, - desc: ClientAuthErrorMessages[requestCannotBeMade], - }, - removeEmptyScopeError: { - code: cannotRemoveEmptyScope, - desc: ClientAuthErrorMessages[cannotRemoveEmptyScope], - }, - appendScopeSetError: { - code: cannotAppendScopeSet, - desc: ClientAuthErrorMessages[cannotAppendScopeSet], - }, - emptyInputScopeSetError: { - code: emptyInputScopeSet, - desc: ClientAuthErrorMessages[emptyInputScopeSet], - }, - DeviceCodePollingCancelled: { - code: deviceCodePollingCancelled, - desc: ClientAuthErrorMessages[deviceCodePollingCancelled], - }, - DeviceCodeExpired: { - code: deviceCodeExpired, - desc: ClientAuthErrorMessages[deviceCodeExpired], - }, - DeviceCodeUnknownError: { - code: deviceCodeUnknownError, - desc: ClientAuthErrorMessages[deviceCodeUnknownError], - }, - NoAccountInSilentRequest: { - code: noAccountInSilentRequest, - desc: ClientAuthErrorMessages[noAccountInSilentRequest], - }, - invalidCacheRecord: { - code: invalidCacheRecord, - desc: ClientAuthErrorMessages[invalidCacheRecord], - }, - invalidCacheEnvironment: { - code: invalidCacheEnvironment, - desc: ClientAuthErrorMessages[invalidCacheEnvironment], - }, - noAccountFound: { - code: noAccountFound, - desc: ClientAuthErrorMessages[noAccountFound], - }, - noCryptoObj: { - code: noCryptoObject, - desc: ClientAuthErrorMessages[noCryptoObject], - }, - unexpectedCredentialType: { - code: unexpectedCredentialType, - desc: ClientAuthErrorMessages[unexpectedCredentialType], - }, - invalidAssertion: { - code: invalidAssertion, - desc: ClientAuthErrorMessages[invalidAssertion], - }, - invalidClientCredential: { - code: invalidClientCredential, - desc: ClientAuthErrorMessages[invalidClientCredential], - }, - tokenRefreshRequired: { - code: tokenRefreshRequired, - desc: ClientAuthErrorMessages[tokenRefreshRequired], - }, - userTimeoutReached: { - code: userTimeoutReached, - desc: ClientAuthErrorMessages[userTimeoutReached], - }, - tokenClaimsRequired: { - code: tokenClaimsCnfRequiredForSignedJwt, - desc: ClientAuthErrorMessages[tokenClaimsCnfRequiredForSignedJwt], - }, - noAuthorizationCodeFromServer: { - code: authorizationCodeMissingFromServerResponse, - desc: ClientAuthErrorMessages[authorizationCodeMissingFromServerResponse], - }, - bindingKeyNotRemovedError: { - code: bindingKeyNotRemoved, - desc: ClientAuthErrorMessages[bindingKeyNotRemoved], - }, - logoutNotSupported: { - code: endSessionEndpointNotSupported, - desc: ClientAuthErrorMessages[endSessionEndpointNotSupported], - }, - keyIdMissing: { - code: keyIdMissing, - desc: ClientAuthErrorMessages[keyIdMissing], - }, - noNetworkConnectivity: { - code: noNetworkConnectivity, - desc: ClientAuthErrorMessages[noNetworkConnectivity], - }, - userCanceledError: { - code: userCanceled, - desc: ClientAuthErrorMessages[userCanceled], - }, - missingTenantIdError: { - code: missingTenantIdError, - desc: ClientAuthErrorMessages[missingTenantIdError], - }, - nestedAppAuthBridgeDisabled: { - code: nestedAppAuthBridgeDisabled, - desc: ClientAuthErrorMessages[nestedAppAuthBridgeDisabled], - }, -}; -/** - * Error thrown when there is an error in the client code running on the browser. - */ -class ClientAuthError extends AuthError { - constructor(errorCode, additionalMessage) { - super(errorCode, additionalMessage - ? `${ClientAuthErrorMessages[errorCode]}: ${additionalMessage}` - : ClientAuthErrorMessages[errorCode]); - this.name = "ClientAuthError"; - Object.setPrototypeOf(this, ClientAuthError.prototype); - } -} -function createClientAuthError(errorCode, additionalMessage) { - return new ClientAuthError(errorCode, additionalMessage); -} - -export { ClientAuthError, ClientAuthErrorMessage, ClientAuthErrorMessages, createClientAuthError }; -//# sourceMappingURL=ClientAuthError.mjs.map diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/ClientAuthError.mjs.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/ClientAuthError.mjs.map deleted file mode 100644 index c622c22..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/ClientAuthError.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ClientAuthError.mjs","sources":["../../src/error/ClientAuthError.ts"],"sourcesContent":[null],"names":["ClientAuthErrorCodes.clientInfoDecodingError","ClientAuthErrorCodes.clientInfoEmptyError","ClientAuthErrorCodes.tokenParsingError","ClientAuthErrorCodes.nullOrEmptyToken","ClientAuthErrorCodes.endpointResolutionError","ClientAuthErrorCodes.networkError","ClientAuthErrorCodes.openIdConfigError","ClientAuthErrorCodes.hashNotDeserialized","ClientAuthErrorCodes.invalidState","ClientAuthErrorCodes.stateMismatch","ClientAuthErrorCodes.stateNotFound","ClientAuthErrorCodes.nonceMismatch","ClientAuthErrorCodes.authTimeNotFound","ClientAuthErrorCodes.maxAgeTranspired","ClientAuthErrorCodes.multipleMatchingTokens","ClientAuthErrorCodes.multipleMatchingAccounts","ClientAuthErrorCodes.multipleMatchingAppMetadata","ClientAuthErrorCodes.requestCannotBeMade","ClientAuthErrorCodes.cannotRemoveEmptyScope","ClientAuthErrorCodes.cannotAppendScopeSet","ClientAuthErrorCodes.emptyInputScopeSet","ClientAuthErrorCodes.deviceCodePollingCancelled","ClientAuthErrorCodes.deviceCodeExpired","ClientAuthErrorCodes.deviceCodeUnknownError","ClientAuthErrorCodes.noAccountInSilentRequest","ClientAuthErrorCodes.invalidCacheRecord","ClientAuthErrorCodes.invalidCacheEnvironment","ClientAuthErrorCodes.noAccountFound","ClientAuthErrorCodes.noCryptoObject","ClientAuthErrorCodes.unexpectedCredentialType","ClientAuthErrorCodes.invalidAssertion","ClientAuthErrorCodes.invalidClientCredential","ClientAuthErrorCodes.tokenRefreshRequired","ClientAuthErrorCodes.userTimeoutReached","ClientAuthErrorCodes.tokenClaimsCnfRequiredForSignedJwt","ClientAuthErrorCodes.authorizationCodeMissingFromServerResponse","ClientAuthErrorCodes.bindingKeyNotRemoved","ClientAuthErrorCodes.endSessionEndpointNotSupported","ClientAuthErrorCodes.keyIdMissing","ClientAuthErrorCodes.noNetworkConnectivity","ClientAuthErrorCodes.userCanceled","ClientAuthErrorCodes.missingTenantIdError","ClientAuthErrorCodes.methodNotImplemented","ClientAuthErrorCodes.nestedAppAuthBridgeDisabled"],"mappings":";;;;;;;AAAA;;;AAGG;AAMH;;AAEG;AAEU,MAAA,uBAAuB,GAAG;AACnC,IAAA,CAACA,uBAA4C,GACzC,uDAAuD;AAC3D,IAAA,CAACC,oBAAyC,GAAG,2BAA2B;AACxE,IAAA,CAACC,iBAAsC,GAAG,wBAAwB;AAClE,IAAA,CAACC,gBAAqC,GAAG,4BAA4B;AACrE,IAAA,CAACC,uBAA4C,GACzC,8BAA8B;AAClC,IAAA,CAACC,YAAiC,GAAG,wBAAwB;AAC7D,IAAA,CAACC,iBAAsC,GACnC,6IAA6I;AACjJ,IAAA,CAACC,mBAAwC,GACrC,+CAA+C;AACnD,IAAA,CAACC,YAAiC,GAAG,mCAAmC;AACxE,IAAA,CAACC,aAAkC,GAAG,sBAAsB;AAC5D,IAAA,CAACC,aAAkC,GAAG,iBAAiB;AACvD,IAAA,CAACC,a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BAA0C,CAC7C;AACJ,KAAA;AACD,IAAA,iBAAiB,EAAE;QACf,IAAI,EAAEC,YAAiC;AACvC,QAAA,IAAI,EAAE,uBAAuB,CAACA,YAAiC,CAAC;AACnE,KAAA;AACD,IAAA,oBAAoB,EAAE;QAClB,IAAI,EAAEC,oBAAyC;AAC/C,QAAA,IAAI,EAAE,uBAAuB,CACzBA,oBAAyC,CAC5C;AACJ,KAAA;AACD,IAAA,2BAA2B,EAAE;QACzB,IAAI,EAAEE,2BAAgD;AACtD,QAAA,IAAI,EAAE,uBAAuB,CACzBA,2BAAgD,CACnD;AACJ,KAAA;EACH;AAEF;;AAEG;AACG,MAAO,eAAgB,SAAQ,SAAS,CAAA;IAC1C,WAAY,CAAA,SAAiB,EAAE,iBAA0B,EAAA;QACrD,KAAK,CACD,SAAS,EACT,iBAAiB;cACX,GAAG,uBAAuB,CAAC,SAAS,CAAC,CAAA,EAAA,EAAK,iBAAiB,CAAE,CAAA;AAC/D,cAAE,uBAAuB,CAAC,SAAS,CAAC,CAC3C,CAAC;AACF,QAAA,IAAI,CAAC,IAAI,GAAG,iBAAiB,CAAC;QAE9B,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,eAAe,CAAC,SAAS,CAAC,CAAC;KAC1D;AACJ,CAAA;AAEe,SAAA,qBAAqB,CACjC,SAAiB,EACjB,iBAA0B,EAAA;AAE1B,IAAA,OAAO,IAAI,eAAe,CAAC,SAAS,EAAE,iBAAiB,CAAC,CAAC;AAC7D;;;;"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/ClientAuthErrorCodes.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/ClientAuthErrorCodes.d.ts deleted file mode 100644 index 1f3ed15..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/ClientAuthErrorCodes.d.ts +++ /dev/null @@ -1,45 +0,0 @@ -export declare const clientInfoDecodingError = "client_info_decoding_error"; -export declare const clientInfoEmptyError = "client_info_empty_error"; -export declare const tokenParsingError = "token_parsing_error"; -export declare const nullOrEmptyToken = "null_or_empty_token"; -export declare const endpointResolutionError = "endpoints_resolution_error"; -export declare const networkError = "network_error"; -export declare const openIdConfigError = "openid_config_error"; -export declare const hashNotDeserialized = "hash_not_deserialized"; -export declare const invalidState = "invalid_state"; -export declare const stateMismatch = "state_mismatch"; -export declare const stateNotFound = "state_not_found"; -export declare const nonceMismatch = "nonce_mismatch"; -export declare const authTimeNotFound = "auth_time_not_found"; -export declare const maxAgeTranspired = "max_age_transpired"; -export declare const multipleMatchingTokens = "multiple_matching_tokens"; -export declare const multipleMatchingAccounts = "multiple_matching_accounts"; -export declare const multipleMatchingAppMetadata = "multiple_matching_appMetadata"; -export declare const requestCannotBeMade = "request_cannot_be_made"; -export declare const cannotRemoveEmptyScope = "cannot_remove_empty_scope"; -export declare const cannotAppendScopeSet = "cannot_append_scopeset"; -export declare const emptyInputScopeSet = "empty_input_scopeset"; -export declare const deviceCodePollingCancelled = "device_code_polling_cancelled"; -export declare const deviceCodeExpired = "device_code_expired"; -export declare const deviceCodeUnknownError = "device_code_unknown_error"; -export declare const noAccountInSilentRequest = "no_account_in_silent_request"; -export declare const invalidCacheRecord = "invalid_cache_record"; -export declare const invalidCacheEnvironment = "invalid_cache_environment"; -export declare const noAccountFound = "no_account_found"; -export declare const noCryptoObject = "no_crypto_object"; -export declare const unexpectedCredentialType = "unexpected_credential_type"; -export declare const invalidAssertion = "invalid_assertion"; -export declare const invalidClientCredential = "invalid_client_credential"; -export declare const tokenRefreshRequired = "token_refresh_required"; -export declare const userTimeoutReached = "user_timeout_reached"; -export declare const tokenClaimsCnfRequiredForSignedJwt = "token_claims_cnf_required_for_signedjwt"; -export declare const authorizationCodeMissingFromServerResponse = "authorization_code_missing_from_server_response"; -export declare const bindingKeyNotRemoved = "binding_key_not_removed"; -export declare const endSessionEndpointNotSupported = "end_session_endpoint_not_supported"; -export declare const keyIdMissing = "key_id_missing"; -export declare const noNetworkConnectivity = "no_network_connectivity"; -export declare const userCanceled = "user_canceled"; -export declare const missingTenantIdError = "missing_tenant_id_error"; -export declare const methodNotImplemented = "method_not_implemented"; -export declare const nestedAppAuthBridgeDisabled = "nested_app_auth_bridge_disabled"; -//# sourceMappingURL=ClientAuthErrorCodes.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/ClientAuthErrorCodes.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/ClientAuthErrorCodes.d.ts.map deleted file mode 100644 index 5258f75..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/ClientAuthErrorCodes.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ClientAuthErrorCodes.d.ts","sourceRoot":"","sources":["../../src/error/ClientAuthErrorCodes.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,uBAAuB,+BAA+B,CAAC;AACpE,eAAO,MAAM,oBAAoB,4BAA4B,CAAC;AAC9D,eAAO,MAAM,iBAAiB,wBAAwB,CAAC;AACvD,eAAO,MAAM,gBAAgB,wBAAwB,CAAC;AACtD,eAAO,MAAM,uBAAuB,+BAA+B,CAAC;AACpE,eAAO,MAAM,YAAY,kBAAkB,CAAC;AAC5C,eAAO,MAAM,iBAAiB,wBAAwB,CAAC;AACvD,eAAO,MAAM,mBAAmB,0BAA0B,CAAC;AAC3D,eAAO,MAAM,YAAY,kBAAkB,CAAC;AAC5C,eAAO,MAAM,aAAa,mBAAmB,CAAC;AAC9C,eAAO,MAAM,aAAa,oBAAoB,CAAC;AAC/C,eAAO,MAAM,aAAa,mBAAmB,CAAC;AAC9C,eAAO,MAAM,gBAAgB,wBAAwB,CAAC;AACtD,eAAO,MAAM,gBAAgB,uBAAuB,CAAC;AACrD,eAAO,MAAM,sBAAsB,6BAA6B,CAAC;AACjE,eAAO,MAAM,wBAAwB,+BAA+B,CAAC;AACrE,eAAO,MAAM,2BAA2B,kCAAkC,CAAC;AAC3E,eAAO,MAAM,mBAAmB,2BAA2B,CAAC;AAC5D,eAAO,MAAM,sBAAsB,8BAA8B,CAAC;AAClE,eAAO,MAAM,oBAAoB,2BAA2B,CAAC;AAC7D,eAAO,MAAM,kBAAkB,yBAAyB,CAAC;AACzD,eAAO,MAAM,0BAA0B,kCAAkC,CAAC;AAC1E,eAAO,MAAM,iBAAiB,wBAAwB,CAAC;AACvD,eAAO,MAAM,sBAAsB,8BAA8B,CAAC;AAClE,eAAO,MAAM,wBAAwB,iCAAiC,CAAC;AACvE,eAAO,MAAM,kBAAkB,yBAAyB,CAAC;AACzD,eAAO,MAAM,uBAAuB,8BAA8B,CAAC;AACnE,eAAO,MAAM,cAAc,qBAAqB,CAAC;AACjD,eAAO,MAAM,cAAc,qBAAqB,CAAC;AACjD,eAAO,MAAM,wBAAwB,+BAA+B,CAAC;AACrE,eAAO,MAAM,gBAAgB,sBAAsB,CAAC;AACpD,eAAO,MAAM,uBAAuB,8BAA8B,CAAC;AACnE,eAAO,MAAM,oBAAoB,2BAA2B,CAAC;AAC7D,eAAO,MAAM,kBAAkB,yBAAyB,CAAC;AACzD,eAAO,MAAM,kCAAkC,4CACF,CAAC;AAC9C,eAAO,MAAM,0CAA0C,oDACF,CAAC;AACtD,eAAO,MAAM,oBAAoB,4BAA4B,CAAC;AAC9D,eAAO,MAAM,8BAA8B,uCACH,CAAC;AACzC,eAAO,MAAM,YAAY,mBAAmB,CAAC;AAC7C,eAAO,MAAM,qBAAqB,4BAA4B,CAAC;AAC/D,eAAO,MAAM,YAAY,kBAAkB,CAAC;AAC5C,eAAO,MAAM,oBAAoB,4BAA4B,CAAC;AAC9D,eAAO,MAAM,oBAAoB,2BAA2B,CAAC;AAC7D,eAAO,MAAM,2BAA2B,oCAAoC,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/ClientAuthErrorCodes.mjs b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/ClientAuthErrorCodes.mjs deleted file mode 100644 index d41d5e4..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/ClientAuthErrorCodes.mjs +++ /dev/null @@ -1,53 +0,0 @@ -/*! @azure/msal-common v14.16.1 2025-08-05 */ -'use strict'; -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -const clientInfoDecodingError = "client_info_decoding_error"; -const clientInfoEmptyError = "client_info_empty_error"; -const tokenParsingError = "token_parsing_error"; -const nullOrEmptyToken = "null_or_empty_token"; -const endpointResolutionError = "endpoints_resolution_error"; -const networkError = "network_error"; -const openIdConfigError = "openid_config_error"; -const hashNotDeserialized = "hash_not_deserialized"; -const invalidState = "invalid_state"; -const stateMismatch = "state_mismatch"; -const stateNotFound = "state_not_found"; -const nonceMismatch = "nonce_mismatch"; -const authTimeNotFound = "auth_time_not_found"; -const maxAgeTranspired = "max_age_transpired"; -const multipleMatchingTokens = "multiple_matching_tokens"; -const multipleMatchingAccounts = "multiple_matching_accounts"; -const multipleMatchingAppMetadata = "multiple_matching_appMetadata"; -const requestCannotBeMade = "request_cannot_be_made"; -const cannotRemoveEmptyScope = "cannot_remove_empty_scope"; -const cannotAppendScopeSet = "cannot_append_scopeset"; -const emptyInputScopeSet = "empty_input_scopeset"; -const deviceCodePollingCancelled = "device_code_polling_cancelled"; -const deviceCodeExpired = "device_code_expired"; -const deviceCodeUnknownError = "device_code_unknown_error"; -const noAccountInSilentRequest = "no_account_in_silent_request"; -const invalidCacheRecord = "invalid_cache_record"; -const invalidCacheEnvironment = "invalid_cache_environment"; -const noAccountFound = "no_account_found"; -const noCryptoObject = "no_crypto_object"; -const unexpectedCredentialType = "unexpected_credential_type"; -const invalidAssertion = "invalid_assertion"; -const invalidClientCredential = "invalid_client_credential"; -const tokenRefreshRequired = "token_refresh_required"; -const userTimeoutReached = "user_timeout_reached"; -const tokenClaimsCnfRequiredForSignedJwt = "token_claims_cnf_required_for_signedjwt"; -const authorizationCodeMissingFromServerResponse = "authorization_code_missing_from_server_response"; -const bindingKeyNotRemoved = "binding_key_not_removed"; -const endSessionEndpointNotSupported = "end_session_endpoint_not_supported"; -const keyIdMissing = "key_id_missing"; -const noNetworkConnectivity = "no_network_connectivity"; -const userCanceled = "user_canceled"; -const missingTenantIdError = "missing_tenant_id_error"; -const methodNotImplemented = "method_not_implemented"; -const nestedAppAuthBridgeDisabled = "nested_app_auth_bridge_disabled"; - -export { authTimeNotFound, authorizationCodeMissingFromServerResponse, bindingKeyNotRemoved, cannotAppendScopeSet, cannotRemoveEmptyScope, clientInfoDecodingError, clientInfoEmptyError, deviceCodeExpired, deviceCodePollingCancelled, deviceCodeUnknownError, emptyInputScopeSet, endSessionEndpointNotSupported, endpointResolutionError, hashNotDeserialized, invalidAssertion, invalidCacheEnvironment, invalidCacheRecord, invalidClientCredential, invalidState, keyIdMissing, maxAgeTranspired, methodNotImplemented, missingTenantIdError, multipleMatchingAccounts, multipleMatchingAppMetadata, multipleMatchingTokens, nestedAppAuthBridgeDisabled, networkError, noAccountFound, noAccountInSilentRequest, noCryptoObject, noNetworkConnectivity, nonceMismatch, nullOrEmptyToken, openIdConfigError, requestCannotBeMade, stateMismatch, stateNotFound, tokenClaimsCnfRequiredForSignedJwt, tokenParsingError, tokenRefreshRequired, unexpectedCredentialType, userCanceled, userTimeoutReached }; -//# sourceMappingURL=ClientAuthErrorCodes.mjs.map diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/ClientAuthErrorCodes.mjs.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/ClientAuthErrorCodes.mjs.map deleted file mode 100644 index 0dad5b7..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/ClientAuthErrorCodes.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ClientAuthErrorCodes.mjs","sources":["../../src/error/ClientAuthErrorCodes.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAAA;;;AAGG;AAEI,MAAM,uBAAuB,GAAG,6BAA6B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MAAM,oBAAoB,GAAG,0BAA0B;AACvD,MAAM,8BAA8B,GACvC,qCAAqC;AAClC,MAAM,YAAY,GAAG,iBAAiB;AACtC,MAAM,qBAAqB,GAAG,0BAA0B;AACxD,MAAM,YAAY,GAAG,gBAAgB;AACrC,MAAM,oBAAoB,GAAG,0BAA0B;AACvD,MAAM,oBAAoB,GAAG,yBAAyB;AACtD,MAAM,2BAA2B,GAAG;;;;"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/ClientConfigurationError.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/ClientConfigurationError.d.ts deleted file mode 100644 index 5f4fbbf..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/ClientConfigurationError.d.ts +++ /dev/null @@ -1,129 +0,0 @@ -import { AuthError } from "./AuthError.js"; -import * as ClientConfigurationErrorCodes from "./ClientConfigurationErrorCodes.js"; -export { ClientConfigurationErrorCodes }; -export declare const ClientConfigurationErrorMessages: { - redirect_uri_empty: string; - claims_request_parsing_error: string; - authority_uri_insecure: string; - url_parse_error: string; - empty_url_error: string; - empty_input_scopes_error: string; - invalid_prompt_value: string; - invalid_claims: string; - token_request_empty: string; - logout_request_empty: string; - invalid_code_challenge_method: string; - pkce_params_missing: string; - invalid_cloud_discovery_metadata: string; - invalid_authority_metadata: string; - untrusted_authority: string; - missing_ssh_jwk: string; - missing_ssh_kid: string; - missing_nonce_authentication_header: string; - invalid_authentication_header: string; - cannot_set_OIDCOptions: string; - cannot_allow_native_broker: string; - authority_mismatch: string; -}; -/** - * ClientConfigurationErrorMessage class containing string constants used by error codes and messages. - * @deprecated Use ClientConfigurationErrorCodes instead - */ -export declare const ClientConfigurationErrorMessage: { - redirectUriNotSet: { - code: string; - desc: string; - }; - claimsRequestParsingError: { - code: string; - desc: string; - }; - authorityUriInsecure: { - code: string; - desc: string; - }; - urlParseError: { - code: string; - desc: string; - }; - urlEmptyError: { - code: string; - desc: string; - }; - emptyScopesError: { - code: string; - desc: string; - }; - invalidPrompt: { - code: string; - desc: string; - }; - invalidClaimsRequest: { - code: string; - desc: string; - }; - tokenRequestEmptyError: { - code: string; - desc: string; - }; - logoutRequestEmptyError: { - code: string; - desc: string; - }; - invalidCodeChallengeMethod: { - code: string; - desc: string; - }; - invalidCodeChallengeParams: { - code: string; - desc: string; - }; - invalidCloudDiscoveryMetadata: { - code: string; - desc: string; - }; - invalidAuthorityMetadata: { - code: string; - desc: string; - }; - untrustedAuthority: { - code: string; - desc: string; - }; - missingSshJwk: { - code: string; - desc: string; - }; - missingSshKid: { - code: string; - desc: string; - }; - missingNonceAuthenticationHeader: { - code: string; - desc: string; - }; - invalidAuthenticationHeader: { - code: string; - desc: string; - }; - cannotSetOIDCOptions: { - code: string; - desc: string; - }; - cannotAllowNativeBroker: { - code: string; - desc: string; - }; - authorityMismatch: { - code: string; - desc: string; - }; -}; -/** - * Error thrown when there is an error in configuration of the MSAL.js library. - */ -export declare class ClientConfigurationError extends AuthError { - constructor(errorCode: string); -} -export declare function createClientConfigurationError(errorCode: string): ClientConfigurationError; -//# sourceMappingURL=ClientConfigurationError.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/ClientConfigurationError.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/ClientConfigurationError.d.ts.map deleted file mode 100644 index cd33864..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/ClientConfigurationError.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ClientConfigurationError.d.ts","sourceRoot":"","sources":["../../src/error/ClientConfigurationError.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,KAAK,6BAA6B,MAAM,oCAAoC,CAAC;AACpF,OAAO,EAAE,6BAA6B,EAAE,CAAC;AAEzC,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;CA4C5C,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqI3C,CAAC;AAEF;;GAEG;AACH,qBAAa,wBAAyB,SAAQ,SAAS;gBACvC,SAAS,EAAE,MAAM;CAKhC;AAED,wBAAgB,8BAA8B,CAC1C,SAAS,EAAE,MAAM,GAClB,wBAAwB,CAE1B"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/ClientConfigurationError.mjs b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/ClientConfigurationError.mjs deleted file mode 100644 index 5cfe6e4..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/ClientConfigurationError.mjs +++ /dev/null @@ -1,145 +0,0 @@ -/*! @azure/msal-common v14.16.1 2025-08-05 */ -'use strict'; -import { AuthError } from './AuthError.mjs'; -import { redirectUriEmpty, claimsRequestParsingError, authorityUriInsecure, urlParseError, urlEmptyError, emptyInputScopesError, invalidPromptValue, invalidClaims, tokenRequestEmpty, logoutRequestEmpty, invalidCodeChallengeMethod, pkceParamsMissing, invalidCloudDiscoveryMetadata, invalidAuthorityMetadata, untrustedAuthority, missingSshJwk, missingSshKid, missingNonceAuthenticationHeader, invalidAuthenticationHeader, cannotSetOIDCOptions, cannotAllowNativeBroker, authorityMismatch } from './ClientConfigurationErrorCodes.mjs'; -import * as ClientConfigurationErrorCodes from './ClientConfigurationErrorCodes.mjs'; -export { ClientConfigurationErrorCodes }; - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -const ClientConfigurationErrorMessages = { - [redirectUriEmpty]: "A redirect URI is required for all calls, and none has been set.", - [claimsRequestParsingError]: "Could not parse the given claims request object.", - [authorityUriInsecure]: "Authority URIs must use https. Please see here for valid authority configuration options: https://docs.microsoft.com/en-us/azure/active-directory/develop/msal-js-initializing-client-applications#configuration-options", - [urlParseError]: "URL could not be parsed into appropriate segments.", - [urlEmptyError]: "URL was empty or null.", - [emptyInputScopesError]: "Scopes cannot be passed as null, undefined or empty array because they are required to obtain an access token.", - [invalidPromptValue]: "Please see here for valid configuration options: https://azuread.github.io/microsoft-authentication-library-for-js/ref/modules/_azure_msal_common.html#commonauthorizationurlrequest", - [invalidClaims]: "Given claims parameter must be a stringified JSON object.", - [tokenRequestEmpty]: "Token request was empty and not found in cache.", - [logoutRequestEmpty]: "The logout request was null or undefined.", - [invalidCodeChallengeMethod]: 'code_challenge_method passed is invalid. Valid values are "plain" and "S256".', - [pkceParamsMissing]: "Both params: code_challenge and code_challenge_method are to be passed if to be sent in the request", - [invalidCloudDiscoveryMetadata]: "Invalid cloudDiscoveryMetadata provided. Must be a stringified JSON object containing tenant_discovery_endpoint and metadata fields", - [invalidAuthorityMetadata]: "Invalid authorityMetadata provided. Must by a stringified JSON object containing authorization_endpoint, token_endpoint, issuer fields.", - [untrustedAuthority]: "The provided authority is not a trusted authority. Please include this authority in the knownAuthorities config parameter.", - [missingSshJwk]: "Missing sshJwk in SSH certificate request. A stringified JSON Web Key is required when using the SSH authentication scheme.", - [missingSshKid]: "Missing sshKid in SSH certificate request. A string that uniquely identifies the public SSH key is required when using the SSH authentication scheme.", - [missingNonceAuthenticationHeader]: "Unable to find an authentication header containing server nonce. Either the Authentication-Info or WWW-Authenticate headers must be present in order to obtain a server nonce.", - [invalidAuthenticationHeader]: "Invalid authentication header provided", - [cannotSetOIDCOptions]: "Cannot set OIDCOptions parameter. Please change the protocol mode to OIDC or use a non-Microsoft authority.", - [cannotAllowNativeBroker]: "Cannot set allowNativeBroker parameter to true when not in AAD protocol mode.", - [authorityMismatch]: "Authority mismatch error. Authority provided in login request or PublicClientApplication config does not match the environment of the provided account. Please use a matching account or make an interactive request to login to this authority.", -}; -/** - * ClientConfigurationErrorMessage class containing string constants used by error codes and messages. - * @deprecated Use ClientConfigurationErrorCodes instead - */ -const ClientConfigurationErrorMessage = { - redirectUriNotSet: { - code: redirectUriEmpty, - desc: ClientConfigurationErrorMessages[redirectUriEmpty], - }, - claimsRequestParsingError: { - code: claimsRequestParsingError, - desc: ClientConfigurationErrorMessages[claimsRequestParsingError], - }, - authorityUriInsecure: { - code: authorityUriInsecure, - desc: ClientConfigurationErrorMessages[authorityUriInsecure], - }, - urlParseError: { - code: urlParseError, - desc: ClientConfigurationErrorMessages[urlParseError], - }, - urlEmptyError: { - code: urlEmptyError, - desc: ClientConfigurationErrorMessages[urlEmptyError], - }, - emptyScopesError: { - code: emptyInputScopesError, - desc: ClientConfigurationErrorMessages[emptyInputScopesError], - }, - invalidPrompt: { - code: invalidPromptValue, - desc: ClientConfigurationErrorMessages[invalidPromptValue], - }, - invalidClaimsRequest: { - code: invalidClaims, - desc: ClientConfigurationErrorMessages[invalidClaims], - }, - tokenRequestEmptyError: { - code: tokenRequestEmpty, - desc: ClientConfigurationErrorMessages[tokenRequestEmpty], - }, - logoutRequestEmptyError: { - code: logoutRequestEmpty, - desc: ClientConfigurationErrorMessages[logoutRequestEmpty], - }, - invalidCodeChallengeMethod: { - code: invalidCodeChallengeMethod, - desc: ClientConfigurationErrorMessages[invalidCodeChallengeMethod], - }, - invalidCodeChallengeParams: { - code: pkceParamsMissing, - desc: ClientConfigurationErrorMessages[pkceParamsMissing], - }, - invalidCloudDiscoveryMetadata: { - code: invalidCloudDiscoveryMetadata, - desc: ClientConfigurationErrorMessages[invalidCloudDiscoveryMetadata], - }, - invalidAuthorityMetadata: { - code: invalidAuthorityMetadata, - desc: ClientConfigurationErrorMessages[invalidAuthorityMetadata], - }, - untrustedAuthority: { - code: untrustedAuthority, - desc: ClientConfigurationErrorMessages[untrustedAuthority], - }, - missingSshJwk: { - code: missingSshJwk, - desc: ClientConfigurationErrorMessages[missingSshJwk], - }, - missingSshKid: { - code: missingSshKid, - desc: ClientConfigurationErrorMessages[missingSshKid], - }, - missingNonceAuthenticationHeader: { - code: missingNonceAuthenticationHeader, - desc: ClientConfigurationErrorMessages[missingNonceAuthenticationHeader], - }, - invalidAuthenticationHeader: { - code: invalidAuthenticationHeader, - desc: ClientConfigurationErrorMessages[invalidAuthenticationHeader], - }, - cannotSetOIDCOptions: { - code: cannotSetOIDCOptions, - desc: ClientConfigurationErrorMessages[cannotSetOIDCOptions], - }, - cannotAllowNativeBroker: { - code: cannotAllowNativeBroker, - desc: ClientConfigurationErrorMessages[cannotAllowNativeBroker], - }, - authorityMismatch: { - code: authorityMismatch, - desc: ClientConfigurationErrorMessages[authorityMismatch], - }, -}; -/** - * Error thrown when there is an error in configuration of the MSAL.js library. - */ -class ClientConfigurationError extends AuthError { - constructor(errorCode) { - super(errorCode, ClientConfigurationErrorMessages[errorCode]); - this.name = "ClientConfigurationError"; - Object.setPrototypeOf(this, ClientConfigurationError.prototype); - } -} -function createClientConfigurationError(errorCode) { - return new ClientConfigurationError(errorCode); -} - -export { ClientConfigurationError, ClientConfigurationErrorMessage, ClientConfigurationErrorMessages, createClientConfigurationError }; -//# sourceMappingURL=ClientConfigurationError.mjs.map diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/ClientConfigurationError.mjs.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/ClientConfigurationError.mjs.map deleted file mode 100644 index 4678060..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/ClientConfigurationError.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ClientConfigurationError.mjs","sources":["../../src/error/ClientConfigurationError.ts"],"sourcesContent":[null],"names":["ClientConfigurationErrorCodes.redirectUriEmpty","ClientConfigurationErrorCodes.claimsRequestParsingError","ClientConfigurationErrorCodes.authorityUriInsecure","ClientConfigurationErrorCodes.urlParseError","ClientConfigurationErrorCodes.urlEmptyError","ClientConfigurationErrorCodes.emptyInputScopesError","ClientConfigurationErrorCodes.invalidPromptValue","ClientConfigurationErrorCodes.invalidClaims","ClientConfigurationErrorCodes.tokenRequestEmpty","ClientConfigurationErrorCodes.logoutRequestEmpty","ClientConfigurationErrorCodes.invalidCodeChallengeMethod","ClientConfigurationErrorCodes.pkceParamsMissing","ClientConfigurationErrorCodes.invalidCloudDiscoveryMetadata","ClientConfigurationErrorCodes.invalidAuthorityMetadata","ClientConfigurationErrorCodes.untrustedAuthority","ClientConfigurationErrorCodes.missingSshJwk","ClientConfigurationErrorCodes.missingSshKid","ClientConfigurationErrorCodes.missingNonceAuthenticationHeader","ClientConfigurationErrorCodes.invalidAuthenticationHeader","ClientConfigurationErrorCodes.cannotSetOIDCOptions","ClientConfigurationErrorCodes.cannotAllowNativeBroker","ClientConfigurationErrorCodes.authorityMismatch"],"mappings":";;;;;;;AAAA;;;AAGG;AAMU,MAAA,gCAAgC,GAAG;AAC5C,IAAA,CAACA,gBAA8C,GAC3C,kEAAkE;AACtE,IAAA,CAACC,yBAAuD,GACpD,kDAAkD;AACtD,IAAA,CAACC,oBAAkD,GAC/C,2NAA2N;AAC/N,IAAA,CAACC,aAA2C,GACxC,oDAAoD;AACxD,IAAA,CAACC,aAA2C,GAAG,wBAAwB;AACvE,IAAA,CAACC,qBAAmD,GAChD,gHAAgH;AACpH,IAAA,CAACC,kBAAgD,GAC7C,sLAAsL;AAC1L,IAAA,CAACC,aAA2C,GACxC,2DAA2D;AAC/D,IAAA,CAACC,iBAA+C,GAC5C,iDAAiD;AACrD,IAAA,CAACC,kBAAgD,GAC7C,2CAA2C;AAC/C,IAAA,CAACC,0BAAwD,GACrD,+EAA+E;AACnF,IAAA,CAACC,iBAA+C,GAC5C,qGAAqG;AACzG,IAAA,CAACC,6BAA2D,GACxD,qIAAqI;AACzI,IAAA,CAACC,wBAAsD,GACnD,yIAAyI;AAC7I,IAAA,CAACC,kBAAgD,GAC7C,4HAA4H;AAChI,IAAA,CAACC,aAA2C,GACxC,6HAA6H;AACjI,IAAA,CAACC,aAA2C,GACxC,uJAAuJ;AAC3J,IAAA,CAACC,gCAA8D,GAC3D,gLAAgL;A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ACD,IAAA,oBAAoB,EAAE;QAClB,IAAI,EAAEC,oBAAkD;AACxD,QAAA,IAAI,EAAE,gCAAgC,CAClCA,oBAAkD,CACrD;AACJ,KAAA;AACD,IAAA,uBAAuB,EAAE;QACrB,IAAI,EAAEC,uBAAqD;AAC3D,QAAA,IAAI,EAAE,gCAAgC,CAClCA,uBAAqD,CACxD;AACJ,KAAA;AACD,IAAA,iBAAiB,EAAE;QACf,IAAI,EAAEC,iBAA+C;AACrD,QAAA,IAAI,EAAE,gCAAgC,CAClCA,iBAA+C,CAClD;AACJ,KAAA;EACH;AAEF;;AAEG;AACG,MAAO,wBAAyB,SAAQ,SAAS,CAAA;AACnD,IAAA,WAAA,CAAY,SAAiB,EAAA;QACzB,KAAK,CAAC,SAAS,EAAE,gCAAgC,CAAC,SAAS,CAAC,CAAC,CAAC;AAC9D,QAAA,IAAI,CAAC,IAAI,GAAG,0BAA0B,CAAC;QACvC,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,wBAAwB,CAAC,SAAS,CAAC,CAAC;KACnE;AACJ,CAAA;AAEK,SAAU,8BAA8B,CAC1C,SAAiB,EAAA;AAEjB,IAAA,OAAO,IAAI,wBAAwB,CAAC,SAAS,CAAC,CAAC;AACnD;;;;"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/ClientConfigurationErrorCodes.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/ClientConfigurationErrorCodes.d.ts deleted file mode 100644 index 2f23cf3..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/ClientConfigurationErrorCodes.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -export declare const redirectUriEmpty = "redirect_uri_empty"; -export declare const claimsRequestParsingError = "claims_request_parsing_error"; -export declare const authorityUriInsecure = "authority_uri_insecure"; -export declare const urlParseError = "url_parse_error"; -export declare const urlEmptyError = "empty_url_error"; -export declare const emptyInputScopesError = "empty_input_scopes_error"; -export declare const invalidPromptValue = "invalid_prompt_value"; -export declare const invalidClaims = "invalid_claims"; -export declare const tokenRequestEmpty = "token_request_empty"; -export declare const logoutRequestEmpty = "logout_request_empty"; -export declare const invalidCodeChallengeMethod = "invalid_code_challenge_method"; -export declare const pkceParamsMissing = "pkce_params_missing"; -export declare const invalidCloudDiscoveryMetadata = "invalid_cloud_discovery_metadata"; -export declare const invalidAuthorityMetadata = "invalid_authority_metadata"; -export declare const untrustedAuthority = "untrusted_authority"; -export declare const missingSshJwk = "missing_ssh_jwk"; -export declare const missingSshKid = "missing_ssh_kid"; -export declare const missingNonceAuthenticationHeader = "missing_nonce_authentication_header"; -export declare const invalidAuthenticationHeader = "invalid_authentication_header"; -export declare const cannotSetOIDCOptions = "cannot_set_OIDCOptions"; -export declare const cannotAllowNativeBroker = "cannot_allow_native_broker"; -export declare const authorityMismatch = "authority_mismatch"; -//# sourceMappingURL=ClientConfigurationErrorCodes.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/ClientConfigurationErrorCodes.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/ClientConfigurationErrorCodes.d.ts.map deleted file mode 100644 index 1c8d12f..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/ClientConfigurationErrorCodes.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ClientConfigurationErrorCodes.d.ts","sourceRoot":"","sources":["../../src/error/ClientConfigurationErrorCodes.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,gBAAgB,uBAAuB,CAAC;AACrD,eAAO,MAAM,yBAAyB,iCAAiC,CAAC;AACxE,eAAO,MAAM,oBAAoB,2BAA2B,CAAC;AAC7D,eAAO,MAAM,aAAa,oBAAoB,CAAC;AAC/C,eAAO,MAAM,aAAa,oBAAoB,CAAC;AAC/C,eAAO,MAAM,qBAAqB,6BAA6B,CAAC;AAChE,eAAO,MAAM,kBAAkB,yBAAyB,CAAC;AACzD,eAAO,MAAM,aAAa,mBAAmB,CAAC;AAC9C,eAAO,MAAM,iBAAiB,wBAAwB,CAAC;AACvD,eAAO,MAAM,kBAAkB,yBAAyB,CAAC;AACzD,eAAO,MAAM,0BAA0B,kCAAkC,CAAC;AAC1E,eAAO,MAAM,iBAAiB,wBAAwB,CAAC;AACvD,eAAO,MAAM,6BAA6B,qCAAqC,CAAC;AAChF,eAAO,MAAM,wBAAwB,+BAA+B,CAAC;AACrE,eAAO,MAAM,kBAAkB,wBAAwB,CAAC;AACxD,eAAO,MAAM,aAAa,oBAAoB,CAAC;AAC/C,eAAO,MAAM,aAAa,oBAAoB,CAAC;AAC/C,eAAO,MAAM,gCAAgC,wCACJ,CAAC;AAC1C,eAAO,MAAM,2BAA2B,kCAAkC,CAAC;AAC3E,eAAO,MAAM,oBAAoB,2BAA2B,CAAC;AAC7D,eAAO,MAAM,uBAAuB,+BAA+B,CAAC;AACpE,eAAO,MAAM,iBAAiB,uBAAuB,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/ClientConfigurationErrorCodes.mjs b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/ClientConfigurationErrorCodes.mjs deleted file mode 100644 index b108792..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/ClientConfigurationErrorCodes.mjs +++ /dev/null @@ -1,31 +0,0 @@ -/*! @azure/msal-common v14.16.1 2025-08-05 */ -'use strict'; -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -const redirectUriEmpty = "redirect_uri_empty"; -const claimsRequestParsingError = "claims_request_parsing_error"; -const authorityUriInsecure = "authority_uri_insecure"; -const urlParseError = "url_parse_error"; -const urlEmptyError = "empty_url_error"; -const emptyInputScopesError = "empty_input_scopes_error"; -const invalidPromptValue = "invalid_prompt_value"; -const invalidClaims = "invalid_claims"; -const tokenRequestEmpty = "token_request_empty"; -const logoutRequestEmpty = "logout_request_empty"; -const invalidCodeChallengeMethod = "invalid_code_challenge_method"; -const pkceParamsMissing = "pkce_params_missing"; -const invalidCloudDiscoveryMetadata = "invalid_cloud_discovery_metadata"; -const invalidAuthorityMetadata = "invalid_authority_metadata"; -const untrustedAuthority = "untrusted_authority"; -const missingSshJwk = "missing_ssh_jwk"; -const missingSshKid = "missing_ssh_kid"; -const missingNonceAuthenticationHeader = "missing_nonce_authentication_header"; -const invalidAuthenticationHeader = "invalid_authentication_header"; -const cannotSetOIDCOptions = "cannot_set_OIDCOptions"; -const cannotAllowNativeBroker = "cannot_allow_native_broker"; -const authorityMismatch = "authority_mismatch"; - -export { authorityMismatch, authorityUriInsecure, cannotAllowNativeBroker, cannotSetOIDCOptions, claimsRequestParsingError, emptyInputScopesError, invalidAuthenticationHeader, invalidAuthorityMetadata, invalidClaims, invalidCloudDiscoveryMetadata, invalidCodeChallengeMethod, invalidPromptValue, logoutRequestEmpty, missingNonceAuthenticationHeader, missingSshJwk, missingSshKid, pkceParamsMissing, redirectUriEmpty, tokenRequestEmpty, untrustedAuthority, urlEmptyError, urlParseError }; -//# sourceMappingURL=ClientConfigurationErrorCodes.mjs.map diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/ClientConfigurationErrorCodes.mjs.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/ClientConfigurationErrorCodes.mjs.map deleted file mode 100644 index 4a0e4e7..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/ClientConfigurationErrorCodes.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ClientConfigurationErrorCodes.mjs","sources":["../../src/error/ClientConfigurationErrorCodes.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAAA;;;AAGG;AAEI,MAAM,gBAAgB,GAAG,qBAAqB;AAC9C,MAAM,yBAAyB,GAAG,+BAA+B;AACjE,MAAM,oBAAoB,GAAG,yBAAyB;AACtD,MAAM,aAAa,GAAG,kBAAkB;AACxC,MAAM,aAAa,GAAG,kBAAkB;AACxC,MAAM,qBAAqB,GAAG,2BAA2B;AACzD,MAAM,kBAAkB,GAAG,uBAAuB;AAClD,MAAM,aAAa,GAAG,iBAAiB;AACvC,MAAM,iBAAiB,GAAG,sBAAsB;AAChD,MAAM,kBAAkB,GAAG,uBAAuB;AAClD,MAAM,0BAA0B,GAAG,gCAAgC;AACnE,MAAM,iBAAiB,GAAG,sBAAsB;AAChD,MAAM,6BAA6B,GAAG,mCAAmC;AACzE,MAAM,wBAAwB,GAAG,6BAA6B;AAC9D,MAAM,kBAAkB,GAAG,sBAAsB;AACjD,MAAM,aAAa,GAAG,kBAAkB;AACxC,MAAM,aAAa,GAAG,kBAAkB;AACxC,MAAM,gCAAgC,GACzC,sCAAsC;AACnC,MAAM,2BAA2B,GAAG,gCAAgC;AACpE,MAAM,oBAAoB,GAAG,yBAAyB;AACtD,MAAM,uBAAuB,GAAG,6BAA6B;AAC7D,MAAM,iBAAiB,GAAG;;;;"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/InteractionRequiredAuthError.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/InteractionRequiredAuthError.d.ts deleted file mode 100644 index 443ee68..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/InteractionRequiredAuthError.d.ts +++ /dev/null @@ -1,66 +0,0 @@ -import { AuthError } from "./AuthError.js"; -import * as InteractionRequiredAuthErrorCodes from "./InteractionRequiredAuthErrorCodes.js"; -export { InteractionRequiredAuthErrorCodes }; -/** - * InteractionRequiredServerErrorMessage contains string constants used by error codes and messages returned by the server indicating interaction is required - */ -export declare const InteractionRequiredServerErrorMessage: string[]; -export declare const InteractionRequiredAuthSubErrorMessage: string[]; -/** - * Interaction required errors defined by the SDK - * @deprecated Use InteractionRequiredAuthErrorCodes instead - */ -export declare const InteractionRequiredAuthErrorMessage: { - noTokensFoundError: { - code: string; - desc: string; - }; - native_account_unavailable: { - code: string; - desc: string; - }; - bad_token: { - code: string; - desc: string; - }; -}; -/** - * Error thrown when user interaction is required. - */ -export declare class InteractionRequiredAuthError extends AuthError { - /** - * The time the error occured at - */ - timestamp: string; - /** - * TraceId associated with the error - */ - traceId: string; - /** - * https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/lib/msal-common/docs/claims-challenge.md - * - * A string with extra claims needed for the token request to succeed - * web site: redirect the user to the authorization page and set the extra claims - * web api: include the claims in the WWW-Authenticate header that are sent back to the client so that it knows to request a token with the extra claims - * desktop application or browser context: include the claims when acquiring the token interactively - * app to app context (client_credentials): include the claims in the AcquireTokenByClientCredential request - */ - claims: string; - /** - * Server error number; - */ - readonly errorNo?: string; - constructor(errorCode?: string, errorMessage?: string, subError?: string, timestamp?: string, traceId?: string, correlationId?: string, claims?: string, errorNo?: string); -} -/** - * Helper function used to determine if an error thrown by the server requires interaction to resolve - * @param errorCode - * @param errorString - * @param subError - */ -export declare function isInteractionRequiredError(errorCode?: string, errorString?: string, subError?: string): boolean; -/** - * Creates an InteractionRequiredAuthError - */ -export declare function createInteractionRequiredAuthError(errorCode: string): InteractionRequiredAuthError; -//# sourceMappingURL=InteractionRequiredAuthError.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/InteractionRequiredAuthError.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/InteractionRequiredAuthError.d.ts.map deleted file mode 100644 index c1d79df..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/InteractionRequiredAuthError.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"InteractionRequiredAuthError.d.ts","sourceRoot":"","sources":["../../src/error/InteractionRequiredAuthError.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,KAAK,iCAAiC,MAAM,wCAAwC,CAAC;AAC5F,OAAO,EAAE,iCAAiC,EAAE,CAAC;AAE7C;;GAEG;AACH,eAAO,MAAM,qCAAqC,UAKjD,CAAC;AAEF,eAAO,MAAM,sCAAsC,UAOlD,CAAC;AAaF;;;GAGG;AACH,eAAO,MAAM,mCAAmC;;;;;;;;;;;;;CAmB/C,CAAC;AAEF;;GAEG;AACH,qBAAa,4BAA6B,SAAQ,SAAS;IACvD;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;;;;;;;OAQG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;gBAGtB,SAAS,CAAC,EAAE,MAAM,EAClB,YAAY,CAAC,EAAE,MAAM,EACrB,QAAQ,CAAC,EAAE,MAAM,EACjB,SAAS,CAAC,EAAE,MAAM,EAClB,OAAO,CAAC,EAAE,MAAM,EAChB,aAAa,CAAC,EAAE,MAAM,EACtB,MAAM,CAAC,EAAE,MAAM,EACf,OAAO,CAAC,EAAE,MAAM;CAYvB;AAED;;;;;GAKG;AACH,wBAAgB,0BAA0B,CACtC,SAAS,CAAC,EAAE,MAAM,EAClB,WAAW,CAAC,EAAE,MAAM,EACpB,QAAQ,CAAC,EAAE,MAAM,GAClB,OAAO,CAkBT;AAED;;GAEG;AACH,wBAAgB,kCAAkC,CAC9C,SAAS,EAAE,MAAM,GAClB,4BAA4B,CAK9B"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/InteractionRequiredAuthError.mjs b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/InteractionRequiredAuthError.mjs deleted file mode 100644 index a0b1a1c..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/InteractionRequiredAuthError.mjs +++ /dev/null @@ -1,96 +0,0 @@ -/*! @azure/msal-common v14.16.1 2025-08-05 */ -'use strict'; -import { Constants } from '../utils/Constants.mjs'; -import { AuthError } from './AuthError.mjs'; -import { noTokensFound, nativeAccountUnavailable, badToken, refreshTokenExpired, interactionRequired, consentRequired, loginRequired } from './InteractionRequiredAuthErrorCodes.mjs'; -import * as InteractionRequiredAuthErrorCodes from './InteractionRequiredAuthErrorCodes.mjs'; -export { InteractionRequiredAuthErrorCodes }; - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * InteractionRequiredServerErrorMessage contains string constants used by error codes and messages returned by the server indicating interaction is required - */ -const InteractionRequiredServerErrorMessage = [ - interactionRequired, - consentRequired, - loginRequired, - badToken, -]; -const InteractionRequiredAuthSubErrorMessage = [ - "message_only", - "additional_action", - "basic_action", - "user_password_expired", - "consent_required", - "bad_token", -]; -const InteractionRequiredAuthErrorMessages = { - [noTokensFound]: "No refresh token found in the cache. Please sign-in.", - [nativeAccountUnavailable]: "The requested account is not available in the native broker. It may have been deleted or logged out. Please sign-in again using an interactive API.", - [refreshTokenExpired]: "Refresh token has expired.", - [badToken]: "Identity provider returned bad_token due to an expired or invalid refresh token. Please invoke an interactive API to resolve.", -}; -/** - * Interaction required errors defined by the SDK - * @deprecated Use InteractionRequiredAuthErrorCodes instead - */ -const InteractionRequiredAuthErrorMessage = { - noTokensFoundError: { - code: noTokensFound, - desc: InteractionRequiredAuthErrorMessages[noTokensFound], - }, - native_account_unavailable: { - code: nativeAccountUnavailable, - desc: InteractionRequiredAuthErrorMessages[nativeAccountUnavailable], - }, - bad_token: { - code: badToken, - desc: InteractionRequiredAuthErrorMessages[badToken], - }, -}; -/** - * Error thrown when user interaction is required. - */ -class InteractionRequiredAuthError extends AuthError { - constructor(errorCode, errorMessage, subError, timestamp, traceId, correlationId, claims, errorNo) { - super(errorCode, errorMessage, subError); - Object.setPrototypeOf(this, InteractionRequiredAuthError.prototype); - this.timestamp = timestamp || Constants.EMPTY_STRING; - this.traceId = traceId || Constants.EMPTY_STRING; - this.correlationId = correlationId || Constants.EMPTY_STRING; - this.claims = claims || Constants.EMPTY_STRING; - this.name = "InteractionRequiredAuthError"; - this.errorNo = errorNo; - } -} -/** - * Helper function used to determine if an error thrown by the server requires interaction to resolve - * @param errorCode - * @param errorString - * @param subError - */ -function isInteractionRequiredError(errorCode, errorString, subError) { - const isInteractionRequiredErrorCode = !!errorCode && - InteractionRequiredServerErrorMessage.indexOf(errorCode) > -1; - const isInteractionRequiredSubError = !!subError && - InteractionRequiredAuthSubErrorMessage.indexOf(subError) > -1; - const isInteractionRequiredErrorDesc = !!errorString && - InteractionRequiredServerErrorMessage.some((irErrorCode) => { - return errorString.indexOf(irErrorCode) > -1; - }); - return (isInteractionRequiredErrorCode || - isInteractionRequiredErrorDesc || - isInteractionRequiredSubError); -} -/** - * Creates an InteractionRequiredAuthError - */ -function createInteractionRequiredAuthError(errorCode) { - return new InteractionRequiredAuthError(errorCode, InteractionRequiredAuthErrorMessages[errorCode]); -} - -export { InteractionRequiredAuthError, InteractionRequiredAuthErrorMessage, InteractionRequiredAuthSubErrorMessage, InteractionRequiredServerErrorMessage, createInteractionRequiredAuthError, isInteractionRequiredError }; -//# sourceMappingURL=InteractionRequiredAuthError.mjs.map diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/InteractionRequiredAuthError.mjs.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/InteractionRequiredAuthError.mjs.map deleted file mode 100644 index 425a024..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/InteractionRequiredAuthError.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"InteractionRequiredAuthError.mjs","sources":["../../src/error/InteractionRequiredAuthError.ts"],"sourcesContent":[null],"names":["InteractionRequiredAuthErrorCodes.interactionRequired","InteractionRequiredAuthErrorCodes.consentRequired","InteractionRequiredAuthErrorCodes.loginRequired","InteractionRequiredAuthErrorCodes.badToken","InteractionRequiredAuthErrorCodes.noTokensFound","InteractionRequiredAuthErrorCodes.nativeAccountUnavailable","InteractionRequiredAuthErrorCodes.refreshTokenExpired"],"mappings":";;;;;;;;AAAA;;;AAGG;AAOH;;AAEG;AACU,MAAA,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GAAG,OAAO,IAAI,SAAS,CAAC,YAAY,CAAC;QACjD,IAAI,CAAC,aAAa,GAAG,aAAa,IAAI,SAAS,CAAC,YAAY,CAAC;QAC7D,IAAI,CAAC,MAAM,GAAG,MAAM,IAAI,SAAS,CAAC,YAAY,CAAC;AAC/C,QAAA,IAAI,CAAC,IAAI,GAAG,8BAA8B,CAAC;AAC3C,QAAA,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;KAC1B;AACJ,CAAA;AAED;;;;;AAKG;SACa,0BAA0B,CACtC,SAAkB,EAClB,WAAoB,EACpB,QAAiB,EAAA;AAEjB,IAAA,MAAM,8BAA8B,GAChC,CAAC,CAAC,SAAS;QACX,qCAAqC,CAAC,OAAO,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;AAClE,IAAA,MAAM,6BAA6B,GAC/B,CAAC,CAAC,QAAQ;QACV,sCAAsC,CAAC,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC;AAClE,IAAA,MAAM,8BAA8B,GAChC,CAAC,CAAC,WAAW;AACb,QAAA,qCAAqC,CAAC,IAAI,CAAC,CAAC,WAAW,KAAI;YACvD,OAAO,WAAW,CAAC,OAAO,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC;AACjD,SAAC,CAAC,CAAC;AAEP,IAAA,QACI,8BAA8B;QAC9B,8BAA8B;AAC9B,QAAA,6BAA6B,EAC/B;AACN,CAAC;AAED;;AAEG;AACG,SAAU,kCAAkC,CAC9C,SAAiB,EAAA;IAEjB,OAAO,IAAI,4BAA4B,CACnC,SAAS,EACT,oCAAoC,CAAC,SAAS,CAAC,CAClD,CAAC;AACN;;;;"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/InteractionRequiredAuthErrorCodes.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/InteractionRequiredAuthErrorCodes.d.ts deleted file mode 100644 index d336b1c..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/InteractionRequiredAuthErrorCodes.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -export declare const noTokensFound = "no_tokens_found"; -export declare const nativeAccountUnavailable = "native_account_unavailable"; -export declare const refreshTokenExpired = "refresh_token_expired"; -export declare const interactionRequired = "interaction_required"; -export declare const consentRequired = "consent_required"; -export declare const loginRequired = "login_required"; -export declare const badToken = "bad_token"; -//# sourceMappingURL=InteractionRequiredAuthErrorCodes.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/InteractionRequiredAuthErrorCodes.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/InteractionRequiredAuthErrorCodes.d.ts.map deleted file mode 100644 index 868acb6..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/InteractionRequiredAuthErrorCodes.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"InteractionRequiredAuthErrorCodes.d.ts","sourceRoot":"","sources":["../../src/error/InteractionRequiredAuthErrorCodes.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,aAAa,oBAAoB,CAAC;AAC/C,eAAO,MAAM,wBAAwB,+BAA+B,CAAC;AACrE,eAAO,MAAM,mBAAmB,0BAA0B,CAAC;AAG3D,eAAO,MAAM,mBAAmB,yBAAyB,CAAC;AAC1D,eAAO,MAAM,eAAe,qBAAqB,CAAC;AAClD,eAAO,MAAM,aAAa,mBAAmB,CAAC;AAC9C,eAAO,MAAM,QAAQ,cAAc,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/InteractionRequiredAuthErrorCodes.mjs b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/InteractionRequiredAuthErrorCodes.mjs deleted file mode 100644 index f0af011..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/InteractionRequiredAuthErrorCodes.mjs +++ /dev/null @@ -1,18 +0,0 @@ -/*! @azure/msal-common v14.16.1 2025-08-05 */ -'use strict'; -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -// Codes defined by MSAL -const noTokensFound = "no_tokens_found"; -const nativeAccountUnavailable = "native_account_unavailable"; -const refreshTokenExpired = "refresh_token_expired"; -// Codes potentially returned by server -const interactionRequired = "interaction_required"; -const consentRequired = "consent_required"; -const loginRequired = "login_required"; -const badToken = "bad_token"; - -export { badToken, consentRequired, interactionRequired, loginRequired, nativeAccountUnavailable, noTokensFound, refreshTokenExpired }; -//# sourceMappingURL=InteractionRequiredAuthErrorCodes.mjs.map diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/InteractionRequiredAuthErrorCodes.mjs.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/InteractionRequiredAuthErrorCodes.mjs.map deleted file mode 100644 index 4f2ec68..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/InteractionRequiredAuthErrorCodes.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"InteractionRequiredAuthErrorCodes.mjs","sources":["../../src/error/InteractionRequiredAuthErrorCodes.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAAA;;;AAGG;AAEH;AACO,MAAM,aAAa,GAAG,kBAAkB;AACxC,MAAM,wBAAwB,GAAG,6BAA6B;AAC9D,MAAM,mBAAmB,GAAG,wBAAwB;AAE3D;AACO,MAAM,mBAAmB,GAAG,uBAAuB;AACnD,MAAM,eAAe,GAAG,mBAAmB;AAC3C,MAAM,aAAa,GAAG,iBAAiB;AACvC,MAAM,QAAQ,GAAG;;;;"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/JoseHeaderError.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/JoseHeaderError.d.ts deleted file mode 100644 index 2a00193..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/JoseHeaderError.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { AuthError } from "./AuthError.js"; -import * as JoseHeaderErrorCodes from "./JoseHeaderErrorCodes.js"; -export { JoseHeaderErrorCodes }; -export declare const JoseHeaderErrorMessages: { - missing_kid_error: string; - missing_alg_error: string; -}; -/** - * Error thrown when there is an error in the client code running on the browser. - */ -export declare class JoseHeaderError extends AuthError { - constructor(errorCode: string, errorMessage?: string); -} -/** Returns JoseHeaderError object */ -export declare function createJoseHeaderError(code: string): JoseHeaderError; -//# sourceMappingURL=JoseHeaderError.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/JoseHeaderError.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/JoseHeaderError.d.ts.map deleted file mode 100644 index bfc5cf7..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/JoseHeaderError.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"JoseHeaderError.d.ts","sourceRoot":"","sources":["../../src/error/JoseHeaderError.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,KAAK,oBAAoB,MAAM,2BAA2B,CAAC;AAClE,OAAO,EAAE,oBAAoB,EAAE,CAAC;AAEhC,eAAO,MAAM,uBAAuB;;;CAKnC,CAAC;AAEF;;GAEG;AACH,qBAAa,eAAgB,SAAQ,SAAS;gBAC9B,SAAS,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,MAAM;CAMvD;AAED,qCAAqC;AACrC,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,GAAG,eAAe,CAEnE"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/JoseHeaderError.mjs b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/JoseHeaderError.mjs deleted file mode 100644 index 24af319..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/JoseHeaderError.mjs +++ /dev/null @@ -1,30 +0,0 @@ -/*! @azure/msal-common v14.16.1 2025-08-05 */ -'use strict'; -import { AuthError } from './AuthError.mjs'; -import { missingKidError, missingAlgError } from './JoseHeaderErrorCodes.mjs'; - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -const JoseHeaderErrorMessages = { - [missingKidError]: "The JOSE Header for the requested JWT, JWS or JWK object requires a keyId to be configured as the 'kid' header claim. No 'kid' value was provided.", - [missingAlgError]: "The JOSE Header for the requested JWT, JWS or JWK object requires an algorithm to be specified as the 'alg' header claim. No 'alg' value was provided.", -}; -/** - * Error thrown when there is an error in the client code running on the browser. - */ -class JoseHeaderError extends AuthError { - constructor(errorCode, errorMessage) { - super(errorCode, errorMessage); - this.name = "JoseHeaderError"; - Object.setPrototypeOf(this, JoseHeaderError.prototype); - } -} -/** Returns JoseHeaderError object */ -function createJoseHeaderError(code) { - return new JoseHeaderError(code, JoseHeaderErrorMessages[code]); -} - -export { JoseHeaderError, JoseHeaderErrorMessages, createJoseHeaderError }; -//# sourceMappingURL=JoseHeaderError.mjs.map diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/JoseHeaderError.mjs.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/JoseHeaderError.mjs.map deleted file mode 100644 index 3901f93..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/JoseHeaderError.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"JoseHeaderError.mjs","sources":["../../src/error/JoseHeaderError.ts"],"sourcesContent":[null],"names":["JoseHeaderErrorCodes.missingKidError","JoseHeaderErrorCodes.missingAlgError"],"mappings":";;;;;AAAA;;;AAGG;AAMU,MAAA,uBAAuB,GAAG;AACnC,IAAA,CAACA,eAAoC,GACjC,oJAAoJ;AACxJ,IAAA,CAACC,eAAoC,GACjC,wJAAwJ;EAC9J;AAEF;;AAEG;AACG,MAAO,eAAgB,SAAQ,SAAS,CAAA;IAC1C,WAAY,CAAA,SAAiB,EAAE,YAAqB,EAAA;AAChD,QAAA,KAAK,CAAC,SAAS,EAAE,YAAY,CAAC,CAAC;AAC/B,QAAA,IAAI,CAAC,IAAI,GAAG,iBAAiB,CAAC;QAE9B,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,eAAe,CAAC,SAAS,CAAC,CAAC;KAC1D;AACJ,CAAA;AAED;AACM,SAAU,qBAAqB,CAAC,IAAY,EAAA;IAC9C,OAAO,IAAI,eAAe,CAAC,IAAI,EAAE,uBAAuB,CAAC,IAAI,CAAC,CAAC,CAAC;AACpE;;;;"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/JoseHeaderErrorCodes.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/JoseHeaderErrorCodes.d.ts deleted file mode 100644 index 2d9b35e..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/JoseHeaderErrorCodes.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export declare const missingKidError = "missing_kid_error"; -export declare const missingAlgError = "missing_alg_error"; -//# sourceMappingURL=JoseHeaderErrorCodes.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/JoseHeaderErrorCodes.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/JoseHeaderErrorCodes.d.ts.map deleted file mode 100644 index 588556e..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/JoseHeaderErrorCodes.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"JoseHeaderErrorCodes.d.ts","sourceRoot":"","sources":["../../src/error/JoseHeaderErrorCodes.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,eAAe,sBAAsB,CAAC;AACnD,eAAO,MAAM,eAAe,sBAAsB,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/JoseHeaderErrorCodes.mjs b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/JoseHeaderErrorCodes.mjs deleted file mode 100644 index c7859f5..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/JoseHeaderErrorCodes.mjs +++ /dev/null @@ -1,11 +0,0 @@ -/*! @azure/msal-common v14.16.1 2025-08-05 */ -'use strict'; -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -const missingKidError = "missing_kid_error"; -const missingAlgError = "missing_alg_error"; - -export { missingAlgError, missingKidError }; -//# sourceMappingURL=JoseHeaderErrorCodes.mjs.map diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/JoseHeaderErrorCodes.mjs.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/JoseHeaderErrorCodes.mjs.map deleted file mode 100644 index 50c82b3..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/JoseHeaderErrorCodes.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"JoseHeaderErrorCodes.mjs","sources":["../../src/error/JoseHeaderErrorCodes.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAAA;;;AAGG;AAEI,MAAM,eAAe,GAAG,oBAAoB;AAC5C,MAAM,eAAe,GAAG;;;;"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/NetworkError.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/NetworkError.d.ts deleted file mode 100644 index 32b060b..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/NetworkError.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { AuthError } from "./AuthError.js"; -/** - * Represents network related errors - */ -export declare class NetworkError extends AuthError { - error: AuthError; - httpStatus?: number; - responseHeaders?: Record; - constructor(error: AuthError, httpStatus?: number, responseHeaders?: Record); -} -/** - * Creates NetworkError object for a failed network request - * @param error - Error to be thrown back to the caller - * @param httpStatus - Status code of the network request - * @param responseHeaders - Response headers of the network request, when available - * @returns NetworkError object - */ -export declare function createNetworkError(error: AuthError, httpStatus?: number, responseHeaders?: Record): NetworkError; -//# sourceMappingURL=NetworkError.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/NetworkError.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/NetworkError.d.ts.map deleted file mode 100644 index 9b11282..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/NetworkError.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"NetworkError.d.ts","sourceRoot":"","sources":["../../src/error/NetworkError.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE3C;;GAEG;AACH,qBAAa,YAAa,SAAQ,SAAS;IACvC,KAAK,EAAE,SAAS,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;gBAGrC,KAAK,EAAE,SAAS,EAChB,UAAU,CAAC,EAAE,MAAM,EACnB,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;CAU/C;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAC9B,KAAK,EAAE,SAAS,EAChB,UAAU,CAAC,EAAE,MAAM,EACnB,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GACzC,YAAY,CAEd"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/NetworkError.mjs b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/NetworkError.mjs deleted file mode 100644 index 8ea8357..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/NetworkError.mjs +++ /dev/null @@ -1,34 +0,0 @@ -/*! @azure/msal-common v14.16.1 2025-08-05 */ -'use strict'; -import { AuthError } from './AuthError.mjs'; - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * Represents network related errors - */ -class NetworkError extends AuthError { - constructor(error, httpStatus, responseHeaders) { - super(error.errorCode, error.errorMessage, error.subError); - Object.setPrototypeOf(this, NetworkError.prototype); - this.name = "NetworkError"; - this.error = error; - this.httpStatus = httpStatus; - this.responseHeaders = responseHeaders; - } -} -/** - * Creates NetworkError object for a failed network request - * @param error - Error to be thrown back to the caller - * @param httpStatus - Status code of the network request - * @param responseHeaders - Response headers of the network request, when available - * @returns NetworkError object - */ -function createNetworkError(error, httpStatus, responseHeaders) { - return new NetworkError(error, httpStatus, responseHeaders); -} - -export { NetworkError, createNetworkError }; -//# sourceMappingURL=NetworkError.mjs.map diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/NetworkError.mjs.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/NetworkError.mjs.map deleted file mode 100644 index b36e8ff..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/NetworkError.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"NetworkError.mjs","sources":["../../src/error/NetworkError.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;AAAA;;;AAGG;AAIH;;AAEG;AACG,MAAO,YAAa,SAAQ,SAAS,CAAA;AAKvC,IAAA,WAAA,CACI,KAAgB,EAChB,UAAmB,EACnB,eAAwC,EAAA;AAExC,QAAA,KAAK,CAAC,KAAK,CAAC,SAAS,EAAE,KAAK,CAAC,YAAY,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAC;QAE3D,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,YAAY,CAAC,SAAS,CAAC,CAAC;AACpD,QAAA,IAAI,CAAC,IAAI,GAAG,cAAc,CAAC;AAC3B,QAAA,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;AACnB,QAAA,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;AAC7B,QAAA,IAAI,CAAC,eAAe,GAAG,eAAe,CAAC;KAC1C;AACJ,CAAA;AAED;;;;;;AAMG;SACa,kBAAkB,CAC9B,KAAgB,EAChB,UAAmB,EACnB,eAAwC,EAAA;IAExC,OAAO,IAAI,YAAY,CAAC,KAAK,EAAE,UAAU,EAAE,eAAe,CAAC,CAAC;AAChE;;;;"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/ServerError.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/ServerError.d.ts deleted file mode 100644 index 4a541fa..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/ServerError.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { AuthError } from "./AuthError.js"; -/** - * Error thrown when there is an error with the server code, for example, unavailability. - */ -export declare class ServerError extends AuthError { - /** - * Server error number; - */ - readonly errorNo?: string; - /** - * Http status number; - */ - readonly status?: number; - constructor(errorCode?: string, errorMessage?: string, subError?: string, errorNo?: string, status?: number); -} -//# sourceMappingURL=ServerError.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/ServerError.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/ServerError.d.ts.map deleted file mode 100644 index 7d94978..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/ServerError.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ServerError.d.ts","sourceRoot":"","sources":["../../src/error/ServerError.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE3C;;GAEG;AACH,qBAAa,WAAY,SAAQ,SAAS;IACtC;;OAEG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAE1B;;OAEG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;gBAGrB,SAAS,CAAC,EAAE,MAAM,EAClB,YAAY,CAAC,EAAE,MAAM,EACrB,QAAQ,CAAC,EAAE,MAAM,EACjB,OAAO,CAAC,EAAE,MAAM,EAChB,MAAM,CAAC,EAAE,MAAM;CAStB"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/ServerError.mjs b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/ServerError.mjs deleted file mode 100644 index 3a88195..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/ServerError.mjs +++ /dev/null @@ -1,23 +0,0 @@ -/*! @azure/msal-common v14.16.1 2025-08-05 */ -'use strict'; -import { AuthError } from './AuthError.mjs'; - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * Error thrown when there is an error with the server code, for example, unavailability. - */ -class ServerError extends AuthError { - constructor(errorCode, errorMessage, subError, errorNo, status) { - super(errorCode, errorMessage, subError); - this.name = "ServerError"; - this.errorNo = errorNo; - this.status = status; - Object.setPrototypeOf(this, ServerError.prototype); - } -} - -export { ServerError }; -//# sourceMappingURL=ServerError.mjs.map diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/ServerError.mjs.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/ServerError.mjs.map deleted file mode 100644 index dac28c5..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/error/ServerError.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ServerError.mjs","sources":["../../src/error/ServerError.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;AAAA;;;AAGG;AAIH;;AAEG;AACG,MAAO,WAAY,SAAQ,SAAS,CAAA;IAWtC,WACI,CAAA,SAAkB,EAClB,YAAqB,EACrB,QAAiB,EACjB,OAAgB,EAChB,MAAe,EAAA;AAEf,QAAA,KAAK,CAAC,SAAS,EAAE,YAAY,EAAE,QAAQ,CAAC,CAAC;AACzC,QAAA,IAAI,CAAC,IAAI,GAAG,aAAa,CAAC;AAC1B,QAAA,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;AACvB,QAAA,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QAErB,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,WAAW,CAAC,SAAS,CAAC,CAAC;KACtD;AACJ;;;;"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/exports-browser-only.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/exports-browser-only.d.ts deleted file mode 100644 index 78c4d92..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/exports-browser-only.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -export { SignedHttpRequest, ShrOptions } from "./crypto/SignedHttpRequest.js"; -export { JoseHeader } from "./crypto/JoseHeader.js"; -export { ExternalTokenResponse } from "./response/ExternalTokenResponse.js"; -export { IPerformanceClient, PerformanceCallbackFunction, InProgressPerformanceEvent, QueueMeasurement, } from "./telemetry/performance/IPerformanceClient.js"; -export { IntFields, PerformanceEvent, PerformanceEvents, PerformanceEventStatus, SubMeasurement, } from "./telemetry/performance/PerformanceEvent.js"; -export { IPerformanceMeasurement } from "./telemetry/performance/IPerformanceMeasurement.js"; -export { PerformanceClient, PreQueueEvent, } from "./telemetry/performance/PerformanceClient.js"; -export { StubPerformanceClient } from "./telemetry/performance/StubPerformanceClient.js"; -export { PopTokenGenerator } from "./crypto/PopTokenGenerator.js"; -//# sourceMappingURL=exports-browser-only.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/exports-browser-only.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/exports-browser-only.d.ts.map deleted file mode 100644 index 67d4bc9..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/exports-browser-only.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"exports-browser-only.d.ts","sourceRoot":"","sources":["../src/exports-browser-only.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAC9E,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AAC5E,OAAO,EACH,kBAAkB,EAClB,2BAA2B,EAC3B,0BAA0B,EAC1B,gBAAgB,GACnB,MAAM,+CAA+C,CAAC;AACvD,OAAO,EACH,SAAS,EACT,gBAAgB,EAChB,iBAAiB,EACjB,sBAAsB,EACtB,cAAc,GACjB,MAAM,6CAA6C,CAAC;AACrD,OAAO,EAAE,uBAAuB,EAAE,MAAM,oDAAoD,CAAC;AAC7F,OAAO,EACH,iBAAiB,EACjB,aAAa,GAChB,MAAM,8CAA8C,CAAC;AACtD,OAAO,EAAE,qBAAqB,EAAE,MAAM,kDAAkD,CAAC;AAEzF,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/exports-common.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/exports-common.d.ts deleted file mode 100644 index 36d66f6..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/exports-common.d.ts +++ /dev/null @@ -1,81 +0,0 @@ -import * as AuthToken from "./account/AuthToken.js"; -import * as AuthorityFactory from "./authority/AuthorityFactory.js"; -import * as CacheHelpers from "./cache/utils/CacheHelpers.js"; -import * as TimeUtils from "./utils/TimeUtils.js"; -import * as UrlUtils from "./utils/UrlUtils.js"; -import * as AADServerParamKeys from "./constants/AADServerParamKeys.js"; -export { AuthToken }; -export { AuthorityFactory }; -export { CacheHelpers }; -export { TimeUtils }; -export { UrlUtils }; -export { AADServerParamKeys }; -export { AuthorizationCodeClient } from "./client/AuthorizationCodeClient.js"; -export { RefreshTokenClient } from "./client/RefreshTokenClient.js"; -export { SilentFlowClient } from "./client/SilentFlowClient.js"; -export { BaseClient } from "./client/BaseClient.js"; -export { AuthOptions, SystemOptions, LoggerOptions, CacheOptions, DEFAULT_SYSTEM_OPTIONS, AzureCloudOptions, ApplicationTelemetry, } from "./config/ClientConfiguration.js"; -export { ClientConfiguration } from "./config/ClientConfiguration.js"; -export { AccountInfo, ActiveAccountFilters, TenantProfile, updateAccountTenantProfileData, tenantIdMatchesHomeTenant, buildTenantProfile, } from "./account/AccountInfo.js"; -export { TokenClaims, getTenantIdFromIdTokenClaims, } from "./account/TokenClaims.js"; -export { TokenClaims as IdTokenClaims } from "./account/TokenClaims.js"; -export { CcsCredential, CcsCredentialType } from "./account/CcsCredential.js"; -export { ClientInfo, buildClientInfo, buildClientInfoFromHomeAccountId, } from "./account/ClientInfo.js"; -export { Authority, formatAuthorityUri, buildStaticAuthorityOptions, } from "./authority/Authority.js"; -export { AuthorityOptions, AzureCloudInstance, StaticAuthorityOptions, } from "./authority/AuthorityOptions.js"; -export { AuthorityType } from "./authority/AuthorityType.js"; -export { ProtocolMode } from "./authority/ProtocolMode.js"; -export { OIDCOptions } from "./authority/OIDCOptions.js"; -export { CacheManager, DefaultStorageClass } from "./cache/CacheManager.js"; -export { AccountCache, AccountFilter, AccessTokenCache, IdTokenCache, RefreshTokenCache, AppMetadataCache, CredentialFilter, ValidCacheType, ValidCredentialType, TokenKeys, } from "./cache/utils/CacheTypes.js"; -export { CacheRecord } from "./cache/entities/CacheRecord.js"; -export { CredentialEntity } from "./cache/entities/CredentialEntity.js"; -export { AppMetadataEntity } from "./cache/entities/AppMetadataEntity.js"; -export { AccountEntity } from "./cache/entities/AccountEntity.js"; -export { IdTokenEntity } from "./cache/entities/IdTokenEntity.js"; -export { AccessTokenEntity } from "./cache/entities/AccessTokenEntity.js"; -export { RefreshTokenEntity } from "./cache/entities/RefreshTokenEntity.js"; -export { ServerTelemetryEntity } from "./cache/entities/ServerTelemetryEntity.js"; -export { AuthorityMetadataEntity } from "./cache/entities/AuthorityMetadataEntity.js"; -export { ThrottlingEntity } from "./cache/entities/ThrottlingEntity.js"; -export { INetworkModule, NetworkRequestOptions, StubbedNetworkModule, } from "./network/INetworkModule.js"; -export { NetworkResponse } from "./network/NetworkResponse.js"; -export { ThrottlingUtils } from "./network/ThrottlingUtils.js"; -export { RequestThumbprint } from "./network/RequestThumbprint.js"; -export { IUri } from "./url/IUri.js"; -export { UrlString } from "./url/UrlString.js"; -export { ICrypto, PkceCodes, DEFAULT_CRYPTO_IMPLEMENTATION, SignedHttpRequestParameters, } from "./crypto/ICrypto.js"; -export { BaseAuthRequest } from "./request/BaseAuthRequest.js"; -export { CommonAuthorizationUrlRequest } from "./request/CommonAuthorizationUrlRequest.js"; -export { CommonAuthorizationCodeRequest } from "./request/CommonAuthorizationCodeRequest.js"; -export { CommonRefreshTokenRequest } from "./request/CommonRefreshTokenRequest.js"; -export { CommonSilentFlowRequest } from "./request/CommonSilentFlowRequest.js"; -export { CommonEndSessionRequest } from "./request/CommonEndSessionRequest.js"; -export { RequestParameterBuilder } from "./request/RequestParameterBuilder.js"; -export { StoreInCache } from "./request/StoreInCache.js"; -export { AzureRegion } from "./authority/AzureRegion.js"; -export { AzureRegionConfiguration } from "./authority/AzureRegionConfiguration.js"; -export { AuthenticationResult } from "./response/AuthenticationResult.js"; -export { AuthorizationCodePayload } from "./response/AuthorizationCodePayload.js"; -export { ServerAuthorizationCodeResponse } from "./response/ServerAuthorizationCodeResponse.js"; -export { ServerAuthorizationTokenResponse } from "./response/ServerAuthorizationTokenResponse.js"; -export { ResponseHandler, buildAccountToCache, } from "./response/ResponseHandler.js"; -export { ScopeSet } from "./request/ScopeSet.js"; -export { AuthenticationHeaderParser } from "./request/AuthenticationHeaderParser.js"; -export { ILoggerCallback, LogLevel, Logger } from "./logger/Logger.js"; -export { InteractionRequiredAuthError, InteractionRequiredAuthErrorCodes, InteractionRequiredAuthErrorMessage, createInteractionRequiredAuthError, } from "./error/InteractionRequiredAuthError.js"; -export { AuthError, AuthErrorMessage, AuthErrorCodes, createAuthError, } from "./error/AuthError.js"; -export { ServerError } from "./error/ServerError.js"; -export { NetworkError, createNetworkError } from "./error/NetworkError.js"; -export { CacheError, CacheErrorCodes, createCacheError, } from "./error/CacheError.js"; -export { ClientAuthError, ClientAuthErrorMessage, ClientAuthErrorCodes, createClientAuthError, } from "./error/ClientAuthError.js"; -export { ClientConfigurationError, ClientConfigurationErrorMessage, ClientConfigurationErrorCodes, createClientConfigurationError, } from "./error/ClientConfigurationError.js"; -export { Constants, OIDC_DEFAULT_SCOPES, PromptValue, PersistentCacheKeys, ServerResponseType, ResponseMode, CacheOutcome, CredentialType, CacheType, CacheAccountType, AuthenticationScheme, CodeChallengeMethodValues, PasswordGrantConstants, ThrottlingConstants, ClaimsRequestKeys, HeaderNames, Errors, THE_FAMILY_ID, ONE_DAY_IN_MS, GrantType, AADAuthorityConstants, HttpStatus, DEFAULT_TOKEN_RENEWAL_OFFSET_SEC, JsonWebTokenTypes, } from "./utils/Constants.js"; -export { StringUtils } from "./utils/StringUtils.js"; -export { StringDict } from "./utils/MsalTypes.js"; -export { ProtocolUtils, RequestStateObject, LibraryStateObject, } from "./utils/ProtocolUtils.js"; -export * from "./utils/FunctionWrappers.js"; -export { ServerTelemetryManager } from "./telemetry/server/ServerTelemetryManager.js"; -export { ServerTelemetryRequest } from "./telemetry/server/ServerTelemetryRequest.js"; -export { version } from "./packageMetadata.js"; -//# sourceMappingURL=exports-common.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/exports-common.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/exports-common.d.ts.map deleted file mode 100644 index 95c4be2..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/exports-common.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"exports-common.d.ts","sourceRoot":"","sources":["../src/exports-common.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,SAAS,MAAM,wBAAwB,CAAC;AACpD,OAAO,KAAK,gBAAgB,MAAM,iCAAiC,CAAC;AACpE,OAAO,KAAK,YAAY,MAAM,+BAA+B,CAAC;AAC9D,OAAO,KAAK,SAAS,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OAAO,EACH,SAAS,EACT,gBAAgB,EAChB,cAAc,EACd,eAAe,GAClB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC3E,OAAO,EACH,UAAU,EACV,eAAe,EACf,gBAAgB,GACnB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACH,eAAe,EACf,sBAAsB,EACtB,oBAAoB,EACpB,qBAAqB,GACxB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACH,wBAAwB,EACxB,+BAA+B,EAC/B,6BAA6B,EAC7B,8BAA8B,GACjC,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EACH,SAAS,EACT,mBAAmB,EACnB,WAAW,EACX,mBAAmB,EACnB,kBAAkB,EAClB,YAAY,EACZ,YAAY,EACZ,cAAc,EACd,SAAS,EACT,gBAAgB,EAChB,oBAAoB,EACpB,yBAAyB,EACzB,sBAAsB,EACtB,mBAAmB,EACnB,iBAAiB,EACjB,WAAW,EACX,MAAM,EACN,aAAa,EACb,aAAa,EACb,SAAS,EACT,qBAAqB,EACrB,UAAU,EACV,gCAAgC,EAChC,iBAAiB,GACpB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EACH,aAAa,EACb,kBAAkB,EAClB,kBAAkB,GACrB,MAAM,0BAA0B,CAAC;AAClC,cAAc,6BAA6B,CAAC;AAC5C,OAAO,EAAE,sBAAsB,EAAE,MAAM,8CAA8C,CAAC;AACtF,OAAO,EAAE,sBAAsB,EAAE,MAAM,8CAA8C,CAAC;AACtF,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/exports-node-only.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/exports-node-only.d.ts deleted file mode 100644 index 6828b2f..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/exports-node-only.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import * as ClientAssertionUtils from "./utils/ClientAssertionUtils.js"; -export { ClientAssertionUtils }; -export { IAppTokenProvider, AppTokenProviderParameters, AppTokenProviderResult, } from "./config/AppTokenProvider.js"; -export { INativeBrokerPlugin } from "./broker/nativeBroker/INativeBrokerPlugin.js"; -export { ICachePlugin } from "./cache/interface/ICachePlugin.js"; -export { TokenCacheContext } from "./cache/persistence/TokenCacheContext.js"; -export { ISerializableTokenCache } from "./cache/interface/ISerializableTokenCache.js"; -export { CommonClientCredentialRequest } from "./request/CommonClientCredentialRequest.js"; -export { CommonOnBehalfOfRequest } from "./request/CommonOnBehalfOfRequest.js"; -export { CommonDeviceCodeRequest } from "./request/CommonDeviceCodeRequest.js"; -export { CommonUsernamePasswordRequest } from "./request/CommonUsernamePasswordRequest.js"; -export { NativeRequest } from "./request/NativeRequest.js"; -export { NativeSignOutRequest } from "./request/NativeSignOutRequest.js"; -export { ClientAssertion, ClientAssertionConfig, ClientAssertionCallback, } from "./account/ClientCredentials.js"; -export { DeviceCodeResponse, ServerDeviceCodeResponse, } from "./response/DeviceCodeResponse.js"; -export { getClientAssertion } from "./utils/ClientAssertionUtils.js"; -export { IGuidGenerator } from "./crypto/IGuidGenerator.js"; -//# sourceMappingURL=exports-node-only.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/exports-node-only.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/exports-node-only.d.ts.map deleted file mode 100644 index 1b7173a..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/exports-node-only.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"exports-node-only.d.ts","sourceRoot":"","sources":["../src/exports-node-only.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,oBAAoB,MAAM,iCAAiC,CAAC;AAExE,OAAO,EAAE,oBAAoB,EAAE,CAAC;AAEhC,OAAO,EACH,iBAAiB,EACjB,0BAA0B,EAC1B,sBAAsB,GACzB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,mBAAmB,EAAE,MAAM,8CAA8C,CAAC;AACnF,OAAO,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AACjE,OAAO,EAAE,iBAAiB,EAAE,MAAM,0CAA0C,CAAC;AAC7E,OAAO,EAAE,uBAAuB,EAAE,MAAM,8CAA8C,CAAC;AACvF,OAAO,EAAE,6BAA6B,EAAE,MAAM,4CAA4C,CAAC;AAC3F,OAAO,EAAE,uBAAuB,EAAE,MAAM,sCAAsC,CAAC;AAC/E,OAAO,EAAE,uBAAuB,EAAE,MAAM,sCAAsC,CAAC;AAC/E,OAAO,EAAE,6BAA6B,EAAE,MAAM,4CAA4C,CAAC;AAC3F,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AACzE,OAAO,EACH,eAAe,EACf,qBAAqB,EACrB,uBAAuB,GAC1B,MAAM,gCAAgC,CAAC;AACxC,OAAO,EACH,kBAAkB,EAClB,wBAAwB,GAC3B,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/index-browser.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/index-browser.d.ts deleted file mode 100644 index c93e6b6..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/index-browser.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -/** - * This file is the entrypoint when importing with the browser subpath e.g. "import { someExport } from @azure/msal-common/browser" - * Additional exports should be added to the applicable exports-*.ts files - */ -export * from "./exports-common.js"; -export * from "./exports-browser-only.js"; -//# sourceMappingURL=index-browser.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/index-browser.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/index-browser.d.ts.map deleted file mode 100644 index 20d350c..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/index-browser.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index-browser.d.ts","sourceRoot":"","sources":["../src/index-browser.ts"],"names":[],"mappings":"AAKA;;;GAGG;AACH,cAAc,qBAAqB,CAAC;AACpC,cAAc,2BAA2B,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/index-browser.mjs b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/index-browser.mjs deleted file mode 100644 index 463a548..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/index-browser.mjs +++ /dev/null @@ -1,67 +0,0 @@ -/*! @azure/msal-common v14.16.1 2025-08-05 */ -'use strict'; -export { AuthorizationCodeClient } from './client/AuthorizationCodeClient.mjs'; -export { RefreshTokenClient } from './client/RefreshTokenClient.mjs'; -export { SilentFlowClient } from './client/SilentFlowClient.mjs'; -export { BaseClient } from './client/BaseClient.mjs'; -export { DEFAULT_SYSTEM_OPTIONS } from './config/ClientConfiguration.mjs'; -export { buildTenantProfile, tenantIdMatchesHomeTenant, updateAccountTenantProfileData } from './account/AccountInfo.mjs'; -export { getTenantIdFromIdTokenClaims } from './account/TokenClaims.mjs'; -export { CcsCredentialType } from './account/CcsCredential.mjs'; -export { buildClientInfo, buildClientInfoFromHomeAccountId } from './account/ClientInfo.mjs'; -export { Authority, buildStaticAuthorityOptions, formatAuthorityUri } from './authority/Authority.mjs'; -export { AzureCloudInstance } from './authority/AuthorityOptions.mjs'; -export { AuthorityType } from './authority/AuthorityType.mjs'; -export { ProtocolMode } from './authority/ProtocolMode.mjs'; -export { CacheManager, DefaultStorageClass } from './cache/CacheManager.mjs'; -export { AccountEntity } from './cache/entities/AccountEntity.mjs'; -export { StubbedNetworkModule } from './network/INetworkModule.mjs'; -export { ThrottlingUtils } from './network/ThrottlingUtils.mjs'; -export { UrlString } from './url/UrlString.mjs'; -export { DEFAULT_CRYPTO_IMPLEMENTATION } from './crypto/ICrypto.mjs'; -export { RequestParameterBuilder } from './request/RequestParameterBuilder.mjs'; -export { ResponseHandler, buildAccountToCache } from './response/ResponseHandler.mjs'; -export { ScopeSet } from './request/ScopeSet.mjs'; -export { AuthenticationHeaderParser } from './request/AuthenticationHeaderParser.mjs'; -export { LogLevel, Logger } from './logger/Logger.mjs'; -export { InteractionRequiredAuthError, InteractionRequiredAuthErrorMessage, createInteractionRequiredAuthError } from './error/InteractionRequiredAuthError.mjs'; -import * as InteractionRequiredAuthErrorCodes from './error/InteractionRequiredAuthErrorCodes.mjs'; -export { InteractionRequiredAuthErrorCodes }; -export { AuthError, AuthErrorMessage, createAuthError } from './error/AuthError.mjs'; -import * as AuthErrorCodes from './error/AuthErrorCodes.mjs'; -export { AuthErrorCodes }; -export { ServerError } from './error/ServerError.mjs'; -export { NetworkError, createNetworkError } from './error/NetworkError.mjs'; -export { CacheError, createCacheError } from './error/CacheError.mjs'; -import * as CacheErrorCodes from './error/CacheErrorCodes.mjs'; -export { CacheErrorCodes }; -export { ClientAuthError, ClientAuthErrorMessage, createClientAuthError } from './error/ClientAuthError.mjs'; -import * as ClientAuthErrorCodes from './error/ClientAuthErrorCodes.mjs'; -export { ClientAuthErrorCodes }; -export { ClientConfigurationError, ClientConfigurationErrorMessage, createClientConfigurationError } from './error/ClientConfigurationError.mjs'; -import * as ClientConfigurationErrorCodes from './error/ClientConfigurationErrorCodes.mjs'; -export { ClientConfigurationErrorCodes }; -export { AADAuthorityConstants, AuthenticationScheme, CacheAccountType, CacheOutcome, CacheType, ClaimsRequestKeys, CodeChallengeMethodValues, Constants, CredentialType, DEFAULT_TOKEN_RENEWAL_OFFSET_SEC, Errors, GrantType, HeaderNames, HttpStatus, JsonWebTokenTypes, OIDC_DEFAULT_SCOPES, ONE_DAY_IN_MS, PasswordGrantConstants, PersistentCacheKeys, PromptValue, ResponseMode, ServerResponseType, THE_FAMILY_ID, ThrottlingConstants } from './utils/Constants.mjs'; -export { StringUtils } from './utils/StringUtils.mjs'; -export { ProtocolUtils } from './utils/ProtocolUtils.mjs'; -export { ServerTelemetryManager } from './telemetry/server/ServerTelemetryManager.mjs'; -export { version } from './packageMetadata.mjs'; -export { invoke, invokeAsync } from './utils/FunctionWrappers.mjs'; -import * as AuthToken from './account/AuthToken.mjs'; -export { AuthToken }; -import * as AuthorityFactory from './authority/AuthorityFactory.mjs'; -export { AuthorityFactory }; -import * as CacheHelpers from './cache/utils/CacheHelpers.mjs'; -export { CacheHelpers }; -import * as TimeUtils from './utils/TimeUtils.mjs'; -export { TimeUtils }; -import * as UrlUtils from './utils/UrlUtils.mjs'; -export { UrlUtils }; -import * as AADServerParamKeys from './constants/AADServerParamKeys.mjs'; -export { AADServerParamKeys }; -export { JoseHeader } from './crypto/JoseHeader.mjs'; -export { IntFields, PerformanceEventStatus, PerformanceEvents } from './telemetry/performance/PerformanceEvent.mjs'; -export { PerformanceClient } from './telemetry/performance/PerformanceClient.mjs'; -export { StubPerformanceClient } from './telemetry/performance/StubPerformanceClient.mjs'; -export { PopTokenGenerator } from './crypto/PopTokenGenerator.mjs'; -//# sourceMappingURL=index-browser.mjs.map diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/index-browser.mjs.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/index-browser.mjs.map deleted file mode 100644 index 6150745..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/index-browser.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index-browser.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/index-node.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/index-node.d.ts deleted file mode 100644 index 94c9b82..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/index-node.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -/** - * This file is the entrypoint when importing with the node subpath e.g. "import { someExport } from @azure/msal-common/node" - * Additional exports should be added to the applicable exports-*.ts files - */ -export * from "./exports-common.js"; -export * from "./exports-node-only.js"; -//# sourceMappingURL=index-node.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/index-node.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/index-node.d.ts.map deleted file mode 100644 index 75e2565..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/index-node.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index-node.d.ts","sourceRoot":"","sources":["../src/index-node.ts"],"names":[],"mappings":"AAKA;;;GAGG;AACH,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/index-node.mjs b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/index-node.mjs deleted file mode 100644 index b07088d..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/index-node.mjs +++ /dev/null @@ -1,66 +0,0 @@ -/*! @azure/msal-common v14.16.1 2025-08-05 */ -'use strict'; -export { AuthorizationCodeClient } from './client/AuthorizationCodeClient.mjs'; -export { RefreshTokenClient } from './client/RefreshTokenClient.mjs'; -export { SilentFlowClient } from './client/SilentFlowClient.mjs'; -export { BaseClient } from './client/BaseClient.mjs'; -export { DEFAULT_SYSTEM_OPTIONS } from './config/ClientConfiguration.mjs'; -export { buildTenantProfile, tenantIdMatchesHomeTenant, updateAccountTenantProfileData } from './account/AccountInfo.mjs'; -export { getTenantIdFromIdTokenClaims } from './account/TokenClaims.mjs'; -export { CcsCredentialType } from './account/CcsCredential.mjs'; -export { buildClientInfo, buildClientInfoFromHomeAccountId } from './account/ClientInfo.mjs'; -export { Authority, buildStaticAuthorityOptions, formatAuthorityUri } from './authority/Authority.mjs'; -export { AzureCloudInstance } from './authority/AuthorityOptions.mjs'; -export { AuthorityType } from './authority/AuthorityType.mjs'; -export { ProtocolMode } from './authority/ProtocolMode.mjs'; -export { CacheManager, DefaultStorageClass } from './cache/CacheManager.mjs'; -export { AccountEntity } from './cache/entities/AccountEntity.mjs'; -export { StubbedNetworkModule } from './network/INetworkModule.mjs'; -export { ThrottlingUtils } from './network/ThrottlingUtils.mjs'; -export { UrlString } from './url/UrlString.mjs'; -export { DEFAULT_CRYPTO_IMPLEMENTATION } from './crypto/ICrypto.mjs'; -export { RequestParameterBuilder } from './request/RequestParameterBuilder.mjs'; -export { ResponseHandler, buildAccountToCache } from './response/ResponseHandler.mjs'; -export { ScopeSet } from './request/ScopeSet.mjs'; -export { AuthenticationHeaderParser } from './request/AuthenticationHeaderParser.mjs'; -export { LogLevel, Logger } from './logger/Logger.mjs'; -export { InteractionRequiredAuthError, InteractionRequiredAuthErrorMessage, createInteractionRequiredAuthError } from './error/InteractionRequiredAuthError.mjs'; -import * as InteractionRequiredAuthErrorCodes from './error/InteractionRequiredAuthErrorCodes.mjs'; -export { InteractionRequiredAuthErrorCodes }; -export { AuthError, AuthErrorMessage, createAuthError } from './error/AuthError.mjs'; -import * as AuthErrorCodes from './error/AuthErrorCodes.mjs'; -export { AuthErrorCodes }; -export { ServerError } from './error/ServerError.mjs'; -export { NetworkError, createNetworkError } from './error/NetworkError.mjs'; -export { CacheError, createCacheError } from './error/CacheError.mjs'; -import * as CacheErrorCodes from './error/CacheErrorCodes.mjs'; -export { CacheErrorCodes }; -export { ClientAuthError, ClientAuthErrorMessage, createClientAuthError } from './error/ClientAuthError.mjs'; -import * as ClientAuthErrorCodes from './error/ClientAuthErrorCodes.mjs'; -export { ClientAuthErrorCodes }; -export { ClientConfigurationError, ClientConfigurationErrorMessage, createClientConfigurationError } from './error/ClientConfigurationError.mjs'; -import * as ClientConfigurationErrorCodes from './error/ClientConfigurationErrorCodes.mjs'; -export { ClientConfigurationErrorCodes }; -export { AADAuthorityConstants, AuthenticationScheme, CacheAccountType, CacheOutcome, CacheType, ClaimsRequestKeys, CodeChallengeMethodValues, Constants, CredentialType, DEFAULT_TOKEN_RENEWAL_OFFSET_SEC, Errors, GrantType, HeaderNames, HttpStatus, JsonWebTokenTypes, OIDC_DEFAULT_SCOPES, ONE_DAY_IN_MS, PasswordGrantConstants, PersistentCacheKeys, PromptValue, ResponseMode, ServerResponseType, THE_FAMILY_ID, ThrottlingConstants } from './utils/Constants.mjs'; -export { StringUtils } from './utils/StringUtils.mjs'; -export { ProtocolUtils } from './utils/ProtocolUtils.mjs'; -export { ServerTelemetryManager } from './telemetry/server/ServerTelemetryManager.mjs'; -export { version } from './packageMetadata.mjs'; -export { invoke, invokeAsync } from './utils/FunctionWrappers.mjs'; -import * as AuthToken from './account/AuthToken.mjs'; -export { AuthToken }; -import * as AuthorityFactory from './authority/AuthorityFactory.mjs'; -export { AuthorityFactory }; -import * as CacheHelpers from './cache/utils/CacheHelpers.mjs'; -export { CacheHelpers }; -import * as TimeUtils from './utils/TimeUtils.mjs'; -export { TimeUtils }; -import * as UrlUtils from './utils/UrlUtils.mjs'; -export { UrlUtils }; -import * as AADServerParamKeys from './constants/AADServerParamKeys.mjs'; -export { AADServerParamKeys }; -export { TokenCacheContext } from './cache/persistence/TokenCacheContext.mjs'; -import * as ClientAssertionUtils from './utils/ClientAssertionUtils.mjs'; -export { ClientAssertionUtils }; -export { getClientAssertion } from './utils/ClientAssertionUtils.mjs'; -//# sourceMappingURL=index-node.mjs.map diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/index-node.mjs.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/index-node.mjs.map deleted file mode 100644 index 7d678e0..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/index-node.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index-node.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/index.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/index.d.ts deleted file mode 100644 index c8a2cf6..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/index.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -/** - * @packageDocumentation - * @module @azure/msal-common - */ -/** - * This file is the entrypoint when importing without a specific subpath e.g. "import { someExport } from @azure/msal-common" - * Additional exports should be added to the applicable exports-*.ts files - */ -export * from "./exports-common.js"; -export * from "./exports-browser-only.js"; -export * from "./exports-node-only.js"; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/index.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/index.d.ts.map deleted file mode 100644 index abc33a2..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAKA;;;GAGG;AAEH;;;GAGG;AACH,cAAc,qBAAqB,CAAC;AACpC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,wBAAwB,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/index.mjs b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/index.mjs deleted file mode 100644 index 770bba8..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/index.mjs +++ /dev/null @@ -1,71 +0,0 @@ -/*! @azure/msal-common v14.16.1 2025-08-05 */ -'use strict'; -export { AuthorizationCodeClient } from './client/AuthorizationCodeClient.mjs'; -export { RefreshTokenClient } from './client/RefreshTokenClient.mjs'; -export { SilentFlowClient } from './client/SilentFlowClient.mjs'; -export { BaseClient } from './client/BaseClient.mjs'; -export { DEFAULT_SYSTEM_OPTIONS } from './config/ClientConfiguration.mjs'; -export { buildTenantProfile, tenantIdMatchesHomeTenant, updateAccountTenantProfileData } from './account/AccountInfo.mjs'; -export { getTenantIdFromIdTokenClaims } from './account/TokenClaims.mjs'; -export { CcsCredentialType } from './account/CcsCredential.mjs'; -export { buildClientInfo, buildClientInfoFromHomeAccountId } from './account/ClientInfo.mjs'; -export { Authority, buildStaticAuthorityOptions, formatAuthorityUri } from './authority/Authority.mjs'; -export { AzureCloudInstance } from './authority/AuthorityOptions.mjs'; -export { AuthorityType } from './authority/AuthorityType.mjs'; -export { ProtocolMode } from './authority/ProtocolMode.mjs'; -export { CacheManager, DefaultStorageClass } from './cache/CacheManager.mjs'; -export { AccountEntity } from './cache/entities/AccountEntity.mjs'; -export { StubbedNetworkModule } from './network/INetworkModule.mjs'; -export { ThrottlingUtils } from './network/ThrottlingUtils.mjs'; -export { UrlString } from './url/UrlString.mjs'; -export { DEFAULT_CRYPTO_IMPLEMENTATION } from './crypto/ICrypto.mjs'; -export { RequestParameterBuilder } from './request/RequestParameterBuilder.mjs'; -export { ResponseHandler, buildAccountToCache } from './response/ResponseHandler.mjs'; -export { ScopeSet } from './request/ScopeSet.mjs'; -export { AuthenticationHeaderParser } from './request/AuthenticationHeaderParser.mjs'; -export { LogLevel, Logger } from './logger/Logger.mjs'; -export { InteractionRequiredAuthError, InteractionRequiredAuthErrorMessage, createInteractionRequiredAuthError } from './error/InteractionRequiredAuthError.mjs'; -import * as InteractionRequiredAuthErrorCodes from './error/InteractionRequiredAuthErrorCodes.mjs'; -export { InteractionRequiredAuthErrorCodes }; -export { AuthError, AuthErrorMessage, createAuthError } from './error/AuthError.mjs'; -import * as AuthErrorCodes from './error/AuthErrorCodes.mjs'; -export { AuthErrorCodes }; -export { ServerError } from './error/ServerError.mjs'; -export { NetworkError, createNetworkError } from './error/NetworkError.mjs'; -export { CacheError, createCacheError } from './error/CacheError.mjs'; -import * as CacheErrorCodes from './error/CacheErrorCodes.mjs'; -export { CacheErrorCodes }; -export { ClientAuthError, ClientAuthErrorMessage, createClientAuthError } from './error/ClientAuthError.mjs'; -import * as ClientAuthErrorCodes from './error/ClientAuthErrorCodes.mjs'; -export { ClientAuthErrorCodes }; -export { ClientConfigurationError, ClientConfigurationErrorMessage, createClientConfigurationError } from './error/ClientConfigurationError.mjs'; -import * as ClientConfigurationErrorCodes from './error/ClientConfigurationErrorCodes.mjs'; -export { ClientConfigurationErrorCodes }; -export { AADAuthorityConstants, AuthenticationScheme, CacheAccountType, CacheOutcome, CacheType, ClaimsRequestKeys, CodeChallengeMethodValues, Constants, CredentialType, DEFAULT_TOKEN_RENEWAL_OFFSET_SEC, Errors, GrantType, HeaderNames, HttpStatus, JsonWebTokenTypes, OIDC_DEFAULT_SCOPES, ONE_DAY_IN_MS, PasswordGrantConstants, PersistentCacheKeys, PromptValue, ResponseMode, ServerResponseType, THE_FAMILY_ID, ThrottlingConstants } from './utils/Constants.mjs'; -export { StringUtils } from './utils/StringUtils.mjs'; -export { ProtocolUtils } from './utils/ProtocolUtils.mjs'; -export { ServerTelemetryManager } from './telemetry/server/ServerTelemetryManager.mjs'; -export { version } from './packageMetadata.mjs'; -export { invoke, invokeAsync } from './utils/FunctionWrappers.mjs'; -import * as AuthToken from './account/AuthToken.mjs'; -export { AuthToken }; -import * as AuthorityFactory from './authority/AuthorityFactory.mjs'; -export { AuthorityFactory }; -import * as CacheHelpers from './cache/utils/CacheHelpers.mjs'; -export { CacheHelpers }; -import * as TimeUtils from './utils/TimeUtils.mjs'; -export { TimeUtils }; -import * as UrlUtils from './utils/UrlUtils.mjs'; -export { UrlUtils }; -import * as AADServerParamKeys from './constants/AADServerParamKeys.mjs'; -export { AADServerParamKeys }; -export { JoseHeader } from './crypto/JoseHeader.mjs'; -export { IntFields, PerformanceEventStatus, PerformanceEvents } from './telemetry/performance/PerformanceEvent.mjs'; -export { PerformanceClient } from './telemetry/performance/PerformanceClient.mjs'; -export { StubPerformanceClient } from './telemetry/performance/StubPerformanceClient.mjs'; -export { PopTokenGenerator } from './crypto/PopTokenGenerator.mjs'; -export { TokenCacheContext } from './cache/persistence/TokenCacheContext.mjs'; -import * as ClientAssertionUtils from './utils/ClientAssertionUtils.mjs'; -export { ClientAssertionUtils }; -export { getClientAssertion } from './utils/ClientAssertionUtils.mjs'; -//# sourceMappingURL=index.mjs.map diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/index.mjs.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/index.mjs.map deleted file mode 100644 index 4225af4..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/logger/Logger.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/logger/Logger.d.ts deleted file mode 100644 index 307bee3..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/logger/Logger.d.ts +++ /dev/null @@ -1,96 +0,0 @@ -import { LoggerOptions } from "../config/ClientConfiguration.js"; -/** - * Options for logger messages. - */ -export type LoggerMessageOptions = { - logLevel: LogLevel; - containsPii?: boolean; - context?: string; - correlationId?: string; -}; -/** - * Log message level. - */ -export declare enum LogLevel { - Error = 0, - Warning = 1, - Info = 2, - Verbose = 3, - Trace = 4 -} -/** - * Callback to send the messages to. - */ -export interface ILoggerCallback { - (level: LogLevel, message: string, containsPii: boolean): void; -} -/** - * Class which facilitates logging of messages to a specific place. - */ -export declare class Logger { - private correlationId; - private level; - private piiLoggingEnabled; - private localCallback; - private packageName; - private packageVersion; - constructor(loggerOptions: LoggerOptions, packageName?: string, packageVersion?: string); - private static createDefaultLoggerOptions; - /** - * Create new Logger with existing configurations. - */ - clone(packageName: string, packageVersion: string, correlationId?: string): Logger; - /** - * Log message with required options. - */ - private logMessage; - /** - * Execute callback with message. - */ - executeCallback(level: LogLevel, message: string, containsPii: boolean): void; - /** - * Logs error messages. - */ - error(message: string, correlationId?: string): void; - /** - * Logs error messages with PII. - */ - errorPii(message: string, correlationId?: string): void; - /** - * Logs warning messages. - */ - warning(message: string, correlationId?: string): void; - /** - * Logs warning messages with PII. - */ - warningPii(message: string, correlationId?: string): void; - /** - * Logs info messages. - */ - info(message: string, correlationId?: string): void; - /** - * Logs info messages with PII. - */ - infoPii(message: string, correlationId?: string): void; - /** - * Logs verbose messages. - */ - verbose(message: string, correlationId?: string): void; - /** - * Logs verbose messages with PII. - */ - verbosePii(message: string, correlationId?: string): void; - /** - * Logs trace messages. - */ - trace(message: string, correlationId?: string): void; - /** - * Logs trace messages with PII. - */ - tracePii(message: string, correlationId?: string): void; - /** - * Returns whether PII Logging is enabled or not. - */ - isPiiLoggingEnabled(): boolean; -} -//# sourceMappingURL=Logger.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/logger/Logger.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/logger/Logger.d.ts.map deleted file mode 100644 index 09c1c54..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/logger/Logger.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Logger.d.ts","sourceRoot":"","sources":["../../src/logger/Logger.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AAGjE;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG;IAC/B,QAA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AAO,EAAE,MAAM,EAAE,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI;IAQtD;;OAEG;IACH,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI;IAQzD;;OAEG;IACH,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI;IAQnD;;OAEG;IACH,OAAO,CAAC,OAAO,EAAE,MAAM,EAAE,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI;IAQtD;;OAEG;IACH,OAAO,CAAC,OAAO,EAAE,MAAM,EAAE,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI;IAQtD;;OAEG;IACH,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI;IAQzD;;OAEG;IACH,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI;IAQpD;;OAEG;IACH,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI;IAQvD;;OAEG;IACH,mBAAmB,IAAI,OAAO;CAGjC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/logger/Logger.mjs b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/logger/Logger.mjs deleted file mode 100644 index 13cd902..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/logger/Logger.mjs +++ /dev/null @@ -1,195 +0,0 @@ -/*! @azure/msal-common v14.16.1 2025-08-05 */ -'use strict'; -import { Constants } from '../utils/Constants.mjs'; - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * Log message level. - */ -var LogLevel; -(function (LogLevel) { - LogLevel[LogLevel["Error"] = 0] = "Error"; - LogLevel[LogLevel["Warning"] = 1] = "Warning"; - LogLevel[LogLevel["Info"] = 2] = "Info"; - LogLevel[LogLevel["Verbose"] = 3] = "Verbose"; - LogLevel[LogLevel["Trace"] = 4] = "Trace"; -})(LogLevel || (LogLevel = {})); -/** - * Class which facilitates logging of messages to a specific place. - */ -class Logger { - constructor(loggerOptions, packageName, packageVersion) { - // Current log level, defaults to info. - this.level = LogLevel.Info; - const defaultLoggerCallback = () => { - return; - }; - const setLoggerOptions = loggerOptions || Logger.createDefaultLoggerOptions(); - this.localCallback = - setLoggerOptions.loggerCallback || defaultLoggerCallback; - this.piiLoggingEnabled = setLoggerOptions.piiLoggingEnabled || false; - this.level = - typeof setLoggerOptions.logLevel === "number" - ? setLoggerOptions.logLevel - : LogLevel.Info; - this.correlationId = - setLoggerOptions.correlationId || Constants.EMPTY_STRING; - this.packageName = packageName || Constants.EMPTY_STRING; - this.packageVersion = packageVersion || Constants.EMPTY_STRING; - } - static createDefaultLoggerOptions() { - return { - loggerCallback: () => { - // allow users to not set loggerCallback - }, - piiLoggingEnabled: false, - logLevel: LogLevel.Info, - }; - } - /** - * Create new Logger with existing configurations. - */ - clone(packageName, packageVersion, correlationId) { - return new Logger({ - loggerCallback: this.localCallback, - piiLoggingEnabled: this.piiLoggingEnabled, - logLevel: this.level, - correlationId: correlationId || this.correlationId, - }, packageName, packageVersion); - } - /** - * Log message with required options. - */ - logMessage(logMessage, options) { - if (options.logLevel > this.level || - (!this.piiLoggingEnabled && options.containsPii)) { - return; - } - const timestamp = new Date().toUTCString(); - // Add correlationId to logs if set, correlationId provided on log messages take precedence - const logHeader = `[${timestamp}] : [${options.correlationId || this.correlationId || ""}]`; - const log = `${logHeader} : ${this.packageName}@${this.packageVersion} : ${LogLevel[options.logLevel]} - ${logMessage}`; - // debug(`msal:${LogLevel[options.logLevel]}${options.containsPii ? "-Pii": Constants.EMPTY_STRING}${options.context ? `:${options.context}` : Constants.EMPTY_STRING}`)(logMessage); - this.executeCallback(options.logLevel, log, options.containsPii || false); - } - /** - * Execute callback with message. - */ - executeCallback(level, message, containsPii) { - if (this.localCallback) { - this.localCallback(level, message, containsPii); - } - } - /** - * Logs error messages. - */ - error(message, correlationId) { - this.logMessage(message, { - logLevel: LogLevel.Error, - containsPii: false, - correlationId: correlationId || Constants.EMPTY_STRING, - }); - } - /** - * Logs error messages with PII. - */ - errorPii(message, correlationId) { - this.logMessage(message, { - logLevel: LogLevel.Error, - containsPii: true, - correlationId: correlationId || Constants.EMPTY_STRING, - }); - } - /** - * Logs warning messages. - */ - warning(message, correlationId) { - this.logMessage(message, { - logLevel: LogLevel.Warning, - containsPii: false, - correlationId: correlationId || Constants.EMPTY_STRING, - }); - } - /** - * Logs warning messages with PII. - */ - warningPii(message, correlationId) { - this.logMessage(message, { - logLevel: LogLevel.Warning, - containsPii: true, - correlationId: correlationId || Constants.EMPTY_STRING, - }); - } - /** - * Logs info messages. - */ - info(message, correlationId) { - this.logMessage(message, { - logLevel: LogLevel.Info, - containsPii: false, - correlationId: correlationId || Constants.EMPTY_STRING, - }); - } - /** - * Logs info messages with PII. - */ - infoPii(message, correlationId) { - this.logMessage(message, { - logLevel: LogLevel.Info, - containsPii: true, - correlationId: correlationId || Constants.EMPTY_STRING, - }); - } - /** - * Logs verbose messages. - */ - verbose(message, correlationId) { - this.logMessage(message, { - logLevel: LogLevel.Verbose, - containsPii: false, - correlationId: correlationId || Constants.EMPTY_STRING, - }); - } - /** - * Logs verbose messages with PII. - */ - verbosePii(message, correlationId) { - this.logMessage(message, { - logLevel: LogLevel.Verbose, - containsPii: true, - correlationId: correlationId || Constants.EMPTY_STRING, - }); - } - /** - * Logs trace messages. - */ - trace(message, correlationId) { - this.logMessage(message, { - logLevel: LogLevel.Trace, - containsPii: false, - correlationId: correlationId || Constants.EMPTY_STRING, - }); - } - /** - * Logs trace messages with PII. - */ - tracePii(message, correlationId) { - this.logMessage(message, { - logLevel: LogLevel.Trace, - containsPii: true, - correlationId: correlationId || Constants.EMPTY_STRING, - }); - } - /** - * Returns whether PII Logging is enabled or not. - */ - isPiiLoggingEnabled() { - return this.piiLoggingEnabled || false; - } -} - -export { LogLevel, Logger }; -//# sourceMappingURL=Logger.mjs.map diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/logger/Logger.mjs.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/logger/Logger.mjs.map deleted file mode 100644 index 7d0b056..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/logger/Logger.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Logger.mjs","sources":["../../src/logger/Logger.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;AAAA;;;AAGG;AAeH;;AAEG;IACS,SAMX;AAND,CAAA,UAAY,QAAQ,EAAA;AAChB,IAAA,QAAA,CAAA,QAAA,CAAA,OAAA,CAAA,GAAA,CAAA,CAAA,GAAA,OAAK,CAAA;AACL,IAAA,QAAA,CAAA,QAAA,CAAA,SAAA,CAAA,GAAA,CAAA,CAAA,GAAA,SAAO,CAAA;AACP,IAAA,QAAA,CAAA,QAAA,CAAA,MAAA,CAAA,GAAA,CAAA,CAAA,GAAA,MAAI,CAAA;AACJ,IAAA,QAAA,CAAA,QAAA,CAAA,SAAA,CAAA,GAAA,CAAA,CAAA,GAAA,SAAO,CAAA;AACP,IAAA,QAAA,CAAA,QAAA,CAAA,OAAA,CAAA,GAAA,CAAA,CAAA,GAAA,OAAK,CAAA;AACT,CAAC,EANW,QAAQ,KAAR,QAAQ,GAMnB,EAAA,CAAA,CAAA,CAAA;AASD;;AAEG;MACU,MAAM,CAAA;AAmBf,IAAA,WAAA,CACI,aAA4B,EAC5B,WAAoB,EACpB,cAAuB,EAAA;;AAjBnB,QAAA,IAAA,CAAA,KAAK,GAAa,QAAQ,CAAC,IAAI,CAAC;QAmBpC,MAAM,qBAAqB,GAAG,MAAK;YAC/B,OAAO;AACX,SAAC,CAAC;QACF,MAAM,gBAAgB,GAClB,aAAa,IAAI,MAAM,CAAC,0BAA0B,EAAE,CAAC;AACzD,QAAA,IAAI,CAAC,aAAa;AACd,YAAA,gB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AAEG;IACH,UAAU,CAAC,OAAe,EAAE,aAAsB,EAAA;AAC9C,QAAA,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE;YACrB,QAAQ,EAAE,QAAQ,CAAC,OAAO;AAC1B,YAAA,WAAW,EAAE,IAAI;AACjB,YAAA,aAAa,EAAE,aAAa,IAAI,SAAS,CAAC,YAAY;AACzD,SAAA,CAAC,CAAC;KACN;AAED;;AAEG;IACH,KAAK,CAAC,OAAe,EAAE,aAAsB,EAAA;AACzC,QAAA,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE;YACrB,QAAQ,EAAE,QAAQ,CAAC,KAAK;AACxB,YAAA,WAAW,EAAE,KAAK;AAClB,YAAA,aAAa,EAAE,aAAa,IAAI,SAAS,CAAC,YAAY;AACzD,SAAA,CAAC,CAAC;KACN;AAED;;AAEG;IACH,QAAQ,CAAC,OAAe,EAAE,aAAsB,EAAA;AAC5C,QAAA,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE;YACrB,QAAQ,EAAE,QAAQ,CAAC,KAAK;AACxB,YAAA,WAAW,EAAE,IAAI;AACjB,YAAA,aAAa,EAAE,aAAa,IAAI,SAAS,CAAC,YAAY;AACzD,SAAA,CAAC,CAAC;KACN;AAED;;AAEG;IACH,mBAAmB,GAAA;AACf,QAAA,OAAO,IAAI,CAAC,iBAAiB,IAAI,KAAK,CAAC;KAC1C;AACJ;;;;"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/network/INetworkModule.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/network/INetworkModule.d.ts deleted file mode 100644 index b7e9de6..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/network/INetworkModule.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { NetworkResponse } from "./NetworkResponse.js"; -/** - * Options allowed by network request APIs. - */ -export type NetworkRequestOptions = { - headers?: Record; - body?: string; -}; -/** - * Client network interface to send backend requests. - * @interface - */ -export interface INetworkModule { - /** - * Interface function for async network "GET" requests. Based on the Fetch standard: https://fetch.spec.whatwg.org/ - * @param url - * @param requestParams - * @param enableCaching - */ - sendGetRequestAsync(url: string, options?: NetworkRequestOptions, timeout?: number): Promise>; - /** - * Interface function for async network "POST" requests. Based on the Fetch standard: https://fetch.spec.whatwg.org/ - * @param url - * @param requestParams - * @param enableCaching - */ - sendPostRequestAsync(url: string, options?: NetworkRequestOptions): Promise>; -} -export declare const StubbedNetworkModule: INetworkModule; -//# sourceMappingURL=INetworkModule.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/network/INetworkModule.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/network/INetworkModule.d.ts.map deleted file mode 100644 index d8244f2..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/network/INetworkModule.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"INetworkModule.d.ts","sourceRoot":"","sources":["../../src/network/INetworkModule.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAEvD;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG;IAChC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC,IAAI,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC3B;;;;;OAKG;IACH,mBAAmB,CAAC,CAAC,EACjB,GAAG,EAAE,MAAM,EACX,OAAO,CAAC,EAAE,qBAAqB,EAC/B,OAAO,CAAC,EAAE,MAAM,GACjB,OAAO,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC;IAE/B;;;;;OAKG;IACH,oBAAoB,CAAC,CAAC,EAClB,GAAG,EAAE,MAAM,EACX,OAAO,CAAC,EAAE,qBAAqB,GAChC,OAAO,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC;CAClC;AAED,eAAO,MAAM,oBAAoB,EAAE,cAWlC,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/network/INetworkModule.mjs b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/network/INetworkModule.mjs deleted file mode 100644 index 5cec807..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/network/INetworkModule.mjs +++ /dev/null @@ -1,20 +0,0 @@ -/*! @azure/msal-common v14.16.1 2025-08-05 */ -'use strict'; -import { createClientAuthError } from '../error/ClientAuthError.mjs'; -import { methodNotImplemented } from '../error/ClientAuthErrorCodes.mjs'; - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -const StubbedNetworkModule = { - sendGetRequestAsync: () => { - return Promise.reject(createClientAuthError(methodNotImplemented)); - }, - sendPostRequestAsync: () => { - return Promise.reject(createClientAuthError(methodNotImplemented)); - }, -}; - -export { StubbedNetworkModule }; -//# sourceMappingURL=INetworkModule.mjs.map diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/network/INetworkModule.mjs.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/network/INetworkModule.mjs.map deleted file mode 100644 index d87d6ac..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/network/INetworkModule.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"INetworkModule.mjs","sources":["../../src/network/INetworkModule.ts"],"sourcesContent":[null],"names":["ClientAuthErrorCodes.methodNotImplemented"],"mappings":";;;;;AAAA;;;AAGG;AA6CU,MAAA,oBAAoB,GAAmB;IAChD,mBAAmB,EAAE,MAAK;QACtB,OAAO,OAAO,CAAC,MAAM,CACjB,qBAAqB,CAACA,oBAAyC,CAAC,CACnE,CAAC;KACL;IACD,oBAAoB,EAAE,MAAK;QACvB,OAAO,OAAO,CAAC,MAAM,CACjB,qBAAqB,CAACA,oBAAyC,CAAC,CACnE,CAAC;KACL;;;;;"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/network/NetworkResponse.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/network/NetworkResponse.d.ts deleted file mode 100644 index 7907c1f..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/network/NetworkResponse.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -export type NetworkResponse = { - headers: Record; - body: T; - status: number; -}; -//# sourceMappingURL=NetworkResponse.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/network/NetworkResponse.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/network/NetworkResponse.d.ts.map deleted file mode 100644 index 308a6d4..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/network/NetworkResponse.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"NetworkResponse.d.ts","sourceRoot":"","sources":["../../src/network/NetworkResponse.ts"],"names":[],"mappings":"AAKA,MAAM,MAAM,eAAe,CAAC,CAAC,IAAI;IAC7B,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChC,IAAI,EAAE,CAAC,CAAC;IACR,MAAM,EAAE,MAAM,CAAC;CAClB,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/network/RequestThumbprint.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/network/RequestThumbprint.d.ts deleted file mode 100644 index 07e6a1c..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/network/RequestThumbprint.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { ShrOptions } from "../crypto/SignedHttpRequest.js"; -import { AuthenticationScheme } from "../utils/Constants.js"; -/** - * Type representing a unique request thumbprint. - */ -export type RequestThumbprint = { - clientId: string; - authority: string; - scopes: Array; - homeAccountIdentifier?: string; - claims?: string; - authenticationScheme?: AuthenticationScheme; - resourceRequestMethod?: string; - resourceRequestUri?: string; - shrClaims?: string; - sshKid?: string; - shrOptions?: ShrOptions; -}; -//# sourceMappingURL=RequestThumbprint.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/network/RequestThumbprint.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/network/RequestThumbprint.d.ts.map deleted file mode 100644 index f7501d4..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/network/RequestThumbprint.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"RequestThumbprint.d.ts","sourceRoot":"","sources":["../../src/network/RequestThumbprint.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAC5D,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAE7D;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACtB,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,oBAAoB,CAAC,EAAE,oBAAoB,CAAC;IAC5C,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,UAAU,CAAC;CAC3B,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/network/ThrottlingUtils.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/network/ThrottlingUtils.d.ts deleted file mode 100644 index 2982ed7..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/network/ThrottlingUtils.d.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { NetworkResponse } from "./NetworkResponse.js"; -import { ServerAuthorizationTokenResponse } from "../response/ServerAuthorizationTokenResponse.js"; -import { CacheManager } from "../cache/CacheManager.js"; -import { RequestThumbprint } from "./RequestThumbprint.js"; -import { BaseAuthRequest } from "../request/BaseAuthRequest.js"; -/** @internal */ -export declare class ThrottlingUtils { - /** - * Prepares a RequestThumbprint to be stored as a key. - * @param thumbprint - */ - static generateThrottlingStorageKey(thumbprint: RequestThumbprint): string; - /** - * Performs necessary throttling checks before a network request. - * @param cacheManager - * @param thumbprint - */ - static preProcess(cacheManager: CacheManager, thumbprint: RequestThumbprint, correlationId: string): void; - /** - * Performs necessary throttling checks after a network request. - * @param cacheManager - * @param thumbprint - * @param response - */ - static postProcess(cacheManager: CacheManager, thumbprint: RequestThumbprint, response: NetworkResponse, correlationId: string): void; - /** - * Checks a NetworkResponse object's status codes against 429 or 5xx - * @param response - */ - static checkResponseStatus(response: NetworkResponse): boolean; - /** - * Checks a NetworkResponse object's RetryAfter header - * @param response - */ - static checkResponseForRetryAfter(response: NetworkResponse): boolean; - /** - * Calculates the Unix-time value for a throttle to expire given throttleTime in seconds. - * @param throttleTime - */ - static calculateThrottleTime(throttleTime: number): number; - static removeThrottle(cacheManager: CacheManager, clientId: string, request: BaseAuthRequest, homeAccountIdentifier?: string): void; -} -//# sourceMappingURL=ThrottlingUtils.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/network/ThrottlingUtils.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/network/ThrottlingUtils.d.ts.map deleted file mode 100644 index e644d58..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/network/ThrottlingUtils.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ThrottlingUtils.d.ts","sourceRoot":"","sources":["../../src/network/ThrottlingUtils.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,gCAAgC,EAAE,MAAM,iDAAiD,CAAC;AAMnG,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAExD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAE3D,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAEhE,gBAAgB;AAChB,qBAAa,eAAe;IACxB;;;OAGG;IACH,MAAM,CAAC,4BAA4B,CAAC,UAAU,EAAE,iBAAiB,GAAG,MAAM;IAM1E;;;;OAIG;IACH,MAAM,CAAC,UAAU,CACb,YAAY,EAAE,YAAY,EAC1B,UAAU,EAAE,iBAAiB,EAC7B,aAAa,EAAE,MAAM,GACtB,IAAI;IAiBP;;;;;OAKG;IACH,MAAM,CAAC,WAAW,CACd,YAAY,EAAE,YAAY,EAC1B,UAAU,EAAE,iBAAiB,EAC7B,QAAQ,EAAE,eAAe,CAAC,gCAAgC,CAAC,EAC3D,aAAa,EAAE,MAAM,GACtB,IAAI;IAsBP;;;OAGG;IACH,MAAM,CAAC,mBAAmB,CACtB,QAAQ,EAAE,eAAe,CAAC,gCAAgC,CAAC,GAC5D,OAAO;IAOV;;;OAGG;IACH,MAAM,CAAC,0BAA0B,CAC7B,QAAQ,EAAE,eAAe,CAAC,gCAAgC,CAAC,GAC5D,OAAO;IAUV;;;OAGG;IACH,MAAM,CAAC,qBAAqB,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM;IAc1D,MAAM,CAAC,cAAc,CACjB,YAAY,EAAE,YAAY,EAC1B,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,eAAe,EACxB,qBAAqB,CAAC,EAAE,MAAM,GAC/B,IAAI;CAiBV"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/network/ThrottlingUtils.mjs b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/network/ThrottlingUtils.mjs deleted file mode 100644 index dd97863..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/network/ThrottlingUtils.mjs +++ /dev/null @@ -1,103 +0,0 @@ -/*! @azure/msal-common v14.16.1 2025-08-05 */ -'use strict'; -import { ThrottlingConstants, Constants, HeaderNames } from '../utils/Constants.mjs'; -import { ServerError } from '../error/ServerError.mjs'; - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** @internal */ -class ThrottlingUtils { - /** - * Prepares a RequestThumbprint to be stored as a key. - * @param thumbprint - */ - static generateThrottlingStorageKey(thumbprint) { - return `${ThrottlingConstants.THROTTLING_PREFIX}.${JSON.stringify(thumbprint)}`; - } - /** - * Performs necessary throttling checks before a network request. - * @param cacheManager - * @param thumbprint - */ - static preProcess(cacheManager, thumbprint, correlationId) { - const key = ThrottlingUtils.generateThrottlingStorageKey(thumbprint); - const value = cacheManager.getThrottlingCache(key); - if (value) { - if (value.throttleTime < Date.now()) { - cacheManager.removeItem(key, correlationId); - return; - } - throw new ServerError(value.errorCodes?.join(" ") || Constants.EMPTY_STRING, value.errorMessage, value.subError); - } - } - /** - * Performs necessary throttling checks after a network request. - * @param cacheManager - * @param thumbprint - * @param response - */ - static postProcess(cacheManager, thumbprint, response, correlationId) { - if (ThrottlingUtils.checkResponseStatus(response) || - ThrottlingUtils.checkResponseForRetryAfter(response)) { - const thumbprintValue = { - throttleTime: ThrottlingUtils.calculateThrottleTime(parseInt(response.headers[HeaderNames.RETRY_AFTER])), - error: response.body.error, - errorCodes: response.body.error_codes, - errorMessage: response.body.error_description, - subError: response.body.suberror, - }; - cacheManager.setThrottlingCache(ThrottlingUtils.generateThrottlingStorageKey(thumbprint), thumbprintValue, correlationId); - } - } - /** - * Checks a NetworkResponse object's status codes against 429 or 5xx - * @param response - */ - static checkResponseStatus(response) { - return (response.status === 429 || - (response.status >= 500 && response.status < 600)); - } - /** - * Checks a NetworkResponse object's RetryAfter header - * @param response - */ - static checkResponseForRetryAfter(response) { - if (response.headers) { - return (response.headers.hasOwnProperty(HeaderNames.RETRY_AFTER) && - (response.status < 200 || response.status >= 300)); - } - return false; - } - /** - * Calculates the Unix-time value for a throttle to expire given throttleTime in seconds. - * @param throttleTime - */ - static calculateThrottleTime(throttleTime) { - const time = throttleTime <= 0 ? 0 : throttleTime; - const currentSeconds = Date.now() / 1000; - return Math.floor(Math.min(currentSeconds + - (time || ThrottlingConstants.DEFAULT_THROTTLE_TIME_SECONDS), currentSeconds + - ThrottlingConstants.DEFAULT_MAX_THROTTLE_TIME_SECONDS) * 1000); - } - static removeThrottle(cacheManager, clientId, request, homeAccountIdentifier) { - const thumbprint = { - clientId: clientId, - authority: request.authority, - scopes: request.scopes, - homeAccountIdentifier: homeAccountIdentifier, - claims: request.claims, - authenticationScheme: request.authenticationScheme, - resourceRequestMethod: request.resourceRequestMethod, - resourceRequestUri: request.resourceRequestUri, - shrClaims: request.shrClaims, - sshKid: request.sshKid, - }; - const key = this.generateThrottlingStorageKey(thumbprint); - cacheManager.removeItem(key, request.correlationId); - } -} - -export { ThrottlingUtils }; -//# sourceMappingURL=ThrottlingUtils.mjs.map diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/network/ThrottlingUtils.mjs.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/network/ThrottlingUtils.mjs.map deleted file mode 100644 index b957063..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/network/ThrottlingUtils.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ThrottlingUtils.mjs","sources":["../../src/network/ThrottlingUtils.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;AAAA;;;AAGG;AAeH;MACa,eAAe,CAAA;AACxB;;;AAGG;IACH,OAAO,4BAA4B,CAAC,UAA6B,EAAA;AAC7D,QAAA,OAAO,CAAG,EAAA,mBAAmB,CAAC,iBAAiB,CAAI,CAAA,EAAA,IAAI,CAAC,SAAS,CAC7D,UAAU,CACb,CAAA,CAAE,CAAC;KACP;AAED;;;;AAIG;AACH,IAAA,OAAO,UAAU,CACb,YAA0B,EAC1B,UAA6B,E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,EAAE,OAAO,CAAC,oBAAoB;YAClD,qBAAqB,EAAE,OAAO,CAAC,qBAAqB;YACpD,kBAAkB,EAAE,OAAO,CAAC,kBAAkB;YAC9C,SAAS,EAAE,OAAO,CAAC,SAAS;YAC5B,MAAM,EAAE,OAAO,CAAC,MAAM;SACzB,CAAC;QAEF,MAAM,GAAG,GAAG,IAAI,CAAC,4BAA4B,CAAC,UAAU,CAAC,CAAC;QAC1D,YAAY,CAAC,UAAU,CAAC,GAAG,EAAE,OAAO,CAAC,aAAa,CAAC,CAAC;KACvD;AACJ;;;;"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/packageMetadata.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/packageMetadata.d.ts deleted file mode 100644 index 3e38430..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/packageMetadata.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export declare const name = "@azure/msal-common"; -export declare const version = "14.16.1"; -//# sourceMappingURL=packageMetadata.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/packageMetadata.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/packageMetadata.d.ts.map deleted file mode 100644 index 2e61986..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/packageMetadata.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"packageMetadata.d.ts","sourceRoot":"","sources":["../src/packageMetadata.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,IAAI,uBAAuB,CAAC;AACzC,eAAO,MAAM,OAAO,YAAY,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/packageMetadata.mjs b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/packageMetadata.mjs deleted file mode 100644 index f3091ee..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/packageMetadata.mjs +++ /dev/null @@ -1,8 +0,0 @@ -/*! @azure/msal-common v14.16.1 2025-08-05 */ -'use strict'; -/* eslint-disable header/header */ -const name = "@azure/msal-common"; -const version = "14.16.1"; - -export { name, version }; -//# sourceMappingURL=packageMetadata.mjs.map diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/packageMetadata.mjs.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/packageMetadata.mjs.map deleted file mode 100644 index a534ef5..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/packageMetadata.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"packageMetadata.mjs","sources":["../src/packageMetadata.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAAA;AACO,MAAM,IAAI,GAAG,qBAAqB;AAClC,MAAM,OAAO,GAAG;;;;"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/request/AuthenticationHeaderParser.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/request/AuthenticationHeaderParser.d.ts deleted file mode 100644 index d20be86..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/request/AuthenticationHeaderParser.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * This is a helper class that parses supported HTTP response authentication headers to extract and return - * header challenge values that can be used outside the basic authorization flows. - */ -export declare class AuthenticationHeaderParser { - private headers; - constructor(headers: Record); - /** - * This method parses the SHR nonce value out of either the Authentication-Info or WWW-Authenticate authentication headers. - * @returns - */ - getShrNonce(): string; - /** - * Parses an HTTP header's challenge set into a key/value map. - * @param header - * @returns - */ - private parseChallenges; -} -//# sourceMappingURL=AuthenticationHeaderParser.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/request/AuthenticationHeaderParser.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/request/AuthenticationHeaderParser.d.ts.map deleted file mode 100644 index af8d71d..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/request/AuthenticationHeaderParser.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AuthenticationHeaderParser.d.ts","sourceRoot":"","sources":["../../src/request/AuthenticationHeaderParser.ts"],"names":[],"mappings":"AAmBA;;;GAGG;AACH,qBAAa,0BAA0B;IACnC,OAAO,CAAC,OAAO,CAAyB;gBAE5B,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;IAI3C;;;OAGG;IACH,WAAW,IAAI,MAAM;IAqCrB;;;;OAIG;IACH,OAAO,CAAC,eAAe;CAe1B"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/request/AuthenticationHeaderParser.mjs b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/request/AuthenticationHeaderParser.mjs deleted file mode 100644 index 5561727..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/request/AuthenticationHeaderParser.mjs +++ /dev/null @@ -1,64 +0,0 @@ -/*! @azure/msal-common v14.16.1 2025-08-05 */ -'use strict'; -import { createClientConfigurationError } from '../error/ClientConfigurationError.mjs'; -import { Constants, HeaderNames } from '../utils/Constants.mjs'; -import { invalidAuthenticationHeader, missingNonceAuthenticationHeader } from '../error/ClientConfigurationErrorCodes.mjs'; - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * This is a helper class that parses supported HTTP response authentication headers to extract and return - * header challenge values that can be used outside the basic authorization flows. - */ -class AuthenticationHeaderParser { - constructor(headers) { - this.headers = headers; - } - /** - * This method parses the SHR nonce value out of either the Authentication-Info or WWW-Authenticate authentication headers. - * @returns - */ - getShrNonce() { - // Attempt to parse nonce from Authentiacation-Info - const authenticationInfo = this.headers[HeaderNames.AuthenticationInfo]; - if (authenticationInfo) { - const authenticationInfoChallenges = this.parseChallenges(authenticationInfo); - if (authenticationInfoChallenges.nextnonce) { - return authenticationInfoChallenges.nextnonce; - } - throw createClientConfigurationError(invalidAuthenticationHeader); - } - // Attempt to parse nonce from WWW-Authenticate - const wwwAuthenticate = this.headers[HeaderNames.WWWAuthenticate]; - if (wwwAuthenticate) { - const wwwAuthenticateChallenges = this.parseChallenges(wwwAuthenticate); - if (wwwAuthenticateChallenges.nonce) { - return wwwAuthenticateChallenges.nonce; - } - throw createClientConfigurationError(invalidAuthenticationHeader); - } - // If neither header is present, throw missing headers error - throw createClientConfigurationError(missingNonceAuthenticationHeader); - } - /** - * Parses an HTTP header's challenge set into a key/value map. - * @param header - * @returns - */ - parseChallenges(header) { - const schemeSeparator = header.indexOf(" "); - const challenges = header.substr(schemeSeparator + 1).split(","); - const challengeMap = {}; - challenges.forEach((challenge) => { - const [key, value] = challenge.split("="); - // Remove escaped quotation marks (', ") from challenge string to keep only the challenge value - challengeMap[key] = unescape(value.replace(/['"]+/g, Constants.EMPTY_STRING)); - }); - return challengeMap; - } -} - -export { AuthenticationHeaderParser }; -//# sourceMappingURL=AuthenticationHeaderParser.mjs.map diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/request/AuthenticationHeaderParser.mjs.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/request/AuthenticationHeaderParser.mjs.map deleted file mode 100644 index b309867..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/request/AuthenticationHeaderParser.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AuthenticationHeaderParser.mjs","sources":["../../src/request/AuthenticationHeaderParser.ts"],"sourcesContent":[null],"names":["ClientConfigurationErrorCodes.invalidAuthenticationHeader","ClientConfigurationErrorCodes.missingNonceAuthenticationHeader"],"mappings":";;;;;;AAAA;;;AAGG;AAgBH;;;AAGG;MACU,0BAA0B,CAAA;AAGnC,IAAA,WAAA,CAAY,OAA+B,EAAA;AACvC,QAAA,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;KAC1B;AAED;;;AAGG;IACH,WAAW,GAAA;;QAEP,MAAM,kBAAkB,GAAG,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,kBAAkB,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,CAAC;AAEH,QAAA,OAAO,YAAY,CAAC;KACvB;AACJ;;;;"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/request/BaseAuthRequest.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/request/BaseAuthRequest.d.ts deleted file mode 100644 index 9b14b4d..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/request/BaseAuthRequest.d.ts +++ /dev/null @@ -1,50 +0,0 @@ -import { AuthenticationScheme } from "../utils/Constants.js"; -import { AzureCloudOptions } from "../config/ClientConfiguration.js"; -import { StringDict } from "../utils/MsalTypes.js"; -import { StoreInCache } from "./StoreInCache.js"; -import { ShrOptions } from "../crypto/SignedHttpRequest.js"; -/** - * BaseAuthRequest - * - authority - URL of the authority, the security token service (STS) from which MSAL will acquire tokens. Defaults to https://login.microsoftonline.com/common. If using the same authority for all request, authority should set on client application object and not request, to avoid resolving authority endpoints multiple times. - * - correlationId - Unique GUID set per request to trace a request end-to-end for telemetry purposes. - * - scopes - Array of scopes the application is requesting access to. - * - authenticationScheme - The type of token retrieved. Defaults to "Bearer". Can also be type "pop" or "SSH". - * - claims - A stringified claims request which will be added to all /authorize and /token calls - * - shrClaims - A stringified claims object which will be added to a Signed HTTP Request - * - shrNonce - A server-generated timestamp that has been encrypted and base64URL encoded, which will be added to a Signed HTTP Request. - * - shrOptions - An object containing options for the Signed HTTP Request - * - resourceRequestMethod - HTTP Request type used to request data from the resource (i.e. "GET", "POST", etc.). Used for proof-of-possession flows. - * - resourceRequestUri - URI that token will be used for. Used for proof-of-possession flows. - * - sshJwk - A stringified JSON Web Key representing a public key that can be signed by an SSH certificate. - * - sshKid - Key ID that uniquely identifies the SSH public key mentioned above. - * - azureCloudOptions - Convenience string enums for users to provide public/sovereign cloud ids - * - requestedClaimsHash - SHA 256 hash string of the requested claims string, used as part of an access token cache key so tokens can be filtered by requested claims - * - tokenQueryParameters - String to string map of custom query parameters added to the /token call - * - storeInCache - Object containing boolean values indicating whether to store tokens in the cache or not (default is true) - * - scenarioId - Scenario id to track custom user prompts - * - popKid - Key ID to identify the public key for PoP token request - * - embeddedClientId - Embedded client id. When specified, broker client id (brk_client_id) and redirect uri (brk_redirect_uri) params are set with values from the config, overriding the corresponding extra parameters, if present. - */ -export type BaseAuthRequest = { - authority: string; - correlationId: string; - scopes: Array; - authenticationScheme?: AuthenticationScheme; - claims?: string; - shrClaims?: string; - shrNonce?: string; - shrOptions?: ShrOptions; - resourceRequestMethod?: string; - resourceRequestUri?: string; - sshJwk?: string; - sshKid?: string; - azureCloudOptions?: AzureCloudOptions; - requestedClaimsHash?: string; - maxAge?: number; - tokenQueryParameters?: StringDict; - storeInCache?: StoreInCache; - scenarioId?: string; - popKid?: string; - embeddedClientId?: string; -}; -//# sourceMappingURL=BaseAuthRequest.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/request/BaseAuthRequest.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/request/BaseAuthRequest.d.ts.map deleted file mode 100644 index e2193ae..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/request/BaseAuthRequest.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"BaseAuthRequest.d.ts","sourceRoot":"","sources":["../../src/request/BaseAuthRequest.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AACrE,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAE5D;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,MAAM,eAAe,GAAG;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACtB,oBAAoB,CAAC,EAAE,oBAAoB,CAAC;IAC5C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;IACtC,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,oBAAoB,CAAC,EAAE,UAAU,CAAC;IAClC,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC7B,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/request/CommonAuthorizationCodeRequest.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/request/CommonAuthorizationCodeRequest.d.ts deleted file mode 100644 index c3d75a3..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/request/CommonAuthorizationCodeRequest.d.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { BaseAuthRequest } from "./BaseAuthRequest.js"; -import { StringDict } from "../utils/MsalTypes.js"; -import { CcsCredential } from "../account/CcsCredential.js"; -/** - * Request object passed by user to acquire a token from the server exchanging a valid authorization code (second leg of OAuth2.0 Authorization Code flow) - * - * - scopes - Array of scopes the application is requesting access to. - * - claims - A stringified claims request which will be added to all /authorize and /token calls - * - authority: - URL of the authority, the security token service (STS) from which MSAL will acquire tokens. If authority is set on client application object, this will override that value. Overriding the value will cause for authority validation to happen each time. If the same authority will be used for all request, set on the application object instead of the requests. - * - correlationId - Unique GUID set per request to trace a request end-to-end for telemetry purposes. - * - redirectUri - The redirect URI of your app, where the authority will redirect to after the user inputs credentials and consents. It must exactly match one of the redirect URIs you registered in the portal - * - code - The authorization_code that the user acquired in the first leg of the flow. - * - codeVerifier - The same code_verifier that was used to obtain the authorization_code. Required if PKCE was used in the authorization code grant request.For more information, see the PKCE RFC: https://tools.ietf.org/html/rfc7636 - * - resourceRequestMethod - HTTP Request type used to request data from the resource (i.e. "GET", "POST", etc.). Used for proof-of-possession flows. - * - resourceRequestUri - URI that token will be used for. Used for proof-of-possession flows. - * - enableSpaAuthCode - Enables the acqusition of a spa authorization code (confidential clients only) - * - tokenQueryParameters - String to string map of custom query parameters added to the /token call - */ -export type CommonAuthorizationCodeRequest = BaseAuthRequest & { - code: string; - redirectUri: string; - codeVerifier?: string; - tokenBodyParameters?: StringDict; - enableSpaAuthorizationCode?: boolean; - clientInfo?: string; - ccsCredential?: CcsCredential; -}; -//# sourceMappingURL=CommonAuthorizationCodeRequest.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/request/CommonAuthorizationCodeRequest.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/request/CommonAuthorizationCodeRequest.d.ts.map deleted file mode 100644 index 8dd5f76..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/request/CommonAuthorizationCodeRequest.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"CommonAuthorizationCodeRequest.d.ts","sourceRoot":"","sources":["../../src/request/CommonAuthorizationCodeRequest.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAE5D;;;;;;;;;;;;;;GAcG;AACH,MAAM,MAAM,8BAA8B,GAAG,eAAe,GAAG;IAC3D,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,mBAAmB,CAAC,EAAE,UAAU,CAAC;IACjC,0BAA0B,CAAC,EAAE,OAAO,CAAC;IACrC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,aAAa,CAAC;CACjC,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/request/CommonAuthorizationUrlRequest.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/request/CommonAuthorizationUrlRequest.d.ts deleted file mode 100644 index 84b316f..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/request/CommonAuthorizationUrlRequest.d.ts +++ /dev/null @@ -1,51 +0,0 @@ -import { ResponseMode } from "../utils/Constants.js"; -import { StringDict } from "../utils/MsalTypes.js"; -import { BaseAuthRequest } from "./BaseAuthRequest.js"; -import { AccountInfo } from "../account/AccountInfo.js"; -/** - * Request object passed by user to retrieve a Code from the server (first leg of authorization code grant flow) - * - * - scopes - Array of scopes the application is requesting access to. - * - claims - A stringified claims request which will be added to all /authorize and /token calls - * - authority - Url of the authority which the application acquires tokens from. - * - correlationId - Unique GUID set per request to trace a request end-to-end for telemetry purposes. - * - redirectUri - The redirect URI where authentication responses can be received by your application. It must exactly match one of the redirect URIs registered in the Azure portal. - * - extraScopesToConsent - Scopes for a different resource when the user needs consent upfront. - * - responseMode - Specifies the method that should be used to send the authentication result to your app. Can be query, form_post, or fragment. If no value is passed in, it defaults to query. - * - codeChallenge - Used to secure authorization code grant via Proof of Key for Code Exchange (PKCE). For more information, see the PKCE RCF:https://tools.ietf.org/html/rfc7636 - * - codeChallengeMethod - The method used to encode the code verifier for the code challenge parameter. Can be "plain" or "S256". If excluded, code challenge is assumed to be plaintext. For more information, see the PKCE RCF: https://tools.ietf.org/html/rfc7636 - * - state - A value included in the request that is also returned in the token response. A randomly generated unique value is typically used for preventing cross site request forgery attacks. The state is also used to encode information about the user's state in the app before the authentication request occurred. - * - prompt - Indicates the type of user interaction that is required. - * login: will force the user to enter their credentials on that request, negating single-sign on - * none: will ensure that the user isn't presented with any interactive prompt. if request can't be completed via single-sign on, the endpoint will return an interaction_required error - * consent: will the trigger the OAuth consent dialog after the user signs in, asking the user to grant permissions to the app - * select_account: will interrupt single sign-=on providing account selection experience listing all the accounts in session or any remembered accounts or an option to choose to use a different account - * create: will direct the user to the account creation experience instead of the log in experience - * no_session: will not read existing session token when authenticating the user. Upon user being successfully authenticated, EVO won’t create a new session for the user. FOR INTERNAL USE ONLY. - * - account - AccountInfo obtained from a getAccount API. Will be used in certain scenarios to generate login_hint if both loginHint and sid params are not provided. - * - loginHint - Can be used to pre-fill the username/email address field of the sign-in page for the user, if you know the username/email address ahead of time. Often apps use this parameter during re-authentication, having already extracted the username from a previous sign-in using the preferred_username claim. - * - sid - Session ID, unique identifier for the session. Available as an optional claim on ID tokens. - * - domainHint - Provides a hint about the tenant or domain that the user should use to sign in. The value of the domain hint is a registered domain for the tenant. - * - extraQueryParameters - String to string map of custom query parameters added to the /authorize call - * - tokenQueryParameters - String to string map of custom query parameters added to the /token call - * - nonce - A value included in the request that is returned in the id token. A randomly generated unique value is typically used to mitigate replay attacks. - * - resourceRequestMethod - HTTP Request type used to request data from the resource (i.e. "GET", "POST", etc.). Used for proof-of-possession flows. - * - resourceRequestUri - URI that token will be used for. Used for proof-of-possession flows. - */ -export type CommonAuthorizationUrlRequest = BaseAuthRequest & { - redirectUri: string; - responseMode: ResponseMode; - account?: AccountInfo; - codeChallenge?: string; - codeChallengeMethod?: string; - domainHint?: string; - extraQueryParameters?: StringDict; - extraScopesToConsent?: Array; - loginHint?: string; - nonce?: string; - prompt?: string; - sid?: string; - state?: string; - nativeBroker?: boolean; -}; -//# sourceMappingURL=CommonAuthorizationUrlRequest.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/request/CommonAuthorizationUrlRequest.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/request/CommonAuthorizationUrlRequest.d.ts.map deleted file mode 100644 index 43dc29b..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/request/CommonAuthorizationUrlRequest.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"CommonAuthorizationUrlRequest.d.ts","sourceRoot":"","sources":["../../src/request/CommonAuthorizationUrlRequest.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAExD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,MAAM,MAAM,6BAA6B,GAAG,eAAe,GAAG;IAC1D,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,YAAY,CAAC;IAC3B,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,oBAAoB,CAAC,EAAE,UAAU,CAAC;IAClC,oBAAoB,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACrC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,OAAO,CAAC;CAC1B,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/request/CommonClientCredentialRequest.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/request/CommonClientCredentialRequest.d.ts deleted file mode 100644 index 81b322e..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/request/CommonClientCredentialRequest.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { BaseAuthRequest } from "./BaseAuthRequest.js"; -import { AzureRegion } from "../authority/AzureRegion.js"; -import { ClientAssertion } from "../account/ClientCredentials.js"; -/** - * CommonClientCredentialRequest - * - scopes - Array of scopes the application is requesting access to. - * - authority - URL of the authority, the security token service (STS) from which MSAL will acquire tokens. - * - correlationId - Unique GUID set per request to trace a request end-to-end for telemetry purposes. - * - skipCache - Skip token cache lookup and force request to authority to get a a new token. Defaults to false. - * - preferredAzureRegionOptions - Options of the user's preferred azure region - * - tokenQueryParameters - String to string map of custom query parameters added to the /token call - */ -export type CommonClientCredentialRequest = BaseAuthRequest & { - skipCache?: boolean; - azureRegion?: AzureRegion; - clientAssertion?: ClientAssertion; -}; -//# sourceMappingURL=CommonClientCredentialRequest.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/request/CommonClientCredentialRequest.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/request/CommonClientCredentialRequest.d.ts.map deleted file mode 100644 index b49fce7..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/request/CommonClientCredentialRequest.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"CommonClientCredentialRequest.d.ts","sourceRoot":"","sources":["../../src/request/CommonClientCredentialRequest.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAElE;;;;;;;;GAQG;AACH,MAAM,MAAM,6BAA6B,GAAG,eAAe,GAAG;IAC1D,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,eAAe,CAAC,EAAE,eAAe,CAAC;CACrC,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/request/CommonDeviceCodeRequest.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/request/CommonDeviceCodeRequest.d.ts deleted file mode 100644 index f6c291b..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/request/CommonDeviceCodeRequest.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { DeviceCodeResponse } from "../response/DeviceCodeResponse.js"; -import { StringDict } from "../utils/MsalTypes.js"; -import { BaseAuthRequest } from "./BaseAuthRequest.js"; -/** - * Parameters for Oauth2 device code flow. - * - scopes - Array of scopes the application is requesting access to. - * - authority: - URL of the authority, the security token service (STS) from which MSAL will acquire tokens. If authority is set on client application object, this will override that value. Overriding the value will cause for authority validation to happen each time. If the same authority will be used for all request, set on the application object instead of the requests. - * - correlationId - Unique GUID set per request to trace a request end-to-end for telemetry purposes. - * - deviceCodeCallback - Callback containing device code response. Message should be shown to end user. End user can then navigate to the verification_uri, input the user_code, and input credentials. - * - cancel - Boolean to cancel polling of device code endpoint. While the user authenticates on a separate device, MSAL polls the the token endpoint of security token service for the interval specified in the device code response (usually 15 minutes). To stop polling and cancel the request, set cancel=true. - * - resourceRequestMethod - HTTP Request type used to request data from the resource (i.e. "GET", "POST", etc.). Used for proof-of-possession flows. - * - resourceRequestUri - URI that token will be used for. Used for proof-of-possession flows. - * - timeout - Timeout period in seconds which the user explicitly configures for the polling of the device code endpoint. At the end of this period; assuming the device code has not expired yet; the device code polling is stopped and the request cancelled. The device code expiration window will always take precedence over this set period. - * - extraQueryParameters - String to string map of custom query parameters added to the query string - */ -export type CommonDeviceCodeRequest = Omit & { - deviceCodeCallback: (response: DeviceCodeResponse) => void; - cancel?: boolean; - timeout?: number; - extraQueryParameters?: StringDict; -}; -//# sourceMappingURL=CommonDeviceCodeRequest.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/request/CommonDeviceCodeRequest.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/request/CommonDeviceCodeRequest.d.ts.map deleted file mode 100644 index cdf3b41..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/request/CommonDeviceCodeRequest.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"CommonDeviceCodeRequest.d.ts","sourceRoot":"","sources":["../../src/request/CommonDeviceCodeRequest.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AACvE,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAEvD;;;;;;;;;;;GAWG;AAEH,MAAM,MAAM,uBAAuB,GAAG,IAAI,CACtC,eAAe,EACf,sBAAsB,CACzB,GAAG;IACA,kBAAkB,EAAE,CAAC,QAAQ,EAAE,kBAAkB,KAAK,IAAI,CAAC;IAC3D,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,oBAAoB,CAAC,EAAE,UAAU,CAAC;CACrC,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/request/CommonEndSessionRequest.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/request/CommonEndSessionRequest.d.ts deleted file mode 100644 index ab0540c..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/request/CommonEndSessionRequest.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { AccountInfo } from "../account/AccountInfo.js"; -import { StringDict } from "../utils/MsalTypes.js"; -/** - * CommonEndSessionRequest - * - account - Account object that will be logged out of. All tokens tied to this account will be cleared. - * - postLogoutRedirectUri - URI to navigate to after logout page. - * - correlationId - Unique GUID set per request to trace a request end-to-end for telemetry purposes. - * - idTokenHint - ID Token used by B2C to validate logout if required by the policy - * - state - A value included in the request to the logout endpoint which will be returned in the query string upon post logout redirection - * - logoutHint - A string that specifies the account that is being logged out in order to skip the server account picker on logout - * - extraQueryParameters - String to string map of custom query parameters added to the /authorize call - */ -export type CommonEndSessionRequest = { - correlationId: string; - account?: AccountInfo | null; - postLogoutRedirectUri?: string | null; - idTokenHint?: string; - state?: string; - logoutHint?: string; - extraQueryParameters?: StringDict; -}; -//# sourceMappingURL=CommonEndSessionRequest.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/request/CommonEndSessionRequest.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/request/CommonEndSessionRequest.d.ts.map deleted file mode 100644 index 755ce42..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/request/CommonEndSessionRequest.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"CommonEndSessionRequest.d.ts","sourceRoot":"","sources":["../../src/request/CommonEndSessionRequest.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAEnD;;;;;;;;;GASG;AACH,MAAM,MAAM,uBAAuB,GAAG;IAClC,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,CAAC,EAAE,WAAW,GAAG,IAAI,CAAC;IAC7B,qBAAqB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,oBAAoB,CAAC,EAAE,UAAU,CAAC;CACrC,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/request/CommonOnBehalfOfRequest.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/request/CommonOnBehalfOfRequest.d.ts deleted file mode 100644 index 72dfa7c..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/request/CommonOnBehalfOfRequest.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { BaseAuthRequest } from "./BaseAuthRequest.js"; -/** - * - scopes - Array of scopes the application is requesting access to. - * - authority - URL of the authority, the security token service (STS) from which MSAL will acquire tokens. - * - correlationId - Unique GUID set per request to trace a request end-to-end for telemetry purposes. - * - oboAssertion - The access token that was sent to the middle-tier API. This token must have an audience of the app making this OBO request. - * - skipCache - Skip token cache lookup and force request to authority to get a a new token. Defaults to false. - * - tokenQueryParameters - String to string map of custom query parameters added to the /token call - */ -export type CommonOnBehalfOfRequest = BaseAuthRequest & { - oboAssertion: string; - skipCache?: boolean; -}; -//# sourceMappingURL=CommonOnBehalfOfRequest.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/request/CommonOnBehalfOfRequest.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/request/CommonOnBehalfOfRequest.d.ts.map deleted file mode 100644 index 62c6c62..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/request/CommonOnBehalfOfRequest.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"CommonOnBehalfOfRequest.d.ts","sourceRoot":"","sources":["../../src/request/CommonOnBehalfOfRequest.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAEvD;;;;;;;GAOG;AACH,MAAM,MAAM,uBAAuB,GAAG,eAAe,GAAG;IACpD,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;CACvB,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/request/CommonRefreshTokenRequest.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/request/CommonRefreshTokenRequest.d.ts deleted file mode 100644 index 73c1170..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/request/CommonRefreshTokenRequest.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { BaseAuthRequest } from "./BaseAuthRequest.js"; -import { CcsCredential } from "../account/CcsCredential.js"; -import { StringDict } from "../utils/MsalTypes.js"; -/** - * CommonRefreshTokenRequest - * - scopes - Array of scopes the application is requesting access to. - * - claims - A stringified claims request which will be added to all /authorize and /token calls - * - authority - URL of the authority, the security token service (STS) from which MSAL will acquire tokens. - * - correlationId - Unique GUID set per request to trace a request end-to-end for telemetry purposes. - * - refreshToken - A refresh token returned from a previous request to the Identity provider. - * - resourceRequestMethod - HTTP Request type used to request data from the resource (i.e. "GET", "POST", etc.). Used for proof-of-possession flows. - * - resourceRequestUri - URI that token will be used for. Used for proof-of-possession flows. - * - forceCache - Force MSAL to cache a refresh token flow response when there is no account in the cache. Used for migration scenarios. - * - tokenQueryParameters - String to string map of custom query parameters added to the /token call - */ -export type CommonRefreshTokenRequest = BaseAuthRequest & { - refreshToken: string; - ccsCredential?: CcsCredential; - forceCache?: boolean; - tokenBodyParameters?: StringDict; - redirectUri?: string; -}; -//# sourceMappingURL=CommonRefreshTokenRequest.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/request/CommonRefreshTokenRequest.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/request/CommonRefreshTokenRequest.d.ts.map deleted file mode 100644 index b8879fa..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/request/CommonRefreshTokenRequest.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"CommonRefreshTokenRequest.d.ts","sourceRoot":"","sources":["../../src/request/CommonRefreshTokenRequest.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAEnD;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,yBAAyB,GAAG,eAAe,GAAG;IACtD,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,mBAAmB,CAAC,EAAE,UAAU,CAAC;IACjC,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/request/CommonSilentFlowRequest.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/request/CommonSilentFlowRequest.d.ts deleted file mode 100644 index ba6a3d5..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/request/CommonSilentFlowRequest.d.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { AccountInfo } from "../account/AccountInfo.js"; -import { StringDict } from "../utils/MsalTypes.js"; -import { BaseAuthRequest } from "./BaseAuthRequest.js"; -/** - * SilentFlow parameters passed by the user to retrieve credentials silently - * - scopes - Array of scopes the application is requesting access to. - * - claims - A stringified claims request which will be added to all /authorize and /token calls. When included on a silent request, cache lookup will be skipped and token will be refreshed. - * - authority - Url of the authority which the application acquires tokens from. - * - correlationId - Unique GUID set per request to trace a request end-to-end for telemetry purposes. - * - account - Account entity to lookup the credentials. - * - forceRefresh - Forces silent requests to make network calls if true. - * - resourceRequestMethod - HTTP Request type used to request data from the resource (i.e. "GET", "POST", etc.). Used for proof-of-possession flows. - * - resourceRequestUri - URI that token will be used for. Used for proof-of-possession flows. - * - tokenQueryParameters - String to string map of custom query parameters added to the /token call - */ -export type CommonSilentFlowRequest = BaseAuthRequest & { - /** Account object to lookup the credentials */ - account: AccountInfo; - /** Skip cache lookup and forces network call(s) to get fresh tokens */ - forceRefresh: boolean; - /** RedirectUri registered on the app registration - only required in brokering scenarios */ - redirectUri?: string; - /** Key value pairs to include on the POST body to the /token endpoint */ - tokenBodyParameters?: StringDict; - /** If refresh token will expire within the configured value, consider it already expired. Used to pre-emptively invoke interaction when cached refresh token is close to expiry. */ - refreshTokenExpirationOffsetSeconds?: number; -}; -//# sourceMappingURL=CommonSilentFlowRequest.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/request/CommonSilentFlowRequest.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/request/CommonSilentFlowRequest.d.ts.map deleted file mode 100644 index 186023e..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/request/CommonSilentFlowRequest.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"CommonSilentFlowRequest.d.ts","sourceRoot":"","sources":["../../src/request/CommonSilentFlowRequest.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAEvD;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,uBAAuB,GAAG,eAAe,GAAG;IACpD,+CAA+C;IAC/C,OAAO,EAAE,WAAW,CAAC;IACrB,uEAAuE;IACvE,YAAY,EAAE,OAAO,CAAC;IACtB,4FAA4F;IAC5F,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,yEAAyE;IACzE,mBAAmB,CAAC,EAAE,UAAU,CAAC;IACjC,oLAAoL;IACpL,mCAAmC,CAAC,EAAE,MAAM,CAAC;CAChD,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/request/CommonUsernamePasswordRequest.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/request/CommonUsernamePasswordRequest.d.ts deleted file mode 100644 index e0cf6d5..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/request/CommonUsernamePasswordRequest.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { BaseAuthRequest } from "./BaseAuthRequest.js"; -/** - * CommonUsernamePassword parameters passed by the user to retrieve credentials - * Note: The latest OAuth 2.0 Security Best Current Practice disallows the password grant entirely. This flow is added for internal testing. - * - * - scopes - Array of scopes the application is requesting access to. - * - claims - A stringified claims request which will be added to all /authorize and /token calls. When included on a silent request, cache lookup will be skipped and token will be refreshed. - * - authority - Url of the authority which the application acquires tokens from. - * - correlationId - Unique GUID set per request to trace a request end-to-end for telemetry purposes. - * - username - username of the client - * - password - credentials - * - tokenQueryParameters - String to string map of custom query parameters added to the /token call - */ -export type CommonUsernamePasswordRequest = BaseAuthRequest & { - username: string; - password: string; -}; -//# sourceMappingURL=CommonUsernamePasswordRequest.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/request/CommonUsernamePasswordRequest.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/request/CommonUsernamePasswordRequest.d.ts.map deleted file mode 100644 index 7f66683..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/request/CommonUsernamePasswordRequest.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"CommonUsernamePasswordRequest.d.ts","sourceRoot":"","sources":["../../src/request/CommonUsernamePasswordRequest.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAEvD;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,6BAA6B,GAAG,eAAe,GAAG;IAC1D,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;CACpB,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/request/NativeRequest.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/request/NativeRequest.d.ts deleted file mode 100644 index cde0db2..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/request/NativeRequest.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { StringDict } from "../utils/MsalTypes.js"; -export type NativeRequest = { - clientId: string; - authority: string; - correlationId: string; - redirectUri: string; - scopes: Array; - claims?: string; - authenticationScheme?: string; - resourceRequestMethod?: string; - resourceRequestUri?: string; - shrNonce?: string; - accountId?: string; - forceRefresh?: boolean; - extraParameters?: StringDict; - extraScopesToConsent?: Array; - loginHint?: string; - prompt?: string; -}; -//# sourceMappingURL=NativeRequest.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/request/NativeRequest.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/request/NativeRequest.d.ts.map deleted file mode 100644 index 3b5559d..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/request/NativeRequest.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"NativeRequest.d.ts","sourceRoot":"","sources":["../../src/request/NativeRequest.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAEnD,MAAM,MAAM,aAAa,GAAG;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,eAAe,CAAC,EAAE,UAAU,CAAC;IAC7B,oBAAoB,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACrC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/request/NativeSignOutRequest.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/request/NativeSignOutRequest.d.ts deleted file mode 100644 index b80ee0a..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/request/NativeSignOutRequest.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -export type NativeSignOutRequest = { - clientId: string; - accountId: string; - correlationId: string; -}; -//# sourceMappingURL=NativeSignOutRequest.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/request/NativeSignOutRequest.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/request/NativeSignOutRequest.d.ts.map deleted file mode 100644 index 5b4a632..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/request/NativeSignOutRequest.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"NativeSignOutRequest.d.ts","sourceRoot":"","sources":["../../src/request/NativeSignOutRequest.ts"],"names":[],"mappings":"AAKA,MAAM,MAAM,oBAAoB,GAAG;IAC/B,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;CACzB,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/request/RequestParameterBuilder.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/request/RequestParameterBuilder.d.ts deleted file mode 100644 index 60d495e..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/request/RequestParameterBuilder.d.ts +++ /dev/null @@ -1,225 +0,0 @@ -import { ResponseMode } from "../utils/Constants.js"; -import { StringDict } from "../utils/MsalTypes.js"; -import { ApplicationTelemetry, LibraryInfo } from "../config/ClientConfiguration.js"; -import { ServerTelemetryManager } from "../telemetry/server/ServerTelemetryManager.js"; -import { ClientInfo } from "../account/ClientInfo.js"; -import { IPerformanceClient } from "../telemetry/performance/IPerformanceClient.js"; -/** @internal */ -export declare class RequestParameterBuilder { - private parameters; - private readonly performanceClient?; - private readonly correlationId?; - constructor(correlationId?: string, performanceClient?: IPerformanceClient); - /** - * add response_type = code - */ - addResponseTypeCode(): void; - /** - * add response_type = token id_token - */ - addResponseTypeForTokenAndIdToken(): void; - /** - * add response_mode. defaults to query. - * @param responseMode - */ - addResponseMode(responseMode?: ResponseMode): void; - /** - * Add flag to indicate STS should attempt to use WAM if available - */ - addNativeBroker(): void; - /** - * add scopes. set addOidcScopes to false to prevent default scopes in non-user scenarios - * @param scopeSet - * @param addOidcScopes - */ - addScopes(scopes: string[], addOidcScopes?: boolean, defaultScopes?: Array): void; - /** - * add clientId - * @param clientId - */ - addClientId(clientId: string): void; - /** - * add redirect_uri - * @param redirectUri - */ - addRedirectUri(redirectUri: string): void; - /** - * add post logout redirectUri - * @param redirectUri - */ - addPostLogoutRedirectUri(redirectUri: string): void; - /** - * add id_token_hint to logout request - * @param idTokenHint - */ - addIdTokenHint(idTokenHint: string): void; - /** - * add domain_hint - * @param domainHint - */ - addDomainHint(domainHint: string): void; - /** - * add login_hint - * @param loginHint - */ - addLoginHint(loginHint: string): void; - /** - * Adds the CCS (Cache Credential Service) query parameter for login_hint - * @param loginHint - */ - addCcsUpn(loginHint: string): void; - /** - * Adds the CCS (Cache Credential Service) query parameter for account object - * @param loginHint - */ - addCcsOid(clientInfo: ClientInfo): void; - /** - * add sid - * @param sid - */ - addSid(sid: string): void; - /** - * add claims - * @param claims - */ - addClaims(claims?: string, clientCapabilities?: Array): void; - /** - * add correlationId - * @param correlationId - */ - addCorrelationId(correlationId: string): void; - /** - * add library info query params - * @param libraryInfo - */ - addLibraryInfo(libraryInfo: LibraryInfo): void; - /** - * Add client telemetry parameters - * @param appTelemetry - */ - addApplicationTelemetry(appTelemetry: ApplicationTelemetry): void; - /** - * add prompt - * @param prompt - */ - addPrompt(prompt: string): void; - /** - * add state - * @param state - */ - addState(state: string): void; - /** - * add nonce - * @param nonce - */ - addNonce(nonce: string): void; - /** - * add code_challenge and code_challenge_method - * - throw if either of them are not passed - * @param codeChallenge - * @param codeChallengeMethod - */ - addCodeChallengeParams(codeChallenge: string, codeChallengeMethod: string): void; - /** - * add the `authorization_code` passed by the user to exchange for a token - * @param code - */ - addAuthorizationCode(code: string): void; - /** - * add the `authorization_code` passed by the user to exchange for a token - * @param code - */ - addDeviceCode(code: string): void; - /** - * add the `refreshToken` passed by the user - * @param refreshToken - */ - addRefreshToken(refreshToken: string): void; - /** - * add the `code_verifier` passed by the user to exchange for a token - * @param codeVerifier - */ - addCodeVerifier(codeVerifier: string): void; - /** - * add client_secret - * @param clientSecret - */ - addClientSecret(clientSecret: string): void; - /** - * add clientAssertion for confidential client flows - * @param clientAssertion - */ - addClientAssertion(clientAssertion: string): void; - /** - * add clientAssertionType for confidential client flows - * @param clientAssertionType - */ - addClientAssertionType(clientAssertionType: string): void; - /** - * add OBO assertion for confidential client flows - * @param clientAssertion - */ - addOboAssertion(oboAssertion: string): void; - /** - * add grant type - * @param grantType - */ - addRequestTokenUse(tokenUse: string): void; - /** - * add grant type - * @param grantType - */ - addGrantType(grantType: string): void; - /** - * add client info - * - */ - addClientInfo(): void; - /** - * add extraQueryParams - * @param eQParams - */ - addExtraQueryParameters(eQParams: StringDict): void; - addClientCapabilitiesToClaims(claims?: string, clientCapabilities?: Array): string; - /** - * adds `username` for Password Grant flow - * @param username - */ - addUsername(username: string): void; - /** - * adds `password` for Password Grant flow - * @param password - */ - addPassword(password: string): void; - /** - * add pop_jwk to query params - * @param cnfString - */ - addPopToken(cnfString: string): void; - /** - * add SSH JWK and key ID to query params - */ - addSshJwk(sshJwkString: string): void; - /** - * add server telemetry fields - * @param serverTelemetryManager - */ - addServerTelemetry(serverTelemetryManager: ServerTelemetryManager): void; - /** - * Adds parameter that indicates to the server that throttling is supported - */ - addThrottling(): void; - /** - * Adds logout_hint parameter for "silent" logout which prevent server account picker - */ - addLogoutHint(logoutHint: string): void; - addBrokerParameters(params: { - brokerClientId: string; - brokerRedirectUri: string; - }): void; - /** - * Utility to create a URL from the params map - */ - createQueryString(): string; -} -//# sourceMappingURL=RequestParameterBuilder.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/request/RequestParameterBuilder.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/request/RequestParameterBuilder.d.ts.map deleted file mode 100644 index b469f84..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/request/RequestParameterBuilder.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"RequestParameterBuilder.d.ts","sourceRoot":"","sources":["../../src/request/RequestParameterBuilder.ts"],"names":[],"mappings":"AAKA,OAAO,EAEH,YAAY,EAQf,MAAM,uBAAuB,CAAC;AAO/B,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAEnD,OAAO,EACH,oBAAoB,EACpB,WAAW,EACd,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,sBAAsB,EAAE,MAAM,+CAA+C,CAAC;AACvF,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,gDAAgD,CAAC;AAyBpF,gBAAgB;AAChB,qBAAa,uBAAuB;IAChC,OAAO,CAAC,UAAU,CAAsB;IACxC,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAC,CAAqB;IACxD,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAS;gBAGpC,aAAa,CAAC,EAAE,MAAM,EACtB,iBAAiB,CAAC,EAAE,kBAAkB;IAO1C;;OAEG;IACH,mBAAmB,IAAI,IAAI;IAO3B;;OAEG;IACH,iCAAiC,IAAI,IAAI;IASzC;;;OAGG;IACH,eAAe,CAAC,YAA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AAG,IAAI;IAarC;;;OAGG;IACH,kBAAkB,CAAC,sBAAsB,EAAE,sBAAsB,GAAG,IAAI;IAWxE;;OAEG;IACH,aAAa,IAAI,IAAI;IAOrB;;OAEG;IACH,aAAa,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI;IAOvC,mBAAmB,CAAC,MAAM,EAAE;QACxB,cAAc,EAAE,MAAM,CAAC;QACvB,iBAAiB,EAAE,MAAM,CAAC;KAC7B,GAAG,IAAI;IAUR;;OAEG;IACH,iBAAiB,IAAI,MAAM;CAe9B"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/request/RequestParameterBuilder.mjs b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/request/RequestParameterBuilder.mjs deleted file mode 100644 index b98af04..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/request/RequestParameterBuilder.mjs +++ /dev/null @@ -1,417 +0,0 @@ -/*! @azure/msal-common v14.16.1 2025-08-05 */ -'use strict'; -import { Constants, ResponseMode, OIDC_DEFAULT_SCOPES, HeaderNames, CLIENT_INFO, ClaimsRequestKeys, PasswordGrantConstants, AuthenticationScheme, ThrottlingConstants } from '../utils/Constants.mjs'; -import { RESPONSE_TYPE, RESPONSE_MODE, NATIVE_BROKER, SCOPE, CLIENT_ID, REDIRECT_URI, POST_LOGOUT_URI, ID_TOKEN_HINT, DOMAIN_HINT, LOGIN_HINT, SID, CLAIMS, CLIENT_REQUEST_ID, X_CLIENT_SKU, X_CLIENT_VER, X_CLIENT_OS, X_CLIENT_CPU, X_APP_NAME, X_APP_VER, PROMPT, STATE, NONCE, CODE_CHALLENGE, CODE_CHALLENGE_METHOD, CODE, DEVICE_CODE, REFRESH_TOKEN, CODE_VERIFIER, CLIENT_SECRET, CLIENT_ASSERTION, CLIENT_ASSERTION_TYPE, OBO_ASSERTION, REQUESTED_TOKEN_USE, GRANT_TYPE, TOKEN_TYPE, REQ_CNF, X_CLIENT_CURR_TELEM, X_CLIENT_LAST_TELEM, X_MS_LIB_CAPABILITY, LOGOUT_HINT, BROKER_CLIENT_ID, BROKER_REDIRECT_URI } from '../constants/AADServerParamKeys.mjs'; -import { ScopeSet } from './ScopeSet.mjs'; -import { createClientConfigurationError } from '../error/ClientConfigurationError.mjs'; -import { RequestValidator } from './RequestValidator.mjs'; -import { pkceParamsMissing, invalidClaims } from '../error/ClientConfigurationErrorCodes.mjs'; - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -function instrumentBrokerParams(parameters, correlationId, performanceClient) { - if (!correlationId) { - return; - } - const clientId = parameters.get(CLIENT_ID); - if (clientId && parameters.has(BROKER_CLIENT_ID)) { - performanceClient?.addFields({ - embeddedClientId: clientId, - embeddedRedirectUri: parameters.get(REDIRECT_URI), - }, correlationId); - } -} -/** @internal */ -class RequestParameterBuilder { - constructor(correlationId, performanceClient) { - this.parameters = new Map(); - this.performanceClient = performanceClient; - this.correlationId = correlationId; - } - /** - * add response_type = code - */ - addResponseTypeCode() { - this.parameters.set(RESPONSE_TYPE, encodeURIComponent(Constants.CODE_RESPONSE_TYPE)); - } - /** - * add response_type = token id_token - */ - addResponseTypeForTokenAndIdToken() { - this.parameters.set(RESPONSE_TYPE, encodeURIComponent(`${Constants.TOKEN_RESPONSE_TYPE} ${Constants.ID_TOKEN_RESPONSE_TYPE}`)); - } - /** - * add response_mode. defaults to query. - * @param responseMode - */ - addResponseMode(responseMode) { - this.parameters.set(RESPONSE_MODE, encodeURIComponent(responseMode ? responseMode : ResponseMode.QUERY)); - } - /** - * Add flag to indicate STS should attempt to use WAM if available - */ - addNativeBroker() { - this.parameters.set(NATIVE_BROKER, encodeURIComponent("1")); - } - /** - * add scopes. set addOidcScopes to false to prevent default scopes in non-user scenarios - * @param scopeSet - * @param addOidcScopes - */ - addScopes(scopes, addOidcScopes = true, defaultScopes = OIDC_DEFAULT_SCOPES) { - // Always add openid to the scopes when adding OIDC scopes - if (addOidcScopes && - !defaultScopes.includes("openid") && - !scopes.includes("openid")) { - defaultScopes.push("openid"); - } - const requestScopes = addOidcScopes - ? [...(scopes || []), ...defaultScopes] - : scopes || []; - const scopeSet = new ScopeSet(requestScopes); - this.parameters.set(SCOPE, encodeURIComponent(scopeSet.printScopes())); - } - /** - * add clientId - * @param clientId - */ - addClientId(clientId) { - this.parameters.set(CLIENT_ID, encodeURIComponent(clientId)); - } - /** - * add redirect_uri - * @param redirectUri - */ - addRedirectUri(redirectUri) { - RequestValidator.validateRedirectUri(redirectUri); - this.parameters.set(REDIRECT_URI, encodeURIComponent(redirectUri)); - } - /** - * add post logout redirectUri - * @param redirectUri - */ - addPostLogoutRedirectUri(redirectUri) { - RequestValidator.validateRedirectUri(redirectUri); - this.parameters.set(POST_LOGOUT_URI, encodeURIComponent(redirectUri)); - } - /** - * add id_token_hint to logout request - * @param idTokenHint - */ - addIdTokenHint(idTokenHint) { - this.parameters.set(ID_TOKEN_HINT, encodeURIComponent(idTokenHint)); - } - /** - * add domain_hint - * @param domainHint - */ - addDomainHint(domainHint) { - this.parameters.set(DOMAIN_HINT, encodeURIComponent(domainHint)); - } - /** - * add login_hint - * @param loginHint - */ - addLoginHint(loginHint) { - this.parameters.set(LOGIN_HINT, encodeURIComponent(loginHint)); - } - /** - * Adds the CCS (Cache Credential Service) query parameter for login_hint - * @param loginHint - */ - addCcsUpn(loginHint) { - this.parameters.set(HeaderNames.CCS_HEADER, encodeURIComponent(`UPN:${loginHint}`)); - } - /** - * Adds the CCS (Cache Credential Service) query parameter for account object - * @param loginHint - */ - addCcsOid(clientInfo) { - this.parameters.set(HeaderNames.CCS_HEADER, encodeURIComponent(`Oid:${clientInfo.uid}@${clientInfo.utid}`)); - } - /** - * add sid - * @param sid - */ - addSid(sid) { - this.parameters.set(SID, encodeURIComponent(sid)); - } - /** - * add claims - * @param claims - */ - addClaims(claims, clientCapabilities) { - const mergedClaims = this.addClientCapabilitiesToClaims(claims, clientCapabilities); - RequestValidator.validateClaims(mergedClaims); - this.parameters.set(CLAIMS, encodeURIComponent(mergedClaims)); - } - /** - * add correlationId - * @param correlationId - */ - addCorrelationId(correlationId) { - this.parameters.set(CLIENT_REQUEST_ID, encodeURIComponent(correlationId)); - } - /** - * add library info query params - * @param libraryInfo - */ - addLibraryInfo(libraryInfo) { - // Telemetry Info - this.parameters.set(X_CLIENT_SKU, libraryInfo.sku); - this.parameters.set(X_CLIENT_VER, libraryInfo.version); - if (libraryInfo.os) { - this.parameters.set(X_CLIENT_OS, libraryInfo.os); - } - if (libraryInfo.cpu) { - this.parameters.set(X_CLIENT_CPU, libraryInfo.cpu); - } - } - /** - * Add client telemetry parameters - * @param appTelemetry - */ - addApplicationTelemetry(appTelemetry) { - if (appTelemetry?.appName) { - this.parameters.set(X_APP_NAME, appTelemetry.appName); - } - if (appTelemetry?.appVersion) { - this.parameters.set(X_APP_VER, appTelemetry.appVersion); - } - } - /** - * add prompt - * @param prompt - */ - addPrompt(prompt) { - RequestValidator.validatePrompt(prompt); - this.parameters.set(`${PROMPT}`, encodeURIComponent(prompt)); - } - /** - * add state - * @param state - */ - addState(state) { - if (state) { - this.parameters.set(STATE, encodeURIComponent(state)); - } - } - /** - * add nonce - * @param nonce - */ - addNonce(nonce) { - this.parameters.set(NONCE, encodeURIComponent(nonce)); - } - /** - * add code_challenge and code_challenge_method - * - throw if either of them are not passed - * @param codeChallenge - * @param codeChallengeMethod - */ - addCodeChallengeParams(codeChallenge, codeChallengeMethod) { - RequestValidator.validateCodeChallengeParams(codeChallenge, codeChallengeMethod); - if (codeChallenge && codeChallengeMethod) { - this.parameters.set(CODE_CHALLENGE, encodeURIComponent(codeChallenge)); - this.parameters.set(CODE_CHALLENGE_METHOD, encodeURIComponent(codeChallengeMethod)); - } - else { - throw createClientConfigurationError(pkceParamsMissing); - } - } - /** - * add the `authorization_code` passed by the user to exchange for a token - * @param code - */ - addAuthorizationCode(code) { - this.parameters.set(CODE, encodeURIComponent(code)); - } - /** - * add the `authorization_code` passed by the user to exchange for a token - * @param code - */ - addDeviceCode(code) { - this.parameters.set(DEVICE_CODE, encodeURIComponent(code)); - } - /** - * add the `refreshToken` passed by the user - * @param refreshToken - */ - addRefreshToken(refreshToken) { - this.parameters.set(REFRESH_TOKEN, encodeURIComponent(refreshToken)); - } - /** - * add the `code_verifier` passed by the user to exchange for a token - * @param codeVerifier - */ - addCodeVerifier(codeVerifier) { - this.parameters.set(CODE_VERIFIER, encodeURIComponent(codeVerifier)); - } - /** - * add client_secret - * @param clientSecret - */ - addClientSecret(clientSecret) { - this.parameters.set(CLIENT_SECRET, encodeURIComponent(clientSecret)); - } - /** - * add clientAssertion for confidential client flows - * @param clientAssertion - */ - addClientAssertion(clientAssertion) { - if (clientAssertion) { - this.parameters.set(CLIENT_ASSERTION, encodeURIComponent(clientAssertion)); - } - } - /** - * add clientAssertionType for confidential client flows - * @param clientAssertionType - */ - addClientAssertionType(clientAssertionType) { - if (clientAssertionType) { - this.parameters.set(CLIENT_ASSERTION_TYPE, encodeURIComponent(clientAssertionType)); - } - } - /** - * add OBO assertion for confidential client flows - * @param clientAssertion - */ - addOboAssertion(oboAssertion) { - this.parameters.set(OBO_ASSERTION, encodeURIComponent(oboAssertion)); - } - /** - * add grant type - * @param grantType - */ - addRequestTokenUse(tokenUse) { - this.parameters.set(REQUESTED_TOKEN_USE, encodeURIComponent(tokenUse)); - } - /** - * add grant type - * @param grantType - */ - addGrantType(grantType) { - this.parameters.set(GRANT_TYPE, encodeURIComponent(grantType)); - } - /** - * add client info - * - */ - addClientInfo() { - this.parameters.set(CLIENT_INFO, "1"); - } - /** - * add extraQueryParams - * @param eQParams - */ - addExtraQueryParameters(eQParams) { - Object.entries(eQParams).forEach(([key, value]) => { - if (!this.parameters.has(key) && value) { - this.parameters.set(key, value); - } - }); - } - addClientCapabilitiesToClaims(claims, clientCapabilities) { - let mergedClaims; - // Parse provided claims into JSON object or initialize empty object - if (!claims) { - mergedClaims = {}; - } - else { - try { - mergedClaims = JSON.parse(claims); - } - catch (e) { - throw createClientConfigurationError(invalidClaims); - } - } - if (clientCapabilities && clientCapabilities.length > 0) { - if (!mergedClaims.hasOwnProperty(ClaimsRequestKeys.ACCESS_TOKEN)) { - // Add access_token key to claims object - mergedClaims[ClaimsRequestKeys.ACCESS_TOKEN] = {}; - } - // Add xms_cc claim with provided clientCapabilities to access_token key - mergedClaims[ClaimsRequestKeys.ACCESS_TOKEN][ClaimsRequestKeys.XMS_CC] = { - values: clientCapabilities, - }; - } - return JSON.stringify(mergedClaims); - } - /** - * adds `username` for Password Grant flow - * @param username - */ - addUsername(username) { - this.parameters.set(PasswordGrantConstants.username, encodeURIComponent(username)); - } - /** - * adds `password` for Password Grant flow - * @param password - */ - addPassword(password) { - this.parameters.set(PasswordGrantConstants.password, encodeURIComponent(password)); - } - /** - * add pop_jwk to query params - * @param cnfString - */ - addPopToken(cnfString) { - if (cnfString) { - this.parameters.set(TOKEN_TYPE, AuthenticationScheme.POP); - this.parameters.set(REQ_CNF, encodeURIComponent(cnfString)); - } - } - /** - * add SSH JWK and key ID to query params - */ - addSshJwk(sshJwkString) { - if (sshJwkString) { - this.parameters.set(TOKEN_TYPE, AuthenticationScheme.SSH); - this.parameters.set(REQ_CNF, encodeURIComponent(sshJwkString)); - } - } - /** - * add server telemetry fields - * @param serverTelemetryManager - */ - addServerTelemetry(serverTelemetryManager) { - this.parameters.set(X_CLIENT_CURR_TELEM, serverTelemetryManager.generateCurrentRequestHeaderValue()); - this.parameters.set(X_CLIENT_LAST_TELEM, serverTelemetryManager.generateLastRequestHeaderValue()); - } - /** - * Adds parameter that indicates to the server that throttling is supported - */ - addThrottling() { - this.parameters.set(X_MS_LIB_CAPABILITY, ThrottlingConstants.X_MS_LIB_CAPABILITY_VALUE); - } - /** - * Adds logout_hint parameter for "silent" logout which prevent server account picker - */ - addLogoutHint(logoutHint) { - this.parameters.set(LOGOUT_HINT, encodeURIComponent(logoutHint)); - } - addBrokerParameters(params) { - const brokerParams = {}; - brokerParams[BROKER_CLIENT_ID] = - params.brokerClientId; - brokerParams[BROKER_REDIRECT_URI] = - params.brokerRedirectUri; - this.addExtraQueryParameters(brokerParams); - } - /** - * Utility to create a URL from the params map - */ - createQueryString() { - const queryParameterArray = new Array(); - this.parameters.forEach((value, key) => { - queryParameterArray.push(`${key}=${value}`); - }); - instrumentBrokerParams(this.parameters, this.correlationId, this.performanceClient); - return queryParameterArray.join("&"); - } -} - -export { RequestParameterBuilder }; -//# sourceMappingURL=RequestParameterBuilder.mjs.map diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/request/RequestParameterBuilder.mjs.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/request/RequestParameterBuilder.mjs.map deleted file mode 100644 index 43554ce..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/request/RequestParameterBuilder.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"RequestParameterBuilder.mjs","sources":["../../src/request/RequestParameterBuilder.ts"],"sourcesContent":[null],"names":["AADServerParamKeys.CLIENT_ID","AADServerParamKeys.BROKER_CLIENT_ID","AADServerParamKeys.REDIRECT_URI","AADServerParamKeys.RESPONSE_TYPE","AADServerParamKeys.RESPONSE_MODE","AADServerParamKeys.NATIVE_BROKER","AADServerParamKeys.SCOPE","AADServerParamKeys.POST_LOGOUT_URI","AADServerParamKeys.ID_TOKEN_HINT","AADServerParamKeys.DOMAIN_HINT","AADServerParamKeys.LOGIN_HINT","AADServerParamKeys.SID","AADServerParamKeys.CLAIMS","AADServerParamKeys.CLIENT_REQUEST_ID","AADServerParamKeys.X_CLIENT_SKU","AADServerParamKeys.X_CLIENT_VER","AADServerParamKeys.X_CLIENT_OS","AADServerParamKeys.X_CLIENT_CPU","AADServerParamKeys.X_APP_NAME","AADServerParamKeys.X_APP_VER","AADServerParamKeys.PROMPT","AADServerParamKeys.STATE","AADServerParamKeys.NONCE","AADServerParamKeys.CODE_CHALLENGE","AADServerParamKeys.CODE_CHALLENGE_METHOD","ClientConfigurationErrorCodes.pkceParamsMissing","AADServerParamKeys.CODE","AADServerParamKeys.DEVICE_CODE","AADServerParamKeys.REFRESH_TOKEN","AADServerParamKeys.CODE_VERIFIER","AADServerParamKeys.CLIENT_SECRET","AADServerParamKeys.CLIENT_ASSERTION","AADServerParamKeys.CLIENT_ASSERTION_TYPE","AADServerParamKeys.OBO_ASSERTION","AADServerParamKeys.REQUESTED_TOKEN_USE","AADServerParamKeys.GRANT_TYPE","ClientConfigurationErrorCodes.invalidClaims","AADServerParamKeys.TOKEN_TYPE","AADServerParamKeys.REQ_CNF","AADServerParamKeys.X_CLIENT_CURR_TELEM","AADServerParamKeys.X_CLIENT_LAST_TELEM","AADServerParamKeys.X_MS_LIB_CAPABILITY","AADServerParamKeys.LOGOUT_HINT","AADServerParamKeys.BROKER_REDIRECT_URI"],"mappings":";;;;;;;;;AAAA;;;AAGG;AA6BH,SAAS,sBAAsB,CAC3B,UAA+B,EAC/B,aAAsB,EACtB,iBAAsC,EAAA;IAEtC,IAAI,CAAC,aAAa,EAAE;QAChB,OAAO;AACV,KAAA;IAED,MAAM,QAAQ,GAAG,UAAU,CAAC,GAAG,CAACA,SAA4B,CAAC,CAAC;IAC9D,IAAI,QAAQ,IAAI,UAAU,CAAC,GAAG,CAACC,gBAAmC,CAAC,EAAE;QACjE,iBAAiB,EAAE,SAAS,CACxB;AACI,YAAA,gBAAgB,EAAE,QAAQ;YAC1B,mBAAmB,EAAE,UAAU,CAAC,GAAG,CAC/BC,YAA+B,CAClC;SACJ,EACD,aAAa,CAChB,CAAC;AACL,KAAA;AACL,CAAC;AAED;MACa,uBAAuB,CAAA;IAKhC,WACI,CAAA,aAAsB,EACtB,iBAAsC,EAAA;AAEtC,QAAA,IAAI,CAAC,UAAU,GAAG,IAAI,GAAG,EAAkB,CAAC;AAC5C,QAAA,IAAI,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;AAC3C,QAAA,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;KACtC;AAED;;AAEG;IACH,mBAAmB,GAA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C,iBAAiB,CAAC;AAE7B,QAAA,IAAI,CAAC,uBAAuB,CAAC,YAAY,CAAC,CAAC;KAC9C;AAED;;AAEG;IACH,iBAAiB,GAAA;AACb,QAAA,MAAM,mBAAmB,GAAkB,IAAI,KAAK,EAAU,CAAC;QAE/D,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,GAAG,KAAI;YACnC,mBAAmB,CAAC,IAAI,CAAC,CAAA,EAAG,GAAG,CAAI,CAAA,EAAA,KAAK,CAAE,CAAA,CAAC,CAAC;AAChD,SAAC,CAAC,CAAC;AAEH,QAAA,sBAAsB,CAClB,IAAI,CAAC,UAAU,EACf,IAAI,CAAC,aAAa,EAClB,IAAI,CAAC,iBAAiB,CACzB,CAAC;AAEF,QAAA,OAAO,mBAAmB,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;KACxC;AACJ;;;;"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/request/RequestValidator.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/request/RequestValidator.d.ts deleted file mode 100644 index 85cd5c2..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/request/RequestValidator.d.ts +++ /dev/null @@ -1,28 +0,0 @@ -/** - * Validates server consumable params from the "request" objects - */ -export declare class RequestValidator { - /** - * Utility to check if the `redirectUri` in the request is a non-null value - * @param redirectUri - */ - static validateRedirectUri(redirectUri: string): void; - /** - * Utility to validate prompt sent by the user in the request - * @param prompt - */ - static validatePrompt(prompt: string): void; - static validateClaims(claims: string): void; - /** - * Utility to validate code_challenge and code_challenge_method - * @param codeChallenge - * @param codeChallengeMethod - */ - static validateCodeChallengeParams(codeChallenge: string, codeChallengeMethod: string): void; - /** - * Utility to validate code_challenge_method - * @param codeChallengeMethod - */ - static validateCodeChallengeMethod(codeChallengeMethod: string): void; -} -//# sourceMappingURL=RequestValidator.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/request/RequestValidator.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/request/RequestValidator.d.ts.map deleted file mode 100644 index e70f067..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/request/RequestValidator.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"RequestValidator.d.ts","sourceRoot":"","sources":["../../src/request/RequestValidator.ts"],"names":[],"mappings":"AAWA;;GAEG;AACH,qBAAa,gBAAgB;IACzB;;;OAGG;IACH,MAAM,CAAC,mBAAmB,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI;IAQrD;;;OAGG;IACH,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAc3C,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAU3C;;;;OAIG;IACH,MAAM,CAAC,2BAA2B,CAC9B,aAAa,EAAE,MAAM,EACrB,mBAAmB,EAAE,MAAM,GAC5B,IAAI;IAUP;;;OAGG;IACH,MAAM,CAAC,2BAA2B,CAAC,mBAAmB,EAAE,MAAM,GAAG,IAAI;CAYxE"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/request/RequestValidator.mjs b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/request/RequestValidator.mjs deleted file mode 100644 index 01656f4..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/request/RequestValidator.mjs +++ /dev/null @@ -1,73 +0,0 @@ -/*! @azure/msal-common v14.16.1 2025-08-05 */ -'use strict'; -import { createClientConfigurationError } from '../error/ClientConfigurationError.mjs'; -import { CodeChallengeMethodValues, PromptValue } from '../utils/Constants.mjs'; -import { redirectUriEmpty, invalidPromptValue, invalidClaims, pkceParamsMissing, invalidCodeChallengeMethod } from '../error/ClientConfigurationErrorCodes.mjs'; - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * Validates server consumable params from the "request" objects - */ -class RequestValidator { - /** - * Utility to check if the `redirectUri` in the request is a non-null value - * @param redirectUri - */ - static validateRedirectUri(redirectUri) { - if (!redirectUri) { - throw createClientConfigurationError(redirectUriEmpty); - } - } - /** - * Utility to validate prompt sent by the user in the request - * @param prompt - */ - static validatePrompt(prompt) { - const promptValues = []; - for (const value in PromptValue) { - promptValues.push(PromptValue[value]); - } - if (promptValues.indexOf(prompt) < 0) { - throw createClientConfigurationError(invalidPromptValue); - } - } - static validateClaims(claims) { - try { - JSON.parse(claims); - } - catch (e) { - throw createClientConfigurationError(invalidClaims); - } - } - /** - * Utility to validate code_challenge and code_challenge_method - * @param codeChallenge - * @param codeChallengeMethod - */ - static validateCodeChallengeParams(codeChallenge, codeChallengeMethod) { - if (!codeChallenge || !codeChallengeMethod) { - throw createClientConfigurationError(pkceParamsMissing); - } - else { - this.validateCodeChallengeMethod(codeChallengeMethod); - } - } - /** - * Utility to validate code_challenge_method - * @param codeChallengeMethod - */ - static validateCodeChallengeMethod(codeChallengeMethod) { - if ([ - CodeChallengeMethodValues.PLAIN, - CodeChallengeMethodValues.S256, - ].indexOf(codeChallengeMethod) < 0) { - throw createClientConfigurationError(invalidCodeChallengeMethod); - } - } -} - -export { RequestValidator }; -//# sourceMappingURL=RequestValidator.mjs.map diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/request/RequestValidator.mjs.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/request/RequestValidator.mjs.map deleted file mode 100644 index 845303b..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/request/RequestValidator.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"RequestValidator.mjs","sources":["../../src/request/RequestValidator.ts"],"sourcesContent":[null],"names":["ClientConfigurationErrorCodes.redirectUriEmpty","ClientConfigurationErrorCodes.invalidPromptValue","ClientConfigurationErrorCodes.invalidClaims","ClientConfigurationErrorCodes.pkceParamsMissing","ClientConfigurationErrorCodes.invalidCodeChallengeMethod"],"mappings":";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CAAC,EACpC;AACE,YAAA,MAAM,8BAA8B,CAChCC,0BAAwD,CAC3D,CAAC;AACL,SAAA;KACJ;AACJ;;;;"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/request/ScopeSet.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/request/ScopeSet.d.ts deleted file mode 100644 index 14832f0..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/request/ScopeSet.d.ts +++ /dev/null @@ -1,89 +0,0 @@ -/** - * The ScopeSet class creates a set of scopes. Scopes are case-insensitive, unique values, so the Set object in JS makes - * the most sense to implement for this class. All scopes are trimmed and converted to lower case strings in intersection and union functions - * to ensure uniqueness of strings. - */ -export declare class ScopeSet { - private scopes; - constructor(inputScopes: Array); - /** - * Factory method to create ScopeSet from space-delimited string - * @param inputScopeString - * @param appClientId - * @param scopesRequired - */ - static fromString(inputScopeString: string): ScopeSet; - /** - * Creates the set of scopes to search for in cache lookups - * @param inputScopeString - * @returns - */ - static createSearchScopes(inputScopeString: Array): ScopeSet; - /** - * Used to validate the scopes input parameter requested by the developer. - * @param {Array} inputScopes - Developer requested permissions. Not all scopes are guaranteed to be included in the access token returned. - * @param {boolean} scopesRequired - Boolean indicating whether the scopes array is required or not - */ - private validateInputScopes; - /** - * Check if a given scope is present in this set of scopes. - * @param scope - */ - containsScope(scope: string): boolean; - /** - * Check if a set of scopes is present in this set of scopes. - * @param scopeSet - */ - containsScopeSet(scopeSet: ScopeSet): boolean; - /** - * Check if set of scopes contains only the defaults - */ - containsOnlyOIDCScopes(): boolean; - /** - * Appends single scope if passed - * @param newScope - */ - appendScope(newScope: string): void; - /** - * Appends multiple scopes if passed - * @param newScopes - */ - appendScopes(newScopes: Array): void; - /** - * Removes element from set of scopes. - * @param scope - */ - removeScope(scope: string): void; - /** - * Removes default scopes from set of scopes - * Primarily used to prevent cache misses if the default scopes are not returned from the server - */ - removeOIDCScopes(): void; - /** - * Combines an array of scopes with the current set of scopes. - * @param otherScopes - */ - unionScopeSets(otherScopes: ScopeSet): Set; - /** - * Check if scopes intersect between this set and another. - * @param otherScopes - */ - intersectingScopeSets(otherScopes: ScopeSet): boolean; - /** - * Returns size of set of scopes. - */ - getScopeCount(): number; - /** - * Returns the scopes as an array of string values - */ - asArray(): Array; - /** - * Prints scopes into a space-delimited string - */ - printScopes(): string; - /** - * Prints scopes into a space-delimited lower-case string (used for caching) - */ - printScopesLowerCase(): string; -} -//# sourceMappingURL=ScopeSet.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/request/ScopeSet.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/request/ScopeSet.d.ts.map deleted file mode 100644 index 6278854..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/request/ScopeSet.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ScopeSet.d.ts","sourceRoot":"","sources":["../../src/request/ScopeSet.ts"],"names":[],"mappings":"AAgBA;;;;GAIG;AACH,qBAAa,QAAQ;IAEjB,OAAO,CAAC,MAAM,CAAc;gBAEhB,WAAW,EAAE,KAAK,CAAC,MAAM,CAAC;IAgBtC;;;;;OAKG;IACH,MAAM,CAAC,UAAU,CAAC,gBAAgB,EAAE,MAAM,GAAG,QAAQ;IAMrD;;;;OAIG;IACH,MAAM,CAAC,kBAAkB,CAAC,gBAAgB,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,QAAQ;IAWpE;;;;OAIG;IACH,OAAO,CAAC,mBAAmB;IAS3B;;;OAGG;IACH,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO;IASrC;;;OAGG;IACH,gBAAgB,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO;IAW7C;;OAEG;IACH,sBAAsB,IAAI,OAAO;IAWjC;;;OAGG;IACH,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;IAMnC;;;OAGG;IACH,YAAY,CAAC,SAAS,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,IAAI;IAU5C;;;OAGG;IACH,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAShC;;;OAGG;IACH,gBAAgB,IAAI,IAAI;IAMxB;;;OAGG;IACH,cAAc,CAAC,WAAW,EAAE,QAAQ,GAAG,GAAG,CAAC,MAAM,CAAC;IAclD;;;OAGG;IACH,qBAAqB,CAAC,WAAW,EAAE,QAAQ,GAAG,OAAO;IAkBrD;;OAEG;IACH,aAAa,IAAI,MAAM;IAIvB;;OAEG;IACH,OAAO,IAAI,KAAK,CAAC,MAAM,CAAC;IAMxB;;OAEG;IACH,WAAW,IAAI,MAAM;IAQrB;;OAEG;IACH,oBAAoB,IAAI,MAAM;CAGjC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/request/ScopeSet.mjs b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/request/ScopeSet.mjs deleted file mode 100644 index 30d2842..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/request/ScopeSet.mjs +++ /dev/null @@ -1,209 +0,0 @@ -/*! @azure/msal-common v14.16.1 2025-08-05 */ -'use strict'; -import { createClientConfigurationError } from '../error/ClientConfigurationError.mjs'; -import { StringUtils } from '../utils/StringUtils.mjs'; -import { createClientAuthError } from '../error/ClientAuthError.mjs'; -import { Constants, OIDC_SCOPES } from '../utils/Constants.mjs'; -import { emptyInputScopesError } from '../error/ClientConfigurationErrorCodes.mjs'; -import { cannotAppendScopeSet, cannotRemoveEmptyScope, emptyInputScopeSet } from '../error/ClientAuthErrorCodes.mjs'; - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * The ScopeSet class creates a set of scopes. Scopes are case-insensitive, unique values, so the Set object in JS makes - * the most sense to implement for this class. All scopes are trimmed and converted to lower case strings in intersection and union functions - * to ensure uniqueness of strings. - */ -class ScopeSet { - constructor(inputScopes) { - // Filter empty string and null/undefined array items - const scopeArr = inputScopes - ? StringUtils.trimArrayEntries([...inputScopes]) - : []; - const filteredInput = scopeArr - ? StringUtils.removeEmptyStringsFromArray(scopeArr) - : []; - // Validate and filter scopes (validate function throws if validation fails) - this.validateInputScopes(filteredInput); - this.scopes = new Set(); // Iterator in constructor not supported by IE11 - filteredInput.forEach((scope) => this.scopes.add(scope)); - } - /** - * Factory method to create ScopeSet from space-delimited string - * @param inputScopeString - * @param appClientId - * @param scopesRequired - */ - static fromString(inputScopeString) { - const scopeString = inputScopeString || Constants.EMPTY_STRING; - const inputScopes = scopeString.split(" "); - return new ScopeSet(inputScopes); - } - /** - * Creates the set of scopes to search for in cache lookups - * @param inputScopeString - * @returns - */ - static createSearchScopes(inputScopeString) { - const scopeSet = new ScopeSet(inputScopeString); - if (!scopeSet.containsOnlyOIDCScopes()) { - scopeSet.removeOIDCScopes(); - } - else { - scopeSet.removeScope(Constants.OFFLINE_ACCESS_SCOPE); - } - return scopeSet; - } - /** - * Used to validate the scopes input parameter requested by the developer. - * @param {Array} inputScopes - Developer requested permissions. Not all scopes are guaranteed to be included in the access token returned. - * @param {boolean} scopesRequired - Boolean indicating whether the scopes array is required or not - */ - validateInputScopes(inputScopes) { - // Check if scopes are required but not given or is an empty array - if (!inputScopes || inputScopes.length < 1) { - throw createClientConfigurationError(emptyInputScopesError); - } - } - /** - * Check if a given scope is present in this set of scopes. - * @param scope - */ - containsScope(scope) { - const lowerCaseScopes = this.printScopesLowerCase().split(" "); - const lowerCaseScopesSet = new ScopeSet(lowerCaseScopes); - // compare lowercase scopes - return scope - ? lowerCaseScopesSet.scopes.has(scope.toLowerCase()) - : false; - } - /** - * Check if a set of scopes is present in this set of scopes. - * @param scopeSet - */ - containsScopeSet(scopeSet) { - if (!scopeSet || scopeSet.scopes.size <= 0) { - return false; - } - return (this.scopes.size >= scopeSet.scopes.size && - scopeSet.asArray().every((scope) => this.containsScope(scope))); - } - /** - * Check if set of scopes contains only the defaults - */ - containsOnlyOIDCScopes() { - let defaultScopeCount = 0; - OIDC_SCOPES.forEach((defaultScope) => { - if (this.containsScope(defaultScope)) { - defaultScopeCount += 1; - } - }); - return this.scopes.size === defaultScopeCount; - } - /** - * Appends single scope if passed - * @param newScope - */ - appendScope(newScope) { - if (newScope) { - this.scopes.add(newScope.trim()); - } - } - /** - * Appends multiple scopes if passed - * @param newScopes - */ - appendScopes(newScopes) { - try { - newScopes.forEach((newScope) => this.appendScope(newScope)); - } - catch (e) { - throw createClientAuthError(cannotAppendScopeSet); - } - } - /** - * Removes element from set of scopes. - * @param scope - */ - removeScope(scope) { - if (!scope) { - throw createClientAuthError(cannotRemoveEmptyScope); - } - this.scopes.delete(scope.trim()); - } - /** - * Removes default scopes from set of scopes - * Primarily used to prevent cache misses if the default scopes are not returned from the server - */ - removeOIDCScopes() { - OIDC_SCOPES.forEach((defaultScope) => { - this.scopes.delete(defaultScope); - }); - } - /** - * Combines an array of scopes with the current set of scopes. - * @param otherScopes - */ - unionScopeSets(otherScopes) { - if (!otherScopes) { - throw createClientAuthError(emptyInputScopeSet); - } - const unionScopes = new Set(); // Iterator in constructor not supported in IE11 - otherScopes.scopes.forEach((scope) => unionScopes.add(scope.toLowerCase())); - this.scopes.forEach((scope) => unionScopes.add(scope.toLowerCase())); - return unionScopes; - } - /** - * Check if scopes intersect between this set and another. - * @param otherScopes - */ - intersectingScopeSets(otherScopes) { - if (!otherScopes) { - throw createClientAuthError(emptyInputScopeSet); - } - // Do not allow OIDC scopes to be the only intersecting scopes - if (!otherScopes.containsOnlyOIDCScopes()) { - otherScopes.removeOIDCScopes(); - } - const unionScopes = this.unionScopeSets(otherScopes); - const sizeOtherScopes = otherScopes.getScopeCount(); - const sizeThisScopes = this.getScopeCount(); - const sizeUnionScopes = unionScopes.size; - return sizeUnionScopes < sizeThisScopes + sizeOtherScopes; - } - /** - * Returns size of set of scopes. - */ - getScopeCount() { - return this.scopes.size; - } - /** - * Returns the scopes as an array of string values - */ - asArray() { - const array = []; - this.scopes.forEach((val) => array.push(val)); - return array; - } - /** - * Prints scopes into a space-delimited string - */ - printScopes() { - if (this.scopes) { - const scopeArr = this.asArray(); - return scopeArr.join(" "); - } - return Constants.EMPTY_STRING; - } - /** - * Prints scopes into a space-delimited lower-case string (used for caching) - */ - printScopesLowerCase() { - return this.printScopes().toLowerCase(); - } -} - -export { ScopeSet }; -//# sourceMappingURL=ScopeSet.mjs.map diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/request/ScopeSet.mjs.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/request/ScopeSet.mjs.map deleted file mode 100644 index 7d2ba23..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/request/ScopeSet.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ScopeSet.mjs","sources":["../../src/request/ScopeSet.ts"],"sourcesContent":[null],"names":["ClientConfigurationErrorCodes.emptyInputScopesError","ClientAuthErrorCodes.cannotAppendScopeSet","ClientAuthErrorCodes.cannotRemoveEmptyScope","ClientAuthErrorCodes.emptyInputScopeSet"],"mappings":";;;;;;;;;AAAA;;;AAGG;AAaH;;;;AAIG;MACU,QAAQ,CAAA;AAIjB,IAAA,WAAA,CAAY,WAA0B,EAAA;;QAElC,MAAM,QAAQ,GAAG,WAAW;cACtB,WAAW,CAAC,gBAAgB,CAAC,CAAC,GAAG,WAAW,CAAC,CAAC;cAC9C,EAAE,CAAC;QACT,MAAM,aAAa,GAAG,QAAQ;AAC1B,cAAE,WAAW,CAAC,2BAA2B,CAAC,QAAQ,CAAC;cACjD,EAAE,CAAC;;AAGT,QAAA,IAAI,CAAC,mBAAmB,CAAC,aAAa,CAAC,CAAC;QAExC,IAAI,CAAC,MAAM,GAAG,IAAI,GAAG,EAAU,CAAC;AAChC,QAAA,aAAa,CAAC,OAAO,CAAC,CAAC,KAAK,KAAK,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC;KAC5D;AAED;;;;;AAKG;IACH,OAAO,UAA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Ac,GAAG,eAAe,CAAC;KAC7D;AAED;;AAEG;IACH,aAAa,GAAA;AACT,QAAA,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC;KAC3B;AAED;;AAEG;IACH,OAAO,GAAA;QACH,MAAM,KAAK,GAAkB,EAAE,CAAC;AAChC,QAAA,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,GAAG,KAAK,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AAC9C,QAAA,OAAO,KAAK,CAAC;KAChB;AAED;;AAEG;IACH,WAAW,GAAA;QACP,IAAI,IAAI,CAAC,MAAM,EAAE;AACb,YAAA,MAAM,QAAQ,GAAG,IAAI,CAAC,OAAO,EAAE,CAAC;AAChC,YAAA,OAAO,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC7B,SAAA;QACD,OAAO,SAAS,CAAC,YAAY,CAAC;KACjC;AAED;;AAEG;IACH,oBAAoB,GAAA;AAChB,QAAA,OAAO,IAAI,CAAC,WAAW,EAAE,CAAC,WAAW,EAAE,CAAC;KAC3C;AACJ;;;;"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/request/StoreInCache.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/request/StoreInCache.d.ts deleted file mode 100644 index 77bdc64..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/request/StoreInCache.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -/** - * Controls whether tokens should be stored in the cache or not. If set to false, tokens may still be acquired and returned but will not be cached for later retrieval. - */ -export type StoreInCache = { - accessToken?: boolean; - idToken?: boolean; - refreshToken?: boolean; -}; -//# sourceMappingURL=StoreInCache.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/request/StoreInCache.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/request/StoreInCache.d.ts.map deleted file mode 100644 index 6d8db8c..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/request/StoreInCache.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"StoreInCache.d.ts","sourceRoot":"","sources":["../../src/request/StoreInCache.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG;IAEvB,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB,YAAY,CAAC,EAAE,OAAO,CAAC;CAC1B,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/response/AuthenticationResult.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/response/AuthenticationResult.d.ts deleted file mode 100644 index 9144991..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/response/AuthenticationResult.d.ts +++ /dev/null @@ -1,42 +0,0 @@ -import { AccountInfo } from "../account/AccountInfo.js"; -/** - * Result returned from the authority's token endpoint. - * - uniqueId - `oid` or `sub` claim from ID token - * - tenantId - `tid` claim from ID token - * - scopes - Scopes that are validated for the respective token - * - account - An account object representation of the currently signed-in user - * - idToken - Id token received as part of the response - * - idTokenClaims - MSAL-relevant ID token claims - * - accessToken - Access token or SSH certificate received as part of the response - * - fromCache - Boolean denoting whether token came from cache - * - expiresOn - Javascript Date object representing relative expiration of access token - * - extExpiresOn - Javascript Date object representing extended relative expiration of access token in case of server outage - * - refreshOn - Javascript Date object representing relative time until an access token must be refreshed - * - state - Value passed in by user in request - * - familyId - Family ID identifier, usually only used for refresh tokens - * - requestId - Request ID returned as part of the response - */ -export type AuthenticationResult = { - authority: string; - uniqueId: string; - tenantId: string; - scopes: Array; - account: AccountInfo | null; - idToken: string; - idTokenClaims: object; - accessToken: string; - fromCache: boolean; - expiresOn: Date | null; - extExpiresOn?: Date; - refreshOn?: Date; - tokenType: string; - correlationId: string; - requestId?: string; - state?: string; - familyId?: string; - cloudGraphHostName?: string; - msGraphHost?: string; - code?: string; - fromNativeBroker?: boolean; -}; -//# sourceMappingURL=AuthenticationResult.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/response/AuthenticationResult.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/response/AuthenticationResult.d.ts.map deleted file mode 100644 index 4510726..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/response/AuthenticationResult.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AuthenticationResult.d.ts","sourceRoot":"","sources":["../../src/response/AuthenticationResult.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAExD;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,MAAM,oBAAoB,GAAG;IAC/B,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACtB,OAAO,EAAE,WAAW,GAAG,IAAI,CAAC;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,EAAE,IAAI,GAAG,IAAI,CAAC;IACvB,YAAY,CAAC,EAAE,IAAI,CAAC;IACpB,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC9B,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/response/AuthorizationCodePayload.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/response/AuthorizationCodePayload.d.ts deleted file mode 100644 index 0b7df7c..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/response/AuthorizationCodePayload.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * Response returned after processing the code response query string or fragment. - */ -export type AuthorizationCodePayload = { - code: string; - cloud_instance_name?: string; - cloud_instance_host_name?: string; - cloud_graph_host_name?: string; - msgraph_host?: string; - state?: string; - nonce?: string; - client_info?: string; -}; -//# sourceMappingURL=AuthorizationCodePayload.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/response/AuthorizationCodePayload.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/response/AuthorizationCodePayload.d.ts.map deleted file mode 100644 index 33136cc..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/response/AuthorizationCodePayload.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AuthorizationCodePayload.d.ts","sourceRoot":"","sources":["../../src/response/AuthorizationCodePayload.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAAG;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/response/DeviceCodeResponse.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/response/DeviceCodeResponse.d.ts deleted file mode 100644 index d48789b..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/response/DeviceCodeResponse.d.ts +++ /dev/null @@ -1,26 +0,0 @@ -/** - * DeviceCode returned by the security token service device code endpoint containing information necessary for device code flow. - * - userCode: code which user needs to provide when authenticating at the verification URI - * - deviceCode: code which should be included in the request for the access token - * - verificationUri: URI where user can authenticate - * - expiresIn: expiration time of the device code in seconds - * - interval: interval at which the STS should be polled at - * - message: message which should be displayed to the user - */ -export type DeviceCodeResponse = { - userCode: string; - deviceCode: string; - verificationUri: string; - expiresIn: number; - interval: number; - message: string; -}; -export type ServerDeviceCodeResponse = { - user_code: string; - device_code: string; - verification_uri: string; - expires_in: number; - interval: number; - message: string; -}; -//# sourceMappingURL=DeviceCodeResponse.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/response/DeviceCodeResponse.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/response/DeviceCodeResponse.d.ts.map deleted file mode 100644 index 24daf8c..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/response/DeviceCodeResponse.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"DeviceCodeResponse.d.ts","sourceRoot":"","sources":["../../src/response/DeviceCodeResponse.ts"],"names":[],"mappings":"AAKA;;;;;;;;GAQG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,EAAE,MAAM,CAAC;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG;IACnC,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,gBAAgB,EAAE,MAAM,CAAC;IACzB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;CACnB,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/response/ExternalTokenResponse.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/response/ExternalTokenResponse.d.ts deleted file mode 100644 index af3bafe..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/response/ExternalTokenResponse.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { ServerAuthorizationTokenResponse } from "./ServerAuthorizationTokenResponse.js"; -/** - * Response object used for loading external tokens to cache. - * - token_type: Indicates the token type value. The only type that Azure AD supports is Bearer. - * - scope: The scopes that the access_token is valid for. - * - expires_in: How long the access token is valid (in seconds). - * - id_token: A JSON Web Token (JWT). The app can decode the segments of this token to request information about the user who signed in. - * - refresh_token: An OAuth 2.0 refresh token. The app can use this token acquire additional access tokens after the current access token expires. - * - access_token: The requested access token. The app can use this token to authenticate to the secured resource, such as a web API. - * - client_info: Client info object - */ -export type ExternalTokenResponse = Pick & { - access_token?: string; - client_info?: string; -}; -//# sourceMappingURL=ExternalTokenResponse.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/response/ExternalTokenResponse.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/response/ExternalTokenResponse.d.ts.map deleted file mode 100644 index 540e188..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/response/ExternalTokenResponse.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ExternalTokenResponse.d.ts","sourceRoot":"","sources":["../../src/response/ExternalTokenResponse.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,gCAAgC,EAAE,MAAM,uCAAuC,CAAC;AAEzF;;;;;;;;;GASG;AACH,MAAM,MAAM,qBAAqB,GAAG,IAAI,CACpC,gCAAgC,EAC9B,YAAY,GACZ,OAAO,GACP,YAAY,GACZ,gBAAgB,GAChB,UAAU,GACV,eAAe,GACf,0BAA0B,GAC1B,MAAM,CACX,GAAG;IACA,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/response/IMDSBadResponse.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/response/IMDSBadResponse.d.ts deleted file mode 100644 index 909bb27..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/response/IMDSBadResponse.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export type IMDSBadResponse = { - error: string; - "newest-versions": Array; -}; -//# sourceMappingURL=IMDSBadResponse.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/response/IMDSBadResponse.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/response/IMDSBadResponse.d.ts.map deleted file mode 100644 index f9a1ca5..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/response/IMDSBadResponse.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"IMDSBadResponse.d.ts","sourceRoot":"","sources":["../../src/response/IMDSBadResponse.ts"],"names":[],"mappings":"AAKA,MAAM,MAAM,eAAe,GAAG;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,iBAAiB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;CACpC,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/response/ResponseHandler.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/response/ResponseHandler.d.ts deleted file mode 100644 index 2d9141a..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/response/ResponseHandler.d.ts +++ /dev/null @@ -1,70 +0,0 @@ -import { ServerAuthorizationTokenResponse } from "./ServerAuthorizationTokenResponse.js"; -import { ICrypto } from "../crypto/ICrypto.js"; -import { ServerAuthorizationCodeResponse } from "./ServerAuthorizationCodeResponse.js"; -import { Logger } from "../logger/Logger.js"; -import { AuthenticationResult } from "./AuthenticationResult.js"; -import { AccountEntity } from "../cache/entities/AccountEntity.js"; -import { Authority } from "../authority/Authority.js"; -import { CacheRecord } from "../cache/entities/CacheRecord.js"; -import { CacheManager } from "../cache/CacheManager.js"; -import { RequestStateObject } from "../utils/ProtocolUtils.js"; -import { ICachePlugin } from "../cache/interface/ICachePlugin.js"; -import { ISerializableTokenCache } from "../cache/interface/ISerializableTokenCache.js"; -import { AuthorizationCodePayload } from "./AuthorizationCodePayload.js"; -import { BaseAuthRequest } from "../request/BaseAuthRequest.js"; -import { IPerformanceClient } from "../telemetry/performance/IPerformanceClient.js"; -import { TokenClaims } from "../account/TokenClaims.js"; -/** - * Class that handles response parsing. - * @internal - */ -export declare class ResponseHandler { - private clientId; - private cacheStorage; - private cryptoObj; - private logger; - private homeAccountIdentifier; - private serializableCache; - private persistencePlugin; - private performanceClient?; - constructor(clientId: string, cacheStorage: CacheManager, cryptoObj: ICrypto, logger: Logger, serializableCache: ISerializableTokenCache | null, persistencePlugin: ICachePlugin | null, performanceClient?: IPerformanceClient); - /** - * Function which validates server authorization code response. - * @param serverResponseHash - * @param requestState - * @param cryptoObj - */ - validateServerAuthorizationCodeResponse(serverResponse: ServerAuthorizationCodeResponse, requestState: string): void; - /** - * Function which validates server authorization token response. - * @param serverResponse - * @param refreshAccessToken - */ - validateTokenResponse(serverResponse: ServerAuthorizationTokenResponse, refreshAccessToken?: boolean): void; - /** - * Returns a constructed token response based on given string. Also manages the cache updates and cleanups. - * @param serverTokenResponse - * @param authority - */ - handleServerTokenResponse(serverTokenResponse: ServerAuthorizationTokenResponse, authority: Authority, reqTimestamp: number, request: BaseAuthRequest, authCodePayload?: AuthorizationCodePayload, userAssertionHash?: string, handlingRefreshTokenResponse?: boolean, forceCacheRefreshTokenResponse?: boolean, serverRequestId?: string): Promise; - /** - * Generates CacheRecord - * @param serverTokenResponse - * @param idTokenObj - * @param authority - */ - private generateCacheRecord; - /** - * Creates an @AuthenticationResult from @CacheRecord , @IdToken , and a boolean that states whether or not the result is from cache. - * - * Optionally takes a state string that is set as-is in the response. - * - * @param cacheRecord - * @param idTokenObj - * @param fromTokenCache - * @param stateString - */ - static generateAuthenticationResult(cryptoObj: ICrypto, authority: Authority, cacheRecord: CacheRecord, fromTokenCache: boolean, request: BaseAuthRequest, idTokenClaims?: TokenClaims, requestState?: RequestStateObject, serverTokenResponse?: ServerAuthorizationTokenResponse, requestId?: string): Promise; -} -export declare function buildAccountToCache(cacheStorage: CacheManager, authority: Authority, homeAccountId: string, base64Decode: (input: string) => string, correlationId: string, idTokenClaims?: TokenClaims, clientInfo?: string, environment?: string, claimsTenantId?: string | null, authCodePayload?: AuthorizationCodePayload, nativeAccountId?: string, logger?: Logger): AccountEntity; -//# sourceMappingURL=ResponseHandler.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/response/ResponseHandler.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/response/ResponseHandler.d.ts.map deleted file mode 100644 index cdfef3c..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/response/ResponseHandler.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ResponseHandler.d.ts","sourceRoot":"","sources":["../../src/response/ResponseHandler.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,gCAAgC,EAAE,MAAM,uCAAuC,CAAC;AACzF,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAK/C,OAAO,EAAE,+BAA+B,EAAE,MAAM,sCAAsC,CAAC;AACvF,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAG7C,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AACnE,OAAO,EAAE,SAA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BAAyB,CAC3B,mBAAmB,EAAE,gCAAgC,EACrD,SAAS,EAAE,SAAS,EACpB,YAAY,EAAE,MAAM,EACpB,OAAO,EAAE,eAAe,EACxB,eAAe,CAAC,EAAE,wBAAwB,EAC1C,iBAAiB,CAAC,EAAE,MAAM,EAC1B,4BAA4B,CAAC,EAAE,OAAO,EACtC,8BAA8B,CAAC,EAAE,OAAO,EACxC,eAAe,CAAC,EAAE,MAAM,GACzB,OAAO,CAAC,oBAAoB,CAAC;IAgJhC;;;;;OAKG;IACH,OAAO,CAAC,mBAAmB;IA+I3B;;;;;;;;;OASG;WACU,4BAA4B,CACrC,SAAS,EAAE,OAAO,EAClB,SAAS,EAAE,SAAS,EACpB,WAAW,EAAE,WAAW,EACxB,cAAc,EAAE,OAAO,EACvB,OAAO,EAAE,eAAe,EACxB,aAAa,CAAC,EAAE,WAAW,EAC3B,YAAY,CAAC,EAAE,kBAAkB,EACjC,mBAAmB,CAAC,EAAE,gCAAgC,EACtD,SAAS,CAAC,EAAE,MAAM,GACnB,OAAO,CAAC,oBAAoB,CAAC;CA0GnC;AAED,wBAAgB,mBAAmB,CAC/B,YAAY,EAAE,YAAY,EAC1B,SAAS,EAAE,SAAS,EACpB,aAAa,EAAE,MAAM,EACrB,YAAY,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,EACvC,aAAa,EAAE,MAAM,EACrB,aAAa,CAAC,EAAE,WAAW,EAC3B,UAAU,CAAC,EAAE,MAAM,EACnB,WAAW,CAAC,EAAE,MAAM,EACpB,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,EAC9B,eAAe,CAAC,EAAE,wBAAwB,EAC1C,eAAe,CAAC,EAAE,MAAM,EACxB,MAAM,CAAC,EAAE,MAAM,GAChB,aAAa,CAqDf"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/response/ResponseHandler.mjs b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/response/ResponseHandler.mjs deleted file mode 100644 index 6dde2c6..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/response/ResponseHandler.mjs +++ /dev/null @@ -1,395 +0,0 @@ -/*! @azure/msal-common v14.16.1 2025-08-05 */ -'use strict'; -import { createClientAuthError } from '../error/ClientAuthError.mjs'; -import { ServerError } from '../error/ServerError.mjs'; -import { ScopeSet } from '../request/ScopeSet.mjs'; -import { AccountEntity } from '../cache/entities/AccountEntity.mjs'; -import { isInteractionRequiredError, InteractionRequiredAuthError } from '../error/InteractionRequiredAuthError.mjs'; -import { ProtocolUtils } from '../utils/ProtocolUtils.mjs'; -import { HttpStatus, Constants, AuthenticationScheme, THE_FAMILY_ID } from '../utils/Constants.mjs'; -import { PopTokenGenerator } from '../crypto/PopTokenGenerator.mjs'; -import { TokenCacheContext } from '../cache/persistence/TokenCacheContext.mjs'; -import { PerformanceEvents } from '../telemetry/performance/PerformanceEvent.mjs'; -import { extractTokenClaims, checkMaxAge } from '../account/AuthToken.mjs'; -import { getTenantIdFromIdTokenClaims } from '../account/TokenClaims.mjs'; -import { updateAccountTenantProfileData, buildTenantProfile } from '../account/AccountInfo.mjs'; -import { createAccessTokenEntity, createRefreshTokenEntity, createIdTokenEntity } from '../cache/utils/CacheHelpers.mjs'; -import { stateNotFound, invalidState, stateMismatch, nonceMismatch, authTimeNotFound, invalidCacheEnvironment, keyIdMissing } from '../error/ClientAuthErrorCodes.mjs'; - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -function parseServerErrorNo(serverResponse) { - const errorCodePrefix = "code="; - const errorCodePrefixIndex = serverResponse.error_uri?.lastIndexOf(errorCodePrefix); - return errorCodePrefixIndex && errorCodePrefixIndex >= 0 - ? serverResponse.error_uri?.substring(errorCodePrefixIndex + errorCodePrefix.length) - : undefined; -} -/** - * Class that handles response parsing. - * @internal - */ -class ResponseHandler { - constructor(clientId, cacheStorage, cryptoObj, logger, serializableCache, persistencePlugin, performanceClient) { - this.clientId = clientId; - this.cacheStorage = cacheStorage; - this.cryptoObj = cryptoObj; - this.logger = logger; - this.serializableCache = serializableCache; - this.persistencePlugin = persistencePlugin; - this.performanceClient = performanceClient; - } - /** - * Function which validates server authorization code response. - * @param serverResponseHash - * @param requestState - * @param cryptoObj - */ - validateServerAuthorizationCodeResponse(serverResponse, requestState) { - if (!serverResponse.state || !requestState) { - throw serverResponse.state - ? createClientAuthError(stateNotFound, "Cached State") - : createClientAuthError(stateNotFound, "Server State"); - } - let decodedServerResponseState; - let decodedRequestState; - try { - decodedServerResponseState = decodeURIComponent(serverResponse.state); - } - catch (e) { - throw createClientAuthError(invalidState, serverResponse.state); - } - try { - decodedRequestState = decodeURIComponent(requestState); - } - catch (e) { - throw createClientAuthError(invalidState, serverResponse.state); - } - if (decodedServerResponseState !== decodedRequestState) { - throw createClientAuthError(stateMismatch); - } - // Check for error - if (serverResponse.error || - serverResponse.error_description || - serverResponse.suberror) { - const serverErrorNo = parseServerErrorNo(serverResponse); - if (isInteractionRequiredError(serverResponse.error, serverResponse.error_description, serverResponse.suberror)) { - throw new InteractionRequiredAuthError(serverResponse.error || "", serverResponse.error_description, serverResponse.suberror, serverResponse.timestamp || "", serverResponse.trace_id || "", serverResponse.correlation_id || "", serverResponse.claims || "", serverErrorNo); - } - throw new ServerError(serverResponse.error || "", serverResponse.error_description, serverResponse.suberror, serverErrorNo); - } - } - /** - * Function which validates server authorization token response. - * @param serverResponse - * @param refreshAccessToken - */ - validateTokenResponse(serverResponse, refreshAccessToken) { - // Check for error - if (serverResponse.error || - serverResponse.error_description || - serverResponse.suberror) { - const errString = `Error(s): ${serverResponse.error_codes || Constants.NOT_AVAILABLE} - Timestamp: ${serverResponse.timestamp || Constants.NOT_AVAILABLE} - Description: ${serverResponse.error_description || Constants.NOT_AVAILABLE} - Correlation ID: ${serverResponse.correlation_id || Constants.NOT_AVAILABLE} - Trace ID: ${serverResponse.trace_id || Constants.NOT_AVAILABLE}`; - const serverErrorNo = serverResponse.error_codes?.length - ? serverResponse.error_codes[0] - : undefined; - const serverError = new ServerError(serverResponse.error, errString, serverResponse.suberror, serverErrorNo, serverResponse.status); - // check if 500 error - if (refreshAccessToken && - serverResponse.status && - serverResponse.status >= HttpStatus.SERVER_ERROR_RANGE_START && - serverResponse.status <= HttpStatus.SERVER_ERROR_RANGE_END) { - this.logger.warning(`executeTokenRequest:validateTokenResponse - AAD is currently unavailable and the access token is unable to be refreshed.\n${serverError}`); - // don't throw an exception, but alert the user via a log that the token was unable to be refreshed - return; - // check if 400 error - } - else if (refreshAccessToken && - serverResponse.status && - serverResponse.status >= HttpStatus.CLIENT_ERROR_RANGE_START && - serverResponse.status <= HttpStatus.CLIENT_ERROR_RANGE_END) { - this.logger.warning(`executeTokenRequest:validateTokenResponse - AAD is currently available but is unable to refresh the access token.\n${serverError}`); - // don't throw an exception, but alert the user via a log that the token was unable to be refreshed - return; - } - if (isInteractionRequiredError(serverResponse.error, serverResponse.error_description, serverResponse.suberror)) { - throw new InteractionRequiredAuthError(serverResponse.error, serverResponse.error_description, serverResponse.suberror, serverResponse.timestamp || Constants.EMPTY_STRING, serverResponse.trace_id || Constants.EMPTY_STRING, serverResponse.correlation_id || Constants.EMPTY_STRING, serverResponse.claims || Constants.EMPTY_STRING, serverErrorNo); - } - throw serverError; - } - } - /** - * Returns a constructed token response based on given string. Also manages the cache updates and cleanups. - * @param serverTokenResponse - * @param authority - */ - async handleServerTokenResponse(serverTokenResponse, authority, reqTimestamp, request, authCodePayload, userAssertionHash, handlingRefreshTokenResponse, forceCacheRefreshTokenResponse, serverRequestId) { - this.performanceClient?.addQueueMeasurement(PerformanceEvents.HandleServerTokenResponse, serverTokenResponse.correlation_id); - // create an idToken object (not entity) - let idTokenClaims; - if (serverTokenResponse.id_token) { - idTokenClaims = extractTokenClaims(serverTokenResponse.id_token || Constants.EMPTY_STRING, this.cryptoObj.base64Decode); - // token nonce check (TODO: Add a warning if no nonce is given?) - if (authCodePayload && authCodePayload.nonce) { - if (idTokenClaims.nonce !== authCodePayload.nonce) { - throw createClientAuthError(nonceMismatch); - } - } - // token max_age check - if (request.maxAge || request.maxAge === 0) { - const authTime = idTokenClaims.auth_time; - if (!authTime) { - throw createClientAuthError(authTimeNotFound); - } - checkMaxAge(authTime, request.maxAge); - } - } - // generate homeAccountId - this.homeAccountIdentifier = AccountEntity.generateHomeAccountId(serverTokenResponse.client_info || Constants.EMPTY_STRING, authority.authorityType, this.logger, this.cryptoObj, idTokenClaims); - // save the response tokens - let requestStateObj; - if (!!authCodePayload && !!authCodePayload.state) { - requestStateObj = ProtocolUtils.parseRequestState(this.cryptoObj, authCodePayload.state); - } - // Add keyId from request to serverTokenResponse if defined - serverTokenResponse.key_id = - serverTokenResponse.key_id || request.sshKid || undefined; - const cacheRecord = this.generateCacheRecord(serverTokenResponse, authority, reqTimestamp, request, idTokenClaims, userAssertionHash, authCodePayload); - let cacheContext; - try { - if (this.persistencePlugin && this.serializableCache) { - this.logger.verbose("Persistence enabled, calling beforeCacheAccess"); - cacheContext = new TokenCacheContext(this.serializableCache, true); - await this.persistencePlugin.beforeCacheAccess(cacheContext); - } - /* - * When saving a refreshed tokens to the cache, it is expected that the account that was used is present in the cache. - * If not present, we should return null, as it's the case that another application called removeAccount in between - * the calls to getAllAccounts and acquireTokenSilent. We should not overwrite that removal, unless explicitly flagged by - * the developer, as in the case of refresh token flow used in ADAL Node to MSAL Node migration. - */ - if (handlingRefreshTokenResponse && - !forceCacheRefreshTokenResponse && - cacheRecord.account) { - const key = cacheRecord.account.generateAccountKey(); - const account = this.cacheStorage.getAccount(key, request.correlationId, this.logger); - if (!account) { - this.logger.warning("Account used to refresh tokens not in persistence, refreshed tokens will not be stored in the cache"); - return await ResponseHandler.generateAuthenticationResult(this.cryptoObj, authority, cacheRecord, false, request, idTokenClaims, requestStateObj, undefined, serverRequestId); - } - } - await this.cacheStorage.saveCacheRecord(cacheRecord, request.correlationId, request.storeInCache); - } - finally { - if (this.persistencePlugin && - this.serializableCache && - cacheContext) { - this.logger.verbose("Persistence enabled, calling afterCacheAccess"); - await this.persistencePlugin.afterCacheAccess(cacheContext); - } - } - return ResponseHandler.generateAuthenticationResult(this.cryptoObj, authority, cacheRecord, false, request, idTokenClaims, requestStateObj, serverTokenResponse, serverRequestId); - } - /** - * Generates CacheRecord - * @param serverTokenResponse - * @param idTokenObj - * @param authority - */ - generateCacheRecord(serverTokenResponse, authority, reqTimestamp, request, idTokenClaims, userAssertionHash, authCodePayload) { - const env = authority.getPreferredCache(); - if (!env) { - throw createClientAuthError(invalidCacheEnvironment); - } - const claimsTenantId = getTenantIdFromIdTokenClaims(idTokenClaims); - // IdToken: non AAD scenarios can have empty realm - let cachedIdToken; - let cachedAccount; - if (serverTokenResponse.id_token && !!idTokenClaims) { - cachedIdToken = createIdTokenEntity(this.homeAccountIdentifier, env, serverTokenResponse.id_token, this.clientId, claimsTenantId || ""); - cachedAccount = buildAccountToCache(this.cacheStorage, authority, this.homeAccountIdentifier, this.cryptoObj.base64Decode, request.correlationId, idTokenClaims, serverTokenResponse.client_info, env, claimsTenantId, authCodePayload, undefined, // nativeAccountId - this.logger); - } - // AccessToken - let cachedAccessToken = null; - if (serverTokenResponse.access_token) { - // If scopes not returned in server response, use request scopes - const responseScopes = serverTokenResponse.scope - ? ScopeSet.fromString(serverTokenResponse.scope) - : new ScopeSet(request.scopes || []); - /* - * Use timestamp calculated before request - * Server may return timestamps as strings, parse to numbers if so. - */ - const expiresIn = (typeof serverTokenResponse.expires_in === "string" - ? parseInt(serverTokenResponse.expires_in, 10) - : serverTokenResponse.expires_in) || 0; - const extExpiresIn = (typeof serverTokenResponse.ext_expires_in === "string" - ? parseInt(serverTokenResponse.ext_expires_in, 10) - : serverTokenResponse.ext_expires_in) || 0; - const refreshIn = (typeof serverTokenResponse.refresh_in === "string" - ? parseInt(serverTokenResponse.refresh_in, 10) - : serverTokenResponse.refresh_in) || undefined; - const tokenExpirationSeconds = reqTimestamp + expiresIn; - const extendedTokenExpirationSeconds = tokenExpirationSeconds + extExpiresIn; - const refreshOnSeconds = refreshIn && refreshIn > 0 - ? reqTimestamp + refreshIn - : undefined; - // non AAD scenarios can have empty realm - cachedAccessToken = createAccessTokenEntity(this.homeAccountIdentifier, env, serverTokenResponse.access_token, this.clientId, claimsTenantId || authority.tenant || "", responseScopes.printScopes(), tokenExpirationSeconds, extendedTokenExpirationSeconds, this.cryptoObj.base64Decode, refreshOnSeconds, serverTokenResponse.token_type, userAssertionHash, serverTokenResponse.key_id, request.claims, request.requestedClaimsHash); - } - // refreshToken - let cachedRefreshToken = null; - if (serverTokenResponse.refresh_token) { - let rtExpiresOn; - if (serverTokenResponse.refresh_token_expires_in) { - const rtExpiresIn = typeof serverTokenResponse.refresh_token_expires_in === - "string" - ? parseInt(serverTokenResponse.refresh_token_expires_in, 10) - : serverTokenResponse.refresh_token_expires_in; - rtExpiresOn = reqTimestamp + rtExpiresIn; - } - cachedRefreshToken = createRefreshTokenEntity(this.homeAccountIdentifier, env, serverTokenResponse.refresh_token, this.clientId, serverTokenResponse.foci, userAssertionHash, rtExpiresOn); - } - // appMetadata - let cachedAppMetadata = null; - if (serverTokenResponse.foci) { - cachedAppMetadata = { - clientId: this.clientId, - environment: env, - familyId: serverTokenResponse.foci, - }; - } - return { - account: cachedAccount, - idToken: cachedIdToken, - accessToken: cachedAccessToken, - refreshToken: cachedRefreshToken, - appMetadata: cachedAppMetadata, - }; - } - /** - * Creates an @AuthenticationResult from @CacheRecord , @IdToken , and a boolean that states whether or not the result is from cache. - * - * Optionally takes a state string that is set as-is in the response. - * - * @param cacheRecord - * @param idTokenObj - * @param fromTokenCache - * @param stateString - */ - static async generateAuthenticationResult(cryptoObj, authority, cacheRecord, fromTokenCache, request, idTokenClaims, requestState, serverTokenResponse, requestId) { - let accessToken = Constants.EMPTY_STRING; - let responseScopes = []; - let expiresOn = null; - let extExpiresOn; - let refreshOn; - let familyId = Constants.EMPTY_STRING; - if (cacheRecord.accessToken) { - /* - * if the request object has `popKid` property, `signPopToken` will be set to false and - * the token will be returned unsigned - */ - if (cacheRecord.accessToken.tokenType === - AuthenticationScheme.POP && - !request.popKid) { - const popTokenGenerator = new PopTokenGenerator(cryptoObj); - const { secret, keyId } = cacheRecord.accessToken; - if (!keyId) { - throw createClientAuthError(keyIdMissing); - } - accessToken = await popTokenGenerator.signPopToken(secret, keyId, request); - } - else { - accessToken = cacheRecord.accessToken.secret; - } - responseScopes = ScopeSet.fromString(cacheRecord.accessToken.target).asArray(); - expiresOn = new Date(Number(cacheRecord.accessToken.expiresOn) * 1000); - extExpiresOn = new Date(Number(cacheRecord.accessToken.extendedExpiresOn) * 1000); - if (cacheRecord.accessToken.refreshOn) { - refreshOn = new Date(Number(cacheRecord.accessToken.refreshOn) * 1000); - } - } - if (cacheRecord.appMetadata) { - familyId = - cacheRecord.appMetadata.familyId === THE_FAMILY_ID - ? THE_FAMILY_ID - : ""; - } - const uid = idTokenClaims?.oid || idTokenClaims?.sub || ""; - const tid = idTokenClaims?.tid || ""; - // for hybrid + native bridge enablement, send back the native account Id - if (serverTokenResponse?.spa_accountid && !!cacheRecord.account) { - cacheRecord.account.nativeAccountId = - serverTokenResponse?.spa_accountid; - } - const accountInfo = cacheRecord.account - ? updateAccountTenantProfileData(cacheRecord.account.getAccountInfo(), undefined, // tenantProfile optional - idTokenClaims, cacheRecord.idToken?.secret) - : null; - return { - authority: authority.canonicalAuthority, - uniqueId: uid, - tenantId: tid, - scopes: responseScopes, - account: accountInfo, - idToken: cacheRecord?.idToken?.secret || "", - idTokenClaims: idTokenClaims || {}, - accessToken: accessToken, - fromCache: fromTokenCache, - expiresOn: expiresOn, - extExpiresOn: extExpiresOn, - refreshOn: refreshOn, - correlationId: request.correlationId, - requestId: requestId || Constants.EMPTY_STRING, - familyId: familyId, - tokenType: cacheRecord.accessToken?.tokenType || Constants.EMPTY_STRING, - state: requestState - ? requestState.userRequestState - : Constants.EMPTY_STRING, - cloudGraphHostName: cacheRecord.account?.cloudGraphHostName || - Constants.EMPTY_STRING, - msGraphHost: cacheRecord.account?.msGraphHost || Constants.EMPTY_STRING, - code: serverTokenResponse?.spa_code, - fromNativeBroker: false, - }; - } -} -function buildAccountToCache(cacheStorage, authority, homeAccountId, base64Decode, correlationId, idTokenClaims, clientInfo, environment, claimsTenantId, authCodePayload, nativeAccountId, logger) { - logger?.verbose("setCachedAccount called"); - // Check if base account is already cached - const accountKeys = cacheStorage.getAccountKeys(); - const baseAccountKey = accountKeys.find((accountKey) => { - return accountKey.startsWith(homeAccountId); - }); - let cachedAccount = null; - if (baseAccountKey) { - cachedAccount = cacheStorage.getAccount(baseAccountKey, correlationId, logger); - } - const baseAccount = cachedAccount || - AccountEntity.createAccount({ - homeAccountId, - idTokenClaims, - clientInfo, - environment, - cloudGraphHostName: authCodePayload?.cloud_graph_host_name, - msGraphHost: authCodePayload?.msgraph_host, - nativeAccountId: nativeAccountId, - }, authority, base64Decode); - const tenantProfiles = baseAccount.tenantProfiles || []; - const tenantId = claimsTenantId || baseAccount.realm; - if (tenantId && - !tenantProfiles.find((tenantProfile) => { - return tenantProfile.tenantId === tenantId; - })) { - const newTenantProfile = buildTenantProfile(homeAccountId, baseAccount.localAccountId, tenantId, idTokenClaims); - tenantProfiles.push(newTenantProfile); - } - baseAccount.tenantProfiles = tenantProfiles; - return baseAccount; -} - -export { ResponseHandler, buildAccountToCache }; -//# sourceMappingURL=ResponseHandler.mjs.map diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/response/ResponseHandler.mjs.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/response/ResponseHandler.mjs.map deleted file mode 100644 index e02556a..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/response/ResponseHandler.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ResponseHandler.mjs","sources":["../../src/response/ResponseHandler.ts"],"sourcesContent":[null],"names":["ClientAuthErrorCodes.stateNotFound","ClientAuthErrorCodes.invalidState","ClientAuthErrorCodes.stateMismatch","ClientAuthErrorCodes.nonceMismatch","ClientAuthErrorCodes.authTimeNotFound","ClientAuthErrorCodes.invalidCacheEnvironment","CacheHelpers.createIdTokenEntity","CacheHelpers.createAccessTokenEntity","CacheHelpers.createRefreshTokenEntity","ClientAuthErrorCodes.keyIdMissing"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;;;AAGG;AAoDH,SAAS,kBAAkB,CACvB,cAA+C,EAAA;IAE/C,MAAM,eAAe,GAAG,OAAO,CAAC;IAChC,MAAM,oBAAoB,GACtB,cAAc,CAAC,SAAS,EAAE,WAAW,CAAC,eAAe,CAAC,CAAC;AAC3D,IAAA,OAAO,oBAAoB,IAAI,oBAAoB,IAAI,CAAC;AACpD,UAAE,cAAc,CAAC,SAAS,EAAE,SAAS,CAC/B,oBAAoB,GAAG,eAAe,CAAC,MAAM,CAChD;UACD,SAAS,CAAC;AACpB,CAAC;AAED;;;AAGG;MACU,eAAe,CAAA;AAUxB,IAAA,WAAA,CACI,QAAgB,EAChB,YAA0B,EAC1B,SAAkB,EAClB,MAAc,EACd,iBAAiD,EACjD,iBAAsC,EACtC,iBAAsC,EAAA;AAEtC,QAAA,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;AACzB,QAAA,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;AACjC,QAAA,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;AAC3B,QAAA,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;AACrB,QAAA,IAAI,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;AAC3C,QAAA,IAAI,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;AAC3C,QAAA,IAAI,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;KAC9C;AAED;;;;;AAKG;IACH,uCAAuC,CACnC,cAA+C,EAC/C,YAAoB,EAAA;AAEpB,QAAA,IAAI,CAAC,cAAc,CAAC,KAAK,IAAI,CAAC,YAAY,EAAE;YACxC,MAAM,cAAc,CAAC,KAAK;kBACpB,qBAAqB,CACjBA,aAAkC,EAClC,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Aa,GAAG,YAAY,CAAC,UAAU,CACnC,cAAc,EACd,aAAa,EACb,MAAM,CACT,CAAC;AACL,KAAA;IAED,MAAM,WAAW,GACb,aAAa;QACb,aAAa,CAAC,aAAa,CACvB;YACI,aAAa;YACb,aAAa;YACb,UAAU;YACV,WAAW;YACX,kBAAkB,EAAE,eAAe,EAAE,qBAAqB;YAC1D,WAAW,EAAE,eAAe,EAAE,YAAY;AAC1C,YAAA,eAAe,EAAE,eAAe;AACnC,SAAA,EACD,SAAS,EACT,YAAY,CACf,CAAC;AAEN,IAAA,MAAM,cAAc,GAAG,WAAW,CAAC,cAAc,IAAI,EAAE,CAAC;AACxD,IAAA,MAAM,QAAQ,GAAG,cAAc,IAAI,WAAW,CAAC,KAAK,CAAC;AACrD,IAAA,IACI,QAAQ;AACR,QAAA,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,aAAa,KAAI;AACnC,YAAA,OAAO,aAAa,CAAC,QAAQ,KAAK,QAAQ,CAAC;AAC/C,SAAC,CAAC,EACJ;AACE,QAAA,MAAM,gBAAgB,GAAG,kBAAkB,CACvC,aAAa,EACb,WAAW,CAAC,cAAc,EAC1B,QAAQ,EACR,aAAa,CAChB,CAAC;AACF,QAAA,cAAc,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;AACzC,KAAA;AACD,IAAA,WAAW,CAAC,cAAc,GAAG,cAAc,CAAC;AAE5C,IAAA,OAAO,WAAW,CAAC;AACvB;;;;"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/response/ServerAuthorizationCodeResponse.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/response/ServerAuthorizationCodeResponse.d.ts deleted file mode 100644 index dc6de1c..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/response/ServerAuthorizationCodeResponse.d.ts +++ /dev/null @@ -1,27 +0,0 @@ -/** - * Deserialized response object from server authorization code request. - * - code: authorization code from server - * - client_info: client info object - * - state: OAuth2 request state - * - error: error sent back in hash - * - error: description - */ -export type ServerAuthorizationCodeResponse = { - code?: string; - client_info?: string; - state?: string; - cloud_instance_name?: string; - cloud_instance_host_name?: string; - cloud_graph_host_name?: string; - msgraph_host?: string; - error?: string; - error_uri?: string; - error_description?: string; - suberror?: string; - timestamp?: string; - trace_id?: string; - correlation_id?: string; - claims?: string; - accountId?: string; -}; -//# sourceMappingURL=ServerAuthorizationCodeResponse.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/response/ServerAuthorizationCodeResponse.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/response/ServerAuthorizationCodeResponse.d.ts.map deleted file mode 100644 index 65addd6..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/response/ServerAuthorizationCodeResponse.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ServerAuthorizationCodeResponse.d.ts","sourceRoot":"","sources":["../../src/response/ServerAuthorizationCodeResponse.ts"],"names":[],"mappings":"AAKA;;;;;;;GAOG;AACH,MAAM,MAAM,+BAA+B,GAAG;IAE1C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/response/ServerAuthorizationTokenResponse.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/response/ServerAuthorizationTokenResponse.d.ts deleted file mode 100644 index ce762b4..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/response/ServerAuthorizationTokenResponse.d.ts +++ /dev/null @@ -1,48 +0,0 @@ -import { AuthenticationScheme } from "../utils/Constants.js"; -/** - * Deserialized response object from server authorization code request. - * - token_type: Indicates the token type value. Can be either Bearer or pop. - * - scope: The scopes that the access_token is valid for. - * - expires_in: How long the access token is valid (in seconds). - * - refresh_in: Duration afer which a token should be renewed, regardless of expiration. - * - ext_expires_in: How long the access token is valid (in seconds) if the server isn't responding. - * - access_token: The requested access token. The app can use this token to authenticate to the secured resource, such as a web API. - * - refresh_token: An OAuth 2.0 refresh token. The app can use this token acquire additional access tokens after the current access token expires. - * - id_token: A JSON Web Token (JWT). The app can decode the segments of this token to request information about the user who signed in. - * - key_id: A string that uniquely identifies a public key that the request is bound to. - * - * In case of error: - * - error: An error code string that can be used to classify types of errors that occur, and can be used to react to errors. - * - error_description: A specific error message that can help a developer identify the root cause of an authentication error. - * - error_codes: A list of STS-specific error codes that can help in diagnostics. - * - timestamp: The time at which the error occurred. - * - trace_id: A unique identifier for the request that can help in diagnostics. - * - correlation_id: A unique identifier for the request that can help in diagnostics across components. - * - status: the network request's response status - */ -export type ServerAuthorizationTokenResponse = { - status?: number; - token_type?: AuthenticationScheme; - scope?: string; - expires_in?: number; - refresh_in?: number; - ext_expires_in?: number; - access_token?: string; - refresh_token?: string; - refresh_token_expires_in?: number; - id_token?: string; - client_info?: string; - foci?: string; - spa_code?: string; - spa_accountid?: string; - key_id?: string; - error?: string; - error_description?: string; - error_codes?: Array; - suberror?: string; - timestamp?: string; - trace_id?: string; - correlation_id?: string; - claims?: string; -}; -//# sourceMappingURL=ServerAuthorizationTokenResponse.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/response/ServerAuthorizationTokenResponse.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/response/ServerAuthorizationTokenResponse.d.ts.map deleted file mode 100644 index cdd8f0f..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/response/ServerAuthorizationTokenResponse.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ServerAuthorizationTokenResponse.d.ts","sourceRoot":"","sources":["../../src/response/ServerAuthorizationTokenResponse.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAE7D;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,MAAM,gCAAgC,GAAG;IAC3C,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,UAAU,CAAC,EAAE,oBAAoB,CAAC;IAClC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,WAAW,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC5B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/telemetry/performance/IPerformanceClient.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/telemetry/performance/IPerformanceClient.d.ts deleted file mode 100644 index 5a5136a..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/telemetry/performance/IPerformanceClient.d.ts +++ /dev/null @@ -1,58 +0,0 @@ -import { PerformanceEvent } from "./PerformanceEvent.js"; -import { IPerformanceMeasurement } from "./IPerformanceMeasurement.js"; -export type PerformanceCallbackFunction = (events: PerformanceEvent[]) => void; -export type InProgressPerformanceEvent = { - end: (event?: Partial, error?: unknown) => PerformanceEvent | null; - discard: () => void; - add: (fields: { - [key: string]: {} | undefined; - }) => void; - increment: (fields: { - [key: string]: number | undefined; - }) => void; - event: PerformanceEvent; - /** - * @deprecated This attribute will be removed in the next major version - */ - measurement: IPerformanceMeasurement; -}; -export interface IPerformanceClient { - startMeasurement(measureName: string, correlationId?: string): InProgressPerformanceEvent; - endMeasurement(event: PerformanceEvent): PerformanceEvent | null; - discardMeasurements(correlationId: string): void; - addFields(fields: { - [key: string]: {} | undefined; - }, correlationId: string): void; - incrementFields(fields: { - [key: string]: number | undefined; - }, correlationId: string): void; - removePerformanceCallback(callbackId: string): boolean; - addPerformanceCallback(callback: PerformanceCallbackFunction): string; - emitEvents(events: PerformanceEvent[], correlationId: string): void; - /** - * @deprecated This method will be removed in the next major version - */ - startPerformanceMeasurement(measureName: string, correlationId: string): IPerformanceMeasurement; - generateId(): string; - calculateQueuedTime(preQueueTime: number, currentTime: number): number; - addQueueMeasurement(eventName: string, correlationId?: string, queueTime?: number, manuallyCompleted?: boolean): void; - setPreQueueTime(eventName: string, correlationId?: string): void; -} -/** - * Queue measurement type - */ -export type QueueMeasurement = { - /** - * Name of performance event - */ - eventName: string; - /** - * Time spent in JS queue - */ - queueTime: number; - /** - * Incomplete pre-queue events are instrumentation bugs that should be fixed. - */ - manuallyCompleted?: boolean; -}; -//# sourceMappingURL=IPerformanceClient.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/telemetry/performance/IPerformanceClient.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/telemetry/performance/IPerformanceClient.d.ts.map deleted file mode 100644 index 3445f94..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/telemetry/performance/IPerformanceClient.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"IPerformanceClient.d.ts","sourceRoot":"","sources":["../../../src/telemetry/performance/IPerformanceClient.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAEvE,MAAM,MAAM,2BAA2B,GAAG,CAAC,MAAM,EAAE,gBAAgB,EAAE,KAAK,IAAI,CAAC;AAE/E,MAAM,MAAM,0BAA0B,GAAG;IACrC,GAAG,EAAE,CACD,KAAK,CAAC,EAAE,OAAO,CAAC,gBAAgB,CAAC,EACjC,KAAK,CAAC,EAAE,OAAO,KACd,gBAAgB,GAAG,IAAI,CAAC;IAC7B,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,GAAG,EAAE,CAAC,MAAM,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,EAAE,GAAG,SAAS,CAAA;KAAE,KAAK,IAAI,CAAC;IACzD,SAAS,EAAE,CAAC,MAAM,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAA;KAAE,KAAK,IAAI,CAAC;IACnE,KAAK,EAAE,gBAAgB,CAAC;IACxB;;OAE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AM,MAAM,gBAAgB,GAAG;IAC3B;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC/B,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/telemetry/performance/IPerformanceMeasurement.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/telemetry/performance/IPerformanceMeasurement.d.ts deleted file mode 100644 index 8f4648d..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/telemetry/performance/IPerformanceMeasurement.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -export interface IPerformanceMeasurement { - startMeasurement(): void; - endMeasurement(): void; - flushMeasurement(): number | null; -} -//# sourceMappingURL=IPerformanceMeasurement.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/telemetry/performance/IPerformanceMeasurement.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/telemetry/performance/IPerformanceMeasurement.d.ts.map deleted file mode 100644 index 959e340..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/telemetry/performance/IPerformanceMeasurement.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"IPerformanceMeasurement.d.ts","sourceRoot":"","sources":["../../../src/telemetry/performance/IPerformanceMeasurement.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,uBAAuB;IACpC,gBAAgB,IAAI,IAAI,CAAC;IACzB,cAAc,IAAI,IAAI,CAAC;IACvB,gBAAgB,IAAI,MAAM,GAAG,IAAI,CAAC;CACrC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/telemetry/performance/PerformanceClient.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/telemetry/performance/PerformanceClient.d.ts deleted file mode 100644 index 116847b..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/telemetry/performance/PerformanceClient.d.ts +++ /dev/null @@ -1,243 +0,0 @@ -import { ApplicationTelemetry } from "../../config/ClientConfiguration.js"; -import { Logger } from "../../logger/Logger.js"; -import { InProgressPerformanceEvent, IPerformanceClient, PerformanceCallbackFunction, QueueMeasurement } from "./IPerformanceClient.js"; -import { PerformanceEvent, PerformanceEventContext, PerformanceEvents, PerformanceEventStackedContext } from "./PerformanceEvent.js"; -import { IPerformanceMeasurement } from "./IPerformanceMeasurement.js"; -export interface PreQueueEvent { - name: PerformanceEvents; - time: number; -} -/** - * Starts context by adding payload to the stack - * @param event {PerformanceEvent} - * @param abbreviations {Map} event name abbreviations - * @param stack {?PerformanceEventStackedContext[]} stack - */ -export declare function startContext(event: PerformanceEvent, abbreviations: Map, stack?: PerformanceEventStackedContext[]): void; -/** - * Ends context by removing payload from the stack and returning parent or self, if stack is empty, payload - * - * @param event {PerformanceEvent} - * @param abbreviations {Map} event name abbreviations - * @param stack {?PerformanceEventStackedContext[]} stack - * @param error {?unknown} error - */ -export declare function endContext(event: PerformanceEvent, abbreviations: Map, stack?: PerformanceEventStackedContext[], error?: unknown): PerformanceEventContext | undefined; -/** - * Adds error name and stack trace to the telemetry event - * @param error {Error} - * @param logger {Logger} - * @param event {PerformanceEvent} - * @param stackMaxSize {number} max error stack size to capture - */ -export declare function addError(error: unknown, logger: Logger, event: PerformanceEvent, stackMaxSize?: number): void; -/** - * Compacts error stack into array by fetching N first entries - * @param stack {string} error stack - * @param stackMaxSize {number} max error stack size to capture - * @returns {string[]} - */ -export declare function compactStack(stack: string, stackMaxSize: number): string[]; -/** - * Compacts error stack line by shortening file path - * Example: https://localhost/msal-common/src/authority/Authority.js:100:1 -> Authority.js:100:1 - * @param line {string} stack line - * @returns {string} - */ -export declare function compactStackLine(line: string): string; -export declare abstract class PerformanceClient implements IPerformanceClient { - protected authority: string; - protected libraryName: string; - protected libraryVersion: string; - protected applicationTelemetry: ApplicationTelemetry; - protected clientId: string; - protected logger: Logger; - protected callbacks: Map; - /** - * Multiple events with the same correlation id. - * @protected - * @type {Map} - */ - protected eventsByCorrelationId: Map; - /** - * Map of pre-queue times by correlation Id - * - * @protected - * @type {Map} - */ - protected preQueueTimeByCorrelationId: Map; - /** - * Map of queue measurements by correlation Id - * - * @protected - * @type {Map>} - */ - protected queueMeasurements: Map>; - protected intFields: Set; - /** - * Map of stacked events by correlation id. - * - * @protected - */ - protected eventStack: Map; - /** - * Event name abbreviations - * - * @protected - */ - protected abbreviations: Map; - /** - * Creates an instance of PerformanceClient, - * an abstract class containing core performance telemetry logic. - * - * @constructor - * @param {string} clientId Client ID of the application - * @param {string} authority Authority used by the application - * @param {Logger} logger Logger used by the application - * @param {string} libraryName Name of the library - * @param {string} libraryVersion Version of the library - * @param {ApplicationTelemetry} applicationTelemetry application name and version - * @param {Set} intFields integer fields to be truncated - * @param {Map} abbreviations event name abbreviations - */ - constructor(clientId: string, authority: string, logger: Logger, libraryName: string, libraryVersion: string, applicationTelemetry: ApplicationTelemetry, intFields?: Set, abbreviations?: Map); - /** - * Generates and returns a unique id, typically a guid. - * - * @abstract - * @returns {string} - */ - abstract generateId(): string; - /** - * Starts and returns an platform-specific implementation of IPerformanceMeasurement. - * Note: this function can be changed to abstract at the next major version bump. - * - * @param {string} measureName - * @param {string} correlationId - * @returns {IPerformanceMeasurement} - * @deprecated This method will be removed in the next major version - */ - startPerformanceMeasurement(measureName: string, // eslint-disable-line @typescript-eslint/no-unused-vars - correlationId: string): IPerformanceMeasurement; - /** - * Sets pre-queue time by correlation Id - * - * @abstract - * @param {PerformanceEvents} eventName - * @param {string} correlationId - * @returns - */ - abstract setPreQueueTime(eventName: PerformanceEvents, correlationId?: string): void; - /** - * Gets map of pre-queue times by correlation Id - * - * @param {PerformanceEvents} eventName - * @param {string} correlationId - * @returns {number} - */ - getPreQueueTime(eventName: string, correlationId: string): number | void; - /** - * Calculates the difference between current time and time when function was queued. - * Note: It is possible to have 0 as the queue time if the current time and the queued time was the same. - * - * @param {number} preQueueTime - * @param {number} currentTime - * @returns {number} - */ - calculateQueuedTime(preQueueTime: number, currentTime: number): number; - /** - * Adds queue measurement time to QueueMeasurements array for given correlation ID. - * - * @param {PerformanceEvents} eventName - * @param {?string} correlationId - * @param {?number} queueTime - * @param {?boolean} manuallyCompleted - indicator for manually completed queue measurements - * @returns - */ - addQueueMeasurement(eventName: string, correlationId?: string, queueTime?: number, manuallyCompleted?: boolean): void; - /** - * Starts measuring performance for a given operation. Returns a function that should be used to end the measurement. - * - * @param {PerformanceEvents} measureName - * @param {?string} [correlationId] - * @returns {InProgressPerformanceEvent} - */ - startMeasurement(measureName: string, correlationId?: string): InProgressPerformanceEvent; - /** - * Stops measuring the performance for an operation. Should only be called directly by PerformanceClient classes, - * as consumers should instead use the function returned by startMeasurement. - * Adds a new field named as "[event name]DurationMs" for sub-measurements, completes and emits an event - * otherwise. - * - * @param {PerformanceEvent} event - * @param {unknown} error - * @returns {(PerformanceEvent | null)} - */ - endMeasurement(event: PerformanceEvent, error?: unknown): PerformanceEvent | null; - /** - * Saves extra information to be emitted when the measurements are flushed - * @param fields - * @param correlationId - */ - addFields(fields: { - [key: string]: {} | undefined; - }, correlationId: string): void; - /** - * Increment counters to be emitted when the measurements are flushed - * @param fields {string[]} - * @param correlationId {string} correlation identifier - */ - incrementFields(fields: { - [key: string]: number | undefined; - }, correlationId: string): void; - /** - * Upserts event into event cache. - * First key is the correlation id, second key is the event id. - * Allows for events to be grouped by correlation id, - * and to easily allow for properties on them to be updated. - * - * @private - * @param {PerformanceEvent} event - */ - protected cacheEventByCorrelationId(event: PerformanceEvent): void; - private getQueueInfo; - /** - * Removes measurements and aux data for a given correlation id. - * - * @param {string} correlationId - */ - discardMeasurements(correlationId: string): void; - /** - * Registers a callback function to receive performance events. - * - * @param {PerformanceCallbackFunction} callback - * @returns {string} - */ - addPerformanceCallback(callback: PerformanceCallbackFunction): string; - /** - * Removes a callback registered with addPerformanceCallback. - * - * @param {string} callbackId - * @returns {boolean} - */ - removePerformanceCallback(callbackId: string): boolean; - /** - * Emits events to all registered callbacks. - * - * @param {PerformanceEvent[]} events - * @param {?string} [correlationId] - */ - emitEvents(events: PerformanceEvent[], correlationId: string): void; - /** - * Enforce truncation of integral fields in performance event. - * @param {PerformanceEvent} event performance event to update. - */ - private truncateIntegralFields; - /** - * Returns event duration in milliseconds - * @param startTimeMs {number} - * @returns {number} - */ - private getDurationMs; -} -//# sourceMappingURL=PerformanceClient.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/telemetry/performance/PerformanceClient.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/telemetry/performance/PerformanceClient.d.ts.map deleted file mode 100644 index 150d662..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/telemetry/performance/PerformanceClient.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"PerformanceClient.d.ts","sourceRoot":"","sources":["../../../src/telemetry/performance/PerformanceClient.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAC3E,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,EACH,0BAA0B,EAC1B,kBAAkB,EAClB,2BAA2B,EAC3B,gBAAgB,EACnB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAEH,gBAAgB,EAEhB,uBAAuB,EACvB,iBAAiB,EACjB,8BAA8B,EAEjC,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAOvE,MAAM,WAAW,aAAa;IAC1B,IAAI,EAAE,iBAAiB,CAAC;IACxB,IAAI,EAAE,MAAM,CAAC;CAChB;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CACxB,KAAK,EAAE,gBAAgB,EACvB,aAAa,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,EAClC,KAAK,CAAC,EA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ACH,gBAAgB,CACZ,WAAW,EAAE,MAAM,EACnB,aAAa,CAAC,EAAE,MAAM,GACvB,0BAA0B;IAsE7B;;;;;;;;;OASG;IACH,cAAc,CACV,KAAK,EAAE,gBAAgB,EACvB,KAAK,CAAC,EAAE,OAAO,GAChB,gBAAgB,GAAG,IAAI;IA6F1B;;;;OAIG;IACH,SAAS,CACL,MAAM,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,EAAE,GAAG,SAAS,CAAA;KAAE,EACzC,aAAa,EAAE,MAAM,GACtB,IAAI;IAgBP;;;;OAIG;IACH,eAAe,CACX,MAAM,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAA;KAAE,EAC7C,aAAa,EAAE,MAAM,GACtB,IAAI;IAoBP;;;;;;;;OAQG;IACH,SAAS,CAAC,yBAAyB,CAAC,KAAK,EAAE,gBAAgB,GAAG,IAAI;IAuBlE,OAAO,CAAC,YAAY;IA6BpB;;;;OAIG;IACH,mBAAmB,CAAC,aAAa,EAAE,MAAM,GAAG,IAAI;IA0BhD;;;;;OAKG;IACH,sBAAsB,CAAC,QAAQ,EAAE,2BAA2B,GAAG,MAAM;IAmBrE;;;;;OAKG;IACH,yBAAyB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO;IAgBtD;;;;;OAKG;IACH,UAAU,CAAC,MAAM,EAAE,gBAAgB,EAAE,EAAE,aAAa,EAAE,MAAM,GAAG,IAAI;IAiBnE;;;OAGG;IACH,OAAO,CAAC,sBAAsB;IAQ9B;;;;OAIG;IACH,OAAO,CAAC,aAAa;CAKxB"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/telemetry/performance/PerformanceClient.mjs b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/telemetry/performance/PerformanceClient.mjs deleted file mode 100644 index fe89dec..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/telemetry/performance/PerformanceClient.mjs +++ /dev/null @@ -1,618 +0,0 @@ -/*! @azure/msal-common v14.16.1 2025-08-05 */ -'use strict'; -import { IntFields, PerformanceEventAbbreviations, PerformanceEventStatus } from './PerformanceEvent.mjs'; -import { StubPerformanceMeasurement } from './StubPerformanceClient.mjs'; -import { AuthError } from '../../error/AuthError.mjs'; -import { CacheError } from '../../error/CacheError.mjs'; -import { ServerError } from '../../error/ServerError.mjs'; -import { InteractionRequiredAuthError } from '../../error/InteractionRequiredAuthError.mjs'; - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * Starts context by adding payload to the stack - * @param event {PerformanceEvent} - * @param abbreviations {Map} event name abbreviations - * @param stack {?PerformanceEventStackedContext[]} stack - */ -function startContext(event, abbreviations, stack) { - if (!stack) { - return; - } - stack.push({ - name: abbreviations.get(event.name) || event.name, - }); -} -/** - * Ends context by removing payload from the stack and returning parent or self, if stack is empty, payload - * - * @param event {PerformanceEvent} - * @param abbreviations {Map} event name abbreviations - * @param stack {?PerformanceEventStackedContext[]} stack - * @param error {?unknown} error - */ -function endContext(event, abbreviations, stack, error) { - if (!stack?.length) { - return; - } - const peek = (stack) => { - return stack.length ? stack[stack.length - 1] : undefined; - }; - const abbrEventName = abbreviations.get(event.name) || event.name; - const top = peek(stack); - if (top?.name !== abbrEventName) { - return; - } - const current = stack?.pop(); - if (!current) { - return; - } - const errorCode = error instanceof AuthError - ? error.errorCode - : error instanceof Error - ? error.name - : undefined; - const subErr = error instanceof AuthError ? error.subError : undefined; - if (errorCode && current.childErr !== errorCode) { - current.err = errorCode; - if (subErr) { - current.subErr = subErr; - } - } - delete current.name; - delete current.childErr; - const context = { - ...current, - dur: event.durationMs, - }; - if (!event.success) { - context.fail = 1; - } - const parent = peek(stack); - if (!parent) { - return { [abbrEventName]: context }; - } - if (errorCode) { - parent.childErr = errorCode; - } - let childName; - if (!parent[abbrEventName]) { - childName = abbrEventName; - } - else { - const siblings = Object.keys(parent).filter((key) => key.startsWith(abbrEventName)).length; - childName = `${abbrEventName}_${siblings + 1}`; - } - parent[childName] = context; - return parent; -} -/** - * Adds error name and stack trace to the telemetry event - * @param error {Error} - * @param logger {Logger} - * @param event {PerformanceEvent} - * @param stackMaxSize {number} max error stack size to capture - */ -function addError(error, logger, event, stackMaxSize = 5) { - if (!(error instanceof Error)) { - logger.trace("PerformanceClient.addErrorStack: Input error is not instance of Error", event.correlationId); - return; - } - else if (error instanceof AuthError) { - event.errorCode = error.errorCode; - event.subErrorCode = error.subError; - if (error instanceof ServerError || - error instanceof InteractionRequiredAuthError) { - event.serverErrorNo = error.errorNo; - } - return; - } - else if (error instanceof CacheError) { - event.errorCode = error.errorCode; - return; - } - else if (event.errorStack?.length) { - logger.trace("PerformanceClient.addErrorStack: Stack already exist", event.correlationId); - return; - } - else if (!error.stack?.length) { - logger.trace("PerformanceClient.addErrorStack: Input stack is empty", event.correlationId); - return; - } - if (error.stack) { - event.errorStack = compactStack(error.stack, stackMaxSize); - } - event.errorName = error.name; -} -/** - * Compacts error stack into array by fetching N first entries - * @param stack {string} error stack - * @param stackMaxSize {number} max error stack size to capture - * @returns {string[]} - */ -function compactStack(stack, stackMaxSize) { - if (stackMaxSize < 0) { - return []; - } - const stackArr = stack.split("\n") || []; - const res = []; - // Check for a handful of known, common runtime errors and log them (with redaction where applicable). - const firstLine = stackArr[0]; - if (firstLine.startsWith("TypeError: Cannot read property") || - firstLine.startsWith("TypeError: Cannot read properties of") || - firstLine.startsWith("TypeError: Cannot set property") || - firstLine.startsWith("TypeError: Cannot set properties of") || - firstLine.endsWith("is not a function")) { - // These types of errors are not at risk of leaking PII. They will indicate unavailable APIs - res.push(compactStackLine(firstLine)); - } - else if (firstLine.startsWith("SyntaxError") || - firstLine.startsWith("TypeError")) { - // Prevent unintentional leaking of arbitrary info by redacting contents between both single and double quotes - res.push(compactStackLine( - // Example: SyntaxError: Unexpected token 'e', "test" is not valid JSON -> SyntaxError: Unexpected token , is not valid JSON - firstLine.replace(/['].*[']|["].*["]/g, ""))); - } - // Get top N stack lines - for (let ix = 1; ix < stackArr.length; ix++) { - if (res.length >= stackMaxSize) { - break; - } - const line = stackArr[ix]; - res.push(compactStackLine(line)); - } - return res; -} -/** - * Compacts error stack line by shortening file path - * Example: https://localhost/msal-common/src/authority/Authority.js:100:1 -> Authority.js:100:1 - * @param line {string} stack line - * @returns {string} - */ -function compactStackLine(line) { - const filePathIx = line.lastIndexOf(" ") + 1; - if (filePathIx < 1) { - return line; - } - const filePath = line.substring(filePathIx); - let fileNameIx = filePath.lastIndexOf("/"); - fileNameIx = fileNameIx < 0 ? filePath.lastIndexOf("\\") : fileNameIx; - if (fileNameIx >= 0) { - return (line.substring(0, filePathIx) + - "(" + - filePath.substring(fileNameIx + 1) + - (filePath.charAt(filePath.length - 1) === ")" ? "" : ")")).trimStart(); - } - return line.trimStart(); -} -class PerformanceClient { - /** - * Creates an instance of PerformanceClient, - * an abstract class containing core performance telemetry logic. - * - * @constructor - * @param {string} clientId Client ID of the application - * @param {string} authority Authority used by the application - * @param {Logger} logger Logger used by the application - * @param {string} libraryName Name of the library - * @param {string} libraryVersion Version of the library - * @param {ApplicationTelemetry} applicationTelemetry application name and version - * @param {Set} intFields integer fields to be truncated - * @param {Map} abbreviations event name abbreviations - */ - constructor(clientId, authority, logger, libraryName, libraryVersion, applicationTelemetry, intFields, abbreviations) { - this.authority = authority; - this.libraryName = libraryName; - this.libraryVersion = libraryVersion; - this.applicationTelemetry = applicationTelemetry; - this.clientId = clientId; - this.logger = logger; - this.callbacks = new Map(); - this.eventsByCorrelationId = new Map(); - this.eventStack = new Map(); - this.queueMeasurements = new Map(); - this.preQueueTimeByCorrelationId = new Map(); - this.intFields = intFields || new Set(); - for (const item of IntFields) { - this.intFields.add(item); - } - this.abbreviations = abbreviations || new Map(); - for (const [key, value] of PerformanceEventAbbreviations) { - this.abbreviations.set(key, value); - } - } - /** - * Starts and returns an platform-specific implementation of IPerformanceMeasurement. - * Note: this function can be changed to abstract at the next major version bump. - * - * @param {string} measureName - * @param {string} correlationId - * @returns {IPerformanceMeasurement} - * @deprecated This method will be removed in the next major version - */ - startPerformanceMeasurement(measureName, // eslint-disable-line @typescript-eslint/no-unused-vars - correlationId // eslint-disable-line @typescript-eslint/no-unused-vars - ) { - return {}; - } - /** - * Gets map of pre-queue times by correlation Id - * - * @param {PerformanceEvents} eventName - * @param {string} correlationId - * @returns {number} - */ - getPreQueueTime(eventName, correlationId) { - const preQueueEvent = this.preQueueTimeByCorrelationId.get(correlationId); - if (!preQueueEvent) { - this.logger.trace(`PerformanceClient.getPreQueueTime: no pre-queue times found for correlationId: ${correlationId}, unable to add queue measurement`); - return; - } - else if (preQueueEvent.name !== eventName) { - this.logger.trace(`PerformanceClient.getPreQueueTime: no pre-queue time found for ${eventName}, unable to add queue measurement`); - return; - } - return preQueueEvent.time; - } - /** - * Calculates the difference between current time and time when function was queued. - * Note: It is possible to have 0 as the queue time if the current time and the queued time was the same. - * - * @param {number} preQueueTime - * @param {number} currentTime - * @returns {number} - */ - calculateQueuedTime(preQueueTime, currentTime) { - if (preQueueTime < 1) { - this.logger.trace(`PerformanceClient: preQueueTime should be a positive integer and not ${preQueueTime}`); - return 0; - } - if (currentTime < 1) { - this.logger.trace(`PerformanceClient: currentTime should be a positive integer and not ${currentTime}`); - return 0; - } - if (currentTime < preQueueTime) { - this.logger.trace("PerformanceClient: currentTime is less than preQueueTime, check how time is being retrieved"); - return 0; - } - return currentTime - preQueueTime; - } - /** - * Adds queue measurement time to QueueMeasurements array for given correlation ID. - * - * @param {PerformanceEvents} eventName - * @param {?string} correlationId - * @param {?number} queueTime - * @param {?boolean} manuallyCompleted - indicator for manually completed queue measurements - * @returns - */ - addQueueMeasurement(eventName, correlationId, queueTime, manuallyCompleted) { - if (!correlationId) { - this.logger.trace(`PerformanceClient.addQueueMeasurement: correlationId not provided for ${eventName}, cannot add queue measurement`); - return; - } - if (queueTime === 0) { - // Possible for there to be no queue time after calculation - this.logger.trace(`PerformanceClient.addQueueMeasurement: queue time provided for ${eventName} is ${queueTime}`); - } - else if (!queueTime) { - this.logger.trace(`PerformanceClient.addQueueMeasurement: no queue time provided for ${eventName}`); - return; - } - const queueMeasurement = { - eventName, - // Always default queue time to 0 for manually completed (improperly instrumented) - queueTime: manuallyCompleted ? 0 : queueTime, - manuallyCompleted, - }; - // Adds to existing correlation Id if present in queueMeasurements - const existingMeasurements = this.queueMeasurements.get(correlationId); - if (existingMeasurements) { - existingMeasurements.push(queueMeasurement); - this.queueMeasurements.set(correlationId, existingMeasurements); - } - else { - // Sets new correlation Id if not present in queueMeasurements - this.logger.trace(`PerformanceClient.addQueueMeasurement: adding correlationId ${correlationId} to queue measurements`); - const measurementArray = [queueMeasurement]; - this.queueMeasurements.set(correlationId, measurementArray); - } - // Delete processed pre-queue event. - this.preQueueTimeByCorrelationId.delete(correlationId); - } - /** - * Starts measuring performance for a given operation. Returns a function that should be used to end the measurement. - * - * @param {PerformanceEvents} measureName - * @param {?string} [correlationId] - * @returns {InProgressPerformanceEvent} - */ - startMeasurement(measureName, correlationId) { - // Generate a placeholder correlation if the request does not provide one - const eventCorrelationId = correlationId || this.generateId(); - if (!correlationId) { - this.logger.info(`PerformanceClient: No correlation id provided for ${measureName}, generating`, eventCorrelationId); - } - this.logger.trace(`PerformanceClient: Performance measurement started for ${measureName}`, eventCorrelationId); - const inProgressEvent = { - eventId: this.generateId(), - status: PerformanceEventStatus.InProgress, - authority: this.authority, - libraryName: this.libraryName, - libraryVersion: this.libraryVersion, - clientId: this.clientId, - name: measureName, - startTimeMs: Date.now(), - correlationId: eventCorrelationId, - appName: this.applicationTelemetry?.appName, - appVersion: this.applicationTelemetry?.appVersion, - }; - // Store in progress events so they can be discarded if not ended properly - this.cacheEventByCorrelationId(inProgressEvent); - startContext(inProgressEvent, this.abbreviations, this.eventStack.get(eventCorrelationId)); - // Return the event and functions the caller can use to properly end/flush the measurement - return { - end: (event, error) => { - return this.endMeasurement({ - // Initial set of event properties - ...inProgressEvent, - // Properties set when event ends - ...event, - }, error); - }, - discard: () => { - return this.discardMeasurements(inProgressEvent.correlationId); - }, - add: (fields) => { - return this.addFields(fields, inProgressEvent.correlationId); - }, - increment: (fields) => { - return this.incrementFields(fields, inProgressEvent.correlationId); - }, - event: inProgressEvent, - measurement: new StubPerformanceMeasurement(), - }; - } - /** - * Stops measuring the performance for an operation. Should only be called directly by PerformanceClient classes, - * as consumers should instead use the function returned by startMeasurement. - * Adds a new field named as "[event name]DurationMs" for sub-measurements, completes and emits an event - * otherwise. - * - * @param {PerformanceEvent} event - * @param {unknown} error - * @returns {(PerformanceEvent | null)} - */ - endMeasurement(event, error) { - const rootEvent = this.eventsByCorrelationId.get(event.correlationId); - if (!rootEvent) { - this.logger.trace(`PerformanceClient: Measurement not found for ${event.eventId}`, event.correlationId); - return null; - } - const isRoot = event.eventId === rootEvent.eventId; - let queueInfo = { - totalQueueTime: 0, - totalQueueCount: 0, - manuallyCompletedCount: 0, - }; - event.durationMs = Math.round(event.durationMs || this.getDurationMs(event.startTimeMs)); - const context = JSON.stringify(endContext(event, this.abbreviations, this.eventStack.get(rootEvent.correlationId), error)); - if (isRoot) { - queueInfo = this.getQueueInfo(event.correlationId); - this.discardMeasurements(rootEvent.correlationId); - } - else { - rootEvent.incompleteSubMeasurements?.delete(event.eventId); - } - this.logger.trace(`PerformanceClient: Performance measurement ended for ${event.name}: ${event.durationMs} ms`, event.correlationId); - if (error) { - addError(error, this.logger, rootEvent); - } - // Add sub-measurement attribute to root event. - if (!isRoot) { - rootEvent[event.name + "DurationMs"] = Math.floor(event.durationMs); - return { ...rootEvent }; - } - if (isRoot && - !error && - (rootEvent.errorCode || rootEvent.subErrorCode)) { - this.logger.trace(`PerformanceClient: Remove error and sub-error codes for root event ${event.name} as intermediate error was successfully handled`, event.correlationId); - rootEvent.errorCode = undefined; - rootEvent.subErrorCode = undefined; - } - let finalEvent = { ...rootEvent, ...event }; - let incompleteSubsCount = 0; - // Incomplete sub-measurements are discarded. They are likely an instrumentation bug that should be fixed. - finalEvent.incompleteSubMeasurements?.forEach((subMeasurement) => { - this.logger.trace(`PerformanceClient: Incomplete submeasurement ${subMeasurement.name} found for ${event.name}`, finalEvent.correlationId); - incompleteSubsCount++; - }); - finalEvent.incompleteSubMeasurements = undefined; - finalEvent = { - ...finalEvent, - queuedTimeMs: queueInfo.totalQueueTime, - queuedCount: queueInfo.totalQueueCount, - queuedManuallyCompletedCount: queueInfo.manuallyCompletedCount, - status: PerformanceEventStatus.Completed, - incompleteSubsCount, - context, - }; - this.truncateIntegralFields(finalEvent); - this.emitEvents([finalEvent], event.correlationId); - return finalEvent; - } - /** - * Saves extra information to be emitted when the measurements are flushed - * @param fields - * @param correlationId - */ - addFields(fields, correlationId) { - this.logger.trace("PerformanceClient: Updating static fields"); - const event = this.eventsByCorrelationId.get(correlationId); - if (event) { - this.eventsByCorrelationId.set(correlationId, { - ...event, - ...fields, - }); - } - else { - this.logger.trace("PerformanceClient: Event not found for", correlationId); - } - } - /** - * Increment counters to be emitted when the measurements are flushed - * @param fields {string[]} - * @param correlationId {string} correlation identifier - */ - incrementFields(fields, correlationId) { - this.logger.trace("PerformanceClient: Updating counters"); - const event = this.eventsByCorrelationId.get(correlationId); - if (event) { - for (const counter in fields) { - if (!event.hasOwnProperty(counter)) { - event[counter] = 0; - } - else if (isNaN(Number(event[counter]))) { - return; - } - event[counter] += fields[counter]; - } - } - else { - this.logger.trace("PerformanceClient: Event not found for", correlationId); - } - } - /** - * Upserts event into event cache. - * First key is the correlation id, second key is the event id. - * Allows for events to be grouped by correlation id, - * and to easily allow for properties on them to be updated. - * - * @private - * @param {PerformanceEvent} event - */ - cacheEventByCorrelationId(event) { - const rootEvent = this.eventsByCorrelationId.get(event.correlationId); - if (rootEvent) { - this.logger.trace(`PerformanceClient: Performance measurement for ${event.name} added/updated`, event.correlationId); - rootEvent.incompleteSubMeasurements = - rootEvent.incompleteSubMeasurements || new Map(); - rootEvent.incompleteSubMeasurements.set(event.eventId, { - name: event.name, - startTimeMs: event.startTimeMs, - }); - } - else { - this.logger.trace(`PerformanceClient: Performance measurement for ${event.name} started`, event.correlationId); - this.eventsByCorrelationId.set(event.correlationId, { ...event }); - this.eventStack.set(event.correlationId, []); - } - } - getQueueInfo(correlationId) { - const queueMeasurementForCorrelationId = this.queueMeasurements.get(correlationId); - if (!queueMeasurementForCorrelationId) { - this.logger.trace(`PerformanceClient: no queue measurements found for for correlationId: ${correlationId}`); - } - let totalQueueTime = 0; - let totalQueueCount = 0; - let manuallyCompletedCount = 0; - queueMeasurementForCorrelationId?.forEach((measurement) => { - totalQueueTime += measurement.queueTime; - totalQueueCount++; - manuallyCompletedCount += measurement.manuallyCompleted ? 1 : 0; - }); - return { - totalQueueTime, - totalQueueCount, - manuallyCompletedCount, - }; - } - /** - * Removes measurements and aux data for a given correlation id. - * - * @param {string} correlationId - */ - discardMeasurements(correlationId) { - this.logger.trace("PerformanceClient: Performance measurements discarded", correlationId); - this.eventsByCorrelationId.delete(correlationId); - this.logger.trace("PerformanceClient: QueueMeasurements discarded", correlationId); - this.queueMeasurements.delete(correlationId); - this.logger.trace("PerformanceClient: Pre-queue times discarded", correlationId); - this.preQueueTimeByCorrelationId.delete(correlationId); - this.logger.trace("PerformanceClient: Event stack discarded", correlationId); - this.eventStack.delete(correlationId); - } - /** - * Registers a callback function to receive performance events. - * - * @param {PerformanceCallbackFunction} callback - * @returns {string} - */ - addPerformanceCallback(callback) { - for (const [id, cb] of this.callbacks) { - if (cb.toString() === callback.toString()) { - this.logger.warning(`PerformanceClient: Performance callback is already registered with id: ${id}`); - return id; - } - } - const callbackId = this.generateId(); - this.callbacks.set(callbackId, callback); - this.logger.verbose(`PerformanceClient: Performance callback registered with id: ${callbackId}`); - return callbackId; - } - /** - * Removes a callback registered with addPerformanceCallback. - * - * @param {string} callbackId - * @returns {boolean} - */ - removePerformanceCallback(callbackId) { - const result = this.callbacks.delete(callbackId); - if (result) { - this.logger.verbose(`PerformanceClient: Performance callback ${callbackId} removed.`); - } - else { - this.logger.verbose(`PerformanceClient: Performance callback ${callbackId} not removed.`); - } - return result; - } - /** - * Emits events to all registered callbacks. - * - * @param {PerformanceEvent[]} events - * @param {?string} [correlationId] - */ - emitEvents(events, correlationId) { - this.logger.verbose("PerformanceClient: Emitting performance events", correlationId); - this.callbacks.forEach((callback, callbackId) => { - this.logger.trace(`PerformanceClient: Emitting event to callback ${callbackId}`, correlationId); - callback.apply(null, [events]); - }); - } - /** - * Enforce truncation of integral fields in performance event. - * @param {PerformanceEvent} event performance event to update. - */ - truncateIntegralFields(event) { - this.intFields.forEach((key) => { - if (key in event && typeof event[key] === "number") { - event[key] = Math.floor(event[key]); - } - }); - } - /** - * Returns event duration in milliseconds - * @param startTimeMs {number} - * @returns {number} - */ - getDurationMs(startTimeMs) { - const durationMs = Date.now() - startTimeMs; - // Handle clock skew - return durationMs < 0 ? durationMs : 0; - } -} - -export { PerformanceClient, addError, compactStack, compactStackLine, endContext, startContext }; -//# sourceMappingURL=PerformanceClient.mjs.map diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/telemetry/performance/PerformanceClient.mjs.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/telemetry/performance/PerformanceClient.mjs.map deleted file mode 100644 index 797b4ac..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/telemetry/performance/PerformanceClient.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"PerformanceClient.mjs","sources":["../../../src/telemetry/performance/PerformanceClient.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;AAAA;;;AAGG;AA+BH;;;;;AAKG;SACa,YAAY,CACxB,KAAuB,EACvB,aAAkC,EAClC,KAAwC,EAAA;IAExC,IAAI,CAAC,KAAK,EAAE;QACR,OAAO;AACV,KAAA;IAED,KAAK,CAAC,IAAI,CAAC;AACP,QAAA,IAAI,EAAE,aAAa,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,KAAK,CAAC,IAAI;AACpD,KAAA,CA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UAAU,CAAE,CAAA,EAC7D,aAAa,CAChB,CAAC;YACF,QAAQ,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC;AACnC,SAAC,CACJ,CAAC;KACL;AAED;;;AAGG;AACK,IAAA,sBAAsB,CAAC,KAAuB,EAAA;QAClD,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,GAAG,KAAI;YAC3B,IAAI,GAAG,IAAI,KAAK,IAAI,OAAO,KAAK,CAAC,GAAG,CAAC,KAAK,QAAQ,EAAE;AAChD,gBAAA,KAAK,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC;AACvC,aAAA;AACL,SAAC,CAAC,CAAC;KACN;AAED;;;;AAIG;AACK,IAAA,aAAa,CAAC,WAAmB,EAAA;QACrC,MAAM,UAAU,GAAG,IAAI,CAAC,GAAG,EAAE,GAAG,WAAW,CAAC;;QAE5C,OAAO,UAAU,GAAG,CAAC,GAAG,UAAU,GAAG,CAAC,CAAC;KAC1C;AACJ;;;;"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/telemetry/performance/PerformanceEvent.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/telemetry/performance/PerformanceEvent.d.ts deleted file mode 100644 index e95dbee..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/telemetry/performance/PerformanceEvent.d.ts +++ /dev/null @@ -1,521 +0,0 @@ -/** - * Enumeration of operations that are instrumented by have their performance measured by the PerformanceClient. - * - * @export - * @enum {number} - */ -export declare const PerformanceEvents: { - /** - * acquireTokenByCode API (msal-browser and msal-node). - * Used to acquire tokens by trading an authorization code against the token endpoint. - */ - readonly AcquireTokenByCode: "acquireTokenByCode"; - /** - * acquireTokenByRefreshToken API (msal-browser and msal-node). - * Used to renew an access token using a refresh token against the token endpoint. - */ - readonly AcquireTokenByRefreshToken: "acquireTokenByRefreshToken"; - /** - * acquireTokenSilent API (msal-browser and msal-node). - * Used to silently acquire a new access token (from the cache or the network). - */ - readonly AcquireTokenSilent: "acquireTokenSilent"; - /** - * acquireTokenSilentAsync (msal-browser). - * Internal API for acquireTokenSilent. - */ - readonly AcquireTokenSilentAsync: "acquireTokenSilentAsync"; - /** - * acquireTokenPopup (msal-browser). - * Used to acquire a new access token interactively through pop ups - */ - readonly AcquireTokenPopup: "acquireTokenPopup"; - /** - * acquireTokenPreRedirect (msal-browser). - * First part of the redirect flow. - * Used to acquire a new access token interactively through redirects. - */ - readonly AcquireTokenPreRedirect: "acquireTokenPreRedirect"; - /** - * acquireTokenRedirect (msal-browser). - * Second part of the redirect flow. - * Used to acquire a new access token interactively through redirects. - */ - readonly AcquireTokenRedirect: "acquireTokenRedirect"; - /** - * getPublicKeyThumbprint API in CryptoOpts class (msal-browser). - * Used to generate a public/private keypair and generate a public key thumbprint for pop requests. - */ - readonly CryptoOptsGetPublicKeyThumbprint: "cryptoOptsGetPublicKeyThumbprint"; - /** - * signJwt API in CryptoOpts class (msal-browser). - * Used to signed a pop token. - */ - readonly CryptoOptsSignJwt: "cryptoOptsSignJwt"; - /** - * acquireToken API in the SilentCacheClient class (msal-browser). - * Used to read access tokens from the cache. - */ - readonly SilentCacheClientAcquireToken: "silentCacheClientAcquireToken"; - /** - * acquireToken API in the SilentIframeClient class (msal-browser). - * Used to acquire a new set of tokens from the authorize endpoint in a hidden iframe. - */ - readonly SilentIframeClientAcquireToken: "silentIframeClientAcquireToken"; - readonly AwaitConcurrentIframe: "awaitConcurrentIframe"; - /** - * acquireToken API in SilentRereshClient (msal-browser). - * Used to acquire a new set of tokens from the token endpoint using a refresh token. - */ - readonly SilentRefreshClientAcquireToken: "silentRefreshClientAcquireToken"; - /** - * ssoSilent API (msal-browser). - * Used to silently acquire an authorization code and set of tokens using a hidden iframe. - */ - readonly SsoSilent: "ssoSilent"; - /** - * getDiscoveredAuthority API in StandardInteractionClient class (msal-browser). - * Used to load authority metadata for a request. - */ - readonly StandardInteractionClientGetDiscoveredAuthority: "standardInteractionClientGetDiscoveredAuthority"; - /** - * acquireToken APIs in msal-browser. - * Used to make an /authorize endpoint call with native brokering enabled. - */ - readonly FetchAccountIdWithNativeBroker: "fetchAccountIdWithNativeBroker"; - /** - * acquireToken API in NativeInteractionClient class (msal-browser). - * Used to acquire a token from Native component when native brokering is enabled. - */ - readonly NativeInteractionClientAcquireToken: "nativeInteractionClientAcquireToken"; - /** - * Time spent creating default headers for requests to token endpoint - */ - readonly BaseClientCreateTokenRequestHeaders: "baseClientCreateTokenRequestHeaders"; - /** - * Time spent sending/waiting for the response of a request to the token endpoint - */ - readonly NetworkClientSendPostRequestAsync: "networkClientSendPostRequestAsync"; - readonly RefreshTokenClientExecutePostToTokenEndpoint: "refreshTokenClientExecutePostToTokenEndpoint"; - readonly AuthorizationCodeClientExecutePostToTokenEndpoint: "authorizationCodeClientExecutePostToTokenEndpoint"; - /** - * Used to measure the time taken for completing embedded-broker handshake (PW-Broker). - */ - readonly BrokerHandhshake: "brokerHandshake"; - /** - * acquireTokenByRefreshToken API in BrokerClientApplication (PW-Broker) . - */ - readonly AcquireTokenByRefreshTokenInBroker: "acquireTokenByRefreshTokenInBroker"; - /** - * Time taken for token acquisition by broker - */ - readonly AcquireTokenByBroker: "acquireTokenByBroker"; - /** - * Time spent on the network for refresh token acquisition - */ - readonly RefreshTokenClientExecuteTokenRequest: "refreshTokenClientExecuteTokenRequest"; - /** - * Time taken for acquiring refresh token , records RT size - */ - readonly RefreshTokenClientAcquireToken: "refreshTokenClientAcquireToken"; - /** - * Time taken for acquiring cached refresh token - */ - readonly RefreshTokenClientAcquireTokenWithCachedRefreshToken: "refreshTokenClientAcquireTokenWithCachedRefreshToken"; - /** - * acquireTokenByRefreshToken API in RefreshTokenClient (msal-common). - */ - readonly RefreshTokenClientAcquireTokenByRefreshToken: "refreshTokenClientAcquireTokenByRefreshToken"; - /** - * Helper function to create token request body in RefreshTokenClient (msal-common). - */ - readonly RefreshTokenClientCreateTokenRequestBody: "refreshTokenClientCreateTokenRequestBody"; - /** - * acquireTokenFromCache (msal-browser). - * Internal API for acquiring token from cache - */ - readonly AcquireTokenFromCache: "acquireTokenFromCache"; - readonly SilentFlowClientAcquireCachedToken: "silentFlowClientAcquireCachedToken"; - readonly SilentFlowClientGenerateResultFromCacheRecord: "silentFlowClientGenerateResultFromCacheRecord"; - /** - * acquireTokenBySilentIframe (msal-browser). - * Internal API for acquiring token by silent Iframe - */ - readonly AcquireTokenBySilentIframe: "acquireTokenBySilentIframe"; - /** - * Internal API for initializing base request in BaseInteractionClient (msal-browser) - */ - readonly InitializeBaseRequest: "initializeBaseRequest"; - /** - * Internal API for initializing silent request in SilentCacheClient (msal-browser) - */ - readonly InitializeSilentRequest: "initializeSilentRequest"; - readonly InitializeClientApplication: "initializeClientApplication"; - /** - * Helper function in SilentIframeClient class (msal-browser). - */ - readonly SilentIframeClientTokenHelper: "silentIframeClientTokenHelper"; - /** - * SilentHandler - */ - readonly SilentHandlerInitiateAuthRequest: "silentHandlerInitiateAuthRequest"; - readonly SilentHandlerMonitorIframeForHash: "silentHandlerMonitorIframeForHash"; - readonly SilentHandlerLoadFrame: "silentHandlerLoadFrame"; - readonly SilentHandlerLoadFrameSync: "silentHandlerLoadFrameSync"; - /** - * Helper functions in StandardInteractionClient class (msal-browser) - */ - readonly StandardInteractionClientCreateAuthCodeClient: "standardInteractionClientCreateAuthCodeClient"; - readonly StandardInteractionClientGetClientConfiguration: "standardInteractionClientGetClientConfiguration"; - readonly StandardInteractionClientInitializeAuthorizationRequest: "standardInteractionClientInitializeAuthorizationRequest"; - readonly StandardInteractionClientInitializeAuthorizationCodeRequest: "standardInteractionClientInitializeAuthorizationCodeRequest"; - /** - * getAuthCodeUrl API (msal-browser and msal-node). - */ - readonly GetAuthCodeUrl: "getAuthCodeUrl"; - /** - * Functions from InteractionHandler (msal-browser) - */ - readonly HandleCodeResponseFromServer: "handleCodeResponseFromServer"; - readonly HandleCodeResponse: "handleCodeResponse"; - readonly UpdateTokenEndpointAuthority: "updateTokenEndpointAuthority"; - /** - * APIs in Authorization Code Client (msal-common) - */ - readonly AuthClientAcquireToken: "authClientAcquireToken"; - readonly AuthClientExecuteTokenRequest: "authClientExecuteTokenRequest"; - readonly AuthClientCreateTokenRequestBody: "authClientCreateTokenRequestBody"; - readonly AuthClientCreateQueryString: "authClientCreateQueryString"; - /** - * Generate functions in PopTokenGenerator (msal-common) - */ - readonly PopTokenGenerateCnf: "popTokenGenerateCnf"; - readonly PopTokenGenerateKid: "popTokenGenerateKid"; - /** - * handleServerTokenResponse API in ResponseHandler (msal-common) - */ - readonly HandleServerTokenResponse: "handleServerTokenResponse"; - readonly DeserializeResponse: "deserializeResponse"; - /** - * Authority functions - */ - readonly AuthorityFactoryCreateDiscoveredInstance: "authorityFactoryCreateDiscoveredInstance"; - readonly AuthorityResolveEndpointsAsync: "authorityResolveEndpointsAsync"; - readonly AuthorityResolveEndpointsFromLocalSources: "authorityResolveEndpointsFromLocalSources"; - readonly AuthorityGetCloudDiscoveryMetadataFromNetwork: "authorityGetCloudDiscoveryMetadataFromNetwork"; - readonly AuthorityUpdateCloudDiscoveryMetadata: "authorityUpdateCloudDiscoveryMetadata"; - readonly AuthorityGetEndpointMetadataFromNetwork: "authorityGetEndpointMetadataFromNetwork"; - readonly AuthorityUpdateEndpointMetadata: "authorityUpdateEndpointMetadata"; - readonly AuthorityUpdateMetadataWithRegionalInformation: "authorityUpdateMetadataWithRegionalInformation"; - /** - * Region Discovery functions - */ - readonly RegionDiscoveryDetectRegion: "regionDiscoveryDetectRegion"; - readonly RegionDiscoveryGetRegionFromIMDS: "regionDiscoveryGetRegionFromIMDS"; - readonly RegionDiscoveryGetCurrentVersion: "regionDiscoveryGetCurrentVersion"; - readonly AcquireTokenByCodeAsync: "acquireTokenByCodeAsync"; - readonly GetEndpointMetadataFromNetwork: "getEndpointMetadataFromNetwork"; - readonly GetCloudDiscoveryMetadataFromNetworkMeasurement: "getCloudDiscoveryMetadataFromNetworkMeasurement"; - readonly HandleRedirectPromiseMeasurement: "handleRedirectPromise"; - readonly HandleNativeRedirectPromiseMeasurement: "handleNativeRedirectPromise"; - readonly UpdateCloudDiscoveryMetadataMeasurement: "updateCloudDiscoveryMetadataMeasurement"; - readonly UsernamePasswordClientAcquireToken: "usernamePasswordClientAcquireToken"; - readonly NativeMessageHandlerHandshake: "nativeMessageHandlerHandshake"; - readonly NativeGenerateAuthResult: "nativeGenerateAuthResult"; - readonly RemoveHiddenIframe: "removeHiddenIframe"; - /** - * Cache operations - */ - readonly ClearTokensAndKeysWithClaims: "clearTokensAndKeysWithClaims"; - readonly CacheManagerGetRefreshToken: "cacheManagerGetRefreshToken"; - /** - * Crypto Operations - */ - readonly GeneratePkceCodes: "generatePkceCodes"; - readonly GenerateCodeVerifier: "generateCodeVerifier"; - readonly GenerateCodeChallengeFromVerifier: "generateCodeChallengeFromVerifier"; - readonly Sha256Digest: "sha256Digest"; - readonly GetRandomValues: "getRandomValues"; -}; -export type PerformanceEvents = (typeof PerformanceEvents)[keyof typeof PerformanceEvents]; -export declare const PerformanceEventAbbreviations: ReadonlyMap; -/** - * State of the performance event. - * - * @export - * @enum {number} - */ -export declare const PerformanceEventStatus: { - readonly NotStarted: 0; - readonly InProgress: 1; - readonly Completed: 2; -}; -export type PerformanceEventStatus = (typeof PerformanceEventStatus)[keyof typeof PerformanceEventStatus]; -export type SubMeasurement = { - name: string; - startTimeMs: number; -}; -/** - * Performance measurement taken by the library, including metadata about the request and application. - * - * @export - * @typedef {PerformanceEvent} - */ -export type PerformanceEvent = { - /** - * Unique id for the event - * - * @type {string} - */ - eventId: string; - /** - * State of the perforance measure. - * - * @type {PerformanceEventStatus} - */ - status: PerformanceEventStatus; - /** - * Login authority used for the request - * - * @type {string} - */ - authority: string; - /** - * Client id for the application - * - * @type {string} - */ - clientId: string; - /** - * Correlation ID used for the request - * - * @type {string} - */ - correlationId: string; - /** - * End-to-end duration in milliseconds. - * @date 3/22/2022 - 3:40:05 PM - * - * @type {number} - */ - durationMs?: number; - /** - * Visibility of the page when the event completed. - * Read from: https://developer.mozilla.org/docs/Web/API/Page_Visibility_API - * - * @type {?(string | null)} - */ - endPageVisibility?: string | null; - /** - * Whether the result was retrieved from the cache. - * - * @type {(boolean | null)} - */ - fromCache?: boolean | null; - /** - * Event name (usually in the form of classNameFunctionName) - * - * @type {string} - */ - name: string; - /** - * Visibility of the page when the event completed. - * Read from: https://developer.mozilla.org/docs/Web/API/Page_Visibility_API - * - * @type {?(string | null)} - */ - startPageVisibility?: string | null; - /** - * Unix millisecond timestamp when the event was initiated. - * - * @type {number} - */ - startTimeMs: number; - /** - * Whether or the operation completed successfully. - * - * @type {(boolean | null)} - */ - success?: boolean | null; - /** - * Add specific error code in case of failure - * - * @type {string} - */ - errorCode?: string; - /** - * Add specific sub error code in case of failure - * - * @type {string} - */ - subErrorCode?: string; - /** - * Server error number - */ - serverErrorNo?: string; - /** - * Name of the library used for the operation. - * - * @type {string} - */ - libraryName: string; - /** - * Version of the library used for the operation. - * - * @type {string} - */ - libraryVersion: string; - /** - * Whether the response is from a native component (e.g., WAM) - * - * @type {?boolean} - */ - isNativeBroker?: boolean; - /** - * Request ID returned from the response - * - * @type {?string} - */ - requestId?: string; - /** - * Cache lookup policy - * - * @type {?number} - */ - cacheLookupPolicy?: number | undefined; - /** - * Cache Outcome - * @type {?number} - */ - cacheOutcome?: number; - /** - * Amount of time spent in the JS queue in milliseconds. - * - * @type {?number} - */ - queuedTimeMs?: number; - /** - * Sub-measurements for internal use. To be deleted before flushing. - */ - incompleteSubMeasurements?: Map; - visibilityChangeCount?: number; - incompleteSubsCount?: number; - /** - * CorrelationId of the in progress iframe request that was awaited - */ - awaitIframeCorrelationId?: string; - /** - * Amount of times queued in the JS event queue. - * - * @type {?number} - */ - queuedCount?: number; - /** - * Amount of manually completed queue events. - * - * @type {?number} - */ - queuedManuallyCompletedCount?: number; - /** - * Size of the id token - * - * @type {number} - */ - idTokenSize?: number; - /** - * - * Size of the access token - * - * @type {number} - */ - accessTokenSize?: number; - /** - * - * Size of the refresh token - * - * @type {number} - */ - refreshTokenSize?: number | undefined; - /** - * Application name as specified by the app. - * - * @type {?string} - */ - appName?: string; - /** - * Application version as specified by the app. - * - * @type {?string} - */ - appVersion?: string; - /** - * The following are fields that may be emitted in native broker scenarios - */ - extensionId?: string; - extensionVersion?: string; - matsBrokerVersion?: string; - matsAccountJoinOnStart?: string; - matsAccountJoinOnEnd?: string; - matsDeviceJoin?: string; - matsPromptBehavior?: string; - matsApiErrorCode?: number; - matsUiVisible?: boolean; - matsSilentCode?: number; - matsSilentBiSubCode?: number; - matsSilentMessage?: string; - matsSilentStatus?: number; - matsHttpStatus?: number; - matsHttpEventCount?: number; - /** - * Http POST metadata - */ - httpVerToken?: string; - httpStatus?: number; - contentTypeHeader?: string; - contentLengthHeader?: string; - /** - * Native broker fields - */ - allowNativeBroker?: boolean; - extensionInstalled?: boolean; - extensionHandshakeTimeoutMs?: number; - extensionHandshakeTimedOut?: boolean; - /** - * Nested App Auth Fields - */ - nestedAppAuthRequest?: boolean; - /** - * Multiple matched access/id/refresh tokens in the cache - */ - multiMatchedAT?: number; - multiMatchedID?: number; - multiMatchedRT?: number; - errorName?: string; - errorStack?: string[]; - context?: string; - cacheRtCount?: number; - cacheIdCount?: number; - cacheAtCount?: number; - scenarioId?: string; - accountType?: "AAD" | "MSA" | "B2C"; - /** - * Server error that triggers a request retry - * - * @type {string} - */ - retryError?: string; - embeddedClientId?: string; - embeddedRedirectUri?: string; -}; -export type PerformanceEventContext = { - dur?: number; - err?: string; - subErr?: string; - fail?: number; -}; -export type PerformanceEventStackedContext = PerformanceEventContext & { - name?: string; - childErr?: string; -}; -export declare const IntFields: ReadonlySet; -//# sourceMappingURL=PerformanceEvent.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/telemetry/performance/PerformanceEvent.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/telemetry/performance/PerformanceEvent.d.ts.map deleted file mode 100644 index 5b600c7..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/telemetry/performance/PerformanceEvent.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"PerformanceEvent.d.ts","sourceRoot":"","sources":["../../../src/telemetry/performance/PerformanceEvent.ts"],"names":[],"mappings":"AAKA;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB;IAC1B;;;OAGG;;IAGH;;;OAGG;;IAGH;;;OAGG;;IAGH;;;OAGG;;IAGH;;;OAGG;;IAGH;;;;OAIG;;IAGH;;;;OAIG;;IAGH;;;OAGG;;IAGH;;;OAGG;;IAGH;;;OAGG;;IAGH;;;OAGG;;;IAIH;;;OAGG;;IAGH;;;OAGG;;IAGH;;;OAGG;;IAIH;;;OAGG;;IAGH;;;OAGG;;IAEH;;OAEG;;IAEH;;OAEG;;;;IAMH;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;IAGH;;OAEG;;IAIH;;OAEG;;IAGH;;OAEG;;IAIH;;OAEG;;IAIH;;OAEG;;IAIH;;;OAGG;;;;IAMH;;;OAGG;;IAGH;;OAEG;;IAGH;;OAEG;;;IAKH;;OAEG;;IAGH;;OAEG;;;;;IAMH;;OAEG;;;;;IAUH;;OAEG;;IAGH;;OAEG;;;;IAKH;;OAEG;;;;;IAMH;;OAEG;;;IAIH;;OAEG;;;IAIH;;OAEG;;;;;;;;;IAgBH;;OAEG;;;;;;;;;;;;;;IAyBH;;OAEG;;;IAIH;;OAEG;;;;;;CAMG,CAAC;AACX,MAAM,MAAM,iBAAiB,GACzB,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,OAAO,iBAAiB,CAAC,CAAC;AAE/D,eAAO,MAAM,6BAA6B,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CA6NhE,CAAC;AAEP;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB;;;;CAIzB,CAAC;AACX,MAAM,M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EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,8BAA8B,GAAG,uBAAuB,GAAG;IACnE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,WAAW,CAAC,MAAM,CAaxC,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/telemetry/performance/PerformanceEvent.mjs b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/telemetry/performance/PerformanceEvent.mjs deleted file mode 100644 index 52e85e2..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/telemetry/performance/PerformanceEvent.mjs +++ /dev/null @@ -1,490 +0,0 @@ -/*! @azure/msal-common v14.16.1 2025-08-05 */ -'use strict'; -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * Enumeration of operations that are instrumented by have their performance measured by the PerformanceClient. - * - * @export - * @enum {number} - */ -const PerformanceEvents = { - /** - * acquireTokenByCode API (msal-browser and msal-node). - * Used to acquire tokens by trading an authorization code against the token endpoint. - */ - AcquireTokenByCode: "acquireTokenByCode", - /** - * acquireTokenByRefreshToken API (msal-browser and msal-node). - * Used to renew an access token using a refresh token against the token endpoint. - */ - AcquireTokenByRefreshToken: "acquireTokenByRefreshToken", - /** - * acquireTokenSilent API (msal-browser and msal-node). - * Used to silently acquire a new access token (from the cache or the network). - */ - AcquireTokenSilent: "acquireTokenSilent", - /** - * acquireTokenSilentAsync (msal-browser). - * Internal API for acquireTokenSilent. - */ - AcquireTokenSilentAsync: "acquireTokenSilentAsync", - /** - * acquireTokenPopup (msal-browser). - * Used to acquire a new access token interactively through pop ups - */ - AcquireTokenPopup: "acquireTokenPopup", - /** - * acquireTokenPreRedirect (msal-browser). - * First part of the redirect flow. - * Used to acquire a new access token interactively through redirects. - */ - AcquireTokenPreRedirect: "acquireTokenPreRedirect", - /** - * acquireTokenRedirect (msal-browser). - * Second part of the redirect flow. - * Used to acquire a new access token interactively through redirects. - */ - AcquireTokenRedirect: "acquireTokenRedirect", - /** - * getPublicKeyThumbprint API in CryptoOpts class (msal-browser). - * Used to generate a public/private keypair and generate a public key thumbprint for pop requests. - */ - CryptoOptsGetPublicKeyThumbprint: "cryptoOptsGetPublicKeyThumbprint", - /** - * signJwt API in CryptoOpts class (msal-browser). - * Used to signed a pop token. - */ - CryptoOptsSignJwt: "cryptoOptsSignJwt", - /** - * acquireToken API in the SilentCacheClient class (msal-browser). - * Used to read access tokens from the cache. - */ - SilentCacheClientAcquireToken: "silentCacheClientAcquireToken", - /** - * acquireToken API in the SilentIframeClient class (msal-browser). - * Used to acquire a new set of tokens from the authorize endpoint in a hidden iframe. - */ - SilentIframeClientAcquireToken: "silentIframeClientAcquireToken", - AwaitConcurrentIframe: "awaitConcurrentIframe", - /** - * acquireToken API in SilentRereshClient (msal-browser). - * Used to acquire a new set of tokens from the token endpoint using a refresh token. - */ - SilentRefreshClientAcquireToken: "silentRefreshClientAcquireToken", - /** - * ssoSilent API (msal-browser). - * Used to silently acquire an authorization code and set of tokens using a hidden iframe. - */ - SsoSilent: "ssoSilent", - /** - * getDiscoveredAuthority API in StandardInteractionClient class (msal-browser). - * Used to load authority metadata for a request. - */ - StandardInteractionClientGetDiscoveredAuthority: "standardInteractionClientGetDiscoveredAuthority", - /** - * acquireToken APIs in msal-browser. - * Used to make an /authorize endpoint call with native brokering enabled. - */ - FetchAccountIdWithNativeBroker: "fetchAccountIdWithNativeBroker", - /** - * acquireToken API in NativeInteractionClient class (msal-browser). - * Used to acquire a token from Native component when native brokering is enabled. - */ - NativeInteractionClientAcquireToken: "nativeInteractionClientAcquireToken", - /** - * Time spent creating default headers for requests to token endpoint - */ - BaseClientCreateTokenRequestHeaders: "baseClientCreateTokenRequestHeaders", - /** - * Time spent sending/waiting for the response of a request to the token endpoint - */ - NetworkClientSendPostRequestAsync: "networkClientSendPostRequestAsync", - RefreshTokenClientExecutePostToTokenEndpoint: "refreshTokenClientExecutePostToTokenEndpoint", - AuthorizationCodeClientExecutePostToTokenEndpoint: "authorizationCodeClientExecutePostToTokenEndpoint", - /** - * Used to measure the time taken for completing embedded-broker handshake (PW-Broker). - */ - BrokerHandhshake: "brokerHandshake", - /** - * acquireTokenByRefreshToken API in BrokerClientApplication (PW-Broker) . - */ - AcquireTokenByRefreshTokenInBroker: "acquireTokenByRefreshTokenInBroker", - /** - * Time taken for token acquisition by broker - */ - AcquireTokenByBroker: "acquireTokenByBroker", - /** - * Time spent on the network for refresh token acquisition - */ - RefreshTokenClientExecuteTokenRequest: "refreshTokenClientExecuteTokenRequest", - /** - * Time taken for acquiring refresh token , records RT size - */ - RefreshTokenClientAcquireToken: "refreshTokenClientAcquireToken", - /** - * Time taken for acquiring cached refresh token - */ - RefreshTokenClientAcquireTokenWithCachedRefreshToken: "refreshTokenClientAcquireTokenWithCachedRefreshToken", - /** - * acquireTokenByRefreshToken API in RefreshTokenClient (msal-common). - */ - RefreshTokenClientAcquireTokenByRefreshToken: "refreshTokenClientAcquireTokenByRefreshToken", - /** - * Helper function to create token request body in RefreshTokenClient (msal-common). - */ - RefreshTokenClientCreateTokenRequestBody: "refreshTokenClientCreateTokenRequestBody", - /** - * acquireTokenFromCache (msal-browser). - * Internal API for acquiring token from cache - */ - AcquireTokenFromCache: "acquireTokenFromCache", - SilentFlowClientAcquireCachedToken: "silentFlowClientAcquireCachedToken", - SilentFlowClientGenerateResultFromCacheRecord: "silentFlowClientGenerateResultFromCacheRecord", - /** - * acquireTokenBySilentIframe (msal-browser). - * Internal API for acquiring token by silent Iframe - */ - AcquireTokenBySilentIframe: "acquireTokenBySilentIframe", - /** - * Internal API for initializing base request in BaseInteractionClient (msal-browser) - */ - InitializeBaseRequest: "initializeBaseRequest", - /** - * Internal API for initializing silent request in SilentCacheClient (msal-browser) - */ - InitializeSilentRequest: "initializeSilentRequest", - InitializeClientApplication: "initializeClientApplication", - /** - * Helper function in SilentIframeClient class (msal-browser). - */ - SilentIframeClientTokenHelper: "silentIframeClientTokenHelper", - /** - * SilentHandler - */ - SilentHandlerInitiateAuthRequest: "silentHandlerInitiateAuthRequest", - SilentHandlerMonitorIframeForHash: "silentHandlerMonitorIframeForHash", - SilentHandlerLoadFrame: "silentHandlerLoadFrame", - SilentHandlerLoadFrameSync: "silentHandlerLoadFrameSync", - /** - * Helper functions in StandardInteractionClient class (msal-browser) - */ - StandardInteractionClientCreateAuthCodeClient: "standardInteractionClientCreateAuthCodeClient", - StandardInteractionClientGetClientConfiguration: "standardInteractionClientGetClientConfiguration", - StandardInteractionClientInitializeAuthorizationRequest: "standardInteractionClientInitializeAuthorizationRequest", - StandardInteractionClientInitializeAuthorizationCodeRequest: "standardInteractionClientInitializeAuthorizationCodeRequest", - /** - * getAuthCodeUrl API (msal-browser and msal-node). - */ - GetAuthCodeUrl: "getAuthCodeUrl", - /** - * Functions from InteractionHandler (msal-browser) - */ - HandleCodeResponseFromServer: "handleCodeResponseFromServer", - HandleCodeResponse: "handleCodeResponse", - UpdateTokenEndpointAuthority: "updateTokenEndpointAuthority", - /** - * APIs in Authorization Code Client (msal-common) - */ - AuthClientAcquireToken: "authClientAcquireToken", - AuthClientExecuteTokenRequest: "authClientExecuteTokenRequest", - AuthClientCreateTokenRequestBody: "authClientCreateTokenRequestBody", - AuthClientCreateQueryString: "authClientCreateQueryString", - /** - * Generate functions in PopTokenGenerator (msal-common) - */ - PopTokenGenerateCnf: "popTokenGenerateCnf", - PopTokenGenerateKid: "popTokenGenerateKid", - /** - * handleServerTokenResponse API in ResponseHandler (msal-common) - */ - HandleServerTokenResponse: "handleServerTokenResponse", - DeserializeResponse: "deserializeResponse", - /** - * Authority functions - */ - AuthorityFactoryCreateDiscoveredInstance: "authorityFactoryCreateDiscoveredInstance", - AuthorityResolveEndpointsAsync: "authorityResolveEndpointsAsync", - AuthorityResolveEndpointsFromLocalSources: "authorityResolveEndpointsFromLocalSources", - AuthorityGetCloudDiscoveryMetadataFromNetwork: "authorityGetCloudDiscoveryMetadataFromNetwork", - AuthorityUpdateCloudDiscoveryMetadata: "authorityUpdateCloudDiscoveryMetadata", - AuthorityGetEndpointMetadataFromNetwork: "authorityGetEndpointMetadataFromNetwork", - AuthorityUpdateEndpointMetadata: "authorityUpdateEndpointMetadata", - AuthorityUpdateMetadataWithRegionalInformation: "authorityUpdateMetadataWithRegionalInformation", - /** - * Region Discovery functions - */ - RegionDiscoveryDetectRegion: "regionDiscoveryDetectRegion", - RegionDiscoveryGetRegionFromIMDS: "regionDiscoveryGetRegionFromIMDS", - RegionDiscoveryGetCurrentVersion: "regionDiscoveryGetCurrentVersion", - AcquireTokenByCodeAsync: "acquireTokenByCodeAsync", - GetEndpointMetadataFromNetwork: "getEndpointMetadataFromNetwork", - GetCloudDiscoveryMetadataFromNetworkMeasurement: "getCloudDiscoveryMetadataFromNetworkMeasurement", - HandleRedirectPromiseMeasurement: "handleRedirectPromise", - HandleNativeRedirectPromiseMeasurement: "handleNativeRedirectPromise", - UpdateCloudDiscoveryMetadataMeasurement: "updateCloudDiscoveryMetadataMeasurement", - UsernamePasswordClientAcquireToken: "usernamePasswordClientAcquireToken", - NativeMessageHandlerHandshake: "nativeMessageHandlerHandshake", - NativeGenerateAuthResult: "nativeGenerateAuthResult", - RemoveHiddenIframe: "removeHiddenIframe", - /** - * Cache operations - */ - ClearTokensAndKeysWithClaims: "clearTokensAndKeysWithClaims", - CacheManagerGetRefreshToken: "cacheManagerGetRefreshToken", - /** - * Crypto Operations - */ - GeneratePkceCodes: "generatePkceCodes", - GenerateCodeVerifier: "generateCodeVerifier", - GenerateCodeChallengeFromVerifier: "generateCodeChallengeFromVerifier", - Sha256Digest: "sha256Digest", - GetRandomValues: "getRandomValues", -}; -const PerformanceEventAbbreviations = new Map([ - [PerformanceEvents.AcquireTokenByCode, "ATByCode"], - [PerformanceEvents.AcquireTokenByRefreshToken, "ATByRT"], - [PerformanceEvents.AcquireTokenSilent, "ATS"], - [PerformanceEvents.AcquireTokenSilentAsync, "ATSAsync"], - [PerformanceEvents.AcquireTokenPopup, "ATPopup"], - [PerformanceEvents.AcquireTokenRedirect, "ATRedirect"], - [ - PerformanceEvents.CryptoOptsGetPublicKeyThumbprint, - "CryptoGetPKThumb", - ], - [PerformanceEvents.CryptoOptsSignJwt, "CryptoSignJwt"], - [PerformanceEvents.SilentCacheClientAcquireToken, "SltCacheClientAT"], - [PerformanceEvents.SilentIframeClientAcquireToken, "SltIframeClientAT"], - [PerformanceEvents.SilentRefreshClientAcquireToken, "SltRClientAT"], - [PerformanceEvents.SsoSilent, "SsoSlt"], - [ - PerformanceEvents.StandardInteractionClientGetDiscoveredAuthority, - "StdIntClientGetDiscAuth", - ], - [ - PerformanceEvents.FetchAccountIdWithNativeBroker, - "FetchAccIdWithNtvBroker", - ], - [ - PerformanceEvents.NativeInteractionClientAcquireToken, - "NtvIntClientAT", - ], - [ - PerformanceEvents.BaseClientCreateTokenRequestHeaders, - "BaseClientCreateTReqHead", - ], - [ - PerformanceEvents.NetworkClientSendPostRequestAsync, - "NetClientSendPost", - ], - [ - PerformanceEvents.RefreshTokenClientExecutePostToTokenEndpoint, - "RTClientExecPost", - ], - [ - PerformanceEvents.AuthorizationCodeClientExecutePostToTokenEndpoint, - "AuthCodeClientExecPost", - ], - [PerformanceEvents.BrokerHandhshake, "BrokerHandshake"], - [ - PerformanceEvents.AcquireTokenByRefreshTokenInBroker, - "ATByRTInBroker", - ], - [PerformanceEvents.AcquireTokenByBroker, "ATByBroker"], - [ - PerformanceEvents.RefreshTokenClientExecuteTokenRequest, - "RTClientExecTReq", - ], - [PerformanceEvents.RefreshTokenClientAcquireToken, "RTClientAT"], - [ - PerformanceEvents.RefreshTokenClientAcquireTokenWithCachedRefreshToken, - "RTClientATWithCachedRT", - ], - [ - PerformanceEvents.RefreshTokenClientAcquireTokenByRefreshToken, - "RTClientATByRT", - ], - [ - PerformanceEvents.RefreshTokenClientCreateTokenRequestBody, - "RTClientCreateTReqBody", - ], - [PerformanceEvents.AcquireTokenFromCache, "ATFromCache"], - [ - PerformanceEvents.SilentFlowClientAcquireCachedToken, - "SltFlowClientATCached", - ], - [ - PerformanceEvents.SilentFlowClientGenerateResultFromCacheRecord, - "SltFlowClientGenResFromCache", - ], - [PerformanceEvents.AcquireTokenBySilentIframe, "ATBySltIframe"], - [PerformanceEvents.InitializeBaseRequest, "InitBaseReq"], - [PerformanceEvents.InitializeSilentRequest, "InitSltReq"], - [ - PerformanceEvents.InitializeClientApplication, - "InitClientApplication", - ], - [PerformanceEvents.SilentIframeClientTokenHelper, "SIClientTHelper"], - [ - PerformanceEvents.SilentHandlerInitiateAuthRequest, - "SHandlerInitAuthReq", - ], - [ - PerformanceEvents.SilentHandlerMonitorIframeForHash, - "SltHandlerMonitorIframeForHash", - ], - [PerformanceEvents.SilentHandlerLoadFrame, "SHandlerLoadFrame"], - [PerformanceEvents.SilentHandlerLoadFrameSync, "SHandlerLoadFrameSync"], - [ - PerformanceEvents.StandardInteractionClientCreateAuthCodeClient, - "StdIntClientCreateAuthCodeClient", - ], - [ - PerformanceEvents.StandardInteractionClientGetClientConfiguration, - "StdIntClientGetClientConf", - ], - [ - PerformanceEvents.StandardInteractionClientInitializeAuthorizationRequest, - "StdIntClientInitAuthReq", - ], - [ - PerformanceEvents.StandardInteractionClientInitializeAuthorizationCodeRequest, - "StdIntClientInitAuthCodeReq", - ], - [PerformanceEvents.GetAuthCodeUrl, "GetAuthCodeUrl"], - [ - PerformanceEvents.HandleCodeResponseFromServer, - "HandleCodeResFromServer", - ], - [PerformanceEvents.HandleCodeResponse, "HandleCodeResp"], - [PerformanceEvents.UpdateTokenEndpointAuthority, "UpdTEndpointAuth"], - [PerformanceEvents.AuthClientAcquireToken, "AuthClientAT"], - [PerformanceEvents.AuthClientExecuteTokenRequest, "AuthClientExecTReq"], - [ - PerformanceEvents.AuthClientCreateTokenRequestBody, - "AuthClientCreateTReqBody", - ], - [ - PerformanceEvents.AuthClientCreateQueryString, - "AuthClientCreateQueryStr", - ], - [PerformanceEvents.PopTokenGenerateCnf, "PopTGenCnf"], - [PerformanceEvents.PopTokenGenerateKid, "PopTGenKid"], - [PerformanceEvents.HandleServerTokenResponse, "HandleServerTRes"], - [PerformanceEvents.DeserializeResponse, "DeserializeRes"], - [ - PerformanceEvents.AuthorityFactoryCreateDiscoveredInstance, - "AuthFactCreateDiscInst", - ], - [ - PerformanceEvents.AuthorityResolveEndpointsAsync, - "AuthResolveEndpointsAsync", - ], - [ - PerformanceEvents.AuthorityResolveEndpointsFromLocalSources, - "AuthResolveEndpointsFromLocal", - ], - [ - PerformanceEvents.AuthorityGetCloudDiscoveryMetadataFromNetwork, - "AuthGetCDMetaFromNet", - ], - [ - PerformanceEvents.AuthorityUpdateCloudDiscoveryMetadata, - "AuthUpdCDMeta", - ], - [ - PerformanceEvents.AuthorityGetEndpointMetadataFromNetwork, - "AuthUpdCDMetaFromNet", - ], - [ - PerformanceEvents.AuthorityUpdateEndpointMetadata, - "AuthUpdEndpointMeta", - ], - [ - PerformanceEvents.AuthorityUpdateMetadataWithRegionalInformation, - "AuthUpdMetaWithRegInfo", - ], - [PerformanceEvents.RegionDiscoveryDetectRegion, "RegDiscDetectReg"], - [ - PerformanceEvents.RegionDiscoveryGetRegionFromIMDS, - "RegDiscGetRegFromIMDS", - ], - [ - PerformanceEvents.RegionDiscoveryGetCurrentVersion, - "RegDiscGetCurrentVer", - ], - [PerformanceEvents.AcquireTokenByCodeAsync, "ATByCodeAsync"], - [ - PerformanceEvents.GetEndpointMetadataFromNetwork, - "GetEndpointMetaFromNet", - ], - [ - PerformanceEvents.GetCloudDiscoveryMetadataFromNetworkMeasurement, - "GetCDMetaFromNet", - ], - [ - PerformanceEvents.HandleRedirectPromiseMeasurement, - "HandleRedirectPromise", - ], - [ - PerformanceEvents.HandleNativeRedirectPromiseMeasurement, - "HandleNtvRedirectPromise", - ], - [ - PerformanceEvents.UpdateCloudDiscoveryMetadataMeasurement, - "UpdateCDMeta", - ], - [ - PerformanceEvents.UsernamePasswordClientAcquireToken, - "UserPassClientAT", - ], - [ - PerformanceEvents.NativeMessageHandlerHandshake, - "NtvMsgHandlerHandshake", - ], - [PerformanceEvents.NativeGenerateAuthResult, "NtvGenAuthRes"], - [PerformanceEvents.RemoveHiddenIframe, "RemoveHiddenIframe"], - [ - PerformanceEvents.ClearTokensAndKeysWithClaims, - "ClearTAndKeysWithClaims", - ], - [PerformanceEvents.CacheManagerGetRefreshToken, "CacheManagerGetRT"], - [PerformanceEvents.GeneratePkceCodes, "GenPkceCodes"], - [PerformanceEvents.GenerateCodeVerifier, "GenCodeVerifier"], - [ - PerformanceEvents.GenerateCodeChallengeFromVerifier, - "GenCodeChallengeFromVerifier", - ], - [PerformanceEvents.Sha256Digest, "Sha256Digest"], - [PerformanceEvents.GetRandomValues, "GetRandomValues"], -]); -/** - * State of the performance event. - * - * @export - * @enum {number} - */ -const PerformanceEventStatus = { - NotStarted: 0, - InProgress: 1, - Completed: 2, -}; -const IntFields = new Set([ - "accessTokenSize", - "durationMs", - "idTokenSize", - "matsSilentStatus", - "matsHttpStatus", - "refreshTokenSize", - "queuedTimeMs", - "startTimeMs", - "status", - "multiMatchedAT", - "multiMatchedID", - "multiMatchedRT", -]); - -export { IntFields, PerformanceEventAbbreviations, PerformanceEventStatus, PerformanceEvents }; -//# sourceMappingURL=PerformanceEvent.mjs.map diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/telemetry/performance/PerformanceEvent.mjs.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/telemetry/performance/PerformanceEvent.mjs.map deleted file mode 100644 index e226803..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/telemetry/performance/PerformanceEvent.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"PerformanceEvent.mjs","sources":["../../../src/telemetry/performance/PerformanceEvent.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAAA;;;AAGG;AAEH;;;;;AAKG;AACU,MAAA,i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C,iBAAiB,CAAC,kBAAkB,EAAE,oBAAoB,CAAC;AAC5D,IAAA;AACI,QAAA,iBAAiB,CAAC,4BAA4B;QAC9C,yBAAyB;AAC5B,KAAA;AACD,IAAA,CAAC,iBAAiB,CAAC,2BAA2B,EAAE,mBAAmB,CAAC;AACpE,IAAA,CAAC,iBAAiB,CAAC,iBAAiB,EAAE,cAAc,CAAC;AACrD,IAAA,CAAC,iBAAiB,CAAC,oBAAoB,EAAE,iBAAiB,CAAC;AAC3D,IAAA;AACI,QAAA,iBAAiB,CAAC,iCAAiC;QACnD,8BAA8B;AACjC,KAAA;AACD,IAAA,CAAC,iBAAiB,CAAC,YAAY,EAAE,cAAc,CAAC;AAChD,IAAA,CAAC,iBAAiB,CAAC,eAAe,EAAE,iBAAiB,CAAC;AACzD,CAAA,EAAE;AAEP;;;;;AAKG;AACU,MAAA,sBAAsB,GAAG;AAClC,IAAA,UAAU,EAAE,CAAC;AACb,IAAA,UAAU,EAAE,CAAC;AACb,IAAA,SAAS,EAAE,CAAC;EACL;AAgUE,MAAA,SAAS,GAAwB,IAAI,GAAG,CAAC;IAClD,iBAAiB;IACjB,YAAY;IACZ,aAAa;IACb,kBAAkB;IAClB,gBAAgB;IAChB,kBAAkB;IAClB,cAAc;IACd,aAAa;IACb,QAAQ;IACR,gBAAgB;IAChB,gBAAgB;IAChB,gBAAgB;AACnB,CAAA;;;;"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/telemetry/performance/StubPerformanceClient.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/telemetry/performance/StubPerformanceClient.d.ts deleted file mode 100644 index bb4832b..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/telemetry/performance/StubPerformanceClient.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { IPerformanceClient, InProgressPerformanceEvent } from "./IPerformanceClient.js"; -import { IPerformanceMeasurement } from "./IPerformanceMeasurement.js"; -import { PerformanceEvent } from "./PerformanceEvent.js"; -export declare class StubPerformanceMeasurement implements IPerformanceMeasurement { - startMeasurement(): void; - endMeasurement(): void; - flushMeasurement(): number | null; -} -export declare class StubPerformanceClient implements IPerformanceClient { - generateId(): string; - startMeasurement(measureName: string, correlationId?: string | undefined): InProgressPerformanceEvent; - startPerformanceMeasurement(): IPerformanceMeasurement; - calculateQueuedTime(): number; - addQueueMeasurement(): void; - setPreQueueTime(): void; - endMeasurement(): PerformanceEvent | null; - discardMeasurements(): void; - removePerformanceCallback(): boolean; - addPerformanceCallback(): string; - emitEvents(): void; - addFields(): void; - incrementFields(): void; - cacheEventByCorrelationId(): void; -} -//# sourceMappingURL=StubPerformanceClient.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/telemetry/performance/StubPerformanceClient.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/telemetry/performance/StubPerformanceClient.d.ts.map deleted file mode 100644 index 6a10fa8..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/telemetry/performance/StubPerformanceClient.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"StubPerformanceClient.d.ts","sourceRoot":"","sources":["../../../src/telemetry/performance/StubPerformanceClient.ts"],"names":[],"mappings":"AAKA,OAAO,EACH,kBAAkB,EAClB,0BAA0B,EAC7B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EACH,gBAAgB,EAEnB,MAAM,uBAAuB,CAAC;AAE/B,qBAAa,0BAA2B,YAAW,uBAAuB;IACtE,gBAAgB,IAAI,IAAI;IAGxB,cAAc,IAAI,IAAI;IAGtB,gBAAgB,IAAI,MAAM,GAAG,IAAI;CAGpC;AAED,qBAAa,qBAAsB,YAAW,kBAAkB;IAC5D,UAAU,IAAI,MAAM;IAIpB,gBAAgB,CACZ,WAAW,EAAE,MAAM,EACnB,aAAa,CAAC,EAAE,MAAM,GAAG,SAAS,GACnC,0BAA0B;IAqB7B,2BAA2B,IAAI,uBAAuB;IAGtD,mBAAmB,IAAI,MAAM;IAI7B,mBAAmB,IAAI,IAAI;IAI3B,eAAe,IAAI,IAAI;IAIvB,cAAc,IAAI,gBAAgB,GAAG,IAAI;IAIzC,mBAAmB,IAAI,IAAI;IAI3B,yBAAyB,IAAI,OAAO;IAIpC,sBAAsB,IAAI,MAAM;IAIhC,UAAU,IAAI,IAAI;IAIlB,SAAS,IAAI,IAAI;IAIjB,eAAe,IAAI,IAAI;IAIvB,yBAAyB,IAAI,IAAI;CAGpC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/telemetry/performance/StubPerformanceClient.mjs b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/telemetry/performance/StubPerformanceClient.mjs deleted file mode 100644 index 968307f..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/telemetry/performance/StubPerformanceClient.mjs +++ /dev/null @@ -1,83 +0,0 @@ -/*! @azure/msal-common v14.16.1 2025-08-05 */ -'use strict'; -import { PerformanceEventStatus } from './PerformanceEvent.mjs'; - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -class StubPerformanceMeasurement { - startMeasurement() { - return; - } - endMeasurement() { - return; - } - flushMeasurement() { - return null; - } -} -class StubPerformanceClient { - generateId() { - return "callback-id"; - } - startMeasurement(measureName, correlationId) { - return { - end: () => null, - discard: () => { }, - add: () => { }, - increment: () => { }, - event: { - eventId: this.generateId(), - status: PerformanceEventStatus.InProgress, - authority: "", - libraryName: "", - libraryVersion: "", - clientId: "", - name: measureName, - startTimeMs: Date.now(), - correlationId: correlationId || "", - }, - measurement: new StubPerformanceMeasurement(), - }; - } - startPerformanceMeasurement() { - return new StubPerformanceMeasurement(); - } - calculateQueuedTime() { - return 0; - } - addQueueMeasurement() { - return; - } - setPreQueueTime() { - return; - } - endMeasurement() { - return null; - } - discardMeasurements() { - return; - } - removePerformanceCallback() { - return true; - } - addPerformanceCallback() { - return ""; - } - emitEvents() { - return; - } - addFields() { - return; - } - incrementFields() { - return; - } - cacheEventByCorrelationId() { - return; - } -} - -export { StubPerformanceClient, StubPerformanceMeasurement }; -//# sourceMappingURL=StubPerformanceClient.mjs.map diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/telemetry/performance/StubPerformanceClient.mjs.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/telemetry/performance/StubPerformanceClient.mjs.map deleted file mode 100644 index 0d02ed3..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/telemetry/performance/StubPerformanceClient.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"StubPerformanceClient.mjs","sources":["../../../src/telemetry/performance/StubPerformanceClient.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;AAAA;;;AAGG;MAYU,0BAA0B,CAAA;IACnC,gBAAgB,GAAA;QACZ,OAAO;KACV;IACD,cAAc,GAAA;QACV,OAAO;KACV;IACD,gBAAgB,GAAA;AACZ,QAAA,OAAO,IAAI,CAAC;KACf;AACJ,CAAA;MAEY,qBAAqB,CAAA;IAC9B,UAAU,GAAA;AACN,QAAA,OAAO,aAAa,CAAC;KACxB;IAED,gBAAgB,CACZ,WAAmB,EACnB,aAAkC,EAAA;QAElC,OAAO;AACH,YAAA,GAAG,EAAE,MAAM,IAAI;AACf,YAAA,OAAO,EAAE,MAAK,GAAG;AACjB,YAAA,GAAG,EAAE,MAAK,GAAG;AACb,YAAA,SAAS,EAAE,MAAK,GAAG;AACnB,YAAA,KAAK,EAAE;AACH,gBAAA,OAAO,EAAE,IAAI,CAAC,UAAU,EAAE;gBAC1B,MAAM,EAAE,sBAAsB,CAAC,UAAU;AACzC,gBAAA,SAAS,EAAE,EAAE;AACb,gBAAA,WAAW,EAAE,EAAE;AACf,gBAAA,cAAc,EAAE,EAAE;AAClB,gBAAA,QAAQ,EAAE,EAAE;AACZ,gBAAA,IAAI,EAAE,WAAW;AACjB,gBAAA,WAAW,EAAE,IAAI,CAAC,GAAG,EAAE;gBACvB,aAAa,EAAE,aAAa,IAAI,EAAE;AACrC,aAAA;YACD,WAAW,EAAE,IAAI,0BAA0B,EAAE;SAChD,CAAC;KACL;IAED,2BAA2B,GAAA;QACvB,OAAO,IAAI,0BAA0B,EAAE,CAAC;KAC3C;IACD,mBAAmB,GAAA;AACf,QAAA,OAAO,CAAC,CAAC;KACZ;IAED,mBAAmB,GAAA;QACf,OAAO;KACV;IAED,eAAe,GAAA;QACX,OAAO;KACV;IAED,cAAc,GAAA;AACV,QAAA,OAAO,IAAI,CAAC;KACf;IAED,mBAAmB,GAAA;QACf,OAAO;KACV;IAED,yBAAyB,GAAA;AACrB,QAAA,OAAO,IAAI,CAAC;KACf;IAED,sBAAsB,GAAA;AAClB,QAAA,OAAO,EAAE,CAAC;KACb;IAED,UAAU,GAAA;QACN,OAAO;KACV;IAED,SAAS,GAAA;QACL,OAAO;KACV;IAED,eAAe,GAAA;QACX,OAAO;KACV;IAED,yBAAyB,GAAA;QACrB,OAAO;KACV;AACJ;;;;"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/telemetry/server/ServerTelemetryManager.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/telemetry/server/ServerTelemetryManager.d.ts deleted file mode 100644 index 14cf6ec..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/telemetry/server/ServerTelemetryManager.d.ts +++ /dev/null @@ -1,79 +0,0 @@ -import { CacheOutcome } from "../../utils/Constants.js"; -import { CacheManager } from "../../cache/CacheManager.js"; -import { ServerTelemetryRequest } from "./ServerTelemetryRequest.js"; -import { ServerTelemetryEntity } from "../../cache/entities/ServerTelemetryEntity.js"; -import { RegionDiscoveryMetadata } from "../../authority/RegionDiscoveryMetadata.js"; -type SkuParams = { - libraryName?: string; - libraryVersion?: string; - extensionName?: string; - extensionVersion?: string; - skus?: string; -}; -/** @internal */ -export declare class ServerTelemetryManager { - private cacheManager; - private apiId; - private correlationId; - private telemetryCacheKey; - private wrapperSKU; - private wrapperVer; - private regionUsed; - private regionSource; - private regionOutcome; - private cacheOutcome; - constructor(telemetryRequest: ServerTelemetryRequest, cacheManager: CacheManager); - /** - * API to add MSER Telemetry to request - */ - generateCurrentRequestHeaderValue(): string; - /** - * API to add MSER Telemetry for the last failed request - */ - generateLastRequestHeaderValue(): string; - /** - * API to cache token failures for MSER data capture - * @param error - */ - cacheFailedRequest(error: unknown): void; - /** - * Update server telemetry cache entry by incrementing cache hit counter - */ - incrementCacheHits(): number; - /** - * Get the server telemetry entity from cache or initialize a new one - */ - getLastRequests(): ServerTelemetryEntity; - /** - * Remove server telemetry cache entry - */ - clearTelemetryCache(): void; - /** - * Returns the maximum number of errors that can be flushed to the server in the next network request - * @param serverTelemetryEntity - */ - static maxErrorsToSend(serverTelemetryEntity: ServerTelemetryEntity): number; - /** - * Get the region discovery fields - * - * @returns string - */ - getRegionDiscoveryFields(): string; - /** - * Update the region discovery metadata - * - * @param regionDiscoveryMetadata - * @returns void - */ - updateRegionDiscoveryMetadata(regionDiscoveryMetadata: RegionDiscoveryMetadata): void; - /** - * Set cache outcome - */ - setCacheOutcome(cacheOutcome: CacheOutcome): void; - setNativeBrokerErrorCode(errorCode: string): void; - getNativeBrokerErrorCode(): string | undefined; - clearNativeBrokerErrorCode(): void; - static makeExtraSkuString(params: SkuParams): string; -} -export {}; -//# sourceMappingURL=ServerTelemetryManager.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/telemetry/server/ServerTelemetryManager.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/telemetry/server/ServerTelemetryManager.d.ts.map deleted file mode 100644 index c877b79..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/telemetry/server/ServerTelemetryManager.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ServerTelemetryManager.d.ts","sourceRoot":"","sources":["../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,eAAe,CAClB,qBAAqB,EAAE,qBAAqB,GAC7C,MAAM;IAkCT;;;;OAIG;IACH,wBAAwB,IAAI,MAAM;IAYlC;;;;;OAKG;IACH,6BAA6B,CACzB,uBAAuB,EAAE,uBAAuB,GACjD,IAAI;IAMP;;OAEG;IACH,eAAe,CAAC,YAAY,EAAE,YAAY,GAAG,IAAI;IAIjD,wBAAwB,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI;IAUjD,wBAAwB,IAAI,MAAM,GAAG,SAAS;IAI9C,0BAA0B,IAAI,IAAI;IAUlC,MAAM,CAAC,kBAAkB,CAAC,MAAM,EAAE,SAAS,GAAG,MAAM;CAGvD"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/telemetry/server/ServerTelemetryManager.mjs b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/telemetry/server/ServerTelemetryManager.mjs deleted file mode 100644 index 1753e28..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/telemetry/server/ServerTelemetryManager.mjs +++ /dev/null @@ -1,268 +0,0 @@ -/*! @azure/msal-common v14.16.1 2025-08-05 */ -'use strict'; -import { CacheOutcome, Constants, SERVER_TELEM_CONSTANTS, Separators } from '../../utils/Constants.mjs'; -import { AuthError } from '../../error/AuthError.mjs'; - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -const skuGroupSeparator = ","; -const skuValueSeparator = "|"; -function makeExtraSkuString(params) { - const { skus, libraryName, libraryVersion, extensionName, extensionVersion, } = params; - const skuMap = new Map([ - [0, [libraryName, libraryVersion]], - [2, [extensionName, extensionVersion]], - ]); - let skuArr = []; - if (skus?.length) { - skuArr = skus.split(skuGroupSeparator); - // Ignore invalid input sku param - if (skuArr.length < 4) { - return skus; - } - } - else { - skuArr = Array.from({ length: 4 }, () => skuValueSeparator); - } - skuMap.forEach((value, key) => { - if (value.length === 2 && value[0]?.length && value[1]?.length) { - setSku({ - skuArr, - index: key, - skuName: value[0], - skuVersion: value[1], - }); - } - }); - return skuArr.join(skuGroupSeparator); -} -function setSku(params) { - const { skuArr, index, skuName, skuVersion } = params; - if (index >= skuArr.length) { - return; - } - skuArr[index] = [skuName, skuVersion].join(skuValueSeparator); -} -/** @internal */ -class ServerTelemetryManager { - constructor(telemetryRequest, cacheManager) { - this.cacheOutcome = CacheOutcome.NOT_APPLICABLE; - this.cacheManager = cacheManager; - this.apiId = telemetryRequest.apiId; - this.correlationId = telemetryRequest.correlationId; - this.wrapperSKU = telemetryRequest.wrapperSKU || Constants.EMPTY_STRING; - this.wrapperVer = telemetryRequest.wrapperVer || Constants.EMPTY_STRING; - this.telemetryCacheKey = - SERVER_TELEM_CONSTANTS.CACHE_KEY + - Separators.CACHE_KEY_SEPARATOR + - telemetryRequest.clientId; - } - /** - * API to add MSER Telemetry to request - */ - generateCurrentRequestHeaderValue() { - const request = `${this.apiId}${SERVER_TELEM_CONSTANTS.VALUE_SEPARATOR}${this.cacheOutcome}`; - const platformFieldsArr = [this.wrapperSKU, this.wrapperVer]; - const nativeBrokerErrorCode = this.getNativeBrokerErrorCode(); - if (nativeBrokerErrorCode?.length) { - platformFieldsArr.push(`broker_error=${nativeBrokerErrorCode}`); - } - const platformFields = platformFieldsArr.join(SERVER_TELEM_CONSTANTS.VALUE_SEPARATOR); - const regionDiscoveryFields = this.getRegionDiscoveryFields(); - const requestWithRegionDiscoveryFields = [ - request, - regionDiscoveryFields, - ].join(SERVER_TELEM_CONSTANTS.VALUE_SEPARATOR); - return [ - SERVER_TELEM_CONSTANTS.SCHEMA_VERSION, - requestWithRegionDiscoveryFields, - platformFields, - ].join(SERVER_TELEM_CONSTANTS.CATEGORY_SEPARATOR); - } - /** - * API to add MSER Telemetry for the last failed request - */ - generateLastRequestHeaderValue() { - const lastRequests = this.getLastRequests(); - const maxErrors = ServerTelemetryManager.maxErrorsToSend(lastRequests); - const failedRequests = lastRequests.failedRequests - .slice(0, 2 * maxErrors) - .join(SERVER_TELEM_CONSTANTS.VALUE_SEPARATOR); - const errors = lastRequests.errors - .slice(0, maxErrors) - .join(SERVER_TELEM_CONSTANTS.VALUE_SEPARATOR); - const errorCount = lastRequests.errors.length; - // Indicate whether this header contains all data or partial data - const overflow = maxErrors < errorCount - ? SERVER_TELEM_CONSTANTS.OVERFLOW_TRUE - : SERVER_TELEM_CONSTANTS.OVERFLOW_FALSE; - const platformFields = [errorCount, overflow].join(SERVER_TELEM_CONSTANTS.VALUE_SEPARATOR); - return [ - SERVER_TELEM_CONSTANTS.SCHEMA_VERSION, - lastRequests.cacheHits, - failedRequests, - errors, - platformFields, - ].join(SERVER_TELEM_CONSTANTS.CATEGORY_SEPARATOR); - } - /** - * API to cache token failures for MSER data capture - * @param error - */ - cacheFailedRequest(error) { - const lastRequests = this.getLastRequests(); - if (lastRequests.errors.length >= - SERVER_TELEM_CONSTANTS.MAX_CACHED_ERRORS) { - // Remove a cached error to make room, first in first out - lastRequests.failedRequests.shift(); // apiId - lastRequests.failedRequests.shift(); // correlationId - lastRequests.errors.shift(); - } - lastRequests.failedRequests.push(this.apiId, this.correlationId); - if (error instanceof Error && !!error && error.toString()) { - if (error instanceof AuthError) { - if (error.subError) { - lastRequests.errors.push(error.subError); - } - else if (error.errorCode) { - lastRequests.errors.push(error.errorCode); - } - else { - lastRequests.errors.push(error.toString()); - } - } - else { - lastRequests.errors.push(error.toString()); - } - } - else { - lastRequests.errors.push(SERVER_TELEM_CONSTANTS.UNKNOWN_ERROR); - } - this.cacheManager.setServerTelemetry(this.telemetryCacheKey, lastRequests, this.correlationId); - return; - } - /** - * Update server telemetry cache entry by incrementing cache hit counter - */ - incrementCacheHits() { - const lastRequests = this.getLastRequests(); - lastRequests.cacheHits += 1; - this.cacheManager.setServerTelemetry(this.telemetryCacheKey, lastRequests, this.correlationId); - return lastRequests.cacheHits; - } - /** - * Get the server telemetry entity from cache or initialize a new one - */ - getLastRequests() { - const initialValue = { - failedRequests: [], - errors: [], - cacheHits: 0, - }; - const lastRequests = this.cacheManager.getServerTelemetry(this.telemetryCacheKey); - return lastRequests || initialValue; - } - /** - * Remove server telemetry cache entry - */ - clearTelemetryCache() { - const lastRequests = this.getLastRequests(); - const numErrorsFlushed = ServerTelemetryManager.maxErrorsToSend(lastRequests); - const errorCount = lastRequests.errors.length; - if (numErrorsFlushed === errorCount) { - // All errors were sent on last request, clear Telemetry cache - this.cacheManager.removeItem(this.telemetryCacheKey, this.correlationId); - } - else { - // Partial data was flushed to server, construct a new telemetry cache item with errors that were not flushed - const serverTelemEntity = { - failedRequests: lastRequests.failedRequests.slice(numErrorsFlushed * 2), - errors: lastRequests.errors.slice(numErrorsFlushed), - cacheHits: 0, - }; - this.cacheManager.setServerTelemetry(this.telemetryCacheKey, serverTelemEntity, this.correlationId); - } - } - /** - * Returns the maximum number of errors that can be flushed to the server in the next network request - * @param serverTelemetryEntity - */ - static maxErrorsToSend(serverTelemetryEntity) { - let i; - let maxErrors = 0; - let dataSize = 0; - const errorCount = serverTelemetryEntity.errors.length; - for (i = 0; i < errorCount; i++) { - // failedRequests parameter contains pairs of apiId and correlationId, multiply index by 2 to preserve pairs - const apiId = serverTelemetryEntity.failedRequests[2 * i] || - Constants.EMPTY_STRING; - const correlationId = serverTelemetryEntity.failedRequests[2 * i + 1] || - Constants.EMPTY_STRING; - const errorCode = serverTelemetryEntity.errors[i] || Constants.EMPTY_STRING; - // Count number of characters that would be added to header, each character is 1 byte. Add 3 at the end to account for separators - dataSize += - apiId.toString().length + - correlationId.toString().length + - errorCode.length + - 3; - if (dataSize < SERVER_TELEM_CONSTANTS.MAX_LAST_HEADER_BYTES) { - // Adding this entry to the header would still keep header size below the limit - maxErrors += 1; - } - else { - break; - } - } - return maxErrors; - } - /** - * Get the region discovery fields - * - * @returns string - */ - getRegionDiscoveryFields() { - const regionDiscoveryFields = []; - regionDiscoveryFields.push(this.regionUsed || Constants.EMPTY_STRING); - regionDiscoveryFields.push(this.regionSource || Constants.EMPTY_STRING); - regionDiscoveryFields.push(this.regionOutcome || Constants.EMPTY_STRING); - return regionDiscoveryFields.join(","); - } - /** - * Update the region discovery metadata - * - * @param regionDiscoveryMetadata - * @returns void - */ - updateRegionDiscoveryMetadata(regionDiscoveryMetadata) { - this.regionUsed = regionDiscoveryMetadata.region_used; - this.regionSource = regionDiscoveryMetadata.region_source; - this.regionOutcome = regionDiscoveryMetadata.region_outcome; - } - /** - * Set cache outcome - */ - setCacheOutcome(cacheOutcome) { - this.cacheOutcome = cacheOutcome; - } - setNativeBrokerErrorCode(errorCode) { - const lastRequests = this.getLastRequests(); - lastRequests.nativeBrokerErrorCode = errorCode; - this.cacheManager.setServerTelemetry(this.telemetryCacheKey, lastRequests, this.correlationId); - } - getNativeBrokerErrorCode() { - return this.getLastRequests().nativeBrokerErrorCode; - } - clearNativeBrokerErrorCode() { - const lastRequests = this.getLastRequests(); - delete lastRequests.nativeBrokerErrorCode; - this.cacheManager.setServerTelemetry(this.telemetryCacheKey, lastRequests, this.correlationId); - } - static makeExtraSkuString(params) { - return makeExtraSkuString(params); - } -} - -export { ServerTelemetryManager }; -//# sourceMappingURL=ServerTelemetryManager.mjs.map diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/telemetry/server/ServerTelemetryManager.mjs.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/telemetry/server/ServerTelemetryManager.mjs.map deleted file mode 100644 index c24e7b0..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/telemetry/server/ServerTelemetryManager.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ServerTelemetryManager.mjs","sources":["../../../src/telemetry/server/ServerTelemetryManager.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;AAAA;;;AAGG;AAgBH,MAAM,iBAAiB,GAAG,GAAG,CAAC;AAC9B,MAAM,iBAAiB,GAAG,GAAG,CAAC;AAU9B,SAAS,kBAAkB,CAAC,MAAiB,EAAA;AACzC,IAAA,MAAM,EACF,IAAI,EACJ,WAAW,EACX,cAAc,E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ACpB,QAAA,OAAO,IAAI,CAAC,eAAe,EAAE,CAAC,qBAAqB,CAAC;KACvD;IAED,0BAA0B,GAAA;AACtB,QAAA,MAAM,YAAY,GAAG,IAAI,CAAC,eAAe,EAAE,CAAC;QAC5C,OAAO,YAAY,CAAC,qBAAqB,CAAC;AAC1C,QAAA,IAAI,CAAC,YAAY,CAAC,kBAAkB,CAChC,IAAI,CAAC,iBAAiB,EACtB,YAAY,EACZ,IAAI,CAAC,aAAa,CACrB,CAAC;KACL;IAED,OAAO,kBAAkB,CAAC,MAAiB,EAAA;AACvC,QAAA,OAAO,kBAAkB,CAAC,MAAM,CAAC,CAAC;KACrC;AACJ;;;;"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/telemetry/server/ServerTelemetryRequest.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/telemetry/server/ServerTelemetryRequest.d.ts deleted file mode 100644 index 92ff8ca..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/telemetry/server/ServerTelemetryRequest.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -export type ServerTelemetryRequest = { - clientId: string; - apiId: number; - correlationId: string; - forceRefresh?: boolean; - wrapperSKU?: string; - wrapperVer?: string; -}; -//# sourceMappingURL=ServerTelemetryRequest.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/telemetry/server/ServerTelemetryRequest.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/telemetry/server/ServerTelemetryRequest.d.ts.map deleted file mode 100644 index c4cc74b..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/telemetry/server/ServerTelemetryRequest.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ServerTelemetryRequest.d.ts","sourceRoot":"","sources":["../../../src/telemetry/server/ServerTelemetryRequest.ts"],"names":[],"mappings":"AAKA,MAAM,MAAM,sBAAsB,GAAG;IACjC,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/url/IUri.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/url/IUri.d.ts deleted file mode 100644 index b3808b0..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/url/IUri.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * Interface which describes URI components. - */ -export interface IUri { - Protocol: string; - HostNameAndPort: string; - AbsolutePath: string; - Search: string; - Hash: string; - PathSegments: string[]; - QueryString: string; -} -//# sourceMappingURL=IUri.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/url/IUri.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/url/IUri.d.ts.map deleted file mode 100644 index f00421a..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/url/IUri.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"IUri.d.ts","sourceRoot":"","sources":["../../src/url/IUri.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,MAAM,WAAW,IAAI;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,eAAe,EAAE,MAAM,CAAC;IACxB,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC;CACvB"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/url/UrlString.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/url/UrlString.d.ts deleted file mode 100644 index 161c022..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/url/UrlString.d.ts +++ /dev/null @@ -1,49 +0,0 @@ -import { IUri } from "./IUri.js"; -/** - * Url object class which can perform various transformations on url strings. - */ -export declare class UrlString { - private _urlString; - get urlString(): string; - constructor(url: string); - /** - * Ensure urls are lower case and end with a / character. - * @param url - */ - static canonicalizeUri(url: string): string; - /** - * Throws if urlString passed is not a valid authority URI string. - */ - validateAsUri(): void; - /** - * Given a url and a query string return the url with provided query string appended - * @param url - * @param queryString - */ - static appendQueryString(url: string, queryString: string): string; - /** - * Returns a url with the hash removed - * @param url - */ - static removeHashFromUrl(url: string): string; - /** - * Given a url like https://a:b/common/d?e=f#g, and a tenantId, returns https://a:b/tenantId/d - * @param href The url - * @param tenantId The tenant id to replace - */ - replaceTenantPath(tenantId: string): UrlString; - /** - * Parses out the components from a url string. - * @returns An object with the various components. Please cache this value insted of calling this multiple times on the same url. - */ - getUrlComponents(): IUri; - static getDomainFromUrl(url: string): string; - static getAbsoluteUrl(relativeUrl: string, baseUrl: string): string; - static constructAuthorityUriFromObject(urlObject: IUri): UrlString; - /** - * Check if the hash of the URL string contains known properties - * @deprecated This API will be removed in a future version - */ - static hashContainsKnownProperties(response: string): boolean; -} -//# sourceMappingURL=UrlString.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/url/UrlString.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/url/UrlString.d.ts.map deleted file mode 100644 index 25f4884..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/url/UrlString.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"UrlString.d.ts","sourceRoot":"","sources":["../../src/url/UrlString.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAIjC;;GAEG;AACH,qBAAa,SAAS;IAElB,OAAO,CAAC,UAAU,CAAS;IAC3B,IAAW,SAAS,IAAI,MAAM,CAE7B;gBAEW,GAAG,EAAE,MAAM;IAcvB;;;OAGG;IACH,MAAM,CAAC,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM;IAoB3C;;OAEG;IACH,aAAa,IAAI,IAAI;IA6BrB;;;;OAIG;IACH,MAAM,CAAC,iBAAiB,CAAC,GAAG,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,MAAM;IAUlE;;;OAGG;IACH,MAAM,CAAC,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM;IAI7C;;;;OAIG;IACH,iBAAiB,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS;IAc9C;;;OAGG;IACH,gBAAgB,IAAI,IAAI;IAsCxB,MAAM,CAAC,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM;IAc5C,MAAM,CAAC,cAAc,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM;IAgBnE,MAAM,CAAC,+BAA+B,CAAC,SAAS,EAAE,IAAI,GAAG,SAAS;IAUlE;;;OAGG;IACH,MAAM,CAAC,2BAA2B,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO;CAGhE"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/url/UrlString.mjs b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/url/UrlString.mjs deleted file mode 100644 index 55661d2..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/url/UrlString.mjs +++ /dev/null @@ -1,172 +0,0 @@ -/*! @azure/msal-common v14.16.1 2025-08-05 */ -'use strict'; -import { createClientConfigurationError } from '../error/ClientConfigurationError.mjs'; -import { StringUtils } from '../utils/StringUtils.mjs'; -import { AADAuthorityConstants, Constants } from '../utils/Constants.mjs'; -import { getDeserializedResponse } from '../utils/UrlUtils.mjs'; -import { urlEmptyError, urlParseError, authorityUriInsecure } from '../error/ClientConfigurationErrorCodes.mjs'; - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * Url object class which can perform various transformations on url strings. - */ -class UrlString { - get urlString() { - return this._urlString; - } - constructor(url) { - this._urlString = url; - if (!this._urlString) { - // Throws error if url is empty - throw createClientConfigurationError(urlEmptyError); - } - if (!url.includes("#")) { - this._urlString = UrlString.canonicalizeUri(url); - } - } - /** - * Ensure urls are lower case and end with a / character. - * @param url - */ - static canonicalizeUri(url) { - if (url) { - let lowerCaseUrl = url.toLowerCase(); - if (StringUtils.endsWith(lowerCaseUrl, "?")) { - lowerCaseUrl = lowerCaseUrl.slice(0, -1); - } - else if (StringUtils.endsWith(lowerCaseUrl, "?/")) { - lowerCaseUrl = lowerCaseUrl.slice(0, -2); - } - if (!StringUtils.endsWith(lowerCaseUrl, "/")) { - lowerCaseUrl += "/"; - } - return lowerCaseUrl; - } - return url; - } - /** - * Throws if urlString passed is not a valid authority URI string. - */ - validateAsUri() { - // Attempts to parse url for uri components - let components; - try { - components = this.getUrlComponents(); - } - catch (e) { - throw createClientConfigurationError(urlParseError); - } - // Throw error if URI or path segments are not parseable. - if (!components.HostNameAndPort || !components.PathSegments) { - throw createClientConfigurationError(urlParseError); - } - // Throw error if uri is insecure. - if (!components.Protocol || - components.Protocol.toLowerCase() !== "https:") { - throw createClientConfigurationError(authorityUriInsecure); - } - } - /** - * Given a url and a query string return the url with provided query string appended - * @param url - * @param queryString - */ - static appendQueryString(url, queryString) { - if (!queryString) { - return url; - } - return url.indexOf("?") < 0 - ? `${url}?${queryString}` - : `${url}&${queryString}`; - } - /** - * Returns a url with the hash removed - * @param url - */ - static removeHashFromUrl(url) { - return UrlString.canonicalizeUri(url.split("#")[0]); - } - /** - * Given a url like https://a:b/common/d?e=f#g, and a tenantId, returns https://a:b/tenantId/d - * @param href The url - * @param tenantId The tenant id to replace - */ - replaceTenantPath(tenantId) { - const urlObject = this.getUrlComponents(); - const pathArray = urlObject.PathSegments; - if (tenantId && - pathArray.length !== 0 && - (pathArray[0] === AADAuthorityConstants.COMMON || - pathArray[0] === AADAuthorityConstants.ORGANIZATIONS)) { - pathArray[0] = tenantId; - } - return UrlString.constructAuthorityUriFromObject(urlObject); - } - /** - * Parses out the components from a url string. - * @returns An object with the various components. Please cache this value insted of calling this multiple times on the same url. - */ - getUrlComponents() { - // https://gist.github.com/curtisz/11139b2cfcaef4a261e0 - const regEx = RegExp("^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?"); - // If url string does not match regEx, we throw an error - const match = this.urlString.match(regEx); - if (!match) { - throw createClientConfigurationError(urlParseError); - } - // Url component object - const urlComponents = { - Protocol: match[1], - HostNameAndPort: match[4], - AbsolutePath: match[5], - QueryString: match[7], - }; - let pathSegments = urlComponents.AbsolutePath.split("/"); - pathSegments = pathSegments.filter((val) => val && val.length > 0); // remove empty elements - urlComponents.PathSegments = pathSegments; - if (urlComponents.QueryString && - urlComponents.QueryString.endsWith("/")) { - urlComponents.QueryString = urlComponents.QueryString.substring(0, urlComponents.QueryString.length - 1); - } - return urlComponents; - } - static getDomainFromUrl(url) { - const regEx = RegExp("^([^:/?#]+://)?([^/?#]*)"); - const match = url.match(regEx); - if (!match) { - throw createClientConfigurationError(urlParseError); - } - return match[2]; - } - static getAbsoluteUrl(relativeUrl, baseUrl) { - if (relativeUrl[0] === Constants.FORWARD_SLASH) { - const url = new UrlString(baseUrl); - const baseComponents = url.getUrlComponents(); - return (baseComponents.Protocol + - "//" + - baseComponents.HostNameAndPort + - relativeUrl); - } - return relativeUrl; - } - static constructAuthorityUriFromObject(urlObject) { - return new UrlString(urlObject.Protocol + - "//" + - urlObject.HostNameAndPort + - "/" + - urlObject.PathSegments.join("/")); - } - /** - * Check if the hash of the URL string contains known properties - * @deprecated This API will be removed in a future version - */ - static hashContainsKnownProperties(response) { - return !!getDeserializedResponse(response); - } -} - -export { UrlString }; -//# sourceMappingURL=UrlString.mjs.map diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/url/UrlString.mjs.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/url/UrlString.mjs.map deleted file mode 100644 index a4faf1c..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/url/UrlString.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"UrlString.mjs","sources":["../../src/url/UrlString.ts"],"sourcesContent":[null],"names":["ClientConfigurationErrorCodes.urlEmptyError","ClientConfigurationErrorCodes.urlParseError","ClientConfigurationErrorCodes.authorityUriInsecure","UrlUtils.getDeserializedResponse"],"mappings":";;;;;;;;AAAA;;;AAGG;AAWH;;AAEG;MACU,SAAS,CAAA;AAGlB,IAAA,IAAW,SAAS,GAAA;QAChB,OAAO,IAAI,CAAC,UAAU,CAAC;KAC1B;AAED,IAAA,WAAA,CAAY,GAAW,EAAA;AACnB,QAAA,IAAI,CAAC,UAAU,GAAG,GAAG,CAAC;AACtB,QAAA,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE;;AAElB,YAAA,MAAM,8BAA8B,CAChCA,aAA2C,CAC9C,CAAC;AACL,SAAA;AAED,QAAA,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;YACpB,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC;AACpD,SAAA;KACJ;AAED;;;AAGG;IACH,OAAO,eAAe,CAAC,GAAW,EAAA;AAC9B,QAAA,IAAI,GAAG,EAAE;AACL,YAAA,IAAI,YAAY,GAAG,GAAG,CAAC,WAAW,EAAE,CAAC;YAErC,IAAI,WAAW,CAAC,QAAQ,CAAC,YAAY,EAAE,GAAG,CAAC,EAAE;gBACzC,YAAY,GAAG,YAAY,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;AAC5C,aAAA;iBAAM,IAAI,WAAW,CAAC,QAAQ,CAAC,YAAY,EAAE,IAAI,CAAC,EAAE;gBACjD,YAAY,GAAG,YAAY,CAAC,KAAK,CAAC,CAAC,EAAE,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,CAAC,IAAI,CAAC,GAAG,CAAC,CACvC,CAAC;KACL;AAED;;;AAGG;IACH,OAAO,2BAA2B,CAAC,QAAgB,EAAA;QAC/C,OAAO,CAAC,CAACE,uBAAgC,CAAC,QAAQ,CAAC,CAAC;KACvD;AACJ;;;;"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/utils/ClientAssertionUtils.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/utils/ClientAssertionUtils.d.ts deleted file mode 100644 index ca6e17f..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/utils/ClientAssertionUtils.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { ClientAssertionCallback } from "../account/ClientCredentials.js"; -export declare function getClientAssertion(clientAssertion: string | ClientAssertionCallback, clientId: string, tokenEndpoint?: string): Promise; -//# sourceMappingURL=ClientAssertionUtils.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/utils/ClientAssertionUtils.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/utils/ClientAssertionUtils.d.ts.map deleted file mode 100644 index 70117cd..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/utils/ClientAssertionUtils.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ClientAssertionUtils.d.ts","sourceRoot":"","sources":["../../src/utils/ClientAssertionUtils.ts"],"names":[],"mappings":"AAKA,OAAO,EACH,uBAAuB,EAE1B,MAAM,iCAAiC,CAAC;AAEzC,wBAAsB,kBAAkB,CACpC,eAAe,EAAE,MAAM,GAAG,uBAAuB,EACjD,QAAQ,EAAE,MAAM,EAChB,aAAa,CAAC,EAAE,MAAM,GACvB,OAAO,CAAC,MAAM,CAAC,CAUjB"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/utils/ClientAssertionUtils.mjs b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/utils/ClientAssertionUtils.mjs deleted file mode 100644 index 94fb881..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/utils/ClientAssertionUtils.mjs +++ /dev/null @@ -1,21 +0,0 @@ -/*! @azure/msal-common v14.16.1 2025-08-05 */ -'use strict'; -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -async function getClientAssertion(clientAssertion, clientId, tokenEndpoint) { - if (typeof clientAssertion === "string") { - return clientAssertion; - } - else { - const config = { - clientId: clientId, - tokenEndpoint: tokenEndpoint, - }; - return clientAssertion(config); - } -} - -export { getClientAssertion }; -//# sourceMappingURL=ClientAssertionUtils.mjs.map diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/utils/ClientAssertionUtils.mjs.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/utils/ClientAssertionUtils.mjs.map deleted file mode 100644 index 8a0bda8..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/utils/ClientAssertionUtils.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ClientAssertionUtils.mjs","sources":["../../src/utils/ClientAssertionUtils.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAAA;;;AAGG;AAOI,eAAe,kBAAkB,CACpC,eAAiD,EACjD,QAAgB,EAChB,aAAsB,EAAA;AAEtB,IAAA,IAAI,OAAO,eAAe,KAAK,QAAQ,EAAE;AACrC,QAAA,OAAO,eAAe,CAAC;AAC1B,KAAA;AAAM,SAAA;AACH,QAAA,MAAM,MAAM,GAA0B;AAClC,YAAA,QAAQ,EAAE,QAAQ;AAClB,YAAA,aAAa,EAAE,aAAa;SAC/B,CAAC;AACF,QAAA,OAAO,eAAe,CAAC,MAAM,CAAC,CAAC;AAClC,KAAA;AACL;;;;"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/utils/Constants.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/utils/Constants.d.ts deleted file mode 100644 index ca070a2..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/utils/Constants.d.ts +++ /dev/null @@ -1,311 +0,0 @@ -export declare const Constants: { - LIBRARY_NAME: string; - SKU: string; - CACHE_PREFIX: string; - DEFAULT_AUTHORITY: string; - DEFAULT_AUTHORITY_HOST: string; - DEFAULT_COMMON_TENANT: string; - ADFS: string; - DSTS: string; - AAD_INSTANCE_DISCOVERY_ENDPT: string; - CIAM_AUTH_URL: string; - AAD_TENANT_DOMAIN_SUFFIX: string; - RESOURCE_DELIM: string; - NO_ACCOUNT: string; - CLAIMS: string; - CONSUMER_UTID: string; - OPENID_SCOPE: string; - PROFILE_SCOPE: string; - OFFLINE_ACCESS_SCOPE: string; - EMAIL_SCOPE: string; - CODE_RESPONSE_TYPE: string; - CODE_GRANT_TYPE: string; - RT_GRANT_TYPE: string; - FRAGMENT_RESPONSE_MODE: string; - S256_CODE_CHALLENGE_METHOD: string; - URL_FORM_CONTENT_TYPE: string; - AUTHORIZATION_PENDING: string; - NOT_DEFINED: string; - EMPTY_STRING: string; - NOT_APPLICABLE: string; - NOT_AVAILABLE: string; - FORWARD_SLASH: string; - IMDS_ENDPOINT: string; - IMDS_VERSION: string; - IMDS_TIMEOUT: number; - AZURE_REGION_AUTO_DISCOVER_FLAG: string; - REGIONAL_AUTH_PUBLIC_CLOUD_SUFFIX: string; - KNOWN_PUBLIC_CLOUDS: string[]; - TOKEN_RESPONSE_TYPE: string; - ID_TOKEN_RESPONSE_TYPE: string; - SHR_NONCE_VALIDITY: number; - INVALID_INSTANCE: string; -}; -export declare const HttpStatus: { - readonly SUCCESS: 200; - readonly SUCCESS_RANGE_START: 200; - readonly SUCCESS_RANGE_END: 299; - readonly REDIRECT: 302; - readonly CLIENT_ERROR: 400; - readonly CLIENT_ERROR_RANGE_START: 400; - readonly BAD_REQUEST: 400; - readonly UNAUTHORIZED: 401; - readonly NOT_FOUND: 404; - readonly REQUEST_TIMEOUT: 408; - readonly TOO_MANY_REQUESTS: 429; - readonly CLIENT_ERROR_RANGE_END: 499; - readonly SERVER_ERROR: 500; - readonly SERVER_ERROR_RANGE_START: 500; - readonly SERVICE_UNAVAILABLE: 503; - readonly GATEWAY_TIMEOUT: 504; - readonly SERVER_ERROR_RANGE_END: 599; - readonly MULTI_SIDED_ERROR: 600; -}; -export type HttpStatus = (typeof HttpStatus)[keyof typeof HttpStatus]; -export declare const OIDC_DEFAULT_SCOPES: string[]; -export declare const OIDC_SCOPES: string[]; -/** - * Request header names - */ -export declare const HeaderNames: { - readonly CONTENT_TYPE: "Content-Type"; - readonly CONTENT_LENGTH: "Content-Length"; - readonly RETRY_AFTER: "Retry-After"; - readonly CCS_HEADER: "X-AnchorMailbox"; - readonly WWWAuthenticate: "WWW-Authenticate"; - readonly AuthenticationInfo: "Authentication-Info"; - readonly X_MS_REQUEST_ID: "x-ms-request-id"; - readonly X_MS_HTTP_VERSION: "x-ms-httpver"; -}; -export type HeaderNames = (typeof HeaderNames)[keyof typeof HeaderNames]; -/** - * Persistent cache keys MSAL which stay while user is logged in. - */ -export declare const PersistentCacheKeys: { - readonly ID_TOKEN: "idtoken"; - readonly CLIENT_INFO: "client.info"; - readonly ADAL_ID_TOKEN: "adal.idtoken"; - readonly ERROR: "error"; - readonly ERROR_DESC: "error.description"; - readonly ACTIVE_ACCOUNT: "active-account"; - readonly ACTIVE_ACCOUNT_FILTERS: "active-account-filters"; -}; -export type PersistentCacheKeys = (typeof PersistentCacheKeys)[keyof typeof PersistentCacheKeys]; -/** - * String constants related to AAD Authority - */ -export declare const AADAuthorityConstants: { - readonly COMMON: "common"; - readonly ORGANIZATIONS: "organizations"; - readonly CONSUMERS: "consumers"; -}; -export type AADAuthorityConstants = (typeof AADAuthorityConstants)[keyof typeof AADAuthorityConstants]; -/** - * Claims request keys - */ -export declare const ClaimsRequestKeys: { - readonly ACCESS_TOKEN: "access_token"; - readonly XMS_CC: "xms_cc"; -}; -export type ClaimsRequestKeys = (typeof ClaimsRequestKeys)[keyof typeof ClaimsRequestKeys]; -/** - * we considered making this "enum" in the request instead of string, however it looks like the allowed list of - * prompt values kept changing over past couple of years. There are some undocumented prompt values for some - * internal partners too, hence the choice of generic "string" type instead of the "enum" - */ -export declare const PromptValue: { - LOGIN: string; - SELECT_ACCOUNT: string; - CONSENT: string; - NONE: string; - CREATE: string; - NO_SESSION: string; -}; -/** - * allowed values for codeVerifier - */ -export declare const CodeChallengeMethodValues: { - PLAIN: string; - S256: string; -}; -/** - * allowed values for server response type - */ -export declare const ServerResponseType: { - readonly QUERY: "query"; - readonly FRAGMENT: "fragment"; -}; -export type ServerResponseType = (typeof ServerResponseType)[keyof typeof ServerResponseType]; -/** - * allowed values for response_mode - */ -export declare const ResponseMode: { - readonly FORM_POST: "form_post"; - readonly QUERY: "query"; - readonly FRAGMENT: "fragment"; -}; -export type ResponseMode = (typeof ResponseMode)[keyof typeof ResponseMode]; -/** - * allowed grant_type - */ -export declare const GrantType: { - readonly IMPLICIT_GRANT: "implicit"; - readonly AUTHORIZATION_CODE_GRANT: "authorization_code"; - readonly CLIENT_CREDENTIALS_GRANT: "client_credentials"; - readonly RESOURCE_OWNER_PASSWORD_GRANT: "password"; - readonly REFRESH_TOKEN_GRANT: "refresh_token"; - readonly DEVICE_CODE_GRANT: "device_code"; - readonly JWT_BEARER: "urn:ietf:params:oauth:grant-type:jwt-bearer"; -}; -export type GrantType = (typeof GrantType)[keyof typeof GrantType]; -/** - * Account types in Cache - */ -export declare const CacheAccountType: { - readonly MSSTS_ACCOUNT_TYPE: "MSSTS"; - readonly ADFS_ACCOUNT_TYPE: "ADFS"; - readonly MSAV1_ACCOUNT_TYPE: "MSA"; - readonly GENERIC_ACCOUNT_TYPE: "Generic"; -}; -export type CacheAccountType = (typeof CacheAccountType)[keyof typeof CacheAccountType]; -/** - * Separators used in cache - */ -export declare const Separators: { - readonly CACHE_KEY_SEPARATOR: "-"; - readonly CLIENT_INFO_SEPARATOR: "."; -}; -export type Separators = (typeof Separators)[keyof typeof Separators]; -/** - * Credential Type stored in the cache - */ -export declare const CredentialType: { - readonly ID_TOKEN: "IdToken"; - readonly ACCESS_TOKEN: "AccessToken"; - readonly ACCESS_TOKEN_WITH_AUTH_SCHEME: "AccessToken_With_AuthScheme"; - readonly REFRESH_TOKEN: "RefreshToken"; -}; -export type CredentialType = (typeof CredentialType)[keyof typeof CredentialType]; -/** - * Combine all cache types - */ -export declare const CacheType: { - readonly ADFS: 1001; - readonly MSA: 1002; - readonly MSSTS: 1003; - readonly GENERIC: 1004; - readonly ACCESS_TOKEN: 2001; - readonly REFRESH_TOKEN: 2002; - readonly ID_TOKEN: 2003; - readonly APP_METADATA: 3001; - readonly UNDEFINED: 9999; -}; -export type CacheType = (typeof CacheType)[keyof typeof CacheType]; -/** - * More Cache related constants - */ -export declare const APP_METADATA = "appmetadata"; -export declare const CLIENT_INFO = "client_info"; -export declare const THE_FAMILY_ID = "1"; -export declare const AUTHORITY_METADATA_CONSTANTS: { - CACHE_KEY: string; - REFRESH_TIME_SECONDS: number; -}; -export declare const AuthorityMetadataSource: { - readonly CONFIG: "config"; - readonly CACHE: "cache"; - readonly NETWORK: "network"; - readonly HARDCODED_VALUES: "hardcoded_values"; -}; -export type AuthorityMetadataSource = (typeof AuthorityMetadataSource)[keyof typeof AuthorityMetadataSource]; -export declare const SERVER_TELEM_CONSTANTS: { - SCHEMA_VERSION: number; - MAX_CUR_HEADER_BYTES: number; - MAX_LAST_HEADER_BYTES: number; - MAX_CACHED_ERRORS: number; - CACHE_KEY: string; - CATEGORY_SEPARATOR: string; - VALUE_SEPARATOR: string; - OVERFLOW_TRUE: string; - OVERFLOW_FALSE: string; - UNKNOWN_ERROR: string; -}; -/** - * Type of the authentication request - */ -export declare const AuthenticationScheme: { - readonly BEARER: "Bearer"; - readonly POP: "pop"; - readonly SSH: "ssh-cert"; -}; -export type AuthenticationScheme = (typeof AuthenticationScheme)[keyof typeof AuthenticationScheme]; -/** - * Constants related to throttling - */ -export declare const ThrottlingConstants: { - DEFAULT_THROTTLE_TIME_SECONDS: number; - DEFAULT_MAX_THROTTLE_TIME_SECONDS: number; - THROTTLING_PREFIX: string; - X_MS_LIB_CAPABILITY_VALUE: string; -}; -export declare const Errors: { - INVALID_GRANT_ERROR: string; - CLIENT_MISMATCH_ERROR: string; -}; -/** - * Password grant parameters - */ -export declare const PasswordGrantConstants: { - readonly username: "username"; - readonly password: "password"; -}; -export type PasswordGrantConstants = (typeof PasswordGrantConstants)[keyof typeof PasswordGrantConstants]; -/** - * Response codes - */ -export declare const ResponseCodes: { - readonly httpSuccess: 200; - readonly httpBadRequest: 400; -}; -export type ResponseCodes = (typeof ResponseCodes)[keyof typeof ResponseCodes]; -/** - * Region Discovery Sources - */ -export declare const RegionDiscoverySources: { - readonly FAILED_AUTO_DETECTION: "1"; - readonly INTERNAL_CACHE: "2"; - readonly ENVIRONMENT_VARIABLE: "3"; - readonly IMDS: "4"; -}; -export type RegionDiscoverySources = (typeof RegionDiscoverySources)[keyof typeof RegionDiscoverySources]; -/** - * Region Discovery Outcomes - */ -export declare const RegionDiscoveryOutcomes: { - readonly CONFIGURED_MATCHES_DETECTED: "1"; - readonly CONFIGURED_NO_AUTO_DETECTION: "2"; - readonly CONFIGURED_NOT_DETECTED: "3"; - readonly AUTO_DETECTION_REQUESTED_SUCCESSFUL: "4"; - readonly AUTO_DETECTION_REQUESTED_FAILED: "5"; -}; -export type RegionDiscoveryOutcomes = (typeof RegionDiscoveryOutcomes)[keyof typeof RegionDiscoveryOutcomes]; -/** - * Specifies the reason for fetching the access token from the identity provider - */ -export declare const CacheOutcome: { - readonly NOT_APPLICABLE: "0"; - readonly FORCE_REFRESH_OR_CLAIMS: "1"; - readonly NO_CACHED_ACCESS_TOKEN: "2"; - readonly CACHED_ACCESS_TOKEN_EXPIRED: "3"; - readonly PROACTIVELY_REFRESHED: "4"; -}; -export type CacheOutcome = (typeof CacheOutcome)[keyof typeof CacheOutcome]; -export declare const JsonWebTokenTypes: { - readonly Jwt: "JWT"; - readonly Jwk: "JWK"; - readonly Pop: "pop"; -}; -export type JsonWebTokenTypes = (typeof JsonWebTokenTypes)[keyof typeof JsonWebTokenTypes]; -export declare const ONE_DAY_IN_MS = 86400000; -export declare const DEFAULT_TOKEN_RENEWAL_OFFSET_SEC = 300; -//# sourceMappingURL=Constants.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/utils/Constants.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/utils/Constants.d.ts.map deleted file mode 100644 index 125ae92..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/utils/Constants.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Constants.d.ts","sourceRoot":"","sources":["../../src/utils/Constants.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2DrB,CAAC;AAEF,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;CAmBb,CAAC;AACX,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,OAAO,UAAU,CAAC,CAAC;AAEtE,eAAO,MAAM,mBAAmB,UAI/B,CAAC;AAEF,eAAO,MAAM,WAAW,UAAkD,CAAC;AAE3E;;GAEG;AACH,eAAO,MAAM,WAAW;;;;;;;;;CASd,CAAC;AACX,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,OAAO,WAAW,CAAC,CAAC;AAEzE;;GAEG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;CAQtB,CAAC;AACX,MAAM,MAAM,mBAAmB,GAC3B,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,OAAO,mBAAmB,CAAC,CAAC;AAEnE;;GAEG;AACH,eAAO,MAAM,qBAAqB;;;;CAIxB,CAAC;AACX,MAAM,MAAM,qBAAqB,GAC7B,CAAC,OAAO,qBAAqB,CAAC,CAAC,MAAM,OAAO,q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GAC/B,CAAC,OAAO,uBAAuB,CAAC,CAAC,MAAM,OAAO,uBAAuB,CAAC,CAAC;AAE3E;;GAEG;AACH,eAAO,MAAM,YAAY;;;;;;CAWf,CAAC;AACX,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,OAAO,YAAY,CAAC,CAAC;AAE5E,eAAO,MAAM,iBAAiB;;;;CAIpB,CAAC;AACX,MAAM,MAAM,iBAAiB,GACzB,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,OAAO,iBAAiB,CAAC,CAAC;AAE/D,eAAO,MAAM,aAAa,WAAW,CAAC;AAGtC,eAAO,MAAM,gCAAgC,MAAM,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/utils/Constants.mjs b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/utils/Constants.mjs deleted file mode 100644 index f270e37..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/utils/Constants.mjs +++ /dev/null @@ -1,328 +0,0 @@ -/*! @azure/msal-common v14.16.1 2025-08-05 */ -'use strict'; -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -const Constants = { - LIBRARY_NAME: "MSAL.JS", - SKU: "msal.js.common", - // Prefix for all library cache entries - CACHE_PREFIX: "msal", - // default authority - DEFAULT_AUTHORITY: "https://login.microsoftonline.com/common/", - DEFAULT_AUTHORITY_HOST: "login.microsoftonline.com", - DEFAULT_COMMON_TENANT: "common", - // ADFS String - ADFS: "adfs", - DSTS: "dstsv2", - // Default AAD Instance Discovery Endpoint - AAD_INSTANCE_DISCOVERY_ENDPT: "https://login.microsoftonline.com/common/discovery/instance?api-version=1.1&authorization_endpoint=", - // CIAM URL - CIAM_AUTH_URL: ".ciamlogin.com", - AAD_TENANT_DOMAIN_SUFFIX: ".onmicrosoft.com", - // Resource delimiter - used for certain cache entries - RESOURCE_DELIM: "|", - // Placeholder for non-existent account ids/objects - NO_ACCOUNT: "NO_ACCOUNT", - // Claims - CLAIMS: "claims", - // Consumer UTID - CONSUMER_UTID: "9188040d-6c67-4c5b-b112-36a304b66dad", - // Default scopes - OPENID_SCOPE: "openid", - PROFILE_SCOPE: "profile", - OFFLINE_ACCESS_SCOPE: "offline_access", - EMAIL_SCOPE: "email", - // Default response type for authorization code flow - CODE_RESPONSE_TYPE: "code", - CODE_GRANT_TYPE: "authorization_code", - RT_GRANT_TYPE: "refresh_token", - FRAGMENT_RESPONSE_MODE: "fragment", - S256_CODE_CHALLENGE_METHOD: "S256", - URL_FORM_CONTENT_TYPE: "application/x-www-form-urlencoded;charset=utf-8", - AUTHORIZATION_PENDING: "authorization_pending", - NOT_DEFINED: "not_defined", - EMPTY_STRING: "", - NOT_APPLICABLE: "N/A", - NOT_AVAILABLE: "Not Available", - FORWARD_SLASH: "/", - IMDS_ENDPOINT: "http://169.254.169.254/metadata/instance/compute/location", - IMDS_VERSION: "2020-06-01", - IMDS_TIMEOUT: 2000, - AZURE_REGION_AUTO_DISCOVER_FLAG: "TryAutoDetect", - REGIONAL_AUTH_PUBLIC_CLOUD_SUFFIX: "login.microsoft.com", - KNOWN_PUBLIC_CLOUDS: [ - "login.microsoftonline.com", - "login.windows.net", - "login.microsoft.com", - "sts.windows.net", - ], - TOKEN_RESPONSE_TYPE: "token", - ID_TOKEN_RESPONSE_TYPE: "id_token", - SHR_NONCE_VALIDITY: 240, - INVALID_INSTANCE: "invalid_instance", -}; -const HttpStatus = { - SUCCESS: 200, - SUCCESS_RANGE_START: 200, - SUCCESS_RANGE_END: 299, - REDIRECT: 302, - CLIENT_ERROR: 400, - CLIENT_ERROR_RANGE_START: 400, - BAD_REQUEST: 400, - UNAUTHORIZED: 401, - NOT_FOUND: 404, - REQUEST_TIMEOUT: 408, - TOO_MANY_REQUESTS: 429, - CLIENT_ERROR_RANGE_END: 499, - SERVER_ERROR: 500, - SERVER_ERROR_RANGE_START: 500, - SERVICE_UNAVAILABLE: 503, - GATEWAY_TIMEOUT: 504, - SERVER_ERROR_RANGE_END: 599, - MULTI_SIDED_ERROR: 600, -}; -const OIDC_DEFAULT_SCOPES = [ - Constants.OPENID_SCOPE, - Constants.PROFILE_SCOPE, - Constants.OFFLINE_ACCESS_SCOPE, -]; -const OIDC_SCOPES = [...OIDC_DEFAULT_SCOPES, Constants.EMAIL_SCOPE]; -/** - * Request header names - */ -const HeaderNames = { - CONTENT_TYPE: "Content-Type", - CONTENT_LENGTH: "Content-Length", - RETRY_AFTER: "Retry-After", - CCS_HEADER: "X-AnchorMailbox", - WWWAuthenticate: "WWW-Authenticate", - AuthenticationInfo: "Authentication-Info", - X_MS_REQUEST_ID: "x-ms-request-id", - X_MS_HTTP_VERSION: "x-ms-httpver", -}; -/** - * Persistent cache keys MSAL which stay while user is logged in. - */ -const PersistentCacheKeys = { - ID_TOKEN: "idtoken", - CLIENT_INFO: "client.info", - ADAL_ID_TOKEN: "adal.idtoken", - ERROR: "error", - ERROR_DESC: "error.description", - ACTIVE_ACCOUNT: "active-account", - ACTIVE_ACCOUNT_FILTERS: "active-account-filters", // new cache entry for active_account for a more robust version for browser -}; -/** - * String constants related to AAD Authority - */ -const AADAuthorityConstants = { - COMMON: "common", - ORGANIZATIONS: "organizations", - CONSUMERS: "consumers", -}; -/** - * Claims request keys - */ -const ClaimsRequestKeys = { - ACCESS_TOKEN: "access_token", - XMS_CC: "xms_cc", -}; -/** - * we considered making this "enum" in the request instead of string, however it looks like the allowed list of - * prompt values kept changing over past couple of years. There are some undocumented prompt values for some - * internal partners too, hence the choice of generic "string" type instead of the "enum" - */ -const PromptValue = { - LOGIN: "login", - SELECT_ACCOUNT: "select_account", - CONSENT: "consent", - NONE: "none", - CREATE: "create", - NO_SESSION: "no_session", -}; -/** - * allowed values for codeVerifier - */ -const CodeChallengeMethodValues = { - PLAIN: "plain", - S256: "S256", -}; -/** - * allowed values for server response type - */ -const ServerResponseType = { - QUERY: "query", - FRAGMENT: "fragment", -}; -/** - * allowed values for response_mode - */ -const ResponseMode = { - ...ServerResponseType, - FORM_POST: "form_post", -}; -/** - * allowed grant_type - */ -const GrantType = { - IMPLICIT_GRANT: "implicit", - AUTHORIZATION_CODE_GRANT: "authorization_code", - CLIENT_CREDENTIALS_GRANT: "client_credentials", - RESOURCE_OWNER_PASSWORD_GRANT: "password", - REFRESH_TOKEN_GRANT: "refresh_token", - DEVICE_CODE_GRANT: "device_code", - JWT_BEARER: "urn:ietf:params:oauth:grant-type:jwt-bearer", -}; -/** - * Account types in Cache - */ -const CacheAccountType = { - MSSTS_ACCOUNT_TYPE: "MSSTS", - ADFS_ACCOUNT_TYPE: "ADFS", - MSAV1_ACCOUNT_TYPE: "MSA", - GENERIC_ACCOUNT_TYPE: "Generic", // NTLM, Kerberos, FBA, Basic etc -}; -/** - * Separators used in cache - */ -const Separators = { - CACHE_KEY_SEPARATOR: "-", - CLIENT_INFO_SEPARATOR: ".", -}; -/** - * Credential Type stored in the cache - */ -const CredentialType = { - ID_TOKEN: "IdToken", - ACCESS_TOKEN: "AccessToken", - ACCESS_TOKEN_WITH_AUTH_SCHEME: "AccessToken_With_AuthScheme", - REFRESH_TOKEN: "RefreshToken", -}; -/** - * Combine all cache types - */ -const CacheType = { - ADFS: 1001, - MSA: 1002, - MSSTS: 1003, - GENERIC: 1004, - ACCESS_TOKEN: 2001, - REFRESH_TOKEN: 2002, - ID_TOKEN: 2003, - APP_METADATA: 3001, - UNDEFINED: 9999, -}; -/** - * More Cache related constants - */ -const APP_METADATA = "appmetadata"; -const CLIENT_INFO = "client_info"; -const THE_FAMILY_ID = "1"; -const AUTHORITY_METADATA_CONSTANTS = { - CACHE_KEY: "authority-metadata", - REFRESH_TIME_SECONDS: 3600 * 24, // 24 Hours -}; -const AuthorityMetadataSource = { - CONFIG: "config", - CACHE: "cache", - NETWORK: "network", - HARDCODED_VALUES: "hardcoded_values", -}; -const SERVER_TELEM_CONSTANTS = { - SCHEMA_VERSION: 5, - MAX_CUR_HEADER_BYTES: 80, - MAX_LAST_HEADER_BYTES: 330, - MAX_CACHED_ERRORS: 50, - CACHE_KEY: "server-telemetry", - CATEGORY_SEPARATOR: "|", - VALUE_SEPARATOR: ",", - OVERFLOW_TRUE: "1", - OVERFLOW_FALSE: "0", - UNKNOWN_ERROR: "unknown_error", -}; -/** - * Type of the authentication request - */ -const AuthenticationScheme = { - BEARER: "Bearer", - POP: "pop", - SSH: "ssh-cert", -}; -/** - * Constants related to throttling - */ -const ThrottlingConstants = { - // Default time to throttle RequestThumbprint in seconds - DEFAULT_THROTTLE_TIME_SECONDS: 60, - // Default maximum time to throttle in seconds, overrides what the server sends back - DEFAULT_MAX_THROTTLE_TIME_SECONDS: 3600, - // Prefix for storing throttling entries - THROTTLING_PREFIX: "throttling", - // Value assigned to the x-ms-lib-capability header to indicate to the server the library supports throttling - X_MS_LIB_CAPABILITY_VALUE: "retry-after, h429", -}; -const Errors = { - INVALID_GRANT_ERROR: "invalid_grant", - CLIENT_MISMATCH_ERROR: "client_mismatch", -}; -/** - * Password grant parameters - */ -const PasswordGrantConstants = { - username: "username", - password: "password", -}; -/** - * Response codes - */ -const ResponseCodes = { - httpSuccess: 200, - httpBadRequest: 400, -}; -/** - * Region Discovery Sources - */ -const RegionDiscoverySources = { - FAILED_AUTO_DETECTION: "1", - INTERNAL_CACHE: "2", - ENVIRONMENT_VARIABLE: "3", - IMDS: "4", -}; -/** - * Region Discovery Outcomes - */ -const RegionDiscoveryOutcomes = { - CONFIGURED_MATCHES_DETECTED: "1", - CONFIGURED_NO_AUTO_DETECTION: "2", - CONFIGURED_NOT_DETECTED: "3", - AUTO_DETECTION_REQUESTED_SUCCESSFUL: "4", - AUTO_DETECTION_REQUESTED_FAILED: "5", -}; -/** - * Specifies the reason for fetching the access token from the identity provider - */ -const CacheOutcome = { - // When a token is found in the cache or the cache is not supposed to be hit when making the request - NOT_APPLICABLE: "0", - // When the token request goes to the identity provider because force_refresh was set to true. Also occurs if claims were requested - FORCE_REFRESH_OR_CLAIMS: "1", - // When the token request goes to the identity provider because no cached access token exists - NO_CACHED_ACCESS_TOKEN: "2", - // When the token request goes to the identity provider because cached access token expired - CACHED_ACCESS_TOKEN_EXPIRED: "3", - // When the token request goes to the identity provider because refresh_in was used and the existing token needs to be refreshed - PROACTIVELY_REFRESHED: "4", -}; -const JsonWebTokenTypes = { - Jwt: "JWT", - Jwk: "JWK", - Pop: "pop", -}; -const ONE_DAY_IN_MS = 86400000; -// Token renewal offset default in seconds -const DEFAULT_TOKEN_RENEWAL_OFFSET_SEC = 300; - -export { AADAuthorityConstants, APP_METADATA, AUTHORITY_METADATA_CONSTANTS, AuthenticationScheme, AuthorityMetadataSource, CLIENT_INFO, CacheAccountType, CacheOutcome, CacheType, ClaimsRequestKeys, CodeChallengeMethodValues, Constants, CredentialType, DEFAULT_TOKEN_RENEWAL_OFFSET_SEC, Errors, GrantType, HeaderNames, HttpStatus, JsonWebTokenTypes, OIDC_DEFAULT_SCOPES, OIDC_SCOPES, ONE_DAY_IN_MS, PasswordGrantConstants, PersistentCacheKeys, PromptValue, RegionDiscoveryOutcomes, RegionDiscoverySources, ResponseCodes, ResponseMode, SERVER_TELEM_CONSTANTS, Separators, ServerResponseType, THE_FAMILY_ID, ThrottlingConstants }; -//# sourceMappingURL=Constants.mjs.map diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/utils/Constants.mjs.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/utils/Constants.mjs.map deleted file mode 100644 index f631bbf..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/utils/Constants.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Constants.mjs","sources":["../../src/utils/Constants.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAAA;;;AAGG;AAEU,MAAA,SAAS,GAAG;AACrB,IAAA,YAAY,EAAE,SAAS;AACvB,IAAA,GAAG,EAAE,gBAAgB;;AAErB,IAAA,YAAY,EAAE,MAAM;;AAEpB,IAAA,iBAAiB,EAAE,2CA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AAA,+BAA+B,EAAE,GAAG;EAC7B;AAIX;;AAEG;AACU,MAAA,YAAY,GAAG;;AAExB,IAAA,cAAc,EAAE,GAAG;;AAEnB,IAAA,uBAAuB,EAAE,GAAG;;AAE5B,IAAA,sBAAsB,EAAE,GAAG;;AAE3B,IAAA,2BAA2B,EAAE,GAAG;;AAEhC,IAAA,qBAAqB,EAAE,GAAG;EACnB;AAGE,MAAA,iBAAiB,GAAG;AAC7B,IAAA,GAAG,EAAE,KAAK;AACV,IAAA,GAAG,EAAE,KAAK;AACV,IAAA,GAAG,EAAE,KAAK;EACH;AAIJ,MAAM,aAAa,GAAG,SAAS;AAEtC;AACO,MAAM,gCAAgC,GAAG;;;;"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/utils/FunctionWrappers.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/utils/FunctionWrappers.d.ts deleted file mode 100644 index cac5c0b..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/utils/FunctionWrappers.d.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { Logger } from "../logger/Logger.js"; -import { IPerformanceClient } from "../telemetry/performance/IPerformanceClient.js"; -/** - * Wraps a function with a performance measurement. - * Usage: invoke(functionToCall, performanceClient, "EventName", "correlationId")(...argsToPassToFunction) - * @param callback - * @param eventName - * @param logger - * @param telemetryClient - * @param correlationId - * @returns - * @internal - */ -export declare const invoke: (callback: (...args: T) => U, eventName: string, logger: Logger, telemetryClient?: IPerformanceClient, correlationId?: string) => (...args: T) => U; -/** - * Wraps an async function with a performance measurement. - * Usage: invokeAsync(functionToCall, performanceClient, "EventName", "correlationId")(...argsToPassToFunction) - * @param callback - * @param eventName - * @param logger - * @param telemetryClient - * @param correlationId - * @returns - * @internal - * - */ -export declare const invokeAsync: (callback: (...args: T) => Promise, eventName: string, logger: Logger, telemetryClient?: IPerformanceClient, correlationId?: string) => (...args: T) => Promise; -//# sourceMappingURL=FunctionWrappers.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/utils/FunctionWrappers.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/utils/FunctionWrappers.d.ts.map deleted file mode 100644 index 9bbd6fd..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/utils/FunctionWrappers.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"FunctionWrappers.d.ts","sourceRoot":"","sources":["../../src/utils/FunctionWrappers.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,kBAAkB,EAAE,MAAM,gDAAgD,CAAC;AAEpF;;;;;;;;;;GAUG;AAEH,eAAO,MAAM,MAAM,+DAEJ,MAAM,UACT,MAAM,oBACI,kBAAkB,kBACpB,MAAM,sBAuCzB,CAAC;AAEF;;;;;;;;;;;GAWG;AAEH,eAAO,MAAM,WAAW,wEAET,MAAM,UACT,MAAM,oBACI,kBAAkB,kBACpB,MAAM,+BAyCzB,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/utils/FunctionWrappers.mjs b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/utils/FunctionWrappers.mjs deleted file mode 100644 index 30a71f1..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/utils/FunctionWrappers.mjs +++ /dev/null @@ -1,99 +0,0 @@ -/*! @azure/msal-common v14.16.1 2025-08-05 */ -'use strict'; -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * Wraps a function with a performance measurement. - * Usage: invoke(functionToCall, performanceClient, "EventName", "correlationId")(...argsToPassToFunction) - * @param callback - * @param eventName - * @param logger - * @param telemetryClient - * @param correlationId - * @returns - * @internal - */ -// eslint-disable-next-line @typescript-eslint/no-explicit-any -const invoke = (callback, eventName, logger, telemetryClient, correlationId) => { - return (...args) => { - logger.trace(`Executing function ${eventName}`); - const inProgressEvent = telemetryClient?.startMeasurement(eventName, correlationId); - if (correlationId) { - // Track number of times this API is called in a single request - const eventCount = eventName + "CallCount"; - telemetryClient?.incrementFields({ [eventCount]: 1 }, correlationId); - } - try { - const result = callback(...args); - inProgressEvent?.end({ - success: true, - }); - logger.trace(`Returning result from ${eventName}`); - return result; - } - catch (e) { - logger.trace(`Error occurred in ${eventName}`); - try { - logger.trace(JSON.stringify(e)); - } - catch (e) { - logger.trace("Unable to print error message."); - } - inProgressEvent?.end({ - success: false, - }, e); - throw e; - } - }; -}; -/** - * Wraps an async function with a performance measurement. - * Usage: invokeAsync(functionToCall, performanceClient, "EventName", "correlationId")(...argsToPassToFunction) - * @param callback - * @param eventName - * @param logger - * @param telemetryClient - * @param correlationId - * @returns - * @internal - * - */ -// eslint-disable-next-line @typescript-eslint/no-explicit-any -const invokeAsync = (callback, eventName, logger, telemetryClient, correlationId) => { - return (...args) => { - logger.trace(`Executing function ${eventName}`); - const inProgressEvent = telemetryClient?.startMeasurement(eventName, correlationId); - if (correlationId) { - // Track number of times this API is called in a single request - const eventCount = eventName + "CallCount"; - telemetryClient?.incrementFields({ [eventCount]: 1 }, correlationId); - } - telemetryClient?.setPreQueueTime(eventName, correlationId); - return callback(...args) - .then((response) => { - logger.trace(`Returning result from ${eventName}`); - inProgressEvent?.end({ - success: true, - }); - return response; - }) - .catch((e) => { - logger.trace(`Error occurred in ${eventName}`); - try { - logger.trace(JSON.stringify(e)); - } - catch (e) { - logger.trace("Unable to print error message."); - } - inProgressEvent?.end({ - success: false, - }, e); - throw e; - }); - }; -}; - -export { invoke, invokeAsync }; -//# sourceMappingURL=FunctionWrappers.mjs.map diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/utils/FunctionWrappers.mjs.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/utils/FunctionWrappers.mjs.map deleted file mode 100644 index 06ba5fe..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/utils/FunctionWrappers.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"FunctionWrappers.mjs","sources":["../../src/utils/FunctionWrappers.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAAA;;;AAGG;AAKH;;;;;;;;;;AAUG;AACH;AACO,MAAM,MAAM,GAAG,CAClB,QAA2B,EAC3B,SAAiB,EACjB,MAAc,EACd,eAAoC,EACpC,aAAsB,KACtB;AACA,IAAA,OAAO,CAAC,GAAG,IAAO,KAAO;AACrB,QAAA,MAAM,CAAC,KAAK,CAAC,sBAAsB,SAAS,CAAA,CAAE,CAAC,CAAC;QAChD,MAAM,eAAe,GAAG,eAAe,EAAE,gBAAgB,CACrD,SAAS,EACT,aAAa,CAChB,CAAC;AACF,QAAA,IAAI,aAAa,EAAE;;AAEf,YAAA,MAAM,UAAU,GAAG,SAAS,GAAG,WAAW,CAAC;AAC3C,YAAA,eAAe,EAAE,eAAe,CAC5B,EAAE,CAAC,UAAU,GAAG,CAAC,EAAE,EACnB,aAAa,CAChB,CAAC;AACL,SAAA;QACD,IAAI;AACA,YAAA,MAAM,MAAM,GAAG,QAAQ,CAAC,GAAG,IAAI,CAAC,CAAC;YACjC,eAAe,EAAE,GAAG,CAAC;AACjB,gBAAA,OAAO,EAAE,IAAI;AAChB,aAAA,CAAC,CAAC;AACH,YAAA,MAAM,CAAC,KAAK,CAAC,yBAAyB,SAAS,CAAA,CAAE,CAAC,CAAC;AACnD,YAAA,OAAO,MAAM,CAAC;AACjB,SAAA;AAAC,QAAA,OAAO,CAAC,EAAE;AACR,YAAA,MAAM,CAAC,KAAK,CAAC,qBAAqB,SAAS,CAAA,CAAE,CAAC,CAAC;YAC/C,IAAI;gBACA,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC;AACnC,aAAA;AAAC,YAAA,OAAO,CAAC,EAAE;AACR,gBAAA,MAAM,CAAC,KAAK,CAAC,gCAAgC,CAAC,CAAC;AAClD,aAAA;Y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CAAC;AACnC,aAAA;AAAC,YAAA,OAAO,CAAC,EAAE;AACR,gBAAA,MAAM,CAAC,KAAK,CAAC,gCAAgC,CAAC,CAAC;AAClD,aAAA;YACD,eAAe,EAAE,GAAG,CAChB;AACI,gBAAA,OAAO,EAAE,KAAK;aACjB,EACD,CAAC,CACJ,CAAC;AACF,YAAA,MAAM,CAAC,CAAC;AACZ,SAAC,CAAC,CAAC;AACX,KAAC,CAAC;AACN;;;;"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/utils/MsalTypes.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/utils/MsalTypes.d.ts deleted file mode 100644 index bf6b23d..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/utils/MsalTypes.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -/** - * Key-Value type to support queryParams, extraQueryParams and claims - */ -export type StringDict = { - [key: string]: string; -}; -//# sourceMappingURL=MsalTypes.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/utils/MsalTypes.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/utils/MsalTypes.d.ts.map deleted file mode 100644 index b420498..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/utils/MsalTypes.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"MsalTypes.d.ts","sourceRoot":"","sources":["../../src/utils/MsalTypes.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/utils/ProtocolUtils.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/utils/ProtocolUtils.d.ts deleted file mode 100644 index e9edc1e..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/utils/ProtocolUtils.d.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { ICrypto } from "../crypto/ICrypto.js"; -/** - * Type which defines the object that is stringified, encoded and sent in the state value. - * Contains the following: - * - id - unique identifier for this request - * - ts - timestamp for the time the request was made. Used to ensure that token expiration is not calculated incorrectly. - * - platformState - string value sent from the platform. - */ -export type LibraryStateObject = { - id: string; - meta?: Record; -}; -/** - * Type which defines the stringified and encoded object sent to the service in the authorize request. - */ -export type RequestStateObject = { - userRequestState: string; - libraryState: LibraryStateObject; -}; -/** - * Class which provides helpers for OAuth 2.0 protocol specific values - */ -export declare class ProtocolUtils { - /** - * Appends user state with random guid, or returns random guid. - * @param userState - * @param randomGuid - */ - static setRequestState(cryptoObj: ICrypto, userState?: string, meta?: Record): string; - /** - * Generates the state value used by the common library. - * @param randomGuid - * @param cryptoObj - */ - static generateLibraryState(cryptoObj: ICrypto, meta?: Record): string; - /** - * Parses the state into the RequestStateObject, which contains the LibraryState info and the state passed by the user. - * @param state - * @param cryptoObj - */ - static parseRequestState(cryptoObj: ICrypto, state: string): RequestStateObject; -} -//# sourceMappingURL=ProtocolUtils.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/utils/ProtocolUtils.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/utils/ProtocolUtils.d.ts.map deleted file mode 100644 index db8cdb1..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/utils/ProtocolUtils.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ProtocolUtils.d.ts","sourceRoot":"","sources":["../../src/utils/ProtocolUtils.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAM/C;;;;;;GAMG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACjC,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC7B,gBAAgB,EAAE,MAAM,CAAC;IACzB,YAAY,EAAE,kBAAkB,CAAC;CACpC,CAAC;AAEF;;GAEG;AACH,qBAAa,aAAa;IACtB;;;;OAIG;IACH,MAAM,CAAC,eAAe,CAClB,SAAS,EAAE,OAAO,EAClB,SAAS,CAAC,EAAE,MAAM,EAClB,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAC9B,MAAM;IAUT;;;;OAIG;IACH,MAAM,CAAC,oBAAoB,CACvB,SAAS,EAAE,OAAO,EAClB,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAC9B,MAAM;IAmBT;;;;OAIG;IACH,MAAM,CAAC,iBAAiB,CACpB,SAAS,EAAE,OAAO,EAClB,KAAK,EAAE,MAAM,GACd,kBAAkB;CA6BxB"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/utils/ProtocolUtils.mjs b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/utils/ProtocolUtils.mjs deleted file mode 100644 index 50b5b85..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/utils/ProtocolUtils.mjs +++ /dev/null @@ -1,78 +0,0 @@ -/*! @azure/msal-common v14.16.1 2025-08-05 */ -'use strict'; -import { Constants } from './Constants.mjs'; -import { createClientAuthError } from '../error/ClientAuthError.mjs'; -import { noCryptoObject, invalidState } from '../error/ClientAuthErrorCodes.mjs'; - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * Class which provides helpers for OAuth 2.0 protocol specific values - */ -class ProtocolUtils { - /** - * Appends user state with random guid, or returns random guid. - * @param userState - * @param randomGuid - */ - static setRequestState(cryptoObj, userState, meta) { - const libraryState = ProtocolUtils.generateLibraryState(cryptoObj, meta); - return userState - ? `${libraryState}${Constants.RESOURCE_DELIM}${userState}` - : libraryState; - } - /** - * Generates the state value used by the common library. - * @param randomGuid - * @param cryptoObj - */ - static generateLibraryState(cryptoObj, meta) { - if (!cryptoObj) { - throw createClientAuthError(noCryptoObject); - } - // Create a state object containing a unique id and the timestamp of the request creation - const stateObj = { - id: cryptoObj.createNewGuid(), - }; - if (meta) { - stateObj.meta = meta; - } - const stateString = JSON.stringify(stateObj); - return cryptoObj.base64Encode(stateString); - } - /** - * Parses the state into the RequestStateObject, which contains the LibraryState info and the state passed by the user. - * @param state - * @param cryptoObj - */ - static parseRequestState(cryptoObj, state) { - if (!cryptoObj) { - throw createClientAuthError(noCryptoObject); - } - if (!state) { - throw createClientAuthError(invalidState); - } - try { - // Split the state between library state and user passed state and decode them separately - const splitState = state.split(Constants.RESOURCE_DELIM); - const libraryState = splitState[0]; - const userState = splitState.length > 1 - ? splitState.slice(1).join(Constants.RESOURCE_DELIM) - : Constants.EMPTY_STRING; - const libraryStateString = cryptoObj.base64Decode(libraryState); - const libraryStateObj = JSON.parse(libraryStateString); - return { - userRequestState: userState || Constants.EMPTY_STRING, - libraryState: libraryStateObj, - }; - } - catch (e) { - throw createClientAuthError(invalidState); - } - } -} - -export { ProtocolUtils }; -//# sourceMappingURL=ProtocolUtils.mjs.map diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/utils/ProtocolUtils.mjs.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/utils/ProtocolUtils.mjs.map deleted file mode 100644 index eaec39a..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/utils/ProtocolUtils.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ProtocolUtils.mjs","sources":["../../src/utils/ProtocolUtils.ts"],"sourcesContent":[null],"names":["ClientAuthErrorCodes.noCryptoObject","ClientAuthErrorCodes.invalidState"],"mappings":";;;;;;AAAA;;;AAGG;AA6BH;;AAEG;MACU,aAAa,CAAA;AACtB;;;;AAIG;AACH,IAAA,OAAO,eAAe,CAClB,SAAkB,EAClB,SAAkB,EA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,CAAC,SAAS,CAAC,cAAc,CAAC;AACpD,kBAAE,SAAS,CAAC,YAAY,CAAC;YACjC,MAAM,kBAAkB,GAAG,SAAS,CAAC,YAAY,CAAC,YAAY,CAAC,CAAC;YAChE,MAAM,eAAe,GAAG,IAAI,CAAC,KAAK,CAC9B,kBAAkB,CACC,CAAC;YACxB,OAAO;AACH,gBAAA,gBAAgB,EAAE,SAAS,IAAI,SAAS,CAAC,YAAY;AACrD,gBAAA,YAAY,EAAE,eAAe;aAChC,CAAC;AACL,SAAA;AAAC,QAAA,OAAO,CAAC,EAAE;AACR,YAAA,MAAM,qBAAqB,CAACA,YAAiC,CAAC,CAAC;AAClE,SAAA;KACJ;AACJ;;;;"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/utils/StringUtils.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/utils/StringUtils.d.ts deleted file mode 100644 index 288cb7e..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/utils/StringUtils.d.ts +++ /dev/null @@ -1,41 +0,0 @@ -/** - * @hidden - */ -export declare class StringUtils { - /** - * Check if stringified object is empty - * @param strObj - */ - static isEmptyObj(strObj?: string): boolean; - static startsWith(str: string, search: string): boolean; - static endsWith(str: string, search: string): boolean; - /** - * Parses string into an object. - * - * @param query - */ - static queryStringToObject(query: string): T; - /** - * Trims entries in an array. - * - * @param arr - */ - static trimArrayEntries(arr: Array): Array; - /** - * Removes empty strings from array - * @param arr - */ - static removeEmptyStringsFromArray(arr: Array): Array; - /** - * Attempts to parse a string into JSON - * @param str - */ - static jsonParseHelper(str: string): T | null; - /** - * Tests if a given string matches a given pattern, with support for wildcards and queries. - * @param pattern Wildcard pattern to string match. Supports "*" for wildcards and "?" for queries - * @param input String to match against - */ - static matchPattern(pattern: string, input: string): boolean; -} -//# sourceMappingURL=StringUtils.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/utils/StringUtils.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/utils/StringUtils.d.ts.map deleted file mode 100644 index 458a6f1..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/utils/StringUtils.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"StringUtils.d.ts","sourceRoot":"","sources":["../../src/utils/StringUtils.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,qBAAa,WAAW;IACpB;;;OAGG;IACH,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO;IAU3C,MAAM,CAAC,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO;IAIvD,MAAM,CAAC,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO;IAOrD;;;;OAIG;IACH,MAAM,CAAC,mBAAmB,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,GAAG,CAAC;IAe/C;;;;OAIG;IACH,MAAM,CAAC,gBAAgB,CAAC,GAAG,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,KAAK,CAAC,MAAM,CAAC;IAI1D;;;OAGG;IACH,MAAM,CAAC,2BAA2B,CAAC,GAAG,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,KAAK,CAAC,MAAM,CAAC;IAMrE;;;OAGG;IACH,MAAM,CAAC,eAAe,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,GAAG,CAAC,GAAG,IAAI;IAQhD;;;;OAIG;IACH,MAAM,CAAC,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO;CAe/D"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/utils/StringUtils.mjs b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/utils/StringUtils.mjs deleted file mode 100644 index 8cef67a..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/utils/StringUtils.mjs +++ /dev/null @@ -1,100 +0,0 @@ -/*! @azure/msal-common v14.16.1 2025-08-05 */ -'use strict'; -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * @hidden - */ -class StringUtils { - /** - * Check if stringified object is empty - * @param strObj - */ - static isEmptyObj(strObj) { - if (strObj) { - try { - const obj = JSON.parse(strObj); - return Object.keys(obj).length === 0; - } - catch (e) { } - } - return true; - } - static startsWith(str, search) { - return str.indexOf(search) === 0; - } - static endsWith(str, search) { - return (str.length >= search.length && - str.lastIndexOf(search) === str.length - search.length); - } - /** - * Parses string into an object. - * - * @param query - */ - static queryStringToObject(query) { - const obj = {}; - const params = query.split("&"); - const decode = (s) => decodeURIComponent(s.replace(/\+/g, " ")); - params.forEach((pair) => { - if (pair.trim()) { - const [key, value] = pair.split(/=(.+)/g, 2); // Split on the first occurence of the '=' character - if (key && value) { - obj[decode(key)] = decode(value); - } - } - }); - return obj; - } - /** - * Trims entries in an array. - * - * @param arr - */ - static trimArrayEntries(arr) { - return arr.map((entry) => entry.trim()); - } - /** - * Removes empty strings from array - * @param arr - */ - static removeEmptyStringsFromArray(arr) { - return arr.filter((entry) => { - return !!entry; - }); - } - /** - * Attempts to parse a string into JSON - * @param str - */ - static jsonParseHelper(str) { - try { - return JSON.parse(str); - } - catch (e) { - return null; - } - } - /** - * Tests if a given string matches a given pattern, with support for wildcards and queries. - * @param pattern Wildcard pattern to string match. Supports "*" for wildcards and "?" for queries - * @param input String to match against - */ - static matchPattern(pattern, input) { - /** - * Wildcard support: https://stackoverflow.com/a/3117248/4888559 - * Queries: replaces "?" in string with escaped "\?" for regex test - */ - // eslint-disable-next-line security/detect-non-literal-regexp - const regex = new RegExp(pattern - .replace(/\\/g, "\\\\") - .replace(/\*/g, "[^ ]*") - .replace(/\?/g, "\\?")); - return regex.test(input); - } -} - -export { StringUtils }; -//# sourceMappingURL=StringUtils.mjs.map diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/utils/StringUtils.mjs.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/utils/StringUtils.mjs.map deleted file mode 100644 index 38c5e35..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/utils/StringUtils.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"StringUtils.mjs","sources":["../../src/utils/StringUtils.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAAA;;;AAGG;AAEH;;AAEG;MACU,WAAW,CAAA;AACpB;;;AAGG;IACH,OAAO,UAAU,CAAC,MAAe,EAAA;AAC7B,QAAA,IAAI,MAAM,EAAE;YACR,IAAI;gBACA,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;gBAC/B,OAAO,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC;AACxC,aAAA;YAAC,OAAO,CAAC,EAAE,GAAE;AACjB,SAAA;AACD,QAAA,OAAO,IAAI,CAAC;KACf;AAED,IAAA,OAAO,UAAU,CAAC,GAAW,EAAE,MAAc,EAAA;QACzC,OAAO,GAAG,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;KACpC;AAED,IAAA,OAAO,QAAQ,CAAC,GAAW,EAAE,MAAc,EAAA;AACvC,QAAA,QACI,GAAG,CAAC,MAAM,IAAI,MAAM,CAAC,MAAM;AAC3B,YAAA,GAAG,CAAC,WAAW,CAAC,MAAM,CAAC,KAAK,GAAG,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,EACxD;KACL;AAED;;;;AAIG;IACH,OAAO,mBAAmB,CAAI,KAAa,EAAA;QACvC,MAAM,GAAG,GAAO,EAAE,CAAC;QACnB,MAAM,MAAM,GAAG,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;AAChC,QAAA,MAAM,MAAM,GAAG,CAAC,CAAS,KAAK,kBAAkB,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE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OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,CAC7B,CAAC;AAEF,QAAA,OAAO,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;KAC5B;AACJ;;;;"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/utils/TimeUtils.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/utils/TimeUtils.d.ts deleted file mode 100644 index b26680d..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/utils/TimeUtils.d.ts +++ /dev/null @@ -1,26 +0,0 @@ -/** - * Utility functions for managing date and time operations. - */ -/** - * return the current time in Unix time (seconds). - */ -export declare function nowSeconds(): number; -/** - * check if a token is expired based on given UTC time in seconds. - * @param expiresOn - */ -export declare function isTokenExpired(expiresOn: string, offset: number): boolean; -/** - * If the current time is earlier than the time that a token was cached at, we must discard the token - * i.e. The system clock was turned back after acquiring the cached token - * @param cachedAt - * @param offset - */ -export declare function wasClockTurnedBack(cachedAt: string): boolean; -/** - * Waits for t number of milliseconds - * @param t number - * @param value T - */ -export declare function delay(t: number, value?: T): Promise; -//# sourceMappingURL=TimeUtils.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/utils/TimeUtils.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/utils/TimeUtils.d.ts.map deleted file mode 100644 index e90c8d2..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/utils/TimeUtils.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"TimeUtils.d.ts","sourceRoot":"","sources":["../../src/utils/TimeUtils.ts"],"names":[],"mappings":"AAKA;;GAEG;AAEH;;GAEG;AACH,wBAAgB,UAAU,IAAI,MAAM,CAGnC;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAOzE;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAI5D;AAED;;;;GAIG;AACH,wBAAgB,KAAK,CAAC,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC,CAEhE"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/utils/TimeUtils.mjs b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/utils/TimeUtils.mjs deleted file mode 100644 index b1da4aa..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/utils/TimeUtils.mjs +++ /dev/null @@ -1,48 +0,0 @@ -/*! @azure/msal-common v14.16.1 2025-08-05 */ -'use strict'; -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * Utility functions for managing date and time operations. - */ -/** - * return the current time in Unix time (seconds). - */ -function nowSeconds() { - // Date.getTime() returns in milliseconds. - return Math.round(new Date().getTime() / 1000.0); -} -/** - * check if a token is expired based on given UTC time in seconds. - * @param expiresOn - */ -function isTokenExpired(expiresOn, offset) { - // check for access token expiry - const expirationSec = Number(expiresOn) || 0; - const offsetCurrentTimeSec = nowSeconds() + offset; - // If current time + offset is greater than token expiration time, then token is expired. - return offsetCurrentTimeSec > expirationSec; -} -/** - * If the current time is earlier than the time that a token was cached at, we must discard the token - * i.e. The system clock was turned back after acquiring the cached token - * @param cachedAt - * @param offset - */ -function wasClockTurnedBack(cachedAt) { - const cachedAtSec = Number(cachedAt); - return cachedAtSec > nowSeconds(); -} -/** - * Waits for t number of milliseconds - * @param t number - * @param value T - */ -function delay(t, value) { - return new Promise((resolve) => setTimeout(() => resolve(value), t)); -} - -export { delay, isTokenExpired, nowSeconds, wasClockTurnedBack }; -//# sourceMappingURL=TimeUtils.mjs.map diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/utils/TimeUtils.mjs.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/utils/TimeUtils.mjs.map deleted file mode 100644 index f534afc..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/utils/TimeUtils.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"TimeUtils.mjs","sources":["../../src/utils/TimeUtils.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAAA;;;AAGG;AAEH;;AAEG;AAEH;;AAEG;SACa,UAAU,GAAA;;AAEtB,IAAA,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,IAAI,EAAE,CAAC,OAAO,EAAE,GAAG,MAAM,CAAC,CAAC;AACrD,CAAC;AAED;;;AAGG;AACa,SAAA,cAAc,CAAC,SAAiB,EAAE,MAAc,EAAA;;IAE5D,MAAM,aAAa,GAAG,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;AAC7C,IAAA,MAAM,oBAAoB,GAAG,UAAU,EAAE,GAAG,MAAM,CAAC;;IAGnD,OAAO,oBAAoB,GAAG,aAAa,CAAC;AAChD,CAAC;AAED;;;;;AAKG;AACG,SAAU,kBAAkB,CAAC,QAAgB,EAAA;AAC/C,IAAA,MAAM,WAAW,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC;AAErC,IAAA,OAAO,WAAW,GAAG,UAAU,EAAE,CAAC;AACtC,CAAC;AAED;;;;AAIG;AACa,SAAA,KAAK,CAAI,CAAS,EAAE,KAAS,EAAA;IACzC,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,KAAK,UAAU,CAAC,MAAM,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;AACzE;;;;"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/utils/UrlUtils.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/utils/UrlUtils.d.ts deleted file mode 100644 index 42fa0bc..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/utils/UrlUtils.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { ServerAuthorizationCodeResponse } from "../response/ServerAuthorizationCodeResponse.js"; -/** - * Parses hash string from given string. Returns empty string if no hash symbol is found. - * @param hashString - */ -export declare function stripLeadingHashOrQuery(responseString: string): string; -/** - * Returns URL hash as server auth code response object. - */ -export declare function getDeserializedResponse(responseString: string): ServerAuthorizationCodeResponse | null; -//# sourceMappingURL=UrlUtils.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/utils/UrlUtils.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/utils/UrlUtils.d.ts.map deleted file mode 100644 index 7517f51..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/utils/UrlUtils.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"UrlUtils.d.ts","sourceRoot":"","sources":["../../src/utils/UrlUtils.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,+BAA+B,EAAE,MAAM,gDAAgD,CAAC;AAMjG;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,cAAc,EAAE,MAAM,GAAG,MAAM,CAWtE;AAED;;GAEG;AACH,wBAAgB,uBAAuB,CACnC,cAAc,EAAE,MAAM,GACvB,+BAA+B,GAAG,IAAI,CA0BxC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/utils/UrlUtils.mjs b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/utils/UrlUtils.mjs deleted file mode 100644 index 49178b1..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/utils/UrlUtils.mjs +++ /dev/null @@ -1,52 +0,0 @@ -/*! @azure/msal-common v14.16.1 2025-08-05 */ -'use strict'; -import { createClientAuthError } from '../error/ClientAuthError.mjs'; -import { hashNotDeserialized } from '../error/ClientAuthErrorCodes.mjs'; - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * Parses hash string from given string. Returns empty string if no hash symbol is found. - * @param hashString - */ -function stripLeadingHashOrQuery(responseString) { - if (responseString.startsWith("#/")) { - return responseString.substring(2); - } - else if (responseString.startsWith("#") || - responseString.startsWith("?")) { - return responseString.substring(1); - } - return responseString; -} -/** - * Returns URL hash as server auth code response object. - */ -function getDeserializedResponse(responseString) { - // Check if given hash is empty - if (!responseString || responseString.indexOf("=") < 0) { - return null; - } - try { - // Strip the # or ? symbol if present - const normalizedResponse = stripLeadingHashOrQuery(responseString); - // If # symbol was not present, above will return empty string, so give original hash value - const deserializedHash = Object.fromEntries(new URLSearchParams(normalizedResponse)); - // Check for known response properties - if (deserializedHash.code || - deserializedHash.error || - deserializedHash.error_description || - deserializedHash.state) { - return deserializedHash; - } - } - catch (e) { - throw createClientAuthError(hashNotDeserialized); - } - return null; -} - -export { getDeserializedResponse, stripLeadingHashOrQuery }; -//# sourceMappingURL=UrlUtils.mjs.map diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/utils/UrlUtils.mjs.map b/PBandGraphScaffold/node_modules/@azure/msal-common/dist/utils/UrlUtils.mjs.map deleted file mode 100644 index 370a8f2..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/dist/utils/UrlUtils.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"UrlUtils.mjs","sources":["../../src/utils/UrlUtils.ts"],"sourcesContent":[null],"names":["ClientAuthErrorCodes.hashNotDeserialized"],"mappings":";;;;;AAAA;;;AAGG;AAQH;;;AAGG;AACG,SAAU,uBAAuB,CAAC,cAAsB,EAAA;AAC1D,IAAA,IAAI,cAAc,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE;AACjC,QAAA,OAAO,cAAc,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;AACtC,KAAA;AAAM,SAAA,IACH,cAAc,CAAC,UAAU,CAAC,GAAG,CAAC;AAC9B,QAAA,cAAc,CAAC,UAAU,CAAC,GAAG,CAAC,EAChC;AACE,QAAA,OAAO,cAAc,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;AACtC,KAAA;AAED,IAAA,OAAO,cAAc,CAAC;AAC1B,CAAC;AAED;;AAEG;AACG,SAAU,uBAAuB,CACnC,cAAsB,EAAA;;IAGtB,IAAI,CAAC,cAAc,IAAI,cAAc,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE;AACpD,QAAA,OAAO,IAAI,CAAC;AACf,KAAA;IACD,IAAI;;AAEA,QAAA,MAAM,kBAAkB,GAAG,uBAAuB,CAAC,cAAc,CAAC,CAAC;;AAEnE,QAAA,MAAM,gBAAgB,GAClB,MAAM,CAAC,WAAW,CAAC,IAAI,eAAe,CAAC,kBAAkB,CAAC,CAAC,CAAC;;QAGhE,IACI,gBAAgB,CAAC,IAAI;AACrB,YAAA,gBAAgB,CAAC,KAAK;AACtB,YAAA,gBAAgB,CAAC,iBAAiB;YAClC,gBAAgB,CAAC,KAAK,EACxB;AACE,YAAA,OAAO,gBAAgB,CAAC;AAC3B,SAAA;AACJ,KAAA;AAAC,IAAA,OAAO,CAAC,EAAE;AACR,QAAA,MAAM,qBAAqB,CAACA,mBAAwC,CAAC,CAAC;AACzE,KAAA;AAED,IAAA,OAAO,IAAI,CAAC;AAChB;;;;"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/index-browser.cjs b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/index-browser.cjs deleted file mode 100644 index 7bc6a5f..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/index-browser.cjs +++ /dev/null @@ -1,859 +0,0 @@ -/*! @azure/msal-common v14.16.1 2025-08-05 */ -'use strict'; -'use strict'; - -var indexNode = require('./index-node-CebvEPer.js'); - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -const missingKidError = "missing_kid_error"; -const missingAlgError = "missing_alg_error"; - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -const JoseHeaderErrorMessages = { - [missingKidError]: "The JOSE Header for the requested JWT, JWS or JWK object requires a keyId to be configured as the 'kid' header claim. No 'kid' value was provided.", - [missingAlgError]: "The JOSE Header for the requested JWT, JWS or JWK object requires an algorithm to be specified as the 'alg' header claim. No 'alg' value was provided.", -}; -/** - * Error thrown when there is an error in the client code running on the browser. - */ -class JoseHeaderError extends indexNode.AuthError { - constructor(errorCode, errorMessage) { - super(errorCode, errorMessage); - this.name = "JoseHeaderError"; - Object.setPrototypeOf(this, JoseHeaderError.prototype); - } -} -/** Returns JoseHeaderError object */ -function createJoseHeaderError(code) { - return new JoseHeaderError(code, JoseHeaderErrorMessages[code]); -} - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** @internal */ -class JoseHeader { - constructor(options) { - this.typ = options.typ; - this.alg = options.alg; - this.kid = options.kid; - } - /** - * Builds SignedHttpRequest formatted JOSE Header from the - * JOSE Header options provided or previously set on the object and returns - * the stringified header object. - * Throws if keyId or algorithm aren't provided since they are required for Access Token Binding. - * @param shrHeaderOptions - * @returns - */ - static getShrHeaderString(shrHeaderOptions) { - // KeyID is required on the SHR header - if (!shrHeaderOptions.kid) { - throw createJoseHeaderError(missingKidError); - } - // Alg is required on the SHR header - if (!shrHeaderOptions.alg) { - throw createJoseHeaderError(missingAlgError); - } - const shrHeader = new JoseHeader({ - // Access Token PoP headers must have type pop, but the type header can be overriden for special cases - typ: shrHeaderOptions.typ || indexNode.JsonWebTokenTypes.Pop, - kid: shrHeaderOptions.kid, - alg: shrHeaderOptions.alg, - }); - return JSON.stringify(shrHeader); - } -} - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -class StubPerformanceMeasurement { - startMeasurement() { - return; - } - endMeasurement() { - return; - } - flushMeasurement() { - return null; - } -} -class StubPerformanceClient { - generateId() { - return "callback-id"; - } - startMeasurement(measureName, correlationId) { - return { - end: () => null, - discard: () => { }, - add: () => { }, - increment: () => { }, - event: { - eventId: this.generateId(), - status: indexNode.PerformanceEventStatus.InProgress, - authority: "", - libraryName: "", - libraryVersion: "", - clientId: "", - name: measureName, - startTimeMs: Date.now(), - correlationId: correlationId || "", - }, - measurement: new StubPerformanceMeasurement(), - }; - } - startPerformanceMeasurement() { - return new StubPerformanceMeasurement(); - } - calculateQueuedTime() { - return 0; - } - addQueueMeasurement() { - return; - } - setPreQueueTime() { - return; - } - endMeasurement() { - return null; - } - discardMeasurements() { - return; - } - removePerformanceCallback() { - return true; - } - addPerformanceCallback() { - return ""; - } - emitEvents() { - return; - } - addFields() { - return; - } - incrementFields() { - return; - } - cacheEventByCorrelationId() { - return; - } -} - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * Starts context by adding payload to the stack - * @param event {PerformanceEvent} - * @param abbreviations {Map} event name abbreviations - * @param stack {?PerformanceEventStackedContext[]} stack - */ -function startContext(event, abbreviations, stack) { - if (!stack) { - return; - } - stack.push({ - name: abbreviations.get(event.name) || event.name, - }); -} -/** - * Ends context by removing payload from the stack and returning parent or self, if stack is empty, payload - * - * @param event {PerformanceEvent} - * @param abbreviations {Map} event name abbreviations - * @param stack {?PerformanceEventStackedContext[]} stack - * @param error {?unknown} error - */ -function endContext(event, abbreviations, stack, error) { - if (!stack?.length) { - return; - } - const peek = (stack) => { - return stack.length ? stack[stack.length - 1] : undefined; - }; - const abbrEventName = abbreviations.get(event.name) || event.name; - const top = peek(stack); - if (top?.name !== abbrEventName) { - return; - } - const current = stack?.pop(); - if (!current) { - return; - } - const errorCode = error instanceof indexNode.AuthError - ? error.errorCode - : error instanceof Error - ? error.name - : undefined; - const subErr = error instanceof indexNode.AuthError ? error.subError : undefined; - if (errorCode && current.childErr !== errorCode) { - current.err = errorCode; - if (subErr) { - current.subErr = subErr; - } - } - delete current.name; - delete current.childErr; - const context = { - ...current, - dur: event.durationMs, - }; - if (!event.success) { - context.fail = 1; - } - const parent = peek(stack); - if (!parent) { - return { [abbrEventName]: context }; - } - if (errorCode) { - parent.childErr = errorCode; - } - let childName; - if (!parent[abbrEventName]) { - childName = abbrEventName; - } - else { - const siblings = Object.keys(parent).filter((key) => key.startsWith(abbrEventName)).length; - childName = `${abbrEventName}_${siblings + 1}`; - } - parent[childName] = context; - return parent; -} -/** - * Adds error name and stack trace to the telemetry event - * @param error {Error} - * @param logger {Logger} - * @param event {PerformanceEvent} - * @param stackMaxSize {number} max error stack size to capture - */ -function addError(error, logger, event, stackMaxSize = 5) { - if (!(error instanceof Error)) { - logger.trace("PerformanceClient.addErrorStack: Input error is not instance of Error", event.correlationId); - return; - } - else if (error instanceof indexNode.AuthError) { - event.errorCode = error.errorCode; - event.subErrorCode = error.subError; - if (error instanceof indexNode.ServerError || - error instanceof indexNode.InteractionRequiredAuthError) { - event.serverErrorNo = error.errorNo; - } - return; - } - else if (error instanceof indexNode.CacheError) { - event.errorCode = error.errorCode; - return; - } - else if (event.errorStack?.length) { - logger.trace("PerformanceClient.addErrorStack: Stack already exist", event.correlationId); - return; - } - else if (!error.stack?.length) { - logger.trace("PerformanceClient.addErrorStack: Input stack is empty", event.correlationId); - return; - } - if (error.stack) { - event.errorStack = compactStack(error.stack, stackMaxSize); - } - event.errorName = error.name; -} -/** - * Compacts error stack into array by fetching N first entries - * @param stack {string} error stack - * @param stackMaxSize {number} max error stack size to capture - * @returns {string[]} - */ -function compactStack(stack, stackMaxSize) { - if (stackMaxSize < 0) { - return []; - } - const stackArr = stack.split("\n") || []; - const res = []; - // Check for a handful of known, common runtime errors and log them (with redaction where applicable). - const firstLine = stackArr[0]; - if (firstLine.startsWith("TypeError: Cannot read property") || - firstLine.startsWith("TypeError: Cannot read properties of") || - firstLine.startsWith("TypeError: Cannot set property") || - firstLine.startsWith("TypeError: Cannot set properties of") || - firstLine.endsWith("is not a function")) { - // These types of errors are not at risk of leaking PII. They will indicate unavailable APIs - res.push(compactStackLine(firstLine)); - } - else if (firstLine.startsWith("SyntaxError") || - firstLine.startsWith("TypeError")) { - // Prevent unintentional leaking of arbitrary info by redacting contents between both single and double quotes - res.push(compactStackLine( - // Example: SyntaxError: Unexpected token 'e', "test" is not valid JSON -> SyntaxError: Unexpected token , is not valid JSON - firstLine.replace(/['].*[']|["].*["]/g, ""))); - } - // Get top N stack lines - for (let ix = 1; ix < stackArr.length; ix++) { - if (res.length >= stackMaxSize) { - break; - } - const line = stackArr[ix]; - res.push(compactStackLine(line)); - } - return res; -} -/** - * Compacts error stack line by shortening file path - * Example: https://localhost/msal-common/src/authority/Authority.js:100:1 -> Authority.js:100:1 - * @param line {string} stack line - * @returns {string} - */ -function compactStackLine(line) { - const filePathIx = line.lastIndexOf(" ") + 1; - if (filePathIx < 1) { - return line; - } - const filePath = line.substring(filePathIx); - let fileNameIx = filePath.lastIndexOf("/"); - fileNameIx = fileNameIx < 0 ? filePath.lastIndexOf("\\") : fileNameIx; - if (fileNameIx >= 0) { - return (line.substring(0, filePathIx) + - "(" + - filePath.substring(fileNameIx + 1) + - (filePath.charAt(filePath.length - 1) === ")" ? "" : ")")).trimStart(); - } - return line.trimStart(); -} -class PerformanceClient { - /** - * Creates an instance of PerformanceClient, - * an abstract class containing core performance telemetry logic. - * - * @constructor - * @param {string} clientId Client ID of the application - * @param {string} authority Authority used by the application - * @param {Logger} logger Logger used by the application - * @param {string} libraryName Name of the library - * @param {string} libraryVersion Version of the library - * @param {ApplicationTelemetry} applicationTelemetry application name and version - * @param {Set} intFields integer fields to be truncated - * @param {Map} abbreviations event name abbreviations - */ - constructor(clientId, authority, logger, libraryName, libraryVersion, applicationTelemetry, intFields, abbreviations) { - this.authority = authority; - this.libraryName = libraryName; - this.libraryVersion = libraryVersion; - this.applicationTelemetry = applicationTelemetry; - this.clientId = clientId; - this.logger = logger; - this.callbacks = new Map(); - this.eventsByCorrelationId = new Map(); - this.eventStack = new Map(); - this.queueMeasurements = new Map(); - this.preQueueTimeByCorrelationId = new Map(); - this.intFields = intFields || new Set(); - for (const item of indexNode.IntFields) { - this.intFields.add(item); - } - this.abbreviations = abbreviations || new Map(); - for (const [key, value] of indexNode.PerformanceEventAbbreviations) { - this.abbreviations.set(key, value); - } - } - /** - * Starts and returns an platform-specific implementation of IPerformanceMeasurement. - * Note: this function can be changed to abstract at the next major version bump. - * - * @param {string} measureName - * @param {string} correlationId - * @returns {IPerformanceMeasurement} - * @deprecated This method will be removed in the next major version - */ - startPerformanceMeasurement(measureName, // eslint-disable-line @typescript-eslint/no-unused-vars - correlationId // eslint-disable-line @typescript-eslint/no-unused-vars - ) { - return {}; - } - /** - * Gets map of pre-queue times by correlation Id - * - * @param {PerformanceEvents} eventName - * @param {string} correlationId - * @returns {number} - */ - getPreQueueTime(eventName, correlationId) { - const preQueueEvent = this.preQueueTimeByCorrelationId.get(correlationId); - if (!preQueueEvent) { - this.logger.trace(`PerformanceClient.getPreQueueTime: no pre-queue times found for correlationId: ${correlationId}, unable to add queue measurement`); - return; - } - else if (preQueueEvent.name !== eventName) { - this.logger.trace(`PerformanceClient.getPreQueueTime: no pre-queue time found for ${eventName}, unable to add queue measurement`); - return; - } - return preQueueEvent.time; - } - /** - * Calculates the difference between current time and time when function was queued. - * Note: It is possible to have 0 as the queue time if the current time and the queued time was the same. - * - * @param {number} preQueueTime - * @param {number} currentTime - * @returns {number} - */ - calculateQueuedTime(preQueueTime, currentTime) { - if (preQueueTime < 1) { - this.logger.trace(`PerformanceClient: preQueueTime should be a positive integer and not ${preQueueTime}`); - return 0; - } - if (currentTime < 1) { - this.logger.trace(`PerformanceClient: currentTime should be a positive integer and not ${currentTime}`); - return 0; - } - if (currentTime < preQueueTime) { - this.logger.trace("PerformanceClient: currentTime is less than preQueueTime, check how time is being retrieved"); - return 0; - } - return currentTime - preQueueTime; - } - /** - * Adds queue measurement time to QueueMeasurements array for given correlation ID. - * - * @param {PerformanceEvents} eventName - * @param {?string} correlationId - * @param {?number} queueTime - * @param {?boolean} manuallyCompleted - indicator for manually completed queue measurements - * @returns - */ - addQueueMeasurement(eventName, correlationId, queueTime, manuallyCompleted) { - if (!correlationId) { - this.logger.trace(`PerformanceClient.addQueueMeasurement: correlationId not provided for ${eventName}, cannot add queue measurement`); - return; - } - if (queueTime === 0) { - // Possible for there to be no queue time after calculation - this.logger.trace(`PerformanceClient.addQueueMeasurement: queue time provided for ${eventName} is ${queueTime}`); - } - else if (!queueTime) { - this.logger.trace(`PerformanceClient.addQueueMeasurement: no queue time provided for ${eventName}`); - return; - } - const queueMeasurement = { - eventName, - // Always default queue time to 0 for manually completed (improperly instrumented) - queueTime: manuallyCompleted ? 0 : queueTime, - manuallyCompleted, - }; - // Adds to existing correlation Id if present in queueMeasurements - const existingMeasurements = this.queueMeasurements.get(correlationId); - if (existingMeasurements) { - existingMeasurements.push(queueMeasurement); - this.queueMeasurements.set(correlationId, existingMeasurements); - } - else { - // Sets new correlation Id if not present in queueMeasurements - this.logger.trace(`PerformanceClient.addQueueMeasurement: adding correlationId ${correlationId} to queue measurements`); - const measurementArray = [queueMeasurement]; - this.queueMeasurements.set(correlationId, measurementArray); - } - // Delete processed pre-queue event. - this.preQueueTimeByCorrelationId.delete(correlationId); - } - /** - * Starts measuring performance for a given operation. Returns a function that should be used to end the measurement. - * - * @param {PerformanceEvents} measureName - * @param {?string} [correlationId] - * @returns {InProgressPerformanceEvent} - */ - startMeasurement(measureName, correlationId) { - // Generate a placeholder correlation if the request does not provide one - const eventCorrelationId = correlationId || this.generateId(); - if (!correlationId) { - this.logger.info(`PerformanceClient: No correlation id provided for ${measureName}, generating`, eventCorrelationId); - } - this.logger.trace(`PerformanceClient: Performance measurement started for ${measureName}`, eventCorrelationId); - const inProgressEvent = { - eventId: this.generateId(), - status: indexNode.PerformanceEventStatus.InProgress, - authority: this.authority, - libraryName: this.libraryName, - libraryVersion: this.libraryVersion, - clientId: this.clientId, - name: measureName, - startTimeMs: Date.now(), - correlationId: eventCorrelationId, - appName: this.applicationTelemetry?.appName, - appVersion: this.applicationTelemetry?.appVersion, - }; - // Store in progress events so they can be discarded if not ended properly - this.cacheEventByCorrelationId(inProgressEvent); - startContext(inProgressEvent, this.abbreviations, this.eventStack.get(eventCorrelationId)); - // Return the event and functions the caller can use to properly end/flush the measurement - return { - end: (event, error) => { - return this.endMeasurement({ - // Initial set of event properties - ...inProgressEvent, - // Properties set when event ends - ...event, - }, error); - }, - discard: () => { - return this.discardMeasurements(inProgressEvent.correlationId); - }, - add: (fields) => { - return this.addFields(fields, inProgressEvent.correlationId); - }, - increment: (fields) => { - return this.incrementFields(fields, inProgressEvent.correlationId); - }, - event: inProgressEvent, - measurement: new StubPerformanceMeasurement(), - }; - } - /** - * Stops measuring the performance for an operation. Should only be called directly by PerformanceClient classes, - * as consumers should instead use the function returned by startMeasurement. - * Adds a new field named as "[event name]DurationMs" for sub-measurements, completes and emits an event - * otherwise. - * - * @param {PerformanceEvent} event - * @param {unknown} error - * @returns {(PerformanceEvent | null)} - */ - endMeasurement(event, error) { - const rootEvent = this.eventsByCorrelationId.get(event.correlationId); - if (!rootEvent) { - this.logger.trace(`PerformanceClient: Measurement not found for ${event.eventId}`, event.correlationId); - return null; - } - const isRoot = event.eventId === rootEvent.eventId; - let queueInfo = { - totalQueueTime: 0, - totalQueueCount: 0, - manuallyCompletedCount: 0, - }; - event.durationMs = Math.round(event.durationMs || this.getDurationMs(event.startTimeMs)); - const context = JSON.stringify(endContext(event, this.abbreviations, this.eventStack.get(rootEvent.correlationId), error)); - if (isRoot) { - queueInfo = this.getQueueInfo(event.correlationId); - this.discardMeasurements(rootEvent.correlationId); - } - else { - rootEvent.incompleteSubMeasurements?.delete(event.eventId); - } - this.logger.trace(`PerformanceClient: Performance measurement ended for ${event.name}: ${event.durationMs} ms`, event.correlationId); - if (error) { - addError(error, this.logger, rootEvent); - } - // Add sub-measurement attribute to root event. - if (!isRoot) { - rootEvent[event.name + "DurationMs"] = Math.floor(event.durationMs); - return { ...rootEvent }; - } - if (isRoot && - !error && - (rootEvent.errorCode || rootEvent.subErrorCode)) { - this.logger.trace(`PerformanceClient: Remove error and sub-error codes for root event ${event.name} as intermediate error was successfully handled`, event.correlationId); - rootEvent.errorCode = undefined; - rootEvent.subErrorCode = undefined; - } - let finalEvent = { ...rootEvent, ...event }; - let incompleteSubsCount = 0; - // Incomplete sub-measurements are discarded. They are likely an instrumentation bug that should be fixed. - finalEvent.incompleteSubMeasurements?.forEach((subMeasurement) => { - this.logger.trace(`PerformanceClient: Incomplete submeasurement ${subMeasurement.name} found for ${event.name}`, finalEvent.correlationId); - incompleteSubsCount++; - }); - finalEvent.incompleteSubMeasurements = undefined; - finalEvent = { - ...finalEvent, - queuedTimeMs: queueInfo.totalQueueTime, - queuedCount: queueInfo.totalQueueCount, - queuedManuallyCompletedCount: queueInfo.manuallyCompletedCount, - status: indexNode.PerformanceEventStatus.Completed, - incompleteSubsCount, - context, - }; - this.truncateIntegralFields(finalEvent); - this.emitEvents([finalEvent], event.correlationId); - return finalEvent; - } - /** - * Saves extra information to be emitted when the measurements are flushed - * @param fields - * @param correlationId - */ - addFields(fields, correlationId) { - this.logger.trace("PerformanceClient: Updating static fields"); - const event = this.eventsByCorrelationId.get(correlationId); - if (event) { - this.eventsByCorrelationId.set(correlationId, { - ...event, - ...fields, - }); - } - else { - this.logger.trace("PerformanceClient: Event not found for", correlationId); - } - } - /** - * Increment counters to be emitted when the measurements are flushed - * @param fields {string[]} - * @param correlationId {string} correlation identifier - */ - incrementFields(fields, correlationId) { - this.logger.trace("PerformanceClient: Updating counters"); - const event = this.eventsByCorrelationId.get(correlationId); - if (event) { - for (const counter in fields) { - if (!event.hasOwnProperty(counter)) { - event[counter] = 0; - } - else if (isNaN(Number(event[counter]))) { - return; - } - event[counter] += fields[counter]; - } - } - else { - this.logger.trace("PerformanceClient: Event not found for", correlationId); - } - } - /** - * Upserts event into event cache. - * First key is the correlation id, second key is the event id. - * Allows for events to be grouped by correlation id, - * and to easily allow for properties on them to be updated. - * - * @private - * @param {PerformanceEvent} event - */ - cacheEventByCorrelationId(event) { - const rootEvent = this.eventsByCorrelationId.get(event.correlationId); - if (rootEvent) { - this.logger.trace(`PerformanceClient: Performance measurement for ${event.name} added/updated`, event.correlationId); - rootEvent.incompleteSubMeasurements = - rootEvent.incompleteSubMeasurements || new Map(); - rootEvent.incompleteSubMeasurements.set(event.eventId, { - name: event.name, - startTimeMs: event.startTimeMs, - }); - } - else { - this.logger.trace(`PerformanceClient: Performance measurement for ${event.name} started`, event.correlationId); - this.eventsByCorrelationId.set(event.correlationId, { ...event }); - this.eventStack.set(event.correlationId, []); - } - } - getQueueInfo(correlationId) { - const queueMeasurementForCorrelationId = this.queueMeasurements.get(correlationId); - if (!queueMeasurementForCorrelationId) { - this.logger.trace(`PerformanceClient: no queue measurements found for for correlationId: ${correlationId}`); - } - let totalQueueTime = 0; - let totalQueueCount = 0; - let manuallyCompletedCount = 0; - queueMeasurementForCorrelationId?.forEach((measurement) => { - totalQueueTime += measurement.queueTime; - totalQueueCount++; - manuallyCompletedCount += measurement.manuallyCompleted ? 1 : 0; - }); - return { - totalQueueTime, - totalQueueCount, - manuallyCompletedCount, - }; - } - /** - * Removes measurements and aux data for a given correlation id. - * - * @param {string} correlationId - */ - discardMeasurements(correlationId) { - this.logger.trace("PerformanceClient: Performance measurements discarded", correlationId); - this.eventsByCorrelationId.delete(correlationId); - this.logger.trace("PerformanceClient: QueueMeasurements discarded", correlationId); - this.queueMeasurements.delete(correlationId); - this.logger.trace("PerformanceClient: Pre-queue times discarded", correlationId); - this.preQueueTimeByCorrelationId.delete(correlationId); - this.logger.trace("PerformanceClient: Event stack discarded", correlationId); - this.eventStack.delete(correlationId); - } - /** - * Registers a callback function to receive performance events. - * - * @param {PerformanceCallbackFunction} callback - * @returns {string} - */ - addPerformanceCallback(callback) { - for (const [id, cb] of this.callbacks) { - if (cb.toString() === callback.toString()) { - this.logger.warning(`PerformanceClient: Performance callback is already registered with id: ${id}`); - return id; - } - } - const callbackId = this.generateId(); - this.callbacks.set(callbackId, callback); - this.logger.verbose(`PerformanceClient: Performance callback registered with id: ${callbackId}`); - return callbackId; - } - /** - * Removes a callback registered with addPerformanceCallback. - * - * @param {string} callbackId - * @returns {boolean} - */ - removePerformanceCallback(callbackId) { - const result = this.callbacks.delete(callbackId); - if (result) { - this.logger.verbose(`PerformanceClient: Performance callback ${callbackId} removed.`); - } - else { - this.logger.verbose(`PerformanceClient: Performance callback ${callbackId} not removed.`); - } - return result; - } - /** - * Emits events to all registered callbacks. - * - * @param {PerformanceEvent[]} events - * @param {?string} [correlationId] - */ - emitEvents(events, correlationId) { - this.logger.verbose("PerformanceClient: Emitting performance events", correlationId); - this.callbacks.forEach((callback, callbackId) => { - this.logger.trace(`PerformanceClient: Emitting event to callback ${callbackId}`, correlationId); - callback.apply(null, [events]); - }); - } - /** - * Enforce truncation of integral fields in performance event. - * @param {PerformanceEvent} event performance event to update. - */ - truncateIntegralFields(event) { - this.intFields.forEach((key) => { - if (key in event && typeof event[key] === "number") { - event[key] = Math.floor(event[key]); - } - }); - } - /** - * Returns event duration in milliseconds - * @param startTimeMs {number} - * @returns {number} - */ - getDurationMs(startTimeMs) { - const durationMs = Date.now() - startTimeMs; - // Handle clock skew - return durationMs < 0 ? durationMs : 0; - } -} - -exports.AADAuthorityConstants = indexNode.AADAuthorityConstants; -exports.AADServerParamKeys = indexNode.AADServerParamKeys; -exports.AccountEntity = indexNode.AccountEntity; -exports.AuthError = indexNode.AuthError; -exports.AuthErrorCodes = indexNode.AuthErrorCodes; -exports.AuthErrorMessage = indexNode.AuthErrorMessage; -exports.AuthToken = indexNode.AuthToken; -exports.AuthenticationHeaderParser = indexNode.AuthenticationHeaderParser; -exports.AuthenticationScheme = indexNode.AuthenticationScheme; -exports.Authority = indexNode.Authority; -exports.AuthorityFactory = indexNode.AuthorityFactory; -exports.AuthorityType = indexNode.AuthorityType; -exports.AuthorizationCodeClient = indexNode.AuthorizationCodeClient; -exports.AzureCloudInstance = indexNode.AzureCloudInstance; -exports.BaseClient = indexNode.BaseClient; -exports.CacheAccountType = indexNode.CacheAccountType; -exports.CacheError = indexNode.CacheError; -exports.CacheErrorCodes = indexNode.CacheErrorCodes; -exports.CacheHelpers = indexNode.CacheHelpers; -exports.CacheManager = indexNode.CacheManager; -exports.CacheOutcome = indexNode.CacheOutcome; -exports.CacheType = indexNode.CacheType; -exports.CcsCredentialType = indexNode.CcsCredentialType; -exports.ClaimsRequestKeys = indexNode.ClaimsRequestKeys; -exports.ClientAuthError = indexNode.ClientAuthError; -exports.ClientAuthErrorCodes = indexNode.ClientAuthErrorCodes; -exports.ClientAuthErrorMessage = indexNode.ClientAuthErrorMessage; -exports.ClientConfigurationError = indexNode.ClientConfigurationError; -exports.ClientConfigurationErrorCodes = indexNode.ClientConfigurationErrorCodes; -exports.ClientConfigurationErrorMessage = indexNode.ClientConfigurationErrorMessage; -exports.CodeChallengeMethodValues = indexNode.CodeChallengeMethodValues; -exports.Constants = indexNode.Constants; -exports.CredentialType = indexNode.CredentialType; -exports.DEFAULT_CRYPTO_IMPLEMENTATION = indexNode.DEFAULT_CRYPTO_IMPLEMENTATION; -exports.DEFAULT_SYSTEM_OPTIONS = indexNode.DEFAULT_SYSTEM_OPTIONS; -exports.DEFAULT_TOKEN_RENEWAL_OFFSET_SEC = indexNode.DEFAULT_TOKEN_RENEWAL_OFFSET_SEC; -exports.DefaultStorageClass = indexNode.DefaultStorageClass; -exports.Errors = indexNode.Errors; -exports.GrantType = indexNode.GrantType; -exports.HeaderNames = indexNode.HeaderNames; -exports.HttpStatus = indexNode.HttpStatus; -exports.IntFields = indexNode.IntFields; -exports.InteractionRequiredAuthError = indexNode.InteractionRequiredAuthError; -exports.InteractionRequiredAuthErrorCodes = indexNode.InteractionRequiredAuthErrorCodes; -exports.InteractionRequiredAuthErrorMessage = indexNode.InteractionRequiredAuthErrorMessage; -exports.JsonWebTokenTypes = indexNode.JsonWebTokenTypes; -Object.defineProperty(exports, "LogLevel", { - enumerable: true, - get: function () { return indexNode.LogLevel; } -}); -exports.Logger = indexNode.Logger; -exports.NetworkError = indexNode.NetworkError; -exports.OIDC_DEFAULT_SCOPES = indexNode.OIDC_DEFAULT_SCOPES; -exports.ONE_DAY_IN_MS = indexNode.ONE_DAY_IN_MS; -exports.PasswordGrantConstants = indexNode.PasswordGrantConstants; -exports.PerformanceEventStatus = indexNode.PerformanceEventStatus; -exports.PerformanceEvents = indexNode.PerformanceEvents; -exports.PersistentCacheKeys = indexNode.PersistentCacheKeys; -exports.PopTokenGenerator = indexNode.PopTokenGenerator; -exports.PromptValue = indexNode.PromptValue; -exports.ProtocolMode = indexNode.ProtocolMode; -exports.ProtocolUtils = indexNode.ProtocolUtils; -exports.RefreshTokenClient = indexNode.RefreshTokenClient; -exports.RequestParameterBuilder = indexNode.RequestParameterBuilder; -exports.ResponseHandler = indexNode.ResponseHandler; -exports.ResponseMode = indexNode.ResponseMode; -exports.ScopeSet = indexNode.ScopeSet; -exports.ServerError = indexNode.ServerError; -exports.ServerResponseType = indexNode.ServerResponseType; -exports.ServerTelemetryManager = indexNode.ServerTelemetryManager; -exports.SilentFlowClient = indexNode.SilentFlowClient; -exports.StringUtils = indexNode.StringUtils; -exports.StubbedNetworkModule = indexNode.StubbedNetworkModule; -exports.THE_FAMILY_ID = indexNode.THE_FAMILY_ID; -exports.ThrottlingConstants = indexNode.ThrottlingConstants; -exports.ThrottlingUtils = indexNode.ThrottlingUtils; -exports.TimeUtils = indexNode.TimeUtils; -exports.UrlString = indexNode.UrlString; -exports.UrlUtils = indexNode.UrlUtils; -exports.buildAccountToCache = indexNode.buildAccountToCache; -exports.buildClientInfo = indexNode.buildClientInfo; -exports.buildClientInfoFromHomeAccountId = indexNode.buildClientInfoFromHomeAccountId; -exports.buildStaticAuthorityOptions = indexNode.buildStaticAuthorityOptions; -exports.buildTenantProfile = indexNode.buildTenantProfile; -exports.createAuthError = indexNode.createAuthError; -exports.createCacheError = indexNode.createCacheError; -exports.createClientAuthError = indexNode.createClientAuthError; -exports.createClientConfigurationError = indexNode.createClientConfigurationError; -exports.createInteractionRequiredAuthError = indexNode.createInteractionRequiredAuthError; -exports.createNetworkError = indexNode.createNetworkError; -exports.formatAuthorityUri = indexNode.formatAuthorityUri; -exports.getTenantIdFromIdTokenClaims = indexNode.getTenantIdFromIdTokenClaims; -exports.invoke = indexNode.invoke; -exports.invokeAsync = indexNode.invokeAsync; -exports.tenantIdMatchesHomeTenant = indexNode.tenantIdMatchesHomeTenant; -exports.updateAccountTenantProfileData = indexNode.updateAccountTenantProfileData; -exports.version = indexNode.version; -exports.JoseHeader = JoseHeader; -exports.PerformanceClient = PerformanceClient; -exports.StubPerformanceClient = StubPerformanceClient; -//# sourceMappingURL=index-browser.cjs.map diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/index-browser.cjs.map b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/index-browser.cjs.map deleted file mode 100644 index 8506a1a..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/index-browser.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index-browser.cjs","sources":["../../src/error/JoseHeaderErrorCodes.ts","../../src/error/JoseHeaderError.ts","../../src/crypto/JoseHeader.ts","../../src/telemetry/performance/StubPerformanceClient.ts","../../src/telemetry/performance/PerformanceClient.ts"],"sourcesContent":[null,null,null,null,null],"names":["JoseHeaderErrorCodes.missingKidError","JoseHeaderErrorCodes.missingAlgError","AuthError","JsonWebTokenTypes","PerformanceEventStatus","ServerError","InteractionRequiredAuthError","CacheError","IntFields","PerformanceEventAbbreviations"],"mappings":";;;;;;AAAA;;;AAGG;AAEI,MAAM,eAAe,GAAG,mBAAmB,CAAC;AAC5C,MAAM,eAAe,GAAG,mBAAmB;;ACNlD;;;AAGG;AAMI,MAAM,uBAAuB,GAAG;AACnC,IAAA,CAACA,eAAoC,GACjC,oJAAoJ;AACxJ,IAAA,CAACC,eAAoC,GACjC,wJAAwJ;CAC/J,CAAC;AAEF;;AAEG;AACG,MAAO,eAAgB,SAAQC,mBAAS,CAAA;IAC1C,WAAY,CAAA,SAAiB,EAAE,YAAqB,EAAA;AAChD,QAAA,KAA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azure/msal-common/lib/index-node-CebvEPer.js b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/index-node-CebvEPer.js deleted file mode 100644 index 6493c59..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/index-node-CebvEPer.js +++ /dev/null @@ -1,8456 +0,0 @@ -/*! @azure/msal-common v14.16.1 2025-08-05 */ -'use strict'; -'use strict'; - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -const Constants = { - LIBRARY_NAME: "MSAL.JS", - SKU: "msal.js.common", - // Prefix for all library cache entries - CACHE_PREFIX: "msal", - // default authority - DEFAULT_AUTHORITY: "https://login.microsoftonline.com/common/", - DEFAULT_AUTHORITY_HOST: "login.microsoftonline.com", - DEFAULT_COMMON_TENANT: "common", - // ADFS String - ADFS: "adfs", - DSTS: "dstsv2", - // Default AAD Instance Discovery Endpoint - AAD_INSTANCE_DISCOVERY_ENDPT: "https://login.microsoftonline.com/common/discovery/instance?api-version=1.1&authorization_endpoint=", - // CIAM URL - CIAM_AUTH_URL: ".ciamlogin.com", - AAD_TENANT_DOMAIN_SUFFIX: ".onmicrosoft.com", - // Resource delimiter - used for certain cache entries - RESOURCE_DELIM: "|", - // Placeholder for non-existent account ids/objects - NO_ACCOUNT: "NO_ACCOUNT", - // Claims - CLAIMS: "claims", - // Consumer UTID - CONSUMER_UTID: "9188040d-6c67-4c5b-b112-36a304b66dad", - // Default scopes - OPENID_SCOPE: "openid", - PROFILE_SCOPE: "profile", - OFFLINE_ACCESS_SCOPE: "offline_access", - EMAIL_SCOPE: "email", - // Default response type for authorization code flow - CODE_RESPONSE_TYPE: "code", - CODE_GRANT_TYPE: "authorization_code", - RT_GRANT_TYPE: "refresh_token", - FRAGMENT_RESPONSE_MODE: "fragment", - S256_CODE_CHALLENGE_METHOD: "S256", - URL_FORM_CONTENT_TYPE: "application/x-www-form-urlencoded;charset=utf-8", - AUTHORIZATION_PENDING: "authorization_pending", - NOT_DEFINED: "not_defined", - EMPTY_STRING: "", - NOT_APPLICABLE: "N/A", - NOT_AVAILABLE: "Not Available", - FORWARD_SLASH: "/", - IMDS_ENDPOINT: "http://169.254.169.254/metadata/instance/compute/location", - IMDS_VERSION: "2020-06-01", - IMDS_TIMEOUT: 2000, - AZURE_REGION_AUTO_DISCOVER_FLAG: "TryAutoDetect", - REGIONAL_AUTH_PUBLIC_CLOUD_SUFFIX: "login.microsoft.com", - KNOWN_PUBLIC_CLOUDS: [ - "login.microsoftonline.com", - "login.windows.net", - "login.microsoft.com", - "sts.windows.net", - ], - TOKEN_RESPONSE_TYPE: "token", - ID_TOKEN_RESPONSE_TYPE: "id_token", - SHR_NONCE_VALIDITY: 240, - INVALID_INSTANCE: "invalid_instance", -}; -const HttpStatus = { - SUCCESS: 200, - SUCCESS_RANGE_START: 200, - SUCCESS_RANGE_END: 299, - REDIRECT: 302, - CLIENT_ERROR: 400, - CLIENT_ERROR_RANGE_START: 400, - BAD_REQUEST: 400, - UNAUTHORIZED: 401, - NOT_FOUND: 404, - REQUEST_TIMEOUT: 408, - TOO_MANY_REQUESTS: 429, - CLIENT_ERROR_RANGE_END: 499, - SERVER_ERROR: 500, - SERVER_ERROR_RANGE_START: 500, - SERVICE_UNAVAILABLE: 503, - GATEWAY_TIMEOUT: 504, - SERVER_ERROR_RANGE_END: 599, - MULTI_SIDED_ERROR: 600, -}; -const OIDC_DEFAULT_SCOPES = [ - Constants.OPENID_SCOPE, - Constants.PROFILE_SCOPE, - Constants.OFFLINE_ACCESS_SCOPE, -]; -const OIDC_SCOPES = [...OIDC_DEFAULT_SCOPES, Constants.EMAIL_SCOPE]; -/** - * Request header names - */ -const HeaderNames = { - CONTENT_TYPE: "Content-Type", - CONTENT_LENGTH: "Content-Length", - RETRY_AFTER: "Retry-After", - CCS_HEADER: "X-AnchorMailbox", - WWWAuthenticate: "WWW-Authenticate", - AuthenticationInfo: "Authentication-Info", - X_MS_REQUEST_ID: "x-ms-request-id", - X_MS_HTTP_VERSION: "x-ms-httpver", -}; -/** - * Persistent cache keys MSAL which stay while user is logged in. - */ -const PersistentCacheKeys = { - ID_TOKEN: "idtoken", - CLIENT_INFO: "client.info", - ADAL_ID_TOKEN: "adal.idtoken", - ERROR: "error", - ERROR_DESC: "error.description", - ACTIVE_ACCOUNT: "active-account", - ACTIVE_ACCOUNT_FILTERS: "active-account-filters", // new cache entry for active_account for a more robust version for browser -}; -/** - * String constants related to AAD Authority - */ -const AADAuthorityConstants = { - COMMON: "common", - ORGANIZATIONS: "organizations", - CONSUMERS: "consumers", -}; -/** - * Claims request keys - */ -const ClaimsRequestKeys = { - ACCESS_TOKEN: "access_token", - XMS_CC: "xms_cc", -}; -/** - * we considered making this "enum" in the request instead of string, however it looks like the allowed list of - * prompt values kept changing over past couple of years. There are some undocumented prompt values for some - * internal partners too, hence the choice of generic "string" type instead of the "enum" - */ -const PromptValue = { - LOGIN: "login", - SELECT_ACCOUNT: "select_account", - CONSENT: "consent", - NONE: "none", - CREATE: "create", - NO_SESSION: "no_session", -}; -/** - * allowed values for codeVerifier - */ -const CodeChallengeMethodValues = { - PLAIN: "plain", - S256: "S256", -}; -/** - * allowed values for server response type - */ -const ServerResponseType = { - QUERY: "query", - FRAGMENT: "fragment", -}; -/** - * allowed values for response_mode - */ -const ResponseMode = { - ...ServerResponseType, - FORM_POST: "form_post", -}; -/** - * allowed grant_type - */ -const GrantType = { - IMPLICIT_GRANT: "implicit", - AUTHORIZATION_CODE_GRANT: "authorization_code", - CLIENT_CREDENTIALS_GRANT: "client_credentials", - RESOURCE_OWNER_PASSWORD_GRANT: "password", - REFRESH_TOKEN_GRANT: "refresh_token", - DEVICE_CODE_GRANT: "device_code", - JWT_BEARER: "urn:ietf:params:oauth:grant-type:jwt-bearer", -}; -/** - * Account types in Cache - */ -const CacheAccountType = { - MSSTS_ACCOUNT_TYPE: "MSSTS", - ADFS_ACCOUNT_TYPE: "ADFS", - MSAV1_ACCOUNT_TYPE: "MSA", - GENERIC_ACCOUNT_TYPE: "Generic", // NTLM, Kerberos, FBA, Basic etc -}; -/** - * Separators used in cache - */ -const Separators = { - CACHE_KEY_SEPARATOR: "-", - CLIENT_INFO_SEPARATOR: ".", -}; -/** - * Credential Type stored in the cache - */ -const CredentialType = { - ID_TOKEN: "IdToken", - ACCESS_TOKEN: "AccessToken", - ACCESS_TOKEN_WITH_AUTH_SCHEME: "AccessToken_With_AuthScheme", - REFRESH_TOKEN: "RefreshToken", -}; -/** - * Combine all cache types - */ -const CacheType = { - ADFS: 1001, - MSA: 1002, - MSSTS: 1003, - GENERIC: 1004, - ACCESS_TOKEN: 2001, - REFRESH_TOKEN: 2002, - ID_TOKEN: 2003, - APP_METADATA: 3001, - UNDEFINED: 9999, -}; -/** - * More Cache related constants - */ -const APP_METADATA = "appmetadata"; -const CLIENT_INFO$1 = "client_info"; -const THE_FAMILY_ID = "1"; -const AUTHORITY_METADATA_CONSTANTS = { - CACHE_KEY: "authority-metadata", - REFRESH_TIME_SECONDS: 3600 * 24, // 24 Hours -}; -const AuthorityMetadataSource = { - CONFIG: "config", - CACHE: "cache", - NETWORK: "network", - HARDCODED_VALUES: "hardcoded_values", -}; -const SERVER_TELEM_CONSTANTS = { - SCHEMA_VERSION: 5, - MAX_CUR_HEADER_BYTES: 80, - MAX_LAST_HEADER_BYTES: 330, - MAX_CACHED_ERRORS: 50, - CACHE_KEY: "server-telemetry", - CATEGORY_SEPARATOR: "|", - VALUE_SEPARATOR: ",", - OVERFLOW_TRUE: "1", - OVERFLOW_FALSE: "0", - UNKNOWN_ERROR: "unknown_error", -}; -/** - * Type of the authentication request - */ -const AuthenticationScheme = { - BEARER: "Bearer", - POP: "pop", - SSH: "ssh-cert", -}; -/** - * Constants related to throttling - */ -const ThrottlingConstants = { - // Default time to throttle RequestThumbprint in seconds - DEFAULT_THROTTLE_TIME_SECONDS: 60, - // Default maximum time to throttle in seconds, overrides what the server sends back - DEFAULT_MAX_THROTTLE_TIME_SECONDS: 3600, - // Prefix for storing throttling entries - THROTTLING_PREFIX: "throttling", - // Value assigned to the x-ms-lib-capability header to indicate to the server the library supports throttling - X_MS_LIB_CAPABILITY_VALUE: "retry-after, h429", -}; -const Errors = { - INVALID_GRANT_ERROR: "invalid_grant", - CLIENT_MISMATCH_ERROR: "client_mismatch", -}; -/** - * Password grant parameters - */ -const PasswordGrantConstants = { - username: "username", - password: "password", -}; -/** - * Response codes - */ -const ResponseCodes = { - httpSuccess: 200, - httpBadRequest: 400, -}; -/** - * Region Discovery Sources - */ -const RegionDiscoverySources = { - FAILED_AUTO_DETECTION: "1", - INTERNAL_CACHE: "2", - ENVIRONMENT_VARIABLE: "3", - IMDS: "4", -}; -/** - * Region Discovery Outcomes - */ -const RegionDiscoveryOutcomes = { - CONFIGURED_MATCHES_DETECTED: "1", - CONFIGURED_NO_AUTO_DETECTION: "2", - CONFIGURED_NOT_DETECTED: "3", - AUTO_DETECTION_REQUESTED_SUCCESSFUL: "4", - AUTO_DETECTION_REQUESTED_FAILED: "5", -}; -/** - * Specifies the reason for fetching the access token from the identity provider - */ -const CacheOutcome = { - // When a token is found in the cache or the cache is not supposed to be hit when making the request - NOT_APPLICABLE: "0", - // When the token request goes to the identity provider because force_refresh was set to true. Also occurs if claims were requested - FORCE_REFRESH_OR_CLAIMS: "1", - // When the token request goes to the identity provider because no cached access token exists - NO_CACHED_ACCESS_TOKEN: "2", - // When the token request goes to the identity provider because cached access token expired - CACHED_ACCESS_TOKEN_EXPIRED: "3", - // When the token request goes to the identity provider because refresh_in was used and the existing token needs to be refreshed - PROACTIVELY_REFRESHED: "4", -}; -const JsonWebTokenTypes = { - Jwt: "JWT", - Jwk: "JWK", - Pop: "pop", -}; -const ONE_DAY_IN_MS = 86400000; -// Token renewal offset default in seconds -const DEFAULT_TOKEN_RENEWAL_OFFSET_SEC = 300; - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * AuthErrorMessage class containing string constants used by error codes and messages. - */ -const unexpectedError = "unexpected_error"; -const postRequestFailed = "post_request_failed"; - -var AuthErrorCodes = /*#__PURE__*/Object.freeze({ - __proto__: null, - postRequestFailed: postRequestFailed, - unexpectedError: unexpectedError -}); - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -const AuthErrorMessages = { - [unexpectedError]: "Unexpected error in authentication.", - [postRequestFailed]: "Post request failed from the network, could be a 4xx/5xx or a network unavailability. Please check the exact error code for details.", -}; -/** - * AuthErrorMessage class containing string constants used by error codes and messages. - * @deprecated Use AuthErrorCodes instead - */ -const AuthErrorMessage = { - unexpectedError: { - code: unexpectedError, - desc: AuthErrorMessages[unexpectedError], - }, - postRequestFailed: { - code: postRequestFailed, - desc: AuthErrorMessages[postRequestFailed], - }, -}; -/** - * General error class thrown by the MSAL.js library. - */ -class AuthError extends Error { - constructor(errorCode, errorMessage, suberror) { - const errorString = errorMessage - ? `${errorCode}: ${errorMessage}` - : errorCode; - super(errorString); - Object.setPrototypeOf(this, AuthError.prototype); - this.errorCode = errorCode || Constants.EMPTY_STRING; - this.errorMessage = errorMessage || Constants.EMPTY_STRING; - this.subError = suberror || Constants.EMPTY_STRING; - this.name = "AuthError"; - } - setCorrelationId(correlationId) { - this.correlationId = correlationId; - } -} -function createAuthError(code, additionalMessage) { - return new AuthError(code, additionalMessage - ? `${AuthErrorMessages[code]} ${additionalMessage}` - : AuthErrorMessages[code]); -} - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -const clientInfoDecodingError = "client_info_decoding_error"; -const clientInfoEmptyError = "client_info_empty_error"; -const tokenParsingError = "token_parsing_error"; -const nullOrEmptyToken = "null_or_empty_token"; -const endpointResolutionError = "endpoints_resolution_error"; -const networkError = "network_error"; -const openIdConfigError = "openid_config_error"; -const hashNotDeserialized = "hash_not_deserialized"; -const invalidState = "invalid_state"; -const stateMismatch = "state_mismatch"; -const stateNotFound = "state_not_found"; -const nonceMismatch = "nonce_mismatch"; -const authTimeNotFound = "auth_time_not_found"; -const maxAgeTranspired = "max_age_transpired"; -const multipleMatchingTokens = "multiple_matching_tokens"; -const multipleMatchingAccounts = "multiple_matching_accounts"; -const multipleMatchingAppMetadata = "multiple_matching_appMetadata"; -const requestCannotBeMade = "request_cannot_be_made"; -const cannotRemoveEmptyScope = "cannot_remove_empty_scope"; -const cannotAppendScopeSet = "cannot_append_scopeset"; -const emptyInputScopeSet = "empty_input_scopeset"; -const deviceCodePollingCancelled = "device_code_polling_cancelled"; -const deviceCodeExpired = "device_code_expired"; -const deviceCodeUnknownError = "device_code_unknown_error"; -const noAccountInSilentRequest = "no_account_in_silent_request"; -const invalidCacheRecord = "invalid_cache_record"; -const invalidCacheEnvironment = "invalid_cache_environment"; -const noAccountFound = "no_account_found"; -const noCryptoObject = "no_crypto_object"; -const unexpectedCredentialType = "unexpected_credential_type"; -const invalidAssertion = "invalid_assertion"; -const invalidClientCredential = "invalid_client_credential"; -const tokenRefreshRequired = "token_refresh_required"; -const userTimeoutReached = "user_timeout_reached"; -const tokenClaimsCnfRequiredForSignedJwt = "token_claims_cnf_required_for_signedjwt"; -const authorizationCodeMissingFromServerResponse = "authorization_code_missing_from_server_response"; -const bindingKeyNotRemoved = "binding_key_not_removed"; -const endSessionEndpointNotSupported = "end_session_endpoint_not_supported"; -const keyIdMissing = "key_id_missing"; -const noNetworkConnectivity = "no_network_connectivity"; -const userCanceled = "user_canceled"; -const missingTenantIdError = "missing_tenant_id_error"; -const methodNotImplemented = "method_not_implemented"; -const nestedAppAuthBridgeDisabled = "nested_app_auth_bridge_disabled"; - -var ClientAuthErrorCodes = /*#__PURE__*/Object.freeze({ - __proto__: null, - authTimeNotFound: authTimeNotFound, - authorizationCodeMissingFromServerResponse: authorizationCodeMissingFromServerResponse, - bindingKeyNotRemoved: bindingKeyNotRemoved, - cannotAppendScopeSet: cannotAppendScopeSet, - cannotRemoveEmptyScope: cannotRemoveEmptyScope, - clientInfoDecodingError: clientInfoDecodingError, - clientInfoEmptyError: clientInfoEmptyError, - deviceCodeExpired: deviceCodeExpired, - deviceCodePollingCancelled: deviceCodePollingCancelled, - deviceCodeUnknownError: deviceCodeUnknownError, - emptyInputScopeSet: emptyInputScopeSet, - endSessionEndpointNotSupported: endSessionEndpointNotSupported, - endpointResolutionError: endpointResolutionError, - hashNotDeserialized: hashNotDeserialized, - invalidAssertion: invalidAssertion, - invalidCacheEnvironment: invalidCacheEnvironment, - invalidCacheRecord: invalidCacheRecord, - invalidClientCredential: invalidClientCredential, - invalidState: invalidState, - keyIdMissing: keyIdMissing, - maxAgeTranspired: maxAgeTranspired, - methodNotImplemented: methodNotImplemented, - missingTenantIdError: missingTenantIdError, - multipleMatchingAccounts: multipleMatchingAccounts, - multipleMatchingAppMetadata: multipleMatchingAppMetadata, - multipleMatchingTokens: multipleMatchingTokens, - nestedAppAuthBridgeDisabled: nestedAppAuthBridgeDisabled, - networkError: networkError, - noAccountFound: noAccountFound, - noAccountInSilentRequest: noAccountInSilentRequest, - noCryptoObject: noCryptoObject, - noNetworkConnectivity: noNetworkConnectivity, - nonceMismatch: nonceMismatch, - nullOrEmptyToken: nullOrEmptyToken, - openIdConfigError: openIdConfigError, - requestCannotBeMade: requestCannotBeMade, - stateMismatch: stateMismatch, - stateNotFound: stateNotFound, - tokenClaimsCnfRequiredForSignedJwt: tokenClaimsCnfRequiredForSignedJwt, - tokenParsingError: tokenParsingError, - tokenRefreshRequired: tokenRefreshRequired, - unexpectedCredentialType: unexpectedCredentialType, - userCanceled: userCanceled, - userTimeoutReached: userTimeoutReached -}); - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * ClientAuthErrorMessage class containing string constants used by error codes and messages. - */ -const ClientAuthErrorMessages = { - [clientInfoDecodingError]: "The client info could not be parsed/decoded correctly", - [clientInfoEmptyError]: "The client info was empty", - [tokenParsingError]: "Token cannot be parsed", - [nullOrEmptyToken]: "The token is null or empty", - [endpointResolutionError]: "Endpoints cannot be resolved", - [networkError]: "Network request failed", - [openIdConfigError]: "Could not retrieve endpoints. Check your authority and verify the .well-known/openid-configuration endpoint returns the required endpoints.", - [hashNotDeserialized]: "The hash parameters could not be deserialized", - [invalidState]: "State was not the expected format", - [stateMismatch]: "State mismatch error", - [stateNotFound]: "State not found", - [nonceMismatch]: "Nonce mismatch error", - [authTimeNotFound]: "Max Age was requested and the ID token is missing the auth_time variable." + - " auth_time is an optional claim and is not enabled by default - it must be enabled." + - " See https://aka.ms/msaljs/optional-claims for more information.", - [maxAgeTranspired]: "Max Age is set to 0, or too much time has elapsed since the last end-user authentication.", - [multipleMatchingTokens]: "The cache contains multiple tokens satisfying the requirements. " + - "Call AcquireToken again providing more requirements such as authority or account.", - [multipleMatchingAccounts]: "The cache contains multiple accounts satisfying the given parameters. Please pass more info to obtain the correct account", - [multipleMatchingAppMetadata]: "The cache contains multiple appMetadata satisfying the given parameters. Please pass more info to obtain the correct appMetadata", - [requestCannotBeMade]: "Token request cannot be made without authorization code or refresh token.", - [cannotRemoveEmptyScope]: "Cannot remove null or empty scope from ScopeSet", - [cannotAppendScopeSet]: "Cannot append ScopeSet", - [emptyInputScopeSet]: "Empty input ScopeSet cannot be processed", - [deviceCodePollingCancelled]: "Caller has cancelled token endpoint polling during device code flow by setting DeviceCodeRequest.cancel = true.", - [deviceCodeExpired]: "Device code is expired.", - [deviceCodeUnknownError]: "Device code stopped polling for unknown reasons.", - [noAccountInSilentRequest]: "Please pass an account object, silent flow is not supported without account information", - [invalidCacheRecord]: "Cache record object was null or undefined.", - [invalidCacheEnvironment]: "Invalid environment when attempting to create cache entry", - [noAccountFound]: "No account found in cache for given key.", - [noCryptoObject]: "No crypto object detected.", - [unexpectedCredentialType]: "Unexpected credential type.", - [invalidAssertion]: "Client assertion must meet requirements described in https://tools.ietf.org/html/rfc7515", - [invalidClientCredential]: "Client credential (secret, certificate, or assertion) must not be empty when creating a confidential client. An application should at most have one credential", - [tokenRefreshRequired]: "Cannot return token from cache because it must be refreshed. This may be due to one of the following reasons: forceRefresh parameter is set to true, claims have been requested, there is no cached access token or it is expired.", - [userTimeoutReached]: "User defined timeout for device code polling reached", - [tokenClaimsCnfRequiredForSignedJwt]: "Cannot generate a POP jwt if the token_claims are not populated", - [authorizationCodeMissingFromServerResponse]: "Server response does not contain an authorization code to proceed", - [bindingKeyNotRemoved]: "Could not remove the credential's binding key from storage.", - [endSessionEndpointNotSupported]: "The provided authority does not support logout", - [keyIdMissing]: "A keyId value is missing from the requested bound token's cache record and is required to match the token to it's stored binding key.", - [noNetworkConnectivity]: "No network connectivity. Check your internet connection.", - [userCanceled]: "User cancelled the flow.", - [missingTenantIdError]: "A tenant id - not common, organizations, or consumers - must be specified when using the client_credentials flow.", - [methodNotImplemented]: "This method has not been implemented", - [nestedAppAuthBridgeDisabled]: "The nested app auth bridge is disabled", -}; -/** - * String constants used by error codes and messages. - * @deprecated Use ClientAuthErrorCodes instead - */ -const ClientAuthErrorMessage = { - clientInfoDecodingError: { - code: clientInfoDecodingError, - desc: ClientAuthErrorMessages[clientInfoDecodingError], - }, - clientInfoEmptyError: { - code: clientInfoEmptyError, - desc: ClientAuthErrorMessages[clientInfoEmptyError], - }, - tokenParsingError: { - code: tokenParsingError, - desc: ClientAuthErrorMessages[tokenParsingError], - }, - nullOrEmptyToken: { - code: nullOrEmptyToken, - desc: ClientAuthErrorMessages[nullOrEmptyToken], - }, - endpointResolutionError: { - code: endpointResolutionError, - desc: ClientAuthErrorMessages[endpointResolutionError], - }, - networkError: { - code: networkError, - desc: ClientAuthErrorMessages[networkError], - }, - unableToGetOpenidConfigError: { - code: openIdConfigError, - desc: ClientAuthErrorMessages[openIdConfigError], - }, - hashNotDeserialized: { - code: hashNotDeserialized, - desc: ClientAuthErrorMessages[hashNotDeserialized], - }, - invalidStateError: { - code: invalidState, - desc: ClientAuthErrorMessages[invalidState], - }, - stateMismatchError: { - code: stateMismatch, - desc: ClientAuthErrorMessages[stateMismatch], - }, - stateNotFoundError: { - code: stateNotFound, - desc: ClientAuthErrorMessages[stateNotFound], - }, - nonceMismatchError: { - code: nonceMismatch, - desc: ClientAuthErrorMessages[nonceMismatch], - }, - authTimeNotFoundError: { - code: authTimeNotFound, - desc: ClientAuthErrorMessages[authTimeNotFound], - }, - maxAgeTranspired: { - code: maxAgeTranspired, - desc: ClientAuthErrorMessages[maxAgeTranspired], - }, - multipleMatchingTokens: { - code: multipleMatchingTokens, - desc: ClientAuthErrorMessages[multipleMatchingTokens], - }, - multipleMatchingAccounts: { - code: multipleMatchingAccounts, - desc: ClientAuthErrorMessages[multipleMatchingAccounts], - }, - multipleMatchingAppMetadata: { - code: multipleMatchingAppMetadata, - desc: ClientAuthErrorMessages[multipleMatchingAppMetadata], - }, - tokenRequestCannotBeMade: { - code: requestCannotBeMade, - desc: ClientAuthErrorMessages[requestCannotBeMade], - }, - removeEmptyScopeError: { - code: cannotRemoveEmptyScope, - desc: ClientAuthErrorMessages[cannotRemoveEmptyScope], - }, - appendScopeSetError: { - code: cannotAppendScopeSet, - desc: ClientAuthErrorMessages[cannotAppendScopeSet], - }, - emptyInputScopeSetError: { - code: emptyInputScopeSet, - desc: ClientAuthErrorMessages[emptyInputScopeSet], - }, - DeviceCodePollingCancelled: { - code: deviceCodePollingCancelled, - desc: ClientAuthErrorMessages[deviceCodePollingCancelled], - }, - DeviceCodeExpired: { - code: deviceCodeExpired, - desc: ClientAuthErrorMessages[deviceCodeExpired], - }, - DeviceCodeUnknownError: { - code: deviceCodeUnknownError, - desc: ClientAuthErrorMessages[deviceCodeUnknownError], - }, - NoAccountInSilentRequest: { - code: noAccountInSilentRequest, - desc: ClientAuthErrorMessages[noAccountInSilentRequest], - }, - invalidCacheRecord: { - code: invalidCacheRecord, - desc: ClientAuthErrorMessages[invalidCacheRecord], - }, - invalidCacheEnvironment: { - code: invalidCacheEnvironment, - desc: ClientAuthErrorMessages[invalidCacheEnvironment], - }, - noAccountFound: { - code: noAccountFound, - desc: ClientAuthErrorMessages[noAccountFound], - }, - noCryptoObj: { - code: noCryptoObject, - desc: ClientAuthErrorMessages[noCryptoObject], - }, - unexpectedCredentialType: { - code: unexpectedCredentialType, - desc: ClientAuthErrorMessages[unexpectedCredentialType], - }, - invalidAssertion: { - code: invalidAssertion, - desc: ClientAuthErrorMessages[invalidAssertion], - }, - invalidClientCredential: { - code: invalidClientCredential, - desc: ClientAuthErrorMessages[invalidClientCredential], - }, - tokenRefreshRequired: { - code: tokenRefreshRequired, - desc: ClientAuthErrorMessages[tokenRefreshRequired], - }, - userTimeoutReached: { - code: userTimeoutReached, - desc: ClientAuthErrorMessages[userTimeoutReached], - }, - tokenClaimsRequired: { - code: tokenClaimsCnfRequiredForSignedJwt, - desc: ClientAuthErrorMessages[tokenClaimsCnfRequiredForSignedJwt], - }, - noAuthorizationCodeFromServer: { - code: authorizationCodeMissingFromServerResponse, - desc: ClientAuthErrorMessages[authorizationCodeMissingFromServerResponse], - }, - bindingKeyNotRemovedError: { - code: bindingKeyNotRemoved, - desc: ClientAuthErrorMessages[bindingKeyNotRemoved], - }, - logoutNotSupported: { - code: endSessionEndpointNotSupported, - desc: ClientAuthErrorMessages[endSessionEndpointNotSupported], - }, - keyIdMissing: { - code: keyIdMissing, - desc: ClientAuthErrorMessages[keyIdMissing], - }, - noNetworkConnectivity: { - code: noNetworkConnectivity, - desc: ClientAuthErrorMessages[noNetworkConnectivity], - }, - userCanceledError: { - code: userCanceled, - desc: ClientAuthErrorMessages[userCanceled], - }, - missingTenantIdError: { - code: missingTenantIdError, - desc: ClientAuthErrorMessages[missingTenantIdError], - }, - nestedAppAuthBridgeDisabled: { - code: nestedAppAuthBridgeDisabled, - desc: ClientAuthErrorMessages[nestedAppAuthBridgeDisabled], - }, -}; -/** - * Error thrown when there is an error in the client code running on the browser. - */ -class ClientAuthError extends AuthError { - constructor(errorCode, additionalMessage) { - super(errorCode, additionalMessage - ? `${ClientAuthErrorMessages[errorCode]}: ${additionalMessage}` - : ClientAuthErrorMessages[errorCode]); - this.name = "ClientAuthError"; - Object.setPrototypeOf(this, ClientAuthError.prototype); - } -} -function createClientAuthError(errorCode, additionalMessage) { - return new ClientAuthError(errorCode, additionalMessage); -} - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * Extract token by decoding the rawToken - * - * @param encodedToken - */ -function extractTokenClaims(encodedToken, base64Decode) { - const jswPayload = getJWSPayload(encodedToken); - // token will be decoded to get the username - try { - // base64Decode() should throw an error if there is an issue - const base64Decoded = base64Decode(jswPayload); - return JSON.parse(base64Decoded); - } - catch (err) { - throw createClientAuthError(tokenParsingError); - } -} -/** - * decode a JWT - * - * @param authToken - */ -function getJWSPayload(authToken) { - if (!authToken) { - throw createClientAuthError(nullOrEmptyToken); - } - const tokenPartsRegex = /^([^\.\s]*)\.([^\.\s]+)\.([^\.\s]*)$/; - const matches = tokenPartsRegex.exec(authToken); - if (!matches || matches.length < 4) { - throw createClientAuthError(tokenParsingError); - } - /** - * const crackedToken = { - * header: matches[1], - * JWSPayload: matches[2], - * JWSSig: matches[3], - * }; - */ - return matches[2]; -} -/** - * Determine if the token's max_age has transpired - */ -function checkMaxAge(authTime, maxAge) { - /* - * per https://openid.net/specs/openid-connect-core-1_0.html#AuthRequest - * To force an immediate re-authentication: If an app requires that a user re-authenticate prior to access, - * provide a value of 0 for the max_age parameter and the AS will force a fresh login. - */ - const fiveMinuteSkew = 300000; // five minutes in milliseconds - if (maxAge === 0 || Date.now() - fiveMinuteSkew > authTime + maxAge) { - throw createClientAuthError(maxAgeTranspired); - } -} - -var AuthToken = /*#__PURE__*/Object.freeze({ - __proto__: null, - checkMaxAge: checkMaxAge, - extractTokenClaims: extractTokenClaims, - getJWSPayload: getJWSPayload -}); - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * Authority types supported by MSAL. - */ -const AuthorityType = { - Default: 0, - Adfs: 1, - Dsts: 2, - Ciam: 3, -}; - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -function isOpenIdConfigResponse(response) { - return (response.hasOwnProperty("authorization_endpoint") && - response.hasOwnProperty("token_endpoint") && - response.hasOwnProperty("issuer") && - response.hasOwnProperty("jwks_uri")); -} - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -const redirectUriEmpty = "redirect_uri_empty"; -const claimsRequestParsingError = "claims_request_parsing_error"; -const authorityUriInsecure = "authority_uri_insecure"; -const urlParseError = "url_parse_error"; -const urlEmptyError = "empty_url_error"; -const emptyInputScopesError = "empty_input_scopes_error"; -const invalidPromptValue = "invalid_prompt_value"; -const invalidClaims = "invalid_claims"; -const tokenRequestEmpty = "token_request_empty"; -const logoutRequestEmpty = "logout_request_empty"; -const invalidCodeChallengeMethod = "invalid_code_challenge_method"; -const pkceParamsMissing = "pkce_params_missing"; -const invalidCloudDiscoveryMetadata = "invalid_cloud_discovery_metadata"; -const invalidAuthorityMetadata = "invalid_authority_metadata"; -const untrustedAuthority = "untrusted_authority"; -const missingSshJwk = "missing_ssh_jwk"; -const missingSshKid = "missing_ssh_kid"; -const missingNonceAuthenticationHeader = "missing_nonce_authentication_header"; -const invalidAuthenticationHeader = "invalid_authentication_header"; -const cannotSetOIDCOptions = "cannot_set_OIDCOptions"; -const cannotAllowNativeBroker = "cannot_allow_native_broker"; -const authorityMismatch = "authority_mismatch"; - -var ClientConfigurationErrorCodes = /*#__PURE__*/Object.freeze({ - __proto__: null, - authorityMismatch: authorityMismatch, - authorityUriInsecure: authorityUriInsecure, - cannotAllowNativeBroker: cannotAllowNativeBroker, - cannotSetOIDCOptions: cannotSetOIDCOptions, - claimsRequestParsingError: claimsRequestParsingError, - emptyInputScopesError: emptyInputScopesError, - invalidAuthenticationHeader: invalidAuthenticationHeader, - invalidAuthorityMetadata: invalidAuthorityMetadata, - invalidClaims: invalidClaims, - invalidCloudDiscoveryMetadata: invalidCloudDiscoveryMetadata, - invalidCodeChallengeMethod: invalidCodeChallengeMethod, - invalidPromptValue: invalidPromptValue, - logoutRequestEmpty: logoutRequestEmpty, - missingNonceAuthenticationHeader: missingNonceAuthenticationHeader, - missingSshJwk: missingSshJwk, - missingSshKid: missingSshKid, - pkceParamsMissing: pkceParamsMissing, - redirectUriEmpty: redirectUriEmpty, - tokenRequestEmpty: tokenRequestEmpty, - untrustedAuthority: untrustedAuthority, - urlEmptyError: urlEmptyError, - urlParseError: urlParseError -}); - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -const ClientConfigurationErrorMessages = { - [redirectUriEmpty]: "A redirect URI is required for all calls, and none has been set.", - [claimsRequestParsingError]: "Could not parse the given claims request object.", - [authorityUriInsecure]: "Authority URIs must use https. Please see here for valid authority configuration options: https://docs.microsoft.com/en-us/azure/active-directory/develop/msal-js-initializing-client-applications#configuration-options", - [urlParseError]: "URL could not be parsed into appropriate segments.", - [urlEmptyError]: "URL was empty or null.", - [emptyInputScopesError]: "Scopes cannot be passed as null, undefined or empty array because they are required to obtain an access token.", - [invalidPromptValue]: "Please see here for valid configuration options: https://azuread.github.io/microsoft-authentication-library-for-js/ref/modules/_azure_msal_common.html#commonauthorizationurlrequest", - [invalidClaims]: "Given claims parameter must be a stringified JSON object.", - [tokenRequestEmpty]: "Token request was empty and not found in cache.", - [logoutRequestEmpty]: "The logout request was null or undefined.", - [invalidCodeChallengeMethod]: 'code_challenge_method passed is invalid. Valid values are "plain" and "S256".', - [pkceParamsMissing]: "Both params: code_challenge and code_challenge_method are to be passed if to be sent in the request", - [invalidCloudDiscoveryMetadata]: "Invalid cloudDiscoveryMetadata provided. Must be a stringified JSON object containing tenant_discovery_endpoint and metadata fields", - [invalidAuthorityMetadata]: "Invalid authorityMetadata provided. Must by a stringified JSON object containing authorization_endpoint, token_endpoint, issuer fields.", - [untrustedAuthority]: "The provided authority is not a trusted authority. Please include this authority in the knownAuthorities config parameter.", - [missingSshJwk]: "Missing sshJwk in SSH certificate request. A stringified JSON Web Key is required when using the SSH authentication scheme.", - [missingSshKid]: "Missing sshKid in SSH certificate request. A string that uniquely identifies the public SSH key is required when using the SSH authentication scheme.", - [missingNonceAuthenticationHeader]: "Unable to find an authentication header containing server nonce. Either the Authentication-Info or WWW-Authenticate headers must be present in order to obtain a server nonce.", - [invalidAuthenticationHeader]: "Invalid authentication header provided", - [cannotSetOIDCOptions]: "Cannot set OIDCOptions parameter. Please change the protocol mode to OIDC or use a non-Microsoft authority.", - [cannotAllowNativeBroker]: "Cannot set allowNativeBroker parameter to true when not in AAD protocol mode.", - [authorityMismatch]: "Authority mismatch error. Authority provided in login request or PublicClientApplication config does not match the environment of the provided account. Please use a matching account or make an interactive request to login to this authority.", -}; -/** - * ClientConfigurationErrorMessage class containing string constants used by error codes and messages. - * @deprecated Use ClientConfigurationErrorCodes instead - */ -const ClientConfigurationErrorMessage = { - redirectUriNotSet: { - code: redirectUriEmpty, - desc: ClientConfigurationErrorMessages[redirectUriEmpty], - }, - claimsRequestParsingError: { - code: claimsRequestParsingError, - desc: ClientConfigurationErrorMessages[claimsRequestParsingError], - }, - authorityUriInsecure: { - code: authorityUriInsecure, - desc: ClientConfigurationErrorMessages[authorityUriInsecure], - }, - urlParseError: { - code: urlParseError, - desc: ClientConfigurationErrorMessages[urlParseError], - }, - urlEmptyError: { - code: urlEmptyError, - desc: ClientConfigurationErrorMessages[urlEmptyError], - }, - emptyScopesError: { - code: emptyInputScopesError, - desc: ClientConfigurationErrorMessages[emptyInputScopesError], - }, - invalidPrompt: { - code: invalidPromptValue, - desc: ClientConfigurationErrorMessages[invalidPromptValue], - }, - invalidClaimsRequest: { - code: invalidClaims, - desc: ClientConfigurationErrorMessages[invalidClaims], - }, - tokenRequestEmptyError: { - code: tokenRequestEmpty, - desc: ClientConfigurationErrorMessages[tokenRequestEmpty], - }, - logoutRequestEmptyError: { - code: logoutRequestEmpty, - desc: ClientConfigurationErrorMessages[logoutRequestEmpty], - }, - invalidCodeChallengeMethod: { - code: invalidCodeChallengeMethod, - desc: ClientConfigurationErrorMessages[invalidCodeChallengeMethod], - }, - invalidCodeChallengeParams: { - code: pkceParamsMissing, - desc: ClientConfigurationErrorMessages[pkceParamsMissing], - }, - invalidCloudDiscoveryMetadata: { - code: invalidCloudDiscoveryMetadata, - desc: ClientConfigurationErrorMessages[invalidCloudDiscoveryMetadata], - }, - invalidAuthorityMetadata: { - code: invalidAuthorityMetadata, - desc: ClientConfigurationErrorMessages[invalidAuthorityMetadata], - }, - untrustedAuthority: { - code: untrustedAuthority, - desc: ClientConfigurationErrorMessages[untrustedAuthority], - }, - missingSshJwk: { - code: missingSshJwk, - desc: ClientConfigurationErrorMessages[missingSshJwk], - }, - missingSshKid: { - code: missingSshKid, - desc: ClientConfigurationErrorMessages[missingSshKid], - }, - missingNonceAuthenticationHeader: { - code: missingNonceAuthenticationHeader, - desc: ClientConfigurationErrorMessages[missingNonceAuthenticationHeader], - }, - invalidAuthenticationHeader: { - code: invalidAuthenticationHeader, - desc: ClientConfigurationErrorMessages[invalidAuthenticationHeader], - }, - cannotSetOIDCOptions: { - code: cannotSetOIDCOptions, - desc: ClientConfigurationErrorMessages[cannotSetOIDCOptions], - }, - cannotAllowNativeBroker: { - code: cannotAllowNativeBroker, - desc: ClientConfigurationErrorMessages[cannotAllowNativeBroker], - }, - authorityMismatch: { - code: authorityMismatch, - desc: ClientConfigurationErrorMessages[authorityMismatch], - }, -}; -/** - * Error thrown when there is an error in configuration of the MSAL.js library. - */ -class ClientConfigurationError extends AuthError { - constructor(errorCode) { - super(errorCode, ClientConfigurationErrorMessages[errorCode]); - this.name = "ClientConfigurationError"; - Object.setPrototypeOf(this, ClientConfigurationError.prototype); - } -} -function createClientConfigurationError(errorCode) { - return new ClientConfigurationError(errorCode); -} - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * @hidden - */ -class StringUtils { - /** - * Check if stringified object is empty - * @param strObj - */ - static isEmptyObj(strObj) { - if (strObj) { - try { - const obj = JSON.parse(strObj); - return Object.keys(obj).length === 0; - } - catch (e) { } - } - return true; - } - static startsWith(str, search) { - return str.indexOf(search) === 0; - } - static endsWith(str, search) { - return (str.length >= search.length && - str.lastIndexOf(search) === str.length - search.length); - } - /** - * Parses string into an object. - * - * @param query - */ - static queryStringToObject(query) { - const obj = {}; - const params = query.split("&"); - const decode = (s) => decodeURIComponent(s.replace(/\+/g, " ")); - params.forEach((pair) => { - if (pair.trim()) { - const [key, value] = pair.split(/=(.+)/g, 2); // Split on the first occurence of the '=' character - if (key && value) { - obj[decode(key)] = decode(value); - } - } - }); - return obj; - } - /** - * Trims entries in an array. - * - * @param arr - */ - static trimArrayEntries(arr) { - return arr.map((entry) => entry.trim()); - } - /** - * Removes empty strings from array - * @param arr - */ - static removeEmptyStringsFromArray(arr) { - return arr.filter((entry) => { - return !!entry; - }); - } - /** - * Attempts to parse a string into JSON - * @param str - */ - static jsonParseHelper(str) { - try { - return JSON.parse(str); - } - catch (e) { - return null; - } - } - /** - * Tests if a given string matches a given pattern, with support for wildcards and queries. - * @param pattern Wildcard pattern to string match. Supports "*" for wildcards and "?" for queries - * @param input String to match against - */ - static matchPattern(pattern, input) { - /** - * Wildcard support: https://stackoverflow.com/a/3117248/4888559 - * Queries: replaces "?" in string with escaped "\?" for regex test - */ - // eslint-disable-next-line security/detect-non-literal-regexp - const regex = new RegExp(pattern - .replace(/\\/g, "\\\\") - .replace(/\*/g, "[^ ]*") - .replace(/\?/g, "\\?")); - return regex.test(input); - } -} - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * Parses hash string from given string. Returns empty string if no hash symbol is found. - * @param hashString - */ -function stripLeadingHashOrQuery(responseString) { - if (responseString.startsWith("#/")) { - return responseString.substring(2); - } - else if (responseString.startsWith("#") || - responseString.startsWith("?")) { - return responseString.substring(1); - } - return responseString; -} -/** - * Returns URL hash as server auth code response object. - */ -function getDeserializedResponse(responseString) { - // Check if given hash is empty - if (!responseString || responseString.indexOf("=") < 0) { - return null; - } - try { - // Strip the # or ? symbol if present - const normalizedResponse = stripLeadingHashOrQuery(responseString); - // If # symbol was not present, above will return empty string, so give original hash value - const deserializedHash = Object.fromEntries(new URLSearchParams(normalizedResponse)); - // Check for known response properties - if (deserializedHash.code || - deserializedHash.error || - deserializedHash.error_description || - deserializedHash.state) { - return deserializedHash; - } - } - catch (e) { - throw createClientAuthError(hashNotDeserialized); - } - return null; -} - -var UrlUtils = /*#__PURE__*/Object.freeze({ - __proto__: null, - getDeserializedResponse: getDeserializedResponse, - stripLeadingHashOrQuery: stripLeadingHashOrQuery -}); - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * Url object class which can perform various transformations on url strings. - */ -class UrlString { - get urlString() { - return this._urlString; - } - constructor(url) { - this._urlString = url; - if (!this._urlString) { - // Throws error if url is empty - throw createClientConfigurationError(urlEmptyError); - } - if (!url.includes("#")) { - this._urlString = UrlString.canonicalizeUri(url); - } - } - /** - * Ensure urls are lower case and end with a / character. - * @param url - */ - static canonicalizeUri(url) { - if (url) { - let lowerCaseUrl = url.toLowerCase(); - if (StringUtils.endsWith(lowerCaseUrl, "?")) { - lowerCaseUrl = lowerCaseUrl.slice(0, -1); - } - else if (StringUtils.endsWith(lowerCaseUrl, "?/")) { - lowerCaseUrl = lowerCaseUrl.slice(0, -2); - } - if (!StringUtils.endsWith(lowerCaseUrl, "/")) { - lowerCaseUrl += "/"; - } - return lowerCaseUrl; - } - return url; - } - /** - * Throws if urlString passed is not a valid authority URI string. - */ - validateAsUri() { - // Attempts to parse url for uri components - let components; - try { - components = this.getUrlComponents(); - } - catch (e) { - throw createClientConfigurationError(urlParseError); - } - // Throw error if URI or path segments are not parseable. - if (!components.HostNameAndPort || !components.PathSegments) { - throw createClientConfigurationError(urlParseError); - } - // Throw error if uri is insecure. - if (!components.Protocol || - components.Protocol.toLowerCase() !== "https:") { - throw createClientConfigurationError(authorityUriInsecure); - } - } - /** - * Given a url and a query string return the url with provided query string appended - * @param url - * @param queryString - */ - static appendQueryString(url, queryString) { - if (!queryString) { - return url; - } - return url.indexOf("?") < 0 - ? `${url}?${queryString}` - : `${url}&${queryString}`; - } - /** - * Returns a url with the hash removed - * @param url - */ - static removeHashFromUrl(url) { - return UrlString.canonicalizeUri(url.split("#")[0]); - } - /** - * Given a url like https://a:b/common/d?e=f#g, and a tenantId, returns https://a:b/tenantId/d - * @param href The url - * @param tenantId The tenant id to replace - */ - replaceTenantPath(tenantId) { - const urlObject = this.getUrlComponents(); - const pathArray = urlObject.PathSegments; - if (tenantId && - pathArray.length !== 0 && - (pathArray[0] === AADAuthorityConstants.COMMON || - pathArray[0] === AADAuthorityConstants.ORGANIZATIONS)) { - pathArray[0] = tenantId; - } - return UrlString.constructAuthorityUriFromObject(urlObject); - } - /** - * Parses out the components from a url string. - * @returns An object with the various components. Please cache this value insted of calling this multiple times on the same url. - */ - getUrlComponents() { - // https://gist.github.com/curtisz/11139b2cfcaef4a261e0 - const regEx = RegExp("^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?"); - // If url string does not match regEx, we throw an error - const match = this.urlString.match(regEx); - if (!match) { - throw createClientConfigurationError(urlParseError); - } - // Url component object - const urlComponents = { - Protocol: match[1], - HostNameAndPort: match[4], - AbsolutePath: match[5], - QueryString: match[7], - }; - let pathSegments = urlComponents.AbsolutePath.split("/"); - pathSegments = pathSegments.filter((val) => val && val.length > 0); // remove empty elements - urlComponents.PathSegments = pathSegments; - if (urlComponents.QueryString && - urlComponents.QueryString.endsWith("/")) { - urlComponents.QueryString = urlComponents.QueryString.substring(0, urlComponents.QueryString.length - 1); - } - return urlComponents; - } - static getDomainFromUrl(url) { - const regEx = RegExp("^([^:/?#]+://)?([^/?#]*)"); - const match = url.match(regEx); - if (!match) { - throw createClientConfigurationError(urlParseError); - } - return match[2]; - } - static getAbsoluteUrl(relativeUrl, baseUrl) { - if (relativeUrl[0] === Constants.FORWARD_SLASH) { - const url = new UrlString(baseUrl); - const baseComponents = url.getUrlComponents(); - return (baseComponents.Protocol + - "//" + - baseComponents.HostNameAndPort + - relativeUrl); - } - return relativeUrl; - } - static constructAuthorityUriFromObject(urlObject) { - return new UrlString(urlObject.Protocol + - "//" + - urlObject.HostNameAndPort + - "/" + - urlObject.PathSegments.join("/")); - } - /** - * Check if the hash of the URL string contains known properties - * @deprecated This API will be removed in a future version - */ - static hashContainsKnownProperties(response) { - return !!getDeserializedResponse(response); - } -} - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -const rawMetdataJSON = { - endpointMetadata: { - "login.microsoftonline.com": { - token_endpoint: "https://login.microsoftonline.com/{tenantid}/oauth2/v2.0/token", - jwks_uri: "https://login.microsoftonline.com/{tenantid}/discovery/v2.0/keys", - issuer: "https://login.microsoftonline.com/{tenantid}/v2.0", - authorization_endpoint: "https://login.microsoftonline.com/{tenantid}/oauth2/v2.0/authorize", - end_session_endpoint: "https://login.microsoftonline.com/{tenantid}/oauth2/v2.0/logout", - }, - "login.chinacloudapi.cn": { - token_endpoint: "https://login.chinacloudapi.cn/{tenantid}/oauth2/v2.0/token", - jwks_uri: "https://login.chinacloudapi.cn/{tenantid}/discovery/v2.0/keys", - issuer: "https://login.partner.microsoftonline.cn/{tenantid}/v2.0", - authorization_endpoint: "https://login.chinacloudapi.cn/{tenantid}/oauth2/v2.0/authorize", - end_session_endpoint: "https://login.chinacloudapi.cn/{tenantid}/oauth2/v2.0/logout", - }, - "login.microsoftonline.us": { - token_endpoint: "https://login.microsoftonline.us/{tenantid}/oauth2/v2.0/token", - jwks_uri: "https://login.microsoftonline.us/{tenantid}/discovery/v2.0/keys", - issuer: "https://login.microsoftonline.us/{tenantid}/v2.0", - authorization_endpoint: "https://login.microsoftonline.us/{tenantid}/oauth2/v2.0/authorize", - end_session_endpoint: "https://login.microsoftonline.us/{tenantid}/oauth2/v2.0/logout", - }, - }, - instanceDiscoveryMetadata: { - tenant_discovery_endpoint: "https://{canonicalAuthority}/v2.0/.well-known/openid-configuration", - metadata: [ - { - preferred_network: "login.microsoftonline.com", - preferred_cache: "login.windows.net", - aliases: [ - "login.microsoftonline.com", - "login.windows.net", - "login.microsoft.com", - "sts.windows.net", - ], - }, - { - preferred_network: "login.partner.microsoftonline.cn", - preferred_cache: "login.partner.microsoftonline.cn", - aliases: [ - "login.partner.microsoftonline.cn", - "login.chinacloudapi.cn", - ], - }, - { - preferred_network: "login.microsoftonline.de", - preferred_cache: "login.microsoftonline.de", - aliases: ["login.microsoftonline.de"], - }, - { - preferred_network: "login.microsoftonline.us", - preferred_cache: "login.microsoftonline.us", - aliases: [ - "login.microsoftonline.us", - "login.usgovcloudapi.net", - ], - }, - { - preferred_network: "login-us.microsoftonline.com", - preferred_cache: "login-us.microsoftonline.com", - aliases: ["login-us.microsoftonline.com"], - }, - ], - }, -}; -const EndpointMetadata = rawMetdataJSON.endpointMetadata; -const InstanceDiscoveryMetadata = rawMetdataJSON.instanceDiscoveryMetadata; -const InstanceDiscoveryMetadataAliases = new Set(); -InstanceDiscoveryMetadata.metadata.forEach((metadataEntry) => { - metadataEntry.aliases.forEach((alias) => { - InstanceDiscoveryMetadataAliases.add(alias); - }); -}); -/** - * Attempts to get an aliases array from the static authority metadata sources based on the canonical authority host - * @param staticAuthorityOptions - * @param logger - * @returns - */ -function getAliasesFromStaticSources(staticAuthorityOptions, logger) { - let staticAliases; - const canonicalAuthority = staticAuthorityOptions.canonicalAuthority; - if (canonicalAuthority) { - const authorityHost = new UrlString(canonicalAuthority).getUrlComponents().HostNameAndPort; - staticAliases = - getAliasesFromMetadata(authorityHost, staticAuthorityOptions.cloudDiscoveryMetadata?.metadata, AuthorityMetadataSource.CONFIG, logger) || - getAliasesFromMetadata(authorityHost, InstanceDiscoveryMetadata.metadata, AuthorityMetadataSource.HARDCODED_VALUES, logger) || - staticAuthorityOptions.knownAuthorities; - } - return staticAliases || []; -} -/** - * Returns aliases for from the raw cloud discovery metadata passed in - * @param authorityHost - * @param rawCloudDiscoveryMetadata - * @returns - */ -function getAliasesFromMetadata(authorityHost, cloudDiscoveryMetadata, source, logger) { - logger?.trace(`getAliasesFromMetadata called with source: ${source}`); - if (authorityHost && cloudDiscoveryMetadata) { - const metadata = getCloudDiscoveryMetadataFromNetworkResponse(cloudDiscoveryMetadata, authorityHost); - if (metadata) { - logger?.trace(`getAliasesFromMetadata: found cloud discovery metadata in ${source}, returning aliases`); - return metadata.aliases; - } - else { - logger?.trace(`getAliasesFromMetadata: did not find cloud discovery metadata in ${source}`); - } - } - return null; -} -/** - * Get cloud discovery metadata for common authorities - */ -function getCloudDiscoveryMetadataFromHardcodedValues(authorityHost) { - const metadata = getCloudDiscoveryMetadataFromNetworkResponse(InstanceDiscoveryMetadata.metadata, authorityHost); - return metadata; -} -/** - * Searches instance discovery network response for the entry that contains the host in the aliases list - * @param response - * @param authority - */ -function getCloudDiscoveryMetadataFromNetworkResponse(response, authorityHost) { - for (let i = 0; i < response.length; i++) { - const metadata = response[i]; - if (metadata.aliases.includes(authorityHost)) { - return metadata; - } - } - return null; -} - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * Protocol modes supported by MSAL. - */ -const ProtocolMode = { - AAD: "AAD", - OIDC: "OIDC", -}; - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -const AzureCloudInstance = { - // AzureCloudInstance is not specified. - None: "none", - // Microsoft Azure public cloud - AzurePublic: "https://login.microsoftonline.com", - // Microsoft PPE - AzurePpe: "https://login.windows-ppe.net", - // Microsoft Chinese national/regional cloud - AzureChina: "https://login.chinacloudapi.cn", - // Microsoft German national/regional cloud ("Black Forest") - AzureGermany: "https://login.microsoftonline.de", - // US Government cloud - AzureUsGovernment: "https://login.microsoftonline.us", -}; - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -function isCloudInstanceDiscoveryResponse(response) { - return (response.hasOwnProperty("tenant_discovery_endpoint") && - response.hasOwnProperty("metadata")); -} - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -function isCloudInstanceDiscoveryErrorResponse(response) { - return (response.hasOwnProperty("error") && - response.hasOwnProperty("error_description")); -} - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * Enumeration of operations that are instrumented by have their performance measured by the PerformanceClient. - * - * @export - * @enum {number} - */ -const PerformanceEvents = { - /** - * acquireTokenByCode API (msal-browser and msal-node). - * Used to acquire tokens by trading an authorization code against the token endpoint. - */ - AcquireTokenByCode: "acquireTokenByCode", - /** - * acquireTokenByRefreshToken API (msal-browser and msal-node). - * Used to renew an access token using a refresh token against the token endpoint. - */ - AcquireTokenByRefreshToken: "acquireTokenByRefreshToken", - /** - * acquireTokenSilent API (msal-browser and msal-node). - * Used to silently acquire a new access token (from the cache or the network). - */ - AcquireTokenSilent: "acquireTokenSilent", - /** - * acquireTokenSilentAsync (msal-browser). - * Internal API for acquireTokenSilent. - */ - AcquireTokenSilentAsync: "acquireTokenSilentAsync", - /** - * acquireTokenPopup (msal-browser). - * Used to acquire a new access token interactively through pop ups - */ - AcquireTokenPopup: "acquireTokenPopup", - /** - * acquireTokenPreRedirect (msal-browser). - * First part of the redirect flow. - * Used to acquire a new access token interactively through redirects. - */ - AcquireTokenPreRedirect: "acquireTokenPreRedirect", - /** - * acquireTokenRedirect (msal-browser). - * Second part of the redirect flow. - * Used to acquire a new access token interactively through redirects. - */ - AcquireTokenRedirect: "acquireTokenRedirect", - /** - * getPublicKeyThumbprint API in CryptoOpts class (msal-browser). - * Used to generate a public/private keypair and generate a public key thumbprint for pop requests. - */ - CryptoOptsGetPublicKeyThumbprint: "cryptoOptsGetPublicKeyThumbprint", - /** - * signJwt API in CryptoOpts class (msal-browser). - * Used to signed a pop token. - */ - CryptoOptsSignJwt: "cryptoOptsSignJwt", - /** - * acquireToken API in the SilentCacheClient class (msal-browser). - * Used to read access tokens from the cache. - */ - SilentCacheClientAcquireToken: "silentCacheClientAcquireToken", - /** - * acquireToken API in the SilentIframeClient class (msal-browser). - * Used to acquire a new set of tokens from the authorize endpoint in a hidden iframe. - */ - SilentIframeClientAcquireToken: "silentIframeClientAcquireToken", - AwaitConcurrentIframe: "awaitConcurrentIframe", - /** - * acquireToken API in SilentRereshClient (msal-browser). - * Used to acquire a new set of tokens from the token endpoint using a refresh token. - */ - SilentRefreshClientAcquireToken: "silentRefreshClientAcquireToken", - /** - * ssoSilent API (msal-browser). - * Used to silently acquire an authorization code and set of tokens using a hidden iframe. - */ - SsoSilent: "ssoSilent", - /** - * getDiscoveredAuthority API in StandardInteractionClient class (msal-browser). - * Used to load authority metadata for a request. - */ - StandardInteractionClientGetDiscoveredAuthority: "standardInteractionClientGetDiscoveredAuthority", - /** - * acquireToken APIs in msal-browser. - * Used to make an /authorize endpoint call with native brokering enabled. - */ - FetchAccountIdWithNativeBroker: "fetchAccountIdWithNativeBroker", - /** - * acquireToken API in NativeInteractionClient class (msal-browser). - * Used to acquire a token from Native component when native brokering is enabled. - */ - NativeInteractionClientAcquireToken: "nativeInteractionClientAcquireToken", - /** - * Time spent creating default headers for requests to token endpoint - */ - BaseClientCreateTokenRequestHeaders: "baseClientCreateTokenRequestHeaders", - /** - * Time spent sending/waiting for the response of a request to the token endpoint - */ - NetworkClientSendPostRequestAsync: "networkClientSendPostRequestAsync", - RefreshTokenClientExecutePostToTokenEndpoint: "refreshTokenClientExecutePostToTokenEndpoint", - AuthorizationCodeClientExecutePostToTokenEndpoint: "authorizationCodeClientExecutePostToTokenEndpoint", - /** - * Used to measure the time taken for completing embedded-broker handshake (PW-Broker). - */ - BrokerHandhshake: "brokerHandshake", - /** - * acquireTokenByRefreshToken API in BrokerClientApplication (PW-Broker) . - */ - AcquireTokenByRefreshTokenInBroker: "acquireTokenByRefreshTokenInBroker", - /** - * Time taken for token acquisition by broker - */ - AcquireTokenByBroker: "acquireTokenByBroker", - /** - * Time spent on the network for refresh token acquisition - */ - RefreshTokenClientExecuteTokenRequest: "refreshTokenClientExecuteTokenRequest", - /** - * Time taken for acquiring refresh token , records RT size - */ - RefreshTokenClientAcquireToken: "refreshTokenClientAcquireToken", - /** - * Time taken for acquiring cached refresh token - */ - RefreshTokenClientAcquireTokenWithCachedRefreshToken: "refreshTokenClientAcquireTokenWithCachedRefreshToken", - /** - * acquireTokenByRefreshToken API in RefreshTokenClient (msal-common). - */ - RefreshTokenClientAcquireTokenByRefreshToken: "refreshTokenClientAcquireTokenByRefreshToken", - /** - * Helper function to create token request body in RefreshTokenClient (msal-common). - */ - RefreshTokenClientCreateTokenRequestBody: "refreshTokenClientCreateTokenRequestBody", - /** - * acquireTokenFromCache (msal-browser). - * Internal API for acquiring token from cache - */ - AcquireTokenFromCache: "acquireTokenFromCache", - SilentFlowClientAcquireCachedToken: "silentFlowClientAcquireCachedToken", - SilentFlowClientGenerateResultFromCacheRecord: "silentFlowClientGenerateResultFromCacheRecord", - /** - * acquireTokenBySilentIframe (msal-browser). - * Internal API for acquiring token by silent Iframe - */ - AcquireTokenBySilentIframe: "acquireTokenBySilentIframe", - /** - * Internal API for initializing base request in BaseInteractionClient (msal-browser) - */ - InitializeBaseRequest: "initializeBaseRequest", - /** - * Internal API for initializing silent request in SilentCacheClient (msal-browser) - */ - InitializeSilentRequest: "initializeSilentRequest", - InitializeClientApplication: "initializeClientApplication", - /** - * Helper function in SilentIframeClient class (msal-browser). - */ - SilentIframeClientTokenHelper: "silentIframeClientTokenHelper", - /** - * SilentHandler - */ - SilentHandlerInitiateAuthRequest: "silentHandlerInitiateAuthRequest", - SilentHandlerMonitorIframeForHash: "silentHandlerMonitorIframeForHash", - SilentHandlerLoadFrame: "silentHandlerLoadFrame", - SilentHandlerLoadFrameSync: "silentHandlerLoadFrameSync", - /** - * Helper functions in StandardInteractionClient class (msal-browser) - */ - StandardInteractionClientCreateAuthCodeClient: "standardInteractionClientCreateAuthCodeClient", - StandardInteractionClientGetClientConfiguration: "standardInteractionClientGetClientConfiguration", - StandardInteractionClientInitializeAuthorizationRequest: "standardInteractionClientInitializeAuthorizationRequest", - StandardInteractionClientInitializeAuthorizationCodeRequest: "standardInteractionClientInitializeAuthorizationCodeRequest", - /** - * getAuthCodeUrl API (msal-browser and msal-node). - */ - GetAuthCodeUrl: "getAuthCodeUrl", - /** - * Functions from InteractionHandler (msal-browser) - */ - HandleCodeResponseFromServer: "handleCodeResponseFromServer", - HandleCodeResponse: "handleCodeResponse", - UpdateTokenEndpointAuthority: "updateTokenEndpointAuthority", - /** - * APIs in Authorization Code Client (msal-common) - */ - AuthClientAcquireToken: "authClientAcquireToken", - AuthClientExecuteTokenRequest: "authClientExecuteTokenRequest", - AuthClientCreateTokenRequestBody: "authClientCreateTokenRequestBody", - AuthClientCreateQueryString: "authClientCreateQueryString", - /** - * Generate functions in PopTokenGenerator (msal-common) - */ - PopTokenGenerateCnf: "popTokenGenerateCnf", - PopTokenGenerateKid: "popTokenGenerateKid", - /** - * handleServerTokenResponse API in ResponseHandler (msal-common) - */ - HandleServerTokenResponse: "handleServerTokenResponse", - DeserializeResponse: "deserializeResponse", - /** - * Authority functions - */ - AuthorityFactoryCreateDiscoveredInstance: "authorityFactoryCreateDiscoveredInstance", - AuthorityResolveEndpointsAsync: "authorityResolveEndpointsAsync", - AuthorityResolveEndpointsFromLocalSources: "authorityResolveEndpointsFromLocalSources", - AuthorityGetCloudDiscoveryMetadataFromNetwork: "authorityGetCloudDiscoveryMetadataFromNetwork", - AuthorityUpdateCloudDiscoveryMetadata: "authorityUpdateCloudDiscoveryMetadata", - AuthorityGetEndpointMetadataFromNetwork: "authorityGetEndpointMetadataFromNetwork", - AuthorityUpdateEndpointMetadata: "authorityUpdateEndpointMetadata", - AuthorityUpdateMetadataWithRegionalInformation: "authorityUpdateMetadataWithRegionalInformation", - /** - * Region Discovery functions - */ - RegionDiscoveryDetectRegion: "regionDiscoveryDetectRegion", - RegionDiscoveryGetRegionFromIMDS: "regionDiscoveryGetRegionFromIMDS", - RegionDiscoveryGetCurrentVersion: "regionDiscoveryGetCurrentVersion", - AcquireTokenByCodeAsync: "acquireTokenByCodeAsync", - GetEndpointMetadataFromNetwork: "getEndpointMetadataFromNetwork", - GetCloudDiscoveryMetadataFromNetworkMeasurement: "getCloudDiscoveryMetadataFromNetworkMeasurement", - HandleRedirectPromiseMeasurement: "handleRedirectPromise", - HandleNativeRedirectPromiseMeasurement: "handleNativeRedirectPromise", - UpdateCloudDiscoveryMetadataMeasurement: "updateCloudDiscoveryMetadataMeasurement", - UsernamePasswordClientAcquireToken: "usernamePasswordClientAcquireToken", - NativeMessageHandlerHandshake: "nativeMessageHandlerHandshake", - NativeGenerateAuthResult: "nativeGenerateAuthResult", - RemoveHiddenIframe: "removeHiddenIframe", - /** - * Cache operations - */ - ClearTokensAndKeysWithClaims: "clearTokensAndKeysWithClaims", - CacheManagerGetRefreshToken: "cacheManagerGetRefreshToken", - /** - * Crypto Operations - */ - GeneratePkceCodes: "generatePkceCodes", - GenerateCodeVerifier: "generateCodeVerifier", - GenerateCodeChallengeFromVerifier: "generateCodeChallengeFromVerifier", - Sha256Digest: "sha256Digest", - GetRandomValues: "getRandomValues", -}; -const PerformanceEventAbbreviations = new Map([ - [PerformanceEvents.AcquireTokenByCode, "ATByCode"], - [PerformanceEvents.AcquireTokenByRefreshToken, "ATByRT"], - [PerformanceEvents.AcquireTokenSilent, "ATS"], - [PerformanceEvents.AcquireTokenSilentAsync, "ATSAsync"], - [PerformanceEvents.AcquireTokenPopup, "ATPopup"], - [PerformanceEvents.AcquireTokenRedirect, "ATRedirect"], - [ - PerformanceEvents.CryptoOptsGetPublicKeyThumbprint, - "CryptoGetPKThumb", - ], - [PerformanceEvents.CryptoOptsSignJwt, "CryptoSignJwt"], - [PerformanceEvents.SilentCacheClientAcquireToken, "SltCacheClientAT"], - [PerformanceEvents.SilentIframeClientAcquireToken, "SltIframeClientAT"], - [PerformanceEvents.SilentRefreshClientAcquireToken, "SltRClientAT"], - [PerformanceEvents.SsoSilent, "SsoSlt"], - [ - PerformanceEvents.StandardInteractionClientGetDiscoveredAuthority, - "StdIntClientGetDiscAuth", - ], - [ - PerformanceEvents.FetchAccountIdWithNativeBroker, - "FetchAccIdWithNtvBroker", - ], - [ - PerformanceEvents.NativeInteractionClientAcquireToken, - "NtvIntClientAT", - ], - [ - PerformanceEvents.BaseClientCreateTokenRequestHeaders, - "BaseClientCreateTReqHead", - ], - [ - PerformanceEvents.NetworkClientSendPostRequestAsync, - "NetClientSendPost", - ], - [ - PerformanceEvents.RefreshTokenClientExecutePostToTokenEndpoint, - "RTClientExecPost", - ], - [ - PerformanceEvents.AuthorizationCodeClientExecutePostToTokenEndpoint, - "AuthCodeClientExecPost", - ], - [PerformanceEvents.BrokerHandhshake, "BrokerHandshake"], - [ - PerformanceEvents.AcquireTokenByRefreshTokenInBroker, - "ATByRTInBroker", - ], - [PerformanceEvents.AcquireTokenByBroker, "ATByBroker"], - [ - PerformanceEvents.RefreshTokenClientExecuteTokenRequest, - "RTClientExecTReq", - ], - [PerformanceEvents.RefreshTokenClientAcquireToken, "RTClientAT"], - [ - PerformanceEvents.RefreshTokenClientAcquireTokenWithCachedRefreshToken, - "RTClientATWithCachedRT", - ], - [ - PerformanceEvents.RefreshTokenClientAcquireTokenByRefreshToken, - "RTClientATByRT", - ], - [ - PerformanceEvents.RefreshTokenClientCreateTokenRequestBody, - "RTClientCreateTReqBody", - ], - [PerformanceEvents.AcquireTokenFromCache, "ATFromCache"], - [ - PerformanceEvents.SilentFlowClientAcquireCachedToken, - "SltFlowClientATCached", - ], - [ - PerformanceEvents.SilentFlowClientGenerateResultFromCacheRecord, - "SltFlowClientGenResFromCache", - ], - [PerformanceEvents.AcquireTokenBySilentIframe, "ATBySltIframe"], - [PerformanceEvents.InitializeBaseRequest, "InitBaseReq"], - [PerformanceEvents.InitializeSilentRequest, "InitSltReq"], - [ - PerformanceEvents.InitializeClientApplication, - "InitClientApplication", - ], - [PerformanceEvents.SilentIframeClientTokenHelper, "SIClientTHelper"], - [ - PerformanceEvents.SilentHandlerInitiateAuthRequest, - "SHandlerInitAuthReq", - ], - [ - PerformanceEvents.SilentHandlerMonitorIframeForHash, - "SltHandlerMonitorIframeForHash", - ], - [PerformanceEvents.SilentHandlerLoadFrame, "SHandlerLoadFrame"], - [PerformanceEvents.SilentHandlerLoadFrameSync, "SHandlerLoadFrameSync"], - [ - PerformanceEvents.StandardInteractionClientCreateAuthCodeClient, - "StdIntClientCreateAuthCodeClient", - ], - [ - PerformanceEvents.StandardInteractionClientGetClientConfiguration, - "StdIntClientGetClientConf", - ], - [ - PerformanceEvents.StandardInteractionClientInitializeAuthorizationRequest, - "StdIntClientInitAuthReq", - ], - [ - PerformanceEvents.StandardInteractionClientInitializeAuthorizationCodeRequest, - "StdIntClientInitAuthCodeReq", - ], - [PerformanceEvents.GetAuthCodeUrl, "GetAuthCodeUrl"], - [ - PerformanceEvents.HandleCodeResponseFromServer, - "HandleCodeResFromServer", - ], - [PerformanceEvents.HandleCodeResponse, "HandleCodeResp"], - [PerformanceEvents.UpdateTokenEndpointAuthority, "UpdTEndpointAuth"], - [PerformanceEvents.AuthClientAcquireToken, "AuthClientAT"], - [PerformanceEvents.AuthClientExecuteTokenRequest, "AuthClientExecTReq"], - [ - PerformanceEvents.AuthClientCreateTokenRequestBody, - "AuthClientCreateTReqBody", - ], - [ - PerformanceEvents.AuthClientCreateQueryString, - "AuthClientCreateQueryStr", - ], - [PerformanceEvents.PopTokenGenerateCnf, "PopTGenCnf"], - [PerformanceEvents.PopTokenGenerateKid, "PopTGenKid"], - [PerformanceEvents.HandleServerTokenResponse, "HandleServerTRes"], - [PerformanceEvents.DeserializeResponse, "DeserializeRes"], - [ - PerformanceEvents.AuthorityFactoryCreateDiscoveredInstance, - "AuthFactCreateDiscInst", - ], - [ - PerformanceEvents.AuthorityResolveEndpointsAsync, - "AuthResolveEndpointsAsync", - ], - [ - PerformanceEvents.AuthorityResolveEndpointsFromLocalSources, - "AuthResolveEndpointsFromLocal", - ], - [ - PerformanceEvents.AuthorityGetCloudDiscoveryMetadataFromNetwork, - "AuthGetCDMetaFromNet", - ], - [ - PerformanceEvents.AuthorityUpdateCloudDiscoveryMetadata, - "AuthUpdCDMeta", - ], - [ - PerformanceEvents.AuthorityGetEndpointMetadataFromNetwork, - "AuthUpdCDMetaFromNet", - ], - [ - PerformanceEvents.AuthorityUpdateEndpointMetadata, - "AuthUpdEndpointMeta", - ], - [ - PerformanceEvents.AuthorityUpdateMetadataWithRegionalInformation, - "AuthUpdMetaWithRegInfo", - ], - [PerformanceEvents.RegionDiscoveryDetectRegion, "RegDiscDetectReg"], - [ - PerformanceEvents.RegionDiscoveryGetRegionFromIMDS, - "RegDiscGetRegFromIMDS", - ], - [ - PerformanceEvents.RegionDiscoveryGetCurrentVersion, - "RegDiscGetCurrentVer", - ], - [PerformanceEvents.AcquireTokenByCodeAsync, "ATByCodeAsync"], - [ - PerformanceEvents.GetEndpointMetadataFromNetwork, - "GetEndpointMetaFromNet", - ], - [ - PerformanceEvents.GetCloudDiscoveryMetadataFromNetworkMeasurement, - "GetCDMetaFromNet", - ], - [ - PerformanceEvents.HandleRedirectPromiseMeasurement, - "HandleRedirectPromise", - ], - [ - PerformanceEvents.HandleNativeRedirectPromiseMeasurement, - "HandleNtvRedirectPromise", - ], - [ - PerformanceEvents.UpdateCloudDiscoveryMetadataMeasurement, - "UpdateCDMeta", - ], - [ - PerformanceEvents.UsernamePasswordClientAcquireToken, - "UserPassClientAT", - ], - [ - PerformanceEvents.NativeMessageHandlerHandshake, - "NtvMsgHandlerHandshake", - ], - [PerformanceEvents.NativeGenerateAuthResult, "NtvGenAuthRes"], - [PerformanceEvents.RemoveHiddenIframe, "RemoveHiddenIframe"], - [ - PerformanceEvents.ClearTokensAndKeysWithClaims, - "ClearTAndKeysWithClaims", - ], - [PerformanceEvents.CacheManagerGetRefreshToken, "CacheManagerGetRT"], - [PerformanceEvents.GeneratePkceCodes, "GenPkceCodes"], - [PerformanceEvents.GenerateCodeVerifier, "GenCodeVerifier"], - [ - PerformanceEvents.GenerateCodeChallengeFromVerifier, - "GenCodeChallengeFromVerifier", - ], - [PerformanceEvents.Sha256Digest, "Sha256Digest"], - [PerformanceEvents.GetRandomValues, "GetRandomValues"], -]); -/** - * State of the performance event. - * - * @export - * @enum {number} - */ -const PerformanceEventStatus = { - NotStarted: 0, - InProgress: 1, - Completed: 2, -}; -const IntFields = new Set([ - "accessTokenSize", - "durationMs", - "idTokenSize", - "matsSilentStatus", - "matsHttpStatus", - "refreshTokenSize", - "queuedTimeMs", - "startTimeMs", - "status", - "multiMatchedAT", - "multiMatchedID", - "multiMatchedRT", -]); - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * Wraps a function with a performance measurement. - * Usage: invoke(functionToCall, performanceClient, "EventName", "correlationId")(...argsToPassToFunction) - * @param callback - * @param eventName - * @param logger - * @param telemetryClient - * @param correlationId - * @returns - * @internal - */ -// eslint-disable-next-line @typescript-eslint/no-explicit-any -const invoke = (callback, eventName, logger, telemetryClient, correlationId) => { - return (...args) => { - logger.trace(`Executing function ${eventName}`); - const inProgressEvent = telemetryClient?.startMeasurement(eventName, correlationId); - if (correlationId) { - // Track number of times this API is called in a single request - const eventCount = eventName + "CallCount"; - telemetryClient?.incrementFields({ [eventCount]: 1 }, correlationId); - } - try { - const result = callback(...args); - inProgressEvent?.end({ - success: true, - }); - logger.trace(`Returning result from ${eventName}`); - return result; - } - catch (e) { - logger.trace(`Error occurred in ${eventName}`); - try { - logger.trace(JSON.stringify(e)); - } - catch (e) { - logger.trace("Unable to print error message."); - } - inProgressEvent?.end({ - success: false, - }, e); - throw e; - } - }; -}; -/** - * Wraps an async function with a performance measurement. - * Usage: invokeAsync(functionToCall, performanceClient, "EventName", "correlationId")(...argsToPassToFunction) - * @param callback - * @param eventName - * @param logger - * @param telemetryClient - * @param correlationId - * @returns - * @internal - * - */ -// eslint-disable-next-line @typescript-eslint/no-explicit-any -const invokeAsync = (callback, eventName, logger, telemetryClient, correlationId) => { - return (...args) => { - logger.trace(`Executing function ${eventName}`); - const inProgressEvent = telemetryClient?.startMeasurement(eventName, correlationId); - if (correlationId) { - // Track number of times this API is called in a single request - const eventCount = eventName + "CallCount"; - telemetryClient?.incrementFields({ [eventCount]: 1 }, correlationId); - } - telemetryClient?.setPreQueueTime(eventName, correlationId); - return callback(...args) - .then((response) => { - logger.trace(`Returning result from ${eventName}`); - inProgressEvent?.end({ - success: true, - }); - return response; - }) - .catch((e) => { - logger.trace(`Error occurred in ${eventName}`); - try { - logger.trace(JSON.stringify(e)); - } - catch (e) { - logger.trace("Unable to print error message."); - } - inProgressEvent?.end({ - success: false, - }, e); - throw e; - }); - }; -}; - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -class RegionDiscovery { - constructor(networkInterface, logger, performanceClient, correlationId) { - this.networkInterface = networkInterface; - this.logger = logger; - this.performanceClient = performanceClient; - this.correlationId = correlationId; - } - /** - * Detect the region from the application's environment. - * - * @returns Promise - */ - async detectRegion(environmentRegion, regionDiscoveryMetadata) { - this.performanceClient?.addQueueMeasurement(PerformanceEvents.RegionDiscoveryDetectRegion, this.correlationId); - // Initialize auto detected region with the region from the envrionment - let autodetectedRegionName = environmentRegion; - // Check if a region was detected from the environment, if not, attempt to get the region from IMDS - if (!autodetectedRegionName) { - const options = RegionDiscovery.IMDS_OPTIONS; - try { - const localIMDSVersionResponse = await invokeAsync(this.getRegionFromIMDS.bind(this), PerformanceEvents.RegionDiscoveryGetRegionFromIMDS, this.logger, this.performanceClient, this.correlationId)(Constants.IMDS_VERSION, options); - if (localIMDSVersionResponse.status === - ResponseCodes.httpSuccess) { - autodetectedRegionName = localIMDSVersionResponse.body; - regionDiscoveryMetadata.region_source = - RegionDiscoverySources.IMDS; - } - // If the response using the local IMDS version failed, try to fetch the current version of IMDS and retry. - if (localIMDSVersionResponse.status === - ResponseCodes.httpBadRequest) { - const currentIMDSVersion = await invokeAsync(this.getCurrentVersion.bind(this), PerformanceEvents.RegionDiscoveryGetCurrentVersion, this.logger, this.performanceClient, this.correlationId)(options); - if (!currentIMDSVersion) { - regionDiscoveryMetadata.region_source = - RegionDiscoverySources.FAILED_AUTO_DETECTION; - return null; - } - const currentIMDSVersionResponse = await invokeAsync(this.getRegionFromIMDS.bind(this), PerformanceEvents.RegionDiscoveryGetRegionFromIMDS, this.logger, this.performanceClient, this.correlationId)(currentIMDSVersion, options); - if (currentIMDSVersionResponse.status === - ResponseCodes.httpSuccess) { - autodetectedRegionName = - currentIMDSVersionResponse.body; - regionDiscoveryMetadata.region_source = - RegionDiscoverySources.IMDS; - } - } - } - catch (e) { - regionDiscoveryMetadata.region_source = - RegionDiscoverySources.FAILED_AUTO_DETECTION; - return null; - } - } - else { - regionDiscoveryMetadata.region_source = - RegionDiscoverySources.ENVIRONMENT_VARIABLE; - } - // If no region was auto detected from the environment or from the IMDS endpoint, mark the attempt as a FAILED_AUTO_DETECTION - if (!autodetectedRegionName) { - regionDiscoveryMetadata.region_source = - RegionDiscoverySources.FAILED_AUTO_DETECTION; - } - return autodetectedRegionName || null; - } - /** - * Make the call to the IMDS endpoint - * - * @param imdsEndpointUrl - * @returns Promise> - */ - async getRegionFromIMDS(version, options) { - this.performanceClient?.addQueueMeasurement(PerformanceEvents.RegionDiscoveryGetRegionFromIMDS, this.correlationId); - return this.networkInterface.sendGetRequestAsync(`${Constants.IMDS_ENDPOINT}?api-version=${version}&format=text`, options, Constants.IMDS_TIMEOUT); - } - /** - * Get the most recent version of the IMDS endpoint available - * - * @returns Promise - */ - async getCurrentVersion(options) { - this.performanceClient?.addQueueMeasurement(PerformanceEvents.RegionDiscoveryGetCurrentVersion, this.correlationId); - try { - const response = await this.networkInterface.sendGetRequestAsync(`${Constants.IMDS_ENDPOINT}?format=json`, options); - // When IMDS endpoint is called without the api version query param, bad request response comes back with latest version. - if (response.status === ResponseCodes.httpBadRequest && - response.body && - response.body["newest-versions"] && - response.body["newest-versions"].length > 0) { - return response.body["newest-versions"][0]; - } - return null; - } - catch (e) { - return null; - } - } -} -// Options for the IMDS endpoint request -RegionDiscovery.IMDS_OPTIONS = { - headers: { - Metadata: "true", - }, -}; - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * Utility functions for managing date and time operations. - */ -/** - * return the current time in Unix time (seconds). - */ -function nowSeconds() { - // Date.getTime() returns in milliseconds. - return Math.round(new Date().getTime() / 1000.0); -} -/** - * check if a token is expired based on given UTC time in seconds. - * @param expiresOn - */ -function isTokenExpired(expiresOn, offset) { - // check for access token expiry - const expirationSec = Number(expiresOn) || 0; - const offsetCurrentTimeSec = nowSeconds() + offset; - // If current time + offset is greater than token expiration time, then token is expired. - return offsetCurrentTimeSec > expirationSec; -} -/** - * If the current time is earlier than the time that a token was cached at, we must discard the token - * i.e. The system clock was turned back after acquiring the cached token - * @param cachedAt - * @param offset - */ -function wasClockTurnedBack(cachedAt) { - const cachedAtSec = Number(cachedAt); - return cachedAtSec > nowSeconds(); -} -/** - * Waits for t number of milliseconds - * @param t number - * @param value T - */ -function delay(t, value) { - return new Promise((resolve) => setTimeout(() => resolve(value), t)); -} - -var TimeUtils = /*#__PURE__*/Object.freeze({ - __proto__: null, - delay: delay, - isTokenExpired: isTokenExpired, - nowSeconds: nowSeconds, - wasClockTurnedBack: wasClockTurnedBack -}); - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * Cache Key: ------- - * IdToken Example: uid.utid-login.microsoftonline.com-idtoken-app_client_id-contoso.com - * AccessToken Example: uid.utid-login.microsoftonline.com-accesstoken-app_client_id-contoso.com-scope1 scope2--pop - * RefreshToken Example: uid.utid-login.microsoftonline.com-refreshtoken-1-contoso.com - * @param credentialEntity - * @returns - */ -function generateCredentialKey(credentialEntity) { - const credentialKey = [ - generateAccountId(credentialEntity), - generateCredentialId(credentialEntity), - generateTarget(credentialEntity), - generateClaimsHash(credentialEntity), - generateScheme(credentialEntity), - ]; - return credentialKey.join(Separators.CACHE_KEY_SEPARATOR).toLowerCase(); -} -/** - * Create IdTokenEntity - * @param homeAccountId - * @param authenticationResult - * @param clientId - * @param authority - */ -function createIdTokenEntity(homeAccountId, environment, idToken, clientId, tenantId) { - const idTokenEntity = { - credentialType: CredentialType.ID_TOKEN, - homeAccountId: homeAccountId, - environment: environment, - clientId: clientId, - secret: idToken, - realm: tenantId, - }; - return idTokenEntity; -} -/** - * Create AccessTokenEntity - * @param homeAccountId - * @param environment - * @param accessToken - * @param clientId - * @param tenantId - * @param scopes - * @param expiresOn - * @param extExpiresOn - */ -function createAccessTokenEntity(homeAccountId, environment, accessToken, clientId, tenantId, scopes, expiresOn, extExpiresOn, base64Decode, refreshOn, tokenType, userAssertionHash, keyId, requestedClaims, requestedClaimsHash) { - const atEntity = { - homeAccountId: homeAccountId, - credentialType: CredentialType.ACCESS_TOKEN, - secret: accessToken, - cachedAt: nowSeconds().toString(), - expiresOn: expiresOn.toString(), - extendedExpiresOn: extExpiresOn.toString(), - environment: environment, - clientId: clientId, - realm: tenantId, - target: scopes, - tokenType: tokenType || AuthenticationScheme.BEARER, - }; - if (userAssertionHash) { - atEntity.userAssertionHash = userAssertionHash; - } - if (refreshOn) { - atEntity.refreshOn = refreshOn.toString(); - } - if (requestedClaims) { - atEntity.requestedClaims = requestedClaims; - atEntity.requestedClaimsHash = requestedClaimsHash; - } - /* - * Create Access Token With Auth Scheme instead of regular access token - * Cast to lower to handle "bearer" from ADFS - */ - if (atEntity.tokenType?.toLowerCase() !== - AuthenticationScheme.BEARER.toLowerCase()) { - atEntity.credentialType = CredentialType.ACCESS_TOKEN_WITH_AUTH_SCHEME; - switch (atEntity.tokenType) { - case AuthenticationScheme.POP: - // Make sure keyId is present and add it to credential - const tokenClaims = extractTokenClaims(accessToken, base64Decode); - if (!tokenClaims?.cnf?.kid) { - throw createClientAuthError(tokenClaimsCnfRequiredForSignedJwt); - } - atEntity.keyId = tokenClaims.cnf.kid; - break; - case AuthenticationScheme.SSH: - atEntity.keyId = keyId; - } - } - return atEntity; -} -/** - * Create RefreshTokenEntity - * @param homeAccountId - * @param authenticationResult - * @param clientId - * @param authority - */ -function createRefreshTokenEntity(homeAccountId, environment, refreshToken, clientId, familyId, userAssertionHash, expiresOn) { - const rtEntity = { - credentialType: CredentialType.REFRESH_TOKEN, - homeAccountId: homeAccountId, - environment: environment, - clientId: clientId, - secret: refreshToken, - }; - if (userAssertionHash) { - rtEntity.userAssertionHash = userAssertionHash; - } - if (familyId) { - rtEntity.familyId = familyId; - } - if (expiresOn) { - rtEntity.expiresOn = expiresOn.toString(); - } - return rtEntity; -} -function isCredentialEntity(entity) { - return (entity.hasOwnProperty("homeAccountId") && - entity.hasOwnProperty("environment") && - entity.hasOwnProperty("credentialType") && - entity.hasOwnProperty("clientId") && - entity.hasOwnProperty("secret")); -} -/** - * Validates an entity: checks for all expected params - * @param entity - */ -function isAccessTokenEntity(entity) { - if (!entity) { - return false; - } - return (isCredentialEntity(entity) && - entity.hasOwnProperty("realm") && - entity.hasOwnProperty("target") && - (entity["credentialType"] === CredentialType.ACCESS_TOKEN || - entity["credentialType"] === - CredentialType.ACCESS_TOKEN_WITH_AUTH_SCHEME)); -} -/** - * Validates an entity: checks for all expected params - * @param entity - */ -function isIdTokenEntity(entity) { - if (!entity) { - return false; - } - return (isCredentialEntity(entity) && - entity.hasOwnProperty("realm") && - entity["credentialType"] === CredentialType.ID_TOKEN); -} -/** - * Validates an entity: checks for all expected params - * @param entity - */ -function isRefreshTokenEntity(entity) { - if (!entity) { - return false; - } - return (isCredentialEntity(entity) && - entity["credentialType"] === CredentialType.REFRESH_TOKEN); -} -/** - * Generate Account Id key component as per the schema: - - */ -function generateAccountId(credentialEntity) { - const accountId = [ - credentialEntity.homeAccountId, - credentialEntity.environment, - ]; - return accountId.join(Separators.CACHE_KEY_SEPARATOR).toLowerCase(); -} -/** - * Generate Credential Id key component as per the schema: -- - */ -function generateCredentialId(credentialEntity) { - const clientOrFamilyId = credentialEntity.credentialType === CredentialType.REFRESH_TOKEN - ? credentialEntity.familyId || credentialEntity.clientId - : credentialEntity.clientId; - const credentialId = [ - credentialEntity.credentialType, - clientOrFamilyId, - credentialEntity.realm || "", - ]; - return credentialId.join(Separators.CACHE_KEY_SEPARATOR).toLowerCase(); -} -/** - * Generate target key component as per schema: - */ -function generateTarget(credentialEntity) { - return (credentialEntity.target || "").toLowerCase(); -} -/** - * Generate requested claims key component as per schema: - */ -function generateClaimsHash(credentialEntity) { - return (credentialEntity.requestedClaimsHash || "").toLowerCase(); -} -/** - * Generate scheme key componenet as per schema: - */ -function generateScheme(credentialEntity) { - /* - * PoP Tokens and SSH certs include scheme in cache key - * Cast to lowercase to handle "bearer" from ADFS - */ - return credentialEntity.tokenType && - credentialEntity.tokenType.toLowerCase() !== - AuthenticationScheme.BEARER.toLowerCase() - ? credentialEntity.tokenType.toLowerCase() - : ""; -} -/** - * validates if a given cache entry is "Telemetry", parses - * @param key - * @param entity - */ -function isServerTelemetryEntity(key, entity) { - const validateKey = key.indexOf(SERVER_TELEM_CONSTANTS.CACHE_KEY) === 0; - let validateEntity = true; - if (entity) { - validateEntity = - entity.hasOwnProperty("failedRequests") && - entity.hasOwnProperty("errors") && - entity.hasOwnProperty("cacheHits"); - } - return validateKey && validateEntity; -} -/** - * validates if a given cache entry is "Throttling", parses - * @param key - * @param entity - */ -function isThrottlingEntity(key, entity) { - let validateKey = false; - if (key) { - validateKey = key.indexOf(ThrottlingConstants.THROTTLING_PREFIX) === 0; - } - let validateEntity = true; - if (entity) { - validateEntity = entity.hasOwnProperty("throttleTime"); - } - return validateKey && validateEntity; -} -/** - * Generate AppMetadata Cache Key as per the schema: appmetadata-- - */ -function generateAppMetadataKey({ environment, clientId, }) { - const appMetaDataKeyArray = [ - APP_METADATA, - environment, - clientId, - ]; - return appMetaDataKeyArray - .join(Separators.CACHE_KEY_SEPARATOR) - .toLowerCase(); -} -/* - * Validates an entity: checks for all expected params - * @param entity - */ -function isAppMetadataEntity(key, entity) { - if (!entity) { - return false; - } - return (key.indexOf(APP_METADATA) === 0 && - entity.hasOwnProperty("clientId") && - entity.hasOwnProperty("environment")); -} -/** - * Validates an entity: checks for all expected params - * @param entity - */ -function isAuthorityMetadataEntity(key, entity) { - if (!entity) { - return false; - } - return (key.indexOf(AUTHORITY_METADATA_CONSTANTS.CACHE_KEY) === 0 && - entity.hasOwnProperty("aliases") && - entity.hasOwnProperty("preferred_cache") && - entity.hasOwnProperty("preferred_network") && - entity.hasOwnProperty("canonical_authority") && - entity.hasOwnProperty("authorization_endpoint") && - entity.hasOwnProperty("token_endpoint") && - entity.hasOwnProperty("issuer") && - entity.hasOwnProperty("aliasesFromNetwork") && - entity.hasOwnProperty("endpointsFromNetwork") && - entity.hasOwnProperty("expiresAt") && - entity.hasOwnProperty("jwks_uri")); -} -/** - * Reset the exiresAt value - */ -function generateAuthorityMetadataExpiresAt() { - return (nowSeconds() + - AUTHORITY_METADATA_CONSTANTS.REFRESH_TIME_SECONDS); -} -function updateAuthorityEndpointMetadata(authorityMetadata, updatedValues, fromNetwork) { - authorityMetadata.authorization_endpoint = - updatedValues.authorization_endpoint; - authorityMetadata.token_endpoint = updatedValues.token_endpoint; - authorityMetadata.end_session_endpoint = updatedValues.end_session_endpoint; - authorityMetadata.issuer = updatedValues.issuer; - authorityMetadata.endpointsFromNetwork = fromNetwork; - authorityMetadata.jwks_uri = updatedValues.jwks_uri; -} -function updateCloudDiscoveryMetadata(authorityMetadata, updatedValues, fromNetwork) { - authorityMetadata.aliases = updatedValues.aliases; - authorityMetadata.preferred_cache = updatedValues.preferred_cache; - authorityMetadata.preferred_network = updatedValues.preferred_network; - authorityMetadata.aliasesFromNetwork = fromNetwork; -} -/** - * Returns whether or not the data needs to be refreshed - */ -function isAuthorityMetadataExpired(metadata) { - return metadata.expiresAt <= nowSeconds(); -} - -var CacheHelpers = /*#__PURE__*/Object.freeze({ - __proto__: null, - createAccessTokenEntity: createAccessTokenEntity, - createIdTokenEntity: createIdTokenEntity, - createRefreshTokenEntity: createRefreshTokenEntity, - generateAppMetadataKey: generateAppMetadataKey, - generateAuthorityMetadataExpiresAt: generateAuthorityMetadataExpiresAt, - generateCredentialKey: generateCredentialKey, - isAccessTokenEntity: isAccessTokenEntity, - isAppMetadataEntity: isAppMetadataEntity, - isAuthorityMetadataEntity: isAuthorityMetadataEntity, - isAuthorityMetadataExpired: isAuthorityMetadataExpired, - isCredentialEntity: isCredentialEntity, - isIdTokenEntity: isIdTokenEntity, - isRefreshTokenEntity: isRefreshTokenEntity, - isServerTelemetryEntity: isServerTelemetryEntity, - isThrottlingEntity: isThrottlingEntity, - updateAuthorityEndpointMetadata: updateAuthorityEndpointMetadata, - updateCloudDiscoveryMetadata: updateCloudDiscoveryMetadata -}); - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * The authority class validates the authority URIs used by the user, and retrieves the OpenID Configuration Data from the - * endpoint. It will store the pertinent config data in this object for use during token calls. - * @internal - */ -class Authority { - constructor(authority, networkInterface, cacheManager, authorityOptions, logger, correlationId, performanceClient, managedIdentity) { - this.canonicalAuthority = authority; - this._canonicalAuthority.validateAsUri(); - this.networkInterface = networkInterface; - this.cacheManager = cacheManager; - this.authorityOptions = authorityOptions; - this.regionDiscoveryMetadata = { - region_used: undefined, - region_source: undefined, - region_outcome: undefined, - }; - this.logger = logger; - this.performanceClient = performanceClient; - this.correlationId = correlationId; - this.managedIdentity = managedIdentity || false; - this.regionDiscovery = new RegionDiscovery(networkInterface, this.logger, this.performanceClient, this.correlationId); - } - /** - * Get {@link AuthorityType} - * @param authorityUri {@link IUri} - * @private - */ - getAuthorityType(authorityUri) { - // CIAM auth url pattern is being standardized as: .ciamlogin.com - if (authorityUri.HostNameAndPort.endsWith(Constants.CIAM_AUTH_URL)) { - return AuthorityType.Ciam; - } - const pathSegments = authorityUri.PathSegments; - if (pathSegments.length) { - switch (pathSegments[0].toLowerCase()) { - case Constants.ADFS: - return AuthorityType.Adfs; - case Constants.DSTS: - return AuthorityType.Dsts; - } - } - return AuthorityType.Default; - } - // See above for AuthorityType - get authorityType() { - return this.getAuthorityType(this.canonicalAuthorityUrlComponents); - } - /** - * ProtocolMode enum representing the way endpoints are constructed. - */ - get protocolMode() { - return this.authorityOptions.protocolMode; - } - /** - * Returns authorityOptions which can be used to reinstantiate a new authority instance - */ - get options() { - return this.authorityOptions; - } - /** - * A URL that is the authority set by the developer - */ - get canonicalAuthority() { - return this._canonicalAuthority.urlString; - } - /** - * Sets canonical authority. - */ - set canonicalAuthority(url) { - this._canonicalAuthority = new UrlString(url); - this._canonicalAuthority.validateAsUri(); - this._canonicalAuthorityUrlComponents = null; - } - /** - * Get authority components. - */ - get canonicalAuthorityUrlComponents() { - if (!this._canonicalAuthorityUrlComponents) { - this._canonicalAuthorityUrlComponents = - this._canonicalAuthority.getUrlComponents(); - } - return this._canonicalAuthorityUrlComponents; - } - /** - * Get hostname and port i.e. login.microsoftonline.com - */ - get hostnameAndPort() { - return this.canonicalAuthorityUrlComponents.HostNameAndPort.toLowerCase(); - } - /** - * Get tenant for authority. - */ - get tenant() { - return this.canonicalAuthorityUrlComponents.PathSegments[0]; - } - /** - * OAuth /authorize endpoint for requests - */ - get authorizationEndpoint() { - if (this.discoveryComplete()) { - return this.replacePath(this.metadata.authorization_endpoint); - } - else { - throw createClientAuthError(endpointResolutionError); - } - } - /** - * OAuth /token endpoint for requests - */ - get tokenEndpoint() { - if (this.discoveryComplete()) { - return this.replacePath(this.metadata.token_endpoint); - } - else { - throw createClientAuthError(endpointResolutionError); - } - } - get deviceCodeEndpoint() { - if (this.discoveryComplete()) { - return this.replacePath(this.metadata.token_endpoint.replace("/token", "/devicecode")); - } - else { - throw createClientAuthError(endpointResolutionError); - } - } - /** - * OAuth logout endpoint for requests - */ - get endSessionEndpoint() { - if (this.discoveryComplete()) { - // ROPC policies may not have end_session_endpoint set - if (!this.metadata.end_session_endpoint) { - throw createClientAuthError(endSessionEndpointNotSupported); - } - return this.replacePath(this.metadata.end_session_endpoint); - } - else { - throw createClientAuthError(endpointResolutionError); - } - } - /** - * OAuth issuer for requests - */ - get selfSignedJwtAudience() { - if (this.discoveryComplete()) { - return this.replacePath(this.metadata.issuer); - } - else { - throw createClientAuthError(endpointResolutionError); - } - } - /** - * Jwks_uri for token signing keys - */ - get jwksUri() { - if (this.discoveryComplete()) { - return this.replacePath(this.metadata.jwks_uri); - } - else { - throw createClientAuthError(endpointResolutionError); - } - } - /** - * Returns a flag indicating that tenant name can be replaced in authority {@link IUri} - * @param authorityUri {@link IUri} - * @private - */ - canReplaceTenant(authorityUri) { - return (authorityUri.PathSegments.length === 1 && - !Authority.reservedTenantDomains.has(authorityUri.PathSegments[0]) && - this.getAuthorityType(authorityUri) === AuthorityType.Default && - this.protocolMode === ProtocolMode.AAD); - } - /** - * Replaces tenant in url path with current tenant. Defaults to common. - * @param urlString - */ - replaceTenant(urlString) { - return urlString.replace(/{tenant}|{tenantid}/g, this.tenant); - } - /** - * Replaces path such as tenant or policy with the current tenant or policy. - * @param urlString - */ - replacePath(urlString) { - let endpoint = urlString; - const cachedAuthorityUrl = new UrlString(this.metadata.canonical_authority); - const cachedAuthorityUrlComponents = cachedAuthorityUrl.getUrlComponents(); - const cachedAuthorityParts = cachedAuthorityUrlComponents.PathSegments; - const currentAuthorityParts = this.canonicalAuthorityUrlComponents.PathSegments; - currentAuthorityParts.forEach((currentPart, index) => { - let cachedPart = cachedAuthorityParts[index]; - if (index === 0 && - this.canReplaceTenant(cachedAuthorityUrlComponents)) { - const tenantId = new UrlString(this.metadata.authorization_endpoint).getUrlComponents().PathSegments[0]; - /** - * Check if AAD canonical authority contains tenant domain name, for example "testdomain.onmicrosoft.com", - * by comparing its first path segment to the corresponding authorization endpoint path segment, which is - * always resolved with tenant id by OIDC. - */ - if (cachedPart !== tenantId) { - this.logger.verbose(`Replacing tenant domain name ${cachedPart} with id ${tenantId}`); - cachedPart = tenantId; - } - } - if (currentPart !== cachedPart) { - endpoint = endpoint.replace(`/${cachedPart}/`, `/${currentPart}/`); - } - }); - return this.replaceTenant(endpoint); - } - /** - * The default open id configuration endpoint for any canonical authority. - */ - get defaultOpenIdConfigurationEndpoint() { - const canonicalAuthorityHost = this.hostnameAndPort; - if (this.canonicalAuthority.endsWith("v2.0/") || - this.authorityType === AuthorityType.Adfs || - (this.protocolMode !== ProtocolMode.AAD && - !this.isAliasOfKnownMicrosoftAuthority(canonicalAuthorityHost))) { - return `${this.canonicalAuthority}.well-known/openid-configuration`; - } - return `${this.canonicalAuthority}v2.0/.well-known/openid-configuration`; - } - /** - * Boolean that returns whether or not tenant discovery has been completed. - */ - discoveryComplete() { - return !!this.metadata; - } - /** - * Perform endpoint discovery to discover aliases, preferred_cache, preferred_network - * and the /authorize, /token and logout endpoints. - */ - async resolveEndpointsAsync() { - this.performanceClient?.addQueueMeasurement(PerformanceEvents.AuthorityResolveEndpointsAsync, this.correlationId); - const metadataEntity = this.getCurrentMetadataEntity(); - const cloudDiscoverySource = await invokeAsync(this.updateCloudDiscoveryMetadata.bind(this), PerformanceEvents.AuthorityUpdateCloudDiscoveryMetadata, this.logger, this.performanceClient, this.correlationId)(metadataEntity); - this.canonicalAuthority = this.canonicalAuthority.replace(this.hostnameAndPort, metadataEntity.preferred_network); - const endpointSource = await invokeAsync(this.updateEndpointMetadata.bind(this), PerformanceEvents.AuthorityUpdateEndpointMetadata, this.logger, this.performanceClient, this.correlationId)(metadataEntity); - this.updateCachedMetadata(metadataEntity, cloudDiscoverySource, { - source: endpointSource, - }); - this.performanceClient?.addFields({ - cloudDiscoverySource: cloudDiscoverySource, - authorityEndpointSource: endpointSource, - }, this.correlationId); - } - /** - * Returns metadata entity from cache if it exists, otherwiser returns a new metadata entity built - * from the configured canonical authority - * @returns - */ - getCurrentMetadataEntity() { - let metadataEntity = this.cacheManager.getAuthorityMetadataByAlias(this.hostnameAndPort); - if (!metadataEntity) { - metadataEntity = { - aliases: [], - preferred_cache: this.hostnameAndPort, - preferred_network: this.hostnameAndPort, - canonical_authority: this.canonicalAuthority, - authorization_endpoint: "", - token_endpoint: "", - end_session_endpoint: "", - issuer: "", - aliasesFromNetwork: false, - endpointsFromNetwork: false, - expiresAt: generateAuthorityMetadataExpiresAt(), - jwks_uri: "", - }; - } - return metadataEntity; - } - /** - * Updates cached metadata based on metadata source and sets the instance's metadata - * property to the same value - * @param metadataEntity - * @param cloudDiscoverySource - * @param endpointMetadataResult - */ - updateCachedMetadata(metadataEntity, cloudDiscoverySource, endpointMetadataResult) { - if (cloudDiscoverySource !== AuthorityMetadataSource.CACHE && - endpointMetadataResult?.source !== AuthorityMetadataSource.CACHE) { - // Reset the expiration time unless both values came from a successful cache lookup - metadataEntity.expiresAt = - generateAuthorityMetadataExpiresAt(); - metadataEntity.canonical_authority = this.canonicalAuthority; - } - const cacheKey = this.cacheManager.generateAuthorityMetadataCacheKey(metadataEntity.preferred_cache); - this.cacheManager.setAuthorityMetadata(cacheKey, metadataEntity); - this.metadata = metadataEntity; - } - /** - * Update AuthorityMetadataEntity with new endpoints and return where the information came from - * @param metadataEntity - */ - async updateEndpointMetadata(metadataEntity) { - this.performanceClient?.addQueueMeasurement(PerformanceEvents.AuthorityUpdateEndpointMetadata, this.correlationId); - const localMetadata = this.updateEndpointMetadataFromLocalSources(metadataEntity); - // Further update may be required for hardcoded metadata if regional metadata is preferred - if (localMetadata) { - if (localMetadata.source === - AuthorityMetadataSource.HARDCODED_VALUES) { - // If the user prefers to use an azure region replace the global endpoints with regional information. - if (this.authorityOptions.azureRegionConfiguration?.azureRegion) { - if (localMetadata.metadata) { - const hardcodedMetadata = await invokeAsync(this.updateMetadataWithRegionalInformation.bind(this), PerformanceEvents.AuthorityUpdateMetadataWithRegionalInformation, this.logger, this.performanceClient, this.correlationId)(localMetadata.metadata); - updateAuthorityEndpointMetadata(metadataEntity, hardcodedMetadata, false); - metadataEntity.canonical_authority = - this.canonicalAuthority; - } - } - } - return localMetadata.source; - } - // Get metadata from network if local sources aren't available - let metadata = await invokeAsync(this.getEndpointMetadataFromNetwork.bind(this), PerformanceEvents.AuthorityGetEndpointMetadataFromNetwork, this.logger, this.performanceClient, this.correlationId)(); - if (metadata) { - // If the user prefers to use an azure region replace the global endpoints with regional information. - if (this.authorityOptions.azureRegionConfiguration?.azureRegion) { - metadata = await invokeAsync(this.updateMetadataWithRegionalInformation.bind(this), PerformanceEvents.AuthorityUpdateMetadataWithRegionalInformation, this.logger, this.performanceClient, this.correlationId)(metadata); - } - updateAuthorityEndpointMetadata(metadataEntity, metadata, true); - return AuthorityMetadataSource.NETWORK; - } - else { - // Metadata could not be obtained from the config, cache, network or hardcoded values - throw createClientAuthError(openIdConfigError, this.defaultOpenIdConfigurationEndpoint); - } - } - /** - * Updates endpoint metadata from local sources and returns where the information was retrieved from and the metadata config - * response if the source is hardcoded metadata - * @param metadataEntity - * @returns - */ - updateEndpointMetadataFromLocalSources(metadataEntity) { - this.logger.verbose("Attempting to get endpoint metadata from authority configuration"); - const configMetadata = this.getEndpointMetadataFromConfig(); - if (configMetadata) { - this.logger.verbose("Found endpoint metadata in authority configuration"); - updateAuthorityEndpointMetadata(metadataEntity, configMetadata, false); - return { - source: AuthorityMetadataSource.CONFIG, - }; - } - this.logger.verbose("Did not find endpoint metadata in the config... Attempting to get endpoint metadata from the hardcoded values."); - // skipAuthorityMetadataCache is used to bypass hardcoded authority metadata and force a network metadata cache lookup and network metadata request if no cached response is available. - if (this.authorityOptions.skipAuthorityMetadataCache) { - this.logger.verbose("Skipping hardcoded metadata cache since skipAuthorityMetadataCache is set to true. Attempting to get endpoint metadata from the network metadata cache."); - } - else { - const hardcodedMetadata = this.getEndpointMetadataFromHardcodedValues(); - if (hardcodedMetadata) { - updateAuthorityEndpointMetadata(metadataEntity, hardcodedMetadata, false); - return { - source: AuthorityMetadataSource.HARDCODED_VALUES, - metadata: hardcodedMetadata, - }; - } - else { - this.logger.verbose("Did not find endpoint metadata in hardcoded values... Attempting to get endpoint metadata from the network metadata cache."); - } - } - // Check cached metadata entity expiration status - const metadataEntityExpired = isAuthorityMetadataExpired(metadataEntity); - if (this.isAuthoritySameType(metadataEntity) && - metadataEntity.endpointsFromNetwork && - !metadataEntityExpired) { - // No need to update - this.logger.verbose("Found endpoint metadata in the cache."); - return { source: AuthorityMetadataSource.CACHE }; - } - else if (metadataEntityExpired) { - this.logger.verbose("The metadata entity is expired."); - } - return null; - } - /** - * Compares the number of url components after the domain to determine if the cached - * authority metadata can be used for the requested authority. Protects against same domain different - * authority such as login.microsoftonline.com/tenant and login.microsoftonline.com/tfp/tenant/policy - * @param metadataEntity - */ - isAuthoritySameType(metadataEntity) { - const cachedAuthorityUrl = new UrlString(metadataEntity.canonical_authority); - const cachedParts = cachedAuthorityUrl.getUrlComponents().PathSegments; - return (cachedParts.length === - this.canonicalAuthorityUrlComponents.PathSegments.length); - } - /** - * Parse authorityMetadata config option - */ - getEndpointMetadataFromConfig() { - if (this.authorityOptions.authorityMetadata) { - try { - return JSON.parse(this.authorityOptions.authorityMetadata); - } - catch (e) { - throw createClientConfigurationError(invalidAuthorityMetadata); - } - } - return null; - } - /** - * Gets OAuth endpoints from the given OpenID configuration endpoint. - * - * @param hasHardcodedMetadata boolean - */ - async getEndpointMetadataFromNetwork() { - this.performanceClient?.addQueueMeasurement(PerformanceEvents.AuthorityGetEndpointMetadataFromNetwork, this.correlationId); - const options = {}; - /* - * TODO: Add a timeout if the authority exists in our library's - * hardcoded list of metadata - */ - const openIdConfigurationEndpoint = this.defaultOpenIdConfigurationEndpoint; - this.logger.verbose(`Authority.getEndpointMetadataFromNetwork: attempting to retrieve OAuth endpoints from ${openIdConfigurationEndpoint}`); - try { - const response = await this.networkInterface.sendGetRequestAsync(openIdConfigurationEndpoint, options); - const isValidResponse = isOpenIdConfigResponse(response.body); - if (isValidResponse) { - return response.body; - } - else { - this.logger.verbose(`Authority.getEndpointMetadataFromNetwork: could not parse response as OpenID configuration`); - return null; - } - } - catch (e) { - this.logger.verbose(`Authority.getEndpointMetadataFromNetwork: ${e}`); - return null; - } - } - /** - * Get OAuth endpoints for common authorities. - */ - getEndpointMetadataFromHardcodedValues() { - if (this.hostnameAndPort in EndpointMetadata) { - return EndpointMetadata[this.hostnameAndPort]; - } - return null; - } - /** - * Update the retrieved metadata with regional information. - * User selected Azure region will be used if configured. - */ - async updateMetadataWithRegionalInformation(metadata) { - this.performanceClient?.addQueueMeasurement(PerformanceEvents.AuthorityUpdateMetadataWithRegionalInformation, this.correlationId); - const userConfiguredAzureRegion = this.authorityOptions.azureRegionConfiguration?.azureRegion; - if (userConfiguredAzureRegion) { - if (userConfiguredAzureRegion !== - Constants.AZURE_REGION_AUTO_DISCOVER_FLAG) { - this.regionDiscoveryMetadata.region_outcome = - RegionDiscoveryOutcomes.CONFIGURED_NO_AUTO_DETECTION; - this.regionDiscoveryMetadata.region_used = - userConfiguredAzureRegion; - return Authority.replaceWithRegionalInformation(metadata, userConfiguredAzureRegion); - } - const autodetectedRegionName = await invokeAsync(this.regionDiscovery.detectRegion.bind(this.regionDiscovery), PerformanceEvents.RegionDiscoveryDetectRegion, this.logger, this.performanceClient, this.correlationId)(this.authorityOptions.azureRegionConfiguration - ?.environmentRegion, this.regionDiscoveryMetadata); - if (autodetectedRegionName) { - this.regionDiscoveryMetadata.region_outcome = - RegionDiscoveryOutcomes.AUTO_DETECTION_REQUESTED_SUCCESSFUL; - this.regionDiscoveryMetadata.region_used = - autodetectedRegionName; - return Authority.replaceWithRegionalInformation(metadata, autodetectedRegionName); - } - this.regionDiscoveryMetadata.region_outcome = - RegionDiscoveryOutcomes.AUTO_DETECTION_REQUESTED_FAILED; - } - return metadata; - } - /** - * Updates the AuthorityMetadataEntity with new aliases, preferred_network and preferred_cache - * and returns where the information was retrieved from - * @param metadataEntity - * @returns AuthorityMetadataSource - */ - async updateCloudDiscoveryMetadata(metadataEntity) { - this.performanceClient?.addQueueMeasurement(PerformanceEvents.AuthorityUpdateCloudDiscoveryMetadata, this.correlationId); - const localMetadataSource = this.updateCloudDiscoveryMetadataFromLocalSources(metadataEntity); - if (localMetadataSource) { - return localMetadataSource; - } - // Fallback to network as metadata source - const metadata = await invokeAsync(this.getCloudDiscoveryMetadataFromNetwork.bind(this), PerformanceEvents.AuthorityGetCloudDiscoveryMetadataFromNetwork, this.logger, this.performanceClient, this.correlationId)(); - if (metadata) { - updateCloudDiscoveryMetadata(metadataEntity, metadata, true); - return AuthorityMetadataSource.NETWORK; - } - // Metadata could not be obtained from the config, cache, network or hardcoded values - throw createClientConfigurationError(untrustedAuthority); - } - updateCloudDiscoveryMetadataFromLocalSources(metadataEntity) { - this.logger.verbose("Attempting to get cloud discovery metadata from authority configuration"); - this.logger.verbosePii(`Known Authorities: ${this.authorityOptions.knownAuthorities || - Constants.NOT_APPLICABLE}`); - this.logger.verbosePii(`Authority Metadata: ${this.authorityOptions.authorityMetadata || - Constants.NOT_APPLICABLE}`); - this.logger.verbosePii(`Canonical Authority: ${metadataEntity.canonical_authority || Constants.NOT_APPLICABLE}`); - const metadata = this.getCloudDiscoveryMetadataFromConfig(); - if (metadata) { - this.logger.verbose("Found cloud discovery metadata in authority configuration"); - updateCloudDiscoveryMetadata(metadataEntity, metadata, false); - return AuthorityMetadataSource.CONFIG; - } - // If the cached metadata came from config but that config was not passed to this instance, we must go to hardcoded values - this.logger.verbose("Did not find cloud discovery metadata in the config... Attempting to get cloud discovery metadata from the hardcoded values."); - if (this.options.skipAuthorityMetadataCache) { - this.logger.verbose("Skipping hardcoded cloud discovery metadata cache since skipAuthorityMetadataCache is set to true. Attempting to get cloud discovery metadata from the network metadata cache."); - } - else { - const hardcodedMetadata = getCloudDiscoveryMetadataFromHardcodedValues(this.hostnameAndPort); - if (hardcodedMetadata) { - this.logger.verbose("Found cloud discovery metadata from hardcoded values."); - updateCloudDiscoveryMetadata(metadataEntity, hardcodedMetadata, false); - return AuthorityMetadataSource.HARDCODED_VALUES; - } - this.logger.verbose("Did not find cloud discovery metadata in hardcoded values... Attempting to get cloud discovery metadata from the network metadata cache."); - } - const metadataEntityExpired = isAuthorityMetadataExpired(metadataEntity); - if (this.isAuthoritySameType(metadataEntity) && - metadataEntity.aliasesFromNetwork && - !metadataEntityExpired) { - this.logger.verbose("Found cloud discovery metadata in the cache."); - // No need to update - return AuthorityMetadataSource.CACHE; - } - else if (metadataEntityExpired) { - this.logger.verbose("The metadata entity is expired."); - } - return null; - } - /** - * Parse cloudDiscoveryMetadata config or check knownAuthorities - */ - getCloudDiscoveryMetadataFromConfig() { - // CIAM does not support cloud discovery metadata - if (this.authorityType === AuthorityType.Ciam) { - this.logger.verbose("CIAM authorities do not support cloud discovery metadata, generate the aliases from authority host."); - return Authority.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort); - } - // Check if network response was provided in config - if (this.authorityOptions.cloudDiscoveryMetadata) { - this.logger.verbose("The cloud discovery metadata has been provided as a network response, in the config."); - try { - this.logger.verbose("Attempting to parse the cloud discovery metadata."); - const parsedResponse = JSON.parse(this.authorityOptions.cloudDiscoveryMetadata); - const metadata = getCloudDiscoveryMetadataFromNetworkResponse(parsedResponse.metadata, this.hostnameAndPort); - this.logger.verbose("Parsed the cloud discovery metadata."); - if (metadata) { - this.logger.verbose("There is returnable metadata attached to the parsed cloud discovery metadata."); - return metadata; - } - else { - this.logger.verbose("There is no metadata attached to the parsed cloud discovery metadata."); - } - } - catch (e) { - this.logger.verbose("Unable to parse the cloud discovery metadata. Throwing Invalid Cloud Discovery Metadata Error."); - throw createClientConfigurationError(invalidCloudDiscoveryMetadata); - } - } - // If cloudDiscoveryMetadata is empty or does not contain the host, check knownAuthorities - if (this.isInKnownAuthorities()) { - this.logger.verbose("The host is included in knownAuthorities. Creating new cloud discovery metadata from the host."); - return Authority.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort); - } - return null; - } - /** - * Called to get metadata from network if CloudDiscoveryMetadata was not populated by config - * - * @param hasHardcodedMetadata boolean - */ - async getCloudDiscoveryMetadataFromNetwork() { - this.performanceClient?.addQueueMeasurement(PerformanceEvents.AuthorityGetCloudDiscoveryMetadataFromNetwork, this.correlationId); - const instanceDiscoveryEndpoint = `${Constants.AAD_INSTANCE_DISCOVERY_ENDPT}${this.canonicalAuthority}oauth2/v2.0/authorize`; - const options = {}; - /* - * TODO: Add a timeout if the authority exists in our library's - * hardcoded list of metadata - */ - let match = null; - try { - const response = await this.networkInterface.sendGetRequestAsync(instanceDiscoveryEndpoint, options); - let typedResponseBody; - let metadata; - if (isCloudInstanceDiscoveryResponse(response.body)) { - typedResponseBody = - response.body; - metadata = typedResponseBody.metadata; - this.logger.verbosePii(`tenant_discovery_endpoint is: ${typedResponseBody.tenant_discovery_endpoint}`); - } - else if (isCloudInstanceDiscoveryErrorResponse(response.body)) { - this.logger.warning(`A CloudInstanceDiscoveryErrorResponse was returned. The cloud instance discovery network request's status code is: ${response.status}`); - typedResponseBody = - response.body; - if (typedResponseBody.error === Constants.INVALID_INSTANCE) { - this.logger.error("The CloudInstanceDiscoveryErrorResponse error is invalid_instance."); - return null; - } - this.logger.warning(`The CloudInstanceDiscoveryErrorResponse error is ${typedResponseBody.error}`); - this.logger.warning(`The CloudInstanceDiscoveryErrorResponse error description is ${typedResponseBody.error_description}`); - this.logger.warning("Setting the value of the CloudInstanceDiscoveryMetadata (returned from the network) to []"); - metadata = []; - } - else { - this.logger.error("AAD did not return a CloudInstanceDiscoveryResponse or CloudInstanceDiscoveryErrorResponse"); - return null; - } - this.logger.verbose("Attempting to find a match between the developer's authority and the CloudInstanceDiscoveryMetadata returned from the network request."); - match = getCloudDiscoveryMetadataFromNetworkResponse(metadata, this.hostnameAndPort); - } - catch (error) { - if (error instanceof AuthError) { - this.logger.error(`There was a network error while attempting to get the cloud discovery instance metadata.\nError: ${error.errorCode}\nError Description: ${error.errorMessage}`); - } - else { - const typedError = error; - this.logger.error(`A non-MSALJS error was thrown while attempting to get the cloud instance discovery metadata.\nError: ${typedError.name}\nError Description: ${typedError.message}`); - } - return null; - } - // Custom Domain scenario, host is trusted because Instance Discovery call succeeded - if (!match) { - this.logger.warning("The developer's authority was not found within the CloudInstanceDiscoveryMetadata returned from the network request."); - this.logger.verbose("Creating custom Authority for custom domain scenario."); - match = Authority.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort); - } - return match; - } - /** - * Helper function to determine if this host is included in the knownAuthorities config option - */ - isInKnownAuthorities() { - const matches = this.authorityOptions.knownAuthorities.filter((authority) => { - return (authority && - UrlString.getDomainFromUrl(authority).toLowerCase() === - this.hostnameAndPort); - }); - return matches.length > 0; - } - /** - * helper function to populate the authority based on azureCloudOptions - * @param authorityString - * @param azureCloudOptions - */ - static generateAuthority(authorityString, azureCloudOptions) { - let authorityAzureCloudInstance; - if (azureCloudOptions && - azureCloudOptions.azureCloudInstance !== AzureCloudInstance.None) { - const tenant = azureCloudOptions.tenant - ? azureCloudOptions.tenant - : Constants.DEFAULT_COMMON_TENANT; - authorityAzureCloudInstance = `${azureCloudOptions.azureCloudInstance}/${tenant}/`; - } - return authorityAzureCloudInstance - ? authorityAzureCloudInstance - : authorityString; - } - /** - * Creates cloud discovery metadata object from a given host - * @param host - */ - static createCloudDiscoveryMetadataFromHost(host) { - return { - preferred_network: host, - preferred_cache: host, - aliases: [host], - }; - } - /** - * helper function to generate environment from authority object - */ - getPreferredCache() { - if (this.managedIdentity) { - return Constants.DEFAULT_AUTHORITY_HOST; - } - else if (this.discoveryComplete()) { - return this.metadata.preferred_cache; - } - else { - throw createClientAuthError(endpointResolutionError); - } - } - /** - * Returns whether or not the provided host is an alias of this authority instance - * @param host - */ - isAlias(host) { - return this.metadata.aliases.indexOf(host) > -1; - } - /** - * Returns whether or not the provided host is an alias of a known Microsoft authority for purposes of endpoint discovery - * @param host - */ - isAliasOfKnownMicrosoftAuthority(host) { - return InstanceDiscoveryMetadataAliases.has(host); - } - /** - * Checks whether the provided host is that of a public cloud authority - * - * @param authority string - * @returns bool - */ - static isPublicCloudAuthority(host) { - return Constants.KNOWN_PUBLIC_CLOUDS.indexOf(host) >= 0; - } - /** - * Rebuild the authority string with the region - * - * @param host string - * @param region string - */ - static buildRegionalAuthorityString(host, region, queryString) { - // Create and validate a Url string object with the initial authority string - const authorityUrlInstance = new UrlString(host); - authorityUrlInstance.validateAsUri(); - const authorityUrlParts = authorityUrlInstance.getUrlComponents(); - let hostNameAndPort = `${region}.${authorityUrlParts.HostNameAndPort}`; - if (this.isPublicCloudAuthority(authorityUrlParts.HostNameAndPort)) { - hostNameAndPort = `${region}.${Constants.REGIONAL_AUTH_PUBLIC_CLOUD_SUFFIX}`; - } - // Include the query string portion of the url - const url = UrlString.constructAuthorityUriFromObject({ - ...authorityUrlInstance.getUrlComponents(), - HostNameAndPort: hostNameAndPort, - }).urlString; - // Add the query string if a query string was provided - if (queryString) - return `${url}?${queryString}`; - return url; - } - /** - * Replace the endpoints in the metadata object with their regional equivalents. - * - * @param metadata OpenIdConfigResponse - * @param azureRegion string - */ - static replaceWithRegionalInformation(metadata, azureRegion) { - const regionalMetadata = { ...metadata }; - regionalMetadata.authorization_endpoint = - Authority.buildRegionalAuthorityString(regionalMetadata.authorization_endpoint, azureRegion); - regionalMetadata.token_endpoint = - Authority.buildRegionalAuthorityString(regionalMetadata.token_endpoint, azureRegion); - if (regionalMetadata.end_session_endpoint) { - regionalMetadata.end_session_endpoint = - Authority.buildRegionalAuthorityString(regionalMetadata.end_session_endpoint, azureRegion); - } - return regionalMetadata; - } - /** - * Transform CIAM_AUTHORIY as per the below rules: - * If no path segments found and it is a CIAM authority (hostname ends with .ciamlogin.com), then transform it - * - * NOTE: The transformation path should go away once STS supports CIAM with the format: `tenantIdorDomain.ciamlogin.com` - * `ciamlogin.com` can also change in the future and we should accommodate the same - * - * @param authority - */ - static transformCIAMAuthority(authority) { - let ciamAuthority = authority; - const authorityUrl = new UrlString(authority); - const authorityUrlComponents = authorityUrl.getUrlComponents(); - // check if transformation is needed - if (authorityUrlComponents.PathSegments.length === 0 && - authorityUrlComponents.HostNameAndPort.endsWith(Constants.CIAM_AUTH_URL)) { - const tenantIdOrDomain = authorityUrlComponents.HostNameAndPort.split(".")[0]; - ciamAuthority = `${ciamAuthority}${tenantIdOrDomain}${Constants.AAD_TENANT_DOMAIN_SUFFIX}`; - } - return ciamAuthority; - } -} -// Reserved tenant domain names that will not be replaced with tenant id -Authority.reservedTenantDomains = new Set([ - "{tenant}", - "{tenantid}", - AADAuthorityConstants.COMMON, - AADAuthorityConstants.CONSUMERS, - AADAuthorityConstants.ORGANIZATIONS, -]); -/** - * Extract tenantId from authority - */ -function getTenantFromAuthorityString(authority) { - const authorityUrl = new UrlString(authority); - const authorityUrlComponents = authorityUrl.getUrlComponents(); - /** - * For credential matching purposes, tenantId is the last path segment of the authority URL: - * AAD Authority - domain/tenantId -> Credentials are cached with realm = tenantId - * B2C Authority - domain/{tenantId}?/.../policy -> Credentials are cached with realm = policy - * tenantId is downcased because B2C policies can have mixed case but tfp claim is downcased - * - * Note that we may not have any path segments in certain OIDC scenarios. - */ - const tenantId = authorityUrlComponents.PathSegments.slice(-1)[0]?.toLowerCase(); - switch (tenantId) { - case AADAuthorityConstants.COMMON: - case AADAuthorityConstants.ORGANIZATIONS: - case AADAuthorityConstants.CONSUMERS: - return undefined; - default: - return tenantId; - } -} -function formatAuthorityUri(authorityUri) { - return authorityUri.endsWith(Constants.FORWARD_SLASH) - ? authorityUri - : `${authorityUri}${Constants.FORWARD_SLASH}`; -} -function buildStaticAuthorityOptions(authOptions) { - const rawCloudDiscoveryMetadata = authOptions.cloudDiscoveryMetadata; - let cloudDiscoveryMetadata = undefined; - if (rawCloudDiscoveryMetadata) { - try { - cloudDiscoveryMetadata = JSON.parse(rawCloudDiscoveryMetadata); - } - catch (e) { - throw createClientConfigurationError(invalidCloudDiscoveryMetadata); - } - } - return { - canonicalAuthority: authOptions.authority - ? formatAuthorityUri(authOptions.authority) - : undefined, - knownAuthorities: authOptions.knownAuthorities, - cloudDiscoveryMetadata: cloudDiscoveryMetadata, - }; -} - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * Create an authority object of the correct type based on the url - * Performs basic authority validation - checks to see if the authority is of a valid type (i.e. aad, b2c, adfs) - * - * Also performs endpoint discovery. - * - * @param authorityUri - * @param networkClient - * @param protocolMode - * @internal - */ -async function createDiscoveredInstance(authorityUri, networkClient, cacheManager, authorityOptions, logger, correlationId, performanceClient) { - performanceClient?.addQueueMeasurement(PerformanceEvents.AuthorityFactoryCreateDiscoveredInstance, correlationId); - const authorityUriFinal = Authority.transformCIAMAuthority(formatAuthorityUri(authorityUri)); - // Initialize authority and perform discovery endpoint check. - const acquireTokenAuthority = new Authority(authorityUriFinal, networkClient, cacheManager, authorityOptions, logger, correlationId, performanceClient); - try { - await invokeAsync(acquireTokenAuthority.resolveEndpointsAsync.bind(acquireTokenAuthority), PerformanceEvents.AuthorityResolveEndpointsAsync, logger, performanceClient, correlationId)(); - return acquireTokenAuthority; - } - catch (e) { - throw createClientAuthError(endpointResolutionError); - } -} - -var AuthorityFactory = /*#__PURE__*/Object.freeze({ - __proto__: null, - createDiscoveredInstance: createDiscoveredInstance -}); - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -const CLIENT_ID = "client_id"; -const REDIRECT_URI = "redirect_uri"; -const RESPONSE_TYPE = "response_type"; -const RESPONSE_MODE = "response_mode"; -const GRANT_TYPE = "grant_type"; -const CLAIMS = "claims"; -const SCOPE = "scope"; -const ERROR = "error"; -const ERROR_DESCRIPTION = "error_description"; -const ACCESS_TOKEN = "access_token"; -const ID_TOKEN = "id_token"; -const REFRESH_TOKEN = "refresh_token"; -const EXPIRES_IN = "expires_in"; -const REFRESH_TOKEN_EXPIRES_IN = "refresh_token_expires_in"; -const STATE = "state"; -const NONCE = "nonce"; -const PROMPT = "prompt"; -const SESSION_STATE = "session_state"; -const CLIENT_INFO = "client_info"; -const CODE = "code"; -const CODE_CHALLENGE = "code_challenge"; -const CODE_CHALLENGE_METHOD = "code_challenge_method"; -const CODE_VERIFIER = "code_verifier"; -const CLIENT_REQUEST_ID = "client-request-id"; -const X_CLIENT_SKU = "x-client-SKU"; -const X_CLIENT_VER = "x-client-VER"; -const X_CLIENT_OS = "x-client-OS"; -const X_CLIENT_CPU = "x-client-CPU"; -const X_CLIENT_CURR_TELEM = "x-client-current-telemetry"; -const X_CLIENT_LAST_TELEM = "x-client-last-telemetry"; -const X_MS_LIB_CAPABILITY = "x-ms-lib-capability"; -const X_APP_NAME = "x-app-name"; -const X_APP_VER = "x-app-ver"; -const POST_LOGOUT_URI = "post_logout_redirect_uri"; -const ID_TOKEN_HINT = "id_token_hint"; -const DEVICE_CODE = "device_code"; -const CLIENT_SECRET = "client_secret"; -const CLIENT_ASSERTION = "client_assertion"; -const CLIENT_ASSERTION_TYPE = "client_assertion_type"; -const TOKEN_TYPE = "token_type"; -const REQ_CNF = "req_cnf"; -const OBO_ASSERTION = "assertion"; -const REQUESTED_TOKEN_USE = "requested_token_use"; -const ON_BEHALF_OF = "on_behalf_of"; -const FOCI = "foci"; -const CCS_HEADER = "X-AnchorMailbox"; -const RETURN_SPA_CODE = "return_spa_code"; -const NATIVE_BROKER = "nativebroker"; -const LOGOUT_HINT = "logout_hint"; -const SID = "sid"; -const LOGIN_HINT = "login_hint"; -const DOMAIN_HINT = "domain_hint"; -const X_CLIENT_EXTRA_SKU = "x-client-xtra-sku"; -const BROKER_CLIENT_ID = "brk_client_id"; -const BROKER_REDIRECT_URI = "brk_redirect_uri"; - -var AADServerParamKeys = /*#__PURE__*/Object.freeze({ - __proto__: null, - ACCESS_TOKEN: ACCESS_TOKEN, - BROKER_CLIENT_ID: BROKER_CLIENT_ID, - BROKER_REDIRECT_URI: BROKER_REDIRECT_URI, - CCS_HEADER: CCS_HEADER, - CLAIMS: CLAIMS, - CLIENT_ASSERTION: CLIENT_ASSERTION, - CLIENT_ASSERTION_TYPE: CLIENT_ASSERTION_TYPE, - CLIENT_ID: CLIENT_ID, - CLIENT_INFO: CLIENT_INFO, - CLIENT_REQUEST_ID: CLIENT_REQUEST_ID, - CLIENT_SECRET: CLIENT_SECRET, - CODE: CODE, - CODE_CHALLENGE: CODE_CHALLENGE, - CODE_CHALLENGE_METHOD: CODE_CHALLENGE_METHOD, - CODE_VERIFIER: CODE_VERIFIER, - DEVICE_CODE: DEVICE_CODE, - DOMAIN_HINT: DOMAIN_HINT, - ERROR: ERROR, - ERROR_DESCRIPTION: ERROR_DESCRIPTION, - EXPIRES_IN: EXPIRES_IN, - FOCI: FOCI, - GRANT_TYPE: GRANT_TYPE, - ID_TOKEN: ID_TOKEN, - ID_TOKEN_HINT: ID_TOKEN_HINT, - LOGIN_HINT: LOGIN_HINT, - LOGOUT_HINT: LOGOUT_HINT, - NATIVE_BROKER: NATIVE_BROKER, - NONCE: NONCE, - OBO_ASSERTION: OBO_ASSERTION, - ON_BEHALF_OF: ON_BEHALF_OF, - POST_LOGOUT_URI: POST_LOGOUT_URI, - PROMPT: PROMPT, - REDIRECT_URI: REDIRECT_URI, - REFRESH_TOKEN: REFRESH_TOKEN, - REFRESH_TOKEN_EXPIRES_IN: REFRESH_TOKEN_EXPIRES_IN, - REQUESTED_TOKEN_USE: REQUESTED_TOKEN_USE, - REQ_CNF: REQ_CNF, - RESPONSE_MODE: RESPONSE_MODE, - RESPONSE_TYPE: RESPONSE_TYPE, - RETURN_SPA_CODE: RETURN_SPA_CODE, - SCOPE: SCOPE, - SESSION_STATE: SESSION_STATE, - SID: SID, - STATE: STATE, - TOKEN_TYPE: TOKEN_TYPE, - X_APP_NAME: X_APP_NAME, - X_APP_VER: X_APP_VER, - X_CLIENT_CPU: X_CLIENT_CPU, - X_CLIENT_CURR_TELEM: X_CLIENT_CURR_TELEM, - X_CLIENT_EXTRA_SKU: X_CLIENT_EXTRA_SKU, - X_CLIENT_LAST_TELEM: X_CLIENT_LAST_TELEM, - X_CLIENT_OS: X_CLIENT_OS, - X_CLIENT_SKU: X_CLIENT_SKU, - X_CLIENT_VER: X_CLIENT_VER, - X_MS_LIB_CAPABILITY: X_MS_LIB_CAPABILITY -}); - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -const DEFAULT_CRYPTO_IMPLEMENTATION = { - createNewGuid: () => { - throw createClientAuthError(methodNotImplemented); - }, - base64Decode: () => { - throw createClientAuthError(methodNotImplemented); - }, - base64Encode: () => { - throw createClientAuthError(methodNotImplemented); - }, - base64UrlEncode: () => { - throw createClientAuthError(methodNotImplemented); - }, - encodeKid: () => { - throw createClientAuthError(methodNotImplemented); - }, - async getPublicKeyThumbprint() { - throw createClientAuthError(methodNotImplemented); - }, - async removeTokenBindingKey() { - throw createClientAuthError(methodNotImplemented); - }, - async clearKeystore() { - throw createClientAuthError(methodNotImplemented); - }, - async signJwt() { - throw createClientAuthError(methodNotImplemented); - }, - async hashString() { - throw createClientAuthError(methodNotImplemented); - }, -}; - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * Log message level. - */ -exports.LogLevel = void 0; -(function (LogLevel) { - LogLevel[LogLevel["Error"] = 0] = "Error"; - LogLevel[LogLevel["Warning"] = 1] = "Warning"; - LogLevel[LogLevel["Info"] = 2] = "Info"; - LogLevel[LogLevel["Verbose"] = 3] = "Verbose"; - LogLevel[LogLevel["Trace"] = 4] = "Trace"; -})(exports.LogLevel || (exports.LogLevel = {})); -/** - * Class which facilitates logging of messages to a specific place. - */ -class Logger { - constructor(loggerOptions, packageName, packageVersion) { - // Current log level, defaults to info. - this.level = exports.LogLevel.Info; - const defaultLoggerCallback = () => { - return; - }; - const setLoggerOptions = loggerOptions || Logger.createDefaultLoggerOptions(); - this.localCallback = - setLoggerOptions.loggerCallback || defaultLoggerCallback; - this.piiLoggingEnabled = setLoggerOptions.piiLoggingEnabled || false; - this.level = - typeof setLoggerOptions.logLevel === "number" - ? setLoggerOptions.logLevel - : exports.LogLevel.Info; - this.correlationId = - setLoggerOptions.correlationId || Constants.EMPTY_STRING; - this.packageName = packageName || Constants.EMPTY_STRING; - this.packageVersion = packageVersion || Constants.EMPTY_STRING; - } - static createDefaultLoggerOptions() { - return { - loggerCallback: () => { - // allow users to not set loggerCallback - }, - piiLoggingEnabled: false, - logLevel: exports.LogLevel.Info, - }; - } - /** - * Create new Logger with existing configurations. - */ - clone(packageName, packageVersion, correlationId) { - return new Logger({ - loggerCallback: this.localCallback, - piiLoggingEnabled: this.piiLoggingEnabled, - logLevel: this.level, - correlationId: correlationId || this.correlationId, - }, packageName, packageVersion); - } - /** - * Log message with required options. - */ - logMessage(logMessage, options) { - if (options.logLevel > this.level || - (!this.piiLoggingEnabled && options.containsPii)) { - return; - } - const timestamp = new Date().toUTCString(); - // Add correlationId to logs if set, correlationId provided on log messages take precedence - const logHeader = `[${timestamp}] : [${options.correlationId || this.correlationId || ""}]`; - const log = `${logHeader} : ${this.packageName}@${this.packageVersion} : ${exports.LogLevel[options.logLevel]} - ${logMessage}`; - // debug(`msal:${LogLevel[options.logLevel]}${options.containsPii ? "-Pii": Constants.EMPTY_STRING}${options.context ? `:${options.context}` : Constants.EMPTY_STRING}`)(logMessage); - this.executeCallback(options.logLevel, log, options.containsPii || false); - } - /** - * Execute callback with message. - */ - executeCallback(level, message, containsPii) { - if (this.localCallback) { - this.localCallback(level, message, containsPii); - } - } - /** - * Logs error messages. - */ - error(message, correlationId) { - this.logMessage(message, { - logLevel: exports.LogLevel.Error, - containsPii: false, - correlationId: correlationId || Constants.EMPTY_STRING, - }); - } - /** - * Logs error messages with PII. - */ - errorPii(message, correlationId) { - this.logMessage(message, { - logLevel: exports.LogLevel.Error, - containsPii: true, - correlationId: correlationId || Constants.EMPTY_STRING, - }); - } - /** - * Logs warning messages. - */ - warning(message, correlationId) { - this.logMessage(message, { - logLevel: exports.LogLevel.Warning, - containsPii: false, - correlationId: correlationId || Constants.EMPTY_STRING, - }); - } - /** - * Logs warning messages with PII. - */ - warningPii(message, correlationId) { - this.logMessage(message, { - logLevel: exports.LogLevel.Warning, - containsPii: true, - correlationId: correlationId || Constants.EMPTY_STRING, - }); - } - /** - * Logs info messages. - */ - info(message, correlationId) { - this.logMessage(message, { - logLevel: exports.LogLevel.Info, - containsPii: false, - correlationId: correlationId || Constants.EMPTY_STRING, - }); - } - /** - * Logs info messages with PII. - */ - infoPii(message, correlationId) { - this.logMessage(message, { - logLevel: exports.LogLevel.Info, - containsPii: true, - correlationId: correlationId || Constants.EMPTY_STRING, - }); - } - /** - * Logs verbose messages. - */ - verbose(message, correlationId) { - this.logMessage(message, { - logLevel: exports.LogLevel.Verbose, - containsPii: false, - correlationId: correlationId || Constants.EMPTY_STRING, - }); - } - /** - * Logs verbose messages with PII. - */ - verbosePii(message, correlationId) { - this.logMessage(message, { - logLevel: exports.LogLevel.Verbose, - containsPii: true, - correlationId: correlationId || Constants.EMPTY_STRING, - }); - } - /** - * Logs trace messages. - */ - trace(message, correlationId) { - this.logMessage(message, { - logLevel: exports.LogLevel.Trace, - containsPii: false, - correlationId: correlationId || Constants.EMPTY_STRING, - }); - } - /** - * Logs trace messages with PII. - */ - tracePii(message, correlationId) { - this.logMessage(message, { - logLevel: exports.LogLevel.Trace, - containsPii: true, - correlationId: correlationId || Constants.EMPTY_STRING, - }); - } - /** - * Returns whether PII Logging is enabled or not. - */ - isPiiLoggingEnabled() { - return this.piiLoggingEnabled || false; - } -} - -/* eslint-disable header/header */ -const name = "@azure/msal-common"; -const version = "14.16.1"; - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * The ScopeSet class creates a set of scopes. Scopes are case-insensitive, unique values, so the Set object in JS makes - * the most sense to implement for this class. All scopes are trimmed and converted to lower case strings in intersection and union functions - * to ensure uniqueness of strings. - */ -class ScopeSet { - constructor(inputScopes) { - // Filter empty string and null/undefined array items - const scopeArr = inputScopes - ? StringUtils.trimArrayEntries([...inputScopes]) - : []; - const filteredInput = scopeArr - ? StringUtils.removeEmptyStringsFromArray(scopeArr) - : []; - // Validate and filter scopes (validate function throws if validation fails) - this.validateInputScopes(filteredInput); - this.scopes = new Set(); // Iterator in constructor not supported by IE11 - filteredInput.forEach((scope) => this.scopes.add(scope)); - } - /** - * Factory method to create ScopeSet from space-delimited string - * @param inputScopeString - * @param appClientId - * @param scopesRequired - */ - static fromString(inputScopeString) { - const scopeString = inputScopeString || Constants.EMPTY_STRING; - const inputScopes = scopeString.split(" "); - return new ScopeSet(inputScopes); - } - /** - * Creates the set of scopes to search for in cache lookups - * @param inputScopeString - * @returns - */ - static createSearchScopes(inputScopeString) { - const scopeSet = new ScopeSet(inputScopeString); - if (!scopeSet.containsOnlyOIDCScopes()) { - scopeSet.removeOIDCScopes(); - } - else { - scopeSet.removeScope(Constants.OFFLINE_ACCESS_SCOPE); - } - return scopeSet; - } - /** - * Used to validate the scopes input parameter requested by the developer. - * @param {Array} inputScopes - Developer requested permissions. Not all scopes are guaranteed to be included in the access token returned. - * @param {boolean} scopesRequired - Boolean indicating whether the scopes array is required or not - */ - validateInputScopes(inputScopes) { - // Check if scopes are required but not given or is an empty array - if (!inputScopes || inputScopes.length < 1) { - throw createClientConfigurationError(emptyInputScopesError); - } - } - /** - * Check if a given scope is present in this set of scopes. - * @param scope - */ - containsScope(scope) { - const lowerCaseScopes = this.printScopesLowerCase().split(" "); - const lowerCaseScopesSet = new ScopeSet(lowerCaseScopes); - // compare lowercase scopes - return scope - ? lowerCaseScopesSet.scopes.has(scope.toLowerCase()) - : false; - } - /** - * Check if a set of scopes is present in this set of scopes. - * @param scopeSet - */ - containsScopeSet(scopeSet) { - if (!scopeSet || scopeSet.scopes.size <= 0) { - return false; - } - return (this.scopes.size >= scopeSet.scopes.size && - scopeSet.asArray().every((scope) => this.containsScope(scope))); - } - /** - * Check if set of scopes contains only the defaults - */ - containsOnlyOIDCScopes() { - let defaultScopeCount = 0; - OIDC_SCOPES.forEach((defaultScope) => { - if (this.containsScope(defaultScope)) { - defaultScopeCount += 1; - } - }); - return this.scopes.size === defaultScopeCount; - } - /** - * Appends single scope if passed - * @param newScope - */ - appendScope(newScope) { - if (newScope) { - this.scopes.add(newScope.trim()); - } - } - /** - * Appends multiple scopes if passed - * @param newScopes - */ - appendScopes(newScopes) { - try { - newScopes.forEach((newScope) => this.appendScope(newScope)); - } - catch (e) { - throw createClientAuthError(cannotAppendScopeSet); - } - } - /** - * Removes element from set of scopes. - * @param scope - */ - removeScope(scope) { - if (!scope) { - throw createClientAuthError(cannotRemoveEmptyScope); - } - this.scopes.delete(scope.trim()); - } - /** - * Removes default scopes from set of scopes - * Primarily used to prevent cache misses if the default scopes are not returned from the server - */ - removeOIDCScopes() { - OIDC_SCOPES.forEach((defaultScope) => { - this.scopes.delete(defaultScope); - }); - } - /** - * Combines an array of scopes with the current set of scopes. - * @param otherScopes - */ - unionScopeSets(otherScopes) { - if (!otherScopes) { - throw createClientAuthError(emptyInputScopeSet); - } - const unionScopes = new Set(); // Iterator in constructor not supported in IE11 - otherScopes.scopes.forEach((scope) => unionScopes.add(scope.toLowerCase())); - this.scopes.forEach((scope) => unionScopes.add(scope.toLowerCase())); - return unionScopes; - } - /** - * Check if scopes intersect between this set and another. - * @param otherScopes - */ - intersectingScopeSets(otherScopes) { - if (!otherScopes) { - throw createClientAuthError(emptyInputScopeSet); - } - // Do not allow OIDC scopes to be the only intersecting scopes - if (!otherScopes.containsOnlyOIDCScopes()) { - otherScopes.removeOIDCScopes(); - } - const unionScopes = this.unionScopeSets(otherScopes); - const sizeOtherScopes = otherScopes.getScopeCount(); - const sizeThisScopes = this.getScopeCount(); - const sizeUnionScopes = unionScopes.size; - return sizeUnionScopes < sizeThisScopes + sizeOtherScopes; - } - /** - * Returns size of set of scopes. - */ - getScopeCount() { - return this.scopes.size; - } - /** - * Returns the scopes as an array of string values - */ - asArray() { - const array = []; - this.scopes.forEach((val) => array.push(val)); - return array; - } - /** - * Prints scopes into a space-delimited string - */ - printScopes() { - if (this.scopes) { - const scopeArr = this.asArray(); - return scopeArr.join(" "); - } - return Constants.EMPTY_STRING; - } - /** - * Prints scopes into a space-delimited lower-case string (used for caching) - */ - printScopesLowerCase() { - return this.printScopes().toLowerCase(); - } -} - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * Function to build a client info object from server clientInfo string - * @param rawClientInfo - * @param crypto - */ -function buildClientInfo(rawClientInfo, base64Decode) { - if (!rawClientInfo) { - throw createClientAuthError(clientInfoEmptyError); - } - try { - const decodedClientInfo = base64Decode(rawClientInfo); - return JSON.parse(decodedClientInfo); - } - catch (e) { - throw createClientAuthError(clientInfoDecodingError); - } -} -/** - * Function to build a client info object from cached homeAccountId string - * @param homeAccountId - */ -function buildClientInfoFromHomeAccountId(homeAccountId) { - if (!homeAccountId) { - throw createClientAuthError(clientInfoDecodingError); - } - const clientInfoParts = homeAccountId.split(Separators.CLIENT_INFO_SEPARATOR, 2); - return { - uid: clientInfoParts[0], - utid: clientInfoParts.length < 2 - ? Constants.EMPTY_STRING - : clientInfoParts[1], - }; -} - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * Returns true if tenantId matches the utid portion of homeAccountId - * @param tenantId - * @param homeAccountId - * @returns - */ -function tenantIdMatchesHomeTenant(tenantId, homeAccountId) { - return (!!tenantId && - !!homeAccountId && - tenantId === homeAccountId.split(".")[1]); -} -/** - * Build tenant profile - * @param homeAccountId - Home account identifier for this account object - * @param localAccountId - Local account identifer for this account object - * @param tenantId - Full tenant or organizational id that this account belongs to - * @param idTokenClaims - Claims from the ID token - * @returns - */ -function buildTenantProfile(homeAccountId, localAccountId, tenantId, idTokenClaims) { - if (idTokenClaims) { - const { oid, sub, tid, name, tfp, acr } = idTokenClaims; - /** - * Since there is no way to determine if the authority is AAD or B2C, we exhaust all the possible claims that can serve as tenant ID with the following precedence: - * tid - TenantID claim that identifies the tenant that issued the token in AAD. Expected in all AAD ID tokens, not present in B2C ID Tokens. - * tfp - Trust Framework Policy claim that identifies the policy that was used to authenticate the user. Functions as tenant for B2C scenarios. - * acr - Authentication Context Class Reference claim used only with older B2C policies. Fallback in case tfp is not present, but likely won't be present anyway. - */ - const tenantId = tid || tfp || acr || ""; - return { - tenantId: tenantId, - localAccountId: oid || sub || "", - name: name, - isHomeTenant: tenantIdMatchesHomeTenant(tenantId, homeAccountId), - }; - } - else { - return { - tenantId, - localAccountId, - isHomeTenant: tenantIdMatchesHomeTenant(tenantId, homeAccountId), - }; - } -} -/** - * Replaces account info that varies by tenant profile sourced from the ID token claims passed in with the tenant-specific account info - * @param baseAccountInfo - * @param idTokenClaims - * @returns - */ -function updateAccountTenantProfileData(baseAccountInfo, tenantProfile, idTokenClaims, idTokenSecret) { - let updatedAccountInfo = baseAccountInfo; - // Tenant Profile overrides passed in account info - if (tenantProfile) { - // eslint-disable-next-line @typescript-eslint/no-unused-vars - const { isHomeTenant, ...tenantProfileOverride } = tenantProfile; - updatedAccountInfo = { ...baseAccountInfo, ...tenantProfileOverride }; - } - // ID token claims override passed in account info and tenant profile - if (idTokenClaims) { - // Ignore isHomeTenant, loginHint, and sid which are part of tenant profile but not base account info - // eslint-disable-next-line @typescript-eslint/no-unused-vars - const { isHomeTenant, ...claimsSourcedTenantProfile } = buildTenantProfile(baseAccountInfo.homeAccountId, baseAccountInfo.localAccountId, baseAccountInfo.tenantId, idTokenClaims); - updatedAccountInfo = { - ...updatedAccountInfo, - ...claimsSourcedTenantProfile, - idTokenClaims: idTokenClaims, - idToken: idTokenSecret, - }; - return updatedAccountInfo; - } - return updatedAccountInfo; -} - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * Gets tenantId from available ID token claims to set as credential realm with the following precedence: - * 1. tid - if the token is acquired from an Azure AD tenant tid will be present - * 2. tfp - if the token is acquired from a modern B2C tenant tfp should be present - * 3. acr - if the token is acquired from a legacy B2C tenant acr should be present - * Downcased to match the realm case-insensitive comparison requirements - * @param idTokenClaims - * @returns - */ -function getTenantIdFromIdTokenClaims(idTokenClaims) { - if (idTokenClaims) { - const tenantId = idTokenClaims.tid || idTokenClaims.tfp || idTokenClaims.acr; - return tenantId || null; - } - return null; -} - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * Type that defines required and optional parameters for an Account field (based on universal cache schema implemented by all MSALs). - * - * Key : Value Schema - * - * Key: -- - * - * Value Schema: - * { - * homeAccountId: home account identifier for the auth scheme, - * environment: entity that issued the token, represented as a full host - * realm: Full tenant or organizational identifier that the account belongs to - * localAccountId: Original tenant-specific accountID, usually used for legacy cases - * username: primary username that represents the user, usually corresponds to preferred_username in the v2 endpt - * authorityType: Accounts authority type as a string - * name: Full name for the account, including given name and family name, - * lastModificationTime: last time this entity was modified in the cache - * lastModificationApp: - * nativeAccountId: Account identifier on the native device - * tenantProfiles: Array of tenant profile objects for each tenant that the account has authenticated with in the browser - * } - * @internal - */ -class AccountEntity { - /** - * Generate Account Id key component as per the schema: - - */ - generateAccountId() { - const accountId = [this.homeAccountId, this.environment]; - return accountId.join(Separators.CACHE_KEY_SEPARATOR).toLowerCase(); - } - /** - * Generate Account Cache Key as per the schema: -- - */ - generateAccountKey() { - return AccountEntity.generateAccountCacheKey({ - homeAccountId: this.homeAccountId, - environment: this.environment, - tenantId: this.realm, - username: this.username, - localAccountId: this.localAccountId, - }); - } - /** - * Returns the AccountInfo interface for this account. - */ - getAccountInfo() { - return { - homeAccountId: this.homeAccountId, - environment: this.environment, - tenantId: this.realm, - username: this.username, - localAccountId: this.localAccountId, - name: this.name, - nativeAccountId: this.nativeAccountId, - authorityType: this.authorityType, - // Deserialize tenant profiles array into a Map - tenantProfiles: new Map((this.tenantProfiles || []).map((tenantProfile) => { - return [tenantProfile.tenantId, tenantProfile]; - })), - }; - } - /** - * Returns true if the account entity is in single tenant format (outdated), false otherwise - */ - isSingleTenant() { - return !this.tenantProfiles; - } - /** - * Generates account key from interface - * @param accountInterface - */ - static generateAccountCacheKey(accountInterface) { - const homeTenantId = accountInterface.homeAccountId.split(".")[1]; - const accountKey = [ - accountInterface.homeAccountId, - accountInterface.environment || "", - homeTenantId || accountInterface.tenantId || "", - ]; - return accountKey.join(Separators.CACHE_KEY_SEPARATOR).toLowerCase(); - } - /** - * Build Account cache from IdToken, clientInfo and authority/policy. Associated with AAD. - * @param accountDetails - */ - static createAccount(accountDetails, authority, base64Decode) { - const account = new AccountEntity(); - if (authority.authorityType === AuthorityType.Adfs) { - account.authorityType = CacheAccountType.ADFS_ACCOUNT_TYPE; - } - else if (authority.protocolMode === ProtocolMode.AAD) { - account.authorityType = CacheAccountType.MSSTS_ACCOUNT_TYPE; - } - else { - account.authorityType = CacheAccountType.GENERIC_ACCOUNT_TYPE; - } - let clientInfo; - if (accountDetails.clientInfo && base64Decode) { - clientInfo = buildClientInfo(accountDetails.clientInfo, base64Decode); - } - account.clientInfo = accountDetails.clientInfo; - account.homeAccountId = accountDetails.homeAccountId; - account.nativeAccountId = accountDetails.nativeAccountId; - const env = accountDetails.environment || - (authority && authority.getPreferredCache()); - if (!env) { - throw createClientAuthError(invalidCacheEnvironment); - } - account.environment = env; - // non AAD scenarios can have empty realm - account.realm = - clientInfo?.utid || - getTenantIdFromIdTokenClaims(accountDetails.idTokenClaims) || - ""; - // How do you account for MSA CID here? - account.localAccountId = - clientInfo?.uid || - accountDetails.idTokenClaims?.oid || - accountDetails.idTokenClaims?.sub || - ""; - /* - * In B2C scenarios the emails claim is used instead of preferred_username and it is an array. - * In most cases it will contain a single email. This field should not be relied upon if a custom - * policy is configured to return more than 1 email. - */ - const preferredUsername = accountDetails.idTokenClaims?.preferred_username || - accountDetails.idTokenClaims?.upn; - const email = accountDetails.idTokenClaims?.emails - ? accountDetails.idTokenClaims.emails[0] - : null; - account.username = preferredUsername || email || ""; - account.name = accountDetails.idTokenClaims?.name || ""; - account.cloudGraphHostName = accountDetails.cloudGraphHostName; - account.msGraphHost = accountDetails.msGraphHost; - if (accountDetails.tenantProfiles) { - account.tenantProfiles = accountDetails.tenantProfiles; - } - else { - const tenantProfile = buildTenantProfile(accountDetails.homeAccountId, account.localAccountId, account.realm, accountDetails.idTokenClaims); - account.tenantProfiles = [tenantProfile]; - } - return account; - } - /** - * Creates an AccountEntity object from AccountInfo - * @param accountInfo - * @param cloudGraphHostName - * @param msGraphHost - * @returns - */ - static createFromAccountInfo(accountInfo, cloudGraphHostName, msGraphHost) { - const account = new AccountEntity(); - account.authorityType = - accountInfo.authorityType || CacheAccountType.GENERIC_ACCOUNT_TYPE; - account.homeAccountId = accountInfo.homeAccountId; - account.localAccountId = accountInfo.localAccountId; - account.nativeAccountId = accountInfo.nativeAccountId; - account.realm = accountInfo.tenantId; - account.environment = accountInfo.environment; - account.username = accountInfo.username; - account.name = accountInfo.name; - account.cloudGraphHostName = cloudGraphHostName; - account.msGraphHost = msGraphHost; - // Serialize tenant profiles map into an array - account.tenantProfiles = Array.from(accountInfo.tenantProfiles?.values() || []); - return account; - } - /** - * Generate HomeAccountId from server response - * @param serverClientInfo - * @param authType - */ - static generateHomeAccountId(serverClientInfo, authType, logger, cryptoObj, idTokenClaims) { - // since ADFS/DSTS do not have tid and does not set client_info - if (!(authType === AuthorityType.Adfs || - authType === AuthorityType.Dsts)) { - // for cases where there is clientInfo - if (serverClientInfo) { - try { - const clientInfo = buildClientInfo(serverClientInfo, cryptoObj.base64Decode); - if (clientInfo.uid && clientInfo.utid) { - return `${clientInfo.uid}.${clientInfo.utid}`; - } - } - catch (e) { } - } - logger.warning("No client info in response"); - } - // default to "sub" claim - return idTokenClaims?.sub || ""; - } - /** - * Validates an entity: checks for all expected params - * @param entity - */ - static isAccountEntity(entity) { - if (!entity) { - return false; - } - return (entity.hasOwnProperty("homeAccountId") && - entity.hasOwnProperty("environment") && - entity.hasOwnProperty("realm") && - entity.hasOwnProperty("localAccountId") && - entity.hasOwnProperty("username") && - entity.hasOwnProperty("authorityType")); - } - /** - * Helper function to determine whether 2 accountInfo objects represent the same account - * @param accountA - * @param accountB - * @param compareClaims - If set to true idTokenClaims will also be compared to determine account equality - */ - static accountInfoIsEqual(accountA, accountB, compareClaims) { - if (!accountA || !accountB) { - return false; - } - let claimsMatch = true; // default to true so as to not fail comparison below if compareClaims: false - if (compareClaims) { - const accountAClaims = (accountA.idTokenClaims || - {}); - const accountBClaims = (accountB.idTokenClaims || - {}); - // issued at timestamp and nonce are expected to change each time a new id token is acquired - claimsMatch = - accountAClaims.iat === accountBClaims.iat && - accountAClaims.nonce === accountBClaims.nonce; - } - return (accountA.homeAccountId === accountB.homeAccountId && - accountA.localAccountId === accountB.localAccountId && - accountA.username === accountB.username && - accountA.tenantId === accountB.tenantId && - accountA.environment === accountB.environment && - accountA.nativeAccountId === accountB.nativeAccountId && - claimsMatch); - } -} - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -const cacheQuotaExceeded = "cache_quota_exceeded"; -const cacheErrorUnknown = "cache_error_unknown"; - -var CacheErrorCodes = /*#__PURE__*/Object.freeze({ - __proto__: null, - cacheErrorUnknown: cacheErrorUnknown, - cacheQuotaExceeded: cacheQuotaExceeded -}); - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -const CacheErrorMessages = { - [cacheQuotaExceeded]: "Exceeded cache storage capacity.", - [cacheErrorUnknown]: "Unexpected error occurred when using cache storage.", -}; -/** - * Error thrown when there is an error with the cache - */ -class CacheError extends Error { - constructor(errorCode, errorMessage) { - const message = errorMessage || - (CacheErrorMessages[errorCode] - ? CacheErrorMessages[errorCode] - : CacheErrorMessages[cacheErrorUnknown]); - super(`${errorCode}: ${message}`); - Object.setPrototypeOf(this, CacheError.prototype); - this.name = "CacheError"; - this.errorCode = errorCode; - this.errorMessage = message; - } -} -/** - * Helper function to wrap browser errors in a CacheError object - * @param e - * @returns - */ -function createCacheError(e) { - if (!(e instanceof Error)) { - return new CacheError(cacheErrorUnknown); - } - if (e.name === "QuotaExceededError" || - e.name === "NS_ERROR_DOM_QUOTA_REACHED" || - e.message.includes("exceeded the quota")) { - return new CacheError(cacheQuotaExceeded); - } - else { - return new CacheError(e.name, e.message); - } -} - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * Interface class which implement cache storage functions used by MSAL to perform validity checks, and store tokens. - * @internal - */ -class CacheManager { - constructor(clientId, cryptoImpl, logger, staticAuthorityOptions) { - this.clientId = clientId; - this.cryptoImpl = cryptoImpl; - this.commonLogger = logger.clone(name, version); - this.staticAuthorityOptions = staticAuthorityOptions; - } - /** - * Returns all the accounts in the cache that match the optional filter. If no filter is provided, all accounts are returned. - * @param accountFilter - (Optional) filter to narrow down the accounts returned - * @returns Array of AccountInfo objects in cache - */ - getAllAccounts(correlationId, accountFilter) { - return this.buildTenantProfiles(this.getAccountsFilteredBy(accountFilter || {}, correlationId), correlationId, accountFilter); - } - /** - * Gets first tenanted AccountInfo object found based on provided filters - */ - getAccountInfoFilteredBy(accountFilter, correlationId) { - const allAccounts = this.getAllAccounts(correlationId, accountFilter); - if (allAccounts.length > 1) { - // If one or more accounts are found, prioritize accounts that have an ID token - const sortedAccounts = allAccounts.sort((account) => { - return account.idTokenClaims ? -1 : 1; - }); - return sortedAccounts[0]; - } - else if (allAccounts.length === 1) { - // If only one account is found, return it regardless of whether a matching ID token was found - return allAccounts[0]; - } - else { - return null; - } - } - /** - * Returns a single matching - * @param accountFilter - * @returns - */ - getBaseAccountInfo(accountFilter, correlationId) { - const accountEntities = this.getAccountsFilteredBy(accountFilter, correlationId); - if (accountEntities.length > 0) { - return accountEntities[0].getAccountInfo(); - } - else { - return null; - } - } - /** - * Matches filtered account entities with cached ID tokens that match the tenant profile-specific account filters - * and builds the account info objects from the matching ID token's claims - * @param cachedAccounts - * @param accountFilter - * @returns Array of AccountInfo objects that match account and tenant profile filters - */ - buildTenantProfiles(cachedAccounts, correlationId, accountFilter) { - return cachedAccounts.flatMap((accountEntity) => { - return this.getTenantProfilesFromAccountEntity(accountEntity, correlationId, accountFilter?.tenantId, accountFilter); - }); - } - getTenantedAccountInfoByFilter(accountInfo, tokenKeys, tenantProfile, correlationId, tenantProfileFilter) { - let tenantedAccountInfo = null; - let idTokenClaims; - if (tenantProfileFilter) { - if (!this.tenantProfileMatchesFilter(tenantProfile, tenantProfileFilter)) { - return null; - } - } - const idToken = this.getIdToken(accountInfo, correlationId, tokenKeys, tenantProfile.tenantId); - if (idToken) { - idTokenClaims = extractTokenClaims(idToken.secret, this.cryptoImpl.base64Decode); - if (!this.idTokenClaimsMatchTenantProfileFilter(idTokenClaims, tenantProfileFilter)) { - // ID token sourced claims don't match so this tenant profile is not a match - return null; - } - } - // Expand tenant profile into account info based on matching tenant profile and if available matching ID token claims - tenantedAccountInfo = updateAccountTenantProfileData(accountInfo, tenantProfile, idTokenClaims, idToken?.secret); - return tenantedAccountInfo; - } - getTenantProfilesFromAccountEntity(accountEntity, correlationId, targetTenantId, tenantProfileFilter) { - const accountInfo = accountEntity.getAccountInfo(); - let searchTenantProfiles = accountInfo.tenantProfiles || new Map(); - const tokenKeys = this.getTokenKeys(); - // If a tenant ID was provided, only return the tenant profile for that tenant ID if it exists - if (targetTenantId) { - const tenantProfile = searchTenantProfiles.get(targetTenantId); - if (tenantProfile) { - // Reduce search field to just this tenant profile - searchTenantProfiles = new Map([ - [targetTenantId, tenantProfile], - ]); - } - else { - // No tenant profile for search tenant ID, return empty array - return []; - } - } - const matchingTenantProfiles = []; - searchTenantProfiles.forEach((tenantProfile) => { - const tenantedAccountInfo = this.getTenantedAccountInfoByFilter(accountInfo, tokenKeys, tenantProfile, correlationId, tenantProfileFilter); - if (tenantedAccountInfo) { - matchingTenantProfiles.push(tenantedAccountInfo); - } - }); - return matchingTenantProfiles; - } - tenantProfileMatchesFilter(tenantProfile, tenantProfileFilter) { - if (!!tenantProfileFilter.localAccountId && - !this.matchLocalAccountIdFromTenantProfile(tenantProfile, tenantProfileFilter.localAccountId)) { - return false; - } - if (!!tenantProfileFilter.name && - !(tenantProfile.name === tenantProfileFilter.name)) { - return false; - } - if (tenantProfileFilter.isHomeTenant !== undefined && - !(tenantProfile.isHomeTenant === tenantProfileFilter.isHomeTenant)) { - return false; - } - return true; - } - idTokenClaimsMatchTenantProfileFilter(idTokenClaims, tenantProfileFilter) { - // Tenant Profile filtering - if (tenantProfileFilter) { - if (!!tenantProfileFilter.localAccountId && - !this.matchLocalAccountIdFromTokenClaims(idTokenClaims, tenantProfileFilter.localAccountId)) { - return false; - } - if (!!tenantProfileFilter.loginHint && - !this.matchLoginHintFromTokenClaims(idTokenClaims, tenantProfileFilter.loginHint)) { - return false; - } - if (!!tenantProfileFilter.username && - !this.matchUsername(idTokenClaims.preferred_username, tenantProfileFilter.username)) { - return false; - } - if (!!tenantProfileFilter.name && - !this.matchName(idTokenClaims, tenantProfileFilter.name)) { - return false; - } - if (!!tenantProfileFilter.sid && - !this.matchSid(idTokenClaims, tenantProfileFilter.sid)) { - return false; - } - } - return true; - } - /** - * saves a cache record - * @param cacheRecord {CacheRecord} - * @param storeInCache {?StoreInCache} - * @param correlationId {?string} correlation id - */ - async saveCacheRecord(cacheRecord, correlationId, storeInCache) { - if (!cacheRecord) { - throw createClientAuthError(invalidCacheRecord); - } - try { - if (!!cacheRecord.account) { - this.setAccount(cacheRecord.account, correlationId); - } - if (!!cacheRecord.idToken && storeInCache?.idToken !== false) { - this.setIdTokenCredential(cacheRecord.idToken, correlationId); - } - if (!!cacheRecord.accessToken && - storeInCache?.accessToken !== false) { - await this.saveAccessToken(cacheRecord.accessToken, correlationId); - } - if (!!cacheRecord.refreshToken && - storeInCache?.refreshToken !== false) { - this.setRefreshTokenCredential(cacheRecord.refreshToken, correlationId); - } - if (!!cacheRecord.appMetadata) { - this.setAppMetadata(cacheRecord.appMetadata, correlationId); - } - } - catch (e) { - this.commonLogger?.error(`CacheManager.saveCacheRecord: failed`); - if (e instanceof AuthError) { - throw e; - } - else { - throw createCacheError(e); - } - } - } - /** - * saves access token credential - * @param credential - */ - async saveAccessToken(credential, correlationId) { - const accessTokenFilter = { - clientId: credential.clientId, - credentialType: credential.credentialType, - environment: credential.environment, - homeAccountId: credential.homeAccountId, - realm: credential.realm, - tokenType: credential.tokenType, - requestedClaimsHash: credential.requestedClaimsHash, - }; - const tokenKeys = this.getTokenKeys(); - const currentScopes = ScopeSet.fromString(credential.target); - tokenKeys.accessToken.forEach((key) => { - if (!this.accessTokenKeyMatchesFilter(key, accessTokenFilter, false)) { - return; - } - const tokenEntity = this.getAccessTokenCredential(key, correlationId); - if (tokenEntity && - this.credentialMatchesFilter(tokenEntity, accessTokenFilter)) { - const tokenScopeSet = ScopeSet.fromString(tokenEntity.target); - if (tokenScopeSet.intersectingScopeSets(currentScopes)) { - this.removeAccessToken(key, correlationId); - } - } - }); - this.setAccessTokenCredential(credential, correlationId); - } - /** - * Retrieve account entities matching all provided tenant-agnostic filters; if no filter is set, get all account entities in the cache - * Not checking for casing as keys are all generated in lower case, remember to convert to lower case if object properties are compared - * @param accountFilter - An object containing Account properties to filter by - */ - getAccountsFilteredBy(accountFilter, correlationId) { - const allAccountKeys = this.getAccountKeys(); - const matchingAccounts = []; - allAccountKeys.forEach((cacheKey) => { - if (!this.isAccountKey(cacheKey, accountFilter.homeAccountId)) { - // Don't parse value if the key doesn't match the account filters - return; - } - const entity = this.getAccount(cacheKey, correlationId, this.commonLogger); - // Match base account fields - if (!entity) { - return; - } - if (!!accountFilter.homeAccountId && - !this.matchHomeAccountId(entity, accountFilter.homeAccountId)) { - return; - } - if (!!accountFilter.username && - !this.matchUsername(entity.username, accountFilter.username)) { - return; - } - if (!!accountFilter.environment && - !this.matchEnvironment(entity, accountFilter.environment)) { - return; - } - if (!!accountFilter.realm && - !this.matchRealm(entity, accountFilter.realm)) { - return; - } - if (!!accountFilter.nativeAccountId && - !this.matchNativeAccountId(entity, accountFilter.nativeAccountId)) { - return; - } - if (!!accountFilter.authorityType && - !this.matchAuthorityType(entity, accountFilter.authorityType)) { - return; - } - // If at least one tenant profile matches the tenant profile filter, add the account to the list of matching accounts - const tenantProfileFilter = { - localAccountId: accountFilter?.localAccountId, - name: accountFilter?.name, - }; - const matchingTenantProfiles = entity.tenantProfiles?.filter((tenantProfile) => { - return this.tenantProfileMatchesFilter(tenantProfile, tenantProfileFilter); - }); - if (matchingTenantProfiles && matchingTenantProfiles.length === 0) { - // No tenant profile for this account matches filter, don't add to list of matching accounts - return; - } - matchingAccounts.push(entity); - }); - return matchingAccounts; - } - /** - * Returns true if the given key matches our account key schema. Also matches homeAccountId and/or tenantId if provided - * @param key - * @param homeAccountId - * @param tenantId - * @returns - */ - isAccountKey(key, homeAccountId, tenantId) { - if (key.split(Separators.CACHE_KEY_SEPARATOR).length < 3) { - // Account cache keys contain 3 items separated by '-' (each item may also contain '-') - return false; - } - if (homeAccountId && - !key.toLowerCase().includes(homeAccountId.toLowerCase())) { - return false; - } - if (tenantId && !key.toLowerCase().includes(tenantId.toLowerCase())) { - return false; - } - // Do not check environment as aliasing can cause false negatives - return true; - } - /** - * Returns true if the given key matches our credential key schema. - * @param key - */ - isCredentialKey(key) { - if (key.split(Separators.CACHE_KEY_SEPARATOR).length < 6) { - // Credential cache keys contain 6 items separated by '-' (each item may also contain '-') - return false; - } - const lowerCaseKey = key.toLowerCase(); - // Credential keys must indicate what credential type they represent - if (lowerCaseKey.indexOf(CredentialType.ID_TOKEN.toLowerCase()) === - -1 && - lowerCaseKey.indexOf(CredentialType.ACCESS_TOKEN.toLowerCase()) === - -1 && - lowerCaseKey.indexOf(CredentialType.ACCESS_TOKEN_WITH_AUTH_SCHEME.toLowerCase()) === -1 && - lowerCaseKey.indexOf(CredentialType.REFRESH_TOKEN.toLowerCase()) === - -1) { - return false; - } - if (lowerCaseKey.indexOf(CredentialType.REFRESH_TOKEN.toLowerCase()) > - -1) { - // Refresh tokens must contain the client id or family id - const clientIdValidation = `${CredentialType.REFRESH_TOKEN}${Separators.CACHE_KEY_SEPARATOR}${this.clientId}${Separators.CACHE_KEY_SEPARATOR}`; - const familyIdValidation = `${CredentialType.REFRESH_TOKEN}${Separators.CACHE_KEY_SEPARATOR}${THE_FAMILY_ID}${Separators.CACHE_KEY_SEPARATOR}`; - if (lowerCaseKey.indexOf(clientIdValidation.toLowerCase()) === -1 && - lowerCaseKey.indexOf(familyIdValidation.toLowerCase()) === -1) { - return false; - } - } - else if (lowerCaseKey.indexOf(this.clientId.toLowerCase()) === -1) { - // Tokens must contain the clientId - return false; - } - return true; - } - /** - * Returns whether or not the given credential entity matches the filter - * @param entity - * @param filter - * @returns - */ - credentialMatchesFilter(entity, filter) { - if (!!filter.clientId && !this.matchClientId(entity, filter.clientId)) { - return false; - } - if (!!filter.userAssertionHash && - !this.matchUserAssertionHash(entity, filter.userAssertionHash)) { - return false; - } - /* - * homeAccountId can be undefined, and we want to filter out cached items that have a homeAccountId of "" - * because we don't want a client_credential request to return a cached token that has a homeAccountId - */ - if (typeof filter.homeAccountId === "string" && - !this.matchHomeAccountId(entity, filter.homeAccountId)) { - return false; - } - if (!!filter.environment && - !this.matchEnvironment(entity, filter.environment)) { - return false; - } - if (!!filter.realm && !this.matchRealm(entity, filter.realm)) { - return false; - } - if (!!filter.credentialType && - !this.matchCredentialType(entity, filter.credentialType)) { - return false; - } - if (!!filter.familyId && !this.matchFamilyId(entity, filter.familyId)) { - return false; - } - /* - * idTokens do not have "target", target specific refreshTokens do exist for some types of authentication - * Resource specific refresh tokens case will be added when the support is deemed necessary - */ - if (!!filter.target && !this.matchTarget(entity, filter.target)) { - return false; - } - // If request OR cached entity has requested Claims Hash, check if they match - if (filter.requestedClaimsHash || entity.requestedClaimsHash) { - // Don't match if either is undefined or they are different - if (entity.requestedClaimsHash !== filter.requestedClaimsHash) { - return false; - } - } - // Access Token with Auth Scheme specific matching - if (entity.credentialType === - CredentialType.ACCESS_TOKEN_WITH_AUTH_SCHEME) { - if (!!filter.tokenType && - !this.matchTokenType(entity, filter.tokenType)) { - return false; - } - // KeyId (sshKid) in request must match cached SSH certificate keyId because SSH cert is bound to a specific key - if (filter.tokenType === AuthenticationScheme.SSH) { - if (filter.keyId && !this.matchKeyId(entity, filter.keyId)) { - return false; - } - } - } - return true; - } - /** - * retrieve appMetadata matching all provided filters; if no filter is set, get all appMetadata - * @param filter - */ - getAppMetadataFilteredBy(filter) { - const allCacheKeys = this.getKeys(); - const matchingAppMetadata = {}; - allCacheKeys.forEach((cacheKey) => { - // don't parse any non-appMetadata type cache entities - if (!this.isAppMetadata(cacheKey)) { - return; - } - // Attempt retrieval - const entity = this.getAppMetadata(cacheKey); - if (!entity) { - return; - } - if (!!filter.environment && - !this.matchEnvironment(entity, filter.environment)) { - return; - } - if (!!filter.clientId && - !this.matchClientId(entity, filter.clientId)) { - return; - } - matchingAppMetadata[cacheKey] = entity; - }); - return matchingAppMetadata; - } - /** - * retrieve authorityMetadata that contains a matching alias - * @param filter - */ - getAuthorityMetadataByAlias(host) { - const allCacheKeys = this.getAuthorityMetadataKeys(); - let matchedEntity = null; - allCacheKeys.forEach((cacheKey) => { - // don't parse any non-authorityMetadata type cache entities - if (!this.isAuthorityMetadata(cacheKey) || - cacheKey.indexOf(this.clientId) === -1) { - return; - } - // Attempt retrieval - const entity = this.getAuthorityMetadata(cacheKey); - if (!entity) { - return; - } - if (entity.aliases.indexOf(host) === -1) { - return; - } - matchedEntity = entity; - }); - return matchedEntity; - } - /** - * Removes all accounts and related tokens from cache. - */ - async removeAllAccounts(correlationId) { - const allAccountKeys = this.getAccountKeys(); - const removedAccounts = []; - allAccountKeys.forEach((cacheKey) => { - removedAccounts.push(this.removeAccount(cacheKey, correlationId)); - }); - await Promise.all(removedAccounts); - } - /** - * Removes the account and related tokens for a given account key - * @param account - */ - async removeAccount(accountKey, correlationId) { - const account = this.getAccount(accountKey, correlationId, this.commonLogger); - if (!account) { - return; - } - await this.removeAccountContext(account, correlationId); - this.removeItem(accountKey, correlationId); - } - /** - * Removes credentials associated with the provided account - * @param account - */ - async removeAccountContext(account, correlationId) { - const allTokenKeys = this.getTokenKeys(); - const accountId = account.generateAccountId(); - allTokenKeys.idToken.forEach((key) => { - if (key.indexOf(accountId) === 0) { - this.removeIdToken(key, correlationId); - } - }); - allTokenKeys.accessToken.forEach((key) => { - if (key.indexOf(accountId) === 0) { - this.removeAccessToken(key, correlationId); - } - }); - allTokenKeys.refreshToken.forEach((key) => { - if (key.indexOf(accountId) === 0) { - this.removeRefreshToken(key, correlationId); - } - }); - this.getKeys().forEach((key) => { - if (key.includes(accountId)) { - this.removeItem(key, correlationId); - } - }); - } - /** - * Migrates a single-tenant account and all it's associated alternate cross-tenant account objects in the - * cache into a condensed multi-tenant account object with tenant profiles. - * @param accountKey - * @param accountEntity - * @param logger - * @returns - */ - updateOutdatedCachedAccount(accountKey, accountEntity, correlationId, logger) { - // Only update if account entity is defined and has no tenantProfiles object (is outdated) - if (accountEntity && accountEntity.isSingleTenant()) { - this.commonLogger?.verbose("updateOutdatedCachedAccount: Found a single-tenant (outdated) account entity in the cache, migrating to multi-tenant account entity"); - // Get keys of all accounts belonging to user - const matchingAccountKeys = this.getAccountKeys().filter((key) => { - return key.startsWith(accountEntity.homeAccountId); - }); - // Get all account entities belonging to user - const accountsToMerge = []; - matchingAccountKeys.forEach((key) => { - const account = this.getCachedAccountEntity(key, correlationId); - if (account) { - accountsToMerge.push(account); - } - }); - // Set base account to home account if available, any account if not - const baseAccount = accountsToMerge.find((account) => { - return tenantIdMatchesHomeTenant(account.realm, account.homeAccountId); - }) || accountsToMerge[0]; - // Populate tenant profiles built from each account entity belonging to the user - baseAccount.tenantProfiles = accountsToMerge.map((account) => { - return { - tenantId: account.realm, - localAccountId: account.localAccountId, - name: account.name, - isHomeTenant: tenantIdMatchesHomeTenant(account.realm, account.homeAccountId), - }; - }); - const updatedAccount = CacheManager.toObject(new AccountEntity(), { - ...baseAccount, - }); - const newAccountKey = updatedAccount.generateAccountKey(); - // Clear cache of legacy account objects that have been collpsed into tenant profiles - matchingAccountKeys.forEach((key) => { - if (key !== newAccountKey) { - this.removeOutdatedAccount(accountKey, correlationId); - } - }); - // Cache updated account object - this.setAccount(updatedAccount, correlationId); - logger?.verbose("Updated an outdated account entity in the cache"); - return updatedAccount; - } - // No update is necessary - return accountEntity; - } - /** - * returns a boolean if the given credential is removed - * @param credential - */ - removeAccessToken(key, correlationId) { - const credential = this.getAccessTokenCredential(key, correlationId); - this.removeItem(key, correlationId); - if (!credential || - credential.credentialType.toLowerCase() !== - CredentialType.ACCESS_TOKEN_WITH_AUTH_SCHEME.toLowerCase() || - credential.tokenType !== AuthenticationScheme.POP) { - return; - } - // Remove Token Binding Key from key store for PoP Tokens Credentials - const kid = credential.keyId; - if (kid) { - void this.cryptoImpl.removeTokenBindingKey(kid).catch(() => { - this.commonLogger.error("Binding key could not be removed"); - }); - } - } - /** - * Removes all app metadata objects from cache. - */ - removeAppMetadata(correlationId) { - const allCacheKeys = this.getKeys(); - allCacheKeys.forEach((cacheKey) => { - if (this.isAppMetadata(cacheKey)) { - this.removeItem(cacheKey, correlationId); - } - }); - return true; - } - /** - * Retrieve AccountEntity from cache - * @param account - */ - readAccountFromCache(account, correlationId) { - const accountKey = AccountEntity.generateAccountCacheKey(account); - return this.getAccount(accountKey, correlationId, this.commonLogger); - } - /** - * Retrieve IdTokenEntity from cache - * @param account {AccountInfo} - * @param tokenKeys {?TokenKeys} - * @param targetRealm {?string} - * @param performanceClient {?IPerformanceClient} - * @param correlationId {?string} - */ - getIdToken(account, correlationId, tokenKeys, targetRealm, performanceClient) { - this.commonLogger.trace("CacheManager - getIdToken called"); - const idTokenFilter = { - homeAccountId: account.homeAccountId, - environment: account.environment, - credentialType: CredentialType.ID_TOKEN, - clientId: this.clientId, - realm: targetRealm, - }; - const idTokenMap = this.getIdTokensByFilter(idTokenFilter, correlationId, tokenKeys); - const numIdTokens = idTokenMap.size; - if (numIdTokens < 1) { - this.commonLogger.info("CacheManager:getIdToken - No token found"); - return null; - } - else if (numIdTokens > 1) { - let tokensToBeRemoved = idTokenMap; - // Multiple tenant profiles and no tenant specified, pick home account - if (!targetRealm) { - const homeIdTokenMap = new Map(); - idTokenMap.forEach((idToken, key) => { - if (idToken.realm === account.tenantId) { - homeIdTokenMap.set(key, idToken); - } - }); - const numHomeIdTokens = homeIdTokenMap.size; - if (numHomeIdTokens < 1) { - this.commonLogger.info("CacheManager:getIdToken - Multiple ID tokens found for account but none match account entity tenant id, returning first result"); - return idTokenMap.values().next().value; - } - else if (numHomeIdTokens === 1) { - this.commonLogger.info("CacheManager:getIdToken - Multiple ID tokens found for account, defaulting to home tenant profile"); - return homeIdTokenMap.values().next().value; - } - else { - // Multiple ID tokens for home tenant profile, remove all and return null - tokensToBeRemoved = homeIdTokenMap; - } - } - // Multiple tokens for a single tenant profile, remove all and return null - this.commonLogger.info("CacheManager:getIdToken - Multiple matching ID tokens found, clearing them"); - tokensToBeRemoved.forEach((idToken, key) => { - this.removeIdToken(key, correlationId); - }); - if (performanceClient && correlationId) { - performanceClient.addFields({ multiMatchedID: idTokenMap.size }, correlationId); - } - return null; - } - this.commonLogger.info("CacheManager:getIdToken - Returning ID token"); - return idTokenMap.values().next().value; - } - /** - * Gets all idTokens matching the given filter - * @param filter - * @returns - */ - getIdTokensByFilter(filter, correlationId, tokenKeys) { - const idTokenKeys = (tokenKeys && tokenKeys.idToken) || this.getTokenKeys().idToken; - const idTokens = new Map(); - idTokenKeys.forEach((key) => { - if (!this.idTokenKeyMatchesFilter(key, { - clientId: this.clientId, - ...filter, - })) { - return; - } - const idToken = this.getIdTokenCredential(key, correlationId); - if (idToken && this.credentialMatchesFilter(idToken, filter)) { - idTokens.set(key, idToken); - } - }); - return idTokens; - } - /** - * Validate the cache key against filter before retrieving and parsing cache value - * @param key - * @param filter - * @returns - */ - idTokenKeyMatchesFilter(inputKey, filter) { - const key = inputKey.toLowerCase(); - if (filter.clientId && - key.indexOf(filter.clientId.toLowerCase()) === -1) { - return false; - } - if (filter.homeAccountId && - key.indexOf(filter.homeAccountId.toLowerCase()) === -1) { - return false; - } - return true; - } - /** - * Removes idToken from the cache - * @param key - */ - removeIdToken(key, correlationId) { - this.removeItem(key, correlationId); - } - /** - * Removes refresh token from the cache - * @param key - */ - removeRefreshToken(key, correlationId) { - this.removeItem(key, correlationId); - } - /** - * Retrieve AccessTokenEntity from cache - * @param account {AccountInfo} - * @param request {BaseAuthRequest} - * @param tokenKeys {?TokenKeys} - * @param performanceClient {?IPerformanceClient} - * @param correlationId {?string} - */ - getAccessToken(account, request, tokenKeys, targetRealm, performanceClient) { - this.commonLogger.trace("CacheManager - getAccessToken called"); - const scopes = ScopeSet.createSearchScopes(request.scopes); - const authScheme = request.authenticationScheme || AuthenticationScheme.BEARER; - /* - * Distinguish between Bearer and PoP/SSH token cache types - * Cast to lowercase to handle "bearer" from ADFS - */ - const credentialType = authScheme && - authScheme.toLowerCase() !== - AuthenticationScheme.BEARER.toLowerCase() - ? CredentialType.ACCESS_TOKEN_WITH_AUTH_SCHEME - : CredentialType.ACCESS_TOKEN; - const accessTokenFilter = { - homeAccountId: account.homeAccountId, - environment: account.environment, - credentialType: credentialType, - clientId: this.clientId, - realm: targetRealm || account.tenantId, - target: scopes, - tokenType: authScheme, - keyId: request.sshKid, - requestedClaimsHash: request.requestedClaimsHash, - }; - const accessTokenKeys = (tokenKeys && tokenKeys.accessToken) || - this.getTokenKeys().accessToken; - const accessTokens = []; - accessTokenKeys.forEach((key) => { - // Validate key - if (this.accessTokenKeyMatchesFilter(key, accessTokenFilter, true)) { - const accessToken = this.getAccessTokenCredential(key, request.correlationId); - // Validate value - if (accessToken && - this.credentialMatchesFilter(accessToken, accessTokenFilter)) { - accessTokens.push(accessToken); - } - } - }); - const numAccessTokens = accessTokens.length; - if (numAccessTokens < 1) { - this.commonLogger.info("CacheManager:getAccessToken - No token found"); - return null; - } - else if (numAccessTokens > 1) { - this.commonLogger.info("CacheManager:getAccessToken - Multiple access tokens found, clearing them"); - accessTokens.forEach((accessToken) => { - void this.removeAccessToken(generateCredentialKey(accessToken), request.correlationId); - }); - if (performanceClient && request.correlationId) { - performanceClient.addFields({ multiMatchedAT: accessTokens.length }, request.correlationId); - } - return null; - } - this.commonLogger.info("CacheManager:getAccessToken - Returning access token"); - return accessTokens[0]; - } - /** - * Validate the cache key against filter before retrieving and parsing cache value - * @param key - * @param filter - * @param keyMustContainAllScopes - * @returns - */ - accessTokenKeyMatchesFilter(inputKey, filter, keyMustContainAllScopes) { - const key = inputKey.toLowerCase(); - if (filter.clientId && - key.indexOf(filter.clientId.toLowerCase()) === -1) { - return false; - } - if (filter.homeAccountId && - key.indexOf(filter.homeAccountId.toLowerCase()) === -1) { - return false; - } - if (filter.realm && key.indexOf(filter.realm.toLowerCase()) === -1) { - return false; - } - if (filter.requestedClaimsHash && - key.indexOf(filter.requestedClaimsHash.toLowerCase()) === -1) { - return false; - } - if (filter.target) { - const scopes = filter.target.asArray(); - for (let i = 0; i < scopes.length; i++) { - if (keyMustContainAllScopes && - !key.includes(scopes[i].toLowerCase())) { - // When performing a cache lookup a missing scope would be a cache miss - return false; - } - else if (!keyMustContainAllScopes && - key.includes(scopes[i].toLowerCase())) { - // When performing a cache write, any token with a subset of requested scopes should be replaced - return true; - } - } - } - return true; - } - /** - * Gets all access tokens matching the filter - * @param filter - * @returns - */ - getAccessTokensByFilter(filter, correlationId) { - const tokenKeys = this.getTokenKeys(); - const accessTokens = []; - tokenKeys.accessToken.forEach((key) => { - if (!this.accessTokenKeyMatchesFilter(key, filter, true)) { - return; - } - const accessToken = this.getAccessTokenCredential(key, correlationId); - if (accessToken && - this.credentialMatchesFilter(accessToken, filter)) { - accessTokens.push(accessToken); - } - }); - return accessTokens; - } - /** - * Helper to retrieve the appropriate refresh token from cache - * @param account {AccountInfo} - * @param familyRT {boolean} - * @param tokenKeys {?TokenKeys} - * @param performanceClient {?IPerformanceClient} - * @param correlationId {?string} - */ - getRefreshToken(account, familyRT, correlationId, tokenKeys, performanceClient) { - this.commonLogger.trace("CacheManager - getRefreshToken called"); - const id = familyRT ? THE_FAMILY_ID : undefined; - const refreshTokenFilter = { - homeAccountId: account.homeAccountId, - environment: account.environment, - credentialType: CredentialType.REFRESH_TOKEN, - clientId: this.clientId, - familyId: id, - }; - const refreshTokenKeys = (tokenKeys && tokenKeys.refreshToken) || - this.getTokenKeys().refreshToken; - const refreshTokens = []; - refreshTokenKeys.forEach((key) => { - // Validate key - if (this.refreshTokenKeyMatchesFilter(key, refreshTokenFilter)) { - const refreshToken = this.getRefreshTokenCredential(key, correlationId); - // Validate value - if (refreshToken && - this.credentialMatchesFilter(refreshToken, refreshTokenFilter)) { - refreshTokens.push(refreshToken); - } - } - }); - const numRefreshTokens = refreshTokens.length; - if (numRefreshTokens < 1) { - this.commonLogger.info("CacheManager:getRefreshToken - No refresh token found."); - return null; - } - // address the else case after remove functions address environment aliases - if (numRefreshTokens > 1 && performanceClient && correlationId) { - performanceClient.addFields({ multiMatchedRT: numRefreshTokens }, correlationId); - } - this.commonLogger.info("CacheManager:getRefreshToken - returning refresh token"); - return refreshTokens[0]; - } - /** - * Validate the cache key against filter before retrieving and parsing cache value - * @param key - * @param filter - */ - refreshTokenKeyMatchesFilter(inputKey, filter) { - const key = inputKey.toLowerCase(); - if (filter.familyId && - key.indexOf(filter.familyId.toLowerCase()) === -1) { - return false; - } - // If familyId is used, clientId is not in the key - if (!filter.familyId && - filter.clientId && - key.indexOf(filter.clientId.toLowerCase()) === -1) { - return false; - } - if (filter.homeAccountId && - key.indexOf(filter.homeAccountId.toLowerCase()) === -1) { - return false; - } - return true; - } - /** - * Retrieve AppMetadataEntity from cache - */ - readAppMetadataFromCache(environment) { - const appMetadataFilter = { - environment, - clientId: this.clientId, - }; - const appMetadata = this.getAppMetadataFilteredBy(appMetadataFilter); - const appMetadataEntries = Object.keys(appMetadata).map((key) => appMetadata[key]); - const numAppMetadata = appMetadataEntries.length; - if (numAppMetadata < 1) { - return null; - } - else if (numAppMetadata > 1) { - throw createClientAuthError(multipleMatchingAppMetadata); - } - return appMetadataEntries[0]; - } - /** - * Return the family_id value associated with FOCI - * @param environment - * @param clientId - */ - isAppMetadataFOCI(environment) { - const appMetadata = this.readAppMetadataFromCache(environment); - return !!(appMetadata && appMetadata.familyId === THE_FAMILY_ID); - } - /** - * helper to match account ids - * @param value - * @param homeAccountId - */ - matchHomeAccountId(entity, homeAccountId) { - return !!(typeof entity.homeAccountId === "string" && - homeAccountId === entity.homeAccountId); - } - /** - * helper to match account ids - * @param entity - * @param localAccountId - * @returns - */ - matchLocalAccountIdFromTokenClaims(tokenClaims, localAccountId) { - const idTokenLocalAccountId = tokenClaims.oid || tokenClaims.sub; - return localAccountId === idTokenLocalAccountId; - } - matchLocalAccountIdFromTenantProfile(tenantProfile, localAccountId) { - return tenantProfile.localAccountId === localAccountId; - } - /** - * helper to match names - * @param entity - * @param name - * @returns true if the downcased name properties are present and match in the filter and the entity - */ - matchName(claims, name) { - return !!(name.toLowerCase() === claims.name?.toLowerCase()); - } - /** - * helper to match usernames - * @param entity - * @param username - * @returns - */ - matchUsername(cachedUsername, filterUsername) { - return !!(cachedUsername && - typeof cachedUsername === "string" && - filterUsername?.toLowerCase() === cachedUsername.toLowerCase()); - } - /** - * helper to match assertion - * @param value - * @param oboAssertion - */ - matchUserAssertionHash(entity, userAssertionHash) { - return !!(entity.userAssertionHash && - userAssertionHash === entity.userAssertionHash); - } - /** - * helper to match environment - * @param value - * @param environment - */ - matchEnvironment(entity, environment) { - // Check static authority options first for cases where authority metadata has not been resolved and cached yet - if (this.staticAuthorityOptions) { - const staticAliases = getAliasesFromStaticSources(this.staticAuthorityOptions, this.commonLogger); - if (staticAliases.includes(environment) && - staticAliases.includes(entity.environment)) { - return true; - } - } - // Query metadata cache if no static authority configuration has aliases that match enviroment - const cloudMetadata = this.getAuthorityMetadataByAlias(environment); - if (cloudMetadata && - cloudMetadata.aliases.indexOf(entity.environment) > -1) { - return true; - } - return false; - } - /** - * helper to match credential type - * @param entity - * @param credentialType - */ - matchCredentialType(entity, credentialType) { - return (entity.credentialType && - credentialType.toLowerCase() === entity.credentialType.toLowerCase()); - } - /** - * helper to match client ids - * @param entity - * @param clientId - */ - matchClientId(entity, clientId) { - return !!(entity.clientId && clientId === entity.clientId); - } - /** - * helper to match family ids - * @param entity - * @param familyId - */ - matchFamilyId(entity, familyId) { - return !!(entity.familyId && familyId === entity.familyId); - } - /** - * helper to match realm - * @param entity - * @param realm - */ - matchRealm(entity, realm) { - return !!(entity.realm?.toLowerCase() === realm.toLowerCase()); - } - /** - * helper to match nativeAccountId - * @param entity - * @param nativeAccountId - * @returns boolean indicating the match result - */ - matchNativeAccountId(entity, nativeAccountId) { - return !!(entity.nativeAccountId && nativeAccountId === entity.nativeAccountId); - } - /** - * helper to match loginHint which can be either: - * 1. login_hint ID token claim - * 2. username in cached account object - * 3. upn in ID token claims - * @param entity - * @param loginHint - * @returns - */ - matchLoginHintFromTokenClaims(tokenClaims, loginHint) { - if (tokenClaims.login_hint === loginHint) { - return true; - } - if (tokenClaims.preferred_username === loginHint) { - return true; - } - if (tokenClaims.upn === loginHint) { - return true; - } - return false; - } - /** - * Helper to match sid - * @param entity - * @param sid - * @returns true if the sid claim is present and matches the filter - */ - matchSid(idTokenClaims, sid) { - return idTokenClaims.sid === sid; - } - matchAuthorityType(entity, authorityType) { - return !!(entity.authorityType && - authorityType.toLowerCase() === entity.authorityType.toLowerCase()); - } - /** - * Returns true if the target scopes are a subset of the current entity's scopes, false otherwise. - * @param entity - * @param target - */ - matchTarget(entity, target) { - const isNotAccessTokenCredential = entity.credentialType !== CredentialType.ACCESS_TOKEN && - entity.credentialType !== - CredentialType.ACCESS_TOKEN_WITH_AUTH_SCHEME; - if (isNotAccessTokenCredential || !entity.target) { - return false; - } - const entityScopeSet = ScopeSet.fromString(entity.target); - return entityScopeSet.containsScopeSet(target); - } - /** - * Returns true if the credential's tokenType or Authentication Scheme matches the one in the request, false otherwise - * @param entity - * @param tokenType - */ - matchTokenType(entity, tokenType) { - return !!(entity.tokenType && entity.tokenType === tokenType); - } - /** - * Returns true if the credential's keyId matches the one in the request, false otherwise - * @param entity - * @param keyId - */ - matchKeyId(entity, keyId) { - return !!(entity.keyId && entity.keyId === keyId); - } - /** - * returns if a given cache entity is of the type appmetadata - * @param key - */ - isAppMetadata(key) { - return key.indexOf(APP_METADATA) !== -1; - } - /** - * returns if a given cache entity is of the type authoritymetadata - * @param key - */ - isAuthorityMetadata(key) { - return key.indexOf(AUTHORITY_METADATA_CONSTANTS.CACHE_KEY) !== -1; - } - /** - * returns cache key used for cloud instance metadata - */ - generateAuthorityMetadataCacheKey(authority) { - return `${AUTHORITY_METADATA_CONSTANTS.CACHE_KEY}-${this.clientId}-${authority}`; - } - /** - * Helper to convert serialized data to object - * @param obj - * @param json - */ - static toObject(obj, json) { - for (const propertyName in json) { - obj[propertyName] = json[propertyName]; - } - return obj; - } -} -/** @internal */ -class DefaultStorageClass extends CacheManager { - setAccount() { - throw createClientAuthError(methodNotImplemented); - } - getAccount() { - throw createClientAuthError(methodNotImplemented); - } - getCachedAccountEntity() { - throw createClientAuthError(methodNotImplemented); - } - setIdTokenCredential() { - throw createClientAuthError(methodNotImplemented); - } - getIdTokenCredential() { - throw createClientAuthError(methodNotImplemented); - } - setAccessTokenCredential() { - throw createClientAuthError(methodNotImplemented); - } - getAccessTokenCredential() { - throw createClientAuthError(methodNotImplemented); - } - setRefreshTokenCredential() { - throw createClientAuthError(methodNotImplemented); - } - getRefreshTokenCredential() { - throw createClientAuthError(methodNotImplemented); - } - setAppMetadata() { - throw createClientAuthError(methodNotImplemented); - } - getAppMetadata() { - throw createClientAuthError(methodNotImplemented); - } - setServerTelemetry() { - throw createClientAuthError(methodNotImplemented); - } - getServerTelemetry() { - throw createClientAuthError(methodNotImplemented); - } - setAuthorityMetadata() { - throw createClientAuthError(methodNotImplemented); - } - getAuthorityMetadata() { - throw createClientAuthError(methodNotImplemented); - } - getAuthorityMetadataKeys() { - throw createClientAuthError(methodNotImplemented); - } - setThrottlingCache() { - throw createClientAuthError(methodNotImplemented); - } - getThrottlingCache() { - throw createClientAuthError(methodNotImplemented); - } - removeItem() { - throw createClientAuthError(methodNotImplemented); - } - getKeys() { - throw createClientAuthError(methodNotImplemented); - } - getAccountKeys() { - throw createClientAuthError(methodNotImplemented); - } - getTokenKeys() { - throw createClientAuthError(methodNotImplemented); - } - updateCredentialCacheKey() { - throw createClientAuthError(methodNotImplemented); - } - removeOutdatedAccount() { - throw createClientAuthError(methodNotImplemented); - } -} - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -const DEFAULT_SYSTEM_OPTIONS = { - tokenRenewalOffsetSeconds: DEFAULT_TOKEN_RENEWAL_OFFSET_SEC, - preventCorsPreflight: false, -}; -const DEFAULT_LOGGER_IMPLEMENTATION = { - loggerCallback: () => { - // allow users to not set loggerCallback - }, - piiLoggingEnabled: false, - logLevel: exports.LogLevel.Info, - correlationId: Constants.EMPTY_STRING, -}; -const DEFAULT_CACHE_OPTIONS = { - claimsBasedCachingEnabled: false, -}; -const DEFAULT_NETWORK_IMPLEMENTATION = { - async sendGetRequestAsync() { - throw createClientAuthError(methodNotImplemented); - }, - async sendPostRequestAsync() { - throw createClientAuthError(methodNotImplemented); - }, -}; -const DEFAULT_LIBRARY_INFO = { - sku: Constants.SKU, - version: version, - cpu: Constants.EMPTY_STRING, - os: Constants.EMPTY_STRING, -}; -const DEFAULT_CLIENT_CREDENTIALS = { - clientSecret: Constants.EMPTY_STRING, - clientAssertion: undefined, -}; -const DEFAULT_AZURE_CLOUD_OPTIONS = { - azureCloudInstance: AzureCloudInstance.None, - tenant: `${Constants.DEFAULT_COMMON_TENANT}`, -}; -const DEFAULT_TELEMETRY_OPTIONS = { - application: { - appName: "", - appVersion: "", - }, -}; -/** - * Function that sets the default options when not explicitly configured from app developer - * - * @param Configuration - * - * @returns Configuration - */ -function buildClientConfiguration({ authOptions: userAuthOptions, systemOptions: userSystemOptions, loggerOptions: userLoggerOption, cacheOptions: userCacheOptions, storageInterface: storageImplementation, networkInterface: networkImplementation, cryptoInterface: cryptoImplementation, clientCredentials: clientCredentials, libraryInfo: libraryInfo, telemetry: telemetry, serverTelemetryManager: serverTelemetryManager, persistencePlugin: persistencePlugin, serializableCache: serializableCache, }) { - const loggerOptions = { - ...DEFAULT_LOGGER_IMPLEMENTATION, - ...userLoggerOption, - }; - return { - authOptions: buildAuthOptions(userAuthOptions), - systemOptions: { ...DEFAULT_SYSTEM_OPTIONS, ...userSystemOptions }, - loggerOptions: loggerOptions, - cacheOptions: { ...DEFAULT_CACHE_OPTIONS, ...userCacheOptions }, - storageInterface: storageImplementation || - new DefaultStorageClass(userAuthOptions.clientId, DEFAULT_CRYPTO_IMPLEMENTATION, new Logger(loggerOptions)), - networkInterface: networkImplementation || DEFAULT_NETWORK_IMPLEMENTATION, - cryptoInterface: cryptoImplementation || DEFAULT_CRYPTO_IMPLEMENTATION, - clientCredentials: clientCredentials || DEFAULT_CLIENT_CREDENTIALS, - libraryInfo: { ...DEFAULT_LIBRARY_INFO, ...libraryInfo }, - telemetry: { ...DEFAULT_TELEMETRY_OPTIONS, ...telemetry }, - serverTelemetryManager: serverTelemetryManager || null, - persistencePlugin: persistencePlugin || null, - serializableCache: serializableCache || null, - }; -} -/** - * Construct authoptions from the client and platform passed values - * @param authOptions - */ -function buildAuthOptions(authOptions) { - return { - clientCapabilities: [], - azureCloudOptions: DEFAULT_AZURE_CLOUD_OPTIONS, - skipAuthorityMetadataCache: false, - instanceAware: false, - ...authOptions, - }; -} -/** - * Returns true if config has protocolMode set to ProtocolMode.OIDC, false otherwise - * @param ClientConfiguration - */ -function isOidcProtocolMode(config) { - return (config.authOptions.authority.options.protocolMode === ProtocolMode.OIDC); -} - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -const CcsCredentialType = { - HOME_ACCOUNT_ID: "home_account_id", - UPN: "UPN", -}; - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * Validates server consumable params from the "request" objects - */ -class RequestValidator { - /** - * Utility to check if the `redirectUri` in the request is a non-null value - * @param redirectUri - */ - static validateRedirectUri(redirectUri) { - if (!redirectUri) { - throw createClientConfigurationError(redirectUriEmpty); - } - } - /** - * Utility to validate prompt sent by the user in the request - * @param prompt - */ - static validatePrompt(prompt) { - const promptValues = []; - for (const value in PromptValue) { - promptValues.push(PromptValue[value]); - } - if (promptValues.indexOf(prompt) < 0) { - throw createClientConfigurationError(invalidPromptValue); - } - } - static validateClaims(claims) { - try { - JSON.parse(claims); - } - catch (e) { - throw createClientConfigurationError(invalidClaims); - } - } - /** - * Utility to validate code_challenge and code_challenge_method - * @param codeChallenge - * @param codeChallengeMethod - */ - static validateCodeChallengeParams(codeChallenge, codeChallengeMethod) { - if (!codeChallenge || !codeChallengeMethod) { - throw createClientConfigurationError(pkceParamsMissing); - } - else { - this.validateCodeChallengeMethod(codeChallengeMethod); - } - } - /** - * Utility to validate code_challenge_method - * @param codeChallengeMethod - */ - static validateCodeChallengeMethod(codeChallengeMethod) { - if ([ - CodeChallengeMethodValues.PLAIN, - CodeChallengeMethodValues.S256, - ].indexOf(codeChallengeMethod) < 0) { - throw createClientConfigurationError(invalidCodeChallengeMethod); - } - } -} - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -function instrumentBrokerParams(parameters, correlationId, performanceClient) { - if (!correlationId) { - return; - } - const clientId = parameters.get(CLIENT_ID); - if (clientId && parameters.has(BROKER_CLIENT_ID)) { - performanceClient?.addFields({ - embeddedClientId: clientId, - embeddedRedirectUri: parameters.get(REDIRECT_URI), - }, correlationId); - } -} -/** @internal */ -class RequestParameterBuilder { - constructor(correlationId, performanceClient) { - this.parameters = new Map(); - this.performanceClient = performanceClient; - this.correlationId = correlationId; - } - /** - * add response_type = code - */ - addResponseTypeCode() { - this.parameters.set(RESPONSE_TYPE, encodeURIComponent(Constants.CODE_RESPONSE_TYPE)); - } - /** - * add response_type = token id_token - */ - addResponseTypeForTokenAndIdToken() { - this.parameters.set(RESPONSE_TYPE, encodeURIComponent(`${Constants.TOKEN_RESPONSE_TYPE} ${Constants.ID_TOKEN_RESPONSE_TYPE}`)); - } - /** - * add response_mode. defaults to query. - * @param responseMode - */ - addResponseMode(responseMode) { - this.parameters.set(RESPONSE_MODE, encodeURIComponent(responseMode ? responseMode : ResponseMode.QUERY)); - } - /** - * Add flag to indicate STS should attempt to use WAM if available - */ - addNativeBroker() { - this.parameters.set(NATIVE_BROKER, encodeURIComponent("1")); - } - /** - * add scopes. set addOidcScopes to false to prevent default scopes in non-user scenarios - * @param scopeSet - * @param addOidcScopes - */ - addScopes(scopes, addOidcScopes = true, defaultScopes = OIDC_DEFAULT_SCOPES) { - // Always add openid to the scopes when adding OIDC scopes - if (addOidcScopes && - !defaultScopes.includes("openid") && - !scopes.includes("openid")) { - defaultScopes.push("openid"); - } - const requestScopes = addOidcScopes - ? [...(scopes || []), ...defaultScopes] - : scopes || []; - const scopeSet = new ScopeSet(requestScopes); - this.parameters.set(SCOPE, encodeURIComponent(scopeSet.printScopes())); - } - /** - * add clientId - * @param clientId - */ - addClientId(clientId) { - this.parameters.set(CLIENT_ID, encodeURIComponent(clientId)); - } - /** - * add redirect_uri - * @param redirectUri - */ - addRedirectUri(redirectUri) { - RequestValidator.validateRedirectUri(redirectUri); - this.parameters.set(REDIRECT_URI, encodeURIComponent(redirectUri)); - } - /** - * add post logout redirectUri - * @param redirectUri - */ - addPostLogoutRedirectUri(redirectUri) { - RequestValidator.validateRedirectUri(redirectUri); - this.parameters.set(POST_LOGOUT_URI, encodeURIComponent(redirectUri)); - } - /** - * add id_token_hint to logout request - * @param idTokenHint - */ - addIdTokenHint(idTokenHint) { - this.parameters.set(ID_TOKEN_HINT, encodeURIComponent(idTokenHint)); - } - /** - * add domain_hint - * @param domainHint - */ - addDomainHint(domainHint) { - this.parameters.set(DOMAIN_HINT, encodeURIComponent(domainHint)); - } - /** - * add login_hint - * @param loginHint - */ - addLoginHint(loginHint) { - this.parameters.set(LOGIN_HINT, encodeURIComponent(loginHint)); - } - /** - * Adds the CCS (Cache Credential Service) query parameter for login_hint - * @param loginHint - */ - addCcsUpn(loginHint) { - this.parameters.set(HeaderNames.CCS_HEADER, encodeURIComponent(`UPN:${loginHint}`)); - } - /** - * Adds the CCS (Cache Credential Service) query parameter for account object - * @param loginHint - */ - addCcsOid(clientInfo) { - this.parameters.set(HeaderNames.CCS_HEADER, encodeURIComponent(`Oid:${clientInfo.uid}@${clientInfo.utid}`)); - } - /** - * add sid - * @param sid - */ - addSid(sid) { - this.parameters.set(SID, encodeURIComponent(sid)); - } - /** - * add claims - * @param claims - */ - addClaims(claims, clientCapabilities) { - const mergedClaims = this.addClientCapabilitiesToClaims(claims, clientCapabilities); - RequestValidator.validateClaims(mergedClaims); - this.parameters.set(CLAIMS, encodeURIComponent(mergedClaims)); - } - /** - * add correlationId - * @param correlationId - */ - addCorrelationId(correlationId) { - this.parameters.set(CLIENT_REQUEST_ID, encodeURIComponent(correlationId)); - } - /** - * add library info query params - * @param libraryInfo - */ - addLibraryInfo(libraryInfo) { - // Telemetry Info - this.parameters.set(X_CLIENT_SKU, libraryInfo.sku); - this.parameters.set(X_CLIENT_VER, libraryInfo.version); - if (libraryInfo.os) { - this.parameters.set(X_CLIENT_OS, libraryInfo.os); - } - if (libraryInfo.cpu) { - this.parameters.set(X_CLIENT_CPU, libraryInfo.cpu); - } - } - /** - * Add client telemetry parameters - * @param appTelemetry - */ - addApplicationTelemetry(appTelemetry) { - if (appTelemetry?.appName) { - this.parameters.set(X_APP_NAME, appTelemetry.appName); - } - if (appTelemetry?.appVersion) { - this.parameters.set(X_APP_VER, appTelemetry.appVersion); - } - } - /** - * add prompt - * @param prompt - */ - addPrompt(prompt) { - RequestValidator.validatePrompt(prompt); - this.parameters.set(`${PROMPT}`, encodeURIComponent(prompt)); - } - /** - * add state - * @param state - */ - addState(state) { - if (state) { - this.parameters.set(STATE, encodeURIComponent(state)); - } - } - /** - * add nonce - * @param nonce - */ - addNonce(nonce) { - this.parameters.set(NONCE, encodeURIComponent(nonce)); - } - /** - * add code_challenge and code_challenge_method - * - throw if either of them are not passed - * @param codeChallenge - * @param codeChallengeMethod - */ - addCodeChallengeParams(codeChallenge, codeChallengeMethod) { - RequestValidator.validateCodeChallengeParams(codeChallenge, codeChallengeMethod); - if (codeChallenge && codeChallengeMethod) { - this.parameters.set(CODE_CHALLENGE, encodeURIComponent(codeChallenge)); - this.parameters.set(CODE_CHALLENGE_METHOD, encodeURIComponent(codeChallengeMethod)); - } - else { - throw createClientConfigurationError(pkceParamsMissing); - } - } - /** - * add the `authorization_code` passed by the user to exchange for a token - * @param code - */ - addAuthorizationCode(code) { - this.parameters.set(CODE, encodeURIComponent(code)); - } - /** - * add the `authorization_code` passed by the user to exchange for a token - * @param code - */ - addDeviceCode(code) { - this.parameters.set(DEVICE_CODE, encodeURIComponent(code)); - } - /** - * add the `refreshToken` passed by the user - * @param refreshToken - */ - addRefreshToken(refreshToken) { - this.parameters.set(REFRESH_TOKEN, encodeURIComponent(refreshToken)); - } - /** - * add the `code_verifier` passed by the user to exchange for a token - * @param codeVerifier - */ - addCodeVerifier(codeVerifier) { - this.parameters.set(CODE_VERIFIER, encodeURIComponent(codeVerifier)); - } - /** - * add client_secret - * @param clientSecret - */ - addClientSecret(clientSecret) { - this.parameters.set(CLIENT_SECRET, encodeURIComponent(clientSecret)); - } - /** - * add clientAssertion for confidential client flows - * @param clientAssertion - */ - addClientAssertion(clientAssertion) { - if (clientAssertion) { - this.parameters.set(CLIENT_ASSERTION, encodeURIComponent(clientAssertion)); - } - } - /** - * add clientAssertionType for confidential client flows - * @param clientAssertionType - */ - addClientAssertionType(clientAssertionType) { - if (clientAssertionType) { - this.parameters.set(CLIENT_ASSERTION_TYPE, encodeURIComponent(clientAssertionType)); - } - } - /** - * add OBO assertion for confidential client flows - * @param clientAssertion - */ - addOboAssertion(oboAssertion) { - this.parameters.set(OBO_ASSERTION, encodeURIComponent(oboAssertion)); - } - /** - * add grant type - * @param grantType - */ - addRequestTokenUse(tokenUse) { - this.parameters.set(REQUESTED_TOKEN_USE, encodeURIComponent(tokenUse)); - } - /** - * add grant type - * @param grantType - */ - addGrantType(grantType) { - this.parameters.set(GRANT_TYPE, encodeURIComponent(grantType)); - } - /** - * add client info - * - */ - addClientInfo() { - this.parameters.set(CLIENT_INFO$1, "1"); - } - /** - * add extraQueryParams - * @param eQParams - */ - addExtraQueryParameters(eQParams) { - Object.entries(eQParams).forEach(([key, value]) => { - if (!this.parameters.has(key) && value) { - this.parameters.set(key, value); - } - }); - } - addClientCapabilitiesToClaims(claims, clientCapabilities) { - let mergedClaims; - // Parse provided claims into JSON object or initialize empty object - if (!claims) { - mergedClaims = {}; - } - else { - try { - mergedClaims = JSON.parse(claims); - } - catch (e) { - throw createClientConfigurationError(invalidClaims); - } - } - if (clientCapabilities && clientCapabilities.length > 0) { - if (!mergedClaims.hasOwnProperty(ClaimsRequestKeys.ACCESS_TOKEN)) { - // Add access_token key to claims object - mergedClaims[ClaimsRequestKeys.ACCESS_TOKEN] = {}; - } - // Add xms_cc claim with provided clientCapabilities to access_token key - mergedClaims[ClaimsRequestKeys.ACCESS_TOKEN][ClaimsRequestKeys.XMS_CC] = { - values: clientCapabilities, - }; - } - return JSON.stringify(mergedClaims); - } - /** - * adds `username` for Password Grant flow - * @param username - */ - addUsername(username) { - this.parameters.set(PasswordGrantConstants.username, encodeURIComponent(username)); - } - /** - * adds `password` for Password Grant flow - * @param password - */ - addPassword(password) { - this.parameters.set(PasswordGrantConstants.password, encodeURIComponent(password)); - } - /** - * add pop_jwk to query params - * @param cnfString - */ - addPopToken(cnfString) { - if (cnfString) { - this.parameters.set(TOKEN_TYPE, AuthenticationScheme.POP); - this.parameters.set(REQ_CNF, encodeURIComponent(cnfString)); - } - } - /** - * add SSH JWK and key ID to query params - */ - addSshJwk(sshJwkString) { - if (sshJwkString) { - this.parameters.set(TOKEN_TYPE, AuthenticationScheme.SSH); - this.parameters.set(REQ_CNF, encodeURIComponent(sshJwkString)); - } - } - /** - * add server telemetry fields - * @param serverTelemetryManager - */ - addServerTelemetry(serverTelemetryManager) { - this.parameters.set(X_CLIENT_CURR_TELEM, serverTelemetryManager.generateCurrentRequestHeaderValue()); - this.parameters.set(X_CLIENT_LAST_TELEM, serverTelemetryManager.generateLastRequestHeaderValue()); - } - /** - * Adds parameter that indicates to the server that throttling is supported - */ - addThrottling() { - this.parameters.set(X_MS_LIB_CAPABILITY, ThrottlingConstants.X_MS_LIB_CAPABILITY_VALUE); - } - /** - * Adds logout_hint parameter for "silent" logout which prevent server account picker - */ - addLogoutHint(logoutHint) { - this.parameters.set(LOGOUT_HINT, encodeURIComponent(logoutHint)); - } - addBrokerParameters(params) { - const brokerParams = {}; - brokerParams[BROKER_CLIENT_ID] = - params.brokerClientId; - brokerParams[BROKER_REDIRECT_URI] = - params.brokerRedirectUri; - this.addExtraQueryParameters(brokerParams); - } - /** - * Utility to create a URL from the params map - */ - createQueryString() { - const queryParameterArray = new Array(); - this.parameters.forEach((value, key) => { - queryParameterArray.push(`${key}=${value}`); - }); - instrumentBrokerParams(this.parameters, this.correlationId, this.performanceClient); - return queryParameterArray.join("&"); - } -} - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * Error thrown when there is an error with the server code, for example, unavailability. - */ -class ServerError extends AuthError { - constructor(errorCode, errorMessage, subError, errorNo, status) { - super(errorCode, errorMessage, subError); - this.name = "ServerError"; - this.errorNo = errorNo; - this.status = status; - Object.setPrototypeOf(this, ServerError.prototype); - } -} - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** @internal */ -class ThrottlingUtils { - /** - * Prepares a RequestThumbprint to be stored as a key. - * @param thumbprint - */ - static generateThrottlingStorageKey(thumbprint) { - return `${ThrottlingConstants.THROTTLING_PREFIX}.${JSON.stringify(thumbprint)}`; - } - /** - * Performs necessary throttling checks before a network request. - * @param cacheManager - * @param thumbprint - */ - static preProcess(cacheManager, thumbprint, correlationId) { - const key = ThrottlingUtils.generateThrottlingStorageKey(thumbprint); - const value = cacheManager.getThrottlingCache(key); - if (value) { - if (value.throttleTime < Date.now()) { - cacheManager.removeItem(key, correlationId); - return; - } - throw new ServerError(value.errorCodes?.join(" ") || Constants.EMPTY_STRING, value.errorMessage, value.subError); - } - } - /** - * Performs necessary throttling checks after a network request. - * @param cacheManager - * @param thumbprint - * @param response - */ - static postProcess(cacheManager, thumbprint, response, correlationId) { - if (ThrottlingUtils.checkResponseStatus(response) || - ThrottlingUtils.checkResponseForRetryAfter(response)) { - const thumbprintValue = { - throttleTime: ThrottlingUtils.calculateThrottleTime(parseInt(response.headers[HeaderNames.RETRY_AFTER])), - error: response.body.error, - errorCodes: response.body.error_codes, - errorMessage: response.body.error_description, - subError: response.body.suberror, - }; - cacheManager.setThrottlingCache(ThrottlingUtils.generateThrottlingStorageKey(thumbprint), thumbprintValue, correlationId); - } - } - /** - * Checks a NetworkResponse object's status codes against 429 or 5xx - * @param response - */ - static checkResponseStatus(response) { - return (response.status === 429 || - (response.status >= 500 && response.status < 600)); - } - /** - * Checks a NetworkResponse object's RetryAfter header - * @param response - */ - static checkResponseForRetryAfter(response) { - if (response.headers) { - return (response.headers.hasOwnProperty(HeaderNames.RETRY_AFTER) && - (response.status < 200 || response.status >= 300)); - } - return false; - } - /** - * Calculates the Unix-time value for a throttle to expire given throttleTime in seconds. - * @param throttleTime - */ - static calculateThrottleTime(throttleTime) { - const time = throttleTime <= 0 ? 0 : throttleTime; - const currentSeconds = Date.now() / 1000; - return Math.floor(Math.min(currentSeconds + - (time || ThrottlingConstants.DEFAULT_THROTTLE_TIME_SECONDS), currentSeconds + - ThrottlingConstants.DEFAULT_MAX_THROTTLE_TIME_SECONDS) * 1000); - } - static removeThrottle(cacheManager, clientId, request, homeAccountIdentifier) { - const thumbprint = { - clientId: clientId, - authority: request.authority, - scopes: request.scopes, - homeAccountIdentifier: homeAccountIdentifier, - claims: request.claims, - authenticationScheme: request.authenticationScheme, - resourceRequestMethod: request.resourceRequestMethod, - resourceRequestUri: request.resourceRequestUri, - shrClaims: request.shrClaims, - sshKid: request.sshKid, - }; - const key = this.generateThrottlingStorageKey(thumbprint); - cacheManager.removeItem(key, request.correlationId); - } -} - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * Represents network related errors - */ -class NetworkError extends AuthError { - constructor(error, httpStatus, responseHeaders) { - super(error.errorCode, error.errorMessage, error.subError); - Object.setPrototypeOf(this, NetworkError.prototype); - this.name = "NetworkError"; - this.error = error; - this.httpStatus = httpStatus; - this.responseHeaders = responseHeaders; - } -} -/** - * Creates NetworkError object for a failed network request - * @param error - Error to be thrown back to the caller - * @param httpStatus - Status code of the network request - * @param responseHeaders - Response headers of the network request, when available - * @returns NetworkError object - */ -function createNetworkError(error, httpStatus, responseHeaders) { - return new NetworkError(error, httpStatus, responseHeaders); -} - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * Base application class which will construct requests to send to and handle responses from the Microsoft STS using the authorization code flow. - * @internal - */ -class BaseClient { - constructor(configuration, performanceClient) { - // Set the configuration - this.config = buildClientConfiguration(configuration); - // Initialize the logger - this.logger = new Logger(this.config.loggerOptions, name, version); - // Initialize crypto - this.cryptoUtils = this.config.cryptoInterface; - // Initialize storage interface - this.cacheManager = this.config.storageInterface; - // Set the network interface - this.networkClient = this.config.networkInterface; - // Set TelemetryManager - this.serverTelemetryManager = this.config.serverTelemetryManager; - // set Authority - this.authority = this.config.authOptions.authority; - // set performance telemetry client - this.performanceClient = performanceClient; - } - /** - * Creates default headers for requests to token endpoint - */ - createTokenRequestHeaders(ccsCred) { - const headers = {}; - headers[HeaderNames.CONTENT_TYPE] = Constants.URL_FORM_CONTENT_TYPE; - if (!this.config.systemOptions.preventCorsPreflight && ccsCred) { - switch (ccsCred.type) { - case CcsCredentialType.HOME_ACCOUNT_ID: - try { - const clientInfo = buildClientInfoFromHomeAccountId(ccsCred.credential); - headers[HeaderNames.CCS_HEADER] = `Oid:${clientInfo.uid}@${clientInfo.utid}`; - } - catch (e) { - this.logger.verbose("Could not parse home account ID for CCS Header: " + - e); - } - break; - case CcsCredentialType.UPN: - headers[HeaderNames.CCS_HEADER] = `UPN: ${ccsCred.credential}`; - break; - } - } - return headers; - } - /** - * Http post to token endpoint - * @param tokenEndpoint - * @param queryString - * @param headers - * @param thumbprint - */ - async executePostToTokenEndpoint(tokenEndpoint, queryString, headers, thumbprint, correlationId, queuedEvent) { - if (queuedEvent) { - this.performanceClient?.addQueueMeasurement(queuedEvent, correlationId); - } - const response = await this.sendPostRequest(thumbprint, tokenEndpoint, { body: queryString, headers: headers }, correlationId); - if (this.config.serverTelemetryManager && - response.status < 500 && - response.status !== 429) { - // Telemetry data successfully logged by server, clear Telemetry cache - this.config.serverTelemetryManager.clearTelemetryCache(); - } - return response; - } - /** - * Wraps sendPostRequestAsync with necessary preflight and postflight logic - * @param thumbprint - Request thumbprint for throttling - * @param tokenEndpoint - Endpoint to make the POST to - * @param options - Body and Headers to include on the POST request - * @param correlationId - CorrelationId for telemetry - */ - async sendPostRequest(thumbprint, tokenEndpoint, options, correlationId) { - ThrottlingUtils.preProcess(this.cacheManager, thumbprint, correlationId); - let response; - try { - response = await invokeAsync((this.networkClient.sendPostRequestAsync.bind(this.networkClient)), PerformanceEvents.NetworkClientSendPostRequestAsync, this.logger, this.performanceClient, correlationId)(tokenEndpoint, options); - const responseHeaders = response.headers || {}; - this.performanceClient?.addFields({ - refreshTokenSize: response.body.refresh_token?.length || 0, - httpVerToken: responseHeaders[HeaderNames.X_MS_HTTP_VERSION] || "", - requestId: responseHeaders[HeaderNames.X_MS_REQUEST_ID] || "", - }, correlationId); - } - catch (e) { - if (e instanceof NetworkError) { - const responseHeaders = e.responseHeaders; - if (responseHeaders) { - this.performanceClient?.addFields({ - httpVerToken: responseHeaders[HeaderNames.X_MS_HTTP_VERSION] || "", - requestId: responseHeaders[HeaderNames.X_MS_REQUEST_ID] || - "", - contentTypeHeader: responseHeaders[HeaderNames.CONTENT_TYPE] || - undefined, - contentLengthHeader: responseHeaders[HeaderNames.CONTENT_LENGTH] || - undefined, - httpStatus: e.httpStatus, - }, correlationId); - } - throw e.error; - } - if (e instanceof AuthError) { - throw e; - } - else { - throw createClientAuthError(networkError); - } - } - ThrottlingUtils.postProcess(this.cacheManager, thumbprint, response, correlationId); - return response; - } - /** - * Updates the authority object of the client. Endpoint discovery must be completed. - * @param updatedAuthority - */ - async updateAuthority(cloudInstanceHostname, correlationId) { - this.performanceClient?.addQueueMeasurement(PerformanceEvents.UpdateTokenEndpointAuthority, correlationId); - const cloudInstanceAuthorityUri = `https://${cloudInstanceHostname}/${this.authority.tenant}/`; - const cloudInstanceAuthority = await createDiscoveredInstance(cloudInstanceAuthorityUri, this.networkClient, this.cacheManager, this.authority.options, this.logger, correlationId, this.performanceClient); - this.authority = cloudInstanceAuthority; - } - /** - * Creates query string for the /token request - * @param request - */ - createTokenQueryParameters(request) { - const parameterBuilder = new RequestParameterBuilder(request.correlationId, this.performanceClient); - if (request.embeddedClientId) { - parameterBuilder.addBrokerParameters({ - brokerClientId: this.config.authOptions.clientId, - brokerRedirectUri: this.config.authOptions.redirectUri, - }); - } - if (request.tokenQueryParameters) { - parameterBuilder.addExtraQueryParameters(request.tokenQueryParameters); - } - parameterBuilder.addCorrelationId(request.correlationId); - return parameterBuilder.createQueryString(); - } -} - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -// Codes defined by MSAL -const noTokensFound = "no_tokens_found"; -const nativeAccountUnavailable = "native_account_unavailable"; -const refreshTokenExpired = "refresh_token_expired"; -// Codes potentially returned by server -const interactionRequired = "interaction_required"; -const consentRequired = "consent_required"; -const loginRequired = "login_required"; -const badToken = "bad_token"; - -var InteractionRequiredAuthErrorCodes = /*#__PURE__*/Object.freeze({ - __proto__: null, - badToken: badToken, - consentRequired: consentRequired, - interactionRequired: interactionRequired, - loginRequired: loginRequired, - nativeAccountUnavailable: nativeAccountUnavailable, - noTokensFound: noTokensFound, - refreshTokenExpired: refreshTokenExpired -}); - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * InteractionRequiredServerErrorMessage contains string constants used by error codes and messages returned by the server indicating interaction is required - */ -const InteractionRequiredServerErrorMessage = [ - interactionRequired, - consentRequired, - loginRequired, - badToken, -]; -const InteractionRequiredAuthSubErrorMessage = [ - "message_only", - "additional_action", - "basic_action", - "user_password_expired", - "consent_required", - "bad_token", -]; -const InteractionRequiredAuthErrorMessages = { - [noTokensFound]: "No refresh token found in the cache. Please sign-in.", - [nativeAccountUnavailable]: "The requested account is not available in the native broker. It may have been deleted or logged out. Please sign-in again using an interactive API.", - [refreshTokenExpired]: "Refresh token has expired.", - [badToken]: "Identity provider returned bad_token due to an expired or invalid refresh token. Please invoke an interactive API to resolve.", -}; -/** - * Interaction required errors defined by the SDK - * @deprecated Use InteractionRequiredAuthErrorCodes instead - */ -const InteractionRequiredAuthErrorMessage = { - noTokensFoundError: { - code: noTokensFound, - desc: InteractionRequiredAuthErrorMessages[noTokensFound], - }, - native_account_unavailable: { - code: nativeAccountUnavailable, - desc: InteractionRequiredAuthErrorMessages[nativeAccountUnavailable], - }, - bad_token: { - code: badToken, - desc: InteractionRequiredAuthErrorMessages[badToken], - }, -}; -/** - * Error thrown when user interaction is required. - */ -class InteractionRequiredAuthError extends AuthError { - constructor(errorCode, errorMessage, subError, timestamp, traceId, correlationId, claims, errorNo) { - super(errorCode, errorMessage, subError); - Object.setPrototypeOf(this, InteractionRequiredAuthError.prototype); - this.timestamp = timestamp || Constants.EMPTY_STRING; - this.traceId = traceId || Constants.EMPTY_STRING; - this.correlationId = correlationId || Constants.EMPTY_STRING; - this.claims = claims || Constants.EMPTY_STRING; - this.name = "InteractionRequiredAuthError"; - this.errorNo = errorNo; - } -} -/** - * Helper function used to determine if an error thrown by the server requires interaction to resolve - * @param errorCode - * @param errorString - * @param subError - */ -function isInteractionRequiredError(errorCode, errorString, subError) { - const isInteractionRequiredErrorCode = !!errorCode && - InteractionRequiredServerErrorMessage.indexOf(errorCode) > -1; - const isInteractionRequiredSubError = !!subError && - InteractionRequiredAuthSubErrorMessage.indexOf(subError) > -1; - const isInteractionRequiredErrorDesc = !!errorString && - InteractionRequiredServerErrorMessage.some((irErrorCode) => { - return errorString.indexOf(irErrorCode) > -1; - }); - return (isInteractionRequiredErrorCode || - isInteractionRequiredErrorDesc || - isInteractionRequiredSubError); -} -/** - * Creates an InteractionRequiredAuthError - */ -function createInteractionRequiredAuthError(errorCode) { - return new InteractionRequiredAuthError(errorCode, InteractionRequiredAuthErrorMessages[errorCode]); -} - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * Class which provides helpers for OAuth 2.0 protocol specific values - */ -class ProtocolUtils { - /** - * Appends user state with random guid, or returns random guid. - * @param userState - * @param randomGuid - */ - static setRequestState(cryptoObj, userState, meta) { - const libraryState = ProtocolUtils.generateLibraryState(cryptoObj, meta); - return userState - ? `${libraryState}${Constants.RESOURCE_DELIM}${userState}` - : libraryState; - } - /** - * Generates the state value used by the common library. - * @param randomGuid - * @param cryptoObj - */ - static generateLibraryState(cryptoObj, meta) { - if (!cryptoObj) { - throw createClientAuthError(noCryptoObject); - } - // Create a state object containing a unique id and the timestamp of the request creation - const stateObj = { - id: cryptoObj.createNewGuid(), - }; - if (meta) { - stateObj.meta = meta; - } - const stateString = JSON.stringify(stateObj); - return cryptoObj.base64Encode(stateString); - } - /** - * Parses the state into the RequestStateObject, which contains the LibraryState info and the state passed by the user. - * @param state - * @param cryptoObj - */ - static parseRequestState(cryptoObj, state) { - if (!cryptoObj) { - throw createClientAuthError(noCryptoObject); - } - if (!state) { - throw createClientAuthError(invalidState); - } - try { - // Split the state between library state and user passed state and decode them separately - const splitState = state.split(Constants.RESOURCE_DELIM); - const libraryState = splitState[0]; - const userState = splitState.length > 1 - ? splitState.slice(1).join(Constants.RESOURCE_DELIM) - : Constants.EMPTY_STRING; - const libraryStateString = cryptoObj.base64Decode(libraryState); - const libraryStateObj = JSON.parse(libraryStateString); - return { - userRequestState: userState || Constants.EMPTY_STRING, - libraryState: libraryStateObj, - }; - } - catch (e) { - throw createClientAuthError(invalidState); - } - } -} - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -const KeyLocation = { - SW: "sw", - UHW: "uhw", -}; -/** @internal */ -class PopTokenGenerator { - constructor(cryptoUtils, performanceClient) { - this.cryptoUtils = cryptoUtils; - this.performanceClient = performanceClient; - } - /** - * Generates the req_cnf validated at the RP in the POP protocol for SHR parameters - * and returns an object containing the keyid, the full req_cnf string and the req_cnf string hash - * @param request - * @returns - */ - async generateCnf(request, logger) { - this.performanceClient?.addQueueMeasurement(PerformanceEvents.PopTokenGenerateCnf, request.correlationId); - const reqCnf = await invokeAsync(this.generateKid.bind(this), PerformanceEvents.PopTokenGenerateCnf, logger, this.performanceClient, request.correlationId)(request); - const reqCnfString = this.cryptoUtils.base64UrlEncode(JSON.stringify(reqCnf)); - return { - kid: reqCnf.kid, - reqCnfString, - }; - } - /** - * Generates key_id for a SHR token request - * @param request - * @returns - */ - async generateKid(request) { - this.performanceClient?.addQueueMeasurement(PerformanceEvents.PopTokenGenerateKid, request.correlationId); - const kidThumbprint = await this.cryptoUtils.getPublicKeyThumbprint(request); - return { - kid: kidThumbprint, - xms_ksl: KeyLocation.SW, - }; - } - /** - * Signs the POP access_token with the local generated key-pair - * @param accessToken - * @param request - * @returns - */ - async signPopToken(accessToken, keyId, request) { - return this.signPayload(accessToken, keyId, request); - } - /** - * Utility function to generate the signed JWT for an access_token - * @param payload - * @param kid - * @param request - * @param claims - * @returns - */ - async signPayload(payload, keyId, request, claims) { - // Deconstruct request to extract SHR parameters - const { resourceRequestMethod, resourceRequestUri, shrClaims, shrNonce, shrOptions, } = request; - const resourceUrlString = resourceRequestUri - ? new UrlString(resourceRequestUri) - : undefined; - const resourceUrlComponents = resourceUrlString?.getUrlComponents(); - return this.cryptoUtils.signJwt({ - at: payload, - ts: nowSeconds(), - m: resourceRequestMethod?.toUpperCase(), - u: resourceUrlComponents?.HostNameAndPort, - nonce: shrNonce || this.cryptoUtils.createNewGuid(), - p: resourceUrlComponents?.AbsolutePath, - q: resourceUrlComponents?.QueryString - ? [[], resourceUrlComponents.QueryString] - : undefined, - client_claims: shrClaims || undefined, - ...claims, - }, keyId, shrOptions, request.correlationId); - } -} - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * This class instance helps track the memory changes facilitating - * decisions to read from and write to the persistent cache - */ class TokenCacheContext { - constructor(tokenCache, hasChanged) { - this.cache = tokenCache; - this.hasChanged = hasChanged; - } - /** - * boolean which indicates the changes in cache - */ - get cacheHasChanged() { - return this.hasChanged; - } - /** - * function to retrieve the token cache - */ - get tokenCache() { - return this.cache; - } -} - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -function parseServerErrorNo(serverResponse) { - const errorCodePrefix = "code="; - const errorCodePrefixIndex = serverResponse.error_uri?.lastIndexOf(errorCodePrefix); - return errorCodePrefixIndex && errorCodePrefixIndex >= 0 - ? serverResponse.error_uri?.substring(errorCodePrefixIndex + errorCodePrefix.length) - : undefined; -} -/** - * Class that handles response parsing. - * @internal - */ -class ResponseHandler { - constructor(clientId, cacheStorage, cryptoObj, logger, serializableCache, persistencePlugin, performanceClient) { - this.clientId = clientId; - this.cacheStorage = cacheStorage; - this.cryptoObj = cryptoObj; - this.logger = logger; - this.serializableCache = serializableCache; - this.persistencePlugin = persistencePlugin; - this.performanceClient = performanceClient; - } - /** - * Function which validates server authorization code response. - * @param serverResponseHash - * @param requestState - * @param cryptoObj - */ - validateServerAuthorizationCodeResponse(serverResponse, requestState) { - if (!serverResponse.state || !requestState) { - throw serverResponse.state - ? createClientAuthError(stateNotFound, "Cached State") - : createClientAuthError(stateNotFound, "Server State"); - } - let decodedServerResponseState; - let decodedRequestState; - try { - decodedServerResponseState = decodeURIComponent(serverResponse.state); - } - catch (e) { - throw createClientAuthError(invalidState, serverResponse.state); - } - try { - decodedRequestState = decodeURIComponent(requestState); - } - catch (e) { - throw createClientAuthError(invalidState, serverResponse.state); - } - if (decodedServerResponseState !== decodedRequestState) { - throw createClientAuthError(stateMismatch); - } - // Check for error - if (serverResponse.error || - serverResponse.error_description || - serverResponse.suberror) { - const serverErrorNo = parseServerErrorNo(serverResponse); - if (isInteractionRequiredError(serverResponse.error, serverResponse.error_description, serverResponse.suberror)) { - throw new InteractionRequiredAuthError(serverResponse.error || "", serverResponse.error_description, serverResponse.suberror, serverResponse.timestamp || "", serverResponse.trace_id || "", serverResponse.correlation_id || "", serverResponse.claims || "", serverErrorNo); - } - throw new ServerError(serverResponse.error || "", serverResponse.error_description, serverResponse.suberror, serverErrorNo); - } - } - /** - * Function which validates server authorization token response. - * @param serverResponse - * @param refreshAccessToken - */ - validateTokenResponse(serverResponse, refreshAccessToken) { - // Check for error - if (serverResponse.error || - serverResponse.error_description || - serverResponse.suberror) { - const errString = `Error(s): ${serverResponse.error_codes || Constants.NOT_AVAILABLE} - Timestamp: ${serverResponse.timestamp || Constants.NOT_AVAILABLE} - Description: ${serverResponse.error_description || Constants.NOT_AVAILABLE} - Correlation ID: ${serverResponse.correlation_id || Constants.NOT_AVAILABLE} - Trace ID: ${serverResponse.trace_id || Constants.NOT_AVAILABLE}`; - const serverErrorNo = serverResponse.error_codes?.length - ? serverResponse.error_codes[0] - : undefined; - const serverError = new ServerError(serverResponse.error, errString, serverResponse.suberror, serverErrorNo, serverResponse.status); - // check if 500 error - if (refreshAccessToken && - serverResponse.status && - serverResponse.status >= HttpStatus.SERVER_ERROR_RANGE_START && - serverResponse.status <= HttpStatus.SERVER_ERROR_RANGE_END) { - this.logger.warning(`executeTokenRequest:validateTokenResponse - AAD is currently unavailable and the access token is unable to be refreshed.\n${serverError}`); - // don't throw an exception, but alert the user via a log that the token was unable to be refreshed - return; - // check if 400 error - } - else if (refreshAccessToken && - serverResponse.status && - serverResponse.status >= HttpStatus.CLIENT_ERROR_RANGE_START && - serverResponse.status <= HttpStatus.CLIENT_ERROR_RANGE_END) { - this.logger.warning(`executeTokenRequest:validateTokenResponse - AAD is currently available but is unable to refresh the access token.\n${serverError}`); - // don't throw an exception, but alert the user via a log that the token was unable to be refreshed - return; - } - if (isInteractionRequiredError(serverResponse.error, serverResponse.error_description, serverResponse.suberror)) { - throw new InteractionRequiredAuthError(serverResponse.error, serverResponse.error_description, serverResponse.suberror, serverResponse.timestamp || Constants.EMPTY_STRING, serverResponse.trace_id || Constants.EMPTY_STRING, serverResponse.correlation_id || Constants.EMPTY_STRING, serverResponse.claims || Constants.EMPTY_STRING, serverErrorNo); - } - throw serverError; - } - } - /** - * Returns a constructed token response based on given string. Also manages the cache updates and cleanups. - * @param serverTokenResponse - * @param authority - */ - async handleServerTokenResponse(serverTokenResponse, authority, reqTimestamp, request, authCodePayload, userAssertionHash, handlingRefreshTokenResponse, forceCacheRefreshTokenResponse, serverRequestId) { - this.performanceClient?.addQueueMeasurement(PerformanceEvents.HandleServerTokenResponse, serverTokenResponse.correlation_id); - // create an idToken object (not entity) - let idTokenClaims; - if (serverTokenResponse.id_token) { - idTokenClaims = extractTokenClaims(serverTokenResponse.id_token || Constants.EMPTY_STRING, this.cryptoObj.base64Decode); - // token nonce check (TODO: Add a warning if no nonce is given?) - if (authCodePayload && authCodePayload.nonce) { - if (idTokenClaims.nonce !== authCodePayload.nonce) { - throw createClientAuthError(nonceMismatch); - } - } - // token max_age check - if (request.maxAge || request.maxAge === 0) { - const authTime = idTokenClaims.auth_time; - if (!authTime) { - throw createClientAuthError(authTimeNotFound); - } - checkMaxAge(authTime, request.maxAge); - } - } - // generate homeAccountId - this.homeAccountIdentifier = AccountEntity.generateHomeAccountId(serverTokenResponse.client_info || Constants.EMPTY_STRING, authority.authorityType, this.logger, this.cryptoObj, idTokenClaims); - // save the response tokens - let requestStateObj; - if (!!authCodePayload && !!authCodePayload.state) { - requestStateObj = ProtocolUtils.parseRequestState(this.cryptoObj, authCodePayload.state); - } - // Add keyId from request to serverTokenResponse if defined - serverTokenResponse.key_id = - serverTokenResponse.key_id || request.sshKid || undefined; - const cacheRecord = this.generateCacheRecord(serverTokenResponse, authority, reqTimestamp, request, idTokenClaims, userAssertionHash, authCodePayload); - let cacheContext; - try { - if (this.persistencePlugin && this.serializableCache) { - this.logger.verbose("Persistence enabled, calling beforeCacheAccess"); - cacheContext = new TokenCacheContext(this.serializableCache, true); - await this.persistencePlugin.beforeCacheAccess(cacheContext); - } - /* - * When saving a refreshed tokens to the cache, it is expected that the account that was used is present in the cache. - * If not present, we should return null, as it's the case that another application called removeAccount in between - * the calls to getAllAccounts and acquireTokenSilent. We should not overwrite that removal, unless explicitly flagged by - * the developer, as in the case of refresh token flow used in ADAL Node to MSAL Node migration. - */ - if (handlingRefreshTokenResponse && - !forceCacheRefreshTokenResponse && - cacheRecord.account) { - const key = cacheRecord.account.generateAccountKey(); - const account = this.cacheStorage.getAccount(key, request.correlationId, this.logger); - if (!account) { - this.logger.warning("Account used to refresh tokens not in persistence, refreshed tokens will not be stored in the cache"); - return await ResponseHandler.generateAuthenticationResult(this.cryptoObj, authority, cacheRecord, false, request, idTokenClaims, requestStateObj, undefined, serverRequestId); - } - } - await this.cacheStorage.saveCacheRecord(cacheRecord, request.correlationId, request.storeInCache); - } - finally { - if (this.persistencePlugin && - this.serializableCache && - cacheContext) { - this.logger.verbose("Persistence enabled, calling afterCacheAccess"); - await this.persistencePlugin.afterCacheAccess(cacheContext); - } - } - return ResponseHandler.generateAuthenticationResult(this.cryptoObj, authority, cacheRecord, false, request, idTokenClaims, requestStateObj, serverTokenResponse, serverRequestId); - } - /** - * Generates CacheRecord - * @param serverTokenResponse - * @param idTokenObj - * @param authority - */ - generateCacheRecord(serverTokenResponse, authority, reqTimestamp, request, idTokenClaims, userAssertionHash, authCodePayload) { - const env = authority.getPreferredCache(); - if (!env) { - throw createClientAuthError(invalidCacheEnvironment); - } - const claimsTenantId = getTenantIdFromIdTokenClaims(idTokenClaims); - // IdToken: non AAD scenarios can have empty realm - let cachedIdToken; - let cachedAccount; - if (serverTokenResponse.id_token && !!idTokenClaims) { - cachedIdToken = createIdTokenEntity(this.homeAccountIdentifier, env, serverTokenResponse.id_token, this.clientId, claimsTenantId || ""); - cachedAccount = buildAccountToCache(this.cacheStorage, authority, this.homeAccountIdentifier, this.cryptoObj.base64Decode, request.correlationId, idTokenClaims, serverTokenResponse.client_info, env, claimsTenantId, authCodePayload, undefined, // nativeAccountId - this.logger); - } - // AccessToken - let cachedAccessToken = null; - if (serverTokenResponse.access_token) { - // If scopes not returned in server response, use request scopes - const responseScopes = serverTokenResponse.scope - ? ScopeSet.fromString(serverTokenResponse.scope) - : new ScopeSet(request.scopes || []); - /* - * Use timestamp calculated before request - * Server may return timestamps as strings, parse to numbers if so. - */ - const expiresIn = (typeof serverTokenResponse.expires_in === "string" - ? parseInt(serverTokenResponse.expires_in, 10) - : serverTokenResponse.expires_in) || 0; - const extExpiresIn = (typeof serverTokenResponse.ext_expires_in === "string" - ? parseInt(serverTokenResponse.ext_expires_in, 10) - : serverTokenResponse.ext_expires_in) || 0; - const refreshIn = (typeof serverTokenResponse.refresh_in === "string" - ? parseInt(serverTokenResponse.refresh_in, 10) - : serverTokenResponse.refresh_in) || undefined; - const tokenExpirationSeconds = reqTimestamp + expiresIn; - const extendedTokenExpirationSeconds = tokenExpirationSeconds + extExpiresIn; - const refreshOnSeconds = refreshIn && refreshIn > 0 - ? reqTimestamp + refreshIn - : undefined; - // non AAD scenarios can have empty realm - cachedAccessToken = createAccessTokenEntity(this.homeAccountIdentifier, env, serverTokenResponse.access_token, this.clientId, claimsTenantId || authority.tenant || "", responseScopes.printScopes(), tokenExpirationSeconds, extendedTokenExpirationSeconds, this.cryptoObj.base64Decode, refreshOnSeconds, serverTokenResponse.token_type, userAssertionHash, serverTokenResponse.key_id, request.claims, request.requestedClaimsHash); - } - // refreshToken - let cachedRefreshToken = null; - if (serverTokenResponse.refresh_token) { - let rtExpiresOn; - if (serverTokenResponse.refresh_token_expires_in) { - const rtExpiresIn = typeof serverTokenResponse.refresh_token_expires_in === - "string" - ? parseInt(serverTokenResponse.refresh_token_expires_in, 10) - : serverTokenResponse.refresh_token_expires_in; - rtExpiresOn = reqTimestamp + rtExpiresIn; - } - cachedRefreshToken = createRefreshTokenEntity(this.homeAccountIdentifier, env, serverTokenResponse.refresh_token, this.clientId, serverTokenResponse.foci, userAssertionHash, rtExpiresOn); - } - // appMetadata - let cachedAppMetadata = null; - if (serverTokenResponse.foci) { - cachedAppMetadata = { - clientId: this.clientId, - environment: env, - familyId: serverTokenResponse.foci, - }; - } - return { - account: cachedAccount, - idToken: cachedIdToken, - accessToken: cachedAccessToken, - refreshToken: cachedRefreshToken, - appMetadata: cachedAppMetadata, - }; - } - /** - * Creates an @AuthenticationResult from @CacheRecord , @IdToken , and a boolean that states whether or not the result is from cache. - * - * Optionally takes a state string that is set as-is in the response. - * - * @param cacheRecord - * @param idTokenObj - * @param fromTokenCache - * @param stateString - */ - static async generateAuthenticationResult(cryptoObj, authority, cacheRecord, fromTokenCache, request, idTokenClaims, requestState, serverTokenResponse, requestId) { - let accessToken = Constants.EMPTY_STRING; - let responseScopes = []; - let expiresOn = null; - let extExpiresOn; - let refreshOn; - let familyId = Constants.EMPTY_STRING; - if (cacheRecord.accessToken) { - /* - * if the request object has `popKid` property, `signPopToken` will be set to false and - * the token will be returned unsigned - */ - if (cacheRecord.accessToken.tokenType === - AuthenticationScheme.POP && - !request.popKid) { - const popTokenGenerator = new PopTokenGenerator(cryptoObj); - const { secret, keyId } = cacheRecord.accessToken; - if (!keyId) { - throw createClientAuthError(keyIdMissing); - } - accessToken = await popTokenGenerator.signPopToken(secret, keyId, request); - } - else { - accessToken = cacheRecord.accessToken.secret; - } - responseScopes = ScopeSet.fromString(cacheRecord.accessToken.target).asArray(); - expiresOn = new Date(Number(cacheRecord.accessToken.expiresOn) * 1000); - extExpiresOn = new Date(Number(cacheRecord.accessToken.extendedExpiresOn) * 1000); - if (cacheRecord.accessToken.refreshOn) { - refreshOn = new Date(Number(cacheRecord.accessToken.refreshOn) * 1000); - } - } - if (cacheRecord.appMetadata) { - familyId = - cacheRecord.appMetadata.familyId === THE_FAMILY_ID - ? THE_FAMILY_ID - : ""; - } - const uid = idTokenClaims?.oid || idTokenClaims?.sub || ""; - const tid = idTokenClaims?.tid || ""; - // for hybrid + native bridge enablement, send back the native account Id - if (serverTokenResponse?.spa_accountid && !!cacheRecord.account) { - cacheRecord.account.nativeAccountId = - serverTokenResponse?.spa_accountid; - } - const accountInfo = cacheRecord.account - ? updateAccountTenantProfileData(cacheRecord.account.getAccountInfo(), undefined, // tenantProfile optional - idTokenClaims, cacheRecord.idToken?.secret) - : null; - return { - authority: authority.canonicalAuthority, - uniqueId: uid, - tenantId: tid, - scopes: responseScopes, - account: accountInfo, - idToken: cacheRecord?.idToken?.secret || "", - idTokenClaims: idTokenClaims || {}, - accessToken: accessToken, - fromCache: fromTokenCache, - expiresOn: expiresOn, - extExpiresOn: extExpiresOn, - refreshOn: refreshOn, - correlationId: request.correlationId, - requestId: requestId || Constants.EMPTY_STRING, - familyId: familyId, - tokenType: cacheRecord.accessToken?.tokenType || Constants.EMPTY_STRING, - state: requestState - ? requestState.userRequestState - : Constants.EMPTY_STRING, - cloudGraphHostName: cacheRecord.account?.cloudGraphHostName || - Constants.EMPTY_STRING, - msGraphHost: cacheRecord.account?.msGraphHost || Constants.EMPTY_STRING, - code: serverTokenResponse?.spa_code, - fromNativeBroker: false, - }; - } -} -function buildAccountToCache(cacheStorage, authority, homeAccountId, base64Decode, correlationId, idTokenClaims, clientInfo, environment, claimsTenantId, authCodePayload, nativeAccountId, logger) { - logger?.verbose("setCachedAccount called"); - // Check if base account is already cached - const accountKeys = cacheStorage.getAccountKeys(); - const baseAccountKey = accountKeys.find((accountKey) => { - return accountKey.startsWith(homeAccountId); - }); - let cachedAccount = null; - if (baseAccountKey) { - cachedAccount = cacheStorage.getAccount(baseAccountKey, correlationId, logger); - } - const baseAccount = cachedAccount || - AccountEntity.createAccount({ - homeAccountId, - idTokenClaims, - clientInfo, - environment, - cloudGraphHostName: authCodePayload?.cloud_graph_host_name, - msGraphHost: authCodePayload?.msgraph_host, - nativeAccountId: nativeAccountId, - }, authority, base64Decode); - const tenantProfiles = baseAccount.tenantProfiles || []; - const tenantId = claimsTenantId || baseAccount.realm; - if (tenantId && - !tenantProfiles.find((tenantProfile) => { - return tenantProfile.tenantId === tenantId; - })) { - const newTenantProfile = buildTenantProfile(homeAccountId, baseAccount.localAccountId, tenantId, idTokenClaims); - tenantProfiles.push(newTenantProfile); - } - baseAccount.tenantProfiles = tenantProfiles; - return baseAccount; -} - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -async function getClientAssertion(clientAssertion, clientId, tokenEndpoint) { - if (typeof clientAssertion === "string") { - return clientAssertion; - } - else { - const config = { - clientId: clientId, - tokenEndpoint: tokenEndpoint, - }; - return clientAssertion(config); - } -} - -var ClientAssertionUtils = /*#__PURE__*/Object.freeze({ - __proto__: null, - getClientAssertion: getClientAssertion -}); - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * Oauth2.0 Authorization Code client - * @internal - */ -class AuthorizationCodeClient extends BaseClient { - constructor(configuration, performanceClient) { - super(configuration, performanceClient); - // Flag to indicate if client is for hybrid spa auth code redemption - this.includeRedirectUri = true; - this.oidcDefaultScopes = - this.config.authOptions.authority.options.OIDCOptions?.defaultScopes; - } - /** - * Creates the URL of the authorization request letting the user input credentials and consent to the - * application. The URL target the /authorize endpoint of the authority configured in the - * application object. - * - * Once the user inputs their credentials and consents, the authority will send a response to the redirect URI - * sent in the request and should contain an authorization code, which can then be used to acquire tokens via - * acquireToken(AuthorizationCodeRequest) - * @param request - */ - async getAuthCodeUrl(request) { - this.performanceClient?.addQueueMeasurement(PerformanceEvents.GetAuthCodeUrl, request.correlationId); - const queryString = await invokeAsync(this.createAuthCodeUrlQueryString.bind(this), PerformanceEvents.AuthClientCreateQueryString, this.logger, this.performanceClient, request.correlationId)(request); - return UrlString.appendQueryString(this.authority.authorizationEndpoint, queryString); - } - /** - * API to acquire a token in exchange of 'authorization_code` acquired by the user in the first leg of the - * authorization_code_grant - * @param request - */ - async acquireToken(request, authCodePayload) { - this.performanceClient?.addQueueMeasurement(PerformanceEvents.AuthClientAcquireToken, request.correlationId); - if (!request.code) { - throw createClientAuthError(requestCannotBeMade); - } - const reqTimestamp = nowSeconds(); - const response = await invokeAsync(this.executeTokenRequest.bind(this), PerformanceEvents.AuthClientExecuteTokenRequest, this.logger, this.performanceClient, request.correlationId)(this.authority, request); - // Retrieve requestId from response headers - const requestId = response.headers?.[HeaderNames.X_MS_REQUEST_ID]; - const responseHandler = new ResponseHandler(this.config.authOptions.clientId, this.cacheManager, this.cryptoUtils, this.logger, this.config.serializableCache, this.config.persistencePlugin, this.performanceClient); - // Validate response. This function throws a server error if an error is returned by the server. - responseHandler.validateTokenResponse(response.body); - return invokeAsync(responseHandler.handleServerTokenResponse.bind(responseHandler), PerformanceEvents.HandleServerTokenResponse, this.logger, this.performanceClient, request.correlationId)(response.body, this.authority, reqTimestamp, request, authCodePayload, undefined, undefined, undefined, requestId); - } - /** - * Handles the hash fragment response from public client code request. Returns a code response used by - * the client to exchange for a token in acquireToken. - * @param hashFragment - */ - handleFragmentResponse(serverParams, cachedState) { - // Handle responses. - const responseHandler = new ResponseHandler(this.config.authOptions.clientId, this.cacheManager, this.cryptoUtils, this.logger, null, null); - // Get code response - responseHandler.validateServerAuthorizationCodeResponse(serverParams, cachedState); - // throw when there is no auth code in the response - if (!serverParams.code) { - throw createClientAuthError(authorizationCodeMissingFromServerResponse); - } - return serverParams; - } - /** - * Used to log out the current user, and redirect the user to the postLogoutRedirectUri. - * Default behaviour is to redirect the user to `window.location.href`. - * @param authorityUri - */ - getLogoutUri(logoutRequest) { - // Throw error if logoutRequest is null/undefined - if (!logoutRequest) { - throw createClientConfigurationError(logoutRequestEmpty); - } - const queryString = this.createLogoutUrlQueryString(logoutRequest); - // Construct logout URI - return UrlString.appendQueryString(this.authority.endSessionEndpoint, queryString); - } - /** - * Executes POST request to token endpoint - * @param authority - * @param request - */ - async executeTokenRequest(authority, request) { - this.performanceClient?.addQueueMeasurement(PerformanceEvents.AuthClientExecuteTokenRequest, request.correlationId); - const queryParametersString = this.createTokenQueryParameters(request); - const endpoint = UrlString.appendQueryString(authority.tokenEndpoint, queryParametersString); - const requestBody = await invokeAsync(this.createTokenRequestBody.bind(this), PerformanceEvents.AuthClientCreateTokenRequestBody, this.logger, this.performanceClient, request.correlationId)(request); - let ccsCredential = undefined; - if (request.clientInfo) { - try { - const clientInfo = buildClientInfo(request.clientInfo, this.cryptoUtils.base64Decode); - ccsCredential = { - credential: `${clientInfo.uid}${Separators.CLIENT_INFO_SEPARATOR}${clientInfo.utid}`, - type: CcsCredentialType.HOME_ACCOUNT_ID, - }; - } - catch (e) { - this.logger.verbose("Could not parse client info for CCS Header: " + e); - } - } - const headers = this.createTokenRequestHeaders(ccsCredential || request.ccsCredential); - const thumbprint = { - clientId: request.tokenBodyParameters?.clientId || - this.config.authOptions.clientId, - authority: authority.canonicalAuthority, - scopes: request.scopes, - claims: request.claims, - authenticationScheme: request.authenticationScheme, - resourceRequestMethod: request.resourceRequestMethod, - resourceRequestUri: request.resourceRequestUri, - shrClaims: request.shrClaims, - sshKid: request.sshKid, - }; - return invokeAsync(this.executePostToTokenEndpoint.bind(this), PerformanceEvents.AuthorizationCodeClientExecutePostToTokenEndpoint, this.logger, this.performanceClient, request.correlationId)(endpoint, requestBody, headers, thumbprint, request.correlationId, PerformanceEvents.AuthorizationCodeClientExecutePostToTokenEndpoint); - } - /** - * Generates a map for all the params to be sent to the service - * @param request - */ - async createTokenRequestBody(request) { - this.performanceClient?.addQueueMeasurement(PerformanceEvents.AuthClientCreateTokenRequestBody, request.correlationId); - const parameterBuilder = new RequestParameterBuilder(request.correlationId, this.performanceClient); - parameterBuilder.addClientId(request.embeddedClientId || - request.tokenBodyParameters?.[CLIENT_ID] || - this.config.authOptions.clientId); - /* - * For hybrid spa flow, there will be a code but no verifier - * In this scenario, don't include redirect uri as auth code will not be bound to redirect URI - */ - if (!this.includeRedirectUri) { - // Just validate - RequestValidator.validateRedirectUri(request.redirectUri); - } - else { - // Validate and include redirect uri - parameterBuilder.addRedirectUri(request.redirectUri); - } - // Add scope array, parameter builder will add default scopes and dedupe - parameterBuilder.addScopes(request.scopes, true, this.oidcDefaultScopes); - // add code: user set, not validated - parameterBuilder.addAuthorizationCode(request.code); - // Add library metadata - parameterBuilder.addLibraryInfo(this.config.libraryInfo); - parameterBuilder.addApplicationTelemetry(this.config.telemetry.application); - parameterBuilder.addThrottling(); - if (this.serverTelemetryManager && !isOidcProtocolMode(this.config)) { - parameterBuilder.addServerTelemetry(this.serverTelemetryManager); - } - // add code_verifier if passed - if (request.codeVerifier) { - parameterBuilder.addCodeVerifier(request.codeVerifier); - } - if (this.config.clientCredentials.clientSecret) { - parameterBuilder.addClientSecret(this.config.clientCredentials.clientSecret); - } - if (this.config.clientCredentials.clientAssertion) { - const clientAssertion = this.config.clientCredentials.clientAssertion; - parameterBuilder.addClientAssertion(await getClientAssertion(clientAssertion.assertion, this.config.authOptions.clientId, request.resourceRequestUri)); - parameterBuilder.addClientAssertionType(clientAssertion.assertionType); - } - parameterBuilder.addGrantType(GrantType.AUTHORIZATION_CODE_GRANT); - parameterBuilder.addClientInfo(); - if (request.authenticationScheme === AuthenticationScheme.POP) { - const popTokenGenerator = new PopTokenGenerator(this.cryptoUtils, this.performanceClient); - let reqCnfData; - if (!request.popKid) { - const generatedReqCnfData = await invokeAsync(popTokenGenerator.generateCnf.bind(popTokenGenerator), PerformanceEvents.PopTokenGenerateCnf, this.logger, this.performanceClient, request.correlationId)(request, this.logger); - reqCnfData = generatedReqCnfData.reqCnfString; - } - else { - reqCnfData = this.cryptoUtils.encodeKid(request.popKid); - } - // SPA PoP requires full Base64Url encoded req_cnf string (unhashed) - parameterBuilder.addPopToken(reqCnfData); - } - else if (request.authenticationScheme === AuthenticationScheme.SSH) { - if (request.sshJwk) { - parameterBuilder.addSshJwk(request.sshJwk); - } - else { - throw createClientConfigurationError(missingSshJwk); - } - } - if (!StringUtils.isEmptyObj(request.claims) || - (this.config.authOptions.clientCapabilities && - this.config.authOptions.clientCapabilities.length > 0)) { - parameterBuilder.addClaims(request.claims, this.config.authOptions.clientCapabilities); - } - let ccsCred = undefined; - if (request.clientInfo) { - try { - const clientInfo = buildClientInfo(request.clientInfo, this.cryptoUtils.base64Decode); - ccsCred = { - credential: `${clientInfo.uid}${Separators.CLIENT_INFO_SEPARATOR}${clientInfo.utid}`, - type: CcsCredentialType.HOME_ACCOUNT_ID, - }; - } - catch (e) { - this.logger.verbose("Could not parse client info for CCS Header: " + e); - } - } - else { - ccsCred = request.ccsCredential; - } - // Adds these as parameters in the request instead of headers to prevent CORS preflight request - if (this.config.systemOptions.preventCorsPreflight && ccsCred) { - switch (ccsCred.type) { - case CcsCredentialType.HOME_ACCOUNT_ID: - try { - const clientInfo = buildClientInfoFromHomeAccountId(ccsCred.credential); - parameterBuilder.addCcsOid(clientInfo); - } - catch (e) { - this.logger.verbose("Could not parse home account ID for CCS Header: " + - e); - } - break; - case CcsCredentialType.UPN: - parameterBuilder.addCcsUpn(ccsCred.credential); - break; - } - } - if (request.embeddedClientId) { - parameterBuilder.addBrokerParameters({ - brokerClientId: this.config.authOptions.clientId, - brokerRedirectUri: this.config.authOptions.redirectUri, - }); - } - if (request.tokenBodyParameters) { - parameterBuilder.addExtraQueryParameters(request.tokenBodyParameters); - } - // Add hybrid spa parameters if not already provided - if (request.enableSpaAuthorizationCode && - (!request.tokenBodyParameters || - !request.tokenBodyParameters[RETURN_SPA_CODE])) { - parameterBuilder.addExtraQueryParameters({ - [RETURN_SPA_CODE]: "1", - }); - } - return parameterBuilder.createQueryString(); - } - /** - * This API validates the `AuthorizationCodeUrlRequest` and creates a URL - * @param request - */ - async createAuthCodeUrlQueryString(request) { - // generate the correlationId if not set by the user and add - const correlationId = request.correlationId || - this.config.cryptoInterface.createNewGuid(); - this.performanceClient?.addQueueMeasurement(PerformanceEvents.AuthClientCreateQueryString, correlationId); - const parameterBuilder = new RequestParameterBuilder(correlationId, this.performanceClient); - parameterBuilder.addClientId(request.embeddedClientId || - request.extraQueryParameters?.[CLIENT_ID] || - this.config.authOptions.clientId); - const requestScopes = [ - ...(request.scopes || []), - ...(request.extraScopesToConsent || []), - ]; - parameterBuilder.addScopes(requestScopes, true, this.oidcDefaultScopes); - // validate the redirectUri (to be a non null value) - parameterBuilder.addRedirectUri(request.redirectUri); - parameterBuilder.addCorrelationId(correlationId); - // add response_mode. If not passed in it defaults to query. - parameterBuilder.addResponseMode(request.responseMode); - // add response_type = code - parameterBuilder.addResponseTypeCode(); - // add library info parameters - parameterBuilder.addLibraryInfo(this.config.libraryInfo); - if (!isOidcProtocolMode(this.config)) { - parameterBuilder.addApplicationTelemetry(this.config.telemetry.application); - } - // add client_info=1 - parameterBuilder.addClientInfo(); - if (request.codeChallenge && request.codeChallengeMethod) { - parameterBuilder.addCodeChallengeParams(request.codeChallenge, request.codeChallengeMethod); - } - if (request.prompt) { - parameterBuilder.addPrompt(request.prompt); - } - if (request.domainHint) { - parameterBuilder.addDomainHint(request.domainHint); - } - // Add sid or loginHint with preference for login_hint claim (in request) -> sid -> loginHint (upn/email) -> username of AccountInfo object - if (request.prompt !== PromptValue.SELECT_ACCOUNT) { - // AAD will throw if prompt=select_account is passed with an account hint - if (request.sid && request.prompt === PromptValue.NONE) { - // SessionID is only used in silent calls - this.logger.verbose("createAuthCodeUrlQueryString: Prompt is none, adding sid from request"); - parameterBuilder.addSid(request.sid); - } - else if (request.account) { - const accountSid = this.extractAccountSid(request.account); - let accountLoginHintClaim = this.extractLoginHint(request.account); - if (accountLoginHintClaim && request.domainHint) { - this.logger.warning(`AuthorizationCodeClient.createAuthCodeUrlQueryString: "domainHint" param is set, skipping opaque "login_hint" claim. Please consider not passing domainHint`); - accountLoginHintClaim = null; - } - // If login_hint claim is present, use it over sid/username - if (accountLoginHintClaim) { - this.logger.verbose("createAuthCodeUrlQueryString: login_hint claim present on account"); - parameterBuilder.addLoginHint(accountLoginHintClaim); - try { - const clientInfo = buildClientInfoFromHomeAccountId(request.account.homeAccountId); - parameterBuilder.addCcsOid(clientInfo); - } - catch (e) { - this.logger.verbose("createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header"); - } - } - else if (accountSid && request.prompt === PromptValue.NONE) { - /* - * If account and loginHint are provided, we will check account first for sid before adding loginHint - * SessionId is only used in silent calls - */ - this.logger.verbose("createAuthCodeUrlQueryString: Prompt is none, adding sid from account"); - parameterBuilder.addSid(accountSid); - try { - const clientInfo = buildClientInfoFromHomeAccountId(request.account.homeAccountId); - parameterBuilder.addCcsOid(clientInfo); - } - catch (e) { - this.logger.verbose("createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header"); - } - } - else if (request.loginHint) { - this.logger.verbose("createAuthCodeUrlQueryString: Adding login_hint from request"); - parameterBuilder.addLoginHint(request.loginHint); - parameterBuilder.addCcsUpn(request.loginHint); - } - else if (request.account.username) { - // Fallback to account username if provided - this.logger.verbose("createAuthCodeUrlQueryString: Adding login_hint from account"); - parameterBuilder.addLoginHint(request.account.username); - try { - const clientInfo = buildClientInfoFromHomeAccountId(request.account.homeAccountId); - parameterBuilder.addCcsOid(clientInfo); - } - catch (e) { - this.logger.verbose("createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header"); - } - } - } - else if (request.loginHint) { - this.logger.verbose("createAuthCodeUrlQueryString: No account, adding login_hint from request"); - parameterBuilder.addLoginHint(request.loginHint); - parameterBuilder.addCcsUpn(request.loginHint); - } - } - else { - this.logger.verbose("createAuthCodeUrlQueryString: Prompt is select_account, ignoring account hints"); - } - if (request.nonce) { - parameterBuilder.addNonce(request.nonce); - } - if (request.state) { - parameterBuilder.addState(request.state); - } - if (request.claims || - (this.config.authOptions.clientCapabilities && - this.config.authOptions.clientCapabilities.length > 0)) { - parameterBuilder.addClaims(request.claims, this.config.authOptions.clientCapabilities); - } - if (request.embeddedClientId) { - parameterBuilder.addBrokerParameters({ - brokerClientId: this.config.authOptions.clientId, - brokerRedirectUri: this.config.authOptions.redirectUri, - }); - } - this.addExtraQueryParams(request, parameterBuilder); - if (request.nativeBroker) { - // signal ests that this is a WAM call - parameterBuilder.addNativeBroker(); - // pass the req_cnf for POP - if (request.authenticationScheme === AuthenticationScheme.POP) { - const popTokenGenerator = new PopTokenGenerator(this.cryptoUtils); - // req_cnf is always sent as a string for SPAs - let reqCnfData; - if (!request.popKid) { - const generatedReqCnfData = await invokeAsync(popTokenGenerator.generateCnf.bind(popTokenGenerator), PerformanceEvents.PopTokenGenerateCnf, this.logger, this.performanceClient, request.correlationId)(request, this.logger); - reqCnfData = generatedReqCnfData.reqCnfString; - } - else { - reqCnfData = this.cryptoUtils.encodeKid(request.popKid); - } - parameterBuilder.addPopToken(reqCnfData); - } - } - return parameterBuilder.createQueryString(); - } - /** - * This API validates the `EndSessionRequest` and creates a URL - * @param request - */ - createLogoutUrlQueryString(request) { - const parameterBuilder = new RequestParameterBuilder(request.correlationId, this.performanceClient); - if (request.postLogoutRedirectUri) { - parameterBuilder.addPostLogoutRedirectUri(request.postLogoutRedirectUri); - } - if (request.correlationId) { - parameterBuilder.addCorrelationId(request.correlationId); - } - if (request.idTokenHint) { - parameterBuilder.addIdTokenHint(request.idTokenHint); - } - if (request.state) { - parameterBuilder.addState(request.state); - } - if (request.logoutHint) { - parameterBuilder.addLogoutHint(request.logoutHint); - } - this.addExtraQueryParams(request, parameterBuilder); - return parameterBuilder.createQueryString(); - } - addExtraQueryParams(request, parameterBuilder) { - const hasRequestInstanceAware = request.extraQueryParameters && - request.extraQueryParameters.hasOwnProperty("instance_aware"); - // Set instance_aware flag if config auth param is set - if (!hasRequestInstanceAware && this.config.authOptions.instanceAware) { - request.extraQueryParameters = request.extraQueryParameters || {}; - request.extraQueryParameters["instance_aware"] = "true"; - } - if (request.extraQueryParameters) { - parameterBuilder.addExtraQueryParameters(request.extraQueryParameters); - } - } - /** - * Helper to get sid from account. Returns null if idTokenClaims are not present or sid is not present. - * @param account - */ - extractAccountSid(account) { - return account.idTokenClaims?.sid || null; - } - extractLoginHint(account) { - return account.idTokenClaims?.login_hint || null; - } -} - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -const DEFAULT_REFRESH_TOKEN_EXPIRATION_OFFSET_SECONDS = 300; // 5 Minutes -/** - * OAuth2.0 refresh token client - * @internal - */ -class RefreshTokenClient extends BaseClient { - constructor(configuration, performanceClient) { - super(configuration, performanceClient); - } - async acquireToken(request) { - this.performanceClient?.addQueueMeasurement(PerformanceEvents.RefreshTokenClientAcquireToken, request.correlationId); - const reqTimestamp = nowSeconds(); - const response = await invokeAsync(this.executeTokenRequest.bind(this), PerformanceEvents.RefreshTokenClientExecuteTokenRequest, this.logger, this.performanceClient, request.correlationId)(request, this.authority); - // Retrieve requestId from response headers - const requestId = response.headers?.[HeaderNames.X_MS_REQUEST_ID]; - const responseHandler = new ResponseHandler(this.config.authOptions.clientId, this.cacheManager, this.cryptoUtils, this.logger, this.config.serializableCache, this.config.persistencePlugin); - responseHandler.validateTokenResponse(response.body); - return invokeAsync(responseHandler.handleServerTokenResponse.bind(responseHandler), PerformanceEvents.HandleServerTokenResponse, this.logger, this.performanceClient, request.correlationId)(response.body, this.authority, reqTimestamp, request, undefined, undefined, true, request.forceCache, requestId); - } - /** - * Gets cached refresh token and attaches to request, then calls acquireToken API - * @param request - */ - async acquireTokenByRefreshToken(request) { - // Cannot renew token if no request object is given. - if (!request) { - throw createClientConfigurationError(tokenRequestEmpty); - } - this.performanceClient?.addQueueMeasurement(PerformanceEvents.RefreshTokenClientAcquireTokenByRefreshToken, request.correlationId); - // We currently do not support silent flow for account === null use cases; This will be revisited for confidential flow usecases - if (!request.account) { - throw createClientAuthError(noAccountInSilentRequest); - } - // try checking if FOCI is enabled for the given application - const isFOCI = this.cacheManager.isAppMetadataFOCI(request.account.environment); - // if the app is part of the family, retrive a Family refresh token if present and make a refreshTokenRequest - if (isFOCI) { - try { - return await invokeAsync(this.acquireTokenWithCachedRefreshToken.bind(this), PerformanceEvents.RefreshTokenClientAcquireTokenWithCachedRefreshToken, this.logger, this.performanceClient, request.correlationId)(request, true); - } - catch (e) { - const noFamilyRTInCache = e instanceof InteractionRequiredAuthError && - e.errorCode === - noTokensFound; - const clientMismatchErrorWithFamilyRT = e instanceof ServerError && - e.errorCode === Errors.INVALID_GRANT_ERROR && - e.subError === Errors.CLIENT_MISMATCH_ERROR; - // if family Refresh Token (FRT) cache acquisition fails or if client_mismatch error is seen with FRT, reattempt with application Refresh Token (ART) - if (noFamilyRTInCache || clientMismatchErrorWithFamilyRT) { - return invokeAsync(this.acquireTokenWithCachedRefreshToken.bind(this), PerformanceEvents.RefreshTokenClientAcquireTokenWithCachedRefreshToken, this.logger, this.performanceClient, request.correlationId)(request, false); - // throw in all other cases - } - else { - throw e; - } - } - } - // fall back to application refresh token acquisition - return invokeAsync(this.acquireTokenWithCachedRefreshToken.bind(this), PerformanceEvents.RefreshTokenClientAcquireTokenWithCachedRefreshToken, this.logger, this.performanceClient, request.correlationId)(request, false); - } - /** - * makes a network call to acquire tokens by exchanging RefreshToken available in userCache; throws if refresh token is not cached - * @param request - */ - async acquireTokenWithCachedRefreshToken(request, foci) { - this.performanceClient?.addQueueMeasurement(PerformanceEvents.RefreshTokenClientAcquireTokenWithCachedRefreshToken, request.correlationId); - // fetches family RT or application RT based on FOCI value - const refreshToken = invoke(this.cacheManager.getRefreshToken.bind(this.cacheManager), PerformanceEvents.CacheManagerGetRefreshToken, this.logger, this.performanceClient, request.correlationId)(request.account, foci, request.correlationId, undefined, this.performanceClient); - if (!refreshToken) { - throw createInteractionRequiredAuthError(noTokensFound); - } - if (refreshToken.expiresOn && - isTokenExpired(refreshToken.expiresOn, request.refreshTokenExpirationOffsetSeconds || - DEFAULT_REFRESH_TOKEN_EXPIRATION_OFFSET_SECONDS)) { - throw createInteractionRequiredAuthError(refreshTokenExpired); - } - // attach cached RT size to the current measurement - const refreshTokenRequest = { - ...request, - refreshToken: refreshToken.secret, - authenticationScheme: request.authenticationScheme || AuthenticationScheme.BEARER, - ccsCredential: { - credential: request.account.homeAccountId, - type: CcsCredentialType.HOME_ACCOUNT_ID, - }, - }; - try { - return await invokeAsync(this.acquireToken.bind(this), PerformanceEvents.RefreshTokenClientAcquireToken, this.logger, this.performanceClient, request.correlationId)(refreshTokenRequest); - } - catch (e) { - if (e instanceof InteractionRequiredAuthError && - e.subError === badToken) { - // Remove bad refresh token from cache - this.logger.verbose("acquireTokenWithRefreshToken: bad refresh token, removing from cache"); - const badRefreshTokenKey = generateCredentialKey(refreshToken); - this.cacheManager.removeRefreshToken(badRefreshTokenKey, request.correlationId); - } - throw e; - } - } - /** - * Constructs the network message and makes a NW call to the underlying secure token service - * @param request - * @param authority - */ - async executeTokenRequest(request, authority) { - this.performanceClient?.addQueueMeasurement(PerformanceEvents.RefreshTokenClientExecuteTokenRequest, request.correlationId); - const queryParametersString = this.createTokenQueryParameters(request); - const endpoint = UrlString.appendQueryString(authority.tokenEndpoint, queryParametersString); - const requestBody = await invokeAsync(this.createTokenRequestBody.bind(this), PerformanceEvents.RefreshTokenClientCreateTokenRequestBody, this.logger, this.performanceClient, request.correlationId)(request); - const headers = this.createTokenRequestHeaders(request.ccsCredential); - const thumbprint = { - clientId: request.tokenBodyParameters?.clientId || - this.config.authOptions.clientId, - authority: authority.canonicalAuthority, - scopes: request.scopes, - claims: request.claims, - authenticationScheme: request.authenticationScheme, - resourceRequestMethod: request.resourceRequestMethod, - resourceRequestUri: request.resourceRequestUri, - shrClaims: request.shrClaims, - sshKid: request.sshKid, - }; - return invokeAsync(this.executePostToTokenEndpoint.bind(this), PerformanceEvents.RefreshTokenClientExecutePostToTokenEndpoint, this.logger, this.performanceClient, request.correlationId)(endpoint, requestBody, headers, thumbprint, request.correlationId, PerformanceEvents.RefreshTokenClientExecutePostToTokenEndpoint); - } - /** - * Helper function to create the token request body - * @param request - */ - async createTokenRequestBody(request) { - this.performanceClient?.addQueueMeasurement(PerformanceEvents.RefreshTokenClientCreateTokenRequestBody, request.correlationId); - const correlationId = request.correlationId; - const parameterBuilder = new RequestParameterBuilder(correlationId, this.performanceClient); - parameterBuilder.addClientId(request.embeddedClientId || - request.tokenBodyParameters?.[CLIENT_ID] || - this.config.authOptions.clientId); - if (request.redirectUri) { - parameterBuilder.addRedirectUri(request.redirectUri); - } - parameterBuilder.addScopes(request.scopes, true, this.config.authOptions.authority.options.OIDCOptions?.defaultScopes); - parameterBuilder.addGrantType(GrantType.REFRESH_TOKEN_GRANT); - parameterBuilder.addClientInfo(); - parameterBuilder.addLibraryInfo(this.config.libraryInfo); - parameterBuilder.addApplicationTelemetry(this.config.telemetry.application); - parameterBuilder.addThrottling(); - if (this.serverTelemetryManager && !isOidcProtocolMode(this.config)) { - parameterBuilder.addServerTelemetry(this.serverTelemetryManager); - } - parameterBuilder.addRefreshToken(request.refreshToken); - if (this.config.clientCredentials.clientSecret) { - parameterBuilder.addClientSecret(this.config.clientCredentials.clientSecret); - } - if (this.config.clientCredentials.clientAssertion) { - const clientAssertion = this.config.clientCredentials.clientAssertion; - parameterBuilder.addClientAssertion(await getClientAssertion(clientAssertion.assertion, this.config.authOptions.clientId, request.resourceRequestUri)); - parameterBuilder.addClientAssertionType(clientAssertion.assertionType); - } - if (request.authenticationScheme === AuthenticationScheme.POP) { - const popTokenGenerator = new PopTokenGenerator(this.cryptoUtils, this.performanceClient); - let reqCnfData; - if (!request.popKid) { - const generatedReqCnfData = await invokeAsync(popTokenGenerator.generateCnf.bind(popTokenGenerator), PerformanceEvents.PopTokenGenerateCnf, this.logger, this.performanceClient, request.correlationId)(request, this.logger); - reqCnfData = generatedReqCnfData.reqCnfString; - } - else { - reqCnfData = this.cryptoUtils.encodeKid(request.popKid); - } - // SPA PoP requires full Base64Url encoded req_cnf string (unhashed) - parameterBuilder.addPopToken(reqCnfData); - } - else if (request.authenticationScheme === AuthenticationScheme.SSH) { - if (request.sshJwk) { - parameterBuilder.addSshJwk(request.sshJwk); - } - else { - throw createClientConfigurationError(missingSshJwk); - } - } - if (!StringUtils.isEmptyObj(request.claims) || - (this.config.authOptions.clientCapabilities && - this.config.authOptions.clientCapabilities.length > 0)) { - parameterBuilder.addClaims(request.claims, this.config.authOptions.clientCapabilities); - } - if (this.config.systemOptions.preventCorsPreflight && - request.ccsCredential) { - switch (request.ccsCredential.type) { - case CcsCredentialType.HOME_ACCOUNT_ID: - try { - const clientInfo = buildClientInfoFromHomeAccountId(request.ccsCredential.credential); - parameterBuilder.addCcsOid(clientInfo); - } - catch (e) { - this.logger.verbose("Could not parse home account ID for CCS Header: " + - e); - } - break; - case CcsCredentialType.UPN: - parameterBuilder.addCcsUpn(request.ccsCredential.credential); - break; - } - } - if (request.embeddedClientId) { - parameterBuilder.addBrokerParameters({ - brokerClientId: this.config.authOptions.clientId, - brokerRedirectUri: this.config.authOptions.redirectUri, - }); - } - if (request.tokenBodyParameters) { - parameterBuilder.addExtraQueryParameters(request.tokenBodyParameters); - } - return parameterBuilder.createQueryString(); - } -} - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** @internal */ -class SilentFlowClient extends BaseClient { - constructor(configuration, performanceClient) { - super(configuration, performanceClient); - } - /** - * Retrieves a token from cache if it is still valid, or uses the cached refresh token to renew - * the given token and returns the renewed token - * @param request - */ - async acquireToken(request) { - try { - const [authResponse, cacheOutcome] = await this.acquireCachedToken({ - ...request, - scopes: request.scopes?.length - ? request.scopes - : [...OIDC_DEFAULT_SCOPES], - }); - // if the token is not expired but must be refreshed; get a new one in the background - if (cacheOutcome === CacheOutcome.PROACTIVELY_REFRESHED) { - this.logger.info("SilentFlowClient:acquireCachedToken - Cached access token's refreshOn property has been exceeded'. It's not expired, but must be refreshed."); - // refresh the access token in the background - const refreshTokenClient = new RefreshTokenClient(this.config, this.performanceClient); - refreshTokenClient - .acquireTokenByRefreshToken(request) - .catch(() => { - // do nothing, this is running in the background and no action is to be taken upon success or failure - }); - } - // return the cached token - return authResponse; - } - catch (e) { - if (e instanceof ClientAuthError && - e.errorCode === tokenRefreshRequired) { - const refreshTokenClient = new RefreshTokenClient(this.config, this.performanceClient); - return refreshTokenClient.acquireTokenByRefreshToken(request); - } - else { - throw e; - } - } - } - /** - * Retrieves token from cache or throws an error if it must be refreshed. - * @param request - */ - async acquireCachedToken(request) { - this.performanceClient?.addQueueMeasurement(PerformanceEvents.SilentFlowClientAcquireCachedToken, request.correlationId); - let lastCacheOutcome = CacheOutcome.NOT_APPLICABLE; - if (request.forceRefresh || - (!this.config.cacheOptions.claimsBasedCachingEnabled && - !StringUtils.isEmptyObj(request.claims))) { - // Must refresh due to present force_refresh flag. - this.setCacheOutcome(CacheOutcome.FORCE_REFRESH_OR_CLAIMS, request.correlationId); - throw createClientAuthError(tokenRefreshRequired); - } - // We currently do not support silent flow for account === null use cases; This will be revisited for confidential flow usecases - if (!request.account) { - throw createClientAuthError(noAccountInSilentRequest); - } - const requestTenantId = request.account.tenantId || - getTenantFromAuthorityString(request.authority); - const tokenKeys = this.cacheManager.getTokenKeys(); - const cachedAccessToken = this.cacheManager.getAccessToken(request.account, request, tokenKeys, requestTenantId, this.performanceClient); - if (!cachedAccessToken) { - // must refresh due to non-existent access_token - this.setCacheOutcome(CacheOutcome.NO_CACHED_ACCESS_TOKEN, request.correlationId); - throw createClientAuthError(tokenRefreshRequired); - } - else if (wasClockTurnedBack(cachedAccessToken.cachedAt) || - isTokenExpired(cachedAccessToken.expiresOn, this.config.systemOptions.tokenRenewalOffsetSeconds)) { - // must refresh due to the expires_in value - this.setCacheOutcome(CacheOutcome.CACHED_ACCESS_TOKEN_EXPIRED, request.correlationId); - throw createClientAuthError(tokenRefreshRequired); - } - else if (cachedAccessToken.refreshOn && - isTokenExpired(cachedAccessToken.refreshOn, 0)) { - // must refresh (in the background) due to the refresh_in value - lastCacheOutcome = CacheOutcome.PROACTIVELY_REFRESHED; - // don't throw ClientAuthError.createRefreshRequiredError(), return cached token instead - } - const environment = request.authority || this.authority.getPreferredCache(); - const cacheRecord = { - account: this.cacheManager.readAccountFromCache(request.account, request.correlationId), - accessToken: cachedAccessToken, - idToken: this.cacheManager.getIdToken(request.account, request.correlationId, tokenKeys, requestTenantId, this.performanceClient), - refreshToken: null, - appMetadata: this.cacheManager.readAppMetadataFromCache(environment), - }; - this.setCacheOutcome(lastCacheOutcome, request.correlationId); - if (this.config.serverTelemetryManager) { - this.config.serverTelemetryManager.incrementCacheHits(); - } - return [ - await invokeAsync(this.generateResultFromCacheRecord.bind(this), PerformanceEvents.SilentFlowClientGenerateResultFromCacheRecord, this.logger, this.performanceClient, request.correlationId)(cacheRecord, request), - lastCacheOutcome, - ]; - } - setCacheOutcome(cacheOutcome, correlationId) { - this.serverTelemetryManager?.setCacheOutcome(cacheOutcome); - this.performanceClient?.addFields({ - cacheOutcome: cacheOutcome, - }, correlationId); - if (cacheOutcome !== CacheOutcome.NOT_APPLICABLE) { - this.logger.info(`Token refresh is required due to cache outcome: ${cacheOutcome}`); - } - } - /** - * Helper function to build response object from the CacheRecord - * @param cacheRecord - */ - async generateResultFromCacheRecord(cacheRecord, request) { - this.performanceClient?.addQueueMeasurement(PerformanceEvents.SilentFlowClientGenerateResultFromCacheRecord, request.correlationId); - let idTokenClaims; - if (cacheRecord.idToken) { - idTokenClaims = extractTokenClaims(cacheRecord.idToken.secret, this.config.cryptoInterface.base64Decode); - } - // token max_age check - if (request.maxAge || request.maxAge === 0) { - const authTime = idTokenClaims?.auth_time; - if (!authTime) { - throw createClientAuthError(authTimeNotFound); - } - checkMaxAge(authTime, request.maxAge); - } - return ResponseHandler.generateAuthenticationResult(this.cryptoUtils, this.authority, cacheRecord, true, request, idTokenClaims); - } -} - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -const StubbedNetworkModule = { - sendGetRequestAsync: () => { - return Promise.reject(createClientAuthError(methodNotImplemented)); - }, - sendPostRequestAsync: () => { - return Promise.reject(createClientAuthError(methodNotImplemented)); - }, -}; - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * This is a helper class that parses supported HTTP response authentication headers to extract and return - * header challenge values that can be used outside the basic authorization flows. - */ -class AuthenticationHeaderParser { - constructor(headers) { - this.headers = headers; - } - /** - * This method parses the SHR nonce value out of either the Authentication-Info or WWW-Authenticate authentication headers. - * @returns - */ - getShrNonce() { - // Attempt to parse nonce from Authentiacation-Info - const authenticationInfo = this.headers[HeaderNames.AuthenticationInfo]; - if (authenticationInfo) { - const authenticationInfoChallenges = this.parseChallenges(authenticationInfo); - if (authenticationInfoChallenges.nextnonce) { - return authenticationInfoChallenges.nextnonce; - } - throw createClientConfigurationError(invalidAuthenticationHeader); - } - // Attempt to parse nonce from WWW-Authenticate - const wwwAuthenticate = this.headers[HeaderNames.WWWAuthenticate]; - if (wwwAuthenticate) { - const wwwAuthenticateChallenges = this.parseChallenges(wwwAuthenticate); - if (wwwAuthenticateChallenges.nonce) { - return wwwAuthenticateChallenges.nonce; - } - throw createClientConfigurationError(invalidAuthenticationHeader); - } - // If neither header is present, throw missing headers error - throw createClientConfigurationError(missingNonceAuthenticationHeader); - } - /** - * Parses an HTTP header's challenge set into a key/value map. - * @param header - * @returns - */ - parseChallenges(header) { - const schemeSeparator = header.indexOf(" "); - const challenges = header.substr(schemeSeparator + 1).split(","); - const challengeMap = {}; - challenges.forEach((challenge) => { - const [key, value] = challenge.split("="); - // Remove escaped quotation marks (', ") from challenge string to keep only the challenge value - challengeMap[key] = unescape(value.replace(/['"]+/g, Constants.EMPTY_STRING)); - }); - return challengeMap; - } -} - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -const skuGroupSeparator = ","; -const skuValueSeparator = "|"; -function makeExtraSkuString(params) { - const { skus, libraryName, libraryVersion, extensionName, extensionVersion, } = params; - const skuMap = new Map([ - [0, [libraryName, libraryVersion]], - [2, [extensionName, extensionVersion]], - ]); - let skuArr = []; - if (skus?.length) { - skuArr = skus.split(skuGroupSeparator); - // Ignore invalid input sku param - if (skuArr.length < 4) { - return skus; - } - } - else { - skuArr = Array.from({ length: 4 }, () => skuValueSeparator); - } - skuMap.forEach((value, key) => { - if (value.length === 2 && value[0]?.length && value[1]?.length) { - setSku({ - skuArr, - index: key, - skuName: value[0], - skuVersion: value[1], - }); - } - }); - return skuArr.join(skuGroupSeparator); -} -function setSku(params) { - const { skuArr, index, skuName, skuVersion } = params; - if (index >= skuArr.length) { - return; - } - skuArr[index] = [skuName, skuVersion].join(skuValueSeparator); -} -/** @internal */ -class ServerTelemetryManager { - constructor(telemetryRequest, cacheManager) { - this.cacheOutcome = CacheOutcome.NOT_APPLICABLE; - this.cacheManager = cacheManager; - this.apiId = telemetryRequest.apiId; - this.correlationId = telemetryRequest.correlationId; - this.wrapperSKU = telemetryRequest.wrapperSKU || Constants.EMPTY_STRING; - this.wrapperVer = telemetryRequest.wrapperVer || Constants.EMPTY_STRING; - this.telemetryCacheKey = - SERVER_TELEM_CONSTANTS.CACHE_KEY + - Separators.CACHE_KEY_SEPARATOR + - telemetryRequest.clientId; - } - /** - * API to add MSER Telemetry to request - */ - generateCurrentRequestHeaderValue() { - const request = `${this.apiId}${SERVER_TELEM_CONSTANTS.VALUE_SEPARATOR}${this.cacheOutcome}`; - const platformFieldsArr = [this.wrapperSKU, this.wrapperVer]; - const nativeBrokerErrorCode = this.getNativeBrokerErrorCode(); - if (nativeBrokerErrorCode?.length) { - platformFieldsArr.push(`broker_error=${nativeBrokerErrorCode}`); - } - const platformFields = platformFieldsArr.join(SERVER_TELEM_CONSTANTS.VALUE_SEPARATOR); - const regionDiscoveryFields = this.getRegionDiscoveryFields(); - const requestWithRegionDiscoveryFields = [ - request, - regionDiscoveryFields, - ].join(SERVER_TELEM_CONSTANTS.VALUE_SEPARATOR); - return [ - SERVER_TELEM_CONSTANTS.SCHEMA_VERSION, - requestWithRegionDiscoveryFields, - platformFields, - ].join(SERVER_TELEM_CONSTANTS.CATEGORY_SEPARATOR); - } - /** - * API to add MSER Telemetry for the last failed request - */ - generateLastRequestHeaderValue() { - const lastRequests = this.getLastRequests(); - const maxErrors = ServerTelemetryManager.maxErrorsToSend(lastRequests); - const failedRequests = lastRequests.failedRequests - .slice(0, 2 * maxErrors) - .join(SERVER_TELEM_CONSTANTS.VALUE_SEPARATOR); - const errors = lastRequests.errors - .slice(0, maxErrors) - .join(SERVER_TELEM_CONSTANTS.VALUE_SEPARATOR); - const errorCount = lastRequests.errors.length; - // Indicate whether this header contains all data or partial data - const overflow = maxErrors < errorCount - ? SERVER_TELEM_CONSTANTS.OVERFLOW_TRUE - : SERVER_TELEM_CONSTANTS.OVERFLOW_FALSE; - const platformFields = [errorCount, overflow].join(SERVER_TELEM_CONSTANTS.VALUE_SEPARATOR); - return [ - SERVER_TELEM_CONSTANTS.SCHEMA_VERSION, - lastRequests.cacheHits, - failedRequests, - errors, - platformFields, - ].join(SERVER_TELEM_CONSTANTS.CATEGORY_SEPARATOR); - } - /** - * API to cache token failures for MSER data capture - * @param error - */ - cacheFailedRequest(error) { - const lastRequests = this.getLastRequests(); - if (lastRequests.errors.length >= - SERVER_TELEM_CONSTANTS.MAX_CACHED_ERRORS) { - // Remove a cached error to make room, first in first out - lastRequests.failedRequests.shift(); // apiId - lastRequests.failedRequests.shift(); // correlationId - lastRequests.errors.shift(); - } - lastRequests.failedRequests.push(this.apiId, this.correlationId); - if (error instanceof Error && !!error && error.toString()) { - if (error instanceof AuthError) { - if (error.subError) { - lastRequests.errors.push(error.subError); - } - else if (error.errorCode) { - lastRequests.errors.push(error.errorCode); - } - else { - lastRequests.errors.push(error.toString()); - } - } - else { - lastRequests.errors.push(error.toString()); - } - } - else { - lastRequests.errors.push(SERVER_TELEM_CONSTANTS.UNKNOWN_ERROR); - } - this.cacheManager.setServerTelemetry(this.telemetryCacheKey, lastRequests, this.correlationId); - return; - } - /** - * Update server telemetry cache entry by incrementing cache hit counter - */ - incrementCacheHits() { - const lastRequests = this.getLastRequests(); - lastRequests.cacheHits += 1; - this.cacheManager.setServerTelemetry(this.telemetryCacheKey, lastRequests, this.correlationId); - return lastRequests.cacheHits; - } - /** - * Get the server telemetry entity from cache or initialize a new one - */ - getLastRequests() { - const initialValue = { - failedRequests: [], - errors: [], - cacheHits: 0, - }; - const lastRequests = this.cacheManager.getServerTelemetry(this.telemetryCacheKey); - return lastRequests || initialValue; - } - /** - * Remove server telemetry cache entry - */ - clearTelemetryCache() { - const lastRequests = this.getLastRequests(); - const numErrorsFlushed = ServerTelemetryManager.maxErrorsToSend(lastRequests); - const errorCount = lastRequests.errors.length; - if (numErrorsFlushed === errorCount) { - // All errors were sent on last request, clear Telemetry cache - this.cacheManager.removeItem(this.telemetryCacheKey, this.correlationId); - } - else { - // Partial data was flushed to server, construct a new telemetry cache item with errors that were not flushed - const serverTelemEntity = { - failedRequests: lastRequests.failedRequests.slice(numErrorsFlushed * 2), - errors: lastRequests.errors.slice(numErrorsFlushed), - cacheHits: 0, - }; - this.cacheManager.setServerTelemetry(this.telemetryCacheKey, serverTelemEntity, this.correlationId); - } - } - /** - * Returns the maximum number of errors that can be flushed to the server in the next network request - * @param serverTelemetryEntity - */ - static maxErrorsToSend(serverTelemetryEntity) { - let i; - let maxErrors = 0; - let dataSize = 0; - const errorCount = serverTelemetryEntity.errors.length; - for (i = 0; i < errorCount; i++) { - // failedRequests parameter contains pairs of apiId and correlationId, multiply index by 2 to preserve pairs - const apiId = serverTelemetryEntity.failedRequests[2 * i] || - Constants.EMPTY_STRING; - const correlationId = serverTelemetryEntity.failedRequests[2 * i + 1] || - Constants.EMPTY_STRING; - const errorCode = serverTelemetryEntity.errors[i] || Constants.EMPTY_STRING; - // Count number of characters that would be added to header, each character is 1 byte. Add 3 at the end to account for separators - dataSize += - apiId.toString().length + - correlationId.toString().length + - errorCode.length + - 3; - if (dataSize < SERVER_TELEM_CONSTANTS.MAX_LAST_HEADER_BYTES) { - // Adding this entry to the header would still keep header size below the limit - maxErrors += 1; - } - else { - break; - } - } - return maxErrors; - } - /** - * Get the region discovery fields - * - * @returns string - */ - getRegionDiscoveryFields() { - const regionDiscoveryFields = []; - regionDiscoveryFields.push(this.regionUsed || Constants.EMPTY_STRING); - regionDiscoveryFields.push(this.regionSource || Constants.EMPTY_STRING); - regionDiscoveryFields.push(this.regionOutcome || Constants.EMPTY_STRING); - return regionDiscoveryFields.join(","); - } - /** - * Update the region discovery metadata - * - * @param regionDiscoveryMetadata - * @returns void - */ - updateRegionDiscoveryMetadata(regionDiscoveryMetadata) { - this.regionUsed = regionDiscoveryMetadata.region_used; - this.regionSource = regionDiscoveryMetadata.region_source; - this.regionOutcome = regionDiscoveryMetadata.region_outcome; - } - /** - * Set cache outcome - */ - setCacheOutcome(cacheOutcome) { - this.cacheOutcome = cacheOutcome; - } - setNativeBrokerErrorCode(errorCode) { - const lastRequests = this.getLastRequests(); - lastRequests.nativeBrokerErrorCode = errorCode; - this.cacheManager.setServerTelemetry(this.telemetryCacheKey, lastRequests, this.correlationId); - } - getNativeBrokerErrorCode() { - return this.getLastRequests().nativeBrokerErrorCode; - } - clearNativeBrokerErrorCode() { - const lastRequests = this.getLastRequests(); - delete lastRequests.nativeBrokerErrorCode; - this.cacheManager.setServerTelemetry(this.telemetryCacheKey, lastRequests, this.correlationId); - } - static makeExtraSkuString(params) { - return makeExtraSkuString(params); - } -} - -exports.AADAuthorityConstants = AADAuthorityConstants; -exports.AADServerParamKeys = AADServerParamKeys; -exports.AccountEntity = AccountEntity; -exports.AuthError = AuthError; -exports.AuthErrorCodes = AuthErrorCodes; -exports.AuthErrorMessage = AuthErrorMessage; -exports.AuthToken = AuthToken; -exports.AuthenticationHeaderParser = AuthenticationHeaderParser; -exports.AuthenticationScheme = AuthenticationScheme; -exports.Authority = Authority; -exports.AuthorityFactory = AuthorityFactory; -exports.AuthorityType = AuthorityType; -exports.AuthorizationCodeClient = AuthorizationCodeClient; -exports.AzureCloudInstance = AzureCloudInstance; -exports.BaseClient = BaseClient; -exports.CacheAccountType = CacheAccountType; -exports.CacheError = CacheError; -exports.CacheErrorCodes = CacheErrorCodes; -exports.CacheHelpers = CacheHelpers; -exports.CacheManager = CacheManager; -exports.CacheOutcome = CacheOutcome; -exports.CacheType = CacheType; -exports.CcsCredentialType = CcsCredentialType; -exports.ClaimsRequestKeys = ClaimsRequestKeys; -exports.ClientAssertionUtils = ClientAssertionUtils; -exports.ClientAuthError = ClientAuthError; -exports.ClientAuthErrorCodes = ClientAuthErrorCodes; -exports.ClientAuthErrorMessage = ClientAuthErrorMessage; -exports.ClientConfigurationError = ClientConfigurationError; -exports.ClientConfigurationErrorCodes = ClientConfigurationErrorCodes; -exports.ClientConfigurationErrorMessage = ClientConfigurationErrorMessage; -exports.CodeChallengeMethodValues = CodeChallengeMethodValues; -exports.Constants = Constants; -exports.CredentialType = CredentialType; -exports.DEFAULT_CRYPTO_IMPLEMENTATION = DEFAULT_CRYPTO_IMPLEMENTATION; -exports.DEFAULT_SYSTEM_OPTIONS = DEFAULT_SYSTEM_OPTIONS; -exports.DEFAULT_TOKEN_RENEWAL_OFFSET_SEC = DEFAULT_TOKEN_RENEWAL_OFFSET_SEC; -exports.DefaultStorageClass = DefaultStorageClass; -exports.Errors = Errors; -exports.GrantType = GrantType; -exports.HeaderNames = HeaderNames; -exports.HttpStatus = HttpStatus; -exports.IntFields = IntFields; -exports.InteractionRequiredAuthError = InteractionRequiredAuthError; -exports.InteractionRequiredAuthErrorCodes = InteractionRequiredAuthErrorCodes; -exports.InteractionRequiredAuthErrorMessage = InteractionRequiredAuthErrorMessage; -exports.JsonWebTokenTypes = JsonWebTokenTypes; -exports.Logger = Logger; -exports.NetworkError = NetworkError; -exports.OIDC_DEFAULT_SCOPES = OIDC_DEFAULT_SCOPES; -exports.ONE_DAY_IN_MS = ONE_DAY_IN_MS; -exports.PasswordGrantConstants = PasswordGrantConstants; -exports.PerformanceEventAbbreviations = PerformanceEventAbbreviations; -exports.PerformanceEventStatus = PerformanceEventStatus; -exports.PerformanceEvents = PerformanceEvents; -exports.PersistentCacheKeys = PersistentCacheKeys; -exports.PopTokenGenerator = PopTokenGenerator; -exports.PromptValue = PromptValue; -exports.ProtocolMode = ProtocolMode; -exports.ProtocolUtils = ProtocolUtils; -exports.RefreshTokenClient = RefreshTokenClient; -exports.RequestParameterBuilder = RequestParameterBuilder; -exports.ResponseHandler = ResponseHandler; -exports.ResponseMode = ResponseMode; -exports.ScopeSet = ScopeSet; -exports.ServerError = ServerError; -exports.ServerResponseType = ServerResponseType; -exports.ServerTelemetryManager = ServerTelemetryManager; -exports.SilentFlowClient = SilentFlowClient; -exports.StringUtils = StringUtils; -exports.StubbedNetworkModule = StubbedNetworkModule; -exports.THE_FAMILY_ID = THE_FAMILY_ID; -exports.ThrottlingConstants = ThrottlingConstants; -exports.ThrottlingUtils = ThrottlingUtils; -exports.TimeUtils = TimeUtils; -exports.TokenCacheContext = TokenCacheContext; -exports.UrlString = UrlString; -exports.UrlUtils = UrlUtils; -exports.buildAccountToCache = buildAccountToCache; -exports.buildClientInfo = buildClientInfo; -exports.buildClientInfoFromHomeAccountId = buildClientInfoFromHomeAccountId; -exports.buildStaticAuthorityOptions = buildStaticAuthorityOptions; -exports.buildTenantProfile = buildTenantProfile; -exports.createAuthError = createAuthError; -exports.createCacheError = createCacheError; -exports.createClientAuthError = createClientAuthError; -exports.createClientConfigurationError = createClientConfigurationError; -exports.createInteractionRequiredAuthError = createInteractionRequiredAuthError; -exports.createNetworkError = createNetworkError; -exports.formatAuthorityUri = formatAuthorityUri; -exports.getClientAssertion = getClientAssertion; -exports.getTenantIdFromIdTokenClaims = getTenantIdFromIdTokenClaims; -exports.invoke = invoke; -exports.invokeAsync = invokeAsync; -exports.tenantIdMatchesHomeTenant = tenantIdMatchesHomeTenant; -exports.updateAccountTenantProfileData = updateAccountTenantProfileData; -exports.version = version; -//# sourceMappingURL=index-node-CebvEPer.js.map diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/index-node-CebvEPer.js.map b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/index-node-CebvEPer.js.map deleted file mode 100644 index 22f9686..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/index-node-CebvEPer.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index-node-CebvEPer.js","sources":["../../src/utils/Constants.ts","../../src/error/AuthErrorCodes.ts","../../src/error/AuthError.ts","../../src/error/ClientAuthErrorCodes.ts","../../src/error/ClientAuthError.ts","../../src/account/AuthToken.ts","../../src/authority/AuthorityType.ts","../../src/authority/OpenIdConfigResponse.ts","../../src/error/ClientConfigurationErrorCodes.ts","../../src/error/ClientConfigurationError.ts","../../src/utils/StringUtils.ts","../../src/utils/UrlUtils.ts","../../src/url/UrlString.ts","../../src/authority/AuthorityMetadata.ts","../../src/authority/ProtocolMode.ts","../../src/authority/AuthorityOptions.ts","../../src/authority/CloudInstanceDiscoveryResponse.ts","../../src/authority/CloudInstanceDiscoveryErrorResponse.ts","../../src/telemetry/performance/PerformanceEvent.ts","../../src/utils/FunctionWrappers.ts","../../src/authority/RegionDiscovery.ts","../../src/utils/TimeUtils.ts","../../src/cache/utils/CacheHelpers.ts","../../src/authority/Authority.ts","../../src/authority/AuthorityFactory.ts","../../src/constants/AADServerParamKeys.ts","../../src/crypto/ICrypto.ts","../../src/logger/Logger.ts","../../src/packageMetadata.ts","../../src/request/ScopeSet.ts","../../src/account/ClientInfo.ts","../../src/account/AccountInfo.ts","../../src/account/TokenClaims.ts","../../src/cache/entities/AccountEntity.ts","../../src/error/CacheErrorCodes.ts","../../src/error/CacheError.ts","../../src/cache/CacheManager.ts","../../src/config/ClientConfiguration.ts","../../src/account/CcsCredential.ts","../../src/request/RequestValidator.ts","../../src/request/RequestParameterBuilder.ts","../../src/error/ServerError.ts","../../src/network/ThrottlingUtils.ts","../../src/error/NetworkError.ts","../../src/client/BaseClient.ts","../../src/error/InteractionRequiredAuthErrorCodes.ts","../../src/error/InteractionRequiredAuthError.ts","../../src/utils/ProtocolUtils.ts","../../src/crypto/PopTokenGenerator.ts","../../src/cache/persistence/TokenCacheContext.ts","../../src/response/ResponseHandler.ts","../../src/utils/ClientAssertionUtils.ts","../../src/client/AuthorizationCodeClient.ts","../../src/client/RefreshTokenClient.ts","../../src/client/SilentFlowClient.ts","../../src/network/INetworkModule.ts","../../src/request/AuthenticationHeaderParser.ts","../../src/telemetry/server/ServerTelemetryManager.ts"],"sourcesContent":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null],"names":["CLIENT_INFO","AuthErrorCodes.unexpectedError","AuthErrorCodes.postRequestFailed","ClientAuthErrorCodes.clientInfoDecodingError","ClientAuthErrorCodes.clientInfoEmptyError","ClientAuthErrorCodes.tokenParsingError","ClientAuthErrorCodes.nullOrEmptyToken","ClientAuthErrorCodes.endpointResolutionError","ClientAuthErrorCodes.networkError","ClientAuthErrorCodes.openIdConfigError","ClientAuthErrorCodes.hashNotDeserialized","ClientAuthErrorCodes.invalidState","ClientAuthErrorCodes.stateMismatch","ClientAuthErrorCodes.stateNotFound","ClientAuthErrorCodes.nonceMismatch","ClientAuthErrorCodes.authTimeNotFound","ClientAuthErrorCodes.maxAgeTranspired","ClientAuthErrorCodes.multipleMatchingTokens","ClientAuthErrorCodes.multipleMatchingAccounts","ClientAuthErrorCodes.multipleMatchingAppMetadata","ClientAuthErrorCodes.requestCannotBeMade","ClientAuthErrorCodes.cannotRemoveEmptyScope","ClientAuthErrorCodes.cannotAppendScopeSet","ClientAuthErrorCodes.emptyInputScopeSet","ClientAuthErrorCodes.deviceCodePollingCancelled","ClientAuthErrorCodes.deviceCodeExpired","ClientAuthErrorCodes.deviceCodeUnknownError","ClientAuthErrorCodes.noAccountInSilentRequest","ClientAuthErrorCodes.invalidCacheRecord","ClientAuthErrorCodes.invalidCacheEnvironment","ClientAuthErrorCodes.noAccountFound","ClientAuthErrorCodes.noCryptoObject","ClientAuthErrorCodes.unexpectedCredentialType","ClientAuthErrorCodes.invalidAssertion","ClientAuthErrorCodes.invalidClientCredential","ClientAuthErrorCodes.tokenRefreshRequired","ClientAuthErrorCodes.userTimeoutReached","ClientAuthErrorCodes.tokenClaimsCnfRequiredForSignedJwt","ClientAuthErrorCodes.authorizationCodeMissingFromServerResponse","ClientAuthErrorCodes.bindingKeyNotRemoved","ClientAuthErrorCodes.endSessionEndpointNotSupported","ClientAuthErrorCodes.keyIdMissing","ClientAuthErrorCodes.noNetworkConnectivity","ClientAuthErrorCodes.userCanceled","ClientAuthErrorCodes.missingTenantIdError","ClientAuthErrorCodes.methodNotImplemented","ClientAuthErrorCodes.nestedAppAuthBridgeDisabled","ClientConfigurationErrorCodes.redirectUriEmpty","ClientConfigurationErrorCodes.claimsRequestParsingError","ClientConfigurationErrorCodes.authorityUriInsecure","ClientConfigurationErrorCodes.urlParseError","ClientConfigurationErrorCodes.urlEmptyError","ClientConfigurationErrorCodes.emptyInputScopesError","ClientConfigurationErrorCodes.invalidPromptValue","ClientConfigurationErrorCodes.invalidClaims","ClientConfigurationErrorCodes.tokenRequestEmpty","ClientConfigurationErrorCodes.logoutRequestEmpty","ClientConfigurationErrorCodes.invalidCodeChallengeMethod","ClientConfigurationErrorCodes.pkceParamsMissing","ClientConfigurationErrorCodes.invalidCloudDiscoveryMetadata","ClientConfigurationErrorCodes.invalidAuthorityMetadata","ClientConfigurationErrorCodes.untrustedAuthority","ClientConfigurationErrorCodes.missingSshJwk","ClientConfigurationErrorCodes.missingSshKid","ClientConfigurationErrorCodes.missingNonceAuthenticationHeader","ClientConfigurationErrorCodes.invalidAuthenticationHeader","ClientConfigurationErrorCodes.cannotSetOIDCOptions","ClientConfigurationErrorCodes.cannotAllowNativeBroker","ClientConfigurationErrorCodes.authorityMismatch","UrlUtils.getDeserializedResponse","TimeUtils.nowSeconds","CacheHelpers.generateAuthorityMetadataExpiresAt","CacheHelpers.updateAuthorityEndpointMetadata","CacheHelpers.isAuthorityMetadataExpired","CacheHelpers.updateCloudDiscoveryMetadata","LogLevel","CacheErrorCodes.cacheQuotaExceeded","CacheErrorCodes.cacheErrorUnknown","AADServerParamKeys.CLIENT_ID","AADServerParamKeys.BROKER_CLIENT_ID","AADServerParamKeys.REDIRECT_URI","AADServerParamKeys.RESPONSE_TYPE","AADServerParamKeys.RESPONSE_MODE","AADServerParamKeys.NATIVE_BROKER","AADServerParamKeys.SCOPE","AADServerParamKeys.POST_LOGOUT_URI","AADServerParamKeys.ID_TOKEN_HINT","AADServerParamKeys.DOMAIN_HINT","AADServerParamKeys.LOGIN_HINT","AADServerParamKeys.SID","AADServerParamKeys.CLAIMS","AADServerParamKeys.CLIENT_REQUEST_ID","AADServerParamKeys.X_CLIENT_SKU","AADServerParamKeys.X_CLIENT_VER","AADServerParamKeys.X_CLIENT_OS","AADServerParamKeys.X_CLIENT_CPU","AADServerParamKeys.X_APP_NAME","AADServerParamKeys.X_APP_VER","AADServerParamKeys.PROMPT","AADServerParamKeys.STATE","AADServerParamKeys.NONCE","AADServerParamKeys.CODE_CHALLENGE","AADServerParamKeys.CODE_CHALLENGE_METHOD","AADServerParamKeys.CODE","AADServerParamKeys.DEVICE_CODE","AADServerParamKeys.REFRESH_TOKEN","AADServerParamKeys.CODE_VERIFIER","AADServerParamKeys.CLIENT_SECRET","AADServerParamKeys.CLIENT_ASSERTION","AADServerParamKeys.CLIENT_ASSERTION_TYPE","AADServerParamKeys.OBO_ASSERTION","AADServerParamKeys.REQUESTED_TOKEN_USE","AADServerParamKeys.GRANT_TYPE","AADServerParamKeys.TOKEN_TYPE","AADServerParamKeys.REQ_CNF","AADServerParamKeys.X_CLIENT_CURR_TELEM","AADServerParamKeys.X_CLIENT_LAST_TELEM","AADServerParamKeys.X_MS_LIB_CAPABILITY","AADServerParamKeys.LOGOUT_HINT","AADServerParamKeys.BROKER_REDIRECT_URI","InteractionRequiredAuthErrorCodes.interactionRequired","InteractionRequiredAuthErrorCodes.consentRequired","InteractionRequiredAuthErrorCodes.loginRequired","InteractionRequiredAuthErrorCodes.badToken","InteractionRequiredAuthErrorCodes.noTokensFound","InteractionRequiredAuthErrorCodes.nativeAccountUnavailable","InteractionRequiredAuthErrorCodes.refreshTokenExpired","CacheHelpers.createIdTokenEntity","CacheHelpers.createAccessTokenEntity","CacheHelpers.createRefreshTokenEntity","AADServerParamKeys.RETURN_SPA_CODE","TimeUtils.isTokenExpired","TimeUtils.wasClockTurnedBack"],"mappings":";;;;AAAA;;;AAGG;AAEU,MAAA,SAAS,GAAG;AACrB,IAAA,YAAY,EAAE,SAAS;AACvB,IAAA,GAAG,EAAE,gBAAgB;;AAErB,IAAA,YAAY,EAAE,MAAM;;AAEpB,IAAA,iBAAiB,EAAE,2CAA2C;AAC9D,IAAA,sBAAsB,EAAE,2BAA2B;AACnD,IAAA,qBAAqB,EAAE,QAAQ;;AAE/B,IAAA,IAAI,EAAE,MAAM;AACZ,IAAA,IAAI,EAAE,QAAQ;;AAEd,IAAA,4BAA4B,EACxB,qGAAqG;;AAEzG,IAAA,aAAa,EAAE,gBAAgB;AAC/B,IAAA,wBAAwB,EAAE,kBAAkB;;AAE5C,IAAA,cAAc,EAAE,GAAG;;AAEnB,IAAA,UAAU,EAAE,YAAY;;AAExB,IAAA,MAAM,EAAE,QAAQ;;AAEhB,IAAA,aAAa,EAAE,sCAAsC;;AAErD,IAAA,YAAY,EAAE,QAAQ;AACtB,IAAA,aAAa,EAAE,SAAS;AACxB,IAAA,oBAAoB,EAAE,gBAAgB;AACtC,IAAA,WAAW,EAAE,OAAO;;AAEpB,IAAA,kBAAkB,EAAE,MAAM;AAC1B,IAAA,eAAe,EAAE,oBAAoB;AACrC,IAAA,aAAa,EAAE,eAAe;AAC9B,IAAA,sBAAsB,EAAE,UAAU;AAClC,IAAA,0BAA0B,EAAE,MAAM;AAClC,IAAA,qBAAqB,EAAE,iDAAiD;AACxE,IAAA,qBAAqB,EAAE,uBAAuB;AAC9C,IAAA,WA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ACL;IAED,wBAAwB,GAAA;AACpB,QAAA,OAAO,IAAI,CAAC,eAAe,EAAE,CAAC,qBAAqB,CAAC;KACvD;IAED,0BAA0B,GAAA;AACtB,QAAA,MAAM,YAAY,GAAG,IAAI,CAAC,eAAe,EAAE,CAAC;QAC5C,OAAO,YAAY,CAAC,qBAAqB,CAAC;AAC1C,QAAA,IAAI,CAAC,YAAY,CAAC,kBAAkB,CAChC,IAAI,CAAC,iBAAiB,EACtB,YAAY,EACZ,IAAI,CAAC,aAAa,CACrB,CAAC;KACL;IAED,OAAO,kBAAkB,CAAC,MAAiB,EAAA;AACvC,QAAA,OAAO,kBAAkB,CAAC,MAAM,CAAC,CAAC;KACrC;AACJ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/index-node.cjs b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/index-node.cjs deleted file mode 100644 index 870fccd..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/index-node.cjs +++ /dev/null @@ -1,105 +0,0 @@ -/*! @azure/msal-common v14.16.1 2025-08-05 */ -'use strict'; -'use strict'; - -var indexNode = require('./index-node-CebvEPer.js'); - - - -exports.AADAuthorityConstants = indexNode.AADAuthorityConstants; -exports.AADServerParamKeys = indexNode.AADServerParamKeys; -exports.AccountEntity = indexNode.AccountEntity; -exports.AuthError = indexNode.AuthError; -exports.AuthErrorCodes = indexNode.AuthErrorCodes; -exports.AuthErrorMessage = indexNode.AuthErrorMessage; -exports.AuthToken = indexNode.AuthToken; -exports.AuthenticationHeaderParser = indexNode.AuthenticationHeaderParser; -exports.AuthenticationScheme = indexNode.AuthenticationScheme; -exports.Authority = indexNode.Authority; -exports.AuthorityFactory = indexNode.AuthorityFactory; -exports.AuthorityType = indexNode.AuthorityType; -exports.AuthorizationCodeClient = indexNode.AuthorizationCodeClient; -exports.AzureCloudInstance = indexNode.AzureCloudInstance; -exports.BaseClient = indexNode.BaseClient; -exports.CacheAccountType = indexNode.CacheAccountType; -exports.CacheError = indexNode.CacheError; -exports.CacheErrorCodes = indexNode.CacheErrorCodes; -exports.CacheHelpers = indexNode.CacheHelpers; -exports.CacheManager = indexNode.CacheManager; -exports.CacheOutcome = indexNode.CacheOutcome; -exports.CacheType = indexNode.CacheType; -exports.CcsCredentialType = indexNode.CcsCredentialType; -exports.ClaimsRequestKeys = indexNode.ClaimsRequestKeys; -exports.ClientAssertionUtils = indexNode.ClientAssertionUtils; -exports.ClientAuthError = indexNode.ClientAuthError; -exports.ClientAuthErrorCodes = indexNode.ClientAuthErrorCodes; -exports.ClientAuthErrorMessage = indexNode.ClientAuthErrorMessage; -exports.ClientConfigurationError = indexNode.ClientConfigurationError; -exports.ClientConfigurationErrorCodes = indexNode.ClientConfigurationErrorCodes; -exports.ClientConfigurationErrorMessage = indexNode.ClientConfigurationErrorMessage; -exports.CodeChallengeMethodValues = indexNode.CodeChallengeMethodValues; -exports.Constants = indexNode.Constants; -exports.CredentialType = indexNode.CredentialType; -exports.DEFAULT_CRYPTO_IMPLEMENTATION = indexNode.DEFAULT_CRYPTO_IMPLEMENTATION; -exports.DEFAULT_SYSTEM_OPTIONS = indexNode.DEFAULT_SYSTEM_OPTIONS; -exports.DEFAULT_TOKEN_RENEWAL_OFFSET_SEC = indexNode.DEFAULT_TOKEN_RENEWAL_OFFSET_SEC; -exports.DefaultStorageClass = indexNode.DefaultStorageClass; -exports.Errors = indexNode.Errors; -exports.GrantType = indexNode.GrantType; -exports.HeaderNames = indexNode.HeaderNames; -exports.HttpStatus = indexNode.HttpStatus; -exports.InteractionRequiredAuthError = indexNode.InteractionRequiredAuthError; -exports.InteractionRequiredAuthErrorCodes = indexNode.InteractionRequiredAuthErrorCodes; -exports.InteractionRequiredAuthErrorMessage = indexNode.InteractionRequiredAuthErrorMessage; -exports.JsonWebTokenTypes = indexNode.JsonWebTokenTypes; -Object.defineProperty(exports, "LogLevel", { - enumerable: true, - get: function () { return indexNode.LogLevel; } -}); -exports.Logger = indexNode.Logger; -exports.NetworkError = indexNode.NetworkError; -exports.OIDC_DEFAULT_SCOPES = indexNode.OIDC_DEFAULT_SCOPES; -exports.ONE_DAY_IN_MS = indexNode.ONE_DAY_IN_MS; -exports.PasswordGrantConstants = indexNode.PasswordGrantConstants; -exports.PersistentCacheKeys = indexNode.PersistentCacheKeys; -exports.PromptValue = indexNode.PromptValue; -exports.ProtocolMode = indexNode.ProtocolMode; -exports.ProtocolUtils = indexNode.ProtocolUtils; -exports.RefreshTokenClient = indexNode.RefreshTokenClient; -exports.RequestParameterBuilder = indexNode.RequestParameterBuilder; -exports.ResponseHandler = indexNode.ResponseHandler; -exports.ResponseMode = indexNode.ResponseMode; -exports.ScopeSet = indexNode.ScopeSet; -exports.ServerError = indexNode.ServerError; -exports.ServerResponseType = indexNode.ServerResponseType; -exports.ServerTelemetryManager = indexNode.ServerTelemetryManager; -exports.SilentFlowClient = indexNode.SilentFlowClient; -exports.StringUtils = indexNode.StringUtils; -exports.StubbedNetworkModule = indexNode.StubbedNetworkModule; -exports.THE_FAMILY_ID = indexNode.THE_FAMILY_ID; -exports.ThrottlingConstants = indexNode.ThrottlingConstants; -exports.ThrottlingUtils = indexNode.ThrottlingUtils; -exports.TimeUtils = indexNode.TimeUtils; -exports.TokenCacheContext = indexNode.TokenCacheContext; -exports.UrlString = indexNode.UrlString; -exports.UrlUtils = indexNode.UrlUtils; -exports.buildAccountToCache = indexNode.buildAccountToCache; -exports.buildClientInfo = indexNode.buildClientInfo; -exports.buildClientInfoFromHomeAccountId = indexNode.buildClientInfoFromHomeAccountId; -exports.buildStaticAuthorityOptions = indexNode.buildStaticAuthorityOptions; -exports.buildTenantProfile = indexNode.buildTenantProfile; -exports.createAuthError = indexNode.createAuthError; -exports.createCacheError = indexNode.createCacheError; -exports.createClientAuthError = indexNode.createClientAuthError; -exports.createClientConfigurationError = indexNode.createClientConfigurationError; -exports.createInteractionRequiredAuthError = indexNode.createInteractionRequiredAuthError; -exports.createNetworkError = indexNode.createNetworkError; -exports.formatAuthorityUri = indexNode.formatAuthorityUri; -exports.getClientAssertion = indexNode.getClientAssertion; -exports.getTenantIdFromIdTokenClaims = indexNode.getTenantIdFromIdTokenClaims; -exports.invoke = indexNode.invoke; -exports.invokeAsync = indexNode.invokeAsync; -exports.tenantIdMatchesHomeTenant = indexNode.tenantIdMatchesHomeTenant; -exports.updateAccountTenantProfileData = indexNode.updateAccountTenantProfileData; -exports.version = indexNode.version; -//# sourceMappingURL=index-node.cjs.map diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/index-node.cjs.map b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/index-node.cjs.map deleted file mode 100644 index b54ce34..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/index-node.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index-node.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/index.cjs b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/index.cjs deleted file mode 100644 index 4912562..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/index.cjs +++ /dev/null @@ -1,113 +0,0 @@ -/*! @azure/msal-common v14.16.1 2025-08-05 */ -'use strict'; -'use strict'; - -var indexNode = require('./index-node-CebvEPer.js'); -var indexBrowser = require('./index-browser.cjs'); - - - -exports.AADAuthorityConstants = indexNode.AADAuthorityConstants; -exports.AADServerParamKeys = indexNode.AADServerParamKeys; -exports.AccountEntity = indexNode.AccountEntity; -exports.AuthError = indexNode.AuthError; -exports.AuthErrorCodes = indexNode.AuthErrorCodes; -exports.AuthErrorMessage = indexNode.AuthErrorMessage; -exports.AuthToken = indexNode.AuthToken; -exports.AuthenticationHeaderParser = indexNode.AuthenticationHeaderParser; -exports.AuthenticationScheme = indexNode.AuthenticationScheme; -exports.Authority = indexNode.Authority; -exports.AuthorityFactory = indexNode.AuthorityFactory; -exports.AuthorityType = indexNode.AuthorityType; -exports.AuthorizationCodeClient = indexNode.AuthorizationCodeClient; -exports.AzureCloudInstance = indexNode.AzureCloudInstance; -exports.BaseClient = indexNode.BaseClient; -exports.CacheAccountType = indexNode.CacheAccountType; -exports.CacheError = indexNode.CacheError; -exports.CacheErrorCodes = indexNode.CacheErrorCodes; -exports.CacheHelpers = indexNode.CacheHelpers; -exports.CacheManager = indexNode.CacheManager; -exports.CacheOutcome = indexNode.CacheOutcome; -exports.CacheType = indexNode.CacheType; -exports.CcsCredentialType = indexNode.CcsCredentialType; -exports.ClaimsRequestKeys = indexNode.ClaimsRequestKeys; -exports.ClientAssertionUtils = indexNode.ClientAssertionUtils; -exports.ClientAuthError = indexNode.ClientAuthError; -exports.ClientAuthErrorCodes = indexNode.ClientAuthErrorCodes; -exports.ClientAuthErrorMessage = indexNode.ClientAuthErrorMessage; -exports.ClientConfigurationError = indexNode.ClientConfigurationError; -exports.ClientConfigurationErrorCodes = indexNode.ClientConfigurationErrorCodes; -exports.ClientConfigurationErrorMessage = indexNode.ClientConfigurationErrorMessage; -exports.CodeChallengeMethodValues = indexNode.CodeChallengeMethodValues; -exports.Constants = indexNode.Constants; -exports.CredentialType = indexNode.CredentialType; -exports.DEFAULT_CRYPTO_IMPLEMENTATION = indexNode.DEFAULT_CRYPTO_IMPLEMENTATION; -exports.DEFAULT_SYSTEM_OPTIONS = indexNode.DEFAULT_SYSTEM_OPTIONS; -exports.DEFAULT_TOKEN_RENEWAL_OFFSET_SEC = indexNode.DEFAULT_TOKEN_RENEWAL_OFFSET_SEC; -exports.DefaultStorageClass = indexNode.DefaultStorageClass; -exports.Errors = indexNode.Errors; -exports.GrantType = indexNode.GrantType; -exports.HeaderNames = indexNode.HeaderNames; -exports.HttpStatus = indexNode.HttpStatus; -exports.IntFields = indexNode.IntFields; -exports.InteractionRequiredAuthError = indexNode.InteractionRequiredAuthError; -exports.InteractionRequiredAuthErrorCodes = indexNode.InteractionRequiredAuthErrorCodes; -exports.InteractionRequiredAuthErrorMessage = indexNode.InteractionRequiredAuthErrorMessage; -exports.JsonWebTokenTypes = indexNode.JsonWebTokenTypes; -Object.defineProperty(exports, "LogLevel", { - enumerable: true, - get: function () { return indexNode.LogLevel; } -}); -exports.Logger = indexNode.Logger; -exports.NetworkError = indexNode.NetworkError; -exports.OIDC_DEFAULT_SCOPES = indexNode.OIDC_DEFAULT_SCOPES; -exports.ONE_DAY_IN_MS = indexNode.ONE_DAY_IN_MS; -exports.PasswordGrantConstants = indexNode.PasswordGrantConstants; -exports.PerformanceEventStatus = indexNode.PerformanceEventStatus; -exports.PerformanceEvents = indexNode.PerformanceEvents; -exports.PersistentCacheKeys = indexNode.PersistentCacheKeys; -exports.PopTokenGenerator = indexNode.PopTokenGenerator; -exports.PromptValue = indexNode.PromptValue; -exports.ProtocolMode = indexNode.ProtocolMode; -exports.ProtocolUtils = indexNode.ProtocolUtils; -exports.RefreshTokenClient = indexNode.RefreshTokenClient; -exports.RequestParameterBuilder = indexNode.RequestParameterBuilder; -exports.ResponseHandler = indexNode.ResponseHandler; -exports.ResponseMode = indexNode.ResponseMode; -exports.ScopeSet = indexNode.ScopeSet; -exports.ServerError = indexNode.ServerError; -exports.ServerResponseType = indexNode.ServerResponseType; -exports.ServerTelemetryManager = indexNode.ServerTelemetryManager; -exports.SilentFlowClient = indexNode.SilentFlowClient; -exports.StringUtils = indexNode.StringUtils; -exports.StubbedNetworkModule = indexNode.StubbedNetworkModule; -exports.THE_FAMILY_ID = indexNode.THE_FAMILY_ID; -exports.ThrottlingConstants = indexNode.ThrottlingConstants; -exports.ThrottlingUtils = indexNode.ThrottlingUtils; -exports.TimeUtils = indexNode.TimeUtils; -exports.TokenCacheContext = indexNode.TokenCacheContext; -exports.UrlString = indexNode.UrlString; -exports.UrlUtils = indexNode.UrlUtils; -exports.buildAccountToCache = indexNode.buildAccountToCache; -exports.buildClientInfo = indexNode.buildClientInfo; -exports.buildClientInfoFromHomeAccountId = indexNode.buildClientInfoFromHomeAccountId; -exports.buildStaticAuthorityOptions = indexNode.buildStaticAuthorityOptions; -exports.buildTenantProfile = indexNode.buildTenantProfile; -exports.createAuthError = indexNode.createAuthError; -exports.createCacheError = indexNode.createCacheError; -exports.createClientAuthError = indexNode.createClientAuthError; -exports.createClientConfigurationError = indexNode.createClientConfigurationError; -exports.createInteractionRequiredAuthError = indexNode.createInteractionRequiredAuthError; -exports.createNetworkError = indexNode.createNetworkError; -exports.formatAuthorityUri = indexNode.formatAuthorityUri; -exports.getClientAssertion = indexNode.getClientAssertion; -exports.getTenantIdFromIdTokenClaims = indexNode.getTenantIdFromIdTokenClaims; -exports.invoke = indexNode.invoke; -exports.invokeAsync = indexNode.invokeAsync; -exports.tenantIdMatchesHomeTenant = indexNode.tenantIdMatchesHomeTenant; -exports.updateAccountTenantProfileData = indexNode.updateAccountTenantProfileData; -exports.version = indexNode.version; -exports.JoseHeader = indexBrowser.JoseHeader; -exports.PerformanceClient = indexBrowser.PerformanceClient; -exports.StubPerformanceClient = indexBrowser.StubPerformanceClient; -//# sourceMappingURL=index.cjs.map diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/index.cjs.map b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/index.cjs.map deleted file mode 100644 index 7ff39c1..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/index.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/package.json b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/package.json deleted file mode 100644 index 0292b99..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/package.json +++ /dev/null @@ -1 +0,0 @@ -{"type":"commonjs"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/account/AccountInfo.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/account/AccountInfo.d.ts deleted file mode 100644 index dd065ae..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/account/AccountInfo.d.ts +++ /dev/null @@ -1,68 +0,0 @@ -import { TokenClaims } from "./TokenClaims.js"; -/** - * Account object with the following signature: - * - homeAccountId - Home account identifier for this account object - * - environment - Entity which issued the token represented by the domain of the issuer (e.g. login.microsoftonline.com) - * - tenantId - Full tenant or organizational id that this account belongs to - * - username - preferred_username claim of the id_token that represents this account - * - localAccountId - Local, tenant-specific account identifer for this account object, usually used in legacy cases - * - name - Full name for the account, including given name and family name - * - idToken - raw ID token - * - idTokenClaims - Object contains claims from ID token - * - nativeAccountId - The user's native account ID - * - tenantProfiles - Map of tenant profile objects for each tenant that the account has authenticated with in the browser - */ -export type AccountInfo = { - homeAccountId: string; - environment: string; - tenantId: string; - username: string; - localAccountId: string; - name?: string; - idToken?: string; - idTokenClaims?: TokenClaims & { - [key: string]: string | number | string[] | object | undefined | unknown; - }; - nativeAccountId?: string; - authorityType?: string; - tenantProfiles?: Map; -}; -/** - * Account details that vary across tenants for the same user - */ -export type TenantProfile = Pick & { - /** - * - isHomeTenant - True if this is the home tenant profile of the account, false if it's a guest tenant profile - */ - isHomeTenant?: boolean; -}; -export type ActiveAccountFilters = { - homeAccountId: string; - localAccountId: string; - tenantId?: string; - lastUpdatedAt?: string; -}; -/** - * Returns true if tenantId matches the utid portion of homeAccountId - * @param tenantId - * @param homeAccountId - * @returns - */ -export declare function tenantIdMatchesHomeTenant(tenantId?: string, homeAccountId?: string): boolean; -/** - * Build tenant profile - * @param homeAccountId - Home account identifier for this account object - * @param localAccountId - Local account identifer for this account object - * @param tenantId - Full tenant or organizational id that this account belongs to - * @param idTokenClaims - Claims from the ID token - * @returns - */ -export declare function buildTenantProfile(homeAccountId: string, localAccountId: string, tenantId: string, idTokenClaims?: TokenClaims): TenantProfile; -/** - * Replaces account info that varies by tenant profile sourced from the ID token claims passed in with the tenant-specific account info - * @param baseAccountInfo - * @param idTokenClaims - * @returns - */ -export declare function updateAccountTenantProfileData(baseAccountInfo: AccountInfo, tenantProfile?: TenantProfile, idTokenClaims?: TokenClaims, idTokenSecret?: string): AccountInfo; -//# sourceMappingURL=AccountInfo.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/account/AccountInfo.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/account/AccountInfo.d.ts.map deleted file mode 100644 index d6b77c8..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/account/AccountInfo.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AccountInfo.d.ts","sourceRoot":"","sources":["../../../src/account/AccountInfo.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,WAAW,GAAG;IACtB,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,cAAc,EAAE,MAAM,CAAC;IACvB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,aAAa,CAAC,EAAE,WAAW,GAAG;QAC1B,CAAC,GAAG,EAAE,MAAM,GACN,MAAM,GACN,MAAM,GACN,MAAM,EAAE,GACR,MAAM,GACN,SAAS,GACT,OAAO,CAAC;KACjB,CAAC;IACF,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,cAAc,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;CAC/C,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,IAAI,CAC5B,WAAW,EACX,UAAU,GAAG,gBAAgB,GAAG,MAAM,CACzC,GAAG;IACA;;OAEG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;CAC1B,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;IAC/B,aAAa,EAAE,MAAM,CAAC;IACtB,cAAc,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,aAAa,CAAC,EAAE,MAAM,CAAC;CAC1B,CAAC;AAEF;;;;;GAKG;AACH,wBAAgB,yBAAyB,CACrC,QAAQ,CAAC,EAAE,MAAM,EACjB,aAAa,CAAC,EAAE,MAAM,GACvB,OAAO,CAMT;AAED;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAC9B,aAAa,EAAE,MAAM,EACrB,cAAc,EAAE,MAAM,EACtB,QAAQ,EAAE,MAAM,EAChB,aAAa,CAAC,EAAE,WAAW,GAC5B,aAAa,CAyBf;AAED;;;;;GAKG;AACH,wBAAgB,8BAA8B,CAC1C,eAAe,EAAE,WAAW,EAC5B,aAAa,CAAC,EAAE,aAAa,EAC7B,aAAa,CAAC,EAAE,WAAW,EAC3B,aAAa,CAAC,EAAE,MAAM,GACvB,WAAW,CAgCb"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/account/AuthToken.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/account/AuthToken.d.ts deleted file mode 100644 index 3065249..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/account/AuthToken.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { TokenClaims } from "./TokenClaims.js"; -/** - * Extract token by decoding the rawToken - * - * @param encodedToken - */ -export declare function extractTokenClaims(encodedToken: string, base64Decode: (input: string) => string): TokenClaims; -/** - * decode a JWT - * - * @param authToken - */ -export declare function getJWSPayload(authToken: string): string; -/** - * Determine if the token's max_age has transpired - */ -export declare function checkMaxAge(authTime: number, maxAge: number): void; -//# sourceMappingURL=AuthToken.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/account/AuthToken.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/account/AuthToken.d.ts.map deleted file mode 100644 index f2da9b2..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/account/AuthToken.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AuthToken.d.ts","sourceRoot":"","sources":["../../../src/account/AuthToken.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAM/C;;;;GAIG;AACH,wBAAgB,kBAAkB,CAC9B,YAAY,EAAE,MAAM,EACpB,YAAY,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,GACxC,WAAW,CAWb;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAkBvD;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,CAUlE"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/account/CcsCredential.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/account/CcsCredential.d.ts deleted file mode 100644 index 6b38952..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/account/CcsCredential.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -export type CcsCredential = { - credential: string; - type: CcsCredentialType; -}; -export declare const CcsCredentialType: { - readonly HOME_ACCOUNT_ID: "home_account_id"; - readonly UPN: "UPN"; -}; -export type CcsCredentialType = (typeof CcsCredentialType)[keyof typeof CcsCredentialType]; -//# sourceMappingURL=CcsCredential.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/account/CcsCredential.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/account/CcsCredential.d.ts.map deleted file mode 100644 index b23f776..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/account/CcsCredential.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"CcsCredential.d.ts","sourceRoot":"","sources":["../../../src/account/CcsCredential.ts"],"names":[],"mappings":"AAKA,MAAM,MAAM,aAAa,GAAG;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,iBAAiB,CAAC;CAC3B,CAAC;AAEF,eAAO,MAAM,iBAAiB;;;CAGpB,CAAC;AACX,MAAM,MAAM,iBAAiB,GACzB,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,OAAO,iBAAiB,CAAC,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/account/ClientCredentials.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/account/ClientCredentials.d.ts deleted file mode 100644 index 4943680..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/account/ClientCredentials.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -export type ClientAssertionConfig = { - clientId: string; - tokenEndpoint?: string; -}; -export type ClientAssertionCallback = (config: ClientAssertionConfig) => Promise; -/** - * Client Assertion credential for Confidential Clients - */ -export type ClientAssertion = { - assertion: string | ClientAssertionCallback; - assertionType: string; -}; -/** - * Client Credentials set for Confidential Clients - */ -export type ClientCredentials = { - clientSecret?: string; - clientAssertion?: ClientAssertion; -}; -//# sourceMappingURL=ClientCredentials.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/account/ClientCredentials.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/account/ClientCredentials.d.ts.map deleted file mode 100644 index 1377af1..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/account/ClientCredentials.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ClientCredentials.d.ts","sourceRoot":"","sources":["../../../src/account/ClientCredentials.ts"],"names":[],"mappings":"AAKA,MAAM,MAAM,qBAAqB,GAAG;IAChC,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,CAAC,EAAE,MAAM,CAAC;CAC1B,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG,CAClC,MAAM,EAAE,qBAAqB,KAC5B,OAAO,CAAC,MAAM,CAAC,CAAC;AAErB;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG;IAC1B,SAAS,EAAE,MAAM,GAAG,uBAAuB,CAAC;IAC5C,aAAa,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC5B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,eAAe,CAAC,EAAE,eAAe,CAAC;CACrC,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/account/ClientInfo.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/account/ClientInfo.d.ts deleted file mode 100644 index cdc0b50..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/account/ClientInfo.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -/** - * Client info object which consists of two IDs. Need to add more info here. - */ -export type ClientInfo = { - uid: string; - utid: string; -}; -/** - * Function to build a client info object from server clientInfo string - * @param rawClientInfo - * @param crypto - */ -export declare function buildClientInfo(rawClientInfo: string, base64Decode: (input: string) => string): ClientInfo; -/** - * Function to build a client info object from cached homeAccountId string - * @param homeAccountId - */ -export declare function buildClientInfoFromHomeAccountId(homeAccountId: string): ClientInfo; -//# sourceMappingURL=ClientInfo.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/account/ClientInfo.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/account/ClientInfo.d.ts.map deleted file mode 100644 index 1340e58..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/account/ClientInfo.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ClientInfo.d.ts","sourceRoot":"","sources":["../../../src/account/ClientInfo.ts"],"names":[],"mappings":"AAWA;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,eAAe,CAC3B,aAAa,EAAE,MAAM,EACrB,YAAY,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,GACxC,UAAU,CAaZ;AAED;;;GAGG;AACH,wBAAgB,gCAAgC,CAC5C,aAAa,EAAE,MAAM,GACtB,UAAU,CAiBZ"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/account/TokenClaims.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/account/TokenClaims.d.ts deleted file mode 100644 index 797b7c3..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/account/TokenClaims.d.ts +++ /dev/null @@ -1,84 +0,0 @@ -/** - * Type which describes Id Token claims known by MSAL. - */ -export type TokenClaims = { - /** - * Audience - */ - aud?: string; - /** - * Issuer - */ - iss?: string; - /** - * Issued at - */ - iat?: number; - /** - * Not valid before - */ - nbf?: number; - /** - * Immutable object identifier, this ID uniquely identifies the user across applications - */ - oid?: string; - /** - * Immutable subject identifier, this is a pairwise identifier - it is unique to a particular application ID - */ - sub?: string; - /** - * Users' tenant or '9188040d-6c67-4c5b-b112-36a304b66dad' for personal accounts. - */ - tid?: string; - /** - * Trusted Framework Policy (B2C) The name of the policy that was used to acquire the ID token. - */ - tfp?: string; - /** - * Authentication Context Class Reference (B2C) Used only with older policies. - */ - acr?: string; - ver?: string; - upn?: string; - preferred_username?: string; - login_hint?: string; - emails?: string[]; - name?: string; - nonce?: string; - /** - * Expiration - */ - exp?: number; - home_oid?: string; - sid?: string; - cloud_instance_host_name?: string; - cnf?: { - kid: string; - }; - x5c_ca?: string[]; - ts?: number; - at?: string; - u?: string; - p?: string; - m?: string; - roles?: string[]; - amr?: string[]; - idp?: string; - auth_time?: number; - /** - * Region of the resource tenant - */ - tenant_region_scope?: string; - tenant_region_sub_scope?: string; -}; -/** - * Gets tenantId from available ID token claims to set as credential realm with the following precedence: - * 1. tid - if the token is acquired from an Azure AD tenant tid will be present - * 2. tfp - if the token is acquired from a modern B2C tenant tfp should be present - * 3. acr - if the token is acquired from a legacy B2C tenant acr should be present - * Downcased to match the realm case-insensitive comparison requirements - * @param idTokenClaims - * @returns - */ -export declare function getTenantIdFromIdTokenClaims(idTokenClaims?: TokenClaims): string | null; -//# sourceMappingURL=TokenClaims.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/account/TokenClaims.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/account/TokenClaims.d.ts.map deleted file mode 100644 index a3c6fef..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/account/TokenClaims.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"TokenClaims.d.ts","sourceRoot":"","sources":["../../../src/account/TokenClaims.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG;IACtB;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAA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AC;AAEF;;;;;;;;GAQG;AACH,wBAAgB,4BAA4B,CACxC,aAAa,CAAC,EAAE,WAAW,GAC5B,MAAM,GAAG,IAAI,CAOf"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/authority/Authority.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/authority/Authority.d.ts deleted file mode 100644 index 4cd38c4..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/authority/Authority.d.ts +++ /dev/null @@ -1,255 +0,0 @@ -import { AuthorityType } from "./AuthorityType.js"; -import { OpenIdConfigResponse } from "./OpenIdConfigResponse.js"; -import { IUri } from "../url/IUri.js"; -import { INetworkModule } from "../network/INetworkModule.js"; -import { ProtocolMode } from "./ProtocolMode.js"; -import { ICacheManager } from "../cache/interface/ICacheManager.js"; -import { AuthorityOptions, StaticAuthorityOptions } from "./AuthorityOptions.js"; -import { CloudDiscoveryMetadata } from "./CloudDiscoveryMetadata.js"; -import { RegionDiscoveryMetadata } from "./RegionDiscoveryMetadata.js"; -import { AzureCloudOptions } from "../config/ClientConfiguration.js"; -import { Logger } from "../logger/Logger.js"; -import { IPerformanceClient } from "../telemetry/performance/IPerformanceClient.js"; -/** - * The authority class validates the authority URIs used by the user, and retrieves the OpenID Configuration Data from the - * endpoint. It will store the pertinent config data in this object for use during token calls. - * @internal - */ -export declare class Authority { - private _canonicalAuthority; - private _canonicalAuthorityUrlComponents; - protected networkInterface: INetworkModule; - protected cacheManager: ICacheManager; - private authorityOptions; - private metadata; - private regionDiscovery; - regionDiscoveryMetadata: RegionDiscoveryMetadata; - private logger; - protected performanceClient: IPerformanceClient | undefined; - protected correlationId: string; - private managedIdentity; - private static reservedTenantDomains; - constructor(authority: string, networkInterface: INetworkModule, cacheManager: ICacheManager, authorityOptions: AuthorityOptions, logger: Logger, correlationId: string, performanceClient?: IPerformanceClient, managedIdentity?: boolean); - /** - * Get {@link AuthorityType} - * @param authorityUri {@link IUri} - * @private - */ - private getAuthorityType; - get authorityType(): AuthorityType; - /** - * ProtocolMode enum representing the way endpoints are constructed. - */ - get protocolMode(): ProtocolMode; - /** - * Returns authorityOptions which can be used to reinstantiate a new authority instance - */ - get options(): AuthorityOptions; - /** - * A URL that is the authority set by the developer - */ - get canonicalAuthority(): string; - /** - * Sets canonical authority. - */ - set canonicalAuthority(url: string); - /** - * Get authority components. - */ - get canonicalAuthorityUrlComponents(): IUri; - /** - * Get hostname and port i.e. login.microsoftonline.com - */ - get hostnameAndPort(): string; - /** - * Get tenant for authority. - */ - get tenant(): string; - /** - * OAuth /authorize endpoint for requests - */ - get authorizationEndpoint(): string; - /** - * OAuth /token endpoint for requests - */ - get tokenEndpoint(): string; - get deviceCodeEndpoint(): string; - /** - * OAuth logout endpoint for requests - */ - get endSessionEndpoint(): string; - /** - * OAuth issuer for requests - */ - get selfSignedJwtAudience(): string; - /** - * Jwks_uri for token signing keys - */ - get jwksUri(): string; - /** - * Returns a flag indicating that tenant name can be replaced in authority {@link IUri} - * @param authorityUri {@link IUri} - * @private - */ - private canReplaceTenant; - /** - * Replaces tenant in url path with current tenant. Defaults to common. - * @param urlString - */ - private replaceTenant; - /** - * Replaces path such as tenant or policy with the current tenant or policy. - * @param urlString - */ - private replacePath; - /** - * The default open id configuration endpoint for any canonical authority. - */ - protected get defaultOpenIdConfigurationEndpoint(): string; - /** - * Boolean that returns whether or not tenant discovery has been completed. - */ - discoveryComplete(): boolean; - /** - * Perform endpoint discovery to discover aliases, preferred_cache, preferred_network - * and the /authorize, /token and logout endpoints. - */ - resolveEndpointsAsync(): Promise; - /** - * Returns metadata entity from cache if it exists, otherwiser returns a new metadata entity built - * from the configured canonical authority - * @returns - */ - private getCurrentMetadataEntity; - /** - * Updates cached metadata based on metadata source and sets the instance's metadata - * property to the same value - * @param metadataEntity - * @param cloudDiscoverySource - * @param endpointMetadataResult - */ - private updateCachedMetadata; - /** - * Update AuthorityMetadataEntity with new endpoints and return where the information came from - * @param metadataEntity - */ - private updateEndpointMetadata; - /** - * Updates endpoint metadata from local sources and returns where the information was retrieved from and the metadata config - * response if the source is hardcoded metadata - * @param metadataEntity - * @returns - */ - private updateEndpointMetadataFromLocalSources; - /** - * Compares the number of url components after the domain to determine if the cached - * authority metadata can be used for the requested authority. Protects against same domain different - * authority such as login.microsoftonline.com/tenant and login.microsoftonline.com/tfp/tenant/policy - * @param metadataEntity - */ - private isAuthoritySameType; - /** - * Parse authorityMetadata config option - */ - private getEndpointMetadataFromConfig; - /** - * Gets OAuth endpoints from the given OpenID configuration endpoint. - * - * @param hasHardcodedMetadata boolean - */ - private getEndpointMetadataFromNetwork; - /** - * Get OAuth endpoints for common authorities. - */ - private getEndpointMetadataFromHardcodedValues; - /** - * Update the retrieved metadata with regional information. - * User selected Azure region will be used if configured. - */ - private updateMetadataWithRegionalInformation; - /** - * Updates the AuthorityMetadataEntity with new aliases, preferred_network and preferred_cache - * and returns where the information was retrieved from - * @param metadataEntity - * @returns AuthorityMetadataSource - */ - private updateCloudDiscoveryMetadata; - private updateCloudDiscoveryMetadataFromLocalSources; - /** - * Parse cloudDiscoveryMetadata config or check knownAuthorities - */ - private getCloudDiscoveryMetadataFromConfig; - /** - * Called to get metadata from network if CloudDiscoveryMetadata was not populated by config - * - * @param hasHardcodedMetadata boolean - */ - private getCloudDiscoveryMetadataFromNetwork; - /** - * Helper function to determine if this host is included in the knownAuthorities config option - */ - private isInKnownAuthorities; - /** - * helper function to populate the authority based on azureCloudOptions - * @param authorityString - * @param azureCloudOptions - */ - static generateAuthority(authorityString: string, azureCloudOptions?: AzureCloudOptions): string; - /** - * Creates cloud discovery metadata object from a given host - * @param host - */ - static createCloudDiscoveryMetadataFromHost(host: string): CloudDiscoveryMetadata; - /** - * helper function to generate environment from authority object - */ - getPreferredCache(): string; - /** - * Returns whether or not the provided host is an alias of this authority instance - * @param host - */ - isAlias(host: string): boolean; - /** - * Returns whether or not the provided host is an alias of a known Microsoft authority for purposes of endpoint discovery - * @param host - */ - isAliasOfKnownMicrosoftAuthority(host: string): boolean; - /** - * Checks whether the provided host is that of a public cloud authority - * - * @param authority string - * @returns bool - */ - static isPublicCloudAuthority(host: string): boolean; - /** - * Rebuild the authority string with the region - * - * @param host string - * @param region string - */ - static buildRegionalAuthorityString(host: string, region: string, queryString?: string): string; - /** - * Replace the endpoints in the metadata object with their regional equivalents. - * - * @param metadata OpenIdConfigResponse - * @param azureRegion string - */ - static replaceWithRegionalInformation(metadata: OpenIdConfigResponse, azureRegion: string): OpenIdConfigResponse; - /** - * Transform CIAM_AUTHORIY as per the below rules: - * If no path segments found and it is a CIAM authority (hostname ends with .ciamlogin.com), then transform it - * - * NOTE: The transformation path should go away once STS supports CIAM with the format: `tenantIdorDomain.ciamlogin.com` - * `ciamlogin.com` can also change in the future and we should accommodate the same - * - * @param authority - */ - static transformCIAMAuthority(authority: string): string; -} -/** - * Extract tenantId from authority - */ -export declare function getTenantFromAuthorityString(authority: string): string | undefined; -export declare function formatAuthorityUri(authorityUri: string): string; -export declare function buildStaticAuthorityOptions(authOptions: Partial): StaticAuthorityOptions; -//# sourceMappingURL=Authority.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/authority/Authority.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/authority/Authority.d.ts.map deleted file mode 100644 index 1cc5c83..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/authority/Authority.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Authority.d.ts","sourceRoot":"","sources":["../../../src/authority/Authority.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAEH,oBAAoB,EACvB,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAKtC,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAiB9D,OAAO,EAAE,YAAY,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sB,CAoBxB"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/authority/AuthorityFactory.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/authority/AuthorityFactory.d.ts deleted file mode 100644 index 3118eea..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/authority/AuthorityFactory.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { Authority } from "./Authority.js"; -import { INetworkModule } from "../network/INetworkModule.js"; -import { ICacheManager } from "../cache/interface/ICacheManager.js"; -import { AuthorityOptions } from "./AuthorityOptions.js"; -import { Logger } from "../logger/Logger.js"; -import { IPerformanceClient } from "../telemetry/performance/IPerformanceClient.js"; -/** - * Create an authority object of the correct type based on the url - * Performs basic authority validation - checks to see if the authority is of a valid type (i.e. aad, b2c, adfs) - * - * Also performs endpoint discovery. - * - * @param authorityUri - * @param networkClient - * @param protocolMode - * @internal - */ -export declare function createDiscoveredInstance(authorityUri: string, networkClient: INetworkModule, cacheManager: ICacheManager, authorityOptions: AuthorityOptions, logger: Logger, correlationId: string, performanceClient?: IPerformanceClient): Promise; -//# sourceMappingURL=AuthorityFactory.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/authority/AuthorityFactory.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/authority/AuthorityFactory.d.ts.map deleted file mode 100644 index 64ae111..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/authority/AuthorityFactory.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AuthorityFactory.d.ts","sourceRoot":"","sources":["../../../src/authority/AuthorityFactory.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,SAAS,EAAsB,MAAM,gBAAgB,CAAC;AAC/D,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAK9D,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,kBAAkB,EAAE,MAAM,gDAAgD,CAAC;AAIpF;;;;;;;;;;GAUG;AACH,wBAAsB,wBAAwB,CAC1C,YAAY,EAAE,MAAM,EACpB,aAAa,EAAE,cAAc,EAC7B,YAAY,EAAE,aAAa,EAC3B,gBAAgB,EAAE,gBAAgB,EAClC,MAAM,EAAE,MAAM,EACd,aAAa,EAAE,MAAM,EACrB,iBAAiB,CAAC,EAAE,kBAAkB,GACvC,OAAO,CAAC,SAAS,CAAC,CAoCpB"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/authority/AuthorityMetadata.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/authority/AuthorityMetadata.d.ts deleted file mode 100644 index 4884a49..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/authority/AuthorityMetadata.d.ts +++ /dev/null @@ -1,44 +0,0 @@ -import { Logger } from "../logger/Logger.js"; -import { AuthorityMetadataSource } from "../utils/Constants.js"; -import { StaticAuthorityOptions } from "./AuthorityOptions.js"; -import { CloudDiscoveryMetadata } from "./CloudDiscoveryMetadata.js"; -import { CloudInstanceDiscoveryResponse } from "./CloudInstanceDiscoveryResponse.js"; -import { OpenIdConfigResponse } from "./OpenIdConfigResponse.js"; -type RawMetadata = { - endpointMetadata: { - [key: string]: OpenIdConfigResponse; - }; - instanceDiscoveryMetadata: CloudInstanceDiscoveryResponse; -}; -export declare const rawMetdataJSON: RawMetadata; -export declare const EndpointMetadata: { - [key: string]: OpenIdConfigResponse; -}; -export declare const InstanceDiscoveryMetadata: CloudInstanceDiscoveryResponse; -export declare const InstanceDiscoveryMetadataAliases: Set; -/** - * Attempts to get an aliases array from the static authority metadata sources based on the canonical authority host - * @param staticAuthorityOptions - * @param logger - * @returns - */ -export declare function getAliasesFromStaticSources(staticAuthorityOptions: StaticAuthorityOptions, logger?: Logger): string[]; -/** - * Returns aliases for from the raw cloud discovery metadata passed in - * @param authorityHost - * @param rawCloudDiscoveryMetadata - * @returns - */ -export declare function getAliasesFromMetadata(authorityHost?: string, cloudDiscoveryMetadata?: CloudDiscoveryMetadata[], source?: AuthorityMetadataSource, logger?: Logger): string[] | null; -/** - * Get cloud discovery metadata for common authorities - */ -export declare function getCloudDiscoveryMetadataFromHardcodedValues(authorityHost: string): CloudDiscoveryMetadata | null; -/** - * Searches instance discovery network response for the entry that contains the host in the aliases list - * @param response - * @param authority - */ -export declare function getCloudDiscoveryMetadataFromNetworkResponse(response: CloudDiscoveryMetadata[], authorityHost: string): CloudDiscoveryMetadata | null; -export {}; -//# sourceMappingURL=AuthorityMetadata.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/authority/AuthorityMetadata.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/authority/AuthorityMetadata.d.ts.map deleted file mode 100644 index ce2b9c6..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/authority/AuthorityMetadata.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AuthorityMetadata.d.ts","sourceRoot":"","sources":["../../../src/authority/AuthorityMetadata.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAE7C,OAAO,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAChE,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,8BAA8B,EAAE,MAAM,qCAAqC,CAAC;AACrF,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAEjE,KAAK,WAAW,GAAG;IACf,gBAAgB,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,oBAAoB,CAAA;KAAE,CAAC;IAC1D,yBAAyB,EAAE,8BAA8B,CAAC;CAC7D,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,WA8E5B,CAAC;AAEF,eAAO,MAAM,gBAAgB;;CAAkC,CAAC;AAChE,eAAO,MAAM,yBAAyB,gCACM,CAAC;AAE7C,eAAO,MAAM,gCAAgC,EAAE,GAAG,CAAC,MAAM,CAAa,CAAC;AASvE;;;;;GAKG;AACH,wBAAgB,2BAA2B,CACvC,sBAAsB,EAAE,sBAAsB,EAC9C,MAAM,CAAC,EAAE,MAAM,GAChB,MAAM,EAAE,CAwBV;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAClC,aAAa,CAAC,EAAE,MAAM,EACtB,sBAAsB,CAAC,EAAE,sBAAsB,EAAE,EACjD,MAAM,CAAC,EAAE,uBAAuB,EAChC,MAAM,CAAC,EAAE,MAAM,GAChB,MAAM,EAAE,GAAG,IAAI,CAqBjB;AAED;;GAEG;AACH,wBAAgB,4CAA4C,CACxD,aAAa,EAAE,MAAM,GACtB,sBAAsB,GAAG,IAAI,CAM/B;AAED;;;;GAIG;AACH,wBAAgB,4CAA4C,CACxD,QAAQ,EAAE,sBAAsB,EAAE,EAClC,aAAa,EAAE,MAAM,GACtB,sBAAsB,GAAG,IAAI,CAS/B"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/authority/AuthorityOptions.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/authority/AuthorityOptions.d.ts deleted file mode 100644 index f0617ca..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/authority/AuthorityOptions.d.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { ProtocolMode } from "./ProtocolMode.js"; -import { OIDCOptions } from "./OIDCOptions.js"; -import { AzureRegionConfiguration } from "./AzureRegionConfiguration.js"; -import { CloudInstanceDiscoveryResponse } from "./CloudInstanceDiscoveryResponse.js"; -export type AuthorityOptions = { - protocolMode: ProtocolMode; - OIDCOptions?: OIDCOptions | null; - knownAuthorities: Array; - cloudDiscoveryMetadata: string; - authorityMetadata: string; - skipAuthorityMetadataCache?: boolean; - azureRegionConfiguration?: AzureRegionConfiguration; - authority?: string; -}; -export type StaticAuthorityOptions = Partial> & { - canonicalAuthority?: string; - cloudDiscoveryMetadata?: CloudInstanceDiscoveryResponse; -}; -export declare const AzureCloudInstance: { - readonly None: "none"; - readonly AzurePublic: "https://login.microsoftonline.com"; - readonly AzurePpe: "https://login.windows-ppe.net"; - readonly AzureChina: "https://login.chinacloudapi.cn"; - readonly AzureGermany: "https://login.microsoftonline.de"; - readonly AzureUsGovernment: "https://login.microsoftonline.us"; -}; -export type AzureCloudInstance = (typeof AzureCloudInstance)[keyof typeof AzureCloudInstance]; -//# sourceMappingURL=AuthorityOptions.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/authority/AuthorityOptions.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/authority/AuthorityOptions.d.ts.map deleted file mode 100644 index ff19271..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/authority/AuthorityOptions.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AuthorityOptions.d.ts","sourceRoot":"","sources":["../../../src/authority/AuthorityOptions.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,EAAE,8BAA8B,EAAE,MAAM,qCAAqC,CAAC;AAErF,MAAM,MAAM,gBAAgB,GAAG;IAC3B,YAAY,EAAE,YAAY,CAAC;IAC3B,WAAW,CAAC,EAAE,WAAW,GAAG,IAAI,CAAC;IACjC,gBAAgB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAChC,sBAAsB,EAAE,MAAM,CAAC;IAC/B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,0BAA0B,CAAC,EAAE,OAAO,CAAC;IACrC,wBAAwB,CAAC,EAAE,wBAAwB,CAAC;IACpD,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG,OAAO,CACxC,IAAI,CAAC,gBAAgB,EAAE,kBAAkB,CAAC,CAC7C,GAAG;IACA,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,sBAAsB,CAAC,EAAE,8BAA8B,CAAC;CAC3D,CAAC;AAEF,eAAO,MAAM,kBAAkB;;;;;;;CAkBrB,CAAC;AACX,MAAM,MAAM,kBAAkB,GAC1B,CAAC,OAAO,kBAAkB,CAAC,CAAC,MAAM,OAAO,kBAAkB,CAAC,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/authority/AuthorityType.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/authority/AuthorityType.d.ts deleted file mode 100644 index e05171a..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/authority/AuthorityType.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -/** - * Authority types supported by MSAL. - */ -export declare const AuthorityType: { - readonly Default: 0; - readonly Adfs: 1; - readonly Dsts: 2; - readonly Ciam: 3; -}; -export type AuthorityType = (typeof AuthorityType)[keyof typeof AuthorityType]; -//# sourceMappingURL=AuthorityType.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/authority/AuthorityType.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/authority/AuthorityType.d.ts.map deleted file mode 100644 index e21a7ca..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/authority/AuthorityType.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AuthorityType.d.ts","sourceRoot":"","sources":["../../../src/authority/AuthorityType.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,eAAO,MAAM,aAAa;;;;;CAKhB,CAAC;AACX,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,OAAO,aAAa,CAAC,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/authority/AzureRegion.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/authority/AzureRegion.d.ts deleted file mode 100644 index 91d1032..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/authority/AzureRegion.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export type AzureRegion = string; -//# sourceMappingURL=AzureRegion.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/authority/AzureRegion.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/authority/AzureRegion.d.ts.map deleted file mode 100644 index 80b1550..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/authority/AzureRegion.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AzureRegion.d.ts","sourceRoot":"","sources":["../../../src/authority/AzureRegion.ts"],"names":[],"mappings":"AAMA,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/authority/AzureRegionConfiguration.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/authority/AzureRegionConfiguration.d.ts deleted file mode 100644 index 2aa1cd1..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/authority/AzureRegionConfiguration.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { AzureRegion } from "./AzureRegion.js"; -export type AzureRegionConfiguration = { - azureRegion?: AzureRegion; - environmentRegion: string | undefined; -}; -//# sourceMappingURL=AzureRegionConfiguration.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/authority/AzureRegionConfiguration.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/authority/AzureRegionConfiguration.d.ts.map deleted file mode 100644 index 7aaa7ff..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/authority/AzureRegionConfiguration.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AzureRegionConfiguration.d.ts","sourceRoot":"","sources":["../../../src/authority/AzureRegionConfiguration.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAO/C,MAAM,MAAM,wBAAwB,GAAG;IACnC,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,iBAAiB,EAAE,MAAM,GAAG,SAAS,CAAC;CACzC,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/authority/CloudDiscoveryMetadata.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/authority/CloudDiscoveryMetadata.d.ts deleted file mode 100644 index 40a752e..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/authority/CloudDiscoveryMetadata.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -export type CloudDiscoveryMetadata = { - preferred_network: string; - preferred_cache: string; - aliases: Array; -}; -//# sourceMappingURL=CloudDiscoveryMetadata.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/authority/CloudDiscoveryMetadata.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/authority/CloudDiscoveryMetadata.d.ts.map deleted file mode 100644 index a80a15d..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/authority/CloudDiscoveryMetadata.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"CloudDiscoveryMetadata.d.ts","sourceRoot":"","sources":["../../../src/authority/CloudDiscoveryMetadata.ts"],"names":[],"mappings":"AAKA,MAAM,MAAM,sBAAsB,GAAG;IACjC,iBAAiB,EAAE,MAAM,CAAC;IAC1B,eAAe,EAAE,MAAM,CAAC;IACxB,OAAO,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;CAC1B,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/authority/CloudInstanceDiscoveryErrorResponse.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/authority/CloudInstanceDiscoveryErrorResponse.d.ts deleted file mode 100644 index 1bdc4a5..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/authority/CloudInstanceDiscoveryErrorResponse.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * The OpenID Configuration Endpoint Response type. Used by the authority class to get relevant OAuth endpoints. - */ -export type CloudInstanceDiscoveryErrorResponse = { - error: String; - error_description: String; - error_codes?: Array; - timestamp?: String; - trace_id?: String; - correlation_id?: String; - error_uri?: String; -}; -export declare function isCloudInstanceDiscoveryErrorResponse(response: object): boolean; -//# sourceMappingURL=CloudInstanceDiscoveryErrorResponse.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/authority/CloudInstanceDiscoveryErrorResponse.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/authority/CloudInstanceDiscoveryErrorResponse.d.ts.map deleted file mode 100644 index 94eed45..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/authority/CloudInstanceDiscoveryErrorResponse.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"CloudInstanceDiscoveryErrorResponse.d.ts","sourceRoot":"","sources":["../../../src/authority/CloudInstanceDiscoveryErrorResponse.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,MAAM,MAAM,mCAAmC,GAAG;IAC9C,KAAK,EAAE,MAAM,CAAC;IACd,iBAAiB,EAAE,MAAM,CAAC;IAC1B,WAAW,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,wBAAgB,qCAAqC,CACjD,QAAQ,EAAE,MAAM,GACjB,OAAO,CAKT"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/authority/CloudInstanceDiscoveryResponse.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/authority/CloudInstanceDiscoveryResponse.d.ts deleted file mode 100644 index b89b93e..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/authority/CloudInstanceDiscoveryResponse.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { CloudDiscoveryMetadata } from "./CloudDiscoveryMetadata.js"; -/** - * The OpenID Configuration Endpoint Response type. Used by the authority class to get relevant OAuth endpoints. - */ -export type CloudInstanceDiscoveryResponse = { - tenant_discovery_endpoint: string; - metadata: Array; -}; -export declare function isCloudInstanceDiscoveryResponse(response: object): boolean; -//# sourceMappingURL=CloudInstanceDiscoveryResponse.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/authority/CloudInstanceDiscoveryResponse.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/authority/CloudInstanceDiscoveryResponse.d.ts.map deleted file mode 100644 index 7154557..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/authority/CloudInstanceDiscoveryResponse.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"CloudInstanceDiscoveryResponse.d.ts","sourceRoot":"","sources":["../../../src/authority/CloudInstanceDiscoveryResponse.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAErE;;GAEG;AACH,MAAM,MAAM,8BAA8B,GAAG;IACzC,yBAAyB,EAAE,MAAM,CAAC;IAClC,QAAQ,EAAE,KAAK,CAAC,sBAAsB,CAAC,CAAC;CAC3C,CAAC;AAEF,wBAAgB,gCAAgC,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAK1E"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/authority/ImdsOptions.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/authority/ImdsOptions.d.ts deleted file mode 100644 index 96c42ef..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/authority/ImdsOptions.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -export type ImdsOptions = { - headers?: { - Metadata: string; - }; -}; -//# sourceMappingURL=ImdsOptions.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/authority/ImdsOptions.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/authority/ImdsOptions.d.ts.map deleted file mode 100644 index 8b3538b..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/authority/ImdsOptions.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ImdsOptions.d.ts","sourceRoot":"","sources":["../../../src/authority/ImdsOptions.ts"],"names":[],"mappings":"AAKA,MAAM,MAAM,WAAW,GAAG;IACtB,OAAO,CAAC,EAAE;QACN,QAAQ,EAAE,MAAM,CAAC;KACpB,CAAC;CACL,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/authority/OIDCOptions.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/authority/OIDCOptions.d.ts deleted file mode 100644 index 60f8110..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/authority/OIDCOptions.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { ServerResponseType } from "../utils/Constants.js"; -/** - * Options for the OIDC protocol mode. - */ -export type OIDCOptions = { - serverResponseType?: ServerResponseType; - defaultScopes?: Array; -}; -//# sourceMappingURL=OIDCOptions.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/authority/OIDCOptions.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/authority/OIDCOptions.d.ts.map deleted file mode 100644 index 29d6fa1..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/authority/OIDCOptions.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"OIDCOptions.d.ts","sourceRoot":"","sources":["../../../src/authority/OIDCOptions.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAE3D;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG;IACtB,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;IACxC,aAAa,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;CACjC,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/authority/OpenIdConfigResponse.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/authority/OpenIdConfigResponse.d.ts deleted file mode 100644 index dbb3f33..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/authority/OpenIdConfigResponse.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -/** - * Tenant Discovery Response which contains the relevant OAuth endpoints and data needed for authentication and authorization. - */ -export type OpenIdConfigResponse = { - authorization_endpoint: string; - token_endpoint: string; - end_session_endpoint?: string; - issuer: string; - jwks_uri: string; -}; -export declare function isOpenIdConfigResponse(response: object): boolean; -//# sourceMappingURL=OpenIdConfigResponse.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/authority/OpenIdConfigResponse.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/authority/OpenIdConfigResponse.d.ts.map deleted file mode 100644 index faba86f..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/authority/OpenIdConfigResponse.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"OpenIdConfigResponse.d.ts","sourceRoot":"","sources":["../../../src/authority/OpenIdConfigResponse.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG;IAC/B,sBAAsB,EAAE,MAAM,CAAC;IAC/B,cAAc,EAAE,MAAM,CAAC;IACvB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAOhE"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/authority/ProtocolMode.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/authority/ProtocolMode.d.ts deleted file mode 100644 index 7b63cec..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/authority/ProtocolMode.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -/** - * Protocol modes supported by MSAL. - */ -export declare const ProtocolMode: { - readonly AAD: "AAD"; - readonly OIDC: "OIDC"; -}; -export type ProtocolMode = (typeof ProtocolMode)[keyof typeof ProtocolMode]; -//# sourceMappingURL=ProtocolMode.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/authority/ProtocolMode.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/authority/ProtocolMode.d.ts.map deleted file mode 100644 index 90b4fb8..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/authority/ProtocolMode.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ProtocolMode.d.ts","sourceRoot":"","sources":["../../../src/authority/ProtocolMode.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,eAAO,MAAM,YAAY;;;CAGf,CAAC;AACX,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,OAAO,YAAY,CAAC,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/authority/RegionDiscovery.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/authority/RegionDiscovery.d.ts deleted file mode 100644 index 6c78184..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/authority/RegionDiscovery.d.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { INetworkModule } from "../network/INetworkModule.js"; -import { RegionDiscoveryMetadata } from "./RegionDiscoveryMetadata.js"; -import { ImdsOptions } from "./ImdsOptions.js"; -import { IPerformanceClient } from "../telemetry/performance/IPerformanceClient.js"; -import { Logger } from "../logger/Logger.js"; -export declare class RegionDiscovery { - protected networkInterface: INetworkModule; - private logger; - protected performanceClient: IPerformanceClient | undefined; - protected correlationId: string | undefined; - protected static IMDS_OPTIONS: ImdsOptions; - constructor(networkInterface: INetworkModule, logger: Logger, performanceClient?: IPerformanceClient, correlationId?: string); - /** - * Detect the region from the application's environment. - * - * @returns Promise - */ - detectRegion(environmentRegion: string | undefined, regionDiscoveryMetadata: RegionDiscoveryMetadata): Promise; - /** - * Make the call to the IMDS endpoint - * - * @param imdsEndpointUrl - * @returns Promise> - */ - private getRegionFromIMDS; - /** - * Get the most recent version of the IMDS endpoint available - * - * @returns Promise - */ - private getCurrentVersion; -} -//# sourceMappingURL=RegionDiscovery.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/authority/RegionDiscovery.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/authority/RegionDiscovery.d.ts.map deleted file mode 100644 index f6d87d6..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/authority/RegionDiscovery.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"RegionDiscovery.d.ts","sourceRoot":"","sources":["../../../src/authority/RegionDiscovery.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAQ9D,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,gDAAgD,CAAC;AAGpF,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAE7C,qBAAa,eAAe;IAExB,SAAS,CAAC,gBAAgB,EAAE,cAAc,CAAC;IAE3C,OAAO,CAAC,MAAM,CAAS;IAEvB,SAAS,CAAC,iBAAiB,EAAE,kBAAkB,GAAG,SAAS,CAAC;IAE5D,SAAS,CAAC,aAAa,EAAE,MAAM,GAAG,SAAS,CAAC;IAE5C,SAAS,CAAC,MAAM,CAAC,YAAY,EAAE,WAAW,CAIxC;gBAGE,gBAAgB,EAAE,cAAc,EAChC,MAAM,EAAE,MAAM,EACd,iBAAiB,CAAC,EAAE,kBAAkB,EACtC,aAAa,CAAC,EAAE,MAAM;IAQ1B;;;;OAIG;IACU,YAAY,CACrB,iBAAiB,EAAE,MAAM,GAAG,SAAS,EACrC,uBAAuB,EAAE,uBAAuB,GACjD,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAoFzB;;;;;OAKG;YACW,iBAAiB;IAe/B;;;;OAIG;YACW,iBAAiB;CA6BlC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/authority/RegionDiscoveryMetadata.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/authority/RegionDiscoveryMetadata.d.ts deleted file mode 100644 index 359cf92..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/authority/RegionDiscoveryMetadata.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { RegionDiscoveryOutcomes, RegionDiscoverySources } from "../utils/Constants.js"; -export type RegionDiscoveryMetadata = { - region_used?: string; - region_source?: RegionDiscoverySources; - region_outcome?: RegionDiscoveryOutcomes; -}; -//# sourceMappingURL=RegionDiscoveryMetadata.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/authority/RegionDiscoveryMetadata.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/authority/RegionDiscoveryMetadata.d.ts.map deleted file mode 100644 index eba0c49..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/authority/RegionDiscoveryMetadata.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"RegionDiscoveryMetadata.d.ts","sourceRoot":"","sources":["../../../src/authority/RegionDiscoveryMetadata.ts"],"names":[],"mappings":"AAKA,OAAO,EACH,uBAAuB,EACvB,sBAAsB,EACzB,MAAM,uBAAuB,CAAC;AAE/B,MAAM,MAAM,uBAAuB,GAAG;IAClC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,sBAAsB,CAAC;IACvC,cAAc,CAAC,EAAE,uBAAuB,CAAC;CAC5C,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/broker/nativeBroker/INativeBrokerPlugin.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/broker/nativeBroker/INativeBrokerPlugin.d.ts deleted file mode 100644 index 58b4761..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/broker/nativeBroker/INativeBrokerPlugin.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -/// -/// -import { AccountInfo } from "../../account/AccountInfo.js"; -import { LoggerOptions } from "../../config/ClientConfiguration.js"; -import { NativeRequest } from "../../request/NativeRequest.js"; -import { NativeSignOutRequest } from "../../request/NativeSignOutRequest.js"; -import { AuthenticationResult } from "../../response/AuthenticationResult.js"; -export interface INativeBrokerPlugin { - isBrokerAvailable: boolean; - setLogger(loggerOptions: LoggerOptions): void; - getAccountById(accountId: string, correlationId: string): Promise; - getAllAccounts(clientId: string, correlationId: string): Promise; - acquireTokenSilent(request: NativeRequest): Promise; - acquireTokenInteractive(request: NativeRequest, windowHandle?: Buffer): Promise; - signOut(request: NativeSignOutRequest): Promise; -} -//# sourceMappingURL=INativeBrokerPlugin.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/broker/nativeBroker/INativeBrokerPlugin.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/broker/nativeBroker/INativeBrokerPlugin.d.ts.map deleted file mode 100644 index d4cee7b..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/broker/nativeBroker/INativeBrokerPlugin.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"INativeBrokerPlugin.d.ts","sourceRoot":"","sources":["../../../../src/broker/nativeBroker/INativeBrokerPlugin.ts"],"names":[],"mappings":";;AAKA,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAC/D,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAC7E,OAAO,EAAE,oBAAoB,EAAE,MAAM,wCAAwC,CAAC;AAE9E,MAAM,WAAW,mBAAmB;IAChC,iBAAiB,EAAE,OAAO,CAAC;IAC3B,SAAS,CAAC,aAAa,EAAE,aAAa,GAAG,IAAI,CAAC;IAC9C,cAAc,CACV,SAAS,EAAE,MAAM,EACjB,aAAa,EAAE,MAAM,GACtB,OAAO,CAAC,WAAW,CAAC,CAAC;IACxB,cAAc,CACV,QAAQ,EAAE,MAAM,EAChB,aAAa,EAAE,MAAM,GACtB,OAAO,CAAC,WAAW,EAAE,CAAC,CAAC;IAC1B,kBAAkB,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC;IAC1E,uBAAuB,CACnB,OAAO,EAAE,aAAa,EACtB,YAAY,CAAC,EAAE,MAAM,GACtB,OAAO,CAAC,oBAAoB,CAAC,CAAC;IACjC,OAAO,CAAC,OAAO,EAAE,oBAAoB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACzD"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/cache/CacheManager.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/cache/CacheManager.d.ts deleted file mode 100644 index 329f33a..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/cache/CacheManager.d.ts +++ /dev/null @@ -1,493 +0,0 @@ -import { AccountFilter, CredentialFilter, ValidCredentialType, AppMetadataFilter, AppMetadataCache, TokenKeys } from "./utils/CacheTypes.js"; -import { CacheRecord } from "./entities/CacheRecord.js"; -import { AccountEntity } from "./entities/AccountEntity.js"; -import { AccessTokenEntity } from "./entities/AccessTokenEntity.js"; -import { IdTokenEntity } from "./entities/IdTokenEntity.js"; -import { RefreshTokenEntity } from "./entities/RefreshTokenEntity.js"; -import { ICacheManager } from "./interface/ICacheManager.js"; -import { AccountInfo } from "../account/AccountInfo.js"; -import { AppMetadataEntity } from "./entities/AppMetadataEntity.js"; -import { ServerTelemetryEntity } from "./entities/ServerTelemetryEntity.js"; -import { ThrottlingEntity } from "./entities/ThrottlingEntity.js"; -import { ICrypto } from "../crypto/ICrypto.js"; -import { AuthorityMetadataEntity } from "./entities/AuthorityMetadataEntity.js"; -import { BaseAuthRequest } from "../request/BaseAuthRequest.js"; -import { Logger } from "../logger/Logger.js"; -import { StoreInCache } from "../request/StoreInCache.js"; -import { StaticAuthorityOptions } from "../authority/AuthorityOptions.js"; -import { IPerformanceClient } from "../telemetry/performance/IPerformanceClient.js"; -/** - * Interface class which implement cache storage functions used by MSAL to perform validity checks, and store tokens. - * @internal - */ -export declare abstract class CacheManager implements ICacheManager { - protected clientId: string; - protected cryptoImpl: ICrypto; - private commonLogger; - private staticAuthorityOptions?; - constructor(clientId: string, cryptoImpl: ICrypto, logger: Logger, staticAuthorityOptions?: StaticAuthorityOptions); - /** - * fetch the account entity from the platform cache - * @param accountKey - */ - abstract getAccount(accountKey: string, correlationId: string, logger?: Logger): AccountEntity | null; - /** - * Returns deserialized account if found in the cache, otherwiser returns null - */ - abstract getCachedAccountEntity(accountKey: string, correlationId: string): AccountEntity | null; - /** - * set account entity in the platform cache - * @param account - */ - abstract setAccount(account: AccountEntity, correlationId: string): void; - /** - * remove account entity from the platform cache if it's outdated - */ - abstract removeOutdatedAccount(accountKey: string, correlationId: string): void; - /** - * fetch the idToken entity from the platform cache - * @param idTokenKey - */ - abstract getIdTokenCredential(idTokenKey: string, correlationId: string): IdTokenEntity | null; - /** - * set idToken entity to the platform cache - * @param idToken - */ - abstract setIdTokenCredential(idToken: IdTokenEntity, correlationId: string): void; - /** - * fetch the idToken entity from the platform cache - * @param accessTokenKey - */ - abstract getAccessTokenCredential(accessTokenKey: string, correlationId: string): AccessTokenEntity | null; - /** - * set idToken entity to the platform cache - * @param accessToken - */ - abstract setAccessTokenCredential(accessToken: AccessTokenEntity, correlationId: string): void; - /** - * fetch the idToken entity from the platform cache - * @param refreshTokenKey - */ - abstract getRefreshTokenCredential(refreshTokenKey: string, correlationId: string): RefreshTokenEntity | null; - /** - * set idToken entity to the platform cache - * @param refreshToken - */ - abstract setRefreshTokenCredential(refreshToken: RefreshTokenEntity, correlationId: string): void; - /** - * fetch appMetadata entity from the platform cache - * @param appMetadataKey - */ - abstract getAppMetadata(appMetadataKey: string): AppMetadataEntity | null; - /** - * set appMetadata entity to the platform cache - * @param appMetadata - */ - abstract setAppMetadata(appMetadata: AppMetadataEntity, correlationId: string): void; - /** - * fetch server telemetry entity from the platform cache - * @param serverTelemetryKey - */ - abstract getServerTelemetry(serverTelemetryKey: string): ServerTelemetryEntity | null; - /** - * set server telemetry entity to the platform cache - * @param serverTelemetryKey - * @param serverTelemetry - */ - abstract setServerTelemetry(serverTelemetryKey: string, serverTelemetry: ServerTelemetryEntity, correlationId: string): void; - /** - * fetch cloud discovery metadata entity from the platform cache - * @param key - */ - abstract getAuthorityMetadata(key: string): AuthorityMetadataEntity | null; - /** - * - */ - abstract getAuthorityMetadataKeys(): Array; - /** - * set cloud discovery metadata entity to the platform cache - * @param key - * @param value - */ - abstract setAuthorityMetadata(key: string, value: AuthorityMetadataEntity): void; - /** - * fetch throttling entity from the platform cache - * @param throttlingCacheKey - */ - abstract getThrottlingCache(throttlingCacheKey: string): ThrottlingEntity | null; - /** - * set throttling entity to the platform cache - * @param throttlingCacheKey - * @param throttlingCache - */ - abstract setThrottlingCache(throttlingCacheKey: string, throttlingCache: ThrottlingEntity, correlationId: string): void; - /** - * Function to remove an item from cache given its key. - * @param key - */ - abstract removeItem(key: string, correlationId: string): void; - /** - * Function which retrieves all current keys from the cache. - */ - abstract getKeys(): string[]; - /** - * Function which retrieves all account keys from the cache - */ - abstract getAccountKeys(): string[]; - /** - * Function which retrieves all token keys from the cache - */ - abstract getTokenKeys(): TokenKeys; - /** - * Function which updates an outdated credential cache key - */ - abstract updateCredentialCacheKey(currentCacheKey: string, credential: ValidCredentialType, correlationId: string): string; - /** - * Returns all the accounts in the cache that match the optional filter. If no filter is provided, all accounts are returned. - * @param accountFilter - (Optional) filter to narrow down the accounts returned - * @returns Array of AccountInfo objects in cache - */ - getAllAccounts(correlationId: string, accountFilter?: AccountFilter): AccountInfo[]; - /** - * Gets first tenanted AccountInfo object found based on provided filters - */ - getAccountInfoFilteredBy(accountFilter: AccountFilter, correlationId: string): AccountInfo | null; - /** - * Returns a single matching - * @param accountFilter - * @returns - */ - getBaseAccountInfo(accountFilter: AccountFilter, correlationId: string): AccountInfo | null; - /** - * Matches filtered account entities with cached ID tokens that match the tenant profile-specific account filters - * and builds the account info objects from the matching ID token's claims - * @param cachedAccounts - * @param accountFilter - * @returns Array of AccountInfo objects that match account and tenant profile filters - */ - private buildTenantProfiles; - private getTenantedAccountInfoByFilter; - private getTenantProfilesFromAccountEntity; - private tenantProfileMatchesFilter; - private idTokenClaimsMatchTenantProfileFilter; - /** - * saves a cache record - * @param cacheRecord {CacheRecord} - * @param storeInCache {?StoreInCache} - * @param correlationId {?string} correlation id - */ - saveCacheRecord(cacheRecord: CacheRecord, correlationId: string, storeInCache?: StoreInCache): Promise; - /** - * saves access token credential - * @param credential - */ - private saveAccessToken; - /** - * Retrieve account entities matching all provided tenant-agnostic filters; if no filter is set, get all account entities in the cache - * Not checking for casing as keys are all generated in lower case, remember to convert to lower case if object properties are compared - * @param accountFilter - An object containing Account properties to filter by - */ - getAccountsFilteredBy(accountFilter: AccountFilter, correlationId: string): AccountEntity[]; - /** - * Returns true if the given key matches our account key schema. Also matches homeAccountId and/or tenantId if provided - * @param key - * @param homeAccountId - * @param tenantId - * @returns - */ - isAccountKey(key: string, homeAccountId?: string, tenantId?: string): boolean; - /** - * Returns true if the given key matches our credential key schema. - * @param key - */ - isCredentialKey(key: string): boolean; - /** - * Returns whether or not the given credential entity matches the filter - * @param entity - * @param filter - * @returns - */ - credentialMatchesFilter(entity: ValidCredentialType, filter: CredentialFilter): boolean; - /** - * retrieve appMetadata matching all provided filters; if no filter is set, get all appMetadata - * @param filter - */ - getAppMetadataFilteredBy(filter: AppMetadataFilter): AppMetadataCache; - /** - * retrieve authorityMetadata that contains a matching alias - * @param filter - */ - getAuthorityMetadataByAlias(host: string): AuthorityMetadataEntity | null; - /** - * Removes all accounts and related tokens from cache. - */ - removeAllAccounts(correlationId: string): Promise; - /** - * Removes the account and related tokens for a given account key - * @param account - */ - removeAccount(accountKey: string, correlationId: string): Promise; - /** - * Removes credentials associated with the provided account - * @param account - */ - removeAccountContext(account: AccountEntity, correlationId: string): Promise; - /** - * Migrates a single-tenant account and all it's associated alternate cross-tenant account objects in the - * cache into a condensed multi-tenant account object with tenant profiles. - * @param accountKey - * @param accountEntity - * @param logger - * @returns - */ - protected updateOutdatedCachedAccount(accountKey: string, accountEntity: AccountEntity | null, correlationId: string, logger?: Logger): AccountEntity | null; - /** - * returns a boolean if the given credential is removed - * @param credential - */ - removeAccessToken(key: string, correlationId: string): void; - /** - * Removes all app metadata objects from cache. - */ - removeAppMetadata(correlationId: string): boolean; - /** - * Retrieve AccountEntity from cache - * @param account - */ - readAccountFromCache(account: AccountInfo, correlationId: string): AccountEntity | null; - /** - * Retrieve IdTokenEntity from cache - * @param account {AccountInfo} - * @param tokenKeys {?TokenKeys} - * @param targetRealm {?string} - * @param performanceClient {?IPerformanceClient} - * @param correlationId {?string} - */ - getIdToken(account: AccountInfo, correlationId: string, tokenKeys?: TokenKeys, targetRealm?: string, performanceClient?: IPerformanceClient): IdTokenEntity | null; - /** - * Gets all idTokens matching the given filter - * @param filter - * @returns - */ - getIdTokensByFilter(filter: CredentialFilter, correlationId: string, tokenKeys?: TokenKeys): Map; - /** - * Validate the cache key against filter before retrieving and parsing cache value - * @param key - * @param filter - * @returns - */ - idTokenKeyMatchesFilter(inputKey: string, filter: CredentialFilter): boolean; - /** - * Removes idToken from the cache - * @param key - */ - removeIdToken(key: string, correlationId: string): void; - /** - * Removes refresh token from the cache - * @param key - */ - removeRefreshToken(key: string, correlationId: string): void; - /** - * Retrieve AccessTokenEntity from cache - * @param account {AccountInfo} - * @param request {BaseAuthRequest} - * @param tokenKeys {?TokenKeys} - * @param performanceClient {?IPerformanceClient} - * @param correlationId {?string} - */ - getAccessToken(account: AccountInfo, request: BaseAuthRequest, tokenKeys?: TokenKeys, targetRealm?: string, performanceClient?: IPerformanceClient): AccessTokenEntity | null; - /** - * Validate the cache key against filter before retrieving and parsing cache value - * @param key - * @param filter - * @param keyMustContainAllScopes - * @returns - */ - accessTokenKeyMatchesFilter(inputKey: string, filter: CredentialFilter, keyMustContainAllScopes: boolean): boolean; - /** - * Gets all access tokens matching the filter - * @param filter - * @returns - */ - getAccessTokensByFilter(filter: CredentialFilter, correlationId: string): AccessTokenEntity[]; - /** - * Helper to retrieve the appropriate refresh token from cache - * @param account {AccountInfo} - * @param familyRT {boolean} - * @param tokenKeys {?TokenKeys} - * @param performanceClient {?IPerformanceClient} - * @param correlationId {?string} - */ - getRefreshToken(account: AccountInfo, familyRT: boolean, correlationId: string, tokenKeys?: TokenKeys, performanceClient?: IPerformanceClient): RefreshTokenEntity | null; - /** - * Validate the cache key against filter before retrieving and parsing cache value - * @param key - * @param filter - */ - refreshTokenKeyMatchesFilter(inputKey: string, filter: CredentialFilter): boolean; - /** - * Retrieve AppMetadataEntity from cache - */ - readAppMetadataFromCache(environment: string): AppMetadataEntity | null; - /** - * Return the family_id value associated with FOCI - * @param environment - * @param clientId - */ - isAppMetadataFOCI(environment: string): boolean; - /** - * helper to match account ids - * @param value - * @param homeAccountId - */ - private matchHomeAccountId; - /** - * helper to match account ids - * @param entity - * @param localAccountId - * @returns - */ - private matchLocalAccountIdFromTokenClaims; - private matchLocalAccountIdFromTenantProfile; - /** - * helper to match names - * @param entity - * @param name - * @returns true if the downcased name properties are present and match in the filter and the entity - */ - private matchName; - /** - * helper to match usernames - * @param entity - * @param username - * @returns - */ - private matchUsername; - /** - * helper to match assertion - * @param value - * @param oboAssertion - */ - private matchUserAssertionHash; - /** - * helper to match environment - * @param value - * @param environment - */ - private matchEnvironment; - /** - * helper to match credential type - * @param entity - * @param credentialType - */ - private matchCredentialType; - /** - * helper to match client ids - * @param entity - * @param clientId - */ - private matchClientId; - /** - * helper to match family ids - * @param entity - * @param familyId - */ - private matchFamilyId; - /** - * helper to match realm - * @param entity - * @param realm - */ - private matchRealm; - /** - * helper to match nativeAccountId - * @param entity - * @param nativeAccountId - * @returns boolean indicating the match result - */ - private matchNativeAccountId; - /** - * helper to match loginHint which can be either: - * 1. login_hint ID token claim - * 2. username in cached account object - * 3. upn in ID token claims - * @param entity - * @param loginHint - * @returns - */ - private matchLoginHintFromTokenClaims; - /** - * Helper to match sid - * @param entity - * @param sid - * @returns true if the sid claim is present and matches the filter - */ - private matchSid; - private matchAuthorityType; - /** - * Returns true if the target scopes are a subset of the current entity's scopes, false otherwise. - * @param entity - * @param target - */ - private matchTarget; - /** - * Returns true if the credential's tokenType or Authentication Scheme matches the one in the request, false otherwise - * @param entity - * @param tokenType - */ - private matchTokenType; - /** - * Returns true if the credential's keyId matches the one in the request, false otherwise - * @param entity - * @param keyId - */ - private matchKeyId; - /** - * returns if a given cache entity is of the type appmetadata - * @param key - */ - private isAppMetadata; - /** - * returns if a given cache entity is of the type authoritymetadata - * @param key - */ - protected isAuthorityMetadata(key: string): boolean; - /** - * returns cache key used for cloud instance metadata - */ - generateAuthorityMetadataCacheKey(authority: string): string; - /** - * Helper to convert serialized data to object - * @param obj - * @param json - */ - static toObject(obj: T, json: object): T; -} -/** @internal */ -export declare class DefaultStorageClass extends CacheManager { - setAccount(): void; - getAccount(): AccountEntity; - getCachedAccountEntity(): AccountEntity | null; - setIdTokenCredential(): void; - getIdTokenCredential(): IdTokenEntity; - setAccessTokenCredential(): void; - getAccessTokenCredential(): AccessTokenEntity; - setRefreshTokenCredential(): void; - getRefreshTokenCredential(): RefreshTokenEntity; - setAppMetadata(): void; - getAppMetadata(): AppMetadataEntity; - setServerTelemetry(): void; - getServerTelemetry(): ServerTelemetryEntity; - setAuthorityMetadata(): void; - getAuthorityMetadata(): AuthorityMetadataEntity | null; - getAuthorityMetadataKeys(): Array; - setThrottlingCache(): void; - getThrottlingCache(): ThrottlingEntity; - removeItem(): boolean; - getKeys(): string[]; - getAccountKeys(): string[]; - getTokenKeys(): TokenKeys; - updateCredentialCacheKey(): string; - removeOutdatedAccount(): void; -} -//# sourceMappingURL=CacheManager.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/cache/CacheManager.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/cache/CacheManager.d.ts.map deleted file mode 100644 index 717f31f..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/cache/CacheManager.d.ts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kBAAkB,IAAI,IAAI;IAG1B,kBAAkB,IAAI,qBAAqB;IAG3C,oBAAoB,IAAI,IAAI;IAG5B,oBAAoB,IAAI,uBAAuB,GAAG,IAAI;IAGtD,wBAAwB,IAAI,KAAK,CAAC,MAAM,CAAC;IAGzC,kBAAkB,IAAI,IAAI;IAG1B,kBAAkB,IAAI,gBAAgB;IAGtC,UAAU,IAAI,OAAO;IAGrB,OAAO,IAAI,MAAM,EAAE;IAGnB,cAAc,IAAI,MAAM,EAAE;IAG1B,YAAY,IAAI,SAAS;IAGzB,wBAAwB,IAAI,MAAM;IAGlC,qBAAqB,IAAI,IAAI;CAGhC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/cache/entities/AccessTokenEntity.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/cache/entities/AccessTokenEntity.d.ts deleted file mode 100644 index 790f2b1..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/cache/entities/AccessTokenEntity.d.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { CredentialEntity } from "./CredentialEntity.js"; -import { AuthenticationScheme } from "../../utils/Constants.js"; -/** - * Access token cache type - */ -export type AccessTokenEntity = CredentialEntity & { - /** Full tenant or organizational identifier that the account belongs to */ - realm: string; - /** Permissions that are included in the token, or for refresh tokens, the resource identifier. */ - target: string; - /** Absolute device time when entry was created in the cache. */ - cachedAt: string; - /** Token expiry time, calculated based on current UTC time in seconds. Represented as a string. */ - expiresOn: string; - /** Additional extended expiry time until when token is valid in case of server-side outage. Represented as string in UTC seconds. */ - extendedExpiresOn?: string; - /** Used for proactive refresh */ - refreshOn?: string; - /** Matches the authentication scheme for which the token was issued (i.e. Bearer or pop) */ - tokenType?: AuthenticationScheme; - /** Stringified claims object */ - requestedClaims?: string; - /** Matches the SHA 256 hash of the claims object included in the token request */ - requestedClaimsHash?: string; -}; -//# sourceMappingURL=AccessTokenEntity.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/cache/entities/AccessTokenEntity.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/cache/entities/AccessTokenEntity.d.ts.map deleted file mode 100644 index 7346cf7..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/cache/entities/AccessTokenEntity.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AccessTokenEntity.d.ts","sourceRoot":"","sources":["../../../../src/cache/entities/AccessTokenEntity.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAEhE;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG,gBAAgB,GAAG;IAC/C,2EAA2E;IAC3E,KAAK,EAAE,MAAM,CAAC;IACd,kGAAkG;IAClG,MAAM,EAAE,MAAM,CAAC;IACf,gEAAgE;IAChE,QAAQ,EAAE,MAAM,CAAC;IACjB,mGAAmG;IACnG,SAAS,EAAE,MAAM,CAAC;IAClB,qIAAqI;IACrI,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,iCAAiC;IACjC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,4FAA4F;IAC5F,SAAS,CAAC,EAAE,oBAAoB,CAAC;IACjC,gCAAgC;IAChC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,kFAAkF;IAClF,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAChC,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/cache/entities/AccountEntity.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/cache/entities/AccountEntity.d.ts deleted file mode 100644 index 01991be..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/cache/entities/AccountEntity.d.ts +++ /dev/null @@ -1,108 +0,0 @@ -import { Authority } from "../../authority/Authority.js"; -import { ICrypto } from "../../crypto/ICrypto.js"; -import { AccountInfo, TenantProfile } from "../../account/AccountInfo.js"; -import { AuthorityType } from "../../authority/AuthorityType.js"; -import { Logger } from "../../logger/Logger.js"; -import { TokenClaims } from "../../account/TokenClaims.js"; -/** - * Type that defines required and optional parameters for an Account field (based on universal cache schema implemented by all MSALs). - * - * Key : Value Schema - * - * Key: -- - * - * Value Schema: - * { - * homeAccountId: home account identifier for the auth scheme, - * environment: entity that issued the token, represented as a full host - * realm: Full tenant or organizational identifier that the account belongs to - * localAccountId: Original tenant-specific accountID, usually used for legacy cases - * username: primary username that represents the user, usually corresponds to preferred_username in the v2 endpt - * authorityType: Accounts authority type as a string - * name: Full name for the account, including given name and family name, - * lastModificationTime: last time this entity was modified in the cache - * lastModificationApp: - * nativeAccountId: Account identifier on the native device - * tenantProfiles: Array of tenant profile objects for each tenant that the account has authenticated with in the browser - * } - * @internal - */ -export declare class AccountEntity { - homeAccountId: string; - environment: string; - realm: string; - localAccountId: string; - username: string; - authorityType: string; - clientInfo?: string; - name?: string; - lastModificationTime?: string; - lastModificationApp?: string; - cloudGraphHostName?: string; - msGraphHost?: string; - nativeAccountId?: string; - tenantProfiles?: Array; - lastUpdatedAt?: string; - /** - * Generate Account Id key component as per the schema: - - */ - generateAccountId(): string; - /** - * Generate Account Cache Key as per the schema: -- - */ - generateAccountKey(): string; - /** - * Returns the AccountInfo interface for this account. - */ - getAccountInfo(): AccountInfo; - /** - * Returns true if the account entity is in single tenant format (outdated), false otherwise - */ - isSingleTenant(): boolean; - /** - * Generates account key from interface - * @param accountInterface - */ - static generateAccountCacheKey(accountInterface: AccountInfo): string; - /** - * Build Account cache from IdToken, clientInfo and authority/policy. Associated with AAD. - * @param accountDetails - */ - static createAccount(accountDetails: { - homeAccountId: string; - idTokenClaims?: TokenClaims; - clientInfo?: string; - cloudGraphHostName?: string; - msGraphHost?: string; - environment?: string; - nativeAccountId?: string; - tenantProfiles?: Array; - }, authority: Authority, base64Decode?: (input: string) => string): AccountEntity; - /** - * Creates an AccountEntity object from AccountInfo - * @param accountInfo - * @param cloudGraphHostName - * @param msGraphHost - * @returns - */ - static createFromAccountInfo(accountInfo: AccountInfo, cloudGraphHostName?: string, msGraphHost?: string): AccountEntity; - /** - * Generate HomeAccountId from server response - * @param serverClientInfo - * @param authType - */ - static generateHomeAccountId(serverClientInfo: string, authType: AuthorityType, logger: Logger, cryptoObj: ICrypto, idTokenClaims?: TokenClaims): string; - /** - * Validates an entity: checks for all expected params - * @param entity - */ - static isAccountEntity(entity: object): boolean; - /** - * Helper function to determine whether 2 accountInfo objects represent the same account - * @param accountA - * @param accountB - * @param compareClaims - If set to true idTokenClaims will also be compared to determine account equality - */ - static accountInfoIsEqual(accountA: AccountInfo | null, accountB: AccountInfo | null, compareClaims?: boolean): boolean; -} -//# sourceMappingURL=AccountEntity.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/cache/entities/AccountEntity.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/cache/entities/AccountEntity.d.ts.map deleted file mode 100644 index de9ba2f..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/cache/entities/AccountEntity.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AccountEntity.d.ts","sourceRoot":"","sources":["../../../../src/cache/entities/AccountEntity.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAElD,OAAO,EACH,WAAW,EACX,aAAa,EAEhB,MAAM,8BAA8B,CAAC;AAKtC,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AACjE,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,EACH,WAAW,EAEd,MAAM,8BAA8B,CAAC;AAGtC;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,qBAAa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aAAa;IAiFhB;;;;;;OAMG;IACH,MAAM,CAAC,qBAAqB,CACxB,WAAW,EAAE,WAAW,EACxB,kBAAkB,CAAC,EAAE,MAAM,EAC3B,WAAW,CAAC,EAAE,MAAM,GACrB,aAAa;IAyBhB;;;;OAIG;IACH,MAAM,CAAC,qBAAqB,CACxB,gBAAgB,EAAE,MAAM,EACxB,QAAQ,EAAE,aAAa,EACvB,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,OAAO,EAClB,aAAa,CAAC,EAAE,WAAW,GAC5B,MAAM;IA2BT;;;OAGG;IACH,MAAM,CAAC,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO;IAe/C;;;;;OAKG;IACH,MAAM,CAAC,kBAAkB,CACrB,QAAQ,EAAE,WAAW,GAAG,IAAI,EAC5B,QAAQ,EAAE,WAAW,GAAG,IAAI,EAC5B,aAAa,CAAC,EAAE,OAAO,GACxB,OAAO;CA4Bb"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/cache/entities/AppMetadataEntity.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/cache/entities/AppMetadataEntity.d.ts deleted file mode 100644 index 6aaa4ca..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/cache/entities/AppMetadataEntity.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -/** - * App Metadata Cache Type - */ -export type AppMetadataEntity = { - /** clientId of the application */ - clientId: string; - /** entity that issued the token, represented as a full host */ - environment: string; - /** Family identifier, '1' represents Microsoft Family */ - familyId?: string; -}; -//# sourceMappingURL=AppMetadataEntity.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/cache/entities/AppMetadataEntity.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/cache/entities/AppMetadataEntity.d.ts.map deleted file mode 100644 index c2d8a4c..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/cache/entities/AppMetadataEntity.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AppMetadataEntity.d.ts","sourceRoot":"","sources":["../../../../src/cache/entities/AppMetadataEntity.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC5B,kCAAkC;IAClC,QAAQ,EAAE,MAAM,CAAC;IACjB,+DAA+D;IAC/D,WAAW,EAAE,MAAM,CAAC;IACpB,yDAAyD;IACzD,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/cache/entities/AuthorityMetadataEntity.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/cache/entities/AuthorityMetadataEntity.d.ts deleted file mode 100644 index 8e7b0a2..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/cache/entities/AuthorityMetadataEntity.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** @internal */ -export type AuthorityMetadataEntity = { - aliases: Array; - preferred_cache: string; - preferred_network: string; - canonical_authority: string; - authorization_endpoint: string; - token_endpoint: string; - end_session_endpoint?: string; - issuer: string; - aliasesFromNetwork: boolean; - endpointsFromNetwork: boolean; - expiresAt: number; - jwks_uri: string; -}; -//# sourceMappingURL=AuthorityMetadataEntity.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/cache/entities/AuthorityMetadataEntity.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/cache/entities/AuthorityMetadataEntity.d.ts.map deleted file mode 100644 index 7e1166e..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/cache/entities/AuthorityMetadataEntity.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AuthorityMetadataEntity.d.ts","sourceRoot":"","sources":["../../../../src/cache/entities/AuthorityMetadataEntity.ts"],"names":[],"mappings":"AAKA,gBAAgB;AAChB,MAAM,MAAM,uBAAuB,GAAG;IAClC,OAAO,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACvB,eAAe,EAAE,MAAM,CAAC;IACxB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,mBAAmB,EAAE,MAAM,CAAC;IAC5B,sBAAsB,EAAE,MAAM,CAAC;IAC/B,cAAc,EAAE,MAAM,CAAC;IACvB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf,kBAAkB,EAAE,OAAO,CAAC;IAC5B,oBAAoB,EAAE,OAAO,CAAC;IAC9B,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;CACpB,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/cache/entities/CacheRecord.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/cache/entities/CacheRecord.d.ts deleted file mode 100644 index 59a2bdb..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/cache/entities/CacheRecord.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { IdTokenEntity } from "./IdTokenEntity.js"; -import { AccessTokenEntity } from "./AccessTokenEntity.js"; -import { RefreshTokenEntity } from "./RefreshTokenEntity.js"; -import { AccountEntity } from "./AccountEntity.js"; -import { AppMetadataEntity } from "./AppMetadataEntity.js"; -/** @internal */ -export type CacheRecord = { - account?: AccountEntity | null; - idToken?: IdTokenEntity | null; - accessToken?: AccessTokenEntity | null; - refreshToken?: RefreshTokenEntity | null; - appMetadata?: AppMetadataEntity | null; -}; -//# sourceMappingURL=CacheRecord.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/cache/entities/CacheRecord.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/cache/entities/CacheRecord.d.ts.map deleted file mode 100644 index 830e020..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/cache/entities/CacheRecord.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"CacheRecord.d.ts","sourceRoot":"","sources":["../../../../src/cache/entities/CacheRecord.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAE3D,gBAAgB;AAChB,MAAM,MAAM,WAAW,GAAG;IACtB,OAAO,CAAC,EAAE,aAAa,GAAG,IAAI,CAAC;IAC/B,OAAO,CAAC,EAAE,aAAa,GAAG,IAAI,CAAC;IAC/B,WAAW,CAAC,EAAE,iBAAiB,GAAG,IAAI,CAAC;IACvC,YAAY,CAAC,EAAE,kBAAkB,GAAG,IAAI,CAAC;IACzC,WAAW,CAAC,EAAE,iBAAiB,GAAG,IAAI,CAAC;CAC1C,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/cache/entities/CredentialEntity.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/cache/entities/CredentialEntity.d.ts deleted file mode 100644 index d29ea3b..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/cache/entities/CredentialEntity.d.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { CredentialType, AuthenticationScheme } from "../../utils/Constants.js"; -/** - * Credential Cache Type - */ -export type CredentialEntity = { - /** Identifier for the user in their home tenant*/ - homeAccountId: string; - /** Entity that issued the token, represented as a full host */ - environment: string; - /** Type of credential */ - credentialType: CredentialType; - /** Client ID of the application */ - clientId: string; - /** Actual credential as a string */ - secret: string; - /** Family ID identifier, usually only used for refresh tokens */ - familyId?: string; - /** Full tenant or organizational identifier that the account belongs to */ - realm?: string; - /** Permissions that are included in the token, or for refresh tokens, the resource identifier. */ - target?: string; - /** Matches the SHA 256 hash of the obo_assertion for the OBO flow */ - userAssertionHash?: string; - /** Matches the authentication scheme for which the token was issued (i.e. Bearer or pop) */ - tokenType?: AuthenticationScheme; - /** KeyId for PoP and SSH tokens stored in the kid claim */ - keyId?: string; - /** Matches the SHA 256 hash of the claims object included in the token request */ - requestedClaimsHash?: string; - /** Timestamp when the entry was last updated */ - lastUpdatedAt?: string; -}; -//# sourceMappingURL=CredentialEntity.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/cache/entities/CredentialEntity.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/cache/entities/CredentialEntity.d.ts.map deleted file mode 100644 index f074ea9..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/cache/entities/CredentialEntity.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"CredentialEntity.d.ts","sourceRoot":"","sources":["../../../../src/cache/entities/CredentialEntity.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAEhF;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC3B,kDAAkD;IAClD,aAAa,EAAE,MAAM,CAAC;IACtB,+DAA+D;IAC/D,WAAW,EAAE,MAAM,CAAC;IACpB,yBAAyB;IACzB,cAAc,EAAE,cAAc,CAAC;IAC/B,mCAAmC;IACnC,QAAQ,EAAE,MAAM,CAAC;IACjB,oCAAoC;IACpC,MAAM,EAAE,MAAM,CAAC;IACf,iEAAiE;IACjE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,2EAA2E;IAC3E,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kGAAkG;IAClG,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,qEAAqE;IACrE,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,4FAA4F;IAC5F,SAAS,CAAC,EAAE,oBAAoB,CAAC;IACjC,2DAA2D;IAC3D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kFAAkF;IAClF,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,gDAAgD;IAChD,aAAa,CAAC,EAAE,MAAM,CAAC;CAC1B,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/cache/entities/IdTokenEntity.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/cache/entities/IdTokenEntity.d.ts deleted file mode 100644 index f8cfff6..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/cache/entities/IdTokenEntity.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { CredentialEntity } from "./CredentialEntity.js"; -/** - * Id Token Cache Type - */ -export type IdTokenEntity = CredentialEntity & { - /** Full tenant or organizational identifier that the account belongs to */ - realm: string; -}; -//# sourceMappingURL=IdTokenEntity.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/cache/entities/IdTokenEntity.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/cache/entities/IdTokenEntity.d.ts.map deleted file mode 100644 index ce042cf..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/cache/entities/IdTokenEntity.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"IdTokenEntity.d.ts","sourceRoot":"","sources":["../../../../src/cache/entities/IdTokenEntity.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAEzD;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,gBAAgB,GAAG;IAC3C,4EAA4E;IAC5E,KAAK,EAAE,MAAM,CAAC;CACjB,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/cache/entities/RefreshTokenEntity.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/cache/entities/RefreshTokenEntity.d.ts deleted file mode 100644 index 17b4b6d..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/cache/entities/RefreshTokenEntity.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { CredentialEntity } from "./CredentialEntity.js"; -/** - * Refresh Token Cache Type - */ -export type RefreshTokenEntity = CredentialEntity & { - expiresOn?: string; -}; -//# sourceMappingURL=RefreshTokenEntity.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/cache/entities/RefreshTokenEntity.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/cache/entities/RefreshTokenEntity.d.ts.map deleted file mode 100644 index a2aeedc..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/cache/entities/RefreshTokenEntity.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"RefreshTokenEntity.d.ts","sourceRoot":"","sources":["../../../../src/cache/entities/RefreshTokenEntity.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAEzD;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG,gBAAgB,GAAG;IAChD,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/cache/entities/ServerTelemetryEntity.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/cache/entities/ServerTelemetryEntity.d.ts deleted file mode 100644 index 96f514d..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/cache/entities/ServerTelemetryEntity.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -export type ServerTelemetryEntity = { - failedRequests: Array; - errors: string[]; - cacheHits: number; - nativeBrokerErrorCode?: string; -}; -//# sourceMappingURL=ServerTelemetryEntity.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/cache/entities/ServerTelemetryEntity.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/cache/entities/ServerTelemetryEntity.d.ts.map deleted file mode 100644 index 909f3bd..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/cache/entities/ServerTelemetryEntity.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ServerTelemetryEntity.d.ts","sourceRoot":"","sources":["../../../../src/cache/entities/ServerTelemetryEntity.ts"],"names":[],"mappings":"AAKA,MAAM,MAAM,qBAAqB,GAAG;IAChC,cAAc,EAAE,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC;IACvC,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,qBAAqB,CAAC,EAAE,MAAM,CAAC;CAClC,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/cache/entities/ThrottlingEntity.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/cache/entities/ThrottlingEntity.d.ts deleted file mode 100644 index a641a95..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/cache/entities/ThrottlingEntity.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -export type ThrottlingEntity = { - throttleTime: number; - error?: string; - errorCodes?: Array; - errorMessage?: string; - subError?: string; -}; -//# sourceMappingURL=ThrottlingEntity.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/cache/entities/ThrottlingEntity.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/cache/entities/ThrottlingEntity.d.ts.map deleted file mode 100644 index f5b94fc..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/cache/entities/ThrottlingEntity.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ThrottlingEntity.d.ts","sourceRoot":"","sources":["../../../../src/cache/entities/ThrottlingEntity.ts"],"names":[],"mappings":"AAKA,MAAM,MAAM,gBAAgB,GAAG;IAE3B,YAAY,EAAE,MAAM,CAAC;IAErB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC3B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/cache/interface/ICacheManager.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/cache/interface/ICacheManager.d.ts deleted file mode 100644 index c073c79..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/cache/interface/ICacheManager.d.ts +++ /dev/null @@ -1,167 +0,0 @@ -import { AccountFilter } from "../utils/CacheTypes.js"; -import { CacheRecord } from "../entities/CacheRecord.js"; -import { AccountEntity } from "../entities/AccountEntity.js"; -import { AccountInfo } from "../../account/AccountInfo.js"; -import { AppMetadataEntity } from "../entities/AppMetadataEntity.js"; -import { ServerTelemetryEntity } from "../entities/ServerTelemetryEntity.js"; -import { ThrottlingEntity } from "../entities/ThrottlingEntity.js"; -import { IdTokenEntity } from "../entities/IdTokenEntity.js"; -import { AccessTokenEntity } from "../entities/AccessTokenEntity.js"; -import { RefreshTokenEntity } from "../entities/RefreshTokenEntity.js"; -import { AuthorityMetadataEntity } from "../entities/AuthorityMetadataEntity.js"; -import { StoreInCache } from "../../request/StoreInCache.js"; -export interface ICacheManager { - /** - * fetch the account entity from the platform cache - * @param accountKey - */ - getAccount(accountKey: string, correlationId: string): AccountEntity | null; - /** - * set account entity in the platform cache - * @param account - */ - setAccount(account: AccountEntity, correlationId: string): void; - /** - * Returns true if the given key matches our account key schema. Also matches homeAccountId and/or tenantId if provided - * @param key - * @param homeAccountId - * @param tenantId - * @returns - */ - isAccountKey(key: string, homeAccountId?: string, tenantId?: string): boolean; - /** - * fetch the idToken entity from the platform cache - * @param idTokenKey - */ - getIdTokenCredential(idTokenKey: string, correlationId: string): IdTokenEntity | null; - /** - * set idToken entity to the platform cache - * @param idToken - */ - setIdTokenCredential(idToken: IdTokenEntity, correlationId: string): void; - /** - * fetch the idToken entity from the platform cache - * @param accessTokenKey - */ - getAccessTokenCredential(accessTokenKey: string, correlationId: string): AccessTokenEntity | null; - /** - * set idToken entity to the platform cache - * @param accessToken - */ - setAccessTokenCredential(accessToken: AccessTokenEntity, correlationId: string): void; - /** - * fetch the idToken entity from the platform cache - * @param refreshTokenKey - */ - getRefreshTokenCredential(refreshTokenKey: string, correlationId: string): RefreshTokenEntity | null; - /** - * set idToken entity to the platform cache - * @param refreshToken - */ - setRefreshTokenCredential(refreshToken: RefreshTokenEntity, correlationId: string): void; - /** - * fetch appMetadata entity from the platform cache - * @param appMetadataKey - */ - getAppMetadata(appMetadataKey: string): AppMetadataEntity | null; - /** - * set appMetadata entity to the platform cache - * @param appMetadata - */ - setAppMetadata(appMetadata: AppMetadataEntity, correlationId: string): void; - /** - * fetch server telemetry entity from the platform cache - * @param serverTelemetryKey - */ - getServerTelemetry(serverTelemetryKey: string): ServerTelemetryEntity | null; - /** - * set server telemetry entity to the platform cache - * @param serverTelemetryKey - * @param serverTelemetry - */ - setServerTelemetry(serverTelemetryKey: string, serverTelemetry: ServerTelemetryEntity, correlationId: string): void; - /** - * fetch cloud discovery metadata entity from the platform cache - * @param key - */ - getAuthorityMetadata(key: string): AuthorityMetadataEntity | null; - /** - * Get cache keys for authority metadata - */ - getAuthorityMetadataKeys(): Array; - /** - * set cloud discovery metadata entity to the platform cache - * @param key - * @param value - */ - setAuthorityMetadata(key: string, value: AuthorityMetadataEntity): void; - /** - * Provide an alias to find a matching AuthorityMetadataEntity in cache - * @param host - */ - getAuthorityMetadataByAlias(host: string): AuthorityMetadataEntity | null; - /** - * given an authority generates the cache key for authorityMetadata - * @param authority - */ - generateAuthorityMetadataCacheKey(authority: string): string; - /** - * fetch throttling entity from the platform cache - * @param throttlingCacheKey - */ - getThrottlingCache(throttlingCacheKey: string): ThrottlingEntity | null; - /** - * set throttling entity to the platform cache - * @param throttlingCacheKey - * @param throttlingCache - */ - setThrottlingCache(throttlingCacheKey: string, throttlingCache: ThrottlingEntity, correlationId: string): void; - /** - * Returns all accounts in cache - */ - getAllAccounts(correlationId: string): AccountInfo[]; - /** - * saves a cache record - * @param cacheRecord - */ - saveCacheRecord(cacheRecord: CacheRecord, correlationId: string, storeInCache?: StoreInCache): Promise; - /** - * retrieve accounts matching all provided filters; if no filter is set, get all accounts - * @param homeAccountId - * @param environment - * @param realm - */ - getAccountsFilteredBy(filter: AccountFilter, correlationId: string): AccountEntity[]; - /** - * Get AccountInfo object based on provided filters - * @param filter - */ - getAccountInfoFilteredBy(filter: AccountFilter, correlationId: string): AccountInfo | null; - /** - * Removes all accounts and related tokens from cache. - */ - removeAllAccounts(correlationId: string): Promise; - /** - * returns a boolean if the given account is removed - * @param account - */ - removeAccount(accountKey: string, correlationId: string): Promise; - /** - * returns a boolean if the given account is removed - * @param account - */ - removeAccountContext(account: AccountEntity, correlationId: string): Promise; - /** - * @param key - */ - removeIdToken(key: string, correlationId: string): void; - /** - * @param key - */ - removeAccessToken(key: string, correlationId: string): void; - /** - * @param key - */ - removeRefreshToken(key: string, correlationId: string): void; -} -//# sourceMappingURL=ICacheManager.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/cache/interface/ICacheManager.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/cache/interface/ICacheManager.d.ts.map deleted file mode 100644 index 713323c..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/cache/interface/ICacheManager.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ICacheManager.d.ts","sourceRoot":"","sources":["../../../../src/cache/interface/ICacheManager.ts"],"names":[],"mappings":"AAKA,OA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;;;;OAIG;IACH,kBAAkB,CACd,kBAAkB,EAAE,MAAM,EAC1B,eAAe,EAAE,gBAAgB,EACjC,aAAa,EAAE,MAAM,GACtB,IAAI,CAAC;IAER;;OAEG;IACH,cAAc,CAAC,aAAa,EAAE,MAAM,GAAG,WAAW,EAAE,CAAC;IAErD;;;OAGG;IACH,eAAe,CACX,WAAW,EAAE,WAAW,EACxB,aAAa,EAAE,MAAM,EACrB,YAAY,CAAC,EAAE,YAAY,GAC5B,OAAO,CAAC,IAAI,CAAC,CAAC;IAEjB;;;;;OAKG;IACH,qBAAqB,CACjB,MAAM,EAAE,aAAa,EACrB,aAAa,EAAE,MAAM,GACtB,aAAa,EAAE,CAAC;IAEnB;;;OAGG;IACH,wBAAwB,CACpB,MAAM,EAAE,aAAa,EACrB,aAAa,EAAE,MAAM,GACtB,WAAW,GAAG,IAAI,CAAC;IAEtB;;OAEG;IACH,iBAAiB,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAExD;;;OAGG;IACH,aAAa,CAAC,UAAU,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAExE;;;OAGG;IACH,oBAAoB,CAChB,OAAO,EAAE,aAAa,EACtB,aAAa,EAAE,MAAM,GACtB,OAAO,CAAC,IAAI,CAAC,CAAC;IAEjB;;OAEG;IACH,aAAa,CAAC,GAAG,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAExD;;OAEG;IACH,iBAAiB,CAAC,GAAG,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAE5D;;OAEG;IACH,kBAAkB,CAAC,GAAG,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;CAChE"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/cache/interface/ICachePlugin.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/cache/interface/ICachePlugin.d.ts deleted file mode 100644 index 056c6bb..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/cache/interface/ICachePlugin.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { TokenCacheContext } from "../persistence/TokenCacheContext.js"; -export interface ICachePlugin { - beforeCacheAccess: (tokenCacheContext: TokenCacheContext) => Promise; - afterCacheAccess: (tokenCacheContext: TokenCacheContext) => Promise; -} -//# sourceMappingURL=ICachePlugin.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/cache/interface/ICachePlugin.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/cache/interface/ICachePlugin.d.ts.map deleted file mode 100644 index 789a765..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/cache/interface/ICachePlugin.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ICachePlugin.d.ts","sourceRoot":"","sources":["../../../../src/cache/interface/ICachePlugin.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AAExE,MAAM,WAAW,YAAY;IACzB,iBAAiB,EAAE,CAAC,iBAAiB,EAAE,iBAAiB,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC3E,gBAAgB,EAAE,CAAC,iBAAiB,EAAE,iBAAiB,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CAC7E"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/cache/interface/ISerializableTokenCache.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/cache/interface/ISerializableTokenCache.d.ts deleted file mode 100644 index 6701784..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/cache/interface/ISerializableTokenCache.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export interface ISerializableTokenCache { - deserialize: (cache: string) => void; - serialize: () => string; -} -//# sourceMappingURL=ISerializableTokenCache.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/cache/interface/ISerializableTokenCache.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/cache/interface/ISerializableTokenCache.d.ts.map deleted file mode 100644 index 04eb7c2..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/cache/interface/ISerializableTokenCache.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ISerializableTokenCache.d.ts","sourceRoot":"","sources":["../../../../src/cache/interface/ISerializableTokenCache.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,uBAAuB;IACpC,WAAW,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,SAAS,EAAE,MAAM,MAAM,CAAC;CAC3B"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/cache/persistence/TokenCacheContext.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/cache/persistence/TokenCacheContext.d.ts deleted file mode 100644 index 105ac2d..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/cache/persistence/TokenCacheContext.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { ISerializableTokenCache } from "../interface/ISerializableTokenCache.js"; -/** - * This class instance helps track the memory changes facilitating - * decisions to read from and write to the persistent cache - */ export declare class TokenCacheContext { - /** - * boolean indicating cache change - */ - hasChanged: boolean; - /** - * serializable token cache interface - */ - cache: ISerializableTokenCache; - constructor(tokenCache: ISerializableTokenCache, hasChanged: boolean); - /** - * boolean which indicates the changes in cache - */ - get cacheHasChanged(): boolean; - /** - * function to retrieve the token cache - */ - get tokenCache(): ISerializableTokenCache; -} -//# sourceMappingURL=TokenCacheContext.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/cache/persistence/TokenCacheContext.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/cache/persistence/TokenCacheContext.d.ts.map deleted file mode 100644 index a43ab4b..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/cache/persistence/TokenCacheContext.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"TokenCacheContext.d.ts","sourceRoot":"","sources":["../../../../src/cache/persistence/TokenCacheContext.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,uBAAuB,EAAE,MAAM,yCAAyC,CAAC;AAElF;;;GAGG,CAAC,qBAAa,iBAAiB;IAC9B;;OAEG;IACH,UAAU,EAAE,OAAO,CAAC;IACpB;;OAEG;IACH,KAAK,EAAE,uBAAuB,CAAC;gBAEnB,UAAU,EAAE,uBAAuB,EAAE,UAAU,EAAE,OAAO;IAKpE;;OAEG;IACH,IAAI,eAAe,IAAI,OAAO,CAE7B;IAED;;OAEG;IACH,IAAI,UAAU,IAAI,uBAAuB,CAExC;CACJ"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/cache/utils/CacheHelpers.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/cache/utils/CacheHelpers.d.ts deleted file mode 100644 index 555c282..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/cache/utils/CacheHelpers.d.ts +++ /dev/null @@ -1,95 +0,0 @@ -import { CloudDiscoveryMetadata } from "../../authority/CloudDiscoveryMetadata.js"; -import { OpenIdConfigResponse } from "../../authority/OpenIdConfigResponse.js"; -import { AuthenticationScheme } from "../../utils/Constants.js"; -import { AccessTokenEntity } from "../entities/AccessTokenEntity.js"; -import { AppMetadataEntity } from "../entities/AppMetadataEntity.js"; -import { AuthorityMetadataEntity } from "../entities/AuthorityMetadataEntity.js"; -import { CredentialEntity } from "../entities/CredentialEntity.js"; -import { IdTokenEntity } from "../entities/IdTokenEntity.js"; -import { RefreshTokenEntity } from "../entities/RefreshTokenEntity.js"; -/** - * Cache Key: ------- - * IdToken Example: uid.utid-login.microsoftonline.com-idtoken-app_client_id-contoso.com - * AccessToken Example: uid.utid-login.microsoftonline.com-accesstoken-app_client_id-contoso.com-scope1 scope2--pop - * RefreshToken Example: uid.utid-login.microsoftonline.com-refreshtoken-1-contoso.com - * @param credentialEntity - * @returns - */ -export declare function generateCredentialKey(credentialEntity: CredentialEntity): string; -/** - * Create IdTokenEntity - * @param homeAccountId - * @param authenticationResult - * @param clientId - * @param authority - */ -export declare function createIdTokenEntity(homeAccountId: string, environment: string, idToken: string, clientId: string, tenantId: string): IdTokenEntity; -/** - * Create AccessTokenEntity - * @param homeAccountId - * @param environment - * @param accessToken - * @param clientId - * @param tenantId - * @param scopes - * @param expiresOn - * @param extExpiresOn - */ -export declare function createAccessTokenEntity(homeAccountId: string, environment: string, accessToken: string, clientId: string, tenantId: string, scopes: string, expiresOn: number, extExpiresOn: number, base64Decode: (input: string) => string, refreshOn?: number, tokenType?: AuthenticationScheme, userAssertionHash?: string, keyId?: string, requestedClaims?: string, requestedClaimsHash?: string): AccessTokenEntity; -/** - * Create RefreshTokenEntity - * @param homeAccountId - * @param authenticationResult - * @param clientId - * @param authority - */ -export declare function createRefreshTokenEntity(homeAccountId: string, environment: string, refreshToken: string, clientId: string, familyId?: string, userAssertionHash?: string, expiresOn?: number): RefreshTokenEntity; -export declare function isCredentialEntity(entity: object): boolean; -/** - * Validates an entity: checks for all expected params - * @param entity - */ -export declare function isAccessTokenEntity(entity: object): boolean; -/** - * Validates an entity: checks for all expected params - * @param entity - */ -export declare function isIdTokenEntity(entity: object): boolean; -/** - * Validates an entity: checks for all expected params - * @param entity - */ -export declare function isRefreshTokenEntity(entity: object): boolean; -/** - * validates if a given cache entry is "Telemetry", parses - * @param key - * @param entity - */ -export declare function isServerTelemetryEntity(key: string, entity?: object): boolean; -/** - * validates if a given cache entry is "Throttling", parses - * @param key - * @param entity - */ -export declare function isThrottlingEntity(key: string, entity?: object): boolean; -/** - * Generate AppMetadata Cache Key as per the schema: appmetadata-- - */ -export declare function generateAppMetadataKey({ environment, clientId, }: AppMetadataEntity): string; -export declare function isAppMetadataEntity(key: string, entity: object): boolean; -/** - * Validates an entity: checks for all expected params - * @param entity - */ -export declare function isAuthorityMetadataEntity(key: string, entity: object): boolean; -/** - * Reset the exiresAt value - */ -export declare function generateAuthorityMetadataExpiresAt(): number; -export declare function updateAuthorityEndpointMetadata(authorityMetadata: AuthorityMetadataEntity, updatedValues: OpenIdConfigResponse, fromNetwork: boolean): void; -export declare function updateCloudDiscoveryMetadata(authorityMetadata: AuthorityMetadataEntity, updatedValues: CloudDiscoveryMetadata, fromNetwork: boolean): void; -/** - * Returns whether or not the data needs to be refreshed - */ -export declare function isAuthorityMetadataExpired(metadata: AuthorityMetadataEntity): boolean; -//# sourceMappingURL=CacheHelpers.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/cache/utils/CacheHelpers.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/cache/utils/CacheHelpers.d.ts.map deleted file mode 100644 index c7f114d..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/cache/utils/CacheHelpers.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"CacheHelpers.d.ts","sourceRoot":"","sources":["../../../../src/cache/utils/CacheHelpers.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,sBAAsB,EAAE,MAAM,2CAA2C,CAAC;AACnF,OAAO,EAAE,oBAAoB,EAAE,MAAM,yCAAyC,CAAC;AAK/E,OAAO,EAGH,oBAAoB,EAKvB,MAAM,0BAA0B,CAAC;AAElC,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AACrE,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AACrE,OAAO,EAAE,uBAAuB,EAAE,MAAM,wCAAwC,CAAC;AACjF,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACnE,OAAO,EAAE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MAAM,GAAG,OAAO,CAa3D;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAUvD;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAS5D;AA2DD;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAa7E;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAYxE;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,EACnC,WAAW,EACX,QAAQ,GACX,EAAE,iBAAiB,GAAG,MAAM,CAS5B;AAMD,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAUxE;AAED;;;GAGG;AACH,wBAAgB,yBAAyB,CACrC,GAAG,EAAE,MAAM,EACX,MAAM,EAAE,MAAM,GACf,OAAO,CAmBT;AAED;;GAEG;AACH,wBAAgB,kCAAkC,IAAI,MAAM,CAK3D;AAED,wBAAgB,+BAA+B,CAC3C,iBAAiB,EAAE,uBAAuB,EAC1C,aAAa,EAAE,oBAAoB,EACnC,WAAW,EAAE,OAAO,GACrB,IAAI,CAQN;AAED,wBAAgB,4BAA4B,CACxC,iBAAiB,EAAE,uBAAuB,EAC1C,aAAa,EAAE,sBAAsB,EACrC,WAAW,EAAE,OAAO,GACrB,IAAI,CAKN;AAED;;GAEG;AACH,wBAAgB,0BAA0B,CACtC,QAAQ,EAAE,uBAAuB,GAClC,OAAO,CAET"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/cache/utils/CacheTypes.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/cache/utils/CacheTypes.d.ts deleted file mode 100644 index 125dc0c..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/cache/utils/CacheTypes.d.ts +++ /dev/null @@ -1,70 +0,0 @@ -import { AccountEntity } from "../entities/AccountEntity.js"; -import { IdTokenEntity } from "../entities/IdTokenEntity.js"; -import { AccessTokenEntity } from "../entities/AccessTokenEntity.js"; -import { RefreshTokenEntity } from "../entities/RefreshTokenEntity.js"; -import { AppMetadataEntity } from "../entities/AppMetadataEntity.js"; -import { ServerTelemetryEntity } from "../entities/ServerTelemetryEntity.js"; -import { ThrottlingEntity } from "../entities/ThrottlingEntity.js"; -import { AuthorityMetadataEntity } from "../entities/AuthorityMetadataEntity.js"; -import { AuthenticationScheme } from "../../utils/Constants.js"; -import { ScopeSet } from "../../request/ScopeSet.js"; -import { AccountInfo } from "../../account/AccountInfo.js"; -/** @internal */ -export type AccountCache = Record; -/** @internal */ -export type IdTokenCache = Record; -/** @internal */ -export type AccessTokenCache = Record; -/** @internal */ -export type RefreshTokenCache = Record; -/** @internal */ -export type AppMetadataCache = Record; -/** - * Object type of all accepted cache types - * @internal - */ -export type ValidCacheType = AccountEntity | IdTokenEntity | AccessTokenEntity | RefreshTokenEntity | AppMetadataEntity | AuthorityMetadataEntity | ServerTelemetryEntity | ThrottlingEntity | string; -/** - * Object type of all credential types - * @internal - */ -export type ValidCredentialType = IdTokenEntity | AccessTokenEntity | RefreshTokenEntity; -/** - * Account: -- - */ -export type AccountFilter = Omit, "idToken" | "idTokenClaims"> & { - realm?: string; - loginHint?: string; - sid?: string; - isHomeTenant?: boolean; -}; -export type TenantProfileFilter = Pick; -/** - * Credential: ------ - */ -export type CredentialFilter = { - homeAccountId?: string; - environment?: string; - credentialType?: string; - clientId?: string; - familyId?: string; - realm?: string; - target?: ScopeSet; - userAssertionHash?: string; - tokenType?: AuthenticationScheme; - keyId?: string; - requestedClaimsHash?: string; -}; -/** - * AppMetadata: appmetadata-- - */ -export type AppMetadataFilter = { - environment?: string; - clientId?: string; -}; -export type TokenKeys = { - idToken: string[]; - accessToken: string[]; - refreshToken: string[]; -}; -//# sourceMappingURL=CacheTypes.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/cache/utils/CacheTypes.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/cache/utils/CacheTypes.d.ts.map deleted file mode 100644 index ecf6ee1..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/cache/utils/CacheTypes.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"CacheTypes.d.ts","sourceRoot":"","sources":["../../../../src/cache/utils/CacheTypes.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAC7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AACrE,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AACvE,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AACrE,OAAO,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAC;AAC7E,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACnE,OAAO,EAAE,uBAAuB,EAAE,MAAM,wCAAwC,CAAC;AACjF,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAE3D,gBAAgB;AAChB,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;AACzD,gBAAgB;AAChB,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;AACzD,gBAAgB;AAChB,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAA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K,CAAC,EAAE,MAAM,CAAC;IACf,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAChC,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC5B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG;IACpB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,YAAY,EAAE,MAAM,EAAE,CAAC;CAC1B,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/client/AuthorizationCodeClient.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/client/AuthorizationCodeClient.d.ts deleted file mode 100644 index 3b84861..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/client/AuthorizationCodeClient.d.ts +++ /dev/null @@ -1,76 +0,0 @@ -import { BaseClient } from "./BaseClient.js"; -import { CommonAuthorizationUrlRequest } from "../request/CommonAuthorizationUrlRequest.js"; -import { CommonAuthorizationCodeRequest } from "../request/CommonAuthorizationCodeRequest.js"; -import { ClientConfiguration } from "../config/ClientConfiguration.js"; -import { AuthenticationResult } from "../response/AuthenticationResult.js"; -import { ServerAuthorizationCodeResponse } from "../response/ServerAuthorizationCodeResponse.js"; -import { CommonEndSessionRequest } from "../request/CommonEndSessionRequest.js"; -import { AuthorizationCodePayload } from "../response/AuthorizationCodePayload.js"; -import { IPerformanceClient } from "../telemetry/performance/IPerformanceClient.js"; -/** - * Oauth2.0 Authorization Code client - * @internal - */ -export declare class AuthorizationCodeClient extends BaseClient { - protected includeRedirectUri: boolean; - private oidcDefaultScopes; - constructor(configuration: ClientConfiguration, performanceClient?: IPerformanceClient); - /** - * Creates the URL of the authorization request letting the user input credentials and consent to the - * application. The URL target the /authorize endpoint of the authority configured in the - * application object. - * - * Once the user inputs their credentials and consents, the authority will send a response to the redirect URI - * sent in the request and should contain an authorization code, which can then be used to acquire tokens via - * acquireToken(AuthorizationCodeRequest) - * @param request - */ - getAuthCodeUrl(request: CommonAuthorizationUrlRequest): Promise; - /** - * API to acquire a token in exchange of 'authorization_code` acquired by the user in the first leg of the - * authorization_code_grant - * @param request - */ - acquireToken(request: CommonAuthorizationCodeRequest, authCodePayload?: AuthorizationCodePayload): Promise; - /** - * Handles the hash fragment response from public client code request. Returns a code response used by - * the client to exchange for a token in acquireToken. - * @param hashFragment - */ - handleFragmentResponse(serverParams: ServerAuthorizationCodeResponse, cachedState: string): AuthorizationCodePayload; - /** - * Used to log out the current user, and redirect the user to the postLogoutRedirectUri. - * Default behaviour is to redirect the user to `window.location.href`. - * @param authorityUri - */ - getLogoutUri(logoutRequest: CommonEndSessionRequest): string; - /** - * Executes POST request to token endpoint - * @param authority - * @param request - */ - private executeTokenRequest; - /** - * Generates a map for all the params to be sent to the service - * @param request - */ - private createTokenRequestBody; - /** - * This API validates the `AuthorizationCodeUrlRequest` and creates a URL - * @param request - */ - private createAuthCodeUrlQueryString; - /** - * This API validates the `EndSessionRequest` and creates a URL - * @param request - */ - private createLogoutUrlQueryString; - private addExtraQueryParams; - /** - * Helper to get sid from account. Returns null if idTokenClaims are not present or sid is not present. - * @param account - */ - private extractAccountSid; - private extractLoginHint; -} -//# sourceMappingURL=AuthorizationCodeClient.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/client/AuthorizationCodeClient.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/client/AuthorizationCodeClient.d.ts.map deleted file mode 100644 index 7dc73bc..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/client/AuthorizationCodeClient.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AuthorizationCodeClient.d.ts","sourceRoot":"","sources":["../../../src/client/AuthorizationCodeClient.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,UAAU,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zB,OAAO,CAAC,gBAAgB;CAG3B"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/client/BaseClient.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/client/BaseClient.d.ts deleted file mode 100644 index d342958..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/client/BaseClient.d.ts +++ /dev/null @@ -1,59 +0,0 @@ -import { ClientConfiguration, CommonClientConfiguration } from "../config/ClientConfiguration.js"; -import { INetworkModule, NetworkRequestOptions } from "../network/INetworkModule.js"; -import { NetworkResponse } from "../network/NetworkResponse.js"; -import { ICrypto } from "../crypto/ICrypto.js"; -import { Authority } from "../authority/Authority.js"; -import { Logger } from "../logger/Logger.js"; -import { ServerAuthorizationTokenResponse } from "../response/ServerAuthorizationTokenResponse.js"; -import { CacheManager } from "../cache/CacheManager.js"; -import { ServerTelemetryManager } from "../telemetry/server/ServerTelemetryManager.js"; -import { RequestThumbprint } from "../network/RequestThumbprint.js"; -import { CcsCredential } from "../account/CcsCredential.js"; -import { IPerformanceClient } from "../telemetry/performance/IPerformanceClient.js"; -import { BaseAuthRequest } from "../request/BaseAuthRequest.js"; -/** - * Base application class which will construct requests to send to and handle responses from the Microsoft STS using the authorization code flow. - * @internal - */ -export declare abstract class BaseClient { - logger: Logger; - protected config: CommonClientConfiguration; - protected cryptoUtils: ICrypto; - protected cacheManager: CacheManager; - protected networkClient: INetworkModule; - protected serverTelemetryManager: ServerTelemetryManager | null; - authority: Authority; - protected performanceClient?: IPerformanceClient; - protected constructor(configuration: ClientConfiguration, performanceClient?: IPerformanceClient); - /** - * Creates default headers for requests to token endpoint - */ - protected createTokenRequestHeaders(ccsCred?: CcsCredential): Record; - /** - * Http post to token endpoint - * @param tokenEndpoint - * @param queryString - * @param headers - * @param thumbprint - */ - protected executePostToTokenEndpoint(tokenEndpoint: string, queryString: string, headers: Record, thumbprint: RequestThumbprint, correlationId: string, queuedEvent?: string): Promise>; - /** - * Wraps sendPostRequestAsync with necessary preflight and postflight logic - * @param thumbprint - Request thumbprint for throttling - * @param tokenEndpoint - Endpoint to make the POST to - * @param options - Body and Headers to include on the POST request - * @param correlationId - CorrelationId for telemetry - */ - sendPostRequest(thumbprint: RequestThumbprint, tokenEndpoint: string, options: NetworkRequestOptions, correlationId: string): Promise>; - /** - * Updates the authority object of the client. Endpoint discovery must be completed. - * @param updatedAuthority - */ - updateAuthority(cloudInstanceHostname: string, correlationId: string): Promise; - /** - * Creates query string for the /token request - * @param request - */ - createTokenQueryParameters(request: BaseAuthRequest): string; -} -//# sourceMappingURL=BaseClient.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/client/BaseClient.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/client/BaseClient.d.ts.map deleted file mode 100644 index 7beb2da..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/client/BaseClient.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"BaseClient.d.ts","sourceRoot":"","sources":["../../../src/client/BaseClient.ts"],"names":[],"mappings":"AAKA,OAAO,EACH,mBAAmB,EAEnB,yBAAyB,EAC5B,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EACH,cAAc,EACd,qBAAqB,EACxB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAE7C,OAAO,EAAE,gCAAgC,EAAE,MAAM,iDAAiD,CAAC;AACnG,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,sBAAsB,EAAE,MAAM,+CAA+C,CAAC;AACvF,OAAO,EAAE,iBAAiB,EAAE,MAAM,iC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;;;OAGG;IACG,eAAe,CACjB,qBAAqB,EAAE,MAAM,EAC7B,aAAa,EAAE,MAAM,GACtB,OAAO,CAAC,IAAI,CAAC;IAkBhB;;;OAGG;IACH,0BAA0B,CAAC,OAAO,EAAE,eAAe,GAAG,MAAM;CAuB/D"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/client/RefreshTokenClient.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/client/RefreshTokenClient.d.ts deleted file mode 100644 index bb612fe..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/client/RefreshTokenClient.d.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { ClientConfiguration } from "../config/ClientConfiguration.js"; -import { BaseClient } from "./BaseClient.js"; -import { CommonRefreshTokenRequest } from "../request/CommonRefreshTokenRequest.js"; -import { AuthenticationResult } from "../response/AuthenticationResult.js"; -import { CommonSilentFlowRequest } from "../request/CommonSilentFlowRequest.js"; -import { IPerformanceClient } from "../telemetry/performance/IPerformanceClient.js"; -/** - * OAuth2.0 refresh token client - * @internal - */ -export declare class RefreshTokenClient extends BaseClient { - constructor(configuration: ClientConfiguration, performanceClient?: IPerformanceClient); - acquireToken(request: CommonRefreshTokenRequest): Promise; - /** - * Gets cached refresh token and attaches to request, then calls acquireToken API - * @param request - */ - acquireTokenByRefreshToken(request: CommonSilentFlowRequest): Promise; - /** - * makes a network call to acquire tokens by exchanging RefreshToken available in userCache; throws if refresh token is not cached - * @param request - */ - private acquireTokenWithCachedRefreshToken; - /** - * Constructs the network message and makes a NW call to the underlying secure token service - * @param request - * @param authority - */ - private executeTokenRequest; - /** - * Helper function to create the token request body - * @param request - */ - private createTokenRequestBody; -} -//# sourceMappingURL=RefreshTokenClient.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/client/RefreshTokenClient.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/client/RefreshTokenClient.d.ts.map deleted file mode 100644 index a022715..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/client/RefreshTokenClient.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"RefreshTokenClient.d.ts","sourceRoot":"","sources":["../../../src/client/RefreshTokenClient.ts"],"names":[],"mappings":"AAKA,OAAO,EACH,mBAAmB,EAEtB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,yBAAyB,EAAE,MAAM,yCAAyC,CAAC;AAYpF,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAK3E,OAAO,EAAE,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AAoBhF,OAAO,EAAE,kBAAkB,EAAE,MAAM,gDAAgD,CAAC;AAQpF;;;GAGG;AACH,qBAAa,kBAAmB,SAAQ,UAAU;gBAE1C,aAAa,EAAE,mBAAmB,EAClC,iBAAiB,CAAC,EAAE,kBAAkB;IAI7B,YAAY,CACrB,OAAO,EAAE,yBAAyB,GACnC,OAAO,CAAC,oBAAoB,CAAC;IA8ChC;;;OAGG;IACU,0BAA0B,CACnC,OAAO,EAAE,uBAAuB,GACjC,OAAO,CAAC,oBAAoB,CAAC;IAsEhC;;;OAGG;YACW,kCAAkC;IAmFhD;;;;OAIG;YACW,mBAAmB;IAuDjC;;;OAGG;YACW,sBAAsB;CAyJvC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/client/SilentFlowClient.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/client/SilentFlowClient.d.ts deleted file mode 100644 index a4e960a..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/client/SilentFlowClient.d.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { BaseClient } from "./BaseClient.js"; -import { ClientConfiguration } from "../config/ClientConfiguration.js"; -import { CommonSilentFlowRequest } from "../request/CommonSilentFlowRequest.js"; -import { AuthenticationResult } from "../response/AuthenticationResult.js"; -import { CacheOutcome } from "../utils/Constants.js"; -import { IPerformanceClient } from "../telemetry/performance/IPerformanceClient.js"; -/** @internal */ -export declare class SilentFlowClient extends BaseClient { - constructor(configuration: ClientConfiguration, performanceClient?: IPerformanceClient); - /** - * Retrieves a token from cache if it is still valid, or uses the cached refresh token to renew - * the given token and returns the renewed token - * @param request - */ - acquireToken(request: CommonSilentFlowRequest): Promise; - /** - * Retrieves token from cache or throws an error if it must be refreshed. - * @param request - */ - acquireCachedToken(request: CommonSilentFlowRequest): Promise<[AuthenticationResult, CacheOutcome]>; - private setCacheOutcome; - /** - * Helper function to build response object from the CacheRecord - * @param cacheRecord - */ - private generateResultFromCacheRecord; -} -//# sourceMappingURL=SilentFlowClient.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/client/SilentFlowClient.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/client/SilentFlowClient.d.ts.map deleted file mode 100644 index 1d2e648..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/client/SilentFlowClient.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"SilentFlowClient.d.ts","sourceRoot":"","sources":["../../../src/client/SilentFlowClient.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AACvE,OAAO,EAAE,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AAChF,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAU3E,OAAO,EAAE,YAAY,EAAuB,MAAM,uBAAuB,CAAC;AAC1E,OAAO,EAAE,kBAAkB,EAAE,MAAM,gDAAgD,CAAC;AAQpF,gBAAgB;AAChB,qBAAa,gBAAiB,SAAQ,UAAU;gBAExC,aAAa,EAAE,mBAAmB,EAClC,iBAAiB,CAAC,EAAE,kBAAkB;IAK1C;;;;OAIG;IACG,YAAY,CACd,OAAO,EAAE,uBAAuB,GACjC,OAAO,CAAC,oBAAoB,CAAC;IA8ChC;;;OAGG;IACG,kBAAkB,CACpB,OAAO,EAAE,uBAAuB,GACjC,OAAO,CAAC,CAAC,oBAAoB,EAAE,YAAY,CAAC,CAAC;IAiHhD,OAAO,CAAC,eAAe;IAkBvB;;;OAGG;YACW,6BAA6B;CAqC9C"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/config/AppTokenProvider.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/config/AppTokenProvider.d.ts deleted file mode 100644 index 7177ac7..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/config/AppTokenProvider.d.ts +++ /dev/null @@ -1,39 +0,0 @@ -/** - * Extensibility interface, which allows the app developer to return a token, based on the passed-in parameters, instead of fetching tokens from - * the Identity Provider (AAD). - * Developers need to construct and return an AppTokenProviderResult object back to MSAL. MSAL will cache the token response - * in the same way it would do if the result were comming from AAD. - * This extensibility point is only defined for the client_credential flow, i.e. acquireTokenByClientCredential and - * meant for Azure SDK to enhance Managed Identity support. - */ -export interface IAppTokenProvider { - (appTokenProviderParameters: AppTokenProviderParameters): Promise; -} -/** - * Input object for the IAppTokenProvider extensiblity. MSAL will create this object, which can be used - * to help create an AppTokenProviderResult. - * - * - correlationId - the correlation Id associated with the request - * - tenantId - the tenant Id for which the token must be provided - * - scopes - the scopes for which the token must be provided - * - claims - any extra claims that the token must satisfy - */ -export type AppTokenProviderParameters = { - readonly correlationId?: string; - readonly tenantId: string; - readonly scopes: Array; - readonly claims?: string; -}; -/** - * Output object for IAppTokenProvider extensiblity. - * - * - accessToken - the actual access token, typically in JWT format, that satisfies the request data AppTokenProviderParameters - * - expiresInSeconds - how long the tokens has before expiry, in seconds. Similar to the "expires_in" field in an AAD token response. - * - refreshInSeconds - how long the token has before it should be proactively refreshed. Similar to the "refresh_in" field in an AAD token response. - */ -export type AppTokenProviderResult = { - accessToken: string; - expiresInSeconds: number; - refreshInSeconds?: number; -}; -//# sourceMappingURL=AppTokenProvider.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/config/AppTokenProvider.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/config/AppTokenProvider.d.ts.map deleted file mode 100644 index d097493..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/config/AppTokenProvider.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AppTokenProvider.d.ts","sourceRoot":"","sources":["../../../src/config/AppTokenProvider.ts"],"names":[],"mappings":"AAKA;;;;;;;GAOG;AACH,MAAM,WAAW,iBAAiB;IAC9B,CACI,0BAA0B,EAAE,0BAA0B,GACvD,OAAO,CAAC,sBAAsB,CAAC,CAAC;CACtC;AAED;;;;;;;;GAQG;AACH,MAAM,MAAM,0BAA0B,GAAG;IACrC,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC/B,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;CAC5B,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,MAAM,sBAAsB,GAAG;IACjC,WAAW,EAAE,MAAM,CAAC;IACpB,gBAAgB,EAAE,MAAM,CAAC;IACzB,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC7B,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/config/ClientConfiguration.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/config/ClientConfiguration.d.ts deleted file mode 100644 index faf59c1..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/config/ClientConfiguration.d.ts +++ /dev/null @@ -1,155 +0,0 @@ -import { INetworkModule } from "../network/INetworkModule.js"; -import { ICrypto } from "../crypto/ICrypto.js"; -import { ILoggerCallback, LogLevel } from "../logger/Logger.js"; -import { Authority } from "../authority/Authority.js"; -import { AzureCloudInstance } from "../authority/AuthorityOptions.js"; -import { CacheManager } from "../cache/CacheManager.js"; -import { ServerTelemetryManager } from "../telemetry/server/ServerTelemetryManager.js"; -import { ICachePlugin } from "../cache/interface/ICachePlugin.js"; -import { ISerializableTokenCache } from "../cache/interface/ISerializableTokenCache.js"; -import { ClientCredentials } from "../account/ClientCredentials.js"; -/** - * Use the configuration object to configure MSAL Modules and initialize the base interfaces for MSAL. - * - * This object allows you to configure important elements of MSAL functionality: - * - authOptions - Authentication for application - * - cryptoInterface - Implementation of crypto functions - * - libraryInfo - Library metadata - * - telemetry - Telemetry options and data - * - loggerOptions - Logging for application - * - networkInterface - Network implementation - * - storageInterface - Storage implementation - * - systemOptions - Additional library options - * - clientCredentials - Credentials options for confidential clients - * @internal - */ -export type ClientConfiguration = { - authOptions: AuthOptions; - systemOptions?: SystemOptions; - loggerOptions?: LoggerOptions; - cacheOptions?: CacheOptions; - storageInterface?: CacheManager; - networkInterface?: INetworkModule; - cryptoInterface?: ICrypto; - clientCredentials?: ClientCredentials; - libraryInfo?: LibraryInfo; - telemetry?: TelemetryOptions; - serverTelemetryManager?: ServerTelemetryManager | null; - persistencePlugin?: ICachePlugin | null; - serializableCache?: ISerializableTokenCache | null; -}; -export type CommonClientConfiguration = { - authOptions: Required; - systemOptions: Required; - loggerOptions: Required; - cacheOptions: Required; - storageInterface: CacheManager; - networkInterface: INetworkModule; - cryptoInterface: Required; - libraryInfo: LibraryInfo; - telemetry: Required; - serverTelemetryManager: ServerTelemetryManager | null; - clientCredentials: ClientCredentials; - persistencePlugin: ICachePlugin | null; - serializableCache: ISerializableTokenCache | null; -}; -/** - * Use this to configure the auth options in the ClientConfiguration object - * - * - clientId - Client ID of your app registered with our Application registration portal : https://portal.azure.com/#blade/Microsoft_AAD_IAM/ActiveDirectoryMenuBlade/RegisteredAppsPreview in Microsoft Identity Platform - * - authority - You can configure a specific authority, defaults to " " or "https://login.microsoftonline.com/common" - * - knownAuthorities - An array of URIs that are known to be valid. Used in B2C scenarios. - * - cloudDiscoveryMetadata - A string containing the cloud discovery response. Used in AAD scenarios. - * - clientCapabilities - Array of capabilities which will be added to the claims.access_token.xms_cc request property on every network request. - * - protocolMode - Enum that represents the protocol that msal follows. Used for configuring proper endpoints. - * - skipAuthorityMetadataCache - A flag to choose whether to use or not use the local metadata cache during authority initialization. Defaults to false. - * - instanceAware - A flag of whether the STS will send back additional parameters to specify where the tokens should be retrieved from. - * - redirectUri - The redirect URI where authentication responses can be received by your application. It must exactly match one of the redirect URIs registered in the Azure portal. - * @internal - */ -export type AuthOptions = { - clientId: string; - authority: Authority; - redirectUri: string; - clientCapabilities?: Array; - azureCloudOptions?: AzureCloudOptions; - skipAuthorityMetadataCache?: boolean; - instanceAware?: boolean; -}; -/** - * Use this to configure token renewal info in the Configuration object - * - * - tokenRenewalOffsetSeconds - Sets the window of offset needed to renew the token before expiry - */ -export type SystemOptions = { - tokenRenewalOffsetSeconds?: number; - preventCorsPreflight?: boolean; -}; -/** - * Use this to configure the logging that MSAL does, by configuring logger options in the Configuration object - * - * - loggerCallback - Callback for logger - * - piiLoggingEnabled - Sets whether pii logging is enabled - * - logLevel - Sets the level at which logging happens - * - correlationId - Sets the correlationId printed by the logger - */ -export type LoggerOptions = { - loggerCallback?: ILoggerCallback; - piiLoggingEnabled?: boolean; - logLevel?: LogLevel; - correlationId?: string; -}; -/** - * Use this to configure credential cache preferences in the ClientConfiguration object - * - * - claimsBasedCachingEnabled - Sets whether tokens should be cached based on the claims hash. Default is false. - */ -export type CacheOptions = { - claimsBasedCachingEnabled?: boolean; -}; -/** - * Library-specific options - */ -export type LibraryInfo = { - sku: string; - version: string; - cpu: string; - os: string; -}; -/** - * AzureCloudInstance specific options - * - * - azureCloudInstance - string enum providing short notation for soverign and public cloud authorities - * - tenant - provision to provide the tenant info - */ -export type AzureCloudOptions = { - azureCloudInstance: AzureCloudInstance; - tenant?: string; -}; -export type TelemetryOptions = { - application: ApplicationTelemetry; -}; -/** - * Telemetry information sent on request - * - appName: Unique string name of an application - * - appVersion: Version of the application using MSAL - */ -export type ApplicationTelemetry = { - appName: string; - appVersion: string; -}; -export declare const DEFAULT_SYSTEM_OPTIONS: Required; -/** - * Function that sets the default options when not explicitly configured from app developer - * - * @param Configuration - * - * @returns Configuration - */ -export declare function buildClientConfiguration({ authOptions: userAuthOptions, systemOptions: userSystemOptions, loggerOptions: userLoggerOption, cacheOptions: userCacheOptions, storageInterface: storageImplementation, networkInterface: networkImplementation, cryptoInterface: cryptoImplementation, clientCredentials: clientCredentials, libraryInfo: libraryInfo, telemetry: telemetry, serverTelemetryManager: serverTelemetryManager, persistencePlugin: persistencePlugin, serializableCache: serializableCache, }: ClientConfiguration): CommonClientConfiguration; -/** - * Returns true if config has protocolMode set to ProtocolMode.OIDC, false otherwise - * @param ClientConfiguration - */ -export declare function isOidcProtocolMode(config: ClientConfiguration): boolean; -//# sourceMappingURL=ClientConfiguration.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/config/ClientConfiguration.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/config/ClientConfiguration.d.ts.map deleted file mode 100644 index a5da95b..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/config/ClientConfiguration.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ClientConfiguration.d.ts","sourceRoot":"","sources":["../../../src/config/ClientConfiguration.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAiC,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC9E,OAAO,EAAE,eAAe,EAAU,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAMxE,OA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E,MAAM,CAAC;IACZ,EAAE,EAAE,MAAM,CAAC;CACd,CAAC;AAEF;;;;;GAKG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC5B,kBAAkB,EAAE,kBAAkB,CAAC;IACvC,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC3B,WAAW,EAAE,oBAAoB,CAAC;CACrC,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,oBAAoB,GAAG;IAC/B,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAAC,aAAa,CAG1D,CAAC;AAgDF;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CAAC,EACrC,WAAW,EAAE,eAAe,EAC5B,aAAa,EAAE,iBAAiB,EAChC,aAAa,EAAE,gBAAgB,EAC/B,YAAY,EAAE,gBAAgB,EAC9B,gBAAgB,EAAE,qBAAqB,EACvC,gBAAgB,EAAE,qBAAqB,EACvC,eAAe,EAAE,oBAAoB,EACrC,iBAAiB,EAAE,iBAAiB,EACpC,WAAW,EAAE,WAAW,EACxB,SAAS,EAAE,SAAS,EACpB,sBAAsB,EAAE,sBAAsB,EAC9C,iBAAiB,EAAE,iBAAiB,EACpC,iBAAiB,EAAE,iBAAiB,GACvC,EAAE,mBAAmB,GAAG,yBAAyB,CA4BjD;AAgBD;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,mBAAmB,GAAG,OAAO,CAIvE"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/constants/AADServerParamKeys.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/constants/AADServerParamKeys.d.ts deleted file mode 100644 index b34ce8b..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/constants/AADServerParamKeys.d.ts +++ /dev/null @@ -1,56 +0,0 @@ -export declare const CLIENT_ID = "client_id"; -export declare const REDIRECT_URI = "redirect_uri"; -export declare const RESPONSE_TYPE = "response_type"; -export declare const RESPONSE_MODE = "response_mode"; -export declare const GRANT_TYPE = "grant_type"; -export declare const CLAIMS = "claims"; -export declare const SCOPE = "scope"; -export declare const ERROR = "error"; -export declare const ERROR_DESCRIPTION = "error_description"; -export declare const ACCESS_TOKEN = "access_token"; -export declare const ID_TOKEN = "id_token"; -export declare const REFRESH_TOKEN = "refresh_token"; -export declare const EXPIRES_IN = "expires_in"; -export declare const REFRESH_TOKEN_EXPIRES_IN = "refresh_token_expires_in"; -export declare const STATE = "state"; -export declare const NONCE = "nonce"; -export declare const PROMPT = "prompt"; -export declare const SESSION_STATE = "session_state"; -export declare const CLIENT_INFO = "client_info"; -export declare const CODE = "code"; -export declare const CODE_CHALLENGE = "code_challenge"; -export declare const CODE_CHALLENGE_METHOD = "code_challenge_method"; -export declare const CODE_VERIFIER = "code_verifier"; -export declare const CLIENT_REQUEST_ID = "client-request-id"; -export declare const X_CLIENT_SKU = "x-client-SKU"; -export declare const X_CLIENT_VER = "x-client-VER"; -export declare const X_CLIENT_OS = "x-client-OS"; -export declare const X_CLIENT_CPU = "x-client-CPU"; -export declare const X_CLIENT_CURR_TELEM = "x-client-current-telemetry"; -export declare const X_CLIENT_LAST_TELEM = "x-client-last-telemetry"; -export declare const X_MS_LIB_CAPABILITY = "x-ms-lib-capability"; -export declare const X_APP_NAME = "x-app-name"; -export declare const X_APP_VER = "x-app-ver"; -export declare const POST_LOGOUT_URI = "post_logout_redirect_uri"; -export declare const ID_TOKEN_HINT = "id_token_hint"; -export declare const DEVICE_CODE = "device_code"; -export declare const CLIENT_SECRET = "client_secret"; -export declare const CLIENT_ASSERTION = "client_assertion"; -export declare const CLIENT_ASSERTION_TYPE = "client_assertion_type"; -export declare const TOKEN_TYPE = "token_type"; -export declare const REQ_CNF = "req_cnf"; -export declare const OBO_ASSERTION = "assertion"; -export declare const REQUESTED_TOKEN_USE = "requested_token_use"; -export declare const ON_BEHALF_OF = "on_behalf_of"; -export declare const FOCI = "foci"; -export declare const CCS_HEADER = "X-AnchorMailbox"; -export declare const RETURN_SPA_CODE = "return_spa_code"; -export declare const NATIVE_BROKER = "nativebroker"; -export declare const LOGOUT_HINT = "logout_hint"; -export declare const SID = "sid"; -export declare const LOGIN_HINT = "login_hint"; -export declare const DOMAIN_HINT = "domain_hint"; -export declare const X_CLIENT_EXTRA_SKU = "x-client-xtra-sku"; -export declare const BROKER_CLIENT_ID = "brk_client_id"; -export declare const BROKER_REDIRECT_URI = "brk_redirect_uri"; -//# sourceMappingURL=AADServerParamKeys.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/constants/AADServerParamKeys.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/constants/AADServerParamKeys.d.ts.map deleted file mode 100644 index 58877bf..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/constants/AADServerParamKeys.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AADServerParamKeys.d.ts","sourceRoot":"","sources":["../../../src/constants/AADServerParamKeys.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,SAAS,cAAc,CAAC;AACrC,eAAO,MAAM,YAAY,iBAAiB,CAAC;AAC3C,eAAO,MAAM,aAAa,kBAAkB,CAAC;AAC7C,eAAO,MAAM,aAAa,kBAAkB,CAAC;AAC7C,eAAO,MAAM,UAAU,eAAe,CAAC;AACvC,eAAO,MAAM,MAAM,WAAW,CAAC;AAC/B,eAAO,MAAM,KAAK,UAAU,CAAC;AAC7B,eAAO,MAAM,KAAK,UAAU,CAAC;AAC7B,eAAO,MAAM,iBAAiB,sBAAsB,CAAC;AACrD,eAAO,MAAM,YAAY,iBAAiB,CAAC;AAC3C,eAAO,MAAM,QAAQ,aAAa,CAAC;AACnC,eAAO,MAAM,aAAa,kBAAkB,CAAC;AAC7C,eAAO,MAAM,UAAU,eA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AO,MAAM,IAAI,SAAS,CAAC;AAC3B,eAAO,MAAM,UAAU,oBAAoB,CAAC;AAC5C,eAAO,MAAM,eAAe,oBAAoB,CAAC;AACjD,eAAO,MAAM,aAAa,iBAAiB,CAAC;AAC5C,eAAO,MAAM,WAAW,gBAAgB,CAAC;AACzC,eAAO,MAAM,GAAG,QAAQ,CAAC;AACzB,eAAO,MAAM,UAAU,eAAe,CAAC;AACvC,eAAO,MAAM,WAAW,gBAAgB,CAAC;AACzC,eAAO,MAAM,kBAAkB,sBAAsB,CAAC;AACtD,eAAO,MAAM,gBAAgB,kBAAkB,CAAC;AAChD,eAAO,MAAM,mBAAmB,qBAAqB,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/crypto/ICrypto.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/crypto/ICrypto.d.ts deleted file mode 100644 index 716ba16..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/crypto/ICrypto.d.ts +++ /dev/null @@ -1,69 +0,0 @@ -import { BaseAuthRequest } from "../request/BaseAuthRequest.js"; -import { ShrOptions, SignedHttpRequest } from "./SignedHttpRequest.js"; -/** - * The PkceCodes type describes the structure - * of objects that contain PKCE code - * challenge and verifier pairs - */ -export type PkceCodes = { - verifier: string; - challenge: string; -}; -export type SignedHttpRequestParameters = Pick & { - correlationId?: string; -}; -/** - * Interface for crypto functions used by library - */ -export interface ICrypto { - /** - * Creates a guid randomly. - */ - createNewGuid(): string; - /** - * base64 Encode string - * @param input - */ - base64Encode(input: string): string; - /** - * base64 decode string - * @param input - */ - base64Decode(input: string): string; - /** - * base64 URL safe encoded string - */ - base64UrlEncode(input: string): string; - /** - * Stringifies and base64Url encodes input public key - * @param inputKid - * @returns Base64Url encoded public key - */ - encodeKid(inputKid: string): string; - /** - * Generates an JWK RSA S256 Thumbprint - * @param request - */ - getPublicKeyThumbprint(request: SignedHttpRequestParameters): Promise; - /** - * Removes cryptographic keypair from key store matching the keyId passed in - * @param kid - */ - removeTokenBindingKey(kid: string): Promise; - /** - * Removes all cryptographic keys from IndexedDB storage - */ - clearKeystore(): Promise; - /** - * Returns a signed proof-of-possession token with a given acces token that contains a cnf claim with the required kid. - * @param accessToken - */ - signJwt(payload: SignedHttpRequest, kid: string, shrOptions?: ShrOptions, correlationId?: string): Promise; - /** - * Returns the SHA-256 hash of an input string - * @param plainText - */ - hashString(plainText: string): Promise; -} -export declare const DEFAULT_CRYPTO_IMPLEMENTATION: ICrypto; -//# sourceMappingURL=ICrypto.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/crypto/ICrypto.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/crypto/ICrypto.d.ts.map deleted file mode 100644 index 0ffcfc1..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/crypto/ICrypto.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ICrypto.d.ts","sourceRoot":"","sources":["../../../src/crypto/ICrypto.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAEvE;;;;GAIG;AACH,MAAM,MAAM,SAAS,GAAG;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,2BAA2B,GAAG,IAAI,CAC1C,eAAe,EACb,uBAAuB,GACvB,oBAAoB,GACpB,WAAW,GACX,UAAU,GACV,YAAY,CACjB,GAAG;IACA,aAAa,CAAC,EAAE,MAAM,CAAC;CAC1B,CAAC;AAEF;;GAEG;AACH,MAAM,WAAW,OAAO;IACpB;;OAEG;IACH,aAAa,IAAI,MAAM,CAAC;IACxB;;;OAGG;IACH,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IACpC;;;OAGG;IACH,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IACpC;;OAEG;IACH,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IACvC;;;;OAIG;IACH,SAAS,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAAC;IACpC;;;OAGG;IACH,sBAAsB,CAClB,OAAO,EAAE,2BAA2B,GACrC,OAAO,CAAC,MAAM,CAAC,CAAC;IACnB;;;OAGG;IACH,qBAAqB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IACrD;;OAEG;IACH,aAAa,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC;IAClC;;;OAGG;IACH,OAAO,CACH,OAAO,EAAE,iBAAiB,EAC1B,GAAG,EAAE,MAAM,EACX,UAAU,CAAC,EAAE,UAAU,EACvB,aAAa,CAAC,EAAE,MAAM,GACvB,OAAO,CAAC,MAAM,CAAC,CAAC;IACnB;;;OAGG;IACH,UAAU,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;CAClD;AAED,eAAO,MAAM,6BAA6B,EAAE,OA+B3C,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/crypto/IGuidGenerator.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/crypto/IGuidGenerator.d.ts deleted file mode 100644 index d56c883..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/crypto/IGuidGenerator.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export interface IGuidGenerator { - generateGuid(): string; - isGuid(guid: string): boolean; -} -//# sourceMappingURL=IGuidGenerator.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/crypto/IGuidGenerator.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/crypto/IGuidGenerator.d.ts.map deleted file mode 100644 index c4aa73f..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/crypto/IGuidGenerator.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"IGuidGenerator.d.ts","sourceRoot":"","sources":["../../../src/crypto/IGuidGenerator.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,cAAc;IAC3B,YAAY,IAAI,MAAM,CAAC;IACvB,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;CACjC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/crypto/JoseHeader.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/crypto/JoseHeader.d.ts deleted file mode 100644 index 9f08a09..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/crypto/JoseHeader.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { JsonWebTokenTypes } from "../utils/Constants.js"; -export type JoseHeaderOptions = { - typ?: JsonWebTokenTypes; - alg?: string; - kid?: string; -}; -/** @internal */ -export declare class JoseHeader { - typ?: JsonWebTokenTypes; - alg?: string; - kid?: string; - constructor(options: JoseHeaderOptions); - /** - * Builds SignedHttpRequest formatted JOSE Header from the - * JOSE Header options provided or previously set on the object and returns - * the stringified header object. - * Throws if keyId or algorithm aren't provided since they are required for Access Token Binding. - * @param shrHeaderOptions - * @returns - */ - static getShrHeaderString(shrHeaderOptions: JoseHeaderOptions): string; -} -//# sourceMappingURL=JoseHeader.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/crypto/JoseHeader.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/crypto/JoseHeader.d.ts.map deleted file mode 100644 index b0d35f9..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/crypto/JoseHeader.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"JoseHeader.d.ts","sourceRoot":"","sources":["../../../src/crypto/JoseHeader.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE1D,MAAM,MAAM,iBAAiB,GAAG;IAC5B,GAAG,CAAC,EAAE,iBAAiB,CAAC;IACxB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,gBAAgB;AAChB,qBAAa,UAAU;IACZ,GAAG,CAAC,EAAE,iBAAiB,CAAC;IACxB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;gBAER,OAAO,EAAE,iBAAiB;IAMtC;;;;;;;OAOG;IACH,MAAM,CAAC,kBAAkB,CAAC,gBAAgB,EAAE,iBAAiB,GAAG,MAAM;CAoBzE"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/crypto/PopTokenGenerator.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/crypto/PopTokenGenerator.d.ts deleted file mode 100644 index 1a3818e..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/crypto/PopTokenGenerator.d.ts +++ /dev/null @@ -1,60 +0,0 @@ -import { ICrypto, SignedHttpRequestParameters } from "./ICrypto.js"; -import { IPerformanceClient } from "../telemetry/performance/IPerformanceClient.js"; -import { Logger } from "../logger/Logger.js"; -/** - * See eSTS docs for more info. - * - A kid element, with the value containing an RFC 7638-compliant JWK thumbprint that is base64 encoded. - * - xms_ksl element, representing the storage location of the key's secret component on the client device. One of two values: - * - sw: software storage - * - uhw: hardware storage - */ -type ReqCnf = { - kid: string; - xms_ksl: KeyLocation; -}; -export type ReqCnfData = { - kid: string; - reqCnfString: string; -}; -declare const KeyLocation: { - readonly SW: "sw"; - readonly UHW: "uhw"; -}; -export type KeyLocation = (typeof KeyLocation)[keyof typeof KeyLocation]; -/** @internal */ -export declare class PopTokenGenerator { - private cryptoUtils; - private performanceClient?; - constructor(cryptoUtils: ICrypto, performanceClient?: IPerformanceClient); - /** - * Generates the req_cnf validated at the RP in the POP protocol for SHR parameters - * and returns an object containing the keyid, the full req_cnf string and the req_cnf string hash - * @param request - * @returns - */ - generateCnf(request: SignedHttpRequestParameters, logger: Logger): Promise; - /** - * Generates key_id for a SHR token request - * @param request - * @returns - */ - generateKid(request: SignedHttpRequestParameters): Promise; - /** - * Signs the POP access_token with the local generated key-pair - * @param accessToken - * @param request - * @returns - */ - signPopToken(accessToken: string, keyId: string, request: SignedHttpRequestParameters): Promise; - /** - * Utility function to generate the signed JWT for an access_token - * @param payload - * @param kid - * @param request - * @param claims - * @returns - */ - signPayload(payload: string, keyId: string, request: SignedHttpRequestParameters, claims?: object): Promise; -} -export {}; -//# sourceMappingURL=PopTokenGenerator.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/crypto/PopTokenGenerator.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/crypto/PopTokenGenerator.d.ts.map deleted file mode 100644 index 1162c83..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/crypto/PopTokenGenerator.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"PopTokenGenerator.d.ts","sourceRoot":"","sources":["../../../src/crypto/PopTokenGenerator.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,OAAO,EAAE,2BAA2B,EAAE,MAAM,cAAc,CAAC;AAGpE,OAAO,EAAE,kBAAkB,EAAE,MAAM,gDAAgD,CAAC;AAGpF,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAE7C;;;;;;GAMG;AACH,KAAK,MAAM,GAAG;IACV,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,WAAW,CAAC;CACxB,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF,QAAA,MAAM,WAAW;;;CAGP,CAAC;AACX,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,OAAO,WAAW,CAAC,CAAC;AAEzE,gBAAgB;AAChB,qBAAa,iBAAiB;IAC1B,OAAO,CAAC,WAAW,CAAU;IAC7B,OAAO,CAAC,iBAAiB,CAAC,CAAqB;gBAEnC,WAAW,EAAE,OAAO,EAAE,iBAAiB,CAAC,EAAE,kBAAkB;IAKxE;;;;;OAKG;IACG,WAAW,CACb,OAAO,EAAE,2BAA2B,EACpC,MAAM,EAAE,MAAM,GACf,OAAO,CAAC,UAAU,CAAC;IAuBtB;;;;OAIG;IACG,WAAW,CAAC,OAAO,EAAE,2BAA2B,GAAG,OAAO,CAAC,MAAM,CAAC;IAgBxE;;;;;OAKG;IACG,YAAY,CACd,WAAW,EAAE,MAAM,EACnB,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,2BAA2B,GACrC,OAAO,CAAC,MAAM,CAAC;IAIlB;;;;;;;OAOG;IACG,WAAW,CACb,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,2BAA2B,EACpC,MAAM,CAAC,EAAE,MAAM,GAChB,OAAO,CAAC,MAAM,CAAC;CAiCrB"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/crypto/SignedHttpRequest.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/crypto/SignedHttpRequest.d.ts deleted file mode 100644 index 960970f..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/crypto/SignedHttpRequest.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { JoseHeaderOptions } from "./JoseHeader.js"; -export type SignedHttpRequest = { - at?: string; - cnf?: object; - m?: string; - u?: string; - p?: string; - q?: [Array, string]; - ts?: number; - nonce?: string; - client_claims?: string; -}; -export type ShrOptions = { - header: JoseHeaderOptions; -}; -//# sourceMappingURL=SignedHttpRequest.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/crypto/SignedHttpRequest.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/crypto/SignedHttpRequest.d.ts.map deleted file mode 100644 index f5326a5..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/crypto/SignedHttpRequest.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"SignedHttpRequest.d.ts","sourceRoot":"","sources":["../../../src/crypto/SignedHttpRequest.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAEpD,MAAM,MAAM,iBAAiB,GAAG;IAC5B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,CAAC;IAC5B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,aAAa,CAAC,EAAE,MAAM,CAAC;CAC1B,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG;IACrB,MAAM,EAAE,iBAAiB,CAAC;CAC7B,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/error/AuthError.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/error/AuthError.d.ts deleted file mode 100644 index b3bceb8..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/error/AuthError.d.ts +++ /dev/null @@ -1,45 +0,0 @@ -import * as AuthErrorCodes from "./AuthErrorCodes.js"; -export { AuthErrorCodes }; -export declare const AuthErrorMessages: { - unexpected_error: string; - post_request_failed: string; -}; -/** - * AuthErrorMessage class containing string constants used by error codes and messages. - * @deprecated Use AuthErrorCodes instead - */ -export declare const AuthErrorMessage: { - unexpectedError: { - code: string; - desc: string; - }; - postRequestFailed: { - code: string; - desc: string; - }; -}; -/** - * General error class thrown by the MSAL.js library. - */ -export declare class AuthError extends Error { - /** - * Short string denoting error - */ - errorCode: string; - /** - * Detailed description of error - */ - errorMessage: string; - /** - * Describes the subclass of an error - */ - subError: string; - /** - * CorrelationId associated with the error - */ - correlationId: string; - constructor(errorCode?: string, errorMessage?: string, suberror?: string); - setCorrelationId(correlationId: string): void; -} -export declare function createAuthError(code: string, additionalMessage?: string): AuthError; -//# sourceMappingURL=AuthError.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/error/AuthError.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/error/AuthError.d.ts.map deleted file mode 100644 index 1fcb3f3..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/error/AuthError.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AuthError.d.ts","sourceRoot":"","sources":["../../../src/error/AuthError.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,cAAc,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,CAAC;AAE1B,eAAO,MAAM,iBAAiB;;;CAI7B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;CAS5B,CAAC;AAEF;;GAEG;AACH,qBAAa,SAAU,SAAQ,KAAK;IAChC;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;gBAEV,SAAS,CAAC,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM;IAaxE,gBAAgB,CAAC,aAAa,EAAE,MAAM,GAAG,IAAI;CAGhD;AAED,wBAAgB,eAAe,CAC3B,IAAI,EAAE,MAAM,EACZ,iBAAiB,CAAC,EAAE,MAAM,GAC3B,SAAS,CAOX"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/error/AuthErrorCodes.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/error/AuthErrorCodes.d.ts deleted file mode 100644 index a320435..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/error/AuthErrorCodes.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -/** - * AuthErrorMessage class containing string constants used by error codes and messages. - */ -export declare const unexpectedError = "unexpected_error"; -export declare const postRequestFailed = "post_request_failed"; -//# sourceMappingURL=AuthErrorCodes.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/error/AuthErrorCodes.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/error/AuthErrorCodes.d.ts.map deleted file mode 100644 index 7a8688c..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/error/AuthErrorCodes.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AuthErrorCodes.d.ts","sourceRoot":"","sources":["../../../src/error/AuthErrorCodes.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,eAAO,MAAM,eAAe,qBAAqB,CAAC;AAClD,eAAO,MAAM,iBAAiB,wBAAwB,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/error/CacheError.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/error/CacheError.d.ts deleted file mode 100644 index 113e38c..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/error/CacheError.d.ts +++ /dev/null @@ -1,27 +0,0 @@ -import * as CacheErrorCodes from "./CacheErrorCodes.js"; -export { CacheErrorCodes }; -export declare const CacheErrorMessages: { - cache_quota_exceeded: string; - cache_error_unknown: string; -}; -/** - * Error thrown when there is an error with the cache - */ -export declare class CacheError extends Error { - /** - * Short string denoting error - */ - errorCode: string; - /** - * Detailed description of error - */ - errorMessage: string; - constructor(errorCode: string, errorMessage?: string); -} -/** - * Helper function to wrap browser errors in a CacheError object - * @param e - * @returns - */ -export declare function createCacheError(e: unknown): CacheError; -//# sourceMappingURL=CacheError.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/error/CacheError.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/error/CacheError.d.ts.map deleted file mode 100644 index e0debf4..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/error/CacheError.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"CacheError.d.ts","sourceRoot":"","sources":["../../../src/error/CacheError.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,eAAe,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,CAAC;AAE3B,eAAO,MAAM,kBAAkB;;;CAI9B,CAAC;AAEF;;GAEG;AACH,qBAAa,UAAW,SAAQ,KAAK;IACjC;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;gBAET,SAAS,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,MAAM;CAcvD;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,OAAO,GAAG,UAAU,CAcvD"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/error/CacheErrorCodes.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/error/CacheErrorCodes.d.ts deleted file mode 100644 index 5546079..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/error/CacheErrorCodes.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export declare const cacheQuotaExceeded = "cache_quota_exceeded"; -export declare const cacheErrorUnknown = "cache_error_unknown"; -//# sourceMappingURL=CacheErrorCodes.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/error/CacheErrorCodes.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/error/CacheErrorCodes.d.ts.map deleted file mode 100644 index ebb4702..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/error/CacheErrorCodes.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"CacheErrorCodes.d.ts","sourceRoot":"","sources":["../../../src/error/CacheErrorCodes.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,kBAAkB,yBAAyB,CAAC;AACzD,eAAO,MAAM,iBAAiB,wBAAwB,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/error/ClientAuthError.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/error/ClientAuthError.d.ts deleted file mode 100644 index ef750a9..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/error/ClientAuthError.d.ts +++ /dev/null @@ -1,238 +0,0 @@ -import { AuthError } from "./AuthError.js"; -import * as ClientAuthErrorCodes from "./ClientAuthErrorCodes.js"; -export { ClientAuthErrorCodes }; -/** - * ClientAuthErrorMessage class containing string constants used by error codes and messages. - */ -export declare const ClientAuthErrorMessages: { - client_info_decoding_error: string; - client_info_empty_error: string; - token_parsing_error: string; - null_or_empty_token: string; - endpoints_resolution_error: string; - network_error: string; - openid_config_error: string; - hash_not_deserialized: string; - invalid_state: string; - state_mismatch: string; - state_not_found: string; - nonce_mismatch: string; - auth_time_not_found: string; - max_age_transpired: string; - multiple_matching_tokens: string; - multiple_matching_accounts: string; - multiple_matching_appMetadata: string; - request_cannot_be_made: string; - cannot_remove_empty_scope: string; - cannot_append_scopeset: string; - empty_input_scopeset: string; - device_code_polling_cancelled: string; - device_code_expired: string; - device_code_unknown_error: string; - no_account_in_silent_request: string; - invalid_cache_record: string; - invalid_cache_environment: string; - no_account_found: string; - no_crypto_object: string; - unexpected_credential_type: string; - invalid_assertion: string; - invalid_client_credential: string; - token_refresh_required: string; - user_timeout_reached: string; - token_claims_cnf_required_for_signedjwt: string; - authorization_code_missing_from_server_response: string; - binding_key_not_removed: string; - end_session_endpoint_not_supported: string; - key_id_missing: string; - no_network_connectivity: string; - user_canceled: string; - missing_tenant_id_error: string; - method_not_implemented: string; - nested_app_auth_bridge_disabled: string; -}; -/** - * String constants used by error codes and messages. - * @deprecated Use ClientAuthErrorCodes instead - */ -export declare const ClientAuthErrorMessage: { - clientInfoDecodingError: { - code: string; - desc: string; - }; - clientInfoEmptyError: { - code: string; - desc: string; - }; - tokenParsingError: { - code: string; - desc: string; - }; - nullOrEmptyToken: { - code: string; - desc: string; - }; - endpointResolutionError: { - code: string; - desc: string; - }; - networkError: { - code: string; - desc: string; - }; - unableToGetOpenidConfigError: { - code: string; - desc: string; - }; - hashNotDeserialized: { - code: string; - desc: string; - }; - invalidStateError: { - code: string; - desc: string; - }; - stateMismatchError: { - code: string; - desc: string; - }; - stateNotFoundError: { - code: string; - desc: string; - }; - nonceMismatchError: { - code: string; - desc: string; - }; - authTimeNotFoundError: { - code: string; - desc: string; - }; - maxAgeTranspired: { - code: string; - desc: string; - }; - multipleMatchingTokens: { - code: string; - desc: string; - }; - multipleMatchingAccounts: { - code: string; - desc: string; - }; - multipleMatchingAppMetadata: { - code: string; - desc: string; - }; - tokenRequestCannotBeMade: { - code: string; - desc: string; - }; - removeEmptyScopeError: { - code: string; - desc: string; - }; - appendScopeSetError: { - code: string; - desc: string; - }; - emptyInputScopeSetError: { - code: string; - desc: string; - }; - DeviceCodePollingCancelled: { - code: string; - desc: string; - }; - DeviceCodeExpired: { - code: string; - desc: string; - }; - DeviceCodeUnknownError: { - code: string; - desc: string; - }; - NoAccountInSilentRequest: { - code: string; - desc: string; - }; - invalidCacheRecord: { - code: string; - desc: string; - }; - invalidCacheEnvironment: { - code: string; - desc: string; - }; - noAccountFound: { - code: string; - desc: string; - }; - noCryptoObj: { - code: string; - desc: string; - }; - unexpectedCredentialType: { - code: string; - desc: string; - }; - invalidAssertion: { - code: string; - desc: string; - }; - invalidClientCredential: { - code: string; - desc: string; - }; - tokenRefreshRequired: { - code: string; - desc: string; - }; - userTimeoutReached: { - code: string; - desc: string; - }; - tokenClaimsRequired: { - code: string; - desc: string; - }; - noAuthorizationCodeFromServer: { - code: string; - desc: string; - }; - bindingKeyNotRemovedError: { - code: string; - desc: string; - }; - logoutNotSupported: { - code: string; - desc: string; - }; - keyIdMissing: { - code: string; - desc: string; - }; - noNetworkConnectivity: { - code: string; - desc: string; - }; - userCanceledError: { - code: string; - desc: string; - }; - missingTenantIdError: { - code: string; - desc: string; - }; - nestedAppAuthBridgeDisabled: { - code: string; - desc: string; - }; -}; -/** - * Error thrown when there is an error in the client code running on the browser. - */ -export declare class ClientAuthError extends AuthError { - constructor(errorCode: string, additionalMessage?: string); -} -export declare function createClientAuthError(errorCode: string, additionalMessage?: string): ClientAuthError; -//# sourceMappingURL=ClientAuthError.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/error/ClientAuthError.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/error/ClientAuthError.d.ts.map deleted file mode 100644 index 815a331..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/error/ClientAuthError.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ClientAuthError.d.ts","sourceRoot":"","sources":["../../../src/error/ClientAuthError.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,KAAK,oBAAoB,MAAM,2BAA2B,CAAC;AAClE,OAAO,EAAE,oBAAoB,EAAE,CAAC;AAEhC;;GAEG;AAEH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgFnC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyNlC,CAAC;AAEF;;GAEG;AACH,qBAAa,eAAgB,SAAQ,SAAS;gBAC9B,SAAS,EAAE,MAAM,EAAE,iBAAiB,CAAC,EAAE,MAAM;CAW5D;AAED,wBAAgB,qBAAqB,CACjC,SAAS,EAAE,MAAM,EACjB,iBAAiB,CAAC,EAAE,MAAM,GAC3B,eAAe,CAEjB"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/error/ClientAuthErrorCodes.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/error/ClientAuthErrorCodes.d.ts deleted file mode 100644 index 1f3ed15..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/error/ClientAuthErrorCodes.d.ts +++ /dev/null @@ -1,45 +0,0 @@ -export declare const clientInfoDecodingError = "client_info_decoding_error"; -export declare const clientInfoEmptyError = "client_info_empty_error"; -export declare const tokenParsingError = "token_parsing_error"; -export declare const nullOrEmptyToken = "null_or_empty_token"; -export declare const endpointResolutionError = "endpoints_resolution_error"; -export declare const networkError = "network_error"; -export declare const openIdConfigError = "openid_config_error"; -export declare const hashNotDeserialized = "hash_not_deserialized"; -export declare const invalidState = "invalid_state"; -export declare const stateMismatch = "state_mismatch"; -export declare const stateNotFound = "state_not_found"; -export declare const nonceMismatch = "nonce_mismatch"; -export declare const authTimeNotFound = "auth_time_not_found"; -export declare const maxAgeTranspired = "max_age_transpired"; -export declare const multipleMatchingTokens = "multiple_matching_tokens"; -export declare const multipleMatchingAccounts = "multiple_matching_accounts"; -export declare const multipleMatchingAppMetadata = "multiple_matching_appMetadata"; -export declare const requestCannotBeMade = "request_cannot_be_made"; -export declare const cannotRemoveEmptyScope = "cannot_remove_empty_scope"; -export declare const cannotAppendScopeSet = "cannot_append_scopeset"; -export declare const emptyInputScopeSet = "empty_input_scopeset"; -export declare const deviceCodePollingCancelled = "device_code_polling_cancelled"; -export declare const deviceCodeExpired = "device_code_expired"; -export declare const deviceCodeUnknownError = "device_code_unknown_error"; -export declare const noAccountInSilentRequest = "no_account_in_silent_request"; -export declare const invalidCacheRecord = "invalid_cache_record"; -export declare const invalidCacheEnvironment = "invalid_cache_environment"; -export declare const noAccountFound = "no_account_found"; -export declare const noCryptoObject = "no_crypto_object"; -export declare const unexpectedCredentialType = "unexpected_credential_type"; -export declare const invalidAssertion = "invalid_assertion"; -export declare const invalidClientCredential = "invalid_client_credential"; -export declare const tokenRefreshRequired = "token_refresh_required"; -export declare const userTimeoutReached = "user_timeout_reached"; -export declare const tokenClaimsCnfRequiredForSignedJwt = "token_claims_cnf_required_for_signedjwt"; -export declare const authorizationCodeMissingFromServerResponse = "authorization_code_missing_from_server_response"; -export declare const bindingKeyNotRemoved = "binding_key_not_removed"; -export declare const endSessionEndpointNotSupported = "end_session_endpoint_not_supported"; -export declare const keyIdMissing = "key_id_missing"; -export declare const noNetworkConnectivity = "no_network_connectivity"; -export declare const userCanceled = "user_canceled"; -export declare const missingTenantIdError = "missing_tenant_id_error"; -export declare const methodNotImplemented = "method_not_implemented"; -export declare const nestedAppAuthBridgeDisabled = "nested_app_auth_bridge_disabled"; -//# sourceMappingURL=ClientAuthErrorCodes.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/error/ClientAuthErrorCodes.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/error/ClientAuthErrorCodes.d.ts.map deleted file mode 100644 index 077aa7d..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/error/ClientAu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8B,CAAC;AACnE,eAAO,MAAM,cAAc,qBAAqB,CAAC;AACjD,eAAO,MAAM,cAAc,qBAAqB,CAAC;AACjD,eAAO,MAAM,wBAAwB,+BAA+B,CAAC;AACrE,eAAO,MAAM,gBAAgB,sBAAsB,CAAC;AACpD,eAAO,MAAM,uBAAuB,8BAA8B,CAAC;AACnE,eAAO,MAAM,oBAAoB,2BAA2B,CAAC;AAC7D,eAAO,MAAM,kBAAkB,yBAAyB,CAAC;AACzD,eAAO,MAAM,kCAAkC,4CACF,CAAC;AAC9C,eAAO,MAAM,0CAA0C,oDACF,CAAC;AACtD,eAAO,MAAM,oBAAoB,4BAA4B,CAAC;AAC9D,eAAO,MAAM,8BAA8B,uCACH,CAAC;AACzC,eAAO,MAAM,YAAY,mBAAmB,CAAC;AAC7C,eAAO,MAAM,qBAAqB,4BAA4B,CAAC;AAC/D,eAAO,MAAM,YAAY,kBAAkB,CAAC;AAC5C,eAAO,MAAM,oBAAoB,4BAA4B,CAAC;AAC9D,eAAO,MAAM,oBAAoB,2BAA2B,CAAC;AAC7D,eAAO,MAAM,2BAA2B,oCAAoC,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/error/ClientConfigurationError.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/error/ClientConfigurationError.d.ts deleted file mode 100644 index 5f4fbbf..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/error/ClientConfigurationError.d.ts +++ /dev/null @@ -1,129 +0,0 @@ -import { AuthError } from "./AuthError.js"; -import * as ClientConfigurationErrorCodes from "./ClientConfigurationErrorCodes.js"; -export { ClientConfigurationErrorCodes }; -export declare const ClientConfigurationErrorMessages: { - redirect_uri_empty: string; - claims_request_parsing_error: string; - authority_uri_insecure: string; - url_parse_error: string; - empty_url_error: string; - empty_input_scopes_error: string; - invalid_prompt_value: string; - invalid_claims: string; - token_request_empty: string; - logout_request_empty: string; - invalid_code_challenge_method: string; - pkce_params_missing: string; - invalid_cloud_discovery_metadata: string; - invalid_authority_metadata: string; - untrusted_authority: string; - missing_ssh_jwk: string; - missing_ssh_kid: string; - missing_nonce_authentication_header: string; - invalid_authentication_header: string; - cannot_set_OIDCOptions: string; - cannot_allow_native_broker: string; - authority_mismatch: string; -}; -/** - * ClientConfigurationErrorMessage class containing string constants used by error codes and messages. - * @deprecated Use ClientConfigurationErrorCodes instead - */ -export declare const ClientConfigurationErrorMessage: { - redirectUriNotSet: { - code: string; - desc: string; - }; - claimsRequestParsingError: { - code: string; - desc: string; - }; - authorityUriInsecure: { - code: string; - desc: string; - }; - urlParseError: { - code: string; - desc: string; - }; - urlEmptyError: { - code: string; - desc: string; - }; - emptyScopesError: { - code: string; - desc: string; - }; - invalidPrompt: { - code: string; - desc: string; - }; - invalidClaimsRequest: { - code: string; - desc: string; - }; - tokenRequestEmptyError: { - code: string; - desc: string; - }; - logoutRequestEmptyError: { - code: string; - desc: string; - }; - invalidCodeChallengeMethod: { - code: string; - desc: string; - }; - invalidCodeChallengeParams: { - code: string; - desc: string; - }; - invalidCloudDiscoveryMetadata: { - code: string; - desc: string; - }; - invalidAuthorityMetadata: { - code: string; - desc: string; - }; - untrustedAuthority: { - code: string; - desc: string; - }; - missingSshJwk: { - code: string; - desc: string; - }; - missingSshKid: { - code: string; - desc: string; - }; - missingNonceAuthenticationHeader: { - code: string; - desc: string; - }; - invalidAuthenticationHeader: { - code: string; - desc: string; - }; - cannotSetOIDCOptions: { - code: string; - desc: string; - }; - cannotAllowNativeBroker: { - code: string; - desc: string; - }; - authorityMismatch: { - code: string; - desc: string; - }; -}; -/** - * Error thrown when there is an error in configuration of the MSAL.js library. - */ -export declare class ClientConfigurationError extends AuthError { - constructor(errorCode: string); -} -export declare function createClientConfigurationError(errorCode: string): ClientConfigurationError; -//# sourceMappingURL=ClientConfigurationError.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/error/ClientConfigurationError.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/error/ClientConfigurationError.d.ts.map deleted file mode 100644 index 25c5146..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/error/ClientConfigurationError.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ClientConfigurationError.d.ts","sourceRoot":"","sources":["../../../src/error/ClientConfigurationError.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,KAAK,6BAA6B,MAAM,oCAAoC,CAAC;AACpF,OAAO,EAAE,6BAA6B,EAAE,CAAC;AAEzC,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;CA4C5C,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqI3C,CAAC;AAEF;;GAEG;AACH,qBAAa,wBAAyB,SAAQ,SAAS;gBACvC,SAAS,EAAE,MAAM;CAKhC;AAED,wBAAgB,8BAA8B,CAC1C,SAAS,EAAE,MAAM,GAClB,wBAAwB,CAE1B"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/error/ClientConfigurationErrorCodes.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/error/ClientConfigurationErrorCodes.d.ts deleted file mode 100644 index 2f23cf3..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/error/ClientConfigurationErrorCodes.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -export declare const redirectUriEmpty = "redirect_uri_empty"; -export declare const claimsRequestParsingError = "claims_request_parsing_error"; -export declare const authorityUriInsecure = "authority_uri_insecure"; -export declare const urlParseError = "url_parse_error"; -export declare const urlEmptyError = "empty_url_error"; -export declare const emptyInputScopesError = "empty_input_scopes_error"; -export declare const invalidPromptValue = "invalid_prompt_value"; -export declare const invalidClaims = "invalid_claims"; -export declare const tokenRequestEmpty = "token_request_empty"; -export declare const logoutRequestEmpty = "logout_request_empty"; -export declare const invalidCodeChallengeMethod = "invalid_code_challenge_method"; -export declare const pkceParamsMissing = "pkce_params_missing"; -export declare const invalidCloudDiscoveryMetadata = "invalid_cloud_discovery_metadata"; -export declare const invalidAuthorityMetadata = "invalid_authority_metadata"; -export declare const untrustedAuthority = "untrusted_authority"; -export declare const missingSshJwk = "missing_ssh_jwk"; -export declare const missingSshKid = "missing_ssh_kid"; -export declare const missingNonceAuthenticationHeader = "missing_nonce_authentication_header"; -export declare const invalidAuthenticationHeader = "invalid_authentication_header"; -export declare const cannotSetOIDCOptions = "cannot_set_OIDCOptions"; -export declare const cannotAllowNativeBroker = "cannot_allow_native_broker"; -export declare const authorityMismatch = "authority_mismatch"; -//# sourceMappingURL=ClientConfigurationErrorCodes.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/error/ClientConfigurationErrorCodes.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/error/ClientConfigurationErrorCodes.d.ts.map deleted file mode 100644 index ecef449..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/error/ClientConfigurationErrorCodes.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ClientConfigurationErrorCodes.d.ts","sourceRoot":"","sources":["../../../src/error/ClientConfigurationErrorCodes.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,gBAAgB,uBAAuB,CAAC;AACrD,eAAO,MAAM,yBAAyB,iCAAiC,CAAC;AACxE,eAAO,MAAM,oBAAoB,2BAA2B,CAAC;AAC7D,eAAO,MAAM,aAAa,oBAAoB,CAAC;AAC/C,eAAO,MAAM,aAAa,oBAAoB,CAAC;AAC/C,eAAO,MAAM,qBAAqB,6BAA6B,CAAC;AAChE,eAAO,MAAM,kBAAkB,yBAAyB,CAAC;AACzD,eAAO,MAAM,aAAa,mBAAmB,CAAC;AAC9C,eAAO,MAAM,iBAAiB,wBAAwB,CAAC;AACvD,eAAO,MAAM,kBAAkB,yBAAyB,CAAC;AACzD,eAAO,MAAM,0BAA0B,kCAAkC,CAAC;AAC1E,eAAO,MAAM,iBAAiB,wBAAwB,CAAC;AACvD,eAAO,MAAM,6BAA6B,qCAAqC,CAAC;AAChF,eAAO,MAAM,wBAAwB,+BAA+B,CAAC;AACrE,eAAO,MAAM,kBAAkB,wBAAwB,CAAC;AACxD,eAAO,MAAM,aAAa,oBAAoB,CAAC;AAC/C,eAAO,MAAM,aAAa,oBAAoB,CAAC;AAC/C,eAAO,MAAM,gCAAgC,wCACJ,CAAC;AAC1C,eAAO,MAAM,2BAA2B,kCAAkC,CAAC;AAC3E,eAAO,MAAM,oBAAoB,2BAA2B,CAAC;AAC7D,eAAO,MAAM,uBAAuB,+BAA+B,CAAC;AACpE,eAAO,MAAM,iBAAiB,uBAAuB,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/error/InteractionRequiredAuthError.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/error/InteractionRequiredAuthError.d.ts deleted file mode 100644 index 443ee68..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/error/InteractionRequiredAuthError.d.ts +++ /dev/null @@ -1,66 +0,0 @@ -import { AuthError } from "./AuthError.js"; -import * as InteractionRequiredAuthErrorCodes from "./InteractionRequiredAuthErrorCodes.js"; -export { InteractionRequiredAuthErrorCodes }; -/** - * InteractionRequiredServerErrorMessage contains string constants used by error codes and messages returned by the server indicating interaction is required - */ -export declare const InteractionRequiredServerErrorMessage: string[]; -export declare const InteractionRequiredAuthSubErrorMessage: string[]; -/** - * Interaction required errors defined by the SDK - * @deprecated Use InteractionRequiredAuthErrorCodes instead - */ -export declare const InteractionRequiredAuthErrorMessage: { - noTokensFoundError: { - code: string; - desc: string; - }; - native_account_unavailable: { - code: string; - desc: string; - }; - bad_token: { - code: string; - desc: string; - }; -}; -/** - * Error thrown when user interaction is required. - */ -export declare class InteractionRequiredAuthError extends AuthError { - /** - * The time the error occured at - */ - timestamp: string; - /** - * TraceId associated with the error - */ - traceId: string; - /** - * https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/lib/msal-common/docs/claims-challenge.md - * - * A string with extra claims needed for the token request to succeed - * web site: redirect the user to the authorization page and set the extra claims - * web api: include the claims in the WWW-Authenticate header that are sent back to the client so that it knows to request a token with the extra claims - * desktop application or browser context: include the claims when acquiring the token interactively - * app to app context (client_credentials): include the claims in the AcquireTokenByClientCredential request - */ - claims: string; - /** - * Server error number; - */ - readonly errorNo?: string; - constructor(errorCode?: string, errorMessage?: string, subError?: string, timestamp?: string, traceId?: string, correlationId?: string, claims?: string, errorNo?: string); -} -/** - * Helper function used to determine if an error thrown by the server requires interaction to resolve - * @param errorCode - * @param errorString - * @param subError - */ -export declare function isInteractionRequiredError(errorCode?: string, errorString?: string, subError?: string): boolean; -/** - * Creates an InteractionRequiredAuthError - */ -export declare function createInteractionRequiredAuthError(errorCode: string): InteractionRequiredAuthError; -//# sourceMappingURL=InteractionRequiredAuthError.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/error/InteractionRequiredAuthError.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/error/InteractionRequiredAuthError.d.ts.map deleted file mode 100644 index 9247b86..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/error/InteractionRequiredAuthError.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"InteractionRequiredAuthError.d.ts","sourceRoot":"","sources":["../../../src/error/InteractionRequiredAuthError.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,KAAK,iCAAiC,MAAM,wCAAwC,CAAC;AAC5F,OAAO,EAAE,iCAAiC,EAAE,CAAC;AAE7C;;GAEG;AACH,eAAO,MAAM,qCAAqC,UAKjD,CAAC;AAEF,eAAO,MAAM,sCAAsC,UAOlD,CAAC;AAaF;;;GAGG;AACH,eAAO,MAAM,mCAAmC;;;;;;;;;;;;;CAmB/C,CAAC;AAEF;;GAEG;AACH,qBAAa,4BAA6B,SAAQ,SAAS;IACvD;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;;;;;;;OAQG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;gBAGtB,SAAS,CAAC,EAAE,MAAM,EAClB,YAAY,CAAC,EAAE,MAAM,EACrB,QAAQ,CAAC,EAAE,MAAM,EACjB,SAAS,CAAC,EAAE,MAAM,EAClB,OAAO,CAAC,EAAE,MAAM,EAChB,aAAa,CAAC,EAAE,MAAM,EACtB,MAAM,CAAC,EAAE,MAAM,EACf,OAAO,CAAC,EAAE,MAAM;CAYvB;AAED;;;;;GAKG;AACH,wBAAgB,0BAA0B,CACtC,SAAS,CAAC,EAAE,MAAM,EAClB,WAAW,CAAC,EAAE,MAAM,EACpB,QAAQ,CAAC,EAAE,MAAM,GAClB,OAAO,CAkBT;AAED;;GAEG;AACH,wBAAgB,kCAAkC,CAC9C,SAAS,EAAE,MAAM,GAClB,4BAA4B,CAK9B"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/error/InteractionRequiredAuthErrorCodes.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/error/InteractionRequiredAuthErrorCodes.d.ts deleted file mode 100644 index d336b1c..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/error/InteractionRequiredAuthErrorCodes.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -export declare const noTokensFound = "no_tokens_found"; -export declare const nativeAccountUnavailable = "native_account_unavailable"; -export declare const refreshTokenExpired = "refresh_token_expired"; -export declare const interactionRequired = "interaction_required"; -export declare const consentRequired = "consent_required"; -export declare const loginRequired = "login_required"; -export declare const badToken = "bad_token"; -//# sourceMappingURL=InteractionRequiredAuthErrorCodes.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/error/InteractionRequiredAuthErrorCodes.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/error/InteractionRequiredAuthErrorCodes.d.ts.map deleted file mode 100644 index 5d5c336..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/error/InteractionRequiredAuthErrorCodes.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"InteractionRequiredAuthErrorCodes.d.ts","sourceRoot":"","sources":["../../../src/error/InteractionRequiredAuthErrorCodes.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,aAAa,oBAAoB,CAAC;AAC/C,eAAO,MAAM,wBAAwB,+BAA+B,CAAC;AACrE,eAAO,MAAM,mBAAmB,0BAA0B,CAAC;AAG3D,eAAO,MAAM,mBAAmB,yBAAyB,CAAC;AAC1D,eAAO,MAAM,eAAe,qBAAqB,CAAC;AAClD,eAAO,MAAM,aAAa,mBAAmB,CAAC;AAC9C,eAAO,MAAM,QAAQ,cAAc,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/error/JoseHeaderError.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/error/JoseHeaderError.d.ts deleted file mode 100644 index 2a00193..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/error/JoseHeaderError.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { AuthError } from "./AuthError.js"; -import * as JoseHeaderErrorCodes from "./JoseHeaderErrorCodes.js"; -export { JoseHeaderErrorCodes }; -export declare const JoseHeaderErrorMessages: { - missing_kid_error: string; - missing_alg_error: string; -}; -/** - * Error thrown when there is an error in the client code running on the browser. - */ -export declare class JoseHeaderError extends AuthError { - constructor(errorCode: string, errorMessage?: string); -} -/** Returns JoseHeaderError object */ -export declare function createJoseHeaderError(code: string): JoseHeaderError; -//# sourceMappingURL=JoseHeaderError.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/error/JoseHeaderError.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/error/JoseHeaderError.d.ts.map deleted file mode 100644 index 987af2d..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/error/JoseHeaderError.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"JoseHeaderError.d.ts","sourceRoot":"","sources":["../../../src/error/JoseHeaderError.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,KAAK,oBAAoB,MAAM,2BAA2B,CAAC;AAClE,OAAO,EAAE,oBAAoB,EAAE,CAAC;AAEhC,eAAO,MAAM,uBAAuB;;;CAKnC,CAAC;AAEF;;GAEG;AACH,qBAAa,eAAgB,SAAQ,SAAS;gBAC9B,SAAS,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,MAAM;CAMvD;AAED,qCAAqC;AACrC,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,GAAG,eAAe,CAEnE"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/error/JoseHeaderErrorCodes.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/error/JoseHeaderErrorCodes.d.ts deleted file mode 100644 index 2d9b35e..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/error/JoseHeaderErrorCodes.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export declare const missingKidError = "missing_kid_error"; -export declare const missingAlgError = "missing_alg_error"; -//# sourceMappingURL=JoseHeaderErrorCodes.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/error/JoseHeaderErrorCodes.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/error/JoseHeaderErrorCodes.d.ts.map deleted file mode 100644 index 109dd16..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/error/JoseHeaderErrorCodes.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"JoseHeaderErrorCodes.d.ts","sourceRoot":"","sources":["../../../src/error/JoseHeaderErrorCodes.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,eAAe,sBAAsB,CAAC;AACnD,eAAO,MAAM,eAAe,sBAAsB,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/error/NetworkError.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/error/NetworkError.d.ts deleted file mode 100644 index 32b060b..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/error/NetworkError.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { AuthError } from "./AuthError.js"; -/** - * Represents network related errors - */ -export declare class NetworkError extends AuthError { - error: AuthError; - httpStatus?: number; - responseHeaders?: Record; - constructor(error: AuthError, httpStatus?: number, responseHeaders?: Record); -} -/** - * Creates NetworkError object for a failed network request - * @param error - Error to be thrown back to the caller - * @param httpStatus - Status code of the network request - * @param responseHeaders - Response headers of the network request, when available - * @returns NetworkError object - */ -export declare function createNetworkError(error: AuthError, httpStatus?: number, responseHeaders?: Record): NetworkError; -//# sourceMappingURL=NetworkError.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/error/NetworkError.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/error/NetworkError.d.ts.map deleted file mode 100644 index b5c386c..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/error/NetworkError.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"NetworkError.d.ts","sourceRoot":"","sources":["../../../src/error/NetworkError.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE3C;;GAEG;AACH,qBAAa,YAAa,SAAQ,SAAS;IACvC,KAAK,EAAE,SAAS,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;gBAGrC,KAAK,EAAE,SAAS,EAChB,UAAU,CAAC,EAAE,MAAM,EACnB,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;CAU/C;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAC9B,KAAK,EAAE,SAAS,EAChB,UAAU,CAAC,EAAE,MAAM,EACnB,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GACzC,YAAY,CAEd"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/error/ServerError.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/error/ServerError.d.ts deleted file mode 100644 index 4a541fa..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/error/ServerError.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { AuthError } from "./AuthError.js"; -/** - * Error thrown when there is an error with the server code, for example, unavailability. - */ -export declare class ServerError extends AuthError { - /** - * Server error number; - */ - readonly errorNo?: string; - /** - * Http status number; - */ - readonly status?: number; - constructor(errorCode?: string, errorMessage?: string, subError?: string, errorNo?: string, status?: number); -} -//# sourceMappingURL=ServerError.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/error/ServerError.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/error/ServerError.d.ts.map deleted file mode 100644 index ccefd23..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/error/ServerError.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ServerError.d.ts","sourceRoot":"","sources":["../../../src/error/ServerError.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE3C;;GAEG;AACH,qBAAa,WAAY,SAAQ,SAAS;IACtC;;OAEG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAE1B;;OAEG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;gBAGrB,SAAS,CAAC,EAAE,MAAM,EAClB,YAAY,CAAC,EAAE,MAAM,EACrB,QAAQ,CAAC,EAAE,MAAM,EACjB,OAAO,CAAC,EAAE,MAAM,EAChB,MAAM,CAAC,EAAE,MAAM;CAStB"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/exports-browser-only.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/exports-browser-only.d.ts deleted file mode 100644 index 78c4d92..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/exports-browser-only.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -export { SignedHttpRequest, ShrOptions } from "./crypto/SignedHttpRequest.js"; -export { JoseHeader } from "./crypto/JoseHeader.js"; -export { ExternalTokenResponse } from "./response/ExternalTokenResponse.js"; -export { IPerformanceClient, PerformanceCallbackFunction, InProgressPerformanceEvent, QueueMeasurement, } from "./telemetry/performance/IPerformanceClient.js"; -export { IntFields, PerformanceEvent, PerformanceEvents, PerformanceEventStatus, SubMeasurement, } from "./telemetry/performance/PerformanceEvent.js"; -export { IPerformanceMeasurement } from "./telemetry/performance/IPerformanceMeasurement.js"; -export { PerformanceClient, PreQueueEvent, } from "./telemetry/performance/PerformanceClient.js"; -export { StubPerformanceClient } from "./telemetry/performance/StubPerformanceClient.js"; -export { PopTokenGenerator } from "./crypto/PopTokenGenerator.js"; -//# sourceMappingURL=exports-browser-only.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/exports-browser-only.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/exports-browser-only.d.ts.map deleted file mode 100644 index 9852dd2..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/exports-browser-only.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"exports-browser-only.d.ts","sourceRoot":"","sources":["../../src/exports-browser-only.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAC9E,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AAC5E,OAAO,EACH,kBAAkB,EAClB,2BAA2B,EAC3B,0BAA0B,EAC1B,gBAAgB,GACnB,MAAM,+CAA+C,CAAC;AACvD,OAAO,EACH,SAAS,EACT,gBAAgB,EAChB,iBAAiB,EACjB,sBAAsB,EACtB,cAAc,GACjB,MAAM,6CAA6C,CAAC;AACrD,OAAO,EAAE,uBAAuB,EAAE,MAAM,oDAAoD,CAAC;AAC7F,OAAO,EACH,iBAAiB,EACjB,aAAa,GAChB,MAAM,8CAA8C,CAAC;AACtD,OAAO,EAAE,qBAAqB,EAAE,MAAM,kDAAkD,CAAC;AAEzF,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/exports-common.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/exports-common.d.ts deleted file mode 100644 index 36d66f6..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/exports-common.d.ts +++ /dev/null @@ -1,81 +0,0 @@ -import * as AuthToken from "./account/AuthToken.js"; -import * as AuthorityFactory from "./authority/AuthorityFactory.js"; -import * as CacheHelpers from "./cache/utils/CacheHelpers.js"; -import * as TimeUtils from "./utils/TimeUtils.js"; -import * as UrlUtils from "./utils/UrlUtils.js"; -import * as AADServerParamKeys from "./constants/AADServerParamKeys.js"; -export { AuthToken }; -export { AuthorityFactory }; -export { CacheHelpers }; -export { TimeUtils }; -export { UrlUtils }; -export { AADServerParamKeys }; -export { AuthorizationCodeClient } from "./client/AuthorizationCodeClient.js"; -export { RefreshTokenClient } from "./client/RefreshTokenClient.js"; -export { SilentFlowClient } from "./client/SilentFlowClient.js"; -export { BaseClient } from "./client/BaseClient.js"; -export { AuthOptions, SystemOptions, LoggerOptions, CacheOptions, DEFAULT_SYSTEM_OPTIONS, AzureCloudOptions, ApplicationTelemetry, } from "./config/ClientConfiguration.js"; -export { ClientConfiguration } from "./config/ClientConfiguration.js"; -export { AccountInfo, ActiveAccountFilters, TenantProfile, updateAccountTenantProfileData, tenantIdMatchesHomeTenant, buildTenantProfile, } from "./account/AccountInfo.js"; -export { TokenClaims, getTenantIdFromIdTokenClaims, } from "./account/TokenClaims.js"; -export { TokenClaims as IdTokenClaims } from "./account/TokenClaims.js"; -export { CcsCredential, CcsCredentialType } from "./account/CcsCredential.js"; -export { ClientInfo, buildClientInfo, buildClientInfoFromHomeAccountId, } from "./account/ClientInfo.js"; -export { Authority, formatAuthorityUri, buildStaticAuthorityOptions, } from "./authority/Authority.js"; -export { AuthorityOptions, AzureCloudInstance, StaticAuthorityOptions, } from "./authority/AuthorityOptions.js"; -export { AuthorityType } from "./authority/AuthorityType.js"; -export { ProtocolMode } from "./authority/ProtocolMode.js"; -export { OIDCOptions } from "./authority/OIDCOptions.js"; -export { CacheManager, DefaultStorageClass } from "./cache/CacheManager.js"; -export { AccountCache, AccountFilter, AccessTokenCache, IdTokenCache, RefreshTokenCache, AppMetadataCache, CredentialFilter, ValidCacheType, ValidCredentialType, TokenKeys, } from "./cache/utils/CacheTypes.js"; -export { CacheRecord } from "./cache/entities/CacheRecord.js"; -export { CredentialEntity } from "./cache/entities/CredentialEntity.js"; -export { AppMetadataEntity } from "./cache/entities/AppMetadataEntity.js"; -export { AccountEntity } from "./cache/entities/AccountEntity.js"; -export { IdTokenEntity } from "./cache/entities/IdTokenEntity.js"; -export { AccessTokenEntity } from "./cache/entities/AccessTokenEntity.js"; -export { RefreshTokenEntity } from "./cache/entities/RefreshTokenEntity.js"; -export { ServerTelemetryEntity } from "./cache/entities/ServerTelemetryEntity.js"; -export { AuthorityMetadataEntity } from "./cache/entities/AuthorityMetadataEntity.js"; -export { ThrottlingEntity } from "./cache/entities/ThrottlingEntity.js"; -export { INetworkModule, NetworkRequestOptions, StubbedNetworkModule, } from "./network/INetworkModule.js"; -export { NetworkResponse } from "./network/NetworkResponse.js"; -export { ThrottlingUtils } from "./network/ThrottlingUtils.js"; -export { RequestThumbprint } from "./network/RequestThumbprint.js"; -export { IUri } from "./url/IUri.js"; -export { UrlString } from "./url/UrlString.js"; -export { ICrypto, PkceCodes, DEFAULT_CRYPTO_IMPLEMENTATION, SignedHttpRequestParameters, } from "./crypto/ICrypto.js"; -export { BaseAuthRequest } from "./request/BaseAuthRequest.js"; -export { CommonAuthorizationUrlRequest } from "./request/CommonAuthorizationUrlRequest.js"; -export { CommonAuthorizationCodeRequest } from "./request/CommonAuthorizationCodeRequest.js"; -export { CommonRefreshTokenRequest } from "./request/CommonRefreshTokenRequest.js"; -export { CommonSilentFlowRequest } from "./request/CommonSilentFlowRequest.js"; -export { CommonEndSessionRequest } from "./request/CommonEndSessionRequest.js"; -export { RequestParameterBuilder } from "./request/RequestParameterBuilder.js"; -export { StoreInCache } from "./request/StoreInCache.js"; -export { AzureRegion } from "./authority/AzureRegion.js"; -export { AzureRegionConfiguration } from "./authority/AzureRegionConfiguration.js"; -export { AuthenticationResult } from "./response/AuthenticationResult.js"; -export { AuthorizationCodePayload } from "./response/AuthorizationCodePayload.js"; -export { ServerAuthorizationCodeResponse } from "./response/ServerAuthorizationCodeResponse.js"; -export { ServerAuthorizationTokenResponse } from "./response/ServerAuthorizationTokenResponse.js"; -export { ResponseHandler, buildAccountToCache, } from "./response/ResponseHandler.js"; -export { ScopeSet } from "./request/ScopeSet.js"; -export { AuthenticationHeaderParser } from "./request/AuthenticationHeaderParser.js"; -export { ILoggerCallback, LogLevel, Logger } from "./logger/Logger.js"; -export { InteractionRequiredAuthError, InteractionRequiredAuthErrorCodes, InteractionRequiredAuthErrorMessage, createInteractionRequiredAuthError, } from "./error/InteractionRequiredAuthError.js"; -export { AuthError, AuthErrorMessage, AuthErrorCodes, createAuthError, } from "./error/AuthError.js"; -export { ServerError } from "./error/ServerError.js"; -export { NetworkError, createNetworkError } from "./error/NetworkError.js"; -export { CacheError, CacheErrorCodes, createCacheError, } from "./error/CacheError.js"; -export { ClientAuthError, ClientAuthErrorMessage, ClientAuthErrorCodes, createClientAuthError, } from "./error/ClientAuthError.js"; -export { ClientConfigurationError, ClientConfigurationErrorMessage, ClientConfigurationErrorCodes, createClientConfigurationError, } from "./error/ClientConfigurationError.js"; -export { Constants, OIDC_DEFAULT_SCOPES, PromptValue, PersistentCacheKeys, ServerResponseType, ResponseMode, CacheOutcome, CredentialType, CacheType, CacheAccountType, AuthenticationScheme, CodeChallengeMethodValues, PasswordGrantConstants, ThrottlingConstants, ClaimsRequestKeys, HeaderNames, Errors, THE_FAMILY_ID, ONE_DAY_IN_MS, GrantType, AADAuthorityConstants, HttpStatus, DEFAULT_TOKEN_RENEWAL_OFFSET_SEC, JsonWebTokenTypes, } from "./utils/Constants.js"; -export { StringUtils } from "./utils/StringUtils.js"; -export { StringDict } from "./utils/MsalTypes.js"; -export { ProtocolUtils, RequestStateObject, LibraryStateObject, } from "./utils/ProtocolUtils.js"; -export * from "./utils/FunctionWrappers.js"; -export { ServerTelemetryManager } from "./telemetry/server/ServerTelemetryManager.js"; -export { ServerTelemetryRequest } from "./telemetry/server/ServerTelemetryRequest.js"; -export { version } from "./packageMetadata.js"; -//# sourceMappingURL=exports-common.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/exports-common.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/exports-common.d.ts.map deleted file mode 100644 index 7480ffa..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/exports-common.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"exports-common.d.ts","sourceRoot":"","sources":["../../src/exports-common.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,SAAS,MAAM,wBAAwB,CAAC;AACpD,OAAO,KAAK,gBAAgB,MAAM,iCAAiC,CAAC;AACpE,OAAO,KAAK,YAAY,MAAM,+BAA+B,CAAC;AAC9D,OAAO,KAAK,SAAS,MAAM,sBAAsB,CAAC;AAClD,OAAO,KAAK,QAAQ,MAAM,qBAAqB,CAAC;AAChD,OAAO,KAAK,kBAAkB,MAAM,mCAAmC,CAAC;AAExE,OAAO,EAAE,SAAS,EAAE,CAAC;AACrB,OAAO,EAAE,gBAAgB,EAAE,CAAC;AAC5B,OAAO,EAAE,YAAY,EAAE,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,CAAC;AACrB,OAAO,EAAE,QAAQ,EAAE,CAAC;AACpB,OAAO,EAAE,kBAAkB,EAAE,CAAC;AAE9B,OAAO,EAAE,uBAAuB,EAAE,MAAM,qCAAqC,CAAC;AAC9E,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EACH,WAAW,EACX,aAAa,EACb,aAAa,EACb,YAAY,EACZ,sBAAsB,EACtB,iBAAiB,EACjB,oBAAoB,GACvB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,EACH,WAAW,EACX,oBAAoB,EACpB,aAAa,EACb,8BAA8B,EAC9B,yBAAyB,EACzB,kBAAkB,GACrB,MAAM,0BAA0B,CAAC;AAClC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,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EACH,aAAa,EACb,kBAAkB,EAClB,kBAAkB,GACrB,MAAM,0BAA0B,CAAC;AAClC,cAAc,6BAA6B,CAAC;AAC5C,OAAO,EAAE,sBAAsB,EAAE,MAAM,8CAA8C,CAAC;AACtF,OAAO,EAAE,sBAAsB,EAAE,MAAM,8CAA8C,CAAC;AACtF,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/exports-node-only.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/exports-node-only.d.ts deleted file mode 100644 index 6828b2f..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/exports-node-only.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import * as ClientAssertionUtils from "./utils/ClientAssertionUtils.js"; -export { ClientAssertionUtils }; -export { IAppTokenProvider, AppTokenProviderParameters, AppTokenProviderResult, } from "./config/AppTokenProvider.js"; -export { INativeBrokerPlugin } from "./broker/nativeBroker/INativeBrokerPlugin.js"; -export { ICachePlugin } from "./cache/interface/ICachePlugin.js"; -export { TokenCacheContext } from "./cache/persistence/TokenCacheContext.js"; -export { ISerializableTokenCache } from "./cache/interface/ISerializableTokenCache.js"; -export { CommonClientCredentialRequest } from "./request/CommonClientCredentialRequest.js"; -export { CommonOnBehalfOfRequest } from "./request/CommonOnBehalfOfRequest.js"; -export { CommonDeviceCodeRequest } from "./request/CommonDeviceCodeRequest.js"; -export { CommonUsernamePasswordRequest } from "./request/CommonUsernamePasswordRequest.js"; -export { NativeRequest } from "./request/NativeRequest.js"; -export { NativeSignOutRequest } from "./request/NativeSignOutRequest.js"; -export { ClientAssertion, ClientAssertionConfig, ClientAssertionCallback, } from "./account/ClientCredentials.js"; -export { DeviceCodeResponse, ServerDeviceCodeResponse, } from "./response/DeviceCodeResponse.js"; -export { getClientAssertion } from "./utils/ClientAssertionUtils.js"; -export { IGuidGenerator } from "./crypto/IGuidGenerator.js"; -//# sourceMappingURL=exports-node-only.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/exports-node-only.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/exports-node-only.d.ts.map deleted file mode 100644 index 2e9f17d..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/exports-node-only.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"exports-node-only.d.ts","sourceRoot":"","sources":["../../src/exports-node-only.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,oBAAoB,MAAM,iCAAiC,CAAC;AAExE,OAAO,EAAE,oBAAoB,EAAE,CAAC;AAEhC,OAAO,EACH,iBAAiB,EACjB,0BAA0B,EAC1B,sBAAsB,GACzB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,mBAAmB,EAAE,MAAM,8CAA8C,CAAC;AACnF,OAAO,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AACjE,OAAO,EAAE,iBAAiB,EAAE,MAAM,0CAA0C,CAAC;AAC7E,OAAO,EAAE,uBAAuB,EAAE,MAAM,8CAA8C,CAAC;AACvF,OAAO,EAAE,6BAA6B,EAAE,MAAM,4CAA4C,CAAC;AAC3F,OAAO,EAAE,uBAAuB,EAAE,MAAM,sCAAsC,CAAC;AAC/E,OAAO,EAAE,uBAAuB,EAAE,MAAM,sCAAsC,CAAC;AAC/E,OAAO,EAAE,6BAA6B,EAAE,MAAM,4CAA4C,CAAC;AAC3F,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AACzE,OAAO,EACH,eAAe,EACf,qBAAqB,EACrB,uBAAuB,GAC1B,MAAM,gCAAgC,CAAC;AACxC,OAAO,EACH,kBAAkB,EAClB,wBAAwB,GAC3B,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/index-browser.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/index-browser.d.ts deleted file mode 100644 index c93e6b6..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/index-browser.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -/** - * This file is the entrypoint when importing with the browser subpath e.g. "import { someExport } from @azure/msal-common/browser" - * Additional exports should be added to the applicable exports-*.ts files - */ -export * from "./exports-common.js"; -export * from "./exports-browser-only.js"; -//# sourceMappingURL=index-browser.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/index-browser.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/index-browser.d.ts.map deleted file mode 100644 index c65a69c..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/index-browser.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index-browser.d.ts","sourceRoot":"","sources":["../../src/index-browser.ts"],"names":[],"mappings":"AAKA;;;GAGG;AACH,cAAc,qBAAqB,CAAC;AACpC,cAAc,2BAA2B,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/index-node.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/index-node.d.ts deleted file mode 100644 index 94c9b82..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/index-node.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -/** - * This file is the entrypoint when importing with the node subpath e.g. "import { someExport } from @azure/msal-common/node" - * Additional exports should be added to the applicable exports-*.ts files - */ -export * from "./exports-common.js"; -export * from "./exports-node-only.js"; -//# sourceMappingURL=index-node.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/index-node.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/index-node.d.ts.map deleted file mode 100644 index d41b980..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/index-node.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index-node.d.ts","sourceRoot":"","sources":["../../src/index-node.ts"],"names":[],"mappings":"AAKA;;;GAGG;AACH,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/index.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/index.d.ts deleted file mode 100644 index c8a2cf6..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/index.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -/** - * @packageDocumentation - * @module @azure/msal-common - */ -/** - * This file is the entrypoint when importing without a specific subpath e.g. "import { someExport } from @azure/msal-common" - * Additional exports should be added to the applicable exports-*.ts files - */ -export * from "./exports-common.js"; -export * from "./exports-browser-only.js"; -export * from "./exports-node-only.js"; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/index.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/index.d.ts.map deleted file mode 100644 index d2ae068..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAKA;;;GAGG;AAEH;;;GAGG;AACH,cAAc,qBAAqB,CAAC;AACpC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,wBAAwB,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/logger/Logger.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/logger/Logger.d.ts deleted file mode 100644 index 307bee3..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/logger/Logger.d.ts +++ /dev/null @@ -1,96 +0,0 @@ -import { LoggerOptions } from "../config/ClientConfiguration.js"; -/** - * Options for logger messages. - */ -export type LoggerMessageOptions = { - logLevel: LogLevel; - containsPii?: boolean; - context?: string; - correlationId?: string; -}; -/** - * Log message level. - */ -export declare enum LogLevel { - Error = 0, - Warning = 1, - Info = 2, - Verbose = 3, - Trace = 4 -} -/** - * Callback to send the messages to. - */ -export interface ILoggerCallback { - (level: LogLevel, message: string, containsPii: boolean): void; -} -/** - * Class which facilitates logging of messages to a specific place. - */ -export declare class Logger { - private correlationId; - private level; - private piiLoggingEnabled; - private localCallback; - private packageName; - private packageVersion; - constructor(loggerOptions: LoggerOptions, packageName?: string, packageVersion?: string); - private static createDefaultLoggerOptions; - /** - * Create new Logger with existing configurations. - */ - clone(packageName: string, packageVersion: string, correlationId?: string): Logger; - /** - * Log message with required options. - */ - private logMessage; - /** - * Execute callback with message. - */ - executeCallback(level: LogLevel, message: string, containsPii: boolean): void; - /** - * Logs error messages. - */ - error(message: string, correlationId?: string): void; - /** - * Logs error messages with PII. - */ - errorPii(message: string, correlationId?: string): void; - /** - * Logs warning messages. - */ - warning(message: string, correlationId?: string): void; - /** - * Logs warning messages with PII. - */ - warningPii(message: string, correlationId?: string): void; - /** - * Logs info messages. - */ - info(message: string, correlationId?: string): void; - /** - * Logs info messages with PII. - */ - infoPii(message: string, correlationId?: string): void; - /** - * Logs verbose messages. - */ - verbose(message: string, correlationId?: string): void; - /** - * Logs verbose messages with PII. - */ - verbosePii(message: string, correlationId?: string): void; - /** - * Logs trace messages. - */ - trace(message: string, correlationId?: string): void; - /** - * Logs trace messages with PII. - */ - tracePii(message: string, correlationId?: string): void; - /** - * Returns whether PII Logging is enabled or not. - */ - isPiiLoggingEnabled(): boolean; -} -//# sourceMappingURL=Logger.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/logger/Logger.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/logger/Logger.d.ts.map deleted file mode 100644 index 1e2151f..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/logger/Logger.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Logger.d.ts","sourceRoot":"","sources":["../../../src/logger/Logger.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AAGjE;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG;IAC/B,QAAQ,EAAE,QAAQ,CAAC;IACnB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,aAAa,CAAC,EAAE,MAAM,CAAC;CAC1B,CAAC;AAEF;;GAEG;AACH,oBAAY,QAAQ;IAChB,KAAK,IAAA;IACL,OAAO,IAAA;IACP,IAAI,IAAA;IACJ,OAAO,IAAA;IACP,KAAK,IAAA;CACR;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC5B,CAAC,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,GAAG,IAAI,CAAC;CAClE;AAED;;GAEG;AACH,qBAAa,MAAM;IAEf,OAAO,CAAC,aAAa,CAAS;IAG9B,OAAO,CAAC,KAAK,CAA2B;IAGxC,OAAO,CAAC,iBAAiB,CAAU;IAGnC,OAAO,CAAC,aAAa,CAAkB;IAGvC,OAAO,CAAC,WAAW,CAAS;IAG5B,OAAO,CAAC,cAAc,CAAS;gBAG3B,aAAa,EAAE,aAAa,EAC5B,WAAW,CAAC,EAAE,MAAM,EACpB,cAAc,CAAC,EAAE,MAAM;IAoB3B,OAAO,CAAC,MAAM,CAAC,0BAA0B;IAUzC;;OAEG;IACI,KAAK,CACR,WAAW,EAAE,MAAM,EACnB,cA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.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/network/INetworkModule.d.ts deleted file mode 100644 index b7e9de6..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/network/INetworkModule.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { NetworkResponse } from "./NetworkResponse.js"; -/** - * Options allowed by network request APIs. - */ -export type NetworkRequestOptions = { - headers?: Record; - body?: string; -}; -/** - * Client network interface to send backend requests. - * @interface - */ -export interface INetworkModule { - /** - * Interface function for async network "GET" requests. Based on the Fetch standard: https://fetch.spec.whatwg.org/ - * @param url - * @param requestParams - * @param enableCaching - */ - sendGetRequestAsync(url: string, options?: NetworkRequestOptions, timeout?: number): Promise>; - /** - * Interface function for async network "POST" requests. Based on the Fetch standard: https://fetch.spec.whatwg.org/ - * @param url - * @param requestParams - * @param enableCaching - */ - sendPostRequestAsync(url: string, options?: NetworkRequestOptions): Promise>; -} -export declare const StubbedNetworkModule: INetworkModule; -//# sourceMappingURL=INetworkModule.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/network/INetworkModule.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/network/INetworkModule.d.ts.map deleted file mode 100644 index 150f0a0..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/network/INetworkModule.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"INetworkModule.d.ts","sourceRoot":"","sources":["../../../src/network/INetworkModule.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAEvD;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG;IAChC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC,IAAI,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC3B;;;;;OAKG;IACH,mBAAmB,CAAC,CAAC,EACjB,GAAG,EAAE,MAAM,EACX,OAAO,CAAC,EAAE,qBAAqB,EAC/B,OAAO,CAAC,EAAE,MAAM,GACjB,OAAO,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC;IAE/B;;;;;OAKG;IACH,oBAAoB,CAAC,CAAC,EAClB,GAAG,EAAE,MAAM,EACX,OAAO,CAAC,EAAE,qBAAqB,GAChC,OAAO,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC;CAClC;AAED,eAAO,MAAM,oBAAoB,EAAE,cAWlC,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/network/NetworkResponse.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/network/NetworkResponse.d.ts deleted file mode 100644 index 7907c1f..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/network/NetworkResponse.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -export type NetworkResponse = { - headers: Record; - body: T; - status: number; -}; -//# sourceMappingURL=NetworkResponse.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/network/NetworkResponse.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/network/NetworkResponse.d.ts.map deleted file mode 100644 index 4bddf18..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/network/NetworkResponse.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"NetworkResponse.d.ts","sourceRoot":"","sources":["../../../src/network/NetworkResponse.ts"],"names":[],"mappings":"AAKA,MAAM,MAAM,eAAe,CAAC,CAAC,IAAI;IAC7B,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChC,IAAI,EAAE,CAAC,CAAC;IACR,MAAM,EAAE,MAAM,CAAC;CAClB,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/network/RequestThumbprint.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/network/RequestThumbprint.d.ts deleted file mode 100644 index 07e6a1c..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/network/RequestThumbprint.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { ShrOptions } from "../crypto/SignedHttpRequest.js"; -import { AuthenticationScheme } from "../utils/Constants.js"; -/** - * Type representing a unique request thumbprint. - */ -export type RequestThumbprint = { - clientId: string; - authority: string; - scopes: Array; - homeAccountIdentifier?: string; - claims?: string; - authenticationScheme?: AuthenticationScheme; - resourceRequestMethod?: string; - resourceRequestUri?: string; - shrClaims?: string; - sshKid?: string; - shrOptions?: ShrOptions; -}; -//# sourceMappingURL=RequestThumbprint.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/network/RequestThumbprint.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/network/RequestThumbprint.d.ts.map deleted file mode 100644 index c99b901..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/network/RequestThumbprint.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"RequestThumbprint.d.ts","sourceRoot":"","sources":["../../../src/network/RequestThumbprint.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAC5D,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAE7D;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACtB,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,oBAAoB,CAAC,EAAE,oBAAoB,CAAC;IAC5C,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,UAAU,CAAC;CAC3B,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/network/ThrottlingUtils.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/network/ThrottlingUtils.d.ts deleted file mode 100644 index 2982ed7..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/network/ThrottlingUtils.d.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { NetworkResponse } from "./NetworkResponse.js"; -import { ServerAuthorizationTokenResponse } from "../response/ServerAuthorizationTokenResponse.js"; -import { CacheManager } from "../cache/CacheManager.js"; -import { RequestThumbprint } from "./RequestThumbprint.js"; -import { BaseAuthRequest } from "../request/BaseAuthRequest.js"; -/** @internal */ -export declare class ThrottlingUtils { - /** - * Prepares a RequestThumbprint to be stored as a key. - * @param thumbprint - */ - static generateThrottlingStorageKey(thumbprint: RequestThumbprint): string; - /** - * Performs necessary throttling checks before a network request. - * @param cacheManager - * @param thumbprint - */ - static preProcess(cacheManager: CacheManager, thumbprint: RequestThumbprint, correlationId: string): void; - /** - * Performs necessary throttling checks after a network request. - * @param cacheManager - * @param thumbprint - * @param response - */ - static postProcess(cacheManager: CacheManager, thumbprint: RequestThumbprint, response: NetworkResponse, correlationId: string): void; - /** - * Checks a NetworkResponse object's status codes against 429 or 5xx - * @param response - */ - static checkResponseStatus(response: NetworkResponse): boolean; - /** - * Checks a NetworkResponse object's RetryAfter header - * @param response - */ - static checkResponseForRetryAfter(response: NetworkResponse): boolean; - /** - * Calculates the Unix-time value for a throttle to expire given throttleTime in seconds. - * @param throttleTime - */ - static calculateThrottleTime(throttleTime: number): number; - static removeThrottle(cacheManager: CacheManager, clientId: string, request: BaseAuthRequest, homeAccountIdentifier?: string): void; -} -//# sourceMappingURL=ThrottlingUtils.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/network/ThrottlingUtils.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/network/ThrottlingUtils.d.ts.map deleted file mode 100644 index a11ca57..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/network/ThrottlingUtils.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ThrottlingUtils.d.ts","sourceRoot":"","sources":["../../../src/network/ThrottlingUtils.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,gCAAgC,EAAE,MAAM,iDAAiD,CAAC;AAMnG,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAExD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAE3D,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAEhE,gBAAgB;AAChB,qBAAa,eAAe;IACxB;;;OAGG;IACH,MAAM,CAAC,4BAA4B,CAAC,UAAU,EAAE,iBAAiB,GAAG,MAAM;IAM1E;;;;OAIG;IACH,MAAM,CAAC,UAAU,CACb,YAAY,EAAE,YAAY,EAC1B,UAAU,EAAE,iBAAiB,EAC7B,aAAa,EAAE,MAAM,GACtB,IAAI;IAiBP;;;;;OAKG;IACH,MAAM,CAAC,WAAW,CACd,YAAY,EAAE,YAAY,EAC1B,UAAU,EAAE,iBAAiB,EAC7B,QAAQ,EAAE,eAAe,CAAC,gCAAgC,CAAC,EAC3D,aAAa,EAAE,MAAM,GACtB,IAAI;IAsBP;;;OAGG;IACH,MAAM,CAAC,mBAAmB,CACtB,QAAQ,EAAE,eAAe,CAAC,gCAAgC,CAAC,GAC5D,OAAO;IAOV;;;OAGG;IACH,MAAM,CAAC,0BAA0B,CAC7B,QAAQ,EAAE,eAAe,CAAC,gCAAgC,CAAC,GAC5D,OAAO;IAUV;;;OAGG;IACH,MAAM,CAAC,qBAAqB,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM;IAc1D,MAAM,CAAC,cAAc,CACjB,YAAY,EAAE,YAAY,EAC1B,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,eAAe,EACxB,qBAAqB,CAAC,EAAE,MAAM,GAC/B,IAAI;CAiBV"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/packageMetadata.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/packageMetadata.d.ts deleted file mode 100644 index 3e38430..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/packageMetadata.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export declare const name = "@azure/msal-common"; -export declare const version = "14.16.1"; -//# sourceMappingURL=packageMetadata.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/packageMetadata.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/packageMetadata.d.ts.map deleted file mode 100644 index 0bbde1b..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/packageMetadata.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"packageMetadata.d.ts","sourceRoot":"","sources":["../../src/packageMetadata.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,IAAI,uBAAuB,CAAC;AACzC,eAAO,MAAM,OAAO,YAAY,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/request/AuthenticationHeaderParser.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/request/AuthenticationHeaderParser.d.ts deleted file mode 100644 index d20be86..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/request/AuthenticationHeaderParser.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * This is a helper class that parses supported HTTP response authentication headers to extract and return - * header challenge values that can be used outside the basic authorization flows. - */ -export declare class AuthenticationHeaderParser { - private headers; - constructor(headers: Record); - /** - * This method parses the SHR nonce value out of either the Authentication-Info or WWW-Authenticate authentication headers. - * @returns - */ - getShrNonce(): string; - /** - * Parses an HTTP header's challenge set into a key/value map. - * @param header - * @returns - */ - private parseChallenges; -} -//# sourceMappingURL=AuthenticationHeaderParser.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/request/AuthenticationHeaderParser.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/request/AuthenticationHeaderParser.d.ts.map deleted file mode 100644 index 599473b..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/request/AuthenticationHeaderParser.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AuthenticationHeaderParser.d.ts","sourceRoot":"","sources":["../../../src/request/AuthenticationHeaderParser.ts"],"names":[],"mappings":"AAmBA;;;GAGG;AACH,qBAAa,0BAA0B;IACnC,OAAO,CAAC,OAAO,CAAyB;gBAE5B,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;IAI3C;;;OAGG;IACH,WAAW,IAAI,MAAM;IAqCrB;;;;OAIG;IACH,OAAO,CAAC,eAAe;CAe1B"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/request/BaseAuthRequest.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/request/BaseAuthRequest.d.ts deleted file mode 100644 index 9b14b4d..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/request/BaseAuthRequest.d.ts +++ /dev/null @@ -1,50 +0,0 @@ -import { AuthenticationScheme } from "../utils/Constants.js"; -import { AzureCloudOptions } from "../config/ClientConfiguration.js"; -import { StringDict } from "../utils/MsalTypes.js"; -import { StoreInCache } from "./StoreInCache.js"; -import { ShrOptions } from "../crypto/SignedHttpRequest.js"; -/** - * BaseAuthRequest - * - authority - URL of the authority, the security token service (STS) from which MSAL will acquire tokens. Defaults to https://login.microsoftonline.com/common. If using the same authority for all request, authority should set on client application object and not request, to avoid resolving authority endpoints multiple times. - * - correlationId - Unique GUID set per request to trace a request end-to-end for telemetry purposes. - * - scopes - Array of scopes the application is requesting access to. - * - authenticationScheme - The type of token retrieved. Defaults to "Bearer". Can also be type "pop" or "SSH". - * - claims - A stringified claims request which will be added to all /authorize and /token calls - * - shrClaims - A stringified claims object which will be added to a Signed HTTP Request - * - shrNonce - A server-generated timestamp that has been encrypted and base64URL encoded, which will be added to a Signed HTTP Request. - * - shrOptions - An object containing options for the Signed HTTP Request - * - resourceRequestMethod - HTTP Request type used to request data from the resource (i.e. "GET", "POST", etc.). Used for proof-of-possession flows. - * - resourceRequestUri - URI that token will be used for. Used for proof-of-possession flows. - * - sshJwk - A stringified JSON Web Key representing a public key that can be signed by an SSH certificate. - * - sshKid - Key ID that uniquely identifies the SSH public key mentioned above. - * - azureCloudOptions - Convenience string enums for users to provide public/sovereign cloud ids - * - requestedClaimsHash - SHA 256 hash string of the requested claims string, used as part of an access token cache key so tokens can be filtered by requested claims - * - tokenQueryParameters - String to string map of custom query parameters added to the /token call - * - storeInCache - Object containing boolean values indicating whether to store tokens in the cache or not (default is true) - * - scenarioId - Scenario id to track custom user prompts - * - popKid - Key ID to identify the public key for PoP token request - * - embeddedClientId - Embedded client id. When specified, broker client id (brk_client_id) and redirect uri (brk_redirect_uri) params are set with values from the config, overriding the corresponding extra parameters, if present. - */ -export type BaseAuthRequest = { - authority: string; - correlationId: string; - scopes: Array; - authenticationScheme?: AuthenticationScheme; - claims?: string; - shrClaims?: string; - shrNonce?: string; - shrOptions?: ShrOptions; - resourceRequestMethod?: string; - resourceRequestUri?: string; - sshJwk?: string; - sshKid?: string; - azureCloudOptions?: AzureCloudOptions; - requestedClaimsHash?: string; - maxAge?: number; - tokenQueryParameters?: StringDict; - storeInCache?: StoreInCache; - scenarioId?: string; - popKid?: string; - embeddedClientId?: string; -}; -//# sourceMappingURL=BaseAuthRequest.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/request/BaseAuthRequest.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/request/BaseAuthRequest.d.ts.map deleted file mode 100644 index 24956fb..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/request/BaseAuthRequest.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"BaseAuthRequest.d.ts","sourceRoot":"","sources":["../../../src/request/BaseAuthRequest.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AACrE,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAE5D;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,MAAM,eAAe,GAAG;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACtB,oBAAoB,CAAC,EAAE,oBAAoB,CAAC;IAC5C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;IACtC,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,oBAAoB,CAAC,EAAE,UAAU,CAAC;IAClC,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC7B,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/request/CommonAuthorizationCodeRequest.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/request/CommonAuthorizationCodeRequest.d.ts deleted file mode 100644 index c3d75a3..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/request/CommonAuthorizationCodeRequest.d.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { BaseAuthRequest } from "./BaseAuthRequest.js"; -import { StringDict } from "../utils/MsalTypes.js"; -import { CcsCredential } from "../account/CcsCredential.js"; -/** - * Request object passed by user to acquire a token from the server exchanging a valid authorization code (second leg of OAuth2.0 Authorization Code flow) - * - * - scopes - Array of scopes the application is requesting access to. - * - claims - A stringified claims request which will be added to all /authorize and /token calls - * - authority: - URL of the authority, the security token service (STS) from which MSAL will acquire tokens. If authority is set on client application object, this will override that value. Overriding the value will cause for authority validation to happen each time. If the same authority will be used for all request, set on the application object instead of the requests. - * - correlationId - Unique GUID set per request to trace a request end-to-end for telemetry purposes. - * - redirectUri - The redirect URI of your app, where the authority will redirect to after the user inputs credentials and consents. It must exactly match one of the redirect URIs you registered in the portal - * - code - The authorization_code that the user acquired in the first leg of the flow. - * - codeVerifier - The same code_verifier that was used to obtain the authorization_code. Required if PKCE was used in the authorization code grant request.For more information, see the PKCE RFC: https://tools.ietf.org/html/rfc7636 - * - resourceRequestMethod - HTTP Request type used to request data from the resource (i.e. "GET", "POST", etc.). Used for proof-of-possession flows. - * - resourceRequestUri - URI that token will be used for. Used for proof-of-possession flows. - * - enableSpaAuthCode - Enables the acqusition of a spa authorization code (confidential clients only) - * - tokenQueryParameters - String to string map of custom query parameters added to the /token call - */ -export type CommonAuthorizationCodeRequest = BaseAuthRequest & { - code: string; - redirectUri: string; - codeVerifier?: string; - tokenBodyParameters?: StringDict; - enableSpaAuthorizationCode?: boolean; - clientInfo?: string; - ccsCredential?: CcsCredential; -}; -//# sourceMappingURL=CommonAuthorizationCodeRequest.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/request/CommonAuthorizationCodeRequest.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/request/CommonAuthorizationCodeRequest.d.ts.map deleted file mode 100644 index 16175e7..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/request/CommonAuthorizationCodeRequest.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"CommonAuthorizationCodeRequest.d.ts","sourceRoot":"","sources":["../../../src/request/CommonAuthorizationCodeRequest.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAE5D;;;;;;;;;;;;;;GAcG;AACH,MAAM,MAAM,8BAA8B,GAAG,eAAe,GAAG;IAC3D,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,mBAAmB,CAAC,EAAE,UAAU,CAAC;IACjC,0BAA0B,CAAC,EAAE,OAAO,CAAC;IACrC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,aAAa,CAAC;CACjC,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/request/CommonAuthorizationUrlRequest.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/request/CommonAuthorizationUrlRequest.d.ts deleted file mode 100644 index 84b316f..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/request/CommonAuthorizationUrlRequest.d.ts +++ /dev/null @@ -1,51 +0,0 @@ -import { ResponseMode } from "../utils/Constants.js"; -import { StringDict } from "../utils/MsalTypes.js"; -import { BaseAuthRequest } from "./BaseAuthRequest.js"; -import { AccountInfo } from "../account/AccountInfo.js"; -/** - * Request object passed by user to retrieve a Code from the server (first leg of authorization code grant flow) - * - * - scopes - Array of scopes the application is requesting access to. - * - claims - A stringified claims request which will be added to all /authorize and /token calls - * - authority - Url of the authority which the application acquires tokens from. - * - correlationId - Unique GUID set per request to trace a request end-to-end for telemetry purposes. - * - redirectUri - The redirect URI where authentication responses can be received by your application. It must exactly match one of the redirect URIs registered in the Azure portal. - * - extraScopesToConsent - Scopes for a different resource when the user needs consent upfront. - * - responseMode - Specifies the method that should be used to send the authentication result to your app. Can be query, form_post, or fragment. If no value is passed in, it defaults to query. - * - codeChallenge - Used to secure authorization code grant via Proof of Key for Code Exchange (PKCE). For more information, see the PKCE RCF:https://tools.ietf.org/html/rfc7636 - * - codeChallengeMethod - The method used to encode the code verifier for the code challenge parameter. Can be "plain" or "S256". If excluded, code challenge is assumed to be plaintext. For more information, see the PKCE RCF: https://tools.ietf.org/html/rfc7636 - * - state - A value included in the request that is also returned in the token response. A randomly generated unique value is typically used for preventing cross site request forgery attacks. The state is also used to encode information about the user's state in the app before the authentication request occurred. - * - prompt - Indicates the type of user interaction that is required. - * login: will force the user to enter their credentials on that request, negating single-sign on - * none: will ensure that the user isn't presented with any interactive prompt. if request can't be completed via single-sign on, the endpoint will return an interaction_required error - * consent: will the trigger the OAuth consent dialog after the user signs in, asking the user to grant permissions to the app - * select_account: will interrupt single sign-=on providing account selection experience listing all the accounts in session or any remembered accounts or an option to choose to use a different account - * create: will direct the user to the account creation experience instead of the log in experience - * no_session: will not read existing session token when authenticating the user. Upon user being successfully authenticated, EVO won’t create a new session for the user. FOR INTERNAL USE ONLY. - * - account - AccountInfo obtained from a getAccount API. Will be used in certain scenarios to generate login_hint if both loginHint and sid params are not provided. - * - loginHint - Can be used to pre-fill the username/email address field of the sign-in page for the user, if you know the username/email address ahead of time. Often apps use this parameter during re-authentication, having already extracted the username from a previous sign-in using the preferred_username claim. - * - sid - Session ID, unique identifier for the session. Available as an optional claim on ID tokens. - * - domainHint - Provides a hint about the tenant or domain that the user should use to sign in. The value of the domain hint is a registered domain for the tenant. - * - extraQueryParameters - String to string map of custom query parameters added to the /authorize call - * - tokenQueryParameters - String to string map of custom query parameters added to the /token call - * - nonce - A value included in the request that is returned in the id token. A randomly generated unique value is typically used to mitigate replay attacks. - * - resourceRequestMethod - HTTP Request type used to request data from the resource (i.e. "GET", "POST", etc.). Used for proof-of-possession flows. - * - resourceRequestUri - URI that token will be used for. Used for proof-of-possession flows. - */ -export type CommonAuthorizationUrlRequest = BaseAuthRequest & { - redirectUri: string; - responseMode: ResponseMode; - account?: AccountInfo; - codeChallenge?: string; - codeChallengeMethod?: string; - domainHint?: string; - extraQueryParameters?: StringDict; - extraScopesToConsent?: Array; - loginHint?: string; - nonce?: string; - prompt?: string; - sid?: string; - state?: string; - nativeBroker?: boolean; -}; -//# sourceMappingURL=CommonAuthorizationUrlRequest.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/request/CommonAuthorizationUrlRequest.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/request/CommonAuthorizationUrlRequest.d.ts.map deleted file mode 100644 index 3b5dd4c..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/request/CommonAuthorizationUrlRequest.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"CommonAuthorizationUrlRequest.d.ts","sourceRoot":"","sources":["../../../src/request/CommonAuthorizationUrlRequest.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAExD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,MAAM,MAAM,6BAA6B,GAAG,eAAe,GAAG;IAC1D,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,YAAY,CAAC;IAC3B,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,oBAAoB,CAAC,EAAE,UAAU,CAAC;IAClC,oBAAoB,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACrC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,OAAO,CAAC;CAC1B,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/request/CommonClientCredentialRequest.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/request/CommonClientCredentialRequest.d.ts deleted file mode 100644 index 81b322e..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/request/CommonClientCredentialRequest.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { BaseAuthRequest } from "./BaseAuthRequest.js"; -import { AzureRegion } from "../authority/AzureRegion.js"; -import { ClientAssertion } from "../account/ClientCredentials.js"; -/** - * CommonClientCredentialRequest - * - scopes - Array of scopes the application is requesting access to. - * - authority - URL of the authority, the security token service (STS) from which MSAL will acquire tokens. - * - correlationId - Unique GUID set per request to trace a request end-to-end for telemetry purposes. - * - skipCache - Skip token cache lookup and force request to authority to get a a new token. Defaults to false. - * - preferredAzureRegionOptions - Options of the user's preferred azure region - * - tokenQueryParameters - String to string map of custom query parameters added to the /token call - */ -export type CommonClientCredentialRequest = BaseAuthRequest & { - skipCache?: boolean; - azureRegion?: AzureRegion; - clientAssertion?: ClientAssertion; -}; -//# sourceMappingURL=CommonClientCredentialRequest.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/request/CommonClientCredentialRequest.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/request/CommonClientCredentialRequest.d.ts.map deleted file mode 100644 index 728270d..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/request/CommonClientCredentialRequest.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"CommonClientCredentialRequest.d.ts","sourceRoot":"","sources":["../../../src/request/CommonClientCredentialRequest.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAElE;;;;;;;;GAQG;AACH,MAAM,MAAM,6BAA6B,GAAG,eAAe,GAAG;IAC1D,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,eAAe,CAAC,EAAE,eAAe,CAAC;CACrC,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/request/CommonDeviceCodeRequest.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/request/CommonDeviceCodeRequest.d.ts deleted file mode 100644 index f6c291b..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/request/CommonDeviceCodeRequest.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { DeviceCodeResponse } from "../response/DeviceCodeResponse.js"; -import { StringDict } from "../utils/MsalTypes.js"; -import { BaseAuthRequest } from "./BaseAuthRequest.js"; -/** - * Parameters for Oauth2 device code flow. - * - scopes - Array of scopes the application is requesting access to. - * - authority: - URL of the authority, the security token service (STS) from which MSAL will acquire tokens. If authority is set on client application object, this will override that value. Overriding the value will cause for authority validation to happen each time. If the same authority will be used for all request, set on the application object instead of the requests. - * - correlationId - Unique GUID set per request to trace a request end-to-end for telemetry purposes. - * - deviceCodeCallback - Callback containing device code response. Message should be shown to end user. End user can then navigate to the verification_uri, input the user_code, and input credentials. - * - cancel - Boolean to cancel polling of device code endpoint. While the user authenticates on a separate device, MSAL polls the the token endpoint of security token service for the interval specified in the device code response (usually 15 minutes). To stop polling and cancel the request, set cancel=true. - * - resourceRequestMethod - HTTP Request type used to request data from the resource (i.e. "GET", "POST", etc.). Used for proof-of-possession flows. - * - resourceRequestUri - URI that token will be used for. Used for proof-of-possession flows. - * - timeout - Timeout period in seconds which the user explicitly configures for the polling of the device code endpoint. At the end of this period; assuming the device code has not expired yet; the device code polling is stopped and the request cancelled. The device code expiration window will always take precedence over this set period. - * - extraQueryParameters - String to string map of custom query parameters added to the query string - */ -export type CommonDeviceCodeRequest = Omit & { - deviceCodeCallback: (response: DeviceCodeResponse) => void; - cancel?: boolean; - timeout?: number; - extraQueryParameters?: StringDict; -}; -//# sourceMappingURL=CommonDeviceCodeRequest.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/request/CommonDeviceCodeRequest.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/request/CommonDeviceCodeRequest.d.ts.map deleted file mode 100644 index d8ba661..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/request/CommonDeviceCodeRequest.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"CommonDeviceCodeRequest.d.ts","sourceRoot":"","sources":["../../../src/request/CommonDeviceCodeRequest.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AACvE,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAEvD;;;;;;;;;;;GAWG;AAEH,MAAM,MAAM,uBAAuB,GAAG,IAAI,CACtC,eAAe,EACf,sBAAsB,CACzB,GAAG;IACA,kBAAkB,EAAE,CAAC,QAAQ,EAAE,kBAAkB,KAAK,IAAI,CAAC;IAC3D,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,oBAAoB,CAAC,EAAE,UAAU,CAAC;CACrC,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/request/CommonEndSessionRequest.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/request/CommonEndSessionRequest.d.ts deleted file mode 100644 index ab0540c..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/request/CommonEndSessionRequest.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { AccountInfo } from "../account/AccountInfo.js"; -import { StringDict } from "../utils/MsalTypes.js"; -/** - * CommonEndSessionRequest - * - account - Account object that will be logged out of. All tokens tied to this account will be cleared. - * - postLogoutRedirectUri - URI to navigate to after logout page. - * - correlationId - Unique GUID set per request to trace a request end-to-end for telemetry purposes. - * - idTokenHint - ID Token used by B2C to validate logout if required by the policy - * - state - A value included in the request to the logout endpoint which will be returned in the query string upon post logout redirection - * - logoutHint - A string that specifies the account that is being logged out in order to skip the server account picker on logout - * - extraQueryParameters - String to string map of custom query parameters added to the /authorize call - */ -export type CommonEndSessionRequest = { - correlationId: string; - account?: AccountInfo | null; - postLogoutRedirectUri?: string | null; - idTokenHint?: string; - state?: string; - logoutHint?: string; - extraQueryParameters?: StringDict; -}; -//# sourceMappingURL=CommonEndSessionRequest.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/request/CommonEndSessionRequest.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/request/CommonEndSessionRequest.d.ts.map deleted file mode 100644 index 9504d46..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/request/CommonEndSessionRequest.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"CommonEndSessionRequest.d.ts","sourceRoot":"","sources":["../../../src/request/CommonEndSessionRequest.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAEnD;;;;;;;;;GASG;AACH,MAAM,MAAM,uBAAuB,GAAG;IAClC,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,CAAC,EAAE,WAAW,GAAG,IAAI,CAAC;IAC7B,qBAAqB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,oBAAoB,CAAC,EAAE,UAAU,CAAC;CACrC,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/request/CommonOnBehalfOfRequest.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/request/CommonOnBehalfOfRequest.d.ts deleted file mode 100644 index 72dfa7c..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/request/CommonOnBehalfOfRequest.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { BaseAuthRequest } from "./BaseAuthRequest.js"; -/** - * - scopes - Array of scopes the application is requesting access to. - * - authority - URL of the authority, the security token service (STS) from which MSAL will acquire tokens. - * - correlationId - Unique GUID set per request to trace a request end-to-end for telemetry purposes. - * - oboAssertion - The access token that was sent to the middle-tier API. This token must have an audience of the app making this OBO request. - * - skipCache - Skip token cache lookup and force request to authority to get a a new token. Defaults to false. - * - tokenQueryParameters - String to string map of custom query parameters added to the /token call - */ -export type CommonOnBehalfOfRequest = BaseAuthRequest & { - oboAssertion: string; - skipCache?: boolean; -}; -//# sourceMappingURL=CommonOnBehalfOfRequest.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/request/CommonOnBehalfOfRequest.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/request/CommonOnBehalfOfRequest.d.ts.map deleted file mode 100644 index a44fc1f..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/request/CommonOnBehalfOfRequest.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"CommonOnBehalfOfRequest.d.ts","sourceRoot":"","sources":["../../../src/request/CommonOnBehalfOfRequest.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAEvD;;;;;;;GAOG;AACH,MAAM,MAAM,uBAAuB,GAAG,eAAe,GAAG;IACpD,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;CACvB,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/request/CommonRefreshTokenRequest.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/request/CommonRefreshTokenRequest.d.ts deleted file mode 100644 index 73c1170..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/request/CommonRefreshTokenRequest.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { BaseAuthRequest } from "./BaseAuthRequest.js"; -import { CcsCredential } from "../account/CcsCredential.js"; -import { StringDict } from "../utils/MsalTypes.js"; -/** - * CommonRefreshTokenRequest - * - scopes - Array of scopes the application is requesting access to. - * - claims - A stringified claims request which will be added to all /authorize and /token calls - * - authority - URL of the authority, the security token service (STS) from which MSAL will acquire tokens. - * - correlationId - Unique GUID set per request to trace a request end-to-end for telemetry purposes. - * - refreshToken - A refresh token returned from a previous request to the Identity provider. - * - resourceRequestMethod - HTTP Request type used to request data from the resource (i.e. "GET", "POST", etc.). Used for proof-of-possession flows. - * - resourceRequestUri - URI that token will be used for. Used for proof-of-possession flows. - * - forceCache - Force MSAL to cache a refresh token flow response when there is no account in the cache. Used for migration scenarios. - * - tokenQueryParameters - String to string map of custom query parameters added to the /token call - */ -export type CommonRefreshTokenRequest = BaseAuthRequest & { - refreshToken: string; - ccsCredential?: CcsCredential; - forceCache?: boolean; - tokenBodyParameters?: StringDict; - redirectUri?: string; -}; -//# sourceMappingURL=CommonRefreshTokenRequest.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/request/CommonRefreshTokenRequest.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/request/CommonRefreshTokenRequest.d.ts.map deleted file mode 100644 index 3e80c4d..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/request/CommonRefreshTokenRequest.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"CommonRefreshTokenRequest.d.ts","sourceRoot":"","sources":["../../../src/request/CommonRefreshTokenRequest.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAEnD;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,yBAAyB,GAAG,eAAe,GAAG;IACtD,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,mBAAmB,CAAC,EAAE,UAAU,CAAC;IACjC,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/request/CommonSilentFlowRequest.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/request/CommonSilentFlowRequest.d.ts deleted file mode 100644 index ba6a3d5..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/request/CommonSilentFlowRequest.d.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { AccountInfo } from "../account/AccountInfo.js"; -import { StringDict } from "../utils/MsalTypes.js"; -import { BaseAuthRequest } from "./BaseAuthRequest.js"; -/** - * SilentFlow parameters passed by the user to retrieve credentials silently - * - scopes - Array of scopes the application is requesting access to. - * - claims - A stringified claims request which will be added to all /authorize and /token calls. When included on a silent request, cache lookup will be skipped and token will be refreshed. - * - authority - Url of the authority which the application acquires tokens from. - * - correlationId - Unique GUID set per request to trace a request end-to-end for telemetry purposes. - * - account - Account entity to lookup the credentials. - * - forceRefresh - Forces silent requests to make network calls if true. - * - resourceRequestMethod - HTTP Request type used to request data from the resource (i.e. "GET", "POST", etc.). Used for proof-of-possession flows. - * - resourceRequestUri - URI that token will be used for. Used for proof-of-possession flows. - * - tokenQueryParameters - String to string map of custom query parameters added to the /token call - */ -export type CommonSilentFlowRequest = BaseAuthRequest & { - /** Account object to lookup the credentials */ - account: AccountInfo; - /** Skip cache lookup and forces network call(s) to get fresh tokens */ - forceRefresh: boolean; - /** RedirectUri registered on the app registration - only required in brokering scenarios */ - redirectUri?: string; - /** Key value pairs to include on the POST body to the /token endpoint */ - tokenBodyParameters?: StringDict; - /** If refresh token will expire within the configured value, consider it already expired. Used to pre-emptively invoke interaction when cached refresh token is close to expiry. */ - refreshTokenExpirationOffsetSeconds?: number; -}; -//# sourceMappingURL=CommonSilentFlowRequest.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/request/CommonSilentFlowRequest.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/request/CommonSilentFlowRequest.d.ts.map deleted file mode 100644 index d8161f4..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/request/CommonSilentFlowRequest.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"CommonSilentFlowRequest.d.ts","sourceRoot":"","sources":["../../../src/request/CommonSilentFlowRequest.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAEvD;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,uBAAuB,GAAG,eAAe,GAAG;IACpD,+CAA+C;IAC/C,OAAO,EAAE,WAAW,CAAC;IACrB,uEAAuE;IACvE,YAAY,EAAE,OAAO,CAAC;IACtB,4FAA4F;IAC5F,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,yEAAyE;IACzE,mBAAmB,CAAC,EAAE,UAAU,CAAC;IACjC,oLAAoL;IACpL,mCAAmC,CAAC,EAAE,MAAM,CAAC;CAChD,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/request/CommonUsernamePasswordRequest.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/request/CommonUsernamePasswordRequest.d.ts deleted file mode 100644 index e0cf6d5..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/request/CommonUsernamePasswordRequest.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { BaseAuthRequest } from "./BaseAuthRequest.js"; -/** - * CommonUsernamePassword parameters passed by the user to retrieve credentials - * Note: The latest OAuth 2.0 Security Best Current Practice disallows the password grant entirely. This flow is added for internal testing. - * - * - scopes - Array of scopes the application is requesting access to. - * - claims - A stringified claims request which will be added to all /authorize and /token calls. When included on a silent request, cache lookup will be skipped and token will be refreshed. - * - authority - Url of the authority which the application acquires tokens from. - * - correlationId - Unique GUID set per request to trace a request end-to-end for telemetry purposes. - * - username - username of the client - * - password - credentials - * - tokenQueryParameters - String to string map of custom query parameters added to the /token call - */ -export type CommonUsernamePasswordRequest = BaseAuthRequest & { - username: string; - password: string; -}; -//# sourceMappingURL=CommonUsernamePasswordRequest.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/request/CommonUsernamePasswordRequest.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/request/CommonUsernamePasswordRequest.d.ts.map deleted file mode 100644 index 06cce1d..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/request/CommonUsernamePasswordRequest.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"CommonUsernamePasswordRequest.d.ts","sourceRoot":"","sources":["../../../src/request/CommonUsernamePasswordRequest.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAEvD;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,6BAA6B,GAAG,eAAe,GAAG;IAC1D,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;CACpB,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/request/NativeRequest.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/request/NativeRequest.d.ts deleted file mode 100644 index cde0db2..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/request/NativeRequest.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { StringDict } from "../utils/MsalTypes.js"; -export type NativeRequest = { - clientId: string; - authority: string; - correlationId: string; - redirectUri: string; - scopes: Array; - claims?: string; - authenticationScheme?: string; - resourceRequestMethod?: string; - resourceRequestUri?: string; - shrNonce?: string; - accountId?: string; - forceRefresh?: boolean; - extraParameters?: StringDict; - extraScopesToConsent?: Array; - loginHint?: string; - prompt?: string; -}; -//# sourceMappingURL=NativeRequest.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/request/NativeRequest.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/request/NativeRequest.d.ts.map deleted file mode 100644 index 36830d4..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/request/NativeRequest.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"NativeRequest.d.ts","sourceRoot":"","sources":["../../../src/request/NativeRequest.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAEnD,MAAM,MAAM,aAAa,GAAG;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,eAAe,CAAC,EAAE,UAAU,CAAC;IAC7B,oBAAoB,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACrC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/request/NativeSignOutRequest.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/request/NativeSignOutRequest.d.ts deleted file mode 100644 index b80ee0a..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/request/NativeSignOutRequest.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -export type NativeSignOutRequest = { - clientId: string; - accountId: string; - correlationId: string; -}; -//# sourceMappingURL=NativeSignOutRequest.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/request/NativeSignOutRequest.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/request/NativeSignOutRequest.d.ts.map deleted file mode 100644 index 2c01d76..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/request/NativeSignOutRequest.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"NativeSignOutRequest.d.ts","sourceRoot":"","sources":["../../../src/request/NativeSignOutRequest.ts"],"names":[],"mappings":"AAKA,MAAM,MAAM,oBAAoB,GAAG;IAC/B,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;CACzB,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/request/RequestParameterBuilder.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/request/RequestParameterBuilder.d.ts deleted file mode 100644 index 60d495e..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/request/RequestParameterBuilder.d.ts +++ /dev/null @@ -1,225 +0,0 @@ -import { ResponseMode } from "../utils/Constants.js"; -import { StringDict } from "../utils/MsalTypes.js"; -import { ApplicationTelemetry, LibraryInfo } from "../config/ClientConfiguration.js"; -import { ServerTelemetryManager } from "../telemetry/server/ServerTelemetryManager.js"; -import { ClientInfo } from "../account/ClientInfo.js"; -import { IPerformanceClient } from "../telemetry/performance/IPerformanceClient.js"; -/** @internal */ -export declare class RequestParameterBuilder { - private parameters; - private readonly performanceClient?; - private readonly correlationId?; - constructor(correlationId?: string, performanceClient?: IPerformanceClient); - /** - * add response_type = code - */ - addResponseTypeCode(): void; - /** - * add response_type = token id_token - */ - addResponseTypeForTokenAndIdToken(): void; - /** - * add response_mode. defaults to query. - * @param responseMode - */ - addResponseMode(responseMode?: ResponseMode): void; - /** - * Add flag to indicate STS should attempt to use WAM if available - */ - addNativeBroker(): void; - /** - * add scopes. set addOidcScopes to false to prevent default scopes in non-user scenarios - * @param scopeSet - * @param addOidcScopes - */ - addScopes(scopes: string[], addOidcScopes?: boolean, defaultScopes?: Array): void; - /** - * add clientId - * @param clientId - */ - addClientId(clientId: string): void; - /** - * add redirect_uri - * @param redirectUri - */ - addRedirectUri(redirectUri: string): void; - /** - * add post logout redirectUri - * @param redirectUri - */ - addPostLogoutRedirectUri(redirectUri: string): void; - /** - * add id_token_hint to logout request - * @param idTokenHint - */ - addIdTokenHint(idTokenHint: string): void; - /** - * add domain_hint - * @param domainHint - */ - addDomainHint(domainHint: string): void; - /** - * add login_hint - * @param loginHint - */ - addLoginHint(loginHint: string): void; - /** - * Adds the CCS (Cache Credential Service) query parameter for login_hint - * @param loginHint - */ - addCcsUpn(loginHint: string): void; - /** - * Adds the CCS (Cache Credential Service) query parameter for account object - * @param loginHint - */ - addCcsOid(clientInfo: ClientInfo): void; - /** - * add sid - * @param sid - */ - addSid(sid: string): void; - /** - * add claims - * @param claims - */ - addClaims(claims?: string, clientCapabilities?: Array): void; - /** - * add correlationId - * @param correlationId - */ - addCorrelationId(correlationId: string): void; - /** - * add library info query params - * @param libraryInfo - */ - addLibraryInfo(libraryInfo: LibraryInfo): void; - /** - * Add client telemetry parameters - * @param appTelemetry - */ - addApplicationTelemetry(appTelemetry: ApplicationTelemetry): void; - /** - * add prompt - * @param prompt - */ - addPrompt(prompt: string): void; - /** - * add state - * @param state - */ - addState(state: string): void; - /** - * add nonce - * @param nonce - */ - addNonce(nonce: string): void; - /** - * add code_challenge and code_challenge_method - * - throw if either of them are not passed - * @param codeChallenge - * @param codeChallengeMethod - */ - addCodeChallengeParams(codeChallenge: string, codeChallengeMethod: string): void; - /** - * add the `authorization_code` passed by the user to exchange for a token - * @param code - */ - addAuthorizationCode(code: string): void; - /** - * add the `authorization_code` passed by the user to exchange for a token - * @param code - */ - addDeviceCode(code: string): void; - /** - * add the `refreshToken` passed by the user - * @param refreshToken - */ - addRefreshToken(refreshToken: string): void; - /** - * add the `code_verifier` passed by the user to exchange for a token - * @param codeVerifier - */ - addCodeVerifier(codeVerifier: string): void; - /** - * add client_secret - * @param clientSecret - */ - addClientSecret(clientSecret: string): void; - /** - * add clientAssertion for confidential client flows - * @param clientAssertion - */ - addClientAssertion(clientAssertion: string): void; - /** - * add clientAssertionType for confidential client flows - * @param clientAssertionType - */ - addClientAssertionType(clientAssertionType: string): void; - /** - * add OBO assertion for confidential client flows - * @param clientAssertion - */ - addOboAssertion(oboAssertion: string): void; - /** - * add grant type - * @param grantType - */ - addRequestTokenUse(tokenUse: string): void; - /** - * add grant type - * @param grantType - */ - addGrantType(grantType: string): void; - /** - * add client info - * - */ - addClientInfo(): void; - /** - * add extraQueryParams - * @param eQParams - */ - addExtraQueryParameters(eQParams: StringDict): void; - addClientCapabilitiesToClaims(claims?: string, clientCapabilities?: Array): string; - /** - * adds `username` for Password Grant flow - * @param username - */ - addUsername(username: string): void; - /** - * adds `password` for Password Grant flow - * @param password - */ - addPassword(password: string): void; - /** - * add pop_jwk to query params - * @param cnfString - */ - addPopToken(cnfString: string): void; - /** - * add SSH JWK and key ID to query params - */ - addSshJwk(sshJwkString: string): void; - /** - * add server telemetry fields - * @param serverTelemetryManager - */ - addServerTelemetry(serverTelemetryManager: ServerTelemetryManager): void; - /** - * Adds parameter that indicates to the server that throttling is supported - */ - addThrottling(): void; - /** - * Adds logout_hint parameter for "silent" logout which prevent server account picker - */ - addLogoutHint(logoutHint: string): void; - addBrokerParameters(params: { - brokerClientId: string; - brokerRedirectUri: string; - }): void; - /** - * Utility to create a URL from the params map - */ - createQueryString(): string; -} -//# sourceMappingURL=RequestParameterBuilder.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/request/RequestParameterBuilder.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/request/RequestParameterBuilder.d.ts.map deleted file mode 100644 index 2426086..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/request/RequestParameterBuilder.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"RequestParameterBuilder.d.ts","sourceRoot":"","sources":["../../../src/request/RequestParameterBuilder.ts"],"names":[],"mappings":"AAKA,OAAO,EAEH,YAAY,EAQf,MAAM,uBAAuB,CAAC;AAO/B,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAEnD,OAAO,EACH,oBAAoB,EACpB,WAAW,EACd,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,sBAAsB,EAAE,MAAM,+CAA+C,CAAC;AACvF,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,gDAAgD,CAAC;AAyBpF,gBAAgB;AAChB,qBAAa,uBAAuB;IAChC,OAAO,CAAC,UAAU,CAAsB;IACxC,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAC,CAAqB;IACxD,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAS;gBAGpC,aAAa,CAAC,EAAE,MAAM,EACtB,iBAAiB,CAAC,EAAE,kBAAkB;IAO1C;;OAEG;IACH,mBAAmB,IAAI,IAAI;IAO3B;;OAEG;IACH,iCAAiC,IAAI,IAAI;IASzC;;;OAGG;IACH,eAAe,CAAC,YAAY,CAAC,EAAE,YAAY,GAAG,IAAI;IAOlD;;OAEG;IACH,eAAe,IAAI,IAAI;IAOvB;;;;OAIG;IACH,SAAS,CACL,MAAM,EAAE,MAAM,EAAE,EAChB,aAAa,GAAE,OAAc,EAC7B,aAAa,GAAE,KAAK,CAAC,MAAM,CAAuB,GACnD,IAAI;IAmBP;;;OAGG;IACH,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;IAOnC;;;OAGG;IACH,cAAc,CAAC,WAAW,E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,iBAAiB,IAAI,MAAM;CAe9B"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/request/RequestValidator.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/request/RequestValidator.d.ts deleted file mode 100644 index 85cd5c2..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/request/RequestValidator.d.ts +++ /dev/null @@ -1,28 +0,0 @@ -/** - * Validates server consumable params from the "request" objects - */ -export declare class RequestValidator { - /** - * Utility to check if the `redirectUri` in the request is a non-null value - * @param redirectUri - */ - static validateRedirectUri(redirectUri: string): void; - /** - * Utility to validate prompt sent by the user in the request - * @param prompt - */ - static validatePrompt(prompt: string): void; - static validateClaims(claims: string): void; - /** - * Utility to validate code_challenge and code_challenge_method - * @param codeChallenge - * @param codeChallengeMethod - */ - static validateCodeChallengeParams(codeChallenge: string, codeChallengeMethod: string): void; - /** - * Utility to validate code_challenge_method - * @param codeChallengeMethod - */ - static validateCodeChallengeMethod(codeChallengeMethod: string): void; -} -//# sourceMappingURL=RequestValidator.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/request/RequestValidator.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/request/RequestValidator.d.ts.map deleted file mode 100644 index 65729c6..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/request/RequestValidator.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"RequestValidator.d.ts","sourceRoot":"","sources":["../../../src/request/RequestValidator.ts"],"names":[],"mappings":"AAWA;;GAEG;AACH,qBAAa,gBAAgB;IACzB;;;OAGG;IACH,MAAM,CAAC,mBAAmB,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI;IAQrD;;;OAGG;IACH,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAc3C,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAU3C;;;;OAIG;IACH,MAAM,CAAC,2BAA2B,CAC9B,aAAa,EAAE,MAAM,EACrB,mBAAmB,EAAE,MAAM,GAC5B,IAAI;IAUP;;;OAGG;IACH,MAAM,CAAC,2BAA2B,CAAC,mBAAmB,EAAE,MAAM,GAAG,IAAI;CAYxE"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/request/ScopeSet.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/request/ScopeSet.d.ts deleted file mode 100644 index 14832f0..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/request/ScopeSet.d.ts +++ /dev/null @@ -1,89 +0,0 @@ -/** - * The ScopeSet class creates a set of scopes. Scopes are case-insensitive, unique values, so the Set object in JS makes - * the most sense to implement for this class. All scopes are trimmed and converted to lower case strings in intersection and union functions - * to ensure uniqueness of strings. - */ -export declare class ScopeSet { - private scopes; - constructor(inputScopes: Array); - /** - * Factory method to create ScopeSet from space-delimited string - * @param inputScopeString - * @param appClientId - * @param scopesRequired - */ - static fromString(inputScopeString: string): ScopeSet; - /** - * Creates the set of scopes to search for in cache lookups - * @param inputScopeString - * @returns - */ - static createSearchScopes(inputScopeString: Array): ScopeSet; - /** - * Used to validate the scopes input parameter requested by the developer. - * @param {Array} inputScopes - Developer requested permissions. Not all scopes are guaranteed to be included in the access token returned. - * @param {boolean} scopesRequired - Boolean indicating whether the scopes array is required or not - */ - private validateInputScopes; - /** - * Check if a given scope is present in this set of scopes. - * @param scope - */ - containsScope(scope: string): boolean; - /** - * Check if a set of scopes is present in this set of scopes. - * @param scopeSet - */ - containsScopeSet(scopeSet: ScopeSet): boolean; - /** - * Check if set of scopes contains only the defaults - */ - containsOnlyOIDCScopes(): boolean; - /** - * Appends single scope if passed - * @param newScope - */ - appendScope(newScope: string): void; - /** - * Appends multiple scopes if passed - * @param newScopes - */ - appendScopes(newScopes: Array): void; - /** - * Removes element from set of scopes. - * @param scope - */ - removeScope(scope: string): void; - /** - * Removes default scopes from set of scopes - * Primarily used to prevent cache misses if the default scopes are not returned from the server - */ - removeOIDCScopes(): void; - /** - * Combines an array of scopes with the current set of scopes. - * @param otherScopes - */ - unionScopeSets(otherScopes: ScopeSet): Set; - /** - * Check if scopes intersect between this set and another. - * @param otherScopes - */ - intersectingScopeSets(otherScopes: ScopeSet): boolean; - /** - * Returns size of set of scopes. - */ - getScopeCount(): number; - /** - * Returns the scopes as an array of string values - */ - asArray(): Array; - /** - * Prints scopes into a space-delimited string - */ - printScopes(): string; - /** - * Prints scopes into a space-delimited lower-case string (used for caching) - */ - printScopesLowerCase(): string; -} -//# sourceMappingURL=ScopeSet.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/request/ScopeSet.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/request/ScopeSet.d.ts.map deleted file mode 100644 index 465f9cb..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/request/ScopeSet.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ScopeSet.d.ts","sourceRoot":"","sources":["../../../src/request/ScopeSet.ts"],"names":[],"mappings":"AAgBA;;;;GAIG;AACH,qBAAa,QAAQ;IAEjB,OAAO,CAAC,MAAM,CAAc;gBAEhB,WAAW,EAAE,KAAK,CAAC,MAAM,CAAC;IAgBtC;;;;;OAKG;IACH,MAAM,CAAC,UAAU,CAAC,gBAAgB,EAAE,MAAM,GAAG,QAAQ;IAMrD;;;;OAIG;IACH,MAAM,CAAC,kBAAkB,CAAC,gBAAgB,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,QAAQ;IAWpE;;;;OAIG;IACH,OAAO,CAAC,mBAAmB;IAS3B;;;OAGG;IACH,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO;IASrC;;;OAGG;IACH,gBAAgB,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO;IAW7C;;OAEG;IACH,sBAAsB,IAAI,OAAO;IAWjC;;;OAGG;IACH,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;IAMnC;;;OAGG;IACH,YAAY,CAAC,SAAS,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,IAAI;IAU5C;;;OAGG;IACH,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAShC;;;OAGG;IACH,gBAAgB,IAAI,IAAI;IAMxB;;;OAGG;IACH,cAAc,CAAC,WAAW,EAAE,QAAQ,GAAG,GAAG,CAAC,MAAM,CAAC;IAclD;;;OAGG;IACH,qBAAqB,CAAC,WAAW,EAAE,QAAQ,GAAG,OAAO;IAkBrD;;OAEG;IACH,aAAa,IAAI,MAAM;IAIvB;;OAEG;IACH,OAAO,IAAI,KAAK,CAAC,MAAM,CAAC;IAMxB;;OAEG;IACH,WAAW,IAAI,MAAM;IAQrB;;OAEG;IACH,oBAAoB,IAAI,MAAM;CAGjC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/request/StoreInCache.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/request/StoreInCache.d.ts deleted file mode 100644 index 77bdc64..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/request/StoreInCache.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -/** - * Controls whether tokens should be stored in the cache or not. If set to false, tokens may still be acquired and returned but will not be cached for later retrieval. - */ -export type StoreInCache = { - accessToken?: boolean; - idToken?: boolean; - refreshToken?: boolean; -}; -//# sourceMappingURL=StoreInCache.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/request/StoreInCache.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/request/StoreInCache.d.ts.map deleted file mode 100644 index b3e500c..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/request/StoreInCache.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"StoreInCache.d.ts","sourceRoot":"","sources":["../../../src/request/StoreInCache.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG;IAEvB,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB,YAAY,CAAC,EAAE,OAAO,CAAC;CAC1B,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/response/AuthenticationResult.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/response/AuthenticationResult.d.ts deleted file mode 100644 index 9144991..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/response/AuthenticationResult.d.ts +++ /dev/null @@ -1,42 +0,0 @@ -import { AccountInfo } from "../account/AccountInfo.js"; -/** - * Result returned from the authority's token endpoint. - * - uniqueId - `oid` or `sub` claim from ID token - * - tenantId - `tid` claim from ID token - * - scopes - Scopes that are validated for the respective token - * - account - An account object representation of the currently signed-in user - * - idToken - Id token received as part of the response - * - idTokenClaims - MSAL-relevant ID token claims - * - accessToken - Access token or SSH certificate received as part of the response - * - fromCache - Boolean denoting whether token came from cache - * - expiresOn - Javascript Date object representing relative expiration of access token - * - extExpiresOn - Javascript Date object representing extended relative expiration of access token in case of server outage - * - refreshOn - Javascript Date object representing relative time until an access token must be refreshed - * - state - Value passed in by user in request - * - familyId - Family ID identifier, usually only used for refresh tokens - * - requestId - Request ID returned as part of the response - */ -export type AuthenticationResult = { - authority: string; - uniqueId: string; - tenantId: string; - scopes: Array; - account: AccountInfo | null; - idToken: string; - idTokenClaims: object; - accessToken: string; - fromCache: boolean; - expiresOn: Date | null; - extExpiresOn?: Date; - refreshOn?: Date; - tokenType: string; - correlationId: string; - requestId?: string; - state?: string; - familyId?: string; - cloudGraphHostName?: string; - msGraphHost?: string; - code?: string; - fromNativeBroker?: boolean; -}; -//# sourceMappingURL=AuthenticationResult.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/response/AuthenticationResult.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/response/AuthenticationResult.d.ts.map deleted file mode 100644 index 7fb6f63..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/response/AuthenticationResult.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AuthenticationResult.d.ts","sourceRoot":"","sources":["../../../src/response/AuthenticationResult.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAExD;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,MAAM,oBAAoB,GAAG;IAC/B,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACtB,OAAO,EAAE,WAAW,GAAG,IAAI,CAAC;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,EAAE,IAAI,GAAG,IAAI,CAAC;IACvB,YAAY,CAAC,EAAE,IAAI,CAAC;IACpB,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC9B,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/response/AuthorizationCodePayload.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/response/AuthorizationCodePayload.d.ts deleted file mode 100644 index 0b7df7c..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/response/AuthorizationCodePayload.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * Response returned after processing the code response query string or fragment. - */ -export type AuthorizationCodePayload = { - code: string; - cloud_instance_name?: string; - cloud_instance_host_name?: string; - cloud_graph_host_name?: string; - msgraph_host?: string; - state?: string; - nonce?: string; - client_info?: string; -}; -//# sourceMappingURL=AuthorizationCodePayload.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/response/AuthorizationCodePayload.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/response/AuthorizationCodePayload.d.ts.map deleted file mode 100644 index a475355..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/response/AuthorizationCodePayload.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AuthorizationCodePayload.d.ts","sourceRoot":"","sources":["../../../src/response/AuthorizationCodePayload.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAAG;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/response/DeviceCodeResponse.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/response/DeviceCodeResponse.d.ts deleted file mode 100644 index d48789b..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/response/DeviceCodeResponse.d.ts +++ /dev/null @@ -1,26 +0,0 @@ -/** - * DeviceCode returned by the security token service device code endpoint containing information necessary for device code flow. - * - userCode: code which user needs to provide when authenticating at the verification URI - * - deviceCode: code which should be included in the request for the access token - * - verificationUri: URI where user can authenticate - * - expiresIn: expiration time of the device code in seconds - * - interval: interval at which the STS should be polled at - * - message: message which should be displayed to the user - */ -export type DeviceCodeResponse = { - userCode: string; - deviceCode: string; - verificationUri: string; - expiresIn: number; - interval: number; - message: string; -}; -export type ServerDeviceCodeResponse = { - user_code: string; - device_code: string; - verification_uri: string; - expires_in: number; - interval: number; - message: string; -}; -//# sourceMappingURL=DeviceCodeResponse.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/response/DeviceCodeResponse.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/response/DeviceCodeResponse.d.ts.map deleted file mode 100644 index 0d40947..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/response/DeviceCodeResponse.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"DeviceCodeResponse.d.ts","sourceRoot":"","sources":["../../../src/response/DeviceCodeResponse.ts"],"names":[],"mappings":"AAKA;;;;;;;;GAQG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,EAAE,MAAM,CAAC;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG;IACnC,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,gBAAgB,EAAE,MAAM,CAAC;IACzB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;CACnB,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/response/ExternalTokenResponse.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/response/ExternalTokenResponse.d.ts deleted file mode 100644 index af3bafe..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/response/ExternalTokenResponse.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { ServerAuthorizationTokenResponse } from "./ServerAuthorizationTokenResponse.js"; -/** - * Response object used for loading external tokens to cache. - * - token_type: Indicates the token type value. The only type that Azure AD supports is Bearer. - * - scope: The scopes that the access_token is valid for. - * - expires_in: How long the access token is valid (in seconds). - * - id_token: A JSON Web Token (JWT). The app can decode the segments of this token to request information about the user who signed in. - * - refresh_token: An OAuth 2.0 refresh token. The app can use this token acquire additional access tokens after the current access token expires. - * - access_token: The requested access token. The app can use this token to authenticate to the secured resource, such as a web API. - * - client_info: Client info object - */ -export type ExternalTokenResponse = Pick & { - access_token?: string; - client_info?: string; -}; -//# sourceMappingURL=ExternalTokenResponse.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/response/ExternalTokenResponse.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/response/ExternalTokenResponse.d.ts.map deleted file mode 100644 index 003a352..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/response/ExternalTokenResponse.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ExternalTokenResponse.d.ts","sourceRoot":"","sources":["../../../src/response/ExternalTokenResponse.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,gCAAgC,EAAE,MAAM,uCAAuC,CAAC;AAEzF;;;;;;;;;GASG;AACH,MAAM,MAAM,qBAAqB,GAAG,IAAI,CACpC,gCAAgC,EAC9B,YAAY,GACZ,OAAO,GACP,YAAY,GACZ,gBAAgB,GAChB,UAAU,GACV,eAAe,GACf,0BAA0B,GAC1B,MAAM,CACX,GAAG;IACA,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/response/IMDSBadResponse.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/response/IMDSBadResponse.d.ts deleted file mode 100644 index 909bb27..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/response/IMDSBadResponse.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export type IMDSBadResponse = { - error: string; - "newest-versions": Array; -}; -//# sourceMappingURL=IMDSBadResponse.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/response/IMDSBadResponse.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/response/IMDSBadResponse.d.ts.map deleted file mode 100644 index 8036ca8..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/response/IMDSBadResponse.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"IMDSBadResponse.d.ts","sourceRoot":"","sources":["../../../src/response/IMDSBadResponse.ts"],"names":[],"mappings":"AAKA,MAAM,MAAM,eAAe,GAAG;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,iBAAiB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;CACpC,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/response/ResponseHandler.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/response/ResponseHandler.d.ts deleted file mode 100644 index 2d9141a..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/response/ResponseHandler.d.ts +++ /dev/null @@ -1,70 +0,0 @@ -import { ServerAuthorizationTokenResponse } from "./ServerAuthorizationTokenResponse.js"; -import { ICrypto } from "../crypto/ICrypto.js"; -import { ServerAuthorizationCodeResponse } from "./ServerAuthorizationCodeResponse.js"; -import { Logger } from "../logger/Logger.js"; -import { AuthenticationResult } from "./AuthenticationResult.js"; -import { AccountEntity } from "../cache/entities/AccountEntity.js"; -import { Authority } from "../authority/Authority.js"; -import { CacheRecord } from "../cache/entities/CacheRecord.js"; -import { CacheManager } from "../cache/CacheManager.js"; -import { RequestStateObject } from "../utils/ProtocolUtils.js"; -import { ICachePlugin } from "../cache/interface/ICachePlugin.js"; -import { ISerializableTokenCache } from "../cache/interface/ISerializableTokenCache.js"; -import { AuthorizationCodePayload } from "./AuthorizationCodePayload.js"; -import { BaseAuthRequest } from "../request/BaseAuthRequest.js"; -import { IPerformanceClient } from "../telemetry/performance/IPerformanceClient.js"; -import { TokenClaims } from "../account/TokenClaims.js"; -/** - * Class that handles response parsing. - * @internal - */ -export declare class ResponseHandler { - private clientId; - private cacheStorage; - private cryptoObj; - private logger; - private homeAccountIdentifier; - private serializableCache; - private persistencePlugin; - private performanceClient?; - constructor(clientId: string, cacheStorage: CacheManager, cryptoObj: ICrypto, logger: Logger, serializableCache: ISerializableTokenCache | null, persistencePlugin: ICachePlugin | null, performanceClient?: IPerformanceClient); - /** - * Function which validates server authorization code response. - * @param serverResponseHash - * @param requestState - * @param cryptoObj - */ - validateServerAuthorizationCodeResponse(serverResponse: ServerAuthorizationCodeResponse, requestState: string): void; - /** - * Function which validates server authorization token response. - * @param serverResponse - * @param refreshAccessToken - */ - validateTokenResponse(serverResponse: ServerAuthorizationTokenResponse, refreshAccessToken?: boolean): void; - /** - * Returns a constructed token response based on given string. Also manages the cache updates and cleanups. - * @param serverTokenResponse - * @param authority - */ - handleServerTokenResponse(serverTokenResponse: ServerAuthorizationTokenResponse, authority: Authority, reqTimestamp: number, request: BaseAuthRequest, authCodePayload?: AuthorizationCodePayload, userAssertionHash?: string, handlingRefreshTokenResponse?: boolean, forceCacheRefreshTokenResponse?: boolean, serverRequestId?: string): Promise; - /** - * Generates CacheRecord - * @param serverTokenResponse - * @param idTokenObj - * @param authority - */ - private generateCacheRecord; - /** - * Creates an @AuthenticationResult from @CacheRecord , @IdToken , and a boolean that states whether or not the result is from cache. - * - * Optionally takes a state string that is set as-is in the response. - * - * @param cacheRecord - * @param idTokenObj - * @param fromTokenCache - * @param stateString - */ - static generateAuthenticationResult(cryptoObj: ICrypto, authority: Authority, cacheRecord: CacheRecord, fromTokenCache: boolean, request: BaseAuthRequest, idTokenClaims?: TokenClaims, requestState?: RequestStateObject, serverTokenResponse?: ServerAuthorizationTokenResponse, requestId?: string): Promise; -} -export declare function buildAccountToCache(cacheStorage: CacheManager, authority: Authority, homeAccountId: string, base64Decode: (input: string) => string, correlationId: string, idTokenClaims?: TokenClaims, clientInfo?: string, environment?: string, claimsTenantId?: string | null, authCodePayload?: AuthorizationCodePayload, nativeAccountId?: string, logger?: Logger): AccountEntity; -//# sourceMappingURL=ResponseHandler.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/response/ResponseHandler.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/response/ResponseHandler.d.ts.map deleted file mode 100644 index df5efbf..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/response/ResponseHandler.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ResponseHandler.d.ts","sourceRoot":"","sources":["../../../src/response/ResponseHandler.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,gCAAgC,EAAE,MAAM,uCAAuC,CAAC;AACzF,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAK/C,OAAO,EAAE,+BAA+B,EAAE,MAAM,sCAAsC,CAAC;AACvF,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAG7C,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AACnE,OAAO,EAAE,S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,yBAAyB,CAC3B,mBAAmB,EAAE,gCAAgC,EACrD,SAAS,EAAE,SAAS,EACpB,YAAY,EAAE,MAAM,EACpB,OAAO,EAAE,eAAe,EACxB,eAAe,CAAC,EAAE,wBAAwB,EAC1C,iBAAiB,CAAC,EAAE,MAAM,EAC1B,4BAA4B,CAAC,EAAE,OAAO,EACtC,8BAA8B,CAAC,EAAE,OAAO,EACxC,eAAe,CAAC,EAAE,MAAM,GACzB,OAAO,CAAC,oBAAoB,CAAC;IAgJhC;;;;;OAKG;IACH,OAAO,CAAC,mBAAmB;IA+I3B;;;;;;;;;OASG;WACU,4BAA4B,CACrC,SAAS,EAAE,OAAO,EAClB,SAAS,EAAE,SAAS,EACpB,WAAW,EAAE,WAAW,EACxB,cAAc,EAAE,OAAO,EACvB,OAAO,EAAE,eAAe,EACxB,aAAa,CAAC,EAAE,WAAW,EAC3B,YAAY,CAAC,EAAE,kBAAkB,EACjC,mBAAmB,CAAC,EAAE,gCAAgC,EACtD,SAAS,CAAC,EAAE,MAAM,GACnB,OAAO,CAAC,oBAAoB,CAAC;CA0GnC;AAED,wBAAgB,mBAAmB,CAC/B,YAAY,EAAE,YAAY,EAC1B,SAAS,EAAE,SAAS,EACpB,aAAa,EAAE,MAAM,EACrB,YAAY,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,EACvC,aAAa,EAAE,MAAM,EACrB,aAAa,CAAC,EAAE,WAAW,EAC3B,UAAU,CAAC,EAAE,MAAM,EACnB,WAAW,CAAC,EAAE,MAAM,EACpB,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,EAC9B,eAAe,CAAC,EAAE,wBAAwB,EAC1C,eAAe,CAAC,EAAE,MAAM,EACxB,MAAM,CAAC,EAAE,MAAM,GAChB,aAAa,CAqDf"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/response/ServerAuthorizationCodeResponse.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/response/ServerAuthorizationCodeResponse.d.ts deleted file mode 100644 index dc6de1c..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/response/ServerAuthorizationCodeResponse.d.ts +++ /dev/null @@ -1,27 +0,0 @@ -/** - * Deserialized response object from server authorization code request. - * - code: authorization code from server - * - client_info: client info object - * - state: OAuth2 request state - * - error: error sent back in hash - * - error: description - */ -export type ServerAuthorizationCodeResponse = { - code?: string; - client_info?: string; - state?: string; - cloud_instance_name?: string; - cloud_instance_host_name?: string; - cloud_graph_host_name?: string; - msgraph_host?: string; - error?: string; - error_uri?: string; - error_description?: string; - suberror?: string; - timestamp?: string; - trace_id?: string; - correlation_id?: string; - claims?: string; - accountId?: string; -}; -//# sourceMappingURL=ServerAuthorizationCodeResponse.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/response/ServerAuthorizationCodeResponse.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/response/ServerAuthorizationCodeResponse.d.ts.map deleted file mode 100644 index 30a9785..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/response/ServerAuthorizationCodeResponse.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ServerAuthorizationCodeResponse.d.ts","sourceRoot":"","sources":["../../../src/response/ServerAuthorizationCodeResponse.ts"],"names":[],"mappings":"AAKA;;;;;;;GAOG;AACH,MAAM,MAAM,+BAA+B,GAAG;IAE1C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/response/ServerAuthorizationTokenResponse.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/response/ServerAuthorizationTokenResponse.d.ts deleted file mode 100644 index ce762b4..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/response/ServerAuthorizationTokenResponse.d.ts +++ /dev/null @@ -1,48 +0,0 @@ -import { AuthenticationScheme } from "../utils/Constants.js"; -/** - * Deserialized response object from server authorization code request. - * - token_type: Indicates the token type value. Can be either Bearer or pop. - * - scope: The scopes that the access_token is valid for. - * - expires_in: How long the access token is valid (in seconds). - * - refresh_in: Duration afer which a token should be renewed, regardless of expiration. - * - ext_expires_in: How long the access token is valid (in seconds) if the server isn't responding. - * - access_token: The requested access token. The app can use this token to authenticate to the secured resource, such as a web API. - * - refresh_token: An OAuth 2.0 refresh token. The app can use this token acquire additional access tokens after the current access token expires. - * - id_token: A JSON Web Token (JWT). The app can decode the segments of this token to request information about the user who signed in. - * - key_id: A string that uniquely identifies a public key that the request is bound to. - * - * In case of error: - * - error: An error code string that can be used to classify types of errors that occur, and can be used to react to errors. - * - error_description: A specific error message that can help a developer identify the root cause of an authentication error. - * - error_codes: A list of STS-specific error codes that can help in diagnostics. - * - timestamp: The time at which the error occurred. - * - trace_id: A unique identifier for the request that can help in diagnostics. - * - correlation_id: A unique identifier for the request that can help in diagnostics across components. - * - status: the network request's response status - */ -export type ServerAuthorizationTokenResponse = { - status?: number; - token_type?: AuthenticationScheme; - scope?: string; - expires_in?: number; - refresh_in?: number; - ext_expires_in?: number; - access_token?: string; - refresh_token?: string; - refresh_token_expires_in?: number; - id_token?: string; - client_info?: string; - foci?: string; - spa_code?: string; - spa_accountid?: string; - key_id?: string; - error?: string; - error_description?: string; - error_codes?: Array; - suberror?: string; - timestamp?: string; - trace_id?: string; - correlation_id?: string; - claims?: string; -}; -//# sourceMappingURL=ServerAuthorizationTokenResponse.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/response/ServerAuthorizationTokenResponse.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/response/ServerAuthorizationTokenResponse.d.ts.map deleted file mode 100644 index e69448d..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/response/ServerAuthorizationTokenResponse.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ServerAuthorizationTokenResponse.d.ts","sourceRoot":"","sources":["../../../src/response/ServerAuthorizationTokenResponse.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAE7D;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,MAAM,gCAAgC,GAAG;IAC3C,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,UAAU,CAAC,EAAE,oBAAoB,CAAC;IAClC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,WAAW,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC5B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/telemetry/performance/IPerformanceClient.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/telemetry/performance/IPerformanceClient.d.ts deleted file mode 100644 index 5a5136a..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/telemetry/performance/IPerformanceClient.d.ts +++ /dev/null @@ -1,58 +0,0 @@ -import { PerformanceEvent } from "./PerformanceEvent.js"; -import { IPerformanceMeasurement } from "./IPerformanceMeasurement.js"; -export type PerformanceCallbackFunction = (events: PerformanceEvent[]) => void; -export type InProgressPerformanceEvent = { - end: (event?: Partial, error?: unknown) => PerformanceEvent | null; - discard: () => void; - add: (fields: { - [key: string]: {} | undefined; - }) => void; - increment: (fields: { - [key: string]: number | undefined; - }) => void; - event: PerformanceEvent; - /** - * @deprecated This attribute will be removed in the next major version - */ - measurement: IPerformanceMeasurement; -}; -export interface IPerformanceClient { - startMeasurement(measureName: string, correlationId?: string): InProgressPerformanceEvent; - endMeasurement(event: PerformanceEvent): PerformanceEvent | null; - discardMeasurements(correlationId: string): void; - addFields(fields: { - [key: string]: {} | undefined; - }, correlationId: string): void; - incrementFields(fields: { - [key: string]: number | undefined; - }, correlationId: string): void; - removePerformanceCallback(callbackId: string): boolean; - addPerformanceCallback(callback: PerformanceCallbackFunction): string; - emitEvents(events: PerformanceEvent[], correlationId: string): void; - /** - * @deprecated This method will be removed in the next major version - */ - startPerformanceMeasurement(measureName: string, correlationId: string): IPerformanceMeasurement; - generateId(): string; - calculateQueuedTime(preQueueTime: number, currentTime: number): number; - addQueueMeasurement(eventName: string, correlationId?: string, queueTime?: number, manuallyCompleted?: boolean): void; - setPreQueueTime(eventName: string, correlationId?: string): void; -} -/** - * Queue measurement type - */ -export type QueueMeasurement = { - /** - * Name of performance event - */ - eventName: string; - /** - * Time spent in JS queue - */ - queueTime: number; - /** - * Incomplete pre-queue events are instrumentation bugs that should be fixed. - */ - manuallyCompleted?: boolean; -}; -//# sourceMappingURL=IPerformanceClient.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/telemetry/performance/IPerformanceClient.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/telemetry/performance/IPerformanceClient.d.ts.map deleted file mode 100644 index 25199ca..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/telemetry/performance/IPerformanceClient.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"IPerformanceClient.d.ts","sourceRoot":"","sources":["../../../../src/telemetry/performance/IPerformanceClient.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAEvE,MAAM,MAAM,2BAA2B,GAAG,CAAC,MAAM,EAAE,gBAAgB,EAAE,KAAK,IAAI,CAAC;AAE/E,MAAM,MAAM,0BAA0B,GAAG;IACrC,GAAG,EAAE,CACD,KAAK,CAAC,EAAE,OAAO,CAAC,gBAAgB,CAAC,EACjC,KAAK,CAAC,EAAE,OAAO,KACd,gBAAgB,GAAG,IAAI,CAAC;IAC7B,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,GAAG,EAAE,CAAC,MAAM,EAAE;QAAE,C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f,SAAS,EAAE,MAAM,EACjB,aAAa,CAAC,EAAE,MAAM,EACtB,SAAS,CAAC,EAAE,MAAM,EAClB,iBAAiB,CAAC,EAAE,OAAO,GAC5B,IAAI,CAAC;IACR,eAAe,CAAC,SAAS,EAAE,MAAM,EAAE,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACpE;AAED;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC3B;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC/B,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/telemetry/performance/IPerformanceMeasurement.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/telemetry/performance/IPerformanceMeasurement.d.ts deleted file mode 100644 index 8f4648d..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/telemetry/performance/IPerformanceMeasurement.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -export interface IPerformanceMeasurement { - startMeasurement(): void; - endMeasurement(): void; - flushMeasurement(): number | null; -} -//# sourceMappingURL=IPerformanceMeasurement.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/telemetry/performance/IPerformanceMeasurement.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/telemetry/performance/IPerformanceMeasurement.d.ts.map deleted file mode 100644 index 5d3b3a7..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/telemetry/performance/IPerformanceMeasurement.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"IPerformanceMeasurement.d.ts","sourceRoot":"","sources":["../../../../src/telemetry/performance/IPerformanceMeasurement.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,uBAAuB;IACpC,gBAAgB,IAAI,IAAI,CAAC;IACzB,cAAc,IAAI,IAAI,CAAC;IACvB,gBAAgB,IAAI,MAAM,GAAG,IAAI,CAAC;CACrC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/telemetry/performance/PerformanceClient.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/telemetry/performance/PerformanceClient.d.ts deleted file mode 100644 index 116847b..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/telemetry/performance/PerformanceClient.d.ts +++ /dev/null @@ -1,243 +0,0 @@ -import { ApplicationTelemetry } from "../../config/ClientConfiguration.js"; -import { Logger } from "../../logger/Logger.js"; -import { InProgressPerformanceEvent, IPerformanceClient, PerformanceCallbackFunction, QueueMeasurement } from "./IPerformanceClient.js"; -import { PerformanceEvent, PerformanceEventContext, PerformanceEvents, PerformanceEventStackedContext } from "./PerformanceEvent.js"; -import { IPerformanceMeasurement } from "./IPerformanceMeasurement.js"; -export interface PreQueueEvent { - name: PerformanceEvents; - time: number; -} -/** - * Starts context by adding payload to the stack - * @param event {PerformanceEvent} - * @param abbreviations {Map} event name abbreviations - * @param stack {?PerformanceEventStackedContext[]} stack - */ -export declare function startContext(event: PerformanceEvent, abbreviations: Map, stack?: PerformanceEventStackedContext[]): void; -/** - * Ends context by removing payload from the stack and returning parent or self, if stack is empty, payload - * - * @param event {PerformanceEvent} - * @param abbreviations {Map} event name abbreviations - * @param stack {?PerformanceEventStackedContext[]} stack - * @param error {?unknown} error - */ -export declare function endContext(event: PerformanceEvent, abbreviations: Map, stack?: PerformanceEventStackedContext[], error?: unknown): PerformanceEventContext | undefined; -/** - * Adds error name and stack trace to the telemetry event - * @param error {Error} - * @param logger {Logger} - * @param event {PerformanceEvent} - * @param stackMaxSize {number} max error stack size to capture - */ -export declare function addError(error: unknown, logger: Logger, event: PerformanceEvent, stackMaxSize?: number): void; -/** - * Compacts error stack into array by fetching N first entries - * @param stack {string} error stack - * @param stackMaxSize {number} max error stack size to capture - * @returns {string[]} - */ -export declare function compactStack(stack: string, stackMaxSize: number): string[]; -/** - * Compacts error stack line by shortening file path - * Example: https://localhost/msal-common/src/authority/Authority.js:100:1 -> Authority.js:100:1 - * @param line {string} stack line - * @returns {string} - */ -export declare function compactStackLine(line: string): string; -export declare abstract class PerformanceClient implements IPerformanceClient { - protected authority: string; - protected libraryName: string; - protected libraryVersion: string; - protected applicationTelemetry: ApplicationTelemetry; - protected clientId: string; - protected logger: Logger; - protected callbacks: Map; - /** - * Multiple events with the same correlation id. - * @protected - * @type {Map} - */ - protected eventsByCorrelationId: Map; - /** - * Map of pre-queue times by correlation Id - * - * @protected - * @type {Map} - */ - protected preQueueTimeByCorrelationId: Map; - /** - * Map of queue measurements by correlation Id - * - * @protected - * @type {Map>} - */ - protected queueMeasurements: Map>; - protected intFields: Set; - /** - * Map of stacked events by correlation id. - * - * @protected - */ - protected eventStack: Map; - /** - * Event name abbreviations - * - * @protected - */ - protected abbreviations: Map; - /** - * Creates an instance of PerformanceClient, - * an abstract class containing core performance telemetry logic. - * - * @constructor - * @param {string} clientId Client ID of the application - * @param {string} authority Authority used by the application - * @param {Logger} logger Logger used by the application - * @param {string} libraryName Name of the library - * @param {string} libraryVersion Version of the library - * @param {ApplicationTelemetry} applicationTelemetry application name and version - * @param {Set} intFields integer fields to be truncated - * @param {Map} abbreviations event name abbreviations - */ - constructor(clientId: string, authority: string, logger: Logger, libraryName: string, libraryVersion: string, applicationTelemetry: ApplicationTelemetry, intFields?: Set, abbreviations?: Map); - /** - * Generates and returns a unique id, typically a guid. - * - * @abstract - * @returns {string} - */ - abstract generateId(): string; - /** - * Starts and returns an platform-specific implementation of IPerformanceMeasurement. - * Note: this function can be changed to abstract at the next major version bump. - * - * @param {string} measureName - * @param {string} correlationId - * @returns {IPerformanceMeasurement} - * @deprecated This method will be removed in the next major version - */ - startPerformanceMeasurement(measureName: string, // eslint-disable-line @typescript-eslint/no-unused-vars - correlationId: string): IPerformanceMeasurement; - /** - * Sets pre-queue time by correlation Id - * - * @abstract - * @param {PerformanceEvents} eventName - * @param {string} correlationId - * @returns - */ - abstract setPreQueueTime(eventName: PerformanceEvents, correlationId?: string): void; - /** - * Gets map of pre-queue times by correlation Id - * - * @param {PerformanceEvents} eventName - * @param {string} correlationId - * @returns {number} - */ - getPreQueueTime(eventName: string, correlationId: string): number | void; - /** - * Calculates the difference between current time and time when function was queued. - * Note: It is possible to have 0 as the queue time if the current time and the queued time was the same. - * - * @param {number} preQueueTime - * @param {number} currentTime - * @returns {number} - */ - calculateQueuedTime(preQueueTime: number, currentTime: number): number; - /** - * Adds queue measurement time to QueueMeasurements array for given correlation ID. - * - * @param {PerformanceEvents} eventName - * @param {?string} correlationId - * @param {?number} queueTime - * @param {?boolean} manuallyCompleted - indicator for manually completed queue measurements - * @returns - */ - addQueueMeasurement(eventName: string, correlationId?: string, queueTime?: number, manuallyCompleted?: boolean): void; - /** - * Starts measuring performance for a given operation. Returns a function that should be used to end the measurement. - * - * @param {PerformanceEvents} measureName - * @param {?string} [correlationId] - * @returns {InProgressPerformanceEvent} - */ - startMeasurement(measureName: string, correlationId?: string): InProgressPerformanceEvent; - /** - * Stops measuring the performance for an operation. Should only be called directly by PerformanceClient classes, - * as consumers should instead use the function returned by startMeasurement. - * Adds a new field named as "[event name]DurationMs" for sub-measurements, completes and emits an event - * otherwise. - * - * @param {PerformanceEvent} event - * @param {unknown} error - * @returns {(PerformanceEvent | null)} - */ - endMeasurement(event: PerformanceEvent, error?: unknown): PerformanceEvent | null; - /** - * Saves extra information to be emitted when the measurements are flushed - * @param fields - * @param correlationId - */ - addFields(fields: { - [key: string]: {} | undefined; - }, correlationId: string): void; - /** - * Increment counters to be emitted when the measurements are flushed - * @param fields {string[]} - * @param correlationId {string} correlation identifier - */ - incrementFields(fields: { - [key: string]: number | undefined; - }, correlationId: string): void; - /** - * Upserts event into event cache. - * First key is the correlation id, second key is the event id. - * Allows for events to be grouped by correlation id, - * and to easily allow for properties on them to be updated. - * - * @private - * @param {PerformanceEvent} event - */ - protected cacheEventByCorrelationId(event: PerformanceEvent): void; - private getQueueInfo; - /** - * Removes measurements and aux data for a given correlation id. - * - * @param {string} correlationId - */ - discardMeasurements(correlationId: string): void; - /** - * Registers a callback function to receive performance events. - * - * @param {PerformanceCallbackFunction} callback - * @returns {string} - */ - addPerformanceCallback(callback: PerformanceCallbackFunction): string; - /** - * Removes a callback registered with addPerformanceCallback. - * - * @param {string} callbackId - * @returns {boolean} - */ - removePerformanceCallback(callbackId: string): boolean; - /** - * Emits events to all registered callbacks. - * - * @param {PerformanceEvent[]} events - * @param {?string} [correlationId] - */ - emitEvents(events: PerformanceEvent[], correlationId: string): void; - /** - * Enforce truncation of integral fields in performance event. - * @param {PerformanceEvent} event performance event to update. - */ - private truncateIntegralFields; - /** - * Returns event duration in milliseconds - * @param startTimeMs {number} - * @returns {number} - */ - private getDurationMs; -} -//# sourceMappingURL=PerformanceClient.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/telemetry/performance/PerformanceClient.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/telemetry/performance/PerformanceClient.d.ts.map deleted file mode 100644 index 9159447..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/telemetry/performance/PerformanceClient.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"PerformanceClient.d.ts","sourceRoot":"","sources":["../../../../src/telemetry/performance/PerformanceClient.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAC3E,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,EACH,0BAA0B,EAC1B,kBAAkB,EAClB,2BAA2B,EAC3B,gBAAgB,EACnB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAEH,gBAAgB,EAEhB,uBAAuB,EACvB,iBAAiB,EACjB,8BAA8B,EAEjC,MAAM,uBAAuB,CAAC;AAC/B,O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Q9B;;;;OAIG;IACH,OAAO,CAAC,aAAa;CAKxB"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/telemetry/performance/PerformanceEvent.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/telemetry/performance/PerformanceEvent.d.ts deleted file mode 100644 index e95dbee..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/telemetry/performance/PerformanceEvent.d.ts +++ /dev/null @@ -1,521 +0,0 @@ -/** - * Enumeration of operations that are instrumented by have their performance measured by the PerformanceClient. - * - * @export - * @enum {number} - */ -export declare const PerformanceEvents: { - /** - * acquireTokenByCode API (msal-browser and msal-node). - * Used to acquire tokens by trading an authorization code against the token endpoint. - */ - readonly AcquireTokenByCode: "acquireTokenByCode"; - /** - * acquireTokenByRefreshToken API (msal-browser and msal-node). - * Used to renew an access token using a refresh token against the token endpoint. - */ - readonly AcquireTokenByRefreshToken: "acquireTokenByRefreshToken"; - /** - * acquireTokenSilent API (msal-browser and msal-node). - * Used to silently acquire a new access token (from the cache or the network). - */ - readonly AcquireTokenSilent: "acquireTokenSilent"; - /** - * acquireTokenSilentAsync (msal-browser). - * Internal API for acquireTokenSilent. - */ - readonly AcquireTokenSilentAsync: "acquireTokenSilentAsync"; - /** - * acquireTokenPopup (msal-browser). - * Used to acquire a new access token interactively through pop ups - */ - readonly AcquireTokenPopup: "acquireTokenPopup"; - /** - * acquireTokenPreRedirect (msal-browser). - * First part of the redirect flow. - * Used to acquire a new access token interactively through redirects. - */ - readonly AcquireTokenPreRedirect: "acquireTokenPreRedirect"; - /** - * acquireTokenRedirect (msal-browser). - * Second part of the redirect flow. - * Used to acquire a new access token interactively through redirects. - */ - readonly AcquireTokenRedirect: "acquireTokenRedirect"; - /** - * getPublicKeyThumbprint API in CryptoOpts class (msal-browser). - * Used to generate a public/private keypair and generate a public key thumbprint for pop requests. - */ - readonly CryptoOptsGetPublicKeyThumbprint: "cryptoOptsGetPublicKeyThumbprint"; - /** - * signJwt API in CryptoOpts class (msal-browser). - * Used to signed a pop token. - */ - readonly CryptoOptsSignJwt: "cryptoOptsSignJwt"; - /** - * acquireToken API in the SilentCacheClient class (msal-browser). - * Used to read access tokens from the cache. - */ - readonly SilentCacheClientAcquireToken: "silentCacheClientAcquireToken"; - /** - * acquireToken API in the SilentIframeClient class (msal-browser). - * Used to acquire a new set of tokens from the authorize endpoint in a hidden iframe. - */ - readonly SilentIframeClientAcquireToken: "silentIframeClientAcquireToken"; - readonly AwaitConcurrentIframe: "awaitConcurrentIframe"; - /** - * acquireToken API in SilentRereshClient (msal-browser). - * Used to acquire a new set of tokens from the token endpoint using a refresh token. - */ - readonly SilentRefreshClientAcquireToken: "silentRefreshClientAcquireToken"; - /** - * ssoSilent API (msal-browser). - * Used to silently acquire an authorization code and set of tokens using a hidden iframe. - */ - readonly SsoSilent: "ssoSilent"; - /** - * getDiscoveredAuthority API in StandardInteractionClient class (msal-browser). - * Used to load authority metadata for a request. - */ - readonly StandardInteractionClientGetDiscoveredAuthority: "standardInteractionClientGetDiscoveredAuthority"; - /** - * acquireToken APIs in msal-browser. - * Used to make an /authorize endpoint call with native brokering enabled. - */ - readonly FetchAccountIdWithNativeBroker: "fetchAccountIdWithNativeBroker"; - /** - * acquireToken API in NativeInteractionClient class (msal-browser). - * Used to acquire a token from Native component when native brokering is enabled. - */ - readonly NativeInteractionClientAcquireToken: "nativeInteractionClientAcquireToken"; - /** - * Time spent creating default headers for requests to token endpoint - */ - readonly BaseClientCreateTokenRequestHeaders: "baseClientCreateTokenRequestHeaders"; - /** - * Time spent sending/waiting for the response of a request to the token endpoint - */ - readonly NetworkClientSendPostRequestAsync: "networkClientSendPostRequestAsync"; - readonly RefreshTokenClientExecutePostToTokenEndpoint: "refreshTokenClientExecutePostToTokenEndpoint"; - readonly AuthorizationCodeClientExecutePostToTokenEndpoint: "authorizationCodeClientExecutePostToTokenEndpoint"; - /** - * Used to measure the time taken for completing embedded-broker handshake (PW-Broker). - */ - readonly BrokerHandhshake: "brokerHandshake"; - /** - * acquireTokenByRefreshToken API in BrokerClientApplication (PW-Broker) . - */ - readonly AcquireTokenByRefreshTokenInBroker: "acquireTokenByRefreshTokenInBroker"; - /** - * Time taken for token acquisition by broker - */ - readonly AcquireTokenByBroker: "acquireTokenByBroker"; - /** - * Time spent on the network for refresh token acquisition - */ - readonly RefreshTokenClientExecuteTokenRequest: "refreshTokenClientExecuteTokenRequest"; - /** - * Time taken for acquiring refresh token , records RT size - */ - readonly RefreshTokenClientAcquireToken: "refreshTokenClientAcquireToken"; - /** - * Time taken for acquiring cached refresh token - */ - readonly RefreshTokenClientAcquireTokenWithCachedRefreshToken: "refreshTokenClientAcquireTokenWithCachedRefreshToken"; - /** - * acquireTokenByRefreshToken API in RefreshTokenClient (msal-common). - */ - readonly RefreshTokenClientAcquireTokenByRefreshToken: "refreshTokenClientAcquireTokenByRefreshToken"; - /** - * Helper function to create token request body in RefreshTokenClient (msal-common). - */ - readonly RefreshTokenClientCreateTokenRequestBody: "refreshTokenClientCreateTokenRequestBody"; - /** - * acquireTokenFromCache (msal-browser). - * Internal API for acquiring token from cache - */ - readonly AcquireTokenFromCache: "acquireTokenFromCache"; - readonly SilentFlowClientAcquireCachedToken: "silentFlowClientAcquireCachedToken"; - readonly SilentFlowClientGenerateResultFromCacheRecord: "silentFlowClientGenerateResultFromCacheRecord"; - /** - * acquireTokenBySilentIframe (msal-browser). - * Internal API for acquiring token by silent Iframe - */ - readonly AcquireTokenBySilentIframe: "acquireTokenBySilentIframe"; - /** - * Internal API for initializing base request in BaseInteractionClient (msal-browser) - */ - readonly InitializeBaseRequest: "initializeBaseRequest"; - /** - * Internal API for initializing silent request in SilentCacheClient (msal-browser) - */ - readonly InitializeSilentRequest: "initializeSilentRequest"; - readonly InitializeClientApplication: "initializeClientApplication"; - /** - * Helper function in SilentIframeClient class (msal-browser). - */ - readonly SilentIframeClientTokenHelper: "silentIframeClientTokenHelper"; - /** - * SilentHandler - */ - readonly SilentHandlerInitiateAuthRequest: "silentHandlerInitiateAuthRequest"; - readonly SilentHandlerMonitorIframeForHash: "silentHandlerMonitorIframeForHash"; - readonly SilentHandlerLoadFrame: "silentHandlerLoadFrame"; - readonly SilentHandlerLoadFrameSync: "silentHandlerLoadFrameSync"; - /** - * Helper functions in StandardInteractionClient class (msal-browser) - */ - readonly StandardInteractionClientCreateAuthCodeClient: "standardInteractionClientCreateAuthCodeClient"; - readonly StandardInteractionClientGetClientConfiguration: "standardInteractionClientGetClientConfiguration"; - readonly StandardInteractionClientInitializeAuthorizationRequest: "standardInteractionClientInitializeAuthorizationRequest"; - readonly StandardInteractionClientInitializeAuthorizationCodeRequest: "standardInteractionClientInitializeAuthorizationCodeRequest"; - /** - * getAuthCodeUrl API (msal-browser and msal-node). - */ - readonly GetAuthCodeUrl: "getAuthCodeUrl"; - /** - * Functions from InteractionHandler (msal-browser) - */ - readonly HandleCodeResponseFromServer: "handleCodeResponseFromServer"; - readonly HandleCodeResponse: "handleCodeResponse"; - readonly UpdateTokenEndpointAuthority: "updateTokenEndpointAuthority"; - /** - * APIs in Authorization Code Client (msal-common) - */ - readonly AuthClientAcquireToken: "authClientAcquireToken"; - readonly AuthClientExecuteTokenRequest: "authClientExecuteTokenRequest"; - readonly AuthClientCreateTokenRequestBody: "authClientCreateTokenRequestBody"; - readonly AuthClientCreateQueryString: "authClientCreateQueryString"; - /** - * Generate functions in PopTokenGenerator (msal-common) - */ - readonly PopTokenGenerateCnf: "popTokenGenerateCnf"; - readonly PopTokenGenerateKid: "popTokenGenerateKid"; - /** - * handleServerTokenResponse API in ResponseHandler (msal-common) - */ - readonly HandleServerTokenResponse: "handleServerTokenResponse"; - readonly DeserializeResponse: "deserializeResponse"; - /** - * Authority functions - */ - readonly AuthorityFactoryCreateDiscoveredInstance: "authorityFactoryCreateDiscoveredInstance"; - readonly AuthorityResolveEndpointsAsync: "authorityResolveEndpointsAsync"; - readonly AuthorityResolveEndpointsFromLocalSources: "authorityResolveEndpointsFromLocalSources"; - readonly AuthorityGetCloudDiscoveryMetadataFromNetwork: "authorityGetCloudDiscoveryMetadataFromNetwork"; - readonly AuthorityUpdateCloudDiscoveryMetadata: "authorityUpdateCloudDiscoveryMetadata"; - readonly AuthorityGetEndpointMetadataFromNetwork: "authorityGetEndpointMetadataFromNetwork"; - readonly AuthorityUpdateEndpointMetadata: "authorityUpdateEndpointMetadata"; - readonly AuthorityUpdateMetadataWithRegionalInformation: "authorityUpdateMetadataWithRegionalInformation"; - /** - * Region Discovery functions - */ - readonly RegionDiscoveryDetectRegion: "regionDiscoveryDetectRegion"; - readonly RegionDiscoveryGetRegionFromIMDS: "regionDiscoveryGetRegionFromIMDS"; - readonly RegionDiscoveryGetCurrentVersion: "regionDiscoveryGetCurrentVersion"; - readonly AcquireTokenByCodeAsync: "acquireTokenByCodeAsync"; - readonly GetEndpointMetadataFromNetwork: "getEndpointMetadataFromNetwork"; - readonly GetCloudDiscoveryMetadataFromNetworkMeasurement: "getCloudDiscoveryMetadataFromNetworkMeasurement"; - readonly HandleRedirectPromiseMeasurement: "handleRedirectPromise"; - readonly HandleNativeRedirectPromiseMeasurement: "handleNativeRedirectPromise"; - readonly UpdateCloudDiscoveryMetadataMeasurement: "updateCloudDiscoveryMetadataMeasurement"; - readonly UsernamePasswordClientAcquireToken: "usernamePasswordClientAcquireToken"; - readonly NativeMessageHandlerHandshake: "nativeMessageHandlerHandshake"; - readonly NativeGenerateAuthResult: "nativeGenerateAuthResult"; - readonly RemoveHiddenIframe: "removeHiddenIframe"; - /** - * Cache operations - */ - readonly ClearTokensAndKeysWithClaims: "clearTokensAndKeysWithClaims"; - readonly CacheManagerGetRefreshToken: "cacheManagerGetRefreshToken"; - /** - * Crypto Operations - */ - readonly GeneratePkceCodes: "generatePkceCodes"; - readonly GenerateCodeVerifier: "generateCodeVerifier"; - readonly GenerateCodeChallengeFromVerifier: "generateCodeChallengeFromVerifier"; - readonly Sha256Digest: "sha256Digest"; - readonly GetRandomValues: "getRandomValues"; -}; -export type PerformanceEvents = (typeof PerformanceEvents)[keyof typeof PerformanceEvents]; -export declare const PerformanceEventAbbreviations: ReadonlyMap; -/** - * State of the performance event. - * - * @export - * @enum {number} - */ -export declare const PerformanceEventStatus: { - readonly NotStarted: 0; - readonly InProgress: 1; - readonly Completed: 2; -}; -export type PerformanceEventStatus = (typeof PerformanceEventStatus)[keyof typeof PerformanceEventStatus]; -export type SubMeasurement = { - name: string; - startTimeMs: number; -}; -/** - * Performance measurement taken by the library, including metadata about the request and application. - * - * @export - * @typedef {PerformanceEvent} - */ -export type PerformanceEvent = { - /** - * Unique id for the event - * - * @type {string} - */ - eventId: string; - /** - * State of the perforance measure. - * - * @type {PerformanceEventStatus} - */ - status: PerformanceEventStatus; - /** - * Login authority used for the request - * - * @type {string} - */ - authority: string; - /** - * Client id for the application - * - * @type {string} - */ - clientId: string; - /** - * Correlation ID used for the request - * - * @type {string} - */ - correlationId: string; - /** - * End-to-end duration in milliseconds. - * @date 3/22/2022 - 3:40:05 PM - * - * @type {number} - */ - durationMs?: number; - /** - * Visibility of the page when the event completed. - * Read from: https://developer.mozilla.org/docs/Web/API/Page_Visibility_API - * - * @type {?(string | null)} - */ - endPageVisibility?: string | null; - /** - * Whether the result was retrieved from the cache. - * - * @type {(boolean | null)} - */ - fromCache?: boolean | null; - /** - * Event name (usually in the form of classNameFunctionName) - * - * @type {string} - */ - name: string; - /** - * Visibility of the page when the event completed. - * Read from: https://developer.mozilla.org/docs/Web/API/Page_Visibility_API - * - * @type {?(string | null)} - */ - startPageVisibility?: string | null; - /** - * Unix millisecond timestamp when the event was initiated. - * - * @type {number} - */ - startTimeMs: number; - /** - * Whether or the operation completed successfully. - * - * @type {(boolean | null)} - */ - success?: boolean | null; - /** - * Add specific error code in case of failure - * - * @type {string} - */ - errorCode?: string; - /** - * Add specific sub error code in case of failure - * - * @type {string} - */ - subErrorCode?: string; - /** - * Server error number - */ - serverErrorNo?: string; - /** - * Name of the library used for the operation. - * - * @type {string} - */ - libraryName: string; - /** - * Version of the library used for the operation. - * - * @type {string} - */ - libraryVersion: string; - /** - * Whether the response is from a native component (e.g., WAM) - * - * @type {?boolean} - */ - isNativeBroker?: boolean; - /** - * Request ID returned from the response - * - * @type {?string} - */ - requestId?: string; - /** - * Cache lookup policy - * - * @type {?number} - */ - cacheLookupPolicy?: number | undefined; - /** - * Cache Outcome - * @type {?number} - */ - cacheOutcome?: number; - /** - * Amount of time spent in the JS queue in milliseconds. - * - * @type {?number} - */ - queuedTimeMs?: number; - /** - * Sub-measurements for internal use. To be deleted before flushing. - */ - incompleteSubMeasurements?: Map; - visibilityChangeCount?: number; - incompleteSubsCount?: number; - /** - * CorrelationId of the in progress iframe request that was awaited - */ - awaitIframeCorrelationId?: string; - /** - * Amount of times queued in the JS event queue. - * - * @type {?number} - */ - queuedCount?: number; - /** - * Amount of manually completed queue events. - * - * @type {?number} - */ - queuedManuallyCompletedCount?: number; - /** - * Size of the id token - * - * @type {number} - */ - idTokenSize?: number; - /** - * - * Size of the access token - * - * @type {number} - */ - accessTokenSize?: number; - /** - * - * Size of the refresh token - * - * @type {number} - */ - refreshTokenSize?: number | undefined; - /** - * Application name as specified by the app. - * - * @type {?string} - */ - appName?: string; - /** - * Application version as specified by the app. - * - * @type {?string} - */ - appVersion?: string; - /** - * The following are fields that may be emitted in native broker scenarios - */ - extensionId?: string; - extensionVersion?: string; - matsBrokerVersion?: string; - matsAccountJoinOnStart?: string; - matsAccountJoinOnEnd?: string; - matsDeviceJoin?: string; - matsPromptBehavior?: string; - matsApiErrorCode?: number; - matsUiVisible?: boolean; - matsSilentCode?: number; - matsSilentBiSubCode?: number; - matsSilentMessage?: string; - matsSilentStatus?: number; - matsHttpStatus?: number; - matsHttpEventCount?: number; - /** - * Http POST metadata - */ - httpVerToken?: string; - httpStatus?: number; - contentTypeHeader?: string; - contentLengthHeader?: string; - /** - * Native broker fields - */ - allowNativeBroker?: boolean; - extensionInstalled?: boolean; - extensionHandshakeTimeoutMs?: number; - extensionHandshakeTimedOut?: boolean; - /** - * Nested App Auth Fields - */ - nestedAppAuthRequest?: boolean; - /** - * Multiple matched access/id/refresh tokens in the cache - */ - multiMatchedAT?: number; - multiMatchedID?: number; - multiMatchedRT?: number; - errorName?: string; - errorStack?: string[]; - context?: string; - cacheRtCount?: number; - cacheIdCount?: number; - cacheAtCount?: number; - scenarioId?: string; - accountType?: "AAD" | "MSA" | "B2C"; - /** - * Server error that triggers a request retry - * - * @type {string} - */ - retryError?: string; - embeddedClientId?: string; - embeddedRedirectUri?: string; -}; -export type PerformanceEventContext = { - dur?: number; - err?: string; - subErr?: string; - fail?: number; -}; -export type PerformanceEventStackedContext = PerformanceEventContext & { - name?: string; - childErr?: string; -}; -export declare const IntFields: ReadonlySet; -//# sourceMappingURL=PerformanceEvent.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/telemetry/performance/PerformanceEvent.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/telemetry/performance/PerformanceEvent.d.ts.map deleted file mode 100644 index 560754e..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/telemetry/performance/PerformanceEvent.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"PerformanceEvent.d.ts","sourceRoot":"","sources":["../../../../src/telemetry/performance/PerformanceEvent.ts"],"names":[],"mappings":"AAKA;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB;IAC1B;;;OAGG;;IAGH;;;OAGG;;IAGH;;;OAGG;;IAGH;;;OAGG;;IAGH;;;OAGG;;IAGH;;;;OAIG;;IAGH;;;;OAIG;;IAGH;;;OAGG;;IAGH;;;OAGG;;IAGH;;;OAGG;;IAGH;;;OAGG;;;IAIH;;;OAGG;;IAGH;;;OAGG;;IAGH;;;OAGG;;IAIH;;;OAGG;;IAGH;;;OAGG;;IAEH;;OAEG;;IAEH;;OAEG;;;;IAMH;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;IAGH;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C,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IAGtB,OAAO,CAAC,EAAE,MAAM,CAAC;IAGjB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;IAGtB,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB,WAAW,CAAC,EAAE,KAAK,GAAG,KAAK,GAAG,KAAK,CAAC;IAEpC;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAChC,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG;IAClC,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,8BAA8B,GAAG,uBAAuB,GAAG;IACnE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,WAAW,CAAC,MAAM,CAaxC,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/telemetry/performance/StubPerformanceClient.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/telemetry/performance/StubPerformanceClient.d.ts deleted file mode 100644 index bb4832b..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/telemetry/performance/StubPerformanceClient.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { IPerformanceClient, InProgressPerformanceEvent } from "./IPerformanceClient.js"; -import { IPerformanceMeasurement } from "./IPerformanceMeasurement.js"; -import { PerformanceEvent } from "./PerformanceEvent.js"; -export declare class StubPerformanceMeasurement implements IPerformanceMeasurement { - startMeasurement(): void; - endMeasurement(): void; - flushMeasurement(): number | null; -} -export declare class StubPerformanceClient implements IPerformanceClient { - generateId(): string; - startMeasurement(measureName: string, correlationId?: string | undefined): InProgressPerformanceEvent; - startPerformanceMeasurement(): IPerformanceMeasurement; - calculateQueuedTime(): number; - addQueueMeasurement(): void; - setPreQueueTime(): void; - endMeasurement(): PerformanceEvent | null; - discardMeasurements(): void; - removePerformanceCallback(): boolean; - addPerformanceCallback(): string; - emitEvents(): void; - addFields(): void; - incrementFields(): void; - cacheEventByCorrelationId(): void; -} -//# sourceMappingURL=StubPerformanceClient.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/telemetry/performance/StubPerformanceClient.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/telemetry/performance/StubPerformanceClient.d.ts.map deleted file mode 100644 index c429039..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/telemetry/performance/StubPerformanceClient.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"StubPerformanceClient.d.ts","sourceRoot":"","sources":["../../../../src/telemetry/performance/StubPerformanceClient.ts"],"names":[],"mappings":"AAKA,OAAO,EACH,kBAAkB,EAClB,0BAA0B,EAC7B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EACH,gBAAgB,EAEnB,MAAM,uBAAuB,CAAC;AAE/B,qBAAa,0BAA2B,YAAW,uBAAuB;IACtE,gBAAgB,IAAI,IAAI;IAGxB,cAAc,IAAI,IAAI;IAGtB,gBAAgB,IAAI,MAAM,GAAG,IAAI;CAGpC;AAED,qBAAa,qBAAsB,YAAW,kBAAkB;IAC5D,UAAU,IAAI,MAAM;IAIpB,gBAAgB,CACZ,WAAW,EAAE,MAAM,EACnB,aAAa,CAAC,EAAE,MAAM,GAAG,SAAS,GACnC,0BAA0B;IAqB7B,2BAA2B,IAAI,uBAAuB;IAGtD,mBAAmB,IAAI,MAAM;IAI7B,mBAAmB,IAAI,IAAI;IAI3B,eAAe,IAAI,IAAI;IAIvB,cAAc,IAAI,gBAAgB,GAAG,IAAI;IAIzC,mBAAmB,IAAI,IAAI;IAI3B,yBAAyB,IAAI,OAAO;IAIpC,sBAAsB,IAAI,MAAM;IAIhC,UAAU,IAAI,IAAI;IAIlB,SAAS,IAAI,IAAI;IAIjB,eAAe,IAAI,IAAI;IAIvB,yBAAyB,IAAI,IAAI;CAGpC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/telemetry/server/ServerTelemetryManager.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/telemetry/server/ServerTelemetryManager.d.ts deleted file mode 100644 index 14cf6ec..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/telemetry/server/ServerTelemetryManager.d.ts +++ /dev/null @@ -1,79 +0,0 @@ -import { CacheOutcome } from "../../utils/Constants.js"; -import { CacheManager } from "../../cache/CacheManager.js"; -import { ServerTelemetryRequest } from "./ServerTelemetryRequest.js"; -import { ServerTelemetryEntity } from "../../cache/entities/ServerTelemetryEntity.js"; -import { RegionDiscoveryMetadata } from "../../authority/RegionDiscoveryMetadata.js"; -type SkuParams = { - libraryName?: string; - libraryVersion?: string; - extensionName?: string; - extensionVersion?: string; - skus?: string; -}; -/** @internal */ -export declare class ServerTelemetryManager { - private cacheManager; - private apiId; - private correlationId; - private telemetryCacheKey; - private wrapperSKU; - private wrapperVer; - private regionUsed; - private regionSource; - private regionOutcome; - private cacheOutcome; - constructor(telemetryRequest: ServerTelemetryRequest, cacheManager: CacheManager); - /** - * API to add MSER Telemetry to request - */ - generateCurrentRequestHeaderValue(): string; - /** - * API to add MSER Telemetry for the last failed request - */ - generateLastRequestHeaderValue(): string; - /** - * API to cache token failures for MSER data capture - * @param error - */ - cacheFailedRequest(error: unknown): void; - /** - * Update server telemetry cache entry by incrementing cache hit counter - */ - incrementCacheHits(): number; - /** - * Get the server telemetry entity from cache or initialize a new one - */ - getLastRequests(): ServerTelemetryEntity; - /** - * Remove server telemetry cache entry - */ - clearTelemetryCache(): void; - /** - * Returns the maximum number of errors that can be flushed to the server in the next network request - * @param serverTelemetryEntity - */ - static maxErrorsToSend(serverTelemetryEntity: ServerTelemetryEntity): number; - /** - * Get the region discovery fields - * - * @returns string - */ - getRegionDiscoveryFields(): string; - /** - * Update the region discovery metadata - * - * @param regionDiscoveryMetadata - * @returns void - */ - updateRegionDiscoveryMetadata(regionDiscoveryMetadata: RegionDiscoveryMetadata): void; - /** - * Set cache outcome - */ - setCacheOutcome(cacheOutcome: CacheOutcome): void; - setNativeBrokerErrorCode(errorCode: string): void; - getNativeBrokerErrorCode(): string | undefined; - clearNativeBrokerErrorCode(): void; - static makeExtraSkuString(params: SkuParams): string; -} -export {}; -//# sourceMappingURL=ServerTelemetryManager.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/telemetry/server/ServerTelemetryManager.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/telemetry/server/ServerTelemetryManager.d.ts.map deleted file mode 100644 index 44fbf20..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/telemetry/server/ServerTelemetryManager.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ServerTelemetryManager.d.ts","sourceRoot":"","sources":["../../../../src/telemetry/server/ServerTelemetryManager.ts"],"names":[],"mappings":"AAKA,OAAO,EAGH,YAAY,EAIf,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAE3D,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,qBAAqB,EAAE,MAAM,+CAA+C,CAAC;AACtF,OAAO,EAAE,uBAAuB,EAAE,MAAM,4CAA4C,CAAC;AAKrF,KA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IAI9C,0BAA0B,IAAI,IAAI;IAUlC,MAAM,CAAC,kBAAkB,CAAC,MAAM,EAAE,SAAS,GAAG,MAAM;CAGvD"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/telemetry/server/ServerTelemetryRequest.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/telemetry/server/ServerTelemetryRequest.d.ts deleted file mode 100644 index 92ff8ca..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/telemetry/server/ServerTelemetryRequest.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -export type ServerTelemetryRequest = { - clientId: string; - apiId: number; - correlationId: string; - forceRefresh?: boolean; - wrapperSKU?: string; - wrapperVer?: string; -}; -//# sourceMappingURL=ServerTelemetryRequest.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/telemetry/server/ServerTelemetryRequest.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/telemetry/server/ServerTelemetryRequest.d.ts.map deleted file mode 100644 index 349432a..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/telemetry/server/ServerTelemetryRequest.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ServerTelemetryRequest.d.ts","sourceRoot":"","sources":["../../../../src/telemetry/server/ServerTelemetryRequest.ts"],"names":[],"mappings":"AAKA,MAAM,MAAM,sBAAsB,GAAG;IACjC,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/url/IUri.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/url/IUri.d.ts deleted file mode 100644 index b3808b0..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/url/IUri.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * Interface which describes URI components. - */ -export interface IUri { - Protocol: string; - HostNameAndPort: string; - AbsolutePath: string; - Search: string; - Hash: string; - PathSegments: string[]; - QueryString: string; -} -//# sourceMappingURL=IUri.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/url/IUri.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/url/IUri.d.ts.map deleted file mode 100644 index 6900042..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/url/IUri.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"IUri.d.ts","sourceRoot":"","sources":["../../../src/url/IUri.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,MAAM,WAAW,IAAI;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,eAAe,EAAE,MAAM,CAAC;IACxB,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC;CACvB"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/url/UrlString.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/url/UrlString.d.ts deleted file mode 100644 index 161c022..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/url/UrlString.d.ts +++ /dev/null @@ -1,49 +0,0 @@ -import { IUri } from "./IUri.js"; -/** - * Url object class which can perform various transformations on url strings. - */ -export declare class UrlString { - private _urlString; - get urlString(): string; - constructor(url: string); - /** - * Ensure urls are lower case and end with a / character. - * @param url - */ - static canonicalizeUri(url: string): string; - /** - * Throws if urlString passed is not a valid authority URI string. - */ - validateAsUri(): void; - /** - * Given a url and a query string return the url with provided query string appended - * @param url - * @param queryString - */ - static appendQueryString(url: string, queryString: string): string; - /** - * Returns a url with the hash removed - * @param url - */ - static removeHashFromUrl(url: string): string; - /** - * Given a url like https://a:b/common/d?e=f#g, and a tenantId, returns https://a:b/tenantId/d - * @param href The url - * @param tenantId The tenant id to replace - */ - replaceTenantPath(tenantId: string): UrlString; - /** - * Parses out the components from a url string. - * @returns An object with the various components. Please cache this value insted of calling this multiple times on the same url. - */ - getUrlComponents(): IUri; - static getDomainFromUrl(url: string): string; - static getAbsoluteUrl(relativeUrl: string, baseUrl: string): string; - static constructAuthorityUriFromObject(urlObject: IUri): UrlString; - /** - * Check if the hash of the URL string contains known properties - * @deprecated This API will be removed in a future version - */ - static hashContainsKnownProperties(response: string): boolean; -} -//# sourceMappingURL=UrlString.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/url/UrlString.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/url/UrlString.d.ts.map deleted file mode 100644 index fec1ee9..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/url/UrlString.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"UrlString.d.ts","sourceRoot":"","sources":["../../../src/url/UrlString.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAIjC;;GAEG;AACH,qBAAa,SAAS;IAElB,OAAO,CAAC,UAAU,CAAS;IAC3B,IAAW,SAAS,IAAI,MAAM,CAE7B;gBAEW,GAAG,EAAE,MAAM;IAcvB;;;OAGG;IACH,MAAM,CAAC,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM;IAoB3C;;OAEG;IACH,aAAa,IAAI,IAAI;IA6BrB;;;;OAIG;IACH,MAAM,CAAC,iBAAiB,CAAC,GAAG,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,MAAM;IAUlE;;;OAGG;IACH,MAAM,CAAC,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM;IAI7C;;;;OAIG;IACH,iBAAiB,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS;IAc9C;;;OAGG;IACH,gBAAgB,IAAI,IAAI;IAsCxB,MAAM,CAAC,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM;IAc5C,MAAM,CAAC,cAAc,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM;IAgBnE,MAAM,CAAC,+BAA+B,CAAC,SAAS,EAAE,IAAI,GAAG,SAAS;IAUlE;;;OAGG;IACH,MAAM,CAAC,2BAA2B,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO;CAGhE"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/utils/ClientAssertionUtils.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/utils/ClientAssertionUtils.d.ts deleted file mode 100644 index ca6e17f..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/utils/ClientAssertionUtils.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { ClientAssertionCallback } from "../account/ClientCredentials.js"; -export declare function getClientAssertion(clientAssertion: string | ClientAssertionCallback, clientId: string, tokenEndpoint?: string): Promise; -//# sourceMappingURL=ClientAssertionUtils.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/utils/ClientAssertionUtils.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/utils/ClientAssertionUtils.d.ts.map deleted file mode 100644 index 7a9575d..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/utils/ClientAssertionUtils.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ClientAssertionUtils.d.ts","sourceRoot":"","sources":["../../../src/utils/ClientAssertionUtils.ts"],"names":[],"mappings":"AAKA,OAAO,EACH,uBAAuB,EAE1B,MAAM,iCAAiC,CAAC;AAEzC,wBAAsB,kBAAkB,CACpC,eAAe,EAAE,MAAM,GAAG,uBAAuB,EACjD,QAAQ,EAAE,MAAM,EAChB,aAAa,CAAC,EAAE,MAAM,GACvB,OAAO,CAAC,MAAM,CAAC,CAUjB"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/utils/Constants.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/utils/Constants.d.ts deleted file mode 100644 index ca070a2..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/utils/Constants.d.ts +++ /dev/null @@ -1,311 +0,0 @@ -export declare const Constants: { - LIBRARY_NAME: string; - SKU: string; - CACHE_PREFIX: string; - DEFAULT_AUTHORITY: string; - DEFAULT_AUTHORITY_HOST: string; - DEFAULT_COMMON_TENANT: string; - ADFS: string; - DSTS: string; - AAD_INSTANCE_DISCOVERY_ENDPT: string; - CIAM_AUTH_URL: string; - AAD_TENANT_DOMAIN_SUFFIX: string; - RESOURCE_DELIM: string; - NO_ACCOUNT: string; - CLAIMS: string; - CONSUMER_UTID: string; - OPENID_SCOPE: string; - PROFILE_SCOPE: string; - OFFLINE_ACCESS_SCOPE: string; - EMAIL_SCOPE: string; - CODE_RESPONSE_TYPE: string; - CODE_GRANT_TYPE: string; - RT_GRANT_TYPE: string; - FRAGMENT_RESPONSE_MODE: string; - S256_CODE_CHALLENGE_METHOD: string; - URL_FORM_CONTENT_TYPE: string; - AUTHORIZATION_PENDING: string; - NOT_DEFINED: string; - EMPTY_STRING: string; - NOT_APPLICABLE: string; - NOT_AVAILABLE: string; - FORWARD_SLASH: string; - IMDS_ENDPOINT: string; - IMDS_VERSION: string; - IMDS_TIMEOUT: number; - AZURE_REGION_AUTO_DISCOVER_FLAG: string; - REGIONAL_AUTH_PUBLIC_CLOUD_SUFFIX: string; - KNOWN_PUBLIC_CLOUDS: string[]; - TOKEN_RESPONSE_TYPE: string; - ID_TOKEN_RESPONSE_TYPE: string; - SHR_NONCE_VALIDITY: number; - INVALID_INSTANCE: string; -}; -export declare const HttpStatus: { - readonly SUCCESS: 200; - readonly SUCCESS_RANGE_START: 200; - readonly SUCCESS_RANGE_END: 299; - readonly REDIRECT: 302; - readonly CLIENT_ERROR: 400; - readonly CLIENT_ERROR_RANGE_START: 400; - readonly BAD_REQUEST: 400; - readonly UNAUTHORIZED: 401; - readonly NOT_FOUND: 404; - readonly REQUEST_TIMEOUT: 408; - readonly TOO_MANY_REQUESTS: 429; - readonly CLIENT_ERROR_RANGE_END: 499; - readonly SERVER_ERROR: 500; - readonly SERVER_ERROR_RANGE_START: 500; - readonly SERVICE_UNAVAILABLE: 503; - readonly GATEWAY_TIMEOUT: 504; - readonly SERVER_ERROR_RANGE_END: 599; - readonly MULTI_SIDED_ERROR: 600; -}; -export type HttpStatus = (typeof HttpStatus)[keyof typeof HttpStatus]; -export declare const OIDC_DEFAULT_SCOPES: string[]; -export declare const OIDC_SCOPES: string[]; -/** - * Request header names - */ -export declare const HeaderNames: { - readonly CONTENT_TYPE: "Content-Type"; - readonly CONTENT_LENGTH: "Content-Length"; - readonly RETRY_AFTER: "Retry-After"; - readonly CCS_HEADER: "X-AnchorMailbox"; - readonly WWWAuthenticate: "WWW-Authenticate"; - readonly AuthenticationInfo: "Authentication-Info"; - readonly X_MS_REQUEST_ID: "x-ms-request-id"; - readonly X_MS_HTTP_VERSION: "x-ms-httpver"; -}; -export type HeaderNames = (typeof HeaderNames)[keyof typeof HeaderNames]; -/** - * Persistent cache keys MSAL which stay while user is logged in. - */ -export declare const PersistentCacheKeys: { - readonly ID_TOKEN: "idtoken"; - readonly CLIENT_INFO: "client.info"; - readonly ADAL_ID_TOKEN: "adal.idtoken"; - readonly ERROR: "error"; - readonly ERROR_DESC: "error.description"; - readonly ACTIVE_ACCOUNT: "active-account"; - readonly ACTIVE_ACCOUNT_FILTERS: "active-account-filters"; -}; -export type PersistentCacheKeys = (typeof PersistentCacheKeys)[keyof typeof PersistentCacheKeys]; -/** - * String constants related to AAD Authority - */ -export declare const AADAuthorityConstants: { - readonly COMMON: "common"; - readonly ORGANIZATIONS: "organizations"; - readonly CONSUMERS: "consumers"; -}; -export type AADAuthorityConstants = (typeof AADAuthorityConstants)[keyof typeof AADAuthorityConstants]; -/** - * Claims request keys - */ -export declare const ClaimsRequestKeys: { - readonly ACCESS_TOKEN: "access_token"; - readonly XMS_CC: "xms_cc"; -}; -export type ClaimsRequestKeys = (typeof ClaimsRequestKeys)[keyof typeof ClaimsRequestKeys]; -/** - * we considered making this "enum" in the request instead of string, however it looks like the allowed list of - * prompt values kept changing over past couple of years. There are some undocumented prompt values for some - * internal partners too, hence the choice of generic "string" type instead of the "enum" - */ -export declare const PromptValue: { - LOGIN: string; - SELECT_ACCOUNT: string; - CONSENT: string; - NONE: string; - CREATE: string; - NO_SESSION: string; -}; -/** - * allowed values for codeVerifier - */ -export declare const CodeChallengeMethodValues: { - PLAIN: string; - S256: string; -}; -/** - * allowed values for server response type - */ -export declare const ServerResponseType: { - readonly QUERY: "query"; - readonly FRAGMENT: "fragment"; -}; -export type ServerResponseType = (typeof ServerResponseType)[keyof typeof ServerResponseType]; -/** - * allowed values for response_mode - */ -export declare const ResponseMode: { - readonly FORM_POST: "form_post"; - readonly QUERY: "query"; - readonly FRAGMENT: "fragment"; -}; -export type ResponseMode = (typeof ResponseMode)[keyof typeof ResponseMode]; -/** - * allowed grant_type - */ -export declare const GrantType: { - readonly IMPLICIT_GRANT: "implicit"; - readonly AUTHORIZATION_CODE_GRANT: "authorization_code"; - readonly CLIENT_CREDENTIALS_GRANT: "client_credentials"; - readonly RESOURCE_OWNER_PASSWORD_GRANT: "password"; - readonly REFRESH_TOKEN_GRANT: "refresh_token"; - readonly DEVICE_CODE_GRANT: "device_code"; - readonly JWT_BEARER: "urn:ietf:params:oauth:grant-type:jwt-bearer"; -}; -export type GrantType = (typeof GrantType)[keyof typeof GrantType]; -/** - * Account types in Cache - */ -export declare const CacheAccountType: { - readonly MSSTS_ACCOUNT_TYPE: "MSSTS"; - readonly ADFS_ACCOUNT_TYPE: "ADFS"; - readonly MSAV1_ACCOUNT_TYPE: "MSA"; - readonly GENERIC_ACCOUNT_TYPE: "Generic"; -}; -export type CacheAccountType = (typeof CacheAccountType)[keyof typeof CacheAccountType]; -/** - * Separators used in cache - */ -export declare const Separators: { - readonly CACHE_KEY_SEPARATOR: "-"; - readonly CLIENT_INFO_SEPARATOR: "."; -}; -export type Separators = (typeof Separators)[keyof typeof Separators]; -/** - * Credential Type stored in the cache - */ -export declare const CredentialType: { - readonly ID_TOKEN: "IdToken"; - readonly ACCESS_TOKEN: "AccessToken"; - readonly ACCESS_TOKEN_WITH_AUTH_SCHEME: "AccessToken_With_AuthScheme"; - readonly REFRESH_TOKEN: "RefreshToken"; -}; -export type CredentialType = (typeof CredentialType)[keyof typeof CredentialType]; -/** - * Combine all cache types - */ -export declare const CacheType: { - readonly ADFS: 1001; - readonly MSA: 1002; - readonly MSSTS: 1003; - readonly GENERIC: 1004; - readonly ACCESS_TOKEN: 2001; - readonly REFRESH_TOKEN: 2002; - readonly ID_TOKEN: 2003; - readonly APP_METADATA: 3001; - readonly UNDEFINED: 9999; -}; -export type CacheType = (typeof CacheType)[keyof typeof CacheType]; -/** - * More Cache related constants - */ -export declare const APP_METADATA = "appmetadata"; -export declare const CLIENT_INFO = "client_info"; -export declare const THE_FAMILY_ID = "1"; -export declare const AUTHORITY_METADATA_CONSTANTS: { - CACHE_KEY: string; - REFRESH_TIME_SECONDS: number; -}; -export declare const AuthorityMetadataSource: { - readonly CONFIG: "config"; - readonly CACHE: "cache"; - readonly NETWORK: "network"; - readonly HARDCODED_VALUES: "hardcoded_values"; -}; -export type AuthorityMetadataSource = (typeof AuthorityMetadataSource)[keyof typeof AuthorityMetadataSource]; -export declare const SERVER_TELEM_CONSTANTS: { - SCHEMA_VERSION: number; - MAX_CUR_HEADER_BYTES: number; - MAX_LAST_HEADER_BYTES: number; - MAX_CACHED_ERRORS: number; - CACHE_KEY: string; - CATEGORY_SEPARATOR: string; - VALUE_SEPARATOR: string; - OVERFLOW_TRUE: string; - OVERFLOW_FALSE: string; - UNKNOWN_ERROR: string; -}; -/** - * Type of the authentication request - */ -export declare const AuthenticationScheme: { - readonly BEARER: "Bearer"; - readonly POP: "pop"; - readonly SSH: "ssh-cert"; -}; -export type AuthenticationScheme = (typeof AuthenticationScheme)[keyof typeof AuthenticationScheme]; -/** - * Constants related to throttling - */ -export declare const ThrottlingConstants: { - DEFAULT_THROTTLE_TIME_SECONDS: number; - DEFAULT_MAX_THROTTLE_TIME_SECONDS: number; - THROTTLING_PREFIX: string; - X_MS_LIB_CAPABILITY_VALUE: string; -}; -export declare const Errors: { - INVALID_GRANT_ERROR: string; - CLIENT_MISMATCH_ERROR: string; -}; -/** - * Password grant parameters - */ -export declare const PasswordGrantConstants: { - readonly username: "username"; - readonly password: "password"; -}; -export type PasswordGrantConstants = (typeof PasswordGrantConstants)[keyof typeof PasswordGrantConstants]; -/** - * Response codes - */ -export declare const ResponseCodes: { - readonly httpSuccess: 200; - readonly httpBadRequest: 400; -}; -export type ResponseCodes = (typeof ResponseCodes)[keyof typeof ResponseCodes]; -/** - * Region Discovery Sources - */ -export declare const RegionDiscoverySources: { - readonly FAILED_AUTO_DETECTION: "1"; - readonly INTERNAL_CACHE: "2"; - readonly ENVIRONMENT_VARIABLE: "3"; - readonly IMDS: "4"; -}; -export type RegionDiscoverySources = (typeof RegionDiscoverySources)[keyof typeof RegionDiscoverySources]; -/** - * Region Discovery Outcomes - */ -export declare const RegionDiscoveryOutcomes: { - readonly CONFIGURED_MATCHES_DETECTED: "1"; - readonly CONFIGURED_NO_AUTO_DETECTION: "2"; - readonly CONFIGURED_NOT_DETECTED: "3"; - readonly AUTO_DETECTION_REQUESTED_SUCCESSFUL: "4"; - readonly AUTO_DETECTION_REQUESTED_FAILED: "5"; -}; -export type RegionDiscoveryOutcomes = (typeof RegionDiscoveryOutcomes)[keyof typeof RegionDiscoveryOutcomes]; -/** - * Specifies the reason for fetching the access token from the identity provider - */ -export declare const CacheOutcome: { - readonly NOT_APPLICABLE: "0"; - readonly FORCE_REFRESH_OR_CLAIMS: "1"; - readonly NO_CACHED_ACCESS_TOKEN: "2"; - readonly CACHED_ACCESS_TOKEN_EXPIRED: "3"; - readonly PROACTIVELY_REFRESHED: "4"; -}; -export type CacheOutcome = (typeof CacheOutcome)[keyof typeof CacheOutcome]; -export declare const JsonWebTokenTypes: { - readonly Jwt: "JWT"; - readonly Jwk: "JWK"; - readonly Pop: "pop"; -}; -export type JsonWebTokenTypes = (typeof JsonWebTokenTypes)[keyof typeof JsonWebTokenTypes]; -export declare const ONE_DAY_IN_MS = 86400000; -export declare const DEFAULT_TOKEN_RENEWAL_OFFSET_SEC = 300; -//# sourceMappingURL=Constants.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/utils/Constants.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/utils/Constants.d.ts.map deleted file mode 100644 index 1447257..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/utils/Constants.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Constants.d.ts","sourceRoot":"","sources":["../../../src/utils/Constants.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2DrB,CAAC;AAEF,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;CAmBb,CAAC;AACX,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,OAAO,UAAU,CAAC,CAAC;AAEtE,eAAO,MAAM,mBAAmB,UAI/B,CAAC;AAEF,eAAO,MAAM,WAAW,UAAkD,CAAC;AAE3E;;GAEG;AACH,eAAO,MAAM,WAAW;;;;;;;;;CASd,CAAC;AACX,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,WAAW,C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CAAC;AACX,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,OAAO,aAAa,CAAC,CAAC;AAE/E;;GAEG;AACH,eAAO,MAAM,sBAAsB;;;;;CAKzB,CAAC;AACX,MAAM,MAAM,sBAAsB,GAC9B,CAAC,OAAO,sBAAsB,CAAC,CAAC,MAAM,OAAO,sBAAsB,CAAC,CAAC;AAEzE;;GAEG;AACH,eAAO,MAAM,uBAAuB;;;;;;CAM1B,CAAC;AACX,MAAM,MAAM,uBAAuB,GAC/B,CAAC,OAAO,uBAAuB,CAAC,CAAC,MAAM,OAAO,uBAAuB,CAAC,CAAC;AAE3E;;GAEG;AACH,eAAO,MAAM,YAAY;;;;;;CAWf,CAAC;AACX,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,OAAO,YAAY,CAAC,CAAC;AAE5E,eAAO,MAAM,iBAAiB;;;;CAIpB,CAAC;AACX,MAAM,MAAM,iBAAiB,GACzB,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,OAAO,iBAAiB,CAAC,CAAC;AAE/D,eAAO,MAAM,aAAa,WAAW,CAAC;AAGtC,eAAO,MAAM,gCAAgC,MAAM,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/utils/FunctionWrappers.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/utils/FunctionWrappers.d.ts deleted file mode 100644 index cac5c0b..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/utils/FunctionWrappers.d.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { Logger } from "../logger/Logger.js"; -import { IPerformanceClient } from "../telemetry/performance/IPerformanceClient.js"; -/** - * Wraps a function with a performance measurement. - * Usage: invoke(functionToCall, performanceClient, "EventName", "correlationId")(...argsToPassToFunction) - * @param callback - * @param eventName - * @param logger - * @param telemetryClient - * @param correlationId - * @returns - * @internal - */ -export declare const invoke: (callback: (...args: T) => U, eventName: string, logger: Logger, telemetryClient?: IPerformanceClient, correlationId?: string) => (...args: T) => U; -/** - * Wraps an async function with a performance measurement. - * Usage: invokeAsync(functionToCall, performanceClient, "EventName", "correlationId")(...argsToPassToFunction) - * @param callback - * @param eventName - * @param logger - * @param telemetryClient - * @param correlationId - * @returns - * @internal - * - */ -export declare const invokeAsync: (callback: (...args: T) => Promise, eventName: string, logger: Logger, telemetryClient?: IPerformanceClient, correlationId?: string) => (...args: T) => Promise; -//# sourceMappingURL=FunctionWrappers.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/utils/FunctionWrappers.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/utils/FunctionWrappers.d.ts.map deleted file mode 100644 index d5609c5..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/utils/FunctionWrappers.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"FunctionWrappers.d.ts","sourceRoot":"","sources":["../../../src/utils/FunctionWrappers.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,kBAAkB,EAAE,MAAM,gDAAgD,CAAC;AAEpF;;;;;;;;;;GAUG;AAEH,eAAO,MAAM,MAAM,+DAEJ,MAAM,UACT,MAAM,oBACI,kBAAkB,kBACpB,MAAM,sBAuCzB,CAAC;AAEF;;;;;;;;;;;GAWG;AAEH,eAAO,MAAM,WAAW,wEAET,MAAM,UACT,MAAM,oBACI,kBAAkB,kBACpB,MAAM,+BAyCzB,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/utils/MsalTypes.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/utils/MsalTypes.d.ts deleted file mode 100644 index bf6b23d..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/utils/MsalTypes.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -/** - * Key-Value type to support queryParams, extraQueryParams and claims - */ -export type StringDict = { - [key: string]: string; -}; -//# sourceMappingURL=MsalTypes.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/utils/MsalTypes.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/utils/MsalTypes.d.ts.map deleted file mode 100644 index d5007b4..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/utils/MsalTypes.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"MsalTypes.d.ts","sourceRoot":"","sources":["../../../src/utils/MsalTypes.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/utils/ProtocolUtils.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/utils/ProtocolUtils.d.ts deleted file mode 100644 index e9edc1e..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/utils/ProtocolUtils.d.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { ICrypto } from "../crypto/ICrypto.js"; -/** - * Type which defines the object that is stringified, encoded and sent in the state value. - * Contains the following: - * - id - unique identifier for this request - * - ts - timestamp for the time the request was made. Used to ensure that token expiration is not calculated incorrectly. - * - platformState - string value sent from the platform. - */ -export type LibraryStateObject = { - id: string; - meta?: Record; -}; -/** - * Type which defines the stringified and encoded object sent to the service in the authorize request. - */ -export type RequestStateObject = { - userRequestState: string; - libraryState: LibraryStateObject; -}; -/** - * Class which provides helpers for OAuth 2.0 protocol specific values - */ -export declare class ProtocolUtils { - /** - * Appends user state with random guid, or returns random guid. - * @param userState - * @param randomGuid - */ - static setRequestState(cryptoObj: ICrypto, userState?: string, meta?: Record): string; - /** - * Generates the state value used by the common library. - * @param randomGuid - * @param cryptoObj - */ - static generateLibraryState(cryptoObj: ICrypto, meta?: Record): string; - /** - * Parses the state into the RequestStateObject, which contains the LibraryState info and the state passed by the user. - * @param state - * @param cryptoObj - */ - static parseRequestState(cryptoObj: ICrypto, state: string): RequestStateObject; -} -//# sourceMappingURL=ProtocolUtils.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/utils/ProtocolUtils.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/utils/ProtocolUtils.d.ts.map deleted file mode 100644 index a8bbcf7..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/utils/ProtocolUtils.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ProtocolUtils.d.ts","sourceRoot":"","sources":["../../../src/utils/ProtocolUtils.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAM/C;;;;;;GAMG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACjC,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC7B,gBAAgB,EAAE,MAAM,CAAC;IACzB,YAAY,EAAE,kBAAkB,CAAC;CACpC,CAAC;AAEF;;GAEG;AACH,qBAAa,aAAa;IACtB;;;;OAIG;IACH,MAAM,CAAC,eAAe,CAClB,SAAS,EAAE,OAAO,EAClB,SAAS,CAAC,EAAE,MAAM,EAClB,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAC9B,MAAM;IAUT;;;;OAIG;IACH,MAAM,CAAC,oBAAoB,CACvB,SAAS,EAAE,OAAO,EAClB,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAC9B,MAAM;IAmBT;;;;OAIG;IACH,MAAM,CAAC,iBAAiB,CACpB,SAAS,EAAE,OAAO,EAClB,KAAK,EAAE,MAAM,GACd,kBAAkB;CA6BxB"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/utils/StringUtils.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/utils/StringUtils.d.ts deleted file mode 100644 index 288cb7e..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/utils/StringUtils.d.ts +++ /dev/null @@ -1,41 +0,0 @@ -/** - * @hidden - */ -export declare class StringUtils { - /** - * Check if stringified object is empty - * @param strObj - */ - static isEmptyObj(strObj?: string): boolean; - static startsWith(str: string, search: string): boolean; - static endsWith(str: string, search: string): boolean; - /** - * Parses string into an object. - * - * @param query - */ - static queryStringToObject(query: string): T; - /** - * Trims entries in an array. - * - * @param arr - */ - static trimArrayEntries(arr: Array): Array; - /** - * Removes empty strings from array - * @param arr - */ - static removeEmptyStringsFromArray(arr: Array): Array; - /** - * Attempts to parse a string into JSON - * @param str - */ - static jsonParseHelper(str: string): T | null; - /** - * Tests if a given string matches a given pattern, with support for wildcards and queries. - * @param pattern Wildcard pattern to string match. Supports "*" for wildcards and "?" for queries - * @param input String to match against - */ - static matchPattern(pattern: string, input: string): boolean; -} -//# sourceMappingURL=StringUtils.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/utils/StringUtils.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/utils/StringUtils.d.ts.map deleted file mode 100644 index 4200253..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/utils/StringUtils.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"StringUtils.d.ts","sourceRoot":"","sources":["../../../src/utils/StringUtils.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,qBAAa,WAAW;IACpB;;;OAGG;IACH,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO;IAU3C,MAAM,CAAC,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO;IAIvD,MAAM,CAAC,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO;IAOrD;;;;OAIG;IACH,MAAM,CAAC,mBAAmB,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,GAAG,CAAC;IAe/C;;;;OAIG;IACH,MAAM,CAAC,gBAAgB,CAAC,GAAG,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,KAAK,CAAC,MAAM,CAAC;IAI1D;;;OAGG;IACH,MAAM,CAAC,2BAA2B,CAAC,GAAG,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,KAAK,CAAC,MAAM,CAAC;IAMrE;;;OAGG;IACH,MAAM,CAAC,eAAe,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,GAAG,CAAC,GAAG,IAAI;IAQhD;;;;OAIG;IACH,MAAM,CAAC,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO;CAe/D"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/utils/TimeUtils.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/utils/TimeUtils.d.ts deleted file mode 100644 index b26680d..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/utils/TimeUtils.d.ts +++ /dev/null @@ -1,26 +0,0 @@ -/** - * Utility functions for managing date and time operations. - */ -/** - * return the current time in Unix time (seconds). - */ -export declare function nowSeconds(): number; -/** - * check if a token is expired based on given UTC time in seconds. - * @param expiresOn - */ -export declare function isTokenExpired(expiresOn: string, offset: number): boolean; -/** - * If the current time is earlier than the time that a token was cached at, we must discard the token - * i.e. The system clock was turned back after acquiring the cached token - * @param cachedAt - * @param offset - */ -export declare function wasClockTurnedBack(cachedAt: string): boolean; -/** - * Waits for t number of milliseconds - * @param t number - * @param value T - */ -export declare function delay(t: number, value?: T): Promise; -//# sourceMappingURL=TimeUtils.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/utils/TimeUtils.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/utils/TimeUtils.d.ts.map deleted file mode 100644 index 327bb0b..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/utils/TimeUtils.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"TimeUtils.d.ts","sourceRoot":"","sources":["../../../src/utils/TimeUtils.ts"],"names":[],"mappings":"AAKA;;GAEG;AAEH;;GAEG;AACH,wBAAgB,UAAU,IAAI,MAAM,CAGnC;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAOzE;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAI5D;AAED;;;;GAIG;AACH,wBAAgB,KAAK,CAAC,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC,CAEhE"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/utils/UrlUtils.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/utils/UrlUtils.d.ts deleted file mode 100644 index 42fa0bc..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/utils/UrlUtils.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { ServerAuthorizationCodeResponse } from "../response/ServerAuthorizationCodeResponse.js"; -/** - * Parses hash string from given string. Returns empty string if no hash symbol is found. - * @param hashString - */ -export declare function stripLeadingHashOrQuery(responseString: string): string; -/** - * Returns URL hash as server auth code response object. - */ -export declare function getDeserializedResponse(responseString: string): ServerAuthorizationCodeResponse | null; -//# sourceMappingURL=UrlUtils.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/utils/UrlUtils.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/utils/UrlUtils.d.ts.map deleted file mode 100644 index baf042f..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/lib/types/utils/UrlUtils.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"UrlUtils.d.ts","sourceRoot":"","sources":["../../../src/utils/UrlUtils.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,+BAA+B,EAAE,MAAM,gDAAgD,CAAC;AAMjG;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,cAAc,EAAE,MAAM,GAAG,MAAM,CAWtE;AAED;;GAEG;AACH,wBAAgB,uBAAuB,CACnC,cAAc,EAAE,MAAM,GACvB,+BAA+B,GAAG,IAAI,CA0BxC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/node/README.md b/PBandGraphScaffold/node_modules/@azure/msal-common/node/README.md deleted file mode 100644 index 8bc9a06..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/node/README.md +++ /dev/null @@ -1 +0,0 @@ -Do not remove or rename. This folder allows subpath imports in environments that don't understand the exports field. \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/node/package.json b/PBandGraphScaffold/node_modules/@azure/msal-common/node/package.json deleted file mode 100644 index bcc1f10..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/node/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "main": "../lib/index-node.cjs", - "module": "../dist/index-node.mjs", - "types": "../lib/types/index-node.d.ts" -} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/package.json b/PBandGraphScaffold/node_modules/@azure/msal-common/package.json deleted file mode 100644 index 6795569..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/package.json +++ /dev/null @@ -1,126 +0,0 @@ -{ - "name": "@azure/msal-common", - "author": { - "name": "Microsoft", - "email": "nugetaad@microsoft.com", - "url": "https://www.microsoft.com" - }, - "license": "MIT", - "repository": { - "type": "git", - "url": "https://github.com/AzureAD/microsoft-authentication-library-for-js.git" - }, - "version": "14.16.1", - "description": "Microsoft Authentication Library for js", - "keywords": [ - "implicit", - "authorization code", - "PKCE", - "js", - "AAD", - "msal", - "oauth" - ], - "sideEffects": false, - "type": "module", - "main": "./lib/index.cjs", - "module": "./dist/index.mjs", - "types": "./dist/index.d.ts", - "exports": { - "./browser": { - "import": { - "types": "./dist/index-browser.d.ts", - "default": "./dist/index-browser.mjs" - }, - "require": { - "types": "./lib/types/index-browser.d.ts", - "default": "./lib/index-browser.cjs" - } - }, - "./node": { - "import": { - "types": "./dist/index-node.d.ts", - "default": "./dist/index-node.mjs" - }, - "require": { - "types": "./lib/types/index-node.d.ts", - "default": "./lib/index-node.cjs" - } - }, - ".": { - "import": { - "types": "./dist/index.d.ts", - "default": "./dist/index.mjs" - }, - "require": { - "types": "./lib/types/index.d.ts", - "default": "./lib/index.cjs" - } - }, - "./package.json": "./package.json" - }, - "engines": { - "node": ">=0.8.0" - }, - "directories": { - "test": "test" - }, - "files": [ - "dist", - "lib", - "src", - "node", - "browser" - ], - "scripts": { - "clean": "shx rm -rf dist lib", - "clean:coverage": "rimraf ../../.nyc_output/*", - "lint": "eslint src --ext .ts", - "lint:fix": "npm run lint -- --fix", - "test": "jest", - "test:coverage": "jest --coverage", - "test:coverage:only": "npm run clean:coverage && npm run test:coverage", - "build:modules": "rollup -c --strictDeprecations --bundleConfigAsCjs", - "build:modules:watch": "rollup -cw --bundleConfigAsCjs", - "build": "npm run clean && npm run build:modules", - "build:all": "npm run build", - "prepack": "npm run build", - "metadata:check": "ts-node scripts/metadata.ts", - "format:check": "prettier --ignore-path .gitignore --check src test", - "format:fix": "prettier --ignore-path .gitignore --write src test", - "apiExtractor": "api-extractor run" - }, - "beachball": { - "disallowedChangeTypes": [ - "major" - ] - }, - "devDependencies": { - "@babel/core": "^7.7.2", - "@babel/plugin-proposal-class-properties": "^7.7.0", - "@babel/plugin-proposal-object-rest-spread": "^7.6.2", - "@babel/preset-env": "^7.7.1", - "@babel/preset-typescript": "^7.7.2", - "@microsoft/api-extractor": "^7.43.4", - "@rollup/plugin-typescript": "^11.0.0", - "@types/debug": "^4.1.5", - "@types/jest": "^29.5.0", - "@types/lodash": "^4.14.182", - "@types/node": "^20.3.1", - "eslint-config-msal": "file:../../shared-configs/eslint-config-msal", - "jest": "^29.5.0", - "lodash": "^4.17.21", - "msal-test-utils": "file:../../shared-test-utils", - "prettier": "2.8.7", - "rimraf": "^3.0.2", - "rollup": "^4.22.4", - "rollup-msal": "file:../../shared-configs/rollup-msal", - "shx": "^0.3.2", - "ts-jest": "^29.1.0", - "ts-jest-resolver": "^2.0.1", - "ts-node": "^10.9.1", - "tslib": "^1.10.0", - "typescript": "^4.9.5", - "yargs": "^17.5.1" - } -} diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/src/account/AccountInfo.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/src/account/AccountInfo.ts deleted file mode 100644 index 428a337..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/src/account/AccountInfo.ts +++ /dev/null @@ -1,162 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import { TokenClaims } from "./TokenClaims.js"; -/** - * Account object with the following signature: - * - homeAccountId - Home account identifier for this account object - * - environment - Entity which issued the token represented by the domain of the issuer (e.g. login.microsoftonline.com) - * - tenantId - Full tenant or organizational id that this account belongs to - * - username - preferred_username claim of the id_token that represents this account - * - localAccountId - Local, tenant-specific account identifer for this account object, usually used in legacy cases - * - name - Full name for the account, including given name and family name - * - idToken - raw ID token - * - idTokenClaims - Object contains claims from ID token - * - nativeAccountId - The user's native account ID - * - tenantProfiles - Map of tenant profile objects for each tenant that the account has authenticated with in the browser - */ -export type AccountInfo = { - homeAccountId: string; - environment: string; - tenantId: string; - username: string; - localAccountId: string; - name?: string; - idToken?: string; - idTokenClaims?: TokenClaims & { - [key: string]: - | string - | number - | string[] - | object - | undefined - | unknown; - }; - nativeAccountId?: string; - authorityType?: string; - tenantProfiles?: Map; -}; - -/** - * Account details that vary across tenants for the same user - */ -export type TenantProfile = Pick< - AccountInfo, - "tenantId" | "localAccountId" | "name" -> & { - /** - * - isHomeTenant - True if this is the home tenant profile of the account, false if it's a guest tenant profile - */ - isHomeTenant?: boolean; -}; - -export type ActiveAccountFilters = { - homeAccountId: string; - localAccountId: string; - tenantId?: string; - lastUpdatedAt?: string; -}; - -/** - * Returns true if tenantId matches the utid portion of homeAccountId - * @param tenantId - * @param homeAccountId - * @returns - */ -export function tenantIdMatchesHomeTenant( - tenantId?: string, - homeAccountId?: string -): boolean { - return ( - !!tenantId && - !!homeAccountId && - tenantId === homeAccountId.split(".")[1] - ); -} - -/** - * Build tenant profile - * @param homeAccountId - Home account identifier for this account object - * @param localAccountId - Local account identifer for this account object - * @param tenantId - Full tenant or organizational id that this account belongs to - * @param idTokenClaims - Claims from the ID token - * @returns - */ -export function buildTenantProfile( - homeAccountId: string, - localAccountId: string, - tenantId: string, - idTokenClaims?: TokenClaims -): TenantProfile { - if (idTokenClaims) { - const { oid, sub, tid, name, tfp, acr } = idTokenClaims; - - /** - * Since there is no way to determine if the authority is AAD or B2C, we exhaust all the possible claims that can serve as tenant ID with the following precedence: - * tid - TenantID claim that identifies the tenant that issued the token in AAD. Expected in all AAD ID tokens, not present in B2C ID Tokens. - * tfp - Trust Framework Policy claim that identifies the policy that was used to authenticate the user. Functions as tenant for B2C scenarios. - * acr - Authentication Context Class Reference claim used only with older B2C policies. Fallback in case tfp is not present, but likely won't be present anyway. - */ - const tenantId = tid || tfp || acr || ""; - - return { - tenantId: tenantId, - localAccountId: oid || sub || "", - name: name, - isHomeTenant: tenantIdMatchesHomeTenant(tenantId, homeAccountId), - }; - } else { - return { - tenantId, - localAccountId, - isHomeTenant: tenantIdMatchesHomeTenant(tenantId, homeAccountId), - }; - } -} - -/** - * Replaces account info that varies by tenant profile sourced from the ID token claims passed in with the tenant-specific account info - * @param baseAccountInfo - * @param idTokenClaims - * @returns - */ -export function updateAccountTenantProfileData( - baseAccountInfo: AccountInfo, - tenantProfile?: TenantProfile, - idTokenClaims?: TokenClaims, - idTokenSecret?: string -): AccountInfo { - let updatedAccountInfo = baseAccountInfo; - // Tenant Profile overrides passed in account info - if (tenantProfile) { - // eslint-disable-next-line @typescript-eslint/no-unused-vars - const { isHomeTenant, ...tenantProfileOverride } = tenantProfile; - updatedAccountInfo = { ...baseAccountInfo, ...tenantProfileOverride }; - } - - // ID token claims override passed in account info and tenant profile - if (idTokenClaims) { - // Ignore isHomeTenant, loginHint, and sid which are part of tenant profile but not base account info - // eslint-disable-next-line @typescript-eslint/no-unused-vars - const { isHomeTenant, ...claimsSourcedTenantProfile } = - buildTenantProfile( - baseAccountInfo.homeAccountId, - baseAccountInfo.localAccountId, - baseAccountInfo.tenantId, - idTokenClaims - ); - - updatedAccountInfo = { - ...updatedAccountInfo, - ...claimsSourcedTenantProfile, - idTokenClaims: idTokenClaims, - idToken: idTokenSecret, - }; - - return updatedAccountInfo; - } - - return updatedAccountInfo; -} diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/src/account/AuthToken.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/src/account/AuthToken.ts deleted file mode 100644 index 1aff6e0..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/src/account/AuthToken.ts +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import { TokenClaims } from "./TokenClaims.js"; -import { - createClientAuthError, - ClientAuthErrorCodes, -} from "../error/ClientAuthError.js"; - -/** - * Extract token by decoding the rawToken - * - * @param encodedToken - */ -export function extractTokenClaims( - encodedToken: string, - base64Decode: (input: string) => string -): TokenClaims { - const jswPayload = getJWSPayload(encodedToken); - - // token will be decoded to get the username - try { - // base64Decode() should throw an error if there is an issue - const base64Decoded = base64Decode(jswPayload); - return JSON.parse(base64Decoded) as TokenClaims; - } catch (err) { - throw createClientAuthError(ClientAuthErrorCodes.tokenParsingError); - } -} - -/** - * decode a JWT - * - * @param authToken - */ -export function getJWSPayload(authToken: string): string { - if (!authToken) { - throw createClientAuthError(ClientAuthErrorCodes.nullOrEmptyToken); - } - const tokenPartsRegex = /^([^\.\s]*)\.([^\.\s]+)\.([^\.\s]*)$/; - const matches = tokenPartsRegex.exec(authToken); - if (!matches || matches.length < 4) { - throw createClientAuthError(ClientAuthErrorCodes.tokenParsingError); - } - /** - * const crackedToken = { - * header: matches[1], - * JWSPayload: matches[2], - * JWSSig: matches[3], - * }; - */ - - return matches[2]; -} - -/** - * Determine if the token's max_age has transpired - */ -export function checkMaxAge(authTime: number, maxAge: number): void { - /* - * per https://openid.net/specs/openid-connect-core-1_0.html#AuthRequest - * To force an immediate re-authentication: If an app requires that a user re-authenticate prior to access, - * provide a value of 0 for the max_age parameter and the AS will force a fresh login. - */ - const fiveMinuteSkew = 300000; // five minutes in milliseconds - if (maxAge === 0 || Date.now() - fiveMinuteSkew > authTime + maxAge) { - throw createClientAuthError(ClientAuthErrorCodes.maxAgeTranspired); - } -} diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/src/account/CcsCredential.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/src/account/CcsCredential.ts deleted file mode 100644 index ed58015..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/src/account/CcsCredential.ts +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -export type CcsCredential = { - credential: string; - type: CcsCredentialType; -}; - -export const CcsCredentialType = { - HOME_ACCOUNT_ID: "home_account_id", - UPN: "UPN", -} as const; -export type CcsCredentialType = - (typeof CcsCredentialType)[keyof typeof CcsCredentialType]; diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/src/account/ClientCredentials.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/src/account/ClientCredentials.ts deleted file mode 100644 index 6c148cf..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/src/account/ClientCredentials.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -export type ClientAssertionConfig = { - clientId: string; - tokenEndpoint?: string; -}; - -export type ClientAssertionCallback = ( - config: ClientAssertionConfig -) => Promise; - -/** - * Client Assertion credential for Confidential Clients - */ -export type ClientAssertion = { - assertion: string | ClientAssertionCallback; - assertionType: string; -}; - -/** - * Client Credentials set for Confidential Clients - */ -export type ClientCredentials = { - clientSecret?: string; - clientAssertion?: ClientAssertion; -}; diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/src/account/ClientInfo.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/src/account/ClientInfo.ts deleted file mode 100644 index f5d8766..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/src/account/ClientInfo.ts +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import { - createClientAuthError, - ClientAuthErrorCodes, -} from "../error/ClientAuthError.js"; -import { Separators, Constants } from "../utils/Constants.js"; - -/** - * Client info object which consists of two IDs. Need to add more info here. - */ -export type ClientInfo = { - uid: string; - utid: string; -}; - -/** - * Function to build a client info object from server clientInfo string - * @param rawClientInfo - * @param crypto - */ -export function buildClientInfo( - rawClientInfo: string, - base64Decode: (input: string) => string -): ClientInfo { - if (!rawClientInfo) { - throw createClientAuthError(ClientAuthErrorCodes.clientInfoEmptyError); - } - - try { - const decodedClientInfo: string = base64Decode(rawClientInfo); - return JSON.parse(decodedClientInfo) as ClientInfo; - } catch (e) { - throw createClientAuthError( - ClientAuthErrorCodes.clientInfoDecodingError - ); - } -} - -/** - * Function to build a client info object from cached homeAccountId string - * @param homeAccountId - */ -export function buildClientInfoFromHomeAccountId( - homeAccountId: string -): ClientInfo { - if (!homeAccountId) { - throw createClientAuthError( - ClientAuthErrorCodes.clientInfoDecodingError - ); - } - const clientInfoParts: string[] = homeAccountId.split( - Separators.CLIENT_INFO_SEPARATOR, - 2 - ); - return { - uid: clientInfoParts[0], - utid: - clientInfoParts.length < 2 - ? Constants.EMPTY_STRING - : clientInfoParts[1], - }; -} diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/src/account/TokenClaims.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/src/account/TokenClaims.ts deleted file mode 100644 index f8cc1bd..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/src/account/TokenClaims.ts +++ /dev/null @@ -1,98 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -/** - * Type which describes Id Token claims known by MSAL. - */ -export type TokenClaims = { - /** - * Audience - */ - aud?: string; - /** - * Issuer - */ - iss?: string; - /** - * Issued at - */ - iat?: number; - /** - * Not valid before - */ - nbf?: number; - /** - * Immutable object identifier, this ID uniquely identifies the user across applications - */ - oid?: string; - /** - * Immutable subject identifier, this is a pairwise identifier - it is unique to a particular application ID - */ - sub?: string; - /** - * Users' tenant or '9188040d-6c67-4c5b-b112-36a304b66dad' for personal accounts. - */ - tid?: string; - /** - * Trusted Framework Policy (B2C) The name of the policy that was used to acquire the ID token. - */ - tfp?: string; - /** - * Authentication Context Class Reference (B2C) Used only with older policies. - */ - acr?: string; - ver?: string; - upn?: string; - preferred_username?: string; - login_hint?: string; - emails?: string[]; - name?: string; - nonce?: string; - /** - * Expiration - */ - exp?: number; - home_oid?: string; - sid?: string; - cloud_instance_host_name?: string; - cnf?: { - kid: string; - }; - x5c_ca?: string[]; - ts?: number; - at?: string; - u?: string; - p?: string; - m?: string; - roles?: string[]; - amr?: string[]; - idp?: string; - auth_time?: number; - /** - * Region of the resource tenant - */ - tenant_region_scope?: string; - tenant_region_sub_scope?: string; -}; - -/** - * Gets tenantId from available ID token claims to set as credential realm with the following precedence: - * 1. tid - if the token is acquired from an Azure AD tenant tid will be present - * 2. tfp - if the token is acquired from a modern B2C tenant tfp should be present - * 3. acr - if the token is acquired from a legacy B2C tenant acr should be present - * Downcased to match the realm case-insensitive comparison requirements - * @param idTokenClaims - * @returns - */ -export function getTenantIdFromIdTokenClaims( - idTokenClaims?: TokenClaims -): string | null { - if (idTokenClaims) { - const tenantId = - idTokenClaims.tid || idTokenClaims.tfp || idTokenClaims.acr; - return tenantId || null; - } - return null; -} diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/src/authority/Authority.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/src/authority/Authority.ts deleted file mode 100644 index a3acc6e..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/src/authority/Authority.ts +++ /dev/null @@ -1,1365 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import { AuthorityType } from "./AuthorityType.js"; -import { - isOpenIdConfigResponse, - OpenIdConfigResponse, -} from "./OpenIdConfigResponse.js"; -import { UrlString } from "../url/UrlString.js"; -import { IUri } from "../url/IUri.js"; -import { - createClientAuthError, - ClientAuthErrorCodes, -} from "../error/ClientAuthError.js"; -import { INetworkModule } from "../network/INetworkModule.js"; -import { - AADAuthorityConstants, - AuthorityMetadataSource, - Constants, - RegionDiscoveryOutcomes, -} from "../utils/Constants.js"; -import { - EndpointMetadata, - getCloudDiscoveryMetadataFromHardcodedValues, - getCloudDiscoveryMetadataFromNetworkResponse, - InstanceDiscoveryMetadataAliases, -} from "./AuthorityMetadata.js"; -import { - createClientConfigurationError, - ClientConfigurationErrorCodes, -} from "../error/ClientConfigurationError.js"; -import { ProtocolMode } from "./ProtocolMode.js"; -import { ICacheManager } from "../cache/interface/ICacheManager.js"; -import { AuthorityMetadataEntity } from "../cache/entities/AuthorityMetadataEntity.js"; -import { - AuthorityOptions, - AzureCloudInstance, - StaticAuthorityOptions, -} from "./AuthorityOptions.js"; -import { - CloudInstanceDiscoveryResponse, - isCloudInstanceDiscoveryResponse, -} from "./CloudInstanceDiscoveryResponse.js"; -import { - CloudInstanceDiscoveryErrorResponse, - isCloudInstanceDiscoveryErrorResponse, -} from "./CloudInstanceDiscoveryErrorResponse.js"; -import { CloudDiscoveryMetadata } from "./CloudDiscoveryMetadata.js"; -import { RegionDiscovery } from "./RegionDiscovery.js"; -import { RegionDiscoveryMetadata } from "./RegionDiscoveryMetadata.js"; -import { ImdsOptions } from "./ImdsOptions.js"; -import { AzureCloudOptions } from "../config/ClientConfiguration.js"; -import { Logger } from "../logger/Logger.js"; -import { AuthError } from "../error/AuthError.js"; -import { IPerformanceClient } from "../telemetry/performance/IPerformanceClient.js"; -import { PerformanceEvents } from "../telemetry/performance/PerformanceEvent.js"; -import { invokeAsync } from "../utils/FunctionWrappers.js"; -import * as CacheHelpers from "../cache/utils/CacheHelpers.js"; - -/** - * The authority class validates the authority URIs used by the user, and retrieves the OpenID Configuration Data from the - * endpoint. It will store the pertinent config data in this object for use during token calls. - * @internal - */ -export class Authority { - // Canonical authority url string - private _canonicalAuthority: UrlString; - // Canonicaly authority url components - private _canonicalAuthorityUrlComponents: IUri | null; - // Network interface to make requests with. - protected networkInterface: INetworkModule; - // Cache Manager to cache network responses - protected cacheManager: ICacheManager; - // Protocol mode to construct endpoints - private authorityOptions: AuthorityOptions; - // Authority metadata - private metadata: AuthorityMetadataEntity; - // Region discovery service - private regionDiscovery: RegionDiscovery; - // Region discovery metadata - public regionDiscoveryMetadata: RegionDiscoveryMetadata; - // Logger object - private logger: Logger; - // Performance client - protected performanceClient: IPerformanceClient | undefined; - // Correlation Id - protected correlationId: string; - // Indicates if the authority is fake, for the purpose of a Managed Identity Application - private managedIdentity: boolean; - // Reserved tenant domain names that will not be replaced with tenant id - private static reservedTenantDomains: Set = new Set([ - "{tenant}", - "{tenantid}", - AADAuthorityConstants.COMMON, - AADAuthorityConstants.CONSUMERS, - AADAuthorityConstants.ORGANIZATIONS, - ]); - - constructor( - authority: string, - networkInterface: INetworkModule, - cacheManager: ICacheManager, - authorityOptions: AuthorityOptions, - logger: Logger, - correlationId: string, - performanceClient?: IPerformanceClient, - managedIdentity?: boolean - ) { - this.canonicalAuthority = authority; - this._canonicalAuthority.validateAsUri(); - this.networkInterface = networkInterface; - this.cacheManager = cacheManager; - this.authorityOptions = authorityOptions; - this.regionDiscoveryMetadata = { - region_used: undefined, - region_source: undefined, - region_outcome: undefined, - }; - this.logger = logger; - this.performanceClient = performanceClient; - this.correlationId = correlationId; - this.managedIdentity = managedIdentity || false; - this.regionDiscovery = new RegionDiscovery( - networkInterface, - this.logger, - this.performanceClient, - this.correlationId - ); - } - - /** - * Get {@link AuthorityType} - * @param authorityUri {@link IUri} - * @private - */ - private getAuthorityType(authorityUri: IUri): AuthorityType { - // CIAM auth url pattern is being standardized as: .ciamlogin.com - if (authorityUri.HostNameAndPort.endsWith(Constants.CIAM_AUTH_URL)) { - return AuthorityType.Ciam; - } - - const pathSegments = authorityUri.PathSegments; - if (pathSegments.length) { - switch (pathSegments[0].toLowerCase()) { - case Constants.ADFS: - return AuthorityType.Adfs; - case Constants.DSTS: - return AuthorityType.Dsts; - default: - break; - } - } - return AuthorityType.Default; - } - - // See above for AuthorityType - public get authorityType(): AuthorityType { - return this.getAuthorityType(this.canonicalAuthorityUrlComponents); - } - - /** - * ProtocolMode enum representing the way endpoints are constructed. - */ - public get protocolMode(): ProtocolMode { - return this.authorityOptions.protocolMode; - } - - /** - * Returns authorityOptions which can be used to reinstantiate a new authority instance - */ - public get options(): AuthorityOptions { - return this.authorityOptions; - } - - /** - * A URL that is the authority set by the developer - */ - public get canonicalAuthority(): string { - return this._canonicalAuthority.urlString; - } - - /** - * Sets canonical authority. - */ - public set canonicalAuthority(url: string) { - this._canonicalAuthority = new UrlString(url); - this._canonicalAuthority.validateAsUri(); - this._canonicalAuthorityUrlComponents = null; - } - - /** - * Get authority components. - */ - public get canonicalAuthorityUrlComponents(): IUri { - if (!this._canonicalAuthorityUrlComponents) { - this._canonicalAuthorityUrlComponents = - this._canonicalAuthority.getUrlComponents(); - } - - return this._canonicalAuthorityUrlComponents; - } - - /** - * Get hostname and port i.e. login.microsoftonline.com - */ - public get hostnameAndPort(): string { - return this.canonicalAuthorityUrlComponents.HostNameAndPort.toLowerCase(); - } - - /** - * Get tenant for authority. - */ - public get tenant(): string { - return this.canonicalAuthorityUrlComponents.PathSegments[0]; - } - - /** - * OAuth /authorize endpoint for requests - */ - public get authorizationEndpoint(): string { - if (this.discoveryComplete()) { - return this.replacePath(this.metadata.authorization_endpoint); - } else { - throw createClientAuthError( - ClientAuthErrorCodes.endpointResolutionError - ); - } - } - - /** - * OAuth /token endpoint for requests - */ - public get tokenEndpoint(): string { - if (this.discoveryComplete()) { - return this.replacePath(this.metadata.token_endpoint); - } else { - throw createClientAuthError( - ClientAuthErrorCodes.endpointResolutionError - ); - } - } - - public get deviceCodeEndpoint(): string { - if (this.discoveryComplete()) { - return this.replacePath( - this.metadata.token_endpoint.replace("/token", "/devicecode") - ); - } else { - throw createClientAuthError( - ClientAuthErrorCodes.endpointResolutionError - ); - } - } - - /** - * OAuth logout endpoint for requests - */ - public get endSessionEndpoint(): string { - if (this.discoveryComplete()) { - // ROPC policies may not have end_session_endpoint set - if (!this.metadata.end_session_endpoint) { - throw createClientAuthError( - ClientAuthErrorCodes.endSessionEndpointNotSupported - ); - } - return this.replacePath(this.metadata.end_session_endpoint); - } else { - throw createClientAuthError( - ClientAuthErrorCodes.endpointResolutionError - ); - } - } - - /** - * OAuth issuer for requests - */ - public get selfSignedJwtAudience(): string { - if (this.discoveryComplete()) { - return this.replacePath(this.metadata.issuer); - } else { - throw createClientAuthError( - ClientAuthErrorCodes.endpointResolutionError - ); - } - } - - /** - * Jwks_uri for token signing keys - */ - public get jwksUri(): string { - if (this.discoveryComplete()) { - return this.replacePath(this.metadata.jwks_uri); - } else { - throw createClientAuthError( - ClientAuthErrorCodes.endpointResolutionError - ); - } - } - - /** - * Returns a flag indicating that tenant name can be replaced in authority {@link IUri} - * @param authorityUri {@link IUri} - * @private - */ - private canReplaceTenant(authorityUri: IUri): boolean { - return ( - authorityUri.PathSegments.length === 1 && - !Authority.reservedTenantDomains.has( - authorityUri.PathSegments[0] - ) && - this.getAuthorityType(authorityUri) === AuthorityType.Default && - this.protocolMode === ProtocolMode.AAD - ); - } - - /** - * Replaces tenant in url path with current tenant. Defaults to common. - * @param urlString - */ - private replaceTenant(urlString: string): string { - return urlString.replace(/{tenant}|{tenantid}/g, this.tenant); - } - - /** - * Replaces path such as tenant or policy with the current tenant or policy. - * @param urlString - */ - private replacePath(urlString: string): string { - let endpoint = urlString; - const cachedAuthorityUrl = new UrlString( - this.metadata.canonical_authority - ); - const cachedAuthorityUrlComponents = - cachedAuthorityUrl.getUrlComponents(); - const cachedAuthorityParts = cachedAuthorityUrlComponents.PathSegments; - const currentAuthorityParts = - this.canonicalAuthorityUrlComponents.PathSegments; - - currentAuthorityParts.forEach((currentPart, index) => { - let cachedPart = cachedAuthorityParts[index]; - if ( - index === 0 && - this.canReplaceTenant(cachedAuthorityUrlComponents) - ) { - const tenantId = new UrlString( - this.metadata.authorization_endpoint - ).getUrlComponents().PathSegments[0]; - /** - * Check if AAD canonical authority contains tenant domain name, for example "testdomain.onmicrosoft.com", - * by comparing its first path segment to the corresponding authorization endpoint path segment, which is - * always resolved with tenant id by OIDC. - */ - if (cachedPart !== tenantId) { - this.logger.verbose( - `Replacing tenant domain name ${cachedPart} with id ${tenantId}` - ); - cachedPart = tenantId; - } - } - if (currentPart !== cachedPart) { - endpoint = endpoint.replace( - `/${cachedPart}/`, - `/${currentPart}/` - ); - } - }); - - return this.replaceTenant(endpoint); - } - - /** - * The default open id configuration endpoint for any canonical authority. - */ - protected get defaultOpenIdConfigurationEndpoint(): string { - const canonicalAuthorityHost = this.hostnameAndPort; - if ( - this.canonicalAuthority.endsWith("v2.0/") || - this.authorityType === AuthorityType.Adfs || - (this.protocolMode !== ProtocolMode.AAD && - !this.isAliasOfKnownMicrosoftAuthority(canonicalAuthorityHost)) - ) { - return `${this.canonicalAuthority}.well-known/openid-configuration`; - } - return `${this.canonicalAuthority}v2.0/.well-known/openid-configuration`; - } - - /** - * Boolean that returns whether or not tenant discovery has been completed. - */ - discoveryComplete(): boolean { - return !!this.metadata; - } - - /** - * Perform endpoint discovery to discover aliases, preferred_cache, preferred_network - * and the /authorize, /token and logout endpoints. - */ - public async resolveEndpointsAsync(): Promise { - this.performanceClient?.addQueueMeasurement( - PerformanceEvents.AuthorityResolveEndpointsAsync, - this.correlationId - ); - - const metadataEntity = this.getCurrentMetadataEntity(); - - const cloudDiscoverySource = await invokeAsync( - this.updateCloudDiscoveryMetadata.bind(this), - PerformanceEvents.AuthorityUpdateCloudDiscoveryMetadata, - this.logger, - this.performanceClient, - this.correlationId - )(metadataEntity); - this.canonicalAuthority = this.canonicalAuthority.replace( - this.hostnameAndPort, - metadataEntity.preferred_network - ); - const endpointSource = await invokeAsync( - this.updateEndpointMetadata.bind(this), - PerformanceEvents.AuthorityUpdateEndpointMetadata, - this.logger, - this.performanceClient, - this.correlationId - )(metadataEntity); - this.updateCachedMetadata(metadataEntity, cloudDiscoverySource, { - source: endpointSource, - }); - this.performanceClient?.addFields( - { - cloudDiscoverySource: cloudDiscoverySource, - authorityEndpointSource: endpointSource, - }, - this.correlationId - ); - } - - /** - * Returns metadata entity from cache if it exists, otherwiser returns a new metadata entity built - * from the configured canonical authority - * @returns - */ - private getCurrentMetadataEntity(): AuthorityMetadataEntity { - let metadataEntity: AuthorityMetadataEntity | null = - this.cacheManager.getAuthorityMetadataByAlias(this.hostnameAndPort); - - if (!metadataEntity) { - metadataEntity = { - aliases: [], - preferred_cache: this.hostnameAndPort, - preferred_network: this.hostnameAndPort, - canonical_authority: this.canonicalAuthority, - authorization_endpoint: "", - token_endpoint: "", - end_session_endpoint: "", - issuer: "", - aliasesFromNetwork: false, - endpointsFromNetwork: false, - expiresAt: CacheHelpers.generateAuthorityMetadataExpiresAt(), - jwks_uri: "", - }; - } - return metadataEntity; - } - - /** - * Updates cached metadata based on metadata source and sets the instance's metadata - * property to the same value - * @param metadataEntity - * @param cloudDiscoverySource - * @param endpointMetadataResult - */ - private updateCachedMetadata( - metadataEntity: AuthorityMetadataEntity, - cloudDiscoverySource: AuthorityMetadataSource | null, - endpointMetadataResult: { - source: AuthorityMetadataSource; - metadata?: OpenIdConfigResponse; - } | null - ): void { - if ( - cloudDiscoverySource !== AuthorityMetadataSource.CACHE && - endpointMetadataResult?.source !== AuthorityMetadataSource.CACHE - ) { - // Reset the expiration time unless both values came from a successful cache lookup - metadataEntity.expiresAt = - CacheHelpers.generateAuthorityMetadataExpiresAt(); - metadataEntity.canonical_authority = this.canonicalAuthority; - } - - const cacheKey = this.cacheManager.generateAuthorityMetadataCacheKey( - metadataEntity.preferred_cache - ); - this.cacheManager.setAuthorityMetadata(cacheKey, metadataEntity); - this.metadata = metadataEntity; - } - - /** - * Update AuthorityMetadataEntity with new endpoints and return where the information came from - * @param metadataEntity - */ - private async updateEndpointMetadata( - metadataEntity: AuthorityMetadataEntity - ): Promise { - this.performanceClient?.addQueueMeasurement( - PerformanceEvents.AuthorityUpdateEndpointMetadata, - this.correlationId - ); - - const localMetadata = - this.updateEndpointMetadataFromLocalSources(metadataEntity); - - // Further update may be required for hardcoded metadata if regional metadata is preferred - if (localMetadata) { - if ( - localMetadata.source === - AuthorityMetadataSource.HARDCODED_VALUES - ) { - // If the user prefers to use an azure region replace the global endpoints with regional information. - if ( - this.authorityOptions.azureRegionConfiguration?.azureRegion - ) { - if (localMetadata.metadata) { - const hardcodedMetadata = await invokeAsync( - this.updateMetadataWithRegionalInformation.bind( - this - ), - PerformanceEvents.AuthorityUpdateMetadataWithRegionalInformation, - this.logger, - this.performanceClient, - this.correlationId - )(localMetadata.metadata); - CacheHelpers.updateAuthorityEndpointMetadata( - metadataEntity, - hardcodedMetadata, - false - ); - metadataEntity.canonical_authority = - this.canonicalAuthority; - } - } - } - return localMetadata.source; - } - - // Get metadata from network if local sources aren't available - let metadata = await invokeAsync( - this.getEndpointMetadataFromNetwork.bind(this), - PerformanceEvents.AuthorityGetEndpointMetadataFromNetwork, - this.logger, - this.performanceClient, - this.correlationId - )(); - if (metadata) { - // If the user prefers to use an azure region replace the global endpoints with regional information. - if (this.authorityOptions.azureRegionConfiguration?.azureRegion) { - metadata = await invokeAsync( - this.updateMetadataWithRegionalInformation.bind(this), - PerformanceEvents.AuthorityUpdateMetadataWithRegionalInformation, - this.logger, - this.performanceClient, - this.correlationId - )(metadata); - } - - CacheHelpers.updateAuthorityEndpointMetadata( - metadataEntity, - metadata, - true - ); - return AuthorityMetadataSource.NETWORK; - } else { - // Metadata could not be obtained from the config, cache, network or hardcoded values - throw createClientAuthError( - ClientAuthErrorCodes.openIdConfigError, - this.defaultOpenIdConfigurationEndpoint - ); - } - } - - /** - * Updates endpoint metadata from local sources and returns where the information was retrieved from and the metadata config - * response if the source is hardcoded metadata - * @param metadataEntity - * @returns - */ - private updateEndpointMetadataFromLocalSources( - metadataEntity: AuthorityMetadataEntity - ): { - source: AuthorityMetadataSource; - metadata?: OpenIdConfigResponse; - } | null { - this.logger.verbose( - "Attempting to get endpoint metadata from authority configuration" - ); - const configMetadata = this.getEndpointMetadataFromConfig(); - if (configMetadata) { - this.logger.verbose( - "Found endpoint metadata in authority configuration" - ); - CacheHelpers.updateAuthorityEndpointMetadata( - metadataEntity, - configMetadata, - false - ); - return { - source: AuthorityMetadataSource.CONFIG, - }; - } - - this.logger.verbose( - "Did not find endpoint metadata in the config... Attempting to get endpoint metadata from the hardcoded values." - ); - - // skipAuthorityMetadataCache is used to bypass hardcoded authority metadata and force a network metadata cache lookup and network metadata request if no cached response is available. - if (this.authorityOptions.skipAuthorityMetadataCache) { - this.logger.verbose( - "Skipping hardcoded metadata cache since skipAuthorityMetadataCache is set to true. Attempting to get endpoint metadata from the network metadata cache." - ); - } else { - const hardcodedMetadata = - this.getEndpointMetadataFromHardcodedValues(); - if (hardcodedMetadata) { - CacheHelpers.updateAuthorityEndpointMetadata( - metadataEntity, - hardcodedMetadata, - false - ); - return { - source: AuthorityMetadataSource.HARDCODED_VALUES, - metadata: hardcodedMetadata, - }; - } else { - this.logger.verbose( - "Did not find endpoint metadata in hardcoded values... Attempting to get endpoint metadata from the network metadata cache." - ); - } - } - - // Check cached metadata entity expiration status - const metadataEntityExpired = - CacheHelpers.isAuthorityMetadataExpired(metadataEntity); - if ( - this.isAuthoritySameType(metadataEntity) && - metadataEntity.endpointsFromNetwork && - !metadataEntityExpired - ) { - // No need to update - this.logger.verbose("Found endpoint metadata in the cache."); - return { source: AuthorityMetadataSource.CACHE }; - } else if (metadataEntityExpired) { - this.logger.verbose("The metadata entity is expired."); - } - - return null; - } - - /** - * Compares the number of url components after the domain to determine if the cached - * authority metadata can be used for the requested authority. Protects against same domain different - * authority such as login.microsoftonline.com/tenant and login.microsoftonline.com/tfp/tenant/policy - * @param metadataEntity - */ - private isAuthoritySameType( - metadataEntity: AuthorityMetadataEntity - ): boolean { - const cachedAuthorityUrl = new UrlString( - metadataEntity.canonical_authority - ); - const cachedParts = cachedAuthorityUrl.getUrlComponents().PathSegments; - - return ( - cachedParts.length === - this.canonicalAuthorityUrlComponents.PathSegments.length - ); - } - - /** - * Parse authorityMetadata config option - */ - private getEndpointMetadataFromConfig(): OpenIdConfigResponse | null { - if (this.authorityOptions.authorityMetadata) { - try { - return JSON.parse( - this.authorityOptions.authorityMetadata - ) as OpenIdConfigResponse; - } catch (e) { - throw createClientConfigurationError( - ClientConfigurationErrorCodes.invalidAuthorityMetadata - ); - } - } - - return null; - } - - /** - * Gets OAuth endpoints from the given OpenID configuration endpoint. - * - * @param hasHardcodedMetadata boolean - */ - private async getEndpointMetadataFromNetwork(): Promise { - this.performanceClient?.addQueueMeasurement( - PerformanceEvents.AuthorityGetEndpointMetadataFromNetwork, - this.correlationId - ); - - const options: ImdsOptions = {}; - - /* - * TODO: Add a timeout if the authority exists in our library's - * hardcoded list of metadata - */ - - const openIdConfigurationEndpoint = - this.defaultOpenIdConfigurationEndpoint; - this.logger.verbose( - `Authority.getEndpointMetadataFromNetwork: attempting to retrieve OAuth endpoints from ${openIdConfigurationEndpoint}` - ); - - try { - const response = - await this.networkInterface.sendGetRequestAsync( - openIdConfigurationEndpoint, - options - ); - const isValidResponse = isOpenIdConfigResponse(response.body); - if (isValidResponse) { - return response.body; - } else { - this.logger.verbose( - `Authority.getEndpointMetadataFromNetwork: could not parse response as OpenID configuration` - ); - return null; - } - } catch (e) { - this.logger.verbose( - `Authority.getEndpointMetadataFromNetwork: ${e}` - ); - return null; - } - } - - /** - * Get OAuth endpoints for common authorities. - */ - private getEndpointMetadataFromHardcodedValues(): OpenIdConfigResponse | null { - if (this.hostnameAndPort in EndpointMetadata) { - return EndpointMetadata[this.hostnameAndPort]; - } - - return null; - } - - /** - * Update the retrieved metadata with regional information. - * User selected Azure region will be used if configured. - */ - private async updateMetadataWithRegionalInformation( - metadata: OpenIdConfigResponse - ): Promise { - this.performanceClient?.addQueueMeasurement( - PerformanceEvents.AuthorityUpdateMetadataWithRegionalInformation, - this.correlationId - ); - - const userConfiguredAzureRegion = - this.authorityOptions.azureRegionConfiguration?.azureRegion; - - if (userConfiguredAzureRegion) { - if ( - userConfiguredAzureRegion !== - Constants.AZURE_REGION_AUTO_DISCOVER_FLAG - ) { - this.regionDiscoveryMetadata.region_outcome = - RegionDiscoveryOutcomes.CONFIGURED_NO_AUTO_DETECTION; - this.regionDiscoveryMetadata.region_used = - userConfiguredAzureRegion; - return Authority.replaceWithRegionalInformation( - metadata, - userConfiguredAzureRegion - ); - } - - const autodetectedRegionName = await invokeAsync( - this.regionDiscovery.detectRegion.bind(this.regionDiscovery), - PerformanceEvents.RegionDiscoveryDetectRegion, - this.logger, - this.performanceClient, - this.correlationId - )( - this.authorityOptions.azureRegionConfiguration - ?.environmentRegion, - this.regionDiscoveryMetadata - ); - - if (autodetectedRegionName) { - this.regionDiscoveryMetadata.region_outcome = - RegionDiscoveryOutcomes.AUTO_DETECTION_REQUESTED_SUCCESSFUL; - this.regionDiscoveryMetadata.region_used = - autodetectedRegionName; - return Authority.replaceWithRegionalInformation( - metadata, - autodetectedRegionName - ); - } - - this.regionDiscoveryMetadata.region_outcome = - RegionDiscoveryOutcomes.AUTO_DETECTION_REQUESTED_FAILED; - } - - return metadata; - } - - /** - * Updates the AuthorityMetadataEntity with new aliases, preferred_network and preferred_cache - * and returns where the information was retrieved from - * @param metadataEntity - * @returns AuthorityMetadataSource - */ - private async updateCloudDiscoveryMetadata( - metadataEntity: AuthorityMetadataEntity - ): Promise { - this.performanceClient?.addQueueMeasurement( - PerformanceEvents.AuthorityUpdateCloudDiscoveryMetadata, - this.correlationId - ); - const localMetadataSource = - this.updateCloudDiscoveryMetadataFromLocalSources(metadataEntity); - if (localMetadataSource) { - return localMetadataSource; - } - - // Fallback to network as metadata source - const metadata = await invokeAsync( - this.getCloudDiscoveryMetadataFromNetwork.bind(this), - PerformanceEvents.AuthorityGetCloudDiscoveryMetadataFromNetwork, - this.logger, - this.performanceClient, - this.correlationId - )(); - - if (metadata) { - CacheHelpers.updateCloudDiscoveryMetadata( - metadataEntity, - metadata, - true - ); - return AuthorityMetadataSource.NETWORK; - } - - // Metadata could not be obtained from the config, cache, network or hardcoded values - throw createClientConfigurationError( - ClientConfigurationErrorCodes.untrustedAuthority - ); - } - - private updateCloudDiscoveryMetadataFromLocalSources( - metadataEntity: AuthorityMetadataEntity - ): AuthorityMetadataSource | null { - this.logger.verbose( - "Attempting to get cloud discovery metadata from authority configuration" - ); - this.logger.verbosePii( - `Known Authorities: ${ - this.authorityOptions.knownAuthorities || - Constants.NOT_APPLICABLE - }` - ); - this.logger.verbosePii( - `Authority Metadata: ${ - this.authorityOptions.authorityMetadata || - Constants.NOT_APPLICABLE - }` - ); - this.logger.verbosePii( - `Canonical Authority: ${ - metadataEntity.canonical_authority || Constants.NOT_APPLICABLE - }` - ); - const metadata = this.getCloudDiscoveryMetadataFromConfig(); - if (metadata) { - this.logger.verbose( - "Found cloud discovery metadata in authority configuration" - ); - CacheHelpers.updateCloudDiscoveryMetadata( - metadataEntity, - metadata, - false - ); - return AuthorityMetadataSource.CONFIG; - } - - // If the cached metadata came from config but that config was not passed to this instance, we must go to hardcoded values - this.logger.verbose( - "Did not find cloud discovery metadata in the config... Attempting to get cloud discovery metadata from the hardcoded values." - ); - - if (this.options.skipAuthorityMetadataCache) { - this.logger.verbose( - "Skipping hardcoded cloud discovery metadata cache since skipAuthorityMetadataCache is set to true. Attempting to get cloud discovery metadata from the network metadata cache." - ); - } else { - const hardcodedMetadata = - getCloudDiscoveryMetadataFromHardcodedValues( - this.hostnameAndPort - ); - if (hardcodedMetadata) { - this.logger.verbose( - "Found cloud discovery metadata from hardcoded values." - ); - CacheHelpers.updateCloudDiscoveryMetadata( - metadataEntity, - hardcodedMetadata, - false - ); - return AuthorityMetadataSource.HARDCODED_VALUES; - } - - this.logger.verbose( - "Did not find cloud discovery metadata in hardcoded values... Attempting to get cloud discovery metadata from the network metadata cache." - ); - } - - const metadataEntityExpired = - CacheHelpers.isAuthorityMetadataExpired(metadataEntity); - if ( - this.isAuthoritySameType(metadataEntity) && - metadataEntity.aliasesFromNetwork && - !metadataEntityExpired - ) { - this.logger.verbose("Found cloud discovery metadata in the cache."); - // No need to update - return AuthorityMetadataSource.CACHE; - } else if (metadataEntityExpired) { - this.logger.verbose("The metadata entity is expired."); - } - - return null; - } - - /** - * Parse cloudDiscoveryMetadata config or check knownAuthorities - */ - private getCloudDiscoveryMetadataFromConfig(): CloudDiscoveryMetadata | null { - // CIAM does not support cloud discovery metadata - if (this.authorityType === AuthorityType.Ciam) { - this.logger.verbose( - "CIAM authorities do not support cloud discovery metadata, generate the aliases from authority host." - ); - return Authority.createCloudDiscoveryMetadataFromHost( - this.hostnameAndPort - ); - } - - // Check if network response was provided in config - if (this.authorityOptions.cloudDiscoveryMetadata) { - this.logger.verbose( - "The cloud discovery metadata has been provided as a network response, in the config." - ); - try { - this.logger.verbose( - "Attempting to parse the cloud discovery metadata." - ); - const parsedResponse = JSON.parse( - this.authorityOptions.cloudDiscoveryMetadata - ) as CloudInstanceDiscoveryResponse; - const metadata = getCloudDiscoveryMetadataFromNetworkResponse( - parsedResponse.metadata, - this.hostnameAndPort - ); - this.logger.verbose("Parsed the cloud discovery metadata."); - if (metadata) { - this.logger.verbose( - "There is returnable metadata attached to the parsed cloud discovery metadata." - ); - return metadata; - } else { - this.logger.verbose( - "There is no metadata attached to the parsed cloud discovery metadata." - ); - } - } catch (e) { - this.logger.verbose( - "Unable to parse the cloud discovery metadata. Throwing Invalid Cloud Discovery Metadata Error." - ); - throw createClientConfigurationError( - ClientConfigurationErrorCodes.invalidCloudDiscoveryMetadata - ); - } - } - - // If cloudDiscoveryMetadata is empty or does not contain the host, check knownAuthorities - if (this.isInKnownAuthorities()) { - this.logger.verbose( - "The host is included in knownAuthorities. Creating new cloud discovery metadata from the host." - ); - return Authority.createCloudDiscoveryMetadataFromHost( - this.hostnameAndPort - ); - } - - return null; - } - - /** - * Called to get metadata from network if CloudDiscoveryMetadata was not populated by config - * - * @param hasHardcodedMetadata boolean - */ - private async getCloudDiscoveryMetadataFromNetwork(): Promise { - this.performanceClient?.addQueueMeasurement( - PerformanceEvents.AuthorityGetCloudDiscoveryMetadataFromNetwork, - this.correlationId - ); - const instanceDiscoveryEndpoint = `${Constants.AAD_INSTANCE_DISCOVERY_ENDPT}${this.canonicalAuthority}oauth2/v2.0/authorize`; - const options: ImdsOptions = {}; - - /* - * TODO: Add a timeout if the authority exists in our library's - * hardcoded list of metadata - */ - - let match = null; - try { - const response = await this.networkInterface.sendGetRequestAsync< - | CloudInstanceDiscoveryResponse - | CloudInstanceDiscoveryErrorResponse - >(instanceDiscoveryEndpoint, options); - let typedResponseBody: - | CloudInstanceDiscoveryResponse - | CloudInstanceDiscoveryErrorResponse; - let metadata: Array; - if (isCloudInstanceDiscoveryResponse(response.body)) { - typedResponseBody = - response.body as CloudInstanceDiscoveryResponse; - metadata = typedResponseBody.metadata; - - this.logger.verbosePii( - `tenant_discovery_endpoint is: ${typedResponseBody.tenant_discovery_endpoint}` - ); - } else if (isCloudInstanceDiscoveryErrorResponse(response.body)) { - this.logger.warning( - `A CloudInstanceDiscoveryErrorResponse was returned. The cloud instance discovery network request's status code is: ${response.status}` - ); - - typedResponseBody = - response.body as CloudInstanceDiscoveryErrorResponse; - if (typedResponseBody.error === Constants.INVALID_INSTANCE) { - this.logger.error( - "The CloudInstanceDiscoveryErrorResponse error is invalid_instance." - ); - return null; - } - - this.logger.warning( - `The CloudInstanceDiscoveryErrorResponse error is ${typedResponseBody.error}` - ); - this.logger.warning( - `The CloudInstanceDiscoveryErrorResponse error description is ${typedResponseBody.error_description}` - ); - - this.logger.warning( - "Setting the value of the CloudInstanceDiscoveryMetadata (returned from the network) to []" - ); - metadata = []; - } else { - this.logger.error( - "AAD did not return a CloudInstanceDiscoveryResponse or CloudInstanceDiscoveryErrorResponse" - ); - return null; - } - - this.logger.verbose( - "Attempting to find a match between the developer's authority and the CloudInstanceDiscoveryMetadata returned from the network request." - ); - match = getCloudDiscoveryMetadataFromNetworkResponse( - metadata, - this.hostnameAndPort - ); - } catch (error) { - if (error instanceof AuthError) { - this.logger.error( - `There was a network error while attempting to get the cloud discovery instance metadata.\nError: ${error.errorCode}\nError Description: ${error.errorMessage}` - ); - } else { - const typedError = error as Error; - this.logger.error( - `A non-MSALJS error was thrown while attempting to get the cloud instance discovery metadata.\nError: ${typedError.name}\nError Description: ${typedError.message}` - ); - } - - return null; - } - - // Custom Domain scenario, host is trusted because Instance Discovery call succeeded - if (!match) { - this.logger.warning( - "The developer's authority was not found within the CloudInstanceDiscoveryMetadata returned from the network request." - ); - this.logger.verbose( - "Creating custom Authority for custom domain scenario." - ); - - match = Authority.createCloudDiscoveryMetadataFromHost( - this.hostnameAndPort - ); - } - return match; - } - - /** - * Helper function to determine if this host is included in the knownAuthorities config option - */ - private isInKnownAuthorities(): boolean { - const matches = this.authorityOptions.knownAuthorities.filter( - (authority) => { - return ( - authority && - UrlString.getDomainFromUrl(authority).toLowerCase() === - this.hostnameAndPort - ); - } - ); - return matches.length > 0; - } - - /** - * helper function to populate the authority based on azureCloudOptions - * @param authorityString - * @param azureCloudOptions - */ - static generateAuthority( - authorityString: string, - azureCloudOptions?: AzureCloudOptions - ): string { - let authorityAzureCloudInstance; - - if ( - azureCloudOptions && - azureCloudOptions.azureCloudInstance !== AzureCloudInstance.None - ) { - const tenant = azureCloudOptions.tenant - ? azureCloudOptions.tenant - : Constants.DEFAULT_COMMON_TENANT; - authorityAzureCloudInstance = `${azureCloudOptions.azureCloudInstance}/${tenant}/`; - } - - return authorityAzureCloudInstance - ? authorityAzureCloudInstance - : authorityString; - } - - /** - * Creates cloud discovery metadata object from a given host - * @param host - */ - static createCloudDiscoveryMetadataFromHost( - host: string - ): CloudDiscoveryMetadata { - return { - preferred_network: host, - preferred_cache: host, - aliases: [host], - }; - } - - /** - * helper function to generate environment from authority object - */ - getPreferredCache(): string { - if (this.managedIdentity) { - return Constants.DEFAULT_AUTHORITY_HOST; - } else if (this.discoveryComplete()) { - return this.metadata.preferred_cache; - } else { - throw createClientAuthError( - ClientAuthErrorCodes.endpointResolutionError - ); - } - } - - /** - * Returns whether or not the provided host is an alias of this authority instance - * @param host - */ - isAlias(host: string): boolean { - return this.metadata.aliases.indexOf(host) > -1; - } - - /** - * Returns whether or not the provided host is an alias of a known Microsoft authority for purposes of endpoint discovery - * @param host - */ - isAliasOfKnownMicrosoftAuthority(host: string): boolean { - return InstanceDiscoveryMetadataAliases.has(host); - } - - /** - * Checks whether the provided host is that of a public cloud authority - * - * @param authority string - * @returns bool - */ - static isPublicCloudAuthority(host: string): boolean { - return Constants.KNOWN_PUBLIC_CLOUDS.indexOf(host) >= 0; - } - - /** - * Rebuild the authority string with the region - * - * @param host string - * @param region string - */ - static buildRegionalAuthorityString( - host: string, - region: string, - queryString?: string - ): string { - // Create and validate a Url string object with the initial authority string - const authorityUrlInstance = new UrlString(host); - authorityUrlInstance.validateAsUri(); - - const authorityUrlParts = authorityUrlInstance.getUrlComponents(); - - let hostNameAndPort = `${region}.${authorityUrlParts.HostNameAndPort}`; - - if (this.isPublicCloudAuthority(authorityUrlParts.HostNameAndPort)) { - hostNameAndPort = `${region}.${Constants.REGIONAL_AUTH_PUBLIC_CLOUD_SUFFIX}`; - } - - // Include the query string portion of the url - const url = UrlString.constructAuthorityUriFromObject({ - ...authorityUrlInstance.getUrlComponents(), - HostNameAndPort: hostNameAndPort, - }).urlString; - - // Add the query string if a query string was provided - if (queryString) return `${url}?${queryString}`; - - return url; - } - - /** - * Replace the endpoints in the metadata object with their regional equivalents. - * - * @param metadata OpenIdConfigResponse - * @param azureRegion string - */ - static replaceWithRegionalInformation( - metadata: OpenIdConfigResponse, - azureRegion: string - ): OpenIdConfigResponse { - const regionalMetadata = { ...metadata }; - regionalMetadata.authorization_endpoint = - Authority.buildRegionalAuthorityString( - regionalMetadata.authorization_endpoint, - azureRegion - ); - - regionalMetadata.token_endpoint = - Authority.buildRegionalAuthorityString( - regionalMetadata.token_endpoint, - azureRegion - ); - - if (regionalMetadata.end_session_endpoint) { - regionalMetadata.end_session_endpoint = - Authority.buildRegionalAuthorityString( - regionalMetadata.end_session_endpoint, - azureRegion - ); - } - - return regionalMetadata; - } - - /** - * Transform CIAM_AUTHORIY as per the below rules: - * If no path segments found and it is a CIAM authority (hostname ends with .ciamlogin.com), then transform it - * - * NOTE: The transformation path should go away once STS supports CIAM with the format: `tenantIdorDomain.ciamlogin.com` - * `ciamlogin.com` can also change in the future and we should accommodate the same - * - * @param authority - */ - static transformCIAMAuthority(authority: string): string { - let ciamAuthority = authority; - const authorityUrl = new UrlString(authority); - const authorityUrlComponents = authorityUrl.getUrlComponents(); - - // check if transformation is needed - if ( - authorityUrlComponents.PathSegments.length === 0 && - authorityUrlComponents.HostNameAndPort.endsWith( - Constants.CIAM_AUTH_URL - ) - ) { - const tenantIdOrDomain = - authorityUrlComponents.HostNameAndPort.split(".")[0]; - ciamAuthority = `${ciamAuthority}${tenantIdOrDomain}${Constants.AAD_TENANT_DOMAIN_SUFFIX}`; - } - - return ciamAuthority; - } -} - -/** - * Extract tenantId from authority - */ -export function getTenantFromAuthorityString( - authority: string -): string | undefined { - const authorityUrl = new UrlString(authority); - const authorityUrlComponents = authorityUrl.getUrlComponents(); - /** - * For credential matching purposes, tenantId is the last path segment of the authority URL: - * AAD Authority - domain/tenantId -> Credentials are cached with realm = tenantId - * B2C Authority - domain/{tenantId}?/.../policy -> Credentials are cached with realm = policy - * tenantId is downcased because B2C policies can have mixed case but tfp claim is downcased - * - * Note that we may not have any path segments in certain OIDC scenarios. - */ - const tenantId = - authorityUrlComponents.PathSegments.slice(-1)[0]?.toLowerCase(); - - switch (tenantId) { - case AADAuthorityConstants.COMMON: - case AADAuthorityConstants.ORGANIZATIONS: - case AADAuthorityConstants.CONSUMERS: - return undefined; - default: - return tenantId; - } -} - -export function formatAuthorityUri(authorityUri: string): string { - return authorityUri.endsWith(Constants.FORWARD_SLASH) - ? authorityUri - : `${authorityUri}${Constants.FORWARD_SLASH}`; -} - -export function buildStaticAuthorityOptions( - authOptions: Partial -): StaticAuthorityOptions { - const rawCloudDiscoveryMetadata = authOptions.cloudDiscoveryMetadata; - let cloudDiscoveryMetadata: CloudInstanceDiscoveryResponse | undefined = - undefined; - if (rawCloudDiscoveryMetadata) { - try { - cloudDiscoveryMetadata = JSON.parse(rawCloudDiscoveryMetadata); - } catch (e) { - throw createClientConfigurationError( - ClientConfigurationErrorCodes.invalidCloudDiscoveryMetadata - ); - } - } - return { - canonicalAuthority: authOptions.authority - ? formatAuthorityUri(authOptions.authority) - : undefined, - knownAuthorities: authOptions.knownAuthorities, - cloudDiscoveryMetadata: cloudDiscoveryMetadata, - }; -} diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/src/authority/AuthorityFactory.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/src/authority/AuthorityFactory.ts deleted file mode 100644 index abeb099..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/src/authority/AuthorityFactory.ts +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import { Authority, formatAuthorityUri } from "./Authority.js"; -import { INetworkModule } from "../network/INetworkModule.js"; -import { - createClientAuthError, - ClientAuthErrorCodes, -} from "../error/ClientAuthError.js"; -import { ICacheManager } from "../cache/interface/ICacheManager.js"; -import { AuthorityOptions } from "./AuthorityOptions.js"; -import { Logger } from "../logger/Logger.js"; -import { IPerformanceClient } from "../telemetry/performance/IPerformanceClient.js"; -import { PerformanceEvents } from "../telemetry/performance/PerformanceEvent.js"; -import { invokeAsync } from "../utils/FunctionWrappers.js"; - -/** - * Create an authority object of the correct type based on the url - * Performs basic authority validation - checks to see if the authority is of a valid type (i.e. aad, b2c, adfs) - * - * Also performs endpoint discovery. - * - * @param authorityUri - * @param networkClient - * @param protocolMode - * @internal - */ -export async function createDiscoveredInstance( - authorityUri: string, - networkClient: INetworkModule, - cacheManager: ICacheManager, - authorityOptions: AuthorityOptions, - logger: Logger, - correlationId: string, - performanceClient?: IPerformanceClient -): Promise { - performanceClient?.addQueueMeasurement( - PerformanceEvents.AuthorityFactoryCreateDiscoveredInstance, - correlationId - ); - const authorityUriFinal = Authority.transformCIAMAuthority( - formatAuthorityUri(authorityUri) - ); - - // Initialize authority and perform discovery endpoint check. - const acquireTokenAuthority: Authority = new Authority( - authorityUriFinal, - networkClient, - cacheManager, - authorityOptions, - logger, - correlationId, - performanceClient - ); - - try { - await invokeAsync( - acquireTokenAuthority.resolveEndpointsAsync.bind( - acquireTokenAuthority - ), - PerformanceEvents.AuthorityResolveEndpointsAsync, - logger, - performanceClient, - correlationId - )(); - return acquireTokenAuthority; - } catch (e) { - throw createClientAuthError( - ClientAuthErrorCodes.endpointResolutionError - ); - } -} diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/src/authority/AuthorityMetadata.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/src/authority/AuthorityMetadata.ts deleted file mode 100644 index 05d8c46..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/src/authority/AuthorityMetadata.ts +++ /dev/null @@ -1,211 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import { Logger } from "../logger/Logger.js"; -import { UrlString } from "../url/UrlString.js"; -import { AuthorityMetadataSource } from "../utils/Constants.js"; -import { StaticAuthorityOptions } from "./AuthorityOptions.js"; -import { CloudDiscoveryMetadata } from "./CloudDiscoveryMetadata.js"; -import { CloudInstanceDiscoveryResponse } from "./CloudInstanceDiscoveryResponse.js"; -import { OpenIdConfigResponse } from "./OpenIdConfigResponse.js"; - -type RawMetadata = { - endpointMetadata: { [key: string]: OpenIdConfigResponse }; - instanceDiscoveryMetadata: CloudInstanceDiscoveryResponse; -}; - -export const rawMetdataJSON: RawMetadata = { - endpointMetadata: { - "login.microsoftonline.com": { - token_endpoint: - "https://login.microsoftonline.com/{tenantid}/oauth2/v2.0/token", - jwks_uri: - "https://login.microsoftonline.com/{tenantid}/discovery/v2.0/keys", - issuer: "https://login.microsoftonline.com/{tenantid}/v2.0", - authorization_endpoint: - "https://login.microsoftonline.com/{tenantid}/oauth2/v2.0/authorize", - end_session_endpoint: - "https://login.microsoftonline.com/{tenantid}/oauth2/v2.0/logout", - }, - "login.chinacloudapi.cn": { - token_endpoint: - "https://login.chinacloudapi.cn/{tenantid}/oauth2/v2.0/token", - jwks_uri: - "https://login.chinacloudapi.cn/{tenantid}/discovery/v2.0/keys", - issuer: "https://login.partner.microsoftonline.cn/{tenantid}/v2.0", - authorization_endpoint: - "https://login.chinacloudapi.cn/{tenantid}/oauth2/v2.0/authorize", - end_session_endpoint: - "https://login.chinacloudapi.cn/{tenantid}/oauth2/v2.0/logout", - }, - "login.microsoftonline.us": { - token_endpoint: - "https://login.microsoftonline.us/{tenantid}/oauth2/v2.0/token", - jwks_uri: - "https://login.microsoftonline.us/{tenantid}/discovery/v2.0/keys", - issuer: "https://login.microsoftonline.us/{tenantid}/v2.0", - authorization_endpoint: - "https://login.microsoftonline.us/{tenantid}/oauth2/v2.0/authorize", - end_session_endpoint: - "https://login.microsoftonline.us/{tenantid}/oauth2/v2.0/logout", - }, - }, - instanceDiscoveryMetadata: { - tenant_discovery_endpoint: - "https://{canonicalAuthority}/v2.0/.well-known/openid-configuration", - metadata: [ - { - preferred_network: "login.microsoftonline.com", - preferred_cache: "login.windows.net", - aliases: [ - "login.microsoftonline.com", - "login.windows.net", - "login.microsoft.com", - "sts.windows.net", - ], - }, - { - preferred_network: "login.partner.microsoftonline.cn", - preferred_cache: "login.partner.microsoftonline.cn", - aliases: [ - "login.partner.microsoftonline.cn", - "login.chinacloudapi.cn", - ], - }, - { - preferred_network: "login.microsoftonline.de", - preferred_cache: "login.microsoftonline.de", - aliases: ["login.microsoftonline.de"], - }, - { - preferred_network: "login.microsoftonline.us", - preferred_cache: "login.microsoftonline.us", - aliases: [ - "login.microsoftonline.us", - "login.usgovcloudapi.net", - ], - }, - { - preferred_network: "login-us.microsoftonline.com", - preferred_cache: "login-us.microsoftonline.com", - aliases: ["login-us.microsoftonline.com"], - }, - ], - }, -}; - -export const EndpointMetadata = rawMetdataJSON.endpointMetadata; -export const InstanceDiscoveryMetadata = - rawMetdataJSON.instanceDiscoveryMetadata; - -export const InstanceDiscoveryMetadataAliases: Set = new Set(); -InstanceDiscoveryMetadata.metadata.forEach( - (metadataEntry: CloudDiscoveryMetadata) => { - metadataEntry.aliases.forEach((alias: string) => { - InstanceDiscoveryMetadataAliases.add(alias); - }); - } -); - -/** - * Attempts to get an aliases array from the static authority metadata sources based on the canonical authority host - * @param staticAuthorityOptions - * @param logger - * @returns - */ -export function getAliasesFromStaticSources( - staticAuthorityOptions: StaticAuthorityOptions, - logger?: Logger -): string[] { - let staticAliases: string[] | undefined; - const canonicalAuthority = staticAuthorityOptions.canonicalAuthority; - if (canonicalAuthority) { - const authorityHost = new UrlString( - canonicalAuthority - ).getUrlComponents().HostNameAndPort; - staticAliases = - getAliasesFromMetadata( - authorityHost, - staticAuthorityOptions.cloudDiscoveryMetadata?.metadata, - AuthorityMetadataSource.CONFIG, - logger - ) || - getAliasesFromMetadata( - authorityHost, - InstanceDiscoveryMetadata.metadata, - AuthorityMetadataSource.HARDCODED_VALUES, - logger - ) || - staticAuthorityOptions.knownAuthorities; - } - - return staticAliases || []; -} - -/** - * Returns aliases for from the raw cloud discovery metadata passed in - * @param authorityHost - * @param rawCloudDiscoveryMetadata - * @returns - */ -export function getAliasesFromMetadata( - authorityHost?: string, - cloudDiscoveryMetadata?: CloudDiscoveryMetadata[], - source?: AuthorityMetadataSource, - logger?: Logger -): string[] | null { - logger?.trace(`getAliasesFromMetadata called with source: ${source}`); - if (authorityHost && cloudDiscoveryMetadata) { - const metadata = getCloudDiscoveryMetadataFromNetworkResponse( - cloudDiscoveryMetadata, - authorityHost - ); - - if (metadata) { - logger?.trace( - `getAliasesFromMetadata: found cloud discovery metadata in ${source}, returning aliases` - ); - return metadata.aliases; - } else { - logger?.trace( - `getAliasesFromMetadata: did not find cloud discovery metadata in ${source}` - ); - } - } - - return null; -} - -/** - * Get cloud discovery metadata for common authorities - */ -export function getCloudDiscoveryMetadataFromHardcodedValues( - authorityHost: string -): CloudDiscoveryMetadata | null { - const metadata = getCloudDiscoveryMetadataFromNetworkResponse( - InstanceDiscoveryMetadata.metadata, - authorityHost - ); - return metadata; -} - -/** - * Searches instance discovery network response for the entry that contains the host in the aliases list - * @param response - * @param authority - */ -export function getCloudDiscoveryMetadataFromNetworkResponse( - response: CloudDiscoveryMetadata[], - authorityHost: string -): CloudDiscoveryMetadata | null { - for (let i = 0; i < response.length; i++) { - const metadata = response[i]; - if (metadata.aliases.includes(authorityHost)) { - return metadata; - } - } - - return null; -} diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/src/authority/AuthorityOptions.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/src/authority/AuthorityOptions.ts deleted file mode 100644 index ef08af7..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/src/authority/AuthorityOptions.ts +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import { ProtocolMode } from "./ProtocolMode.js"; -import { OIDCOptions } from "./OIDCOptions.js"; -import { AzureRegionConfiguration } from "./AzureRegionConfiguration.js"; -import { CloudInstanceDiscoveryResponse } from "./CloudInstanceDiscoveryResponse.js"; - -export type AuthorityOptions = { - protocolMode: ProtocolMode; - OIDCOptions?: OIDCOptions | null; - knownAuthorities: Array; - cloudDiscoveryMetadata: string; - authorityMetadata: string; - skipAuthorityMetadataCache?: boolean; - azureRegionConfiguration?: AzureRegionConfiguration; - authority?: string; -}; - -export type StaticAuthorityOptions = Partial< - Pick -> & { - canonicalAuthority?: string; - cloudDiscoveryMetadata?: CloudInstanceDiscoveryResponse; -}; - -export const AzureCloudInstance = { - // AzureCloudInstance is not specified. - None: "none", - - // Microsoft Azure public cloud - AzurePublic: "https://login.microsoftonline.com", - - // Microsoft PPE - AzurePpe: "https://login.windows-ppe.net", - - // Microsoft Chinese national/regional cloud - AzureChina: "https://login.chinacloudapi.cn", - - // Microsoft German national/regional cloud ("Black Forest") - AzureGermany: "https://login.microsoftonline.de", - - // US Government cloud - AzureUsGovernment: "https://login.microsoftonline.us", -} as const; -export type AzureCloudInstance = - (typeof AzureCloudInstance)[keyof typeof AzureCloudInstance]; diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/src/authority/AuthorityType.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/src/authority/AuthorityType.ts deleted file mode 100644 index 5b30a48..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/src/authority/AuthorityType.ts +++ /dev/null @@ -1,15 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -/** - * Authority types supported by MSAL. - */ -export const AuthorityType = { - Default: 0, - Adfs: 1, - Dsts: 2, - Ciam: 3, -} as const; -export type AuthorityType = (typeof AuthorityType)[keyof typeof AuthorityType]; diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/src/authority/AzureRegion.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/src/authority/AzureRegion.ts deleted file mode 100644 index b96bfce..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/src/authority/AzureRegion.ts +++ /dev/null @@ -1,7 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -// The type here is a string instead of enum as the list of regional end points supported is not final yet. -export type AzureRegion = string; diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/src/authority/AzureRegionConfiguration.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/src/authority/AzureRegionConfiguration.ts deleted file mode 100644 index 37d1296..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/src/authority/AzureRegionConfiguration.ts +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import { AzureRegion } from "./AzureRegion.js"; - -/* - * AzureRegionConfiguration - * - preferredAzureRegion - Preferred azure region from the user - * - environmentRegionFunc - Environment specific way of fetching the region from the environment - */ -export type AzureRegionConfiguration = { - azureRegion?: AzureRegion; - environmentRegion: string | undefined; -}; diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/src/authority/CloudDiscoveryMetadata.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/src/authority/CloudDiscoveryMetadata.ts deleted file mode 100644 index d062566..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/src/authority/CloudDiscoveryMetadata.ts +++ /dev/null @@ -1,10 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -export type CloudDiscoveryMetadata = { - preferred_network: string; - preferred_cache: string; - aliases: Array; -}; diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/src/authority/CloudInstanceDiscoveryErrorResponse.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/src/authority/CloudInstanceDiscoveryErrorResponse.ts deleted file mode 100644 index 3c3c92b..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/src/authority/CloudInstanceDiscoveryErrorResponse.ts +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -/** - * The OpenID Configuration Endpoint Response type. Used by the authority class to get relevant OAuth endpoints. - */ -export type CloudInstanceDiscoveryErrorResponse = { - error: String; - error_description: String; - error_codes?: Array; - timestamp?: String; - trace_id?: String; - correlation_id?: String; - error_uri?: String; -}; - -export function isCloudInstanceDiscoveryErrorResponse( - response: object -): boolean { - return ( - response.hasOwnProperty("error") && - response.hasOwnProperty("error_description") - ); -} diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/src/authority/CloudInstanceDiscoveryResponse.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/src/authority/CloudInstanceDiscoveryResponse.ts deleted file mode 100644 index a4c8dbe..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/src/authority/CloudInstanceDiscoveryResponse.ts +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import { CloudDiscoveryMetadata } from "./CloudDiscoveryMetadata.js"; - -/** - * The OpenID Configuration Endpoint Response type. Used by the authority class to get relevant OAuth endpoints. - */ -export type CloudInstanceDiscoveryResponse = { - tenant_discovery_endpoint: string; - metadata: Array; -}; - -export function isCloudInstanceDiscoveryResponse(response: object): boolean { - return ( - response.hasOwnProperty("tenant_discovery_endpoint") && - response.hasOwnProperty("metadata") - ); -} diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/src/authority/ImdsOptions.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/src/authority/ImdsOptions.ts deleted file mode 100644 index fc373bb..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/src/authority/ImdsOptions.ts +++ /dev/null @@ -1,10 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -export type ImdsOptions = { - headers?: { - Metadata: string; - }; -}; diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/src/authority/OIDCOptions.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/src/authority/OIDCOptions.ts deleted file mode 100644 index 751448b..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/src/authority/OIDCOptions.ts +++ /dev/null @@ -1,14 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import { ServerResponseType } from "../utils/Constants.js"; - -/** - * Options for the OIDC protocol mode. - */ -export type OIDCOptions = { - serverResponseType?: ServerResponseType; - defaultScopes?: Array; -}; diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/src/authority/OpenIdConfigResponse.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/src/authority/OpenIdConfigResponse.ts deleted file mode 100644 index 5b59c7a..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/src/authority/OpenIdConfigResponse.ts +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -/** - * Tenant Discovery Response which contains the relevant OAuth endpoints and data needed for authentication and authorization. - */ -export type OpenIdConfigResponse = { - authorization_endpoint: string; - token_endpoint: string; - end_session_endpoint?: string; - issuer: string; - jwks_uri: string; -}; - -export function isOpenIdConfigResponse(response: object): boolean { - return ( - response.hasOwnProperty("authorization_endpoint") && - response.hasOwnProperty("token_endpoint") && - response.hasOwnProperty("issuer") && - response.hasOwnProperty("jwks_uri") - ); -} diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/src/authority/ProtocolMode.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/src/authority/ProtocolMode.ts deleted file mode 100644 index c36e843..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/src/authority/ProtocolMode.ts +++ /dev/null @@ -1,13 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -/** - * Protocol modes supported by MSAL. - */ -export const ProtocolMode = { - AAD: "AAD", - OIDC: "OIDC", -} as const; -export type ProtocolMode = (typeof ProtocolMode)[keyof typeof ProtocolMode]; diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/src/authority/RegionDiscovery.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/src/authority/RegionDiscovery.ts deleted file mode 100644 index 39af480..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/src/authority/RegionDiscovery.ts +++ /dev/null @@ -1,196 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import { INetworkModule } from "../network/INetworkModule.js"; -import { NetworkResponse } from "../network/NetworkResponse.js"; -import { IMDSBadResponse } from "../response/IMDSBadResponse.js"; -import { - Constants, - RegionDiscoverySources, - ResponseCodes, -} from "../utils/Constants.js"; -import { RegionDiscoveryMetadata } from "./RegionDiscoveryMetadata.js"; -import { ImdsOptions } from "./ImdsOptions.js"; -import { IPerformanceClient } from "../telemetry/performance/IPerformanceClient.js"; -import { PerformanceEvents } from "../telemetry/performance/PerformanceEvent.js"; -import { invokeAsync } from "../utils/FunctionWrappers.js"; -import { Logger } from "../logger/Logger.js"; - -export class RegionDiscovery { - // Network interface to make requests with. - protected networkInterface: INetworkModule; - // Logger - private logger: Logger; - // Performance client - protected performanceClient: IPerformanceClient | undefined; - // CorrelationId - protected correlationId: string | undefined; - // Options for the IMDS endpoint request - protected static IMDS_OPTIONS: ImdsOptions = { - headers: { - Metadata: "true", - }, - }; - - constructor( - networkInterface: INetworkModule, - logger: Logger, - performanceClient?: IPerformanceClient, - correlationId?: string - ) { - this.networkInterface = networkInterface; - this.logger = logger; - this.performanceClient = performanceClient; - this.correlationId = correlationId; - } - - /** - * Detect the region from the application's environment. - * - * @returns Promise - */ - public async detectRegion( - environmentRegion: string | undefined, - regionDiscoveryMetadata: RegionDiscoveryMetadata - ): Promise { - this.performanceClient?.addQueueMeasurement( - PerformanceEvents.RegionDiscoveryDetectRegion, - this.correlationId - ); - - // Initialize auto detected region with the region from the envrionment - let autodetectedRegionName = environmentRegion; - - // Check if a region was detected from the environment, if not, attempt to get the region from IMDS - if (!autodetectedRegionName) { - const options = RegionDiscovery.IMDS_OPTIONS; - - try { - const localIMDSVersionResponse = await invokeAsync( - this.getRegionFromIMDS.bind(this), - PerformanceEvents.RegionDiscoveryGetRegionFromIMDS, - this.logger, - this.performanceClient, - this.correlationId - )(Constants.IMDS_VERSION, options); - if ( - localIMDSVersionResponse.status === - ResponseCodes.httpSuccess - ) { - autodetectedRegionName = localIMDSVersionResponse.body; - regionDiscoveryMetadata.region_source = - RegionDiscoverySources.IMDS; - } - - // If the response using the local IMDS version failed, try to fetch the current version of IMDS and retry. - if ( - localIMDSVersionResponse.status === - ResponseCodes.httpBadRequest - ) { - const currentIMDSVersion = await invokeAsync( - this.getCurrentVersion.bind(this), - PerformanceEvents.RegionDiscoveryGetCurrentVersion, - this.logger, - this.performanceClient, - this.correlationId - )(options); - if (!currentIMDSVersion) { - regionDiscoveryMetadata.region_source = - RegionDiscoverySources.FAILED_AUTO_DETECTION; - return null; - } - - const currentIMDSVersionResponse = await invokeAsync( - this.getRegionFromIMDS.bind(this), - PerformanceEvents.RegionDiscoveryGetRegionFromIMDS, - this.logger, - this.performanceClient, - this.correlationId - )(currentIMDSVersion, options); - if ( - currentIMDSVersionResponse.status === - ResponseCodes.httpSuccess - ) { - autodetectedRegionName = - currentIMDSVersionResponse.body; - regionDiscoveryMetadata.region_source = - RegionDiscoverySources.IMDS; - } - } - } catch (e) { - regionDiscoveryMetadata.region_source = - RegionDiscoverySources.FAILED_AUTO_DETECTION; - return null; - } - } else { - regionDiscoveryMetadata.region_source = - RegionDiscoverySources.ENVIRONMENT_VARIABLE; - } - - // If no region was auto detected from the environment or from the IMDS endpoint, mark the attempt as a FAILED_AUTO_DETECTION - if (!autodetectedRegionName) { - regionDiscoveryMetadata.region_source = - RegionDiscoverySources.FAILED_AUTO_DETECTION; - } - - return autodetectedRegionName || null; - } - - /** - * Make the call to the IMDS endpoint - * - * @param imdsEndpointUrl - * @returns Promise> - */ - private async getRegionFromIMDS( - version: string, - options: ImdsOptions - ): Promise> { - this.performanceClient?.addQueueMeasurement( - PerformanceEvents.RegionDiscoveryGetRegionFromIMDS, - this.correlationId - ); - return this.networkInterface.sendGetRequestAsync( - `${Constants.IMDS_ENDPOINT}?api-version=${version}&format=text`, - options, - Constants.IMDS_TIMEOUT - ); - } - - /** - * Get the most recent version of the IMDS endpoint available - * - * @returns Promise - */ - private async getCurrentVersion( - options: ImdsOptions - ): Promise { - this.performanceClient?.addQueueMeasurement( - PerformanceEvents.RegionDiscoveryGetCurrentVersion, - this.correlationId - ); - try { - const response = - await this.networkInterface.sendGetRequestAsync( - `${Constants.IMDS_ENDPOINT}?format=json`, - options - ); - - // When IMDS endpoint is called without the api version query param, bad request response comes back with latest version. - if ( - response.status === ResponseCodes.httpBadRequest && - response.body && - response.body["newest-versions"] && - response.body["newest-versions"].length > 0 - ) { - return response.body["newest-versions"][0]; - } - - return null; - } catch (e) { - return null; - } - } -} diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/src/authority/RegionDiscoveryMetadata.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/src/authority/RegionDiscoveryMetadata.ts deleted file mode 100644 index a3009d0..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/src/authority/RegionDiscoveryMetadata.ts +++ /dev/null @@ -1,15 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import { - RegionDiscoveryOutcomes, - RegionDiscoverySources, -} from "../utils/Constants.js"; - -export type RegionDiscoveryMetadata = { - region_used?: string; - region_source?: RegionDiscoverySources; - region_outcome?: RegionDiscoveryOutcomes; -}; diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/src/broker/nativeBroker/INativeBrokerPlugin.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/src/broker/nativeBroker/INativeBrokerPlugin.ts deleted file mode 100644 index de3a005..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/src/broker/nativeBroker/INativeBrokerPlugin.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import { AccountInfo } from "../../account/AccountInfo.js"; -import { LoggerOptions } from "../../config/ClientConfiguration.js"; -import { NativeRequest } from "../../request/NativeRequest.js"; -import { NativeSignOutRequest } from "../../request/NativeSignOutRequest.js"; -import { AuthenticationResult } from "../../response/AuthenticationResult.js"; - -export interface INativeBrokerPlugin { - isBrokerAvailable: boolean; - setLogger(loggerOptions: LoggerOptions): void; - getAccountById( - accountId: string, - correlationId: string - ): Promise; - getAllAccounts( - clientId: string, - correlationId: string - ): Promise; - acquireTokenSilent(request: NativeRequest): Promise; - acquireTokenInteractive( - request: NativeRequest, - windowHandle?: Buffer - ): Promise; - signOut(request: NativeSignOutRequest): Promise; -} diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/src/cache/CacheManager.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/src/cache/CacheManager.ts deleted file mode 100644 index 66c19bb..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/src/cache/CacheManager.ts +++ /dev/null @@ -1,2070 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import { - AccountFilter, - CredentialFilter, - ValidCredentialType, - AppMetadataFilter, - AppMetadataCache, - TokenKeys, - TenantProfileFilter, -} from "./utils/CacheTypes.js"; -import { CacheRecord } from "./entities/CacheRecord.js"; -import { - CredentialType, - APP_METADATA, - THE_FAMILY_ID, - AUTHORITY_METADATA_CONSTANTS, - AuthenticationScheme, - Separators, -} from "../utils/Constants.js"; -import { CredentialEntity } from "./entities/CredentialEntity.js"; -import { generateCredentialKey } from "./utils/CacheHelpers.js"; -import { ScopeSet } from "../request/ScopeSet.js"; -import { AccountEntity } from "./entities/AccountEntity.js"; -import { AccessTokenEntity } from "./entities/AccessTokenEntity.js"; -import { IdTokenEntity } from "./entities/IdTokenEntity.js"; -import { RefreshTokenEntity } from "./entities/RefreshTokenEntity.js"; -import { ICacheManager } from "./interface/ICacheManager.js"; -import { - createClientAuthError, - ClientAuthErrorCodes, -} from "../error/ClientAuthError.js"; -import { - AccountInfo, - TenantProfile, - tenantIdMatchesHomeTenant, - updateAccountTenantProfileData, -} from "../account/AccountInfo.js"; -import { AppMetadataEntity } from "./entities/AppMetadataEntity.js"; -import { ServerTelemetryEntity } from "./entities/ServerTelemetryEntity.js"; -import { ThrottlingEntity } from "./entities/ThrottlingEntity.js"; -import { extractTokenClaims } from "../account/AuthToken.js"; -import { ICrypto } from "../crypto/ICrypto.js"; -import { AuthorityMetadataEntity } from "./entities/AuthorityMetadataEntity.js"; -import { BaseAuthRequest } from "../request/BaseAuthRequest.js"; -import { Logger } from "../logger/Logger.js"; -import { name, version } from "../packageMetadata.js"; -import { StoreInCache } from "../request/StoreInCache.js"; -import { getAliasesFromStaticSources } from "../authority/AuthorityMetadata.js"; -import { StaticAuthorityOptions } from "../authority/AuthorityOptions.js"; -import { TokenClaims } from "../account/TokenClaims.js"; -import { IPerformanceClient } from "../telemetry/performance/IPerformanceClient.js"; -import { createCacheError } from "../error/CacheError.js"; -import { AuthError } from "../error/AuthError.js"; - -/** - * Interface class which implement cache storage functions used by MSAL to perform validity checks, and store tokens. - * @internal - */ -export abstract class CacheManager implements ICacheManager { - protected clientId: string; - protected cryptoImpl: ICrypto; - // Instance of logger for functions defined in the msal-common layer - private commonLogger: Logger; - private staticAuthorityOptions?: StaticAuthorityOptions; - - constructor( - clientId: string, - cryptoImpl: ICrypto, - logger: Logger, - staticAuthorityOptions?: StaticAuthorityOptions - ) { - this.clientId = clientId; - this.cryptoImpl = cryptoImpl; - this.commonLogger = logger.clone(name, version); - this.staticAuthorityOptions = staticAuthorityOptions; - } - - /** - * fetch the account entity from the platform cache - * @param accountKey - */ - abstract getAccount( - accountKey: string, - correlationId: string, - logger?: Logger - ): AccountEntity | null; - - /** - * Returns deserialized account if found in the cache, otherwiser returns null - */ - abstract getCachedAccountEntity( - accountKey: string, - correlationId: string - ): AccountEntity | null; - - /** - * set account entity in the platform cache - * @param account - */ - abstract setAccount(account: AccountEntity, correlationId: string): void; - - /** - * remove account entity from the platform cache if it's outdated - */ - abstract removeOutdatedAccount( - accountKey: string, - correlationId: string - ): void; - - /** - * fetch the idToken entity from the platform cache - * @param idTokenKey - */ - abstract getIdTokenCredential( - idTokenKey: string, - correlationId: string - ): IdTokenEntity | null; - - /** - * set idToken entity to the platform cache - * @param idToken - */ - abstract setIdTokenCredential( - idToken: IdTokenEntity, - correlationId: string - ): void; - - /** - * fetch the idToken entity from the platform cache - * @param accessTokenKey - */ - abstract getAccessTokenCredential( - accessTokenKey: string, - correlationId: string - ): AccessTokenEntity | null; - - /** - * set idToken entity to the platform cache - * @param accessToken - */ - abstract setAccessTokenCredential( - accessToken: AccessTokenEntity, - correlationId: string - ): void; - - /** - * fetch the idToken entity from the platform cache - * @param refreshTokenKey - */ - abstract getRefreshTokenCredential( - refreshTokenKey: string, - correlationId: string - ): RefreshTokenEntity | null; - - /** - * set idToken entity to the platform cache - * @param refreshToken - */ - abstract setRefreshTokenCredential( - refreshToken: RefreshTokenEntity, - correlationId: string - ): void; - - /** - * fetch appMetadata entity from the platform cache - * @param appMetadataKey - */ - abstract getAppMetadata(appMetadataKey: string): AppMetadataEntity | null; - - /** - * set appMetadata entity to the platform cache - * @param appMetadata - */ - abstract setAppMetadata( - appMetadata: AppMetadataEntity, - correlationId: string - ): void; - - /** - * fetch server telemetry entity from the platform cache - * @param serverTelemetryKey - */ - abstract getServerTelemetry( - serverTelemetryKey: string - ): ServerTelemetryEntity | null; - - /** - * set server telemetry entity to the platform cache - * @param serverTelemetryKey - * @param serverTelemetry - */ - abstract setServerTelemetry( - serverTelemetryKey: string, - serverTelemetry: ServerTelemetryEntity, - correlationId: string - ): void; - - /** - * fetch cloud discovery metadata entity from the platform cache - * @param key - */ - abstract getAuthorityMetadata(key: string): AuthorityMetadataEntity | null; - - /** - * - */ - abstract getAuthorityMetadataKeys(): Array; - - /** - * set cloud discovery metadata entity to the platform cache - * @param key - * @param value - */ - abstract setAuthorityMetadata( - key: string, - value: AuthorityMetadataEntity - ): void; - - /** - * fetch throttling entity from the platform cache - * @param throttlingCacheKey - */ - abstract getThrottlingCache( - throttlingCacheKey: string - ): ThrottlingEntity | null; - - /** - * set throttling entity to the platform cache - * @param throttlingCacheKey - * @param throttlingCache - */ - abstract setThrottlingCache( - throttlingCacheKey: string, - throttlingCache: ThrottlingEntity, - correlationId: string - ): void; - - /** - * Function to remove an item from cache given its key. - * @param key - */ - abstract removeItem(key: string, correlationId: string): void; - - /** - * Function which retrieves all current keys from the cache. - */ - abstract getKeys(): string[]; - - /** - * Function which retrieves all account keys from the cache - */ - abstract getAccountKeys(): string[]; - - /** - * Function which retrieves all token keys from the cache - */ - abstract getTokenKeys(): TokenKeys; - - /** - * Function which updates an outdated credential cache key - */ - abstract updateCredentialCacheKey( - currentCacheKey: string, - credential: ValidCredentialType, - correlationId: string - ): string; - - /** - * Returns all the accounts in the cache that match the optional filter. If no filter is provided, all accounts are returned. - * @param accountFilter - (Optional) filter to narrow down the accounts returned - * @returns Array of AccountInfo objects in cache - */ - getAllAccounts( - correlationId: string, - accountFilter?: AccountFilter - ): AccountInfo[] { - return this.buildTenantProfiles( - this.getAccountsFilteredBy(accountFilter || {}, correlationId), - correlationId, - accountFilter - ); - } - - /** - * Gets first tenanted AccountInfo object found based on provided filters - */ - getAccountInfoFilteredBy( - accountFilter: AccountFilter, - correlationId: string - ): AccountInfo | null { - const allAccounts = this.getAllAccounts(correlationId, accountFilter); - if (allAccounts.length > 1) { - // If one or more accounts are found, prioritize accounts that have an ID token - const sortedAccounts = allAccounts.sort((account) => { - return account.idTokenClaims ? -1 : 1; - }); - return sortedAccounts[0]; - } else if (allAccounts.length === 1) { - // If only one account is found, return it regardless of whether a matching ID token was found - return allAccounts[0]; - } else { - return null; - } - } - - /** - * Returns a single matching - * @param accountFilter - * @returns - */ - getBaseAccountInfo( - accountFilter: AccountFilter, - correlationId: string - ): AccountInfo | null { - const accountEntities = this.getAccountsFilteredBy( - accountFilter, - correlationId - ); - if (accountEntities.length > 0) { - return accountEntities[0].getAccountInfo(); - } else { - return null; - } - } - - /** - * Matches filtered account entities with cached ID tokens that match the tenant profile-specific account filters - * and builds the account info objects from the matching ID token's claims - * @param cachedAccounts - * @param accountFilter - * @returns Array of AccountInfo objects that match account and tenant profile filters - */ - private buildTenantProfiles( - cachedAccounts: AccountEntity[], - correlationId: string, - accountFilter?: AccountFilter - ): AccountInfo[] { - return cachedAccounts.flatMap((accountEntity) => { - return this.getTenantProfilesFromAccountEntity( - accountEntity, - correlationId, - accountFilter?.tenantId, - accountFilter - ); - }); - } - - private getTenantedAccountInfoByFilter( - accountInfo: AccountInfo, - tokenKeys: TokenKeys, - tenantProfile: TenantProfile, - correlationId: string, - tenantProfileFilter?: TenantProfileFilter - ): AccountInfo | null { - let tenantedAccountInfo: AccountInfo | null = null; - let idTokenClaims: TokenClaims | undefined; - - if (tenantProfileFilter) { - if ( - !this.tenantProfileMatchesFilter( - tenantProfile, - tenantProfileFilter - ) - ) { - return null; - } - } - - const idToken = this.getIdToken( - accountInfo, - correlationId, - tokenKeys, - tenantProfile.tenantId - ); - - if (idToken) { - idTokenClaims = extractTokenClaims( - idToken.secret, - this.cryptoImpl.base64Decode - ); - - if ( - !this.idTokenClaimsMatchTenantProfileFilter( - idTokenClaims, - tenantProfileFilter - ) - ) { - // ID token sourced claims don't match so this tenant profile is not a match - return null; - } - } - - // Expand tenant profile into account info based on matching tenant profile and if available matching ID token claims - tenantedAccountInfo = updateAccountTenantProfileData( - accountInfo, - tenantProfile, - idTokenClaims, - idToken?.secret - ); - - return tenantedAccountInfo; - } - - private getTenantProfilesFromAccountEntity( - accountEntity: AccountEntity, - correlationId: string, - targetTenantId?: string, - tenantProfileFilter?: TenantProfileFilter - ): AccountInfo[] { - const accountInfo = accountEntity.getAccountInfo(); - let searchTenantProfiles: Map = - accountInfo.tenantProfiles || new Map(); - const tokenKeys = this.getTokenKeys(); - - // If a tenant ID was provided, only return the tenant profile for that tenant ID if it exists - if (targetTenantId) { - const tenantProfile = searchTenantProfiles.get(targetTenantId); - if (tenantProfile) { - // Reduce search field to just this tenant profile - searchTenantProfiles = new Map([ - [targetTenantId, tenantProfile], - ]); - } else { - // No tenant profile for search tenant ID, return empty array - return []; - } - } - - const matchingTenantProfiles: AccountInfo[] = []; - searchTenantProfiles.forEach((tenantProfile: TenantProfile) => { - const tenantedAccountInfo = this.getTenantedAccountInfoByFilter( - accountInfo, - tokenKeys, - tenantProfile, - correlationId, - tenantProfileFilter - ); - if (tenantedAccountInfo) { - matchingTenantProfiles.push(tenantedAccountInfo); - } - }); - - return matchingTenantProfiles; - } - - private tenantProfileMatchesFilter( - tenantProfile: TenantProfile, - tenantProfileFilter: TenantProfileFilter - ): boolean { - if ( - !!tenantProfileFilter.localAccountId && - !this.matchLocalAccountIdFromTenantProfile( - tenantProfile, - tenantProfileFilter.localAccountId - ) - ) { - return false; - } - - if ( - !!tenantProfileFilter.name && - !(tenantProfile.name === tenantProfileFilter.name) - ) { - return false; - } - - if ( - tenantProfileFilter.isHomeTenant !== undefined && - !(tenantProfile.isHomeTenant === tenantProfileFilter.isHomeTenant) - ) { - return false; - } - - return true; - } - - private idTokenClaimsMatchTenantProfileFilter( - idTokenClaims: TokenClaims, - tenantProfileFilter?: TenantProfileFilter - ): boolean { - // Tenant Profile filtering - if (tenantProfileFilter) { - if ( - !!tenantProfileFilter.localAccountId && - !this.matchLocalAccountIdFromTokenClaims( - idTokenClaims, - tenantProfileFilter.localAccountId - ) - ) { - return false; - } - - if ( - !!tenantProfileFilter.loginHint && - !this.matchLoginHintFromTokenClaims( - idTokenClaims, - tenantProfileFilter.loginHint - ) - ) { - return false; - } - - if ( - !!tenantProfileFilter.username && - !this.matchUsername( - idTokenClaims.preferred_username, - tenantProfileFilter.username - ) - ) { - return false; - } - - if ( - !!tenantProfileFilter.name && - !this.matchName(idTokenClaims, tenantProfileFilter.name) - ) { - return false; - } - - if ( - !!tenantProfileFilter.sid && - !this.matchSid(idTokenClaims, tenantProfileFilter.sid) - ) { - return false; - } - } - - return true; - } - - /** - * saves a cache record - * @param cacheRecord {CacheRecord} - * @param storeInCache {?StoreInCache} - * @param correlationId {?string} correlation id - */ - async saveCacheRecord( - cacheRecord: CacheRecord, - correlationId: string, - storeInCache?: StoreInCache - ): Promise { - if (!cacheRecord) { - throw createClientAuthError( - ClientAuthErrorCodes.invalidCacheRecord - ); - } - - try { - if (!!cacheRecord.account) { - this.setAccount(cacheRecord.account, correlationId); - } - - if (!!cacheRecord.idToken && storeInCache?.idToken !== false) { - this.setIdTokenCredential(cacheRecord.idToken, correlationId); - } - - if ( - !!cacheRecord.accessToken && - storeInCache?.accessToken !== false - ) { - await this.saveAccessToken( - cacheRecord.accessToken, - correlationId - ); - } - - if ( - !!cacheRecord.refreshToken && - storeInCache?.refreshToken !== false - ) { - this.setRefreshTokenCredential( - cacheRecord.refreshToken, - correlationId - ); - } - - if (!!cacheRecord.appMetadata) { - this.setAppMetadata(cacheRecord.appMetadata, correlationId); - } - } catch (e: unknown) { - this.commonLogger?.error(`CacheManager.saveCacheRecord: failed`); - if (e instanceof AuthError) { - throw e; - } else { - throw createCacheError(e); - } - } - } - - /** - * saves access token credential - * @param credential - */ - private async saveAccessToken( - credential: AccessTokenEntity, - correlationId: string - ): Promise { - const accessTokenFilter: CredentialFilter = { - clientId: credential.clientId, - credentialType: credential.credentialType, - environment: credential.environment, - homeAccountId: credential.homeAccountId, - realm: credential.realm, - tokenType: credential.tokenType, - requestedClaimsHash: credential.requestedClaimsHash, - }; - - const tokenKeys = this.getTokenKeys(); - const currentScopes = ScopeSet.fromString(credential.target); - - tokenKeys.accessToken.forEach((key) => { - if ( - !this.accessTokenKeyMatchesFilter(key, accessTokenFilter, false) - ) { - return; - } - - const tokenEntity = this.getAccessTokenCredential( - key, - correlationId - ); - - if ( - tokenEntity && - this.credentialMatchesFilter(tokenEntity, accessTokenFilter) - ) { - const tokenScopeSet = ScopeSet.fromString(tokenEntity.target); - if (tokenScopeSet.intersectingScopeSets(currentScopes)) { - this.removeAccessToken(key, correlationId); - } - } - }); - this.setAccessTokenCredential(credential, correlationId); - } - - /** - * Retrieve account entities matching all provided tenant-agnostic filters; if no filter is set, get all account entities in the cache - * Not checking for casing as keys are all generated in lower case, remember to convert to lower case if object properties are compared - * @param accountFilter - An object containing Account properties to filter by - */ - getAccountsFilteredBy( - accountFilter: AccountFilter, - correlationId: string - ): AccountEntity[] { - const allAccountKeys = this.getAccountKeys(); - const matchingAccounts: AccountEntity[] = []; - allAccountKeys.forEach((cacheKey) => { - if (!this.isAccountKey(cacheKey, accountFilter.homeAccountId)) { - // Don't parse value if the key doesn't match the account filters - return; - } - - const entity: AccountEntity | null = this.getAccount( - cacheKey, - correlationId, - this.commonLogger - ); - - // Match base account fields - - if (!entity) { - return; - } - - if ( - !!accountFilter.homeAccountId && - !this.matchHomeAccountId(entity, accountFilter.homeAccountId) - ) { - return; - } - - if ( - !!accountFilter.username && - !this.matchUsername(entity.username, accountFilter.username) - ) { - return; - } - - if ( - !!accountFilter.environment && - !this.matchEnvironment(entity, accountFilter.environment) - ) { - return; - } - - if ( - !!accountFilter.realm && - !this.matchRealm(entity, accountFilter.realm) - ) { - return; - } - - if ( - !!accountFilter.nativeAccountId && - !this.matchNativeAccountId( - entity, - accountFilter.nativeAccountId - ) - ) { - return; - } - - if ( - !!accountFilter.authorityType && - !this.matchAuthorityType(entity, accountFilter.authorityType) - ) { - return; - } - - // If at least one tenant profile matches the tenant profile filter, add the account to the list of matching accounts - const tenantProfileFilter: TenantProfileFilter = { - localAccountId: accountFilter?.localAccountId, - name: accountFilter?.name, - }; - - const matchingTenantProfiles = entity.tenantProfiles?.filter( - (tenantProfile: TenantProfile) => { - return this.tenantProfileMatchesFilter( - tenantProfile, - tenantProfileFilter - ); - } - ); - - if (matchingTenantProfiles && matchingTenantProfiles.length === 0) { - // No tenant profile for this account matches filter, don't add to list of matching accounts - return; - } - - matchingAccounts.push(entity); - }); - - return matchingAccounts; - } - - /** - * Returns true if the given key matches our account key schema. Also matches homeAccountId and/or tenantId if provided - * @param key - * @param homeAccountId - * @param tenantId - * @returns - */ - isAccountKey( - key: string, - homeAccountId?: string, - tenantId?: string - ): boolean { - if (key.split(Separators.CACHE_KEY_SEPARATOR).length < 3) { - // Account cache keys contain 3 items separated by '-' (each item may also contain '-') - return false; - } - - if ( - homeAccountId && - !key.toLowerCase().includes(homeAccountId.toLowerCase()) - ) { - return false; - } - - if (tenantId && !key.toLowerCase().includes(tenantId.toLowerCase())) { - return false; - } - - // Do not check environment as aliasing can cause false negatives - - return true; - } - - /** - * Returns true if the given key matches our credential key schema. - * @param key - */ - isCredentialKey(key: string): boolean { - if (key.split(Separators.CACHE_KEY_SEPARATOR).length < 6) { - // Credential cache keys contain 6 items separated by '-' (each item may also contain '-') - return false; - } - - const lowerCaseKey = key.toLowerCase(); - // Credential keys must indicate what credential type they represent - if ( - lowerCaseKey.indexOf(CredentialType.ID_TOKEN.toLowerCase()) === - -1 && - lowerCaseKey.indexOf(CredentialType.ACCESS_TOKEN.toLowerCase()) === - -1 && - lowerCaseKey.indexOf( - CredentialType.ACCESS_TOKEN_WITH_AUTH_SCHEME.toLowerCase() - ) === -1 && - lowerCaseKey.indexOf(CredentialType.REFRESH_TOKEN.toLowerCase()) === - -1 - ) { - return false; - } - - if ( - lowerCaseKey.indexOf(CredentialType.REFRESH_TOKEN.toLowerCase()) > - -1 - ) { - // Refresh tokens must contain the client id or family id - const clientIdValidation = `${CredentialType.REFRESH_TOKEN}${Separators.CACHE_KEY_SEPARATOR}${this.clientId}${Separators.CACHE_KEY_SEPARATOR}`; - const familyIdValidation = `${CredentialType.REFRESH_TOKEN}${Separators.CACHE_KEY_SEPARATOR}${THE_FAMILY_ID}${Separators.CACHE_KEY_SEPARATOR}`; - if ( - lowerCaseKey.indexOf(clientIdValidation.toLowerCase()) === -1 && - lowerCaseKey.indexOf(familyIdValidation.toLowerCase()) === -1 - ) { - return false; - } - } else if (lowerCaseKey.indexOf(this.clientId.toLowerCase()) === -1) { - // Tokens must contain the clientId - return false; - } - - return true; - } - - /** - * Returns whether or not the given credential entity matches the filter - * @param entity - * @param filter - * @returns - */ - credentialMatchesFilter( - entity: ValidCredentialType, - filter: CredentialFilter - ): boolean { - if (!!filter.clientId && !this.matchClientId(entity, filter.clientId)) { - return false; - } - - if ( - !!filter.userAssertionHash && - !this.matchUserAssertionHash(entity, filter.userAssertionHash) - ) { - return false; - } - - /* - * homeAccountId can be undefined, and we want to filter out cached items that have a homeAccountId of "" - * because we don't want a client_credential request to return a cached token that has a homeAccountId - */ - if ( - typeof filter.homeAccountId === "string" && - !this.matchHomeAccountId(entity, filter.homeAccountId) - ) { - return false; - } - - if ( - !!filter.environment && - !this.matchEnvironment(entity, filter.environment) - ) { - return false; - } - - if (!!filter.realm && !this.matchRealm(entity, filter.realm)) { - return false; - } - - if ( - !!filter.credentialType && - !this.matchCredentialType(entity, filter.credentialType) - ) { - return false; - } - - if (!!filter.familyId && !this.matchFamilyId(entity, filter.familyId)) { - return false; - } - - /* - * idTokens do not have "target", target specific refreshTokens do exist for some types of authentication - * Resource specific refresh tokens case will be added when the support is deemed necessary - */ - if (!!filter.target && !this.matchTarget(entity, filter.target)) { - return false; - } - - // If request OR cached entity has requested Claims Hash, check if they match - if (filter.requestedClaimsHash || entity.requestedClaimsHash) { - // Don't match if either is undefined or they are different - if (entity.requestedClaimsHash !== filter.requestedClaimsHash) { - return false; - } - } - - // Access Token with Auth Scheme specific matching - if ( - entity.credentialType === - CredentialType.ACCESS_TOKEN_WITH_AUTH_SCHEME - ) { - if ( - !!filter.tokenType && - !this.matchTokenType(entity, filter.tokenType) - ) { - return false; - } - - // KeyId (sshKid) in request must match cached SSH certificate keyId because SSH cert is bound to a specific key - if (filter.tokenType === AuthenticationScheme.SSH) { - if (filter.keyId && !this.matchKeyId(entity, filter.keyId)) { - return false; - } - } - } - - return true; - } - - /** - * retrieve appMetadata matching all provided filters; if no filter is set, get all appMetadata - * @param filter - */ - getAppMetadataFilteredBy(filter: AppMetadataFilter): AppMetadataCache { - const allCacheKeys = this.getKeys(); - const matchingAppMetadata: AppMetadataCache = {}; - - allCacheKeys.forEach((cacheKey) => { - // don't parse any non-appMetadata type cache entities - if (!this.isAppMetadata(cacheKey)) { - return; - } - - // Attempt retrieval - const entity = this.getAppMetadata(cacheKey); - - if (!entity) { - return; - } - - if ( - !!filter.environment && - !this.matchEnvironment(entity, filter.environment) - ) { - return; - } - - if ( - !!filter.clientId && - !this.matchClientId(entity, filter.clientId) - ) { - return; - } - - matchingAppMetadata[cacheKey] = entity; - }); - - return matchingAppMetadata; - } - - /** - * retrieve authorityMetadata that contains a matching alias - * @param filter - */ - getAuthorityMetadataByAlias(host: string): AuthorityMetadataEntity | null { - const allCacheKeys = this.getAuthorityMetadataKeys(); - let matchedEntity = null; - - allCacheKeys.forEach((cacheKey) => { - // don't parse any non-authorityMetadata type cache entities - if ( - !this.isAuthorityMetadata(cacheKey) || - cacheKey.indexOf(this.clientId) === -1 - ) { - return; - } - - // Attempt retrieval - const entity = this.getAuthorityMetadata(cacheKey); - - if (!entity) { - return; - } - - if (entity.aliases.indexOf(host) === -1) { - return; - } - - matchedEntity = entity; - }); - - return matchedEntity; - } - - /** - * Removes all accounts and related tokens from cache. - */ - async removeAllAccounts(correlationId: string): Promise { - const allAccountKeys = this.getAccountKeys(); - const removedAccounts: Array> = []; - - allAccountKeys.forEach((cacheKey) => { - removedAccounts.push(this.removeAccount(cacheKey, correlationId)); - }); - - await Promise.all(removedAccounts); - } - - /** - * Removes the account and related tokens for a given account key - * @param account - */ - async removeAccount( - accountKey: string, - correlationId: string - ): Promise { - const account = this.getAccount( - accountKey, - correlationId, - this.commonLogger - ); - if (!account) { - return; - } - await this.removeAccountContext(account, correlationId); - this.removeItem(accountKey, correlationId); - } - - /** - * Removes credentials associated with the provided account - * @param account - */ - async removeAccountContext( - account: AccountEntity, - correlationId: string - ): Promise { - const allTokenKeys = this.getTokenKeys(); - const accountId = account.generateAccountId(); - - allTokenKeys.idToken.forEach((key) => { - if (key.indexOf(accountId) === 0) { - this.removeIdToken(key, correlationId); - } - }); - - allTokenKeys.accessToken.forEach((key) => { - if (key.indexOf(accountId) === 0) { - this.removeAccessToken(key, correlationId); - } - }); - - allTokenKeys.refreshToken.forEach((key) => { - if (key.indexOf(accountId) === 0) { - this.removeRefreshToken(key, correlationId); - } - }); - - this.getKeys().forEach((key) => { - if (key.includes(accountId)) { - this.removeItem(key, correlationId); - } - }); - } - - /** - * Migrates a single-tenant account and all it's associated alternate cross-tenant account objects in the - * cache into a condensed multi-tenant account object with tenant profiles. - * @param accountKey - * @param accountEntity - * @param logger - * @returns - */ - protected updateOutdatedCachedAccount( - accountKey: string, - accountEntity: AccountEntity | null, - correlationId: string, - logger?: Logger - ): AccountEntity | null { - // Only update if account entity is defined and has no tenantProfiles object (is outdated) - if (accountEntity && accountEntity.isSingleTenant()) { - this.commonLogger?.verbose( - "updateOutdatedCachedAccount: Found a single-tenant (outdated) account entity in the cache, migrating to multi-tenant account entity" - ); - - // Get keys of all accounts belonging to user - const matchingAccountKeys = this.getAccountKeys().filter( - (key: string) => { - return key.startsWith(accountEntity.homeAccountId); - } - ); - - // Get all account entities belonging to user - const accountsToMerge: AccountEntity[] = []; - matchingAccountKeys.forEach((key: string) => { - const account = this.getCachedAccountEntity(key, correlationId); - if (account) { - accountsToMerge.push(account); - } - }); - - // Set base account to home account if available, any account if not - const baseAccount = - accountsToMerge.find((account) => { - return tenantIdMatchesHomeTenant( - account.realm, - account.homeAccountId - ); - }) || accountsToMerge[0]; - - // Populate tenant profiles built from each account entity belonging to the user - baseAccount.tenantProfiles = accountsToMerge.map( - (account: AccountEntity) => { - return { - tenantId: account.realm, - localAccountId: account.localAccountId, - name: account.name, - isHomeTenant: tenantIdMatchesHomeTenant( - account.realm, - account.homeAccountId - ), - }; - } - ); - - const updatedAccount = CacheManager.toObject(new AccountEntity(), { - ...baseAccount, - }); - - const newAccountKey = updatedAccount.generateAccountKey(); - - // Clear cache of legacy account objects that have been collpsed into tenant profiles - matchingAccountKeys.forEach((key: string) => { - if (key !== newAccountKey) { - this.removeOutdatedAccount(accountKey, correlationId); - } - }); - - // Cache updated account object - this.setAccount(updatedAccount, correlationId); - logger?.verbose("Updated an outdated account entity in the cache"); - return updatedAccount; - } - - // No update is necessary - return accountEntity; - } - - /** - * returns a boolean if the given credential is removed - * @param credential - */ - removeAccessToken(key: string, correlationId: string): void { - const credential = this.getAccessTokenCredential(key, correlationId); - this.removeItem(key, correlationId); - - if ( - !credential || - credential.credentialType.toLowerCase() !== - CredentialType.ACCESS_TOKEN_WITH_AUTH_SCHEME.toLowerCase() || - credential.tokenType !== AuthenticationScheme.POP - ) { - return; - } - - // Remove Token Binding Key from key store for PoP Tokens Credentials - const kid = credential.keyId; - - if (kid) { - void this.cryptoImpl.removeTokenBindingKey(kid).catch(() => { - this.commonLogger.error("Binding key could not be removed"); - }); - } - } - - /** - * Removes all app metadata objects from cache. - */ - removeAppMetadata(correlationId: string): boolean { - const allCacheKeys = this.getKeys(); - allCacheKeys.forEach((cacheKey) => { - if (this.isAppMetadata(cacheKey)) { - this.removeItem(cacheKey, correlationId); - } - }); - - return true; - } - - /** - * Retrieve AccountEntity from cache - * @param account - */ - readAccountFromCache( - account: AccountInfo, - correlationId: string - ): AccountEntity | null { - const accountKey: string = - AccountEntity.generateAccountCacheKey(account); - return this.getAccount(accountKey, correlationId, this.commonLogger); - } - - /** - * Retrieve IdTokenEntity from cache - * @param account {AccountInfo} - * @param tokenKeys {?TokenKeys} - * @param targetRealm {?string} - * @param performanceClient {?IPerformanceClient} - * @param correlationId {?string} - */ - getIdToken( - account: AccountInfo, - correlationId: string, - tokenKeys?: TokenKeys, - targetRealm?: string, - performanceClient?: IPerformanceClient - ): IdTokenEntity | null { - this.commonLogger.trace("CacheManager - getIdToken called"); - const idTokenFilter: CredentialFilter = { - homeAccountId: account.homeAccountId, - environment: account.environment, - credentialType: CredentialType.ID_TOKEN, - clientId: this.clientId, - realm: targetRealm, - }; - - const idTokenMap: Map = this.getIdTokensByFilter( - idTokenFilter, - correlationId, - tokenKeys - ); - - const numIdTokens = idTokenMap.size; - - if (numIdTokens < 1) { - this.commonLogger.info("CacheManager:getIdToken - No token found"); - return null; - } else if (numIdTokens > 1) { - let tokensToBeRemoved: Map = idTokenMap; - // Multiple tenant profiles and no tenant specified, pick home account - if (!targetRealm) { - const homeIdTokenMap: Map = new Map< - string, - IdTokenEntity - >(); - idTokenMap.forEach((idToken, key) => { - if (idToken.realm === account.tenantId) { - homeIdTokenMap.set(key, idToken); - } - }); - const numHomeIdTokens = homeIdTokenMap.size; - if (numHomeIdTokens < 1) { - this.commonLogger.info( - "CacheManager:getIdToken - Multiple ID tokens found for account but none match account entity tenant id, returning first result" - ); - return idTokenMap.values().next().value; - } else if (numHomeIdTokens === 1) { - this.commonLogger.info( - "CacheManager:getIdToken - Multiple ID tokens found for account, defaulting to home tenant profile" - ); - return homeIdTokenMap.values().next().value; - } else { - // Multiple ID tokens for home tenant profile, remove all and return null - tokensToBeRemoved = homeIdTokenMap; - } - } - // Multiple tokens for a single tenant profile, remove all and return null - this.commonLogger.info( - "CacheManager:getIdToken - Multiple matching ID tokens found, clearing them" - ); - tokensToBeRemoved.forEach((idToken, key) => { - this.removeIdToken(key, correlationId); - }); - if (performanceClient && correlationId) { - performanceClient.addFields( - { multiMatchedID: idTokenMap.size }, - correlationId - ); - } - return null; - } - - this.commonLogger.info("CacheManager:getIdToken - Returning ID token"); - return idTokenMap.values().next().value; - } - - /** - * Gets all idTokens matching the given filter - * @param filter - * @returns - */ - getIdTokensByFilter( - filter: CredentialFilter, - correlationId: string, - tokenKeys?: TokenKeys - ): Map { - const idTokenKeys = - (tokenKeys && tokenKeys.idToken) || this.getTokenKeys().idToken; - - const idTokens: Map = new Map< - string, - IdTokenEntity - >(); - idTokenKeys.forEach((key) => { - if ( - !this.idTokenKeyMatchesFilter(key, { - clientId: this.clientId, - ...filter, - }) - ) { - return; - } - const idToken = this.getIdTokenCredential(key, correlationId); - if (idToken && this.credentialMatchesFilter(idToken, filter)) { - idTokens.set(key, idToken); - } - }); - - return idTokens; - } - - /** - * Validate the cache key against filter before retrieving and parsing cache value - * @param key - * @param filter - * @returns - */ - idTokenKeyMatchesFilter( - inputKey: string, - filter: CredentialFilter - ): boolean { - const key = inputKey.toLowerCase(); - if ( - filter.clientId && - key.indexOf(filter.clientId.toLowerCase()) === -1 - ) { - return false; - } - - if ( - filter.homeAccountId && - key.indexOf(filter.homeAccountId.toLowerCase()) === -1 - ) { - return false; - } - - return true; - } - - /** - * Removes idToken from the cache - * @param key - */ - removeIdToken(key: string, correlationId: string): void { - this.removeItem(key, correlationId); - } - - /** - * Removes refresh token from the cache - * @param key - */ - removeRefreshToken(key: string, correlationId: string): void { - this.removeItem(key, correlationId); - } - - /** - * Retrieve AccessTokenEntity from cache - * @param account {AccountInfo} - * @param request {BaseAuthRequest} - * @param tokenKeys {?TokenKeys} - * @param performanceClient {?IPerformanceClient} - * @param correlationId {?string} - */ - getAccessToken( - account: AccountInfo, - request: BaseAuthRequest, - tokenKeys?: TokenKeys, - targetRealm?: string, - performanceClient?: IPerformanceClient - ): AccessTokenEntity | null { - this.commonLogger.trace("CacheManager - getAccessToken called"); - const scopes = ScopeSet.createSearchScopes(request.scopes); - const authScheme = - request.authenticationScheme || AuthenticationScheme.BEARER; - /* - * Distinguish between Bearer and PoP/SSH token cache types - * Cast to lowercase to handle "bearer" from ADFS - */ - const credentialType = - authScheme && - authScheme.toLowerCase() !== - AuthenticationScheme.BEARER.toLowerCase() - ? CredentialType.ACCESS_TOKEN_WITH_AUTH_SCHEME - : CredentialType.ACCESS_TOKEN; - - const accessTokenFilter: CredentialFilter = { - homeAccountId: account.homeAccountId, - environment: account.environment, - credentialType: credentialType, - clientId: this.clientId, - realm: targetRealm || account.tenantId, - target: scopes, - tokenType: authScheme, - keyId: request.sshKid, - requestedClaimsHash: request.requestedClaimsHash, - }; - - const accessTokenKeys = - (tokenKeys && tokenKeys.accessToken) || - this.getTokenKeys().accessToken; - const accessTokens: AccessTokenEntity[] = []; - - accessTokenKeys.forEach((key) => { - // Validate key - if ( - this.accessTokenKeyMatchesFilter(key, accessTokenFilter, true) - ) { - const accessToken = this.getAccessTokenCredential( - key, - request.correlationId - ); - - // Validate value - if ( - accessToken && - this.credentialMatchesFilter(accessToken, accessTokenFilter) - ) { - accessTokens.push(accessToken); - } - } - }); - - const numAccessTokens = accessTokens.length; - if (numAccessTokens < 1) { - this.commonLogger.info( - "CacheManager:getAccessToken - No token found" - ); - return null; - } else if (numAccessTokens > 1) { - this.commonLogger.info( - "CacheManager:getAccessToken - Multiple access tokens found, clearing them" - ); - accessTokens.forEach((accessToken) => { - void this.removeAccessToken( - generateCredentialKey(accessToken), - request.correlationId - ); - }); - if (performanceClient && request.correlationId) { - performanceClient.addFields( - { multiMatchedAT: accessTokens.length }, - request.correlationId - ); - } - return null; - } - - this.commonLogger.info( - "CacheManager:getAccessToken - Returning access token" - ); - return accessTokens[0]; - } - - /** - * Validate the cache key against filter before retrieving and parsing cache value - * @param key - * @param filter - * @param keyMustContainAllScopes - * @returns - */ - accessTokenKeyMatchesFilter( - inputKey: string, - filter: CredentialFilter, - keyMustContainAllScopes: boolean - ): boolean { - const key = inputKey.toLowerCase(); - if ( - filter.clientId && - key.indexOf(filter.clientId.toLowerCase()) === -1 - ) { - return false; - } - - if ( - filter.homeAccountId && - key.indexOf(filter.homeAccountId.toLowerCase()) === -1 - ) { - return false; - } - - if (filter.realm && key.indexOf(filter.realm.toLowerCase()) === -1) { - return false; - } - - if ( - filter.requestedClaimsHash && - key.indexOf(filter.requestedClaimsHash.toLowerCase()) === -1 - ) { - return false; - } - - if (filter.target) { - const scopes = filter.target.asArray(); - for (let i = 0; i < scopes.length; i++) { - if ( - keyMustContainAllScopes && - !key.includes(scopes[i].toLowerCase()) - ) { - // When performing a cache lookup a missing scope would be a cache miss - return false; - } else if ( - !keyMustContainAllScopes && - key.includes(scopes[i].toLowerCase()) - ) { - // When performing a cache write, any token with a subset of requested scopes should be replaced - return true; - } - } - } - - return true; - } - - /** - * Gets all access tokens matching the filter - * @param filter - * @returns - */ - getAccessTokensByFilter( - filter: CredentialFilter, - correlationId: string - ): AccessTokenEntity[] { - const tokenKeys = this.getTokenKeys(); - - const accessTokens: AccessTokenEntity[] = []; - tokenKeys.accessToken.forEach((key) => { - if (!this.accessTokenKeyMatchesFilter(key, filter, true)) { - return; - } - - const accessToken = this.getAccessTokenCredential( - key, - correlationId - ); - if ( - accessToken && - this.credentialMatchesFilter(accessToken, filter) - ) { - accessTokens.push(accessToken); - } - }); - - return accessTokens; - } - - /** - * Helper to retrieve the appropriate refresh token from cache - * @param account {AccountInfo} - * @param familyRT {boolean} - * @param tokenKeys {?TokenKeys} - * @param performanceClient {?IPerformanceClient} - * @param correlationId {?string} - */ - getRefreshToken( - account: AccountInfo, - familyRT: boolean, - correlationId: string, - tokenKeys?: TokenKeys, - performanceClient?: IPerformanceClient - ): RefreshTokenEntity | null { - this.commonLogger.trace("CacheManager - getRefreshToken called"); - const id = familyRT ? THE_FAMILY_ID : undefined; - const refreshTokenFilter: CredentialFilter = { - homeAccountId: account.homeAccountId, - environment: account.environment, - credentialType: CredentialType.REFRESH_TOKEN, - clientId: this.clientId, - familyId: id, - }; - - const refreshTokenKeys = - (tokenKeys && tokenKeys.refreshToken) || - this.getTokenKeys().refreshToken; - const refreshTokens: RefreshTokenEntity[] = []; - - refreshTokenKeys.forEach((key) => { - // Validate key - if (this.refreshTokenKeyMatchesFilter(key, refreshTokenFilter)) { - const refreshToken = this.getRefreshTokenCredential( - key, - correlationId - ); - // Validate value - if ( - refreshToken && - this.credentialMatchesFilter( - refreshToken, - refreshTokenFilter - ) - ) { - refreshTokens.push(refreshToken); - } - } - }); - - const numRefreshTokens = refreshTokens.length; - if (numRefreshTokens < 1) { - this.commonLogger.info( - "CacheManager:getRefreshToken - No refresh token found." - ); - return null; - } - // address the else case after remove functions address environment aliases - - if (numRefreshTokens > 1 && performanceClient && correlationId) { - performanceClient.addFields( - { multiMatchedRT: numRefreshTokens }, - correlationId - ); - } - - this.commonLogger.info( - "CacheManager:getRefreshToken - returning refresh token" - ); - return refreshTokens[0] as RefreshTokenEntity; - } - - /** - * Validate the cache key against filter before retrieving and parsing cache value - * @param key - * @param filter - */ - refreshTokenKeyMatchesFilter( - inputKey: string, - filter: CredentialFilter - ): boolean { - const key = inputKey.toLowerCase(); - if ( - filter.familyId && - key.indexOf(filter.familyId.toLowerCase()) === -1 - ) { - return false; - } - - // If familyId is used, clientId is not in the key - if ( - !filter.familyId && - filter.clientId && - key.indexOf(filter.clientId.toLowerCase()) === -1 - ) { - return false; - } - - if ( - filter.homeAccountId && - key.indexOf(filter.homeAccountId.toLowerCase()) === -1 - ) { - return false; - } - - return true; - } - - /** - * Retrieve AppMetadataEntity from cache - */ - readAppMetadataFromCache(environment: string): AppMetadataEntity | null { - const appMetadataFilter: AppMetadataFilter = { - environment, - clientId: this.clientId, - }; - - const appMetadata: AppMetadataCache = - this.getAppMetadataFilteredBy(appMetadataFilter); - const appMetadataEntries: AppMetadataEntity[] = Object.keys( - appMetadata - ).map((key) => appMetadata[key]); - - const numAppMetadata = appMetadataEntries.length; - if (numAppMetadata < 1) { - return null; - } else if (numAppMetadata > 1) { - throw createClientAuthError( - ClientAuthErrorCodes.multipleMatchingAppMetadata - ); - } - - return appMetadataEntries[0] as AppMetadataEntity; - } - - /** - * Return the family_id value associated with FOCI - * @param environment - * @param clientId - */ - isAppMetadataFOCI(environment: string): boolean { - const appMetadata = this.readAppMetadataFromCache(environment); - return !!(appMetadata && appMetadata.familyId === THE_FAMILY_ID); - } - - /** - * helper to match account ids - * @param value - * @param homeAccountId - */ - private matchHomeAccountId( - entity: AccountEntity | CredentialEntity, - homeAccountId: string - ): boolean { - return !!( - typeof entity.homeAccountId === "string" && - homeAccountId === entity.homeAccountId - ); - } - - /** - * helper to match account ids - * @param entity - * @param localAccountId - * @returns - */ - private matchLocalAccountIdFromTokenClaims( - tokenClaims: TokenClaims, - localAccountId: string - ): boolean { - const idTokenLocalAccountId = tokenClaims.oid || tokenClaims.sub; - return localAccountId === idTokenLocalAccountId; - } - - private matchLocalAccountIdFromTenantProfile( - tenantProfile: TenantProfile, - localAccountId: string - ): boolean { - return tenantProfile.localAccountId === localAccountId; - } - - /** - * helper to match names - * @param entity - * @param name - * @returns true if the downcased name properties are present and match in the filter and the entity - */ - private matchName(claims: TokenClaims, name: string): boolean { - return !!(name.toLowerCase() === claims.name?.toLowerCase()); - } - - /** - * helper to match usernames - * @param entity - * @param username - * @returns - */ - private matchUsername( - cachedUsername?: string, - filterUsername?: string - ): boolean { - return !!( - cachedUsername && - typeof cachedUsername === "string" && - filterUsername?.toLowerCase() === cachedUsername.toLowerCase() - ); - } - - /** - * helper to match assertion - * @param value - * @param oboAssertion - */ - private matchUserAssertionHash( - entity: CredentialEntity, - userAssertionHash: string - ): boolean { - return !!( - entity.userAssertionHash && - userAssertionHash === entity.userAssertionHash - ); - } - - /** - * helper to match environment - * @param value - * @param environment - */ - private matchEnvironment( - entity: AccountEntity | CredentialEntity | AppMetadataEntity, - environment: string - ): boolean { - // Check static authority options first for cases where authority metadata has not been resolved and cached yet - if (this.staticAuthorityOptions) { - const staticAliases = getAliasesFromStaticSources( - this.staticAuthorityOptions, - this.commonLogger - ); - if ( - staticAliases.includes(environment) && - staticAliases.includes(entity.environment) - ) { - return true; - } - } - - // Query metadata cache if no static authority configuration has aliases that match enviroment - const cloudMetadata = this.getAuthorityMetadataByAlias(environment); - if ( - cloudMetadata && - cloudMetadata.aliases.indexOf(entity.environment) > -1 - ) { - return true; - } - return false; - } - - /** - * helper to match credential type - * @param entity - * @param credentialType - */ - private matchCredentialType( - entity: CredentialEntity, - credentialType: string - ): boolean { - return ( - entity.credentialType && - credentialType.toLowerCase() === entity.credentialType.toLowerCase() - ); - } - - /** - * helper to match client ids - * @param entity - * @param clientId - */ - private matchClientId( - entity: CredentialEntity | AppMetadataEntity, - clientId: string - ): boolean { - return !!(entity.clientId && clientId === entity.clientId); - } - - /** - * helper to match family ids - * @param entity - * @param familyId - */ - private matchFamilyId( - entity: CredentialEntity | AppMetadataEntity, - familyId: string - ): boolean { - return !!(entity.familyId && familyId === entity.familyId); - } - - /** - * helper to match realm - * @param entity - * @param realm - */ - private matchRealm( - entity: AccountEntity | CredentialEntity, - realm: string - ): boolean { - return !!(entity.realm?.toLowerCase() === realm.toLowerCase()); - } - - /** - * helper to match nativeAccountId - * @param entity - * @param nativeAccountId - * @returns boolean indicating the match result - */ - private matchNativeAccountId( - entity: AccountEntity, - nativeAccountId: string - ): boolean { - return !!( - entity.nativeAccountId && nativeAccountId === entity.nativeAccountId - ); - } - - /** - * helper to match loginHint which can be either: - * 1. login_hint ID token claim - * 2. username in cached account object - * 3. upn in ID token claims - * @param entity - * @param loginHint - * @returns - */ - private matchLoginHintFromTokenClaims( - tokenClaims: TokenClaims, - loginHint: string - ): boolean { - if (tokenClaims.login_hint === loginHint) { - return true; - } - - if (tokenClaims.preferred_username === loginHint) { - return true; - } - - if (tokenClaims.upn === loginHint) { - return true; - } - - return false; - } - - /** - * Helper to match sid - * @param entity - * @param sid - * @returns true if the sid claim is present and matches the filter - */ - private matchSid(idTokenClaims: TokenClaims, sid: string): boolean { - return idTokenClaims.sid === sid; - } - - private matchAuthorityType( - entity: AccountEntity, - authorityType: string - ): boolean { - return !!( - entity.authorityType && - authorityType.toLowerCase() === entity.authorityType.toLowerCase() - ); - } - - /** - * Returns true if the target scopes are a subset of the current entity's scopes, false otherwise. - * @param entity - * @param target - */ - private matchTarget(entity: CredentialEntity, target: ScopeSet): boolean { - const isNotAccessTokenCredential = - entity.credentialType !== CredentialType.ACCESS_TOKEN && - entity.credentialType !== - CredentialType.ACCESS_TOKEN_WITH_AUTH_SCHEME; - - if (isNotAccessTokenCredential || !entity.target) { - return false; - } - - const entityScopeSet: ScopeSet = ScopeSet.fromString(entity.target); - - return entityScopeSet.containsScopeSet(target); - } - - /** - * Returns true if the credential's tokenType or Authentication Scheme matches the one in the request, false otherwise - * @param entity - * @param tokenType - */ - private matchTokenType( - entity: CredentialEntity, - tokenType: AuthenticationScheme - ): boolean { - return !!(entity.tokenType && entity.tokenType === tokenType); - } - - /** - * Returns true if the credential's keyId matches the one in the request, false otherwise - * @param entity - * @param keyId - */ - private matchKeyId(entity: CredentialEntity, keyId: string): boolean { - return !!(entity.keyId && entity.keyId === keyId); - } - - /** - * returns if a given cache entity is of the type appmetadata - * @param key - */ - private isAppMetadata(key: string): boolean { - return key.indexOf(APP_METADATA) !== -1; - } - - /** - * returns if a given cache entity is of the type authoritymetadata - * @param key - */ - protected isAuthorityMetadata(key: string): boolean { - return key.indexOf(AUTHORITY_METADATA_CONSTANTS.CACHE_KEY) !== -1; - } - - /** - * returns cache key used for cloud instance metadata - */ - generateAuthorityMetadataCacheKey(authority: string): string { - return `${AUTHORITY_METADATA_CONSTANTS.CACHE_KEY}-${this.clientId}-${authority}`; - } - - /** - * Helper to convert serialized data to object - * @param obj - * @param json - */ - static toObject(obj: T, json: object): T { - for (const propertyName in json) { - obj[propertyName] = json[propertyName]; - } - return obj; - } -} - -/** @internal */ -export class DefaultStorageClass extends CacheManager { - setAccount(): void { - throw createClientAuthError(ClientAuthErrorCodes.methodNotImplemented); - } - getAccount(): AccountEntity { - throw createClientAuthError(ClientAuthErrorCodes.methodNotImplemented); - } - getCachedAccountEntity(): AccountEntity | null { - throw createClientAuthError(ClientAuthErrorCodes.methodNotImplemented); - } - setIdTokenCredential(): void { - throw createClientAuthError(ClientAuthErrorCodes.methodNotImplemented); - } - getIdTokenCredential(): IdTokenEntity { - throw createClientAuthError(ClientAuthErrorCodes.methodNotImplemented); - } - setAccessTokenCredential(): void { - throw createClientAuthError(ClientAuthErrorCodes.methodNotImplemented); - } - getAccessTokenCredential(): AccessTokenEntity { - throw createClientAuthError(ClientAuthErrorCodes.methodNotImplemented); - } - setRefreshTokenCredential(): void { - throw createClientAuthError(ClientAuthErrorCodes.methodNotImplemented); - } - getRefreshTokenCredential(): RefreshTokenEntity { - throw createClientAuthError(ClientAuthErrorCodes.methodNotImplemented); - } - setAppMetadata(): void { - throw createClientAuthError(ClientAuthErrorCodes.methodNotImplemented); - } - getAppMetadata(): AppMetadataEntity { - throw createClientAuthError(ClientAuthErrorCodes.methodNotImplemented); - } - setServerTelemetry(): void { - throw createClientAuthError(ClientAuthErrorCodes.methodNotImplemented); - } - getServerTelemetry(): ServerTelemetryEntity { - throw createClientAuthError(ClientAuthErrorCodes.methodNotImplemented); - } - setAuthorityMetadata(): void { - throw createClientAuthError(ClientAuthErrorCodes.methodNotImplemented); - } - getAuthorityMetadata(): AuthorityMetadataEntity | null { - throw createClientAuthError(ClientAuthErrorCodes.methodNotImplemented); - } - getAuthorityMetadataKeys(): Array { - throw createClientAuthError(ClientAuthErrorCodes.methodNotImplemented); - } - setThrottlingCache(): void { - throw createClientAuthError(ClientAuthErrorCodes.methodNotImplemented); - } - getThrottlingCache(): ThrottlingEntity { - throw createClientAuthError(ClientAuthErrorCodes.methodNotImplemented); - } - removeItem(): boolean { - throw createClientAuthError(ClientAuthErrorCodes.methodNotImplemented); - } - getKeys(): string[] { - throw createClientAuthError(ClientAuthErrorCodes.methodNotImplemented); - } - getAccountKeys(): string[] { - throw createClientAuthError(ClientAuthErrorCodes.methodNotImplemented); - } - getTokenKeys(): TokenKeys { - throw createClientAuthError(ClientAuthErrorCodes.methodNotImplemented); - } - updateCredentialCacheKey(): string { - throw createClientAuthError(ClientAuthErrorCodes.methodNotImplemented); - } - removeOutdatedAccount(): void { - throw createClientAuthError(ClientAuthErrorCodes.methodNotImplemented); - } -} diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/src/cache/entities/AccessTokenEntity.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/src/cache/entities/AccessTokenEntity.ts deleted file mode 100644 index cdbab56..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/src/cache/entities/AccessTokenEntity.ts +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import { CredentialEntity } from "./CredentialEntity.js"; -import { AuthenticationScheme } from "../../utils/Constants.js"; - -/** - * Access token cache type - */ -export type AccessTokenEntity = CredentialEntity & { - /** Full tenant or organizational identifier that the account belongs to */ - realm: string; - /** Permissions that are included in the token, or for refresh tokens, the resource identifier. */ - target: string; - /** Absolute device time when entry was created in the cache. */ - cachedAt: string; - /** Token expiry time, calculated based on current UTC time in seconds. Represented as a string. */ - expiresOn: string; - /** Additional extended expiry time until when token is valid in case of server-side outage. Represented as string in UTC seconds. */ - extendedExpiresOn?: string; - /** Used for proactive refresh */ - refreshOn?: string; - /** Matches the authentication scheme for which the token was issued (i.e. Bearer or pop) */ - tokenType?: AuthenticationScheme; - /** Stringified claims object */ - requestedClaims?: string; - /** Matches the SHA 256 hash of the claims object included in the token request */ - requestedClaimsHash?: string; -}; diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/src/cache/entities/AccountEntity.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/src/cache/entities/AccountEntity.ts deleted file mode 100644 index a2ab8a2..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/src/cache/entities/AccountEntity.ts +++ /dev/null @@ -1,361 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import { CacheAccountType, Separators } from "../../utils/Constants.js"; -import { Authority } from "../../authority/Authority.js"; -import { ICrypto } from "../../crypto/ICrypto.js"; -import { ClientInfo, buildClientInfo } from "../../account/ClientInfo.js"; -import { - AccountInfo, - TenantProfile, - buildTenantProfile, -} from "../../account/AccountInfo.js"; -import { - createClientAuthError, - ClientAuthErrorCodes, -} from "../../error/ClientAuthError.js"; -import { AuthorityType } from "../../authority/AuthorityType.js"; -import { Logger } from "../../logger/Logger.js"; -import { - TokenClaims, - getTenantIdFromIdTokenClaims, -} from "../../account/TokenClaims.js"; -import { ProtocolMode } from "../../authority/ProtocolMode.js"; - -/** - * Type that defines required and optional parameters for an Account field (based on universal cache schema implemented by all MSALs). - * - * Key : Value Schema - * - * Key: -- - * - * Value Schema: - * { - * homeAccountId: home account identifier for the auth scheme, - * environment: entity that issued the token, represented as a full host - * realm: Full tenant or organizational identifier that the account belongs to - * localAccountId: Original tenant-specific accountID, usually used for legacy cases - * username: primary username that represents the user, usually corresponds to preferred_username in the v2 endpt - * authorityType: Accounts authority type as a string - * name: Full name for the account, including given name and family name, - * lastModificationTime: last time this entity was modified in the cache - * lastModificationApp: - * nativeAccountId: Account identifier on the native device - * tenantProfiles: Array of tenant profile objects for each tenant that the account has authenticated with in the browser - * } - * @internal - */ -export class AccountEntity { - homeAccountId: string; - environment: string; - realm: string; - localAccountId: string; - username: string; - authorityType: string; - clientInfo?: string; - name?: string; - lastModificationTime?: string; - lastModificationApp?: string; - cloudGraphHostName?: string; - msGraphHost?: string; - nativeAccountId?: string; - tenantProfiles?: Array; - lastUpdatedAt?: string; - - /** - * Generate Account Id key component as per the schema: - - */ - generateAccountId(): string { - const accountId: Array = [this.homeAccountId, this.environment]; - return accountId.join(Separators.CACHE_KEY_SEPARATOR).toLowerCase(); - } - - /** - * Generate Account Cache Key as per the schema: -- - */ - generateAccountKey(): string { - return AccountEntity.generateAccountCacheKey({ - homeAccountId: this.homeAccountId, - environment: this.environment, - tenantId: this.realm, - username: this.username, - localAccountId: this.localAccountId, - }); - } - - /** - * Returns the AccountInfo interface for this account. - */ - getAccountInfo(): AccountInfo { - return { - homeAccountId: this.homeAccountId, - environment: this.environment, - tenantId: this.realm, - username: this.username, - localAccountId: this.localAccountId, - name: this.name, - nativeAccountId: this.nativeAccountId, - authorityType: this.authorityType, - // Deserialize tenant profiles array into a Map - tenantProfiles: new Map( - (this.tenantProfiles || []).map((tenantProfile) => { - return [tenantProfile.tenantId, tenantProfile]; - }) - ), - }; - } - - /** - * Returns true if the account entity is in single tenant format (outdated), false otherwise - */ - isSingleTenant(): boolean { - return !this.tenantProfiles; - } - - /** - * Generates account key from interface - * @param accountInterface - */ - static generateAccountCacheKey(accountInterface: AccountInfo): string { - const homeTenantId = accountInterface.homeAccountId.split(".")[1]; - const accountKey = [ - accountInterface.homeAccountId, - accountInterface.environment || "", - homeTenantId || accountInterface.tenantId || "", - ]; - - return accountKey.join(Separators.CACHE_KEY_SEPARATOR).toLowerCase(); - } - - /** - * Build Account cache from IdToken, clientInfo and authority/policy. Associated with AAD. - * @param accountDetails - */ - static createAccount( - accountDetails: { - homeAccountId: string; - idTokenClaims?: TokenClaims; - clientInfo?: string; - cloudGraphHostName?: string; - msGraphHost?: string; - environment?: string; - nativeAccountId?: string; - tenantProfiles?: Array; - }, - authority: Authority, - base64Decode?: (input: string) => string - ): AccountEntity { - const account: AccountEntity = new AccountEntity(); - - if (authority.authorityType === AuthorityType.Adfs) { - account.authorityType = CacheAccountType.ADFS_ACCOUNT_TYPE; - } else if (authority.protocolMode === ProtocolMode.AAD) { - account.authorityType = CacheAccountType.MSSTS_ACCOUNT_TYPE; - } else { - account.authorityType = CacheAccountType.GENERIC_ACCOUNT_TYPE; - } - - let clientInfo: ClientInfo | undefined; - - if (accountDetails.clientInfo && base64Decode) { - clientInfo = buildClientInfo( - accountDetails.clientInfo, - base64Decode - ); - } - - account.clientInfo = accountDetails.clientInfo; - account.homeAccountId = accountDetails.homeAccountId; - account.nativeAccountId = accountDetails.nativeAccountId; - - const env = - accountDetails.environment || - (authority && authority.getPreferredCache()); - - if (!env) { - throw createClientAuthError( - ClientAuthErrorCodes.invalidCacheEnvironment - ); - } - - account.environment = env; - // non AAD scenarios can have empty realm - account.realm = - clientInfo?.utid || - getTenantIdFromIdTokenClaims(accountDetails.idTokenClaims) || - ""; - - // How do you account for MSA CID here? - account.localAccountId = - clientInfo?.uid || - accountDetails.idTokenClaims?.oid || - accountDetails.idTokenClaims?.sub || - ""; - - /* - * In B2C scenarios the emails claim is used instead of preferred_username and it is an array. - * In most cases it will contain a single email. This field should not be relied upon if a custom - * policy is configured to return more than 1 email. - */ - const preferredUsername = - accountDetails.idTokenClaims?.preferred_username || - accountDetails.idTokenClaims?.upn; - const email = accountDetails.idTokenClaims?.emails - ? accountDetails.idTokenClaims.emails[0] - : null; - - account.username = preferredUsername || email || ""; - account.name = accountDetails.idTokenClaims?.name || ""; - - account.cloudGraphHostName = accountDetails.cloudGraphHostName; - account.msGraphHost = accountDetails.msGraphHost; - - if (accountDetails.tenantProfiles) { - account.tenantProfiles = accountDetails.tenantProfiles; - } else { - const tenantProfile = buildTenantProfile( - accountDetails.homeAccountId, - account.localAccountId, - account.realm, - accountDetails.idTokenClaims - ); - account.tenantProfiles = [tenantProfile]; - } - - return account; - } - - /** - * Creates an AccountEntity object from AccountInfo - * @param accountInfo - * @param cloudGraphHostName - * @param msGraphHost - * @returns - */ - static createFromAccountInfo( - accountInfo: AccountInfo, - cloudGraphHostName?: string, - msGraphHost?: string - ): AccountEntity { - const account: AccountEntity = new AccountEntity(); - - account.authorityType = - accountInfo.authorityType || CacheAccountType.GENERIC_ACCOUNT_TYPE; - account.homeAccountId = accountInfo.homeAccountId; - account.localAccountId = accountInfo.localAccountId; - account.nativeAccountId = accountInfo.nativeAccountId; - - account.realm = accountInfo.tenantId; - account.environment = accountInfo.environment; - - account.username = accountInfo.username; - account.name = accountInfo.name; - - account.cloudGraphHostName = cloudGraphHostName; - account.msGraphHost = msGraphHost; - // Serialize tenant profiles map into an array - account.tenantProfiles = Array.from( - accountInfo.tenantProfiles?.values() || [] - ); - - return account; - } - - /** - * Generate HomeAccountId from server response - * @param serverClientInfo - * @param authType - */ - static generateHomeAccountId( - serverClientInfo: string, - authType: AuthorityType, - logger: Logger, - cryptoObj: ICrypto, - idTokenClaims?: TokenClaims - ): string { - // since ADFS/DSTS do not have tid and does not set client_info - if ( - !( - authType === AuthorityType.Adfs || - authType === AuthorityType.Dsts - ) - ) { - // for cases where there is clientInfo - if (serverClientInfo) { - try { - const clientInfo = buildClientInfo( - serverClientInfo, - cryptoObj.base64Decode - ); - if (clientInfo.uid && clientInfo.utid) { - return `${clientInfo.uid}.${clientInfo.utid}`; - } - } catch (e) {} - } - logger.warning("No client info in response"); - } - - // default to "sub" claim - return idTokenClaims?.sub || ""; - } - - /** - * Validates an entity: checks for all expected params - * @param entity - */ - static isAccountEntity(entity: object): boolean { - if (!entity) { - return false; - } - - return ( - entity.hasOwnProperty("homeAccountId") && - entity.hasOwnProperty("environment") && - entity.hasOwnProperty("realm") && - entity.hasOwnProperty("localAccountId") && - entity.hasOwnProperty("username") && - entity.hasOwnProperty("authorityType") - ); - } - - /** - * Helper function to determine whether 2 accountInfo objects represent the same account - * @param accountA - * @param accountB - * @param compareClaims - If set to true idTokenClaims will also be compared to determine account equality - */ - static accountInfoIsEqual( - accountA: AccountInfo | null, - accountB: AccountInfo | null, - compareClaims?: boolean - ): boolean { - if (!accountA || !accountB) { - return false; - } - - let claimsMatch = true; // default to true so as to not fail comparison below if compareClaims: false - if (compareClaims) { - const accountAClaims = (accountA.idTokenClaims || - {}) as TokenClaims; - const accountBClaims = (accountB.idTokenClaims || - {}) as TokenClaims; - - // issued at timestamp and nonce are expected to change each time a new id token is acquired - claimsMatch = - accountAClaims.iat === accountBClaims.iat && - accountAClaims.nonce === accountBClaims.nonce; - } - - return ( - accountA.homeAccountId === accountB.homeAccountId && - accountA.localAccountId === accountB.localAccountId && - accountA.username === accountB.username && - accountA.tenantId === accountB.tenantId && - accountA.environment === accountB.environment && - accountA.nativeAccountId === accountB.nativeAccountId && - claimsMatch - ); - } -} diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/src/cache/entities/AppMetadataEntity.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/src/cache/entities/AppMetadataEntity.ts deleted file mode 100644 index 936daee..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/src/cache/entities/AppMetadataEntity.ts +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -/** - * App Metadata Cache Type - */ -export type AppMetadataEntity = { - /** clientId of the application */ - clientId: string; - /** entity that issued the token, represented as a full host */ - environment: string; - /** Family identifier, '1' represents Microsoft Family */ - familyId?: string; -}; diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/src/cache/entities/AuthorityMetadataEntity.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/src/cache/entities/AuthorityMetadataEntity.ts deleted file mode 100644 index 3f17cb7..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/src/cache/entities/AuthorityMetadataEntity.ts +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -/** @internal */ -export type AuthorityMetadataEntity = { - aliases: Array; - preferred_cache: string; - preferred_network: string; - canonical_authority: string; - authorization_endpoint: string; - token_endpoint: string; - end_session_endpoint?: string; - issuer: string; - aliasesFromNetwork: boolean; - endpointsFromNetwork: boolean; - expiresAt: number; - jwks_uri: string; -}; diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/src/cache/entities/CacheRecord.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/src/cache/entities/CacheRecord.ts deleted file mode 100644 index 0c8c507..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/src/cache/entities/CacheRecord.ts +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import { IdTokenEntity } from "./IdTokenEntity.js"; -import { AccessTokenEntity } from "./AccessTokenEntity.js"; -import { RefreshTokenEntity } from "./RefreshTokenEntity.js"; -import { AccountEntity } from "./AccountEntity.js"; -import { AppMetadataEntity } from "./AppMetadataEntity.js"; - -/** @internal */ -export type CacheRecord = { - account?: AccountEntity | null; - idToken?: IdTokenEntity | null; - accessToken?: AccessTokenEntity | null; - refreshToken?: RefreshTokenEntity | null; - appMetadata?: AppMetadataEntity | null; -}; diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/src/cache/entities/CredentialEntity.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/src/cache/entities/CredentialEntity.ts deleted file mode 100644 index 618d2b9..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/src/cache/entities/CredentialEntity.ts +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import { CredentialType, AuthenticationScheme } from "../../utils/Constants.js"; - -/** - * Credential Cache Type - */ -export type CredentialEntity = { - /** Identifier for the user in their home tenant*/ - homeAccountId: string; - /** Entity that issued the token, represented as a full host */ - environment: string; - /** Type of credential */ - credentialType: CredentialType; - /** Client ID of the application */ - clientId: string; - /** Actual credential as a string */ - secret: string; - /** Family ID identifier, usually only used for refresh tokens */ - familyId?: string; - /** Full tenant or organizational identifier that the account belongs to */ - realm?: string; - /** Permissions that are included in the token, or for refresh tokens, the resource identifier. */ - target?: string; - /** Matches the SHA 256 hash of the obo_assertion for the OBO flow */ - userAssertionHash?: string; - /** Matches the authentication scheme for which the token was issued (i.e. Bearer or pop) */ - tokenType?: AuthenticationScheme; - /** KeyId for PoP and SSH tokens stored in the kid claim */ - keyId?: string; - /** Matches the SHA 256 hash of the claims object included in the token request */ - requestedClaimsHash?: string; - /** Timestamp when the entry was last updated */ - lastUpdatedAt?: string; -}; diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/src/cache/entities/IdTokenEntity.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/src/cache/entities/IdTokenEntity.ts deleted file mode 100644 index 50db31b..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/src/cache/entities/IdTokenEntity.ts +++ /dev/null @@ -1,14 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import { CredentialEntity } from "./CredentialEntity.js"; - -/** - * Id Token Cache Type - */ -export type IdTokenEntity = CredentialEntity & { - /** Full tenant or organizational identifier that the account belongs to */ - realm: string; -}; diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/src/cache/entities/RefreshTokenEntity.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/src/cache/entities/RefreshTokenEntity.ts deleted file mode 100644 index 260968a..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/src/cache/entities/RefreshTokenEntity.ts +++ /dev/null @@ -1,13 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import { CredentialEntity } from "./CredentialEntity.js"; - -/** - * Refresh Token Cache Type - */ -export type RefreshTokenEntity = CredentialEntity & { - expiresOn?: string; -}; diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/src/cache/entities/ServerTelemetryEntity.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/src/cache/entities/ServerTelemetryEntity.ts deleted file mode 100644 index 783360d..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/src/cache/entities/ServerTelemetryEntity.ts +++ /dev/null @@ -1,11 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -export type ServerTelemetryEntity = { - failedRequests: Array; - errors: string[]; - cacheHits: number; - nativeBrokerErrorCode?: string; -}; diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/src/cache/entities/ThrottlingEntity.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/src/cache/entities/ThrottlingEntity.ts deleted file mode 100644 index fe23198..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/src/cache/entities/ThrottlingEntity.ts +++ /dev/null @@ -1,14 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -export type ThrottlingEntity = { - // Unix-time value representing the expiration of the throttle - throttleTime: number; - // Information provided by the server - error?: string; - errorCodes?: Array; - errorMessage?: string; - subError?: string; -}; diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/src/cache/interface/ICacheManager.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/src/cache/interface/ICacheManager.ts deleted file mode 100644 index 674528c..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/src/cache/interface/ICacheManager.ts +++ /dev/null @@ -1,243 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import { AccountFilter } from "../utils/CacheTypes.js"; -import { CacheRecord } from "../entities/CacheRecord.js"; -import { AccountEntity } from "../entities/AccountEntity.js"; -import { AccountInfo } from "../../account/AccountInfo.js"; -import { AppMetadataEntity } from "../entities/AppMetadataEntity.js"; -import { ServerTelemetryEntity } from "../entities/ServerTelemetryEntity.js"; -import { ThrottlingEntity } from "../entities/ThrottlingEntity.js"; -import { IdTokenEntity } from "../entities/IdTokenEntity.js"; -import { AccessTokenEntity } from "../entities/AccessTokenEntity.js"; -import { RefreshTokenEntity } from "../entities/RefreshTokenEntity.js"; -import { AuthorityMetadataEntity } from "../entities/AuthorityMetadataEntity.js"; -import { StoreInCache } from "../../request/StoreInCache.js"; - -export interface ICacheManager { - /** - * fetch the account entity from the platform cache - * @param accountKey - */ - getAccount(accountKey: string, correlationId: string): AccountEntity | null; - - /** - * set account entity in the platform cache - * @param account - */ - setAccount(account: AccountEntity, correlationId: string): void; - - /** - * Returns true if the given key matches our account key schema. Also matches homeAccountId and/or tenantId if provided - * @param key - * @param homeAccountId - * @param tenantId - * @returns - */ - isAccountKey( - key: string, - homeAccountId?: string, - tenantId?: string - ): boolean; - - /** - * fetch the idToken entity from the platform cache - * @param idTokenKey - */ - getIdTokenCredential( - idTokenKey: string, - correlationId: string - ): IdTokenEntity | null; - - /** - * set idToken entity to the platform cache - * @param idToken - */ - setIdTokenCredential(idToken: IdTokenEntity, correlationId: string): void; - - /** - * fetch the idToken entity from the platform cache - * @param accessTokenKey - */ - getAccessTokenCredential( - accessTokenKey: string, - correlationId: string - ): AccessTokenEntity | null; - - /** - * set idToken entity to the platform cache - * @param accessToken - */ - setAccessTokenCredential( - accessToken: AccessTokenEntity, - correlationId: string - ): void; - - /** - * fetch the idToken entity from the platform cache - * @param refreshTokenKey - */ - getRefreshTokenCredential( - refreshTokenKey: string, - correlationId: string - ): RefreshTokenEntity | null; - - /** - * set idToken entity to the platform cache - * @param refreshToken - */ - setRefreshTokenCredential( - refreshToken: RefreshTokenEntity, - correlationId: string - ): void; - - /** - * fetch appMetadata entity from the platform cache - * @param appMetadataKey - */ - getAppMetadata(appMetadataKey: string): AppMetadataEntity | null; - - /** - * set appMetadata entity to the platform cache - * @param appMetadata - */ - setAppMetadata(appMetadata: AppMetadataEntity, correlationId: string): void; - - /** - * fetch server telemetry entity from the platform cache - * @param serverTelemetryKey - */ - getServerTelemetry( - serverTelemetryKey: string - ): ServerTelemetryEntity | null; - - /** - * set server telemetry entity to the platform cache - * @param serverTelemetryKey - * @param serverTelemetry - */ - setServerTelemetry( - serverTelemetryKey: string, - serverTelemetry: ServerTelemetryEntity, - correlationId: string - ): void; - - /** - * fetch cloud discovery metadata entity from the platform cache - * @param key - */ - getAuthorityMetadata(key: string): AuthorityMetadataEntity | null; - - /** - * Get cache keys for authority metadata - */ - getAuthorityMetadataKeys(): Array; - - /** - * set cloud discovery metadata entity to the platform cache - * @param key - * @param value - */ - setAuthorityMetadata(key: string, value: AuthorityMetadataEntity): void; - - /** - * Provide an alias to find a matching AuthorityMetadataEntity in cache - * @param host - */ - getAuthorityMetadataByAlias(host: string): AuthorityMetadataEntity | null; - - /** - * given an authority generates the cache key for authorityMetadata - * @param authority - */ - generateAuthorityMetadataCacheKey(authority: string): string; - - /** - * fetch throttling entity from the platform cache - * @param throttlingCacheKey - */ - getThrottlingCache(throttlingCacheKey: string): ThrottlingEntity | null; - - /** - * set throttling entity to the platform cache - * @param throttlingCacheKey - * @param throttlingCache - */ - setThrottlingCache( - throttlingCacheKey: string, - throttlingCache: ThrottlingEntity, - correlationId: string - ): void; - - /** - * Returns all accounts in cache - */ - getAllAccounts(correlationId: string): AccountInfo[]; - - /** - * saves a cache record - * @param cacheRecord - */ - saveCacheRecord( - cacheRecord: CacheRecord, - correlationId: string, - storeInCache?: StoreInCache - ): Promise; - - /** - * retrieve accounts matching all provided filters; if no filter is set, get all accounts - * @param homeAccountId - * @param environment - * @param realm - */ - getAccountsFilteredBy( - filter: AccountFilter, - correlationId: string - ): AccountEntity[]; - - /** - * Get AccountInfo object based on provided filters - * @param filter - */ - getAccountInfoFilteredBy( - filter: AccountFilter, - correlationId: string - ): AccountInfo | null; - - /** - * Removes all accounts and related tokens from cache. - */ - removeAllAccounts(correlationId: string): Promise; - - /** - * returns a boolean if the given account is removed - * @param account - */ - removeAccount(accountKey: string, correlationId: string): Promise; - - /** - * returns a boolean if the given account is removed - * @param account - */ - removeAccountContext( - account: AccountEntity, - correlationId: string - ): Promise; - - /** - * @param key - */ - removeIdToken(key: string, correlationId: string): void; - - /** - * @param key - */ - removeAccessToken(key: string, correlationId: string): void; - - /** - * @param key - */ - removeRefreshToken(key: string, correlationId: string): void; -} diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/src/cache/interface/ICachePlugin.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/src/cache/interface/ICachePlugin.ts deleted file mode 100644 index 6e03c7d..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/src/cache/interface/ICachePlugin.ts +++ /dev/null @@ -1,11 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import { TokenCacheContext } from "../persistence/TokenCacheContext.js"; - -export interface ICachePlugin { - beforeCacheAccess: (tokenCacheContext: TokenCacheContext) => Promise; - afterCacheAccess: (tokenCacheContext: TokenCacheContext) => Promise; -} diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/src/cache/interface/ISerializableTokenCache.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/src/cache/interface/ISerializableTokenCache.ts deleted file mode 100644 index 2780a4c..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/src/cache/interface/ISerializableTokenCache.ts +++ /dev/null @@ -1,9 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -export interface ISerializableTokenCache { - deserialize: (cache: string) => void; - serialize: () => string; -} diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/src/cache/persistence/TokenCacheContext.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/src/cache/persistence/TokenCacheContext.ts deleted file mode 100644 index 860fd1f..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/src/cache/persistence/TokenCacheContext.ts +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import { ISerializableTokenCache } from "../interface/ISerializableTokenCache.js"; - -/** - * This class instance helps track the memory changes facilitating - * decisions to read from and write to the persistent cache - */ export class TokenCacheContext { - /** - * boolean indicating cache change - */ - hasChanged: boolean; - /** - * serializable token cache interface - */ - cache: ISerializableTokenCache; - - constructor(tokenCache: ISerializableTokenCache, hasChanged: boolean) { - this.cache = tokenCache; - this.hasChanged = hasChanged; - } - - /** - * boolean which indicates the changes in cache - */ - get cacheHasChanged(): boolean { - return this.hasChanged; - } - - /** - * function to retrieve the token cache - */ - get tokenCache(): ISerializableTokenCache { - return this.cache; - } -} diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/src/cache/utils/CacheHelpers.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/src/cache/utils/CacheHelpers.ts deleted file mode 100644 index 6cf8a78..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/src/cache/utils/CacheHelpers.ts +++ /dev/null @@ -1,463 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import { extractTokenClaims } from "../../account/AuthToken.js"; -import { TokenClaims } from "../../account/TokenClaims.js"; -import { CloudDiscoveryMetadata } from "../../authority/CloudDiscoveryMetadata.js"; -import { OpenIdConfigResponse } from "../../authority/OpenIdConfigResponse.js"; -import { - ClientAuthErrorCodes, - createClientAuthError, -} from "../../error/ClientAuthError.js"; -import { - APP_METADATA, - AUTHORITY_METADATA_CONSTANTS, - AuthenticationScheme, - CredentialType, - SERVER_TELEM_CONSTANTS, - Separators, - ThrottlingConstants, -} from "../../utils/Constants.js"; -import * as TimeUtils from "../../utils/TimeUtils.js"; -import { AccessTokenEntity } from "../entities/AccessTokenEntity.js"; -import { AppMetadataEntity } from "../entities/AppMetadataEntity.js"; -import { AuthorityMetadataEntity } from "../entities/AuthorityMetadataEntity.js"; -import { CredentialEntity } from "../entities/CredentialEntity.js"; -import { IdTokenEntity } from "../entities/IdTokenEntity.js"; -import { RefreshTokenEntity } from "../entities/RefreshTokenEntity.js"; - -/** - * Cache Key: ------- - * IdToken Example: uid.utid-login.microsoftonline.com-idtoken-app_client_id-contoso.com - * AccessToken Example: uid.utid-login.microsoftonline.com-accesstoken-app_client_id-contoso.com-scope1 scope2--pop - * RefreshToken Example: uid.utid-login.microsoftonline.com-refreshtoken-1-contoso.com - * @param credentialEntity - * @returns - */ -export function generateCredentialKey( - credentialEntity: CredentialEntity -): string { - const credentialKey = [ - generateAccountId(credentialEntity), - generateCredentialId(credentialEntity), - generateTarget(credentialEntity), - generateClaimsHash(credentialEntity), - generateScheme(credentialEntity), - ]; - - return credentialKey.join(Separators.CACHE_KEY_SEPARATOR).toLowerCase(); -} - -/** - * Create IdTokenEntity - * @param homeAccountId - * @param authenticationResult - * @param clientId - * @param authority - */ -export function createIdTokenEntity( - homeAccountId: string, - environment: string, - idToken: string, - clientId: string, - tenantId: string -): IdTokenEntity { - const idTokenEntity: IdTokenEntity = { - credentialType: CredentialType.ID_TOKEN, - homeAccountId: homeAccountId, - environment: environment, - clientId: clientId, - secret: idToken, - realm: tenantId, - }; - - return idTokenEntity; -} - -/** - * Create AccessTokenEntity - * @param homeAccountId - * @param environment - * @param accessToken - * @param clientId - * @param tenantId - * @param scopes - * @param expiresOn - * @param extExpiresOn - */ -export function createAccessTokenEntity( - homeAccountId: string, - environment: string, - accessToken: string, - clientId: string, - tenantId: string, - scopes: string, - expiresOn: number, - extExpiresOn: number, - base64Decode: (input: string) => string, - refreshOn?: number, - tokenType?: AuthenticationScheme, - userAssertionHash?: string, - keyId?: string, - requestedClaims?: string, - requestedClaimsHash?: string -): AccessTokenEntity { - const atEntity: AccessTokenEntity = { - homeAccountId: homeAccountId, - credentialType: CredentialType.ACCESS_TOKEN, - secret: accessToken, - cachedAt: TimeUtils.nowSeconds().toString(), - expiresOn: expiresOn.toString(), - extendedExpiresOn: extExpiresOn.toString(), - environment: environment, - clientId: clientId, - realm: tenantId, - target: scopes, - tokenType: tokenType || AuthenticationScheme.BEARER, - }; - - if (userAssertionHash) { - atEntity.userAssertionHash = userAssertionHash; - } - - if (refreshOn) { - atEntity.refreshOn = refreshOn.toString(); - } - - if (requestedClaims) { - atEntity.requestedClaims = requestedClaims; - atEntity.requestedClaimsHash = requestedClaimsHash; - } - - /* - * Create Access Token With Auth Scheme instead of regular access token - * Cast to lower to handle "bearer" from ADFS - */ - if ( - atEntity.tokenType?.toLowerCase() !== - AuthenticationScheme.BEARER.toLowerCase() - ) { - atEntity.credentialType = CredentialType.ACCESS_TOKEN_WITH_AUTH_SCHEME; - switch (atEntity.tokenType) { - case AuthenticationScheme.POP: - // Make sure keyId is present and add it to credential - const tokenClaims: TokenClaims | null = extractTokenClaims( - accessToken, - base64Decode - ); - if (!tokenClaims?.cnf?.kid) { - throw createClientAuthError( - ClientAuthErrorCodes.tokenClaimsCnfRequiredForSignedJwt - ); - } - atEntity.keyId = tokenClaims.cnf.kid; - break; - case AuthenticationScheme.SSH: - atEntity.keyId = keyId; - } - } - - return atEntity; -} - -/** - * Create RefreshTokenEntity - * @param homeAccountId - * @param authenticationResult - * @param clientId - * @param authority - */ -export function createRefreshTokenEntity( - homeAccountId: string, - environment: string, - refreshToken: string, - clientId: string, - familyId?: string, - userAssertionHash?: string, - expiresOn?: number -): RefreshTokenEntity { - const rtEntity: RefreshTokenEntity = { - credentialType: CredentialType.REFRESH_TOKEN, - homeAccountId: homeAccountId, - environment: environment, - clientId: clientId, - secret: refreshToken, - }; - - if (userAssertionHash) { - rtEntity.userAssertionHash = userAssertionHash; - } - - if (familyId) { - rtEntity.familyId = familyId; - } - - if (expiresOn) { - rtEntity.expiresOn = expiresOn.toString(); - } - - return rtEntity; -} - -export function isCredentialEntity(entity: object): boolean { - return ( - entity.hasOwnProperty("homeAccountId") && - entity.hasOwnProperty("environment") && - entity.hasOwnProperty("credentialType") && - entity.hasOwnProperty("clientId") && - entity.hasOwnProperty("secret") - ); -} - -/** - * Validates an entity: checks for all expected params - * @param entity - */ -export function isAccessTokenEntity(entity: object): boolean { - if (!entity) { - return false; - } - - return ( - isCredentialEntity(entity) && - entity.hasOwnProperty("realm") && - entity.hasOwnProperty("target") && - (entity["credentialType"] === CredentialType.ACCESS_TOKEN || - entity["credentialType"] === - CredentialType.ACCESS_TOKEN_WITH_AUTH_SCHEME) - ); -} - -/** - * Validates an entity: checks for all expected params - * @param entity - */ -export function isIdTokenEntity(entity: object): boolean { - if (!entity) { - return false; - } - - return ( - isCredentialEntity(entity) && - entity.hasOwnProperty("realm") && - entity["credentialType"] === CredentialType.ID_TOKEN - ); -} - -/** - * Validates an entity: checks for all expected params - * @param entity - */ -export function isRefreshTokenEntity(entity: object): boolean { - if (!entity) { - return false; - } - - return ( - isCredentialEntity(entity) && - entity["credentialType"] === CredentialType.REFRESH_TOKEN - ); -} - -/** - * Generate Account Id key component as per the schema: - - */ -function generateAccountId(credentialEntity: CredentialEntity): string { - const accountId: Array = [ - credentialEntity.homeAccountId, - credentialEntity.environment, - ]; - return accountId.join(Separators.CACHE_KEY_SEPARATOR).toLowerCase(); -} - -/** - * Generate Credential Id key component as per the schema: -- - */ -function generateCredentialId(credentialEntity: CredentialEntity): string { - const clientOrFamilyId = - credentialEntity.credentialType === CredentialType.REFRESH_TOKEN - ? credentialEntity.familyId || credentialEntity.clientId - : credentialEntity.clientId; - const credentialId: Array = [ - credentialEntity.credentialType, - clientOrFamilyId, - credentialEntity.realm || "", - ]; - - return credentialId.join(Separators.CACHE_KEY_SEPARATOR).toLowerCase(); -} - -/** - * Generate target key component as per schema: - */ -function generateTarget(credentialEntity: CredentialEntity): string { - return (credentialEntity.target || "").toLowerCase(); -} - -/** - * Generate requested claims key component as per schema: - */ -function generateClaimsHash(credentialEntity: CredentialEntity): string { - return (credentialEntity.requestedClaimsHash || "").toLowerCase(); -} - -/** - * Generate scheme key componenet as per schema: - */ -function generateScheme(credentialEntity: CredentialEntity): string { - /* - * PoP Tokens and SSH certs include scheme in cache key - * Cast to lowercase to handle "bearer" from ADFS - */ - return credentialEntity.tokenType && - credentialEntity.tokenType.toLowerCase() !== - AuthenticationScheme.BEARER.toLowerCase() - ? credentialEntity.tokenType.toLowerCase() - : ""; -} - -/** - * validates if a given cache entry is "Telemetry", parses - * @param key - * @param entity - */ -export function isServerTelemetryEntity(key: string, entity?: object): boolean { - const validateKey: boolean = - key.indexOf(SERVER_TELEM_CONSTANTS.CACHE_KEY) === 0; - let validateEntity: boolean = true; - - if (entity) { - validateEntity = - entity.hasOwnProperty("failedRequests") && - entity.hasOwnProperty("errors") && - entity.hasOwnProperty("cacheHits"); - } - - return validateKey && validateEntity; -} - -/** - * validates if a given cache entry is "Throttling", parses - * @param key - * @param entity - */ -export function isThrottlingEntity(key: string, entity?: object): boolean { - let validateKey: boolean = false; - if (key) { - validateKey = key.indexOf(ThrottlingConstants.THROTTLING_PREFIX) === 0; - } - - let validateEntity: boolean = true; - if (entity) { - validateEntity = entity.hasOwnProperty("throttleTime"); - } - - return validateKey && validateEntity; -} - -/** - * Generate AppMetadata Cache Key as per the schema: appmetadata-- - */ -export function generateAppMetadataKey({ - environment, - clientId, -}: AppMetadataEntity): string { - const appMetaDataKeyArray: Array = [ - APP_METADATA, - environment, - clientId, - ]; - return appMetaDataKeyArray - .join(Separators.CACHE_KEY_SEPARATOR) - .toLowerCase(); -} - -/* - * Validates an entity: checks for all expected params - * @param entity - */ -export function isAppMetadataEntity(key: string, entity: object): boolean { - if (!entity) { - return false; - } - - return ( - key.indexOf(APP_METADATA) === 0 && - entity.hasOwnProperty("clientId") && - entity.hasOwnProperty("environment") - ); -} - -/** - * Validates an entity: checks for all expected params - * @param entity - */ -export function isAuthorityMetadataEntity( - key: string, - entity: object -): boolean { - if (!entity) { - return false; - } - - return ( - key.indexOf(AUTHORITY_METADATA_CONSTANTS.CACHE_KEY) === 0 && - entity.hasOwnProperty("aliases") && - entity.hasOwnProperty("preferred_cache") && - entity.hasOwnProperty("preferred_network") && - entity.hasOwnProperty("canonical_authority") && - entity.hasOwnProperty("authorization_endpoint") && - entity.hasOwnProperty("token_endpoint") && - entity.hasOwnProperty("issuer") && - entity.hasOwnProperty("aliasesFromNetwork") && - entity.hasOwnProperty("endpointsFromNetwork") && - entity.hasOwnProperty("expiresAt") && - entity.hasOwnProperty("jwks_uri") - ); -} - -/** - * Reset the exiresAt value - */ -export function generateAuthorityMetadataExpiresAt(): number { - return ( - TimeUtils.nowSeconds() + - AUTHORITY_METADATA_CONSTANTS.REFRESH_TIME_SECONDS - ); -} - -export function updateAuthorityEndpointMetadata( - authorityMetadata: AuthorityMetadataEntity, - updatedValues: OpenIdConfigResponse, - fromNetwork: boolean -): void { - authorityMetadata.authorization_endpoint = - updatedValues.authorization_endpoint; - authorityMetadata.token_endpoint = updatedValues.token_endpoint; - authorityMetadata.end_session_endpoint = updatedValues.end_session_endpoint; - authorityMetadata.issuer = updatedValues.issuer; - authorityMetadata.endpointsFromNetwork = fromNetwork; - authorityMetadata.jwks_uri = updatedValues.jwks_uri; -} - -export function updateCloudDiscoveryMetadata( - authorityMetadata: AuthorityMetadataEntity, - updatedValues: CloudDiscoveryMetadata, - fromNetwork: boolean -): void { - authorityMetadata.aliases = updatedValues.aliases; - authorityMetadata.preferred_cache = updatedValues.preferred_cache; - authorityMetadata.preferred_network = updatedValues.preferred_network; - authorityMetadata.aliasesFromNetwork = fromNetwork; -} - -/** - * Returns whether or not the data needs to be refreshed - */ -export function isAuthorityMetadataExpired( - metadata: AuthorityMetadataEntity -): boolean { - return metadata.expiresAt <= TimeUtils.nowSeconds(); -} diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/src/cache/utils/CacheTypes.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/src/cache/utils/CacheTypes.ts deleted file mode 100644 index 43cbe7a..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/src/cache/utils/CacheTypes.ts +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import { AccountEntity } from "../entities/AccountEntity.js"; -import { IdTokenEntity } from "../entities/IdTokenEntity.js"; -import { AccessTokenEntity } from "../entities/AccessTokenEntity.js"; -import { RefreshTokenEntity } from "../entities/RefreshTokenEntity.js"; -import { AppMetadataEntity } from "../entities/AppMetadataEntity.js"; -import { ServerTelemetryEntity } from "../entities/ServerTelemetryEntity.js"; -import { ThrottlingEntity } from "../entities/ThrottlingEntity.js"; -import { AuthorityMetadataEntity } from "../entities/AuthorityMetadataEntity.js"; -import { AuthenticationScheme } from "../../utils/Constants.js"; -import { ScopeSet } from "../../request/ScopeSet.js"; -import { AccountInfo } from "../../account/AccountInfo.js"; - -/** @internal */ -export type AccountCache = Record; -/** @internal */ -export type IdTokenCache = Record; -/** @internal */ -export type AccessTokenCache = Record; -/** @internal */ -export type RefreshTokenCache = Record; -/** @internal */ -export type AppMetadataCache = Record; - -/** - * Object type of all accepted cache types - * @internal - */ -export type ValidCacheType = - | AccountEntity - | IdTokenEntity - | AccessTokenEntity - | RefreshTokenEntity - | AppMetadataEntity - | AuthorityMetadataEntity - | ServerTelemetryEntity - | ThrottlingEntity - | string; - -/** - * Object type of all credential types - * @internal - */ -export type ValidCredentialType = - | IdTokenEntity - | AccessTokenEntity - | RefreshTokenEntity; - -/** - * Account: -- - */ -export type AccountFilter = Omit< - Partial, - "idToken" | "idTokenClaims" -> & { - realm?: string; - loginHint?: string; - sid?: string; - isHomeTenant?: boolean; -}; - -export type TenantProfileFilter = Pick< - AccountFilter, - | "localAccountId" - | "loginHint" - | "name" - | "sid" - | "isHomeTenant" - | "username" ->; - -/** - * Credential: ------ - */ -export type CredentialFilter = { - homeAccountId?: string; - environment?: string; - credentialType?: string; - clientId?: string; - familyId?: string; - realm?: string; - target?: ScopeSet; - userAssertionHash?: string; - tokenType?: AuthenticationScheme; - keyId?: string; - requestedClaimsHash?: string; -}; - -/** - * AppMetadata: appmetadata-- - */ -export type AppMetadataFilter = { - environment?: string; - clientId?: string; -}; - -export type TokenKeys = { - idToken: string[]; - accessToken: string[]; - refreshToken: string[]; -}; diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/src/client/AuthorizationCodeClient.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/src/client/AuthorizationCodeClient.ts deleted file mode 100644 index bf70623..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/src/client/AuthorizationCodeClient.ts +++ /dev/null @@ -1,799 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import { BaseClient } from "./BaseClient.js"; -import { CommonAuthorizationUrlRequest } from "../request/CommonAuthorizationUrlRequest.js"; -import { CommonAuthorizationCodeRequest } from "../request/CommonAuthorizationCodeRequest.js"; -import { Authority } from "../authority/Authority.js"; -import { RequestParameterBuilder } from "../request/RequestParameterBuilder.js"; -import { - GrantType, - AuthenticationScheme, - PromptValue, - Separators, - HeaderNames, -} from "../utils/Constants.js"; -import * as AADServerParamKeys from "../constants/AADServerParamKeys.js"; -import { - ClientConfiguration, - isOidcProtocolMode, -} from "../config/ClientConfiguration.js"; -import { ServerAuthorizationTokenResponse } from "../response/ServerAuthorizationTokenResponse.js"; -import { NetworkResponse } from "../network/NetworkResponse.js"; -import { ResponseHandler } from "../response/ResponseHandler.js"; -import { AuthenticationResult } from "../response/AuthenticationResult.js"; -import { StringUtils } from "../utils/StringUtils.js"; -import { - ClientAuthErrorCodes, - createClientAuthError, -} from "../error/ClientAuthError.js"; -import { UrlString } from "../url/UrlString.js"; -import { ServerAuthorizationCodeResponse } from "../response/ServerAuthorizationCodeResponse.js"; -import { CommonEndSessionRequest } from "../request/CommonEndSessionRequest.js"; -import { PopTokenGenerator } from "../crypto/PopTokenGenerator.js"; -import { RequestThumbprint } from "../network/RequestThumbprint.js"; -import { AuthorizationCodePayload } from "../response/AuthorizationCodePayload.js"; -import * as TimeUtils from "../utils/TimeUtils.js"; -import { AccountInfo } from "../account/AccountInfo.js"; -import { - buildClientInfoFromHomeAccountId, - buildClientInfo, -} from "../account/ClientInfo.js"; -import { CcsCredentialType, CcsCredential } from "../account/CcsCredential.js"; -import { - createClientConfigurationError, - ClientConfigurationErrorCodes, -} from "../error/ClientConfigurationError.js"; -import { RequestValidator } from "../request/RequestValidator.js"; -import { IPerformanceClient } from "../telemetry/performance/IPerformanceClient.js"; -import { PerformanceEvents } from "../telemetry/performance/PerformanceEvent.js"; -import { invokeAsync } from "../utils/FunctionWrappers.js"; -import { ClientAssertion } from "../account/ClientCredentials.js"; -import { getClientAssertion } from "../utils/ClientAssertionUtils.js"; - -/** - * Oauth2.0 Authorization Code client - * @internal - */ -export class AuthorizationCodeClient extends BaseClient { - // Flag to indicate if client is for hybrid spa auth code redemption - protected includeRedirectUri: boolean = true; - private oidcDefaultScopes; - - constructor( - configuration: ClientConfiguration, - performanceClient?: IPerformanceClient - ) { - super(configuration, performanceClient); - this.oidcDefaultScopes = - this.config.authOptions.authority.options.OIDCOptions?.defaultScopes; - } - - /** - * Creates the URL of the authorization request letting the user input credentials and consent to the - * application. The URL target the /authorize endpoint of the authority configured in the - * application object. - * - * Once the user inputs their credentials and consents, the authority will send a response to the redirect URI - * sent in the request and should contain an authorization code, which can then be used to acquire tokens via - * acquireToken(AuthorizationCodeRequest) - * @param request - */ - async getAuthCodeUrl( - request: CommonAuthorizationUrlRequest - ): Promise { - this.performanceClient?.addQueueMeasurement( - PerformanceEvents.GetAuthCodeUrl, - request.correlationId - ); - - const queryString = await invokeAsync( - this.createAuthCodeUrlQueryString.bind(this), - PerformanceEvents.AuthClientCreateQueryString, - this.logger, - this.performanceClient, - request.correlationId - )(request); - - return UrlString.appendQueryString( - this.authority.authorizationEndpoint, - queryString - ); - } - - /** - * API to acquire a token in exchange of 'authorization_code` acquired by the user in the first leg of the - * authorization_code_grant - * @param request - */ - async acquireToken( - request: CommonAuthorizationCodeRequest, - authCodePayload?: AuthorizationCodePayload - ): Promise { - this.performanceClient?.addQueueMeasurement( - PerformanceEvents.AuthClientAcquireToken, - request.correlationId - ); - - if (!request.code) { - throw createClientAuthError( - ClientAuthErrorCodes.requestCannotBeMade - ); - } - - const reqTimestamp = TimeUtils.nowSeconds(); - const response = await invokeAsync( - this.executeTokenRequest.bind(this), - PerformanceEvents.AuthClientExecuteTokenRequest, - this.logger, - this.performanceClient, - request.correlationId - )(this.authority, request); - - // Retrieve requestId from response headers - const requestId = response.headers?.[HeaderNames.X_MS_REQUEST_ID]; - - const responseHandler = new ResponseHandler( - this.config.authOptions.clientId, - this.cacheManager, - this.cryptoUtils, - this.logger, - this.config.serializableCache, - this.config.persistencePlugin, - this.performanceClient - ); - - // Validate response. This function throws a server error if an error is returned by the server. - responseHandler.validateTokenResponse(response.body); - - return invokeAsync( - responseHandler.handleServerTokenResponse.bind(responseHandler), - PerformanceEvents.HandleServerTokenResponse, - this.logger, - this.performanceClient, - request.correlationId - )( - response.body, - this.authority, - reqTimestamp, - request, - authCodePayload, - undefined, - undefined, - undefined, - requestId - ); - } - - /** - * Handles the hash fragment response from public client code request. Returns a code response used by - * the client to exchange for a token in acquireToken. - * @param hashFragment - */ - handleFragmentResponse( - serverParams: ServerAuthorizationCodeResponse, - cachedState: string - ): AuthorizationCodePayload { - // Handle responses. - const responseHandler = new ResponseHandler( - this.config.authOptions.clientId, - this.cacheManager, - this.cryptoUtils, - this.logger, - null, - null - ); - - // Get code response - responseHandler.validateServerAuthorizationCodeResponse( - serverParams, - cachedState - ); - - // throw when there is no auth code in the response - if (!serverParams.code) { - throw createClientAuthError( - ClientAuthErrorCodes.authorizationCodeMissingFromServerResponse - ); - } - - return serverParams as AuthorizationCodePayload; - } - - /** - * Used to log out the current user, and redirect the user to the postLogoutRedirectUri. - * Default behaviour is to redirect the user to `window.location.href`. - * @param authorityUri - */ - getLogoutUri(logoutRequest: CommonEndSessionRequest): string { - // Throw error if logoutRequest is null/undefined - if (!logoutRequest) { - throw createClientConfigurationError( - ClientConfigurationErrorCodes.logoutRequestEmpty - ); - } - const queryString = this.createLogoutUrlQueryString(logoutRequest); - - // Construct logout URI - return UrlString.appendQueryString( - this.authority.endSessionEndpoint, - queryString - ); - } - - /** - * Executes POST request to token endpoint - * @param authority - * @param request - */ - private async executeTokenRequest( - authority: Authority, - request: CommonAuthorizationCodeRequest - ): Promise> { - this.performanceClient?.addQueueMeasurement( - PerformanceEvents.AuthClientExecuteTokenRequest, - request.correlationId - ); - - const queryParametersString = this.createTokenQueryParameters(request); - const endpoint = UrlString.appendQueryString( - authority.tokenEndpoint, - queryParametersString - ); - - const requestBody = await invokeAsync( - this.createTokenRequestBody.bind(this), - PerformanceEvents.AuthClientCreateTokenRequestBody, - this.logger, - this.performanceClient, - request.correlationId - )(request); - - let ccsCredential: CcsCredential | undefined = undefined; - if (request.clientInfo) { - try { - const clientInfo = buildClientInfo( - request.clientInfo, - this.cryptoUtils.base64Decode - ); - ccsCredential = { - credential: `${clientInfo.uid}${Separators.CLIENT_INFO_SEPARATOR}${clientInfo.utid}`, - type: CcsCredentialType.HOME_ACCOUNT_ID, - }; - } catch (e) { - this.logger.verbose( - "Could not parse client info for CCS Header: " + e - ); - } - } - const headers: Record = this.createTokenRequestHeaders( - ccsCredential || request.ccsCredential - ); - - const thumbprint: RequestThumbprint = { - clientId: - request.tokenBodyParameters?.clientId || - this.config.authOptions.clientId, - authority: authority.canonicalAuthority, - scopes: request.scopes, - claims: request.claims, - authenticationScheme: request.authenticationScheme, - resourceRequestMethod: request.resourceRequestMethod, - resourceRequestUri: request.resourceRequestUri, - shrClaims: request.shrClaims, - sshKid: request.sshKid, - }; - - return invokeAsync( - this.executePostToTokenEndpoint.bind(this), - PerformanceEvents.AuthorizationCodeClientExecutePostToTokenEndpoint, - this.logger, - this.performanceClient, - request.correlationId - )( - endpoint, - requestBody, - headers, - thumbprint, - request.correlationId, - PerformanceEvents.AuthorizationCodeClientExecutePostToTokenEndpoint - ); - } - - /** - * Generates a map for all the params to be sent to the service - * @param request - */ - private async createTokenRequestBody( - request: CommonAuthorizationCodeRequest - ): Promise { - this.performanceClient?.addQueueMeasurement( - PerformanceEvents.AuthClientCreateTokenRequestBody, - request.correlationId - ); - - const parameterBuilder = new RequestParameterBuilder( - request.correlationId, - this.performanceClient - ); - - parameterBuilder.addClientId( - request.embeddedClientId || - request.tokenBodyParameters?.[AADServerParamKeys.CLIENT_ID] || - this.config.authOptions.clientId - ); - - /* - * For hybrid spa flow, there will be a code but no verifier - * In this scenario, don't include redirect uri as auth code will not be bound to redirect URI - */ - if (!this.includeRedirectUri) { - // Just validate - RequestValidator.validateRedirectUri(request.redirectUri); - } else { - // Validate and include redirect uri - parameterBuilder.addRedirectUri(request.redirectUri); - } - - // Add scope array, parameter builder will add default scopes and dedupe - parameterBuilder.addScopes( - request.scopes, - true, - this.oidcDefaultScopes - ); - - // add code: user set, not validated - parameterBuilder.addAuthorizationCode(request.code); - - // Add library metadata - parameterBuilder.addLibraryInfo(this.config.libraryInfo); - parameterBuilder.addApplicationTelemetry( - this.config.telemetry.application - ); - parameterBuilder.addThrottling(); - - if (this.serverTelemetryManager && !isOidcProtocolMode(this.config)) { - parameterBuilder.addServerTelemetry(this.serverTelemetryManager); - } - - // add code_verifier if passed - if (request.codeVerifier) { - parameterBuilder.addCodeVerifier(request.codeVerifier); - } - - if (this.config.clientCredentials.clientSecret) { - parameterBuilder.addClientSecret( - this.config.clientCredentials.clientSecret - ); - } - - if (this.config.clientCredentials.clientAssertion) { - const clientAssertion: ClientAssertion = - this.config.clientCredentials.clientAssertion; - - parameterBuilder.addClientAssertion( - await getClientAssertion( - clientAssertion.assertion, - this.config.authOptions.clientId, - request.resourceRequestUri - ) - ); - parameterBuilder.addClientAssertionType( - clientAssertion.assertionType - ); - } - - parameterBuilder.addGrantType(GrantType.AUTHORIZATION_CODE_GRANT); - parameterBuilder.addClientInfo(); - - if (request.authenticationScheme === AuthenticationScheme.POP) { - const popTokenGenerator = new PopTokenGenerator( - this.cryptoUtils, - this.performanceClient - ); - - let reqCnfData; - if (!request.popKid) { - const generatedReqCnfData = await invokeAsync( - popTokenGenerator.generateCnf.bind(popTokenGenerator), - PerformanceEvents.PopTokenGenerateCnf, - this.logger, - this.performanceClient, - request.correlationId - )(request, this.logger); - reqCnfData = generatedReqCnfData.reqCnfString; - } else { - reqCnfData = this.cryptoUtils.encodeKid(request.popKid); - } - - // SPA PoP requires full Base64Url encoded req_cnf string (unhashed) - parameterBuilder.addPopToken(reqCnfData); - } else if (request.authenticationScheme === AuthenticationScheme.SSH) { - if (request.sshJwk) { - parameterBuilder.addSshJwk(request.sshJwk); - } else { - throw createClientConfigurationError( - ClientConfigurationErrorCodes.missingSshJwk - ); - } - } - - if ( - !StringUtils.isEmptyObj(request.claims) || - (this.config.authOptions.clientCapabilities && - this.config.authOptions.clientCapabilities.length > 0) - ) { - parameterBuilder.addClaims( - request.claims, - this.config.authOptions.clientCapabilities - ); - } - - let ccsCred: CcsCredential | undefined = undefined; - if (request.clientInfo) { - try { - const clientInfo = buildClientInfo( - request.clientInfo, - this.cryptoUtils.base64Decode - ); - ccsCred = { - credential: `${clientInfo.uid}${Separators.CLIENT_INFO_SEPARATOR}${clientInfo.utid}`, - type: CcsCredentialType.HOME_ACCOUNT_ID, - }; - } catch (e) { - this.logger.verbose( - "Could not parse client info for CCS Header: " + e - ); - } - } else { - ccsCred = request.ccsCredential; - } - - // Adds these as parameters in the request instead of headers to prevent CORS preflight request - if (this.config.systemOptions.preventCorsPreflight && ccsCred) { - switch (ccsCred.type) { - case CcsCredentialType.HOME_ACCOUNT_ID: - try { - const clientInfo = buildClientInfoFromHomeAccountId( - ccsCred.credential - ); - parameterBuilder.addCcsOid(clientInfo); - } catch (e) { - this.logger.verbose( - "Could not parse home account ID for CCS Header: " + - e - ); - } - break; - case CcsCredentialType.UPN: - parameterBuilder.addCcsUpn(ccsCred.credential); - break; - } - } - - if (request.embeddedClientId) { - parameterBuilder.addBrokerParameters({ - brokerClientId: this.config.authOptions.clientId, - brokerRedirectUri: this.config.authOptions.redirectUri, - }); - } - - if (request.tokenBodyParameters) { - parameterBuilder.addExtraQueryParameters( - request.tokenBodyParameters - ); - } - - // Add hybrid spa parameters if not already provided - if ( - request.enableSpaAuthorizationCode && - (!request.tokenBodyParameters || - !request.tokenBodyParameters[ - AADServerParamKeys.RETURN_SPA_CODE - ]) - ) { - parameterBuilder.addExtraQueryParameters({ - [AADServerParamKeys.RETURN_SPA_CODE]: "1", - }); - } - - return parameterBuilder.createQueryString(); - } - - /** - * This API validates the `AuthorizationCodeUrlRequest` and creates a URL - * @param request - */ - private async createAuthCodeUrlQueryString( - request: CommonAuthorizationUrlRequest - ): Promise { - // generate the correlationId if not set by the user and add - const correlationId = - request.correlationId || - this.config.cryptoInterface.createNewGuid(); - - this.performanceClient?.addQueueMeasurement( - PerformanceEvents.AuthClientCreateQueryString, - correlationId - ); - - const parameterBuilder = new RequestParameterBuilder( - correlationId, - this.performanceClient - ); - - parameterBuilder.addClientId( - request.embeddedClientId || - request.extraQueryParameters?.[AADServerParamKeys.CLIENT_ID] || - this.config.authOptions.clientId - ); - - const requestScopes = [ - ...(request.scopes || []), - ...(request.extraScopesToConsent || []), - ]; - parameterBuilder.addScopes(requestScopes, true, this.oidcDefaultScopes); - - // validate the redirectUri (to be a non null value) - parameterBuilder.addRedirectUri(request.redirectUri); - - parameterBuilder.addCorrelationId(correlationId); - - // add response_mode. If not passed in it defaults to query. - parameterBuilder.addResponseMode(request.responseMode); - - // add response_type = code - parameterBuilder.addResponseTypeCode(); - - // add library info parameters - parameterBuilder.addLibraryInfo(this.config.libraryInfo); - if (!isOidcProtocolMode(this.config)) { - parameterBuilder.addApplicationTelemetry( - this.config.telemetry.application - ); - } - - // add client_info=1 - parameterBuilder.addClientInfo(); - - if (request.codeChallenge && request.codeChallengeMethod) { - parameterBuilder.addCodeChallengeParams( - request.codeChallenge, - request.codeChallengeMethod - ); - } - - if (request.prompt) { - parameterBuilder.addPrompt(request.prompt); - } - - if (request.domainHint) { - parameterBuilder.addDomainHint(request.domainHint); - } - - // Add sid or loginHint with preference for login_hint claim (in request) -> sid -> loginHint (upn/email) -> username of AccountInfo object - if (request.prompt !== PromptValue.SELECT_ACCOUNT) { - // AAD will throw if prompt=select_account is passed with an account hint - if (request.sid && request.prompt === PromptValue.NONE) { - // SessionID is only used in silent calls - this.logger.verbose( - "createAuthCodeUrlQueryString: Prompt is none, adding sid from request" - ); - parameterBuilder.addSid(request.sid); - } else if (request.account) { - const accountSid = this.extractAccountSid(request.account); - let accountLoginHintClaim = this.extractLoginHint( - request.account - ); - - if (accountLoginHintClaim && request.domainHint) { - this.logger.warning( - `AuthorizationCodeClient.createAuthCodeUrlQueryString: "domainHint" param is set, skipping opaque "login_hint" claim. Please consider not passing domainHint` - ); - accountLoginHintClaim = null; - } - - // If login_hint claim is present, use it over sid/username - if (accountLoginHintClaim) { - this.logger.verbose( - "createAuthCodeUrlQueryString: login_hint claim present on account" - ); - parameterBuilder.addLoginHint(accountLoginHintClaim); - try { - const clientInfo = buildClientInfoFromHomeAccountId( - request.account.homeAccountId - ); - parameterBuilder.addCcsOid(clientInfo); - } catch (e) { - this.logger.verbose( - "createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header" - ); - } - } else if (accountSid && request.prompt === PromptValue.NONE) { - /* - * If account and loginHint are provided, we will check account first for sid before adding loginHint - * SessionId is only used in silent calls - */ - this.logger.verbose( - "createAuthCodeUrlQueryString: Prompt is none, adding sid from account" - ); - parameterBuilder.addSid(accountSid); - try { - const clientInfo = buildClientInfoFromHomeAccountId( - request.account.homeAccountId - ); - parameterBuilder.addCcsOid(clientInfo); - } catch (e) { - this.logger.verbose( - "createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header" - ); - } - } else if (request.loginHint) { - this.logger.verbose( - "createAuthCodeUrlQueryString: Adding login_hint from request" - ); - parameterBuilder.addLoginHint(request.loginHint); - parameterBuilder.addCcsUpn(request.loginHint); - } else if (request.account.username) { - // Fallback to account username if provided - this.logger.verbose( - "createAuthCodeUrlQueryString: Adding login_hint from account" - ); - parameterBuilder.addLoginHint(request.account.username); - try { - const clientInfo = buildClientInfoFromHomeAccountId( - request.account.homeAccountId - ); - parameterBuilder.addCcsOid(clientInfo); - } catch (e) { - this.logger.verbose( - "createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header" - ); - } - } - } else if (request.loginHint) { - this.logger.verbose( - "createAuthCodeUrlQueryString: No account, adding login_hint from request" - ); - parameterBuilder.addLoginHint(request.loginHint); - parameterBuilder.addCcsUpn(request.loginHint); - } - } else { - this.logger.verbose( - "createAuthCodeUrlQueryString: Prompt is select_account, ignoring account hints" - ); - } - - if (request.nonce) { - parameterBuilder.addNonce(request.nonce); - } - - if (request.state) { - parameterBuilder.addState(request.state); - } - - if ( - request.claims || - (this.config.authOptions.clientCapabilities && - this.config.authOptions.clientCapabilities.length > 0) - ) { - parameterBuilder.addClaims( - request.claims, - this.config.authOptions.clientCapabilities - ); - } - - if (request.embeddedClientId) { - parameterBuilder.addBrokerParameters({ - brokerClientId: this.config.authOptions.clientId, - brokerRedirectUri: this.config.authOptions.redirectUri, - }); - } - - this.addExtraQueryParams(request, parameterBuilder); - - if (request.nativeBroker) { - // signal ests that this is a WAM call - parameterBuilder.addNativeBroker(); - - // pass the req_cnf for POP - if (request.authenticationScheme === AuthenticationScheme.POP) { - const popTokenGenerator = new PopTokenGenerator( - this.cryptoUtils - ); - - // req_cnf is always sent as a string for SPAs - let reqCnfData; - if (!request.popKid) { - const generatedReqCnfData = await invokeAsync( - popTokenGenerator.generateCnf.bind(popTokenGenerator), - PerformanceEvents.PopTokenGenerateCnf, - this.logger, - this.performanceClient, - request.correlationId - )(request, this.logger); - reqCnfData = generatedReqCnfData.reqCnfString; - } else { - reqCnfData = this.cryptoUtils.encodeKid(request.popKid); - } - parameterBuilder.addPopToken(reqCnfData); - } - } - - return parameterBuilder.createQueryString(); - } - - /** - * This API validates the `EndSessionRequest` and creates a URL - * @param request - */ - private createLogoutUrlQueryString( - request: CommonEndSessionRequest - ): string { - const parameterBuilder = new RequestParameterBuilder( - request.correlationId, - this.performanceClient - ); - - if (request.postLogoutRedirectUri) { - parameterBuilder.addPostLogoutRedirectUri( - request.postLogoutRedirectUri - ); - } - - if (request.correlationId) { - parameterBuilder.addCorrelationId(request.correlationId); - } - - if (request.idTokenHint) { - parameterBuilder.addIdTokenHint(request.idTokenHint); - } - - if (request.state) { - parameterBuilder.addState(request.state); - } - - if (request.logoutHint) { - parameterBuilder.addLogoutHint(request.logoutHint); - } - - this.addExtraQueryParams(request, parameterBuilder); - - return parameterBuilder.createQueryString(); - } - - private addExtraQueryParams( - request: CommonAuthorizationUrlRequest | CommonEndSessionRequest, - parameterBuilder: RequestParameterBuilder - ) { - const hasRequestInstanceAware = - request.extraQueryParameters && - request.extraQueryParameters.hasOwnProperty("instance_aware"); - - // Set instance_aware flag if config auth param is set - if (!hasRequestInstanceAware && this.config.authOptions.instanceAware) { - request.extraQueryParameters = request.extraQueryParameters || {}; - request.extraQueryParameters["instance_aware"] = "true"; - } - - if (request.extraQueryParameters) { - parameterBuilder.addExtraQueryParameters( - request.extraQueryParameters - ); - } - } - - /** - * Helper to get sid from account. Returns null if idTokenClaims are not present or sid is not present. - * @param account - */ - private extractAccountSid(account: AccountInfo): string | null { - return account.idTokenClaims?.sid || null; - } - - private extractLoginHint(account: AccountInfo): string | null { - return account.idTokenClaims?.login_hint || null; - } -} diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/src/client/BaseClient.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/src/client/BaseClient.ts deleted file mode 100644 index 48080f8..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/src/client/BaseClient.ts +++ /dev/null @@ -1,312 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import { - ClientConfiguration, - buildClientConfiguration, - CommonClientConfiguration, -} from "../config/ClientConfiguration.js"; -import { - INetworkModule, - NetworkRequestOptions, -} from "../network/INetworkModule.js"; -import { NetworkResponse } from "../network/NetworkResponse.js"; -import { ICrypto } from "../crypto/ICrypto.js"; -import { Authority } from "../authority/Authority.js"; -import { Logger } from "../logger/Logger.js"; -import { Constants, HeaderNames } from "../utils/Constants.js"; -import { ServerAuthorizationTokenResponse } from "../response/ServerAuthorizationTokenResponse.js"; -import { CacheManager } from "../cache/CacheManager.js"; -import { ServerTelemetryManager } from "../telemetry/server/ServerTelemetryManager.js"; -import { RequestThumbprint } from "../network/RequestThumbprint.js"; -import { version, name } from "../packageMetadata.js"; -import { CcsCredential, CcsCredentialType } from "../account/CcsCredential.js"; -import { buildClientInfoFromHomeAccountId } from "../account/ClientInfo.js"; -import { IPerformanceClient } from "../telemetry/performance/IPerformanceClient.js"; -import { RequestParameterBuilder } from "../request/RequestParameterBuilder.js"; -import { BaseAuthRequest } from "../request/BaseAuthRequest.js"; -import { createDiscoveredInstance } from "../authority/AuthorityFactory.js"; -import { PerformanceEvents } from "../telemetry/performance/PerformanceEvent.js"; -import { ThrottlingUtils } from "../network/ThrottlingUtils.js"; -import { AuthError } from "../error/AuthError.js"; -import { - ClientAuthErrorCodes, - createClientAuthError, -} from "../error/ClientAuthError.js"; -import { NetworkError } from "../error/NetworkError.js"; -import { invokeAsync } from "../utils/FunctionWrappers.js"; - -/** - * Base application class which will construct requests to send to and handle responses from the Microsoft STS using the authorization code flow. - * @internal - */ -export abstract class BaseClient { - // Logger object - public logger: Logger; - - // Application config - protected config: CommonClientConfiguration; - - // Crypto Interface - protected cryptoUtils: ICrypto; - - // Storage Interface - protected cacheManager: CacheManager; - - // Network Interface - protected networkClient: INetworkModule; - - // Server Telemetry Manager - protected serverTelemetryManager: ServerTelemetryManager | null; - - // Default authority object - public authority: Authority; - - // Performance telemetry client - protected performanceClient?: IPerformanceClient; - - protected constructor( - configuration: ClientConfiguration, - performanceClient?: IPerformanceClient - ) { - // Set the configuration - this.config = buildClientConfiguration(configuration); - - // Initialize the logger - this.logger = new Logger(this.config.loggerOptions, name, version); - - // Initialize crypto - this.cryptoUtils = this.config.cryptoInterface; - - // Initialize storage interface - this.cacheManager = this.config.storageInterface; - - // Set the network interface - this.networkClient = this.config.networkInterface; - - // Set TelemetryManager - this.serverTelemetryManager = this.config.serverTelemetryManager; - - // set Authority - this.authority = this.config.authOptions.authority; - - // set performance telemetry client - this.performanceClient = performanceClient; - } - - /** - * Creates default headers for requests to token endpoint - */ - protected createTokenRequestHeaders( - ccsCred?: CcsCredential - ): Record { - const headers: Record = {}; - headers[HeaderNames.CONTENT_TYPE] = Constants.URL_FORM_CONTENT_TYPE; - if (!this.config.systemOptions.preventCorsPreflight && ccsCred) { - switch (ccsCred.type) { - case CcsCredentialType.HOME_ACCOUNT_ID: - try { - const clientInfo = buildClientInfoFromHomeAccountId( - ccsCred.credential - ); - headers[ - HeaderNames.CCS_HEADER - ] = `Oid:${clientInfo.uid}@${clientInfo.utid}`; - } catch (e) { - this.logger.verbose( - "Could not parse home account ID for CCS Header: " + - e - ); - } - break; - case CcsCredentialType.UPN: - headers[ - HeaderNames.CCS_HEADER - ] = `UPN: ${ccsCred.credential}`; - break; - } - } - return headers; - } - - /** - * Http post to token endpoint - * @param tokenEndpoint - * @param queryString - * @param headers - * @param thumbprint - */ - protected async executePostToTokenEndpoint( - tokenEndpoint: string, - queryString: string, - headers: Record, - thumbprint: RequestThumbprint, - correlationId: string, - queuedEvent?: string - ): Promise> { - if (queuedEvent) { - this.performanceClient?.addQueueMeasurement( - queuedEvent, - correlationId - ); - } - - const response = - await this.sendPostRequest( - thumbprint, - tokenEndpoint, - { body: queryString, headers: headers }, - correlationId - ); - - if ( - this.config.serverTelemetryManager && - response.status < 500 && - response.status !== 429 - ) { - // Telemetry data successfully logged by server, clear Telemetry cache - this.config.serverTelemetryManager.clearTelemetryCache(); - } - - return response; - } - - /** - * Wraps sendPostRequestAsync with necessary preflight and postflight logic - * @param thumbprint - Request thumbprint for throttling - * @param tokenEndpoint - Endpoint to make the POST to - * @param options - Body and Headers to include on the POST request - * @param correlationId - CorrelationId for telemetry - */ - async sendPostRequest( - thumbprint: RequestThumbprint, - tokenEndpoint: string, - options: NetworkRequestOptions, - correlationId: string - ): Promise> { - ThrottlingUtils.preProcess( - this.cacheManager, - thumbprint, - correlationId - ); - - let response; - try { - response = await invokeAsync( - this.networkClient.sendPostRequestAsync.bind( - this.networkClient - ), - PerformanceEvents.NetworkClientSendPostRequestAsync, - this.logger, - this.performanceClient, - correlationId - )(tokenEndpoint, options); - const responseHeaders = response.headers || {}; - this.performanceClient?.addFields( - { - refreshTokenSize: response.body.refresh_token?.length || 0, - httpVerToken: - responseHeaders[HeaderNames.X_MS_HTTP_VERSION] || "", - requestId: - responseHeaders[HeaderNames.X_MS_REQUEST_ID] || "", - }, - correlationId - ); - } catch (e) { - if (e instanceof NetworkError) { - const responseHeaders = e.responseHeaders; - if (responseHeaders) { - this.performanceClient?.addFields( - { - httpVerToken: - responseHeaders[ - HeaderNames.X_MS_HTTP_VERSION - ] || "", - requestId: - responseHeaders[HeaderNames.X_MS_REQUEST_ID] || - "", - contentTypeHeader: - responseHeaders[HeaderNames.CONTENT_TYPE] || - undefined, - contentLengthHeader: - responseHeaders[HeaderNames.CONTENT_LENGTH] || - undefined, - httpStatus: e.httpStatus, - }, - correlationId - ); - } - throw e.error; - } - if (e instanceof AuthError) { - throw e; - } else { - throw createClientAuthError(ClientAuthErrorCodes.networkError); - } - } - - ThrottlingUtils.postProcess( - this.cacheManager, - thumbprint, - response, - correlationId - ); - - return response; - } - - /** - * Updates the authority object of the client. Endpoint discovery must be completed. - * @param updatedAuthority - */ - async updateAuthority( - cloudInstanceHostname: string, - correlationId: string - ): Promise { - this.performanceClient?.addQueueMeasurement( - PerformanceEvents.UpdateTokenEndpointAuthority, - correlationId - ); - const cloudInstanceAuthorityUri = `https://${cloudInstanceHostname}/${this.authority.tenant}/`; - const cloudInstanceAuthority = await createDiscoveredInstance( - cloudInstanceAuthorityUri, - this.networkClient, - this.cacheManager, - this.authority.options, - this.logger, - correlationId, - this.performanceClient - ); - this.authority = cloudInstanceAuthority; - } - - /** - * Creates query string for the /token request - * @param request - */ - createTokenQueryParameters(request: BaseAuthRequest): string { - const parameterBuilder = new RequestParameterBuilder( - request.correlationId, - this.performanceClient - ); - - if (request.embeddedClientId) { - parameterBuilder.addBrokerParameters({ - brokerClientId: this.config.authOptions.clientId, - brokerRedirectUri: this.config.authOptions.redirectUri, - }); - } - - if (request.tokenQueryParameters) { - parameterBuilder.addExtraQueryParameters( - request.tokenQueryParameters - ); - } - - parameterBuilder.addCorrelationId(request.correlationId); - - return parameterBuilder.createQueryString(); - } -} diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/src/client/RefreshTokenClient.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/src/client/RefreshTokenClient.ts deleted file mode 100644 index 95a659c..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/src/client/RefreshTokenClient.ts +++ /dev/null @@ -1,495 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import { - ClientConfiguration, - isOidcProtocolMode, -} from "../config/ClientConfiguration.js"; -import { BaseClient } from "./BaseClient.js"; -import { CommonRefreshTokenRequest } from "../request/CommonRefreshTokenRequest.js"; -import { Authority } from "../authority/Authority.js"; -import { ServerAuthorizationTokenResponse } from "../response/ServerAuthorizationTokenResponse.js"; -import { RequestParameterBuilder } from "../request/RequestParameterBuilder.js"; -import { - GrantType, - AuthenticationScheme, - Errors, - HeaderNames, -} from "../utils/Constants.js"; -import * as AADServerParamKeys from "../constants/AADServerParamKeys.js"; -import { ResponseHandler } from "../response/ResponseHandler.js"; -import { AuthenticationResult } from "../response/AuthenticationResult.js"; -import { PopTokenGenerator } from "../crypto/PopTokenGenerator.js"; -import { StringUtils } from "../utils/StringUtils.js"; -import { RequestThumbprint } from "../network/RequestThumbprint.js"; -import { NetworkResponse } from "../network/NetworkResponse.js"; -import { CommonSilentFlowRequest } from "../request/CommonSilentFlowRequest.js"; -import { - createClientConfigurationError, - ClientConfigurationErrorCodes, -} from "../error/ClientConfigurationError.js"; -import { - createClientAuthError, - ClientAuthErrorCodes, -} from "../error/ClientAuthError.js"; -import { ServerError } from "../error/ServerError.js"; -import * as TimeUtils from "../utils/TimeUtils.js"; -import { UrlString } from "../url/UrlString.js"; -import { CcsCredentialType } from "../account/CcsCredential.js"; -import { buildClientInfoFromHomeAccountId } from "../account/ClientInfo.js"; -import { - InteractionRequiredAuthError, - InteractionRequiredAuthErrorCodes, - createInteractionRequiredAuthError, -} from "../error/InteractionRequiredAuthError.js"; -import { PerformanceEvents } from "../telemetry/performance/PerformanceEvent.js"; -import { IPerformanceClient } from "../telemetry/performance/IPerformanceClient.js"; -import { invoke, invokeAsync } from "../utils/FunctionWrappers.js"; -import { generateCredentialKey } from "../cache/utils/CacheHelpers.js"; -import { ClientAssertion } from "../account/ClientCredentials.js"; -import { getClientAssertion } from "../utils/ClientAssertionUtils.js"; - -const DEFAULT_REFRESH_TOKEN_EXPIRATION_OFFSET_SECONDS = 300; // 5 Minutes - -/** - * OAuth2.0 refresh token client - * @internal - */ -export class RefreshTokenClient extends BaseClient { - constructor( - configuration: ClientConfiguration, - performanceClient?: IPerformanceClient - ) { - super(configuration, performanceClient); - } - public async acquireToken( - request: CommonRefreshTokenRequest - ): Promise { - this.performanceClient?.addQueueMeasurement( - PerformanceEvents.RefreshTokenClientAcquireToken, - request.correlationId - ); - - const reqTimestamp = TimeUtils.nowSeconds(); - const response = await invokeAsync( - this.executeTokenRequest.bind(this), - PerformanceEvents.RefreshTokenClientExecuteTokenRequest, - this.logger, - this.performanceClient, - request.correlationId - )(request, this.authority); - - // Retrieve requestId from response headers - const requestId = response.headers?.[HeaderNames.X_MS_REQUEST_ID]; - const responseHandler = new ResponseHandler( - this.config.authOptions.clientId, - this.cacheManager, - this.cryptoUtils, - this.logger, - this.config.serializableCache, - this.config.persistencePlugin - ); - responseHandler.validateTokenResponse(response.body); - - return invokeAsync( - responseHandler.handleServerTokenResponse.bind(responseHandler), - PerformanceEvents.HandleServerTokenResponse, - this.logger, - this.performanceClient, - request.correlationId - )( - response.body, - this.authority, - reqTimestamp, - request, - undefined, - undefined, - true, - request.forceCache, - requestId - ); - } - - /** - * Gets cached refresh token and attaches to request, then calls acquireToken API - * @param request - */ - public async acquireTokenByRefreshToken( - request: CommonSilentFlowRequest - ): Promise { - // Cannot renew token if no request object is given. - if (!request) { - throw createClientConfigurationError( - ClientConfigurationErrorCodes.tokenRequestEmpty - ); - } - - this.performanceClient?.addQueueMeasurement( - PerformanceEvents.RefreshTokenClientAcquireTokenByRefreshToken, - request.correlationId - ); - - // We currently do not support silent flow for account === null use cases; This will be revisited for confidential flow usecases - if (!request.account) { - throw createClientAuthError( - ClientAuthErrorCodes.noAccountInSilentRequest - ); - } - - // try checking if FOCI is enabled for the given application - const isFOCI = this.cacheManager.isAppMetadataFOCI( - request.account.environment - ); - - // if the app is part of the family, retrive a Family refresh token if present and make a refreshTokenRequest - if (isFOCI) { - try { - return await invokeAsync( - this.acquireTokenWithCachedRefreshToken.bind(this), - PerformanceEvents.RefreshTokenClientAcquireTokenWithCachedRefreshToken, - this.logger, - this.performanceClient, - request.correlationId - )(request, true); - } catch (e) { - const noFamilyRTInCache = - e instanceof InteractionRequiredAuthError && - e.errorCode === - InteractionRequiredAuthErrorCodes.noTokensFound; - const clientMismatchErrorWithFamilyRT = - e instanceof ServerError && - e.errorCode === Errors.INVALID_GRANT_ERROR && - e.subError === Errors.CLIENT_MISMATCH_ERROR; - - // if family Refresh Token (FRT) cache acquisition fails or if client_mismatch error is seen with FRT, reattempt with application Refresh Token (ART) - if (noFamilyRTInCache || clientMismatchErrorWithFamilyRT) { - return invokeAsync( - this.acquireTokenWithCachedRefreshToken.bind(this), - PerformanceEvents.RefreshTokenClientAcquireTokenWithCachedRefreshToken, - this.logger, - this.performanceClient, - request.correlationId - )(request, false); - // throw in all other cases - } else { - throw e; - } - } - } - // fall back to application refresh token acquisition - return invokeAsync( - this.acquireTokenWithCachedRefreshToken.bind(this), - PerformanceEvents.RefreshTokenClientAcquireTokenWithCachedRefreshToken, - this.logger, - this.performanceClient, - request.correlationId - )(request, false); - } - - /** - * makes a network call to acquire tokens by exchanging RefreshToken available in userCache; throws if refresh token is not cached - * @param request - */ - private async acquireTokenWithCachedRefreshToken( - request: CommonSilentFlowRequest, - foci: boolean - ) { - this.performanceClient?.addQueueMeasurement( - PerformanceEvents.RefreshTokenClientAcquireTokenWithCachedRefreshToken, - request.correlationId - ); - - // fetches family RT or application RT based on FOCI value - const refreshToken = invoke( - this.cacheManager.getRefreshToken.bind(this.cacheManager), - PerformanceEvents.CacheManagerGetRefreshToken, - this.logger, - this.performanceClient, - request.correlationId - )( - request.account, - foci, - request.correlationId, - undefined, - this.performanceClient - ); - - if (!refreshToken) { - throw createInteractionRequiredAuthError( - InteractionRequiredAuthErrorCodes.noTokensFound - ); - } - - if ( - refreshToken.expiresOn && - TimeUtils.isTokenExpired( - refreshToken.expiresOn, - request.refreshTokenExpirationOffsetSeconds || - DEFAULT_REFRESH_TOKEN_EXPIRATION_OFFSET_SECONDS - ) - ) { - throw createInteractionRequiredAuthError( - InteractionRequiredAuthErrorCodes.refreshTokenExpired - ); - } - // attach cached RT size to the current measurement - - const refreshTokenRequest: CommonRefreshTokenRequest = { - ...request, - refreshToken: refreshToken.secret, - authenticationScheme: - request.authenticationScheme || AuthenticationScheme.BEARER, - ccsCredential: { - credential: request.account.homeAccountId, - type: CcsCredentialType.HOME_ACCOUNT_ID, - }, - }; - - try { - return await invokeAsync( - this.acquireToken.bind(this), - PerformanceEvents.RefreshTokenClientAcquireToken, - this.logger, - this.performanceClient, - request.correlationId - )(refreshTokenRequest); - } catch (e) { - if ( - e instanceof InteractionRequiredAuthError && - e.subError === InteractionRequiredAuthErrorCodes.badToken - ) { - // Remove bad refresh token from cache - this.logger.verbose( - "acquireTokenWithRefreshToken: bad refresh token, removing from cache" - ); - const badRefreshTokenKey = generateCredentialKey(refreshToken); - this.cacheManager.removeRefreshToken( - badRefreshTokenKey, - request.correlationId - ); - } - - throw e; - } - } - - /** - * Constructs the network message and makes a NW call to the underlying secure token service - * @param request - * @param authority - */ - private async executeTokenRequest( - request: CommonRefreshTokenRequest, - authority: Authority - ): Promise> { - this.performanceClient?.addQueueMeasurement( - PerformanceEvents.RefreshTokenClientExecuteTokenRequest, - request.correlationId - ); - - const queryParametersString = this.createTokenQueryParameters(request); - const endpoint = UrlString.appendQueryString( - authority.tokenEndpoint, - queryParametersString - ); - - const requestBody = await invokeAsync( - this.createTokenRequestBody.bind(this), - PerformanceEvents.RefreshTokenClientCreateTokenRequestBody, - this.logger, - this.performanceClient, - request.correlationId - )(request); - const headers: Record = this.createTokenRequestHeaders( - request.ccsCredential - ); - const thumbprint: RequestThumbprint = { - clientId: - request.tokenBodyParameters?.clientId || - this.config.authOptions.clientId, - authority: authority.canonicalAuthority, - scopes: request.scopes, - claims: request.claims, - authenticationScheme: request.authenticationScheme, - resourceRequestMethod: request.resourceRequestMethod, - resourceRequestUri: request.resourceRequestUri, - shrClaims: request.shrClaims, - sshKid: request.sshKid, - }; - - return invokeAsync( - this.executePostToTokenEndpoint.bind(this), - PerformanceEvents.RefreshTokenClientExecutePostToTokenEndpoint, - this.logger, - this.performanceClient, - request.correlationId - )( - endpoint, - requestBody, - headers, - thumbprint, - request.correlationId, - PerformanceEvents.RefreshTokenClientExecutePostToTokenEndpoint - ); - } - - /** - * Helper function to create the token request body - * @param request - */ - private async createTokenRequestBody( - request: CommonRefreshTokenRequest - ): Promise { - this.performanceClient?.addQueueMeasurement( - PerformanceEvents.RefreshTokenClientCreateTokenRequestBody, - request.correlationId - ); - - const correlationId = request.correlationId; - const parameterBuilder = new RequestParameterBuilder( - correlationId, - this.performanceClient - ); - - parameterBuilder.addClientId( - request.embeddedClientId || - request.tokenBodyParameters?.[AADServerParamKeys.CLIENT_ID] || - this.config.authOptions.clientId - ); - - if (request.redirectUri) { - parameterBuilder.addRedirectUri(request.redirectUri); - } - - parameterBuilder.addScopes( - request.scopes, - true, - this.config.authOptions.authority.options.OIDCOptions?.defaultScopes - ); - - parameterBuilder.addGrantType(GrantType.REFRESH_TOKEN_GRANT); - - parameterBuilder.addClientInfo(); - - parameterBuilder.addLibraryInfo(this.config.libraryInfo); - parameterBuilder.addApplicationTelemetry( - this.config.telemetry.application - ); - parameterBuilder.addThrottling(); - - if (this.serverTelemetryManager && !isOidcProtocolMode(this.config)) { - parameterBuilder.addServerTelemetry(this.serverTelemetryManager); - } - - parameterBuilder.addRefreshToken(request.refreshToken); - - if (this.config.clientCredentials.clientSecret) { - parameterBuilder.addClientSecret( - this.config.clientCredentials.clientSecret - ); - } - - if (this.config.clientCredentials.clientAssertion) { - const clientAssertion: ClientAssertion = - this.config.clientCredentials.clientAssertion; - - parameterBuilder.addClientAssertion( - await getClientAssertion( - clientAssertion.assertion, - this.config.authOptions.clientId, - request.resourceRequestUri - ) - ); - parameterBuilder.addClientAssertionType( - clientAssertion.assertionType - ); - } - - if (request.authenticationScheme === AuthenticationScheme.POP) { - const popTokenGenerator = new PopTokenGenerator( - this.cryptoUtils, - this.performanceClient - ); - - let reqCnfData; - if (!request.popKid) { - const generatedReqCnfData = await invokeAsync( - popTokenGenerator.generateCnf.bind(popTokenGenerator), - PerformanceEvents.PopTokenGenerateCnf, - this.logger, - this.performanceClient, - request.correlationId - )(request, this.logger); - - reqCnfData = generatedReqCnfData.reqCnfString; - } else { - reqCnfData = this.cryptoUtils.encodeKid(request.popKid); - } - - // SPA PoP requires full Base64Url encoded req_cnf string (unhashed) - parameterBuilder.addPopToken(reqCnfData); - } else if (request.authenticationScheme === AuthenticationScheme.SSH) { - if (request.sshJwk) { - parameterBuilder.addSshJwk(request.sshJwk); - } else { - throw createClientConfigurationError( - ClientConfigurationErrorCodes.missingSshJwk - ); - } - } - - if ( - !StringUtils.isEmptyObj(request.claims) || - (this.config.authOptions.clientCapabilities && - this.config.authOptions.clientCapabilities.length > 0) - ) { - parameterBuilder.addClaims( - request.claims, - this.config.authOptions.clientCapabilities - ); - } - - if ( - this.config.systemOptions.preventCorsPreflight && - request.ccsCredential - ) { - switch (request.ccsCredential.type) { - case CcsCredentialType.HOME_ACCOUNT_ID: - try { - const clientInfo = buildClientInfoFromHomeAccountId( - request.ccsCredential.credential - ); - parameterBuilder.addCcsOid(clientInfo); - } catch (e) { - this.logger.verbose( - "Could not parse home account ID for CCS Header: " + - e - ); - } - break; - case CcsCredentialType.UPN: - parameterBuilder.addCcsUpn( - request.ccsCredential.credential - ); - break; - } - } - - if (request.embeddedClientId) { - parameterBuilder.addBrokerParameters({ - brokerClientId: this.config.authOptions.clientId, - brokerRedirectUri: this.config.authOptions.redirectUri, - }); - } - - if (request.tokenBodyParameters) { - parameterBuilder.addExtraQueryParameters( - request.tokenBodyParameters - ); - } - - return parameterBuilder.createQueryString(); - } -} diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/src/client/SilentFlowClient.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/src/client/SilentFlowClient.ts deleted file mode 100644 index f43c27c..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/src/client/SilentFlowClient.ts +++ /dev/null @@ -1,268 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import { BaseClient } from "./BaseClient.js"; -import { ClientConfiguration } from "../config/ClientConfiguration.js"; -import { CommonSilentFlowRequest } from "../request/CommonSilentFlowRequest.js"; -import { AuthenticationResult } from "../response/AuthenticationResult.js"; -import * as TimeUtils from "../utils/TimeUtils.js"; -import { RefreshTokenClient } from "./RefreshTokenClient.js"; -import { - ClientAuthError, - ClientAuthErrorCodes, - createClientAuthError, -} from "../error/ClientAuthError.js"; -import { ResponseHandler } from "../response/ResponseHandler.js"; -import { CacheRecord } from "../cache/entities/CacheRecord.js"; -import { CacheOutcome, OIDC_DEFAULT_SCOPES } from "../utils/Constants.js"; -import { IPerformanceClient } from "../telemetry/performance/IPerformanceClient.js"; -import { StringUtils } from "../utils/StringUtils.js"; -import { checkMaxAge, extractTokenClaims } from "../account/AuthToken.js"; -import { TokenClaims } from "../account/TokenClaims.js"; -import { PerformanceEvents } from "../telemetry/performance/PerformanceEvent.js"; -import { invokeAsync } from "../utils/FunctionWrappers.js"; -import { getTenantFromAuthorityString } from "../authority/Authority.js"; - -/** @internal */ -export class SilentFlowClient extends BaseClient { - constructor( - configuration: ClientConfiguration, - performanceClient?: IPerformanceClient - ) { - super(configuration, performanceClient); - } - - /** - * Retrieves a token from cache if it is still valid, or uses the cached refresh token to renew - * the given token and returns the renewed token - * @param request - */ - async acquireToken( - request: CommonSilentFlowRequest - ): Promise { - try { - const [authResponse, cacheOutcome] = await this.acquireCachedToken({ - ...request, - scopes: request.scopes?.length - ? request.scopes - : [...OIDC_DEFAULT_SCOPES], - }); - - // if the token is not expired but must be refreshed; get a new one in the background - if (cacheOutcome === CacheOutcome.PROACTIVELY_REFRESHED) { - this.logger.info( - "SilentFlowClient:acquireCachedToken - Cached access token's refreshOn property has been exceeded'. It's not expired, but must be refreshed." - ); - - // refresh the access token in the background - const refreshTokenClient = new RefreshTokenClient( - this.config, - this.performanceClient - ); - - refreshTokenClient - .acquireTokenByRefreshToken(request) - .catch(() => { - // do nothing, this is running in the background and no action is to be taken upon success or failure - }); - } - - // return the cached token - return authResponse; - } catch (e) { - if ( - e instanceof ClientAuthError && - e.errorCode === ClientAuthErrorCodes.tokenRefreshRequired - ) { - const refreshTokenClient = new RefreshTokenClient( - this.config, - this.performanceClient - ); - return refreshTokenClient.acquireTokenByRefreshToken(request); - } else { - throw e; - } - } - } - - /** - * Retrieves token from cache or throws an error if it must be refreshed. - * @param request - */ - async acquireCachedToken( - request: CommonSilentFlowRequest - ): Promise<[AuthenticationResult, CacheOutcome]> { - this.performanceClient?.addQueueMeasurement( - PerformanceEvents.SilentFlowClientAcquireCachedToken, - request.correlationId - ); - let lastCacheOutcome: CacheOutcome = CacheOutcome.NOT_APPLICABLE; - - if ( - request.forceRefresh || - (!this.config.cacheOptions.claimsBasedCachingEnabled && - !StringUtils.isEmptyObj(request.claims)) - ) { - // Must refresh due to present force_refresh flag. - this.setCacheOutcome( - CacheOutcome.FORCE_REFRESH_OR_CLAIMS, - request.correlationId - ); - throw createClientAuthError( - ClientAuthErrorCodes.tokenRefreshRequired - ); - } - - // We currently do not support silent flow for account === null use cases; This will be revisited for confidential flow usecases - if (!request.account) { - throw createClientAuthError( - ClientAuthErrorCodes.noAccountInSilentRequest - ); - } - - const requestTenantId = - request.account.tenantId || - getTenantFromAuthorityString(request.authority); - const tokenKeys = this.cacheManager.getTokenKeys(); - const cachedAccessToken = this.cacheManager.getAccessToken( - request.account, - request, - tokenKeys, - requestTenantId, - this.performanceClient - ); - - if (!cachedAccessToken) { - // must refresh due to non-existent access_token - this.setCacheOutcome( - CacheOutcome.NO_CACHED_ACCESS_TOKEN, - request.correlationId - ); - throw createClientAuthError( - ClientAuthErrorCodes.tokenRefreshRequired - ); - } else if ( - TimeUtils.wasClockTurnedBack(cachedAccessToken.cachedAt) || - TimeUtils.isTokenExpired( - cachedAccessToken.expiresOn, - this.config.systemOptions.tokenRenewalOffsetSeconds - ) - ) { - // must refresh due to the expires_in value - this.setCacheOutcome( - CacheOutcome.CACHED_ACCESS_TOKEN_EXPIRED, - request.correlationId - ); - throw createClientAuthError( - ClientAuthErrorCodes.tokenRefreshRequired - ); - } else if ( - cachedAccessToken.refreshOn && - TimeUtils.isTokenExpired(cachedAccessToken.refreshOn, 0) - ) { - // must refresh (in the background) due to the refresh_in value - lastCacheOutcome = CacheOutcome.PROACTIVELY_REFRESHED; - - // don't throw ClientAuthError.createRefreshRequiredError(), return cached token instead - } - - const environment = - request.authority || this.authority.getPreferredCache(); - const cacheRecord: CacheRecord = { - account: this.cacheManager.readAccountFromCache( - request.account, - request.correlationId - ), - accessToken: cachedAccessToken, - idToken: this.cacheManager.getIdToken( - request.account, - request.correlationId, - tokenKeys, - requestTenantId, - this.performanceClient - ), - refreshToken: null, - appMetadata: - this.cacheManager.readAppMetadataFromCache(environment), - }; - - this.setCacheOutcome(lastCacheOutcome, request.correlationId); - - if (this.config.serverTelemetryManager) { - this.config.serverTelemetryManager.incrementCacheHits(); - } - - return [ - await invokeAsync( - this.generateResultFromCacheRecord.bind(this), - PerformanceEvents.SilentFlowClientGenerateResultFromCacheRecord, - this.logger, - this.performanceClient, - request.correlationId - )(cacheRecord, request), - lastCacheOutcome, - ]; - } - - private setCacheOutcome( - cacheOutcome: CacheOutcome, - correlationId: string - ): void { - this.serverTelemetryManager?.setCacheOutcome(cacheOutcome); - this.performanceClient?.addFields( - { - cacheOutcome: cacheOutcome, - }, - correlationId - ); - if (cacheOutcome !== CacheOutcome.NOT_APPLICABLE) { - this.logger.info( - `Token refresh is required due to cache outcome: ${cacheOutcome}` - ); - } - } - - /** - * Helper function to build response object from the CacheRecord - * @param cacheRecord - */ - private async generateResultFromCacheRecord( - cacheRecord: CacheRecord, - request: CommonSilentFlowRequest - ): Promise { - this.performanceClient?.addQueueMeasurement( - PerformanceEvents.SilentFlowClientGenerateResultFromCacheRecord, - request.correlationId - ); - let idTokenClaims: TokenClaims | undefined; - if (cacheRecord.idToken) { - idTokenClaims = extractTokenClaims( - cacheRecord.idToken.secret, - this.config.cryptoInterface.base64Decode - ); - } - - // token max_age check - if (request.maxAge || request.maxAge === 0) { - const authTime = idTokenClaims?.auth_time; - if (!authTime) { - throw createClientAuthError( - ClientAuthErrorCodes.authTimeNotFound - ); - } - - checkMaxAge(authTime, request.maxAge); - } - - return ResponseHandler.generateAuthenticationResult( - this.cryptoUtils, - this.authority, - cacheRecord, - true, - request, - idTokenClaims - ); - } -} diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/src/config/AppTokenProvider.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/src/config/AppTokenProvider.ts deleted file mode 100644 index b671db2..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/src/config/AppTokenProvider.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -/** - * Extensibility interface, which allows the app developer to return a token, based on the passed-in parameters, instead of fetching tokens from - * the Identity Provider (AAD). - * Developers need to construct and return an AppTokenProviderResult object back to MSAL. MSAL will cache the token response - * in the same way it would do if the result were comming from AAD. - * This extensibility point is only defined for the client_credential flow, i.e. acquireTokenByClientCredential and - * meant for Azure SDK to enhance Managed Identity support. - */ -export interface IAppTokenProvider { - ( - appTokenProviderParameters: AppTokenProviderParameters - ): Promise; -} - -/** - * Input object for the IAppTokenProvider extensiblity. MSAL will create this object, which can be used - * to help create an AppTokenProviderResult. - * - * - correlationId - the correlation Id associated with the request - * - tenantId - the tenant Id for which the token must be provided - * - scopes - the scopes for which the token must be provided - * - claims - any extra claims that the token must satisfy - */ -export type AppTokenProviderParameters = { - readonly correlationId?: string; - readonly tenantId: string; - readonly scopes: Array; - readonly claims?: string; -}; - -/** - * Output object for IAppTokenProvider extensiblity. - * - * - accessToken - the actual access token, typically in JWT format, that satisfies the request data AppTokenProviderParameters - * - expiresInSeconds - how long the tokens has before expiry, in seconds. Similar to the "expires_in" field in an AAD token response. - * - refreshInSeconds - how long the token has before it should be proactively refreshed. Similar to the "refresh_in" field in an AAD token response. - */ -export type AppTokenProviderResult = { - accessToken: string; - expiresInSeconds: number; - refreshInSeconds?: number; -}; diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/src/config/ClientConfiguration.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/src/config/ClientConfiguration.ts deleted file mode 100644 index e3eecd1..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/src/config/ClientConfiguration.ts +++ /dev/null @@ -1,291 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import { INetworkModule } from "../network/INetworkModule.js"; -import { DEFAULT_CRYPTO_IMPLEMENTATION, ICrypto } from "../crypto/ICrypto.js"; -import { ILoggerCallback, Logger, LogLevel } from "../logger/Logger.js"; -import { - Constants, - DEFAULT_TOKEN_RENEWAL_OFFSET_SEC, -} from "../utils/Constants.js"; -import { version } from "../packageMetadata.js"; -import { Authority } from "../authority/Authority.js"; -import { AzureCloudInstance } from "../authority/AuthorityOptions.js"; -import { CacheManager, DefaultStorageClass } from "../cache/CacheManager.js"; -import { ServerTelemetryManager } from "../telemetry/server/ServerTelemetryManager.js"; -import { ICachePlugin } from "../cache/interface/ICachePlugin.js"; -import { ISerializableTokenCache } from "../cache/interface/ISerializableTokenCache.js"; -import { ClientCredentials } from "../account/ClientCredentials.js"; -import { ProtocolMode } from "../authority/ProtocolMode.js"; -import { - ClientAuthErrorCodes, - createClientAuthError, -} from "../error/ClientAuthError.js"; - -/** - * Use the configuration object to configure MSAL Modules and initialize the base interfaces for MSAL. - * - * This object allows you to configure important elements of MSAL functionality: - * - authOptions - Authentication for application - * - cryptoInterface - Implementation of crypto functions - * - libraryInfo - Library metadata - * - telemetry - Telemetry options and data - * - loggerOptions - Logging for application - * - networkInterface - Network implementation - * - storageInterface - Storage implementation - * - systemOptions - Additional library options - * - clientCredentials - Credentials options for confidential clients - * @internal - */ -export type ClientConfiguration = { - authOptions: AuthOptions; - systemOptions?: SystemOptions; - loggerOptions?: LoggerOptions; - cacheOptions?: CacheOptions; - storageInterface?: CacheManager; - networkInterface?: INetworkModule; - cryptoInterface?: ICrypto; - clientCredentials?: ClientCredentials; - libraryInfo?: LibraryInfo; - telemetry?: TelemetryOptions; - serverTelemetryManager?: ServerTelemetryManager | null; - persistencePlugin?: ICachePlugin | null; - serializableCache?: ISerializableTokenCache | null; -}; - -export type CommonClientConfiguration = { - authOptions: Required; - systemOptions: Required; - loggerOptions: Required; - cacheOptions: Required; - storageInterface: CacheManager; - networkInterface: INetworkModule; - cryptoInterface: Required; - libraryInfo: LibraryInfo; - telemetry: Required; - serverTelemetryManager: ServerTelemetryManager | null; - clientCredentials: ClientCredentials; - persistencePlugin: ICachePlugin | null; - serializableCache: ISerializableTokenCache | null; -}; - -/** - * Use this to configure the auth options in the ClientConfiguration object - * - * - clientId - Client ID of your app registered with our Application registration portal : https://portal.azure.com/#blade/Microsoft_AAD_IAM/ActiveDirectoryMenuBlade/RegisteredAppsPreview in Microsoft Identity Platform - * - authority - You can configure a specific authority, defaults to " " or "https://login.microsoftonline.com/common" - * - knownAuthorities - An array of URIs that are known to be valid. Used in B2C scenarios. - * - cloudDiscoveryMetadata - A string containing the cloud discovery response. Used in AAD scenarios. - * - clientCapabilities - Array of capabilities which will be added to the claims.access_token.xms_cc request property on every network request. - * - protocolMode - Enum that represents the protocol that msal follows. Used for configuring proper endpoints. - * - skipAuthorityMetadataCache - A flag to choose whether to use or not use the local metadata cache during authority initialization. Defaults to false. - * - instanceAware - A flag of whether the STS will send back additional parameters to specify where the tokens should be retrieved from. - * - redirectUri - The redirect URI where authentication responses can be received by your application. It must exactly match one of the redirect URIs registered in the Azure portal. - * @internal - */ -export type AuthOptions = { - clientId: string; - authority: Authority; - redirectUri: string; - clientCapabilities?: Array; - azureCloudOptions?: AzureCloudOptions; - skipAuthorityMetadataCache?: boolean; - instanceAware?: boolean; -}; - -/** - * Use this to configure token renewal info in the Configuration object - * - * - tokenRenewalOffsetSeconds - Sets the window of offset needed to renew the token before expiry - */ -export type SystemOptions = { - tokenRenewalOffsetSeconds?: number; - preventCorsPreflight?: boolean; -}; - -/** - * Use this to configure the logging that MSAL does, by configuring logger options in the Configuration object - * - * - loggerCallback - Callback for logger - * - piiLoggingEnabled - Sets whether pii logging is enabled - * - logLevel - Sets the level at which logging happens - * - correlationId - Sets the correlationId printed by the logger - */ -export type LoggerOptions = { - loggerCallback?: ILoggerCallback; - piiLoggingEnabled?: boolean; - logLevel?: LogLevel; - correlationId?: string; -}; - -/** - * Use this to configure credential cache preferences in the ClientConfiguration object - * - * - claimsBasedCachingEnabled - Sets whether tokens should be cached based on the claims hash. Default is false. - */ -export type CacheOptions = { - claimsBasedCachingEnabled?: boolean; -}; - -/** - * Library-specific options - */ -export type LibraryInfo = { - sku: string; - version: string; - cpu: string; - os: string; -}; - -/** - * AzureCloudInstance specific options - * - * - azureCloudInstance - string enum providing short notation for soverign and public cloud authorities - * - tenant - provision to provide the tenant info - */ -export type AzureCloudOptions = { - azureCloudInstance: AzureCloudInstance; - tenant?: string; -}; - -export type TelemetryOptions = { - application: ApplicationTelemetry; -}; - -/** - * Telemetry information sent on request - * - appName: Unique string name of an application - * - appVersion: Version of the application using MSAL - */ -export type ApplicationTelemetry = { - appName: string; - appVersion: string; -}; - -export const DEFAULT_SYSTEM_OPTIONS: Required = { - tokenRenewalOffsetSeconds: DEFAULT_TOKEN_RENEWAL_OFFSET_SEC, - preventCorsPreflight: false, -}; - -const DEFAULT_LOGGER_IMPLEMENTATION: Required = { - loggerCallback: () => { - // allow users to not set loggerCallback - }, - piiLoggingEnabled: false, - logLevel: LogLevel.Info, - correlationId: Constants.EMPTY_STRING, -}; - -const DEFAULT_CACHE_OPTIONS: Required = { - claimsBasedCachingEnabled: false, -}; - -const DEFAULT_NETWORK_IMPLEMENTATION: INetworkModule = { - async sendGetRequestAsync(): Promise { - throw createClientAuthError(ClientAuthErrorCodes.methodNotImplemented); - }, - async sendPostRequestAsync(): Promise { - throw createClientAuthError(ClientAuthErrorCodes.methodNotImplemented); - }, -}; - -const DEFAULT_LIBRARY_INFO: LibraryInfo = { - sku: Constants.SKU, - version: version, - cpu: Constants.EMPTY_STRING, - os: Constants.EMPTY_STRING, -}; - -const DEFAULT_CLIENT_CREDENTIALS: ClientCredentials = { - clientSecret: Constants.EMPTY_STRING, - clientAssertion: undefined, -}; - -const DEFAULT_AZURE_CLOUD_OPTIONS: AzureCloudOptions = { - azureCloudInstance: AzureCloudInstance.None, - tenant: `${Constants.DEFAULT_COMMON_TENANT}`, -}; - -const DEFAULT_TELEMETRY_OPTIONS: Required = { - application: { - appName: "", - appVersion: "", - }, -}; - -/** - * Function that sets the default options when not explicitly configured from app developer - * - * @param Configuration - * - * @returns Configuration - */ -export function buildClientConfiguration({ - authOptions: userAuthOptions, - systemOptions: userSystemOptions, - loggerOptions: userLoggerOption, - cacheOptions: userCacheOptions, - storageInterface: storageImplementation, - networkInterface: networkImplementation, - cryptoInterface: cryptoImplementation, - clientCredentials: clientCredentials, - libraryInfo: libraryInfo, - telemetry: telemetry, - serverTelemetryManager: serverTelemetryManager, - persistencePlugin: persistencePlugin, - serializableCache: serializableCache, -}: ClientConfiguration): CommonClientConfiguration { - const loggerOptions = { - ...DEFAULT_LOGGER_IMPLEMENTATION, - ...userLoggerOption, - }; - - return { - authOptions: buildAuthOptions(userAuthOptions), - systemOptions: { ...DEFAULT_SYSTEM_OPTIONS, ...userSystemOptions }, - loggerOptions: loggerOptions, - cacheOptions: { ...DEFAULT_CACHE_OPTIONS, ...userCacheOptions }, - storageInterface: - storageImplementation || - new DefaultStorageClass( - userAuthOptions.clientId, - DEFAULT_CRYPTO_IMPLEMENTATION, - new Logger(loggerOptions) - ), - networkInterface: - networkImplementation || DEFAULT_NETWORK_IMPLEMENTATION, - cryptoInterface: cryptoImplementation || DEFAULT_CRYPTO_IMPLEMENTATION, - clientCredentials: clientCredentials || DEFAULT_CLIENT_CREDENTIALS, - libraryInfo: { ...DEFAULT_LIBRARY_INFO, ...libraryInfo }, - telemetry: { ...DEFAULT_TELEMETRY_OPTIONS, ...telemetry }, - serverTelemetryManager: serverTelemetryManager || null, - persistencePlugin: persistencePlugin || null, - serializableCache: serializableCache || null, - }; -} - -/** - * Construct authoptions from the client and platform passed values - * @param authOptions - */ -function buildAuthOptions(authOptions: AuthOptions): Required { - return { - clientCapabilities: [], - azureCloudOptions: DEFAULT_AZURE_CLOUD_OPTIONS, - skipAuthorityMetadataCache: false, - instanceAware: false, - ...authOptions, - }; -} - -/** - * Returns true if config has protocolMode set to ProtocolMode.OIDC, false otherwise - * @param ClientConfiguration - */ -export function isOidcProtocolMode(config: ClientConfiguration): boolean { - return ( - config.authOptions.authority.options.protocolMode === ProtocolMode.OIDC - ); -} diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/src/constants/AADServerParamKeys.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/src/constants/AADServerParamKeys.ts deleted file mode 100644 index 3a6b3d0..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/src/constants/AADServerParamKeys.ts +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -export const CLIENT_ID = "client_id"; -export const REDIRECT_URI = "redirect_uri"; -export const RESPONSE_TYPE = "response_type"; -export const RESPONSE_MODE = "response_mode"; -export const GRANT_TYPE = "grant_type"; -export const CLAIMS = "claims"; -export const SCOPE = "scope"; -export const ERROR = "error"; -export const ERROR_DESCRIPTION = "error_description"; -export const ACCESS_TOKEN = "access_token"; -export const ID_TOKEN = "id_token"; -export const REFRESH_TOKEN = "refresh_token"; -export const EXPIRES_IN = "expires_in"; -export const REFRESH_TOKEN_EXPIRES_IN = "refresh_token_expires_in"; -export const STATE = "state"; -export const NONCE = "nonce"; -export const PROMPT = "prompt"; -export const SESSION_STATE = "session_state"; -export const CLIENT_INFO = "client_info"; -export const CODE = "code"; -export const CODE_CHALLENGE = "code_challenge"; -export const CODE_CHALLENGE_METHOD = "code_challenge_method"; -export const CODE_VERIFIER = "code_verifier"; -export const CLIENT_REQUEST_ID = "client-request-id"; -export const X_CLIENT_SKU = "x-client-SKU"; -export const X_CLIENT_VER = "x-client-VER"; -export const X_CLIENT_OS = "x-client-OS"; -export const X_CLIENT_CPU = "x-client-CPU"; -export const X_CLIENT_CURR_TELEM = "x-client-current-telemetry"; -export const X_CLIENT_LAST_TELEM = "x-client-last-telemetry"; -export const X_MS_LIB_CAPABILITY = "x-ms-lib-capability"; -export const X_APP_NAME = "x-app-name"; -export const X_APP_VER = "x-app-ver"; -export const POST_LOGOUT_URI = "post_logout_redirect_uri"; -export const ID_TOKEN_HINT = "id_token_hint"; -export const DEVICE_CODE = "device_code"; -export const CLIENT_SECRET = "client_secret"; -export const CLIENT_ASSERTION = "client_assertion"; -export const CLIENT_ASSERTION_TYPE = "client_assertion_type"; -export const TOKEN_TYPE = "token_type"; -export const REQ_CNF = "req_cnf"; -export const OBO_ASSERTION = "assertion"; -export const REQUESTED_TOKEN_USE = "requested_token_use"; -export const ON_BEHALF_OF = "on_behalf_of"; -export const FOCI = "foci"; -export const CCS_HEADER = "X-AnchorMailbox"; -export const RETURN_SPA_CODE = "return_spa_code"; -export const NATIVE_BROKER = "nativebroker"; -export const LOGOUT_HINT = "logout_hint"; -export const SID = "sid"; -export const LOGIN_HINT = "login_hint"; -export const DOMAIN_HINT = "domain_hint"; -export const X_CLIENT_EXTRA_SKU = "x-client-xtra-sku"; -export const BROKER_CLIENT_ID = "brk_client_id"; -export const BROKER_REDIRECT_URI = "brk_redirect_uri"; diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/src/crypto/ICrypto.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/src/crypto/ICrypto.ts deleted file mode 100644 index 4728cc8..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/src/crypto/ICrypto.ts +++ /dev/null @@ -1,126 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import { - ClientAuthErrorCodes, - createClientAuthError, -} from "../error/ClientAuthError.js"; -import { BaseAuthRequest } from "../request/BaseAuthRequest.js"; -import { ShrOptions, SignedHttpRequest } from "./SignedHttpRequest.js"; - -/** - * The PkceCodes type describes the structure - * of objects that contain PKCE code - * challenge and verifier pairs - */ -export type PkceCodes = { - verifier: string; - challenge: string; -}; - -export type SignedHttpRequestParameters = Pick< - BaseAuthRequest, - | "resourceRequestMethod" - | "resourceRequestUri" - | "shrClaims" - | "shrNonce" - | "shrOptions" -> & { - correlationId?: string; -}; - -/** - * Interface for crypto functions used by library - */ -export interface ICrypto { - /** - * Creates a guid randomly. - */ - createNewGuid(): string; - /** - * base64 Encode string - * @param input - */ - base64Encode(input: string): string; - /** - * base64 decode string - * @param input - */ - base64Decode(input: string): string; - /** - * base64 URL safe encoded string - */ - base64UrlEncode(input: string): string; - /** - * Stringifies and base64Url encodes input public key - * @param inputKid - * @returns Base64Url encoded public key - */ - encodeKid(inputKid: string): string; - /** - * Generates an JWK RSA S256 Thumbprint - * @param request - */ - getPublicKeyThumbprint( - request: SignedHttpRequestParameters - ): Promise; - /** - * Removes cryptographic keypair from key store matching the keyId passed in - * @param kid - */ - removeTokenBindingKey(kid: string): Promise; - /** - * Removes all cryptographic keys from IndexedDB storage - */ - clearKeystore(): Promise; - /** - * Returns a signed proof-of-possession token with a given acces token that contains a cnf claim with the required kid. - * @param accessToken - */ - signJwt( - payload: SignedHttpRequest, - kid: string, - shrOptions?: ShrOptions, - correlationId?: string - ): Promise; - /** - * Returns the SHA-256 hash of an input string - * @param plainText - */ - hashString(plainText: string): Promise; -} - -export const DEFAULT_CRYPTO_IMPLEMENTATION: ICrypto = { - createNewGuid: (): string => { - throw createClientAuthError(ClientAuthErrorCodes.methodNotImplemented); - }, - base64Decode: (): string => { - throw createClientAuthError(ClientAuthErrorCodes.methodNotImplemented); - }, - base64Encode: (): string => { - throw createClientAuthError(ClientAuthErrorCodes.methodNotImplemented); - }, - base64UrlEncode: (): string => { - throw createClientAuthError(ClientAuthErrorCodes.methodNotImplemented); - }, - encodeKid: (): string => { - throw createClientAuthError(ClientAuthErrorCodes.methodNotImplemented); - }, - async getPublicKeyThumbprint(): Promise { - throw createClientAuthError(ClientAuthErrorCodes.methodNotImplemented); - }, - async removeTokenBindingKey(): Promise { - throw createClientAuthError(ClientAuthErrorCodes.methodNotImplemented); - }, - async clearKeystore(): Promise { - throw createClientAuthError(ClientAuthErrorCodes.methodNotImplemented); - }, - async signJwt(): Promise { - throw createClientAuthError(ClientAuthErrorCodes.methodNotImplemented); - }, - async hashString(): Promise { - throw createClientAuthError(ClientAuthErrorCodes.methodNotImplemented); - }, -}; diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/src/crypto/IGuidGenerator.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/src/crypto/IGuidGenerator.ts deleted file mode 100644 index b83ce2d..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/src/crypto/IGuidGenerator.ts +++ /dev/null @@ -1,9 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -export interface IGuidGenerator { - generateGuid(): string; - isGuid(guid: string): boolean; -} diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/src/crypto/JoseHeader.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/src/crypto/JoseHeader.ts deleted file mode 100644 index e18c780..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/src/crypto/JoseHeader.ts +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import { - JoseHeaderErrorCodes, - createJoseHeaderError, -} from "../error/JoseHeaderError.js"; -import { JsonWebTokenTypes } from "../utils/Constants.js"; - -export type JoseHeaderOptions = { - typ?: JsonWebTokenTypes; - alg?: string; - kid?: string; -}; - -/** @internal */ -export class JoseHeader { - public typ?: JsonWebTokenTypes; - public alg?: string; - public kid?: string; - - constructor(options: JoseHeaderOptions) { - this.typ = options.typ; - this.alg = options.alg; - this.kid = options.kid; - } - - /** - * Builds SignedHttpRequest formatted JOSE Header from the - * JOSE Header options provided or previously set on the object and returns - * the stringified header object. - * Throws if keyId or algorithm aren't provided since they are required for Access Token Binding. - * @param shrHeaderOptions - * @returns - */ - static getShrHeaderString(shrHeaderOptions: JoseHeaderOptions): string { - // KeyID is required on the SHR header - if (!shrHeaderOptions.kid) { - throw createJoseHeaderError(JoseHeaderErrorCodes.missingKidError); - } - - // Alg is required on the SHR header - if (!shrHeaderOptions.alg) { - throw createJoseHeaderError(JoseHeaderErrorCodes.missingAlgError); - } - - const shrHeader = new JoseHeader({ - // Access Token PoP headers must have type pop, but the type header can be overriden for special cases - typ: shrHeaderOptions.typ || JsonWebTokenTypes.Pop, - kid: shrHeaderOptions.kid, - alg: shrHeaderOptions.alg, - }); - - return JSON.stringify(shrHeader); - } -} diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/src/crypto/PopTokenGenerator.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/src/crypto/PopTokenGenerator.ts deleted file mode 100644 index e24378d..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/src/crypto/PopTokenGenerator.ts +++ /dev/null @@ -1,160 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import { ICrypto, SignedHttpRequestParameters } from "./ICrypto.js"; -import * as TimeUtils from "../utils/TimeUtils.js"; -import { UrlString } from "../url/UrlString.js"; -import { IPerformanceClient } from "../telemetry/performance/IPerformanceClient.js"; -import { PerformanceEvents } from "../telemetry/performance/PerformanceEvent.js"; -import { invokeAsync } from "../utils/FunctionWrappers.js"; -import { Logger } from "../logger/Logger.js"; - -/** - * See eSTS docs for more info. - * - A kid element, with the value containing an RFC 7638-compliant JWK thumbprint that is base64 encoded. - * - xms_ksl element, representing the storage location of the key's secret component on the client device. One of two values: - * - sw: software storage - * - uhw: hardware storage - */ -type ReqCnf = { - kid: string; - xms_ksl: KeyLocation; -}; - -export type ReqCnfData = { - kid: string; - reqCnfString: string; -}; - -const KeyLocation = { - SW: "sw", - UHW: "uhw", -} as const; -export type KeyLocation = (typeof KeyLocation)[keyof typeof KeyLocation]; - -/** @internal */ -export class PopTokenGenerator { - private cryptoUtils: ICrypto; - private performanceClient?: IPerformanceClient; - - constructor(cryptoUtils: ICrypto, performanceClient?: IPerformanceClient) { - this.cryptoUtils = cryptoUtils; - this.performanceClient = performanceClient; - } - - /** - * Generates the req_cnf validated at the RP in the POP protocol for SHR parameters - * and returns an object containing the keyid, the full req_cnf string and the req_cnf string hash - * @param request - * @returns - */ - async generateCnf( - request: SignedHttpRequestParameters, - logger: Logger - ): Promise { - this.performanceClient?.addQueueMeasurement( - PerformanceEvents.PopTokenGenerateCnf, - request.correlationId - ); - - const reqCnf = await invokeAsync( - this.generateKid.bind(this), - PerformanceEvents.PopTokenGenerateCnf, - logger, - this.performanceClient, - request.correlationId - )(request); - const reqCnfString: string = this.cryptoUtils.base64UrlEncode( - JSON.stringify(reqCnf) - ); - - return { - kid: reqCnf.kid, - reqCnfString, - }; - } - - /** - * Generates key_id for a SHR token request - * @param request - * @returns - */ - async generateKid(request: SignedHttpRequestParameters): Promise { - this.performanceClient?.addQueueMeasurement( - PerformanceEvents.PopTokenGenerateKid, - request.correlationId - ); - - const kidThumbprint = await this.cryptoUtils.getPublicKeyThumbprint( - request - ); - - return { - kid: kidThumbprint, - xms_ksl: KeyLocation.SW, - }; - } - - /** - * Signs the POP access_token with the local generated key-pair - * @param accessToken - * @param request - * @returns - */ - async signPopToken( - accessToken: string, - keyId: string, - request: SignedHttpRequestParameters - ): Promise { - return this.signPayload(accessToken, keyId, request); - } - - /** - * Utility function to generate the signed JWT for an access_token - * @param payload - * @param kid - * @param request - * @param claims - * @returns - */ - async signPayload( - payload: string, - keyId: string, - request: SignedHttpRequestParameters, - claims?: object - ): Promise { - // Deconstruct request to extract SHR parameters - const { - resourceRequestMethod, - resourceRequestUri, - shrClaims, - shrNonce, - shrOptions, - } = request; - - const resourceUrlString = resourceRequestUri - ? new UrlString(resourceRequestUri) - : undefined; - const resourceUrlComponents = resourceUrlString?.getUrlComponents(); - return this.cryptoUtils.signJwt( - { - at: payload, - ts: TimeUtils.nowSeconds(), - m: resourceRequestMethod?.toUpperCase(), - u: resourceUrlComponents?.HostNameAndPort, - nonce: shrNonce || this.cryptoUtils.createNewGuid(), - p: resourceUrlComponents?.AbsolutePath, - q: resourceUrlComponents?.QueryString - ? [[], resourceUrlComponents.QueryString] - : undefined, - client_claims: shrClaims || undefined, - ...claims, - }, - keyId, - shrOptions, - request.correlationId - ); - } -} diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/src/crypto/SignedHttpRequest.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/src/crypto/SignedHttpRequest.ts deleted file mode 100644 index 02fcc2c..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/src/crypto/SignedHttpRequest.ts +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import { JoseHeaderOptions } from "./JoseHeader.js"; - -export type SignedHttpRequest = { - at?: string; - cnf?: object; - m?: string; - u?: string; - p?: string; - q?: [Array, string]; - ts?: number; - nonce?: string; - client_claims?: string; -}; - -export type ShrOptions = { - header: JoseHeaderOptions; -}; diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/src/error/AuthError.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/src/error/AuthError.ts deleted file mode 100644 index 2e88cec..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/src/error/AuthError.ts +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import { Constants } from "../utils/Constants.js"; -import * as AuthErrorCodes from "./AuthErrorCodes.js"; -export { AuthErrorCodes }; - -export const AuthErrorMessages = { - [AuthErrorCodes.unexpectedError]: "Unexpected error in authentication.", - [AuthErrorCodes.postRequestFailed]: - "Post request failed from the network, could be a 4xx/5xx or a network unavailability. Please check the exact error code for details.", -}; - -/** - * AuthErrorMessage class containing string constants used by error codes and messages. - * @deprecated Use AuthErrorCodes instead - */ -export const AuthErrorMessage = { - unexpectedError: { - code: AuthErrorCodes.unexpectedError, - desc: AuthErrorMessages[AuthErrorCodes.unexpectedError], - }, - postRequestFailed: { - code: AuthErrorCodes.postRequestFailed, - desc: AuthErrorMessages[AuthErrorCodes.postRequestFailed], - }, -}; - -/** - * General error class thrown by the MSAL.js library. - */ -export class AuthError extends Error { - /** - * Short string denoting error - */ - errorCode: string; - - /** - * Detailed description of error - */ - errorMessage: string; - - /** - * Describes the subclass of an error - */ - subError: string; - - /** - * CorrelationId associated with the error - */ - correlationId: string; - - constructor(errorCode?: string, errorMessage?: string, suberror?: string) { - const errorString = errorMessage - ? `${errorCode}: ${errorMessage}` - : errorCode; - super(errorString); - Object.setPrototypeOf(this, AuthError.prototype); - - this.errorCode = errorCode || Constants.EMPTY_STRING; - this.errorMessage = errorMessage || Constants.EMPTY_STRING; - this.subError = suberror || Constants.EMPTY_STRING; - this.name = "AuthError"; - } - - setCorrelationId(correlationId: string): void { - this.correlationId = correlationId; - } -} - -export function createAuthError( - code: string, - additionalMessage?: string -): AuthError { - return new AuthError( - code, - additionalMessage - ? `${AuthErrorMessages[code]} ${additionalMessage}` - : AuthErrorMessages[code] - ); -} diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/src/error/AuthErrorCodes.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/src/error/AuthErrorCodes.ts deleted file mode 100644 index 8824558..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/src/error/AuthErrorCodes.ts +++ /dev/null @@ -1,10 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -/** - * AuthErrorMessage class containing string constants used by error codes and messages. - */ -export const unexpectedError = "unexpected_error"; -export const postRequestFailed = "post_request_failed"; diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/src/error/CacheError.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/src/error/CacheError.ts deleted file mode 100644 index 7a88ef9..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/src/error/CacheError.ts +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import * as CacheErrorCodes from "./CacheErrorCodes.js"; -export { CacheErrorCodes }; - -export const CacheErrorMessages = { - [CacheErrorCodes.cacheQuotaExceeded]: "Exceeded cache storage capacity.", - [CacheErrorCodes.cacheErrorUnknown]: - "Unexpected error occurred when using cache storage.", -}; - -/** - * Error thrown when there is an error with the cache - */ -export class CacheError extends Error { - /** - * Short string denoting error - */ - errorCode: string; - - /** - * Detailed description of error - */ - errorMessage: string; - - constructor(errorCode: string, errorMessage?: string) { - const message = - errorMessage || - (CacheErrorMessages[errorCode] - ? CacheErrorMessages[errorCode] - : CacheErrorMessages[CacheErrorCodes.cacheErrorUnknown]); - - super(`${errorCode}: ${message}`); - Object.setPrototypeOf(this, CacheError.prototype); - - this.name = "CacheError"; - this.errorCode = errorCode; - this.errorMessage = message; - } -} - -/** - * Helper function to wrap browser errors in a CacheError object - * @param e - * @returns - */ -export function createCacheError(e: unknown): CacheError { - if (!(e instanceof Error)) { - return new CacheError(CacheErrorCodes.cacheErrorUnknown); - } - - if ( - e.name === "QuotaExceededError" || - e.name === "NS_ERROR_DOM_QUOTA_REACHED" || - e.message.includes("exceeded the quota") - ) { - return new CacheError(CacheErrorCodes.cacheQuotaExceeded); - } else { - return new CacheError(e.name, e.message); - } -} diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/src/error/CacheErrorCodes.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/src/error/CacheErrorCodes.ts deleted file mode 100644 index c64bdce..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/src/error/CacheErrorCodes.ts +++ /dev/null @@ -1,7 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -export const cacheQuotaExceeded = "cache_quota_exceeded"; -export const cacheErrorUnknown = "cache_error_unknown"; diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/src/error/ClientAuthError.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/src/error/ClientAuthError.ts deleted file mode 100644 index e904bd6..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/src/error/ClientAuthError.ts +++ /dev/null @@ -1,341 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import { AuthError } from "./AuthError.js"; -import * as ClientAuthErrorCodes from "./ClientAuthErrorCodes.js"; -export { ClientAuthErrorCodes }; // Allow importing as "ClientAuthErrorCodes"; - -/** - * ClientAuthErrorMessage class containing string constants used by error codes and messages. - */ - -export const ClientAuthErrorMessages = { - [ClientAuthErrorCodes.clientInfoDecodingError]: - "The client info could not be parsed/decoded correctly", - [ClientAuthErrorCodes.clientInfoEmptyError]: "The client info was empty", - [ClientAuthErrorCodes.tokenParsingError]: "Token cannot be parsed", - [ClientAuthErrorCodes.nullOrEmptyToken]: "The token is null or empty", - [ClientAuthErrorCodes.endpointResolutionError]: - "Endpoints cannot be resolved", - [ClientAuthErrorCodes.networkError]: "Network request failed", - [ClientAuthErrorCodes.openIdConfigError]: - "Could not retrieve endpoints. Check your authority and verify the .well-known/openid-configuration endpoint returns the required endpoints.", - [ClientAuthErrorCodes.hashNotDeserialized]: - "The hash parameters could not be deserialized", - [ClientAuthErrorCodes.invalidState]: "State was not the expected format", - [ClientAuthErrorCodes.stateMismatch]: "State mismatch error", - [ClientAuthErrorCodes.stateNotFound]: "State not found", - [ClientAuthErrorCodes.nonceMismatch]: "Nonce mismatch error", - [ClientAuthErrorCodes.authTimeNotFound]: - "Max Age was requested and the ID token is missing the auth_time variable." + - " auth_time is an optional claim and is not enabled by default - it must be enabled." + - " See https://aka.ms/msaljs/optional-claims for more information.", - [ClientAuthErrorCodes.maxAgeTranspired]: - "Max Age is set to 0, or too much time has elapsed since the last end-user authentication.", - [ClientAuthErrorCodes.multipleMatchingTokens]: - "The cache contains multiple tokens satisfying the requirements. " + - "Call AcquireToken again providing more requirements such as authority or account.", - [ClientAuthErrorCodes.multipleMatchingAccounts]: - "The cache contains multiple accounts satisfying the given parameters. Please pass more info to obtain the correct account", - [ClientAuthErrorCodes.multipleMatchingAppMetadata]: - "The cache contains multiple appMetadata satisfying the given parameters. Please pass more info to obtain the correct appMetadata", - [ClientAuthErrorCodes.requestCannotBeMade]: - "Token request cannot be made without authorization code or refresh token.", - [ClientAuthErrorCodes.cannotRemoveEmptyScope]: - "Cannot remove null or empty scope from ScopeSet", - [ClientAuthErrorCodes.cannotAppendScopeSet]: "Cannot append ScopeSet", - [ClientAuthErrorCodes.emptyInputScopeSet]: - "Empty input ScopeSet cannot be processed", - [ClientAuthErrorCodes.deviceCodePollingCancelled]: - "Caller has cancelled token endpoint polling during device code flow by setting DeviceCodeRequest.cancel = true.", - [ClientAuthErrorCodes.deviceCodeExpired]: "Device code is expired.", - [ClientAuthErrorCodes.deviceCodeUnknownError]: - "Device code stopped polling for unknown reasons.", - [ClientAuthErrorCodes.noAccountInSilentRequest]: - "Please pass an account object, silent flow is not supported without account information", - [ClientAuthErrorCodes.invalidCacheRecord]: - "Cache record object was null or undefined.", - [ClientAuthErrorCodes.invalidCacheEnvironment]: - "Invalid environment when attempting to create cache entry", - [ClientAuthErrorCodes.noAccountFound]: - "No account found in cache for given key.", - [ClientAuthErrorCodes.noCryptoObject]: "No crypto object detected.", - [ClientAuthErrorCodes.unexpectedCredentialType]: - "Unexpected credential type.", - [ClientAuthErrorCodes.invalidAssertion]: - "Client assertion must meet requirements described in https://tools.ietf.org/html/rfc7515", - [ClientAuthErrorCodes.invalidClientCredential]: - "Client credential (secret, certificate, or assertion) must not be empty when creating a confidential client. An application should at most have one credential", - [ClientAuthErrorCodes.tokenRefreshRequired]: - "Cannot return token from cache because it must be refreshed. This may be due to one of the following reasons: forceRefresh parameter is set to true, claims have been requested, there is no cached access token or it is expired.", - [ClientAuthErrorCodes.userTimeoutReached]: - "User defined timeout for device code polling reached", - [ClientAuthErrorCodes.tokenClaimsCnfRequiredForSignedJwt]: - "Cannot generate a POP jwt if the token_claims are not populated", - [ClientAuthErrorCodes.authorizationCodeMissingFromServerResponse]: - "Server response does not contain an authorization code to proceed", - [ClientAuthErrorCodes.bindingKeyNotRemoved]: - "Could not remove the credential's binding key from storage.", - [ClientAuthErrorCodes.endSessionEndpointNotSupported]: - "The provided authority does not support logout", - [ClientAuthErrorCodes.keyIdMissing]: - "A keyId value is missing from the requested bound token's cache record and is required to match the token to it's stored binding key.", - [ClientAuthErrorCodes.noNetworkConnectivity]: - "No network connectivity. Check your internet connection.", - [ClientAuthErrorCodes.userCanceled]: "User cancelled the flow.", - [ClientAuthErrorCodes.missingTenantIdError]: - "A tenant id - not common, organizations, or consumers - must be specified when using the client_credentials flow.", - [ClientAuthErrorCodes.methodNotImplemented]: - "This method has not been implemented", - [ClientAuthErrorCodes.nestedAppAuthBridgeDisabled]: - "The nested app auth bridge is disabled", -}; - -/** - * String constants used by error codes and messages. - * @deprecated Use ClientAuthErrorCodes instead - */ -export const ClientAuthErrorMessage = { - clientInfoDecodingError: { - code: ClientAuthErrorCodes.clientInfoDecodingError, - desc: ClientAuthErrorMessages[ - ClientAuthErrorCodes.clientInfoDecodingError - ], - }, - clientInfoEmptyError: { - code: ClientAuthErrorCodes.clientInfoEmptyError, - desc: ClientAuthErrorMessages[ - ClientAuthErrorCodes.clientInfoEmptyError - ], - }, - tokenParsingError: { - code: ClientAuthErrorCodes.tokenParsingError, - desc: ClientAuthErrorMessages[ClientAuthErrorCodes.tokenParsingError], - }, - nullOrEmptyToken: { - code: ClientAuthErrorCodes.nullOrEmptyToken, - desc: ClientAuthErrorMessages[ClientAuthErrorCodes.nullOrEmptyToken], - }, - endpointResolutionError: { - code: ClientAuthErrorCodes.endpointResolutionError, - desc: ClientAuthErrorMessages[ - ClientAuthErrorCodes.endpointResolutionError - ], - }, - networkError: { - code: ClientAuthErrorCodes.networkError, - desc: ClientAuthErrorMessages[ClientAuthErrorCodes.networkError], - }, - unableToGetOpenidConfigError: { - code: ClientAuthErrorCodes.openIdConfigError, - desc: ClientAuthErrorMessages[ClientAuthErrorCodes.openIdConfigError], - }, - hashNotDeserialized: { - code: ClientAuthErrorCodes.hashNotDeserialized, - desc: ClientAuthErrorMessages[ClientAuthErrorCodes.hashNotDeserialized], - }, - invalidStateError: { - code: ClientAuthErrorCodes.invalidState, - desc: ClientAuthErrorMessages[ClientAuthErrorCodes.invalidState], - }, - stateMismatchError: { - code: ClientAuthErrorCodes.stateMismatch, - desc: ClientAuthErrorMessages[ClientAuthErrorCodes.stateMismatch], - }, - stateNotFoundError: { - code: ClientAuthErrorCodes.stateNotFound, - desc: ClientAuthErrorMessages[ClientAuthErrorCodes.stateNotFound], - }, - nonceMismatchError: { - code: ClientAuthErrorCodes.nonceMismatch, - desc: ClientAuthErrorMessages[ClientAuthErrorCodes.nonceMismatch], - }, - authTimeNotFoundError: { - code: ClientAuthErrorCodes.authTimeNotFound, - desc: ClientAuthErrorMessages[ClientAuthErrorCodes.authTimeNotFound], - }, - maxAgeTranspired: { - code: ClientAuthErrorCodes.maxAgeTranspired, - desc: ClientAuthErrorMessages[ClientAuthErrorCodes.maxAgeTranspired], - }, - multipleMatchingTokens: { - code: ClientAuthErrorCodes.multipleMatchingTokens, - desc: ClientAuthErrorMessages[ - ClientAuthErrorCodes.multipleMatchingTokens - ], - }, - multipleMatchingAccounts: { - code: ClientAuthErrorCodes.multipleMatchingAccounts, - desc: ClientAuthErrorMessages[ - ClientAuthErrorCodes.multipleMatchingAccounts - ], - }, - multipleMatchingAppMetadata: { - code: ClientAuthErrorCodes.multipleMatchingAppMetadata, - desc: ClientAuthErrorMessages[ - ClientAuthErrorCodes.multipleMatchingAppMetadata - ], - }, - tokenRequestCannotBeMade: { - code: ClientAuthErrorCodes.requestCannotBeMade, - desc: ClientAuthErrorMessages[ClientAuthErrorCodes.requestCannotBeMade], - }, - removeEmptyScopeError: { - code: ClientAuthErrorCodes.cannotRemoveEmptyScope, - desc: ClientAuthErrorMessages[ - ClientAuthErrorCodes.cannotRemoveEmptyScope - ], - }, - appendScopeSetError: { - code: ClientAuthErrorCodes.cannotAppendScopeSet, - desc: ClientAuthErrorMessages[ - ClientAuthErrorCodes.cannotAppendScopeSet - ], - }, - emptyInputScopeSetError: { - code: ClientAuthErrorCodes.emptyInputScopeSet, - desc: ClientAuthErrorMessages[ClientAuthErrorCodes.emptyInputScopeSet], - }, - DeviceCodePollingCancelled: { - code: ClientAuthErrorCodes.deviceCodePollingCancelled, - desc: ClientAuthErrorMessages[ - ClientAuthErrorCodes.deviceCodePollingCancelled - ], - }, - DeviceCodeExpired: { - code: ClientAuthErrorCodes.deviceCodeExpired, - desc: ClientAuthErrorMessages[ClientAuthErrorCodes.deviceCodeExpired], - }, - DeviceCodeUnknownError: { - code: ClientAuthErrorCodes.deviceCodeUnknownError, - desc: ClientAuthErrorMessages[ - ClientAuthErrorCodes.deviceCodeUnknownError - ], - }, - NoAccountInSilentRequest: { - code: ClientAuthErrorCodes.noAccountInSilentRequest, - desc: ClientAuthErrorMessages[ - ClientAuthErrorCodes.noAccountInSilentRequest - ], - }, - invalidCacheRecord: { - code: ClientAuthErrorCodes.invalidCacheRecord, - desc: ClientAuthErrorMessages[ClientAuthErrorCodes.invalidCacheRecord], - }, - invalidCacheEnvironment: { - code: ClientAuthErrorCodes.invalidCacheEnvironment, - desc: ClientAuthErrorMessages[ - ClientAuthErrorCodes.invalidCacheEnvironment - ], - }, - noAccountFound: { - code: ClientAuthErrorCodes.noAccountFound, - desc: ClientAuthErrorMessages[ClientAuthErrorCodes.noAccountFound], - }, - noCryptoObj: { - code: ClientAuthErrorCodes.noCryptoObject, - desc: ClientAuthErrorMessages[ClientAuthErrorCodes.noCryptoObject], - }, - unexpectedCredentialType: { - code: ClientAuthErrorCodes.unexpectedCredentialType, - desc: ClientAuthErrorMessages[ - ClientAuthErrorCodes.unexpectedCredentialType - ], - }, - invalidAssertion: { - code: ClientAuthErrorCodes.invalidAssertion, - desc: ClientAuthErrorMessages[ClientAuthErrorCodes.invalidAssertion], - }, - invalidClientCredential: { - code: ClientAuthErrorCodes.invalidClientCredential, - desc: ClientAuthErrorMessages[ - ClientAuthErrorCodes.invalidClientCredential - ], - }, - tokenRefreshRequired: { - code: ClientAuthErrorCodes.tokenRefreshRequired, - desc: ClientAuthErrorMessages[ - ClientAuthErrorCodes.tokenRefreshRequired - ], - }, - userTimeoutReached: { - code: ClientAuthErrorCodes.userTimeoutReached, - desc: ClientAuthErrorMessages[ClientAuthErrorCodes.userTimeoutReached], - }, - tokenClaimsRequired: { - code: ClientAuthErrorCodes.tokenClaimsCnfRequiredForSignedJwt, - desc: ClientAuthErrorMessages[ - ClientAuthErrorCodes.tokenClaimsCnfRequiredForSignedJwt - ], - }, - noAuthorizationCodeFromServer: { - code: ClientAuthErrorCodes.authorizationCodeMissingFromServerResponse, - desc: ClientAuthErrorMessages[ - ClientAuthErrorCodes.authorizationCodeMissingFromServerResponse - ], - }, - bindingKeyNotRemovedError: { - code: ClientAuthErrorCodes.bindingKeyNotRemoved, - desc: ClientAuthErrorMessages[ - ClientAuthErrorCodes.bindingKeyNotRemoved - ], - }, - logoutNotSupported: { - code: ClientAuthErrorCodes.endSessionEndpointNotSupported, - desc: ClientAuthErrorMessages[ - ClientAuthErrorCodes.endSessionEndpointNotSupported - ], - }, - keyIdMissing: { - code: ClientAuthErrorCodes.keyIdMissing, - desc: ClientAuthErrorMessages[ClientAuthErrorCodes.keyIdMissing], - }, - noNetworkConnectivity: { - code: ClientAuthErrorCodes.noNetworkConnectivity, - desc: ClientAuthErrorMessages[ - ClientAuthErrorCodes.noNetworkConnectivity - ], - }, - userCanceledError: { - code: ClientAuthErrorCodes.userCanceled, - desc: ClientAuthErrorMessages[ClientAuthErrorCodes.userCanceled], - }, - missingTenantIdError: { - code: ClientAuthErrorCodes.missingTenantIdError, - desc: ClientAuthErrorMessages[ - ClientAuthErrorCodes.missingTenantIdError - ], - }, - nestedAppAuthBridgeDisabled: { - code: ClientAuthErrorCodes.nestedAppAuthBridgeDisabled, - desc: ClientAuthErrorMessages[ - ClientAuthErrorCodes.nestedAppAuthBridgeDisabled - ], - }, -}; - -/** - * Error thrown when there is an error in the client code running on the browser. - */ -export class ClientAuthError extends AuthError { - constructor(errorCode: string, additionalMessage?: string) { - super( - errorCode, - additionalMessage - ? `${ClientAuthErrorMessages[errorCode]}: ${additionalMessage}` - : ClientAuthErrorMessages[errorCode] - ); - this.name = "ClientAuthError"; - - Object.setPrototypeOf(this, ClientAuthError.prototype); - } -} - -export function createClientAuthError( - errorCode: string, - additionalMessage?: string -): ClientAuthError { - return new ClientAuthError(errorCode, additionalMessage); -} diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/src/error/ClientAuthErrorCodes.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/src/error/ClientAuthErrorCodes.ts deleted file mode 100644 index 0e81ead..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/src/error/ClientAuthErrorCodes.ts +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -export const clientInfoDecodingError = "client_info_decoding_error"; -export const clientInfoEmptyError = "client_info_empty_error"; -export const tokenParsingError = "token_parsing_error"; -export const nullOrEmptyToken = "null_or_empty_token"; -export const endpointResolutionError = "endpoints_resolution_error"; -export const networkError = "network_error"; -export const openIdConfigError = "openid_config_error"; -export const hashNotDeserialized = "hash_not_deserialized"; -export const invalidState = "invalid_state"; -export const stateMismatch = "state_mismatch"; -export const stateNotFound = "state_not_found"; -export const nonceMismatch = "nonce_mismatch"; -export const authTimeNotFound = "auth_time_not_found"; -export const maxAgeTranspired = "max_age_transpired"; -export const multipleMatchingTokens = "multiple_matching_tokens"; -export const multipleMatchingAccounts = "multiple_matching_accounts"; -export const multipleMatchingAppMetadata = "multiple_matching_appMetadata"; -export const requestCannotBeMade = "request_cannot_be_made"; -export const cannotRemoveEmptyScope = "cannot_remove_empty_scope"; -export const cannotAppendScopeSet = "cannot_append_scopeset"; -export const emptyInputScopeSet = "empty_input_scopeset"; -export const deviceCodePollingCancelled = "device_code_polling_cancelled"; -export const deviceCodeExpired = "device_code_expired"; -export const deviceCodeUnknownError = "device_code_unknown_error"; -export const noAccountInSilentRequest = "no_account_in_silent_request"; -export const invalidCacheRecord = "invalid_cache_record"; -export const invalidCacheEnvironment = "invalid_cache_environment"; -export const noAccountFound = "no_account_found"; -export const noCryptoObject = "no_crypto_object"; -export const unexpectedCredentialType = "unexpected_credential_type"; -export const invalidAssertion = "invalid_assertion"; -export const invalidClientCredential = "invalid_client_credential"; -export const tokenRefreshRequired = "token_refresh_required"; -export const userTimeoutReached = "user_timeout_reached"; -export const tokenClaimsCnfRequiredForSignedJwt = - "token_claims_cnf_required_for_signedjwt"; -export const authorizationCodeMissingFromServerResponse = - "authorization_code_missing_from_server_response"; -export const bindingKeyNotRemoved = "binding_key_not_removed"; -export const endSessionEndpointNotSupported = - "end_session_endpoint_not_supported"; -export const keyIdMissing = "key_id_missing"; -export const noNetworkConnectivity = "no_network_connectivity"; -export const userCanceled = "user_canceled"; -export const missingTenantIdError = "missing_tenant_id_error"; -export const methodNotImplemented = "method_not_implemented"; -export const nestedAppAuthBridgeDisabled = "nested_app_auth_bridge_disabled"; diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/src/error/ClientConfigurationError.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/src/error/ClientConfigurationError.ts deleted file mode 100644 index 92f4f07..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/src/error/ClientConfigurationError.ts +++ /dev/null @@ -1,210 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import { AuthError } from "./AuthError.js"; -import * as ClientConfigurationErrorCodes from "./ClientConfigurationErrorCodes.js"; -export { ClientConfigurationErrorCodes }; - -export const ClientConfigurationErrorMessages = { - [ClientConfigurationErrorCodes.redirectUriEmpty]: - "A redirect URI is required for all calls, and none has been set.", - [ClientConfigurationErrorCodes.claimsRequestParsingError]: - "Could not parse the given claims request object.", - [ClientConfigurationErrorCodes.authorityUriInsecure]: - "Authority URIs must use https. Please see here for valid authority configuration options: https://docs.microsoft.com/en-us/azure/active-directory/develop/msal-js-initializing-client-applications#configuration-options", - [ClientConfigurationErrorCodes.urlParseError]: - "URL could not be parsed into appropriate segments.", - [ClientConfigurationErrorCodes.urlEmptyError]: "URL was empty or null.", - [ClientConfigurationErrorCodes.emptyInputScopesError]: - "Scopes cannot be passed as null, undefined or empty array because they are required to obtain an access token.", - [ClientConfigurationErrorCodes.invalidPromptValue]: - "Please see here for valid configuration options: https://azuread.github.io/microsoft-authentication-library-for-js/ref/modules/_azure_msal_common.html#commonauthorizationurlrequest", - [ClientConfigurationErrorCodes.invalidClaims]: - "Given claims parameter must be a stringified JSON object.", - [ClientConfigurationErrorCodes.tokenRequestEmpty]: - "Token request was empty and not found in cache.", - [ClientConfigurationErrorCodes.logoutRequestEmpty]: - "The logout request was null or undefined.", - [ClientConfigurationErrorCodes.invalidCodeChallengeMethod]: - 'code_challenge_method passed is invalid. Valid values are "plain" and "S256".', - [ClientConfigurationErrorCodes.pkceParamsMissing]: - "Both params: code_challenge and code_challenge_method are to be passed if to be sent in the request", - [ClientConfigurationErrorCodes.invalidCloudDiscoveryMetadata]: - "Invalid cloudDiscoveryMetadata provided. Must be a stringified JSON object containing tenant_discovery_endpoint and metadata fields", - [ClientConfigurationErrorCodes.invalidAuthorityMetadata]: - "Invalid authorityMetadata provided. Must by a stringified JSON object containing authorization_endpoint, token_endpoint, issuer fields.", - [ClientConfigurationErrorCodes.untrustedAuthority]: - "The provided authority is not a trusted authority. Please include this authority in the knownAuthorities config parameter.", - [ClientConfigurationErrorCodes.missingSshJwk]: - "Missing sshJwk in SSH certificate request. A stringified JSON Web Key is required when using the SSH authentication scheme.", - [ClientConfigurationErrorCodes.missingSshKid]: - "Missing sshKid in SSH certificate request. A string that uniquely identifies the public SSH key is required when using the SSH authentication scheme.", - [ClientConfigurationErrorCodes.missingNonceAuthenticationHeader]: - "Unable to find an authentication header containing server nonce. Either the Authentication-Info or WWW-Authenticate headers must be present in order to obtain a server nonce.", - [ClientConfigurationErrorCodes.invalidAuthenticationHeader]: - "Invalid authentication header provided", - [ClientConfigurationErrorCodes.cannotSetOIDCOptions]: - "Cannot set OIDCOptions parameter. Please change the protocol mode to OIDC or use a non-Microsoft authority.", - [ClientConfigurationErrorCodes.cannotAllowNativeBroker]: - "Cannot set allowNativeBroker parameter to true when not in AAD protocol mode.", - [ClientConfigurationErrorCodes.authorityMismatch]: - "Authority mismatch error. Authority provided in login request or PublicClientApplication config does not match the environment of the provided account. Please use a matching account or make an interactive request to login to this authority.", -}; - -/** - * ClientConfigurationErrorMessage class containing string constants used by error codes and messages. - * @deprecated Use ClientConfigurationErrorCodes instead - */ -export const ClientConfigurationErrorMessage = { - redirectUriNotSet: { - code: ClientConfigurationErrorCodes.redirectUriEmpty, - desc: ClientConfigurationErrorMessages[ - ClientConfigurationErrorCodes.redirectUriEmpty - ], - }, - claimsRequestParsingError: { - code: ClientConfigurationErrorCodes.claimsRequestParsingError, - desc: ClientConfigurationErrorMessages[ - ClientConfigurationErrorCodes.claimsRequestParsingError - ], - }, - authorityUriInsecure: { - code: ClientConfigurationErrorCodes.authorityUriInsecure, - desc: ClientConfigurationErrorMessages[ - ClientConfigurationErrorCodes.authorityUriInsecure - ], - }, - urlParseError: { - code: ClientConfigurationErrorCodes.urlParseError, - desc: ClientConfigurationErrorMessages[ - ClientConfigurationErrorCodes.urlParseError - ], - }, - urlEmptyError: { - code: ClientConfigurationErrorCodes.urlEmptyError, - desc: ClientConfigurationErrorMessages[ - ClientConfigurationErrorCodes.urlEmptyError - ], - }, - emptyScopesError: { - code: ClientConfigurationErrorCodes.emptyInputScopesError, - desc: ClientConfigurationErrorMessages[ - ClientConfigurationErrorCodes.emptyInputScopesError - ], - }, - invalidPrompt: { - code: ClientConfigurationErrorCodes.invalidPromptValue, - desc: ClientConfigurationErrorMessages[ - ClientConfigurationErrorCodes.invalidPromptValue - ], - }, - invalidClaimsRequest: { - code: ClientConfigurationErrorCodes.invalidClaims, - desc: ClientConfigurationErrorMessages[ - ClientConfigurationErrorCodes.invalidClaims - ], - }, - tokenRequestEmptyError: { - code: ClientConfigurationErrorCodes.tokenRequestEmpty, - desc: ClientConfigurationErrorMessages[ - ClientConfigurationErrorCodes.tokenRequestEmpty - ], - }, - logoutRequestEmptyError: { - code: ClientConfigurationErrorCodes.logoutRequestEmpty, - desc: ClientConfigurationErrorMessages[ - ClientConfigurationErrorCodes.logoutRequestEmpty - ], - }, - invalidCodeChallengeMethod: { - code: ClientConfigurationErrorCodes.invalidCodeChallengeMethod, - desc: ClientConfigurationErrorMessages[ - ClientConfigurationErrorCodes.invalidCodeChallengeMethod - ], - }, - invalidCodeChallengeParams: { - code: ClientConfigurationErrorCodes.pkceParamsMissing, - desc: ClientConfigurationErrorMessages[ - ClientConfigurationErrorCodes.pkceParamsMissing - ], - }, - invalidCloudDiscoveryMetadata: { - code: ClientConfigurationErrorCodes.invalidCloudDiscoveryMetadata, - desc: ClientConfigurationErrorMessages[ - ClientConfigurationErrorCodes.invalidCloudDiscoveryMetadata - ], - }, - invalidAuthorityMetadata: { - code: ClientConfigurationErrorCodes.invalidAuthorityMetadata, - desc: ClientConfigurationErrorMessages[ - ClientConfigurationErrorCodes.invalidAuthorityMetadata - ], - }, - untrustedAuthority: { - code: ClientConfigurationErrorCodes.untrustedAuthority, - desc: ClientConfigurationErrorMessages[ - ClientConfigurationErrorCodes.untrustedAuthority - ], - }, - missingSshJwk: { - code: ClientConfigurationErrorCodes.missingSshJwk, - desc: ClientConfigurationErrorMessages[ - ClientConfigurationErrorCodes.missingSshJwk - ], - }, - missingSshKid: { - code: ClientConfigurationErrorCodes.missingSshKid, - desc: ClientConfigurationErrorMessages[ - ClientConfigurationErrorCodes.missingSshKid - ], - }, - missingNonceAuthenticationHeader: { - code: ClientConfigurationErrorCodes.missingNonceAuthenticationHeader, - desc: ClientConfigurationErrorMessages[ - ClientConfigurationErrorCodes.missingNonceAuthenticationHeader - ], - }, - invalidAuthenticationHeader: { - code: ClientConfigurationErrorCodes.invalidAuthenticationHeader, - desc: ClientConfigurationErrorMessages[ - ClientConfigurationErrorCodes.invalidAuthenticationHeader - ], - }, - cannotSetOIDCOptions: { - code: ClientConfigurationErrorCodes.cannotSetOIDCOptions, - desc: ClientConfigurationErrorMessages[ - ClientConfigurationErrorCodes.cannotSetOIDCOptions - ], - }, - cannotAllowNativeBroker: { - code: ClientConfigurationErrorCodes.cannotAllowNativeBroker, - desc: ClientConfigurationErrorMessages[ - ClientConfigurationErrorCodes.cannotAllowNativeBroker - ], - }, - authorityMismatch: { - code: ClientConfigurationErrorCodes.authorityMismatch, - desc: ClientConfigurationErrorMessages[ - ClientConfigurationErrorCodes.authorityMismatch - ], - }, -}; - -/** - * Error thrown when there is an error in configuration of the MSAL.js library. - */ -export class ClientConfigurationError extends AuthError { - constructor(errorCode: string) { - super(errorCode, ClientConfigurationErrorMessages[errorCode]); - this.name = "ClientConfigurationError"; - Object.setPrototypeOf(this, ClientConfigurationError.prototype); - } -} - -export function createClientConfigurationError( - errorCode: string -): ClientConfigurationError { - return new ClientConfigurationError(errorCode); -} diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/src/error/ClientConfigurationErrorCodes.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/src/error/ClientConfigurationErrorCodes.ts deleted file mode 100644 index c60c03a..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/src/error/ClientConfigurationErrorCodes.ts +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -export const redirectUriEmpty = "redirect_uri_empty"; -export const claimsRequestParsingError = "claims_request_parsing_error"; -export const authorityUriInsecure = "authority_uri_insecure"; -export const urlParseError = "url_parse_error"; -export const urlEmptyError = "empty_url_error"; -export const emptyInputScopesError = "empty_input_scopes_error"; -export const invalidPromptValue = "invalid_prompt_value"; -export const invalidClaims = "invalid_claims"; -export const tokenRequestEmpty = "token_request_empty"; -export const logoutRequestEmpty = "logout_request_empty"; -export const invalidCodeChallengeMethod = "invalid_code_challenge_method"; -export const pkceParamsMissing = "pkce_params_missing"; -export const invalidCloudDiscoveryMetadata = "invalid_cloud_discovery_metadata"; -export const invalidAuthorityMetadata = "invalid_authority_metadata"; -export const untrustedAuthority = "untrusted_authority"; -export const missingSshJwk = "missing_ssh_jwk"; -export const missingSshKid = "missing_ssh_kid"; -export const missingNonceAuthenticationHeader = - "missing_nonce_authentication_header"; -export const invalidAuthenticationHeader = "invalid_authentication_header"; -export const cannotSetOIDCOptions = "cannot_set_OIDCOptions"; -export const cannotAllowNativeBroker = "cannot_allow_native_broker"; -export const authorityMismatch = "authority_mismatch"; diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/src/error/InteractionRequiredAuthError.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/src/error/InteractionRequiredAuthError.ts deleted file mode 100644 index a3b4a43..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/src/error/InteractionRequiredAuthError.ts +++ /dev/null @@ -1,158 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import { Constants } from "../utils/Constants.js"; -import { AuthError } from "./AuthError.js"; -import * as InteractionRequiredAuthErrorCodes from "./InteractionRequiredAuthErrorCodes.js"; -export { InteractionRequiredAuthErrorCodes }; - -/** - * InteractionRequiredServerErrorMessage contains string constants used by error codes and messages returned by the server indicating interaction is required - */ -export const InteractionRequiredServerErrorMessage = [ - InteractionRequiredAuthErrorCodes.interactionRequired, - InteractionRequiredAuthErrorCodes.consentRequired, - InteractionRequiredAuthErrorCodes.loginRequired, - InteractionRequiredAuthErrorCodes.badToken, -]; - -export const InteractionRequiredAuthSubErrorMessage = [ - "message_only", - "additional_action", - "basic_action", - "user_password_expired", - "consent_required", - "bad_token", -]; - -const InteractionRequiredAuthErrorMessages = { - [InteractionRequiredAuthErrorCodes.noTokensFound]: - "No refresh token found in the cache. Please sign-in.", - [InteractionRequiredAuthErrorCodes.nativeAccountUnavailable]: - "The requested account is not available in the native broker. It may have been deleted or logged out. Please sign-in again using an interactive API.", - [InteractionRequiredAuthErrorCodes.refreshTokenExpired]: - "Refresh token has expired.", - [InteractionRequiredAuthErrorCodes.badToken]: - "Identity provider returned bad_token due to an expired or invalid refresh token. Please invoke an interactive API to resolve.", -}; - -/** - * Interaction required errors defined by the SDK - * @deprecated Use InteractionRequiredAuthErrorCodes instead - */ -export const InteractionRequiredAuthErrorMessage = { - noTokensFoundError: { - code: InteractionRequiredAuthErrorCodes.noTokensFound, - desc: InteractionRequiredAuthErrorMessages[ - InteractionRequiredAuthErrorCodes.noTokensFound - ], - }, - native_account_unavailable: { - code: InteractionRequiredAuthErrorCodes.nativeAccountUnavailable, - desc: InteractionRequiredAuthErrorMessages[ - InteractionRequiredAuthErrorCodes.nativeAccountUnavailable - ], - }, - bad_token: { - code: InteractionRequiredAuthErrorCodes.badToken, - desc: InteractionRequiredAuthErrorMessages[ - InteractionRequiredAuthErrorCodes.badToken - ], - }, -}; - -/** - * Error thrown when user interaction is required. - */ -export class InteractionRequiredAuthError extends AuthError { - /** - * The time the error occured at - */ - timestamp: string; - - /** - * TraceId associated with the error - */ - traceId: string; - - /** - * https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/lib/msal-common/docs/claims-challenge.md - * - * A string with extra claims needed for the token request to succeed - * web site: redirect the user to the authorization page and set the extra claims - * web api: include the claims in the WWW-Authenticate header that are sent back to the client so that it knows to request a token with the extra claims - * desktop application or browser context: include the claims when acquiring the token interactively - * app to app context (client_credentials): include the claims in the AcquireTokenByClientCredential request - */ - claims: string; - - /** - * Server error number; - */ - readonly errorNo?: string; - - constructor( - errorCode?: string, - errorMessage?: string, - subError?: string, - timestamp?: string, - traceId?: string, - correlationId?: string, - claims?: string, - errorNo?: string - ) { - super(errorCode, errorMessage, subError); - Object.setPrototypeOf(this, InteractionRequiredAuthError.prototype); - - this.timestamp = timestamp || Constants.EMPTY_STRING; - this.traceId = traceId || Constants.EMPTY_STRING; - this.correlationId = correlationId || Constants.EMPTY_STRING; - this.claims = claims || Constants.EMPTY_STRING; - this.name = "InteractionRequiredAuthError"; - this.errorNo = errorNo; - } -} - -/** - * Helper function used to determine if an error thrown by the server requires interaction to resolve - * @param errorCode - * @param errorString - * @param subError - */ -export function isInteractionRequiredError( - errorCode?: string, - errorString?: string, - subError?: string -): boolean { - const isInteractionRequiredErrorCode = - !!errorCode && - InteractionRequiredServerErrorMessage.indexOf(errorCode) > -1; - const isInteractionRequiredSubError = - !!subError && - InteractionRequiredAuthSubErrorMessage.indexOf(subError) > -1; - const isInteractionRequiredErrorDesc = - !!errorString && - InteractionRequiredServerErrorMessage.some((irErrorCode) => { - return errorString.indexOf(irErrorCode) > -1; - }); - - return ( - isInteractionRequiredErrorCode || - isInteractionRequiredErrorDesc || - isInteractionRequiredSubError - ); -} - -/** - * Creates an InteractionRequiredAuthError - */ -export function createInteractionRequiredAuthError( - errorCode: string -): InteractionRequiredAuthError { - return new InteractionRequiredAuthError( - errorCode, - InteractionRequiredAuthErrorMessages[errorCode] - ); -} diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/src/error/InteractionRequiredAuthErrorCodes.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/src/error/InteractionRequiredAuthErrorCodes.ts deleted file mode 100644 index c01e038..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/src/error/InteractionRequiredAuthErrorCodes.ts +++ /dev/null @@ -1,15 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -// Codes defined by MSAL -export const noTokensFound = "no_tokens_found"; -export const nativeAccountUnavailable = "native_account_unavailable"; -export const refreshTokenExpired = "refresh_token_expired"; - -// Codes potentially returned by server -export const interactionRequired = "interaction_required"; -export const consentRequired = "consent_required"; -export const loginRequired = "login_required"; -export const badToken = "bad_token"; diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/src/error/JoseHeaderError.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/src/error/JoseHeaderError.ts deleted file mode 100644 index 6ef5461..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/src/error/JoseHeaderError.ts +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import { AuthError } from "./AuthError.js"; -import * as JoseHeaderErrorCodes from "./JoseHeaderErrorCodes.js"; -export { JoseHeaderErrorCodes }; - -export const JoseHeaderErrorMessages = { - [JoseHeaderErrorCodes.missingKidError]: - "The JOSE Header for the requested JWT, JWS or JWK object requires a keyId to be configured as the 'kid' header claim. No 'kid' value was provided.", - [JoseHeaderErrorCodes.missingAlgError]: - "The JOSE Header for the requested JWT, JWS or JWK object requires an algorithm to be specified as the 'alg' header claim. No 'alg' value was provided.", -}; - -/** - * Error thrown when there is an error in the client code running on the browser. - */ -export class JoseHeaderError extends AuthError { - constructor(errorCode: string, errorMessage?: string) { - super(errorCode, errorMessage); - this.name = "JoseHeaderError"; - - Object.setPrototypeOf(this, JoseHeaderError.prototype); - } -} - -/** Returns JoseHeaderError object */ -export function createJoseHeaderError(code: string): JoseHeaderError { - return new JoseHeaderError(code, JoseHeaderErrorMessages[code]); -} diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/src/error/JoseHeaderErrorCodes.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/src/error/JoseHeaderErrorCodes.ts deleted file mode 100644 index 1f420ea..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/src/error/JoseHeaderErrorCodes.ts +++ /dev/null @@ -1,7 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -export const missingKidError = "missing_kid_error"; -export const missingAlgError = "missing_alg_error"; diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/src/error/NetworkError.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/src/error/NetworkError.ts deleted file mode 100644 index 0b4c9f5..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/src/error/NetworkError.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import { AuthError } from "./AuthError.js"; - -/** - * Represents network related errors - */ -export class NetworkError extends AuthError { - error: AuthError; - httpStatus?: number; - responseHeaders?: Record; - - constructor( - error: AuthError, - httpStatus?: number, - responseHeaders?: Record - ) { - super(error.errorCode, error.errorMessage, error.subError); - - Object.setPrototypeOf(this, NetworkError.prototype); - this.name = "NetworkError"; - this.error = error; - this.httpStatus = httpStatus; - this.responseHeaders = responseHeaders; - } -} - -/** - * Creates NetworkError object for a failed network request - * @param error - Error to be thrown back to the caller - * @param httpStatus - Status code of the network request - * @param responseHeaders - Response headers of the network request, when available - * @returns NetworkError object - */ -export function createNetworkError( - error: AuthError, - httpStatus?: number, - responseHeaders?: Record -): NetworkError { - return new NetworkError(error, httpStatus, responseHeaders); -} diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/src/error/ServerError.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/src/error/ServerError.ts deleted file mode 100644 index 69890fe..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/src/error/ServerError.ts +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import { AuthError } from "./AuthError.js"; - -/** - * Error thrown when there is an error with the server code, for example, unavailability. - */ -export class ServerError extends AuthError { - /** - * Server error number; - */ - readonly errorNo?: string; - - /** - * Http status number; - */ - readonly status?: number; - - constructor( - errorCode?: string, - errorMessage?: string, - subError?: string, - errorNo?: string, - status?: number - ) { - super(errorCode, errorMessage, subError); - this.name = "ServerError"; - this.errorNo = errorNo; - this.status = status; - - Object.setPrototypeOf(this, ServerError.prototype); - } -} diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/src/exports-browser-only.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/src/exports-browser-only.ts deleted file mode 100644 index 4db5a6d..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/src/exports-browser-only.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -export { SignedHttpRequest, ShrOptions } from "./crypto/SignedHttpRequest.js"; -export { JoseHeader } from "./crypto/JoseHeader.js"; -export { ExternalTokenResponse } from "./response/ExternalTokenResponse.js"; -export { - IPerformanceClient, - PerformanceCallbackFunction, - InProgressPerformanceEvent, - QueueMeasurement, -} from "./telemetry/performance/IPerformanceClient.js"; -export { - IntFields, - PerformanceEvent, - PerformanceEvents, - PerformanceEventStatus, - SubMeasurement, -} from "./telemetry/performance/PerformanceEvent.js"; -export { IPerformanceMeasurement } from "./telemetry/performance/IPerformanceMeasurement.js"; -export { - PerformanceClient, - PreQueueEvent, -} from "./telemetry/performance/PerformanceClient.js"; -export { StubPerformanceClient } from "./telemetry/performance/StubPerformanceClient.js"; - -export { PopTokenGenerator } from "./crypto/PopTokenGenerator.js"; diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/src/exports-common.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/src/exports-common.ts deleted file mode 100644 index a648754..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/src/exports-common.ts +++ /dev/null @@ -1,193 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import * as AuthToken from "./account/AuthToken.js"; -import * as AuthorityFactory from "./authority/AuthorityFactory.js"; -import * as CacheHelpers from "./cache/utils/CacheHelpers.js"; -import * as TimeUtils from "./utils/TimeUtils.js"; -import * as UrlUtils from "./utils/UrlUtils.js"; -import * as AADServerParamKeys from "./constants/AADServerParamKeys.js"; - -export { AuthToken }; -export { AuthorityFactory }; -export { CacheHelpers }; -export { TimeUtils }; -export { UrlUtils }; -export { AADServerParamKeys }; - -export { AuthorizationCodeClient } from "./client/AuthorizationCodeClient.js"; -export { RefreshTokenClient } from "./client/RefreshTokenClient.js"; -export { SilentFlowClient } from "./client/SilentFlowClient.js"; -export { BaseClient } from "./client/BaseClient.js"; -export { - AuthOptions, - SystemOptions, - LoggerOptions, - CacheOptions, - DEFAULT_SYSTEM_OPTIONS, - AzureCloudOptions, - ApplicationTelemetry, -} from "./config/ClientConfiguration.js"; -export { ClientConfiguration } from "./config/ClientConfiguration.js"; -export { - AccountInfo, - ActiveAccountFilters, - TenantProfile, - updateAccountTenantProfileData, - tenantIdMatchesHomeTenant, - buildTenantProfile, -} from "./account/AccountInfo.js"; -export { - TokenClaims, - getTenantIdFromIdTokenClaims, -} from "./account/TokenClaims.js"; -export { TokenClaims as IdTokenClaims } from "./account/TokenClaims.js"; -export { CcsCredential, CcsCredentialType } from "./account/CcsCredential.js"; -export { - ClientInfo, - buildClientInfo, - buildClientInfoFromHomeAccountId, -} from "./account/ClientInfo.js"; -export { - Authority, - formatAuthorityUri, - buildStaticAuthorityOptions, -} from "./authority/Authority.js"; -export { - AuthorityOptions, - AzureCloudInstance, - StaticAuthorityOptions, -} from "./authority/AuthorityOptions.js"; -export { AuthorityType } from "./authority/AuthorityType.js"; -export { ProtocolMode } from "./authority/ProtocolMode.js"; -export { OIDCOptions } from "./authority/OIDCOptions.js"; -export { CacheManager, DefaultStorageClass } from "./cache/CacheManager.js"; -export { - AccountCache, - AccountFilter, - AccessTokenCache, - IdTokenCache, - RefreshTokenCache, - AppMetadataCache, - CredentialFilter, - ValidCacheType, - ValidCredentialType, - TokenKeys, -} from "./cache/utils/CacheTypes.js"; -export { CacheRecord } from "./cache/entities/CacheRecord.js"; -export { CredentialEntity } from "./cache/entities/CredentialEntity.js"; -export { AppMetadataEntity } from "./cache/entities/AppMetadataEntity.js"; -export { AccountEntity } from "./cache/entities/AccountEntity.js"; -export { IdTokenEntity } from "./cache/entities/IdTokenEntity.js"; -export { AccessTokenEntity } from "./cache/entities/AccessTokenEntity.js"; -export { RefreshTokenEntity } from "./cache/entities/RefreshTokenEntity.js"; -export { ServerTelemetryEntity } from "./cache/entities/ServerTelemetryEntity.js"; -export { AuthorityMetadataEntity } from "./cache/entities/AuthorityMetadataEntity.js"; -export { ThrottlingEntity } from "./cache/entities/ThrottlingEntity.js"; -export { - INetworkModule, - NetworkRequestOptions, - StubbedNetworkModule, -} from "./network/INetworkModule.js"; -export { NetworkResponse } from "./network/NetworkResponse.js"; -export { ThrottlingUtils } from "./network/ThrottlingUtils.js"; -export { RequestThumbprint } from "./network/RequestThumbprint.js"; -export { IUri } from "./url/IUri.js"; -export { UrlString } from "./url/UrlString.js"; -export { - ICrypto, - PkceCodes, - DEFAULT_CRYPTO_IMPLEMENTATION, - SignedHttpRequestParameters, -} from "./crypto/ICrypto.js"; -export { BaseAuthRequest } from "./request/BaseAuthRequest.js"; -export { CommonAuthorizationUrlRequest } from "./request/CommonAuthorizationUrlRequest.js"; -export { CommonAuthorizationCodeRequest } from "./request/CommonAuthorizationCodeRequest.js"; -export { CommonRefreshTokenRequest } from "./request/CommonRefreshTokenRequest.js"; -export { CommonSilentFlowRequest } from "./request/CommonSilentFlowRequest.js"; -export { CommonEndSessionRequest } from "./request/CommonEndSessionRequest.js"; -export { RequestParameterBuilder } from "./request/RequestParameterBuilder.js"; -export { StoreInCache } from "./request/StoreInCache.js"; -export { AzureRegion } from "./authority/AzureRegion.js"; -export { AzureRegionConfiguration } from "./authority/AzureRegionConfiguration.js"; -export { AuthenticationResult } from "./response/AuthenticationResult.js"; -export { AuthorizationCodePayload } from "./response/AuthorizationCodePayload.js"; -export { ServerAuthorizationCodeResponse } from "./response/ServerAuthorizationCodeResponse.js"; -export { ServerAuthorizationTokenResponse } from "./response/ServerAuthorizationTokenResponse.js"; -export { - ResponseHandler, - buildAccountToCache, -} from "./response/ResponseHandler.js"; -export { ScopeSet } from "./request/ScopeSet.js"; -export { AuthenticationHeaderParser } from "./request/AuthenticationHeaderParser.js"; -export { ILoggerCallback, LogLevel, Logger } from "./logger/Logger.js"; -export { - InteractionRequiredAuthError, - InteractionRequiredAuthErrorCodes, - InteractionRequiredAuthErrorMessage, - createInteractionRequiredAuthError, -} from "./error/InteractionRequiredAuthError.js"; -export { - AuthError, - AuthErrorMessage, - AuthErrorCodes, - createAuthError, -} from "./error/AuthError.js"; -export { ServerError } from "./error/ServerError.js"; -export { NetworkError, createNetworkError } from "./error/NetworkError.js"; -export { - CacheError, - CacheErrorCodes, - createCacheError, -} from "./error/CacheError.js"; -export { - ClientAuthError, - ClientAuthErrorMessage, - ClientAuthErrorCodes, - createClientAuthError, -} from "./error/ClientAuthError.js"; -export { - ClientConfigurationError, - ClientConfigurationErrorMessage, - ClientConfigurationErrorCodes, - createClientConfigurationError, -} from "./error/ClientConfigurationError.js"; -export { - Constants, - OIDC_DEFAULT_SCOPES, - PromptValue, - PersistentCacheKeys, - ServerResponseType, - ResponseMode, - CacheOutcome, - CredentialType, - CacheType, - CacheAccountType, - AuthenticationScheme, - CodeChallengeMethodValues, - PasswordGrantConstants, - ThrottlingConstants, - ClaimsRequestKeys, - HeaderNames, - Errors, - THE_FAMILY_ID, - ONE_DAY_IN_MS, - GrantType, - AADAuthorityConstants, - HttpStatus, - DEFAULT_TOKEN_RENEWAL_OFFSET_SEC, - JsonWebTokenTypes, -} from "./utils/Constants.js"; -export { StringUtils } from "./utils/StringUtils.js"; -export { StringDict } from "./utils/MsalTypes.js"; -export { - ProtocolUtils, - RequestStateObject, - LibraryStateObject, -} from "./utils/ProtocolUtils.js"; -export * from "./utils/FunctionWrappers.js"; -export { ServerTelemetryManager } from "./telemetry/server/ServerTelemetryManager.js"; -export { ServerTelemetryRequest } from "./telemetry/server/ServerTelemetryRequest.js"; -export { version } from "./packageMetadata.js"; diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/src/exports-node-only.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/src/exports-node-only.ts deleted file mode 100644 index 9d68959..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/src/exports-node-only.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import * as ClientAssertionUtils from "./utils/ClientAssertionUtils.js"; - -export { ClientAssertionUtils }; - -export { - IAppTokenProvider, - AppTokenProviderParameters, - AppTokenProviderResult, -} from "./config/AppTokenProvider.js"; -export { INativeBrokerPlugin } from "./broker/nativeBroker/INativeBrokerPlugin.js"; -export { ICachePlugin } from "./cache/interface/ICachePlugin.js"; -export { TokenCacheContext } from "./cache/persistence/TokenCacheContext.js"; -export { ISerializableTokenCache } from "./cache/interface/ISerializableTokenCache.js"; -export { CommonClientCredentialRequest } from "./request/CommonClientCredentialRequest.js"; -export { CommonOnBehalfOfRequest } from "./request/CommonOnBehalfOfRequest.js"; -export { CommonDeviceCodeRequest } from "./request/CommonDeviceCodeRequest.js"; -export { CommonUsernamePasswordRequest } from "./request/CommonUsernamePasswordRequest.js"; -export { NativeRequest } from "./request/NativeRequest.js"; -export { NativeSignOutRequest } from "./request/NativeSignOutRequest.js"; -export { - ClientAssertion, - ClientAssertionConfig, - ClientAssertionCallback, -} from "./account/ClientCredentials.js"; -export { - DeviceCodeResponse, - ServerDeviceCodeResponse, -} from "./response/DeviceCodeResponse.js"; -export { getClientAssertion } from "./utils/ClientAssertionUtils.js"; -export { IGuidGenerator } from "./crypto/IGuidGenerator.js"; diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/src/index-browser.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/src/index-browser.ts deleted file mode 100644 index c3cc009..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/src/index-browser.ts +++ /dev/null @@ -1,11 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -/** - * This file is the entrypoint when importing with the browser subpath e.g. "import { someExport } from @azure/msal-common/browser" - * Additional exports should be added to the applicable exports-*.ts files - */ -export * from "./exports-common.js"; -export * from "./exports-browser-only.js"; diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/src/index-node.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/src/index-node.ts deleted file mode 100644 index f2b32c0..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/src/index-node.ts +++ /dev/null @@ -1,11 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -/** - * This file is the entrypoint when importing with the node subpath e.g. "import { someExport } from @azure/msal-common/node" - * Additional exports should be added to the applicable exports-*.ts files - */ -export * from "./exports-common.js"; -export * from "./exports-node-only.js"; diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/src/index.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/src/index.ts deleted file mode 100644 index ddbd74f..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/src/index.ts +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -/** - * @packageDocumentation - * @module @azure/msal-common - */ - -/** - * This file is the entrypoint when importing without a specific subpath e.g. "import { someExport } from @azure/msal-common" - * Additional exports should be added to the applicable exports-*.ts files - */ -export * from "./exports-common.js"; -export * from "./exports-browser-only.js"; -export * from "./exports-node-only.js"; diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/src/logger/Logger.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/src/logger/Logger.ts deleted file mode 100644 index ca4f090..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/src/logger/Logger.ts +++ /dev/null @@ -1,272 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import { LoggerOptions } from "../config/ClientConfiguration.js"; -import { Constants } from "../utils/Constants.js"; - -/** - * Options for logger messages. - */ -export type LoggerMessageOptions = { - logLevel: LogLevel; - containsPii?: boolean; - context?: string; - correlationId?: string; -}; - -/** - * Log message level. - */ -export enum LogLevel { - Error, - Warning, - Info, - Verbose, - Trace, -} - -/** - * Callback to send the messages to. - */ -export interface ILoggerCallback { - (level: LogLevel, message: string, containsPii: boolean): void; -} - -/** - * Class which facilitates logging of messages to a specific place. - */ -export class Logger { - // Correlation ID for request, usually set by user. - private correlationId: string; - - // Current log level, defaults to info. - private level: LogLevel = LogLevel.Info; - - // Boolean describing whether PII logging is allowed. - private piiLoggingEnabled: boolean; - - // Callback to send messages to. - private localCallback: ILoggerCallback; - - // Package name implementing this logger - private packageName: string; - - // Package version implementing this logger - private packageVersion: string; - - constructor( - loggerOptions: LoggerOptions, - packageName?: string, - packageVersion?: string - ) { - const defaultLoggerCallback = () => { - return; - }; - const setLoggerOptions = - loggerOptions || Logger.createDefaultLoggerOptions(); - this.localCallback = - setLoggerOptions.loggerCallback || defaultLoggerCallback; - this.piiLoggingEnabled = setLoggerOptions.piiLoggingEnabled || false; - this.level = - typeof setLoggerOptions.logLevel === "number" - ? setLoggerOptions.logLevel - : LogLevel.Info; - this.correlationId = - setLoggerOptions.correlationId || Constants.EMPTY_STRING; - this.packageName = packageName || Constants.EMPTY_STRING; - this.packageVersion = packageVersion || Constants.EMPTY_STRING; - } - - private static createDefaultLoggerOptions(): LoggerOptions { - return { - loggerCallback: () => { - // allow users to not set loggerCallback - }, - piiLoggingEnabled: false, - logLevel: LogLevel.Info, - }; - } - - /** - * Create new Logger with existing configurations. - */ - public clone( - packageName: string, - packageVersion: string, - correlationId?: string - ): Logger { - return new Logger( - { - loggerCallback: this.localCallback, - piiLoggingEnabled: this.piiLoggingEnabled, - logLevel: this.level, - correlationId: correlationId || this.correlationId, - }, - packageName, - packageVersion - ); - } - - /** - * Log message with required options. - */ - private logMessage( - logMessage: string, - options: LoggerMessageOptions - ): void { - if ( - options.logLevel > this.level || - (!this.piiLoggingEnabled && options.containsPii) - ) { - return; - } - const timestamp = new Date().toUTCString(); - - // Add correlationId to logs if set, correlationId provided on log messages take precedence - const logHeader = `[${timestamp}] : [${ - options.correlationId || this.correlationId || "" - }]`; - - const log = `${logHeader} : ${this.packageName}@${ - this.packageVersion - } : ${LogLevel[options.logLevel]} - ${logMessage}`; - // debug(`msal:${LogLevel[options.logLevel]}${options.containsPii ? "-Pii": Constants.EMPTY_STRING}${options.context ? `:${options.context}` : Constants.EMPTY_STRING}`)(logMessage); - this.executeCallback( - options.logLevel, - log, - options.containsPii || false - ); - } - - /** - * Execute callback with message. - */ - executeCallback( - level: LogLevel, - message: string, - containsPii: boolean - ): void { - if (this.localCallback) { - this.localCallback(level, message, containsPii); - } - } - - /** - * Logs error messages. - */ - error(message: string, correlationId?: string): void { - this.logMessage(message, { - logLevel: LogLevel.Error, - containsPii: false, - correlationId: correlationId || Constants.EMPTY_STRING, - }); - } - - /** - * Logs error messages with PII. - */ - errorPii(message: string, correlationId?: string): void { - this.logMessage(message, { - logLevel: LogLevel.Error, - containsPii: true, - correlationId: correlationId || Constants.EMPTY_STRING, - }); - } - - /** - * Logs warning messages. - */ - warning(message: string, correlationId?: string): void { - this.logMessage(message, { - logLevel: LogLevel.Warning, - containsPii: false, - correlationId: correlationId || Constants.EMPTY_STRING, - }); - } - - /** - * Logs warning messages with PII. - */ - warningPii(message: string, correlationId?: string): void { - this.logMessage(message, { - logLevel: LogLevel.Warning, - containsPii: true, - correlationId: correlationId || Constants.EMPTY_STRING, - }); - } - - /** - * Logs info messages. - */ - info(message: string, correlationId?: string): void { - this.logMessage(message, { - logLevel: LogLevel.Info, - containsPii: false, - correlationId: correlationId || Constants.EMPTY_STRING, - }); - } - - /** - * Logs info messages with PII. - */ - infoPii(message: string, correlationId?: string): void { - this.logMessage(message, { - logLevel: LogLevel.Info, - containsPii: true, - correlationId: correlationId || Constants.EMPTY_STRING, - }); - } - - /** - * Logs verbose messages. - */ - verbose(message: string, correlationId?: string): void { - this.logMessage(message, { - logLevel: LogLevel.Verbose, - containsPii: false, - correlationId: correlationId || Constants.EMPTY_STRING, - }); - } - - /** - * Logs verbose messages with PII. - */ - verbosePii(message: string, correlationId?: string): void { - this.logMessage(message, { - logLevel: LogLevel.Verbose, - containsPii: true, - correlationId: correlationId || Constants.EMPTY_STRING, - }); - } - - /** - * Logs trace messages. - */ - trace(message: string, correlationId?: string): void { - this.logMessage(message, { - logLevel: LogLevel.Trace, - containsPii: false, - correlationId: correlationId || Constants.EMPTY_STRING, - }); - } - - /** - * Logs trace messages with PII. - */ - tracePii(message: string, correlationId?: string): void { - this.logMessage(message, { - logLevel: LogLevel.Trace, - containsPii: true, - correlationId: correlationId || Constants.EMPTY_STRING, - }); - } - - /** - * Returns whether PII Logging is enabled or not. - */ - isPiiLoggingEnabled(): boolean { - return this.piiLoggingEnabled || false; - } -} diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/src/network/INetworkModule.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/src/network/INetworkModule.ts deleted file mode 100644 index 870755a..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/src/network/INetworkModule.ts +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import { - ClientAuthErrorCodes, - createClientAuthError, -} from "../error/ClientAuthError.js"; -import { NetworkResponse } from "./NetworkResponse.js"; - -/** - * Options allowed by network request APIs. - */ -export type NetworkRequestOptions = { - headers?: Record; - body?: string; -}; - -/** - * Client network interface to send backend requests. - * @interface - */ -export interface INetworkModule { - /** - * Interface function for async network "GET" requests. Based on the Fetch standard: https://fetch.spec.whatwg.org/ - * @param url - * @param requestParams - * @param enableCaching - */ - sendGetRequestAsync( - url: string, - options?: NetworkRequestOptions, - timeout?: number - ): Promise>; - - /** - * Interface function for async network "POST" requests. Based on the Fetch standard: https://fetch.spec.whatwg.org/ - * @param url - * @param requestParams - * @param enableCaching - */ - sendPostRequestAsync( - url: string, - options?: NetworkRequestOptions - ): Promise>; -} - -export const StubbedNetworkModule: INetworkModule = { - sendGetRequestAsync: () => { - return Promise.reject( - createClientAuthError(ClientAuthErrorCodes.methodNotImplemented) - ); - }, - sendPostRequestAsync: () => { - return Promise.reject( - createClientAuthError(ClientAuthErrorCodes.methodNotImplemented) - ); - }, -}; diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/src/network/NetworkResponse.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/src/network/NetworkResponse.ts deleted file mode 100644 index d2e30f1..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/src/network/NetworkResponse.ts +++ /dev/null @@ -1,10 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -export type NetworkResponse = { - headers: Record; - body: T; - status: number; -}; diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/src/network/RequestThumbprint.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/src/network/RequestThumbprint.ts deleted file mode 100644 index 3336a67..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/src/network/RequestThumbprint.ts +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import { ShrOptions } from "../crypto/SignedHttpRequest.js"; -import { AuthenticationScheme } from "../utils/Constants.js"; - -/** - * Type representing a unique request thumbprint. - */ -export type RequestThumbprint = { - clientId: string; - authority: string; - scopes: Array; - homeAccountIdentifier?: string; - claims?: string; - authenticationScheme?: AuthenticationScheme; - resourceRequestMethod?: string; - resourceRequestUri?: string; - shrClaims?: string; - sshKid?: string; - shrOptions?: ShrOptions; -}; diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/src/network/ThrottlingUtils.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/src/network/ThrottlingUtils.ts deleted file mode 100644 index 104756e..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/src/network/ThrottlingUtils.ts +++ /dev/null @@ -1,159 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import { NetworkResponse } from "./NetworkResponse.js"; -import { ServerAuthorizationTokenResponse } from "../response/ServerAuthorizationTokenResponse.js"; -import { - HeaderNames, - ThrottlingConstants, - Constants, -} from "../utils/Constants.js"; -import { CacheManager } from "../cache/CacheManager.js"; -import { ServerError } from "../error/ServerError.js"; -import { RequestThumbprint } from "./RequestThumbprint.js"; -import { ThrottlingEntity } from "../cache/entities/ThrottlingEntity.js"; -import { BaseAuthRequest } from "../request/BaseAuthRequest.js"; - -/** @internal */ -export class ThrottlingUtils { - /** - * Prepares a RequestThumbprint to be stored as a key. - * @param thumbprint - */ - static generateThrottlingStorageKey(thumbprint: RequestThumbprint): string { - return `${ThrottlingConstants.THROTTLING_PREFIX}.${JSON.stringify( - thumbprint - )}`; - } - - /** - * Performs necessary throttling checks before a network request. - * @param cacheManager - * @param thumbprint - */ - static preProcess( - cacheManager: CacheManager, - thumbprint: RequestThumbprint, - correlationId: string - ): void { - const key = ThrottlingUtils.generateThrottlingStorageKey(thumbprint); - const value = cacheManager.getThrottlingCache(key); - - if (value) { - if (value.throttleTime < Date.now()) { - cacheManager.removeItem(key, correlationId); - return; - } - throw new ServerError( - value.errorCodes?.join(" ") || Constants.EMPTY_STRING, - value.errorMessage, - value.subError - ); - } - } - - /** - * Performs necessary throttling checks after a network request. - * @param cacheManager - * @param thumbprint - * @param response - */ - static postProcess( - cacheManager: CacheManager, - thumbprint: RequestThumbprint, - response: NetworkResponse, - correlationId: string - ): void { - if ( - ThrottlingUtils.checkResponseStatus(response) || - ThrottlingUtils.checkResponseForRetryAfter(response) - ) { - const thumbprintValue: ThrottlingEntity = { - throttleTime: ThrottlingUtils.calculateThrottleTime( - parseInt(response.headers[HeaderNames.RETRY_AFTER]) - ), - error: response.body.error, - errorCodes: response.body.error_codes, - errorMessage: response.body.error_description, - subError: response.body.suberror, - }; - cacheManager.setThrottlingCache( - ThrottlingUtils.generateThrottlingStorageKey(thumbprint), - thumbprintValue, - correlationId - ); - } - } - - /** - * Checks a NetworkResponse object's status codes against 429 or 5xx - * @param response - */ - static checkResponseStatus( - response: NetworkResponse - ): boolean { - return ( - response.status === 429 || - (response.status >= 500 && response.status < 600) - ); - } - - /** - * Checks a NetworkResponse object's RetryAfter header - * @param response - */ - static checkResponseForRetryAfter( - response: NetworkResponse - ): boolean { - if (response.headers) { - return ( - response.headers.hasOwnProperty(HeaderNames.RETRY_AFTER) && - (response.status < 200 || response.status >= 300) - ); - } - return false; - } - - /** - * Calculates the Unix-time value for a throttle to expire given throttleTime in seconds. - * @param throttleTime - */ - static calculateThrottleTime(throttleTime: number): number { - const time = throttleTime <= 0 ? 0 : throttleTime; - - const currentSeconds = Date.now() / 1000; - return Math.floor( - Math.min( - currentSeconds + - (time || ThrottlingConstants.DEFAULT_THROTTLE_TIME_SECONDS), - currentSeconds + - ThrottlingConstants.DEFAULT_MAX_THROTTLE_TIME_SECONDS - ) * 1000 - ); - } - - static removeThrottle( - cacheManager: CacheManager, - clientId: string, - request: BaseAuthRequest, - homeAccountIdentifier?: string - ): void { - const thumbprint: RequestThumbprint = { - clientId: clientId, - authority: request.authority, - scopes: request.scopes, - homeAccountIdentifier: homeAccountIdentifier, - claims: request.claims, - authenticationScheme: request.authenticationScheme, - resourceRequestMethod: request.resourceRequestMethod, - resourceRequestUri: request.resourceRequestUri, - shrClaims: request.shrClaims, - sshKid: request.sshKid, - }; - - const key = this.generateThrottlingStorageKey(thumbprint); - cacheManager.removeItem(key, request.correlationId); - } -} diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/src/packageMetadata.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/src/packageMetadata.ts deleted file mode 100644 index a660ec8..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/src/packageMetadata.ts +++ /dev/null @@ -1,3 +0,0 @@ -/* eslint-disable header/header */ -export const name = "@azure/msal-common"; -export const version = "14.16.1"; diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/src/request/AuthenticationHeaderParser.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/src/request/AuthenticationHeaderParser.ts deleted file mode 100644 index 760bbf9..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/src/request/AuthenticationHeaderParser.ts +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import { - createClientConfigurationError, - ClientConfigurationErrorCodes, -} from "../error/ClientConfigurationError.js"; -import { Constants, HeaderNames } from "../utils/Constants.js"; - -type WWWAuthenticateChallenges = { - nonce?: string; -}; - -type AuthenticationInfoChallenges = { - nextnonce?: string; -}; - -/** - * This is a helper class that parses supported HTTP response authentication headers to extract and return - * header challenge values that can be used outside the basic authorization flows. - */ -export class AuthenticationHeaderParser { - private headers: Record; - - constructor(headers: Record) { - this.headers = headers; - } - - /** - * This method parses the SHR nonce value out of either the Authentication-Info or WWW-Authenticate authentication headers. - * @returns - */ - getShrNonce(): string { - // Attempt to parse nonce from Authentiacation-Info - const authenticationInfo = this.headers[HeaderNames.AuthenticationInfo]; - if (authenticationInfo) { - const authenticationInfoChallenges = - this.parseChallenges( - authenticationInfo - ); - if (authenticationInfoChallenges.nextnonce) { - return authenticationInfoChallenges.nextnonce; - } - throw createClientConfigurationError( - ClientConfigurationErrorCodes.invalidAuthenticationHeader - ); - } - - // Attempt to parse nonce from WWW-Authenticate - const wwwAuthenticate = this.headers[HeaderNames.WWWAuthenticate]; - if (wwwAuthenticate) { - const wwwAuthenticateChallenges = - this.parseChallenges( - wwwAuthenticate - ); - if (wwwAuthenticateChallenges.nonce) { - return wwwAuthenticateChallenges.nonce; - } - throw createClientConfigurationError( - ClientConfigurationErrorCodes.invalidAuthenticationHeader - ); - } - - // If neither header is present, throw missing headers error - throw createClientConfigurationError( - ClientConfigurationErrorCodes.missingNonceAuthenticationHeader - ); - } - - /** - * Parses an HTTP header's challenge set into a key/value map. - * @param header - * @returns - */ - private parseChallenges(header: string): T { - const schemeSeparator = header.indexOf(" "); - const challenges = header.substr(schemeSeparator + 1).split(","); - const challengeMap = {} as T; - - challenges.forEach((challenge: string) => { - const [key, value] = challenge.split("="); - // Remove escaped quotation marks (', ") from challenge string to keep only the challenge value - challengeMap[key] = unescape( - value.replace(/['"]+/g, Constants.EMPTY_STRING) - ); - }); - - return challengeMap; - } -} diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/src/request/BaseAuthRequest.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/src/request/BaseAuthRequest.ts deleted file mode 100644 index f919f90..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/src/request/BaseAuthRequest.ts +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import { AuthenticationScheme } from "../utils/Constants.js"; -import { AzureCloudOptions } from "../config/ClientConfiguration.js"; -import { StringDict } from "../utils/MsalTypes.js"; -import { StoreInCache } from "./StoreInCache.js"; -import { ShrOptions } from "../crypto/SignedHttpRequest.js"; - -/** - * BaseAuthRequest - * - authority - URL of the authority, the security token service (STS) from which MSAL will acquire tokens. Defaults to https://login.microsoftonline.com/common. If using the same authority for all request, authority should set on client application object and not request, to avoid resolving authority endpoints multiple times. - * - correlationId - Unique GUID set per request to trace a request end-to-end for telemetry purposes. - * - scopes - Array of scopes the application is requesting access to. - * - authenticationScheme - The type of token retrieved. Defaults to "Bearer". Can also be type "pop" or "SSH". - * - claims - A stringified claims request which will be added to all /authorize and /token calls - * - shrClaims - A stringified claims object which will be added to a Signed HTTP Request - * - shrNonce - A server-generated timestamp that has been encrypted and base64URL encoded, which will be added to a Signed HTTP Request. - * - shrOptions - An object containing options for the Signed HTTP Request - * - resourceRequestMethod - HTTP Request type used to request data from the resource (i.e. "GET", "POST", etc.). Used for proof-of-possession flows. - * - resourceRequestUri - URI that token will be used for. Used for proof-of-possession flows. - * - sshJwk - A stringified JSON Web Key representing a public key that can be signed by an SSH certificate. - * - sshKid - Key ID that uniquely identifies the SSH public key mentioned above. - * - azureCloudOptions - Convenience string enums for users to provide public/sovereign cloud ids - * - requestedClaimsHash - SHA 256 hash string of the requested claims string, used as part of an access token cache key so tokens can be filtered by requested claims - * - tokenQueryParameters - String to string map of custom query parameters added to the /token call - * - storeInCache - Object containing boolean values indicating whether to store tokens in the cache or not (default is true) - * - scenarioId - Scenario id to track custom user prompts - * - popKid - Key ID to identify the public key for PoP token request - * - embeddedClientId - Embedded client id. When specified, broker client id (brk_client_id) and redirect uri (brk_redirect_uri) params are set with values from the config, overriding the corresponding extra parameters, if present. - */ -export type BaseAuthRequest = { - authority: string; - correlationId: string; - scopes: Array; - authenticationScheme?: AuthenticationScheme; - claims?: string; - shrClaims?: string; - shrNonce?: string; - shrOptions?: ShrOptions; - resourceRequestMethod?: string; - resourceRequestUri?: string; - sshJwk?: string; - sshKid?: string; - azureCloudOptions?: AzureCloudOptions; - requestedClaimsHash?: string; - maxAge?: number; - tokenQueryParameters?: StringDict; - storeInCache?: StoreInCache; - scenarioId?: string; - popKid?: string; - embeddedClientId?: string; -}; diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/src/request/CommonAuthorizationCodeRequest.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/src/request/CommonAuthorizationCodeRequest.ts deleted file mode 100644 index fddaa79..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/src/request/CommonAuthorizationCodeRequest.ts +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import { BaseAuthRequest } from "./BaseAuthRequest.js"; -import { StringDict } from "../utils/MsalTypes.js"; -import { CcsCredential } from "../account/CcsCredential.js"; - -/** - * Request object passed by user to acquire a token from the server exchanging a valid authorization code (second leg of OAuth2.0 Authorization Code flow) - * - * - scopes - Array of scopes the application is requesting access to. - * - claims - A stringified claims request which will be added to all /authorize and /token calls - * - authority: - URL of the authority, the security token service (STS) from which MSAL will acquire tokens. If authority is set on client application object, this will override that value. Overriding the value will cause for authority validation to happen each time. If the same authority will be used for all request, set on the application object instead of the requests. - * - correlationId - Unique GUID set per request to trace a request end-to-end for telemetry purposes. - * - redirectUri - The redirect URI of your app, where the authority will redirect to after the user inputs credentials and consents. It must exactly match one of the redirect URIs you registered in the portal - * - code - The authorization_code that the user acquired in the first leg of the flow. - * - codeVerifier - The same code_verifier that was used to obtain the authorization_code. Required if PKCE was used in the authorization code grant request.For more information, see the PKCE RFC: https://tools.ietf.org/html/rfc7636 - * - resourceRequestMethod - HTTP Request type used to request data from the resource (i.e. "GET", "POST", etc.). Used for proof-of-possession flows. - * - resourceRequestUri - URI that token will be used for. Used for proof-of-possession flows. - * - enableSpaAuthCode - Enables the acqusition of a spa authorization code (confidential clients only) - * - tokenQueryParameters - String to string map of custom query parameters added to the /token call - */ -export type CommonAuthorizationCodeRequest = BaseAuthRequest & { - code: string; - redirectUri: string; - codeVerifier?: string; - tokenBodyParameters?: StringDict; - enableSpaAuthorizationCode?: boolean; - clientInfo?: string; - ccsCredential?: CcsCredential; -}; diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/src/request/CommonAuthorizationUrlRequest.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/src/request/CommonAuthorizationUrlRequest.ts deleted file mode 100644 index ffaca49..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/src/request/CommonAuthorizationUrlRequest.ts +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import { ResponseMode } from "../utils/Constants.js"; -import { StringDict } from "../utils/MsalTypes.js"; -import { BaseAuthRequest } from "./BaseAuthRequest.js"; -import { AccountInfo } from "../account/AccountInfo.js"; - -/** - * Request object passed by user to retrieve a Code from the server (first leg of authorization code grant flow) - * - * - scopes - Array of scopes the application is requesting access to. - * - claims - A stringified claims request which will be added to all /authorize and /token calls - * - authority - Url of the authority which the application acquires tokens from. - * - correlationId - Unique GUID set per request to trace a request end-to-end for telemetry purposes. - * - redirectUri - The redirect URI where authentication responses can be received by your application. It must exactly match one of the redirect URIs registered in the Azure portal. - * - extraScopesToConsent - Scopes for a different resource when the user needs consent upfront. - * - responseMode - Specifies the method that should be used to send the authentication result to your app. Can be query, form_post, or fragment. If no value is passed in, it defaults to query. - * - codeChallenge - Used to secure authorization code grant via Proof of Key for Code Exchange (PKCE). For more information, see the PKCE RCF:https://tools.ietf.org/html/rfc7636 - * - codeChallengeMethod - The method used to encode the code verifier for the code challenge parameter. Can be "plain" or "S256". If excluded, code challenge is assumed to be plaintext. For more information, see the PKCE RCF: https://tools.ietf.org/html/rfc7636 - * - state - A value included in the request that is also returned in the token response. A randomly generated unique value is typically used for preventing cross site request forgery attacks. The state is also used to encode information about the user's state in the app before the authentication request occurred. - * - prompt - Indicates the type of user interaction that is required. - * login: will force the user to enter their credentials on that request, negating single-sign on - * none: will ensure that the user isn't presented with any interactive prompt. if request can't be completed via single-sign on, the endpoint will return an interaction_required error - * consent: will the trigger the OAuth consent dialog after the user signs in, asking the user to grant permissions to the app - * select_account: will interrupt single sign-=on providing account selection experience listing all the accounts in session or any remembered accounts or an option to choose to use a different account - * create: will direct the user to the account creation experience instead of the log in experience - * no_session: will not read existing session token when authenticating the user. Upon user being successfully authenticated, EVO won’t create a new session for the user. FOR INTERNAL USE ONLY. - * - account - AccountInfo obtained from a getAccount API. Will be used in certain scenarios to generate login_hint if both loginHint and sid params are not provided. - * - loginHint - Can be used to pre-fill the username/email address field of the sign-in page for the user, if you know the username/email address ahead of time. Often apps use this parameter during re-authentication, having already extracted the username from a previous sign-in using the preferred_username claim. - * - sid - Session ID, unique identifier for the session. Available as an optional claim on ID tokens. - * - domainHint - Provides a hint about the tenant or domain that the user should use to sign in. The value of the domain hint is a registered domain for the tenant. - * - extraQueryParameters - String to string map of custom query parameters added to the /authorize call - * - tokenQueryParameters - String to string map of custom query parameters added to the /token call - * - nonce - A value included in the request that is returned in the id token. A randomly generated unique value is typically used to mitigate replay attacks. - * - resourceRequestMethod - HTTP Request type used to request data from the resource (i.e. "GET", "POST", etc.). Used for proof-of-possession flows. - * - resourceRequestUri - URI that token will be used for. Used for proof-of-possession flows. - */ -export type CommonAuthorizationUrlRequest = BaseAuthRequest & { - redirectUri: string; - responseMode: ResponseMode; - account?: AccountInfo; - codeChallenge?: string; - codeChallengeMethod?: string; - domainHint?: string; - extraQueryParameters?: StringDict; - extraScopesToConsent?: Array; - loginHint?: string; - nonce?: string; - prompt?: string; - sid?: string; - state?: string; - nativeBroker?: boolean; -}; diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/src/request/CommonClientCredentialRequest.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/src/request/CommonClientCredentialRequest.ts deleted file mode 100644 index d913dc8..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/src/request/CommonClientCredentialRequest.ts +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import { BaseAuthRequest } from "./BaseAuthRequest.js"; -import { AzureRegion } from "../authority/AzureRegion.js"; -import { ClientAssertion } from "../account/ClientCredentials.js"; - -/** - * CommonClientCredentialRequest - * - scopes - Array of scopes the application is requesting access to. - * - authority - URL of the authority, the security token service (STS) from which MSAL will acquire tokens. - * - correlationId - Unique GUID set per request to trace a request end-to-end for telemetry purposes. - * - skipCache - Skip token cache lookup and force request to authority to get a a new token. Defaults to false. - * - preferredAzureRegionOptions - Options of the user's preferred azure region - * - tokenQueryParameters - String to string map of custom query parameters added to the /token call - */ -export type CommonClientCredentialRequest = BaseAuthRequest & { - skipCache?: boolean; - azureRegion?: AzureRegion; - clientAssertion?: ClientAssertion; -}; diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/src/request/CommonDeviceCodeRequest.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/src/request/CommonDeviceCodeRequest.ts deleted file mode 100644 index 32e59b7..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/src/request/CommonDeviceCodeRequest.ts +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import { DeviceCodeResponse } from "../response/DeviceCodeResponse.js"; -import { StringDict } from "../utils/MsalTypes.js"; -import { BaseAuthRequest } from "./BaseAuthRequest.js"; - -/** - * Parameters for Oauth2 device code flow. - * - scopes - Array of scopes the application is requesting access to. - * - authority: - URL of the authority, the security token service (STS) from which MSAL will acquire tokens. If authority is set on client application object, this will override that value. Overriding the value will cause for authority validation to happen each time. If the same authority will be used for all request, set on the application object instead of the requests. - * - correlationId - Unique GUID set per request to trace a request end-to-end for telemetry purposes. - * - deviceCodeCallback - Callback containing device code response. Message should be shown to end user. End user can then navigate to the verification_uri, input the user_code, and input credentials. - * - cancel - Boolean to cancel polling of device code endpoint. While the user authenticates on a separate device, MSAL polls the the token endpoint of security token service for the interval specified in the device code response (usually 15 minutes). To stop polling and cancel the request, set cancel=true. - * - resourceRequestMethod - HTTP Request type used to request data from the resource (i.e. "GET", "POST", etc.). Used for proof-of-possession flows. - * - resourceRequestUri - URI that token will be used for. Used for proof-of-possession flows. - * - timeout - Timeout period in seconds which the user explicitly configures for the polling of the device code endpoint. At the end of this period; assuming the device code has not expired yet; the device code polling is stopped and the request cancelled. The device code expiration window will always take precedence over this set period. - * - extraQueryParameters - String to string map of custom query parameters added to the query string - */ -// export type CommonDeviceCodeRequest = BaseAuthRequest & { -export type CommonDeviceCodeRequest = Omit< - BaseAuthRequest, - "tokenQueryParameters" -> & { - deviceCodeCallback: (response: DeviceCodeResponse) => void; - cancel?: boolean; - timeout?: number; - extraQueryParameters?: StringDict; -}; diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/src/request/CommonEndSessionRequest.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/src/request/CommonEndSessionRequest.ts deleted file mode 100644 index 1b35613..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/src/request/CommonEndSessionRequest.ts +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import { AccountInfo } from "../account/AccountInfo.js"; -import { StringDict } from "../utils/MsalTypes.js"; - -/** - * CommonEndSessionRequest - * - account - Account object that will be logged out of. All tokens tied to this account will be cleared. - * - postLogoutRedirectUri - URI to navigate to after logout page. - * - correlationId - Unique GUID set per request to trace a request end-to-end for telemetry purposes. - * - idTokenHint - ID Token used by B2C to validate logout if required by the policy - * - state - A value included in the request to the logout endpoint which will be returned in the query string upon post logout redirection - * - logoutHint - A string that specifies the account that is being logged out in order to skip the server account picker on logout - * - extraQueryParameters - String to string map of custom query parameters added to the /authorize call - */ -export type CommonEndSessionRequest = { - correlationId: string; - account?: AccountInfo | null; - postLogoutRedirectUri?: string | null; - idTokenHint?: string; - state?: string; - logoutHint?: string; - extraQueryParameters?: StringDict; -}; diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/src/request/CommonOnBehalfOfRequest.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/src/request/CommonOnBehalfOfRequest.ts deleted file mode 100644 index bd592f6..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/src/request/CommonOnBehalfOfRequest.ts +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import { BaseAuthRequest } from "./BaseAuthRequest.js"; - -/** - * - scopes - Array of scopes the application is requesting access to. - * - authority - URL of the authority, the security token service (STS) from which MSAL will acquire tokens. - * - correlationId - Unique GUID set per request to trace a request end-to-end for telemetry purposes. - * - oboAssertion - The access token that was sent to the middle-tier API. This token must have an audience of the app making this OBO request. - * - skipCache - Skip token cache lookup and force request to authority to get a a new token. Defaults to false. - * - tokenQueryParameters - String to string map of custom query parameters added to the /token call - */ -export type CommonOnBehalfOfRequest = BaseAuthRequest & { - oboAssertion: string; - skipCache?: boolean; -}; diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/src/request/CommonRefreshTokenRequest.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/src/request/CommonRefreshTokenRequest.ts deleted file mode 100644 index 0cffc5a..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/src/request/CommonRefreshTokenRequest.ts +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import { BaseAuthRequest } from "./BaseAuthRequest.js"; -import { CcsCredential } from "../account/CcsCredential.js"; -import { StringDict } from "../utils/MsalTypes.js"; - -/** - * CommonRefreshTokenRequest - * - scopes - Array of scopes the application is requesting access to. - * - claims - A stringified claims request which will be added to all /authorize and /token calls - * - authority - URL of the authority, the security token service (STS) from which MSAL will acquire tokens. - * - correlationId - Unique GUID set per request to trace a request end-to-end for telemetry purposes. - * - refreshToken - A refresh token returned from a previous request to the Identity provider. - * - resourceRequestMethod - HTTP Request type used to request data from the resource (i.e. "GET", "POST", etc.). Used for proof-of-possession flows. - * - resourceRequestUri - URI that token will be used for. Used for proof-of-possession flows. - * - forceCache - Force MSAL to cache a refresh token flow response when there is no account in the cache. Used for migration scenarios. - * - tokenQueryParameters - String to string map of custom query parameters added to the /token call - */ -export type CommonRefreshTokenRequest = BaseAuthRequest & { - refreshToken: string; - ccsCredential?: CcsCredential; - forceCache?: boolean; - tokenBodyParameters?: StringDict; - redirectUri?: string; -}; diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/src/request/CommonSilentFlowRequest.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/src/request/CommonSilentFlowRequest.ts deleted file mode 100644 index 40e9271..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/src/request/CommonSilentFlowRequest.ts +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import { AccountInfo } from "../account/AccountInfo.js"; -import { StringDict } from "../utils/MsalTypes.js"; -import { BaseAuthRequest } from "./BaseAuthRequest.js"; - -/** - * SilentFlow parameters passed by the user to retrieve credentials silently - * - scopes - Array of scopes the application is requesting access to. - * - claims - A stringified claims request which will be added to all /authorize and /token calls. When included on a silent request, cache lookup will be skipped and token will be refreshed. - * - authority - Url of the authority which the application acquires tokens from. - * - correlationId - Unique GUID set per request to trace a request end-to-end for telemetry purposes. - * - account - Account entity to lookup the credentials. - * - forceRefresh - Forces silent requests to make network calls if true. - * - resourceRequestMethod - HTTP Request type used to request data from the resource (i.e. "GET", "POST", etc.). Used for proof-of-possession flows. - * - resourceRequestUri - URI that token will be used for. Used for proof-of-possession flows. - * - tokenQueryParameters - String to string map of custom query parameters added to the /token call - */ -export type CommonSilentFlowRequest = BaseAuthRequest & { - /** Account object to lookup the credentials */ - account: AccountInfo; - /** Skip cache lookup and forces network call(s) to get fresh tokens */ - forceRefresh: boolean; - /** RedirectUri registered on the app registration - only required in brokering scenarios */ - redirectUri?: string; - /** Key value pairs to include on the POST body to the /token endpoint */ - tokenBodyParameters?: StringDict; - /** If refresh token will expire within the configured value, consider it already expired. Used to pre-emptively invoke interaction when cached refresh token is close to expiry. */ - refreshTokenExpirationOffsetSeconds?: number; -}; diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/src/request/CommonUsernamePasswordRequest.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/src/request/CommonUsernamePasswordRequest.ts deleted file mode 100644 index 8566cfd..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/src/request/CommonUsernamePasswordRequest.ts +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import { BaseAuthRequest } from "./BaseAuthRequest.js"; - -/** - * CommonUsernamePassword parameters passed by the user to retrieve credentials - * Note: The latest OAuth 2.0 Security Best Current Practice disallows the password grant entirely. This flow is added for internal testing. - * - * - scopes - Array of scopes the application is requesting access to. - * - claims - A stringified claims request which will be added to all /authorize and /token calls. When included on a silent request, cache lookup will be skipped and token will be refreshed. - * - authority - Url of the authority which the application acquires tokens from. - * - correlationId - Unique GUID set per request to trace a request end-to-end for telemetry purposes. - * - username - username of the client - * - password - credentials - * - tokenQueryParameters - String to string map of custom query parameters added to the /token call - */ -export type CommonUsernamePasswordRequest = BaseAuthRequest & { - username: string; - password: string; -}; diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/src/request/NativeRequest.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/src/request/NativeRequest.ts deleted file mode 100644 index 015924b..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/src/request/NativeRequest.ts +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import { StringDict } from "../utils/MsalTypes.js"; - -export type NativeRequest = { - clientId: string; - authority: string; - correlationId: string; - redirectUri: string; - scopes: Array; - claims?: string; - authenticationScheme?: string; - resourceRequestMethod?: string; - resourceRequestUri?: string; - shrNonce?: string; - accountId?: string; - forceRefresh?: boolean; - extraParameters?: StringDict; - extraScopesToConsent?: Array; - loginHint?: string; - prompt?: string; -}; diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/src/request/NativeSignOutRequest.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/src/request/NativeSignOutRequest.ts deleted file mode 100644 index 38ae2e5..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/src/request/NativeSignOutRequest.ts +++ /dev/null @@ -1,10 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -export type NativeSignOutRequest = { - clientId: string; - accountId: string; - correlationId: string; -}; diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/src/request/RequestParameterBuilder.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/src/request/RequestParameterBuilder.ts deleted file mode 100644 index 0c9b9a2..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/src/request/RequestParameterBuilder.ts +++ /dev/null @@ -1,663 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import { - Constants, - ResponseMode, - CLIENT_INFO, - AuthenticationScheme, - ClaimsRequestKeys, - PasswordGrantConstants, - OIDC_DEFAULT_SCOPES, - ThrottlingConstants, - HeaderNames, -} from "../utils/Constants.js"; -import * as AADServerParamKeys from "../constants/AADServerParamKeys.js"; -import { ScopeSet } from "./ScopeSet.js"; -import { - createClientConfigurationError, - ClientConfigurationErrorCodes, -} from "../error/ClientConfigurationError.js"; -import { StringDict } from "../utils/MsalTypes.js"; -import { RequestValidator } from "./RequestValidator.js"; -import { - ApplicationTelemetry, - LibraryInfo, -} from "../config/ClientConfiguration.js"; -import { ServerTelemetryManager } from "../telemetry/server/ServerTelemetryManager.js"; -import { ClientInfo } from "../account/ClientInfo.js"; -import { IPerformanceClient } from "../telemetry/performance/IPerformanceClient.js"; - -function instrumentBrokerParams( - parameters: Map, - correlationId?: string, - performanceClient?: IPerformanceClient -) { - if (!correlationId) { - return; - } - - const clientId = parameters.get(AADServerParamKeys.CLIENT_ID); - if (clientId && parameters.has(AADServerParamKeys.BROKER_CLIENT_ID)) { - performanceClient?.addFields( - { - embeddedClientId: clientId, - embeddedRedirectUri: parameters.get( - AADServerParamKeys.REDIRECT_URI - ), - }, - correlationId - ); - } -} - -/** @internal */ -export class RequestParameterBuilder { - private parameters: Map; - private readonly performanceClient?: IPerformanceClient; - private readonly correlationId?: string; - - constructor( - correlationId?: string, - performanceClient?: IPerformanceClient - ) { - this.parameters = new Map(); - this.performanceClient = performanceClient; - this.correlationId = correlationId; - } - - /** - * add response_type = code - */ - addResponseTypeCode(): void { - this.parameters.set( - AADServerParamKeys.RESPONSE_TYPE, - encodeURIComponent(Constants.CODE_RESPONSE_TYPE) - ); - } - - /** - * add response_type = token id_token - */ - addResponseTypeForTokenAndIdToken(): void { - this.parameters.set( - AADServerParamKeys.RESPONSE_TYPE, - encodeURIComponent( - `${Constants.TOKEN_RESPONSE_TYPE} ${Constants.ID_TOKEN_RESPONSE_TYPE}` - ) - ); - } - - /** - * add response_mode. defaults to query. - * @param responseMode - */ - addResponseMode(responseMode?: ResponseMode): void { - this.parameters.set( - AADServerParamKeys.RESPONSE_MODE, - encodeURIComponent(responseMode ? responseMode : ResponseMode.QUERY) - ); - } - - /** - * Add flag to indicate STS should attempt to use WAM if available - */ - addNativeBroker(): void { - this.parameters.set( - AADServerParamKeys.NATIVE_BROKER, - encodeURIComponent("1") - ); - } - - /** - * add scopes. set addOidcScopes to false to prevent default scopes in non-user scenarios - * @param scopeSet - * @param addOidcScopes - */ - addScopes( - scopes: string[], - addOidcScopes: boolean = true, - defaultScopes: Array = OIDC_DEFAULT_SCOPES - ): void { - // Always add openid to the scopes when adding OIDC scopes - if ( - addOidcScopes && - !defaultScopes.includes("openid") && - !scopes.includes("openid") - ) { - defaultScopes.push("openid"); - } - const requestScopes = addOidcScopes - ? [...(scopes || []), ...defaultScopes] - : scopes || []; - const scopeSet = new ScopeSet(requestScopes); - this.parameters.set( - AADServerParamKeys.SCOPE, - encodeURIComponent(scopeSet.printScopes()) - ); - } - - /** - * add clientId - * @param clientId - */ - addClientId(clientId: string): void { - this.parameters.set( - AADServerParamKeys.CLIENT_ID, - encodeURIComponent(clientId) - ); - } - - /** - * add redirect_uri - * @param redirectUri - */ - addRedirectUri(redirectUri: string): void { - RequestValidator.validateRedirectUri(redirectUri); - this.parameters.set( - AADServerParamKeys.REDIRECT_URI, - encodeURIComponent(redirectUri) - ); - } - - /** - * add post logout redirectUri - * @param redirectUri - */ - addPostLogoutRedirectUri(redirectUri: string): void { - RequestValidator.validateRedirectUri(redirectUri); - this.parameters.set( - AADServerParamKeys.POST_LOGOUT_URI, - encodeURIComponent(redirectUri) - ); - } - - /** - * add id_token_hint to logout request - * @param idTokenHint - */ - addIdTokenHint(idTokenHint: string): void { - this.parameters.set( - AADServerParamKeys.ID_TOKEN_HINT, - encodeURIComponent(idTokenHint) - ); - } - - /** - * add domain_hint - * @param domainHint - */ - addDomainHint(domainHint: string): void { - this.parameters.set( - AADServerParamKeys.DOMAIN_HINT, - encodeURIComponent(domainHint) - ); - } - - /** - * add login_hint - * @param loginHint - */ - addLoginHint(loginHint: string): void { - this.parameters.set( - AADServerParamKeys.LOGIN_HINT, - encodeURIComponent(loginHint) - ); - } - - /** - * Adds the CCS (Cache Credential Service) query parameter for login_hint - * @param loginHint - */ - addCcsUpn(loginHint: string): void { - this.parameters.set( - HeaderNames.CCS_HEADER, - encodeURIComponent(`UPN:${loginHint}`) - ); - } - - /** - * Adds the CCS (Cache Credential Service) query parameter for account object - * @param loginHint - */ - addCcsOid(clientInfo: ClientInfo): void { - this.parameters.set( - HeaderNames.CCS_HEADER, - encodeURIComponent(`Oid:${clientInfo.uid}@${clientInfo.utid}`) - ); - } - - /** - * add sid - * @param sid - */ - addSid(sid: string): void { - this.parameters.set(AADServerParamKeys.SID, encodeURIComponent(sid)); - } - - /** - * add claims - * @param claims - */ - addClaims(claims?: string, clientCapabilities?: Array): void { - const mergedClaims = this.addClientCapabilitiesToClaims( - claims, - clientCapabilities - ); - RequestValidator.validateClaims(mergedClaims); - this.parameters.set( - AADServerParamKeys.CLAIMS, - encodeURIComponent(mergedClaims) - ); - } - - /** - * add correlationId - * @param correlationId - */ - addCorrelationId(correlationId: string): void { - this.parameters.set( - AADServerParamKeys.CLIENT_REQUEST_ID, - encodeURIComponent(correlationId) - ); - } - - /** - * add library info query params - * @param libraryInfo - */ - addLibraryInfo(libraryInfo: LibraryInfo): void { - // Telemetry Info - this.parameters.set(AADServerParamKeys.X_CLIENT_SKU, libraryInfo.sku); - this.parameters.set( - AADServerParamKeys.X_CLIENT_VER, - libraryInfo.version - ); - if (libraryInfo.os) { - this.parameters.set(AADServerParamKeys.X_CLIENT_OS, libraryInfo.os); - } - if (libraryInfo.cpu) { - this.parameters.set( - AADServerParamKeys.X_CLIENT_CPU, - libraryInfo.cpu - ); - } - } - - /** - * Add client telemetry parameters - * @param appTelemetry - */ - addApplicationTelemetry(appTelemetry: ApplicationTelemetry): void { - if (appTelemetry?.appName) { - this.parameters.set( - AADServerParamKeys.X_APP_NAME, - appTelemetry.appName - ); - } - - if (appTelemetry?.appVersion) { - this.parameters.set( - AADServerParamKeys.X_APP_VER, - appTelemetry.appVersion - ); - } - } - - /** - * add prompt - * @param prompt - */ - addPrompt(prompt: string): void { - RequestValidator.validatePrompt(prompt); - this.parameters.set( - `${AADServerParamKeys.PROMPT}`, - encodeURIComponent(prompt) - ); - } - - /** - * add state - * @param state - */ - addState(state: string): void { - if (state) { - this.parameters.set( - AADServerParamKeys.STATE, - encodeURIComponent(state) - ); - } - } - - /** - * add nonce - * @param nonce - */ - addNonce(nonce: string): void { - this.parameters.set( - AADServerParamKeys.NONCE, - encodeURIComponent(nonce) - ); - } - - /** - * add code_challenge and code_challenge_method - * - throw if either of them are not passed - * @param codeChallenge - * @param codeChallengeMethod - */ - addCodeChallengeParams( - codeChallenge: string, - codeChallengeMethod: string - ): void { - RequestValidator.validateCodeChallengeParams( - codeChallenge, - codeChallengeMethod - ); - if (codeChallenge && codeChallengeMethod) { - this.parameters.set( - AADServerParamKeys.CODE_CHALLENGE, - encodeURIComponent(codeChallenge) - ); - this.parameters.set( - AADServerParamKeys.CODE_CHALLENGE_METHOD, - encodeURIComponent(codeChallengeMethod) - ); - } else { - throw createClientConfigurationError( - ClientConfigurationErrorCodes.pkceParamsMissing - ); - } - } - - /** - * add the `authorization_code` passed by the user to exchange for a token - * @param code - */ - addAuthorizationCode(code: string): void { - this.parameters.set(AADServerParamKeys.CODE, encodeURIComponent(code)); - } - - /** - * add the `authorization_code` passed by the user to exchange for a token - * @param code - */ - addDeviceCode(code: string): void { - this.parameters.set( - AADServerParamKeys.DEVICE_CODE, - encodeURIComponent(code) - ); - } - - /** - * add the `refreshToken` passed by the user - * @param refreshToken - */ - addRefreshToken(refreshToken: string): void { - this.parameters.set( - AADServerParamKeys.REFRESH_TOKEN, - encodeURIComponent(refreshToken) - ); - } - - /** - * add the `code_verifier` passed by the user to exchange for a token - * @param codeVerifier - */ - addCodeVerifier(codeVerifier: string): void { - this.parameters.set( - AADServerParamKeys.CODE_VERIFIER, - encodeURIComponent(codeVerifier) - ); - } - - /** - * add client_secret - * @param clientSecret - */ - addClientSecret(clientSecret: string): void { - this.parameters.set( - AADServerParamKeys.CLIENT_SECRET, - encodeURIComponent(clientSecret) - ); - } - - /** - * add clientAssertion for confidential client flows - * @param clientAssertion - */ - addClientAssertion(clientAssertion: string): void { - if (clientAssertion) { - this.parameters.set( - AADServerParamKeys.CLIENT_ASSERTION, - encodeURIComponent(clientAssertion) - ); - } - } - - /** - * add clientAssertionType for confidential client flows - * @param clientAssertionType - */ - addClientAssertionType(clientAssertionType: string): void { - if (clientAssertionType) { - this.parameters.set( - AADServerParamKeys.CLIENT_ASSERTION_TYPE, - encodeURIComponent(clientAssertionType) - ); - } - } - - /** - * add OBO assertion for confidential client flows - * @param clientAssertion - */ - addOboAssertion(oboAssertion: string): void { - this.parameters.set( - AADServerParamKeys.OBO_ASSERTION, - encodeURIComponent(oboAssertion) - ); - } - - /** - * add grant type - * @param grantType - */ - addRequestTokenUse(tokenUse: string): void { - this.parameters.set( - AADServerParamKeys.REQUESTED_TOKEN_USE, - encodeURIComponent(tokenUse) - ); - } - - /** - * add grant type - * @param grantType - */ - addGrantType(grantType: string): void { - this.parameters.set( - AADServerParamKeys.GRANT_TYPE, - encodeURIComponent(grantType) - ); - } - - /** - * add client info - * - */ - addClientInfo(): void { - this.parameters.set(CLIENT_INFO, "1"); - } - - /** - * add extraQueryParams - * @param eQParams - */ - addExtraQueryParameters(eQParams: StringDict): void { - Object.entries(eQParams).forEach(([key, value]) => { - if (!this.parameters.has(key) && value) { - this.parameters.set(key, value); - } - }); - } - - addClientCapabilitiesToClaims( - claims?: string, - clientCapabilities?: Array - ): string { - let mergedClaims: object; - - // Parse provided claims into JSON object or initialize empty object - if (!claims) { - mergedClaims = {}; - } else { - try { - mergedClaims = JSON.parse(claims); - } catch (e) { - throw createClientConfigurationError( - ClientConfigurationErrorCodes.invalidClaims - ); - } - } - - if (clientCapabilities && clientCapabilities.length > 0) { - if (!mergedClaims.hasOwnProperty(ClaimsRequestKeys.ACCESS_TOKEN)) { - // Add access_token key to claims object - mergedClaims[ClaimsRequestKeys.ACCESS_TOKEN] = {}; - } - - // Add xms_cc claim with provided clientCapabilities to access_token key - mergedClaims[ClaimsRequestKeys.ACCESS_TOKEN][ - ClaimsRequestKeys.XMS_CC - ] = { - values: clientCapabilities, - }; - } - - return JSON.stringify(mergedClaims); - } - - /** - * adds `username` for Password Grant flow - * @param username - */ - addUsername(username: string): void { - this.parameters.set( - PasswordGrantConstants.username, - encodeURIComponent(username) - ); - } - - /** - * adds `password` for Password Grant flow - * @param password - */ - addPassword(password: string): void { - this.parameters.set( - PasswordGrantConstants.password, - encodeURIComponent(password) - ); - } - - /** - * add pop_jwk to query params - * @param cnfString - */ - addPopToken(cnfString: string): void { - if (cnfString) { - this.parameters.set( - AADServerParamKeys.TOKEN_TYPE, - AuthenticationScheme.POP - ); - this.parameters.set( - AADServerParamKeys.REQ_CNF, - encodeURIComponent(cnfString) - ); - } - } - - /** - * add SSH JWK and key ID to query params - */ - addSshJwk(sshJwkString: string): void { - if (sshJwkString) { - this.parameters.set( - AADServerParamKeys.TOKEN_TYPE, - AuthenticationScheme.SSH - ); - this.parameters.set( - AADServerParamKeys.REQ_CNF, - encodeURIComponent(sshJwkString) - ); - } - } - - /** - * add server telemetry fields - * @param serverTelemetryManager - */ - addServerTelemetry(serverTelemetryManager: ServerTelemetryManager): void { - this.parameters.set( - AADServerParamKeys.X_CLIENT_CURR_TELEM, - serverTelemetryManager.generateCurrentRequestHeaderValue() - ); - this.parameters.set( - AADServerParamKeys.X_CLIENT_LAST_TELEM, - serverTelemetryManager.generateLastRequestHeaderValue() - ); - } - - /** - * Adds parameter that indicates to the server that throttling is supported - */ - addThrottling(): void { - this.parameters.set( - AADServerParamKeys.X_MS_LIB_CAPABILITY, - ThrottlingConstants.X_MS_LIB_CAPABILITY_VALUE - ); - } - - /** - * Adds logout_hint parameter for "silent" logout which prevent server account picker - */ - addLogoutHint(logoutHint: string): void { - this.parameters.set( - AADServerParamKeys.LOGOUT_HINT, - encodeURIComponent(logoutHint) - ); - } - - addBrokerParameters(params: { - brokerClientId: string; - brokerRedirectUri: string; - }): void { - const brokerParams: StringDict = {}; - brokerParams[AADServerParamKeys.BROKER_CLIENT_ID] = - params.brokerClientId; - brokerParams[AADServerParamKeys.BROKER_REDIRECT_URI] = - params.brokerRedirectUri; - - this.addExtraQueryParameters(brokerParams); - } - - /** - * Utility to create a URL from the params map - */ - createQueryString(): string { - const queryParameterArray: Array = new Array(); - - this.parameters.forEach((value, key) => { - queryParameterArray.push(`${key}=${value}`); - }); - - instrumentBrokerParams( - this.parameters, - this.correlationId, - this.performanceClient - ); - - return queryParameterArray.join("&"); - } -} diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/src/request/RequestValidator.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/src/request/RequestValidator.ts deleted file mode 100644 index 96b4711..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/src/request/RequestValidator.ts +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import { - createClientConfigurationError, - ClientConfigurationErrorCodes, -} from "../error/ClientConfigurationError.js"; -import { PromptValue, CodeChallengeMethodValues } from "../utils/Constants.js"; - -/** - * Validates server consumable params from the "request" objects - */ -export class RequestValidator { - /** - * Utility to check if the `redirectUri` in the request is a non-null value - * @param redirectUri - */ - static validateRedirectUri(redirectUri: string): void { - if (!redirectUri) { - throw createClientConfigurationError( - ClientConfigurationErrorCodes.redirectUriEmpty - ); - } - } - - /** - * Utility to validate prompt sent by the user in the request - * @param prompt - */ - static validatePrompt(prompt: string): void { - const promptValues = []; - - for (const value in PromptValue) { - promptValues.push(PromptValue[value]); - } - - if (promptValues.indexOf(prompt) < 0) { - throw createClientConfigurationError( - ClientConfigurationErrorCodes.invalidPromptValue - ); - } - } - - static validateClaims(claims: string): void { - try { - JSON.parse(claims); - } catch (e) { - throw createClientConfigurationError( - ClientConfigurationErrorCodes.invalidClaims - ); - } - } - - /** - * Utility to validate code_challenge and code_challenge_method - * @param codeChallenge - * @param codeChallengeMethod - */ - static validateCodeChallengeParams( - codeChallenge: string, - codeChallengeMethod: string - ): void { - if (!codeChallenge || !codeChallengeMethod) { - throw createClientConfigurationError( - ClientConfigurationErrorCodes.pkceParamsMissing - ); - } else { - this.validateCodeChallengeMethod(codeChallengeMethod); - } - } - - /** - * Utility to validate code_challenge_method - * @param codeChallengeMethod - */ - static validateCodeChallengeMethod(codeChallengeMethod: string): void { - if ( - [ - CodeChallengeMethodValues.PLAIN, - CodeChallengeMethodValues.S256, - ].indexOf(codeChallengeMethod) < 0 - ) { - throw createClientConfigurationError( - ClientConfigurationErrorCodes.invalidCodeChallengeMethod - ); - } - } -} diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/src/request/ScopeSet.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/src/request/ScopeSet.ts deleted file mode 100644 index b9b96e4..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/src/request/ScopeSet.ts +++ /dev/null @@ -1,246 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import { - createClientConfigurationError, - ClientConfigurationErrorCodes, -} from "../error/ClientConfigurationError.js"; -import { StringUtils } from "../utils/StringUtils.js"; -import { - ClientAuthErrorCodes, - createClientAuthError, -} from "../error/ClientAuthError.js"; -import { Constants, OIDC_SCOPES } from "../utils/Constants.js"; - -/** - * The ScopeSet class creates a set of scopes. Scopes are case-insensitive, unique values, so the Set object in JS makes - * the most sense to implement for this class. All scopes are trimmed and converted to lower case strings in intersection and union functions - * to ensure uniqueness of strings. - */ -export class ScopeSet { - // Scopes as a Set of strings - private scopes: Set; - - constructor(inputScopes: Array) { - // Filter empty string and null/undefined array items - const scopeArr = inputScopes - ? StringUtils.trimArrayEntries([...inputScopes]) - : []; - const filteredInput = scopeArr - ? StringUtils.removeEmptyStringsFromArray(scopeArr) - : []; - - // Validate and filter scopes (validate function throws if validation fails) - this.validateInputScopes(filteredInput); - - this.scopes = new Set(); // Iterator in constructor not supported by IE11 - filteredInput.forEach((scope) => this.scopes.add(scope)); - } - - /** - * Factory method to create ScopeSet from space-delimited string - * @param inputScopeString - * @param appClientId - * @param scopesRequired - */ - static fromString(inputScopeString: string): ScopeSet { - const scopeString = inputScopeString || Constants.EMPTY_STRING; - const inputScopes: Array = scopeString.split(" "); - return new ScopeSet(inputScopes); - } - - /** - * Creates the set of scopes to search for in cache lookups - * @param inputScopeString - * @returns - */ - static createSearchScopes(inputScopeString: Array): ScopeSet { - const scopeSet = new ScopeSet(inputScopeString); - if (!scopeSet.containsOnlyOIDCScopes()) { - scopeSet.removeOIDCScopes(); - } else { - scopeSet.removeScope(Constants.OFFLINE_ACCESS_SCOPE); - } - - return scopeSet; - } - - /** - * Used to validate the scopes input parameter requested by the developer. - * @param {Array} inputScopes - Developer requested permissions. Not all scopes are guaranteed to be included in the access token returned. - * @param {boolean} scopesRequired - Boolean indicating whether the scopes array is required or not - */ - private validateInputScopes(inputScopes: Array): void { - // Check if scopes are required but not given or is an empty array - if (!inputScopes || inputScopes.length < 1) { - throw createClientConfigurationError( - ClientConfigurationErrorCodes.emptyInputScopesError - ); - } - } - - /** - * Check if a given scope is present in this set of scopes. - * @param scope - */ - containsScope(scope: string): boolean { - const lowerCaseScopes = this.printScopesLowerCase().split(" "); - const lowerCaseScopesSet = new ScopeSet(lowerCaseScopes); - // compare lowercase scopes - return scope - ? lowerCaseScopesSet.scopes.has(scope.toLowerCase()) - : false; - } - - /** - * Check if a set of scopes is present in this set of scopes. - * @param scopeSet - */ - containsScopeSet(scopeSet: ScopeSet): boolean { - if (!scopeSet || scopeSet.scopes.size <= 0) { - return false; - } - - return ( - this.scopes.size >= scopeSet.scopes.size && - scopeSet.asArray().every((scope) => this.containsScope(scope)) - ); - } - - /** - * Check if set of scopes contains only the defaults - */ - containsOnlyOIDCScopes(): boolean { - let defaultScopeCount = 0; - OIDC_SCOPES.forEach((defaultScope: string) => { - if (this.containsScope(defaultScope)) { - defaultScopeCount += 1; - } - }); - - return this.scopes.size === defaultScopeCount; - } - - /** - * Appends single scope if passed - * @param newScope - */ - appendScope(newScope: string): void { - if (newScope) { - this.scopes.add(newScope.trim()); - } - } - - /** - * Appends multiple scopes if passed - * @param newScopes - */ - appendScopes(newScopes: Array): void { - try { - newScopes.forEach((newScope) => this.appendScope(newScope)); - } catch (e) { - throw createClientAuthError( - ClientAuthErrorCodes.cannotAppendScopeSet - ); - } - } - - /** - * Removes element from set of scopes. - * @param scope - */ - removeScope(scope: string): void { - if (!scope) { - throw createClientAuthError( - ClientAuthErrorCodes.cannotRemoveEmptyScope - ); - } - this.scopes.delete(scope.trim()); - } - - /** - * Removes default scopes from set of scopes - * Primarily used to prevent cache misses if the default scopes are not returned from the server - */ - removeOIDCScopes(): void { - OIDC_SCOPES.forEach((defaultScope: string) => { - this.scopes.delete(defaultScope); - }); - } - - /** - * Combines an array of scopes with the current set of scopes. - * @param otherScopes - */ - unionScopeSets(otherScopes: ScopeSet): Set { - if (!otherScopes) { - throw createClientAuthError( - ClientAuthErrorCodes.emptyInputScopeSet - ); - } - const unionScopes = new Set(); // Iterator in constructor not supported in IE11 - otherScopes.scopes.forEach((scope) => - unionScopes.add(scope.toLowerCase()) - ); - this.scopes.forEach((scope) => unionScopes.add(scope.toLowerCase())); - return unionScopes; - } - - /** - * Check if scopes intersect between this set and another. - * @param otherScopes - */ - intersectingScopeSets(otherScopes: ScopeSet): boolean { - if (!otherScopes) { - throw createClientAuthError( - ClientAuthErrorCodes.emptyInputScopeSet - ); - } - - // Do not allow OIDC scopes to be the only intersecting scopes - if (!otherScopes.containsOnlyOIDCScopes()) { - otherScopes.removeOIDCScopes(); - } - const unionScopes = this.unionScopeSets(otherScopes); - const sizeOtherScopes = otherScopes.getScopeCount(); - const sizeThisScopes = this.getScopeCount(); - const sizeUnionScopes = unionScopes.size; - return sizeUnionScopes < sizeThisScopes + sizeOtherScopes; - } - - /** - * Returns size of set of scopes. - */ - getScopeCount(): number { - return this.scopes.size; - } - - /** - * Returns the scopes as an array of string values - */ - asArray(): Array { - const array: Array = []; - this.scopes.forEach((val) => array.push(val)); - return array; - } - - /** - * Prints scopes into a space-delimited string - */ - printScopes(): string { - if (this.scopes) { - const scopeArr = this.asArray(); - return scopeArr.join(" "); - } - return Constants.EMPTY_STRING; - } - - /** - * Prints scopes into a space-delimited lower-case string (used for caching) - */ - printScopesLowerCase(): string { - return this.printScopes().toLowerCase(); - } -} diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/src/request/StoreInCache.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/src/request/StoreInCache.ts deleted file mode 100644 index d4449df..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/src/request/StoreInCache.ts +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -/** - * Controls whether tokens should be stored in the cache or not. If set to false, tokens may still be acquired and returned but will not be cached for later retrieval. - */ -export type StoreInCache = { - /* Indicates whether or not the acquired accessToken will be stored in the cache */ - accessToken?: boolean; - /* Indicates whether or not the acquired idToken will be stored in the cache */ - idToken?: boolean; - /* Indicates whether or not the acquired refreshToken will be stored in the cache */ - refreshToken?: boolean; -}; diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/src/response/AuthenticationResult.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/src/response/AuthenticationResult.ts deleted file mode 100644 index abcaeab..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/src/response/AuthenticationResult.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import { AccountInfo } from "../account/AccountInfo.js"; - -/** - * Result returned from the authority's token endpoint. - * - uniqueId - `oid` or `sub` claim from ID token - * - tenantId - `tid` claim from ID token - * - scopes - Scopes that are validated for the respective token - * - account - An account object representation of the currently signed-in user - * - idToken - Id token received as part of the response - * - idTokenClaims - MSAL-relevant ID token claims - * - accessToken - Access token or SSH certificate received as part of the response - * - fromCache - Boolean denoting whether token came from cache - * - expiresOn - Javascript Date object representing relative expiration of access token - * - extExpiresOn - Javascript Date object representing extended relative expiration of access token in case of server outage - * - refreshOn - Javascript Date object representing relative time until an access token must be refreshed - * - state - Value passed in by user in request - * - familyId - Family ID identifier, usually only used for refresh tokens - * - requestId - Request ID returned as part of the response - */ -export type AuthenticationResult = { - authority: string; - uniqueId: string; - tenantId: string; - scopes: Array; - account: AccountInfo | null; - idToken: string; - idTokenClaims: object; - accessToken: string; - fromCache: boolean; - expiresOn: Date | null; - extExpiresOn?: Date; - refreshOn?: Date; - tokenType: string; - correlationId: string; - requestId?: string; - state?: string; - familyId?: string; - cloudGraphHostName?: string; - msGraphHost?: string; - code?: string; - fromNativeBroker?: boolean; -}; diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/src/response/AuthorizationCodePayload.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/src/response/AuthorizationCodePayload.ts deleted file mode 100644 index d225e5b..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/src/response/AuthorizationCodePayload.ts +++ /dev/null @@ -1,18 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -/** - * Response returned after processing the code response query string or fragment. - */ -export type AuthorizationCodePayload = { - code: string; - cloud_instance_name?: string; - cloud_instance_host_name?: string; - cloud_graph_host_name?: string; - msgraph_host?: string; - state?: string; - nonce?: string; - client_info?: string; -}; diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/src/response/DeviceCodeResponse.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/src/response/DeviceCodeResponse.ts deleted file mode 100644 index 0aa5340..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/src/response/DeviceCodeResponse.ts +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -/** - * DeviceCode returned by the security token service device code endpoint containing information necessary for device code flow. - * - userCode: code which user needs to provide when authenticating at the verification URI - * - deviceCode: code which should be included in the request for the access token - * - verificationUri: URI where user can authenticate - * - expiresIn: expiration time of the device code in seconds - * - interval: interval at which the STS should be polled at - * - message: message which should be displayed to the user - */ -export type DeviceCodeResponse = { - userCode: string; - deviceCode: string; - verificationUri: string; - expiresIn: number; - interval: number; - message: string; -}; - -export type ServerDeviceCodeResponse = { - user_code: string; - device_code: string; - verification_uri: string; - expires_in: number; - interval: number; - message: string; -}; diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/src/response/ExternalTokenResponse.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/src/response/ExternalTokenResponse.ts deleted file mode 100644 index 8208913..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/src/response/ExternalTokenResponse.ts +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import { ServerAuthorizationTokenResponse } from "./ServerAuthorizationTokenResponse.js"; - -/** - * Response object used for loading external tokens to cache. - * - token_type: Indicates the token type value. The only type that Azure AD supports is Bearer. - * - scope: The scopes that the access_token is valid for. - * - expires_in: How long the access token is valid (in seconds). - * - id_token: A JSON Web Token (JWT). The app can decode the segments of this token to request information about the user who signed in. - * - refresh_token: An OAuth 2.0 refresh token. The app can use this token acquire additional access tokens after the current access token expires. - * - access_token: The requested access token. The app can use this token to authenticate to the secured resource, such as a web API. - * - client_info: Client info object - */ -export type ExternalTokenResponse = Pick< - ServerAuthorizationTokenResponse, - | "token_type" - | "scope" - | "expires_in" - | "ext_expires_in" - | "id_token" - | "refresh_token" - | "refresh_token_expires_in" - | "foci" -> & { - access_token?: string; - client_info?: string; -}; diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/src/response/IMDSBadResponse.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/src/response/IMDSBadResponse.ts deleted file mode 100644 index ddcf802..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/src/response/IMDSBadResponse.ts +++ /dev/null @@ -1,9 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -export type IMDSBadResponse = { - error: string; - "newest-versions": Array; -}; diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/src/response/ResponseHandler.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/src/response/ResponseHandler.ts deleted file mode 100644 index c7cc194..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/src/response/ResponseHandler.ts +++ /dev/null @@ -1,775 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import { ServerAuthorizationTokenResponse } from "./ServerAuthorizationTokenResponse.js"; -import { ICrypto } from "../crypto/ICrypto.js"; -import { - ClientAuthErrorCodes, - createClientAuthError, -} from "../error/ClientAuthError.js"; -import { ServerAuthorizationCodeResponse } from "./ServerAuthorizationCodeResponse.js"; -import { Logger } from "../logger/Logger.js"; -import { ServerError } from "../error/ServerError.js"; -import { ScopeSet } from "../request/ScopeSet.js"; -import { AuthenticationResult } from "./AuthenticationResult.js"; -import { AccountEntity } from "../cache/entities/AccountEntity.js"; -import { Authority } from "../authority/Authority.js"; -import { IdTokenEntity } from "../cache/entities/IdTokenEntity.js"; -import { AccessTokenEntity } from "../cache/entities/AccessTokenEntity.js"; -import { RefreshTokenEntity } from "../cache/entities/RefreshTokenEntity.js"; -import { - InteractionRequiredAuthError, - isInteractionRequiredError, -} from "../error/InteractionRequiredAuthError.js"; -import { CacheRecord } from "../cache/entities/CacheRecord.js"; -import { CacheManager } from "../cache/CacheManager.js"; -import { ProtocolUtils, RequestStateObject } from "../utils/ProtocolUtils.js"; -import { - AuthenticationScheme, - Constants, - THE_FAMILY_ID, - HttpStatus, -} from "../utils/Constants.js"; -import { PopTokenGenerator } from "../crypto/PopTokenGenerator.js"; -import { AppMetadataEntity } from "../cache/entities/AppMetadataEntity.js"; -import { ICachePlugin } from "../cache/interface/ICachePlugin.js"; -import { TokenCacheContext } from "../cache/persistence/TokenCacheContext.js"; -import { ISerializableTokenCache } from "../cache/interface/ISerializableTokenCache.js"; -import { AuthorizationCodePayload } from "./AuthorizationCodePayload.js"; -import { BaseAuthRequest } from "../request/BaseAuthRequest.js"; -import { IPerformanceClient } from "../telemetry/performance/IPerformanceClient.js"; -import { PerformanceEvents } from "../telemetry/performance/PerformanceEvent.js"; -import { checkMaxAge, extractTokenClaims } from "../account/AuthToken.js"; -import { - TokenClaims, - getTenantIdFromIdTokenClaims, -} from "../account/TokenClaims.js"; -import { - AccountInfo, - buildTenantProfile, - updateAccountTenantProfileData, -} from "../account/AccountInfo.js"; -import * as CacheHelpers from "../cache/utils/CacheHelpers.js"; - -function parseServerErrorNo( - serverResponse: ServerAuthorizationCodeResponse -): string | undefined { - const errorCodePrefix = "code="; - const errorCodePrefixIndex = - serverResponse.error_uri?.lastIndexOf(errorCodePrefix); - return errorCodePrefixIndex && errorCodePrefixIndex >= 0 - ? serverResponse.error_uri?.substring( - errorCodePrefixIndex + errorCodePrefix.length - ) - : undefined; -} - -/** - * Class that handles response parsing. - * @internal - */ -export class ResponseHandler { - private clientId: string; - private cacheStorage: CacheManager; - private cryptoObj: ICrypto; - private logger: Logger; - private homeAccountIdentifier: string; - private serializableCache: ISerializableTokenCache | null; - private persistencePlugin: ICachePlugin | null; - private performanceClient?: IPerformanceClient; - - constructor( - clientId: string, - cacheStorage: CacheManager, - cryptoObj: ICrypto, - logger: Logger, - serializableCache: ISerializableTokenCache | null, - persistencePlugin: ICachePlugin | null, - performanceClient?: IPerformanceClient - ) { - this.clientId = clientId; - this.cacheStorage = cacheStorage; - this.cryptoObj = cryptoObj; - this.logger = logger; - this.serializableCache = serializableCache; - this.persistencePlugin = persistencePlugin; - this.performanceClient = performanceClient; - } - - /** - * Function which validates server authorization code response. - * @param serverResponseHash - * @param requestState - * @param cryptoObj - */ - validateServerAuthorizationCodeResponse( - serverResponse: ServerAuthorizationCodeResponse, - requestState: string - ): void { - if (!serverResponse.state || !requestState) { - throw serverResponse.state - ? createClientAuthError( - ClientAuthErrorCodes.stateNotFound, - "Cached State" - ) - : createClientAuthError( - ClientAuthErrorCodes.stateNotFound, - "Server State" - ); - } - - let decodedServerResponseState: string; - let decodedRequestState: string; - - try { - decodedServerResponseState = decodeURIComponent( - serverResponse.state - ); - } catch (e) { - throw createClientAuthError( - ClientAuthErrorCodes.invalidState, - serverResponse.state - ); - } - - try { - decodedRequestState = decodeURIComponent(requestState); - } catch (e) { - throw createClientAuthError( - ClientAuthErrorCodes.invalidState, - serverResponse.state - ); - } - - if (decodedServerResponseState !== decodedRequestState) { - throw createClientAuthError(ClientAuthErrorCodes.stateMismatch); - } - - // Check for error - if ( - serverResponse.error || - serverResponse.error_description || - serverResponse.suberror - ) { - const serverErrorNo = parseServerErrorNo(serverResponse); - if ( - isInteractionRequiredError( - serverResponse.error, - serverResponse.error_description, - serverResponse.suberror - ) - ) { - throw new InteractionRequiredAuthError( - serverResponse.error || "", - serverResponse.error_description, - serverResponse.suberror, - serverResponse.timestamp || "", - serverResponse.trace_id || "", - serverResponse.correlation_id || "", - serverResponse.claims || "", - serverErrorNo - ); - } - - throw new ServerError( - serverResponse.error || "", - serverResponse.error_description, - serverResponse.suberror, - serverErrorNo - ); - } - } - - /** - * Function which validates server authorization token response. - * @param serverResponse - * @param refreshAccessToken - */ - validateTokenResponse( - serverResponse: ServerAuthorizationTokenResponse, - refreshAccessToken?: boolean - ): void { - // Check for error - if ( - serverResponse.error || - serverResponse.error_description || - serverResponse.suberror - ) { - const errString = `Error(s): ${ - serverResponse.error_codes || Constants.NOT_AVAILABLE - } - Timestamp: ${ - serverResponse.timestamp || Constants.NOT_AVAILABLE - } - Description: ${ - serverResponse.error_description || Constants.NOT_AVAILABLE - } - Correlation ID: ${ - serverResponse.correlation_id || Constants.NOT_AVAILABLE - } - Trace ID: ${ - serverResponse.trace_id || Constants.NOT_AVAILABLE - }`; - const serverErrorNo = serverResponse.error_codes?.length - ? serverResponse.error_codes[0] - : undefined; - const serverError = new ServerError( - serverResponse.error, - errString, - serverResponse.suberror, - serverErrorNo, - serverResponse.status - ); - - // check if 500 error - if ( - refreshAccessToken && - serverResponse.status && - serverResponse.status >= HttpStatus.SERVER_ERROR_RANGE_START && - serverResponse.status <= HttpStatus.SERVER_ERROR_RANGE_END - ) { - this.logger.warning( - `executeTokenRequest:validateTokenResponse - AAD is currently unavailable and the access token is unable to be refreshed.\n${serverError}` - ); - - // don't throw an exception, but alert the user via a log that the token was unable to be refreshed - return; - // check if 400 error - } else if ( - refreshAccessToken && - serverResponse.status && - serverResponse.status >= HttpStatus.CLIENT_ERROR_RANGE_START && - serverResponse.status <= HttpStatus.CLIENT_ERROR_RANGE_END - ) { - this.logger.warning( - `executeTokenRequest:validateTokenResponse - AAD is currently available but is unable to refresh the access token.\n${serverError}` - ); - - // don't throw an exception, but alert the user via a log that the token was unable to be refreshed - return; - } - - if ( - isInteractionRequiredError( - serverResponse.error, - serverResponse.error_description, - serverResponse.suberror - ) - ) { - throw new InteractionRequiredAuthError( - serverResponse.error, - serverResponse.error_description, - serverResponse.suberror, - serverResponse.timestamp || Constants.EMPTY_STRING, - serverResponse.trace_id || Constants.EMPTY_STRING, - serverResponse.correlation_id || Constants.EMPTY_STRING, - serverResponse.claims || Constants.EMPTY_STRING, - serverErrorNo - ); - } - - throw serverError; - } - } - - /** - * Returns a constructed token response based on given string. Also manages the cache updates and cleanups. - * @param serverTokenResponse - * @param authority - */ - async handleServerTokenResponse( - serverTokenResponse: ServerAuthorizationTokenResponse, - authority: Authority, - reqTimestamp: number, - request: BaseAuthRequest, - authCodePayload?: AuthorizationCodePayload, - userAssertionHash?: string, - handlingRefreshTokenResponse?: boolean, - forceCacheRefreshTokenResponse?: boolean, - serverRequestId?: string - ): Promise { - this.performanceClient?.addQueueMeasurement( - PerformanceEvents.HandleServerTokenResponse, - serverTokenResponse.correlation_id - ); - - // create an idToken object (not entity) - let idTokenClaims: TokenClaims | undefined; - if (serverTokenResponse.id_token) { - idTokenClaims = extractTokenClaims( - serverTokenResponse.id_token || Constants.EMPTY_STRING, - this.cryptoObj.base64Decode - ); - - // token nonce check (TODO: Add a warning if no nonce is given?) - if (authCodePayload && authCodePayload.nonce) { - if (idTokenClaims.nonce !== authCodePayload.nonce) { - throw createClientAuthError( - ClientAuthErrorCodes.nonceMismatch - ); - } - } - - // token max_age check - if (request.maxAge || request.maxAge === 0) { - const authTime = idTokenClaims.auth_time; - if (!authTime) { - throw createClientAuthError( - ClientAuthErrorCodes.authTimeNotFound - ); - } - - checkMaxAge(authTime, request.maxAge); - } - } - - // generate homeAccountId - this.homeAccountIdentifier = AccountEntity.generateHomeAccountId( - serverTokenResponse.client_info || Constants.EMPTY_STRING, - authority.authorityType, - this.logger, - this.cryptoObj, - idTokenClaims - ); - - // save the response tokens - let requestStateObj: RequestStateObject | undefined; - if (!!authCodePayload && !!authCodePayload.state) { - requestStateObj = ProtocolUtils.parseRequestState( - this.cryptoObj, - authCodePayload.state - ); - } - - // Add keyId from request to serverTokenResponse if defined - serverTokenResponse.key_id = - serverTokenResponse.key_id || request.sshKid || undefined; - - const cacheRecord = this.generateCacheRecord( - serverTokenResponse, - authority, - reqTimestamp, - request, - idTokenClaims, - userAssertionHash, - authCodePayload - ); - let cacheContext; - try { - if (this.persistencePlugin && this.serializableCache) { - this.logger.verbose( - "Persistence enabled, calling beforeCacheAccess" - ); - cacheContext = new TokenCacheContext( - this.serializableCache, - true - ); - await this.persistencePlugin.beforeCacheAccess(cacheContext); - } - /* - * When saving a refreshed tokens to the cache, it is expected that the account that was used is present in the cache. - * If not present, we should return null, as it's the case that another application called removeAccount in between - * the calls to getAllAccounts and acquireTokenSilent. We should not overwrite that removal, unless explicitly flagged by - * the developer, as in the case of refresh token flow used in ADAL Node to MSAL Node migration. - */ - if ( - handlingRefreshTokenResponse && - !forceCacheRefreshTokenResponse && - cacheRecord.account - ) { - const key = cacheRecord.account.generateAccountKey(); - const account = this.cacheStorage.getAccount( - key, - request.correlationId, - this.logger - ); - if (!account) { - this.logger.warning( - "Account used to refresh tokens not in persistence, refreshed tokens will not be stored in the cache" - ); - return await ResponseHandler.generateAuthenticationResult( - this.cryptoObj, - authority, - cacheRecord, - false, - request, - idTokenClaims, - requestStateObj, - undefined, - serverRequestId - ); - } - } - await this.cacheStorage.saveCacheRecord( - cacheRecord, - request.correlationId, - request.storeInCache - ); - } finally { - if ( - this.persistencePlugin && - this.serializableCache && - cacheContext - ) { - this.logger.verbose( - "Persistence enabled, calling afterCacheAccess" - ); - await this.persistencePlugin.afterCacheAccess(cacheContext); - } - } - - return ResponseHandler.generateAuthenticationResult( - this.cryptoObj, - authority, - cacheRecord, - false, - request, - idTokenClaims, - requestStateObj, - serverTokenResponse, - serverRequestId - ); - } - - /** - * Generates CacheRecord - * @param serverTokenResponse - * @param idTokenObj - * @param authority - */ - private generateCacheRecord( - serverTokenResponse: ServerAuthorizationTokenResponse, - authority: Authority, - reqTimestamp: number, - request: BaseAuthRequest, - idTokenClaims?: TokenClaims, - userAssertionHash?: string, - authCodePayload?: AuthorizationCodePayload - ): CacheRecord { - const env = authority.getPreferredCache(); - if (!env) { - throw createClientAuthError( - ClientAuthErrorCodes.invalidCacheEnvironment - ); - } - - const claimsTenantId = getTenantIdFromIdTokenClaims(idTokenClaims); - - // IdToken: non AAD scenarios can have empty realm - let cachedIdToken: IdTokenEntity | undefined; - let cachedAccount: AccountEntity | undefined; - if (serverTokenResponse.id_token && !!idTokenClaims) { - cachedIdToken = CacheHelpers.createIdTokenEntity( - this.homeAccountIdentifier, - env, - serverTokenResponse.id_token, - this.clientId, - claimsTenantId || "" - ); - - cachedAccount = buildAccountToCache( - this.cacheStorage, - authority, - this.homeAccountIdentifier, - this.cryptoObj.base64Decode, - request.correlationId, - idTokenClaims, - serverTokenResponse.client_info, - env, - claimsTenantId, - authCodePayload, - undefined, // nativeAccountId - this.logger - ); - } - - // AccessToken - let cachedAccessToken: AccessTokenEntity | null = null; - if (serverTokenResponse.access_token) { - // If scopes not returned in server response, use request scopes - const responseScopes = serverTokenResponse.scope - ? ScopeSet.fromString(serverTokenResponse.scope) - : new ScopeSet(request.scopes || []); - - /* - * Use timestamp calculated before request - * Server may return timestamps as strings, parse to numbers if so. - */ - const expiresIn: number = - (typeof serverTokenResponse.expires_in === "string" - ? parseInt(serverTokenResponse.expires_in, 10) - : serverTokenResponse.expires_in) || 0; - const extExpiresIn: number = - (typeof serverTokenResponse.ext_expires_in === "string" - ? parseInt(serverTokenResponse.ext_expires_in, 10) - : serverTokenResponse.ext_expires_in) || 0; - const refreshIn: number | undefined = - (typeof serverTokenResponse.refresh_in === "string" - ? parseInt(serverTokenResponse.refresh_in, 10) - : serverTokenResponse.refresh_in) || undefined; - const tokenExpirationSeconds = reqTimestamp + expiresIn; - const extendedTokenExpirationSeconds = - tokenExpirationSeconds + extExpiresIn; - const refreshOnSeconds = - refreshIn && refreshIn > 0 - ? reqTimestamp + refreshIn - : undefined; - - // non AAD scenarios can have empty realm - cachedAccessToken = CacheHelpers.createAccessTokenEntity( - this.homeAccountIdentifier, - env, - serverTokenResponse.access_token, - this.clientId, - claimsTenantId || authority.tenant || "", - responseScopes.printScopes(), - tokenExpirationSeconds, - extendedTokenExpirationSeconds, - this.cryptoObj.base64Decode, - refreshOnSeconds, - serverTokenResponse.token_type, - userAssertionHash, - serverTokenResponse.key_id, - request.claims, - request.requestedClaimsHash - ); - } - - // refreshToken - let cachedRefreshToken: RefreshTokenEntity | null = null; - if (serverTokenResponse.refresh_token) { - let rtExpiresOn: number | undefined; - if (serverTokenResponse.refresh_token_expires_in) { - const rtExpiresIn: number = - typeof serverTokenResponse.refresh_token_expires_in === - "string" - ? parseInt( - serverTokenResponse.refresh_token_expires_in, - 10 - ) - : serverTokenResponse.refresh_token_expires_in; - rtExpiresOn = reqTimestamp + rtExpiresIn; - } - cachedRefreshToken = CacheHelpers.createRefreshTokenEntity( - this.homeAccountIdentifier, - env, - serverTokenResponse.refresh_token, - this.clientId, - serverTokenResponse.foci, - userAssertionHash, - rtExpiresOn - ); - } - - // appMetadata - let cachedAppMetadata: AppMetadataEntity | null = null; - if (serverTokenResponse.foci) { - cachedAppMetadata = { - clientId: this.clientId, - environment: env, - familyId: serverTokenResponse.foci, - }; - } - - return { - account: cachedAccount, - idToken: cachedIdToken, - accessToken: cachedAccessToken, - refreshToken: cachedRefreshToken, - appMetadata: cachedAppMetadata, - }; - } - - /** - * Creates an @AuthenticationResult from @CacheRecord , @IdToken , and a boolean that states whether or not the result is from cache. - * - * Optionally takes a state string that is set as-is in the response. - * - * @param cacheRecord - * @param idTokenObj - * @param fromTokenCache - * @param stateString - */ - static async generateAuthenticationResult( - cryptoObj: ICrypto, - authority: Authority, - cacheRecord: CacheRecord, - fromTokenCache: boolean, - request: BaseAuthRequest, - idTokenClaims?: TokenClaims, - requestState?: RequestStateObject, - serverTokenResponse?: ServerAuthorizationTokenResponse, - requestId?: string - ): Promise { - let accessToken: string = Constants.EMPTY_STRING; - let responseScopes: Array = []; - let expiresOn: Date | null = null; - let extExpiresOn: Date | undefined; - let refreshOn: Date | undefined; - let familyId: string = Constants.EMPTY_STRING; - - if (cacheRecord.accessToken) { - /* - * if the request object has `popKid` property, `signPopToken` will be set to false and - * the token will be returned unsigned - */ - if ( - cacheRecord.accessToken.tokenType === - AuthenticationScheme.POP && - !request.popKid - ) { - const popTokenGenerator: PopTokenGenerator = - new PopTokenGenerator(cryptoObj); - const { secret, keyId } = cacheRecord.accessToken; - - if (!keyId) { - throw createClientAuthError( - ClientAuthErrorCodes.keyIdMissing - ); - } - - accessToken = await popTokenGenerator.signPopToken( - secret, - keyId, - request - ); - } else { - accessToken = cacheRecord.accessToken.secret; - } - responseScopes = ScopeSet.fromString( - cacheRecord.accessToken.target - ).asArray(); - expiresOn = new Date( - Number(cacheRecord.accessToken.expiresOn) * 1000 - ); - extExpiresOn = new Date( - Number(cacheRecord.accessToken.extendedExpiresOn) * 1000 - ); - if (cacheRecord.accessToken.refreshOn) { - refreshOn = new Date( - Number(cacheRecord.accessToken.refreshOn) * 1000 - ); - } - } - - if (cacheRecord.appMetadata) { - familyId = - cacheRecord.appMetadata.familyId === THE_FAMILY_ID - ? THE_FAMILY_ID - : ""; - } - const uid = idTokenClaims?.oid || idTokenClaims?.sub || ""; - const tid = idTokenClaims?.tid || ""; - - // for hybrid + native bridge enablement, send back the native account Id - if (serverTokenResponse?.spa_accountid && !!cacheRecord.account) { - cacheRecord.account.nativeAccountId = - serverTokenResponse?.spa_accountid; - } - - const accountInfo: AccountInfo | null = cacheRecord.account - ? updateAccountTenantProfileData( - cacheRecord.account.getAccountInfo(), - undefined, // tenantProfile optional - idTokenClaims, - cacheRecord.idToken?.secret - ) - : null; - - return { - authority: authority.canonicalAuthority, - uniqueId: uid, - tenantId: tid, - scopes: responseScopes, - account: accountInfo, - idToken: cacheRecord?.idToken?.secret || "", - idTokenClaims: idTokenClaims || {}, - accessToken: accessToken, - fromCache: fromTokenCache, - expiresOn: expiresOn, - extExpiresOn: extExpiresOn, - refreshOn: refreshOn, - correlationId: request.correlationId, - requestId: requestId || Constants.EMPTY_STRING, - familyId: familyId, - tokenType: - cacheRecord.accessToken?.tokenType || Constants.EMPTY_STRING, - state: requestState - ? requestState.userRequestState - : Constants.EMPTY_STRING, - cloudGraphHostName: - cacheRecord.account?.cloudGraphHostName || - Constants.EMPTY_STRING, - msGraphHost: - cacheRecord.account?.msGraphHost || Constants.EMPTY_STRING, - code: serverTokenResponse?.spa_code, - fromNativeBroker: false, - }; - } -} - -export function buildAccountToCache( - cacheStorage: CacheManager, - authority: Authority, - homeAccountId: string, - base64Decode: (input: string) => string, - correlationId: string, - idTokenClaims?: TokenClaims, - clientInfo?: string, - environment?: string, - claimsTenantId?: string | null, - authCodePayload?: AuthorizationCodePayload, - nativeAccountId?: string, - logger?: Logger -): AccountEntity { - logger?.verbose("setCachedAccount called"); - - // Check if base account is already cached - const accountKeys = cacheStorage.getAccountKeys(); - const baseAccountKey = accountKeys.find((accountKey: string) => { - return accountKey.startsWith(homeAccountId); - }); - - let cachedAccount: AccountEntity | null = null; - if (baseAccountKey) { - cachedAccount = cacheStorage.getAccount( - baseAccountKey, - correlationId, - logger - ); - } - - const baseAccount = - cachedAccount || - AccountEntity.createAccount( - { - homeAccountId, - idTokenClaims, - clientInfo, - environment, - cloudGraphHostName: authCodePayload?.cloud_graph_host_name, - msGraphHost: authCodePayload?.msgraph_host, - nativeAccountId: nativeAccountId, - }, - authority, - base64Decode - ); - - const tenantProfiles = baseAccount.tenantProfiles || []; - const tenantId = claimsTenantId || baseAccount.realm; - if ( - tenantId && - !tenantProfiles.find((tenantProfile) => { - return tenantProfile.tenantId === tenantId; - }) - ) { - const newTenantProfile = buildTenantProfile( - homeAccountId, - baseAccount.localAccountId, - tenantId, - idTokenClaims - ); - tenantProfiles.push(newTenantProfile); - } - baseAccount.tenantProfiles = tenantProfiles; - - return baseAccount; -} diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/src/response/ServerAuthorizationCodeResponse.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/src/response/ServerAuthorizationCodeResponse.ts deleted file mode 100644 index 26468c8..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/src/response/ServerAuthorizationCodeResponse.ts +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -/** - * Deserialized response object from server authorization code request. - * - code: authorization code from server - * - client_info: client info object - * - state: OAuth2 request state - * - error: error sent back in hash - * - error: description - */ -export type ServerAuthorizationCodeResponse = { - // Success case - code?: string; - client_info?: string; - state?: string; - cloud_instance_name?: string; - cloud_instance_host_name?: string; - cloud_graph_host_name?: string; - msgraph_host?: string; - // Error case - error?: string; - error_uri?: string; - error_description?: string; - suberror?: string; - timestamp?: string; - trace_id?: string; - correlation_id?: string; - claims?: string; - // Native Account ID - accountId?: string; -}; diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/src/response/ServerAuthorizationTokenResponse.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/src/response/ServerAuthorizationTokenResponse.ts deleted file mode 100644 index abfc3b3..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/src/response/ServerAuthorizationTokenResponse.ts +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import { AuthenticationScheme } from "../utils/Constants.js"; - -/** - * Deserialized response object from server authorization code request. - * - token_type: Indicates the token type value. Can be either Bearer or pop. - * - scope: The scopes that the access_token is valid for. - * - expires_in: How long the access token is valid (in seconds). - * - refresh_in: Duration afer which a token should be renewed, regardless of expiration. - * - ext_expires_in: How long the access token is valid (in seconds) if the server isn't responding. - * - access_token: The requested access token. The app can use this token to authenticate to the secured resource, such as a web API. - * - refresh_token: An OAuth 2.0 refresh token. The app can use this token acquire additional access tokens after the current access token expires. - * - id_token: A JSON Web Token (JWT). The app can decode the segments of this token to request information about the user who signed in. - * - key_id: A string that uniquely identifies a public key that the request is bound to. - * - * In case of error: - * - error: An error code string that can be used to classify types of errors that occur, and can be used to react to errors. - * - error_description: A specific error message that can help a developer identify the root cause of an authentication error. - * - error_codes: A list of STS-specific error codes that can help in diagnostics. - * - timestamp: The time at which the error occurred. - * - trace_id: A unique identifier for the request that can help in diagnostics. - * - correlation_id: A unique identifier for the request that can help in diagnostics across components. - * - status: the network request's response status - */ -export type ServerAuthorizationTokenResponse = { - status?: number; - // Success - token_type?: AuthenticationScheme; - scope?: string; - expires_in?: number; - refresh_in?: number; - ext_expires_in?: number; - access_token?: string; - refresh_token?: string; - refresh_token_expires_in?: number; - id_token?: string; - client_info?: string; - foci?: string; - spa_code?: string; - spa_accountid?: string; - key_id?: string; - // Error - error?: string; - error_description?: string; - error_codes?: Array; - suberror?: string; - timestamp?: string; - trace_id?: string; - correlation_id?: string; - claims?: string; -}; diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/src/telemetry/performance/IPerformanceClient.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/src/telemetry/performance/IPerformanceClient.ts deleted file mode 100644 index 4ff6c7b..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/src/telemetry/performance/IPerformanceClient.ts +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import { PerformanceEvent } from "./PerformanceEvent.js"; -import { IPerformanceMeasurement } from "./IPerformanceMeasurement.js"; - -export type PerformanceCallbackFunction = (events: PerformanceEvent[]) => void; - -export type InProgressPerformanceEvent = { - end: ( - event?: Partial, - error?: unknown - ) => PerformanceEvent | null; - discard: () => void; - add: (fields: { [key: string]: {} | undefined }) => void; - increment: (fields: { [key: string]: number | undefined }) => void; - event: PerformanceEvent; - /** - * @deprecated This attribute will be removed in the next major version - */ - measurement: IPerformanceMeasurement; -}; - -export interface IPerformanceClient { - startMeasurement( - measureName: string, - correlationId?: string - ): InProgressPerformanceEvent; - endMeasurement(event: PerformanceEvent): PerformanceEvent | null; - discardMeasurements(correlationId: string): void; - addFields( - fields: { [key: string]: {} | undefined }, - correlationId: string - ): void; - incrementFields( - fields: { [key: string]: number | undefined }, - correlationId: string - ): void; - removePerformanceCallback(callbackId: string): boolean; - addPerformanceCallback(callback: PerformanceCallbackFunction): string; - emitEvents(events: PerformanceEvent[], correlationId: string): void; - /** - * @deprecated This method will be removed in the next major version - */ - startPerformanceMeasurement( - measureName: string, - correlationId: string - ): IPerformanceMeasurement; - generateId(): string; - calculateQueuedTime(preQueueTime: number, currentTime: number): number; - addQueueMeasurement( - eventName: string, - correlationId?: string, - queueTime?: number, - manuallyCompleted?: boolean - ): void; - setPreQueueTime(eventName: string, correlationId?: string): void; -} - -/** - * Queue measurement type - */ -export type QueueMeasurement = { - /** - * Name of performance event - */ - eventName: string; - - /** - * Time spent in JS queue - */ - queueTime: number; - - /** - * Incomplete pre-queue events are instrumentation bugs that should be fixed. - */ - manuallyCompleted?: boolean; -}; diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/src/telemetry/performance/IPerformanceMeasurement.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/src/telemetry/performance/IPerformanceMeasurement.ts deleted file mode 100644 index a912cf0..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/src/telemetry/performance/IPerformanceMeasurement.ts +++ /dev/null @@ -1,10 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -export interface IPerformanceMeasurement { - startMeasurement(): void; - endMeasurement(): void; - flushMeasurement(): number | null; -} diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/src/telemetry/performance/PerformanceClient.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/src/telemetry/performance/PerformanceClient.ts deleted file mode 100644 index 9be26bb..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/src/telemetry/performance/PerformanceClient.ts +++ /dev/null @@ -1,936 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import { ApplicationTelemetry } from "../../config/ClientConfiguration.js"; -import { Logger } from "../../logger/Logger.js"; -import { - InProgressPerformanceEvent, - IPerformanceClient, - PerformanceCallbackFunction, - QueueMeasurement, -} from "./IPerformanceClient.js"; -import { - IntFields, - PerformanceEvent, - PerformanceEventAbbreviations, - PerformanceEventContext, - PerformanceEvents, - PerformanceEventStackedContext, - PerformanceEventStatus, -} from "./PerformanceEvent.js"; -import { IPerformanceMeasurement } from "./IPerformanceMeasurement.js"; -import { StubPerformanceMeasurement } from "./StubPerformanceClient.js"; -import { AuthError } from "../../error/AuthError.js"; -import { CacheError } from "../../error/CacheError.js"; -import { ServerError } from "../../error/ServerError.js"; -import { InteractionRequiredAuthError } from "../../error/InteractionRequiredAuthError.js"; - -export interface PreQueueEvent { - name: PerformanceEvents; - time: number; -} - -/** - * Starts context by adding payload to the stack - * @param event {PerformanceEvent} - * @param abbreviations {Map} event name abbreviations - * @param stack {?PerformanceEventStackedContext[]} stack - */ -export function startContext( - event: PerformanceEvent, - abbreviations: Map, - stack?: PerformanceEventStackedContext[] -): void { - if (!stack) { - return; - } - - stack.push({ - name: abbreviations.get(event.name) || event.name, - }); -} - -/** - * Ends context by removing payload from the stack and returning parent or self, if stack is empty, payload - * - * @param event {PerformanceEvent} - * @param abbreviations {Map} event name abbreviations - * @param stack {?PerformanceEventStackedContext[]} stack - * @param error {?unknown} error - */ -export function endContext( - event: PerformanceEvent, - abbreviations: Map, - stack?: PerformanceEventStackedContext[], - error?: unknown -): PerformanceEventContext | undefined { - if (!stack?.length) { - return; - } - - const peek = (stack: PerformanceEventStackedContext[]) => { - return stack.length ? stack[stack.length - 1] : undefined; - }; - - const abbrEventName = abbreviations.get(event.name) || event.name; - const top = peek(stack); - if (top?.name !== abbrEventName) { - return; - } - - const current = stack?.pop(); - if (!current) { - return; - } - - const errorCode = - error instanceof AuthError - ? error.errorCode - : error instanceof Error - ? error.name - : undefined; - const subErr = error instanceof AuthError ? error.subError : undefined; - - if (errorCode && current.childErr !== errorCode) { - current.err = errorCode; - if (subErr) { - current.subErr = subErr; - } - } - - delete current.name; - delete current.childErr; - - const context: PerformanceEventContext = { - ...current, - dur: event.durationMs, - }; - - if (!event.success) { - context.fail = 1; - } - - const parent = peek(stack); - if (!parent) { - return { [abbrEventName]: context }; - } - - if (errorCode) { - parent.childErr = errorCode; - } - - let childName: string; - if (!parent[abbrEventName]) { - childName = abbrEventName; - } else { - const siblings = Object.keys(parent).filter((key) => - key.startsWith(abbrEventName) - ).length; - childName = `${abbrEventName}_${siblings + 1}`; - } - parent[childName] = context; - return parent; -} - -/** - * Adds error name and stack trace to the telemetry event - * @param error {Error} - * @param logger {Logger} - * @param event {PerformanceEvent} - * @param stackMaxSize {number} max error stack size to capture - */ -export function addError( - error: unknown, - logger: Logger, - event: PerformanceEvent, - stackMaxSize: number = 5 -): void { - if (!(error instanceof Error)) { - logger.trace( - "PerformanceClient.addErrorStack: Input error is not instance of Error", - event.correlationId - ); - return; - } else if (error instanceof AuthError) { - event.errorCode = error.errorCode; - event.subErrorCode = error.subError; - if ( - error instanceof ServerError || - error instanceof InteractionRequiredAuthError - ) { - event.serverErrorNo = error.errorNo; - } - return; - } else if (error instanceof CacheError) { - event.errorCode = error.errorCode; - return; - } else if (event.errorStack?.length) { - logger.trace( - "PerformanceClient.addErrorStack: Stack already exist", - event.correlationId - ); - return; - } else if (!error.stack?.length) { - logger.trace( - "PerformanceClient.addErrorStack: Input stack is empty", - event.correlationId - ); - return; - } - - if (error.stack) { - event.errorStack = compactStack(error.stack, stackMaxSize); - } - event.errorName = error.name; -} - -/** - * Compacts error stack into array by fetching N first entries - * @param stack {string} error stack - * @param stackMaxSize {number} max error stack size to capture - * @returns {string[]} - */ -export function compactStack(stack: string, stackMaxSize: number): string[] { - if (stackMaxSize < 0) { - return []; - } - - const stackArr = stack.split("\n") || []; - - const res = []; - - // Check for a handful of known, common runtime errors and log them (with redaction where applicable). - const firstLine = stackArr[0]; - if ( - firstLine.startsWith("TypeError: Cannot read property") || - firstLine.startsWith("TypeError: Cannot read properties of") || - firstLine.startsWith("TypeError: Cannot set property") || - firstLine.startsWith("TypeError: Cannot set properties of") || - firstLine.endsWith("is not a function") - ) { - // These types of errors are not at risk of leaking PII. They will indicate unavailable APIs - res.push(compactStackLine(firstLine)); - } else if ( - firstLine.startsWith("SyntaxError") || - firstLine.startsWith("TypeError") - ) { - // Prevent unintentional leaking of arbitrary info by redacting contents between both single and double quotes - res.push( - compactStackLine( - // Example: SyntaxError: Unexpected token 'e', "test" is not valid JSON -> SyntaxError: Unexpected token , is not valid JSON - firstLine.replace(/['].*[']|["].*["]/g, "") - ) - ); - } - - // Get top N stack lines - for (let ix = 1; ix < stackArr.length; ix++) { - if (res.length >= stackMaxSize) { - break; - } - const line = stackArr[ix]; - res.push(compactStackLine(line)); - } - return res; -} - -/** - * Compacts error stack line by shortening file path - * Example: https://localhost/msal-common/src/authority/Authority.js:100:1 -> Authority.js:100:1 - * @param line {string} stack line - * @returns {string} - */ -export function compactStackLine(line: string): string { - const filePathIx = line.lastIndexOf(" ") + 1; - if (filePathIx < 1) { - return line; - } - const filePath = line.substring(filePathIx); - - let fileNameIx = filePath.lastIndexOf("/"); - fileNameIx = fileNameIx < 0 ? filePath.lastIndexOf("\\") : fileNameIx; - - if (fileNameIx >= 0) { - return ( - line.substring(0, filePathIx) + - "(" + - filePath.substring(fileNameIx + 1) + - (filePath.charAt(filePath.length - 1) === ")" ? "" : ")") - ).trimStart(); - } - - return line.trimStart(); -} - -export abstract class PerformanceClient implements IPerformanceClient { - protected authority: string; - protected libraryName: string; - protected libraryVersion: string; - protected applicationTelemetry: ApplicationTelemetry; - protected clientId: string; - protected logger: Logger; - protected callbacks: Map; - - /** - * Multiple events with the same correlation id. - * @protected - * @type {Map} - */ - protected eventsByCorrelationId: Map; - - /** - * Map of pre-queue times by correlation Id - * - * @protected - * @type {Map} - */ - protected preQueueTimeByCorrelationId: Map; - - /** - * Map of queue measurements by correlation Id - * - * @protected - * @type {Map>} - */ - protected queueMeasurements: Map>; - - protected intFields: Set; - - /** - * Map of stacked events by correlation id. - * - * @protected - */ - protected eventStack: Map; - - /** - * Event name abbreviations - * - * @protected - */ - protected abbreviations: Map; - - /** - * Creates an instance of PerformanceClient, - * an abstract class containing core performance telemetry logic. - * - * @constructor - * @param {string} clientId Client ID of the application - * @param {string} authority Authority used by the application - * @param {Logger} logger Logger used by the application - * @param {string} libraryName Name of the library - * @param {string} libraryVersion Version of the library - * @param {ApplicationTelemetry} applicationTelemetry application name and version - * @param {Set} intFields integer fields to be truncated - * @param {Map} abbreviations event name abbreviations - */ - constructor( - clientId: string, - authority: string, - logger: Logger, - libraryName: string, - libraryVersion: string, - applicationTelemetry: ApplicationTelemetry, - intFields?: Set, - abbreviations?: Map - ) { - this.authority = authority; - this.libraryName = libraryName; - this.libraryVersion = libraryVersion; - this.applicationTelemetry = applicationTelemetry; - this.clientId = clientId; - this.logger = logger; - this.callbacks = new Map(); - this.eventsByCorrelationId = new Map(); - this.eventStack = new Map(); - this.queueMeasurements = new Map(); - this.preQueueTimeByCorrelationId = new Map(); - this.intFields = intFields || new Set(); - for (const item of IntFields) { - this.intFields.add(item); - } - this.abbreviations = abbreviations || new Map(); - for (const [key, value] of PerformanceEventAbbreviations) { - this.abbreviations.set(key, value); - } - } - - /** - * Generates and returns a unique id, typically a guid. - * - * @abstract - * @returns {string} - */ - abstract generateId(): string; - - /** - * Starts and returns an platform-specific implementation of IPerformanceMeasurement. - * Note: this function can be changed to abstract at the next major version bump. - * - * @param {string} measureName - * @param {string} correlationId - * @returns {IPerformanceMeasurement} - * @deprecated This method will be removed in the next major version - */ - startPerformanceMeasurement( - measureName: string, // eslint-disable-line @typescript-eslint/no-unused-vars - correlationId: string // eslint-disable-line @typescript-eslint/no-unused-vars - ): IPerformanceMeasurement { - return {} as IPerformanceMeasurement; - } - - /** - * Sets pre-queue time by correlation Id - * - * @abstract - * @param {PerformanceEvents} eventName - * @param {string} correlationId - * @returns - */ - abstract setPreQueueTime( - eventName: PerformanceEvents, - correlationId?: string - ): void; - - /** - * Gets map of pre-queue times by correlation Id - * - * @param {PerformanceEvents} eventName - * @param {string} correlationId - * @returns {number} - */ - getPreQueueTime(eventName: string, correlationId: string): number | void { - const preQueueEvent: PreQueueEvent | undefined = - this.preQueueTimeByCorrelationId.get(correlationId); - - if (!preQueueEvent) { - this.logger.trace( - `PerformanceClient.getPreQueueTime: no pre-queue times found for correlationId: ${correlationId}, unable to add queue measurement` - ); - return; - } else if (preQueueEvent.name !== eventName) { - this.logger.trace( - `PerformanceClient.getPreQueueTime: no pre-queue time found for ${eventName}, unable to add queue measurement` - ); - return; - } - - return preQueueEvent.time; - } - - /** - * Calculates the difference between current time and time when function was queued. - * Note: It is possible to have 0 as the queue time if the current time and the queued time was the same. - * - * @param {number} preQueueTime - * @param {number} currentTime - * @returns {number} - */ - calculateQueuedTime(preQueueTime: number, currentTime: number): number { - if (preQueueTime < 1) { - this.logger.trace( - `PerformanceClient: preQueueTime should be a positive integer and not ${preQueueTime}` - ); - return 0; - } - - if (currentTime < 1) { - this.logger.trace( - `PerformanceClient: currentTime should be a positive integer and not ${currentTime}` - ); - return 0; - } - - if (currentTime < preQueueTime) { - this.logger.trace( - "PerformanceClient: currentTime is less than preQueueTime, check how time is being retrieved" - ); - return 0; - } - - return currentTime - preQueueTime; - } - - /** - * Adds queue measurement time to QueueMeasurements array for given correlation ID. - * - * @param {PerformanceEvents} eventName - * @param {?string} correlationId - * @param {?number} queueTime - * @param {?boolean} manuallyCompleted - indicator for manually completed queue measurements - * @returns - */ - addQueueMeasurement( - eventName: string, - correlationId?: string, - queueTime?: number, - manuallyCompleted?: boolean - ): void { - if (!correlationId) { - this.logger.trace( - `PerformanceClient.addQueueMeasurement: correlationId not provided for ${eventName}, cannot add queue measurement` - ); - return; - } - - if (queueTime === 0) { - // Possible for there to be no queue time after calculation - this.logger.trace( - `PerformanceClient.addQueueMeasurement: queue time provided for ${eventName} is ${queueTime}` - ); - } else if (!queueTime) { - this.logger.trace( - `PerformanceClient.addQueueMeasurement: no queue time provided for ${eventName}` - ); - return; - } - - const queueMeasurement: QueueMeasurement = { - eventName, - // Always default queue time to 0 for manually completed (improperly instrumented) - queueTime: manuallyCompleted ? 0 : queueTime, - manuallyCompleted, - }; - - // Adds to existing correlation Id if present in queueMeasurements - const existingMeasurements = this.queueMeasurements.get(correlationId); - if (existingMeasurements) { - existingMeasurements.push(queueMeasurement); - this.queueMeasurements.set(correlationId, existingMeasurements); - } else { - // Sets new correlation Id if not present in queueMeasurements - this.logger.trace( - `PerformanceClient.addQueueMeasurement: adding correlationId ${correlationId} to queue measurements` - ); - const measurementArray = [queueMeasurement]; - this.queueMeasurements.set(correlationId, measurementArray); - } - // Delete processed pre-queue event. - this.preQueueTimeByCorrelationId.delete(correlationId); - } - - /** - * Starts measuring performance for a given operation. Returns a function that should be used to end the measurement. - * - * @param {PerformanceEvents} measureName - * @param {?string} [correlationId] - * @returns {InProgressPerformanceEvent} - */ - startMeasurement( - measureName: string, - correlationId?: string - ): InProgressPerformanceEvent { - // Generate a placeholder correlation if the request does not provide one - const eventCorrelationId = correlationId || this.generateId(); - if (!correlationId) { - this.logger.info( - `PerformanceClient: No correlation id provided for ${measureName}, generating`, - eventCorrelationId - ); - } - - this.logger.trace( - `PerformanceClient: Performance measurement started for ${measureName}`, - eventCorrelationId - ); - - const inProgressEvent: PerformanceEvent = { - eventId: this.generateId(), - status: PerformanceEventStatus.InProgress, - authority: this.authority, - libraryName: this.libraryName, - libraryVersion: this.libraryVersion, - clientId: this.clientId, - name: measureName, - startTimeMs: Date.now(), - correlationId: eventCorrelationId, - appName: this.applicationTelemetry?.appName, - appVersion: this.applicationTelemetry?.appVersion, - }; - - // Store in progress events so they can be discarded if not ended properly - this.cacheEventByCorrelationId(inProgressEvent); - startContext( - inProgressEvent, - this.abbreviations, - this.eventStack.get(eventCorrelationId) - ); - - // Return the event and functions the caller can use to properly end/flush the measurement - return { - end: ( - event?: Partial, - error?: unknown - ): PerformanceEvent | null => { - return this.endMeasurement( - { - // Initial set of event properties - ...inProgressEvent, - // Properties set when event ends - ...event, - }, - error - ); - }, - discard: () => { - return this.discardMeasurements(inProgressEvent.correlationId); - }, - add: (fields: { [key: string]: {} | undefined }) => { - return this.addFields(fields, inProgressEvent.correlationId); - }, - increment: (fields: { [key: string]: number | undefined }) => { - return this.incrementFields( - fields, - inProgressEvent.correlationId - ); - }, - event: inProgressEvent, - measurement: new StubPerformanceMeasurement(), - }; - } - - /** - * Stops measuring the performance for an operation. Should only be called directly by PerformanceClient classes, - * as consumers should instead use the function returned by startMeasurement. - * Adds a new field named as "[event name]DurationMs" for sub-measurements, completes and emits an event - * otherwise. - * - * @param {PerformanceEvent} event - * @param {unknown} error - * @returns {(PerformanceEvent | null)} - */ - endMeasurement( - event: PerformanceEvent, - error?: unknown - ): PerformanceEvent | null { - const rootEvent: PerformanceEvent | undefined = - this.eventsByCorrelationId.get(event.correlationId); - if (!rootEvent) { - this.logger.trace( - `PerformanceClient: Measurement not found for ${event.eventId}`, - event.correlationId - ); - return null; - } - - const isRoot = event.eventId === rootEvent.eventId; - let queueInfo = { - totalQueueTime: 0, - totalQueueCount: 0, - manuallyCompletedCount: 0, - }; - - event.durationMs = Math.round( - event.durationMs || this.getDurationMs(event.startTimeMs) - ); - - const context = JSON.stringify( - endContext( - event, - this.abbreviations, - this.eventStack.get(rootEvent.correlationId), - error - ) - ); - - if (isRoot) { - queueInfo = this.getQueueInfo(event.correlationId); - this.discardMeasurements(rootEvent.correlationId); - } else { - rootEvent.incompleteSubMeasurements?.delete(event.eventId); - } - - this.logger.trace( - `PerformanceClient: Performance measurement ended for ${event.name}: ${event.durationMs} ms`, - event.correlationId - ); - - if (error) { - addError(error, this.logger, rootEvent); - } - - // Add sub-measurement attribute to root event. - if (!isRoot) { - rootEvent[event.name + "DurationMs"] = Math.floor(event.durationMs); - return { ...rootEvent }; - } - - if ( - isRoot && - !error && - (rootEvent.errorCode || rootEvent.subErrorCode) - ) { - this.logger.trace( - `PerformanceClient: Remove error and sub-error codes for root event ${event.name} as intermediate error was successfully handled`, - event.correlationId - ); - rootEvent.errorCode = undefined; - rootEvent.subErrorCode = undefined; - } - - let finalEvent: PerformanceEvent = { ...rootEvent, ...event }; - let incompleteSubsCount: number = 0; - // Incomplete sub-measurements are discarded. They are likely an instrumentation bug that should be fixed. - finalEvent.incompleteSubMeasurements?.forEach((subMeasurement) => { - this.logger.trace( - `PerformanceClient: Incomplete submeasurement ${subMeasurement.name} found for ${event.name}`, - finalEvent.correlationId - ); - incompleteSubsCount++; - }); - finalEvent.incompleteSubMeasurements = undefined; - - finalEvent = { - ...finalEvent, - queuedTimeMs: queueInfo.totalQueueTime, - queuedCount: queueInfo.totalQueueCount, - queuedManuallyCompletedCount: queueInfo.manuallyCompletedCount, - status: PerformanceEventStatus.Completed, - incompleteSubsCount, - context, - }; - this.truncateIntegralFields(finalEvent); - this.emitEvents([finalEvent], event.correlationId); - - return finalEvent; - } - - /** - * Saves extra information to be emitted when the measurements are flushed - * @param fields - * @param correlationId - */ - addFields( - fields: { [key: string]: {} | undefined }, - correlationId: string - ): void { - this.logger.trace("PerformanceClient: Updating static fields"); - const event = this.eventsByCorrelationId.get(correlationId); - if (event) { - this.eventsByCorrelationId.set(correlationId, { - ...event, - ...fields, - }); - } else { - this.logger.trace( - "PerformanceClient: Event not found for", - correlationId - ); - } - } - - /** - * Increment counters to be emitted when the measurements are flushed - * @param fields {string[]} - * @param correlationId {string} correlation identifier - */ - incrementFields( - fields: { [key: string]: number | undefined }, - correlationId: string - ): void { - this.logger.trace("PerformanceClient: Updating counters"); - const event = this.eventsByCorrelationId.get(correlationId); - if (event) { - for (const counter in fields) { - if (!event.hasOwnProperty(counter)) { - event[counter] = 0; - } else if (isNaN(Number(event[counter]))) { - return; - } - event[counter] += fields[counter]; - } - } else { - this.logger.trace( - "PerformanceClient: Event not found for", - correlationId - ); - } - } - - /** - * Upserts event into event cache. - * First key is the correlation id, second key is the event id. - * Allows for events to be grouped by correlation id, - * and to easily allow for properties on them to be updated. - * - * @private - * @param {PerformanceEvent} event - */ - protected cacheEventByCorrelationId(event: PerformanceEvent): void { - const rootEvent = this.eventsByCorrelationId.get(event.correlationId); - if (rootEvent) { - this.logger.trace( - `PerformanceClient: Performance measurement for ${event.name} added/updated`, - event.correlationId - ); - rootEvent.incompleteSubMeasurements = - rootEvent.incompleteSubMeasurements || new Map(); - rootEvent.incompleteSubMeasurements.set(event.eventId, { - name: event.name, - startTimeMs: event.startTimeMs, - }); - } else { - this.logger.trace( - `PerformanceClient: Performance measurement for ${event.name} started`, - event.correlationId - ); - this.eventsByCorrelationId.set(event.correlationId, { ...event }); - this.eventStack.set(event.correlationId, []); - } - } - - private getQueueInfo(correlationId: string): { - totalQueueTime: number; - totalQueueCount: number; - manuallyCompletedCount: number; - } { - const queueMeasurementForCorrelationId = - this.queueMeasurements.get(correlationId); - if (!queueMeasurementForCorrelationId) { - this.logger.trace( - `PerformanceClient: no queue measurements found for for correlationId: ${correlationId}` - ); - } - - let totalQueueTime = 0; - let totalQueueCount = 0; - let manuallyCompletedCount = 0; - queueMeasurementForCorrelationId?.forEach((measurement) => { - totalQueueTime += measurement.queueTime; - totalQueueCount++; - manuallyCompletedCount += measurement.manuallyCompleted ? 1 : 0; - }); - - return { - totalQueueTime, - totalQueueCount, - manuallyCompletedCount, - }; - } - - /** - * Removes measurements and aux data for a given correlation id. - * - * @param {string} correlationId - */ - discardMeasurements(correlationId: string): void { - this.logger.trace( - "PerformanceClient: Performance measurements discarded", - correlationId - ); - this.eventsByCorrelationId.delete(correlationId); - - this.logger.trace( - "PerformanceClient: QueueMeasurements discarded", - correlationId - ); - this.queueMeasurements.delete(correlationId); - - this.logger.trace( - "PerformanceClient: Pre-queue times discarded", - correlationId - ); - this.preQueueTimeByCorrelationId.delete(correlationId); - - this.logger.trace( - "PerformanceClient: Event stack discarded", - correlationId - ); - this.eventStack.delete(correlationId); - } - - /** - * Registers a callback function to receive performance events. - * - * @param {PerformanceCallbackFunction} callback - * @returns {string} - */ - addPerformanceCallback(callback: PerformanceCallbackFunction): string { - for (const [id, cb] of this.callbacks) { - if (cb.toString() === callback.toString()) { - this.logger.warning( - `PerformanceClient: Performance callback is already registered with id: ${id}` - ); - return id; - } - } - - const callbackId = this.generateId(); - this.callbacks.set(callbackId, callback); - this.logger.verbose( - `PerformanceClient: Performance callback registered with id: ${callbackId}` - ); - - return callbackId; - } - - /** - * Removes a callback registered with addPerformanceCallback. - * - * @param {string} callbackId - * @returns {boolean} - */ - removePerformanceCallback(callbackId: string): boolean { - const result = this.callbacks.delete(callbackId); - - if (result) { - this.logger.verbose( - `PerformanceClient: Performance callback ${callbackId} removed.` - ); - } else { - this.logger.verbose( - `PerformanceClient: Performance callback ${callbackId} not removed.` - ); - } - - return result; - } - - /** - * Emits events to all registered callbacks. - * - * @param {PerformanceEvent[]} events - * @param {?string} [correlationId] - */ - emitEvents(events: PerformanceEvent[], correlationId: string): void { - this.logger.verbose( - "PerformanceClient: Emitting performance events", - correlationId - ); - - this.callbacks.forEach( - (callback: PerformanceCallbackFunction, callbackId: string) => { - this.logger.trace( - `PerformanceClient: Emitting event to callback ${callbackId}`, - correlationId - ); - callback.apply(null, [events]); - } - ); - } - - /** - * Enforce truncation of integral fields in performance event. - * @param {PerformanceEvent} event performance event to update. - */ - private truncateIntegralFields(event: PerformanceEvent): void { - this.intFields.forEach((key) => { - if (key in event && typeof event[key] === "number") { - event[key] = Math.floor(event[key]); - } - }); - } - - /** - * Returns event duration in milliseconds - * @param startTimeMs {number} - * @returns {number} - */ - private getDurationMs(startTimeMs: number): number { - const durationMs = Date.now() - startTimeMs; - // Handle clock skew - return durationMs < 0 ? durationMs : 0; - } -} diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/src/telemetry/performance/PerformanceEvent.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/src/telemetry/performance/PerformanceEvent.ts deleted file mode 100644 index 9d0cbf7..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/src/telemetry/performance/PerformanceEvent.ts +++ /dev/null @@ -1,879 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -/** - * Enumeration of operations that are instrumented by have their performance measured by the PerformanceClient. - * - * @export - * @enum {number} - */ -export const PerformanceEvents = { - /** - * acquireTokenByCode API (msal-browser and msal-node). - * Used to acquire tokens by trading an authorization code against the token endpoint. - */ - AcquireTokenByCode: "acquireTokenByCode", - - /** - * acquireTokenByRefreshToken API (msal-browser and msal-node). - * Used to renew an access token using a refresh token against the token endpoint. - */ - AcquireTokenByRefreshToken: "acquireTokenByRefreshToken", - - /** - * acquireTokenSilent API (msal-browser and msal-node). - * Used to silently acquire a new access token (from the cache or the network). - */ - AcquireTokenSilent: "acquireTokenSilent", - - /** - * acquireTokenSilentAsync (msal-browser). - * Internal API for acquireTokenSilent. - */ - AcquireTokenSilentAsync: "acquireTokenSilentAsync", - - /** - * acquireTokenPopup (msal-browser). - * Used to acquire a new access token interactively through pop ups - */ - AcquireTokenPopup: "acquireTokenPopup", - - /** - * acquireTokenPreRedirect (msal-browser). - * First part of the redirect flow. - * Used to acquire a new access token interactively through redirects. - */ - AcquireTokenPreRedirect: "acquireTokenPreRedirect", - - /** - * acquireTokenRedirect (msal-browser). - * Second part of the redirect flow. - * Used to acquire a new access token interactively through redirects. - */ - AcquireTokenRedirect: "acquireTokenRedirect", - - /** - * getPublicKeyThumbprint API in CryptoOpts class (msal-browser). - * Used to generate a public/private keypair and generate a public key thumbprint for pop requests. - */ - CryptoOptsGetPublicKeyThumbprint: "cryptoOptsGetPublicKeyThumbprint", - - /** - * signJwt API in CryptoOpts class (msal-browser). - * Used to signed a pop token. - */ - CryptoOptsSignJwt: "cryptoOptsSignJwt", - - /** - * acquireToken API in the SilentCacheClient class (msal-browser). - * Used to read access tokens from the cache. - */ - SilentCacheClientAcquireToken: "silentCacheClientAcquireToken", - - /** - * acquireToken API in the SilentIframeClient class (msal-browser). - * Used to acquire a new set of tokens from the authorize endpoint in a hidden iframe. - */ - SilentIframeClientAcquireToken: "silentIframeClientAcquireToken", - AwaitConcurrentIframe: "awaitConcurrentIframe", // Time spent waiting for a concurrent iframe to complete - - /** - * acquireToken API in SilentRereshClient (msal-browser). - * Used to acquire a new set of tokens from the token endpoint using a refresh token. - */ - SilentRefreshClientAcquireToken: "silentRefreshClientAcquireToken", - - /** - * ssoSilent API (msal-browser). - * Used to silently acquire an authorization code and set of tokens using a hidden iframe. - */ - SsoSilent: "ssoSilent", - - /** - * getDiscoveredAuthority API in StandardInteractionClient class (msal-browser). - * Used to load authority metadata for a request. - */ - StandardInteractionClientGetDiscoveredAuthority: - "standardInteractionClientGetDiscoveredAuthority", - - /** - * acquireToken APIs in msal-browser. - * Used to make an /authorize endpoint call with native brokering enabled. - */ - FetchAccountIdWithNativeBroker: "fetchAccountIdWithNativeBroker", - - /** - * acquireToken API in NativeInteractionClient class (msal-browser). - * Used to acquire a token from Native component when native brokering is enabled. - */ - NativeInteractionClientAcquireToken: "nativeInteractionClientAcquireToken", - /** - * Time spent creating default headers for requests to token endpoint - */ - BaseClientCreateTokenRequestHeaders: "baseClientCreateTokenRequestHeaders", - /** - * Time spent sending/waiting for the response of a request to the token endpoint - */ - NetworkClientSendPostRequestAsync: "networkClientSendPostRequestAsync", - RefreshTokenClientExecutePostToTokenEndpoint: - "refreshTokenClientExecutePostToTokenEndpoint", - AuthorizationCodeClientExecutePostToTokenEndpoint: - "authorizationCodeClientExecutePostToTokenEndpoint", - /** - * Used to measure the time taken for completing embedded-broker handshake (PW-Broker). - */ - BrokerHandhshake: "brokerHandshake", - /** - * acquireTokenByRefreshToken API in BrokerClientApplication (PW-Broker) . - */ - AcquireTokenByRefreshTokenInBroker: "acquireTokenByRefreshTokenInBroker", - /** - * Time taken for token acquisition by broker - */ - AcquireTokenByBroker: "acquireTokenByBroker", - - /** - * Time spent on the network for refresh token acquisition - */ - RefreshTokenClientExecuteTokenRequest: - "refreshTokenClientExecuteTokenRequest", - - /** - * Time taken for acquiring refresh token , records RT size - */ - RefreshTokenClientAcquireToken: "refreshTokenClientAcquireToken", - - /** - * Time taken for acquiring cached refresh token - */ - RefreshTokenClientAcquireTokenWithCachedRefreshToken: - "refreshTokenClientAcquireTokenWithCachedRefreshToken", - - /** - * acquireTokenByRefreshToken API in RefreshTokenClient (msal-common). - */ - RefreshTokenClientAcquireTokenByRefreshToken: - "refreshTokenClientAcquireTokenByRefreshToken", - - /** - * Helper function to create token request body in RefreshTokenClient (msal-common). - */ - RefreshTokenClientCreateTokenRequestBody: - "refreshTokenClientCreateTokenRequestBody", - - /** - * acquireTokenFromCache (msal-browser). - * Internal API for acquiring token from cache - */ - AcquireTokenFromCache: "acquireTokenFromCache", - SilentFlowClientAcquireCachedToken: "silentFlowClientAcquireCachedToken", - SilentFlowClientGenerateResultFromCacheRecord: - "silentFlowClientGenerateResultFromCacheRecord", - - /** - * acquireTokenBySilentIframe (msal-browser). - * Internal API for acquiring token by silent Iframe - */ - AcquireTokenBySilentIframe: "acquireTokenBySilentIframe", - - /** - * Internal API for initializing base request in BaseInteractionClient (msal-browser) - */ - InitializeBaseRequest: "initializeBaseRequest", - - /** - * Internal API for initializing silent request in SilentCacheClient (msal-browser) - */ - InitializeSilentRequest: "initializeSilentRequest", - - InitializeClientApplication: "initializeClientApplication", - - /** - * Helper function in SilentIframeClient class (msal-browser). - */ - SilentIframeClientTokenHelper: "silentIframeClientTokenHelper", - - /** - * SilentHandler - */ - SilentHandlerInitiateAuthRequest: "silentHandlerInitiateAuthRequest", - SilentHandlerMonitorIframeForHash: "silentHandlerMonitorIframeForHash", - SilentHandlerLoadFrame: "silentHandlerLoadFrame", - SilentHandlerLoadFrameSync: "silentHandlerLoadFrameSync", - - /** - * Helper functions in StandardInteractionClient class (msal-browser) - */ - StandardInteractionClientCreateAuthCodeClient: - "standardInteractionClientCreateAuthCodeClient", - StandardInteractionClientGetClientConfiguration: - "standardInteractionClientGetClientConfiguration", - StandardInteractionClientInitializeAuthorizationRequest: - "standardInteractionClientInitializeAuthorizationRequest", - StandardInteractionClientInitializeAuthorizationCodeRequest: - "standardInteractionClientInitializeAuthorizationCodeRequest", - - /** - * getAuthCodeUrl API (msal-browser and msal-node). - */ - GetAuthCodeUrl: "getAuthCodeUrl", - - /** - * Functions from InteractionHandler (msal-browser) - */ - HandleCodeResponseFromServer: "handleCodeResponseFromServer", - HandleCodeResponse: "handleCodeResponse", - UpdateTokenEndpointAuthority: "updateTokenEndpointAuthority", - - /** - * APIs in Authorization Code Client (msal-common) - */ - AuthClientAcquireToken: "authClientAcquireToken", - AuthClientExecuteTokenRequest: "authClientExecuteTokenRequest", - AuthClientCreateTokenRequestBody: "authClientCreateTokenRequestBody", - AuthClientCreateQueryString: "authClientCreateQueryString", - - /** - * Generate functions in PopTokenGenerator (msal-common) - */ - PopTokenGenerateCnf: "popTokenGenerateCnf", - PopTokenGenerateKid: "popTokenGenerateKid", - - /** - * handleServerTokenResponse API in ResponseHandler (msal-common) - */ - HandleServerTokenResponse: "handleServerTokenResponse", - DeserializeResponse: "deserializeResponse", - - /** - * Authority functions - */ - AuthorityFactoryCreateDiscoveredInstance: - "authorityFactoryCreateDiscoveredInstance", - AuthorityResolveEndpointsAsync: "authorityResolveEndpointsAsync", - AuthorityResolveEndpointsFromLocalSources: - "authorityResolveEndpointsFromLocalSources", - AuthorityGetCloudDiscoveryMetadataFromNetwork: - "authorityGetCloudDiscoveryMetadataFromNetwork", - AuthorityUpdateCloudDiscoveryMetadata: - "authorityUpdateCloudDiscoveryMetadata", - AuthorityGetEndpointMetadataFromNetwork: - "authorityGetEndpointMetadataFromNetwork", - AuthorityUpdateEndpointMetadata: "authorityUpdateEndpointMetadata", - AuthorityUpdateMetadataWithRegionalInformation: - "authorityUpdateMetadataWithRegionalInformation", - - /** - * Region Discovery functions - */ - RegionDiscoveryDetectRegion: "regionDiscoveryDetectRegion", - RegionDiscoveryGetRegionFromIMDS: "regionDiscoveryGetRegionFromIMDS", - RegionDiscoveryGetCurrentVersion: "regionDiscoveryGetCurrentVersion", - - AcquireTokenByCodeAsync: "acquireTokenByCodeAsync", - - GetEndpointMetadataFromNetwork: "getEndpointMetadataFromNetwork", - GetCloudDiscoveryMetadataFromNetworkMeasurement: - "getCloudDiscoveryMetadataFromNetworkMeasurement", - - HandleRedirectPromiseMeasurement: "handleRedirectPromise", - HandleNativeRedirectPromiseMeasurement: "handleNativeRedirectPromise", - - UpdateCloudDiscoveryMetadataMeasurement: - "updateCloudDiscoveryMetadataMeasurement", - - UsernamePasswordClientAcquireToken: "usernamePasswordClientAcquireToken", - - NativeMessageHandlerHandshake: "nativeMessageHandlerHandshake", - - NativeGenerateAuthResult: "nativeGenerateAuthResult", - - RemoveHiddenIframe: "removeHiddenIframe", - - /** - * Cache operations - */ - ClearTokensAndKeysWithClaims: "clearTokensAndKeysWithClaims", - CacheManagerGetRefreshToken: "cacheManagerGetRefreshToken", - - /** - * Crypto Operations - */ - GeneratePkceCodes: "generatePkceCodes", - GenerateCodeVerifier: "generateCodeVerifier", - GenerateCodeChallengeFromVerifier: "generateCodeChallengeFromVerifier", - Sha256Digest: "sha256Digest", - GetRandomValues: "getRandomValues", -} as const; -export type PerformanceEvents = - (typeof PerformanceEvents)[keyof typeof PerformanceEvents]; - -export const PerformanceEventAbbreviations: ReadonlyMap = - new Map([ - [PerformanceEvents.AcquireTokenByCode, "ATByCode"], - [PerformanceEvents.AcquireTokenByRefreshToken, "ATByRT"], - [PerformanceEvents.AcquireTokenSilent, "ATS"], - [PerformanceEvents.AcquireTokenSilentAsync, "ATSAsync"], - [PerformanceEvents.AcquireTokenPopup, "ATPopup"], - [PerformanceEvents.AcquireTokenRedirect, "ATRedirect"], - [ - PerformanceEvents.CryptoOptsGetPublicKeyThumbprint, - "CryptoGetPKThumb", - ], - [PerformanceEvents.CryptoOptsSignJwt, "CryptoSignJwt"], - [PerformanceEvents.SilentCacheClientAcquireToken, "SltCacheClientAT"], - [PerformanceEvents.SilentIframeClientAcquireToken, "SltIframeClientAT"], - [PerformanceEvents.SilentRefreshClientAcquireToken, "SltRClientAT"], - [PerformanceEvents.SsoSilent, "SsoSlt"], - [ - PerformanceEvents.StandardInteractionClientGetDiscoveredAuthority, - "StdIntClientGetDiscAuth", - ], - [ - PerformanceEvents.FetchAccountIdWithNativeBroker, - "FetchAccIdWithNtvBroker", - ], - [ - PerformanceEvents.NativeInteractionClientAcquireToken, - "NtvIntClientAT", - ], - [ - PerformanceEvents.BaseClientCreateTokenRequestHeaders, - "BaseClientCreateTReqHead", - ], - [ - PerformanceEvents.NetworkClientSendPostRequestAsync, - "NetClientSendPost", - ], - [ - PerformanceEvents.RefreshTokenClientExecutePostToTokenEndpoint, - "RTClientExecPost", - ], - [ - PerformanceEvents.AuthorizationCodeClientExecutePostToTokenEndpoint, - "AuthCodeClientExecPost", - ], - [PerformanceEvents.BrokerHandhshake, "BrokerHandshake"], - [ - PerformanceEvents.AcquireTokenByRefreshTokenInBroker, - "ATByRTInBroker", - ], - [PerformanceEvents.AcquireTokenByBroker, "ATByBroker"], - [ - PerformanceEvents.RefreshTokenClientExecuteTokenRequest, - "RTClientExecTReq", - ], - [PerformanceEvents.RefreshTokenClientAcquireToken, "RTClientAT"], - [ - PerformanceEvents.RefreshTokenClientAcquireTokenWithCachedRefreshToken, - "RTClientATWithCachedRT", - ], - [ - PerformanceEvents.RefreshTokenClientAcquireTokenByRefreshToken, - "RTClientATByRT", - ], - [ - PerformanceEvents.RefreshTokenClientCreateTokenRequestBody, - "RTClientCreateTReqBody", - ], - [PerformanceEvents.AcquireTokenFromCache, "ATFromCache"], - [ - PerformanceEvents.SilentFlowClientAcquireCachedToken, - "SltFlowClientATCached", - ], - [ - PerformanceEvents.SilentFlowClientGenerateResultFromCacheRecord, - "SltFlowClientGenResFromCache", - ], - [PerformanceEvents.AcquireTokenBySilentIframe, "ATBySltIframe"], - [PerformanceEvents.InitializeBaseRequest, "InitBaseReq"], - [PerformanceEvents.InitializeSilentRequest, "InitSltReq"], - [ - PerformanceEvents.InitializeClientApplication, - "InitClientApplication", - ], - [PerformanceEvents.SilentIframeClientTokenHelper, "SIClientTHelper"], - [ - PerformanceEvents.SilentHandlerInitiateAuthRequest, - "SHandlerInitAuthReq", - ], - [ - PerformanceEvents.SilentHandlerMonitorIframeForHash, - "SltHandlerMonitorIframeForHash", - ], - [PerformanceEvents.SilentHandlerLoadFrame, "SHandlerLoadFrame"], - [PerformanceEvents.SilentHandlerLoadFrameSync, "SHandlerLoadFrameSync"], - - [ - PerformanceEvents.StandardInteractionClientCreateAuthCodeClient, - "StdIntClientCreateAuthCodeClient", - ], - [ - PerformanceEvents.StandardInteractionClientGetClientConfiguration, - "StdIntClientGetClientConf", - ], - [ - PerformanceEvents.StandardInteractionClientInitializeAuthorizationRequest, - "StdIntClientInitAuthReq", - ], - [ - PerformanceEvents.StandardInteractionClientInitializeAuthorizationCodeRequest, - "StdIntClientInitAuthCodeReq", - ], - - [PerformanceEvents.GetAuthCodeUrl, "GetAuthCodeUrl"], - - [ - PerformanceEvents.HandleCodeResponseFromServer, - "HandleCodeResFromServer", - ], - [PerformanceEvents.HandleCodeResponse, "HandleCodeResp"], - [PerformanceEvents.UpdateTokenEndpointAuthority, "UpdTEndpointAuth"], - - [PerformanceEvents.AuthClientAcquireToken, "AuthClientAT"], - [PerformanceEvents.AuthClientExecuteTokenRequest, "AuthClientExecTReq"], - [ - PerformanceEvents.AuthClientCreateTokenRequestBody, - "AuthClientCreateTReqBody", - ], - [ - PerformanceEvents.AuthClientCreateQueryString, - "AuthClientCreateQueryStr", - ], - [PerformanceEvents.PopTokenGenerateCnf, "PopTGenCnf"], - [PerformanceEvents.PopTokenGenerateKid, "PopTGenKid"], - [PerformanceEvents.HandleServerTokenResponse, "HandleServerTRes"], - [PerformanceEvents.DeserializeResponse, "DeserializeRes"], - [ - PerformanceEvents.AuthorityFactoryCreateDiscoveredInstance, - "AuthFactCreateDiscInst", - ], - [ - PerformanceEvents.AuthorityResolveEndpointsAsync, - "AuthResolveEndpointsAsync", - ], - [ - PerformanceEvents.AuthorityResolveEndpointsFromLocalSources, - "AuthResolveEndpointsFromLocal", - ], - [ - PerformanceEvents.AuthorityGetCloudDiscoveryMetadataFromNetwork, - "AuthGetCDMetaFromNet", - ], - [ - PerformanceEvents.AuthorityUpdateCloudDiscoveryMetadata, - "AuthUpdCDMeta", - ], - [ - PerformanceEvents.AuthorityGetEndpointMetadataFromNetwork, - "AuthUpdCDMetaFromNet", - ], - [ - PerformanceEvents.AuthorityUpdateEndpointMetadata, - "AuthUpdEndpointMeta", - ], - [ - PerformanceEvents.AuthorityUpdateMetadataWithRegionalInformation, - "AuthUpdMetaWithRegInfo", - ], - [PerformanceEvents.RegionDiscoveryDetectRegion, "RegDiscDetectReg"], - [ - PerformanceEvents.RegionDiscoveryGetRegionFromIMDS, - "RegDiscGetRegFromIMDS", - ], - [ - PerformanceEvents.RegionDiscoveryGetCurrentVersion, - "RegDiscGetCurrentVer", - ], - [PerformanceEvents.AcquireTokenByCodeAsync, "ATByCodeAsync"], - [ - PerformanceEvents.GetEndpointMetadataFromNetwork, - "GetEndpointMetaFromNet", - ], - [ - PerformanceEvents.GetCloudDiscoveryMetadataFromNetworkMeasurement, - "GetCDMetaFromNet", - ], - [ - PerformanceEvents.HandleRedirectPromiseMeasurement, - "HandleRedirectPromise", - ], - [ - PerformanceEvents.HandleNativeRedirectPromiseMeasurement, - "HandleNtvRedirectPromise", - ], - [ - PerformanceEvents.UpdateCloudDiscoveryMetadataMeasurement, - "UpdateCDMeta", - ], - [ - PerformanceEvents.UsernamePasswordClientAcquireToken, - "UserPassClientAT", - ], - [ - PerformanceEvents.NativeMessageHandlerHandshake, - "NtvMsgHandlerHandshake", - ], - [PerformanceEvents.NativeGenerateAuthResult, "NtvGenAuthRes"], - [PerformanceEvents.RemoveHiddenIframe, "RemoveHiddenIframe"], - [ - PerformanceEvents.ClearTokensAndKeysWithClaims, - "ClearTAndKeysWithClaims", - ], - [PerformanceEvents.CacheManagerGetRefreshToken, "CacheManagerGetRT"], - [PerformanceEvents.GeneratePkceCodes, "GenPkceCodes"], - [PerformanceEvents.GenerateCodeVerifier, "GenCodeVerifier"], - [ - PerformanceEvents.GenerateCodeChallengeFromVerifier, - "GenCodeChallengeFromVerifier", - ], - [PerformanceEvents.Sha256Digest, "Sha256Digest"], - [PerformanceEvents.GetRandomValues, "GetRandomValues"], - ]); - -/** - * State of the performance event. - * - * @export - * @enum {number} - */ -export const PerformanceEventStatus = { - NotStarted: 0, - InProgress: 1, - Completed: 2, -} as const; -export type PerformanceEventStatus = - (typeof PerformanceEventStatus)[keyof typeof PerformanceEventStatus]; - -export type SubMeasurement = { - name: string; - startTimeMs: number; -}; - -/** - * Performance measurement taken by the library, including metadata about the request and application. - * - * @export - * @typedef {PerformanceEvent} - */ -export type PerformanceEvent = { - /** - * Unique id for the event - * - * @type {string} - */ - eventId: string; - - /** - * State of the perforance measure. - * - * @type {PerformanceEventStatus} - */ - status: PerformanceEventStatus; - - /** - * Login authority used for the request - * - * @type {string} - */ - authority: string; - - /** - * Client id for the application - * - * @type {string} - */ - clientId: string; - - /** - * Correlation ID used for the request - * - * @type {string} - */ - correlationId: string; - - /** - * End-to-end duration in milliseconds. - * @date 3/22/2022 - 3:40:05 PM - * - * @type {number} - */ - durationMs?: number; - - /** - * Visibility of the page when the event completed. - * Read from: https://developer.mozilla.org/docs/Web/API/Page_Visibility_API - * - * @type {?(string | null)} - */ - endPageVisibility?: string | null; - - /** - * Whether the result was retrieved from the cache. - * - * @type {(boolean | null)} - */ - fromCache?: boolean | null; - - /** - * Event name (usually in the form of classNameFunctionName) - * - * @type {string} - */ - name: string; - - /** - * Visibility of the page when the event completed. - * Read from: https://developer.mozilla.org/docs/Web/API/Page_Visibility_API - * - * @type {?(string | null)} - */ - startPageVisibility?: string | null; - - /** - * Unix millisecond timestamp when the event was initiated. - * - * @type {number} - */ - startTimeMs: number; - - /** - * Whether or the operation completed successfully. - * - * @type {(boolean | null)} - */ - success?: boolean | null; - - /** - * Add specific error code in case of failure - * - * @type {string} - */ - errorCode?: string; - - /** - * Add specific sub error code in case of failure - * - * @type {string} - */ - subErrorCode?: string; - - /** - * Server error number - */ - serverErrorNo?: string; - - /** - * Name of the library used for the operation. - * - * @type {string} - */ - libraryName: string; - - /** - * Version of the library used for the operation. - * - * @type {string} - */ - libraryVersion: string; - - /** - * Whether the response is from a native component (e.g., WAM) - * - * @type {?boolean} - */ - isNativeBroker?: boolean; - - /** - * Request ID returned from the response - * - * @type {?string} - */ - requestId?: string; - - /** - * Cache lookup policy - * - * @type {?number} - */ - cacheLookupPolicy?: number | undefined; - - /** - * Cache Outcome - * @type {?number} - */ - cacheOutcome?: number; - - /** - * Amount of time spent in the JS queue in milliseconds. - * - * @type {?number} - */ - queuedTimeMs?: number; - - /** - * Sub-measurements for internal use. To be deleted before flushing. - */ - incompleteSubMeasurements?: Map; - - visibilityChangeCount?: number; - incompleteSubsCount?: number; - - /** - * CorrelationId of the in progress iframe request that was awaited - */ - awaitIframeCorrelationId?: string; - /** - * Amount of times queued in the JS event queue. - * - * @type {?number} - */ - queuedCount?: number; - /** - * Amount of manually completed queue events. - * - * @type {?number} - */ - queuedManuallyCompletedCount?: number; - - /** - * Size of the id token - * - * @type {number} - */ - idTokenSize?: number; - - /** - * - * Size of the access token - * - * @type {number} - */ - - accessTokenSize?: number; - - /** - * - * Size of the refresh token - * - * @type {number} - */ - - refreshTokenSize?: number | undefined; - - /** - * Application name as specified by the app. - * - * @type {?string} - */ - appName?: string; - - /** - * Application version as specified by the app. - * - * @type {?string} - */ - appVersion?: string; - - /** - * The following are fields that may be emitted in native broker scenarios - */ - extensionId?: string; - extensionVersion?: string; - matsBrokerVersion?: string; - matsAccountJoinOnStart?: string; - matsAccountJoinOnEnd?: string; - matsDeviceJoin?: string; - matsPromptBehavior?: string; - matsApiErrorCode?: number; - matsUiVisible?: boolean; - matsSilentCode?: number; - matsSilentBiSubCode?: number; - matsSilentMessage?: string; - matsSilentStatus?: number; - matsHttpStatus?: number; - matsHttpEventCount?: number; - - /** - * Http POST metadata - */ - httpVerToken?: string; - httpStatus?: number; - contentTypeHeader?: string; - contentLengthHeader?: string; - - /** - * Native broker fields - */ - allowNativeBroker?: boolean; - extensionInstalled?: boolean; - extensionHandshakeTimeoutMs?: number; - extensionHandshakeTimedOut?: boolean; - - /** - * Nested App Auth Fields - */ - nestedAppAuthRequest?: boolean; - - /** - * Multiple matched access/id/refresh tokens in the cache - */ - multiMatchedAT?: number; - multiMatchedID?: number; - multiMatchedRT?: number; - - errorName?: string; - errorStack?: string[]; - - // Event context as JSON string - context?: string; - - // Number of tokens in the cache to be reported when cache quota is exceeded - cacheRtCount?: number; - cacheIdCount?: number; - cacheAtCount?: number; - - // Scenario id to track custom user prompts - scenarioId?: string; - - accountType?: "AAD" | "MSA" | "B2C"; - - /** - * Server error that triggers a request retry - * - * @type {string} - */ - retryError?: string; - - embeddedClientId?: string; - embeddedRedirectUri?: string; -}; - -export type PerformanceEventContext = { - dur?: number; - err?: string; - subErr?: string; - fail?: number; -}; - -export type PerformanceEventStackedContext = PerformanceEventContext & { - name?: string; - childErr?: string; -}; - -export const IntFields: ReadonlySet = new Set([ - "accessTokenSize", - "durationMs", - "idTokenSize", - "matsSilentStatus", - "matsHttpStatus", - "refreshTokenSize", - "queuedTimeMs", - "startTimeMs", - "status", - "multiMatchedAT", - "multiMatchedID", - "multiMatchedRT", -]); diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/src/telemetry/performance/StubPerformanceClient.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/src/telemetry/performance/StubPerformanceClient.ts deleted file mode 100644 index fa1bd32..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/src/telemetry/performance/StubPerformanceClient.ts +++ /dev/null @@ -1,103 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import { - IPerformanceClient, - InProgressPerformanceEvent, -} from "./IPerformanceClient.js"; -import { IPerformanceMeasurement } from "./IPerformanceMeasurement.js"; -import { - PerformanceEvent, - PerformanceEventStatus, -} from "./PerformanceEvent.js"; - -export class StubPerformanceMeasurement implements IPerformanceMeasurement { - startMeasurement(): void { - return; - } - endMeasurement(): void { - return; - } - flushMeasurement(): number | null { - return null; - } -} - -export class StubPerformanceClient implements IPerformanceClient { - generateId(): string { - return "callback-id"; - } - - startMeasurement( - measureName: string, - correlationId?: string | undefined - ): InProgressPerformanceEvent { - return { - end: () => null, - discard: () => {}, - add: () => {}, - increment: () => {}, - event: { - eventId: this.generateId(), - status: PerformanceEventStatus.InProgress, - authority: "", - libraryName: "", - libraryVersion: "", - clientId: "", - name: measureName, - startTimeMs: Date.now(), - correlationId: correlationId || "", - }, - measurement: new StubPerformanceMeasurement(), - }; - } - - startPerformanceMeasurement(): IPerformanceMeasurement { - return new StubPerformanceMeasurement(); - } - calculateQueuedTime(): number { - return 0; - } - - addQueueMeasurement(): void { - return; - } - - setPreQueueTime(): void { - return; - } - - endMeasurement(): PerformanceEvent | null { - return null; - } - - discardMeasurements(): void { - return; - } - - removePerformanceCallback(): boolean { - return true; - } - - addPerformanceCallback(): string { - return ""; - } - - emitEvents(): void { - return; - } - - addFields(): void { - return; - } - - incrementFields(): void { - return; - } - - cacheEventByCorrelationId(): void { - return; - } -} diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/src/telemetry/server/ServerTelemetryManager.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/src/telemetry/server/ServerTelemetryManager.ts deleted file mode 100644 index 3ac5022..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/src/telemetry/server/ServerTelemetryManager.ts +++ /dev/null @@ -1,382 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import { - SERVER_TELEM_CONSTANTS, - Separators, - CacheOutcome, - Constants, - RegionDiscoverySources, - RegionDiscoveryOutcomes, -} from "../../utils/Constants.js"; -import { CacheManager } from "../../cache/CacheManager.js"; -import { AuthError } from "../../error/AuthError.js"; -import { ServerTelemetryRequest } from "./ServerTelemetryRequest.js"; -import { ServerTelemetryEntity } from "../../cache/entities/ServerTelemetryEntity.js"; -import { RegionDiscoveryMetadata } from "../../authority/RegionDiscoveryMetadata.js"; - -const skuGroupSeparator = ","; -const skuValueSeparator = "|"; - -type SkuParams = { - libraryName?: string; - libraryVersion?: string; - extensionName?: string; - extensionVersion?: string; - skus?: string; -}; - -function makeExtraSkuString(params: SkuParams): string { - const { - skus, - libraryName, - libraryVersion, - extensionName, - extensionVersion, - } = params; - const skuMap: Map = new Map([ - [0, [libraryName, libraryVersion]], - [2, [extensionName, extensionVersion]], - ]); - let skuArr: string[] = []; - - if (skus?.length) { - skuArr = skus.split(skuGroupSeparator); - - // Ignore invalid input sku param - if (skuArr.length < 4) { - return skus; - } - } else { - skuArr = Array.from({ length: 4 }, () => skuValueSeparator); - } - - skuMap.forEach((value, key) => { - if (value.length === 2 && value[0]?.length && value[1]?.length) { - setSku({ - skuArr, - index: key, - skuName: value[0], - skuVersion: value[1], - }); - } - }); - - return skuArr.join(skuGroupSeparator); -} - -function setSku(params: { - skuArr: string[]; - index: number; - skuName: string; - skuVersion: string; -}): void { - const { skuArr, index, skuName, skuVersion } = params; - if (index >= skuArr.length) { - return; - } - skuArr[index] = [skuName, skuVersion].join(skuValueSeparator); -} - -/** @internal */ -export class ServerTelemetryManager { - private cacheManager: CacheManager; - private apiId: number; - private correlationId: string; - private telemetryCacheKey: string; - private wrapperSKU: String; - private wrapperVer: String; - private regionUsed: string | undefined; - private regionSource: RegionDiscoverySources | undefined; - private regionOutcome: RegionDiscoveryOutcomes | undefined; - private cacheOutcome: CacheOutcome = CacheOutcome.NOT_APPLICABLE; - - constructor( - telemetryRequest: ServerTelemetryRequest, - cacheManager: CacheManager - ) { - this.cacheManager = cacheManager; - this.apiId = telemetryRequest.apiId; - this.correlationId = telemetryRequest.correlationId; - this.wrapperSKU = telemetryRequest.wrapperSKU || Constants.EMPTY_STRING; - this.wrapperVer = telemetryRequest.wrapperVer || Constants.EMPTY_STRING; - - this.telemetryCacheKey = - SERVER_TELEM_CONSTANTS.CACHE_KEY + - Separators.CACHE_KEY_SEPARATOR + - telemetryRequest.clientId; - } - - /** - * API to add MSER Telemetry to request - */ - generateCurrentRequestHeaderValue(): string { - const request = `${this.apiId}${SERVER_TELEM_CONSTANTS.VALUE_SEPARATOR}${this.cacheOutcome}`; - const platformFieldsArr = [this.wrapperSKU, this.wrapperVer]; - const nativeBrokerErrorCode = this.getNativeBrokerErrorCode(); - if (nativeBrokerErrorCode?.length) { - platformFieldsArr.push(`broker_error=${nativeBrokerErrorCode}`); - } - const platformFields = platformFieldsArr.join( - SERVER_TELEM_CONSTANTS.VALUE_SEPARATOR - ); - const regionDiscoveryFields = this.getRegionDiscoveryFields(); - const requestWithRegionDiscoveryFields = [ - request, - regionDiscoveryFields, - ].join(SERVER_TELEM_CONSTANTS.VALUE_SEPARATOR); - - return [ - SERVER_TELEM_CONSTANTS.SCHEMA_VERSION, - requestWithRegionDiscoveryFields, - platformFields, - ].join(SERVER_TELEM_CONSTANTS.CATEGORY_SEPARATOR); - } - - /** - * API to add MSER Telemetry for the last failed request - */ - generateLastRequestHeaderValue(): string { - const lastRequests = this.getLastRequests(); - - const maxErrors = ServerTelemetryManager.maxErrorsToSend(lastRequests); - const failedRequests = lastRequests.failedRequests - .slice(0, 2 * maxErrors) - .join(SERVER_TELEM_CONSTANTS.VALUE_SEPARATOR); - const errors = lastRequests.errors - .slice(0, maxErrors) - .join(SERVER_TELEM_CONSTANTS.VALUE_SEPARATOR); - const errorCount = lastRequests.errors.length; - - // Indicate whether this header contains all data or partial data - const overflow = - maxErrors < errorCount - ? SERVER_TELEM_CONSTANTS.OVERFLOW_TRUE - : SERVER_TELEM_CONSTANTS.OVERFLOW_FALSE; - const platformFields = [errorCount, overflow].join( - SERVER_TELEM_CONSTANTS.VALUE_SEPARATOR - ); - - return [ - SERVER_TELEM_CONSTANTS.SCHEMA_VERSION, - lastRequests.cacheHits, - failedRequests, - errors, - platformFields, - ].join(SERVER_TELEM_CONSTANTS.CATEGORY_SEPARATOR); - } - - /** - * API to cache token failures for MSER data capture - * @param error - */ - cacheFailedRequest(error: unknown): void { - const lastRequests = this.getLastRequests(); - if ( - lastRequests.errors.length >= - SERVER_TELEM_CONSTANTS.MAX_CACHED_ERRORS - ) { - // Remove a cached error to make room, first in first out - lastRequests.failedRequests.shift(); // apiId - lastRequests.failedRequests.shift(); // correlationId - lastRequests.errors.shift(); - } - - lastRequests.failedRequests.push(this.apiId, this.correlationId); - - if (error instanceof Error && !!error && error.toString()) { - if (error instanceof AuthError) { - if (error.subError) { - lastRequests.errors.push(error.subError); - } else if (error.errorCode) { - lastRequests.errors.push(error.errorCode); - } else { - lastRequests.errors.push(error.toString()); - } - } else { - lastRequests.errors.push(error.toString()); - } - } else { - lastRequests.errors.push(SERVER_TELEM_CONSTANTS.UNKNOWN_ERROR); - } - - this.cacheManager.setServerTelemetry( - this.telemetryCacheKey, - lastRequests, - this.correlationId - ); - - return; - } - - /** - * Update server telemetry cache entry by incrementing cache hit counter - */ - incrementCacheHits(): number { - const lastRequests = this.getLastRequests(); - lastRequests.cacheHits += 1; - - this.cacheManager.setServerTelemetry( - this.telemetryCacheKey, - lastRequests, - this.correlationId - ); - return lastRequests.cacheHits; - } - - /** - * Get the server telemetry entity from cache or initialize a new one - */ - getLastRequests(): ServerTelemetryEntity { - const initialValue: ServerTelemetryEntity = { - failedRequests: [], - errors: [], - cacheHits: 0, - }; - const lastRequests = this.cacheManager.getServerTelemetry( - this.telemetryCacheKey - ) as ServerTelemetryEntity; - - return lastRequests || initialValue; - } - - /** - * Remove server telemetry cache entry - */ - clearTelemetryCache(): void { - const lastRequests = this.getLastRequests(); - const numErrorsFlushed = - ServerTelemetryManager.maxErrorsToSend(lastRequests); - const errorCount = lastRequests.errors.length; - if (numErrorsFlushed === errorCount) { - // All errors were sent on last request, clear Telemetry cache - this.cacheManager.removeItem( - this.telemetryCacheKey, - this.correlationId - ); - } else { - // Partial data was flushed to server, construct a new telemetry cache item with errors that were not flushed - const serverTelemEntity: ServerTelemetryEntity = { - failedRequests: lastRequests.failedRequests.slice( - numErrorsFlushed * 2 - ), // failedRequests contains 2 items for each error - errors: lastRequests.errors.slice(numErrorsFlushed), - cacheHits: 0, - }; - - this.cacheManager.setServerTelemetry( - this.telemetryCacheKey, - serverTelemEntity, - this.correlationId - ); - } - } - - /** - * Returns the maximum number of errors that can be flushed to the server in the next network request - * @param serverTelemetryEntity - */ - static maxErrorsToSend( - serverTelemetryEntity: ServerTelemetryEntity - ): number { - let i; - let maxErrors = 0; - let dataSize = 0; - const errorCount = serverTelemetryEntity.errors.length; - for (i = 0; i < errorCount; i++) { - // failedRequests parameter contains pairs of apiId and correlationId, multiply index by 2 to preserve pairs - const apiId = - serverTelemetryEntity.failedRequests[2 * i] || - Constants.EMPTY_STRING; - const correlationId = - serverTelemetryEntity.failedRequests[2 * i + 1] || - Constants.EMPTY_STRING; - const errorCode = - serverTelemetryEntity.errors[i] || Constants.EMPTY_STRING; - - // Count number of characters that would be added to header, each character is 1 byte. Add 3 at the end to account for separators - dataSize += - apiId.toString().length + - correlationId.toString().length + - errorCode.length + - 3; - - if (dataSize < SERVER_TELEM_CONSTANTS.MAX_LAST_HEADER_BYTES) { - // Adding this entry to the header would still keep header size below the limit - maxErrors += 1; - } else { - break; - } - } - - return maxErrors; - } - - /** - * Get the region discovery fields - * - * @returns string - */ - getRegionDiscoveryFields(): string { - const regionDiscoveryFields: string[] = []; - - regionDiscoveryFields.push(this.regionUsed || Constants.EMPTY_STRING); - regionDiscoveryFields.push(this.regionSource || Constants.EMPTY_STRING); - regionDiscoveryFields.push( - this.regionOutcome || Constants.EMPTY_STRING - ); - - return regionDiscoveryFields.join(","); - } - - /** - * Update the region discovery metadata - * - * @param regionDiscoveryMetadata - * @returns void - */ - updateRegionDiscoveryMetadata( - regionDiscoveryMetadata: RegionDiscoveryMetadata - ): void { - this.regionUsed = regionDiscoveryMetadata.region_used; - this.regionSource = regionDiscoveryMetadata.region_source; - this.regionOutcome = regionDiscoveryMetadata.region_outcome; - } - - /** - * Set cache outcome - */ - setCacheOutcome(cacheOutcome: CacheOutcome): void { - this.cacheOutcome = cacheOutcome; - } - - setNativeBrokerErrorCode(errorCode: string): void { - const lastRequests = this.getLastRequests(); - lastRequests.nativeBrokerErrorCode = errorCode; - this.cacheManager.setServerTelemetry( - this.telemetryCacheKey, - lastRequests, - this.correlationId - ); - } - - getNativeBrokerErrorCode(): string | undefined { - return this.getLastRequests().nativeBrokerErrorCode; - } - - clearNativeBrokerErrorCode(): void { - const lastRequests = this.getLastRequests(); - delete lastRequests.nativeBrokerErrorCode; - this.cacheManager.setServerTelemetry( - this.telemetryCacheKey, - lastRequests, - this.correlationId - ); - } - - static makeExtraSkuString(params: SkuParams): string { - return makeExtraSkuString(params); - } -} diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/src/telemetry/server/ServerTelemetryRequest.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/src/telemetry/server/ServerTelemetryRequest.ts deleted file mode 100644 index ce6028a..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/src/telemetry/server/ServerTelemetryRequest.ts +++ /dev/null @@ -1,13 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -export type ServerTelemetryRequest = { - clientId: string; - apiId: number; - correlationId: string; - forceRefresh?: boolean; - wrapperSKU?: string; - wrapperVer?: string; -}; diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/src/url/IUri.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/src/url/IUri.ts deleted file mode 100644 index 2a97323..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/src/url/IUri.ts +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -/** - * Interface which describes URI components. - */ -export interface IUri { - Protocol: string; - HostNameAndPort: string; - AbsolutePath: string; - Search: string; - Hash: string; - PathSegments: string[]; - QueryString: string; -} diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/src/url/UrlString.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/src/url/UrlString.ts deleted file mode 100644 index 772e084..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/src/url/UrlString.ts +++ /dev/null @@ -1,226 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import { - createClientConfigurationError, - ClientConfigurationErrorCodes, -} from "../error/ClientConfigurationError.js"; -import { StringUtils } from "../utils/StringUtils.js"; -import { IUri } from "./IUri.js"; -import { AADAuthorityConstants, Constants } from "../utils/Constants.js"; -import * as UrlUtils from "../utils/UrlUtils.js"; - -/** - * Url object class which can perform various transformations on url strings. - */ -export class UrlString { - // internal url string field - private _urlString: string; - public get urlString(): string { - return this._urlString; - } - - constructor(url: string) { - this._urlString = url; - if (!this._urlString) { - // Throws error if url is empty - throw createClientConfigurationError( - ClientConfigurationErrorCodes.urlEmptyError - ); - } - - if (!url.includes("#")) { - this._urlString = UrlString.canonicalizeUri(url); - } - } - - /** - * Ensure urls are lower case and end with a / character. - * @param url - */ - static canonicalizeUri(url: string): string { - if (url) { - let lowerCaseUrl = url.toLowerCase(); - - if (StringUtils.endsWith(lowerCaseUrl, "?")) { - lowerCaseUrl = lowerCaseUrl.slice(0, -1); - } else if (StringUtils.endsWith(lowerCaseUrl, "?/")) { - lowerCaseUrl = lowerCaseUrl.slice(0, -2); - } - - if (!StringUtils.endsWith(lowerCaseUrl, "/")) { - lowerCaseUrl += "/"; - } - - return lowerCaseUrl; - } - - return url; - } - - /** - * Throws if urlString passed is not a valid authority URI string. - */ - validateAsUri(): void { - // Attempts to parse url for uri components - let components; - try { - components = this.getUrlComponents(); - } catch (e) { - throw createClientConfigurationError( - ClientConfigurationErrorCodes.urlParseError - ); - } - - // Throw error if URI or path segments are not parseable. - if (!components.HostNameAndPort || !components.PathSegments) { - throw createClientConfigurationError( - ClientConfigurationErrorCodes.urlParseError - ); - } - - // Throw error if uri is insecure. - if ( - !components.Protocol || - components.Protocol.toLowerCase() !== "https:" - ) { - throw createClientConfigurationError( - ClientConfigurationErrorCodes.authorityUriInsecure - ); - } - } - - /** - * Given a url and a query string return the url with provided query string appended - * @param url - * @param queryString - */ - static appendQueryString(url: string, queryString: string): string { - if (!queryString) { - return url; - } - - return url.indexOf("?") < 0 - ? `${url}?${queryString}` - : `${url}&${queryString}`; - } - - /** - * Returns a url with the hash removed - * @param url - */ - static removeHashFromUrl(url: string): string { - return UrlString.canonicalizeUri(url.split("#")[0]); - } - - /** - * Given a url like https://a:b/common/d?e=f#g, and a tenantId, returns https://a:b/tenantId/d - * @param href The url - * @param tenantId The tenant id to replace - */ - replaceTenantPath(tenantId: string): UrlString { - const urlObject = this.getUrlComponents(); - const pathArray = urlObject.PathSegments; - if ( - tenantId && - pathArray.length !== 0 && - (pathArray[0] === AADAuthorityConstants.COMMON || - pathArray[0] === AADAuthorityConstants.ORGANIZATIONS) - ) { - pathArray[0] = tenantId; - } - return UrlString.constructAuthorityUriFromObject(urlObject); - } - - /** - * Parses out the components from a url string. - * @returns An object with the various components. Please cache this value insted of calling this multiple times on the same url. - */ - getUrlComponents(): IUri { - // https://gist.github.com/curtisz/11139b2cfcaef4a261e0 - const regEx = RegExp( - "^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?" - ); - - // If url string does not match regEx, we throw an error - const match = this.urlString.match(regEx); - if (!match) { - throw createClientConfigurationError( - ClientConfigurationErrorCodes.urlParseError - ); - } - - // Url component object - const urlComponents = { - Protocol: match[1], - HostNameAndPort: match[4], - AbsolutePath: match[5], - QueryString: match[7], - } as IUri; - - let pathSegments = urlComponents.AbsolutePath.split("/"); - pathSegments = pathSegments.filter((val) => val && val.length > 0); // remove empty elements - urlComponents.PathSegments = pathSegments; - - if ( - urlComponents.QueryString && - urlComponents.QueryString.endsWith("/") - ) { - urlComponents.QueryString = urlComponents.QueryString.substring( - 0, - urlComponents.QueryString.length - 1 - ); - } - return urlComponents; - } - - static getDomainFromUrl(url: string): string { - const regEx = RegExp("^([^:/?#]+://)?([^/?#]*)"); - - const match = url.match(regEx); - - if (!match) { - throw createClientConfigurationError( - ClientConfigurationErrorCodes.urlParseError - ); - } - - return match[2]; - } - - static getAbsoluteUrl(relativeUrl: string, baseUrl: string): string { - if (relativeUrl[0] === Constants.FORWARD_SLASH) { - const url = new UrlString(baseUrl); - const baseComponents = url.getUrlComponents(); - - return ( - baseComponents.Protocol + - "//" + - baseComponents.HostNameAndPort + - relativeUrl - ); - } - - return relativeUrl; - } - - static constructAuthorityUriFromObject(urlObject: IUri): UrlString { - return new UrlString( - urlObject.Protocol + - "//" + - urlObject.HostNameAndPort + - "/" + - urlObject.PathSegments.join("/") - ); - } - - /** - * Check if the hash of the URL string contains known properties - * @deprecated This API will be removed in a future version - */ - static hashContainsKnownProperties(response: string): boolean { - return !!UrlUtils.getDeserializedResponse(response); - } -} diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/src/utils/ClientAssertionUtils.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/src/utils/ClientAssertionUtils.ts deleted file mode 100644 index 7dc5ac9..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/src/utils/ClientAssertionUtils.ts +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import { - ClientAssertionCallback, - ClientAssertionConfig, -} from "../account/ClientCredentials.js"; - -export async function getClientAssertion( - clientAssertion: string | ClientAssertionCallback, - clientId: string, - tokenEndpoint?: string -): Promise { - if (typeof clientAssertion === "string") { - return clientAssertion; - } else { - const config: ClientAssertionConfig = { - clientId: clientId, - tokenEndpoint: tokenEndpoint, - }; - return clientAssertion(config); - } -} diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/src/utils/Constants.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/src/utils/Constants.ts deleted file mode 100644 index 8242dd7..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/src/utils/Constants.ts +++ /dev/null @@ -1,388 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -export const Constants = { - LIBRARY_NAME: "MSAL.JS", - SKU: "msal.js.common", - // Prefix for all library cache entries - CACHE_PREFIX: "msal", - // default authority - DEFAULT_AUTHORITY: "https://login.microsoftonline.com/common/", - DEFAULT_AUTHORITY_HOST: "login.microsoftonline.com", - DEFAULT_COMMON_TENANT: "common", - // ADFS String - ADFS: "adfs", - DSTS: "dstsv2", - // Default AAD Instance Discovery Endpoint - AAD_INSTANCE_DISCOVERY_ENDPT: - "https://login.microsoftonline.com/common/discovery/instance?api-version=1.1&authorization_endpoint=", - // CIAM URL - CIAM_AUTH_URL: ".ciamlogin.com", - AAD_TENANT_DOMAIN_SUFFIX: ".onmicrosoft.com", - // Resource delimiter - used for certain cache entries - RESOURCE_DELIM: "|", - // Placeholder for non-existent account ids/objects - NO_ACCOUNT: "NO_ACCOUNT", - // Claims - CLAIMS: "claims", - // Consumer UTID - CONSUMER_UTID: "9188040d-6c67-4c5b-b112-36a304b66dad", - // Default scopes - OPENID_SCOPE: "openid", - PROFILE_SCOPE: "profile", - OFFLINE_ACCESS_SCOPE: "offline_access", - EMAIL_SCOPE: "email", - // Default response type for authorization code flow - CODE_RESPONSE_TYPE: "code", - CODE_GRANT_TYPE: "authorization_code", - RT_GRANT_TYPE: "refresh_token", - FRAGMENT_RESPONSE_MODE: "fragment", - S256_CODE_CHALLENGE_METHOD: "S256", - URL_FORM_CONTENT_TYPE: "application/x-www-form-urlencoded;charset=utf-8", - AUTHORIZATION_PENDING: "authorization_pending", - NOT_DEFINED: "not_defined", - EMPTY_STRING: "", - NOT_APPLICABLE: "N/A", - NOT_AVAILABLE: "Not Available", - FORWARD_SLASH: "/", - IMDS_ENDPOINT: "http://169.254.169.254/metadata/instance/compute/location", - IMDS_VERSION: "2020-06-01", - IMDS_TIMEOUT: 2000, - AZURE_REGION_AUTO_DISCOVER_FLAG: "TryAutoDetect", - REGIONAL_AUTH_PUBLIC_CLOUD_SUFFIX: "login.microsoft.com", - KNOWN_PUBLIC_CLOUDS: [ - "login.microsoftonline.com", - "login.windows.net", - "login.microsoft.com", - "sts.windows.net", - ], - TOKEN_RESPONSE_TYPE: "token", - ID_TOKEN_RESPONSE_TYPE: "id_token", - SHR_NONCE_VALIDITY: 240, - INVALID_INSTANCE: "invalid_instance", -}; - -export const HttpStatus = { - SUCCESS: 200, - SUCCESS_RANGE_START: 200, - SUCCESS_RANGE_END: 299, - REDIRECT: 302, - CLIENT_ERROR: 400, - CLIENT_ERROR_RANGE_START: 400, - BAD_REQUEST: 400, - UNAUTHORIZED: 401, - NOT_FOUND: 404, - REQUEST_TIMEOUT: 408, - TOO_MANY_REQUESTS: 429, - CLIENT_ERROR_RANGE_END: 499, - SERVER_ERROR: 500, - SERVER_ERROR_RANGE_START: 500, - SERVICE_UNAVAILABLE: 503, - GATEWAY_TIMEOUT: 504, - SERVER_ERROR_RANGE_END: 599, - MULTI_SIDED_ERROR: 600, -} as const; -export type HttpStatus = (typeof HttpStatus)[keyof typeof HttpStatus]; - -export const OIDC_DEFAULT_SCOPES = [ - Constants.OPENID_SCOPE, - Constants.PROFILE_SCOPE, - Constants.OFFLINE_ACCESS_SCOPE, -]; - -export const OIDC_SCOPES = [...OIDC_DEFAULT_SCOPES, Constants.EMAIL_SCOPE]; - -/** - * Request header names - */ -export const HeaderNames = { - CONTENT_TYPE: "Content-Type", - CONTENT_LENGTH: "Content-Length", - RETRY_AFTER: "Retry-After", - CCS_HEADER: "X-AnchorMailbox", - WWWAuthenticate: "WWW-Authenticate", - AuthenticationInfo: "Authentication-Info", - X_MS_REQUEST_ID: "x-ms-request-id", - X_MS_HTTP_VERSION: "x-ms-httpver", -} as const; -export type HeaderNames = (typeof HeaderNames)[keyof typeof HeaderNames]; - -/** - * Persistent cache keys MSAL which stay while user is logged in. - */ -export const PersistentCacheKeys = { - ID_TOKEN: "idtoken", - CLIENT_INFO: "client.info", - ADAL_ID_TOKEN: "adal.idtoken", - ERROR: "error", - ERROR_DESC: "error.description", - ACTIVE_ACCOUNT: "active-account", // Legacy active-account cache key, use new key instead - ACTIVE_ACCOUNT_FILTERS: "active-account-filters", // new cache entry for active_account for a more robust version for browser -} as const; -export type PersistentCacheKeys = - (typeof PersistentCacheKeys)[keyof typeof PersistentCacheKeys]; - -/** - * String constants related to AAD Authority - */ -export const AADAuthorityConstants = { - COMMON: "common", - ORGANIZATIONS: "organizations", - CONSUMERS: "consumers", -} as const; -export type AADAuthorityConstants = - (typeof AADAuthorityConstants)[keyof typeof AADAuthorityConstants]; - -/** - * Claims request keys - */ -export const ClaimsRequestKeys = { - ACCESS_TOKEN: "access_token", - XMS_CC: "xms_cc", -} as const; -export type ClaimsRequestKeys = - (typeof ClaimsRequestKeys)[keyof typeof ClaimsRequestKeys]; - -/** - * we considered making this "enum" in the request instead of string, however it looks like the allowed list of - * prompt values kept changing over past couple of years. There are some undocumented prompt values for some - * internal partners too, hence the choice of generic "string" type instead of the "enum" - */ -export const PromptValue = { - LOGIN: "login", - SELECT_ACCOUNT: "select_account", - CONSENT: "consent", - NONE: "none", - CREATE: "create", - NO_SESSION: "no_session", -}; - -/** - * allowed values for codeVerifier - */ -export const CodeChallengeMethodValues = { - PLAIN: "plain", - S256: "S256", -}; - -/** - * allowed values for server response type - */ -export const ServerResponseType = { - QUERY: "query", - FRAGMENT: "fragment", -} as const; -export type ServerResponseType = - (typeof ServerResponseType)[keyof typeof ServerResponseType]; - -/** - * allowed values for response_mode - */ -export const ResponseMode = { - ...ServerResponseType, - FORM_POST: "form_post", -} as const; -export type ResponseMode = (typeof ResponseMode)[keyof typeof ResponseMode]; - -/** - * allowed grant_type - */ -export const GrantType = { - IMPLICIT_GRANT: "implicit", - AUTHORIZATION_CODE_GRANT: "authorization_code", - CLIENT_CREDENTIALS_GRANT: "client_credentials", - RESOURCE_OWNER_PASSWORD_GRANT: "password", - REFRESH_TOKEN_GRANT: "refresh_token", - DEVICE_CODE_GRANT: "device_code", - JWT_BEARER: "urn:ietf:params:oauth:grant-type:jwt-bearer", -} as const; -export type GrantType = (typeof GrantType)[keyof typeof GrantType]; - -/** - * Account types in Cache - */ -export const CacheAccountType = { - MSSTS_ACCOUNT_TYPE: "MSSTS", - ADFS_ACCOUNT_TYPE: "ADFS", - MSAV1_ACCOUNT_TYPE: "MSA", - GENERIC_ACCOUNT_TYPE: "Generic", // NTLM, Kerberos, FBA, Basic etc -} as const; -export type CacheAccountType = - (typeof CacheAccountType)[keyof typeof CacheAccountType]; - -/** - * Separators used in cache - */ -export const Separators = { - CACHE_KEY_SEPARATOR: "-", - CLIENT_INFO_SEPARATOR: ".", -} as const; -export type Separators = (typeof Separators)[keyof typeof Separators]; - -/** - * Credential Type stored in the cache - */ -export const CredentialType = { - ID_TOKEN: "IdToken", - ACCESS_TOKEN: "AccessToken", - ACCESS_TOKEN_WITH_AUTH_SCHEME: "AccessToken_With_AuthScheme", - REFRESH_TOKEN: "RefreshToken", -} as const; -export type CredentialType = - (typeof CredentialType)[keyof typeof CredentialType]; - -/** - * Combine all cache types - */ -export const CacheType = { - ADFS: 1001, - MSA: 1002, - MSSTS: 1003, - GENERIC: 1004, - ACCESS_TOKEN: 2001, - REFRESH_TOKEN: 2002, - ID_TOKEN: 2003, - APP_METADATA: 3001, - UNDEFINED: 9999, -} as const; -export type CacheType = (typeof CacheType)[keyof typeof CacheType]; - -/** - * More Cache related constants - */ -export const APP_METADATA = "appmetadata"; -export const CLIENT_INFO = "client_info"; -export const THE_FAMILY_ID = "1"; - -export const AUTHORITY_METADATA_CONSTANTS = { - CACHE_KEY: "authority-metadata", - REFRESH_TIME_SECONDS: 3600 * 24, // 24 Hours -}; - -export const AuthorityMetadataSource = { - CONFIG: "config", - CACHE: "cache", - NETWORK: "network", - HARDCODED_VALUES: "hardcoded_values", -} as const; -export type AuthorityMetadataSource = - (typeof AuthorityMetadataSource)[keyof typeof AuthorityMetadataSource]; - -export const SERVER_TELEM_CONSTANTS = { - SCHEMA_VERSION: 5, - MAX_CUR_HEADER_BYTES: 80, // ESTS limit is 100B, set to 80 to provide a 20B buffer - MAX_LAST_HEADER_BYTES: 330, // ESTS limit is 350B, set to 330 to provide a 20B buffer, - MAX_CACHED_ERRORS: 50, // Limit the number of errors that can be stored to prevent uncontrolled size gains - CACHE_KEY: "server-telemetry", - CATEGORY_SEPARATOR: "|", - VALUE_SEPARATOR: ",", - OVERFLOW_TRUE: "1", - OVERFLOW_FALSE: "0", - UNKNOWN_ERROR: "unknown_error", -}; - -/** - * Type of the authentication request - */ -export const AuthenticationScheme = { - BEARER: "Bearer", - POP: "pop", - SSH: "ssh-cert", -} as const; -export type AuthenticationScheme = - (typeof AuthenticationScheme)[keyof typeof AuthenticationScheme]; - -/** - * Constants related to throttling - */ -export const ThrottlingConstants = { - // Default time to throttle RequestThumbprint in seconds - DEFAULT_THROTTLE_TIME_SECONDS: 60, - // Default maximum time to throttle in seconds, overrides what the server sends back - DEFAULT_MAX_THROTTLE_TIME_SECONDS: 3600, - // Prefix for storing throttling entries - THROTTLING_PREFIX: "throttling", - // Value assigned to the x-ms-lib-capability header to indicate to the server the library supports throttling - X_MS_LIB_CAPABILITY_VALUE: "retry-after, h429", -}; - -export const Errors = { - INVALID_GRANT_ERROR: "invalid_grant", - CLIENT_MISMATCH_ERROR: "client_mismatch", -}; - -/** - * Password grant parameters - */ -export const PasswordGrantConstants = { - username: "username", - password: "password", -} as const; -export type PasswordGrantConstants = - (typeof PasswordGrantConstants)[keyof typeof PasswordGrantConstants]; - -/** - * Response codes - */ -export const ResponseCodes = { - httpSuccess: 200, - httpBadRequest: 400, -} as const; -export type ResponseCodes = (typeof ResponseCodes)[keyof typeof ResponseCodes]; - -/** - * Region Discovery Sources - */ -export const RegionDiscoverySources = { - FAILED_AUTO_DETECTION: "1", - INTERNAL_CACHE: "2", - ENVIRONMENT_VARIABLE: "3", - IMDS: "4", -} as const; -export type RegionDiscoverySources = - (typeof RegionDiscoverySources)[keyof typeof RegionDiscoverySources]; - -/** - * Region Discovery Outcomes - */ -export const RegionDiscoveryOutcomes = { - CONFIGURED_MATCHES_DETECTED: "1", - CONFIGURED_NO_AUTO_DETECTION: "2", - CONFIGURED_NOT_DETECTED: "3", - AUTO_DETECTION_REQUESTED_SUCCESSFUL: "4", - AUTO_DETECTION_REQUESTED_FAILED: "5", -} as const; -export type RegionDiscoveryOutcomes = - (typeof RegionDiscoveryOutcomes)[keyof typeof RegionDiscoveryOutcomes]; - -/** - * Specifies the reason for fetching the access token from the identity provider - */ -export const CacheOutcome = { - // When a token is found in the cache or the cache is not supposed to be hit when making the request - NOT_APPLICABLE: "0", - // When the token request goes to the identity provider because force_refresh was set to true. Also occurs if claims were requested - FORCE_REFRESH_OR_CLAIMS: "1", - // When the token request goes to the identity provider because no cached access token exists - NO_CACHED_ACCESS_TOKEN: "2", - // When the token request goes to the identity provider because cached access token expired - CACHED_ACCESS_TOKEN_EXPIRED: "3", - // When the token request goes to the identity provider because refresh_in was used and the existing token needs to be refreshed - PROACTIVELY_REFRESHED: "4", -} as const; -export type CacheOutcome = (typeof CacheOutcome)[keyof typeof CacheOutcome]; - -export const JsonWebTokenTypes = { - Jwt: "JWT", - Jwk: "JWK", - Pop: "pop", -} as const; -export type JsonWebTokenTypes = - (typeof JsonWebTokenTypes)[keyof typeof JsonWebTokenTypes]; - -export const ONE_DAY_IN_MS = 86400000; - -// Token renewal offset default in seconds -export const DEFAULT_TOKEN_RENEWAL_OFFSET_SEC = 300; diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/src/utils/FunctionWrappers.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/src/utils/FunctionWrappers.ts deleted file mode 100644 index b962953..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/src/utils/FunctionWrappers.ts +++ /dev/null @@ -1,126 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import { Logger } from "../logger/Logger.js"; -import { IPerformanceClient } from "../telemetry/performance/IPerformanceClient.js"; - -/** - * Wraps a function with a performance measurement. - * Usage: invoke(functionToCall, performanceClient, "EventName", "correlationId")(...argsToPassToFunction) - * @param callback - * @param eventName - * @param logger - * @param telemetryClient - * @param correlationId - * @returns - * @internal - */ -// eslint-disable-next-line @typescript-eslint/no-explicit-any -export const invoke = , U>( - callback: (...args: T) => U, - eventName: string, - logger: Logger, - telemetryClient?: IPerformanceClient, - correlationId?: string -) => { - return (...args: T): U => { - logger.trace(`Executing function ${eventName}`); - const inProgressEvent = telemetryClient?.startMeasurement( - eventName, - correlationId - ); - if (correlationId) { - // Track number of times this API is called in a single request - const eventCount = eventName + "CallCount"; - telemetryClient?.incrementFields( - { [eventCount]: 1 }, - correlationId - ); - } - try { - const result = callback(...args); - inProgressEvent?.end({ - success: true, - }); - logger.trace(`Returning result from ${eventName}`); - return result; - } catch (e) { - logger.trace(`Error occurred in ${eventName}`); - try { - logger.trace(JSON.stringify(e)); - } catch (e) { - logger.trace("Unable to print error message."); - } - inProgressEvent?.end( - { - success: false, - }, - e - ); - throw e; - } - }; -}; - -/** - * Wraps an async function with a performance measurement. - * Usage: invokeAsync(functionToCall, performanceClient, "EventName", "correlationId")(...argsToPassToFunction) - * @param callback - * @param eventName - * @param logger - * @param telemetryClient - * @param correlationId - * @returns - * @internal - * - */ -// eslint-disable-next-line @typescript-eslint/no-explicit-any -export const invokeAsync = , U>( - callback: (...args: T) => Promise, - eventName: string, - logger: Logger, - telemetryClient?: IPerformanceClient, - correlationId?: string -) => { - return (...args: T): Promise => { - logger.trace(`Executing function ${eventName}`); - const inProgressEvent = telemetryClient?.startMeasurement( - eventName, - correlationId - ); - if (correlationId) { - // Track number of times this API is called in a single request - const eventCount = eventName + "CallCount"; - telemetryClient?.incrementFields( - { [eventCount]: 1 }, - correlationId - ); - } - telemetryClient?.setPreQueueTime(eventName, correlationId); - return callback(...args) - .then((response) => { - logger.trace(`Returning result from ${eventName}`); - inProgressEvent?.end({ - success: true, - }); - return response; - }) - .catch((e) => { - logger.trace(`Error occurred in ${eventName}`); - try { - logger.trace(JSON.stringify(e)); - } catch (e) { - logger.trace("Unable to print error message."); - } - inProgressEvent?.end( - { - success: false, - }, - e - ); - throw e; - }); - }; -}; diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/src/utils/MsalTypes.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/src/utils/MsalTypes.ts deleted file mode 100644 index a918763..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/src/utils/MsalTypes.ts +++ /dev/null @@ -1,9 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -/** - * Key-Value type to support queryParams, extraQueryParams and claims - */ -export type StringDict = { [key: string]: string }; diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/src/utils/ProtocolUtils.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/src/utils/ProtocolUtils.ts deleted file mode 100644 index e0c54a7..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/src/utils/ProtocolUtils.ts +++ /dev/null @@ -1,120 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import { Constants } from "./Constants.js"; -import { ICrypto } from "../crypto/ICrypto.js"; -import { - ClientAuthErrorCodes, - createClientAuthError, -} from "../error/ClientAuthError.js"; - -/** - * Type which defines the object that is stringified, encoded and sent in the state value. - * Contains the following: - * - id - unique identifier for this request - * - ts - timestamp for the time the request was made. Used to ensure that token expiration is not calculated incorrectly. - * - platformState - string value sent from the platform. - */ -export type LibraryStateObject = { - id: string; - meta?: Record; -}; - -/** - * Type which defines the stringified and encoded object sent to the service in the authorize request. - */ -export type RequestStateObject = { - userRequestState: string; - libraryState: LibraryStateObject; -}; - -/** - * Class which provides helpers for OAuth 2.0 protocol specific values - */ -export class ProtocolUtils { - /** - * Appends user state with random guid, or returns random guid. - * @param userState - * @param randomGuid - */ - static setRequestState( - cryptoObj: ICrypto, - userState?: string, - meta?: Record - ): string { - const libraryState = ProtocolUtils.generateLibraryState( - cryptoObj, - meta - ); - return userState - ? `${libraryState}${Constants.RESOURCE_DELIM}${userState}` - : libraryState; - } - - /** - * Generates the state value used by the common library. - * @param randomGuid - * @param cryptoObj - */ - static generateLibraryState( - cryptoObj: ICrypto, - meta?: Record - ): string { - if (!cryptoObj) { - throw createClientAuthError(ClientAuthErrorCodes.noCryptoObject); - } - - // Create a state object containing a unique id and the timestamp of the request creation - const stateObj: LibraryStateObject = { - id: cryptoObj.createNewGuid(), - }; - - if (meta) { - stateObj.meta = meta; - } - - const stateString = JSON.stringify(stateObj); - - return cryptoObj.base64Encode(stateString); - } - - /** - * Parses the state into the RequestStateObject, which contains the LibraryState info and the state passed by the user. - * @param state - * @param cryptoObj - */ - static parseRequestState( - cryptoObj: ICrypto, - state: string - ): RequestStateObject { - if (!cryptoObj) { - throw createClientAuthError(ClientAuthErrorCodes.noCryptoObject); - } - - if (!state) { - throw createClientAuthError(ClientAuthErrorCodes.invalidState); - } - - try { - // Split the state between library state and user passed state and decode them separately - const splitState = state.split(Constants.RESOURCE_DELIM); - const libraryState = splitState[0]; - const userState = - splitState.length > 1 - ? splitState.slice(1).join(Constants.RESOURCE_DELIM) - : Constants.EMPTY_STRING; - const libraryStateString = cryptoObj.base64Decode(libraryState); - const libraryStateObj = JSON.parse( - libraryStateString - ) as LibraryStateObject; - return { - userRequestState: userState || Constants.EMPTY_STRING, - libraryState: libraryStateObj, - }; - } catch (e) { - throw createClientAuthError(ClientAuthErrorCodes.invalidState); - } - } -} diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/src/utils/StringUtils.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/src/utils/StringUtils.ts deleted file mode 100644 index 150e667..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/src/utils/StringUtils.ts +++ /dev/null @@ -1,106 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -/** - * @hidden - */ -export class StringUtils { - /** - * Check if stringified object is empty - * @param strObj - */ - static isEmptyObj(strObj?: string): boolean { - if (strObj) { - try { - const obj = JSON.parse(strObj); - return Object.keys(obj).length === 0; - } catch (e) {} - } - return true; - } - - static startsWith(str: string, search: string): boolean { - return str.indexOf(search) === 0; - } - - static endsWith(str: string, search: string): boolean { - return ( - str.length >= search.length && - str.lastIndexOf(search) === str.length - search.length - ); - } - - /** - * Parses string into an object. - * - * @param query - */ - static queryStringToObject(query: string): T { - const obj: {} = {}; - const params = query.split("&"); - const decode = (s: string) => decodeURIComponent(s.replace(/\+/g, " ")); - params.forEach((pair) => { - if (pair.trim()) { - const [key, value] = pair.split(/=(.+)/g, 2); // Split on the first occurence of the '=' character - if (key && value) { - obj[decode(key)] = decode(value); - } - } - }); - return obj as T; - } - - /** - * Trims entries in an array. - * - * @param arr - */ - static trimArrayEntries(arr: Array): Array { - return arr.map((entry) => entry.trim()); - } - - /** - * Removes empty strings from array - * @param arr - */ - static removeEmptyStringsFromArray(arr: Array): Array { - return arr.filter((entry) => { - return !!entry; - }); - } - - /** - * Attempts to parse a string into JSON - * @param str - */ - static jsonParseHelper(str: string): T | null { - try { - return JSON.parse(str) as T; - } catch (e) { - return null; - } - } - - /** - * Tests if a given string matches a given pattern, with support for wildcards and queries. - * @param pattern Wildcard pattern to string match. Supports "*" for wildcards and "?" for queries - * @param input String to match against - */ - static matchPattern(pattern: string, input: string): boolean { - /** - * Wildcard support: https://stackoverflow.com/a/3117248/4888559 - * Queries: replaces "?" in string with escaped "\?" for regex test - */ - // eslint-disable-next-line security/detect-non-literal-regexp - const regex: RegExp = new RegExp( - pattern - .replace(/\\/g, "\\\\") - .replace(/\*/g, "[^ ]*") - .replace(/\?/g, "\\?") - ); - - return regex.test(input); - } -} diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/src/utils/TimeUtils.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/src/utils/TimeUtils.ts deleted file mode 100644 index 07d7310..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/src/utils/TimeUtils.ts +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -/** - * Utility functions for managing date and time operations. - */ - -/** - * return the current time in Unix time (seconds). - */ -export function nowSeconds(): number { - // Date.getTime() returns in milliseconds. - return Math.round(new Date().getTime() / 1000.0); -} - -/** - * check if a token is expired based on given UTC time in seconds. - * @param expiresOn - */ -export function isTokenExpired(expiresOn: string, offset: number): boolean { - // check for access token expiry - const expirationSec = Number(expiresOn) || 0; - const offsetCurrentTimeSec = nowSeconds() + offset; - - // If current time + offset is greater than token expiration time, then token is expired. - return offsetCurrentTimeSec > expirationSec; -} - -/** - * If the current time is earlier than the time that a token was cached at, we must discard the token - * i.e. The system clock was turned back after acquiring the cached token - * @param cachedAt - * @param offset - */ -export function wasClockTurnedBack(cachedAt: string): boolean { - const cachedAtSec = Number(cachedAt); - - return cachedAtSec > nowSeconds(); -} - -/** - * Waits for t number of milliseconds - * @param t number - * @param value T - */ -export function delay(t: number, value?: T): Promise { - return new Promise((resolve) => setTimeout(() => resolve(value), t)); -} diff --git a/PBandGraphScaffold/node_modules/@azure/msal-common/src/utils/UrlUtils.ts b/PBandGraphScaffold/node_modules/@azure/msal-common/src/utils/UrlUtils.ts deleted file mode 100644 index 4a193bb..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-common/src/utils/UrlUtils.ts +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import { ServerAuthorizationCodeResponse } from "../response/ServerAuthorizationCodeResponse.js"; -import { - ClientAuthErrorCodes, - createClientAuthError, -} from "../error/ClientAuthError.js"; - -/** - * Parses hash string from given string. Returns empty string if no hash symbol is found. - * @param hashString - */ -export function stripLeadingHashOrQuery(responseString: string): string { - if (responseString.startsWith("#/")) { - return responseString.substring(2); - } else if ( - responseString.startsWith("#") || - responseString.startsWith("?") - ) { - return responseString.substring(1); - } - - return responseString; -} - -/** - * Returns URL hash as server auth code response object. - */ -export function getDeserializedResponse( - responseString: string -): ServerAuthorizationCodeResponse | null { - // Check if given hash is empty - if (!responseString || responseString.indexOf("=") < 0) { - return null; - } - try { - // Strip the # or ? symbol if present - const normalizedResponse = stripLeadingHashOrQuery(responseString); - // If # symbol was not present, above will return empty string, so give original hash value - const deserializedHash: ServerAuthorizationCodeResponse = - Object.fromEntries(new URLSearchParams(normalizedResponse)); - - // Check for known response properties - if ( - deserializedHash.code || - deserializedHash.error || - deserializedHash.error_description || - deserializedHash.state - ) { - return deserializedHash; - } - } catch (e) { - throw createClientAuthError(ClientAuthErrorCodes.hashNotDeserialized); - } - - return null; -} diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/LICENSE b/PBandGraphScaffold/node_modules/@azure/msal-node/LICENSE deleted file mode 100644 index 9bcfb3e..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2020 Microsoft - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/README.md b/PBandGraphScaffold/node_modules/@azure/msal-node/README.md deleted file mode 100644 index ddf83c7..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/README.md +++ /dev/null @@ -1,188 +0,0 @@ -# Microsoft Authentication Library for Node (msal-node) - -[![npm version](https://img.shields.io/npm/v/@azure/msal-node.svg?style=flat)](https://www.npmjs.com/package/@azure/msal-node/) -[![npm version](https://img.shields.io/npm/dm/@azure/msal-node.svg)](https://nodei.co/npm/@azure/msal-node/) -[![codecov](https://codecov.io/gh/AzureAD/microsoft-authentication-library-for-js/branch/dev/graph/badge.svg?flag=msal-node)](https://codecov.io/gh/AzureAD/microsoft-authentication-library-for-js) - -| Getting Started | AAD Docs | Library Reference | -| --------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | - -1. [About](#about) -1. [FAQ](#faq) -1. [Changelog](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/lib/msal-node/CHANGELOG.md) -1. [Prerequisites](#prerequisites) -1. [Installation](#installation) -1. [Node Version Support](#node-version-support) -1. [Usage](#usage) -1. [Samples](#samples) -1. [Build Library](#build-and-test) -1. [Security Reporting](#security-reporting) -1. [License](#license) -1. [Code of Conduct](#we-value-and-adhere-to-the-microsoft-open-source-code-of-conduct) - -## About - -MSAL Node enables applications to authenticate users using [Azure AD](https://docs.microsoft.com/azure/active-directory/develop/v2-overview) work and school accounts (AAD), Microsoft personal accounts (MSA) and social identity providers like Facebook, Google, LinkedIn, Microsoft accounts, etc. through [Azure AD B2C](https://docs.microsoft.com/azure/active-directory-b2c/active-directory-b2c-overview#identity-providers) service. It also enables your app to get tokens to access [Microsoft Cloud](https://www.microsoft.com/enterprise) services such as [Microsoft Graph](https://graph.microsoft.io). - -### OAuth2.0 grant types supported: - -The current version supports the following ways of acquiring tokens: - -#### Public Client: - -- [Authorization Code Grant](https://oauth.net/2/grant-types/authorization-code/) with [PKCE](https://oauth.net/2/pkce/) -- [Device Code Grant](https://oauth.net/2/grant-types/device-code/) -- [Refresh Token Grant](https://oauth.net/2/grant-types/refresh-token/) -- [Silent Flow](https://docs.microsoft.com/azure/active-directory/develop/msal-acquire-cache-tokens#acquiring-tokens-silently-from-the-cache) -- [Username and Password flow](https://docs.microsoft.com/azure/active-directory/develop/msal-authentication-flows#usernamepassword) - -#### Confidential Client: - -- [Authorization Code Grant](https://oauth.net/2/grant-types/authorization-code/) with a client credential -- [Refresh Token Grant](https://oauth.net/2/grant-types/refresh-token/) -- [Silent Flow](https://docs.microsoft.com/azure/active-directory/develop/msal-acquire-cache-tokens#acquiring-tokens-silently-from-the-cache) -- [Client Credential Grant](https://oauth.net/2/grant-types/client-credentials/) -- [On-behalf-of flow](https://docs.microsoft.com/azure/active-directory/develop/v2-oauth2-on-behalf-of-flow) -- [Username and Password flow](https://docs.microsoft.com/azure/active-directory/develop/msal-authentication-flows#usernamepassword) - -More details on different grant types supported by Microsoft authentication libraries in general can be found [here](https://docs.microsoft.com/azure/active-directory/develop/msal-authentication-flows). - -### Scenarios supported: - -The scenarios supported with this library are: - -- Desktop app that calls web APIs -- Web app that calls web APIs -- Web APIs that call web APIs -- Daemon apps - -More details on scenarios and the authentication flows that map to each of them can be found [here](https://docs.microsoft.com/azure/active-directory/develop/authentication-flows-app-scenarios). - -## FAQ - -See [here](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/lib/msal-node/docs/faq.md). - -## Prerequisites - -Before using `@azure/msal-node` you will need to register your app in the azure portal: - -- [App registration](https://docs.microsoft.com/graph/auth-register-app-v2) - -## Installation - -### Via NPM: - -```javascript -npm install @azure/msal-node -``` - -## Node Version Support - -MSAL Node will follow the [Long Term Support (LTS) schedule of the Node.js project](https://nodejs.org/about/releases/). Our support plan is as follows. - -Any major MSAL Node release: - -- Will support stable (even-numbered) Maintenance LTS, Active LTS, and Current versions of Node -- Will drop support for any previously supported Node versions that have reached end of life -- Will not support prerelease/preview/pending versions until they are stable - -| MSAL Node version | MSAL support status | Supported Node versions | -| ----------------- | ------------------- | ----------------------- | -| 2.x.x | Active development | 16, 18, 20, 22 | -| 1.x.x | In maintenance | 10, 12, 14, 16, 18 | - -**Note:** There have been no functional changes in the MSAL Node v2 release. - -## Usage - -### MSAL basics - -- [Understand difference in between Public Client and Confidential Clients](https://docs.microsoft.com/azure/active-directory/develop/msal-client-applications) -- [Initialize a Public Client Application](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/lib/msal-node/docs/initialize-public-client-application.md) -- [Initialize a Confidential Client Application](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/lib/msal-node/docs/initialize-confidential-client-application.md) -- [Configuration](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/lib/msal-node/docs/configuration.md) -- [Request](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/lib/msal-common/docs/request.md) -- [Response](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/lib/msal-common/docs/Response.md) - -## Samples - -There are multiple [samples](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/samples/msal-node-samples) included in the repository that use MSAL Node to acquire tokens. These samples are currently used for manual testing, and are not meant to be a reference of best practices, therefore use judgement and do not blindly copy this code to any production applications. - -AAD samples: - -- [auth-code](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/samples/msal-node-samples/auth-code): Express app using OAuth2.0 authorization code flow. -- [auth-code-pkce](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/samples/msal-node-samples/auth-code-pkce): Express app using OAuth2.0 authorization code flow with PKCE. -- [device-code](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/samples/msal-node-samples/device-code): Command line app using OAuth 2.0 device code flow. -- [refresh-token](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/samples/msal-node-samples/refresh-token): Command line app using OAuth 2.0 refresh flow. -- [silent-flow](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/samples/msal-node-samples/silent-flow): Express app using OAuth2.0 authorization code flow to acquire a token and store in the token cache, and silent flow to use tokens in the token cache. -- [client-credentials](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/samples/msal-node-samples/client-credentials): Daemon app using OAuth 2.0 client credential grant to acquire a token. -- [on-behalf-of](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/samples/msal-node-samples/on-behalf-of): Web application using OAuth 2.0 auth code flow to acquire a token for a web API. The web API validates the token, and calls Microsoft Graph on behalf of the user who authenticated in the web application. -- [username-password](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/samples/msal-node-samples/username-password): Web application using OAuth 2.0 resource owner password credentials (ROPC) flow to acquire a token for a web API. -- [ElectronTestApp](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/samples/msal-node-samples/ElectronTestApp): Electron desktop application using OAuth 2.0 auth code with PKCE flow to acquire a token for a web API such as Microsoft Graph. -- [Hybrid Spa Sample](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/samples/msal-browser-samples/HybridSample): Sample demonstrating how to use `enableSpaAuthorizationCode` to perform SSO for applications that leverage server-side and client-side authentication using MSAL Browser and MSAL Node. - -B2C samples: - -- [b2c-user-flows](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/samples/msal-node-samples/b2c-user-flows): Express app using OAuth2.0 authorization code flow. - -Others: - -- [msal-node-extensions](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/extensions/samples/msal-node-extensions): Uses authorization code flow to acquire tokens and the [msal-extensions](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/extensions/) library to write the MSAL in-memory token cache to disk. - -## Build and Test - -```javascript -// Install dependencies from root of repo -npm install - -// Change to the msal-node package directory -cd lib/msal-node - -// To run build for common package & node package -npm run build:all - -// To run build only for node package -npm run build - -// To run tests -npm run test -``` - -### Local Development - -Below is a list of commands you will probably find useful: - -#### `npm run build:modules:watch` - -Runs the project in development/watch mode. Your project will be rebuilt upon changes. TSDX has a special logger for you convenience. Error messages are pretty printed and formatted for compatibility VS Code's Problems tab. The library will be rebuilt if you make edits. - -#### `npm run build` - -Bundles the package to the `dist` folder. -The package is optimized and bundled with Rollup into multiple formats (CommonJS, UMD, and ES Module). - -#### `npm run build:all` - -Builds both `msal-common` and `msal-node` - -#### `npm run lint` - -Runs eslint with Prettier - -#### `npm test`, `npm run test:coverage`, `npm run test:watch` - -Runs the test watcher (Jest) in an interactive mode. -By default, runs tests related to files changed since the last commit. -Generate code coverage by adding the flag --coverage. No additional setup needed. Jest can collect code coverage information from entire projects, including untested files. - -## Security Reporting - -If you find a security issue with our libraries or services please report it to [secure@microsoft.com](mailto:secure@microsoft.com) with as much detail as possible. Your submission may be eligible for a bounty through the [Microsoft Bounty](http://aka.ms/bugbounty) program. Please do not post security issues to GitHub Issues or any other public site. We will contact you shortly upon receiving the information. We encourage you to get notifications of when security incidents occur by visiting [this page](https://technet.microsoft.com/security/dd252948) and subscribing to Security Advisory Alerts. - -## License - -Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT License. - -## We Value and Adhere to the Microsoft Open Source Code of Conduct - -This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/cache/ITokenCache.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/cache/ITokenCache.d.ts deleted file mode 100644 index 34a48ed..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/cache/ITokenCache.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { AccountInfo } from "@azure/msal-common/node"; -/** - * Token cache interface for the client, giving access to cache APIs - * @public - */ -export interface ITokenCache { - /** API that retrieves all accounts currently in cache to the user */ - getAllAccounts(): Promise; - /** Returns the signed in account matching homeAccountId */ - getAccountByHomeId(homeAccountId: string): Promise; - /** Returns the signed in account matching localAccountId */ - getAccountByLocalId(localAccountId: string): Promise; - /** API to remove a specific account and the relevant data from cache */ - removeAccount(account: AccountInfo): Promise; -} -//# sourceMappingURL=ITokenCache.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/cache/ITokenCache.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/cache/ITokenCache.d.ts.map deleted file mode 100644 index bc05495..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/cache/ITokenCache.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ITokenCache.d.ts","sourceRoot":"","sources":["../../src/cache/ITokenCache.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAEtD;;;GAGG;AACH,MAAM,WAAW,WAAW;IACxB,qEAAqE;IACrE,cAAc,IAAI,OAAO,CAAC,WAAW,EAAE,CAAC,CAAC;IAEzC,2DAA2D;IAC3D,kBAAkB,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;IAEvE,4DAA4D;IAC5D,mBAAmB,CAAC,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;IAEzE,wEAAwE;IACxE,aAAa,CAAC,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACtD"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/cache/NodeStorage.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/cache/NodeStorage.d.ts deleted file mode 100644 index 49c6a4e..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/cache/NodeStorage.d.ts +++ /dev/null @@ -1,194 +0,0 @@ -import { TokenKeys, AccountEntity, IdTokenEntity, AccessTokenEntity, RefreshTokenEntity, AppMetadataEntity, ServerTelemetryEntity, ThrottlingEntity, CacheManager, Logger, ValidCacheType, ICrypto, AuthorityMetadataEntity, ValidCredentialType, StaticAuthorityOptions } from "@azure/msal-common/node"; -import { InMemoryCache, JsonCache, CacheKVStore } from "./serializer/SerializerTypes.js"; -/** - * This class implements Storage for node, reading cache from user specified storage location or an extension library - * @public - */ -export declare class NodeStorage extends CacheManager { - private logger; - private cache; - private changeEmitters; - constructor(logger: Logger, clientId: string, cryptoImpl: ICrypto, staticAuthorityOptions?: StaticAuthorityOptions); - /** - * Queue up callbacks - * @param func - a callback function for cache change indication - */ - registerChangeEmitter(func: () => void): void; - /** - * Invoke the callback when cache changes - */ - emitChange(): void; - /** - * Converts cacheKVStore to InMemoryCache - * @param cache - key value store - */ - cacheToInMemoryCache(cache: CacheKVStore): InMemoryCache; - /** - * converts inMemoryCache to CacheKVStore - * @param inMemoryCache - kvstore map for inmemory - */ - inMemoryCacheToCache(inMemoryCache: InMemoryCache): CacheKVStore; - /** - * gets the current in memory cache for the client - */ - getInMemoryCache(): InMemoryCache; - /** - * sets the current in memory cache for the client - * @param inMemoryCache - key value map in memory - */ - setInMemoryCache(inMemoryCache: InMemoryCache): void; - /** - * get the current cache key-value store - */ - getCache(): CacheKVStore; - /** - * sets the current cache (key value store) - * @param cacheMap - key value map - */ - setCache(cache: CacheKVStore): void; - /** - * Gets cache item with given key. - * @param key - lookup key for the cache entry - */ - getItem(key: string): ValidCacheType; - /** - * Gets cache item with given key-value - * @param key - lookup key for the cache entry - * @param value - value of the cache entry - */ - setItem(key: string, value: ValidCacheType): void; - getAccountKeys(): string[]; - getTokenKeys(): TokenKeys; - /** - * fetch the account entity - * @param accountKey - lookup key to fetch cache type AccountEntity - */ - getAccount(accountKey: string): AccountEntity | null; - /** - * Reads account from cache, builds it into an account entity and returns it. - * @param accountKey - lookup key to fetch cache type AccountEntity - * @returns - */ - getCachedAccountEntity(accountKey: string): AccountEntity | null; - /** - * set account entity - * @param account - cache value to be set of type AccountEntity - */ - setAccount(account: AccountEntity): void; - /** - * fetch the idToken credential - * @param idTokenKey - lookup key to fetch cache type IdTokenEntity - */ - getIdTokenCredential(idTokenKey: string): IdTokenEntity | null; - /** - * set idToken credential - * @param idToken - cache value to be set of type IdTokenEntity - */ - setIdTokenCredential(idToken: IdTokenEntity): void; - /** - * fetch the accessToken credential - * @param accessTokenKey - lookup key to fetch cache type AccessTokenEntity - */ - getAccessTokenCredential(accessTokenKey: string): AccessTokenEntity | null; - /** - * set accessToken credential - * @param accessToken - cache value to be set of type AccessTokenEntity - */ - setAccessTokenCredential(accessToken: AccessTokenEntity): void; - /** - * fetch the refreshToken credential - * @param refreshTokenKey - lookup key to fetch cache type RefreshTokenEntity - */ - getRefreshTokenCredential(refreshTokenKey: string): RefreshTokenEntity | null; - /** - * set refreshToken credential - * @param refreshToken - cache value to be set of type RefreshTokenEntity - */ - setRefreshTokenCredential(refreshToken: RefreshTokenEntity): void; - /** - * fetch appMetadata entity from the platform cache - * @param appMetadataKey - lookup key to fetch cache type AppMetadataEntity - */ - getAppMetadata(appMetadataKey: string): AppMetadataEntity | null; - /** - * set appMetadata entity to the platform cache - * @param appMetadata - cache value to be set of type AppMetadataEntity - */ - setAppMetadata(appMetadata: AppMetadataEntity): void; - /** - * fetch server telemetry entity from the platform cache - * @param serverTelemetrykey - lookup key to fetch cache type ServerTelemetryEntity - */ - getServerTelemetry(serverTelemetrykey: string): ServerTelemetryEntity | null; - /** - * set server telemetry entity to the platform cache - * @param serverTelemetryKey - lookup key to fetch cache type ServerTelemetryEntity - * @param serverTelemetry - cache value to be set of type ServerTelemetryEntity - */ - setServerTelemetry(serverTelemetryKey: string, serverTelemetry: ServerTelemetryEntity): void; - /** - * fetch authority metadata entity from the platform cache - * @param key - lookup key to fetch cache type AuthorityMetadataEntity - */ - getAuthorityMetadata(key: string): AuthorityMetadataEntity | null; - /** - * Get all authority metadata keys - */ - getAuthorityMetadataKeys(): Array; - /** - * set authority metadata entity to the platform cache - * @param key - lookup key to fetch cache type AuthorityMetadataEntity - * @param metadata - cache value to be set of type AuthorityMetadataEntity - */ - setAuthorityMetadata(key: string, metadata: AuthorityMetadataEntity): void; - /** - * fetch throttling entity from the platform cache - * @param throttlingCacheKey - lookup key to fetch cache type ThrottlingEntity - */ - getThrottlingCache(throttlingCacheKey: string): ThrottlingEntity | null; - /** - * set throttling entity to the platform cache - * @param throttlingCacheKey - lookup key to fetch cache type ThrottlingEntity - * @param throttlingCache - cache value to be set of type ThrottlingEntity - */ - setThrottlingCache(throttlingCacheKey: string, throttlingCache: ThrottlingEntity): void; - /** - * Removes the cache item from memory with the given key. - * @param key - lookup key to remove a cache entity - * @param inMemory - key value map of the cache - */ - removeItem(key: string): boolean; - /** - * Remove account entity from the platform cache if it's outdated - * @param accountKey - lookup key to fetch cache type AccountEntity - */ - removeOutdatedAccount(accountKey: string): void; - /** - * Checks whether key is in cache. - * @param key - look up key for a cache entity - */ - containsKey(key: string): boolean; - /** - * Gets all keys in window. - */ - getKeys(): string[]; - /** - * Clears all cache entries created by MSAL (except tokens). - */ - clear(): void; - /** - * Initialize in memory cache from an exisiting cache vault - * @param cache - blob formatted cache (JSON) - */ - static generateInMemoryCache(cache: string): InMemoryCache; - /** - * retrieves the final JSON - * @param inMemoryCache - itemised cache read from the JSON - */ - static generateJsonCache(inMemoryCache: InMemoryCache): JsonCache; - /** - * Updates a credential's cache key if the current cache key is outdated - */ - updateCredentialCacheKey(currentCacheKey: string, credential: ValidCredentialType): string; -} -//# sourceMappingURL=NodeStorage.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/cache/NodeStorage.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/cache/NodeStorage.d.ts.map deleted file mode 100644 index d29859e..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/cache/NodeStorage.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"NodeStorage.d.ts","sourceRoot":"","sources":["../../src/cache/NodeStorage.ts"],"names":[],"mappings":"AAKA,OAAO,EACH,SAAS,EACT,aAAa,EACb,aAAa,EACb,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EACjB,qBAAqB,EACrB,gBAAgB,EAChB,YAAY,EACZ,MAAM,EACN,cAAc,EACd,OAAO,EACP,uBAAuB,EACvB,mBAAmB,EACnB,sBAAsB,EAEzB,MAAM,yBAAyB,CAAC;AAIjC,OAAO,EACH,aAAa,EACb,SAAS,EACT,YAAY,EACf,MAAM,iCAAiC,CAAC;AAEzC;;;GAGG;AACH,qBAAa,WAAY,SAAQ,YAAY;IAEzC,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,KAAK,CAAoB;IACjC,OAAO,CAAC,cAAc,CAAuB;gBAGzC,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,EAChB,UAAU,EAAE,OAAO,EACnB,sBAAsB,CAAC,EAAE,sBAAsB;IAMnD;;;OAGG;IACH,qBAAqB,CAAC,IAAI,EAAE,MAAM,IAAI,GAAG,IAAI;IAI7C;;OAEG;IACH,UAAU,IAAI,IAAI;IAIlB;;;OAGG;IACH,oBAAoB,CAAC,KAAK,EAAE,YAAY,GAAG,aAAa;IAgCxD;;;OAGG;IACH,oBAAoB,CAAC,aAAa,EAAE,aAAa,GAAG,YAAY;IAiBhE;;OAEG;IACH,gBAAgB,IAAI,aAAa;IAQjC;;;OAGG;IACH,gBAAgB,CAAC,aAAa,EAAE,aAAa,GAAG,IAAI;IAUpD;;OAEG;IACH,QAAQ,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AE,qBAAqB,GACvC,IAAI;IAIP;;;OAGG;IACH,oBAAoB,CAAC,GAAG,EAAE,MAAM,GAAG,uBAAuB,GAAG,IAAI;IAajE;;OAEG;IACH,wBAAwB,IAAI,KAAK,CAAC,MAAM,CAAC;IAMzC;;;;OAIG;IACH,oBAAoB,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,uBAAuB,GAAG,IAAI;IAI1E;;;OAGG;IACH,kBAAkB,CAAC,kBAAkB,EAAE,MAAM,GAAG,gBAAgB,GAAG,IAAI;IAavE;;;;OAIG;IACH,kBAAkB,CACd,kBAAkB,EAAE,MAAM,EAC1B,eAAe,EAAE,gBAAgB,GAClC,IAAI;IAIP;;;;OAIG;IACH,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO;IAoBhC;;;OAGG;IACH,qBAAqB,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI;IAI/C;;;OAGG;IACH,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO;IAIjC;;OAEG;IACH,OAAO,IAAI,MAAM,EAAE;IAQnB;;OAEG;IACH,KAAK,IAAI,IAAI;IAab;;;OAGG;IACH,MAAM,CAAC,qBAAqB,CAAC,KAAK,EAAE,MAAM,GAAG,aAAa;IAM1D;;;OAGG;IACH,MAAM,CAAC,iBAAiB,CAAC,aAAa,EAAE,aAAa,GAAG,SAAS;IAIjE;;OAEG;IACH,wBAAwB,CACpB,eAAe,EAAE,MAAM,EACvB,UAAU,EAAE,mBAAmB,GAChC,MAAM;CAqBZ"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/cache/NodeStorage.mjs b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/cache/NodeStorage.mjs deleted file mode 100644 index 3fea1fb..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/cache/NodeStorage.mjs +++ /dev/null @@ -1,432 +0,0 @@ -/*! @azure/msal-node v2.16.3 2025-08-05 */ -'use strict'; -import { CacheManager, AccountEntity, CacheHelpers } from '@azure/msal-common/node'; -import { Deserializer } from './serializer/Deserializer.mjs'; -import { Serializer } from './serializer/Serializer.mjs'; - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * This class implements Storage for node, reading cache from user specified storage location or an extension library - * @public - */ -class NodeStorage extends CacheManager { - constructor(logger, clientId, cryptoImpl, staticAuthorityOptions) { - super(clientId, cryptoImpl, logger, staticAuthorityOptions); - this.cache = {}; - this.changeEmitters = []; - this.logger = logger; - } - /** - * Queue up callbacks - * @param func - a callback function for cache change indication - */ - registerChangeEmitter(func) { - this.changeEmitters.push(func); - } - /** - * Invoke the callback when cache changes - */ - emitChange() { - this.changeEmitters.forEach((func) => func.call(null)); - } - /** - * Converts cacheKVStore to InMemoryCache - * @param cache - key value store - */ - cacheToInMemoryCache(cache) { - const inMemoryCache = { - accounts: {}, - idTokens: {}, - accessTokens: {}, - refreshTokens: {}, - appMetadata: {}, - }; - for (const key in cache) { - const value = cache[key]; - if (typeof value !== "object") { - continue; - } - if (value instanceof AccountEntity) { - inMemoryCache.accounts[key] = value; - } - else if (CacheHelpers.isIdTokenEntity(value)) { - inMemoryCache.idTokens[key] = value; - } - else if (CacheHelpers.isAccessTokenEntity(value)) { - inMemoryCache.accessTokens[key] = value; - } - else if (CacheHelpers.isRefreshTokenEntity(value)) { - inMemoryCache.refreshTokens[key] = value; - } - else if (CacheHelpers.isAppMetadataEntity(key, value)) { - inMemoryCache.appMetadata[key] = value; - } - else { - continue; - } - } - return inMemoryCache; - } - /** - * converts inMemoryCache to CacheKVStore - * @param inMemoryCache - kvstore map for inmemory - */ - inMemoryCacheToCache(inMemoryCache) { - // convert in memory cache to a flat Key-Value map - let cache = this.getCache(); - cache = { - ...cache, - ...inMemoryCache.accounts, - ...inMemoryCache.idTokens, - ...inMemoryCache.accessTokens, - ...inMemoryCache.refreshTokens, - ...inMemoryCache.appMetadata, - }; - // convert in memory cache to a flat Key-Value map - return cache; - } - /** - * gets the current in memory cache for the client - */ - getInMemoryCache() { - this.logger.trace("Getting in-memory cache"); - // convert the cache key value store to inMemoryCache - const inMemoryCache = this.cacheToInMemoryCache(this.getCache()); - return inMemoryCache; - } - /** - * sets the current in memory cache for the client - * @param inMemoryCache - key value map in memory - */ - setInMemoryCache(inMemoryCache) { - this.logger.trace("Setting in-memory cache"); - // convert and append the inMemoryCache to cacheKVStore - const cache = this.inMemoryCacheToCache(inMemoryCache); - this.setCache(cache); - this.emitChange(); - } - /** - * get the current cache key-value store - */ - getCache() { - this.logger.trace("Getting cache key-value store"); - return this.cache; - } - /** - * sets the current cache (key value store) - * @param cacheMap - key value map - */ - setCache(cache) { - this.logger.trace("Setting cache key value store"); - this.cache = cache; - // mark change in cache - this.emitChange(); - } - /** - * Gets cache item with given key. - * @param key - lookup key for the cache entry - */ - getItem(key) { - this.logger.tracePii(`Item key: ${key}`); - // read cache - const cache = this.getCache(); - return cache[key]; - } - /** - * Gets cache item with given key-value - * @param key - lookup key for the cache entry - * @param value - value of the cache entry - */ - setItem(key, value) { - this.logger.tracePii(`Item key: ${key}`); - // read cache - const cache = this.getCache(); - cache[key] = value; - // write to cache - this.setCache(cache); - } - getAccountKeys() { - const inMemoryCache = this.getInMemoryCache(); - const accountKeys = Object.keys(inMemoryCache.accounts); - return accountKeys; - } - getTokenKeys() { - const inMemoryCache = this.getInMemoryCache(); - const tokenKeys = { - idToken: Object.keys(inMemoryCache.idTokens), - accessToken: Object.keys(inMemoryCache.accessTokens), - refreshToken: Object.keys(inMemoryCache.refreshTokens), - }; - return tokenKeys; - } - /** - * fetch the account entity - * @param accountKey - lookup key to fetch cache type AccountEntity - */ - getAccount(accountKey) { - const accountEntity = this.getCachedAccountEntity(accountKey); - if (accountEntity && AccountEntity.isAccountEntity(accountEntity)) { - return this.updateOutdatedCachedAccount(accountKey, accountEntity, ""); - } - return null; - } - /** - * Reads account from cache, builds it into an account entity and returns it. - * @param accountKey - lookup key to fetch cache type AccountEntity - * @returns - */ - getCachedAccountEntity(accountKey) { - const cachedAccount = this.getItem(accountKey); - return cachedAccount - ? Object.assign(new AccountEntity(), this.getItem(accountKey)) - : null; - } - /** - * set account entity - * @param account - cache value to be set of type AccountEntity - */ - setAccount(account) { - const accountKey = account.generateAccountKey(); - this.setItem(accountKey, account); - } - /** - * fetch the idToken credential - * @param idTokenKey - lookup key to fetch cache type IdTokenEntity - */ - getIdTokenCredential(idTokenKey) { - const idToken = this.getItem(idTokenKey); - if (CacheHelpers.isIdTokenEntity(idToken)) { - return idToken; - } - return null; - } - /** - * set idToken credential - * @param idToken - cache value to be set of type IdTokenEntity - */ - setIdTokenCredential(idToken) { - const idTokenKey = CacheHelpers.generateCredentialKey(idToken); - this.setItem(idTokenKey, idToken); - } - /** - * fetch the accessToken credential - * @param accessTokenKey - lookup key to fetch cache type AccessTokenEntity - */ - getAccessTokenCredential(accessTokenKey) { - const accessToken = this.getItem(accessTokenKey); - if (CacheHelpers.isAccessTokenEntity(accessToken)) { - return accessToken; - } - return null; - } - /** - * set accessToken credential - * @param accessToken - cache value to be set of type AccessTokenEntity - */ - setAccessTokenCredential(accessToken) { - const accessTokenKey = CacheHelpers.generateCredentialKey(accessToken); - this.setItem(accessTokenKey, accessToken); - } - /** - * fetch the refreshToken credential - * @param refreshTokenKey - lookup key to fetch cache type RefreshTokenEntity - */ - getRefreshTokenCredential(refreshTokenKey) { - const refreshToken = this.getItem(refreshTokenKey); - if (CacheHelpers.isRefreshTokenEntity(refreshToken)) { - return refreshToken; - } - return null; - } - /** - * set refreshToken credential - * @param refreshToken - cache value to be set of type RefreshTokenEntity - */ - setRefreshTokenCredential(refreshToken) { - const refreshTokenKey = CacheHelpers.generateCredentialKey(refreshToken); - this.setItem(refreshTokenKey, refreshToken); - } - /** - * fetch appMetadata entity from the platform cache - * @param appMetadataKey - lookup key to fetch cache type AppMetadataEntity - */ - getAppMetadata(appMetadataKey) { - const appMetadata = this.getItem(appMetadataKey); - if (CacheHelpers.isAppMetadataEntity(appMetadataKey, appMetadata)) { - return appMetadata; - } - return null; - } - /** - * set appMetadata entity to the platform cache - * @param appMetadata - cache value to be set of type AppMetadataEntity - */ - setAppMetadata(appMetadata) { - const appMetadataKey = CacheHelpers.generateAppMetadataKey(appMetadata); - this.setItem(appMetadataKey, appMetadata); - } - /** - * fetch server telemetry entity from the platform cache - * @param serverTelemetrykey - lookup key to fetch cache type ServerTelemetryEntity - */ - getServerTelemetry(serverTelemetrykey) { - const serverTelemetryEntity = this.getItem(serverTelemetrykey); - if (serverTelemetryEntity && - CacheHelpers.isServerTelemetryEntity(serverTelemetrykey, serverTelemetryEntity)) { - return serverTelemetryEntity; - } - return null; - } - /** - * set server telemetry entity to the platform cache - * @param serverTelemetryKey - lookup key to fetch cache type ServerTelemetryEntity - * @param serverTelemetry - cache value to be set of type ServerTelemetryEntity - */ - setServerTelemetry(serverTelemetryKey, serverTelemetry) { - this.setItem(serverTelemetryKey, serverTelemetry); - } - /** - * fetch authority metadata entity from the platform cache - * @param key - lookup key to fetch cache type AuthorityMetadataEntity - */ - getAuthorityMetadata(key) { - const authorityMetadataEntity = this.getItem(key); - if (authorityMetadataEntity && - CacheHelpers.isAuthorityMetadataEntity(key, authorityMetadataEntity)) { - return authorityMetadataEntity; - } - return null; - } - /** - * Get all authority metadata keys - */ - getAuthorityMetadataKeys() { - return this.getKeys().filter((key) => { - return this.isAuthorityMetadata(key); - }); - } - /** - * set authority metadata entity to the platform cache - * @param key - lookup key to fetch cache type AuthorityMetadataEntity - * @param metadata - cache value to be set of type AuthorityMetadataEntity - */ - setAuthorityMetadata(key, metadata) { - this.setItem(key, metadata); - } - /** - * fetch throttling entity from the platform cache - * @param throttlingCacheKey - lookup key to fetch cache type ThrottlingEntity - */ - getThrottlingCache(throttlingCacheKey) { - const throttlingCache = this.getItem(throttlingCacheKey); - if (throttlingCache && - CacheHelpers.isThrottlingEntity(throttlingCacheKey, throttlingCache)) { - return throttlingCache; - } - return null; - } - /** - * set throttling entity to the platform cache - * @param throttlingCacheKey - lookup key to fetch cache type ThrottlingEntity - * @param throttlingCache - cache value to be set of type ThrottlingEntity - */ - setThrottlingCache(throttlingCacheKey, throttlingCache) { - this.setItem(throttlingCacheKey, throttlingCache); - } - /** - * Removes the cache item from memory with the given key. - * @param key - lookup key to remove a cache entity - * @param inMemory - key value map of the cache - */ - removeItem(key) { - this.logger.tracePii(`Item key: ${key}`); - // read inMemoryCache - let result = false; - const cache = this.getCache(); - if (!!cache[key]) { - delete cache[key]; - result = true; - } - // write to the cache after removal - if (result) { - this.setCache(cache); - this.emitChange(); - } - return result; - } - /** - * Remove account entity from the platform cache if it's outdated - * @param accountKey - lookup key to fetch cache type AccountEntity - */ - removeOutdatedAccount(accountKey) { - this.removeItem(accountKey); - } - /** - * Checks whether key is in cache. - * @param key - look up key for a cache entity - */ - containsKey(key) { - return this.getKeys().includes(key); - } - /** - * Gets all keys in window. - */ - getKeys() { - this.logger.trace("Retrieving all cache keys"); - // read cache - const cache = this.getCache(); - return [...Object.keys(cache)]; - } - /** - * Clears all cache entries created by MSAL (except tokens). - */ - clear() { - this.logger.trace("Clearing cache entries created by MSAL"); - // read inMemoryCache - const cacheKeys = this.getKeys(); - // delete each element - cacheKeys.forEach((key) => { - this.removeItem(key); - }); - this.emitChange(); - } - /** - * Initialize in memory cache from an exisiting cache vault - * @param cache - blob formatted cache (JSON) - */ - static generateInMemoryCache(cache) { - return Deserializer.deserializeAllCache(Deserializer.deserializeJSONBlob(cache)); - } - /** - * retrieves the final JSON - * @param inMemoryCache - itemised cache read from the JSON - */ - static generateJsonCache(inMemoryCache) { - return Serializer.serializeAllCache(inMemoryCache); - } - /** - * Updates a credential's cache key if the current cache key is outdated - */ - updateCredentialCacheKey(currentCacheKey, credential) { - const updatedCacheKey = CacheHelpers.generateCredentialKey(credential); - if (currentCacheKey !== updatedCacheKey) { - const cacheItem = this.getItem(currentCacheKey); - if (cacheItem) { - this.removeItem(currentCacheKey); - this.setItem(updatedCacheKey, cacheItem); - this.logger.verbose(`Updated an outdated ${credential.credentialType} cache key`); - return updatedCacheKey; - } - else { - this.logger.error(`Attempted to update an outdated ${credential.credentialType} cache key but no item matching the outdated key was found in storage`); - } - } - return currentCacheKey; - } -} - -export { NodeStorage }; -//# sourceMappingURL=NodeStorage.mjs.map diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/cache/NodeStorage.mjs.map b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/cache/NodeStorage.mjs.map deleted file mode 100644 index 53a4242..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/cache/NodeStorage.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"NodeStorage.mjs","sources":["../../src/cache/NodeStorage.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;AAAA;;;AAGG;AA6BH;;;AAGG;AACG,MAAO,WAAY,SAAQ,YAAY,CAAA;AAMzC,IAAA,WAAA,CACI,MAAc,EACd,QAAgB,EAChB,UAAmB,EACnB,sBAA+C,EAAA;QAE/C,KAAK,CAAC,QAAQ,EAAE,UAAU,EAAE,MAAM,EAAE,sBAAsB,CAAC,CAAC;QATxD,IAAK,CAAA,KAAA,GAAiB,EAAE,CAAC;QACzB,IAAc,CAAA,cAAA,GAAoB,EAAE,CAAC;AASzC,QAAA,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;KACxB;AAED;;;AAGG;AACH,IAAA,qBAAqB,CAAC,IAAgB,EAAA;AAClC,QAAA,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;KAClC;AAED;;AAEG;IACH,UAAU,GAAA;AACN,QAAA,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,IAAI,KAAK,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;KAC1D;AAED;;;AAGG;AACH,IAAA,oBAAoB,CAAC,KAAmB,EAAA;AACpC,QAAA,MAAM,aAAa,GAAkB;AACjC,YAAA,QAAQ,EAAE,EAAE;AAC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A;AACJ,SAAA;AAED,QAAA,OAAO,eAAe,CAAC;KAC1B;AACJ;;;;"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/cache/TokenCache.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/cache/TokenCache.d.ts deleted file mode 100644 index ba8ca45..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/cache/TokenCache.d.ts +++ /dev/null @@ -1,91 +0,0 @@ -import { NodeStorage } from "./NodeStorage.js"; -import { AccountInfo, Logger, ISerializableTokenCache, ICachePlugin } from "@azure/msal-common/node"; -import { CacheKVStore } from "./serializer/SerializerTypes.js"; -import { ITokenCache } from "./ITokenCache.js"; -/** - * In-memory token cache manager - * @public - */ -export declare class TokenCache implements ISerializableTokenCache, ITokenCache { - private storage; - private cacheHasChanged; - private cacheSnapshot; - private readonly persistence; - private logger; - constructor(storage: NodeStorage, logger: Logger, cachePlugin?: ICachePlugin); - /** - * Set to true if cache state has changed since last time serialize or writeToPersistence was called - */ - hasChanged(): boolean; - /** - * Serializes in memory cache to JSON - */ - serialize(): string; - /** - * Deserializes JSON to in-memory cache. JSON should be in MSAL cache schema format - * @param cache - blob formatted cache - */ - deserialize(cache: string): void; - /** - * Fetches the cache key-value map - */ - getKVStore(): CacheKVStore; - /** - * API that retrieves all accounts currently in cache to the user - */ - getAllAccounts(correlationId?: string): Promise; - /** - * Returns the signed in account matching homeAccountId. - * (the account object is created at the time of successful login) - * or null when no matching account is found - * @param homeAccountId - unique identifier for an account (uid.utid) - */ - getAccountByHomeId(homeAccountId: string): Promise; - /** - * Returns the signed in account matching localAccountId. - * (the account object is created at the time of successful login) - * or null when no matching account is found - * @param localAccountId - unique identifier of an account (sub/obj when homeAccountId cannot be populated) - */ - getAccountByLocalId(localAccountId: string): Promise; - /** - * API to remove a specific account and the relevant data from cache - * @param account - AccountInfo passed by the user - */ - removeAccount(account: AccountInfo, correlationId?: string): Promise; - /** - * Called when the cache has changed state. - */ - private handleChangeEvent; - /** - * Merge in memory cache with the cache snapshot. - * @param oldState - cache before changes - * @param currentState - current cache state in the library - */ - private mergeState; - /** - * Deep update of oldState based on newState values - * @param oldState - cache before changes - * @param newState - updated cache - */ - private mergeUpdates; - /** - * Removes entities in oldState that the were removed from newState. If there are any unknown values in root of - * oldState that are not recognized, they are left untouched. - * @param oldState - cache before changes - * @param newState - updated cache - */ - private mergeRemovals; - /** - * Helper to merge new cache with the old one - * @param oldState - cache before changes - * @param newState - updated cache - */ - private mergeRemovalsDict; - /** - * Helper to overlay as a part of cache merge - * @param passedInCache - cache read from the blob - */ - private overlayDefaults; -} -//# sourceMappingURL=TokenCache.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/cache/TokenCache.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/cache/TokenCache.d.ts.map deleted file mode 100644 index 8940249..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/cache/TokenCache.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"TokenCache.d.ts","sourceRoot":"","sources":["../../src/cache/TokenCache.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAEH,WAAW,EACX,MAAM,EACN,uBAAuB,EACvB,YAAY,EAEf,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAQH,YAAY,EACf,MAAM,iCAAiC,CAAC;AAGzC,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAW/C;;;GAGG;AACH,qBAAa,UAAW,YAAW,uBAAuB,EAAE,WAAW;IACnE,OAAO,CAAC,OAAO,CAAc;IAC7B,OAAO,CAAC,eAAe,CAAU;IACjC,OAAO,CAAC,aAAa,CAAS;IAC9B,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAe;IAC3C,OAAO,CAAC,MAAM,CAAS;gBAGnB,OAAO,EAAE,WAAW,EACpB,MAAM,EAAE,MAAM,EACd,WAAW,CAAC,EAAE,YAAY;IAW9B;;OAEG;IACH,UAAU,IAAI,OAAO;IAIrB;;OAEG;IACH,SAAS,IAAI,MAAM;IAqBnB;;;OAGG;IACH,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAehC;;OAEG;IACH,UAAU,IAAI,YAAY;IAI1B;;OAEG;IACG,cAAc,CAChB,aAAa,GAAE,MAA6C,GAC7D,OAAO,CAAC,WAAW,EAAE,CAAC;IAgBzB;;;;;OAKG;IACG,kBAAkB,CACpB,aAAa,EAAE,MAAM,GACtB,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC;IAa9B;;;;;OAKG;IACG,mBAAmB,CACrB,cAAc,EAAE,MAAM,GACvB,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC;IAa9B;;;OAGG;IACG,aAAa,CACf,OAAO,EAAE,WAAW,EACpB,aAAa,GAAE,MAA6C,GAC7D,OAAO,CAAC,IAAI,CAAC;IAmBhB;;OAEG;IACH,OAAO,CAAC,iBAAiB;IAIzB;;;;OAIG;IACH,OAAO,CAAC,UAAU;IASlB;;;;OAIG;IACH,OAAO,CAAC,YAAY;IAkCpB;;;;;OAKG;IACH,OAAO,CAAC,aAAa;IA2CrB;;;;OAIG;IACH,OAAO,CAAC,iBAAiB;IAazB;;;OAGG;IACH,OAAO,CAAC,eAAe;CAyB1B"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/cache/TokenCache.mjs b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/cache/TokenCache.mjs deleted file mode 100644 index dbf2113..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/cache/TokenCache.mjs +++ /dev/null @@ -1,275 +0,0 @@ -/*! @azure/msal-node v2.16.3 2025-08-05 */ -'use strict'; -import { TokenCacheContext, AccountEntity } from '@azure/msal-common/node'; -import { Deserializer } from './serializer/Deserializer.mjs'; -import { Serializer } from './serializer/Serializer.mjs'; -import { CryptoProvider } from '../crypto/CryptoProvider.mjs'; - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -const defaultSerializedCache = { - Account: {}, - IdToken: {}, - AccessToken: {}, - RefreshToken: {}, - AppMetadata: {}, -}; -/** - * In-memory token cache manager - * @public - */ -class TokenCache { - constructor(storage, logger, cachePlugin) { - this.cacheHasChanged = false; - this.storage = storage; - this.storage.registerChangeEmitter(this.handleChangeEvent.bind(this)); - if (cachePlugin) { - this.persistence = cachePlugin; - } - this.logger = logger; - } - /** - * Set to true if cache state has changed since last time serialize or writeToPersistence was called - */ - hasChanged() { - return this.cacheHasChanged; - } - /** - * Serializes in memory cache to JSON - */ - serialize() { - this.logger.trace("Serializing in-memory cache"); - let finalState = Serializer.serializeAllCache(this.storage.getInMemoryCache()); - // if cacheSnapshot not null or empty, merge - if (this.cacheSnapshot) { - this.logger.trace("Reading cache snapshot from disk"); - finalState = this.mergeState(JSON.parse(this.cacheSnapshot), finalState); - } - else { - this.logger.trace("No cache snapshot to merge"); - } - this.cacheHasChanged = false; - return JSON.stringify(finalState); - } - /** - * Deserializes JSON to in-memory cache. JSON should be in MSAL cache schema format - * @param cache - blob formatted cache - */ - deserialize(cache) { - this.logger.trace("Deserializing JSON to in-memory cache"); - this.cacheSnapshot = cache; - if (this.cacheSnapshot) { - this.logger.trace("Reading cache snapshot from disk"); - const deserializedCache = Deserializer.deserializeAllCache(this.overlayDefaults(JSON.parse(this.cacheSnapshot))); - this.storage.setInMemoryCache(deserializedCache); - } - else { - this.logger.trace("No cache snapshot to deserialize"); - } - } - /** - * Fetches the cache key-value map - */ - getKVStore() { - return this.storage.getCache(); - } - /** - * API that retrieves all accounts currently in cache to the user - */ - async getAllAccounts(correlationId = new CryptoProvider().createNewGuid()) { - this.logger.trace("getAllAccounts called"); - let cacheContext; - try { - if (this.persistence) { - cacheContext = new TokenCacheContext(this, false); - await this.persistence.beforeCacheAccess(cacheContext); - } - return this.storage.getAllAccounts(correlationId); - } - finally { - if (this.persistence && cacheContext) { - await this.persistence.afterCacheAccess(cacheContext); - } - } - } - /** - * Returns the signed in account matching homeAccountId. - * (the account object is created at the time of successful login) - * or null when no matching account is found - * @param homeAccountId - unique identifier for an account (uid.utid) - */ - async getAccountByHomeId(homeAccountId) { - const allAccounts = await this.getAllAccounts(); - if (homeAccountId && allAccounts && allAccounts.length) { - return (allAccounts.filter((accountObj) => accountObj.homeAccountId === homeAccountId)[0] || null); - } - else { - return null; - } - } - /** - * Returns the signed in account matching localAccountId. - * (the account object is created at the time of successful login) - * or null when no matching account is found - * @param localAccountId - unique identifier of an account (sub/obj when homeAccountId cannot be populated) - */ - async getAccountByLocalId(localAccountId) { - const allAccounts = await this.getAllAccounts(); - if (localAccountId && allAccounts && allAccounts.length) { - return (allAccounts.filter((accountObj) => accountObj.localAccountId === localAccountId)[0] || null); - } - else { - return null; - } - } - /** - * API to remove a specific account and the relevant data from cache - * @param account - AccountInfo passed by the user - */ - async removeAccount(account, correlationId = new CryptoProvider().createNewGuid()) { - this.logger.trace("removeAccount called"); - let cacheContext; - try { - if (this.persistence) { - cacheContext = new TokenCacheContext(this, true); - await this.persistence.beforeCacheAccess(cacheContext); - } - await this.storage.removeAccount(AccountEntity.generateAccountCacheKey(account), correlationId); - } - finally { - if (this.persistence && cacheContext) { - await this.persistence.afterCacheAccess(cacheContext); - } - } - } - /** - * Called when the cache has changed state. - */ - handleChangeEvent() { - this.cacheHasChanged = true; - } - /** - * Merge in memory cache with the cache snapshot. - * @param oldState - cache before changes - * @param currentState - current cache state in the library - */ - mergeState(oldState, currentState) { - this.logger.trace("Merging in-memory cache with cache snapshot"); - const stateAfterRemoval = this.mergeRemovals(oldState, currentState); - return this.mergeUpdates(stateAfterRemoval, currentState); - } - /** - * Deep update of oldState based on newState values - * @param oldState - cache before changes - * @param newState - updated cache - */ - mergeUpdates(oldState, newState) { - Object.keys(newState).forEach((newKey) => { - const newValue = newState[newKey]; - // if oldState does not contain value but newValue does, add it - if (!oldState.hasOwnProperty(newKey)) { - if (newValue !== null) { - oldState[newKey] = newValue; - } - } - else { - // both oldState and newState contain the key, do deep update - const newValueNotNull = newValue !== null; - const newValueIsObject = typeof newValue === "object"; - const newValueIsNotArray = !Array.isArray(newValue); - const oldStateNotUndefinedOrNull = typeof oldState[newKey] !== "undefined" && - oldState[newKey] !== null; - if (newValueNotNull && - newValueIsObject && - newValueIsNotArray && - oldStateNotUndefinedOrNull) { - this.mergeUpdates(oldState[newKey], newValue); - } - else { - oldState[newKey] = newValue; - } - } - }); - return oldState; - } - /** - * Removes entities in oldState that the were removed from newState. If there are any unknown values in root of - * oldState that are not recognized, they are left untouched. - * @param oldState - cache before changes - * @param newState - updated cache - */ - mergeRemovals(oldState, newState) { - this.logger.trace("Remove updated entries in cache"); - const accounts = oldState.Account - ? this.mergeRemovalsDict(oldState.Account, newState.Account) - : oldState.Account; - const accessTokens = oldState.AccessToken - ? this.mergeRemovalsDict(oldState.AccessToken, newState.AccessToken) - : oldState.AccessToken; - const refreshTokens = oldState.RefreshToken - ? this.mergeRemovalsDict(oldState.RefreshToken, newState.RefreshToken) - : oldState.RefreshToken; - const idTokens = oldState.IdToken - ? this.mergeRemovalsDict(oldState.IdToken, newState.IdToken) - : oldState.IdToken; - const appMetadata = oldState.AppMetadata - ? this.mergeRemovalsDict(oldState.AppMetadata, newState.AppMetadata) - : oldState.AppMetadata; - return { - ...oldState, - Account: accounts, - AccessToken: accessTokens, - RefreshToken: refreshTokens, - IdToken: idTokens, - AppMetadata: appMetadata, - }; - } - /** - * Helper to merge new cache with the old one - * @param oldState - cache before changes - * @param newState - updated cache - */ - mergeRemovalsDict(oldState, newState) { - const finalState = { ...oldState }; - Object.keys(oldState).forEach((oldKey) => { - if (!newState || !newState.hasOwnProperty(oldKey)) { - delete finalState[oldKey]; - } - }); - return finalState; - } - /** - * Helper to overlay as a part of cache merge - * @param passedInCache - cache read from the blob - */ - overlayDefaults(passedInCache) { - this.logger.trace("Overlaying input cache with the default cache"); - return { - Account: { - ...defaultSerializedCache.Account, - ...passedInCache.Account, - }, - IdToken: { - ...defaultSerializedCache.IdToken, - ...passedInCache.IdToken, - }, - AccessToken: { - ...defaultSerializedCache.AccessToken, - ...passedInCache.AccessToken, - }, - RefreshToken: { - ...defaultSerializedCache.RefreshToken, - ...passedInCache.RefreshToken, - }, - AppMetadata: { - ...defaultSerializedCache.AppMetadata, - ...passedInCache.AppMetadata, - }, - }; - } -} - -export { TokenCache }; -//# sourceMappingURL=TokenCache.mjs.map diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/cache/TokenCache.mjs.map b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/cache/TokenCache.mjs.map deleted file mode 100644 index cfd75ef..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/cache/TokenCache.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"TokenCache.mjs","sources":["../../src/cache/TokenCache.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;AAAA;;;AAGG;AA0BH,MAAM,sBAAsB,GAAc;AACtC,IAAA,OAAO,EAAE,EAAE;AACX,IAAA,OAAO,EAAE,EAAE;AACX,IAAA,WAAW,EAAE,EAAE;AACf,IAAA,YAAY,EAAE,EAAE;AAChB,IAAA,WAAW,EAAE,EAAE;CAClB,CAAC;AAEF;;;AAGG;MACU,UAAU,CAAA;AAOnB,IAAA,WAAA,CACI,OAAoB,EACpB,MAAc,EACd,WAA0B,EAAA;AAE1B,QAAA,IAAI,CAAC,eAAe,GAAG,KAAK,CAAC;AAC7B,QAAA,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;AACvB,QAAA,IAAI,CAAC,OAAO,CAAC,qBAAqB,CAAC,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;AACtE,QAAA,IAAI,WAAW,EAAE;AACb,YAAA,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;AAClC,SAAA;AACD,QAAA,IAAI,CAAC,MA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E,WAAW;SAC3B,CAAC;KACL;AAED;;;;AAIG;IACK,iBAAiB,CACrB,QAA2B,EAC3B,QAA4B,EAAA;AAE5B,QAAA,MAAM,UAAU,GAAG,EAAE,GAAG,QAAQ,EAAE,CAAC;QACnC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,CAAC,MAAM,KAAI;YACrC,IAAI,CAAC,QAAQ,IAAI,CAAC,QAAQ,CAAC,cAAc,CAAC,MAAM,CAAC,EAAE;AAC/C,gBAAA,OAAO,UAAU,CAAC,MAAM,CAAC,CAAC;AAC7B,aAAA;AACL,SAAC,CAAC,CAAC;AACH,QAAA,OAAO,UAAU,CAAC;KACrB;AAED;;;AAGG;AACK,IAAA,eAAe,CAAC,aAAwB,EAAA;AAC5C,QAAA,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,+CAA+C,CAAC,CAAC;QACnE,OAAO;AACH,YAAA,OAAO,EAAE;gBACL,GAAG,sBAAsB,CAAC,OAAO;gBACjC,GAAG,aAAa,CAAC,OAAO;AAC3B,aAAA;AACD,YAAA,OAAO,EAAE;gBACL,GAAG,sBAAsB,CAAC,OAAO;gBACjC,GAAG,aAAa,CAAC,OAAO;AAC3B,aAAA;AACD,YAAA,WAAW,EAAE;gBACT,GAAG,sBAAsB,CAAC,WAAW;gBACrC,GAAG,aAAa,CAAC,WAAW;AAC/B,aAAA;AACD,YAAA,YAAY,EAAE;gBACV,GAAG,sBAAsB,CAAC,YAAY;gBACtC,GAAG,aAAa,CAAC,YAAY;AAChC,aAAA;AACD,YAAA,WAAW,EAAE;gBACT,GAAG,sBAAsB,CAAC,WAAW;gBACrC,GAAG,aAAa,CAAC,WAAW;AAC/B,aAAA;SACJ,CAAC;KACL;AACJ;;;;"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/cache/distributed/DistributedCachePlugin.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/cache/distributed/DistributedCachePlugin.d.ts deleted file mode 100644 index 2c92fc3..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/cache/distributed/DistributedCachePlugin.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { ICachePlugin, TokenCacheContext } from "@azure/msal-common/node"; -import { IPartitionManager } from "./IPartitionManager.js"; -import { ICacheClient } from "./ICacheClient.js"; -/** - * Cache plugin that serializes data to the cache and deserializes data from the cache - * @public - */ -export declare class DistributedCachePlugin implements ICachePlugin { - private client; - private partitionManager; - constructor(client: ICacheClient, partitionManager: IPartitionManager); - /** - * Deserializes the cache before accessing it - * @param cacheContext - TokenCacheContext - */ - beforeCacheAccess(cacheContext: TokenCacheContext): Promise; - /** - * Serializes the cache after accessing it - * @param cacheContext - TokenCacheContext - */ - afterCacheAccess(cacheContext: TokenCacheContext): Promise; -} -//# sourceMappingURL=DistributedCachePlugin.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/cache/distributed/DistributedCachePlugin.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/cache/distributed/DistributedCachePlugin.d.ts.map deleted file mode 100644 index 3f7a82e..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/cache/distributed/DistributedCachePlugin.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"DistributedCachePlugin.d.ts","sourceRoot":"","sources":["../../../src/cache/distributed/DistributedCachePlugin.ts"],"names":[],"mappings":"AAKA,OAAO,EAEH,YAAY,EACZ,iBAAiB,EACpB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEjD;;;GAGG;AACH,qBAAa,sBAAuB,YAAW,YAAY;IACvD,OAAO,CAAC,MAAM,CAAe;IAC7B,OAAO,CAAC,gBAAgB,CAAoB;gBAEhC,MAAM,EAAE,YAAY,EAAE,gBAAgB,EAAE,iBAAiB;IAKrE;;;OAGG;IACU,iBAAiB,CAC1B,YAAY,EAAE,iBAAiB,GAChC,OAAO,CAAC,IAAI,CAAC;IAMhB;;;OAGG;IACU,gBAAgB,CACzB,YAAY,EAAE,iBAAiB,GAChC,OAAO,CAAC,IAAI,CAAC;CAyBnB"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/cache/distributed/DistributedCachePlugin.mjs b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/cache/distributed/DistributedCachePlugin.mjs deleted file mode 100644 index 62fe5f0..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/cache/distributed/DistributedCachePlugin.mjs +++ /dev/null @@ -1,49 +0,0 @@ -/*! @azure/msal-node v2.16.3 2025-08-05 */ -'use strict'; -import { AccountEntity } from '@azure/msal-common/node'; - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * Cache plugin that serializes data to the cache and deserializes data from the cache - * @public - */ -class DistributedCachePlugin { - constructor(client, partitionManager) { - this.client = client; - this.partitionManager = partitionManager; - } - /** - * Deserializes the cache before accessing it - * @param cacheContext - TokenCacheContext - */ - async beforeCacheAccess(cacheContext) { - const partitionKey = await this.partitionManager.getKey(); - const cacheData = await this.client.get(partitionKey); - cacheContext.tokenCache.deserialize(cacheData); - } - /** - * Serializes the cache after accessing it - * @param cacheContext - TokenCacheContext - */ - async afterCacheAccess(cacheContext) { - if (cacheContext.cacheHasChanged) { - const kvStore = cacheContext.tokenCache.getKVStore(); - const accountEntities = Object.values(kvStore).filter((value) => AccountEntity.isAccountEntity(value)); - let partitionKey; - if (accountEntities.length > 0) { - const accountEntity = accountEntities[0]; - partitionKey = await this.partitionManager.extractKey(accountEntity); - } - else { - partitionKey = await this.partitionManager.getKey(); - } - await this.client.set(partitionKey, cacheContext.tokenCache.serialize()); - } - } -} - -export { DistributedCachePlugin }; -//# sourceMappingURL=DistributedCachePlugin.mjs.map diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/cache/distributed/DistributedCachePlugin.mjs.map b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/cache/distributed/DistributedCachePlugin.mjs.map deleted file mode 100644 index 502995c..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/cache/distributed/DistributedCachePlugin.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"DistributedCachePlugin.mjs","sources":["../../../src/cache/distributed/DistributedCachePlugin.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;AAAA;;;AAGG;AAWH;;;AAGG;MACU,sBAAsB,CAAA;IAI/B,WAAY,CAAA,MAAoB,EAAE,gBAAmC,EAAA;AACjE,QAAA,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;AACrB,QAAA,IAAI,CAAC,gBAAgB,GAAG,gBAAgB,CAAC;KAC5C;AAED;;;AAGG;IACI,MAAM,iBAAiB,CAC1B,YAA+B,EAAA;QAE/B,MAAM,YAAY,GAAG,MAAM,IAAI,CAAC,gBAAgB,CAAC,MAAM,EAAE,CAAC;QAC1D,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;AACtD,QAAA,YAAY,CAAC,UAAU,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC;KAClD;AAED;;;AAGG;IACI,MAAM,gBAAgB,CACzB,YAA+B,EAAA;QAE/B,IAAI,YAAY,CAAC,eAAe,EAAE;YAC9B,MAAM,OAAO,GACT,YAAY,CAAC,UAChB,CAAC,UAAU,EAAE,CAAC;YACf,MAAM,eAAe,GAAG,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC,KAAK,KACxD,aAAa,CAAC,eAAe,CAAC,KAAe,CAAC,CACjD,CAAC;AAEF,YAAA,IAAI,YAAoB,CAAC;AACzB,YAAA,IAAI,eAAe,CAAC,MAAM,GAAG,CAAC,EAAE;AAC5B,gBAAA,MAAM,aAAa,GAAG,eAAe,CAAC,CAAC,CAAkB,CAAC;gBAC1D,YAAY,GAAG,MAAM,IAAI,CAAC,gBAAgB,CAAC,UAAU,CACjD,aAAa,CAChB,CAAC;AACL,aAAA;AAAM,iBAAA;gBACH,YAAY,GAAG,MAAM,IAAI,CAAC,gBAAgB,CAAC,MAAM,EAAE,CAAC;AACvD,aAAA;AAED,YAAA,MAAM,IAAI,CAAC,MAAM,CAAC,GAAG,CACjB,YAAY,EACZ,YAAY,CAAC,UAAU,CAAC,SAAS,EAAE,CACtC,CAAC;AACL,SAAA;KACJ;AACJ;;;;"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/cache/distributed/ICacheClient.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/cache/distributed/ICacheClient.d.ts deleted file mode 100644 index 033f806..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/cache/distributed/ICacheClient.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * Interface for the cache that defines a getter and setter - * @public - */ -export interface ICacheClient { - /** - * Retrieve the value from the cache - * - * @param key - key of item in the cache - * @returns Promise - */ - get(key: string): Promise; - /** - * Save the required value using the provided key to cache - * - * @param key - key of item in the cache - * @param value - value of item to be saved in the cache - * @returns Promise - */ - set(key: string, value: string): Promise; -} -//# sourceMappingURL=ICacheClient.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/cache/distributed/ICacheClient.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/cache/distributed/ICacheClient.d.ts.map deleted file mode 100644 index fefae21..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/cache/distributed/ICacheClient.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ICacheClient.d.ts","sourceRoot":"","sources":["../../../src/cache/distributed/ICacheClient.ts"],"names":[],"mappings":"AAKA;;;GAGG;AACH,MAAM,WAAW,YAAY;IACzB;;;;;OAKG;IACH,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAElC;;;;;;OAMG;IACH,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;CACpD"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/cache/distributed/IPartitionManager.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/cache/distributed/IPartitionManager.d.ts deleted file mode 100644 index 55c0e6a..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/cache/distributed/IPartitionManager.d.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { AccountEntity } from "@azure/msal-common/node"; -/** - * Interface that defines getter methods to get keys used to identity data in the cache - * @public - */ -export interface IPartitionManager { - /** - * This function should return the correct key from which to read - * the specific user's information from cache. - * - * Example: Your application may be partitioning the user's cache - * information for each user using the homeAccountId and thus - * this function would return the homeAccountId for - * the user in question - * - * @returns Promise - */ - getKey(): Promise; - /** - * This function should return the correct key being used to save each - * user's cache information to cache - given an AccountEntity - * - * Example: Your application may be partitioning the user's cache - * information for each user using the homeAccountId thus - * this function would return the homeAccountId from - * the provided AccountEntity - * - * @param accountEntity - AccountEntity - * @returns Promise - */ - extractKey(accountEntity: AccountEntity): Promise; -} -//# sourceMappingURL=IPartitionManager.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/cache/distributed/IPartitionManager.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/cache/distributed/IPartitionManager.d.ts.map deleted file mode 100644 index 245c91f..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/cache/distributed/IPartitionManager.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"IPartitionManager.d.ts","sourceRoot":"","sources":["../../../src/cache/distributed/IPartitionManager.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAExD;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAC9B;;;;;;;;;;OAUG;IACH,MAAM,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IAE1B;;;;;;;;;;;OAWG;IACH,UAAU,CAAC,aAAa,EAAE,aAAa,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;CAC7D"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/cache/serializer/Deserializer.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/cache/serializer/Deserializer.d.ts deleted file mode 100644 index 57c3510..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/cache/serializer/Deserializer.d.ts +++ /dev/null @@ -1,44 +0,0 @@ -import { AccountCache, IdTokenCache, AccessTokenCache, RefreshTokenCache, AppMetadataCache } from "@azure/msal-common/node"; -import { JsonCache, InMemoryCache, SerializedAccountEntity, SerializedIdTokenEntity, SerializedAccessTokenEntity, SerializedRefreshTokenEntity, SerializedAppMetadataEntity } from "./SerializerTypes.js"; -/** - * This class deserializes cache entities read from the file into in-memory object types defined internally - * @internal - */ -export declare class Deserializer { - /** - * Parse the JSON blob in memory and deserialize the content - * @param cachedJson - JSON blob cache - */ - static deserializeJSONBlob(jsonFile: string): JsonCache; - /** - * Deserializes accounts to AccountEntity objects - * @param accounts - accounts of type SerializedAccountEntity - */ - static deserializeAccounts(accounts: Record): AccountCache; - /** - * Deserializes id tokens to IdTokenEntity objects - * @param idTokens - credentials of type SerializedIdTokenEntity - */ - static deserializeIdTokens(idTokens: Record): IdTokenCache; - /** - * Deserializes access tokens to AccessTokenEntity objects - * @param accessTokens - access tokens of type SerializedAccessTokenEntity - */ - static deserializeAccessTokens(accessTokens: Record): AccessTokenCache; - /** - * Deserializes refresh tokens to RefreshTokenEntity objects - * @param refreshTokens - refresh tokens of type SerializedRefreshTokenEntity - */ - static deserializeRefreshTokens(refreshTokens: Record): RefreshTokenCache; - /** - * Deserializes appMetadata to AppMetaData objects - * @param appMetadata - app metadata of type SerializedAppMetadataEntity - */ - static deserializeAppMetadata(appMetadata: Record): AppMetadataCache; - /** - * Deserialize an inMemory Cache - * @param jsonCache - JSON blob cache - */ - static deserializeAllCache(jsonCache: JsonCache): InMemoryCache; -} -//# sourceMappingURL=Deserializer.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/cache/serializer/Deserializer.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/cache/serializer/Deserializer.d.ts.map deleted file mode 100644 index bfc9ec8..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/cache/serializer/Deserializer.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Deserializer.d.ts","sourceRoot":"","sources":["../../../src/cache/serializer/Deserializer.ts"],"names":[],"mappings":"AAKA,OAAO,EACH,YAAY,EACZ,YAAY,EACZ,gBAAgB,EAChB,iBAAiB,EACjB,gBAAgB,EAQnB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACH,SAAS,EACT,aAAa,EACb,uBAAuB,EACvB,uBAAuB,EACvB,2BAA2B,EAC3B,4BAA4B,EAC5B,2BAA2B,EAC9B,MAAM,sBAAsB,CAAC;AAE9B;;;GAGG;AACH,qBAAa,YAAY;IACrB;;;OAGG;IACH,MAAM,CAAC,mBAAmB,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS;IAKvD;;;OAGG;IACH,MAAM,CAAC,mBAAmB,CACtB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,uBAAuB,CAAC,GAClD,YAAY;IA+Bf;;;OAGG;IACH,MAAM,CAAC,mBAAmB,CACtB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,uBAAuB,CAAC,GAClD,YAAY;IAoBf;;;OAGG;IACH,MAAM,CAAC,uBAAuB,CAC1B,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,2BAA2B,CAAC,GAC1D,gBAAgB;IA+BnB;;;OAGG;IACH,MAAM,CAAC,wBAAwB,CAC3B,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,4BAA4B,CAAC,GAC5D,iBAAiB;IAuBpB;;;OAGG;IACH,MAAM,CAAC,sBAAsB,CACzB,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,2BAA2B,CAAC,GACzD,gBAAgB;IAgBnB;;;OAGG;IACH,MAAM,CAAC,mBAAmB,CAAC,SAAS,EAAE,SAAS,GAAG,aAAa;CAmBlE"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/cache/serializer/Deserializer.mjs b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/cache/serializer/Deserializer.mjs deleted file mode 100644 index 125e1cf..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/cache/serializer/Deserializer.mjs +++ /dev/null @@ -1,175 +0,0 @@ -/*! @azure/msal-node v2.16.3 2025-08-05 */ -'use strict'; -import { AccountEntity, CacheManager } from '@azure/msal-common/node'; - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * This class deserializes cache entities read from the file into in-memory object types defined internally - * @internal - */ -class Deserializer { - /** - * Parse the JSON blob in memory and deserialize the content - * @param cachedJson - JSON blob cache - */ - static deserializeJSONBlob(jsonFile) { - const deserializedCache = !jsonFile ? {} : JSON.parse(jsonFile); - return deserializedCache; - } - /** - * Deserializes accounts to AccountEntity objects - * @param accounts - accounts of type SerializedAccountEntity - */ - static deserializeAccounts(accounts) { - const accountObjects = {}; - if (accounts) { - Object.keys(accounts).map(function (key) { - const serializedAcc = accounts[key]; - const mappedAcc = { - homeAccountId: serializedAcc.home_account_id, - environment: serializedAcc.environment, - realm: serializedAcc.realm, - localAccountId: serializedAcc.local_account_id, - username: serializedAcc.username, - authorityType: serializedAcc.authority_type, - name: serializedAcc.name, - clientInfo: serializedAcc.client_info, - lastModificationTime: serializedAcc.last_modification_time, - lastModificationApp: serializedAcc.last_modification_app, - tenantProfiles: serializedAcc.tenantProfiles?.map((serializedTenantProfile) => { - return JSON.parse(serializedTenantProfile); - }), - }; - const account = new AccountEntity(); - CacheManager.toObject(account, mappedAcc); - accountObjects[key] = account; - }); - } - return accountObjects; - } - /** - * Deserializes id tokens to IdTokenEntity objects - * @param idTokens - credentials of type SerializedIdTokenEntity - */ - static deserializeIdTokens(idTokens) { - const idObjects = {}; - if (idTokens) { - Object.keys(idTokens).map(function (key) { - const serializedIdT = idTokens[key]; - const idToken = { - homeAccountId: serializedIdT.home_account_id, - environment: serializedIdT.environment, - credentialType: serializedIdT.credential_type, - clientId: serializedIdT.client_id, - secret: serializedIdT.secret, - realm: serializedIdT.realm, - }; - idObjects[key] = idToken; - }); - } - return idObjects; - } - /** - * Deserializes access tokens to AccessTokenEntity objects - * @param accessTokens - access tokens of type SerializedAccessTokenEntity - */ - static deserializeAccessTokens(accessTokens) { - const atObjects = {}; - if (accessTokens) { - Object.keys(accessTokens).map(function (key) { - const serializedAT = accessTokens[key]; - const accessToken = { - homeAccountId: serializedAT.home_account_id, - environment: serializedAT.environment, - credentialType: serializedAT.credential_type, - clientId: serializedAT.client_id, - secret: serializedAT.secret, - realm: serializedAT.realm, - target: serializedAT.target, - cachedAt: serializedAT.cached_at, - expiresOn: serializedAT.expires_on, - extendedExpiresOn: serializedAT.extended_expires_on, - refreshOn: serializedAT.refresh_on, - keyId: serializedAT.key_id, - tokenType: serializedAT.token_type, - requestedClaims: serializedAT.requestedClaims, - requestedClaimsHash: serializedAT.requestedClaimsHash, - userAssertionHash: serializedAT.userAssertionHash, - }; - atObjects[key] = accessToken; - }); - } - return atObjects; - } - /** - * Deserializes refresh tokens to RefreshTokenEntity objects - * @param refreshTokens - refresh tokens of type SerializedRefreshTokenEntity - */ - static deserializeRefreshTokens(refreshTokens) { - const rtObjects = {}; - if (refreshTokens) { - Object.keys(refreshTokens).map(function (key) { - const serializedRT = refreshTokens[key]; - const refreshToken = { - homeAccountId: serializedRT.home_account_id, - environment: serializedRT.environment, - credentialType: serializedRT.credential_type, - clientId: serializedRT.client_id, - secret: serializedRT.secret, - familyId: serializedRT.family_id, - target: serializedRT.target, - realm: serializedRT.realm, - }; - rtObjects[key] = refreshToken; - }); - } - return rtObjects; - } - /** - * Deserializes appMetadata to AppMetaData objects - * @param appMetadata - app metadata of type SerializedAppMetadataEntity - */ - static deserializeAppMetadata(appMetadata) { - const appMetadataObjects = {}; - if (appMetadata) { - Object.keys(appMetadata).map(function (key) { - const serializedAmdt = appMetadata[key]; - appMetadataObjects[key] = { - clientId: serializedAmdt.client_id, - environment: serializedAmdt.environment, - familyId: serializedAmdt.family_id, - }; - }); - } - return appMetadataObjects; - } - /** - * Deserialize an inMemory Cache - * @param jsonCache - JSON blob cache - */ - static deserializeAllCache(jsonCache) { - return { - accounts: jsonCache.Account - ? this.deserializeAccounts(jsonCache.Account) - : {}, - idTokens: jsonCache.IdToken - ? this.deserializeIdTokens(jsonCache.IdToken) - : {}, - accessTokens: jsonCache.AccessToken - ? this.deserializeAccessTokens(jsonCache.AccessToken) - : {}, - refreshTokens: jsonCache.RefreshToken - ? this.deserializeRefreshTokens(jsonCache.RefreshToken) - : {}, - appMetadata: jsonCache.AppMetadata - ? this.deserializeAppMetadata(jsonCache.AppMetadata) - : {}, - }; - } -} - -export { Deserializer }; -//# sourceMappingURL=Deserializer.mjs.map diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/cache/serializer/Deserializer.mjs.map b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/cache/serializer/Deserializer.mjs.map deleted file mode 100644 index b03ca9e..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/cache/serializer/Deserializer.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Deserializer.mjs","sources":["../../../src/cache/serializer/Deserializer.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;AAAA;;;AAGG;AA0BH;;;AAGG;MACU,YAAY,CAAA;AACrB;;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a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/cache/serializer/Serializer.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/cache/serializer/Serializer.d.ts deleted file mode 100644 index 43ffcfa..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/cache/serializer/Serializer.d.ts +++ /dev/null @@ -1,44 +0,0 @@ -import { AccountCache, IdTokenCache, AccessTokenCache, RefreshTokenCache, AppMetadataCache } from "@azure/msal-common/node"; -import { InMemoryCache, JsonCache, SerializedAccountEntity, SerializedIdTokenEntity, SerializedAccessTokenEntity, SerializedRefreshTokenEntity, SerializedAppMetadataEntity } from "./SerializerTypes.js"; -/** - * This class serializes cache entities to be saved into in-memory object types defined internally - * @internal - */ -export declare class Serializer { - /** - * serialize the JSON blob - * @param data - JSON blob cache - */ - static serializeJSONBlob(data: JsonCache): string; - /** - * Serialize Accounts - * @param accCache - cache of accounts - */ - static serializeAccounts(accCache: AccountCache): Record; - /** - * Serialize IdTokens - * @param idTCache - cache of ID tokens - */ - static serializeIdTokens(idTCache: IdTokenCache): Record; - /** - * Serializes AccessTokens - * @param atCache - cache of access tokens - */ - static serializeAccessTokens(atCache: AccessTokenCache): Record; - /** - * Serialize refreshTokens - * @param rtCache - cache of refresh tokens - */ - static serializeRefreshTokens(rtCache: RefreshTokenCache): Record; - /** - * Serialize amdtCache - * @param amdtCache - cache of app metadata - */ - static serializeAppMetadata(amdtCache: AppMetadataCache): Record; - /** - * Serialize the cache - * @param inMemCache - itemised cache read from the JSON - */ - static serializeAllCache(inMemCache: InMemoryCache): JsonCache; -} -//# sourceMappingURL=Serializer.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/cache/serializer/Serializer.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/cache/serializer/Serializer.d.ts.map deleted file mode 100644 index ae33995..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/cache/serializer/Serializer.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Serializer.d.ts","sourceRoot":"","sources":["../../../src/cache/serializer/Serializer.ts"],"names":[],"mappings":"AAKA,OAAO,EACH,YAAY,EACZ,YAAY,EACZ,gBAAgB,EAChB,iBAAiB,EACjB,gBAAgB,EACnB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACH,aAAa,EACb,SAAS,EACT,uBAAuB,EACvB,uBAAuB,EACvB,2BAA2B,EAC3B,4BAA4B,EAC5B,2BAA2B,EAC9B,MAAM,sBAAsB,CAAC;AAE9B;;;GAGG;AACH,qBAAa,UAAU;IACnB;;;OAGG;IACH,MAAM,CAAC,iBAAiB,CAAC,IAAI,EAAE,SAAS,GAAG,MAAM;IAIjD;;;OAGG;IACH,MAAM,CAAC,iBAAiB,CACpB,QAAQ,EAAE,YAAY,GACvB,MAAM,CAAC,MAAM,EAAE,uBAAuB,CAAC;IA0B1C;;;OAGG;IACH,MAAM,CAAC,iBAAiB,CACpB,QAAQ,EAAE,YAAY,GACvB,MAAM,CAAC,MAAM,EAAE,uBAAuB,CAAC;IAiB1C;;;OAGG;IACH,MAAM,CAAC,qBAAqB,CACxB,OAAO,EAAE,gBAAgB,GAC1B,MAAM,CAAC,MAAM,EAAE,2BAA2B,CAAC;IA2B9C;;;OAGG;IACH,MAAM,CAAC,sBAAsB,CACzB,OAAO,EAAE,iBAAiB,GAC3B,MAAM,CAAC,MAAM,EAAE,4BAA4B,CAAC;IAmB/C;;;OAGG;IACH,MAAM,CAAC,oBAAoB,CACvB,SAAS,EAAE,gBAAgB,GAC5B,MAAM,CAAC,MAAM,EAAE,2BAA2B,CAAC;IAc9C;;;OAGG;IACH,MAAM,CAAC,iBAAiB,CAAC,UAAU,EAAE,aAAa,GAAG,SAAS;CASjE"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/cache/serializer/Serializer.mjs b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/cache/serializer/Serializer.mjs deleted file mode 100644 index 7a2aaea..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/cache/serializer/Serializer.mjs +++ /dev/null @@ -1,146 +0,0 @@ -/*! @azure/msal-node v2.16.3 2025-08-05 */ -'use strict'; -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * This class serializes cache entities to be saved into in-memory object types defined internally - * @internal - */ -class Serializer { - /** - * serialize the JSON blob - * @param data - JSON blob cache - */ - static serializeJSONBlob(data) { - return JSON.stringify(data); - } - /** - * Serialize Accounts - * @param accCache - cache of accounts - */ - static serializeAccounts(accCache) { - const accounts = {}; - Object.keys(accCache).map(function (key) { - const accountEntity = accCache[key]; - accounts[key] = { - home_account_id: accountEntity.homeAccountId, - environment: accountEntity.environment, - realm: accountEntity.realm, - local_account_id: accountEntity.localAccountId, - username: accountEntity.username, - authority_type: accountEntity.authorityType, - name: accountEntity.name, - client_info: accountEntity.clientInfo, - last_modification_time: accountEntity.lastModificationTime, - last_modification_app: accountEntity.lastModificationApp, - tenantProfiles: accountEntity.tenantProfiles?.map((tenantProfile) => { - return JSON.stringify(tenantProfile); - }), - }; - }); - return accounts; - } - /** - * Serialize IdTokens - * @param idTCache - cache of ID tokens - */ - static serializeIdTokens(idTCache) { - const idTokens = {}; - Object.keys(idTCache).map(function (key) { - const idTEntity = idTCache[key]; - idTokens[key] = { - home_account_id: idTEntity.homeAccountId, - environment: idTEntity.environment, - credential_type: idTEntity.credentialType, - client_id: idTEntity.clientId, - secret: idTEntity.secret, - realm: idTEntity.realm, - }; - }); - return idTokens; - } - /** - * Serializes AccessTokens - * @param atCache - cache of access tokens - */ - static serializeAccessTokens(atCache) { - const accessTokens = {}; - Object.keys(atCache).map(function (key) { - const atEntity = atCache[key]; - accessTokens[key] = { - home_account_id: atEntity.homeAccountId, - environment: atEntity.environment, - credential_type: atEntity.credentialType, - client_id: atEntity.clientId, - secret: atEntity.secret, - realm: atEntity.realm, - target: atEntity.target, - cached_at: atEntity.cachedAt, - expires_on: atEntity.expiresOn, - extended_expires_on: atEntity.extendedExpiresOn, - refresh_on: atEntity.refreshOn, - key_id: atEntity.keyId, - token_type: atEntity.tokenType, - requestedClaims: atEntity.requestedClaims, - requestedClaimsHash: atEntity.requestedClaimsHash, - userAssertionHash: atEntity.userAssertionHash, - }; - }); - return accessTokens; - } - /** - * Serialize refreshTokens - * @param rtCache - cache of refresh tokens - */ - static serializeRefreshTokens(rtCache) { - const refreshTokens = {}; - Object.keys(rtCache).map(function (key) { - const rtEntity = rtCache[key]; - refreshTokens[key] = { - home_account_id: rtEntity.homeAccountId, - environment: rtEntity.environment, - credential_type: rtEntity.credentialType, - client_id: rtEntity.clientId, - secret: rtEntity.secret, - family_id: rtEntity.familyId, - target: rtEntity.target, - realm: rtEntity.realm, - }; - }); - return refreshTokens; - } - /** - * Serialize amdtCache - * @param amdtCache - cache of app metadata - */ - static serializeAppMetadata(amdtCache) { - const appMetadata = {}; - Object.keys(amdtCache).map(function (key) { - const amdtEntity = amdtCache[key]; - appMetadata[key] = { - client_id: amdtEntity.clientId, - environment: amdtEntity.environment, - family_id: amdtEntity.familyId, - }; - }); - return appMetadata; - } - /** - * Serialize the cache - * @param inMemCache - itemised cache read from the JSON - */ - static serializeAllCache(inMemCache) { - return { - Account: this.serializeAccounts(inMemCache.accounts), - IdToken: this.serializeIdTokens(inMemCache.idTokens), - AccessToken: this.serializeAccessTokens(inMemCache.accessTokens), - RefreshToken: this.serializeRefreshTokens(inMemCache.refreshTokens), - AppMetadata: this.serializeAppMetadata(inMemCache.appMetadata), - }; - } -} - -export { Serializer }; -//# sourceMappingURL=Serializer.mjs.map diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/cache/serializer/Serializer.mjs.map b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/cache/serializer/Serializer.mjs.map deleted file mode 100644 index aa88c10..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/cache/serializer/Serializer.mjs.map +++ /dev/null @@ -1 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AS,EAAE,UAAU,CAAC,QAAQ;aACjC,CAAC;AACN,SAAC,CAAC,CAAC;AAEH,QAAA,OAAO,WAAW,CAAC;KACtB;AAED;;;AAGG;IACH,OAAO,iBAAiB,CAAC,UAAyB,EAAA;QAC9C,OAAO;YACH,OAAO,EAAE,IAAI,CAAC,iBAAiB,CAAC,UAAU,CAAC,QAAQ,CAAC;YACpD,OAAO,EAAE,IAAI,CAAC,iBAAiB,CAAC,UAAU,CAAC,QAAQ,CAAC;YACpD,WAAW,EAAE,IAAI,CAAC,qBAAqB,CAAC,UAAU,CAAC,YAAY,CAAC;YAChE,YAAY,EAAE,IAAI,CAAC,sBAAsB,CAAC,UAAU,CAAC,aAAa,CAAC;YACnE,WAAW,EAAE,IAAI,CAAC,oBAAoB,CAAC,UAAU,CAAC,WAAW,CAAC;SACjE,CAAC;KACL;AACJ;;;;"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/cache/serializer/SerializerTypes.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/cache/serializer/SerializerTypes.d.ts deleted file mode 100644 index 08e528f..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/cache/serializer/SerializerTypes.d.ts +++ /dev/null @@ -1,103 +0,0 @@ -import { AccountCache, IdTokenCache, AccessTokenCache, RefreshTokenCache, AppMetadataCache, ValidCacheType } from "@azure/msal-common/node"; -/** - * Key value store for in-memory cache - * @public - */ -export type CacheKVStore = Record; -/** - * Cache format read from the cache blob provided to the configuration during app instantiation - * @public - */ -export type JsonCache = { - Account: Record; - IdToken: Record; - AccessToken: Record; - RefreshToken: Record; - AppMetadata: Record; -}; -/** - * Intermittent type to handle in-memory data objects with defined types - * @public - */ -export type InMemoryCache = { - accounts: AccountCache; - idTokens: IdTokenCache; - accessTokens: AccessTokenCache; - refreshTokens: RefreshTokenCache; - appMetadata: AppMetadataCache; -}; -/** - * Account type - * @public - */ -export type SerializedAccountEntity = { - home_account_id: string; - environment: string; - realm: string; - local_account_id: string; - username: string; - authority_type: string; - name?: string; - client_info?: string; - last_modification_time?: string; - last_modification_app?: string; - tenantProfiles?: string[]; -}; -/** - * Idtoken credential type - * @public - */ -export type SerializedIdTokenEntity = { - home_account_id: string; - environment: string; - credential_type: string; - client_id: string; - secret: string; - realm: string; -}; -/** - * Access token credential type - * @public - */ -export type SerializedAccessTokenEntity = { - home_account_id: string; - environment: string; - credential_type: string; - client_id: string; - secret: string; - realm: string; - target: string; - cached_at: string; - expires_on: string; - extended_expires_on?: string; - refresh_on?: string; - key_id?: string; - token_type?: string; - requestedClaims?: string; - requestedClaimsHash?: string; - userAssertionHash?: string; -}; -/** - * Refresh token credential type - * @public - */ -export type SerializedRefreshTokenEntity = { - home_account_id: string; - environment: string; - credential_type: string; - client_id: string; - secret: string; - family_id?: string; - target?: string; - realm?: string; -}; -/** - * AppMetadata type - * @public - */ -export type SerializedAppMetadataEntity = { - client_id: string; - environment: string; - family_id?: string; -}; -//# sourceMappingURL=SerializerTypes.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/cache/serializer/SerializerTypes.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/cache/serializer/SerializerTypes.d.ts.map deleted file mode 100644 index fb1079c..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/cache/serializer/SerializerTypes.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"SerializerTypes.d.ts","sourceRoot":"","sources":["../../../src/cache/serializer/SerializerTypes.ts"],"names":[],"mappings":"AAKA,OAAO,EACH,YAAY,EACZ,YAAY,EACZ,gBAAgB,EAChB,iBAAiB,EACjB,gBAAgB,EAChB,cAAc,EACjB,MAAM,yBAAyB,CAAC;AAEjC;;;GAGG;AACH,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;AAE1D;;;GAGG;AACH,MAAM,MAAM,SAAS,GAAG;IACpB,OAAO,E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2BAA2B,GAAG;IACtC,eAAe,EAAE,MAAM,CAAC;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,EAAE,MAAM,CAAC;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC9B,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,4BAA4B,GAAG;IACvC,eAAe,EAAE,MAAM,CAAC;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,EAAE,MAAM,CAAC;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,2BAA2B,GAAG;IACtC,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ClientApplication.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ClientApplication.d.ts deleted file mode 100644 index a7f2bf2..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ClientApplication.d.ts +++ /dev/null @@ -1,144 +0,0 @@ -import { ClientConfiguration, AuthenticationResult, BaseAuthRequest, Logger, ServerTelemetryManager, AzureRegionConfiguration, AzureCloudOptions, AuthorizationCodePayload, ClientAssertionCallback } from "@azure/msal-common/node"; -import { Configuration, NodeConfiguration } from "../config/Configuration.js"; -import { CryptoProvider } from "../crypto/CryptoProvider.js"; -import { NodeStorage } from "../cache/NodeStorage.js"; -import { TokenCache } from "../cache/TokenCache.js"; -import { ClientAssertion } from "./ClientAssertion.js"; -import { AuthorizationUrlRequest } from "../request/AuthorizationUrlRequest.js"; -import { AuthorizationCodeRequest } from "../request/AuthorizationCodeRequest.js"; -import { RefreshTokenRequest } from "../request/RefreshTokenRequest.js"; -import { SilentFlowRequest } from "../request/SilentFlowRequest.js"; -import { UsernamePasswordRequest } from "../request/UsernamePasswordRequest.js"; -/** - * Base abstract class for all ClientApplications - public and confidential - * @public - */ -export declare abstract class ClientApplication { - protected readonly cryptoProvider: CryptoProvider; - private tokenCache; - /** - * Platform storage object - */ - protected storage: NodeStorage; - /** - * Logger object to log the application flow - */ - protected logger: Logger; - /** - * Platform configuration initialized by the application - */ - protected config: NodeConfiguration; - /** - * Client assertion passed by the user for confidential client flows - */ - protected clientAssertion: ClientAssertion; - protected developerProvidedClientAssertion: string | ClientAssertionCallback; - /** - * Client secret passed by the user for confidential client flows - */ - protected clientSecret: string; - /** - * Constructor for the ClientApplication - */ - protected constructor(configuration: Configuration); - /** - * Creates the URL of the authorization request, letting the user input credentials and consent to the - * application. The URL targets the /authorize endpoint of the authority configured in the - * application object. - * - * Once the user inputs their credentials and consents, the authority will send a response to the redirect URI - * sent in the request and should contain an authorization code, which can then be used to acquire tokens via - * `acquireTokenByCode(AuthorizationCodeRequest)`. - */ - getAuthCodeUrl(request: AuthorizationUrlRequest): Promise; - /** - * Acquires a token by exchanging the Authorization Code received from the first step of OAuth2.0 - * Authorization Code flow. - * - * `getAuthCodeUrl(AuthorizationCodeUrlRequest)` can be used to create the URL for the first step of OAuth2.0 - * Authorization Code flow. Ensure that values for redirectUri and scopes in AuthorizationCodeUrlRequest and - * AuthorizationCodeRequest are the same. - */ - acquireTokenByCode(request: AuthorizationCodeRequest, authCodePayLoad?: AuthorizationCodePayload): Promise; - /** - * Acquires a token by exchanging the refresh token provided for a new set of tokens. - * - * This API is provided only for scenarios where you would like to migrate from ADAL to MSAL. Otherwise, it is - * recommended that you use `acquireTokenSilent()` for silent scenarios. When using `acquireTokenSilent()`, MSAL will - * handle the caching and refreshing of tokens automatically. - */ - acquireTokenByRefreshToken(request: RefreshTokenRequest): Promise; - /** - * Acquires a token silently when a user specifies the account the token is requested for. - * - * This API expects the user to provide an account object and looks into the cache to retrieve the token if present. - * There is also an optional "forceRefresh" boolean the user can send to bypass the cache for access_token and id_token. - * In case the refresh_token is expired or not found, an error is thrown - * and the guidance is for the user to call any interactive token acquisition API (eg: `acquireTokenByCode()`). - */ - acquireTokenSilent(request: SilentFlowRequest): Promise; - /** - * Acquires tokens with password grant by exchanging client applications username and password for credentials - * - * The latest OAuth 2.0 Security Best Current Practice disallows the password grant entirely. - * More details on this recommendation at https://tools.ietf.org/html/draft-ietf-oauth-security-topics-13#section-3.4 - * Microsoft's documentation and recommendations are at: - * https://docs.microsoft.com/en-us/azure/active-directory/develop/msal-authentication-flows#usernamepassword - * - * @param request - UsenamePasswordRequest - */ - acquireTokenByUsernamePassword(request: UsernamePasswordRequest): Promise; - /** - * Gets the token cache for the application. - */ - getTokenCache(): TokenCache; - /** - * Validates OIDC state by comparing the user cached state with the state received from the server. - * - * This API is provided for scenarios where you would use OAuth2.0 state parameter to mitigate against - * CSRF attacks. - * For more information about state, visit https://datatracker.ietf.org/doc/html/rfc6819#section-3.6. - * @param state - Unique GUID generated by the user that is cached by the user and sent to the server during the first leg of the flow - * @param cachedState - This string is sent back by the server with the authorization code - */ - protected validateState(state: string, cachedState: string): void; - /** - * Returns the logger instance - */ - getLogger(): Logger; - /** - * Replaces the default logger set in configurations with new Logger with new configurations - * @param logger - Logger instance - */ - setLogger(logger: Logger): void; - /** - * Builds the common configuration to be passed to the common component based on the platform configurarion - * @param authority - user passed authority in configuration - * @param serverTelemetryManager - initializes servertelemetry if passed - */ - protected buildOauthClientConfiguration(authority: string, requestCorrelationId: string, redirectUri: string, serverTelemetryManager?: ServerTelemetryManager, azureRegionConfiguration?: AzureRegionConfiguration, azureCloudOptions?: AzureCloudOptions): Promise; - private getClientAssertion; - /** - * Generates a request with the default scopes & generates a correlationId. - * @param authRequest - BaseAuthRequest for initialization - */ - protected initializeBaseRequest(authRequest: Partial): Promise; - /** - * Initializes the server telemetry payload - * @param apiId - Id for a specific request - * @param correlationId - GUID - * @param forceRefresh - boolean to indicate network call - */ - protected initializeServerTelemetryManager(apiId: number, correlationId: string, forceRefresh?: boolean): ServerTelemetryManager; - /** - * Create authority instance. If authority not passed in request, default to authority set on the application - * object. If no authority set in application object, then default to common authority. - * @param authorityString - authority from user configuration - */ - private createAuthority; - /** - * Clear the cache - */ - clearCache(): void; -} -//# sourceMappingURL=ClientApplication.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ClientApplication.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ClientApplication.d.ts.map deleted file mode 100644 index 8dde06b..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ClientApplication.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ClientApplication.d.ts","sourceRoot":"","sources":["../../src/client/ClientApplication.ts"],"names":[],"mappings":"AAKA,OAAO,EAEH,mBAAmB,EAEnB,oBAAoB,EAGpB,eAAe,EAEf,MAAM,EACN,sBAAsB,EAWtB,wBAAwB,EAExB,iBAAiB,EACjB,wBAAwB,EAQxB,uBAAuB,EAC1B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACH,aAAa,EAEb,iBAAiB,EACpB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,cAAc,EAAE,MAAM,6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,CAAC,oBAAoB,GAAG,IAAI,CAAC;IA0CvC;;;;;;;OAOG;IACG,kBAAkB,CACpB,OAAO,EAAE,iBAAiB,GAC3B,OAAO,CAAC,oBAAoB,CAAC;IAuChC;;;;;;;;;OASG;IACG,8BAA8B,CAChC,OAAO,EAAE,uBAAuB,GACjC,OAAO,CAAC,oBAAoB,GAAG,IAAI,CAAC;IAwCvC;;OAEG;IACH,aAAa,IAAI,UAAU;IAK3B;;;;;;;;OAQG;IACH,SAAS,CAAC,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,IAAI;IAUjE;;OAEG;IACH,SAAS,IAAI,MAAM;IAInB;;;OAGG;IACH,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAI/B;;;;OAIG;cACa,6BAA6B,CACzC,SAAS,EAAE,MAAM,EACjB,oBAAoB,EAAE,MAAM,EAC5B,WAAW,EAAE,MAAM,EACnB,sBAAsB,CAAC,EAAE,sBAAsB,EAC/C,wBAAwB,CAAC,EAAE,wBAAwB,EACnD,iBAAiB,CAAC,EAAE,iBAAiB,GACtC,OAAO,CAAC,mBAAmB,CAAC;YAsEjB,kBAAkB;IAyBhC;;;OAGG;cACa,qBAAqB,CACjC,WAAW,EAAE,OAAO,CAAC,eAAe,CAAC,GACtC,OAAO,CAAC,eAAe,CAAC;IA0C3B;;;;;OAKG;IACH,SAAS,CAAC,gCAAgC,CACtC,KAAK,EAAE,MAAM,EACb,aAAa,EAAE,MAAM,EACrB,YAAY,CAAC,EAAE,OAAO,GACvB,sBAAsB;IAWzB;;;;OAIG;YACW,eAAe;IAkC7B;;OAEG;IACH,UAAU,IAAI,IAAI;CAGrB"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ClientApplication.mjs b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ClientApplication.mjs deleted file mode 100644 index b882b5e..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ClientApplication.mjs +++ /dev/null @@ -1,351 +0,0 @@ -/*! @azure/msal-node v2.16.3 2025-08-05 */ -'use strict'; -import { Logger, buildStaticAuthorityOptions, AuthorizationCodeClient, AuthenticationScheme, ResponseMode, AuthError, RefreshTokenClient, SilentFlowClient, createClientAuthError, ClientAuthErrorCodes, Constants, getClientAssertion, StringUtils, OIDC_DEFAULT_SCOPES, ServerTelemetryManager, Authority, AuthorityFactory } from '@azure/msal-common/node'; -import { buildAppConfiguration } from '../config/Configuration.mjs'; -import { CryptoProvider } from '../crypto/CryptoProvider.mjs'; -import { NodeStorage } from '../cache/NodeStorage.mjs'; -import { ApiId, Constants as Constants$1 } from '../utils/Constants.mjs'; -import { TokenCache } from '../cache/TokenCache.mjs'; -import { ClientAssertion } from './ClientAssertion.mjs'; -import { name, version } from '../packageMetadata.mjs'; -import { NodeAuthError } from '../error/NodeAuthError.mjs'; -import { UsernamePasswordClient } from './UsernamePasswordClient.mjs'; - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * Base abstract class for all ClientApplications - public and confidential - * @public - */ -class ClientApplication { - /** - * Constructor for the ClientApplication - */ - constructor(configuration) { - this.config = buildAppConfiguration(configuration); - this.cryptoProvider = new CryptoProvider(); - this.logger = new Logger(this.config.system.loggerOptions, name, version); - this.storage = new NodeStorage(this.logger, this.config.auth.clientId, this.cryptoProvider, buildStaticAuthorityOptions(this.config.auth)); - this.tokenCache = new TokenCache(this.storage, this.logger, this.config.cache.cachePlugin); - } - /** - * Creates the URL of the authorization request, letting the user input credentials and consent to the - * application. The URL targets the /authorize endpoint of the authority configured in the - * application object. - * - * Once the user inputs their credentials and consents, the authority will send a response to the redirect URI - * sent in the request and should contain an authorization code, which can then be used to acquire tokens via - * `acquireTokenByCode(AuthorizationCodeRequest)`. - */ - async getAuthCodeUrl(request) { - this.logger.info("getAuthCodeUrl called", request.correlationId); - const validRequest = { - ...request, - ...(await this.initializeBaseRequest(request)), - responseMode: request.responseMode || ResponseMode.QUERY, - authenticationScheme: AuthenticationScheme.BEARER, - }; - const authClientConfig = await this.buildOauthClientConfiguration(validRequest.authority, validRequest.correlationId, validRequest.redirectUri, undefined, undefined, request.azureCloudOptions); - const authorizationCodeClient = new AuthorizationCodeClient(authClientConfig); - this.logger.verbose("Auth code client created", validRequest.correlationId); - return authorizationCodeClient.getAuthCodeUrl(validRequest); - } - /** - * Acquires a token by exchanging the Authorization Code received from the first step of OAuth2.0 - * Authorization Code flow. - * - * `getAuthCodeUrl(AuthorizationCodeUrlRequest)` can be used to create the URL for the first step of OAuth2.0 - * Authorization Code flow. Ensure that values for redirectUri and scopes in AuthorizationCodeUrlRequest and - * AuthorizationCodeRequest are the same. - */ - async acquireTokenByCode(request, authCodePayLoad) { - this.logger.info("acquireTokenByCode called"); - if (request.state && authCodePayLoad) { - this.logger.info("acquireTokenByCode - validating state"); - this.validateState(request.state, authCodePayLoad.state || ""); - // eslint-disable-next-line no-param-reassign - authCodePayLoad = { ...authCodePayLoad, state: "" }; - } - const validRequest = { - ...request, - ...(await this.initializeBaseRequest(request)), - authenticationScheme: AuthenticationScheme.BEARER, - }; - const serverTelemetryManager = this.initializeServerTelemetryManager(ApiId.acquireTokenByCode, validRequest.correlationId); - try { - const authClientConfig = await this.buildOauthClientConfiguration(validRequest.authority, validRequest.correlationId, validRequest.redirectUri, serverTelemetryManager, undefined, request.azureCloudOptions); - const authorizationCodeClient = new AuthorizationCodeClient(authClientConfig); - this.logger.verbose("Auth code client created", validRequest.correlationId); - return await authorizationCodeClient.acquireToken(validRequest, authCodePayLoad); - } - catch (e) { - if (e instanceof AuthError) { - e.setCorrelationId(validRequest.correlationId); - } - serverTelemetryManager.cacheFailedRequest(e); - throw e; - } - } - /** - * Acquires a token by exchanging the refresh token provided for a new set of tokens. - * - * This API is provided only for scenarios where you would like to migrate from ADAL to MSAL. Otherwise, it is - * recommended that you use `acquireTokenSilent()` for silent scenarios. When using `acquireTokenSilent()`, MSAL will - * handle the caching and refreshing of tokens automatically. - */ - async acquireTokenByRefreshToken(request) { - this.logger.info("acquireTokenByRefreshToken called", request.correlationId); - const validRequest = { - ...request, - ...(await this.initializeBaseRequest(request)), - authenticationScheme: AuthenticationScheme.BEARER, - }; - const serverTelemetryManager = this.initializeServerTelemetryManager(ApiId.acquireTokenByRefreshToken, validRequest.correlationId); - try { - const refreshTokenClientConfig = await this.buildOauthClientConfiguration(validRequest.authority, validRequest.correlationId, validRequest.redirectUri || "", serverTelemetryManager, undefined, request.azureCloudOptions); - const refreshTokenClient = new RefreshTokenClient(refreshTokenClientConfig); - this.logger.verbose("Refresh token client created", validRequest.correlationId); - return await refreshTokenClient.acquireToken(validRequest); - } - catch (e) { - if (e instanceof AuthError) { - e.setCorrelationId(validRequest.correlationId); - } - serverTelemetryManager.cacheFailedRequest(e); - throw e; - } - } - /** - * Acquires a token silently when a user specifies the account the token is requested for. - * - * This API expects the user to provide an account object and looks into the cache to retrieve the token if present. - * There is also an optional "forceRefresh" boolean the user can send to bypass the cache for access_token and id_token. - * In case the refresh_token is expired or not found, an error is thrown - * and the guidance is for the user to call any interactive token acquisition API (eg: `acquireTokenByCode()`). - */ - async acquireTokenSilent(request) { - const validRequest = { - ...request, - ...(await this.initializeBaseRequest(request)), - forceRefresh: request.forceRefresh || false, - }; - const serverTelemetryManager = this.initializeServerTelemetryManager(ApiId.acquireTokenSilent, validRequest.correlationId, validRequest.forceRefresh); - try { - const silentFlowClientConfig = await this.buildOauthClientConfiguration(validRequest.authority, validRequest.correlationId, validRequest.redirectUri || "", serverTelemetryManager, undefined, request.azureCloudOptions); - const silentFlowClient = new SilentFlowClient(silentFlowClientConfig); - this.logger.verbose("Silent flow client created", validRequest.correlationId); - return await silentFlowClient.acquireToken(validRequest); - } - catch (e) { - if (e instanceof AuthError) { - e.setCorrelationId(validRequest.correlationId); - } - serverTelemetryManager.cacheFailedRequest(e); - throw e; - } - } - /** - * Acquires tokens with password grant by exchanging client applications username and password for credentials - * - * The latest OAuth 2.0 Security Best Current Practice disallows the password grant entirely. - * More details on this recommendation at https://tools.ietf.org/html/draft-ietf-oauth-security-topics-13#section-3.4 - * Microsoft's documentation and recommendations are at: - * https://docs.microsoft.com/en-us/azure/active-directory/develop/msal-authentication-flows#usernamepassword - * - * @param request - UsenamePasswordRequest - */ - async acquireTokenByUsernamePassword(request) { - this.logger.info("acquireTokenByUsernamePassword called", request.correlationId); - const validRequest = { - ...request, - ...(await this.initializeBaseRequest(request)), - }; - const serverTelemetryManager = this.initializeServerTelemetryManager(ApiId.acquireTokenByUsernamePassword, validRequest.correlationId); - try { - const usernamePasswordClientConfig = await this.buildOauthClientConfiguration(validRequest.authority, validRequest.correlationId, "", serverTelemetryManager, undefined, request.azureCloudOptions); - const usernamePasswordClient = new UsernamePasswordClient(usernamePasswordClientConfig); - this.logger.verbose("Username password client created", validRequest.correlationId); - return await usernamePasswordClient.acquireToken(validRequest); - } - catch (e) { - if (e instanceof AuthError) { - e.setCorrelationId(validRequest.correlationId); - } - serverTelemetryManager.cacheFailedRequest(e); - throw e; - } - } - /** - * Gets the token cache for the application. - */ - getTokenCache() { - this.logger.info("getTokenCache called"); - return this.tokenCache; - } - /** - * Validates OIDC state by comparing the user cached state with the state received from the server. - * - * This API is provided for scenarios where you would use OAuth2.0 state parameter to mitigate against - * CSRF attacks. - * For more information about state, visit https://datatracker.ietf.org/doc/html/rfc6819#section-3.6. - * @param state - Unique GUID generated by the user that is cached by the user and sent to the server during the first leg of the flow - * @param cachedState - This string is sent back by the server with the authorization code - */ - validateState(state, cachedState) { - if (!state) { - throw NodeAuthError.createStateNotFoundError(); - } - if (state !== cachedState) { - throw createClientAuthError(ClientAuthErrorCodes.stateMismatch); - } - } - /** - * Returns the logger instance - */ - getLogger() { - return this.logger; - } - /** - * Replaces the default logger set in configurations with new Logger with new configurations - * @param logger - Logger instance - */ - setLogger(logger) { - this.logger = logger; - } - /** - * Builds the common configuration to be passed to the common component based on the platform configurarion - * @param authority - user passed authority in configuration - * @param serverTelemetryManager - initializes servertelemetry if passed - */ - async buildOauthClientConfiguration(authority, requestCorrelationId, redirectUri, serverTelemetryManager, azureRegionConfiguration, azureCloudOptions) { - this.logger.verbose("buildOauthClientConfiguration called", requestCorrelationId); - // precedence - azureCloudInstance + tenant >> authority and request >> config - const userAzureCloudOptions = azureCloudOptions - ? azureCloudOptions - : this.config.auth.azureCloudOptions; - // using null assertion operator as we ensure that all config values have default values in buildConfiguration() - const discoveredAuthority = await this.createAuthority(authority, requestCorrelationId, azureRegionConfiguration, userAzureCloudOptions); - this.logger.info(`Building oauth client configuration with the following authority: ${discoveredAuthority.tokenEndpoint}.`, requestCorrelationId); - serverTelemetryManager?.updateRegionDiscoveryMetadata(discoveredAuthority.regionDiscoveryMetadata); - const clientConfiguration = { - authOptions: { - clientId: this.config.auth.clientId, - authority: discoveredAuthority, - clientCapabilities: this.config.auth.clientCapabilities, - redirectUri, - }, - loggerOptions: { - logLevel: this.config.system.loggerOptions.logLevel, - loggerCallback: this.config.system.loggerOptions.loggerCallback, - piiLoggingEnabled: this.config.system.loggerOptions.piiLoggingEnabled, - correlationId: requestCorrelationId, - }, - cacheOptions: { - claimsBasedCachingEnabled: this.config.cache.claimsBasedCachingEnabled, - }, - cryptoInterface: this.cryptoProvider, - networkInterface: this.config.system.networkClient, - storageInterface: this.storage, - serverTelemetryManager: serverTelemetryManager, - clientCredentials: { - clientSecret: this.clientSecret, - clientAssertion: await this.getClientAssertion(discoveredAuthority), - }, - libraryInfo: { - sku: Constants$1.MSAL_SKU, - version: version, - cpu: process.arch || Constants.EMPTY_STRING, - os: process.platform || Constants.EMPTY_STRING, - }, - telemetry: this.config.telemetry, - persistencePlugin: this.config.cache.cachePlugin, - serializableCache: this.tokenCache, - }; - return clientConfiguration; - } - async getClientAssertion(authority) { - if (this.developerProvidedClientAssertion) { - this.clientAssertion = ClientAssertion.fromAssertion(await getClientAssertion(this.developerProvidedClientAssertion, this.config.auth.clientId, authority.tokenEndpoint)); - } - return (this.clientAssertion && { - assertion: this.clientAssertion.getJwt(this.cryptoProvider, this.config.auth.clientId, authority.tokenEndpoint), - assertionType: Constants$1.JWT_BEARER_ASSERTION_TYPE, - }); - } - /** - * Generates a request with the default scopes & generates a correlationId. - * @param authRequest - BaseAuthRequest for initialization - */ - async initializeBaseRequest(authRequest) { - this.logger.verbose("initializeRequestScopes called", authRequest.correlationId); - // Default authenticationScheme to Bearer, log that POP isn't supported yet - if (authRequest.authenticationScheme && - authRequest.authenticationScheme === AuthenticationScheme.POP) { - this.logger.verbose("Authentication Scheme 'pop' is not supported yet, setting Authentication Scheme to 'Bearer' for request", authRequest.correlationId); - } - authRequest.authenticationScheme = AuthenticationScheme.BEARER; - // Set requested claims hash if claims-based caching is enabled and claims were requested - if (this.config.cache.claimsBasedCachingEnabled && - authRequest.claims && - // Checks for empty stringified object "{}" which doesn't qualify as requested claims - !StringUtils.isEmptyObj(authRequest.claims)) { - authRequest.requestedClaimsHash = - await this.cryptoProvider.hashString(authRequest.claims); - } - return { - ...authRequest, - scopes: [ - ...((authRequest && authRequest.scopes) || []), - ...OIDC_DEFAULT_SCOPES, - ], - correlationId: (authRequest && authRequest.correlationId) || - this.cryptoProvider.createNewGuid(), - authority: authRequest.authority || this.config.auth.authority, - }; - } - /** - * Initializes the server telemetry payload - * @param apiId - Id for a specific request - * @param correlationId - GUID - * @param forceRefresh - boolean to indicate network call - */ - initializeServerTelemetryManager(apiId, correlationId, forceRefresh) { - const telemetryPayload = { - clientId: this.config.auth.clientId, - correlationId: correlationId, - apiId: apiId, - forceRefresh: forceRefresh || false, - }; - return new ServerTelemetryManager(telemetryPayload, this.storage); - } - /** - * Create authority instance. If authority not passed in request, default to authority set on the application - * object. If no authority set in application object, then default to common authority. - * @param authorityString - authority from user configuration - */ - async createAuthority(authorityString, requestCorrelationId, azureRegionConfiguration, azureCloudOptions) { - this.logger.verbose("createAuthority called", requestCorrelationId); - // build authority string based on auth params - azureCloudInstance is prioritized if provided - const authorityUrl = Authority.generateAuthority(authorityString, azureCloudOptions); - const authorityOptions = { - protocolMode: this.config.auth.protocolMode, - knownAuthorities: this.config.auth.knownAuthorities, - cloudDiscoveryMetadata: this.config.auth.cloudDiscoveryMetadata, - authorityMetadata: this.config.auth.authorityMetadata, - azureRegionConfiguration, - skipAuthorityMetadataCache: this.config.auth.skipAuthorityMetadataCache, - }; - return AuthorityFactory.createDiscoveredInstance(authorityUrl, this.config.system.networkClient, this.storage, authorityOptions, this.logger, requestCorrelationId); - } - /** - * Clear the cache - */ - clearCache() { - this.storage.clear(); - } -} - -export { ClientApplication }; -//# sourceMappingURL=ClientApplication.mjs.map diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ClientApplication.mjs.map b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ClientApplication.mjs.map deleted file mode 100644 index a74cd5e..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ClientApplication.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ClientApplication.mjs","sources":["../../src/client/ClientApplication.ts"],"sourcesContent":[null],"names":["NodeConstants"],"mappings":";;;;;;;;;;;;;AAAA;;;AAGG;AAuDH;;;AAGG;MACmB,iBAAiB,CAAA;AA4BnC;;AAEG;AACH,IAAA,WAAA,CAAsB,aAA4B,EAAA;AAC9C,QAAA,IAAI,CAAC,MAAM,GAAG,qBAAqB,CAAC,aAAa,CAAC,CAAC;AACnD,QAAA,IAAI,CAAC,cAAc,GAAG,IAAI,cAAc,EAAE,CAAC;AAC3C,QAAA,IAAI,CAAC,MAAM,GAAG,IAAI,MAAM,CACpB,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,aAAa,EAChC,IAAI,EACJ,OAAO,CACV,CAAC;AACF,QAAA,IAAI,CAAC,OAAO,GAAG,IAAI,WAAW,CAC1B,IAAI,CAAC,MAAM,EACX,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,EACzB,IAAI,CAAC,cAAc,EACnB,2BAA2B,CAAC,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BAAgB,CAAC,wBAAwB,CAC5C,YAAY,EACZ,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,aAAa,EAChC,IAAI,CAAC,OAAO,EACZ,gBAAgB,EAChB,IAAI,CAAC,MAAM,EACX,oBAAoB,CACvB,CAAC;KACL;AAED;;AAEG;IACH,UAAU,GAAA;AACN,QAAA,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;KACxB;AACJ;;;;"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ClientAssertion.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ClientAssertion.d.ts deleted file mode 100644 index 6583130..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ClientAssertion.d.ts +++ /dev/null @@ -1,56 +0,0 @@ -import { CryptoProvider } from "../crypto/CryptoProvider.js"; -/** - * Client assertion of type jwt-bearer used in confidential client flows - * @public - */ -export declare class ClientAssertion { - private jwt; - private privateKey; - private thumbprint; - private useSha256; - private expirationTime; - private issuer; - private jwtAudience; - private publicCertificate; - /** - * Initialize the ClientAssertion class from the clientAssertion passed by the user - * @param assertion - refer https://tools.ietf.org/html/rfc7521 - */ - static fromAssertion(assertion: string): ClientAssertion; - /** - * @deprecated Use fromCertificateWithSha256Thumbprint instead, with a SHA-256 thumprint - * Initialize the ClientAssertion class from the certificate passed by the user - * @param thumbprint - identifier of a certificate - * @param privateKey - secret key - * @param publicCertificate - electronic document provided to prove the ownership of the public key - */ - static fromCertificate(thumbprint: string, privateKey: string, publicCertificate?: string): ClientAssertion; - /** - * Initialize the ClientAssertion class from the certificate passed by the user - * @param thumbprint - identifier of a certificate - * @param privateKey - secret key - * @param publicCertificate - electronic document provided to prove the ownership of the public key - */ - static fromCertificateWithSha256Thumbprint(thumbprint: string, privateKey: string, publicCertificate?: string): ClientAssertion; - /** - * Update JWT for certificate based clientAssertion, if passed by the user, uses it as is - * @param cryptoProvider - library's crypto helper - * @param issuer - iss claim - * @param jwtAudience - aud claim - */ - getJwt(cryptoProvider: CryptoProvider, issuer: string, jwtAudience: string): string; - /** - * JWT format and required claims specified: https://tools.ietf.org/html/rfc7523#section-3 - */ - private createJwt; - /** - * Utility API to check expiration - */ - private isExpired; - /** - * Extracts the raw certs from a given certificate string and returns them in an array. - * @param publicCertificate - electronic document provided to prove the ownership of the public key - */ - static parseCertificate(publicCertificate: string): Array; -} -//# sourceMappingURL=ClientAssertion.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ClientAssertion.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ClientAssertion.d.ts.map deleted file mode 100644 index bc76d29..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ClientAssertion.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ClientAssertion.d.ts","sourceRoot":"","sources":["../../src/client/ClientAssertion.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAI7D;;;GAGG;AACH,qBAAa,eAAe;IACxB,OAAO,CAAC,GAAG,CAAS;IACpB,OAAO,CAAC,UAAU,CAAS;IAC3B,OAAO,CAAC,UAAU,CAAS;IAC3B,OAAO,CAAC,SAAS,CAAU;IAC3B,OAAO,CAAC,cAAc,CAAS;IAC/B,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,WAAW,CAAS;IAC5B,OAAO,CAAC,iBAAiB,CAAgB;IAEzC;;;OAGG;WACW,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,eAAe;IAM/D;;;;;;OAMG;WACW,eAAe,CACzB,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,MAAM,EAClB,iBAAiB,CAAC,EAAE,MAAM,GAC3B,eAAe;IAYlB;;;;;OAKG;WACW,mCAAmC,CAC7C,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,MAAM,EAClB,iBAAiB,CAAC,EAAE,MAAM,GAC3B,eAAe;IAYlB;;;;;OAKG;IACI,MAAM,CACT,cAAc,EAAE,cAAc,EAC9B,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,MAAM,GACpB,MAAM;IA0BT;;OAEG;IACH,OAAO,CAAC,SAAS;IA8CjB;;OAEG;IACH,OAAO,CAAC,SAAS;IAIjB;;;OAGG;WACW,gBAAgB,CAAC,iBAAiB,EAAE,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC;CAoB3E"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ClientAssertion.mjs b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ClientAssertion.mjs deleted file mode 100644 index d636aba..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ClientAssertion.mjs +++ /dev/null @@ -1,153 +0,0 @@ -/*! @azure/msal-node v2.16.3 2025-08-05 */ -'use strict'; -import jwt from 'jsonwebtoken'; -import { createClientAuthError, ClientAuthErrorCodes, TimeUtils, Constants } from '@azure/msal-common/node'; -import { EncodingUtils } from '../utils/EncodingUtils.mjs'; -import { JwtConstants } from '../utils/Constants.mjs'; - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * Client assertion of type jwt-bearer used in confidential client flows - * @public - */ -class ClientAssertion { - /** - * Initialize the ClientAssertion class from the clientAssertion passed by the user - * @param assertion - refer https://tools.ietf.org/html/rfc7521 - */ - static fromAssertion(assertion) { - const clientAssertion = new ClientAssertion(); - clientAssertion.jwt = assertion; - return clientAssertion; - } - /** - * @deprecated Use fromCertificateWithSha256Thumbprint instead, with a SHA-256 thumprint - * Initialize the ClientAssertion class from the certificate passed by the user - * @param thumbprint - identifier of a certificate - * @param privateKey - secret key - * @param publicCertificate - electronic document provided to prove the ownership of the public key - */ - static fromCertificate(thumbprint, privateKey, publicCertificate) { - const clientAssertion = new ClientAssertion(); - clientAssertion.privateKey = privateKey; - clientAssertion.thumbprint = thumbprint; - clientAssertion.useSha256 = false; - if (publicCertificate) { - clientAssertion.publicCertificate = - this.parseCertificate(publicCertificate); - } - return clientAssertion; - } - /** - * Initialize the ClientAssertion class from the certificate passed by the user - * @param thumbprint - identifier of a certificate - * @param privateKey - secret key - * @param publicCertificate - electronic document provided to prove the ownership of the public key - */ - static fromCertificateWithSha256Thumbprint(thumbprint, privateKey, publicCertificate) { - const clientAssertion = new ClientAssertion(); - clientAssertion.privateKey = privateKey; - clientAssertion.thumbprint = thumbprint; - clientAssertion.useSha256 = true; - if (publicCertificate) { - clientAssertion.publicCertificate = - this.parseCertificate(publicCertificate); - } - return clientAssertion; - } - /** - * Update JWT for certificate based clientAssertion, if passed by the user, uses it as is - * @param cryptoProvider - library's crypto helper - * @param issuer - iss claim - * @param jwtAudience - aud claim - */ - getJwt(cryptoProvider, issuer, jwtAudience) { - // if assertion was created from certificate, check if jwt is expired and create new one. - if (this.privateKey && this.thumbprint) { - if (this.jwt && - !this.isExpired() && - issuer === this.issuer && - jwtAudience === this.jwtAudience) { - return this.jwt; - } - return this.createJwt(cryptoProvider, issuer, jwtAudience); - } - /* - * if assertion was created by caller, then we just append it. It is up to the caller to - * ensure that it contains necessary claims and that it is not expired. - */ - if (this.jwt) { - return this.jwt; - } - throw createClientAuthError(ClientAuthErrorCodes.invalidAssertion); - } - /** - * JWT format and required claims specified: https://tools.ietf.org/html/rfc7523#section-3 - */ - createJwt(cryptoProvider, issuer, jwtAudience) { - this.issuer = issuer; - this.jwtAudience = jwtAudience; - const issuedAt = TimeUtils.nowSeconds(); - this.expirationTime = issuedAt + 600; - const algorithm = this.useSha256 - ? JwtConstants.PSS_256 - : JwtConstants.RSA_256; - const header = { - alg: algorithm, - }; - const thumbprintHeader = this.useSha256 - ? JwtConstants.X5T_256 - : JwtConstants.X5T; - Object.assign(header, { - [thumbprintHeader]: EncodingUtils.base64EncodeUrl(this.thumbprint, "hex"), - }); - if (this.publicCertificate) { - Object.assign(header, { - [JwtConstants.X5C]: this.publicCertificate, - }); - } - const payload = { - [JwtConstants.AUDIENCE]: this.jwtAudience, - [JwtConstants.EXPIRATION_TIME]: this.expirationTime, - [JwtConstants.ISSUER]: this.issuer, - [JwtConstants.SUBJECT]: this.issuer, - [JwtConstants.NOT_BEFORE]: issuedAt, - [JwtConstants.JWT_ID]: cryptoProvider.createNewGuid(), - }; - this.jwt = jwt.sign(payload, this.privateKey, { header }); - return this.jwt; - } - /** - * Utility API to check expiration - */ - isExpired() { - return this.expirationTime < TimeUtils.nowSeconds(); - } - /** - * Extracts the raw certs from a given certificate string and returns them in an array. - * @param publicCertificate - electronic document provided to prove the ownership of the public key - */ - static parseCertificate(publicCertificate) { - /** - * This is regex to identify the certs in a given certificate string. - * We want to look for the contents between the BEGIN and END certificate strings, without the associated newlines. - * The information in parens "(.+?)" is the capture group to represent the cert we want isolated. - * "." means any string character, "+" means match 1 or more times, and "?" means the shortest match. - * The "g" at the end of the regex means search the string globally, and the "s" enables the "." to match newlines. - */ - const regexToFindCerts = /-----BEGIN CERTIFICATE-----\r*\n(.+?)\r*\n-----END CERTIFICATE-----/gs; - const certs = []; - let matches; - while ((matches = regexToFindCerts.exec(publicCertificate)) !== null) { - // matches[1] represents the first parens capture group in the regex. - certs.push(matches[1].replace(/\r*\n/g, Constants.EMPTY_STRING)); - } - return certs; - } -} - -export { ClientAssertion }; -//# sourceMappingURL=ClientAssertion.mjs.map diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ClientAssertion.mjs.map b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ClientAssertion.mjs.map deleted file mode 100644 index 84ac2c4..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ClientAssertion.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ClientAssertion.mjs","sources":["../../src/client/ClientAssertion.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;AAAA;;;AAGG;AAaH;;;AAGG;MACU,eAAe,CAAA;AAUxB;;;AAGG;IACI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AAC,CAAC;AACpE,SAAA;AAED,QAAA,OAAO,KAAK,CAAC;KAChB;AACJ;;;;"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ClientCredentialClient.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ClientCredentialClient.d.ts deleted file mode 100644 index 16930ec..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ClientCredentialClient.d.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { AuthenticationResult, Authority, BaseClient, CacheManager, CacheOutcome, ClientConfiguration, CommonClientCredentialRequest, IAppTokenProvider, ICrypto, ServerTelemetryManager } from "@azure/msal-common/node"; -import { ManagedIdentityConfiguration } from "../config/Configuration.js"; -/** - * OAuth2.0 client credential grant - * @public - */ -export declare class ClientCredentialClient extends BaseClient { - private readonly appTokenProvider?; - constructor(configuration: ClientConfiguration, appTokenProvider?: IAppTokenProvider); - /** - * Public API to acquire a token with ClientCredential Flow for Confidential clients - * @param request - CommonClientCredentialRequest provided by the developer - */ - acquireToken(request: CommonClientCredentialRequest): Promise; - /** - * looks up cache if the tokens are cached already - */ - getCachedAuthenticationResult(request: CommonClientCredentialRequest, config: ClientConfiguration | ManagedIdentityConfiguration, cryptoUtils: ICrypto, authority: Authority, cacheManager: CacheManager, serverTelemetryManager?: ServerTelemetryManager | null): Promise<[AuthenticationResult | null, CacheOutcome]>; - /** - * Reads access token from the cache - */ - private readAccessTokenFromCache; - /** - * Makes a network call to request the token from the service - * @param request - CommonClientCredentialRequest provided by the developer - * @param authority - authority object - */ - private executeTokenRequest; - /** - * generate the request to the server in the acceptable format - * @param request - CommonClientCredentialRequest provided by the developer - */ - private createTokenRequestBody; -} -//# sourceMappingURL=ClientCredentialClient.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ClientCredentialClient.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ClientCredentialClient.d.ts.map deleted file mode 100644 index 3f873b5..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ClientCredentialClient.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ClientCredentialClient.d.ts","sourceRoot":"","sources":["../../src/client/ClientCredentialClient.ts"],"names":[],"mappings":"AAKA,OAAO,EAEH,oBAAoB,EAEpB,SAAS,EACT,UAAU,EACV,YAAY,EACZ,YAAY,EAEZ,mBAAmB,EACnB,6BAA6B,EAM7B,iBAAiB,EACjB,OAAO,EAMP,sBAAsB,EAQzB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACH,4BAA4B,EAE/B,MAAM,4BAA4B,CAAC;AAEpC;;;GAGG;AACH,qBAAa,sBAAuB,SAAQ,UAAU;IAClD,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAC,CAAoB;gBAGlD,aAAa,EAAE,mBAAmB,EAClC,gBAAgB,CAAC,EAAE,iBAAiB;IAMxC;;;OAGG;IACU,YAAY,CACrB,OAAO,EAAE,6BAA6B,GACvC,OAAO,CAAC,oBAAoB,GAAG,IAAI,CAAC;IAsCvC;;OAEG;IACU,6BAA6B,CACtC,OAAO,EAAE,6BAA6B,EACtC,MAAM,EAAE,mBAAmB,GAAG,4BAA4B,EAC1D,WAAW,EAAE,OAAO,EACpB,SAAS,EAAE,SAAS,EACpB,YAAY,EAAE,YAAY,EAC1B,sBAAsB,CAAC,EAAE,sBAAsB,GAAG,IAAI,GACvD,OAAO,CAAC,CAAC,oBAAoB,GAAG,IAAI,EAAE,YAAY,CAAC,CAAC;IA4FvD;;OAEG;IACH,OAAO,CAAC,wBAAwB;IA+BhC;;;;OAIG;YACW,mBAAmB;IA6FjC;;;OAGG;YACW,sBAAsB;CAgEvC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ClientCredentialClient.mjs b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ClientCredentialClient.mjs deleted file mode 100644 index aaa8358..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ClientCredentialClient.mjs +++ /dev/null @@ -1,202 +0,0 @@ -/*! @azure/msal-node v2.16.3 2025-08-05 */ -'use strict'; -import { BaseClient, CacheOutcome, TokenCacheContext, ScopeSet, TimeUtils, DEFAULT_TOKEN_RENEWAL_OFFSET_SEC, ResponseHandler, CredentialType, Constants, createClientAuthError, ClientAuthErrorCodes, UrlString, RequestParameterBuilder, GrantType, getClientAssertion, StringUtils, AuthenticationScheme } from '@azure/msal-common/node'; - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * OAuth2.0 client credential grant - * @public - */ -class ClientCredentialClient extends BaseClient { - constructor(configuration, appTokenProvider) { - super(configuration); - this.appTokenProvider = appTokenProvider; - } - /** - * Public API to acquire a token with ClientCredential Flow for Confidential clients - * @param request - CommonClientCredentialRequest provided by the developer - */ - async acquireToken(request) { - if (request.skipCache || request.claims) { - return this.executeTokenRequest(request, this.authority); - } - const [cachedAuthenticationResult, lastCacheOutcome] = await this.getCachedAuthenticationResult(request, this.config, this.cryptoUtils, this.authority, this.cacheManager, this.serverTelemetryManager); - if (cachedAuthenticationResult) { - // if the token is not expired but must be refreshed; get a new one in the background - if (lastCacheOutcome === CacheOutcome.PROACTIVELY_REFRESHED) { - this.logger.info("ClientCredentialClient:getCachedAuthenticationResult - Cached access token's refreshOn property has been exceeded'. It's not expired, but must be refreshed."); - // refresh the access token in the background - const refreshAccessToken = true; - await this.executeTokenRequest(request, this.authority, refreshAccessToken); - } - // return the cached token - return cachedAuthenticationResult; - } - else { - return this.executeTokenRequest(request, this.authority); - } - } - /** - * looks up cache if the tokens are cached already - */ - async getCachedAuthenticationResult(request, config, cryptoUtils, authority, cacheManager, serverTelemetryManager) { - const clientConfiguration = config; - const managedIdentityConfiguration = config; - let lastCacheOutcome = CacheOutcome.NOT_APPLICABLE; - // read the user-supplied cache into memory, if applicable - let cacheContext; - if (clientConfiguration.serializableCache && - clientConfiguration.persistencePlugin) { - cacheContext = new TokenCacheContext(clientConfiguration.serializableCache, false); - await clientConfiguration.persistencePlugin.beforeCacheAccess(cacheContext); - } - const cachedAccessToken = this.readAccessTokenFromCache(authority, managedIdentityConfiguration.managedIdentityId?.id || - clientConfiguration.authOptions.clientId, new ScopeSet(request.scopes || []), cacheManager, request.correlationId); - if (clientConfiguration.serializableCache && - clientConfiguration.persistencePlugin && - cacheContext) { - await clientConfiguration.persistencePlugin.afterCacheAccess(cacheContext); - } - // must refresh due to non-existent access_token - if (!cachedAccessToken) { - serverTelemetryManager?.setCacheOutcome(CacheOutcome.NO_CACHED_ACCESS_TOKEN); - return [null, CacheOutcome.NO_CACHED_ACCESS_TOKEN]; - } - // must refresh due to the expires_in value - if (TimeUtils.isTokenExpired(cachedAccessToken.expiresOn, clientConfiguration.systemOptions?.tokenRenewalOffsetSeconds || - DEFAULT_TOKEN_RENEWAL_OFFSET_SEC)) { - serverTelemetryManager?.setCacheOutcome(CacheOutcome.CACHED_ACCESS_TOKEN_EXPIRED); - return [null, CacheOutcome.CACHED_ACCESS_TOKEN_EXPIRED]; - } - // must refresh (in the background) due to the refresh_in value - if (cachedAccessToken.refreshOn && - TimeUtils.isTokenExpired(cachedAccessToken.refreshOn.toString(), 0)) { - lastCacheOutcome = CacheOutcome.PROACTIVELY_REFRESHED; - serverTelemetryManager?.setCacheOutcome(CacheOutcome.PROACTIVELY_REFRESHED); - } - return [ - await ResponseHandler.generateAuthenticationResult(cryptoUtils, authority, { - account: null, - idToken: null, - accessToken: cachedAccessToken, - refreshToken: null, - appMetadata: null, - }, true, request), - lastCacheOutcome, - ]; - } - /** - * Reads access token from the cache - */ - readAccessTokenFromCache(authority, id, scopeSet, cacheManager, correlationId) { - const accessTokenFilter = { - homeAccountId: Constants.EMPTY_STRING, - environment: authority.canonicalAuthorityUrlComponents.HostNameAndPort, - credentialType: CredentialType.ACCESS_TOKEN, - clientId: id, - realm: authority.tenant, - target: ScopeSet.createSearchScopes(scopeSet.asArray()), - }; - const accessTokens = cacheManager.getAccessTokensByFilter(accessTokenFilter, correlationId); - if (accessTokens.length < 1) { - return null; - } - else if (accessTokens.length > 1) { - throw createClientAuthError(ClientAuthErrorCodes.multipleMatchingTokens); - } - return accessTokens[0]; - } - /** - * Makes a network call to request the token from the service - * @param request - CommonClientCredentialRequest provided by the developer - * @param authority - authority object - */ - async executeTokenRequest(request, authority, refreshAccessToken) { - let serverTokenResponse; - let reqTimestamp; - if (this.appTokenProvider) { - this.logger.info("Using appTokenProvider extensibility."); - const appTokenPropviderParameters = { - correlationId: request.correlationId, - tenantId: this.config.authOptions.authority.tenant, - scopes: request.scopes, - claims: request.claims, - }; - reqTimestamp = TimeUtils.nowSeconds(); - const appTokenProviderResult = await this.appTokenProvider(appTokenPropviderParameters); - serverTokenResponse = { - access_token: appTokenProviderResult.accessToken, - expires_in: appTokenProviderResult.expiresInSeconds, - refresh_in: appTokenProviderResult.refreshInSeconds, - token_type: AuthenticationScheme.BEARER, - }; - } - else { - const queryParametersString = this.createTokenQueryParameters(request); - const endpoint = UrlString.appendQueryString(authority.tokenEndpoint, queryParametersString); - const requestBody = await this.createTokenRequestBody(request); - const headers = this.createTokenRequestHeaders(); - const thumbprint = { - clientId: this.config.authOptions.clientId, - authority: request.authority, - scopes: request.scopes, - claims: request.claims, - authenticationScheme: request.authenticationScheme, - resourceRequestMethod: request.resourceRequestMethod, - resourceRequestUri: request.resourceRequestUri, - shrClaims: request.shrClaims, - sshKid: request.sshKid, - }; - this.logger.info("Sending token request to endpoint: " + authority.tokenEndpoint); - reqTimestamp = TimeUtils.nowSeconds(); - const response = await this.executePostToTokenEndpoint(endpoint, requestBody, headers, thumbprint, request.correlationId); - serverTokenResponse = response.body; - serverTokenResponse.status = response.status; - } - const responseHandler = new ResponseHandler(this.config.authOptions.clientId, this.cacheManager, this.cryptoUtils, this.logger, this.config.serializableCache, this.config.persistencePlugin); - responseHandler.validateTokenResponse(serverTokenResponse, refreshAccessToken); - const tokenResponse = await responseHandler.handleServerTokenResponse(serverTokenResponse, this.authority, reqTimestamp, request); - return tokenResponse; - } - /** - * generate the request to the server in the acceptable format - * @param request - CommonClientCredentialRequest provided by the developer - */ - async createTokenRequestBody(request) { - const parameterBuilder = new RequestParameterBuilder(); - parameterBuilder.addClientId(this.config.authOptions.clientId); - parameterBuilder.addScopes(request.scopes, false); - parameterBuilder.addGrantType(GrantType.CLIENT_CREDENTIALS_GRANT); - parameterBuilder.addLibraryInfo(this.config.libraryInfo); - parameterBuilder.addApplicationTelemetry(this.config.telemetry.application); - parameterBuilder.addThrottling(); - if (this.serverTelemetryManager) { - parameterBuilder.addServerTelemetry(this.serverTelemetryManager); - } - const correlationId = request.correlationId || - this.config.cryptoInterface.createNewGuid(); - parameterBuilder.addCorrelationId(correlationId); - if (this.config.clientCredentials.clientSecret) { - parameterBuilder.addClientSecret(this.config.clientCredentials.clientSecret); - } - // Use clientAssertion from request, fallback to client assertion in base configuration - const clientAssertion = request.clientAssertion || - this.config.clientCredentials.clientAssertion; - if (clientAssertion) { - parameterBuilder.addClientAssertion(await getClientAssertion(clientAssertion.assertion, this.config.authOptions.clientId, request.resourceRequestUri)); - parameterBuilder.addClientAssertionType(clientAssertion.assertionType); - } - if (!StringUtils.isEmptyObj(request.claims) || - (this.config.authOptions.clientCapabilities && - this.config.authOptions.clientCapabilities.length > 0)) { - parameterBuilder.addClaims(request.claims, this.config.authOptions.clientCapabilities); - } - return parameterBuilder.createQueryString(); - } -} - -export { ClientCredentialClient }; -//# sourceMappingURL=ClientCredentialClient.mjs.map diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ClientCredentialClient.mjs.map b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ClientCredentialClient.mjs.map deleted file mode 100644 index 203f9d2..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ClientCredentialClient.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ClientCredentialClient.mjs","sources":["../../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Ae,CAC5B,IAAI,CAAC,MAAM,CAAC,iBAAiB,CAAC,YAAY,CAC7C,CAAC;AACL,SAAA;;AAGD,QAAA,MAAM,eAAe,GACjB,OAAO,CAAC,eAAe;AACvB,YAAA,IAAI,CAAC,MAAM,CAAC,iBAAiB,CAAC,eAAe,CAAC;AAElD,QAAA,IAAI,eAAe,EAAE;YACjB,gBAAgB,CAAC,kBAAkB,CAC/B,MAAM,kBAAkB,CACpB,eAAe,CAAC,SAAS,EACzB,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,QAAQ,EAChC,OAAO,CAAC,kBAAkB,CAC7B,CACJ,CAAC;AACF,YAAA,gBAAgB,CAAC,sBAAsB,CACnC,eAAe,CAAC,aAAa,CAChC,CAAC;AACL,SAAA;QAED,IACI,CAAC,WAAW,CAAC,UAAU,CAAC,OAAO,CAAC,MAAM,CAAC;AACvC,aAAC,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,kBAAkB;gBACvC,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,kBAAkB,CAAC,MAAM,GAAG,CAAC,CAAC,EAC5D;AACE,YAAA,gBAAgB,CAAC,SAAS,CACtB,OAAO,CAAC,MAAM,EACd,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,kBAAkB,CAC7C,CAAC;AACL,SAAA;AAED,QAAA,OAAO,gBAAgB,CAAC,iBAAiB,EAAE,CAAC;KAC/C;AACJ;;;;"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ConfidentialClientApplication.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ConfidentialClientApplication.d.ts deleted file mode 100644 index 0292a6b..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ConfidentialClientApplication.d.ts +++ /dev/null @@ -1,59 +0,0 @@ -import { ClientApplication } from "./ClientApplication.js"; -import { Configuration } from "../config/Configuration.js"; -import { AuthenticationResult, IAppTokenProvider } from "@azure/msal-common/node"; -import { IConfidentialClientApplication } from "./IConfidentialClientApplication.js"; -import { OnBehalfOfRequest } from "../request/OnBehalfOfRequest.js"; -import { ClientCredentialRequest } from "../request/ClientCredentialRequest.js"; -/** - * This class is to be used to acquire tokens for confidential client applications (webApp, webAPI). Confidential client applications - * will configure application secrets, client certificates/assertions as applicable - * @public - */ -export declare class ConfidentialClientApplication extends ClientApplication implements IConfidentialClientApplication { - private appTokenProvider?; - /** - * Constructor for the ConfidentialClientApplication - * - * Required attributes in the Configuration object are: - * - clientID: the application ID of your application. You can obtain one by registering your application with our application registration portal - * - authority: the authority URL for your application. - * - client credential: Must set either client secret, certificate, or assertion for confidential clients. You can obtain a client secret from the application registration portal. - * - * In Azure AD, authority is a URL indicating of the form https://login.microsoftonline.com/\{Enter_the_Tenant_Info_Here\}. - * If your application supports Accounts in one organizational directory, replace "Enter_the_Tenant_Info_Here" value with the Tenant Id or Tenant name (for example, contoso.microsoft.com). - * If your application supports Accounts in any organizational directory, replace "Enter_the_Tenant_Info_Here" value with organizations. - * If your application supports Accounts in any organizational directory and personal Microsoft accounts, replace "Enter_the_Tenant_Info_Here" value with common. - * To restrict support to Personal Microsoft accounts only, replace "Enter_the_Tenant_Info_Here" value with consumers. - * - * In Azure B2C, authority is of the form https://\{instance\}/tfp/\{tenant\}/\{policyName\}/ - * Full B2C functionality will be available in this library in future versions. - * - * @param Configuration - configuration object for the MSAL ConfidentialClientApplication instance - */ - constructor(configuration: Configuration); - /** - * This extensibility point only works for the client_credential flow, i.e. acquireTokenByClientCredential and - * is meant for Azure SDK to enhance Managed Identity support. - * - * @param IAppTokenProvider - Extensibility interface, which allows the app developer to return a token from a custom source. - */ - SetAppTokenProvider(provider: IAppTokenProvider): void; - /** - * Acquires tokens from the authority for the application (not for an end user). - */ - acquireTokenByClientCredential(request: ClientCredentialRequest): Promise; - /** - * Acquires tokens from the authority for the application. - * - * Used in scenarios where the current app is a middle-tier service which was called with a token - * representing an end user. The current app can use the token (oboAssertion) to request another - * token to access downstream web API, on behalf of that user. - * - * The current middle-tier app has no user interaction to obtain consent. - * See how to gain consent upfront for your middle-tier app from this article. - * https://docs.microsoft.com/en-us/azure/active-directory/develop/v2-oauth2-on-behalf-of-flow#gaining-consent-for-the-middle-tier-application - */ - acquireTokenOnBehalfOf(request: OnBehalfOfRequest): Promise; - private setClientCredential; -} -//# sourceMappingURL=ConfidentialClientApplication.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ConfidentialClientApplication.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ConfidentialClientApplication.d.ts.map deleted file mode 100644 index 34f090a..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ConfidentialClientApplication.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ConfidentialClientApplication.d.ts","sourceRoot":"","sources":["../../src/client/ConfidentialClientApplication.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAQ3D,OAAO,EAGH,oBAAoB,EAGpB,iBAAiB,EASpB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,8BAA8B,EAAE,MAAM,qCAAqC,CAAC;AACrF,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAAE,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AAIhF;;;;GAIG;AACH,qBAAa,6BACT,SAAQ,iBACR,YAAW,8BAA8B;IAEzC,OAAO,CAAC,gBAAgB,CAAC,CAAoB;IAE7C;;;;;;;;;;;;;;;;;;OAkBG;gBACS,aAAa,EAAE,aAAa;IAMxC;;;;;OAKG;IACH,mBAAmB,CAAC,QAAQ,EAAE,iBAAiB,GAAG,IAAI;IAItD;;OAEG;IACU,8BAA8B,CACvC,OAAO,EAAE,uBAAuB,GACjC,OAAO,CAAC,oBAAoB,GAAG,IAAI,CAAC;IAyGvC;;;;;;;;;;OAUG;IACU,sBAAsB,CAC/B,OAAO,EAAE,iBAAiB,GAC3B,OAAO,CAAC,oBAAoB,GAAG,IAAI,CAAC;IAgCvC,OAAO,CAAC,mBAAmB;CA0D9B"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ConfidentialClientApplication.mjs b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ConfidentialClientApplication.mjs deleted file mode 100644 index 5e8734d..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ConfidentialClientApplication.mjs +++ /dev/null @@ -1,195 +0,0 @@ -/*! @azure/msal-node v2.16.3 2025-08-05 */ -'use strict'; -import { ClientApplication } from './ClientApplication.mjs'; -import { ClientAssertion } from './ClientAssertion.mjs'; -import { Constants, MSAL_FORCE_REGION, REGION_ENVIRONMENT_VARIABLE, ApiId } from '../utils/Constants.mjs'; -import { getClientAssertion, OIDC_DEFAULT_SCOPES, UrlString, AADAuthorityConstants, createClientAuthError, ClientAuthErrorCodes, AuthError } from '@azure/msal-common/node'; -import { ClientCredentialClient } from './ClientCredentialClient.mjs'; -import { OnBehalfOfClient } from './OnBehalfOfClient.mjs'; - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -// AADAuthorityConstants -/** - * This class is to be used to acquire tokens for confidential client applications (webApp, webAPI). Confidential client applications - * will configure application secrets, client certificates/assertions as applicable - * @public - */ -class ConfidentialClientApplication extends ClientApplication { - /** - * Constructor for the ConfidentialClientApplication - * - * Required attributes in the Configuration object are: - * - clientID: the application ID of your application. You can obtain one by registering your application with our application registration portal - * - authority: the authority URL for your application. - * - client credential: Must set either client secret, certificate, or assertion for confidential clients. You can obtain a client secret from the application registration portal. - * - * In Azure AD, authority is a URL indicating of the form https://login.microsoftonline.com/\{Enter_the_Tenant_Info_Here\}. - * If your application supports Accounts in one organizational directory, replace "Enter_the_Tenant_Info_Here" value with the Tenant Id or Tenant name (for example, contoso.microsoft.com). - * If your application supports Accounts in any organizational directory, replace "Enter_the_Tenant_Info_Here" value with organizations. - * If your application supports Accounts in any organizational directory and personal Microsoft accounts, replace "Enter_the_Tenant_Info_Here" value with common. - * To restrict support to Personal Microsoft accounts only, replace "Enter_the_Tenant_Info_Here" value with consumers. - * - * In Azure B2C, authority is of the form https://\{instance\}/tfp/\{tenant\}/\{policyName\}/ - * Full B2C functionality will be available in this library in future versions. - * - * @param Configuration - configuration object for the MSAL ConfidentialClientApplication instance - */ - constructor(configuration) { - super(configuration); - this.setClientCredential(); - this.appTokenProvider = undefined; - } - /** - * This extensibility point only works for the client_credential flow, i.e. acquireTokenByClientCredential and - * is meant for Azure SDK to enhance Managed Identity support. - * - * @param IAppTokenProvider - Extensibility interface, which allows the app developer to return a token from a custom source. - */ - SetAppTokenProvider(provider) { - this.appTokenProvider = provider; - } - /** - * Acquires tokens from the authority for the application (not for an end user). - */ - async acquireTokenByClientCredential(request) { - this.logger.info("acquireTokenByClientCredential called", request.correlationId); - // If there is a client assertion present in the request, it overrides the one present in the client configuration - let clientAssertion; - if (request.clientAssertion) { - clientAssertion = { - assertion: await getClientAssertion(request.clientAssertion, this.config.auth.clientId - // tokenEndpoint will be undefined. resourceRequestUri is omitted in ClientCredentialRequest - ), - assertionType: Constants.JWT_BEARER_ASSERTION_TYPE, - }; - } - const baseRequest = await this.initializeBaseRequest(request); - // valid base request should not contain oidc scopes in this grant type - const validBaseRequest = { - ...baseRequest, - scopes: baseRequest.scopes.filter((scope) => !OIDC_DEFAULT_SCOPES.includes(scope)), - }; - const validRequest = { - ...request, - ...validBaseRequest, - clientAssertion, - }; - /* - * valid request should not have "common" or "organizations" in lieu of the tenant_id in the authority in the auth configuration - * example authority: "https://login.microsoftonline.com/TenantId", - */ - const authority = new UrlString(validRequest.authority); - const tenantId = authority.getUrlComponents().PathSegments[0]; - if (Object.values(AADAuthorityConstants).includes(tenantId)) { - throw createClientAuthError(ClientAuthErrorCodes.missingTenantIdError); - } - /* - * if this env variable is set, and the developer provided region isn't defined and isn't "DisableMsalForceRegion", - * MSAL shall opt-in to ESTS-R with the value of this variable - */ - const ENV_MSAL_FORCE_REGION = process.env[MSAL_FORCE_REGION]; - let region; - if (validRequest.azureRegion !== "DisableMsalForceRegion") { - if (!validRequest.azureRegion && ENV_MSAL_FORCE_REGION) { - region = ENV_MSAL_FORCE_REGION; - } - else { - region = validRequest.azureRegion; - } - } - const azureRegionConfiguration = { - azureRegion: region, - environmentRegion: process.env[REGION_ENVIRONMENT_VARIABLE], - }; - const serverTelemetryManager = this.initializeServerTelemetryManager(ApiId.acquireTokenByClientCredential, validRequest.correlationId, validRequest.skipCache); - try { - const clientCredentialConfig = await this.buildOauthClientConfiguration(validRequest.authority, validRequest.correlationId, "", serverTelemetryManager, azureRegionConfiguration, request.azureCloudOptions); - const clientCredentialClient = new ClientCredentialClient(clientCredentialConfig, this.appTokenProvider); - this.logger.verbose("Client credential client created", validRequest.correlationId); - return await clientCredentialClient.acquireToken(validRequest); - } - catch (e) { - if (e instanceof AuthError) { - e.setCorrelationId(validRequest.correlationId); - } - serverTelemetryManager.cacheFailedRequest(e); - throw e; - } - } - /** - * Acquires tokens from the authority for the application. - * - * Used in scenarios where the current app is a middle-tier service which was called with a token - * representing an end user. The current app can use the token (oboAssertion) to request another - * token to access downstream web API, on behalf of that user. - * - * The current middle-tier app has no user interaction to obtain consent. - * See how to gain consent upfront for your middle-tier app from this article. - * https://docs.microsoft.com/en-us/azure/active-directory/develop/v2-oauth2-on-behalf-of-flow#gaining-consent-for-the-middle-tier-application - */ - async acquireTokenOnBehalfOf(request) { - this.logger.info("acquireTokenOnBehalfOf called", request.correlationId); - const validRequest = { - ...request, - ...(await this.initializeBaseRequest(request)), - }; - try { - const onBehalfOfConfig = await this.buildOauthClientConfiguration(validRequest.authority, validRequest.correlationId, "", undefined, undefined, request.azureCloudOptions); - const oboClient = new OnBehalfOfClient(onBehalfOfConfig); - this.logger.verbose("On behalf of client created", validRequest.correlationId); - return await oboClient.acquireToken(validRequest); - } - catch (e) { - if (e instanceof AuthError) { - e.setCorrelationId(validRequest.correlationId); - } - throw e; - } - } - setClientCredential() { - const clientSecretNotEmpty = !!this.config.auth.clientSecret; - const clientAssertionNotEmpty = !!this.config.auth.clientAssertion; - const certificateNotEmpty = (!!this.config.auth.clientCertificate?.thumbprint || - !!this.config.auth.clientCertificate?.thumbprintSha256) && - !!this.config.auth.clientCertificate?.privateKey; - /* - * If app developer configures this callback, they don't need a credential - * i.e. AzureSDK can get token from Managed Identity without a cert / secret - */ - if (this.appTokenProvider) { - return; - } - // Check that at most one credential is set on the application - if ((clientSecretNotEmpty && clientAssertionNotEmpty) || - (clientAssertionNotEmpty && certificateNotEmpty) || - (clientSecretNotEmpty && certificateNotEmpty)) { - throw createClientAuthError(ClientAuthErrorCodes.invalidClientCredential); - } - if (this.config.auth.clientSecret) { - this.clientSecret = this.config.auth.clientSecret; - return; - } - if (this.config.auth.clientAssertion) { - this.developerProvidedClientAssertion = - this.config.auth.clientAssertion; - return; - } - if (!certificateNotEmpty) { - throw createClientAuthError(ClientAuthErrorCodes.invalidClientCredential); - } - else { - this.clientAssertion = !!this.config.auth.clientCertificate - .thumbprintSha256 - ? ClientAssertion.fromCertificateWithSha256Thumbprint(this.config.auth.clientCertificate.thumbprintSha256, this.config.auth.clientCertificate.privateKey, this.config.auth.clientCertificate.x5c) - : ClientAssertion.fromCertificate( - // guaranteed to be a string, due to prior error checking in this function - this.config.auth.clientCertificate.thumbprint, this.config.auth.clientCertificate.privateKey, this.config.auth.clientCertificate.x5c); - } - } -} - -export { ConfidentialClientApplication }; -//# sourceMappingURL=ConfidentialClientApplication.mjs.map diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ConfidentialClientApplication.mjs.map b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ConfidentialClientApplication.mjs.map deleted file mode 100644 index 696b459..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ConfidentialClientApplication.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ConfidentialClientApplication.mjs","sources":["../../src/client/ConfidentialClientApplication.ts"],"sourcesContent":[null],"names":["NodeConstants"],"mappings":";;;;;;;;;AAAA;;;AAGG;AAEH;AAiCA;;;;AAIG;AACG,MAAO,6BACT,SAAQ,iBAAiB,CAAA;AAKzB;;;;;;;;;;;;;;;;;;AAkBG;AACH,IAAA,WAAA,CAAY,aAA4B,EAAA;QACpC,KAAK,CAAC,aAAa,CAAC,CAAC;QACrB,IAAI,CAAC,mBAAmB,EAAE,CAAC;AAC3B,QAAA,IAAI,CAAC,gBAAgB,GAAG,SAAS,CAAC;KACrC;AAED;;;;;AAKG;AACH,IAAA,mBAAmB,CAAC,QAA2B,EAAA;AAC3C,QAAA,IAAI,CAAC,gBAAgB,GAAG,QAAQ,CAAC;KACpC;AAED;;AAEG;IACI,MAAM,8BAA8B,CACvC,OAAgC,EAAA;QAEhC,IAAI,CAAC,MAAM,CAAC,IAAI,CACZ,uCAAuC,EACvC,OAAO,CAAC,aAAa,CACxB,CAAC;;AAGF,QAAA,IAAI,eAAgD,CAAC;QACrD,IAAI,OAAO,CAAC,eAAe,EAAE;AACzB,YAAA,eAAe,GAAG;AACd,gBAAA,SAAS,EAAE,MAAM,kBAAkB,CAC/B,OAAO,CAAC,eAAe,EACvB,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ;;AAE5B,iBAAA;gBACD,aAAa,EAAEA,SAAa,CAAC,yBAAyB;aACzD,CAAC;AACL,SAAA;QAED,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAAC,CAAC;;AAG9D,QAAA,MAAM,gBAAgB,GAAG;AACrB,YAAA,GAAG,WAAW;AACd,YAAA,MAAM,EAAE,WAAW,CAAC,MAAM,CAAC,MAAM,CAC7B,CAAC,KAAa,KAAK,CAAC,mBAAmB,CAAC,QAAQ,CAAC,KAAK,CAAC,CAC1D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AC,gCAAgC;AACjC,gBAAA,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC;YACrC,OAAO;AACV,SAAA;QAED,IAAI,CAAC,mBAAmB,EAAE;AACtB,YAAA,MAAM,qBAAqB,CACvB,oBAAoB,CAAC,uBAAuB,CAC/C,CAAC;AACL,SAAA;AAAM,aAAA;YACH,IAAI,CAAC,eAAe,GAAG,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,iBAAiB;iBACtD,gBAAgB;AACjB,kBAAE,eAAe,CAAC,mCAAmC,CAC/C,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,iBAAiB,CAAC,gBAAgB,EACnD,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,iBAAiB,CAAC,UAAU,EAC7C,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,iBAAiB,CAAC,GAAG,CACzC;kBACD,eAAe,CAAC,eAAe;;AAE3B,gBAAA,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,iBAAiB,CAAC,UAAoB,EACvD,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,iBAAiB,CAAC,UAAU,EAC7C,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,iBAAiB,CAAC,GAAG,CACzC,CAAC;AACX,SAAA;KACJ;AACJ;;;;"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/DeviceCodeClient.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/DeviceCodeClient.d.ts deleted file mode 100644 index 490ce39..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/DeviceCodeClient.d.ts +++ /dev/null @@ -1,58 +0,0 @@ -import { AuthenticationResult, BaseClient, ClientConfiguration, CommonDeviceCodeRequest } from "@azure/msal-common/node"; -/** - * OAuth2.0 Device code client - * @public - */ -export declare class DeviceCodeClient extends BaseClient { - constructor(configuration: ClientConfiguration); - /** - * Gets device code from device code endpoint, calls back to with device code response, and - * polls token endpoint to exchange device code for tokens - * @param request - developer provided CommonDeviceCodeRequest - */ - acquireToken(request: CommonDeviceCodeRequest): Promise; - /** - * Creates device code request and executes http GET - * @param request - developer provided CommonDeviceCodeRequest - */ - private getDeviceCode; - /** - * Creates query string for the device code request - * @param request - developer provided CommonDeviceCodeRequest - */ - createExtraQueryParameters(request: CommonDeviceCodeRequest): string; - /** - * Executes POST request to device code endpoint - * @param deviceCodeEndpoint - token endpoint - * @param queryString - string to be used in the body of the request - * @param headers - headers for the request - * @param thumbprint - unique request thumbprint - * @param correlationId - correlation id to be used in the request - */ - private executePostRequestToDeviceCodeEndpoint; - /** - * Create device code endpoint query parameters and returns string - * @param request - developer provided CommonDeviceCodeRequest - */ - private createQueryString; - /** - * Breaks the polling with specific conditions - * @param deviceCodeExpirationTime - expiration time for the device code request - * @param userSpecifiedTimeout - developer provided timeout, to be compared against deviceCodeExpirationTime - * @param userSpecifiedCancelFlag - boolean indicating the developer would like to cancel the request - */ - private continuePolling; - /** - * Creates token request with device code response and polls token endpoint at interval set by the device code response - * @param request - developer provided CommonDeviceCodeRequest - * @param deviceCodeResponse - DeviceCodeResponse returned by the security token service device code endpoint - */ - private acquireTokenWithDeviceCode; - /** - * Creates query parameters and converts to string. - * @param request - developer provided CommonDeviceCodeRequest - * @param deviceCodeResponse - DeviceCodeResponse returned by the security token service device code endpoint - */ - private createTokenRequestBody; -} -//# sourceMappingURL=DeviceCodeClient.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/DeviceCodeClient.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/DeviceCodeClient.d.ts.map deleted file mode 100644 index c4f8b1c..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/DeviceCodeClient.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"DeviceCodeClient.d.ts","sourceRoot":"","sources":["../../src/client/DeviceCodeClient.ts"],"names":[],"mappings":"AAKA,OAAO,EAEH,oBAAoB,EACpB,UAAU,EAEV,mBAAmB,EACnB,uBAAuB,EAc1B,MAAM,yBAAyB,CAAC;AAEjC;;;GAGG;AACH,qBAAa,gBAAiB,SAAQ,UAAU;gBAChC,aAAa,EAAE,mBAAmB;IAI9C;;;;OAIG;IACU,YAAY,CACrB,OAAO,EAAE,uBAAuB,GACjC,OAAO,CAAC,oBAAoB,GAAG,IAAI,CAAC;IA4BvC;;;OAGG;YACW,aAAa;IA+B3B;;;OAGG;IACI,0BAA0B,CAC7B,OAAO,EAAE,uBAAuB,GACjC,MAAM;IAYT;;;;;;;OAOG;YACW,sCAAsC;IAoCpD;;;OAGG;IACH,OAAO,CAAC,iBAAiB;IA2BzB;;;;;OAKG;IACH,OAAO,CAAC,eAAe;IAqCvB;;;;OAIG;YACW,0BAA0B;IAwFxC;;;;OAIG;IACH,OAAO,CAAC,sBAAsB;CAqCjC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/DeviceCodeClient.mjs b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/DeviceCodeClient.mjs deleted file mode 100644 index 2129b3a..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/DeviceCodeClient.mjs +++ /dev/null @@ -1,218 +0,0 @@ -/*! @azure/msal-node v2.16.3 2025-08-05 */ -'use strict'; -import { BaseClient, TimeUtils, ResponseHandler, UrlString, RequestParameterBuilder, createClientAuthError, ClientAuthErrorCodes, Constants, createAuthError, AuthErrorCodes, GrantType, StringUtils } from '@azure/msal-common/node'; - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * OAuth2.0 Device code client - * @public - */ -class DeviceCodeClient extends BaseClient { - constructor(configuration) { - super(configuration); - } - /** - * Gets device code from device code endpoint, calls back to with device code response, and - * polls token endpoint to exchange device code for tokens - * @param request - developer provided CommonDeviceCodeRequest - */ - async acquireToken(request) { - const deviceCodeResponse = await this.getDeviceCode(request); - request.deviceCodeCallback(deviceCodeResponse); - const reqTimestamp = TimeUtils.nowSeconds(); - const response = await this.acquireTokenWithDeviceCode(request, deviceCodeResponse); - const responseHandler = new ResponseHandler(this.config.authOptions.clientId, this.cacheManager, this.cryptoUtils, this.logger, this.config.serializableCache, this.config.persistencePlugin); - // Validate response. This function throws a server error if an error is returned by the server. - responseHandler.validateTokenResponse(response); - return responseHandler.handleServerTokenResponse(response, this.authority, reqTimestamp, request); - } - /** - * Creates device code request and executes http GET - * @param request - developer provided CommonDeviceCodeRequest - */ - async getDeviceCode(request) { - const queryParametersString = this.createExtraQueryParameters(request); - const endpoint = UrlString.appendQueryString(this.authority.deviceCodeEndpoint, queryParametersString); - const queryString = this.createQueryString(request); - const headers = this.createTokenRequestHeaders(); - const thumbprint = { - clientId: this.config.authOptions.clientId, - authority: request.authority, - scopes: request.scopes, - claims: request.claims, - authenticationScheme: request.authenticationScheme, - resourceRequestMethod: request.resourceRequestMethod, - resourceRequestUri: request.resourceRequestUri, - shrClaims: request.shrClaims, - sshKid: request.sshKid, - }; - return this.executePostRequestToDeviceCodeEndpoint(endpoint, queryString, headers, thumbprint, request.correlationId); - } - /** - * Creates query string for the device code request - * @param request - developer provided CommonDeviceCodeRequest - */ - createExtraQueryParameters(request) { - const parameterBuilder = new RequestParameterBuilder(); - if (request.extraQueryParameters) { - parameterBuilder.addExtraQueryParameters(request.extraQueryParameters); - } - return parameterBuilder.createQueryString(); - } - /** - * Executes POST request to device code endpoint - * @param deviceCodeEndpoint - token endpoint - * @param queryString - string to be used in the body of the request - * @param headers - headers for the request - * @param thumbprint - unique request thumbprint - * @param correlationId - correlation id to be used in the request - */ - async executePostRequestToDeviceCodeEndpoint(deviceCodeEndpoint, queryString, headers, thumbprint, correlationId) { - const { body: { user_code: userCode, device_code: deviceCode, verification_uri: verificationUri, expires_in: expiresIn, interval, message, }, } = await this.sendPostRequest(thumbprint, deviceCodeEndpoint, { - body: queryString, - headers: headers, - }, correlationId); - return { - userCode, - deviceCode, - verificationUri, - expiresIn, - interval, - message, - }; - } - /** - * Create device code endpoint query parameters and returns string - * @param request - developer provided CommonDeviceCodeRequest - */ - createQueryString(request) { - const parameterBuilder = new RequestParameterBuilder(); - parameterBuilder.addScopes(request.scopes); - parameterBuilder.addClientId(this.config.authOptions.clientId); - if (request.extraQueryParameters) { - parameterBuilder.addExtraQueryParameters(request.extraQueryParameters); - } - if (request.claims || - (this.config.authOptions.clientCapabilities && - this.config.authOptions.clientCapabilities.length > 0)) { - parameterBuilder.addClaims(request.claims, this.config.authOptions.clientCapabilities); - } - return parameterBuilder.createQueryString(); - } - /** - * Breaks the polling with specific conditions - * @param deviceCodeExpirationTime - expiration time for the device code request - * @param userSpecifiedTimeout - developer provided timeout, to be compared against deviceCodeExpirationTime - * @param userSpecifiedCancelFlag - boolean indicating the developer would like to cancel the request - */ - continuePolling(deviceCodeExpirationTime, userSpecifiedTimeout, userSpecifiedCancelFlag) { - if (userSpecifiedCancelFlag) { - this.logger.error("Token request cancelled by setting DeviceCodeRequest.cancel = true"); - throw createClientAuthError(ClientAuthErrorCodes.deviceCodePollingCancelled); - } - else if (userSpecifiedTimeout && - userSpecifiedTimeout < deviceCodeExpirationTime && - TimeUtils.nowSeconds() > userSpecifiedTimeout) { - this.logger.error(`User defined timeout for device code polling reached. The timeout was set for ${userSpecifiedTimeout}`); - throw createClientAuthError(ClientAuthErrorCodes.userTimeoutReached); - } - else if (TimeUtils.nowSeconds() > deviceCodeExpirationTime) { - if (userSpecifiedTimeout) { - this.logger.verbose(`User specified timeout ignored as the device code has expired before the timeout elapsed. The user specified timeout was set for ${userSpecifiedTimeout}`); - } - this.logger.error(`Device code expired. Expiration time of device code was ${deviceCodeExpirationTime}`); - throw createClientAuthError(ClientAuthErrorCodes.deviceCodeExpired); - } - return true; - } - /** - * Creates token request with device code response and polls token endpoint at interval set by the device code response - * @param request - developer provided CommonDeviceCodeRequest - * @param deviceCodeResponse - DeviceCodeResponse returned by the security token service device code endpoint - */ - async acquireTokenWithDeviceCode(request, deviceCodeResponse) { - const queryParametersString = this.createTokenQueryParameters(request); - const endpoint = UrlString.appendQueryString(this.authority.tokenEndpoint, queryParametersString); - const requestBody = this.createTokenRequestBody(request, deviceCodeResponse); - const headers = this.createTokenRequestHeaders(); - const userSpecifiedTimeout = request.timeout - ? TimeUtils.nowSeconds() + request.timeout - : undefined; - const deviceCodeExpirationTime = TimeUtils.nowSeconds() + deviceCodeResponse.expiresIn; - const pollingIntervalMilli = deviceCodeResponse.interval * 1000; - /* - * Poll token endpoint while (device code is not expired AND operation has not been cancelled by - * setting CancellationToken.cancel = true). POST request is sent at interval set by pollingIntervalMilli - */ - while (this.continuePolling(deviceCodeExpirationTime, userSpecifiedTimeout, request.cancel)) { - const thumbprint = { - clientId: this.config.authOptions.clientId, - authority: request.authority, - scopes: request.scopes, - claims: request.claims, - authenticationScheme: request.authenticationScheme, - resourceRequestMethod: request.resourceRequestMethod, - resourceRequestUri: request.resourceRequestUri, - shrClaims: request.shrClaims, - sshKid: request.sshKid, - }; - const response = await this.executePostToTokenEndpoint(endpoint, requestBody, headers, thumbprint, request.correlationId); - if (response.body && response.body.error) { - // user authorization is pending. Sleep for polling interval and try again - if (response.body.error === Constants.AUTHORIZATION_PENDING) { - this.logger.info("Authorization pending. Continue polling."); - await TimeUtils.delay(pollingIntervalMilli); - } - else { - // for any other error, throw - this.logger.info("Unexpected error in polling from the server"); - throw createAuthError(AuthErrorCodes.postRequestFailed, response.body.error); - } - } - else { - this.logger.verbose("Authorization completed successfully. Polling stopped."); - return response.body; - } - } - /* - * The above code should've thrown by this point, but to satisfy TypeScript, - * and in the rare case the conditionals in continuePolling() may not catch everything... - */ - this.logger.error("Polling stopped for unknown reasons."); - throw createClientAuthError(ClientAuthErrorCodes.deviceCodeUnknownError); - } - /** - * Creates query parameters and converts to string. - * @param request - developer provided CommonDeviceCodeRequest - * @param deviceCodeResponse - DeviceCodeResponse returned by the security token service device code endpoint - */ - createTokenRequestBody(request, deviceCodeResponse) { - const requestParameters = new RequestParameterBuilder(); - requestParameters.addScopes(request.scopes); - requestParameters.addClientId(this.config.authOptions.clientId); - requestParameters.addGrantType(GrantType.DEVICE_CODE_GRANT); - requestParameters.addDeviceCode(deviceCodeResponse.deviceCode); - const correlationId = request.correlationId || - this.config.cryptoInterface.createNewGuid(); - requestParameters.addCorrelationId(correlationId); - requestParameters.addClientInfo(); - requestParameters.addLibraryInfo(this.config.libraryInfo); - requestParameters.addApplicationTelemetry(this.config.telemetry.application); - requestParameters.addThrottling(); - if (this.serverTelemetryManager) { - requestParameters.addServerTelemetry(this.serverTelemetryManager); - } - if (!StringUtils.isEmptyObj(request.claims) || - (this.config.authOptions.clientCapabilities && - this.config.authOptions.clientCapabilities.length > 0)) { - requestParameters.addClaims(request.claims, this.config.authOptions.clientCapabilities); - } - return requestParameters.createQueryString(); - } -} - -export { DeviceCodeClient }; -//# sourceMappingURL=DeviceCodeClient.mjs.map diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/DeviceCodeClient.mjs.map b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/DeviceCodeClient.mjs.map deleted file mode 100644 index 78aac7f..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/DeviceCodeClient.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"DeviceCodeClient.mjs","sources":["../../src/client/DeviceCodeClient.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;AAAA;;;AAGG;AAwBH;;;AAGG;AACG,MAAO,gBAAiB,SAAQ,UAAU,CAAA;AAC5C,IAAA,WAAA,CAAY,aAAkC,EAAA;QAC1C,KAAK,CAAC,aAAa,CAAC,CAAC;KACxB;AAED;;;;AAIG;IACI,MAAM,YAAY,CACrB,OAAgC,EAAA;QAEhC,MAAM,kBAAkB,GAAuB,MAAM,IAAI,CAAC,aAAa,CACnE,OAAO,CACV,CAAC;AACF,QAAA,OAAO,CAAC,kBAAkB,CAAC,kBAAkB,CAAC,CAA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AAiB,CAAC,SAAS,CACvB,OAAO,CAAC,MAAM,EACd,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,kBAAkB,CAC7C,CAAC;AACL,SAAA;AACD,QAAA,OAAO,iBAAiB,CAAC,iBAAiB,EAAE,CAAC;KAChD;AACJ;;;;"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/IConfidentialClientApplication.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/IConfidentialClientApplication.d.ts deleted file mode 100644 index 93db1fe..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/IConfidentialClientApplication.d.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { AuthenticationResult, IAppTokenProvider, Logger } from "@azure/msal-common/node"; -import { AuthorizationCodeRequest } from "../request/AuthorizationCodeRequest.js"; -import { AuthorizationUrlRequest } from "../request/AuthorizationUrlRequest.js"; -import { ClientCredentialRequest } from "../request/ClientCredentialRequest.js"; -import { OnBehalfOfRequest } from "../request/OnBehalfOfRequest.js"; -import { RefreshTokenRequest } from "../request/RefreshTokenRequest.js"; -import { SilentFlowRequest } from "../request/SilentFlowRequest.js"; -import { UsernamePasswordRequest } from "../request/UsernamePasswordRequest.js"; -import { TokenCache } from "../cache/TokenCache.js"; -/** - * Interface for the ConfidentialClientApplication class defining the public API signatures - * @public - */ -export interface IConfidentialClientApplication { - /** Creates the URL of the authorization request */ - getAuthCodeUrl(request: AuthorizationUrlRequest): Promise; - /** Acquires a token by exchanging the authorization code received from the first step of OAuth 2.0 Authorization Code Flow */ - acquireTokenByCode(request: AuthorizationCodeRequest): Promise; - /** Acquires a token silently when a user specifies the account the token is requested for */ - acquireTokenSilent(request: SilentFlowRequest): Promise; - /** Acquires a token by exchanging the refresh token provided for a new set of tokens */ - acquireTokenByRefreshToken(request: RefreshTokenRequest): Promise; - /** Acquires tokens from the authority for the application (not for an end user) */ - acquireTokenByClientCredential(request: ClientCredentialRequest): Promise; - /** Acquires tokens from the authority for the application */ - acquireTokenOnBehalfOf(request: OnBehalfOfRequest): Promise; - /** Acquires tokens with password grant by exchanging client applications username and password for credentials */ - acquireTokenByUsernamePassword(request: UsernamePasswordRequest): Promise; - /** Gets the token cache for the application */ - getTokenCache(): TokenCache; - /** Returns the logger instance */ - getLogger(): Logger; - /** Replaces the default logger set in configurations with new Logger with new configurations */ - setLogger(logger: Logger): void; - /** Clear the cache */ - clearCache(): void; - /** This extensibility point is meant for Azure SDK to enhance Managed Identity support */ - SetAppTokenProvider(provider: IAppTokenProvider): void; -} -//# sourceMappingURL=IConfidentialClientApplication.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/IConfidentialClientApplication.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/IConfidentialClientApplication.d.ts.map deleted file mode 100644 index 3855a0e..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/IConfidentialClientApplication.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"IConfidentialClientApplication.d.ts","sourceRoot":"","sources":["../../src/client/IConfidentialClientApplication.ts"],"names":[],"mappings":"AAKA,OAAO,EACH,oBAAoB,EACpB,iBAAiB,EACjB,MAAM,EACT,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,wBAAwB,EAAE,MAAM,wCAAwC,CAAC;AAClF,OAAO,EAAE,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AAChF,OAAO,EAAE,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AAChF,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAAE,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AAChF,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEpD;;;GAGG;AACH,MAAM,WAAW,8BAA8B;IAC3C,mDAAmD;IACnD,cAAc,CAAC,OAAO,EAAE,uBAAuB,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAElE,+HAA+H;IAC/H,kBAAkB,CACd,OAAO,EAAE,wBAAwB,GAClC,OAAO,CAAC,oBAAoB,CAAC,CAAC;IAEjC,8FAA8F;IAC9F,kBAAkB,CACd,OAAO,EAAE,iBAAiB,GAC3B,OAAO,CAAC,oBAAoB,GAAG,IAAI,CAAC,CAAC;IAExC,wFAAwF;IACxF,0BAA0B,CACtB,OAAO,EAAE,mBAAmB,GAC7B,OAAO,CAAC,oBAAoB,GAAG,IAAI,CAAC,CAAC;IAExC,mFAAmF;IACnF,8BAA8B,CAC1B,OAAO,EAAE,uBAAuB,GACjC,OAAO,CAAC,oBAAoB,GAAG,IAAI,CAAC,CAAC;IAExC,6DAA6D;IAC7D,sBAAsB,CAClB,OAAO,EAAE,iBAAiB,GAC3B,OAAO,CAAC,oBAAoB,GAAG,IAAI,CAAC,CAAC;IAExC,kHAAkH;IAClH,8BAA8B,CAC1B,OAAO,EAAE,uBAAuB,GACjC,OAAO,CAAC,oBAAoB,GAAG,IAAI,CAAC,CAAC;IAExC,+CAA+C;IAC/C,aAAa,IAAI,UAAU,CAAC;IAE5B,kCAAkC;IAClC,SAAS,IAAI,MAAM,CAAC;IAEpB,gGAAgG;IAChG,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAEhC,sBAAsB;IACtB,UAAU,IAAI,IAAI,CAAC;IAEnB,0FAA0F;IAC1F,mBAAmB,CAAC,QAAQ,EAAE,iBAAiB,GAAG,IAAI,CAAC;CAC1D"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/IPublicClientApplication.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/IPublicClientApplication.d.ts deleted file mode 100644 index 3e42f84..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/IPublicClientApplication.d.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { AccountInfo, AuthenticationResult, Logger } from "@azure/msal-common/node"; -import { AuthorizationCodeRequest } from "../request/AuthorizationCodeRequest.js"; -import { AuthorizationUrlRequest } from "../request/AuthorizationUrlRequest.js"; -import { DeviceCodeRequest } from "../request/DeviceCodeRequest.js"; -import { RefreshTokenRequest } from "../request/RefreshTokenRequest.js"; -import { SilentFlowRequest } from "../request/SilentFlowRequest.js"; -import { UsernamePasswordRequest } from "../request/UsernamePasswordRequest.js"; -import { TokenCache } from "../cache/TokenCache.js"; -import { InteractiveRequest } from "../request/InteractiveRequest.js"; -import { SignOutRequest } from "../request/SignOutRequest.js"; -/** - * Interface for the PublicClientApplication class defining the public API signatures - * @public - */ -export interface IPublicClientApplication { - /** Creates the URL of the authorization request */ - getAuthCodeUrl(request: AuthorizationUrlRequest): Promise; - /** Acquires a token by exchanging the authorization code received from the first step of OAuth 2.0 Authorization Code Flow */ - acquireTokenByCode(request: AuthorizationCodeRequest): Promise; - /** Acquires a token interactively */ - acquireTokenInteractive(request: InteractiveRequest): Promise; - /** Acquires a token silently when a user specifies the account the token is requested for */ - acquireTokenSilent(request: SilentFlowRequest): Promise; - /** Acquires a token by exchanging the refresh token provided for a new set of tokens */ - acquireTokenByRefreshToken(request: RefreshTokenRequest): Promise; - /** Acquires a token from the authority using OAuth2.0 device code flow */ - acquireTokenByDeviceCode(request: DeviceCodeRequest): Promise; - /** Acquires tokens with password grant by exchanging client applications username and password for credentials */ - acquireTokenByUsernamePassword(request: UsernamePasswordRequest): Promise; - /** Gets the token cache for the application */ - getTokenCache(): TokenCache; - /** Returns the logger instance */ - getLogger(): Logger; - /** Replaces the default logger set in configurations with new Logger with new configurations */ - setLogger(logger: Logger): void; - /** Clear the cache */ - clearCache(): void; - /** Gets all cached accounts */ - getAllAccounts(): Promise; - /** Removes cache artifacts associated with the given account */ - signOut(request: SignOutRequest): Promise; -} -//# sourceMappingURL=IPublicClientApplication.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/IPublicClientApplication.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/IPublicClientApplication.d.ts.map deleted file mode 100644 index bc222f2..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/IPublicClientApplication.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"IPublicClientApplication.d.ts","sourceRoot":"","sources":["../../src/client/IPublicClientApplication.ts"],"names":[],"mappings":"AAKA,OAAO,EACH,WAAW,EACX,oBAAoB,EACpB,MAAM,EACT,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,wBAAwB,EAAE,MAAM,wCAAwC,CAAC;AAClF,OAAO,EAAE,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AAChF,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAAE,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AAChF,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AACtE,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAE9D;;;GAGG;AACH,MAAM,WAAW,wBAAwB;IACrC,mDAAmD;IACnD,cAAc,CAAC,OAAO,EAAE,uBAAuB,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAElE,8HAA8H;IAC9H,kBAAkB,CACd,OAAO,EAAE,wBAAwB,GAClC,OAAO,CAAC,oBAAoB,CAAC,CAAC;IAEjC,qCAAqC;IACrC,uBAAuB,CACnB,OAAO,EAAE,kBAAkB,GAC5B,OAAO,CAAC,oBAAoB,CAAC,CAAC;IAEjC,6FAA6F;IAC7F,kBAAkB,CACd,OAAO,EAAE,iBAAiB,GAC3B,OAAO,CAAC,oBAAoB,CAAC,CAAC;IAEjC,wFAAwF;IACxF,0BAA0B,CACtB,OAAO,EAAE,mBAAmB,GAC7B,OAAO,CAAC,oBAAoB,GAAG,IAAI,CAAC,CAAC;IAExC,0EAA0E;IAC1E,wBAAwB,CACpB,OAAO,EAAE,iBAAiB,GAC3B,OAAO,CAAC,oBAAoB,GAAG,IAAI,CAAC,CAAC;IAExC,kHAAkH;IAClH,8BAA8B,CAC1B,OAAO,EAAE,uBAAuB,GACjC,OAAO,CAAC,oBAAoB,GAAG,IAAI,CAAC,CAAC;IAExC,+CAA+C;IAC/C,aAAa,IAAI,UAAU,CAAC;IAE5B,kCAAkC;IAClC,SAAS,IAAI,MAAM,CAAC;IAEpB,gGAAgG;IAChG,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAEhC,sBAAsB;IACtB,UAAU,IAAI,IAAI,CAAC;IAEnB,+BAA+B;IAC/B,cAAc,IAAI,OAAO,CAAC,WAAW,EAAE,CAAC,CAAC;IAEzC,gEAAgE;IAChE,OAAO,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACnD"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ManagedIdentityApplication.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ManagedIdentityApplication.d.ts deleted file mode 100644 index abf13c1..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ManagedIdentityApplication.d.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { AuthenticationResult } from "@azure/msal-common/node"; -import { ManagedIdentityConfiguration } from "../config/Configuration.js"; -import { ManagedIdentityRequestParams } from "../request/ManagedIdentityRequestParams.js"; -import { ManagedIdentitySourceNames } from "../utils/Constants.js"; -/** - * Class to initialize a managed identity and identify the service - * @public - */ -export declare class ManagedIdentityApplication { - private config; - private logger; - private static nodeStorage?; - private networkClient; - private cryptoProvider; - private fakeAuthority; - private fakeClientCredentialClient; - private managedIdentityClient; - constructor(configuration?: ManagedIdentityConfiguration); - /** - * Acquire an access token from the cache or the managed identity - * @param managedIdentityRequest - the ManagedIdentityRequestParams object passed in by the developer - * @returns the access token - */ - acquireToken(managedIdentityRequestParams: ManagedIdentityRequestParams): Promise; - /** - * Determine the Managed Identity Source based on available environment variables. This API is consumed by Azure Identity SDK. - * @returns ManagedIdentitySourceNames - The Managed Identity source's name - */ - getManagedIdentitySource(): ManagedIdentitySourceNames; -} -//# sourceMappingURL=ManagedIdentityApplication.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ManagedIdentityApplication.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ManagedIdentityApplication.d.ts.map deleted file mode 100644 index 974acf1..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ManagedIdentityApplication.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ManagedIdentityApplication.d.ts","sourceRoot":"","sources":["../../src/client/ManagedIdentityApplication.ts"],"names":[],"mappings":"AAKA,OAAO,EAYH,oBAAoB,EAGvB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACH,4BAA4B,EAG/B,MAAM,4BAA4B,CAAC;AAMpC,OAAO,EAAE,4BAA4B,EAAE,MAAM,4CAA4C,CAAC;AAE1F,OAAO,EAEH,0BAA0B,EAC7B,MAAM,uBAAuB,CAAC;AAE/B;;;GAGG;AACH,qBAAa,0BAA0B;IACnC,OAAO,CAAC,MAAM,CAAmC;IAEjD,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,MAAM,CAAC,WAAW,CAAC,CAAc;IACzC,OAAO,CAAC,aAAa,CAAiB;IACtC,OAAO,CAAC,cAAc,CAAiB;IAGvC,OAAO,CAAC,aAAa,CAAY;IAGjC,OAAO,CAAC,0BAA0B,CAAyB;IAE3D,OAAO,CAAC,qBAAqB,CAAwB;gBAEzC,aAAa,CAAC,EAAE,4BAA4B;IA2DxD;;;;OAIG;IACU,YAAY,CACrB,4BAA4B,EAAE,4BAA4B,GAC3D,OAAO,CAAC,oBAAoB,CAAC;IAqEhC;;;OAGG;IACI,wBAAwB,IAAI,0BAA0B;CAMhE"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ManagedIdentityApplication.mjs b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ManagedIdentityApplication.mjs deleted file mode 100644 index 5b8dd45..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ManagedIdentityApplication.mjs +++ /dev/null @@ -1,99 +0,0 @@ -/*! @azure/msal-node v2.16.3 2025-08-05 */ -'use strict'; -import { Logger, DEFAULT_CRYPTO_IMPLEMENTATION, Constants, Authority, ProtocolMode, createClientConfigurationError, ClientConfigurationErrorCodes, CacheOutcome } from '@azure/msal-common/node'; -import { buildManagedIdentityConfiguration } from '../config/Configuration.mjs'; -import { name, version } from '../packageMetadata.mjs'; -import { CryptoProvider } from '../crypto/CryptoProvider.mjs'; -import { ClientCredentialClient } from './ClientCredentialClient.mjs'; -import { ManagedIdentityClient } from './ManagedIdentityClient.mjs'; -import { NodeStorage } from '../cache/NodeStorage.mjs'; -import { DEFAULT_AUTHORITY_FOR_MANAGED_IDENTITY } from '../utils/Constants.mjs'; - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * Class to initialize a managed identity and identify the service - * @public - */ -class ManagedIdentityApplication { - constructor(configuration) { - // undefined config means the managed identity is system-assigned - this.config = buildManagedIdentityConfiguration(configuration || {}); - this.logger = new Logger(this.config.system.loggerOptions, name, version); - const fakeStatusAuthorityOptions = { - canonicalAuthority: Constants.DEFAULT_AUTHORITY, - }; - if (!ManagedIdentityApplication.nodeStorage) { - ManagedIdentityApplication.nodeStorage = new NodeStorage(this.logger, this.config.managedIdentityId.id, DEFAULT_CRYPTO_IMPLEMENTATION, fakeStatusAuthorityOptions); - } - this.networkClient = this.config.system.networkClient; - this.cryptoProvider = new CryptoProvider(); - const fakeAuthorityOptions = { - protocolMode: ProtocolMode.AAD, - knownAuthorities: [DEFAULT_AUTHORITY_FOR_MANAGED_IDENTITY], - cloudDiscoveryMetadata: "", - authorityMetadata: "", - }; - this.fakeAuthority = new Authority(DEFAULT_AUTHORITY_FOR_MANAGED_IDENTITY, this.networkClient, ManagedIdentityApplication.nodeStorage, fakeAuthorityOptions, this.logger, this.cryptoProvider.createNewGuid(), // correlationID - undefined, true); - this.fakeClientCredentialClient = new ClientCredentialClient({ - authOptions: { - clientId: this.config.managedIdentityId.id, - authority: this.fakeAuthority, - }, - }); - this.managedIdentityClient = new ManagedIdentityClient(this.logger, ManagedIdentityApplication.nodeStorage, this.networkClient, this.cryptoProvider); - } - /** - * Acquire an access token from the cache or the managed identity - * @param managedIdentityRequest - the ManagedIdentityRequestParams object passed in by the developer - * @returns the access token - */ - async acquireToken(managedIdentityRequestParams) { - if (!managedIdentityRequestParams.resource) { - throw createClientConfigurationError(ClientConfigurationErrorCodes.urlEmptyError); - } - const managedIdentityRequest = { - forceRefresh: managedIdentityRequestParams.forceRefresh, - resource: managedIdentityRequestParams.resource.replace("/.default", ""), - scopes: [ - managedIdentityRequestParams.resource.replace("/.default", ""), - ], - authority: this.fakeAuthority.canonicalAuthority, - correlationId: this.cryptoProvider.createNewGuid(), - }; - if (managedIdentityRequestParams.claims || - managedIdentityRequest.forceRefresh) { - // make a network call to the managed identity source - return this.managedIdentityClient.sendManagedIdentityTokenRequest(managedIdentityRequest, this.config.managedIdentityId, this.fakeAuthority); - } - const [cachedAuthenticationResult, lastCacheOutcome] = await this.fakeClientCredentialClient.getCachedAuthenticationResult(managedIdentityRequest, this.config, this.cryptoProvider, this.fakeAuthority, ManagedIdentityApplication.nodeStorage); - if (cachedAuthenticationResult) { - // if the token is not expired but must be refreshed; get a new one in the background - if (lastCacheOutcome === CacheOutcome.PROACTIVELY_REFRESHED) { - this.logger.info("ClientCredentialClient:getCachedAuthenticationResult - Cached access token's refreshOn property has been exceeded'. It's not expired, but must be refreshed."); - // make a network call to the managed identity source; refresh the access token in the background - const refreshAccessToken = true; - await this.managedIdentityClient.sendManagedIdentityTokenRequest(managedIdentityRequest, this.config.managedIdentityId, this.fakeAuthority, refreshAccessToken); - } - return cachedAuthenticationResult; - } - else { - // make a network call to the managed identity source - return this.managedIdentityClient.sendManagedIdentityTokenRequest(managedIdentityRequest, this.config.managedIdentityId, this.fakeAuthority); - } - } - /** - * Determine the Managed Identity Source based on available environment variables. This API is consumed by Azure Identity SDK. - * @returns ManagedIdentitySourceNames - The Managed Identity source's name - */ - getManagedIdentitySource() { - return (ManagedIdentityClient.sourceName || - this.managedIdentityClient.getManagedIdentitySource()); - } -} - -export { ManagedIdentityApplication }; -//# sourceMappingURL=ManagedIdentityApplication.mjs.map diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ManagedIdentityApplication.mjs.map b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ManagedIdentityApplication.mjs.map deleted file mode 100644 index aed0933..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ManagedIdentityApplication.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ManagedIdentityApplication.mjs","sources":["../../src/client/ManagedIdentityApplication.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;;;AAAA;;;AAGG;AAmCH;;;AAGG;MACU,0BAA0B,CAAA;AAgBnC,IAAA,WAAA,CAAY,aAA4C,EAAA;;QAEpD,IAAI,CAAC,MAAM,GAAG,iCAAiC,CAAC,aAAa,IAAI,EAAE,CAAC,CAAC;AAErE,QAAA,IAAI,CAAC,MAAM,GAAG,IAAI,MAAM,CACpB,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,aAAa,EAChC,IAAI,EACJ,OAAO,CACV,CAAC;AAEF,QAAA,MAAM,0BAA0B,GAA2B;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C,qBAAqB,CAAC,+BAA+B,CAC5D,sBAAsB,EACtB,IAAI,CAAC,MAAM,CAAC,iBAAiB,EAC7B,IAAI,CAAC,aAAa,EAClB,kBAAkB,CACrB,CAAC;AACL,aAAA;AAED,YAAA,OAAO,0BAA0B,CAAC;AACrC,SAAA;AAAM,aAAA;;AAEH,YAAA,OAAO,IAAI,CAAC,qBAAqB,CAAC,+BAA+B,CAC7D,sBAAsB,EACtB,IAAI,CAAC,MAAM,CAAC,iBAAiB,EAC7B,IAAI,CAAC,aAAa,CACrB,CAAC;AACL,SAAA;KACJ;AAED;;;AAGG;IACI,wBAAwB,GAAA;QAC3B,QACI,qBAAqB,CAAC,UAAU;AAChC,YAAA,IAAI,CAAC,qBAAqB,CAAC,wBAAwB,EAAE,EACvD;KACL;AACJ;;;;"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ManagedIdentityClient.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ManagedIdentityClient.d.ts deleted file mode 100644 index c7371d5..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ManagedIdentityClient.d.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { Authority, INetworkModule, Logger, AuthenticationResult } from "@azure/msal-common/node"; -import { CryptoProvider } from "../crypto/CryptoProvider.js"; -import { ManagedIdentityRequest } from "../request/ManagedIdentityRequest.js"; -import { ManagedIdentityId } from "../config/ManagedIdentityId.js"; -import { NodeStorage } from "../cache/NodeStorage.js"; -import { ManagedIdentitySourceNames } from "../utils/Constants.js"; -export declare class ManagedIdentityClient { - private logger; - private nodeStorage; - private networkClient; - private cryptoProvider; - private static identitySource?; - static sourceName?: ManagedIdentitySourceNames; - constructor(logger: Logger, nodeStorage: NodeStorage, networkClient: INetworkModule, cryptoProvider: CryptoProvider); - sendManagedIdentityTokenRequest(managedIdentityRequest: ManagedIdentityRequest, managedIdentityId: ManagedIdentityId, fakeAuthority: Authority, refreshAccessToken?: boolean): Promise; - private allEnvironmentVariablesAreDefined; - /** - * Determine the Managed Identity Source based on available environment variables. This API is consumed by ManagedIdentityApplication's getManagedIdentitySource. - * @returns ManagedIdentitySourceNames - The Managed Identity source's name - */ - getManagedIdentitySource(): ManagedIdentitySourceNames; - /** - * Tries to create a managed identity source for all sources - * @returns the managed identity Source - */ - private selectManagedIdentitySource; -} -//# sourceMappingURL=ManagedIdentityClient.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ManagedIdentityClient.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ManagedIdentityClient.d.ts.map deleted file mode 100644 index 6b7d520..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ManagedIdentityClient.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ManagedIdentityClient.d.ts","sourceRoot":"","sources":["../../src/client/ManagedIdentityClient.ts"],"names":[],"mappings":"AAKA,OAAO,EACH,SAAS,EACT,cAAc,EACd,MAAM,EACN,oBAAoB,EACvB,MAAM,yBAAyB,CAAC;AAMjC,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAK7D,OAAO,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAC;AAC9E,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAEtD,OAAO,EAAE,0BAA0B,EAAE,MAAM,uBAAuB,CAAC;AAMnE,qBAAa,qBAAqB;IAC9B,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,WAAW,CAAc;IACjC,OAAO,CAAC,aAAa,CAAiB;IACtC,OAAO,CAAC,cAAc,CAAiB;IAEvC,OAAO,CAAC,MAAM,CAAC,cAAc,CAAC,CAA4B;IAC1D,OAAc,UAAU,CAAC,EAAE,0BAA0B,CAAC;gBAGlD,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,WAAW,EACxB,aAAa,EAAE,cAAc,EAC7B,cAAc,EAAE,cAAc;IAQrB,+BAA+B,CACxC,sBAAsB,EAAE,sBAAsB,EAC9C,iBAAiB,EAAE,iBAAiB,EACpC,aAAa,EAAE,SAAS,EACxB,kBAAkB,CAAC,EAAE,OAAO,GAC7B,OAAO,CAAC,oBAAoB,CAAC;IAoBhC,OAAO,CAAC,iCAAiC;IAUzC;;;OAGG;IACI,wBAAwB,IAAI,0BAA0B;IAuB7D;;;OAGG;IACH,OAAO,CAAC,2BAA2B;CA2CtC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ManagedIdentityClient.mjs b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ManagedIdentityClient.mjs deleted file mode 100644 index a173a1f..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ManagedIdentityClient.mjs +++ /dev/null @@ -1,74 +0,0 @@ -/*! @azure/msal-node v2.16.3 2025-08-05 */ -'use strict'; -import { AppService } from './ManagedIdentitySources/AppService.mjs'; -import { AzureArc } from './ManagedIdentitySources/AzureArc.mjs'; -import { CloudShell } from './ManagedIdentitySources/CloudShell.mjs'; -import { Imds } from './ManagedIdentitySources/Imds.mjs'; -import { ServiceFabric } from './ManagedIdentitySources/ServiceFabric.mjs'; -import { createManagedIdentityError } from '../error/ManagedIdentityError.mjs'; -import { ManagedIdentitySourceNames } from '../utils/Constants.mjs'; -import { unableToCreateSource } from '../error/ManagedIdentityErrorCodes.mjs'; - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/* - * Class to initialize a managed identity and identify the service. - * Original source of code: https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/identity/Azure.Identity/src/ManagedIdentityClient.cs - */ -class ManagedIdentityClient { - constructor(logger, nodeStorage, networkClient, cryptoProvider) { - this.logger = logger; - this.nodeStorage = nodeStorage; - this.networkClient = networkClient; - this.cryptoProvider = cryptoProvider; - } - async sendManagedIdentityTokenRequest(managedIdentityRequest, managedIdentityId, fakeAuthority, refreshAccessToken) { - if (!ManagedIdentityClient.identitySource) { - ManagedIdentityClient.identitySource = - this.selectManagedIdentitySource(this.logger, this.nodeStorage, this.networkClient, this.cryptoProvider, managedIdentityId); - } - return ManagedIdentityClient.identitySource.acquireTokenWithManagedIdentity(managedIdentityRequest, managedIdentityId, fakeAuthority, refreshAccessToken); - } - allEnvironmentVariablesAreDefined(environmentVariables) { - return Object.values(environmentVariables).every((environmentVariable) => { - return environmentVariable !== undefined; - }); - } - /** - * Determine the Managed Identity Source based on available environment variables. This API is consumed by ManagedIdentityApplication's getManagedIdentitySource. - * @returns ManagedIdentitySourceNames - The Managed Identity source's name - */ - getManagedIdentitySource() { - ManagedIdentityClient.sourceName = - this.allEnvironmentVariablesAreDefined(ServiceFabric.getEnvironmentVariables()) - ? ManagedIdentitySourceNames.SERVICE_FABRIC - : this.allEnvironmentVariablesAreDefined(AppService.getEnvironmentVariables()) - ? ManagedIdentitySourceNames.APP_SERVICE - : this.allEnvironmentVariablesAreDefined(CloudShell.getEnvironmentVariables()) - ? ManagedIdentitySourceNames.CLOUD_SHELL - : this.allEnvironmentVariablesAreDefined(AzureArc.getEnvironmentVariables()) - ? ManagedIdentitySourceNames.AZURE_ARC - : ManagedIdentitySourceNames.DEFAULT_TO_IMDS; - return ManagedIdentityClient.sourceName; - } - /** - * Tries to create a managed identity source for all sources - * @returns the managed identity Source - */ - selectManagedIdentitySource(logger, nodeStorage, networkClient, cryptoProvider, managedIdentityId) { - const source = ServiceFabric.tryCreate(logger, nodeStorage, networkClient, cryptoProvider, managedIdentityId) || - AppService.tryCreate(logger, nodeStorage, networkClient, cryptoProvider) || - CloudShell.tryCreate(logger, nodeStorage, networkClient, cryptoProvider, managedIdentityId) || - AzureArc.tryCreate(logger, nodeStorage, networkClient, cryptoProvider, managedIdentityId) || - Imds.tryCreate(logger, nodeStorage, networkClient, cryptoProvider); - if (!source) { - throw createManagedIdentityError(unableToCreateSource); - } - return source; - } -} - -export { ManagedIdentityClient }; -//# sourceMappingURL=ManagedIdentityClient.mjs.map diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ManagedIdentityClient.mjs.map b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ManagedIdentityClient.mjs.map deleted file mode 100644 index 261b081..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ManagedIdentityClient.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ManagedIdentityClient.mjs","sources":["../../src/client/ManagedIdentityClient.ts"],"sourcesContent":[null],"names":["ManagedIdentityErrorCodes.unableToCreateSource"],"mappings":";;;;;;;;;;;AAAA;;;AAGG;AAwBH;;;AAGG;MACU,qBAAqB,CAAA;AAS9B,IAAA,WAAA,CACI,MAAc,EACd,WAAwB,EACxB,aAA6B,EAC7B,cAA8B,EAAA;AAE9B,QAAA,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;AACrB,QAAA,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;AAC/B,QAAA,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;AACnC,QAAA,IAAI,CAAC,cAAc,GAAG,cAAc,CAAC;KACxC;IAEM,MAAM,+BAA+B,CACxC,sBAA8C,EAC9C,iBAAoC,EACpC,aAAwB,EACxB,kBAA4B,EAAA;AAE5B,QAAA,IAAI,CAAC,qBAAqB,CAAC,cAAc,EAAE;AACvC,YAAA,qBAAqB,CAAC,cAAc;gBAChC,IAAI,CAAC,2BAA2B,CAC5B,IAAI,CAAC,MAAM,EACX,IAAI,CAAC,WAAW,EAChB,IAAI,CAAC,aAAa,EAClB,IAAI,CAAC,cAAc,EACnB,iBAAiB,CACpB,CAAC;AACT,SAAA;AAED,QAAA,OAAO,qBAAqB,CAAC,cAAc,CAAC,+BAA+B,CACvE,sBAAsB,EACtB,iBAAiB,EACjB,aAAa,EACb,kBAAkB,CACrB,CAAC;KACL;AAEO,IAAA,iCAAiC,CAC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,EAAE,aAAa,EAAE,cAAc,CAAC,CAAC;QACvE,IAAI,CAAC,MAAM,EAAE;AACT,YAAA,MAAM,0BAA0B,CAC5BA,oBAA8C,CACjD,CAAC;AACL,SAAA;AACD,QAAA,OAAO,MAAM,CAAC;KACjB;AACJ;;;;"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ManagedIdentitySources/AppService.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ManagedIdentitySources/AppService.d.ts deleted file mode 100644 index 25bfd37..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ManagedIdentitySources/AppService.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { INetworkModule, Logger } from "@azure/msal-common/node"; -import { BaseManagedIdentitySource } from "./BaseManagedIdentitySource.js"; -import { CryptoProvider } from "../../crypto/CryptoProvider.js"; -import { ManagedIdentityRequestParameters } from "../../config/ManagedIdentityRequestParameters.js"; -import { ManagedIdentityId } from "../../config/ManagedIdentityId.js"; -import { NodeStorage } from "../../cache/NodeStorage.js"; -/** - * Original source of code: https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/identity/Azure.Identity/src/AppServiceManagedIdentitySource.cs - */ -export declare class AppService extends BaseManagedIdentitySource { - private identityEndpoint; - private identityHeader; - constructor(logger: Logger, nodeStorage: NodeStorage, networkClient: INetworkModule, cryptoProvider: CryptoProvider, identityEndpoint: string, identityHeader: string); - static getEnvironmentVariables(): Array; - static tryCreate(logger: Logger, nodeStorage: NodeStorage, networkClient: INetworkModule, cryptoProvider: CryptoProvider): AppService | null; - createRequest(resource: string, managedIdentityId: ManagedIdentityId): ManagedIdentityRequestParameters; -} -//# sourceMappingURL=AppService.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ManagedIdentitySources/AppService.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ManagedIdentitySources/AppService.d.ts.map deleted file mode 100644 index ea9515b..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ManagedIdentitySources/AppService.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AppService.d.ts","sourceRoot":"","sources":["../../../src/client/ManagedIdentitySources/AppService.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAU3E,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAChE,OAAO,EAAE,gCAAgC,EAAE,MAAM,kDAAkD,CAAC;AACpG,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AACtE,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAKzD;;GAEG;AACH,qBAAa,UAAW,SAAQ,yBAAyB;IACrD,OAAO,CAAC,gBAAgB,CAAS;IACjC,OAAO,CAAC,cAAc,CAAS;gBAG3B,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,WAAW,EACxB,aAAa,EAAE,cAAc,EAC7B,cAAc,EAAE,cAAc,EAC9B,gBAAgB,EAAE,MAAM,EACxB,cAAc,EAAE,MAAM;WAQZ,uBAAuB,IAAI,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC;WAapD,SAAS,CACnB,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,WAAW,EACxB,aAAa,EAAE,cAAc,EAC7B,cAAc,EAAE,cAAc,GAC/B,UAAU,GAAG,IAAI;IAkCb,aAAa,CAChB,QAAQ,EAAE,MAAM,EAChB,iBAAiB,EAAE,iBAAiB,GACrC,gCAAgC;CA4BtC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ManagedIdentitySources/AppService.mjs b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ManagedIdentitySources/AppService.mjs deleted file mode 100644 index ee56b58..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ManagedIdentitySources/AppService.mjs +++ /dev/null @@ -1,54 +0,0 @@ -/*! @azure/msal-node v2.16.3 2025-08-05 */ -'use strict'; -import { BaseManagedIdentitySource } from './BaseManagedIdentitySource.mjs'; -import { ManagedIdentityEnvironmentVariableNames, ManagedIdentitySourceNames, APP_SERVICE_SECRET_HEADER_NAME, API_VERSION_QUERY_PARAMETER_NAME, RESOURCE_BODY_OR_QUERY_PARAMETER_NAME, ManagedIdentityIdType, HttpMethod } from '../../utils/Constants.mjs'; -import { ManagedIdentityRequestParameters } from '../../config/ManagedIdentityRequestParameters.mjs'; - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -// MSI Constants. Docs for MSI are available here https://docs.microsoft.com/azure/app-service/overview-managed-identity -const APP_SERVICE_MSI_API_VERSION = "2019-08-01"; -/** - * Original source of code: https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/identity/Azure.Identity/src/AppServiceManagedIdentitySource.cs - */ -class AppService extends BaseManagedIdentitySource { - constructor(logger, nodeStorage, networkClient, cryptoProvider, identityEndpoint, identityHeader) { - super(logger, nodeStorage, networkClient, cryptoProvider); - this.identityEndpoint = identityEndpoint; - this.identityHeader = identityHeader; - } - static getEnvironmentVariables() { - const identityEndpoint = process.env[ManagedIdentityEnvironmentVariableNames.IDENTITY_ENDPOINT]; - const identityHeader = process.env[ManagedIdentityEnvironmentVariableNames.IDENTITY_HEADER]; - return [identityEndpoint, identityHeader]; - } - static tryCreate(logger, nodeStorage, networkClient, cryptoProvider) { - const [identityEndpoint, identityHeader] = AppService.getEnvironmentVariables(); - // if either of the identity endpoint or identity header variables are undefined, this MSI provider is unavailable. - if (!identityEndpoint || !identityHeader) { - logger.info(`[Managed Identity] ${ManagedIdentitySourceNames.APP_SERVICE} managed identity is unavailable because one or both of the '${ManagedIdentityEnvironmentVariableNames.IDENTITY_HEADER}' and '${ManagedIdentityEnvironmentVariableNames.IDENTITY_ENDPOINT}' environment variables are not defined.`); - return null; - } - const validatedIdentityEndpoint = AppService.getValidatedEnvVariableUrlString(ManagedIdentityEnvironmentVariableNames.IDENTITY_ENDPOINT, identityEndpoint, ManagedIdentitySourceNames.APP_SERVICE, logger); - logger.info(`[Managed Identity] Environment variables validation passed for ${ManagedIdentitySourceNames.APP_SERVICE} managed identity. Endpoint URI: ${validatedIdentityEndpoint}. Creating ${ManagedIdentitySourceNames.APP_SERVICE} managed identity.`); - return new AppService(logger, nodeStorage, networkClient, cryptoProvider, identityEndpoint, identityHeader); - } - createRequest(resource, managedIdentityId) { - const request = new ManagedIdentityRequestParameters(HttpMethod.GET, this.identityEndpoint); - request.headers[APP_SERVICE_SECRET_HEADER_NAME] = this.identityHeader; - request.queryParameters[API_VERSION_QUERY_PARAMETER_NAME] = - APP_SERVICE_MSI_API_VERSION; - request.queryParameters[RESOURCE_BODY_OR_QUERY_PARAMETER_NAME] = - resource; - if (managedIdentityId.idType !== ManagedIdentityIdType.SYSTEM_ASSIGNED) { - request.queryParameters[this.getManagedIdentityUserAssignedIdQueryParameterKey(managedIdentityId.idType)] = managedIdentityId.id; - } - // bodyParameters calculated in BaseManagedIdentity.acquireTokenWithManagedIdentity - return request; - } -} - -export { AppService }; -//# sourceMappingURL=AppService.mjs.map diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ManagedIdentitySources/AppService.mjs.map b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ManagedIdentitySources/AppService.mjs.map deleted file mode 100644 index 541af39..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ManagedIdentitySources/AppService.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AppService.mjs","sources":["../../../src/client/ManagedIdentitySources/AppService.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;AAAA;;;AAGG;AAkBH;AACA,MAAM,2BAA2B,GAAW,YAAY,CAAC;AAEzD;;AAEG;AACG,MAAO,UAAW,SAAQ,yBAAyB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,EAAA,yBAAyB,cAAc,0BAA0B,CAAC,WAAW,CAAA,kBAAA,CAAoB,CAChP,CAAC;AAEF,QAAA,OAAO,IAAI,UAAU,CACjB,MAAM,EACN,WAAW,EACX,aAAa,EACb,cAAc,EACd,gBAAgB,EAChB,cAAc,CACjB,CAAC;KACL;IAEM,aAAa,CAChB,QAAgB,EAChB,iBAAoC,EAAA;AAEpC,QAAA,MAAM,OAAO,GACT,IAAI,gCAAgC,CAChC,UAAU,CAAC,GAAG,EACd,IAAI,CAAC,gBAAgB,CACxB,CAAC;QAEN,OAAO,CAAC,OAAO,CAAC,8BAA8B,CAAC,GAAG,IAAI,CAAC,cAAc,CAAC;AAEtE,QAAA,OAAO,CAAC,eAAe,CAAC,gCAAgC,CAAC;AACrD,YAAA,2BAA2B,CAAC;AAChC,QAAA,OAAO,CAAC,eAAe,CAAC,qCAAqC,CAAC;AAC1D,YAAA,QAAQ,CAAC;AAEb,QAAA,IACI,iBAAiB,CAAC,MAAM,KAAK,qBAAqB,CAAC,eAAe,EACpE;AACE,YAAA,OAAO,CAAC,eAAe,CACnB,IAAI,CAAC,iDAAiD,CAClD,iBAAiB,CAAC,MAAM,CAC3B,CACJ,GAAG,iBAAiB,CAAC,EAAE,CAAC;AAC5B,SAAA;;AAID,QAAA,OAAO,OAAO,CAAC;KAClB;AACJ;;;;"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ManagedIdentitySources/AzureArc.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ManagedIdentitySources/AzureArc.d.ts deleted file mode 100644 index 10efca1..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ManagedIdentitySources/AzureArc.d.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { INetworkModule, NetworkResponse, NetworkRequestOptions, Logger, ServerAuthorizationTokenResponse } from "@azure/msal-common/node"; -import { ManagedIdentityRequestParameters } from "../../config/ManagedIdentityRequestParameters.js"; -import { BaseManagedIdentitySource } from "./BaseManagedIdentitySource.js"; -import { CryptoProvider } from "../../crypto/CryptoProvider.js"; -import { NodeStorage } from "../../cache/NodeStorage.js"; -import { ManagedIdentityTokenResponse } from "../../response/ManagedIdentityTokenResponse.js"; -import { ManagedIdentityId } from "../../config/ManagedIdentityId.js"; -export declare const ARC_API_VERSION: string; -export declare const DEFAULT_AZURE_ARC_IDENTITY_ENDPOINT: string; -type FilePathMap = { - win32: string; - linux: string; -}; -export declare const SUPPORTED_AZURE_ARC_PLATFORMS: FilePathMap; -export declare const AZURE_ARC_FILE_DETECTION: FilePathMap; -/** - * Original source of code: https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/identity/Azure.Identity/src/AzureArcManagedIdentitySource.cs - */ -export declare class AzureArc extends BaseManagedIdentitySource { - private identityEndpoint; - constructor(logger: Logger, nodeStorage: NodeStorage, networkClient: INetworkModule, cryptoProvider: CryptoProvider, identityEndpoint: string); - static getEnvironmentVariables(): Array; - static tryCreate(logger: Logger, nodeStorage: NodeStorage, networkClient: INetworkModule, cryptoProvider: CryptoProvider, managedIdentityId: ManagedIdentityId): AzureArc | null; - createRequest(resource: string): ManagedIdentityRequestParameters; - getServerTokenResponseAsync(originalResponse: NetworkResponse, networkClient: INetworkModule, networkRequest: ManagedIdentityRequestParameters, networkRequestOptions: NetworkRequestOptions): Promise; -} -export {}; -//# sourceMappingURL=AzureArc.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ManagedIdentitySources/AzureArc.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ManagedIdentitySources/AzureArc.d.ts.map deleted file mode 100644 index e447b2c..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ManagedIdentitySources/AzureArc.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AzureArc.d.ts","sourceRoot":"","sources":["../../../src/client/ManagedIdentitySources/AzureArc.ts"],"names":[],"mappings":"AAKA,O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AC/D,aAAa,EAAE,cAAc,EAC7B,cAAc,EAAE,gCAAgC,EAChD,qBAAqB,EAAE,qBAAqB,GAC7C,OAAO,CAAC,gCAAgC,CAAC;CA0G/C"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ManagedIdentitySources/AzureArc.mjs b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ManagedIdentitySources/AzureArc.mjs deleted file mode 100644 index 5137702..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ManagedIdentitySources/AzureArc.mjs +++ /dev/null @@ -1,167 +0,0 @@ -/*! @azure/msal-node v2.16.3 2025-08-05 */ -'use strict'; -import { HttpStatus, AuthError, createClientAuthError, ClientAuthErrorCodes } from '@azure/msal-common/node'; -import { ManagedIdentityRequestParameters } from '../../config/ManagedIdentityRequestParameters.mjs'; -import { BaseManagedIdentitySource } from './BaseManagedIdentitySource.mjs'; -import { createManagedIdentityError } from '../../error/ManagedIdentityError.mjs'; -import { ManagedIdentityEnvironmentVariableNames, ManagedIdentitySourceNames, ManagedIdentityIdType, HttpMethod, METADATA_HEADER_NAME, API_VERSION_QUERY_PARAMETER_NAME, RESOURCE_BODY_OR_QUERY_PARAMETER_NAME, AZURE_ARC_SECRET_FILE_MAX_SIZE_BYTES, AUTHORIZATION_HEADER_NAME } from '../../utils/Constants.mjs'; -import { accessSync, constants, statSync, readFileSync } from 'fs'; -import path from 'path'; -import { unableToCreateAzureArc, wwwAuthenticateHeaderMissing, wwwAuthenticateHeaderUnsupportedFormat, platformNotSupported, invalidFileExtension, invalidFilePath, unableToReadSecretFile, invalidSecret } from '../../error/ManagedIdentityErrorCodes.mjs'; - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -const ARC_API_VERSION = "2019-11-01"; -const DEFAULT_AZURE_ARC_IDENTITY_ENDPOINT = "http://127.0.0.1:40342/metadata/identity/oauth2/token"; -const HIMDS_EXECUTABLE_HELPER_STRING = "N/A: himds executable exists"; -const SUPPORTED_AZURE_ARC_PLATFORMS = { - win32: `${process.env["ProgramData"]}\\AzureConnectedMachineAgent\\Tokens\\`, - linux: "/var/opt/azcmagent/tokens/", -}; -const AZURE_ARC_FILE_DETECTION = { - win32: `${process.env["ProgramFiles"]}\\AzureConnectedMachineAgent\\himds.exe`, - linux: "/opt/azcmagent/bin/himds", -}; -/** - * Original source of code: https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/identity/Azure.Identity/src/AzureArcManagedIdentitySource.cs - */ -class AzureArc extends BaseManagedIdentitySource { - constructor(logger, nodeStorage, networkClient, cryptoProvider, identityEndpoint) { - super(logger, nodeStorage, networkClient, cryptoProvider); - this.identityEndpoint = identityEndpoint; - } - static getEnvironmentVariables() { - let identityEndpoint = process.env[ManagedIdentityEnvironmentVariableNames.IDENTITY_ENDPOINT]; - let imdsEndpoint = process.env[ManagedIdentityEnvironmentVariableNames.IMDS_ENDPOINT]; - // if either of the identity or imds endpoints are undefined, check if the himds executable exists - if (!identityEndpoint || !imdsEndpoint) { - // get the expected Windows or Linux file path of the himds executable - const fileDetectionPath = AZURE_ARC_FILE_DETECTION[process.platform]; - try { - /* - * check if the himds executable exists and its permissions allow it to be read - * returns undefined if true, throws an error otherwise - */ - accessSync(fileDetectionPath, constants.F_OK | constants.R_OK); - identityEndpoint = DEFAULT_AZURE_ARC_IDENTITY_ENDPOINT; - imdsEndpoint = HIMDS_EXECUTABLE_HELPER_STRING; - } - catch (err) { - /* - * do nothing - * accessSync returns undefined on success, and throws an error on failure - */ - } - } - return [identityEndpoint, imdsEndpoint]; - } - static tryCreate(logger, nodeStorage, networkClient, cryptoProvider, managedIdentityId) { - const [identityEndpoint, imdsEndpoint] = AzureArc.getEnvironmentVariables(); - // if either of the identity or imds endpoints are undefined (even after himds file detection) - if (!identityEndpoint || !imdsEndpoint) { - logger.info(`[Managed Identity] ${ManagedIdentitySourceNames.AZURE_ARC} managed identity is unavailable through environment variables because one or both of '${ManagedIdentityEnvironmentVariableNames.IDENTITY_ENDPOINT}' and '${ManagedIdentityEnvironmentVariableNames.IMDS_ENDPOINT}' are not defined. ${ManagedIdentitySourceNames.AZURE_ARC} managed identity is also unavailable through file detection.`); - return null; - } - // check if the imds endpoint is set to the default for file detection - if (imdsEndpoint === HIMDS_EXECUTABLE_HELPER_STRING) { - logger.info(`[Managed Identity] ${ManagedIdentitySourceNames.AZURE_ARC} managed identity is available through file detection. Defaulting to known ${ManagedIdentitySourceNames.AZURE_ARC} endpoint: ${DEFAULT_AZURE_ARC_IDENTITY_ENDPOINT}. Creating ${ManagedIdentitySourceNames.AZURE_ARC} managed identity.`); - } - else { - // otherwise, both the identity and imds endpoints are defined without file detection; validate them - const validatedIdentityEndpoint = AzureArc.getValidatedEnvVariableUrlString(ManagedIdentityEnvironmentVariableNames.IDENTITY_ENDPOINT, identityEndpoint, ManagedIdentitySourceNames.AZURE_ARC, logger); - // remove trailing slash - validatedIdentityEndpoint.endsWith("/") - ? validatedIdentityEndpoint.slice(0, -1) - : validatedIdentityEndpoint; - AzureArc.getValidatedEnvVariableUrlString(ManagedIdentityEnvironmentVariableNames.IMDS_ENDPOINT, imdsEndpoint, ManagedIdentitySourceNames.AZURE_ARC, logger); - logger.info(`[Managed Identity] Environment variables validation passed for ${ManagedIdentitySourceNames.AZURE_ARC} managed identity. Endpoint URI: ${validatedIdentityEndpoint}. Creating ${ManagedIdentitySourceNames.AZURE_ARC} managed identity.`); - } - if (managedIdentityId.idType !== ManagedIdentityIdType.SYSTEM_ASSIGNED) { - throw createManagedIdentityError(unableToCreateAzureArc); - } - return new AzureArc(logger, nodeStorage, networkClient, cryptoProvider, identityEndpoint); - } - createRequest(resource) { - const request = new ManagedIdentityRequestParameters(HttpMethod.GET, this.identityEndpoint.replace("localhost", "127.0.0.1")); - request.headers[METADATA_HEADER_NAME] = "true"; - request.queryParameters[API_VERSION_QUERY_PARAMETER_NAME] = - ARC_API_VERSION; - request.queryParameters[RESOURCE_BODY_OR_QUERY_PARAMETER_NAME] = - resource; - // bodyParameters calculated in BaseManagedIdentity.acquireTokenWithManagedIdentity - return request; - } - async getServerTokenResponseAsync(originalResponse, networkClient, networkRequest, networkRequestOptions) { - let retryResponse; - if (originalResponse.status === HttpStatus.UNAUTHORIZED) { - const wwwAuthHeader = originalResponse.headers["www-authenticate"]; - if (!wwwAuthHeader) { - throw createManagedIdentityError(wwwAuthenticateHeaderMissing); - } - if (!wwwAuthHeader.includes("Basic realm=")) { - throw createManagedIdentityError(wwwAuthenticateHeaderUnsupportedFormat); - } - const secretFilePath = wwwAuthHeader.split("Basic realm=")[1]; - // throw an error if the managed identity application is not being run on Windows or Linux - if (!SUPPORTED_AZURE_ARC_PLATFORMS.hasOwnProperty(process.platform)) { - throw createManagedIdentityError(platformNotSupported); - } - // get the expected Windows or Linux file path - const expectedSecretFilePath = SUPPORTED_AZURE_ARC_PLATFORMS[process.platform]; - // throw an error if the file in the file path is not a .key file - const fileName = path.basename(secretFilePath); - if (!fileName.endsWith(".key")) { - throw createManagedIdentityError(invalidFileExtension); - } - /* - * throw an error if the file path from the www-authenticate header does not match the - * expected file path for the platform (Windows or Linux) the managed identity application - * is running on - */ - if (expectedSecretFilePath + fileName !== secretFilePath) { - throw createManagedIdentityError(invalidFilePath); - } - let secretFileSize; - // attempt to get the secret file's size, in bytes - try { - secretFileSize = await statSync(secretFilePath).size; - } - catch (e) { - throw createManagedIdentityError(unableToReadSecretFile); - } - // throw an error if the secret file's size is greater than 4096 bytes - if (secretFileSize > AZURE_ARC_SECRET_FILE_MAX_SIZE_BYTES) { - throw createManagedIdentityError(invalidSecret); - } - // attempt to read the contents of the secret file - let secret; - try { - secret = readFileSync(secretFilePath, "utf-8"); - } - catch (e) { - throw createManagedIdentityError(unableToReadSecretFile); - } - const authHeaderValue = `Basic ${secret}`; - this.logger.info(`[Managed Identity] Adding authorization header to the request.`); - networkRequest.headers[AUTHORIZATION_HEADER_NAME] = authHeaderValue; - try { - retryResponse = - await networkClient.sendGetRequestAsync(networkRequest.computeUri(), networkRequestOptions); - } - catch (error) { - if (error instanceof AuthError) { - throw error; - } - else { - throw createClientAuthError(ClientAuthErrorCodes.networkError); - } - } - } - return this.getServerTokenResponse(retryResponse || originalResponse); - } -} - -export { ARC_API_VERSION, AZURE_ARC_FILE_DETECTION, AzureArc, DEFAULT_AZURE_ARC_IDENTITY_ENDPOINT, SUPPORTED_AZURE_ARC_PLATFORMS }; -//# sourceMappingURL=AzureArc.mjs.map diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ManagedIdentitySources/AzureArc.mjs.map b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ManagedIdentitySources/AzureArc.mjs.map deleted file mode 100644 index 5efedd1..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ManagedIdentitySources/AzureArc.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AzureArc.mjs","sources":["../../../src/client/ManagedIdentitySources/AzureArc.ts"],"sourcesContent":[null],"names":["fsConstants","ManagedIdentityErrorCodes.unableToCreateAzureArc","ManagedIdentityErrorCodes.wwwAuthenticateHeaderMissing","ManagedIdentityErrorCodes.wwwAuthenticateHeaderUnsupportedFormat","ManagedIdentityErrorCodes.platformNotSupported","ManagedIdentityErrorCodes.invalidFileExtension","ManagedIdentityErrorCodes.invalidFilePath","ManagedIdentityErrorCodes.unableToReadSecretFile","ManagedIdentityErrorCodes.invalidSecret"],"mappings":";;;;;;;;;;;AAAA;;;AAGG;AA0CI,MAAM,eAAe,GAAW,aAAa;AAC7C,MAAM,mCAAmC,GAC5C,wDAAwD;AAC5D,MAAM,8BAA8B,GAAG,8BAA8B,CAAC;AAOzD,MAAA,6BAA6B,GAAgB;IACtD,KAAK,EAAE,GAAG,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,CAAwC,sCAAA,CAAA;AAC5E,IAAA,KAAK,EAAE,4BAA4B;EACrC;AAEW,MAAA,wBAAwB,GAAgB;IACjD,KAAK,EA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AEpE,IAAI;gBACA,aAAa;oBACT,MAAM,aAAa,CAAC,mBAAmB,CACnC,cAAc,CAAC,UAAU,EAAE,EAC3B,qBAAqB,CACxB,CAAC;AACT,aAAA;AAAC,YAAA,OAAO,KAAK,EAAE;gBACZ,IAAI,KAAK,YAAY,SAAS,EAAE;AAC5B,oBAAA,MAAM,KAAK,CAAC;AACf,iBAAA;AAAM,qBAAA;AACH,oBAAA,MAAM,qBAAqB,CACvB,oBAAoB,CAAC,YAAY,CACpC,CAAC;AACL,iBAAA;AACJ,aAAA;AACJ,SAAA;QAED,OAAO,IAAI,CAAC,sBAAsB,CAAC,aAAa,IAAI,gBAAgB,CAAC,CAAC;KACzE;AACJ;;;;"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ManagedIdentitySources/BaseManagedIdentitySource.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ManagedIdentitySources/BaseManagedIdentitySource.d.ts deleted file mode 100644 index 9208e95..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ManagedIdentitySources/BaseManagedIdentitySource.d.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { Authority, INetworkModule, Logger, NetworkRequestOptions, NetworkResponse, ServerAuthorizationTokenResponse, AuthenticationResult } from "@azure/msal-common/node"; -import { ManagedIdentityId } from "../../config/ManagedIdentityId.js"; -import { ManagedIdentityRequestParameters } from "../../config/ManagedIdentityRequestParameters.js"; -import { CryptoProvider } from "../../crypto/CryptoProvider.js"; -import { ManagedIdentityRequest } from "../../request/ManagedIdentityRequest.js"; -import { ManagedIdentityIdType } from "../../utils/Constants.js"; -import { ManagedIdentityTokenResponse } from "../../response/ManagedIdentityTokenResponse.js"; -import { NodeStorage } from "../../cache/NodeStorage.js"; -/** - * Managed Identity User Assigned Id Query Parameter Names - */ -export declare const ManagedIdentityUserAssignedIdQueryParameterNames: { - readonly MANAGED_IDENTITY_CLIENT_ID: "client_id"; - readonly MANAGED_IDENTITY_OBJECT_ID: "object_id"; - readonly MANAGED_IDENTITY_RESOURCE_ID: "mi_res_id"; -}; -export type ManagedIdentityUserAssignedIdQueryParameterNames = (typeof ManagedIdentityUserAssignedIdQueryParameterNames)[keyof typeof ManagedIdentityUserAssignedIdQueryParameterNames]; -export declare abstract class BaseManagedIdentitySource { - protected logger: Logger; - private nodeStorage; - private networkClient; - private cryptoProvider; - constructor(logger: Logger, nodeStorage: NodeStorage, networkClient: INetworkModule, cryptoProvider: CryptoProvider); - abstract createRequest(request: string, managedIdentityId: ManagedIdentityId): ManagedIdentityRequestParameters; - getServerTokenResponseAsync(response: NetworkResponse, _networkClient: INetworkModule, _networkRequest: ManagedIdentityRequestParameters, _networkRequestOptions: NetworkRequestOptions): Promise; - getServerTokenResponse(response: NetworkResponse): ServerAuthorizationTokenResponse; - acquireTokenWithManagedIdentity(managedIdentityRequest: ManagedIdentityRequest, managedIdentityId: ManagedIdentityId, fakeAuthority: Authority, refreshAccessToken?: boolean): Promise; - getManagedIdentityUserAssignedIdQueryParameterKey(managedIdentityIdType: ManagedIdentityIdType): string; - static getValidatedEnvVariableUrlString: (envVariableStringName: string, envVariable: string, sourceName: string, logger: Logger) => string; -} -//# sourceMappingURL=BaseManagedIdentitySource.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ManagedIdentitySources/BaseManagedIdentitySource.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ManagedIdentitySources/BaseManagedIdentitySource.d.ts.map deleted file mode 100644 index 1fb624e..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ManagedIdentitySources/BaseManagedIdentitySource.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"BaseManagedIdentitySource.d.ts","sourceRoot":"","sources":["../../../src/client/ManagedIdentitySources/BaseManagedIdentitySource.ts"],"names":[],"mappings":"AAKA,OAAO,EAEH,SAAS,EAIT,cAAc,EACd,MAAM,EACN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sB,EAAE,sBAAsB,EAC9C,iBAAiB,EAAE,iBAAiB,EACpC,aAAa,EAAE,SAAS,EACxB,kBAAkB,CAAC,EAAE,OAAO,GAC7B,OAAO,CAAC,oBAAoB,CAAC;IA0EzB,iDAAiD,CACpD,qBAAqB,EAAE,qBAAqB,GAC7C,MAAM;IA0BT,OAAc,gCAAgC,0BACnB,MAAM,eAChB,MAAM,cACP,MAAM,UACV,MAAM,KACf,MAAM,CAeP;CACL"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ManagedIdentitySources/BaseManagedIdentitySource.mjs b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ManagedIdentitySources/BaseManagedIdentitySource.mjs deleted file mode 100644 index 6965053..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ManagedIdentitySources/BaseManagedIdentitySource.mjs +++ /dev/null @@ -1,132 +0,0 @@ -/*! @azure/msal-node v2.16.3 2025-08-05 */ -'use strict'; -import { TimeUtils, Constants, HeaderNames, AuthError, createClientAuthError, ClientAuthErrorCodes, ResponseHandler, UrlString } from '@azure/msal-common/node'; -import { HttpMethod, ManagedIdentityIdType } from '../../utils/Constants.mjs'; -import { createManagedIdentityError } from '../../error/ManagedIdentityError.mjs'; -import { invalidManagedIdentityIdType, MsiEnvironmentVariableUrlMalformedErrorCodes } from '../../error/ManagedIdentityErrorCodes.mjs'; - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * Managed Identity User Assigned Id Query Parameter Names - */ -const ManagedIdentityUserAssignedIdQueryParameterNames = { - MANAGED_IDENTITY_CLIENT_ID: "client_id", - MANAGED_IDENTITY_OBJECT_ID: "object_id", - MANAGED_IDENTITY_RESOURCE_ID: "mi_res_id", -}; -class BaseManagedIdentitySource { - constructor(logger, nodeStorage, networkClient, cryptoProvider) { - this.logger = logger; - this.nodeStorage = nodeStorage; - this.networkClient = networkClient; - this.cryptoProvider = cryptoProvider; - } - async getServerTokenResponseAsync(response, - // eslint-disable-next-line @typescript-eslint/no-unused-vars - _networkClient, - // eslint-disable-next-line @typescript-eslint/no-unused-vars - _networkRequest, - // eslint-disable-next-line @typescript-eslint/no-unused-vars - _networkRequestOptions) { - return this.getServerTokenResponse(response); - } - getServerTokenResponse(response) { - let refreshIn, expiresIn; - if (response.body.expires_on) { - expiresIn = response.body.expires_on - TimeUtils.nowSeconds(); - // compute refresh_in as 1/2 of expires_in, but only if expires_in > 2h - if (expiresIn > 2 * 3600) { - refreshIn = expiresIn / 2; - } - } - const serverTokenResponse = { - status: response.status, - // success - access_token: response.body.access_token, - expires_in: expiresIn, - scope: response.body.resource, - token_type: response.body.token_type, - refresh_in: refreshIn, - // error - correlation_id: response.body.correlation_id || response.body.correlationId, - error: typeof response.body.error === "string" - ? response.body.error - : response.body.error?.code, - error_description: response.body.message || - (typeof response.body.error === "string" - ? response.body.error_description - : response.body.error?.message), - error_codes: response.body.error_codes, - timestamp: response.body.timestamp, - trace_id: response.body.trace_id, - }; - return serverTokenResponse; - } - async acquireTokenWithManagedIdentity(managedIdentityRequest, managedIdentityId, fakeAuthority, refreshAccessToken) { - const networkRequest = this.createRequest(managedIdentityRequest.resource, managedIdentityId); - const headers = networkRequest.headers; - headers[HeaderNames.CONTENT_TYPE] = Constants.URL_FORM_CONTENT_TYPE; - const networkRequestOptions = { headers }; - if (Object.keys(networkRequest.bodyParameters).length) { - networkRequestOptions.body = - networkRequest.computeParametersBodyString(); - } - const reqTimestamp = TimeUtils.nowSeconds(); - let response; - try { - // Sources that send POST requests: Cloud Shell - if (networkRequest.httpMethod === HttpMethod.POST) { - response = - await this.networkClient.sendPostRequestAsync(networkRequest.computeUri(), networkRequestOptions); - // Sources that send GET requests: App Service, Azure Arc, IMDS, Service Fabric - } - else { - response = - await this.networkClient.sendGetRequestAsync(networkRequest.computeUri(), networkRequestOptions); - } - } - catch (error) { - if (error instanceof AuthError) { - throw error; - } - else { - throw createClientAuthError(ClientAuthErrorCodes.networkError); - } - } - const responseHandler = new ResponseHandler(managedIdentityId.id, this.nodeStorage, this.cryptoProvider, this.logger, null, null); - const serverTokenResponse = await this.getServerTokenResponseAsync(response, this.networkClient, networkRequest, networkRequestOptions); - responseHandler.validateTokenResponse(serverTokenResponse, refreshAccessToken); - // caches the token - return responseHandler.handleServerTokenResponse(serverTokenResponse, fakeAuthority, reqTimestamp, managedIdentityRequest); - } - getManagedIdentityUserAssignedIdQueryParameterKey(managedIdentityIdType) { - switch (managedIdentityIdType) { - case ManagedIdentityIdType.USER_ASSIGNED_CLIENT_ID: - this.logger.info("[Managed Identity] Adding user assigned client id to the request."); - return ManagedIdentityUserAssignedIdQueryParameterNames.MANAGED_IDENTITY_CLIENT_ID; - case ManagedIdentityIdType.USER_ASSIGNED_RESOURCE_ID: - this.logger.info("[Managed Identity] Adding user assigned resource id to the request."); - return ManagedIdentityUserAssignedIdQueryParameterNames.MANAGED_IDENTITY_RESOURCE_ID; - case ManagedIdentityIdType.USER_ASSIGNED_OBJECT_ID: - this.logger.info("[Managed Identity] Adding user assigned object id to the request."); - return ManagedIdentityUserAssignedIdQueryParameterNames.MANAGED_IDENTITY_OBJECT_ID; - default: - throw createManagedIdentityError(invalidManagedIdentityIdType); - } - } -} -BaseManagedIdentitySource.getValidatedEnvVariableUrlString = (envVariableStringName, envVariable, sourceName, logger) => { - try { - return new UrlString(envVariable).urlString; - } - catch (error) { - logger.info(`[Managed Identity] ${sourceName} managed identity is unavailable because the '${envVariableStringName}' environment variable is malformed.`); - throw createManagedIdentityError(MsiEnvironmentVariableUrlMalformedErrorCodes[envVariableStringName]); - } -}; - -export { BaseManagedIdentitySource, ManagedIdentityUserAssignedIdQueryParameterNames }; -//# sourceMappingURL=BaseManagedIdentitySource.mjs.map diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ManagedIdentitySources/BaseManagedIdentitySource.mjs.map b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ManagedIdentitySources/BaseManagedIdentitySource.mjs.map deleted file mode 100644 index feb5997..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ManagedIdentitySources/BaseManagedIdentitySource.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"BaseManagedIdentitySource.mjs","sources":["../../../src/client/ManagedIdentitySources/BaseManagedIdentitySource.ts"],"sourcesContent":[null],"names":["ManagedIdentityErrorCodes.invalidManagedIdentityIdType","ManagedIdentityErrorCodes\r\n .MsiEnvironmentVariableUrlMalformedErrorCodes"],"mappings":";;;;;;;AAAA;;;AAGG;AA+BH;;AAEG;AACU,MAAA,gDAAgD,GAAG;AAC5D,IAAA,0BAA0B,EAAE,WAAW;AACvC,IAAA,0BAA0B,EAAE,WAAW;AACvC,IAAA,4BAA4B,EAAE,WAAW;EAClC;MAIW,yBAAyB,CAAA;AAM3C,IAAA,WAAA,CACI,MAAc,EACd,WAAwB,EACxB,aAA6B,EAC7B,cAA8B,EAAA;AAE9B,QAAA,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;AACrB,QAAA,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;AAC/B,QAAA,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;AACnC,QAAA,IAAI,CAAC,cAAc,GAAG,cAAc,CAAC;KACxC;IAOM,MAAM,2BAA2B,CACpC,QAAuD;;IAEvD,cAA8B;;IAE9B,eAAiD;;IAEjD,sBAA6C,EAAA;AAE7C,QAAA,OAAO,IAAI,CAAC,sBAAsB,CAAC,QAAQ,CAAC,CAAC;KAChD;AAEM,IAAA,sBAAsB,CACzB,QAAuD,EAAA;QAEvD,IAAI,SAAS,EAAE,SAA6B,CAAC;AAC7C,QAAA,IAAI,QAAQ,CAAC,IAAI,CAAC,UAAU,EAAE;YAC1B,SAAS,GAAG,QAAQ,CAAC,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC,UAAU,EAAE,CAAC;;AAG9D,YAAA,IAAI,SAAS,GAAG,CAAC,GAAG,IAAI,EAAE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A,CAC/I,CAAC;QAEF,MAAM,0BAA0B,CAC5BC,4CACiD,CAC7C,qBAAqB,CACxB,CACJ,CAAC;AACL,KAAA;AACL,CAAC;;;;"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ManagedIdentitySources/CloudShell.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ManagedIdentitySources/CloudShell.d.ts deleted file mode 100644 index 98e79b7..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ManagedIdentitySources/CloudShell.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { INetworkModule, Logger } from "@azure/msal-common/node"; -import { ManagedIdentityRequestParameters } from "../../config/ManagedIdentityRequestParameters.js"; -import { BaseManagedIdentitySource } from "./BaseManagedIdentitySource.js"; -import { NodeStorage } from "../../cache/NodeStorage.js"; -import { CryptoProvider } from "../../crypto/CryptoProvider.js"; -import { ManagedIdentityId } from "../../config/ManagedIdentityId.js"; -/** - * Original source of code: https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/identity/Azure.Identity/src/CloudShellManagedIdentitySource.cs - */ -export declare class CloudShell extends BaseManagedIdentitySource { - private msiEndpoint; - constructor(logger: Logger, nodeStorage: NodeStorage, networkClient: INetworkModule, cryptoProvider: CryptoProvider, msiEndpoint: string); - static getEnvironmentVariables(): Array; - static tryCreate(logger: Logger, nodeStorage: NodeStorage, networkClient: INetworkModule, cryptoProvider: CryptoProvider, managedIdentityId: ManagedIdentityId): CloudShell | null; - createRequest(resource: string): ManagedIdentityRequestParameters; -} -//# sourceMappingURL=CloudShell.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ManagedIdentitySources/CloudShell.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ManagedIdentitySources/CloudShell.d.ts.map deleted file mode 100644 index bf0469a..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ManagedIdentitySources/CloudShell.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"CloudShell.d.ts","sourceRoot":"","sources":["../../../src/client/ManagedIdentitySources/CloudShell.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,EAAE,gCAAgC,EAAE,MAAM,kDAAkD,CAAC;AACpG,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAahE,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AAEtE;;GAEG;AACH,qBAAa,UAAW,SAAQ,yBAAyB;IACrD,OAAO,CAAC,WAAW,CAAS;gBAGxB,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,WAAW,EACxB,aAAa,EAAE,cAAc,EAC7B,cAAc,EAAE,cAAc,EAC9B,WAAW,EAAE,MAAM;WAOT,uBAAuB,IAAI,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC;WAOpD,SAAS,CACnB,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,WAAW,EACxB,aAAa,EAAE,cAAc,EAC7B,cAAc,EAAE,cAAc,EAC9B,iBAAiB,EAAE,iBAAiB,GACrC,UAAU,GAAG,IAAI;IAwCb,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,gCAAgC;CAc3E"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ManagedIdentitySources/CloudShell.mjs b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ManagedIdentitySources/CloudShell.mjs deleted file mode 100644 index 5f5f52f..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ManagedIdentitySources/CloudShell.mjs +++ /dev/null @@ -1,49 +0,0 @@ -/*! @azure/msal-node v2.16.3 2025-08-05 */ -'use strict'; -import { ManagedIdentityRequestParameters } from '../../config/ManagedIdentityRequestParameters.mjs'; -import { BaseManagedIdentitySource } from './BaseManagedIdentitySource.mjs'; -import { ManagedIdentityEnvironmentVariableNames, ManagedIdentitySourceNames, ManagedIdentityIdType, METADATA_HEADER_NAME, RESOURCE_BODY_OR_QUERY_PARAMETER_NAME, HttpMethod } from '../../utils/Constants.mjs'; -import { createManagedIdentityError } from '../../error/ManagedIdentityError.mjs'; -import { unableToCreateCloudShell } from '../../error/ManagedIdentityErrorCodes.mjs'; - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * Original source of code: https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/identity/Azure.Identity/src/CloudShellManagedIdentitySource.cs - */ -class CloudShell extends BaseManagedIdentitySource { - constructor(logger, nodeStorage, networkClient, cryptoProvider, msiEndpoint) { - super(logger, nodeStorage, networkClient, cryptoProvider); - this.msiEndpoint = msiEndpoint; - } - static getEnvironmentVariables() { - const msiEndpoint = process.env[ManagedIdentityEnvironmentVariableNames.MSI_ENDPOINT]; - return [msiEndpoint]; - } - static tryCreate(logger, nodeStorage, networkClient, cryptoProvider, managedIdentityId) { - const [msiEndpoint] = CloudShell.getEnvironmentVariables(); - // if the msi endpoint environment variable is undefined, this MSI provider is unavailable. - if (!msiEndpoint) { - logger.info(`[Managed Identity] ${ManagedIdentitySourceNames.CLOUD_SHELL} managed identity is unavailable because the '${ManagedIdentityEnvironmentVariableNames.MSI_ENDPOINT} environment variable is not defined.`); - return null; - } - const validatedMsiEndpoint = CloudShell.getValidatedEnvVariableUrlString(ManagedIdentityEnvironmentVariableNames.MSI_ENDPOINT, msiEndpoint, ManagedIdentitySourceNames.CLOUD_SHELL, logger); - logger.info(`[Managed Identity] Environment variable validation passed for ${ManagedIdentitySourceNames.CLOUD_SHELL} managed identity. Endpoint URI: ${validatedMsiEndpoint}. Creating ${ManagedIdentitySourceNames.CLOUD_SHELL} managed identity.`); - if (managedIdentityId.idType !== ManagedIdentityIdType.SYSTEM_ASSIGNED) { - throw createManagedIdentityError(unableToCreateCloudShell); - } - return new CloudShell(logger, nodeStorage, networkClient, cryptoProvider, msiEndpoint); - } - createRequest(resource) { - const request = new ManagedIdentityRequestParameters(HttpMethod.POST, this.msiEndpoint); - request.headers[METADATA_HEADER_NAME] = "true"; - request.bodyParameters[RESOURCE_BODY_OR_QUERY_PARAMETER_NAME] = - resource; - return request; - } -} - -export { CloudShell }; -//# sourceMappingURL=CloudShell.mjs.map diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ManagedIdentitySources/CloudShell.mjs.map b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ManagedIdentitySources/CloudShell.mjs.map deleted file mode 100644 index 54f9df1..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ManagedIdentitySources/CloudShell.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"CloudShell.mjs","sources":["../../../src/client/ManagedIdentitySources/CloudShell.ts"],"sourcesContent":[null],"names":["ManagedIdentityErrorCodes.unableToCreateCloudShell"],"mappings":";;;;;;;;AAAA;;;AAGG;AAqBH;;AAEG;AACG,MAAO,UAAW,SAAQ,yBAAyB,CAAA;IAGrD,WACI,CAAA,MAAc,EACd,WAAwB,EACxB,aAA6B,EAC7B,cAA8B,EAC9B,WAAmB,EAAA;QAEnB,KAAK,CAAC,MAAM,EAAE,WAAW,EAAE,aAAa,EAAE,cAAc,CAAC,CAAC;AAE1D,QAAA,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;KAClC;AAEM,IAAA,OAAO,uBAAuB,GAAA;QACjC,MAAM,WAAW,GACb,OAAO,CAAC,GAAG,CAAC,uCAAuC,CAAC,YAAY,CAAC,CAAC;QAEtE,OAAO,CAAC,WAAW,CAAC,CAAC;KACxB;IAEM,OAAO,SAAS,CACnB,MAAc,EACd,WAAwB,EACxB,aAA6B,EAC7B,cAA8B,EAC9B,iBAAoC,EAA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Imds.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ManagedIdentitySources/Imds.d.ts deleted file mode 100644 index dd88a9e..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ManagedIdentitySources/Imds.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { INetworkModule, Logger } from "@azure/msal-common/node"; -import { ManagedIdentityId } from "../../config/ManagedIdentityId.js"; -import { ManagedIdentityRequestParameters } from "../../config/ManagedIdentityRequestParameters.js"; -import { BaseManagedIdentitySource } from "./BaseManagedIdentitySource.js"; -import { CryptoProvider } from "../../crypto/CryptoProvider.js"; -import { NodeStorage } from "../../cache/NodeStorage.js"; -export declare class Imds extends BaseManagedIdentitySource { - private identityEndpoint; - constructor(logger: Logger, nodeStorage: NodeStorage, networkClient: INetworkModule, cryptoProvider: CryptoProvider, identityEndpoint: string); - static tryCreate(logger: Logger, nodeStorage: NodeStorage, networkClient: INetworkModule, cryptoProvider: CryptoProvider): Imds; - createRequest(resource: string, managedIdentityId: ManagedIdentityId): ManagedIdentityRequestParameters; -} -//# sourceMappingURL=Imds.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ManagedIdentitySources/Imds.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ManagedIdentitySources/Imds.d.ts.map deleted file mode 100644 index aa92c36..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ManagedIdentitySources/Imds.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Imds.d.ts","sourceRoot":"","sources":["../../../src/client/ManagedIdentitySources/Imds.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AACtE,OAAO,EAAE,gCAAgC,EAAE,MAAM,kDAAkD,CAAC;AACpG,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAUhE,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AASzD,qBAAa,IAAK,SAAQ,yBAAyB;IAC/C,OAAO,CAAC,gBAAgB,CAAS;gBAG7B,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,WAAW,EACxB,aAAa,EAAE,cAAc,EAC7B,cAAc,EAAE,cAAc,EAC9B,gBAAgB,EAAE,MAAM;WAOd,SAAS,CACnB,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,WAAW,EACxB,aAAa,EAAE,cAAc,EAC7B,cAAc,EAAE,cAAc,GAC/B,IAAI;IA8CA,aAAa,CAChB,QAAQ,EAAE,MAAM,EAChB,iBAAiB,EAAE,iBAAiB,GACrC,gCAAgC;CA4BtC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ManagedIdentitySources/Imds.mjs b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ManagedIdentitySources/Imds.mjs deleted file mode 100644 index 516fb14..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ManagedIdentitySources/Imds.mjs +++ /dev/null @@ -1,52 +0,0 @@ -/*! @azure/msal-node v2.16.3 2025-08-05 */ -'use strict'; -import { ManagedIdentityRequestParameters } from '../../config/ManagedIdentityRequestParameters.mjs'; -import { BaseManagedIdentitySource } from './BaseManagedIdentitySource.mjs'; -import { ManagedIdentityEnvironmentVariableNames, ManagedIdentitySourceNames, METADATA_HEADER_NAME, API_VERSION_QUERY_PARAMETER_NAME, RESOURCE_BODY_OR_QUERY_PARAMETER_NAME, ManagedIdentityIdType, HttpMethod } from '../../utils/Constants.mjs'; - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -// IMDS constants. Docs for IMDS are available here https://docs.microsoft.com/azure/active-directory/managed-identities-azure-resources/how-to-use-vm-token#get-a-token-using-http -const IMDS_TOKEN_PATH = "/metadata/identity/oauth2/token"; -const DEFAULT_IMDS_ENDPOINT = `http://169.254.169.254${IMDS_TOKEN_PATH}`; -const IMDS_API_VERSION = "2018-02-01"; -// Original source of code: https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/identity/Azure.Identity/src/ImdsManagedIdentitySource.cs -class Imds extends BaseManagedIdentitySource { - constructor(logger, nodeStorage, networkClient, cryptoProvider, identityEndpoint) { - super(logger, nodeStorage, networkClient, cryptoProvider); - this.identityEndpoint = identityEndpoint; - } - static tryCreate(logger, nodeStorage, networkClient, cryptoProvider) { - let validatedIdentityEndpoint; - if (process.env[ManagedIdentityEnvironmentVariableNames - .AZURE_POD_IDENTITY_AUTHORITY_HOST]) { - logger.info(`[Managed Identity] Environment variable ${ManagedIdentityEnvironmentVariableNames.AZURE_POD_IDENTITY_AUTHORITY_HOST} for ${ManagedIdentitySourceNames.IMDS} returned endpoint: ${process.env[ManagedIdentityEnvironmentVariableNames - .AZURE_POD_IDENTITY_AUTHORITY_HOST]}`); - validatedIdentityEndpoint = Imds.getValidatedEnvVariableUrlString(ManagedIdentityEnvironmentVariableNames.AZURE_POD_IDENTITY_AUTHORITY_HOST, `${process.env[ManagedIdentityEnvironmentVariableNames - .AZURE_POD_IDENTITY_AUTHORITY_HOST]}${IMDS_TOKEN_PATH}`, ManagedIdentitySourceNames.IMDS, logger); - } - else { - logger.info(`[Managed Identity] Unable to find ${ManagedIdentityEnvironmentVariableNames.AZURE_POD_IDENTITY_AUTHORITY_HOST} environment variable for ${ManagedIdentitySourceNames.IMDS}, using the default endpoint.`); - validatedIdentityEndpoint = DEFAULT_IMDS_ENDPOINT; - } - return new Imds(logger, nodeStorage, networkClient, cryptoProvider, validatedIdentityEndpoint); - } - createRequest(resource, managedIdentityId) { - const request = new ManagedIdentityRequestParameters(HttpMethod.GET, this.identityEndpoint); - request.headers[METADATA_HEADER_NAME] = "true"; - request.queryParameters[API_VERSION_QUERY_PARAMETER_NAME] = - IMDS_API_VERSION; - request.queryParameters[RESOURCE_BODY_OR_QUERY_PARAMETER_NAME] = - resource; - if (managedIdentityId.idType !== ManagedIdentityIdType.SYSTEM_ASSIGNED) { - request.queryParameters[this.getManagedIdentityUserAssignedIdQueryParameterKey(managedIdentityId.idType)] = managedIdentityId.id; - } - // bodyParameters calculated in BaseManagedIdentity.acquireTokenWithManagedIdentity - return request; - } -} - -export { Imds }; -//# sourceMappingURL=Imds.mjs.map diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ManagedIdentitySources/Imds.mjs.map b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ManagedIdentitySources/Imds.mjs.map deleted file mode 100644 index 56d3d52..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ManagedIdentitySources/Imds.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Imds.mjs","sources":["../../../src/client/ManagedIdentitySources/Imds.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;AAAA;;;AAGG;AAkBH;AACA,MAAM,eAAe,GAAW,iCAAiC,CAAC;AAClE,MAAM,qBAAqB,GAAW,CAAyB,sBAAA,EAAA,eAAe,EAAE,CAAC;AAEjF,MAAM,gBAAgB,GAAW,YAAY,CAAC;AAE9C;AACM,MAAO,IAAK,SAAQ,yBAAyB,CAAA;IAG/C,WACI,CAAA,MAAc,EACd,WAAwB,EACxB,aAA6B,EAC7B,cAA8B,EAC9B,gBAAwB,EAAA;QAExB,KAAK,CAAC,MAAM,EAAE,WAAW,EAAE,aAAa,EAAE,cAAc,CAAC,CAAC;AAE1D,QAAA,IAAI,CAAC,gBAAgB,GAAG,gBAAgB,CAAC;KAC5C;IAEM,OAAO,SAAS,CACnB,MAAc,EACd,WAAwB,EACxB,aAA6B,EAC7B,cAA8B,EAAA;AAE9B,QAAA,IAAI,yBAAiC,CAAC;AAEtC,QAAA,IACI,OAAO,CAAC,GAAG,CACP,uCAAuC;AAClC,aAAA,iC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A,OAAO,CAAC,eAAe,CACnB,IAAI,CAAC,iDAAiD,CAClD,iBAAiB,CAAC,MAAM,CAC3B,CACJ,GAAG,iBAAiB,CAAC,EAAE,CAAC;AAC5B,SAAA;;AAID,QAAA,OAAO,OAAO,CAAC;KAClB;AACJ;;;;"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ManagedIdentitySources/ServiceFabric.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ManagedIdentitySources/ServiceFabric.d.ts deleted file mode 100644 index 875f8f7..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ManagedIdentitySources/ServiceFabric.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { INetworkModule, Logger } from "@azure/msal-common/node"; -import { ManagedIdentityId } from "../../config/ManagedIdentityId.js"; -import { ManagedIdentityRequestParameters } from "../../config/ManagedIdentityRequestParameters.js"; -import { BaseManagedIdentitySource } from "./BaseManagedIdentitySource.js"; -import { NodeStorage } from "../../cache/NodeStorage.js"; -import { CryptoProvider } from "../../crypto/CryptoProvider.js"; -/** - * Original source of code: https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/identity/Azure.Identity/src/ServiceFabricManagedIdentitySource.cs - */ -export declare class ServiceFabric extends BaseManagedIdentitySource { - private identityEndpoint; - private identityHeader; - constructor(logger: Logger, nodeStorage: NodeStorage, networkClient: INetworkModule, cryptoProvider: CryptoProvider, identityEndpoint: string, identityHeader: string); - static getEnvironmentVariables(): Array; - static tryCreate(logger: Logger, nodeStorage: NodeStorage, networkClient: INetworkModule, cryptoProvider: CryptoProvider, managedIdentityId: ManagedIdentityId): ServiceFabric | null; - createRequest(resource: string, managedIdentityId: ManagedIdentityId): ManagedIdentityRequestParameters; -} -//# sourceMappingURL=ServiceFabric.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ManagedIdentitySources/ServiceFabric.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ManagedIdentitySources/ServiceFabric.d.ts.map deleted file mode 100644 index 2ed1619..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ManagedIdentitySources/ServiceFabric.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ServiceFabric.d.ts","sourceRoot":"","sources":["../../../src/client/ManagedIdentitySources/ServiceFabric.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AACtE,OAAO,EAAE,gCAAgC,EAAE,MAAM,kDAAkD,CAAC;AACpG,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAchE;;GAEG;AACH,qBAAa,aAAc,SAAQ,yBAAyB;IACxD,OAAO,CAAC,gBAAgB,CAAS;IACjC,OAAO,CAAC,cAAc,CAAS;gBAG3B,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,WAAW,EACxB,aAAa,EAAE,cAAc,EAC7B,cAAc,EAAE,cAAc,EAC9B,gBAAgB,EAAE,MAAM,EACxB,cAAc,EAAE,MAAM;WAQZ,uBAAuB,IAAI,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC;WAkBpD,SAAS,CACnB,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,WAAW,EACxB,aAAa,EAAE,cAAc,EAC7B,cAAc,EAAE,cAAc,EAC9B,iBAAiB,EAAE,iBAAiB,GACrC,aAAa,GAAG,IAAI;IA6ChB,aAAa,CAChB,QAAQ,EAAE,MAAM,EAChB,iBAAiB,EAAE,iBAAiB,GACrC,gCAAgC;CA6BtC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ManagedIdentitySources/ServiceFabric.mjs b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ManagedIdentitySources/ServiceFabric.mjs deleted file mode 100644 index ea64014..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ManagedIdentitySources/ServiceFabric.mjs +++ /dev/null @@ -1,63 +0,0 @@ -/*! @azure/msal-node v2.16.3 2025-08-05 */ -'use strict'; -import { ManagedIdentityRequestParameters } from '../../config/ManagedIdentityRequestParameters.mjs'; -import { BaseManagedIdentitySource } from './BaseManagedIdentitySource.mjs'; -import { ManagedIdentityEnvironmentVariableNames, ManagedIdentitySourceNames, ManagedIdentityIdType, SERVICE_FABRIC_SECRET_HEADER_NAME, API_VERSION_QUERY_PARAMETER_NAME, RESOURCE_BODY_OR_QUERY_PARAMETER_NAME, HttpMethod } from '../../utils/Constants.mjs'; - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -// MSI Constants. Docs for MSI are available here https://docs.microsoft.com/azure/app-service/overview-managed-identity -const SERVICE_FABRIC_MSI_API_VERSION = "2019-07-01-preview"; -/** - * Original source of code: https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/identity/Azure.Identity/src/ServiceFabricManagedIdentitySource.cs - */ -class ServiceFabric extends BaseManagedIdentitySource { - constructor(logger, nodeStorage, networkClient, cryptoProvider, identityEndpoint, identityHeader) { - super(logger, nodeStorage, networkClient, cryptoProvider); - this.identityEndpoint = identityEndpoint; - this.identityHeader = identityHeader; - } - static getEnvironmentVariables() { - const identityEndpoint = process.env[ManagedIdentityEnvironmentVariableNames.IDENTITY_ENDPOINT]; - const identityHeader = process.env[ManagedIdentityEnvironmentVariableNames.IDENTITY_HEADER]; - const identityServerThumbprint = process.env[ManagedIdentityEnvironmentVariableNames - .IDENTITY_SERVER_THUMBPRINT]; - return [identityEndpoint, identityHeader, identityServerThumbprint]; - } - static tryCreate(logger, nodeStorage, networkClient, cryptoProvider, managedIdentityId) { - const [identityEndpoint, identityHeader, identityServerThumbprint] = ServiceFabric.getEnvironmentVariables(); - /* - * if either of the identity endpoint, identity header, or identity server thumbprint - * environment variables are undefined, this MSI provider is unavailable. - */ - if (!identityEndpoint || !identityHeader || !identityServerThumbprint) { - logger.info(`[Managed Identity] ${ManagedIdentitySourceNames.SERVICE_FABRIC} managed identity is unavailable because one or all of the '${ManagedIdentityEnvironmentVariableNames.IDENTITY_HEADER}', '${ManagedIdentityEnvironmentVariableNames.IDENTITY_ENDPOINT}' or '${ManagedIdentityEnvironmentVariableNames.IDENTITY_SERVER_THUMBPRINT}' environment variables are not defined.`); - return null; - } - const validatedIdentityEndpoint = ServiceFabric.getValidatedEnvVariableUrlString(ManagedIdentityEnvironmentVariableNames.IDENTITY_ENDPOINT, identityEndpoint, ManagedIdentitySourceNames.SERVICE_FABRIC, logger); - logger.info(`[Managed Identity] Environment variables validation passed for ${ManagedIdentitySourceNames.SERVICE_FABRIC} managed identity. Endpoint URI: ${validatedIdentityEndpoint}. Creating ${ManagedIdentitySourceNames.SERVICE_FABRIC} managed identity.`); - if (managedIdentityId.idType !== ManagedIdentityIdType.SYSTEM_ASSIGNED) { - logger.warning(`[Managed Identity] ${ManagedIdentitySourceNames.SERVICE_FABRIC} user assigned managed identity is configured in the cluster, not during runtime. See also: https://learn.microsoft.com/en-us/azure/service-fabric/configure-existing-cluster-enable-managed-identity-token-service.`); - } - return new ServiceFabric(logger, nodeStorage, networkClient, cryptoProvider, identityEndpoint, identityHeader); - } - createRequest(resource, managedIdentityId) { - const request = new ManagedIdentityRequestParameters(HttpMethod.GET, this.identityEndpoint); - request.headers[SERVICE_FABRIC_SECRET_HEADER_NAME] = - this.identityHeader; - request.queryParameters[API_VERSION_QUERY_PARAMETER_NAME] = - SERVICE_FABRIC_MSI_API_VERSION; - request.queryParameters[RESOURCE_BODY_OR_QUERY_PARAMETER_NAME] = - resource; - if (managedIdentityId.idType !== ManagedIdentityIdType.SYSTEM_ASSIGNED) { - request.queryParameters[this.getManagedIdentityUserAssignedIdQueryParameterKey(managedIdentityId.idType)] = managedIdentityId.id; - } - // bodyParameters calculated in BaseManagedIdentity.acquireTokenWithManagedIdentity - return request; - } -} - -export { ServiceFabric }; -//# sourceMappingURL=ServiceFabric.mjs.map diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ManagedIdentitySources/ServiceFabric.mjs.map b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ManagedIdentitySources/ServiceFabric.mjs.map deleted file mode 100644 index ddffa8a..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/ManagedIdentitySources/ServiceFabric.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ServiceFabric.mjs","sources":["../../../src/client/ManagedIdentitySources/ServiceFabric.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;AAAA;;;AAGG;AAkBH;AACA,MAAM,8BAA8B,GAAW,oBAAoB,CAAC;AAEpE;;AAEG;AACG,MAAO,aAAc,SAAQ,yBAAyB,CAAA;IAIxD,WACI,CAAA,MAAc,EACd,WAAwB,EACxB,aAA6B,EAC7B,cAA8B,EAC9B,gBAAwB,EACxB,cAAsB,EAAA;QAEtB,KAAK,CAAC,MAAM,EAAE,WAAW,EAAE,aAAa,EAAE,cAAc,CAAC,CAAC;AAE1D,QAAA,IAAI,CAAC,gBAAgB,GAAG,gBAAgB,CAAC;AACzC,QAAA,IAAI,CAAC,cAAc,GAAG,cAAc,CAAC;KACxC;AAEM,IAAA,OAAO,uBAAuB,GAAA;QACjC,MAAM,gBAAgB,GAClB,OAAO,CAAC,GAAG,CACP,uCAAuC,CAAC,iBAAiB,CAC5D,CAAC;QACN,MAAM,cAAc,GAChB,OAAO,CAAC,GAAG,CACP,uCAAuC,CAAC,eAAe,CAC1D,CAAC;AACN,QAAA,MAAM,wBAAwB,GAC1B,OAAO,CAAC,GAAG,CACP,uCAAuC;AAClC,aAAA,0BAA0B,CAClC,CAAC;AAEN,QAAA,OAAO,CAAC,gBAAgB,EAAE,c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C,QAAA,MAAM,OAAO,GACT,IAAI,gCAAgC,CAChC,UAAU,CAAC,GAAG,EACd,IAAI,CAAC,gBAAgB,CACxB,CAAC;AAEN,QAAA,OAAO,CAAC,OAAO,CAAC,iCAAiC,CAAC;YAC9C,IAAI,CAAC,cAAc,CAAC;AAExB,QAAA,OAAO,CAAC,eAAe,CAAC,gCAAgC,CAAC;AACrD,YAAA,8BAA8B,CAAC;AACnC,QAAA,OAAO,CAAC,eAAe,CAAC,qCAAqC,CAAC;AAC1D,YAAA,QAAQ,CAAC;AAEb,QAAA,IACI,iBAAiB,CAAC,MAAM,KAAK,qBAAqB,CAAC,eAAe,EACpE;AACE,YAAA,OAAO,CAAC,eAAe,CACnB,IAAI,CAAC,iDAAiD,CAClD,iBAAiB,CAAC,MAAM,CAC3B,CACJ,GAAG,iBAAiB,CAAC,EAAE,CAAC;AAC5B,SAAA;;AAID,QAAA,OAAO,OAAO,CAAC;KAClB;AACJ;;;;"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/OnBehalfOfClient.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/OnBehalfOfClient.d.ts deleted file mode 100644 index 5c4a28b..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/OnBehalfOfClient.d.ts +++ /dev/null @@ -1,48 +0,0 @@ -import { AuthenticationResult, BaseClient, ClientConfiguration, CommonOnBehalfOfRequest } from "@azure/msal-common/node"; -/** - * On-Behalf-Of client - * @public - */ -export declare class OnBehalfOfClient extends BaseClient { - private scopeSet; - private userAssertionHash; - constructor(configuration: ClientConfiguration); - /** - * Public API to acquire tokens with on behalf of flow - * @param request - developer provided CommonOnBehalfOfRequest - */ - acquireToken(request: CommonOnBehalfOfRequest): Promise; - /** - * look up cache for tokens - * Find idtoken in the cache - * Find accessToken based on user assertion and account info in the cache - * Please note we are not yet supported OBO tokens refreshed with long lived RT. User will have to send a new assertion if the current access token expires - * This is to prevent security issues when the assertion changes over time, however, longlived RT helps retaining the session - * @param request - developer provided CommonOnBehalfOfRequest - */ - private getCachedAuthenticationResult; - /** - * read idtoken from cache, this is a specific implementation for OBO as the requirements differ from a generic lookup in the cacheManager - * Certain use cases of OBO flow do not expect an idToken in the cache/or from the service - * @param atHomeAccountId - account id - */ - private readIdTokenFromCacheForOBO; - /** - * Fetches the cached access token based on incoming assertion - * @param clientId - client id - * @param request - developer provided CommonOnBehalfOfRequest - */ - private readAccessTokenFromCacheForOBO; - /** - * Make a network call to the server requesting credentials - * @param request - developer provided CommonOnBehalfOfRequest - * @param authority - authority object - */ - private executeTokenRequest; - /** - * generate a server request in accepable format - * @param request - developer provided CommonOnBehalfOfRequest - */ - private createTokenRequestBody; -} -//# sourceMappingURL=OnBehalfOfClient.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/OnBehalfOfClient.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/OnBehalfOfClient.d.ts.map deleted file mode 100644 index 1c3bb29..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/OnBehalfOfClient.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"OnBehalfOfClient.d.ts","sourceRoot":"","sources":["../../src/client/OnBehalfOfClient.ts"],"names":[],"mappings":"AAKA,OAAO,EAKH,oBAAoB,EAIpB,UAAU,EAGV,mBAAmB,EACnB,uBAAuB,EAgB1B,MAAM,yBAAyB,CAAC;AAGjC;;;GAGG;AACH,qBAAa,gBAAiB,SAAQ,UAAU;IAC5C,OAAO,CAAC,QAAQ,CAAW;IAC3B,OAAO,CAAC,iBAAiB,CAAS;gBAEtB,aAAa,EAAE,mBAAmB;IAI9C;;;OAGG;IACU,YAAY,CACrB,OAAO,EAAE,uBAAuB,GACjC,OAAO,CAAC,oBAAoB,GAAG,IAAI,CAAC;IA4BvC;;;;;;;OAOG;YACW,6BAA6B;IAqF3C;;;;OAIG;IACH,OAAO,CAAC,0BAA0B;IAuBlC;;;;OAIG;IACH,OAAO,CAAC,8BAA8B;IA4CtC;;;;OAIG;YACW,mBAAmB;IAwDjC;;;OAGG;YACW,sBAAsB;CAmEvC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/OnBehalfOfClient.mjs b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/OnBehalfOfClient.mjs deleted file mode 100644 index 2d99be8..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/OnBehalfOfClient.mjs +++ /dev/null @@ -1,210 +0,0 @@ -/*! @azure/msal-node v2.16.3 2025-08-05 */ -'use strict'; -import { BaseClient, ScopeSet, CacheOutcome, createClientAuthError, ClientAuthErrorCodes, TimeUtils, AuthToken, Constants, ResponseHandler, CredentialType, AuthenticationScheme, UrlString, RequestParameterBuilder, GrantType, AADServerParamKeys, getClientAssertion } from '@azure/msal-common/node'; -import { EncodingUtils } from '../utils/EncodingUtils.mjs'; - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * On-Behalf-Of client - * @public - */ -class OnBehalfOfClient extends BaseClient { - constructor(configuration) { - super(configuration); - } - /** - * Public API to acquire tokens with on behalf of flow - * @param request - developer provided CommonOnBehalfOfRequest - */ - async acquireToken(request) { - this.scopeSet = new ScopeSet(request.scopes || []); - // generate the user_assertion_hash for OBOAssertion - this.userAssertionHash = await this.cryptoUtils.hashString(request.oboAssertion); - if (request.skipCache || request.claims) { - return this.executeTokenRequest(request, this.authority, this.userAssertionHash); - } - try { - return await this.getCachedAuthenticationResult(request); - } - catch (e) { - // Any failure falls back to interactive request, once we implement distributed cache, we plan to handle `createRefreshRequiredError` to refresh using the RT - return await this.executeTokenRequest(request, this.authority, this.userAssertionHash); - } - } - /** - * look up cache for tokens - * Find idtoken in the cache - * Find accessToken based on user assertion and account info in the cache - * Please note we are not yet supported OBO tokens refreshed with long lived RT. User will have to send a new assertion if the current access token expires - * This is to prevent security issues when the assertion changes over time, however, longlived RT helps retaining the session - * @param request - developer provided CommonOnBehalfOfRequest - */ - async getCachedAuthenticationResult(request) { - // look in the cache for the access_token which matches the incoming_assertion - const cachedAccessToken = this.readAccessTokenFromCacheForOBO(this.config.authOptions.clientId, request); - if (!cachedAccessToken) { - // Must refresh due to non-existent access_token. - this.serverTelemetryManager?.setCacheOutcome(CacheOutcome.NO_CACHED_ACCESS_TOKEN); - this.logger.info("SilentFlowClient:acquireCachedToken - No access token found in cache for the given properties."); - throw createClientAuthError(ClientAuthErrorCodes.tokenRefreshRequired); - } - else if (TimeUtils.isTokenExpired(cachedAccessToken.expiresOn, this.config.systemOptions.tokenRenewalOffsetSeconds)) { - // Access token expired, will need to renewed - this.serverTelemetryManager?.setCacheOutcome(CacheOutcome.CACHED_ACCESS_TOKEN_EXPIRED); - this.logger.info(`OnbehalfofFlow:getCachedAuthenticationResult - Cached access token is expired or will expire within ${this.config.systemOptions.tokenRenewalOffsetSeconds} seconds.`); - throw createClientAuthError(ClientAuthErrorCodes.tokenRefreshRequired); - } - // fetch the idToken from cache - const cachedIdToken = this.readIdTokenFromCacheForOBO(cachedAccessToken.homeAccountId, request.correlationId); - let idTokenClaims; - let cachedAccount = null; - if (cachedIdToken) { - idTokenClaims = AuthToken.extractTokenClaims(cachedIdToken.secret, EncodingUtils.base64Decode); - const localAccountId = idTokenClaims.oid || idTokenClaims.sub; - const accountInfo = { - homeAccountId: cachedIdToken.homeAccountId, - environment: cachedIdToken.environment, - tenantId: cachedIdToken.realm, - username: Constants.EMPTY_STRING, - localAccountId: localAccountId || Constants.EMPTY_STRING, - }; - cachedAccount = this.cacheManager.readAccountFromCache(accountInfo, request.correlationId); - } - // increment telemetry cache hit counter - if (this.config.serverTelemetryManager) { - this.config.serverTelemetryManager.incrementCacheHits(); - } - return ResponseHandler.generateAuthenticationResult(this.cryptoUtils, this.authority, { - account: cachedAccount, - accessToken: cachedAccessToken, - idToken: cachedIdToken, - refreshToken: null, - appMetadata: null, - }, true, request, idTokenClaims); - } - /** - * read idtoken from cache, this is a specific implementation for OBO as the requirements differ from a generic lookup in the cacheManager - * Certain use cases of OBO flow do not expect an idToken in the cache/or from the service - * @param atHomeAccountId - account id - */ - readIdTokenFromCacheForOBO(atHomeAccountId, correlationId) { - const idTokenFilter = { - homeAccountId: atHomeAccountId, - environment: this.authority.canonicalAuthorityUrlComponents.HostNameAndPort, - credentialType: CredentialType.ID_TOKEN, - clientId: this.config.authOptions.clientId, - realm: this.authority.tenant, - }; - const idTokenMap = this.cacheManager.getIdTokensByFilter(idTokenFilter, correlationId); - // When acquiring a token on behalf of an application, there might not be an id token in the cache - if (Object.values(idTokenMap).length < 1) { - return null; - } - return Object.values(idTokenMap)[0]; - } - /** - * Fetches the cached access token based on incoming assertion - * @param clientId - client id - * @param request - developer provided CommonOnBehalfOfRequest - */ - readAccessTokenFromCacheForOBO(clientId, request) { - const authScheme = request.authenticationScheme || AuthenticationScheme.BEARER; - /* - * Distinguish between Bearer and PoP/SSH token cache types - * Cast to lowercase to handle "bearer" from ADFS - */ - const credentialType = authScheme && - authScheme.toLowerCase() !== - AuthenticationScheme.BEARER.toLowerCase() - ? CredentialType.ACCESS_TOKEN_WITH_AUTH_SCHEME - : CredentialType.ACCESS_TOKEN; - const accessTokenFilter = { - credentialType: credentialType, - clientId, - target: ScopeSet.createSearchScopes(this.scopeSet.asArray()), - tokenType: authScheme, - keyId: request.sshKid, - requestedClaimsHash: request.requestedClaimsHash, - userAssertionHash: this.userAssertionHash, - }; - const accessTokens = this.cacheManager.getAccessTokensByFilter(accessTokenFilter, request.correlationId); - const numAccessTokens = accessTokens.length; - if (numAccessTokens < 1) { - return null; - } - else if (numAccessTokens > 1) { - throw createClientAuthError(ClientAuthErrorCodes.multipleMatchingTokens); - } - return accessTokens[0]; - } - /** - * Make a network call to the server requesting credentials - * @param request - developer provided CommonOnBehalfOfRequest - * @param authority - authority object - */ - async executeTokenRequest(request, authority, userAssertionHash) { - const queryParametersString = this.createTokenQueryParameters(request); - const endpoint = UrlString.appendQueryString(authority.tokenEndpoint, queryParametersString); - const requestBody = await this.createTokenRequestBody(request); - const headers = this.createTokenRequestHeaders(); - const thumbprint = { - clientId: this.config.authOptions.clientId, - authority: request.authority, - scopes: request.scopes, - claims: request.claims, - authenticationScheme: request.authenticationScheme, - resourceRequestMethod: request.resourceRequestMethod, - resourceRequestUri: request.resourceRequestUri, - shrClaims: request.shrClaims, - sshKid: request.sshKid, - }; - const reqTimestamp = TimeUtils.nowSeconds(); - const response = await this.executePostToTokenEndpoint(endpoint, requestBody, headers, thumbprint, request.correlationId); - const responseHandler = new ResponseHandler(this.config.authOptions.clientId, this.cacheManager, this.cryptoUtils, this.logger, this.config.serializableCache, this.config.persistencePlugin); - responseHandler.validateTokenResponse(response.body); - const tokenResponse = await responseHandler.handleServerTokenResponse(response.body, this.authority, reqTimestamp, request, undefined, userAssertionHash); - return tokenResponse; - } - /** - * generate a server request in accepable format - * @param request - developer provided CommonOnBehalfOfRequest - */ - async createTokenRequestBody(request) { - const parameterBuilder = new RequestParameterBuilder(); - parameterBuilder.addClientId(this.config.authOptions.clientId); - parameterBuilder.addScopes(request.scopes); - parameterBuilder.addGrantType(GrantType.JWT_BEARER); - parameterBuilder.addClientInfo(); - parameterBuilder.addLibraryInfo(this.config.libraryInfo); - parameterBuilder.addApplicationTelemetry(this.config.telemetry.application); - parameterBuilder.addThrottling(); - if (this.serverTelemetryManager) { - parameterBuilder.addServerTelemetry(this.serverTelemetryManager); - } - const correlationId = request.correlationId || - this.config.cryptoInterface.createNewGuid(); - parameterBuilder.addCorrelationId(correlationId); - parameterBuilder.addRequestTokenUse(AADServerParamKeys.ON_BEHALF_OF); - parameterBuilder.addOboAssertion(request.oboAssertion); - if (this.config.clientCredentials.clientSecret) { - parameterBuilder.addClientSecret(this.config.clientCredentials.clientSecret); - } - const clientAssertion = this.config.clientCredentials.clientAssertion; - if (clientAssertion) { - parameterBuilder.addClientAssertion(await getClientAssertion(clientAssertion.assertion, this.config.authOptions.clientId, request.resourceRequestUri)); - parameterBuilder.addClientAssertionType(clientAssertion.assertionType); - } - if (request.claims || - (this.config.authOptions.clientCapabilities && - this.config.authOptions.clientCapabilities.length > 0)) { - parameterBuilder.addClaims(request.claims, this.config.authOptions.clientCapabilities); - } - return parameterBuilder.createQueryString(); - } -} - -export { OnBehalfOfClient }; -//# sourceMappingURL=OnBehalfOfClient.mjs.map diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/OnBehalfOfClient.mjs.map b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/OnBehalfOfClient.mjs.map deleted file mode 100644 index fa0b32b..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/OnBehalfOfClient.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"OnBehalfOfClient.mjs","sources":["../../src/client/OnBehalfOfClient.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;AAAA;;;AAGG;AAkCH;;;AAGG;AACG,MAAO,gBAAiB,SAAQ,UAAU,CAAA;AAI5C,IAAA,WAAA,CAAY,aAAkC,EAAA;QAC1C,KAAK,CAAC,aAAa,CAAC,CAAC;KACxB;AAED;;;AAGG;IACI,MAAM,YAAY,CACrB,OAAgC,EAAA;AAEhC,QAAA,IAAI,CAAC,QAAQ,GAAG,IAAI,QAAQ,CAAC,OAAO,CAAC,MAAM,IAAI,EAAE,CAAC,CAAC;;AAGnD,QAAA,IAAI,CAAC,iBAAiB,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,UAAU,CACtD,OAAO,CAAC,YAAY,CACvB,CAAC;AAEF,QAAA,IAAI,OAAO,CAAC,SAAS,IAAI,OAAO,CAAC,MAAM,EAAE;AACrC,YAAA,OAAO,IAAI,CAAC,mBAAmB,CAC3B,OAAO,EACP,IAAI,CAAC,SAAS,EACd,IAAI,CAAC,iBAAiB,CACzB,CAAC;AACL,SAAA;QAED,IAAI;AACA,YAAA,OAAO,MAAM,IAAI,CAAC,6BAA6B,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AAED,QAAA,OAAO,gBAAgB,CAAC,iBAAiB,EAAE,CAAC;KAC/C;AACJ;;;;"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/PublicClientApplication.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/PublicClientApplication.d.ts deleted file mode 100644 index 7133ad2..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/PublicClientApplication.d.ts +++ /dev/null @@ -1,73 +0,0 @@ -import { AuthenticationResult, AccountInfo } from "@azure/msal-common/node"; -import { Configuration } from "../config/Configuration.js"; -import { ClientApplication } from "./ClientApplication.js"; -import { IPublicClientApplication } from "./IPublicClientApplication.js"; -import { DeviceCodeRequest } from "../request/DeviceCodeRequest.js"; -import { InteractiveRequest } from "../request/InteractiveRequest.js"; -import { SilentFlowRequest } from "../request/SilentFlowRequest.js"; -import { SignOutRequest } from "../request/SignOutRequest.js"; -/** - * This class is to be used to acquire tokens for public client applications (desktop, mobile). Public client applications - * are not trusted to safely store application secrets, and therefore can only request tokens in the name of an user. - * @public - */ -export declare class PublicClientApplication extends ClientApplication implements IPublicClientApplication { - private nativeBrokerPlugin?; - private readonly skus; - /** - * Important attributes in the Configuration object for auth are: - * - clientID: the application ID of your application. You can obtain one by registering your application with our Application registration portal. - * - authority: the authority URL for your application. - * - * AAD authorities are of the form https://login.microsoftonline.com/\{Enter_the_Tenant_Info_Here\}. - * - If your application supports Accounts in one organizational directory, replace "Enter_the_Tenant_Info_Here" value with the Tenant Id or Tenant name (for example, contoso.microsoft.com). - * - If your application supports Accounts in any organizational directory, replace "Enter_the_Tenant_Info_Here" value with organizations. - * - If your application supports Accounts in any organizational directory and personal Microsoft accounts, replace "Enter_the_Tenant_Info_Here" value with common. - * - To restrict support to Personal Microsoft accounts only, replace "Enter_the_Tenant_Info_Here" value with consumers. - * - * Azure B2C authorities are of the form https://\{instance\}/\{tenant\}/\{policy\}. Each policy is considered - * its own authority. You will have to set the all of the knownAuthorities at the time of the client application - * construction. - * - * ADFS authorities are of the form https://\{instance\}/adfs. - */ - constructor(configuration: Configuration); - /** - * Acquires a token from the authority using OAuth2.0 device code flow. - * This flow is designed for devices that do not have access to a browser or have input constraints. - * The authorization server issues a DeviceCode object with a verification code, an end-user code, - * and the end-user verification URI. The DeviceCode object is provided through a callback, and the end-user should be - * instructed to use another device to navigate to the verification URI to input credentials. - * Since the client cannot receive incoming requests, it polls the authorization server repeatedly - * until the end-user completes input of credentials. - */ - acquireTokenByDeviceCode(request: DeviceCodeRequest): Promise; - /** - * Acquires a token interactively via the browser by requesting an authorization code then exchanging it for a token. - */ - acquireTokenInteractive(request: InteractiveRequest): Promise; - /** - * Returns a token retrieved either from the cache or by exchanging the refresh token for a fresh access token. If brokering is enabled the token request will be serviced by the broker. - * @param request - developer provided SilentFlowRequest - * @returns - */ - acquireTokenSilent(request: SilentFlowRequest): Promise; - /** - * Removes cache artifacts associated with the given account - * @param request - developer provided SignOutRequest - * @returns - */ - signOut(request: SignOutRequest): Promise; - /** - * Returns all cached accounts for this application. If brokering is enabled this request will be serviced by the broker. - * @returns - */ - getAllAccounts(): Promise; - /** - * Attempts to retrieve the redirectUri from the loopback server. If the loopback server does not start listening for requests within the timeout this will throw. - * @param loopbackClient - developer provided custom loopback server implementation - * @returns - */ - private waitForRedirectUri; -} -//# sourceMappingURL=PublicClientApplication.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/PublicClientApplication.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/PublicClientApplication.d.ts.map deleted file mode 100644 index 7d658fa..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/PublicClientApplication.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"PublicClientApplication.d.ts","sourceRoot":"","sources":["../../src/client/PublicClientApplication.ts"],"names":[],"mappings":"AAUA,OAAO,EACH,oBAAoB,EAUpB,WAAW,EAKd,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AAGpE,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AAGtE,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAK9D;;;;GAIG;AACH,qBAAa,uBACT,SAAQ,iBACR,YAAW,wBAAwB;IAEnC,OAAO,CAAC,kBAAkB,CAAC,CAAsB;IACjD,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAS;IAC9B;;;;;;;;;;;;;;;;OAgBG;gBACS,aAAa,EAAE,aAAa;IAoBxC;;;;;;;;OAQG;IACU,wBAAwB,CACjC,OAAO,EAAE,iBAAiB,GAC3B,OAAO,CAAC,oBAAoB,GAAG,IAAI,CAAC;IAqCvC;;OAEG;IACG,uBAAuB,CACzB,OAAO,EAAE,kBAAkB,GAC5B,OAAO,CAAC,oBAAoB,CAAC;IAgGhC;;;;OAIG;IACG,kBAAkB,CACpB,OAAO,EAAE,iBAAiB,GAC3B,OAAO,CAAC,oBAAoB,CAAC;IA0BhC;;;;OAIG;IACG,OAAO,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;IAkBrD;;;OAGG;IACG,cAAc,IAAI,OAAO,CAAC,WAAW,EAAE,CAAC;IAY9C;;;;OAIG;YACW,kBAAkB;CAsCnC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/PublicClientApplication.mjs b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/PublicClientApplication.mjs deleted file mode 100644 index 4ac0fea..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/PublicClientApplication.mjs +++ /dev/null @@ -1,250 +0,0 @@ -/*! @azure/msal-node v2.16.3 2025-08-05 */ -'use strict'; -import { Constants, ApiId, LOOPBACK_SERVER_CONSTANTS } from '../utils/Constants.mjs'; -import { ServerTelemetryManager, AuthError, OIDC_DEFAULT_SCOPES, CodeChallengeMethodValues, ResponseMode, ServerError, Constants as Constants$1, AADServerParamKeys } from '@azure/msal-common/node'; -import { ClientApplication } from './ClientApplication.mjs'; -import { NodeAuthError, NodeAuthErrorMessage } from '../error/NodeAuthError.mjs'; -import { LoopbackClient } from '../network/LoopbackClient.mjs'; -import { DeviceCodeClient } from './DeviceCodeClient.mjs'; -import { version } from '../packageMetadata.mjs'; - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * This class is to be used to acquire tokens for public client applications (desktop, mobile). Public client applications - * are not trusted to safely store application secrets, and therefore can only request tokens in the name of an user. - * @public - */ -class PublicClientApplication extends ClientApplication { - /** - * Important attributes in the Configuration object for auth are: - * - clientID: the application ID of your application. You can obtain one by registering your application with our Application registration portal. - * - authority: the authority URL for your application. - * - * AAD authorities are of the form https://login.microsoftonline.com/\{Enter_the_Tenant_Info_Here\}. - * - If your application supports Accounts in one organizational directory, replace "Enter_the_Tenant_Info_Here" value with the Tenant Id or Tenant name (for example, contoso.microsoft.com). - * - If your application supports Accounts in any organizational directory, replace "Enter_the_Tenant_Info_Here" value with organizations. - * - If your application supports Accounts in any organizational directory and personal Microsoft accounts, replace "Enter_the_Tenant_Info_Here" value with common. - * - To restrict support to Personal Microsoft accounts only, replace "Enter_the_Tenant_Info_Here" value with consumers. - * - * Azure B2C authorities are of the form https://\{instance\}/\{tenant\}/\{policy\}. Each policy is considered - * its own authority. You will have to set the all of the knownAuthorities at the time of the client application - * construction. - * - * ADFS authorities are of the form https://\{instance\}/adfs. - */ - constructor(configuration) { - super(configuration); - if (this.config.broker.nativeBrokerPlugin) { - if (this.config.broker.nativeBrokerPlugin.isBrokerAvailable) { - this.nativeBrokerPlugin = this.config.broker.nativeBrokerPlugin; - this.nativeBrokerPlugin.setLogger(this.config.system.loggerOptions); - } - else { - this.logger.warning("NativeBroker implementation was provided but the broker is unavailable."); - } - } - this.skus = ServerTelemetryManager.makeExtraSkuString({ - libraryName: Constants.MSAL_SKU, - libraryVersion: version, - }); - } - /** - * Acquires a token from the authority using OAuth2.0 device code flow. - * This flow is designed for devices that do not have access to a browser or have input constraints. - * The authorization server issues a DeviceCode object with a verification code, an end-user code, - * and the end-user verification URI. The DeviceCode object is provided through a callback, and the end-user should be - * instructed to use another device to navigate to the verification URI to input credentials. - * Since the client cannot receive incoming requests, it polls the authorization server repeatedly - * until the end-user completes input of credentials. - */ - async acquireTokenByDeviceCode(request) { - this.logger.info("acquireTokenByDeviceCode called", request.correlationId); - const validRequest = Object.assign(request, await this.initializeBaseRequest(request)); - const serverTelemetryManager = this.initializeServerTelemetryManager(ApiId.acquireTokenByDeviceCode, validRequest.correlationId); - try { - const deviceCodeConfig = await this.buildOauthClientConfiguration(validRequest.authority, validRequest.correlationId, "", serverTelemetryManager, undefined, request.azureCloudOptions); - const deviceCodeClient = new DeviceCodeClient(deviceCodeConfig); - this.logger.verbose("Device code client created", validRequest.correlationId); - return await deviceCodeClient.acquireToken(validRequest); - } - catch (e) { - if (e instanceof AuthError) { - e.setCorrelationId(validRequest.correlationId); - } - serverTelemetryManager.cacheFailedRequest(e); - throw e; - } - } - /** - * Acquires a token interactively via the browser by requesting an authorization code then exchanging it for a token. - */ - async acquireTokenInteractive(request) { - const correlationId = request.correlationId || this.cryptoProvider.createNewGuid(); - this.logger.trace("acquireTokenInteractive called", correlationId); - const { openBrowser, successTemplate, errorTemplate, windowHandle, loopbackClient: customLoopbackClient, ...remainingProperties } = request; - if (this.nativeBrokerPlugin) { - const brokerRequest = { - ...remainingProperties, - clientId: this.config.auth.clientId, - scopes: request.scopes || OIDC_DEFAULT_SCOPES, - redirectUri: `${Constants.HTTP_PROTOCOL}${Constants.LOCALHOST}`, - authority: request.authority || this.config.auth.authority, - correlationId: correlationId, - extraParameters: { - ...remainingProperties.extraQueryParameters, - ...remainingProperties.tokenQueryParameters, - [AADServerParamKeys.X_CLIENT_EXTRA_SKU]: this.skus, - }, - accountId: remainingProperties.account?.nativeAccountId, - }; - return this.nativeBrokerPlugin.acquireTokenInteractive(brokerRequest, windowHandle); - } - const { verifier, challenge } = await this.cryptoProvider.generatePkceCodes(); - const loopbackClient = customLoopbackClient || new LoopbackClient(); - let authCodeResponse = {}; - let authCodeListenerError = null; - try { - const authCodeListener = loopbackClient - .listenForAuthCode(successTemplate, errorTemplate) - .then((response) => { - authCodeResponse = response; - }) - .catch((e) => { - // Store the promise instead of throwing so we can control when its thrown - authCodeListenerError = e; - }); - // Wait for server to be listening - const redirectUri = await this.waitForRedirectUri(loopbackClient); - const validRequest = { - ...remainingProperties, - correlationId: correlationId, - scopes: request.scopes || OIDC_DEFAULT_SCOPES, - redirectUri: redirectUri, - responseMode: ResponseMode.QUERY, - codeChallenge: challenge, - codeChallengeMethod: CodeChallengeMethodValues.S256, - }; - const authCodeUrl = await this.getAuthCodeUrl(validRequest); - await openBrowser(authCodeUrl); - await authCodeListener; - if (authCodeListenerError) { - throw authCodeListenerError; - } - if (authCodeResponse.error) { - throw new ServerError(authCodeResponse.error, authCodeResponse.error_description, authCodeResponse.suberror); - } - else if (!authCodeResponse.code) { - throw NodeAuthError.createNoAuthCodeInResponseError(); - } - const clientInfo = authCodeResponse.client_info; - const tokenRequest = { - code: authCodeResponse.code, - codeVerifier: verifier, - clientInfo: clientInfo || Constants$1.EMPTY_STRING, - ...validRequest, - }; - return await this.acquireTokenByCode(tokenRequest); // Await this so the server doesn't close prematurely - } - finally { - loopbackClient.closeServer(); - } - } - /** - * Returns a token retrieved either from the cache or by exchanging the refresh token for a fresh access token. If brokering is enabled the token request will be serviced by the broker. - * @param request - developer provided SilentFlowRequest - * @returns - */ - async acquireTokenSilent(request) { - const correlationId = request.correlationId || this.cryptoProvider.createNewGuid(); - this.logger.trace("acquireTokenSilent called", correlationId); - if (this.nativeBrokerPlugin) { - const brokerRequest = { - ...request, - clientId: this.config.auth.clientId, - scopes: request.scopes || OIDC_DEFAULT_SCOPES, - redirectUri: `${Constants.HTTP_PROTOCOL}${Constants.LOCALHOST}`, - authority: request.authority || this.config.auth.authority, - correlationId: correlationId, - extraParameters: { - ...request.tokenQueryParameters, - [AADServerParamKeys.X_CLIENT_EXTRA_SKU]: this.skus, - }, - accountId: request.account.nativeAccountId, - forceRefresh: request.forceRefresh || false, - }; - return this.nativeBrokerPlugin.acquireTokenSilent(brokerRequest); - } - return super.acquireTokenSilent(request); - } - /** - * Removes cache artifacts associated with the given account - * @param request - developer provided SignOutRequest - * @returns - */ - async signOut(request) { - if (this.nativeBrokerPlugin && request.account.nativeAccountId) { - const signoutRequest = { - clientId: this.config.auth.clientId, - accountId: request.account.nativeAccountId, - correlationId: request.correlationId || - this.cryptoProvider.createNewGuid(), - }; - await this.nativeBrokerPlugin.signOut(signoutRequest); - } - await this.getTokenCache().removeAccount(request.account, request.correlationId); - } - /** - * Returns all cached accounts for this application. If brokering is enabled this request will be serviced by the broker. - * @returns - */ - async getAllAccounts() { - if (this.nativeBrokerPlugin) { - const correlationId = this.cryptoProvider.createNewGuid(); - return this.nativeBrokerPlugin.getAllAccounts(this.config.auth.clientId, correlationId); - } - return this.getTokenCache().getAllAccounts(); - } - /** - * Attempts to retrieve the redirectUri from the loopback server. If the loopback server does not start listening for requests within the timeout this will throw. - * @param loopbackClient - developer provided custom loopback server implementation - * @returns - */ - async waitForRedirectUri(loopbackClient) { - return new Promise((resolve, reject) => { - let ticks = 0; - const id = setInterval(() => { - if (LOOPBACK_SERVER_CONSTANTS.TIMEOUT_MS / - LOOPBACK_SERVER_CONSTANTS.INTERVAL_MS < - ticks) { - clearInterval(id); - reject(NodeAuthError.createLoopbackServerTimeoutError()); - return; - } - try { - const r = loopbackClient.getRedirectUri(); - clearInterval(id); - resolve(r); - return; - } - catch (e) { - if (e instanceof AuthError && - e.errorCode === - NodeAuthErrorMessage.noLoopbackServerExists.code) { - // Loopback server is not listening yet - ticks++; - return; - } - clearInterval(id); - reject(e); - return; - } - }, LOOPBACK_SERVER_CONSTANTS.INTERVAL_MS); - }); - } -} - -export { PublicClientApplication }; -//# sourceMappingURL=PublicClientApplication.mjs.map diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/PublicClientApplication.mjs.map b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/PublicClientApplication.mjs.map deleted file mode 100644 index 5dcf4b7..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/PublicClientApplication.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"PublicClientApplication.mjs","sources":["../../src/client/PublicClientApplication.ts"],"sourcesContent":[null],"names":["CommonConstants"],"mappings":";;;;;;;;;;AAAA;;;AAGG;AAuCH;;;;AAIG;AACG,MAAO,uBACT,SAAQ,iBAAiB,CAAA;AAKzB;;;;;;;;;;;;;;;;AAgBG;AACH,IAAA,WAAA,CAAY,aAA4B,EAAA;QACpC,KAAK,CAAC,aAAa,CAAC,CAAC;AACrB,QAAA,IAAI,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,kBAAkB,EAAE;YACvC,IAAI,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,kBAAkB,CAAC,iBAAiB,EAAE;gBACzD,IAAI,CAAC,kBAAkB,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,kBAAkB,CAAC;AAChE,gBAAA,IAAI,CAAC,kBAAkB,CAAC,SAAS,CAC7B,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,aAAa,CACnC,CAAC;AACL,aAAA;AAAM,iBAAA;AACH,gBAAA,IAAI,CAAC,MAAM,CAAC,OAAO,CACf,yEAAyE,CAC5E,CAAC;AACL,aAAA;AACJ,SAAA;AACD,QAAA,IAAI,CAAC,IAAI,GAAG,sBAAsB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;AAED;;;;AAIG;IACK,MAAM,kBAAkB,CAC5B,cAA+B,EAAA;QAE/B,OAAO,IAAI,OAAO,CAAS,CAAC,OAAO,EAAE,MAAM,KAAI;YAC3C,IAAI,KAAK,GAAG,CAAC,CAAC;AACd,YAAA,MAAM,EAAE,GAAG,WAAW,CAAC,MAAK;gBACxB,IACI,yBAAyB,CAAC,UAAU;AAChC,oBAAA,yBAAyB,CAAC,WAAW;AACzC,oBAAA,KAAK,EACP;oBACE,aAAa,CAAC,EAAE,CAAC,CAAC;AAClB,oBAAA,MAAM,CAAC,aAAa,CAAC,gCAAgC,EAAE,CAAC,CAAC;oBACzD,OAAO;AACV,iBAAA;gBAED,IAAI;AACA,oBAAA,MAAM,CAAC,GAAG,cAAc,CAAC,cAAc,EAAE,CAAC;oBAC1C,aAAa,CAAC,EAAE,CAAC,CAAC;oBAClB,OAAO,CAAC,CAAC,CAAC,CAAC;oBACX,OAAO;AACV,iBAAA;AAAC,gBAAA,OAAO,CAAC,EAAE;oBACR,IACI,CAAC,YAAY,SAAS;AACtB,wBAAA,CAAC,CAAC,SAAS;AACP,4BAAA,oBAAoB,CAAC,sBAAsB,CAAC,IAAI,EACtD;;AAEE,wBAAA,KAAK,EAAE,CAAC;wBACR,OAAO;AACV,qBAAA;oBACD,aAAa,CAAC,EAAE,CAAC,CAAC;oBAClB,MAAM,CAAC,CAAC,CAAC,CAAC;oBACV,OAAO;AACV,iBAAA;AACL,aAAC,EAAE,yBAAyB,CAAC,WAAW,CAAC,CAAC;AAC9C,SAAC,CAAC,CAAC;KACN;AACJ;;;;"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/UsernamePasswordClient.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/UsernamePasswordClient.d.ts deleted file mode 100644 index f165c19..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/UsernamePasswordClient.d.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { AuthenticationResult, BaseClient, ClientConfiguration, CommonUsernamePasswordRequest } from "@azure/msal-common/node"; -/** - * Oauth2.0 Password grant client - * Note: We are only supporting public clients for password grant and for purely testing purposes - * @public - */ -export declare class UsernamePasswordClient extends BaseClient { - constructor(configuration: ClientConfiguration); - /** - * API to acquire a token by passing the username and password to the service in exchage of credentials - * password_grant - * @param request - CommonUsernamePasswordRequest - */ - acquireToken(request: CommonUsernamePasswordRequest): Promise; - /** - * Executes POST request to token endpoint - * @param authority - authority object - * @param request - CommonUsernamePasswordRequest provided by the developer - */ - private executeTokenRequest; - /** - * Generates a map for all the params to be sent to the service - * @param request - CommonUsernamePasswordRequest provided by the developer - */ - private createTokenRequestBody; -} -//# sourceMappingURL=UsernamePasswordClient.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/UsernamePasswordClient.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/UsernamePasswordClient.d.ts.map deleted file mode 100644 index 908ea6a..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/UsernamePasswordClient.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"UsernamePasswordClient.d.ts","sourceRoot":"","sources":["../../src/client/UsernamePasswordClient.ts"],"names":[],"mappings":"AAKA,OAAO,EACH,oBAAoB,EAEpB,UAAU,EAGV,mBAAmB,EACnB,6BAA6B,EAWhC,MAAM,yBAAyB,CAAC;AAEjC;;;;GAIG;AACH,qBAAa,sBAAuB,SAAQ,UAAU;gBACtC,aAAa,EAAE,mBAAmB;IAI9C;;;;OAIG;IACG,YAAY,CACd,OAAO,EAAE,6BAA6B,GACvC,OAAO,CAAC,oBAAoB,GAAG,IAAI,CAAC;IA8BvC;;;;OAIG;YACW,mBAAmB;IAmCjC;;;OAGG;YACW,sBAAsB;CAyEvC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/UsernamePasswordClient.mjs b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/UsernamePasswordClient.mjs deleted file mode 100644 index 781b324..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/UsernamePasswordClient.mjs +++ /dev/null @@ -1,103 +0,0 @@ -/*! @azure/msal-node v2.16.3 2025-08-05 */ -'use strict'; -import { BaseClient, TimeUtils, ResponseHandler, UrlString, CcsCredentialType, RequestParameterBuilder, GrantType, getClientAssertion, StringUtils } from '@azure/msal-common/node'; - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * Oauth2.0 Password grant client - * Note: We are only supporting public clients for password grant and for purely testing purposes - * @public - */ -class UsernamePasswordClient extends BaseClient { - constructor(configuration) { - super(configuration); - } - /** - * API to acquire a token by passing the username and password to the service in exchage of credentials - * password_grant - * @param request - CommonUsernamePasswordRequest - */ - async acquireToken(request) { - this.logger.info("in acquireToken call in username-password client"); - const reqTimestamp = TimeUtils.nowSeconds(); - const response = await this.executeTokenRequest(this.authority, request); - const responseHandler = new ResponseHandler(this.config.authOptions.clientId, this.cacheManager, this.cryptoUtils, this.logger, this.config.serializableCache, this.config.persistencePlugin); - // Validate response. This function throws a server error if an error is returned by the server. - responseHandler.validateTokenResponse(response.body); - const tokenResponse = responseHandler.handleServerTokenResponse(response.body, this.authority, reqTimestamp, request); - return tokenResponse; - } - /** - * Executes POST request to token endpoint - * @param authority - authority object - * @param request - CommonUsernamePasswordRequest provided by the developer - */ - async executeTokenRequest(authority, request) { - const queryParametersString = this.createTokenQueryParameters(request); - const endpoint = UrlString.appendQueryString(authority.tokenEndpoint, queryParametersString); - const requestBody = await this.createTokenRequestBody(request); - const headers = this.createTokenRequestHeaders({ - credential: request.username, - type: CcsCredentialType.UPN, - }); - const thumbprint = { - clientId: this.config.authOptions.clientId, - authority: authority.canonicalAuthority, - scopes: request.scopes, - claims: request.claims, - authenticationScheme: request.authenticationScheme, - resourceRequestMethod: request.resourceRequestMethod, - resourceRequestUri: request.resourceRequestUri, - shrClaims: request.shrClaims, - sshKid: request.sshKid, - }; - return this.executePostToTokenEndpoint(endpoint, requestBody, headers, thumbprint, request.correlationId); - } - /** - * Generates a map for all the params to be sent to the service - * @param request - CommonUsernamePasswordRequest provided by the developer - */ - async createTokenRequestBody(request) { - const parameterBuilder = new RequestParameterBuilder(); - parameterBuilder.addClientId(this.config.authOptions.clientId); - parameterBuilder.addUsername(request.username); - parameterBuilder.addPassword(request.password); - parameterBuilder.addScopes(request.scopes); - parameterBuilder.addResponseTypeForTokenAndIdToken(); - parameterBuilder.addGrantType(GrantType.RESOURCE_OWNER_PASSWORD_GRANT); - parameterBuilder.addClientInfo(); - parameterBuilder.addLibraryInfo(this.config.libraryInfo); - parameterBuilder.addApplicationTelemetry(this.config.telemetry.application); - parameterBuilder.addThrottling(); - if (this.serverTelemetryManager) { - parameterBuilder.addServerTelemetry(this.serverTelemetryManager); - } - const correlationId = request.correlationId || - this.config.cryptoInterface.createNewGuid(); - parameterBuilder.addCorrelationId(correlationId); - if (this.config.clientCredentials.clientSecret) { - parameterBuilder.addClientSecret(this.config.clientCredentials.clientSecret); - } - const clientAssertion = this.config.clientCredentials.clientAssertion; - if (clientAssertion) { - parameterBuilder.addClientAssertion(await getClientAssertion(clientAssertion.assertion, this.config.authOptions.clientId, request.resourceRequestUri)); - parameterBuilder.addClientAssertionType(clientAssertion.assertionType); - } - if (!StringUtils.isEmptyObj(request.claims) || - (this.config.authOptions.clientCapabilities && - this.config.authOptions.clientCapabilities.length > 0)) { - parameterBuilder.addClaims(request.claims, this.config.authOptions.clientCapabilities); - } - if (this.config.systemOptions.preventCorsPreflight && - request.username) { - parameterBuilder.addCcsUpn(request.username); - } - return parameterBuilder.createQueryString(); - } -} - -export { UsernamePasswordClient }; -//# sourceMappingURL=UsernamePasswordClient.mjs.map diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/UsernamePasswordClient.mjs.map b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/UsernamePasswordClient.mjs.map deleted file mode 100644 index dfd09d1..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/client/UsernamePasswordClient.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"UsernamePasswordClient.mjs","sources":["../../src/client/UsernamePasswordClient.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;AAAA;;;AAGG;AAsBH;;;;AAIG;AACG,MAAO,sBAAuB,SAAQ,UAAU,CAAA;AAClD,IAAA,WAAA,CAAY,aAAkC,EAAA;QAC1C,KAAK,CAAC,aAAa,CAAC,CAAC;KACxB;AAED;;;;AAIG;IACH,MAAM,YAAY,CACd,OAAsC,EAAA;AAEtC,QAAA,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,kDAAkD,CAAC,CAAC;AAErE,QAAA,MAAM,YAAY,GAAG,SAAS,CAAC,UAAU,EAAE,CAAC;AAC5C,QAAA,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,mBAAmB,CAC3C,IAAI,CAAC,SAAS,EACd,OAAO,CACV,CAAC;AAEF,QAAA,MAAM,eAAe,GAAG,IAAI,eAAe,CACvC,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,QAAQ,EAChC,IAAI,CAAC,YAAY,EACjB,IAAI,CAAC,WAAW,EAChB,IAAI,CAAC,MAAM,EACX,IAAI,CAAC,MAAM,CAAC,iBAAiB,EAC7B,IAAI,CAAC,MAAM,CAAC,iBAAiB,CAChC,CAAC;;AAGF,QAAA,eAAe,CAAC,qBAAqB,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;AACrD,QAAA,MAAM,aAAa,GAAG,eAAe,CAAC,yBAAyB,CAC3D,QAAQ,CAAC,IAAI,EACb,IAAI,CAAC,SAAS,EACd,YAAY,EACZ,OAAO,CACV,CAAC;AAEF,QAAA,OAAO,aAAa,CAAC;KACxB;AAED;;;;AAIG;AACK,IAAA,MAAM,mBAAmB,CAC7B,SAAoB,EACpB,OAAsC,EAAA;QAEtC,MAAM,qBAAqB,GAAG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AAsB,CACnC,eAAe,CAAC,aAAa,CAChC,CAAC;AACL,SAAA;QAED,IACI,CAAC,WAAW,CAAC,UAAU,CAAC,OAAO,CAAC,MAAM,CAAC;AACvC,aAAC,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,kBAAkB;gBACvC,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,kBAAkB,CAAC,MAAM,GAAG,CAAC,CAAC,EAC5D;AACE,YAAA,gBAAgB,CAAC,SAAS,CACtB,OAAO,CAAC,MAAM,EACd,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,kBAAkB,CAC7C,CAAC;AACL,SAAA;AAED,QAAA,IACI,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,oBAAoB;YAC9C,OAAO,CAAC,QAAQ,EAClB;AACE,YAAA,gBAAgB,CAAC,SAAS,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;AAChD,SAAA;AAED,QAAA,OAAO,gBAAgB,CAAC,iBAAiB,EAAE,CAAC;KAC/C;AACJ;;;;"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/config/Configuration.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/config/Configuration.d.ts deleted file mode 100644 index 84fd581..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/config/Configuration.d.ts +++ /dev/null @@ -1,136 +0,0 @@ -/// -/// -import { LoggerOptions, INetworkModule, ProtocolMode, ICachePlugin, AzureCloudOptions, ApplicationTelemetry, INativeBrokerPlugin, ClientAssertionCallback } from "@azure/msal-common/node"; -import http from "http"; -import https from "https"; -import { ManagedIdentityId } from "./ManagedIdentityId.js"; -/** - * - clientId - Client id of the application. - * - authority - Url of the authority. If no value is set, defaults to https://login.microsoftonline.com/common. - * - knownAuthorities - Needed for Azure B2C and ADFS. All authorities that will be used in the client application. Only the host of the authority should be passed in. - * - clientSecret - Secret string that the application uses when requesting a token. Only used in confidential client applications. Can be created in the Azure app registration portal. - * - clientAssertion - A ClientAssertion object containing an assertion string or a callback function that returns an assertion string that the application uses when requesting a token, as well as the assertion's type (urn:ietf:params:oauth:client-assertion-type:jwt-bearer). Only used in confidential client applications. - * - clientCertificate - Certificate that the application uses when requesting a token. Only used in confidential client applications. Requires hex encoded X.509 SHA-1 or SHA-256 thumbprint of the certificate, and the PEM encoded private key (string should contain -----BEGIN PRIVATE KEY----- ... -----END PRIVATE KEY----- ) - * - protocolMode - Enum that represents the protocol that msal follows. Used for configuring proper endpoints. - * - skipAuthorityMetadataCache - A flag to choose whether to use or not use the local metadata cache during authority initialization. Defaults to false. - * @public - */ -export type NodeAuthOptions = { - clientId: string; - authority?: string; - clientSecret?: string; - clientAssertion?: string | ClientAssertionCallback; - clientCertificate?: { - /** - * @deprecated Use thumbprintSha2 property instead. Thumbprint needs to be computed with SHA-256 algorithm. - * SHA-1 is only needed for backwards compatibility with older versions of ADFS. - */ - thumbprint?: string; - thumbprintSha256?: string; - privateKey: string; - x5c?: string; - }; - knownAuthorities?: Array; - cloudDiscoveryMetadata?: string; - authorityMetadata?: string; - clientCapabilities?: Array; - protocolMode?: ProtocolMode; - azureCloudOptions?: AzureCloudOptions; - skipAuthorityMetadataCache?: boolean; -}; -/** - * Use this to configure the below cache configuration options: - * - * - cachePlugin - Plugin for reading and writing token cache to disk. - * @public - */ -export type CacheOptions = { - cachePlugin?: ICachePlugin; - /** - * @deprecated claims-based-caching functionality will be removed in the next version of MSALJS - */ - claimsBasedCachingEnabled?: boolean; -}; -/** - * Use this to configure the below broker options: - * - nativeBrokerPlugin - Native broker implementation (should be imported from msal-node-extensions) - * - * Note: These options are only available for PublicClientApplications using the Authorization Code Flow - * @public - */ -export type BrokerOptions = { - nativeBrokerPlugin?: INativeBrokerPlugin; -}; -/** - * Type for configuring logger and http client options - * - * - logger - Used to initialize the Logger object; TODO: Expand on logger details or link to the documentation on logger - * - networkClient - Http client used for all http get and post calls. Defaults to using MSAL's default http client. - * @public - */ -export type NodeSystemOptions = { - loggerOptions?: LoggerOptions; - networkClient?: INetworkModule; - proxyUrl?: string; - customAgentOptions?: http.AgentOptions | https.AgentOptions; - disableInternalRetries?: boolean; -}; -/** @public */ -export type NodeTelemetryOptions = { - application?: ApplicationTelemetry; -}; -/** - * Use the configuration object to configure MSAL and initialize the client application object - * - * - auth: this is where you configure auth elements like clientID, authority used for authenticating against the Microsoft Identity Platform - * - broker: this is where you configure broker options - * - cache: this is where you configure cache location - * - system: this is where you can configure the network client, logger - * - telemetry: this is where you can configure telemetry options - * @public - */ -export type Configuration = { - auth: NodeAuthOptions; - broker?: BrokerOptions; - cache?: CacheOptions; - system?: NodeSystemOptions; - telemetry?: NodeTelemetryOptions; -}; -/** @public */ -export type ManagedIdentityIdParams = { - userAssignedClientId?: string; - userAssignedResourceId?: string; - userAssignedObjectId?: string; -}; -/** @public */ -export type ManagedIdentityConfiguration = { - managedIdentityIdParams?: ManagedIdentityIdParams; - system?: NodeSystemOptions; -}; -/** @internal */ -export type NodeConfiguration = { - auth: Required; - broker: BrokerOptions; - cache: CacheOptions; - system: Required; - telemetry: Required; -}; -/** - * Sets the default options when not explicitly configured from app developer - * - * @param auth - Authentication options - * @param cache - Cache options - * @param system - System options - * @param telemetry - Telemetry options - * - * @returns Configuration - * @internal - */ -export declare function buildAppConfiguration({ auth, broker, cache, system, telemetry, }: Configuration): NodeConfiguration; -/** @internal */ -export type ManagedIdentityNodeConfiguration = { - managedIdentityId: ManagedIdentityId; - system: Required>; -}; -export declare function buildManagedIdentityConfiguration({ managedIdentityIdParams, system, }: ManagedIdentityConfiguration): ManagedIdentityNodeConfiguration; -//# sourceMappingURL=Configuration.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/config/Configuration.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/config/Configuration.d.ts.map deleted file mode 100644 index 2181f51..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/config/Configuration.d.ts.map +++ /dev/null @@ -1 +0,0 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C,SAAS,EAAE,QAAQ,CAAC,oBAAoB,CAAC,CAAC;CAC7C,CAAC;AAEF;;;;;;;;;;GAUG;AACH,wBAAgB,qBAAqB,CAAC,EAClC,IAAI,EACJ,MAAM,EACN,KAAK,EACL,MAAM,EACN,SAAS,GACZ,EAAE,aAAa,GAAG,iBAAiB,CA2BnC;AAED,gBAAgB;AAChB,MAAM,MAAM,gCAAgC,GAAG;IAC3C,iBAAiB,EAAE,iBAAiB,CAAC;IACrC,MAAM,EAAE,QAAQ,CACZ,IAAI,CAAC,iBAAiB,EAAE,eAAe,GAAG,eAAe,CAAC,CAC7D,CAAC;CACL,CAAC;AAEF,wBAAgB,iCAAiC,CAAC,EAC9C,uBAAuB,EACvB,MAAM,GACT,EAAE,4BAA4B,GAAG,gCAAgC,CAwCjE"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/config/Configuration.mjs b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/config/Configuration.mjs deleted file mode 100644 index 4d68133..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/config/Configuration.mjs +++ /dev/null @@ -1,119 +0,0 @@ -/*! @azure/msal-node v2.16.3 2025-08-05 */ -'use strict'; -import { Constants, LogLevel, AzureCloudInstance, ProtocolMode } from '@azure/msal-common/node'; -import { HttpClient } from '../network/HttpClient.mjs'; -import { ManagedIdentityId } from './ManagedIdentityId.mjs'; -import { MANAGED_IDENTITY_MAX_RETRIES, MANAGED_IDENTITY_RETRY_DELAY, MANAGED_IDENTITY_HTTP_STATUS_CODES_TO_RETRY_ON } from '../utils/Constants.mjs'; -import { LinearRetryPolicy } from '../retry/LinearRetryPolicy.mjs'; -import { HttpClientWithRetries } from '../network/HttpClientWithRetries.mjs'; -import { NodeAuthError } from '../error/NodeAuthError.mjs'; - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -const DEFAULT_AUTH_OPTIONS = { - clientId: Constants.EMPTY_STRING, - authority: Constants.DEFAULT_AUTHORITY, - clientSecret: Constants.EMPTY_STRING, - clientAssertion: Constants.EMPTY_STRING, - clientCertificate: { - thumbprint: Constants.EMPTY_STRING, - thumbprintSha256: Constants.EMPTY_STRING, - privateKey: Constants.EMPTY_STRING, - x5c: Constants.EMPTY_STRING, - }, - knownAuthorities: [], - cloudDiscoveryMetadata: Constants.EMPTY_STRING, - authorityMetadata: Constants.EMPTY_STRING, - clientCapabilities: [], - protocolMode: ProtocolMode.AAD, - azureCloudOptions: { - azureCloudInstance: AzureCloudInstance.None, - tenant: Constants.EMPTY_STRING, - }, - skipAuthorityMetadataCache: false, -}; -const DEFAULT_CACHE_OPTIONS = { - claimsBasedCachingEnabled: false, -}; -const DEFAULT_LOGGER_OPTIONS = { - loggerCallback: () => { - // allow users to not set logger call back - }, - piiLoggingEnabled: false, - logLevel: LogLevel.Info, -}; -const DEFAULT_SYSTEM_OPTIONS = { - loggerOptions: DEFAULT_LOGGER_OPTIONS, - networkClient: new HttpClient(), - proxyUrl: Constants.EMPTY_STRING, - customAgentOptions: {}, - disableInternalRetries: false, -}; -const DEFAULT_TELEMETRY_OPTIONS = { - application: { - appName: Constants.EMPTY_STRING, - appVersion: Constants.EMPTY_STRING, - }, -}; -/** - * Sets the default options when not explicitly configured from app developer - * - * @param auth - Authentication options - * @param cache - Cache options - * @param system - System options - * @param telemetry - Telemetry options - * - * @returns Configuration - * @internal - */ -function buildAppConfiguration({ auth, broker, cache, system, telemetry, }) { - const systemOptions = { - ...DEFAULT_SYSTEM_OPTIONS, - networkClient: new HttpClient(system?.proxyUrl, system?.customAgentOptions), - loggerOptions: system?.loggerOptions || DEFAULT_LOGGER_OPTIONS, - disableInternalRetries: system?.disableInternalRetries || false, - }; - // if client certificate was provided, ensure that at least one of the SHA-1 or SHA-256 thumbprints were provided - if (!!auth.clientCertificate && - !!!auth.clientCertificate.thumbprint && - !!!auth.clientCertificate.thumbprintSha256) { - throw NodeAuthError.createStateNotFoundError(); - } - return { - auth: { ...DEFAULT_AUTH_OPTIONS, ...auth }, - broker: { ...broker }, - cache: { ...DEFAULT_CACHE_OPTIONS, ...cache }, - system: { ...systemOptions, ...system }, - telemetry: { ...DEFAULT_TELEMETRY_OPTIONS, ...telemetry }, - }; -} -function buildManagedIdentityConfiguration({ managedIdentityIdParams, system, }) { - const managedIdentityId = new ManagedIdentityId(managedIdentityIdParams); - const loggerOptions = system?.loggerOptions || DEFAULT_LOGGER_OPTIONS; - let networkClient; - // use developer provided network client if passed in - if (system?.networkClient) { - networkClient = system.networkClient; - // otherwise, create a new one - } - else { - networkClient = new HttpClient(system?.proxyUrl, system?.customAgentOptions); - } - // wrap the network client with a retry policy if the developer has not disabled the option to do so - if (!system?.disableInternalRetries) { - const linearRetryPolicy = new LinearRetryPolicy(MANAGED_IDENTITY_MAX_RETRIES, MANAGED_IDENTITY_RETRY_DELAY, MANAGED_IDENTITY_HTTP_STATUS_CODES_TO_RETRY_ON); - networkClient = new HttpClientWithRetries(networkClient, linearRetryPolicy); - } - return { - managedIdentityId: managedIdentityId, - system: { - loggerOptions, - networkClient, - }, - }; -} - -export { buildAppConfiguration, buildManagedIdentityConfiguration }; -//# sourceMappingURL=Configuration.mjs.map diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/config/Configuration.mjs.map b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/config/Configuration.mjs.map deleted file mode 100644 index 4e17164..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/config/Configuration.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Configuration.mjs","sources":["../../src/config/Configuration.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;;AAAA;;;AAGG;AA2IH,MAAM,oBAAoB,GAA8B;IACpD,QAAQ,EAAE,SAAS,CAAC,YAAY;IAChC,SAAS,EAAE,SAAS,CAAC,iBAAiB;IACtC,YAAY,EAAE,SAAS,CAAC,YAAY;IACpC,eAAe,EAAE,SAAS,CAAC,YAAY;AACvC,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I,UAAU,CAC1B,MAAM,EAAE,QAAQ,EAChB,MAAM,EAAE,kBAA4D,CACvE,CAAC;AACL,KAAA;;AAGD,IAAA,IAAI,CAAC,MAAM,EAAE,sBAAsB,EAAE;QACjC,MAAM,iBAAiB,GAAsB,IAAI,iBAAiB,CAC9D,4BAA4B,EAC5B,4BAA4B,EAC5B,8CAA8C,CACjD,CAAC;QACF,aAAa,GAAG,IAAI,qBAAqB,CACrC,aAAa,EACb,iBAAiB,CACpB,CAAC;AACL,KAAA;IAED,OAAO;AACH,QAAA,iBAAiB,EAAE,iBAAiB;AACpC,QAAA,MAAM,EAAE;YACJ,aAAa;YACb,aAAa;AAChB,SAAA;KACJ,CAAC;AACN;;;;"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/config/ManagedIdentityId.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/config/ManagedIdentityId.d.ts deleted file mode 100644 index 48cf9d1..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/config/ManagedIdentityId.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { ManagedIdentityIdType } from "../utils/Constants.js"; -import { ManagedIdentityIdParams } from "./Configuration.js"; -export declare class ManagedIdentityId { - private _id; - get id(): string; - private set id(value); - private _idType; - get idType(): ManagedIdentityIdType; - private set idType(value); - constructor(managedIdentityIdParams?: ManagedIdentityIdParams); -} -//# sourceMappingURL=ManagedIdentityId.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/config/ManagedIdentityId.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/config/ManagedIdentityId.d.ts.map deleted file mode 100644 index b392e63..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/config/ManagedIdentityId.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ManagedIdentityId.d.ts","sourceRoot":"","sources":["../../src/config/ManagedIdentityId.ts"],"names":[],"mappings":"AASA,OAAO,EAEH,qBAAqB,EACxB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAE7D,qBAAa,iBAAiB;IAC1B,OAAO,CAAC,GAAG,CAAS;IACpB,IAAW,EAAE,IAAI,MAAM,CAEtB;IACD,OAAO,KAAK,EAAE,QAEb;IAED,OAAO,CAAC,OAAO,CAAwB;IACvC,IAAW,MAAM,IAAI,qBAAqB,CAEzC;IACD,OAAO,KAAK,MAAM,QAEjB;gBAEW,uBAAuB,CAAC,EAAE,uBAAuB;CAwChE"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/config/ManagedIdentityId.mjs b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/config/ManagedIdentityId.mjs deleted file mode 100644 index aa93da7..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/config/ManagedIdentityId.mjs +++ /dev/null @@ -1,57 +0,0 @@ -/*! @azure/msal-node v2.16.3 2025-08-05 */ -'use strict'; -import { createManagedIdentityError } from '../error/ManagedIdentityError.mjs'; -import { ManagedIdentityIdType, DEFAULT_MANAGED_IDENTITY_ID } from '../utils/Constants.mjs'; -import { invalidManagedIdentityIdType } from '../error/ManagedIdentityErrorCodes.mjs'; - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -class ManagedIdentityId { - get id() { - return this._id; - } - set id(value) { - this._id = value; - } - get idType() { - return this._idType; - } - set idType(value) { - this._idType = value; - } - constructor(managedIdentityIdParams) { - const userAssignedClientId = managedIdentityIdParams?.userAssignedClientId; - const userAssignedResourceId = managedIdentityIdParams?.userAssignedResourceId; - const userAssignedObjectId = managedIdentityIdParams?.userAssignedObjectId; - if (userAssignedClientId) { - if (userAssignedResourceId || userAssignedObjectId) { - throw createManagedIdentityError(invalidManagedIdentityIdType); - } - this.id = userAssignedClientId; - this.idType = ManagedIdentityIdType.USER_ASSIGNED_CLIENT_ID; - } - else if (userAssignedResourceId) { - if (userAssignedClientId || userAssignedObjectId) { - throw createManagedIdentityError(invalidManagedIdentityIdType); - } - this.id = userAssignedResourceId; - this.idType = ManagedIdentityIdType.USER_ASSIGNED_RESOURCE_ID; - } - else if (userAssignedObjectId) { - if (userAssignedClientId || userAssignedResourceId) { - throw createManagedIdentityError(invalidManagedIdentityIdType); - } - this.id = userAssignedObjectId; - this.idType = ManagedIdentityIdType.USER_ASSIGNED_OBJECT_ID; - } - else { - this.id = DEFAULT_MANAGED_IDENTITY_ID; - this.idType = ManagedIdentityIdType.SYSTEM_ASSIGNED; - } - } -} - -export { ManagedIdentityId }; -//# sourceMappingURL=ManagedIdentityId.mjs.map diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/config/ManagedIdentityId.mjs.map b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/config/ManagedIdentityId.mjs.map deleted file mode 100644 index 7214cdb..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/config/ManagedIdentityId.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ManagedIdentityId.mjs","sources":["../../src/config/ManagedIdentityId.ts"],"sourcesContent":[null],"names":["ManagedIdentityErrorCodes.invalidManagedIdentityIdType"],"mappings":";;;;;;AAAA;;;AAGG;MAYU,iBAAiB,CAAA;AAE1B,IAAA,IAAW,EAAE,GAAA;QACT,OAAO,IAAI,CAAC,GAAG,CAAC;KACnB;IACD,IAAY,EAAE,CAAC,KAAa,EAAA;AACxB,QAAA,IAAI,CAAC,GAAG,GAAG,KAAK,CAAC;KACpB;AAGD,IAAA,IAAW,MAAM,GAAA;QACb,OAAO,IAAI,CAAC,OAAO,CAAC;KACvB;IACD,IAAY,MAAM,CAAC,KAA4B,EAAA;AAC3C,QAAA,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;KACxB;AAED,IAAA,WAAA,CAAY,uBAAiD,EAAA;AACzD,QAAA,MAAM,oBAAoB,GACtB,uBAAuB,EAAE,oBAAoB,CAAC;AAClD,QAAA,MAAM,sBAAsB,GACxB,uBAAuB,EAAE,sBAAsB,CAAC;AACpD,QAAA,MAAM,oBAAoB,GACtB,uBAAuB,EAAE,oBAAoB,CAAC;AAElD,QAAA,IAAI,oBAAoB,EAAE;YACtB,IAAI,sBAAsB,IAAI,oBAAoB,EAAE;AAChD,gBAAA,MAAM,0BAA0B,CAC5BA,4BAAsD,CACzD,CAAC;AACL,aAAA;AAED,YAAA,IAAI,CAAC,EAAE,GAAG,oBAAoB,CAAC;AAC/B,YAAA,IAAI,CAAC,MAAM,GAAG,qBAAqB,CAAC,uBAAuB,CAAC;AAC/D,SAAA;AAAM,aAAA,IAAI,sBAAsB,EAAE;YAC/B,IAAI,oBAAoB,IAAI,oBAAoB,EAAE;AAC9C,gBAAA,MAAM,0BAA0B,CAC5BA,4BAAsD,CACzD,CAAC;AACL,aAAA;AAED,YAAA,IAAI,CAAC,EAAE,GAAG,sBAAsB,CAAC;AACjC,YAAA,IAAI,CAAC,MAAM,GAAG,qBAAqB,CAAC,yBAAyB,CAAC;AACjE,SAAA;AAAM,aAAA,IAAI,oBAAoB,EAAE;YAC7B,IAAI,oBAAoB,IAAI,sBAAsB,EAAE;AAChD,gBAAA,MAAM,0BAA0B,CAC5BA,4BAAsD,CACzD,CAAC;AACL,aAAA;AAED,YAAA,IAAI,CAAC,EAAE,GAAG,oBAAoB,CAAC;AAC/B,YAAA,IAAI,CAAC,MAAM,GAAG,qBAAqB,CAAC,uBAAuB,CAAC;AAC/D,SAAA;AAAM,aAAA;AACH,YAAA,IAAI,CAAC,EAAE,GAAG,2BAA2B,CAAC;AACtC,YAAA,IAAI,CAAC,MAAM,GAAG,qBAAqB,CAAC,eAAe,CAAC;AACvD,SAAA;KACJ;AACJ;;;;"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/config/ManagedIdentityRequestParameters.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/config/ManagedIdentityRequestParameters.d.ts deleted file mode 100644 index 401c423..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/config/ManagedIdentityRequestParameters.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { HttpMethod } from "../utils/Constants.js"; -export declare class ManagedIdentityRequestParameters { - private _baseEndpoint; - httpMethod: HttpMethod; - headers: Record; - bodyParameters: Record; - queryParameters: Record; - constructor(httpMethod: HttpMethod, endpoint: string); - computeUri(): string; - computeParametersBodyString(): string; -} -//# sourceMappingURL=ManagedIdentityRequestParameters.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/config/ManagedIdentityRequestParameters.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/config/ManagedIdentityRequestParameters.d.ts.map deleted file mode 100644 index 214cec7..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/config/ManagedIdentityRequestParameters.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ManagedIdentityRequestParameters.d.ts","sourceRoot":"","sources":["../../src/config/ManagedIdentityRequestParameters.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAEnD,qBAAa,gCAAgC;IACzC,OAAO,CAAC,aAAa,CAAS;IACvB,UAAU,EAAE,UAAU,CAAC;IACvB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChC,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACvC,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;gBAEnC,UAAU,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM;IAQ7C,UAAU,IAAI,MAAM;IAepB,2BAA2B,IAAI,MAAM;CAS/C"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/config/ManagedIdentityRequestParameters.mjs b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/config/ManagedIdentityRequestParameters.mjs deleted file mode 100644 index de851b0..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/config/ManagedIdentityRequestParameters.mjs +++ /dev/null @@ -1,35 +0,0 @@ -/*! @azure/msal-node v2.16.3 2025-08-05 */ -'use strict'; -import { RequestParameterBuilder, UrlString } from '@azure/msal-common/node'; - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -class ManagedIdentityRequestParameters { - constructor(httpMethod, endpoint) { - this.httpMethod = httpMethod; - this._baseEndpoint = endpoint; - this.headers = {}; - this.bodyParameters = {}; - this.queryParameters = {}; - } - computeUri() { - const parameterBuilder = new RequestParameterBuilder(); - if (this.queryParameters) { - parameterBuilder.addExtraQueryParameters(this.queryParameters); - } - const queryParametersString = parameterBuilder.createQueryString(); - return UrlString.appendQueryString(this._baseEndpoint, queryParametersString); - } - computeParametersBodyString() { - const parameterBuilder = new RequestParameterBuilder(); - if (this.bodyParameters) { - parameterBuilder.addExtraQueryParameters(this.bodyParameters); - } - return parameterBuilder.createQueryString(); - } -} - -export { ManagedIdentityRequestParameters }; -//# sourceMappingURL=ManagedIdentityRequestParameters.mjs.map diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/config/ManagedIdentityRequestParameters.mjs.map b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/config/ManagedIdentityRequestParameters.mjs.map deleted file mode 100644 index a0b2d6d..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/config/ManagedIdentityRequestParameters.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ManagedIdentityRequestParameters.mjs","sources":["../../src/config/ManagedIdentityRequestParameters.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;AAAA;;;AAGG;MAKU,gCAAgC,CAAA;IAOzC,WAAY,CAAA,UAAsB,EAAE,QAAgB,EAAA;AAChD,QAAA,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;AAC7B,QAAA,IAAI,CAAC,aAAa,GAAG,QAAQ,CAAC;AAC9B,QAAA,IAAI,CAAC,OAAO,GAAG,EAA4B,CAAC;AAC5C,QAAA,IAAI,CAAC,cAAc,GAAG,EAA4B,CAAC;AACnD,QAAA,IAAI,CAAC,eAAe,GAAG,EAA4B,CAAC;KACvD;IAEM,UAAU,GAAA;AACb,QAAA,MAAM,gBAAgB,GAAG,IAAI,uBAAuB,EAAE,CAAC;QAEvD,IAAI,IAAI,CAAC,eAAe,EAAE;AACtB,YAAA,gBAAgB,CAAC,uBAAuB,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;AAClE,SAAA;AAED,QAAA,MAAM,qBAAqB,GAAG,gBAAgB,CAAC,iBAAiB,EAAE,CAAC;QAEnE,OAAO,SAAS,CAAC,iBAAiB,CAC9B,IAAI,CAAC,aAAa,EAClB,qBAAqB,CACxB,CAAC;KACL;IAEM,2BAA2B,GAAA;AAC9B,QAAA,MAAM,gBAAgB,GAAG,IAAI,uBAAuB,EAAE,CAAC;QAEvD,IAAI,IAAI,CAAC,cAAc,EAAE;AACrB,YAAA,gBAAgB,CAAC,uBAAuB,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;AACjE,SAAA;AAED,QAAA,OAAO,gBAAgB,CAAC,iBAAiB,EAAE,CAAC;KAC/C;AACJ;;;;"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/crypto/CryptoProvider.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/crypto/CryptoProvider.d.ts deleted file mode 100644 index b199c9f..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/crypto/CryptoProvider.d.ts +++ /dev/null @@ -1,63 +0,0 @@ -import { ICrypto, PkceCodes } from "@azure/msal-common/node"; -/** - * This class implements MSAL node's crypto interface, which allows it to perform base64 encoding and decoding, generating cryptographically random GUIDs and - * implementing Proof Key for Code Exchange specs for the OAuth Authorization Code Flow using PKCE (rfc here: https://tools.ietf.org/html/rfc7636). - * @public - */ -export declare class CryptoProvider implements ICrypto { - private pkceGenerator; - private guidGenerator; - private hashUtils; - constructor(); - /** - * base64 URL safe encoded string - */ - base64UrlEncode(): string; - /** - * Stringifies and base64Url encodes input public key - * @param inputKid - public key id - * @returns Base64Url encoded public key - */ - encodeKid(): string; - /** - * Creates a new random GUID - used to populate state and nonce. - * @returns string (GUID) - */ - createNewGuid(): string; - /** - * Encodes input string to base64. - * @param input - string to be encoded - */ - base64Encode(input: string): string; - /** - * Decodes input string from base64. - * @param input - string to be decoded - */ - base64Decode(input: string): string; - /** - * Generates PKCE codes used in Authorization Code Flow. - */ - generatePkceCodes(): Promise; - /** - * Generates a keypair, stores it and returns a thumbprint - not yet implemented for node - */ - getPublicKeyThumbprint(): Promise; - /** - * Removes cryptographic keypair from key store matching the keyId passed in - * @param kid - public key id - */ - removeTokenBindingKey(): Promise; - /** - * Removes all cryptographic keys from Keystore - */ - clearKeystore(): Promise; - /** - * Signs the given object as a jwt payload with private key retrieved by given kid - currently not implemented for node - */ - signJwt(): Promise; - /** - * Returns the SHA-256 hash of an input string - */ - hashString(plainText: string): Promise; -} -//# sourceMappingURL=CryptoProvider.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/crypto/CryptoProvider.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/crypto/CryptoProvider.d.ts.map deleted file mode 100644 index dbddf5c..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/crypto/CryptoProvider.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"CryptoProvider.d.ts","sourceRoot":"","sources":["../../src/crypto/CryptoProvider.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAM7D;;;;GAIG;AACH,qBAAa,cAAe,YAAW,OAAO;IAC1C,OAAO,CAAC,aAAa,CAAgB;IACrC,OAAO,CAAC,aAAa,CAAgB;IACrC,OAAO,CAAC,SAAS,CAAY;;IAS7B;;OAEG;IACH,eAAe,IAAI,MAAM;IAGzB;;;;OAIG;IACH,SAAS,IAAI,MAAM;IAInB;;;OAGG;IACH,aAAa,IAAI,MAAM;IAIvB;;;OAGG;IACH,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM;IAInC;;;OAGG;IACH,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM;IAInC;;OAEG;IACH,iBAAiB,IAAI,OAAO,CAAC,SAAS,CAAC;IAIvC;;OAEG;IACH,sBAAsB,IAAI,OAAO,CAAC,MAAM,CAAC;IAIzC;;;OAGG;IACH,qBAAqB,IAAI,OAAO,CAAC,OAAO,CAAC;IAIzC;;OAEG;IACH,aAAa,IAAI,OAAO,CAAC,OAAO,CAAC;IAIjC;;OAEG;IACH,OAAO,IAAI,OAAO,CAAC,MAAM,CAAC;IAI1B;;OAEG;IACG,UAAU,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;CAMvD"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/crypto/CryptoProvider.mjs b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/crypto/CryptoProvider.mjs deleted file mode 100644 index d57b766..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/crypto/CryptoProvider.mjs +++ /dev/null @@ -1,99 +0,0 @@ -/*! @azure/msal-node v2.16.3 2025-08-05 */ -'use strict'; -import { GuidGenerator } from './GuidGenerator.mjs'; -import { EncodingUtils } from '../utils/EncodingUtils.mjs'; -import { PkceGenerator } from './PkceGenerator.mjs'; -import { HashUtils } from './HashUtils.mjs'; - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * This class implements MSAL node's crypto interface, which allows it to perform base64 encoding and decoding, generating cryptographically random GUIDs and - * implementing Proof Key for Code Exchange specs for the OAuth Authorization Code Flow using PKCE (rfc here: https://tools.ietf.org/html/rfc7636). - * @public - */ -class CryptoProvider { - constructor() { - // Browser crypto needs to be validated first before any other classes can be set. - this.pkceGenerator = new PkceGenerator(); - this.guidGenerator = new GuidGenerator(); - this.hashUtils = new HashUtils(); - } - /** - * base64 URL safe encoded string - */ - base64UrlEncode() { - throw new Error("Method not implemented."); - } - /** - * Stringifies and base64Url encodes input public key - * @param inputKid - public key id - * @returns Base64Url encoded public key - */ - encodeKid() { - throw new Error("Method not implemented."); - } - /** - * Creates a new random GUID - used to populate state and nonce. - * @returns string (GUID) - */ - createNewGuid() { - return this.guidGenerator.generateGuid(); - } - /** - * Encodes input string to base64. - * @param input - string to be encoded - */ - base64Encode(input) { - return EncodingUtils.base64Encode(input); - } - /** - * Decodes input string from base64. - * @param input - string to be decoded - */ - base64Decode(input) { - return EncodingUtils.base64Decode(input); - } - /** - * Generates PKCE codes used in Authorization Code Flow. - */ - generatePkceCodes() { - return this.pkceGenerator.generatePkceCodes(); - } - /** - * Generates a keypair, stores it and returns a thumbprint - not yet implemented for node - */ - getPublicKeyThumbprint() { - throw new Error("Method not implemented."); - } - /** - * Removes cryptographic keypair from key store matching the keyId passed in - * @param kid - public key id - */ - removeTokenBindingKey() { - throw new Error("Method not implemented."); - } - /** - * Removes all cryptographic keys from Keystore - */ - clearKeystore() { - throw new Error("Method not implemented."); - } - /** - * Signs the given object as a jwt payload with private key retrieved by given kid - currently not implemented for node - */ - signJwt() { - throw new Error("Method not implemented."); - } - /** - * Returns the SHA-256 hash of an input string - */ - async hashString(plainText) { - return EncodingUtils.base64EncodeUrl(this.hashUtils.sha256(plainText).toString("base64"), "base64"); - } -} - -export { CryptoProvider }; -//# sourceMappingURL=CryptoProvider.mjs.map diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/crypto/CryptoProvider.mjs.map b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/crypto/CryptoProvider.mjs.map deleted file mode 100644 index 16ae377..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/crypto/CryptoProvider.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"CryptoProvider.mjs","sources":["../../src/crypto/CryptoProvider.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;AAAA;;;AAGG;AAQH;;;;AAIG;MACU,cAAc,CAAA;AAKvB,IAAA,WAAA,GAAA;;AAEI,QAAA,IAAI,CAAC,aAAa,GAAG,IAAI,aAAa,EAAE,CAAC;AACzC,QAAA,IAAI,CAAC,aAAa,GAAG,IAAI,aAAa,EAAE,CAAC;AACzC,QAAA,IAAI,CAAC,SAAS,GAAG,IAAI,SAAS,EAAE,CAAC;KACpC;AAED;;AAEG;IACH,eAAe,GAAA;AACX,QAAA,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;KAC9C;AACD;;;;AAIG;IACH,SAAS,GAAA;AACL,QAAA,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;KAC9C;AAED;;;AAGG;IACH,aAAa,GAAA;AACT,QAAA,OAAO,IAAI,CAAC,aAAa,CAAC,YAAY,EAAE,CAAC;KAC5C;AAED;;;AAGG;AACH,IAAA,YAAY,CAAC,KAAa,EAAA;AACtB,QAAA,OAAO,aAAa,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;KAC5C;AAED;;;AAGG;AACH,IAAA,YAAY,CAAC,KAAa,EAAA;AACtB,QAAA,OAAO,aAAa,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;KAC5C;AAED;;AAEG;IACH,iBAAiB,GAAA;AACb,QAAA,OAAO,IAAI,CAAC,aAAa,CAAC,iBAAiB,EAAE,CAAC;KACjD;AAED;;AAEG;IACH,sBAAsB,GAAA;AAClB,QAAA,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;KAC9C;AAED;;;AAGG;IACH,qBAAqB,GAAA;AACjB,QAAA,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;KAC9C;AAED;;AAEG;IACH,aAAa,GAAA;AACT,QAAA,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;KAC9C;AAED;;AAEG;IACH,OAAO,GAAA;AACH,QAAA,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;KAC9C;AAED;;AAEG;IACH,MAAM,UAAU,CAAC,SAAiB,EAAA;QAC9B,OAAO,aAAa,CAAC,eAAe,CAChC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,EACnD,QAAQ,CACX,CAAC;KACL;AACJ;;;;"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/crypto/GuidGenerator.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/crypto/GuidGenerator.d.ts deleted file mode 100644 index bb18822..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/crypto/GuidGenerator.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { IGuidGenerator } from "@azure/msal-common/node"; -export declare class GuidGenerator implements IGuidGenerator { - /** - * - * RFC4122: The version 4 UUID is meant for generating UUIDs from truly-random or pseudo-random numbers. - * uuidv4 generates guids from cryprtographically-string random - */ - generateGuid(): string; - /** - * verifies if a string is GUID - * @param guid - */ - isGuid(guid: string): boolean; -} -//# sourceMappingURL=GuidGenerator.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/crypto/GuidGenerator.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/crypto/GuidGenerator.d.ts.map deleted file mode 100644 index b66bcc5..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/crypto/GuidGenerator.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"GuidGenerator.d.ts","sourceRoot":"","sources":["../../src/crypto/GuidGenerator.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAGzD,qBAAa,aAAc,YAAW,cAAc;IAChD;;;;OAIG;IACH,YAAY,IAAI,MAAM;IAItB;;;OAGG;IACH,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;CAKhC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/crypto/GuidGenerator.mjs b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/crypto/GuidGenerator.mjs deleted file mode 100644 index f93daff..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/crypto/GuidGenerator.mjs +++ /dev/null @@ -1,29 +0,0 @@ -/*! @azure/msal-node v2.16.3 2025-08-05 */ -'use strict'; -import { v4 } from 'uuid'; - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -class GuidGenerator { - /** - * - * RFC4122: The version 4 UUID is meant for generating UUIDs from truly-random or pseudo-random numbers. - * uuidv4 generates guids from cryprtographically-string random - */ - generateGuid() { - return v4(); - } - /** - * verifies if a string is GUID - * @param guid - */ - isGuid(guid) { - const regexGuid = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i; - return regexGuid.test(guid); - } -} - -export { GuidGenerator }; -//# sourceMappingURL=GuidGenerator.mjs.map diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/crypto/GuidGenerator.mjs.map b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/crypto/GuidGenerator.mjs.map deleted file mode 100644 index 8337d59..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/crypto/GuidGenerator.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"GuidGenerator.mjs","sources":["../../src/crypto/GuidGenerator.ts"],"sourcesContent":[null],"names":["uuidv4"],"mappings":";;;;AAAA;;;AAGG;MAKU,aAAa,CAAA;AACtB;;;;AAIG;IACH,YAAY,GAAA;QACR,OAAOA,EAAM,EAAE,CAAC;KACnB;AAED;;;AAGG;AACH,IAAA,MAAM,CAAC,IAAY,EAAA;QACf,MAAM,SAAS,GACX,4EAA4E,CAAC;AACjF,QAAA,OAAO,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;KAC/B;AACJ;;;;"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/crypto/HashUtils.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/crypto/HashUtils.d.ts deleted file mode 100644 index e3707db..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/crypto/HashUtils.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -/// -/// -export declare class HashUtils { - /** - * generate 'SHA256' hash - * @param buffer - */ - sha256(buffer: string): Buffer; -} -//# sourceMappingURL=HashUtils.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/crypto/HashUtils.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/crypto/HashUtils.d.ts.map deleted file mode 100644 index 9ec140f..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/crypto/HashUtils.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"HashUtils.d.ts","sourceRoot":"","sources":["../../src/crypto/HashUtils.ts"],"names":[],"mappings":";;AAQA,qBAAa,SAAS;IAClB;;;OAGG;IACH,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM;CAGjC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/crypto/HashUtils.mjs b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/crypto/HashUtils.mjs deleted file mode 100644 index b409e8f..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/crypto/HashUtils.mjs +++ /dev/null @@ -1,21 +0,0 @@ -/*! @azure/msal-node v2.16.3 2025-08-05 */ -'use strict'; -import { Hash } from '../utils/Constants.mjs'; -import crypto from 'crypto'; - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -class HashUtils { - /** - * generate 'SHA256' hash - * @param buffer - */ - sha256(buffer) { - return crypto.createHash(Hash.SHA256).update(buffer).digest(); - } -} - -export { HashUtils }; -//# sourceMappingURL=HashUtils.mjs.map diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/crypto/HashUtils.mjs.map b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/crypto/HashUtils.mjs.map deleted file mode 100644 index d5f3494..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/crypto/HashUtils.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"HashUtils.mjs","sources":["../../src/crypto/HashUtils.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;AAAA;;;AAGG;MAKU,SAAS,CAAA;AAClB;;;AAGG;AACH,IAAA,MAAM,CAAC,MAAc,EAAA;AACjB,QAAA,OAAO,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,CAAC;KACjE;AACJ;;;;"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/crypto/PkceGenerator.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/crypto/PkceGenerator.d.ts deleted file mode 100644 index 19dd733..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/crypto/PkceGenerator.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { PkceCodes } from "@azure/msal-common/node"; -/** - * https://tools.ietf.org/html/rfc7636#page-8 - */ -export declare class PkceGenerator { - private hashUtils; - constructor(); - /** - * generates the codeVerfier and the challenge from the codeVerfier - * reference: https://tools.ietf.org/html/rfc7636#section-4.1 and https://tools.ietf.org/html/rfc7636#section-4.2 - */ - generatePkceCodes(): Promise; - /** - * generates the codeVerfier; reference: https://tools.ietf.org/html/rfc7636#section-4.1 - */ - private generateCodeVerifier; - /** - * generate the challenge from the codeVerfier; reference: https://tools.ietf.org/html/rfc7636#section-4.2 - * @param codeVerifier - */ - private generateCodeChallengeFromVerifier; -} -//# sourceMappingURL=PkceGenerator.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/crypto/PkceGenerator.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/crypto/PkceGenerator.d.ts.map deleted file mode 100644 index f8bbc13..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/crypto/PkceGenerator.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"PkceGenerator.d.ts","sourceRoot":"","sources":["../../src/crypto/PkceGenerator.ts"],"names":[],"mappings":"AAKA,OAAO,EAAa,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAM/D;;GAEG;AACH,qBAAa,aAAa;IACtB,OAAO,CAAC,SAAS,CAAY;;IAK7B;;;OAGG;IACG,iBAAiB,IAAI,OAAO,CAAC,SAAS,CAAC;IAM7C;;OAEG;IACH,OAAO,CAAC,oBAAoB;IAmB5B;;;OAGG;IACH,OAAO,CAAC,iCAAiC;CAM5C"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/crypto/PkceGenerator.mjs b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/crypto/PkceGenerator.mjs deleted file mode 100644 index f84dbfe..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/crypto/PkceGenerator.mjs +++ /dev/null @@ -1,60 +0,0 @@ -/*! @azure/msal-node v2.16.3 2025-08-05 */ -'use strict'; -import { Constants } from '@azure/msal-common/node'; -import { RANDOM_OCTET_SIZE, CharSet } from '../utils/Constants.mjs'; -import { EncodingUtils } from '../utils/EncodingUtils.mjs'; -import { HashUtils } from './HashUtils.mjs'; -import crypto from 'crypto'; - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * https://tools.ietf.org/html/rfc7636#page-8 - */ -class PkceGenerator { - constructor() { - this.hashUtils = new HashUtils(); - } - /** - * generates the codeVerfier and the challenge from the codeVerfier - * reference: https://tools.ietf.org/html/rfc7636#section-4.1 and https://tools.ietf.org/html/rfc7636#section-4.2 - */ - async generatePkceCodes() { - const verifier = this.generateCodeVerifier(); - const challenge = this.generateCodeChallengeFromVerifier(verifier); - return { verifier, challenge }; - } - /** - * generates the codeVerfier; reference: https://tools.ietf.org/html/rfc7636#section-4.1 - */ - generateCodeVerifier() { - const charArr = []; - const maxNumber = 256 - (256 % CharSet.CV_CHARSET.length); - while (charArr.length <= RANDOM_OCTET_SIZE) { - const byte = crypto.randomBytes(1)[0]; - if (byte >= maxNumber) { - /* - * Ignore this number to maintain randomness. - * Including it would result in an unequal distribution of characters after doing the modulo - */ - continue; - } - const index = byte % CharSet.CV_CHARSET.length; - charArr.push(CharSet.CV_CHARSET[index]); - } - const verifier = charArr.join(Constants.EMPTY_STRING); - return EncodingUtils.base64EncodeUrl(verifier); - } - /** - * generate the challenge from the codeVerfier; reference: https://tools.ietf.org/html/rfc7636#section-4.2 - * @param codeVerifier - */ - generateCodeChallengeFromVerifier(codeVerifier) { - return EncodingUtils.base64EncodeUrl(this.hashUtils.sha256(codeVerifier).toString("base64"), "base64"); - } -} - -export { PkceGenerator }; -//# sourceMappingURL=PkceGenerator.mjs.map diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/crypto/PkceGenerator.mjs.map b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/crypto/PkceGenerator.mjs.map deleted file mode 100644 index 21670f7..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/crypto/PkceGenerator.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"PkceGenerator.mjs","sources":["../../src/crypto/PkceGenerator.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;AAAA;;;AAGG;AAQH;;AAEG;MACU,aAAa,CAAA;AAGtB,IAAA,WAAA,GAAA;AACI,QAAA,IAAI,CAAC,SAAS,GAAG,IAAI,SAAS,EAAE,CAAC;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old/node_modules/@azure/msal-node/dist/error/ManagedIdentityError.d.ts deleted file mode 100644 index 03382be..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/error/ManagedIdentityError.d.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { AuthError } from "@azure/msal-common/node"; -import * as ManagedIdentityErrorCodes from "./ManagedIdentityErrorCodes.js"; -export { ManagedIdentityErrorCodes }; -/** - * ManagedIdentityErrorMessage class containing string constants used by error codes and messages. - */ -export declare const ManagedIdentityErrorMessages: { - invalid_file_extension: string; - invalid_file_path: string; - invalid_managed_identity_id_type: string; - invalid_secret: string; - platform_not_supported: string; - missing_client_id: string; - azure_pod_identity_authority_host_url_malformed: string; - identity_endpoint_url_malformed: string; - imds_endpoint_url_malformed: string; - msi_endpoint_url_malformed: string; - network_unavailable: string; - unable_to_create_azure_arc: string; - unable_to_create_cloud_shell: string; - unable_to_create_source: string; - unable_to_read_secret_file: string; - user_assigned_not_available_at_runtime: string; - www_authenticate_header_missing: string; - www_authenticate_header_unsupported_format: string; -}; -export declare class ManagedIdentityError extends AuthError { - constructor(errorCode: string); -} -export declare function createManagedIdentityError(errorCode: string): ManagedIdentityError; -//# sourceMappingURL=ManagedIdentityError.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/error/ManagedIdentityError.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/error/ManagedIdentityError.d.ts.map deleted file mode 100644 index b325937..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/error/ManagedIdentityError.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ManagedIdentityError.d.ts","sourceRoot":"","sources":["../../src/error/ManagedIdentityError.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,KAAK,yBAAyB,MAAM,gCAAgC,CAAC;AAE5E,OAAO,EAAE,yBAAyB,EAAE,CAAC;AAErC;;GAEG;AACH,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;CAqCxC,CAAC;AAEF,qBAAa,oBAAqB,SAAQ,SAAS;gBACnC,SAAS,EAAE,MAAM;CAKhC;AAED,wBAAgB,0BAA0B,CACtC,SAAS,EAAE,MAAM,GAClB,oBAAoB,CAEtB"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/error/ManagedIdentityError.mjs b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/error/ManagedIdentityError.mjs deleted file mode 100644 index c90b25e..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/error/ManagedIdentityError.mjs +++ /dev/null @@ -1,50 +0,0 @@ -/*! @azure/msal-node v2.16.3 2025-08-05 */ -'use strict'; -import { AuthError } from '@azure/msal-common/node'; -import { wwwAuthenticateHeaderUnsupportedFormat, wwwAuthenticateHeaderMissing, userAssignedNotAvailableAtRuntime, unableToReadSecretFile, unableToCreateSource, unableToCreateCloudShell, unableToCreateAzureArc, networkUnavailable, MsiEnvironmentVariableUrlMalformedErrorCodes, missingId, platformNotSupported, invalidSecret, invalidManagedIdentityIdType, invalidFilePath, invalidFileExtension } from './ManagedIdentityErrorCodes.mjs'; -import { ManagedIdentityEnvironmentVariableNames } from '../utils/Constants.mjs'; - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * ManagedIdentityErrorMessage class containing string constants used by error codes and messages. - */ -const ManagedIdentityErrorMessages = { - [invalidFileExtension]: "The file path in the WWW-Authenticate header does not contain a .key file.", - [invalidFilePath]: "The file path in the WWW-Authenticate header is not in a valid Windows or Linux Format.", - [invalidManagedIdentityIdType]: "More than one ManagedIdentityIdType was provided.", - [invalidSecret]: "The secret in the file on the file path in the WWW-Authenticate header is greater than 4096 bytes.", - [platformNotSupported]: "The platform is not supported by Azure Arc. Azure Arc only supports Windows and Linux.", - [missingId]: "A ManagedIdentityId id was not provided.", - [MsiEnvironmentVariableUrlMalformedErrorCodes - .AZURE_POD_IDENTITY_AUTHORITY_HOST]: `The Managed Identity's '${ManagedIdentityEnvironmentVariableNames.AZURE_POD_IDENTITY_AUTHORITY_HOST}' environment variable is malformed.`, - [MsiEnvironmentVariableUrlMalformedErrorCodes - .IDENTITY_ENDPOINT]: `The Managed Identity's '${ManagedIdentityEnvironmentVariableNames.IDENTITY_ENDPOINT}' environment variable is malformed.`, - [MsiEnvironmentVariableUrlMalformedErrorCodes - .IMDS_ENDPOINT]: `The Managed Identity's '${ManagedIdentityEnvironmentVariableNames.IMDS_ENDPOINT}' environment variable is malformed.`, - [MsiEnvironmentVariableUrlMalformedErrorCodes - .MSI_ENDPOINT]: `The Managed Identity's '${ManagedIdentityEnvironmentVariableNames.MSI_ENDPOINT}' environment variable is malformed.`, - [networkUnavailable]: "Authentication unavailable. The request to the managed identity endpoint timed out.", - [unableToCreateAzureArc]: "Azure Arc Managed Identities can only be system assigned.", - [unableToCreateCloudShell]: "Cloud Shell Managed Identities can only be system assigned.", - [unableToCreateSource]: "Unable to create a Managed Identity source based on environment variables.", - [unableToReadSecretFile]: "Unable to read the secret file.", - [userAssignedNotAvailableAtRuntime]: "Service Fabric user assigned managed identity ClientId or ResourceId is not configurable at runtime.", - [wwwAuthenticateHeaderMissing]: "A 401 response was received form the Azure Arc Managed Identity, but the www-authenticate header is missing.", - [wwwAuthenticateHeaderUnsupportedFormat]: "A 401 response was received form the Azure Arc Managed Identity, but the www-authenticate header is in an unsupported format.", -}; -class ManagedIdentityError extends AuthError { - constructor(errorCode) { - super(errorCode, ManagedIdentityErrorMessages[errorCode]); - this.name = "ManagedIdentityError"; - Object.setPrototypeOf(this, ManagedIdentityError.prototype); - } -} -function createManagedIdentityError(errorCode) { - return new ManagedIdentityError(errorCode); -} - -export { ManagedIdentityError, ManagedIdentityErrorMessages, createManagedIdentityError }; -//# sourceMappingURL=ManagedIdentityError.mjs.map diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/error/ManagedIdentityError.mjs.map b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/error/ManagedIdentityError.mjs.map deleted file mode 100644 index b4b12c3..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/error/ManagedIdentityError.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ManagedIdentityError.mjs","sources":["../../src/error/ManagedIdentityError.ts"],"sourcesContent":[null],"names":["ManagedIdentityErrorCodes.invalidFileExtension","ManagedIdentityErrorCodes.invalidFilePath","ManagedIdentityErrorCodes.invalidManagedIdentityIdType","ManagedIdentityErrorCodes.invalidSecret","ManagedIdentityErrorCodes.platformNotSupported","ManagedIdentityErrorCodes.missingId","ManagedIdentityErrorCodes.MsiEnvironmentVariableUrlMalformedErrorCodes","ManagedIdentityErrorCodes.networkUnavailable","ManagedIdentityErrorCodes.unableToCreateAzureArc","ManagedIdentityErrorCodes.unableToCreateCloudShell","ManagedIdentityErrorCodes.unableToCreateSource","ManagedIdentityErrorCodes.unableToReadSecretFile","ManagedIdentityErrorCodes.userAssignedNotAvailableAtRuntime","ManagedIdentityErrorCodes.wwwAuthenticateHeaderMissing","ManagedIdentityErrorCodes.wwwAuthenticateHeaderUnsupportedFormat"],"mappings":";;;;;;AAAA;;;AAGG;AAOH;;AAEG;AACU,MAAA,4BAA4B,GAAG;AACxC,IAAA,CAACA,oBAA8C,GAC3C,4EAA4E;AAChF,IAAA,CAACC,eAAyC,GACtC,yFAAyF;AAC7F,IAAA,CAACC,4BAAsD,GACnD,mDAAmD;AACvD,IAAA,CAACC,aAAuC,GACpC,oGAAoG;AACxG,IAAA,CAACC,oBAA8C,GAC3C,wFAAwF;AAC5F,IAAA,CAACC,SAAmC,GAChC,0CAA0C;IAC9C,CAACC,4CAAsE;AAClE,SAAA,iCAAiC,GAAG,CAAA,wBAAA,EAA2B,uCAAuC,CAAC,iCAAiC,CAAsC,oCAAA,CAAA;IACnL,CAACA,4CAAsE;AAClE,SAAA,iBAAiB,GAAG,CAAA,wBAAA,EAA2B,uCAAuC,CAAC,iBAAiB,CAAsC,oCAAA,CAAA;IACnJ,CAACA,4CAAsE;AAClE,SAAA,aAAa,GAAG,CAAA,wBAAA,EAA2B,uCAAuC,CAAC,aAAa,CAAsC,oCAAA,CAAA;IAC3I,CAACA,4CAAsE;AAClE,SAAA,YAAY,GAAG,CAAA,wBAAA,EAA2B,uCAAuC,CAAC,YAAY,CAAsC,oCAAA,CAAA;AACzI,IAAA,CAACC,kBAA4C,GACzC,qFAAqF;AACzF,IAAA,CAACC,sBAAgD,GAC7C,2DAA2D;AAC/D,IAAA,CAACC,wBAAkD,GAC/C,6DAA6D;AACjE,IAAA,CAACC,oBAA8C,GAC3C,4EAA4E;AAChF,IAAA,CAACC,sBAAgD,GAC7C,iCAAiC;AACrC,IAAA,CAACC,iCAA2D,GACxD,sGAAsG;AAC1G,IAAA,CAACC,4BAAsD,GACnD,8GAA8G;AAClH,IAAA,CAACC,sCAAgE,GAC7D,+HAA+H;EACrI;AAEI,MAAO,oBAAqB,SAAQ,SAAS,CAAA;AAC/C,IAAA,WAAA,CAAY,SAAiB,EAAA;QACzB,KAAK,CAAC,SAAS,EAAE,4BAA4B,CAAC,SAAS,CAAC,CAAC,CAAC;AAC1D,QAAA,IAAI,CAAC,IAAI,GAAG,sBAAsB,CAAC;QACnC,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,oBAAoB,CAAC,SAAS,CAAC,CAAC;KAC/D;AACJ,CAAA;AAEK,SAAU,0BAA0B,CACtC,SAAiB,EAAA;AAEjB,IAAA,OAAO,IAAI,oBAAoB,CAAC,SAAS,CAAC,CAAC;AAC/C;;;;"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/error/ManagedIdentityErrorCodes.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/error/ManagedIdentityErrorCodes.d.ts deleted file mode 100644 index cf40e0c..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/error/ManagedIdentityErrorCodes.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -export declare const invalidFileExtension = "invalid_file_extension"; -export declare const invalidFilePath = "invalid_file_path"; -export declare const invalidManagedIdentityIdType = "invalid_managed_identity_id_type"; -export declare const invalidSecret = "invalid_secret"; -export declare const missingId = "missing_client_id"; -export declare const networkUnavailable = "network_unavailable"; -export declare const platformNotSupported = "platform_not_supported"; -export declare const unableToCreateAzureArc = "unable_to_create_azure_arc"; -export declare const unableToCreateCloudShell = "unable_to_create_cloud_shell"; -export declare const unableToCreateSource = "unable_to_create_source"; -export declare const unableToReadSecretFile = "unable_to_read_secret_file"; -export declare const urlParseError = "url_parse_error"; -export declare const userAssignedNotAvailableAtRuntime = "user_assigned_not_available_at_runtime"; -export declare const wwwAuthenticateHeaderMissing = "www_authenticate_header_missing"; -export declare const wwwAuthenticateHeaderUnsupportedFormat = "www_authenticate_header_unsupported_format"; -export declare const MsiEnvironmentVariableUrlMalformedErrorCodes: { - readonly AZURE_POD_IDENTITY_AUTHORITY_HOST: "azure_pod_identity_authority_host_url_malformed"; - readonly IDENTITY_ENDPOINT: "identity_endpoint_url_malformed"; - readonly IMDS_ENDPOINT: "imds_endpoint_url_malformed"; - readonly MSI_ENDPOINT: "msi_endpoint_url_malformed"; -}; -export type MsiEnvironmentVariableErrorCodes = (typeof MsiEnvironmentVariableUrlMalformedErrorCodes)[keyof typeof MsiEnvironmentVariableUrlMalformedErrorCodes]; -//# sourceMappingURL=ManagedIdentityErrorCodes.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/error/ManagedIdentityErrorCodes.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/error/ManagedIdentityErrorCodes.d.ts.map deleted file mode 100644 index c611a42..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/error/ManagedIdentityErrorCodes.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ManagedIdentityErrorCodes.d.ts","sourceRoot":"","sources":["../../src/error/ManagedIdentityErrorCodes.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,oBAAoB,2BAA2B,CAAC;AAC7D,eAAO,MAAM,eAAe,sBAAsB,CAAC;AACnD,eAAO,MAAM,4BAA4B,qCAAqC,CAAC;AAC/E,eAAO,MAAM,aAAa,mBAAmB,CAAC;AAC9C,eAAO,MAAM,SAAS,sBAAsB,CAAC;AAC7C,eAAO,MAAM,kBAAkB,wBAAwB,CAAC;AACxD,eAAO,MAAM,oBAAoB,2BAA2B,CAAC;AAC7D,eAAO,MAAM,sBAAsB,+BAA+B,CAAC;AACnE,eAAO,MAAM,wBAAwB,iCAAiC,CAAC;AACvE,eAAO,MAAM,oBAAoB,4BAA4B,CAAC;AAC9D,eAAO,MAAM,sBAAsB,+BAA+B,CAAC;AACnE,eAAO,MAAM,aAAa,oBAAoB,CAAC;AAC/C,eAAO,MAAM,iCAAiC,2CACF,CAAC;AAC7C,eAAO,MAAM,4BAA4B,oCAAoC,CAAC;AAC9E,eAAO,MAAM,sCAAsC,+CACH,CAAC;AAEjD,eAAO,MAAM,4CAA4C;;;;;CAS/C,CAAC;AACX,MAAM,MAAM,gCAAgC,GACxC,CAAC,OAAO,4CAA4C,CAAC,CAAC,MAAM,OAAO,4CAA4C,CAAC,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/error/ManagedIdentityErrorCodes.mjs b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/error/ManagedIdentityErrorCodes.mjs deleted file mode 100644 index f83626f..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/error/ManagedIdentityErrorCodes.mjs +++ /dev/null @@ -1,31 +0,0 @@ -/*! @azure/msal-node v2.16.3 2025-08-05 */ -'use strict'; -import { ManagedIdentityEnvironmentVariableNames } from '../utils/Constants.mjs'; - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -const invalidFileExtension = "invalid_file_extension"; -const invalidFilePath = "invalid_file_path"; -const invalidManagedIdentityIdType = "invalid_managed_identity_id_type"; -const invalidSecret = "invalid_secret"; -const missingId = "missing_client_id"; -const networkUnavailable = "network_unavailable"; -const platformNotSupported = "platform_not_supported"; -const unableToCreateAzureArc = "unable_to_create_azure_arc"; -const unableToCreateCloudShell = "unable_to_create_cloud_shell"; -const unableToCreateSource = "unable_to_create_source"; -const unableToReadSecretFile = "unable_to_read_secret_file"; -const userAssignedNotAvailableAtRuntime = "user_assigned_not_available_at_runtime"; -const wwwAuthenticateHeaderMissing = "www_authenticate_header_missing"; -const wwwAuthenticateHeaderUnsupportedFormat = "www_authenticate_header_unsupported_format"; -const MsiEnvironmentVariableUrlMalformedErrorCodes = { - [ManagedIdentityEnvironmentVariableNames.AZURE_POD_IDENTITY_AUTHORITY_HOST]: "azure_pod_identity_authority_host_url_malformed", - [ManagedIdentityEnvironmentVariableNames.IDENTITY_ENDPOINT]: "identity_endpoint_url_malformed", - [ManagedIdentityEnvironmentVariableNames.IMDS_ENDPOINT]: "imds_endpoint_url_malformed", - [ManagedIdentityEnvironmentVariableNames.MSI_ENDPOINT]: "msi_endpoint_url_malformed", -}; - -export { MsiEnvironmentVariableUrlMalformedErrorCodes, invalidFileExtension, invalidFilePath, invalidManagedIdentityIdType, invalidSecret, missingId, networkUnavailable, platformNotSupported, unableToCreateAzureArc, unableToCreateCloudShell, unableToCreateSource, unableToReadSecretFile, userAssignedNotAvailableAtRuntime, wwwAuthenticateHeaderMissing, wwwAuthenticateHeaderUnsupportedFormat }; -//# sourceMappingURL=ManagedIdentityErrorCodes.mjs.map diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/error/ManagedIdentityErrorCodes.mjs.map b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/error/ManagedIdentityErrorCodes.mjs.map deleted file mode 100644 index c14e553..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/error/ManagedIdentityErrorCodes.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ManagedIdentityErrorCodes.mjs","sources":["../../src/error/ManagedIdentityErrorCodes.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;AAAA;;;AAGG;AAII,MAAM,oBAAoB,GAAG,yBAAyB;AACtD,MAAM,eAAe,GAAG,oBAAoB;AAC5C,MAAM,4BAA4B,GAAG,mCAAmC;AACxE,MAAM,aAAa,GAAG,iBAAiB;AACvC,MAAM,SAAS,GAAG,oBAAoB;AACtC,MAAM,kBAAkB,GAAG,sBAAsB;AACjD,MAAM,oBAAoB,GAAG,yBAAyB;AACtD,MAAM,sBAAsB,GAAG,6BAA6B;AAC5D,MAAM,wBAAwB,GAAG,+BAA+B;AAChE,MAAM,oBAAoB,GAAG,0BAA0B;AACvD,MAAM,sBAAsB,GAAG,6BAA6B;AAE5D,MAAM,iCAAiC,GAC1C,yCAAyC;AACtC,MAAM,4BAA4B,GAAG,kCAAkC;AACvE,MAAM,sCAAsC,GAC/C,6CAA6C;AAEpC,MAAA,4CAA4C,GAAG;AACxD,IAAA,CAAC,uCAAuC,CAAC,iCAAiC,GACtE,iDAAiD;AACrD,IAAA,CAAC,uCAAuC,CAAC,iBAAiB,GACtD,iCAAiC;AACrC,IAAA,CAAC,uCAAuC,CAAC,aAAa,GAClD,6BAA6B;AACjC,IAAA,CAAC,uCAAuC,CAAC,YAAY,GACjD,4BAA4B;;;;;"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/error/NodeAuthError.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/error/NodeAuthError.d.ts deleted file mode 100644 index ff19716..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/error/NodeAuthError.d.ts +++ /dev/null @@ -1,74 +0,0 @@ -import { AuthError } from "@azure/msal-common/node"; -/** - * NodeAuthErrorMessage class containing string constants used by error codes and messages. - */ -export declare const NodeAuthErrorMessage: { - invalidLoopbackAddressType: { - code: string; - desc: string; - }; - unableToLoadRedirectUri: { - code: string; - desc: string; - }; - noAuthCodeInResponse: { - code: string; - desc: string; - }; - noLoopbackServerExists: { - code: string; - desc: string; - }; - loopbackServerAlreadyExists: { - code: string; - desc: string; - }; - loopbackServerTimeout: { - code: string; - desc: string; - }; - stateNotFoundError: { - code: string; - desc: string; - }; - thumbprintMissing: { - code: string; - desc: string; - }; -}; -export declare class NodeAuthError extends AuthError { - constructor(errorCode: string, errorMessage?: string); - /** - * Creates an error thrown if loopback server address is of type string. - */ - static createInvalidLoopbackAddressTypeError(): NodeAuthError; - /** - * Creates an error thrown if the loopback server is unable to get a url. - */ - static createUnableToLoadRedirectUrlError(): NodeAuthError; - /** - * Creates an error thrown if the server response does not contain an auth code. - */ - static createNoAuthCodeInResponseError(): NodeAuthError; - /** - * Creates an error thrown if the loopback server has not been spun up yet. - */ - static createNoLoopbackServerExistsError(): NodeAuthError; - /** - * Creates an error thrown if a loopback server already exists when attempting to create another one. - */ - static createLoopbackServerAlreadyExistsError(): NodeAuthError; - /** - * Creates an error thrown if the loopback server times out registering the auth code listener. - */ - static createLoopbackServerTimeoutError(): NodeAuthError; - /** - * Creates an error thrown when the state is not present. - */ - static createStateNotFoundError(): NodeAuthError; - /** - * Creates an error thrown when client certificate was provided, but neither the SHA-1 or SHA-256 thumbprints were provided - */ - static createThumbprintMissingError(): NodeAuthError; -} -//# sourceMappingURL=NodeAuthError.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/error/NodeAuthError.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/error/NodeAuthError.d.ts.map deleted file mode 100644 index 32b5413..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/error/NodeAuthError.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"NodeAuthError.d.ts","sourceRoot":"","sources":["../../src/error/NodeAuthError.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAEpD;;GAEG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiChC,CAAC;AAEF,qBAAa,aAAc,SAAQ,SAAS;gBAC5B,SAAS,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,MAAM;IAKpD;;OAEG;IACH,MAAM,CAAC,qCAAqC,IAAI,aAAa;IAO7D;;OAEG;IACH,MAAM,CAAC,kCAAkC,IAAI,aAAa;IAO1D;;OAEG;IACH,MAAM,CAAC,+BAA+B,IAAI,aAAa;IAOvD;;OAEG;IACH,MAAM,CAAC,iCAAiC,IAAI,aAAa;IAOzD;;OAEG;IACH,MAAM,CAAC,sCAAsC,IAAI,aAAa;IAO9D;;OAEG;IACH,MAAM,CAAC,gCAAgC,IAAI,aAAa;IAOxD;;OAEG;IACH,MAAM,CAAC,wBAAwB,IAAI,aAAa;IAOhD;;OAEG;IACH,MAAM,CAAC,4BAA4B,IAAI,aAAa;CAMvD"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/error/NodeAuthError.mjs b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/error/NodeAuthError.mjs deleted file mode 100644 index 79b7cf1..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/error/NodeAuthError.mjs +++ /dev/null @@ -1,102 +0,0 @@ -/*! @azure/msal-node v2.16.3 2025-08-05 */ -'use strict'; -import { AuthError } from '@azure/msal-common/node'; - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * NodeAuthErrorMessage class containing string constants used by error codes and messages. - */ -const NodeAuthErrorMessage = { - invalidLoopbackAddressType: { - code: "invalid_loopback_server_address_type", - desc: "Loopback server address is not type string. This is unexpected.", - }, - unableToLoadRedirectUri: { - code: "unable_to_load_redirectUrl", - desc: "Loopback server callback was invoked without a url. This is unexpected.", - }, - noAuthCodeInResponse: { - code: "no_auth_code_in_response", - desc: "No auth code found in the server response. Please check your network trace to determine what happened.", - }, - noLoopbackServerExists: { - code: "no_loopback_server_exists", - desc: "No loopback server exists yet.", - }, - loopbackServerAlreadyExists: { - code: "loopback_server_already_exists", - desc: "Loopback server already exists. Cannot create another.", - }, - loopbackServerTimeout: { - code: "loopback_server_timeout", - desc: "Timed out waiting for auth code listener to be registered.", - }, - stateNotFoundError: { - code: "state_not_found", - desc: "State not found. Please verify that the request originated from msal.", - }, - thumbprintMissing: { - code: "thumbprint_missing_from_client_certificate", - desc: "Client certificate does not contain a SHA-1 or SHA-256 thumbprint.", - }, -}; -class NodeAuthError extends AuthError { - constructor(errorCode, errorMessage) { - super(errorCode, errorMessage); - this.name = "NodeAuthError"; - } - /** - * Creates an error thrown if loopback server address is of type string. - */ - static createInvalidLoopbackAddressTypeError() { - return new NodeAuthError(NodeAuthErrorMessage.invalidLoopbackAddressType.code, `${NodeAuthErrorMessage.invalidLoopbackAddressType.desc}`); - } - /** - * Creates an error thrown if the loopback server is unable to get a url. - */ - static createUnableToLoadRedirectUrlError() { - return new NodeAuthError(NodeAuthErrorMessage.unableToLoadRedirectUri.code, `${NodeAuthErrorMessage.unableToLoadRedirectUri.desc}`); - } - /** - * Creates an error thrown if the server response does not contain an auth code. - */ - static createNoAuthCodeInResponseError() { - return new NodeAuthError(NodeAuthErrorMessage.noAuthCodeInResponse.code, `${NodeAuthErrorMessage.noAuthCodeInResponse.desc}`); - } - /** - * Creates an error thrown if the loopback server has not been spun up yet. - */ - static createNoLoopbackServerExistsError() { - return new NodeAuthError(NodeAuthErrorMessage.noLoopbackServerExists.code, `${NodeAuthErrorMessage.noLoopbackServerExists.desc}`); - } - /** - * Creates an error thrown if a loopback server already exists when attempting to create another one. - */ - static createLoopbackServerAlreadyExistsError() { - return new NodeAuthError(NodeAuthErrorMessage.loopbackServerAlreadyExists.code, `${NodeAuthErrorMessage.loopbackServerAlreadyExists.desc}`); - } - /** - * Creates an error thrown if the loopback server times out registering the auth code listener. - */ - static createLoopbackServerTimeoutError() { - return new NodeAuthError(NodeAuthErrorMessage.loopbackServerTimeout.code, `${NodeAuthErrorMessage.loopbackServerTimeout.desc}`); - } - /** - * Creates an error thrown when the state is not present. - */ - static createStateNotFoundError() { - return new NodeAuthError(NodeAuthErrorMessage.stateNotFoundError.code, NodeAuthErrorMessage.stateNotFoundError.desc); - } - /** - * Creates an error thrown when client certificate was provided, but neither the SHA-1 or SHA-256 thumbprints were provided - */ - static createThumbprintMissingError() { - return new NodeAuthError(NodeAuthErrorMessage.thumbprintMissing.code, NodeAuthErrorMessage.thumbprintMissing.desc); - } -} - -export { NodeAuthError, NodeAuthErrorMessage }; -//# sourceMappingURL=NodeAuthError.mjs.map diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/error/NodeAuthError.mjs.map b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/error/NodeAuthError.mjs.map deleted file mode 100644 index 523d38f..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/error/NodeAuthError.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"NodeAuthError.mjs","sources":["../../src/error/NodeAuthError.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;AAAA;;;AAGG;AAIH;;AAEG;AACU,MAAA,oBAAoB,GAAG;AAChC,IAAA,0BAA0B,EAAE;AACxB,QAAA,IAAI,EAAE,sCAAsC;AAC5C,QAAA,IAAI,EAAE,iEAAiE;AAC1E,KAAA;AACD,IAAA,uBAAuB,EAAE;AACrB,QAAA,IAAI,EAAE,4BAA4B;AAClC,QAAA,IAAI,EAAE,yEAAyE;AAClF,KAAA;AACD,IAAA,oBAAoB,EAAE;AAClB,QAAA,IAAI,EAAE,0BAA0B;AAChC,QAAA,IAAI,EAAE,wGAAwG;AACjH,KAAA;AACD,IAAA,sBAAsB,EAAE;AACpB,QAAA,IAAI,EAAE,2BAA2B;AACjC,QAAA,IAAI,EAAE,gCAAgC;AACzC,KAAA;AACD,IAAA,2BAA2B,EAAE;AACzB,QAAA,IAAI,EAAE,gCAAgC;AACtC,QAAA,IAAI,E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AI,EAChD,CAAA,EAAG,oBAAoB,CAAC,sBAAsB,CAAC,IAAI,CAAA,CAAE,CACxD,CAAC;KACL;AAED;;AAEG;AACH,IAAA,OAAO,sCAAsC,GAAA;AACzC,QAAA,OAAO,IAAI,aAAa,CACpB,oBAAoB,CAAC,2BAA2B,CAAC,IAAI,EACrD,CAAA,EAAG,oBAAoB,CAAC,2BAA2B,CAAC,IAAI,CAAA,CAAE,CAC7D,CAAC;KACL;AAED;;AAEG;AACH,IAAA,OAAO,gCAAgC,GAAA;AACnC,QAAA,OAAO,IAAI,aAAa,CACpB,oBAAoB,CAAC,qBAAqB,CAAC,IAAI,EAC/C,CAAA,EAAG,oBAAoB,CAAC,qBAAqB,CAAC,IAAI,CAAA,CAAE,CACvD,CAAC;KACL;AAED;;AAEG;AACH,IAAA,OAAO,wBAAwB,GAAA;AAC3B,QAAA,OAAO,IAAI,aAAa,CACpB,oBAAoB,CAAC,kBAAkB,CAAC,IAAI,EAC5C,oBAAoB,CAAC,kBAAkB,CAAC,IAAI,CAC/C,CAAC;KACL;AAED;;AAEG;AACH,IAAA,OAAO,4BAA4B,GAAA;AAC/B,QAAA,OAAO,IAAI,aAAa,CACpB,oBAAoB,CAAC,iBAAiB,CAAC,IAAI,EAC3C,oBAAoB,CAAC,iBAAiB,CAAC,IAAI,CAC9C,CAAC;KACL;AACJ;;;;"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/index.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/index.d.ts deleted file mode 100644 index 26279fb..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/index.d.ts +++ /dev/null @@ -1,46 +0,0 @@ -/** - * @packageDocumentation - * @module @azure/msal-node - */ -/** - * Warning: This set of exports is purely intended to be used by other MSAL libraries, and should be considered potentially unstable. We strongly discourage using them directly, you do so at your own risk. - * Breaking changes to these APIs will be shipped under a minor version, instead of a major version. - */ -import * as internals from "./internals.js"; -export { internals }; -export { IPublicClientApplication } from "./client/IPublicClientApplication.js"; -export { IConfidentialClientApplication } from "./client/IConfidentialClientApplication.js"; -export { ITokenCache } from "./cache/ITokenCache.js"; -export { ICacheClient } from "./cache/distributed/ICacheClient.js"; -export { IPartitionManager } from "./cache/distributed/IPartitionManager.js"; -export { ILoopbackClient } from "./network/ILoopbackClient.js"; -export { PublicClientApplication } from "./client/PublicClientApplication.js"; -export { ConfidentialClientApplication } from "./client/ConfidentialClientApplication.js"; -export { ClientApplication } from "./client/ClientApplication.js"; -export { ClientCredentialClient } from "./client/ClientCredentialClient.js"; -export { DeviceCodeClient } from "./client/DeviceCodeClient.js"; -export { OnBehalfOfClient } from "./client/OnBehalfOfClient.js"; -export { ManagedIdentityApplication } from "./client/ManagedIdentityApplication.js"; -export { UsernamePasswordClient } from "./client/UsernamePasswordClient.js"; -export { Configuration, ManagedIdentityConfiguration, ManagedIdentityIdParams, NodeAuthOptions, NodeSystemOptions, BrokerOptions, NodeTelemetryOptions, CacheOptions, } from "./config/Configuration.js"; -export { ClientAssertion } from "./client/ClientAssertion.js"; -export { TokenCache } from "./cache/TokenCache.js"; -export { NodeStorage } from "./cache/NodeStorage.js"; -export { CacheKVStore, JsonCache, InMemoryCache, SerializedAccountEntity, SerializedIdTokenEntity, SerializedAccessTokenEntity, SerializedAppMetadataEntity, SerializedRefreshTokenEntity, } from "./cache/serializer/SerializerTypes.js"; -export { DistributedCachePlugin } from "./cache/distributed/DistributedCachePlugin.js"; -export { ManagedIdentitySourceNames } from "./utils/Constants.js"; -export { CryptoProvider } from "./crypto/CryptoProvider.js"; -export type { AuthorizationCodeRequest } from "./request/AuthorizationCodeRequest.js"; -export type { AuthorizationUrlRequest } from "./request/AuthorizationUrlRequest.js"; -export type { ClientCredentialRequest } from "./request/ClientCredentialRequest.js"; -export type { DeviceCodeRequest } from "./request/DeviceCodeRequest.js"; -export type { OnBehalfOfRequest } from "./request/OnBehalfOfRequest.js"; -export type { UsernamePasswordRequest } from "./request/UsernamePasswordRequest.js"; -export type { RefreshTokenRequest } from "./request/RefreshTokenRequest.js"; -export type { SilentFlowRequest } from "./request/SilentFlowRequest.js"; -export type { InteractiveRequest } from "./request/InteractiveRequest.js"; -export type { SignOutRequest } from "./request/SignOutRequest.js"; -export type { ManagedIdentityRequestParams } from "./request/ManagedIdentityRequestParams.js"; -export { PromptValue, ResponseMode, AuthorizationCodePayload, AuthenticationResult, ServerAuthorizationCodeResponse, IdTokenClaims, AccountInfo, ValidCacheType, AuthError, AuthErrorMessage, AuthErrorCodes, ClientAuthError, ClientAuthErrorCodes, ClientAuthErrorMessage, ClientConfigurationError, ClientConfigurationErrorCodes, ClientConfigurationErrorMessage, InteractionRequiredAuthError, InteractionRequiredAuthErrorCodes, InteractionRequiredAuthErrorMessage, ServerError, INetworkModule, NetworkRequestOptions, NetworkResponse, Logger, LogLevel, ProtocolMode, ICachePlugin, TokenCacheContext, ISerializableTokenCache, AzureCloudInstance, AzureCloudOptions, IAppTokenProvider, AppTokenProviderParameters, AppTokenProviderResult, INativeBrokerPlugin, ClientAssertionCallback, } from "@azure/msal-common/node"; -export { version } from "./packageMetadata.js"; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/index.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/index.d.ts.map deleted file mode 100644 index 3009b6d..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAKA;;;GAGG;AAEH;;;GAGG;AAEH,OAAO,KAAK,SAAS,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,CAAC;AAGrB,OAAO,EAAE,wBAAwB,EAAE,MAAM,sCAAsC,CAAC;AAChF,OAAO,EAAE,8BAA8B,EAAE,MAAM,4CAA4C,CAAC;AAC5F,OAAO,EAAE,WAA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modules/@azure/msal-node/dist/index.mjs deleted file mode 100644 index a0c6b8a..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/index.mjs +++ /dev/null @@ -1,21 +0,0 @@ -/*! @azure/msal-node v2.16.3 2025-08-05 */ -'use strict'; -import * as internals from './internals.mjs'; -export { internals }; -export { PublicClientApplication } from './client/PublicClientApplication.mjs'; -export { ConfidentialClientApplication } from './client/ConfidentialClientApplication.mjs'; -export { ClientApplication } from './client/ClientApplication.mjs'; -export { ClientCredentialClient } from './client/ClientCredentialClient.mjs'; -export { DeviceCodeClient } from './client/DeviceCodeClient.mjs'; -export { OnBehalfOfClient } from './client/OnBehalfOfClient.mjs'; -export { ManagedIdentityApplication } from './client/ManagedIdentityApplication.mjs'; -export { UsernamePasswordClient } from './client/UsernamePasswordClient.mjs'; -export { ClientAssertion } from './client/ClientAssertion.mjs'; -export { TokenCache } from './cache/TokenCache.mjs'; -export { NodeStorage } from './cache/NodeStorage.mjs'; -export { DistributedCachePlugin } from './cache/distributed/DistributedCachePlugin.mjs'; -export { ManagedIdentitySourceNames } from './utils/Constants.mjs'; -export { CryptoProvider } from './crypto/CryptoProvider.mjs'; -export { AuthError, AuthErrorCodes, AuthErrorMessage, AzureCloudInstance, ClientAuthError, ClientAuthErrorCodes, ClientAuthErrorMessage, ClientConfigurationError, ClientConfigurationErrorCodes, ClientConfigurationErrorMessage, InteractionRequiredAuthError, InteractionRequiredAuthErrorCodes, InteractionRequiredAuthErrorMessage, LogLevel, Logger, PromptValue, ProtocolMode, ResponseMode, ServerError, TokenCacheContext } from '@azure/msal-common/node'; -export { version } from './packageMetadata.mjs'; -//# sourceMappingURL=index.mjs.map diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/index.mjs.map b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/index.mjs.map deleted file mode 100644 index a27d87b..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/internals.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/internals.d.ts deleted file mode 100644 index 13b0670..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/internals.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -/** - * Warning: This set of exports is purely intended to be used by other MSAL libraries, and should be considered potentially unstable. We strongly discourage using them directly, you do so at your own risk. - * Breaking changes to these APIs will be shipped under a minor version, instead of a major version. - */ -export { Serializer } from "./cache/serializer/Serializer.js"; -export { Deserializer } from "./cache/serializer/Deserializer.js"; -//# sourceMappingURL=internals.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/internals.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/internals.d.ts.map deleted file mode 100644 index fe3b3fb..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/internals.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"internals.d.ts","sourceRoot":"","sources":["../src/internals.ts"],"names":[],"mappings":"AAKA;;;GAGG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/internals.mjs b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/internals.mjs deleted file mode 100644 index b5476f7..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/internals.mjs +++ /dev/null @@ -1,14 +0,0 @@ -/*! @azure/msal-node v2.16.3 2025-08-05 */ -'use strict'; -export { Serializer } from './cache/serializer/Serializer.mjs'; -export { Deserializer } from './cache/serializer/Deserializer.mjs'; - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * Warning: This set of exports is purely intended to be used by other MSAL libraries, and should be considered potentially unstable. We strongly discourage using them directly, you do so at your own risk. - * Breaking changes to these APIs will be shipped under a minor version, instead of a major version. - */ -//# sourceMappingURL=internals.mjs.map diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/internals.mjs.map b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/internals.mjs.map deleted file mode 100644 index 2785005..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/internals.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"internals.mjs","sources":["../src/internals.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;AAAA;;;AAGG;AAEH;;;AAGG"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/network/HttpClient.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/network/HttpClient.d.ts deleted file mode 100644 index ef86e2e..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/network/HttpClient.d.ts +++ /dev/null @@ -1,26 +0,0 @@ -/// -/// -import { INetworkModule, NetworkRequestOptions, NetworkResponse } from "@azure/msal-common/node"; -import http from "http"; -import https from "https"; -/** - * This class implements the API for network requests. - */ -export declare class HttpClient implements INetworkModule { - private proxyUrl; - private customAgentOptions; - constructor(proxyUrl?: string, customAgentOptions?: http.AgentOptions | https.AgentOptions); - /** - * Http Get request - * @param url - * @param options - */ - sendGetRequestAsync(url: string, options?: NetworkRequestOptions, timeout?: number): Promise>; - /** - * Http Post request - * @param url - * @param options - */ - sendPostRequestAsync(url: string, options?: NetworkRequestOptions): Promise>; -} -//# sourceMappingURL=HttpClient.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/network/HttpClient.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/network/HttpClient.d.ts.map deleted file mode 100644 index 558ae53..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/network/HttpClient.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"HttpClient.d.ts","sourceRoot":"","sources":["../../src/network/HttpClient.ts"],"names":[],"mappings":";;AAKA,OAAO,EACH,cAAc,EACd,qBAAqB,EACrB,eAAe,EAElB,MAAM,yBAAyB,CAAC;AAGjC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B;;GAEG;AACH,qBAAa,UAAW,YAAW,cAAc;IAC7C,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,kBAAkB,CAAyC;gBAG/D,QAAQ,CAAC,EAAE,MAAM,EACjB,kBAAkB,CAAC,EAAE,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC,YAAY;IAM/D;;;;OAIG;IACG,mBAAmB,CAAC,CAAC,EACvB,GAAG,EAAE,MAAM,EACX,OAAO,CAAC,EAAE,qBAAqB,EAC/B,OAAO,CAAC,EAAE,MAAM,GACjB,OAAO,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC;IAqB9B;;;;OAIG;IACG,oBAAoB,CAAC,CAAC,EACxB,GAAG,EAAE,MAAM,EACX,OAAO,CAAC,EAAE,qBAAqB,GAChC,OAAO,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC;CAkBjC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/network/HttpClient.mjs b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/network/HttpClient.mjs deleted file mode 100644 index 56f9851..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/network/HttpClient.mjs +++ /dev/null @@ -1,292 +0,0 @@ -/*! @azure/msal-node v2.16.3 2025-08-05 */ -'use strict'; -import { HttpStatus } from '@azure/msal-common/node'; -import { ProxyStatus, Constants, HttpMethod } from '../utils/Constants.mjs'; -import { NetworkUtils } from '../utils/NetworkUtils.mjs'; -import http from 'http'; -import https from 'https'; - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * This class implements the API for network requests. - */ -class HttpClient { - constructor(proxyUrl, customAgentOptions) { - this.proxyUrl = proxyUrl || ""; - this.customAgentOptions = customAgentOptions || {}; - } - /** - * Http Get request - * @param url - * @param options - */ - async sendGetRequestAsync(url, options, timeout) { - if (this.proxyUrl) { - return networkRequestViaProxy(url, this.proxyUrl, HttpMethod.GET, options, this.customAgentOptions, timeout); - } - else { - return networkRequestViaHttps(url, HttpMethod.GET, options, this.customAgentOptions, timeout); - } - } - /** - * Http Post request - * @param url - * @param options - */ - async sendPostRequestAsync(url, options) { - if (this.proxyUrl) { - return networkRequestViaProxy(url, this.proxyUrl, HttpMethod.POST, options, this.customAgentOptions); - } - else { - return networkRequestViaHttps(url, HttpMethod.POST, options, this.customAgentOptions); - } - } -} -const networkRequestViaProxy = (destinationUrlString, proxyUrlString, httpMethod, options, agentOptions, timeout) => { - const destinationUrl = new URL(destinationUrlString); - const proxyUrl = new URL(proxyUrlString); - // "method: connect" must be used to establish a connection to the proxy - const headers = options?.headers || {}; - const tunnelRequestOptions = { - host: proxyUrl.hostname, - port: proxyUrl.port, - method: "CONNECT", - path: destinationUrl.hostname, - headers: headers, - }; - if (agentOptions && Object.keys(agentOptions).length) { - tunnelRequestOptions.agent = new http.Agent(agentOptions); - } - // compose a request string for the socket - let postRequestStringContent = ""; - if (httpMethod === HttpMethod.POST) { - const body = options?.body || ""; - postRequestStringContent = - "Content-Type: application/x-www-form-urlencoded\r\n" + - `Content-Length: ${body.length}\r\n` + - `\r\n${body}`; - } - else { - // optional timeout is only for get requests (regionDiscovery, for example) - if (timeout) { - tunnelRequestOptions.timeout = timeout; - } - } - const outgoingRequestString = `${httpMethod.toUpperCase()} ${destinationUrl.href} HTTP/1.1\r\n` + - `Host: ${destinationUrl.host}\r\n` + - "Connection: close\r\n" + - postRequestStringContent + - "\r\n"; - return new Promise((resolve, reject) => { - const request = http.request(tunnelRequestOptions); - if (timeout) { - request.on("timeout", () => { - request.destroy(); - reject(new Error("Request time out")); - }); - } - request.end(); - // establish connection to the proxy - request.on("connect", (response, socket) => { - const proxyStatusCode = response?.statusCode || ProxyStatus.SERVER_ERROR; - if (proxyStatusCode < ProxyStatus.SUCCESS_RANGE_START || - proxyStatusCode > ProxyStatus.SUCCESS_RANGE_END) { - request.destroy(); - socket.destroy(); - reject(new Error(`Error connecting to proxy. Http status code: ${response.statusCode}. Http status message: ${response?.statusMessage || "Unknown"}`)); - } - // make a request over an HTTP tunnel - socket.write(outgoingRequestString); - const data = []; - socket.on("data", (chunk) => { - data.push(chunk); - }); - socket.on("end", () => { - // combine all received buffer streams into one buffer, and then into a string - const dataString = Buffer.concat([...data]).toString(); - // separate each line into it's own entry in an arry - const dataStringArray = dataString.split("\r\n"); - // the first entry will contain the statusCode and statusMessage - const httpStatusCode = parseInt(dataStringArray[0].split(" ")[1]); - // remove "HTTP/1.1" and the status code to get the status message - const statusMessage = dataStringArray[0] - .split(" ") - .slice(2) - .join(" "); - // the last entry will contain the body - const body = dataStringArray[dataStringArray.length - 1]; - // everything in between the first and last entries are the headers - const headersArray = dataStringArray.slice(1, dataStringArray.length - 2); - // build an object out of all the headers - const entries = new Map(); - headersArray.forEach((header) => { - /** - * the header might look like "Content-Length: 1531", but that is just a string - * it needs to be converted to a key/value pair - * split the string at the first instance of ":" - * there may be more than one ":" if the value of the header is supposed to be a JSON object - */ - const headerKeyValue = header.split(new RegExp(/:\s(.*)/s)); - const headerKey = headerKeyValue[0]; - let headerValue = headerKeyValue[1]; - // check if the value of the header is supposed to be a JSON object - try { - const object = JSON.parse(headerValue); - // if it is, then convert it from a string to a JSON object - if (object && typeof object === "object") { - headerValue = object; - } - } - catch (e) { - // otherwise, leave it as a string - } - entries.set(headerKey, headerValue); - }); - const headers = Object.fromEntries(entries); - const parsedHeaders = headers; - const networkResponse = NetworkUtils.getNetworkResponse(parsedHeaders, parseBody(httpStatusCode, statusMessage, parsedHeaders, body), httpStatusCode); - if ((httpStatusCode < HttpStatus.SUCCESS_RANGE_START || - httpStatusCode > HttpStatus.SUCCESS_RANGE_END) && - // do not destroy the request for the device code flow - networkResponse.body["error"] !== - Constants.AUTHORIZATION_PENDING) { - request.destroy(); - } - resolve(networkResponse); - }); - socket.on("error", (chunk) => { - request.destroy(); - socket.destroy(); - reject(new Error(chunk.toString())); - }); - }); - request.on("error", (chunk) => { - request.destroy(); - reject(new Error(chunk.toString())); - }); - }); -}; -const networkRequestViaHttps = (urlString, httpMethod, options, agentOptions, timeout) => { - const isPostRequest = httpMethod === HttpMethod.POST; - const body = options?.body || ""; - const url = new URL(urlString); - const headers = options?.headers || {}; - const customOptions = { - method: httpMethod, - headers: headers, - ...NetworkUtils.urlToHttpOptions(url), - }; - if (agentOptions && Object.keys(agentOptions).length) { - customOptions.agent = new https.Agent(agentOptions); - } - if (isPostRequest) { - // needed for post request to work - customOptions.headers = { - ...customOptions.headers, - "Content-Length": body.length, - }; - } - else { - // optional timeout is only for get requests (regionDiscovery, for example) - if (timeout) { - customOptions.timeout = timeout; - } - } - return new Promise((resolve, reject) => { - let request; - // managed identity sources use http instead of https - if (customOptions.protocol === "http:") { - request = http.request(customOptions); - } - else { - request = https.request(customOptions); - } - if (isPostRequest) { - request.write(body); - } - if (timeout) { - request.on("timeout", () => { - request.destroy(); - reject(new Error("Request time out")); - }); - } - request.end(); - request.on("response", (response) => { - const headers = response.headers; - const statusCode = response.statusCode; - const statusMessage = response.statusMessage; - const data = []; - response.on("data", (chunk) => { - data.push(chunk); - }); - response.on("end", () => { - // combine all received buffer streams into one buffer, and then into a string - const body = Buffer.concat([...data]).toString(); - const parsedHeaders = headers; - const networkResponse = NetworkUtils.getNetworkResponse(parsedHeaders, parseBody(statusCode, statusMessage, parsedHeaders, body), statusCode); - if ((statusCode < HttpStatus.SUCCESS_RANGE_START || - statusCode > HttpStatus.SUCCESS_RANGE_END) && - // do not destroy the request for the device code flow - networkResponse.body["error"] !== - Constants.AUTHORIZATION_PENDING) { - request.destroy(); - } - resolve(networkResponse); - }); - }); - request.on("error", (chunk) => { - request.destroy(); - reject(new Error(chunk.toString())); - }); - }); -}; -/** - * Check if extra parsing is needed on the repsonse from the server - * @param statusCode {number} the status code of the response from the server - * @param statusMessage {string | undefined} the status message of the response from the server - * @param headers {Record} the headers of the response from the server - * @param body {string} the body from the response of the server - * @returns {Object} JSON parsed body or error object - */ -const parseBody = (statusCode, statusMessage, headers, body) => { - /* - * Informational responses (100 – 199) - * Successful responses (200 – 299) - * Redirection messages (300 – 399) - * Client error responses (400 – 499) - * Server error responses (500 – 599) - */ - let parsedBody; - try { - parsedBody = JSON.parse(body); - } - catch (error) { - let errorType; - let errorDescriptionHelper; - if (statusCode >= HttpStatus.CLIENT_ERROR_RANGE_START && - statusCode <= HttpStatus.CLIENT_ERROR_RANGE_END) { - errorType = "client_error"; - errorDescriptionHelper = "A client"; - } - else if (statusCode >= HttpStatus.SERVER_ERROR_RANGE_START && - statusCode <= HttpStatus.SERVER_ERROR_RANGE_END) { - errorType = "server_error"; - errorDescriptionHelper = "A server"; - } - else { - errorType = "unknown_error"; - errorDescriptionHelper = "An unknown"; - } - parsedBody = { - error: errorType, - error_description: `${errorDescriptionHelper} error occured.\nHttp status code: ${statusCode}\nHttp status message: ${statusMessage || "Unknown"}\nHeaders: ${JSON.stringify(headers)}`, - }; - } - return parsedBody; -}; - -export { HttpClient }; -//# sourceMappingURL=HttpClient.mjs.map diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/network/HttpClient.mjs.map b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/network/HttpClient.mjs.map deleted file mode 100644 index 03b0dd0..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/network/HttpClient.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"HttpClient.mjs","sources":["../../src/network/HttpClient.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;AAAA;;;AAGG;AAaH;;AAEG;MACU,UAAU,CAAA;IAIn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,CAAC,CAAE,CAAA;SAC1C,CAAC;AACL,KAAA;AAED,IAAA,OAAO,UAAU,CAAC;AACtB,CAAC;;;;"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/network/HttpClientWithRetries.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/network/HttpClientWithRetries.d.ts deleted file mode 100644 index 2123c83..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/network/HttpClientWithRetries.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { INetworkModule, NetworkRequestOptions, NetworkResponse } from "@azure/msal-common/node"; -import { IHttpRetryPolicy } from "../retry/IHttpRetryPolicy.js"; -export declare class HttpClientWithRetries implements INetworkModule { - private httpClientNoRetries; - private retryPolicy; - constructor(httpClientNoRetries: INetworkModule, retryPolicy: IHttpRetryPolicy); - private sendNetworkRequestAsyncHelper; - private sendNetworkRequestAsync; - sendGetRequestAsync(url: string, options?: NetworkRequestOptions): Promise>; - sendPostRequestAsync(url: string, options?: NetworkRequestOptions): Promise>; -} -//# sourceMappingURL=HttpClientWithRetries.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/network/HttpClientWithRetries.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/network/HttpClientWithRetries.d.ts.map deleted file mode 100644 index 165bc4b..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/network/HttpClientWithRetries.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"HttpClientWithRetries.d.ts","sourceRoot":"","sources":["../../src/network/HttpClientWithRetries.ts"],"names":[],"mappings":"AAKA,OAAO,EAEH,cAAc,EACd,qBAAqB,EACrB,eAAe,EAClB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAGhE,qBAAa,qBAAsB,YAAW,cAAc;IACxD,OAAO,CAAC,mBAAmB,CAAiB;IAC5C,OAAO,CAAC,WAAW,CAAmB;gBAGlC,mBAAmB,EAAE,cAAc,EACnC,WAAW,EAAE,gBAAgB;YAMnB,6BAA6B;YAY7B,uBAAuB;IA4BxB,mBAAmB,CAAC,CAAC,EAC9B,GAAG,EAAE,MAAM,EACX,OAAO,CAAC,EAAE,qBAAqB,GAChC,OAAO,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC;IAIjB,oBAAoB,CAAC,CAAC,EAC/B,GAAG,EAAE,MAAM,EACX,OAAO,CAAC,EAAE,qBAAqB,GAChC,OAAO,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC;CAGjC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/network/HttpClientWithRetries.mjs b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/network/HttpClientWithRetries.mjs deleted file mode 100644 index 0ba5e7e..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/network/HttpClientWithRetries.mjs +++ /dev/null @@ -1,42 +0,0 @@ -/*! @azure/msal-node v2.16.3 2025-08-05 */ -'use strict'; -import { HeaderNames } from '@azure/msal-common/node'; -import { HttpMethod } from '../utils/Constants.mjs'; - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -class HttpClientWithRetries { - constructor(httpClientNoRetries, retryPolicy) { - this.httpClientNoRetries = httpClientNoRetries; - this.retryPolicy = retryPolicy; - } - async sendNetworkRequestAsyncHelper(httpMethod, url, options) { - if (httpMethod === HttpMethod.GET) { - return this.httpClientNoRetries.sendGetRequestAsync(url, options); - } - else { - return this.httpClientNoRetries.sendPostRequestAsync(url, options); - } - } - async sendNetworkRequestAsync(httpMethod, url, options) { - // the underlying network module (custom or HttpClient) will make the call - let response = await this.sendNetworkRequestAsyncHelper(httpMethod, url, options); - let currentRetry = 0; - while (await this.retryPolicy.pauseForRetry(response.status, currentRetry, response.headers[HeaderNames.RETRY_AFTER])) { - response = await this.sendNetworkRequestAsyncHelper(httpMethod, url, options); - currentRetry++; - } - return response; - } - async sendGetRequestAsync(url, options) { - return this.sendNetworkRequestAsync(HttpMethod.GET, url, options); - } - async sendPostRequestAsync(url, options) { - return this.sendNetworkRequestAsync(HttpMethod.POST, url, options); - } -} - -export { HttpClientWithRetries }; -//# sourceMappingURL=HttpClientWithRetries.mjs.map diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/network/HttpClientWithRetries.mjs.map b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/network/HttpClientWithRetries.mjs.map deleted file mode 100644 index 8f3aa10..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/network/HttpClientWithRetries.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"HttpClientWithRetries.mjs","sources":["../../src/network/HttpClientWithRetries.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;AAAA;;;AAGG;MAWU,qBAAqB,CAAA;IAI9B,WACI,CAAA,mBAAmC,EACnC,WAA6B,EAAA;AAE7B,QAAA,IAAI,CAAC,mBAAmB,GAAG,mBAAmB,CAAC;AAC/C,QAAA,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;KAClC;AAEO,IAAA,MAAM,6BAA6B,CACvC,UAAsB,EACtB,GAAW,EACX,OAA+B,EAAA;AAE/B,QAAA,IAAI,UAAU,KAAK,UAAU,CAAC,GAAG,EAAE;YAC/B,OAAO,IAAI,CAAC,mBAAmB,CAAC,mBAAmB,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;AACrE,SAAA;AAAM,aAAA;YACH,OAAO,IAAI,CAAC,mBAAmB,CAAC,oBAAoB,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;AACtE,SAAA;KACJ;AAEO,IAAA,MAAM,uBAAuB,CACjC,UAAsB,EACtB,GAAW,EACX,OAA+B,EAAA;;AAG/B,QAAA,IAAI,QAAQ,GACR,MAAM,IAAI,CAAC,6BAA6B,CAAC,UAAU,EAAE,GAAG,EAAE,OAAO,CAAC,CAAC;QAEvE,IAAI,YAAY,GAAW,CAAC,CAAC;QAC7B,OACI,MAAM,IAAI,CAAC,WAAW,CAAC,aAAa,CAChC,QAAQ,CAAC,MAAM,EACf,YAAY,EACZ,QAAQ,CAAC,OAAO,CAAC,WAAW,CAAC,WAAW,CAAC,CAC5C,EACH;AACE,YAAA,QAAQ,GAAG,MAAM,IAAI,CAAC,6BAA6B,CAC/C,UAAU,EACV,GAAG,EACH,OAAO,CACV,CAAC;AACF,YAAA,YAAY,EAAE,CAAC;AAClB,SAAA;AAED,QAAA,OAAO,QAAQ,CAAC;KACnB;AAEM,IAAA,MAAM,mBAAmB,CAC5B,GAAW,EACX,OAA+B,EAAA;AAE/B,QAAA,OAAO,IAAI,CAAC,uBAAuB,CAAC,UAAU,CAAC,GAAG,EAAE,GAAG,EAAE,OAAO,CAAC,CAAC;KACrE;AAEM,IAAA,MAAM,oBAAoB,CAC7B,GAAW,EACX,OAA+B,EAAA;AAE/B,QAAA,OAAO,IAAI,CAAC,uBAAuB,CAAC,UAAU,CAAC,IAAI,EAAE,GAAG,EAAE,OAAO,CAAC,CAAC;KACtE;AACJ;;;;"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/network/ILoopbackClient.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/network/ILoopbackClient.d.ts deleted file mode 100644 index 1a77179..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/network/ILoopbackClient.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { ServerAuthorizationCodeResponse } from "@azure/msal-common/node"; -/** - * Interface for LoopbackClient allowing to replace the default loopback server with a custom implementation. - * @public - */ -export interface ILoopbackClient { - listenForAuthCode(successTemplate?: string, errorTemplate?: string): Promise; - getRedirectUri(): string; - closeServer(): void; -} -//# sourceMappingURL=ILoopbackClient.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/network/ILoopbackClient.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/network/ILoopbackClient.d.ts.map deleted file mode 100644 index ee16477..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/network/ILoopbackClient.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ILoopbackClient.d.ts","sourceRoot":"","sources":["../../src/network/ILoopbackClient.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,+BAA+B,EAAE,MAAM,yBAAyB,CAAC;AAE1E;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC5B,iBAAiB,CACb,eAAe,CAAC,EAAE,MAAM,EACxB,aAAa,CAAC,EAAE,MAAM,GACvB,OAAO,CAAC,+BAA+B,CAAC,CAAC;IAC5C,cAAc,IAAI,MAAM,CAAC;IACzB,WAAW,IAAI,IAAI,CAAC;CACvB"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/network/LoopbackClient.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/network/LoopbackClient.d.ts deleted file mode 100644 index d16fec6..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/network/LoopbackClient.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { ServerAuthorizationCodeResponse } from "@azure/msal-common/node"; -import { ILoopbackClient } from "./ILoopbackClient.js"; -export declare class LoopbackClient implements ILoopbackClient { - private server; - /** - * Spins up a loopback server which returns the server response when the localhost redirectUri is hit - * @param successTemplate - * @param errorTemplate - * @returns - */ - listenForAuthCode(successTemplate?: string, errorTemplate?: string): Promise; - /** - * Get the port that the loopback server is running on - * @returns - */ - getRedirectUri(): string; - /** - * Close the loopback server - */ - closeServer(): void; -} -//# sourceMappingURL=LoopbackClient.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/network/LoopbackClient.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/network/LoopbackClient.d.ts.map deleted file mode 100644 index 5514e99..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/network/LoopbackClient.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"LoopbackClient.d.ts","sourceRoot":"","sources":["../../src/network/LoopbackClient.ts"],"names":[],"mappings":"AAKA,OAAO,EAEH,+BAA+B,EAGlC,MAAM,yBAAyB,CAAC;AAIjC,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAEvD,qBAAa,cAAe,YAAW,eAAe;IAClD,OAAO,CAAC,MAAM,CAA0B;IAExC;;;;;OAKG;IACG,iBAAiB,CACnB,eAAe,CAAC,EAAE,MAAM,EACxB,aAAa,CAAC,EAAE,MAAM,GACvB,OAAO,CAAC,+BAA+B,CAAC;IAqD3C;;;OAGG;IACH,cAAc,IAAI,MAAM;IAgBxB;;OAEG;IACH,WAAW,IAAI,IAAI;CAetB"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/network/LoopbackClient.mjs b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/network/LoopbackClient.mjs deleted file mode 100644 index 9a8a66a..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/network/LoopbackClient.mjs +++ /dev/null @@ -1,91 +0,0 @@ -/*! @azure/msal-node v2.16.3 2025-08-05 */ -'use strict'; -import { Constants, UrlUtils, HttpStatus } from '@azure/msal-common/node'; -import http from 'http'; -import { NodeAuthError } from '../error/NodeAuthError.mjs'; -import { Constants as Constants$1 } from '../utils/Constants.mjs'; - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -class LoopbackClient { - /** - * Spins up a loopback server which returns the server response when the localhost redirectUri is hit - * @param successTemplate - * @param errorTemplate - * @returns - */ - async listenForAuthCode(successTemplate, errorTemplate) { - if (this.server) { - throw NodeAuthError.createLoopbackServerAlreadyExistsError(); - } - return new Promise((resolve, reject) => { - this.server = http.createServer((req, res) => { - const url = req.url; - if (!url) { - res.end(errorTemplate || - "Error occurred loading redirectUrl"); - reject(NodeAuthError.createUnableToLoadRedirectUrlError()); - return; - } - else if (url === Constants.FORWARD_SLASH) { - res.end(successTemplate || - "Auth code was successfully acquired. You can close this window now."); - return; - } - const redirectUri = this.getRedirectUri(); - const parsedUrl = new URL(url, redirectUri); - const authCodeResponse = UrlUtils.getDeserializedResponse(parsedUrl.search) || {}; - if (authCodeResponse.code) { - res.writeHead(HttpStatus.REDIRECT, { - location: redirectUri, - }); // Prevent auth code from being saved in the browser history - res.end(); - } - if (authCodeResponse.error) { - res.end(errorTemplate || - `Error occurred: ${authCodeResponse.error}`); - } - resolve(authCodeResponse); - }); - this.server.listen(0, "127.0.0.1"); // Listen on any available port - }); - } - /** - * Get the port that the loopback server is running on - * @returns - */ - getRedirectUri() { - if (!this.server || !this.server.listening) { - throw NodeAuthError.createNoLoopbackServerExistsError(); - } - const address = this.server.address(); - if (!address || typeof address === "string" || !address.port) { - this.closeServer(); - throw NodeAuthError.createInvalidLoopbackAddressTypeError(); - } - const port = address && address.port; - return `${Constants$1.HTTP_PROTOCOL}${Constants$1.LOCALHOST}:${port}`; - } - /** - * Close the loopback server - */ - closeServer() { - if (this.server) { - // Only stops accepting new connections, server will close once open/idle connections are closed. - this.server.close(); - if (typeof this.server.closeAllConnections === "function") { - /* - * Close open/idle connections. This API is available in Node versions 18.2 and higher - */ - this.server.closeAllConnections(); - } - this.server.unref(); - this.server = undefined; - } - } -} - -export { LoopbackClient }; -//# sourceMappingURL=LoopbackClient.mjs.map diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/network/LoopbackClient.mjs.map b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/network/LoopbackClient.mjs.map deleted file mode 100644 index 3acfb97..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/network/LoopbackClient.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"LoopbackClient.mjs","sources":["../../src/network/LoopbackClient.ts"],"sourcesContent":[null],"names":["CommonConstants","Constants"],"mappings":";;;;;;;AAAA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AAC;AACpB,YAAA,IAAI,CAAC,MAAM,GAAG,SAAS,CAAC;AAC3B,SAAA;KACJ;AACJ;;;;"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/packageMetadata.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/packageMetadata.d.ts deleted file mode 100644 index 6b771f9..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/packageMetadata.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export declare const name = "@azure/msal-node"; -export declare const version = "2.16.3"; -//# sourceMappingURL=packageMetadata.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/packageMetadata.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/packageMetadata.d.ts.map deleted file mode 100644 index f2c9fbd..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/packageMetadata.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"packageMetadata.d.ts","sourceRoot":"","sources":["../src/packageMetadata.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,IAAI,qBAAqB,CAAC;AACvC,eAAO,MAAM,OAAO,WAAW,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/packageMetadata.mjs b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/packageMetadata.mjs deleted file mode 100644 index 3636915..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/packageMetadata.mjs +++ /dev/null @@ -1,8 +0,0 @@ -/*! @azure/msal-node v2.16.3 2025-08-05 */ -'use strict'; -/* eslint-disable header/header */ -const name = "@azure/msal-node"; -const version = "2.16.3"; - -export { name, version }; -//# sourceMappingURL=packageMetadata.mjs.map diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/packageMetadata.mjs.map b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/packageMetadata.mjs.map deleted file mode 100644 index 522c08c..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/packageMetadata.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"packageMetadata.mjs","sources":["../src/packageMetadata.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAAA;AACO,MAAM,IAAI,GAAG,mBAAmB;AAChC,MAAM,OAAO,GAAG;;;;"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/request/AuthorizationCodeRequest.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/request/AuthorizationCodeRequest.d.ts deleted file mode 100644 index 095fc24..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/request/AuthorizationCodeRequest.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { CommonAuthorizationCodeRequest } from "@azure/msal-common/node"; -/** - * Request object passed by user to acquire a token from the server exchanging a valid authorization code (second leg of OAuth2.0 Authorization Code flow) - * - * - scopes - Array of scopes the application is requesting access to. - * - claims - A stringified claims request which will be added to all /authorize and /token calls - * - authority: - URL of the authority, the security token service (STS) from which MSAL will acquire tokens. If authority is set on client application object, this will override that value. Overriding the value will cause for authority validation to happen each time. If the same authority will be used for all request, set on the application object instead of the requests. - * - correlationId - Unique GUID set per request to trace a request end-to-end for telemetry purposes. - * - redirectUri - The redirect URI of your app, where the authority will redirect to after the user inputs credentials and consents. It must exactly match one of the redirect URIs you registered in the portal. - * - tokenQueryParameters - String to string map of custom query parameters added to the /token call - * - code - The authorization_code that the user acquired in the first leg of the flow. - * - codeVerifier - The same code_verifier that was used to obtain the authorization_code. Required if PKCE was used in the authorization code grant request.For more information, see the PKCE RFC: https://tools.ietf.org/html/rfc7636 - * - state - Unique GUID generated by the user that is cached by the user and sent to the server during the first leg of the flow. This string is sent back by the server with the authorization code. The user cached state is then compared with the state received from the server to mitigate the risk of CSRF attacks. See https://datatracker.ietf.org/doc/html/rfc6819#section-3.6. - * @public - */ -export type AuthorizationCodeRequest = Partial> & { - scopes: Array; - redirectUri: string; - code: string; - state?: string; -}; -//# sourceMappingURL=AuthorizationCodeRequest.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/request/AuthorizationCodeRequest.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/request/AuthorizationCodeRequest.d.ts.map deleted file mode 100644 index e09a003..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/request/AuthorizationCodeRequest.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AuthorizationCodeRequest.d.ts","sourceRoot":"","sources":["../../src/request/AuthorizationCodeRequest.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,8BAA8B,EAAE,MAAM,yBAAyB,CAAC;AAEzE;;;;;;;;;;;;;GAaG;AACH,MAAM,MAAM,wBAAwB,GAAG,OAAO,CAC1C,IAAI,CACA,8BAA8B,EAC5B,QAAQ,GACR,aAAa,GACb,MAAM,GACN,sBAAsB,GACtB,uBAAuB,GACvB,oBAAoB,GACpB,qBAAqB,GACrB,cAAc,CACnB,CACJ,GAAG;IACA,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/request/AuthorizationUrlRequest.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/request/AuthorizationUrlRequest.d.ts deleted file mode 100644 index ade64b5..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/request/AuthorizationUrlRequest.d.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { CommonAuthorizationUrlRequest } from "@azure/msal-common/node"; -/** - * Request object passed by user to retrieve a Code from the server (first leg of authorization code grant flow) - * - * - scopes - Array of scopes the application is requesting access to. - * - claims - A stringified claims request which will be added to all /authorize and /token calls - * - authority - Url of the authority which the application acquires tokens from. - * - correlationId - Unique GUID set per request to trace a request end-to-end for telemetry purposes. - * - redirectUri - The redirect URI where authentication responses can be received by your application. It must exactly match one of the redirect URIs registered in the Azure portal. - * - extraScopesToConsent - Scopes for a different resource when the user needs consent upfront. - * - responseMode - Specifies the method that should be used to send the authentication result to your app. Can be query, form_post, or fragment. If no value is passed in, it defaults to query. - * - codeChallenge - Used to secure authorization code grant via Proof of Key for Code Exchange (PKCE). For more information, see the PKCE RCF:https://tools.ietf.org/html/rfc7636 - * - codeChallengeMethod - The method used to encode the code verifier for the code challenge parameter. Can be "plain" or "S256". If excluded, code challenge is assumed to be plaintext. For more information, see the PKCE RCF: https://tools.ietf.org/html/rfc7636 - * - state - A value included in the request that is also returned in the token response. A randomly generated unique value is typically used for preventing cross site request forgery attacks. The state is also used to encode information about the user's state in the app before the authentication request occurred. - * - prompt - Indicates the type of user interaction that is required. - * login: will force the user to enter their credentials on that request, negating single-sign on - * none: will ensure that the user isn't presented with any interactive prompt. if request can't be completed via single-sign on, the endpoint will return an interaction_required error - * consent: will the trigger the OAuth consent dialog after the user signs in, asking the user to grant permissions to the app - * select_account: will interrupt single sign-=on providing account selection experience listing all the accounts in session or any remembered accounts or an option to choose to use a different account - * create: will direct the user to the account creation experience instead of the log in experience - * - account - AccountInfo obtained from a getAccount API. Will be used in certain scenarios to generate login_hint if both loginHint and sid params are not provided. - * - loginHint - Can be used to pre-fill the username/email address field of the sign-in page for the user, if you know the username/email address ahead of time. Often apps use this parameter during re-authentication, having already extracted the username from a previous sign-in using the preferred_username claim. - * - sid - Session ID, unique identifier for the session. Available as an optional claim on ID tokens. - * - domainHint - Provides a hint about the tenant or domain that the user should use to sign in. The value of the domain hint is a registered domain for the tenant. - * - extraQueryParameters - String to string map of custom query parameters added to the /authorize call - * - tokenQueryParameters - String to string map of custom query parameters added to the /token call - * - nonce - A value included in the request that is returned in the id token. A randomly generated unique value is typically used to mitigate replay attacks. - * @public - */ -export type AuthorizationUrlRequest = Partial> & { - scopes: Array; - redirectUri: string; -}; -//# sourceMappingURL=AuthorizationUrlRequest.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/request/AuthorizationUrlRequest.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/request/AuthorizationUrlRequest.d.ts.map deleted file mode 100644 index 43b15e3..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/request/AuthorizationUrlRequest.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AuthorizationUrlRequest.d.ts","sourceRoot":"","sources":["../../src/request/AuthorizationUrlRequest.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,6BAA6B,EAAE,MAAM,yBAAyB,CAAC;AAExE;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,MAAM,MAAM,uBAAuB,GAAG,OAAO,CACzC,IAAI,CACA,6BAA6B,EAC3B,QAAQ,GACR,aAAa,GACb,uBAAuB,GACvB,oBAAoB,GACpB,sBAAsB,GACtB,qBAAqB,GACrB,cAAc,CACnB,CACJ,GAAG;IACA,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;CACvB,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/request/ClientCredentialRequest.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/request/ClientCredentialRequest.d.ts deleted file mode 100644 index 5c988c1..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/request/ClientCredentialRequest.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { ClientAssertionCallback, CommonClientCredentialRequest } from "@azure/msal-common/node"; -/** - * CommonClientCredentialRequest - * - scopes - Array of scopes the application is requesting access to. Typically contains only the .default scope for a single resource. See: https://learn.microsoft.com/azure/active-directory/develop/scopes-oidc#the-default-scope - * - authority - URL of the authority, the security token service (STS) from which MSAL will acquire tokens. - * - correlationId - Unique GUID set per request to trace a request end-to-end for telemetry purposes. - * - skipCache - Skip token cache lookup and force request to authority to get a a new token. Defaults to false. - * - clientAssertion - An assertion string or a callback function that returns an assertion string (both are Base64Url-encoded signed JWTs) used in the Client Credential flow - * - tokenQueryParameters - String to string map of custom query parameters added to the /token call - * @public - */ -export type ClientCredentialRequest = Partial> & { - clientAssertion?: string | ClientAssertionCallback; -}; -//# sourceMappingURL=ClientCredentialRequest.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/request/ClientCredentialRequest.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/request/ClientCredentialRequest.d.ts.map deleted file mode 100644 index d5b0ee9..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/request/ClientCredentialRequest.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ClientCredentialRequest.d.ts","sourceRoot":"","sources":["../../src/request/ClientCredentialRequest.ts"],"names":[],"mappings":"AAKA,OAAO,EACH,uBAAuB,EACvB,6BAA6B,EAChC,MAAM,yBAAyB,CAAC;AAEjC;;;;;;;;;GASG;AACH,MAAM,MAAM,uBAAuB,GAAG,OAAO,CACzC,IAAI,CACA,6BAA6B,EAC3B,uBAAuB,GACvB,oBAAoB,GACpB,qBAAqB,GACrB,iBAAiB,GACjB,cAAc,CACnB,CACJ,GAAG;IACA,eAAe,CAAC,EAAE,MAAM,GAAG,uBAAuB,CAAC;CACtD,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/request/DeviceCodeRequest.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/request/DeviceCodeRequest.d.ts deleted file mode 100644 index 169b7d6..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/request/DeviceCodeRequest.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { CommonDeviceCodeRequest, DeviceCodeResponse } from "@azure/msal-common/node"; -/** - * Parameters for Oauth2 device code flow. - * - scopes - Array of scopes the application is requesting access to. - * - authority: - URL of the authority, the security token service (STS) from which MSAL will acquire tokens. If authority is set on client application object, this will override that value. Overriding the value will cause for authority validation to happen each time. If the same authority will be used for all request, set on the application object instead of the requests. - * - correlationId - Unique GUID set per request to trace a request end-to-end for telemetry purposes. - * - deviceCodeCallback - Callback containing device code response. Message should be shown to end user. End user can then navigate to the verification_uri, input the user_code, and input credentials. - * - cancel - Boolean to cancel polling of device code endpoint. While the user authenticates on a separate device, MSAL polls the the token endpoint of security token service for the interval specified in the device code response (usually 15 minutes). To stop polling and cancel the request, set cancel=true. - * - extraQueryParameters - String to string map of custom query parameters added to the query string - * @public - */ -export type DeviceCodeRequest = Partial> & { - scopes: Array; - deviceCodeCallback: (response: DeviceCodeResponse) => void; -}; -//# sourceMappingURL=DeviceCodeRequest.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/request/DeviceCodeRequest.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/request/DeviceCodeRequest.d.ts.map deleted file mode 100644 index f6d8185..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/request/DeviceCodeRequest.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"DeviceCodeRequest.d.ts","sourceRoot":"","sources":["../../src/request/DeviceCodeRequest.ts"],"names":[],"mappings":"AAKA,OAAO,EACH,uBAAuB,EACvB,kBAAkB,EACrB,MAAM,yBAAyB,CAAC;AAEjC;;;;;;;;;GASG;AACH,MAAM,MAAM,iBAAiB,GAAG,OAAO,CACnC,IAAI,CACA,uBAAuB,EACrB,QAAQ,GACR,oBAAoB,GACpB,uBAAuB,GACvB,oBAAoB,GACpB,qBAAqB,GACrB,cAAc,CACnB,CACJ,GAAG;IACA,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACtB,kBAAkB,EAAE,CAAC,QAAQ,EAAE,kBAAkB,KAAK,IAAI,CAAC;CAC9D,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/request/InteractiveRequest.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/request/InteractiveRequest.d.ts deleted file mode 100644 index 2b053ca..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/request/InteractiveRequest.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -/// -/// -import { CommonAuthorizationUrlRequest } from "@azure/msal-common/node"; -import { ILoopbackClient } from "../network/ILoopbackClient.js"; -/** - * Request object passed by user to configure acquireTokenInteractive API - * - * - openBrowser - Function to open a browser instance on user's system. - * - scopes - Array of scopes the application is requesting access to. - * - successTemplate: - Template to be displayed on the opened browser instance upon successful token acquisition. - * - errorTemplate - Template to be displayed on the opened browser instance upon token acquisition failure. - * - windowHandle - Used in native broker flows to properly parent the native broker window - * - loopbackClient - Custom implementation for a loopback server to listen for authorization code response. - * @public - */ -export type InteractiveRequest = Partial> & { - openBrowser: (url: string) => Promise; - scopes?: Array; - successTemplate?: string; - errorTemplate?: string; - windowHandle?: Buffer; - loopbackClient?: ILoopbackClient; -}; -//# sourceMappingURL=InteractiveRequest.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/request/InteractiveRequest.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/request/InteractiveRequest.d.ts.map deleted file mode 100644 index 9199b8a..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/request/InteractiveRequest.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"InteractiveRequest.d.ts","sourceRoot":"","sources":["../../src/request/InteractiveRequest.ts"],"names":[],"mappings":";;AAKA,OAAO,EAAE,6BAA6B,EAAE,MAAM,yBAAyB,CAAC;AACxE,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAEhE;;;;;;;;;;GAUG;AACH,MAAM,MAAM,kBAAkB,GAAG,OAAO,CACpC,IAAI,CACA,6BAA6B,EAC7B,QAAQ,GAAG,aAAa,GAAG,qBAAqB,GAAG,cAAc,CACpE,CACJ,GAAG;IACA,WAAW,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC5C,MAAM,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACvB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,cAAc,CAAC,EAAE,eAAe,CAAC;CACpC,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/request/ManagedIdentityRequest.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/request/ManagedIdentityRequest.d.ts deleted file mode 100644 index 2a0bc38..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/request/ManagedIdentityRequest.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { CommonClientCredentialRequest } from "@azure/msal-common/node"; -import { ManagedIdentityRequestParams } from "./ManagedIdentityRequestParams.js"; -/** - * ManagedIdentityRequest - * - forceRefresh - forces managed identity requests to skip the cache and make network calls if true - * - resource - resource requested to access the protected API. It should be of the form "{ResourceIdUri}" or {ResourceIdUri/.default}. For instance https://management.azure.net or, for Microsoft Graph, https://graph.microsoft.com/.default - */ -export type ManagedIdentityRequest = ManagedIdentityRequestParams & CommonClientCredentialRequest; -//# sourceMappingURL=ManagedIdentityRequest.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/request/ManagedIdentityRequest.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/request/ManagedIdentityRequest.d.ts.map deleted file mode 100644 index 63866b0..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/request/ManagedIdentityRequest.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ManagedIdentityRequest.d.ts","sourceRoot":"","sources":["../../src/request/ManagedIdentityRequest.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,6BAA6B,EAAE,MAAM,yBAAyB,CAAC;AACxE,OAAO,EAAE,4BAA4B,EAAE,MAAM,mCAAmC,CAAC;AAEjF;;;;GAIG;AACH,MAAM,MAAM,sBAAsB,GAAG,4BAA4B,GAC7D,6BAA6B,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/request/ManagedIdentityRequestParams.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/request/ManagedIdentityRequestParams.d.ts deleted file mode 100644 index fce716a..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/request/ManagedIdentityRequestParams.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * ManagedIdentityRequest - * - claims - a stringified claims request which will be used to determine whether or not the cache should be skipped - * - forceRefresh - forces managed identity requests to skip the cache and make network calls if true - * - resource - resource requested to access the protected API. It should be of the form "ResourceIdUri" or "ResourceIdUri/.default". For instance https://management.azure.net or, for Microsoft Graph, https://graph.microsoft.com/.default - * @public - */ -export type ManagedIdentityRequestParams = { - claims?: string; - forceRefresh?: boolean; - resource: string; -}; -//# sourceMappingURL=ManagedIdentityRequestParams.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/request/ManagedIdentityRequestParams.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/request/ManagedIdentityRequestParams.d.ts.map deleted file mode 100644 index 9a776f7..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/request/ManagedIdentityRequestParams.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ManagedIdentityRequestParams.d.ts","sourceRoot":"","sources":["../../src/request/ManagedIdentityRequestParams.ts"],"names":[],"mappings":"AAKA;;;;;;GAMG;AACH,MAAM,MAAM,4BAA4B,GAAG;IACvC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,QAAQ,EAAE,MAAM,CAAC;CACpB,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/request/OnBehalfOfRequest.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/request/OnBehalfOfRequest.d.ts deleted file mode 100644 index ca6032b..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/request/OnBehalfOfRequest.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { CommonOnBehalfOfRequest } from "@azure/msal-common/node"; -/** - * - scopes - Array of scopes the application is requesting access to. - * - authority - URL of the authority, the security token service (STS) from which MSAL will acquire tokens. - * - correlationId - Unique GUID set per request to trace a request end-to-end for telemetry purposes. - * - oboAssertion - The access token that was sent to the middle-tier API. This token must have an audience of the app making this OBO request. - * - skipCache - Skip token cache lookup and force request to authority to get a a new token. Defaults to false. - * - tokenQueryParameters - String to string map of custom query parameters added to the /token call - * @public - */ -export type OnBehalfOfRequest = Partial> & { - oboAssertion: string; - scopes: Array; -}; -//# sourceMappingURL=OnBehalfOfRequest.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/request/OnBehalfOfRequest.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/request/OnBehalfOfRequest.d.ts.map deleted file mode 100644 index 9b1b6cd..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/request/OnBehalfOfRequest.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"OnBehalfOfRequest.d.ts","sourceRoot":"","sources":["../../src/request/OnBehalfOfRequest.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAElE;;;;;;;;GAQG;AACH,MAAM,MAAM,iBAAiB,GAAG,OAAO,CACnC,IAAI,CACA,uBAAuB,EACrB,cAAc,GACd,QAAQ,GACR,uBAAuB,GACvB,oBAAoB,GACpB,qBAAqB,GACrB,cAAc,CACnB,CACJ,GAAG;IACA,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;CACzB,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/request/RefreshTokenRequest.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/request/RefreshTokenRequest.d.ts deleted file mode 100644 index c45213c..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/request/RefreshTokenRequest.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { CommonRefreshTokenRequest } from "@azure/msal-common/node"; -/** - * CommonRefreshTokenRequest - * - scopes - Array of scopes the application is requesting access to. - * - claims - A stringified claims request which will be added to all /authorize and /token calls - * - authority - URL of the authority, the security token service (STS) from which MSAL will acquire tokens. - * - correlationId - Unique GUID set per request to trace a request end-to-end for telemetry purposes. - * - refreshToken - A refresh token returned from a previous request to the Identity provider. - * - tokenQueryParameters - String to string map of custom query parameters added to the /token call - * - forceCache - Force MSAL to cache a refresh token flow response when there is no account in the cache. Used for migration scenarios. - * @public - */ -export type RefreshTokenRequest = Partial> & { - scopes: Array; - refreshToken: string; - forceCache?: boolean; -}; -//# sourceMappingURL=RefreshTokenRequest.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/request/RefreshTokenRequest.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/request/RefreshTokenRequest.d.ts.map deleted file mode 100644 index cc62a06..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/request/RefreshTokenRequest.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"RefreshTokenRequest.d.ts","sourceRoot":"","sources":["../../src/request/RefreshTokenRequest.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,yBAAyB,EAAE,MAAM,yBAAyB,CAAC;AAEpE;;;;;;;;;;GAUG;AACH,MAAM,MAAM,mBAAmB,GAAG,OAAO,CACrC,IAAI,CACA,yBAAyB,EACvB,QAAQ,GACR,cAAc,GACd,sBAAsB,GACtB,uBAAuB,GACvB,oBAAoB,GACpB,qBAAqB,GACrB,cAAc,CACnB,CACJ,GAAG;IACA,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;CACxB,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/request/SignOutRequest.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/request/SignOutRequest.d.ts deleted file mode 100644 index f83a8c9..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/request/SignOutRequest.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { AccountInfo } from "@azure/msal-common/node"; -/** @public */ -export type SignOutRequest = { - account: AccountInfo; - correlationId?: string; -}; -//# sourceMappingURL=SignOutRequest.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/request/SignOutRequest.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/request/SignOutRequest.d.ts.map deleted file mode 100644 index a3c00b7..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/request/SignOutRequest.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"SignOutRequest.d.ts","sourceRoot":"","sources":["../../src/request/SignOutRequest.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAEtD,cAAc;AACd,MAAM,MAAM,cAAc,GAAG;IACzB,OAAO,EAAE,WAAW,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;CAC1B,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/request/SilentFlowRequest.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/request/SilentFlowRequest.d.ts deleted file mode 100644 index 19d0997..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/request/SilentFlowRequest.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { AccountInfo, CommonSilentFlowRequest } from "@azure/msal-common/node"; -/** - * SilentFlow parameters passed by the user to retrieve credentials silently - * - scopes - Array of scopes the application is requesting access to. - * - claims - A stringified claims request which will be added to all /authorize and /token calls. When included on a silent request, cache lookup will be skipped and token will be refreshed. - * - authority - Url of the authority which the application acquires tokens from. - * - correlationId - Unique GUID set per request to trace a request end-to-end for telemetry purposes. - * - tokenQueryParameters - String to string map of custom query parameters added to the /token call - * - account - Account entity to lookup the credentials. - * - forceRefresh - Forces silent requests to make network calls if true. - * @public - */ -export type SilentFlowRequest = Partial> & { - account: AccountInfo; - scopes: Array; -}; -//# sourceMappingURL=SilentFlowRequest.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/request/SilentFlowRequest.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/request/SilentFlowRequest.d.ts.map deleted file mode 100644 index 2a97b33..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/request/SilentFlowRequest.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"SilentFlowRequest.d.ts","sourceRoot":"","sources":["../../src/request/SilentFlowRequest.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,WAAW,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAE/E;;;;;;;;;;GAUG;AACH,MAAM,MAAM,iBAAiB,GAAG,OAAO,CACnC,IAAI,CACA,uBAAuB,EACvB,SAAS,GAAG,QAAQ,GAAG,qBAAqB,GAAG,cAAc,CAChE,CACJ,GAAG;IACA,OAAO,EAAE,WAAW,CAAC;IACrB,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;CACzB,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/request/UsernamePasswordRequest.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/request/UsernamePasswordRequest.d.ts deleted file mode 100644 index f59258c..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/request/UsernamePasswordRequest.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { CommonUsernamePasswordRequest } from "@azure/msal-common/node"; -/** - * UsernamePassword parameters passed by the user to retrieve credentials - * Note: The latest OAuth 2.0 Security Best Current Practice disallows the password grant entirely. This flow is added for internal testing. - * - * - scopes - Array of scopes the application is requesting access to. - * - claims - A stringified claims request which will be added to all /authorize and /token calls. When included on a silent request, cache lookup will be skipped and token will be refreshed. - * - authority - Url of the authority which the application acquires tokens from. - * - correlationId - Unique GUID set per request to trace a request end-to-end for telemetry purposes. - * - username - username of the client - * - password - credentials - * - tokenQueryParameters - String to string map of custom query parameters added to the /token call - * @public - */ -export type UsernamePasswordRequest = Partial> & { - scopes: Array; - username: string; - password: string; -}; -//# sourceMappingURL=UsernamePasswordRequest.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/request/UsernamePasswordRequest.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/request/UsernamePasswordRequest.d.ts.map deleted file mode 100644 index 8d13a6c..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/request/UsernamePasswordRequest.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"UsernamePasswordRequest.d.ts","sourceRoot":"","sources":["../../src/request/UsernamePasswordRequest.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,6BAA6B,EAAE,MAAM,yBAAyB,CAAC;AAExE;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,uBAAuB,GAAG,OAAO,CACzC,IAAI,CACA,6BAA6B,EAC3B,QAAQ,GACR,uBAAuB,GACvB,oBAAoB,GACpB,UAAU,GACV,UAAU,GACV,qBAAqB,GACrB,cAAc,CACnB,CACJ,GAAG;IACA,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;CACpB,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/response/ManagedIdentityTokenResponse.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/response/ManagedIdentityTokenResponse.d.ts deleted file mode 100644 index feabf64..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/response/ManagedIdentityTokenResponse.d.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { AuthenticationScheme } from "@azure/msal-common/node"; -/** - * Deserialized response object from server managed identity request. - * - * In case of success: - * - access_token - The requested access token. When called via a secured REST API, the token is embedded in the Authorization request header field as a "bearer" token, allowing the API to authenticate the caller - * - client_id - A unique identifier generated by Azure AD for the Azure Resource. The Client ID is a GUID value that uniquely identifies the application and its configuration within the identity platform - * - expires_on - The timespan when the access token expires. The date is represented as the number of seconds from "1970-01-01T0:0:0Z UTC" (corresponds to the token's exp claim) - * - resource - The resource the access token was requested for. It matches the resource query string parameter of the request - * - token_type - The type of token returned by the Managed Identity endpoint. It's a "Bearer" access token, which means the resource can give access to the bearer of this token - * - * In case of error: - * - message: A specific error message that can help a developer identify the root cause of an authentication error. - * - correlationId: A unique identifier for the request that can help in diagnostics across components. - */ -export type ManagedIdentityTokenResponse = { - access_token?: string; - client_id?: string; - expires_on?: number; - resource?: string; - token_type?: AuthenticationScheme; - message?: string; - correlationId?: string; - error?: string | ErrorObject; - error_description?: string; - error_codes?: Array; - correlation_id?: string; - timestamp?: string; - trace_id?: string; -}; -export type ErrorObject = { - code: string; - message: string; -}; -//# sourceMappingURL=ManagedIdentityTokenResponse.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/response/ManagedIdentityTokenResponse.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/response/ManagedIdentityTokenResponse.d.ts.map deleted file mode 100644 index b384f50..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/response/ManagedIdentityTokenResponse.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ManagedIdentityTokenResponse.d.ts","sourceRoot":"","sources":["../../src/response/ManagedIdentityTokenResponse.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAE/D;;;;;;;;;;;;;GAaG;AACH,MAAM,MAAM,4BAA4B,GAAG;IAEvC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,oBAAoB,CAAC;IAQlC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,aAAa,CAAC,EAAE,MAAM,CAAC;IAGvB,KAAK,CAAC,EAAE,MAAM,GAAG,WAAW,CAAC;IAC7B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,WAAW,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC5B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAMF,MAAM,MAAM,WAAW,GAAG;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACnB,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/retry/IHttpRetryPolicy.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/retry/IHttpRetryPolicy.d.ts deleted file mode 100644 index b8ed715..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/retry/IHttpRetryPolicy.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -/// -import http from "http"; -export interface IHttpRetryPolicy { - pauseForRetry(httpStatusCode: number, currentRetry: number, retryAfterHeader: http.IncomingHttpHeaders["retry-after"]): Promise; -} -//# sourceMappingURL=IHttpRetryPolicy.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/retry/IHttpRetryPolicy.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/retry/IHttpRetryPolicy.d.ts.map deleted file mode 100644 index 2a65511..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/retry/IHttpRetryPolicy.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"IHttpRetryPolicy.d.ts","sourceRoot":"","sources":["../../src/retry/IHttpRetryPolicy.ts"],"names":[],"mappings":";AAKA,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,MAAM,WAAW,gBAAgB;IAK7B,aAAa,CACT,cAAc,EAAE,MAAM,EACtB,YAAY,EAAE,MAAM,EACpB,gBAAgB,EAAE,IAAI,CAAC,mBAAmB,CAAC,aAAa,CAAC,GAC1D,OAAO,CAAC,OAAO,CAAC,CAAC;CACvB"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/retry/LinearRetryPolicy.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/retry/LinearRetryPolicy.d.ts deleted file mode 100644 index be386b5..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/retry/LinearRetryPolicy.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -/// -import http from "http"; -import { IHttpRetryPolicy } from "./IHttpRetryPolicy.js"; -export declare class LinearRetryPolicy implements IHttpRetryPolicy { - maxRetries: number; - retryDelay: number; - httpStatusCodesToRetryOn: Array; - constructor(maxRetries: number, retryDelay: number, httpStatusCodesToRetryOn: Array); - private retryAfterMillisecondsToSleep; - pauseForRetry(httpStatusCode: number, currentRetry: number, retryAfterHeader: http.IncomingHttpHeaders["retry-after"]): Promise; -} -//# sourceMappingURL=LinearRetryPolicy.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/retry/LinearRetryPolicy.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/retry/LinearRetryPolicy.d.ts.map deleted file mode 100644 index 31e78c4..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/retry/LinearRetryPolicy.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"LinearRetryPolicy.d.ts","sourceRoot":"","sources":["../../src/retry/LinearRetryPolicy.ts"],"names":[],"mappings":";AAKA,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAEzD,qBAAa,iBAAkB,YAAW,gBAAgB;IACtD,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,wBAAwB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;gBAGpC,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,MAAM,EAClB,wBAAwB,EAAE,KAAK,CAAC,MAAM,CAAC;IAO3C,OAAO,CAAC,6BAA6B;IAyB/B,aAAa,CACf,cAAc,EAAE,MAAM,EACtB,YAAY,EAAE,MAAM,EACpB,gBAAgB,EAAE,IAAI,CAAC,mBAAmB,CAAC,aAAa,CAAC,GAC1D,OAAO,CAAC,OAAO,CAAC;CAkBtB"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/retry/LinearRetryPolicy.mjs b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/retry/LinearRetryPolicy.mjs deleted file mode 100644 index 0b60393..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/retry/LinearRetryPolicy.mjs +++ /dev/null @@ -1,45 +0,0 @@ -/*! @azure/msal-node v2.16.3 2025-08-05 */ -'use strict'; -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -class LinearRetryPolicy { - constructor(maxRetries, retryDelay, httpStatusCodesToRetryOn) { - this.maxRetries = maxRetries; - this.retryDelay = retryDelay; - this.httpStatusCodesToRetryOn = httpStatusCodesToRetryOn; - } - retryAfterMillisecondsToSleep(retryHeader) { - if (!retryHeader) { - return 0; - } - // retry-after header is in seconds - let millisToSleep = Math.round(parseFloat(retryHeader) * 1000); - /* - * retry-after header is in HTTP Date format - * , :: GMT - */ - if (isNaN(millisToSleep)) { - millisToSleep = Math.max(0, - // .valueOf() is needed to subtract dates in TypeScript - new Date(retryHeader).valueOf() - new Date().valueOf()); - } - return millisToSleep; - } - async pauseForRetry(httpStatusCode, currentRetry, retryAfterHeader) { - if (this.httpStatusCodesToRetryOn.includes(httpStatusCode) && - currentRetry < this.maxRetries) { - const retryAfterDelay = this.retryAfterMillisecondsToSleep(retryAfterHeader); - await new Promise((resolve) => { - // retryAfterHeader value of 0 evaluates to false, and this.retryDelay will be used - return setTimeout(resolve, retryAfterDelay || this.retryDelay); - }); - return true; - } - return false; - } -} - -export { LinearRetryPolicy }; -//# sourceMappingURL=LinearRetryPolicy.mjs.map diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/retry/LinearRetryPolicy.mjs.map b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/retry/LinearRetryPolicy.mjs.map deleted file mode 100644 index 766572a..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/retry/LinearRetryPolicy.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"LinearRetryPolicy.mjs","sources":["../../src/retry/LinearRetryPolicy.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAAA;;;AAGG;MAKU,iBAAiB,CAAA;AAK1B,IAAA,WAAA,CACI,UAAkB,EAClB,UAAkB,EAClB,wBAAuC,EAAA;AAEvC,QAAA,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;AAC7B,QAAA,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;AAC7B,QAAA,IAAI,CAAC,wBAAwB,GAAG,wBAAwB,CAAC;KAC5D;AAEO,IAAA,6BAA6B,CACjC,WAAoD,EAAA;QAEpD,IAAI,CAAC,WAAW,EAAE;AACd,YAAA,OAAO,CAAC,CAAC;AACZ,SAAA;;AAGD,QAAA,IAAI,aAAa,GAAG,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,WAAW,CAAC,GAAG,IAAI,CAAC,CAAC;AAE/D;;;AAGG;AACH,QAAA,IAAI,KAAK,CAAC,aAAa,CAAC,EAAE;AACtB,YAAA,aAAa,GAAG,IAAI,CAAC,GAAG,CACpB,CAAC;;AAED,YAAA,IAAI,IAAI,CAAC,WAAW,CAAC,CAAC,OAAO,EAAE,GAAG,IAAI,IAAI,EAAE,CAAC,OAAO,EAAE,CACzD,CAAC;AACL,SAAA;AAED,QAAA,OAAO,aAAa,CAAC;KACxB;AAED,IAAA,MAAM,aAAa,CACf,cAAsB,EACtB,YAAoB,EACpB,gBAAyD,EAAA;AAEzD,QAAA,IACI,IAAI,CAAC,wBAAwB,CAAC,QAAQ,CAAC,cAAc,CAAC;AACtD,YAAA,YAAY,GAAG,IAAI,CAAC,UAAU,EAChC;YACE,MAAM,eAAe,GACjB,IAAI,CAAC,6BAA6B,CAAC,gBAAgB,CAAC,CAAC;AAEzD,YAAA,MAAM,IAAI,OAAO,CAAC,CAAC,OAAO,KAAI;;gBAE1B,OAAO,UAAU,CAAC,OAAO,EAAE,eAAe,IAAI,IAAI,CAAC,UAAU,CAAC,CAAC;AACnE,aAAC,CAAC,CAAC;AAEH,YAAA,OAAO,IAAI,CAAC;AACf,SAAA;AAED,QAAA,OAAO,KAAK,CAAC;KAChB;AACJ;;;;"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/utils/Constants.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/utils/Constants.d.ts deleted file mode 100644 index 31678b4..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/utils/Constants.d.ts +++ /dev/null @@ -1,143 +0,0 @@ -export declare const AUTHORIZATION_HEADER_NAME: string; -export declare const METADATA_HEADER_NAME: string; -export declare const APP_SERVICE_SECRET_HEADER_NAME: string; -export declare const SERVICE_FABRIC_SECRET_HEADER_NAME: string; -export declare const API_VERSION_QUERY_PARAMETER_NAME: string; -export declare const RESOURCE_BODY_OR_QUERY_PARAMETER_NAME: string; -export declare const DEFAULT_MANAGED_IDENTITY_ID = "system_assigned_managed_identity"; -export declare const MANAGED_IDENTITY_DEFAULT_TENANT = "managed_identity"; -export declare const DEFAULT_AUTHORITY_FOR_MANAGED_IDENTITY: string; -/** - * Managed Identity Environment Variable Names - */ -export declare const ManagedIdentityEnvironmentVariableNames: { - readonly AZURE_POD_IDENTITY_AUTHORITY_HOST: "AZURE_POD_IDENTITY_AUTHORITY_HOST"; - readonly IDENTITY_ENDPOINT: "IDENTITY_ENDPOINT"; - readonly IDENTITY_HEADER: "IDENTITY_HEADER"; - readonly IDENTITY_SERVER_THUMBPRINT: "IDENTITY_SERVER_THUMBPRINT"; - readonly IMDS_ENDPOINT: "IMDS_ENDPOINT"; - readonly MSI_ENDPOINT: "MSI_ENDPOINT"; -}; -export type ManagedIdentityEnvironmentVariableNames = (typeof ManagedIdentityEnvironmentVariableNames)[keyof typeof ManagedIdentityEnvironmentVariableNames]; -/** - * Managed Identity Source Names - * @public - */ -export declare const ManagedIdentitySourceNames: { - readonly APP_SERVICE: "AppService"; - readonly AZURE_ARC: "AzureArc"; - readonly CLOUD_SHELL: "CloudShell"; - readonly DEFAULT_TO_IMDS: "DefaultToImds"; - readonly IMDS: "Imds"; - readonly SERVICE_FABRIC: "ServiceFabric"; -}; -/** - * The ManagedIdentitySourceNames type - * @public - */ -export type ManagedIdentitySourceNames = (typeof ManagedIdentitySourceNames)[keyof typeof ManagedIdentitySourceNames]; -/** - * Managed Identity Ids - */ -export declare const ManagedIdentityIdType: { - readonly SYSTEM_ASSIGNED: "system-assigned"; - readonly USER_ASSIGNED_CLIENT_ID: "user-assigned-client-id"; - readonly USER_ASSIGNED_RESOURCE_ID: "user-assigned-resource-id"; - readonly USER_ASSIGNED_OBJECT_ID: "user-assigned-object-id"; -}; -export type ManagedIdentityIdType = (typeof ManagedIdentityIdType)[keyof typeof ManagedIdentityIdType]; -/** - * http methods - */ -export declare const HttpMethod: { - readonly GET: "get"; - readonly POST: "post"; -}; -export type HttpMethod = (typeof HttpMethod)[keyof typeof HttpMethod]; -export declare const ProxyStatus: { - readonly SUCCESS: 200; - readonly SUCCESS_RANGE_START: 200; - readonly SUCCESS_RANGE_END: 299; - readonly SERVER_ERROR: 500; -}; -export type ProxyStatus = (typeof ProxyStatus)[keyof typeof ProxyStatus]; -/** - * Constants used for region discovery - */ -export declare const REGION_ENVIRONMENT_VARIABLE = "REGION_NAME"; -export declare const MSAL_FORCE_REGION = "MSAL_FORCE_REGION"; -/** - * Constant used for PKCE - */ -export declare const RANDOM_OCTET_SIZE = 32; -/** - * Constants used in PKCE - */ -export declare const Hash: { - SHA256: string; -}; -/** - * Constants for encoding schemes - */ -export declare const CharSet: { - CV_CHARSET: string; -}; -/** - * Cache Constants - */ -export declare const CACHE: { - FILE_CACHE: string; - EXTENSION_LIB: string; -}; -/** - * Constants - */ -export declare const Constants: { - MSAL_SKU: string; - JWT_BEARER_ASSERTION_TYPE: string; - AUTHORIZATION_PENDING: string; - HTTP_PROTOCOL: string; - LOCALHOST: string; -}; -/** - * API Codes for Telemetry purposes. - * Before adding a new code you must claim it in the MSAL Telemetry tracker as these number spaces are shared across all MSALs - * 0-99 Silent Flow - * 600-699 Device Code Flow - * 800-899 Auth Code Flow - */ -export declare const ApiId: { - acquireTokenSilent: number; - acquireTokenByUsernamePassword: number; - acquireTokenByDeviceCode: number; - acquireTokenByClientCredential: number; - acquireTokenByCode: number; - acquireTokenByRefreshToken: number; -}; -export type ApiId = (typeof ApiId)[keyof typeof ApiId]; -/** - * JWT constants - */ -export declare const JwtConstants: { - ALGORITHM: string; - RSA_256: string; - PSS_256: string; - X5T_256: string; - X5T: string; - X5C: string; - AUDIENCE: string; - EXPIRATION_TIME: string; - ISSUER: string; - SUBJECT: string; - NOT_BEFORE: string; - JWT_ID: string; -}; -export declare const LOOPBACK_SERVER_CONSTANTS: { - INTERVAL_MS: number; - TIMEOUT_MS: number; -}; -export declare const AZURE_ARC_SECRET_FILE_MAX_SIZE_BYTES = 4096; -export declare const MANAGED_IDENTITY_MAX_RETRIES = 3; -export declare const MANAGED_IDENTITY_RETRY_DELAY = 1000; -export declare const MANAGED_IDENTITY_HTTP_STATUS_CODES_TO_RETRY_ON: (500 | 404 | 408 | 429 | 503 | 504)[]; -//# sourceMappingURL=Constants.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/utils/Constants.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/utils/Constants.d.ts.map deleted file mode 100644 index 97e865f..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/utils/Constants.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Constants.d.ts","sourceRoot":"","sources":["../../src/utils/Constants.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,yBAAyB,EAAE,MAAwB,CAAC;AACjE,eAAO,MAAM,oBAAoB,EAAE,MAAmB,CAAC;AACvD,eAAO,MAAM,8BAA8B,EAAE,MAA4B,CAAC;AAC1E,eAAO,MAAM,iCAAiC,EAAE,MAAiB,CAAC;AAClE,eAAO,MAAM,gCAAgC,EAAE,MAAsB,CAAC;AACtE,eAAO,MAAM,qCAAqC,EAAE,MAAmB,CAAC;AACxE,eAAO,MAAM,2BAA2B,qCAAqC,CAAC;AAC9E,eAAO,MAAM,+BAA+B,qBAAqB,CAAC;AAClE,eAAO,MAAM,sCAAsC,QAA0E,CAAC;AAE9H;;GAEG;AACH,eAAO,MAAM,uCAAuC;;;;;;;CAO1C,CAAC;AACX,MAAM,MAAM,uCAAuC,GAC/C,CAAC,OAAO,uCAAuC,CA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AyB;;;CAGrC,CAAC;AAEF,eAAO,MAAM,oCAAoC,OAAO,CAAC;AAEzD,eAAO,MAAM,4BAA4B,IAAI,CAAC;AAC9C,eAAO,MAAM,4BAA4B,OAAO,CAAC;AACjD,eAAO,MAAM,8CAA8C,uCAO1D,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/utils/Constants.mjs b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/utils/Constants.mjs deleted file mode 100644 index 857d9fc..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/utils/Constants.mjs +++ /dev/null @@ -1,142 +0,0 @@ -/*! @azure/msal-node v2.16.3 2025-08-05 */ -'use strict'; -import { HttpStatus } from '@azure/msal-common/node'; - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -// MSI Constants. Docs for MSI are available here https://docs.microsoft.com/azure/app-service/overview-managed-identity -const AUTHORIZATION_HEADER_NAME = "Authorization"; -const METADATA_HEADER_NAME = "Metadata"; -const APP_SERVICE_SECRET_HEADER_NAME = "X-IDENTITY-HEADER"; -const SERVICE_FABRIC_SECRET_HEADER_NAME = "secret"; -const API_VERSION_QUERY_PARAMETER_NAME = "api-version"; -const RESOURCE_BODY_OR_QUERY_PARAMETER_NAME = "resource"; -const DEFAULT_MANAGED_IDENTITY_ID = "system_assigned_managed_identity"; -const MANAGED_IDENTITY_DEFAULT_TENANT = "managed_identity"; -const DEFAULT_AUTHORITY_FOR_MANAGED_IDENTITY = `https://login.microsoftonline.com/${MANAGED_IDENTITY_DEFAULT_TENANT}/`; -/** - * Managed Identity Environment Variable Names - */ -const ManagedIdentityEnvironmentVariableNames = { - AZURE_POD_IDENTITY_AUTHORITY_HOST: "AZURE_POD_IDENTITY_AUTHORITY_HOST", - IDENTITY_ENDPOINT: "IDENTITY_ENDPOINT", - IDENTITY_HEADER: "IDENTITY_HEADER", - IDENTITY_SERVER_THUMBPRINT: "IDENTITY_SERVER_THUMBPRINT", - IMDS_ENDPOINT: "IMDS_ENDPOINT", - MSI_ENDPOINT: "MSI_ENDPOINT", -}; -/** - * Managed Identity Source Names - * @public - */ -const ManagedIdentitySourceNames = { - APP_SERVICE: "AppService", - AZURE_ARC: "AzureArc", - CLOUD_SHELL: "CloudShell", - DEFAULT_TO_IMDS: "DefaultToImds", - IMDS: "Imds", - SERVICE_FABRIC: "ServiceFabric", -}; -/** - * Managed Identity Ids - */ -const ManagedIdentityIdType = { - SYSTEM_ASSIGNED: "system-assigned", - USER_ASSIGNED_CLIENT_ID: "user-assigned-client-id", - USER_ASSIGNED_RESOURCE_ID: "user-assigned-resource-id", - USER_ASSIGNED_OBJECT_ID: "user-assigned-object-id", -}; -/** - * http methods - */ -const HttpMethod = { - GET: "get", - POST: "post", -}; -const ProxyStatus = { - SUCCESS_RANGE_START: HttpStatus.SUCCESS_RANGE_START, - SUCCESS_RANGE_END: HttpStatus.SUCCESS_RANGE_END, - SERVER_ERROR: HttpStatus.SERVER_ERROR, -}; -/** - * Constants used for region discovery - */ -const REGION_ENVIRONMENT_VARIABLE = "REGION_NAME"; -const MSAL_FORCE_REGION = "MSAL_FORCE_REGION"; -/** - * Constant used for PKCE - */ -const RANDOM_OCTET_SIZE = 32; -/** - * Constants used in PKCE - */ -const Hash = { - SHA256: "sha256", -}; -/** - * Constants for encoding schemes - */ -const CharSet = { - CV_CHARSET: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~", -}; -/** - * Constants - */ -const Constants = { - MSAL_SKU: "msal.js.node", - JWT_BEARER_ASSERTION_TYPE: "urn:ietf:params:oauth:client-assertion-type:jwt-bearer", - AUTHORIZATION_PENDING: "authorization_pending", - HTTP_PROTOCOL: "http://", - LOCALHOST: "localhost", -}; -/** - * API Codes for Telemetry purposes. - * Before adding a new code you must claim it in the MSAL Telemetry tracker as these number spaces are shared across all MSALs - * 0-99 Silent Flow - * 600-699 Device Code Flow - * 800-899 Auth Code Flow - */ -const ApiId = { - acquireTokenSilent: 62, - acquireTokenByUsernamePassword: 371, - acquireTokenByDeviceCode: 671, - acquireTokenByClientCredential: 771, - acquireTokenByCode: 871, - acquireTokenByRefreshToken: 872, -}; -/** - * JWT constants - */ -const JwtConstants = { - RSA_256: "RS256", - PSS_256: "PS256", - X5T_256: "x5t#S256", - X5T: "x5t", - X5C: "x5c", - AUDIENCE: "aud", - EXPIRATION_TIME: "exp", - ISSUER: "iss", - SUBJECT: "sub", - NOT_BEFORE: "nbf", - JWT_ID: "jti", -}; -const LOOPBACK_SERVER_CONSTANTS = { - INTERVAL_MS: 100, - TIMEOUT_MS: 5000, -}; -const AZURE_ARC_SECRET_FILE_MAX_SIZE_BYTES = 4096; // 4 KB -const MANAGED_IDENTITY_MAX_RETRIES = 3; -const MANAGED_IDENTITY_RETRY_DELAY = 1000; -const MANAGED_IDENTITY_HTTP_STATUS_CODES_TO_RETRY_ON = [ - HttpStatus.NOT_FOUND, - HttpStatus.REQUEST_TIMEOUT, - HttpStatus.TOO_MANY_REQUESTS, - HttpStatus.SERVER_ERROR, - HttpStatus.SERVICE_UNAVAILABLE, - HttpStatus.GATEWAY_TIMEOUT, -]; - -export { API_VERSION_QUERY_PARAMETER_NAME, APP_SERVICE_SECRET_HEADER_NAME, AUTHORIZATION_HEADER_NAME, AZURE_ARC_SECRET_FILE_MAX_SIZE_BYTES, ApiId, CharSet, Constants, DEFAULT_AUTHORITY_FOR_MANAGED_IDENTITY, DEFAULT_MANAGED_IDENTITY_ID, Hash, HttpMethod, JwtConstants, LOOPBACK_SERVER_CONSTANTS, MANAGED_IDENTITY_DEFAULT_TENANT, MANAGED_IDENTITY_HTTP_STATUS_CODES_TO_RETRY_ON, MANAGED_IDENTITY_MAX_RETRIES, MANAGED_IDENTITY_RETRY_DELAY, METADATA_HEADER_NAME, MSAL_FORCE_REGION, ManagedIdentityEnvironmentVariableNames, ManagedIdentityIdType, ManagedIdentitySourceNames, ProxyStatus, RANDOM_OCTET_SIZE, REGION_ENVIRONMENT_VARIABLE, RESOURCE_BODY_OR_QUERY_PARAMETER_NAME, SERVICE_FABRIC_SECRET_HEADER_NAME }; -//# sourceMappingURL=Constants.mjs.map diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/utils/Constants.mjs.map b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/utils/Constants.mjs.map deleted file mode 100644 index 09e8051..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/utils/Constants.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Constants.mjs","sources":["../../src/utils/Constants.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;AAAA;;;AAGG;AAIH;AACO,MAAM,yBAAyB,GAAW,gBAAgB;AAC1D,MAAM,oBAAoB,GAAW,WAAW;AAChD,MAAM,8BAA8B,GAAW,oBAAoB;AACnE,MAAM,iCAAiC,GAAW,SAAS;AAC3D,MAAM,gCAAgC,GAAW,cAAc;AAC/D,MAAM,qCAAqC,GAAW,WAAW;AACjE,MAAM,2BAA2B,GAAG,mCAAmC;AACvE,MAAM,+BAA+B,GAAG,mBAAmB;AACrD,MAAA,sCAAsC,GAAG,CAAqC,kCAAA,EAAA,+BAA+B,IAAI;AAE9H;;AAEG;AACU,MAAA,uCAAuC,GAAG;AACnD,IAAA,iCAAiC,EAAE,mCAAmC;AACtE,IAAA,iBAAiB,EAAE,mBAAmB;AACtC,IAAA,eAAe,EAAE,iBAAiB;AAClC,IAAA,0BAA0B,EAAE,4BAA4B;AACxD,IAAA,aAAa,EAAE,eAAe;AAC9B,IAAA,YAAY,EAAE,cAAc;EACrB;AAIX;;;AAGG;AACU,MAAA,0BAA0B,GAAG;AACtC,IAAA,WAAW,EAAE,YAAY;AACzB,IAAA,SAAS,EAAE,UAAU;AACrB,IAAA,WAAW,EAAE,YAAY;AACzB,IAAA,eAAe,EAAE,eAAe;AAChC,IAAA,IAAI,EAAE,MAAM;AACZ,IAAA,cAAc,EAAE,eAAe;EACxB;A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OAAO,EAAE,OAAO;AAChB,IAAA,OAAO,EAAE,UAAU;AACnB,IAAA,GAAG,EAAE,KAAK;AACV,IAAA,GAAG,EAAE,KAAK;AACV,IAAA,QAAQ,EAAE,KAAK;AACf,IAAA,eAAe,EAAE,KAAK;AACtB,IAAA,MAAM,EAAE,KAAK;AACb,IAAA,OAAO,EAAE,KAAK;AACd,IAAA,UAAU,EAAE,KAAK;AACjB,IAAA,MAAM,EAAE,KAAK;EACf;AAEW,MAAA,yBAAyB,GAAG;AACrC,IAAA,WAAW,EAAE,GAAG;AAChB,IAAA,UAAU,EAAE,IAAI;EAClB;AAEW,MAAA,oCAAoC,GAAG,KAAK;AAElD,MAAM,4BAA4B,GAAG,EAAE;AACvC,MAAM,4BAA4B,GAAG,KAAK;AACpC,MAAA,8CAA8C,GAAG;AAC1D,IAAA,UAAU,CAAC,SAAS;AACpB,IAAA,UAAU,CAAC,eAAe;AAC1B,IAAA,UAAU,CAAC,iBAAiB;AAC5B,IAAA,UAAU,CAAC,YAAY;AACvB,IAAA,UAAU,CAAC,mBAAmB;AAC9B,IAAA,UAAU,CAAC,eAAe;;;;;"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/utils/EncodingUtils.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/utils/EncodingUtils.d.ts deleted file mode 100644 index 4a07473..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/utils/EncodingUtils.d.ts +++ /dev/null @@ -1,27 +0,0 @@ -/// -export declare class EncodingUtils { - /** - * 'utf8': Multibyte encoded Unicode characters. Many web pages and other document formats use UTF-8. - * 'base64': Base64 encoding. - * - * @param str text - */ - static base64Encode(str: string, encoding?: BufferEncoding): string; - /** - * encode a URL - * @param str - */ - static base64EncodeUrl(str: string, encoding?: BufferEncoding): string; - /** - * 'utf8': Multibyte encoded Unicode characters. Many web pages and other document formats use UTF-8. - * 'base64': Base64 encoding. - * - * @param base64Str Base64 encoded text - */ - static base64Decode(base64Str: string): string; - /** - * @param base64Str Base64 encoded Url - */ - static base64DecodeUrl(base64Str: string): string; -} -//# sourceMappingURL=EncodingUtils.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/utils/EncodingUtils.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/utils/EncodingUtils.d.ts.map deleted file mode 100644 index d847266..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/utils/EncodingUtils.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"EncodingUtils.d.ts","sourceRoot":"","sources":["../../src/utils/EncodingUtils.ts"],"names":[],"mappings":";AAOA,qBAAa,aAAa;IACtB;;;;;OAKG;IACH,MAAM,CAAC,YAAY,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,cAAc,GAAG,MAAM;IAInE;;;OAGG;IACH,MAAM,CAAC,eAAe,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,cAAc,GAAG,MAAM;IAOtE;;;;;OAKG;IACH,MAAM,CAAC,YAAY,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM;IAI9C;;OAEG;IACH,MAAM,CAAC,eAAe,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM;CAOpD"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/utils/EncodingUtils.mjs b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/utils/EncodingUtils.mjs deleted file mode 100644 index 3e30171..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/utils/EncodingUtils.mjs +++ /dev/null @@ -1,51 +0,0 @@ -/*! @azure/msal-node v2.16.3 2025-08-05 */ -'use strict'; -import { Constants } from '@azure/msal-common/node'; - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -class EncodingUtils { - /** - * 'utf8': Multibyte encoded Unicode characters. Many web pages and other document formats use UTF-8. - * 'base64': Base64 encoding. - * - * @param str text - */ - static base64Encode(str, encoding) { - return Buffer.from(str, encoding).toString("base64"); - } - /** - * encode a URL - * @param str - */ - static base64EncodeUrl(str, encoding) { - return EncodingUtils.base64Encode(str, encoding) - .replace(/=/g, Constants.EMPTY_STRING) - .replace(/\+/g, "-") - .replace(/\//g, "_"); - } - /** - * 'utf8': Multibyte encoded Unicode characters. Many web pages and other document formats use UTF-8. - * 'base64': Base64 encoding. - * - * @param base64Str Base64 encoded text - */ - static base64Decode(base64Str) { - return Buffer.from(base64Str, "base64").toString("utf8"); - } - /** - * @param base64Str Base64 encoded Url - */ - static base64DecodeUrl(base64Str) { - let str = base64Str.replace(/-/g, "+").replace(/_/g, "/"); - while (str.length % 4) { - str += "="; - } - return EncodingUtils.base64Decode(str); - } -} - -export { EncodingUtils }; -//# sourceMappingURL=EncodingUtils.mjs.map diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/utils/EncodingUtils.mjs.map b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/utils/EncodingUtils.mjs.map deleted file mode 100644 index 55f2b00..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/utils/EncodingUtils.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"EncodingUtils.mjs","sources":["../../src/utils/EncodingUtils.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;AAAA;;;AAGG;MAIU,aAAa,CAAA;AACtB;;;;;AAKG;AACH,IAAA,OAAO,YAAY,CAAC,GAAW,EAAE,QAAyB,EAAA;AACtD,QAAA,OAAO,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;KACxD;AAED;;;AAGG;AACH,IAAA,OAAO,eAAe,CAAC,GAAW,EAAE,QAAyB,EAAA;AACzD,QAAA,OAAO,aAAa,CAAC,YAAY,CAAC,GAAG,EAAE,QAAQ,CAAC;AAC3C,aAAA,OAAO,CAAC,IAAI,EAAE,SAAS,CAAC,YAAY,CAAC;AACrC,aAAA,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC;AACnB,aAAA,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;KAC5B;AAED;;;;;AAKG;IACH,OAAO,YAAY,CAAC,SAAiB,EAAA;AACjC,QAAA,OAAO,MAAM,CAAC,IAAI,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;KAC5D;AAED;;AAEG;IACH,OAAO,eAAe,CAAC,SAAiB,EAAA;AACpC,QAAA,IAAI,GAAG,GAAG,SAAS,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;AAC1D,QAAA,OAAO,GAAG,CAAC,MAAM,GAAG,CAAC,EAAE;YACnB,GAAG,IAAI,GAAG,CAAC;AACd,SAAA;AACD,QAAA,OAAO,aAAa,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC;KAC1C;AACJ;;;;"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/utils/NetworkUtils.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/utils/NetworkUtils.d.ts deleted file mode 100644 index 6987088..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/utils/NetworkUtils.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { NetworkResponse } from "@azure/msal-common/node"; -export type UrlToHttpRequestOptions = { - protocol: string; - hostname: string; - hash: string; - search: string; - pathname: string; - path: string; - href: string; - port?: number; - auth?: string; -}; -export declare class NetworkUtils { - static getNetworkResponse(headers: Record, body: T, statusCode: number): NetworkResponse; - static urlToHttpOptions(url: URL): UrlToHttpRequestOptions; -} -//# sourceMappingURL=NetworkUtils.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/utils/NetworkUtils.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/utils/NetworkUtils.d.ts.map deleted file mode 100644 index 9961e15..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/utils/NetworkUtils.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"NetworkUtils.d.ts","sourceRoot":"","sources":["../../src/utils/NetworkUtils.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE1D,MAAM,MAAM,uBAAuB,GAAG;IAClC,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,qBAAa,YAAY;IACrB,MAAM,CAAC,kBAAkB,CAAC,CAAC,EACvB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC/B,IAAI,EAAE,CAAC,EACP,UAAU,EAAE,MAAM,GACnB,eAAe,CAAC,CAAC,CAAC;IAarB,MAAM,CAAC,gBAAgB,CAAC,GAAG,EAAE,GAAG,GAAG,uBAAuB;CAuB7D"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/utils/NetworkUtils.mjs b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/utils/NetworkUtils.mjs deleted file mode 100644 index 6d34d9b..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/utils/NetworkUtils.mjs +++ /dev/null @@ -1,43 +0,0 @@ -/*! @azure/msal-node v2.16.3 2025-08-05 */ -'use strict'; -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -class NetworkUtils { - static getNetworkResponse(headers, body, statusCode) { - return { - headers: headers, - body: body, - status: statusCode, - }; - } - /* - * Utility function that converts a URL object into an ordinary options object as expected by the - * http.request and https.request APIs. - * https://github.com/nodejs/node/blob/main/lib/internal/url.js#L1090 - */ - static urlToHttpOptions(url) { - const options = { - protocol: url.protocol, - hostname: url.hostname && url.hostname.startsWith("[") - ? url.hostname.slice(1, -1) - : url.hostname, - hash: url.hash, - search: url.search, - pathname: url.pathname, - path: `${url.pathname || ""}${url.search || ""}`, - href: url.href, - }; - if (url.port !== "") { - options.port = Number(url.port); - } - if (url.username || url.password) { - options.auth = `${decodeURIComponent(url.username)}:${decodeURIComponent(url.password)}`; - } - return options; - } -} - -export { NetworkUtils }; -//# sourceMappingURL=NetworkUtils.mjs.map diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/utils/NetworkUtils.mjs.map b/PBandGraphScaffold/node_modules/@azure/msal-node/dist/utils/NetworkUtils.mjs.map deleted file mode 100644 index a39522e..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/dist/utils/NetworkUtils.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"NetworkUtils.mjs","sources":["../../src/utils/NetworkUtils.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAAA;;;AAGG;MAgBU,YAAY,CAAA;AACrB,IAAA,OAAO,kBAAkB,CACrB,OAA+B,EAC/B,IAAO,EACP,UAAkB,EAAA;QAElB,OAAO;AACH,YAAA,OAAO,EAAE,OAAO;AAChB,YAAA,IAAI,EAAE,IAAI;AACV,YAAA,MAAM,EAAE,UAAU;SACrB,CAAC;KACL;AAED;;;;AAIG;IACH,OAAO,gBAAgB,CAAC,GAAQ,EAAA;AAC5B,QAAA,MAAM,OAAO,GAA4B;YACrC,QAAQ,EAAE,GAAG,CAAC,QAAQ;AACtB,YAAA,QAAQ,EACJ,GAAG,CAAC,QAAQ,IAAI,GAAG,CAAC,QAAQ,CAAC,UAAU,CAAC,GAAG,CAAC;kBACtC,GAAG,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC;kBACzB,GAAG,CAAC,QAAQ;YACtB,IAAI,EAAE,GAAG,CAAC,IAAI;YACd,MAAM,EAAE,GAAG,CAAC,MAAM;YAClB,QAAQ,EAAE,GAAG,CAAC,QAAQ;AACtB,YAAA,IAAI,EAAE,CAAA,EAAG,GAAG,CAAC,QAAQ,IAAI,EAAE,CAAA,EAAG,GAAG,CAAC,MAAM,IAAI,EAAE,CAAE,CAAA;YAChD,IAAI,EAAE,GAAG,CAAC,IAAI;SACjB,CAAC;AACF,QAAA,IAAI,GAAG,CAAC,IAAI,KAAK,EAAE,EAAE;YACjB,OAAO,CAAC,IAAI,GAAG,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;AACnC,SAAA;AACD,QAAA,IAAI,GAAG,CAAC,QAAQ,IAAI,GAAG,CAAC,QAAQ,EAAE;AAC9B,YAAA,OAAO,CAAC,IAAI,GAAG,GAAG,kBAAkB,CAChC,GAAG,CAAC,QAAQ,CACf,CAAA,CAAA,EAAI,kBAAkB,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,CAAC;AAC3C,SAAA;AACD,QAAA,OAAO,OAAO,CAAC;KAClB;AACJ;;;;"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/msal-node.cjs b/PBandGraphScaffold/node_modules/@azure/msal-node/lib/msal-node.cjs deleted file mode 100644 index 63f4de3..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/msal-node.cjs +++ /dev/null @@ -1,12462 +0,0 @@ -/*! @azure/msal-node v2.16.3 2025-08-05 */ -'use strict'; -'use strict'; - -var http = require('http'); -var https = require('https'); -var uuid = require('uuid'); -var crypto = require('crypto'); -var jwt = require('jsonwebtoken'); -var fs = require('fs'); -var path = require('path'); - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * This class serializes cache entities to be saved into in-memory object types defined internally - * @internal - */ -class Serializer { - /** - * serialize the JSON blob - * @param data - JSON blob cache - */ - static serializeJSONBlob(data) { - return JSON.stringify(data); - } - /** - * Serialize Accounts - * @param accCache - cache of accounts - */ - static serializeAccounts(accCache) { - const accounts = {}; - Object.keys(accCache).map(function (key) { - const accountEntity = accCache[key]; - accounts[key] = { - home_account_id: accountEntity.homeAccountId, - environment: accountEntity.environment, - realm: accountEntity.realm, - local_account_id: accountEntity.localAccountId, - username: accountEntity.username, - authority_type: accountEntity.authorityType, - name: accountEntity.name, - client_info: accountEntity.clientInfo, - last_modification_time: accountEntity.lastModificationTime, - last_modification_app: accountEntity.lastModificationApp, - tenantProfiles: accountEntity.tenantProfiles?.map((tenantProfile) => { - return JSON.stringify(tenantProfile); - }), - }; - }); - return accounts; - } - /** - * Serialize IdTokens - * @param idTCache - cache of ID tokens - */ - static serializeIdTokens(idTCache) { - const idTokens = {}; - Object.keys(idTCache).map(function (key) { - const idTEntity = idTCache[key]; - idTokens[key] = { - home_account_id: idTEntity.homeAccountId, - environment: idTEntity.environment, - credential_type: idTEntity.credentialType, - client_id: idTEntity.clientId, - secret: idTEntity.secret, - realm: idTEntity.realm, - }; - }); - return idTokens; - } - /** - * Serializes AccessTokens - * @param atCache - cache of access tokens - */ - static serializeAccessTokens(atCache) { - const accessTokens = {}; - Object.keys(atCache).map(function (key) { - const atEntity = atCache[key]; - accessTokens[key] = { - home_account_id: atEntity.homeAccountId, - environment: atEntity.environment, - credential_type: atEntity.credentialType, - client_id: atEntity.clientId, - secret: atEntity.secret, - realm: atEntity.realm, - target: atEntity.target, - cached_at: atEntity.cachedAt, - expires_on: atEntity.expiresOn, - extended_expires_on: atEntity.extendedExpiresOn, - refresh_on: atEntity.refreshOn, - key_id: atEntity.keyId, - token_type: atEntity.tokenType, - requestedClaims: atEntity.requestedClaims, - requestedClaimsHash: atEntity.requestedClaimsHash, - userAssertionHash: atEntity.userAssertionHash, - }; - }); - return accessTokens; - } - /** - * Serialize refreshTokens - * @param rtCache - cache of refresh tokens - */ - static serializeRefreshTokens(rtCache) { - const refreshTokens = {}; - Object.keys(rtCache).map(function (key) { - const rtEntity = rtCache[key]; - refreshTokens[key] = { - home_account_id: rtEntity.homeAccountId, - environment: rtEntity.environment, - credential_type: rtEntity.credentialType, - client_id: rtEntity.clientId, - secret: rtEntity.secret, - family_id: rtEntity.familyId, - target: rtEntity.target, - realm: rtEntity.realm, - }; - }); - return refreshTokens; - } - /** - * Serialize amdtCache - * @param amdtCache - cache of app metadata - */ - static serializeAppMetadata(amdtCache) { - const appMetadata = {}; - Object.keys(amdtCache).map(function (key) { - const amdtEntity = amdtCache[key]; - appMetadata[key] = { - client_id: amdtEntity.clientId, - environment: amdtEntity.environment, - family_id: amdtEntity.familyId, - }; - }); - return appMetadata; - } - /** - * Serialize the cache - * @param inMemCache - itemised cache read from the JSON - */ - static serializeAllCache(inMemCache) { - return { - Account: this.serializeAccounts(inMemCache.accounts), - IdToken: this.serializeIdTokens(inMemCache.idTokens), - AccessToken: this.serializeAccessTokens(inMemCache.accessTokens), - RefreshToken: this.serializeRefreshTokens(inMemCache.refreshTokens), - AppMetadata: this.serializeAppMetadata(inMemCache.appMetadata), - }; - } -} - -/*! @azure/msal-common v14.16.1 2025-08-05 */ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -const Constants$1 = { - LIBRARY_NAME: "MSAL.JS", - SKU: "msal.js.common", - // Prefix for all library cache entries - CACHE_PREFIX: "msal", - // default authority - DEFAULT_AUTHORITY: "https://login.microsoftonline.com/common/", - DEFAULT_AUTHORITY_HOST: "login.microsoftonline.com", - DEFAULT_COMMON_TENANT: "common", - // ADFS String - ADFS: "adfs", - DSTS: "dstsv2", - // Default AAD Instance Discovery Endpoint - AAD_INSTANCE_DISCOVERY_ENDPT: "https://login.microsoftonline.com/common/discovery/instance?api-version=1.1&authorization_endpoint=", - // CIAM URL - CIAM_AUTH_URL: ".ciamlogin.com", - AAD_TENANT_DOMAIN_SUFFIX: ".onmicrosoft.com", - // Resource delimiter - used for certain cache entries - RESOURCE_DELIM: "|", - // Placeholder for non-existent account ids/objects - NO_ACCOUNT: "NO_ACCOUNT", - // Claims - CLAIMS: "claims", - // Consumer UTID - CONSUMER_UTID: "9188040d-6c67-4c5b-b112-36a304b66dad", - // Default scopes - OPENID_SCOPE: "openid", - PROFILE_SCOPE: "profile", - OFFLINE_ACCESS_SCOPE: "offline_access", - EMAIL_SCOPE: "email", - // Default response type for authorization code flow - CODE_RESPONSE_TYPE: "code", - CODE_GRANT_TYPE: "authorization_code", - RT_GRANT_TYPE: "refresh_token", - FRAGMENT_RESPONSE_MODE: "fragment", - S256_CODE_CHALLENGE_METHOD: "S256", - URL_FORM_CONTENT_TYPE: "application/x-www-form-urlencoded;charset=utf-8", - AUTHORIZATION_PENDING: "authorization_pending", - NOT_DEFINED: "not_defined", - EMPTY_STRING: "", - NOT_APPLICABLE: "N/A", - NOT_AVAILABLE: "Not Available", - FORWARD_SLASH: "/", - IMDS_ENDPOINT: "http://169.254.169.254/metadata/instance/compute/location", - IMDS_VERSION: "2020-06-01", - IMDS_TIMEOUT: 2000, - AZURE_REGION_AUTO_DISCOVER_FLAG: "TryAutoDetect", - REGIONAL_AUTH_PUBLIC_CLOUD_SUFFIX: "login.microsoft.com", - KNOWN_PUBLIC_CLOUDS: [ - "login.microsoftonline.com", - "login.windows.net", - "login.microsoft.com", - "sts.windows.net", - ], - TOKEN_RESPONSE_TYPE: "token", - ID_TOKEN_RESPONSE_TYPE: "id_token", - SHR_NONCE_VALIDITY: 240, - INVALID_INSTANCE: "invalid_instance", -}; -const HttpStatus = { - SUCCESS_RANGE_START: 200, - SUCCESS_RANGE_END: 299, - REDIRECT: 302, - CLIENT_ERROR_RANGE_START: 400, - UNAUTHORIZED: 401, - NOT_FOUND: 404, - REQUEST_TIMEOUT: 408, - TOO_MANY_REQUESTS: 429, - CLIENT_ERROR_RANGE_END: 499, - SERVER_ERROR: 500, - SERVER_ERROR_RANGE_START: 500, - SERVICE_UNAVAILABLE: 503, - GATEWAY_TIMEOUT: 504, - SERVER_ERROR_RANGE_END: 599}; -const OIDC_DEFAULT_SCOPES = [ - Constants$1.OPENID_SCOPE, - Constants$1.PROFILE_SCOPE, - Constants$1.OFFLINE_ACCESS_SCOPE, -]; -const OIDC_SCOPES = [...OIDC_DEFAULT_SCOPES, Constants$1.EMAIL_SCOPE]; -/** - * Request header names - */ -const HeaderNames = { - CONTENT_TYPE: "Content-Type", - CONTENT_LENGTH: "Content-Length", - RETRY_AFTER: "Retry-After", - CCS_HEADER: "X-AnchorMailbox", - WWWAuthenticate: "WWW-Authenticate", - AuthenticationInfo: "Authentication-Info", - X_MS_REQUEST_ID: "x-ms-request-id", - X_MS_HTTP_VERSION: "x-ms-httpver", -}; -/** - * String constants related to AAD Authority - */ -const AADAuthorityConstants = { - COMMON: "common", - ORGANIZATIONS: "organizations", - CONSUMERS: "consumers", -}; -/** - * Claims request keys - */ -const ClaimsRequestKeys = { - ACCESS_TOKEN: "access_token", - XMS_CC: "xms_cc", -}; -/** - * we considered making this "enum" in the request instead of string, however it looks like the allowed list of - * prompt values kept changing over past couple of years. There are some undocumented prompt values for some - * internal partners too, hence the choice of generic "string" type instead of the "enum" - */ -const PromptValue = { - LOGIN: "login", - SELECT_ACCOUNT: "select_account", - CONSENT: "consent", - NONE: "none", - CREATE: "create", - NO_SESSION: "no_session", -}; -/** - * allowed values for codeVerifier - */ -const CodeChallengeMethodValues = { - PLAIN: "plain", - S256: "S256", -}; -/** - * allowed values for server response type - */ -const ServerResponseType = { - QUERY: "query", - FRAGMENT: "fragment", -}; -/** - * allowed values for response_mode - */ -const ResponseMode = { - ...ServerResponseType, - FORM_POST: "form_post", -}; -/** - * allowed grant_type - */ -const GrantType = { - AUTHORIZATION_CODE_GRANT: "authorization_code", - CLIENT_CREDENTIALS_GRANT: "client_credentials", - RESOURCE_OWNER_PASSWORD_GRANT: "password", - REFRESH_TOKEN_GRANT: "refresh_token", - DEVICE_CODE_GRANT: "device_code", - JWT_BEARER: "urn:ietf:params:oauth:grant-type:jwt-bearer", -}; -/** - * Account types in Cache - */ -const CacheAccountType = { - MSSTS_ACCOUNT_TYPE: "MSSTS", - ADFS_ACCOUNT_TYPE: "ADFS", - GENERIC_ACCOUNT_TYPE: "Generic", // NTLM, Kerberos, FBA, Basic etc -}; -/** - * Separators used in cache - */ -const Separators = { - CACHE_KEY_SEPARATOR: "-", - CLIENT_INFO_SEPARATOR: ".", -}; -/** - * Credential Type stored in the cache - */ -const CredentialType = { - ID_TOKEN: "IdToken", - ACCESS_TOKEN: "AccessToken", - ACCESS_TOKEN_WITH_AUTH_SCHEME: "AccessToken_With_AuthScheme", - REFRESH_TOKEN: "RefreshToken", -}; -/** - * More Cache related constants - */ -const APP_METADATA = "appmetadata"; -const CLIENT_INFO = "client_info"; -const THE_FAMILY_ID = "1"; -const AUTHORITY_METADATA_CONSTANTS = { - CACHE_KEY: "authority-metadata", - REFRESH_TIME_SECONDS: 3600 * 24, // 24 Hours -}; -const AuthorityMetadataSource = { - CONFIG: "config", - CACHE: "cache", - NETWORK: "network", - HARDCODED_VALUES: "hardcoded_values", -}; -const SERVER_TELEM_CONSTANTS = { - SCHEMA_VERSION: 5, - MAX_LAST_HEADER_BYTES: 330, - MAX_CACHED_ERRORS: 50, - CACHE_KEY: "server-telemetry", - CATEGORY_SEPARATOR: "|", - VALUE_SEPARATOR: ",", - OVERFLOW_TRUE: "1", - OVERFLOW_FALSE: "0", - UNKNOWN_ERROR: "unknown_error", -}; -/** - * Type of the authentication request - */ -const AuthenticationScheme = { - BEARER: "Bearer", - POP: "pop", - SSH: "ssh-cert", -}; -/** - * Constants related to throttling - */ -const ThrottlingConstants = { - // Default time to throttle RequestThumbprint in seconds - DEFAULT_THROTTLE_TIME_SECONDS: 60, - // Default maximum time to throttle in seconds, overrides what the server sends back - DEFAULT_MAX_THROTTLE_TIME_SECONDS: 3600, - // Prefix for storing throttling entries - THROTTLING_PREFIX: "throttling", - // Value assigned to the x-ms-lib-capability header to indicate to the server the library supports throttling - X_MS_LIB_CAPABILITY_VALUE: "retry-after, h429", -}; -const Errors = { - INVALID_GRANT_ERROR: "invalid_grant", - CLIENT_MISMATCH_ERROR: "client_mismatch", -}; -/** - * Password grant parameters - */ -const PasswordGrantConstants = { - username: "username", - password: "password", -}; -/** - * Response codes - */ -const ResponseCodes = { - httpSuccess: 200, - httpBadRequest: 400, -}; -/** - * Region Discovery Sources - */ -const RegionDiscoverySources = { - FAILED_AUTO_DETECTION: "1", - INTERNAL_CACHE: "2", - ENVIRONMENT_VARIABLE: "3", - IMDS: "4", -}; -/** - * Region Discovery Outcomes - */ -const RegionDiscoveryOutcomes = { - CONFIGURED_NO_AUTO_DETECTION: "2", - AUTO_DETECTION_REQUESTED_SUCCESSFUL: "4", - AUTO_DETECTION_REQUESTED_FAILED: "5", -}; -/** - * Specifies the reason for fetching the access token from the identity provider - */ -const CacheOutcome = { - // When a token is found in the cache or the cache is not supposed to be hit when making the request - NOT_APPLICABLE: "0", - // When the token request goes to the identity provider because force_refresh was set to true. Also occurs if claims were requested - FORCE_REFRESH_OR_CLAIMS: "1", - // When the token request goes to the identity provider because no cached access token exists - NO_CACHED_ACCESS_TOKEN: "2", - // When the token request goes to the identity provider because cached access token expired - CACHED_ACCESS_TOKEN_EXPIRED: "3", - // When the token request goes to the identity provider because refresh_in was used and the existing token needs to be refreshed - PROACTIVELY_REFRESHED: "4", -}; -// Token renewal offset default in seconds -const DEFAULT_TOKEN_RENEWAL_OFFSET_SEC = 300; - -/*! @azure/msal-common v14.16.1 2025-08-05 */ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * AuthErrorMessage class containing string constants used by error codes and messages. - */ -const unexpectedError = "unexpected_error"; -const postRequestFailed = "post_request_failed"; - -var AuthErrorCodes = /*#__PURE__*/Object.freeze({ - __proto__: null, - postRequestFailed: postRequestFailed, - unexpectedError: unexpectedError -}); - -/*! @azure/msal-common v14.16.1 2025-08-05 */ - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -const AuthErrorMessages = { - [unexpectedError]: "Unexpected error in authentication.", - [postRequestFailed]: "Post request failed from the network, could be a 4xx/5xx or a network unavailability. Please check the exact error code for details.", -}; -/** - * AuthErrorMessage class containing string constants used by error codes and messages. - * @deprecated Use AuthErrorCodes instead - */ -const AuthErrorMessage = { - unexpectedError: { - code: unexpectedError, - desc: AuthErrorMessages[unexpectedError], - }, - postRequestFailed: { - code: postRequestFailed, - desc: AuthErrorMessages[postRequestFailed], - }, -}; -/** - * General error class thrown by the MSAL.js library. - */ -class AuthError extends Error { - constructor(errorCode, errorMessage, suberror) { - const errorString = errorMessage - ? `${errorCode}: ${errorMessage}` - : errorCode; - super(errorString); - Object.setPrototypeOf(this, AuthError.prototype); - this.errorCode = errorCode || Constants$1.EMPTY_STRING; - this.errorMessage = errorMessage || Constants$1.EMPTY_STRING; - this.subError = suberror || Constants$1.EMPTY_STRING; - this.name = "AuthError"; - } - setCorrelationId(correlationId) { - this.correlationId = correlationId; - } -} -function createAuthError(code, additionalMessage) { - return new AuthError(code, additionalMessage - ? `${AuthErrorMessages[code]} ${additionalMessage}` - : AuthErrorMessages[code]); -} - -/*! @azure/msal-common v14.16.1 2025-08-05 */ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -const clientInfoDecodingError = "client_info_decoding_error"; -const clientInfoEmptyError = "client_info_empty_error"; -const tokenParsingError = "token_parsing_error"; -const nullOrEmptyToken = "null_or_empty_token"; -const endpointResolutionError = "endpoints_resolution_error"; -const networkError = "network_error"; -const openIdConfigError = "openid_config_error"; -const hashNotDeserialized = "hash_not_deserialized"; -const invalidState = "invalid_state"; -const stateMismatch = "state_mismatch"; -const stateNotFound = "state_not_found"; -const nonceMismatch = "nonce_mismatch"; -const authTimeNotFound = "auth_time_not_found"; -const maxAgeTranspired = "max_age_transpired"; -const multipleMatchingTokens = "multiple_matching_tokens"; -const multipleMatchingAccounts = "multiple_matching_accounts"; -const multipleMatchingAppMetadata = "multiple_matching_appMetadata"; -const requestCannotBeMade = "request_cannot_be_made"; -const cannotRemoveEmptyScope = "cannot_remove_empty_scope"; -const cannotAppendScopeSet = "cannot_append_scopeset"; -const emptyInputScopeSet = "empty_input_scopeset"; -const deviceCodePollingCancelled = "device_code_polling_cancelled"; -const deviceCodeExpired = "device_code_expired"; -const deviceCodeUnknownError = "device_code_unknown_error"; -const noAccountInSilentRequest = "no_account_in_silent_request"; -const invalidCacheRecord = "invalid_cache_record"; -const invalidCacheEnvironment = "invalid_cache_environment"; -const noAccountFound = "no_account_found"; -const noCryptoObject = "no_crypto_object"; -const unexpectedCredentialType = "unexpected_credential_type"; -const invalidAssertion = "invalid_assertion"; -const invalidClientCredential = "invalid_client_credential"; -const tokenRefreshRequired = "token_refresh_required"; -const userTimeoutReached = "user_timeout_reached"; -const tokenClaimsCnfRequiredForSignedJwt = "token_claims_cnf_required_for_signedjwt"; -const authorizationCodeMissingFromServerResponse = "authorization_code_missing_from_server_response"; -const bindingKeyNotRemoved = "binding_key_not_removed"; -const endSessionEndpointNotSupported = "end_session_endpoint_not_supported"; -const keyIdMissing = "key_id_missing"; -const noNetworkConnectivity = "no_network_connectivity"; -const userCanceled = "user_canceled"; -const missingTenantIdError = "missing_tenant_id_error"; -const methodNotImplemented = "method_not_implemented"; -const nestedAppAuthBridgeDisabled = "nested_app_auth_bridge_disabled"; - -var ClientAuthErrorCodes = /*#__PURE__*/Object.freeze({ - __proto__: null, - authTimeNotFound: authTimeNotFound, - authorizationCodeMissingFromServerResponse: authorizationCodeMissingFromServerResponse, - bindingKeyNotRemoved: bindingKeyNotRemoved, - cannotAppendScopeSet: cannotAppendScopeSet, - cannotRemoveEmptyScope: cannotRemoveEmptyScope, - clientInfoDecodingError: clientInfoDecodingError, - clientInfoEmptyError: clientInfoEmptyError, - deviceCodeExpired: deviceCodeExpired, - deviceCodePollingCancelled: deviceCodePollingCancelled, - deviceCodeUnknownError: deviceCodeUnknownError, - emptyInputScopeSet: emptyInputScopeSet, - endSessionEndpointNotSupported: endSessionEndpointNotSupported, - endpointResolutionError: endpointResolutionError, - hashNotDeserialized: hashNotDeserialized, - invalidAssertion: invalidAssertion, - invalidCacheEnvironment: invalidCacheEnvironment, - invalidCacheRecord: invalidCacheRecord, - invalidClientCredential: invalidClientCredential, - invalidState: invalidState, - keyIdMissing: keyIdMissing, - maxAgeTranspired: maxAgeTranspired, - methodNotImplemented: methodNotImplemented, - missingTenantIdError: missingTenantIdError, - multipleMatchingAccounts: multipleMatchingAccounts, - multipleMatchingAppMetadata: multipleMatchingAppMetadata, - multipleMatchingTokens: multipleMatchingTokens, - nestedAppAuthBridgeDisabled: nestedAppAuthBridgeDisabled, - networkError: networkError, - noAccountFound: noAccountFound, - noAccountInSilentRequest: noAccountInSilentRequest, - noCryptoObject: noCryptoObject, - noNetworkConnectivity: noNetworkConnectivity, - nonceMismatch: nonceMismatch, - nullOrEmptyToken: nullOrEmptyToken, - openIdConfigError: openIdConfigError, - requestCannotBeMade: requestCannotBeMade, - stateMismatch: stateMismatch, - stateNotFound: stateNotFound, - tokenClaimsCnfRequiredForSignedJwt: tokenClaimsCnfRequiredForSignedJwt, - tokenParsingError: tokenParsingError, - tokenRefreshRequired: tokenRefreshRequired, - unexpectedCredentialType: unexpectedCredentialType, - userCanceled: userCanceled, - userTimeoutReached: userTimeoutReached -}); - -/*! @azure/msal-common v14.16.1 2025-08-05 */ - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * ClientAuthErrorMessage class containing string constants used by error codes and messages. - */ -const ClientAuthErrorMessages = { - [clientInfoDecodingError]: "The client info could not be parsed/decoded correctly", - [clientInfoEmptyError]: "The client info was empty", - [tokenParsingError]: "Token cannot be parsed", - [nullOrEmptyToken]: "The token is null or empty", - [endpointResolutionError]: "Endpoints cannot be resolved", - [networkError]: "Network request failed", - [openIdConfigError]: "Could not retrieve endpoints. Check your authority and verify the .well-known/openid-configuration endpoint returns the required endpoints.", - [hashNotDeserialized]: "The hash parameters could not be deserialized", - [invalidState]: "State was not the expected format", - [stateMismatch]: "State mismatch error", - [stateNotFound]: "State not found", - [nonceMismatch]: "Nonce mismatch error", - [authTimeNotFound]: "Max Age was requested and the ID token is missing the auth_time variable." + - " auth_time is an optional claim and is not enabled by default - it must be enabled." + - " See https://aka.ms/msaljs/optional-claims for more information.", - [maxAgeTranspired]: "Max Age is set to 0, or too much time has elapsed since the last end-user authentication.", - [multipleMatchingTokens]: "The cache contains multiple tokens satisfying the requirements. " + - "Call AcquireToken again providing more requirements such as authority or account.", - [multipleMatchingAccounts]: "The cache contains multiple accounts satisfying the given parameters. Please pass more info to obtain the correct account", - [multipleMatchingAppMetadata]: "The cache contains multiple appMetadata satisfying the given parameters. Please pass more info to obtain the correct appMetadata", - [requestCannotBeMade]: "Token request cannot be made without authorization code or refresh token.", - [cannotRemoveEmptyScope]: "Cannot remove null or empty scope from ScopeSet", - [cannotAppendScopeSet]: "Cannot append ScopeSet", - [emptyInputScopeSet]: "Empty input ScopeSet cannot be processed", - [deviceCodePollingCancelled]: "Caller has cancelled token endpoint polling during device code flow by setting DeviceCodeRequest.cancel = true.", - [deviceCodeExpired]: "Device code is expired.", - [deviceCodeUnknownError]: "Device code stopped polling for unknown reasons.", - [noAccountInSilentRequest]: "Please pass an account object, silent flow is not supported without account information", - [invalidCacheRecord]: "Cache record object was null or undefined.", - [invalidCacheEnvironment]: "Invalid environment when attempting to create cache entry", - [noAccountFound]: "No account found in cache for given key.", - [noCryptoObject]: "No crypto object detected.", - [unexpectedCredentialType]: "Unexpected credential type.", - [invalidAssertion]: "Client assertion must meet requirements described in https://tools.ietf.org/html/rfc7515", - [invalidClientCredential]: "Client credential (secret, certificate, or assertion) must not be empty when creating a confidential client. An application should at most have one credential", - [tokenRefreshRequired]: "Cannot return token from cache because it must be refreshed. This may be due to one of the following reasons: forceRefresh parameter is set to true, claims have been requested, there is no cached access token or it is expired.", - [userTimeoutReached]: "User defined timeout for device code polling reached", - [tokenClaimsCnfRequiredForSignedJwt]: "Cannot generate a POP jwt if the token_claims are not populated", - [authorizationCodeMissingFromServerResponse]: "Server response does not contain an authorization code to proceed", - [bindingKeyNotRemoved]: "Could not remove the credential's binding key from storage.", - [endSessionEndpointNotSupported]: "The provided authority does not support logout", - [keyIdMissing]: "A keyId value is missing from the requested bound token's cache record and is required to match the token to it's stored binding key.", - [noNetworkConnectivity]: "No network connectivity. Check your internet connection.", - [userCanceled]: "User cancelled the flow.", - [missingTenantIdError]: "A tenant id - not common, organizations, or consumers - must be specified when using the client_credentials flow.", - [methodNotImplemented]: "This method has not been implemented", - [nestedAppAuthBridgeDisabled]: "The nested app auth bridge is disabled", -}; -/** - * String constants used by error codes and messages. - * @deprecated Use ClientAuthErrorCodes instead - */ -const ClientAuthErrorMessage = { - clientInfoDecodingError: { - code: clientInfoDecodingError, - desc: ClientAuthErrorMessages[clientInfoDecodingError], - }, - clientInfoEmptyError: { - code: clientInfoEmptyError, - desc: ClientAuthErrorMessages[clientInfoEmptyError], - }, - tokenParsingError: { - code: tokenParsingError, - desc: ClientAuthErrorMessages[tokenParsingError], - }, - nullOrEmptyToken: { - code: nullOrEmptyToken, - desc: ClientAuthErrorMessages[nullOrEmptyToken], - }, - endpointResolutionError: { - code: endpointResolutionError, - desc: ClientAuthErrorMessages[endpointResolutionError], - }, - networkError: { - code: networkError, - desc: ClientAuthErrorMessages[networkError], - }, - unableToGetOpenidConfigError: { - code: openIdConfigError, - desc: ClientAuthErrorMessages[openIdConfigError], - }, - hashNotDeserialized: { - code: hashNotDeserialized, - desc: ClientAuthErrorMessages[hashNotDeserialized], - }, - invalidStateError: { - code: invalidState, - desc: ClientAuthErrorMessages[invalidState], - }, - stateMismatchError: { - code: stateMismatch, - desc: ClientAuthErrorMessages[stateMismatch], - }, - stateNotFoundError: { - code: stateNotFound, - desc: ClientAuthErrorMessages[stateNotFound], - }, - nonceMismatchError: { - code: nonceMismatch, - desc: ClientAuthErrorMessages[nonceMismatch], - }, - authTimeNotFoundError: { - code: authTimeNotFound, - desc: ClientAuthErrorMessages[authTimeNotFound], - }, - maxAgeTranspired: { - code: maxAgeTranspired, - desc: ClientAuthErrorMessages[maxAgeTranspired], - }, - multipleMatchingTokens: { - code: multipleMatchingTokens, - desc: ClientAuthErrorMessages[multipleMatchingTokens], - }, - multipleMatchingAccounts: { - code: multipleMatchingAccounts, - desc: ClientAuthErrorMessages[multipleMatchingAccounts], - }, - multipleMatchingAppMetadata: { - code: multipleMatchingAppMetadata, - desc: ClientAuthErrorMessages[multipleMatchingAppMetadata], - }, - tokenRequestCannotBeMade: { - code: requestCannotBeMade, - desc: ClientAuthErrorMessages[requestCannotBeMade], - }, - removeEmptyScopeError: { - code: cannotRemoveEmptyScope, - desc: ClientAuthErrorMessages[cannotRemoveEmptyScope], - }, - appendScopeSetError: { - code: cannotAppendScopeSet, - desc: ClientAuthErrorMessages[cannotAppendScopeSet], - }, - emptyInputScopeSetError: { - code: emptyInputScopeSet, - desc: ClientAuthErrorMessages[emptyInputScopeSet], - }, - DeviceCodePollingCancelled: { - code: deviceCodePollingCancelled, - desc: ClientAuthErrorMessages[deviceCodePollingCancelled], - }, - DeviceCodeExpired: { - code: deviceCodeExpired, - desc: ClientAuthErrorMessages[deviceCodeExpired], - }, - DeviceCodeUnknownError: { - code: deviceCodeUnknownError, - desc: ClientAuthErrorMessages[deviceCodeUnknownError], - }, - NoAccountInSilentRequest: { - code: noAccountInSilentRequest, - desc: ClientAuthErrorMessages[noAccountInSilentRequest], - }, - invalidCacheRecord: { - code: invalidCacheRecord, - desc: ClientAuthErrorMessages[invalidCacheRecord], - }, - invalidCacheEnvironment: { - code: invalidCacheEnvironment, - desc: ClientAuthErrorMessages[invalidCacheEnvironment], - }, - noAccountFound: { - code: noAccountFound, - desc: ClientAuthErrorMessages[noAccountFound], - }, - noCryptoObj: { - code: noCryptoObject, - desc: ClientAuthErrorMessages[noCryptoObject], - }, - unexpectedCredentialType: { - code: unexpectedCredentialType, - desc: ClientAuthErrorMessages[unexpectedCredentialType], - }, - invalidAssertion: { - code: invalidAssertion, - desc: ClientAuthErrorMessages[invalidAssertion], - }, - invalidClientCredential: { - code: invalidClientCredential, - desc: ClientAuthErrorMessages[invalidClientCredential], - }, - tokenRefreshRequired: { - code: tokenRefreshRequired, - desc: ClientAuthErrorMessages[tokenRefreshRequired], - }, - userTimeoutReached: { - code: userTimeoutReached, - desc: ClientAuthErrorMessages[userTimeoutReached], - }, - tokenClaimsRequired: { - code: tokenClaimsCnfRequiredForSignedJwt, - desc: ClientAuthErrorMessages[tokenClaimsCnfRequiredForSignedJwt], - }, - noAuthorizationCodeFromServer: { - code: authorizationCodeMissingFromServerResponse, - desc: ClientAuthErrorMessages[authorizationCodeMissingFromServerResponse], - }, - bindingKeyNotRemovedError: { - code: bindingKeyNotRemoved, - desc: ClientAuthErrorMessages[bindingKeyNotRemoved], - }, - logoutNotSupported: { - code: endSessionEndpointNotSupported, - desc: ClientAuthErrorMessages[endSessionEndpointNotSupported], - }, - keyIdMissing: { - code: keyIdMissing, - desc: ClientAuthErrorMessages[keyIdMissing], - }, - noNetworkConnectivity: { - code: noNetworkConnectivity, - desc: ClientAuthErrorMessages[noNetworkConnectivity], - }, - userCanceledError: { - code: userCanceled, - desc: ClientAuthErrorMessages[userCanceled], - }, - missingTenantIdError: { - code: missingTenantIdError, - desc: ClientAuthErrorMessages[missingTenantIdError], - }, - nestedAppAuthBridgeDisabled: { - code: nestedAppAuthBridgeDisabled, - desc: ClientAuthErrorMessages[nestedAppAuthBridgeDisabled], - }, -}; -/** - * Error thrown when there is an error in the client code running on the browser. - */ -class ClientAuthError extends AuthError { - constructor(errorCode, additionalMessage) { - super(errorCode, additionalMessage - ? `${ClientAuthErrorMessages[errorCode]}: ${additionalMessage}` - : ClientAuthErrorMessages[errorCode]); - this.name = "ClientAuthError"; - Object.setPrototypeOf(this, ClientAuthError.prototype); - } -} -function createClientAuthError(errorCode, additionalMessage) { - return new ClientAuthError(errorCode, additionalMessage); -} - -/*! @azure/msal-common v14.16.1 2025-08-05 */ - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -const DEFAULT_CRYPTO_IMPLEMENTATION = { - createNewGuid: () => { - throw createClientAuthError(methodNotImplemented); - }, - base64Decode: () => { - throw createClientAuthError(methodNotImplemented); - }, - base64Encode: () => { - throw createClientAuthError(methodNotImplemented); - }, - base64UrlEncode: () => { - throw createClientAuthError(methodNotImplemented); - }, - encodeKid: () => { - throw createClientAuthError(methodNotImplemented); - }, - async getPublicKeyThumbprint() { - throw createClientAuthError(methodNotImplemented); - }, - async removeTokenBindingKey() { - throw createClientAuthError(methodNotImplemented); - }, - async clearKeystore() { - throw createClientAuthError(methodNotImplemented); - }, - async signJwt() { - throw createClientAuthError(methodNotImplemented); - }, - async hashString() { - throw createClientAuthError(methodNotImplemented); - }, -}; - -/*! @azure/msal-common v14.16.1 2025-08-05 */ - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * Log message level. - */ -exports.LogLevel = void 0; -(function (LogLevel) { - LogLevel[LogLevel["Error"] = 0] = "Error"; - LogLevel[LogLevel["Warning"] = 1] = "Warning"; - LogLevel[LogLevel["Info"] = 2] = "Info"; - LogLevel[LogLevel["Verbose"] = 3] = "Verbose"; - LogLevel[LogLevel["Trace"] = 4] = "Trace"; -})(exports.LogLevel || (exports.LogLevel = {})); -/** - * Class which facilitates logging of messages to a specific place. - */ -class Logger { - constructor(loggerOptions, packageName, packageVersion) { - // Current log level, defaults to info. - this.level = exports.LogLevel.Info; - const defaultLoggerCallback = () => { - return; - }; - const setLoggerOptions = loggerOptions || Logger.createDefaultLoggerOptions(); - this.localCallback = - setLoggerOptions.loggerCallback || defaultLoggerCallback; - this.piiLoggingEnabled = setLoggerOptions.piiLoggingEnabled || false; - this.level = - typeof setLoggerOptions.logLevel === "number" - ? setLoggerOptions.logLevel - : exports.LogLevel.Info; - this.correlationId = - setLoggerOptions.correlationId || Constants$1.EMPTY_STRING; - this.packageName = packageName || Constants$1.EMPTY_STRING; - this.packageVersion = packageVersion || Constants$1.EMPTY_STRING; - } - static createDefaultLoggerOptions() { - return { - loggerCallback: () => { - // allow users to not set loggerCallback - }, - piiLoggingEnabled: false, - logLevel: exports.LogLevel.Info, - }; - } - /** - * Create new Logger with existing configurations. - */ - clone(packageName, packageVersion, correlationId) { - return new Logger({ - loggerCallback: this.localCallback, - piiLoggingEnabled: this.piiLoggingEnabled, - logLevel: this.level, - correlationId: correlationId || this.correlationId, - }, packageName, packageVersion); - } - /** - * Log message with required options. - */ - logMessage(logMessage, options) { - if (options.logLevel > this.level || - (!this.piiLoggingEnabled && options.containsPii)) { - return; - } - const timestamp = new Date().toUTCString(); - // Add correlationId to logs if set, correlationId provided on log messages take precedence - const logHeader = `[${timestamp}] : [${options.correlationId || this.correlationId || ""}]`; - const log = `${logHeader} : ${this.packageName}@${this.packageVersion} : ${exports.LogLevel[options.logLevel]} - ${logMessage}`; - // debug(`msal:${LogLevel[options.logLevel]}${options.containsPii ? "-Pii": Constants.EMPTY_STRING}${options.context ? `:${options.context}` : Constants.EMPTY_STRING}`)(logMessage); - this.executeCallback(options.logLevel, log, options.containsPii || false); - } - /** - * Execute callback with message. - */ - executeCallback(level, message, containsPii) { - if (this.localCallback) { - this.localCallback(level, message, containsPii); - } - } - /** - * Logs error messages. - */ - error(message, correlationId) { - this.logMessage(message, { - logLevel: exports.LogLevel.Error, - containsPii: false, - correlationId: correlationId || Constants$1.EMPTY_STRING, - }); - } - /** - * Logs error messages with PII. - */ - errorPii(message, correlationId) { - this.logMessage(message, { - logLevel: exports.LogLevel.Error, - containsPii: true, - correlationId: correlationId || Constants$1.EMPTY_STRING, - }); - } - /** - * Logs warning messages. - */ - warning(message, correlationId) { - this.logMessage(message, { - logLevel: exports.LogLevel.Warning, - containsPii: false, - correlationId: correlationId || Constants$1.EMPTY_STRING, - }); - } - /** - * Logs warning messages with PII. - */ - warningPii(message, correlationId) { - this.logMessage(message, { - logLevel: exports.LogLevel.Warning, - containsPii: true, - correlationId: correlationId || Constants$1.EMPTY_STRING, - }); - } - /** - * Logs info messages. - */ - info(message, correlationId) { - this.logMessage(message, { - logLevel: exports.LogLevel.Info, - containsPii: false, - correlationId: correlationId || Constants$1.EMPTY_STRING, - }); - } - /** - * Logs info messages with PII. - */ - infoPii(message, correlationId) { - this.logMessage(message, { - logLevel: exports.LogLevel.Info, - containsPii: true, - correlationId: correlationId || Constants$1.EMPTY_STRING, - }); - } - /** - * Logs verbose messages. - */ - verbose(message, correlationId) { - this.logMessage(message, { - logLevel: exports.LogLevel.Verbose, - containsPii: false, - correlationId: correlationId || Constants$1.EMPTY_STRING, - }); - } - /** - * Logs verbose messages with PII. - */ - verbosePii(message, correlationId) { - this.logMessage(message, { - logLevel: exports.LogLevel.Verbose, - containsPii: true, - correlationId: correlationId || Constants$1.EMPTY_STRING, - }); - } - /** - * Logs trace messages. - */ - trace(message, correlationId) { - this.logMessage(message, { - logLevel: exports.LogLevel.Trace, - containsPii: false, - correlationId: correlationId || Constants$1.EMPTY_STRING, - }); - } - /** - * Logs trace messages with PII. - */ - tracePii(message, correlationId) { - this.logMessage(message, { - logLevel: exports.LogLevel.Trace, - containsPii: true, - correlationId: correlationId || Constants$1.EMPTY_STRING, - }); - } - /** - * Returns whether PII Logging is enabled or not. - */ - isPiiLoggingEnabled() { - return this.piiLoggingEnabled || false; - } -} - -/*! @azure/msal-common v14.16.1 2025-08-05 */ -/* eslint-disable header/header */ -const name$1 = "@azure/msal-common"; -const version$1 = "14.16.1"; - -/*! @azure/msal-common v14.16.1 2025-08-05 */ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -const AzureCloudInstance = { - // AzureCloudInstance is not specified. - None: "none", - // Microsoft Azure public cloud - AzurePublic: "https://login.microsoftonline.com", - // Microsoft PPE - AzurePpe: "https://login.windows-ppe.net", - // Microsoft Chinese national/regional cloud - AzureChina: "https://login.chinacloudapi.cn", - // Microsoft German national/regional cloud ("Black Forest") - AzureGermany: "https://login.microsoftonline.de", - // US Government cloud - AzureUsGovernment: "https://login.microsoftonline.us", -}; - -/*! @azure/msal-common v14.16.1 2025-08-05 */ - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * Extract token by decoding the rawToken - * - * @param encodedToken - */ -function extractTokenClaims(encodedToken, base64Decode) { - const jswPayload = getJWSPayload(encodedToken); - // token will be decoded to get the username - try { - // base64Decode() should throw an error if there is an issue - const base64Decoded = base64Decode(jswPayload); - return JSON.parse(base64Decoded); - } - catch (err) { - throw createClientAuthError(tokenParsingError); - } -} -/** - * decode a JWT - * - * @param authToken - */ -function getJWSPayload(authToken) { - if (!authToken) { - throw createClientAuthError(nullOrEmptyToken); - } - const tokenPartsRegex = /^([^\.\s]*)\.([^\.\s]+)\.([^\.\s]*)$/; - const matches = tokenPartsRegex.exec(authToken); - if (!matches || matches.length < 4) { - throw createClientAuthError(tokenParsingError); - } - /** - * const crackedToken = { - * header: matches[1], - * JWSPayload: matches[2], - * JWSSig: matches[3], - * }; - */ - return matches[2]; -} -/** - * Determine if the token's max_age has transpired - */ -function checkMaxAge(authTime, maxAge) { - /* - * per https://openid.net/specs/openid-connect-core-1_0.html#AuthRequest - * To force an immediate re-authentication: If an app requires that a user re-authenticate prior to access, - * provide a value of 0 for the max_age parameter and the AS will force a fresh login. - */ - const fiveMinuteSkew = 300000; // five minutes in milliseconds - if (maxAge === 0 || Date.now() - fiveMinuteSkew > authTime + maxAge) { - throw createClientAuthError(maxAgeTranspired); - } -} - -/*! @azure/msal-common v14.16.1 2025-08-05 */ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * Utility functions for managing date and time operations. - */ -/** - * return the current time in Unix time (seconds). - */ -function nowSeconds() { - // Date.getTime() returns in milliseconds. - return Math.round(new Date().getTime() / 1000.0); -} -/** - * check if a token is expired based on given UTC time in seconds. - * @param expiresOn - */ -function isTokenExpired(expiresOn, offset) { - // check for access token expiry - const expirationSec = Number(expiresOn) || 0; - const offsetCurrentTimeSec = nowSeconds() + offset; - // If current time + offset is greater than token expiration time, then token is expired. - return offsetCurrentTimeSec > expirationSec; -} -/** - * If the current time is earlier than the time that a token was cached at, we must discard the token - * i.e. The system clock was turned back after acquiring the cached token - * @param cachedAt - * @param offset - */ -function wasClockTurnedBack(cachedAt) { - const cachedAtSec = Number(cachedAt); - return cachedAtSec > nowSeconds(); -} -/** - * Waits for t number of milliseconds - * @param t number - * @param value T - */ -function delay(t, value) { - return new Promise((resolve) => setTimeout(() => resolve(value), t)); -} - -/*! @azure/msal-common v14.16.1 2025-08-05 */ - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * Cache Key: ------- - * IdToken Example: uid.utid-login.microsoftonline.com-idtoken-app_client_id-contoso.com - * AccessToken Example: uid.utid-login.microsoftonline.com-accesstoken-app_client_id-contoso.com-scope1 scope2--pop - * RefreshToken Example: uid.utid-login.microsoftonline.com-refreshtoken-1-contoso.com - * @param credentialEntity - * @returns - */ -function generateCredentialKey(credentialEntity) { - const credentialKey = [ - generateAccountId(credentialEntity), - generateCredentialId(credentialEntity), - generateTarget(credentialEntity), - generateClaimsHash(credentialEntity), - generateScheme(credentialEntity), - ]; - return credentialKey.join(Separators.CACHE_KEY_SEPARATOR).toLowerCase(); -} -/** - * Create IdTokenEntity - * @param homeAccountId - * @param authenticationResult - * @param clientId - * @param authority - */ -function createIdTokenEntity(homeAccountId, environment, idToken, clientId, tenantId) { - const idTokenEntity = { - credentialType: CredentialType.ID_TOKEN, - homeAccountId: homeAccountId, - environment: environment, - clientId: clientId, - secret: idToken, - realm: tenantId, - }; - return idTokenEntity; -} -/** - * Create AccessTokenEntity - * @param homeAccountId - * @param environment - * @param accessToken - * @param clientId - * @param tenantId - * @param scopes - * @param expiresOn - * @param extExpiresOn - */ -function createAccessTokenEntity(homeAccountId, environment, accessToken, clientId, tenantId, scopes, expiresOn, extExpiresOn, base64Decode, refreshOn, tokenType, userAssertionHash, keyId, requestedClaims, requestedClaimsHash) { - const atEntity = { - homeAccountId: homeAccountId, - credentialType: CredentialType.ACCESS_TOKEN, - secret: accessToken, - cachedAt: nowSeconds().toString(), - expiresOn: expiresOn.toString(), - extendedExpiresOn: extExpiresOn.toString(), - environment: environment, - clientId: clientId, - realm: tenantId, - target: scopes, - tokenType: tokenType || AuthenticationScheme.BEARER, - }; - if (userAssertionHash) { - atEntity.userAssertionHash = userAssertionHash; - } - if (refreshOn) { - atEntity.refreshOn = refreshOn.toString(); - } - if (requestedClaims) { - atEntity.requestedClaims = requestedClaims; - atEntity.requestedClaimsHash = requestedClaimsHash; - } - /* - * Create Access Token With Auth Scheme instead of regular access token - * Cast to lower to handle "bearer" from ADFS - */ - if (atEntity.tokenType?.toLowerCase() !== - AuthenticationScheme.BEARER.toLowerCase()) { - atEntity.credentialType = CredentialType.ACCESS_TOKEN_WITH_AUTH_SCHEME; - switch (atEntity.tokenType) { - case AuthenticationScheme.POP: - // Make sure keyId is present and add it to credential - const tokenClaims = extractTokenClaims(accessToken, base64Decode); - if (!tokenClaims?.cnf?.kid) { - throw createClientAuthError(tokenClaimsCnfRequiredForSignedJwt); - } - atEntity.keyId = tokenClaims.cnf.kid; - break; - case AuthenticationScheme.SSH: - atEntity.keyId = keyId; - } - } - return atEntity; -} -/** - * Create RefreshTokenEntity - * @param homeAccountId - * @param authenticationResult - * @param clientId - * @param authority - */ -function createRefreshTokenEntity(homeAccountId, environment, refreshToken, clientId, familyId, userAssertionHash, expiresOn) { - const rtEntity = { - credentialType: CredentialType.REFRESH_TOKEN, - homeAccountId: homeAccountId, - environment: environment, - clientId: clientId, - secret: refreshToken, - }; - if (userAssertionHash) { - rtEntity.userAssertionHash = userAssertionHash; - } - if (familyId) { - rtEntity.familyId = familyId; - } - if (expiresOn) { - rtEntity.expiresOn = expiresOn.toString(); - } - return rtEntity; -} -function isCredentialEntity(entity) { - return (entity.hasOwnProperty("homeAccountId") && - entity.hasOwnProperty("environment") && - entity.hasOwnProperty("credentialType") && - entity.hasOwnProperty("clientId") && - entity.hasOwnProperty("secret")); -} -/** - * Validates an entity: checks for all expected params - * @param entity - */ -function isAccessTokenEntity(entity) { - if (!entity) { - return false; - } - return (isCredentialEntity(entity) && - entity.hasOwnProperty("realm") && - entity.hasOwnProperty("target") && - (entity["credentialType"] === CredentialType.ACCESS_TOKEN || - entity["credentialType"] === - CredentialType.ACCESS_TOKEN_WITH_AUTH_SCHEME)); -} -/** - * Validates an entity: checks for all expected params - * @param entity - */ -function isIdTokenEntity(entity) { - if (!entity) { - return false; - } - return (isCredentialEntity(entity) && - entity.hasOwnProperty("realm") && - entity["credentialType"] === CredentialType.ID_TOKEN); -} -/** - * Validates an entity: checks for all expected params - * @param entity - */ -function isRefreshTokenEntity(entity) { - if (!entity) { - return false; - } - return (isCredentialEntity(entity) && - entity["credentialType"] === CredentialType.REFRESH_TOKEN); -} -/** - * Generate Account Id key component as per the schema: - - */ -function generateAccountId(credentialEntity) { - const accountId = [ - credentialEntity.homeAccountId, - credentialEntity.environment, - ]; - return accountId.join(Separators.CACHE_KEY_SEPARATOR).toLowerCase(); -} -/** - * Generate Credential Id key component as per the schema: -- - */ -function generateCredentialId(credentialEntity) { - const clientOrFamilyId = credentialEntity.credentialType === CredentialType.REFRESH_TOKEN - ? credentialEntity.familyId || credentialEntity.clientId - : credentialEntity.clientId; - const credentialId = [ - credentialEntity.credentialType, - clientOrFamilyId, - credentialEntity.realm || "", - ]; - return credentialId.join(Separators.CACHE_KEY_SEPARATOR).toLowerCase(); -} -/** - * Generate target key component as per schema: - */ -function generateTarget(credentialEntity) { - return (credentialEntity.target || "").toLowerCase(); -} -/** - * Generate requested claims key component as per schema: - */ -function generateClaimsHash(credentialEntity) { - return (credentialEntity.requestedClaimsHash || "").toLowerCase(); -} -/** - * Generate scheme key componenet as per schema: - */ -function generateScheme(credentialEntity) { - /* - * PoP Tokens and SSH certs include scheme in cache key - * Cast to lowercase to handle "bearer" from ADFS - */ - return credentialEntity.tokenType && - credentialEntity.tokenType.toLowerCase() !== - AuthenticationScheme.BEARER.toLowerCase() - ? credentialEntity.tokenType.toLowerCase() - : ""; -} -/** - * validates if a given cache entry is "Telemetry", parses - * @param key - * @param entity - */ -function isServerTelemetryEntity(key, entity) { - const validateKey = key.indexOf(SERVER_TELEM_CONSTANTS.CACHE_KEY) === 0; - let validateEntity = true; - if (entity) { - validateEntity = - entity.hasOwnProperty("failedRequests") && - entity.hasOwnProperty("errors") && - entity.hasOwnProperty("cacheHits"); - } - return validateKey && validateEntity; -} -/** - * validates if a given cache entry is "Throttling", parses - * @param key - * @param entity - */ -function isThrottlingEntity(key, entity) { - let validateKey = false; - if (key) { - validateKey = key.indexOf(ThrottlingConstants.THROTTLING_PREFIX) === 0; - } - let validateEntity = true; - if (entity) { - validateEntity = entity.hasOwnProperty("throttleTime"); - } - return validateKey && validateEntity; -} -/** - * Generate AppMetadata Cache Key as per the schema: appmetadata-- - */ -function generateAppMetadataKey({ environment, clientId, }) { - const appMetaDataKeyArray = [ - APP_METADATA, - environment, - clientId, - ]; - return appMetaDataKeyArray - .join(Separators.CACHE_KEY_SEPARATOR) - .toLowerCase(); -} -/* - * Validates an entity: checks for all expected params - * @param entity - */ -function isAppMetadataEntity(key, entity) { - if (!entity) { - return false; - } - return (key.indexOf(APP_METADATA) === 0 && - entity.hasOwnProperty("clientId") && - entity.hasOwnProperty("environment")); -} -/** - * Validates an entity: checks for all expected params - * @param entity - */ -function isAuthorityMetadataEntity(key, entity) { - if (!entity) { - return false; - } - return (key.indexOf(AUTHORITY_METADATA_CONSTANTS.CACHE_KEY) === 0 && - entity.hasOwnProperty("aliases") && - entity.hasOwnProperty("preferred_cache") && - entity.hasOwnProperty("preferred_network") && - entity.hasOwnProperty("canonical_authority") && - entity.hasOwnProperty("authorization_endpoint") && - entity.hasOwnProperty("token_endpoint") && - entity.hasOwnProperty("issuer") && - entity.hasOwnProperty("aliasesFromNetwork") && - entity.hasOwnProperty("endpointsFromNetwork") && - entity.hasOwnProperty("expiresAt") && - entity.hasOwnProperty("jwks_uri")); -} -/** - * Reset the exiresAt value - */ -function generateAuthorityMetadataExpiresAt() { - return (nowSeconds() + - AUTHORITY_METADATA_CONSTANTS.REFRESH_TIME_SECONDS); -} -function updateAuthorityEndpointMetadata(authorityMetadata, updatedValues, fromNetwork) { - authorityMetadata.authorization_endpoint = - updatedValues.authorization_endpoint; - authorityMetadata.token_endpoint = updatedValues.token_endpoint; - authorityMetadata.end_session_endpoint = updatedValues.end_session_endpoint; - authorityMetadata.issuer = updatedValues.issuer; - authorityMetadata.endpointsFromNetwork = fromNetwork; - authorityMetadata.jwks_uri = updatedValues.jwks_uri; -} -function updateCloudDiscoveryMetadata(authorityMetadata, updatedValues, fromNetwork) { - authorityMetadata.aliases = updatedValues.aliases; - authorityMetadata.preferred_cache = updatedValues.preferred_cache; - authorityMetadata.preferred_network = updatedValues.preferred_network; - authorityMetadata.aliasesFromNetwork = fromNetwork; -} -/** - * Returns whether or not the data needs to be refreshed - */ -function isAuthorityMetadataExpired(metadata) { - return metadata.expiresAt <= nowSeconds(); -} - -/*! @azure/msal-common v14.16.1 2025-08-05 */ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -const redirectUriEmpty = "redirect_uri_empty"; -const claimsRequestParsingError = "claims_request_parsing_error"; -const authorityUriInsecure = "authority_uri_insecure"; -const urlParseError = "url_parse_error"; -const urlEmptyError = "empty_url_error"; -const emptyInputScopesError = "empty_input_scopes_error"; -const invalidPromptValue = "invalid_prompt_value"; -const invalidClaims = "invalid_claims"; -const tokenRequestEmpty = "token_request_empty"; -const logoutRequestEmpty = "logout_request_empty"; -const invalidCodeChallengeMethod = "invalid_code_challenge_method"; -const pkceParamsMissing = "pkce_params_missing"; -const invalidCloudDiscoveryMetadata = "invalid_cloud_discovery_metadata"; -const invalidAuthorityMetadata = "invalid_authority_metadata"; -const untrustedAuthority = "untrusted_authority"; -const missingSshJwk = "missing_ssh_jwk"; -const missingSshKid = "missing_ssh_kid"; -const missingNonceAuthenticationHeader = "missing_nonce_authentication_header"; -const invalidAuthenticationHeader = "invalid_authentication_header"; -const cannotSetOIDCOptions = "cannot_set_OIDCOptions"; -const cannotAllowNativeBroker = "cannot_allow_native_broker"; -const authorityMismatch = "authority_mismatch"; - -var ClientConfigurationErrorCodes = /*#__PURE__*/Object.freeze({ - __proto__: null, - authorityMismatch: authorityMismatch, - authorityUriInsecure: authorityUriInsecure, - cannotAllowNativeBroker: cannotAllowNativeBroker, - cannotSetOIDCOptions: cannotSetOIDCOptions, - claimsRequestParsingError: claimsRequestParsingError, - emptyInputScopesError: emptyInputScopesError, - invalidAuthenticationHeader: invalidAuthenticationHeader, - invalidAuthorityMetadata: invalidAuthorityMetadata, - invalidClaims: invalidClaims, - invalidCloudDiscoveryMetadata: invalidCloudDiscoveryMetadata, - invalidCodeChallengeMethod: invalidCodeChallengeMethod, - invalidPromptValue: invalidPromptValue, - logoutRequestEmpty: logoutRequestEmpty, - missingNonceAuthenticationHeader: missingNonceAuthenticationHeader, - missingSshJwk: missingSshJwk, - missingSshKid: missingSshKid, - pkceParamsMissing: pkceParamsMissing, - redirectUriEmpty: redirectUriEmpty, - tokenRequestEmpty: tokenRequestEmpty, - untrustedAuthority: untrustedAuthority, - urlEmptyError: urlEmptyError, - urlParseError: urlParseError -}); - -/*! @azure/msal-common v14.16.1 2025-08-05 */ - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -const ClientConfigurationErrorMessages = { - [redirectUriEmpty]: "A redirect URI is required for all calls, and none has been set.", - [claimsRequestParsingError]: "Could not parse the given claims request object.", - [authorityUriInsecure]: "Authority URIs must use https. Please see here for valid authority configuration options: https://docs.microsoft.com/en-us/azure/active-directory/develop/msal-js-initializing-client-applications#configuration-options", - [urlParseError]: "URL could not be parsed into appropriate segments.", - [urlEmptyError]: "URL was empty or null.", - [emptyInputScopesError]: "Scopes cannot be passed as null, undefined or empty array because they are required to obtain an access token.", - [invalidPromptValue]: "Please see here for valid configuration options: https://azuread.github.io/microsoft-authentication-library-for-js/ref/modules/_azure_msal_common.html#commonauthorizationurlrequest", - [invalidClaims]: "Given claims parameter must be a stringified JSON object.", - [tokenRequestEmpty]: "Token request was empty and not found in cache.", - [logoutRequestEmpty]: "The logout request was null or undefined.", - [invalidCodeChallengeMethod]: 'code_challenge_method passed is invalid. Valid values are "plain" and "S256".', - [pkceParamsMissing]: "Both params: code_challenge and code_challenge_method are to be passed if to be sent in the request", - [invalidCloudDiscoveryMetadata]: "Invalid cloudDiscoveryMetadata provided. Must be a stringified JSON object containing tenant_discovery_endpoint and metadata fields", - [invalidAuthorityMetadata]: "Invalid authorityMetadata provided. Must by a stringified JSON object containing authorization_endpoint, token_endpoint, issuer fields.", - [untrustedAuthority]: "The provided authority is not a trusted authority. Please include this authority in the knownAuthorities config parameter.", - [missingSshJwk]: "Missing sshJwk in SSH certificate request. A stringified JSON Web Key is required when using the SSH authentication scheme.", - [missingSshKid]: "Missing sshKid in SSH certificate request. A string that uniquely identifies the public SSH key is required when using the SSH authentication scheme.", - [missingNonceAuthenticationHeader]: "Unable to find an authentication header containing server nonce. Either the Authentication-Info or WWW-Authenticate headers must be present in order to obtain a server nonce.", - [invalidAuthenticationHeader]: "Invalid authentication header provided", - [cannotSetOIDCOptions]: "Cannot set OIDCOptions parameter. Please change the protocol mode to OIDC or use a non-Microsoft authority.", - [cannotAllowNativeBroker]: "Cannot set allowNativeBroker parameter to true when not in AAD protocol mode.", - [authorityMismatch]: "Authority mismatch error. Authority provided in login request or PublicClientApplication config does not match the environment of the provided account. Please use a matching account or make an interactive request to login to this authority.", -}; -/** - * ClientConfigurationErrorMessage class containing string constants used by error codes and messages. - * @deprecated Use ClientConfigurationErrorCodes instead - */ -const ClientConfigurationErrorMessage = { - redirectUriNotSet: { - code: redirectUriEmpty, - desc: ClientConfigurationErrorMessages[redirectUriEmpty], - }, - claimsRequestParsingError: { - code: claimsRequestParsingError, - desc: ClientConfigurationErrorMessages[claimsRequestParsingError], - }, - authorityUriInsecure: { - code: authorityUriInsecure, - desc: ClientConfigurationErrorMessages[authorityUriInsecure], - }, - urlParseError: { - code: urlParseError, - desc: ClientConfigurationErrorMessages[urlParseError], - }, - urlEmptyError: { - code: urlEmptyError, - desc: ClientConfigurationErrorMessages[urlEmptyError], - }, - emptyScopesError: { - code: emptyInputScopesError, - desc: ClientConfigurationErrorMessages[emptyInputScopesError], - }, - invalidPrompt: { - code: invalidPromptValue, - desc: ClientConfigurationErrorMessages[invalidPromptValue], - }, - invalidClaimsRequest: { - code: invalidClaims, - desc: ClientConfigurationErrorMessages[invalidClaims], - }, - tokenRequestEmptyError: { - code: tokenRequestEmpty, - desc: ClientConfigurationErrorMessages[tokenRequestEmpty], - }, - logoutRequestEmptyError: { - code: logoutRequestEmpty, - desc: ClientConfigurationErrorMessages[logoutRequestEmpty], - }, - invalidCodeChallengeMethod: { - code: invalidCodeChallengeMethod, - desc: ClientConfigurationErrorMessages[invalidCodeChallengeMethod], - }, - invalidCodeChallengeParams: { - code: pkceParamsMissing, - desc: ClientConfigurationErrorMessages[pkceParamsMissing], - }, - invalidCloudDiscoveryMetadata: { - code: invalidCloudDiscoveryMetadata, - desc: ClientConfigurationErrorMessages[invalidCloudDiscoveryMetadata], - }, - invalidAuthorityMetadata: { - code: invalidAuthorityMetadata, - desc: ClientConfigurationErrorMessages[invalidAuthorityMetadata], - }, - untrustedAuthority: { - code: untrustedAuthority, - desc: ClientConfigurationErrorMessages[untrustedAuthority], - }, - missingSshJwk: { - code: missingSshJwk, - desc: ClientConfigurationErrorMessages[missingSshJwk], - }, - missingSshKid: { - code: missingSshKid, - desc: ClientConfigurationErrorMessages[missingSshKid], - }, - missingNonceAuthenticationHeader: { - code: missingNonceAuthenticationHeader, - desc: ClientConfigurationErrorMessages[missingNonceAuthenticationHeader], - }, - invalidAuthenticationHeader: { - code: invalidAuthenticationHeader, - desc: ClientConfigurationErrorMessages[invalidAuthenticationHeader], - }, - cannotSetOIDCOptions: { - code: cannotSetOIDCOptions, - desc: ClientConfigurationErrorMessages[cannotSetOIDCOptions], - }, - cannotAllowNativeBroker: { - code: cannotAllowNativeBroker, - desc: ClientConfigurationErrorMessages[cannotAllowNativeBroker], - }, - authorityMismatch: { - code: authorityMismatch, - desc: ClientConfigurationErrorMessages[authorityMismatch], - }, -}; -/** - * Error thrown when there is an error in configuration of the MSAL.js library. - */ -class ClientConfigurationError extends AuthError { - constructor(errorCode) { - super(errorCode, ClientConfigurationErrorMessages[errorCode]); - this.name = "ClientConfigurationError"; - Object.setPrototypeOf(this, ClientConfigurationError.prototype); - } -} -function createClientConfigurationError(errorCode) { - return new ClientConfigurationError(errorCode); -} - -/*! @azure/msal-common v14.16.1 2025-08-05 */ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * @hidden - */ -class StringUtils { - /** - * Check if stringified object is empty - * @param strObj - */ - static isEmptyObj(strObj) { - if (strObj) { - try { - const obj = JSON.parse(strObj); - return Object.keys(obj).length === 0; - } - catch (e) { } - } - return true; - } - static startsWith(str, search) { - return str.indexOf(search) === 0; - } - static endsWith(str, search) { - return (str.length >= search.length && - str.lastIndexOf(search) === str.length - search.length); - } - /** - * Parses string into an object. - * - * @param query - */ - static queryStringToObject(query) { - const obj = {}; - const params = query.split("&"); - const decode = (s) => decodeURIComponent(s.replace(/\+/g, " ")); - params.forEach((pair) => { - if (pair.trim()) { - const [key, value] = pair.split(/=(.+)/g, 2); // Split on the first occurence of the '=' character - if (key && value) { - obj[decode(key)] = decode(value); - } - } - }); - return obj; - } - /** - * Trims entries in an array. - * - * @param arr - */ - static trimArrayEntries(arr) { - return arr.map((entry) => entry.trim()); - } - /** - * Removes empty strings from array - * @param arr - */ - static removeEmptyStringsFromArray(arr) { - return arr.filter((entry) => { - return !!entry; - }); - } - /** - * Attempts to parse a string into JSON - * @param str - */ - static jsonParseHelper(str) { - try { - return JSON.parse(str); - } - catch (e) { - return null; - } - } - /** - * Tests if a given string matches a given pattern, with support for wildcards and queries. - * @param pattern Wildcard pattern to string match. Supports "*" for wildcards and "?" for queries - * @param input String to match against - */ - static matchPattern(pattern, input) { - /** - * Wildcard support: https://stackoverflow.com/a/3117248/4888559 - * Queries: replaces "?" in string with escaped "\?" for regex test - */ - // eslint-disable-next-line security/detect-non-literal-regexp - const regex = new RegExp(pattern - .replace(/\\/g, "\\\\") - .replace(/\*/g, "[^ ]*") - .replace(/\?/g, "\\?")); - return regex.test(input); - } -} - -/*! @azure/msal-common v14.16.1 2025-08-05 */ - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * The ScopeSet class creates a set of scopes. Scopes are case-insensitive, unique values, so the Set object in JS makes - * the most sense to implement for this class. All scopes are trimmed and converted to lower case strings in intersection and union functions - * to ensure uniqueness of strings. - */ -class ScopeSet { - constructor(inputScopes) { - // Filter empty string and null/undefined array items - const scopeArr = inputScopes - ? StringUtils.trimArrayEntries([...inputScopes]) - : []; - const filteredInput = scopeArr - ? StringUtils.removeEmptyStringsFromArray(scopeArr) - : []; - // Validate and filter scopes (validate function throws if validation fails) - this.validateInputScopes(filteredInput); - this.scopes = new Set(); // Iterator in constructor not supported by IE11 - filteredInput.forEach((scope) => this.scopes.add(scope)); - } - /** - * Factory method to create ScopeSet from space-delimited string - * @param inputScopeString - * @param appClientId - * @param scopesRequired - */ - static fromString(inputScopeString) { - const scopeString = inputScopeString || Constants$1.EMPTY_STRING; - const inputScopes = scopeString.split(" "); - return new ScopeSet(inputScopes); - } - /** - * Creates the set of scopes to search for in cache lookups - * @param inputScopeString - * @returns - */ - static createSearchScopes(inputScopeString) { - const scopeSet = new ScopeSet(inputScopeString); - if (!scopeSet.containsOnlyOIDCScopes()) { - scopeSet.removeOIDCScopes(); - } - else { - scopeSet.removeScope(Constants$1.OFFLINE_ACCESS_SCOPE); - } - return scopeSet; - } - /** - * Used to validate the scopes input parameter requested by the developer. - * @param {Array} inputScopes - Developer requested permissions. Not all scopes are guaranteed to be included in the access token returned. - * @param {boolean} scopesRequired - Boolean indicating whether the scopes array is required or not - */ - validateInputScopes(inputScopes) { - // Check if scopes are required but not given or is an empty array - if (!inputScopes || inputScopes.length < 1) { - throw createClientConfigurationError(emptyInputScopesError); - } - } - /** - * Check if a given scope is present in this set of scopes. - * @param scope - */ - containsScope(scope) { - const lowerCaseScopes = this.printScopesLowerCase().split(" "); - const lowerCaseScopesSet = new ScopeSet(lowerCaseScopes); - // compare lowercase scopes - return scope - ? lowerCaseScopesSet.scopes.has(scope.toLowerCase()) - : false; - } - /** - * Check if a set of scopes is present in this set of scopes. - * @param scopeSet - */ - containsScopeSet(scopeSet) { - if (!scopeSet || scopeSet.scopes.size <= 0) { - return false; - } - return (this.scopes.size >= scopeSet.scopes.size && - scopeSet.asArray().every((scope) => this.containsScope(scope))); - } - /** - * Check if set of scopes contains only the defaults - */ - containsOnlyOIDCScopes() { - let defaultScopeCount = 0; - OIDC_SCOPES.forEach((defaultScope) => { - if (this.containsScope(defaultScope)) { - defaultScopeCount += 1; - } - }); - return this.scopes.size === defaultScopeCount; - } - /** - * Appends single scope if passed - * @param newScope - */ - appendScope(newScope) { - if (newScope) { - this.scopes.add(newScope.trim()); - } - } - /** - * Appends multiple scopes if passed - * @param newScopes - */ - appendScopes(newScopes) { - try { - newScopes.forEach((newScope) => this.appendScope(newScope)); - } - catch (e) { - throw createClientAuthError(cannotAppendScopeSet); - } - } - /** - * Removes element from set of scopes. - * @param scope - */ - removeScope(scope) { - if (!scope) { - throw createClientAuthError(cannotRemoveEmptyScope); - } - this.scopes.delete(scope.trim()); - } - /** - * Removes default scopes from set of scopes - * Primarily used to prevent cache misses if the default scopes are not returned from the server - */ - removeOIDCScopes() { - OIDC_SCOPES.forEach((defaultScope) => { - this.scopes.delete(defaultScope); - }); - } - /** - * Combines an array of scopes with the current set of scopes. - * @param otherScopes - */ - unionScopeSets(otherScopes) { - if (!otherScopes) { - throw createClientAuthError(emptyInputScopeSet); - } - const unionScopes = new Set(); // Iterator in constructor not supported in IE11 - otherScopes.scopes.forEach((scope) => unionScopes.add(scope.toLowerCase())); - this.scopes.forEach((scope) => unionScopes.add(scope.toLowerCase())); - return unionScopes; - } - /** - * Check if scopes intersect between this set and another. - * @param otherScopes - */ - intersectingScopeSets(otherScopes) { - if (!otherScopes) { - throw createClientAuthError(emptyInputScopeSet); - } - // Do not allow OIDC scopes to be the only intersecting scopes - if (!otherScopes.containsOnlyOIDCScopes()) { - otherScopes.removeOIDCScopes(); - } - const unionScopes = this.unionScopeSets(otherScopes); - const sizeOtherScopes = otherScopes.getScopeCount(); - const sizeThisScopes = this.getScopeCount(); - const sizeUnionScopes = unionScopes.size; - return sizeUnionScopes < sizeThisScopes + sizeOtherScopes; - } - /** - * Returns size of set of scopes. - */ - getScopeCount() { - return this.scopes.size; - } - /** - * Returns the scopes as an array of string values - */ - asArray() { - const array = []; - this.scopes.forEach((val) => array.push(val)); - return array; - } - /** - * Prints scopes into a space-delimited string - */ - printScopes() { - if (this.scopes) { - const scopeArr = this.asArray(); - return scopeArr.join(" "); - } - return Constants$1.EMPTY_STRING; - } - /** - * Prints scopes into a space-delimited lower-case string (used for caching) - */ - printScopesLowerCase() { - return this.printScopes().toLowerCase(); - } -} - -/*! @azure/msal-common v14.16.1 2025-08-05 */ - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * Function to build a client info object from server clientInfo string - * @param rawClientInfo - * @param crypto - */ -function buildClientInfo(rawClientInfo, base64Decode) { - if (!rawClientInfo) { - throw createClientAuthError(clientInfoEmptyError); - } - try { - const decodedClientInfo = base64Decode(rawClientInfo); - return JSON.parse(decodedClientInfo); - } - catch (e) { - throw createClientAuthError(clientInfoDecodingError); - } -} -/** - * Function to build a client info object from cached homeAccountId string - * @param homeAccountId - */ -function buildClientInfoFromHomeAccountId(homeAccountId) { - if (!homeAccountId) { - throw createClientAuthError(clientInfoDecodingError); - } - const clientInfoParts = homeAccountId.split(Separators.CLIENT_INFO_SEPARATOR, 2); - return { - uid: clientInfoParts[0], - utid: clientInfoParts.length < 2 - ? Constants$1.EMPTY_STRING - : clientInfoParts[1], - }; -} - -/*! @azure/msal-common v14.16.1 2025-08-05 */ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * Returns true if tenantId matches the utid portion of homeAccountId - * @param tenantId - * @param homeAccountId - * @returns - */ -function tenantIdMatchesHomeTenant(tenantId, homeAccountId) { - return (!!tenantId && - !!homeAccountId && - tenantId === homeAccountId.split(".")[1]); -} -/** - * Build tenant profile - * @param homeAccountId - Home account identifier for this account object - * @param localAccountId - Local account identifer for this account object - * @param tenantId - Full tenant or organizational id that this account belongs to - * @param idTokenClaims - Claims from the ID token - * @returns - */ -function buildTenantProfile(homeAccountId, localAccountId, tenantId, idTokenClaims) { - if (idTokenClaims) { - const { oid, sub, tid, name, tfp, acr } = idTokenClaims; - /** - * Since there is no way to determine if the authority is AAD or B2C, we exhaust all the possible claims that can serve as tenant ID with the following precedence: - * tid - TenantID claim that identifies the tenant that issued the token in AAD. Expected in all AAD ID tokens, not present in B2C ID Tokens. - * tfp - Trust Framework Policy claim that identifies the policy that was used to authenticate the user. Functions as tenant for B2C scenarios. - * acr - Authentication Context Class Reference claim used only with older B2C policies. Fallback in case tfp is not present, but likely won't be present anyway. - */ - const tenantId = tid || tfp || acr || ""; - return { - tenantId: tenantId, - localAccountId: oid || sub || "", - name: name, - isHomeTenant: tenantIdMatchesHomeTenant(tenantId, homeAccountId), - }; - } - else { - return { - tenantId, - localAccountId, - isHomeTenant: tenantIdMatchesHomeTenant(tenantId, homeAccountId), - }; - } -} -/** - * Replaces account info that varies by tenant profile sourced from the ID token claims passed in with the tenant-specific account info - * @param baseAccountInfo - * @param idTokenClaims - * @returns - */ -function updateAccountTenantProfileData(baseAccountInfo, tenantProfile, idTokenClaims, idTokenSecret) { - let updatedAccountInfo = baseAccountInfo; - // Tenant Profile overrides passed in account info - if (tenantProfile) { - // eslint-disable-next-line @typescript-eslint/no-unused-vars - const { isHomeTenant, ...tenantProfileOverride } = tenantProfile; - updatedAccountInfo = { ...baseAccountInfo, ...tenantProfileOverride }; - } - // ID token claims override passed in account info and tenant profile - if (idTokenClaims) { - // Ignore isHomeTenant, loginHint, and sid which are part of tenant profile but not base account info - // eslint-disable-next-line @typescript-eslint/no-unused-vars - const { isHomeTenant, ...claimsSourcedTenantProfile } = buildTenantProfile(baseAccountInfo.homeAccountId, baseAccountInfo.localAccountId, baseAccountInfo.tenantId, idTokenClaims); - updatedAccountInfo = { - ...updatedAccountInfo, - ...claimsSourcedTenantProfile, - idTokenClaims: idTokenClaims, - idToken: idTokenSecret, - }; - return updatedAccountInfo; - } - return updatedAccountInfo; -} - -/*! @azure/msal-common v14.16.1 2025-08-05 */ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * Authority types supported by MSAL. - */ -const AuthorityType = { - Default: 0, - Adfs: 1, - Dsts: 2, - Ciam: 3, -}; - -/*! @azure/msal-common v14.16.1 2025-08-05 */ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * Gets tenantId from available ID token claims to set as credential realm with the following precedence: - * 1. tid - if the token is acquired from an Azure AD tenant tid will be present - * 2. tfp - if the token is acquired from a modern B2C tenant tfp should be present - * 3. acr - if the token is acquired from a legacy B2C tenant acr should be present - * Downcased to match the realm case-insensitive comparison requirements - * @param idTokenClaims - * @returns - */ -function getTenantIdFromIdTokenClaims(idTokenClaims) { - if (idTokenClaims) { - const tenantId = idTokenClaims.tid || idTokenClaims.tfp || idTokenClaims.acr; - return tenantId || null; - } - return null; -} - -/*! @azure/msal-common v14.16.1 2025-08-05 */ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * Protocol modes supported by MSAL. - */ -const ProtocolMode = { - AAD: "AAD", - OIDC: "OIDC", -}; - -/*! @azure/msal-common v14.16.1 2025-08-05 */ - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * Type that defines required and optional parameters for an Account field (based on universal cache schema implemented by all MSALs). - * - * Key : Value Schema - * - * Key: -- - * - * Value Schema: - * { - * homeAccountId: home account identifier for the auth scheme, - * environment: entity that issued the token, represented as a full host - * realm: Full tenant or organizational identifier that the account belongs to - * localAccountId: Original tenant-specific accountID, usually used for legacy cases - * username: primary username that represents the user, usually corresponds to preferred_username in the v2 endpt - * authorityType: Accounts authority type as a string - * name: Full name for the account, including given name and family name, - * lastModificationTime: last time this entity was modified in the cache - * lastModificationApp: - * nativeAccountId: Account identifier on the native device - * tenantProfiles: Array of tenant profile objects for each tenant that the account has authenticated with in the browser - * } - * @internal - */ -class AccountEntity { - /** - * Generate Account Id key component as per the schema: - - */ - generateAccountId() { - const accountId = [this.homeAccountId, this.environment]; - return accountId.join(Separators.CACHE_KEY_SEPARATOR).toLowerCase(); - } - /** - * Generate Account Cache Key as per the schema: -- - */ - generateAccountKey() { - return AccountEntity.generateAccountCacheKey({ - homeAccountId: this.homeAccountId, - environment: this.environment, - tenantId: this.realm, - username: this.username, - localAccountId: this.localAccountId, - }); - } - /** - * Returns the AccountInfo interface for this account. - */ - getAccountInfo() { - return { - homeAccountId: this.homeAccountId, - environment: this.environment, - tenantId: this.realm, - username: this.username, - localAccountId: this.localAccountId, - name: this.name, - nativeAccountId: this.nativeAccountId, - authorityType: this.authorityType, - // Deserialize tenant profiles array into a Map - tenantProfiles: new Map((this.tenantProfiles || []).map((tenantProfile) => { - return [tenantProfile.tenantId, tenantProfile]; - })), - }; - } - /** - * Returns true if the account entity is in single tenant format (outdated), false otherwise - */ - isSingleTenant() { - return !this.tenantProfiles; - } - /** - * Generates account key from interface - * @param accountInterface - */ - static generateAccountCacheKey(accountInterface) { - const homeTenantId = accountInterface.homeAccountId.split(".")[1]; - const accountKey = [ - accountInterface.homeAccountId, - accountInterface.environment || "", - homeTenantId || accountInterface.tenantId || "", - ]; - return accountKey.join(Separators.CACHE_KEY_SEPARATOR).toLowerCase(); - } - /** - * Build Account cache from IdToken, clientInfo and authority/policy. Associated with AAD. - * @param accountDetails - */ - static createAccount(accountDetails, authority, base64Decode) { - const account = new AccountEntity(); - if (authority.authorityType === AuthorityType.Adfs) { - account.authorityType = CacheAccountType.ADFS_ACCOUNT_TYPE; - } - else if (authority.protocolMode === ProtocolMode.AAD) { - account.authorityType = CacheAccountType.MSSTS_ACCOUNT_TYPE; - } - else { - account.authorityType = CacheAccountType.GENERIC_ACCOUNT_TYPE; - } - let clientInfo; - if (accountDetails.clientInfo && base64Decode) { - clientInfo = buildClientInfo(accountDetails.clientInfo, base64Decode); - } - account.clientInfo = accountDetails.clientInfo; - account.homeAccountId = accountDetails.homeAccountId; - account.nativeAccountId = accountDetails.nativeAccountId; - const env = accountDetails.environment || - (authority && authority.getPreferredCache()); - if (!env) { - throw createClientAuthError(invalidCacheEnvironment); - } - account.environment = env; - // non AAD scenarios can have empty realm - account.realm = - clientInfo?.utid || - getTenantIdFromIdTokenClaims(accountDetails.idTokenClaims) || - ""; - // How do you account for MSA CID here? - account.localAccountId = - clientInfo?.uid || - accountDetails.idTokenClaims?.oid || - accountDetails.idTokenClaims?.sub || - ""; - /* - * In B2C scenarios the emails claim is used instead of preferred_username and it is an array. - * In most cases it will contain a single email. This field should not be relied upon if a custom - * policy is configured to return more than 1 email. - */ - const preferredUsername = accountDetails.idTokenClaims?.preferred_username || - accountDetails.idTokenClaims?.upn; - const email = accountDetails.idTokenClaims?.emails - ? accountDetails.idTokenClaims.emails[0] - : null; - account.username = preferredUsername || email || ""; - account.name = accountDetails.idTokenClaims?.name || ""; - account.cloudGraphHostName = accountDetails.cloudGraphHostName; - account.msGraphHost = accountDetails.msGraphHost; - if (accountDetails.tenantProfiles) { - account.tenantProfiles = accountDetails.tenantProfiles; - } - else { - const tenantProfile = buildTenantProfile(accountDetails.homeAccountId, account.localAccountId, account.realm, accountDetails.idTokenClaims); - account.tenantProfiles = [tenantProfile]; - } - return account; - } - /** - * Creates an AccountEntity object from AccountInfo - * @param accountInfo - * @param cloudGraphHostName - * @param msGraphHost - * @returns - */ - static createFromAccountInfo(accountInfo, cloudGraphHostName, msGraphHost) { - const account = new AccountEntity(); - account.authorityType = - accountInfo.authorityType || CacheAccountType.GENERIC_ACCOUNT_TYPE; - account.homeAccountId = accountInfo.homeAccountId; - account.localAccountId = accountInfo.localAccountId; - account.nativeAccountId = accountInfo.nativeAccountId; - account.realm = accountInfo.tenantId; - account.environment = accountInfo.environment; - account.username = accountInfo.username; - account.name = accountInfo.name; - account.cloudGraphHostName = cloudGraphHostName; - account.msGraphHost = msGraphHost; - // Serialize tenant profiles map into an array - account.tenantProfiles = Array.from(accountInfo.tenantProfiles?.values() || []); - return account; - } - /** - * Generate HomeAccountId from server response - * @param serverClientInfo - * @param authType - */ - static generateHomeAccountId(serverClientInfo, authType, logger, cryptoObj, idTokenClaims) { - // since ADFS/DSTS do not have tid and does not set client_info - if (!(authType === AuthorityType.Adfs || - authType === AuthorityType.Dsts)) { - // for cases where there is clientInfo - if (serverClientInfo) { - try { - const clientInfo = buildClientInfo(serverClientInfo, cryptoObj.base64Decode); - if (clientInfo.uid && clientInfo.utid) { - return `${clientInfo.uid}.${clientInfo.utid}`; - } - } - catch (e) { } - } - logger.warning("No client info in response"); - } - // default to "sub" claim - return idTokenClaims?.sub || ""; - } - /** - * Validates an entity: checks for all expected params - * @param entity - */ - static isAccountEntity(entity) { - if (!entity) { - return false; - } - return (entity.hasOwnProperty("homeAccountId") && - entity.hasOwnProperty("environment") && - entity.hasOwnProperty("realm") && - entity.hasOwnProperty("localAccountId") && - entity.hasOwnProperty("username") && - entity.hasOwnProperty("authorityType")); - } - /** - * Helper function to determine whether 2 accountInfo objects represent the same account - * @param accountA - * @param accountB - * @param compareClaims - If set to true idTokenClaims will also be compared to determine account equality - */ - static accountInfoIsEqual(accountA, accountB, compareClaims) { - if (!accountA || !accountB) { - return false; - } - let claimsMatch = true; // default to true so as to not fail comparison below if compareClaims: false - if (compareClaims) { - const accountAClaims = (accountA.idTokenClaims || - {}); - const accountBClaims = (accountB.idTokenClaims || - {}); - // issued at timestamp and nonce are expected to change each time a new id token is acquired - claimsMatch = - accountAClaims.iat === accountBClaims.iat && - accountAClaims.nonce === accountBClaims.nonce; - } - return (accountA.homeAccountId === accountB.homeAccountId && - accountA.localAccountId === accountB.localAccountId && - accountA.username === accountB.username && - accountA.tenantId === accountB.tenantId && - accountA.environment === accountB.environment && - accountA.nativeAccountId === accountB.nativeAccountId && - claimsMatch); - } -} - -/*! @azure/msal-common v14.16.1 2025-08-05 */ - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * Parses hash string from given string. Returns empty string if no hash symbol is found. - * @param hashString - */ -function stripLeadingHashOrQuery(responseString) { - if (responseString.startsWith("#/")) { - return responseString.substring(2); - } - else if (responseString.startsWith("#") || - responseString.startsWith("?")) { - return responseString.substring(1); - } - return responseString; -} -/** - * Returns URL hash as server auth code response object. - */ -function getDeserializedResponse(responseString) { - // Check if given hash is empty - if (!responseString || responseString.indexOf("=") < 0) { - return null; - } - try { - // Strip the # or ? symbol if present - const normalizedResponse = stripLeadingHashOrQuery(responseString); - // If # symbol was not present, above will return empty string, so give original hash value - const deserializedHash = Object.fromEntries(new URLSearchParams(normalizedResponse)); - // Check for known response properties - if (deserializedHash.code || - deserializedHash.error || - deserializedHash.error_description || - deserializedHash.state) { - return deserializedHash; - } - } - catch (e) { - throw createClientAuthError(hashNotDeserialized); - } - return null; -} - -/*! @azure/msal-common v14.16.1 2025-08-05 */ - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * Url object class which can perform various transformations on url strings. - */ -class UrlString { - get urlString() { - return this._urlString; - } - constructor(url) { - this._urlString = url; - if (!this._urlString) { - // Throws error if url is empty - throw createClientConfigurationError(urlEmptyError); - } - if (!url.includes("#")) { - this._urlString = UrlString.canonicalizeUri(url); - } - } - /** - * Ensure urls are lower case and end with a / character. - * @param url - */ - static canonicalizeUri(url) { - if (url) { - let lowerCaseUrl = url.toLowerCase(); - if (StringUtils.endsWith(lowerCaseUrl, "?")) { - lowerCaseUrl = lowerCaseUrl.slice(0, -1); - } - else if (StringUtils.endsWith(lowerCaseUrl, "?/")) { - lowerCaseUrl = lowerCaseUrl.slice(0, -2); - } - if (!StringUtils.endsWith(lowerCaseUrl, "/")) { - lowerCaseUrl += "/"; - } - return lowerCaseUrl; - } - return url; - } - /** - * Throws if urlString passed is not a valid authority URI string. - */ - validateAsUri() { - // Attempts to parse url for uri components - let components; - try { - components = this.getUrlComponents(); - } - catch (e) { - throw createClientConfigurationError(urlParseError); - } - // Throw error if URI or path segments are not parseable. - if (!components.HostNameAndPort || !components.PathSegments) { - throw createClientConfigurationError(urlParseError); - } - // Throw error if uri is insecure. - if (!components.Protocol || - components.Protocol.toLowerCase() !== "https:") { - throw createClientConfigurationError(authorityUriInsecure); - } - } - /** - * Given a url and a query string return the url with provided query string appended - * @param url - * @param queryString - */ - static appendQueryString(url, queryString) { - if (!queryString) { - return url; - } - return url.indexOf("?") < 0 - ? `${url}?${queryString}` - : `${url}&${queryString}`; - } - /** - * Returns a url with the hash removed - * @param url - */ - static removeHashFromUrl(url) { - return UrlString.canonicalizeUri(url.split("#")[0]); - } - /** - * Given a url like https://a:b/common/d?e=f#g, and a tenantId, returns https://a:b/tenantId/d - * @param href The url - * @param tenantId The tenant id to replace - */ - replaceTenantPath(tenantId) { - const urlObject = this.getUrlComponents(); - const pathArray = urlObject.PathSegments; - if (tenantId && - pathArray.length !== 0 && - (pathArray[0] === AADAuthorityConstants.COMMON || - pathArray[0] === AADAuthorityConstants.ORGANIZATIONS)) { - pathArray[0] = tenantId; - } - return UrlString.constructAuthorityUriFromObject(urlObject); - } - /** - * Parses out the components from a url string. - * @returns An object with the various components. Please cache this value insted of calling this multiple times on the same url. - */ - getUrlComponents() { - // https://gist.github.com/curtisz/11139b2cfcaef4a261e0 - const regEx = RegExp("^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?"); - // If url string does not match regEx, we throw an error - const match = this.urlString.match(regEx); - if (!match) { - throw createClientConfigurationError(urlParseError); - } - // Url component object - const urlComponents = { - Protocol: match[1], - HostNameAndPort: match[4], - AbsolutePath: match[5], - QueryString: match[7], - }; - let pathSegments = urlComponents.AbsolutePath.split("/"); - pathSegments = pathSegments.filter((val) => val && val.length > 0); // remove empty elements - urlComponents.PathSegments = pathSegments; - if (urlComponents.QueryString && - urlComponents.QueryString.endsWith("/")) { - urlComponents.QueryString = urlComponents.QueryString.substring(0, urlComponents.QueryString.length - 1); - } - return urlComponents; - } - static getDomainFromUrl(url) { - const regEx = RegExp("^([^:/?#]+://)?([^/?#]*)"); - const match = url.match(regEx); - if (!match) { - throw createClientConfigurationError(urlParseError); - } - return match[2]; - } - static getAbsoluteUrl(relativeUrl, baseUrl) { - if (relativeUrl[0] === Constants$1.FORWARD_SLASH) { - const url = new UrlString(baseUrl); - const baseComponents = url.getUrlComponents(); - return (baseComponents.Protocol + - "//" + - baseComponents.HostNameAndPort + - relativeUrl); - } - return relativeUrl; - } - static constructAuthorityUriFromObject(urlObject) { - return new UrlString(urlObject.Protocol + - "//" + - urlObject.HostNameAndPort + - "/" + - urlObject.PathSegments.join("/")); - } - /** - * Check if the hash of the URL string contains known properties - * @deprecated This API will be removed in a future version - */ - static hashContainsKnownProperties(response) { - return !!getDeserializedResponse(response); - } -} - -/*! @azure/msal-common v14.16.1 2025-08-05 */ - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -const rawMetdataJSON = { - endpointMetadata: { - "login.microsoftonline.com": { - token_endpoint: "https://login.microsoftonline.com/{tenantid}/oauth2/v2.0/token", - jwks_uri: "https://login.microsoftonline.com/{tenantid}/discovery/v2.0/keys", - issuer: "https://login.microsoftonline.com/{tenantid}/v2.0", - authorization_endpoint: "https://login.microsoftonline.com/{tenantid}/oauth2/v2.0/authorize", - end_session_endpoint: "https://login.microsoftonline.com/{tenantid}/oauth2/v2.0/logout", - }, - "login.chinacloudapi.cn": { - token_endpoint: "https://login.chinacloudapi.cn/{tenantid}/oauth2/v2.0/token", - jwks_uri: "https://login.chinacloudapi.cn/{tenantid}/discovery/v2.0/keys", - issuer: "https://login.partner.microsoftonline.cn/{tenantid}/v2.0", - authorization_endpoint: "https://login.chinacloudapi.cn/{tenantid}/oauth2/v2.0/authorize", - end_session_endpoint: "https://login.chinacloudapi.cn/{tenantid}/oauth2/v2.0/logout", - }, - "login.microsoftonline.us": { - token_endpoint: "https://login.microsoftonline.us/{tenantid}/oauth2/v2.0/token", - jwks_uri: "https://login.microsoftonline.us/{tenantid}/discovery/v2.0/keys", - issuer: "https://login.microsoftonline.us/{tenantid}/v2.0", - authorization_endpoint: "https://login.microsoftonline.us/{tenantid}/oauth2/v2.0/authorize", - end_session_endpoint: "https://login.microsoftonline.us/{tenantid}/oauth2/v2.0/logout", - }, - }, - instanceDiscoveryMetadata: { - metadata: [ - { - preferred_network: "login.microsoftonline.com", - preferred_cache: "login.windows.net", - aliases: [ - "login.microsoftonline.com", - "login.windows.net", - "login.microsoft.com", - "sts.windows.net", - ], - }, - { - preferred_network: "login.partner.microsoftonline.cn", - preferred_cache: "login.partner.microsoftonline.cn", - aliases: [ - "login.partner.microsoftonline.cn", - "login.chinacloudapi.cn", - ], - }, - { - preferred_network: "login.microsoftonline.de", - preferred_cache: "login.microsoftonline.de", - aliases: ["login.microsoftonline.de"], - }, - { - preferred_network: "login.microsoftonline.us", - preferred_cache: "login.microsoftonline.us", - aliases: [ - "login.microsoftonline.us", - "login.usgovcloudapi.net", - ], - }, - { - preferred_network: "login-us.microsoftonline.com", - preferred_cache: "login-us.microsoftonline.com", - aliases: ["login-us.microsoftonline.com"], - }, - ], - }, -}; -const EndpointMetadata = rawMetdataJSON.endpointMetadata; -const InstanceDiscoveryMetadata = rawMetdataJSON.instanceDiscoveryMetadata; -const InstanceDiscoveryMetadataAliases = new Set(); -InstanceDiscoveryMetadata.metadata.forEach((metadataEntry) => { - metadataEntry.aliases.forEach((alias) => { - InstanceDiscoveryMetadataAliases.add(alias); - }); -}); -/** - * Attempts to get an aliases array from the static authority metadata sources based on the canonical authority host - * @param staticAuthorityOptions - * @param logger - * @returns - */ -function getAliasesFromStaticSources(staticAuthorityOptions, logger) { - let staticAliases; - const canonicalAuthority = staticAuthorityOptions.canonicalAuthority; - if (canonicalAuthority) { - const authorityHost = new UrlString(canonicalAuthority).getUrlComponents().HostNameAndPort; - staticAliases = - getAliasesFromMetadata(authorityHost, staticAuthorityOptions.cloudDiscoveryMetadata?.metadata, AuthorityMetadataSource.CONFIG, logger) || - getAliasesFromMetadata(authorityHost, InstanceDiscoveryMetadata.metadata, AuthorityMetadataSource.HARDCODED_VALUES, logger) || - staticAuthorityOptions.knownAuthorities; - } - return staticAliases || []; -} -/** - * Returns aliases for from the raw cloud discovery metadata passed in - * @param authorityHost - * @param rawCloudDiscoveryMetadata - * @returns - */ -function getAliasesFromMetadata(authorityHost, cloudDiscoveryMetadata, source, logger) { - logger?.trace(`getAliasesFromMetadata called with source: ${source}`); - if (authorityHost && cloudDiscoveryMetadata) { - const metadata = getCloudDiscoveryMetadataFromNetworkResponse(cloudDiscoveryMetadata, authorityHost); - if (metadata) { - logger?.trace(`getAliasesFromMetadata: found cloud discovery metadata in ${source}, returning aliases`); - return metadata.aliases; - } - else { - logger?.trace(`getAliasesFromMetadata: did not find cloud discovery metadata in ${source}`); - } - } - return null; -} -/** - * Get cloud discovery metadata for common authorities - */ -function getCloudDiscoveryMetadataFromHardcodedValues(authorityHost) { - const metadata = getCloudDiscoveryMetadataFromNetworkResponse(InstanceDiscoveryMetadata.metadata, authorityHost); - return metadata; -} -/** - * Searches instance discovery network response for the entry that contains the host in the aliases list - * @param response - * @param authority - */ -function getCloudDiscoveryMetadataFromNetworkResponse(response, authorityHost) { - for (let i = 0; i < response.length; i++) { - const metadata = response[i]; - if (metadata.aliases.includes(authorityHost)) { - return metadata; - } - } - return null; -} - -/*! @azure/msal-common v14.16.1 2025-08-05 */ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -const cacheQuotaExceeded = "cache_quota_exceeded"; -const cacheErrorUnknown = "cache_error_unknown"; - -/*! @azure/msal-common v14.16.1 2025-08-05 */ - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -const CacheErrorMessages = { - [cacheQuotaExceeded]: "Exceeded cache storage capacity.", - [cacheErrorUnknown]: "Unexpected error occurred when using cache storage.", -}; -/** - * Error thrown when there is an error with the cache - */ -class CacheError extends Error { - constructor(errorCode, errorMessage) { - const message = errorMessage || - (CacheErrorMessages[errorCode] - ? CacheErrorMessages[errorCode] - : CacheErrorMessages[cacheErrorUnknown]); - super(`${errorCode}: ${message}`); - Object.setPrototypeOf(this, CacheError.prototype); - this.name = "CacheError"; - this.errorCode = errorCode; - this.errorMessage = message; - } -} -/** - * Helper function to wrap browser errors in a CacheError object - * @param e - * @returns - */ -function createCacheError(e) { - if (!(e instanceof Error)) { - return new CacheError(cacheErrorUnknown); - } - if (e.name === "QuotaExceededError" || - e.name === "NS_ERROR_DOM_QUOTA_REACHED" || - e.message.includes("exceeded the quota")) { - return new CacheError(cacheQuotaExceeded); - } - else { - return new CacheError(e.name, e.message); - } -} - -/*! @azure/msal-common v14.16.1 2025-08-05 */ - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * Interface class which implement cache storage functions used by MSAL to perform validity checks, and store tokens. - * @internal - */ -class CacheManager { - constructor(clientId, cryptoImpl, logger, staticAuthorityOptions) { - this.clientId = clientId; - this.cryptoImpl = cryptoImpl; - this.commonLogger = logger.clone(name$1, version$1); - this.staticAuthorityOptions = staticAuthorityOptions; - } - /** - * Returns all the accounts in the cache that match the optional filter. If no filter is provided, all accounts are returned. - * @param accountFilter - (Optional) filter to narrow down the accounts returned - * @returns Array of AccountInfo objects in cache - */ - getAllAccounts(correlationId, accountFilter) { - return this.buildTenantProfiles(this.getAccountsFilteredBy(accountFilter || {}, correlationId), correlationId, accountFilter); - } - /** - * Gets first tenanted AccountInfo object found based on provided filters - */ - getAccountInfoFilteredBy(accountFilter, correlationId) { - const allAccounts = this.getAllAccounts(correlationId, accountFilter); - if (allAccounts.length > 1) { - // If one or more accounts are found, prioritize accounts that have an ID token - const sortedAccounts = allAccounts.sort((account) => { - return account.idTokenClaims ? -1 : 1; - }); - return sortedAccounts[0]; - } - else if (allAccounts.length === 1) { - // If only one account is found, return it regardless of whether a matching ID token was found - return allAccounts[0]; - } - else { - return null; - } - } - /** - * Returns a single matching - * @param accountFilter - * @returns - */ - getBaseAccountInfo(accountFilter, correlationId) { - const accountEntities = this.getAccountsFilteredBy(accountFilter, correlationId); - if (accountEntities.length > 0) { - return accountEntities[0].getAccountInfo(); - } - else { - return null; - } - } - /** - * Matches filtered account entities with cached ID tokens that match the tenant profile-specific account filters - * and builds the account info objects from the matching ID token's claims - * @param cachedAccounts - * @param accountFilter - * @returns Array of AccountInfo objects that match account and tenant profile filters - */ - buildTenantProfiles(cachedAccounts, correlationId, accountFilter) { - return cachedAccounts.flatMap((accountEntity) => { - return this.getTenantProfilesFromAccountEntity(accountEntity, correlationId, accountFilter?.tenantId, accountFilter); - }); - } - getTenantedAccountInfoByFilter(accountInfo, tokenKeys, tenantProfile, correlationId, tenantProfileFilter) { - let tenantedAccountInfo = null; - let idTokenClaims; - if (tenantProfileFilter) { - if (!this.tenantProfileMatchesFilter(tenantProfile, tenantProfileFilter)) { - return null; - } - } - const idToken = this.getIdToken(accountInfo, correlationId, tokenKeys, tenantProfile.tenantId); - if (idToken) { - idTokenClaims = extractTokenClaims(idToken.secret, this.cryptoImpl.base64Decode); - if (!this.idTokenClaimsMatchTenantProfileFilter(idTokenClaims, tenantProfileFilter)) { - // ID token sourced claims don't match so this tenant profile is not a match - return null; - } - } - // Expand tenant profile into account info based on matching tenant profile and if available matching ID token claims - tenantedAccountInfo = updateAccountTenantProfileData(accountInfo, tenantProfile, idTokenClaims, idToken?.secret); - return tenantedAccountInfo; - } - getTenantProfilesFromAccountEntity(accountEntity, correlationId, targetTenantId, tenantProfileFilter) { - const accountInfo = accountEntity.getAccountInfo(); - let searchTenantProfiles = accountInfo.tenantProfiles || new Map(); - const tokenKeys = this.getTokenKeys(); - // If a tenant ID was provided, only return the tenant profile for that tenant ID if it exists - if (targetTenantId) { - const tenantProfile = searchTenantProfiles.get(targetTenantId); - if (tenantProfile) { - // Reduce search field to just this tenant profile - searchTenantProfiles = new Map([ - [targetTenantId, tenantProfile], - ]); - } - else { - // No tenant profile for search tenant ID, return empty array - return []; - } - } - const matchingTenantProfiles = []; - searchTenantProfiles.forEach((tenantProfile) => { - const tenantedAccountInfo = this.getTenantedAccountInfoByFilter(accountInfo, tokenKeys, tenantProfile, correlationId, tenantProfileFilter); - if (tenantedAccountInfo) { - matchingTenantProfiles.push(tenantedAccountInfo); - } - }); - return matchingTenantProfiles; - } - tenantProfileMatchesFilter(tenantProfile, tenantProfileFilter) { - if (!!tenantProfileFilter.localAccountId && - !this.matchLocalAccountIdFromTenantProfile(tenantProfile, tenantProfileFilter.localAccountId)) { - return false; - } - if (!!tenantProfileFilter.name && - !(tenantProfile.name === tenantProfileFilter.name)) { - return false; - } - if (tenantProfileFilter.isHomeTenant !== undefined && - !(tenantProfile.isHomeTenant === tenantProfileFilter.isHomeTenant)) { - return false; - } - return true; - } - idTokenClaimsMatchTenantProfileFilter(idTokenClaims, tenantProfileFilter) { - // Tenant Profile filtering - if (tenantProfileFilter) { - if (!!tenantProfileFilter.localAccountId && - !this.matchLocalAccountIdFromTokenClaims(idTokenClaims, tenantProfileFilter.localAccountId)) { - return false; - } - if (!!tenantProfileFilter.loginHint && - !this.matchLoginHintFromTokenClaims(idTokenClaims, tenantProfileFilter.loginHint)) { - return false; - } - if (!!tenantProfileFilter.username && - !this.matchUsername(idTokenClaims.preferred_username, tenantProfileFilter.username)) { - return false; - } - if (!!tenantProfileFilter.name && - !this.matchName(idTokenClaims, tenantProfileFilter.name)) { - return false; - } - if (!!tenantProfileFilter.sid && - !this.matchSid(idTokenClaims, tenantProfileFilter.sid)) { - return false; - } - } - return true; - } - /** - * saves a cache record - * @param cacheRecord {CacheRecord} - * @param storeInCache {?StoreInCache} - * @param correlationId {?string} correlation id - */ - async saveCacheRecord(cacheRecord, correlationId, storeInCache) { - if (!cacheRecord) { - throw createClientAuthError(invalidCacheRecord); - } - try { - if (!!cacheRecord.account) { - this.setAccount(cacheRecord.account, correlationId); - } - if (!!cacheRecord.idToken && storeInCache?.idToken !== false) { - this.setIdTokenCredential(cacheRecord.idToken, correlationId); - } - if (!!cacheRecord.accessToken && - storeInCache?.accessToken !== false) { - await this.saveAccessToken(cacheRecord.accessToken, correlationId); - } - if (!!cacheRecord.refreshToken && - storeInCache?.refreshToken !== false) { - this.setRefreshTokenCredential(cacheRecord.refreshToken, correlationId); - } - if (!!cacheRecord.appMetadata) { - this.setAppMetadata(cacheRecord.appMetadata, correlationId); - } - } - catch (e) { - this.commonLogger?.error(`CacheManager.saveCacheRecord: failed`); - if (e instanceof AuthError) { - throw e; - } - else { - throw createCacheError(e); - } - } - } - /** - * saves access token credential - * @param credential - */ - async saveAccessToken(credential, correlationId) { - const accessTokenFilter = { - clientId: credential.clientId, - credentialType: credential.credentialType, - environment: credential.environment, - homeAccountId: credential.homeAccountId, - realm: credential.realm, - tokenType: credential.tokenType, - requestedClaimsHash: credential.requestedClaimsHash, - }; - const tokenKeys = this.getTokenKeys(); - const currentScopes = ScopeSet.fromString(credential.target); - tokenKeys.accessToken.forEach((key) => { - if (!this.accessTokenKeyMatchesFilter(key, accessTokenFilter, false)) { - return; - } - const tokenEntity = this.getAccessTokenCredential(key, correlationId); - if (tokenEntity && - this.credentialMatchesFilter(tokenEntity, accessTokenFilter)) { - const tokenScopeSet = ScopeSet.fromString(tokenEntity.target); - if (tokenScopeSet.intersectingScopeSets(currentScopes)) { - this.removeAccessToken(key, correlationId); - } - } - }); - this.setAccessTokenCredential(credential, correlationId); - } - /** - * Retrieve account entities matching all provided tenant-agnostic filters; if no filter is set, get all account entities in the cache - * Not checking for casing as keys are all generated in lower case, remember to convert to lower case if object properties are compared - * @param accountFilter - An object containing Account properties to filter by - */ - getAccountsFilteredBy(accountFilter, correlationId) { - const allAccountKeys = this.getAccountKeys(); - const matchingAccounts = []; - allAccountKeys.forEach((cacheKey) => { - if (!this.isAccountKey(cacheKey, accountFilter.homeAccountId)) { - // Don't parse value if the key doesn't match the account filters - return; - } - const entity = this.getAccount(cacheKey, correlationId, this.commonLogger); - // Match base account fields - if (!entity) { - return; - } - if (!!accountFilter.homeAccountId && - !this.matchHomeAccountId(entity, accountFilter.homeAccountId)) { - return; - } - if (!!accountFilter.username && - !this.matchUsername(entity.username, accountFilter.username)) { - return; - } - if (!!accountFilter.environment && - !this.matchEnvironment(entity, accountFilter.environment)) { - return; - } - if (!!accountFilter.realm && - !this.matchRealm(entity, accountFilter.realm)) { - return; - } - if (!!accountFilter.nativeAccountId && - !this.matchNativeAccountId(entity, accountFilter.nativeAccountId)) { - return; - } - if (!!accountFilter.authorityType && - !this.matchAuthorityType(entity, accountFilter.authorityType)) { - return; - } - // If at least one tenant profile matches the tenant profile filter, add the account to the list of matching accounts - const tenantProfileFilter = { - localAccountId: accountFilter?.localAccountId, - name: accountFilter?.name, - }; - const matchingTenantProfiles = entity.tenantProfiles?.filter((tenantProfile) => { - return this.tenantProfileMatchesFilter(tenantProfile, tenantProfileFilter); - }); - if (matchingTenantProfiles && matchingTenantProfiles.length === 0) { - // No tenant profile for this account matches filter, don't add to list of matching accounts - return; - } - matchingAccounts.push(entity); - }); - return matchingAccounts; - } - /** - * Returns true if the given key matches our account key schema. Also matches homeAccountId and/or tenantId if provided - * @param key - * @param homeAccountId - * @param tenantId - * @returns - */ - isAccountKey(key, homeAccountId, tenantId) { - if (key.split(Separators.CACHE_KEY_SEPARATOR).length < 3) { - // Account cache keys contain 3 items separated by '-' (each item may also contain '-') - return false; - } - if (homeAccountId && - !key.toLowerCase().includes(homeAccountId.toLowerCase())) { - return false; - } - if (tenantId && !key.toLowerCase().includes(tenantId.toLowerCase())) { - return false; - } - // Do not check environment as aliasing can cause false negatives - return true; - } - /** - * Returns true if the given key matches our credential key schema. - * @param key - */ - isCredentialKey(key) { - if (key.split(Separators.CACHE_KEY_SEPARATOR).length < 6) { - // Credential cache keys contain 6 items separated by '-' (each item may also contain '-') - return false; - } - const lowerCaseKey = key.toLowerCase(); - // Credential keys must indicate what credential type they represent - if (lowerCaseKey.indexOf(CredentialType.ID_TOKEN.toLowerCase()) === - -1 && - lowerCaseKey.indexOf(CredentialType.ACCESS_TOKEN.toLowerCase()) === - -1 && - lowerCaseKey.indexOf(CredentialType.ACCESS_TOKEN_WITH_AUTH_SCHEME.toLowerCase()) === -1 && - lowerCaseKey.indexOf(CredentialType.REFRESH_TOKEN.toLowerCase()) === - -1) { - return false; - } - if (lowerCaseKey.indexOf(CredentialType.REFRESH_TOKEN.toLowerCase()) > - -1) { - // Refresh tokens must contain the client id or family id - const clientIdValidation = `${CredentialType.REFRESH_TOKEN}${Separators.CACHE_KEY_SEPARATOR}${this.clientId}${Separators.CACHE_KEY_SEPARATOR}`; - const familyIdValidation = `${CredentialType.REFRESH_TOKEN}${Separators.CACHE_KEY_SEPARATOR}${THE_FAMILY_ID}${Separators.CACHE_KEY_SEPARATOR}`; - if (lowerCaseKey.indexOf(clientIdValidation.toLowerCase()) === -1 && - lowerCaseKey.indexOf(familyIdValidation.toLowerCase()) === -1) { - return false; - } - } - else if (lowerCaseKey.indexOf(this.clientId.toLowerCase()) === -1) { - // Tokens must contain the clientId - return false; - } - return true; - } - /** - * Returns whether or not the given credential entity matches the filter - * @param entity - * @param filter - * @returns - */ - credentialMatchesFilter(entity, filter) { - if (!!filter.clientId && !this.matchClientId(entity, filter.clientId)) { - return false; - } - if (!!filter.userAssertionHash && - !this.matchUserAssertionHash(entity, filter.userAssertionHash)) { - return false; - } - /* - * homeAccountId can be undefined, and we want to filter out cached items that have a homeAccountId of "" - * because we don't want a client_credential request to return a cached token that has a homeAccountId - */ - if (typeof filter.homeAccountId === "string" && - !this.matchHomeAccountId(entity, filter.homeAccountId)) { - return false; - } - if (!!filter.environment && - !this.matchEnvironment(entity, filter.environment)) { - return false; - } - if (!!filter.realm && !this.matchRealm(entity, filter.realm)) { - return false; - } - if (!!filter.credentialType && - !this.matchCredentialType(entity, filter.credentialType)) { - return false; - } - if (!!filter.familyId && !this.matchFamilyId(entity, filter.familyId)) { - return false; - } - /* - * idTokens do not have "target", target specific refreshTokens do exist for some types of authentication - * Resource specific refresh tokens case will be added when the support is deemed necessary - */ - if (!!filter.target && !this.matchTarget(entity, filter.target)) { - return false; - } - // If request OR cached entity has requested Claims Hash, check if they match - if (filter.requestedClaimsHash || entity.requestedClaimsHash) { - // Don't match if either is undefined or they are different - if (entity.requestedClaimsHash !== filter.requestedClaimsHash) { - return false; - } - } - // Access Token with Auth Scheme specific matching - if (entity.credentialType === - CredentialType.ACCESS_TOKEN_WITH_AUTH_SCHEME) { - if (!!filter.tokenType && - !this.matchTokenType(entity, filter.tokenType)) { - return false; - } - // KeyId (sshKid) in request must match cached SSH certificate keyId because SSH cert is bound to a specific key - if (filter.tokenType === AuthenticationScheme.SSH) { - if (filter.keyId && !this.matchKeyId(entity, filter.keyId)) { - return false; - } - } - } - return true; - } - /** - * retrieve appMetadata matching all provided filters; if no filter is set, get all appMetadata - * @param filter - */ - getAppMetadataFilteredBy(filter) { - const allCacheKeys = this.getKeys(); - const matchingAppMetadata = {}; - allCacheKeys.forEach((cacheKey) => { - // don't parse any non-appMetadata type cache entities - if (!this.isAppMetadata(cacheKey)) { - return; - } - // Attempt retrieval - const entity = this.getAppMetadata(cacheKey); - if (!entity) { - return; - } - if (!!filter.environment && - !this.matchEnvironment(entity, filter.environment)) { - return; - } - if (!!filter.clientId && - !this.matchClientId(entity, filter.clientId)) { - return; - } - matchingAppMetadata[cacheKey] = entity; - }); - return matchingAppMetadata; - } - /** - * retrieve authorityMetadata that contains a matching alias - * @param filter - */ - getAuthorityMetadataByAlias(host) { - const allCacheKeys = this.getAuthorityMetadataKeys(); - let matchedEntity = null; - allCacheKeys.forEach((cacheKey) => { - // don't parse any non-authorityMetadata type cache entities - if (!this.isAuthorityMetadata(cacheKey) || - cacheKey.indexOf(this.clientId) === -1) { - return; - } - // Attempt retrieval - const entity = this.getAuthorityMetadata(cacheKey); - if (!entity) { - return; - } - if (entity.aliases.indexOf(host) === -1) { - return; - } - matchedEntity = entity; - }); - return matchedEntity; - } - /** - * Removes all accounts and related tokens from cache. - */ - async removeAllAccounts(correlationId) { - const allAccountKeys = this.getAccountKeys(); - const removedAccounts = []; - allAccountKeys.forEach((cacheKey) => { - removedAccounts.push(this.removeAccount(cacheKey, correlationId)); - }); - await Promise.all(removedAccounts); - } - /** - * Removes the account and related tokens for a given account key - * @param account - */ - async removeAccount(accountKey, correlationId) { - const account = this.getAccount(accountKey, correlationId, this.commonLogger); - if (!account) { - return; - } - await this.removeAccountContext(account, correlationId); - this.removeItem(accountKey, correlationId); - } - /** - * Removes credentials associated with the provided account - * @param account - */ - async removeAccountContext(account, correlationId) { - const allTokenKeys = this.getTokenKeys(); - const accountId = account.generateAccountId(); - allTokenKeys.idToken.forEach((key) => { - if (key.indexOf(accountId) === 0) { - this.removeIdToken(key, correlationId); - } - }); - allTokenKeys.accessToken.forEach((key) => { - if (key.indexOf(accountId) === 0) { - this.removeAccessToken(key, correlationId); - } - }); - allTokenKeys.refreshToken.forEach((key) => { - if (key.indexOf(accountId) === 0) { - this.removeRefreshToken(key, correlationId); - } - }); - this.getKeys().forEach((key) => { - if (key.includes(accountId)) { - this.removeItem(key, correlationId); - } - }); - } - /** - * Migrates a single-tenant account and all it's associated alternate cross-tenant account objects in the - * cache into a condensed multi-tenant account object with tenant profiles. - * @param accountKey - * @param accountEntity - * @param logger - * @returns - */ - updateOutdatedCachedAccount(accountKey, accountEntity, correlationId, logger) { - // Only update if account entity is defined and has no tenantProfiles object (is outdated) - if (accountEntity && accountEntity.isSingleTenant()) { - this.commonLogger?.verbose("updateOutdatedCachedAccount: Found a single-tenant (outdated) account entity in the cache, migrating to multi-tenant account entity"); - // Get keys of all accounts belonging to user - const matchingAccountKeys = this.getAccountKeys().filter((key) => { - return key.startsWith(accountEntity.homeAccountId); - }); - // Get all account entities belonging to user - const accountsToMerge = []; - matchingAccountKeys.forEach((key) => { - const account = this.getCachedAccountEntity(key, correlationId); - if (account) { - accountsToMerge.push(account); - } - }); - // Set base account to home account if available, any account if not - const baseAccount = accountsToMerge.find((account) => { - return tenantIdMatchesHomeTenant(account.realm, account.homeAccountId); - }) || accountsToMerge[0]; - // Populate tenant profiles built from each account entity belonging to the user - baseAccount.tenantProfiles = accountsToMerge.map((account) => { - return { - tenantId: account.realm, - localAccountId: account.localAccountId, - name: account.name, - isHomeTenant: tenantIdMatchesHomeTenant(account.realm, account.homeAccountId), - }; - }); - const updatedAccount = CacheManager.toObject(new AccountEntity(), { - ...baseAccount, - }); - const newAccountKey = updatedAccount.generateAccountKey(); - // Clear cache of legacy account objects that have been collpsed into tenant profiles - matchingAccountKeys.forEach((key) => { - if (key !== newAccountKey) { - this.removeOutdatedAccount(accountKey, correlationId); - } - }); - // Cache updated account object - this.setAccount(updatedAccount, correlationId); - logger?.verbose("Updated an outdated account entity in the cache"); - return updatedAccount; - } - // No update is necessary - return accountEntity; - } - /** - * returns a boolean if the given credential is removed - * @param credential - */ - removeAccessToken(key, correlationId) { - const credential = this.getAccessTokenCredential(key, correlationId); - this.removeItem(key, correlationId); - if (!credential || - credential.credentialType.toLowerCase() !== - CredentialType.ACCESS_TOKEN_WITH_AUTH_SCHEME.toLowerCase() || - credential.tokenType !== AuthenticationScheme.POP) { - return; - } - // Remove Token Binding Key from key store for PoP Tokens Credentials - const kid = credential.keyId; - if (kid) { - void this.cryptoImpl.removeTokenBindingKey(kid).catch(() => { - this.commonLogger.error("Binding key could not be removed"); - }); - } - } - /** - * Removes all app metadata objects from cache. - */ - removeAppMetadata(correlationId) { - const allCacheKeys = this.getKeys(); - allCacheKeys.forEach((cacheKey) => { - if (this.isAppMetadata(cacheKey)) { - this.removeItem(cacheKey, correlationId); - } - }); - return true; - } - /** - * Retrieve AccountEntity from cache - * @param account - */ - readAccountFromCache(account, correlationId) { - const accountKey = AccountEntity.generateAccountCacheKey(account); - return this.getAccount(accountKey, correlationId, this.commonLogger); - } - /** - * Retrieve IdTokenEntity from cache - * @param account {AccountInfo} - * @param tokenKeys {?TokenKeys} - * @param targetRealm {?string} - * @param performanceClient {?IPerformanceClient} - * @param correlationId {?string} - */ - getIdToken(account, correlationId, tokenKeys, targetRealm, performanceClient) { - this.commonLogger.trace("CacheManager - getIdToken called"); - const idTokenFilter = { - homeAccountId: account.homeAccountId, - environment: account.environment, - credentialType: CredentialType.ID_TOKEN, - clientId: this.clientId, - realm: targetRealm, - }; - const idTokenMap = this.getIdTokensByFilter(idTokenFilter, correlationId, tokenKeys); - const numIdTokens = idTokenMap.size; - if (numIdTokens < 1) { - this.commonLogger.info("CacheManager:getIdToken - No token found"); - return null; - } - else if (numIdTokens > 1) { - let tokensToBeRemoved = idTokenMap; - // Multiple tenant profiles and no tenant specified, pick home account - if (!targetRealm) { - const homeIdTokenMap = new Map(); - idTokenMap.forEach((idToken, key) => { - if (idToken.realm === account.tenantId) { - homeIdTokenMap.set(key, idToken); - } - }); - const numHomeIdTokens = homeIdTokenMap.size; - if (numHomeIdTokens < 1) { - this.commonLogger.info("CacheManager:getIdToken - Multiple ID tokens found for account but none match account entity tenant id, returning first result"); - return idTokenMap.values().next().value; - } - else if (numHomeIdTokens === 1) { - this.commonLogger.info("CacheManager:getIdToken - Multiple ID tokens found for account, defaulting to home tenant profile"); - return homeIdTokenMap.values().next().value; - } - else { - // Multiple ID tokens for home tenant profile, remove all and return null - tokensToBeRemoved = homeIdTokenMap; - } - } - // Multiple tokens for a single tenant profile, remove all and return null - this.commonLogger.info("CacheManager:getIdToken - Multiple matching ID tokens found, clearing them"); - tokensToBeRemoved.forEach((idToken, key) => { - this.removeIdToken(key, correlationId); - }); - if (performanceClient && correlationId) { - performanceClient.addFields({ multiMatchedID: idTokenMap.size }, correlationId); - } - return null; - } - this.commonLogger.info("CacheManager:getIdToken - Returning ID token"); - return idTokenMap.values().next().value; - } - /** - * Gets all idTokens matching the given filter - * @param filter - * @returns - */ - getIdTokensByFilter(filter, correlationId, tokenKeys) { - const idTokenKeys = (tokenKeys && tokenKeys.idToken) || this.getTokenKeys().idToken; - const idTokens = new Map(); - idTokenKeys.forEach((key) => { - if (!this.idTokenKeyMatchesFilter(key, { - clientId: this.clientId, - ...filter, - })) { - return; - } - const idToken = this.getIdTokenCredential(key, correlationId); - if (idToken && this.credentialMatchesFilter(idToken, filter)) { - idTokens.set(key, idToken); - } - }); - return idTokens; - } - /** - * Validate the cache key against filter before retrieving and parsing cache value - * @param key - * @param filter - * @returns - */ - idTokenKeyMatchesFilter(inputKey, filter) { - const key = inputKey.toLowerCase(); - if (filter.clientId && - key.indexOf(filter.clientId.toLowerCase()) === -1) { - return false; - } - if (filter.homeAccountId && - key.indexOf(filter.homeAccountId.toLowerCase()) === -1) { - return false; - } - return true; - } - /** - * Removes idToken from the cache - * @param key - */ - removeIdToken(key, correlationId) { - this.removeItem(key, correlationId); - } - /** - * Removes refresh token from the cache - * @param key - */ - removeRefreshToken(key, correlationId) { - this.removeItem(key, correlationId); - } - /** - * Retrieve AccessTokenEntity from cache - * @param account {AccountInfo} - * @param request {BaseAuthRequest} - * @param tokenKeys {?TokenKeys} - * @param performanceClient {?IPerformanceClient} - * @param correlationId {?string} - */ - getAccessToken(account, request, tokenKeys, targetRealm, performanceClient) { - this.commonLogger.trace("CacheManager - getAccessToken called"); - const scopes = ScopeSet.createSearchScopes(request.scopes); - const authScheme = request.authenticationScheme || AuthenticationScheme.BEARER; - /* - * Distinguish between Bearer and PoP/SSH token cache types - * Cast to lowercase to handle "bearer" from ADFS - */ - const credentialType = authScheme.toLowerCase() !== - AuthenticationScheme.BEARER.toLowerCase() - ? CredentialType.ACCESS_TOKEN_WITH_AUTH_SCHEME - : CredentialType.ACCESS_TOKEN; - const accessTokenFilter = { - homeAccountId: account.homeAccountId, - environment: account.environment, - credentialType: credentialType, - clientId: this.clientId, - realm: targetRealm || account.tenantId, - target: scopes, - tokenType: authScheme, - keyId: request.sshKid, - requestedClaimsHash: request.requestedClaimsHash, - }; - const accessTokenKeys = (tokenKeys && tokenKeys.accessToken) || - this.getTokenKeys().accessToken; - const accessTokens = []; - accessTokenKeys.forEach((key) => { - // Validate key - if (this.accessTokenKeyMatchesFilter(key, accessTokenFilter, true)) { - const accessToken = this.getAccessTokenCredential(key, request.correlationId); - // Validate value - if (accessToken && - this.credentialMatchesFilter(accessToken, accessTokenFilter)) { - accessTokens.push(accessToken); - } - } - }); - const numAccessTokens = accessTokens.length; - if (numAccessTokens < 1) { - this.commonLogger.info("CacheManager:getAccessToken - No token found"); - return null; - } - else if (numAccessTokens > 1) { - this.commonLogger.info("CacheManager:getAccessToken - Multiple access tokens found, clearing them"); - accessTokens.forEach((accessToken) => { - void this.removeAccessToken(generateCredentialKey(accessToken), request.correlationId); - }); - if (performanceClient && request.correlationId) { - performanceClient.addFields({ multiMatchedAT: accessTokens.length }, request.correlationId); - } - return null; - } - this.commonLogger.info("CacheManager:getAccessToken - Returning access token"); - return accessTokens[0]; - } - /** - * Validate the cache key against filter before retrieving and parsing cache value - * @param key - * @param filter - * @param keyMustContainAllScopes - * @returns - */ - accessTokenKeyMatchesFilter(inputKey, filter, keyMustContainAllScopes) { - const key = inputKey.toLowerCase(); - if (filter.clientId && - key.indexOf(filter.clientId.toLowerCase()) === -1) { - return false; - } - if (filter.homeAccountId && - key.indexOf(filter.homeAccountId.toLowerCase()) === -1) { - return false; - } - if (filter.realm && key.indexOf(filter.realm.toLowerCase()) === -1) { - return false; - } - if (filter.requestedClaimsHash && - key.indexOf(filter.requestedClaimsHash.toLowerCase()) === -1) { - return false; - } - if (filter.target) { - const scopes = filter.target.asArray(); - for (let i = 0; i < scopes.length; i++) { - if (keyMustContainAllScopes && - !key.includes(scopes[i].toLowerCase())) { - // When performing a cache lookup a missing scope would be a cache miss - return false; - } - else if (!keyMustContainAllScopes && - key.includes(scopes[i].toLowerCase())) { - // When performing a cache write, any token with a subset of requested scopes should be replaced - return true; - } - } - } - return true; - } - /** - * Gets all access tokens matching the filter - * @param filter - * @returns - */ - getAccessTokensByFilter(filter, correlationId) { - const tokenKeys = this.getTokenKeys(); - const accessTokens = []; - tokenKeys.accessToken.forEach((key) => { - if (!this.accessTokenKeyMatchesFilter(key, filter, true)) { - return; - } - const accessToken = this.getAccessTokenCredential(key, correlationId); - if (accessToken && - this.credentialMatchesFilter(accessToken, filter)) { - accessTokens.push(accessToken); - } - }); - return accessTokens; - } - /** - * Helper to retrieve the appropriate refresh token from cache - * @param account {AccountInfo} - * @param familyRT {boolean} - * @param tokenKeys {?TokenKeys} - * @param performanceClient {?IPerformanceClient} - * @param correlationId {?string} - */ - getRefreshToken(account, familyRT, correlationId, tokenKeys, performanceClient) { - this.commonLogger.trace("CacheManager - getRefreshToken called"); - const id = familyRT ? THE_FAMILY_ID : undefined; - const refreshTokenFilter = { - homeAccountId: account.homeAccountId, - environment: account.environment, - credentialType: CredentialType.REFRESH_TOKEN, - clientId: this.clientId, - familyId: id, - }; - const refreshTokenKeys = (tokenKeys && tokenKeys.refreshToken) || - this.getTokenKeys().refreshToken; - const refreshTokens = []; - refreshTokenKeys.forEach((key) => { - // Validate key - if (this.refreshTokenKeyMatchesFilter(key, refreshTokenFilter)) { - const refreshToken = this.getRefreshTokenCredential(key, correlationId); - // Validate value - if (refreshToken && - this.credentialMatchesFilter(refreshToken, refreshTokenFilter)) { - refreshTokens.push(refreshToken); - } - } - }); - const numRefreshTokens = refreshTokens.length; - if (numRefreshTokens < 1) { - this.commonLogger.info("CacheManager:getRefreshToken - No refresh token found."); - return null; - } - // address the else case after remove functions address environment aliases - if (numRefreshTokens > 1 && performanceClient && correlationId) { - performanceClient.addFields({ multiMatchedRT: numRefreshTokens }, correlationId); - } - this.commonLogger.info("CacheManager:getRefreshToken - returning refresh token"); - return refreshTokens[0]; - } - /** - * Validate the cache key against filter before retrieving and parsing cache value - * @param key - * @param filter - */ - refreshTokenKeyMatchesFilter(inputKey, filter) { - const key = inputKey.toLowerCase(); - if (filter.familyId && - key.indexOf(filter.familyId.toLowerCase()) === -1) { - return false; - } - // If familyId is used, clientId is not in the key - if (!filter.familyId && - filter.clientId && - key.indexOf(filter.clientId.toLowerCase()) === -1) { - return false; - } - if (filter.homeAccountId && - key.indexOf(filter.homeAccountId.toLowerCase()) === -1) { - return false; - } - return true; - } - /** - * Retrieve AppMetadataEntity from cache - */ - readAppMetadataFromCache(environment) { - const appMetadataFilter = { - environment, - clientId: this.clientId, - }; - const appMetadata = this.getAppMetadataFilteredBy(appMetadataFilter); - const appMetadataEntries = Object.keys(appMetadata).map((key) => appMetadata[key]); - const numAppMetadata = appMetadataEntries.length; - if (numAppMetadata < 1) { - return null; - } - else if (numAppMetadata > 1) { - throw createClientAuthError(multipleMatchingAppMetadata); - } - return appMetadataEntries[0]; - } - /** - * Return the family_id value associated with FOCI - * @param environment - * @param clientId - */ - isAppMetadataFOCI(environment) { - const appMetadata = this.readAppMetadataFromCache(environment); - return !!(appMetadata && appMetadata.familyId === THE_FAMILY_ID); - } - /** - * helper to match account ids - * @param value - * @param homeAccountId - */ - matchHomeAccountId(entity, homeAccountId) { - return !!(typeof entity.homeAccountId === "string" && - homeAccountId === entity.homeAccountId); - } - /** - * helper to match account ids - * @param entity - * @param localAccountId - * @returns - */ - matchLocalAccountIdFromTokenClaims(tokenClaims, localAccountId) { - const idTokenLocalAccountId = tokenClaims.oid || tokenClaims.sub; - return localAccountId === idTokenLocalAccountId; - } - matchLocalAccountIdFromTenantProfile(tenantProfile, localAccountId) { - return tenantProfile.localAccountId === localAccountId; - } - /** - * helper to match names - * @param entity - * @param name - * @returns true if the downcased name properties are present and match in the filter and the entity - */ - matchName(claims, name) { - return !!(name.toLowerCase() === claims.name?.toLowerCase()); - } - /** - * helper to match usernames - * @param entity - * @param username - * @returns - */ - matchUsername(cachedUsername, filterUsername) { - return !!(cachedUsername && - typeof cachedUsername === "string" && - filterUsername?.toLowerCase() === cachedUsername.toLowerCase()); - } - /** - * helper to match assertion - * @param value - * @param oboAssertion - */ - matchUserAssertionHash(entity, userAssertionHash) { - return !!(entity.userAssertionHash && - userAssertionHash === entity.userAssertionHash); - } - /** - * helper to match environment - * @param value - * @param environment - */ - matchEnvironment(entity, environment) { - // Check static authority options first for cases where authority metadata has not been resolved and cached yet - if (this.staticAuthorityOptions) { - const staticAliases = getAliasesFromStaticSources(this.staticAuthorityOptions, this.commonLogger); - if (staticAliases.includes(environment) && - staticAliases.includes(entity.environment)) { - return true; - } - } - // Query metadata cache if no static authority configuration has aliases that match enviroment - const cloudMetadata = this.getAuthorityMetadataByAlias(environment); - if (cloudMetadata && - cloudMetadata.aliases.indexOf(entity.environment) > -1) { - return true; - } - return false; - } - /** - * helper to match credential type - * @param entity - * @param credentialType - */ - matchCredentialType(entity, credentialType) { - return (entity.credentialType && - credentialType.toLowerCase() === entity.credentialType.toLowerCase()); - } - /** - * helper to match client ids - * @param entity - * @param clientId - */ - matchClientId(entity, clientId) { - return !!(entity.clientId && clientId === entity.clientId); - } - /** - * helper to match family ids - * @param entity - * @param familyId - */ - matchFamilyId(entity, familyId) { - return !!(entity.familyId && familyId === entity.familyId); - } - /** - * helper to match realm - * @param entity - * @param realm - */ - matchRealm(entity, realm) { - return !!(entity.realm?.toLowerCase() === realm.toLowerCase()); - } - /** - * helper to match nativeAccountId - * @param entity - * @param nativeAccountId - * @returns boolean indicating the match result - */ - matchNativeAccountId(entity, nativeAccountId) { - return !!(entity.nativeAccountId && nativeAccountId === entity.nativeAccountId); - } - /** - * helper to match loginHint which can be either: - * 1. login_hint ID token claim - * 2. username in cached account object - * 3. upn in ID token claims - * @param entity - * @param loginHint - * @returns - */ - matchLoginHintFromTokenClaims(tokenClaims, loginHint) { - if (tokenClaims.login_hint === loginHint) { - return true; - } - if (tokenClaims.preferred_username === loginHint) { - return true; - } - if (tokenClaims.upn === loginHint) { - return true; - } - return false; - } - /** - * Helper to match sid - * @param entity - * @param sid - * @returns true if the sid claim is present and matches the filter - */ - matchSid(idTokenClaims, sid) { - return idTokenClaims.sid === sid; - } - matchAuthorityType(entity, authorityType) { - return !!(entity.authorityType && - authorityType.toLowerCase() === entity.authorityType.toLowerCase()); - } - /** - * Returns true if the target scopes are a subset of the current entity's scopes, false otherwise. - * @param entity - * @param target - */ - matchTarget(entity, target) { - const isNotAccessTokenCredential = entity.credentialType !== CredentialType.ACCESS_TOKEN && - entity.credentialType !== - CredentialType.ACCESS_TOKEN_WITH_AUTH_SCHEME; - if (isNotAccessTokenCredential || !entity.target) { - return false; - } - const entityScopeSet = ScopeSet.fromString(entity.target); - return entityScopeSet.containsScopeSet(target); - } - /** - * Returns true if the credential's tokenType or Authentication Scheme matches the one in the request, false otherwise - * @param entity - * @param tokenType - */ - matchTokenType(entity, tokenType) { - return !!(entity.tokenType && entity.tokenType === tokenType); - } - /** - * Returns true if the credential's keyId matches the one in the request, false otherwise - * @param entity - * @param keyId - */ - matchKeyId(entity, keyId) { - return !!(entity.keyId && entity.keyId === keyId); - } - /** - * returns if a given cache entity is of the type appmetadata - * @param key - */ - isAppMetadata(key) { - return key.indexOf(APP_METADATA) !== -1; - } - /** - * returns if a given cache entity is of the type authoritymetadata - * @param key - */ - isAuthorityMetadata(key) { - return key.indexOf(AUTHORITY_METADATA_CONSTANTS.CACHE_KEY) !== -1; - } - /** - * returns cache key used for cloud instance metadata - */ - generateAuthorityMetadataCacheKey(authority) { - return `${AUTHORITY_METADATA_CONSTANTS.CACHE_KEY}-${this.clientId}-${authority}`; - } - /** - * Helper to convert serialized data to object - * @param obj - * @param json - */ - static toObject(obj, json) { - for (const propertyName in json) { - obj[propertyName] = json[propertyName]; - } - return obj; - } -} -/** @internal */ -class DefaultStorageClass extends CacheManager { - setAccount() { - throw createClientAuthError(methodNotImplemented); - } - getAccount() { - throw createClientAuthError(methodNotImplemented); - } - getCachedAccountEntity() { - throw createClientAuthError(methodNotImplemented); - } - setIdTokenCredential() { - throw createClientAuthError(methodNotImplemented); - } - getIdTokenCredential() { - throw createClientAuthError(methodNotImplemented); - } - setAccessTokenCredential() { - throw createClientAuthError(methodNotImplemented); - } - getAccessTokenCredential() { - throw createClientAuthError(methodNotImplemented); - } - setRefreshTokenCredential() { - throw createClientAuthError(methodNotImplemented); - } - getRefreshTokenCredential() { - throw createClientAuthError(methodNotImplemented); - } - setAppMetadata() { - throw createClientAuthError(methodNotImplemented); - } - getAppMetadata() { - throw createClientAuthError(methodNotImplemented); - } - setServerTelemetry() { - throw createClientAuthError(methodNotImplemented); - } - getServerTelemetry() { - throw createClientAuthError(methodNotImplemented); - } - setAuthorityMetadata() { - throw createClientAuthError(methodNotImplemented); - } - getAuthorityMetadata() { - throw createClientAuthError(methodNotImplemented); - } - getAuthorityMetadataKeys() { - throw createClientAuthError(methodNotImplemented); - } - setThrottlingCache() { - throw createClientAuthError(methodNotImplemented); - } - getThrottlingCache() { - throw createClientAuthError(methodNotImplemented); - } - removeItem() { - throw createClientAuthError(methodNotImplemented); - } - getKeys() { - throw createClientAuthError(methodNotImplemented); - } - getAccountKeys() { - throw createClientAuthError(methodNotImplemented); - } - getTokenKeys() { - throw createClientAuthError(methodNotImplemented); - } - updateCredentialCacheKey() { - throw createClientAuthError(methodNotImplemented); - } - removeOutdatedAccount() { - throw createClientAuthError(methodNotImplemented); - } -} - -/*! @azure/msal-common v14.16.1 2025-08-05 */ - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -const DEFAULT_SYSTEM_OPTIONS$1 = { - tokenRenewalOffsetSeconds: DEFAULT_TOKEN_RENEWAL_OFFSET_SEC, - preventCorsPreflight: false, -}; -const DEFAULT_LOGGER_IMPLEMENTATION = { - loggerCallback: () => { - // allow users to not set loggerCallback - }, - piiLoggingEnabled: false, - logLevel: exports.LogLevel.Info, - correlationId: Constants$1.EMPTY_STRING, -}; -const DEFAULT_CACHE_OPTIONS$1 = { - claimsBasedCachingEnabled: false, -}; -const DEFAULT_NETWORK_IMPLEMENTATION = { - async sendGetRequestAsync() { - throw createClientAuthError(methodNotImplemented); - }, - async sendPostRequestAsync() { - throw createClientAuthError(methodNotImplemented); - }, -}; -const DEFAULT_LIBRARY_INFO = { - sku: Constants$1.SKU, - version: version$1, - cpu: Constants$1.EMPTY_STRING, - os: Constants$1.EMPTY_STRING, -}; -const DEFAULT_CLIENT_CREDENTIALS = { - clientSecret: Constants$1.EMPTY_STRING, - clientAssertion: undefined, -}; -const DEFAULT_AZURE_CLOUD_OPTIONS = { - azureCloudInstance: AzureCloudInstance.None, - tenant: `${Constants$1.DEFAULT_COMMON_TENANT}`, -}; -const DEFAULT_TELEMETRY_OPTIONS$1 = { - application: { - appName: "", - appVersion: "", - }, -}; -/** - * Function that sets the default options when not explicitly configured from app developer - * - * @param Configuration - * - * @returns Configuration - */ -function buildClientConfiguration({ authOptions: userAuthOptions, systemOptions: userSystemOptions, loggerOptions: userLoggerOption, cacheOptions: userCacheOptions, storageInterface: storageImplementation, networkInterface: networkImplementation, cryptoInterface: cryptoImplementation, clientCredentials: clientCredentials, libraryInfo: libraryInfo, telemetry: telemetry, serverTelemetryManager: serverTelemetryManager, persistencePlugin: persistencePlugin, serializableCache: serializableCache, }) { - const loggerOptions = { - ...DEFAULT_LOGGER_IMPLEMENTATION, - ...userLoggerOption, - }; - return { - authOptions: buildAuthOptions(userAuthOptions), - systemOptions: { ...DEFAULT_SYSTEM_OPTIONS$1, ...userSystemOptions }, - loggerOptions: loggerOptions, - cacheOptions: { ...DEFAULT_CACHE_OPTIONS$1, ...userCacheOptions }, - storageInterface: storageImplementation || - new DefaultStorageClass(userAuthOptions.clientId, DEFAULT_CRYPTO_IMPLEMENTATION, new Logger(loggerOptions)), - networkInterface: networkImplementation || DEFAULT_NETWORK_IMPLEMENTATION, - cryptoInterface: cryptoImplementation || DEFAULT_CRYPTO_IMPLEMENTATION, - clientCredentials: clientCredentials || DEFAULT_CLIENT_CREDENTIALS, - libraryInfo: { ...DEFAULT_LIBRARY_INFO, ...libraryInfo }, - telemetry: { ...DEFAULT_TELEMETRY_OPTIONS$1, ...telemetry }, - serverTelemetryManager: serverTelemetryManager || null, - persistencePlugin: persistencePlugin || null, - serializableCache: serializableCache || null, - }; -} -/** - * Construct authoptions from the client and platform passed values - * @param authOptions - */ -function buildAuthOptions(authOptions) { - return { - clientCapabilities: [], - azureCloudOptions: DEFAULT_AZURE_CLOUD_OPTIONS, - skipAuthorityMetadataCache: false, - instanceAware: false, - ...authOptions, - }; -} -/** - * Returns true if config has protocolMode set to ProtocolMode.OIDC, false otherwise - * @param ClientConfiguration - */ -function isOidcProtocolMode(config) { - return (config.authOptions.authority.options.protocolMode === ProtocolMode.OIDC); -} - -/*! @azure/msal-common v14.16.1 2025-08-05 */ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -const CcsCredentialType = { - HOME_ACCOUNT_ID: "home_account_id", - UPN: "UPN", -}; - -/*! @azure/msal-common v14.16.1 2025-08-05 */ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -const CLIENT_ID = "client_id"; -const REDIRECT_URI = "redirect_uri"; -const RESPONSE_TYPE = "response_type"; -const RESPONSE_MODE = "response_mode"; -const GRANT_TYPE = "grant_type"; -const CLAIMS = "claims"; -const SCOPE = "scope"; -const REFRESH_TOKEN = "refresh_token"; -const STATE = "state"; -const NONCE = "nonce"; -const PROMPT = "prompt"; -const CODE = "code"; -const CODE_CHALLENGE = "code_challenge"; -const CODE_CHALLENGE_METHOD = "code_challenge_method"; -const CODE_VERIFIER = "code_verifier"; -const CLIENT_REQUEST_ID = "client-request-id"; -const X_CLIENT_SKU = "x-client-SKU"; -const X_CLIENT_VER = "x-client-VER"; -const X_CLIENT_OS = "x-client-OS"; -const X_CLIENT_CPU = "x-client-CPU"; -const X_CLIENT_CURR_TELEM = "x-client-current-telemetry"; -const X_CLIENT_LAST_TELEM = "x-client-last-telemetry"; -const X_MS_LIB_CAPABILITY = "x-ms-lib-capability"; -const X_APP_NAME = "x-app-name"; -const X_APP_VER = "x-app-ver"; -const POST_LOGOUT_URI = "post_logout_redirect_uri"; -const ID_TOKEN_HINT = "id_token_hint"; -const DEVICE_CODE = "device_code"; -const CLIENT_SECRET = "client_secret"; -const CLIENT_ASSERTION = "client_assertion"; -const CLIENT_ASSERTION_TYPE = "client_assertion_type"; -const TOKEN_TYPE = "token_type"; -const REQ_CNF = "req_cnf"; -const OBO_ASSERTION = "assertion"; -const REQUESTED_TOKEN_USE = "requested_token_use"; -const ON_BEHALF_OF = "on_behalf_of"; -const RETURN_SPA_CODE = "return_spa_code"; -const NATIVE_BROKER = "nativebroker"; -const LOGOUT_HINT = "logout_hint"; -const SID = "sid"; -const LOGIN_HINT = "login_hint"; -const DOMAIN_HINT = "domain_hint"; -const X_CLIENT_EXTRA_SKU = "x-client-xtra-sku"; -const BROKER_CLIENT_ID = "brk_client_id"; -const BROKER_REDIRECT_URI = "brk_redirect_uri"; - -/*! @azure/msal-common v14.16.1 2025-08-05 */ - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * Validates server consumable params from the "request" objects - */ -class RequestValidator { - /** - * Utility to check if the `redirectUri` in the request is a non-null value - * @param redirectUri - */ - static validateRedirectUri(redirectUri) { - if (!redirectUri) { - throw createClientConfigurationError(redirectUriEmpty); - } - } - /** - * Utility to validate prompt sent by the user in the request - * @param prompt - */ - static validatePrompt(prompt) { - const promptValues = []; - for (const value in PromptValue) { - promptValues.push(PromptValue[value]); - } - if (promptValues.indexOf(prompt) < 0) { - throw createClientConfigurationError(invalidPromptValue); - } - } - static validateClaims(claims) { - try { - JSON.parse(claims); - } - catch (e) { - throw createClientConfigurationError(invalidClaims); - } - } - /** - * Utility to validate code_challenge and code_challenge_method - * @param codeChallenge - * @param codeChallengeMethod - */ - static validateCodeChallengeParams(codeChallenge, codeChallengeMethod) { - if (!codeChallenge || !codeChallengeMethod) { - throw createClientConfigurationError(pkceParamsMissing); - } - else { - this.validateCodeChallengeMethod(codeChallengeMethod); - } - } - /** - * Utility to validate code_challenge_method - * @param codeChallengeMethod - */ - static validateCodeChallengeMethod(codeChallengeMethod) { - if ([ - CodeChallengeMethodValues.PLAIN, - CodeChallengeMethodValues.S256, - ].indexOf(codeChallengeMethod) < 0) { - throw createClientConfigurationError(invalidCodeChallengeMethod); - } - } -} - -/*! @azure/msal-common v14.16.1 2025-08-05 */ - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -function instrumentBrokerParams(parameters, correlationId, performanceClient) { - if (!correlationId) { - return; - } - const clientId = parameters.get(CLIENT_ID); - if (clientId && parameters.has(BROKER_CLIENT_ID)) { - performanceClient?.addFields({ - embeddedClientId: clientId, - embeddedRedirectUri: parameters.get(REDIRECT_URI), - }, correlationId); - } -} -/** @internal */ -class RequestParameterBuilder { - constructor(correlationId, performanceClient) { - this.parameters = new Map(); - this.performanceClient = performanceClient; - this.correlationId = correlationId; - } - /** - * add response_type = code - */ - addResponseTypeCode() { - this.parameters.set(RESPONSE_TYPE, encodeURIComponent(Constants$1.CODE_RESPONSE_TYPE)); - } - /** - * add response_type = token id_token - */ - addResponseTypeForTokenAndIdToken() { - this.parameters.set(RESPONSE_TYPE, encodeURIComponent(`${Constants$1.TOKEN_RESPONSE_TYPE} ${Constants$1.ID_TOKEN_RESPONSE_TYPE}`)); - } - /** - * add response_mode. defaults to query. - * @param responseMode - */ - addResponseMode(responseMode) { - this.parameters.set(RESPONSE_MODE, encodeURIComponent(responseMode ? responseMode : ResponseMode.QUERY)); - } - /** - * Add flag to indicate STS should attempt to use WAM if available - */ - addNativeBroker() { - this.parameters.set(NATIVE_BROKER, encodeURIComponent("1")); - } - /** - * add scopes. set addOidcScopes to false to prevent default scopes in non-user scenarios - * @param scopeSet - * @param addOidcScopes - */ - addScopes(scopes, addOidcScopes = true, defaultScopes = OIDC_DEFAULT_SCOPES) { - // Always add openid to the scopes when adding OIDC scopes - if (addOidcScopes && - !defaultScopes.includes("openid") && - !scopes.includes("openid")) { - defaultScopes.push("openid"); - } - const requestScopes = addOidcScopes - ? [...(scopes || []), ...defaultScopes] - : scopes || []; - const scopeSet = new ScopeSet(requestScopes); - this.parameters.set(SCOPE, encodeURIComponent(scopeSet.printScopes())); - } - /** - * add clientId - * @param clientId - */ - addClientId(clientId) { - this.parameters.set(CLIENT_ID, encodeURIComponent(clientId)); - } - /** - * add redirect_uri - * @param redirectUri - */ - addRedirectUri(redirectUri) { - RequestValidator.validateRedirectUri(redirectUri); - this.parameters.set(REDIRECT_URI, encodeURIComponent(redirectUri)); - } - /** - * add post logout redirectUri - * @param redirectUri - */ - addPostLogoutRedirectUri(redirectUri) { - RequestValidator.validateRedirectUri(redirectUri); - this.parameters.set(POST_LOGOUT_URI, encodeURIComponent(redirectUri)); - } - /** - * add id_token_hint to logout request - * @param idTokenHint - */ - addIdTokenHint(idTokenHint) { - this.parameters.set(ID_TOKEN_HINT, encodeURIComponent(idTokenHint)); - } - /** - * add domain_hint - * @param domainHint - */ - addDomainHint(domainHint) { - this.parameters.set(DOMAIN_HINT, encodeURIComponent(domainHint)); - } - /** - * add login_hint - * @param loginHint - */ - addLoginHint(loginHint) { - this.parameters.set(LOGIN_HINT, encodeURIComponent(loginHint)); - } - /** - * Adds the CCS (Cache Credential Service) query parameter for login_hint - * @param loginHint - */ - addCcsUpn(loginHint) { - this.parameters.set(HeaderNames.CCS_HEADER, encodeURIComponent(`UPN:${loginHint}`)); - } - /** - * Adds the CCS (Cache Credential Service) query parameter for account object - * @param loginHint - */ - addCcsOid(clientInfo) { - this.parameters.set(HeaderNames.CCS_HEADER, encodeURIComponent(`Oid:${clientInfo.uid}@${clientInfo.utid}`)); - } - /** - * add sid - * @param sid - */ - addSid(sid) { - this.parameters.set(SID, encodeURIComponent(sid)); - } - /** - * add claims - * @param claims - */ - addClaims(claims, clientCapabilities) { - const mergedClaims = this.addClientCapabilitiesToClaims(claims, clientCapabilities); - RequestValidator.validateClaims(mergedClaims); - this.parameters.set(CLAIMS, encodeURIComponent(mergedClaims)); - } - /** - * add correlationId - * @param correlationId - */ - addCorrelationId(correlationId) { - this.parameters.set(CLIENT_REQUEST_ID, encodeURIComponent(correlationId)); - } - /** - * add library info query params - * @param libraryInfo - */ - addLibraryInfo(libraryInfo) { - // Telemetry Info - this.parameters.set(X_CLIENT_SKU, libraryInfo.sku); - this.parameters.set(X_CLIENT_VER, libraryInfo.version); - if (libraryInfo.os) { - this.parameters.set(X_CLIENT_OS, libraryInfo.os); - } - if (libraryInfo.cpu) { - this.parameters.set(X_CLIENT_CPU, libraryInfo.cpu); - } - } - /** - * Add client telemetry parameters - * @param appTelemetry - */ - addApplicationTelemetry(appTelemetry) { - if (appTelemetry?.appName) { - this.parameters.set(X_APP_NAME, appTelemetry.appName); - } - if (appTelemetry?.appVersion) { - this.parameters.set(X_APP_VER, appTelemetry.appVersion); - } - } - /** - * add prompt - * @param prompt - */ - addPrompt(prompt) { - RequestValidator.validatePrompt(prompt); - this.parameters.set(`${PROMPT}`, encodeURIComponent(prompt)); - } - /** - * add state - * @param state - */ - addState(state) { - if (state) { - this.parameters.set(STATE, encodeURIComponent(state)); - } - } - /** - * add nonce - * @param nonce - */ - addNonce(nonce) { - this.parameters.set(NONCE, encodeURIComponent(nonce)); - } - /** - * add code_challenge and code_challenge_method - * - throw if either of them are not passed - * @param codeChallenge - * @param codeChallengeMethod - */ - addCodeChallengeParams(codeChallenge, codeChallengeMethod) { - RequestValidator.validateCodeChallengeParams(codeChallenge, codeChallengeMethod); - if (codeChallenge && codeChallengeMethod) { - this.parameters.set(CODE_CHALLENGE, encodeURIComponent(codeChallenge)); - this.parameters.set(CODE_CHALLENGE_METHOD, encodeURIComponent(codeChallengeMethod)); - } - else { - throw createClientConfigurationError(pkceParamsMissing); - } - } - /** - * add the `authorization_code` passed by the user to exchange for a token - * @param code - */ - addAuthorizationCode(code) { - this.parameters.set(CODE, encodeURIComponent(code)); - } - /** - * add the `authorization_code` passed by the user to exchange for a token - * @param code - */ - addDeviceCode(code) { - this.parameters.set(DEVICE_CODE, encodeURIComponent(code)); - } - /** - * add the `refreshToken` passed by the user - * @param refreshToken - */ - addRefreshToken(refreshToken) { - this.parameters.set(REFRESH_TOKEN, encodeURIComponent(refreshToken)); - } - /** - * add the `code_verifier` passed by the user to exchange for a token - * @param codeVerifier - */ - addCodeVerifier(codeVerifier) { - this.parameters.set(CODE_VERIFIER, encodeURIComponent(codeVerifier)); - } - /** - * add client_secret - * @param clientSecret - */ - addClientSecret(clientSecret) { - this.parameters.set(CLIENT_SECRET, encodeURIComponent(clientSecret)); - } - /** - * add clientAssertion for confidential client flows - * @param clientAssertion - */ - addClientAssertion(clientAssertion) { - if (clientAssertion) { - this.parameters.set(CLIENT_ASSERTION, encodeURIComponent(clientAssertion)); - } - } - /** - * add clientAssertionType for confidential client flows - * @param clientAssertionType - */ - addClientAssertionType(clientAssertionType) { - if (clientAssertionType) { - this.parameters.set(CLIENT_ASSERTION_TYPE, encodeURIComponent(clientAssertionType)); - } - } - /** - * add OBO assertion for confidential client flows - * @param clientAssertion - */ - addOboAssertion(oboAssertion) { - this.parameters.set(OBO_ASSERTION, encodeURIComponent(oboAssertion)); - } - /** - * add grant type - * @param grantType - */ - addRequestTokenUse(tokenUse) { - this.parameters.set(REQUESTED_TOKEN_USE, encodeURIComponent(tokenUse)); - } - /** - * add grant type - * @param grantType - */ - addGrantType(grantType) { - this.parameters.set(GRANT_TYPE, encodeURIComponent(grantType)); - } - /** - * add client info - * - */ - addClientInfo() { - this.parameters.set(CLIENT_INFO, "1"); - } - /** - * add extraQueryParams - * @param eQParams - */ - addExtraQueryParameters(eQParams) { - Object.entries(eQParams).forEach(([key, value]) => { - if (!this.parameters.has(key) && value) { - this.parameters.set(key, value); - } - }); - } - addClientCapabilitiesToClaims(claims, clientCapabilities) { - let mergedClaims; - // Parse provided claims into JSON object or initialize empty object - if (!claims) { - mergedClaims = {}; - } - else { - try { - mergedClaims = JSON.parse(claims); - } - catch (e) { - throw createClientConfigurationError(invalidClaims); - } - } - if (clientCapabilities && clientCapabilities.length > 0) { - if (!mergedClaims.hasOwnProperty(ClaimsRequestKeys.ACCESS_TOKEN)) { - // Add access_token key to claims object - mergedClaims[ClaimsRequestKeys.ACCESS_TOKEN] = {}; - } - // Add xms_cc claim with provided clientCapabilities to access_token key - mergedClaims[ClaimsRequestKeys.ACCESS_TOKEN][ClaimsRequestKeys.XMS_CC] = { - values: clientCapabilities, - }; - } - return JSON.stringify(mergedClaims); - } - /** - * adds `username` for Password Grant flow - * @param username - */ - addUsername(username) { - this.parameters.set(PasswordGrantConstants.username, encodeURIComponent(username)); - } - /** - * adds `password` for Password Grant flow - * @param password - */ - addPassword(password) { - this.parameters.set(PasswordGrantConstants.password, encodeURIComponent(password)); - } - /** - * add pop_jwk to query params - * @param cnfString - */ - addPopToken(cnfString) { - if (cnfString) { - this.parameters.set(TOKEN_TYPE, AuthenticationScheme.POP); - this.parameters.set(REQ_CNF, encodeURIComponent(cnfString)); - } - } - /** - * add SSH JWK and key ID to query params - */ - addSshJwk(sshJwkString) { - if (sshJwkString) { - this.parameters.set(TOKEN_TYPE, AuthenticationScheme.SSH); - this.parameters.set(REQ_CNF, encodeURIComponent(sshJwkString)); - } - } - /** - * add server telemetry fields - * @param serverTelemetryManager - */ - addServerTelemetry(serverTelemetryManager) { - this.parameters.set(X_CLIENT_CURR_TELEM, serverTelemetryManager.generateCurrentRequestHeaderValue()); - this.parameters.set(X_CLIENT_LAST_TELEM, serverTelemetryManager.generateLastRequestHeaderValue()); - } - /** - * Adds parameter that indicates to the server that throttling is supported - */ - addThrottling() { - this.parameters.set(X_MS_LIB_CAPABILITY, ThrottlingConstants.X_MS_LIB_CAPABILITY_VALUE); - } - /** - * Adds logout_hint parameter for "silent" logout which prevent server account picker - */ - addLogoutHint(logoutHint) { - this.parameters.set(LOGOUT_HINT, encodeURIComponent(logoutHint)); - } - addBrokerParameters(params) { - const brokerParams = {}; - brokerParams[BROKER_CLIENT_ID] = - params.brokerClientId; - brokerParams[BROKER_REDIRECT_URI] = - params.brokerRedirectUri; - this.addExtraQueryParameters(brokerParams); - } - /** - * Utility to create a URL from the params map - */ - createQueryString() { - const queryParameterArray = new Array(); - this.parameters.forEach((value, key) => { - queryParameterArray.push(`${key}=${value}`); - }); - instrumentBrokerParams(this.parameters, this.correlationId, this.performanceClient); - return queryParameterArray.join("&"); - } -} - -/*! @azure/msal-common v14.16.1 2025-08-05 */ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -function isOpenIdConfigResponse(response) { - return (response.hasOwnProperty("authorization_endpoint") && - response.hasOwnProperty("token_endpoint") && - response.hasOwnProperty("issuer") && - response.hasOwnProperty("jwks_uri")); -} - -/*! @azure/msal-common v14.16.1 2025-08-05 */ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -function isCloudInstanceDiscoveryResponse(response) { - return (response.hasOwnProperty("tenant_discovery_endpoint") && - response.hasOwnProperty("metadata")); -} - -/*! @azure/msal-common v14.16.1 2025-08-05 */ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -function isCloudInstanceDiscoveryErrorResponse(response) { - return (response.hasOwnProperty("error") && - response.hasOwnProperty("error_description")); -} - -/*! @azure/msal-common v14.16.1 2025-08-05 */ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * Enumeration of operations that are instrumented by have their performance measured by the PerformanceClient. - * - * @export - * @enum {number} - */ -const PerformanceEvents = { - /** - * acquireTokenByCode API (msal-browser and msal-node). - * Used to acquire tokens by trading an authorization code against the token endpoint. - */ - AcquireTokenByCode: "acquireTokenByCode", - /** - * acquireTokenByRefreshToken API (msal-browser and msal-node). - * Used to renew an access token using a refresh token against the token endpoint. - */ - AcquireTokenByRefreshToken: "acquireTokenByRefreshToken", - /** - * acquireTokenSilent API (msal-browser and msal-node). - * Used to silently acquire a new access token (from the cache or the network). - */ - AcquireTokenSilent: "acquireTokenSilent", - /** - * acquireTokenSilentAsync (msal-browser). - * Internal API for acquireTokenSilent. - */ - AcquireTokenSilentAsync: "acquireTokenSilentAsync", - /** - * acquireTokenPopup (msal-browser). - * Used to acquire a new access token interactively through pop ups - */ - AcquireTokenPopup: "acquireTokenPopup", - /** - * acquireTokenPreRedirect (msal-browser). - * First part of the redirect flow. - * Used to acquire a new access token interactively through redirects. - */ - AcquireTokenPreRedirect: "acquireTokenPreRedirect", - /** - * acquireTokenRedirect (msal-browser). - * Second part of the redirect flow. - * Used to acquire a new access token interactively through redirects. - */ - AcquireTokenRedirect: "acquireTokenRedirect", - /** - * getPublicKeyThumbprint API in CryptoOpts class (msal-browser). - * Used to generate a public/private keypair and generate a public key thumbprint for pop requests. - */ - CryptoOptsGetPublicKeyThumbprint: "cryptoOptsGetPublicKeyThumbprint", - /** - * signJwt API in CryptoOpts class (msal-browser). - * Used to signed a pop token. - */ - CryptoOptsSignJwt: "cryptoOptsSignJwt", - /** - * acquireToken API in the SilentCacheClient class (msal-browser). - * Used to read access tokens from the cache. - */ - SilentCacheClientAcquireToken: "silentCacheClientAcquireToken", - /** - * acquireToken API in the SilentIframeClient class (msal-browser). - * Used to acquire a new set of tokens from the authorize endpoint in a hidden iframe. - */ - SilentIframeClientAcquireToken: "silentIframeClientAcquireToken", - AwaitConcurrentIframe: "awaitConcurrentIframe", - /** - * acquireToken API in SilentRereshClient (msal-browser). - * Used to acquire a new set of tokens from the token endpoint using a refresh token. - */ - SilentRefreshClientAcquireToken: "silentRefreshClientAcquireToken", - /** - * ssoSilent API (msal-browser). - * Used to silently acquire an authorization code and set of tokens using a hidden iframe. - */ - SsoSilent: "ssoSilent", - /** - * getDiscoveredAuthority API in StandardInteractionClient class (msal-browser). - * Used to load authority metadata for a request. - */ - StandardInteractionClientGetDiscoveredAuthority: "standardInteractionClientGetDiscoveredAuthority", - /** - * acquireToken APIs in msal-browser. - * Used to make an /authorize endpoint call with native brokering enabled. - */ - FetchAccountIdWithNativeBroker: "fetchAccountIdWithNativeBroker", - /** - * acquireToken API in NativeInteractionClient class (msal-browser). - * Used to acquire a token from Native component when native brokering is enabled. - */ - NativeInteractionClientAcquireToken: "nativeInteractionClientAcquireToken", - /** - * Time spent creating default headers for requests to token endpoint - */ - BaseClientCreateTokenRequestHeaders: "baseClientCreateTokenRequestHeaders", - /** - * Time spent sending/waiting for the response of a request to the token endpoint - */ - NetworkClientSendPostRequestAsync: "networkClientSendPostRequestAsync", - RefreshTokenClientExecutePostToTokenEndpoint: "refreshTokenClientExecutePostToTokenEndpoint", - AuthorizationCodeClientExecutePostToTokenEndpoint: "authorizationCodeClientExecutePostToTokenEndpoint", - /** - * Used to measure the time taken for completing embedded-broker handshake (PW-Broker). - */ - BrokerHandhshake: "brokerHandshake", - /** - * acquireTokenByRefreshToken API in BrokerClientApplication (PW-Broker) . - */ - AcquireTokenByRefreshTokenInBroker: "acquireTokenByRefreshTokenInBroker", - /** - * Time taken for token acquisition by broker - */ - AcquireTokenByBroker: "acquireTokenByBroker", - /** - * Time spent on the network for refresh token acquisition - */ - RefreshTokenClientExecuteTokenRequest: "refreshTokenClientExecuteTokenRequest", - /** - * Time taken for acquiring refresh token , records RT size - */ - RefreshTokenClientAcquireToken: "refreshTokenClientAcquireToken", - /** - * Time taken for acquiring cached refresh token - */ - RefreshTokenClientAcquireTokenWithCachedRefreshToken: "refreshTokenClientAcquireTokenWithCachedRefreshToken", - /** - * acquireTokenByRefreshToken API in RefreshTokenClient (msal-common). - */ - RefreshTokenClientAcquireTokenByRefreshToken: "refreshTokenClientAcquireTokenByRefreshToken", - /** - * Helper function to create token request body in RefreshTokenClient (msal-common). - */ - RefreshTokenClientCreateTokenRequestBody: "refreshTokenClientCreateTokenRequestBody", - /** - * acquireTokenFromCache (msal-browser). - * Internal API for acquiring token from cache - */ - AcquireTokenFromCache: "acquireTokenFromCache", - SilentFlowClientAcquireCachedToken: "silentFlowClientAcquireCachedToken", - SilentFlowClientGenerateResultFromCacheRecord: "silentFlowClientGenerateResultFromCacheRecord", - /** - * acquireTokenBySilentIframe (msal-browser). - * Internal API for acquiring token by silent Iframe - */ - AcquireTokenBySilentIframe: "acquireTokenBySilentIframe", - /** - * Internal API for initializing base request in BaseInteractionClient (msal-browser) - */ - InitializeBaseRequest: "initializeBaseRequest", - /** - * Internal API for initializing silent request in SilentCacheClient (msal-browser) - */ - InitializeSilentRequest: "initializeSilentRequest", - InitializeClientApplication: "initializeClientApplication", - /** - * Helper function in SilentIframeClient class (msal-browser). - */ - SilentIframeClientTokenHelper: "silentIframeClientTokenHelper", - /** - * SilentHandler - */ - SilentHandlerInitiateAuthRequest: "silentHandlerInitiateAuthRequest", - SilentHandlerMonitorIframeForHash: "silentHandlerMonitorIframeForHash", - SilentHandlerLoadFrame: "silentHandlerLoadFrame", - SilentHandlerLoadFrameSync: "silentHandlerLoadFrameSync", - /** - * Helper functions in StandardInteractionClient class (msal-browser) - */ - StandardInteractionClientCreateAuthCodeClient: "standardInteractionClientCreateAuthCodeClient", - StandardInteractionClientGetClientConfiguration: "standardInteractionClientGetClientConfiguration", - StandardInteractionClientInitializeAuthorizationRequest: "standardInteractionClientInitializeAuthorizationRequest", - StandardInteractionClientInitializeAuthorizationCodeRequest: "standardInteractionClientInitializeAuthorizationCodeRequest", - /** - * getAuthCodeUrl API (msal-browser and msal-node). - */ - GetAuthCodeUrl: "getAuthCodeUrl", - /** - * Functions from InteractionHandler (msal-browser) - */ - HandleCodeResponseFromServer: "handleCodeResponseFromServer", - HandleCodeResponse: "handleCodeResponse", - UpdateTokenEndpointAuthority: "updateTokenEndpointAuthority", - /** - * APIs in Authorization Code Client (msal-common) - */ - AuthClientAcquireToken: "authClientAcquireToken", - AuthClientExecuteTokenRequest: "authClientExecuteTokenRequest", - AuthClientCreateTokenRequestBody: "authClientCreateTokenRequestBody", - AuthClientCreateQueryString: "authClientCreateQueryString", - /** - * Generate functions in PopTokenGenerator (msal-common) - */ - PopTokenGenerateCnf: "popTokenGenerateCnf", - PopTokenGenerateKid: "popTokenGenerateKid", - /** - * handleServerTokenResponse API in ResponseHandler (msal-common) - */ - HandleServerTokenResponse: "handleServerTokenResponse", - DeserializeResponse: "deserializeResponse", - /** - * Authority functions - */ - AuthorityFactoryCreateDiscoveredInstance: "authorityFactoryCreateDiscoveredInstance", - AuthorityResolveEndpointsAsync: "authorityResolveEndpointsAsync", - AuthorityResolveEndpointsFromLocalSources: "authorityResolveEndpointsFromLocalSources", - AuthorityGetCloudDiscoveryMetadataFromNetwork: "authorityGetCloudDiscoveryMetadataFromNetwork", - AuthorityUpdateCloudDiscoveryMetadata: "authorityUpdateCloudDiscoveryMetadata", - AuthorityGetEndpointMetadataFromNetwork: "authorityGetEndpointMetadataFromNetwork", - AuthorityUpdateEndpointMetadata: "authorityUpdateEndpointMetadata", - AuthorityUpdateMetadataWithRegionalInformation: "authorityUpdateMetadataWithRegionalInformation", - /** - * Region Discovery functions - */ - RegionDiscoveryDetectRegion: "regionDiscoveryDetectRegion", - RegionDiscoveryGetRegionFromIMDS: "regionDiscoveryGetRegionFromIMDS", - RegionDiscoveryGetCurrentVersion: "regionDiscoveryGetCurrentVersion", - AcquireTokenByCodeAsync: "acquireTokenByCodeAsync", - GetEndpointMetadataFromNetwork: "getEndpointMetadataFromNetwork", - GetCloudDiscoveryMetadataFromNetworkMeasurement: "getCloudDiscoveryMetadataFromNetworkMeasurement", - HandleRedirectPromiseMeasurement: "handleRedirectPromise", - HandleNativeRedirectPromiseMeasurement: "handleNativeRedirectPromise", - UpdateCloudDiscoveryMetadataMeasurement: "updateCloudDiscoveryMetadataMeasurement", - UsernamePasswordClientAcquireToken: "usernamePasswordClientAcquireToken", - NativeMessageHandlerHandshake: "nativeMessageHandlerHandshake", - NativeGenerateAuthResult: "nativeGenerateAuthResult", - RemoveHiddenIframe: "removeHiddenIframe", - /** - * Cache operations - */ - ClearTokensAndKeysWithClaims: "clearTokensAndKeysWithClaims", - CacheManagerGetRefreshToken: "cacheManagerGetRefreshToken", - /** - * Crypto Operations - */ - GeneratePkceCodes: "generatePkceCodes", - GenerateCodeVerifier: "generateCodeVerifier", - GenerateCodeChallengeFromVerifier: "generateCodeChallengeFromVerifier", - Sha256Digest: "sha256Digest", - GetRandomValues: "getRandomValues", -}; - -/*! @azure/msal-common v14.16.1 2025-08-05 */ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * Wraps a function with a performance measurement. - * Usage: invoke(functionToCall, performanceClient, "EventName", "correlationId")(...argsToPassToFunction) - * @param callback - * @param eventName - * @param logger - * @param telemetryClient - * @param correlationId - * @returns - * @internal - */ -// eslint-disable-next-line @typescript-eslint/no-explicit-any -const invoke = (callback, eventName, logger, telemetryClient, correlationId) => { - return (...args) => { - logger.trace(`Executing function ${eventName}`); - const inProgressEvent = telemetryClient?.startMeasurement(eventName, correlationId); - if (correlationId) { - // Track number of times this API is called in a single request - const eventCount = eventName + "CallCount"; - telemetryClient?.incrementFields({ [eventCount]: 1 }, correlationId); - } - try { - const result = callback(...args); - inProgressEvent?.end({ - success: true, - }); - logger.trace(`Returning result from ${eventName}`); - return result; - } - catch (e) { - logger.trace(`Error occurred in ${eventName}`); - try { - logger.trace(JSON.stringify(e)); - } - catch (e) { - logger.trace("Unable to print error message."); - } - inProgressEvent?.end({ - success: false, - }, e); - throw e; - } - }; -}; -/** - * Wraps an async function with a performance measurement. - * Usage: invokeAsync(functionToCall, performanceClient, "EventName", "correlationId")(...argsToPassToFunction) - * @param callback - * @param eventName - * @param logger - * @param telemetryClient - * @param correlationId - * @returns - * @internal - * - */ -// eslint-disable-next-line @typescript-eslint/no-explicit-any -const invokeAsync = (callback, eventName, logger, telemetryClient, correlationId) => { - return (...args) => { - logger.trace(`Executing function ${eventName}`); - const inProgressEvent = telemetryClient?.startMeasurement(eventName, correlationId); - if (correlationId) { - // Track number of times this API is called in a single request - const eventCount = eventName + "CallCount"; - telemetryClient?.incrementFields({ [eventCount]: 1 }, correlationId); - } - telemetryClient?.setPreQueueTime(eventName, correlationId); - return callback(...args) - .then((response) => { - logger.trace(`Returning result from ${eventName}`); - inProgressEvent?.end({ - success: true, - }); - return response; - }) - .catch((e) => { - logger.trace(`Error occurred in ${eventName}`); - try { - logger.trace(JSON.stringify(e)); - } - catch (e) { - logger.trace("Unable to print error message."); - } - inProgressEvent?.end({ - success: false, - }, e); - throw e; - }); - }; -}; - -/*! @azure/msal-common v14.16.1 2025-08-05 */ - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -class RegionDiscovery { - constructor(networkInterface, logger, performanceClient, correlationId) { - this.networkInterface = networkInterface; - this.logger = logger; - this.performanceClient = performanceClient; - this.correlationId = correlationId; - } - /** - * Detect the region from the application's environment. - * - * @returns Promise - */ - async detectRegion(environmentRegion, regionDiscoveryMetadata) { - this.performanceClient?.addQueueMeasurement(PerformanceEvents.RegionDiscoveryDetectRegion, this.correlationId); - // Initialize auto detected region with the region from the envrionment - let autodetectedRegionName = environmentRegion; - // Check if a region was detected from the environment, if not, attempt to get the region from IMDS - if (!autodetectedRegionName) { - const options = RegionDiscovery.IMDS_OPTIONS; - try { - const localIMDSVersionResponse = await invokeAsync(this.getRegionFromIMDS.bind(this), PerformanceEvents.RegionDiscoveryGetRegionFromIMDS, this.logger, this.performanceClient, this.correlationId)(Constants$1.IMDS_VERSION, options); - if (localIMDSVersionResponse.status === - ResponseCodes.httpSuccess) { - autodetectedRegionName = localIMDSVersionResponse.body; - regionDiscoveryMetadata.region_source = - RegionDiscoverySources.IMDS; - } - // If the response using the local IMDS version failed, try to fetch the current version of IMDS and retry. - if (localIMDSVersionResponse.status === - ResponseCodes.httpBadRequest) { - const currentIMDSVersion = await invokeAsync(this.getCurrentVersion.bind(this), PerformanceEvents.RegionDiscoveryGetCurrentVersion, this.logger, this.performanceClient, this.correlationId)(options); - if (!currentIMDSVersion) { - regionDiscoveryMetadata.region_source = - RegionDiscoverySources.FAILED_AUTO_DETECTION; - return null; - } - const currentIMDSVersionResponse = await invokeAsync(this.getRegionFromIMDS.bind(this), PerformanceEvents.RegionDiscoveryGetRegionFromIMDS, this.logger, this.performanceClient, this.correlationId)(currentIMDSVersion, options); - if (currentIMDSVersionResponse.status === - ResponseCodes.httpSuccess) { - autodetectedRegionName = - currentIMDSVersionResponse.body; - regionDiscoveryMetadata.region_source = - RegionDiscoverySources.IMDS; - } - } - } - catch (e) { - regionDiscoveryMetadata.region_source = - RegionDiscoverySources.FAILED_AUTO_DETECTION; - return null; - } - } - else { - regionDiscoveryMetadata.region_source = - RegionDiscoverySources.ENVIRONMENT_VARIABLE; - } - // If no region was auto detected from the environment or from the IMDS endpoint, mark the attempt as a FAILED_AUTO_DETECTION - if (!autodetectedRegionName) { - regionDiscoveryMetadata.region_source = - RegionDiscoverySources.FAILED_AUTO_DETECTION; - } - return autodetectedRegionName || null; - } - /** - * Make the call to the IMDS endpoint - * - * @param imdsEndpointUrl - * @returns Promise> - */ - async getRegionFromIMDS(version, options) { - this.performanceClient?.addQueueMeasurement(PerformanceEvents.RegionDiscoveryGetRegionFromIMDS, this.correlationId); - return this.networkInterface.sendGetRequestAsync(`${Constants$1.IMDS_ENDPOINT}?api-version=${version}&format=text`, options, Constants$1.IMDS_TIMEOUT); - } - /** - * Get the most recent version of the IMDS endpoint available - * - * @returns Promise - */ - async getCurrentVersion(options) { - this.performanceClient?.addQueueMeasurement(PerformanceEvents.RegionDiscoveryGetCurrentVersion, this.correlationId); - try { - const response = await this.networkInterface.sendGetRequestAsync(`${Constants$1.IMDS_ENDPOINT}?format=json`, options); - // When IMDS endpoint is called without the api version query param, bad request response comes back with latest version. - if (response.status === ResponseCodes.httpBadRequest && - response.body && - response.body["newest-versions"] && - response.body["newest-versions"].length > 0) { - return response.body["newest-versions"][0]; - } - return null; - } - catch (e) { - return null; - } - } -} -// Options for the IMDS endpoint request -RegionDiscovery.IMDS_OPTIONS = { - headers: { - Metadata: "true", - }, -}; - -/*! @azure/msal-common v14.16.1 2025-08-05 */ - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * The authority class validates the authority URIs used by the user, and retrieves the OpenID Configuration Data from the - * endpoint. It will store the pertinent config data in this object for use during token calls. - * @internal - */ -class Authority { - constructor(authority, networkInterface, cacheManager, authorityOptions, logger, correlationId, performanceClient, managedIdentity) { - this.canonicalAuthority = authority; - this._canonicalAuthority.validateAsUri(); - this.networkInterface = networkInterface; - this.cacheManager = cacheManager; - this.authorityOptions = authorityOptions; - this.regionDiscoveryMetadata = { - region_used: undefined, - region_source: undefined, - region_outcome: undefined, - }; - this.logger = logger; - this.performanceClient = performanceClient; - this.correlationId = correlationId; - this.managedIdentity = managedIdentity || false; - this.regionDiscovery = new RegionDiscovery(networkInterface, this.logger, this.performanceClient, this.correlationId); - } - /** - * Get {@link AuthorityType} - * @param authorityUri {@link IUri} - * @private - */ - getAuthorityType(authorityUri) { - // CIAM auth url pattern is being standardized as: .ciamlogin.com - if (authorityUri.HostNameAndPort.endsWith(Constants$1.CIAM_AUTH_URL)) { - return AuthorityType.Ciam; - } - const pathSegments = authorityUri.PathSegments; - if (pathSegments.length) { - switch (pathSegments[0].toLowerCase()) { - case Constants$1.ADFS: - return AuthorityType.Adfs; - case Constants$1.DSTS: - return AuthorityType.Dsts; - } - } - return AuthorityType.Default; - } - // See above for AuthorityType - get authorityType() { - return this.getAuthorityType(this.canonicalAuthorityUrlComponents); - } - /** - * ProtocolMode enum representing the way endpoints are constructed. - */ - get protocolMode() { - return this.authorityOptions.protocolMode; - } - /** - * Returns authorityOptions which can be used to reinstantiate a new authority instance - */ - get options() { - return this.authorityOptions; - } - /** - * A URL that is the authority set by the developer - */ - get canonicalAuthority() { - return this._canonicalAuthority.urlString; - } - /** - * Sets canonical authority. - */ - set canonicalAuthority(url) { - this._canonicalAuthority = new UrlString(url); - this._canonicalAuthority.validateAsUri(); - this._canonicalAuthorityUrlComponents = null; - } - /** - * Get authority components. - */ - get canonicalAuthorityUrlComponents() { - if (!this._canonicalAuthorityUrlComponents) { - this._canonicalAuthorityUrlComponents = - this._canonicalAuthority.getUrlComponents(); - } - return this._canonicalAuthorityUrlComponents; - } - /** - * Get hostname and port i.e. login.microsoftonline.com - */ - get hostnameAndPort() { - return this.canonicalAuthorityUrlComponents.HostNameAndPort.toLowerCase(); - } - /** - * Get tenant for authority. - */ - get tenant() { - return this.canonicalAuthorityUrlComponents.PathSegments[0]; - } - /** - * OAuth /authorize endpoint for requests - */ - get authorizationEndpoint() { - if (this.discoveryComplete()) { - return this.replacePath(this.metadata.authorization_endpoint); - } - else { - throw createClientAuthError(endpointResolutionError); - } - } - /** - * OAuth /token endpoint for requests - */ - get tokenEndpoint() { - if (this.discoveryComplete()) { - return this.replacePath(this.metadata.token_endpoint); - } - else { - throw createClientAuthError(endpointResolutionError); - } - } - get deviceCodeEndpoint() { - if (this.discoveryComplete()) { - return this.replacePath(this.metadata.token_endpoint.replace("/token", "/devicecode")); - } - else { - throw createClientAuthError(endpointResolutionError); - } - } - /** - * OAuth logout endpoint for requests - */ - get endSessionEndpoint() { - if (this.discoveryComplete()) { - // ROPC policies may not have end_session_endpoint set - if (!this.metadata.end_session_endpoint) { - throw createClientAuthError(endSessionEndpointNotSupported); - } - return this.replacePath(this.metadata.end_session_endpoint); - } - else { - throw createClientAuthError(endpointResolutionError); - } - } - /** - * OAuth issuer for requests - */ - get selfSignedJwtAudience() { - if (this.discoveryComplete()) { - return this.replacePath(this.metadata.issuer); - } - else { - throw createClientAuthError(endpointResolutionError); - } - } - /** - * Jwks_uri for token signing keys - */ - get jwksUri() { - if (this.discoveryComplete()) { - return this.replacePath(this.metadata.jwks_uri); - } - else { - throw createClientAuthError(endpointResolutionError); - } - } - /** - * Returns a flag indicating that tenant name can be replaced in authority {@link IUri} - * @param authorityUri {@link IUri} - * @private - */ - canReplaceTenant(authorityUri) { - return (authorityUri.PathSegments.length === 1 && - !Authority.reservedTenantDomains.has(authorityUri.PathSegments[0]) && - this.getAuthorityType(authorityUri) === AuthorityType.Default && - this.protocolMode === ProtocolMode.AAD); - } - /** - * Replaces tenant in url path with current tenant. Defaults to common. - * @param urlString - */ - replaceTenant(urlString) { - return urlString.replace(/{tenant}|{tenantid}/g, this.tenant); - } - /** - * Replaces path such as tenant or policy with the current tenant or policy. - * @param urlString - */ - replacePath(urlString) { - let endpoint = urlString; - const cachedAuthorityUrl = new UrlString(this.metadata.canonical_authority); - const cachedAuthorityUrlComponents = cachedAuthorityUrl.getUrlComponents(); - const cachedAuthorityParts = cachedAuthorityUrlComponents.PathSegments; - const currentAuthorityParts = this.canonicalAuthorityUrlComponents.PathSegments; - currentAuthorityParts.forEach((currentPart, index) => { - let cachedPart = cachedAuthorityParts[index]; - if (index === 0 && - this.canReplaceTenant(cachedAuthorityUrlComponents)) { - const tenantId = new UrlString(this.metadata.authorization_endpoint).getUrlComponents().PathSegments[0]; - /** - * Check if AAD canonical authority contains tenant domain name, for example "testdomain.onmicrosoft.com", - * by comparing its first path segment to the corresponding authorization endpoint path segment, which is - * always resolved with tenant id by OIDC. - */ - if (cachedPart !== tenantId) { - this.logger.verbose(`Replacing tenant domain name ${cachedPart} with id ${tenantId}`); - cachedPart = tenantId; - } - } - if (currentPart !== cachedPart) { - endpoint = endpoint.replace(`/${cachedPart}/`, `/${currentPart}/`); - } - }); - return this.replaceTenant(endpoint); - } - /** - * The default open id configuration endpoint for any canonical authority. - */ - get defaultOpenIdConfigurationEndpoint() { - const canonicalAuthorityHost = this.hostnameAndPort; - if (this.canonicalAuthority.endsWith("v2.0/") || - this.authorityType === AuthorityType.Adfs || - (this.protocolMode !== ProtocolMode.AAD && - !this.isAliasOfKnownMicrosoftAuthority(canonicalAuthorityHost))) { - return `${this.canonicalAuthority}.well-known/openid-configuration`; - } - return `${this.canonicalAuthority}v2.0/.well-known/openid-configuration`; - } - /** - * Boolean that returns whether or not tenant discovery has been completed. - */ - discoveryComplete() { - return !!this.metadata; - } - /** - * Perform endpoint discovery to discover aliases, preferred_cache, preferred_network - * and the /authorize, /token and logout endpoints. - */ - async resolveEndpointsAsync() { - this.performanceClient?.addQueueMeasurement(PerformanceEvents.AuthorityResolveEndpointsAsync, this.correlationId); - const metadataEntity = this.getCurrentMetadataEntity(); - const cloudDiscoverySource = await invokeAsync(this.updateCloudDiscoveryMetadata.bind(this), PerformanceEvents.AuthorityUpdateCloudDiscoveryMetadata, this.logger, this.performanceClient, this.correlationId)(metadataEntity); - this.canonicalAuthority = this.canonicalAuthority.replace(this.hostnameAndPort, metadataEntity.preferred_network); - const endpointSource = await invokeAsync(this.updateEndpointMetadata.bind(this), PerformanceEvents.AuthorityUpdateEndpointMetadata, this.logger, this.performanceClient, this.correlationId)(metadataEntity); - this.updateCachedMetadata(metadataEntity, cloudDiscoverySource, { - source: endpointSource, - }); - this.performanceClient?.addFields({ - cloudDiscoverySource: cloudDiscoverySource, - authorityEndpointSource: endpointSource, - }, this.correlationId); - } - /** - * Returns metadata entity from cache if it exists, otherwiser returns a new metadata entity built - * from the configured canonical authority - * @returns - */ - getCurrentMetadataEntity() { - let metadataEntity = this.cacheManager.getAuthorityMetadataByAlias(this.hostnameAndPort); - if (!metadataEntity) { - metadataEntity = { - aliases: [], - preferred_cache: this.hostnameAndPort, - preferred_network: this.hostnameAndPort, - canonical_authority: this.canonicalAuthority, - authorization_endpoint: "", - token_endpoint: "", - end_session_endpoint: "", - issuer: "", - aliasesFromNetwork: false, - endpointsFromNetwork: false, - expiresAt: generateAuthorityMetadataExpiresAt(), - jwks_uri: "", - }; - } - return metadataEntity; - } - /** - * Updates cached metadata based on metadata source and sets the instance's metadata - * property to the same value - * @param metadataEntity - * @param cloudDiscoverySource - * @param endpointMetadataResult - */ - updateCachedMetadata(metadataEntity, cloudDiscoverySource, endpointMetadataResult) { - if (cloudDiscoverySource !== AuthorityMetadataSource.CACHE && - endpointMetadataResult?.source !== AuthorityMetadataSource.CACHE) { - // Reset the expiration time unless both values came from a successful cache lookup - metadataEntity.expiresAt = - generateAuthorityMetadataExpiresAt(); - metadataEntity.canonical_authority = this.canonicalAuthority; - } - const cacheKey = this.cacheManager.generateAuthorityMetadataCacheKey(metadataEntity.preferred_cache); - this.cacheManager.setAuthorityMetadata(cacheKey, metadataEntity); - this.metadata = metadataEntity; - } - /** - * Update AuthorityMetadataEntity with new endpoints and return where the information came from - * @param metadataEntity - */ - async updateEndpointMetadata(metadataEntity) { - this.performanceClient?.addQueueMeasurement(PerformanceEvents.AuthorityUpdateEndpointMetadata, this.correlationId); - const localMetadata = this.updateEndpointMetadataFromLocalSources(metadataEntity); - // Further update may be required for hardcoded metadata if regional metadata is preferred - if (localMetadata) { - if (localMetadata.source === - AuthorityMetadataSource.HARDCODED_VALUES) { - // If the user prefers to use an azure region replace the global endpoints with regional information. - if (this.authorityOptions.azureRegionConfiguration?.azureRegion) { - if (localMetadata.metadata) { - const hardcodedMetadata = await invokeAsync(this.updateMetadataWithRegionalInformation.bind(this), PerformanceEvents.AuthorityUpdateMetadataWithRegionalInformation, this.logger, this.performanceClient, this.correlationId)(localMetadata.metadata); - updateAuthorityEndpointMetadata(metadataEntity, hardcodedMetadata, false); - metadataEntity.canonical_authority = - this.canonicalAuthority; - } - } - } - return localMetadata.source; - } - // Get metadata from network if local sources aren't available - let metadata = await invokeAsync(this.getEndpointMetadataFromNetwork.bind(this), PerformanceEvents.AuthorityGetEndpointMetadataFromNetwork, this.logger, this.performanceClient, this.correlationId)(); - if (metadata) { - // If the user prefers to use an azure region replace the global endpoints with regional information. - if (this.authorityOptions.azureRegionConfiguration?.azureRegion) { - metadata = await invokeAsync(this.updateMetadataWithRegionalInformation.bind(this), PerformanceEvents.AuthorityUpdateMetadataWithRegionalInformation, this.logger, this.performanceClient, this.correlationId)(metadata); - } - updateAuthorityEndpointMetadata(metadataEntity, metadata, true); - return AuthorityMetadataSource.NETWORK; - } - else { - // Metadata could not be obtained from the config, cache, network or hardcoded values - throw createClientAuthError(openIdConfigError, this.defaultOpenIdConfigurationEndpoint); - } - } - /** - * Updates endpoint metadata from local sources and returns where the information was retrieved from and the metadata config - * response if the source is hardcoded metadata - * @param metadataEntity - * @returns - */ - updateEndpointMetadataFromLocalSources(metadataEntity) { - this.logger.verbose("Attempting to get endpoint metadata from authority configuration"); - const configMetadata = this.getEndpointMetadataFromConfig(); - if (configMetadata) { - this.logger.verbose("Found endpoint metadata in authority configuration"); - updateAuthorityEndpointMetadata(metadataEntity, configMetadata, false); - return { - source: AuthorityMetadataSource.CONFIG, - }; - } - this.logger.verbose("Did not find endpoint metadata in the config... Attempting to get endpoint metadata from the hardcoded values."); - // skipAuthorityMetadataCache is used to bypass hardcoded authority metadata and force a network metadata cache lookup and network metadata request if no cached response is available. - if (this.authorityOptions.skipAuthorityMetadataCache) { - this.logger.verbose("Skipping hardcoded metadata cache since skipAuthorityMetadataCache is set to true. Attempting to get endpoint metadata from the network metadata cache."); - } - else { - const hardcodedMetadata = this.getEndpointMetadataFromHardcodedValues(); - if (hardcodedMetadata) { - updateAuthorityEndpointMetadata(metadataEntity, hardcodedMetadata, false); - return { - source: AuthorityMetadataSource.HARDCODED_VALUES, - metadata: hardcodedMetadata, - }; - } - else { - this.logger.verbose("Did not find endpoint metadata in hardcoded values... Attempting to get endpoint metadata from the network metadata cache."); - } - } - // Check cached metadata entity expiration status - const metadataEntityExpired = isAuthorityMetadataExpired(metadataEntity); - if (this.isAuthoritySameType(metadataEntity) && - metadataEntity.endpointsFromNetwork && - !metadataEntityExpired) { - // No need to update - this.logger.verbose("Found endpoint metadata in the cache."); - return { source: AuthorityMetadataSource.CACHE }; - } - else if (metadataEntityExpired) { - this.logger.verbose("The metadata entity is expired."); - } - return null; - } - /** - * Compares the number of url components after the domain to determine if the cached - * authority metadata can be used for the requested authority. Protects against same domain different - * authority such as login.microsoftonline.com/tenant and login.microsoftonline.com/tfp/tenant/policy - * @param metadataEntity - */ - isAuthoritySameType(metadataEntity) { - const cachedAuthorityUrl = new UrlString(metadataEntity.canonical_authority); - const cachedParts = cachedAuthorityUrl.getUrlComponents().PathSegments; - return (cachedParts.length === - this.canonicalAuthorityUrlComponents.PathSegments.length); - } - /** - * Parse authorityMetadata config option - */ - getEndpointMetadataFromConfig() { - if (this.authorityOptions.authorityMetadata) { - try { - return JSON.parse(this.authorityOptions.authorityMetadata); - } - catch (e) { - throw createClientConfigurationError(invalidAuthorityMetadata); - } - } - return null; - } - /** - * Gets OAuth endpoints from the given OpenID configuration endpoint. - * - * @param hasHardcodedMetadata boolean - */ - async getEndpointMetadataFromNetwork() { - this.performanceClient?.addQueueMeasurement(PerformanceEvents.AuthorityGetEndpointMetadataFromNetwork, this.correlationId); - const options = {}; - /* - * TODO: Add a timeout if the authority exists in our library's - * hardcoded list of metadata - */ - const openIdConfigurationEndpoint = this.defaultOpenIdConfigurationEndpoint; - this.logger.verbose(`Authority.getEndpointMetadataFromNetwork: attempting to retrieve OAuth endpoints from ${openIdConfigurationEndpoint}`); - try { - const response = await this.networkInterface.sendGetRequestAsync(openIdConfigurationEndpoint, options); - const isValidResponse = isOpenIdConfigResponse(response.body); - if (isValidResponse) { - return response.body; - } - else { - this.logger.verbose(`Authority.getEndpointMetadataFromNetwork: could not parse response as OpenID configuration`); - return null; - } - } - catch (e) { - this.logger.verbose(`Authority.getEndpointMetadataFromNetwork: ${e}`); - return null; - } - } - /** - * Get OAuth endpoints for common authorities. - */ - getEndpointMetadataFromHardcodedValues() { - if (this.hostnameAndPort in EndpointMetadata) { - return EndpointMetadata[this.hostnameAndPort]; - } - return null; - } - /** - * Update the retrieved metadata with regional information. - * User selected Azure region will be used if configured. - */ - async updateMetadataWithRegionalInformation(metadata) { - this.performanceClient?.addQueueMeasurement(PerformanceEvents.AuthorityUpdateMetadataWithRegionalInformation, this.correlationId); - const userConfiguredAzureRegion = this.authorityOptions.azureRegionConfiguration?.azureRegion; - if (userConfiguredAzureRegion) { - if (userConfiguredAzureRegion !== - Constants$1.AZURE_REGION_AUTO_DISCOVER_FLAG) { - this.regionDiscoveryMetadata.region_outcome = - RegionDiscoveryOutcomes.CONFIGURED_NO_AUTO_DETECTION; - this.regionDiscoveryMetadata.region_used = - userConfiguredAzureRegion; - return Authority.replaceWithRegionalInformation(metadata, userConfiguredAzureRegion); - } - const autodetectedRegionName = await invokeAsync(this.regionDiscovery.detectRegion.bind(this.regionDiscovery), PerformanceEvents.RegionDiscoveryDetectRegion, this.logger, this.performanceClient, this.correlationId)(this.authorityOptions.azureRegionConfiguration - ?.environmentRegion, this.regionDiscoveryMetadata); - if (autodetectedRegionName) { - this.regionDiscoveryMetadata.region_outcome = - RegionDiscoveryOutcomes.AUTO_DETECTION_REQUESTED_SUCCESSFUL; - this.regionDiscoveryMetadata.region_used = - autodetectedRegionName; - return Authority.replaceWithRegionalInformation(metadata, autodetectedRegionName); - } - this.regionDiscoveryMetadata.region_outcome = - RegionDiscoveryOutcomes.AUTO_DETECTION_REQUESTED_FAILED; - } - return metadata; - } - /** - * Updates the AuthorityMetadataEntity with new aliases, preferred_network and preferred_cache - * and returns where the information was retrieved from - * @param metadataEntity - * @returns AuthorityMetadataSource - */ - async updateCloudDiscoveryMetadata(metadataEntity) { - this.performanceClient?.addQueueMeasurement(PerformanceEvents.AuthorityUpdateCloudDiscoveryMetadata, this.correlationId); - const localMetadataSource = this.updateCloudDiscoveryMetadataFromLocalSources(metadataEntity); - if (localMetadataSource) { - return localMetadataSource; - } - // Fallback to network as metadata source - const metadata = await invokeAsync(this.getCloudDiscoveryMetadataFromNetwork.bind(this), PerformanceEvents.AuthorityGetCloudDiscoveryMetadataFromNetwork, this.logger, this.performanceClient, this.correlationId)(); - if (metadata) { - updateCloudDiscoveryMetadata(metadataEntity, metadata, true); - return AuthorityMetadataSource.NETWORK; - } - // Metadata could not be obtained from the config, cache, network or hardcoded values - throw createClientConfigurationError(untrustedAuthority); - } - updateCloudDiscoveryMetadataFromLocalSources(metadataEntity) { - this.logger.verbose("Attempting to get cloud discovery metadata from authority configuration"); - this.logger.verbosePii(`Known Authorities: ${this.authorityOptions.knownAuthorities || - Constants$1.NOT_APPLICABLE}`); - this.logger.verbosePii(`Authority Metadata: ${this.authorityOptions.authorityMetadata || - Constants$1.NOT_APPLICABLE}`); - this.logger.verbosePii(`Canonical Authority: ${metadataEntity.canonical_authority || Constants$1.NOT_APPLICABLE}`); - const metadata = this.getCloudDiscoveryMetadataFromConfig(); - if (metadata) { - this.logger.verbose("Found cloud discovery metadata in authority configuration"); - updateCloudDiscoveryMetadata(metadataEntity, metadata, false); - return AuthorityMetadataSource.CONFIG; - } - // If the cached metadata came from config but that config was not passed to this instance, we must go to hardcoded values - this.logger.verbose("Did not find cloud discovery metadata in the config... Attempting to get cloud discovery metadata from the hardcoded values."); - if (this.options.skipAuthorityMetadataCache) { - this.logger.verbose("Skipping hardcoded cloud discovery metadata cache since skipAuthorityMetadataCache is set to true. Attempting to get cloud discovery metadata from the network metadata cache."); - } - else { - const hardcodedMetadata = getCloudDiscoveryMetadataFromHardcodedValues(this.hostnameAndPort); - if (hardcodedMetadata) { - this.logger.verbose("Found cloud discovery metadata from hardcoded values."); - updateCloudDiscoveryMetadata(metadataEntity, hardcodedMetadata, false); - return AuthorityMetadataSource.HARDCODED_VALUES; - } - this.logger.verbose("Did not find cloud discovery metadata in hardcoded values... Attempting to get cloud discovery metadata from the network metadata cache."); - } - const metadataEntityExpired = isAuthorityMetadataExpired(metadataEntity); - if (this.isAuthoritySameType(metadataEntity) && - metadataEntity.aliasesFromNetwork && - !metadataEntityExpired) { - this.logger.verbose("Found cloud discovery metadata in the cache."); - // No need to update - return AuthorityMetadataSource.CACHE; - } - else if (metadataEntityExpired) { - this.logger.verbose("The metadata entity is expired."); - } - return null; - } - /** - * Parse cloudDiscoveryMetadata config or check knownAuthorities - */ - getCloudDiscoveryMetadataFromConfig() { - // CIAM does not support cloud discovery metadata - if (this.authorityType === AuthorityType.Ciam) { - this.logger.verbose("CIAM authorities do not support cloud discovery metadata, generate the aliases from authority host."); - return Authority.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort); - } - // Check if network response was provided in config - if (this.authorityOptions.cloudDiscoveryMetadata) { - this.logger.verbose("The cloud discovery metadata has been provided as a network response, in the config."); - try { - this.logger.verbose("Attempting to parse the cloud discovery metadata."); - const parsedResponse = JSON.parse(this.authorityOptions.cloudDiscoveryMetadata); - const metadata = getCloudDiscoveryMetadataFromNetworkResponse(parsedResponse.metadata, this.hostnameAndPort); - this.logger.verbose("Parsed the cloud discovery metadata."); - if (metadata) { - this.logger.verbose("There is returnable metadata attached to the parsed cloud discovery metadata."); - return metadata; - } - else { - this.logger.verbose("There is no metadata attached to the parsed cloud discovery metadata."); - } - } - catch (e) { - this.logger.verbose("Unable to parse the cloud discovery metadata. Throwing Invalid Cloud Discovery Metadata Error."); - throw createClientConfigurationError(invalidCloudDiscoveryMetadata); - } - } - // If cloudDiscoveryMetadata is empty or does not contain the host, check knownAuthorities - if (this.isInKnownAuthorities()) { - this.logger.verbose("The host is included in knownAuthorities. Creating new cloud discovery metadata from the host."); - return Authority.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort); - } - return null; - } - /** - * Called to get metadata from network if CloudDiscoveryMetadata was not populated by config - * - * @param hasHardcodedMetadata boolean - */ - async getCloudDiscoveryMetadataFromNetwork() { - this.performanceClient?.addQueueMeasurement(PerformanceEvents.AuthorityGetCloudDiscoveryMetadataFromNetwork, this.correlationId); - const instanceDiscoveryEndpoint = `${Constants$1.AAD_INSTANCE_DISCOVERY_ENDPT}${this.canonicalAuthority}oauth2/v2.0/authorize`; - const options = {}; - /* - * TODO: Add a timeout if the authority exists in our library's - * hardcoded list of metadata - */ - let match = null; - try { - const response = await this.networkInterface.sendGetRequestAsync(instanceDiscoveryEndpoint, options); - let typedResponseBody; - let metadata; - if (isCloudInstanceDiscoveryResponse(response.body)) { - typedResponseBody = - response.body; - metadata = typedResponseBody.metadata; - this.logger.verbosePii(`tenant_discovery_endpoint is: ${typedResponseBody.tenant_discovery_endpoint}`); - } - else if (isCloudInstanceDiscoveryErrorResponse(response.body)) { - this.logger.warning(`A CloudInstanceDiscoveryErrorResponse was returned. The cloud instance discovery network request's status code is: ${response.status}`); - typedResponseBody = - response.body; - if (typedResponseBody.error === Constants$1.INVALID_INSTANCE) { - this.logger.error("The CloudInstanceDiscoveryErrorResponse error is invalid_instance."); - return null; - } - this.logger.warning(`The CloudInstanceDiscoveryErrorResponse error is ${typedResponseBody.error}`); - this.logger.warning(`The CloudInstanceDiscoveryErrorResponse error description is ${typedResponseBody.error_description}`); - this.logger.warning("Setting the value of the CloudInstanceDiscoveryMetadata (returned from the network) to []"); - metadata = []; - } - else { - this.logger.error("AAD did not return a CloudInstanceDiscoveryResponse or CloudInstanceDiscoveryErrorResponse"); - return null; - } - this.logger.verbose("Attempting to find a match between the developer's authority and the CloudInstanceDiscoveryMetadata returned from the network request."); - match = getCloudDiscoveryMetadataFromNetworkResponse(metadata, this.hostnameAndPort); - } - catch (error) { - if (error instanceof AuthError) { - this.logger.error(`There was a network error while attempting to get the cloud discovery instance metadata.\nError: ${error.errorCode}\nError Description: ${error.errorMessage}`); - } - else { - const typedError = error; - this.logger.error(`A non-MSALJS error was thrown while attempting to get the cloud instance discovery metadata.\nError: ${typedError.name}\nError Description: ${typedError.message}`); - } - return null; - } - // Custom Domain scenario, host is trusted because Instance Discovery call succeeded - if (!match) { - this.logger.warning("The developer's authority was not found within the CloudInstanceDiscoveryMetadata returned from the network request."); - this.logger.verbose("Creating custom Authority for custom domain scenario."); - match = Authority.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort); - } - return match; - } - /** - * Helper function to determine if this host is included in the knownAuthorities config option - */ - isInKnownAuthorities() { - const matches = this.authorityOptions.knownAuthorities.filter((authority) => { - return (authority && - UrlString.getDomainFromUrl(authority).toLowerCase() === - this.hostnameAndPort); - }); - return matches.length > 0; - } - /** - * helper function to populate the authority based on azureCloudOptions - * @param authorityString - * @param azureCloudOptions - */ - static generateAuthority(authorityString, azureCloudOptions) { - let authorityAzureCloudInstance; - if (azureCloudOptions && - azureCloudOptions.azureCloudInstance !== AzureCloudInstance.None) { - const tenant = azureCloudOptions.tenant - ? azureCloudOptions.tenant - : Constants$1.DEFAULT_COMMON_TENANT; - authorityAzureCloudInstance = `${azureCloudOptions.azureCloudInstance}/${tenant}/`; - } - return authorityAzureCloudInstance - ? authorityAzureCloudInstance - : authorityString; - } - /** - * Creates cloud discovery metadata object from a given host - * @param host - */ - static createCloudDiscoveryMetadataFromHost(host) { - return { - preferred_network: host, - preferred_cache: host, - aliases: [host], - }; - } - /** - * helper function to generate environment from authority object - */ - getPreferredCache() { - if (this.managedIdentity) { - return Constants$1.DEFAULT_AUTHORITY_HOST; - } - else if (this.discoveryComplete()) { - return this.metadata.preferred_cache; - } - else { - throw createClientAuthError(endpointResolutionError); - } - } - /** - * Returns whether or not the provided host is an alias of this authority instance - * @param host - */ - isAlias(host) { - return this.metadata.aliases.indexOf(host) > -1; - } - /** - * Returns whether or not the provided host is an alias of a known Microsoft authority for purposes of endpoint discovery - * @param host - */ - isAliasOfKnownMicrosoftAuthority(host) { - return InstanceDiscoveryMetadataAliases.has(host); - } - /** - * Checks whether the provided host is that of a public cloud authority - * - * @param authority string - * @returns bool - */ - static isPublicCloudAuthority(host) { - return Constants$1.KNOWN_PUBLIC_CLOUDS.indexOf(host) >= 0; - } - /** - * Rebuild the authority string with the region - * - * @param host string - * @param region string - */ - static buildRegionalAuthorityString(host, region, queryString) { - // Create and validate a Url string object with the initial authority string - const authorityUrlInstance = new UrlString(host); - authorityUrlInstance.validateAsUri(); - const authorityUrlParts = authorityUrlInstance.getUrlComponents(); - let hostNameAndPort = `${region}.${authorityUrlParts.HostNameAndPort}`; - if (this.isPublicCloudAuthority(authorityUrlParts.HostNameAndPort)) { - hostNameAndPort = `${region}.${Constants$1.REGIONAL_AUTH_PUBLIC_CLOUD_SUFFIX}`; - } - // Include the query string portion of the url - const url = UrlString.constructAuthorityUriFromObject({ - ...authorityUrlInstance.getUrlComponents(), - HostNameAndPort: hostNameAndPort, - }).urlString; - // Add the query string if a query string was provided - if (queryString) - return `${url}?${queryString}`; - return url; - } - /** - * Replace the endpoints in the metadata object with their regional equivalents. - * - * @param metadata OpenIdConfigResponse - * @param azureRegion string - */ - static replaceWithRegionalInformation(metadata, azureRegion) { - const regionalMetadata = { ...metadata }; - regionalMetadata.authorization_endpoint = - Authority.buildRegionalAuthorityString(regionalMetadata.authorization_endpoint, azureRegion); - regionalMetadata.token_endpoint = - Authority.buildRegionalAuthorityString(regionalMetadata.token_endpoint, azureRegion); - if (regionalMetadata.end_session_endpoint) { - regionalMetadata.end_session_endpoint = - Authority.buildRegionalAuthorityString(regionalMetadata.end_session_endpoint, azureRegion); - } - return regionalMetadata; - } - /** - * Transform CIAM_AUTHORIY as per the below rules: - * If no path segments found and it is a CIAM authority (hostname ends with .ciamlogin.com), then transform it - * - * NOTE: The transformation path should go away once STS supports CIAM with the format: `tenantIdorDomain.ciamlogin.com` - * `ciamlogin.com` can also change in the future and we should accommodate the same - * - * @param authority - */ - static transformCIAMAuthority(authority) { - let ciamAuthority = authority; - const authorityUrl = new UrlString(authority); - const authorityUrlComponents = authorityUrl.getUrlComponents(); - // check if transformation is needed - if (authorityUrlComponents.PathSegments.length === 0 && - authorityUrlComponents.HostNameAndPort.endsWith(Constants$1.CIAM_AUTH_URL)) { - const tenantIdOrDomain = authorityUrlComponents.HostNameAndPort.split(".")[0]; - ciamAuthority = `${ciamAuthority}${tenantIdOrDomain}${Constants$1.AAD_TENANT_DOMAIN_SUFFIX}`; - } - return ciamAuthority; - } -} -// Reserved tenant domain names that will not be replaced with tenant id -Authority.reservedTenantDomains = new Set([ - "{tenant}", - "{tenantid}", - AADAuthorityConstants.COMMON, - AADAuthorityConstants.CONSUMERS, - AADAuthorityConstants.ORGANIZATIONS, -]); -/** - * Extract tenantId from authority - */ -function getTenantFromAuthorityString(authority) { - const authorityUrl = new UrlString(authority); - const authorityUrlComponents = authorityUrl.getUrlComponents(); - /** - * For credential matching purposes, tenantId is the last path segment of the authority URL: - * AAD Authority - domain/tenantId -> Credentials are cached with realm = tenantId - * B2C Authority - domain/{tenantId}?/.../policy -> Credentials are cached with realm = policy - * tenantId is downcased because B2C policies can have mixed case but tfp claim is downcased - * - * Note that we may not have any path segments in certain OIDC scenarios. - */ - const tenantId = authorityUrlComponents.PathSegments.slice(-1)[0]?.toLowerCase(); - switch (tenantId) { - case AADAuthorityConstants.COMMON: - case AADAuthorityConstants.ORGANIZATIONS: - case AADAuthorityConstants.CONSUMERS: - return undefined; - default: - return tenantId; - } -} -function formatAuthorityUri(authorityUri) { - return authorityUri.endsWith(Constants$1.FORWARD_SLASH) - ? authorityUri - : `${authorityUri}${Constants$1.FORWARD_SLASH}`; -} -function buildStaticAuthorityOptions(authOptions) { - const rawCloudDiscoveryMetadata = authOptions.cloudDiscoveryMetadata; - let cloudDiscoveryMetadata = undefined; - if (rawCloudDiscoveryMetadata) { - try { - cloudDiscoveryMetadata = JSON.parse(rawCloudDiscoveryMetadata); - } - catch (e) { - throw createClientConfigurationError(invalidCloudDiscoveryMetadata); - } - } - return { - canonicalAuthority: authOptions.authority - ? formatAuthorityUri(authOptions.authority) - : undefined, - knownAuthorities: authOptions.knownAuthorities, - cloudDiscoveryMetadata: cloudDiscoveryMetadata, - }; -} - -/*! @azure/msal-common v14.16.1 2025-08-05 */ - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * Create an authority object of the correct type based on the url - * Performs basic authority validation - checks to see if the authority is of a valid type (i.e. aad, b2c, adfs) - * - * Also performs endpoint discovery. - * - * @param authorityUri - * @param networkClient - * @param protocolMode - * @internal - */ -async function createDiscoveredInstance(authorityUri, networkClient, cacheManager, authorityOptions, logger, correlationId, performanceClient) { - performanceClient?.addQueueMeasurement(PerformanceEvents.AuthorityFactoryCreateDiscoveredInstance, correlationId); - const authorityUriFinal = Authority.transformCIAMAuthority(formatAuthorityUri(authorityUri)); - // Initialize authority and perform discovery endpoint check. - const acquireTokenAuthority = new Authority(authorityUriFinal, networkClient, cacheManager, authorityOptions, logger, correlationId, performanceClient); - try { - await invokeAsync(acquireTokenAuthority.resolveEndpointsAsync.bind(acquireTokenAuthority), PerformanceEvents.AuthorityResolveEndpointsAsync, logger, performanceClient, correlationId)(); - return acquireTokenAuthority; - } - catch (e) { - throw createClientAuthError(endpointResolutionError); - } -} - -/*! @azure/msal-common v14.16.1 2025-08-05 */ - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * Error thrown when there is an error with the server code, for example, unavailability. - */ -class ServerError extends AuthError { - constructor(errorCode, errorMessage, subError, errorNo, status) { - super(errorCode, errorMessage, subError); - this.name = "ServerError"; - this.errorNo = errorNo; - this.status = status; - Object.setPrototypeOf(this, ServerError.prototype); - } -} - -/*! @azure/msal-common v14.16.1 2025-08-05 */ - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** @internal */ -class ThrottlingUtils { - /** - * Prepares a RequestThumbprint to be stored as a key. - * @param thumbprint - */ - static generateThrottlingStorageKey(thumbprint) { - return `${ThrottlingConstants.THROTTLING_PREFIX}.${JSON.stringify(thumbprint)}`; - } - /** - * Performs necessary throttling checks before a network request. - * @param cacheManager - * @param thumbprint - */ - static preProcess(cacheManager, thumbprint, correlationId) { - const key = ThrottlingUtils.generateThrottlingStorageKey(thumbprint); - const value = cacheManager.getThrottlingCache(key); - if (value) { - if (value.throttleTime < Date.now()) { - cacheManager.removeItem(key, correlationId); - return; - } - throw new ServerError(value.errorCodes?.join(" ") || Constants$1.EMPTY_STRING, value.errorMessage, value.subError); - } - } - /** - * Performs necessary throttling checks after a network request. - * @param cacheManager - * @param thumbprint - * @param response - */ - static postProcess(cacheManager, thumbprint, response, correlationId) { - if (ThrottlingUtils.checkResponseStatus(response) || - ThrottlingUtils.checkResponseForRetryAfter(response)) { - const thumbprintValue = { - throttleTime: ThrottlingUtils.calculateThrottleTime(parseInt(response.headers[HeaderNames.RETRY_AFTER])), - error: response.body.error, - errorCodes: response.body.error_codes, - errorMessage: response.body.error_description, - subError: response.body.suberror, - }; - cacheManager.setThrottlingCache(ThrottlingUtils.generateThrottlingStorageKey(thumbprint), thumbprintValue, correlationId); - } - } - /** - * Checks a NetworkResponse object's status codes against 429 or 5xx - * @param response - */ - static checkResponseStatus(response) { - return (response.status === 429 || - (response.status >= 500 && response.status < 600)); - } - /** - * Checks a NetworkResponse object's RetryAfter header - * @param response - */ - static checkResponseForRetryAfter(response) { - if (response.headers) { - return (response.headers.hasOwnProperty(HeaderNames.RETRY_AFTER) && - (response.status < 200 || response.status >= 300)); - } - return false; - } - /** - * Calculates the Unix-time value for a throttle to expire given throttleTime in seconds. - * @param throttleTime - */ - static calculateThrottleTime(throttleTime) { - const time = throttleTime <= 0 ? 0 : throttleTime; - const currentSeconds = Date.now() / 1000; - return Math.floor(Math.min(currentSeconds + - (time || ThrottlingConstants.DEFAULT_THROTTLE_TIME_SECONDS), currentSeconds + - ThrottlingConstants.DEFAULT_MAX_THROTTLE_TIME_SECONDS) * 1000); - } - static removeThrottle(cacheManager, clientId, request, homeAccountIdentifier) { - const thumbprint = { - clientId: clientId, - authority: request.authority, - scopes: request.scopes, - homeAccountIdentifier: homeAccountIdentifier, - claims: request.claims, - authenticationScheme: request.authenticationScheme, - resourceRequestMethod: request.resourceRequestMethod, - resourceRequestUri: request.resourceRequestUri, - shrClaims: request.shrClaims, - sshKid: request.sshKid, - }; - const key = this.generateThrottlingStorageKey(thumbprint); - cacheManager.removeItem(key, request.correlationId); - } -} - -/*! @azure/msal-common v14.16.1 2025-08-05 */ - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * Represents network related errors - */ -class NetworkError extends AuthError { - constructor(error, httpStatus, responseHeaders) { - super(error.errorCode, error.errorMessage, error.subError); - Object.setPrototypeOf(this, NetworkError.prototype); - this.name = "NetworkError"; - this.error = error; - this.httpStatus = httpStatus; - this.responseHeaders = responseHeaders; - } -} - -/*! @azure/msal-common v14.16.1 2025-08-05 */ - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * Base application class which will construct requests to send to and handle responses from the Microsoft STS using the authorization code flow. - * @internal - */ -class BaseClient { - constructor(configuration, performanceClient) { - // Set the configuration - this.config = buildClientConfiguration(configuration); - // Initialize the logger - this.logger = new Logger(this.config.loggerOptions, name$1, version$1); - // Initialize crypto - this.cryptoUtils = this.config.cryptoInterface; - // Initialize storage interface - this.cacheManager = this.config.storageInterface; - // Set the network interface - this.networkClient = this.config.networkInterface; - // Set TelemetryManager - this.serverTelemetryManager = this.config.serverTelemetryManager; - // set Authority - this.authority = this.config.authOptions.authority; - // set performance telemetry client - this.performanceClient = performanceClient; - } - /** - * Creates default headers for requests to token endpoint - */ - createTokenRequestHeaders(ccsCred) { - const headers = {}; - headers[HeaderNames.CONTENT_TYPE] = Constants$1.URL_FORM_CONTENT_TYPE; - if (!this.config.systemOptions.preventCorsPreflight && ccsCred) { - switch (ccsCred.type) { - case CcsCredentialType.HOME_ACCOUNT_ID: - try { - const clientInfo = buildClientInfoFromHomeAccountId(ccsCred.credential); - headers[HeaderNames.CCS_HEADER] = `Oid:${clientInfo.uid}@${clientInfo.utid}`; - } - catch (e) { - this.logger.verbose("Could not parse home account ID for CCS Header: " + - e); - } - break; - case CcsCredentialType.UPN: - headers[HeaderNames.CCS_HEADER] = `UPN: ${ccsCred.credential}`; - break; - } - } - return headers; - } - /** - * Http post to token endpoint - * @param tokenEndpoint - * @param queryString - * @param headers - * @param thumbprint - */ - async executePostToTokenEndpoint(tokenEndpoint, queryString, headers, thumbprint, correlationId, queuedEvent) { - if (queuedEvent) { - this.performanceClient?.addQueueMeasurement(queuedEvent, correlationId); - } - const response = await this.sendPostRequest(thumbprint, tokenEndpoint, { body: queryString, headers: headers }, correlationId); - if (this.config.serverTelemetryManager && - response.status < 500 && - response.status !== 429) { - // Telemetry data successfully logged by server, clear Telemetry cache - this.config.serverTelemetryManager.clearTelemetryCache(); - } - return response; - } - /** - * Wraps sendPostRequestAsync with necessary preflight and postflight logic - * @param thumbprint - Request thumbprint for throttling - * @param tokenEndpoint - Endpoint to make the POST to - * @param options - Body and Headers to include on the POST request - * @param correlationId - CorrelationId for telemetry - */ - async sendPostRequest(thumbprint, tokenEndpoint, options, correlationId) { - ThrottlingUtils.preProcess(this.cacheManager, thumbprint, correlationId); - let response; - try { - response = await invokeAsync((this.networkClient.sendPostRequestAsync.bind(this.networkClient)), PerformanceEvents.NetworkClientSendPostRequestAsync, this.logger, this.performanceClient, correlationId)(tokenEndpoint, options); - const responseHeaders = response.headers || {}; - this.performanceClient?.addFields({ - refreshTokenSize: response.body.refresh_token?.length || 0, - httpVerToken: responseHeaders[HeaderNames.X_MS_HTTP_VERSION] || "", - requestId: responseHeaders[HeaderNames.X_MS_REQUEST_ID] || "", - }, correlationId); - } - catch (e) { - if (e instanceof NetworkError) { - const responseHeaders = e.responseHeaders; - if (responseHeaders) { - this.performanceClient?.addFields({ - httpVerToken: responseHeaders[HeaderNames.X_MS_HTTP_VERSION] || "", - requestId: responseHeaders[HeaderNames.X_MS_REQUEST_ID] || - "", - contentTypeHeader: responseHeaders[HeaderNames.CONTENT_TYPE] || - undefined, - contentLengthHeader: responseHeaders[HeaderNames.CONTENT_LENGTH] || - undefined, - httpStatus: e.httpStatus, - }, correlationId); - } - throw e.error; - } - if (e instanceof AuthError) { - throw e; - } - else { - throw createClientAuthError(networkError); - } - } - ThrottlingUtils.postProcess(this.cacheManager, thumbprint, response, correlationId); - return response; - } - /** - * Updates the authority object of the client. Endpoint discovery must be completed. - * @param updatedAuthority - */ - async updateAuthority(cloudInstanceHostname, correlationId) { - this.performanceClient?.addQueueMeasurement(PerformanceEvents.UpdateTokenEndpointAuthority, correlationId); - const cloudInstanceAuthorityUri = `https://${cloudInstanceHostname}/${this.authority.tenant}/`; - const cloudInstanceAuthority = await createDiscoveredInstance(cloudInstanceAuthorityUri, this.networkClient, this.cacheManager, this.authority.options, this.logger, correlationId, this.performanceClient); - this.authority = cloudInstanceAuthority; - } - /** - * Creates query string for the /token request - * @param request - */ - createTokenQueryParameters(request) { - const parameterBuilder = new RequestParameterBuilder(request.correlationId, this.performanceClient); - if (request.embeddedClientId) { - parameterBuilder.addBrokerParameters({ - brokerClientId: this.config.authOptions.clientId, - brokerRedirectUri: this.config.authOptions.redirectUri, - }); - } - if (request.tokenQueryParameters) { - parameterBuilder.addExtraQueryParameters(request.tokenQueryParameters); - } - parameterBuilder.addCorrelationId(request.correlationId); - return parameterBuilder.createQueryString(); - } -} - -/*! @azure/msal-common v14.16.1 2025-08-05 */ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -// Codes defined by MSAL -const noTokensFound = "no_tokens_found"; -const nativeAccountUnavailable = "native_account_unavailable"; -const refreshTokenExpired = "refresh_token_expired"; -// Codes potentially returned by server -const interactionRequired = "interaction_required"; -const consentRequired = "consent_required"; -const loginRequired = "login_required"; -const badToken = "bad_token"; - -var InteractionRequiredAuthErrorCodes = /*#__PURE__*/Object.freeze({ - __proto__: null, - badToken: badToken, - consentRequired: consentRequired, - interactionRequired: interactionRequired, - loginRequired: loginRequired, - nativeAccountUnavailable: nativeAccountUnavailable, - noTokensFound: noTokensFound, - refreshTokenExpired: refreshTokenExpired -}); - -/*! @azure/msal-common v14.16.1 2025-08-05 */ - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * InteractionRequiredServerErrorMessage contains string constants used by error codes and messages returned by the server indicating interaction is required - */ -const InteractionRequiredServerErrorMessage = [ - interactionRequired, - consentRequired, - loginRequired, - badToken, -]; -const InteractionRequiredAuthSubErrorMessage = [ - "message_only", - "additional_action", - "basic_action", - "user_password_expired", - "consent_required", - "bad_token", -]; -const InteractionRequiredAuthErrorMessages = { - [noTokensFound]: "No refresh token found in the cache. Please sign-in.", - [nativeAccountUnavailable]: "The requested account is not available in the native broker. It may have been deleted or logged out. Please sign-in again using an interactive API.", - [refreshTokenExpired]: "Refresh token has expired.", - [badToken]: "Identity provider returned bad_token due to an expired or invalid refresh token. Please invoke an interactive API to resolve.", -}; -/** - * Interaction required errors defined by the SDK - * @deprecated Use InteractionRequiredAuthErrorCodes instead - */ -const InteractionRequiredAuthErrorMessage = { - noTokensFoundError: { - code: noTokensFound, - desc: InteractionRequiredAuthErrorMessages[noTokensFound], - }, - native_account_unavailable: { - code: nativeAccountUnavailable, - desc: InteractionRequiredAuthErrorMessages[nativeAccountUnavailable], - }, - bad_token: { - code: badToken, - desc: InteractionRequiredAuthErrorMessages[badToken], - }, -}; -/** - * Error thrown when user interaction is required. - */ -class InteractionRequiredAuthError extends AuthError { - constructor(errorCode, errorMessage, subError, timestamp, traceId, correlationId, claims, errorNo) { - super(errorCode, errorMessage, subError); - Object.setPrototypeOf(this, InteractionRequiredAuthError.prototype); - this.timestamp = timestamp || Constants$1.EMPTY_STRING; - this.traceId = traceId || Constants$1.EMPTY_STRING; - this.correlationId = correlationId || Constants$1.EMPTY_STRING; - this.claims = claims || Constants$1.EMPTY_STRING; - this.name = "InteractionRequiredAuthError"; - this.errorNo = errorNo; - } -} -/** - * Helper function used to determine if an error thrown by the server requires interaction to resolve - * @param errorCode - * @param errorString - * @param subError - */ -function isInteractionRequiredError(errorCode, errorString, subError) { - const isInteractionRequiredErrorCode = !!errorCode && - InteractionRequiredServerErrorMessage.indexOf(errorCode) > -1; - const isInteractionRequiredSubError = !!subError && - InteractionRequiredAuthSubErrorMessage.indexOf(subError) > -1; - const isInteractionRequiredErrorDesc = !!errorString && - InteractionRequiredServerErrorMessage.some((irErrorCode) => { - return errorString.indexOf(irErrorCode) > -1; - }); - return (isInteractionRequiredErrorCode || - isInteractionRequiredErrorDesc || - isInteractionRequiredSubError); -} -/** - * Creates an InteractionRequiredAuthError - */ -function createInteractionRequiredAuthError(errorCode) { - return new InteractionRequiredAuthError(errorCode, InteractionRequiredAuthErrorMessages[errorCode]); -} - -/*! @azure/msal-common v14.16.1 2025-08-05 */ - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * Class which provides helpers for OAuth 2.0 protocol specific values - */ -class ProtocolUtils { - /** - * Appends user state with random guid, or returns random guid. - * @param userState - * @param randomGuid - */ - static setRequestState(cryptoObj, userState, meta) { - const libraryState = ProtocolUtils.generateLibraryState(cryptoObj, meta); - return userState - ? `${libraryState}${Constants$1.RESOURCE_DELIM}${userState}` - : libraryState; - } - /** - * Generates the state value used by the common library. - * @param randomGuid - * @param cryptoObj - */ - static generateLibraryState(cryptoObj, meta) { - if (!cryptoObj) { - throw createClientAuthError(noCryptoObject); - } - // Create a state object containing a unique id and the timestamp of the request creation - const stateObj = { - id: cryptoObj.createNewGuid(), - }; - if (meta) { - stateObj.meta = meta; - } - const stateString = JSON.stringify(stateObj); - return cryptoObj.base64Encode(stateString); - } - /** - * Parses the state into the RequestStateObject, which contains the LibraryState info and the state passed by the user. - * @param state - * @param cryptoObj - */ - static parseRequestState(cryptoObj, state) { - if (!cryptoObj) { - throw createClientAuthError(noCryptoObject); - } - if (!state) { - throw createClientAuthError(invalidState); - } - try { - // Split the state between library state and user passed state and decode them separately - const splitState = state.split(Constants$1.RESOURCE_DELIM); - const libraryState = splitState[0]; - const userState = splitState.length > 1 - ? splitState.slice(1).join(Constants$1.RESOURCE_DELIM) - : Constants$1.EMPTY_STRING; - const libraryStateString = cryptoObj.base64Decode(libraryState); - const libraryStateObj = JSON.parse(libraryStateString); - return { - userRequestState: userState || Constants$1.EMPTY_STRING, - libraryState: libraryStateObj, - }; - } - catch (e) { - throw createClientAuthError(invalidState); - } - } -} - -/*! @azure/msal-common v14.16.1 2025-08-05 */ - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -const KeyLocation = { - SW: "sw"}; -/** @internal */ -class PopTokenGenerator { - constructor(cryptoUtils, performanceClient) { - this.cryptoUtils = cryptoUtils; - this.performanceClient = performanceClient; - } - /** - * Generates the req_cnf validated at the RP in the POP protocol for SHR parameters - * and returns an object containing the keyid, the full req_cnf string and the req_cnf string hash - * @param request - * @returns - */ - async generateCnf(request, logger) { - this.performanceClient?.addQueueMeasurement(PerformanceEvents.PopTokenGenerateCnf, request.correlationId); - const reqCnf = await invokeAsync(this.generateKid.bind(this), PerformanceEvents.PopTokenGenerateCnf, logger, this.performanceClient, request.correlationId)(request); - const reqCnfString = this.cryptoUtils.base64UrlEncode(JSON.stringify(reqCnf)); - return { - kid: reqCnf.kid, - reqCnfString, - }; - } - /** - * Generates key_id for a SHR token request - * @param request - * @returns - */ - async generateKid(request) { - this.performanceClient?.addQueueMeasurement(PerformanceEvents.PopTokenGenerateKid, request.correlationId); - const kidThumbprint = await this.cryptoUtils.getPublicKeyThumbprint(request); - return { - kid: kidThumbprint, - xms_ksl: KeyLocation.SW, - }; - } - /** - * Signs the POP access_token with the local generated key-pair - * @param accessToken - * @param request - * @returns - */ - async signPopToken(accessToken, keyId, request) { - return this.signPayload(accessToken, keyId, request); - } - /** - * Utility function to generate the signed JWT for an access_token - * @param payload - * @param kid - * @param request - * @param claims - * @returns - */ - async signPayload(payload, keyId, request, claims) { - // Deconstruct request to extract SHR parameters - const { resourceRequestMethod, resourceRequestUri, shrClaims, shrNonce, shrOptions, } = request; - const resourceUrlString = resourceRequestUri - ? new UrlString(resourceRequestUri) - : undefined; - const resourceUrlComponents = resourceUrlString?.getUrlComponents(); - return this.cryptoUtils.signJwt({ - at: payload, - ts: nowSeconds(), - m: resourceRequestMethod?.toUpperCase(), - u: resourceUrlComponents?.HostNameAndPort, - nonce: shrNonce || this.cryptoUtils.createNewGuid(), - p: resourceUrlComponents?.AbsolutePath, - q: resourceUrlComponents?.QueryString - ? [[], resourceUrlComponents.QueryString] - : undefined, - client_claims: shrClaims || undefined, - ...claims, - }, keyId, shrOptions, request.correlationId); - } -} - -/*! @azure/msal-common v14.16.1 2025-08-05 */ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * This class instance helps track the memory changes facilitating - * decisions to read from and write to the persistent cache - */ class TokenCacheContext { - constructor(tokenCache, hasChanged) { - this.cache = tokenCache; - this.hasChanged = hasChanged; - } - /** - * boolean which indicates the changes in cache - */ - get cacheHasChanged() { - return this.hasChanged; - } - /** - * function to retrieve the token cache - */ - get tokenCache() { - return this.cache; - } -} - -/*! @azure/msal-common v14.16.1 2025-08-05 */ - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -function parseServerErrorNo(serverResponse) { - const errorCodePrefix = "code="; - const errorCodePrefixIndex = serverResponse.error_uri?.lastIndexOf(errorCodePrefix); - return errorCodePrefixIndex && errorCodePrefixIndex >= 0 - ? serverResponse.error_uri?.substring(errorCodePrefixIndex + errorCodePrefix.length) - : undefined; -} -/** - * Class that handles response parsing. - * @internal - */ -class ResponseHandler { - constructor(clientId, cacheStorage, cryptoObj, logger, serializableCache, persistencePlugin, performanceClient) { - this.clientId = clientId; - this.cacheStorage = cacheStorage; - this.cryptoObj = cryptoObj; - this.logger = logger; - this.serializableCache = serializableCache; - this.persistencePlugin = persistencePlugin; - this.performanceClient = performanceClient; - } - /** - * Function which validates server authorization code response. - * @param serverResponseHash - * @param requestState - * @param cryptoObj - */ - validateServerAuthorizationCodeResponse(serverResponse, requestState) { - if (!serverResponse.state || !requestState) { - throw serverResponse.state - ? createClientAuthError(stateNotFound, "Cached State") - : createClientAuthError(stateNotFound, "Server State"); - } - let decodedServerResponseState; - let decodedRequestState; - try { - decodedServerResponseState = decodeURIComponent(serverResponse.state); - } - catch (e) { - throw createClientAuthError(invalidState, serverResponse.state); - } - try { - decodedRequestState = decodeURIComponent(requestState); - } - catch (e) { - throw createClientAuthError(invalidState, serverResponse.state); - } - if (decodedServerResponseState !== decodedRequestState) { - throw createClientAuthError(stateMismatch); - } - // Check for error - if (serverResponse.error || - serverResponse.error_description || - serverResponse.suberror) { - const serverErrorNo = parseServerErrorNo(serverResponse); - if (isInteractionRequiredError(serverResponse.error, serverResponse.error_description, serverResponse.suberror)) { - throw new InteractionRequiredAuthError(serverResponse.error || "", serverResponse.error_description, serverResponse.suberror, serverResponse.timestamp || "", serverResponse.trace_id || "", serverResponse.correlation_id || "", serverResponse.claims || "", serverErrorNo); - } - throw new ServerError(serverResponse.error || "", serverResponse.error_description, serverResponse.suberror, serverErrorNo); - } - } - /** - * Function which validates server authorization token response. - * @param serverResponse - * @param refreshAccessToken - */ - validateTokenResponse(serverResponse, refreshAccessToken) { - // Check for error - if (serverResponse.error || - serverResponse.error_description || - serverResponse.suberror) { - const errString = `Error(s): ${serverResponse.error_codes || Constants$1.NOT_AVAILABLE} - Timestamp: ${serverResponse.timestamp || Constants$1.NOT_AVAILABLE} - Description: ${serverResponse.error_description || Constants$1.NOT_AVAILABLE} - Correlation ID: ${serverResponse.correlation_id || Constants$1.NOT_AVAILABLE} - Trace ID: ${serverResponse.trace_id || Constants$1.NOT_AVAILABLE}`; - const serverErrorNo = serverResponse.error_codes?.length - ? serverResponse.error_codes[0] - : undefined; - const serverError = new ServerError(serverResponse.error, errString, serverResponse.suberror, serverErrorNo, serverResponse.status); - // check if 500 error - if (refreshAccessToken && - serverResponse.status && - serverResponse.status >= HttpStatus.SERVER_ERROR_RANGE_START && - serverResponse.status <= HttpStatus.SERVER_ERROR_RANGE_END) { - this.logger.warning(`executeTokenRequest:validateTokenResponse - AAD is currently unavailable and the access token is unable to be refreshed.\n${serverError}`); - // don't throw an exception, but alert the user via a log that the token was unable to be refreshed - return; - // check if 400 error - } - else if (refreshAccessToken && - serverResponse.status && - serverResponse.status >= HttpStatus.CLIENT_ERROR_RANGE_START && - serverResponse.status <= HttpStatus.CLIENT_ERROR_RANGE_END) { - this.logger.warning(`executeTokenRequest:validateTokenResponse - AAD is currently available but is unable to refresh the access token.\n${serverError}`); - // don't throw an exception, but alert the user via a log that the token was unable to be refreshed - return; - } - if (isInteractionRequiredError(serverResponse.error, serverResponse.error_description, serverResponse.suberror)) { - throw new InteractionRequiredAuthError(serverResponse.error, serverResponse.error_description, serverResponse.suberror, serverResponse.timestamp || Constants$1.EMPTY_STRING, serverResponse.trace_id || Constants$1.EMPTY_STRING, serverResponse.correlation_id || Constants$1.EMPTY_STRING, serverResponse.claims || Constants$1.EMPTY_STRING, serverErrorNo); - } - throw serverError; - } - } - /** - * Returns a constructed token response based on given string. Also manages the cache updates and cleanups. - * @param serverTokenResponse - * @param authority - */ - async handleServerTokenResponse(serverTokenResponse, authority, reqTimestamp, request, authCodePayload, userAssertionHash, handlingRefreshTokenResponse, forceCacheRefreshTokenResponse, serverRequestId) { - this.performanceClient?.addQueueMeasurement(PerformanceEvents.HandleServerTokenResponse, serverTokenResponse.correlation_id); - // create an idToken object (not entity) - let idTokenClaims; - if (serverTokenResponse.id_token) { - idTokenClaims = extractTokenClaims(serverTokenResponse.id_token || Constants$1.EMPTY_STRING, this.cryptoObj.base64Decode); - // token nonce check (TODO: Add a warning if no nonce is given?) - if (authCodePayload && authCodePayload.nonce) { - if (idTokenClaims.nonce !== authCodePayload.nonce) { - throw createClientAuthError(nonceMismatch); - } - } - // token max_age check - if (request.maxAge || request.maxAge === 0) { - const authTime = idTokenClaims.auth_time; - if (!authTime) { - throw createClientAuthError(authTimeNotFound); - } - checkMaxAge(authTime, request.maxAge); - } - } - // generate homeAccountId - this.homeAccountIdentifier = AccountEntity.generateHomeAccountId(serverTokenResponse.client_info || Constants$1.EMPTY_STRING, authority.authorityType, this.logger, this.cryptoObj, idTokenClaims); - // save the response tokens - let requestStateObj; - if (!!authCodePayload && !!authCodePayload.state) { - requestStateObj = ProtocolUtils.parseRequestState(this.cryptoObj, authCodePayload.state); - } - // Add keyId from request to serverTokenResponse if defined - serverTokenResponse.key_id = - serverTokenResponse.key_id || request.sshKid || undefined; - const cacheRecord = this.generateCacheRecord(serverTokenResponse, authority, reqTimestamp, request, idTokenClaims, userAssertionHash, authCodePayload); - let cacheContext; - try { - if (this.persistencePlugin && this.serializableCache) { - this.logger.verbose("Persistence enabled, calling beforeCacheAccess"); - cacheContext = new TokenCacheContext(this.serializableCache, true); - await this.persistencePlugin.beforeCacheAccess(cacheContext); - } - /* - * When saving a refreshed tokens to the cache, it is expected that the account that was used is present in the cache. - * If not present, we should return null, as it's the case that another application called removeAccount in between - * the calls to getAllAccounts and acquireTokenSilent. We should not overwrite that removal, unless explicitly flagged by - * the developer, as in the case of refresh token flow used in ADAL Node to MSAL Node migration. - */ - if (handlingRefreshTokenResponse && - !forceCacheRefreshTokenResponse && - cacheRecord.account) { - const key = cacheRecord.account.generateAccountKey(); - const account = this.cacheStorage.getAccount(key, request.correlationId, this.logger); - if (!account) { - this.logger.warning("Account used to refresh tokens not in persistence, refreshed tokens will not be stored in the cache"); - return await ResponseHandler.generateAuthenticationResult(this.cryptoObj, authority, cacheRecord, false, request, idTokenClaims, requestStateObj, undefined, serverRequestId); - } - } - await this.cacheStorage.saveCacheRecord(cacheRecord, request.correlationId, request.storeInCache); - } - finally { - if (this.persistencePlugin && - this.serializableCache && - cacheContext) { - this.logger.verbose("Persistence enabled, calling afterCacheAccess"); - await this.persistencePlugin.afterCacheAccess(cacheContext); - } - } - return ResponseHandler.generateAuthenticationResult(this.cryptoObj, authority, cacheRecord, false, request, idTokenClaims, requestStateObj, serverTokenResponse, serverRequestId); - } - /** - * Generates CacheRecord - * @param serverTokenResponse - * @param idTokenObj - * @param authority - */ - generateCacheRecord(serverTokenResponse, authority, reqTimestamp, request, idTokenClaims, userAssertionHash, authCodePayload) { - const env = authority.getPreferredCache(); - if (!env) { - throw createClientAuthError(invalidCacheEnvironment); - } - const claimsTenantId = getTenantIdFromIdTokenClaims(idTokenClaims); - // IdToken: non AAD scenarios can have empty realm - let cachedIdToken; - let cachedAccount; - if (serverTokenResponse.id_token && !!idTokenClaims) { - cachedIdToken = createIdTokenEntity(this.homeAccountIdentifier, env, serverTokenResponse.id_token, this.clientId, claimsTenantId || ""); - cachedAccount = buildAccountToCache(this.cacheStorage, authority, this.homeAccountIdentifier, this.cryptoObj.base64Decode, request.correlationId, idTokenClaims, serverTokenResponse.client_info, env, claimsTenantId, authCodePayload, undefined, // nativeAccountId - this.logger); - } - // AccessToken - let cachedAccessToken = null; - if (serverTokenResponse.access_token) { - // If scopes not returned in server response, use request scopes - const responseScopes = serverTokenResponse.scope - ? ScopeSet.fromString(serverTokenResponse.scope) - : new ScopeSet(request.scopes || []); - /* - * Use timestamp calculated before request - * Server may return timestamps as strings, parse to numbers if so. - */ - const expiresIn = (typeof serverTokenResponse.expires_in === "string" - ? parseInt(serverTokenResponse.expires_in, 10) - : serverTokenResponse.expires_in) || 0; - const extExpiresIn = (typeof serverTokenResponse.ext_expires_in === "string" - ? parseInt(serverTokenResponse.ext_expires_in, 10) - : serverTokenResponse.ext_expires_in) || 0; - const refreshIn = (typeof serverTokenResponse.refresh_in === "string" - ? parseInt(serverTokenResponse.refresh_in, 10) - : serverTokenResponse.refresh_in) || undefined; - const tokenExpirationSeconds = reqTimestamp + expiresIn; - const extendedTokenExpirationSeconds = tokenExpirationSeconds + extExpiresIn; - const refreshOnSeconds = refreshIn && refreshIn > 0 - ? reqTimestamp + refreshIn - : undefined; - // non AAD scenarios can have empty realm - cachedAccessToken = createAccessTokenEntity(this.homeAccountIdentifier, env, serverTokenResponse.access_token, this.clientId, claimsTenantId || authority.tenant || "", responseScopes.printScopes(), tokenExpirationSeconds, extendedTokenExpirationSeconds, this.cryptoObj.base64Decode, refreshOnSeconds, serverTokenResponse.token_type, userAssertionHash, serverTokenResponse.key_id, request.claims, request.requestedClaimsHash); - } - // refreshToken - let cachedRefreshToken = null; - if (serverTokenResponse.refresh_token) { - let rtExpiresOn; - if (serverTokenResponse.refresh_token_expires_in) { - const rtExpiresIn = typeof serverTokenResponse.refresh_token_expires_in === - "string" - ? parseInt(serverTokenResponse.refresh_token_expires_in, 10) - : serverTokenResponse.refresh_token_expires_in; - rtExpiresOn = reqTimestamp + rtExpiresIn; - } - cachedRefreshToken = createRefreshTokenEntity(this.homeAccountIdentifier, env, serverTokenResponse.refresh_token, this.clientId, serverTokenResponse.foci, userAssertionHash, rtExpiresOn); - } - // appMetadata - let cachedAppMetadata = null; - if (serverTokenResponse.foci) { - cachedAppMetadata = { - clientId: this.clientId, - environment: env, - familyId: serverTokenResponse.foci, - }; - } - return { - account: cachedAccount, - idToken: cachedIdToken, - accessToken: cachedAccessToken, - refreshToken: cachedRefreshToken, - appMetadata: cachedAppMetadata, - }; - } - /** - * Creates an @AuthenticationResult from @CacheRecord , @IdToken , and a boolean that states whether or not the result is from cache. - * - * Optionally takes a state string that is set as-is in the response. - * - * @param cacheRecord - * @param idTokenObj - * @param fromTokenCache - * @param stateString - */ - static async generateAuthenticationResult(cryptoObj, authority, cacheRecord, fromTokenCache, request, idTokenClaims, requestState, serverTokenResponse, requestId) { - let accessToken = Constants$1.EMPTY_STRING; - let responseScopes = []; - let expiresOn = null; - let extExpiresOn; - let refreshOn; - let familyId = Constants$1.EMPTY_STRING; - if (cacheRecord.accessToken) { - /* - * if the request object has `popKid` property, `signPopToken` will be set to false and - * the token will be returned unsigned - */ - if (cacheRecord.accessToken.tokenType === - AuthenticationScheme.POP && - !request.popKid) { - const popTokenGenerator = new PopTokenGenerator(cryptoObj); - const { secret, keyId } = cacheRecord.accessToken; - if (!keyId) { - throw createClientAuthError(keyIdMissing); - } - accessToken = await popTokenGenerator.signPopToken(secret, keyId, request); - } - else { - accessToken = cacheRecord.accessToken.secret; - } - responseScopes = ScopeSet.fromString(cacheRecord.accessToken.target).asArray(); - expiresOn = new Date(Number(cacheRecord.accessToken.expiresOn) * 1000); - extExpiresOn = new Date(Number(cacheRecord.accessToken.extendedExpiresOn) * 1000); - if (cacheRecord.accessToken.refreshOn) { - refreshOn = new Date(Number(cacheRecord.accessToken.refreshOn) * 1000); - } - } - if (cacheRecord.appMetadata) { - familyId = - cacheRecord.appMetadata.familyId === THE_FAMILY_ID - ? THE_FAMILY_ID - : ""; - } - const uid = idTokenClaims?.oid || idTokenClaims?.sub || ""; - const tid = idTokenClaims?.tid || ""; - // for hybrid + native bridge enablement, send back the native account Id - if (serverTokenResponse?.spa_accountid && !!cacheRecord.account) { - cacheRecord.account.nativeAccountId = - serverTokenResponse?.spa_accountid; - } - const accountInfo = cacheRecord.account - ? updateAccountTenantProfileData(cacheRecord.account.getAccountInfo(), undefined, // tenantProfile optional - idTokenClaims, cacheRecord.idToken?.secret) - : null; - return { - authority: authority.canonicalAuthority, - uniqueId: uid, - tenantId: tid, - scopes: responseScopes, - account: accountInfo, - idToken: cacheRecord?.idToken?.secret || "", - idTokenClaims: idTokenClaims || {}, - accessToken: accessToken, - fromCache: fromTokenCache, - expiresOn: expiresOn, - extExpiresOn: extExpiresOn, - refreshOn: refreshOn, - correlationId: request.correlationId, - requestId: requestId || Constants$1.EMPTY_STRING, - familyId: familyId, - tokenType: cacheRecord.accessToken?.tokenType || Constants$1.EMPTY_STRING, - state: requestState - ? requestState.userRequestState - : Constants$1.EMPTY_STRING, - cloudGraphHostName: cacheRecord.account?.cloudGraphHostName || - Constants$1.EMPTY_STRING, - msGraphHost: cacheRecord.account?.msGraphHost || Constants$1.EMPTY_STRING, - code: serverTokenResponse?.spa_code, - fromNativeBroker: false, - }; - } -} -function buildAccountToCache(cacheStorage, authority, homeAccountId, base64Decode, correlationId, idTokenClaims, clientInfo, environment, claimsTenantId, authCodePayload, nativeAccountId, logger) { - logger?.verbose("setCachedAccount called"); - // Check if base account is already cached - const accountKeys = cacheStorage.getAccountKeys(); - const baseAccountKey = accountKeys.find((accountKey) => { - return accountKey.startsWith(homeAccountId); - }); - let cachedAccount = null; - if (baseAccountKey) { - cachedAccount = cacheStorage.getAccount(baseAccountKey, correlationId, logger); - } - const baseAccount = cachedAccount || - AccountEntity.createAccount({ - homeAccountId, - idTokenClaims, - clientInfo, - environment, - cloudGraphHostName: authCodePayload?.cloud_graph_host_name, - msGraphHost: authCodePayload?.msgraph_host, - nativeAccountId: nativeAccountId, - }, authority, base64Decode); - const tenantProfiles = baseAccount.tenantProfiles || []; - const tenantId = claimsTenantId || baseAccount.realm; - if (tenantId && - !tenantProfiles.find((tenantProfile) => { - return tenantProfile.tenantId === tenantId; - })) { - const newTenantProfile = buildTenantProfile(homeAccountId, baseAccount.localAccountId, tenantId, idTokenClaims); - tenantProfiles.push(newTenantProfile); - } - baseAccount.tenantProfiles = tenantProfiles; - return baseAccount; -} - -/*! @azure/msal-common v14.16.1 2025-08-05 */ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -async function getClientAssertion(clientAssertion, clientId, tokenEndpoint) { - if (typeof clientAssertion === "string") { - return clientAssertion; - } - else { - const config = { - clientId: clientId, - tokenEndpoint: tokenEndpoint, - }; - return clientAssertion(config); - } -} - -/*! @azure/msal-common v14.16.1 2025-08-05 */ - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * Oauth2.0 Authorization Code client - * @internal - */ -class AuthorizationCodeClient extends BaseClient { - constructor(configuration, performanceClient) { - super(configuration, performanceClient); - // Flag to indicate if client is for hybrid spa auth code redemption - this.includeRedirectUri = true; - this.oidcDefaultScopes = - this.config.authOptions.authority.options.OIDCOptions?.defaultScopes; - } - /** - * Creates the URL of the authorization request letting the user input credentials and consent to the - * application. The URL target the /authorize endpoint of the authority configured in the - * application object. - * - * Once the user inputs their credentials and consents, the authority will send a response to the redirect URI - * sent in the request and should contain an authorization code, which can then be used to acquire tokens via - * acquireToken(AuthorizationCodeRequest) - * @param request - */ - async getAuthCodeUrl(request) { - this.performanceClient?.addQueueMeasurement(PerformanceEvents.GetAuthCodeUrl, request.correlationId); - const queryString = await invokeAsync(this.createAuthCodeUrlQueryString.bind(this), PerformanceEvents.AuthClientCreateQueryString, this.logger, this.performanceClient, request.correlationId)(request); - return UrlString.appendQueryString(this.authority.authorizationEndpoint, queryString); - } - /** - * API to acquire a token in exchange of 'authorization_code` acquired by the user in the first leg of the - * authorization_code_grant - * @param request - */ - async acquireToken(request, authCodePayload) { - this.performanceClient?.addQueueMeasurement(PerformanceEvents.AuthClientAcquireToken, request.correlationId); - if (!request.code) { - throw createClientAuthError(requestCannotBeMade); - } - const reqTimestamp = nowSeconds(); - const response = await invokeAsync(this.executeTokenRequest.bind(this), PerformanceEvents.AuthClientExecuteTokenRequest, this.logger, this.performanceClient, request.correlationId)(this.authority, request); - // Retrieve requestId from response headers - const requestId = response.headers?.[HeaderNames.X_MS_REQUEST_ID]; - const responseHandler = new ResponseHandler(this.config.authOptions.clientId, this.cacheManager, this.cryptoUtils, this.logger, this.config.serializableCache, this.config.persistencePlugin, this.performanceClient); - // Validate response. This function throws a server error if an error is returned by the server. - responseHandler.validateTokenResponse(response.body); - return invokeAsync(responseHandler.handleServerTokenResponse.bind(responseHandler), PerformanceEvents.HandleServerTokenResponse, this.logger, this.performanceClient, request.correlationId)(response.body, this.authority, reqTimestamp, request, authCodePayload, undefined, undefined, undefined, requestId); - } - /** - * Handles the hash fragment response from public client code request. Returns a code response used by - * the client to exchange for a token in acquireToken. - * @param hashFragment - */ - handleFragmentResponse(serverParams, cachedState) { - // Handle responses. - const responseHandler = new ResponseHandler(this.config.authOptions.clientId, this.cacheManager, this.cryptoUtils, this.logger, null, null); - // Get code response - responseHandler.validateServerAuthorizationCodeResponse(serverParams, cachedState); - // throw when there is no auth code in the response - if (!serverParams.code) { - throw createClientAuthError(authorizationCodeMissingFromServerResponse); - } - return serverParams; - } - /** - * Used to log out the current user, and redirect the user to the postLogoutRedirectUri. - * Default behaviour is to redirect the user to `window.location.href`. - * @param authorityUri - */ - getLogoutUri(logoutRequest) { - // Throw error if logoutRequest is null/undefined - if (!logoutRequest) { - throw createClientConfigurationError(logoutRequestEmpty); - } - const queryString = this.createLogoutUrlQueryString(logoutRequest); - // Construct logout URI - return UrlString.appendQueryString(this.authority.endSessionEndpoint, queryString); - } - /** - * Executes POST request to token endpoint - * @param authority - * @param request - */ - async executeTokenRequest(authority, request) { - this.performanceClient?.addQueueMeasurement(PerformanceEvents.AuthClientExecuteTokenRequest, request.correlationId); - const queryParametersString = this.createTokenQueryParameters(request); - const endpoint = UrlString.appendQueryString(authority.tokenEndpoint, queryParametersString); - const requestBody = await invokeAsync(this.createTokenRequestBody.bind(this), PerformanceEvents.AuthClientCreateTokenRequestBody, this.logger, this.performanceClient, request.correlationId)(request); - let ccsCredential = undefined; - if (request.clientInfo) { - try { - const clientInfo = buildClientInfo(request.clientInfo, this.cryptoUtils.base64Decode); - ccsCredential = { - credential: `${clientInfo.uid}${Separators.CLIENT_INFO_SEPARATOR}${clientInfo.utid}`, - type: CcsCredentialType.HOME_ACCOUNT_ID, - }; - } - catch (e) { - this.logger.verbose("Could not parse client info for CCS Header: " + e); - } - } - const headers = this.createTokenRequestHeaders(ccsCredential || request.ccsCredential); - const thumbprint = { - clientId: request.tokenBodyParameters?.clientId || - this.config.authOptions.clientId, - authority: authority.canonicalAuthority, - scopes: request.scopes, - claims: request.claims, - authenticationScheme: request.authenticationScheme, - resourceRequestMethod: request.resourceRequestMethod, - resourceRequestUri: request.resourceRequestUri, - shrClaims: request.shrClaims, - sshKid: request.sshKid, - }; - return invokeAsync(this.executePostToTokenEndpoint.bind(this), PerformanceEvents.AuthorizationCodeClientExecutePostToTokenEndpoint, this.logger, this.performanceClient, request.correlationId)(endpoint, requestBody, headers, thumbprint, request.correlationId, PerformanceEvents.AuthorizationCodeClientExecutePostToTokenEndpoint); - } - /** - * Generates a map for all the params to be sent to the service - * @param request - */ - async createTokenRequestBody(request) { - this.performanceClient?.addQueueMeasurement(PerformanceEvents.AuthClientCreateTokenRequestBody, request.correlationId); - const parameterBuilder = new RequestParameterBuilder(request.correlationId, this.performanceClient); - parameterBuilder.addClientId(request.embeddedClientId || - request.tokenBodyParameters?.[CLIENT_ID] || - this.config.authOptions.clientId); - /* - * For hybrid spa flow, there will be a code but no verifier - * In this scenario, don't include redirect uri as auth code will not be bound to redirect URI - */ - if (!this.includeRedirectUri) { - // Just validate - RequestValidator.validateRedirectUri(request.redirectUri); - } - else { - // Validate and include redirect uri - parameterBuilder.addRedirectUri(request.redirectUri); - } - // Add scope array, parameter builder will add default scopes and dedupe - parameterBuilder.addScopes(request.scopes, true, this.oidcDefaultScopes); - // add code: user set, not validated - parameterBuilder.addAuthorizationCode(request.code); - // Add library metadata - parameterBuilder.addLibraryInfo(this.config.libraryInfo); - parameterBuilder.addApplicationTelemetry(this.config.telemetry.application); - parameterBuilder.addThrottling(); - if (this.serverTelemetryManager && !isOidcProtocolMode(this.config)) { - parameterBuilder.addServerTelemetry(this.serverTelemetryManager); - } - // add code_verifier if passed - if (request.codeVerifier) { - parameterBuilder.addCodeVerifier(request.codeVerifier); - } - if (this.config.clientCredentials.clientSecret) { - parameterBuilder.addClientSecret(this.config.clientCredentials.clientSecret); - } - if (this.config.clientCredentials.clientAssertion) { - const clientAssertion = this.config.clientCredentials.clientAssertion; - parameterBuilder.addClientAssertion(await getClientAssertion(clientAssertion.assertion, this.config.authOptions.clientId, request.resourceRequestUri)); - parameterBuilder.addClientAssertionType(clientAssertion.assertionType); - } - parameterBuilder.addGrantType(GrantType.AUTHORIZATION_CODE_GRANT); - parameterBuilder.addClientInfo(); - if (request.authenticationScheme === AuthenticationScheme.POP) { - const popTokenGenerator = new PopTokenGenerator(this.cryptoUtils, this.performanceClient); - let reqCnfData; - if (!request.popKid) { - const generatedReqCnfData = await invokeAsync(popTokenGenerator.generateCnf.bind(popTokenGenerator), PerformanceEvents.PopTokenGenerateCnf, this.logger, this.performanceClient, request.correlationId)(request, this.logger); - reqCnfData = generatedReqCnfData.reqCnfString; - } - else { - reqCnfData = this.cryptoUtils.encodeKid(request.popKid); - } - // SPA PoP requires full Base64Url encoded req_cnf string (unhashed) - parameterBuilder.addPopToken(reqCnfData); - } - else if (request.authenticationScheme === AuthenticationScheme.SSH) { - if (request.sshJwk) { - parameterBuilder.addSshJwk(request.sshJwk); - } - else { - throw createClientConfigurationError(missingSshJwk); - } - } - if (!StringUtils.isEmptyObj(request.claims) || - (this.config.authOptions.clientCapabilities && - this.config.authOptions.clientCapabilities.length > 0)) { - parameterBuilder.addClaims(request.claims, this.config.authOptions.clientCapabilities); - } - let ccsCred = undefined; - if (request.clientInfo) { - try { - const clientInfo = buildClientInfo(request.clientInfo, this.cryptoUtils.base64Decode); - ccsCred = { - credential: `${clientInfo.uid}${Separators.CLIENT_INFO_SEPARATOR}${clientInfo.utid}`, - type: CcsCredentialType.HOME_ACCOUNT_ID, - }; - } - catch (e) { - this.logger.verbose("Could not parse client info for CCS Header: " + e); - } - } - else { - ccsCred = request.ccsCredential; - } - // Adds these as parameters in the request instead of headers to prevent CORS preflight request - if (this.config.systemOptions.preventCorsPreflight && ccsCred) { - switch (ccsCred.type) { - case CcsCredentialType.HOME_ACCOUNT_ID: - try { - const clientInfo = buildClientInfoFromHomeAccountId(ccsCred.credential); - parameterBuilder.addCcsOid(clientInfo); - } - catch (e) { - this.logger.verbose("Could not parse home account ID for CCS Header: " + - e); - } - break; - case CcsCredentialType.UPN: - parameterBuilder.addCcsUpn(ccsCred.credential); - break; - } - } - if (request.embeddedClientId) { - parameterBuilder.addBrokerParameters({ - brokerClientId: this.config.authOptions.clientId, - brokerRedirectUri: this.config.authOptions.redirectUri, - }); - } - if (request.tokenBodyParameters) { - parameterBuilder.addExtraQueryParameters(request.tokenBodyParameters); - } - // Add hybrid spa parameters if not already provided - if (request.enableSpaAuthorizationCode && - (!request.tokenBodyParameters || - !request.tokenBodyParameters[RETURN_SPA_CODE])) { - parameterBuilder.addExtraQueryParameters({ - [RETURN_SPA_CODE]: "1", - }); - } - return parameterBuilder.createQueryString(); - } - /** - * This API validates the `AuthorizationCodeUrlRequest` and creates a URL - * @param request - */ - async createAuthCodeUrlQueryString(request) { - // generate the correlationId if not set by the user and add - const correlationId = request.correlationId || - this.config.cryptoInterface.createNewGuid(); - this.performanceClient?.addQueueMeasurement(PerformanceEvents.AuthClientCreateQueryString, correlationId); - const parameterBuilder = new RequestParameterBuilder(correlationId, this.performanceClient); - parameterBuilder.addClientId(request.embeddedClientId || - request.extraQueryParameters?.[CLIENT_ID] || - this.config.authOptions.clientId); - const requestScopes = [ - ...(request.scopes || []), - ...(request.extraScopesToConsent || []), - ]; - parameterBuilder.addScopes(requestScopes, true, this.oidcDefaultScopes); - // validate the redirectUri (to be a non null value) - parameterBuilder.addRedirectUri(request.redirectUri); - parameterBuilder.addCorrelationId(correlationId); - // add response_mode. If not passed in it defaults to query. - parameterBuilder.addResponseMode(request.responseMode); - // add response_type = code - parameterBuilder.addResponseTypeCode(); - // add library info parameters - parameterBuilder.addLibraryInfo(this.config.libraryInfo); - if (!isOidcProtocolMode(this.config)) { - parameterBuilder.addApplicationTelemetry(this.config.telemetry.application); - } - // add client_info=1 - parameterBuilder.addClientInfo(); - if (request.codeChallenge && request.codeChallengeMethod) { - parameterBuilder.addCodeChallengeParams(request.codeChallenge, request.codeChallengeMethod); - } - if (request.prompt) { - parameterBuilder.addPrompt(request.prompt); - } - if (request.domainHint) { - parameterBuilder.addDomainHint(request.domainHint); - } - // Add sid or loginHint with preference for login_hint claim (in request) -> sid -> loginHint (upn/email) -> username of AccountInfo object - if (request.prompt !== PromptValue.SELECT_ACCOUNT) { - // AAD will throw if prompt=select_account is passed with an account hint - if (request.sid && request.prompt === PromptValue.NONE) { - // SessionID is only used in silent calls - this.logger.verbose("createAuthCodeUrlQueryString: Prompt is none, adding sid from request"); - parameterBuilder.addSid(request.sid); - } - else if (request.account) { - const accountSid = this.extractAccountSid(request.account); - let accountLoginHintClaim = this.extractLoginHint(request.account); - if (accountLoginHintClaim && request.domainHint) { - this.logger.warning(`AuthorizationCodeClient.createAuthCodeUrlQueryString: "domainHint" param is set, skipping opaque "login_hint" claim. Please consider not passing domainHint`); - accountLoginHintClaim = null; - } - // If login_hint claim is present, use it over sid/username - if (accountLoginHintClaim) { - this.logger.verbose("createAuthCodeUrlQueryString: login_hint claim present on account"); - parameterBuilder.addLoginHint(accountLoginHintClaim); - try { - const clientInfo = buildClientInfoFromHomeAccountId(request.account.homeAccountId); - parameterBuilder.addCcsOid(clientInfo); - } - catch (e) { - this.logger.verbose("createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header"); - } - } - else if (accountSid && request.prompt === PromptValue.NONE) { - /* - * If account and loginHint are provided, we will check account first for sid before adding loginHint - * SessionId is only used in silent calls - */ - this.logger.verbose("createAuthCodeUrlQueryString: Prompt is none, adding sid from account"); - parameterBuilder.addSid(accountSid); - try { - const clientInfo = buildClientInfoFromHomeAccountId(request.account.homeAccountId); - parameterBuilder.addCcsOid(clientInfo); - } - catch (e) { - this.logger.verbose("createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header"); - } - } - else if (request.loginHint) { - this.logger.verbose("createAuthCodeUrlQueryString: Adding login_hint from request"); - parameterBuilder.addLoginHint(request.loginHint); - parameterBuilder.addCcsUpn(request.loginHint); - } - else if (request.account.username) { - // Fallback to account username if provided - this.logger.verbose("createAuthCodeUrlQueryString: Adding login_hint from account"); - parameterBuilder.addLoginHint(request.account.username); - try { - const clientInfo = buildClientInfoFromHomeAccountId(request.account.homeAccountId); - parameterBuilder.addCcsOid(clientInfo); - } - catch (e) { - this.logger.verbose("createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header"); - } - } - } - else if (request.loginHint) { - this.logger.verbose("createAuthCodeUrlQueryString: No account, adding login_hint from request"); - parameterBuilder.addLoginHint(request.loginHint); - parameterBuilder.addCcsUpn(request.loginHint); - } - } - else { - this.logger.verbose("createAuthCodeUrlQueryString: Prompt is select_account, ignoring account hints"); - } - if (request.nonce) { - parameterBuilder.addNonce(request.nonce); - } - if (request.state) { - parameterBuilder.addState(request.state); - } - if (request.claims || - (this.config.authOptions.clientCapabilities && - this.config.authOptions.clientCapabilities.length > 0)) { - parameterBuilder.addClaims(request.claims, this.config.authOptions.clientCapabilities); - } - if (request.embeddedClientId) { - parameterBuilder.addBrokerParameters({ - brokerClientId: this.config.authOptions.clientId, - brokerRedirectUri: this.config.authOptions.redirectUri, - }); - } - this.addExtraQueryParams(request, parameterBuilder); - if (request.nativeBroker) { - // signal ests that this is a WAM call - parameterBuilder.addNativeBroker(); - // pass the req_cnf for POP - if (request.authenticationScheme === AuthenticationScheme.POP) { - const popTokenGenerator = new PopTokenGenerator(this.cryptoUtils); - // req_cnf is always sent as a string for SPAs - let reqCnfData; - if (!request.popKid) { - const generatedReqCnfData = await invokeAsync(popTokenGenerator.generateCnf.bind(popTokenGenerator), PerformanceEvents.PopTokenGenerateCnf, this.logger, this.performanceClient, request.correlationId)(request, this.logger); - reqCnfData = generatedReqCnfData.reqCnfString; - } - else { - reqCnfData = this.cryptoUtils.encodeKid(request.popKid); - } - parameterBuilder.addPopToken(reqCnfData); - } - } - return parameterBuilder.createQueryString(); - } - /** - * This API validates the `EndSessionRequest` and creates a URL - * @param request - */ - createLogoutUrlQueryString(request) { - const parameterBuilder = new RequestParameterBuilder(request.correlationId, this.performanceClient); - if (request.postLogoutRedirectUri) { - parameterBuilder.addPostLogoutRedirectUri(request.postLogoutRedirectUri); - } - if (request.correlationId) { - parameterBuilder.addCorrelationId(request.correlationId); - } - if (request.idTokenHint) { - parameterBuilder.addIdTokenHint(request.idTokenHint); - } - if (request.state) { - parameterBuilder.addState(request.state); - } - if (request.logoutHint) { - parameterBuilder.addLogoutHint(request.logoutHint); - } - this.addExtraQueryParams(request, parameterBuilder); - return parameterBuilder.createQueryString(); - } - addExtraQueryParams(request, parameterBuilder) { - const hasRequestInstanceAware = request.extraQueryParameters && - request.extraQueryParameters.hasOwnProperty("instance_aware"); - // Set instance_aware flag if config auth param is set - if (!hasRequestInstanceAware && this.config.authOptions.instanceAware) { - request.extraQueryParameters = request.extraQueryParameters || {}; - request.extraQueryParameters["instance_aware"] = "true"; - } - if (request.extraQueryParameters) { - parameterBuilder.addExtraQueryParameters(request.extraQueryParameters); - } - } - /** - * Helper to get sid from account. Returns null if idTokenClaims are not present or sid is not present. - * @param account - */ - extractAccountSid(account) { - return account.idTokenClaims?.sid || null; - } - extractLoginHint(account) { - return account.idTokenClaims?.login_hint || null; - } -} - -/*! @azure/msal-common v14.16.1 2025-08-05 */ - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -const DEFAULT_REFRESH_TOKEN_EXPIRATION_OFFSET_SECONDS = 300; // 5 Minutes -/** - * OAuth2.0 refresh token client - * @internal - */ -class RefreshTokenClient extends BaseClient { - constructor(configuration, performanceClient) { - super(configuration, performanceClient); - } - async acquireToken(request) { - this.performanceClient?.addQueueMeasurement(PerformanceEvents.RefreshTokenClientAcquireToken, request.correlationId); - const reqTimestamp = nowSeconds(); - const response = await invokeAsync(this.executeTokenRequest.bind(this), PerformanceEvents.RefreshTokenClientExecuteTokenRequest, this.logger, this.performanceClient, request.correlationId)(request, this.authority); - // Retrieve requestId from response headers - const requestId = response.headers?.[HeaderNames.X_MS_REQUEST_ID]; - const responseHandler = new ResponseHandler(this.config.authOptions.clientId, this.cacheManager, this.cryptoUtils, this.logger, this.config.serializableCache, this.config.persistencePlugin); - responseHandler.validateTokenResponse(response.body); - return invokeAsync(responseHandler.handleServerTokenResponse.bind(responseHandler), PerformanceEvents.HandleServerTokenResponse, this.logger, this.performanceClient, request.correlationId)(response.body, this.authority, reqTimestamp, request, undefined, undefined, true, request.forceCache, requestId); - } - /** - * Gets cached refresh token and attaches to request, then calls acquireToken API - * @param request - */ - async acquireTokenByRefreshToken(request) { - // Cannot renew token if no request object is given. - if (!request) { - throw createClientConfigurationError(tokenRequestEmpty); - } - this.performanceClient?.addQueueMeasurement(PerformanceEvents.RefreshTokenClientAcquireTokenByRefreshToken, request.correlationId); - // We currently do not support silent flow for account === null use cases; This will be revisited for confidential flow usecases - if (!request.account) { - throw createClientAuthError(noAccountInSilentRequest); - } - // try checking if FOCI is enabled for the given application - const isFOCI = this.cacheManager.isAppMetadataFOCI(request.account.environment); - // if the app is part of the family, retrive a Family refresh token if present and make a refreshTokenRequest - if (isFOCI) { - try { - return await invokeAsync(this.acquireTokenWithCachedRefreshToken.bind(this), PerformanceEvents.RefreshTokenClientAcquireTokenWithCachedRefreshToken, this.logger, this.performanceClient, request.correlationId)(request, true); - } - catch (e) { - const noFamilyRTInCache = e instanceof InteractionRequiredAuthError && - e.errorCode === - noTokensFound; - const clientMismatchErrorWithFamilyRT = e instanceof ServerError && - e.errorCode === Errors.INVALID_GRANT_ERROR && - e.subError === Errors.CLIENT_MISMATCH_ERROR; - // if family Refresh Token (FRT) cache acquisition fails or if client_mismatch error is seen with FRT, reattempt with application Refresh Token (ART) - if (noFamilyRTInCache || clientMismatchErrorWithFamilyRT) { - return invokeAsync(this.acquireTokenWithCachedRefreshToken.bind(this), PerformanceEvents.RefreshTokenClientAcquireTokenWithCachedRefreshToken, this.logger, this.performanceClient, request.correlationId)(request, false); - // throw in all other cases - } - else { - throw e; - } - } - } - // fall back to application refresh token acquisition - return invokeAsync(this.acquireTokenWithCachedRefreshToken.bind(this), PerformanceEvents.RefreshTokenClientAcquireTokenWithCachedRefreshToken, this.logger, this.performanceClient, request.correlationId)(request, false); - } - /** - * makes a network call to acquire tokens by exchanging RefreshToken available in userCache; throws if refresh token is not cached - * @param request - */ - async acquireTokenWithCachedRefreshToken(request, foci) { - this.performanceClient?.addQueueMeasurement(PerformanceEvents.RefreshTokenClientAcquireTokenWithCachedRefreshToken, request.correlationId); - // fetches family RT or application RT based on FOCI value - const refreshToken = invoke(this.cacheManager.getRefreshToken.bind(this.cacheManager), PerformanceEvents.CacheManagerGetRefreshToken, this.logger, this.performanceClient, request.correlationId)(request.account, foci, request.correlationId, undefined, this.performanceClient); - if (!refreshToken) { - throw createInteractionRequiredAuthError(noTokensFound); - } - if (refreshToken.expiresOn && - isTokenExpired(refreshToken.expiresOn, request.refreshTokenExpirationOffsetSeconds || - DEFAULT_REFRESH_TOKEN_EXPIRATION_OFFSET_SECONDS)) { - throw createInteractionRequiredAuthError(refreshTokenExpired); - } - // attach cached RT size to the current measurement - const refreshTokenRequest = { - ...request, - refreshToken: refreshToken.secret, - authenticationScheme: request.authenticationScheme || AuthenticationScheme.BEARER, - ccsCredential: { - credential: request.account.homeAccountId, - type: CcsCredentialType.HOME_ACCOUNT_ID, - }, - }; - try { - return await invokeAsync(this.acquireToken.bind(this), PerformanceEvents.RefreshTokenClientAcquireToken, this.logger, this.performanceClient, request.correlationId)(refreshTokenRequest); - } - catch (e) { - if (e instanceof InteractionRequiredAuthError && - e.subError === badToken) { - // Remove bad refresh token from cache - this.logger.verbose("acquireTokenWithRefreshToken: bad refresh token, removing from cache"); - const badRefreshTokenKey = generateCredentialKey(refreshToken); - this.cacheManager.removeRefreshToken(badRefreshTokenKey, request.correlationId); - } - throw e; - } - } - /** - * Constructs the network message and makes a NW call to the underlying secure token service - * @param request - * @param authority - */ - async executeTokenRequest(request, authority) { - this.performanceClient?.addQueueMeasurement(PerformanceEvents.RefreshTokenClientExecuteTokenRequest, request.correlationId); - const queryParametersString = this.createTokenQueryParameters(request); - const endpoint = UrlString.appendQueryString(authority.tokenEndpoint, queryParametersString); - const requestBody = await invokeAsync(this.createTokenRequestBody.bind(this), PerformanceEvents.RefreshTokenClientCreateTokenRequestBody, this.logger, this.performanceClient, request.correlationId)(request); - const headers = this.createTokenRequestHeaders(request.ccsCredential); - const thumbprint = { - clientId: request.tokenBodyParameters?.clientId || - this.config.authOptions.clientId, - authority: authority.canonicalAuthority, - scopes: request.scopes, - claims: request.claims, - authenticationScheme: request.authenticationScheme, - resourceRequestMethod: request.resourceRequestMethod, - resourceRequestUri: request.resourceRequestUri, - shrClaims: request.shrClaims, - sshKid: request.sshKid, - }; - return invokeAsync(this.executePostToTokenEndpoint.bind(this), PerformanceEvents.RefreshTokenClientExecutePostToTokenEndpoint, this.logger, this.performanceClient, request.correlationId)(endpoint, requestBody, headers, thumbprint, request.correlationId, PerformanceEvents.RefreshTokenClientExecutePostToTokenEndpoint); - } - /** - * Helper function to create the token request body - * @param request - */ - async createTokenRequestBody(request) { - this.performanceClient?.addQueueMeasurement(PerformanceEvents.RefreshTokenClientCreateTokenRequestBody, request.correlationId); - const correlationId = request.correlationId; - const parameterBuilder = new RequestParameterBuilder(correlationId, this.performanceClient); - parameterBuilder.addClientId(request.embeddedClientId || - request.tokenBodyParameters?.[CLIENT_ID] || - this.config.authOptions.clientId); - if (request.redirectUri) { - parameterBuilder.addRedirectUri(request.redirectUri); - } - parameterBuilder.addScopes(request.scopes, true, this.config.authOptions.authority.options.OIDCOptions?.defaultScopes); - parameterBuilder.addGrantType(GrantType.REFRESH_TOKEN_GRANT); - parameterBuilder.addClientInfo(); - parameterBuilder.addLibraryInfo(this.config.libraryInfo); - parameterBuilder.addApplicationTelemetry(this.config.telemetry.application); - parameterBuilder.addThrottling(); - if (this.serverTelemetryManager && !isOidcProtocolMode(this.config)) { - parameterBuilder.addServerTelemetry(this.serverTelemetryManager); - } - parameterBuilder.addRefreshToken(request.refreshToken); - if (this.config.clientCredentials.clientSecret) { - parameterBuilder.addClientSecret(this.config.clientCredentials.clientSecret); - } - if (this.config.clientCredentials.clientAssertion) { - const clientAssertion = this.config.clientCredentials.clientAssertion; - parameterBuilder.addClientAssertion(await getClientAssertion(clientAssertion.assertion, this.config.authOptions.clientId, request.resourceRequestUri)); - parameterBuilder.addClientAssertionType(clientAssertion.assertionType); - } - if (request.authenticationScheme === AuthenticationScheme.POP) { - const popTokenGenerator = new PopTokenGenerator(this.cryptoUtils, this.performanceClient); - let reqCnfData; - if (!request.popKid) { - const generatedReqCnfData = await invokeAsync(popTokenGenerator.generateCnf.bind(popTokenGenerator), PerformanceEvents.PopTokenGenerateCnf, this.logger, this.performanceClient, request.correlationId)(request, this.logger); - reqCnfData = generatedReqCnfData.reqCnfString; - } - else { - reqCnfData = this.cryptoUtils.encodeKid(request.popKid); - } - // SPA PoP requires full Base64Url encoded req_cnf string (unhashed) - parameterBuilder.addPopToken(reqCnfData); - } - else if (request.authenticationScheme === AuthenticationScheme.SSH) { - if (request.sshJwk) { - parameterBuilder.addSshJwk(request.sshJwk); - } - else { - throw createClientConfigurationError(missingSshJwk); - } - } - if (!StringUtils.isEmptyObj(request.claims) || - (this.config.authOptions.clientCapabilities && - this.config.authOptions.clientCapabilities.length > 0)) { - parameterBuilder.addClaims(request.claims, this.config.authOptions.clientCapabilities); - } - if (this.config.systemOptions.preventCorsPreflight && - request.ccsCredential) { - switch (request.ccsCredential.type) { - case CcsCredentialType.HOME_ACCOUNT_ID: - try { - const clientInfo = buildClientInfoFromHomeAccountId(request.ccsCredential.credential); - parameterBuilder.addCcsOid(clientInfo); - } - catch (e) { - this.logger.verbose("Could not parse home account ID for CCS Header: " + - e); - } - break; - case CcsCredentialType.UPN: - parameterBuilder.addCcsUpn(request.ccsCredential.credential); - break; - } - } - if (request.embeddedClientId) { - parameterBuilder.addBrokerParameters({ - brokerClientId: this.config.authOptions.clientId, - brokerRedirectUri: this.config.authOptions.redirectUri, - }); - } - if (request.tokenBodyParameters) { - parameterBuilder.addExtraQueryParameters(request.tokenBodyParameters); - } - return parameterBuilder.createQueryString(); - } -} - -/*! @azure/msal-common v14.16.1 2025-08-05 */ - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** @internal */ -class SilentFlowClient extends BaseClient { - constructor(configuration, performanceClient) { - super(configuration, performanceClient); - } - /** - * Retrieves a token from cache if it is still valid, or uses the cached refresh token to renew - * the given token and returns the renewed token - * @param request - */ - async acquireToken(request) { - try { - const [authResponse, cacheOutcome] = await this.acquireCachedToken({ - ...request, - scopes: request.scopes?.length - ? request.scopes - : [...OIDC_DEFAULT_SCOPES], - }); - // if the token is not expired but must be refreshed; get a new one in the background - if (cacheOutcome === CacheOutcome.PROACTIVELY_REFRESHED) { - this.logger.info("SilentFlowClient:acquireCachedToken - Cached access token's refreshOn property has been exceeded'. It's not expired, but must be refreshed."); - // refresh the access token in the background - const refreshTokenClient = new RefreshTokenClient(this.config, this.performanceClient); - refreshTokenClient - .acquireTokenByRefreshToken(request) - .catch(() => { - // do nothing, this is running in the background and no action is to be taken upon success or failure - }); - } - // return the cached token - return authResponse; - } - catch (e) { - if (e instanceof ClientAuthError && - e.errorCode === tokenRefreshRequired) { - const refreshTokenClient = new RefreshTokenClient(this.config, this.performanceClient); - return refreshTokenClient.acquireTokenByRefreshToken(request); - } - else { - throw e; - } - } - } - /** - * Retrieves token from cache or throws an error if it must be refreshed. - * @param request - */ - async acquireCachedToken(request) { - this.performanceClient?.addQueueMeasurement(PerformanceEvents.SilentFlowClientAcquireCachedToken, request.correlationId); - let lastCacheOutcome = CacheOutcome.NOT_APPLICABLE; - if (request.forceRefresh || - (!this.config.cacheOptions.claimsBasedCachingEnabled && - !StringUtils.isEmptyObj(request.claims))) { - // Must refresh due to present force_refresh flag. - this.setCacheOutcome(CacheOutcome.FORCE_REFRESH_OR_CLAIMS, request.correlationId); - throw createClientAuthError(tokenRefreshRequired); - } - // We currently do not support silent flow for account === null use cases; This will be revisited for confidential flow usecases - if (!request.account) { - throw createClientAuthError(noAccountInSilentRequest); - } - const requestTenantId = request.account.tenantId || - getTenantFromAuthorityString(request.authority); - const tokenKeys = this.cacheManager.getTokenKeys(); - const cachedAccessToken = this.cacheManager.getAccessToken(request.account, request, tokenKeys, requestTenantId, this.performanceClient); - if (!cachedAccessToken) { - // must refresh due to non-existent access_token - this.setCacheOutcome(CacheOutcome.NO_CACHED_ACCESS_TOKEN, request.correlationId); - throw createClientAuthError(tokenRefreshRequired); - } - else if (wasClockTurnedBack(cachedAccessToken.cachedAt) || - isTokenExpired(cachedAccessToken.expiresOn, this.config.systemOptions.tokenRenewalOffsetSeconds)) { - // must refresh due to the expires_in value - this.setCacheOutcome(CacheOutcome.CACHED_ACCESS_TOKEN_EXPIRED, request.correlationId); - throw createClientAuthError(tokenRefreshRequired); - } - else if (cachedAccessToken.refreshOn && - isTokenExpired(cachedAccessToken.refreshOn, 0)) { - // must refresh (in the background) due to the refresh_in value - lastCacheOutcome = CacheOutcome.PROACTIVELY_REFRESHED; - // don't throw ClientAuthError.createRefreshRequiredError(), return cached token instead - } - const environment = request.authority || this.authority.getPreferredCache(); - const cacheRecord = { - account: this.cacheManager.readAccountFromCache(request.account, request.correlationId), - accessToken: cachedAccessToken, - idToken: this.cacheManager.getIdToken(request.account, request.correlationId, tokenKeys, requestTenantId, this.performanceClient), - refreshToken: null, - appMetadata: this.cacheManager.readAppMetadataFromCache(environment), - }; - this.setCacheOutcome(lastCacheOutcome, request.correlationId); - if (this.config.serverTelemetryManager) { - this.config.serverTelemetryManager.incrementCacheHits(); - } - return [ - await invokeAsync(this.generateResultFromCacheRecord.bind(this), PerformanceEvents.SilentFlowClientGenerateResultFromCacheRecord, this.logger, this.performanceClient, request.correlationId)(cacheRecord, request), - lastCacheOutcome, - ]; - } - setCacheOutcome(cacheOutcome, correlationId) { - this.serverTelemetryManager?.setCacheOutcome(cacheOutcome); - this.performanceClient?.addFields({ - cacheOutcome: cacheOutcome, - }, correlationId); - if (cacheOutcome !== CacheOutcome.NOT_APPLICABLE) { - this.logger.info(`Token refresh is required due to cache outcome: ${cacheOutcome}`); - } - } - /** - * Helper function to build response object from the CacheRecord - * @param cacheRecord - */ - async generateResultFromCacheRecord(cacheRecord, request) { - this.performanceClient?.addQueueMeasurement(PerformanceEvents.SilentFlowClientGenerateResultFromCacheRecord, request.correlationId); - let idTokenClaims; - if (cacheRecord.idToken) { - idTokenClaims = extractTokenClaims(cacheRecord.idToken.secret, this.config.cryptoInterface.base64Decode); - } - // token max_age check - if (request.maxAge || request.maxAge === 0) { - const authTime = idTokenClaims?.auth_time; - if (!authTime) { - throw createClientAuthError(authTimeNotFound); - } - checkMaxAge(authTime, request.maxAge); - } - return ResponseHandler.generateAuthenticationResult(this.cryptoUtils, this.authority, cacheRecord, true, request, idTokenClaims); - } -} - -/*! @azure/msal-common v14.16.1 2025-08-05 */ - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -const skuGroupSeparator = ","; -const skuValueSeparator = "|"; -function makeExtraSkuString(params) { - const { skus, libraryName, libraryVersion, extensionName, extensionVersion, } = params; - const skuMap = new Map([ - [0, [libraryName, libraryVersion]], - [2, [extensionName, extensionVersion]], - ]); - let skuArr = []; - if (skus?.length) { - skuArr = skus.split(skuGroupSeparator); - // Ignore invalid input sku param - if (skuArr.length < 4) { - return skus; - } - } - else { - skuArr = Array.from({ length: 4 }, () => skuValueSeparator); - } - skuMap.forEach((value, key) => { - if (value.length === 2 && value[0]?.length && value[1]?.length) { - setSku({ - skuArr, - index: key, - skuName: value[0], - skuVersion: value[1], - }); - } - }); - return skuArr.join(skuGroupSeparator); -} -function setSku(params) { - const { skuArr, index, skuName, skuVersion } = params; - if (index >= skuArr.length) { - return; - } - skuArr[index] = [skuName, skuVersion].join(skuValueSeparator); -} -/** @internal */ -class ServerTelemetryManager { - constructor(telemetryRequest, cacheManager) { - this.cacheOutcome = CacheOutcome.NOT_APPLICABLE; - this.cacheManager = cacheManager; - this.apiId = telemetryRequest.apiId; - this.correlationId = telemetryRequest.correlationId; - this.wrapperSKU = telemetryRequest.wrapperSKU || Constants$1.EMPTY_STRING; - this.wrapperVer = telemetryRequest.wrapperVer || Constants$1.EMPTY_STRING; - this.telemetryCacheKey = - SERVER_TELEM_CONSTANTS.CACHE_KEY + - Separators.CACHE_KEY_SEPARATOR + - telemetryRequest.clientId; - } - /** - * API to add MSER Telemetry to request - */ - generateCurrentRequestHeaderValue() { - const request = `${this.apiId}${SERVER_TELEM_CONSTANTS.VALUE_SEPARATOR}${this.cacheOutcome}`; - const platformFieldsArr = [this.wrapperSKU, this.wrapperVer]; - const nativeBrokerErrorCode = this.getNativeBrokerErrorCode(); - if (nativeBrokerErrorCode?.length) { - platformFieldsArr.push(`broker_error=${nativeBrokerErrorCode}`); - } - const platformFields = platformFieldsArr.join(SERVER_TELEM_CONSTANTS.VALUE_SEPARATOR); - const regionDiscoveryFields = this.getRegionDiscoveryFields(); - const requestWithRegionDiscoveryFields = [ - request, - regionDiscoveryFields, - ].join(SERVER_TELEM_CONSTANTS.VALUE_SEPARATOR); - return [ - SERVER_TELEM_CONSTANTS.SCHEMA_VERSION, - requestWithRegionDiscoveryFields, - platformFields, - ].join(SERVER_TELEM_CONSTANTS.CATEGORY_SEPARATOR); - } - /** - * API to add MSER Telemetry for the last failed request - */ - generateLastRequestHeaderValue() { - const lastRequests = this.getLastRequests(); - const maxErrors = ServerTelemetryManager.maxErrorsToSend(lastRequests); - const failedRequests = lastRequests.failedRequests - .slice(0, 2 * maxErrors) - .join(SERVER_TELEM_CONSTANTS.VALUE_SEPARATOR); - const errors = lastRequests.errors - .slice(0, maxErrors) - .join(SERVER_TELEM_CONSTANTS.VALUE_SEPARATOR); - const errorCount = lastRequests.errors.length; - // Indicate whether this header contains all data or partial data - const overflow = maxErrors < errorCount - ? SERVER_TELEM_CONSTANTS.OVERFLOW_TRUE - : SERVER_TELEM_CONSTANTS.OVERFLOW_FALSE; - const platformFields = [errorCount, overflow].join(SERVER_TELEM_CONSTANTS.VALUE_SEPARATOR); - return [ - SERVER_TELEM_CONSTANTS.SCHEMA_VERSION, - lastRequests.cacheHits, - failedRequests, - errors, - platformFields, - ].join(SERVER_TELEM_CONSTANTS.CATEGORY_SEPARATOR); - } - /** - * API to cache token failures for MSER data capture - * @param error - */ - cacheFailedRequest(error) { - const lastRequests = this.getLastRequests(); - if (lastRequests.errors.length >= - SERVER_TELEM_CONSTANTS.MAX_CACHED_ERRORS) { - // Remove a cached error to make room, first in first out - lastRequests.failedRequests.shift(); // apiId - lastRequests.failedRequests.shift(); // correlationId - lastRequests.errors.shift(); - } - lastRequests.failedRequests.push(this.apiId, this.correlationId); - if (error instanceof Error && !!error && error.toString()) { - if (error instanceof AuthError) { - if (error.subError) { - lastRequests.errors.push(error.subError); - } - else if (error.errorCode) { - lastRequests.errors.push(error.errorCode); - } - else { - lastRequests.errors.push(error.toString()); - } - } - else { - lastRequests.errors.push(error.toString()); - } - } - else { - lastRequests.errors.push(SERVER_TELEM_CONSTANTS.UNKNOWN_ERROR); - } - this.cacheManager.setServerTelemetry(this.telemetryCacheKey, lastRequests, this.correlationId); - return; - } - /** - * Update server telemetry cache entry by incrementing cache hit counter - */ - incrementCacheHits() { - const lastRequests = this.getLastRequests(); - lastRequests.cacheHits += 1; - this.cacheManager.setServerTelemetry(this.telemetryCacheKey, lastRequests, this.correlationId); - return lastRequests.cacheHits; - } - /** - * Get the server telemetry entity from cache or initialize a new one - */ - getLastRequests() { - const initialValue = { - failedRequests: [], - errors: [], - cacheHits: 0, - }; - const lastRequests = this.cacheManager.getServerTelemetry(this.telemetryCacheKey); - return lastRequests || initialValue; - } - /** - * Remove server telemetry cache entry - */ - clearTelemetryCache() { - const lastRequests = this.getLastRequests(); - const numErrorsFlushed = ServerTelemetryManager.maxErrorsToSend(lastRequests); - const errorCount = lastRequests.errors.length; - if (numErrorsFlushed === errorCount) { - // All errors were sent on last request, clear Telemetry cache - this.cacheManager.removeItem(this.telemetryCacheKey, this.correlationId); - } - else { - // Partial data was flushed to server, construct a new telemetry cache item with errors that were not flushed - const serverTelemEntity = { - failedRequests: lastRequests.failedRequests.slice(numErrorsFlushed * 2), - errors: lastRequests.errors.slice(numErrorsFlushed), - cacheHits: 0, - }; - this.cacheManager.setServerTelemetry(this.telemetryCacheKey, serverTelemEntity, this.correlationId); - } - } - /** - * Returns the maximum number of errors that can be flushed to the server in the next network request - * @param serverTelemetryEntity - */ - static maxErrorsToSend(serverTelemetryEntity) { - let i; - let maxErrors = 0; - let dataSize = 0; - const errorCount = serverTelemetryEntity.errors.length; - for (i = 0; i < errorCount; i++) { - // failedRequests parameter contains pairs of apiId and correlationId, multiply index by 2 to preserve pairs - const apiId = serverTelemetryEntity.failedRequests[2 * i] || - Constants$1.EMPTY_STRING; - const correlationId = serverTelemetryEntity.failedRequests[2 * i + 1] || - Constants$1.EMPTY_STRING; - const errorCode = serverTelemetryEntity.errors[i] || Constants$1.EMPTY_STRING; - // Count number of characters that would be added to header, each character is 1 byte. Add 3 at the end to account for separators - dataSize += - apiId.toString().length + - correlationId.toString().length + - errorCode.length + - 3; - if (dataSize < SERVER_TELEM_CONSTANTS.MAX_LAST_HEADER_BYTES) { - // Adding this entry to the header would still keep header size below the limit - maxErrors += 1; - } - else { - break; - } - } - return maxErrors; - } - /** - * Get the region discovery fields - * - * @returns string - */ - getRegionDiscoveryFields() { - const regionDiscoveryFields = []; - regionDiscoveryFields.push(this.regionUsed || Constants$1.EMPTY_STRING); - regionDiscoveryFields.push(this.regionSource || Constants$1.EMPTY_STRING); - regionDiscoveryFields.push(this.regionOutcome || Constants$1.EMPTY_STRING); - return regionDiscoveryFields.join(","); - } - /** - * Update the region discovery metadata - * - * @param regionDiscoveryMetadata - * @returns void - */ - updateRegionDiscoveryMetadata(regionDiscoveryMetadata) { - this.regionUsed = regionDiscoveryMetadata.region_used; - this.regionSource = regionDiscoveryMetadata.region_source; - this.regionOutcome = regionDiscoveryMetadata.region_outcome; - } - /** - * Set cache outcome - */ - setCacheOutcome(cacheOutcome) { - this.cacheOutcome = cacheOutcome; - } - setNativeBrokerErrorCode(errorCode) { - const lastRequests = this.getLastRequests(); - lastRequests.nativeBrokerErrorCode = errorCode; - this.cacheManager.setServerTelemetry(this.telemetryCacheKey, lastRequests, this.correlationId); - } - getNativeBrokerErrorCode() { - return this.getLastRequests().nativeBrokerErrorCode; - } - clearNativeBrokerErrorCode() { - const lastRequests = this.getLastRequests(); - delete lastRequests.nativeBrokerErrorCode; - this.cacheManager.setServerTelemetry(this.telemetryCacheKey, lastRequests, this.correlationId); - } - static makeExtraSkuString(params) { - return makeExtraSkuString(params); - } -} - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * This class deserializes cache entities read from the file into in-memory object types defined internally - * @internal - */ -class Deserializer { - /** - * Parse the JSON blob in memory and deserialize the content - * @param cachedJson - JSON blob cache - */ - static deserializeJSONBlob(jsonFile) { - const deserializedCache = !jsonFile ? {} : JSON.parse(jsonFile); - return deserializedCache; - } - /** - * Deserializes accounts to AccountEntity objects - * @param accounts - accounts of type SerializedAccountEntity - */ - static deserializeAccounts(accounts) { - const accountObjects = {}; - if (accounts) { - Object.keys(accounts).map(function (key) { - const serializedAcc = accounts[key]; - const mappedAcc = { - homeAccountId: serializedAcc.home_account_id, - environment: serializedAcc.environment, - realm: serializedAcc.realm, - localAccountId: serializedAcc.local_account_id, - username: serializedAcc.username, - authorityType: serializedAcc.authority_type, - name: serializedAcc.name, - clientInfo: serializedAcc.client_info, - lastModificationTime: serializedAcc.last_modification_time, - lastModificationApp: serializedAcc.last_modification_app, - tenantProfiles: serializedAcc.tenantProfiles?.map((serializedTenantProfile) => { - return JSON.parse(serializedTenantProfile); - }), - }; - const account = new AccountEntity(); - CacheManager.toObject(account, mappedAcc); - accountObjects[key] = account; - }); - } - return accountObjects; - } - /** - * Deserializes id tokens to IdTokenEntity objects - * @param idTokens - credentials of type SerializedIdTokenEntity - */ - static deserializeIdTokens(idTokens) { - const idObjects = {}; - if (idTokens) { - Object.keys(idTokens).map(function (key) { - const serializedIdT = idTokens[key]; - const idToken = { - homeAccountId: serializedIdT.home_account_id, - environment: serializedIdT.environment, - credentialType: serializedIdT.credential_type, - clientId: serializedIdT.client_id, - secret: serializedIdT.secret, - realm: serializedIdT.realm, - }; - idObjects[key] = idToken; - }); - } - return idObjects; - } - /** - * Deserializes access tokens to AccessTokenEntity objects - * @param accessTokens - access tokens of type SerializedAccessTokenEntity - */ - static deserializeAccessTokens(accessTokens) { - const atObjects = {}; - if (accessTokens) { - Object.keys(accessTokens).map(function (key) { - const serializedAT = accessTokens[key]; - const accessToken = { - homeAccountId: serializedAT.home_account_id, - environment: serializedAT.environment, - credentialType: serializedAT.credential_type, - clientId: serializedAT.client_id, - secret: serializedAT.secret, - realm: serializedAT.realm, - target: serializedAT.target, - cachedAt: serializedAT.cached_at, - expiresOn: serializedAT.expires_on, - extendedExpiresOn: serializedAT.extended_expires_on, - refreshOn: serializedAT.refresh_on, - keyId: serializedAT.key_id, - tokenType: serializedAT.token_type, - requestedClaims: serializedAT.requestedClaims, - requestedClaimsHash: serializedAT.requestedClaimsHash, - userAssertionHash: serializedAT.userAssertionHash, - }; - atObjects[key] = accessToken; - }); - } - return atObjects; - } - /** - * Deserializes refresh tokens to RefreshTokenEntity objects - * @param refreshTokens - refresh tokens of type SerializedRefreshTokenEntity - */ - static deserializeRefreshTokens(refreshTokens) { - const rtObjects = {}; - if (refreshTokens) { - Object.keys(refreshTokens).map(function (key) { - const serializedRT = refreshTokens[key]; - const refreshToken = { - homeAccountId: serializedRT.home_account_id, - environment: serializedRT.environment, - credentialType: serializedRT.credential_type, - clientId: serializedRT.client_id, - secret: serializedRT.secret, - familyId: serializedRT.family_id, - target: serializedRT.target, - realm: serializedRT.realm, - }; - rtObjects[key] = refreshToken; - }); - } - return rtObjects; - } - /** - * Deserializes appMetadata to AppMetaData objects - * @param appMetadata - app metadata of type SerializedAppMetadataEntity - */ - static deserializeAppMetadata(appMetadata) { - const appMetadataObjects = {}; - if (appMetadata) { - Object.keys(appMetadata).map(function (key) { - const serializedAmdt = appMetadata[key]; - appMetadataObjects[key] = { - clientId: serializedAmdt.client_id, - environment: serializedAmdt.environment, - familyId: serializedAmdt.family_id, - }; - }); - } - return appMetadataObjects; - } - /** - * Deserialize an inMemory Cache - * @param jsonCache - JSON blob cache - */ - static deserializeAllCache(jsonCache) { - return { - accounts: jsonCache.Account - ? this.deserializeAccounts(jsonCache.Account) - : {}, - idTokens: jsonCache.IdToken - ? this.deserializeIdTokens(jsonCache.IdToken) - : {}, - accessTokens: jsonCache.AccessToken - ? this.deserializeAccessTokens(jsonCache.AccessToken) - : {}, - refreshTokens: jsonCache.RefreshToken - ? this.deserializeRefreshTokens(jsonCache.RefreshToken) - : {}, - appMetadata: jsonCache.AppMetadata - ? this.deserializeAppMetadata(jsonCache.AppMetadata) - : {}, - }; - } -} - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * Warning: This set of exports is purely intended to be used by other MSAL libraries, and should be considered potentially unstable. We strongly discourage using them directly, you do so at your own risk. - * Breaking changes to these APIs will be shipped under a minor version, instead of a major version. - */ - -var internals = /*#__PURE__*/Object.freeze({ - __proto__: null, - Deserializer: Deserializer, - Serializer: Serializer -}); - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -// MSI Constants. Docs for MSI are available here https://docs.microsoft.com/azure/app-service/overview-managed-identity -const AUTHORIZATION_HEADER_NAME = "Authorization"; -const METADATA_HEADER_NAME = "Metadata"; -const APP_SERVICE_SECRET_HEADER_NAME = "X-IDENTITY-HEADER"; -const SERVICE_FABRIC_SECRET_HEADER_NAME = "secret"; -const API_VERSION_QUERY_PARAMETER_NAME = "api-version"; -const RESOURCE_BODY_OR_QUERY_PARAMETER_NAME = "resource"; -const DEFAULT_MANAGED_IDENTITY_ID = "system_assigned_managed_identity"; -const MANAGED_IDENTITY_DEFAULT_TENANT = "managed_identity"; -const DEFAULT_AUTHORITY_FOR_MANAGED_IDENTITY = `https://login.microsoftonline.com/${MANAGED_IDENTITY_DEFAULT_TENANT}/`; -/** - * Managed Identity Environment Variable Names - */ -const ManagedIdentityEnvironmentVariableNames = { - AZURE_POD_IDENTITY_AUTHORITY_HOST: "AZURE_POD_IDENTITY_AUTHORITY_HOST", - IDENTITY_ENDPOINT: "IDENTITY_ENDPOINT", - IDENTITY_HEADER: "IDENTITY_HEADER", - IDENTITY_SERVER_THUMBPRINT: "IDENTITY_SERVER_THUMBPRINT", - IMDS_ENDPOINT: "IMDS_ENDPOINT", - MSI_ENDPOINT: "MSI_ENDPOINT", -}; -/** - * Managed Identity Source Names - * @public - */ -const ManagedIdentitySourceNames = { - APP_SERVICE: "AppService", - AZURE_ARC: "AzureArc", - CLOUD_SHELL: "CloudShell", - DEFAULT_TO_IMDS: "DefaultToImds", - IMDS: "Imds", - SERVICE_FABRIC: "ServiceFabric", -}; -/** - * Managed Identity Ids - */ -const ManagedIdentityIdType = { - SYSTEM_ASSIGNED: "system-assigned", - USER_ASSIGNED_CLIENT_ID: "user-assigned-client-id", - USER_ASSIGNED_RESOURCE_ID: "user-assigned-resource-id", - USER_ASSIGNED_OBJECT_ID: "user-assigned-object-id", -}; -/** - * http methods - */ -const HttpMethod = { - GET: "get", - POST: "post", -}; -const ProxyStatus = { - SUCCESS_RANGE_START: HttpStatus.SUCCESS_RANGE_START, - SUCCESS_RANGE_END: HttpStatus.SUCCESS_RANGE_END, - SERVER_ERROR: HttpStatus.SERVER_ERROR, -}; -/** - * Constants used for region discovery - */ -const REGION_ENVIRONMENT_VARIABLE = "REGION_NAME"; -const MSAL_FORCE_REGION = "MSAL_FORCE_REGION"; -/** - * Constant used for PKCE - */ -const RANDOM_OCTET_SIZE = 32; -/** - * Constants used in PKCE - */ -const Hash = { - SHA256: "sha256", -}; -/** - * Constants for encoding schemes - */ -const CharSet = { - CV_CHARSET: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~", -}; -/** - * Constants - */ -const Constants = { - MSAL_SKU: "msal.js.node", - JWT_BEARER_ASSERTION_TYPE: "urn:ietf:params:oauth:client-assertion-type:jwt-bearer", - AUTHORIZATION_PENDING: "authorization_pending", - HTTP_PROTOCOL: "http://", - LOCALHOST: "localhost", -}; -/** - * API Codes for Telemetry purposes. - * Before adding a new code you must claim it in the MSAL Telemetry tracker as these number spaces are shared across all MSALs - * 0-99 Silent Flow - * 600-699 Device Code Flow - * 800-899 Auth Code Flow - */ -const ApiId = { - acquireTokenSilent: 62, - acquireTokenByUsernamePassword: 371, - acquireTokenByDeviceCode: 671, - acquireTokenByClientCredential: 771, - acquireTokenByCode: 871, - acquireTokenByRefreshToken: 872, -}; -/** - * JWT constants - */ -const JwtConstants = { - RSA_256: "RS256", - PSS_256: "PS256", - X5T_256: "x5t#S256", - X5T: "x5t", - X5C: "x5c", - AUDIENCE: "aud", - EXPIRATION_TIME: "exp", - ISSUER: "iss", - SUBJECT: "sub", - NOT_BEFORE: "nbf", - JWT_ID: "jti", -}; -const LOOPBACK_SERVER_CONSTANTS = { - INTERVAL_MS: 100, - TIMEOUT_MS: 5000, -}; -const AZURE_ARC_SECRET_FILE_MAX_SIZE_BYTES = 4096; // 4 KB -const MANAGED_IDENTITY_MAX_RETRIES = 3; -const MANAGED_IDENTITY_RETRY_DELAY = 1000; -const MANAGED_IDENTITY_HTTP_STATUS_CODES_TO_RETRY_ON = [ - HttpStatus.NOT_FOUND, - HttpStatus.REQUEST_TIMEOUT, - HttpStatus.TOO_MANY_REQUESTS, - HttpStatus.SERVER_ERROR, - HttpStatus.SERVICE_UNAVAILABLE, - HttpStatus.GATEWAY_TIMEOUT, -]; - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -class NetworkUtils { - static getNetworkResponse(headers, body, statusCode) { - return { - headers: headers, - body: body, - status: statusCode, - }; - } - /* - * Utility function that converts a URL object into an ordinary options object as expected by the - * http.request and https.request APIs. - * https://github.com/nodejs/node/blob/main/lib/internal/url.js#L1090 - */ - static urlToHttpOptions(url) { - const options = { - protocol: url.protocol, - hostname: url.hostname && url.hostname.startsWith("[") - ? url.hostname.slice(1, -1) - : url.hostname, - hash: url.hash, - search: url.search, - pathname: url.pathname, - path: `${url.pathname || ""}${url.search || ""}`, - href: url.href, - }; - if (url.port !== "") { - options.port = Number(url.port); - } - if (url.username || url.password) { - options.auth = `${decodeURIComponent(url.username)}:${decodeURIComponent(url.password)}`; - } - return options; - } -} - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * This class implements the API for network requests. - */ -class HttpClient { - constructor(proxyUrl, customAgentOptions) { - this.proxyUrl = proxyUrl || ""; - this.customAgentOptions = customAgentOptions || {}; - } - /** - * Http Get request - * @param url - * @param options - */ - async sendGetRequestAsync(url, options, timeout) { - if (this.proxyUrl) { - return networkRequestViaProxy(url, this.proxyUrl, HttpMethod.GET, options, this.customAgentOptions, timeout); - } - else { - return networkRequestViaHttps(url, HttpMethod.GET, options, this.customAgentOptions, timeout); - } - } - /** - * Http Post request - * @param url - * @param options - */ - async sendPostRequestAsync(url, options) { - if (this.proxyUrl) { - return networkRequestViaProxy(url, this.proxyUrl, HttpMethod.POST, options, this.customAgentOptions); - } - else { - return networkRequestViaHttps(url, HttpMethod.POST, options, this.customAgentOptions); - } - } -} -const networkRequestViaProxy = (destinationUrlString, proxyUrlString, httpMethod, options, agentOptions, timeout) => { - const destinationUrl = new URL(destinationUrlString); - const proxyUrl = new URL(proxyUrlString); - // "method: connect" must be used to establish a connection to the proxy - const headers = options?.headers || {}; - const tunnelRequestOptions = { - host: proxyUrl.hostname, - port: proxyUrl.port, - method: "CONNECT", - path: destinationUrl.hostname, - headers: headers, - }; - if (agentOptions && Object.keys(agentOptions).length) { - tunnelRequestOptions.agent = new http.Agent(agentOptions); - } - // compose a request string for the socket - let postRequestStringContent = ""; - if (httpMethod === HttpMethod.POST) { - const body = options?.body || ""; - postRequestStringContent = - "Content-Type: application/x-www-form-urlencoded\r\n" + - `Content-Length: ${body.length}\r\n` + - `\r\n${body}`; - } - else { - // optional timeout is only for get requests (regionDiscovery, for example) - if (timeout) { - tunnelRequestOptions.timeout = timeout; - } - } - const outgoingRequestString = `${httpMethod.toUpperCase()} ${destinationUrl.href} HTTP/1.1\r\n` + - `Host: ${destinationUrl.host}\r\n` + - "Connection: close\r\n" + - postRequestStringContent + - "\r\n"; - return new Promise((resolve, reject) => { - const request = http.request(tunnelRequestOptions); - if (timeout) { - request.on("timeout", () => { - request.destroy(); - reject(new Error("Request time out")); - }); - } - request.end(); - // establish connection to the proxy - request.on("connect", (response, socket) => { - const proxyStatusCode = response?.statusCode || ProxyStatus.SERVER_ERROR; - if (proxyStatusCode < ProxyStatus.SUCCESS_RANGE_START || - proxyStatusCode > ProxyStatus.SUCCESS_RANGE_END) { - request.destroy(); - socket.destroy(); - reject(new Error(`Error connecting to proxy. Http status code: ${response.statusCode}. Http status message: ${response?.statusMessage || "Unknown"}`)); - } - // make a request over an HTTP tunnel - socket.write(outgoingRequestString); - const data = []; - socket.on("data", (chunk) => { - data.push(chunk); - }); - socket.on("end", () => { - // combine all received buffer streams into one buffer, and then into a string - const dataString = Buffer.concat([...data]).toString(); - // separate each line into it's own entry in an arry - const dataStringArray = dataString.split("\r\n"); - // the first entry will contain the statusCode and statusMessage - const httpStatusCode = parseInt(dataStringArray[0].split(" ")[1]); - // remove "HTTP/1.1" and the status code to get the status message - const statusMessage = dataStringArray[0] - .split(" ") - .slice(2) - .join(" "); - // the last entry will contain the body - const body = dataStringArray[dataStringArray.length - 1]; - // everything in between the first and last entries are the headers - const headersArray = dataStringArray.slice(1, dataStringArray.length - 2); - // build an object out of all the headers - const entries = new Map(); - headersArray.forEach((header) => { - /** - * the header might look like "Content-Length: 1531", but that is just a string - * it needs to be converted to a key/value pair - * split the string at the first instance of ":" - * there may be more than one ":" if the value of the header is supposed to be a JSON object - */ - const headerKeyValue = header.split(new RegExp(/:\s(.*)/s)); - const headerKey = headerKeyValue[0]; - let headerValue = headerKeyValue[1]; - // check if the value of the header is supposed to be a JSON object - try { - const object = JSON.parse(headerValue); - // if it is, then convert it from a string to a JSON object - if (object && typeof object === "object") { - headerValue = object; - } - } - catch (e) { - // otherwise, leave it as a string - } - entries.set(headerKey, headerValue); - }); - const headers = Object.fromEntries(entries); - const parsedHeaders = headers; - const networkResponse = NetworkUtils.getNetworkResponse(parsedHeaders, parseBody(httpStatusCode, statusMessage, parsedHeaders, body), httpStatusCode); - if ((httpStatusCode < HttpStatus.SUCCESS_RANGE_START || - httpStatusCode > HttpStatus.SUCCESS_RANGE_END) && - // do not destroy the request for the device code flow - networkResponse.body["error"] !== - Constants.AUTHORIZATION_PENDING) { - request.destroy(); - } - resolve(networkResponse); - }); - socket.on("error", (chunk) => { - request.destroy(); - socket.destroy(); - reject(new Error(chunk.toString())); - }); - }); - request.on("error", (chunk) => { - request.destroy(); - reject(new Error(chunk.toString())); - }); - }); -}; -const networkRequestViaHttps = (urlString, httpMethod, options, agentOptions, timeout) => { - const isPostRequest = httpMethod === HttpMethod.POST; - const body = options?.body || ""; - const url = new URL(urlString); - const headers = options?.headers || {}; - const customOptions = { - method: httpMethod, - headers: headers, - ...NetworkUtils.urlToHttpOptions(url), - }; - if (agentOptions && Object.keys(agentOptions).length) { - customOptions.agent = new https.Agent(agentOptions); - } - if (isPostRequest) { - // needed for post request to work - customOptions.headers = { - ...customOptions.headers, - "Content-Length": body.length, - }; - } - else { - // optional timeout is only for get requests (regionDiscovery, for example) - if (timeout) { - customOptions.timeout = timeout; - } - } - return new Promise((resolve, reject) => { - let request; - // managed identity sources use http instead of https - if (customOptions.protocol === "http:") { - request = http.request(customOptions); - } - else { - request = https.request(customOptions); - } - if (isPostRequest) { - request.write(body); - } - if (timeout) { - request.on("timeout", () => { - request.destroy(); - reject(new Error("Request time out")); - }); - } - request.end(); - request.on("response", (response) => { - const headers = response.headers; - const statusCode = response.statusCode; - const statusMessage = response.statusMessage; - const data = []; - response.on("data", (chunk) => { - data.push(chunk); - }); - response.on("end", () => { - // combine all received buffer streams into one buffer, and then into a string - const body = Buffer.concat([...data]).toString(); - const parsedHeaders = headers; - const networkResponse = NetworkUtils.getNetworkResponse(parsedHeaders, parseBody(statusCode, statusMessage, parsedHeaders, body), statusCode); - if ((statusCode < HttpStatus.SUCCESS_RANGE_START || - statusCode > HttpStatus.SUCCESS_RANGE_END) && - // do not destroy the request for the device code flow - networkResponse.body["error"] !== - Constants.AUTHORIZATION_PENDING) { - request.destroy(); - } - resolve(networkResponse); - }); - }); - request.on("error", (chunk) => { - request.destroy(); - reject(new Error(chunk.toString())); - }); - }); -}; -/** - * Check if extra parsing is needed on the repsonse from the server - * @param statusCode {number} the status code of the response from the server - * @param statusMessage {string | undefined} the status message of the response from the server - * @param headers {Record} the headers of the response from the server - * @param body {string} the body from the response of the server - * @returns {Object} JSON parsed body or error object - */ -const parseBody = (statusCode, statusMessage, headers, body) => { - /* - * Informational responses (100 – 199) - * Successful responses (200 – 299) - * Redirection messages (300 – 399) - * Client error responses (400 – 499) - * Server error responses (500 – 599) - */ - let parsedBody; - try { - parsedBody = JSON.parse(body); - } - catch (error) { - let errorType; - let errorDescriptionHelper; - if (statusCode >= HttpStatus.CLIENT_ERROR_RANGE_START && - statusCode <= HttpStatus.CLIENT_ERROR_RANGE_END) { - errorType = "client_error"; - errorDescriptionHelper = "A client"; - } - else if (statusCode >= HttpStatus.SERVER_ERROR_RANGE_START && - statusCode <= HttpStatus.SERVER_ERROR_RANGE_END) { - errorType = "server_error"; - errorDescriptionHelper = "A server"; - } - else { - errorType = "unknown_error"; - errorDescriptionHelper = "An unknown"; - } - parsedBody = { - error: errorType, - error_description: `${errorDescriptionHelper} error occured.\nHttp status code: ${statusCode}\nHttp status message: ${statusMessage || "Unknown"}\nHeaders: ${JSON.stringify(headers)}`, - }; - } - return parsedBody; -}; - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -const invalidFileExtension = "invalid_file_extension"; -const invalidFilePath = "invalid_file_path"; -const invalidManagedIdentityIdType = "invalid_managed_identity_id_type"; -const invalidSecret = "invalid_secret"; -const missingId = "missing_client_id"; -const networkUnavailable = "network_unavailable"; -const platformNotSupported = "platform_not_supported"; -const unableToCreateAzureArc = "unable_to_create_azure_arc"; -const unableToCreateCloudShell = "unable_to_create_cloud_shell"; -const unableToCreateSource = "unable_to_create_source"; -const unableToReadSecretFile = "unable_to_read_secret_file"; -const userAssignedNotAvailableAtRuntime = "user_assigned_not_available_at_runtime"; -const wwwAuthenticateHeaderMissing = "www_authenticate_header_missing"; -const wwwAuthenticateHeaderUnsupportedFormat = "www_authenticate_header_unsupported_format"; -const MsiEnvironmentVariableUrlMalformedErrorCodes = { - [ManagedIdentityEnvironmentVariableNames.AZURE_POD_IDENTITY_AUTHORITY_HOST]: "azure_pod_identity_authority_host_url_malformed", - [ManagedIdentityEnvironmentVariableNames.IDENTITY_ENDPOINT]: "identity_endpoint_url_malformed", - [ManagedIdentityEnvironmentVariableNames.IMDS_ENDPOINT]: "imds_endpoint_url_malformed", - [ManagedIdentityEnvironmentVariableNames.MSI_ENDPOINT]: "msi_endpoint_url_malformed", -}; - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * ManagedIdentityErrorMessage class containing string constants used by error codes and messages. - */ -const ManagedIdentityErrorMessages = { - [invalidFileExtension]: "The file path in the WWW-Authenticate header does not contain a .key file.", - [invalidFilePath]: "The file path in the WWW-Authenticate header is not in a valid Windows or Linux Format.", - [invalidManagedIdentityIdType]: "More than one ManagedIdentityIdType was provided.", - [invalidSecret]: "The secret in the file on the file path in the WWW-Authenticate header is greater than 4096 bytes.", - [platformNotSupported]: "The platform is not supported by Azure Arc. Azure Arc only supports Windows and Linux.", - [missingId]: "A ManagedIdentityId id was not provided.", - [MsiEnvironmentVariableUrlMalformedErrorCodes - .AZURE_POD_IDENTITY_AUTHORITY_HOST]: `The Managed Identity's '${ManagedIdentityEnvironmentVariableNames.AZURE_POD_IDENTITY_AUTHORITY_HOST}' environment variable is malformed.`, - [MsiEnvironmentVariableUrlMalformedErrorCodes - .IDENTITY_ENDPOINT]: `The Managed Identity's '${ManagedIdentityEnvironmentVariableNames.IDENTITY_ENDPOINT}' environment variable is malformed.`, - [MsiEnvironmentVariableUrlMalformedErrorCodes - .IMDS_ENDPOINT]: `The Managed Identity's '${ManagedIdentityEnvironmentVariableNames.IMDS_ENDPOINT}' environment variable is malformed.`, - [MsiEnvironmentVariableUrlMalformedErrorCodes - .MSI_ENDPOINT]: `The Managed Identity's '${ManagedIdentityEnvironmentVariableNames.MSI_ENDPOINT}' environment variable is malformed.`, - [networkUnavailable]: "Authentication unavailable. The request to the managed identity endpoint timed out.", - [unableToCreateAzureArc]: "Azure Arc Managed Identities can only be system assigned.", - [unableToCreateCloudShell]: "Cloud Shell Managed Identities can only be system assigned.", - [unableToCreateSource]: "Unable to create a Managed Identity source based on environment variables.", - [unableToReadSecretFile]: "Unable to read the secret file.", - [userAssignedNotAvailableAtRuntime]: "Service Fabric user assigned managed identity ClientId or ResourceId is not configurable at runtime.", - [wwwAuthenticateHeaderMissing]: "A 401 response was received form the Azure Arc Managed Identity, but the www-authenticate header is missing.", - [wwwAuthenticateHeaderUnsupportedFormat]: "A 401 response was received form the Azure Arc Managed Identity, but the www-authenticate header is in an unsupported format.", -}; -class ManagedIdentityError extends AuthError { - constructor(errorCode) { - super(errorCode, ManagedIdentityErrorMessages[errorCode]); - this.name = "ManagedIdentityError"; - Object.setPrototypeOf(this, ManagedIdentityError.prototype); - } -} -function createManagedIdentityError(errorCode) { - return new ManagedIdentityError(errorCode); -} - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -class ManagedIdentityId { - get id() { - return this._id; - } - set id(value) { - this._id = value; - } - get idType() { - return this._idType; - } - set idType(value) { - this._idType = value; - } - constructor(managedIdentityIdParams) { - const userAssignedClientId = managedIdentityIdParams?.userAssignedClientId; - const userAssignedResourceId = managedIdentityIdParams?.userAssignedResourceId; - const userAssignedObjectId = managedIdentityIdParams?.userAssignedObjectId; - if (userAssignedClientId) { - if (userAssignedResourceId || userAssignedObjectId) { - throw createManagedIdentityError(invalidManagedIdentityIdType); - } - this.id = userAssignedClientId; - this.idType = ManagedIdentityIdType.USER_ASSIGNED_CLIENT_ID; - } - else if (userAssignedResourceId) { - if (userAssignedClientId || userAssignedObjectId) { - throw createManagedIdentityError(invalidManagedIdentityIdType); - } - this.id = userAssignedResourceId; - this.idType = ManagedIdentityIdType.USER_ASSIGNED_RESOURCE_ID; - } - else if (userAssignedObjectId) { - if (userAssignedClientId || userAssignedResourceId) { - throw createManagedIdentityError(invalidManagedIdentityIdType); - } - this.id = userAssignedObjectId; - this.idType = ManagedIdentityIdType.USER_ASSIGNED_OBJECT_ID; - } - else { - this.id = DEFAULT_MANAGED_IDENTITY_ID; - this.idType = ManagedIdentityIdType.SYSTEM_ASSIGNED; - } - } -} - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -class LinearRetryPolicy { - constructor(maxRetries, retryDelay, httpStatusCodesToRetryOn) { - this.maxRetries = maxRetries; - this.retryDelay = retryDelay; - this.httpStatusCodesToRetryOn = httpStatusCodesToRetryOn; - } - retryAfterMillisecondsToSleep(retryHeader) { - if (!retryHeader) { - return 0; - } - // retry-after header is in seconds - let millisToSleep = Math.round(parseFloat(retryHeader) * 1000); - /* - * retry-after header is in HTTP Date format - * , :: GMT - */ - if (isNaN(millisToSleep)) { - millisToSleep = Math.max(0, - // .valueOf() is needed to subtract dates in TypeScript - new Date(retryHeader).valueOf() - new Date().valueOf()); - } - return millisToSleep; - } - async pauseForRetry(httpStatusCode, currentRetry, retryAfterHeader) { - if (this.httpStatusCodesToRetryOn.includes(httpStatusCode) && - currentRetry < this.maxRetries) { - const retryAfterDelay = this.retryAfterMillisecondsToSleep(retryAfterHeader); - await new Promise((resolve) => { - // retryAfterHeader value of 0 evaluates to false, and this.retryDelay will be used - return setTimeout(resolve, retryAfterDelay || this.retryDelay); - }); - return true; - } - return false; - } -} - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -class HttpClientWithRetries { - constructor(httpClientNoRetries, retryPolicy) { - this.httpClientNoRetries = httpClientNoRetries; - this.retryPolicy = retryPolicy; - } - async sendNetworkRequestAsyncHelper(httpMethod, url, options) { - if (httpMethod === HttpMethod.GET) { - return this.httpClientNoRetries.sendGetRequestAsync(url, options); - } - else { - return this.httpClientNoRetries.sendPostRequestAsync(url, options); - } - } - async sendNetworkRequestAsync(httpMethod, url, options) { - // the underlying network module (custom or HttpClient) will make the call - let response = await this.sendNetworkRequestAsyncHelper(httpMethod, url, options); - let currentRetry = 0; - while (await this.retryPolicy.pauseForRetry(response.status, currentRetry, response.headers[HeaderNames.RETRY_AFTER])) { - response = await this.sendNetworkRequestAsyncHelper(httpMethod, url, options); - currentRetry++; - } - return response; - } - async sendGetRequestAsync(url, options) { - return this.sendNetworkRequestAsync(HttpMethod.GET, url, options); - } - async sendPostRequestAsync(url, options) { - return this.sendNetworkRequestAsync(HttpMethod.POST, url, options); - } -} - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * NodeAuthErrorMessage class containing string constants used by error codes and messages. - */ -const NodeAuthErrorMessage = { - invalidLoopbackAddressType: { - code: "invalid_loopback_server_address_type", - desc: "Loopback server address is not type string. This is unexpected.", - }, - unableToLoadRedirectUri: { - code: "unable_to_load_redirectUrl", - desc: "Loopback server callback was invoked without a url. This is unexpected.", - }, - noAuthCodeInResponse: { - code: "no_auth_code_in_response", - desc: "No auth code found in the server response. Please check your network trace to determine what happened.", - }, - noLoopbackServerExists: { - code: "no_loopback_server_exists", - desc: "No loopback server exists yet.", - }, - loopbackServerAlreadyExists: { - code: "loopback_server_already_exists", - desc: "Loopback server already exists. Cannot create another.", - }, - loopbackServerTimeout: { - code: "loopback_server_timeout", - desc: "Timed out waiting for auth code listener to be registered.", - }, - stateNotFoundError: { - code: "state_not_found", - desc: "State not found. Please verify that the request originated from msal.", - }, - thumbprintMissing: { - code: "thumbprint_missing_from_client_certificate", - desc: "Client certificate does not contain a SHA-1 or SHA-256 thumbprint.", - }, -}; -class NodeAuthError extends AuthError { - constructor(errorCode, errorMessage) { - super(errorCode, errorMessage); - this.name = "NodeAuthError"; - } - /** - * Creates an error thrown if loopback server address is of type string. - */ - static createInvalidLoopbackAddressTypeError() { - return new NodeAuthError(NodeAuthErrorMessage.invalidLoopbackAddressType.code, `${NodeAuthErrorMessage.invalidLoopbackAddressType.desc}`); - } - /** - * Creates an error thrown if the loopback server is unable to get a url. - */ - static createUnableToLoadRedirectUrlError() { - return new NodeAuthError(NodeAuthErrorMessage.unableToLoadRedirectUri.code, `${NodeAuthErrorMessage.unableToLoadRedirectUri.desc}`); - } - /** - * Creates an error thrown if the server response does not contain an auth code. - */ - static createNoAuthCodeInResponseError() { - return new NodeAuthError(NodeAuthErrorMessage.noAuthCodeInResponse.code, `${NodeAuthErrorMessage.noAuthCodeInResponse.desc}`); - } - /** - * Creates an error thrown if the loopback server has not been spun up yet. - */ - static createNoLoopbackServerExistsError() { - return new NodeAuthError(NodeAuthErrorMessage.noLoopbackServerExists.code, `${NodeAuthErrorMessage.noLoopbackServerExists.desc}`); - } - /** - * Creates an error thrown if a loopback server already exists when attempting to create another one. - */ - static createLoopbackServerAlreadyExistsError() { - return new NodeAuthError(NodeAuthErrorMessage.loopbackServerAlreadyExists.code, `${NodeAuthErrorMessage.loopbackServerAlreadyExists.desc}`); - } - /** - * Creates an error thrown if the loopback server times out registering the auth code listener. - */ - static createLoopbackServerTimeoutError() { - return new NodeAuthError(NodeAuthErrorMessage.loopbackServerTimeout.code, `${NodeAuthErrorMessage.loopbackServerTimeout.desc}`); - } - /** - * Creates an error thrown when the state is not present. - */ - static createStateNotFoundError() { - return new NodeAuthError(NodeAuthErrorMessage.stateNotFoundError.code, NodeAuthErrorMessage.stateNotFoundError.desc); - } - /** - * Creates an error thrown when client certificate was provided, but neither the SHA-1 or SHA-256 thumbprints were provided - */ - static createThumbprintMissingError() { - return new NodeAuthError(NodeAuthErrorMessage.thumbprintMissing.code, NodeAuthErrorMessage.thumbprintMissing.desc); - } -} - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -const DEFAULT_AUTH_OPTIONS = { - clientId: Constants$1.EMPTY_STRING, - authority: Constants$1.DEFAULT_AUTHORITY, - clientSecret: Constants$1.EMPTY_STRING, - clientAssertion: Constants$1.EMPTY_STRING, - clientCertificate: { - thumbprint: Constants$1.EMPTY_STRING, - thumbprintSha256: Constants$1.EMPTY_STRING, - privateKey: Constants$1.EMPTY_STRING, - x5c: Constants$1.EMPTY_STRING, - }, - knownAuthorities: [], - cloudDiscoveryMetadata: Constants$1.EMPTY_STRING, - authorityMetadata: Constants$1.EMPTY_STRING, - clientCapabilities: [], - protocolMode: ProtocolMode.AAD, - azureCloudOptions: { - azureCloudInstance: AzureCloudInstance.None, - tenant: Constants$1.EMPTY_STRING, - }, - skipAuthorityMetadataCache: false, -}; -const DEFAULT_CACHE_OPTIONS = { - claimsBasedCachingEnabled: false, -}; -const DEFAULT_LOGGER_OPTIONS = { - loggerCallback: () => { - // allow users to not set logger call back - }, - piiLoggingEnabled: false, - logLevel: exports.LogLevel.Info, -}; -const DEFAULT_SYSTEM_OPTIONS = { - loggerOptions: DEFAULT_LOGGER_OPTIONS, - networkClient: new HttpClient(), - proxyUrl: Constants$1.EMPTY_STRING, - customAgentOptions: {}, - disableInternalRetries: false, -}; -const DEFAULT_TELEMETRY_OPTIONS = { - application: { - appName: Constants$1.EMPTY_STRING, - appVersion: Constants$1.EMPTY_STRING, - }, -}; -/** - * Sets the default options when not explicitly configured from app developer - * - * @param auth - Authentication options - * @param cache - Cache options - * @param system - System options - * @param telemetry - Telemetry options - * - * @returns Configuration - * @internal - */ -function buildAppConfiguration({ auth, broker, cache, system, telemetry, }) { - const systemOptions = { - ...DEFAULT_SYSTEM_OPTIONS, - networkClient: new HttpClient(system?.proxyUrl, system?.customAgentOptions), - loggerOptions: system?.loggerOptions || DEFAULT_LOGGER_OPTIONS, - disableInternalRetries: system?.disableInternalRetries || false, - }; - // if client certificate was provided, ensure that at least one of the SHA-1 or SHA-256 thumbprints were provided - if (!!auth.clientCertificate && - !!!auth.clientCertificate.thumbprint && - !!!auth.clientCertificate.thumbprintSha256) { - throw NodeAuthError.createStateNotFoundError(); - } - return { - auth: { ...DEFAULT_AUTH_OPTIONS, ...auth }, - broker: { ...broker }, - cache: { ...DEFAULT_CACHE_OPTIONS, ...cache }, - system: { ...systemOptions, ...system }, - telemetry: { ...DEFAULT_TELEMETRY_OPTIONS, ...telemetry }, - }; -} -function buildManagedIdentityConfiguration({ managedIdentityIdParams, system, }) { - const managedIdentityId = new ManagedIdentityId(managedIdentityIdParams); - const loggerOptions = system?.loggerOptions || DEFAULT_LOGGER_OPTIONS; - let networkClient; - // use developer provided network client if passed in - if (system?.networkClient) { - networkClient = system.networkClient; - // otherwise, create a new one - } - else { - networkClient = new HttpClient(system?.proxyUrl, system?.customAgentOptions); - } - // wrap the network client with a retry policy if the developer has not disabled the option to do so - if (!system?.disableInternalRetries) { - const linearRetryPolicy = new LinearRetryPolicy(MANAGED_IDENTITY_MAX_RETRIES, MANAGED_IDENTITY_RETRY_DELAY, MANAGED_IDENTITY_HTTP_STATUS_CODES_TO_RETRY_ON); - networkClient = new HttpClientWithRetries(networkClient, linearRetryPolicy); - } - return { - managedIdentityId: managedIdentityId, - system: { - loggerOptions, - networkClient, - }, - }; -} - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -class GuidGenerator { - /** - * - * RFC4122: The version 4 UUID is meant for generating UUIDs from truly-random or pseudo-random numbers. - * uuidv4 generates guids from cryprtographically-string random - */ - generateGuid() { - return uuid.v4(); - } - /** - * verifies if a string is GUID - * @param guid - */ - isGuid(guid) { - const regexGuid = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i; - return regexGuid.test(guid); - } -} - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -class EncodingUtils { - /** - * 'utf8': Multibyte encoded Unicode characters. Many web pages and other document formats use UTF-8. - * 'base64': Base64 encoding. - * - * @param str text - */ - static base64Encode(str, encoding) { - return Buffer.from(str, encoding).toString("base64"); - } - /** - * encode a URL - * @param str - */ - static base64EncodeUrl(str, encoding) { - return EncodingUtils.base64Encode(str, encoding) - .replace(/=/g, Constants$1.EMPTY_STRING) - .replace(/\+/g, "-") - .replace(/\//g, "_"); - } - /** - * 'utf8': Multibyte encoded Unicode characters. Many web pages and other document formats use UTF-8. - * 'base64': Base64 encoding. - * - * @param base64Str Base64 encoded text - */ - static base64Decode(base64Str) { - return Buffer.from(base64Str, "base64").toString("utf8"); - } - /** - * @param base64Str Base64 encoded Url - */ - static base64DecodeUrl(base64Str) { - let str = base64Str.replace(/-/g, "+").replace(/_/g, "/"); - while (str.length % 4) { - str += "="; - } - return EncodingUtils.base64Decode(str); - } -} - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -class HashUtils { - /** - * generate 'SHA256' hash - * @param buffer - */ - sha256(buffer) { - return crypto.createHash(Hash.SHA256).update(buffer).digest(); - } -} - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * https://tools.ietf.org/html/rfc7636#page-8 - */ -class PkceGenerator { - constructor() { - this.hashUtils = new HashUtils(); - } - /** - * generates the codeVerfier and the challenge from the codeVerfier - * reference: https://tools.ietf.org/html/rfc7636#section-4.1 and https://tools.ietf.org/html/rfc7636#section-4.2 - */ - async generatePkceCodes() { - const verifier = this.generateCodeVerifier(); - const challenge = this.generateCodeChallengeFromVerifier(verifier); - return { verifier, challenge }; - } - /** - * generates the codeVerfier; reference: https://tools.ietf.org/html/rfc7636#section-4.1 - */ - generateCodeVerifier() { - const charArr = []; - const maxNumber = 256 - (256 % CharSet.CV_CHARSET.length); - while (charArr.length <= RANDOM_OCTET_SIZE) { - const byte = crypto.randomBytes(1)[0]; - if (byte >= maxNumber) { - /* - * Ignore this number to maintain randomness. - * Including it would result in an unequal distribution of characters after doing the modulo - */ - continue; - } - const index = byte % CharSet.CV_CHARSET.length; - charArr.push(CharSet.CV_CHARSET[index]); - } - const verifier = charArr.join(Constants$1.EMPTY_STRING); - return EncodingUtils.base64EncodeUrl(verifier); - } - /** - * generate the challenge from the codeVerfier; reference: https://tools.ietf.org/html/rfc7636#section-4.2 - * @param codeVerifier - */ - generateCodeChallengeFromVerifier(codeVerifier) { - return EncodingUtils.base64EncodeUrl(this.hashUtils.sha256(codeVerifier).toString("base64"), "base64"); - } -} - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * This class implements MSAL node's crypto interface, which allows it to perform base64 encoding and decoding, generating cryptographically random GUIDs and - * implementing Proof Key for Code Exchange specs for the OAuth Authorization Code Flow using PKCE (rfc here: https://tools.ietf.org/html/rfc7636). - * @public - */ -class CryptoProvider { - constructor() { - // Browser crypto needs to be validated first before any other classes can be set. - this.pkceGenerator = new PkceGenerator(); - this.guidGenerator = new GuidGenerator(); - this.hashUtils = new HashUtils(); - } - /** - * base64 URL safe encoded string - */ - base64UrlEncode() { - throw new Error("Method not implemented."); - } - /** - * Stringifies and base64Url encodes input public key - * @param inputKid - public key id - * @returns Base64Url encoded public key - */ - encodeKid() { - throw new Error("Method not implemented."); - } - /** - * Creates a new random GUID - used to populate state and nonce. - * @returns string (GUID) - */ - createNewGuid() { - return this.guidGenerator.generateGuid(); - } - /** - * Encodes input string to base64. - * @param input - string to be encoded - */ - base64Encode(input) { - return EncodingUtils.base64Encode(input); - } - /** - * Decodes input string from base64. - * @param input - string to be decoded - */ - base64Decode(input) { - return EncodingUtils.base64Decode(input); - } - /** - * Generates PKCE codes used in Authorization Code Flow. - */ - generatePkceCodes() { - return this.pkceGenerator.generatePkceCodes(); - } - /** - * Generates a keypair, stores it and returns a thumbprint - not yet implemented for node - */ - getPublicKeyThumbprint() { - throw new Error("Method not implemented."); - } - /** - * Removes cryptographic keypair from key store matching the keyId passed in - * @param kid - public key id - */ - removeTokenBindingKey() { - throw new Error("Method not implemented."); - } - /** - * Removes all cryptographic keys from Keystore - */ - clearKeystore() { - throw new Error("Method not implemented."); - } - /** - * Signs the given object as a jwt payload with private key retrieved by given kid - currently not implemented for node - */ - signJwt() { - throw new Error("Method not implemented."); - } - /** - * Returns the SHA-256 hash of an input string - */ - async hashString(plainText) { - return EncodingUtils.base64EncodeUrl(this.hashUtils.sha256(plainText).toString("base64"), "base64"); - } -} - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * This class implements Storage for node, reading cache from user specified storage location or an extension library - * @public - */ -class NodeStorage extends CacheManager { - constructor(logger, clientId, cryptoImpl, staticAuthorityOptions) { - super(clientId, cryptoImpl, logger, staticAuthorityOptions); - this.cache = {}; - this.changeEmitters = []; - this.logger = logger; - } - /** - * Queue up callbacks - * @param func - a callback function for cache change indication - */ - registerChangeEmitter(func) { - this.changeEmitters.push(func); - } - /** - * Invoke the callback when cache changes - */ - emitChange() { - this.changeEmitters.forEach((func) => func.call(null)); - } - /** - * Converts cacheKVStore to InMemoryCache - * @param cache - key value store - */ - cacheToInMemoryCache(cache) { - const inMemoryCache = { - accounts: {}, - idTokens: {}, - accessTokens: {}, - refreshTokens: {}, - appMetadata: {}, - }; - for (const key in cache) { - const value = cache[key]; - if (typeof value !== "object") { - continue; - } - if (value instanceof AccountEntity) { - inMemoryCache.accounts[key] = value; - } - else if (isIdTokenEntity(value)) { - inMemoryCache.idTokens[key] = value; - } - else if (isAccessTokenEntity(value)) { - inMemoryCache.accessTokens[key] = value; - } - else if (isRefreshTokenEntity(value)) { - inMemoryCache.refreshTokens[key] = value; - } - else if (isAppMetadataEntity(key, value)) { - inMemoryCache.appMetadata[key] = value; - } - else { - continue; - } - } - return inMemoryCache; - } - /** - * converts inMemoryCache to CacheKVStore - * @param inMemoryCache - kvstore map for inmemory - */ - inMemoryCacheToCache(inMemoryCache) { - // convert in memory cache to a flat Key-Value map - let cache = this.getCache(); - cache = { - ...cache, - ...inMemoryCache.accounts, - ...inMemoryCache.idTokens, - ...inMemoryCache.accessTokens, - ...inMemoryCache.refreshTokens, - ...inMemoryCache.appMetadata, - }; - // convert in memory cache to a flat Key-Value map - return cache; - } - /** - * gets the current in memory cache for the client - */ - getInMemoryCache() { - this.logger.trace("Getting in-memory cache"); - // convert the cache key value store to inMemoryCache - const inMemoryCache = this.cacheToInMemoryCache(this.getCache()); - return inMemoryCache; - } - /** - * sets the current in memory cache for the client - * @param inMemoryCache - key value map in memory - */ - setInMemoryCache(inMemoryCache) { - this.logger.trace("Setting in-memory cache"); - // convert and append the inMemoryCache to cacheKVStore - const cache = this.inMemoryCacheToCache(inMemoryCache); - this.setCache(cache); - this.emitChange(); - } - /** - * get the current cache key-value store - */ - getCache() { - this.logger.trace("Getting cache key-value store"); - return this.cache; - } - /** - * sets the current cache (key value store) - * @param cacheMap - key value map - */ - setCache(cache) { - this.logger.trace("Setting cache key value store"); - this.cache = cache; - // mark change in cache - this.emitChange(); - } - /** - * Gets cache item with given key. - * @param key - lookup key for the cache entry - */ - getItem(key) { - this.logger.tracePii(`Item key: ${key}`); - // read cache - const cache = this.getCache(); - return cache[key]; - } - /** - * Gets cache item with given key-value - * @param key - lookup key for the cache entry - * @param value - value of the cache entry - */ - setItem(key, value) { - this.logger.tracePii(`Item key: ${key}`); - // read cache - const cache = this.getCache(); - cache[key] = value; - // write to cache - this.setCache(cache); - } - getAccountKeys() { - const inMemoryCache = this.getInMemoryCache(); - const accountKeys = Object.keys(inMemoryCache.accounts); - return accountKeys; - } - getTokenKeys() { - const inMemoryCache = this.getInMemoryCache(); - const tokenKeys = { - idToken: Object.keys(inMemoryCache.idTokens), - accessToken: Object.keys(inMemoryCache.accessTokens), - refreshToken: Object.keys(inMemoryCache.refreshTokens), - }; - return tokenKeys; - } - /** - * fetch the account entity - * @param accountKey - lookup key to fetch cache type AccountEntity - */ - getAccount(accountKey) { - const accountEntity = this.getCachedAccountEntity(accountKey); - if (accountEntity && AccountEntity.isAccountEntity(accountEntity)) { - return this.updateOutdatedCachedAccount(accountKey, accountEntity, ""); - } - return null; - } - /** - * Reads account from cache, builds it into an account entity and returns it. - * @param accountKey - lookup key to fetch cache type AccountEntity - * @returns - */ - getCachedAccountEntity(accountKey) { - const cachedAccount = this.getItem(accountKey); - return cachedAccount - ? Object.assign(new AccountEntity(), this.getItem(accountKey)) - : null; - } - /** - * set account entity - * @param account - cache value to be set of type AccountEntity - */ - setAccount(account) { - const accountKey = account.generateAccountKey(); - this.setItem(accountKey, account); - } - /** - * fetch the idToken credential - * @param idTokenKey - lookup key to fetch cache type IdTokenEntity - */ - getIdTokenCredential(idTokenKey) { - const idToken = this.getItem(idTokenKey); - if (isIdTokenEntity(idToken)) { - return idToken; - } - return null; - } - /** - * set idToken credential - * @param idToken - cache value to be set of type IdTokenEntity - */ - setIdTokenCredential(idToken) { - const idTokenKey = generateCredentialKey(idToken); - this.setItem(idTokenKey, idToken); - } - /** - * fetch the accessToken credential - * @param accessTokenKey - lookup key to fetch cache type AccessTokenEntity - */ - getAccessTokenCredential(accessTokenKey) { - const accessToken = this.getItem(accessTokenKey); - if (isAccessTokenEntity(accessToken)) { - return accessToken; - } - return null; - } - /** - * set accessToken credential - * @param accessToken - cache value to be set of type AccessTokenEntity - */ - setAccessTokenCredential(accessToken) { - const accessTokenKey = generateCredentialKey(accessToken); - this.setItem(accessTokenKey, accessToken); - } - /** - * fetch the refreshToken credential - * @param refreshTokenKey - lookup key to fetch cache type RefreshTokenEntity - */ - getRefreshTokenCredential(refreshTokenKey) { - const refreshToken = this.getItem(refreshTokenKey); - if (isRefreshTokenEntity(refreshToken)) { - return refreshToken; - } - return null; - } - /** - * set refreshToken credential - * @param refreshToken - cache value to be set of type RefreshTokenEntity - */ - setRefreshTokenCredential(refreshToken) { - const refreshTokenKey = generateCredentialKey(refreshToken); - this.setItem(refreshTokenKey, refreshToken); - } - /** - * fetch appMetadata entity from the platform cache - * @param appMetadataKey - lookup key to fetch cache type AppMetadataEntity - */ - getAppMetadata(appMetadataKey) { - const appMetadata = this.getItem(appMetadataKey); - if (isAppMetadataEntity(appMetadataKey, appMetadata)) { - return appMetadata; - } - return null; - } - /** - * set appMetadata entity to the platform cache - * @param appMetadata - cache value to be set of type AppMetadataEntity - */ - setAppMetadata(appMetadata) { - const appMetadataKey = generateAppMetadataKey(appMetadata); - this.setItem(appMetadataKey, appMetadata); - } - /** - * fetch server telemetry entity from the platform cache - * @param serverTelemetrykey - lookup key to fetch cache type ServerTelemetryEntity - */ - getServerTelemetry(serverTelemetrykey) { - const serverTelemetryEntity = this.getItem(serverTelemetrykey); - if (serverTelemetryEntity && - isServerTelemetryEntity(serverTelemetrykey, serverTelemetryEntity)) { - return serverTelemetryEntity; - } - return null; - } - /** - * set server telemetry entity to the platform cache - * @param serverTelemetryKey - lookup key to fetch cache type ServerTelemetryEntity - * @param serverTelemetry - cache value to be set of type ServerTelemetryEntity - */ - setServerTelemetry(serverTelemetryKey, serverTelemetry) { - this.setItem(serverTelemetryKey, serverTelemetry); - } - /** - * fetch authority metadata entity from the platform cache - * @param key - lookup key to fetch cache type AuthorityMetadataEntity - */ - getAuthorityMetadata(key) { - const authorityMetadataEntity = this.getItem(key); - if (authorityMetadataEntity && - isAuthorityMetadataEntity(key, authorityMetadataEntity)) { - return authorityMetadataEntity; - } - return null; - } - /** - * Get all authority metadata keys - */ - getAuthorityMetadataKeys() { - return this.getKeys().filter((key) => { - return this.isAuthorityMetadata(key); - }); - } - /** - * set authority metadata entity to the platform cache - * @param key - lookup key to fetch cache type AuthorityMetadataEntity - * @param metadata - cache value to be set of type AuthorityMetadataEntity - */ - setAuthorityMetadata(key, metadata) { - this.setItem(key, metadata); - } - /** - * fetch throttling entity from the platform cache - * @param throttlingCacheKey - lookup key to fetch cache type ThrottlingEntity - */ - getThrottlingCache(throttlingCacheKey) { - const throttlingCache = this.getItem(throttlingCacheKey); - if (throttlingCache && - isThrottlingEntity(throttlingCacheKey, throttlingCache)) { - return throttlingCache; - } - return null; - } - /** - * set throttling entity to the platform cache - * @param throttlingCacheKey - lookup key to fetch cache type ThrottlingEntity - * @param throttlingCache - cache value to be set of type ThrottlingEntity - */ - setThrottlingCache(throttlingCacheKey, throttlingCache) { - this.setItem(throttlingCacheKey, throttlingCache); - } - /** - * Removes the cache item from memory with the given key. - * @param key - lookup key to remove a cache entity - * @param inMemory - key value map of the cache - */ - removeItem(key) { - this.logger.tracePii(`Item key: ${key}`); - // read inMemoryCache - let result = false; - const cache = this.getCache(); - if (!!cache[key]) { - delete cache[key]; - result = true; - } - // write to the cache after removal - if (result) { - this.setCache(cache); - this.emitChange(); - } - return result; - } - /** - * Remove account entity from the platform cache if it's outdated - * @param accountKey - lookup key to fetch cache type AccountEntity - */ - removeOutdatedAccount(accountKey) { - this.removeItem(accountKey); - } - /** - * Checks whether key is in cache. - * @param key - look up key for a cache entity - */ - containsKey(key) { - return this.getKeys().includes(key); - } - /** - * Gets all keys in window. - */ - getKeys() { - this.logger.trace("Retrieving all cache keys"); - // read cache - const cache = this.getCache(); - return [...Object.keys(cache)]; - } - /** - * Clears all cache entries created by MSAL (except tokens). - */ - clear() { - this.logger.trace("Clearing cache entries created by MSAL"); - // read inMemoryCache - const cacheKeys = this.getKeys(); - // delete each element - cacheKeys.forEach((key) => { - this.removeItem(key); - }); - this.emitChange(); - } - /** - * Initialize in memory cache from an exisiting cache vault - * @param cache - blob formatted cache (JSON) - */ - static generateInMemoryCache(cache) { - return Deserializer.deserializeAllCache(Deserializer.deserializeJSONBlob(cache)); - } - /** - * retrieves the final JSON - * @param inMemoryCache - itemised cache read from the JSON - */ - static generateJsonCache(inMemoryCache) { - return Serializer.serializeAllCache(inMemoryCache); - } - /** - * Updates a credential's cache key if the current cache key is outdated - */ - updateCredentialCacheKey(currentCacheKey, credential) { - const updatedCacheKey = generateCredentialKey(credential); - if (currentCacheKey !== updatedCacheKey) { - const cacheItem = this.getItem(currentCacheKey); - if (cacheItem) { - this.removeItem(currentCacheKey); - this.setItem(updatedCacheKey, cacheItem); - this.logger.verbose(`Updated an outdated ${credential.credentialType} cache key`); - return updatedCacheKey; - } - else { - this.logger.error(`Attempted to update an outdated ${credential.credentialType} cache key but no item matching the outdated key was found in storage`); - } - } - return currentCacheKey; - } -} - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -const defaultSerializedCache = { - Account: {}, - IdToken: {}, - AccessToken: {}, - RefreshToken: {}, - AppMetadata: {}, -}; -/** - * In-memory token cache manager - * @public - */ -class TokenCache { - constructor(storage, logger, cachePlugin) { - this.cacheHasChanged = false; - this.storage = storage; - this.storage.registerChangeEmitter(this.handleChangeEvent.bind(this)); - if (cachePlugin) { - this.persistence = cachePlugin; - } - this.logger = logger; - } - /** - * Set to true if cache state has changed since last time serialize or writeToPersistence was called - */ - hasChanged() { - return this.cacheHasChanged; - } - /** - * Serializes in memory cache to JSON - */ - serialize() { - this.logger.trace("Serializing in-memory cache"); - let finalState = Serializer.serializeAllCache(this.storage.getInMemoryCache()); - // if cacheSnapshot not null or empty, merge - if (this.cacheSnapshot) { - this.logger.trace("Reading cache snapshot from disk"); - finalState = this.mergeState(JSON.parse(this.cacheSnapshot), finalState); - } - else { - this.logger.trace("No cache snapshot to merge"); - } - this.cacheHasChanged = false; - return JSON.stringify(finalState); - } - /** - * Deserializes JSON to in-memory cache. JSON should be in MSAL cache schema format - * @param cache - blob formatted cache - */ - deserialize(cache) { - this.logger.trace("Deserializing JSON to in-memory cache"); - this.cacheSnapshot = cache; - if (this.cacheSnapshot) { - this.logger.trace("Reading cache snapshot from disk"); - const deserializedCache = Deserializer.deserializeAllCache(this.overlayDefaults(JSON.parse(this.cacheSnapshot))); - this.storage.setInMemoryCache(deserializedCache); - } - else { - this.logger.trace("No cache snapshot to deserialize"); - } - } - /** - * Fetches the cache key-value map - */ - getKVStore() { - return this.storage.getCache(); - } - /** - * API that retrieves all accounts currently in cache to the user - */ - async getAllAccounts(correlationId = new CryptoProvider().createNewGuid()) { - this.logger.trace("getAllAccounts called"); - let cacheContext; - try { - if (this.persistence) { - cacheContext = new TokenCacheContext(this, false); - await this.persistence.beforeCacheAccess(cacheContext); - } - return this.storage.getAllAccounts(correlationId); - } - finally { - if (this.persistence && cacheContext) { - await this.persistence.afterCacheAccess(cacheContext); - } - } - } - /** - * Returns the signed in account matching homeAccountId. - * (the account object is created at the time of successful login) - * or null when no matching account is found - * @param homeAccountId - unique identifier for an account (uid.utid) - */ - async getAccountByHomeId(homeAccountId) { - const allAccounts = await this.getAllAccounts(); - if (homeAccountId && allAccounts && allAccounts.length) { - return (allAccounts.filter((accountObj) => accountObj.homeAccountId === homeAccountId)[0] || null); - } - else { - return null; - } - } - /** - * Returns the signed in account matching localAccountId. - * (the account object is created at the time of successful login) - * or null when no matching account is found - * @param localAccountId - unique identifier of an account (sub/obj when homeAccountId cannot be populated) - */ - async getAccountByLocalId(localAccountId) { - const allAccounts = await this.getAllAccounts(); - if (localAccountId && allAccounts && allAccounts.length) { - return (allAccounts.filter((accountObj) => accountObj.localAccountId === localAccountId)[0] || null); - } - else { - return null; - } - } - /** - * API to remove a specific account and the relevant data from cache - * @param account - AccountInfo passed by the user - */ - async removeAccount(account, correlationId = new CryptoProvider().createNewGuid()) { - this.logger.trace("removeAccount called"); - let cacheContext; - try { - if (this.persistence) { - cacheContext = new TokenCacheContext(this, true); - await this.persistence.beforeCacheAccess(cacheContext); - } - await this.storage.removeAccount(AccountEntity.generateAccountCacheKey(account), correlationId); - } - finally { - if (this.persistence && cacheContext) { - await this.persistence.afterCacheAccess(cacheContext); - } - } - } - /** - * Called when the cache has changed state. - */ - handleChangeEvent() { - this.cacheHasChanged = true; - } - /** - * Merge in memory cache with the cache snapshot. - * @param oldState - cache before changes - * @param currentState - current cache state in the library - */ - mergeState(oldState, currentState) { - this.logger.trace("Merging in-memory cache with cache snapshot"); - const stateAfterRemoval = this.mergeRemovals(oldState, currentState); - return this.mergeUpdates(stateAfterRemoval, currentState); - } - /** - * Deep update of oldState based on newState values - * @param oldState - cache before changes - * @param newState - updated cache - */ - mergeUpdates(oldState, newState) { - Object.keys(newState).forEach((newKey) => { - const newValue = newState[newKey]; - // if oldState does not contain value but newValue does, add it - if (!oldState.hasOwnProperty(newKey)) { - if (newValue !== null) { - oldState[newKey] = newValue; - } - } - else { - // both oldState and newState contain the key, do deep update - const newValueNotNull = newValue !== null; - const newValueIsObject = typeof newValue === "object"; - const newValueIsNotArray = !Array.isArray(newValue); - const oldStateNotUndefinedOrNull = typeof oldState[newKey] !== "undefined" && - oldState[newKey] !== null; - if (newValueNotNull && - newValueIsObject && - newValueIsNotArray && - oldStateNotUndefinedOrNull) { - this.mergeUpdates(oldState[newKey], newValue); - } - else { - oldState[newKey] = newValue; - } - } - }); - return oldState; - } - /** - * Removes entities in oldState that the were removed from newState. If there are any unknown values in root of - * oldState that are not recognized, they are left untouched. - * @param oldState - cache before changes - * @param newState - updated cache - */ - mergeRemovals(oldState, newState) { - this.logger.trace("Remove updated entries in cache"); - const accounts = oldState.Account - ? this.mergeRemovalsDict(oldState.Account, newState.Account) - : oldState.Account; - const accessTokens = oldState.AccessToken - ? this.mergeRemovalsDict(oldState.AccessToken, newState.AccessToken) - : oldState.AccessToken; - const refreshTokens = oldState.RefreshToken - ? this.mergeRemovalsDict(oldState.RefreshToken, newState.RefreshToken) - : oldState.RefreshToken; - const idTokens = oldState.IdToken - ? this.mergeRemovalsDict(oldState.IdToken, newState.IdToken) - : oldState.IdToken; - const appMetadata = oldState.AppMetadata - ? this.mergeRemovalsDict(oldState.AppMetadata, newState.AppMetadata) - : oldState.AppMetadata; - return { - ...oldState, - Account: accounts, - AccessToken: accessTokens, - RefreshToken: refreshTokens, - IdToken: idTokens, - AppMetadata: appMetadata, - }; - } - /** - * Helper to merge new cache with the old one - * @param oldState - cache before changes - * @param newState - updated cache - */ - mergeRemovalsDict(oldState, newState) { - const finalState = { ...oldState }; - Object.keys(oldState).forEach((oldKey) => { - if (!newState || !newState.hasOwnProperty(oldKey)) { - delete finalState[oldKey]; - } - }); - return finalState; - } - /** - * Helper to overlay as a part of cache merge - * @param passedInCache - cache read from the blob - */ - overlayDefaults(passedInCache) { - this.logger.trace("Overlaying input cache with the default cache"); - return { - Account: { - ...defaultSerializedCache.Account, - ...passedInCache.Account, - }, - IdToken: { - ...defaultSerializedCache.IdToken, - ...passedInCache.IdToken, - }, - AccessToken: { - ...defaultSerializedCache.AccessToken, - ...passedInCache.AccessToken, - }, - RefreshToken: { - ...defaultSerializedCache.RefreshToken, - ...passedInCache.RefreshToken, - }, - AppMetadata: { - ...defaultSerializedCache.AppMetadata, - ...passedInCache.AppMetadata, - }, - }; - } -} - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * Client assertion of type jwt-bearer used in confidential client flows - * @public - */ -class ClientAssertion { - /** - * Initialize the ClientAssertion class from the clientAssertion passed by the user - * @param assertion - refer https://tools.ietf.org/html/rfc7521 - */ - static fromAssertion(assertion) { - const clientAssertion = new ClientAssertion(); - clientAssertion.jwt = assertion; - return clientAssertion; - } - /** - * @deprecated Use fromCertificateWithSha256Thumbprint instead, with a SHA-256 thumprint - * Initialize the ClientAssertion class from the certificate passed by the user - * @param thumbprint - identifier of a certificate - * @param privateKey - secret key - * @param publicCertificate - electronic document provided to prove the ownership of the public key - */ - static fromCertificate(thumbprint, privateKey, publicCertificate) { - const clientAssertion = new ClientAssertion(); - clientAssertion.privateKey = privateKey; - clientAssertion.thumbprint = thumbprint; - clientAssertion.useSha256 = false; - if (publicCertificate) { - clientAssertion.publicCertificate = - this.parseCertificate(publicCertificate); - } - return clientAssertion; - } - /** - * Initialize the ClientAssertion class from the certificate passed by the user - * @param thumbprint - identifier of a certificate - * @param privateKey - secret key - * @param publicCertificate - electronic document provided to prove the ownership of the public key - */ - static fromCertificateWithSha256Thumbprint(thumbprint, privateKey, publicCertificate) { - const clientAssertion = new ClientAssertion(); - clientAssertion.privateKey = privateKey; - clientAssertion.thumbprint = thumbprint; - clientAssertion.useSha256 = true; - if (publicCertificate) { - clientAssertion.publicCertificate = - this.parseCertificate(publicCertificate); - } - return clientAssertion; - } - /** - * Update JWT for certificate based clientAssertion, if passed by the user, uses it as is - * @param cryptoProvider - library's crypto helper - * @param issuer - iss claim - * @param jwtAudience - aud claim - */ - getJwt(cryptoProvider, issuer, jwtAudience) { - // if assertion was created from certificate, check if jwt is expired and create new one. - if (this.privateKey && this.thumbprint) { - if (this.jwt && - !this.isExpired() && - issuer === this.issuer && - jwtAudience === this.jwtAudience) { - return this.jwt; - } - return this.createJwt(cryptoProvider, issuer, jwtAudience); - } - /* - * if assertion was created by caller, then we just append it. It is up to the caller to - * ensure that it contains necessary claims and that it is not expired. - */ - if (this.jwt) { - return this.jwt; - } - throw createClientAuthError(invalidAssertion); - } - /** - * JWT format and required claims specified: https://tools.ietf.org/html/rfc7523#section-3 - */ - createJwt(cryptoProvider, issuer, jwtAudience) { - this.issuer = issuer; - this.jwtAudience = jwtAudience; - const issuedAt = nowSeconds(); - this.expirationTime = issuedAt + 600; - const algorithm = this.useSha256 - ? JwtConstants.PSS_256 - : JwtConstants.RSA_256; - const header = { - alg: algorithm, - }; - const thumbprintHeader = this.useSha256 - ? JwtConstants.X5T_256 - : JwtConstants.X5T; - Object.assign(header, { - [thumbprintHeader]: EncodingUtils.base64EncodeUrl(this.thumbprint, "hex"), - }); - if (this.publicCertificate) { - Object.assign(header, { - [JwtConstants.X5C]: this.publicCertificate, - }); - } - const payload = { - [JwtConstants.AUDIENCE]: this.jwtAudience, - [JwtConstants.EXPIRATION_TIME]: this.expirationTime, - [JwtConstants.ISSUER]: this.issuer, - [JwtConstants.SUBJECT]: this.issuer, - [JwtConstants.NOT_BEFORE]: issuedAt, - [JwtConstants.JWT_ID]: cryptoProvider.createNewGuid(), - }; - this.jwt = jwt.sign(payload, this.privateKey, { header }); - return this.jwt; - } - /** - * Utility API to check expiration - */ - isExpired() { - return this.expirationTime < nowSeconds(); - } - /** - * Extracts the raw certs from a given certificate string and returns them in an array. - * @param publicCertificate - electronic document provided to prove the ownership of the public key - */ - static parseCertificate(publicCertificate) { - /** - * This is regex to identify the certs in a given certificate string. - * We want to look for the contents between the BEGIN and END certificate strings, without the associated newlines. - * The information in parens "(.+?)" is the capture group to represent the cert we want isolated. - * "." means any string character, "+" means match 1 or more times, and "?" means the shortest match. - * The "g" at the end of the regex means search the string globally, and the "s" enables the "." to match newlines. - */ - const regexToFindCerts = /-----BEGIN CERTIFICATE-----\r*\n(.+?)\r*\n-----END CERTIFICATE-----/gs; - const certs = []; - let matches; - while ((matches = regexToFindCerts.exec(publicCertificate)) !== null) { - // matches[1] represents the first parens capture group in the regex. - certs.push(matches[1].replace(/\r*\n/g, Constants$1.EMPTY_STRING)); - } - return certs; - } -} - -/* eslint-disable header/header */ -const name = "@azure/msal-node"; -const version = "2.16.3"; - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * Oauth2.0 Password grant client - * Note: We are only supporting public clients for password grant and for purely testing purposes - * @public - */ -class UsernamePasswordClient extends BaseClient { - constructor(configuration) { - super(configuration); - } - /** - * API to acquire a token by passing the username and password to the service in exchage of credentials - * password_grant - * @param request - CommonUsernamePasswordRequest - */ - async acquireToken(request) { - this.logger.info("in acquireToken call in username-password client"); - const reqTimestamp = nowSeconds(); - const response = await this.executeTokenRequest(this.authority, request); - const responseHandler = new ResponseHandler(this.config.authOptions.clientId, this.cacheManager, this.cryptoUtils, this.logger, this.config.serializableCache, this.config.persistencePlugin); - // Validate response. This function throws a server error if an error is returned by the server. - responseHandler.validateTokenResponse(response.body); - const tokenResponse = responseHandler.handleServerTokenResponse(response.body, this.authority, reqTimestamp, request); - return tokenResponse; - } - /** - * Executes POST request to token endpoint - * @param authority - authority object - * @param request - CommonUsernamePasswordRequest provided by the developer - */ - async executeTokenRequest(authority, request) { - const queryParametersString = this.createTokenQueryParameters(request); - const endpoint = UrlString.appendQueryString(authority.tokenEndpoint, queryParametersString); - const requestBody = await this.createTokenRequestBody(request); - const headers = this.createTokenRequestHeaders({ - credential: request.username, - type: CcsCredentialType.UPN, - }); - const thumbprint = { - clientId: this.config.authOptions.clientId, - authority: authority.canonicalAuthority, - scopes: request.scopes, - claims: request.claims, - authenticationScheme: request.authenticationScheme, - resourceRequestMethod: request.resourceRequestMethod, - resourceRequestUri: request.resourceRequestUri, - shrClaims: request.shrClaims, - sshKid: request.sshKid, - }; - return this.executePostToTokenEndpoint(endpoint, requestBody, headers, thumbprint, request.correlationId); - } - /** - * Generates a map for all the params to be sent to the service - * @param request - CommonUsernamePasswordRequest provided by the developer - */ - async createTokenRequestBody(request) { - const parameterBuilder = new RequestParameterBuilder(); - parameterBuilder.addClientId(this.config.authOptions.clientId); - parameterBuilder.addUsername(request.username); - parameterBuilder.addPassword(request.password); - parameterBuilder.addScopes(request.scopes); - parameterBuilder.addResponseTypeForTokenAndIdToken(); - parameterBuilder.addGrantType(GrantType.RESOURCE_OWNER_PASSWORD_GRANT); - parameterBuilder.addClientInfo(); - parameterBuilder.addLibraryInfo(this.config.libraryInfo); - parameterBuilder.addApplicationTelemetry(this.config.telemetry.application); - parameterBuilder.addThrottling(); - if (this.serverTelemetryManager) { - parameterBuilder.addServerTelemetry(this.serverTelemetryManager); - } - const correlationId = request.correlationId || - this.config.cryptoInterface.createNewGuid(); - parameterBuilder.addCorrelationId(correlationId); - if (this.config.clientCredentials.clientSecret) { - parameterBuilder.addClientSecret(this.config.clientCredentials.clientSecret); - } - const clientAssertion = this.config.clientCredentials.clientAssertion; - if (clientAssertion) { - parameterBuilder.addClientAssertion(await getClientAssertion(clientAssertion.assertion, this.config.authOptions.clientId, request.resourceRequestUri)); - parameterBuilder.addClientAssertionType(clientAssertion.assertionType); - } - if (!StringUtils.isEmptyObj(request.claims) || - (this.config.authOptions.clientCapabilities && - this.config.authOptions.clientCapabilities.length > 0)) { - parameterBuilder.addClaims(request.claims, this.config.authOptions.clientCapabilities); - } - if (this.config.systemOptions.preventCorsPreflight && - request.username) { - parameterBuilder.addCcsUpn(request.username); - } - return parameterBuilder.createQueryString(); - } -} - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * Base abstract class for all ClientApplications - public and confidential - * @public - */ -class ClientApplication { - /** - * Constructor for the ClientApplication - */ - constructor(configuration) { - this.config = buildAppConfiguration(configuration); - this.cryptoProvider = new CryptoProvider(); - this.logger = new Logger(this.config.system.loggerOptions, name, version); - this.storage = new NodeStorage(this.logger, this.config.auth.clientId, this.cryptoProvider, buildStaticAuthorityOptions(this.config.auth)); - this.tokenCache = new TokenCache(this.storage, this.logger, this.config.cache.cachePlugin); - } - /** - * Creates the URL of the authorization request, letting the user input credentials and consent to the - * application. The URL targets the /authorize endpoint of the authority configured in the - * application object. - * - * Once the user inputs their credentials and consents, the authority will send a response to the redirect URI - * sent in the request and should contain an authorization code, which can then be used to acquire tokens via - * `acquireTokenByCode(AuthorizationCodeRequest)`. - */ - async getAuthCodeUrl(request) { - this.logger.info("getAuthCodeUrl called", request.correlationId); - const validRequest = { - ...request, - ...(await this.initializeBaseRequest(request)), - responseMode: request.responseMode || ResponseMode.QUERY, - authenticationScheme: AuthenticationScheme.BEARER, - }; - const authClientConfig = await this.buildOauthClientConfiguration(validRequest.authority, validRequest.correlationId, validRequest.redirectUri, undefined, undefined, request.azureCloudOptions); - const authorizationCodeClient = new AuthorizationCodeClient(authClientConfig); - this.logger.verbose("Auth code client created", validRequest.correlationId); - return authorizationCodeClient.getAuthCodeUrl(validRequest); - } - /** - * Acquires a token by exchanging the Authorization Code received from the first step of OAuth2.0 - * Authorization Code flow. - * - * `getAuthCodeUrl(AuthorizationCodeUrlRequest)` can be used to create the URL for the first step of OAuth2.0 - * Authorization Code flow. Ensure that values for redirectUri and scopes in AuthorizationCodeUrlRequest and - * AuthorizationCodeRequest are the same. - */ - async acquireTokenByCode(request, authCodePayLoad) { - this.logger.info("acquireTokenByCode called"); - if (request.state && authCodePayLoad) { - this.logger.info("acquireTokenByCode - validating state"); - this.validateState(request.state, authCodePayLoad.state || ""); - // eslint-disable-next-line no-param-reassign - authCodePayLoad = { ...authCodePayLoad, state: "" }; - } - const validRequest = { - ...request, - ...(await this.initializeBaseRequest(request)), - authenticationScheme: AuthenticationScheme.BEARER, - }; - const serverTelemetryManager = this.initializeServerTelemetryManager(ApiId.acquireTokenByCode, validRequest.correlationId); - try { - const authClientConfig = await this.buildOauthClientConfiguration(validRequest.authority, validRequest.correlationId, validRequest.redirectUri, serverTelemetryManager, undefined, request.azureCloudOptions); - const authorizationCodeClient = new AuthorizationCodeClient(authClientConfig); - this.logger.verbose("Auth code client created", validRequest.correlationId); - return await authorizationCodeClient.acquireToken(validRequest, authCodePayLoad); - } - catch (e) { - if (e instanceof AuthError) { - e.setCorrelationId(validRequest.correlationId); - } - serverTelemetryManager.cacheFailedRequest(e); - throw e; - } - } - /** - * Acquires a token by exchanging the refresh token provided for a new set of tokens. - * - * This API is provided only for scenarios where you would like to migrate from ADAL to MSAL. Otherwise, it is - * recommended that you use `acquireTokenSilent()` for silent scenarios. When using `acquireTokenSilent()`, MSAL will - * handle the caching and refreshing of tokens automatically. - */ - async acquireTokenByRefreshToken(request) { - this.logger.info("acquireTokenByRefreshToken called", request.correlationId); - const validRequest = { - ...request, - ...(await this.initializeBaseRequest(request)), - authenticationScheme: AuthenticationScheme.BEARER, - }; - const serverTelemetryManager = this.initializeServerTelemetryManager(ApiId.acquireTokenByRefreshToken, validRequest.correlationId); - try { - const refreshTokenClientConfig = await this.buildOauthClientConfiguration(validRequest.authority, validRequest.correlationId, validRequest.redirectUri || "", serverTelemetryManager, undefined, request.azureCloudOptions); - const refreshTokenClient = new RefreshTokenClient(refreshTokenClientConfig); - this.logger.verbose("Refresh token client created", validRequest.correlationId); - return await refreshTokenClient.acquireToken(validRequest); - } - catch (e) { - if (e instanceof AuthError) { - e.setCorrelationId(validRequest.correlationId); - } - serverTelemetryManager.cacheFailedRequest(e); - throw e; - } - } - /** - * Acquires a token silently when a user specifies the account the token is requested for. - * - * This API expects the user to provide an account object and looks into the cache to retrieve the token if present. - * There is also an optional "forceRefresh" boolean the user can send to bypass the cache for access_token and id_token. - * In case the refresh_token is expired or not found, an error is thrown - * and the guidance is for the user to call any interactive token acquisition API (eg: `acquireTokenByCode()`). - */ - async acquireTokenSilent(request) { - const validRequest = { - ...request, - ...(await this.initializeBaseRequest(request)), - forceRefresh: request.forceRefresh || false, - }; - const serverTelemetryManager = this.initializeServerTelemetryManager(ApiId.acquireTokenSilent, validRequest.correlationId, validRequest.forceRefresh); - try { - const silentFlowClientConfig = await this.buildOauthClientConfiguration(validRequest.authority, validRequest.correlationId, validRequest.redirectUri || "", serverTelemetryManager, undefined, request.azureCloudOptions); - const silentFlowClient = new SilentFlowClient(silentFlowClientConfig); - this.logger.verbose("Silent flow client created", validRequest.correlationId); - return await silentFlowClient.acquireToken(validRequest); - } - catch (e) { - if (e instanceof AuthError) { - e.setCorrelationId(validRequest.correlationId); - } - serverTelemetryManager.cacheFailedRequest(e); - throw e; - } - } - /** - * Acquires tokens with password grant by exchanging client applications username and password for credentials - * - * The latest OAuth 2.0 Security Best Current Practice disallows the password grant entirely. - * More details on this recommendation at https://tools.ietf.org/html/draft-ietf-oauth-security-topics-13#section-3.4 - * Microsoft's documentation and recommendations are at: - * https://docs.microsoft.com/en-us/azure/active-directory/develop/msal-authentication-flows#usernamepassword - * - * @param request - UsenamePasswordRequest - */ - async acquireTokenByUsernamePassword(request) { - this.logger.info("acquireTokenByUsernamePassword called", request.correlationId); - const validRequest = { - ...request, - ...(await this.initializeBaseRequest(request)), - }; - const serverTelemetryManager = this.initializeServerTelemetryManager(ApiId.acquireTokenByUsernamePassword, validRequest.correlationId); - try { - const usernamePasswordClientConfig = await this.buildOauthClientConfiguration(validRequest.authority, validRequest.correlationId, "", serverTelemetryManager, undefined, request.azureCloudOptions); - const usernamePasswordClient = new UsernamePasswordClient(usernamePasswordClientConfig); - this.logger.verbose("Username password client created", validRequest.correlationId); - return await usernamePasswordClient.acquireToken(validRequest); - } - catch (e) { - if (e instanceof AuthError) { - e.setCorrelationId(validRequest.correlationId); - } - serverTelemetryManager.cacheFailedRequest(e); - throw e; - } - } - /** - * Gets the token cache for the application. - */ - getTokenCache() { - this.logger.info("getTokenCache called"); - return this.tokenCache; - } - /** - * Validates OIDC state by comparing the user cached state with the state received from the server. - * - * This API is provided for scenarios where you would use OAuth2.0 state parameter to mitigate against - * CSRF attacks. - * For more information about state, visit https://datatracker.ietf.org/doc/html/rfc6819#section-3.6. - * @param state - Unique GUID generated by the user that is cached by the user and sent to the server during the first leg of the flow - * @param cachedState - This string is sent back by the server with the authorization code - */ - validateState(state, cachedState) { - if (!state) { - throw NodeAuthError.createStateNotFoundError(); - } - if (state !== cachedState) { - throw createClientAuthError(stateMismatch); - } - } - /** - * Returns the logger instance - */ - getLogger() { - return this.logger; - } - /** - * Replaces the default logger set in configurations with new Logger with new configurations - * @param logger - Logger instance - */ - setLogger(logger) { - this.logger = logger; - } - /** - * Builds the common configuration to be passed to the common component based on the platform configurarion - * @param authority - user passed authority in configuration - * @param serverTelemetryManager - initializes servertelemetry if passed - */ - async buildOauthClientConfiguration(authority, requestCorrelationId, redirectUri, serverTelemetryManager, azureRegionConfiguration, azureCloudOptions) { - this.logger.verbose("buildOauthClientConfiguration called", requestCorrelationId); - // precedence - azureCloudInstance + tenant >> authority and request >> config - const userAzureCloudOptions = azureCloudOptions - ? azureCloudOptions - : this.config.auth.azureCloudOptions; - // using null assertion operator as we ensure that all config values have default values in buildConfiguration() - const discoveredAuthority = await this.createAuthority(authority, requestCorrelationId, azureRegionConfiguration, userAzureCloudOptions); - this.logger.info(`Building oauth client configuration with the following authority: ${discoveredAuthority.tokenEndpoint}.`, requestCorrelationId); - serverTelemetryManager?.updateRegionDiscoveryMetadata(discoveredAuthority.regionDiscoveryMetadata); - const clientConfiguration = { - authOptions: { - clientId: this.config.auth.clientId, - authority: discoveredAuthority, - clientCapabilities: this.config.auth.clientCapabilities, - redirectUri, - }, - loggerOptions: { - logLevel: this.config.system.loggerOptions.logLevel, - loggerCallback: this.config.system.loggerOptions.loggerCallback, - piiLoggingEnabled: this.config.system.loggerOptions.piiLoggingEnabled, - correlationId: requestCorrelationId, - }, - cacheOptions: { - claimsBasedCachingEnabled: this.config.cache.claimsBasedCachingEnabled, - }, - cryptoInterface: this.cryptoProvider, - networkInterface: this.config.system.networkClient, - storageInterface: this.storage, - serverTelemetryManager: serverTelemetryManager, - clientCredentials: { - clientSecret: this.clientSecret, - clientAssertion: await this.getClientAssertion(discoveredAuthority), - }, - libraryInfo: { - sku: Constants.MSAL_SKU, - version: version, - cpu: process.arch || Constants$1.EMPTY_STRING, - os: process.platform || Constants$1.EMPTY_STRING, - }, - telemetry: this.config.telemetry, - persistencePlugin: this.config.cache.cachePlugin, - serializableCache: this.tokenCache, - }; - return clientConfiguration; - } - async getClientAssertion(authority) { - if (this.developerProvidedClientAssertion) { - this.clientAssertion = ClientAssertion.fromAssertion(await getClientAssertion(this.developerProvidedClientAssertion, this.config.auth.clientId, authority.tokenEndpoint)); - } - return (this.clientAssertion && { - assertion: this.clientAssertion.getJwt(this.cryptoProvider, this.config.auth.clientId, authority.tokenEndpoint), - assertionType: Constants.JWT_BEARER_ASSERTION_TYPE, - }); - } - /** - * Generates a request with the default scopes & generates a correlationId. - * @param authRequest - BaseAuthRequest for initialization - */ - async initializeBaseRequest(authRequest) { - this.logger.verbose("initializeRequestScopes called", authRequest.correlationId); - // Default authenticationScheme to Bearer, log that POP isn't supported yet - if (authRequest.authenticationScheme && - authRequest.authenticationScheme === AuthenticationScheme.POP) { - this.logger.verbose("Authentication Scheme 'pop' is not supported yet, setting Authentication Scheme to 'Bearer' for request", authRequest.correlationId); - } - authRequest.authenticationScheme = AuthenticationScheme.BEARER; - // Set requested claims hash if claims-based caching is enabled and claims were requested - if (this.config.cache.claimsBasedCachingEnabled && - authRequest.claims && - // Checks for empty stringified object "{}" which doesn't qualify as requested claims - !StringUtils.isEmptyObj(authRequest.claims)) { - authRequest.requestedClaimsHash = - await this.cryptoProvider.hashString(authRequest.claims); - } - return { - ...authRequest, - scopes: [ - ...((authRequest && authRequest.scopes) || []), - ...OIDC_DEFAULT_SCOPES, - ], - correlationId: (authRequest && authRequest.correlationId) || - this.cryptoProvider.createNewGuid(), - authority: authRequest.authority || this.config.auth.authority, - }; - } - /** - * Initializes the server telemetry payload - * @param apiId - Id for a specific request - * @param correlationId - GUID - * @param forceRefresh - boolean to indicate network call - */ - initializeServerTelemetryManager(apiId, correlationId, forceRefresh) { - const telemetryPayload = { - clientId: this.config.auth.clientId, - correlationId: correlationId, - apiId: apiId, - forceRefresh: forceRefresh || false, - }; - return new ServerTelemetryManager(telemetryPayload, this.storage); - } - /** - * Create authority instance. If authority not passed in request, default to authority set on the application - * object. If no authority set in application object, then default to common authority. - * @param authorityString - authority from user configuration - */ - async createAuthority(authorityString, requestCorrelationId, azureRegionConfiguration, azureCloudOptions) { - this.logger.verbose("createAuthority called", requestCorrelationId); - // build authority string based on auth params - azureCloudInstance is prioritized if provided - const authorityUrl = Authority.generateAuthority(authorityString, azureCloudOptions); - const authorityOptions = { - protocolMode: this.config.auth.protocolMode, - knownAuthorities: this.config.auth.knownAuthorities, - cloudDiscoveryMetadata: this.config.auth.cloudDiscoveryMetadata, - authorityMetadata: this.config.auth.authorityMetadata, - azureRegionConfiguration, - skipAuthorityMetadataCache: this.config.auth.skipAuthorityMetadataCache, - }; - return createDiscoveredInstance(authorityUrl, this.config.system.networkClient, this.storage, authorityOptions, this.logger, requestCorrelationId); - } - /** - * Clear the cache - */ - clearCache() { - this.storage.clear(); - } -} - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -class LoopbackClient { - /** - * Spins up a loopback server which returns the server response when the localhost redirectUri is hit - * @param successTemplate - * @param errorTemplate - * @returns - */ - async listenForAuthCode(successTemplate, errorTemplate) { - if (this.server) { - throw NodeAuthError.createLoopbackServerAlreadyExistsError(); - } - return new Promise((resolve, reject) => { - this.server = http.createServer((req, res) => { - const url = req.url; - if (!url) { - res.end(errorTemplate || - "Error occurred loading redirectUrl"); - reject(NodeAuthError.createUnableToLoadRedirectUrlError()); - return; - } - else if (url === Constants$1.FORWARD_SLASH) { - res.end(successTemplate || - "Auth code was successfully acquired. You can close this window now."); - return; - } - const redirectUri = this.getRedirectUri(); - const parsedUrl = new URL(url, redirectUri); - const authCodeResponse = getDeserializedResponse(parsedUrl.search) || {}; - if (authCodeResponse.code) { - res.writeHead(HttpStatus.REDIRECT, { - location: redirectUri, - }); // Prevent auth code from being saved in the browser history - res.end(); - } - if (authCodeResponse.error) { - res.end(errorTemplate || - `Error occurred: ${authCodeResponse.error}`); - } - resolve(authCodeResponse); - }); - this.server.listen(0, "127.0.0.1"); // Listen on any available port - }); - } - /** - * Get the port that the loopback server is running on - * @returns - */ - getRedirectUri() { - if (!this.server || !this.server.listening) { - throw NodeAuthError.createNoLoopbackServerExistsError(); - } - const address = this.server.address(); - if (!address || typeof address === "string" || !address.port) { - this.closeServer(); - throw NodeAuthError.createInvalidLoopbackAddressTypeError(); - } - const port = address && address.port; - return `${Constants.HTTP_PROTOCOL}${Constants.LOCALHOST}:${port}`; - } - /** - * Close the loopback server - */ - closeServer() { - if (this.server) { - // Only stops accepting new connections, server will close once open/idle connections are closed. - this.server.close(); - if (typeof this.server.closeAllConnections === "function") { - /* - * Close open/idle connections. This API is available in Node versions 18.2 and higher - */ - this.server.closeAllConnections(); - } - this.server.unref(); - this.server = undefined; - } - } -} - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * OAuth2.0 Device code client - * @public - */ -class DeviceCodeClient extends BaseClient { - constructor(configuration) { - super(configuration); - } - /** - * Gets device code from device code endpoint, calls back to with device code response, and - * polls token endpoint to exchange device code for tokens - * @param request - developer provided CommonDeviceCodeRequest - */ - async acquireToken(request) { - const deviceCodeResponse = await this.getDeviceCode(request); - request.deviceCodeCallback(deviceCodeResponse); - const reqTimestamp = nowSeconds(); - const response = await this.acquireTokenWithDeviceCode(request, deviceCodeResponse); - const responseHandler = new ResponseHandler(this.config.authOptions.clientId, this.cacheManager, this.cryptoUtils, this.logger, this.config.serializableCache, this.config.persistencePlugin); - // Validate response. This function throws a server error if an error is returned by the server. - responseHandler.validateTokenResponse(response); - return responseHandler.handleServerTokenResponse(response, this.authority, reqTimestamp, request); - } - /** - * Creates device code request and executes http GET - * @param request - developer provided CommonDeviceCodeRequest - */ - async getDeviceCode(request) { - const queryParametersString = this.createExtraQueryParameters(request); - const endpoint = UrlString.appendQueryString(this.authority.deviceCodeEndpoint, queryParametersString); - const queryString = this.createQueryString(request); - const headers = this.createTokenRequestHeaders(); - const thumbprint = { - clientId: this.config.authOptions.clientId, - authority: request.authority, - scopes: request.scopes, - claims: request.claims, - authenticationScheme: request.authenticationScheme, - resourceRequestMethod: request.resourceRequestMethod, - resourceRequestUri: request.resourceRequestUri, - shrClaims: request.shrClaims, - sshKid: request.sshKid, - }; - return this.executePostRequestToDeviceCodeEndpoint(endpoint, queryString, headers, thumbprint, request.correlationId); - } - /** - * Creates query string for the device code request - * @param request - developer provided CommonDeviceCodeRequest - */ - createExtraQueryParameters(request) { - const parameterBuilder = new RequestParameterBuilder(); - if (request.extraQueryParameters) { - parameterBuilder.addExtraQueryParameters(request.extraQueryParameters); - } - return parameterBuilder.createQueryString(); - } - /** - * Executes POST request to device code endpoint - * @param deviceCodeEndpoint - token endpoint - * @param queryString - string to be used in the body of the request - * @param headers - headers for the request - * @param thumbprint - unique request thumbprint - * @param correlationId - correlation id to be used in the request - */ - async executePostRequestToDeviceCodeEndpoint(deviceCodeEndpoint, queryString, headers, thumbprint, correlationId) { - const { body: { user_code: userCode, device_code: deviceCode, verification_uri: verificationUri, expires_in: expiresIn, interval, message, }, } = await this.sendPostRequest(thumbprint, deviceCodeEndpoint, { - body: queryString, - headers: headers, - }, correlationId); - return { - userCode, - deviceCode, - verificationUri, - expiresIn, - interval, - message, - }; - } - /** - * Create device code endpoint query parameters and returns string - * @param request - developer provided CommonDeviceCodeRequest - */ - createQueryString(request) { - const parameterBuilder = new RequestParameterBuilder(); - parameterBuilder.addScopes(request.scopes); - parameterBuilder.addClientId(this.config.authOptions.clientId); - if (request.extraQueryParameters) { - parameterBuilder.addExtraQueryParameters(request.extraQueryParameters); - } - if (request.claims || - (this.config.authOptions.clientCapabilities && - this.config.authOptions.clientCapabilities.length > 0)) { - parameterBuilder.addClaims(request.claims, this.config.authOptions.clientCapabilities); - } - return parameterBuilder.createQueryString(); - } - /** - * Breaks the polling with specific conditions - * @param deviceCodeExpirationTime - expiration time for the device code request - * @param userSpecifiedTimeout - developer provided timeout, to be compared against deviceCodeExpirationTime - * @param userSpecifiedCancelFlag - boolean indicating the developer would like to cancel the request - */ - continuePolling(deviceCodeExpirationTime, userSpecifiedTimeout, userSpecifiedCancelFlag) { - if (userSpecifiedCancelFlag) { - this.logger.error("Token request cancelled by setting DeviceCodeRequest.cancel = true"); - throw createClientAuthError(deviceCodePollingCancelled); - } - else if (userSpecifiedTimeout && - userSpecifiedTimeout < deviceCodeExpirationTime && - nowSeconds() > userSpecifiedTimeout) { - this.logger.error(`User defined timeout for device code polling reached. The timeout was set for ${userSpecifiedTimeout}`); - throw createClientAuthError(userTimeoutReached); - } - else if (nowSeconds() > deviceCodeExpirationTime) { - if (userSpecifiedTimeout) { - this.logger.verbose(`User specified timeout ignored as the device code has expired before the timeout elapsed. The user specified timeout was set for ${userSpecifiedTimeout}`); - } - this.logger.error(`Device code expired. Expiration time of device code was ${deviceCodeExpirationTime}`); - throw createClientAuthError(deviceCodeExpired); - } - return true; - } - /** - * Creates token request with device code response and polls token endpoint at interval set by the device code response - * @param request - developer provided CommonDeviceCodeRequest - * @param deviceCodeResponse - DeviceCodeResponse returned by the security token service device code endpoint - */ - async acquireTokenWithDeviceCode(request, deviceCodeResponse) { - const queryParametersString = this.createTokenQueryParameters(request); - const endpoint = UrlString.appendQueryString(this.authority.tokenEndpoint, queryParametersString); - const requestBody = this.createTokenRequestBody(request, deviceCodeResponse); - const headers = this.createTokenRequestHeaders(); - const userSpecifiedTimeout = request.timeout - ? nowSeconds() + request.timeout - : undefined; - const deviceCodeExpirationTime = nowSeconds() + deviceCodeResponse.expiresIn; - const pollingIntervalMilli = deviceCodeResponse.interval * 1000; - /* - * Poll token endpoint while (device code is not expired AND operation has not been cancelled by - * setting CancellationToken.cancel = true). POST request is sent at interval set by pollingIntervalMilli - */ - while (this.continuePolling(deviceCodeExpirationTime, userSpecifiedTimeout, request.cancel)) { - const thumbprint = { - clientId: this.config.authOptions.clientId, - authority: request.authority, - scopes: request.scopes, - claims: request.claims, - authenticationScheme: request.authenticationScheme, - resourceRequestMethod: request.resourceRequestMethod, - resourceRequestUri: request.resourceRequestUri, - shrClaims: request.shrClaims, - sshKid: request.sshKid, - }; - const response = await this.executePostToTokenEndpoint(endpoint, requestBody, headers, thumbprint, request.correlationId); - if (response.body && response.body.error) { - // user authorization is pending. Sleep for polling interval and try again - if (response.body.error === Constants$1.AUTHORIZATION_PENDING) { - this.logger.info("Authorization pending. Continue polling."); - await delay(pollingIntervalMilli); - } - else { - // for any other error, throw - this.logger.info("Unexpected error in polling from the server"); - throw createAuthError(postRequestFailed, response.body.error); - } - } - else { - this.logger.verbose("Authorization completed successfully. Polling stopped."); - return response.body; - } - } - /* - * The above code should've thrown by this point, but to satisfy TypeScript, - * and in the rare case the conditionals in continuePolling() may not catch everything... - */ - this.logger.error("Polling stopped for unknown reasons."); - throw createClientAuthError(deviceCodeUnknownError); - } - /** - * Creates query parameters and converts to string. - * @param request - developer provided CommonDeviceCodeRequest - * @param deviceCodeResponse - DeviceCodeResponse returned by the security token service device code endpoint - */ - createTokenRequestBody(request, deviceCodeResponse) { - const requestParameters = new RequestParameterBuilder(); - requestParameters.addScopes(request.scopes); - requestParameters.addClientId(this.config.authOptions.clientId); - requestParameters.addGrantType(GrantType.DEVICE_CODE_GRANT); - requestParameters.addDeviceCode(deviceCodeResponse.deviceCode); - const correlationId = request.correlationId || - this.config.cryptoInterface.createNewGuid(); - requestParameters.addCorrelationId(correlationId); - requestParameters.addClientInfo(); - requestParameters.addLibraryInfo(this.config.libraryInfo); - requestParameters.addApplicationTelemetry(this.config.telemetry.application); - requestParameters.addThrottling(); - if (this.serverTelemetryManager) { - requestParameters.addServerTelemetry(this.serverTelemetryManager); - } - if (!StringUtils.isEmptyObj(request.claims) || - (this.config.authOptions.clientCapabilities && - this.config.authOptions.clientCapabilities.length > 0)) { - requestParameters.addClaims(request.claims, this.config.authOptions.clientCapabilities); - } - return requestParameters.createQueryString(); - } -} - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * This class is to be used to acquire tokens for public client applications (desktop, mobile). Public client applications - * are not trusted to safely store application secrets, and therefore can only request tokens in the name of an user. - * @public - */ -class PublicClientApplication extends ClientApplication { - /** - * Important attributes in the Configuration object for auth are: - * - clientID: the application ID of your application. You can obtain one by registering your application with our Application registration portal. - * - authority: the authority URL for your application. - * - * AAD authorities are of the form https://login.microsoftonline.com/\{Enter_the_Tenant_Info_Here\}. - * - If your application supports Accounts in one organizational directory, replace "Enter_the_Tenant_Info_Here" value with the Tenant Id or Tenant name (for example, contoso.microsoft.com). - * - If your application supports Accounts in any organizational directory, replace "Enter_the_Tenant_Info_Here" value with organizations. - * - If your application supports Accounts in any organizational directory and personal Microsoft accounts, replace "Enter_the_Tenant_Info_Here" value with common. - * - To restrict support to Personal Microsoft accounts only, replace "Enter_the_Tenant_Info_Here" value with consumers. - * - * Azure B2C authorities are of the form https://\{instance\}/\{tenant\}/\{policy\}. Each policy is considered - * its own authority. You will have to set the all of the knownAuthorities at the time of the client application - * construction. - * - * ADFS authorities are of the form https://\{instance\}/adfs. - */ - constructor(configuration) { - super(configuration); - if (this.config.broker.nativeBrokerPlugin) { - if (this.config.broker.nativeBrokerPlugin.isBrokerAvailable) { - this.nativeBrokerPlugin = this.config.broker.nativeBrokerPlugin; - this.nativeBrokerPlugin.setLogger(this.config.system.loggerOptions); - } - else { - this.logger.warning("NativeBroker implementation was provided but the broker is unavailable."); - } - } - this.skus = ServerTelemetryManager.makeExtraSkuString({ - libraryName: Constants.MSAL_SKU, - libraryVersion: version, - }); - } - /** - * Acquires a token from the authority using OAuth2.0 device code flow. - * This flow is designed for devices that do not have access to a browser or have input constraints. - * The authorization server issues a DeviceCode object with a verification code, an end-user code, - * and the end-user verification URI. The DeviceCode object is provided through a callback, and the end-user should be - * instructed to use another device to navigate to the verification URI to input credentials. - * Since the client cannot receive incoming requests, it polls the authorization server repeatedly - * until the end-user completes input of credentials. - */ - async acquireTokenByDeviceCode(request) { - this.logger.info("acquireTokenByDeviceCode called", request.correlationId); - const validRequest = Object.assign(request, await this.initializeBaseRequest(request)); - const serverTelemetryManager = this.initializeServerTelemetryManager(ApiId.acquireTokenByDeviceCode, validRequest.correlationId); - try { - const deviceCodeConfig = await this.buildOauthClientConfiguration(validRequest.authority, validRequest.correlationId, "", serverTelemetryManager, undefined, request.azureCloudOptions); - const deviceCodeClient = new DeviceCodeClient(deviceCodeConfig); - this.logger.verbose("Device code client created", validRequest.correlationId); - return await deviceCodeClient.acquireToken(validRequest); - } - catch (e) { - if (e instanceof AuthError) { - e.setCorrelationId(validRequest.correlationId); - } - serverTelemetryManager.cacheFailedRequest(e); - throw e; - } - } - /** - * Acquires a token interactively via the browser by requesting an authorization code then exchanging it for a token. - */ - async acquireTokenInteractive(request) { - const correlationId = request.correlationId || this.cryptoProvider.createNewGuid(); - this.logger.trace("acquireTokenInteractive called", correlationId); - const { openBrowser, successTemplate, errorTemplate, windowHandle, loopbackClient: customLoopbackClient, ...remainingProperties } = request; - if (this.nativeBrokerPlugin) { - const brokerRequest = { - ...remainingProperties, - clientId: this.config.auth.clientId, - scopes: request.scopes || OIDC_DEFAULT_SCOPES, - redirectUri: `${Constants.HTTP_PROTOCOL}${Constants.LOCALHOST}`, - authority: request.authority || this.config.auth.authority, - correlationId: correlationId, - extraParameters: { - ...remainingProperties.extraQueryParameters, - ...remainingProperties.tokenQueryParameters, - [X_CLIENT_EXTRA_SKU]: this.skus, - }, - accountId: remainingProperties.account?.nativeAccountId, - }; - return this.nativeBrokerPlugin.acquireTokenInteractive(brokerRequest, windowHandle); - } - const { verifier, challenge } = await this.cryptoProvider.generatePkceCodes(); - const loopbackClient = customLoopbackClient || new LoopbackClient(); - let authCodeResponse = {}; - let authCodeListenerError = null; - try { - const authCodeListener = loopbackClient - .listenForAuthCode(successTemplate, errorTemplate) - .then((response) => { - authCodeResponse = response; - }) - .catch((e) => { - // Store the promise instead of throwing so we can control when its thrown - authCodeListenerError = e; - }); - // Wait for server to be listening - const redirectUri = await this.waitForRedirectUri(loopbackClient); - const validRequest = { - ...remainingProperties, - correlationId: correlationId, - scopes: request.scopes || OIDC_DEFAULT_SCOPES, - redirectUri: redirectUri, - responseMode: ResponseMode.QUERY, - codeChallenge: challenge, - codeChallengeMethod: CodeChallengeMethodValues.S256, - }; - const authCodeUrl = await this.getAuthCodeUrl(validRequest); - await openBrowser(authCodeUrl); - await authCodeListener; - if (authCodeListenerError) { - throw authCodeListenerError; - } - if (authCodeResponse.error) { - throw new ServerError(authCodeResponse.error, authCodeResponse.error_description, authCodeResponse.suberror); - } - else if (!authCodeResponse.code) { - throw NodeAuthError.createNoAuthCodeInResponseError(); - } - const clientInfo = authCodeResponse.client_info; - const tokenRequest = { - code: authCodeResponse.code, - codeVerifier: verifier, - clientInfo: clientInfo || Constants$1.EMPTY_STRING, - ...validRequest, - }; - return await this.acquireTokenByCode(tokenRequest); // Await this so the server doesn't close prematurely - } - finally { - loopbackClient.closeServer(); - } - } - /** - * Returns a token retrieved either from the cache or by exchanging the refresh token for a fresh access token. If brokering is enabled the token request will be serviced by the broker. - * @param request - developer provided SilentFlowRequest - * @returns - */ - async acquireTokenSilent(request) { - const correlationId = request.correlationId || this.cryptoProvider.createNewGuid(); - this.logger.trace("acquireTokenSilent called", correlationId); - if (this.nativeBrokerPlugin) { - const brokerRequest = { - ...request, - clientId: this.config.auth.clientId, - scopes: request.scopes || OIDC_DEFAULT_SCOPES, - redirectUri: `${Constants.HTTP_PROTOCOL}${Constants.LOCALHOST}`, - authority: request.authority || this.config.auth.authority, - correlationId: correlationId, - extraParameters: { - ...request.tokenQueryParameters, - [X_CLIENT_EXTRA_SKU]: this.skus, - }, - accountId: request.account.nativeAccountId, - forceRefresh: request.forceRefresh || false, - }; - return this.nativeBrokerPlugin.acquireTokenSilent(brokerRequest); - } - return super.acquireTokenSilent(request); - } - /** - * Removes cache artifacts associated with the given account - * @param request - developer provided SignOutRequest - * @returns - */ - async signOut(request) { - if (this.nativeBrokerPlugin && request.account.nativeAccountId) { - const signoutRequest = { - clientId: this.config.auth.clientId, - accountId: request.account.nativeAccountId, - correlationId: request.correlationId || - this.cryptoProvider.createNewGuid(), - }; - await this.nativeBrokerPlugin.signOut(signoutRequest); - } - await this.getTokenCache().removeAccount(request.account, request.correlationId); - } - /** - * Returns all cached accounts for this application. If brokering is enabled this request will be serviced by the broker. - * @returns - */ - async getAllAccounts() { - if (this.nativeBrokerPlugin) { - const correlationId = this.cryptoProvider.createNewGuid(); - return this.nativeBrokerPlugin.getAllAccounts(this.config.auth.clientId, correlationId); - } - return this.getTokenCache().getAllAccounts(); - } - /** - * Attempts to retrieve the redirectUri from the loopback server. If the loopback server does not start listening for requests within the timeout this will throw. - * @param loopbackClient - developer provided custom loopback server implementation - * @returns - */ - async waitForRedirectUri(loopbackClient) { - return new Promise((resolve, reject) => { - let ticks = 0; - const id = setInterval(() => { - if (LOOPBACK_SERVER_CONSTANTS.TIMEOUT_MS / - LOOPBACK_SERVER_CONSTANTS.INTERVAL_MS < - ticks) { - clearInterval(id); - reject(NodeAuthError.createLoopbackServerTimeoutError()); - return; - } - try { - const r = loopbackClient.getRedirectUri(); - clearInterval(id); - resolve(r); - return; - } - catch (e) { - if (e instanceof AuthError && - e.errorCode === - NodeAuthErrorMessage.noLoopbackServerExists.code) { - // Loopback server is not listening yet - ticks++; - return; - } - clearInterval(id); - reject(e); - return; - } - }, LOOPBACK_SERVER_CONSTANTS.INTERVAL_MS); - }); - } -} - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * OAuth2.0 client credential grant - * @public - */ -class ClientCredentialClient extends BaseClient { - constructor(configuration, appTokenProvider) { - super(configuration); - this.appTokenProvider = appTokenProvider; - } - /** - * Public API to acquire a token with ClientCredential Flow for Confidential clients - * @param request - CommonClientCredentialRequest provided by the developer - */ - async acquireToken(request) { - if (request.skipCache || request.claims) { - return this.executeTokenRequest(request, this.authority); - } - const [cachedAuthenticationResult, lastCacheOutcome] = await this.getCachedAuthenticationResult(request, this.config, this.cryptoUtils, this.authority, this.cacheManager, this.serverTelemetryManager); - if (cachedAuthenticationResult) { - // if the token is not expired but must be refreshed; get a new one in the background - if (lastCacheOutcome === CacheOutcome.PROACTIVELY_REFRESHED) { - this.logger.info("ClientCredentialClient:getCachedAuthenticationResult - Cached access token's refreshOn property has been exceeded'. It's not expired, but must be refreshed."); - // refresh the access token in the background - const refreshAccessToken = true; - await this.executeTokenRequest(request, this.authority, refreshAccessToken); - } - // return the cached token - return cachedAuthenticationResult; - } - else { - return this.executeTokenRequest(request, this.authority); - } - } - /** - * looks up cache if the tokens are cached already - */ - async getCachedAuthenticationResult(request, config, cryptoUtils, authority, cacheManager, serverTelemetryManager) { - const clientConfiguration = config; - const managedIdentityConfiguration = config; - let lastCacheOutcome = CacheOutcome.NOT_APPLICABLE; - // read the user-supplied cache into memory, if applicable - let cacheContext; - if (clientConfiguration.serializableCache && - clientConfiguration.persistencePlugin) { - cacheContext = new TokenCacheContext(clientConfiguration.serializableCache, false); - await clientConfiguration.persistencePlugin.beforeCacheAccess(cacheContext); - } - const cachedAccessToken = this.readAccessTokenFromCache(authority, managedIdentityConfiguration.managedIdentityId?.id || - clientConfiguration.authOptions.clientId, new ScopeSet(request.scopes || []), cacheManager, request.correlationId); - if (clientConfiguration.serializableCache && - clientConfiguration.persistencePlugin && - cacheContext) { - await clientConfiguration.persistencePlugin.afterCacheAccess(cacheContext); - } - // must refresh due to non-existent access_token - if (!cachedAccessToken) { - serverTelemetryManager?.setCacheOutcome(CacheOutcome.NO_CACHED_ACCESS_TOKEN); - return [null, CacheOutcome.NO_CACHED_ACCESS_TOKEN]; - } - // must refresh due to the expires_in value - if (isTokenExpired(cachedAccessToken.expiresOn, clientConfiguration.systemOptions?.tokenRenewalOffsetSeconds || - DEFAULT_TOKEN_RENEWAL_OFFSET_SEC)) { - serverTelemetryManager?.setCacheOutcome(CacheOutcome.CACHED_ACCESS_TOKEN_EXPIRED); - return [null, CacheOutcome.CACHED_ACCESS_TOKEN_EXPIRED]; - } - // must refresh (in the background) due to the refresh_in value - if (cachedAccessToken.refreshOn && - isTokenExpired(cachedAccessToken.refreshOn.toString(), 0)) { - lastCacheOutcome = CacheOutcome.PROACTIVELY_REFRESHED; - serverTelemetryManager?.setCacheOutcome(CacheOutcome.PROACTIVELY_REFRESHED); - } - return [ - await ResponseHandler.generateAuthenticationResult(cryptoUtils, authority, { - account: null, - idToken: null, - accessToken: cachedAccessToken, - refreshToken: null, - appMetadata: null, - }, true, request), - lastCacheOutcome, - ]; - } - /** - * Reads access token from the cache - */ - readAccessTokenFromCache(authority, id, scopeSet, cacheManager, correlationId) { - const accessTokenFilter = { - homeAccountId: Constants$1.EMPTY_STRING, - environment: authority.canonicalAuthorityUrlComponents.HostNameAndPort, - credentialType: CredentialType.ACCESS_TOKEN, - clientId: id, - realm: authority.tenant, - target: ScopeSet.createSearchScopes(scopeSet.asArray()), - }; - const accessTokens = cacheManager.getAccessTokensByFilter(accessTokenFilter, correlationId); - if (accessTokens.length < 1) { - return null; - } - else if (accessTokens.length > 1) { - throw createClientAuthError(multipleMatchingTokens); - } - return accessTokens[0]; - } - /** - * Makes a network call to request the token from the service - * @param request - CommonClientCredentialRequest provided by the developer - * @param authority - authority object - */ - async executeTokenRequest(request, authority, refreshAccessToken) { - let serverTokenResponse; - let reqTimestamp; - if (this.appTokenProvider) { - this.logger.info("Using appTokenProvider extensibility."); - const appTokenPropviderParameters = { - correlationId: request.correlationId, - tenantId: this.config.authOptions.authority.tenant, - scopes: request.scopes, - claims: request.claims, - }; - reqTimestamp = nowSeconds(); - const appTokenProviderResult = await this.appTokenProvider(appTokenPropviderParameters); - serverTokenResponse = { - access_token: appTokenProviderResult.accessToken, - expires_in: appTokenProviderResult.expiresInSeconds, - refresh_in: appTokenProviderResult.refreshInSeconds, - token_type: AuthenticationScheme.BEARER, - }; - } - else { - const queryParametersString = this.createTokenQueryParameters(request); - const endpoint = UrlString.appendQueryString(authority.tokenEndpoint, queryParametersString); - const requestBody = await this.createTokenRequestBody(request); - const headers = this.createTokenRequestHeaders(); - const thumbprint = { - clientId: this.config.authOptions.clientId, - authority: request.authority, - scopes: request.scopes, - claims: request.claims, - authenticationScheme: request.authenticationScheme, - resourceRequestMethod: request.resourceRequestMethod, - resourceRequestUri: request.resourceRequestUri, - shrClaims: request.shrClaims, - sshKid: request.sshKid, - }; - this.logger.info("Sending token request to endpoint: " + authority.tokenEndpoint); - reqTimestamp = nowSeconds(); - const response = await this.executePostToTokenEndpoint(endpoint, requestBody, headers, thumbprint, request.correlationId); - serverTokenResponse = response.body; - serverTokenResponse.status = response.status; - } - const responseHandler = new ResponseHandler(this.config.authOptions.clientId, this.cacheManager, this.cryptoUtils, this.logger, this.config.serializableCache, this.config.persistencePlugin); - responseHandler.validateTokenResponse(serverTokenResponse, refreshAccessToken); - const tokenResponse = await responseHandler.handleServerTokenResponse(serverTokenResponse, this.authority, reqTimestamp, request); - return tokenResponse; - } - /** - * generate the request to the server in the acceptable format - * @param request - CommonClientCredentialRequest provided by the developer - */ - async createTokenRequestBody(request) { - const parameterBuilder = new RequestParameterBuilder(); - parameterBuilder.addClientId(this.config.authOptions.clientId); - parameterBuilder.addScopes(request.scopes, false); - parameterBuilder.addGrantType(GrantType.CLIENT_CREDENTIALS_GRANT); - parameterBuilder.addLibraryInfo(this.config.libraryInfo); - parameterBuilder.addApplicationTelemetry(this.config.telemetry.application); - parameterBuilder.addThrottling(); - if (this.serverTelemetryManager) { - parameterBuilder.addServerTelemetry(this.serverTelemetryManager); - } - const correlationId = request.correlationId || - this.config.cryptoInterface.createNewGuid(); - parameterBuilder.addCorrelationId(correlationId); - if (this.config.clientCredentials.clientSecret) { - parameterBuilder.addClientSecret(this.config.clientCredentials.clientSecret); - } - // Use clientAssertion from request, fallback to client assertion in base configuration - const clientAssertion = request.clientAssertion || - this.config.clientCredentials.clientAssertion; - if (clientAssertion) { - parameterBuilder.addClientAssertion(await getClientAssertion(clientAssertion.assertion, this.config.authOptions.clientId, request.resourceRequestUri)); - parameterBuilder.addClientAssertionType(clientAssertion.assertionType); - } - if (!StringUtils.isEmptyObj(request.claims) || - (this.config.authOptions.clientCapabilities && - this.config.authOptions.clientCapabilities.length > 0)) { - parameterBuilder.addClaims(request.claims, this.config.authOptions.clientCapabilities); - } - return parameterBuilder.createQueryString(); - } -} - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * On-Behalf-Of client - * @public - */ -class OnBehalfOfClient extends BaseClient { - constructor(configuration) { - super(configuration); - } - /** - * Public API to acquire tokens with on behalf of flow - * @param request - developer provided CommonOnBehalfOfRequest - */ - async acquireToken(request) { - this.scopeSet = new ScopeSet(request.scopes || []); - // generate the user_assertion_hash for OBOAssertion - this.userAssertionHash = await this.cryptoUtils.hashString(request.oboAssertion); - if (request.skipCache || request.claims) { - return this.executeTokenRequest(request, this.authority, this.userAssertionHash); - } - try { - return await this.getCachedAuthenticationResult(request); - } - catch (e) { - // Any failure falls back to interactive request, once we implement distributed cache, we plan to handle `createRefreshRequiredError` to refresh using the RT - return await this.executeTokenRequest(request, this.authority, this.userAssertionHash); - } - } - /** - * look up cache for tokens - * Find idtoken in the cache - * Find accessToken based on user assertion and account info in the cache - * Please note we are not yet supported OBO tokens refreshed with long lived RT. User will have to send a new assertion if the current access token expires - * This is to prevent security issues when the assertion changes over time, however, longlived RT helps retaining the session - * @param request - developer provided CommonOnBehalfOfRequest - */ - async getCachedAuthenticationResult(request) { - // look in the cache for the access_token which matches the incoming_assertion - const cachedAccessToken = this.readAccessTokenFromCacheForOBO(this.config.authOptions.clientId, request); - if (!cachedAccessToken) { - // Must refresh due to non-existent access_token. - this.serverTelemetryManager?.setCacheOutcome(CacheOutcome.NO_CACHED_ACCESS_TOKEN); - this.logger.info("SilentFlowClient:acquireCachedToken - No access token found in cache for the given properties."); - throw createClientAuthError(tokenRefreshRequired); - } - else if (isTokenExpired(cachedAccessToken.expiresOn, this.config.systemOptions.tokenRenewalOffsetSeconds)) { - // Access token expired, will need to renewed - this.serverTelemetryManager?.setCacheOutcome(CacheOutcome.CACHED_ACCESS_TOKEN_EXPIRED); - this.logger.info(`OnbehalfofFlow:getCachedAuthenticationResult - Cached access token is expired or will expire within ${this.config.systemOptions.tokenRenewalOffsetSeconds} seconds.`); - throw createClientAuthError(tokenRefreshRequired); - } - // fetch the idToken from cache - const cachedIdToken = this.readIdTokenFromCacheForOBO(cachedAccessToken.homeAccountId, request.correlationId); - let idTokenClaims; - let cachedAccount = null; - if (cachedIdToken) { - idTokenClaims = extractTokenClaims(cachedIdToken.secret, EncodingUtils.base64Decode); - const localAccountId = idTokenClaims.oid || idTokenClaims.sub; - const accountInfo = { - homeAccountId: cachedIdToken.homeAccountId, - environment: cachedIdToken.environment, - tenantId: cachedIdToken.realm, - username: Constants$1.EMPTY_STRING, - localAccountId: localAccountId || Constants$1.EMPTY_STRING, - }; - cachedAccount = this.cacheManager.readAccountFromCache(accountInfo, request.correlationId); - } - // increment telemetry cache hit counter - if (this.config.serverTelemetryManager) { - this.config.serverTelemetryManager.incrementCacheHits(); - } - return ResponseHandler.generateAuthenticationResult(this.cryptoUtils, this.authority, { - account: cachedAccount, - accessToken: cachedAccessToken, - idToken: cachedIdToken, - refreshToken: null, - appMetadata: null, - }, true, request, idTokenClaims); - } - /** - * read idtoken from cache, this is a specific implementation for OBO as the requirements differ from a generic lookup in the cacheManager - * Certain use cases of OBO flow do not expect an idToken in the cache/or from the service - * @param atHomeAccountId - account id - */ - readIdTokenFromCacheForOBO(atHomeAccountId, correlationId) { - const idTokenFilter = { - homeAccountId: atHomeAccountId, - environment: this.authority.canonicalAuthorityUrlComponents.HostNameAndPort, - credentialType: CredentialType.ID_TOKEN, - clientId: this.config.authOptions.clientId, - realm: this.authority.tenant, - }; - const idTokenMap = this.cacheManager.getIdTokensByFilter(idTokenFilter, correlationId); - // When acquiring a token on behalf of an application, there might not be an id token in the cache - if (Object.values(idTokenMap).length < 1) { - return null; - } - return Object.values(idTokenMap)[0]; - } - /** - * Fetches the cached access token based on incoming assertion - * @param clientId - client id - * @param request - developer provided CommonOnBehalfOfRequest - */ - readAccessTokenFromCacheForOBO(clientId, request) { - const authScheme = request.authenticationScheme || AuthenticationScheme.BEARER; - /* - * Distinguish between Bearer and PoP/SSH token cache types - * Cast to lowercase to handle "bearer" from ADFS - */ - const credentialType = authScheme.toLowerCase() !== - AuthenticationScheme.BEARER.toLowerCase() - ? CredentialType.ACCESS_TOKEN_WITH_AUTH_SCHEME - : CredentialType.ACCESS_TOKEN; - const accessTokenFilter = { - credentialType: credentialType, - clientId, - target: ScopeSet.createSearchScopes(this.scopeSet.asArray()), - tokenType: authScheme, - keyId: request.sshKid, - requestedClaimsHash: request.requestedClaimsHash, - userAssertionHash: this.userAssertionHash, - }; - const accessTokens = this.cacheManager.getAccessTokensByFilter(accessTokenFilter, request.correlationId); - const numAccessTokens = accessTokens.length; - if (numAccessTokens < 1) { - return null; - } - else if (numAccessTokens > 1) { - throw createClientAuthError(multipleMatchingTokens); - } - return accessTokens[0]; - } - /** - * Make a network call to the server requesting credentials - * @param request - developer provided CommonOnBehalfOfRequest - * @param authority - authority object - */ - async executeTokenRequest(request, authority, userAssertionHash) { - const queryParametersString = this.createTokenQueryParameters(request); - const endpoint = UrlString.appendQueryString(authority.tokenEndpoint, queryParametersString); - const requestBody = await this.createTokenRequestBody(request); - const headers = this.createTokenRequestHeaders(); - const thumbprint = { - clientId: this.config.authOptions.clientId, - authority: request.authority, - scopes: request.scopes, - claims: request.claims, - authenticationScheme: request.authenticationScheme, - resourceRequestMethod: request.resourceRequestMethod, - resourceRequestUri: request.resourceRequestUri, - shrClaims: request.shrClaims, - sshKid: request.sshKid, - }; - const reqTimestamp = nowSeconds(); - const response = await this.executePostToTokenEndpoint(endpoint, requestBody, headers, thumbprint, request.correlationId); - const responseHandler = new ResponseHandler(this.config.authOptions.clientId, this.cacheManager, this.cryptoUtils, this.logger, this.config.serializableCache, this.config.persistencePlugin); - responseHandler.validateTokenResponse(response.body); - const tokenResponse = await responseHandler.handleServerTokenResponse(response.body, this.authority, reqTimestamp, request, undefined, userAssertionHash); - return tokenResponse; - } - /** - * generate a server request in accepable format - * @param request - developer provided CommonOnBehalfOfRequest - */ - async createTokenRequestBody(request) { - const parameterBuilder = new RequestParameterBuilder(); - parameterBuilder.addClientId(this.config.authOptions.clientId); - parameterBuilder.addScopes(request.scopes); - parameterBuilder.addGrantType(GrantType.JWT_BEARER); - parameterBuilder.addClientInfo(); - parameterBuilder.addLibraryInfo(this.config.libraryInfo); - parameterBuilder.addApplicationTelemetry(this.config.telemetry.application); - parameterBuilder.addThrottling(); - if (this.serverTelemetryManager) { - parameterBuilder.addServerTelemetry(this.serverTelemetryManager); - } - const correlationId = request.correlationId || - this.config.cryptoInterface.createNewGuid(); - parameterBuilder.addCorrelationId(correlationId); - parameterBuilder.addRequestTokenUse(ON_BEHALF_OF); - parameterBuilder.addOboAssertion(request.oboAssertion); - if (this.config.clientCredentials.clientSecret) { - parameterBuilder.addClientSecret(this.config.clientCredentials.clientSecret); - } - const clientAssertion = this.config.clientCredentials.clientAssertion; - if (clientAssertion) { - parameterBuilder.addClientAssertion(await getClientAssertion(clientAssertion.assertion, this.config.authOptions.clientId, request.resourceRequestUri)); - parameterBuilder.addClientAssertionType(clientAssertion.assertionType); - } - if (request.claims || - (this.config.authOptions.clientCapabilities && - this.config.authOptions.clientCapabilities.length > 0)) { - parameterBuilder.addClaims(request.claims, this.config.authOptions.clientCapabilities); - } - return parameterBuilder.createQueryString(); - } -} - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -// AADAuthorityConstants -/** - * This class is to be used to acquire tokens for confidential client applications (webApp, webAPI). Confidential client applications - * will configure application secrets, client certificates/assertions as applicable - * @public - */ -class ConfidentialClientApplication extends ClientApplication { - /** - * Constructor for the ConfidentialClientApplication - * - * Required attributes in the Configuration object are: - * - clientID: the application ID of your application. You can obtain one by registering your application with our application registration portal - * - authority: the authority URL for your application. - * - client credential: Must set either client secret, certificate, or assertion for confidential clients. You can obtain a client secret from the application registration portal. - * - * In Azure AD, authority is a URL indicating of the form https://login.microsoftonline.com/\{Enter_the_Tenant_Info_Here\}. - * If your application supports Accounts in one organizational directory, replace "Enter_the_Tenant_Info_Here" value with the Tenant Id or Tenant name (for example, contoso.microsoft.com). - * If your application supports Accounts in any organizational directory, replace "Enter_the_Tenant_Info_Here" value with organizations. - * If your application supports Accounts in any organizational directory and personal Microsoft accounts, replace "Enter_the_Tenant_Info_Here" value with common. - * To restrict support to Personal Microsoft accounts only, replace "Enter_the_Tenant_Info_Here" value with consumers. - * - * In Azure B2C, authority is of the form https://\{instance\}/tfp/\{tenant\}/\{policyName\}/ - * Full B2C functionality will be available in this library in future versions. - * - * @param Configuration - configuration object for the MSAL ConfidentialClientApplication instance - */ - constructor(configuration) { - super(configuration); - this.setClientCredential(); - this.appTokenProvider = undefined; - } - /** - * This extensibility point only works for the client_credential flow, i.e. acquireTokenByClientCredential and - * is meant for Azure SDK to enhance Managed Identity support. - * - * @param IAppTokenProvider - Extensibility interface, which allows the app developer to return a token from a custom source. - */ - SetAppTokenProvider(provider) { - this.appTokenProvider = provider; - } - /** - * Acquires tokens from the authority for the application (not for an end user). - */ - async acquireTokenByClientCredential(request) { - this.logger.info("acquireTokenByClientCredential called", request.correlationId); - // If there is a client assertion present in the request, it overrides the one present in the client configuration - let clientAssertion; - if (request.clientAssertion) { - clientAssertion = { - assertion: await getClientAssertion(request.clientAssertion, this.config.auth.clientId - // tokenEndpoint will be undefined. resourceRequestUri is omitted in ClientCredentialRequest - ), - assertionType: Constants.JWT_BEARER_ASSERTION_TYPE, - }; - } - const baseRequest = await this.initializeBaseRequest(request); - // valid base request should not contain oidc scopes in this grant type - const validBaseRequest = { - ...baseRequest, - scopes: baseRequest.scopes.filter((scope) => !OIDC_DEFAULT_SCOPES.includes(scope)), - }; - const validRequest = { - ...request, - ...validBaseRequest, - clientAssertion, - }; - /* - * valid request should not have "common" or "organizations" in lieu of the tenant_id in the authority in the auth configuration - * example authority: "https://login.microsoftonline.com/TenantId", - */ - const authority = new UrlString(validRequest.authority); - const tenantId = authority.getUrlComponents().PathSegments[0]; - if (Object.values(AADAuthorityConstants).includes(tenantId)) { - throw createClientAuthError(missingTenantIdError); - } - /* - * if this env variable is set, and the developer provided region isn't defined and isn't "DisableMsalForceRegion", - * MSAL shall opt-in to ESTS-R with the value of this variable - */ - const ENV_MSAL_FORCE_REGION = process.env[MSAL_FORCE_REGION]; - let region; - if (validRequest.azureRegion !== "DisableMsalForceRegion") { - if (!validRequest.azureRegion && ENV_MSAL_FORCE_REGION) { - region = ENV_MSAL_FORCE_REGION; - } - else { - region = validRequest.azureRegion; - } - } - const azureRegionConfiguration = { - azureRegion: region, - environmentRegion: process.env[REGION_ENVIRONMENT_VARIABLE], - }; - const serverTelemetryManager = this.initializeServerTelemetryManager(ApiId.acquireTokenByClientCredential, validRequest.correlationId, validRequest.skipCache); - try { - const clientCredentialConfig = await this.buildOauthClientConfiguration(validRequest.authority, validRequest.correlationId, "", serverTelemetryManager, azureRegionConfiguration, request.azureCloudOptions); - const clientCredentialClient = new ClientCredentialClient(clientCredentialConfig, this.appTokenProvider); - this.logger.verbose("Client credential client created", validRequest.correlationId); - return await clientCredentialClient.acquireToken(validRequest); - } - catch (e) { - if (e instanceof AuthError) { - e.setCorrelationId(validRequest.correlationId); - } - serverTelemetryManager.cacheFailedRequest(e); - throw e; - } - } - /** - * Acquires tokens from the authority for the application. - * - * Used in scenarios where the current app is a middle-tier service which was called with a token - * representing an end user. The current app can use the token (oboAssertion) to request another - * token to access downstream web API, on behalf of that user. - * - * The current middle-tier app has no user interaction to obtain consent. - * See how to gain consent upfront for your middle-tier app from this article. - * https://docs.microsoft.com/en-us/azure/active-directory/develop/v2-oauth2-on-behalf-of-flow#gaining-consent-for-the-middle-tier-application - */ - async acquireTokenOnBehalfOf(request) { - this.logger.info("acquireTokenOnBehalfOf called", request.correlationId); - const validRequest = { - ...request, - ...(await this.initializeBaseRequest(request)), - }; - try { - const onBehalfOfConfig = await this.buildOauthClientConfiguration(validRequest.authority, validRequest.correlationId, "", undefined, undefined, request.azureCloudOptions); - const oboClient = new OnBehalfOfClient(onBehalfOfConfig); - this.logger.verbose("On behalf of client created", validRequest.correlationId); - return await oboClient.acquireToken(validRequest); - } - catch (e) { - if (e instanceof AuthError) { - e.setCorrelationId(validRequest.correlationId); - } - throw e; - } - } - setClientCredential() { - const clientSecretNotEmpty = !!this.config.auth.clientSecret; - const clientAssertionNotEmpty = !!this.config.auth.clientAssertion; - const certificateNotEmpty = (!!this.config.auth.clientCertificate?.thumbprint || - !!this.config.auth.clientCertificate?.thumbprintSha256) && - !!this.config.auth.clientCertificate?.privateKey; - /* - * If app developer configures this callback, they don't need a credential - * i.e. AzureSDK can get token from Managed Identity without a cert / secret - */ - if (this.appTokenProvider) { - return; - } - // Check that at most one credential is set on the application - if ((clientSecretNotEmpty && clientAssertionNotEmpty) || - (clientAssertionNotEmpty && certificateNotEmpty) || - (clientSecretNotEmpty && certificateNotEmpty)) { - throw createClientAuthError(invalidClientCredential); - } - if (this.config.auth.clientSecret) { - this.clientSecret = this.config.auth.clientSecret; - return; - } - if (this.config.auth.clientAssertion) { - this.developerProvidedClientAssertion = - this.config.auth.clientAssertion; - return; - } - if (!certificateNotEmpty) { - throw createClientAuthError(invalidClientCredential); - } - else { - this.clientAssertion = !!this.config.auth.clientCertificate - .thumbprintSha256 - ? ClientAssertion.fromCertificateWithSha256Thumbprint(this.config.auth.clientCertificate.thumbprintSha256, this.config.auth.clientCertificate.privateKey, this.config.auth.clientCertificate.x5c) - : ClientAssertion.fromCertificate( - // guaranteed to be a string, due to prior error checking in this function - this.config.auth.clientCertificate.thumbprint, this.config.auth.clientCertificate.privateKey, this.config.auth.clientCertificate.x5c); - } - } -} - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * Managed Identity User Assigned Id Query Parameter Names - */ -const ManagedIdentityUserAssignedIdQueryParameterNames = { - MANAGED_IDENTITY_CLIENT_ID: "client_id", - MANAGED_IDENTITY_OBJECT_ID: "object_id", - MANAGED_IDENTITY_RESOURCE_ID: "mi_res_id", -}; -class BaseManagedIdentitySource { - constructor(logger, nodeStorage, networkClient, cryptoProvider) { - this.logger = logger; - this.nodeStorage = nodeStorage; - this.networkClient = networkClient; - this.cryptoProvider = cryptoProvider; - } - async getServerTokenResponseAsync(response, - // eslint-disable-next-line @typescript-eslint/no-unused-vars - _networkClient, - // eslint-disable-next-line @typescript-eslint/no-unused-vars - _networkRequest, - // eslint-disable-next-line @typescript-eslint/no-unused-vars - _networkRequestOptions) { - return this.getServerTokenResponse(response); - } - getServerTokenResponse(response) { - let refreshIn, expiresIn; - if (response.body.expires_on) { - expiresIn = response.body.expires_on - nowSeconds(); - // compute refresh_in as 1/2 of expires_in, but only if expires_in > 2h - if (expiresIn > 2 * 3600) { - refreshIn = expiresIn / 2; - } - } - const serverTokenResponse = { - status: response.status, - // success - access_token: response.body.access_token, - expires_in: expiresIn, - scope: response.body.resource, - token_type: response.body.token_type, - refresh_in: refreshIn, - // error - correlation_id: response.body.correlation_id || response.body.correlationId, - error: typeof response.body.error === "string" - ? response.body.error - : response.body.error?.code, - error_description: response.body.message || - (typeof response.body.error === "string" - ? response.body.error_description - : response.body.error?.message), - error_codes: response.body.error_codes, - timestamp: response.body.timestamp, - trace_id: response.body.trace_id, - }; - return serverTokenResponse; - } - async acquireTokenWithManagedIdentity(managedIdentityRequest, managedIdentityId, fakeAuthority, refreshAccessToken) { - const networkRequest = this.createRequest(managedIdentityRequest.resource, managedIdentityId); - const headers = networkRequest.headers; - headers[HeaderNames.CONTENT_TYPE] = Constants$1.URL_FORM_CONTENT_TYPE; - const networkRequestOptions = { headers }; - if (Object.keys(networkRequest.bodyParameters).length) { - networkRequestOptions.body = - networkRequest.computeParametersBodyString(); - } - const reqTimestamp = nowSeconds(); - let response; - try { - // Sources that send POST requests: Cloud Shell - if (networkRequest.httpMethod === HttpMethod.POST) { - response = - await this.networkClient.sendPostRequestAsync(networkRequest.computeUri(), networkRequestOptions); - // Sources that send GET requests: App Service, Azure Arc, IMDS, Service Fabric - } - else { - response = - await this.networkClient.sendGetRequestAsync(networkRequest.computeUri(), networkRequestOptions); - } - } - catch (error) { - if (error instanceof AuthError) { - throw error; - } - else { - throw createClientAuthError(networkError); - } - } - const responseHandler = new ResponseHandler(managedIdentityId.id, this.nodeStorage, this.cryptoProvider, this.logger, null, null); - const serverTokenResponse = await this.getServerTokenResponseAsync(response, this.networkClient, networkRequest, networkRequestOptions); - responseHandler.validateTokenResponse(serverTokenResponse, refreshAccessToken); - // caches the token - return responseHandler.handleServerTokenResponse(serverTokenResponse, fakeAuthority, reqTimestamp, managedIdentityRequest); - } - getManagedIdentityUserAssignedIdQueryParameterKey(managedIdentityIdType) { - switch (managedIdentityIdType) { - case ManagedIdentityIdType.USER_ASSIGNED_CLIENT_ID: - this.logger.info("[Managed Identity] Adding user assigned client id to the request."); - return ManagedIdentityUserAssignedIdQueryParameterNames.MANAGED_IDENTITY_CLIENT_ID; - case ManagedIdentityIdType.USER_ASSIGNED_RESOURCE_ID: - this.logger.info("[Managed Identity] Adding user assigned resource id to the request."); - return ManagedIdentityUserAssignedIdQueryParameterNames.MANAGED_IDENTITY_RESOURCE_ID; - case ManagedIdentityIdType.USER_ASSIGNED_OBJECT_ID: - this.logger.info("[Managed Identity] Adding user assigned object id to the request."); - return ManagedIdentityUserAssignedIdQueryParameterNames.MANAGED_IDENTITY_OBJECT_ID; - default: - throw createManagedIdentityError(invalidManagedIdentityIdType); - } - } -} -BaseManagedIdentitySource.getValidatedEnvVariableUrlString = (envVariableStringName, envVariable, sourceName, logger) => { - try { - return new UrlString(envVariable).urlString; - } - catch (error) { - logger.info(`[Managed Identity] ${sourceName} managed identity is unavailable because the '${envVariableStringName}' environment variable is malformed.`); - throw createManagedIdentityError(MsiEnvironmentVariableUrlMalformedErrorCodes[envVariableStringName]); - } -}; - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -class ManagedIdentityRequestParameters { - constructor(httpMethod, endpoint) { - this.httpMethod = httpMethod; - this._baseEndpoint = endpoint; - this.headers = {}; - this.bodyParameters = {}; - this.queryParameters = {}; - } - computeUri() { - const parameterBuilder = new RequestParameterBuilder(); - if (this.queryParameters) { - parameterBuilder.addExtraQueryParameters(this.queryParameters); - } - const queryParametersString = parameterBuilder.createQueryString(); - return UrlString.appendQueryString(this._baseEndpoint, queryParametersString); - } - computeParametersBodyString() { - const parameterBuilder = new RequestParameterBuilder(); - if (this.bodyParameters) { - parameterBuilder.addExtraQueryParameters(this.bodyParameters); - } - return parameterBuilder.createQueryString(); - } -} - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -// MSI Constants. Docs for MSI are available here https://docs.microsoft.com/azure/app-service/overview-managed-identity -const APP_SERVICE_MSI_API_VERSION = "2019-08-01"; -/** - * Original source of code: https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/identity/Azure.Identity/src/AppServiceManagedIdentitySource.cs - */ -class AppService extends BaseManagedIdentitySource { - constructor(logger, nodeStorage, networkClient, cryptoProvider, identityEndpoint, identityHeader) { - super(logger, nodeStorage, networkClient, cryptoProvider); - this.identityEndpoint = identityEndpoint; - this.identityHeader = identityHeader; - } - static getEnvironmentVariables() { - const identityEndpoint = process.env[ManagedIdentityEnvironmentVariableNames.IDENTITY_ENDPOINT]; - const identityHeader = process.env[ManagedIdentityEnvironmentVariableNames.IDENTITY_HEADER]; - return [identityEndpoint, identityHeader]; - } - static tryCreate(logger, nodeStorage, networkClient, cryptoProvider) { - const [identityEndpoint, identityHeader] = AppService.getEnvironmentVariables(); - // if either of the identity endpoint or identity header variables are undefined, this MSI provider is unavailable. - if (!identityEndpoint || !identityHeader) { - logger.info(`[Managed Identity] ${ManagedIdentitySourceNames.APP_SERVICE} managed identity is unavailable because one or both of the '${ManagedIdentityEnvironmentVariableNames.IDENTITY_HEADER}' and '${ManagedIdentityEnvironmentVariableNames.IDENTITY_ENDPOINT}' environment variables are not defined.`); - return null; - } - const validatedIdentityEndpoint = AppService.getValidatedEnvVariableUrlString(ManagedIdentityEnvironmentVariableNames.IDENTITY_ENDPOINT, identityEndpoint, ManagedIdentitySourceNames.APP_SERVICE, logger); - logger.info(`[Managed Identity] Environment variables validation passed for ${ManagedIdentitySourceNames.APP_SERVICE} managed identity. Endpoint URI: ${validatedIdentityEndpoint}. Creating ${ManagedIdentitySourceNames.APP_SERVICE} managed identity.`); - return new AppService(logger, nodeStorage, networkClient, cryptoProvider, identityEndpoint, identityHeader); - } - createRequest(resource, managedIdentityId) { - const request = new ManagedIdentityRequestParameters(HttpMethod.GET, this.identityEndpoint); - request.headers[APP_SERVICE_SECRET_HEADER_NAME] = this.identityHeader; - request.queryParameters[API_VERSION_QUERY_PARAMETER_NAME] = - APP_SERVICE_MSI_API_VERSION; - request.queryParameters[RESOURCE_BODY_OR_QUERY_PARAMETER_NAME] = - resource; - if (managedIdentityId.idType !== ManagedIdentityIdType.SYSTEM_ASSIGNED) { - request.queryParameters[this.getManagedIdentityUserAssignedIdQueryParameterKey(managedIdentityId.idType)] = managedIdentityId.id; - } - // bodyParameters calculated in BaseManagedIdentity.acquireTokenWithManagedIdentity - return request; - } -} - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -const ARC_API_VERSION = "2019-11-01"; -const DEFAULT_AZURE_ARC_IDENTITY_ENDPOINT = "http://127.0.0.1:40342/metadata/identity/oauth2/token"; -const HIMDS_EXECUTABLE_HELPER_STRING = "N/A: himds executable exists"; -const SUPPORTED_AZURE_ARC_PLATFORMS = { - win32: `${process.env["ProgramData"]}\\AzureConnectedMachineAgent\\Tokens\\`, - linux: "/var/opt/azcmagent/tokens/", -}; -const AZURE_ARC_FILE_DETECTION = { - win32: `${process.env["ProgramFiles"]}\\AzureConnectedMachineAgent\\himds.exe`, - linux: "/opt/azcmagent/bin/himds", -}; -/** - * Original source of code: https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/identity/Azure.Identity/src/AzureArcManagedIdentitySource.cs - */ -class AzureArc extends BaseManagedIdentitySource { - constructor(logger, nodeStorage, networkClient, cryptoProvider, identityEndpoint) { - super(logger, nodeStorage, networkClient, cryptoProvider); - this.identityEndpoint = identityEndpoint; - } - static getEnvironmentVariables() { - let identityEndpoint = process.env[ManagedIdentityEnvironmentVariableNames.IDENTITY_ENDPOINT]; - let imdsEndpoint = process.env[ManagedIdentityEnvironmentVariableNames.IMDS_ENDPOINT]; - // if either of the identity or imds endpoints are undefined, check if the himds executable exists - if (!identityEndpoint || !imdsEndpoint) { - // get the expected Windows or Linux file path of the himds executable - const fileDetectionPath = AZURE_ARC_FILE_DETECTION[process.platform]; - try { - /* - * check if the himds executable exists and its permissions allow it to be read - * returns undefined if true, throws an error otherwise - */ - fs.accessSync(fileDetectionPath, fs.constants.F_OK | fs.constants.R_OK); - identityEndpoint = DEFAULT_AZURE_ARC_IDENTITY_ENDPOINT; - imdsEndpoint = HIMDS_EXECUTABLE_HELPER_STRING; - } - catch (err) { - /* - * do nothing - * accessSync returns undefined on success, and throws an error on failure - */ - } - } - return [identityEndpoint, imdsEndpoint]; - } - static tryCreate(logger, nodeStorage, networkClient, cryptoProvider, managedIdentityId) { - const [identityEndpoint, imdsEndpoint] = AzureArc.getEnvironmentVariables(); - // if either of the identity or imds endpoints are undefined (even after himds file detection) - if (!identityEndpoint || !imdsEndpoint) { - logger.info(`[Managed Identity] ${ManagedIdentitySourceNames.AZURE_ARC} managed identity is unavailable through environment variables because one or both of '${ManagedIdentityEnvironmentVariableNames.IDENTITY_ENDPOINT}' and '${ManagedIdentityEnvironmentVariableNames.IMDS_ENDPOINT}' are not defined. ${ManagedIdentitySourceNames.AZURE_ARC} managed identity is also unavailable through file detection.`); - return null; - } - // check if the imds endpoint is set to the default for file detection - if (imdsEndpoint === HIMDS_EXECUTABLE_HELPER_STRING) { - logger.info(`[Managed Identity] ${ManagedIdentitySourceNames.AZURE_ARC} managed identity is available through file detection. Defaulting to known ${ManagedIdentitySourceNames.AZURE_ARC} endpoint: ${DEFAULT_AZURE_ARC_IDENTITY_ENDPOINT}. Creating ${ManagedIdentitySourceNames.AZURE_ARC} managed identity.`); - } - else { - // otherwise, both the identity and imds endpoints are defined without file detection; validate them - const validatedIdentityEndpoint = AzureArc.getValidatedEnvVariableUrlString(ManagedIdentityEnvironmentVariableNames.IDENTITY_ENDPOINT, identityEndpoint, ManagedIdentitySourceNames.AZURE_ARC, logger); - // remove trailing slash - validatedIdentityEndpoint.endsWith("/") - ? validatedIdentityEndpoint.slice(0, -1) - : validatedIdentityEndpoint; - AzureArc.getValidatedEnvVariableUrlString(ManagedIdentityEnvironmentVariableNames.IMDS_ENDPOINT, imdsEndpoint, ManagedIdentitySourceNames.AZURE_ARC, logger); - logger.info(`[Managed Identity] Environment variables validation passed for ${ManagedIdentitySourceNames.AZURE_ARC} managed identity. Endpoint URI: ${validatedIdentityEndpoint}. Creating ${ManagedIdentitySourceNames.AZURE_ARC} managed identity.`); - } - if (managedIdentityId.idType !== ManagedIdentityIdType.SYSTEM_ASSIGNED) { - throw createManagedIdentityError(unableToCreateAzureArc); - } - return new AzureArc(logger, nodeStorage, networkClient, cryptoProvider, identityEndpoint); - } - createRequest(resource) { - const request = new ManagedIdentityRequestParameters(HttpMethod.GET, this.identityEndpoint.replace("localhost", "127.0.0.1")); - request.headers[METADATA_HEADER_NAME] = "true"; - request.queryParameters[API_VERSION_QUERY_PARAMETER_NAME] = - ARC_API_VERSION; - request.queryParameters[RESOURCE_BODY_OR_QUERY_PARAMETER_NAME] = - resource; - // bodyParameters calculated in BaseManagedIdentity.acquireTokenWithManagedIdentity - return request; - } - async getServerTokenResponseAsync(originalResponse, networkClient, networkRequest, networkRequestOptions) { - let retryResponse; - if (originalResponse.status === HttpStatus.UNAUTHORIZED) { - const wwwAuthHeader = originalResponse.headers["www-authenticate"]; - if (!wwwAuthHeader) { - throw createManagedIdentityError(wwwAuthenticateHeaderMissing); - } - if (!wwwAuthHeader.includes("Basic realm=")) { - throw createManagedIdentityError(wwwAuthenticateHeaderUnsupportedFormat); - } - const secretFilePath = wwwAuthHeader.split("Basic realm=")[1]; - // throw an error if the managed identity application is not being run on Windows or Linux - if (!SUPPORTED_AZURE_ARC_PLATFORMS.hasOwnProperty(process.platform)) { - throw createManagedIdentityError(platformNotSupported); - } - // get the expected Windows or Linux file path - const expectedSecretFilePath = SUPPORTED_AZURE_ARC_PLATFORMS[process.platform]; - // throw an error if the file in the file path is not a .key file - const fileName = path.basename(secretFilePath); - if (!fileName.endsWith(".key")) { - throw createManagedIdentityError(invalidFileExtension); - } - /* - * throw an error if the file path from the www-authenticate header does not match the - * expected file path for the platform (Windows or Linux) the managed identity application - * is running on - */ - if (expectedSecretFilePath + fileName !== secretFilePath) { - throw createManagedIdentityError(invalidFilePath); - } - let secretFileSize; - // attempt to get the secret file's size, in bytes - try { - secretFileSize = await fs.statSync(secretFilePath).size; - } - catch (e) { - throw createManagedIdentityError(unableToReadSecretFile); - } - // throw an error if the secret file's size is greater than 4096 bytes - if (secretFileSize > AZURE_ARC_SECRET_FILE_MAX_SIZE_BYTES) { - throw createManagedIdentityError(invalidSecret); - } - // attempt to read the contents of the secret file - let secret; - try { - secret = fs.readFileSync(secretFilePath, "utf-8"); - } - catch (e) { - throw createManagedIdentityError(unableToReadSecretFile); - } - const authHeaderValue = `Basic ${secret}`; - this.logger.info(`[Managed Identity] Adding authorization header to the request.`); - networkRequest.headers[AUTHORIZATION_HEADER_NAME] = authHeaderValue; - try { - retryResponse = - await networkClient.sendGetRequestAsync(networkRequest.computeUri(), networkRequestOptions); - } - catch (error) { - if (error instanceof AuthError) { - throw error; - } - else { - throw createClientAuthError(networkError); - } - } - } - return this.getServerTokenResponse(retryResponse || originalResponse); - } -} - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * Original source of code: https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/identity/Azure.Identity/src/CloudShellManagedIdentitySource.cs - */ -class CloudShell extends BaseManagedIdentitySource { - constructor(logger, nodeStorage, networkClient, cryptoProvider, msiEndpoint) { - super(logger, nodeStorage, networkClient, cryptoProvider); - this.msiEndpoint = msiEndpoint; - } - static getEnvironmentVariables() { - const msiEndpoint = process.env[ManagedIdentityEnvironmentVariableNames.MSI_ENDPOINT]; - return [msiEndpoint]; - } - static tryCreate(logger, nodeStorage, networkClient, cryptoProvider, managedIdentityId) { - const [msiEndpoint] = CloudShell.getEnvironmentVariables(); - // if the msi endpoint environment variable is undefined, this MSI provider is unavailable. - if (!msiEndpoint) { - logger.info(`[Managed Identity] ${ManagedIdentitySourceNames.CLOUD_SHELL} managed identity is unavailable because the '${ManagedIdentityEnvironmentVariableNames.MSI_ENDPOINT} environment variable is not defined.`); - return null; - } - const validatedMsiEndpoint = CloudShell.getValidatedEnvVariableUrlString(ManagedIdentityEnvironmentVariableNames.MSI_ENDPOINT, msiEndpoint, ManagedIdentitySourceNames.CLOUD_SHELL, logger); - logger.info(`[Managed Identity] Environment variable validation passed for ${ManagedIdentitySourceNames.CLOUD_SHELL} managed identity. Endpoint URI: ${validatedMsiEndpoint}. Creating ${ManagedIdentitySourceNames.CLOUD_SHELL} managed identity.`); - if (managedIdentityId.idType !== ManagedIdentityIdType.SYSTEM_ASSIGNED) { - throw createManagedIdentityError(unableToCreateCloudShell); - } - return new CloudShell(logger, nodeStorage, networkClient, cryptoProvider, msiEndpoint); - } - createRequest(resource) { - const request = new ManagedIdentityRequestParameters(HttpMethod.POST, this.msiEndpoint); - request.headers[METADATA_HEADER_NAME] = "true"; - request.bodyParameters[RESOURCE_BODY_OR_QUERY_PARAMETER_NAME] = - resource; - return request; - } -} - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -// IMDS constants. Docs for IMDS are available here https://docs.microsoft.com/azure/active-directory/managed-identities-azure-resources/how-to-use-vm-token#get-a-token-using-http -const IMDS_TOKEN_PATH = "/metadata/identity/oauth2/token"; -const DEFAULT_IMDS_ENDPOINT = `http://169.254.169.254${IMDS_TOKEN_PATH}`; -const IMDS_API_VERSION = "2018-02-01"; -// Original source of code: https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/identity/Azure.Identity/src/ImdsManagedIdentitySource.cs -class Imds extends BaseManagedIdentitySource { - constructor(logger, nodeStorage, networkClient, cryptoProvider, identityEndpoint) { - super(logger, nodeStorage, networkClient, cryptoProvider); - this.identityEndpoint = identityEndpoint; - } - static tryCreate(logger, nodeStorage, networkClient, cryptoProvider) { - let validatedIdentityEndpoint; - if (process.env[ManagedIdentityEnvironmentVariableNames - .AZURE_POD_IDENTITY_AUTHORITY_HOST]) { - logger.info(`[Managed Identity] Environment variable ${ManagedIdentityEnvironmentVariableNames.AZURE_POD_IDENTITY_AUTHORITY_HOST} for ${ManagedIdentitySourceNames.IMDS} returned endpoint: ${process.env[ManagedIdentityEnvironmentVariableNames - .AZURE_POD_IDENTITY_AUTHORITY_HOST]}`); - validatedIdentityEndpoint = Imds.getValidatedEnvVariableUrlString(ManagedIdentityEnvironmentVariableNames.AZURE_POD_IDENTITY_AUTHORITY_HOST, `${process.env[ManagedIdentityEnvironmentVariableNames - .AZURE_POD_IDENTITY_AUTHORITY_HOST]}${IMDS_TOKEN_PATH}`, ManagedIdentitySourceNames.IMDS, logger); - } - else { - logger.info(`[Managed Identity] Unable to find ${ManagedIdentityEnvironmentVariableNames.AZURE_POD_IDENTITY_AUTHORITY_HOST} environment variable for ${ManagedIdentitySourceNames.IMDS}, using the default endpoint.`); - validatedIdentityEndpoint = DEFAULT_IMDS_ENDPOINT; - } - return new Imds(logger, nodeStorage, networkClient, cryptoProvider, validatedIdentityEndpoint); - } - createRequest(resource, managedIdentityId) { - const request = new ManagedIdentityRequestParameters(HttpMethod.GET, this.identityEndpoint); - request.headers[METADATA_HEADER_NAME] = "true"; - request.queryParameters[API_VERSION_QUERY_PARAMETER_NAME] = - IMDS_API_VERSION; - request.queryParameters[RESOURCE_BODY_OR_QUERY_PARAMETER_NAME] = - resource; - if (managedIdentityId.idType !== ManagedIdentityIdType.SYSTEM_ASSIGNED) { - request.queryParameters[this.getManagedIdentityUserAssignedIdQueryParameterKey(managedIdentityId.idType)] = managedIdentityId.id; - } - // bodyParameters calculated in BaseManagedIdentity.acquireTokenWithManagedIdentity - return request; - } -} - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -// MSI Constants. Docs for MSI are available here https://docs.microsoft.com/azure/app-service/overview-managed-identity -const SERVICE_FABRIC_MSI_API_VERSION = "2019-07-01-preview"; -/** - * Original source of code: https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/identity/Azure.Identity/src/ServiceFabricManagedIdentitySource.cs - */ -class ServiceFabric extends BaseManagedIdentitySource { - constructor(logger, nodeStorage, networkClient, cryptoProvider, identityEndpoint, identityHeader) { - super(logger, nodeStorage, networkClient, cryptoProvider); - this.identityEndpoint = identityEndpoint; - this.identityHeader = identityHeader; - } - static getEnvironmentVariables() { - const identityEndpoint = process.env[ManagedIdentityEnvironmentVariableNames.IDENTITY_ENDPOINT]; - const identityHeader = process.env[ManagedIdentityEnvironmentVariableNames.IDENTITY_HEADER]; - const identityServerThumbprint = process.env[ManagedIdentityEnvironmentVariableNames - .IDENTITY_SERVER_THUMBPRINT]; - return [identityEndpoint, identityHeader, identityServerThumbprint]; - } - static tryCreate(logger, nodeStorage, networkClient, cryptoProvider, managedIdentityId) { - const [identityEndpoint, identityHeader, identityServerThumbprint] = ServiceFabric.getEnvironmentVariables(); - /* - * if either of the identity endpoint, identity header, or identity server thumbprint - * environment variables are undefined, this MSI provider is unavailable. - */ - if (!identityEndpoint || !identityHeader || !identityServerThumbprint) { - logger.info(`[Managed Identity] ${ManagedIdentitySourceNames.SERVICE_FABRIC} managed identity is unavailable because one or all of the '${ManagedIdentityEnvironmentVariableNames.IDENTITY_HEADER}', '${ManagedIdentityEnvironmentVariableNames.IDENTITY_ENDPOINT}' or '${ManagedIdentityEnvironmentVariableNames.IDENTITY_SERVER_THUMBPRINT}' environment variables are not defined.`); - return null; - } - const validatedIdentityEndpoint = ServiceFabric.getValidatedEnvVariableUrlString(ManagedIdentityEnvironmentVariableNames.IDENTITY_ENDPOINT, identityEndpoint, ManagedIdentitySourceNames.SERVICE_FABRIC, logger); - logger.info(`[Managed Identity] Environment variables validation passed for ${ManagedIdentitySourceNames.SERVICE_FABRIC} managed identity. Endpoint URI: ${validatedIdentityEndpoint}. Creating ${ManagedIdentitySourceNames.SERVICE_FABRIC} managed identity.`); - if (managedIdentityId.idType !== ManagedIdentityIdType.SYSTEM_ASSIGNED) { - logger.warning(`[Managed Identity] ${ManagedIdentitySourceNames.SERVICE_FABRIC} user assigned managed identity is configured in the cluster, not during runtime. See also: https://learn.microsoft.com/en-us/azure/service-fabric/configure-existing-cluster-enable-managed-identity-token-service.`); - } - return new ServiceFabric(logger, nodeStorage, networkClient, cryptoProvider, identityEndpoint, identityHeader); - } - createRequest(resource, managedIdentityId) { - const request = new ManagedIdentityRequestParameters(HttpMethod.GET, this.identityEndpoint); - request.headers[SERVICE_FABRIC_SECRET_HEADER_NAME] = - this.identityHeader; - request.queryParameters[API_VERSION_QUERY_PARAMETER_NAME] = - SERVICE_FABRIC_MSI_API_VERSION; - request.queryParameters[RESOURCE_BODY_OR_QUERY_PARAMETER_NAME] = - resource; - if (managedIdentityId.idType !== ManagedIdentityIdType.SYSTEM_ASSIGNED) { - request.queryParameters[this.getManagedIdentityUserAssignedIdQueryParameterKey(managedIdentityId.idType)] = managedIdentityId.id; - } - // bodyParameters calculated in BaseManagedIdentity.acquireTokenWithManagedIdentity - return request; - } -} - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/* - * Class to initialize a managed identity and identify the service. - * Original source of code: https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/identity/Azure.Identity/src/ManagedIdentityClient.cs - */ -class ManagedIdentityClient { - constructor(logger, nodeStorage, networkClient, cryptoProvider) { - this.logger = logger; - this.nodeStorage = nodeStorage; - this.networkClient = networkClient; - this.cryptoProvider = cryptoProvider; - } - async sendManagedIdentityTokenRequest(managedIdentityRequest, managedIdentityId, fakeAuthority, refreshAccessToken) { - if (!ManagedIdentityClient.identitySource) { - ManagedIdentityClient.identitySource = - this.selectManagedIdentitySource(this.logger, this.nodeStorage, this.networkClient, this.cryptoProvider, managedIdentityId); - } - return ManagedIdentityClient.identitySource.acquireTokenWithManagedIdentity(managedIdentityRequest, managedIdentityId, fakeAuthority, refreshAccessToken); - } - allEnvironmentVariablesAreDefined(environmentVariables) { - return Object.values(environmentVariables).every((environmentVariable) => { - return environmentVariable !== undefined; - }); - } - /** - * Determine the Managed Identity Source based on available environment variables. This API is consumed by ManagedIdentityApplication's getManagedIdentitySource. - * @returns ManagedIdentitySourceNames - The Managed Identity source's name - */ - getManagedIdentitySource() { - ManagedIdentityClient.sourceName = - this.allEnvironmentVariablesAreDefined(ServiceFabric.getEnvironmentVariables()) - ? ManagedIdentitySourceNames.SERVICE_FABRIC - : this.allEnvironmentVariablesAreDefined(AppService.getEnvironmentVariables()) - ? ManagedIdentitySourceNames.APP_SERVICE - : this.allEnvironmentVariablesAreDefined(CloudShell.getEnvironmentVariables()) - ? ManagedIdentitySourceNames.CLOUD_SHELL - : this.allEnvironmentVariablesAreDefined(AzureArc.getEnvironmentVariables()) - ? ManagedIdentitySourceNames.AZURE_ARC - : ManagedIdentitySourceNames.DEFAULT_TO_IMDS; - return ManagedIdentityClient.sourceName; - } - /** - * Tries to create a managed identity source for all sources - * @returns the managed identity Source - */ - selectManagedIdentitySource(logger, nodeStorage, networkClient, cryptoProvider, managedIdentityId) { - const source = ServiceFabric.tryCreate(logger, nodeStorage, networkClient, cryptoProvider, managedIdentityId) || - AppService.tryCreate(logger, nodeStorage, networkClient, cryptoProvider) || - CloudShell.tryCreate(logger, nodeStorage, networkClient, cryptoProvider, managedIdentityId) || - AzureArc.tryCreate(logger, nodeStorage, networkClient, cryptoProvider, managedIdentityId) || - Imds.tryCreate(logger, nodeStorage, networkClient, cryptoProvider); - if (!source) { - throw createManagedIdentityError(unableToCreateSource); - } - return source; - } -} - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * Class to initialize a managed identity and identify the service - * @public - */ -class ManagedIdentityApplication { - constructor(configuration) { - // undefined config means the managed identity is system-assigned - this.config = buildManagedIdentityConfiguration(configuration || {}); - this.logger = new Logger(this.config.system.loggerOptions, name, version); - const fakeStatusAuthorityOptions = { - canonicalAuthority: Constants$1.DEFAULT_AUTHORITY, - }; - if (!ManagedIdentityApplication.nodeStorage) { - ManagedIdentityApplication.nodeStorage = new NodeStorage(this.logger, this.config.managedIdentityId.id, DEFAULT_CRYPTO_IMPLEMENTATION, fakeStatusAuthorityOptions); - } - this.networkClient = this.config.system.networkClient; - this.cryptoProvider = new CryptoProvider(); - const fakeAuthorityOptions = { - protocolMode: ProtocolMode.AAD, - knownAuthorities: [DEFAULT_AUTHORITY_FOR_MANAGED_IDENTITY], - cloudDiscoveryMetadata: "", - authorityMetadata: "", - }; - this.fakeAuthority = new Authority(DEFAULT_AUTHORITY_FOR_MANAGED_IDENTITY, this.networkClient, ManagedIdentityApplication.nodeStorage, fakeAuthorityOptions, this.logger, this.cryptoProvider.createNewGuid(), // correlationID - undefined, true); - this.fakeClientCredentialClient = new ClientCredentialClient({ - authOptions: { - clientId: this.config.managedIdentityId.id, - authority: this.fakeAuthority, - }, - }); - this.managedIdentityClient = new ManagedIdentityClient(this.logger, ManagedIdentityApplication.nodeStorage, this.networkClient, this.cryptoProvider); - } - /** - * Acquire an access token from the cache or the managed identity - * @param managedIdentityRequest - the ManagedIdentityRequestParams object passed in by the developer - * @returns the access token - */ - async acquireToken(managedIdentityRequestParams) { - if (!managedIdentityRequestParams.resource) { - throw createClientConfigurationError(urlEmptyError); - } - const managedIdentityRequest = { - forceRefresh: managedIdentityRequestParams.forceRefresh, - resource: managedIdentityRequestParams.resource.replace("/.default", ""), - scopes: [ - managedIdentityRequestParams.resource.replace("/.default", ""), - ], - authority: this.fakeAuthority.canonicalAuthority, - correlationId: this.cryptoProvider.createNewGuid(), - }; - if (managedIdentityRequestParams.claims || - managedIdentityRequest.forceRefresh) { - // make a network call to the managed identity source - return this.managedIdentityClient.sendManagedIdentityTokenRequest(managedIdentityRequest, this.config.managedIdentityId, this.fakeAuthority); - } - const [cachedAuthenticationResult, lastCacheOutcome] = await this.fakeClientCredentialClient.getCachedAuthenticationResult(managedIdentityRequest, this.config, this.cryptoProvider, this.fakeAuthority, ManagedIdentityApplication.nodeStorage); - if (cachedAuthenticationResult) { - // if the token is not expired but must be refreshed; get a new one in the background - if (lastCacheOutcome === CacheOutcome.PROACTIVELY_REFRESHED) { - this.logger.info("ClientCredentialClient:getCachedAuthenticationResult - Cached access token's refreshOn property has been exceeded'. It's not expired, but must be refreshed."); - // make a network call to the managed identity source; refresh the access token in the background - const refreshAccessToken = true; - await this.managedIdentityClient.sendManagedIdentityTokenRequest(managedIdentityRequest, this.config.managedIdentityId, this.fakeAuthority, refreshAccessToken); - } - return cachedAuthenticationResult; - } - else { - // make a network call to the managed identity source - return this.managedIdentityClient.sendManagedIdentityTokenRequest(managedIdentityRequest, this.config.managedIdentityId, this.fakeAuthority); - } - } - /** - * Determine the Managed Identity Source based on available environment variables. This API is consumed by Azure Identity SDK. - * @returns ManagedIdentitySourceNames - The Managed Identity source's name - */ - getManagedIdentitySource() { - return (ManagedIdentityClient.sourceName || - this.managedIdentityClient.getManagedIdentitySource()); - } -} - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * Cache plugin that serializes data to the cache and deserializes data from the cache - * @public - */ -class DistributedCachePlugin { - constructor(client, partitionManager) { - this.client = client; - this.partitionManager = partitionManager; - } - /** - * Deserializes the cache before accessing it - * @param cacheContext - TokenCacheContext - */ - async beforeCacheAccess(cacheContext) { - const partitionKey = await this.partitionManager.getKey(); - const cacheData = await this.client.get(partitionKey); - cacheContext.tokenCache.deserialize(cacheData); - } - /** - * Serializes the cache after accessing it - * @param cacheContext - TokenCacheContext - */ - async afterCacheAccess(cacheContext) { - if (cacheContext.cacheHasChanged) { - const kvStore = cacheContext.tokenCache.getKVStore(); - const accountEntities = Object.values(kvStore).filter((value) => AccountEntity.isAccountEntity(value)); - let partitionKey; - if (accountEntities.length > 0) { - const accountEntity = accountEntities[0]; - partitionKey = await this.partitionManager.extractKey(accountEntity); - } - else { - partitionKey = await this.partitionManager.getKey(); - } - await this.client.set(partitionKey, cacheContext.tokenCache.serialize()); - } - } -} - -exports.AuthError = AuthError; -exports.AuthErrorCodes = AuthErrorCodes; -exports.AuthErrorMessage = AuthErrorMessage; -exports.AzureCloudInstance = AzureCloudInstance; -exports.ClientApplication = ClientApplication; -exports.ClientAssertion = ClientAssertion; -exports.ClientAuthError = ClientAuthError; -exports.ClientAuthErrorCodes = ClientAuthErrorCodes; -exports.ClientAuthErrorMessage = ClientAuthErrorMessage; -exports.ClientConfigurationError = ClientConfigurationError; -exports.ClientConfigurationErrorCodes = ClientConfigurationErrorCodes; -exports.ClientConfigurationErrorMessage = ClientConfigurationErrorMessage; -exports.ClientCredentialClient = ClientCredentialClient; -exports.ConfidentialClientApplication = ConfidentialClientApplication; -exports.CryptoProvider = CryptoProvider; -exports.DeviceCodeClient = DeviceCodeClient; -exports.DistributedCachePlugin = DistributedCachePlugin; -exports.InteractionRequiredAuthError = InteractionRequiredAuthError; -exports.InteractionRequiredAuthErrorCodes = InteractionRequiredAuthErrorCodes; -exports.InteractionRequiredAuthErrorMessage = InteractionRequiredAuthErrorMessage; -exports.Logger = Logger; -exports.ManagedIdentityApplication = ManagedIdentityApplication; -exports.ManagedIdentitySourceNames = ManagedIdentitySourceNames; -exports.NodeStorage = NodeStorage; -exports.OnBehalfOfClient = OnBehalfOfClient; -exports.PromptValue = PromptValue; -exports.ProtocolMode = ProtocolMode; -exports.PublicClientApplication = PublicClientApplication; -exports.ResponseMode = ResponseMode; -exports.ServerError = ServerError; -exports.TokenCache = TokenCache; -exports.TokenCacheContext = TokenCacheContext; -exports.UsernamePasswordClient = UsernamePasswordClient; -exports.internals = internals; -exports.version = version; -//# sourceMappingURL=msal-node.cjs.map diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/msal-node.cjs.map b/PBandGraphScaffold/node_modules/@azure/msal-node/lib/msal-node.cjs.map deleted file mode 100644 index 25ee9fb..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/msal-node.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"msal-node.cjs","sources":["../../src/cache/serializer/Serializer.ts","../../msal-common/dist/utils/Constants.mjs","../../msal-common/dist/error/AuthErrorCodes.mjs","../../msal-common/dist/error/AuthError.mjs","../../msal-common/dist/error/ClientAuthErrorCodes.mjs","../../msal-common/dist/error/ClientAuthError.mjs","../../msal-common/dist/crypto/ICrypto.mjs","../../msal-common/dist/logger/Logger.mjs","../../msal-common/dist/packageMetadata.mjs","../../msal-common/dist/authority/AuthorityOptions.mjs","../../msal-common/dist/account/AuthToken.mjs","../../msal-common/dist/utils/TimeUtils.mjs","../../msal-common/dist/cache/utils/CacheHelpers.mjs","../../msal-common/dist/error/ClientConfigurationErrorCodes.mjs","../../msal-common/dist/error/ClientConfigurationError.mjs","../../msal-common/dist/utils/StringUtils.mjs","../../msal-common/dist/request/ScopeSet.mjs","../../msal-common/dist/account/ClientInfo.mjs","../../msal-common/dist/account/AccountInfo.mjs","../../msal-common/dist/authority/AuthorityType.mjs","../../msal-common/dist/account/TokenClaims.mjs","../../msal-common/dist/authority/ProtocolMode.mjs","../../msal-common/dist/cache/entities/AccountEntity.mjs","../../msal-common/dist/utils/UrlUtils.mjs","../../msal-common/dist/url/UrlString.mjs","../../msal-common/dist/authority/AuthorityMetadata.mjs","../../msal-common/dist/error/CacheErrorCodes.mjs","../../msal-common/dist/error/CacheError.mjs","../../msal-common/dist/cache/CacheManager.mjs","../../msal-common/dist/config/ClientConfiguration.mjs","../../msal-common/dist/account/CcsCredential.mjs","../../msal-common/dist/constants/AADServerParamKeys.mjs","../../msal-common/dist/request/RequestValidator.mjs","../../msal-common/dist/request/RequestParameterBuilder.mjs","../../msal-common/dist/authority/OpenIdConfigResponse.mjs","../../msal-common/dist/authority/CloudInstanceDiscoveryResponse.mjs","../../msal-common/dist/authority/CloudInstanceDiscoveryErrorResponse.mjs","../../msal-common/dist/telemetry/performance/PerformanceEvent.mjs","../../msal-common/dist/utils/FunctionWrappers.mjs","../../msal-common/dist/authority/RegionDiscovery.mjs","../../msal-common/dist/authority/Authority.mjs","../../msal-common/dist/authority/AuthorityFactory.mjs","../../msal-common/dist/error/ServerError.mjs","../../msal-common/dist/network/ThrottlingUtils.mjs","../../msal-common/dist/error/NetworkError.mjs","../../msal-common/dist/client/BaseClient.mjs","../../msal-common/dist/error/InteractionRequiredAuthErrorCodes.mjs","../../msal-common/dist/error/InteractionRequiredAuthError.mjs","../../msal-common/dist/utils/ProtocolUtils.mjs","../../msal-common/dist/crypto/PopTokenGenerator.mjs","../../msal-common/dist/cache/persistence/TokenCacheContext.mjs","../../msal-common/dist/response/ResponseHandler.mjs","../../msal-common/dist/utils/ClientAssertionUtils.mjs","../../msal-common/dist/client/AuthorizationCodeClient.mjs","../../msal-common/dist/client/RefreshTokenClient.mjs","../../msal-common/dist/client/SilentFlowClient.mjs","../../msal-common/dist/telemetry/server/ServerTelemetryManager.mjs","../../src/cache/serializer/Deserializer.ts","../../src/internals.ts","../../src/utils/Constants.ts","../../src/utils/NetworkUtils.ts","../../src/network/HttpClient.ts","../../src/error/ManagedIdentityErrorCodes.ts","../../src/error/ManagedIdentityError.ts","../../src/config/ManagedIdentityId.ts","../../src/retry/LinearRetryPolicy.ts","../../src/network/HttpClientWithRetries.ts","../../src/error/NodeAuthError.ts","../../src/config/Configuration.ts","../../src/crypto/GuidGenerator.ts","../../src/utils/EncodingUtils.ts","../../src/crypto/HashUtils.ts","../../src/crypto/PkceGenerator.ts","../../src/crypto/CryptoProvider.ts","../../src/cache/NodeStorage.ts","../../src/cache/TokenCache.ts","../../src/client/ClientAssertion.ts","../../src/packageMetadata.ts","../../src/client/UsernamePasswordClient.ts","../../src/client/ClientApplication.ts","../../src/network/LoopbackClient.ts","../../src/client/DeviceCodeClient.ts","../../src/client/PublicClientApplication.ts","../../src/client/ClientCredentialClient.ts","../../src/client/OnBehalfOfClient.ts","../../src/client/ConfidentialClientApplication.ts","../../src/client/ManagedIdentitySources/BaseManagedIdentitySource.ts","../../src/config/ManagedIdentityRequestParameters.ts","../../src/client/ManagedIdentitySources/AppService.ts","../../src/client/ManagedIdentitySources/AzureArc.ts","../../src/client/ManagedIdentitySources/CloudShell.ts","../../src/client/ManagedIdentitySources/Imds.ts","../../src/client/ManagedIdentitySources/ServiceFabric.ts","../../src/client/ManagedIdentityClient.ts","../../src/client/ManagedIdentityApplication.ts","../../src/cache/distributed/DistributedCachePlugin.ts"],"sourcesContent":[null,"/*! @azure/msal-common v14.16.1 2025-08-05 */\n'use strict';\n/*\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License.\r\n */\r\nconst Constants = {\r\n LIBRARY_NAME: \"MSAL.JS\",\r\n SKU: \"msal.js.common\",\r\n // Prefix for all library cache entries\r\n CACHE_PREFIX: \"msal\",\r\n // default authority\r\n DEFAULT_AUTHORITY: \"https://login.microsoftonline.com/common/\",\r\n DEFAULT_AUTHORITY_HOST: \"login.microsoftonline.com\",\r\n DEFAULT_COMMON_TENANT: \"common\",\r\n // ADFS String\r\n ADFS: \"adfs\",\r\n DSTS: \"dstsv2\",\r\n // Default AAD Instance Discovery Endpoint\r\n AAD_INSTANCE_DISCOVERY_ENDPT: \"https://login.microsoftonline.com/common/discovery/instance?api-version=1.1&authorization_endpoint=\",\r\n // CIAM URL\r\n CIAM_AUTH_URL: \".ciamlogin.com\",\r\n AAD_TENANT_DOMAIN_SUFFIX: \".onmicrosoft.com\",\r\n // Resource delimiter - used for certain cache entries\r\n RESOURCE_DELIM: \"|\",\r\n // Placeholder for non-existent account ids/objects\r\n NO_ACCOUNT: \"NO_ACCOUNT\",\r\n // Claims\r\n CLAIMS: \"claims\",\r\n // Consumer UTID\r\n CONSUMER_UTID: \"9188040d-6c67-4c5b-b112-36a304b66dad\",\r\n // Default scopes\r\n OPENID_SCOPE: \"openid\",\r\n PROFILE_SCOPE: \"profile\",\r\n OFFLINE_ACCESS_SCOPE: \"offline_access\",\r\n EMAIL_SCOPE: \"email\",\r\n // Default response type for authorization code flow\r\n CODE_RESPONSE_TYPE: \"code\",\r\n CODE_GRANT_TYPE: \"authorization_code\",\r\n RT_GRANT_TYPE: \"refresh_token\",\r\n FRAGMENT_RESPONSE_MODE: \"fragment\",\r\n S256_CODE_CHALLENGE_METHOD: \"S256\",\r\n URL_FORM_CONTENT_TYPE: \"application/x-www-form-urlencoded;charset=utf-8\",\r\n AUTHORIZATION_PENDING: \"authorization_pending\",\r\n NOT_DEFINED: \"not_defined\",\r\n EMPTY_STRING: \"\",\r\n NOT_APPLICABLE: \"N/A\",\r\n NOT_AVAILABLE: \"Not Available\",\r\n FORWARD_SLASH: \"/\",\r\n IMDS_ENDPOINT: \"http://169.254.169.254/metadata/instance/compute/location\",\r\n IMDS_VERSION: \"2020-06-01\",\r\n IMDS_TIMEOUT: 2000,\r\n AZURE_REGION_AUTO_DISCOVER_FLAG: \"TryAutoDetect\",\r\n REGIONAL_AUTH_PUBLIC_CLOUD_SUFFIX: \"login.microsoft.com\",\r\n KNOWN_PUBLIC_CLOUDS: [\r\n \"login.microsoftonline.com\",\r\n \"login.windows.net\",\r\n \"login.microsoft.com\",\r\n \"sts.windows.net\",\r\n ],\r\n TOKEN_RESPONSE_TYPE: \"token\",\r\n ID_TOKEN_RESPONSE_TYPE: \"id_token\",\r\n SHR_NONCE_VALIDITY: 240,\r\n INVALID_INSTANCE: \"invalid_instance\",\r\n};\r\nconst HttpStatus = {\r\n SUCCESS: 200,\r\n SUCCESS_RANGE_START: 200,\r\n SUCCESS_RANGE_END: 299,\r\n REDIRECT: 302,\r\n CLIENT_ERROR: 400,\r\n CLIENT_ERROR_RANGE_START: 400,\r\n BAD_REQUEST: 400,\r\n UNAUTHORIZED: 401,\r\n NOT_FOUND: 404,\r\n REQUEST_TIMEOUT: 408,\r\n TOO_MANY_REQUESTS: 429,\r\n CLIENT_ERROR_RANGE_END: 499,\r\n SERVER_ERROR: 500,\r\n SERVER_ERROR_RANGE_START: 500,\r\n SERVICE_UNAVAILABLE: 503,\r\n GATEWAY_TIMEOUT: 504,\r\n SERVER_ERROR_RANGE_END: 599,\r\n MULTI_SIDED_ERROR: 600,\r\n};\r\nconst OIDC_DEFAULT_SCOPES = [\r\n Constants.OPENID_SCOPE,\r\n Constants.PROFILE_SCOPE,\r\n Constants.OFFLINE_ACCESS_SCOPE,\r\n];\r\nconst OIDC_SCOPES = [...OIDC_DEFAULT_SCOPES, Constants.EMAIL_SCOPE];\r\n/**\r\n * Request header names\r\n */\r\nconst HeaderNames = {\r\n CONTENT_TYPE: \"Content-Type\",\r\n CONTENT_LENGTH: \"Content-Length\",\r\n RETRY_AFTER: \"Retry-After\",\r\n CCS_HEADER: \"X-AnchorMailbox\",\r\n WWWAuthenticate: \"WWW-Authenticate\",\r\n AuthenticationInfo: \"Authentication-Info\",\r\n X_MS_REQUEST_ID: \"x-ms-request-id\",\r\n X_MS_HTTP_VERSION: \"x-ms-httpver\",\r\n};\r\n/**\r\n * Persistent cache keys MSAL which stay while user is logged in.\r\n */\r\nconst PersistentCacheKeys = {\r\n ID_TOKEN: \"idtoken\",\r\n CLIENT_INFO: \"client.info\",\r\n ADAL_ID_TOKEN: \"adal.idtoken\",\r\n ERROR: \"error\",\r\n ERROR_DESC: \"error.description\",\r\n ACTIVE_ACCOUNT: \"active-account\",\r\n ACTIVE_ACCOUNT_FILTERS: \"active-account-filters\", // new cache entry for active_account for a more robust version for browser\r\n};\r\n/**\r\n * String constants related to AAD Authority\r\n */\r\nconst AADAuthorityConstants = {\r\n COMMON: \"common\",\r\n ORGANIZATIONS: \"organizations\",\r\n CONSUMERS: \"consumers\",\r\n};\r\n/**\r\n * Claims request keys\r\n */\r\nconst ClaimsRequestKeys = {\r\n ACCESS_TOKEN: \"access_token\",\r\n XMS_CC: \"xms_cc\",\r\n};\r\n/**\r\n * we considered making this \"enum\" in the request instead of string, however it looks like the allowed list of\r\n * prompt values kept changing over past couple of years. There are some undocumented prompt values for some\r\n * internal partners too, hence the choice of generic \"string\" type instead of the \"enum\"\r\n */\r\nconst PromptValue = {\r\n LOGIN: \"login\",\r\n SELECT_ACCOUNT: \"select_account\",\r\n CONSENT: \"consent\",\r\n NONE: \"none\",\r\n CREATE: \"create\",\r\n NO_SESSION: \"no_session\",\r\n};\r\n/**\r\n * allowed values for codeVerifier\r\n */\r\nconst CodeChallengeMethodValues = {\r\n PLAIN: \"plain\",\r\n S256: \"S256\",\r\n};\r\n/**\r\n * allowed values for server response type\r\n */\r\nconst ServerResponseType = {\r\n QUERY: \"query\",\r\n FRAGMENT: \"fragment\",\r\n};\r\n/**\r\n * allowed values for response_mode\r\n */\r\nconst ResponseMode = {\r\n ...ServerResponseType,\r\n FORM_POST: \"form_post\",\r\n};\r\n/**\r\n * allowed grant_type\r\n */\r\nconst GrantType = {\r\n IMPLICIT_GRANT: \"implicit\",\r\n AUTHORIZATION_CODE_GRANT: \"authorization_code\",\r\n CLIENT_CREDENTIALS_GRANT: \"client_credentials\",\r\n RESOURCE_OWNER_PASSWORD_GRANT: \"password\",\r\n REFRESH_TOKEN_GRANT: \"refresh_token\",\r\n DEVICE_CODE_GRANT: \"device_code\",\r\n JWT_BEARER: \"urn:ietf:params:oauth:grant-type:jwt-bearer\",\r\n};\r\n/**\r\n * Account types in Cache\r\n */\r\nconst CacheAccountType = {\r\n MSSTS_ACCOUNT_TYPE: \"MSSTS\",\r\n ADFS_ACCOUNT_TYPE: \"ADFS\",\r\n MSAV1_ACCOUNT_TYPE: \"MSA\",\r\n GENERIC_ACCOUNT_TYPE: \"Generic\", // NTLM, Kerberos, FBA, Basic etc\r\n};\r\n/**\r\n * Separators used in cache\r\n */\r\nconst Separators = {\r\n CACHE_KEY_SEPARATOR: \"-\",\r\n CLIENT_INFO_SEPARATOR: \".\",\r\n};\r\n/**\r\n * Credential Type stored in the cache\r\n */\r\nconst CredentialType = {\r\n ID_TOKEN: \"IdToken\",\r\n ACCESS_TOKEN: \"AccessToken\",\r\n ACCESS_TOKEN_WITH_AUTH_SCHEME: \"AccessToken_With_AuthScheme\",\r\n REFRESH_TOKEN: \"RefreshToken\",\r\n};\r\n/**\r\n * Combine all cache types\r\n */\r\nconst CacheType = {\r\n ADFS: 1001,\r\n MSA: 1002,\r\n MSSTS: 1003,\r\n GENERIC: 1004,\r\n ACCESS_TOKEN: 2001,\r\n REFRESH_TOKEN: 2002,\r\n ID_TOKEN: 2003,\r\n APP_METADATA: 3001,\r\n UNDEFINED: 9999,\r\n};\r\n/**\r\n * More Cache related constants\r\n */\r\nconst APP_METADATA = \"appmetadata\";\r\nconst CLIENT_INFO = \"client_info\";\r\nconst THE_FAMILY_ID = \"1\";\r\nconst AUTHORITY_METADATA_CONSTANTS = {\r\n CACHE_KEY: \"authority-metadata\",\r\n REFRESH_TIME_SECONDS: 3600 * 24, // 24 Hours\r\n};\r\nconst AuthorityMetadataSource = {\r\n CONFIG: \"config\",\r\n CACHE: \"cache\",\r\n NETWORK: \"network\",\r\n HARDCODED_VALUES: \"hardcoded_values\",\r\n};\r\nconst SERVER_TELEM_CONSTANTS = {\r\n SCHEMA_VERSION: 5,\r\n MAX_CUR_HEADER_BYTES: 80,\r\n MAX_LAST_HEADER_BYTES: 330,\r\n MAX_CACHED_ERRORS: 50,\r\n CACHE_KEY: \"server-telemetry\",\r\n CATEGORY_SEPARATOR: \"|\",\r\n VALUE_SEPARATOR: \",\",\r\n OVERFLOW_TRUE: \"1\",\r\n OVERFLOW_FALSE: \"0\",\r\n UNKNOWN_ERROR: \"unknown_error\",\r\n};\r\n/**\r\n * Type of the authentication request\r\n */\r\nconst AuthenticationScheme = {\r\n BEARER: \"Bearer\",\r\n POP: \"pop\",\r\n SSH: \"ssh-cert\",\r\n};\r\n/**\r\n * Constants related to throttling\r\n */\r\nconst ThrottlingConstants = {\r\n // Default time to throttle RequestThumbprint in seconds\r\n DEFAULT_THROTTLE_TIME_SECONDS: 60,\r\n // Default maximum time to throttle in seconds, overrides what the server sends back\r\n DEFAULT_MAX_THROTTLE_TIME_SECONDS: 3600,\r\n // Prefix for storing throttling entries\r\n THROTTLING_PREFIX: \"throttling\",\r\n // Value assigned to the x-ms-lib-capability header to indicate to the server the library supports throttling\r\n X_MS_LIB_CAPABILITY_VALUE: \"retry-after, h429\",\r\n};\r\nconst Errors = {\r\n INVALID_GRANT_ERROR: \"invalid_grant\",\r\n CLIENT_MISMATCH_ERROR: \"client_mismatch\",\r\n};\r\n/**\r\n * Password grant parameters\r\n */\r\nconst PasswordGrantConstants = {\r\n username: \"username\",\r\n password: \"password\",\r\n};\r\n/**\r\n * Response codes\r\n */\r\nconst ResponseCodes = {\r\n httpSuccess: 200,\r\n httpBadRequest: 400,\r\n};\r\n/**\r\n * Region Discovery Sources\r\n */\r\nconst RegionDiscoverySources = {\r\n FAILED_AUTO_DETECTION: \"1\",\r\n INTERNAL_CACHE: \"2\",\r\n ENVIRONMENT_VARIABLE: \"3\",\r\n IMDS: \"4\",\r\n};\r\n/**\r\n * Region Discovery Outcomes\r\n */\r\nconst RegionDiscoveryOutcomes = {\r\n CONFIGURED_MATCHES_DETECTED: \"1\",\r\n CONFIGURED_NO_AUTO_DETECTION: \"2\",\r\n CONFIGURED_NOT_DETECTED: \"3\",\r\n AUTO_DETECTION_REQUESTED_SUCCESSFUL: \"4\",\r\n AUTO_DETECTION_REQUESTED_FAILED: \"5\",\r\n};\r\n/**\r\n * Specifies the reason for fetching the access token from the identity provider\r\n */\r\nconst CacheOutcome = {\r\n // When a token is found in the cache or the cache is not supposed to be hit when making the request\r\n NOT_APPLICABLE: \"0\",\r\n // When the token request goes to the identity provider because force_refresh was set to true. Also occurs if claims were requested\r\n FORCE_REFRESH_OR_CLAIMS: \"1\",\r\n // When the token request goes to the identity provider because no cached access token exists\r\n NO_CACHED_ACCESS_TOKEN: \"2\",\r\n // When the token request goes to the identity provider because cached access token expired\r\n CACHED_ACCESS_TOKEN_EXPIRED: \"3\",\r\n // When the token request goes to the identity provider because refresh_in was used and the existing token needs to be refreshed\r\n PROACTIVELY_REFRESHED: \"4\",\r\n};\r\nconst JsonWebTokenTypes = {\r\n Jwt: \"JWT\",\r\n Jwk: \"JWK\",\r\n Pop: \"pop\",\r\n};\r\nconst ONE_DAY_IN_MS = 86400000;\r\n// Token renewal offset default in seconds\r\nconst DEFAULT_TOKEN_RENEWAL_OFFSET_SEC = 300;\n\nexport { AADAuthorityConstants, APP_METADATA, AUTHORITY_METADATA_CONSTANTS, AuthenticationScheme, AuthorityMetadataSource, CLIENT_INFO, CacheAccountType, CacheOutcome, CacheType, ClaimsRequestKeys, CodeChallengeMethodValues, Constants, CredentialType, DEFAULT_TOKEN_RENEWAL_OFFSET_SEC, Errors, GrantType, HeaderNames, HttpStatus, JsonWebTokenTypes, OIDC_DEFAULT_SCOPES, OIDC_SCOPES, ONE_DAY_IN_MS, PasswordGrantConstants, PersistentCacheKeys, PromptValue, RegionDiscoveryOutcomes, RegionDiscoverySources, ResponseCodes, ResponseMode, SERVER_TELEM_CONSTANTS, Separators, ServerResponseType, THE_FAMILY_ID, ThrottlingConstants };\n//# sourceMappingURL=Constants.mjs.map\n","/*! @azure/msal-common v14.16.1 2025-08-05 */\n'use strict';\n/*\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License.\r\n */\r\n/**\r\n * AuthErrorMessage class containing string constants used by error codes and messages.\r\n */\r\nconst unexpectedError = \"unexpected_error\";\r\nconst postRequestFailed = \"post_request_failed\";\n\nexport { postRequestFailed, unexpectedError };\n//# sourceMappingURL=AuthErrorCodes.mjs.map\n","/*! @azure/msal-common v14.16.1 2025-08-05 */\n'use strict';\nimport { Constants } from '../utils/Constants.mjs';\nimport { unexpectedError, postRequestFailed } from './AuthErrorCodes.mjs';\nimport * as AuthErrorCodes from './AuthErrorCodes.mjs';\nexport { AuthErrorCodes };\n\n/*\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License.\r\n */\r\nconst AuthErrorMessages = {\r\n [unexpectedError]: \"Unexpected error in authentication.\",\r\n [postRequestFailed]: \"Post request failed from the network, could be a 4xx/5xx or a network unavailability. Please check the exact error code for details.\",\r\n};\r\n/**\r\n * AuthErrorMessage class containing string constants used by error codes and messages.\r\n * @deprecated Use AuthErrorCodes instead\r\n */\r\nconst AuthErrorMessage = {\r\n unexpectedError: {\r\n code: unexpectedError,\r\n desc: AuthErrorMessages[unexpectedError],\r\n },\r\n postRequestFailed: {\r\n code: postRequestFailed,\r\n desc: AuthErrorMessages[postRequestFailed],\r\n },\r\n};\r\n/**\r\n * General error class thrown by the MSAL.js library.\r\n */\r\nclass AuthError extends Error {\r\n constructor(errorCode, errorMessage, suberror) {\r\n const errorString = errorMessage\r\n ? `${errorCode}: ${errorMessage}`\r\n : errorCode;\r\n super(errorString);\r\n Object.setPrototypeOf(this, AuthError.prototype);\r\n this.errorCode = errorCode || Constants.EMPTY_STRING;\r\n this.errorMessage = errorMessage || Constants.EMPTY_STRING;\r\n this.subError = suberror || Constants.EMPTY_STRING;\r\n this.name = \"AuthError\";\r\n }\r\n setCorrelationId(correlationId) {\r\n this.correlationId = correlationId;\r\n }\r\n}\r\nfunction createAuthError(code, additionalMessage) {\r\n return new AuthError(code, additionalMessage\r\n ? `${AuthErrorMessages[code]} ${additionalMessage}`\r\n : AuthErrorMessages[code]);\r\n}\n\nexport { AuthError, AuthErrorMessage, AuthErrorMessages, createAuthError };\n//# sourceMappingURL=AuthError.mjs.map\n","/*! @azure/msal-common v14.16.1 2025-08-05 */\n'use strict';\n/*\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License.\r\n */\r\nconst clientInfoDecodingError = \"client_info_decoding_error\";\r\nconst clientInfoEmptyError = \"client_info_empty_error\";\r\nconst tokenParsingError = \"token_parsing_error\";\r\nconst nullOrEmptyToken = \"null_or_empty_token\";\r\nconst endpointResolutionError = \"endpoints_resolution_error\";\r\nconst networkError = \"network_error\";\r\nconst openIdConfigError = \"openid_config_error\";\r\nconst hashNotDeserialized = \"hash_not_deserialized\";\r\nconst invalidState = \"invalid_state\";\r\nconst stateMismatch = \"state_mismatch\";\r\nconst stateNotFound = \"state_not_found\";\r\nconst nonceMismatch = \"nonce_mismatch\";\r\nconst authTimeNotFound = \"auth_time_not_found\";\r\nconst maxAgeTranspired = \"max_age_transpired\";\r\nconst multipleMatchingTokens = \"multiple_matching_tokens\";\r\nconst multipleMatchingAccounts = \"multiple_matching_accounts\";\r\nconst multipleMatchingAppMetadata = \"multiple_matching_appMetadata\";\r\nconst requestCannotBeMade = \"request_cannot_be_made\";\r\nconst cannotRemoveEmptyScope = \"cannot_remove_empty_scope\";\r\nconst cannotAppendScopeSet = \"cannot_append_scopeset\";\r\nconst emptyInputScopeSet = \"empty_input_scopeset\";\r\nconst deviceCodePollingCancelled = \"device_code_polling_cancelled\";\r\nconst deviceCodeExpired = \"device_code_expired\";\r\nconst deviceCodeUnknownError = \"device_code_unknown_error\";\r\nconst noAccountInSilentRequest = \"no_account_in_silent_request\";\r\nconst invalidCacheRecord = \"invalid_cache_record\";\r\nconst invalidCacheEnvironment = \"invalid_cache_environment\";\r\nconst noAccountFound = \"no_account_found\";\r\nconst noCryptoObject = \"no_crypto_object\";\r\nconst unexpectedCredentialType = \"unexpected_credential_type\";\r\nconst invalidAssertion = \"invalid_assertion\";\r\nconst invalidClientCredential = \"invalid_client_credential\";\r\nconst tokenRefreshRequired = \"token_refresh_required\";\r\nconst userTimeoutReached = \"user_timeout_reached\";\r\nconst tokenClaimsCnfRequiredForSignedJwt = \"token_claims_cnf_required_for_signedjwt\";\r\nconst authorizationCodeMissingFromServerResponse = \"authorization_code_missing_from_server_response\";\r\nconst bindingKeyNotRemoved = \"binding_key_not_removed\";\r\nconst endSessionEndpointNotSupported = \"end_session_endpoint_not_supported\";\r\nconst keyIdMissing = \"key_id_missing\";\r\nconst noNetworkConnectivity = \"no_network_connectivity\";\r\nconst userCanceled = \"user_canceled\";\r\nconst missingTenantIdError = \"missing_tenant_id_error\";\r\nconst methodNotImplemented = \"method_not_implemented\";\r\nconst nestedAppAuthBridgeDisabled = \"nested_app_auth_bridge_disabled\";\n\nexport { authTimeNotFound, authorizationCodeMissingFromServerResponse, bindingKeyNotRemoved, cannotAppendScopeSet, cannotRemoveEmptyScope, clientInfoDecodingError, clientInfoEmptyError, deviceCodeExpired, deviceCodePollingCancelled, deviceCodeUnknownError, emptyInputScopeSet, endSessionEndpointNotSupported, endpointResolutionError, hashNotDeserialized, invalidAssertion, invalidCacheEnvironment, invalidCacheRecord, invalidClientCredential, invalidState, keyIdMissing, maxAgeTranspired, methodNotImplemented, missingTenantIdError, multipleMatchingAccounts, multipleMatchingAppMetadata, multipleMatchingTokens, nestedAppAuthBridgeDisabled, networkError, noAccountFound, noAccountInSilentRequest, noCryptoObject, noNetworkConnectivity, nonceMismatch, nullOrEmptyToken, openIdConfigError, requestCannotBeMade, stateMismatch, stateNotFound, tokenClaimsCnfRequiredForSignedJwt, tokenParsingError, tokenRefreshRequired, unexpectedCredentialType, userCanceled, userTimeoutReached };\n//# sourceMappingURL=ClientAuthErrorCodes.mjs.map\n","/*! @azure/msal-common v14.16.1 2025-08-05 */\n'use strict';\nimport { AuthError } from './AuthError.mjs';\nimport { clientInfoDecodingError, clientInfoEmptyError, tokenParsingError, nullOrEmptyToken, endpointResolutionError, networkError, openIdConfigError, hashNotDeserialized, invalidState, stateMismatch, stateNotFound, nonceMismatch, authTimeNotFound, maxAgeTranspired, multipleMatchingTokens, multipleMatchingAccounts, multipleMatchingAppMetadata, requestCannotBeMade, cannotRemoveEmptyScope, cannotAppendScopeSet, emptyInputScopeSet, deviceCodePollingCancelled, deviceCodeExpired, deviceCodeUnknownError, noAccountInSilentRequest, invalidCacheRecord, invalidCacheEnvironment, noAccountFound, noCryptoObject, unexpectedCredentialType, invalidAssertion, invalidClientCredential, tokenRefreshRequired, userTimeoutReached, tokenClaimsCnfRequiredForSignedJwt, authorizationCodeMissingFromServerResponse, bindingKeyNotRemoved, endSessionEndpointNotSupported, keyIdMissing, noNetworkConnectivity, userCanceled, missingTenantIdError, nestedAppAuthBridgeDisabled, methodNotImplemented } from './ClientAuthErrorCodes.mjs';\nimport * as ClientAuthErrorCodes from './ClientAuthErrorCodes.mjs';\nexport { ClientAuthErrorCodes };\n\n/*\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License.\r\n */\r\n/**\r\n * ClientAuthErrorMessage class containing string constants used by error codes and messages.\r\n */\r\nconst ClientAuthErrorMessages = {\r\n [clientInfoDecodingError]: \"The client info could not be parsed/decoded correctly\",\r\n [clientInfoEmptyError]: \"The client info was empty\",\r\n [tokenParsingError]: \"Token cannot be parsed\",\r\n [nullOrEmptyToken]: \"The token is null or empty\",\r\n [endpointResolutionError]: \"Endpoints cannot be resolved\",\r\n [networkError]: \"Network request failed\",\r\n [openIdConfigError]: \"Could not retrieve endpoints. Check your authority and verify the .well-known/openid-configuration endpoint returns the required endpoints.\",\r\n [hashNotDeserialized]: \"The hash parameters could not be deserialized\",\r\n [invalidState]: \"State was not the expected format\",\r\n [stateMismatch]: \"State mismatch error\",\r\n [stateNotFound]: \"State not found\",\r\n [nonceMismatch]: \"Nonce mismatch error\",\r\n [authTimeNotFound]: \"Max Age was requested and the ID token is missing the auth_time variable.\" +\r\n \" auth_time is an optional claim and is not enabled by default - it must be enabled.\" +\r\n \" See https://aka.ms/msaljs/optional-claims for more information.\",\r\n [maxAgeTranspired]: \"Max Age is set to 0, or too much time has elapsed since the last end-user authentication.\",\r\n [multipleMatchingTokens]: \"The cache contains multiple tokens satisfying the requirements. \" +\r\n \"Call AcquireToken again providing more requirements such as authority or account.\",\r\n [multipleMatchingAccounts]: \"The cache contains multiple accounts satisfying the given parameters. Please pass more info to obtain the correct account\",\r\n [multipleMatchingAppMetadata]: \"The cache contains multiple appMetadata satisfying the given parameters. Please pass more info to obtain the correct appMetadata\",\r\n [requestCannotBeMade]: \"Token request cannot be made without authorization code or refresh token.\",\r\n [cannotRemoveEmptyScope]: \"Cannot remove null or empty scope from ScopeSet\",\r\n [cannotAppendScopeSet]: \"Cannot append ScopeSet\",\r\n [emptyInputScopeSet]: \"Empty input ScopeSet cannot be processed\",\r\n [deviceCodePollingCancelled]: \"Caller has cancelled token endpoint polling during device code flow by setting DeviceCodeRequest.cancel = true.\",\r\n [deviceCodeExpired]: \"Device code is expired.\",\r\n [deviceCodeUnknownError]: \"Device code stopped polling for unknown reasons.\",\r\n [noAccountInSilentRequest]: \"Please pass an account object, silent flow is not supported without account information\",\r\n [invalidCacheRecord]: \"Cache record object was null or undefined.\",\r\n [invalidCacheEnvironment]: \"Invalid environment when attempting to create cache entry\",\r\n [noAccountFound]: \"No account found in cache for given key.\",\r\n [noCryptoObject]: \"No crypto object detected.\",\r\n [unexpectedCredentialType]: \"Unexpected credential type.\",\r\n [invalidAssertion]: \"Client assertion must meet requirements described in https://tools.ietf.org/html/rfc7515\",\r\n [invalidClientCredential]: \"Client credential (secret, certificate, or assertion) must not be empty when creating a confidential client. An application should at most have one credential\",\r\n [tokenRefreshRequired]: \"Cannot return token from cache because it must be refreshed. This may be due to one of the following reasons: forceRefresh parameter is set to true, claims have been requested, there is no cached access token or it is expired.\",\r\n [userTimeoutReached]: \"User defined timeout for device code polling reached\",\r\n [tokenClaimsCnfRequiredForSignedJwt]: \"Cannot generate a POP jwt if the token_claims are not populated\",\r\n [authorizationCodeMissingFromServerResponse]: \"Server response does not contain an authorization code to proceed\",\r\n [bindingKeyNotRemoved]: \"Could not remove the credential's binding key from storage.\",\r\n [endSessionEndpointNotSupported]: \"The provided authority does not support logout\",\r\n [keyIdMissing]: \"A keyId value is missing from the requested bound token's cache record and is required to match the token to it's stored binding key.\",\r\n [noNetworkConnectivity]: \"No network connectivity. Check your internet connection.\",\r\n [userCanceled]: \"User cancelled the flow.\",\r\n [missingTenantIdError]: \"A tenant id - not common, organizations, or consumers - must be specified when using the client_credentials flow.\",\r\n [methodNotImplemented]: \"This method has not been implemented\",\r\n [nestedAppAuthBridgeDisabled]: \"The nested app auth bridge is disabled\",\r\n};\r\n/**\r\n * String constants used by error codes and messages.\r\n * @deprecated Use ClientAuthErrorCodes instead\r\n */\r\nconst ClientAuthErrorMessage = {\r\n clientInfoDecodingError: {\r\n code: clientInfoDecodingError,\r\n desc: ClientAuthErrorMessages[clientInfoDecodingError],\r\n },\r\n clientInfoEmptyError: {\r\n code: clientInfoEmptyError,\r\n desc: ClientAuthErrorMessages[clientInfoEmptyError],\r\n },\r\n tokenParsingError: {\r\n code: tokenParsingError,\r\n desc: ClientAuthErrorMessages[tokenParsingError],\r\n },\r\n nullOrEmptyToken: {\r\n code: nullOrEmptyToken,\r\n desc: ClientAuthErrorMessages[nullOrEmptyToken],\r\n },\r\n endpointResolutionError: {\r\n code: endpointResolutionError,\r\n desc: ClientAuthErrorMessages[endpointResolutionError],\r\n },\r\n networkError: {\r\n code: networkError,\r\n desc: ClientAuthErrorMessages[networkError],\r\n },\r\n unableToGetOpenidConfigError: {\r\n code: openIdConfigError,\r\n desc: ClientAuthErrorMessages[openIdConfigError],\r\n },\r\n hashNotDeserialized: {\r\n code: hashNotDeserialized,\r\n desc: ClientAuthErrorMessages[hashNotDeserialized],\r\n },\r\n invalidStateError: {\r\n code: invalidState,\r\n desc: ClientAuthErrorMessages[invalidState],\r\n },\r\n stateMismatchError: {\r\n code: stateMismatch,\r\n desc: ClientAuthErrorMessages[stateMismatch],\r\n },\r\n stateNotFoundError: {\r\n code: stateNotFound,\r\n desc: ClientAuthErrorMessages[stateNotFound],\r\n },\r\n nonceMismatchError: {\r\n code: nonceMismatch,\r\n desc: ClientAuthErrorMessages[nonceMismatch],\r\n },\r\n authTimeNotFoundError: {\r\n code: authTimeNotFound,\r\n desc: ClientAuthErrorMessages[authTimeNotFound],\r\n },\r\n maxAgeTranspired: {\r\n code: maxAgeTranspired,\r\n desc: ClientAuthErrorMessages[maxAgeTranspired],\r\n },\r\n multipleMatchingTokens: {\r\n code: multipleMatchingTokens,\r\n desc: ClientAuthErrorMessages[multipleMatchingTokens],\r\n },\r\n multipleMatchingAccounts: {\r\n code: multipleMatchingAccounts,\r\n desc: ClientAuthErrorMessages[multipleMatchingAccounts],\r\n },\r\n multipleMatchingAppMetadata: {\r\n code: multipleMatchingAppMetadata,\r\n desc: ClientAuthErrorMessages[multipleMatchingAppMetadata],\r\n },\r\n tokenRequestCannotBeMade: {\r\n code: requestCannotBeMade,\r\n desc: ClientAuthErrorMessages[requestCannotBeMade],\r\n },\r\n removeEmptyScopeError: {\r\n code: cannotRemoveEmptyScope,\r\n desc: ClientAuthErrorMessages[cannotRemoveEmptyScope],\r\n },\r\n appendScopeSetError: {\r\n code: cannotAppendScopeSet,\r\n desc: ClientAuthErrorMessages[cannotAppendScopeSet],\r\n },\r\n emptyInputScopeSetError: {\r\n code: emptyInputScopeSet,\r\n desc: ClientAuthErrorMessages[emptyInputScopeSet],\r\n },\r\n DeviceCodePollingCancelled: {\r\n code: deviceCodePollingCancelled,\r\n desc: ClientAuthErrorMessages[deviceCodePollingCancelled],\r\n },\r\n DeviceCodeExpired: {\r\n code: deviceCodeExpired,\r\n desc: ClientAuthErrorMessages[deviceCodeExpired],\r\n },\r\n DeviceCodeUnknownError: {\r\n code: deviceCodeUnknownError,\r\n desc: ClientAuthErrorMessages[deviceCodeUnknownError],\r\n },\r\n NoAccountInSilentRequest: {\r\n code: noAccountInSilentRequest,\r\n desc: ClientAuthErrorMessages[noAccountInSilentRequest],\r\n },\r\n invalidCacheRecord: {\r\n code: invalidCacheRecord,\r\n desc: ClientAuthErrorMessages[invalidCacheRecord],\r\n },\r\n invalidCacheEnvironment: {\r\n code: invalidCacheEnvironment,\r\n desc: ClientAuthErrorMessages[invalidCacheEnvironment],\r\n },\r\n noAccountFound: {\r\n code: noAccountFound,\r\n desc: ClientAuthErrorMessages[noAccountFound],\r\n },\r\n noCryptoObj: {\r\n code: noCryptoObject,\r\n desc: ClientAuthErrorMessages[noCryptoObject],\r\n },\r\n unexpectedCredentialType: {\r\n code: unexpectedCredentialType,\r\n desc: ClientAuthErrorMessages[unexpectedCredentialType],\r\n },\r\n invalidAssertion: {\r\n code: invalidAssertion,\r\n desc: ClientAuthErrorMessages[invalidAssertion],\r\n },\r\n invalidClientCredential: {\r\n code: invalidClientCredential,\r\n desc: ClientAuthErrorMessages[invalidClientCredential],\r\n },\r\n tokenRefreshRequired: {\r\n code: tokenRefreshRequired,\r\n desc: ClientAuthErrorMessages[tokenRefreshRequired],\r\n },\r\n userTimeoutReached: {\r\n code: userTimeoutReached,\r\n desc: ClientAuthErrorMessages[userTimeoutReached],\r\n },\r\n tokenClaimsRequired: {\r\n code: tokenClaimsCnfRequiredForSignedJwt,\r\n desc: ClientAuthErrorMessages[tokenClaimsCnfRequiredForSignedJwt],\r\n },\r\n noAuthorizationCodeFromServer: {\r\n code: authorizationCodeMissingFromServerResponse,\r\n desc: ClientAuthErrorMessages[authorizationCodeMissingFromServerResponse],\r\n },\r\n bindingKeyNotRemovedError: {\r\n code: bindingKeyNotRemoved,\r\n desc: ClientAuthErrorMessages[bindingKeyNotRemoved],\r\n },\r\n logoutNotSupported: {\r\n code: endSessionEndpointNotSupported,\r\n desc: ClientAuthErrorMessages[endSessionEndpointNotSupported],\r\n },\r\n keyIdMissing: {\r\n code: keyIdMissing,\r\n desc: ClientAuthErrorMessages[keyIdMissing],\r\n },\r\n noNetworkConnectivity: {\r\n code: noNetworkConnectivity,\r\n desc: ClientAuthErrorMessages[noNetworkConnectivity],\r\n },\r\n userCanceledError: {\r\n code: userCanceled,\r\n desc: ClientAuthErrorMessages[userCanceled],\r\n },\r\n missingTenantIdError: {\r\n code: missingTenantIdError,\r\n desc: ClientAuthErrorMessages[missingTenantIdError],\r\n },\r\n nestedAppAuthBridgeDisabled: {\r\n code: nestedAppAuthBridgeDisabled,\r\n desc: ClientAuthErrorMessages[nestedAppAuthBridgeDisabled],\r\n },\r\n};\r\n/**\r\n * Error thrown when there is an error in the client code running on the browser.\r\n */\r\nclass ClientAuthError extends AuthError {\r\n constructor(errorCode, additionalMessage) {\r\n super(errorCode, additionalMessage\r\n ? `${ClientAuthErrorMessages[errorCode]}: ${additionalMessage}`\r\n : ClientAuthErrorMessages[errorCode]);\r\n this.name = \"ClientAuthError\";\r\n Object.setPrototypeOf(this, ClientAuthError.prototype);\r\n }\r\n}\r\nfunction createClientAuthError(errorCode, additionalMessage) {\r\n return new ClientAuthError(errorCode, additionalMessage);\r\n}\n\nexport { ClientAuthError, ClientAuthErrorMessage, ClientAuthErrorMessages, createClientAuthError };\n//# sourceMappingURL=ClientAuthError.mjs.map\n","/*! @azure/msal-common v14.16.1 2025-08-05 */\n'use strict';\nimport { createClientAuthError } from '../error/ClientAuthError.mjs';\nimport { methodNotImplemented } from '../error/ClientAuthErrorCodes.mjs';\n\n/*\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License.\r\n */\r\nconst DEFAULT_CRYPTO_IMPLEMENTATION = {\r\n createNewGuid: () => {\r\n throw createClientAuthError(methodNotImplemented);\r\n },\r\n base64Decode: () => {\r\n throw createClientAuthError(methodNotImplemented);\r\n },\r\n base64Encode: () => {\r\n throw createClientAuthError(methodNotImplemented);\r\n },\r\n base64UrlEncode: () => {\r\n throw createClientAuthError(methodNotImplemented);\r\n },\r\n encodeKid: () => {\r\n throw createClientAuthError(methodNotImplemented);\r\n },\r\n async getPublicKeyThumbprint() {\r\n throw createClientAuthError(methodNotImplemented);\r\n },\r\n async removeTokenBindingKey() {\r\n throw createClientAuthError(methodNotImplemented);\r\n },\r\n async clearKeystore() {\r\n throw createClientAuthError(methodNotImplemented);\r\n },\r\n async signJwt() {\r\n throw createClientAuthError(methodNotImplemented);\r\n },\r\n async hashString() {\r\n throw createClientAuthError(methodNotImplemented);\r\n },\r\n};\n\nexport { DEFAULT_CRYPTO_IMPLEMENTATION };\n//# sourceMappingURL=ICrypto.mjs.map\n","/*! @azure/msal-common v14.16.1 2025-08-05 */\n'use strict';\nimport { Constants } from '../utils/Constants.mjs';\n\n/*\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License.\r\n */\r\n/**\r\n * Log message level.\r\n */\r\nvar LogLevel;\r\n(function (LogLevel) {\r\n LogLevel[LogLevel[\"Error\"] = 0] = \"Error\";\r\n LogLevel[LogLevel[\"Warning\"] = 1] = \"Warning\";\r\n LogLevel[LogLevel[\"Info\"] = 2] = \"Info\";\r\n LogLevel[LogLevel[\"Verbose\"] = 3] = \"Verbose\";\r\n LogLevel[LogLevel[\"Trace\"] = 4] = \"Trace\";\r\n})(LogLevel || (LogLevel = {}));\r\n/**\r\n * Class which facilitates logging of messages to a specific place.\r\n */\r\nclass Logger {\r\n constructor(loggerOptions, packageName, packageVersion) {\r\n // Current log level, defaults to info.\r\n this.level = LogLevel.Info;\r\n const defaultLoggerCallback = () => {\r\n return;\r\n };\r\n const setLoggerOptions = loggerOptions || Logger.createDefaultLoggerOptions();\r\n this.localCallback =\r\n setLoggerOptions.loggerCallback || defaultLoggerCallback;\r\n this.piiLoggingEnabled = setLoggerOptions.piiLoggingEnabled || false;\r\n this.level =\r\n typeof setLoggerOptions.logLevel === \"number\"\r\n ? setLoggerOptions.logLevel\r\n : LogLevel.Info;\r\n this.correlationId =\r\n setLoggerOptions.correlationId || Constants.EMPTY_STRING;\r\n this.packageName = packageName || Constants.EMPTY_STRING;\r\n this.packageVersion = packageVersion || Constants.EMPTY_STRING;\r\n }\r\n static createDefaultLoggerOptions() {\r\n return {\r\n loggerCallback: () => {\r\n // allow users to not set loggerCallback\r\n },\r\n piiLoggingEnabled: false,\r\n logLevel: LogLevel.Info,\r\n };\r\n }\r\n /**\r\n * Create new Logger with existing configurations.\r\n */\r\n clone(packageName, packageVersion, correlationId) {\r\n return new Logger({\r\n loggerCallback: this.localCallback,\r\n piiLoggingEnabled: this.piiLoggingEnabled,\r\n logLevel: this.level,\r\n correlationId: correlationId || this.correlationId,\r\n }, packageName, packageVersion);\r\n }\r\n /**\r\n * Log message with required options.\r\n */\r\n logMessage(logMessage, options) {\r\n if (options.logLevel > this.level ||\r\n (!this.piiLoggingEnabled && options.containsPii)) {\r\n return;\r\n }\r\n const timestamp = new Date().toUTCString();\r\n // Add correlationId to logs if set, correlationId provided on log messages take precedence\r\n const logHeader = `[${timestamp}] : [${options.correlationId || this.correlationId || \"\"}]`;\r\n const log = `${logHeader} : ${this.packageName}@${this.packageVersion} : ${LogLevel[options.logLevel]} - ${logMessage}`;\r\n // debug(`msal:${LogLevel[options.logLevel]}${options.containsPii ? \"-Pii\": Constants.EMPTY_STRING}${options.context ? `:${options.context}` : Constants.EMPTY_STRING}`)(logMessage);\r\n this.executeCallback(options.logLevel, log, options.containsPii || false);\r\n }\r\n /**\r\n * Execute callback with message.\r\n */\r\n executeCallback(level, message, containsPii) {\r\n if (this.localCallback) {\r\n this.localCallback(level, message, containsPii);\r\n }\r\n }\r\n /**\r\n * Logs error messages.\r\n */\r\n error(message, correlationId) {\r\n this.logMessage(message, {\r\n logLevel: LogLevel.Error,\r\n containsPii: false,\r\n correlationId: correlationId || Constants.EMPTY_STRING,\r\n });\r\n }\r\n /**\r\n * Logs error messages with PII.\r\n */\r\n errorPii(message, correlationId) {\r\n this.logMessage(message, {\r\n logLevel: LogLevel.Error,\r\n containsPii: true,\r\n correlationId: correlationId || Constants.EMPTY_STRING,\r\n });\r\n }\r\n /**\r\n * Logs warning messages.\r\n */\r\n warning(message, correlationId) {\r\n this.logMessage(message, {\r\n logLevel: LogLevel.Warning,\r\n containsPii: false,\r\n correlationId: correlationId || Constants.EMPTY_STRING,\r\n });\r\n }\r\n /**\r\n * Logs warning messages with PII.\r\n */\r\n warningPii(message, correlationId) {\r\n this.logMessage(message, {\r\n logLevel: LogLevel.Warning,\r\n containsPii: true,\r\n correlationId: correlationId || Constants.EMPTY_STRING,\r\n });\r\n }\r\n /**\r\n * Logs info messages.\r\n */\r\n info(message, correlationId) {\r\n this.logMessage(message, {\r\n logLevel: LogLevel.Info,\r\n containsPii: false,\r\n correlationId: correlationId || Constants.EMPTY_STRING,\r\n });\r\n }\r\n /**\r\n * Logs info messages with PII.\r\n */\r\n infoPii(message, correlationId) {\r\n this.logMessage(message, {\r\n logLevel: LogLevel.Info,\r\n containsPii: true,\r\n correlationId: correlationId || Constants.EMPTY_STRING,\r\n });\r\n }\r\n /**\r\n * Logs verbose messages.\r\n */\r\n verbose(message, correlationId) {\r\n this.logMessage(message, {\r\n logLevel: LogLevel.Verbose,\r\n containsPii: false,\r\n correlationId: correlationId || Constants.EMPTY_STRING,\r\n });\r\n }\r\n /**\r\n * Logs verbose messages with PII.\r\n */\r\n verbosePii(message, correlationId) {\r\n this.logMessage(message, {\r\n logLevel: LogLevel.Verbose,\r\n containsPii: true,\r\n correlationId: correlationId || Constants.EMPTY_STRING,\r\n });\r\n }\r\n /**\r\n * Logs trace messages.\r\n */\r\n trace(message, correlationId) {\r\n this.logMessage(message, {\r\n logLevel: LogLevel.Trace,\r\n containsPii: false,\r\n correlationId: correlationId || Constants.EMPTY_STRING,\r\n });\r\n }\r\n /**\r\n * Logs trace messages with PII.\r\n */\r\n tracePii(message, correlationId) {\r\n this.logMessage(message, {\r\n logLevel: LogLevel.Trace,\r\n containsPii: true,\r\n correlationId: correlationId || Constants.EMPTY_STRING,\r\n });\r\n }\r\n /**\r\n * Returns whether PII Logging is enabled or not.\r\n */\r\n isPiiLoggingEnabled() {\r\n return this.piiLoggingEnabled || false;\r\n }\r\n}\n\nexport { LogLevel, Logger };\n//# sourceMappingURL=Logger.mjs.map\n","/*! @azure/msal-common v14.16.1 2025-08-05 */\n'use strict';\n/* eslint-disable header/header */\r\nconst name = \"@azure/msal-common\";\r\nconst version = \"14.16.1\";\n\nexport { name, version };\n//# sourceMappingURL=packageMetadata.mjs.map\n","/*! @azure/msal-common v14.16.1 2025-08-05 */\n'use strict';\n/*\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License.\r\n */\r\nconst AzureCloudInstance = {\r\n // AzureCloudInstance is not specified.\r\n None: \"none\",\r\n // Microsoft Azure public cloud\r\n AzurePublic: \"https://login.microsoftonline.com\",\r\n // Microsoft PPE\r\n AzurePpe: \"https://login.windows-ppe.net\",\r\n // Microsoft Chinese national/regional cloud\r\n AzureChina: \"https://login.chinacloudapi.cn\",\r\n // Microsoft German national/regional cloud (\"Black Forest\")\r\n AzureGermany: \"https://login.microsoftonline.de\",\r\n // US Government cloud\r\n AzureUsGovernment: \"https://login.microsoftonline.us\",\r\n};\n\nexport { AzureCloudInstance };\n//# sourceMappingURL=AuthorityOptions.mjs.map\n","/*! @azure/msal-common v14.16.1 2025-08-05 */\n'use strict';\nimport { createClientAuthError } from '../error/ClientAuthError.mjs';\nimport { tokenParsingError, nullOrEmptyToken, maxAgeTranspired } from '../error/ClientAuthErrorCodes.mjs';\n\n/*\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License.\r\n */\r\n/**\r\n * Extract token by decoding the rawToken\r\n *\r\n * @param encodedToken\r\n */\r\nfunction extractTokenClaims(encodedToken, base64Decode) {\r\n const jswPayload = getJWSPayload(encodedToken);\r\n // token will be decoded to get the username\r\n try {\r\n // base64Decode() should throw an error if there is an issue\r\n const base64Decoded = base64Decode(jswPayload);\r\n return JSON.parse(base64Decoded);\r\n }\r\n catch (err) {\r\n throw createClientAuthError(tokenParsingError);\r\n }\r\n}\r\n/**\r\n * decode a JWT\r\n *\r\n * @param authToken\r\n */\r\nfunction getJWSPayload(authToken) {\r\n if (!authToken) {\r\n throw createClientAuthError(nullOrEmptyToken);\r\n }\r\n const tokenPartsRegex = /^([^\\.\\s]*)\\.([^\\.\\s]+)\\.([^\\.\\s]*)$/;\r\n const matches = tokenPartsRegex.exec(authToken);\r\n if (!matches || matches.length < 4) {\r\n throw createClientAuthError(tokenParsingError);\r\n }\r\n /**\r\n * const crackedToken = {\r\n * header: matches[1],\r\n * JWSPayload: matches[2],\r\n * JWSSig: matches[3],\r\n * };\r\n */\r\n return matches[2];\r\n}\r\n/**\r\n * Determine if the token's max_age has transpired\r\n */\r\nfunction checkMaxAge(authTime, maxAge) {\r\n /*\r\n * per https://openid.net/specs/openid-connect-core-1_0.html#AuthRequest\r\n * To force an immediate re-authentication: If an app requires that a user re-authenticate prior to access,\r\n * provide a value of 0 for the max_age parameter and the AS will force a fresh login.\r\n */\r\n const fiveMinuteSkew = 300000; // five minutes in milliseconds\r\n if (maxAge === 0 || Date.now() - fiveMinuteSkew > authTime + maxAge) {\r\n throw createClientAuthError(maxAgeTranspired);\r\n }\r\n}\n\nexport { checkMaxAge, extractTokenClaims, getJWSPayload };\n//# sourceMappingURL=AuthToken.mjs.map\n","/*! @azure/msal-common v14.16.1 2025-08-05 */\n'use strict';\n/*\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License.\r\n */\r\n/**\r\n * Utility functions for managing date and time operations.\r\n */\r\n/**\r\n * return the current time in Unix time (seconds).\r\n */\r\nfunction nowSeconds() {\r\n // Date.getTime() returns in milliseconds.\r\n return Math.round(new Date().getTime() / 1000.0);\r\n}\r\n/**\r\n * check if a token is expired based on given UTC time in seconds.\r\n * @param expiresOn\r\n */\r\nfunction isTokenExpired(expiresOn, offset) {\r\n // check for access token expiry\r\n const expirationSec = Number(expiresOn) || 0;\r\n const offsetCurrentTimeSec = nowSeconds() + offset;\r\n // If current time + offset is greater than token expiration time, then token is expired.\r\n return offsetCurrentTimeSec > expirationSec;\r\n}\r\n/**\r\n * If the current time is earlier than the time that a token was cached at, we must discard the token\r\n * i.e. The system clock was turned back after acquiring the cached token\r\n * @param cachedAt\r\n * @param offset\r\n */\r\nfunction wasClockTurnedBack(cachedAt) {\r\n const cachedAtSec = Number(cachedAt);\r\n return cachedAtSec > nowSeconds();\r\n}\r\n/**\r\n * Waits for t number of milliseconds\r\n * @param t number\r\n * @param value T\r\n */\r\nfunction delay(t, value) {\r\n return new Promise((resolve) => setTimeout(() => resolve(value), t));\r\n}\n\nexport { delay, isTokenExpired, nowSeconds, wasClockTurnedBack };\n//# sourceMappingURL=TimeUtils.mjs.map\n","/*! @azure/msal-common v14.16.1 2025-08-05 */\n'use strict';\nimport { extractTokenClaims } from '../../account/AuthToken.mjs';\nimport { createClientAuthError } from '../../error/ClientAuthError.mjs';\nimport { Separators, CredentialType, AuthenticationScheme, SERVER_TELEM_CONSTANTS, ThrottlingConstants, APP_METADATA, AUTHORITY_METADATA_CONSTANTS } from '../../utils/Constants.mjs';\nimport { nowSeconds } from '../../utils/TimeUtils.mjs';\nimport { tokenClaimsCnfRequiredForSignedJwt } from '../../error/ClientAuthErrorCodes.mjs';\n\n/*\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License.\r\n */\r\n/**\r\n * Cache Key: -------\r\n * IdToken Example: uid.utid-login.microsoftonline.com-idtoken-app_client_id-contoso.com\r\n * AccessToken Example: uid.utid-login.microsoftonline.com-accesstoken-app_client_id-contoso.com-scope1 scope2--pop\r\n * RefreshToken Example: uid.utid-login.microsoftonline.com-refreshtoken-1-contoso.com\r\n * @param credentialEntity\r\n * @returns\r\n */\r\nfunction generateCredentialKey(credentialEntity) {\r\n const credentialKey = [\r\n generateAccountId(credentialEntity),\r\n generateCredentialId(credentialEntity),\r\n generateTarget(credentialEntity),\r\n generateClaimsHash(credentialEntity),\r\n generateScheme(credentialEntity),\r\n ];\r\n return credentialKey.join(Separators.CACHE_KEY_SEPARATOR).toLowerCase();\r\n}\r\n/**\r\n * Create IdTokenEntity\r\n * @param homeAccountId\r\n * @param authenticationResult\r\n * @param clientId\r\n * @param authority\r\n */\r\nfunction createIdTokenEntity(homeAccountId, environment, idToken, clientId, tenantId) {\r\n const idTokenEntity = {\r\n credentialType: CredentialType.ID_TOKEN,\r\n homeAccountId: homeAccountId,\r\n environment: environment,\r\n clientId: clientId,\r\n secret: idToken,\r\n realm: tenantId,\r\n };\r\n return idTokenEntity;\r\n}\r\n/**\r\n * Create AccessTokenEntity\r\n * @param homeAccountId\r\n * @param environment\r\n * @param accessToken\r\n * @param clientId\r\n * @param tenantId\r\n * @param scopes\r\n * @param expiresOn\r\n * @param extExpiresOn\r\n */\r\nfunction createAccessTokenEntity(homeAccountId, environment, accessToken, clientId, tenantId, scopes, expiresOn, extExpiresOn, base64Decode, refreshOn, tokenType, userAssertionHash, keyId, requestedClaims, requestedClaimsHash) {\r\n const atEntity = {\r\n homeAccountId: homeAccountId,\r\n credentialType: CredentialType.ACCESS_TOKEN,\r\n secret: accessToken,\r\n cachedAt: nowSeconds().toString(),\r\n expiresOn: expiresOn.toString(),\r\n extendedExpiresOn: extExpiresOn.toString(),\r\n environment: environment,\r\n clientId: clientId,\r\n realm: tenantId,\r\n target: scopes,\r\n tokenType: tokenType || AuthenticationScheme.BEARER,\r\n };\r\n if (userAssertionHash) {\r\n atEntity.userAssertionHash = userAssertionHash;\r\n }\r\n if (refreshOn) {\r\n atEntity.refreshOn = refreshOn.toString();\r\n }\r\n if (requestedClaims) {\r\n atEntity.requestedClaims = requestedClaims;\r\n atEntity.requestedClaimsHash = requestedClaimsHash;\r\n }\r\n /*\r\n * Create Access Token With Auth Scheme instead of regular access token\r\n * Cast to lower to handle \"bearer\" from ADFS\r\n */\r\n if (atEntity.tokenType?.toLowerCase() !==\r\n AuthenticationScheme.BEARER.toLowerCase()) {\r\n atEntity.credentialType = CredentialType.ACCESS_TOKEN_WITH_AUTH_SCHEME;\r\n switch (atEntity.tokenType) {\r\n case AuthenticationScheme.POP:\r\n // Make sure keyId is present and add it to credential\r\n const tokenClaims = extractTokenClaims(accessToken, base64Decode);\r\n if (!tokenClaims?.cnf?.kid) {\r\n throw createClientAuthError(tokenClaimsCnfRequiredForSignedJwt);\r\n }\r\n atEntity.keyId = tokenClaims.cnf.kid;\r\n break;\r\n case AuthenticationScheme.SSH:\r\n atEntity.keyId = keyId;\r\n }\r\n }\r\n return atEntity;\r\n}\r\n/**\r\n * Create RefreshTokenEntity\r\n * @param homeAccountId\r\n * @param authenticationResult\r\n * @param clientId\r\n * @param authority\r\n */\r\nfunction createRefreshTokenEntity(homeAccountId, environment, refreshToken, clientId, familyId, userAssertionHash, expiresOn) {\r\n const rtEntity = {\r\n credentialType: CredentialType.REFRESH_TOKEN,\r\n homeAccountId: homeAccountId,\r\n environment: environment,\r\n clientId: clientId,\r\n secret: refreshToken,\r\n };\r\n if (userAssertionHash) {\r\n rtEntity.userAssertionHash = userAssertionHash;\r\n }\r\n if (familyId) {\r\n rtEntity.familyId = familyId;\r\n }\r\n if (expiresOn) {\r\n rtEntity.expiresOn = expiresOn.toString();\r\n }\r\n return rtEntity;\r\n}\r\nfunction isCredentialEntity(entity) {\r\n return (entity.hasOwnProperty(\"homeAccountId\") &&\r\n entity.hasOwnProperty(\"environment\") &&\r\n entity.hasOwnProperty(\"credentialType\") &&\r\n entity.hasOwnProperty(\"clientId\") &&\r\n entity.hasOwnProperty(\"secret\"));\r\n}\r\n/**\r\n * Validates an entity: checks for all expected params\r\n * @param entity\r\n */\r\nfunction isAccessTokenEntity(entity) {\r\n if (!entity) {\r\n return false;\r\n }\r\n return (isCredentialEntity(entity) &&\r\n entity.hasOwnProperty(\"realm\") &&\r\n entity.hasOwnProperty(\"target\") &&\r\n (entity[\"credentialType\"] === CredentialType.ACCESS_TOKEN ||\r\n entity[\"credentialType\"] ===\r\n CredentialType.ACCESS_TOKEN_WITH_AUTH_SCHEME));\r\n}\r\n/**\r\n * Validates an entity: checks for all expected params\r\n * @param entity\r\n */\r\nfunction isIdTokenEntity(entity) {\r\n if (!entity) {\r\n return false;\r\n }\r\n return (isCredentialEntity(entity) &&\r\n entity.hasOwnProperty(\"realm\") &&\r\n entity[\"credentialType\"] === CredentialType.ID_TOKEN);\r\n}\r\n/**\r\n * Validates an entity: checks for all expected params\r\n * @param entity\r\n */\r\nfunction isRefreshTokenEntity(entity) {\r\n if (!entity) {\r\n return false;\r\n }\r\n return (isCredentialEntity(entity) &&\r\n entity[\"credentialType\"] === CredentialType.REFRESH_TOKEN);\r\n}\r\n/**\r\n * Generate Account Id key component as per the schema: -\r\n */\r\nfunction generateAccountId(credentialEntity) {\r\n const accountId = [\r\n credentialEntity.homeAccountId,\r\n credentialEntity.environment,\r\n ];\r\n return accountId.join(Separators.CACHE_KEY_SEPARATOR).toLowerCase();\r\n}\r\n/**\r\n * Generate Credential Id key component as per the schema: --\r\n */\r\nfunction generateCredentialId(credentialEntity) {\r\n const clientOrFamilyId = credentialEntity.credentialType === CredentialType.REFRESH_TOKEN\r\n ? credentialEntity.familyId || credentialEntity.clientId\r\n : credentialEntity.clientId;\r\n const credentialId = [\r\n credentialEntity.credentialType,\r\n clientOrFamilyId,\r\n credentialEntity.realm || \"\",\r\n ];\r\n return credentialId.join(Separators.CACHE_KEY_SEPARATOR).toLowerCase();\r\n}\r\n/**\r\n * Generate target key component as per schema: \r\n */\r\nfunction generateTarget(credentialEntity) {\r\n return (credentialEntity.target || \"\").toLowerCase();\r\n}\r\n/**\r\n * Generate requested claims key component as per schema: \r\n */\r\nfunction generateClaimsHash(credentialEntity) {\r\n return (credentialEntity.requestedClaimsHash || \"\").toLowerCase();\r\n}\r\n/**\r\n * Generate scheme key componenet as per schema: \r\n */\r\nfunction generateScheme(credentialEntity) {\r\n /*\r\n * PoP Tokens and SSH certs include scheme in cache key\r\n * Cast to lowercase to handle \"bearer\" from ADFS\r\n */\r\n return credentialEntity.tokenType &&\r\n credentialEntity.tokenType.toLowerCase() !==\r\n AuthenticationScheme.BEARER.toLowerCase()\r\n ? credentialEntity.tokenType.toLowerCase()\r\n : \"\";\r\n}\r\n/**\r\n * validates if a given cache entry is \"Telemetry\", parses \r\n * @param key\r\n * @param entity\r\n */\r\nfunction isServerTelemetryEntity(key, entity) {\r\n const validateKey = key.indexOf(SERVER_TELEM_CONSTANTS.CACHE_KEY) === 0;\r\n let validateEntity = true;\r\n if (entity) {\r\n validateEntity =\r\n entity.hasOwnProperty(\"failedRequests\") &&\r\n entity.hasOwnProperty(\"errors\") &&\r\n entity.hasOwnProperty(\"cacheHits\");\r\n }\r\n return validateKey && validateEntity;\r\n}\r\n/**\r\n * validates if a given cache entry is \"Throttling\", parses \r\n * @param key\r\n * @param entity\r\n */\r\nfunction isThrottlingEntity(key, entity) {\r\n let validateKey = false;\r\n if (key) {\r\n validateKey = key.indexOf(ThrottlingConstants.THROTTLING_PREFIX) === 0;\r\n }\r\n let validateEntity = true;\r\n if (entity) {\r\n validateEntity = entity.hasOwnProperty(\"throttleTime\");\r\n }\r\n return validateKey && validateEntity;\r\n}\r\n/**\r\n * Generate AppMetadata Cache Key as per the schema: appmetadata--\r\n */\r\nfunction generateAppMetadataKey({ environment, clientId, }) {\r\n const appMetaDataKeyArray = [\r\n APP_METADATA,\r\n environment,\r\n clientId,\r\n ];\r\n return appMetaDataKeyArray\r\n .join(Separators.CACHE_KEY_SEPARATOR)\r\n .toLowerCase();\r\n}\r\n/*\r\n * Validates an entity: checks for all expected params\r\n * @param entity\r\n */\r\nfunction isAppMetadataEntity(key, entity) {\r\n if (!entity) {\r\n return false;\r\n }\r\n return (key.indexOf(APP_METADATA) === 0 &&\r\n entity.hasOwnProperty(\"clientId\") &&\r\n entity.hasOwnProperty(\"environment\"));\r\n}\r\n/**\r\n * Validates an entity: checks for all expected params\r\n * @param entity\r\n */\r\nfunction isAuthorityMetadataEntity(key, entity) {\r\n if (!entity) {\r\n return false;\r\n }\r\n return (key.indexOf(AUTHORITY_METADATA_CONSTANTS.CACHE_KEY) === 0 &&\r\n entity.hasOwnProperty(\"aliases\") &&\r\n entity.hasOwnProperty(\"preferred_cache\") &&\r\n entity.hasOwnProperty(\"preferred_network\") &&\r\n entity.hasOwnProperty(\"canonical_authority\") &&\r\n entity.hasOwnProperty(\"authorization_endpoint\") &&\r\n entity.hasOwnProperty(\"token_endpoint\") &&\r\n entity.hasOwnProperty(\"issuer\") &&\r\n entity.hasOwnProperty(\"aliasesFromNetwork\") &&\r\n entity.hasOwnProperty(\"endpointsFromNetwork\") &&\r\n entity.hasOwnProperty(\"expiresAt\") &&\r\n entity.hasOwnProperty(\"jwks_uri\"));\r\n}\r\n/**\r\n * Reset the exiresAt value\r\n */\r\nfunction generateAuthorityMetadataExpiresAt() {\r\n return (nowSeconds() +\r\n AUTHORITY_METADATA_CONSTANTS.REFRESH_TIME_SECONDS);\r\n}\r\nfunction updateAuthorityEndpointMetadata(authorityMetadata, updatedValues, fromNetwork) {\r\n authorityMetadata.authorization_endpoint =\r\n updatedValues.authorization_endpoint;\r\n authorityMetadata.token_endpoint = updatedValues.token_endpoint;\r\n authorityMetadata.end_session_endpoint = updatedValues.end_session_endpoint;\r\n authorityMetadata.issuer = updatedValues.issuer;\r\n authorityMetadata.endpointsFromNetwork = fromNetwork;\r\n authorityMetadata.jwks_uri = updatedValues.jwks_uri;\r\n}\r\nfunction updateCloudDiscoveryMetadata(authorityMetadata, updatedValues, fromNetwork) {\r\n authorityMetadata.aliases = updatedValues.aliases;\r\n authorityMetadata.preferred_cache = updatedValues.preferred_cache;\r\n authorityMetadata.preferred_network = updatedValues.preferred_network;\r\n authorityMetadata.aliasesFromNetwork = fromNetwork;\r\n}\r\n/**\r\n * Returns whether or not the data needs to be refreshed\r\n */\r\nfunction isAuthorityMetadataExpired(metadata) {\r\n return metadata.expiresAt <= nowSeconds();\r\n}\n\nexport { createAccessTokenEntity, createIdTokenEntity, createRefreshTokenEntity, generateAppMetadataKey, generateAuthorityMetadataExpiresAt, generateCredentialKey, isAccessTokenEntity, isAppMetadataEntity, isAuthorityMetadataEntity, isAuthorityMetadataExpired, isCredentialEntity, isIdTokenEntity, isRefreshTokenEntity, isServerTelemetryEntity, isThrottlingEntity, updateAuthorityEndpointMetadata, updateCloudDiscoveryMetadata };\n//# sourceMappingURL=CacheHelpers.mjs.map\n","/*! @azure/msal-common v14.16.1 2025-08-05 */\n'use strict';\n/*\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License.\r\n */\r\nconst redirectUriEmpty = \"redirect_uri_empty\";\r\nconst claimsRequestParsingError = \"claims_request_parsing_error\";\r\nconst authorityUriInsecure = \"authority_uri_insecure\";\r\nconst urlParseError = \"url_parse_error\";\r\nconst urlEmptyError = \"empty_url_error\";\r\nconst emptyInputScopesError = \"empty_input_scopes_error\";\r\nconst invalidPromptValue = \"invalid_prompt_value\";\r\nconst invalidClaims = \"invalid_claims\";\r\nconst tokenRequestEmpty = \"token_request_empty\";\r\nconst logoutRequestEmpty = \"logout_request_empty\";\r\nconst invalidCodeChallengeMethod = \"invalid_code_challenge_method\";\r\nconst pkceParamsMissing = \"pkce_params_missing\";\r\nconst invalidCloudDiscoveryMetadata = \"invalid_cloud_discovery_metadata\";\r\nconst invalidAuthorityMetadata = \"invalid_authority_metadata\";\r\nconst untrustedAuthority = \"untrusted_authority\";\r\nconst missingSshJwk = \"missing_ssh_jwk\";\r\nconst missingSshKid = \"missing_ssh_kid\";\r\nconst missingNonceAuthenticationHeader = \"missing_nonce_authentication_header\";\r\nconst invalidAuthenticationHeader = \"invalid_authentication_header\";\r\nconst cannotSetOIDCOptions = \"cannot_set_OIDCOptions\";\r\nconst cannotAllowNativeBroker = \"cannot_allow_native_broker\";\r\nconst authorityMismatch = \"authority_mismatch\";\n\nexport { authorityMismatch, authorityUriInsecure, cannotAllowNativeBroker, cannotSetOIDCOptions, claimsRequestParsingError, emptyInputScopesError, invalidAuthenticationHeader, invalidAuthorityMetadata, invalidClaims, invalidCloudDiscoveryMetadata, invalidCodeChallengeMethod, invalidPromptValue, logoutRequestEmpty, missingNonceAuthenticationHeader, missingSshJwk, missingSshKid, pkceParamsMissing, redirectUriEmpty, tokenRequestEmpty, untrustedAuthority, urlEmptyError, urlParseError };\n//# sourceMappingURL=ClientConfigurationErrorCodes.mjs.map\n","/*! @azure/msal-common v14.16.1 2025-08-05 */\n'use strict';\nimport { AuthError } from './AuthError.mjs';\nimport { redirectUriEmpty, claimsRequestParsingError, authorityUriInsecure, urlParseError, urlEmptyError, emptyInputScopesError, invalidPromptValue, invalidClaims, tokenRequestEmpty, logoutRequestEmpty, invalidCodeChallengeMethod, pkceParamsMissing, invalidCloudDiscoveryMetadata, invalidAuthorityMetadata, untrustedAuthority, missingSshJwk, missingSshKid, missingNonceAuthenticationHeader, invalidAuthenticationHeader, cannotSetOIDCOptions, cannotAllowNativeBroker, authorityMismatch } from './ClientConfigurationErrorCodes.mjs';\nimport * as ClientConfigurationErrorCodes from './ClientConfigurationErrorCodes.mjs';\nexport { ClientConfigurationErrorCodes };\n\n/*\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License.\r\n */\r\nconst ClientConfigurationErrorMessages = {\r\n [redirectUriEmpty]: \"A redirect URI is required for all calls, and none has been set.\",\r\n [claimsRequestParsingError]: \"Could not parse the given claims request object.\",\r\n [authorityUriInsecure]: \"Authority URIs must use https. Please see here for valid authority configuration options: https://docs.microsoft.com/en-us/azure/active-directory/develop/msal-js-initializing-client-applications#configuration-options\",\r\n [urlParseError]: \"URL could not be parsed into appropriate segments.\",\r\n [urlEmptyError]: \"URL was empty or null.\",\r\n [emptyInputScopesError]: \"Scopes cannot be passed as null, undefined or empty array because they are required to obtain an access token.\",\r\n [invalidPromptValue]: \"Please see here for valid configuration options: https://azuread.github.io/microsoft-authentication-library-for-js/ref/modules/_azure_msal_common.html#commonauthorizationurlrequest\",\r\n [invalidClaims]: \"Given claims parameter must be a stringified JSON object.\",\r\n [tokenRequestEmpty]: \"Token request was empty and not found in cache.\",\r\n [logoutRequestEmpty]: \"The logout request was null or undefined.\",\r\n [invalidCodeChallengeMethod]: 'code_challenge_method passed is invalid. Valid values are \"plain\" and \"S256\".',\r\n [pkceParamsMissing]: \"Both params: code_challenge and code_challenge_method are to be passed if to be sent in the request\",\r\n [invalidCloudDiscoveryMetadata]: \"Invalid cloudDiscoveryMetadata provided. Must be a stringified JSON object containing tenant_discovery_endpoint and metadata fields\",\r\n [invalidAuthorityMetadata]: \"Invalid authorityMetadata provided. Must by a stringified JSON object containing authorization_endpoint, token_endpoint, issuer fields.\",\r\n [untrustedAuthority]: \"The provided authority is not a trusted authority. Please include this authority in the knownAuthorities config parameter.\",\r\n [missingSshJwk]: \"Missing sshJwk in SSH certificate request. A stringified JSON Web Key is required when using the SSH authentication scheme.\",\r\n [missingSshKid]: \"Missing sshKid in SSH certificate request. A string that uniquely identifies the public SSH key is required when using the SSH authentication scheme.\",\r\n [missingNonceAuthenticationHeader]: \"Unable to find an authentication header containing server nonce. Either the Authentication-Info or WWW-Authenticate headers must be present in order to obtain a server nonce.\",\r\n [invalidAuthenticationHeader]: \"Invalid authentication header provided\",\r\n [cannotSetOIDCOptions]: \"Cannot set OIDCOptions parameter. Please change the protocol mode to OIDC or use a non-Microsoft authority.\",\r\n [cannotAllowNativeBroker]: \"Cannot set allowNativeBroker parameter to true when not in AAD protocol mode.\",\r\n [authorityMismatch]: \"Authority mismatch error. Authority provided in login request or PublicClientApplication config does not match the environment of the provided account. Please use a matching account or make an interactive request to login to this authority.\",\r\n};\r\n/**\r\n * ClientConfigurationErrorMessage class containing string constants used by error codes and messages.\r\n * @deprecated Use ClientConfigurationErrorCodes instead\r\n */\r\nconst ClientConfigurationErrorMessage = {\r\n redirectUriNotSet: {\r\n code: redirectUriEmpty,\r\n desc: ClientConfigurationErrorMessages[redirectUriEmpty],\r\n },\r\n claimsRequestParsingError: {\r\n code: claimsRequestParsingError,\r\n desc: ClientConfigurationErrorMessages[claimsRequestParsingError],\r\n },\r\n authorityUriInsecure: {\r\n code: authorityUriInsecure,\r\n desc: ClientConfigurationErrorMessages[authorityUriInsecure],\r\n },\r\n urlParseError: {\r\n code: urlParseError,\r\n desc: ClientConfigurationErrorMessages[urlParseError],\r\n },\r\n urlEmptyError: {\r\n code: urlEmptyError,\r\n desc: ClientConfigurationErrorMessages[urlEmptyError],\r\n },\r\n emptyScopesError: {\r\n code: emptyInputScopesError,\r\n desc: ClientConfigurationErrorMessages[emptyInputScopesError],\r\n },\r\n invalidPrompt: {\r\n code: invalidPromptValue,\r\n desc: ClientConfigurationErrorMessages[invalidPromptValue],\r\n },\r\n invalidClaimsRequest: {\r\n code: invalidClaims,\r\n desc: ClientConfigurationErrorMessages[invalidClaims],\r\n },\r\n tokenRequestEmptyError: {\r\n code: tokenRequestEmpty,\r\n desc: ClientConfigurationErrorMessages[tokenRequestEmpty],\r\n },\r\n logoutRequestEmptyError: {\r\n code: logoutRequestEmpty,\r\n desc: ClientConfigurationErrorMessages[logoutRequestEmpty],\r\n },\r\n invalidCodeChallengeMethod: {\r\n code: invalidCodeChallengeMethod,\r\n desc: ClientConfigurationErrorMessages[invalidCodeChallengeMethod],\r\n },\r\n invalidCodeChallengeParams: {\r\n code: pkceParamsMissing,\r\n desc: ClientConfigurationErrorMessages[pkceParamsMissing],\r\n },\r\n invalidCloudDiscoveryMetadata: {\r\n code: invalidCloudDiscoveryMetadata,\r\n desc: ClientConfigurationErrorMessages[invalidCloudDiscoveryMetadata],\r\n },\r\n invalidAuthorityMetadata: {\r\n code: invalidAuthorityMetadata,\r\n desc: ClientConfigurationErrorMessages[invalidAuthorityMetadata],\r\n },\r\n untrustedAuthority: {\r\n code: untrustedAuthority,\r\n desc: ClientConfigurationErrorMessages[untrustedAuthority],\r\n },\r\n missingSshJwk: {\r\n code: missingSshJwk,\r\n desc: ClientConfigurationErrorMessages[missingSshJwk],\r\n },\r\n missingSshKid: {\r\n code: missingSshKid,\r\n desc: ClientConfigurationErrorMessages[missingSshKid],\r\n },\r\n missingNonceAuthenticationHeader: {\r\n code: missingNonceAuthenticationHeader,\r\n desc: ClientConfigurationErrorMessages[missingNonceAuthenticationHeader],\r\n },\r\n invalidAuthenticationHeader: {\r\n code: invalidAuthenticationHeader,\r\n desc: ClientConfigurationErrorMessages[invalidAuthenticationHeader],\r\n },\r\n cannotSetOIDCOptions: {\r\n code: cannotSetOIDCOptions,\r\n desc: ClientConfigurationErrorMessages[cannotSetOIDCOptions],\r\n },\r\n cannotAllowNativeBroker: {\r\n code: cannotAllowNativeBroker,\r\n desc: ClientConfigurationErrorMessages[cannotAllowNativeBroker],\r\n },\r\n authorityMismatch: {\r\n code: authorityMismatch,\r\n desc: ClientConfigurationErrorMessages[authorityMismatch],\r\n },\r\n};\r\n/**\r\n * Error thrown when there is an error in configuration of the MSAL.js library.\r\n */\r\nclass ClientConfigurationError extends AuthError {\r\n constructor(errorCode) {\r\n super(errorCode, ClientConfigurationErrorMessages[errorCode]);\r\n this.name = \"ClientConfigurationError\";\r\n Object.setPrototypeOf(this, ClientConfigurationError.prototype);\r\n }\r\n}\r\nfunction createClientConfigurationError(errorCode) {\r\n return new ClientConfigurationError(errorCode);\r\n}\n\nexport { ClientConfigurationError, ClientConfigurationErrorMessage, ClientConfigurationErrorMessages, createClientConfigurationError };\n//# sourceMappingURL=ClientConfigurationError.mjs.map\n","/*! @azure/msal-common v14.16.1 2025-08-05 */\n'use strict';\n/*\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License.\r\n */\r\n/**\r\n * @hidden\r\n */\r\nclass StringUtils {\r\n /**\r\n * Check if stringified object is empty\r\n * @param strObj\r\n */\r\n static isEmptyObj(strObj) {\r\n if (strObj) {\r\n try {\r\n const obj = JSON.parse(strObj);\r\n return Object.keys(obj).length === 0;\r\n }\r\n catch (e) { }\r\n }\r\n return true;\r\n }\r\n static startsWith(str, search) {\r\n return str.indexOf(search) === 0;\r\n }\r\n static endsWith(str, search) {\r\n return (str.length >= search.length &&\r\n str.lastIndexOf(search) === str.length - search.length);\r\n }\r\n /**\r\n * Parses string into an object.\r\n *\r\n * @param query\r\n */\r\n static queryStringToObject(query) {\r\n const obj = {};\r\n const params = query.split(\"&\");\r\n const decode = (s) => decodeURIComponent(s.replace(/\\+/g, \" \"));\r\n params.forEach((pair) => {\r\n if (pair.trim()) {\r\n const [key, value] = pair.split(/=(.+)/g, 2); // Split on the first occurence of the '=' character\r\n if (key && value) {\r\n obj[decode(key)] = decode(value);\r\n }\r\n }\r\n });\r\n return obj;\r\n }\r\n /**\r\n * Trims entries in an array.\r\n *\r\n * @param arr\r\n */\r\n static trimArrayEntries(arr) {\r\n return arr.map((entry) => entry.trim());\r\n }\r\n /**\r\n * Removes empty strings from array\r\n * @param arr\r\n */\r\n static removeEmptyStringsFromArray(arr) {\r\n return arr.filter((entry) => {\r\n return !!entry;\r\n });\r\n }\r\n /**\r\n * Attempts to parse a string into JSON\r\n * @param str\r\n */\r\n static jsonParseHelper(str) {\r\n try {\r\n return JSON.parse(str);\r\n }\r\n catch (e) {\r\n return null;\r\n }\r\n }\r\n /**\r\n * Tests if a given string matches a given pattern, with support for wildcards and queries.\r\n * @param pattern Wildcard pattern to string match. Supports \"*\" for wildcards and \"?\" for queries\r\n * @param input String to match against\r\n */\r\n static matchPattern(pattern, input) {\r\n /**\r\n * Wildcard support: https://stackoverflow.com/a/3117248/4888559\r\n * Queries: replaces \"?\" in string with escaped \"\\?\" for regex test\r\n */\r\n // eslint-disable-next-line security/detect-non-literal-regexp\r\n const regex = new RegExp(pattern\r\n .replace(/\\\\/g, \"\\\\\\\\\")\r\n .replace(/\\*/g, \"[^ ]*\")\r\n .replace(/\\?/g, \"\\\\?\"));\r\n return regex.test(input);\r\n }\r\n}\n\nexport { StringUtils };\n//# sourceMappingURL=StringUtils.mjs.map\n","/*! @azure/msal-common v14.16.1 2025-08-05 */\n'use strict';\nimport { createClientConfigurationError } from '../error/ClientConfigurationError.mjs';\nimport { StringUtils } from '../utils/StringUtils.mjs';\nimport { createClientAuthError } from '../error/ClientAuthError.mjs';\nimport { Constants, OIDC_SCOPES } from '../utils/Constants.mjs';\nimport { emptyInputScopesError } from '../error/ClientConfigurationErrorCodes.mjs';\nimport { cannotAppendScopeSet, cannotRemoveEmptyScope, emptyInputScopeSet } from '../error/ClientAuthErrorCodes.mjs';\n\n/*\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License.\r\n */\r\n/**\r\n * The ScopeSet class creates a set of scopes. Scopes are case-insensitive, unique values, so the Set object in JS makes\r\n * the most sense to implement for this class. All scopes are trimmed and converted to lower case strings in intersection and union functions\r\n * to ensure uniqueness of strings.\r\n */\r\nclass ScopeSet {\r\n constructor(inputScopes) {\r\n // Filter empty string and null/undefined array items\r\n const scopeArr = inputScopes\r\n ? StringUtils.trimArrayEntries([...inputScopes])\r\n : [];\r\n const filteredInput = scopeArr\r\n ? StringUtils.removeEmptyStringsFromArray(scopeArr)\r\n : [];\r\n // Validate and filter scopes (validate function throws if validation fails)\r\n this.validateInputScopes(filteredInput);\r\n this.scopes = new Set(); // Iterator in constructor not supported by IE11\r\n filteredInput.forEach((scope) => this.scopes.add(scope));\r\n }\r\n /**\r\n * Factory method to create ScopeSet from space-delimited string\r\n * @param inputScopeString\r\n * @param appClientId\r\n * @param scopesRequired\r\n */\r\n static fromString(inputScopeString) {\r\n const scopeString = inputScopeString || Constants.EMPTY_STRING;\r\n const inputScopes = scopeString.split(\" \");\r\n return new ScopeSet(inputScopes);\r\n }\r\n /**\r\n * Creates the set of scopes to search for in cache lookups\r\n * @param inputScopeString\r\n * @returns\r\n */\r\n static createSearchScopes(inputScopeString) {\r\n const scopeSet = new ScopeSet(inputScopeString);\r\n if (!scopeSet.containsOnlyOIDCScopes()) {\r\n scopeSet.removeOIDCScopes();\r\n }\r\n else {\r\n scopeSet.removeScope(Constants.OFFLINE_ACCESS_SCOPE);\r\n }\r\n return scopeSet;\r\n }\r\n /**\r\n * Used to validate the scopes input parameter requested by the developer.\r\n * @param {Array} inputScopes - Developer requested permissions. Not all scopes are guaranteed to be included in the access token returned.\r\n * @param {boolean} scopesRequired - Boolean indicating whether the scopes array is required or not\r\n */\r\n validateInputScopes(inputScopes) {\r\n // Check if scopes are required but not given or is an empty array\r\n if (!inputScopes || inputScopes.length < 1) {\r\n throw createClientConfigurationError(emptyInputScopesError);\r\n }\r\n }\r\n /**\r\n * Check if a given scope is present in this set of scopes.\r\n * @param scope\r\n */\r\n containsScope(scope) {\r\n const lowerCaseScopes = this.printScopesLowerCase().split(\" \");\r\n const lowerCaseScopesSet = new ScopeSet(lowerCaseScopes);\r\n // compare lowercase scopes\r\n return scope\r\n ? lowerCaseScopesSet.scopes.has(scope.toLowerCase())\r\n : false;\r\n }\r\n /**\r\n * Check if a set of scopes is present in this set of scopes.\r\n * @param scopeSet\r\n */\r\n containsScopeSet(scopeSet) {\r\n if (!scopeSet || scopeSet.scopes.size <= 0) {\r\n return false;\r\n }\r\n return (this.scopes.size >= scopeSet.scopes.size &&\r\n scopeSet.asArray().every((scope) => this.containsScope(scope)));\r\n }\r\n /**\r\n * Check if set of scopes contains only the defaults\r\n */\r\n containsOnlyOIDCScopes() {\r\n let defaultScopeCount = 0;\r\n OIDC_SCOPES.forEach((defaultScope) => {\r\n if (this.containsScope(defaultScope)) {\r\n defaultScopeCount += 1;\r\n }\r\n });\r\n return this.scopes.size === defaultScopeCount;\r\n }\r\n /**\r\n * Appends single scope if passed\r\n * @param newScope\r\n */\r\n appendScope(newScope) {\r\n if (newScope) {\r\n this.scopes.add(newScope.trim());\r\n }\r\n }\r\n /**\r\n * Appends multiple scopes if passed\r\n * @param newScopes\r\n */\r\n appendScopes(newScopes) {\r\n try {\r\n newScopes.forEach((newScope) => this.appendScope(newScope));\r\n }\r\n catch (e) {\r\n throw createClientAuthError(cannotAppendScopeSet);\r\n }\r\n }\r\n /**\r\n * Removes element from set of scopes.\r\n * @param scope\r\n */\r\n removeScope(scope) {\r\n if (!scope) {\r\n throw createClientAuthError(cannotRemoveEmptyScope);\r\n }\r\n this.scopes.delete(scope.trim());\r\n }\r\n /**\r\n * Removes default scopes from set of scopes\r\n * Primarily used to prevent cache misses if the default scopes are not returned from the server\r\n */\r\n removeOIDCScopes() {\r\n OIDC_SCOPES.forEach((defaultScope) => {\r\n this.scopes.delete(defaultScope);\r\n });\r\n }\r\n /**\r\n * Combines an array of scopes with the current set of scopes.\r\n * @param otherScopes\r\n */\r\n unionScopeSets(otherScopes) {\r\n if (!otherScopes) {\r\n throw createClientAuthError(emptyInputScopeSet);\r\n }\r\n const unionScopes = new Set(); // Iterator in constructor not supported in IE11\r\n otherScopes.scopes.forEach((scope) => unionScopes.add(scope.toLowerCase()));\r\n this.scopes.forEach((scope) => unionScopes.add(scope.toLowerCase()));\r\n return unionScopes;\r\n }\r\n /**\r\n * Check if scopes intersect between this set and another.\r\n * @param otherScopes\r\n */\r\n intersectingScopeSets(otherScopes) {\r\n if (!otherScopes) {\r\n throw createClientAuthError(emptyInputScopeSet);\r\n }\r\n // Do not allow OIDC scopes to be the only intersecting scopes\r\n if (!otherScopes.containsOnlyOIDCScopes()) {\r\n otherScopes.removeOIDCScopes();\r\n }\r\n const unionScopes = this.unionScopeSets(otherScopes);\r\n const sizeOtherScopes = otherScopes.getScopeCount();\r\n const sizeThisScopes = this.getScopeCount();\r\n const sizeUnionScopes = unionScopes.size;\r\n return sizeUnionScopes < sizeThisScopes + sizeOtherScopes;\r\n }\r\n /**\r\n * Returns size of set of scopes.\r\n */\r\n getScopeCount() {\r\n return this.scopes.size;\r\n }\r\n /**\r\n * Returns the scopes as an array of string values\r\n */\r\n asArray() {\r\n const array = [];\r\n this.scopes.forEach((val) => array.push(val));\r\n return array;\r\n }\r\n /**\r\n * Prints scopes into a space-delimited string\r\n */\r\n printScopes() {\r\n if (this.scopes) {\r\n const scopeArr = this.asArray();\r\n return scopeArr.join(\" \");\r\n }\r\n return Constants.EMPTY_STRING;\r\n }\r\n /**\r\n * Prints scopes into a space-delimited lower-case string (used for caching)\r\n */\r\n printScopesLowerCase() {\r\n return this.printScopes().toLowerCase();\r\n }\r\n}\n\nexport { ScopeSet };\n//# sourceMappingURL=ScopeSet.mjs.map\n","/*! @azure/msal-common v14.16.1 2025-08-05 */\n'use strict';\nimport { createClientAuthError } from '../error/ClientAuthError.mjs';\nimport { Separators, Constants } from '../utils/Constants.mjs';\nimport { clientInfoEmptyError, clientInfoDecodingError } from '../error/ClientAuthErrorCodes.mjs';\n\n/*\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License.\r\n */\r\n/**\r\n * Function to build a client info object from server clientInfo string\r\n * @param rawClientInfo\r\n * @param crypto\r\n */\r\nfunction buildClientInfo(rawClientInfo, base64Decode) {\r\n if (!rawClientInfo) {\r\n throw createClientAuthError(clientInfoEmptyError);\r\n }\r\n try {\r\n const decodedClientInfo = base64Decode(rawClientInfo);\r\n return JSON.parse(decodedClientInfo);\r\n }\r\n catch (e) {\r\n throw createClientAuthError(clientInfoDecodingError);\r\n }\r\n}\r\n/**\r\n * Function to build a client info object from cached homeAccountId string\r\n * @param homeAccountId\r\n */\r\nfunction buildClientInfoFromHomeAccountId(homeAccountId) {\r\n if (!homeAccountId) {\r\n throw createClientAuthError(clientInfoDecodingError);\r\n }\r\n const clientInfoParts = homeAccountId.split(Separators.CLIENT_INFO_SEPARATOR, 2);\r\n return {\r\n uid: clientInfoParts[0],\r\n utid: clientInfoParts.length < 2\r\n ? Constants.EMPTY_STRING\r\n : clientInfoParts[1],\r\n };\r\n}\n\nexport { buildClientInfo, buildClientInfoFromHomeAccountId };\n//# sourceMappingURL=ClientInfo.mjs.map\n","/*! @azure/msal-common v14.16.1 2025-08-05 */\n'use strict';\n/*\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License.\r\n */\r\n/**\r\n * Returns true if tenantId matches the utid portion of homeAccountId\r\n * @param tenantId\r\n * @param homeAccountId\r\n * @returns\r\n */\r\nfunction tenantIdMatchesHomeTenant(tenantId, homeAccountId) {\r\n return (!!tenantId &&\r\n !!homeAccountId &&\r\n tenantId === homeAccountId.split(\".\")[1]);\r\n}\r\n/**\r\n * Build tenant profile\r\n * @param homeAccountId - Home account identifier for this account object\r\n * @param localAccountId - Local account identifer for this account object\r\n * @param tenantId - Full tenant or organizational id that this account belongs to\r\n * @param idTokenClaims - Claims from the ID token\r\n * @returns\r\n */\r\nfunction buildTenantProfile(homeAccountId, localAccountId, tenantId, idTokenClaims) {\r\n if (idTokenClaims) {\r\n const { oid, sub, tid, name, tfp, acr } = idTokenClaims;\r\n /**\r\n * Since there is no way to determine if the authority is AAD or B2C, we exhaust all the possible claims that can serve as tenant ID with the following precedence:\r\n * tid - TenantID claim that identifies the tenant that issued the token in AAD. Expected in all AAD ID tokens, not present in B2C ID Tokens.\r\n * tfp - Trust Framework Policy claim that identifies the policy that was used to authenticate the user. Functions as tenant for B2C scenarios.\r\n * acr - Authentication Context Class Reference claim used only with older B2C policies. Fallback in case tfp is not present, but likely won't be present anyway.\r\n */\r\n const tenantId = tid || tfp || acr || \"\";\r\n return {\r\n tenantId: tenantId,\r\n localAccountId: oid || sub || \"\",\r\n name: name,\r\n isHomeTenant: tenantIdMatchesHomeTenant(tenantId, homeAccountId),\r\n };\r\n }\r\n else {\r\n return {\r\n tenantId,\r\n localAccountId,\r\n isHomeTenant: tenantIdMatchesHomeTenant(tenantId, homeAccountId),\r\n };\r\n }\r\n}\r\n/**\r\n * Replaces account info that varies by tenant profile sourced from the ID token claims passed in with the tenant-specific account info\r\n * @param baseAccountInfo\r\n * @param idTokenClaims\r\n * @returns\r\n */\r\nfunction updateAccountTenantProfileData(baseAccountInfo, tenantProfile, idTokenClaims, idTokenSecret) {\r\n let updatedAccountInfo = baseAccountInfo;\r\n // Tenant Profile overrides passed in account info\r\n if (tenantProfile) {\r\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\r\n const { isHomeTenant, ...tenantProfileOverride } = tenantProfile;\r\n updatedAccountInfo = { ...baseAccountInfo, ...tenantProfileOverride };\r\n }\r\n // ID token claims override passed in account info and tenant profile\r\n if (idTokenClaims) {\r\n // Ignore isHomeTenant, loginHint, and sid which are part of tenant profile but not base account info\r\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\r\n const { isHomeTenant, ...claimsSourcedTenantProfile } = buildTenantProfile(baseAccountInfo.homeAccountId, baseAccountInfo.localAccountId, baseAccountInfo.tenantId, idTokenClaims);\r\n updatedAccountInfo = {\r\n ...updatedAccountInfo,\r\n ...claimsSourcedTenantProfile,\r\n idTokenClaims: idTokenClaims,\r\n idToken: idTokenSecret,\r\n };\r\n return updatedAccountInfo;\r\n }\r\n return updatedAccountInfo;\r\n}\n\nexport { buildTenantProfile, tenantIdMatchesHomeTenant, updateAccountTenantProfileData };\n//# sourceMappingURL=AccountInfo.mjs.map\n","/*! @azure/msal-common v14.16.1 2025-08-05 */\n'use strict';\n/*\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License.\r\n */\r\n/**\r\n * Authority types supported by MSAL.\r\n */\r\nconst AuthorityType = {\r\n Default: 0,\r\n Adfs: 1,\r\n Dsts: 2,\r\n Ciam: 3,\r\n};\n\nexport { AuthorityType };\n//# sourceMappingURL=AuthorityType.mjs.map\n","/*! @azure/msal-common v14.16.1 2025-08-05 */\n'use strict';\n/*\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License.\r\n */\r\n/**\r\n * Gets tenantId from available ID token claims to set as credential realm with the following precedence:\r\n * 1. tid - if the token is acquired from an Azure AD tenant tid will be present\r\n * 2. tfp - if the token is acquired from a modern B2C tenant tfp should be present\r\n * 3. acr - if the token is acquired from a legacy B2C tenant acr should be present\r\n * Downcased to match the realm case-insensitive comparison requirements\r\n * @param idTokenClaims\r\n * @returns\r\n */\r\nfunction getTenantIdFromIdTokenClaims(idTokenClaims) {\r\n if (idTokenClaims) {\r\n const tenantId = idTokenClaims.tid || idTokenClaims.tfp || idTokenClaims.acr;\r\n return tenantId || null;\r\n }\r\n return null;\r\n}\n\nexport { getTenantIdFromIdTokenClaims };\n//# sourceMappingURL=TokenClaims.mjs.map\n","/*! @azure/msal-common v14.16.1 2025-08-05 */\n'use strict';\n/*\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License.\r\n */\r\n/**\r\n * Protocol modes supported by MSAL.\r\n */\r\nconst ProtocolMode = {\r\n AAD: \"AAD\",\r\n OIDC: \"OIDC\",\r\n};\n\nexport { ProtocolMode };\n//# sourceMappingURL=ProtocolMode.mjs.map\n","/*! @azure/msal-common v14.16.1 2025-08-05 */\n'use strict';\nimport { Separators, CacheAccountType } from '../../utils/Constants.mjs';\nimport { buildClientInfo } from '../../account/ClientInfo.mjs';\nimport { buildTenantProfile } from '../../account/AccountInfo.mjs';\nimport { createClientAuthError } from '../../error/ClientAuthError.mjs';\nimport { AuthorityType } from '../../authority/AuthorityType.mjs';\nimport { getTenantIdFromIdTokenClaims } from '../../account/TokenClaims.mjs';\nimport { ProtocolMode } from '../../authority/ProtocolMode.mjs';\nimport { invalidCacheEnvironment } from '../../error/ClientAuthErrorCodes.mjs';\n\n/*\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License.\r\n */\r\n/**\r\n * Type that defines required and optional parameters for an Account field (based on universal cache schema implemented by all MSALs).\r\n *\r\n * Key : Value Schema\r\n *\r\n * Key: --\r\n *\r\n * Value Schema:\r\n * {\r\n * homeAccountId: home account identifier for the auth scheme,\r\n * environment: entity that issued the token, represented as a full host\r\n * realm: Full tenant or organizational identifier that the account belongs to\r\n * localAccountId: Original tenant-specific accountID, usually used for legacy cases\r\n * username: primary username that represents the user, usually corresponds to preferred_username in the v2 endpt\r\n * authorityType: Accounts authority type as a string\r\n * name: Full name for the account, including given name and family name,\r\n * lastModificationTime: last time this entity was modified in the cache\r\n * lastModificationApp:\r\n * nativeAccountId: Account identifier on the native device\r\n * tenantProfiles: Array of tenant profile objects for each tenant that the account has authenticated with in the browser\r\n * }\r\n * @internal\r\n */\r\nclass AccountEntity {\r\n /**\r\n * Generate Account Id key component as per the schema: -\r\n */\r\n generateAccountId() {\r\n const accountId = [this.homeAccountId, this.environment];\r\n return accountId.join(Separators.CACHE_KEY_SEPARATOR).toLowerCase();\r\n }\r\n /**\r\n * Generate Account Cache Key as per the schema: --\r\n */\r\n generateAccountKey() {\r\n return AccountEntity.generateAccountCacheKey({\r\n homeAccountId: this.homeAccountId,\r\n environment: this.environment,\r\n tenantId: this.realm,\r\n username: this.username,\r\n localAccountId: this.localAccountId,\r\n });\r\n }\r\n /**\r\n * Returns the AccountInfo interface for this account.\r\n */\r\n getAccountInfo() {\r\n return {\r\n homeAccountId: this.homeAccountId,\r\n environment: this.environment,\r\n tenantId: this.realm,\r\n username: this.username,\r\n localAccountId: this.localAccountId,\r\n name: this.name,\r\n nativeAccountId: this.nativeAccountId,\r\n authorityType: this.authorityType,\r\n // Deserialize tenant profiles array into a Map\r\n tenantProfiles: new Map((this.tenantProfiles || []).map((tenantProfile) => {\r\n return [tenantProfile.tenantId, tenantProfile];\r\n })),\r\n };\r\n }\r\n /**\r\n * Returns true if the account entity is in single tenant format (outdated), false otherwise\r\n */\r\n isSingleTenant() {\r\n return !this.tenantProfiles;\r\n }\r\n /**\r\n * Generates account key from interface\r\n * @param accountInterface\r\n */\r\n static generateAccountCacheKey(accountInterface) {\r\n const homeTenantId = accountInterface.homeAccountId.split(\".\")[1];\r\n const accountKey = [\r\n accountInterface.homeAccountId,\r\n accountInterface.environment || \"\",\r\n homeTenantId || accountInterface.tenantId || \"\",\r\n ];\r\n return accountKey.join(Separators.CACHE_KEY_SEPARATOR).toLowerCase();\r\n }\r\n /**\r\n * Build Account cache from IdToken, clientInfo and authority/policy. Associated with AAD.\r\n * @param accountDetails\r\n */\r\n static createAccount(accountDetails, authority, base64Decode) {\r\n const account = new AccountEntity();\r\n if (authority.authorityType === AuthorityType.Adfs) {\r\n account.authorityType = CacheAccountType.ADFS_ACCOUNT_TYPE;\r\n }\r\n else if (authority.protocolMode === ProtocolMode.AAD) {\r\n account.authorityType = CacheAccountType.MSSTS_ACCOUNT_TYPE;\r\n }\r\n else {\r\n account.authorityType = CacheAccountType.GENERIC_ACCOUNT_TYPE;\r\n }\r\n let clientInfo;\r\n if (accountDetails.clientInfo && base64Decode) {\r\n clientInfo = buildClientInfo(accountDetails.clientInfo, base64Decode);\r\n }\r\n account.clientInfo = accountDetails.clientInfo;\r\n account.homeAccountId = accountDetails.homeAccountId;\r\n account.nativeAccountId = accountDetails.nativeAccountId;\r\n const env = accountDetails.environment ||\r\n (authority && authority.getPreferredCache());\r\n if (!env) {\r\n throw createClientAuthError(invalidCacheEnvironment);\r\n }\r\n account.environment = env;\r\n // non AAD scenarios can have empty realm\r\n account.realm =\r\n clientInfo?.utid ||\r\n getTenantIdFromIdTokenClaims(accountDetails.idTokenClaims) ||\r\n \"\";\r\n // How do you account for MSA CID here?\r\n account.localAccountId =\r\n clientInfo?.uid ||\r\n accountDetails.idTokenClaims?.oid ||\r\n accountDetails.idTokenClaims?.sub ||\r\n \"\";\r\n /*\r\n * In B2C scenarios the emails claim is used instead of preferred_username and it is an array.\r\n * In most cases it will contain a single email. This field should not be relied upon if a custom\r\n * policy is configured to return more than 1 email.\r\n */\r\n const preferredUsername = accountDetails.idTokenClaims?.preferred_username ||\r\n accountDetails.idTokenClaims?.upn;\r\n const email = accountDetails.idTokenClaims?.emails\r\n ? accountDetails.idTokenClaims.emails[0]\r\n : null;\r\n account.username = preferredUsername || email || \"\";\r\n account.name = accountDetails.idTokenClaims?.name || \"\";\r\n account.cloudGraphHostName = accountDetails.cloudGraphHostName;\r\n account.msGraphHost = accountDetails.msGraphHost;\r\n if (accountDetails.tenantProfiles) {\r\n account.tenantProfiles = accountDetails.tenantProfiles;\r\n }\r\n else {\r\n const tenantProfile = buildTenantProfile(accountDetails.homeAccountId, account.localAccountId, account.realm, accountDetails.idTokenClaims);\r\n account.tenantProfiles = [tenantProfile];\r\n }\r\n return account;\r\n }\r\n /**\r\n * Creates an AccountEntity object from AccountInfo\r\n * @param accountInfo\r\n * @param cloudGraphHostName\r\n * @param msGraphHost\r\n * @returns\r\n */\r\n static createFromAccountInfo(accountInfo, cloudGraphHostName, msGraphHost) {\r\n const account = new AccountEntity();\r\n account.authorityType =\r\n accountInfo.authorityType || CacheAccountType.GENERIC_ACCOUNT_TYPE;\r\n account.homeAccountId = accountInfo.homeAccountId;\r\n account.localAccountId = accountInfo.localAccountId;\r\n account.nativeAccountId = accountInfo.nativeAccountId;\r\n account.realm = accountInfo.tenantId;\r\n account.environment = accountInfo.environment;\r\n account.username = accountInfo.username;\r\n account.name = accountInfo.name;\r\n account.cloudGraphHostName = cloudGraphHostName;\r\n account.msGraphHost = msGraphHost;\r\n // Serialize tenant profiles map into an array\r\n account.tenantProfiles = Array.from(accountInfo.tenantProfiles?.values() || []);\r\n return account;\r\n }\r\n /**\r\n * Generate HomeAccountId from server response\r\n * @param serverClientInfo\r\n * @param authType\r\n */\r\n static generateHomeAccountId(serverClientInfo, authType, logger, cryptoObj, idTokenClaims) {\r\n // since ADFS/DSTS do not have tid and does not set client_info\r\n if (!(authType === AuthorityType.Adfs ||\r\n authType === AuthorityType.Dsts)) {\r\n // for cases where there is clientInfo\r\n if (serverClientInfo) {\r\n try {\r\n const clientInfo = buildClientInfo(serverClientInfo, cryptoObj.base64Decode);\r\n if (clientInfo.uid && clientInfo.utid) {\r\n return `${clientInfo.uid}.${clientInfo.utid}`;\r\n }\r\n }\r\n catch (e) { }\r\n }\r\n logger.warning(\"No client info in response\");\r\n }\r\n // default to \"sub\" claim\r\n return idTokenClaims?.sub || \"\";\r\n }\r\n /**\r\n * Validates an entity: checks for all expected params\r\n * @param entity\r\n */\r\n static isAccountEntity(entity) {\r\n if (!entity) {\r\n return false;\r\n }\r\n return (entity.hasOwnProperty(\"homeAccountId\") &&\r\n entity.hasOwnProperty(\"environment\") &&\r\n entity.hasOwnProperty(\"realm\") &&\r\n entity.hasOwnProperty(\"localAccountId\") &&\r\n entity.hasOwnProperty(\"username\") &&\r\n entity.hasOwnProperty(\"authorityType\"));\r\n }\r\n /**\r\n * Helper function to determine whether 2 accountInfo objects represent the same account\r\n * @param accountA\r\n * @param accountB\r\n * @param compareClaims - If set to true idTokenClaims will also be compared to determine account equality\r\n */\r\n static accountInfoIsEqual(accountA, accountB, compareClaims) {\r\n if (!accountA || !accountB) {\r\n return false;\r\n }\r\n let claimsMatch = true; // default to true so as to not fail comparison below if compareClaims: false\r\n if (compareClaims) {\r\n const accountAClaims = (accountA.idTokenClaims ||\r\n {});\r\n const accountBClaims = (accountB.idTokenClaims ||\r\n {});\r\n // issued at timestamp and nonce are expected to change each time a new id token is acquired\r\n claimsMatch =\r\n accountAClaims.iat === accountBClaims.iat &&\r\n accountAClaims.nonce === accountBClaims.nonce;\r\n }\r\n return (accountA.homeAccountId === accountB.homeAccountId &&\r\n accountA.localAccountId === accountB.localAccountId &&\r\n accountA.username === accountB.username &&\r\n accountA.tenantId === accountB.tenantId &&\r\n accountA.environment === accountB.environment &&\r\n accountA.nativeAccountId === accountB.nativeAccountId &&\r\n claimsMatch);\r\n }\r\n}\n\nexport { AccountEntity };\n//# sourceMappingURL=AccountEntity.mjs.map\n","/*! @azure/msal-common v14.16.1 2025-08-05 */\n'use strict';\nimport { createClientAuthError } from '../error/ClientAuthError.mjs';\nimport { hashNotDeserialized } from '../error/ClientAuthErrorCodes.mjs';\n\n/*\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License.\r\n */\r\n/**\r\n * Parses hash string from given string. Returns empty string if no hash symbol is found.\r\n * @param hashString\r\n */\r\nfunction stripLeadingHashOrQuery(responseString) {\r\n if (responseString.startsWith(\"#/\")) {\r\n return responseString.substring(2);\r\n }\r\n else if (responseString.startsWith(\"#\") ||\r\n responseString.startsWith(\"?\")) {\r\n return responseString.substring(1);\r\n }\r\n return responseString;\r\n}\r\n/**\r\n * Returns URL hash as server auth code response object.\r\n */\r\nfunction getDeserializedResponse(responseString) {\r\n // Check if given hash is empty\r\n if (!responseString || responseString.indexOf(\"=\") < 0) {\r\n return null;\r\n }\r\n try {\r\n // Strip the # or ? symbol if present\r\n const normalizedResponse = stripLeadingHashOrQuery(responseString);\r\n // If # symbol was not present, above will return empty string, so give original hash value\r\n const deserializedHash = Object.fromEntries(new URLSearchParams(normalizedResponse));\r\n // Check for known response properties\r\n if (deserializedHash.code ||\r\n deserializedHash.error ||\r\n deserializedHash.error_description ||\r\n deserializedHash.state) {\r\n return deserializedHash;\r\n }\r\n }\r\n catch (e) {\r\n throw createClientAuthError(hashNotDeserialized);\r\n }\r\n return null;\r\n}\n\nexport { getDeserializedResponse, stripLeadingHashOrQuery };\n//# sourceMappingURL=UrlUtils.mjs.map\n","/*! @azure/msal-common v14.16.1 2025-08-05 */\n'use strict';\nimport { createClientConfigurationError } from '../error/ClientConfigurationError.mjs';\nimport { StringUtils } from '../utils/StringUtils.mjs';\nimport { AADAuthorityConstants, Constants } from '../utils/Constants.mjs';\nimport { getDeserializedResponse } from '../utils/UrlUtils.mjs';\nimport { urlEmptyError, urlParseError, authorityUriInsecure } from '../error/ClientConfigurationErrorCodes.mjs';\n\n/*\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License.\r\n */\r\n/**\r\n * Url object class which can perform various transformations on url strings.\r\n */\r\nclass UrlString {\r\n get urlString() {\r\n return this._urlString;\r\n }\r\n constructor(url) {\r\n this._urlString = url;\r\n if (!this._urlString) {\r\n // Throws error if url is empty\r\n throw createClientConfigurationError(urlEmptyError);\r\n }\r\n if (!url.includes(\"#\")) {\r\n this._urlString = UrlString.canonicalizeUri(url);\r\n }\r\n }\r\n /**\r\n * Ensure urls are lower case and end with a / character.\r\n * @param url\r\n */\r\n static canonicalizeUri(url) {\r\n if (url) {\r\n let lowerCaseUrl = url.toLowerCase();\r\n if (StringUtils.endsWith(lowerCaseUrl, \"?\")) {\r\n lowerCaseUrl = lowerCaseUrl.slice(0, -1);\r\n }\r\n else if (StringUtils.endsWith(lowerCaseUrl, \"?/\")) {\r\n lowerCaseUrl = lowerCaseUrl.slice(0, -2);\r\n }\r\n if (!StringUtils.endsWith(lowerCaseUrl, \"/\")) {\r\n lowerCaseUrl += \"/\";\r\n }\r\n return lowerCaseUrl;\r\n }\r\n return url;\r\n }\r\n /**\r\n * Throws if urlString passed is not a valid authority URI string.\r\n */\r\n validateAsUri() {\r\n // Attempts to parse url for uri components\r\n let components;\r\n try {\r\n components = this.getUrlComponents();\r\n }\r\n catch (e) {\r\n throw createClientConfigurationError(urlParseError);\r\n }\r\n // Throw error if URI or path segments are not parseable.\r\n if (!components.HostNameAndPort || !components.PathSegments) {\r\n throw createClientConfigurationError(urlParseError);\r\n }\r\n // Throw error if uri is insecure.\r\n if (!components.Protocol ||\r\n components.Protocol.toLowerCase() !== \"https:\") {\r\n throw createClientConfigurationError(authorityUriInsecure);\r\n }\r\n }\r\n /**\r\n * Given a url and a query string return the url with provided query string appended\r\n * @param url\r\n * @param queryString\r\n */\r\n static appendQueryString(url, queryString) {\r\n if (!queryString) {\r\n return url;\r\n }\r\n return url.indexOf(\"?\") < 0\r\n ? `${url}?${queryString}`\r\n : `${url}&${queryString}`;\r\n }\r\n /**\r\n * Returns a url with the hash removed\r\n * @param url\r\n */\r\n static removeHashFromUrl(url) {\r\n return UrlString.canonicalizeUri(url.split(\"#\")[0]);\r\n }\r\n /**\r\n * Given a url like https://a:b/common/d?e=f#g, and a tenantId, returns https://a:b/tenantId/d\r\n * @param href The url\r\n * @param tenantId The tenant id to replace\r\n */\r\n replaceTenantPath(tenantId) {\r\n const urlObject = this.getUrlComponents();\r\n const pathArray = urlObject.PathSegments;\r\n if (tenantId &&\r\n pathArray.length !== 0 &&\r\n (pathArray[0] === AADAuthorityConstants.COMMON ||\r\n pathArray[0] === AADAuthorityConstants.ORGANIZATIONS)) {\r\n pathArray[0] = tenantId;\r\n }\r\n return UrlString.constructAuthorityUriFromObject(urlObject);\r\n }\r\n /**\r\n * Parses out the components from a url string.\r\n * @returns An object with the various components. Please cache this value insted of calling this multiple times on the same url.\r\n */\r\n getUrlComponents() {\r\n // https://gist.github.com/curtisz/11139b2cfcaef4a261e0\r\n const regEx = RegExp(\"^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\\\?([^#]*))?(#(.*))?\");\r\n // If url string does not match regEx, we throw an error\r\n const match = this.urlString.match(regEx);\r\n if (!match) {\r\n throw createClientConfigurationError(urlParseError);\r\n }\r\n // Url component object\r\n const urlComponents = {\r\n Protocol: match[1],\r\n HostNameAndPort: match[4],\r\n AbsolutePath: match[5],\r\n QueryString: match[7],\r\n };\r\n let pathSegments = urlComponents.AbsolutePath.split(\"/\");\r\n pathSegments = pathSegments.filter((val) => val && val.length > 0); // remove empty elements\r\n urlComponents.PathSegments = pathSegments;\r\n if (urlComponents.QueryString &&\r\n urlComponents.QueryString.endsWith(\"/\")) {\r\n urlComponents.QueryString = urlComponents.QueryString.substring(0, urlComponents.QueryString.length - 1);\r\n }\r\n return urlComponents;\r\n }\r\n static getDomainFromUrl(url) {\r\n const regEx = RegExp(\"^([^:/?#]+://)?([^/?#]*)\");\r\n const match = url.match(regEx);\r\n if (!match) {\r\n throw createClientConfigurationError(urlParseError);\r\n }\r\n return match[2];\r\n }\r\n static getAbsoluteUrl(relativeUrl, baseUrl) {\r\n if (relativeUrl[0] === Constants.FORWARD_SLASH) {\r\n const url = new UrlString(baseUrl);\r\n const baseComponents = url.getUrlComponents();\r\n return (baseComponents.Protocol +\r\n \"//\" +\r\n baseComponents.HostNameAndPort +\r\n relativeUrl);\r\n }\r\n return relativeUrl;\r\n }\r\n static constructAuthorityUriFromObject(urlObject) {\r\n return new UrlString(urlObject.Protocol +\r\n \"//\" +\r\n urlObject.HostNameAndPort +\r\n \"/\" +\r\n urlObject.PathSegments.join(\"/\"));\r\n }\r\n /**\r\n * Check if the hash of the URL string contains known properties\r\n * @deprecated This API will be removed in a future version\r\n */\r\n static hashContainsKnownProperties(response) {\r\n return !!getDeserializedResponse(response);\r\n }\r\n}\n\nexport { UrlString };\n//# sourceMappingURL=UrlString.mjs.map\n","/*! @azure/msal-common v14.16.1 2025-08-05 */\n'use strict';\nimport { UrlString } from '../url/UrlString.mjs';\nimport { AuthorityMetadataSource } from '../utils/Constants.mjs';\n\n/*\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License.\r\n */\r\nconst rawMetdataJSON = {\r\n endpointMetadata: {\r\n \"login.microsoftonline.com\": {\r\n token_endpoint: \"https://login.microsoftonline.com/{tenantid}/oauth2/v2.0/token\",\r\n jwks_uri: \"https://login.microsoftonline.com/{tenantid}/discovery/v2.0/keys\",\r\n issuer: \"https://login.microsoftonline.com/{tenantid}/v2.0\",\r\n authorization_endpoint: \"https://login.microsoftonline.com/{tenantid}/oauth2/v2.0/authorize\",\r\n end_session_endpoint: \"https://login.microsoftonline.com/{tenantid}/oauth2/v2.0/logout\",\r\n },\r\n \"login.chinacloudapi.cn\": {\r\n token_endpoint: \"https://login.chinacloudapi.cn/{tenantid}/oauth2/v2.0/token\",\r\n jwks_uri: \"https://login.chinacloudapi.cn/{tenantid}/discovery/v2.0/keys\",\r\n issuer: \"https://login.partner.microsoftonline.cn/{tenantid}/v2.0\",\r\n authorization_endpoint: \"https://login.chinacloudapi.cn/{tenantid}/oauth2/v2.0/authorize\",\r\n end_session_endpoint: \"https://login.chinacloudapi.cn/{tenantid}/oauth2/v2.0/logout\",\r\n },\r\n \"login.microsoftonline.us\": {\r\n token_endpoint: \"https://login.microsoftonline.us/{tenantid}/oauth2/v2.0/token\",\r\n jwks_uri: \"https://login.microsoftonline.us/{tenantid}/discovery/v2.0/keys\",\r\n issuer: \"https://login.microsoftonline.us/{tenantid}/v2.0\",\r\n authorization_endpoint: \"https://login.microsoftonline.us/{tenantid}/oauth2/v2.0/authorize\",\r\n end_session_endpoint: \"https://login.microsoftonline.us/{tenantid}/oauth2/v2.0/logout\",\r\n },\r\n },\r\n instanceDiscoveryMetadata: {\r\n tenant_discovery_endpoint: \"https://{canonicalAuthority}/v2.0/.well-known/openid-configuration\",\r\n metadata: [\r\n {\r\n preferred_network: \"login.microsoftonline.com\",\r\n preferred_cache: \"login.windows.net\",\r\n aliases: [\r\n \"login.microsoftonline.com\",\r\n \"login.windows.net\",\r\n \"login.microsoft.com\",\r\n \"sts.windows.net\",\r\n ],\r\n },\r\n {\r\n preferred_network: \"login.partner.microsoftonline.cn\",\r\n preferred_cache: \"login.partner.microsoftonline.cn\",\r\n aliases: [\r\n \"login.partner.microsoftonline.cn\",\r\n \"login.chinacloudapi.cn\",\r\n ],\r\n },\r\n {\r\n preferred_network: \"login.microsoftonline.de\",\r\n preferred_cache: \"login.microsoftonline.de\",\r\n aliases: [\"login.microsoftonline.de\"],\r\n },\r\n {\r\n preferred_network: \"login.microsoftonline.us\",\r\n preferred_cache: \"login.microsoftonline.us\",\r\n aliases: [\r\n \"login.microsoftonline.us\",\r\n \"login.usgovcloudapi.net\",\r\n ],\r\n },\r\n {\r\n preferred_network: \"login-us.microsoftonline.com\",\r\n preferred_cache: \"login-us.microsoftonline.com\",\r\n aliases: [\"login-us.microsoftonline.com\"],\r\n },\r\n ],\r\n },\r\n};\r\nconst EndpointMetadata = rawMetdataJSON.endpointMetadata;\r\nconst InstanceDiscoveryMetadata = rawMetdataJSON.instanceDiscoveryMetadata;\r\nconst InstanceDiscoveryMetadataAliases = new Set();\r\nInstanceDiscoveryMetadata.metadata.forEach((metadataEntry) => {\r\n metadataEntry.aliases.forEach((alias) => {\r\n InstanceDiscoveryMetadataAliases.add(alias);\r\n });\r\n});\r\n/**\r\n * Attempts to get an aliases array from the static authority metadata sources based on the canonical authority host\r\n * @param staticAuthorityOptions\r\n * @param logger\r\n * @returns\r\n */\r\nfunction getAliasesFromStaticSources(staticAuthorityOptions, logger) {\r\n let staticAliases;\r\n const canonicalAuthority = staticAuthorityOptions.canonicalAuthority;\r\n if (canonicalAuthority) {\r\n const authorityHost = new UrlString(canonicalAuthority).getUrlComponents().HostNameAndPort;\r\n staticAliases =\r\n getAliasesFromMetadata(authorityHost, staticAuthorityOptions.cloudDiscoveryMetadata?.metadata, AuthorityMetadataSource.CONFIG, logger) ||\r\n getAliasesFromMetadata(authorityHost, InstanceDiscoveryMetadata.metadata, AuthorityMetadataSource.HARDCODED_VALUES, logger) ||\r\n staticAuthorityOptions.knownAuthorities;\r\n }\r\n return staticAliases || [];\r\n}\r\n/**\r\n * Returns aliases for from the raw cloud discovery metadata passed in\r\n * @param authorityHost\r\n * @param rawCloudDiscoveryMetadata\r\n * @returns\r\n */\r\nfunction getAliasesFromMetadata(authorityHost, cloudDiscoveryMetadata, source, logger) {\r\n logger?.trace(`getAliasesFromMetadata called with source: ${source}`);\r\n if (authorityHost && cloudDiscoveryMetadata) {\r\n const metadata = getCloudDiscoveryMetadataFromNetworkResponse(cloudDiscoveryMetadata, authorityHost);\r\n if (metadata) {\r\n logger?.trace(`getAliasesFromMetadata: found cloud discovery metadata in ${source}, returning aliases`);\r\n return metadata.aliases;\r\n }\r\n else {\r\n logger?.trace(`getAliasesFromMetadata: did not find cloud discovery metadata in ${source}`);\r\n }\r\n }\r\n return null;\r\n}\r\n/**\r\n * Get cloud discovery metadata for common authorities\r\n */\r\nfunction getCloudDiscoveryMetadataFromHardcodedValues(authorityHost) {\r\n const metadata = getCloudDiscoveryMetadataFromNetworkResponse(InstanceDiscoveryMetadata.metadata, authorityHost);\r\n return metadata;\r\n}\r\n/**\r\n * Searches instance discovery network response for the entry that contains the host in the aliases list\r\n * @param response\r\n * @param authority\r\n */\r\nfunction getCloudDiscoveryMetadataFromNetworkResponse(response, authorityHost) {\r\n for (let i = 0; i < response.length; i++) {\r\n const metadata = response[i];\r\n if (metadata.aliases.includes(authorityHost)) {\r\n return metadata;\r\n }\r\n }\r\n return null;\r\n}\n\nexport { EndpointMetadata, InstanceDiscoveryMetadata, InstanceDiscoveryMetadataAliases, getAliasesFromMetadata, getAliasesFromStaticSources, getCloudDiscoveryMetadataFromHardcodedValues, getCloudDiscoveryMetadataFromNetworkResponse, rawMetdataJSON };\n//# sourceMappingURL=AuthorityMetadata.mjs.map\n","/*! @azure/msal-common v14.16.1 2025-08-05 */\n'use strict';\n/*\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License.\r\n */\r\nconst cacheQuotaExceeded = \"cache_quota_exceeded\";\r\nconst cacheErrorUnknown = \"cache_error_unknown\";\n\nexport { cacheErrorUnknown, cacheQuotaExceeded };\n//# sourceMappingURL=CacheErrorCodes.mjs.map\n","/*! @azure/msal-common v14.16.1 2025-08-05 */\n'use strict';\nimport { cacheErrorUnknown, cacheQuotaExceeded } from './CacheErrorCodes.mjs';\nimport * as CacheErrorCodes from './CacheErrorCodes.mjs';\nexport { CacheErrorCodes };\n\n/*\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License.\r\n */\r\nconst CacheErrorMessages = {\r\n [cacheQuotaExceeded]: \"Exceeded cache storage capacity.\",\r\n [cacheErrorUnknown]: \"Unexpected error occurred when using cache storage.\",\r\n};\r\n/**\r\n * Error thrown when there is an error with the cache\r\n */\r\nclass CacheError extends Error {\r\n constructor(errorCode, errorMessage) {\r\n const message = errorMessage ||\r\n (CacheErrorMessages[errorCode]\r\n ? CacheErrorMessages[errorCode]\r\n : CacheErrorMessages[cacheErrorUnknown]);\r\n super(`${errorCode}: ${message}`);\r\n Object.setPrototypeOf(this, CacheError.prototype);\r\n this.name = \"CacheError\";\r\n this.errorCode = errorCode;\r\n this.errorMessage = message;\r\n }\r\n}\r\n/**\r\n * Helper function to wrap browser errors in a CacheError object\r\n * @param e\r\n * @returns\r\n */\r\nfunction createCacheError(e) {\r\n if (!(e instanceof Error)) {\r\n return new CacheError(cacheErrorUnknown);\r\n }\r\n if (e.name === \"QuotaExceededError\" ||\r\n e.name === \"NS_ERROR_DOM_QUOTA_REACHED\" ||\r\n e.message.includes(\"exceeded the quota\")) {\r\n return new CacheError(cacheQuotaExceeded);\r\n }\r\n else {\r\n return new CacheError(e.name, e.message);\r\n }\r\n}\n\nexport { CacheError, CacheErrorMessages, createCacheError };\n//# sourceMappingURL=CacheError.mjs.map\n","/*! @azure/msal-common v14.16.1 2025-08-05 */\n'use strict';\nimport { Separators, CredentialType, AuthenticationScheme, THE_FAMILY_ID, APP_METADATA, AUTHORITY_METADATA_CONSTANTS } from '../utils/Constants.mjs';\nimport { generateCredentialKey } from './utils/CacheHelpers.mjs';\nimport { ScopeSet } from '../request/ScopeSet.mjs';\nimport { AccountEntity } from './entities/AccountEntity.mjs';\nimport { createClientAuthError } from '../error/ClientAuthError.mjs';\nimport { updateAccountTenantProfileData, tenantIdMatchesHomeTenant } from '../account/AccountInfo.mjs';\nimport { extractTokenClaims } from '../account/AuthToken.mjs';\nimport { name, version } from '../packageMetadata.mjs';\nimport { getAliasesFromStaticSources } from '../authority/AuthorityMetadata.mjs';\nimport { createCacheError } from '../error/CacheError.mjs';\nimport { AuthError } from '../error/AuthError.mjs';\nimport { invalidCacheRecord, multipleMatchingAppMetadata, methodNotImplemented } from '../error/ClientAuthErrorCodes.mjs';\n\n/*\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License.\r\n */\r\n/**\r\n * Interface class which implement cache storage functions used by MSAL to perform validity checks, and store tokens.\r\n * @internal\r\n */\r\nclass CacheManager {\r\n constructor(clientId, cryptoImpl, logger, staticAuthorityOptions) {\r\n this.clientId = clientId;\r\n this.cryptoImpl = cryptoImpl;\r\n this.commonLogger = logger.clone(name, version);\r\n this.staticAuthorityOptions = staticAuthorityOptions;\r\n }\r\n /**\r\n * Returns all the accounts in the cache that match the optional filter. If no filter is provided, all accounts are returned.\r\n * @param accountFilter - (Optional) filter to narrow down the accounts returned\r\n * @returns Array of AccountInfo objects in cache\r\n */\r\n getAllAccounts(correlationId, accountFilter) {\r\n return this.buildTenantProfiles(this.getAccountsFilteredBy(accountFilter || {}, correlationId), correlationId, accountFilter);\r\n }\r\n /**\r\n * Gets first tenanted AccountInfo object found based on provided filters\r\n */\r\n getAccountInfoFilteredBy(accountFilter, correlationId) {\r\n const allAccounts = this.getAllAccounts(correlationId, accountFilter);\r\n if (allAccounts.length > 1) {\r\n // If one or more accounts are found, prioritize accounts that have an ID token\r\n const sortedAccounts = allAccounts.sort((account) => {\r\n return account.idTokenClaims ? -1 : 1;\r\n });\r\n return sortedAccounts[0];\r\n }\r\n else if (allAccounts.length === 1) {\r\n // If only one account is found, return it regardless of whether a matching ID token was found\r\n return allAccounts[0];\r\n }\r\n else {\r\n return null;\r\n }\r\n }\r\n /**\r\n * Returns a single matching\r\n * @param accountFilter\r\n * @returns\r\n */\r\n getBaseAccountInfo(accountFilter, correlationId) {\r\n const accountEntities = this.getAccountsFilteredBy(accountFilter, correlationId);\r\n if (accountEntities.length > 0) {\r\n return accountEntities[0].getAccountInfo();\r\n }\r\n else {\r\n return null;\r\n }\r\n }\r\n /**\r\n * Matches filtered account entities with cached ID tokens that match the tenant profile-specific account filters\r\n * and builds the account info objects from the matching ID token's claims\r\n * @param cachedAccounts\r\n * @param accountFilter\r\n * @returns Array of AccountInfo objects that match account and tenant profile filters\r\n */\r\n buildTenantProfiles(cachedAccounts, correlationId, accountFilter) {\r\n return cachedAccounts.flatMap((accountEntity) => {\r\n return this.getTenantProfilesFromAccountEntity(accountEntity, correlationId, accountFilter?.tenantId, accountFilter);\r\n });\r\n }\r\n getTenantedAccountInfoByFilter(accountInfo, tokenKeys, tenantProfile, correlationId, tenantProfileFilter) {\r\n let tenantedAccountInfo = null;\r\n let idTokenClaims;\r\n if (tenantProfileFilter) {\r\n if (!this.tenantProfileMatchesFilter(tenantProfile, tenantProfileFilter)) {\r\n return null;\r\n }\r\n }\r\n const idToken = this.getIdToken(accountInfo, correlationId, tokenKeys, tenantProfile.tenantId);\r\n if (idToken) {\r\n idTokenClaims = extractTokenClaims(idToken.secret, this.cryptoImpl.base64Decode);\r\n if (!this.idTokenClaimsMatchTenantProfileFilter(idTokenClaims, tenantProfileFilter)) {\r\n // ID token sourced claims don't match so this tenant profile is not a match\r\n return null;\r\n }\r\n }\r\n // Expand tenant profile into account info based on matching tenant profile and if available matching ID token claims\r\n tenantedAccountInfo = updateAccountTenantProfileData(accountInfo, tenantProfile, idTokenClaims, idToken?.secret);\r\n return tenantedAccountInfo;\r\n }\r\n getTenantProfilesFromAccountEntity(accountEntity, correlationId, targetTenantId, tenantProfileFilter) {\r\n const accountInfo = accountEntity.getAccountInfo();\r\n let searchTenantProfiles = accountInfo.tenantProfiles || new Map();\r\n const tokenKeys = this.getTokenKeys();\r\n // If a tenant ID was provided, only return the tenant profile for that tenant ID if it exists\r\n if (targetTenantId) {\r\n const tenantProfile = searchTenantProfiles.get(targetTenantId);\r\n if (tenantProfile) {\r\n // Reduce search field to just this tenant profile\r\n searchTenantProfiles = new Map([\r\n [targetTenantId, tenantProfile],\r\n ]);\r\n }\r\n else {\r\n // No tenant profile for search tenant ID, return empty array\r\n return [];\r\n }\r\n }\r\n const matchingTenantProfiles = [];\r\n searchTenantProfiles.forEach((tenantProfile) => {\r\n const tenantedAccountInfo = this.getTenantedAccountInfoByFilter(accountInfo, tokenKeys, tenantProfile, correlationId, tenantProfileFilter);\r\n if (tenantedAccountInfo) {\r\n matchingTenantProfiles.push(tenantedAccountInfo);\r\n }\r\n });\r\n return matchingTenantProfiles;\r\n }\r\n tenantProfileMatchesFilter(tenantProfile, tenantProfileFilter) {\r\n if (!!tenantProfileFilter.localAccountId &&\r\n !this.matchLocalAccountIdFromTenantProfile(tenantProfile, tenantProfileFilter.localAccountId)) {\r\n return false;\r\n }\r\n if (!!tenantProfileFilter.name &&\r\n !(tenantProfile.name === tenantProfileFilter.name)) {\r\n return false;\r\n }\r\n if (tenantProfileFilter.isHomeTenant !== undefined &&\r\n !(tenantProfile.isHomeTenant === tenantProfileFilter.isHomeTenant)) {\r\n return false;\r\n }\r\n return true;\r\n }\r\n idTokenClaimsMatchTenantProfileFilter(idTokenClaims, tenantProfileFilter) {\r\n // Tenant Profile filtering\r\n if (tenantProfileFilter) {\r\n if (!!tenantProfileFilter.localAccountId &&\r\n !this.matchLocalAccountIdFromTokenClaims(idTokenClaims, tenantProfileFilter.localAccountId)) {\r\n return false;\r\n }\r\n if (!!tenantProfileFilter.loginHint &&\r\n !this.matchLoginHintFromTokenClaims(idTokenClaims, tenantProfileFilter.loginHint)) {\r\n return false;\r\n }\r\n if (!!tenantProfileFilter.username &&\r\n !this.matchUsername(idTokenClaims.preferred_username, tenantProfileFilter.username)) {\r\n return false;\r\n }\r\n if (!!tenantProfileFilter.name &&\r\n !this.matchName(idTokenClaims, tenantProfileFilter.name)) {\r\n return false;\r\n }\r\n if (!!tenantProfileFilter.sid &&\r\n !this.matchSid(idTokenClaims, tenantProfileFilter.sid)) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }\r\n /**\r\n * saves a cache record\r\n * @param cacheRecord {CacheRecord}\r\n * @param storeInCache {?StoreInCache}\r\n * @param correlationId {?string} correlation id\r\n */\r\n async saveCacheRecord(cacheRecord, correlationId, storeInCache) {\r\n if (!cacheRecord) {\r\n throw createClientAuthError(invalidCacheRecord);\r\n }\r\n try {\r\n if (!!cacheRecord.account) {\r\n this.setAccount(cacheRecord.account, correlationId);\r\n }\r\n if (!!cacheRecord.idToken && storeInCache?.idToken !== false) {\r\n this.setIdTokenCredential(cacheRecord.idToken, correlationId);\r\n }\r\n if (!!cacheRecord.accessToken &&\r\n storeInCache?.accessToken !== false) {\r\n await this.saveAccessToken(cacheRecord.accessToken, correlationId);\r\n }\r\n if (!!cacheRecord.refreshToken &&\r\n storeInCache?.refreshToken !== false) {\r\n this.setRefreshTokenCredential(cacheRecord.refreshToken, correlationId);\r\n }\r\n if (!!cacheRecord.appMetadata) {\r\n this.setAppMetadata(cacheRecord.appMetadata, correlationId);\r\n }\r\n }\r\n catch (e) {\r\n this.commonLogger?.error(`CacheManager.saveCacheRecord: failed`);\r\n if (e instanceof AuthError) {\r\n throw e;\r\n }\r\n else {\r\n throw createCacheError(e);\r\n }\r\n }\r\n }\r\n /**\r\n * saves access token credential\r\n * @param credential\r\n */\r\n async saveAccessToken(credential, correlationId) {\r\n const accessTokenFilter = {\r\n clientId: credential.clientId,\r\n credentialType: credential.credentialType,\r\n environment: credential.environment,\r\n homeAccountId: credential.homeAccountId,\r\n realm: credential.realm,\r\n tokenType: credential.tokenType,\r\n requestedClaimsHash: credential.requestedClaimsHash,\r\n };\r\n const tokenKeys = this.getTokenKeys();\r\n const currentScopes = ScopeSet.fromString(credential.target);\r\n tokenKeys.accessToken.forEach((key) => {\r\n if (!this.accessTokenKeyMatchesFilter(key, accessTokenFilter, false)) {\r\n return;\r\n }\r\n const tokenEntity = this.getAccessTokenCredential(key, correlationId);\r\n if (tokenEntity &&\r\n this.credentialMatchesFilter(tokenEntity, accessTokenFilter)) {\r\n const tokenScopeSet = ScopeSet.fromString(tokenEntity.target);\r\n if (tokenScopeSet.intersectingScopeSets(currentScopes)) {\r\n this.removeAccessToken(key, correlationId);\r\n }\r\n }\r\n });\r\n this.setAccessTokenCredential(credential, correlationId);\r\n }\r\n /**\r\n * Retrieve account entities matching all provided tenant-agnostic filters; if no filter is set, get all account entities in the cache\r\n * Not checking for casing as keys are all generated in lower case, remember to convert to lower case if object properties are compared\r\n * @param accountFilter - An object containing Account properties to filter by\r\n */\r\n getAccountsFilteredBy(accountFilter, correlationId) {\r\n const allAccountKeys = this.getAccountKeys();\r\n const matchingAccounts = [];\r\n allAccountKeys.forEach((cacheKey) => {\r\n if (!this.isAccountKey(cacheKey, accountFilter.homeAccountId)) {\r\n // Don't parse value if the key doesn't match the account filters\r\n return;\r\n }\r\n const entity = this.getAccount(cacheKey, correlationId, this.commonLogger);\r\n // Match base account fields\r\n if (!entity) {\r\n return;\r\n }\r\n if (!!accountFilter.homeAccountId &&\r\n !this.matchHomeAccountId(entity, accountFilter.homeAccountId)) {\r\n return;\r\n }\r\n if (!!accountFilter.username &&\r\n !this.matchUsername(entity.username, accountFilter.username)) {\r\n return;\r\n }\r\n if (!!accountFilter.environment &&\r\n !this.matchEnvironment(entity, accountFilter.environment)) {\r\n return;\r\n }\r\n if (!!accountFilter.realm &&\r\n !this.matchRealm(entity, accountFilter.realm)) {\r\n return;\r\n }\r\n if (!!accountFilter.nativeAccountId &&\r\n !this.matchNativeAccountId(entity, accountFilter.nativeAccountId)) {\r\n return;\r\n }\r\n if (!!accountFilter.authorityType &&\r\n !this.matchAuthorityType(entity, accountFilter.authorityType)) {\r\n return;\r\n }\r\n // If at least one tenant profile matches the tenant profile filter, add the account to the list of matching accounts\r\n const tenantProfileFilter = {\r\n localAccountId: accountFilter?.localAccountId,\r\n name: accountFilter?.name,\r\n };\r\n const matchingTenantProfiles = entity.tenantProfiles?.filter((tenantProfile) => {\r\n return this.tenantProfileMatchesFilter(tenantProfile, tenantProfileFilter);\r\n });\r\n if (matchingTenantProfiles && matchingTenantProfiles.length === 0) {\r\n // No tenant profile for this account matches filter, don't add to list of matching accounts\r\n return;\r\n }\r\n matchingAccounts.push(entity);\r\n });\r\n return matchingAccounts;\r\n }\r\n /**\r\n * Returns true if the given key matches our account key schema. Also matches homeAccountId and/or tenantId if provided\r\n * @param key\r\n * @param homeAccountId\r\n * @param tenantId\r\n * @returns\r\n */\r\n isAccountKey(key, homeAccountId, tenantId) {\r\n if (key.split(Separators.CACHE_KEY_SEPARATOR).length < 3) {\r\n // Account cache keys contain 3 items separated by '-' (each item may also contain '-')\r\n return false;\r\n }\r\n if (homeAccountId &&\r\n !key.toLowerCase().includes(homeAccountId.toLowerCase())) {\r\n return false;\r\n }\r\n if (tenantId && !key.toLowerCase().includes(tenantId.toLowerCase())) {\r\n return false;\r\n }\r\n // Do not check environment as aliasing can cause false negatives\r\n return true;\r\n }\r\n /**\r\n * Returns true if the given key matches our credential key schema.\r\n * @param key\r\n */\r\n isCredentialKey(key) {\r\n if (key.split(Separators.CACHE_KEY_SEPARATOR).length < 6) {\r\n // Credential cache keys contain 6 items separated by '-' (each item may also contain '-')\r\n return false;\r\n }\r\n const lowerCaseKey = key.toLowerCase();\r\n // Credential keys must indicate what credential type they represent\r\n if (lowerCaseKey.indexOf(CredentialType.ID_TOKEN.toLowerCase()) ===\r\n -1 &&\r\n lowerCaseKey.indexOf(CredentialType.ACCESS_TOKEN.toLowerCase()) ===\r\n -1 &&\r\n lowerCaseKey.indexOf(CredentialType.ACCESS_TOKEN_WITH_AUTH_SCHEME.toLowerCase()) === -1 &&\r\n lowerCaseKey.indexOf(CredentialType.REFRESH_TOKEN.toLowerCase()) ===\r\n -1) {\r\n return false;\r\n }\r\n if (lowerCaseKey.indexOf(CredentialType.REFRESH_TOKEN.toLowerCase()) >\r\n -1) {\r\n // Refresh tokens must contain the client id or family id\r\n const clientIdValidation = `${CredentialType.REFRESH_TOKEN}${Separators.CACHE_KEY_SEPARATOR}${this.clientId}${Separators.CACHE_KEY_SEPARATOR}`;\r\n const familyIdValidation = `${CredentialType.REFRESH_TOKEN}${Separators.CACHE_KEY_SEPARATOR}${THE_FAMILY_ID}${Separators.CACHE_KEY_SEPARATOR}`;\r\n if (lowerCaseKey.indexOf(clientIdValidation.toLowerCase()) === -1 &&\r\n lowerCaseKey.indexOf(familyIdValidation.toLowerCase()) === -1) {\r\n return false;\r\n }\r\n }\r\n else if (lowerCaseKey.indexOf(this.clientId.toLowerCase()) === -1) {\r\n // Tokens must contain the clientId\r\n return false;\r\n }\r\n return true;\r\n }\r\n /**\r\n * Returns whether or not the given credential entity matches the filter\r\n * @param entity\r\n * @param filter\r\n * @returns\r\n */\r\n credentialMatchesFilter(entity, filter) {\r\n if (!!filter.clientId && !this.matchClientId(entity, filter.clientId)) {\r\n return false;\r\n }\r\n if (!!filter.userAssertionHash &&\r\n !this.matchUserAssertionHash(entity, filter.userAssertionHash)) {\r\n return false;\r\n }\r\n /*\r\n * homeAccountId can be undefined, and we want to filter out cached items that have a homeAccountId of \"\"\r\n * because we don't want a client_credential request to return a cached token that has a homeAccountId\r\n */\r\n if (typeof filter.homeAccountId === \"string\" &&\r\n !this.matchHomeAccountId(entity, filter.homeAccountId)) {\r\n return false;\r\n }\r\n if (!!filter.environment &&\r\n !this.matchEnvironment(entity, filter.environment)) {\r\n return false;\r\n }\r\n if (!!filter.realm && !this.matchRealm(entity, filter.realm)) {\r\n return false;\r\n }\r\n if (!!filter.credentialType &&\r\n !this.matchCredentialType(entity, filter.credentialType)) {\r\n return false;\r\n }\r\n if (!!filter.familyId && !this.matchFamilyId(entity, filter.familyId)) {\r\n return false;\r\n }\r\n /*\r\n * idTokens do not have \"target\", target specific refreshTokens do exist for some types of authentication\r\n * Resource specific refresh tokens case will be added when the support is deemed necessary\r\n */\r\n if (!!filter.target && !this.matchTarget(entity, filter.target)) {\r\n return false;\r\n }\r\n // If request OR cached entity has requested Claims Hash, check if they match\r\n if (filter.requestedClaimsHash || entity.requestedClaimsHash) {\r\n // Don't match if either is undefined or they are different\r\n if (entity.requestedClaimsHash !== filter.requestedClaimsHash) {\r\n return false;\r\n }\r\n }\r\n // Access Token with Auth Scheme specific matching\r\n if (entity.credentialType ===\r\n CredentialType.ACCESS_TOKEN_WITH_AUTH_SCHEME) {\r\n if (!!filter.tokenType &&\r\n !this.matchTokenType(entity, filter.tokenType)) {\r\n return false;\r\n }\r\n // KeyId (sshKid) in request must match cached SSH certificate keyId because SSH cert is bound to a specific key\r\n if (filter.tokenType === AuthenticationScheme.SSH) {\r\n if (filter.keyId && !this.matchKeyId(entity, filter.keyId)) {\r\n return false;\r\n }\r\n }\r\n }\r\n return true;\r\n }\r\n /**\r\n * retrieve appMetadata matching all provided filters; if no filter is set, get all appMetadata\r\n * @param filter\r\n */\r\n getAppMetadataFilteredBy(filter) {\r\n const allCacheKeys = this.getKeys();\r\n const matchingAppMetadata = {};\r\n allCacheKeys.forEach((cacheKey) => {\r\n // don't parse any non-appMetadata type cache entities\r\n if (!this.isAppMetadata(cacheKey)) {\r\n return;\r\n }\r\n // Attempt retrieval\r\n const entity = this.getAppMetadata(cacheKey);\r\n if (!entity) {\r\n return;\r\n }\r\n if (!!filter.environment &&\r\n !this.matchEnvironment(entity, filter.environment)) {\r\n return;\r\n }\r\n if (!!filter.clientId &&\r\n !this.matchClientId(entity, filter.clientId)) {\r\n return;\r\n }\r\n matchingAppMetadata[cacheKey] = entity;\r\n });\r\n return matchingAppMetadata;\r\n }\r\n /**\r\n * retrieve authorityMetadata that contains a matching alias\r\n * @param filter\r\n */\r\n getAuthorityMetadataByAlias(host) {\r\n const allCacheKeys = this.getAuthorityMetadataKeys();\r\n let matchedEntity = null;\r\n allCacheKeys.forEach((cacheKey) => {\r\n // don't parse any non-authorityMetadata type cache entities\r\n if (!this.isAuthorityMetadata(cacheKey) ||\r\n cacheKey.indexOf(this.clientId) === -1) {\r\n return;\r\n }\r\n // Attempt retrieval\r\n const entity = this.getAuthorityMetadata(cacheKey);\r\n if (!entity) {\r\n return;\r\n }\r\n if (entity.aliases.indexOf(host) === -1) {\r\n return;\r\n }\r\n matchedEntity = entity;\r\n });\r\n return matchedEntity;\r\n }\r\n /**\r\n * Removes all accounts and related tokens from cache.\r\n */\r\n async removeAllAccounts(correlationId) {\r\n const allAccountKeys = this.getAccountKeys();\r\n const removedAccounts = [];\r\n allAccountKeys.forEach((cacheKey) => {\r\n removedAccounts.push(this.removeAccount(cacheKey, correlationId));\r\n });\r\n await Promise.all(removedAccounts);\r\n }\r\n /**\r\n * Removes the account and related tokens for a given account key\r\n * @param account\r\n */\r\n async removeAccount(accountKey, correlationId) {\r\n const account = this.getAccount(accountKey, correlationId, this.commonLogger);\r\n if (!account) {\r\n return;\r\n }\r\n await this.removeAccountContext(account, correlationId);\r\n this.removeItem(accountKey, correlationId);\r\n }\r\n /**\r\n * Removes credentials associated with the provided account\r\n * @param account\r\n */\r\n async removeAccountContext(account, correlationId) {\r\n const allTokenKeys = this.getTokenKeys();\r\n const accountId = account.generateAccountId();\r\n allTokenKeys.idToken.forEach((key) => {\r\n if (key.indexOf(accountId) === 0) {\r\n this.removeIdToken(key, correlationId);\r\n }\r\n });\r\n allTokenKeys.accessToken.forEach((key) => {\r\n if (key.indexOf(accountId) === 0) {\r\n this.removeAccessToken(key, correlationId);\r\n }\r\n });\r\n allTokenKeys.refreshToken.forEach((key) => {\r\n if (key.indexOf(accountId) === 0) {\r\n this.removeRefreshToken(key, correlationId);\r\n }\r\n });\r\n this.getKeys().forEach((key) => {\r\n if (key.includes(accountId)) {\r\n this.removeItem(key, correlationId);\r\n }\r\n });\r\n }\r\n /**\r\n * Migrates a single-tenant account and all it's associated alternate cross-tenant account objects in the\r\n * cache into a condensed multi-tenant account object with tenant profiles.\r\n * @param accountKey\r\n * @param accountEntity\r\n * @param logger\r\n * @returns\r\n */\r\n updateOutdatedCachedAccount(accountKey, accountEntity, correlationId, logger) {\r\n // Only update if account entity is defined and has no tenantProfiles object (is outdated)\r\n if (accountEntity && accountEntity.isSingleTenant()) {\r\n this.commonLogger?.verbose(\"updateOutdatedCachedAccount: Found a single-tenant (outdated) account entity in the cache, migrating to multi-tenant account entity\");\r\n // Get keys of all accounts belonging to user\r\n const matchingAccountKeys = this.getAccountKeys().filter((key) => {\r\n return key.startsWith(accountEntity.homeAccountId);\r\n });\r\n // Get all account entities belonging to user\r\n const accountsToMerge = [];\r\n matchingAccountKeys.forEach((key) => {\r\n const account = this.getCachedAccountEntity(key, correlationId);\r\n if (account) {\r\n accountsToMerge.push(account);\r\n }\r\n });\r\n // Set base account to home account if available, any account if not\r\n const baseAccount = accountsToMerge.find((account) => {\r\n return tenantIdMatchesHomeTenant(account.realm, account.homeAccountId);\r\n }) || accountsToMerge[0];\r\n // Populate tenant profiles built from each account entity belonging to the user\r\n baseAccount.tenantProfiles = accountsToMerge.map((account) => {\r\n return {\r\n tenantId: account.realm,\r\n localAccountId: account.localAccountId,\r\n name: account.name,\r\n isHomeTenant: tenantIdMatchesHomeTenant(account.realm, account.homeAccountId),\r\n };\r\n });\r\n const updatedAccount = CacheManager.toObject(new AccountEntity(), {\r\n ...baseAccount,\r\n });\r\n const newAccountKey = updatedAccount.generateAccountKey();\r\n // Clear cache of legacy account objects that have been collpsed into tenant profiles\r\n matchingAccountKeys.forEach((key) => {\r\n if (key !== newAccountKey) {\r\n this.removeOutdatedAccount(accountKey, correlationId);\r\n }\r\n });\r\n // Cache updated account object\r\n this.setAccount(updatedAccount, correlationId);\r\n logger?.verbose(\"Updated an outdated account entity in the cache\");\r\n return updatedAccount;\r\n }\r\n // No update is necessary\r\n return accountEntity;\r\n }\r\n /**\r\n * returns a boolean if the given credential is removed\r\n * @param credential\r\n */\r\n removeAccessToken(key, correlationId) {\r\n const credential = this.getAccessTokenCredential(key, correlationId);\r\n this.removeItem(key, correlationId);\r\n if (!credential ||\r\n credential.credentialType.toLowerCase() !==\r\n CredentialType.ACCESS_TOKEN_WITH_AUTH_SCHEME.toLowerCase() ||\r\n credential.tokenType !== AuthenticationScheme.POP) {\r\n return;\r\n }\r\n // Remove Token Binding Key from key store for PoP Tokens Credentials\r\n const kid = credential.keyId;\r\n if (kid) {\r\n void this.cryptoImpl.removeTokenBindingKey(kid).catch(() => {\r\n this.commonLogger.error(\"Binding key could not be removed\");\r\n });\r\n }\r\n }\r\n /**\r\n * Removes all app metadata objects from cache.\r\n */\r\n removeAppMetadata(correlationId) {\r\n const allCacheKeys = this.getKeys();\r\n allCacheKeys.forEach((cacheKey) => {\r\n if (this.isAppMetadata(cacheKey)) {\r\n this.removeItem(cacheKey, correlationId);\r\n }\r\n });\r\n return true;\r\n }\r\n /**\r\n * Retrieve AccountEntity from cache\r\n * @param account\r\n */\r\n readAccountFromCache(account, correlationId) {\r\n const accountKey = AccountEntity.generateAccountCacheKey(account);\r\n return this.getAccount(accountKey, correlationId, this.commonLogger);\r\n }\r\n /**\r\n * Retrieve IdTokenEntity from cache\r\n * @param account {AccountInfo}\r\n * @param tokenKeys {?TokenKeys}\r\n * @param targetRealm {?string}\r\n * @param performanceClient {?IPerformanceClient}\r\n * @param correlationId {?string}\r\n */\r\n getIdToken(account, correlationId, tokenKeys, targetRealm, performanceClient) {\r\n this.commonLogger.trace(\"CacheManager - getIdToken called\");\r\n const idTokenFilter = {\r\n homeAccountId: account.homeAccountId,\r\n environment: account.environment,\r\n credentialType: CredentialType.ID_TOKEN,\r\n clientId: this.clientId,\r\n realm: targetRealm,\r\n };\r\n const idTokenMap = this.getIdTokensByFilter(idTokenFilter, correlationId, tokenKeys);\r\n const numIdTokens = idTokenMap.size;\r\n if (numIdTokens < 1) {\r\n this.commonLogger.info(\"CacheManager:getIdToken - No token found\");\r\n return null;\r\n }\r\n else if (numIdTokens > 1) {\r\n let tokensToBeRemoved = idTokenMap;\r\n // Multiple tenant profiles and no tenant specified, pick home account\r\n if (!targetRealm) {\r\n const homeIdTokenMap = new Map();\r\n idTokenMap.forEach((idToken, key) => {\r\n if (idToken.realm === account.tenantId) {\r\n homeIdTokenMap.set(key, idToken);\r\n }\r\n });\r\n const numHomeIdTokens = homeIdTokenMap.size;\r\n if (numHomeIdTokens < 1) {\r\n this.commonLogger.info(\"CacheManager:getIdToken - Multiple ID tokens found for account but none match account entity tenant id, returning first result\");\r\n return idTokenMap.values().next().value;\r\n }\r\n else if (numHomeIdTokens === 1) {\r\n this.commonLogger.info(\"CacheManager:getIdToken - Multiple ID tokens found for account, defaulting to home tenant profile\");\r\n return homeIdTokenMap.values().next().value;\r\n }\r\n else {\r\n // Multiple ID tokens for home tenant profile, remove all and return null\r\n tokensToBeRemoved = homeIdTokenMap;\r\n }\r\n }\r\n // Multiple tokens for a single tenant profile, remove all and return null\r\n this.commonLogger.info(\"CacheManager:getIdToken - Multiple matching ID tokens found, clearing them\");\r\n tokensToBeRemoved.forEach((idToken, key) => {\r\n this.removeIdToken(key, correlationId);\r\n });\r\n if (performanceClient && correlationId) {\r\n performanceClient.addFields({ multiMatchedID: idTokenMap.size }, correlationId);\r\n }\r\n return null;\r\n }\r\n this.commonLogger.info(\"CacheManager:getIdToken - Returning ID token\");\r\n return idTokenMap.values().next().value;\r\n }\r\n /**\r\n * Gets all idTokens matching the given filter\r\n * @param filter\r\n * @returns\r\n */\r\n getIdTokensByFilter(filter, correlationId, tokenKeys) {\r\n const idTokenKeys = (tokenKeys && tokenKeys.idToken) || this.getTokenKeys().idToken;\r\n const idTokens = new Map();\r\n idTokenKeys.forEach((key) => {\r\n if (!this.idTokenKeyMatchesFilter(key, {\r\n clientId: this.clientId,\r\n ...filter,\r\n })) {\r\n return;\r\n }\r\n const idToken = this.getIdTokenCredential(key, correlationId);\r\n if (idToken && this.credentialMatchesFilter(idToken, filter)) {\r\n idTokens.set(key, idToken);\r\n }\r\n });\r\n return idTokens;\r\n }\r\n /**\r\n * Validate the cache key against filter before retrieving and parsing cache value\r\n * @param key\r\n * @param filter\r\n * @returns\r\n */\r\n idTokenKeyMatchesFilter(inputKey, filter) {\r\n const key = inputKey.toLowerCase();\r\n if (filter.clientId &&\r\n key.indexOf(filter.clientId.toLowerCase()) === -1) {\r\n return false;\r\n }\r\n if (filter.homeAccountId &&\r\n key.indexOf(filter.homeAccountId.toLowerCase()) === -1) {\r\n return false;\r\n }\r\n return true;\r\n }\r\n /**\r\n * Removes idToken from the cache\r\n * @param key\r\n */\r\n removeIdToken(key, correlationId) {\r\n this.removeItem(key, correlationId);\r\n }\r\n /**\r\n * Removes refresh token from the cache\r\n * @param key\r\n */\r\n removeRefreshToken(key, correlationId) {\r\n this.removeItem(key, correlationId);\r\n }\r\n /**\r\n * Retrieve AccessTokenEntity from cache\r\n * @param account {AccountInfo}\r\n * @param request {BaseAuthRequest}\r\n * @param tokenKeys {?TokenKeys}\r\n * @param performanceClient {?IPerformanceClient}\r\n * @param correlationId {?string}\r\n */\r\n getAccessToken(account, request, tokenKeys, targetRealm, performanceClient) {\r\n this.commonLogger.trace(\"CacheManager - getAccessToken called\");\r\n const scopes = ScopeSet.createSearchScopes(request.scopes);\r\n const authScheme = request.authenticationScheme || AuthenticationScheme.BEARER;\r\n /*\r\n * Distinguish between Bearer and PoP/SSH token cache types\r\n * Cast to lowercase to handle \"bearer\" from ADFS\r\n */\r\n const credentialType = authScheme &&\r\n authScheme.toLowerCase() !==\r\n AuthenticationScheme.BEARER.toLowerCase()\r\n ? CredentialType.ACCESS_TOKEN_WITH_AUTH_SCHEME\r\n : CredentialType.ACCESS_TOKEN;\r\n const accessTokenFilter = {\r\n homeAccountId: account.homeAccountId,\r\n environment: account.environment,\r\n credentialType: credentialType,\r\n clientId: this.clientId,\r\n realm: targetRealm || account.tenantId,\r\n target: scopes,\r\n tokenType: authScheme,\r\n keyId: request.sshKid,\r\n requestedClaimsHash: request.requestedClaimsHash,\r\n };\r\n const accessTokenKeys = (tokenKeys && tokenKeys.accessToken) ||\r\n this.getTokenKeys().accessToken;\r\n const accessTokens = [];\r\n accessTokenKeys.forEach((key) => {\r\n // Validate key\r\n if (this.accessTokenKeyMatchesFilter(key, accessTokenFilter, true)) {\r\n const accessToken = this.getAccessTokenCredential(key, request.correlationId);\r\n // Validate value\r\n if (accessToken &&\r\n this.credentialMatchesFilter(accessToken, accessTokenFilter)) {\r\n accessTokens.push(accessToken);\r\n }\r\n }\r\n });\r\n const numAccessTokens = accessTokens.length;\r\n if (numAccessTokens < 1) {\r\n this.commonLogger.info(\"CacheManager:getAccessToken - No token found\");\r\n return null;\r\n }\r\n else if (numAccessTokens > 1) {\r\n this.commonLogger.info(\"CacheManager:getAccessToken - Multiple access tokens found, clearing them\");\r\n accessTokens.forEach((accessToken) => {\r\n void this.removeAccessToken(generateCredentialKey(accessToken), request.correlationId);\r\n });\r\n if (performanceClient && request.correlationId) {\r\n performanceClient.addFields({ multiMatchedAT: accessTokens.length }, request.correlationId);\r\n }\r\n return null;\r\n }\r\n this.commonLogger.info(\"CacheManager:getAccessToken - Returning access token\");\r\n return accessTokens[0];\r\n }\r\n /**\r\n * Validate the cache key against filter before retrieving and parsing cache value\r\n * @param key\r\n * @param filter\r\n * @param keyMustContainAllScopes\r\n * @returns\r\n */\r\n accessTokenKeyMatchesFilter(inputKey, filter, keyMustContainAllScopes) {\r\n const key = inputKey.toLowerCase();\r\n if (filter.clientId &&\r\n key.indexOf(filter.clientId.toLowerCase()) === -1) {\r\n return false;\r\n }\r\n if (filter.homeAccountId &&\r\n key.indexOf(filter.homeAccountId.toLowerCase()) === -1) {\r\n return false;\r\n }\r\n if (filter.realm && key.indexOf(filter.realm.toLowerCase()) === -1) {\r\n return false;\r\n }\r\n if (filter.requestedClaimsHash &&\r\n key.indexOf(filter.requestedClaimsHash.toLowerCase()) === -1) {\r\n return false;\r\n }\r\n if (filter.target) {\r\n const scopes = filter.target.asArray();\r\n for (let i = 0; i < scopes.length; i++) {\r\n if (keyMustContainAllScopes &&\r\n !key.includes(scopes[i].toLowerCase())) {\r\n // When performing a cache lookup a missing scope would be a cache miss\r\n return false;\r\n }\r\n else if (!keyMustContainAllScopes &&\r\n key.includes(scopes[i].toLowerCase())) {\r\n // When performing a cache write, any token with a subset of requested scopes should be replaced\r\n return true;\r\n }\r\n }\r\n }\r\n return true;\r\n }\r\n /**\r\n * Gets all access tokens matching the filter\r\n * @param filter\r\n * @returns\r\n */\r\n getAccessTokensByFilter(filter, correlationId) {\r\n const tokenKeys = this.getTokenKeys();\r\n const accessTokens = [];\r\n tokenKeys.accessToken.forEach((key) => {\r\n if (!this.accessTokenKeyMatchesFilter(key, filter, true)) {\r\n return;\r\n }\r\n const accessToken = this.getAccessTokenCredential(key, correlationId);\r\n if (accessToken &&\r\n this.credentialMatchesFilter(accessToken, filter)) {\r\n accessTokens.push(accessToken);\r\n }\r\n });\r\n return accessTokens;\r\n }\r\n /**\r\n * Helper to retrieve the appropriate refresh token from cache\r\n * @param account {AccountInfo}\r\n * @param familyRT {boolean}\r\n * @param tokenKeys {?TokenKeys}\r\n * @param performanceClient {?IPerformanceClient}\r\n * @param correlationId {?string}\r\n */\r\n getRefreshToken(account, familyRT, correlationId, tokenKeys, performanceClient) {\r\n this.commonLogger.trace(\"CacheManager - getRefreshToken called\");\r\n const id = familyRT ? THE_FAMILY_ID : undefined;\r\n const refreshTokenFilter = {\r\n homeAccountId: account.homeAccountId,\r\n environment: account.environment,\r\n credentialType: CredentialType.REFRESH_TOKEN,\r\n clientId: this.clientId,\r\n familyId: id,\r\n };\r\n const refreshTokenKeys = (tokenKeys && tokenKeys.refreshToken) ||\r\n this.getTokenKeys().refreshToken;\r\n const refreshTokens = [];\r\n refreshTokenKeys.forEach((key) => {\r\n // Validate key\r\n if (this.refreshTokenKeyMatchesFilter(key, refreshTokenFilter)) {\r\n const refreshToken = this.getRefreshTokenCredential(key, correlationId);\r\n // Validate value\r\n if (refreshToken &&\r\n this.credentialMatchesFilter(refreshToken, refreshTokenFilter)) {\r\n refreshTokens.push(refreshToken);\r\n }\r\n }\r\n });\r\n const numRefreshTokens = refreshTokens.length;\r\n if (numRefreshTokens < 1) {\r\n this.commonLogger.info(\"CacheManager:getRefreshToken - No refresh token found.\");\r\n return null;\r\n }\r\n // address the else case after remove functions address environment aliases\r\n if (numRefreshTokens > 1 && performanceClient && correlationId) {\r\n performanceClient.addFields({ multiMatchedRT: numRefreshTokens }, correlationId);\r\n }\r\n this.commonLogger.info(\"CacheManager:getRefreshToken - returning refresh token\");\r\n return refreshTokens[0];\r\n }\r\n /**\r\n * Validate the cache key against filter before retrieving and parsing cache value\r\n * @param key\r\n * @param filter\r\n */\r\n refreshTokenKeyMatchesFilter(inputKey, filter) {\r\n const key = inputKey.toLowerCase();\r\n if (filter.familyId &&\r\n key.indexOf(filter.familyId.toLowerCase()) === -1) {\r\n return false;\r\n }\r\n // If familyId is used, clientId is not in the key\r\n if (!filter.familyId &&\r\n filter.clientId &&\r\n key.indexOf(filter.clientId.toLowerCase()) === -1) {\r\n return false;\r\n }\r\n if (filter.homeAccountId &&\r\n key.indexOf(filter.homeAccountId.toLowerCase()) === -1) {\r\n return false;\r\n }\r\n return true;\r\n }\r\n /**\r\n * Retrieve AppMetadataEntity from cache\r\n */\r\n readAppMetadataFromCache(environment) {\r\n const appMetadataFilter = {\r\n environment,\r\n clientId: this.clientId,\r\n };\r\n const appMetadata = this.getAppMetadataFilteredBy(appMetadataFilter);\r\n const appMetadataEntries = Object.keys(appMetadata).map((key) => appMetadata[key]);\r\n const numAppMetadata = appMetadataEntries.length;\r\n if (numAppMetadata < 1) {\r\n return null;\r\n }\r\n else if (numAppMetadata > 1) {\r\n throw createClientAuthError(multipleMatchingAppMetadata);\r\n }\r\n return appMetadataEntries[0];\r\n }\r\n /**\r\n * Return the family_id value associated with FOCI\r\n * @param environment\r\n * @param clientId\r\n */\r\n isAppMetadataFOCI(environment) {\r\n const appMetadata = this.readAppMetadataFromCache(environment);\r\n return !!(appMetadata && appMetadata.familyId === THE_FAMILY_ID);\r\n }\r\n /**\r\n * helper to match account ids\r\n * @param value\r\n * @param homeAccountId\r\n */\r\n matchHomeAccountId(entity, homeAccountId) {\r\n return !!(typeof entity.homeAccountId === \"string\" &&\r\n homeAccountId === entity.homeAccountId);\r\n }\r\n /**\r\n * helper to match account ids\r\n * @param entity\r\n * @param localAccountId\r\n * @returns\r\n */\r\n matchLocalAccountIdFromTokenClaims(tokenClaims, localAccountId) {\r\n const idTokenLocalAccountId = tokenClaims.oid || tokenClaims.sub;\r\n return localAccountId === idTokenLocalAccountId;\r\n }\r\n matchLocalAccountIdFromTenantProfile(tenantProfile, localAccountId) {\r\n return tenantProfile.localAccountId === localAccountId;\r\n }\r\n /**\r\n * helper to match names\r\n * @param entity\r\n * @param name\r\n * @returns true if the downcased name properties are present and match in the filter and the entity\r\n */\r\n matchName(claims, name) {\r\n return !!(name.toLowerCase() === claims.name?.toLowerCase());\r\n }\r\n /**\r\n * helper to match usernames\r\n * @param entity\r\n * @param username\r\n * @returns\r\n */\r\n matchUsername(cachedUsername, filterUsername) {\r\n return !!(cachedUsername &&\r\n typeof cachedUsername === \"string\" &&\r\n filterUsername?.toLowerCase() === cachedUsername.toLowerCase());\r\n }\r\n /**\r\n * helper to match assertion\r\n * @param value\r\n * @param oboAssertion\r\n */\r\n matchUserAssertionHash(entity, userAssertionHash) {\r\n return !!(entity.userAssertionHash &&\r\n userAssertionHash === entity.userAssertionHash);\r\n }\r\n /**\r\n * helper to match environment\r\n * @param value\r\n * @param environment\r\n */\r\n matchEnvironment(entity, environment) {\r\n // Check static authority options first for cases where authority metadata has not been resolved and cached yet\r\n if (this.staticAuthorityOptions) {\r\n const staticAliases = getAliasesFromStaticSources(this.staticAuthorityOptions, this.commonLogger);\r\n if (staticAliases.includes(environment) &&\r\n staticAliases.includes(entity.environment)) {\r\n return true;\r\n }\r\n }\r\n // Query metadata cache if no static authority configuration has aliases that match enviroment\r\n const cloudMetadata = this.getAuthorityMetadataByAlias(environment);\r\n if (cloudMetadata &&\r\n cloudMetadata.aliases.indexOf(entity.environment) > -1) {\r\n return true;\r\n }\r\n return false;\r\n }\r\n /**\r\n * helper to match credential type\r\n * @param entity\r\n * @param credentialType\r\n */\r\n matchCredentialType(entity, credentialType) {\r\n return (entity.credentialType &&\r\n credentialType.toLowerCase() === entity.credentialType.toLowerCase());\r\n }\r\n /**\r\n * helper to match client ids\r\n * @param entity\r\n * @param clientId\r\n */\r\n matchClientId(entity, clientId) {\r\n return !!(entity.clientId && clientId === entity.clientId);\r\n }\r\n /**\r\n * helper to match family ids\r\n * @param entity\r\n * @param familyId\r\n */\r\n matchFamilyId(entity, familyId) {\r\n return !!(entity.familyId && familyId === entity.familyId);\r\n }\r\n /**\r\n * helper to match realm\r\n * @param entity\r\n * @param realm\r\n */\r\n matchRealm(entity, realm) {\r\n return !!(entity.realm?.toLowerCase() === realm.toLowerCase());\r\n }\r\n /**\r\n * helper to match nativeAccountId\r\n * @param entity\r\n * @param nativeAccountId\r\n * @returns boolean indicating the match result\r\n */\r\n matchNativeAccountId(entity, nativeAccountId) {\r\n return !!(entity.nativeAccountId && nativeAccountId === entity.nativeAccountId);\r\n }\r\n /**\r\n * helper to match loginHint which can be either:\r\n * 1. login_hint ID token claim\r\n * 2. username in cached account object\r\n * 3. upn in ID token claims\r\n * @param entity\r\n * @param loginHint\r\n * @returns\r\n */\r\n matchLoginHintFromTokenClaims(tokenClaims, loginHint) {\r\n if (tokenClaims.login_hint === loginHint) {\r\n return true;\r\n }\r\n if (tokenClaims.preferred_username === loginHint) {\r\n return true;\r\n }\r\n if (tokenClaims.upn === loginHint) {\r\n return true;\r\n }\r\n return false;\r\n }\r\n /**\r\n * Helper to match sid\r\n * @param entity\r\n * @param sid\r\n * @returns true if the sid claim is present and matches the filter\r\n */\r\n matchSid(idTokenClaims, sid) {\r\n return idTokenClaims.sid === sid;\r\n }\r\n matchAuthorityType(entity, authorityType) {\r\n return !!(entity.authorityType &&\r\n authorityType.toLowerCase() === entity.authorityType.toLowerCase());\r\n }\r\n /**\r\n * Returns true if the target scopes are a subset of the current entity's scopes, false otherwise.\r\n * @param entity\r\n * @param target\r\n */\r\n matchTarget(entity, target) {\r\n const isNotAccessTokenCredential = entity.credentialType !== CredentialType.ACCESS_TOKEN &&\r\n entity.credentialType !==\r\n CredentialType.ACCESS_TOKEN_WITH_AUTH_SCHEME;\r\n if (isNotAccessTokenCredential || !entity.target) {\r\n return false;\r\n }\r\n const entityScopeSet = ScopeSet.fromString(entity.target);\r\n return entityScopeSet.containsScopeSet(target);\r\n }\r\n /**\r\n * Returns true if the credential's tokenType or Authentication Scheme matches the one in the request, false otherwise\r\n * @param entity\r\n * @param tokenType\r\n */\r\n matchTokenType(entity, tokenType) {\r\n return !!(entity.tokenType && entity.tokenType === tokenType);\r\n }\r\n /**\r\n * Returns true if the credential's keyId matches the one in the request, false otherwise\r\n * @param entity\r\n * @param keyId\r\n */\r\n matchKeyId(entity, keyId) {\r\n return !!(entity.keyId && entity.keyId === keyId);\r\n }\r\n /**\r\n * returns if a given cache entity is of the type appmetadata\r\n * @param key\r\n */\r\n isAppMetadata(key) {\r\n return key.indexOf(APP_METADATA) !== -1;\r\n }\r\n /**\r\n * returns if a given cache entity is of the type authoritymetadata\r\n * @param key\r\n */\r\n isAuthorityMetadata(key) {\r\n return key.indexOf(AUTHORITY_METADATA_CONSTANTS.CACHE_KEY) !== -1;\r\n }\r\n /**\r\n * returns cache key used for cloud instance metadata\r\n */\r\n generateAuthorityMetadataCacheKey(authority) {\r\n return `${AUTHORITY_METADATA_CONSTANTS.CACHE_KEY}-${this.clientId}-${authority}`;\r\n }\r\n /**\r\n * Helper to convert serialized data to object\r\n * @param obj\r\n * @param json\r\n */\r\n static toObject(obj, json) {\r\n for (const propertyName in json) {\r\n obj[propertyName] = json[propertyName];\r\n }\r\n return obj;\r\n }\r\n}\r\n/** @internal */\r\nclass DefaultStorageClass extends CacheManager {\r\n setAccount() {\r\n throw createClientAuthError(methodNotImplemented);\r\n }\r\n getAccount() {\r\n throw createClientAuthError(methodNotImplemented);\r\n }\r\n getCachedAccountEntity() {\r\n throw createClientAuthError(methodNotImplemented);\r\n }\r\n setIdTokenCredential() {\r\n throw createClientAuthError(methodNotImplemented);\r\n }\r\n getIdTokenCredential() {\r\n throw createClientAuthError(methodNotImplemented);\r\n }\r\n setAccessTokenCredential() {\r\n throw createClientAuthError(methodNotImplemented);\r\n }\r\n getAccessTokenCredential() {\r\n throw createClientAuthError(methodNotImplemented);\r\n }\r\n setRefreshTokenCredential() {\r\n throw createClientAuthError(methodNotImplemented);\r\n }\r\n getRefreshTokenCredential() {\r\n throw createClientAuthError(methodNotImplemented);\r\n }\r\n setAppMetadata() {\r\n throw createClientAuthError(methodNotImplemented);\r\n }\r\n getAppMetadata() {\r\n throw createClientAuthError(methodNotImplemented);\r\n }\r\n setServerTelemetry() {\r\n throw createClientAuthError(methodNotImplemented);\r\n }\r\n getServerTelemetry() {\r\n throw createClientAuthError(methodNotImplemented);\r\n }\r\n setAuthorityMetadata() {\r\n throw createClientAuthError(methodNotImplemented);\r\n }\r\n getAuthorityMetadata() {\r\n throw createClientAuthError(methodNotImplemented);\r\n }\r\n getAuthorityMetadataKeys() {\r\n throw createClientAuthError(methodNotImplemented);\r\n }\r\n setThrottlingCache() {\r\n throw createClientAuthError(methodNotImplemented);\r\n }\r\n getThrottlingCache() {\r\n throw createClientAuthError(methodNotImplemented);\r\n }\r\n removeItem() {\r\n throw createClientAuthError(methodNotImplemented);\r\n }\r\n getKeys() {\r\n throw createClientAuthError(methodNotImplemented);\r\n }\r\n getAccountKeys() {\r\n throw createClientAuthError(methodNotImplemented);\r\n }\r\n getTokenKeys() {\r\n throw createClientAuthError(methodNotImplemented);\r\n }\r\n updateCredentialCacheKey() {\r\n throw createClientAuthError(methodNotImplemented);\r\n }\r\n removeOutdatedAccount() {\r\n throw createClientAuthError(methodNotImplemented);\r\n }\r\n}\n\nexport { CacheManager, DefaultStorageClass };\n//# sourceMappingURL=CacheManager.mjs.map\n","/*! @azure/msal-common v14.16.1 2025-08-05 */\n'use strict';\nimport { DEFAULT_CRYPTO_IMPLEMENTATION } from '../crypto/ICrypto.mjs';\nimport { Logger, LogLevel } from '../logger/Logger.mjs';\nimport { DEFAULT_TOKEN_RENEWAL_OFFSET_SEC, Constants } from '../utils/Constants.mjs';\nimport { version } from '../packageMetadata.mjs';\nimport { AzureCloudInstance } from '../authority/AuthorityOptions.mjs';\nimport { DefaultStorageClass } from '../cache/CacheManager.mjs';\nimport { ProtocolMode } from '../authority/ProtocolMode.mjs';\nimport { createClientAuthError } from '../error/ClientAuthError.mjs';\nimport { methodNotImplemented } from '../error/ClientAuthErrorCodes.mjs';\n\n/*\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License.\r\n */\r\nconst DEFAULT_SYSTEM_OPTIONS = {\r\n tokenRenewalOffsetSeconds: DEFAULT_TOKEN_RENEWAL_OFFSET_SEC,\r\n preventCorsPreflight: false,\r\n};\r\nconst DEFAULT_LOGGER_IMPLEMENTATION = {\r\n loggerCallback: () => {\r\n // allow users to not set loggerCallback\r\n },\r\n piiLoggingEnabled: false,\r\n logLevel: LogLevel.Info,\r\n correlationId: Constants.EMPTY_STRING,\r\n};\r\nconst DEFAULT_CACHE_OPTIONS = {\r\n claimsBasedCachingEnabled: false,\r\n};\r\nconst DEFAULT_NETWORK_IMPLEMENTATION = {\r\n async sendGetRequestAsync() {\r\n throw createClientAuthError(methodNotImplemented);\r\n },\r\n async sendPostRequestAsync() {\r\n throw createClientAuthError(methodNotImplemented);\r\n },\r\n};\r\nconst DEFAULT_LIBRARY_INFO = {\r\n sku: Constants.SKU,\r\n version: version,\r\n cpu: Constants.EMPTY_STRING,\r\n os: Constants.EMPTY_STRING,\r\n};\r\nconst DEFAULT_CLIENT_CREDENTIALS = {\r\n clientSecret: Constants.EMPTY_STRING,\r\n clientAssertion: undefined,\r\n};\r\nconst DEFAULT_AZURE_CLOUD_OPTIONS = {\r\n azureCloudInstance: AzureCloudInstance.None,\r\n tenant: `${Constants.DEFAULT_COMMON_TENANT}`,\r\n};\r\nconst DEFAULT_TELEMETRY_OPTIONS = {\r\n application: {\r\n appName: \"\",\r\n appVersion: \"\",\r\n },\r\n};\r\n/**\r\n * Function that sets the default options when not explicitly configured from app developer\r\n *\r\n * @param Configuration\r\n *\r\n * @returns Configuration\r\n */\r\nfunction buildClientConfiguration({ authOptions: userAuthOptions, systemOptions: userSystemOptions, loggerOptions: userLoggerOption, cacheOptions: userCacheOptions, storageInterface: storageImplementation, networkInterface: networkImplementation, cryptoInterface: cryptoImplementation, clientCredentials: clientCredentials, libraryInfo: libraryInfo, telemetry: telemetry, serverTelemetryManager: serverTelemetryManager, persistencePlugin: persistencePlugin, serializableCache: serializableCache, }) {\r\n const loggerOptions = {\r\n ...DEFAULT_LOGGER_IMPLEMENTATION,\r\n ...userLoggerOption,\r\n };\r\n return {\r\n authOptions: buildAuthOptions(userAuthOptions),\r\n systemOptions: { ...DEFAULT_SYSTEM_OPTIONS, ...userSystemOptions },\r\n loggerOptions: loggerOptions,\r\n cacheOptions: { ...DEFAULT_CACHE_OPTIONS, ...userCacheOptions },\r\n storageInterface: storageImplementation ||\r\n new DefaultStorageClass(userAuthOptions.clientId, DEFAULT_CRYPTO_IMPLEMENTATION, new Logger(loggerOptions)),\r\n networkInterface: networkImplementation || DEFAULT_NETWORK_IMPLEMENTATION,\r\n cryptoInterface: cryptoImplementation || DEFAULT_CRYPTO_IMPLEMENTATION,\r\n clientCredentials: clientCredentials || DEFAULT_CLIENT_CREDENTIALS,\r\n libraryInfo: { ...DEFAULT_LIBRARY_INFO, ...libraryInfo },\r\n telemetry: { ...DEFAULT_TELEMETRY_OPTIONS, ...telemetry },\r\n serverTelemetryManager: serverTelemetryManager || null,\r\n persistencePlugin: persistencePlugin || null,\r\n serializableCache: serializableCache || null,\r\n };\r\n}\r\n/**\r\n * Construct authoptions from the client and platform passed values\r\n * @param authOptions\r\n */\r\nfunction buildAuthOptions(authOptions) {\r\n return {\r\n clientCapabilities: [],\r\n azureCloudOptions: DEFAULT_AZURE_CLOUD_OPTIONS,\r\n skipAuthorityMetadataCache: false,\r\n instanceAware: false,\r\n ...authOptions,\r\n };\r\n}\r\n/**\r\n * Returns true if config has protocolMode set to ProtocolMode.OIDC, false otherwise\r\n * @param ClientConfiguration\r\n */\r\nfunction isOidcProtocolMode(config) {\r\n return (config.authOptions.authority.options.protocolMode === ProtocolMode.OIDC);\r\n}\n\nexport { DEFAULT_SYSTEM_OPTIONS, buildClientConfiguration, isOidcProtocolMode };\n//# sourceMappingURL=ClientConfiguration.mjs.map\n","/*! @azure/msal-common v14.16.1 2025-08-05 */\n'use strict';\n/*\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License.\r\n */\r\nconst CcsCredentialType = {\r\n HOME_ACCOUNT_ID: \"home_account_id\",\r\n UPN: \"UPN\",\r\n};\n\nexport { CcsCredentialType };\n//# sourceMappingURL=CcsCredential.mjs.map\n","/*! @azure/msal-common v14.16.1 2025-08-05 */\n'use strict';\n/*\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License.\r\n */\r\nconst CLIENT_ID = \"client_id\";\r\nconst REDIRECT_URI = \"redirect_uri\";\r\nconst RESPONSE_TYPE = \"response_type\";\r\nconst RESPONSE_MODE = \"response_mode\";\r\nconst GRANT_TYPE = \"grant_type\";\r\nconst CLAIMS = \"claims\";\r\nconst SCOPE = \"scope\";\r\nconst ERROR = \"error\";\r\nconst ERROR_DESCRIPTION = \"error_description\";\r\nconst ACCESS_TOKEN = \"access_token\";\r\nconst ID_TOKEN = \"id_token\";\r\nconst REFRESH_TOKEN = \"refresh_token\";\r\nconst EXPIRES_IN = \"expires_in\";\r\nconst REFRESH_TOKEN_EXPIRES_IN = \"refresh_token_expires_in\";\r\nconst STATE = \"state\";\r\nconst NONCE = \"nonce\";\r\nconst PROMPT = \"prompt\";\r\nconst SESSION_STATE = \"session_state\";\r\nconst CLIENT_INFO = \"client_info\";\r\nconst CODE = \"code\";\r\nconst CODE_CHALLENGE = \"code_challenge\";\r\nconst CODE_CHALLENGE_METHOD = \"code_challenge_method\";\r\nconst CODE_VERIFIER = \"code_verifier\";\r\nconst CLIENT_REQUEST_ID = \"client-request-id\";\r\nconst X_CLIENT_SKU = \"x-client-SKU\";\r\nconst X_CLIENT_VER = \"x-client-VER\";\r\nconst X_CLIENT_OS = \"x-client-OS\";\r\nconst X_CLIENT_CPU = \"x-client-CPU\";\r\nconst X_CLIENT_CURR_TELEM = \"x-client-current-telemetry\";\r\nconst X_CLIENT_LAST_TELEM = \"x-client-last-telemetry\";\r\nconst X_MS_LIB_CAPABILITY = \"x-ms-lib-capability\";\r\nconst X_APP_NAME = \"x-app-name\";\r\nconst X_APP_VER = \"x-app-ver\";\r\nconst POST_LOGOUT_URI = \"post_logout_redirect_uri\";\r\nconst ID_TOKEN_HINT = \"id_token_hint\";\r\nconst DEVICE_CODE = \"device_code\";\r\nconst CLIENT_SECRET = \"client_secret\";\r\nconst CLIENT_ASSERTION = \"client_assertion\";\r\nconst CLIENT_ASSERTION_TYPE = \"client_assertion_type\";\r\nconst TOKEN_TYPE = \"token_type\";\r\nconst REQ_CNF = \"req_cnf\";\r\nconst OBO_ASSERTION = \"assertion\";\r\nconst REQUESTED_TOKEN_USE = \"requested_token_use\";\r\nconst ON_BEHALF_OF = \"on_behalf_of\";\r\nconst FOCI = \"foci\";\r\nconst CCS_HEADER = \"X-AnchorMailbox\";\r\nconst RETURN_SPA_CODE = \"return_spa_code\";\r\nconst NATIVE_BROKER = \"nativebroker\";\r\nconst LOGOUT_HINT = \"logout_hint\";\r\nconst SID = \"sid\";\r\nconst LOGIN_HINT = \"login_hint\";\r\nconst DOMAIN_HINT = \"domain_hint\";\r\nconst X_CLIENT_EXTRA_SKU = \"x-client-xtra-sku\";\r\nconst BROKER_CLIENT_ID = \"brk_client_id\";\r\nconst BROKER_REDIRECT_URI = \"brk_redirect_uri\";\n\nexport { ACCESS_TOKEN, BROKER_CLIENT_ID, BROKER_REDIRECT_URI, CCS_HEADER, CLAIMS, CLIENT_ASSERTION, CLIENT_ASSERTION_TYPE, CLIENT_ID, CLIENT_INFO, CLIENT_REQUEST_ID, CLIENT_SECRET, CODE, CODE_CHALLENGE, CODE_CHALLENGE_METHOD, CODE_VERIFIER, DEVICE_CODE, DOMAIN_HINT, ERROR, ERROR_DESCRIPTION, EXPIRES_IN, FOCI, GRANT_TYPE, ID_TOKEN, ID_TOKEN_HINT, LOGIN_HINT, LOGOUT_HINT, NATIVE_BROKER, NONCE, OBO_ASSERTION, ON_BEHALF_OF, POST_LOGOUT_URI, PROMPT, REDIRECT_URI, REFRESH_TOKEN, REFRESH_TOKEN_EXPIRES_IN, REQUESTED_TOKEN_USE, REQ_CNF, RESPONSE_MODE, RESPONSE_TYPE, RETURN_SPA_CODE, SCOPE, SESSION_STATE, SID, STATE, TOKEN_TYPE, X_APP_NAME, X_APP_VER, X_CLIENT_CPU, X_CLIENT_CURR_TELEM, X_CLIENT_EXTRA_SKU, X_CLIENT_LAST_TELEM, X_CLIENT_OS, X_CLIENT_SKU, X_CLIENT_VER, X_MS_LIB_CAPABILITY };\n//# sourceMappingURL=AADServerParamKeys.mjs.map\n","/*! @azure/msal-common v14.16.1 2025-08-05 */\n'use strict';\nimport { createClientConfigurationError } from '../error/ClientConfigurationError.mjs';\nimport { CodeChallengeMethodValues, PromptValue } from '../utils/Constants.mjs';\nimport { redirectUriEmpty, invalidPromptValue, invalidClaims, pkceParamsMissing, invalidCodeChallengeMethod } from '../error/ClientConfigurationErrorCodes.mjs';\n\n/*\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License.\r\n */\r\n/**\r\n * Validates server consumable params from the \"request\" objects\r\n */\r\nclass RequestValidator {\r\n /**\r\n * Utility to check if the `redirectUri` in the request is a non-null value\r\n * @param redirectUri\r\n */\r\n static validateRedirectUri(redirectUri) {\r\n if (!redirectUri) {\r\n throw createClientConfigurationError(redirectUriEmpty);\r\n }\r\n }\r\n /**\r\n * Utility to validate prompt sent by the user in the request\r\n * @param prompt\r\n */\r\n static validatePrompt(prompt) {\r\n const promptValues = [];\r\n for (const value in PromptValue) {\r\n promptValues.push(PromptValue[value]);\r\n }\r\n if (promptValues.indexOf(prompt) < 0) {\r\n throw createClientConfigurationError(invalidPromptValue);\r\n }\r\n }\r\n static validateClaims(claims) {\r\n try {\r\n JSON.parse(claims);\r\n }\r\n catch (e) {\r\n throw createClientConfigurationError(invalidClaims);\r\n }\r\n }\r\n /**\r\n * Utility to validate code_challenge and code_challenge_method\r\n * @param codeChallenge\r\n * @param codeChallengeMethod\r\n */\r\n static validateCodeChallengeParams(codeChallenge, codeChallengeMethod) {\r\n if (!codeChallenge || !codeChallengeMethod) {\r\n throw createClientConfigurationError(pkceParamsMissing);\r\n }\r\n else {\r\n this.validateCodeChallengeMethod(codeChallengeMethod);\r\n }\r\n }\r\n /**\r\n * Utility to validate code_challenge_method\r\n * @param codeChallengeMethod\r\n */\r\n static validateCodeChallengeMethod(codeChallengeMethod) {\r\n if ([\r\n CodeChallengeMethodValues.PLAIN,\r\n CodeChallengeMethodValues.S256,\r\n ].indexOf(codeChallengeMethod) < 0) {\r\n throw createClientConfigurationError(invalidCodeChallengeMethod);\r\n }\r\n }\r\n}\n\nexport { RequestValidator };\n//# sourceMappingURL=RequestValidator.mjs.map\n","/*! @azure/msal-common v14.16.1 2025-08-05 */\n'use strict';\nimport { Constants, ResponseMode, OIDC_DEFAULT_SCOPES, HeaderNames, CLIENT_INFO, ClaimsRequestKeys, PasswordGrantConstants, AuthenticationScheme, ThrottlingConstants } from '../utils/Constants.mjs';\nimport { RESPONSE_TYPE, RESPONSE_MODE, NATIVE_BROKER, SCOPE, CLIENT_ID, REDIRECT_URI, POST_LOGOUT_URI, ID_TOKEN_HINT, DOMAIN_HINT, LOGIN_HINT, SID, CLAIMS, CLIENT_REQUEST_ID, X_CLIENT_SKU, X_CLIENT_VER, X_CLIENT_OS, X_CLIENT_CPU, X_APP_NAME, X_APP_VER, PROMPT, STATE, NONCE, CODE_CHALLENGE, CODE_CHALLENGE_METHOD, CODE, DEVICE_CODE, REFRESH_TOKEN, CODE_VERIFIER, CLIENT_SECRET, CLIENT_ASSERTION, CLIENT_ASSERTION_TYPE, OBO_ASSERTION, REQUESTED_TOKEN_USE, GRANT_TYPE, TOKEN_TYPE, REQ_CNF, X_CLIENT_CURR_TELEM, X_CLIENT_LAST_TELEM, X_MS_LIB_CAPABILITY, LOGOUT_HINT, BROKER_CLIENT_ID, BROKER_REDIRECT_URI } from '../constants/AADServerParamKeys.mjs';\nimport { ScopeSet } from './ScopeSet.mjs';\nimport { createClientConfigurationError } from '../error/ClientConfigurationError.mjs';\nimport { RequestValidator } from './RequestValidator.mjs';\nimport { pkceParamsMissing, invalidClaims } from '../error/ClientConfigurationErrorCodes.mjs';\n\n/*\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License.\r\n */\r\nfunction instrumentBrokerParams(parameters, correlationId, performanceClient) {\r\n if (!correlationId) {\r\n return;\r\n }\r\n const clientId = parameters.get(CLIENT_ID);\r\n if (clientId && parameters.has(BROKER_CLIENT_ID)) {\r\n performanceClient?.addFields({\r\n embeddedClientId: clientId,\r\n embeddedRedirectUri: parameters.get(REDIRECT_URI),\r\n }, correlationId);\r\n }\r\n}\r\n/** @internal */\r\nclass RequestParameterBuilder {\r\n constructor(correlationId, performanceClient) {\r\n this.parameters = new Map();\r\n this.performanceClient = performanceClient;\r\n this.correlationId = correlationId;\r\n }\r\n /**\r\n * add response_type = code\r\n */\r\n addResponseTypeCode() {\r\n this.parameters.set(RESPONSE_TYPE, encodeURIComponent(Constants.CODE_RESPONSE_TYPE));\r\n }\r\n /**\r\n * add response_type = token id_token\r\n */\r\n addResponseTypeForTokenAndIdToken() {\r\n this.parameters.set(RESPONSE_TYPE, encodeURIComponent(`${Constants.TOKEN_RESPONSE_TYPE} ${Constants.ID_TOKEN_RESPONSE_TYPE}`));\r\n }\r\n /**\r\n * add response_mode. defaults to query.\r\n * @param responseMode\r\n */\r\n addResponseMode(responseMode) {\r\n this.parameters.set(RESPONSE_MODE, encodeURIComponent(responseMode ? responseMode : ResponseMode.QUERY));\r\n }\r\n /**\r\n * Add flag to indicate STS should attempt to use WAM if available\r\n */\r\n addNativeBroker() {\r\n this.parameters.set(NATIVE_BROKER, encodeURIComponent(\"1\"));\r\n }\r\n /**\r\n * add scopes. set addOidcScopes to false to prevent default scopes in non-user scenarios\r\n * @param scopeSet\r\n * @param addOidcScopes\r\n */\r\n addScopes(scopes, addOidcScopes = true, defaultScopes = OIDC_DEFAULT_SCOPES) {\r\n // Always add openid to the scopes when adding OIDC scopes\r\n if (addOidcScopes &&\r\n !defaultScopes.includes(\"openid\") &&\r\n !scopes.includes(\"openid\")) {\r\n defaultScopes.push(\"openid\");\r\n }\r\n const requestScopes = addOidcScopes\r\n ? [...(scopes || []), ...defaultScopes]\r\n : scopes || [];\r\n const scopeSet = new ScopeSet(requestScopes);\r\n this.parameters.set(SCOPE, encodeURIComponent(scopeSet.printScopes()));\r\n }\r\n /**\r\n * add clientId\r\n * @param clientId\r\n */\r\n addClientId(clientId) {\r\n this.parameters.set(CLIENT_ID, encodeURIComponent(clientId));\r\n }\r\n /**\r\n * add redirect_uri\r\n * @param redirectUri\r\n */\r\n addRedirectUri(redirectUri) {\r\n RequestValidator.validateRedirectUri(redirectUri);\r\n this.parameters.set(REDIRECT_URI, encodeURIComponent(redirectUri));\r\n }\r\n /**\r\n * add post logout redirectUri\r\n * @param redirectUri\r\n */\r\n addPostLogoutRedirectUri(redirectUri) {\r\n RequestValidator.validateRedirectUri(redirectUri);\r\n this.parameters.set(POST_LOGOUT_URI, encodeURIComponent(redirectUri));\r\n }\r\n /**\r\n * add id_token_hint to logout request\r\n * @param idTokenHint\r\n */\r\n addIdTokenHint(idTokenHint) {\r\n this.parameters.set(ID_TOKEN_HINT, encodeURIComponent(idTokenHint));\r\n }\r\n /**\r\n * add domain_hint\r\n * @param domainHint\r\n */\r\n addDomainHint(domainHint) {\r\n this.parameters.set(DOMAIN_HINT, encodeURIComponent(domainHint));\r\n }\r\n /**\r\n * add login_hint\r\n * @param loginHint\r\n */\r\n addLoginHint(loginHint) {\r\n this.parameters.set(LOGIN_HINT, encodeURIComponent(loginHint));\r\n }\r\n /**\r\n * Adds the CCS (Cache Credential Service) query parameter for login_hint\r\n * @param loginHint\r\n */\r\n addCcsUpn(loginHint) {\r\n this.parameters.set(HeaderNames.CCS_HEADER, encodeURIComponent(`UPN:${loginHint}`));\r\n }\r\n /**\r\n * Adds the CCS (Cache Credential Service) query parameter for account object\r\n * @param loginHint\r\n */\r\n addCcsOid(clientInfo) {\r\n this.parameters.set(HeaderNames.CCS_HEADER, encodeURIComponent(`Oid:${clientInfo.uid}@${clientInfo.utid}`));\r\n }\r\n /**\r\n * add sid\r\n * @param sid\r\n */\r\n addSid(sid) {\r\n this.parameters.set(SID, encodeURIComponent(sid));\r\n }\r\n /**\r\n * add claims\r\n * @param claims\r\n */\r\n addClaims(claims, clientCapabilities) {\r\n const mergedClaims = this.addClientCapabilitiesToClaims(claims, clientCapabilities);\r\n RequestValidator.validateClaims(mergedClaims);\r\n this.parameters.set(CLAIMS, encodeURIComponent(mergedClaims));\r\n }\r\n /**\r\n * add correlationId\r\n * @param correlationId\r\n */\r\n addCorrelationId(correlationId) {\r\n this.parameters.set(CLIENT_REQUEST_ID, encodeURIComponent(correlationId));\r\n }\r\n /**\r\n * add library info query params\r\n * @param libraryInfo\r\n */\r\n addLibraryInfo(libraryInfo) {\r\n // Telemetry Info\r\n this.parameters.set(X_CLIENT_SKU, libraryInfo.sku);\r\n this.parameters.set(X_CLIENT_VER, libraryInfo.version);\r\n if (libraryInfo.os) {\r\n this.parameters.set(X_CLIENT_OS, libraryInfo.os);\r\n }\r\n if (libraryInfo.cpu) {\r\n this.parameters.set(X_CLIENT_CPU, libraryInfo.cpu);\r\n }\r\n }\r\n /**\r\n * Add client telemetry parameters\r\n * @param appTelemetry\r\n */\r\n addApplicationTelemetry(appTelemetry) {\r\n if (appTelemetry?.appName) {\r\n this.parameters.set(X_APP_NAME, appTelemetry.appName);\r\n }\r\n if (appTelemetry?.appVersion) {\r\n this.parameters.set(X_APP_VER, appTelemetry.appVersion);\r\n }\r\n }\r\n /**\r\n * add prompt\r\n * @param prompt\r\n */\r\n addPrompt(prompt) {\r\n RequestValidator.validatePrompt(prompt);\r\n this.parameters.set(`${PROMPT}`, encodeURIComponent(prompt));\r\n }\r\n /**\r\n * add state\r\n * @param state\r\n */\r\n addState(state) {\r\n if (state) {\r\n this.parameters.set(STATE, encodeURIComponent(state));\r\n }\r\n }\r\n /**\r\n * add nonce\r\n * @param nonce\r\n */\r\n addNonce(nonce) {\r\n this.parameters.set(NONCE, encodeURIComponent(nonce));\r\n }\r\n /**\r\n * add code_challenge and code_challenge_method\r\n * - throw if either of them are not passed\r\n * @param codeChallenge\r\n * @param codeChallengeMethod\r\n */\r\n addCodeChallengeParams(codeChallenge, codeChallengeMethod) {\r\n RequestValidator.validateCodeChallengeParams(codeChallenge, codeChallengeMethod);\r\n if (codeChallenge && codeChallengeMethod) {\r\n this.parameters.set(CODE_CHALLENGE, encodeURIComponent(codeChallenge));\r\n this.parameters.set(CODE_CHALLENGE_METHOD, encodeURIComponent(codeChallengeMethod));\r\n }\r\n else {\r\n throw createClientConfigurationError(pkceParamsMissing);\r\n }\r\n }\r\n /**\r\n * add the `authorization_code` passed by the user to exchange for a token\r\n * @param code\r\n */\r\n addAuthorizationCode(code) {\r\n this.parameters.set(CODE, encodeURIComponent(code));\r\n }\r\n /**\r\n * add the `authorization_code` passed by the user to exchange for a token\r\n * @param code\r\n */\r\n addDeviceCode(code) {\r\n this.parameters.set(DEVICE_CODE, encodeURIComponent(code));\r\n }\r\n /**\r\n * add the `refreshToken` passed by the user\r\n * @param refreshToken\r\n */\r\n addRefreshToken(refreshToken) {\r\n this.parameters.set(REFRESH_TOKEN, encodeURIComponent(refreshToken));\r\n }\r\n /**\r\n * add the `code_verifier` passed by the user to exchange for a token\r\n * @param codeVerifier\r\n */\r\n addCodeVerifier(codeVerifier) {\r\n this.parameters.set(CODE_VERIFIER, encodeURIComponent(codeVerifier));\r\n }\r\n /**\r\n * add client_secret\r\n * @param clientSecret\r\n */\r\n addClientSecret(clientSecret) {\r\n this.parameters.set(CLIENT_SECRET, encodeURIComponent(clientSecret));\r\n }\r\n /**\r\n * add clientAssertion for confidential client flows\r\n * @param clientAssertion\r\n */\r\n addClientAssertion(clientAssertion) {\r\n if (clientAssertion) {\r\n this.parameters.set(CLIENT_ASSERTION, encodeURIComponent(clientAssertion));\r\n }\r\n }\r\n /**\r\n * add clientAssertionType for confidential client flows\r\n * @param clientAssertionType\r\n */\r\n addClientAssertionType(clientAssertionType) {\r\n if (clientAssertionType) {\r\n this.parameters.set(CLIENT_ASSERTION_TYPE, encodeURIComponent(clientAssertionType));\r\n }\r\n }\r\n /**\r\n * add OBO assertion for confidential client flows\r\n * @param clientAssertion\r\n */\r\n addOboAssertion(oboAssertion) {\r\n this.parameters.set(OBO_ASSERTION, encodeURIComponent(oboAssertion));\r\n }\r\n /**\r\n * add grant type\r\n * @param grantType\r\n */\r\n addRequestTokenUse(tokenUse) {\r\n this.parameters.set(REQUESTED_TOKEN_USE, encodeURIComponent(tokenUse));\r\n }\r\n /**\r\n * add grant type\r\n * @param grantType\r\n */\r\n addGrantType(grantType) {\r\n this.parameters.set(GRANT_TYPE, encodeURIComponent(grantType));\r\n }\r\n /**\r\n * add client info\r\n *\r\n */\r\n addClientInfo() {\r\n this.parameters.set(CLIENT_INFO, \"1\");\r\n }\r\n /**\r\n * add extraQueryParams\r\n * @param eQParams\r\n */\r\n addExtraQueryParameters(eQParams) {\r\n Object.entries(eQParams).forEach(([key, value]) => {\r\n if (!this.parameters.has(key) && value) {\r\n this.parameters.set(key, value);\r\n }\r\n });\r\n }\r\n addClientCapabilitiesToClaims(claims, clientCapabilities) {\r\n let mergedClaims;\r\n // Parse provided claims into JSON object or initialize empty object\r\n if (!claims) {\r\n mergedClaims = {};\r\n }\r\n else {\r\n try {\r\n mergedClaims = JSON.parse(claims);\r\n }\r\n catch (e) {\r\n throw createClientConfigurationError(invalidClaims);\r\n }\r\n }\r\n if (clientCapabilities && clientCapabilities.length > 0) {\r\n if (!mergedClaims.hasOwnProperty(ClaimsRequestKeys.ACCESS_TOKEN)) {\r\n // Add access_token key to claims object\r\n mergedClaims[ClaimsRequestKeys.ACCESS_TOKEN] = {};\r\n }\r\n // Add xms_cc claim with provided clientCapabilities to access_token key\r\n mergedClaims[ClaimsRequestKeys.ACCESS_TOKEN][ClaimsRequestKeys.XMS_CC] = {\r\n values: clientCapabilities,\r\n };\r\n }\r\n return JSON.stringify(mergedClaims);\r\n }\r\n /**\r\n * adds `username` for Password Grant flow\r\n * @param username\r\n */\r\n addUsername(username) {\r\n this.parameters.set(PasswordGrantConstants.username, encodeURIComponent(username));\r\n }\r\n /**\r\n * adds `password` for Password Grant flow\r\n * @param password\r\n */\r\n addPassword(password) {\r\n this.parameters.set(PasswordGrantConstants.password, encodeURIComponent(password));\r\n }\r\n /**\r\n * add pop_jwk to query params\r\n * @param cnfString\r\n */\r\n addPopToken(cnfString) {\r\n if (cnfString) {\r\n this.parameters.set(TOKEN_TYPE, AuthenticationScheme.POP);\r\n this.parameters.set(REQ_CNF, encodeURIComponent(cnfString));\r\n }\r\n }\r\n /**\r\n * add SSH JWK and key ID to query params\r\n */\r\n addSshJwk(sshJwkString) {\r\n if (sshJwkString) {\r\n this.parameters.set(TOKEN_TYPE, AuthenticationScheme.SSH);\r\n this.parameters.set(REQ_CNF, encodeURIComponent(sshJwkString));\r\n }\r\n }\r\n /**\r\n * add server telemetry fields\r\n * @param serverTelemetryManager\r\n */\r\n addServerTelemetry(serverTelemetryManager) {\r\n this.parameters.set(X_CLIENT_CURR_TELEM, serverTelemetryManager.generateCurrentRequestHeaderValue());\r\n this.parameters.set(X_CLIENT_LAST_TELEM, serverTelemetryManager.generateLastRequestHeaderValue());\r\n }\r\n /**\r\n * Adds parameter that indicates to the server that throttling is supported\r\n */\r\n addThrottling() {\r\n this.parameters.set(X_MS_LIB_CAPABILITY, ThrottlingConstants.X_MS_LIB_CAPABILITY_VALUE);\r\n }\r\n /**\r\n * Adds logout_hint parameter for \"silent\" logout which prevent server account picker\r\n */\r\n addLogoutHint(logoutHint) {\r\n this.parameters.set(LOGOUT_HINT, encodeURIComponent(logoutHint));\r\n }\r\n addBrokerParameters(params) {\r\n const brokerParams = {};\r\n brokerParams[BROKER_CLIENT_ID] =\r\n params.brokerClientId;\r\n brokerParams[BROKER_REDIRECT_URI] =\r\n params.brokerRedirectUri;\r\n this.addExtraQueryParameters(brokerParams);\r\n }\r\n /**\r\n * Utility to create a URL from the params map\r\n */\r\n createQueryString() {\r\n const queryParameterArray = new Array();\r\n this.parameters.forEach((value, key) => {\r\n queryParameterArray.push(`${key}=${value}`);\r\n });\r\n instrumentBrokerParams(this.parameters, this.correlationId, this.performanceClient);\r\n return queryParameterArray.join(\"&\");\r\n }\r\n}\n\nexport { RequestParameterBuilder };\n//# sourceMappingURL=RequestParameterBuilder.mjs.map\n","/*! @azure/msal-common v14.16.1 2025-08-05 */\n'use strict';\n/*\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License.\r\n */\r\nfunction isOpenIdConfigResponse(response) {\r\n return (response.hasOwnProperty(\"authorization_endpoint\") &&\r\n response.hasOwnProperty(\"token_endpoint\") &&\r\n response.hasOwnProperty(\"issuer\") &&\r\n response.hasOwnProperty(\"jwks_uri\"));\r\n}\n\nexport { isOpenIdConfigResponse };\n//# sourceMappingURL=OpenIdConfigResponse.mjs.map\n","/*! @azure/msal-common v14.16.1 2025-08-05 */\n'use strict';\n/*\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License.\r\n */\r\nfunction isCloudInstanceDiscoveryResponse(response) {\r\n return (response.hasOwnProperty(\"tenant_discovery_endpoint\") &&\r\n response.hasOwnProperty(\"metadata\"));\r\n}\n\nexport { isCloudInstanceDiscoveryResponse };\n//# sourceMappingURL=CloudInstanceDiscoveryResponse.mjs.map\n","/*! @azure/msal-common v14.16.1 2025-08-05 */\n'use strict';\n/*\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License.\r\n */\r\nfunction isCloudInstanceDiscoveryErrorResponse(response) {\r\n return (response.hasOwnProperty(\"error\") &&\r\n response.hasOwnProperty(\"error_description\"));\r\n}\n\nexport { isCloudInstanceDiscoveryErrorResponse };\n//# sourceMappingURL=CloudInstanceDiscoveryErrorResponse.mjs.map\n","/*! @azure/msal-common v14.16.1 2025-08-05 */\n'use strict';\n/*\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License.\r\n */\r\n/**\r\n * Enumeration of operations that are instrumented by have their performance measured by the PerformanceClient.\r\n *\r\n * @export\r\n * @enum {number}\r\n */\r\nconst PerformanceEvents = {\r\n /**\r\n * acquireTokenByCode API (msal-browser and msal-node).\r\n * Used to acquire tokens by trading an authorization code against the token endpoint.\r\n */\r\n AcquireTokenByCode: \"acquireTokenByCode\",\r\n /**\r\n * acquireTokenByRefreshToken API (msal-browser and msal-node).\r\n * Used to renew an access token using a refresh token against the token endpoint.\r\n */\r\n AcquireTokenByRefreshToken: \"acquireTokenByRefreshToken\",\r\n /**\r\n * acquireTokenSilent API (msal-browser and msal-node).\r\n * Used to silently acquire a new access token (from the cache or the network).\r\n */\r\n AcquireTokenSilent: \"acquireTokenSilent\",\r\n /**\r\n * acquireTokenSilentAsync (msal-browser).\r\n * Internal API for acquireTokenSilent.\r\n */\r\n AcquireTokenSilentAsync: \"acquireTokenSilentAsync\",\r\n /**\r\n * acquireTokenPopup (msal-browser).\r\n * Used to acquire a new access token interactively through pop ups\r\n */\r\n AcquireTokenPopup: \"acquireTokenPopup\",\r\n /**\r\n * acquireTokenPreRedirect (msal-browser).\r\n * First part of the redirect flow.\r\n * Used to acquire a new access token interactively through redirects.\r\n */\r\n AcquireTokenPreRedirect: \"acquireTokenPreRedirect\",\r\n /**\r\n * acquireTokenRedirect (msal-browser).\r\n * Second part of the redirect flow.\r\n * Used to acquire a new access token interactively through redirects.\r\n */\r\n AcquireTokenRedirect: \"acquireTokenRedirect\",\r\n /**\r\n * getPublicKeyThumbprint API in CryptoOpts class (msal-browser).\r\n * Used to generate a public/private keypair and generate a public key thumbprint for pop requests.\r\n */\r\n CryptoOptsGetPublicKeyThumbprint: \"cryptoOptsGetPublicKeyThumbprint\",\r\n /**\r\n * signJwt API in CryptoOpts class (msal-browser).\r\n * Used to signed a pop token.\r\n */\r\n CryptoOptsSignJwt: \"cryptoOptsSignJwt\",\r\n /**\r\n * acquireToken API in the SilentCacheClient class (msal-browser).\r\n * Used to read access tokens from the cache.\r\n */\r\n SilentCacheClientAcquireToken: \"silentCacheClientAcquireToken\",\r\n /**\r\n * acquireToken API in the SilentIframeClient class (msal-browser).\r\n * Used to acquire a new set of tokens from the authorize endpoint in a hidden iframe.\r\n */\r\n SilentIframeClientAcquireToken: \"silentIframeClientAcquireToken\",\r\n AwaitConcurrentIframe: \"awaitConcurrentIframe\",\r\n /**\r\n * acquireToken API in SilentRereshClient (msal-browser).\r\n * Used to acquire a new set of tokens from the token endpoint using a refresh token.\r\n */\r\n SilentRefreshClientAcquireToken: \"silentRefreshClientAcquireToken\",\r\n /**\r\n * ssoSilent API (msal-browser).\r\n * Used to silently acquire an authorization code and set of tokens using a hidden iframe.\r\n */\r\n SsoSilent: \"ssoSilent\",\r\n /**\r\n * getDiscoveredAuthority API in StandardInteractionClient class (msal-browser).\r\n * Used to load authority metadata for a request.\r\n */\r\n StandardInteractionClientGetDiscoveredAuthority: \"standardInteractionClientGetDiscoveredAuthority\",\r\n /**\r\n * acquireToken APIs in msal-browser.\r\n * Used to make an /authorize endpoint call with native brokering enabled.\r\n */\r\n FetchAccountIdWithNativeBroker: \"fetchAccountIdWithNativeBroker\",\r\n /**\r\n * acquireToken API in NativeInteractionClient class (msal-browser).\r\n * Used to acquire a token from Native component when native brokering is enabled.\r\n */\r\n NativeInteractionClientAcquireToken: \"nativeInteractionClientAcquireToken\",\r\n /**\r\n * Time spent creating default headers for requests to token endpoint\r\n */\r\n BaseClientCreateTokenRequestHeaders: \"baseClientCreateTokenRequestHeaders\",\r\n /**\r\n * Time spent sending/waiting for the response of a request to the token endpoint\r\n */\r\n NetworkClientSendPostRequestAsync: \"networkClientSendPostRequestAsync\",\r\n RefreshTokenClientExecutePostToTokenEndpoint: \"refreshTokenClientExecutePostToTokenEndpoint\",\r\n AuthorizationCodeClientExecutePostToTokenEndpoint: \"authorizationCodeClientExecutePostToTokenEndpoint\",\r\n /**\r\n * Used to measure the time taken for completing embedded-broker handshake (PW-Broker).\r\n */\r\n BrokerHandhshake: \"brokerHandshake\",\r\n /**\r\n * acquireTokenByRefreshToken API in BrokerClientApplication (PW-Broker) .\r\n */\r\n AcquireTokenByRefreshTokenInBroker: \"acquireTokenByRefreshTokenInBroker\",\r\n /**\r\n * Time taken for token acquisition by broker\r\n */\r\n AcquireTokenByBroker: \"acquireTokenByBroker\",\r\n /**\r\n * Time spent on the network for refresh token acquisition\r\n */\r\n RefreshTokenClientExecuteTokenRequest: \"refreshTokenClientExecuteTokenRequest\",\r\n /**\r\n * Time taken for acquiring refresh token , records RT size\r\n */\r\n RefreshTokenClientAcquireToken: \"refreshTokenClientAcquireToken\",\r\n /**\r\n * Time taken for acquiring cached refresh token\r\n */\r\n RefreshTokenClientAcquireTokenWithCachedRefreshToken: \"refreshTokenClientAcquireTokenWithCachedRefreshToken\",\r\n /**\r\n * acquireTokenByRefreshToken API in RefreshTokenClient (msal-common).\r\n */\r\n RefreshTokenClientAcquireTokenByRefreshToken: \"refreshTokenClientAcquireTokenByRefreshToken\",\r\n /**\r\n * Helper function to create token request body in RefreshTokenClient (msal-common).\r\n */\r\n RefreshTokenClientCreateTokenRequestBody: \"refreshTokenClientCreateTokenRequestBody\",\r\n /**\r\n * acquireTokenFromCache (msal-browser).\r\n * Internal API for acquiring token from cache\r\n */\r\n AcquireTokenFromCache: \"acquireTokenFromCache\",\r\n SilentFlowClientAcquireCachedToken: \"silentFlowClientAcquireCachedToken\",\r\n SilentFlowClientGenerateResultFromCacheRecord: \"silentFlowClientGenerateResultFromCacheRecord\",\r\n /**\r\n * acquireTokenBySilentIframe (msal-browser).\r\n * Internal API for acquiring token by silent Iframe\r\n */\r\n AcquireTokenBySilentIframe: \"acquireTokenBySilentIframe\",\r\n /**\r\n * Internal API for initializing base request in BaseInteractionClient (msal-browser)\r\n */\r\n InitializeBaseRequest: \"initializeBaseRequest\",\r\n /**\r\n * Internal API for initializing silent request in SilentCacheClient (msal-browser)\r\n */\r\n InitializeSilentRequest: \"initializeSilentRequest\",\r\n InitializeClientApplication: \"initializeClientApplication\",\r\n /**\r\n * Helper function in SilentIframeClient class (msal-browser).\r\n */\r\n SilentIframeClientTokenHelper: \"silentIframeClientTokenHelper\",\r\n /**\r\n * SilentHandler\r\n */\r\n SilentHandlerInitiateAuthRequest: \"silentHandlerInitiateAuthRequest\",\r\n SilentHandlerMonitorIframeForHash: \"silentHandlerMonitorIframeForHash\",\r\n SilentHandlerLoadFrame: \"silentHandlerLoadFrame\",\r\n SilentHandlerLoadFrameSync: \"silentHandlerLoadFrameSync\",\r\n /**\r\n * Helper functions in StandardInteractionClient class (msal-browser)\r\n */\r\n StandardInteractionClientCreateAuthCodeClient: \"standardInteractionClientCreateAuthCodeClient\",\r\n StandardInteractionClientGetClientConfiguration: \"standardInteractionClientGetClientConfiguration\",\r\n StandardInteractionClientInitializeAuthorizationRequest: \"standardInteractionClientInitializeAuthorizationRequest\",\r\n StandardInteractionClientInitializeAuthorizationCodeRequest: \"standardInteractionClientInitializeAuthorizationCodeRequest\",\r\n /**\r\n * getAuthCodeUrl API (msal-browser and msal-node).\r\n */\r\n GetAuthCodeUrl: \"getAuthCodeUrl\",\r\n /**\r\n * Functions from InteractionHandler (msal-browser)\r\n */\r\n HandleCodeResponseFromServer: \"handleCodeResponseFromServer\",\r\n HandleCodeResponse: \"handleCodeResponse\",\r\n UpdateTokenEndpointAuthority: \"updateTokenEndpointAuthority\",\r\n /**\r\n * APIs in Authorization Code Client (msal-common)\r\n */\r\n AuthClientAcquireToken: \"authClientAcquireToken\",\r\n AuthClientExecuteTokenRequest: \"authClientExecuteTokenRequest\",\r\n AuthClientCreateTokenRequestBody: \"authClientCreateTokenRequestBody\",\r\n AuthClientCreateQueryString: \"authClientCreateQueryString\",\r\n /**\r\n * Generate functions in PopTokenGenerator (msal-common)\r\n */\r\n PopTokenGenerateCnf: \"popTokenGenerateCnf\",\r\n PopTokenGenerateKid: \"popTokenGenerateKid\",\r\n /**\r\n * handleServerTokenResponse API in ResponseHandler (msal-common)\r\n */\r\n HandleServerTokenResponse: \"handleServerTokenResponse\",\r\n DeserializeResponse: \"deserializeResponse\",\r\n /**\r\n * Authority functions\r\n */\r\n AuthorityFactoryCreateDiscoveredInstance: \"authorityFactoryCreateDiscoveredInstance\",\r\n AuthorityResolveEndpointsAsync: \"authorityResolveEndpointsAsync\",\r\n AuthorityResolveEndpointsFromLocalSources: \"authorityResolveEndpointsFromLocalSources\",\r\n AuthorityGetCloudDiscoveryMetadataFromNetwork: \"authorityGetCloudDiscoveryMetadataFromNetwork\",\r\n AuthorityUpdateCloudDiscoveryMetadata: \"authorityUpdateCloudDiscoveryMetadata\",\r\n AuthorityGetEndpointMetadataFromNetwork: \"authorityGetEndpointMetadataFromNetwork\",\r\n AuthorityUpdateEndpointMetadata: \"authorityUpdateEndpointMetadata\",\r\n AuthorityUpdateMetadataWithRegionalInformation: \"authorityUpdateMetadataWithRegionalInformation\",\r\n /**\r\n * Region Discovery functions\r\n */\r\n RegionDiscoveryDetectRegion: \"regionDiscoveryDetectRegion\",\r\n RegionDiscoveryGetRegionFromIMDS: \"regionDiscoveryGetRegionFromIMDS\",\r\n RegionDiscoveryGetCurrentVersion: \"regionDiscoveryGetCurrentVersion\",\r\n AcquireTokenByCodeAsync: \"acquireTokenByCodeAsync\",\r\n GetEndpointMetadataFromNetwork: \"getEndpointMetadataFromNetwork\",\r\n GetCloudDiscoveryMetadataFromNetworkMeasurement: \"getCloudDiscoveryMetadataFromNetworkMeasurement\",\r\n HandleRedirectPromiseMeasurement: \"handleRedirectPromise\",\r\n HandleNativeRedirectPromiseMeasurement: \"handleNativeRedirectPromise\",\r\n UpdateCloudDiscoveryMetadataMeasurement: \"updateCloudDiscoveryMetadataMeasurement\",\r\n UsernamePasswordClientAcquireToken: \"usernamePasswordClientAcquireToken\",\r\n NativeMessageHandlerHandshake: \"nativeMessageHandlerHandshake\",\r\n NativeGenerateAuthResult: \"nativeGenerateAuthResult\",\r\n RemoveHiddenIframe: \"removeHiddenIframe\",\r\n /**\r\n * Cache operations\r\n */\r\n ClearTokensAndKeysWithClaims: \"clearTokensAndKeysWithClaims\",\r\n CacheManagerGetRefreshToken: \"cacheManagerGetRefreshToken\",\r\n /**\r\n * Crypto Operations\r\n */\r\n GeneratePkceCodes: \"generatePkceCodes\",\r\n GenerateCodeVerifier: \"generateCodeVerifier\",\r\n GenerateCodeChallengeFromVerifier: \"generateCodeChallengeFromVerifier\",\r\n Sha256Digest: \"sha256Digest\",\r\n GetRandomValues: \"getRandomValues\",\r\n};\r\nconst PerformanceEventAbbreviations = new Map([\r\n [PerformanceEvents.AcquireTokenByCode, \"ATByCode\"],\r\n [PerformanceEvents.AcquireTokenByRefreshToken, \"ATByRT\"],\r\n [PerformanceEvents.AcquireTokenSilent, \"ATS\"],\r\n [PerformanceEvents.AcquireTokenSilentAsync, \"ATSAsync\"],\r\n [PerformanceEvents.AcquireTokenPopup, \"ATPopup\"],\r\n [PerformanceEvents.AcquireTokenRedirect, \"ATRedirect\"],\r\n [\r\n PerformanceEvents.CryptoOptsGetPublicKeyThumbprint,\r\n \"CryptoGetPKThumb\",\r\n ],\r\n [PerformanceEvents.CryptoOptsSignJwt, \"CryptoSignJwt\"],\r\n [PerformanceEvents.SilentCacheClientAcquireToken, \"SltCacheClientAT\"],\r\n [PerformanceEvents.SilentIframeClientAcquireToken, \"SltIframeClientAT\"],\r\n [PerformanceEvents.SilentRefreshClientAcquireToken, \"SltRClientAT\"],\r\n [PerformanceEvents.SsoSilent, \"SsoSlt\"],\r\n [\r\n PerformanceEvents.StandardInteractionClientGetDiscoveredAuthority,\r\n \"StdIntClientGetDiscAuth\",\r\n ],\r\n [\r\n PerformanceEvents.FetchAccountIdWithNativeBroker,\r\n \"FetchAccIdWithNtvBroker\",\r\n ],\r\n [\r\n PerformanceEvents.NativeInteractionClientAcquireToken,\r\n \"NtvIntClientAT\",\r\n ],\r\n [\r\n PerformanceEvents.BaseClientCreateTokenRequestHeaders,\r\n \"BaseClientCreateTReqHead\",\r\n ],\r\n [\r\n PerformanceEvents.NetworkClientSendPostRequestAsync,\r\n \"NetClientSendPost\",\r\n ],\r\n [\r\n PerformanceEvents.RefreshTokenClientExecutePostToTokenEndpoint,\r\n \"RTClientExecPost\",\r\n ],\r\n [\r\n PerformanceEvents.AuthorizationCodeClientExecutePostToTokenEndpoint,\r\n \"AuthCodeClientExecPost\",\r\n ],\r\n [PerformanceEvents.BrokerHandhshake, \"BrokerHandshake\"],\r\n [\r\n PerformanceEvents.AcquireTokenByRefreshTokenInBroker,\r\n \"ATByRTInBroker\",\r\n ],\r\n [PerformanceEvents.AcquireTokenByBroker, \"ATByBroker\"],\r\n [\r\n PerformanceEvents.RefreshTokenClientExecuteTokenRequest,\r\n \"RTClientExecTReq\",\r\n ],\r\n [PerformanceEvents.RefreshTokenClientAcquireToken, \"RTClientAT\"],\r\n [\r\n PerformanceEvents.RefreshTokenClientAcquireTokenWithCachedRefreshToken,\r\n \"RTClientATWithCachedRT\",\r\n ],\r\n [\r\n PerformanceEvents.RefreshTokenClientAcquireTokenByRefreshToken,\r\n \"RTClientATByRT\",\r\n ],\r\n [\r\n PerformanceEvents.RefreshTokenClientCreateTokenRequestBody,\r\n \"RTClientCreateTReqBody\",\r\n ],\r\n [PerformanceEvents.AcquireTokenFromCache, \"ATFromCache\"],\r\n [\r\n PerformanceEvents.SilentFlowClientAcquireCachedToken,\r\n \"SltFlowClientATCached\",\r\n ],\r\n [\r\n PerformanceEvents.SilentFlowClientGenerateResultFromCacheRecord,\r\n \"SltFlowClientGenResFromCache\",\r\n ],\r\n [PerformanceEvents.AcquireTokenBySilentIframe, \"ATBySltIframe\"],\r\n [PerformanceEvents.InitializeBaseRequest, \"InitBaseReq\"],\r\n [PerformanceEvents.InitializeSilentRequest, \"InitSltReq\"],\r\n [\r\n PerformanceEvents.InitializeClientApplication,\r\n \"InitClientApplication\",\r\n ],\r\n [PerformanceEvents.SilentIframeClientTokenHelper, \"SIClientTHelper\"],\r\n [\r\n PerformanceEvents.SilentHandlerInitiateAuthRequest,\r\n \"SHandlerInitAuthReq\",\r\n ],\r\n [\r\n PerformanceEvents.SilentHandlerMonitorIframeForHash,\r\n \"SltHandlerMonitorIframeForHash\",\r\n ],\r\n [PerformanceEvents.SilentHandlerLoadFrame, \"SHandlerLoadFrame\"],\r\n [PerformanceEvents.SilentHandlerLoadFrameSync, \"SHandlerLoadFrameSync\"],\r\n [\r\n PerformanceEvents.StandardInteractionClientCreateAuthCodeClient,\r\n \"StdIntClientCreateAuthCodeClient\",\r\n ],\r\n [\r\n PerformanceEvents.StandardInteractionClientGetClientConfiguration,\r\n \"StdIntClientGetClientConf\",\r\n ],\r\n [\r\n PerformanceEvents.StandardInteractionClientInitializeAuthorizationRequest,\r\n \"StdIntClientInitAuthReq\",\r\n ],\r\n [\r\n PerformanceEvents.StandardInteractionClientInitializeAuthorizationCodeRequest,\r\n \"StdIntClientInitAuthCodeReq\",\r\n ],\r\n [PerformanceEvents.GetAuthCodeUrl, \"GetAuthCodeUrl\"],\r\n [\r\n PerformanceEvents.HandleCodeResponseFromServer,\r\n \"HandleCodeResFromServer\",\r\n ],\r\n [PerformanceEvents.HandleCodeResponse, \"HandleCodeResp\"],\r\n [PerformanceEvents.UpdateTokenEndpointAuthority, \"UpdTEndpointAuth\"],\r\n [PerformanceEvents.AuthClientAcquireToken, \"AuthClientAT\"],\r\n [PerformanceEvents.AuthClientExecuteTokenRequest, \"AuthClientExecTReq\"],\r\n [\r\n PerformanceEvents.AuthClientCreateTokenRequestBody,\r\n \"AuthClientCreateTReqBody\",\r\n ],\r\n [\r\n PerformanceEvents.AuthClientCreateQueryString,\r\n \"AuthClientCreateQueryStr\",\r\n ],\r\n [PerformanceEvents.PopTokenGenerateCnf, \"PopTGenCnf\"],\r\n [PerformanceEvents.PopTokenGenerateKid, \"PopTGenKid\"],\r\n [PerformanceEvents.HandleServerTokenResponse, \"HandleServerTRes\"],\r\n [PerformanceEvents.DeserializeResponse, \"DeserializeRes\"],\r\n [\r\n PerformanceEvents.AuthorityFactoryCreateDiscoveredInstance,\r\n \"AuthFactCreateDiscInst\",\r\n ],\r\n [\r\n PerformanceEvents.AuthorityResolveEndpointsAsync,\r\n \"AuthResolveEndpointsAsync\",\r\n ],\r\n [\r\n PerformanceEvents.AuthorityResolveEndpointsFromLocalSources,\r\n \"AuthResolveEndpointsFromLocal\",\r\n ],\r\n [\r\n PerformanceEvents.AuthorityGetCloudDiscoveryMetadataFromNetwork,\r\n \"AuthGetCDMetaFromNet\",\r\n ],\r\n [\r\n PerformanceEvents.AuthorityUpdateCloudDiscoveryMetadata,\r\n \"AuthUpdCDMeta\",\r\n ],\r\n [\r\n PerformanceEvents.AuthorityGetEndpointMetadataFromNetwork,\r\n \"AuthUpdCDMetaFromNet\",\r\n ],\r\n [\r\n PerformanceEvents.AuthorityUpdateEndpointMetadata,\r\n \"AuthUpdEndpointMeta\",\r\n ],\r\n [\r\n PerformanceEvents.AuthorityUpdateMetadataWithRegionalInformation,\r\n \"AuthUpdMetaWithRegInfo\",\r\n ],\r\n [PerformanceEvents.RegionDiscoveryDetectRegion, \"RegDiscDetectReg\"],\r\n [\r\n PerformanceEvents.RegionDiscoveryGetRegionFromIMDS,\r\n \"RegDiscGetRegFromIMDS\",\r\n ],\r\n [\r\n PerformanceEvents.RegionDiscoveryGetCurrentVersion,\r\n \"RegDiscGetCurrentVer\",\r\n ],\r\n [PerformanceEvents.AcquireTokenByCodeAsync, \"ATByCodeAsync\"],\r\n [\r\n PerformanceEvents.GetEndpointMetadataFromNetwork,\r\n \"GetEndpointMetaFromNet\",\r\n ],\r\n [\r\n PerformanceEvents.GetCloudDiscoveryMetadataFromNetworkMeasurement,\r\n \"GetCDMetaFromNet\",\r\n ],\r\n [\r\n PerformanceEvents.HandleRedirectPromiseMeasurement,\r\n \"HandleRedirectPromise\",\r\n ],\r\n [\r\n PerformanceEvents.HandleNativeRedirectPromiseMeasurement,\r\n \"HandleNtvRedirectPromise\",\r\n ],\r\n [\r\n PerformanceEvents.UpdateCloudDiscoveryMetadataMeasurement,\r\n \"UpdateCDMeta\",\r\n ],\r\n [\r\n PerformanceEvents.UsernamePasswordClientAcquireToken,\r\n \"UserPassClientAT\",\r\n ],\r\n [\r\n PerformanceEvents.NativeMessageHandlerHandshake,\r\n \"NtvMsgHandlerHandshake\",\r\n ],\r\n [PerformanceEvents.NativeGenerateAuthResult, \"NtvGenAuthRes\"],\r\n [PerformanceEvents.RemoveHiddenIframe, \"RemoveHiddenIframe\"],\r\n [\r\n PerformanceEvents.ClearTokensAndKeysWithClaims,\r\n \"ClearTAndKeysWithClaims\",\r\n ],\r\n [PerformanceEvents.CacheManagerGetRefreshToken, \"CacheManagerGetRT\"],\r\n [PerformanceEvents.GeneratePkceCodes, \"GenPkceCodes\"],\r\n [PerformanceEvents.GenerateCodeVerifier, \"GenCodeVerifier\"],\r\n [\r\n PerformanceEvents.GenerateCodeChallengeFromVerifier,\r\n \"GenCodeChallengeFromVerifier\",\r\n ],\r\n [PerformanceEvents.Sha256Digest, \"Sha256Digest\"],\r\n [PerformanceEvents.GetRandomValues, \"GetRandomValues\"],\r\n]);\r\n/**\r\n * State of the performance event.\r\n *\r\n * @export\r\n * @enum {number}\r\n */\r\nconst PerformanceEventStatus = {\r\n NotStarted: 0,\r\n InProgress: 1,\r\n Completed: 2,\r\n};\r\nconst IntFields = new Set([\r\n \"accessTokenSize\",\r\n \"durationMs\",\r\n \"idTokenSize\",\r\n \"matsSilentStatus\",\r\n \"matsHttpStatus\",\r\n \"refreshTokenSize\",\r\n \"queuedTimeMs\",\r\n \"startTimeMs\",\r\n \"status\",\r\n \"multiMatchedAT\",\r\n \"multiMatchedID\",\r\n \"multiMatchedRT\",\r\n]);\n\nexport { IntFields, PerformanceEventAbbreviations, PerformanceEventStatus, PerformanceEvents };\n//# sourceMappingURL=PerformanceEvent.mjs.map\n","/*! @azure/msal-common v14.16.1 2025-08-05 */\n'use strict';\n/*\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License.\r\n */\r\n/**\r\n * Wraps a function with a performance measurement.\r\n * Usage: invoke(functionToCall, performanceClient, \"EventName\", \"correlationId\")(...argsToPassToFunction)\r\n * @param callback\r\n * @param eventName\r\n * @param logger\r\n * @param telemetryClient\r\n * @param correlationId\r\n * @returns\r\n * @internal\r\n */\r\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\r\nconst invoke = (callback, eventName, logger, telemetryClient, correlationId) => {\r\n return (...args) => {\r\n logger.trace(`Executing function ${eventName}`);\r\n const inProgressEvent = telemetryClient?.startMeasurement(eventName, correlationId);\r\n if (correlationId) {\r\n // Track number of times this API is called in a single request\r\n const eventCount = eventName + \"CallCount\";\r\n telemetryClient?.incrementFields({ [eventCount]: 1 }, correlationId);\r\n }\r\n try {\r\n const result = callback(...args);\r\n inProgressEvent?.end({\r\n success: true,\r\n });\r\n logger.trace(`Returning result from ${eventName}`);\r\n return result;\r\n }\r\n catch (e) {\r\n logger.trace(`Error occurred in ${eventName}`);\r\n try {\r\n logger.trace(JSON.stringify(e));\r\n }\r\n catch (e) {\r\n logger.trace(\"Unable to print error message.\");\r\n }\r\n inProgressEvent?.end({\r\n success: false,\r\n }, e);\r\n throw e;\r\n }\r\n };\r\n};\r\n/**\r\n * Wraps an async function with a performance measurement.\r\n * Usage: invokeAsync(functionToCall, performanceClient, \"EventName\", \"correlationId\")(...argsToPassToFunction)\r\n * @param callback\r\n * @param eventName\r\n * @param logger\r\n * @param telemetryClient\r\n * @param correlationId\r\n * @returns\r\n * @internal\r\n *\r\n */\r\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\r\nconst invokeAsync = (callback, eventName, logger, telemetryClient, correlationId) => {\r\n return (...args) => {\r\n logger.trace(`Executing function ${eventName}`);\r\n const inProgressEvent = telemetryClient?.startMeasurement(eventName, correlationId);\r\n if (correlationId) {\r\n // Track number of times this API is called in a single request\r\n const eventCount = eventName + \"CallCount\";\r\n telemetryClient?.incrementFields({ [eventCount]: 1 }, correlationId);\r\n }\r\n telemetryClient?.setPreQueueTime(eventName, correlationId);\r\n return callback(...args)\r\n .then((response) => {\r\n logger.trace(`Returning result from ${eventName}`);\r\n inProgressEvent?.end({\r\n success: true,\r\n });\r\n return response;\r\n })\r\n .catch((e) => {\r\n logger.trace(`Error occurred in ${eventName}`);\r\n try {\r\n logger.trace(JSON.stringify(e));\r\n }\r\n catch (e) {\r\n logger.trace(\"Unable to print error message.\");\r\n }\r\n inProgressEvent?.end({\r\n success: false,\r\n }, e);\r\n throw e;\r\n });\r\n };\r\n};\n\nexport { invoke, invokeAsync };\n//# sourceMappingURL=FunctionWrappers.mjs.map\n","/*! @azure/msal-common v14.16.1 2025-08-05 */\n'use strict';\nimport { Constants, ResponseCodes, RegionDiscoverySources } from '../utils/Constants.mjs';\nimport { PerformanceEvents } from '../telemetry/performance/PerformanceEvent.mjs';\nimport { invokeAsync } from '../utils/FunctionWrappers.mjs';\n\n/*\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License.\r\n */\r\nclass RegionDiscovery {\r\n constructor(networkInterface, logger, performanceClient, correlationId) {\r\n this.networkInterface = networkInterface;\r\n this.logger = logger;\r\n this.performanceClient = performanceClient;\r\n this.correlationId = correlationId;\r\n }\r\n /**\r\n * Detect the region from the application's environment.\r\n *\r\n * @returns Promise\r\n */\r\n async detectRegion(environmentRegion, regionDiscoveryMetadata) {\r\n this.performanceClient?.addQueueMeasurement(PerformanceEvents.RegionDiscoveryDetectRegion, this.correlationId);\r\n // Initialize auto detected region with the region from the envrionment\r\n let autodetectedRegionName = environmentRegion;\r\n // Check if a region was detected from the environment, if not, attempt to get the region from IMDS\r\n if (!autodetectedRegionName) {\r\n const options = RegionDiscovery.IMDS_OPTIONS;\r\n try {\r\n const localIMDSVersionResponse = await invokeAsync(this.getRegionFromIMDS.bind(this), PerformanceEvents.RegionDiscoveryGetRegionFromIMDS, this.logger, this.performanceClient, this.correlationId)(Constants.IMDS_VERSION, options);\r\n if (localIMDSVersionResponse.status ===\r\n ResponseCodes.httpSuccess) {\r\n autodetectedRegionName = localIMDSVersionResponse.body;\r\n regionDiscoveryMetadata.region_source =\r\n RegionDiscoverySources.IMDS;\r\n }\r\n // If the response using the local IMDS version failed, try to fetch the current version of IMDS and retry.\r\n if (localIMDSVersionResponse.status ===\r\n ResponseCodes.httpBadRequest) {\r\n const currentIMDSVersion = await invokeAsync(this.getCurrentVersion.bind(this), PerformanceEvents.RegionDiscoveryGetCurrentVersion, this.logger, this.performanceClient, this.correlationId)(options);\r\n if (!currentIMDSVersion) {\r\n regionDiscoveryMetadata.region_source =\r\n RegionDiscoverySources.FAILED_AUTO_DETECTION;\r\n return null;\r\n }\r\n const currentIMDSVersionResponse = await invokeAsync(this.getRegionFromIMDS.bind(this), PerformanceEvents.RegionDiscoveryGetRegionFromIMDS, this.logger, this.performanceClient, this.correlationId)(currentIMDSVersion, options);\r\n if (currentIMDSVersionResponse.status ===\r\n ResponseCodes.httpSuccess) {\r\n autodetectedRegionName =\r\n currentIMDSVersionResponse.body;\r\n regionDiscoveryMetadata.region_source =\r\n RegionDiscoverySources.IMDS;\r\n }\r\n }\r\n }\r\n catch (e) {\r\n regionDiscoveryMetadata.region_source =\r\n RegionDiscoverySources.FAILED_AUTO_DETECTION;\r\n return null;\r\n }\r\n }\r\n else {\r\n regionDiscoveryMetadata.region_source =\r\n RegionDiscoverySources.ENVIRONMENT_VARIABLE;\r\n }\r\n // If no region was auto detected from the environment or from the IMDS endpoint, mark the attempt as a FAILED_AUTO_DETECTION\r\n if (!autodetectedRegionName) {\r\n regionDiscoveryMetadata.region_source =\r\n RegionDiscoverySources.FAILED_AUTO_DETECTION;\r\n }\r\n return autodetectedRegionName || null;\r\n }\r\n /**\r\n * Make the call to the IMDS endpoint\r\n *\r\n * @param imdsEndpointUrl\r\n * @returns Promise>\r\n */\r\n async getRegionFromIMDS(version, options) {\r\n this.performanceClient?.addQueueMeasurement(PerformanceEvents.RegionDiscoveryGetRegionFromIMDS, this.correlationId);\r\n return this.networkInterface.sendGetRequestAsync(`${Constants.IMDS_ENDPOINT}?api-version=${version}&format=text`, options, Constants.IMDS_TIMEOUT);\r\n }\r\n /**\r\n * Get the most recent version of the IMDS endpoint available\r\n *\r\n * @returns Promise\r\n */\r\n async getCurrentVersion(options) {\r\n this.performanceClient?.addQueueMeasurement(PerformanceEvents.RegionDiscoveryGetCurrentVersion, this.correlationId);\r\n try {\r\n const response = await this.networkInterface.sendGetRequestAsync(`${Constants.IMDS_ENDPOINT}?format=json`, options);\r\n // When IMDS endpoint is called without the api version query param, bad request response comes back with latest version.\r\n if (response.status === ResponseCodes.httpBadRequest &&\r\n response.body &&\r\n response.body[\"newest-versions\"] &&\r\n response.body[\"newest-versions\"].length > 0) {\r\n return response.body[\"newest-versions\"][0];\r\n }\r\n return null;\r\n }\r\n catch (e) {\r\n return null;\r\n }\r\n }\r\n}\r\n// Options for the IMDS endpoint request\r\nRegionDiscovery.IMDS_OPTIONS = {\r\n headers: {\r\n Metadata: \"true\",\r\n },\r\n};\n\nexport { RegionDiscovery };\n//# sourceMappingURL=RegionDiscovery.mjs.map\n","/*! @azure/msal-common v14.16.1 2025-08-05 */\n'use strict';\nimport { AuthorityType } from './AuthorityType.mjs';\nimport { isOpenIdConfigResponse } from './OpenIdConfigResponse.mjs';\nimport { UrlString } from '../url/UrlString.mjs';\nimport { createClientAuthError } from '../error/ClientAuthError.mjs';\nimport { Constants, AuthorityMetadataSource, RegionDiscoveryOutcomes, AADAuthorityConstants } from '../utils/Constants.mjs';\nimport { EndpointMetadata, getCloudDiscoveryMetadataFromHardcodedValues, getCloudDiscoveryMetadataFromNetworkResponse, InstanceDiscoveryMetadataAliases } from './AuthorityMetadata.mjs';\nimport { createClientConfigurationError } from '../error/ClientConfigurationError.mjs';\nimport { ProtocolMode } from './ProtocolMode.mjs';\nimport { AzureCloudInstance } from './AuthorityOptions.mjs';\nimport { isCloudInstanceDiscoveryResponse } from './CloudInstanceDiscoveryResponse.mjs';\nimport { isCloudInstanceDiscoveryErrorResponse } from './CloudInstanceDiscoveryErrorResponse.mjs';\nimport { RegionDiscovery } from './RegionDiscovery.mjs';\nimport { AuthError } from '../error/AuthError.mjs';\nimport { PerformanceEvents } from '../telemetry/performance/PerformanceEvent.mjs';\nimport { invokeAsync } from '../utils/FunctionWrappers.mjs';\nimport { generateAuthorityMetadataExpiresAt, updateAuthorityEndpointMetadata, isAuthorityMetadataExpired, updateCloudDiscoveryMetadata } from '../cache/utils/CacheHelpers.mjs';\nimport { endpointResolutionError, endSessionEndpointNotSupported, openIdConfigError } from '../error/ClientAuthErrorCodes.mjs';\nimport { invalidAuthorityMetadata, untrustedAuthority, invalidCloudDiscoveryMetadata } from '../error/ClientConfigurationErrorCodes.mjs';\n\n/*\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License.\r\n */\r\n/**\r\n * The authority class validates the authority URIs used by the user, and retrieves the OpenID Configuration Data from the\r\n * endpoint. It will store the pertinent config data in this object for use during token calls.\r\n * @internal\r\n */\r\nclass Authority {\r\n constructor(authority, networkInterface, cacheManager, authorityOptions, logger, correlationId, performanceClient, managedIdentity) {\r\n this.canonicalAuthority = authority;\r\n this._canonicalAuthority.validateAsUri();\r\n this.networkInterface = networkInterface;\r\n this.cacheManager = cacheManager;\r\n this.authorityOptions = authorityOptions;\r\n this.regionDiscoveryMetadata = {\r\n region_used: undefined,\r\n region_source: undefined,\r\n region_outcome: undefined,\r\n };\r\n this.logger = logger;\r\n this.performanceClient = performanceClient;\r\n this.correlationId = correlationId;\r\n this.managedIdentity = managedIdentity || false;\r\n this.regionDiscovery = new RegionDiscovery(networkInterface, this.logger, this.performanceClient, this.correlationId);\r\n }\r\n /**\r\n * Get {@link AuthorityType}\r\n * @param authorityUri {@link IUri}\r\n * @private\r\n */\r\n getAuthorityType(authorityUri) {\r\n // CIAM auth url pattern is being standardized as: .ciamlogin.com\r\n if (authorityUri.HostNameAndPort.endsWith(Constants.CIAM_AUTH_URL)) {\r\n return AuthorityType.Ciam;\r\n }\r\n const pathSegments = authorityUri.PathSegments;\r\n if (pathSegments.length) {\r\n switch (pathSegments[0].toLowerCase()) {\r\n case Constants.ADFS:\r\n return AuthorityType.Adfs;\r\n case Constants.DSTS:\r\n return AuthorityType.Dsts;\r\n }\r\n }\r\n return AuthorityType.Default;\r\n }\r\n // See above for AuthorityType\r\n get authorityType() {\r\n return this.getAuthorityType(this.canonicalAuthorityUrlComponents);\r\n }\r\n /**\r\n * ProtocolMode enum representing the way endpoints are constructed.\r\n */\r\n get protocolMode() {\r\n return this.authorityOptions.protocolMode;\r\n }\r\n /**\r\n * Returns authorityOptions which can be used to reinstantiate a new authority instance\r\n */\r\n get options() {\r\n return this.authorityOptions;\r\n }\r\n /**\r\n * A URL that is the authority set by the developer\r\n */\r\n get canonicalAuthority() {\r\n return this._canonicalAuthority.urlString;\r\n }\r\n /**\r\n * Sets canonical authority.\r\n */\r\n set canonicalAuthority(url) {\r\n this._canonicalAuthority = new UrlString(url);\r\n this._canonicalAuthority.validateAsUri();\r\n this._canonicalAuthorityUrlComponents = null;\r\n }\r\n /**\r\n * Get authority components.\r\n */\r\n get canonicalAuthorityUrlComponents() {\r\n if (!this._canonicalAuthorityUrlComponents) {\r\n this._canonicalAuthorityUrlComponents =\r\n this._canonicalAuthority.getUrlComponents();\r\n }\r\n return this._canonicalAuthorityUrlComponents;\r\n }\r\n /**\r\n * Get hostname and port i.e. login.microsoftonline.com\r\n */\r\n get hostnameAndPort() {\r\n return this.canonicalAuthorityUrlComponents.HostNameAndPort.toLowerCase();\r\n }\r\n /**\r\n * Get tenant for authority.\r\n */\r\n get tenant() {\r\n return this.canonicalAuthorityUrlComponents.PathSegments[0];\r\n }\r\n /**\r\n * OAuth /authorize endpoint for requests\r\n */\r\n get authorizationEndpoint() {\r\n if (this.discoveryComplete()) {\r\n return this.replacePath(this.metadata.authorization_endpoint);\r\n }\r\n else {\r\n throw createClientAuthError(endpointResolutionError);\r\n }\r\n }\r\n /**\r\n * OAuth /token endpoint for requests\r\n */\r\n get tokenEndpoint() {\r\n if (this.discoveryComplete()) {\r\n return this.replacePath(this.metadata.token_endpoint);\r\n }\r\n else {\r\n throw createClientAuthError(endpointResolutionError);\r\n }\r\n }\r\n get deviceCodeEndpoint() {\r\n if (this.discoveryComplete()) {\r\n return this.replacePath(this.metadata.token_endpoint.replace(\"/token\", \"/devicecode\"));\r\n }\r\n else {\r\n throw createClientAuthError(endpointResolutionError);\r\n }\r\n }\r\n /**\r\n * OAuth logout endpoint for requests\r\n */\r\n get endSessionEndpoint() {\r\n if (this.discoveryComplete()) {\r\n // ROPC policies may not have end_session_endpoint set\r\n if (!this.metadata.end_session_endpoint) {\r\n throw createClientAuthError(endSessionEndpointNotSupported);\r\n }\r\n return this.replacePath(this.metadata.end_session_endpoint);\r\n }\r\n else {\r\n throw createClientAuthError(endpointResolutionError);\r\n }\r\n }\r\n /**\r\n * OAuth issuer for requests\r\n */\r\n get selfSignedJwtAudience() {\r\n if (this.discoveryComplete()) {\r\n return this.replacePath(this.metadata.issuer);\r\n }\r\n else {\r\n throw createClientAuthError(endpointResolutionError);\r\n }\r\n }\r\n /**\r\n * Jwks_uri for token signing keys\r\n */\r\n get jwksUri() {\r\n if (this.discoveryComplete()) {\r\n return this.replacePath(this.metadata.jwks_uri);\r\n }\r\n else {\r\n throw createClientAuthError(endpointResolutionError);\r\n }\r\n }\r\n /**\r\n * Returns a flag indicating that tenant name can be replaced in authority {@link IUri}\r\n * @param authorityUri {@link IUri}\r\n * @private\r\n */\r\n canReplaceTenant(authorityUri) {\r\n return (authorityUri.PathSegments.length === 1 &&\r\n !Authority.reservedTenantDomains.has(authorityUri.PathSegments[0]) &&\r\n this.getAuthorityType(authorityUri) === AuthorityType.Default &&\r\n this.protocolMode === ProtocolMode.AAD);\r\n }\r\n /**\r\n * Replaces tenant in url path with current tenant. Defaults to common.\r\n * @param urlString\r\n */\r\n replaceTenant(urlString) {\r\n return urlString.replace(/{tenant}|{tenantid}/g, this.tenant);\r\n }\r\n /**\r\n * Replaces path such as tenant or policy with the current tenant or policy.\r\n * @param urlString\r\n */\r\n replacePath(urlString) {\r\n let endpoint = urlString;\r\n const cachedAuthorityUrl = new UrlString(this.metadata.canonical_authority);\r\n const cachedAuthorityUrlComponents = cachedAuthorityUrl.getUrlComponents();\r\n const cachedAuthorityParts = cachedAuthorityUrlComponents.PathSegments;\r\n const currentAuthorityParts = this.canonicalAuthorityUrlComponents.PathSegments;\r\n currentAuthorityParts.forEach((currentPart, index) => {\r\n let cachedPart = cachedAuthorityParts[index];\r\n if (index === 0 &&\r\n this.canReplaceTenant(cachedAuthorityUrlComponents)) {\r\n const tenantId = new UrlString(this.metadata.authorization_endpoint).getUrlComponents().PathSegments[0];\r\n /**\r\n * Check if AAD canonical authority contains tenant domain name, for example \"testdomain.onmicrosoft.com\",\r\n * by comparing its first path segment to the corresponding authorization endpoint path segment, which is\r\n * always resolved with tenant id by OIDC.\r\n */\r\n if (cachedPart !== tenantId) {\r\n this.logger.verbose(`Replacing tenant domain name ${cachedPart} with id ${tenantId}`);\r\n cachedPart = tenantId;\r\n }\r\n }\r\n if (currentPart !== cachedPart) {\r\n endpoint = endpoint.replace(`/${cachedPart}/`, `/${currentPart}/`);\r\n }\r\n });\r\n return this.replaceTenant(endpoint);\r\n }\r\n /**\r\n * The default open id configuration endpoint for any canonical authority.\r\n */\r\n get defaultOpenIdConfigurationEndpoint() {\r\n const canonicalAuthorityHost = this.hostnameAndPort;\r\n if (this.canonicalAuthority.endsWith(\"v2.0/\") ||\r\n this.authorityType === AuthorityType.Adfs ||\r\n (this.protocolMode !== ProtocolMode.AAD &&\r\n !this.isAliasOfKnownMicrosoftAuthority(canonicalAuthorityHost))) {\r\n return `${this.canonicalAuthority}.well-known/openid-configuration`;\r\n }\r\n return `${this.canonicalAuthority}v2.0/.well-known/openid-configuration`;\r\n }\r\n /**\r\n * Boolean that returns whether or not tenant discovery has been completed.\r\n */\r\n discoveryComplete() {\r\n return !!this.metadata;\r\n }\r\n /**\r\n * Perform endpoint discovery to discover aliases, preferred_cache, preferred_network\r\n * and the /authorize, /token and logout endpoints.\r\n */\r\n async resolveEndpointsAsync() {\r\n this.performanceClient?.addQueueMeasurement(PerformanceEvents.AuthorityResolveEndpointsAsync, this.correlationId);\r\n const metadataEntity = this.getCurrentMetadataEntity();\r\n const cloudDiscoverySource = await invokeAsync(this.updateCloudDiscoveryMetadata.bind(this), PerformanceEvents.AuthorityUpdateCloudDiscoveryMetadata, this.logger, this.performanceClient, this.correlationId)(metadataEntity);\r\n this.canonicalAuthority = this.canonicalAuthority.replace(this.hostnameAndPort, metadataEntity.preferred_network);\r\n const endpointSource = await invokeAsync(this.updateEndpointMetadata.bind(this), PerformanceEvents.AuthorityUpdateEndpointMetadata, this.logger, this.performanceClient, this.correlationId)(metadataEntity);\r\n this.updateCachedMetadata(metadataEntity, cloudDiscoverySource, {\r\n source: endpointSource,\r\n });\r\n this.performanceClient?.addFields({\r\n cloudDiscoverySource: cloudDiscoverySource,\r\n authorityEndpointSource: endpointSource,\r\n }, this.correlationId);\r\n }\r\n /**\r\n * Returns metadata entity from cache if it exists, otherwiser returns a new metadata entity built\r\n * from the configured canonical authority\r\n * @returns\r\n */\r\n getCurrentMetadataEntity() {\r\n let metadataEntity = this.cacheManager.getAuthorityMetadataByAlias(this.hostnameAndPort);\r\n if (!metadataEntity) {\r\n metadataEntity = {\r\n aliases: [],\r\n preferred_cache: this.hostnameAndPort,\r\n preferred_network: this.hostnameAndPort,\r\n canonical_authority: this.canonicalAuthority,\r\n authorization_endpoint: \"\",\r\n token_endpoint: \"\",\r\n end_session_endpoint: \"\",\r\n issuer: \"\",\r\n aliasesFromNetwork: false,\r\n endpointsFromNetwork: false,\r\n expiresAt: generateAuthorityMetadataExpiresAt(),\r\n jwks_uri: \"\",\r\n };\r\n }\r\n return metadataEntity;\r\n }\r\n /**\r\n * Updates cached metadata based on metadata source and sets the instance's metadata\r\n * property to the same value\r\n * @param metadataEntity\r\n * @param cloudDiscoverySource\r\n * @param endpointMetadataResult\r\n */\r\n updateCachedMetadata(metadataEntity, cloudDiscoverySource, endpointMetadataResult) {\r\n if (cloudDiscoverySource !== AuthorityMetadataSource.CACHE &&\r\n endpointMetadataResult?.source !== AuthorityMetadataSource.CACHE) {\r\n // Reset the expiration time unless both values came from a successful cache lookup\r\n metadataEntity.expiresAt =\r\n generateAuthorityMetadataExpiresAt();\r\n metadataEntity.canonical_authority = this.canonicalAuthority;\r\n }\r\n const cacheKey = this.cacheManager.generateAuthorityMetadataCacheKey(metadataEntity.preferred_cache);\r\n this.cacheManager.setAuthorityMetadata(cacheKey, metadataEntity);\r\n this.metadata = metadataEntity;\r\n }\r\n /**\r\n * Update AuthorityMetadataEntity with new endpoints and return where the information came from\r\n * @param metadataEntity\r\n */\r\n async updateEndpointMetadata(metadataEntity) {\r\n this.performanceClient?.addQueueMeasurement(PerformanceEvents.AuthorityUpdateEndpointMetadata, this.correlationId);\r\n const localMetadata = this.updateEndpointMetadataFromLocalSources(metadataEntity);\r\n // Further update may be required for hardcoded metadata if regional metadata is preferred\r\n if (localMetadata) {\r\n if (localMetadata.source ===\r\n AuthorityMetadataSource.HARDCODED_VALUES) {\r\n // If the user prefers to use an azure region replace the global endpoints with regional information.\r\n if (this.authorityOptions.azureRegionConfiguration?.azureRegion) {\r\n if (localMetadata.metadata) {\r\n const hardcodedMetadata = await invokeAsync(this.updateMetadataWithRegionalInformation.bind(this), PerformanceEvents.AuthorityUpdateMetadataWithRegionalInformation, this.logger, this.performanceClient, this.correlationId)(localMetadata.metadata);\r\n updateAuthorityEndpointMetadata(metadataEntity, hardcodedMetadata, false);\r\n metadataEntity.canonical_authority =\r\n this.canonicalAuthority;\r\n }\r\n }\r\n }\r\n return localMetadata.source;\r\n }\r\n // Get metadata from network if local sources aren't available\r\n let metadata = await invokeAsync(this.getEndpointMetadataFromNetwork.bind(this), PerformanceEvents.AuthorityGetEndpointMetadataFromNetwork, this.logger, this.performanceClient, this.correlationId)();\r\n if (metadata) {\r\n // If the user prefers to use an azure region replace the global endpoints with regional information.\r\n if (this.authorityOptions.azureRegionConfiguration?.azureRegion) {\r\n metadata = await invokeAsync(this.updateMetadataWithRegionalInformation.bind(this), PerformanceEvents.AuthorityUpdateMetadataWithRegionalInformation, this.logger, this.performanceClient, this.correlationId)(metadata);\r\n }\r\n updateAuthorityEndpointMetadata(metadataEntity, metadata, true);\r\n return AuthorityMetadataSource.NETWORK;\r\n }\r\n else {\r\n // Metadata could not be obtained from the config, cache, network or hardcoded values\r\n throw createClientAuthError(openIdConfigError, this.defaultOpenIdConfigurationEndpoint);\r\n }\r\n }\r\n /**\r\n * Updates endpoint metadata from local sources and returns where the information was retrieved from and the metadata config\r\n * response if the source is hardcoded metadata\r\n * @param metadataEntity\r\n * @returns\r\n */\r\n updateEndpointMetadataFromLocalSources(metadataEntity) {\r\n this.logger.verbose(\"Attempting to get endpoint metadata from authority configuration\");\r\n const configMetadata = this.getEndpointMetadataFromConfig();\r\n if (configMetadata) {\r\n this.logger.verbose(\"Found endpoint metadata in authority configuration\");\r\n updateAuthorityEndpointMetadata(metadataEntity, configMetadata, false);\r\n return {\r\n source: AuthorityMetadataSource.CONFIG,\r\n };\r\n }\r\n this.logger.verbose(\"Did not find endpoint metadata in the config... Attempting to get endpoint metadata from the hardcoded values.\");\r\n // skipAuthorityMetadataCache is used to bypass hardcoded authority metadata and force a network metadata cache lookup and network metadata request if no cached response is available.\r\n if (this.authorityOptions.skipAuthorityMetadataCache) {\r\n this.logger.verbose(\"Skipping hardcoded metadata cache since skipAuthorityMetadataCache is set to true. Attempting to get endpoint metadata from the network metadata cache.\");\r\n }\r\n else {\r\n const hardcodedMetadata = this.getEndpointMetadataFromHardcodedValues();\r\n if (hardcodedMetadata) {\r\n updateAuthorityEndpointMetadata(metadataEntity, hardcodedMetadata, false);\r\n return {\r\n source: AuthorityMetadataSource.HARDCODED_VALUES,\r\n metadata: hardcodedMetadata,\r\n };\r\n }\r\n else {\r\n this.logger.verbose(\"Did not find endpoint metadata in hardcoded values... Attempting to get endpoint metadata from the network metadata cache.\");\r\n }\r\n }\r\n // Check cached metadata entity expiration status\r\n const metadataEntityExpired = isAuthorityMetadataExpired(metadataEntity);\r\n if (this.isAuthoritySameType(metadataEntity) &&\r\n metadataEntity.endpointsFromNetwork &&\r\n !metadataEntityExpired) {\r\n // No need to update\r\n this.logger.verbose(\"Found endpoint metadata in the cache.\");\r\n return { source: AuthorityMetadataSource.CACHE };\r\n }\r\n else if (metadataEntityExpired) {\r\n this.logger.verbose(\"The metadata entity is expired.\");\r\n }\r\n return null;\r\n }\r\n /**\r\n * Compares the number of url components after the domain to determine if the cached\r\n * authority metadata can be used for the requested authority. Protects against same domain different\r\n * authority such as login.microsoftonline.com/tenant and login.microsoftonline.com/tfp/tenant/policy\r\n * @param metadataEntity\r\n */\r\n isAuthoritySameType(metadataEntity) {\r\n const cachedAuthorityUrl = new UrlString(metadataEntity.canonical_authority);\r\n const cachedParts = cachedAuthorityUrl.getUrlComponents().PathSegments;\r\n return (cachedParts.length ===\r\n this.canonicalAuthorityUrlComponents.PathSegments.length);\r\n }\r\n /**\r\n * Parse authorityMetadata config option\r\n */\r\n getEndpointMetadataFromConfig() {\r\n if (this.authorityOptions.authorityMetadata) {\r\n try {\r\n return JSON.parse(this.authorityOptions.authorityMetadata);\r\n }\r\n catch (e) {\r\n throw createClientConfigurationError(invalidAuthorityMetadata);\r\n }\r\n }\r\n return null;\r\n }\r\n /**\r\n * Gets OAuth endpoints from the given OpenID configuration endpoint.\r\n *\r\n * @param hasHardcodedMetadata boolean\r\n */\r\n async getEndpointMetadataFromNetwork() {\r\n this.performanceClient?.addQueueMeasurement(PerformanceEvents.AuthorityGetEndpointMetadataFromNetwork, this.correlationId);\r\n const options = {};\r\n /*\r\n * TODO: Add a timeout if the authority exists in our library's\r\n * hardcoded list of metadata\r\n */\r\n const openIdConfigurationEndpoint = this.defaultOpenIdConfigurationEndpoint;\r\n this.logger.verbose(`Authority.getEndpointMetadataFromNetwork: attempting to retrieve OAuth endpoints from ${openIdConfigurationEndpoint}`);\r\n try {\r\n const response = await this.networkInterface.sendGetRequestAsync(openIdConfigurationEndpoint, options);\r\n const isValidResponse = isOpenIdConfigResponse(response.body);\r\n if (isValidResponse) {\r\n return response.body;\r\n }\r\n else {\r\n this.logger.verbose(`Authority.getEndpointMetadataFromNetwork: could not parse response as OpenID configuration`);\r\n return null;\r\n }\r\n }\r\n catch (e) {\r\n this.logger.verbose(`Authority.getEndpointMetadataFromNetwork: ${e}`);\r\n return null;\r\n }\r\n }\r\n /**\r\n * Get OAuth endpoints for common authorities.\r\n */\r\n getEndpointMetadataFromHardcodedValues() {\r\n if (this.hostnameAndPort in EndpointMetadata) {\r\n return EndpointMetadata[this.hostnameAndPort];\r\n }\r\n return null;\r\n }\r\n /**\r\n * Update the retrieved metadata with regional information.\r\n * User selected Azure region will be used if configured.\r\n */\r\n async updateMetadataWithRegionalInformation(metadata) {\r\n this.performanceClient?.addQueueMeasurement(PerformanceEvents.AuthorityUpdateMetadataWithRegionalInformation, this.correlationId);\r\n const userConfiguredAzureRegion = this.authorityOptions.azureRegionConfiguration?.azureRegion;\r\n if (userConfiguredAzureRegion) {\r\n if (userConfiguredAzureRegion !==\r\n Constants.AZURE_REGION_AUTO_DISCOVER_FLAG) {\r\n this.regionDiscoveryMetadata.region_outcome =\r\n RegionDiscoveryOutcomes.CONFIGURED_NO_AUTO_DETECTION;\r\n this.regionDiscoveryMetadata.region_used =\r\n userConfiguredAzureRegion;\r\n return Authority.replaceWithRegionalInformation(metadata, userConfiguredAzureRegion);\r\n }\r\n const autodetectedRegionName = await invokeAsync(this.regionDiscovery.detectRegion.bind(this.regionDiscovery), PerformanceEvents.RegionDiscoveryDetectRegion, this.logger, this.performanceClient, this.correlationId)(this.authorityOptions.azureRegionConfiguration\r\n ?.environmentRegion, this.regionDiscoveryMetadata);\r\n if (autodetectedRegionName) {\r\n this.regionDiscoveryMetadata.region_outcome =\r\n RegionDiscoveryOutcomes.AUTO_DETECTION_REQUESTED_SUCCESSFUL;\r\n this.regionDiscoveryMetadata.region_used =\r\n autodetectedRegionName;\r\n return Authority.replaceWithRegionalInformation(metadata, autodetectedRegionName);\r\n }\r\n this.regionDiscoveryMetadata.region_outcome =\r\n RegionDiscoveryOutcomes.AUTO_DETECTION_REQUESTED_FAILED;\r\n }\r\n return metadata;\r\n }\r\n /**\r\n * Updates the AuthorityMetadataEntity with new aliases, preferred_network and preferred_cache\r\n * and returns where the information was retrieved from\r\n * @param metadataEntity\r\n * @returns AuthorityMetadataSource\r\n */\r\n async updateCloudDiscoveryMetadata(metadataEntity) {\r\n this.performanceClient?.addQueueMeasurement(PerformanceEvents.AuthorityUpdateCloudDiscoveryMetadata, this.correlationId);\r\n const localMetadataSource = this.updateCloudDiscoveryMetadataFromLocalSources(metadataEntity);\r\n if (localMetadataSource) {\r\n return localMetadataSource;\r\n }\r\n // Fallback to network as metadata source\r\n const metadata = await invokeAsync(this.getCloudDiscoveryMetadataFromNetwork.bind(this), PerformanceEvents.AuthorityGetCloudDiscoveryMetadataFromNetwork, this.logger, this.performanceClient, this.correlationId)();\r\n if (metadata) {\r\n updateCloudDiscoveryMetadata(metadataEntity, metadata, true);\r\n return AuthorityMetadataSource.NETWORK;\r\n }\r\n // Metadata could not be obtained from the config, cache, network or hardcoded values\r\n throw createClientConfigurationError(untrustedAuthority);\r\n }\r\n updateCloudDiscoveryMetadataFromLocalSources(metadataEntity) {\r\n this.logger.verbose(\"Attempting to get cloud discovery metadata from authority configuration\");\r\n this.logger.verbosePii(`Known Authorities: ${this.authorityOptions.knownAuthorities ||\r\n Constants.NOT_APPLICABLE}`);\r\n this.logger.verbosePii(`Authority Metadata: ${this.authorityOptions.authorityMetadata ||\r\n Constants.NOT_APPLICABLE}`);\r\n this.logger.verbosePii(`Canonical Authority: ${metadataEntity.canonical_authority || Constants.NOT_APPLICABLE}`);\r\n const metadata = this.getCloudDiscoveryMetadataFromConfig();\r\n if (metadata) {\r\n this.logger.verbose(\"Found cloud discovery metadata in authority configuration\");\r\n updateCloudDiscoveryMetadata(metadataEntity, metadata, false);\r\n return AuthorityMetadataSource.CONFIG;\r\n }\r\n // If the cached metadata came from config but that config was not passed to this instance, we must go to hardcoded values\r\n this.logger.verbose(\"Did not find cloud discovery metadata in the config... Attempting to get cloud discovery metadata from the hardcoded values.\");\r\n if (this.options.skipAuthorityMetadataCache) {\r\n this.logger.verbose(\"Skipping hardcoded cloud discovery metadata cache since skipAuthorityMetadataCache is set to true. Attempting to get cloud discovery metadata from the network metadata cache.\");\r\n }\r\n else {\r\n const hardcodedMetadata = getCloudDiscoveryMetadataFromHardcodedValues(this.hostnameAndPort);\r\n if (hardcodedMetadata) {\r\n this.logger.verbose(\"Found cloud discovery metadata from hardcoded values.\");\r\n updateCloudDiscoveryMetadata(metadataEntity, hardcodedMetadata, false);\r\n return AuthorityMetadataSource.HARDCODED_VALUES;\r\n }\r\n this.logger.verbose(\"Did not find cloud discovery metadata in hardcoded values... Attempting to get cloud discovery metadata from the network metadata cache.\");\r\n }\r\n const metadataEntityExpired = isAuthorityMetadataExpired(metadataEntity);\r\n if (this.isAuthoritySameType(metadataEntity) &&\r\n metadataEntity.aliasesFromNetwork &&\r\n !metadataEntityExpired) {\r\n this.logger.verbose(\"Found cloud discovery metadata in the cache.\");\r\n // No need to update\r\n return AuthorityMetadataSource.CACHE;\r\n }\r\n else if (metadataEntityExpired) {\r\n this.logger.verbose(\"The metadata entity is expired.\");\r\n }\r\n return null;\r\n }\r\n /**\r\n * Parse cloudDiscoveryMetadata config or check knownAuthorities\r\n */\r\n getCloudDiscoveryMetadataFromConfig() {\r\n // CIAM does not support cloud discovery metadata\r\n if (this.authorityType === AuthorityType.Ciam) {\r\n this.logger.verbose(\"CIAM authorities do not support cloud discovery metadata, generate the aliases from authority host.\");\r\n return Authority.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort);\r\n }\r\n // Check if network response was provided in config\r\n if (this.authorityOptions.cloudDiscoveryMetadata) {\r\n this.logger.verbose(\"The cloud discovery metadata has been provided as a network response, in the config.\");\r\n try {\r\n this.logger.verbose(\"Attempting to parse the cloud discovery metadata.\");\r\n const parsedResponse = JSON.parse(this.authorityOptions.cloudDiscoveryMetadata);\r\n const metadata = getCloudDiscoveryMetadataFromNetworkResponse(parsedResponse.metadata, this.hostnameAndPort);\r\n this.logger.verbose(\"Parsed the cloud discovery metadata.\");\r\n if (metadata) {\r\n this.logger.verbose(\"There is returnable metadata attached to the parsed cloud discovery metadata.\");\r\n return metadata;\r\n }\r\n else {\r\n this.logger.verbose(\"There is no metadata attached to the parsed cloud discovery metadata.\");\r\n }\r\n }\r\n catch (e) {\r\n this.logger.verbose(\"Unable to parse the cloud discovery metadata. Throwing Invalid Cloud Discovery Metadata Error.\");\r\n throw createClientConfigurationError(invalidCloudDiscoveryMetadata);\r\n }\r\n }\r\n // If cloudDiscoveryMetadata is empty or does not contain the host, check knownAuthorities\r\n if (this.isInKnownAuthorities()) {\r\n this.logger.verbose(\"The host is included in knownAuthorities. Creating new cloud discovery metadata from the host.\");\r\n return Authority.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort);\r\n }\r\n return null;\r\n }\r\n /**\r\n * Called to get metadata from network if CloudDiscoveryMetadata was not populated by config\r\n *\r\n * @param hasHardcodedMetadata boolean\r\n */\r\n async getCloudDiscoveryMetadataFromNetwork() {\r\n this.performanceClient?.addQueueMeasurement(PerformanceEvents.AuthorityGetCloudDiscoveryMetadataFromNetwork, this.correlationId);\r\n const instanceDiscoveryEndpoint = `${Constants.AAD_INSTANCE_DISCOVERY_ENDPT}${this.canonicalAuthority}oauth2/v2.0/authorize`;\r\n const options = {};\r\n /*\r\n * TODO: Add a timeout if the authority exists in our library's\r\n * hardcoded list of metadata\r\n */\r\n let match = null;\r\n try {\r\n const response = await this.networkInterface.sendGetRequestAsync(instanceDiscoveryEndpoint, options);\r\n let typedResponseBody;\r\n let metadata;\r\n if (isCloudInstanceDiscoveryResponse(response.body)) {\r\n typedResponseBody =\r\n response.body;\r\n metadata = typedResponseBody.metadata;\r\n this.logger.verbosePii(`tenant_discovery_endpoint is: ${typedResponseBody.tenant_discovery_endpoint}`);\r\n }\r\n else if (isCloudInstanceDiscoveryErrorResponse(response.body)) {\r\n this.logger.warning(`A CloudInstanceDiscoveryErrorResponse was returned. The cloud instance discovery network request's status code is: ${response.status}`);\r\n typedResponseBody =\r\n response.body;\r\n if (typedResponseBody.error === Constants.INVALID_INSTANCE) {\r\n this.logger.error(\"The CloudInstanceDiscoveryErrorResponse error is invalid_instance.\");\r\n return null;\r\n }\r\n this.logger.warning(`The CloudInstanceDiscoveryErrorResponse error is ${typedResponseBody.error}`);\r\n this.logger.warning(`The CloudInstanceDiscoveryErrorResponse error description is ${typedResponseBody.error_description}`);\r\n this.logger.warning(\"Setting the value of the CloudInstanceDiscoveryMetadata (returned from the network) to []\");\r\n metadata = [];\r\n }\r\n else {\r\n this.logger.error(\"AAD did not return a CloudInstanceDiscoveryResponse or CloudInstanceDiscoveryErrorResponse\");\r\n return null;\r\n }\r\n this.logger.verbose(\"Attempting to find a match between the developer's authority and the CloudInstanceDiscoveryMetadata returned from the network request.\");\r\n match = getCloudDiscoveryMetadataFromNetworkResponse(metadata, this.hostnameAndPort);\r\n }\r\n catch (error) {\r\n if (error instanceof AuthError) {\r\n this.logger.error(`There was a network error while attempting to get the cloud discovery instance metadata.\\nError: ${error.errorCode}\\nError Description: ${error.errorMessage}`);\r\n }\r\n else {\r\n const typedError = error;\r\n this.logger.error(`A non-MSALJS error was thrown while attempting to get the cloud instance discovery metadata.\\nError: ${typedError.name}\\nError Description: ${typedError.message}`);\r\n }\r\n return null;\r\n }\r\n // Custom Domain scenario, host is trusted because Instance Discovery call succeeded\r\n if (!match) {\r\n this.logger.warning(\"The developer's authority was not found within the CloudInstanceDiscoveryMetadata returned from the network request.\");\r\n this.logger.verbose(\"Creating custom Authority for custom domain scenario.\");\r\n match = Authority.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort);\r\n }\r\n return match;\r\n }\r\n /**\r\n * Helper function to determine if this host is included in the knownAuthorities config option\r\n */\r\n isInKnownAuthorities() {\r\n const matches = this.authorityOptions.knownAuthorities.filter((authority) => {\r\n return (authority &&\r\n UrlString.getDomainFromUrl(authority).toLowerCase() ===\r\n this.hostnameAndPort);\r\n });\r\n return matches.length > 0;\r\n }\r\n /**\r\n * helper function to populate the authority based on azureCloudOptions\r\n * @param authorityString\r\n * @param azureCloudOptions\r\n */\r\n static generateAuthority(authorityString, azureCloudOptions) {\r\n let authorityAzureCloudInstance;\r\n if (azureCloudOptions &&\r\n azureCloudOptions.azureCloudInstance !== AzureCloudInstance.None) {\r\n const tenant = azureCloudOptions.tenant\r\n ? azureCloudOptions.tenant\r\n : Constants.DEFAULT_COMMON_TENANT;\r\n authorityAzureCloudInstance = `${azureCloudOptions.azureCloudInstance}/${tenant}/`;\r\n }\r\n return authorityAzureCloudInstance\r\n ? authorityAzureCloudInstance\r\n : authorityString;\r\n }\r\n /**\r\n * Creates cloud discovery metadata object from a given host\r\n * @param host\r\n */\r\n static createCloudDiscoveryMetadataFromHost(host) {\r\n return {\r\n preferred_network: host,\r\n preferred_cache: host,\r\n aliases: [host],\r\n };\r\n }\r\n /**\r\n * helper function to generate environment from authority object\r\n */\r\n getPreferredCache() {\r\n if (this.managedIdentity) {\r\n return Constants.DEFAULT_AUTHORITY_HOST;\r\n }\r\n else if (this.discoveryComplete()) {\r\n return this.metadata.preferred_cache;\r\n }\r\n else {\r\n throw createClientAuthError(endpointResolutionError);\r\n }\r\n }\r\n /**\r\n * Returns whether or not the provided host is an alias of this authority instance\r\n * @param host\r\n */\r\n isAlias(host) {\r\n return this.metadata.aliases.indexOf(host) > -1;\r\n }\r\n /**\r\n * Returns whether or not the provided host is an alias of a known Microsoft authority for purposes of endpoint discovery\r\n * @param host\r\n */\r\n isAliasOfKnownMicrosoftAuthority(host) {\r\n return InstanceDiscoveryMetadataAliases.has(host);\r\n }\r\n /**\r\n * Checks whether the provided host is that of a public cloud authority\r\n *\r\n * @param authority string\r\n * @returns bool\r\n */\r\n static isPublicCloudAuthority(host) {\r\n return Constants.KNOWN_PUBLIC_CLOUDS.indexOf(host) >= 0;\r\n }\r\n /**\r\n * Rebuild the authority string with the region\r\n *\r\n * @param host string\r\n * @param region string\r\n */\r\n static buildRegionalAuthorityString(host, region, queryString) {\r\n // Create and validate a Url string object with the initial authority string\r\n const authorityUrlInstance = new UrlString(host);\r\n authorityUrlInstance.validateAsUri();\r\n const authorityUrlParts = authorityUrlInstance.getUrlComponents();\r\n let hostNameAndPort = `${region}.${authorityUrlParts.HostNameAndPort}`;\r\n if (this.isPublicCloudAuthority(authorityUrlParts.HostNameAndPort)) {\r\n hostNameAndPort = `${region}.${Constants.REGIONAL_AUTH_PUBLIC_CLOUD_SUFFIX}`;\r\n }\r\n // Include the query string portion of the url\r\n const url = UrlString.constructAuthorityUriFromObject({\r\n ...authorityUrlInstance.getUrlComponents(),\r\n HostNameAndPort: hostNameAndPort,\r\n }).urlString;\r\n // Add the query string if a query string was provided\r\n if (queryString)\r\n return `${url}?${queryString}`;\r\n return url;\r\n }\r\n /**\r\n * Replace the endpoints in the metadata object with their regional equivalents.\r\n *\r\n * @param metadata OpenIdConfigResponse\r\n * @param azureRegion string\r\n */\r\n static replaceWithRegionalInformation(metadata, azureRegion) {\r\n const regionalMetadata = { ...metadata };\r\n regionalMetadata.authorization_endpoint =\r\n Authority.buildRegionalAuthorityString(regionalMetadata.authorization_endpoint, azureRegion);\r\n regionalMetadata.token_endpoint =\r\n Authority.buildRegionalAuthorityString(regionalMetadata.token_endpoint, azureRegion);\r\n if (regionalMetadata.end_session_endpoint) {\r\n regionalMetadata.end_session_endpoint =\r\n Authority.buildRegionalAuthorityString(regionalMetadata.end_session_endpoint, azureRegion);\r\n }\r\n return regionalMetadata;\r\n }\r\n /**\r\n * Transform CIAM_AUTHORIY as per the below rules:\r\n * If no path segments found and it is a CIAM authority (hostname ends with .ciamlogin.com), then transform it\r\n *\r\n * NOTE: The transformation path should go away once STS supports CIAM with the format: `tenantIdorDomain.ciamlogin.com`\r\n * `ciamlogin.com` can also change in the future and we should accommodate the same\r\n *\r\n * @param authority\r\n */\r\n static transformCIAMAuthority(authority) {\r\n let ciamAuthority = authority;\r\n const authorityUrl = new UrlString(authority);\r\n const authorityUrlComponents = authorityUrl.getUrlComponents();\r\n // check if transformation is needed\r\n if (authorityUrlComponents.PathSegments.length === 0 &&\r\n authorityUrlComponents.HostNameAndPort.endsWith(Constants.CIAM_AUTH_URL)) {\r\n const tenantIdOrDomain = authorityUrlComponents.HostNameAndPort.split(\".\")[0];\r\n ciamAuthority = `${ciamAuthority}${tenantIdOrDomain}${Constants.AAD_TENANT_DOMAIN_SUFFIX}`;\r\n }\r\n return ciamAuthority;\r\n }\r\n}\r\n// Reserved tenant domain names that will not be replaced with tenant id\r\nAuthority.reservedTenantDomains = new Set([\r\n \"{tenant}\",\r\n \"{tenantid}\",\r\n AADAuthorityConstants.COMMON,\r\n AADAuthorityConstants.CONSUMERS,\r\n AADAuthorityConstants.ORGANIZATIONS,\r\n]);\r\n/**\r\n * Extract tenantId from authority\r\n */\r\nfunction getTenantFromAuthorityString(authority) {\r\n const authorityUrl = new UrlString(authority);\r\n const authorityUrlComponents = authorityUrl.getUrlComponents();\r\n /**\r\n * For credential matching purposes, tenantId is the last path segment of the authority URL:\r\n * AAD Authority - domain/tenantId -> Credentials are cached with realm = tenantId\r\n * B2C Authority - domain/{tenantId}?/.../policy -> Credentials are cached with realm = policy\r\n * tenantId is downcased because B2C policies can have mixed case but tfp claim is downcased\r\n *\r\n * Note that we may not have any path segments in certain OIDC scenarios.\r\n */\r\n const tenantId = authorityUrlComponents.PathSegments.slice(-1)[0]?.toLowerCase();\r\n switch (tenantId) {\r\n case AADAuthorityConstants.COMMON:\r\n case AADAuthorityConstants.ORGANIZATIONS:\r\n case AADAuthorityConstants.CONSUMERS:\r\n return undefined;\r\n default:\r\n return tenantId;\r\n }\r\n}\r\nfunction formatAuthorityUri(authorityUri) {\r\n return authorityUri.endsWith(Constants.FORWARD_SLASH)\r\n ? authorityUri\r\n : `${authorityUri}${Constants.FORWARD_SLASH}`;\r\n}\r\nfunction buildStaticAuthorityOptions(authOptions) {\r\n const rawCloudDiscoveryMetadata = authOptions.cloudDiscoveryMetadata;\r\n let cloudDiscoveryMetadata = undefined;\r\n if (rawCloudDiscoveryMetadata) {\r\n try {\r\n cloudDiscoveryMetadata = JSON.parse(rawCloudDiscoveryMetadata);\r\n }\r\n catch (e) {\r\n throw createClientConfigurationError(invalidCloudDiscoveryMetadata);\r\n }\r\n }\r\n return {\r\n canonicalAuthority: authOptions.authority\r\n ? formatAuthorityUri(authOptions.authority)\r\n : undefined,\r\n knownAuthorities: authOptions.knownAuthorities,\r\n cloudDiscoveryMetadata: cloudDiscoveryMetadata,\r\n };\r\n}\n\nexport { Authority, buildStaticAuthorityOptions, formatAuthorityUri, getTenantFromAuthorityString };\n//# sourceMappingURL=Authority.mjs.map\n","/*! @azure/msal-common v14.16.1 2025-08-05 */\n'use strict';\nimport { Authority, formatAuthorityUri } from './Authority.mjs';\nimport { createClientAuthError } from '../error/ClientAuthError.mjs';\nimport { PerformanceEvents } from '../telemetry/performance/PerformanceEvent.mjs';\nimport { invokeAsync } from '../utils/FunctionWrappers.mjs';\nimport { endpointResolutionError } from '../error/ClientAuthErrorCodes.mjs';\n\n/*\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License.\r\n */\r\n/**\r\n * Create an authority object of the correct type based on the url\r\n * Performs basic authority validation - checks to see if the authority is of a valid type (i.e. aad, b2c, adfs)\r\n *\r\n * Also performs endpoint discovery.\r\n *\r\n * @param authorityUri\r\n * @param networkClient\r\n * @param protocolMode\r\n * @internal\r\n */\r\nasync function createDiscoveredInstance(authorityUri, networkClient, cacheManager, authorityOptions, logger, correlationId, performanceClient) {\r\n performanceClient?.addQueueMeasurement(PerformanceEvents.AuthorityFactoryCreateDiscoveredInstance, correlationId);\r\n const authorityUriFinal = Authority.transformCIAMAuthority(formatAuthorityUri(authorityUri));\r\n // Initialize authority and perform discovery endpoint check.\r\n const acquireTokenAuthority = new Authority(authorityUriFinal, networkClient, cacheManager, authorityOptions, logger, correlationId, performanceClient);\r\n try {\r\n await invokeAsync(acquireTokenAuthority.resolveEndpointsAsync.bind(acquireTokenAuthority), PerformanceEvents.AuthorityResolveEndpointsAsync, logger, performanceClient, correlationId)();\r\n return acquireTokenAuthority;\r\n }\r\n catch (e) {\r\n throw createClientAuthError(endpointResolutionError);\r\n }\r\n}\n\nexport { createDiscoveredInstance };\n//# sourceMappingURL=AuthorityFactory.mjs.map\n","/*! @azure/msal-common v14.16.1 2025-08-05 */\n'use strict';\nimport { AuthError } from './AuthError.mjs';\n\n/*\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License.\r\n */\r\n/**\r\n * Error thrown when there is an error with the server code, for example, unavailability.\r\n */\r\nclass ServerError extends AuthError {\r\n constructor(errorCode, errorMessage, subError, errorNo, status) {\r\n super(errorCode, errorMessage, subError);\r\n this.name = \"ServerError\";\r\n this.errorNo = errorNo;\r\n this.status = status;\r\n Object.setPrototypeOf(this, ServerError.prototype);\r\n }\r\n}\n\nexport { ServerError };\n//# sourceMappingURL=ServerError.mjs.map\n","/*! @azure/msal-common v14.16.1 2025-08-05 */\n'use strict';\nimport { ThrottlingConstants, Constants, HeaderNames } from '../utils/Constants.mjs';\nimport { ServerError } from '../error/ServerError.mjs';\n\n/*\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License.\r\n */\r\n/** @internal */\r\nclass ThrottlingUtils {\r\n /**\r\n * Prepares a RequestThumbprint to be stored as a key.\r\n * @param thumbprint\r\n */\r\n static generateThrottlingStorageKey(thumbprint) {\r\n return `${ThrottlingConstants.THROTTLING_PREFIX}.${JSON.stringify(thumbprint)}`;\r\n }\r\n /**\r\n * Performs necessary throttling checks before a network request.\r\n * @param cacheManager\r\n * @param thumbprint\r\n */\r\n static preProcess(cacheManager, thumbprint, correlationId) {\r\n const key = ThrottlingUtils.generateThrottlingStorageKey(thumbprint);\r\n const value = cacheManager.getThrottlingCache(key);\r\n if (value) {\r\n if (value.throttleTime < Date.now()) {\r\n cacheManager.removeItem(key, correlationId);\r\n return;\r\n }\r\n throw new ServerError(value.errorCodes?.join(\" \") || Constants.EMPTY_STRING, value.errorMessage, value.subError);\r\n }\r\n }\r\n /**\r\n * Performs necessary throttling checks after a network request.\r\n * @param cacheManager\r\n * @param thumbprint\r\n * @param response\r\n */\r\n static postProcess(cacheManager, thumbprint, response, correlationId) {\r\n if (ThrottlingUtils.checkResponseStatus(response) ||\r\n ThrottlingUtils.checkResponseForRetryAfter(response)) {\r\n const thumbprintValue = {\r\n throttleTime: ThrottlingUtils.calculateThrottleTime(parseInt(response.headers[HeaderNames.RETRY_AFTER])),\r\n error: response.body.error,\r\n errorCodes: response.body.error_codes,\r\n errorMessage: response.body.error_description,\r\n subError: response.body.suberror,\r\n };\r\n cacheManager.setThrottlingCache(ThrottlingUtils.generateThrottlingStorageKey(thumbprint), thumbprintValue, correlationId);\r\n }\r\n }\r\n /**\r\n * Checks a NetworkResponse object's status codes against 429 or 5xx\r\n * @param response\r\n */\r\n static checkResponseStatus(response) {\r\n return (response.status === 429 ||\r\n (response.status >= 500 && response.status < 600));\r\n }\r\n /**\r\n * Checks a NetworkResponse object's RetryAfter header\r\n * @param response\r\n */\r\n static checkResponseForRetryAfter(response) {\r\n if (response.headers) {\r\n return (response.headers.hasOwnProperty(HeaderNames.RETRY_AFTER) &&\r\n (response.status < 200 || response.status >= 300));\r\n }\r\n return false;\r\n }\r\n /**\r\n * Calculates the Unix-time value for a throttle to expire given throttleTime in seconds.\r\n * @param throttleTime\r\n */\r\n static calculateThrottleTime(throttleTime) {\r\n const time = throttleTime <= 0 ? 0 : throttleTime;\r\n const currentSeconds = Date.now() / 1000;\r\n return Math.floor(Math.min(currentSeconds +\r\n (time || ThrottlingConstants.DEFAULT_THROTTLE_TIME_SECONDS), currentSeconds +\r\n ThrottlingConstants.DEFAULT_MAX_THROTTLE_TIME_SECONDS) * 1000);\r\n }\r\n static removeThrottle(cacheManager, clientId, request, homeAccountIdentifier) {\r\n const thumbprint = {\r\n clientId: clientId,\r\n authority: request.authority,\r\n scopes: request.scopes,\r\n homeAccountIdentifier: homeAccountIdentifier,\r\n claims: request.claims,\r\n authenticationScheme: request.authenticationScheme,\r\n resourceRequestMethod: request.resourceRequestMethod,\r\n resourceRequestUri: request.resourceRequestUri,\r\n shrClaims: request.shrClaims,\r\n sshKid: request.sshKid,\r\n };\r\n const key = this.generateThrottlingStorageKey(thumbprint);\r\n cacheManager.removeItem(key, request.correlationId);\r\n }\r\n}\n\nexport { ThrottlingUtils };\n//# sourceMappingURL=ThrottlingUtils.mjs.map\n","/*! @azure/msal-common v14.16.1 2025-08-05 */\n'use strict';\nimport { AuthError } from './AuthError.mjs';\n\n/*\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License.\r\n */\r\n/**\r\n * Represents network related errors\r\n */\r\nclass NetworkError extends AuthError {\r\n constructor(error, httpStatus, responseHeaders) {\r\n super(error.errorCode, error.errorMessage, error.subError);\r\n Object.setPrototypeOf(this, NetworkError.prototype);\r\n this.name = \"NetworkError\";\r\n this.error = error;\r\n this.httpStatus = httpStatus;\r\n this.responseHeaders = responseHeaders;\r\n }\r\n}\r\n/**\r\n * Creates NetworkError object for a failed network request\r\n * @param error - Error to be thrown back to the caller\r\n * @param httpStatus - Status code of the network request\r\n * @param responseHeaders - Response headers of the network request, when available\r\n * @returns NetworkError object\r\n */\r\nfunction createNetworkError(error, httpStatus, responseHeaders) {\r\n return new NetworkError(error, httpStatus, responseHeaders);\r\n}\n\nexport { NetworkError, createNetworkError };\n//# sourceMappingURL=NetworkError.mjs.map\n","/*! @azure/msal-common v14.16.1 2025-08-05 */\n'use strict';\nimport { buildClientConfiguration } from '../config/ClientConfiguration.mjs';\nimport { Logger } from '../logger/Logger.mjs';\nimport { HeaderNames, Constants } from '../utils/Constants.mjs';\nimport { name, version } from '../packageMetadata.mjs';\nimport { CcsCredentialType } from '../account/CcsCredential.mjs';\nimport { buildClientInfoFromHomeAccountId } from '../account/ClientInfo.mjs';\nimport { RequestParameterBuilder } from '../request/RequestParameterBuilder.mjs';\nimport { createDiscoveredInstance } from '../authority/AuthorityFactory.mjs';\nimport { PerformanceEvents } from '../telemetry/performance/PerformanceEvent.mjs';\nimport { ThrottlingUtils } from '../network/ThrottlingUtils.mjs';\nimport { AuthError } from '../error/AuthError.mjs';\nimport { createClientAuthError } from '../error/ClientAuthError.mjs';\nimport { NetworkError } from '../error/NetworkError.mjs';\nimport { invokeAsync } from '../utils/FunctionWrappers.mjs';\nimport { networkError } from '../error/ClientAuthErrorCodes.mjs';\n\n/*\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License.\r\n */\r\n/**\r\n * Base application class which will construct requests to send to and handle responses from the Microsoft STS using the authorization code flow.\r\n * @internal\r\n */\r\nclass BaseClient {\r\n constructor(configuration, performanceClient) {\r\n // Set the configuration\r\n this.config = buildClientConfiguration(configuration);\r\n // Initialize the logger\r\n this.logger = new Logger(this.config.loggerOptions, name, version);\r\n // Initialize crypto\r\n this.cryptoUtils = this.config.cryptoInterface;\r\n // Initialize storage interface\r\n this.cacheManager = this.config.storageInterface;\r\n // Set the network interface\r\n this.networkClient = this.config.networkInterface;\r\n // Set TelemetryManager\r\n this.serverTelemetryManager = this.config.serverTelemetryManager;\r\n // set Authority\r\n this.authority = this.config.authOptions.authority;\r\n // set performance telemetry client\r\n this.performanceClient = performanceClient;\r\n }\r\n /**\r\n * Creates default headers for requests to token endpoint\r\n */\r\n createTokenRequestHeaders(ccsCred) {\r\n const headers = {};\r\n headers[HeaderNames.CONTENT_TYPE] = Constants.URL_FORM_CONTENT_TYPE;\r\n if (!this.config.systemOptions.preventCorsPreflight && ccsCred) {\r\n switch (ccsCred.type) {\r\n case CcsCredentialType.HOME_ACCOUNT_ID:\r\n try {\r\n const clientInfo = buildClientInfoFromHomeAccountId(ccsCred.credential);\r\n headers[HeaderNames.CCS_HEADER] = `Oid:${clientInfo.uid}@${clientInfo.utid}`;\r\n }\r\n catch (e) {\r\n this.logger.verbose(\"Could not parse home account ID for CCS Header: \" +\r\n e);\r\n }\r\n break;\r\n case CcsCredentialType.UPN:\r\n headers[HeaderNames.CCS_HEADER] = `UPN: ${ccsCred.credential}`;\r\n break;\r\n }\r\n }\r\n return headers;\r\n }\r\n /**\r\n * Http post to token endpoint\r\n * @param tokenEndpoint\r\n * @param queryString\r\n * @param headers\r\n * @param thumbprint\r\n */\r\n async executePostToTokenEndpoint(tokenEndpoint, queryString, headers, thumbprint, correlationId, queuedEvent) {\r\n if (queuedEvent) {\r\n this.performanceClient?.addQueueMeasurement(queuedEvent, correlationId);\r\n }\r\n const response = await this.sendPostRequest(thumbprint, tokenEndpoint, { body: queryString, headers: headers }, correlationId);\r\n if (this.config.serverTelemetryManager &&\r\n response.status < 500 &&\r\n response.status !== 429) {\r\n // Telemetry data successfully logged by server, clear Telemetry cache\r\n this.config.serverTelemetryManager.clearTelemetryCache();\r\n }\r\n return response;\r\n }\r\n /**\r\n * Wraps sendPostRequestAsync with necessary preflight and postflight logic\r\n * @param thumbprint - Request thumbprint for throttling\r\n * @param tokenEndpoint - Endpoint to make the POST to\r\n * @param options - Body and Headers to include on the POST request\r\n * @param correlationId - CorrelationId for telemetry\r\n */\r\n async sendPostRequest(thumbprint, tokenEndpoint, options, correlationId) {\r\n ThrottlingUtils.preProcess(this.cacheManager, thumbprint, correlationId);\r\n let response;\r\n try {\r\n response = await invokeAsync((this.networkClient.sendPostRequestAsync.bind(this.networkClient)), PerformanceEvents.NetworkClientSendPostRequestAsync, this.logger, this.performanceClient, correlationId)(tokenEndpoint, options);\r\n const responseHeaders = response.headers || {};\r\n this.performanceClient?.addFields({\r\n refreshTokenSize: response.body.refresh_token?.length || 0,\r\n httpVerToken: responseHeaders[HeaderNames.X_MS_HTTP_VERSION] || \"\",\r\n requestId: responseHeaders[HeaderNames.X_MS_REQUEST_ID] || \"\",\r\n }, correlationId);\r\n }\r\n catch (e) {\r\n if (e instanceof NetworkError) {\r\n const responseHeaders = e.responseHeaders;\r\n if (responseHeaders) {\r\n this.performanceClient?.addFields({\r\n httpVerToken: responseHeaders[HeaderNames.X_MS_HTTP_VERSION] || \"\",\r\n requestId: responseHeaders[HeaderNames.X_MS_REQUEST_ID] ||\r\n \"\",\r\n contentTypeHeader: responseHeaders[HeaderNames.CONTENT_TYPE] ||\r\n undefined,\r\n contentLengthHeader: responseHeaders[HeaderNames.CONTENT_LENGTH] ||\r\n undefined,\r\n httpStatus: e.httpStatus,\r\n }, correlationId);\r\n }\r\n throw e.error;\r\n }\r\n if (e instanceof AuthError) {\r\n throw e;\r\n }\r\n else {\r\n throw createClientAuthError(networkError);\r\n }\r\n }\r\n ThrottlingUtils.postProcess(this.cacheManager, thumbprint, response, correlationId);\r\n return response;\r\n }\r\n /**\r\n * Updates the authority object of the client. Endpoint discovery must be completed.\r\n * @param updatedAuthority\r\n */\r\n async updateAuthority(cloudInstanceHostname, correlationId) {\r\n this.performanceClient?.addQueueMeasurement(PerformanceEvents.UpdateTokenEndpointAuthority, correlationId);\r\n const cloudInstanceAuthorityUri = `https://${cloudInstanceHostname}/${this.authority.tenant}/`;\r\n const cloudInstanceAuthority = await createDiscoveredInstance(cloudInstanceAuthorityUri, this.networkClient, this.cacheManager, this.authority.options, this.logger, correlationId, this.performanceClient);\r\n this.authority = cloudInstanceAuthority;\r\n }\r\n /**\r\n * Creates query string for the /token request\r\n * @param request\r\n */\r\n createTokenQueryParameters(request) {\r\n const parameterBuilder = new RequestParameterBuilder(request.correlationId, this.performanceClient);\r\n if (request.embeddedClientId) {\r\n parameterBuilder.addBrokerParameters({\r\n brokerClientId: this.config.authOptions.clientId,\r\n brokerRedirectUri: this.config.authOptions.redirectUri,\r\n });\r\n }\r\n if (request.tokenQueryParameters) {\r\n parameterBuilder.addExtraQueryParameters(request.tokenQueryParameters);\r\n }\r\n parameterBuilder.addCorrelationId(request.correlationId);\r\n return parameterBuilder.createQueryString();\r\n }\r\n}\n\nexport { BaseClient };\n//# sourceMappingURL=BaseClient.mjs.map\n","/*! @azure/msal-common v14.16.1 2025-08-05 */\n'use strict';\n/*\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License.\r\n */\r\n// Codes defined by MSAL\r\nconst noTokensFound = \"no_tokens_found\";\r\nconst nativeAccountUnavailable = \"native_account_unavailable\";\r\nconst refreshTokenExpired = \"refresh_token_expired\";\r\n// Codes potentially returned by server\r\nconst interactionRequired = \"interaction_required\";\r\nconst consentRequired = \"consent_required\";\r\nconst loginRequired = \"login_required\";\r\nconst badToken = \"bad_token\";\n\nexport { badToken, consentRequired, interactionRequired, loginRequired, nativeAccountUnavailable, noTokensFound, refreshTokenExpired };\n//# sourceMappingURL=InteractionRequiredAuthErrorCodes.mjs.map\n","/*! @azure/msal-common v14.16.1 2025-08-05 */\n'use strict';\nimport { Constants } from '../utils/Constants.mjs';\nimport { AuthError } from './AuthError.mjs';\nimport { noTokensFound, nativeAccountUnavailable, badToken, refreshTokenExpired, interactionRequired, consentRequired, loginRequired } from './InteractionRequiredAuthErrorCodes.mjs';\nimport * as InteractionRequiredAuthErrorCodes from './InteractionRequiredAuthErrorCodes.mjs';\nexport { InteractionRequiredAuthErrorCodes };\n\n/*\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License.\r\n */\r\n/**\r\n * InteractionRequiredServerErrorMessage contains string constants used by error codes and messages returned by the server indicating interaction is required\r\n */\r\nconst InteractionRequiredServerErrorMessage = [\r\n interactionRequired,\r\n consentRequired,\r\n loginRequired,\r\n badToken,\r\n];\r\nconst InteractionRequiredAuthSubErrorMessage = [\r\n \"message_only\",\r\n \"additional_action\",\r\n \"basic_action\",\r\n \"user_password_expired\",\r\n \"consent_required\",\r\n \"bad_token\",\r\n];\r\nconst InteractionRequiredAuthErrorMessages = {\r\n [noTokensFound]: \"No refresh token found in the cache. Please sign-in.\",\r\n [nativeAccountUnavailable]: \"The requested account is not available in the native broker. It may have been deleted or logged out. Please sign-in again using an interactive API.\",\r\n [refreshTokenExpired]: \"Refresh token has expired.\",\r\n [badToken]: \"Identity provider returned bad_token due to an expired or invalid refresh token. Please invoke an interactive API to resolve.\",\r\n};\r\n/**\r\n * Interaction required errors defined by the SDK\r\n * @deprecated Use InteractionRequiredAuthErrorCodes instead\r\n */\r\nconst InteractionRequiredAuthErrorMessage = {\r\n noTokensFoundError: {\r\n code: noTokensFound,\r\n desc: InteractionRequiredAuthErrorMessages[noTokensFound],\r\n },\r\n native_account_unavailable: {\r\n code: nativeAccountUnavailable,\r\n desc: InteractionRequiredAuthErrorMessages[nativeAccountUnavailable],\r\n },\r\n bad_token: {\r\n code: badToken,\r\n desc: InteractionRequiredAuthErrorMessages[badToken],\r\n },\r\n};\r\n/**\r\n * Error thrown when user interaction is required.\r\n */\r\nclass InteractionRequiredAuthError extends AuthError {\r\n constructor(errorCode, errorMessage, subError, timestamp, traceId, correlationId, claims, errorNo) {\r\n super(errorCode, errorMessage, subError);\r\n Object.setPrototypeOf(this, InteractionRequiredAuthError.prototype);\r\n this.timestamp = timestamp || Constants.EMPTY_STRING;\r\n this.traceId = traceId || Constants.EMPTY_STRING;\r\n this.correlationId = correlationId || Constants.EMPTY_STRING;\r\n this.claims = claims || Constants.EMPTY_STRING;\r\n this.name = \"InteractionRequiredAuthError\";\r\n this.errorNo = errorNo;\r\n }\r\n}\r\n/**\r\n * Helper function used to determine if an error thrown by the server requires interaction to resolve\r\n * @param errorCode\r\n * @param errorString\r\n * @param subError\r\n */\r\nfunction isInteractionRequiredError(errorCode, errorString, subError) {\r\n const isInteractionRequiredErrorCode = !!errorCode &&\r\n InteractionRequiredServerErrorMessage.indexOf(errorCode) > -1;\r\n const isInteractionRequiredSubError = !!subError &&\r\n InteractionRequiredAuthSubErrorMessage.indexOf(subError) > -1;\r\n const isInteractionRequiredErrorDesc = !!errorString &&\r\n InteractionRequiredServerErrorMessage.some((irErrorCode) => {\r\n return errorString.indexOf(irErrorCode) > -1;\r\n });\r\n return (isInteractionRequiredErrorCode ||\r\n isInteractionRequiredErrorDesc ||\r\n isInteractionRequiredSubError);\r\n}\r\n/**\r\n * Creates an InteractionRequiredAuthError\r\n */\r\nfunction createInteractionRequiredAuthError(errorCode) {\r\n return new InteractionRequiredAuthError(errorCode, InteractionRequiredAuthErrorMessages[errorCode]);\r\n}\n\nexport { InteractionRequiredAuthError, InteractionRequiredAuthErrorMessage, InteractionRequiredAuthSubErrorMessage, InteractionRequiredServerErrorMessage, createInteractionRequiredAuthError, isInteractionRequiredError };\n//# sourceMappingURL=InteractionRequiredAuthError.mjs.map\n","/*! @azure/msal-common v14.16.1 2025-08-05 */\n'use strict';\nimport { Constants } from './Constants.mjs';\nimport { createClientAuthError } from '../error/ClientAuthError.mjs';\nimport { noCryptoObject, invalidState } from '../error/ClientAuthErrorCodes.mjs';\n\n/*\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License.\r\n */\r\n/**\r\n * Class which provides helpers for OAuth 2.0 protocol specific values\r\n */\r\nclass ProtocolUtils {\r\n /**\r\n * Appends user state with random guid, or returns random guid.\r\n * @param userState\r\n * @param randomGuid\r\n */\r\n static setRequestState(cryptoObj, userState, meta) {\r\n const libraryState = ProtocolUtils.generateLibraryState(cryptoObj, meta);\r\n return userState\r\n ? `${libraryState}${Constants.RESOURCE_DELIM}${userState}`\r\n : libraryState;\r\n }\r\n /**\r\n * Generates the state value used by the common library.\r\n * @param randomGuid\r\n * @param cryptoObj\r\n */\r\n static generateLibraryState(cryptoObj, meta) {\r\n if (!cryptoObj) {\r\n throw createClientAuthError(noCryptoObject);\r\n }\r\n // Create a state object containing a unique id and the timestamp of the request creation\r\n const stateObj = {\r\n id: cryptoObj.createNewGuid(),\r\n };\r\n if (meta) {\r\n stateObj.meta = meta;\r\n }\r\n const stateString = JSON.stringify(stateObj);\r\n return cryptoObj.base64Encode(stateString);\r\n }\r\n /**\r\n * Parses the state into the RequestStateObject, which contains the LibraryState info and the state passed by the user.\r\n * @param state\r\n * @param cryptoObj\r\n */\r\n static parseRequestState(cryptoObj, state) {\r\n if (!cryptoObj) {\r\n throw createClientAuthError(noCryptoObject);\r\n }\r\n if (!state) {\r\n throw createClientAuthError(invalidState);\r\n }\r\n try {\r\n // Split the state between library state and user passed state and decode them separately\r\n const splitState = state.split(Constants.RESOURCE_DELIM);\r\n const libraryState = splitState[0];\r\n const userState = splitState.length > 1\r\n ? splitState.slice(1).join(Constants.RESOURCE_DELIM)\r\n : Constants.EMPTY_STRING;\r\n const libraryStateString = cryptoObj.base64Decode(libraryState);\r\n const libraryStateObj = JSON.parse(libraryStateString);\r\n return {\r\n userRequestState: userState || Constants.EMPTY_STRING,\r\n libraryState: libraryStateObj,\r\n };\r\n }\r\n catch (e) {\r\n throw createClientAuthError(invalidState);\r\n }\r\n }\r\n}\n\nexport { ProtocolUtils };\n//# sourceMappingURL=ProtocolUtils.mjs.map\n","/*! @azure/msal-common v14.16.1 2025-08-05 */\n'use strict';\nimport { nowSeconds } from '../utils/TimeUtils.mjs';\nimport { UrlString } from '../url/UrlString.mjs';\nimport { PerformanceEvents } from '../telemetry/performance/PerformanceEvent.mjs';\nimport { invokeAsync } from '../utils/FunctionWrappers.mjs';\n\n/*\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License.\r\n */\r\nconst KeyLocation = {\r\n SW: \"sw\",\r\n UHW: \"uhw\",\r\n};\r\n/** @internal */\r\nclass PopTokenGenerator {\r\n constructor(cryptoUtils, performanceClient) {\r\n this.cryptoUtils = cryptoUtils;\r\n this.performanceClient = performanceClient;\r\n }\r\n /**\r\n * Generates the req_cnf validated at the RP in the POP protocol for SHR parameters\r\n * and returns an object containing the keyid, the full req_cnf string and the req_cnf string hash\r\n * @param request\r\n * @returns\r\n */\r\n async generateCnf(request, logger) {\r\n this.performanceClient?.addQueueMeasurement(PerformanceEvents.PopTokenGenerateCnf, request.correlationId);\r\n const reqCnf = await invokeAsync(this.generateKid.bind(this), PerformanceEvents.PopTokenGenerateCnf, logger, this.performanceClient, request.correlationId)(request);\r\n const reqCnfString = this.cryptoUtils.base64UrlEncode(JSON.stringify(reqCnf));\r\n return {\r\n kid: reqCnf.kid,\r\n reqCnfString,\r\n };\r\n }\r\n /**\r\n * Generates key_id for a SHR token request\r\n * @param request\r\n * @returns\r\n */\r\n async generateKid(request) {\r\n this.performanceClient?.addQueueMeasurement(PerformanceEvents.PopTokenGenerateKid, request.correlationId);\r\n const kidThumbprint = await this.cryptoUtils.getPublicKeyThumbprint(request);\r\n return {\r\n kid: kidThumbprint,\r\n xms_ksl: KeyLocation.SW,\r\n };\r\n }\r\n /**\r\n * Signs the POP access_token with the local generated key-pair\r\n * @param accessToken\r\n * @param request\r\n * @returns\r\n */\r\n async signPopToken(accessToken, keyId, request) {\r\n return this.signPayload(accessToken, keyId, request);\r\n }\r\n /**\r\n * Utility function to generate the signed JWT for an access_token\r\n * @param payload\r\n * @param kid\r\n * @param request\r\n * @param claims\r\n * @returns\r\n */\r\n async signPayload(payload, keyId, request, claims) {\r\n // Deconstruct request to extract SHR parameters\r\n const { resourceRequestMethod, resourceRequestUri, shrClaims, shrNonce, shrOptions, } = request;\r\n const resourceUrlString = resourceRequestUri\r\n ? new UrlString(resourceRequestUri)\r\n : undefined;\r\n const resourceUrlComponents = resourceUrlString?.getUrlComponents();\r\n return this.cryptoUtils.signJwt({\r\n at: payload,\r\n ts: nowSeconds(),\r\n m: resourceRequestMethod?.toUpperCase(),\r\n u: resourceUrlComponents?.HostNameAndPort,\r\n nonce: shrNonce || this.cryptoUtils.createNewGuid(),\r\n p: resourceUrlComponents?.AbsolutePath,\r\n q: resourceUrlComponents?.QueryString\r\n ? [[], resourceUrlComponents.QueryString]\r\n : undefined,\r\n client_claims: shrClaims || undefined,\r\n ...claims,\r\n }, keyId, shrOptions, request.correlationId);\r\n }\r\n}\n\nexport { PopTokenGenerator };\n//# sourceMappingURL=PopTokenGenerator.mjs.map\n","/*! @azure/msal-common v14.16.1 2025-08-05 */\n'use strict';\n/*\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License.\r\n */\r\n/**\r\n * This class instance helps track the memory changes facilitating\r\n * decisions to read from and write to the persistent cache\r\n */ class TokenCacheContext {\r\n constructor(tokenCache, hasChanged) {\r\n this.cache = tokenCache;\r\n this.hasChanged = hasChanged;\r\n }\r\n /**\r\n * boolean which indicates the changes in cache\r\n */\r\n get cacheHasChanged() {\r\n return this.hasChanged;\r\n }\r\n /**\r\n * function to retrieve the token cache\r\n */\r\n get tokenCache() {\r\n return this.cache;\r\n }\r\n}\n\nexport { TokenCacheContext };\n//# sourceMappingURL=TokenCacheContext.mjs.map\n","/*! @azure/msal-common v14.16.1 2025-08-05 */\n'use strict';\nimport { createClientAuthError } from '../error/ClientAuthError.mjs';\nimport { ServerError } from '../error/ServerError.mjs';\nimport { ScopeSet } from '../request/ScopeSet.mjs';\nimport { AccountEntity } from '../cache/entities/AccountEntity.mjs';\nimport { isInteractionRequiredError, InteractionRequiredAuthError } from '../error/InteractionRequiredAuthError.mjs';\nimport { ProtocolUtils } from '../utils/ProtocolUtils.mjs';\nimport { HttpStatus, Constants, AuthenticationScheme, THE_FAMILY_ID } from '../utils/Constants.mjs';\nimport { PopTokenGenerator } from '../crypto/PopTokenGenerator.mjs';\nimport { TokenCacheContext } from '../cache/persistence/TokenCacheContext.mjs';\nimport { PerformanceEvents } from '../telemetry/performance/PerformanceEvent.mjs';\nimport { extractTokenClaims, checkMaxAge } from '../account/AuthToken.mjs';\nimport { getTenantIdFromIdTokenClaims } from '../account/TokenClaims.mjs';\nimport { updateAccountTenantProfileData, buildTenantProfile } from '../account/AccountInfo.mjs';\nimport { createAccessTokenEntity, createRefreshTokenEntity, createIdTokenEntity } from '../cache/utils/CacheHelpers.mjs';\nimport { stateNotFound, invalidState, stateMismatch, nonceMismatch, authTimeNotFound, invalidCacheEnvironment, keyIdMissing } from '../error/ClientAuthErrorCodes.mjs';\n\n/*\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License.\r\n */\r\nfunction parseServerErrorNo(serverResponse) {\r\n const errorCodePrefix = \"code=\";\r\n const errorCodePrefixIndex = serverResponse.error_uri?.lastIndexOf(errorCodePrefix);\r\n return errorCodePrefixIndex && errorCodePrefixIndex >= 0\r\n ? serverResponse.error_uri?.substring(errorCodePrefixIndex + errorCodePrefix.length)\r\n : undefined;\r\n}\r\n/**\r\n * Class that handles response parsing.\r\n * @internal\r\n */\r\nclass ResponseHandler {\r\n constructor(clientId, cacheStorage, cryptoObj, logger, serializableCache, persistencePlugin, performanceClient) {\r\n this.clientId = clientId;\r\n this.cacheStorage = cacheStorage;\r\n this.cryptoObj = cryptoObj;\r\n this.logger = logger;\r\n this.serializableCache = serializableCache;\r\n this.persistencePlugin = persistencePlugin;\r\n this.performanceClient = performanceClient;\r\n }\r\n /**\r\n * Function which validates server authorization code response.\r\n * @param serverResponseHash\r\n * @param requestState\r\n * @param cryptoObj\r\n */\r\n validateServerAuthorizationCodeResponse(serverResponse, requestState) {\r\n if (!serverResponse.state || !requestState) {\r\n throw serverResponse.state\r\n ? createClientAuthError(stateNotFound, \"Cached State\")\r\n : createClientAuthError(stateNotFound, \"Server State\");\r\n }\r\n let decodedServerResponseState;\r\n let decodedRequestState;\r\n try {\r\n decodedServerResponseState = decodeURIComponent(serverResponse.state);\r\n }\r\n catch (e) {\r\n throw createClientAuthError(invalidState, serverResponse.state);\r\n }\r\n try {\r\n decodedRequestState = decodeURIComponent(requestState);\r\n }\r\n catch (e) {\r\n throw createClientAuthError(invalidState, serverResponse.state);\r\n }\r\n if (decodedServerResponseState !== decodedRequestState) {\r\n throw createClientAuthError(stateMismatch);\r\n }\r\n // Check for error\r\n if (serverResponse.error ||\r\n serverResponse.error_description ||\r\n serverResponse.suberror) {\r\n const serverErrorNo = parseServerErrorNo(serverResponse);\r\n if (isInteractionRequiredError(serverResponse.error, serverResponse.error_description, serverResponse.suberror)) {\r\n throw new InteractionRequiredAuthError(serverResponse.error || \"\", serverResponse.error_description, serverResponse.suberror, serverResponse.timestamp || \"\", serverResponse.trace_id || \"\", serverResponse.correlation_id || \"\", serverResponse.claims || \"\", serverErrorNo);\r\n }\r\n throw new ServerError(serverResponse.error || \"\", serverResponse.error_description, serverResponse.suberror, serverErrorNo);\r\n }\r\n }\r\n /**\r\n * Function which validates server authorization token response.\r\n * @param serverResponse\r\n * @param refreshAccessToken\r\n */\r\n validateTokenResponse(serverResponse, refreshAccessToken) {\r\n // Check for error\r\n if (serverResponse.error ||\r\n serverResponse.error_description ||\r\n serverResponse.suberror) {\r\n const errString = `Error(s): ${serverResponse.error_codes || Constants.NOT_AVAILABLE} - Timestamp: ${serverResponse.timestamp || Constants.NOT_AVAILABLE} - Description: ${serverResponse.error_description || Constants.NOT_AVAILABLE} - Correlation ID: ${serverResponse.correlation_id || Constants.NOT_AVAILABLE} - Trace ID: ${serverResponse.trace_id || Constants.NOT_AVAILABLE}`;\r\n const serverErrorNo = serverResponse.error_codes?.length\r\n ? serverResponse.error_codes[0]\r\n : undefined;\r\n const serverError = new ServerError(serverResponse.error, errString, serverResponse.suberror, serverErrorNo, serverResponse.status);\r\n // check if 500 error\r\n if (refreshAccessToken &&\r\n serverResponse.status &&\r\n serverResponse.status >= HttpStatus.SERVER_ERROR_RANGE_START &&\r\n serverResponse.status <= HttpStatus.SERVER_ERROR_RANGE_END) {\r\n this.logger.warning(`executeTokenRequest:validateTokenResponse - AAD is currently unavailable and the access token is unable to be refreshed.\\n${serverError}`);\r\n // don't throw an exception, but alert the user via a log that the token was unable to be refreshed\r\n return;\r\n // check if 400 error\r\n }\r\n else if (refreshAccessToken &&\r\n serverResponse.status &&\r\n serverResponse.status >= HttpStatus.CLIENT_ERROR_RANGE_START &&\r\n serverResponse.status <= HttpStatus.CLIENT_ERROR_RANGE_END) {\r\n this.logger.warning(`executeTokenRequest:validateTokenResponse - AAD is currently available but is unable to refresh the access token.\\n${serverError}`);\r\n // don't throw an exception, but alert the user via a log that the token was unable to be refreshed\r\n return;\r\n }\r\n if (isInteractionRequiredError(serverResponse.error, serverResponse.error_description, serverResponse.suberror)) {\r\n throw new InteractionRequiredAuthError(serverResponse.error, serverResponse.error_description, serverResponse.suberror, serverResponse.timestamp || Constants.EMPTY_STRING, serverResponse.trace_id || Constants.EMPTY_STRING, serverResponse.correlation_id || Constants.EMPTY_STRING, serverResponse.claims || Constants.EMPTY_STRING, serverErrorNo);\r\n }\r\n throw serverError;\r\n }\r\n }\r\n /**\r\n * Returns a constructed token response based on given string. Also manages the cache updates and cleanups.\r\n * @param serverTokenResponse\r\n * @param authority\r\n */\r\n async handleServerTokenResponse(serverTokenResponse, authority, reqTimestamp, request, authCodePayload, userAssertionHash, handlingRefreshTokenResponse, forceCacheRefreshTokenResponse, serverRequestId) {\r\n this.performanceClient?.addQueueMeasurement(PerformanceEvents.HandleServerTokenResponse, serverTokenResponse.correlation_id);\r\n // create an idToken object (not entity)\r\n let idTokenClaims;\r\n if (serverTokenResponse.id_token) {\r\n idTokenClaims = extractTokenClaims(serverTokenResponse.id_token || Constants.EMPTY_STRING, this.cryptoObj.base64Decode);\r\n // token nonce check (TODO: Add a warning if no nonce is given?)\r\n if (authCodePayload && authCodePayload.nonce) {\r\n if (idTokenClaims.nonce !== authCodePayload.nonce) {\r\n throw createClientAuthError(nonceMismatch);\r\n }\r\n }\r\n // token max_age check\r\n if (request.maxAge || request.maxAge === 0) {\r\n const authTime = idTokenClaims.auth_time;\r\n if (!authTime) {\r\n throw createClientAuthError(authTimeNotFound);\r\n }\r\n checkMaxAge(authTime, request.maxAge);\r\n }\r\n }\r\n // generate homeAccountId\r\n this.homeAccountIdentifier = AccountEntity.generateHomeAccountId(serverTokenResponse.client_info || Constants.EMPTY_STRING, authority.authorityType, this.logger, this.cryptoObj, idTokenClaims);\r\n // save the response tokens\r\n let requestStateObj;\r\n if (!!authCodePayload && !!authCodePayload.state) {\r\n requestStateObj = ProtocolUtils.parseRequestState(this.cryptoObj, authCodePayload.state);\r\n }\r\n // Add keyId from request to serverTokenResponse if defined\r\n serverTokenResponse.key_id =\r\n serverTokenResponse.key_id || request.sshKid || undefined;\r\n const cacheRecord = this.generateCacheRecord(serverTokenResponse, authority, reqTimestamp, request, idTokenClaims, userAssertionHash, authCodePayload);\r\n let cacheContext;\r\n try {\r\n if (this.persistencePlugin && this.serializableCache) {\r\n this.logger.verbose(\"Persistence enabled, calling beforeCacheAccess\");\r\n cacheContext = new TokenCacheContext(this.serializableCache, true);\r\n await this.persistencePlugin.beforeCacheAccess(cacheContext);\r\n }\r\n /*\r\n * When saving a refreshed tokens to the cache, it is expected that the account that was used is present in the cache.\r\n * If not present, we should return null, as it's the case that another application called removeAccount in between\r\n * the calls to getAllAccounts and acquireTokenSilent. We should not overwrite that removal, unless explicitly flagged by\r\n * the developer, as in the case of refresh token flow used in ADAL Node to MSAL Node migration.\r\n */\r\n if (handlingRefreshTokenResponse &&\r\n !forceCacheRefreshTokenResponse &&\r\n cacheRecord.account) {\r\n const key = cacheRecord.account.generateAccountKey();\r\n const account = this.cacheStorage.getAccount(key, request.correlationId, this.logger);\r\n if (!account) {\r\n this.logger.warning(\"Account used to refresh tokens not in persistence, refreshed tokens will not be stored in the cache\");\r\n return await ResponseHandler.generateAuthenticationResult(this.cryptoObj, authority, cacheRecord, false, request, idTokenClaims, requestStateObj, undefined, serverRequestId);\r\n }\r\n }\r\n await this.cacheStorage.saveCacheRecord(cacheRecord, request.correlationId, request.storeInCache);\r\n }\r\n finally {\r\n if (this.persistencePlugin &&\r\n this.serializableCache &&\r\n cacheContext) {\r\n this.logger.verbose(\"Persistence enabled, calling afterCacheAccess\");\r\n await this.persistencePlugin.afterCacheAccess(cacheContext);\r\n }\r\n }\r\n return ResponseHandler.generateAuthenticationResult(this.cryptoObj, authority, cacheRecord, false, request, idTokenClaims, requestStateObj, serverTokenResponse, serverRequestId);\r\n }\r\n /**\r\n * Generates CacheRecord\r\n * @param serverTokenResponse\r\n * @param idTokenObj\r\n * @param authority\r\n */\r\n generateCacheRecord(serverTokenResponse, authority, reqTimestamp, request, idTokenClaims, userAssertionHash, authCodePayload) {\r\n const env = authority.getPreferredCache();\r\n if (!env) {\r\n throw createClientAuthError(invalidCacheEnvironment);\r\n }\r\n const claimsTenantId = getTenantIdFromIdTokenClaims(idTokenClaims);\r\n // IdToken: non AAD scenarios can have empty realm\r\n let cachedIdToken;\r\n let cachedAccount;\r\n if (serverTokenResponse.id_token && !!idTokenClaims) {\r\n cachedIdToken = createIdTokenEntity(this.homeAccountIdentifier, env, serverTokenResponse.id_token, this.clientId, claimsTenantId || \"\");\r\n cachedAccount = buildAccountToCache(this.cacheStorage, authority, this.homeAccountIdentifier, this.cryptoObj.base64Decode, request.correlationId, idTokenClaims, serverTokenResponse.client_info, env, claimsTenantId, authCodePayload, undefined, // nativeAccountId\r\n this.logger);\r\n }\r\n // AccessToken\r\n let cachedAccessToken = null;\r\n if (serverTokenResponse.access_token) {\r\n // If scopes not returned in server response, use request scopes\r\n const responseScopes = serverTokenResponse.scope\r\n ? ScopeSet.fromString(serverTokenResponse.scope)\r\n : new ScopeSet(request.scopes || []);\r\n /*\r\n * Use timestamp calculated before request\r\n * Server may return timestamps as strings, parse to numbers if so.\r\n */\r\n const expiresIn = (typeof serverTokenResponse.expires_in === \"string\"\r\n ? parseInt(serverTokenResponse.expires_in, 10)\r\n : serverTokenResponse.expires_in) || 0;\r\n const extExpiresIn = (typeof serverTokenResponse.ext_expires_in === \"string\"\r\n ? parseInt(serverTokenResponse.ext_expires_in, 10)\r\n : serverTokenResponse.ext_expires_in) || 0;\r\n const refreshIn = (typeof serverTokenResponse.refresh_in === \"string\"\r\n ? parseInt(serverTokenResponse.refresh_in, 10)\r\n : serverTokenResponse.refresh_in) || undefined;\r\n const tokenExpirationSeconds = reqTimestamp + expiresIn;\r\n const extendedTokenExpirationSeconds = tokenExpirationSeconds + extExpiresIn;\r\n const refreshOnSeconds = refreshIn && refreshIn > 0\r\n ? reqTimestamp + refreshIn\r\n : undefined;\r\n // non AAD scenarios can have empty realm\r\n cachedAccessToken = createAccessTokenEntity(this.homeAccountIdentifier, env, serverTokenResponse.access_token, this.clientId, claimsTenantId || authority.tenant || \"\", responseScopes.printScopes(), tokenExpirationSeconds, extendedTokenExpirationSeconds, this.cryptoObj.base64Decode, refreshOnSeconds, serverTokenResponse.token_type, userAssertionHash, serverTokenResponse.key_id, request.claims, request.requestedClaimsHash);\r\n }\r\n // refreshToken\r\n let cachedRefreshToken = null;\r\n if (serverTokenResponse.refresh_token) {\r\n let rtExpiresOn;\r\n if (serverTokenResponse.refresh_token_expires_in) {\r\n const rtExpiresIn = typeof serverTokenResponse.refresh_token_expires_in ===\r\n \"string\"\r\n ? parseInt(serverTokenResponse.refresh_token_expires_in, 10)\r\n : serverTokenResponse.refresh_token_expires_in;\r\n rtExpiresOn = reqTimestamp + rtExpiresIn;\r\n }\r\n cachedRefreshToken = createRefreshTokenEntity(this.homeAccountIdentifier, env, serverTokenResponse.refresh_token, this.clientId, serverTokenResponse.foci, userAssertionHash, rtExpiresOn);\r\n }\r\n // appMetadata\r\n let cachedAppMetadata = null;\r\n if (serverTokenResponse.foci) {\r\n cachedAppMetadata = {\r\n clientId: this.clientId,\r\n environment: env,\r\n familyId: serverTokenResponse.foci,\r\n };\r\n }\r\n return {\r\n account: cachedAccount,\r\n idToken: cachedIdToken,\r\n accessToken: cachedAccessToken,\r\n refreshToken: cachedRefreshToken,\r\n appMetadata: cachedAppMetadata,\r\n };\r\n }\r\n /**\r\n * Creates an @AuthenticationResult from @CacheRecord , @IdToken , and a boolean that states whether or not the result is from cache.\r\n *\r\n * Optionally takes a state string that is set as-is in the response.\r\n *\r\n * @param cacheRecord\r\n * @param idTokenObj\r\n * @param fromTokenCache\r\n * @param stateString\r\n */\r\n static async generateAuthenticationResult(cryptoObj, authority, cacheRecord, fromTokenCache, request, idTokenClaims, requestState, serverTokenResponse, requestId) {\r\n let accessToken = Constants.EMPTY_STRING;\r\n let responseScopes = [];\r\n let expiresOn = null;\r\n let extExpiresOn;\r\n let refreshOn;\r\n let familyId = Constants.EMPTY_STRING;\r\n if (cacheRecord.accessToken) {\r\n /*\r\n * if the request object has `popKid` property, `signPopToken` will be set to false and\r\n * the token will be returned unsigned\r\n */\r\n if (cacheRecord.accessToken.tokenType ===\r\n AuthenticationScheme.POP &&\r\n !request.popKid) {\r\n const popTokenGenerator = new PopTokenGenerator(cryptoObj);\r\n const { secret, keyId } = cacheRecord.accessToken;\r\n if (!keyId) {\r\n throw createClientAuthError(keyIdMissing);\r\n }\r\n accessToken = await popTokenGenerator.signPopToken(secret, keyId, request);\r\n }\r\n else {\r\n accessToken = cacheRecord.accessToken.secret;\r\n }\r\n responseScopes = ScopeSet.fromString(cacheRecord.accessToken.target).asArray();\r\n expiresOn = new Date(Number(cacheRecord.accessToken.expiresOn) * 1000);\r\n extExpiresOn = new Date(Number(cacheRecord.accessToken.extendedExpiresOn) * 1000);\r\n if (cacheRecord.accessToken.refreshOn) {\r\n refreshOn = new Date(Number(cacheRecord.accessToken.refreshOn) * 1000);\r\n }\r\n }\r\n if (cacheRecord.appMetadata) {\r\n familyId =\r\n cacheRecord.appMetadata.familyId === THE_FAMILY_ID\r\n ? THE_FAMILY_ID\r\n : \"\";\r\n }\r\n const uid = idTokenClaims?.oid || idTokenClaims?.sub || \"\";\r\n const tid = idTokenClaims?.tid || \"\";\r\n // for hybrid + native bridge enablement, send back the native account Id\r\n if (serverTokenResponse?.spa_accountid && !!cacheRecord.account) {\r\n cacheRecord.account.nativeAccountId =\r\n serverTokenResponse?.spa_accountid;\r\n }\r\n const accountInfo = cacheRecord.account\r\n ? updateAccountTenantProfileData(cacheRecord.account.getAccountInfo(), undefined, // tenantProfile optional\r\n idTokenClaims, cacheRecord.idToken?.secret)\r\n : null;\r\n return {\r\n authority: authority.canonicalAuthority,\r\n uniqueId: uid,\r\n tenantId: tid,\r\n scopes: responseScopes,\r\n account: accountInfo,\r\n idToken: cacheRecord?.idToken?.secret || \"\",\r\n idTokenClaims: idTokenClaims || {},\r\n accessToken: accessToken,\r\n fromCache: fromTokenCache,\r\n expiresOn: expiresOn,\r\n extExpiresOn: extExpiresOn,\r\n refreshOn: refreshOn,\r\n correlationId: request.correlationId,\r\n requestId: requestId || Constants.EMPTY_STRING,\r\n familyId: familyId,\r\n tokenType: cacheRecord.accessToken?.tokenType || Constants.EMPTY_STRING,\r\n state: requestState\r\n ? requestState.userRequestState\r\n : Constants.EMPTY_STRING,\r\n cloudGraphHostName: cacheRecord.account?.cloudGraphHostName ||\r\n Constants.EMPTY_STRING,\r\n msGraphHost: cacheRecord.account?.msGraphHost || Constants.EMPTY_STRING,\r\n code: serverTokenResponse?.spa_code,\r\n fromNativeBroker: false,\r\n };\r\n }\r\n}\r\nfunction buildAccountToCache(cacheStorage, authority, homeAccountId, base64Decode, correlationId, idTokenClaims, clientInfo, environment, claimsTenantId, authCodePayload, nativeAccountId, logger) {\r\n logger?.verbose(\"setCachedAccount called\");\r\n // Check if base account is already cached\r\n const accountKeys = cacheStorage.getAccountKeys();\r\n const baseAccountKey = accountKeys.find((accountKey) => {\r\n return accountKey.startsWith(homeAccountId);\r\n });\r\n let cachedAccount = null;\r\n if (baseAccountKey) {\r\n cachedAccount = cacheStorage.getAccount(baseAccountKey, correlationId, logger);\r\n }\r\n const baseAccount = cachedAccount ||\r\n AccountEntity.createAccount({\r\n homeAccountId,\r\n idTokenClaims,\r\n clientInfo,\r\n environment,\r\n cloudGraphHostName: authCodePayload?.cloud_graph_host_name,\r\n msGraphHost: authCodePayload?.msgraph_host,\r\n nativeAccountId: nativeAccountId,\r\n }, authority, base64Decode);\r\n const tenantProfiles = baseAccount.tenantProfiles || [];\r\n const tenantId = claimsTenantId || baseAccount.realm;\r\n if (tenantId &&\r\n !tenantProfiles.find((tenantProfile) => {\r\n return tenantProfile.tenantId === tenantId;\r\n })) {\r\n const newTenantProfile = buildTenantProfile(homeAccountId, baseAccount.localAccountId, tenantId, idTokenClaims);\r\n tenantProfiles.push(newTenantProfile);\r\n }\r\n baseAccount.tenantProfiles = tenantProfiles;\r\n return baseAccount;\r\n}\n\nexport { ResponseHandler, buildAccountToCache };\n//# sourceMappingURL=ResponseHandler.mjs.map\n","/*! @azure/msal-common v14.16.1 2025-08-05 */\n'use strict';\n/*\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License.\r\n */\r\nasync function getClientAssertion(clientAssertion, clientId, tokenEndpoint) {\r\n if (typeof clientAssertion === \"string\") {\r\n return clientAssertion;\r\n }\r\n else {\r\n const config = {\r\n clientId: clientId,\r\n tokenEndpoint: tokenEndpoint,\r\n };\r\n return clientAssertion(config);\r\n }\r\n}\n\nexport { getClientAssertion };\n//# sourceMappingURL=ClientAssertionUtils.mjs.map\n","/*! @azure/msal-common v14.16.1 2025-08-05 */\n'use strict';\nimport { BaseClient } from './BaseClient.mjs';\nimport { RequestParameterBuilder } from '../request/RequestParameterBuilder.mjs';\nimport { Separators, GrantType, AuthenticationScheme, PromptValue, HeaderNames } from '../utils/Constants.mjs';\nimport { CLIENT_ID, RETURN_SPA_CODE } from '../constants/AADServerParamKeys.mjs';\nimport { isOidcProtocolMode } from '../config/ClientConfiguration.mjs';\nimport { ResponseHandler } from '../response/ResponseHandler.mjs';\nimport { StringUtils } from '../utils/StringUtils.mjs';\nimport { createClientAuthError } from '../error/ClientAuthError.mjs';\nimport { UrlString } from '../url/UrlString.mjs';\nimport { PopTokenGenerator } from '../crypto/PopTokenGenerator.mjs';\nimport { nowSeconds } from '../utils/TimeUtils.mjs';\nimport { buildClientInfo, buildClientInfoFromHomeAccountId } from '../account/ClientInfo.mjs';\nimport { CcsCredentialType } from '../account/CcsCredential.mjs';\nimport { createClientConfigurationError } from '../error/ClientConfigurationError.mjs';\nimport { RequestValidator } from '../request/RequestValidator.mjs';\nimport { PerformanceEvents } from '../telemetry/performance/PerformanceEvent.mjs';\nimport { invokeAsync } from '../utils/FunctionWrappers.mjs';\nimport { getClientAssertion } from '../utils/ClientAssertionUtils.mjs';\nimport { requestCannotBeMade, authorizationCodeMissingFromServerResponse } from '../error/ClientAuthErrorCodes.mjs';\nimport { logoutRequestEmpty, missingSshJwk } from '../error/ClientConfigurationErrorCodes.mjs';\n\n/*\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License.\r\n */\r\n/**\r\n * Oauth2.0 Authorization Code client\r\n * @internal\r\n */\r\nclass AuthorizationCodeClient extends BaseClient {\r\n constructor(configuration, performanceClient) {\r\n super(configuration, performanceClient);\r\n // Flag to indicate if client is for hybrid spa auth code redemption\r\n this.includeRedirectUri = true;\r\n this.oidcDefaultScopes =\r\n this.config.authOptions.authority.options.OIDCOptions?.defaultScopes;\r\n }\r\n /**\r\n * Creates the URL of the authorization request letting the user input credentials and consent to the\r\n * application. The URL target the /authorize endpoint of the authority configured in the\r\n * application object.\r\n *\r\n * Once the user inputs their credentials and consents, the authority will send a response to the redirect URI\r\n * sent in the request and should contain an authorization code, which can then be used to acquire tokens via\r\n * acquireToken(AuthorizationCodeRequest)\r\n * @param request\r\n */\r\n async getAuthCodeUrl(request) {\r\n this.performanceClient?.addQueueMeasurement(PerformanceEvents.GetAuthCodeUrl, request.correlationId);\r\n const queryString = await invokeAsync(this.createAuthCodeUrlQueryString.bind(this), PerformanceEvents.AuthClientCreateQueryString, this.logger, this.performanceClient, request.correlationId)(request);\r\n return UrlString.appendQueryString(this.authority.authorizationEndpoint, queryString);\r\n }\r\n /**\r\n * API to acquire a token in exchange of 'authorization_code` acquired by the user in the first leg of the\r\n * authorization_code_grant\r\n * @param request\r\n */\r\n async acquireToken(request, authCodePayload) {\r\n this.performanceClient?.addQueueMeasurement(PerformanceEvents.AuthClientAcquireToken, request.correlationId);\r\n if (!request.code) {\r\n throw createClientAuthError(requestCannotBeMade);\r\n }\r\n const reqTimestamp = nowSeconds();\r\n const response = await invokeAsync(this.executeTokenRequest.bind(this), PerformanceEvents.AuthClientExecuteTokenRequest, this.logger, this.performanceClient, request.correlationId)(this.authority, request);\r\n // Retrieve requestId from response headers\r\n const requestId = response.headers?.[HeaderNames.X_MS_REQUEST_ID];\r\n const responseHandler = new ResponseHandler(this.config.authOptions.clientId, this.cacheManager, this.cryptoUtils, this.logger, this.config.serializableCache, this.config.persistencePlugin, this.performanceClient);\r\n // Validate response. This function throws a server error if an error is returned by the server.\r\n responseHandler.validateTokenResponse(response.body);\r\n return invokeAsync(responseHandler.handleServerTokenResponse.bind(responseHandler), PerformanceEvents.HandleServerTokenResponse, this.logger, this.performanceClient, request.correlationId)(response.body, this.authority, reqTimestamp, request, authCodePayload, undefined, undefined, undefined, requestId);\r\n }\r\n /**\r\n * Handles the hash fragment response from public client code request. Returns a code response used by\r\n * the client to exchange for a token in acquireToken.\r\n * @param hashFragment\r\n */\r\n handleFragmentResponse(serverParams, cachedState) {\r\n // Handle responses.\r\n const responseHandler = new ResponseHandler(this.config.authOptions.clientId, this.cacheManager, this.cryptoUtils, this.logger, null, null);\r\n // Get code response\r\n responseHandler.validateServerAuthorizationCodeResponse(serverParams, cachedState);\r\n // throw when there is no auth code in the response\r\n if (!serverParams.code) {\r\n throw createClientAuthError(authorizationCodeMissingFromServerResponse);\r\n }\r\n return serverParams;\r\n }\r\n /**\r\n * Used to log out the current user, and redirect the user to the postLogoutRedirectUri.\r\n * Default behaviour is to redirect the user to `window.location.href`.\r\n * @param authorityUri\r\n */\r\n getLogoutUri(logoutRequest) {\r\n // Throw error if logoutRequest is null/undefined\r\n if (!logoutRequest) {\r\n throw createClientConfigurationError(logoutRequestEmpty);\r\n }\r\n const queryString = this.createLogoutUrlQueryString(logoutRequest);\r\n // Construct logout URI\r\n return UrlString.appendQueryString(this.authority.endSessionEndpoint, queryString);\r\n }\r\n /**\r\n * Executes POST request to token endpoint\r\n * @param authority\r\n * @param request\r\n */\r\n async executeTokenRequest(authority, request) {\r\n this.performanceClient?.addQueueMeasurement(PerformanceEvents.AuthClientExecuteTokenRequest, request.correlationId);\r\n const queryParametersString = this.createTokenQueryParameters(request);\r\n const endpoint = UrlString.appendQueryString(authority.tokenEndpoint, queryParametersString);\r\n const requestBody = await invokeAsync(this.createTokenRequestBody.bind(this), PerformanceEvents.AuthClientCreateTokenRequestBody, this.logger, this.performanceClient, request.correlationId)(request);\r\n let ccsCredential = undefined;\r\n if (request.clientInfo) {\r\n try {\r\n const clientInfo = buildClientInfo(request.clientInfo, this.cryptoUtils.base64Decode);\r\n ccsCredential = {\r\n credential: `${clientInfo.uid}${Separators.CLIENT_INFO_SEPARATOR}${clientInfo.utid}`,\r\n type: CcsCredentialType.HOME_ACCOUNT_ID,\r\n };\r\n }\r\n catch (e) {\r\n this.logger.verbose(\"Could not parse client info for CCS Header: \" + e);\r\n }\r\n }\r\n const headers = this.createTokenRequestHeaders(ccsCredential || request.ccsCredential);\r\n const thumbprint = {\r\n clientId: request.tokenBodyParameters?.clientId ||\r\n this.config.authOptions.clientId,\r\n authority: authority.canonicalAuthority,\r\n scopes: request.scopes,\r\n claims: request.claims,\r\n authenticationScheme: request.authenticationScheme,\r\n resourceRequestMethod: request.resourceRequestMethod,\r\n resourceRequestUri: request.resourceRequestUri,\r\n shrClaims: request.shrClaims,\r\n sshKid: request.sshKid,\r\n };\r\n return invokeAsync(this.executePostToTokenEndpoint.bind(this), PerformanceEvents.AuthorizationCodeClientExecutePostToTokenEndpoint, this.logger, this.performanceClient, request.correlationId)(endpoint, requestBody, headers, thumbprint, request.correlationId, PerformanceEvents.AuthorizationCodeClientExecutePostToTokenEndpoint);\r\n }\r\n /**\r\n * Generates a map for all the params to be sent to the service\r\n * @param request\r\n */\r\n async createTokenRequestBody(request) {\r\n this.performanceClient?.addQueueMeasurement(PerformanceEvents.AuthClientCreateTokenRequestBody, request.correlationId);\r\n const parameterBuilder = new RequestParameterBuilder(request.correlationId, this.performanceClient);\r\n parameterBuilder.addClientId(request.embeddedClientId ||\r\n request.tokenBodyParameters?.[CLIENT_ID] ||\r\n this.config.authOptions.clientId);\r\n /*\r\n * For hybrid spa flow, there will be a code but no verifier\r\n * In this scenario, don't include redirect uri as auth code will not be bound to redirect URI\r\n */\r\n if (!this.includeRedirectUri) {\r\n // Just validate\r\n RequestValidator.validateRedirectUri(request.redirectUri);\r\n }\r\n else {\r\n // Validate and include redirect uri\r\n parameterBuilder.addRedirectUri(request.redirectUri);\r\n }\r\n // Add scope array, parameter builder will add default scopes and dedupe\r\n parameterBuilder.addScopes(request.scopes, true, this.oidcDefaultScopes);\r\n // add code: user set, not validated\r\n parameterBuilder.addAuthorizationCode(request.code);\r\n // Add library metadata\r\n parameterBuilder.addLibraryInfo(this.config.libraryInfo);\r\n parameterBuilder.addApplicationTelemetry(this.config.telemetry.application);\r\n parameterBuilder.addThrottling();\r\n if (this.serverTelemetryManager && !isOidcProtocolMode(this.config)) {\r\n parameterBuilder.addServerTelemetry(this.serverTelemetryManager);\r\n }\r\n // add code_verifier if passed\r\n if (request.codeVerifier) {\r\n parameterBuilder.addCodeVerifier(request.codeVerifier);\r\n }\r\n if (this.config.clientCredentials.clientSecret) {\r\n parameterBuilder.addClientSecret(this.config.clientCredentials.clientSecret);\r\n }\r\n if (this.config.clientCredentials.clientAssertion) {\r\n const clientAssertion = this.config.clientCredentials.clientAssertion;\r\n parameterBuilder.addClientAssertion(await getClientAssertion(clientAssertion.assertion, this.config.authOptions.clientId, request.resourceRequestUri));\r\n parameterBuilder.addClientAssertionType(clientAssertion.assertionType);\r\n }\r\n parameterBuilder.addGrantType(GrantType.AUTHORIZATION_CODE_GRANT);\r\n parameterBuilder.addClientInfo();\r\n if (request.authenticationScheme === AuthenticationScheme.POP) {\r\n const popTokenGenerator = new PopTokenGenerator(this.cryptoUtils, this.performanceClient);\r\n let reqCnfData;\r\n if (!request.popKid) {\r\n const generatedReqCnfData = await invokeAsync(popTokenGenerator.generateCnf.bind(popTokenGenerator), PerformanceEvents.PopTokenGenerateCnf, this.logger, this.performanceClient, request.correlationId)(request, this.logger);\r\n reqCnfData = generatedReqCnfData.reqCnfString;\r\n }\r\n else {\r\n reqCnfData = this.cryptoUtils.encodeKid(request.popKid);\r\n }\r\n // SPA PoP requires full Base64Url encoded req_cnf string (unhashed)\r\n parameterBuilder.addPopToken(reqCnfData);\r\n }\r\n else if (request.authenticationScheme === AuthenticationScheme.SSH) {\r\n if (request.sshJwk) {\r\n parameterBuilder.addSshJwk(request.sshJwk);\r\n }\r\n else {\r\n throw createClientConfigurationError(missingSshJwk);\r\n }\r\n }\r\n if (!StringUtils.isEmptyObj(request.claims) ||\r\n (this.config.authOptions.clientCapabilities &&\r\n this.config.authOptions.clientCapabilities.length > 0)) {\r\n parameterBuilder.addClaims(request.claims, this.config.authOptions.clientCapabilities);\r\n }\r\n let ccsCred = undefined;\r\n if (request.clientInfo) {\r\n try {\r\n const clientInfo = buildClientInfo(request.clientInfo, this.cryptoUtils.base64Decode);\r\n ccsCred = {\r\n credential: `${clientInfo.uid}${Separators.CLIENT_INFO_SEPARATOR}${clientInfo.utid}`,\r\n type: CcsCredentialType.HOME_ACCOUNT_ID,\r\n };\r\n }\r\n catch (e) {\r\n this.logger.verbose(\"Could not parse client info for CCS Header: \" + e);\r\n }\r\n }\r\n else {\r\n ccsCred = request.ccsCredential;\r\n }\r\n // Adds these as parameters in the request instead of headers to prevent CORS preflight request\r\n if (this.config.systemOptions.preventCorsPreflight && ccsCred) {\r\n switch (ccsCred.type) {\r\n case CcsCredentialType.HOME_ACCOUNT_ID:\r\n try {\r\n const clientInfo = buildClientInfoFromHomeAccountId(ccsCred.credential);\r\n parameterBuilder.addCcsOid(clientInfo);\r\n }\r\n catch (e) {\r\n this.logger.verbose(\"Could not parse home account ID for CCS Header: \" +\r\n e);\r\n }\r\n break;\r\n case CcsCredentialType.UPN:\r\n parameterBuilder.addCcsUpn(ccsCred.credential);\r\n break;\r\n }\r\n }\r\n if (request.embeddedClientId) {\r\n parameterBuilder.addBrokerParameters({\r\n brokerClientId: this.config.authOptions.clientId,\r\n brokerRedirectUri: this.config.authOptions.redirectUri,\r\n });\r\n }\r\n if (request.tokenBodyParameters) {\r\n parameterBuilder.addExtraQueryParameters(request.tokenBodyParameters);\r\n }\r\n // Add hybrid spa parameters if not already provided\r\n if (request.enableSpaAuthorizationCode &&\r\n (!request.tokenBodyParameters ||\r\n !request.tokenBodyParameters[RETURN_SPA_CODE])) {\r\n parameterBuilder.addExtraQueryParameters({\r\n [RETURN_SPA_CODE]: \"1\",\r\n });\r\n }\r\n return parameterBuilder.createQueryString();\r\n }\r\n /**\r\n * This API validates the `AuthorizationCodeUrlRequest` and creates a URL\r\n * @param request\r\n */\r\n async createAuthCodeUrlQueryString(request) {\r\n // generate the correlationId if not set by the user and add\r\n const correlationId = request.correlationId ||\r\n this.config.cryptoInterface.createNewGuid();\r\n this.performanceClient?.addQueueMeasurement(PerformanceEvents.AuthClientCreateQueryString, correlationId);\r\n const parameterBuilder = new RequestParameterBuilder(correlationId, this.performanceClient);\r\n parameterBuilder.addClientId(request.embeddedClientId ||\r\n request.extraQueryParameters?.[CLIENT_ID] ||\r\n this.config.authOptions.clientId);\r\n const requestScopes = [\r\n ...(request.scopes || []),\r\n ...(request.extraScopesToConsent || []),\r\n ];\r\n parameterBuilder.addScopes(requestScopes, true, this.oidcDefaultScopes);\r\n // validate the redirectUri (to be a non null value)\r\n parameterBuilder.addRedirectUri(request.redirectUri);\r\n parameterBuilder.addCorrelationId(correlationId);\r\n // add response_mode. If not passed in it defaults to query.\r\n parameterBuilder.addResponseMode(request.responseMode);\r\n // add response_type = code\r\n parameterBuilder.addResponseTypeCode();\r\n // add library info parameters\r\n parameterBuilder.addLibraryInfo(this.config.libraryInfo);\r\n if (!isOidcProtocolMode(this.config)) {\r\n parameterBuilder.addApplicationTelemetry(this.config.telemetry.application);\r\n }\r\n // add client_info=1\r\n parameterBuilder.addClientInfo();\r\n if (request.codeChallenge && request.codeChallengeMethod) {\r\n parameterBuilder.addCodeChallengeParams(request.codeChallenge, request.codeChallengeMethod);\r\n }\r\n if (request.prompt) {\r\n parameterBuilder.addPrompt(request.prompt);\r\n }\r\n if (request.domainHint) {\r\n parameterBuilder.addDomainHint(request.domainHint);\r\n }\r\n // Add sid or loginHint with preference for login_hint claim (in request) -> sid -> loginHint (upn/email) -> username of AccountInfo object\r\n if (request.prompt !== PromptValue.SELECT_ACCOUNT) {\r\n // AAD will throw if prompt=select_account is passed with an account hint\r\n if (request.sid && request.prompt === PromptValue.NONE) {\r\n // SessionID is only used in silent calls\r\n this.logger.verbose(\"createAuthCodeUrlQueryString: Prompt is none, adding sid from request\");\r\n parameterBuilder.addSid(request.sid);\r\n }\r\n else if (request.account) {\r\n const accountSid = this.extractAccountSid(request.account);\r\n let accountLoginHintClaim = this.extractLoginHint(request.account);\r\n if (accountLoginHintClaim && request.domainHint) {\r\n this.logger.warning(`AuthorizationCodeClient.createAuthCodeUrlQueryString: \"domainHint\" param is set, skipping opaque \"login_hint\" claim. Please consider not passing domainHint`);\r\n accountLoginHintClaim = null;\r\n }\r\n // If login_hint claim is present, use it over sid/username\r\n if (accountLoginHintClaim) {\r\n this.logger.verbose(\"createAuthCodeUrlQueryString: login_hint claim present on account\");\r\n parameterBuilder.addLoginHint(accountLoginHintClaim);\r\n try {\r\n const clientInfo = buildClientInfoFromHomeAccountId(request.account.homeAccountId);\r\n parameterBuilder.addCcsOid(clientInfo);\r\n }\r\n catch (e) {\r\n this.logger.verbose(\"createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header\");\r\n }\r\n }\r\n else if (accountSid && request.prompt === PromptValue.NONE) {\r\n /*\r\n * If account and loginHint are provided, we will check account first for sid before adding loginHint\r\n * SessionId is only used in silent calls\r\n */\r\n this.logger.verbose(\"createAuthCodeUrlQueryString: Prompt is none, adding sid from account\");\r\n parameterBuilder.addSid(accountSid);\r\n try {\r\n const clientInfo = buildClientInfoFromHomeAccountId(request.account.homeAccountId);\r\n parameterBuilder.addCcsOid(clientInfo);\r\n }\r\n catch (e) {\r\n this.logger.verbose(\"createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header\");\r\n }\r\n }\r\n else if (request.loginHint) {\r\n this.logger.verbose(\"createAuthCodeUrlQueryString: Adding login_hint from request\");\r\n parameterBuilder.addLoginHint(request.loginHint);\r\n parameterBuilder.addCcsUpn(request.loginHint);\r\n }\r\n else if (request.account.username) {\r\n // Fallback to account username if provided\r\n this.logger.verbose(\"createAuthCodeUrlQueryString: Adding login_hint from account\");\r\n parameterBuilder.addLoginHint(request.account.username);\r\n try {\r\n const clientInfo = buildClientInfoFromHomeAccountId(request.account.homeAccountId);\r\n parameterBuilder.addCcsOid(clientInfo);\r\n }\r\n catch (e) {\r\n this.logger.verbose(\"createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header\");\r\n }\r\n }\r\n }\r\n else if (request.loginHint) {\r\n this.logger.verbose(\"createAuthCodeUrlQueryString: No account, adding login_hint from request\");\r\n parameterBuilder.addLoginHint(request.loginHint);\r\n parameterBuilder.addCcsUpn(request.loginHint);\r\n }\r\n }\r\n else {\r\n this.logger.verbose(\"createAuthCodeUrlQueryString: Prompt is select_account, ignoring account hints\");\r\n }\r\n if (request.nonce) {\r\n parameterBuilder.addNonce(request.nonce);\r\n }\r\n if (request.state) {\r\n parameterBuilder.addState(request.state);\r\n }\r\n if (request.claims ||\r\n (this.config.authOptions.clientCapabilities &&\r\n this.config.authOptions.clientCapabilities.length > 0)) {\r\n parameterBuilder.addClaims(request.claims, this.config.authOptions.clientCapabilities);\r\n }\r\n if (request.embeddedClientId) {\r\n parameterBuilder.addBrokerParameters({\r\n brokerClientId: this.config.authOptions.clientId,\r\n brokerRedirectUri: this.config.authOptions.redirectUri,\r\n });\r\n }\r\n this.addExtraQueryParams(request, parameterBuilder);\r\n if (request.nativeBroker) {\r\n // signal ests that this is a WAM call\r\n parameterBuilder.addNativeBroker();\r\n // pass the req_cnf for POP\r\n if (request.authenticationScheme === AuthenticationScheme.POP) {\r\n const popTokenGenerator = new PopTokenGenerator(this.cryptoUtils);\r\n // req_cnf is always sent as a string for SPAs\r\n let reqCnfData;\r\n if (!request.popKid) {\r\n const generatedReqCnfData = await invokeAsync(popTokenGenerator.generateCnf.bind(popTokenGenerator), PerformanceEvents.PopTokenGenerateCnf, this.logger, this.performanceClient, request.correlationId)(request, this.logger);\r\n reqCnfData = generatedReqCnfData.reqCnfString;\r\n }\r\n else {\r\n reqCnfData = this.cryptoUtils.encodeKid(request.popKid);\r\n }\r\n parameterBuilder.addPopToken(reqCnfData);\r\n }\r\n }\r\n return parameterBuilder.createQueryString();\r\n }\r\n /**\r\n * This API validates the `EndSessionRequest` and creates a URL\r\n * @param request\r\n */\r\n createLogoutUrlQueryString(request) {\r\n const parameterBuilder = new RequestParameterBuilder(request.correlationId, this.performanceClient);\r\n if (request.postLogoutRedirectUri) {\r\n parameterBuilder.addPostLogoutRedirectUri(request.postLogoutRedirectUri);\r\n }\r\n if (request.correlationId) {\r\n parameterBuilder.addCorrelationId(request.correlationId);\r\n }\r\n if (request.idTokenHint) {\r\n parameterBuilder.addIdTokenHint(request.idTokenHint);\r\n }\r\n if (request.state) {\r\n parameterBuilder.addState(request.state);\r\n }\r\n if (request.logoutHint) {\r\n parameterBuilder.addLogoutHint(request.logoutHint);\r\n }\r\n this.addExtraQueryParams(request, parameterBuilder);\r\n return parameterBuilder.createQueryString();\r\n }\r\n addExtraQueryParams(request, parameterBuilder) {\r\n const hasRequestInstanceAware = request.extraQueryParameters &&\r\n request.extraQueryParameters.hasOwnProperty(\"instance_aware\");\r\n // Set instance_aware flag if config auth param is set\r\n if (!hasRequestInstanceAware && this.config.authOptions.instanceAware) {\r\n request.extraQueryParameters = request.extraQueryParameters || {};\r\n request.extraQueryParameters[\"instance_aware\"] = \"true\";\r\n }\r\n if (request.extraQueryParameters) {\r\n parameterBuilder.addExtraQueryParameters(request.extraQueryParameters);\r\n }\r\n }\r\n /**\r\n * Helper to get sid from account. Returns null if idTokenClaims are not present or sid is not present.\r\n * @param account\r\n */\r\n extractAccountSid(account) {\r\n return account.idTokenClaims?.sid || null;\r\n }\r\n extractLoginHint(account) {\r\n return account.idTokenClaims?.login_hint || null;\r\n }\r\n}\n\nexport { AuthorizationCodeClient };\n//# sourceMappingURL=AuthorizationCodeClient.mjs.map\n","/*! @azure/msal-common v14.16.1 2025-08-05 */\n'use strict';\nimport { isOidcProtocolMode } from '../config/ClientConfiguration.mjs';\nimport { BaseClient } from './BaseClient.mjs';\nimport { RequestParameterBuilder } from '../request/RequestParameterBuilder.mjs';\nimport { GrantType, AuthenticationScheme, HeaderNames, Errors } from '../utils/Constants.mjs';\nimport { CLIENT_ID } from '../constants/AADServerParamKeys.mjs';\nimport { ResponseHandler } from '../response/ResponseHandler.mjs';\nimport { PopTokenGenerator } from '../crypto/PopTokenGenerator.mjs';\nimport { StringUtils } from '../utils/StringUtils.mjs';\nimport { createClientConfigurationError } from '../error/ClientConfigurationError.mjs';\nimport { createClientAuthError } from '../error/ClientAuthError.mjs';\nimport { ServerError } from '../error/ServerError.mjs';\nimport { nowSeconds, isTokenExpired } from '../utils/TimeUtils.mjs';\nimport { UrlString } from '../url/UrlString.mjs';\nimport { CcsCredentialType } from '../account/CcsCredential.mjs';\nimport { buildClientInfoFromHomeAccountId } from '../account/ClientInfo.mjs';\nimport { createInteractionRequiredAuthError, InteractionRequiredAuthError } from '../error/InteractionRequiredAuthError.mjs';\nimport { PerformanceEvents } from '../telemetry/performance/PerformanceEvent.mjs';\nimport { invokeAsync, invoke } from '../utils/FunctionWrappers.mjs';\nimport { generateCredentialKey } from '../cache/utils/CacheHelpers.mjs';\nimport { getClientAssertion } from '../utils/ClientAssertionUtils.mjs';\nimport { tokenRequestEmpty, missingSshJwk } from '../error/ClientConfigurationErrorCodes.mjs';\nimport { noAccountInSilentRequest } from '../error/ClientAuthErrorCodes.mjs';\nimport { noTokensFound, refreshTokenExpired, badToken } from '../error/InteractionRequiredAuthErrorCodes.mjs';\n\n/*\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License.\r\n */\r\nconst DEFAULT_REFRESH_TOKEN_EXPIRATION_OFFSET_SECONDS = 300; // 5 Minutes\r\n/**\r\n * OAuth2.0 refresh token client\r\n * @internal\r\n */\r\nclass RefreshTokenClient extends BaseClient {\r\n constructor(configuration, performanceClient) {\r\n super(configuration, performanceClient);\r\n }\r\n async acquireToken(request) {\r\n this.performanceClient?.addQueueMeasurement(PerformanceEvents.RefreshTokenClientAcquireToken, request.correlationId);\r\n const reqTimestamp = nowSeconds();\r\n const response = await invokeAsync(this.executeTokenRequest.bind(this), PerformanceEvents.RefreshTokenClientExecuteTokenRequest, this.logger, this.performanceClient, request.correlationId)(request, this.authority);\r\n // Retrieve requestId from response headers\r\n const requestId = response.headers?.[HeaderNames.X_MS_REQUEST_ID];\r\n const responseHandler = new ResponseHandler(this.config.authOptions.clientId, this.cacheManager, this.cryptoUtils, this.logger, this.config.serializableCache, this.config.persistencePlugin);\r\n responseHandler.validateTokenResponse(response.body);\r\n return invokeAsync(responseHandler.handleServerTokenResponse.bind(responseHandler), PerformanceEvents.HandleServerTokenResponse, this.logger, this.performanceClient, request.correlationId)(response.body, this.authority, reqTimestamp, request, undefined, undefined, true, request.forceCache, requestId);\r\n }\r\n /**\r\n * Gets cached refresh token and attaches to request, then calls acquireToken API\r\n * @param request\r\n */\r\n async acquireTokenByRefreshToken(request) {\r\n // Cannot renew token if no request object is given.\r\n if (!request) {\r\n throw createClientConfigurationError(tokenRequestEmpty);\r\n }\r\n this.performanceClient?.addQueueMeasurement(PerformanceEvents.RefreshTokenClientAcquireTokenByRefreshToken, request.correlationId);\r\n // We currently do not support silent flow for account === null use cases; This will be revisited for confidential flow usecases\r\n if (!request.account) {\r\n throw createClientAuthError(noAccountInSilentRequest);\r\n }\r\n // try checking if FOCI is enabled for the given application\r\n const isFOCI = this.cacheManager.isAppMetadataFOCI(request.account.environment);\r\n // if the app is part of the family, retrive a Family refresh token if present and make a refreshTokenRequest\r\n if (isFOCI) {\r\n try {\r\n return await invokeAsync(this.acquireTokenWithCachedRefreshToken.bind(this), PerformanceEvents.RefreshTokenClientAcquireTokenWithCachedRefreshToken, this.logger, this.performanceClient, request.correlationId)(request, true);\r\n }\r\n catch (e) {\r\n const noFamilyRTInCache = e instanceof InteractionRequiredAuthError &&\r\n e.errorCode ===\r\n noTokensFound;\r\n const clientMismatchErrorWithFamilyRT = e instanceof ServerError &&\r\n e.errorCode === Errors.INVALID_GRANT_ERROR &&\r\n e.subError === Errors.CLIENT_MISMATCH_ERROR;\r\n // if family Refresh Token (FRT) cache acquisition fails or if client_mismatch error is seen with FRT, reattempt with application Refresh Token (ART)\r\n if (noFamilyRTInCache || clientMismatchErrorWithFamilyRT) {\r\n return invokeAsync(this.acquireTokenWithCachedRefreshToken.bind(this), PerformanceEvents.RefreshTokenClientAcquireTokenWithCachedRefreshToken, this.logger, this.performanceClient, request.correlationId)(request, false);\r\n // throw in all other cases\r\n }\r\n else {\r\n throw e;\r\n }\r\n }\r\n }\r\n // fall back to application refresh token acquisition\r\n return invokeAsync(this.acquireTokenWithCachedRefreshToken.bind(this), PerformanceEvents.RefreshTokenClientAcquireTokenWithCachedRefreshToken, this.logger, this.performanceClient, request.correlationId)(request, false);\r\n }\r\n /**\r\n * makes a network call to acquire tokens by exchanging RefreshToken available in userCache; throws if refresh token is not cached\r\n * @param request\r\n */\r\n async acquireTokenWithCachedRefreshToken(request, foci) {\r\n this.performanceClient?.addQueueMeasurement(PerformanceEvents.RefreshTokenClientAcquireTokenWithCachedRefreshToken, request.correlationId);\r\n // fetches family RT or application RT based on FOCI value\r\n const refreshToken = invoke(this.cacheManager.getRefreshToken.bind(this.cacheManager), PerformanceEvents.CacheManagerGetRefreshToken, this.logger, this.performanceClient, request.correlationId)(request.account, foci, request.correlationId, undefined, this.performanceClient);\r\n if (!refreshToken) {\r\n throw createInteractionRequiredAuthError(noTokensFound);\r\n }\r\n if (refreshToken.expiresOn &&\r\n isTokenExpired(refreshToken.expiresOn, request.refreshTokenExpirationOffsetSeconds ||\r\n DEFAULT_REFRESH_TOKEN_EXPIRATION_OFFSET_SECONDS)) {\r\n throw createInteractionRequiredAuthError(refreshTokenExpired);\r\n }\r\n // attach cached RT size to the current measurement\r\n const refreshTokenRequest = {\r\n ...request,\r\n refreshToken: refreshToken.secret,\r\n authenticationScheme: request.authenticationScheme || AuthenticationScheme.BEARER,\r\n ccsCredential: {\r\n credential: request.account.homeAccountId,\r\n type: CcsCredentialType.HOME_ACCOUNT_ID,\r\n },\r\n };\r\n try {\r\n return await invokeAsync(this.acquireToken.bind(this), PerformanceEvents.RefreshTokenClientAcquireToken, this.logger, this.performanceClient, request.correlationId)(refreshTokenRequest);\r\n }\r\n catch (e) {\r\n if (e instanceof InteractionRequiredAuthError &&\r\n e.subError === badToken) {\r\n // Remove bad refresh token from cache\r\n this.logger.verbose(\"acquireTokenWithRefreshToken: bad refresh token, removing from cache\");\r\n const badRefreshTokenKey = generateCredentialKey(refreshToken);\r\n this.cacheManager.removeRefreshToken(badRefreshTokenKey, request.correlationId);\r\n }\r\n throw e;\r\n }\r\n }\r\n /**\r\n * Constructs the network message and makes a NW call to the underlying secure token service\r\n * @param request\r\n * @param authority\r\n */\r\n async executeTokenRequest(request, authority) {\r\n this.performanceClient?.addQueueMeasurement(PerformanceEvents.RefreshTokenClientExecuteTokenRequest, request.correlationId);\r\n const queryParametersString = this.createTokenQueryParameters(request);\r\n const endpoint = UrlString.appendQueryString(authority.tokenEndpoint, queryParametersString);\r\n const requestBody = await invokeAsync(this.createTokenRequestBody.bind(this), PerformanceEvents.RefreshTokenClientCreateTokenRequestBody, this.logger, this.performanceClient, request.correlationId)(request);\r\n const headers = this.createTokenRequestHeaders(request.ccsCredential);\r\n const thumbprint = {\r\n clientId: request.tokenBodyParameters?.clientId ||\r\n this.config.authOptions.clientId,\r\n authority: authority.canonicalAuthority,\r\n scopes: request.scopes,\r\n claims: request.claims,\r\n authenticationScheme: request.authenticationScheme,\r\n resourceRequestMethod: request.resourceRequestMethod,\r\n resourceRequestUri: request.resourceRequestUri,\r\n shrClaims: request.shrClaims,\r\n sshKid: request.sshKid,\r\n };\r\n return invokeAsync(this.executePostToTokenEndpoint.bind(this), PerformanceEvents.RefreshTokenClientExecutePostToTokenEndpoint, this.logger, this.performanceClient, request.correlationId)(endpoint, requestBody, headers, thumbprint, request.correlationId, PerformanceEvents.RefreshTokenClientExecutePostToTokenEndpoint);\r\n }\r\n /**\r\n * Helper function to create the token request body\r\n * @param request\r\n */\r\n async createTokenRequestBody(request) {\r\n this.performanceClient?.addQueueMeasurement(PerformanceEvents.RefreshTokenClientCreateTokenRequestBody, request.correlationId);\r\n const correlationId = request.correlationId;\r\n const parameterBuilder = new RequestParameterBuilder(correlationId, this.performanceClient);\r\n parameterBuilder.addClientId(request.embeddedClientId ||\r\n request.tokenBodyParameters?.[CLIENT_ID] ||\r\n this.config.authOptions.clientId);\r\n if (request.redirectUri) {\r\n parameterBuilder.addRedirectUri(request.redirectUri);\r\n }\r\n parameterBuilder.addScopes(request.scopes, true, this.config.authOptions.authority.options.OIDCOptions?.defaultScopes);\r\n parameterBuilder.addGrantType(GrantType.REFRESH_TOKEN_GRANT);\r\n parameterBuilder.addClientInfo();\r\n parameterBuilder.addLibraryInfo(this.config.libraryInfo);\r\n parameterBuilder.addApplicationTelemetry(this.config.telemetry.application);\r\n parameterBuilder.addThrottling();\r\n if (this.serverTelemetryManager && !isOidcProtocolMode(this.config)) {\r\n parameterBuilder.addServerTelemetry(this.serverTelemetryManager);\r\n }\r\n parameterBuilder.addRefreshToken(request.refreshToken);\r\n if (this.config.clientCredentials.clientSecret) {\r\n parameterBuilder.addClientSecret(this.config.clientCredentials.clientSecret);\r\n }\r\n if (this.config.clientCredentials.clientAssertion) {\r\n const clientAssertion = this.config.clientCredentials.clientAssertion;\r\n parameterBuilder.addClientAssertion(await getClientAssertion(clientAssertion.assertion, this.config.authOptions.clientId, request.resourceRequestUri));\r\n parameterBuilder.addClientAssertionType(clientAssertion.assertionType);\r\n }\r\n if (request.authenticationScheme === AuthenticationScheme.POP) {\r\n const popTokenGenerator = new PopTokenGenerator(this.cryptoUtils, this.performanceClient);\r\n let reqCnfData;\r\n if (!request.popKid) {\r\n const generatedReqCnfData = await invokeAsync(popTokenGenerator.generateCnf.bind(popTokenGenerator), PerformanceEvents.PopTokenGenerateCnf, this.logger, this.performanceClient, request.correlationId)(request, this.logger);\r\n reqCnfData = generatedReqCnfData.reqCnfString;\r\n }\r\n else {\r\n reqCnfData = this.cryptoUtils.encodeKid(request.popKid);\r\n }\r\n // SPA PoP requires full Base64Url encoded req_cnf string (unhashed)\r\n parameterBuilder.addPopToken(reqCnfData);\r\n }\r\n else if (request.authenticationScheme === AuthenticationScheme.SSH) {\r\n if (request.sshJwk) {\r\n parameterBuilder.addSshJwk(request.sshJwk);\r\n }\r\n else {\r\n throw createClientConfigurationError(missingSshJwk);\r\n }\r\n }\r\n if (!StringUtils.isEmptyObj(request.claims) ||\r\n (this.config.authOptions.clientCapabilities &&\r\n this.config.authOptions.clientCapabilities.length > 0)) {\r\n parameterBuilder.addClaims(request.claims, this.config.authOptions.clientCapabilities);\r\n }\r\n if (this.config.systemOptions.preventCorsPreflight &&\r\n request.ccsCredential) {\r\n switch (request.ccsCredential.type) {\r\n case CcsCredentialType.HOME_ACCOUNT_ID:\r\n try {\r\n const clientInfo = buildClientInfoFromHomeAccountId(request.ccsCredential.credential);\r\n parameterBuilder.addCcsOid(clientInfo);\r\n }\r\n catch (e) {\r\n this.logger.verbose(\"Could not parse home account ID for CCS Header: \" +\r\n e);\r\n }\r\n break;\r\n case CcsCredentialType.UPN:\r\n parameterBuilder.addCcsUpn(request.ccsCredential.credential);\r\n break;\r\n }\r\n }\r\n if (request.embeddedClientId) {\r\n parameterBuilder.addBrokerParameters({\r\n brokerClientId: this.config.authOptions.clientId,\r\n brokerRedirectUri: this.config.authOptions.redirectUri,\r\n });\r\n }\r\n if (request.tokenBodyParameters) {\r\n parameterBuilder.addExtraQueryParameters(request.tokenBodyParameters);\r\n }\r\n return parameterBuilder.createQueryString();\r\n }\r\n}\n\nexport { RefreshTokenClient };\n//# sourceMappingURL=RefreshTokenClient.mjs.map\n","/*! @azure/msal-common v14.16.1 2025-08-05 */\n'use strict';\nimport { BaseClient } from './BaseClient.mjs';\nimport { wasClockTurnedBack, isTokenExpired } from '../utils/TimeUtils.mjs';\nimport { RefreshTokenClient } from './RefreshTokenClient.mjs';\nimport { ClientAuthError, createClientAuthError } from '../error/ClientAuthError.mjs';\nimport { ResponseHandler } from '../response/ResponseHandler.mjs';\nimport { OIDC_DEFAULT_SCOPES, CacheOutcome } from '../utils/Constants.mjs';\nimport { StringUtils } from '../utils/StringUtils.mjs';\nimport { extractTokenClaims, checkMaxAge } from '../account/AuthToken.mjs';\nimport { PerformanceEvents } from '../telemetry/performance/PerformanceEvent.mjs';\nimport { invokeAsync } from '../utils/FunctionWrappers.mjs';\nimport { getTenantFromAuthorityString } from '../authority/Authority.mjs';\nimport { tokenRefreshRequired, noAccountInSilentRequest, authTimeNotFound } from '../error/ClientAuthErrorCodes.mjs';\n\n/*\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License.\r\n */\r\n/** @internal */\r\nclass SilentFlowClient extends BaseClient {\r\n constructor(configuration, performanceClient) {\r\n super(configuration, performanceClient);\r\n }\r\n /**\r\n * Retrieves a token from cache if it is still valid, or uses the cached refresh token to renew\r\n * the given token and returns the renewed token\r\n * @param request\r\n */\r\n async acquireToken(request) {\r\n try {\r\n const [authResponse, cacheOutcome] = await this.acquireCachedToken({\r\n ...request,\r\n scopes: request.scopes?.length\r\n ? request.scopes\r\n : [...OIDC_DEFAULT_SCOPES],\r\n });\r\n // if the token is not expired but must be refreshed; get a new one in the background\r\n if (cacheOutcome === CacheOutcome.PROACTIVELY_REFRESHED) {\r\n this.logger.info(\"SilentFlowClient:acquireCachedToken - Cached access token's refreshOn property has been exceeded'. It's not expired, but must be refreshed.\");\r\n // refresh the access token in the background\r\n const refreshTokenClient = new RefreshTokenClient(this.config, this.performanceClient);\r\n refreshTokenClient\r\n .acquireTokenByRefreshToken(request)\r\n .catch(() => {\r\n // do nothing, this is running in the background and no action is to be taken upon success or failure\r\n });\r\n }\r\n // return the cached token\r\n return authResponse;\r\n }\r\n catch (e) {\r\n if (e instanceof ClientAuthError &&\r\n e.errorCode === tokenRefreshRequired) {\r\n const refreshTokenClient = new RefreshTokenClient(this.config, this.performanceClient);\r\n return refreshTokenClient.acquireTokenByRefreshToken(request);\r\n }\r\n else {\r\n throw e;\r\n }\r\n }\r\n }\r\n /**\r\n * Retrieves token from cache or throws an error if it must be refreshed.\r\n * @param request\r\n */\r\n async acquireCachedToken(request) {\r\n this.performanceClient?.addQueueMeasurement(PerformanceEvents.SilentFlowClientAcquireCachedToken, request.correlationId);\r\n let lastCacheOutcome = CacheOutcome.NOT_APPLICABLE;\r\n if (request.forceRefresh ||\r\n (!this.config.cacheOptions.claimsBasedCachingEnabled &&\r\n !StringUtils.isEmptyObj(request.claims))) {\r\n // Must refresh due to present force_refresh flag.\r\n this.setCacheOutcome(CacheOutcome.FORCE_REFRESH_OR_CLAIMS, request.correlationId);\r\n throw createClientAuthError(tokenRefreshRequired);\r\n }\r\n // We currently do not support silent flow for account === null use cases; This will be revisited for confidential flow usecases\r\n if (!request.account) {\r\n throw createClientAuthError(noAccountInSilentRequest);\r\n }\r\n const requestTenantId = request.account.tenantId ||\r\n getTenantFromAuthorityString(request.authority);\r\n const tokenKeys = this.cacheManager.getTokenKeys();\r\n const cachedAccessToken = this.cacheManager.getAccessToken(request.account, request, tokenKeys, requestTenantId, this.performanceClient);\r\n if (!cachedAccessToken) {\r\n // must refresh due to non-existent access_token\r\n this.setCacheOutcome(CacheOutcome.NO_CACHED_ACCESS_TOKEN, request.correlationId);\r\n throw createClientAuthError(tokenRefreshRequired);\r\n }\r\n else if (wasClockTurnedBack(cachedAccessToken.cachedAt) ||\r\n isTokenExpired(cachedAccessToken.expiresOn, this.config.systemOptions.tokenRenewalOffsetSeconds)) {\r\n // must refresh due to the expires_in value\r\n this.setCacheOutcome(CacheOutcome.CACHED_ACCESS_TOKEN_EXPIRED, request.correlationId);\r\n throw createClientAuthError(tokenRefreshRequired);\r\n }\r\n else if (cachedAccessToken.refreshOn &&\r\n isTokenExpired(cachedAccessToken.refreshOn, 0)) {\r\n // must refresh (in the background) due to the refresh_in value\r\n lastCacheOutcome = CacheOutcome.PROACTIVELY_REFRESHED;\r\n // don't throw ClientAuthError.createRefreshRequiredError(), return cached token instead\r\n }\r\n const environment = request.authority || this.authority.getPreferredCache();\r\n const cacheRecord = {\r\n account: this.cacheManager.readAccountFromCache(request.account, request.correlationId),\r\n accessToken: cachedAccessToken,\r\n idToken: this.cacheManager.getIdToken(request.account, request.correlationId, tokenKeys, requestTenantId, this.performanceClient),\r\n refreshToken: null,\r\n appMetadata: this.cacheManager.readAppMetadataFromCache(environment),\r\n };\r\n this.setCacheOutcome(lastCacheOutcome, request.correlationId);\r\n if (this.config.serverTelemetryManager) {\r\n this.config.serverTelemetryManager.incrementCacheHits();\r\n }\r\n return [\r\n await invokeAsync(this.generateResultFromCacheRecord.bind(this), PerformanceEvents.SilentFlowClientGenerateResultFromCacheRecord, this.logger, this.performanceClient, request.correlationId)(cacheRecord, request),\r\n lastCacheOutcome,\r\n ];\r\n }\r\n setCacheOutcome(cacheOutcome, correlationId) {\r\n this.serverTelemetryManager?.setCacheOutcome(cacheOutcome);\r\n this.performanceClient?.addFields({\r\n cacheOutcome: cacheOutcome,\r\n }, correlationId);\r\n if (cacheOutcome !== CacheOutcome.NOT_APPLICABLE) {\r\n this.logger.info(`Token refresh is required due to cache outcome: ${cacheOutcome}`);\r\n }\r\n }\r\n /**\r\n * Helper function to build response object from the CacheRecord\r\n * @param cacheRecord\r\n */\r\n async generateResultFromCacheRecord(cacheRecord, request) {\r\n this.performanceClient?.addQueueMeasurement(PerformanceEvents.SilentFlowClientGenerateResultFromCacheRecord, request.correlationId);\r\n let idTokenClaims;\r\n if (cacheRecord.idToken) {\r\n idTokenClaims = extractTokenClaims(cacheRecord.idToken.secret, this.config.cryptoInterface.base64Decode);\r\n }\r\n // token max_age check\r\n if (request.maxAge || request.maxAge === 0) {\r\n const authTime = idTokenClaims?.auth_time;\r\n if (!authTime) {\r\n throw createClientAuthError(authTimeNotFound);\r\n }\r\n checkMaxAge(authTime, request.maxAge);\r\n }\r\n return ResponseHandler.generateAuthenticationResult(this.cryptoUtils, this.authority, cacheRecord, true, request, idTokenClaims);\r\n }\r\n}\n\nexport { SilentFlowClient };\n//# sourceMappingURL=SilentFlowClient.mjs.map\n","/*! @azure/msal-common v14.16.1 2025-08-05 */\n'use strict';\nimport { CacheOutcome, Constants, SERVER_TELEM_CONSTANTS, Separators } from '../../utils/Constants.mjs';\nimport { AuthError } from '../../error/AuthError.mjs';\n\n/*\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License.\r\n */\r\nconst skuGroupSeparator = \",\";\r\nconst skuValueSeparator = \"|\";\r\nfunction makeExtraSkuString(params) {\r\n const { skus, libraryName, libraryVersion, extensionName, extensionVersion, } = params;\r\n const skuMap = new Map([\r\n [0, [libraryName, libraryVersion]],\r\n [2, [extensionName, extensionVersion]],\r\n ]);\r\n let skuArr = [];\r\n if (skus?.length) {\r\n skuArr = skus.split(skuGroupSeparator);\r\n // Ignore invalid input sku param\r\n if (skuArr.length < 4) {\r\n return skus;\r\n }\r\n }\r\n else {\r\n skuArr = Array.from({ length: 4 }, () => skuValueSeparator);\r\n }\r\n skuMap.forEach((value, key) => {\r\n if (value.length === 2 && value[0]?.length && value[1]?.length) {\r\n setSku({\r\n skuArr,\r\n index: key,\r\n skuName: value[0],\r\n skuVersion: value[1],\r\n });\r\n }\r\n });\r\n return skuArr.join(skuGroupSeparator);\r\n}\r\nfunction setSku(params) {\r\n const { skuArr, index, skuName, skuVersion } = params;\r\n if (index >= skuArr.length) {\r\n return;\r\n }\r\n skuArr[index] = [skuName, skuVersion].join(skuValueSeparator);\r\n}\r\n/** @internal */\r\nclass ServerTelemetryManager {\r\n constructor(telemetryRequest, cacheManager) {\r\n this.cacheOutcome = CacheOutcome.NOT_APPLICABLE;\r\n this.cacheManager = cacheManager;\r\n this.apiId = telemetryRequest.apiId;\r\n this.correlationId = telemetryRequest.correlationId;\r\n this.wrapperSKU = telemetryRequest.wrapperSKU || Constants.EMPTY_STRING;\r\n this.wrapperVer = telemetryRequest.wrapperVer || Constants.EMPTY_STRING;\r\n this.telemetryCacheKey =\r\n SERVER_TELEM_CONSTANTS.CACHE_KEY +\r\n Separators.CACHE_KEY_SEPARATOR +\r\n telemetryRequest.clientId;\r\n }\r\n /**\r\n * API to add MSER Telemetry to request\r\n */\r\n generateCurrentRequestHeaderValue() {\r\n const request = `${this.apiId}${SERVER_TELEM_CONSTANTS.VALUE_SEPARATOR}${this.cacheOutcome}`;\r\n const platformFieldsArr = [this.wrapperSKU, this.wrapperVer];\r\n const nativeBrokerErrorCode = this.getNativeBrokerErrorCode();\r\n if (nativeBrokerErrorCode?.length) {\r\n platformFieldsArr.push(`broker_error=${nativeBrokerErrorCode}`);\r\n }\r\n const platformFields = platformFieldsArr.join(SERVER_TELEM_CONSTANTS.VALUE_SEPARATOR);\r\n const regionDiscoveryFields = this.getRegionDiscoveryFields();\r\n const requestWithRegionDiscoveryFields = [\r\n request,\r\n regionDiscoveryFields,\r\n ].join(SERVER_TELEM_CONSTANTS.VALUE_SEPARATOR);\r\n return [\r\n SERVER_TELEM_CONSTANTS.SCHEMA_VERSION,\r\n requestWithRegionDiscoveryFields,\r\n platformFields,\r\n ].join(SERVER_TELEM_CONSTANTS.CATEGORY_SEPARATOR);\r\n }\r\n /**\r\n * API to add MSER Telemetry for the last failed request\r\n */\r\n generateLastRequestHeaderValue() {\r\n const lastRequests = this.getLastRequests();\r\n const maxErrors = ServerTelemetryManager.maxErrorsToSend(lastRequests);\r\n const failedRequests = lastRequests.failedRequests\r\n .slice(0, 2 * maxErrors)\r\n .join(SERVER_TELEM_CONSTANTS.VALUE_SEPARATOR);\r\n const errors = lastRequests.errors\r\n .slice(0, maxErrors)\r\n .join(SERVER_TELEM_CONSTANTS.VALUE_SEPARATOR);\r\n const errorCount = lastRequests.errors.length;\r\n // Indicate whether this header contains all data or partial data\r\n const overflow = maxErrors < errorCount\r\n ? SERVER_TELEM_CONSTANTS.OVERFLOW_TRUE\r\n : SERVER_TELEM_CONSTANTS.OVERFLOW_FALSE;\r\n const platformFields = [errorCount, overflow].join(SERVER_TELEM_CONSTANTS.VALUE_SEPARATOR);\r\n return [\r\n SERVER_TELEM_CONSTANTS.SCHEMA_VERSION,\r\n lastRequests.cacheHits,\r\n failedRequests,\r\n errors,\r\n platformFields,\r\n ].join(SERVER_TELEM_CONSTANTS.CATEGORY_SEPARATOR);\r\n }\r\n /**\r\n * API to cache token failures for MSER data capture\r\n * @param error\r\n */\r\n cacheFailedRequest(error) {\r\n const lastRequests = this.getLastRequests();\r\n if (lastRequests.errors.length >=\r\n SERVER_TELEM_CONSTANTS.MAX_CACHED_ERRORS) {\r\n // Remove a cached error to make room, first in first out\r\n lastRequests.failedRequests.shift(); // apiId\r\n lastRequests.failedRequests.shift(); // correlationId\r\n lastRequests.errors.shift();\r\n }\r\n lastRequests.failedRequests.push(this.apiId, this.correlationId);\r\n if (error instanceof Error && !!error && error.toString()) {\r\n if (error instanceof AuthError) {\r\n if (error.subError) {\r\n lastRequests.errors.push(error.subError);\r\n }\r\n else if (error.errorCode) {\r\n lastRequests.errors.push(error.errorCode);\r\n }\r\n else {\r\n lastRequests.errors.push(error.toString());\r\n }\r\n }\r\n else {\r\n lastRequests.errors.push(error.toString());\r\n }\r\n }\r\n else {\r\n lastRequests.errors.push(SERVER_TELEM_CONSTANTS.UNKNOWN_ERROR);\r\n }\r\n this.cacheManager.setServerTelemetry(this.telemetryCacheKey, lastRequests, this.correlationId);\r\n return;\r\n }\r\n /**\r\n * Update server telemetry cache entry by incrementing cache hit counter\r\n */\r\n incrementCacheHits() {\r\n const lastRequests = this.getLastRequests();\r\n lastRequests.cacheHits += 1;\r\n this.cacheManager.setServerTelemetry(this.telemetryCacheKey, lastRequests, this.correlationId);\r\n return lastRequests.cacheHits;\r\n }\r\n /**\r\n * Get the server telemetry entity from cache or initialize a new one\r\n */\r\n getLastRequests() {\r\n const initialValue = {\r\n failedRequests: [],\r\n errors: [],\r\n cacheHits: 0,\r\n };\r\n const lastRequests = this.cacheManager.getServerTelemetry(this.telemetryCacheKey);\r\n return lastRequests || initialValue;\r\n }\r\n /**\r\n * Remove server telemetry cache entry\r\n */\r\n clearTelemetryCache() {\r\n const lastRequests = this.getLastRequests();\r\n const numErrorsFlushed = ServerTelemetryManager.maxErrorsToSend(lastRequests);\r\n const errorCount = lastRequests.errors.length;\r\n if (numErrorsFlushed === errorCount) {\r\n // All errors were sent on last request, clear Telemetry cache\r\n this.cacheManager.removeItem(this.telemetryCacheKey, this.correlationId);\r\n }\r\n else {\r\n // Partial data was flushed to server, construct a new telemetry cache item with errors that were not flushed\r\n const serverTelemEntity = {\r\n failedRequests: lastRequests.failedRequests.slice(numErrorsFlushed * 2),\r\n errors: lastRequests.errors.slice(numErrorsFlushed),\r\n cacheHits: 0,\r\n };\r\n this.cacheManager.setServerTelemetry(this.telemetryCacheKey, serverTelemEntity, this.correlationId);\r\n }\r\n }\r\n /**\r\n * Returns the maximum number of errors that can be flushed to the server in the next network request\r\n * @param serverTelemetryEntity\r\n */\r\n static maxErrorsToSend(serverTelemetryEntity) {\r\n let i;\r\n let maxErrors = 0;\r\n let dataSize = 0;\r\n const errorCount = serverTelemetryEntity.errors.length;\r\n for (i = 0; i < errorCount; i++) {\r\n // failedRequests parameter contains pairs of apiId and correlationId, multiply index by 2 to preserve pairs\r\n const apiId = serverTelemetryEntity.failedRequests[2 * i] ||\r\n Constants.EMPTY_STRING;\r\n const correlationId = serverTelemetryEntity.failedRequests[2 * i + 1] ||\r\n Constants.EMPTY_STRING;\r\n const errorCode = serverTelemetryEntity.errors[i] || Constants.EMPTY_STRING;\r\n // Count number of characters that would be added to header, each character is 1 byte. Add 3 at the end to account for separators\r\n dataSize +=\r\n apiId.toString().length +\r\n correlationId.toString().length +\r\n errorCode.length +\r\n 3;\r\n if (dataSize < SERVER_TELEM_CONSTANTS.MAX_LAST_HEADER_BYTES) {\r\n // Adding this entry to the header would still keep header size below the limit\r\n maxErrors += 1;\r\n }\r\n else {\r\n break;\r\n }\r\n }\r\n return maxErrors;\r\n }\r\n /**\r\n * Get the region discovery fields\r\n *\r\n * @returns string\r\n */\r\n getRegionDiscoveryFields() {\r\n const regionDiscoveryFields = [];\r\n regionDiscoveryFields.push(this.regionUsed || Constants.EMPTY_STRING);\r\n regionDiscoveryFields.push(this.regionSource || Constants.EMPTY_STRING);\r\n regionDiscoveryFields.push(this.regionOutcome || Constants.EMPTY_STRING);\r\n return regionDiscoveryFields.join(\",\");\r\n }\r\n /**\r\n * Update the region discovery metadata\r\n *\r\n * @param regionDiscoveryMetadata\r\n * @returns void\r\n */\r\n updateRegionDiscoveryMetadata(regionDiscoveryMetadata) {\r\n this.regionUsed = regionDiscoveryMetadata.region_used;\r\n this.regionSource = regionDiscoveryMetadata.region_source;\r\n this.regionOutcome = regionDiscoveryMetadata.region_outcome;\r\n }\r\n /**\r\n * Set cache outcome\r\n */\r\n setCacheOutcome(cacheOutcome) {\r\n this.cacheOutcome = cacheOutcome;\r\n }\r\n setNativeBrokerErrorCode(errorCode) {\r\n const lastRequests = this.getLastRequests();\r\n lastRequests.nativeBrokerErrorCode = errorCode;\r\n this.cacheManager.setServerTelemetry(this.telemetryCacheKey, lastRequests, this.correlationId);\r\n }\r\n getNativeBrokerErrorCode() {\r\n return this.getLastRequests().nativeBrokerErrorCode;\r\n }\r\n clearNativeBrokerErrorCode() {\r\n const lastRequests = this.getLastRequests();\r\n delete lastRequests.nativeBrokerErrorCode;\r\n this.cacheManager.setServerTelemetry(this.telemetryCacheKey, lastRequests, this.correlationId);\r\n }\r\n static makeExtraSkuString(params) {\r\n return makeExtraSkuString(params);\r\n }\r\n}\n\nexport { ServerTelemetryManager };\n//# sourceMappingURL=ServerTelemetryManager.mjs.map\n",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null],"names":["Constants","LogLevel","name","version","DEFAULT_SYSTEM_OPTIONS","DEFAULT_CACHE_OPTIONS","DEFAULT_TELEMETRY_OPTIONS","ManagedIdentityErrorCodes.invalidFileExtension","ManagedIdentityErrorCodes.invalidFilePath","ManagedIdentityErrorCodes.invalidManagedIdentityIdType","ManagedIdentityErrorCodes.invalidSecret","ManagedIdentityErrorCodes.platformNotSupported","ManagedIdentityErrorCodes.missingId","ManagedIdentityErrorCodes.MsiEnvironmentVariableUrlMalformedErrorCodes","ManagedIdentityErrorCodes.networkUnavailable","ManagedIdentityErrorCodes.unableToCreateAzureArc","ManagedIdentityErrorCodes.unableToCreateCloudShell","ManagedIdentityErrorCodes.unableToCreateSource","ManagedIdentityErrorCodes.unableToReadSecretFile","ManagedIdentityErrorCodes.userAssignedNotAvailableAtRuntime","ManagedIdentityErrorCodes.wwwAuthenticateHeaderMissing","ManagedIdentityErrorCodes.wwwAuthenticateHeaderUnsupportedFormat","uuidv4","CacheHelpers.isIdTokenEntity","CacheHelpers.isAccessTokenEntity","CacheHelpers.isRefreshTokenEntity","CacheHelpers.isAppMetadataEntity","CacheHelpers.generateCredentialKey","CacheHelpers.generateAppMetadataKey","CacheHelpers.isServerTelemetryEntity","CacheHelpers.isAuthorityMetadataEntity","CacheHelpers.isThrottlingEntity","ClientAuthErrorCodes.invalidAssertion","TimeUtils.nowSeconds","ClientAuthErrorCodes.stateMismatch","NodeConstants","AuthorityFactory.createDiscoveredInstance","CommonConstants","UrlUtils.getDeserializedResponse","ClientAuthErrorCodes.deviceCodePollingCancelled","ClientAuthErrorCodes.userTimeoutReached","ClientAuthErrorCodes.deviceCodeExpired","TimeUtils.delay","AuthErrorCodes.postRequestFailed","ClientAuthErrorCodes.deviceCodeUnknownError","AADServerParamKeys.X_CLIENT_EXTRA_SKU","TimeUtils.isTokenExpired","ClientAuthErrorCodes.multipleMatchingTokens","ClientAuthErrorCodes.tokenRefreshRequired","AuthToken.extractTokenClaims","AADServerParamKeys.ON_BEHALF_OF","ClientAuthErrorCodes.missingTenantIdError","ClientAuthErrorCodes.invalidClientCredential","ClientAuthErrorCodes.networkError","ManagedIdentityErrorCodes\r\n .MsiEnvironmentVariableUrlMalformedErrorCodes","accessSync","fsConstants","statSync","readFileSync","ClientConfigurationErrorCodes.urlEmptyError"],"mappings":";;;;;;;;;;;;AAAA;;;AAGG;AAmBH;;;AAGG;MACU,UAAU,CAAA;AACnB;;;AAGG;IACH,OAAO,iBAAiB,CAAC,IAAe,EAAA;AACpC,QAAA,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;KAC/B;AAED;;;AAGG;IACH,OAAO,iBAAiB,CACpB,QAAsB,EAAA;QAEtB,MAAM,QAAQ,GAA4C,EAAE,CAAC;QAC7D,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,GAAG,CAAC,UAAU,GAAG,EAAA;AACnC,YAAA,MAAM,aAAa,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC;YACpC,QAAQ,CAAC,GAAG,CAAC,GAAG;gBACZ,eAAe,EAAE,aAAa,CAAC,aAAa;gBAC5C,WAAW,EAAE,aAAa,CAAC,WAAW;gBACtC,KAAK,EAAE,aAAa,CAAC,KAAK;gBAC1B,gBAAgB,EAAE,aAAa,CAAC,cAAc;gBAC9C,QAAQ,EAAE,aAAa,CAAC,QAAQ;gBAChC,cAAc,EAAE,aAAa,CAAC,aAAa;gBAC3C,IAAI,EAAE,aAAa,CAAC,IAAI;gBACxB,WAAW,EAAE,aAAa,CAAC,UAAU;gBACrC,sBAAsB,EAAE,aAAa,CAAC,oBAAoB;gBAC1D,qBAAqB,EAAE,aAAa,CAAC,mBAAmB;gBACxD,cAAc,EAAE,aAAa,CAAC,cAAc,EAAE,GAAG,CAC7C,CAAC,aAAa,KAAI;AACd,oBAAA,OAAO,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC;AACzC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AM,iBAAiB,CAC1B,YAA+B,EAAA;QAE/B,MAAM,YAAY,GAAG,MAAM,IAAI,CAAC,gBAAgB,CAAC,MAAM,EAAE,CAAC;QAC1D,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;AACtD,QAAA,YAAY,CAAC,UAAU,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC;KAClD;AAED;;;AAGG;IACI,MAAM,gBAAgB,CACzB,YAA+B,EAAA;QAE/B,IAAI,YAAY,CAAC,eAAe,EAAE;YAC9B,MAAM,OAAO,GACT,YAAY,CAAC,UAChB,CAAC,UAAU,EAAE,CAAC;YACf,MAAM,eAAe,GAAG,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC,KAAK,KACxD,aAAa,CAAC,eAAe,CAAC,KAAe,CAAC,CACjD,CAAC;AAEF,YAAA,IAAI,YAAoB,CAAC;AACzB,YAAA,IAAI,eAAe,CAAC,MAAM,GAAG,CAAC,EAAE;AAC5B,gBAAA,MAAM,aAAa,GAAG,eAAe,CAAC,CAAC,CAAkB,CAAC;gBAC1D,YAAY,GAAG,MAAM,IAAI,CAAC,gBAAgB,CAAC,UAAU,CACjD,aAAa,CAChB,CAAC;AACL,aAAA;AAAM,iBAAA;gBACH,YAAY,GAAG,MAAM,IAAI,CAAC,gBAAgB,CAAC,MAAM,EAAE,CAAC;AACvD,aAAA;AAED,YAAA,MAAM,IAAI,CAAC,MAAM,CAAC,GAAG,CACjB,YAAY,EACZ,YAAY,CAAC,UAAU,CAAC,SAAS,EAAE,CACtC,CAAC;AACL,SAAA;KACJ;AACJ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/package.json b/PBandGraphScaffold/node_modules/@azure/msal-node/lib/package.json deleted file mode 100644 index 0292b99..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/package.json +++ /dev/null @@ -1 +0,0 @@ -{"type":"commonjs"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/cache/ITokenCache.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/cache/ITokenCache.d.ts deleted file mode 100644 index 34a48ed..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/cache/ITokenCache.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { AccountInfo } from "@azure/msal-common/node"; -/** - * Token cache interface for the client, giving access to cache APIs - * @public - */ -export interface ITokenCache { - /** API that retrieves all accounts currently in cache to the user */ - getAllAccounts(): Promise; - /** Returns the signed in account matching homeAccountId */ - getAccountByHomeId(homeAccountId: string): Promise; - /** Returns the signed in account matching localAccountId */ - getAccountByLocalId(localAccountId: string): Promise; - /** API to remove a specific account and the relevant data from cache */ - removeAccount(account: AccountInfo): Promise; -} -//# sourceMappingURL=ITokenCache.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/cache/ITokenCache.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/cache/ITokenCache.d.ts.map deleted file mode 100644 index 9761c6a..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/cache/ITokenCache.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ITokenCache.d.ts","sourceRoot":"","sources":["../../../src/cache/ITokenCache.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAEtD;;;GAGG;AACH,MAAM,WAAW,WAAW;IACxB,qEAAqE;IACrE,cAAc,IAAI,OAAO,CAAC,WAAW,EAAE,CAAC,CAAC;IAEzC,2DAA2D;IAC3D,kBAAkB,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;IAEvE,4DAA4D;IAC5D,mBAAmB,CAAC,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;IAEzE,wEAAwE;IACxE,aAAa,CAAC,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACtD"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/cache/NodeStorage.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/cache/NodeStorage.d.ts deleted file mode 100644 index 49c6a4e..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/cache/NodeStorage.d.ts +++ /dev/null @@ -1,194 +0,0 @@ -import { TokenKeys, AccountEntity, IdTokenEntity, AccessTokenEntity, RefreshTokenEntity, AppMetadataEntity, ServerTelemetryEntity, ThrottlingEntity, CacheManager, Logger, ValidCacheType, ICrypto, AuthorityMetadataEntity, ValidCredentialType, StaticAuthorityOptions } from "@azure/msal-common/node"; -import { InMemoryCache, JsonCache, CacheKVStore } from "./serializer/SerializerTypes.js"; -/** - * This class implements Storage for node, reading cache from user specified storage location or an extension library - * @public - */ -export declare class NodeStorage extends CacheManager { - private logger; - private cache; - private changeEmitters; - constructor(logger: Logger, clientId: string, cryptoImpl: ICrypto, staticAuthorityOptions?: StaticAuthorityOptions); - /** - * Queue up callbacks - * @param func - a callback function for cache change indication - */ - registerChangeEmitter(func: () => void): void; - /** - * Invoke the callback when cache changes - */ - emitChange(): void; - /** - * Converts cacheKVStore to InMemoryCache - * @param cache - key value store - */ - cacheToInMemoryCache(cache: CacheKVStore): InMemoryCache; - /** - * converts inMemoryCache to CacheKVStore - * @param inMemoryCache - kvstore map for inmemory - */ - inMemoryCacheToCache(inMemoryCache: InMemoryCache): CacheKVStore; - /** - * gets the current in memory cache for the client - */ - getInMemoryCache(): InMemoryCache; - /** - * sets the current in memory cache for the client - * @param inMemoryCache - key value map in memory - */ - setInMemoryCache(inMemoryCache: InMemoryCache): void; - /** - * get the current cache key-value store - */ - getCache(): CacheKVStore; - /** - * sets the current cache (key value store) - * @param cacheMap - key value map - */ - setCache(cache: CacheKVStore): void; - /** - * Gets cache item with given key. - * @param key - lookup key for the cache entry - */ - getItem(key: string): ValidCacheType; - /** - * Gets cache item with given key-value - * @param key - lookup key for the cache entry - * @param value - value of the cache entry - */ - setItem(key: string, value: ValidCacheType): void; - getAccountKeys(): string[]; - getTokenKeys(): TokenKeys; - /** - * fetch the account entity - * @param accountKey - lookup key to fetch cache type AccountEntity - */ - getAccount(accountKey: string): AccountEntity | null; - /** - * Reads account from cache, builds it into an account entity and returns it. - * @param accountKey - lookup key to fetch cache type AccountEntity - * @returns - */ - getCachedAccountEntity(accountKey: string): AccountEntity | null; - /** - * set account entity - * @param account - cache value to be set of type AccountEntity - */ - setAccount(account: AccountEntity): void; - /** - * fetch the idToken credential - * @param idTokenKey - lookup key to fetch cache type IdTokenEntity - */ - getIdTokenCredential(idTokenKey: string): IdTokenEntity | null; - /** - * set idToken credential - * @param idToken - cache value to be set of type IdTokenEntity - */ - setIdTokenCredential(idToken: IdTokenEntity): void; - /** - * fetch the accessToken credential - * @param accessTokenKey - lookup key to fetch cache type AccessTokenEntity - */ - getAccessTokenCredential(accessTokenKey: string): AccessTokenEntity | null; - /** - * set accessToken credential - * @param accessToken - cache value to be set of type AccessTokenEntity - */ - setAccessTokenCredential(accessToken: AccessTokenEntity): void; - /** - * fetch the refreshToken credential - * @param refreshTokenKey - lookup key to fetch cache type RefreshTokenEntity - */ - getRefreshTokenCredential(refreshTokenKey: string): RefreshTokenEntity | null; - /** - * set refreshToken credential - * @param refreshToken - cache value to be set of type RefreshTokenEntity - */ - setRefreshTokenCredential(refreshToken: RefreshTokenEntity): void; - /** - * fetch appMetadata entity from the platform cache - * @param appMetadataKey - lookup key to fetch cache type AppMetadataEntity - */ - getAppMetadata(appMetadataKey: string): AppMetadataEntity | null; - /** - * set appMetadata entity to the platform cache - * @param appMetadata - cache value to be set of type AppMetadataEntity - */ - setAppMetadata(appMetadata: AppMetadataEntity): void; - /** - * fetch server telemetry entity from the platform cache - * @param serverTelemetrykey - lookup key to fetch cache type ServerTelemetryEntity - */ - getServerTelemetry(serverTelemetrykey: string): ServerTelemetryEntity | null; - /** - * set server telemetry entity to the platform cache - * @param serverTelemetryKey - lookup key to fetch cache type ServerTelemetryEntity - * @param serverTelemetry - cache value to be set of type ServerTelemetryEntity - */ - setServerTelemetry(serverTelemetryKey: string, serverTelemetry: ServerTelemetryEntity): void; - /** - * fetch authority metadata entity from the platform cache - * @param key - lookup key to fetch cache type AuthorityMetadataEntity - */ - getAuthorityMetadata(key: string): AuthorityMetadataEntity | null; - /** - * Get all authority metadata keys - */ - getAuthorityMetadataKeys(): Array; - /** - * set authority metadata entity to the platform cache - * @param key - lookup key to fetch cache type AuthorityMetadataEntity - * @param metadata - cache value to be set of type AuthorityMetadataEntity - */ - setAuthorityMetadata(key: string, metadata: AuthorityMetadataEntity): void; - /** - * fetch throttling entity from the platform cache - * @param throttlingCacheKey - lookup key to fetch cache type ThrottlingEntity - */ - getThrottlingCache(throttlingCacheKey: string): ThrottlingEntity | null; - /** - * set throttling entity to the platform cache - * @param throttlingCacheKey - lookup key to fetch cache type ThrottlingEntity - * @param throttlingCache - cache value to be set of type ThrottlingEntity - */ - setThrottlingCache(throttlingCacheKey: string, throttlingCache: ThrottlingEntity): void; - /** - * Removes the cache item from memory with the given key. - * @param key - lookup key to remove a cache entity - * @param inMemory - key value map of the cache - */ - removeItem(key: string): boolean; - /** - * Remove account entity from the platform cache if it's outdated - * @param accountKey - lookup key to fetch cache type AccountEntity - */ - removeOutdatedAccount(accountKey: string): void; - /** - * Checks whether key is in cache. - * @param key - look up key for a cache entity - */ - containsKey(key: string): boolean; - /** - * Gets all keys in window. - */ - getKeys(): string[]; - /** - * Clears all cache entries created by MSAL (except tokens). - */ - clear(): void; - /** - * Initialize in memory cache from an exisiting cache vault - * @param cache - blob formatted cache (JSON) - */ - static generateInMemoryCache(cache: string): InMemoryCache; - /** - * retrieves the final JSON - * @param inMemoryCache - itemised cache read from the JSON - */ - static generateJsonCache(inMemoryCache: InMemoryCache): JsonCache; - /** - * Updates a credential's cache key if the current cache key is outdated - */ - updateCredentialCacheKey(currentCacheKey: string, credential: ValidCredentialType): string; -} -//# sourceMappingURL=NodeStorage.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/cache/NodeStorage.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/cache/NodeStorage.d.ts.map deleted file mode 100644 index 6775e5c..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/cache/NodeStorage.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"NodeStorage.d.ts","sourceRoot":"","sources":["../../../src/cache/NodeStorage.ts"],"names":[],"mappings":"AAKA,OAAO,EACH,SAAS,EACT,aAAa,EACb,aAAa,EACb,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EACjB,qBAAqB,EACrB,gBAAgB,EAChB,YAAY,EACZ,MAAM,EACN,cAAc,EACd,OAAO,EACP,uBAAuB,EACvB,mBAAmB,EACnB,sBAAsB,EAEzB,MAAM,yBAAyB,CAAC;AAIjC,OAAO,EACH,aAAa,EACb,SAAS,EACT,YAAY,EACf,MAAM,iCAAiC,CAAC;AAEzC;;;GAGG;AACH,qBAAa,WAAY,SAAQ,YAAY;IAEzC,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,KAAK,CAAoB;IACjC,OAAO,CAAC,cAAc,CAAuB;gBAGzC,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,EAChB,UAAU,EAAE,OAAO,EACnB,sBAAsB,CAAC,EAAE,sBAAsB;IAMnD;;;OAGG;IACH,qBAAqB,CAAC,IAAI,EAAE,MAAM,IAAI,GAAG,IAAI;IAI7C;;OAEG;IACH,UAAU,IAAI,IAAI;IAIlB;;;OAGG;IACH,oBAAoB,CAAC,KAAK,EAAE,YAAY,GAAG,aAAa;IAgCx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modules/@azure/msal-node/lib/types/cache/TokenCache.d.ts deleted file mode 100644 index ba8ca45..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/cache/TokenCache.d.ts +++ /dev/null @@ -1,91 +0,0 @@ -import { NodeStorage } from "./NodeStorage.js"; -import { AccountInfo, Logger, ISerializableTokenCache, ICachePlugin } from "@azure/msal-common/node"; -import { CacheKVStore } from "./serializer/SerializerTypes.js"; -import { ITokenCache } from "./ITokenCache.js"; -/** - * In-memory token cache manager - * @public - */ -export declare class TokenCache implements ISerializableTokenCache, ITokenCache { - private storage; - private cacheHasChanged; - private cacheSnapshot; - private readonly persistence; - private logger; - constructor(storage: NodeStorage, logger: Logger, cachePlugin?: ICachePlugin); - /** - * Set to true if cache state has changed since last time serialize or writeToPersistence was called - */ - hasChanged(): boolean; - /** - * Serializes in memory cache to JSON - */ - serialize(): string; - /** - * Deserializes JSON to in-memory cache. JSON should be in MSAL cache schema format - * @param cache - blob formatted cache - */ - deserialize(cache: string): void; - /** - * Fetches the cache key-value map - */ - getKVStore(): CacheKVStore; - /** - * API that retrieves all accounts currently in cache to the user - */ - getAllAccounts(correlationId?: string): Promise; - /** - * Returns the signed in account matching homeAccountId. - * (the account object is created at the time of successful login) - * or null when no matching account is found - * @param homeAccountId - unique identifier for an account (uid.utid) - */ - getAccountByHomeId(homeAccountId: string): Promise; - /** - * Returns the signed in account matching localAccountId. - * (the account object is created at the time of successful login) - * or null when no matching account is found - * @param localAccountId - unique identifier of an account (sub/obj when homeAccountId cannot be populated) - */ - getAccountByLocalId(localAccountId: string): Promise; - /** - * API to remove a specific account and the relevant data from cache - * @param account - AccountInfo passed by the user - */ - removeAccount(account: AccountInfo, correlationId?: string): Promise; - /** - * Called when the cache has changed state. - */ - private handleChangeEvent; - /** - * Merge in memory cache with the cache snapshot. - * @param oldState - cache before changes - * @param currentState - current cache state in the library - */ - private mergeState; - /** - * Deep update of oldState based on newState values - * @param oldState - cache before changes - * @param newState - updated cache - */ - private mergeUpdates; - /** - * Removes entities in oldState that the were removed from newState. If there are any unknown values in root of - * oldState that are not recognized, they are left untouched. - * @param oldState - cache before changes - * @param newState - updated cache - */ - private mergeRemovals; - /** - * Helper to merge new cache with the old one - * @param oldState - cache before changes - * @param newState - updated cache - */ - private mergeRemovalsDict; - /** - * Helper to overlay as a part of cache merge - * @param passedInCache - cache read from the blob - */ - private overlayDefaults; -} -//# sourceMappingURL=TokenCache.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/cache/TokenCache.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/cache/TokenCache.d.ts.map deleted file mode 100644 index 236dd2d..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/cache/TokenCache.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"TokenCache.d.ts","sourceRoot":"","sources":["../../../src/cache/TokenCache.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAEH,WAAW,EACX,MAAM,EACN,uBAAuB,EACvB,YAAY,EAEf,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAQH,YAAY,EACf,MAAM,iCAAiC,CAAC;AAGzC,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAW/C;;;GAGG;AACH,qBAAa,UAAW,YAAW,uBAAuB,EAAE,WAAW;IACnE,OAAO,CAAC,OAAO,CAAc;IAC7B,OAAO,CAAC,eAAe,CAAU;IACjC,OAAO,CAAC,aAAa,CAAS;IAC9B,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAe;IAC3C,OAAO,CAAC,MAAM,CAAS;gBAGnB,OAAO,EAAE,WAAW,EACpB,MAAM,EAAE,MAAM,EACd,WAAW,CAAC,EAAE,YAAY;IAW9B;;OAEG;IACH,UAAU,IAAI,OAAO;IAIrB;;OAEG;IACH,SAAS,IAAI,MAAM;IAqBnB;;;OAGG;IACH,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAehC;;OAEG;IACH,UAAU,IAAI,YAAY;IAI1B;;OAEG;IACG,cAAc,CAChB,aAAa,GAAE,MAA6C,GAC7D,OAAO,CAAC,WAAW,EAAE,CAAC;IAgBzB;;;;;OAKG;IACG,kBAAkB,CACpB,aAAa,EAAE,MAAM,GACtB,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC;IAa9B;;;;;OAKG;IACG,mBAAmB,CACrB,cAAc,EAAE,MAAM,GACvB,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC;IAa9B;;;OAGG;IACG,aAAa,CACf,OAAO,EAAE,WAAW,EACpB,aAAa,GAAE,MAA6C,GAC7D,OAAO,CAAC,IAAI,CAAC;IAmBhB;;OAEG;IACH,OAAO,CAAC,iBAAiB;IAIzB;;;;OAIG;IACH,OAAO,CAAC,UAAU;IASlB;;;;OAIG;IACH,OAAO,CAAC,YAAY;IAkCpB;;;;;OAKG;IACH,OAAO,CAAC,aAAa;IA2CrB;;;;OAIG;IACH,OAAO,CAAC,iBAAiB;IAazB;;;OAGG;IACH,OAAO,CAAC,eAAe;CAyB1B"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/cache/distributed/DistributedCachePlugin.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/cache/distributed/DistributedCachePlugin.d.ts deleted file mode 100644 index 2c92fc3..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/cache/distributed/DistributedCachePlugin.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { ICachePlugin, TokenCacheContext } from "@azure/msal-common/node"; -import { IPartitionManager } from "./IPartitionManager.js"; -import { ICacheClient } from "./ICacheClient.js"; -/** - * Cache plugin that serializes data to the cache and deserializes data from the cache - * @public - */ -export declare class DistributedCachePlugin implements ICachePlugin { - private client; - private partitionManager; - constructor(client: ICacheClient, partitionManager: IPartitionManager); - /** - * Deserializes the cache before accessing it - * @param cacheContext - TokenCacheContext - */ - beforeCacheAccess(cacheContext: TokenCacheContext): Promise; - /** - * Serializes the cache after accessing it - * @param cacheContext - TokenCacheContext - */ - afterCacheAccess(cacheContext: TokenCacheContext): Promise; -} -//# sourceMappingURL=DistributedCachePlugin.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/cache/distributed/DistributedCachePlugin.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/cache/distributed/DistributedCachePlugin.d.ts.map deleted file mode 100644 index c6928c4..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/cache/distributed/DistributedCachePlugin.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"DistributedCachePlugin.d.ts","sourceRoot":"","sources":["../../../../src/cache/distributed/DistributedCachePlugin.ts"],"names":[],"mappings":"AAKA,OAAO,EAEH,YAAY,EACZ,iBAAiB,EACpB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEjD;;;GAGG;AACH,qBAAa,sBAAuB,YAAW,YAAY;IACvD,OAAO,CAAC,MAAM,CAAe;IAC7B,OAAO,CAAC,gBAAgB,CAAoB;gBAEhC,MAAM,EAAE,YAAY,EAAE,gBAAgB,EAAE,iBAAiB;IAKrE;;;OAGG;IACU,iBAAiB,CAC1B,YAAY,EAAE,iBAAiB,GAChC,OAAO,CAAC,IAAI,CAAC;IAMhB;;;OAGG;IACU,gBAAgB,CACzB,YAAY,EAAE,iBAAiB,GAChC,OAAO,CAAC,IAAI,CAAC;CAyBnB"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/cache/distributed/ICacheClient.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/cache/distributed/ICacheClient.d.ts deleted file mode 100644 index 033f806..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/cache/distributed/ICacheClient.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * Interface for the cache that defines a getter and setter - * @public - */ -export interface ICacheClient { - /** - * Retrieve the value from the cache - * - * @param key - key of item in the cache - * @returns Promise - */ - get(key: string): Promise; - /** - * Save the required value using the provided key to cache - * - * @param key - key of item in the cache - * @param value - value of item to be saved in the cache - * @returns Promise - */ - set(key: string, value: string): Promise; -} -//# sourceMappingURL=ICacheClient.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/cache/distributed/ICacheClient.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/cache/distributed/ICacheClient.d.ts.map deleted file mode 100644 index 5fc1942..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/cache/distributed/ICacheClient.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ICacheClient.d.ts","sourceRoot":"","sources":["../../../../src/cache/distributed/ICacheClient.ts"],"names":[],"mappings":"AAKA;;;GAGG;AACH,MAAM,WAAW,YAAY;IACzB;;;;;OAKG;IACH,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAElC;;;;;;OAMG;IACH,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;CACpD"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/cache/distributed/IPartitionManager.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/cache/distributed/IPartitionManager.d.ts deleted file mode 100644 index 55c0e6a..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/cache/distributed/IPartitionManager.d.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { AccountEntity } from "@azure/msal-common/node"; -/** - * Interface that defines getter methods to get keys used to identity data in the cache - * @public - */ -export interface IPartitionManager { - /** - * This function should return the correct key from which to read - * the specific user's information from cache. - * - * Example: Your application may be partitioning the user's cache - * information for each user using the homeAccountId and thus - * this function would return the homeAccountId for - * the user in question - * - * @returns Promise - */ - getKey(): Promise; - /** - * This function should return the correct key being used to save each - * user's cache information to cache - given an AccountEntity - * - * Example: Your application may be partitioning the user's cache - * information for each user using the homeAccountId thus - * this function would return the homeAccountId from - * the provided AccountEntity - * - * @param accountEntity - AccountEntity - * @returns Promise - */ - extractKey(accountEntity: AccountEntity): Promise; -} -//# sourceMappingURL=IPartitionManager.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/cache/distributed/IPartitionManager.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/cache/distributed/IPartitionManager.d.ts.map deleted file mode 100644 index 4977b3c..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/cache/distributed/IPartitionManager.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"IPartitionManager.d.ts","sourceRoot":"","sources":["../../../../src/cache/distributed/IPartitionManager.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAExD;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAC9B;;;;;;;;;;OAUG;IACH,MAAM,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IAE1B;;;;;;;;;;;OAWG;IACH,UAAU,CAAC,aAAa,EAAE,aAAa,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;CAC7D"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/cache/serializer/Deserializer.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/cache/serializer/Deserializer.d.ts deleted file mode 100644 index 57c3510..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/cache/serializer/Deserializer.d.ts +++ /dev/null @@ -1,44 +0,0 @@ -import { AccountCache, IdTokenCache, AccessTokenCache, RefreshTokenCache, AppMetadataCache } from "@azure/msal-common/node"; -import { JsonCache, InMemoryCache, SerializedAccountEntity, SerializedIdTokenEntity, SerializedAccessTokenEntity, SerializedRefreshTokenEntity, SerializedAppMetadataEntity } from "./SerializerTypes.js"; -/** - * This class deserializes cache entities read from the file into in-memory object types defined internally - * @internal - */ -export declare class Deserializer { - /** - * Parse the JSON blob in memory and deserialize the content - * @param cachedJson - JSON blob cache - */ - static deserializeJSONBlob(jsonFile: string): JsonCache; - /** - * Deserializes accounts to AccountEntity objects - * @param accounts - accounts of type SerializedAccountEntity - */ - static deserializeAccounts(accounts: Record): AccountCache; - /** - * Deserializes id tokens to IdTokenEntity objects - * @param idTokens - credentials of type SerializedIdTokenEntity - */ - static deserializeIdTokens(idTokens: Record): IdTokenCache; - /** - * Deserializes access tokens to AccessTokenEntity objects - * @param accessTokens - access tokens of type SerializedAccessTokenEntity - */ - static deserializeAccessTokens(accessTokens: Record): AccessTokenCache; - /** - * Deserializes refresh tokens to RefreshTokenEntity objects - * @param refreshTokens - refresh tokens of type SerializedRefreshTokenEntity - */ - static deserializeRefreshTokens(refreshTokens: Record): RefreshTokenCache; - /** - * Deserializes appMetadata to AppMetaData objects - * @param appMetadata - app metadata of type SerializedAppMetadataEntity - */ - static deserializeAppMetadata(appMetadata: Record): AppMetadataCache; - /** - * Deserialize an inMemory Cache - * @param jsonCache - JSON blob cache - */ - static deserializeAllCache(jsonCache: JsonCache): InMemoryCache; -} -//# sourceMappingURL=Deserializer.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/cache/serializer/Deserializer.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/cache/serializer/Deserializer.d.ts.map deleted file mode 100644 index 8d8a2e5..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/cache/serializer/Deserializer.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Deserializer.d.ts","sourceRoot":"","sources":["../../../../src/cache/serializer/Deserializer.ts"],"names":[],"mappings":"AAKA,OAAO,EACH,YAAY,EACZ,YAAY,EACZ,gBAAgB,EAChB,iBAAiB,EACjB,gBAAgB,EAQnB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACH,SAAS,EACT,aAAa,EACb,uBAAuB,EACvB,uBAAuB,EACvB,2BAA2B,EAC3B,4BAA4B,EAC5B,2BAA2B,EAC9B,MAAM,sBAAsB,CAAC;AAE9B;;;GAGG;AACH,qBAAa,YAAY;IACrB;;;OAGG;IACH,MAAM,CAAC,mBAAmB,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS;IAKvD;;;OAGG;IACH,MAAM,CAAC,mBAAmB,CACtB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,uBAAuB,CAAC,GAClD,YAAY;IA+Bf;;;OAGG;IACH,MAAM,CAAC,mBAAmB,CACtB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,uBAAuB,CAAC,GAClD,YAAY;IAoBf;;;OAGG;IACH,MAAM,CAAC,uBAAuB,CAC1B,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,2BAA2B,CAAC,GAC1D,gBAAgB;IA+BnB;;;OAGG;IACH,MAAM,CAAC,wBAAwB,CAC3B,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,4BAA4B,CAAC,GAC5D,iBAAiB;IAuBpB;;;OAGG;IACH,MAAM,CAAC,sBAAsB,CACzB,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,2BAA2B,CAAC,GACzD,gBAAgB;IAgBnB;;;OAGG;IACH,MAAM,CAAC,mBAAmB,CAAC,SAAS,EAAE,SAAS,GAAG,aAAa;CAmBlE"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/cache/serializer/Serializer.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/cache/serializer/Serializer.d.ts deleted file mode 100644 index 43ffcfa..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/cache/serializer/Serializer.d.ts +++ /dev/null @@ -1,44 +0,0 @@ -import { AccountCache, IdTokenCache, AccessTokenCache, RefreshTokenCache, AppMetadataCache } from "@azure/msal-common/node"; -import { InMemoryCache, JsonCache, SerializedAccountEntity, SerializedIdTokenEntity, SerializedAccessTokenEntity, SerializedRefreshTokenEntity, SerializedAppMetadataEntity } from "./SerializerTypes.js"; -/** - * This class serializes cache entities to be saved into in-memory object types defined internally - * @internal - */ -export declare class Serializer { - /** - * serialize the JSON blob - * @param data - JSON blob cache - */ - static serializeJSONBlob(data: JsonCache): string; - /** - * Serialize Accounts - * @param accCache - cache of accounts - */ - static serializeAccounts(accCache: AccountCache): Record; - /** - * Serialize IdTokens - * @param idTCache - cache of ID tokens - */ - static serializeIdTokens(idTCache: IdTokenCache): Record; - /** - * Serializes AccessTokens - * @param atCache - cache of access tokens - */ - static serializeAccessTokens(atCache: AccessTokenCache): Record; - /** - * Serialize refreshTokens - * @param rtCache - cache of refresh tokens - */ - static serializeRefreshTokens(rtCache: RefreshTokenCache): Record; - /** - * Serialize amdtCache - * @param amdtCache - cache of app metadata - */ - static serializeAppMetadata(amdtCache: AppMetadataCache): Record; - /** - * Serialize the cache - * @param inMemCache - itemised cache read from the JSON - */ - static serializeAllCache(inMemCache: InMemoryCache): JsonCache; -} -//# sourceMappingURL=Serializer.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/cache/serializer/Serializer.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/cache/serializer/Serializer.d.ts.map deleted file mode 100644 index d469e5c..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/cache/serializer/Serializer.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Serializer.d.ts","sourceRoot":"","sources":["../../../../src/cache/serializer/Serializer.ts"],"names":[],"mappings":"AAKA,OAAO,EACH,YAAY,EACZ,YAAY,EACZ,gBAAgB,EAChB,iBAAiB,EACjB,gBAAgB,EACnB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACH,aAAa,EACb,SAAS,EACT,uBAAuB,EACvB,uBAAuB,EACvB,2BAA2B,EAC3B,4BAA4B,EAC5B,2BAA2B,EAC9B,MAAM,sBAAsB,CAAC;AAE9B;;;GAGG;AACH,qBAAa,UAAU;IACnB;;;OAGG;IACH,MAAM,CAAC,iBAAiB,CAAC,IAAI,EAAE,SAAS,GAAG,MAAM;IAIjD;;;OAGG;IACH,MAAM,CAAC,iBAAiB,CACpB,QAAQ,EAAE,YAAY,GACvB,MAAM,CAAC,MAAM,EAAE,uBAAuB,CAAC;IA0B1C;;;OAGG;IACH,MAAM,CAAC,iBAAiB,CACpB,QAAQ,EAAE,YAAY,GACvB,MAAM,CAAC,MAAM,EAAE,uBAAuB,CAAC;IAiB1C;;;OAGG;IACH,MAAM,CAAC,qBAAqB,CACxB,OAAO,EAAE,gBAAgB,GAC1B,MAAM,CAAC,MAAM,EAAE,2BAA2B,CAAC;IA2B9C;;;OAGG;IACH,MAAM,CAAC,sBAAsB,CACzB,OAAO,EAAE,iBAAiB,GAC3B,MAAM,CAAC,MAAM,EAAE,4BAA4B,CAAC;IAmB/C;;;OAGG;IACH,MAAM,CAAC,oBAAoB,CACvB,SAAS,EAAE,gBAAgB,GAC5B,MAAM,CAAC,MAAM,EAAE,2BAA2B,CAAC;IAc9C;;;OAGG;IACH,MAAM,CAAC,iBAAiB,CAAC,UAAU,EAAE,aAAa,GAAG,SAAS;CASjE"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/cache/serializer/SerializerTypes.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/cache/serializer/SerializerTypes.d.ts deleted file mode 100644 index 08e528f..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/cache/serializer/SerializerTypes.d.ts +++ /dev/null @@ -1,103 +0,0 @@ -import { AccountCache, IdTokenCache, AccessTokenCache, RefreshTokenCache, AppMetadataCache, ValidCacheType } from "@azure/msal-common/node"; -/** - * Key value store for in-memory cache - * @public - */ -export type CacheKVStore = Record; -/** - * Cache format read from the cache blob provided to the configuration during app instantiation - * @public - */ -export type JsonCache = { - Account: Record; - IdToken: Record; - AccessToken: Record; - RefreshToken: Record; - AppMetadata: Record; -}; -/** - * Intermittent type to handle in-memory data objects with defined types - * @public - */ -export type InMemoryCache = { - accounts: AccountCache; - idTokens: IdTokenCache; - accessTokens: AccessTokenCache; - refreshTokens: RefreshTokenCache; - appMetadata: AppMetadataCache; -}; -/** - * Account type - * @public - */ -export type SerializedAccountEntity = { - home_account_id: string; - environment: string; - realm: string; - local_account_id: string; - username: string; - authority_type: string; - name?: string; - client_info?: string; - last_modification_time?: string; - last_modification_app?: string; - tenantProfiles?: string[]; -}; -/** - * Idtoken credential type - * @public - */ -export type SerializedIdTokenEntity = { - home_account_id: string; - environment: string; - credential_type: string; - client_id: string; - secret: string; - realm: string; -}; -/** - * Access token credential type - * @public - */ -export type SerializedAccessTokenEntity = { - home_account_id: string; - environment: string; - credential_type: string; - client_id: string; - secret: string; - realm: string; - target: string; - cached_at: string; - expires_on: string; - extended_expires_on?: string; - refresh_on?: string; - key_id?: string; - token_type?: string; - requestedClaims?: string; - requestedClaimsHash?: string; - userAssertionHash?: string; -}; -/** - * Refresh token credential type - * @public - */ -export type SerializedRefreshTokenEntity = { - home_account_id: string; - environment: string; - credential_type: string; - client_id: string; - secret: string; - family_id?: string; - target?: string; - realm?: string; -}; -/** - * AppMetadata type - * @public - */ -export type SerializedAppMetadataEntity = { - client_id: string; - environment: string; - family_id?: string; -}; -//# sourceMappingURL=SerializerTypes.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/cache/serializer/SerializerTypes.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/cache/serializer/SerializerTypes.d.ts.map deleted file mode 100644 index adfb7a7..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/cache/serializer/SerializerTypes.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"SerializerTypes.d.ts","sourceRoot":"","sources":["../../../../src/cache/serializer/SerializerTypes.ts"],"names":[],"mappings":"AAKA,OAAO,EACH,YAAY,EACZ,YAAY,EACZ,gBAAgB,EAChB,iBAAiB,EACjB,gBAAgB,EAChB,cAAc,EACjB,MAAM,yBAAyB,CAAC;AAEjC;;;GAGG;AACH,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;AAE1D;;;GAGG;AACH,MAAM,MAAM,SAAS,GAAG;IACpB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,uBAAuB,CAAC,CAAC;IACjD,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,uBAAuB,CAAC,CAAC;IACjD,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,2BAA2B,CAAC,CAAC;IACzD,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,4BAA4B,CAAC,CAAC;IAC3D,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,2BAA2B,CAAC,CAAC;CAC5D,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,aAAa,GAAG;IACxB,QAAQ,EAAE,YAAY,CAAC;IACvB,QAAQ,EAAE,YAAY,CAAC;IACvB,YAAY,EAAE,gBAAgB,CAAC;IAC/B,aAAa,EAAE,iBAAiB,CAAC;IACjC,WAAW,EAAE,gBAAgB,CAAC;CACjC,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,uBAAuB,GAAG;IAClC,eAAe,EAAE,MAAM,CAAC;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,gBAAgB,EAAE,MAAM,CAAC;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,cAAc,EAAE,MAAM,CAAC;IACvB,IAAI,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AAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,2BAA2B,GAAG;IACtC,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/client/ClientApplication.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/client/ClientApplication.d.ts deleted file mode 100644 index a7f2bf2..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/client/ClientApplication.d.ts +++ /dev/null @@ -1,144 +0,0 @@ -import { ClientConfiguration, AuthenticationResult, BaseAuthRequest, Logger, ServerTelemetryManager, AzureRegionConfiguration, AzureCloudOptions, AuthorizationCodePayload, ClientAssertionCallback } from "@azure/msal-common/node"; -import { Configuration, NodeConfiguration } from "../config/Configuration.js"; -import { CryptoProvider } from "../crypto/CryptoProvider.js"; -import { NodeStorage } from "../cache/NodeStorage.js"; -import { TokenCache } from "../cache/TokenCache.js"; -import { ClientAssertion } from "./ClientAssertion.js"; -import { AuthorizationUrlRequest } from "../request/AuthorizationUrlRequest.js"; -import { AuthorizationCodeRequest } from "../request/AuthorizationCodeRequest.js"; -import { RefreshTokenRequest } from "../request/RefreshTokenRequest.js"; -import { SilentFlowRequest } from "../request/SilentFlowRequest.js"; -import { UsernamePasswordRequest } from "../request/UsernamePasswordRequest.js"; -/** - * Base abstract class for all ClientApplications - public and confidential - * @public - */ -export declare abstract class ClientApplication { - protected readonly cryptoProvider: CryptoProvider; - private tokenCache; - /** - * Platform storage object - */ - protected storage: NodeStorage; - /** - * Logger object to log the application flow - */ - protected logger: Logger; - /** - * Platform configuration initialized by the application - */ - protected config: NodeConfiguration; - /** - * Client assertion passed by the user for confidential client flows - */ - protected clientAssertion: ClientAssertion; - protected developerProvidedClientAssertion: string | ClientAssertionCallback; - /** - * Client secret passed by the user for confidential client flows - */ - protected clientSecret: string; - /** - * Constructor for the ClientApplication - */ - protected constructor(configuration: Configuration); - /** - * Creates the URL of the authorization request, letting the user input credentials and consent to the - * application. The URL targets the /authorize endpoint of the authority configured in the - * application object. - * - * Once the user inputs their credentials and consents, the authority will send a response to the redirect URI - * sent in the request and should contain an authorization code, which can then be used to acquire tokens via - * `acquireTokenByCode(AuthorizationCodeRequest)`. - */ - getAuthCodeUrl(request: AuthorizationUrlRequest): Promise; - /** - * Acquires a token by exchanging the Authorization Code received from the first step of OAuth2.0 - * Authorization Code flow. - * - * `getAuthCodeUrl(AuthorizationCodeUrlRequest)` can be used to create the URL for the first step of OAuth2.0 - * Authorization Code flow. Ensure that values for redirectUri and scopes in AuthorizationCodeUrlRequest and - * AuthorizationCodeRequest are the same. - */ - acquireTokenByCode(request: AuthorizationCodeRequest, authCodePayLoad?: AuthorizationCodePayload): Promise; - /** - * Acquires a token by exchanging the refresh token provided for a new set of tokens. - * - * This API is provided only for scenarios where you would like to migrate from ADAL to MSAL. Otherwise, it is - * recommended that you use `acquireTokenSilent()` for silent scenarios. When using `acquireTokenSilent()`, MSAL will - * handle the caching and refreshing of tokens automatically. - */ - acquireTokenByRefreshToken(request: RefreshTokenRequest): Promise; - /** - * Acquires a token silently when a user specifies the account the token is requested for. - * - * This API expects the user to provide an account object and looks into the cache to retrieve the token if present. - * There is also an optional "forceRefresh" boolean the user can send to bypass the cache for access_token and id_token. - * In case the refresh_token is expired or not found, an error is thrown - * and the guidance is for the user to call any interactive token acquisition API (eg: `acquireTokenByCode()`). - */ - acquireTokenSilent(request: SilentFlowRequest): Promise; - /** - * Acquires tokens with password grant by exchanging client applications username and password for credentials - * - * The latest OAuth 2.0 Security Best Current Practice disallows the password grant entirely. - * More details on this recommendation at https://tools.ietf.org/html/draft-ietf-oauth-security-topics-13#section-3.4 - * Microsoft's documentation and recommendations are at: - * https://docs.microsoft.com/en-us/azure/active-directory/develop/msal-authentication-flows#usernamepassword - * - * @param request - UsenamePasswordRequest - */ - acquireTokenByUsernamePassword(request: UsernamePasswordRequest): Promise; - /** - * Gets the token cache for the application. - */ - getTokenCache(): TokenCache; - /** - * Validates OIDC state by comparing the user cached state with the state received from the server. - * - * This API is provided for scenarios where you would use OAuth2.0 state parameter to mitigate against - * CSRF attacks. - * For more information about state, visit https://datatracker.ietf.org/doc/html/rfc6819#section-3.6. - * @param state - Unique GUID generated by the user that is cached by the user and sent to the server during the first leg of the flow - * @param cachedState - This string is sent back by the server with the authorization code - */ - protected validateState(state: string, cachedState: string): void; - /** - * Returns the logger instance - */ - getLogger(): Logger; - /** - * Replaces the default logger set in configurations with new Logger with new configurations - * @param logger - Logger instance - */ - setLogger(logger: Logger): void; - /** - * Builds the common configuration to be passed to the common component based on the platform configurarion - * @param authority - user passed authority in configuration - * @param serverTelemetryManager - initializes servertelemetry if passed - */ - protected buildOauthClientConfiguration(authority: string, requestCorrelationId: string, redirectUri: string, serverTelemetryManager?: ServerTelemetryManager, azureRegionConfiguration?: AzureRegionConfiguration, azureCloudOptions?: AzureCloudOptions): Promise; - private getClientAssertion; - /** - * Generates a request with the default scopes & generates a correlationId. - * @param authRequest - BaseAuthRequest for initialization - */ - protected initializeBaseRequest(authRequest: Partial): Promise; - /** - * Initializes the server telemetry payload - * @param apiId - Id for a specific request - * @param correlationId - GUID - * @param forceRefresh - boolean to indicate network call - */ - protected initializeServerTelemetryManager(apiId: number, correlationId: string, forceRefresh?: boolean): ServerTelemetryManager; - /** - * Create authority instance. If authority not passed in request, default to authority set on the application - * object. If no authority set in application object, then default to common authority. - * @param authorityString - authority from user configuration - */ - private createAuthority; - /** - * Clear the cache - */ - clearCache(): void; -} -//# sourceMappingURL=ClientApplication.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/client/ClientApplication.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/client/ClientApplication.d.ts.map deleted file mode 100644 index 8c4ec26..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/client/ClientApplication.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ClientApplication.d.ts","sourceRoot":"","sources":["../../../src/client/ClientApplication.ts"],"names":[],"mappings":"AAKA,OAAO,EAEH,mBAAmB,EAEnB,oBAAoB,EAGpB,eAAe,EAEf,MAAM,EACN,sBAAsB,EAWtB,wBAAwB,EAExB,iBAAiB,EACjB,wBAAwB,EAQxB,uBAAuB,EAC1B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACH,aAAa,EAEb,iBAAiB,EACpB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAEtD,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AAChF,OAAO,EAAE,wBAAwB,EAAE,MAAM,wCAAwC,CAAC;AAClF,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AAEpE,OAAO,EAAE,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AAIhF;;;GAGG;AACH,8BAAsB,iBAAiB;IACnC,SAAS,CAAC,QAAQ,CAAC,cAAc,EAAE,cAAc,CAAC;IAClD,OAAO,CAAC,UAAU,CAAa;IAE/B;;OAEG;IACH,SAAS,CAAC,OAAO,EAAE,WAAW,CAAC;IAC/B;;OAEG;IACH,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC;IACzB;;OAEG;IACH,SAAS,CAAC,MAAM,EAAE,iBAAiB,CAAC;IACpC;;OAEG;IACH,SAAS,CAAC,e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cACa,qBAAqB,CACjC,WAAW,EAAE,OAAO,CAAC,eAAe,CAAC,GACtC,OAAO,CAAC,eAAe,CAAC;IA0C3B;;;;;OAKG;IACH,SAAS,CAAC,gCAAgC,CACtC,KAAK,EAAE,MAAM,EACb,aAAa,EAAE,MAAM,EACrB,YAAY,CAAC,EAAE,OAAO,GACvB,sBAAsB;IAWzB;;;;OAIG;YACW,eAAe;IAkC7B;;OAEG;IACH,UAAU,IAAI,IAAI;CAGrB"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/client/ClientAssertion.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/client/ClientAssertion.d.ts deleted file mode 100644 index 6583130..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/client/ClientAssertion.d.ts +++ /dev/null @@ -1,56 +0,0 @@ -import { CryptoProvider } from "../crypto/CryptoProvider.js"; -/** - * Client assertion of type jwt-bearer used in confidential client flows - * @public - */ -export declare class ClientAssertion { - private jwt; - private privateKey; - private thumbprint; - private useSha256; - private expirationTime; - private issuer; - private jwtAudience; - private publicCertificate; - /** - * Initialize the ClientAssertion class from the clientAssertion passed by the user - * @param assertion - refer https://tools.ietf.org/html/rfc7521 - */ - static fromAssertion(assertion: string): ClientAssertion; - /** - * @deprecated Use fromCertificateWithSha256Thumbprint instead, with a SHA-256 thumprint - * Initialize the ClientAssertion class from the certificate passed by the user - * @param thumbprint - identifier of a certificate - * @param privateKey - secret key - * @param publicCertificate - electronic document provided to prove the ownership of the public key - */ - static fromCertificate(thumbprint: string, privateKey: string, publicCertificate?: string): ClientAssertion; - /** - * Initialize the ClientAssertion class from the certificate passed by the user - * @param thumbprint - identifier of a certificate - * @param privateKey - secret key - * @param publicCertificate - electronic document provided to prove the ownership of the public key - */ - static fromCertificateWithSha256Thumbprint(thumbprint: string, privateKey: string, publicCertificate?: string): ClientAssertion; - /** - * Update JWT for certificate based clientAssertion, if passed by the user, uses it as is - * @param cryptoProvider - library's crypto helper - * @param issuer - iss claim - * @param jwtAudience - aud claim - */ - getJwt(cryptoProvider: CryptoProvider, issuer: string, jwtAudience: string): string; - /** - * JWT format and required claims specified: https://tools.ietf.org/html/rfc7523#section-3 - */ - private createJwt; - /** - * Utility API to check expiration - */ - private isExpired; - /** - * Extracts the raw certs from a given certificate string and returns them in an array. - * @param publicCertificate - electronic document provided to prove the ownership of the public key - */ - static parseCertificate(publicCertificate: string): Array; -} -//# sourceMappingURL=ClientAssertion.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/client/ClientAssertion.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/client/ClientAssertion.d.ts.map deleted file mode 100644 index b59dc24..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/client/ClientAssertion.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ClientAssertion.d.ts","sourceRoot":"","sources":["../../../src/client/ClientAssertion.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAI7D;;;GAGG;AACH,qBAAa,eAAe;IACxB,OAAO,CAAC,GAAG,CAAS;IACpB,OAAO,CAAC,UAAU,CAAS;IAC3B,OAAO,CAAC,UAAU,CAAS;IAC3B,OAAO,CAAC,SAAS,CAAU;IAC3B,OAAO,CAAC,cAAc,CAAS;IAC/B,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,WAAW,CAAS;IAC5B,OAAO,CAAC,iBAAiB,CAAgB;IAEzC;;;OAGG;WACW,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,eAAe;IAM/D;;;;;;OAMG;WACW,eAAe,CACzB,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,MAAM,EAClB,iBAAiB,CAAC,EAAE,MAAM,GAC3B,eAAe;IAYlB;;;;;OAKG;WACW,mCAAmC,CAC7C,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,MAAM,EAClB,iBAAiB,CAAC,EAAE,MAAM,GAC3B,eAAe;IAYlB;;;;;OAKG;IACI,MAAM,CACT,cAAc,EAAE,cAAc,EAC9B,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,MAAM,GACpB,MAAM;IA0BT;;OAEG;IACH,OAAO,CAAC,SAAS;IA8CjB;;OAEG;IACH,OAAO,CAAC,SAAS;IAIjB;;;OAGG;WACW,gBAAgB,CAAC,iBAAiB,EAAE,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC;CAoB3E"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/client/ClientCredentialClient.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/client/ClientCredentialClient.d.ts deleted file mode 100644 index 16930ec..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/client/ClientCredentialClient.d.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { AuthenticationResult, Authority, BaseClient, CacheManager, CacheOutcome, ClientConfiguration, CommonClientCredentialRequest, IAppTokenProvider, ICrypto, ServerTelemetryManager } from "@azure/msal-common/node"; -import { ManagedIdentityConfiguration } from "../config/Configuration.js"; -/** - * OAuth2.0 client credential grant - * @public - */ -export declare class ClientCredentialClient extends BaseClient { - private readonly appTokenProvider?; - constructor(configuration: ClientConfiguration, appTokenProvider?: IAppTokenProvider); - /** - * Public API to acquire a token with ClientCredential Flow for Confidential clients - * @param request - CommonClientCredentialRequest provided by the developer - */ - acquireToken(request: CommonClientCredentialRequest): Promise; - /** - * looks up cache if the tokens are cached already - */ - getCachedAuthenticationResult(request: CommonClientCredentialRequest, config: ClientConfiguration | ManagedIdentityConfiguration, cryptoUtils: ICrypto, authority: Authority, cacheManager: CacheManager, serverTelemetryManager?: ServerTelemetryManager | null): Promise<[AuthenticationResult | null, CacheOutcome]>; - /** - * Reads access token from the cache - */ - private readAccessTokenFromCache; - /** - * Makes a network call to request the token from the service - * @param request - CommonClientCredentialRequest provided by the developer - * @param authority - authority object - */ - private executeTokenRequest; - /** - * generate the request to the server in the acceptable format - * @param request - CommonClientCredentialRequest provided by the developer - */ - private createTokenRequestBody; -} -//# sourceMappingURL=ClientCredentialClient.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/client/ClientCredentialClient.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/client/ClientCredentialClient.d.ts.map deleted file mode 100644 index ba6a07a..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/client/ClientCredentialClient.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ClientCredentialClient.d.ts","sourceRoot":"","sources":["../../../src/client/ClientCredentialClient.ts"],"names":[],"mappings":"AAKA,OAAO,EAEH,oBAAoB,EAEpB,SAAS,EACT,UAAU,EACV,YAAY,EACZ,YAAY,EAEZ,mBAAmB,EACnB,6BAA6B,EAM7B,iBAAiB,EACjB,OAAO,EAMP,sBAAsB,EAQzB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACH,4BAA4B,EAE/B,MAAM,4BAA4B,CAAC;AAEpC;;;GAGG;AACH,qBAAa,sBAAuB,SAAQ,UAAU;IAClD,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAC,CAAoB;gBAGlD,aAAa,EAAE,mBAAmB,EAClC,gBAAgB,CAAC,EAAE,iBAAiB;IAMxC;;;OAGG;IACU,YAAY,CACrB,OAAO,EAAE,6BAA6B,GACvC,OAAO,CAAC,oBAAoB,GAAG,IAAI,CAAC;IAsCvC;;OAEG;IACU,6BAA6B,CACtC,OAAO,EAAE,6BAA6B,EACtC,MAAM,EAAE,mBAAmB,GAAG,4BAA4B,EAC1D,WAAW,EAAE,OAAO,EACpB,SAAS,EAAE,SAAS,EACpB,YAAY,EAAE,YAAY,EAC1B,sBAAsB,CAAC,EAAE,sBAAsB,GAAG,IAAI,GACvD,OAAO,CAAC,CAAC,oBAAoB,GAAG,IAAI,EAAE,YAAY,CAAC,CAAC;IA4FvD;;OAEG;IACH,OAAO,CAAC,wBAAwB;IA+BhC;;;;OAIG;YACW,mBAAmB;IA6FjC;;;OAGG;YACW,sBAAsB;CAgEvC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/client/ConfidentialClientApplication.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/client/ConfidentialClientApplication.d.ts deleted file mode 100644 index 0292a6b..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/client/ConfidentialClientApplication.d.ts +++ /dev/null @@ -1,59 +0,0 @@ -import { ClientApplication } from "./ClientApplication.js"; -import { Configuration } from "../config/Configuration.js"; -import { AuthenticationResult, IAppTokenProvider } from "@azure/msal-common/node"; -import { IConfidentialClientApplication } from "./IConfidentialClientApplication.js"; -import { OnBehalfOfRequest } from "../request/OnBehalfOfRequest.js"; -import { ClientCredentialRequest } from "../request/ClientCredentialRequest.js"; -/** - * This class is to be used to acquire tokens for confidential client applications (webApp, webAPI). Confidential client applications - * will configure application secrets, client certificates/assertions as applicable - * @public - */ -export declare class ConfidentialClientApplication extends ClientApplication implements IConfidentialClientApplication { - private appTokenProvider?; - /** - * Constructor for the ConfidentialClientApplication - * - * Required attributes in the Configuration object are: - * - clientID: the application ID of your application. You can obtain one by registering your application with our application registration portal - * - authority: the authority URL for your application. - * - client credential: Must set either client secret, certificate, or assertion for confidential clients. You can obtain a client secret from the application registration portal. - * - * In Azure AD, authority is a URL indicating of the form https://login.microsoftonline.com/\{Enter_the_Tenant_Info_Here\}. - * If your application supports Accounts in one organizational directory, replace "Enter_the_Tenant_Info_Here" value with the Tenant Id or Tenant name (for example, contoso.microsoft.com). - * If your application supports Accounts in any organizational directory, replace "Enter_the_Tenant_Info_Here" value with organizations. - * If your application supports Accounts in any organizational directory and personal Microsoft accounts, replace "Enter_the_Tenant_Info_Here" value with common. - * To restrict support to Personal Microsoft accounts only, replace "Enter_the_Tenant_Info_Here" value with consumers. - * - * In Azure B2C, authority is of the form https://\{instance\}/tfp/\{tenant\}/\{policyName\}/ - * Full B2C functionality will be available in this library in future versions. - * - * @param Configuration - configuration object for the MSAL ConfidentialClientApplication instance - */ - constructor(configuration: Configuration); - /** - * This extensibility point only works for the client_credential flow, i.e. acquireTokenByClientCredential and - * is meant for Azure SDK to enhance Managed Identity support. - * - * @param IAppTokenProvider - Extensibility interface, which allows the app developer to return a token from a custom source. - */ - SetAppTokenProvider(provider: IAppTokenProvider): void; - /** - * Acquires tokens from the authority for the application (not for an end user). - */ - acquireTokenByClientCredential(request: ClientCredentialRequest): Promise; - /** - * Acquires tokens from the authority for the application. - * - * Used in scenarios where the current app is a middle-tier service which was called with a token - * representing an end user. The current app can use the token (oboAssertion) to request another - * token to access downstream web API, on behalf of that user. - * - * The current middle-tier app has no user interaction to obtain consent. - * See how to gain consent upfront for your middle-tier app from this article. - * https://docs.microsoft.com/en-us/azure/active-directory/develop/v2-oauth2-on-behalf-of-flow#gaining-consent-for-the-middle-tier-application - */ - acquireTokenOnBehalfOf(request: OnBehalfOfRequest): Promise; - private setClientCredential; -} -//# sourceMappingURL=ConfidentialClientApplication.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/client/ConfidentialClientApplication.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/client/ConfidentialClientApplication.d.ts.map deleted file mode 100644 index 2b01f73..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/client/ConfidentialClientApplication.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ConfidentialClientApplication.d.ts","sourceRoot":"","sources":["../../../src/client/ConfidentialClientApplication.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAQ3D,OAAO,EAGH,oBAAoB,EAGpB,iBAAiB,EASpB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,8BAA8B,EAAE,MAAM,qCAAqC,CAAC;AACrF,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAAE,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AAIhF;;;;GAIG;AACH,qBAAa,6BACT,SAAQ,iBACR,YAAW,8BAA8B;IAEzC,OAAO,CAAC,gBAAgB,CAAC,CAAoB;IAE7C;;;;;;;;;;;;;;;;;;OAkBG;gBACS,aAAa,EAAE,aAAa;IAMxC;;;;;OAKG;IACH,mBAAmB,CAAC,QAAQ,EAAE,iBAAiB,GAAG,IAAI;IAItD;;OAEG;IACU,8BAA8B,CACvC,OAAO,EAAE,uBAAuB,GACjC,OAAO,CAAC,oBAAoB,GAAG,IAAI,CAAC;IAyGvC;;;;;;;;;;OAUG;IACU,sBAAsB,CAC/B,OAAO,EAAE,iBAAiB,GAC3B,OAAO,CAAC,oBAAoB,GAAG,IAAI,CAAC;IAgCvC,OAAO,CAAC,mBAAmB;CA0D9B"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/client/DeviceCodeClient.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/client/DeviceCodeClient.d.ts deleted file mode 100644 index 490ce39..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/client/DeviceCodeClient.d.ts +++ /dev/null @@ -1,58 +0,0 @@ -import { AuthenticationResult, BaseClient, ClientConfiguration, CommonDeviceCodeRequest } from "@azure/msal-common/node"; -/** - * OAuth2.0 Device code client - * @public - */ -export declare class DeviceCodeClient extends BaseClient { - constructor(configuration: ClientConfiguration); - /** - * Gets device code from device code endpoint, calls back to with device code response, and - * polls token endpoint to exchange device code for tokens - * @param request - developer provided CommonDeviceCodeRequest - */ - acquireToken(request: CommonDeviceCodeRequest): Promise; - /** - * Creates device code request and executes http GET - * @param request - developer provided CommonDeviceCodeRequest - */ - private getDeviceCode; - /** - * Creates query string for the device code request - * @param request - developer provided CommonDeviceCodeRequest - */ - createExtraQueryParameters(request: CommonDeviceCodeRequest): string; - /** - * Executes POST request to device code endpoint - * @param deviceCodeEndpoint - token endpoint - * @param queryString - string to be used in the body of the request - * @param headers - headers for the request - * @param thumbprint - unique request thumbprint - * @param correlationId - correlation id to be used in the request - */ - private executePostRequestToDeviceCodeEndpoint; - /** - * Create device code endpoint query parameters and returns string - * @param request - developer provided CommonDeviceCodeRequest - */ - private createQueryString; - /** - * Breaks the polling with specific conditions - * @param deviceCodeExpirationTime - expiration time for the device code request - * @param userSpecifiedTimeout - developer provided timeout, to be compared against deviceCodeExpirationTime - * @param userSpecifiedCancelFlag - boolean indicating the developer would like to cancel the request - */ - private continuePolling; - /** - * Creates token request with device code response and polls token endpoint at interval set by the device code response - * @param request - developer provided CommonDeviceCodeRequest - * @param deviceCodeResponse - DeviceCodeResponse returned by the security token service device code endpoint - */ - private acquireTokenWithDeviceCode; - /** - * Creates query parameters and converts to string. - * @param request - developer provided CommonDeviceCodeRequest - * @param deviceCodeResponse - DeviceCodeResponse returned by the security token service device code endpoint - */ - private createTokenRequestBody; -} -//# sourceMappingURL=DeviceCodeClient.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/client/DeviceCodeClient.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/client/DeviceCodeClient.d.ts.map deleted file mode 100644 index 69df45e..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/client/DeviceCodeClient.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"DeviceCodeClient.d.ts","sourceRoot":"","sources":["../../../src/client/DeviceCodeClient.ts"],"names":[],"mappings":"AAKA,OAAO,EAEH,oBAAoB,EACpB,UAAU,EAEV,mBAAmB,EACnB,uBAAuB,EAc1B,MAAM,yBAAyB,CAAC;AAEjC;;;GAGG;AACH,qBAAa,gBAAiB,SAAQ,UAAU;gBAChC,aAAa,EAAE,mBAAmB;IAI9C;;;;OAIG;IACU,YAAY,CACrB,OAAO,EAAE,uBAAuB,GACjC,OAAO,CAAC,oBAAoB,GAAG,IAAI,CAAC;IA4BvC;;;OAGG;YACW,aAAa;IA+B3B;;;OAGG;IACI,0BAA0B,CAC7B,OAAO,EAAE,uBAAuB,GACjC,MAAM;IAYT;;;;;;;OAOG;YACW,sCAAsC;IAoCpD;;;OAGG;IACH,OAAO,CAAC,iBAAiB;IA2BzB;;;;;OAKG;IACH,OAAO,CAAC,eAAe;IAqCvB;;;;OAIG;YACW,0BAA0B;IAwFxC;;;;OAIG;IACH,OAAO,CAAC,sBAAsB;CAqCjC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/client/IConfidentialClientApplication.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/client/IConfidentialClientApplication.d.ts deleted file mode 100644 index 93db1fe..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/client/IConfidentialClientApplication.d.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { AuthenticationResult, IAppTokenProvider, Logger } from "@azure/msal-common/node"; -import { AuthorizationCodeRequest } from "../request/AuthorizationCodeRequest.js"; -import { AuthorizationUrlRequest } from "../request/AuthorizationUrlRequest.js"; -import { ClientCredentialRequest } from "../request/ClientCredentialRequest.js"; -import { OnBehalfOfRequest } from "../request/OnBehalfOfRequest.js"; -import { RefreshTokenRequest } from "../request/RefreshTokenRequest.js"; -import { SilentFlowRequest } from "../request/SilentFlowRequest.js"; -import { UsernamePasswordRequest } from "../request/UsernamePasswordRequest.js"; -import { TokenCache } from "../cache/TokenCache.js"; -/** - * Interface for the ConfidentialClientApplication class defining the public API signatures - * @public - */ -export interface IConfidentialClientApplication { - /** Creates the URL of the authorization request */ - getAuthCodeUrl(request: AuthorizationUrlRequest): Promise; - /** Acquires a token by exchanging the authorization code received from the first step of OAuth 2.0 Authorization Code Flow */ - acquireTokenByCode(request: AuthorizationCodeRequest): Promise; - /** Acquires a token silently when a user specifies the account the token is requested for */ - acquireTokenSilent(request: SilentFlowRequest): Promise; - /** Acquires a token by exchanging the refresh token provided for a new set of tokens */ - acquireTokenByRefreshToken(request: RefreshTokenRequest): Promise; - /** Acquires tokens from the authority for the application (not for an end user) */ - acquireTokenByClientCredential(request: ClientCredentialRequest): Promise; - /** Acquires tokens from the authority for the application */ - acquireTokenOnBehalfOf(request: OnBehalfOfRequest): Promise; - /** Acquires tokens with password grant by exchanging client applications username and password for credentials */ - acquireTokenByUsernamePassword(request: UsernamePasswordRequest): Promise; - /** Gets the token cache for the application */ - getTokenCache(): TokenCache; - /** Returns the logger instance */ - getLogger(): Logger; - /** Replaces the default logger set in configurations with new Logger with new configurations */ - setLogger(logger: Logger): void; - /** Clear the cache */ - clearCache(): void; - /** This extensibility point is meant for Azure SDK to enhance Managed Identity support */ - SetAppTokenProvider(provider: IAppTokenProvider): void; -} -//# sourceMappingURL=IConfidentialClientApplication.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/client/IConfidentialClientApplication.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/client/IConfidentialClientApplication.d.ts.map deleted file mode 100644 index 63cf673..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/client/IConfidentialClientApplication.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"IConfidentialClientApplication.d.ts","sourceRoot":"","sources":["../../../src/client/IConfidentialClientApplication.ts"],"names":[],"mappings":"AAKA,OAAO,EACH,oBAAoB,EACpB,iBAAiB,EACjB,MAAM,EACT,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,wBAAwB,EAAE,MAAM,wCAAwC,CAAC;AAClF,OAAO,EAAE,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AAChF,OAAO,EAAE,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AAChF,OAAO,EAAE,iBAAiB,E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mB,CAAC,QAAQ,EAAE,iBAAiB,GAAG,IAAI,CAAC;CAC1D"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/client/IPublicClientApplication.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/client/IPublicClientApplication.d.ts deleted file mode 100644 index 3e42f84..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/client/IPublicClientApplication.d.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { AccountInfo, AuthenticationResult, Logger } from "@azure/msal-common/node"; -import { AuthorizationCodeRequest } from "../request/AuthorizationCodeRequest.js"; -import { AuthorizationUrlRequest } from "../request/AuthorizationUrlRequest.js"; -import { DeviceCodeRequest } from "../request/DeviceCodeRequest.js"; -import { RefreshTokenRequest } from "../request/RefreshTokenRequest.js"; -import { SilentFlowRequest } from "../request/SilentFlowRequest.js"; -import { UsernamePasswordRequest } from "../request/UsernamePasswordRequest.js"; -import { TokenCache } from "../cache/TokenCache.js"; -import { InteractiveRequest } from "../request/InteractiveRequest.js"; -import { SignOutRequest } from "../request/SignOutRequest.js"; -/** - * Interface for the PublicClientApplication class defining the public API signatures - * @public - */ -export interface IPublicClientApplication { - /** Creates the URL of the authorization request */ - getAuthCodeUrl(request: AuthorizationUrlRequest): Promise; - /** Acquires a token by exchanging the authorization code received from the first step of OAuth 2.0 Authorization Code Flow */ - acquireTokenByCode(request: AuthorizationCodeRequest): Promise; - /** Acquires a token interactively */ - acquireTokenInteractive(request: InteractiveRequest): Promise; - /** Acquires a token silently when a user specifies the account the token is requested for */ - acquireTokenSilent(request: SilentFlowRequest): Promise; - /** Acquires a token by exchanging the refresh token provided for a new set of tokens */ - acquireTokenByRefreshToken(request: RefreshTokenRequest): Promise; - /** Acquires a token from the authority using OAuth2.0 device code flow */ - acquireTokenByDeviceCode(request: DeviceCodeRequest): Promise; - /** Acquires tokens with password grant by exchanging client applications username and password for credentials */ - acquireTokenByUsernamePassword(request: UsernamePasswordRequest): Promise; - /** Gets the token cache for the application */ - getTokenCache(): TokenCache; - /** Returns the logger instance */ - getLogger(): Logger; - /** Replaces the default logger set in configurations with new Logger with new configurations */ - setLogger(logger: Logger): void; - /** Clear the cache */ - clearCache(): void; - /** Gets all cached accounts */ - getAllAccounts(): Promise; - /** Removes cache artifacts associated with the given account */ - signOut(request: SignOutRequest): Promise; -} -//# sourceMappingURL=IPublicClientApplication.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/client/IPublicClientApplication.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/client/IPublicClientApplication.d.ts.map deleted file mode 100644 index d686f09..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/client/IPublicClientApplication.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"IPublicClientApplication.d.ts","sourceRoot":"","sources":["../../../src/client/IPublicClientApplication.ts"],"names":[],"mappings":"AAKA,OAAO,EACH,WAAW,EACX,oBAAoB,EACpB,MAAM,EACT,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,wBAAwB,EAAE,MAAM,wCAAwC,CAAC;AAClF,OAAO,EAAE,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AAChF,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAAE,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AAChF,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AACtE,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAE9D;;;GAGG;AACH,MAAM,WAAW,wBAAwB;IACrC,mDAAmD;IACnD,cAAc,CAAC,OAAO,EAAE,uBAAuB,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAElE,8HAA8H;IAC9H,kBAAkB,CACd,OAAO,EAAE,wBAAwB,GAClC,OAAO,CAAC,oBAAoB,CAAC,CAAC;IAEjC,qCAAqC;IACrC,uBAAuB,CACnB,OAAO,EAAE,kBAAkB,GAC5B,OAAO,CAAC,oBAAoB,CAAC,CAAC;IAEjC,6FAA6F;IAC7F,kBAAkB,CACd,OAAO,EAAE,iBAAiB,GAC3B,OAAO,CAAC,oBAAoB,CAAC,CAAC;IAEjC,wFAAwF;IACxF,0BAA0B,CACtB,OAAO,EAAE,mBAAmB,GAC7B,OAAO,CAAC,oBAAoB,GAAG,IAAI,CAAC,CAAC;IAExC,0EAA0E;IAC1E,wBAAwB,CACpB,OAAO,EAAE,iBAAiB,GAC3B,OAAO,CAAC,oBAAoB,GAAG,IAAI,CAAC,CAAC;IAExC,kHAAkH;IAClH,8BAA8B,CAC1B,OAAO,EAAE,uBAAuB,GACjC,OAAO,CAAC,oBAAoB,GAAG,IAAI,CAAC,CAAC;IAExC,+CAA+C;IAC/C,aAAa,IAAI,UAAU,CAAC;IAE5B,kCAAkC;IAClC,SAAS,IAAI,MAAM,CAAC;IAEpB,gGAAgG;IAChG,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAEhC,sBAAsB;IACtB,UAAU,IAAI,IAAI,CAAC;IAEnB,+BAA+B;IAC/B,cAAc,IAAI,OAAO,CAAC,WAAW,EAAE,CAAC,CAAC;IAEzC,gEAAgE;IAChE,OAAO,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACnD"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/client/ManagedIdentityApplication.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/client/ManagedIdentityApplication.d.ts deleted file mode 100644 index abf13c1..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/client/ManagedIdentityApplication.d.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { AuthenticationResult } from "@azure/msal-common/node"; -import { ManagedIdentityConfiguration } from "../config/Configuration.js"; -import { ManagedIdentityRequestParams } from "../request/ManagedIdentityRequestParams.js"; -import { ManagedIdentitySourceNames } from "../utils/Constants.js"; -/** - * Class to initialize a managed identity and identify the service - * @public - */ -export declare class ManagedIdentityApplication { - private config; - private logger; - private static nodeStorage?; - private networkClient; - private cryptoProvider; - private fakeAuthority; - private fakeClientCredentialClient; - private managedIdentityClient; - constructor(configuration?: ManagedIdentityConfiguration); - /** - * Acquire an access token from the cache or the managed identity - * @param managedIdentityRequest - the ManagedIdentityRequestParams object passed in by the developer - * @returns the access token - */ - acquireToken(managedIdentityRequestParams: ManagedIdentityRequestParams): Promise; - /** - * Determine the Managed Identity Source based on available environment variables. This API is consumed by Azure Identity SDK. - * @returns ManagedIdentitySourceNames - The Managed Identity source's name - */ - getManagedIdentitySource(): ManagedIdentitySourceNames; -} -//# sourceMappingURL=ManagedIdentityApplication.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/client/ManagedIdentityApplication.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/client/ManagedIdentityApplication.d.ts.map deleted file mode 100644 index 19cd228..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/client/ManagedIdentityApplication.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ManagedIdentityApplication.d.ts","sourceRoot":"","sources":["../../../src/client/ManagedIdentityApplication.ts"],"names":[],"mappings":"AAKA,OAAO,EAYH,oBAAoB,EAGvB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACH,4BAA4B,EAG/B,MAAM,4BAA4B,CAAC;AAMpC,OAAO,EAAE,4BAA4B,EAAE,MAAM,4CAA4C,CAAC;AAE1F,OAAO,EAEH,0BAA0B,EAC7B,MAAM,uBAAuB,CAAC;AAE/B;;;GAGG;AACH,qBAAa,0BAA0B;IACnC,OAAO,CAAC,MAAM,CAAmC;IAEjD,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,MAAM,CAAC,WAAW,CAAC,CAAc;IACzC,OAAO,CAAC,aAAa,CAAiB;IACtC,OAAO,CAAC,cAAc,CAAiB;IAGvC,OAAO,CAAC,aAAa,CAAY;IAGjC,OAAO,CAAC,0BAA0B,CAAyB;IAE3D,OAAO,CAAC,qBAAqB,CAAwB;gBAEzC,aAAa,CAAC,EAAE,4BAA4B;IA2DxD;;;;OAIG;IACU,YAAY,CACrB,4BAA4B,EAAE,4BAA4B,GAC3D,OAAO,CAAC,oBAAoB,CAAC;IAqEhC;;;OAGG;IACI,wBAAwB,IAAI,0BAA0B;CAMhE"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/client/ManagedIdentityClient.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/client/ManagedIdentityClient.d.ts deleted file mode 100644 index c7371d5..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/client/ManagedIdentityClient.d.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { Authority, INetworkModule, Logger, AuthenticationResult } from "@azure/msal-common/node"; -import { CryptoProvider } from "../crypto/CryptoProvider.js"; -import { ManagedIdentityRequest } from "../request/ManagedIdentityRequest.js"; -import { ManagedIdentityId } from "../config/ManagedIdentityId.js"; -import { NodeStorage } from "../cache/NodeStorage.js"; -import { ManagedIdentitySourceNames } from "../utils/Constants.js"; -export declare class ManagedIdentityClient { - private logger; - private nodeStorage; - private networkClient; - private cryptoProvider; - private static identitySource?; - static sourceName?: ManagedIdentitySourceNames; - constructor(logger: Logger, nodeStorage: NodeStorage, networkClient: INetworkModule, cryptoProvider: CryptoProvider); - sendManagedIdentityTokenRequest(managedIdentityRequest: ManagedIdentityRequest, managedIdentityId: ManagedIdentityId, fakeAuthority: Authority, refreshAccessToken?: boolean): Promise; - private allEnvironmentVariablesAreDefined; - /** - * Determine the Managed Identity Source based on available environment variables. This API is consumed by ManagedIdentityApplication's getManagedIdentitySource. - * @returns ManagedIdentitySourceNames - The Managed Identity source's name - */ - getManagedIdentitySource(): ManagedIdentitySourceNames; - /** - * Tries to create a managed identity source for all sources - * @returns the managed identity Source - */ - private selectManagedIdentitySource; -} -//# sourceMappingURL=ManagedIdentityClient.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/client/ManagedIdentityClient.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/client/ManagedIdentityClient.d.ts.map deleted file mode 100644 index bafdc5b..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/client/ManagedIdentityClient.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ManagedIdentityClient.d.ts","sourceRoot":"","sources":["../../../src/client/ManagedIdentityClient.ts"],"names":[],"mappings":"AAKA,OAAO,EACH,SAAS,EACT,cAAc,EACd,MAAM,EACN,oBAAoB,EACvB,MAAM,yBAAyB,CAAC;AAMjC,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAK7D,OAAO,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAC;AAC9E,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAEtD,OAAO,EAAE,0BAA0B,EAAE,MAAM,uBAAuB,CAAC;AAMnE,qBAAa,qBAAqB;IAC9B,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,WAAW,CAAc;IACjC,OAAO,CAAC,aAAa,CAAiB;IACtC,OAAO,CAAC,cAAc,CAAiB;IAEvC,OAAO,CAAC,MAAM,CAAC,cAAc,CAAC,CAA4B;IAC1D,OAAc,UAAU,CAAC,EAAE,0BAA0B,CAAC;gBAGlD,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,WAAW,EACxB,aAAa,EAAE,cAAc,EAC7B,cAAc,EAAE,cAAc;IAQrB,+BAA+B,CACxC,sBAAsB,EAAE,sBAAsB,EAC9C,iBAAiB,EAAE,iBAAiB,EACpC,aAAa,EAAE,SAAS,EACxB,kBAAkB,CAAC,EAAE,OAAO,GAC7B,OAAO,CAAC,oBAAoB,CAAC;IAoBhC,OAAO,CAAC,iCAAiC;IAUzC;;;OAGG;IACI,wBAAwB,IAAI,0BAA0B;IAuB7D;;;OAGG;IACH,OAAO,CAAC,2BAA2B;CA2CtC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/client/ManagedIdentitySources/AppService.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/client/ManagedIdentitySources/AppService.d.ts deleted file mode 100644 index 25bfd37..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/client/ManagedIdentitySources/AppService.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { INetworkModule, Logger } from "@azure/msal-common/node"; -import { BaseManagedIdentitySource } from "./BaseManagedIdentitySource.js"; -import { CryptoProvider } from "../../crypto/CryptoProvider.js"; -import { ManagedIdentityRequestParameters } from "../../config/ManagedIdentityRequestParameters.js"; -import { ManagedIdentityId } from "../../config/ManagedIdentityId.js"; -import { NodeStorage } from "../../cache/NodeStorage.js"; -/** - * Original source of code: https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/identity/Azure.Identity/src/AppServiceManagedIdentitySource.cs - */ -export declare class AppService extends BaseManagedIdentitySource { - private identityEndpoint; - private identityHeader; - constructor(logger: Logger, nodeStorage: NodeStorage, networkClient: INetworkModule, cryptoProvider: CryptoProvider, identityEndpoint: string, identityHeader: string); - static getEnvironmentVariables(): Array; - static tryCreate(logger: Logger, nodeStorage: NodeStorage, networkClient: INetworkModule, cryptoProvider: CryptoProvider): AppService | null; - createRequest(resource: string, managedIdentityId: ManagedIdentityId): ManagedIdentityRequestParameters; -} -//# sourceMappingURL=AppService.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/client/ManagedIdentitySources/AppService.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/client/ManagedIdentitySources/AppService.d.ts.map deleted file mode 100644 index 31eb43b..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/client/ManagedIdentitySources/AppService.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AppService.d.ts","sourceRoot":"","sources":["../../../../src/client/ManagedIdentitySources/AppService.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAU3E,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAChE,OAAO,EAAE,gCAAgC,EAAE,MAAM,kDAAkD,CAAC;AACpG,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AACtE,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAKzD;;GAEG;AACH,qBAAa,UAAW,SAAQ,yBAAyB;IACrD,OAAO,CAAC,gBAAgB,CAAS;IACjC,OAAO,CAAC,cAAc,CAAS;gBAG3B,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,WAAW,EACxB,aAAa,EAAE,cAAc,EAC7B,cAAc,EAAE,cAAc,EAC9B,gBAAgB,EAAE,MAAM,EACxB,cAAc,EAAE,MAAM;WAQZ,uBAAuB,IAAI,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC;WAapD,SAAS,CACnB,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,WAAW,EACxB,aAAa,EAAE,cAAc,EAC7B,cAAc,EAAE,cAAc,GAC/B,UAAU,GAAG,IAAI;IAkCb,aAAa,CAChB,QAAQ,EAAE,MAAM,EAChB,iBAAiB,EAAE,iBAAiB,GACrC,gCAAgC;CA4BtC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/client/ManagedIdentitySources/AzureArc.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/client/ManagedIdentitySources/AzureArc.d.ts deleted file mode 100644 index 10efca1..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/client/ManagedIdentitySources/AzureArc.d.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { INetworkModule, NetworkResponse, NetworkRequestOptions, Logger, ServerAuthorizationTokenResponse } from "@azure/msal-common/node"; -import { ManagedIdentityRequestParameters } from "../../config/ManagedIdentityRequestParameters.js"; -import { BaseManagedIdentitySource } from "./BaseManagedIdentitySource.js"; -import { CryptoProvider } from "../../crypto/CryptoProvider.js"; -import { NodeStorage } from "../../cache/NodeStorage.js"; -import { ManagedIdentityTokenResponse } from "../../response/ManagedIdentityTokenResponse.js"; -import { ManagedIdentityId } from "../../config/ManagedIdentityId.js"; -export declare const ARC_API_VERSION: string; -export declare const DEFAULT_AZURE_ARC_IDENTITY_ENDPOINT: string; -type FilePathMap = { - win32: string; - linux: string; -}; -export declare const SUPPORTED_AZURE_ARC_PLATFORMS: FilePathMap; -export declare const AZURE_ARC_FILE_DETECTION: FilePathMap; -/** - * Original source of code: https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/identity/Azure.Identity/src/AzureArcManagedIdentitySource.cs - */ -export declare class AzureArc extends BaseManagedIdentitySource { - private identityEndpoint; - constructor(logger: Logger, nodeStorage: NodeStorage, networkClient: INetworkModule, cryptoProvider: CryptoProvider, identityEndpoint: string); - static getEnvironmentVariables(): Array; - static tryCreate(logger: Logger, nodeStorage: NodeStorage, networkClient: INetworkModule, cryptoProvider: CryptoProvider, managedIdentityId: ManagedIdentityId): AzureArc | null; - createRequest(resource: string): ManagedIdentityRequestParameters; - getServerTokenResponseAsync(originalResponse: NetworkResponse, networkClient: INetworkModule, networkRequest: ManagedIdentityRequestParameters, networkRequestOptions: NetworkRequestOptions): Promise; -} -export {}; -//# sourceMappingURL=AzureArc.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/client/ManagedIdentitySources/AzureArc.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/client/ManagedIdentitySources/AzureArc.d.ts.map deleted file mode 100644 index 561a472..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/client/ManagedIdentitySources/AzureArc.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AzureArc.d.ts","sourceRoot":"","sources":["../../../../src/client/ManagedIdentitySources/AzureArc.ts"],"names":[],"mappings":"AAKA,OAAO,EAKH,cAAc,EACd,eAAe,EACf,qBAAqB,EACrB,MAAM,EACN,gCAAgC,EACnC,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,gCAAgC,EAAE,MAAM,kDAAkD,CAAC;AACpG,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAgBhE,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAOzD,OAAO,EAAE,4BAA4B,EAAE,MAAM,gDAAgD,CAAC;AAC9F,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AAGtE,eAAO,MAAM,eAAe,EAAE,MAAqB,CAAC;AACpD,eAAO,MAAM,mCAAmC,EAAE,MACS,CAAC;AAG5D,KAAK,WAAW,GAAG;IACf,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,eAAO,MAAM,6BAA6B,EAAE,WAG3C,CAAC;AAEF,eAAO,MAAM,wBAAwB,EAAE,WAGtC,CAAC;AAEF;;GAEG;AACH,qBAAa,QAAS,SAAQ,yBAAyB;IACnD,OAAO,CAAC,gBAAgB,CAAS;gBAG7B,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,WAAW,EACxB,aAAa,EAAE,cAAc,EAC7B,cAAc,EAAE,cAAc,EAC9B,gBAAgB,EAAE,MAAM;WAOd,uBAAuB,IAAI,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC;WAoCpD,SAAS,CACnB,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,WAAW,EACxB,aAAa,EAAE,cAAc,EAC7B,cAAc,EAAE,cAAc,EAC9B,iBAAiB,EAAE,iBAAiB,GACrC,QAAQ,GAAG,IAAI;IA8DX,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,gCAAgC;IAmB3D,2BAA2B,CACpC,gBAAgB,EAAE,eAAe,CAAC,4BAA4B,CAAC,EAC/D,aAAa,EAAE,cAAc,EAC7B,cAAc,EAAE,gCAAgC,EAChD,qBAAqB,EAAE,qBAAqB,GAC7C,OAAO,CAAC,gCAAgC,CAAC;CA0G/C"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/client/ManagedIdentitySources/BaseManagedIdentitySource.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/client/ManagedIdentitySources/BaseManagedIdentitySource.d.ts deleted file mode 100644 index 9208e95..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/client/ManagedIdentitySources/BaseManagedIdentitySource.d.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { Authority, INetworkModule, Logger, NetworkRequestOptions, NetworkResponse, ServerAuthorizationTokenResponse, AuthenticationResult } from "@azure/msal-common/node"; -import { ManagedIdentityId } from "../../config/ManagedIdentityId.js"; -import { ManagedIdentityRequestParameters } from "../../config/ManagedIdentityRequestParameters.js"; -import { CryptoProvider } from "../../crypto/CryptoProvider.js"; -import { ManagedIdentityRequest } from "../../request/ManagedIdentityRequest.js"; -import { ManagedIdentityIdType } from "../../utils/Constants.js"; -import { ManagedIdentityTokenResponse } from "../../response/ManagedIdentityTokenResponse.js"; -import { NodeStorage } from "../../cache/NodeStorage.js"; -/** - * Managed Identity User Assigned Id Query Parameter Names - */ -export declare const ManagedIdentityUserAssignedIdQueryParameterNames: { - readonly MANAGED_IDENTITY_CLIENT_ID: "client_id"; - readonly MANAGED_IDENTITY_OBJECT_ID: "object_id"; - readonly MANAGED_IDENTITY_RESOURCE_ID: "mi_res_id"; -}; -export type ManagedIdentityUserAssignedIdQueryParameterNames = (typeof ManagedIdentityUserAssignedIdQueryParameterNames)[keyof typeof ManagedIdentityUserAssignedIdQueryParameterNames]; -export declare abstract class BaseManagedIdentitySource { - protected logger: Logger; - private nodeStorage; - private networkClient; - private cryptoProvider; - constructor(logger: Logger, nodeStorage: NodeStorage, networkClient: INetworkModule, cryptoProvider: CryptoProvider); - abstract createRequest(request: string, managedIdentityId: ManagedIdentityId): ManagedIdentityRequestParameters; - getServerTokenResponseAsync(response: NetworkResponse, _networkClient: INetworkModule, _networkRequest: ManagedIdentityRequestParameters, _networkRequestOptions: NetworkRequestOptions): Promise; - getServerTokenResponse(response: NetworkResponse): ServerAuthorizationTokenResponse; - acquireTokenWithManagedIdentity(managedIdentityRequest: ManagedIdentityRequest, managedIdentityId: ManagedIdentityId, fakeAuthority: Authority, refreshAccessToken?: boolean): Promise; - getManagedIdentityUserAssignedIdQueryParameterKey(managedIdentityIdType: ManagedIdentityIdType): string; - static getValidatedEnvVariableUrlString: (envVariableStringName: string, envVariable: string, sourceName: string, logger: Logger) => string; -} -//# sourceMappingURL=BaseManagedIdentitySource.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/client/ManagedIdentitySources/BaseManagedIdentitySource.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/client/ManagedIdentitySources/BaseManagedIdentitySource.d.ts.map deleted file mode 100644 index 25ff0b3..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/client/ManagedIdentitySources/BaseManagedIdentitySource.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"BaseManagedIdentitySource.d.ts","sourceRoot":"","sources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CAAC;IAIrC,sBAAsB,CACzB,QAAQ,EAAE,eAAe,CAAC,4BAA4B,CAAC,GACxD,gCAAgC;IAyCtB,+BAA+B,CACxC,sBAAsB,EAAE,sBAAsB,EAC9C,iBAAiB,EAAE,iBAAiB,EACpC,aAAa,EAAE,SAAS,EACxB,kBAAkB,CAAC,EAAE,OAAO,GAC7B,OAAO,CAAC,oBAAoB,CAAC;IA0EzB,iDAAiD,CACpD,qBAAqB,EAAE,qBAAqB,GAC7C,MAAM;IA0BT,OAAc,gCAAgC,0BACnB,MAAM,eAChB,MAAM,cACP,MAAM,UACV,MAAM,KACf,MAAM,CAeP;CACL"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/client/ManagedIdentitySources/CloudShell.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/client/ManagedIdentitySources/CloudShell.d.ts deleted file mode 100644 index 98e79b7..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/client/ManagedIdentitySources/CloudShell.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { INetworkModule, Logger } from "@azure/msal-common/node"; -import { ManagedIdentityRequestParameters } from "../../config/ManagedIdentityRequestParameters.js"; -import { BaseManagedIdentitySource } from "./BaseManagedIdentitySource.js"; -import { NodeStorage } from "../../cache/NodeStorage.js"; -import { CryptoProvider } from "../../crypto/CryptoProvider.js"; -import { ManagedIdentityId } from "../../config/ManagedIdentityId.js"; -/** - * Original source of code: https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/identity/Azure.Identity/src/CloudShellManagedIdentitySource.cs - */ -export declare class CloudShell extends BaseManagedIdentitySource { - private msiEndpoint; - constructor(logger: Logger, nodeStorage: NodeStorage, networkClient: INetworkModule, cryptoProvider: CryptoProvider, msiEndpoint: string); - static getEnvironmentVariables(): Array; - static tryCreate(logger: Logger, nodeStorage: NodeStorage, networkClient: INetworkModule, cryptoProvider: CryptoProvider, managedIdentityId: ManagedIdentityId): CloudShell | null; - createRequest(resource: string): ManagedIdentityRequestParameters; -} -//# sourceMappingURL=CloudShell.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/client/ManagedIdentitySources/CloudShell.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/client/ManagedIdentitySources/CloudShell.d.ts.map deleted file mode 100644 index e7ae158..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/client/ManagedIdentitySources/CloudShell.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"CloudShell.d.ts","sourceRoot":"","sources":["../../../../src/client/ManagedIdentitySources/CloudShell.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,EAAE,gCAAgC,EAAE,MAAM,kDAAkD,CAAC;AACpG,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAahE,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AAEtE;;GAEG;AACH,qBAAa,UAAW,SAAQ,yBAAyB;IACrD,OAAO,CAAC,WAAW,CAAS;gBAGxB,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,WAAW,EACxB,aAAa,EAAE,cAAc,EAC7B,cAAc,EAAE,cAAc,EAC9B,WAAW,EAAE,MAAM;WAOT,uBAAuB,IAAI,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC;WAOpD,SAAS,CACnB,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,WAAW,EACxB,aAAa,EAAE,cAAc,EAC7B,cAAc,EAAE,cAAc,EAC9B,iBAAiB,EAAE,iBAAiB,GACrC,UAAU,GAAG,IAAI;IAwCb,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,gCAAgC;CAc3E"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/client/ManagedIdentitySources/Imds.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/client/ManagedIdentitySources/Imds.d.ts deleted file mode 100644 index dd88a9e..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/client/ManagedIdentitySources/Imds.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { INetworkModule, Logger } from "@azure/msal-common/node"; -import { ManagedIdentityId } from "../../config/ManagedIdentityId.js"; -import { ManagedIdentityRequestParameters } from "../../config/ManagedIdentityRequestParameters.js"; -import { BaseManagedIdentitySource } from "./BaseManagedIdentitySource.js"; -import { CryptoProvider } from "../../crypto/CryptoProvider.js"; -import { NodeStorage } from "../../cache/NodeStorage.js"; -export declare class Imds extends BaseManagedIdentitySource { - private identityEndpoint; - constructor(logger: Logger, nodeStorage: NodeStorage, networkClient: INetworkModule, cryptoProvider: CryptoProvider, identityEndpoint: string); - static tryCreate(logger: Logger, nodeStorage: NodeStorage, networkClient: INetworkModule, cryptoProvider: CryptoProvider): Imds; - createRequest(resource: string, managedIdentityId: ManagedIdentityId): ManagedIdentityRequestParameters; -} -//# sourceMappingURL=Imds.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/client/ManagedIdentitySources/Imds.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/client/ManagedIdentitySources/Imds.d.ts.map deleted file mode 100644 index 2f3cd15..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/client/ManagedIdentitySources/Imds.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Imds.d.ts","sourceRoot":"","sources":["../../../../src/client/ManagedIdentitySources/Imds.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AACtE,OAAO,EAAE,gCAAgC,EAAE,MAAM,kDAAkD,CAAC;AACpG,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAUhE,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AASzD,qBAAa,IAAK,SAAQ,yBAAyB;IAC/C,OAAO,CAAC,gBAAgB,CAAS;gBAG7B,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,WAAW,EACxB,aAAa,EAAE,cAAc,EAC7B,cAAc,EAAE,cAAc,EAC9B,gBAAgB,EAAE,MAAM;WAOd,SAAS,CACnB,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,WAAW,EACxB,aAAa,EAAE,cAAc,EAC7B,cAAc,EAAE,cAAc,GAC/B,IAAI;IA8CA,aAAa,CAChB,QAAQ,EAAE,MAAM,EAChB,iBAAiB,EAAE,iBAAiB,GACrC,gCAAgC;CA4BtC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/client/ManagedIdentitySources/ServiceFabric.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/client/ManagedIdentitySources/ServiceFabric.d.ts deleted file mode 100644 index 875f8f7..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/client/ManagedIdentitySources/ServiceFabric.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { INetworkModule, Logger } from "@azure/msal-common/node"; -import { ManagedIdentityId } from "../../config/ManagedIdentityId.js"; -import { ManagedIdentityRequestParameters } from "../../config/ManagedIdentityRequestParameters.js"; -import { BaseManagedIdentitySource } from "./BaseManagedIdentitySource.js"; -import { NodeStorage } from "../../cache/NodeStorage.js"; -import { CryptoProvider } from "../../crypto/CryptoProvider.js"; -/** - * Original source of code: https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/identity/Azure.Identity/src/ServiceFabricManagedIdentitySource.cs - */ -export declare class ServiceFabric extends BaseManagedIdentitySource { - private identityEndpoint; - private identityHeader; - constructor(logger: Logger, nodeStorage: NodeStorage, networkClient: INetworkModule, cryptoProvider: CryptoProvider, identityEndpoint: string, identityHeader: string); - static getEnvironmentVariables(): Array; - static tryCreate(logger: Logger, nodeStorage: NodeStorage, networkClient: INetworkModule, cryptoProvider: CryptoProvider, managedIdentityId: ManagedIdentityId): ServiceFabric | null; - createRequest(resource: string, managedIdentityId: ManagedIdentityId): ManagedIdentityRequestParameters; -} -//# sourceMappingURL=ServiceFabric.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/client/ManagedIdentitySources/ServiceFabric.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/client/ManagedIdentitySources/ServiceFabric.d.ts.map deleted file mode 100644 index fcb8d45..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/client/ManagedIdentitySources/ServiceFabric.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ServiceFabric.d.ts","sourceRoot":"","sources":["../../../../src/client/ManagedIdentitySources/ServiceFabric.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AACtE,OAAO,EAAE,gCAAgC,EAAE,MAAM,kDAAkD,CAAC;AACpG,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAchE;;GAEG;AACH,qBAAa,aAAc,SAAQ,yBAAyB;IACxD,OAAO,CAAC,gBAAgB,CAAS;IACjC,OAAO,CAAC,cAAc,CAAS;gBAG3B,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,WAAW,EACxB,aAAa,EAAE,cAAc,EAC7B,cAAc,EAAE,cAAc,EAC9B,gBAAgB,EAAE,MAAM,EACxB,cAAc,EAAE,MAAM;WAQZ,uBAAuB,IAAI,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC;WAkBpD,SAAS,CACnB,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,WAAW,EACxB,aAAa,EAAE,cAAc,EAC7B,cAAc,EAAE,cAAc,EAC9B,iBAAiB,EAAE,iBAAiB,GACrC,aAAa,GAAG,IAAI;IA6ChB,aAAa,CAChB,QAAQ,EAAE,MAAM,EAChB,iBAAiB,EAAE,iBAAiB,GACrC,gCAAgC;CA6BtC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/client/OnBehalfOfClient.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/client/OnBehalfOfClient.d.ts deleted file mode 100644 index 5c4a28b..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/client/OnBehalfOfClient.d.ts +++ /dev/null @@ -1,48 +0,0 @@ -import { AuthenticationResult, BaseClient, ClientConfiguration, CommonOnBehalfOfRequest } from "@azure/msal-common/node"; -/** - * On-Behalf-Of client - * @public - */ -export declare class OnBehalfOfClient extends BaseClient { - private scopeSet; - private userAssertionHash; - constructor(configuration: ClientConfiguration); - /** - * Public API to acquire tokens with on behalf of flow - * @param request - developer provided CommonOnBehalfOfRequest - */ - acquireToken(request: CommonOnBehalfOfRequest): Promise; - /** - * look up cache for tokens - * Find idtoken in the cache - * Find accessToken based on user assertion and account info in the cache - * Please note we are not yet supported OBO tokens refreshed with long lived RT. User will have to send a new assertion if the current access token expires - * This is to prevent security issues when the assertion changes over time, however, longlived RT helps retaining the session - * @param request - developer provided CommonOnBehalfOfRequest - */ - private getCachedAuthenticationResult; - /** - * read idtoken from cache, this is a specific implementation for OBO as the requirements differ from a generic lookup in the cacheManager - * Certain use cases of OBO flow do not expect an idToken in the cache/or from the service - * @param atHomeAccountId - account id - */ - private readIdTokenFromCacheForOBO; - /** - * Fetches the cached access token based on incoming assertion - * @param clientId - client id - * @param request - developer provided CommonOnBehalfOfRequest - */ - private readAccessTokenFromCacheForOBO; - /** - * Make a network call to the server requesting credentials - * @param request - developer provided CommonOnBehalfOfRequest - * @param authority - authority object - */ - private executeTokenRequest; - /** - * generate a server request in accepable format - * @param request - developer provided CommonOnBehalfOfRequest - */ - private createTokenRequestBody; -} -//# sourceMappingURL=OnBehalfOfClient.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/client/OnBehalfOfClient.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/client/OnBehalfOfClient.d.ts.map deleted file mode 100644 index 1be7f60..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/client/OnBehalfOfClient.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"OnBehalfOfClient.d.ts","sourceRoot":"","sources":["../../../src/client/OnBehalfOfClient.ts"],"names":[],"mappings":"AAKA,OAAO,EAKH,oBAAoB,EAIpB,UAAU,EAGV,mBAAmB,EACnB,uBAAuB,EAgB1B,MAAM,yBAAyB,CAAC;AAGjC;;;GAGG;AACH,qBAAa,gBAAiB,SAAQ,UAAU;IAC5C,OAAO,CAAC,QAAQ,CAAW;IAC3B,OAAO,CAAC,iBAAiB,CAAS;gBAEtB,aAAa,EAAE,mBAAmB;IAI9C;;;OAGG;IACU,YAAY,CACrB,OAAO,EAAE,uBAAuB,GACjC,OAAO,CAAC,oBAAoB,GAAG,IAAI,CAAC;IA4BvC;;;;;;;OAOG;YACW,6BAA6B;IAqF3C;;;;OAIG;IACH,OAAO,CAAC,0BAA0B;IAuBlC;;;;OAIG;IACH,OAAO,CAAC,8BAA8B;IA4CtC;;;;OAIG;YACW,mBAAmB;IAwDjC;;;OAGG;YACW,sBAAsB;CAmEvC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/client/PublicClientApplication.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/client/PublicClientApplication.d.ts deleted file mode 100644 index 7133ad2..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/client/PublicClientApplication.d.ts +++ /dev/null @@ -1,73 +0,0 @@ -import { AuthenticationResult, AccountInfo } from "@azure/msal-common/node"; -import { Configuration } from "../config/Configuration.js"; -import { ClientApplication } from "./ClientApplication.js"; -import { IPublicClientApplication } from "./IPublicClientApplication.js"; -import { DeviceCodeRequest } from "../request/DeviceCodeRequest.js"; -import { InteractiveRequest } from "../request/InteractiveRequest.js"; -import { SilentFlowRequest } from "../request/SilentFlowRequest.js"; -import { SignOutRequest } from "../request/SignOutRequest.js"; -/** - * This class is to be used to acquire tokens for public client applications (desktop, mobile). Public client applications - * are not trusted to safely store application secrets, and therefore can only request tokens in the name of an user. - * @public - */ -export declare class PublicClientApplication extends ClientApplication implements IPublicClientApplication { - private nativeBrokerPlugin?; - private readonly skus; - /** - * Important attributes in the Configuration object for auth are: - * - clientID: the application ID of your application. You can obtain one by registering your application with our Application registration portal. - * - authority: the authority URL for your application. - * - * AAD authorities are of the form https://login.microsoftonline.com/\{Enter_the_Tenant_Info_Here\}. - * - If your application supports Accounts in one organizational directory, replace "Enter_the_Tenant_Info_Here" value with the Tenant Id or Tenant name (for example, contoso.microsoft.com). - * - If your application supports Accounts in any organizational directory, replace "Enter_the_Tenant_Info_Here" value with organizations. - * - If your application supports Accounts in any organizational directory and personal Microsoft accounts, replace "Enter_the_Tenant_Info_Here" value with common. - * - To restrict support to Personal Microsoft accounts only, replace "Enter_the_Tenant_Info_Here" value with consumers. - * - * Azure B2C authorities are of the form https://\{instance\}/\{tenant\}/\{policy\}. Each policy is considered - * its own authority. You will have to set the all of the knownAuthorities at the time of the client application - * construction. - * - * ADFS authorities are of the form https://\{instance\}/adfs. - */ - constructor(configuration: Configuration); - /** - * Acquires a token from the authority using OAuth2.0 device code flow. - * This flow is designed for devices that do not have access to a browser or have input constraints. - * The authorization server issues a DeviceCode object with a verification code, an end-user code, - * and the end-user verification URI. The DeviceCode object is provided through a callback, and the end-user should be - * instructed to use another device to navigate to the verification URI to input credentials. - * Since the client cannot receive incoming requests, it polls the authorization server repeatedly - * until the end-user completes input of credentials. - */ - acquireTokenByDeviceCode(request: DeviceCodeRequest): Promise; - /** - * Acquires a token interactively via the browser by requesting an authorization code then exchanging it for a token. - */ - acquireTokenInteractive(request: InteractiveRequest): Promise; - /** - * Returns a token retrieved either from the cache or by exchanging the refresh token for a fresh access token. If brokering is enabled the token request will be serviced by the broker. - * @param request - developer provided SilentFlowRequest - * @returns - */ - acquireTokenSilent(request: SilentFlowRequest): Promise; - /** - * Removes cache artifacts associated with the given account - * @param request - developer provided SignOutRequest - * @returns - */ - signOut(request: SignOutRequest): Promise; - /** - * Returns all cached accounts for this application. If brokering is enabled this request will be serviced by the broker. - * @returns - */ - getAllAccounts(): Promise; - /** - * Attempts to retrieve the redirectUri from the loopback server. If the loopback server does not start listening for requests within the timeout this will throw. - * @param loopbackClient - developer provided custom loopback server implementation - * @returns - */ - private waitForRedirectUri; -} -//# sourceMappingURL=PublicClientApplication.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/client/PublicClientApplication.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/client/PublicClientApplication.d.ts.map deleted file mode 100644 index 4bebd18..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/client/PublicClientApplication.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"PublicClientApplication.d.ts","sourceRoot":"","sources":["../../../src/client/PublicClientApplication.ts"],"names":[],"mappings":"AAUA,OAAO,EACH,oBAAoB,EAUpB,WAAW,EAKd,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AAGpE,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AAGtE,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAK9D;;;;GAIG;AACH,qBAAa,uBACT,SAAQ,iBACR,YAAW,wBAAwB;IAEnC,OAAO,CAAC,kBAAkB,CAAC,CAAsB;IACjD,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAS;IAC9B;;;;;;;;;;;;;;;;OAgBG;gBACS,aAAa,EAAE,aAAa;IAoBxC;;;;;;;;OAQG;IACU,wBAAwB,CACjC,OAAO,EAAE,iBAAiB,GAC3B,OAAO,CAAC,oBAAoB,GAAG,IAAI,CAAC;IAqCvC;;OAEG;IACG,uBAAuB,CACzB,OAAO,EAAE,kBAAkB,GAC5B,OAAO,CAAC,oBAAoB,CAAC;IAgGhC;;;;OAIG;IACG,kBAAkB,CACpB,OAAO,EAAE,iBAAiB,GAC3B,OAAO,CAAC,oBAAoB,CAAC;IA0BhC;;;;OAIG;IACG,OAAO,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;IAkBrD;;;OAGG;IACG,cAAc,IAAI,OAAO,CAAC,WAAW,EAAE,CAAC;IAY9C;;;;OAIG;YACW,kBAAkB;CAsCnC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/client/UsernamePasswordClient.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/client/UsernamePasswordClient.d.ts deleted file mode 100644 index f165c19..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/client/UsernamePasswordClient.d.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { AuthenticationResult, BaseClient, ClientConfiguration, CommonUsernamePasswordRequest } from "@azure/msal-common/node"; -/** - * Oauth2.0 Password grant client - * Note: We are only supporting public clients for password grant and for purely testing purposes - * @public - */ -export declare class UsernamePasswordClient extends BaseClient { - constructor(configuration: ClientConfiguration); - /** - * API to acquire a token by passing the username and password to the service in exchage of credentials - * password_grant - * @param request - CommonUsernamePasswordRequest - */ - acquireToken(request: CommonUsernamePasswordRequest): Promise; - /** - * Executes POST request to token endpoint - * @param authority - authority object - * @param request - CommonUsernamePasswordRequest provided by the developer - */ - private executeTokenRequest; - /** - * Generates a map for all the params to be sent to the service - * @param request - CommonUsernamePasswordRequest provided by the developer - */ - private createTokenRequestBody; -} -//# sourceMappingURL=UsernamePasswordClient.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/client/UsernamePasswordClient.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/client/UsernamePasswordClient.d.ts.map deleted file mode 100644 index 8b83483..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/client/UsernamePasswordClient.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"UsernamePasswordClient.d.ts","sourceRoot":"","sources":["../../../src/client/UsernamePasswordClient.ts"],"names":[],"mappings":"AAKA,OAAO,EACH,oBAAoB,EAEpB,UAAU,EAGV,mBAAmB,EACnB,6BAA6B,EAWhC,MAAM,yBAAyB,CAAC;AAEjC;;;;GAIG;AACH,qBAAa,sBAAuB,SAAQ,UAAU;gBACtC,aAAa,EAAE,mBAAmB;IAI9C;;;;OAIG;IACG,YAAY,CACd,OAAO,EAAE,6BAA6B,GACvC,OAAO,CAAC,oBAAoB,GAAG,IAAI,CAAC;IA8BvC;;;;OAIG;YACW,mBAAmB;IAmCjC;;;OAGG;YACW,sBAAsB;CAyEvC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/config/Configuration.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/config/Configuration.d.ts deleted file mode 100644 index 84fd581..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/config/Configuration.d.ts +++ /dev/null @@ -1,136 +0,0 @@ -/// -/// -import { LoggerOptions, INetworkModule, ProtocolMode, ICachePlugin, AzureCloudOptions, ApplicationTelemetry, INativeBrokerPlugin, ClientAssertionCallback } from "@azure/msal-common/node"; -import http from "http"; -import https from "https"; -import { ManagedIdentityId } from "./ManagedIdentityId.js"; -/** - * - clientId - Client id of the application. - * - authority - Url of the authority. If no value is set, defaults to https://login.microsoftonline.com/common. - * - knownAuthorities - Needed for Azure B2C and ADFS. All authorities that will be used in the client application. Only the host of the authority should be passed in. - * - clientSecret - Secret string that the application uses when requesting a token. Only used in confidential client applications. Can be created in the Azure app registration portal. - * - clientAssertion - A ClientAssertion object containing an assertion string or a callback function that returns an assertion string that the application uses when requesting a token, as well as the assertion's type (urn:ietf:params:oauth:client-assertion-type:jwt-bearer). Only used in confidential client applications. - * - clientCertificate - Certificate that the application uses when requesting a token. Only used in confidential client applications. Requires hex encoded X.509 SHA-1 or SHA-256 thumbprint of the certificate, and the PEM encoded private key (string should contain -----BEGIN PRIVATE KEY----- ... -----END PRIVATE KEY----- ) - * - protocolMode - Enum that represents the protocol that msal follows. Used for configuring proper endpoints. - * - skipAuthorityMetadataCache - A flag to choose whether to use or not use the local metadata cache during authority initialization. Defaults to false. - * @public - */ -export type NodeAuthOptions = { - clientId: string; - authority?: string; - clientSecret?: string; - clientAssertion?: string | ClientAssertionCallback; - clientCertificate?: { - /** - * @deprecated Use thumbprintSha2 property instead. Thumbprint needs to be computed with SHA-256 algorithm. - * SHA-1 is only needed for backwards compatibility with older versions of ADFS. - */ - thumbprint?: string; - thumbprintSha256?: string; - privateKey: string; - x5c?: string; - }; - knownAuthorities?: Array; - cloudDiscoveryMetadata?: string; - authorityMetadata?: string; - clientCapabilities?: Array; - protocolMode?: ProtocolMode; - azureCloudOptions?: AzureCloudOptions; - skipAuthorityMetadataCache?: boolean; -}; -/** - * Use this to configure the below cache configuration options: - * - * - cachePlugin - Plugin for reading and writing token cache to disk. - * @public - */ -export type CacheOptions = { - cachePlugin?: ICachePlugin; - /** - * @deprecated claims-based-caching functionality will be removed in the next version of MSALJS - */ - claimsBasedCachingEnabled?: boolean; -}; -/** - * Use this to configure the below broker options: - * - nativeBrokerPlugin - Native broker implementation (should be imported from msal-node-extensions) - * - * Note: These options are only available for PublicClientApplications using the Authorization Code Flow - * @public - */ -export type BrokerOptions = { - nativeBrokerPlugin?: INativeBrokerPlugin; -}; -/** - * Type for configuring logger and http client options - * - * - logger - Used to initialize the Logger object; TODO: Expand on logger details or link to the documentation on logger - * - networkClient - Http client used for all http get and post calls. Defaults to using MSAL's default http client. - * @public - */ -export type NodeSystemOptions = { - loggerOptions?: LoggerOptions; - networkClient?: INetworkModule; - proxyUrl?: string; - customAgentOptions?: http.AgentOptions | https.AgentOptions; - disableInternalRetries?: boolean; -}; -/** @public */ -export type NodeTelemetryOptions = { - application?: ApplicationTelemetry; -}; -/** - * Use the configuration object to configure MSAL and initialize the client application object - * - * - auth: this is where you configure auth elements like clientID, authority used for authenticating against the Microsoft Identity Platform - * - broker: this is where you configure broker options - * - cache: this is where you configure cache location - * - system: this is where you can configure the network client, logger - * - telemetry: this is where you can configure telemetry options - * @public - */ -export type Configuration = { - auth: NodeAuthOptions; - broker?: BrokerOptions; - cache?: CacheOptions; - system?: NodeSystemOptions; - telemetry?: NodeTelemetryOptions; -}; -/** @public */ -export type ManagedIdentityIdParams = { - userAssignedClientId?: string; - userAssignedResourceId?: string; - userAssignedObjectId?: string; -}; -/** @public */ -export type ManagedIdentityConfiguration = { - managedIdentityIdParams?: ManagedIdentityIdParams; - system?: NodeSystemOptions; -}; -/** @internal */ -export type NodeConfiguration = { - auth: Required; - broker: BrokerOptions; - cache: CacheOptions; - system: Required; - telemetry: Required; -}; -/** - * Sets the default options when not explicitly configured from app developer - * - * @param auth - Authentication options - * @param cache - Cache options - * @param system - System options - * @param telemetry - Telemetry options - * - * @returns Configuration - * @internal - */ -export declare function buildAppConfiguration({ auth, broker, cache, system, telemetry, }: Configuration): NodeConfiguration; -/** @internal */ -export type ManagedIdentityNodeConfiguration = { - managedIdentityId: ManagedIdentityId; - system: Required>; -}; -export declare function buildManagedIdentityConfiguration({ managedIdentityIdParams, system, }: ManagedIdentityConfiguration): ManagedIdentityNodeConfiguration; -//# sourceMappingURL=Configuration.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/config/Configuration.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/config/Configuration.d.ts.map deleted file mode 100644 index 4171ca1..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/config/Configuration.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Configuration.d.ts","sourceRoot":"","sources":["../../../src/config/Configuration.ts"],"names":[],"mappings":";;AAKA,OAAO,EACH,aAAa,EACb,cAAc,EAEd,YAAY,EACZ,YAAY,EAGZ,iBAAiB,EACjB,oBAAoB,EACpB,mBAAmB,EACnB,uBAAuB,EAC1B,MAAM,yBAAyB,CAAC;AAEjC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAU3D;;;;;;;;;;GAUG;AACH,MAAM,MAAM,eAAe,GAAG;IAC1B,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,eAAe,CAAC,EAAE,MAAM,GAAG,uBAAuB,CAAC;IACnD,iBAAiB,CAAC,EAAE;QAChB;;;WAGG;QACH,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,gBAAgB,CAAC,EAAE,MAAM,CAAC;QAC1B,UAAU,EAAE,MAAM,CAAC;QACnB,GAAG,CAAC,EAAE,MAAM,CA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AM,uBAAuB,GAAG;IAClC,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,oBAAoB,CAAC,EAAE,MAAM,CAAC;CACjC,CAAC;AAEF,cAAc;AACd,MAAM,MAAM,4BAA4B,GAAG;IACvC,uBAAuB,CAAC,EAAE,uBAAuB,CAAC;IAClD,MAAM,CAAC,EAAE,iBAAiB,CAAC;CAC9B,CAAC;AAoDF,gBAAgB;AAChB,MAAM,MAAM,iBAAiB,GAAG;IAC5B,IAAI,EAAE,QAAQ,CAAC,eAAe,CAAC,CAAC;IAChC,MAAM,EAAE,aAAa,CAAC;IACtB,KAAK,EAAE,YAAY,CAAC;IACpB,MAAM,EAAE,QAAQ,CAAC,iBAAiB,CAAC,CAAC;IACpC,SAAS,EAAE,QAAQ,CAAC,oBAAoB,CAAC,CAAC;CAC7C,CAAC;AAEF;;;;;;;;;;GAUG;AACH,wBAAgB,qBAAqB,CAAC,EAClC,IAAI,EACJ,MAAM,EACN,KAAK,EACL,MAAM,EACN,SAAS,GACZ,EAAE,aAAa,GAAG,iBAAiB,CA2BnC;AAED,gBAAgB;AAChB,MAAM,MAAM,gCAAgC,GAAG;IAC3C,iBAAiB,EAAE,iBAAiB,CAAC;IACrC,MAAM,EAAE,QAAQ,CACZ,IAAI,CAAC,iBAAiB,EAAE,eAAe,GAAG,eAAe,CAAC,CAC7D,CAAC;CACL,CAAC;AAEF,wBAAgB,iCAAiC,CAAC,EAC9C,uBAAuB,EACvB,MAAM,GACT,EAAE,4BAA4B,GAAG,gCAAgC,CAwCjE"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/config/ManagedIdentityId.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/config/ManagedIdentityId.d.ts deleted file mode 100644 index 48cf9d1..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/config/ManagedIdentityId.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { ManagedIdentityIdType } from "../utils/Constants.js"; -import { ManagedIdentityIdParams } from "./Configuration.js"; -export declare class ManagedIdentityId { - private _id; - get id(): string; - private set id(value); - private _idType; - get idType(): ManagedIdentityIdType; - private set idType(value); - constructor(managedIdentityIdParams?: ManagedIdentityIdParams); -} -//# sourceMappingURL=ManagedIdentityId.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/config/ManagedIdentityId.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/config/ManagedIdentityId.d.ts.map deleted file mode 100644 index 5c20282..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/config/ManagedIdentityId.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ManagedIdentityId.d.ts","sourceRoot":"","sources":["../../../src/config/ManagedIdentityId.ts"],"names":[],"mappings":"AASA,OAAO,EAEH,qBAAqB,EACxB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAE7D,qBAAa,iBAAiB;IAC1B,OAAO,CAAC,GAAG,CAAS;IACpB,IAAW,EAAE,IAAI,MAAM,CAEtB;IACD,OAAO,KAAK,EAAE,QAEb;IAED,OAAO,CAAC,OAAO,CAAwB;IACvC,IAAW,MAAM,IAAI,qBAAqB,CAEzC;IACD,OAAO,KAAK,MAAM,QAEjB;gBAEW,uBAAuB,CAAC,EAAE,uBAAuB;CAwChE"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/config/ManagedIdentityRequestParameters.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/config/ManagedIdentityRequestParameters.d.ts deleted file mode 100644 index 401c423..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/config/ManagedIdentityRequestParameters.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { HttpMethod } from "../utils/Constants.js"; -export declare class ManagedIdentityRequestParameters { - private _baseEndpoint; - httpMethod: HttpMethod; - headers: Record; - bodyParameters: Record; - queryParameters: Record; - constructor(httpMethod: HttpMethod, endpoint: string); - computeUri(): string; - computeParametersBodyString(): string; -} -//# sourceMappingURL=ManagedIdentityRequestParameters.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/config/ManagedIdentityRequestParameters.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/config/ManagedIdentityRequestParameters.d.ts.map deleted file mode 100644 index 47dc214..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/config/ManagedIdentityRequestParameters.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ManagedIdentityRequestParameters.d.ts","sourceRoot":"","sources":["../../../src/config/ManagedIdentityRequestParameters.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAEnD,qBAAa,gCAAgC;IACzC,OAAO,CAAC,aAAa,CAAS;IACvB,UAAU,EAAE,UAAU,CAAC;IACvB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChC,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACvC,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;gBAEnC,UAAU,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM;IAQ7C,UAAU,IAAI,MAAM;IAepB,2BAA2B,IAAI,MAAM;CAS/C"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/crypto/CryptoProvider.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/crypto/CryptoProvider.d.ts deleted file mode 100644 index b199c9f..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/crypto/CryptoProvider.d.ts +++ /dev/null @@ -1,63 +0,0 @@ -import { ICrypto, PkceCodes } from "@azure/msal-common/node"; -/** - * This class implements MSAL node's crypto interface, which allows it to perform base64 encoding and decoding, generating cryptographically random GUIDs and - * implementing Proof Key for Code Exchange specs for the OAuth Authorization Code Flow using PKCE (rfc here: https://tools.ietf.org/html/rfc7636). - * @public - */ -export declare class CryptoProvider implements ICrypto { - private pkceGenerator; - private guidGenerator; - private hashUtils; - constructor(); - /** - * base64 URL safe encoded string - */ - base64UrlEncode(): string; - /** - * Stringifies and base64Url encodes input public key - * @param inputKid - public key id - * @returns Base64Url encoded public key - */ - encodeKid(): string; - /** - * Creates a new random GUID - used to populate state and nonce. - * @returns string (GUID) - */ - createNewGuid(): string; - /** - * Encodes input string to base64. - * @param input - string to be encoded - */ - base64Encode(input: string): string; - /** - * Decodes input string from base64. - * @param input - string to be decoded - */ - base64Decode(input: string): string; - /** - * Generates PKCE codes used in Authorization Code Flow. - */ - generatePkceCodes(): Promise; - /** - * Generates a keypair, stores it and returns a thumbprint - not yet implemented for node - */ - getPublicKeyThumbprint(): Promise; - /** - * Removes cryptographic keypair from key store matching the keyId passed in - * @param kid - public key id - */ - removeTokenBindingKey(): Promise; - /** - * Removes all cryptographic keys from Keystore - */ - clearKeystore(): Promise; - /** - * Signs the given object as a jwt payload with private key retrieved by given kid - currently not implemented for node - */ - signJwt(): Promise; - /** - * Returns the SHA-256 hash of an input string - */ - hashString(plainText: string): Promise; -} -//# sourceMappingURL=CryptoProvider.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/crypto/CryptoProvider.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/crypto/CryptoProvider.d.ts.map deleted file mode 100644 index 110f174..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/crypto/CryptoProvider.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"CryptoProvider.d.ts","sourceRoot":"","sources":["../../../src/crypto/CryptoProvider.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAM7D;;;;GAIG;AACH,qBAAa,cAAe,YAAW,OAAO;IAC1C,OAAO,CAAC,aAAa,CAAgB;IACrC,OAAO,CAAC,aAAa,CAAgB;IACrC,OAAO,CAAC,SAAS,CAAY;;IAS7B;;OAEG;IACH,eAAe,IAAI,MAAM;IAGzB;;;;OAIG;IACH,SAAS,IAAI,MAAM;IAInB;;;OAGG;IACH,aAAa,IAAI,MAAM;IAIvB;;;OAGG;IACH,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM;IAInC;;;OAGG;IACH,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM;IAInC;;OAEG;IACH,iBAAiB,IAAI,OAAO,CAAC,SAAS,CAAC;IAIvC;;OAEG;IACH,sBAAsB,IAAI,OAAO,CAAC,MAAM,CAAC;IAIzC;;;OAGG;IACH,qBAAqB,IAAI,OAAO,CAAC,OAAO,CAAC;IAIzC;;OAEG;IACH,aAAa,IAAI,OAAO,CAAC,OAAO,CAAC;IAIjC;;OAEG;IACH,OAAO,IAAI,OAAO,CAAC,MAAM,CAAC;IAI1B;;OAEG;IACG,UAAU,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;CAMvD"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/crypto/GuidGenerator.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/crypto/GuidGenerator.d.ts deleted file mode 100644 index bb18822..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/crypto/GuidGenerator.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { IGuidGenerator } from "@azure/msal-common/node"; -export declare class GuidGenerator implements IGuidGenerator { - /** - * - * RFC4122: The version 4 UUID is meant for generating UUIDs from truly-random or pseudo-random numbers. - * uuidv4 generates guids from cryprtographically-string random - */ - generateGuid(): string; - /** - * verifies if a string is GUID - * @param guid - */ - isGuid(guid: string): boolean; -} -//# sourceMappingURL=GuidGenerator.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/crypto/GuidGenerator.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/crypto/GuidGenerator.d.ts.map deleted file mode 100644 index 46049f1..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/crypto/GuidGenerator.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"GuidGenerator.d.ts","sourceRoot":"","sources":["../../../src/crypto/GuidGenerator.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAGzD,qBAAa,aAAc,YAAW,cAAc;IAChD;;;;OAIG;IACH,YAAY,IAAI,MAAM;IAItB;;;OAGG;IACH,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;CAKhC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/crypto/HashUtils.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/crypto/HashUtils.d.ts deleted file mode 100644 index e3707db..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/crypto/HashUtils.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -/// -/// -export declare class HashUtils { - /** - * generate 'SHA256' hash - * @param buffer - */ - sha256(buffer: string): Buffer; -} -//# sourceMappingURL=HashUtils.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/crypto/HashUtils.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/crypto/HashUtils.d.ts.map deleted file mode 100644 index d956241..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/crypto/HashUtils.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"HashUtils.d.ts","sourceRoot":"","sources":["../../../src/crypto/HashUtils.ts"],"names":[],"mappings":";;AAQA,qBAAa,SAAS;IAClB;;;OAGG;IACH,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM;CAGjC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/crypto/PkceGenerator.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/crypto/PkceGenerator.d.ts deleted file mode 100644 index 19dd733..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/crypto/PkceGenerator.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { PkceCodes } from "@azure/msal-common/node"; -/** - * https://tools.ietf.org/html/rfc7636#page-8 - */ -export declare class PkceGenerator { - private hashUtils; - constructor(); - /** - * generates the codeVerfier and the challenge from the codeVerfier - * reference: https://tools.ietf.org/html/rfc7636#section-4.1 and https://tools.ietf.org/html/rfc7636#section-4.2 - */ - generatePkceCodes(): Promise; - /** - * generates the codeVerfier; reference: https://tools.ietf.org/html/rfc7636#section-4.1 - */ - private generateCodeVerifier; - /** - * generate the challenge from the codeVerfier; reference: https://tools.ietf.org/html/rfc7636#section-4.2 - * @param codeVerifier - */ - private generateCodeChallengeFromVerifier; -} -//# sourceMappingURL=PkceGenerator.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/crypto/PkceGenerator.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/crypto/PkceGenerator.d.ts.map deleted file mode 100644 index 09d6905..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/crypto/PkceGenerator.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"PkceGenerator.d.ts","sourceRoot":"","sources":["../../../src/crypto/PkceGenerator.ts"],"names":[],"mappings":"AAKA,OAAO,EAAa,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAM/D;;GAEG;AACH,qBAAa,aAAa;IACtB,OAAO,CAAC,SAAS,CAAY;;IAK7B;;;OAGG;IACG,iBAAiB,IAAI,OAAO,CAAC,SAAS,CAAC;IAM7C;;OAEG;IACH,OAAO,CAAC,oBAAoB;IAmB5B;;;OAGG;IACH,OAAO,CAAC,iCAAiC;CAM5C"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/error/ManagedIdentityError.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/error/ManagedIdentityError.d.ts deleted file mode 100644 index 03382be..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/error/ManagedIdentityError.d.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { AuthError } from "@azure/msal-common/node"; -import * as ManagedIdentityErrorCodes from "./ManagedIdentityErrorCodes.js"; -export { ManagedIdentityErrorCodes }; -/** - * ManagedIdentityErrorMessage class containing string constants used by error codes and messages. - */ -export declare const ManagedIdentityErrorMessages: { - invalid_file_extension: string; - invalid_file_path: string; - invalid_managed_identity_id_type: string; - invalid_secret: string; - platform_not_supported: string; - missing_client_id: string; - azure_pod_identity_authority_host_url_malformed: string; - identity_endpoint_url_malformed: string; - imds_endpoint_url_malformed: string; - msi_endpoint_url_malformed: string; - network_unavailable: string; - unable_to_create_azure_arc: string; - unable_to_create_cloud_shell: string; - unable_to_create_source: string; - unable_to_read_secret_file: string; - user_assigned_not_available_at_runtime: string; - www_authenticate_header_missing: string; - www_authenticate_header_unsupported_format: string; -}; -export declare class ManagedIdentityError extends AuthError { - constructor(errorCode: string); -} -export declare function createManagedIdentityError(errorCode: string): ManagedIdentityError; -//# sourceMappingURL=ManagedIdentityError.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/error/ManagedIdentityError.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/error/ManagedIdentityError.d.ts.map deleted file mode 100644 index 00b0c04..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/error/ManagedIdentityError.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ManagedIdentityError.d.ts","sourceRoot":"","sources":["../../../src/error/ManagedIdentityError.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,KAAK,yBAAyB,MAAM,gCAAgC,CAAC;AAE5E,OAAO,EAAE,yBAAyB,EAAE,CAAC;AAErC;;GAEG;AACH,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;CAqCxC,CAAC;AAEF,qBAAa,oBAAqB,SAAQ,SAAS;gBACnC,SAAS,EAAE,MAAM;CAKhC;AAED,wBAAgB,0BAA0B,CACtC,SAAS,EAAE,MAAM,GAClB,oBAAoB,CAEtB"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/error/ManagedIdentityErrorCodes.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/error/ManagedIdentityErrorCodes.d.ts deleted file mode 100644 index cf40e0c..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/error/ManagedIdentityErrorCodes.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -export declare const invalidFileExtension = "invalid_file_extension"; -export declare const invalidFilePath = "invalid_file_path"; -export declare const invalidManagedIdentityIdType = "invalid_managed_identity_id_type"; -export declare const invalidSecret = "invalid_secret"; -export declare const missingId = "missing_client_id"; -export declare const networkUnavailable = "network_unavailable"; -export declare const platformNotSupported = "platform_not_supported"; -export declare const unableToCreateAzureArc = "unable_to_create_azure_arc"; -export declare const unableToCreateCloudShell = "unable_to_create_cloud_shell"; -export declare const unableToCreateSource = "unable_to_create_source"; -export declare const unableToReadSecretFile = "unable_to_read_secret_file"; -export declare const urlParseError = "url_parse_error"; -export declare const userAssignedNotAvailableAtRuntime = "user_assigned_not_available_at_runtime"; -export declare const wwwAuthenticateHeaderMissing = "www_authenticate_header_missing"; -export declare const wwwAuthenticateHeaderUnsupportedFormat = "www_authenticate_header_unsupported_format"; -export declare const MsiEnvironmentVariableUrlMalformedErrorCodes: { - readonly AZURE_POD_IDENTITY_AUTHORITY_HOST: "azure_pod_identity_authority_host_url_malformed"; - readonly IDENTITY_ENDPOINT: "identity_endpoint_url_malformed"; - readonly IMDS_ENDPOINT: "imds_endpoint_url_malformed"; - readonly MSI_ENDPOINT: "msi_endpoint_url_malformed"; -}; -export type MsiEnvironmentVariableErrorCodes = (typeof MsiEnvironmentVariableUrlMalformedErrorCodes)[keyof typeof MsiEnvironmentVariableUrlMalformedErrorCodes]; -//# sourceMappingURL=ManagedIdentityErrorCodes.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/error/ManagedIdentityErrorCodes.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/error/ManagedIdentityErrorCodes.d.ts.map deleted file mode 100644 index c9b8ee6..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/error/ManagedIdentityErrorCodes.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ManagedIdentityErrorCodes.d.ts","sourceRoot":"","sources":["../../../src/error/ManagedIdentityErrorCodes.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,oBAAoB,2BAA2B,CAAC;AAC7D,eAAO,MAAM,eAAe,sBAAsB,CAAC;AACnD,eAAO,MAAM,4BAA4B,qCAAqC,CAAC;AAC/E,eAAO,MAAM,aAAa,mBAAmB,CAAC;AAC9C,eAAO,MAAM,SAAS,sBAAsB,CAAC;AAC7C,eAAO,MAAM,kBAAkB,wBAAwB,CAAC;AACxD,eAAO,MAAM,oBAAoB,2BAA2B,CAAC;AAC7D,eAAO,MAAM,sBAAsB,+BAA+B,CAAC;AACnE,eAAO,MAAM,wBAAwB,iCAAiC,CAAC;AACvE,eAAO,MAAM,oBAAoB,4BAA4B,CAAC;AAC9D,eAAO,MAAM,sBAAsB,+BAA+B,CAAC;AACnE,eAAO,MAAM,aAAa,oBAAoB,CAAC;AAC/C,eAAO,MAAM,iCAAiC,2CACF,CAAC;AAC7C,eAAO,MAAM,4BAA4B,oCAAoC,CAAC;AAC9E,eAAO,MAAM,sCAAsC,+CACH,CAAC;AAEjD,eAAO,MAAM,4CAA4C;;;;;CAS/C,CAAC;AACX,MAAM,MAAM,gCAAgC,GACxC,CAAC,OAAO,4CAA4C,CAAC,CAAC,MAAM,OAAO,4CAA4C,CAAC,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/error/NodeAuthError.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/error/NodeAuthError.d.ts deleted file mode 100644 index ff19716..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/error/NodeAuthError.d.ts +++ /dev/null @@ -1,74 +0,0 @@ -import { AuthError } from "@azure/msal-common/node"; -/** - * NodeAuthErrorMessage class containing string constants used by error codes and messages. - */ -export declare const NodeAuthErrorMessage: { - invalidLoopbackAddressType: { - code: string; - desc: string; - }; - unableToLoadRedirectUri: { - code: string; - desc: string; - }; - noAuthCodeInResponse: { - code: string; - desc: string; - }; - noLoopbackServerExists: { - code: string; - desc: string; - }; - loopbackServerAlreadyExists: { - code: string; - desc: string; - }; - loopbackServerTimeout: { - code: string; - desc: string; - }; - stateNotFoundError: { - code: string; - desc: string; - }; - thumbprintMissing: { - code: string; - desc: string; - }; -}; -export declare class NodeAuthError extends AuthError { - constructor(errorCode: string, errorMessage?: string); - /** - * Creates an error thrown if loopback server address is of type string. - */ - static createInvalidLoopbackAddressTypeError(): NodeAuthError; - /** - * Creates an error thrown if the loopback server is unable to get a url. - */ - static createUnableToLoadRedirectUrlError(): NodeAuthError; - /** - * Creates an error thrown if the server response does not contain an auth code. - */ - static createNoAuthCodeInResponseError(): NodeAuthError; - /** - * Creates an error thrown if the loopback server has not been spun up yet. - */ - static createNoLoopbackServerExistsError(): NodeAuthError; - /** - * Creates an error thrown if a loopback server already exists when attempting to create another one. - */ - static createLoopbackServerAlreadyExistsError(): NodeAuthError; - /** - * Creates an error thrown if the loopback server times out registering the auth code listener. - */ - static createLoopbackServerTimeoutError(): NodeAuthError; - /** - * Creates an error thrown when the state is not present. - */ - static createStateNotFoundError(): NodeAuthError; - /** - * Creates an error thrown when client certificate was provided, but neither the SHA-1 or SHA-256 thumbprints were provided - */ - static createThumbprintMissingError(): NodeAuthError; -} -//# sourceMappingURL=NodeAuthError.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/error/NodeAuthError.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/error/NodeAuthError.d.ts.map deleted file mode 100644 index 8b33b5c..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/error/NodeAuthError.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"NodeAuthError.d.ts","sourceRoot":"","sources":["../../../src/error/NodeAuthError.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAEpD;;GAEG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiChC,CAAC;AAEF,qBAAa,aAAc,SAAQ,SAAS;gBAC5B,SAAS,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,MAAM;IAKpD;;OAEG;IACH,MAAM,CAAC,qCAAqC,IAAI,aAAa;IAO7D;;OAEG;IACH,MAAM,CAAC,kCAAkC,IAAI,aAAa;IAO1D;;OAEG;IACH,MAAM,CAAC,+BAA+B,IAAI,aAAa;IAOvD;;OAEG;IACH,MAAM,CAAC,iCAAiC,IAAI,aAAa;IAOzD;;OAEG;IACH,MAAM,CAAC,sCAAsC,IAAI,aAAa;IAO9D;;OAEG;IACH,MAAM,CAAC,gCAAgC,IAAI,aAAa;IAOxD;;OAEG;IACH,MAAM,CAAC,wBAAwB,IAAI,aAAa;IAOhD;;OAEG;IACH,MAAM,CAAC,4BAA4B,IAAI,aAAa;CAMvD"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/index.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/index.d.ts deleted file mode 100644 index 26279fb..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/index.d.ts +++ /dev/null @@ -1,46 +0,0 @@ -/** - * @packageDocumentation - * @module @azure/msal-node - */ -/** - * Warning: This set of exports is purely intended to be used by other MSAL libraries, and should be considered potentially unstable. We strongly discourage using them directly, you do so at your own risk. - * Breaking changes to these APIs will be shipped under a minor version, instead of a major version. - */ -import * as internals from "./internals.js"; -export { internals }; -export { IPublicClientApplication } from "./client/IPublicClientApplication.js"; -export { IConfidentialClientApplication } from "./client/IConfidentialClientApplication.js"; -export { ITokenCache } from "./cache/ITokenCache.js"; -export { ICacheClient } from "./cache/distributed/ICacheClient.js"; -export { IPartitionManager } from "./cache/distributed/IPartitionManager.js"; -export { ILoopbackClient } from "./network/ILoopbackClient.js"; -export { PublicClientApplication } from "./client/PublicClientApplication.js"; -export { ConfidentialClientApplication } from "./client/ConfidentialClientApplication.js"; -export { ClientApplication } from "./client/ClientApplication.js"; -export { ClientCredentialClient } from "./client/ClientCredentialClient.js"; -export { DeviceCodeClient } from "./client/DeviceCodeClient.js"; -export { OnBehalfOfClient } from "./client/OnBehalfOfClient.js"; -export { ManagedIdentityApplication } from "./client/ManagedIdentityApplication.js"; -export { UsernamePasswordClient } from "./client/UsernamePasswordClient.js"; -export { Configuration, ManagedIdentityConfiguration, ManagedIdentityIdParams, NodeAuthOptions, NodeSystemOptions, BrokerOptions, NodeTelemetryOptions, CacheOptions, } from "./config/Configuration.js"; -export { ClientAssertion } from "./client/ClientAssertion.js"; -export { TokenCache } from "./cache/TokenCache.js"; -export { NodeStorage } from "./cache/NodeStorage.js"; -export { CacheKVStore, JsonCache, InMemoryCache, SerializedAccountEntity, SerializedIdTokenEntity, SerializedAccessTokenEntity, SerializedAppMetadataEntity, SerializedRefreshTokenEntity, } from "./cache/serializer/SerializerTypes.js"; -export { DistributedCachePlugin } from "./cache/distributed/DistributedCachePlugin.js"; -export { ManagedIdentitySourceNames } from "./utils/Constants.js"; -export { CryptoProvider } from "./crypto/CryptoProvider.js"; -export type { AuthorizationCodeRequest } from "./request/AuthorizationCodeRequest.js"; -export type { AuthorizationUrlRequest } from "./request/AuthorizationUrlRequest.js"; -export type { ClientCredentialRequest } from "./request/ClientCredentialRequest.js"; -export type { DeviceCodeRequest } from "./request/DeviceCodeRequest.js"; -export type { OnBehalfOfRequest } from "./request/OnBehalfOfRequest.js"; -export type { UsernamePasswordRequest } from "./request/UsernamePasswordRequest.js"; -export type { RefreshTokenRequest } from "./request/RefreshTokenRequest.js"; -export type { SilentFlowRequest } from "./request/SilentFlowRequest.js"; -export type { InteractiveRequest } from "./request/InteractiveRequest.js"; -export type { SignOutRequest } from "./request/SignOutRequest.js"; -export type { ManagedIdentityRequestParams } from "./request/ManagedIdentityRequestParams.js"; -export { PromptValue, ResponseMode, AuthorizationCodePayload, AuthenticationResult, ServerAuthorizationCodeResponse, IdTokenClaims, AccountInfo, ValidCacheType, AuthError, AuthErrorMessage, AuthErrorCodes, ClientAuthError, ClientAuthErrorCodes, ClientAuthErrorMessage, ClientConfigurationError, ClientConfigurationErrorCodes, ClientConfigurationErrorMessage, InteractionRequiredAuthError, InteractionRequiredAuthErrorCodes, InteractionRequiredAuthErrorMessage, ServerError, INetworkModule, NetworkRequestOptions, NetworkResponse, Logger, LogLevel, ProtocolMode, ICachePlugin, TokenCacheContext, ISerializableTokenCache, AzureCloudInstance, AzureCloudOptions, IAppTokenProvider, AppTokenProviderParameters, AppTokenProviderResult, INativeBrokerPlugin, ClientAssertionCallback, } from "@azure/msal-common/node"; -export { version } from "./packageMetadata.js"; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/index.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/index.d.ts.map deleted file mode 100644 index d563a1b..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAKA;;;GAGG;AAEH;;;GAGG;AAEH,OAAO,KAAK,SAAS,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,CAAC;AAGrB,OAAO,EAAE,wBAAwB,EAAE,MAAM,sCAAsC,CAAC;AAChF,OAAO,EAAE,8BAA8B,EAAE,MAAM,4CAA4C,CAAC;AAC5F,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAC;AACnE,OAAO,EAAE,iBAAiB,EAAE,MAAM,0CAA0C,CAAC;AAC7E,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAG/D,OAAO,EAAE,uBAAuB,EAAE,MAAM,qCAAqC,CAAC;AAC9E,OAAO,EAAE,6BAA6B,EAAE,MAAM,2CAA2C,CAAC;AAC1F,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAC5E,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,0BAA0B,EAAE,MAAM,wCAAwC,CAAC;AACpF,OAAO,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAE5E,OAAO,EACH,aAAa,EACb,4BAA4B,EAC5B,uBAAuB,EACvB,eAAe,EACf,iBAAiB,EACjB,aAAa,EACb,oBAAoB,EACpB,YAAY,GACf,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAG9D,OAAO,EAAE,UAAU,EAAE,MAAM,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AmC,EACnC,WAAW,EAEX,cAAc,EACd,qBAAqB,EACrB,eAAe,EAEf,MAAM,EACN,QAAQ,EAER,YAAY,EACZ,YAAY,EACZ,iBAAiB,EACjB,uBAAuB,EAEvB,kBAAkB,EAClB,iBAAiB,EAEjB,iBAAiB,EACjB,0BAA0B,EAC1B,sBAAsB,EACtB,mBAAmB,EACnB,uBAAuB,GAC1B,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/internals.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/internals.d.ts deleted file mode 100644 index 13b0670..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/internals.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -/** - * Warning: This set of exports is purely intended to be used by other MSAL libraries, and should be considered potentially unstable. We strongly discourage using them directly, you do so at your own risk. - * Breaking changes to these APIs will be shipped under a minor version, instead of a major version. - */ -export { Serializer } from "./cache/serializer/Serializer.js"; -export { Deserializer } from "./cache/serializer/Deserializer.js"; -//# sourceMappingURL=internals.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/internals.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/internals.d.ts.map deleted file mode 100644 index 5adc20c..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/internals.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"internals.d.ts","sourceRoot":"","sources":["../../src/internals.ts"],"names":[],"mappings":"AAKA;;;GAGG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/network/HttpClient.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/network/HttpClient.d.ts deleted file mode 100644 index ef86e2e..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/network/HttpClient.d.ts +++ /dev/null @@ -1,26 +0,0 @@ -/// -/// -import { INetworkModule, NetworkRequestOptions, NetworkResponse } from "@azure/msal-common/node"; -import http from "http"; -import https from "https"; -/** - * This class implements the API for network requests. - */ -export declare class HttpClient implements INetworkModule { - private proxyUrl; - private customAgentOptions; - constructor(proxyUrl?: string, customAgentOptions?: http.AgentOptions | https.AgentOptions); - /** - * Http Get request - * @param url - * @param options - */ - sendGetRequestAsync(url: string, options?: NetworkRequestOptions, timeout?: number): Promise>; - /** - * Http Post request - * @param url - * @param options - */ - sendPostRequestAsync(url: string, options?: NetworkRequestOptions): Promise>; -} -//# sourceMappingURL=HttpClient.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/network/HttpClient.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/network/HttpClient.d.ts.map deleted file mode 100644 index 1d814c2..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/network/HttpClient.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"HttpClient.d.ts","sourceRoot":"","sources":["../../../src/network/HttpClient.ts"],"names":[],"mappings":";;AAKA,OAAO,EACH,cAAc,EACd,qBAAqB,EACrB,eAAe,EAElB,MAAM,yBAAyB,CAAC;AAGjC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B;;GAEG;AACH,qBAAa,UAAW,YAAW,cAAc;IAC7C,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,kBAAkB,CAAyC;gBAG/D,QAAQ,CAAC,EAAE,MAAM,EACjB,kBAAkB,CAAC,EAAE,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC,YAAY;IAM/D;;;;OAIG;IACG,mBAAmB,CAAC,CAAC,EACvB,GAAG,EAAE,MAAM,EACX,OAAO,CAAC,EAAE,qBAAqB,EAC/B,OAAO,CAAC,EAAE,MAAM,GACjB,OAAO,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC;IAqB9B;;;;OAIG;IACG,oBAAoB,CAAC,CAAC,EACxB,GAAG,EAAE,MAAM,EACX,OAAO,CAAC,EAAE,qBAAqB,GAChC,OAAO,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC;CAkBjC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/network/HttpClientWithRetries.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/network/HttpClientWithRetries.d.ts deleted file mode 100644 index 2123c83..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/network/HttpClientWithRetries.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { INetworkModule, NetworkRequestOptions, NetworkResponse } from "@azure/msal-common/node"; -import { IHttpRetryPolicy } from "../retry/IHttpRetryPolicy.js"; -export declare class HttpClientWithRetries implements INetworkModule { - private httpClientNoRetries; - private retryPolicy; - constructor(httpClientNoRetries: INetworkModule, retryPolicy: IHttpRetryPolicy); - private sendNetworkRequestAsyncHelper; - private sendNetworkRequestAsync; - sendGetRequestAsync(url: string, options?: NetworkRequestOptions): Promise>; - sendPostRequestAsync(url: string, options?: NetworkRequestOptions): Promise>; -} -//# sourceMappingURL=HttpClientWithRetries.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/network/HttpClientWithRetries.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/network/HttpClientWithRetries.d.ts.map deleted file mode 100644 index 80911d4..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/network/HttpClientWithRetries.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"HttpClientWithRetries.d.ts","sourceRoot":"","sources":["../../../src/network/HttpClientWithRetries.ts"],"names":[],"mappings":"AAKA,OAAO,EAEH,cAAc,EACd,qBAAqB,EACrB,eAAe,EAClB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAGhE,qBAAa,qBAAsB,YAAW,cAAc;IACxD,OAAO,CAAC,mBAAmB,CAAiB;IAC5C,OAAO,CAAC,WAAW,CAAmB;gBAGlC,mBAAmB,EAAE,cAAc,EACnC,WAAW,EAAE,gBAAgB;YAMnB,6BAA6B;YAY7B,uBAAuB;IA4BxB,mBAAmB,CAAC,CAAC,EAC9B,GAAG,EAAE,MAAM,EACX,OAAO,CAAC,EAAE,qBAAqB,GAChC,OAAO,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC;IAIjB,oBAAoB,CAAC,CAAC,EAC/B,GAAG,EAAE,MAAM,EACX,OAAO,CAAC,EAAE,qBAAqB,GAChC,OAAO,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC;CAGjC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/network/ILoopbackClient.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/network/ILoopbackClient.d.ts deleted file mode 100644 index 1a77179..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/network/ILoopbackClient.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { ServerAuthorizationCodeResponse } from "@azure/msal-common/node"; -/** - * Interface for LoopbackClient allowing to replace the default loopback server with a custom implementation. - * @public - */ -export interface ILoopbackClient { - listenForAuthCode(successTemplate?: string, errorTemplate?: string): Promise; - getRedirectUri(): string; - closeServer(): void; -} -//# sourceMappingURL=ILoopbackClient.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/network/ILoopbackClient.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/network/ILoopbackClient.d.ts.map deleted file mode 100644 index 7359bc0..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/network/ILoopbackClient.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ILoopbackClient.d.ts","sourceRoot":"","sources":["../../../src/network/ILoopbackClient.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,+BAA+B,EAAE,MAAM,yBAAyB,CAAC;AAE1E;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC5B,iBAAiB,CACb,eAAe,CAAC,EAAE,MAAM,EACxB,aAAa,CAAC,EAAE,MAAM,GACvB,OAAO,CAAC,+BAA+B,CAAC,CAAC;IAC5C,cAAc,IAAI,MAAM,CAAC;IACzB,WAAW,IAAI,IAAI,CAAC;CACvB"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/network/LoopbackClient.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/network/LoopbackClient.d.ts deleted file mode 100644 index d16fec6..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/network/LoopbackClient.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { ServerAuthorizationCodeResponse } from "@azure/msal-common/node"; -import { ILoopbackClient } from "./ILoopbackClient.js"; -export declare class LoopbackClient implements ILoopbackClient { - private server; - /** - * Spins up a loopback server which returns the server response when the localhost redirectUri is hit - * @param successTemplate - * @param errorTemplate - * @returns - */ - listenForAuthCode(successTemplate?: string, errorTemplate?: string): Promise; - /** - * Get the port that the loopback server is running on - * @returns - */ - getRedirectUri(): string; - /** - * Close the loopback server - */ - closeServer(): void; -} -//# sourceMappingURL=LoopbackClient.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/network/LoopbackClient.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/network/LoopbackClient.d.ts.map deleted file mode 100644 index 03e8925..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/network/LoopbackClient.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"LoopbackClient.d.ts","sourceRoot":"","sources":["../../../src/network/LoopbackClient.ts"],"names":[],"mappings":"AAKA,OAAO,EAEH,+BAA+B,EAGlC,MAAM,yBAAyB,CAAC;AAIjC,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAEvD,qBAAa,cAAe,YAAW,eAAe;IAClD,OAAO,CAAC,MAAM,CAA0B;IAExC;;;;;OAKG;IACG,iBAAiB,CACnB,eAAe,CAAC,EAAE,MAAM,EACxB,aAAa,CAAC,EAAE,MAAM,GACvB,OAAO,CAAC,+BAA+B,CAAC;IAqD3C;;;OAGG;IACH,cAAc,IAAI,MAAM;IAgBxB;;OAEG;IACH,WAAW,IAAI,IAAI;CAetB"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/packageMetadata.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/packageMetadata.d.ts deleted file mode 100644 index 6b771f9..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/packageMetadata.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export declare const name = "@azure/msal-node"; -export declare const version = "2.16.3"; -//# sourceMappingURL=packageMetadata.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/packageMetadata.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/packageMetadata.d.ts.map deleted file mode 100644 index f1bb21e..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/packageMetadata.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"packageMetadata.d.ts","sourceRoot":"","sources":["../../src/packageMetadata.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,IAAI,qBAAqB,CAAC;AACvC,eAAO,MAAM,OAAO,WAAW,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/request/AuthorizationCodeRequest.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/request/AuthorizationCodeRequest.d.ts deleted file mode 100644 index 095fc24..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/request/AuthorizationCodeRequest.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { CommonAuthorizationCodeRequest } from "@azure/msal-common/node"; -/** - * Request object passed by user to acquire a token from the server exchanging a valid authorization code (second leg of OAuth2.0 Authorization Code flow) - * - * - scopes - Array of scopes the application is requesting access to. - * - claims - A stringified claims request which will be added to all /authorize and /token calls - * - authority: - URL of the authority, the security token service (STS) from which MSAL will acquire tokens. If authority is set on client application object, this will override that value. Overriding the value will cause for authority validation to happen each time. If the same authority will be used for all request, set on the application object instead of the requests. - * - correlationId - Unique GUID set per request to trace a request end-to-end for telemetry purposes. - * - redirectUri - The redirect URI of your app, where the authority will redirect to after the user inputs credentials and consents. It must exactly match one of the redirect URIs you registered in the portal. - * - tokenQueryParameters - String to string map of custom query parameters added to the /token call - * - code - The authorization_code that the user acquired in the first leg of the flow. - * - codeVerifier - The same code_verifier that was used to obtain the authorization_code. Required if PKCE was used in the authorization code grant request.For more information, see the PKCE RFC: https://tools.ietf.org/html/rfc7636 - * - state - Unique GUID generated by the user that is cached by the user and sent to the server during the first leg of the flow. This string is sent back by the server with the authorization code. The user cached state is then compared with the state received from the server to mitigate the risk of CSRF attacks. See https://datatracker.ietf.org/doc/html/rfc6819#section-3.6. - * @public - */ -export type AuthorizationCodeRequest = Partial> & { - scopes: Array; - redirectUri: string; - code: string; - state?: string; -}; -//# sourceMappingURL=AuthorizationCodeRequest.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/request/AuthorizationCodeRequest.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/request/AuthorizationCodeRequest.d.ts.map deleted file mode 100644 index 9b465c6..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/request/AuthorizationCodeRequest.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AuthorizationCodeRequest.d.ts","sourceRoot":"","sources":["../../../src/request/AuthorizationCodeRequest.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,8BAA8B,EAAE,MAAM,yBAAyB,CAAC;AAEzE;;;;;;;;;;;;;GAaG;AACH,MAAM,MAAM,wBAAwB,GAAG,OAAO,CAC1C,IAAI,CACA,8BAA8B,EAC5B,QAAQ,GACR,aAAa,GACb,MAAM,GACN,sBAAsB,GACtB,uBAAuB,GACvB,oBAAoB,GACpB,qBAAqB,GACrB,cAAc,CACnB,CACJ,GAAG;IACA,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/request/AuthorizationUrlRequest.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/request/AuthorizationUrlRequest.d.ts deleted file mode 100644 index ade64b5..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/request/AuthorizationUrlRequest.d.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { CommonAuthorizationUrlRequest } from "@azure/msal-common/node"; -/** - * Request object passed by user to retrieve a Code from the server (first leg of authorization code grant flow) - * - * - scopes - Array of scopes the application is requesting access to. - * - claims - A stringified claims request which will be added to all /authorize and /token calls - * - authority - Url of the authority which the application acquires tokens from. - * - correlationId - Unique GUID set per request to trace a request end-to-end for telemetry purposes. - * - redirectUri - The redirect URI where authentication responses can be received by your application. It must exactly match one of the redirect URIs registered in the Azure portal. - * - extraScopesToConsent - Scopes for a different resource when the user needs consent upfront. - * - responseMode - Specifies the method that should be used to send the authentication result to your app. Can be query, form_post, or fragment. If no value is passed in, it defaults to query. - * - codeChallenge - Used to secure authorization code grant via Proof of Key for Code Exchange (PKCE). For more information, see the PKCE RCF:https://tools.ietf.org/html/rfc7636 - * - codeChallengeMethod - The method used to encode the code verifier for the code challenge parameter. Can be "plain" or "S256". If excluded, code challenge is assumed to be plaintext. For more information, see the PKCE RCF: https://tools.ietf.org/html/rfc7636 - * - state - A value included in the request that is also returned in the token response. A randomly generated unique value is typically used for preventing cross site request forgery attacks. The state is also used to encode information about the user's state in the app before the authentication request occurred. - * - prompt - Indicates the type of user interaction that is required. - * login: will force the user to enter their credentials on that request, negating single-sign on - * none: will ensure that the user isn't presented with any interactive prompt. if request can't be completed via single-sign on, the endpoint will return an interaction_required error - * consent: will the trigger the OAuth consent dialog after the user signs in, asking the user to grant permissions to the app - * select_account: will interrupt single sign-=on providing account selection experience listing all the accounts in session or any remembered accounts or an option to choose to use a different account - * create: will direct the user to the account creation experience instead of the log in experience - * - account - AccountInfo obtained from a getAccount API. Will be used in certain scenarios to generate login_hint if both loginHint and sid params are not provided. - * - loginHint - Can be used to pre-fill the username/email address field of the sign-in page for the user, if you know the username/email address ahead of time. Often apps use this parameter during re-authentication, having already extracted the username from a previous sign-in using the preferred_username claim. - * - sid - Session ID, unique identifier for the session. Available as an optional claim on ID tokens. - * - domainHint - Provides a hint about the tenant or domain that the user should use to sign in. The value of the domain hint is a registered domain for the tenant. - * - extraQueryParameters - String to string map of custom query parameters added to the /authorize call - * - tokenQueryParameters - String to string map of custom query parameters added to the /token call - * - nonce - A value included in the request that is returned in the id token. A randomly generated unique value is typically used to mitigate replay attacks. - * @public - */ -export type AuthorizationUrlRequest = Partial> & { - scopes: Array; - redirectUri: string; -}; -//# sourceMappingURL=AuthorizationUrlRequest.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/request/AuthorizationUrlRequest.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/request/AuthorizationUrlRequest.d.ts.map deleted file mode 100644 index d7a5a6f..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/request/AuthorizationUrlRequest.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AuthorizationUrlRequest.d.ts","sourceRoot":"","sources":["../../../src/request/AuthorizationUrlRequest.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,6BAA6B,EAAE,MAAM,yBAAyB,CAAC;AAExE;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,MAAM,MAAM,uBAAuB,GAAG,OAAO,CACzC,IAAI,CACA,6BAA6B,EAC3B,QAAQ,GACR,aAAa,GACb,uBAAuB,GACvB,oBAAoB,GACpB,sBAAsB,GACtB,qBAAqB,GACrB,cAAc,CACnB,CACJ,GAAG;IACA,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;CACvB,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/request/ClientCredentialRequest.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/request/ClientCredentialRequest.d.ts deleted file mode 100644 index 5c988c1..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/request/ClientCredentialRequest.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { ClientAssertionCallback, CommonClientCredentialRequest } from "@azure/msal-common/node"; -/** - * CommonClientCredentialRequest - * - scopes - Array of scopes the application is requesting access to. Typically contains only the .default scope for a single resource. See: https://learn.microsoft.com/azure/active-directory/develop/scopes-oidc#the-default-scope - * - authority - URL of the authority, the security token service (STS) from which MSAL will acquire tokens. - * - correlationId - Unique GUID set per request to trace a request end-to-end for telemetry purposes. - * - skipCache - Skip token cache lookup and force request to authority to get a a new token. Defaults to false. - * - clientAssertion - An assertion string or a callback function that returns an assertion string (both are Base64Url-encoded signed JWTs) used in the Client Credential flow - * - tokenQueryParameters - String to string map of custom query parameters added to the /token call - * @public - */ -export type ClientCredentialRequest = Partial> & { - clientAssertion?: string | ClientAssertionCallback; -}; -//# sourceMappingURL=ClientCredentialRequest.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/request/ClientCredentialRequest.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/request/ClientCredentialRequest.d.ts.map deleted file mode 100644 index fa5890a..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/request/ClientCredentialRequest.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ClientCredentialRequest.d.ts","sourceRoot":"","sources":["../../../src/request/ClientCredentialRequest.ts"],"names":[],"mappings":"AAKA,OAAO,EACH,uBAAuB,EACvB,6BAA6B,EAChC,MAAM,yBAAyB,CAAC;AAEjC;;;;;;;;;GASG;AACH,MAAM,MAAM,uBAAuB,GAAG,OAAO,CACzC,IAAI,CACA,6BAA6B,EAC3B,uBAAuB,GACvB,oBAAoB,GACpB,qBAAqB,GACrB,iBAAiB,GACjB,cAAc,CACnB,CACJ,GAAG;IACA,eAAe,CAAC,EAAE,MAAM,GAAG,uBAAuB,CAAC;CACtD,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/request/DeviceCodeRequest.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/request/DeviceCodeRequest.d.ts deleted file mode 100644 index 169b7d6..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/request/DeviceCodeRequest.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { CommonDeviceCodeRequest, DeviceCodeResponse } from "@azure/msal-common/node"; -/** - * Parameters for Oauth2 device code flow. - * - scopes - Array of scopes the application is requesting access to. - * - authority: - URL of the authority, the security token service (STS) from which MSAL will acquire tokens. If authority is set on client application object, this will override that value. Overriding the value will cause for authority validation to happen each time. If the same authority will be used for all request, set on the application object instead of the requests. - * - correlationId - Unique GUID set per request to trace a request end-to-end for telemetry purposes. - * - deviceCodeCallback - Callback containing device code response. Message should be shown to end user. End user can then navigate to the verification_uri, input the user_code, and input credentials. - * - cancel - Boolean to cancel polling of device code endpoint. While the user authenticates on a separate device, MSAL polls the the token endpoint of security token service for the interval specified in the device code response (usually 15 minutes). To stop polling and cancel the request, set cancel=true. - * - extraQueryParameters - String to string map of custom query parameters added to the query string - * @public - */ -export type DeviceCodeRequest = Partial> & { - scopes: Array; - deviceCodeCallback: (response: DeviceCodeResponse) => void; -}; -//# sourceMappingURL=DeviceCodeRequest.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/request/DeviceCodeRequest.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/request/DeviceCodeRequest.d.ts.map deleted file mode 100644 index d7e3e29..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/request/DeviceCodeRequest.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"DeviceCodeRequest.d.ts","sourceRoot":"","sources":["../../../src/request/DeviceCodeRequest.ts"],"names":[],"mappings":"AAKA,OAAO,EACH,uBAAuB,EACvB,kBAAkB,EACrB,MAAM,yBAAyB,CAAC;AAEjC;;;;;;;;;GASG;AACH,MAAM,MAAM,iBAAiB,GAAG,OAAO,CACnC,IAAI,CACA,uBAAuB,EACrB,QAAQ,GACR,oBAAoB,GACpB,uBAAuB,GACvB,oBAAoB,GACpB,qBAAqB,GACrB,cAAc,CACnB,CACJ,GAAG;IACA,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACtB,kBAAkB,EAAE,CAAC,QAAQ,EAAE,kBAAkB,KAAK,IAAI,CAAC;CAC9D,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/request/InteractiveRequest.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/request/InteractiveRequest.d.ts deleted file mode 100644 index 2b053ca..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/request/InteractiveRequest.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -/// -/// -import { CommonAuthorizationUrlRequest } from "@azure/msal-common/node"; -import { ILoopbackClient } from "../network/ILoopbackClient.js"; -/** - * Request object passed by user to configure acquireTokenInteractive API - * - * - openBrowser - Function to open a browser instance on user's system. - * - scopes - Array of scopes the application is requesting access to. - * - successTemplate: - Template to be displayed on the opened browser instance upon successful token acquisition. - * - errorTemplate - Template to be displayed on the opened browser instance upon token acquisition failure. - * - windowHandle - Used in native broker flows to properly parent the native broker window - * - loopbackClient - Custom implementation for a loopback server to listen for authorization code response. - * @public - */ -export type InteractiveRequest = Partial> & { - openBrowser: (url: string) => Promise; - scopes?: Array; - successTemplate?: string; - errorTemplate?: string; - windowHandle?: Buffer; - loopbackClient?: ILoopbackClient; -}; -//# sourceMappingURL=InteractiveRequest.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/request/InteractiveRequest.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/request/InteractiveRequest.d.ts.map deleted file mode 100644 index 697cd7e..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/request/InteractiveRequest.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"InteractiveRequest.d.ts","sourceRoot":"","sources":["../../../src/request/InteractiveRequest.ts"],"names":[],"mappings":";;AAKA,OAAO,EAAE,6BAA6B,EAAE,MAAM,yBAAyB,CAAC;AACxE,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAEhE;;;;;;;;;;GAUG;AACH,MAAM,MAAM,kBAAkB,GAAG,OAAO,CACpC,IAAI,CACA,6BAA6B,EAC7B,QAAQ,GAAG,aAAa,GAAG,qBAAqB,GAAG,cAAc,CACpE,CACJ,GAAG;IACA,WAAW,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC5C,MAAM,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACvB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,cAAc,CAAC,EAAE,eAAe,CAAC;CACpC,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/request/ManagedIdentityRequest.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/request/ManagedIdentityRequest.d.ts deleted file mode 100644 index 2a0bc38..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/request/ManagedIdentityRequest.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { CommonClientCredentialRequest } from "@azure/msal-common/node"; -import { ManagedIdentityRequestParams } from "./ManagedIdentityRequestParams.js"; -/** - * ManagedIdentityRequest - * - forceRefresh - forces managed identity requests to skip the cache and make network calls if true - * - resource - resource requested to access the protected API. It should be of the form "{ResourceIdUri}" or {ResourceIdUri/.default}. For instance https://management.azure.net or, for Microsoft Graph, https://graph.microsoft.com/.default - */ -export type ManagedIdentityRequest = ManagedIdentityRequestParams & CommonClientCredentialRequest; -//# sourceMappingURL=ManagedIdentityRequest.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/request/ManagedIdentityRequest.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/request/ManagedIdentityRequest.d.ts.map deleted file mode 100644 index 12bef25..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/request/ManagedIdentityRequest.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ManagedIdentityRequest.d.ts","sourceRoot":"","sources":["../../../src/request/ManagedIdentityRequest.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,6BAA6B,EAAE,MAAM,yBAAyB,CAAC;AACxE,OAAO,EAAE,4BAA4B,EAAE,MAAM,mCAAmC,CAAC;AAEjF;;;;GAIG;AACH,MAAM,MAAM,sBAAsB,GAAG,4BAA4B,GAC7D,6BAA6B,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/request/ManagedIdentityRequestParams.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/request/ManagedIdentityRequestParams.d.ts deleted file mode 100644 index fce716a..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/request/ManagedIdentityRequestParams.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * ManagedIdentityRequest - * - claims - a stringified claims request which will be used to determine whether or not the cache should be skipped - * - forceRefresh - forces managed identity requests to skip the cache and make network calls if true - * - resource - resource requested to access the protected API. It should be of the form "ResourceIdUri" or "ResourceIdUri/.default". For instance https://management.azure.net or, for Microsoft Graph, https://graph.microsoft.com/.default - * @public - */ -export type ManagedIdentityRequestParams = { - claims?: string; - forceRefresh?: boolean; - resource: string; -}; -//# sourceMappingURL=ManagedIdentityRequestParams.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/request/ManagedIdentityRequestParams.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/request/ManagedIdentityRequestParams.d.ts.map deleted file mode 100644 index 31e4327..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/request/ManagedIdentityRequestParams.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ManagedIdentityRequestParams.d.ts","sourceRoot":"","sources":["../../../src/request/ManagedIdentityRequestParams.ts"],"names":[],"mappings":"AAKA;;;;;;GAMG;AACH,MAAM,MAAM,4BAA4B,GAAG;IACvC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,QAAQ,EAAE,MAAM,CAAC;CACpB,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/request/OnBehalfOfRequest.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/request/OnBehalfOfRequest.d.ts deleted file mode 100644 index ca6032b..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/request/OnBehalfOfRequest.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { CommonOnBehalfOfRequest } from "@azure/msal-common/node"; -/** - * - scopes - Array of scopes the application is requesting access to. - * - authority - URL of the authority, the security token service (STS) from which MSAL will acquire tokens. - * - correlationId - Unique GUID set per request to trace a request end-to-end for telemetry purposes. - * - oboAssertion - The access token that was sent to the middle-tier API. This token must have an audience of the app making this OBO request. - * - skipCache - Skip token cache lookup and force request to authority to get a a new token. Defaults to false. - * - tokenQueryParameters - String to string map of custom query parameters added to the /token call - * @public - */ -export type OnBehalfOfRequest = Partial> & { - oboAssertion: string; - scopes: Array; -}; -//# sourceMappingURL=OnBehalfOfRequest.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/request/OnBehalfOfRequest.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/request/OnBehalfOfRequest.d.ts.map deleted file mode 100644 index aed42bd..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/request/OnBehalfOfRequest.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"OnBehalfOfRequest.d.ts","sourceRoot":"","sources":["../../../src/request/OnBehalfOfRequest.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAElE;;;;;;;;GAQG;AACH,MAAM,MAAM,iBAAiB,GAAG,OAAO,CACnC,IAAI,CACA,uBAAuB,EACrB,cAAc,GACd,QAAQ,GACR,uBAAuB,GACvB,oBAAoB,GACpB,qBAAqB,GACrB,cAAc,CACnB,CACJ,GAAG;IACA,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;CACzB,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/request/RefreshTokenRequest.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/request/RefreshTokenRequest.d.ts deleted file mode 100644 index c45213c..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/request/RefreshTokenRequest.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { CommonRefreshTokenRequest } from "@azure/msal-common/node"; -/** - * CommonRefreshTokenRequest - * - scopes - Array of scopes the application is requesting access to. - * - claims - A stringified claims request which will be added to all /authorize and /token calls - * - authority - URL of the authority, the security token service (STS) from which MSAL will acquire tokens. - * - correlationId - Unique GUID set per request to trace a request end-to-end for telemetry purposes. - * - refreshToken - A refresh token returned from a previous request to the Identity provider. - * - tokenQueryParameters - String to string map of custom query parameters added to the /token call - * - forceCache - Force MSAL to cache a refresh token flow response when there is no account in the cache. Used for migration scenarios. - * @public - */ -export type RefreshTokenRequest = Partial> & { - scopes: Array; - refreshToken: string; - forceCache?: boolean; -}; -//# sourceMappingURL=RefreshTokenRequest.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/request/RefreshTokenRequest.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/request/RefreshTokenRequest.d.ts.map deleted file mode 100644 index 0d981aa..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/request/RefreshTokenRequest.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"RefreshTokenRequest.d.ts","sourceRoot":"","sources":["../../../src/request/RefreshTokenRequest.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,yBAAyB,EAAE,MAAM,yBAAyB,CAAC;AAEpE;;;;;;;;;;GAUG;AACH,MAAM,MAAM,mBAAmB,GAAG,OAAO,CACrC,IAAI,CACA,yBAAyB,EACvB,QAAQ,GACR,cAAc,GACd,sBAAsB,GACtB,uBAAuB,GACvB,oBAAoB,GACpB,qBAAqB,GACrB,cAAc,CACnB,CACJ,GAAG;IACA,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;CACxB,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/request/SignOutRequest.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/request/SignOutRequest.d.ts deleted file mode 100644 index f83a8c9..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/request/SignOutRequest.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { AccountInfo } from "@azure/msal-common/node"; -/** @public */ -export type SignOutRequest = { - account: AccountInfo; - correlationId?: string; -}; -//# sourceMappingURL=SignOutRequest.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/request/SignOutRequest.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/request/SignOutRequest.d.ts.map deleted file mode 100644 index b02d0af..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/request/SignOutRequest.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"SignOutRequest.d.ts","sourceRoot":"","sources":["../../../src/request/SignOutRequest.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAEtD,cAAc;AACd,MAAM,MAAM,cAAc,GAAG;IACzB,OAAO,EAAE,WAAW,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;CAC1B,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/request/SilentFlowRequest.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/request/SilentFlowRequest.d.ts deleted file mode 100644 index 19d0997..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/request/SilentFlowRequest.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { AccountInfo, CommonSilentFlowRequest } from "@azure/msal-common/node"; -/** - * SilentFlow parameters passed by the user to retrieve credentials silently - * - scopes - Array of scopes the application is requesting access to. - * - claims - A stringified claims request which will be added to all /authorize and /token calls. When included on a silent request, cache lookup will be skipped and token will be refreshed. - * - authority - Url of the authority which the application acquires tokens from. - * - correlationId - Unique GUID set per request to trace a request end-to-end for telemetry purposes. - * - tokenQueryParameters - String to string map of custom query parameters added to the /token call - * - account - Account entity to lookup the credentials. - * - forceRefresh - Forces silent requests to make network calls if true. - * @public - */ -export type SilentFlowRequest = Partial> & { - account: AccountInfo; - scopes: Array; -}; -//# sourceMappingURL=SilentFlowRequest.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/request/SilentFlowRequest.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/request/SilentFlowRequest.d.ts.map deleted file mode 100644 index f551453..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/request/SilentFlowRequest.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"SilentFlowRequest.d.ts","sourceRoot":"","sources":["../../../src/request/SilentFlowRequest.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,WAAW,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAE/E;;;;;;;;;;GAUG;AACH,MAAM,MAAM,iBAAiB,GAAG,OAAO,CACnC,IAAI,CACA,uBAAuB,EACvB,SAAS,GAAG,QAAQ,GAAG,qBAAqB,GAAG,cAAc,CAChE,CACJ,GAAG;IACA,OAAO,EAAE,WAAW,CAAC;IACrB,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;CACzB,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/request/UsernamePasswordRequest.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/request/UsernamePasswordRequest.d.ts deleted file mode 100644 index f59258c..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/request/UsernamePasswordRequest.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { CommonUsernamePasswordRequest } from "@azure/msal-common/node"; -/** - * UsernamePassword parameters passed by the user to retrieve credentials - * Note: The latest OAuth 2.0 Security Best Current Practice disallows the password grant entirely. This flow is added for internal testing. - * - * - scopes - Array of scopes the application is requesting access to. - * - claims - A stringified claims request which will be added to all /authorize and /token calls. When included on a silent request, cache lookup will be skipped and token will be refreshed. - * - authority - Url of the authority which the application acquires tokens from. - * - correlationId - Unique GUID set per request to trace a request end-to-end for telemetry purposes. - * - username - username of the client - * - password - credentials - * - tokenQueryParameters - String to string map of custom query parameters added to the /token call - * @public - */ -export type UsernamePasswordRequest = Partial> & { - scopes: Array; - username: string; - password: string; -}; -//# sourceMappingURL=UsernamePasswordRequest.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/request/UsernamePasswordRequest.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/request/UsernamePasswordRequest.d.ts.map deleted file mode 100644 index 9c3312b..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/request/UsernamePasswordRequest.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"UsernamePasswordRequest.d.ts","sourceRoot":"","sources":["../../../src/request/UsernamePasswordRequest.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,6BAA6B,EAAE,MAAM,yBAAyB,CAAC;AAExE;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,uBAAuB,GAAG,OAAO,CACzC,IAAI,CACA,6BAA6B,EAC3B,QAAQ,GACR,uBAAuB,GACvB,oBAAoB,GACpB,UAAU,GACV,UAAU,GACV,qBAAqB,GACrB,cAAc,CACnB,CACJ,GAAG;IACA,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;CACpB,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/response/ManagedIdentityTokenResponse.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/response/ManagedIdentityTokenResponse.d.ts deleted file mode 100644 index feabf64..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/response/ManagedIdentityTokenResponse.d.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { AuthenticationScheme } from "@azure/msal-common/node"; -/** - * Deserialized response object from server managed identity request. - * - * In case of success: - * - access_token - The requested access token. When called via a secured REST API, the token is embedded in the Authorization request header field as a "bearer" token, allowing the API to authenticate the caller - * - client_id - A unique identifier generated by Azure AD for the Azure Resource. The Client ID is a GUID value that uniquely identifies the application and its configuration within the identity platform - * - expires_on - The timespan when the access token expires. The date is represented as the number of seconds from "1970-01-01T0:0:0Z UTC" (corresponds to the token's exp claim) - * - resource - The resource the access token was requested for. It matches the resource query string parameter of the request - * - token_type - The type of token returned by the Managed Identity endpoint. It's a "Bearer" access token, which means the resource can give access to the bearer of this token - * - * In case of error: - * - message: A specific error message that can help a developer identify the root cause of an authentication error. - * - correlationId: A unique identifier for the request that can help in diagnostics across components. - */ -export type ManagedIdentityTokenResponse = { - access_token?: string; - client_id?: string; - expires_on?: number; - resource?: string; - token_type?: AuthenticationScheme; - message?: string; - correlationId?: string; - error?: string | ErrorObject; - error_description?: string; - error_codes?: Array; - correlation_id?: string; - timestamp?: string; - trace_id?: string; -}; -export type ErrorObject = { - code: string; - message: string; -}; -//# sourceMappingURL=ManagedIdentityTokenResponse.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/response/ManagedIdentityTokenResponse.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/response/ManagedIdentityTokenResponse.d.ts.map deleted file mode 100644 index eb05c7f..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/response/ManagedIdentityTokenResponse.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ManagedIdentityTokenResponse.d.ts","sourceRoot":"","sources":["../../../src/response/ManagedIdentityTokenResponse.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAE/D;;;;;;;;;;;;;GAaG;AACH,MAAM,MAAM,4BAA4B,GAAG;IAEvC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,oBAAoB,CAAC;IAQlC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,aAAa,CAAC,EAAE,MAAM,CAAC;IAGvB,KAAK,CAAC,EAAE,MAAM,GAAG,WAAW,CAAC;IAC7B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,WAAW,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC5B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAMF,MAAM,MAAM,WAAW,GAAG;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACnB,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/retry/IHttpRetryPolicy.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/retry/IHttpRetryPolicy.d.ts deleted file mode 100644 index b8ed715..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/retry/IHttpRetryPolicy.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -/// -import http from "http"; -export interface IHttpRetryPolicy { - pauseForRetry(httpStatusCode: number, currentRetry: number, retryAfterHeader: http.IncomingHttpHeaders["retry-after"]): Promise; -} -//# sourceMappingURL=IHttpRetryPolicy.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/retry/IHttpRetryPolicy.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/retry/IHttpRetryPolicy.d.ts.map deleted file mode 100644 index b60468d..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/retry/IHttpRetryPolicy.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"IHttpRetryPolicy.d.ts","sourceRoot":"","sources":["../../../src/retry/IHttpRetryPolicy.ts"],"names":[],"mappings":";AAKA,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,MAAM,WAAW,gBAAgB;IAK7B,aAAa,CACT,cAAc,EAAE,MAAM,EACtB,YAAY,EAAE,MAAM,EACpB,gBAAgB,EAAE,IAAI,CAAC,mBAAmB,CAAC,aAAa,CAAC,GAC1D,OAAO,CAAC,OAAO,CAAC,CAAC;CACvB"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/retry/LinearRetryPolicy.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/retry/LinearRetryPolicy.d.ts deleted file mode 100644 index be386b5..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/retry/LinearRetryPolicy.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -/// -import http from "http"; -import { IHttpRetryPolicy } from "./IHttpRetryPolicy.js"; -export declare class LinearRetryPolicy implements IHttpRetryPolicy { - maxRetries: number; - retryDelay: number; - httpStatusCodesToRetryOn: Array; - constructor(maxRetries: number, retryDelay: number, httpStatusCodesToRetryOn: Array); - private retryAfterMillisecondsToSleep; - pauseForRetry(httpStatusCode: number, currentRetry: number, retryAfterHeader: http.IncomingHttpHeaders["retry-after"]): Promise; -} -//# sourceMappingURL=LinearRetryPolicy.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/retry/LinearRetryPolicy.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/retry/LinearRetryPolicy.d.ts.map deleted file mode 100644 index d1e701b..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/retry/LinearRetryPolicy.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"LinearRetryPolicy.d.ts","sourceRoot":"","sources":["../../../src/retry/LinearRetryPolicy.ts"],"names":[],"mappings":";AAKA,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAEzD,qBAAa,iBAAkB,YAAW,gBAAgB;IACtD,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,wBAAwB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;gBAGpC,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,MAAM,EAClB,wBAAwB,EAAE,KAAK,CAAC,MAAM,CAAC;IAO3C,OAAO,CAAC,6BAA6B;IAyB/B,aAAa,CACf,cAAc,EAAE,MAAM,EACtB,YAAY,EAAE,MAAM,EACpB,gBAAgB,EAAE,IAAI,CAAC,mBAAmB,CAAC,aAAa,CAAC,GAC1D,OAAO,CAAC,OAAO,CAAC;CAkBtB"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/utils/Constants.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/utils/Constants.d.ts deleted file mode 100644 index 31678b4..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/utils/Constants.d.ts +++ /dev/null @@ -1,143 +0,0 @@ -export declare const AUTHORIZATION_HEADER_NAME: string; -export declare const METADATA_HEADER_NAME: string; -export declare const APP_SERVICE_SECRET_HEADER_NAME: string; -export declare const SERVICE_FABRIC_SECRET_HEADER_NAME: string; -export declare const API_VERSION_QUERY_PARAMETER_NAME: string; -export declare const RESOURCE_BODY_OR_QUERY_PARAMETER_NAME: string; -export declare const DEFAULT_MANAGED_IDENTITY_ID = "system_assigned_managed_identity"; -export declare const MANAGED_IDENTITY_DEFAULT_TENANT = "managed_identity"; -export declare const DEFAULT_AUTHORITY_FOR_MANAGED_IDENTITY: string; -/** - * Managed Identity Environment Variable Names - */ -export declare const ManagedIdentityEnvironmentVariableNames: { - readonly AZURE_POD_IDENTITY_AUTHORITY_HOST: "AZURE_POD_IDENTITY_AUTHORITY_HOST"; - readonly IDENTITY_ENDPOINT: "IDENTITY_ENDPOINT"; - readonly IDENTITY_HEADER: "IDENTITY_HEADER"; - readonly IDENTITY_SERVER_THUMBPRINT: "IDENTITY_SERVER_THUMBPRINT"; - readonly IMDS_ENDPOINT: "IMDS_ENDPOINT"; - readonly MSI_ENDPOINT: "MSI_ENDPOINT"; -}; -export type ManagedIdentityEnvironmentVariableNames = (typeof ManagedIdentityEnvironmentVariableNames)[keyof typeof ManagedIdentityEnvironmentVariableNames]; -/** - * Managed Identity Source Names - * @public - */ -export declare const ManagedIdentitySourceNames: { - readonly APP_SERVICE: "AppService"; - readonly AZURE_ARC: "AzureArc"; - readonly CLOUD_SHELL: "CloudShell"; - readonly DEFAULT_TO_IMDS: "DefaultToImds"; - readonly IMDS: "Imds"; - readonly SERVICE_FABRIC: "ServiceFabric"; -}; -/** - * The ManagedIdentitySourceNames type - * @public - */ -export type ManagedIdentitySourceNames = (typeof ManagedIdentitySourceNames)[keyof typeof ManagedIdentitySourceNames]; -/** - * Managed Identity Ids - */ -export declare const ManagedIdentityIdType: { - readonly SYSTEM_ASSIGNED: "system-assigned"; - readonly USER_ASSIGNED_CLIENT_ID: "user-assigned-client-id"; - readonly USER_ASSIGNED_RESOURCE_ID: "user-assigned-resource-id"; - readonly USER_ASSIGNED_OBJECT_ID: "user-assigned-object-id"; -}; -export type ManagedIdentityIdType = (typeof ManagedIdentityIdType)[keyof typeof ManagedIdentityIdType]; -/** - * http methods - */ -export declare const HttpMethod: { - readonly GET: "get"; - readonly POST: "post"; -}; -export type HttpMethod = (typeof HttpMethod)[keyof typeof HttpMethod]; -export declare const ProxyStatus: { - readonly SUCCESS: 200; - readonly SUCCESS_RANGE_START: 200; - readonly SUCCESS_RANGE_END: 299; - readonly SERVER_ERROR: 500; -}; -export type ProxyStatus = (typeof ProxyStatus)[keyof typeof ProxyStatus]; -/** - * Constants used for region discovery - */ -export declare const REGION_ENVIRONMENT_VARIABLE = "REGION_NAME"; -export declare const MSAL_FORCE_REGION = "MSAL_FORCE_REGION"; -/** - * Constant used for PKCE - */ -export declare const RANDOM_OCTET_SIZE = 32; -/** - * Constants used in PKCE - */ -export declare const Hash: { - SHA256: string; -}; -/** - * Constants for encoding schemes - */ -export declare const CharSet: { - CV_CHARSET: string; -}; -/** - * Cache Constants - */ -export declare const CACHE: { - FILE_CACHE: string; - EXTENSION_LIB: string; -}; -/** - * Constants - */ -export declare const Constants: { - MSAL_SKU: string; - JWT_BEARER_ASSERTION_TYPE: string; - AUTHORIZATION_PENDING: string; - HTTP_PROTOCOL: string; - LOCALHOST: string; -}; -/** - * API Codes for Telemetry purposes. - * Before adding a new code you must claim it in the MSAL Telemetry tracker as these number spaces are shared across all MSALs - * 0-99 Silent Flow - * 600-699 Device Code Flow - * 800-899 Auth Code Flow - */ -export declare const ApiId: { - acquireTokenSilent: number; - acquireTokenByUsernamePassword: number; - acquireTokenByDeviceCode: number; - acquireTokenByClientCredential: number; - acquireTokenByCode: number; - acquireTokenByRefreshToken: number; -}; -export type ApiId = (typeof ApiId)[keyof typeof ApiId]; -/** - * JWT constants - */ -export declare const JwtConstants: { - ALGORITHM: string; - RSA_256: string; - PSS_256: string; - X5T_256: string; - X5T: string; - X5C: string; - AUDIENCE: string; - EXPIRATION_TIME: string; - ISSUER: string; - SUBJECT: string; - NOT_BEFORE: string; - JWT_ID: string; -}; -export declare const LOOPBACK_SERVER_CONSTANTS: { - INTERVAL_MS: number; - TIMEOUT_MS: number; -}; -export declare const AZURE_ARC_SECRET_FILE_MAX_SIZE_BYTES = 4096; -export declare const MANAGED_IDENTITY_MAX_RETRIES = 3; -export declare const MANAGED_IDENTITY_RETRY_DELAY = 1000; -export declare const MANAGED_IDENTITY_HTTP_STATUS_CODES_TO_RETRY_ON: (500 | 404 | 408 | 429 | 503 | 504)[]; -//# sourceMappingURL=Constants.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/utils/Constants.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/utils/Constants.d.ts.map deleted file mode 100644 index 3a482c8..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/utils/Constants.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Constants.d.ts","sourceRoot":"","sources":["../../../src/utils/Constants.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,yBAAyB,EAAE,MAAwB,CAAC;AACjE,eAAO,MAAM,oBAAoB,EAAE,MAAmB,CAAC;AACvD,eAAO,MAAM,8BAA8B,EAAE,MAA4B,CAAC;AAC1E,eAAO,MAAM,iCAAiC,EAAE,MAAiB,CAAC;AAClE,eAAO,MAAM,gCAAgC,EAAE,MAAsB,CAAC;AACtE,eAAO,MAAM,qCAAqC,EAAE,MAAmB,CAAC;AACxE,eAAO,MAAM,2BAA2B,qCAAqC,CAAC;AAC9E,eAAO,MAAM,+BAA+B,qBAAqB,CAAC;AAClE,eAAO,MAAM,sCAAsC,QAA0E,CAAC;AAE9H;;GAEG;AACH,eAAO,MAAM,uCAAuC;;;;;;;CAO1C,CAAC;AACX,MAAM,MAAM,uCAAuC,GAC/C,CAAC,OAAO,uCAAuC,CAAC,CAAC,MAAM,OAAO,uCAAuC,CAAC,CAAC;AAE3G;;;GAGG;AACH,eAAO,MAAM,0BAA0B;;;;;;;CAO7B,CAAC;AACX;;;GAGG;AACH,MAAM,MAAM,0BAA0B,GAClC,CAAC,OAAO,0BAA0B,CAAC,CAAC,MAAM,OAAO,0BAA0B,CAAC,CAAC;AAEjF;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ure/msal-node/lib/types/utils/EncodingUtils.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/utils/EncodingUtils.d.ts deleted file mode 100644 index 4a07473..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/utils/EncodingUtils.d.ts +++ /dev/null @@ -1,27 +0,0 @@ -/// -export declare class EncodingUtils { - /** - * 'utf8': Multibyte encoded Unicode characters. Many web pages and other document formats use UTF-8. - * 'base64': Base64 encoding. - * - * @param str text - */ - static base64Encode(str: string, encoding?: BufferEncoding): string; - /** - * encode a URL - * @param str - */ - static base64EncodeUrl(str: string, encoding?: BufferEncoding): string; - /** - * 'utf8': Multibyte encoded Unicode characters. Many web pages and other document formats use UTF-8. - * 'base64': Base64 encoding. - * - * @param base64Str Base64 encoded text - */ - static base64Decode(base64Str: string): string; - /** - * @param base64Str Base64 encoded Url - */ - static base64DecodeUrl(base64Str: string): string; -} -//# sourceMappingURL=EncodingUtils.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/utils/EncodingUtils.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/utils/EncodingUtils.d.ts.map deleted file mode 100644 index 8762fc4..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/utils/EncodingUtils.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"EncodingUtils.d.ts","sourceRoot":"","sources":["../../../src/utils/EncodingUtils.ts"],"names":[],"mappings":";AAOA,qBAAa,aAAa;IACtB;;;;;OAKG;IACH,MAAM,CAAC,YAAY,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,cAAc,GAAG,MAAM;IAInE;;;OAGG;IACH,MAAM,CAAC,eAAe,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,cAAc,GAAG,MAAM;IAOtE;;;;;OAKG;IACH,MAAM,CAAC,YAAY,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM;IAI9C;;OAEG;IACH,MAAM,CAAC,eAAe,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM;CAOpD"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/utils/NetworkUtils.d.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/utils/NetworkUtils.d.ts deleted file mode 100644 index 6987088..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/utils/NetworkUtils.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { NetworkResponse } from "@azure/msal-common/node"; -export type UrlToHttpRequestOptions = { - protocol: string; - hostname: string; - hash: string; - search: string; - pathname: string; - path: string; - href: string; - port?: number; - auth?: string; -}; -export declare class NetworkUtils { - static getNetworkResponse(headers: Record, body: T, statusCode: number): NetworkResponse; - static urlToHttpOptions(url: URL): UrlToHttpRequestOptions; -} -//# sourceMappingURL=NetworkUtils.d.ts.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/utils/NetworkUtils.d.ts.map b/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/utils/NetworkUtils.d.ts.map deleted file mode 100644 index cc5ff90..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/lib/types/utils/NetworkUtils.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"NetworkUtils.d.ts","sourceRoot":"","sources":["../../../src/utils/NetworkUtils.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE1D,MAAM,MAAM,uBAAuB,GAAG;IAClC,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,qBAAa,YAAY;IACrB,MAAM,CAAC,kBAAkB,CAAC,CAAC,EACvB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC/B,IAAI,EAAE,CAAC,EACP,UAAU,EAAE,MAAM,GACnB,eAAe,CAAC,CAAC,CAAC;IAarB,MAAM,CAAC,gBAAgB,CAAC,GAAG,EAAE,GAAG,GAAG,uBAAuB;CAuB7D"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/package.json b/PBandGraphScaffold/node_modules/@azure/msal-node/package.json deleted file mode 100644 index 431765b..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/package.json +++ /dev/null @@ -1,92 +0,0 @@ -{ - "$schema": "https://json.schemastore.org/package.json", - "name": "@azure/msal-node", - "version": "2.16.3", - "author": { - "name": "Microsoft", - "email": "nugetaad@microsoft.com", - "url": "https://www.microsoft.com" - }, - "license": "MIT", - "repository": { - "type": "git", - "url": "https://github.com/AzureAD/microsoft-authentication-library-for-js.git" - }, - "description": "Microsoft Authentication Library for Node", - "keywords": [ - "js", - "ts", - "node", - "AAD", - "msal", - "oauth" - ], - "type": "module", - "main": "lib/msal-node.cjs", - "module": "dist/index.mjs", - "types": "dist/index.d.ts", - "exports": { - ".": { - "import": { - "types": "./dist/index.d.ts", - "default": "./dist/index.mjs" - }, - "require": { - "types": "./lib/types/index.d.ts", - "default": "./lib/msal-node.cjs" - } - }, - "./package.json": "./package.json" - }, - "files": [ - "dist", - "lib", - "src" - ], - "scripts": { - "build": "npm run clean && rollup -c --strictDeprecations --bundleConfigAsCjs", - "build:watch": "rollup -c --watch --strictDeprecations --bundleConfigAsCjs", - "clean": "shx rm -rf dist lib", - "test": "jest", - "test:watch": "jest --watch", - "test:coverage": "jest --coverage", - "lint": "eslint src --ext .ts", - "lint:fix": "npm run lint -- --fix", - "build:all": "cd ../.. && npm run build --workspace=@azure/msal-common --workspace=@azure/msal-node", - "prepack": "npm run build:all", - "format:check": "prettier --ignore-path .gitignore --check src test", - "format:fix": "prettier --ignore-path .gitignore --write src test", - "apiExtractor": "api-extractor run" - }, - "beachball": { - "disallowedChangeTypes": [ - "major" - ] - }, - "devDependencies": { - "@microsoft/api-extractor": "^7.43.4", - "@rollup/plugin-node-resolve": "^15.0.1", - "@rollup/plugin-typescript": "^11.0.0", - "@types/jest": "^29.5.0", - "@types/jsonwebtoken": "^9.0.1", - "@types/node": "^20.3.1", - "@types/uuid": "^7.0.0", - "eslint-config-msal": "file:../../shared-configs/eslint-config-msal", - "jest": "^29.5.0", - "prettier": "2.8.7", - "rollup": "^4.22.4", - "rollup-msal": "file:../../shared-configs/rollup-msal", - "ts-jest": "^29.1.0", - "tslib": "^1.10.0", - "typescript": "^4.9.5", - "yargs": "^17.3.1" - }, - "dependencies": { - "@azure/msal-common": "14.16.1", - "jsonwebtoken": "^9.0.0", - "uuid": "^8.3.0" - }, - "engines": { - "node": ">=16" - } -} diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/src/cache/ITokenCache.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/src/cache/ITokenCache.ts deleted file mode 100644 index 40ef18e..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/src/cache/ITokenCache.ts +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import { AccountInfo } from "@azure/msal-common/node"; - -/** - * Token cache interface for the client, giving access to cache APIs - * @public - */ -export interface ITokenCache { - /** API that retrieves all accounts currently in cache to the user */ - getAllAccounts(): Promise; - - /** Returns the signed in account matching homeAccountId */ - getAccountByHomeId(homeAccountId: string): Promise; - - /** Returns the signed in account matching localAccountId */ - getAccountByLocalId(localAccountId: string): Promise; - - /** API to remove a specific account and the relevant data from cache */ - removeAccount(account: AccountInfo): Promise; -} diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/src/cache/NodeStorage.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/src/cache/NodeStorage.ts deleted file mode 100644 index c285923..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/src/cache/NodeStorage.ts +++ /dev/null @@ -1,555 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import { - TokenKeys, - AccountEntity, - IdTokenEntity, - AccessTokenEntity, - RefreshTokenEntity, - AppMetadataEntity, - ServerTelemetryEntity, - ThrottlingEntity, - CacheManager, - Logger, - ValidCacheType, - ICrypto, - AuthorityMetadataEntity, - ValidCredentialType, - StaticAuthorityOptions, - CacheHelpers, -} from "@azure/msal-common/node"; - -import { Deserializer } from "./serializer/Deserializer.js"; -import { Serializer } from "./serializer/Serializer.js"; -import { - InMemoryCache, - JsonCache, - CacheKVStore, -} from "./serializer/SerializerTypes.js"; - -/** - * This class implements Storage for node, reading cache from user specified storage location or an extension library - * @public - */ -export class NodeStorage extends CacheManager { - // Cache configuration, either set by user or default values. - private logger: Logger; - private cache: CacheKVStore = {}; - private changeEmitters: Array = []; - - constructor( - logger: Logger, - clientId: string, - cryptoImpl: ICrypto, - staticAuthorityOptions?: StaticAuthorityOptions - ) { - super(clientId, cryptoImpl, logger, staticAuthorityOptions); - this.logger = logger; - } - - /** - * Queue up callbacks - * @param func - a callback function for cache change indication - */ - registerChangeEmitter(func: () => void): void { - this.changeEmitters.push(func); - } - - /** - * Invoke the callback when cache changes - */ - emitChange(): void { - this.changeEmitters.forEach((func) => func.call(null)); - } - - /** - * Converts cacheKVStore to InMemoryCache - * @param cache - key value store - */ - cacheToInMemoryCache(cache: CacheKVStore): InMemoryCache { - const inMemoryCache: InMemoryCache = { - accounts: {}, - idTokens: {}, - accessTokens: {}, - refreshTokens: {}, - appMetadata: {}, - }; - - for (const key in cache) { - const value = cache[key]; - if (typeof value !== "object") { - continue; - } - if (value instanceof AccountEntity) { - inMemoryCache.accounts[key] = value as AccountEntity; - } else if (CacheHelpers.isIdTokenEntity(value)) { - inMemoryCache.idTokens[key] = value as IdTokenEntity; - } else if (CacheHelpers.isAccessTokenEntity(value)) { - inMemoryCache.accessTokens[key] = value as AccessTokenEntity; - } else if (CacheHelpers.isRefreshTokenEntity(value)) { - inMemoryCache.refreshTokens[key] = value as RefreshTokenEntity; - } else if (CacheHelpers.isAppMetadataEntity(key, value)) { - inMemoryCache.appMetadata[key] = value as AppMetadataEntity; - } else { - continue; - } - } - - return inMemoryCache; - } - - /** - * converts inMemoryCache to CacheKVStore - * @param inMemoryCache - kvstore map for inmemory - */ - inMemoryCacheToCache(inMemoryCache: InMemoryCache): CacheKVStore { - // convert in memory cache to a flat Key-Value map - let cache = this.getCache(); - - cache = { - ...cache, - ...inMemoryCache.accounts, - ...inMemoryCache.idTokens, - ...inMemoryCache.accessTokens, - ...inMemoryCache.refreshTokens, - ...inMemoryCache.appMetadata, - }; - - // convert in memory cache to a flat Key-Value map - return cache; - } - - /** - * gets the current in memory cache for the client - */ - getInMemoryCache(): InMemoryCache { - this.logger.trace("Getting in-memory cache"); - - // convert the cache key value store to inMemoryCache - const inMemoryCache = this.cacheToInMemoryCache(this.getCache()); - return inMemoryCache; - } - - /** - * sets the current in memory cache for the client - * @param inMemoryCache - key value map in memory - */ - setInMemoryCache(inMemoryCache: InMemoryCache): void { - this.logger.trace("Setting in-memory cache"); - - // convert and append the inMemoryCache to cacheKVStore - const cache = this.inMemoryCacheToCache(inMemoryCache); - this.setCache(cache); - - this.emitChange(); - } - - /** - * get the current cache key-value store - */ - getCache(): CacheKVStore { - this.logger.trace("Getting cache key-value store"); - return this.cache; - } - - /** - * sets the current cache (key value store) - * @param cacheMap - key value map - */ - setCache(cache: CacheKVStore): void { - this.logger.trace("Setting cache key value store"); - this.cache = cache; - - // mark change in cache - this.emitChange(); - } - - /** - * Gets cache item with given key. - * @param key - lookup key for the cache entry - */ - getItem(key: string): ValidCacheType { - this.logger.tracePii(`Item key: ${key}`); - - // read cache - const cache = this.getCache(); - return cache[key]; - } - - /** - * Gets cache item with given key-value - * @param key - lookup key for the cache entry - * @param value - value of the cache entry - */ - setItem(key: string, value: ValidCacheType): void { - this.logger.tracePii(`Item key: ${key}`); - - // read cache - const cache = this.getCache(); - cache[key] = value; - - // write to cache - this.setCache(cache); - } - - getAccountKeys(): string[] { - const inMemoryCache = this.getInMemoryCache(); - const accountKeys = Object.keys(inMemoryCache.accounts); - - return accountKeys; - } - - getTokenKeys(): TokenKeys { - const inMemoryCache = this.getInMemoryCache(); - const tokenKeys = { - idToken: Object.keys(inMemoryCache.idTokens), - accessToken: Object.keys(inMemoryCache.accessTokens), - refreshToken: Object.keys(inMemoryCache.refreshTokens), - }; - - return tokenKeys; - } - - /** - * fetch the account entity - * @param accountKey - lookup key to fetch cache type AccountEntity - */ - getAccount(accountKey: string): AccountEntity | null { - const accountEntity = this.getCachedAccountEntity(accountKey); - if (accountEntity && AccountEntity.isAccountEntity(accountEntity)) { - return this.updateOutdatedCachedAccount( - accountKey, - accountEntity, - "" - ); - } - return null; - } - - /** - * Reads account from cache, builds it into an account entity and returns it. - * @param accountKey - lookup key to fetch cache type AccountEntity - * @returns - */ - getCachedAccountEntity(accountKey: string): AccountEntity | null { - const cachedAccount = this.getItem(accountKey); - return cachedAccount - ? Object.assign(new AccountEntity(), this.getItem(accountKey)) - : null; - } - - /** - * set account entity - * @param account - cache value to be set of type AccountEntity - */ - setAccount(account: AccountEntity): void { - const accountKey = account.generateAccountKey(); - this.setItem(accountKey, account); - } - - /** - * fetch the idToken credential - * @param idTokenKey - lookup key to fetch cache type IdTokenEntity - */ - getIdTokenCredential(idTokenKey: string): IdTokenEntity | null { - const idToken = this.getItem(idTokenKey) as IdTokenEntity; - if (CacheHelpers.isIdTokenEntity(idToken)) { - return idToken; - } - return null; - } - - /** - * set idToken credential - * @param idToken - cache value to be set of type IdTokenEntity - */ - setIdTokenCredential(idToken: IdTokenEntity): void { - const idTokenKey = CacheHelpers.generateCredentialKey(idToken); - this.setItem(idTokenKey, idToken); - } - - /** - * fetch the accessToken credential - * @param accessTokenKey - lookup key to fetch cache type AccessTokenEntity - */ - getAccessTokenCredential(accessTokenKey: string): AccessTokenEntity | null { - const accessToken = this.getItem(accessTokenKey) as AccessTokenEntity; - if (CacheHelpers.isAccessTokenEntity(accessToken)) { - return accessToken; - } - return null; - } - - /** - * set accessToken credential - * @param accessToken - cache value to be set of type AccessTokenEntity - */ - setAccessTokenCredential(accessToken: AccessTokenEntity): void { - const accessTokenKey = CacheHelpers.generateCredentialKey(accessToken); - this.setItem(accessTokenKey, accessToken); - } - - /** - * fetch the refreshToken credential - * @param refreshTokenKey - lookup key to fetch cache type RefreshTokenEntity - */ - getRefreshTokenCredential( - refreshTokenKey: string - ): RefreshTokenEntity | null { - const refreshToken = this.getItem( - refreshTokenKey - ) as RefreshTokenEntity; - if (CacheHelpers.isRefreshTokenEntity(refreshToken)) { - return refreshToken as RefreshTokenEntity; - } - return null; - } - - /** - * set refreshToken credential - * @param refreshToken - cache value to be set of type RefreshTokenEntity - */ - setRefreshTokenCredential(refreshToken: RefreshTokenEntity): void { - const refreshTokenKey = - CacheHelpers.generateCredentialKey(refreshToken); - this.setItem(refreshTokenKey, refreshToken); - } - - /** - * fetch appMetadata entity from the platform cache - * @param appMetadataKey - lookup key to fetch cache type AppMetadataEntity - */ - getAppMetadata(appMetadataKey: string): AppMetadataEntity | null { - const appMetadata: AppMetadataEntity = this.getItem( - appMetadataKey - ) as AppMetadataEntity; - if (CacheHelpers.isAppMetadataEntity(appMetadataKey, appMetadata)) { - return appMetadata; - } - return null; - } - - /** - * set appMetadata entity to the platform cache - * @param appMetadata - cache value to be set of type AppMetadataEntity - */ - setAppMetadata(appMetadata: AppMetadataEntity): void { - const appMetadataKey = CacheHelpers.generateAppMetadataKey(appMetadata); - this.setItem(appMetadataKey, appMetadata); - } - - /** - * fetch server telemetry entity from the platform cache - * @param serverTelemetrykey - lookup key to fetch cache type ServerTelemetryEntity - */ - getServerTelemetry( - serverTelemetrykey: string - ): ServerTelemetryEntity | null { - const serverTelemetryEntity: ServerTelemetryEntity = this.getItem( - serverTelemetrykey - ) as ServerTelemetryEntity; - if ( - serverTelemetryEntity && - CacheHelpers.isServerTelemetryEntity( - serverTelemetrykey, - serverTelemetryEntity - ) - ) { - return serverTelemetryEntity; - } - return null; - } - - /** - * set server telemetry entity to the platform cache - * @param serverTelemetryKey - lookup key to fetch cache type ServerTelemetryEntity - * @param serverTelemetry - cache value to be set of type ServerTelemetryEntity - */ - setServerTelemetry( - serverTelemetryKey: string, - serverTelemetry: ServerTelemetryEntity - ): void { - this.setItem(serverTelemetryKey, serverTelemetry); - } - - /** - * fetch authority metadata entity from the platform cache - * @param key - lookup key to fetch cache type AuthorityMetadataEntity - */ - getAuthorityMetadata(key: string): AuthorityMetadataEntity | null { - const authorityMetadataEntity: AuthorityMetadataEntity = this.getItem( - key - ) as AuthorityMetadataEntity; - if ( - authorityMetadataEntity && - CacheHelpers.isAuthorityMetadataEntity(key, authorityMetadataEntity) - ) { - return authorityMetadataEntity; - } - return null; - } - - /** - * Get all authority metadata keys - */ - getAuthorityMetadataKeys(): Array { - return this.getKeys().filter((key) => { - return this.isAuthorityMetadata(key); - }); - } - - /** - * set authority metadata entity to the platform cache - * @param key - lookup key to fetch cache type AuthorityMetadataEntity - * @param metadata - cache value to be set of type AuthorityMetadataEntity - */ - setAuthorityMetadata(key: string, metadata: AuthorityMetadataEntity): void { - this.setItem(key, metadata); - } - - /** - * fetch throttling entity from the platform cache - * @param throttlingCacheKey - lookup key to fetch cache type ThrottlingEntity - */ - getThrottlingCache(throttlingCacheKey: string): ThrottlingEntity | null { - const throttlingCache: ThrottlingEntity = this.getItem( - throttlingCacheKey - ) as ThrottlingEntity; - if ( - throttlingCache && - CacheHelpers.isThrottlingEntity(throttlingCacheKey, throttlingCache) - ) { - return throttlingCache; - } - return null; - } - - /** - * set throttling entity to the platform cache - * @param throttlingCacheKey - lookup key to fetch cache type ThrottlingEntity - * @param throttlingCache - cache value to be set of type ThrottlingEntity - */ - setThrottlingCache( - throttlingCacheKey: string, - throttlingCache: ThrottlingEntity - ): void { - this.setItem(throttlingCacheKey, throttlingCache); - } - - /** - * Removes the cache item from memory with the given key. - * @param key - lookup key to remove a cache entity - * @param inMemory - key value map of the cache - */ - removeItem(key: string): boolean { - this.logger.tracePii(`Item key: ${key}`); - - // read inMemoryCache - let result: boolean = false; - const cache = this.getCache(); - - if (!!cache[key]) { - delete cache[key]; - result = true; - } - - // write to the cache after removal - if (result) { - this.setCache(cache); - this.emitChange(); - } - return result; - } - - /** - * Remove account entity from the platform cache if it's outdated - * @param accountKey - lookup key to fetch cache type AccountEntity - */ - removeOutdatedAccount(accountKey: string): void { - this.removeItem(accountKey); - } - - /** - * Checks whether key is in cache. - * @param key - look up key for a cache entity - */ - containsKey(key: string): boolean { - return this.getKeys().includes(key); - } - - /** - * Gets all keys in window. - */ - getKeys(): string[] { - this.logger.trace("Retrieving all cache keys"); - - // read cache - const cache = this.getCache(); - return [...Object.keys(cache)]; - } - - /** - * Clears all cache entries created by MSAL (except tokens). - */ - clear(): void { - this.logger.trace("Clearing cache entries created by MSAL"); - - // read inMemoryCache - const cacheKeys = this.getKeys(); - - // delete each element - cacheKeys.forEach((key) => { - this.removeItem(key); - }); - this.emitChange(); - } - - /** - * Initialize in memory cache from an exisiting cache vault - * @param cache - blob formatted cache (JSON) - */ - static generateInMemoryCache(cache: string): InMemoryCache { - return Deserializer.deserializeAllCache( - Deserializer.deserializeJSONBlob(cache) - ); - } - - /** - * retrieves the final JSON - * @param inMemoryCache - itemised cache read from the JSON - */ - static generateJsonCache(inMemoryCache: InMemoryCache): JsonCache { - return Serializer.serializeAllCache(inMemoryCache); - } - - /** - * Updates a credential's cache key if the current cache key is outdated - */ - updateCredentialCacheKey( - currentCacheKey: string, - credential: ValidCredentialType - ): string { - const updatedCacheKey = CacheHelpers.generateCredentialKey(credential); - - if (currentCacheKey !== updatedCacheKey) { - const cacheItem = this.getItem(currentCacheKey); - if (cacheItem) { - this.removeItem(currentCacheKey); - this.setItem(updatedCacheKey, cacheItem); - this.logger.verbose( - `Updated an outdated ${credential.credentialType} cache key` - ); - return updatedCacheKey; - } else { - this.logger.error( - `Attempted to update an outdated ${credential.credentialType} cache key but no item matching the outdated key was found in storage` - ); - } - } - - return currentCacheKey; - } -} diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/src/cache/TokenCache.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/src/cache/TokenCache.ts deleted file mode 100644 index 56207b2..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/src/cache/TokenCache.ts +++ /dev/null @@ -1,365 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import { NodeStorage } from "./NodeStorage.js"; -import { - AccountEntity, - AccountInfo, - Logger, - ISerializableTokenCache, - ICachePlugin, - TokenCacheContext, -} from "@azure/msal-common/node"; -import { - InMemoryCache, - JsonCache, - SerializedAccountEntity, - SerializedAccessTokenEntity, - SerializedRefreshTokenEntity, - SerializedIdTokenEntity, - SerializedAppMetadataEntity, - CacheKVStore, -} from "./serializer/SerializerTypes.js"; -import { Deserializer } from "./serializer/Deserializer.js"; -import { Serializer } from "./serializer/Serializer.js"; -import { ITokenCache } from "./ITokenCache.js"; -import { CryptoProvider } from "../crypto/CryptoProvider.js"; - -const defaultSerializedCache: JsonCache = { - Account: {}, - IdToken: {}, - AccessToken: {}, - RefreshToken: {}, - AppMetadata: {}, -}; - -/** - * In-memory token cache manager - * @public - */ -export class TokenCache implements ISerializableTokenCache, ITokenCache { - private storage: NodeStorage; - private cacheHasChanged: boolean; - private cacheSnapshot: string; - private readonly persistence: ICachePlugin; - private logger: Logger; - - constructor( - storage: NodeStorage, - logger: Logger, - cachePlugin?: ICachePlugin - ) { - this.cacheHasChanged = false; - this.storage = storage; - this.storage.registerChangeEmitter(this.handleChangeEvent.bind(this)); - if (cachePlugin) { - this.persistence = cachePlugin; - } - this.logger = logger; - } - - /** - * Set to true if cache state has changed since last time serialize or writeToPersistence was called - */ - hasChanged(): boolean { - return this.cacheHasChanged; - } - - /** - * Serializes in memory cache to JSON - */ - serialize(): string { - this.logger.trace("Serializing in-memory cache"); - let finalState = Serializer.serializeAllCache( - this.storage.getInMemoryCache() as InMemoryCache - ); - - // if cacheSnapshot not null or empty, merge - if (this.cacheSnapshot) { - this.logger.trace("Reading cache snapshot from disk"); - finalState = this.mergeState( - JSON.parse(this.cacheSnapshot), - finalState - ); - } else { - this.logger.trace("No cache snapshot to merge"); - } - this.cacheHasChanged = false; - - return JSON.stringify(finalState); - } - - /** - * Deserializes JSON to in-memory cache. JSON should be in MSAL cache schema format - * @param cache - blob formatted cache - */ - deserialize(cache: string): void { - this.logger.trace("Deserializing JSON to in-memory cache"); - this.cacheSnapshot = cache; - - if (this.cacheSnapshot) { - this.logger.trace("Reading cache snapshot from disk"); - const deserializedCache = Deserializer.deserializeAllCache( - this.overlayDefaults(JSON.parse(this.cacheSnapshot)) - ); - this.storage.setInMemoryCache(deserializedCache); - } else { - this.logger.trace("No cache snapshot to deserialize"); - } - } - - /** - * Fetches the cache key-value map - */ - getKVStore(): CacheKVStore { - return this.storage.getCache(); - } - - /** - * API that retrieves all accounts currently in cache to the user - */ - async getAllAccounts( - correlationId: string = new CryptoProvider().createNewGuid() - ): Promise { - this.logger.trace("getAllAccounts called"); - let cacheContext; - try { - if (this.persistence) { - cacheContext = new TokenCacheContext(this, false); - await this.persistence.beforeCacheAccess(cacheContext); - } - return this.storage.getAllAccounts(correlationId); - } finally { - if (this.persistence && cacheContext) { - await this.persistence.afterCacheAccess(cacheContext); - } - } - } - - /** - * Returns the signed in account matching homeAccountId. - * (the account object is created at the time of successful login) - * or null when no matching account is found - * @param homeAccountId - unique identifier for an account (uid.utid) - */ - async getAccountByHomeId( - homeAccountId: string - ): Promise { - const allAccounts = await this.getAllAccounts(); - if (homeAccountId && allAccounts && allAccounts.length) { - return ( - allAccounts.filter( - (accountObj) => accountObj.homeAccountId === homeAccountId - )[0] || null - ); - } else { - return null; - } - } - - /** - * Returns the signed in account matching localAccountId. - * (the account object is created at the time of successful login) - * or null when no matching account is found - * @param localAccountId - unique identifier of an account (sub/obj when homeAccountId cannot be populated) - */ - async getAccountByLocalId( - localAccountId: string - ): Promise { - const allAccounts = await this.getAllAccounts(); - if (localAccountId && allAccounts && allAccounts.length) { - return ( - allAccounts.filter( - (accountObj) => accountObj.localAccountId === localAccountId - )[0] || null - ); - } else { - return null; - } - } - - /** - * API to remove a specific account and the relevant data from cache - * @param account - AccountInfo passed by the user - */ - async removeAccount( - account: AccountInfo, - correlationId: string = new CryptoProvider().createNewGuid() - ): Promise { - this.logger.trace("removeAccount called"); - let cacheContext; - try { - if (this.persistence) { - cacheContext = new TokenCacheContext(this, true); - await this.persistence.beforeCacheAccess(cacheContext); - } - await this.storage.removeAccount( - AccountEntity.generateAccountCacheKey(account), - correlationId - ); - } finally { - if (this.persistence && cacheContext) { - await this.persistence.afterCacheAccess(cacheContext); - } - } - } - - /** - * Called when the cache has changed state. - */ - private handleChangeEvent() { - this.cacheHasChanged = true; - } - - /** - * Merge in memory cache with the cache snapshot. - * @param oldState - cache before changes - * @param currentState - current cache state in the library - */ - private mergeState( - oldState: JsonCache, - currentState: JsonCache - ): JsonCache { - this.logger.trace("Merging in-memory cache with cache snapshot"); - const stateAfterRemoval = this.mergeRemovals(oldState, currentState); - return this.mergeUpdates(stateAfterRemoval, currentState); - } - - /** - * Deep update of oldState based on newState values - * @param oldState - cache before changes - * @param newState - updated cache - */ - private mergeUpdates(oldState: object, newState: object): JsonCache { - Object.keys(newState).forEach((newKey: string) => { - const newValue = newState[newKey]; - - // if oldState does not contain value but newValue does, add it - if (!oldState.hasOwnProperty(newKey)) { - if (newValue !== null) { - oldState[newKey] = newValue; - } - } else { - // both oldState and newState contain the key, do deep update - const newValueNotNull = newValue !== null; - const newValueIsObject = typeof newValue === "object"; - const newValueIsNotArray = !Array.isArray(newValue); - const oldStateNotUndefinedOrNull = - typeof oldState[newKey] !== "undefined" && - oldState[newKey] !== null; - - if ( - newValueNotNull && - newValueIsObject && - newValueIsNotArray && - oldStateNotUndefinedOrNull - ) { - this.mergeUpdates(oldState[newKey], newValue); - } else { - oldState[newKey] = newValue; - } - } - }); - - return oldState as JsonCache; - } - - /** - * Removes entities in oldState that the were removed from newState. If there are any unknown values in root of - * oldState that are not recognized, they are left untouched. - * @param oldState - cache before changes - * @param newState - updated cache - */ - private mergeRemovals(oldState: JsonCache, newState: JsonCache): JsonCache { - this.logger.trace("Remove updated entries in cache"); - const accounts = oldState.Account - ? this.mergeRemovalsDict( - oldState.Account, - newState.Account - ) - : oldState.Account; - const accessTokens = oldState.AccessToken - ? this.mergeRemovalsDict( - oldState.AccessToken, - newState.AccessToken - ) - : oldState.AccessToken; - const refreshTokens = oldState.RefreshToken - ? this.mergeRemovalsDict( - oldState.RefreshToken, - newState.RefreshToken - ) - : oldState.RefreshToken; - const idTokens = oldState.IdToken - ? this.mergeRemovalsDict( - oldState.IdToken, - newState.IdToken - ) - : oldState.IdToken; - const appMetadata = oldState.AppMetadata - ? this.mergeRemovalsDict( - oldState.AppMetadata, - newState.AppMetadata - ) - : oldState.AppMetadata; - - return { - ...oldState, - Account: accounts, - AccessToken: accessTokens, - RefreshToken: refreshTokens, - IdToken: idTokens, - AppMetadata: appMetadata, - }; - } - - /** - * Helper to merge new cache with the old one - * @param oldState - cache before changes - * @param newState - updated cache - */ - private mergeRemovalsDict( - oldState: Record, - newState?: Record - ): Record { - const finalState = { ...oldState }; - Object.keys(oldState).forEach((oldKey) => { - if (!newState || !newState.hasOwnProperty(oldKey)) { - delete finalState[oldKey]; - } - }); - return finalState; - } - - /** - * Helper to overlay as a part of cache merge - * @param passedInCache - cache read from the blob - */ - private overlayDefaults(passedInCache: JsonCache): JsonCache { - this.logger.trace("Overlaying input cache with the default cache"); - return { - Account: { - ...defaultSerializedCache.Account, - ...passedInCache.Account, - }, - IdToken: { - ...defaultSerializedCache.IdToken, - ...passedInCache.IdToken, - }, - AccessToken: { - ...defaultSerializedCache.AccessToken, - ...passedInCache.AccessToken, - }, - RefreshToken: { - ...defaultSerializedCache.RefreshToken, - ...passedInCache.RefreshToken, - }, - AppMetadata: { - ...defaultSerializedCache.AppMetadata, - ...passedInCache.AppMetadata, - }, - }; - } -} diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/src/cache/distributed/DistributedCachePlugin.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/src/cache/distributed/DistributedCachePlugin.ts deleted file mode 100644 index d52b94c..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/src/cache/distributed/DistributedCachePlugin.ts +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import { - AccountEntity, - ICachePlugin, - TokenCacheContext, -} from "@azure/msal-common/node"; -import { TokenCache } from "../TokenCache.js"; -import { IPartitionManager } from "./IPartitionManager.js"; -import { ICacheClient } from "./ICacheClient.js"; - -/** - * Cache plugin that serializes data to the cache and deserializes data from the cache - * @public - */ -export class DistributedCachePlugin implements ICachePlugin { - private client: ICacheClient; - private partitionManager: IPartitionManager; - - constructor(client: ICacheClient, partitionManager: IPartitionManager) { - this.client = client; - this.partitionManager = partitionManager; - } - - /** - * Deserializes the cache before accessing it - * @param cacheContext - TokenCacheContext - */ - public async beforeCacheAccess( - cacheContext: TokenCacheContext - ): Promise { - const partitionKey = await this.partitionManager.getKey(); - const cacheData = await this.client.get(partitionKey); - cacheContext.tokenCache.deserialize(cacheData); - } - - /** - * Serializes the cache after accessing it - * @param cacheContext - TokenCacheContext - */ - public async afterCacheAccess( - cacheContext: TokenCacheContext - ): Promise { - if (cacheContext.cacheHasChanged) { - const kvStore = ( - cacheContext.tokenCache as TokenCache - ).getKVStore(); - const accountEntities = Object.values(kvStore).filter((value) => - AccountEntity.isAccountEntity(value as object) - ); - - let partitionKey: string; - if (accountEntities.length > 0) { - const accountEntity = accountEntities[0] as AccountEntity; - partitionKey = await this.partitionManager.extractKey( - accountEntity - ); - } else { - partitionKey = await this.partitionManager.getKey(); - } - - await this.client.set( - partitionKey, - cacheContext.tokenCache.serialize() - ); - } - } -} diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/src/cache/distributed/ICacheClient.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/src/cache/distributed/ICacheClient.ts deleted file mode 100644 index a7d0a74..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/src/cache/distributed/ICacheClient.ts +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -/** - * Interface for the cache that defines a getter and setter - * @public - */ -export interface ICacheClient { - /** - * Retrieve the value from the cache - * - * @param key - key of item in the cache - * @returns Promise - */ - get(key: string): Promise; - - /** - * Save the required value using the provided key to cache - * - * @param key - key of item in the cache - * @param value - value of item to be saved in the cache - * @returns Promise - */ - set(key: string, value: string): Promise; -} diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/src/cache/distributed/IPartitionManager.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/src/cache/distributed/IPartitionManager.ts deleted file mode 100644 index abd83bd..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/src/cache/distributed/IPartitionManager.ts +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import { AccountEntity } from "@azure/msal-common/node"; - -/** - * Interface that defines getter methods to get keys used to identity data in the cache - * @public - */ -export interface IPartitionManager { - /** - * This function should return the correct key from which to read - * the specific user's information from cache. - * - * Example: Your application may be partitioning the user's cache - * information for each user using the homeAccountId and thus - * this function would return the homeAccountId for - * the user in question - * - * @returns Promise - */ - getKey(): Promise; - - /** - * This function should return the correct key being used to save each - * user's cache information to cache - given an AccountEntity - * - * Example: Your application may be partitioning the user's cache - * information for each user using the homeAccountId thus - * this function would return the homeAccountId from - * the provided AccountEntity - * - * @param accountEntity - AccountEntity - * @returns Promise - */ - extractKey(accountEntity: AccountEntity): Promise; -} diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/src/cache/serializer/Deserializer.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/src/cache/serializer/Deserializer.ts deleted file mode 100644 index 8c136f6..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/src/cache/serializer/Deserializer.ts +++ /dev/null @@ -1,218 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import { - AccountCache, - IdTokenCache, - AccessTokenCache, - RefreshTokenCache, - AppMetadataCache, - AccountEntity, - IdTokenEntity, - AccessTokenEntity, - RefreshTokenEntity, - CacheManager, - CredentialType, - AuthenticationScheme, -} from "@azure/msal-common/node"; -import { - JsonCache, - InMemoryCache, - SerializedAccountEntity, - SerializedIdTokenEntity, - SerializedAccessTokenEntity, - SerializedRefreshTokenEntity, - SerializedAppMetadataEntity, -} from "./SerializerTypes.js"; - -/** - * This class deserializes cache entities read from the file into in-memory object types defined internally - * @internal - */ -export class Deserializer { - /** - * Parse the JSON blob in memory and deserialize the content - * @param cachedJson - JSON blob cache - */ - static deserializeJSONBlob(jsonFile: string): JsonCache { - const deserializedCache = !jsonFile ? {} : JSON.parse(jsonFile); - return deserializedCache; - } - - /** - * Deserializes accounts to AccountEntity objects - * @param accounts - accounts of type SerializedAccountEntity - */ - static deserializeAccounts( - accounts: Record - ): AccountCache { - const accountObjects: AccountCache = {}; - if (accounts) { - Object.keys(accounts).map(function (key) { - const serializedAcc = accounts[key]; - const mappedAcc = { - homeAccountId: serializedAcc.home_account_id, - environment: serializedAcc.environment, - realm: serializedAcc.realm, - localAccountId: serializedAcc.local_account_id, - username: serializedAcc.username, - authorityType: serializedAcc.authority_type, - name: serializedAcc.name, - clientInfo: serializedAcc.client_info, - lastModificationTime: serializedAcc.last_modification_time, - lastModificationApp: serializedAcc.last_modification_app, - tenantProfiles: serializedAcc.tenantProfiles?.map( - (serializedTenantProfile) => { - return JSON.parse(serializedTenantProfile); - } - ), - }; - const account: AccountEntity = new AccountEntity(); - CacheManager.toObject(account, mappedAcc); - accountObjects[key] = account; - }); - } - - return accountObjects; - } - - /** - * Deserializes id tokens to IdTokenEntity objects - * @param idTokens - credentials of type SerializedIdTokenEntity - */ - static deserializeIdTokens( - idTokens: Record - ): IdTokenCache { - const idObjects: IdTokenCache = {}; - if (idTokens) { - Object.keys(idTokens).map(function (key) { - const serializedIdT = idTokens[key]; - const idToken: IdTokenEntity = { - homeAccountId: serializedIdT.home_account_id, - environment: serializedIdT.environment, - credentialType: - serializedIdT.credential_type as CredentialType, - clientId: serializedIdT.client_id, - secret: serializedIdT.secret, - realm: serializedIdT.realm, - }; - idObjects[key] = idToken; - }); - } - return idObjects; - } - - /** - * Deserializes access tokens to AccessTokenEntity objects - * @param accessTokens - access tokens of type SerializedAccessTokenEntity - */ - static deserializeAccessTokens( - accessTokens: Record - ): AccessTokenCache { - const atObjects: AccessTokenCache = {}; - if (accessTokens) { - Object.keys(accessTokens).map(function (key) { - const serializedAT = accessTokens[key]; - const accessToken: AccessTokenEntity = { - homeAccountId: serializedAT.home_account_id, - environment: serializedAT.environment, - credentialType: - serializedAT.credential_type as CredentialType, - clientId: serializedAT.client_id, - secret: serializedAT.secret, - realm: serializedAT.realm, - target: serializedAT.target, - cachedAt: serializedAT.cached_at, - expiresOn: serializedAT.expires_on, - extendedExpiresOn: serializedAT.extended_expires_on, - refreshOn: serializedAT.refresh_on, - keyId: serializedAT.key_id, - tokenType: serializedAT.token_type as AuthenticationScheme, - requestedClaims: serializedAT.requestedClaims, - requestedClaimsHash: serializedAT.requestedClaimsHash, - userAssertionHash: serializedAT.userAssertionHash, - }; - atObjects[key] = accessToken; - }); - } - - return atObjects; - } - - /** - * Deserializes refresh tokens to RefreshTokenEntity objects - * @param refreshTokens - refresh tokens of type SerializedRefreshTokenEntity - */ - static deserializeRefreshTokens( - refreshTokens: Record - ): RefreshTokenCache { - const rtObjects: RefreshTokenCache = {}; - if (refreshTokens) { - Object.keys(refreshTokens).map(function (key) { - const serializedRT = refreshTokens[key]; - const refreshToken: RefreshTokenEntity = { - homeAccountId: serializedRT.home_account_id, - environment: serializedRT.environment, - credentialType: - serializedRT.credential_type as CredentialType, - clientId: serializedRT.client_id, - secret: serializedRT.secret, - familyId: serializedRT.family_id, - target: serializedRT.target, - realm: serializedRT.realm, - }; - rtObjects[key] = refreshToken; - }); - } - - return rtObjects; - } - - /** - * Deserializes appMetadata to AppMetaData objects - * @param appMetadata - app metadata of type SerializedAppMetadataEntity - */ - static deserializeAppMetadata( - appMetadata: Record - ): AppMetadataCache { - const appMetadataObjects: AppMetadataCache = {}; - if (appMetadata) { - Object.keys(appMetadata).map(function (key) { - const serializedAmdt = appMetadata[key]; - appMetadataObjects[key] = { - clientId: serializedAmdt.client_id, - environment: serializedAmdt.environment, - familyId: serializedAmdt.family_id, - }; - }); - } - - return appMetadataObjects; - } - - /** - * Deserialize an inMemory Cache - * @param jsonCache - JSON blob cache - */ - static deserializeAllCache(jsonCache: JsonCache): InMemoryCache { - return { - accounts: jsonCache.Account - ? this.deserializeAccounts(jsonCache.Account) - : {}, - idTokens: jsonCache.IdToken - ? this.deserializeIdTokens(jsonCache.IdToken) - : {}, - accessTokens: jsonCache.AccessToken - ? this.deserializeAccessTokens(jsonCache.AccessToken) - : {}, - refreshTokens: jsonCache.RefreshToken - ? this.deserializeRefreshTokens(jsonCache.RefreshToken) - : {}, - appMetadata: jsonCache.AppMetadata - ? this.deserializeAppMetadata(jsonCache.AppMetadata) - : {}, - }; - } -} diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/src/cache/serializer/Serializer.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/src/cache/serializer/Serializer.ts deleted file mode 100644 index 815fe26..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/src/cache/serializer/Serializer.ts +++ /dev/null @@ -1,182 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import { - AccountCache, - IdTokenCache, - AccessTokenCache, - RefreshTokenCache, - AppMetadataCache, -} from "@azure/msal-common/node"; -import { - InMemoryCache, - JsonCache, - SerializedAccountEntity, - SerializedIdTokenEntity, - SerializedAccessTokenEntity, - SerializedRefreshTokenEntity, - SerializedAppMetadataEntity, -} from "./SerializerTypes.js"; - -/** - * This class serializes cache entities to be saved into in-memory object types defined internally - * @internal - */ -export class Serializer { - /** - * serialize the JSON blob - * @param data - JSON blob cache - */ - static serializeJSONBlob(data: JsonCache): string { - return JSON.stringify(data); - } - - /** - * Serialize Accounts - * @param accCache - cache of accounts - */ - static serializeAccounts( - accCache: AccountCache - ): Record { - const accounts: Record = {}; - Object.keys(accCache).map(function (key) { - const accountEntity = accCache[key]; - accounts[key] = { - home_account_id: accountEntity.homeAccountId, - environment: accountEntity.environment, - realm: accountEntity.realm, - local_account_id: accountEntity.localAccountId, - username: accountEntity.username, - authority_type: accountEntity.authorityType, - name: accountEntity.name, - client_info: accountEntity.clientInfo, - last_modification_time: accountEntity.lastModificationTime, - last_modification_app: accountEntity.lastModificationApp, - tenantProfiles: accountEntity.tenantProfiles?.map( - (tenantProfile) => { - return JSON.stringify(tenantProfile); - } - ), - }; - }); - - return accounts; - } - - /** - * Serialize IdTokens - * @param idTCache - cache of ID tokens - */ - static serializeIdTokens( - idTCache: IdTokenCache - ): Record { - const idTokens: Record = {}; - Object.keys(idTCache).map(function (key) { - const idTEntity = idTCache[key]; - idTokens[key] = { - home_account_id: idTEntity.homeAccountId, - environment: idTEntity.environment, - credential_type: idTEntity.credentialType, - client_id: idTEntity.clientId, - secret: idTEntity.secret, - realm: idTEntity.realm, - }; - }); - - return idTokens; - } - - /** - * Serializes AccessTokens - * @param atCache - cache of access tokens - */ - static serializeAccessTokens( - atCache: AccessTokenCache - ): Record { - const accessTokens: Record = {}; - Object.keys(atCache).map(function (key) { - const atEntity = atCache[key]; - accessTokens[key] = { - home_account_id: atEntity.homeAccountId, - environment: atEntity.environment, - credential_type: atEntity.credentialType, - client_id: atEntity.clientId, - secret: atEntity.secret, - realm: atEntity.realm, - target: atEntity.target, - cached_at: atEntity.cachedAt, - expires_on: atEntity.expiresOn, - extended_expires_on: atEntity.extendedExpiresOn, - refresh_on: atEntity.refreshOn, - key_id: atEntity.keyId, - token_type: atEntity.tokenType, - requestedClaims: atEntity.requestedClaims, - requestedClaimsHash: atEntity.requestedClaimsHash, - userAssertionHash: atEntity.userAssertionHash, - }; - }); - - return accessTokens; - } - - /** - * Serialize refreshTokens - * @param rtCache - cache of refresh tokens - */ - static serializeRefreshTokens( - rtCache: RefreshTokenCache - ): Record { - const refreshTokens: Record = {}; - Object.keys(rtCache).map(function (key) { - const rtEntity = rtCache[key]; - refreshTokens[key] = { - home_account_id: rtEntity.homeAccountId, - environment: rtEntity.environment, - credential_type: rtEntity.credentialType, - client_id: rtEntity.clientId, - secret: rtEntity.secret, - family_id: rtEntity.familyId, - target: rtEntity.target, - realm: rtEntity.realm, - }; - }); - - return refreshTokens; - } - - /** - * Serialize amdtCache - * @param amdtCache - cache of app metadata - */ - static serializeAppMetadata( - amdtCache: AppMetadataCache - ): Record { - const appMetadata: Record = {}; - Object.keys(amdtCache).map(function (key) { - const amdtEntity = amdtCache[key]; - appMetadata[key] = { - client_id: amdtEntity.clientId, - environment: amdtEntity.environment, - family_id: amdtEntity.familyId, - }; - }); - - return appMetadata; - } - - /** - * Serialize the cache - * @param inMemCache - itemised cache read from the JSON - */ - static serializeAllCache(inMemCache: InMemoryCache): JsonCache { - return { - Account: this.serializeAccounts(inMemCache.accounts), - IdToken: this.serializeIdTokens(inMemCache.idTokens), - AccessToken: this.serializeAccessTokens(inMemCache.accessTokens), - RefreshToken: this.serializeRefreshTokens(inMemCache.refreshTokens), - AppMetadata: this.serializeAppMetadata(inMemCache.appMetadata), - }; - } -} diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/src/cache/serializer/SerializerTypes.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/src/cache/serializer/SerializerTypes.ts deleted file mode 100644 index fd27a05..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/src/cache/serializer/SerializerTypes.ts +++ /dev/null @@ -1,122 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import { - AccountCache, - IdTokenCache, - AccessTokenCache, - RefreshTokenCache, - AppMetadataCache, - ValidCacheType, -} from "@azure/msal-common/node"; - -/** - * Key value store for in-memory cache - * @public - */ -export type CacheKVStore = Record; - -/** - * Cache format read from the cache blob provided to the configuration during app instantiation - * @public - */ -export type JsonCache = { - Account: Record; - IdToken: Record; - AccessToken: Record; - RefreshToken: Record; - AppMetadata: Record; -}; - -/** - * Intermittent type to handle in-memory data objects with defined types - * @public - */ -export type InMemoryCache = { - accounts: AccountCache; - idTokens: IdTokenCache; - accessTokens: AccessTokenCache; - refreshTokens: RefreshTokenCache; - appMetadata: AppMetadataCache; -}; - -/** - * Account type - * @public - */ -export type SerializedAccountEntity = { - home_account_id: string; - environment: string; - realm: string; - local_account_id: string; - username: string; - authority_type: string; - name?: string; - client_info?: string; - last_modification_time?: string; - last_modification_app?: string; - tenantProfiles?: string[]; -}; - -/** - * Idtoken credential type - * @public - */ -export type SerializedIdTokenEntity = { - home_account_id: string; - environment: string; - credential_type: string; - client_id: string; - secret: string; - realm: string; -}; - -/** - * Access token credential type - * @public - */ -export type SerializedAccessTokenEntity = { - home_account_id: string; - environment: string; - credential_type: string; - client_id: string; - secret: string; - realm: string; - target: string; - cached_at: string; - expires_on: string; - extended_expires_on?: string; - refresh_on?: string; - key_id?: string; - token_type?: string; - requestedClaims?: string; - requestedClaimsHash?: string; - userAssertionHash?: string; -}; - -/** - * Refresh token credential type - * @public - */ -export type SerializedRefreshTokenEntity = { - home_account_id: string; - environment: string; - credential_type: string; - client_id: string; - secret: string; - family_id?: string; - target?: string; - realm?: string; -}; - -/** - * AppMetadata type - * @public - */ -export type SerializedAppMetadataEntity = { - client_id: string; - environment: string; - family_id?: string; -}; diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/src/client/ClientApplication.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/src/client/ClientApplication.ts deleted file mode 100644 index 6a07dc4..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/src/client/ClientApplication.ts +++ /dev/null @@ -1,624 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import { - AuthorizationCodeClient, - ClientConfiguration, - RefreshTokenClient, - AuthenticationResult, - Authority, - AuthorityFactory, - BaseAuthRequest, - SilentFlowClient, - Logger, - ServerTelemetryManager, - ServerTelemetryRequest, - CommonSilentFlowRequest, - CommonRefreshTokenRequest, - CommonAuthorizationCodeRequest, - CommonAuthorizationUrlRequest, - CommonUsernamePasswordRequest, - AuthenticationScheme, - ResponseMode, - AuthorityOptions, - OIDC_DEFAULT_SCOPES, - AzureRegionConfiguration, - AuthError, - AzureCloudOptions, - AuthorizationCodePayload, - Constants, - StringUtils, - createClientAuthError, - ClientAuthErrorCodes, - buildStaticAuthorityOptions, - ClientAssertion as ClientAssertionType, - getClientAssertion, - ClientAssertionCallback, -} from "@azure/msal-common/node"; -import { - Configuration, - buildAppConfiguration, - NodeConfiguration, -} from "../config/Configuration.js"; -import { CryptoProvider } from "../crypto/CryptoProvider.js"; -import { NodeStorage } from "../cache/NodeStorage.js"; -import { Constants as NodeConstants, ApiId } from "../utils/Constants.js"; -import { TokenCache } from "../cache/TokenCache.js"; -import { ClientAssertion } from "./ClientAssertion.js"; -import { AuthorizationUrlRequest } from "../request/AuthorizationUrlRequest.js"; -import { AuthorizationCodeRequest } from "../request/AuthorizationCodeRequest.js"; -import { RefreshTokenRequest } from "../request/RefreshTokenRequest.js"; -import { SilentFlowRequest } from "../request/SilentFlowRequest.js"; -import { version, name } from "../packageMetadata.js"; -import { UsernamePasswordRequest } from "../request/UsernamePasswordRequest.js"; -import { NodeAuthError } from "../error/NodeAuthError.js"; -import { UsernamePasswordClient } from "./UsernamePasswordClient.js"; - -/** - * Base abstract class for all ClientApplications - public and confidential - * @public - */ -export abstract class ClientApplication { - protected readonly cryptoProvider: CryptoProvider; - private tokenCache: TokenCache; - - /** - * Platform storage object - */ - protected storage: NodeStorage; - /** - * Logger object to log the application flow - */ - protected logger: Logger; - /** - * Platform configuration initialized by the application - */ - protected config: NodeConfiguration; - /** - * Client assertion passed by the user for confidential client flows - */ - protected clientAssertion: ClientAssertion; - protected developerProvidedClientAssertion: - | string - | ClientAssertionCallback; - /** - * Client secret passed by the user for confidential client flows - */ - protected clientSecret: string; - - /** - * Constructor for the ClientApplication - */ - protected constructor(configuration: Configuration) { - this.config = buildAppConfiguration(configuration); - this.cryptoProvider = new CryptoProvider(); - this.logger = new Logger( - this.config.system.loggerOptions, - name, - version - ); - this.storage = new NodeStorage( - this.logger, - this.config.auth.clientId, - this.cryptoProvider, - buildStaticAuthorityOptions(this.config.auth) - ); - this.tokenCache = new TokenCache( - this.storage, - this.logger, - this.config.cache.cachePlugin - ); - } - - /** - * Creates the URL of the authorization request, letting the user input credentials and consent to the - * application. The URL targets the /authorize endpoint of the authority configured in the - * application object. - * - * Once the user inputs their credentials and consents, the authority will send a response to the redirect URI - * sent in the request and should contain an authorization code, which can then be used to acquire tokens via - * `acquireTokenByCode(AuthorizationCodeRequest)`. - */ - async getAuthCodeUrl(request: AuthorizationUrlRequest): Promise { - this.logger.info("getAuthCodeUrl called", request.correlationId); - const validRequest: CommonAuthorizationUrlRequest = { - ...request, - ...(await this.initializeBaseRequest(request)), - responseMode: request.responseMode || ResponseMode.QUERY, - authenticationScheme: AuthenticationScheme.BEARER, - }; - - const authClientConfig = await this.buildOauthClientConfiguration( - validRequest.authority, - validRequest.correlationId, - validRequest.redirectUri, - undefined, - undefined, - request.azureCloudOptions - ); - const authorizationCodeClient = new AuthorizationCodeClient( - authClientConfig - ); - this.logger.verbose( - "Auth code client created", - validRequest.correlationId - ); - return authorizationCodeClient.getAuthCodeUrl(validRequest); - } - - /** - * Acquires a token by exchanging the Authorization Code received from the first step of OAuth2.0 - * Authorization Code flow. - * - * `getAuthCodeUrl(AuthorizationCodeUrlRequest)` can be used to create the URL for the first step of OAuth2.0 - * Authorization Code flow. Ensure that values for redirectUri and scopes in AuthorizationCodeUrlRequest and - * AuthorizationCodeRequest are the same. - */ - async acquireTokenByCode( - request: AuthorizationCodeRequest, - authCodePayLoad?: AuthorizationCodePayload - ): Promise { - this.logger.info("acquireTokenByCode called"); - if (request.state && authCodePayLoad) { - this.logger.info("acquireTokenByCode - validating state"); - this.validateState(request.state, authCodePayLoad.state || ""); - // eslint-disable-next-line no-param-reassign - authCodePayLoad = { ...authCodePayLoad, state: "" }; - } - const validRequest: CommonAuthorizationCodeRequest = { - ...request, - ...(await this.initializeBaseRequest(request)), - authenticationScheme: AuthenticationScheme.BEARER, - }; - - const serverTelemetryManager = this.initializeServerTelemetryManager( - ApiId.acquireTokenByCode, - validRequest.correlationId - ); - try { - const authClientConfig = await this.buildOauthClientConfiguration( - validRequest.authority, - validRequest.correlationId, - validRequest.redirectUri, - serverTelemetryManager, - undefined, - request.azureCloudOptions - ); - const authorizationCodeClient = new AuthorizationCodeClient( - authClientConfig - ); - this.logger.verbose( - "Auth code client created", - validRequest.correlationId - ); - return await authorizationCodeClient.acquireToken( - validRequest, - authCodePayLoad - ); - } catch (e) { - if (e instanceof AuthError) { - e.setCorrelationId(validRequest.correlationId); - } - serverTelemetryManager.cacheFailedRequest(e); - throw e; - } - } - - /** - * Acquires a token by exchanging the refresh token provided for a new set of tokens. - * - * This API is provided only for scenarios where you would like to migrate from ADAL to MSAL. Otherwise, it is - * recommended that you use `acquireTokenSilent()` for silent scenarios. When using `acquireTokenSilent()`, MSAL will - * handle the caching and refreshing of tokens automatically. - */ - async acquireTokenByRefreshToken( - request: RefreshTokenRequest - ): Promise { - this.logger.info( - "acquireTokenByRefreshToken called", - request.correlationId - ); - const validRequest: CommonRefreshTokenRequest = { - ...request, - ...(await this.initializeBaseRequest(request)), - authenticationScheme: AuthenticationScheme.BEARER, - }; - - const serverTelemetryManager = this.initializeServerTelemetryManager( - ApiId.acquireTokenByRefreshToken, - validRequest.correlationId - ); - try { - const refreshTokenClientConfig = - await this.buildOauthClientConfiguration( - validRequest.authority, - validRequest.correlationId, - validRequest.redirectUri || "", - serverTelemetryManager, - undefined, - request.azureCloudOptions - ); - const refreshTokenClient = new RefreshTokenClient( - refreshTokenClientConfig - ); - this.logger.verbose( - "Refresh token client created", - validRequest.correlationId - ); - return await refreshTokenClient.acquireToken(validRequest); - } catch (e) { - if (e instanceof AuthError) { - e.setCorrelationId(validRequest.correlationId); - } - serverTelemetryManager.cacheFailedRequest(e); - throw e; - } - } - - /** - * Acquires a token silently when a user specifies the account the token is requested for. - * - * This API expects the user to provide an account object and looks into the cache to retrieve the token if present. - * There is also an optional "forceRefresh" boolean the user can send to bypass the cache for access_token and id_token. - * In case the refresh_token is expired or not found, an error is thrown - * and the guidance is for the user to call any interactive token acquisition API (eg: `acquireTokenByCode()`). - */ - async acquireTokenSilent( - request: SilentFlowRequest - ): Promise { - const validRequest: CommonSilentFlowRequest = { - ...request, - ...(await this.initializeBaseRequest(request)), - forceRefresh: request.forceRefresh || false, - }; - - const serverTelemetryManager = this.initializeServerTelemetryManager( - ApiId.acquireTokenSilent, - validRequest.correlationId, - validRequest.forceRefresh - ); - try { - const silentFlowClientConfig = - await this.buildOauthClientConfiguration( - validRequest.authority, - validRequest.correlationId, - validRequest.redirectUri || "", - serverTelemetryManager, - undefined, - request.azureCloudOptions - ); - const silentFlowClient = new SilentFlowClient( - silentFlowClientConfig - ); - this.logger.verbose( - "Silent flow client created", - validRequest.correlationId - ); - return await silentFlowClient.acquireToken(validRequest); - } catch (e) { - if (e instanceof AuthError) { - e.setCorrelationId(validRequest.correlationId); - } - serverTelemetryManager.cacheFailedRequest(e as AuthError); - throw e; - } - } - - /** - * Acquires tokens with password grant by exchanging client applications username and password for credentials - * - * The latest OAuth 2.0 Security Best Current Practice disallows the password grant entirely. - * More details on this recommendation at https://tools.ietf.org/html/draft-ietf-oauth-security-topics-13#section-3.4 - * Microsoft's documentation and recommendations are at: - * https://docs.microsoft.com/en-us/azure/active-directory/develop/msal-authentication-flows#usernamepassword - * - * @param request - UsenamePasswordRequest - */ - async acquireTokenByUsernamePassword( - request: UsernamePasswordRequest - ): Promise { - this.logger.info( - "acquireTokenByUsernamePassword called", - request.correlationId - ); - const validRequest: CommonUsernamePasswordRequest = { - ...request, - ...(await this.initializeBaseRequest(request)), - }; - const serverTelemetryManager = this.initializeServerTelemetryManager( - ApiId.acquireTokenByUsernamePassword, - validRequest.correlationId - ); - try { - const usernamePasswordClientConfig = - await this.buildOauthClientConfiguration( - validRequest.authority, - validRequest.correlationId, - "", - serverTelemetryManager, - undefined, - request.azureCloudOptions - ); - const usernamePasswordClient = new UsernamePasswordClient( - usernamePasswordClientConfig - ); - this.logger.verbose( - "Username password client created", - validRequest.correlationId - ); - return await usernamePasswordClient.acquireToken(validRequest); - } catch (e) { - if (e instanceof AuthError) { - e.setCorrelationId(validRequest.correlationId); - } - serverTelemetryManager.cacheFailedRequest(e); - throw e; - } - } - - /** - * Gets the token cache for the application. - */ - getTokenCache(): TokenCache { - this.logger.info("getTokenCache called"); - return this.tokenCache; - } - - /** - * Validates OIDC state by comparing the user cached state with the state received from the server. - * - * This API is provided for scenarios where you would use OAuth2.0 state parameter to mitigate against - * CSRF attacks. - * For more information about state, visit https://datatracker.ietf.org/doc/html/rfc6819#section-3.6. - * @param state - Unique GUID generated by the user that is cached by the user and sent to the server during the first leg of the flow - * @param cachedState - This string is sent back by the server with the authorization code - */ - protected validateState(state: string, cachedState: string): void { - if (!state) { - throw NodeAuthError.createStateNotFoundError(); - } - - if (state !== cachedState) { - throw createClientAuthError(ClientAuthErrorCodes.stateMismatch); - } - } - - /** - * Returns the logger instance - */ - getLogger(): Logger { - return this.logger; - } - - /** - * Replaces the default logger set in configurations with new Logger with new configurations - * @param logger - Logger instance - */ - setLogger(logger: Logger): void { - this.logger = logger; - } - - /** - * Builds the common configuration to be passed to the common component based on the platform configurarion - * @param authority - user passed authority in configuration - * @param serverTelemetryManager - initializes servertelemetry if passed - */ - protected async buildOauthClientConfiguration( - authority: string, - requestCorrelationId: string, - redirectUri: string, - serverTelemetryManager?: ServerTelemetryManager, - azureRegionConfiguration?: AzureRegionConfiguration, - azureCloudOptions?: AzureCloudOptions - ): Promise { - this.logger.verbose( - "buildOauthClientConfiguration called", - requestCorrelationId - ); - - // precedence - azureCloudInstance + tenant >> authority and request >> config - const userAzureCloudOptions = azureCloudOptions - ? azureCloudOptions - : this.config.auth.azureCloudOptions; - - // using null assertion operator as we ensure that all config values have default values in buildConfiguration() - const discoveredAuthority = await this.createAuthority( - authority, - requestCorrelationId, - azureRegionConfiguration, - userAzureCloudOptions - ); - - this.logger.info( - `Building oauth client configuration with the following authority: ${discoveredAuthority.tokenEndpoint}.`, - requestCorrelationId - ); - - serverTelemetryManager?.updateRegionDiscoveryMetadata( - discoveredAuthority.regionDiscoveryMetadata - ); - - const clientConfiguration: ClientConfiguration = { - authOptions: { - clientId: this.config.auth.clientId, - authority: discoveredAuthority, - clientCapabilities: this.config.auth.clientCapabilities, - redirectUri, - }, - loggerOptions: { - logLevel: this.config.system.loggerOptions.logLevel, - loggerCallback: this.config.system.loggerOptions.loggerCallback, - piiLoggingEnabled: - this.config.system.loggerOptions.piiLoggingEnabled, - correlationId: requestCorrelationId, - }, - cacheOptions: { - claimsBasedCachingEnabled: - this.config.cache.claimsBasedCachingEnabled, - }, - cryptoInterface: this.cryptoProvider, - networkInterface: this.config.system.networkClient, - storageInterface: this.storage, - serverTelemetryManager: serverTelemetryManager, - clientCredentials: { - clientSecret: this.clientSecret, - clientAssertion: await this.getClientAssertion( - discoveredAuthority - ), - }, - libraryInfo: { - sku: NodeConstants.MSAL_SKU, - version: version, - cpu: process.arch || Constants.EMPTY_STRING, - os: process.platform || Constants.EMPTY_STRING, - }, - telemetry: this.config.telemetry, - persistencePlugin: this.config.cache.cachePlugin, - serializableCache: this.tokenCache, - }; - - return clientConfiguration; - } - - private async getClientAssertion( - authority: Authority - ): Promise { - if (this.developerProvidedClientAssertion) { - this.clientAssertion = ClientAssertion.fromAssertion( - await getClientAssertion( - this.developerProvidedClientAssertion, - this.config.auth.clientId, - authority.tokenEndpoint - ) - ); - } - - return ( - this.clientAssertion && { - assertion: this.clientAssertion.getJwt( - this.cryptoProvider, - this.config.auth.clientId, - authority.tokenEndpoint - ), - assertionType: NodeConstants.JWT_BEARER_ASSERTION_TYPE, - } - ); - } - - /** - * Generates a request with the default scopes & generates a correlationId. - * @param authRequest - BaseAuthRequest for initialization - */ - protected async initializeBaseRequest( - authRequest: Partial - ): Promise { - this.logger.verbose( - "initializeRequestScopes called", - authRequest.correlationId - ); - // Default authenticationScheme to Bearer, log that POP isn't supported yet - if ( - authRequest.authenticationScheme && - authRequest.authenticationScheme === AuthenticationScheme.POP - ) { - this.logger.verbose( - "Authentication Scheme 'pop' is not supported yet, setting Authentication Scheme to 'Bearer' for request", - authRequest.correlationId - ); - } - - authRequest.authenticationScheme = AuthenticationScheme.BEARER; - - // Set requested claims hash if claims-based caching is enabled and claims were requested - if ( - this.config.cache.claimsBasedCachingEnabled && - authRequest.claims && - // Checks for empty stringified object "{}" which doesn't qualify as requested claims - !StringUtils.isEmptyObj(authRequest.claims) - ) { - authRequest.requestedClaimsHash = - await this.cryptoProvider.hashString(authRequest.claims); - } - - return { - ...authRequest, - scopes: [ - ...((authRequest && authRequest.scopes) || []), - ...OIDC_DEFAULT_SCOPES, - ], - correlationId: - (authRequest && authRequest.correlationId) || - this.cryptoProvider.createNewGuid(), - authority: authRequest.authority || this.config.auth.authority, - }; - } - - /** - * Initializes the server telemetry payload - * @param apiId - Id for a specific request - * @param correlationId - GUID - * @param forceRefresh - boolean to indicate network call - */ - protected initializeServerTelemetryManager( - apiId: number, - correlationId: string, - forceRefresh?: boolean - ): ServerTelemetryManager { - const telemetryPayload: ServerTelemetryRequest = { - clientId: this.config.auth.clientId, - correlationId: correlationId, - apiId: apiId, - forceRefresh: forceRefresh || false, - }; - - return new ServerTelemetryManager(telemetryPayload, this.storage); - } - - /** - * Create authority instance. If authority not passed in request, default to authority set on the application - * object. If no authority set in application object, then default to common authority. - * @param authorityString - authority from user configuration - */ - private async createAuthority( - authorityString: string, - requestCorrelationId: string, - azureRegionConfiguration?: AzureRegionConfiguration, - azureCloudOptions?: AzureCloudOptions - ): Promise { - this.logger.verbose("createAuthority called", requestCorrelationId); - - // build authority string based on auth params - azureCloudInstance is prioritized if provided - const authorityUrl = Authority.generateAuthority( - authorityString, - azureCloudOptions - ); - - const authorityOptions: AuthorityOptions = { - protocolMode: this.config.auth.protocolMode, - knownAuthorities: this.config.auth.knownAuthorities, - cloudDiscoveryMetadata: this.config.auth.cloudDiscoveryMetadata, - authorityMetadata: this.config.auth.authorityMetadata, - azureRegionConfiguration, - skipAuthorityMetadataCache: - this.config.auth.skipAuthorityMetadataCache, - }; - - return AuthorityFactory.createDiscoveredInstance( - authorityUrl, - this.config.system.networkClient, - this.storage, - authorityOptions, - this.logger, - requestCorrelationId - ); - } - - /** - * Clear the cache - */ - clearCache(): void { - this.storage.clear(); - } -} diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/src/client/ClientAssertion.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/src/client/ClientAssertion.ts deleted file mode 100644 index 19bce20..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/src/client/ClientAssertion.ts +++ /dev/null @@ -1,202 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import jwt from "jsonwebtoken"; -import { - TimeUtils, - Constants, - createClientAuthError, - ClientAuthErrorCodes, -} from "@azure/msal-common/node"; -import { CryptoProvider } from "../crypto/CryptoProvider.js"; -import { EncodingUtils } from "../utils/EncodingUtils.js"; -import { JwtConstants } from "../utils/Constants.js"; - -/** - * Client assertion of type jwt-bearer used in confidential client flows - * @public - */ -export class ClientAssertion { - private jwt: string; - private privateKey: string; - private thumbprint: string; - private useSha256: boolean; - private expirationTime: number; - private issuer: string; - private jwtAudience: string; - private publicCertificate: Array; - - /** - * Initialize the ClientAssertion class from the clientAssertion passed by the user - * @param assertion - refer https://tools.ietf.org/html/rfc7521 - */ - public static fromAssertion(assertion: string): ClientAssertion { - const clientAssertion = new ClientAssertion(); - clientAssertion.jwt = assertion; - return clientAssertion; - } - - /** - * @deprecated Use fromCertificateWithSha256Thumbprint instead, with a SHA-256 thumprint - * Initialize the ClientAssertion class from the certificate passed by the user - * @param thumbprint - identifier of a certificate - * @param privateKey - secret key - * @param publicCertificate - electronic document provided to prove the ownership of the public key - */ - public static fromCertificate( - thumbprint: string, - privateKey: string, - publicCertificate?: string - ): ClientAssertion { - const clientAssertion = new ClientAssertion(); - clientAssertion.privateKey = privateKey; - clientAssertion.thumbprint = thumbprint; - clientAssertion.useSha256 = false; - if (publicCertificate) { - clientAssertion.publicCertificate = - this.parseCertificate(publicCertificate); - } - return clientAssertion; - } - - /** - * Initialize the ClientAssertion class from the certificate passed by the user - * @param thumbprint - identifier of a certificate - * @param privateKey - secret key - * @param publicCertificate - electronic document provided to prove the ownership of the public key - */ - public static fromCertificateWithSha256Thumbprint( - thumbprint: string, - privateKey: string, - publicCertificate?: string - ): ClientAssertion { - const clientAssertion = new ClientAssertion(); - clientAssertion.privateKey = privateKey; - clientAssertion.thumbprint = thumbprint; - clientAssertion.useSha256 = true; - if (publicCertificate) { - clientAssertion.publicCertificate = - this.parseCertificate(publicCertificate); - } - return clientAssertion; - } - - /** - * Update JWT for certificate based clientAssertion, if passed by the user, uses it as is - * @param cryptoProvider - library's crypto helper - * @param issuer - iss claim - * @param jwtAudience - aud claim - */ - public getJwt( - cryptoProvider: CryptoProvider, - issuer: string, - jwtAudience: string - ): string { - // if assertion was created from certificate, check if jwt is expired and create new one. - if (this.privateKey && this.thumbprint) { - if ( - this.jwt && - !this.isExpired() && - issuer === this.issuer && - jwtAudience === this.jwtAudience - ) { - return this.jwt; - } - - return this.createJwt(cryptoProvider, issuer, jwtAudience); - } - - /* - * if assertion was created by caller, then we just append it. It is up to the caller to - * ensure that it contains necessary claims and that it is not expired. - */ - if (this.jwt) { - return this.jwt; - } - - throw createClientAuthError(ClientAuthErrorCodes.invalidAssertion); - } - - /** - * JWT format and required claims specified: https://tools.ietf.org/html/rfc7523#section-3 - */ - private createJwt( - cryptoProvider: CryptoProvider, - issuer: string, - jwtAudience: string - ): string { - this.issuer = issuer; - this.jwtAudience = jwtAudience; - const issuedAt = TimeUtils.nowSeconds(); - this.expirationTime = issuedAt + 600; - - const algorithm = this.useSha256 - ? JwtConstants.PSS_256 - : JwtConstants.RSA_256; - const header: jwt.JwtHeader = { - alg: algorithm, - }; - - const thumbprintHeader = this.useSha256 - ? JwtConstants.X5T_256 - : JwtConstants.X5T; - Object.assign(header, { - [thumbprintHeader]: EncodingUtils.base64EncodeUrl( - this.thumbprint, - "hex" - ), - } as Partial); - - if (this.publicCertificate) { - Object.assign(header, { - [JwtConstants.X5C]: this.publicCertificate, - } as Partial); - } - - const payload = { - [JwtConstants.AUDIENCE]: this.jwtAudience, - [JwtConstants.EXPIRATION_TIME]: this.expirationTime, - [JwtConstants.ISSUER]: this.issuer, - [JwtConstants.SUBJECT]: this.issuer, - [JwtConstants.NOT_BEFORE]: issuedAt, - [JwtConstants.JWT_ID]: cryptoProvider.createNewGuid(), - }; - - this.jwt = jwt.sign(payload, this.privateKey, { header }); - return this.jwt; - } - - /** - * Utility API to check expiration - */ - private isExpired(): boolean { - return this.expirationTime < TimeUtils.nowSeconds(); - } - - /** - * Extracts the raw certs from a given certificate string and returns them in an array. - * @param publicCertificate - electronic document provided to prove the ownership of the public key - */ - public static parseCertificate(publicCertificate: string): Array { - /** - * This is regex to identify the certs in a given certificate string. - * We want to look for the contents between the BEGIN and END certificate strings, without the associated newlines. - * The information in parens "(.+?)" is the capture group to represent the cert we want isolated. - * "." means any string character, "+" means match 1 or more times, and "?" means the shortest match. - * The "g" at the end of the regex means search the string globally, and the "s" enables the "." to match newlines. - */ - const regexToFindCerts = - /-----BEGIN CERTIFICATE-----\r*\n(.+?)\r*\n-----END CERTIFICATE-----/gs; - const certs: string[] = []; - - let matches; - while ((matches = regexToFindCerts.exec(publicCertificate)) !== null) { - // matches[1] represents the first parens capture group in the regex. - certs.push(matches[1].replace(/\r*\n/g, Constants.EMPTY_STRING)); - } - - return certs; - } -} diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/src/client/ClientCredentialClient.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/src/client/ClientCredentialClient.ts deleted file mode 100644 index 2a1a342..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/src/client/ClientCredentialClient.ts +++ /dev/null @@ -1,404 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import { - AccessTokenEntity, - AuthenticationResult, - AuthenticationScheme, - Authority, - BaseClient, - CacheManager, - CacheOutcome, - ClientAuthErrorCodes, - ClientConfiguration, - CommonClientCredentialRequest, - Constants, - CredentialFilter, - CredentialType, - DEFAULT_TOKEN_RENEWAL_OFFSET_SEC, - GrantType, - IAppTokenProvider, - ICrypto, - RequestParameterBuilder, - RequestThumbprint, - ResponseHandler, - ScopeSet, - ServerAuthorizationTokenResponse, - ServerTelemetryManager, - StringUtils, - TimeUtils, - TokenCacheContext, - UrlString, - createClientAuthError, - ClientAssertion, - getClientAssertion, -} from "@azure/msal-common/node"; -import { - ManagedIdentityConfiguration, - ManagedIdentityNodeConfiguration, -} from "../config/Configuration.js"; - -/** - * OAuth2.0 client credential grant - * @public - */ -export class ClientCredentialClient extends BaseClient { - private readonly appTokenProvider?: IAppTokenProvider; - - constructor( - configuration: ClientConfiguration, - appTokenProvider?: IAppTokenProvider - ) { - super(configuration); - this.appTokenProvider = appTokenProvider; - } - - /** - * Public API to acquire a token with ClientCredential Flow for Confidential clients - * @param request - CommonClientCredentialRequest provided by the developer - */ - public async acquireToken( - request: CommonClientCredentialRequest - ): Promise { - if (request.skipCache || request.claims) { - return this.executeTokenRequest(request, this.authority); - } - - const [cachedAuthenticationResult, lastCacheOutcome] = - await this.getCachedAuthenticationResult( - request, - this.config, - this.cryptoUtils, - this.authority, - this.cacheManager, - this.serverTelemetryManager - ); - - if (cachedAuthenticationResult) { - // if the token is not expired but must be refreshed; get a new one in the background - if (lastCacheOutcome === CacheOutcome.PROACTIVELY_REFRESHED) { - this.logger.info( - "ClientCredentialClient:getCachedAuthenticationResult - Cached access token's refreshOn property has been exceeded'. It's not expired, but must be refreshed." - ); - - // refresh the access token in the background - const refreshAccessToken = true; - await this.executeTokenRequest( - request, - this.authority, - refreshAccessToken - ); - } - - // return the cached token - return cachedAuthenticationResult; - } else { - return this.executeTokenRequest(request, this.authority); - } - } - - /** - * looks up cache if the tokens are cached already - */ - public async getCachedAuthenticationResult( - request: CommonClientCredentialRequest, - config: ClientConfiguration | ManagedIdentityConfiguration, - cryptoUtils: ICrypto, - authority: Authority, - cacheManager: CacheManager, - serverTelemetryManager?: ServerTelemetryManager | null - ): Promise<[AuthenticationResult | null, CacheOutcome]> { - const clientConfiguration = config as ClientConfiguration; - const managedIdentityConfiguration = - config as ManagedIdentityNodeConfiguration; - - let lastCacheOutcome: CacheOutcome = CacheOutcome.NOT_APPLICABLE; - - // read the user-supplied cache into memory, if applicable - let cacheContext; - if ( - clientConfiguration.serializableCache && - clientConfiguration.persistencePlugin - ) { - cacheContext = new TokenCacheContext( - clientConfiguration.serializableCache, - false - ); - await clientConfiguration.persistencePlugin.beforeCacheAccess( - cacheContext - ); - } - - const cachedAccessToken = this.readAccessTokenFromCache( - authority, - managedIdentityConfiguration.managedIdentityId?.id || - clientConfiguration.authOptions.clientId, - new ScopeSet(request.scopes || []), - cacheManager, - request.correlationId - ); - - if ( - clientConfiguration.serializableCache && - clientConfiguration.persistencePlugin && - cacheContext - ) { - await clientConfiguration.persistencePlugin.afterCacheAccess( - cacheContext - ); - } - - // must refresh due to non-existent access_token - if (!cachedAccessToken) { - serverTelemetryManager?.setCacheOutcome( - CacheOutcome.NO_CACHED_ACCESS_TOKEN - ); - return [null, CacheOutcome.NO_CACHED_ACCESS_TOKEN]; - } - - // must refresh due to the expires_in value - if ( - TimeUtils.isTokenExpired( - cachedAccessToken.expiresOn, - clientConfiguration.systemOptions?.tokenRenewalOffsetSeconds || - DEFAULT_TOKEN_RENEWAL_OFFSET_SEC - ) - ) { - serverTelemetryManager?.setCacheOutcome( - CacheOutcome.CACHED_ACCESS_TOKEN_EXPIRED - ); - return [null, CacheOutcome.CACHED_ACCESS_TOKEN_EXPIRED]; - } - - // must refresh (in the background) due to the refresh_in value - if ( - cachedAccessToken.refreshOn && - TimeUtils.isTokenExpired(cachedAccessToken.refreshOn.toString(), 0) - ) { - lastCacheOutcome = CacheOutcome.PROACTIVELY_REFRESHED; - serverTelemetryManager?.setCacheOutcome( - CacheOutcome.PROACTIVELY_REFRESHED - ); - } - - return [ - await ResponseHandler.generateAuthenticationResult( - cryptoUtils, - authority, - { - account: null, - idToken: null, - accessToken: cachedAccessToken, - refreshToken: null, - appMetadata: null, - }, - true, - request - ), - lastCacheOutcome, - ]; - } - - /** - * Reads access token from the cache - */ - private readAccessTokenFromCache( - authority: Authority, - id: string, - scopeSet: ScopeSet, - cacheManager: CacheManager, - correlationId: string - ): AccessTokenEntity | null { - const accessTokenFilter: CredentialFilter = { - homeAccountId: Constants.EMPTY_STRING, - environment: - authority.canonicalAuthorityUrlComponents.HostNameAndPort, - credentialType: CredentialType.ACCESS_TOKEN, - clientId: id, - realm: authority.tenant, - target: ScopeSet.createSearchScopes(scopeSet.asArray()), - }; - - const accessTokens = cacheManager.getAccessTokensByFilter( - accessTokenFilter, - correlationId - ); - if (accessTokens.length < 1) { - return null; - } else if (accessTokens.length > 1) { - throw createClientAuthError( - ClientAuthErrorCodes.multipleMatchingTokens - ); - } - return accessTokens[0] as AccessTokenEntity; - } - - /** - * Makes a network call to request the token from the service - * @param request - CommonClientCredentialRequest provided by the developer - * @param authority - authority object - */ - private async executeTokenRequest( - request: CommonClientCredentialRequest, - authority: Authority, - refreshAccessToken?: boolean - ): Promise { - let serverTokenResponse: ServerAuthorizationTokenResponse; - let reqTimestamp: number; - - if (this.appTokenProvider) { - this.logger.info("Using appTokenProvider extensibility."); - - const appTokenPropviderParameters = { - correlationId: request.correlationId, - tenantId: this.config.authOptions.authority.tenant, - scopes: request.scopes, - claims: request.claims, - }; - - reqTimestamp = TimeUtils.nowSeconds(); - const appTokenProviderResult = await this.appTokenProvider( - appTokenPropviderParameters - ); - - serverTokenResponse = { - access_token: appTokenProviderResult.accessToken, - expires_in: appTokenProviderResult.expiresInSeconds, - refresh_in: appTokenProviderResult.refreshInSeconds, - token_type: AuthenticationScheme.BEARER, - }; - } else { - const queryParametersString = - this.createTokenQueryParameters(request); - const endpoint = UrlString.appendQueryString( - authority.tokenEndpoint, - queryParametersString - ); - - const requestBody = await this.createTokenRequestBody(request); - const headers: Record = - this.createTokenRequestHeaders(); - const thumbprint: RequestThumbprint = { - clientId: this.config.authOptions.clientId, - authority: request.authority, - scopes: request.scopes, - claims: request.claims, - authenticationScheme: request.authenticationScheme, - resourceRequestMethod: request.resourceRequestMethod, - resourceRequestUri: request.resourceRequestUri, - shrClaims: request.shrClaims, - sshKid: request.sshKid, - }; - - this.logger.info( - "Sending token request to endpoint: " + authority.tokenEndpoint - ); - - reqTimestamp = TimeUtils.nowSeconds(); - const response = await this.executePostToTokenEndpoint( - endpoint, - requestBody, - headers, - thumbprint, - request.correlationId - ); - - serverTokenResponse = response.body; - serverTokenResponse.status = response.status; - } - - const responseHandler = new ResponseHandler( - this.config.authOptions.clientId, - this.cacheManager, - this.cryptoUtils, - this.logger, - this.config.serializableCache, - this.config.persistencePlugin - ); - - responseHandler.validateTokenResponse( - serverTokenResponse, - refreshAccessToken - ); - - const tokenResponse = await responseHandler.handleServerTokenResponse( - serverTokenResponse, - this.authority, - reqTimestamp, - request - ); - - return tokenResponse; - } - - /** - * generate the request to the server in the acceptable format - * @param request - CommonClientCredentialRequest provided by the developer - */ - private async createTokenRequestBody( - request: CommonClientCredentialRequest - ): Promise { - const parameterBuilder = new RequestParameterBuilder(); - - parameterBuilder.addClientId(this.config.authOptions.clientId); - - parameterBuilder.addScopes(request.scopes, false); - - parameterBuilder.addGrantType(GrantType.CLIENT_CREDENTIALS_GRANT); - - parameterBuilder.addLibraryInfo(this.config.libraryInfo); - parameterBuilder.addApplicationTelemetry( - this.config.telemetry.application - ); - - parameterBuilder.addThrottling(); - - if (this.serverTelemetryManager) { - parameterBuilder.addServerTelemetry(this.serverTelemetryManager); - } - - const correlationId = - request.correlationId || - this.config.cryptoInterface.createNewGuid(); - parameterBuilder.addCorrelationId(correlationId); - - if (this.config.clientCredentials.clientSecret) { - parameterBuilder.addClientSecret( - this.config.clientCredentials.clientSecret - ); - } - - // Use clientAssertion from request, fallback to client assertion in base configuration - const clientAssertion: ClientAssertion | undefined = - request.clientAssertion || - this.config.clientCredentials.clientAssertion; - - if (clientAssertion) { - parameterBuilder.addClientAssertion( - await getClientAssertion( - clientAssertion.assertion, - this.config.authOptions.clientId, - request.resourceRequestUri - ) - ); - parameterBuilder.addClientAssertionType( - clientAssertion.assertionType - ); - } - - if ( - !StringUtils.isEmptyObj(request.claims) || - (this.config.authOptions.clientCapabilities && - this.config.authOptions.clientCapabilities.length > 0) - ) { - parameterBuilder.addClaims( - request.claims, - this.config.authOptions.clientCapabilities - ); - } - - return parameterBuilder.createQueryString(); - } -} diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/src/client/ConfidentialClientApplication.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/src/client/ConfidentialClientApplication.ts deleted file mode 100644 index 19e6872..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/src/client/ConfidentialClientApplication.ts +++ /dev/null @@ -1,298 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -// AADAuthorityConstants - -import { ClientApplication } from "./ClientApplication.js"; -import { Configuration } from "../config/Configuration.js"; -import { ClientAssertion } from "./ClientAssertion.js"; -import { - Constants as NodeConstants, - ApiId, - REGION_ENVIRONMENT_VARIABLE, - MSAL_FORCE_REGION, -} from "../utils/Constants.js"; -import { - CommonClientCredentialRequest, - CommonOnBehalfOfRequest, - AuthenticationResult, - AzureRegionConfiguration, - AuthError, - IAppTokenProvider, - OIDC_DEFAULT_SCOPES, - UrlString, - AADAuthorityConstants, - createClientAuthError, - ClientAuthErrorCodes, - ClientAssertion as ClientAssertionType, - getClientAssertion, - AzureRegion, -} from "@azure/msal-common/node"; -import { IConfidentialClientApplication } from "./IConfidentialClientApplication.js"; -import { OnBehalfOfRequest } from "../request/OnBehalfOfRequest.js"; -import { ClientCredentialRequest } from "../request/ClientCredentialRequest.js"; -import { ClientCredentialClient } from "./ClientCredentialClient.js"; -import { OnBehalfOfClient } from "./OnBehalfOfClient.js"; - -/** - * This class is to be used to acquire tokens for confidential client applications (webApp, webAPI). Confidential client applications - * will configure application secrets, client certificates/assertions as applicable - * @public - */ -export class ConfidentialClientApplication - extends ClientApplication - implements IConfidentialClientApplication -{ - private appTokenProvider?: IAppTokenProvider; - - /** - * Constructor for the ConfidentialClientApplication - * - * Required attributes in the Configuration object are: - * - clientID: the application ID of your application. You can obtain one by registering your application with our application registration portal - * - authority: the authority URL for your application. - * - client credential: Must set either client secret, certificate, or assertion for confidential clients. You can obtain a client secret from the application registration portal. - * - * In Azure AD, authority is a URL indicating of the form https://login.microsoftonline.com/\{Enter_the_Tenant_Info_Here\}. - * If your application supports Accounts in one organizational directory, replace "Enter_the_Tenant_Info_Here" value with the Tenant Id or Tenant name (for example, contoso.microsoft.com). - * If your application supports Accounts in any organizational directory, replace "Enter_the_Tenant_Info_Here" value with organizations. - * If your application supports Accounts in any organizational directory and personal Microsoft accounts, replace "Enter_the_Tenant_Info_Here" value with common. - * To restrict support to Personal Microsoft accounts only, replace "Enter_the_Tenant_Info_Here" value with consumers. - * - * In Azure B2C, authority is of the form https://\{instance\}/tfp/\{tenant\}/\{policyName\}/ - * Full B2C functionality will be available in this library in future versions. - * - * @param Configuration - configuration object for the MSAL ConfidentialClientApplication instance - */ - constructor(configuration: Configuration) { - super(configuration); - this.setClientCredential(); - this.appTokenProvider = undefined; - } - - /** - * This extensibility point only works for the client_credential flow, i.e. acquireTokenByClientCredential and - * is meant for Azure SDK to enhance Managed Identity support. - * - * @param IAppTokenProvider - Extensibility interface, which allows the app developer to return a token from a custom source. - */ - SetAppTokenProvider(provider: IAppTokenProvider): void { - this.appTokenProvider = provider; - } - - /** - * Acquires tokens from the authority for the application (not for an end user). - */ - public async acquireTokenByClientCredential( - request: ClientCredentialRequest - ): Promise { - this.logger.info( - "acquireTokenByClientCredential called", - request.correlationId - ); - - // If there is a client assertion present in the request, it overrides the one present in the client configuration - let clientAssertion: ClientAssertionType | undefined; - if (request.clientAssertion) { - clientAssertion = { - assertion: await getClientAssertion( - request.clientAssertion, - this.config.auth.clientId - // tokenEndpoint will be undefined. resourceRequestUri is omitted in ClientCredentialRequest - ), - assertionType: NodeConstants.JWT_BEARER_ASSERTION_TYPE, - }; - } - - const baseRequest = await this.initializeBaseRequest(request); - - // valid base request should not contain oidc scopes in this grant type - const validBaseRequest = { - ...baseRequest, - scopes: baseRequest.scopes.filter( - (scope: string) => !OIDC_DEFAULT_SCOPES.includes(scope) - ), - }; - - const validRequest: CommonClientCredentialRequest = { - ...request, - ...validBaseRequest, - clientAssertion, - }; - - /* - * valid request should not have "common" or "organizations" in lieu of the tenant_id in the authority in the auth configuration - * example authority: "https://login.microsoftonline.com/TenantId", - */ - const authority = new UrlString(validRequest.authority); - const tenantId = authority.getUrlComponents().PathSegments[0]; - if ( - Object.values(AADAuthorityConstants).includes( - tenantId as AADAuthorityConstants - ) - ) { - throw createClientAuthError( - ClientAuthErrorCodes.missingTenantIdError - ); - } - - /* - * if this env variable is set, and the developer provided region isn't defined and isn't "DisableMsalForceRegion", - * MSAL shall opt-in to ESTS-R with the value of this variable - */ - const ENV_MSAL_FORCE_REGION: AzureRegion | undefined = - process.env[MSAL_FORCE_REGION]; - - let region: AzureRegion | undefined; - if (validRequest.azureRegion !== "DisableMsalForceRegion") { - if (!validRequest.azureRegion && ENV_MSAL_FORCE_REGION) { - region = ENV_MSAL_FORCE_REGION; - } else { - region = validRequest.azureRegion; - } - } - - const azureRegionConfiguration: AzureRegionConfiguration = { - azureRegion: region, - environmentRegion: process.env[REGION_ENVIRONMENT_VARIABLE], - }; - - const serverTelemetryManager = this.initializeServerTelemetryManager( - ApiId.acquireTokenByClientCredential, - validRequest.correlationId, - validRequest.skipCache - ); - try { - const clientCredentialConfig = - await this.buildOauthClientConfiguration( - validRequest.authority, - validRequest.correlationId, - "", - serverTelemetryManager, - azureRegionConfiguration, - request.azureCloudOptions - ); - const clientCredentialClient = new ClientCredentialClient( - clientCredentialConfig, - this.appTokenProvider - ); - this.logger.verbose( - "Client credential client created", - validRequest.correlationId - ); - return await clientCredentialClient.acquireToken(validRequest); - } catch (e) { - if (e instanceof AuthError) { - e.setCorrelationId(validRequest.correlationId); - } - serverTelemetryManager.cacheFailedRequest(e); - throw e; - } - } - - /** - * Acquires tokens from the authority for the application. - * - * Used in scenarios where the current app is a middle-tier service which was called with a token - * representing an end user. The current app can use the token (oboAssertion) to request another - * token to access downstream web API, on behalf of that user. - * - * The current middle-tier app has no user interaction to obtain consent. - * See how to gain consent upfront for your middle-tier app from this article. - * https://docs.microsoft.com/en-us/azure/active-directory/develop/v2-oauth2-on-behalf-of-flow#gaining-consent-for-the-middle-tier-application - */ - public async acquireTokenOnBehalfOf( - request: OnBehalfOfRequest - ): Promise { - this.logger.info( - "acquireTokenOnBehalfOf called", - request.correlationId - ); - const validRequest: CommonOnBehalfOfRequest = { - ...request, - ...(await this.initializeBaseRequest(request)), - }; - try { - const onBehalfOfConfig = await this.buildOauthClientConfiguration( - validRequest.authority, - validRequest.correlationId, - "", - undefined, - undefined, - request.azureCloudOptions - ); - const oboClient = new OnBehalfOfClient(onBehalfOfConfig); - this.logger.verbose( - "On behalf of client created", - validRequest.correlationId - ); - return await oboClient.acquireToken(validRequest); - } catch (e) { - if (e instanceof AuthError) { - e.setCorrelationId(validRequest.correlationId); - } - throw e; - } - } - - private setClientCredential(): void { - const clientSecretNotEmpty = !!this.config.auth.clientSecret; - const clientAssertionNotEmpty = !!this.config.auth.clientAssertion; - const certificateNotEmpty = - (!!this.config.auth.clientCertificate?.thumbprint || - !!this.config.auth.clientCertificate?.thumbprintSha256) && - !!this.config.auth.clientCertificate?.privateKey; - - /* - * If app developer configures this callback, they don't need a credential - * i.e. AzureSDK can get token from Managed Identity without a cert / secret - */ - if (this.appTokenProvider) { - return; - } - - // Check that at most one credential is set on the application - if ( - (clientSecretNotEmpty && clientAssertionNotEmpty) || - (clientAssertionNotEmpty && certificateNotEmpty) || - (clientSecretNotEmpty && certificateNotEmpty) - ) { - throw createClientAuthError( - ClientAuthErrorCodes.invalidClientCredential - ); - } - - if (this.config.auth.clientSecret) { - this.clientSecret = this.config.auth.clientSecret; - return; - } - - if (this.config.auth.clientAssertion) { - this.developerProvidedClientAssertion = - this.config.auth.clientAssertion; - return; - } - - if (!certificateNotEmpty) { - throw createClientAuthError( - ClientAuthErrorCodes.invalidClientCredential - ); - } else { - this.clientAssertion = !!this.config.auth.clientCertificate - .thumbprintSha256 - ? ClientAssertion.fromCertificateWithSha256Thumbprint( - this.config.auth.clientCertificate.thumbprintSha256, - this.config.auth.clientCertificate.privateKey, - this.config.auth.clientCertificate.x5c - ) - : ClientAssertion.fromCertificate( - // guaranteed to be a string, due to prior error checking in this function - this.config.auth.clientCertificate.thumbprint as string, - this.config.auth.clientCertificate.privateKey, - this.config.auth.clientCertificate.x5c - ); - } - } -} diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/src/client/DeviceCodeClient.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/src/client/DeviceCodeClient.ts deleted file mode 100644 index 663d1cd..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/src/client/DeviceCodeClient.ts +++ /dev/null @@ -1,378 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import { - AuthErrorCodes, - AuthenticationResult, - BaseClient, - ClientAuthErrorCodes, - ClientConfiguration, - CommonDeviceCodeRequest, - Constants, - DeviceCodeResponse, - GrantType, - RequestParameterBuilder, - RequestThumbprint, - ResponseHandler, - ServerAuthorizationTokenResponse, - ServerDeviceCodeResponse, - StringUtils, - TimeUtils, - UrlString, - createAuthError, - createClientAuthError, -} from "@azure/msal-common/node"; - -/** - * OAuth2.0 Device code client - * @public - */ -export class DeviceCodeClient extends BaseClient { - constructor(configuration: ClientConfiguration) { - super(configuration); - } - - /** - * Gets device code from device code endpoint, calls back to with device code response, and - * polls token endpoint to exchange device code for tokens - * @param request - developer provided CommonDeviceCodeRequest - */ - public async acquireToken( - request: CommonDeviceCodeRequest - ): Promise { - const deviceCodeResponse: DeviceCodeResponse = await this.getDeviceCode( - request - ); - request.deviceCodeCallback(deviceCodeResponse); - const reqTimestamp = TimeUtils.nowSeconds(); - const response: ServerAuthorizationTokenResponse = - await this.acquireTokenWithDeviceCode(request, deviceCodeResponse); - - const responseHandler = new ResponseHandler( - this.config.authOptions.clientId, - this.cacheManager, - this.cryptoUtils, - this.logger, - this.config.serializableCache, - this.config.persistencePlugin - ); - - // Validate response. This function throws a server error if an error is returned by the server. - responseHandler.validateTokenResponse(response); - return responseHandler.handleServerTokenResponse( - response, - this.authority, - reqTimestamp, - request - ); - } - - /** - * Creates device code request and executes http GET - * @param request - developer provided CommonDeviceCodeRequest - */ - private async getDeviceCode( - request: CommonDeviceCodeRequest - ): Promise { - const queryParametersString = this.createExtraQueryParameters(request); - const endpoint = UrlString.appendQueryString( - this.authority.deviceCodeEndpoint, - queryParametersString - ); - const queryString = this.createQueryString(request); - const headers = this.createTokenRequestHeaders(); - const thumbprint: RequestThumbprint = { - clientId: this.config.authOptions.clientId, - authority: request.authority, - scopes: request.scopes, - claims: request.claims, - authenticationScheme: request.authenticationScheme, - resourceRequestMethod: request.resourceRequestMethod, - resourceRequestUri: request.resourceRequestUri, - shrClaims: request.shrClaims, - sshKid: request.sshKid, - }; - - return this.executePostRequestToDeviceCodeEndpoint( - endpoint, - queryString, - headers, - thumbprint, - request.correlationId - ); - } - - /** - * Creates query string for the device code request - * @param request - developer provided CommonDeviceCodeRequest - */ - public createExtraQueryParameters( - request: CommonDeviceCodeRequest - ): string { - const parameterBuilder = new RequestParameterBuilder(); - - if (request.extraQueryParameters) { - parameterBuilder.addExtraQueryParameters( - request.extraQueryParameters - ); - } - - return parameterBuilder.createQueryString(); - } - - /** - * Executes POST request to device code endpoint - * @param deviceCodeEndpoint - token endpoint - * @param queryString - string to be used in the body of the request - * @param headers - headers for the request - * @param thumbprint - unique request thumbprint - * @param correlationId - correlation id to be used in the request - */ - private async executePostRequestToDeviceCodeEndpoint( - deviceCodeEndpoint: string, - queryString: string, - headers: Record, - thumbprint: RequestThumbprint, - correlationId: string - ): Promise { - const { - body: { - user_code: userCode, - device_code: deviceCode, - verification_uri: verificationUri, - expires_in: expiresIn, - interval, - message, - }, - } = await this.sendPostRequest( - thumbprint, - deviceCodeEndpoint, - { - body: queryString, - headers: headers, - }, - correlationId - ); - - return { - userCode, - deviceCode, - verificationUri, - expiresIn, - interval, - message, - }; - } - - /** - * Create device code endpoint query parameters and returns string - * @param request - developer provided CommonDeviceCodeRequest - */ - private createQueryString(request: CommonDeviceCodeRequest): string { - const parameterBuilder: RequestParameterBuilder = - new RequestParameterBuilder(); - - parameterBuilder.addScopes(request.scopes); - parameterBuilder.addClientId(this.config.authOptions.clientId); - - if (request.extraQueryParameters) { - parameterBuilder.addExtraQueryParameters( - request.extraQueryParameters - ); - } - - if ( - request.claims || - (this.config.authOptions.clientCapabilities && - this.config.authOptions.clientCapabilities.length > 0) - ) { - parameterBuilder.addClaims( - request.claims, - this.config.authOptions.clientCapabilities - ); - } - - return parameterBuilder.createQueryString(); - } - - /** - * Breaks the polling with specific conditions - * @param deviceCodeExpirationTime - expiration time for the device code request - * @param userSpecifiedTimeout - developer provided timeout, to be compared against deviceCodeExpirationTime - * @param userSpecifiedCancelFlag - boolean indicating the developer would like to cancel the request - */ - private continuePolling( - deviceCodeExpirationTime: number, - userSpecifiedTimeout?: number, - userSpecifiedCancelFlag?: boolean - ): boolean { - if (userSpecifiedCancelFlag) { - this.logger.error( - "Token request cancelled by setting DeviceCodeRequest.cancel = true" - ); - throw createClientAuthError( - ClientAuthErrorCodes.deviceCodePollingCancelled - ); - } else if ( - userSpecifiedTimeout && - userSpecifiedTimeout < deviceCodeExpirationTime && - TimeUtils.nowSeconds() > userSpecifiedTimeout - ) { - this.logger.error( - `User defined timeout for device code polling reached. The timeout was set for ${userSpecifiedTimeout}` - ); - throw createClientAuthError( - ClientAuthErrorCodes.userTimeoutReached - ); - } else if (TimeUtils.nowSeconds() > deviceCodeExpirationTime) { - if (userSpecifiedTimeout) { - this.logger.verbose( - `User specified timeout ignored as the device code has expired before the timeout elapsed. The user specified timeout was set for ${userSpecifiedTimeout}` - ); - } - this.logger.error( - `Device code expired. Expiration time of device code was ${deviceCodeExpirationTime}` - ); - throw createClientAuthError(ClientAuthErrorCodes.deviceCodeExpired); - } - return true; - } - - /** - * Creates token request with device code response and polls token endpoint at interval set by the device code response - * @param request - developer provided CommonDeviceCodeRequest - * @param deviceCodeResponse - DeviceCodeResponse returned by the security token service device code endpoint - */ - private async acquireTokenWithDeviceCode( - request: CommonDeviceCodeRequest, - deviceCodeResponse: DeviceCodeResponse - ): Promise { - const queryParametersString = this.createTokenQueryParameters(request); - const endpoint = UrlString.appendQueryString( - this.authority.tokenEndpoint, - queryParametersString - ); - const requestBody = this.createTokenRequestBody( - request, - deviceCodeResponse - ); - const headers: Record = - this.createTokenRequestHeaders(); - - const userSpecifiedTimeout = request.timeout - ? TimeUtils.nowSeconds() + request.timeout - : undefined; - const deviceCodeExpirationTime = - TimeUtils.nowSeconds() + deviceCodeResponse.expiresIn; - const pollingIntervalMilli = deviceCodeResponse.interval * 1000; - - /* - * Poll token endpoint while (device code is not expired AND operation has not been cancelled by - * setting CancellationToken.cancel = true). POST request is sent at interval set by pollingIntervalMilli - */ - while ( - this.continuePolling( - deviceCodeExpirationTime, - userSpecifiedTimeout, - request.cancel - ) - ) { - const thumbprint: RequestThumbprint = { - clientId: this.config.authOptions.clientId, - authority: request.authority, - scopes: request.scopes, - claims: request.claims, - authenticationScheme: request.authenticationScheme, - resourceRequestMethod: request.resourceRequestMethod, - resourceRequestUri: request.resourceRequestUri, - shrClaims: request.shrClaims, - sshKid: request.sshKid, - }; - const response = await this.executePostToTokenEndpoint( - endpoint, - requestBody, - headers, - thumbprint, - request.correlationId - ); - - if (response.body && response.body.error) { - // user authorization is pending. Sleep for polling interval and try again - if (response.body.error === Constants.AUTHORIZATION_PENDING) { - this.logger.info( - "Authorization pending. Continue polling." - ); - await TimeUtils.delay(pollingIntervalMilli); - } else { - // for any other error, throw - this.logger.info( - "Unexpected error in polling from the server" - ); - throw createAuthError( - AuthErrorCodes.postRequestFailed, - response.body.error - ); - } - } else { - this.logger.verbose( - "Authorization completed successfully. Polling stopped." - ); - return response.body; - } - } - - /* - * The above code should've thrown by this point, but to satisfy TypeScript, - * and in the rare case the conditionals in continuePolling() may not catch everything... - */ - this.logger.error("Polling stopped for unknown reasons."); - throw createClientAuthError( - ClientAuthErrorCodes.deviceCodeUnknownError - ); - } - - /** - * Creates query parameters and converts to string. - * @param request - developer provided CommonDeviceCodeRequest - * @param deviceCodeResponse - DeviceCodeResponse returned by the security token service device code endpoint - */ - private createTokenRequestBody( - request: CommonDeviceCodeRequest, - deviceCodeResponse: DeviceCodeResponse - ): string { - const requestParameters: RequestParameterBuilder = - new RequestParameterBuilder(); - - requestParameters.addScopes(request.scopes); - requestParameters.addClientId(this.config.authOptions.clientId); - requestParameters.addGrantType(GrantType.DEVICE_CODE_GRANT); - requestParameters.addDeviceCode(deviceCodeResponse.deviceCode); - const correlationId = - request.correlationId || - this.config.cryptoInterface.createNewGuid(); - requestParameters.addCorrelationId(correlationId); - requestParameters.addClientInfo(); - requestParameters.addLibraryInfo(this.config.libraryInfo); - requestParameters.addApplicationTelemetry( - this.config.telemetry.application - ); - requestParameters.addThrottling(); - if (this.serverTelemetryManager) { - requestParameters.addServerTelemetry(this.serverTelemetryManager); - } - - if ( - !StringUtils.isEmptyObj(request.claims) || - (this.config.authOptions.clientCapabilities && - this.config.authOptions.clientCapabilities.length > 0) - ) { - requestParameters.addClaims( - request.claims, - this.config.authOptions.clientCapabilities - ); - } - return requestParameters.createQueryString(); - } -} diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/src/client/IConfidentialClientApplication.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/src/client/IConfidentialClientApplication.ts deleted file mode 100644 index bbd54e7..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/src/client/IConfidentialClientApplication.ts +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import { - AuthenticationResult, - IAppTokenProvider, - Logger, -} from "@azure/msal-common/node"; -import { AuthorizationCodeRequest } from "../request/AuthorizationCodeRequest.js"; -import { AuthorizationUrlRequest } from "../request/AuthorizationUrlRequest.js"; -import { ClientCredentialRequest } from "../request/ClientCredentialRequest.js"; -import { OnBehalfOfRequest } from "../request/OnBehalfOfRequest.js"; -import { RefreshTokenRequest } from "../request/RefreshTokenRequest.js"; -import { SilentFlowRequest } from "../request/SilentFlowRequest.js"; -import { UsernamePasswordRequest } from "../request/UsernamePasswordRequest.js"; -import { TokenCache } from "../cache/TokenCache.js"; - -/** - * Interface for the ConfidentialClientApplication class defining the public API signatures - * @public - */ -export interface IConfidentialClientApplication { - /** Creates the URL of the authorization request */ - getAuthCodeUrl(request: AuthorizationUrlRequest): Promise; - - /** Acquires a token by exchanging the authorization code received from the first step of OAuth 2.0 Authorization Code Flow */ - acquireTokenByCode( - request: AuthorizationCodeRequest - ): Promise; - - /** Acquires a token silently when a user specifies the account the token is requested for */ - acquireTokenSilent( - request: SilentFlowRequest - ): Promise; - - /** Acquires a token by exchanging the refresh token provided for a new set of tokens */ - acquireTokenByRefreshToken( - request: RefreshTokenRequest - ): Promise; - - /** Acquires tokens from the authority for the application (not for an end user) */ - acquireTokenByClientCredential( - request: ClientCredentialRequest - ): Promise; - - /** Acquires tokens from the authority for the application */ - acquireTokenOnBehalfOf( - request: OnBehalfOfRequest - ): Promise; - - /** Acquires tokens with password grant by exchanging client applications username and password for credentials */ - acquireTokenByUsernamePassword( - request: UsernamePasswordRequest - ): Promise; - - /** Gets the token cache for the application */ - getTokenCache(): TokenCache; - - /** Returns the logger instance */ - getLogger(): Logger; - - /** Replaces the default logger set in configurations with new Logger with new configurations */ - setLogger(logger: Logger): void; - - /** Clear the cache */ - clearCache(): void; - - /** This extensibility point is meant for Azure SDK to enhance Managed Identity support */ - SetAppTokenProvider(provider: IAppTokenProvider): void; -} diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/src/client/IPublicClientApplication.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/src/client/IPublicClientApplication.ts deleted file mode 100644 index 7d4e0b5..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/src/client/IPublicClientApplication.ts +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import { - AccountInfo, - AuthenticationResult, - Logger, -} from "@azure/msal-common/node"; -import { AuthorizationCodeRequest } from "../request/AuthorizationCodeRequest.js"; -import { AuthorizationUrlRequest } from "../request/AuthorizationUrlRequest.js"; -import { DeviceCodeRequest } from "../request/DeviceCodeRequest.js"; -import { RefreshTokenRequest } from "../request/RefreshTokenRequest.js"; -import { SilentFlowRequest } from "../request/SilentFlowRequest.js"; -import { UsernamePasswordRequest } from "../request/UsernamePasswordRequest.js"; -import { TokenCache } from "../cache/TokenCache.js"; -import { InteractiveRequest } from "../request/InteractiveRequest.js"; -import { SignOutRequest } from "../request/SignOutRequest.js"; - -/** - * Interface for the PublicClientApplication class defining the public API signatures - * @public - */ -export interface IPublicClientApplication { - /** Creates the URL of the authorization request */ - getAuthCodeUrl(request: AuthorizationUrlRequest): Promise; - - /** Acquires a token by exchanging the authorization code received from the first step of OAuth 2.0 Authorization Code Flow */ - acquireTokenByCode( - request: AuthorizationCodeRequest - ): Promise; - - /** Acquires a token interactively */ - acquireTokenInteractive( - request: InteractiveRequest - ): Promise; - - /** Acquires a token silently when a user specifies the account the token is requested for */ - acquireTokenSilent( - request: SilentFlowRequest - ): Promise; - - /** Acquires a token by exchanging the refresh token provided for a new set of tokens */ - acquireTokenByRefreshToken( - request: RefreshTokenRequest - ): Promise; - - /** Acquires a token from the authority using OAuth2.0 device code flow */ - acquireTokenByDeviceCode( - request: DeviceCodeRequest - ): Promise; - - /** Acquires tokens with password grant by exchanging client applications username and password for credentials */ - acquireTokenByUsernamePassword( - request: UsernamePasswordRequest - ): Promise; - - /** Gets the token cache for the application */ - getTokenCache(): TokenCache; - - /** Returns the logger instance */ - getLogger(): Logger; - - /** Replaces the default logger set in configurations with new Logger with new configurations */ - setLogger(logger: Logger): void; - - /** Clear the cache */ - clearCache(): void; - - /** Gets all cached accounts */ - getAllAccounts(): Promise; - - /** Removes cache artifacts associated with the given account */ - signOut(request: SignOutRequest): Promise; -} diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/src/client/ManagedIdentityApplication.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/src/client/ManagedIdentityApplication.ts deleted file mode 100644 index 9b2353a..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/src/client/ManagedIdentityApplication.ts +++ /dev/null @@ -1,204 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import { - AuthOptions, - Authority, - AuthorityOptions, - CacheOutcome, - ClientConfiguration, - Constants, - DEFAULT_CRYPTO_IMPLEMENTATION, - INetworkModule, - Logger, - ProtocolMode, - StaticAuthorityOptions, - AuthenticationResult, - createClientConfigurationError, - ClientConfigurationErrorCodes, -} from "@azure/msal-common/node"; -import { - ManagedIdentityConfiguration, - ManagedIdentityNodeConfiguration, - buildManagedIdentityConfiguration, -} from "../config/Configuration.js"; -import { version, name } from "../packageMetadata.js"; -import { ManagedIdentityRequest } from "../request/ManagedIdentityRequest.js"; -import { CryptoProvider } from "../crypto/CryptoProvider.js"; -import { ClientCredentialClient } from "./ClientCredentialClient.js"; -import { ManagedIdentityClient } from "./ManagedIdentityClient.js"; -import { ManagedIdentityRequestParams } from "../request/ManagedIdentityRequestParams.js"; -import { NodeStorage } from "../cache/NodeStorage.js"; -import { - DEFAULT_AUTHORITY_FOR_MANAGED_IDENTITY, - ManagedIdentitySourceNames, -} from "../utils/Constants.js"; - -/** - * Class to initialize a managed identity and identify the service - * @public - */ -export class ManagedIdentityApplication { - private config: ManagedIdentityNodeConfiguration; - - private logger: Logger; - private static nodeStorage?: NodeStorage; - private networkClient: INetworkModule; - private cryptoProvider: CryptoProvider; - - // authority needs to be faked to re-use existing functionality in msal-common: caching in responseHandler, etc. - private fakeAuthority: Authority; - - // the ClientCredentialClient class needs to be faked to call it's getCachedAuthenticationResult method - private fakeClientCredentialClient: ClientCredentialClient; - - private managedIdentityClient: ManagedIdentityClient; - - constructor(configuration?: ManagedIdentityConfiguration) { - // undefined config means the managed identity is system-assigned - this.config = buildManagedIdentityConfiguration(configuration || {}); - - this.logger = new Logger( - this.config.system.loggerOptions, - name, - version - ); - - const fakeStatusAuthorityOptions: StaticAuthorityOptions = { - canonicalAuthority: Constants.DEFAULT_AUTHORITY, - }; - - if (!ManagedIdentityApplication.nodeStorage) { - ManagedIdentityApplication.nodeStorage = new NodeStorage( - this.logger, - this.config.managedIdentityId.id, - DEFAULT_CRYPTO_IMPLEMENTATION, - fakeStatusAuthorityOptions - ); - } - - this.networkClient = this.config.system.networkClient; - - this.cryptoProvider = new CryptoProvider(); - - const fakeAuthorityOptions: AuthorityOptions = { - protocolMode: ProtocolMode.AAD, - knownAuthorities: [DEFAULT_AUTHORITY_FOR_MANAGED_IDENTITY], - cloudDiscoveryMetadata: "", - authorityMetadata: "", - }; - this.fakeAuthority = new Authority( - DEFAULT_AUTHORITY_FOR_MANAGED_IDENTITY, - this.networkClient, - ManagedIdentityApplication.nodeStorage as NodeStorage, - fakeAuthorityOptions, - this.logger, - this.cryptoProvider.createNewGuid(), // correlationID - undefined, - true - ); - - this.fakeClientCredentialClient = new ClientCredentialClient({ - authOptions: { - clientId: this.config.managedIdentityId.id, - authority: this.fakeAuthority, - } as AuthOptions, - } as ClientConfiguration); - - this.managedIdentityClient = new ManagedIdentityClient( - this.logger, - ManagedIdentityApplication.nodeStorage as NodeStorage, - this.networkClient, - this.cryptoProvider - ); - } - - /** - * Acquire an access token from the cache or the managed identity - * @param managedIdentityRequest - the ManagedIdentityRequestParams object passed in by the developer - * @returns the access token - */ - public async acquireToken( - managedIdentityRequestParams: ManagedIdentityRequestParams - ): Promise { - if (!managedIdentityRequestParams.resource) { - throw createClientConfigurationError( - ClientConfigurationErrorCodes.urlEmptyError - ); - } - - const managedIdentityRequest: ManagedIdentityRequest = { - forceRefresh: managedIdentityRequestParams.forceRefresh, - resource: managedIdentityRequestParams.resource.replace( - "/.default", - "" - ), - scopes: [ - managedIdentityRequestParams.resource.replace("/.default", ""), - ], - authority: this.fakeAuthority.canonicalAuthority, - correlationId: this.cryptoProvider.createNewGuid(), - }; - - if ( - managedIdentityRequestParams.claims || - managedIdentityRequest.forceRefresh - ) { - // make a network call to the managed identity source - return this.managedIdentityClient.sendManagedIdentityTokenRequest( - managedIdentityRequest, - this.config.managedIdentityId, - this.fakeAuthority - ); - } - - const [cachedAuthenticationResult, lastCacheOutcome] = - await this.fakeClientCredentialClient.getCachedAuthenticationResult( - managedIdentityRequest, - this.config, - this.cryptoProvider, - this.fakeAuthority, - ManagedIdentityApplication.nodeStorage as NodeStorage - ); - - if (cachedAuthenticationResult) { - // if the token is not expired but must be refreshed; get a new one in the background - if (lastCacheOutcome === CacheOutcome.PROACTIVELY_REFRESHED) { - this.logger.info( - "ClientCredentialClient:getCachedAuthenticationResult - Cached access token's refreshOn property has been exceeded'. It's not expired, but must be refreshed." - ); - - // make a network call to the managed identity source; refresh the access token in the background - const refreshAccessToken = true; - await this.managedIdentityClient.sendManagedIdentityTokenRequest( - managedIdentityRequest, - this.config.managedIdentityId, - this.fakeAuthority, - refreshAccessToken - ); - } - - return cachedAuthenticationResult; - } else { - // make a network call to the managed identity source - return this.managedIdentityClient.sendManagedIdentityTokenRequest( - managedIdentityRequest, - this.config.managedIdentityId, - this.fakeAuthority - ); - } - } - - /** - * Determine the Managed Identity Source based on available environment variables. This API is consumed by Azure Identity SDK. - * @returns ManagedIdentitySourceNames - The Managed Identity source's name - */ - public getManagedIdentitySource(): ManagedIdentitySourceNames { - return ( - ManagedIdentityClient.sourceName || - this.managedIdentityClient.getManagedIdentitySource() - ); - } -} diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/src/client/ManagedIdentityClient.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/src/client/ManagedIdentityClient.ts deleted file mode 100644 index 555f116..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/src/client/ManagedIdentityClient.ts +++ /dev/null @@ -1,162 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import { - Authority, - INetworkModule, - Logger, - AuthenticationResult, -} from "@azure/msal-common/node"; -import { AppService } from "./ManagedIdentitySources/AppService.js"; -import { AzureArc } from "./ManagedIdentitySources/AzureArc.js"; -import { CloudShell } from "./ManagedIdentitySources/CloudShell.js"; -import { Imds } from "./ManagedIdentitySources/Imds.js"; -import { ServiceFabric } from "./ManagedIdentitySources/ServiceFabric.js"; -import { CryptoProvider } from "../crypto/CryptoProvider.js"; -import { - ManagedIdentityErrorCodes, - createManagedIdentityError, -} from "../error/ManagedIdentityError.js"; -import { ManagedIdentityRequest } from "../request/ManagedIdentityRequest.js"; -import { ManagedIdentityId } from "../config/ManagedIdentityId.js"; -import { NodeStorage } from "../cache/NodeStorage.js"; -import { BaseManagedIdentitySource } from "./ManagedIdentitySources/BaseManagedIdentitySource.js"; -import { ManagedIdentitySourceNames } from "../utils/Constants.js"; - -/* - * Class to initialize a managed identity and identify the service. - * Original source of code: https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/identity/Azure.Identity/src/ManagedIdentityClient.cs - */ -export class ManagedIdentityClient { - private logger: Logger; - private nodeStorage: NodeStorage; - private networkClient: INetworkModule; - private cryptoProvider: CryptoProvider; - - private static identitySource?: BaseManagedIdentitySource; - public static sourceName?: ManagedIdentitySourceNames; - - constructor( - logger: Logger, - nodeStorage: NodeStorage, - networkClient: INetworkModule, - cryptoProvider: CryptoProvider - ) { - this.logger = logger; - this.nodeStorage = nodeStorage; - this.networkClient = networkClient; - this.cryptoProvider = cryptoProvider; - } - - public async sendManagedIdentityTokenRequest( - managedIdentityRequest: ManagedIdentityRequest, - managedIdentityId: ManagedIdentityId, - fakeAuthority: Authority, - refreshAccessToken?: boolean - ): Promise { - if (!ManagedIdentityClient.identitySource) { - ManagedIdentityClient.identitySource = - this.selectManagedIdentitySource( - this.logger, - this.nodeStorage, - this.networkClient, - this.cryptoProvider, - managedIdentityId - ); - } - - return ManagedIdentityClient.identitySource.acquireTokenWithManagedIdentity( - managedIdentityRequest, - managedIdentityId, - fakeAuthority, - refreshAccessToken - ); - } - - private allEnvironmentVariablesAreDefined( - environmentVariables: Array - ): boolean { - return Object.values(environmentVariables).every( - (environmentVariable) => { - return environmentVariable !== undefined; - } - ); - } - - /** - * Determine the Managed Identity Source based on available environment variables. This API is consumed by ManagedIdentityApplication's getManagedIdentitySource. - * @returns ManagedIdentitySourceNames - The Managed Identity source's name - */ - public getManagedIdentitySource(): ManagedIdentitySourceNames { - ManagedIdentityClient.sourceName = - this.allEnvironmentVariablesAreDefined( - ServiceFabric.getEnvironmentVariables() - ) - ? ManagedIdentitySourceNames.SERVICE_FABRIC - : this.allEnvironmentVariablesAreDefined( - AppService.getEnvironmentVariables() - ) - ? ManagedIdentitySourceNames.APP_SERVICE - : this.allEnvironmentVariablesAreDefined( - CloudShell.getEnvironmentVariables() - ) - ? ManagedIdentitySourceNames.CLOUD_SHELL - : this.allEnvironmentVariablesAreDefined( - AzureArc.getEnvironmentVariables() - ) - ? ManagedIdentitySourceNames.AZURE_ARC - : ManagedIdentitySourceNames.DEFAULT_TO_IMDS; - - return ManagedIdentityClient.sourceName; - } - - /** - * Tries to create a managed identity source for all sources - * @returns the managed identity Source - */ - private selectManagedIdentitySource( - logger: Logger, - nodeStorage: NodeStorage, - networkClient: INetworkModule, - cryptoProvider: CryptoProvider, - managedIdentityId: ManagedIdentityId - ): BaseManagedIdentitySource { - const source = - ServiceFabric.tryCreate( - logger, - nodeStorage, - networkClient, - cryptoProvider, - managedIdentityId - ) || - AppService.tryCreate( - logger, - nodeStorage, - networkClient, - cryptoProvider - ) || - CloudShell.tryCreate( - logger, - nodeStorage, - networkClient, - cryptoProvider, - managedIdentityId - ) || - AzureArc.tryCreate( - logger, - nodeStorage, - networkClient, - cryptoProvider, - managedIdentityId - ) || - Imds.tryCreate(logger, nodeStorage, networkClient, cryptoProvider); - if (!source) { - throw createManagedIdentityError( - ManagedIdentityErrorCodes.unableToCreateSource - ); - } - return source; - } -} diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/src/client/ManagedIdentitySources/AppService.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/src/client/ManagedIdentitySources/AppService.ts deleted file mode 100644 index a42df5d..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/src/client/ManagedIdentitySources/AppService.ts +++ /dev/null @@ -1,129 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import { INetworkModule, Logger } from "@azure/msal-common/node"; -import { BaseManagedIdentitySource } from "./BaseManagedIdentitySource.js"; -import { - HttpMethod, - APP_SERVICE_SECRET_HEADER_NAME, - API_VERSION_QUERY_PARAMETER_NAME, - RESOURCE_BODY_OR_QUERY_PARAMETER_NAME, - ManagedIdentityEnvironmentVariableNames, - ManagedIdentitySourceNames, - ManagedIdentityIdType, -} from "../../utils/Constants.js"; -import { CryptoProvider } from "../../crypto/CryptoProvider.js"; -import { ManagedIdentityRequestParameters } from "../../config/ManagedIdentityRequestParameters.js"; -import { ManagedIdentityId } from "../../config/ManagedIdentityId.js"; -import { NodeStorage } from "../../cache/NodeStorage.js"; - -// MSI Constants. Docs for MSI are available here https://docs.microsoft.com/azure/app-service/overview-managed-identity -const APP_SERVICE_MSI_API_VERSION: string = "2019-08-01"; - -/** - * Original source of code: https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/identity/Azure.Identity/src/AppServiceManagedIdentitySource.cs - */ -export class AppService extends BaseManagedIdentitySource { - private identityEndpoint: string; - private identityHeader: string; - - constructor( - logger: Logger, - nodeStorage: NodeStorage, - networkClient: INetworkModule, - cryptoProvider: CryptoProvider, - identityEndpoint: string, - identityHeader: string - ) { - super(logger, nodeStorage, networkClient, cryptoProvider); - - this.identityEndpoint = identityEndpoint; - this.identityHeader = identityHeader; - } - - public static getEnvironmentVariables(): Array { - const identityEndpoint: string | undefined = - process.env[ - ManagedIdentityEnvironmentVariableNames.IDENTITY_ENDPOINT - ]; - const identityHeader: string | undefined = - process.env[ - ManagedIdentityEnvironmentVariableNames.IDENTITY_HEADER - ]; - - return [identityEndpoint, identityHeader]; - } - - public static tryCreate( - logger: Logger, - nodeStorage: NodeStorage, - networkClient: INetworkModule, - cryptoProvider: CryptoProvider - ): AppService | null { - const [identityEndpoint, identityHeader] = - AppService.getEnvironmentVariables(); - - // if either of the identity endpoint or identity header variables are undefined, this MSI provider is unavailable. - if (!identityEndpoint || !identityHeader) { - logger.info( - `[Managed Identity] ${ManagedIdentitySourceNames.APP_SERVICE} managed identity is unavailable because one or both of the '${ManagedIdentityEnvironmentVariableNames.IDENTITY_HEADER}' and '${ManagedIdentityEnvironmentVariableNames.IDENTITY_ENDPOINT}' environment variables are not defined.` - ); - return null; - } - - const validatedIdentityEndpoint: string = - AppService.getValidatedEnvVariableUrlString( - ManagedIdentityEnvironmentVariableNames.IDENTITY_ENDPOINT, - identityEndpoint, - ManagedIdentitySourceNames.APP_SERVICE, - logger - ); - - logger.info( - `[Managed Identity] Environment variables validation passed for ${ManagedIdentitySourceNames.APP_SERVICE} managed identity. Endpoint URI: ${validatedIdentityEndpoint}. Creating ${ManagedIdentitySourceNames.APP_SERVICE} managed identity.` - ); - - return new AppService( - logger, - nodeStorage, - networkClient, - cryptoProvider, - identityEndpoint, - identityHeader - ); - } - - public createRequest( - resource: string, - managedIdentityId: ManagedIdentityId - ): ManagedIdentityRequestParameters { - const request: ManagedIdentityRequestParameters = - new ManagedIdentityRequestParameters( - HttpMethod.GET, - this.identityEndpoint - ); - - request.headers[APP_SERVICE_SECRET_HEADER_NAME] = this.identityHeader; - - request.queryParameters[API_VERSION_QUERY_PARAMETER_NAME] = - APP_SERVICE_MSI_API_VERSION; - request.queryParameters[RESOURCE_BODY_OR_QUERY_PARAMETER_NAME] = - resource; - - if ( - managedIdentityId.idType !== ManagedIdentityIdType.SYSTEM_ASSIGNED - ) { - request.queryParameters[ - this.getManagedIdentityUserAssignedIdQueryParameterKey( - managedIdentityId.idType - ) - ] = managedIdentityId.id; - } - - // bodyParameters calculated in BaseManagedIdentity.acquireTokenWithManagedIdentity - - return request; - } -} diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/src/client/ManagedIdentitySources/AzureArc.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/src/client/ManagedIdentitySources/AzureArc.ts deleted file mode 100644 index 96de284..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/src/client/ManagedIdentitySources/AzureArc.ts +++ /dev/null @@ -1,318 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import { - AuthError, - ClientAuthErrorCodes, - createClientAuthError, - HttpStatus, - INetworkModule, - NetworkResponse, - NetworkRequestOptions, - Logger, - ServerAuthorizationTokenResponse, -} from "@azure/msal-common/node"; -import { ManagedIdentityRequestParameters } from "../../config/ManagedIdentityRequestParameters.js"; -import { BaseManagedIdentitySource } from "./BaseManagedIdentitySource.js"; -import { CryptoProvider } from "../../crypto/CryptoProvider.js"; -import { - ManagedIdentityErrorCodes, - createManagedIdentityError, -} from "../../error/ManagedIdentityError.js"; -import { - API_VERSION_QUERY_PARAMETER_NAME, - AUTHORIZATION_HEADER_NAME, - AZURE_ARC_SECRET_FILE_MAX_SIZE_BYTES, - HttpMethod, - METADATA_HEADER_NAME, - ManagedIdentityEnvironmentVariableNames, - ManagedIdentityIdType, - ManagedIdentitySourceNames, - RESOURCE_BODY_OR_QUERY_PARAMETER_NAME, -} from "../../utils/Constants.js"; -import { NodeStorage } from "../../cache/NodeStorage.js"; -import { - accessSync, - constants as fsConstants, - readFileSync, - statSync, -} from "fs"; -import { ManagedIdentityTokenResponse } from "../../response/ManagedIdentityTokenResponse.js"; -import { ManagedIdentityId } from "../../config/ManagedIdentityId.js"; -import path from "path"; - -export const ARC_API_VERSION: string = "2019-11-01"; -export const DEFAULT_AZURE_ARC_IDENTITY_ENDPOINT: string = - "http://127.0.0.1:40342/metadata/identity/oauth2/token"; -const HIMDS_EXECUTABLE_HELPER_STRING = "N/A: himds executable exists"; - -type FilePathMap = { - win32: string; - linux: string; -}; - -export const SUPPORTED_AZURE_ARC_PLATFORMS: FilePathMap = { - win32: `${process.env["ProgramData"]}\\AzureConnectedMachineAgent\\Tokens\\`, - linux: "/var/opt/azcmagent/tokens/", -}; - -export const AZURE_ARC_FILE_DETECTION: FilePathMap = { - win32: `${process.env["ProgramFiles"]}\\AzureConnectedMachineAgent\\himds.exe`, - linux: "/opt/azcmagent/bin/himds", -}; - -/** - * Original source of code: https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/identity/Azure.Identity/src/AzureArcManagedIdentitySource.cs - */ -export class AzureArc extends BaseManagedIdentitySource { - private identityEndpoint: string; - - constructor( - logger: Logger, - nodeStorage: NodeStorage, - networkClient: INetworkModule, - cryptoProvider: CryptoProvider, - identityEndpoint: string - ) { - super(logger, nodeStorage, networkClient, cryptoProvider); - - this.identityEndpoint = identityEndpoint; - } - - public static getEnvironmentVariables(): Array { - let identityEndpoint: string | undefined = - process.env[ - ManagedIdentityEnvironmentVariableNames.IDENTITY_ENDPOINT - ]; - let imdsEndpoint: string | undefined = - process.env[ManagedIdentityEnvironmentVariableNames.IMDS_ENDPOINT]; - - // if either of the identity or imds endpoints are undefined, check if the himds executable exists - if (!identityEndpoint || !imdsEndpoint) { - // get the expected Windows or Linux file path of the himds executable - const fileDetectionPath: string = - AZURE_ARC_FILE_DETECTION[process.platform as keyof FilePathMap]; - try { - /* - * check if the himds executable exists and its permissions allow it to be read - * returns undefined if true, throws an error otherwise - */ - accessSync( - fileDetectionPath, - fsConstants.F_OK | fsConstants.R_OK - ); - - identityEndpoint = DEFAULT_AZURE_ARC_IDENTITY_ENDPOINT; - imdsEndpoint = HIMDS_EXECUTABLE_HELPER_STRING; - } catch (err) { - /* - * do nothing - * accessSync returns undefined on success, and throws an error on failure - */ - } - } - - return [identityEndpoint, imdsEndpoint]; - } - - public static tryCreate( - logger: Logger, - nodeStorage: NodeStorage, - networkClient: INetworkModule, - cryptoProvider: CryptoProvider, - managedIdentityId: ManagedIdentityId - ): AzureArc | null { - const [identityEndpoint, imdsEndpoint] = - AzureArc.getEnvironmentVariables(); - - // if either of the identity or imds endpoints are undefined (even after himds file detection) - if (!identityEndpoint || !imdsEndpoint) { - logger.info( - `[Managed Identity] ${ManagedIdentitySourceNames.AZURE_ARC} managed identity is unavailable through environment variables because one or both of '${ManagedIdentityEnvironmentVariableNames.IDENTITY_ENDPOINT}' and '${ManagedIdentityEnvironmentVariableNames.IMDS_ENDPOINT}' are not defined. ${ManagedIdentitySourceNames.AZURE_ARC} managed identity is also unavailable through file detection.` - ); - - return null; - } - - // check if the imds endpoint is set to the default for file detection - if (imdsEndpoint === HIMDS_EXECUTABLE_HELPER_STRING) { - logger.info( - `[Managed Identity] ${ManagedIdentitySourceNames.AZURE_ARC} managed identity is available through file detection. Defaulting to known ${ManagedIdentitySourceNames.AZURE_ARC} endpoint: ${DEFAULT_AZURE_ARC_IDENTITY_ENDPOINT}. Creating ${ManagedIdentitySourceNames.AZURE_ARC} managed identity.` - ); - } else { - // otherwise, both the identity and imds endpoints are defined without file detection; validate them - - const validatedIdentityEndpoint: string = - AzureArc.getValidatedEnvVariableUrlString( - ManagedIdentityEnvironmentVariableNames.IDENTITY_ENDPOINT, - identityEndpoint, - ManagedIdentitySourceNames.AZURE_ARC, - logger - ); - // remove trailing slash - validatedIdentityEndpoint.endsWith("/") - ? validatedIdentityEndpoint.slice(0, -1) - : validatedIdentityEndpoint; - - AzureArc.getValidatedEnvVariableUrlString( - ManagedIdentityEnvironmentVariableNames.IMDS_ENDPOINT, - imdsEndpoint, - ManagedIdentitySourceNames.AZURE_ARC, - logger - ); - - logger.info( - `[Managed Identity] Environment variables validation passed for ${ManagedIdentitySourceNames.AZURE_ARC} managed identity. Endpoint URI: ${validatedIdentityEndpoint}. Creating ${ManagedIdentitySourceNames.AZURE_ARC} managed identity.` - ); - } - - if ( - managedIdentityId.idType !== ManagedIdentityIdType.SYSTEM_ASSIGNED - ) { - throw createManagedIdentityError( - ManagedIdentityErrorCodes.unableToCreateAzureArc - ); - } - - return new AzureArc( - logger, - nodeStorage, - networkClient, - cryptoProvider, - identityEndpoint - ); - } - - public createRequest(resource: string): ManagedIdentityRequestParameters { - const request: ManagedIdentityRequestParameters = - new ManagedIdentityRequestParameters( - HttpMethod.GET, - this.identityEndpoint.replace("localhost", "127.0.0.1") - ); - - request.headers[METADATA_HEADER_NAME] = "true"; - - request.queryParameters[API_VERSION_QUERY_PARAMETER_NAME] = - ARC_API_VERSION; - request.queryParameters[RESOURCE_BODY_OR_QUERY_PARAMETER_NAME] = - resource; - - // bodyParameters calculated in BaseManagedIdentity.acquireTokenWithManagedIdentity - - return request; - } - - public async getServerTokenResponseAsync( - originalResponse: NetworkResponse, - networkClient: INetworkModule, - networkRequest: ManagedIdentityRequestParameters, - networkRequestOptions: NetworkRequestOptions - ): Promise { - let retryResponse: - | NetworkResponse - | undefined; - - if (originalResponse.status === HttpStatus.UNAUTHORIZED) { - const wwwAuthHeader: string = - originalResponse.headers["www-authenticate"]; - if (!wwwAuthHeader) { - throw createManagedIdentityError( - ManagedIdentityErrorCodes.wwwAuthenticateHeaderMissing - ); - } - if (!wwwAuthHeader.includes("Basic realm=")) { - throw createManagedIdentityError( - ManagedIdentityErrorCodes.wwwAuthenticateHeaderUnsupportedFormat - ); - } - - const secretFilePath = wwwAuthHeader.split("Basic realm=")[1]; - - // throw an error if the managed identity application is not being run on Windows or Linux - if ( - !SUPPORTED_AZURE_ARC_PLATFORMS.hasOwnProperty(process.platform) - ) { - throw createManagedIdentityError( - ManagedIdentityErrorCodes.platformNotSupported - ); - } - - // get the expected Windows or Linux file path - const expectedSecretFilePath: string = - SUPPORTED_AZURE_ARC_PLATFORMS[ - process.platform as keyof FilePathMap - ]; - - // throw an error if the file in the file path is not a .key file - const fileName: string = path.basename(secretFilePath); - if (!fileName.endsWith(".key")) { - throw createManagedIdentityError( - ManagedIdentityErrorCodes.invalidFileExtension - ); - } - - /* - * throw an error if the file path from the www-authenticate header does not match the - * expected file path for the platform (Windows or Linux) the managed identity application - * is running on - */ - if (expectedSecretFilePath + fileName !== secretFilePath) { - throw createManagedIdentityError( - ManagedIdentityErrorCodes.invalidFilePath - ); - } - - let secretFileSize; - // attempt to get the secret file's size, in bytes - try { - secretFileSize = await statSync(secretFilePath).size; - } catch (e) { - throw createManagedIdentityError( - ManagedIdentityErrorCodes.unableToReadSecretFile - ); - } - // throw an error if the secret file's size is greater than 4096 bytes - if (secretFileSize > AZURE_ARC_SECRET_FILE_MAX_SIZE_BYTES) { - throw createManagedIdentityError( - ManagedIdentityErrorCodes.invalidSecret - ); - } - - // attempt to read the contents of the secret file - let secret; - try { - secret = readFileSync(secretFilePath, "utf-8"); - } catch (e) { - throw createManagedIdentityError( - ManagedIdentityErrorCodes.unableToReadSecretFile - ); - } - const authHeaderValue = `Basic ${secret}`; - - this.logger.info( - `[Managed Identity] Adding authorization header to the request.` - ); - networkRequest.headers[AUTHORIZATION_HEADER_NAME] = authHeaderValue; - - try { - retryResponse = - await networkClient.sendGetRequestAsync( - networkRequest.computeUri(), - networkRequestOptions - ); - } catch (error) { - if (error instanceof AuthError) { - throw error; - } else { - throw createClientAuthError( - ClientAuthErrorCodes.networkError - ); - } - } - } - - return this.getServerTokenResponse(retryResponse || originalResponse); - } -} diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/src/client/ManagedIdentitySources/BaseManagedIdentitySource.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/src/client/ManagedIdentitySources/BaseManagedIdentitySource.ts deleted file mode 100644 index 39d7a3e..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/src/client/ManagedIdentitySources/BaseManagedIdentitySource.ts +++ /dev/null @@ -1,252 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import { - AuthError, - Authority, - ClientAuthErrorCodes, - Constants, - HeaderNames, - INetworkModule, - Logger, - NetworkRequestOptions, - NetworkResponse, - ResponseHandler, - ServerAuthorizationTokenResponse, - TimeUtils, - createClientAuthError, - AuthenticationResult, - UrlString, -} from "@azure/msal-common/node"; -import { ManagedIdentityId } from "../../config/ManagedIdentityId.js"; -import { ManagedIdentityRequestParameters } from "../../config/ManagedIdentityRequestParameters.js"; -import { CryptoProvider } from "../../crypto/CryptoProvider.js"; -import { ManagedIdentityRequest } from "../../request/ManagedIdentityRequest.js"; -import { HttpMethod, ManagedIdentityIdType } from "../../utils/Constants.js"; -import { ManagedIdentityTokenResponse } from "../../response/ManagedIdentityTokenResponse.js"; -import { NodeStorage } from "../../cache/NodeStorage.js"; -import { - ManagedIdentityErrorCodes, - createManagedIdentityError, -} from "../../error/ManagedIdentityError.js"; - -/** - * Managed Identity User Assigned Id Query Parameter Names - */ -export const ManagedIdentityUserAssignedIdQueryParameterNames = { - MANAGED_IDENTITY_CLIENT_ID: "client_id", - MANAGED_IDENTITY_OBJECT_ID: "object_id", - MANAGED_IDENTITY_RESOURCE_ID: "mi_res_id", -} as const; -export type ManagedIdentityUserAssignedIdQueryParameterNames = - (typeof ManagedIdentityUserAssignedIdQueryParameterNames)[keyof typeof ManagedIdentityUserAssignedIdQueryParameterNames]; - -export abstract class BaseManagedIdentitySource { - protected logger: Logger; - private nodeStorage: NodeStorage; - private networkClient: INetworkModule; - private cryptoProvider: CryptoProvider; - - constructor( - logger: Logger, - nodeStorage: NodeStorage, - networkClient: INetworkModule, - cryptoProvider: CryptoProvider - ) { - this.logger = logger; - this.nodeStorage = nodeStorage; - this.networkClient = networkClient; - this.cryptoProvider = cryptoProvider; - } - - abstract createRequest( - request: string, - managedIdentityId: ManagedIdentityId - ): ManagedIdentityRequestParameters; - - public async getServerTokenResponseAsync( - response: NetworkResponse, - // eslint-disable-next-line @typescript-eslint/no-unused-vars - _networkClient: INetworkModule, - // eslint-disable-next-line @typescript-eslint/no-unused-vars - _networkRequest: ManagedIdentityRequestParameters, - // eslint-disable-next-line @typescript-eslint/no-unused-vars - _networkRequestOptions: NetworkRequestOptions - ): Promise { - return this.getServerTokenResponse(response); - } - - public getServerTokenResponse( - response: NetworkResponse - ): ServerAuthorizationTokenResponse { - let refreshIn, expiresIn: number | undefined; - if (response.body.expires_on) { - expiresIn = response.body.expires_on - TimeUtils.nowSeconds(); - - // compute refresh_in as 1/2 of expires_in, but only if expires_in > 2h - if (expiresIn > 2 * 3600) { - refreshIn = expiresIn / 2; - } - } - - const serverTokenResponse: ServerAuthorizationTokenResponse = { - status: response.status, - - // success - access_token: response.body.access_token, - expires_in: expiresIn, - scope: response.body.resource, - token_type: response.body.token_type, - refresh_in: refreshIn, - - // error - correlation_id: - response.body.correlation_id || response.body.correlationId, - error: - typeof response.body.error === "string" - ? response.body.error - : response.body.error?.code, - error_description: - response.body.message || - (typeof response.body.error === "string" - ? response.body.error_description - : response.body.error?.message), - error_codes: response.body.error_codes, - timestamp: response.body.timestamp, - trace_id: response.body.trace_id, - }; - - return serverTokenResponse; - } - - public async acquireTokenWithManagedIdentity( - managedIdentityRequest: ManagedIdentityRequest, - managedIdentityId: ManagedIdentityId, - fakeAuthority: Authority, - refreshAccessToken?: boolean - ): Promise { - const networkRequest: ManagedIdentityRequestParameters = - this.createRequest( - managedIdentityRequest.resource, - managedIdentityId - ); - - const headers: Record = networkRequest.headers; - headers[HeaderNames.CONTENT_TYPE] = Constants.URL_FORM_CONTENT_TYPE; - - const networkRequestOptions: NetworkRequestOptions = { headers }; - - if (Object.keys(networkRequest.bodyParameters).length) { - networkRequestOptions.body = - networkRequest.computeParametersBodyString(); - } - - const reqTimestamp = TimeUtils.nowSeconds(); - let response: NetworkResponse; - try { - // Sources that send POST requests: Cloud Shell - if (networkRequest.httpMethod === HttpMethod.POST) { - response = - await this.networkClient.sendPostRequestAsync( - networkRequest.computeUri(), - networkRequestOptions - ); - // Sources that send GET requests: App Service, Azure Arc, IMDS, Service Fabric - } else { - response = - await this.networkClient.sendGetRequestAsync( - networkRequest.computeUri(), - networkRequestOptions - ); - } - } catch (error) { - if (error instanceof AuthError) { - throw error; - } else { - throw createClientAuthError(ClientAuthErrorCodes.networkError); - } - } - - const responseHandler = new ResponseHandler( - managedIdentityId.id, - this.nodeStorage, - this.cryptoProvider, - this.logger, - null, - null - ); - - const serverTokenResponse: ServerAuthorizationTokenResponse = - await this.getServerTokenResponseAsync( - response, - this.networkClient, - networkRequest, - networkRequestOptions - ); - - responseHandler.validateTokenResponse( - serverTokenResponse, - refreshAccessToken - ); - - // caches the token - return responseHandler.handleServerTokenResponse( - serverTokenResponse, - fakeAuthority, - reqTimestamp, - managedIdentityRequest - ); - } - - public getManagedIdentityUserAssignedIdQueryParameterKey( - managedIdentityIdType: ManagedIdentityIdType - ): string { - switch (managedIdentityIdType) { - case ManagedIdentityIdType.USER_ASSIGNED_CLIENT_ID: - this.logger.info( - "[Managed Identity] Adding user assigned client id to the request." - ); - return ManagedIdentityUserAssignedIdQueryParameterNames.MANAGED_IDENTITY_CLIENT_ID; - - case ManagedIdentityIdType.USER_ASSIGNED_RESOURCE_ID: - this.logger.info( - "[Managed Identity] Adding user assigned resource id to the request." - ); - return ManagedIdentityUserAssignedIdQueryParameterNames.MANAGED_IDENTITY_RESOURCE_ID; - - case ManagedIdentityIdType.USER_ASSIGNED_OBJECT_ID: - this.logger.info( - "[Managed Identity] Adding user assigned object id to the request." - ); - return ManagedIdentityUserAssignedIdQueryParameterNames.MANAGED_IDENTITY_OBJECT_ID; - default: - throw createManagedIdentityError( - ManagedIdentityErrorCodes.invalidManagedIdentityIdType - ); - } - } - - public static getValidatedEnvVariableUrlString = ( - envVariableStringName: string, - envVariable: string, - sourceName: string, - logger: Logger - ): string => { - try { - return new UrlString(envVariable).urlString; - } catch (error) { - logger.info( - `[Managed Identity] ${sourceName} managed identity is unavailable because the '${envVariableStringName}' environment variable is malformed.` - ); - - throw createManagedIdentityError( - ManagedIdentityErrorCodes - .MsiEnvironmentVariableUrlMalformedErrorCodes[ - envVariableStringName - ] - ); - } - }; -} diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/src/client/ManagedIdentitySources/CloudShell.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/src/client/ManagedIdentitySources/CloudShell.ts deleted file mode 100644 index 065d85e..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/src/client/ManagedIdentitySources/CloudShell.ts +++ /dev/null @@ -1,110 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import { INetworkModule, Logger } from "@azure/msal-common/node"; -import { ManagedIdentityRequestParameters } from "../../config/ManagedIdentityRequestParameters.js"; -import { BaseManagedIdentitySource } from "./BaseManagedIdentitySource.js"; -import { NodeStorage } from "../../cache/NodeStorage.js"; -import { CryptoProvider } from "../../crypto/CryptoProvider.js"; -import { - HttpMethod, - METADATA_HEADER_NAME, - ManagedIdentityEnvironmentVariableNames, - ManagedIdentityIdType, - ManagedIdentitySourceNames, - RESOURCE_BODY_OR_QUERY_PARAMETER_NAME, -} from "../../utils/Constants.js"; -import { - ManagedIdentityErrorCodes, - createManagedIdentityError, -} from "../../error/ManagedIdentityError.js"; -import { ManagedIdentityId } from "../../config/ManagedIdentityId.js"; - -/** - * Original source of code: https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/identity/Azure.Identity/src/CloudShellManagedIdentitySource.cs - */ -export class CloudShell extends BaseManagedIdentitySource { - private msiEndpoint: string; - - constructor( - logger: Logger, - nodeStorage: NodeStorage, - networkClient: INetworkModule, - cryptoProvider: CryptoProvider, - msiEndpoint: string - ) { - super(logger, nodeStorage, networkClient, cryptoProvider); - - this.msiEndpoint = msiEndpoint; - } - - public static getEnvironmentVariables(): Array { - const msiEndpoint: string | undefined = - process.env[ManagedIdentityEnvironmentVariableNames.MSI_ENDPOINT]; - - return [msiEndpoint]; - } - - public static tryCreate( - logger: Logger, - nodeStorage: NodeStorage, - networkClient: INetworkModule, - cryptoProvider: CryptoProvider, - managedIdentityId: ManagedIdentityId - ): CloudShell | null { - const [msiEndpoint] = CloudShell.getEnvironmentVariables(); - - // if the msi endpoint environment variable is undefined, this MSI provider is unavailable. - if (!msiEndpoint) { - logger.info( - `[Managed Identity] ${ManagedIdentitySourceNames.CLOUD_SHELL} managed identity is unavailable because the '${ManagedIdentityEnvironmentVariableNames.MSI_ENDPOINT} environment variable is not defined.` - ); - return null; - } - - const validatedMsiEndpoint: string = - CloudShell.getValidatedEnvVariableUrlString( - ManagedIdentityEnvironmentVariableNames.MSI_ENDPOINT, - msiEndpoint, - ManagedIdentitySourceNames.CLOUD_SHELL, - logger - ); - - logger.info( - `[Managed Identity] Environment variable validation passed for ${ManagedIdentitySourceNames.CLOUD_SHELL} managed identity. Endpoint URI: ${validatedMsiEndpoint}. Creating ${ManagedIdentitySourceNames.CLOUD_SHELL} managed identity.` - ); - - if ( - managedIdentityId.idType !== ManagedIdentityIdType.SYSTEM_ASSIGNED - ) { - throw createManagedIdentityError( - ManagedIdentityErrorCodes.unableToCreateCloudShell - ); - } - - return new CloudShell( - logger, - nodeStorage, - networkClient, - cryptoProvider, - msiEndpoint - ); - } - - public createRequest(resource: string): ManagedIdentityRequestParameters { - const request: ManagedIdentityRequestParameters = - new ManagedIdentityRequestParameters( - HttpMethod.POST, - this.msiEndpoint - ); - - request.headers[METADATA_HEADER_NAME] = "true"; - - request.bodyParameters[RESOURCE_BODY_OR_QUERY_PARAMETER_NAME] = - resource; - - return request; - } -} diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/src/client/ManagedIdentitySources/Imds.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/src/client/ManagedIdentitySources/Imds.ts deleted file mode 100644 index 0559ea7..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/src/client/ManagedIdentitySources/Imds.ts +++ /dev/null @@ -1,126 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import { INetworkModule, Logger } from "@azure/msal-common/node"; -import { ManagedIdentityId } from "../../config/ManagedIdentityId.js"; -import { ManagedIdentityRequestParameters } from "../../config/ManagedIdentityRequestParameters.js"; -import { BaseManagedIdentitySource } from "./BaseManagedIdentitySource.js"; -import { CryptoProvider } from "../../crypto/CryptoProvider.js"; -import { - API_VERSION_QUERY_PARAMETER_NAME, - HttpMethod, - METADATA_HEADER_NAME, - ManagedIdentityEnvironmentVariableNames, - ManagedIdentityIdType, - ManagedIdentitySourceNames, - RESOURCE_BODY_OR_QUERY_PARAMETER_NAME, -} from "../../utils/Constants.js"; -import { NodeStorage } from "../../cache/NodeStorage.js"; - -// IMDS constants. Docs for IMDS are available here https://docs.microsoft.com/azure/active-directory/managed-identities-azure-resources/how-to-use-vm-token#get-a-token-using-http -const IMDS_TOKEN_PATH: string = "/metadata/identity/oauth2/token"; -const DEFAULT_IMDS_ENDPOINT: string = `http://169.254.169.254${IMDS_TOKEN_PATH}`; - -const IMDS_API_VERSION: string = "2018-02-01"; - -// Original source of code: https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/identity/Azure.Identity/src/ImdsManagedIdentitySource.cs -export class Imds extends BaseManagedIdentitySource { - private identityEndpoint: string; - - constructor( - logger: Logger, - nodeStorage: NodeStorage, - networkClient: INetworkModule, - cryptoProvider: CryptoProvider, - identityEndpoint: string - ) { - super(logger, nodeStorage, networkClient, cryptoProvider); - - this.identityEndpoint = identityEndpoint; - } - - public static tryCreate( - logger: Logger, - nodeStorage: NodeStorage, - networkClient: INetworkModule, - cryptoProvider: CryptoProvider - ): Imds { - let validatedIdentityEndpoint: string; - - if ( - process.env[ - ManagedIdentityEnvironmentVariableNames - .AZURE_POD_IDENTITY_AUTHORITY_HOST - ] - ) { - logger.info( - `[Managed Identity] Environment variable ${ - ManagedIdentityEnvironmentVariableNames.AZURE_POD_IDENTITY_AUTHORITY_HOST - } for ${ManagedIdentitySourceNames.IMDS} returned endpoint: ${ - process.env[ - ManagedIdentityEnvironmentVariableNames - .AZURE_POD_IDENTITY_AUTHORITY_HOST - ] - }` - ); - validatedIdentityEndpoint = Imds.getValidatedEnvVariableUrlString( - ManagedIdentityEnvironmentVariableNames.AZURE_POD_IDENTITY_AUTHORITY_HOST, - `${ - process.env[ - ManagedIdentityEnvironmentVariableNames - .AZURE_POD_IDENTITY_AUTHORITY_HOST - ] - }${IMDS_TOKEN_PATH}`, - ManagedIdentitySourceNames.IMDS, - logger - ); - } else { - logger.info( - `[Managed Identity] Unable to find ${ManagedIdentityEnvironmentVariableNames.AZURE_POD_IDENTITY_AUTHORITY_HOST} environment variable for ${ManagedIdentitySourceNames.IMDS}, using the default endpoint.` - ); - validatedIdentityEndpoint = DEFAULT_IMDS_ENDPOINT; - } - - return new Imds( - logger, - nodeStorage, - networkClient, - cryptoProvider, - validatedIdentityEndpoint - ); - } - - public createRequest( - resource: string, - managedIdentityId: ManagedIdentityId - ): ManagedIdentityRequestParameters { - const request: ManagedIdentityRequestParameters = - new ManagedIdentityRequestParameters( - HttpMethod.GET, - this.identityEndpoint - ); - - request.headers[METADATA_HEADER_NAME] = "true"; - - request.queryParameters[API_VERSION_QUERY_PARAMETER_NAME] = - IMDS_API_VERSION; - request.queryParameters[RESOURCE_BODY_OR_QUERY_PARAMETER_NAME] = - resource; - - if ( - managedIdentityId.idType !== ManagedIdentityIdType.SYSTEM_ASSIGNED - ) { - request.queryParameters[ - this.getManagedIdentityUserAssignedIdQueryParameterKey( - managedIdentityId.idType - ) - ] = managedIdentityId.id; - } - - // bodyParameters calculated in BaseManagedIdentity.acquireTokenWithManagedIdentity - - return request; - } -} diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/src/client/ManagedIdentitySources/ServiceFabric.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/src/client/ManagedIdentitySources/ServiceFabric.ts deleted file mode 100644 index 501d2f2..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/src/client/ManagedIdentitySources/ServiceFabric.ts +++ /dev/null @@ -1,147 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import { INetworkModule, Logger } from "@azure/msal-common/node"; -import { ManagedIdentityId } from "../../config/ManagedIdentityId.js"; -import { ManagedIdentityRequestParameters } from "../../config/ManagedIdentityRequestParameters.js"; -import { BaseManagedIdentitySource } from "./BaseManagedIdentitySource.js"; -import { NodeStorage } from "../../cache/NodeStorage.js"; -import { CryptoProvider } from "../../crypto/CryptoProvider.js"; -import { - API_VERSION_QUERY_PARAMETER_NAME, - HttpMethod, - ManagedIdentityEnvironmentVariableNames, - ManagedIdentityIdType, - ManagedIdentitySourceNames, - RESOURCE_BODY_OR_QUERY_PARAMETER_NAME, - SERVICE_FABRIC_SECRET_HEADER_NAME, -} from "../../utils/Constants.js"; - -// MSI Constants. Docs for MSI are available here https://docs.microsoft.com/azure/app-service/overview-managed-identity -const SERVICE_FABRIC_MSI_API_VERSION: string = "2019-07-01-preview"; - -/** - * Original source of code: https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/identity/Azure.Identity/src/ServiceFabricManagedIdentitySource.cs - */ -export class ServiceFabric extends BaseManagedIdentitySource { - private identityEndpoint: string; - private identityHeader: string; - - constructor( - logger: Logger, - nodeStorage: NodeStorage, - networkClient: INetworkModule, - cryptoProvider: CryptoProvider, - identityEndpoint: string, - identityHeader: string - ) { - super(logger, nodeStorage, networkClient, cryptoProvider); - - this.identityEndpoint = identityEndpoint; - this.identityHeader = identityHeader; - } - - public static getEnvironmentVariables(): Array { - const identityEndpoint: string | undefined = - process.env[ - ManagedIdentityEnvironmentVariableNames.IDENTITY_ENDPOINT - ]; - const identityHeader: string | undefined = - process.env[ - ManagedIdentityEnvironmentVariableNames.IDENTITY_HEADER - ]; - const identityServerThumbprint: string | undefined = - process.env[ - ManagedIdentityEnvironmentVariableNames - .IDENTITY_SERVER_THUMBPRINT - ]; - - return [identityEndpoint, identityHeader, identityServerThumbprint]; - } - - public static tryCreate( - logger: Logger, - nodeStorage: NodeStorage, - networkClient: INetworkModule, - cryptoProvider: CryptoProvider, - managedIdentityId: ManagedIdentityId - ): ServiceFabric | null { - const [identityEndpoint, identityHeader, identityServerThumbprint] = - ServiceFabric.getEnvironmentVariables(); - - /* - * if either of the identity endpoint, identity header, or identity server thumbprint - * environment variables are undefined, this MSI provider is unavailable. - */ - if (!identityEndpoint || !identityHeader || !identityServerThumbprint) { - logger.info( - `[Managed Identity] ${ManagedIdentitySourceNames.SERVICE_FABRIC} managed identity is unavailable because one or all of the '${ManagedIdentityEnvironmentVariableNames.IDENTITY_HEADER}', '${ManagedIdentityEnvironmentVariableNames.IDENTITY_ENDPOINT}' or '${ManagedIdentityEnvironmentVariableNames.IDENTITY_SERVER_THUMBPRINT}' environment variables are not defined.` - ); - return null; - } - - const validatedIdentityEndpoint: string = - ServiceFabric.getValidatedEnvVariableUrlString( - ManagedIdentityEnvironmentVariableNames.IDENTITY_ENDPOINT, - identityEndpoint, - ManagedIdentitySourceNames.SERVICE_FABRIC, - logger - ); - - logger.info( - `[Managed Identity] Environment variables validation passed for ${ManagedIdentitySourceNames.SERVICE_FABRIC} managed identity. Endpoint URI: ${validatedIdentityEndpoint}. Creating ${ManagedIdentitySourceNames.SERVICE_FABRIC} managed identity.` - ); - - if ( - managedIdentityId.idType !== ManagedIdentityIdType.SYSTEM_ASSIGNED - ) { - logger.warning( - `[Managed Identity] ${ManagedIdentitySourceNames.SERVICE_FABRIC} user assigned managed identity is configured in the cluster, not during runtime. See also: https://learn.microsoft.com/en-us/azure/service-fabric/configure-existing-cluster-enable-managed-identity-token-service.` - ); - } - - return new ServiceFabric( - logger, - nodeStorage, - networkClient, - cryptoProvider, - identityEndpoint, - identityHeader - ); - } - - public createRequest( - resource: string, - managedIdentityId: ManagedIdentityId - ): ManagedIdentityRequestParameters { - const request: ManagedIdentityRequestParameters = - new ManagedIdentityRequestParameters( - HttpMethod.GET, - this.identityEndpoint - ); - - request.headers[SERVICE_FABRIC_SECRET_HEADER_NAME] = - this.identityHeader; - - request.queryParameters[API_VERSION_QUERY_PARAMETER_NAME] = - SERVICE_FABRIC_MSI_API_VERSION; - request.queryParameters[RESOURCE_BODY_OR_QUERY_PARAMETER_NAME] = - resource; - - if ( - managedIdentityId.idType !== ManagedIdentityIdType.SYSTEM_ASSIGNED - ) { - request.queryParameters[ - this.getManagedIdentityUserAssignedIdQueryParameterKey( - managedIdentityId.idType - ) - ] = managedIdentityId.id; - } - - // bodyParameters calculated in BaseManagedIdentity.acquireTokenWithManagedIdentity - - return request; - } -} diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/src/client/OnBehalfOfClient.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/src/client/OnBehalfOfClient.ts deleted file mode 100644 index 7aeff8f..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/src/client/OnBehalfOfClient.ts +++ /dev/null @@ -1,386 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import { - AADServerParamKeys, - AccessTokenEntity, - AccountEntity, - AccountInfo, - AuthenticationResult, - AuthenticationScheme, - Authority, - AuthToken, - BaseClient, - CacheOutcome, - ClientAuthErrorCodes, - ClientConfiguration, - CommonOnBehalfOfRequest, - Constants, - createClientAuthError, - CredentialFilter, - CredentialType, - GrantType, - IdTokenEntity, - RequestParameterBuilder, - RequestThumbprint, - ResponseHandler, - ScopeSet, - TimeUtils, - TokenClaims, - UrlString, - ClientAssertion, - getClientAssertion, -} from "@azure/msal-common/node"; -import { EncodingUtils } from "../utils/EncodingUtils.js"; - -/** - * On-Behalf-Of client - * @public - */ -export class OnBehalfOfClient extends BaseClient { - private scopeSet: ScopeSet; - private userAssertionHash: string; - - constructor(configuration: ClientConfiguration) { - super(configuration); - } - - /** - * Public API to acquire tokens with on behalf of flow - * @param request - developer provided CommonOnBehalfOfRequest - */ - public async acquireToken( - request: CommonOnBehalfOfRequest - ): Promise { - this.scopeSet = new ScopeSet(request.scopes || []); - - // generate the user_assertion_hash for OBOAssertion - this.userAssertionHash = await this.cryptoUtils.hashString( - request.oboAssertion - ); - - if (request.skipCache || request.claims) { - return this.executeTokenRequest( - request, - this.authority, - this.userAssertionHash - ); - } - - try { - return await this.getCachedAuthenticationResult(request); - } catch (e) { - // Any failure falls back to interactive request, once we implement distributed cache, we plan to handle `createRefreshRequiredError` to refresh using the RT - return await this.executeTokenRequest( - request, - this.authority, - this.userAssertionHash - ); - } - } - - /** - * look up cache for tokens - * Find idtoken in the cache - * Find accessToken based on user assertion and account info in the cache - * Please note we are not yet supported OBO tokens refreshed with long lived RT. User will have to send a new assertion if the current access token expires - * This is to prevent security issues when the assertion changes over time, however, longlived RT helps retaining the session - * @param request - developer provided CommonOnBehalfOfRequest - */ - private async getCachedAuthenticationResult( - request: CommonOnBehalfOfRequest - ): Promise { - // look in the cache for the access_token which matches the incoming_assertion - const cachedAccessToken = this.readAccessTokenFromCacheForOBO( - this.config.authOptions.clientId, - request - ); - if (!cachedAccessToken) { - // Must refresh due to non-existent access_token. - this.serverTelemetryManager?.setCacheOutcome( - CacheOutcome.NO_CACHED_ACCESS_TOKEN - ); - this.logger.info( - "SilentFlowClient:acquireCachedToken - No access token found in cache for the given properties." - ); - throw createClientAuthError( - ClientAuthErrorCodes.tokenRefreshRequired - ); - } else if ( - TimeUtils.isTokenExpired( - cachedAccessToken.expiresOn, - this.config.systemOptions.tokenRenewalOffsetSeconds - ) - ) { - // Access token expired, will need to renewed - this.serverTelemetryManager?.setCacheOutcome( - CacheOutcome.CACHED_ACCESS_TOKEN_EXPIRED - ); - this.logger.info( - `OnbehalfofFlow:getCachedAuthenticationResult - Cached access token is expired or will expire within ${this.config.systemOptions.tokenRenewalOffsetSeconds} seconds.` - ); - throw createClientAuthError( - ClientAuthErrorCodes.tokenRefreshRequired - ); - } - - // fetch the idToken from cache - const cachedIdToken = this.readIdTokenFromCacheForOBO( - cachedAccessToken.homeAccountId, - request.correlationId - ); - let idTokenClaims: TokenClaims | undefined; - let cachedAccount: AccountEntity | null = null; - if (cachedIdToken) { - idTokenClaims = AuthToken.extractTokenClaims( - cachedIdToken.secret, - EncodingUtils.base64Decode - ); - const localAccountId = idTokenClaims.oid || idTokenClaims.sub; - const accountInfo: AccountInfo = { - homeAccountId: cachedIdToken.homeAccountId, - environment: cachedIdToken.environment, - tenantId: cachedIdToken.realm, - username: Constants.EMPTY_STRING, - localAccountId: localAccountId || Constants.EMPTY_STRING, - }; - - cachedAccount = this.cacheManager.readAccountFromCache( - accountInfo, - request.correlationId - ); - } - - // increment telemetry cache hit counter - if (this.config.serverTelemetryManager) { - this.config.serverTelemetryManager.incrementCacheHits(); - } - - return ResponseHandler.generateAuthenticationResult( - this.cryptoUtils, - this.authority, - { - account: cachedAccount, - accessToken: cachedAccessToken, - idToken: cachedIdToken, - refreshToken: null, - appMetadata: null, - }, - true, - request, - idTokenClaims - ); - } - - /** - * read idtoken from cache, this is a specific implementation for OBO as the requirements differ from a generic lookup in the cacheManager - * Certain use cases of OBO flow do not expect an idToken in the cache/or from the service - * @param atHomeAccountId - account id - */ - private readIdTokenFromCacheForOBO( - atHomeAccountId: string, - correlationId: string - ): IdTokenEntity | null { - const idTokenFilter: CredentialFilter = { - homeAccountId: atHomeAccountId, - environment: - this.authority.canonicalAuthorityUrlComponents.HostNameAndPort, - credentialType: CredentialType.ID_TOKEN, - clientId: this.config.authOptions.clientId, - realm: this.authority.tenant, - }; - - const idTokenMap: Map = - this.cacheManager.getIdTokensByFilter(idTokenFilter, correlationId); - - // When acquiring a token on behalf of an application, there might not be an id token in the cache - if (Object.values(idTokenMap).length < 1) { - return null; - } - return Object.values(idTokenMap)[0] as IdTokenEntity; - } - - /** - * Fetches the cached access token based on incoming assertion - * @param clientId - client id - * @param request - developer provided CommonOnBehalfOfRequest - */ - private readAccessTokenFromCacheForOBO( - clientId: string, - request: CommonOnBehalfOfRequest - ) { - const authScheme = - request.authenticationScheme || AuthenticationScheme.BEARER; - /* - * Distinguish between Bearer and PoP/SSH token cache types - * Cast to lowercase to handle "bearer" from ADFS - */ - const credentialType = - authScheme && - authScheme.toLowerCase() !== - AuthenticationScheme.BEARER.toLowerCase() - ? CredentialType.ACCESS_TOKEN_WITH_AUTH_SCHEME - : CredentialType.ACCESS_TOKEN; - - const accessTokenFilter: CredentialFilter = { - credentialType: credentialType, - clientId, - target: ScopeSet.createSearchScopes(this.scopeSet.asArray()), - tokenType: authScheme, - keyId: request.sshKid, - requestedClaimsHash: request.requestedClaimsHash, - userAssertionHash: this.userAssertionHash, - }; - - const accessTokens = this.cacheManager.getAccessTokensByFilter( - accessTokenFilter, - request.correlationId - ); - - const numAccessTokens = accessTokens.length; - if (numAccessTokens < 1) { - return null; - } else if (numAccessTokens > 1) { - throw createClientAuthError( - ClientAuthErrorCodes.multipleMatchingTokens - ); - } - - return accessTokens[0] as AccessTokenEntity; - } - - /** - * Make a network call to the server requesting credentials - * @param request - developer provided CommonOnBehalfOfRequest - * @param authority - authority object - */ - private async executeTokenRequest( - request: CommonOnBehalfOfRequest, - authority: Authority, - userAssertionHash: string - ): Promise { - const queryParametersString = this.createTokenQueryParameters(request); - const endpoint = UrlString.appendQueryString( - authority.tokenEndpoint, - queryParametersString - ); - const requestBody = await this.createTokenRequestBody(request); - const headers: Record = - this.createTokenRequestHeaders(); - const thumbprint: RequestThumbprint = { - clientId: this.config.authOptions.clientId, - authority: request.authority, - scopes: request.scopes, - claims: request.claims, - authenticationScheme: request.authenticationScheme, - resourceRequestMethod: request.resourceRequestMethod, - resourceRequestUri: request.resourceRequestUri, - shrClaims: request.shrClaims, - sshKid: request.sshKid, - }; - - const reqTimestamp = TimeUtils.nowSeconds(); - const response = await this.executePostToTokenEndpoint( - endpoint, - requestBody, - headers, - thumbprint, - request.correlationId - ); - - const responseHandler = new ResponseHandler( - this.config.authOptions.clientId, - this.cacheManager, - this.cryptoUtils, - this.logger, - this.config.serializableCache, - this.config.persistencePlugin - ); - - responseHandler.validateTokenResponse(response.body); - const tokenResponse = await responseHandler.handleServerTokenResponse( - response.body, - this.authority, - reqTimestamp, - request, - undefined, - userAssertionHash - ); - - return tokenResponse; - } - - /** - * generate a server request in accepable format - * @param request - developer provided CommonOnBehalfOfRequest - */ - private async createTokenRequestBody( - request: CommonOnBehalfOfRequest - ): Promise { - const parameterBuilder = new RequestParameterBuilder(); - - parameterBuilder.addClientId(this.config.authOptions.clientId); - - parameterBuilder.addScopes(request.scopes); - - parameterBuilder.addGrantType(GrantType.JWT_BEARER); - - parameterBuilder.addClientInfo(); - - parameterBuilder.addLibraryInfo(this.config.libraryInfo); - parameterBuilder.addApplicationTelemetry( - this.config.telemetry.application - ); - parameterBuilder.addThrottling(); - - if (this.serverTelemetryManager) { - parameterBuilder.addServerTelemetry(this.serverTelemetryManager); - } - - const correlationId = - request.correlationId || - this.config.cryptoInterface.createNewGuid(); - parameterBuilder.addCorrelationId(correlationId); - - parameterBuilder.addRequestTokenUse(AADServerParamKeys.ON_BEHALF_OF); - - parameterBuilder.addOboAssertion(request.oboAssertion); - - if (this.config.clientCredentials.clientSecret) { - parameterBuilder.addClientSecret( - this.config.clientCredentials.clientSecret - ); - } - - const clientAssertion: ClientAssertion | undefined = - this.config.clientCredentials.clientAssertion; - - if (clientAssertion) { - parameterBuilder.addClientAssertion( - await getClientAssertion( - clientAssertion.assertion, - this.config.authOptions.clientId, - request.resourceRequestUri - ) - ); - parameterBuilder.addClientAssertionType( - clientAssertion.assertionType - ); - } - - if ( - request.claims || - (this.config.authOptions.clientCapabilities && - this.config.authOptions.clientCapabilities.length > 0) - ) { - parameterBuilder.addClaims( - request.claims, - this.config.authOptions.clientCapabilities - ); - } - - return parameterBuilder.createQueryString(); - } -} diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/src/client/PublicClientApplication.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/src/client/PublicClientApplication.ts deleted file mode 100644 index b764b7e..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/src/client/PublicClientApplication.ts +++ /dev/null @@ -1,355 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import { - ApiId, - Constants, - LOOPBACK_SERVER_CONSTANTS, -} from "../utils/Constants.js"; -import { - AuthenticationResult, - CommonDeviceCodeRequest, - AuthError, - ResponseMode, - OIDC_DEFAULT_SCOPES, - CodeChallengeMethodValues, - Constants as CommonConstants, - ServerError, - NativeRequest, - NativeSignOutRequest, - AccountInfo, - INativeBrokerPlugin, - ServerAuthorizationCodeResponse, - AADServerParamKeys, - ServerTelemetryManager, -} from "@azure/msal-common/node"; -import { Configuration } from "../config/Configuration.js"; -import { ClientApplication } from "./ClientApplication.js"; -import { IPublicClientApplication } from "./IPublicClientApplication.js"; -import { DeviceCodeRequest } from "../request/DeviceCodeRequest.js"; -import { AuthorizationUrlRequest } from "../request/AuthorizationUrlRequest.js"; -import { AuthorizationCodeRequest } from "../request/AuthorizationCodeRequest.js"; -import { InteractiveRequest } from "../request/InteractiveRequest.js"; -import { NodeAuthError, NodeAuthErrorMessage } from "../error/NodeAuthError.js"; -import { LoopbackClient } from "../network/LoopbackClient.js"; -import { SilentFlowRequest } from "../request/SilentFlowRequest.js"; -import { SignOutRequest } from "../request/SignOutRequest.js"; -import { ILoopbackClient } from "../network/ILoopbackClient.js"; -import { DeviceCodeClient } from "./DeviceCodeClient.js"; -import { version } from "../packageMetadata.js"; - -/** - * This class is to be used to acquire tokens for public client applications (desktop, mobile). Public client applications - * are not trusted to safely store application secrets, and therefore can only request tokens in the name of an user. - * @public - */ -export class PublicClientApplication - extends ClientApplication - implements IPublicClientApplication -{ - private nativeBrokerPlugin?: INativeBrokerPlugin; - private readonly skus: string; - /** - * Important attributes in the Configuration object for auth are: - * - clientID: the application ID of your application. You can obtain one by registering your application with our Application registration portal. - * - authority: the authority URL for your application. - * - * AAD authorities are of the form https://login.microsoftonline.com/\{Enter_the_Tenant_Info_Here\}. - * - If your application supports Accounts in one organizational directory, replace "Enter_the_Tenant_Info_Here" value with the Tenant Id or Tenant name (for example, contoso.microsoft.com). - * - If your application supports Accounts in any organizational directory, replace "Enter_the_Tenant_Info_Here" value with organizations. - * - If your application supports Accounts in any organizational directory and personal Microsoft accounts, replace "Enter_the_Tenant_Info_Here" value with common. - * - To restrict support to Personal Microsoft accounts only, replace "Enter_the_Tenant_Info_Here" value with consumers. - * - * Azure B2C authorities are of the form https://\{instance\}/\{tenant\}/\{policy\}. Each policy is considered - * its own authority. You will have to set the all of the knownAuthorities at the time of the client application - * construction. - * - * ADFS authorities are of the form https://\{instance\}/adfs. - */ - constructor(configuration: Configuration) { - super(configuration); - if (this.config.broker.nativeBrokerPlugin) { - if (this.config.broker.nativeBrokerPlugin.isBrokerAvailable) { - this.nativeBrokerPlugin = this.config.broker.nativeBrokerPlugin; - this.nativeBrokerPlugin.setLogger( - this.config.system.loggerOptions - ); - } else { - this.logger.warning( - "NativeBroker implementation was provided but the broker is unavailable." - ); - } - } - this.skus = ServerTelemetryManager.makeExtraSkuString({ - libraryName: Constants.MSAL_SKU, - libraryVersion: version, - }); - } - - /** - * Acquires a token from the authority using OAuth2.0 device code flow. - * This flow is designed for devices that do not have access to a browser or have input constraints. - * The authorization server issues a DeviceCode object with a verification code, an end-user code, - * and the end-user verification URI. The DeviceCode object is provided through a callback, and the end-user should be - * instructed to use another device to navigate to the verification URI to input credentials. - * Since the client cannot receive incoming requests, it polls the authorization server repeatedly - * until the end-user completes input of credentials. - */ - public async acquireTokenByDeviceCode( - request: DeviceCodeRequest - ): Promise { - this.logger.info( - "acquireTokenByDeviceCode called", - request.correlationId - ); - const validRequest: CommonDeviceCodeRequest = Object.assign( - request, - await this.initializeBaseRequest(request) - ); - const serverTelemetryManager = this.initializeServerTelemetryManager( - ApiId.acquireTokenByDeviceCode, - validRequest.correlationId - ); - try { - const deviceCodeConfig = await this.buildOauthClientConfiguration( - validRequest.authority, - validRequest.correlationId, - "", - serverTelemetryManager, - undefined, - request.azureCloudOptions - ); - const deviceCodeClient = new DeviceCodeClient(deviceCodeConfig); - this.logger.verbose( - "Device code client created", - validRequest.correlationId - ); - return await deviceCodeClient.acquireToken(validRequest); - } catch (e) { - if (e instanceof AuthError) { - e.setCorrelationId(validRequest.correlationId); - } - serverTelemetryManager.cacheFailedRequest(e as AuthError); - throw e; - } - } - - /** - * Acquires a token interactively via the browser by requesting an authorization code then exchanging it for a token. - */ - async acquireTokenInteractive( - request: InteractiveRequest - ): Promise { - const correlationId = - request.correlationId || this.cryptoProvider.createNewGuid(); - this.logger.trace("acquireTokenInteractive called", correlationId); - const { - openBrowser, - successTemplate, - errorTemplate, - windowHandle, - loopbackClient: customLoopbackClient, - ...remainingProperties - } = request; - - if (this.nativeBrokerPlugin) { - const brokerRequest: NativeRequest = { - ...remainingProperties, - clientId: this.config.auth.clientId, - scopes: request.scopes || OIDC_DEFAULT_SCOPES, - redirectUri: `${Constants.HTTP_PROTOCOL}${Constants.LOCALHOST}`, - authority: request.authority || this.config.auth.authority, - correlationId: correlationId, - extraParameters: { - ...remainingProperties.extraQueryParameters, - ...remainingProperties.tokenQueryParameters, - [AADServerParamKeys.X_CLIENT_EXTRA_SKU]: this.skus, - }, - accountId: remainingProperties.account?.nativeAccountId, - }; - return this.nativeBrokerPlugin.acquireTokenInteractive( - brokerRequest, - windowHandle - ); - } - - const { verifier, challenge } = - await this.cryptoProvider.generatePkceCodes(); - - const loopbackClient: ILoopbackClient = - customLoopbackClient || new LoopbackClient(); - - let authCodeResponse: ServerAuthorizationCodeResponse = {}; - let authCodeListenerError: AuthError | null = null; - try { - const authCodeListener = loopbackClient - .listenForAuthCode(successTemplate, errorTemplate) - .then((response) => { - authCodeResponse = response; - }) - .catch((e) => { - // Store the promise instead of throwing so we can control when its thrown - authCodeListenerError = e; - }); - - // Wait for server to be listening - const redirectUri = await this.waitForRedirectUri(loopbackClient); - - const validRequest: AuthorizationUrlRequest = { - ...remainingProperties, - correlationId: correlationId, - scopes: request.scopes || OIDC_DEFAULT_SCOPES, - redirectUri: redirectUri, - responseMode: ResponseMode.QUERY, - codeChallenge: challenge, - codeChallengeMethod: CodeChallengeMethodValues.S256, - }; - - const authCodeUrl = await this.getAuthCodeUrl(validRequest); - await openBrowser(authCodeUrl); - await authCodeListener; - if (authCodeListenerError) { - throw authCodeListenerError; - } - - if (authCodeResponse.error) { - throw new ServerError( - authCodeResponse.error, - authCodeResponse.error_description, - authCodeResponse.suberror - ); - } else if (!authCodeResponse.code) { - throw NodeAuthError.createNoAuthCodeInResponseError(); - } - - const clientInfo = authCodeResponse.client_info; - const tokenRequest: AuthorizationCodeRequest = { - code: authCodeResponse.code, - codeVerifier: verifier, - clientInfo: clientInfo || CommonConstants.EMPTY_STRING, - ...validRequest, - }; - return await this.acquireTokenByCode(tokenRequest); // Await this so the server doesn't close prematurely - } finally { - loopbackClient.closeServer(); - } - } - - /** - * Returns a token retrieved either from the cache or by exchanging the refresh token for a fresh access token. If brokering is enabled the token request will be serviced by the broker. - * @param request - developer provided SilentFlowRequest - * @returns - */ - async acquireTokenSilent( - request: SilentFlowRequest - ): Promise { - const correlationId = - request.correlationId || this.cryptoProvider.createNewGuid(); - this.logger.trace("acquireTokenSilent called", correlationId); - - if (this.nativeBrokerPlugin) { - const brokerRequest: NativeRequest = { - ...request, - clientId: this.config.auth.clientId, - scopes: request.scopes || OIDC_DEFAULT_SCOPES, - redirectUri: `${Constants.HTTP_PROTOCOL}${Constants.LOCALHOST}`, - authority: request.authority || this.config.auth.authority, - correlationId: correlationId, - extraParameters: { - ...request.tokenQueryParameters, - [AADServerParamKeys.X_CLIENT_EXTRA_SKU]: this.skus, - }, - accountId: request.account.nativeAccountId, - forceRefresh: request.forceRefresh || false, - }; - return this.nativeBrokerPlugin.acquireTokenSilent(brokerRequest); - } - - return super.acquireTokenSilent(request); - } - - /** - * Removes cache artifacts associated with the given account - * @param request - developer provided SignOutRequest - * @returns - */ - async signOut(request: SignOutRequest): Promise { - if (this.nativeBrokerPlugin && request.account.nativeAccountId) { - const signoutRequest: NativeSignOutRequest = { - clientId: this.config.auth.clientId, - accountId: request.account.nativeAccountId, - correlationId: - request.correlationId || - this.cryptoProvider.createNewGuid(), - }; - await this.nativeBrokerPlugin.signOut(signoutRequest); - } - - await this.getTokenCache().removeAccount( - request.account, - request.correlationId - ); - } - - /** - * Returns all cached accounts for this application. If brokering is enabled this request will be serviced by the broker. - * @returns - */ - async getAllAccounts(): Promise { - if (this.nativeBrokerPlugin) { - const correlationId = this.cryptoProvider.createNewGuid(); - return this.nativeBrokerPlugin.getAllAccounts( - this.config.auth.clientId, - correlationId - ); - } - - return this.getTokenCache().getAllAccounts(); - } - - /** - * Attempts to retrieve the redirectUri from the loopback server. If the loopback server does not start listening for requests within the timeout this will throw. - * @param loopbackClient - developer provided custom loopback server implementation - * @returns - */ - private async waitForRedirectUri( - loopbackClient: ILoopbackClient - ): Promise { - return new Promise((resolve, reject) => { - let ticks = 0; - const id = setInterval(() => { - if ( - LOOPBACK_SERVER_CONSTANTS.TIMEOUT_MS / - LOOPBACK_SERVER_CONSTANTS.INTERVAL_MS < - ticks - ) { - clearInterval(id); - reject(NodeAuthError.createLoopbackServerTimeoutError()); - return; - } - - try { - const r = loopbackClient.getRedirectUri(); - clearInterval(id); - resolve(r); - return; - } catch (e) { - if ( - e instanceof AuthError && - e.errorCode === - NodeAuthErrorMessage.noLoopbackServerExists.code - ) { - // Loopback server is not listening yet - ticks++; - return; - } - clearInterval(id); - reject(e); - return; - } - }, LOOPBACK_SERVER_CONSTANTS.INTERVAL_MS); - }); - } -} diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/src/client/UsernamePasswordClient.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/src/client/UsernamePasswordClient.ts deleted file mode 100644 index 6d03561..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/src/client/UsernamePasswordClient.ts +++ /dev/null @@ -1,190 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import { - AuthenticationResult, - Authority, - BaseClient, - CcsCredentialType, - ClientAssertion, - ClientConfiguration, - CommonUsernamePasswordRequest, - GrantType, - NetworkResponse, - RequestParameterBuilder, - RequestThumbprint, - ResponseHandler, - ServerAuthorizationTokenResponse, - StringUtils, - TimeUtils, - UrlString, - getClientAssertion, -} from "@azure/msal-common/node"; - -/** - * Oauth2.0 Password grant client - * Note: We are only supporting public clients for password grant and for purely testing purposes - * @public - */ -export class UsernamePasswordClient extends BaseClient { - constructor(configuration: ClientConfiguration) { - super(configuration); - } - - /** - * API to acquire a token by passing the username and password to the service in exchage of credentials - * password_grant - * @param request - CommonUsernamePasswordRequest - */ - async acquireToken( - request: CommonUsernamePasswordRequest - ): Promise { - this.logger.info("in acquireToken call in username-password client"); - - const reqTimestamp = TimeUtils.nowSeconds(); - const response = await this.executeTokenRequest( - this.authority, - request - ); - - const responseHandler = new ResponseHandler( - this.config.authOptions.clientId, - this.cacheManager, - this.cryptoUtils, - this.logger, - this.config.serializableCache, - this.config.persistencePlugin - ); - - // Validate response. This function throws a server error if an error is returned by the server. - responseHandler.validateTokenResponse(response.body); - const tokenResponse = responseHandler.handleServerTokenResponse( - response.body, - this.authority, - reqTimestamp, - request - ); - - return tokenResponse; - } - - /** - * Executes POST request to token endpoint - * @param authority - authority object - * @param request - CommonUsernamePasswordRequest provided by the developer - */ - private async executeTokenRequest( - authority: Authority, - request: CommonUsernamePasswordRequest - ): Promise> { - const queryParametersString = this.createTokenQueryParameters(request); - const endpoint = UrlString.appendQueryString( - authority.tokenEndpoint, - queryParametersString - ); - const requestBody = await this.createTokenRequestBody(request); - const headers: Record = this.createTokenRequestHeaders({ - credential: request.username, - type: CcsCredentialType.UPN, - }); - const thumbprint: RequestThumbprint = { - clientId: this.config.authOptions.clientId, - authority: authority.canonicalAuthority, - scopes: request.scopes, - claims: request.claims, - authenticationScheme: request.authenticationScheme, - resourceRequestMethod: request.resourceRequestMethod, - resourceRequestUri: request.resourceRequestUri, - shrClaims: request.shrClaims, - sshKid: request.sshKid, - }; - - return this.executePostToTokenEndpoint( - endpoint, - requestBody, - headers, - thumbprint, - request.correlationId - ); - } - - /** - * Generates a map for all the params to be sent to the service - * @param request - CommonUsernamePasswordRequest provided by the developer - */ - private async createTokenRequestBody( - request: CommonUsernamePasswordRequest - ): Promise { - const parameterBuilder = new RequestParameterBuilder(); - - parameterBuilder.addClientId(this.config.authOptions.clientId); - parameterBuilder.addUsername(request.username); - parameterBuilder.addPassword(request.password); - - parameterBuilder.addScopes(request.scopes); - - parameterBuilder.addResponseTypeForTokenAndIdToken(); - - parameterBuilder.addGrantType(GrantType.RESOURCE_OWNER_PASSWORD_GRANT); - parameterBuilder.addClientInfo(); - - parameterBuilder.addLibraryInfo(this.config.libraryInfo); - parameterBuilder.addApplicationTelemetry( - this.config.telemetry.application - ); - parameterBuilder.addThrottling(); - - if (this.serverTelemetryManager) { - parameterBuilder.addServerTelemetry(this.serverTelemetryManager); - } - - const correlationId = - request.correlationId || - this.config.cryptoInterface.createNewGuid(); - parameterBuilder.addCorrelationId(correlationId); - - if (this.config.clientCredentials.clientSecret) { - parameterBuilder.addClientSecret( - this.config.clientCredentials.clientSecret - ); - } - - const clientAssertion: ClientAssertion | undefined = - this.config.clientCredentials.clientAssertion; - - if (clientAssertion) { - parameterBuilder.addClientAssertion( - await getClientAssertion( - clientAssertion.assertion, - this.config.authOptions.clientId, - request.resourceRequestUri - ) - ); - parameterBuilder.addClientAssertionType( - clientAssertion.assertionType - ); - } - - if ( - !StringUtils.isEmptyObj(request.claims) || - (this.config.authOptions.clientCapabilities && - this.config.authOptions.clientCapabilities.length > 0) - ) { - parameterBuilder.addClaims( - request.claims, - this.config.authOptions.clientCapabilities - ); - } - - if ( - this.config.systemOptions.preventCorsPreflight && - request.username - ) { - parameterBuilder.addCcsUpn(request.username); - } - - return parameterBuilder.createQueryString(); - } -} diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/src/config/Configuration.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/src/config/Configuration.ts deleted file mode 100644 index fbde1de..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/src/config/Configuration.ts +++ /dev/null @@ -1,299 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import { - LoggerOptions, - INetworkModule, - LogLevel, - ProtocolMode, - ICachePlugin, - Constants, - AzureCloudInstance, - AzureCloudOptions, - ApplicationTelemetry, - INativeBrokerPlugin, - ClientAssertionCallback, -} from "@azure/msal-common/node"; -import { HttpClient } from "../network/HttpClient.js"; -import http from "http"; -import https from "https"; -import { ManagedIdentityId } from "./ManagedIdentityId.js"; -import { - MANAGED_IDENTITY_HTTP_STATUS_CODES_TO_RETRY_ON, - MANAGED_IDENTITY_MAX_RETRIES, - MANAGED_IDENTITY_RETRY_DELAY, -} from "../utils/Constants.js"; -import { LinearRetryPolicy } from "../retry/LinearRetryPolicy.js"; -import { HttpClientWithRetries } from "../network/HttpClientWithRetries.js"; -import { NodeAuthError } from "../error/NodeAuthError.js"; - -/** - * - clientId - Client id of the application. - * - authority - Url of the authority. If no value is set, defaults to https://login.microsoftonline.com/common. - * - knownAuthorities - Needed for Azure B2C and ADFS. All authorities that will be used in the client application. Only the host of the authority should be passed in. - * - clientSecret - Secret string that the application uses when requesting a token. Only used in confidential client applications. Can be created in the Azure app registration portal. - * - clientAssertion - A ClientAssertion object containing an assertion string or a callback function that returns an assertion string that the application uses when requesting a token, as well as the assertion's type (urn:ietf:params:oauth:client-assertion-type:jwt-bearer). Only used in confidential client applications. - * - clientCertificate - Certificate that the application uses when requesting a token. Only used in confidential client applications. Requires hex encoded X.509 SHA-1 or SHA-256 thumbprint of the certificate, and the PEM encoded private key (string should contain -----BEGIN PRIVATE KEY----- ... -----END PRIVATE KEY----- ) - * - protocolMode - Enum that represents the protocol that msal follows. Used for configuring proper endpoints. - * - skipAuthorityMetadataCache - A flag to choose whether to use or not use the local metadata cache during authority initialization. Defaults to false. - * @public - */ -export type NodeAuthOptions = { - clientId: string; - authority?: string; - clientSecret?: string; - clientAssertion?: string | ClientAssertionCallback; - clientCertificate?: { - /** - * @deprecated Use thumbprintSha2 property instead. Thumbprint needs to be computed with SHA-256 algorithm. - * SHA-1 is only needed for backwards compatibility with older versions of ADFS. - */ - thumbprint?: string; - thumbprintSha256?: string; - privateKey: string; - x5c?: string; - }; - knownAuthorities?: Array; - cloudDiscoveryMetadata?: string; - authorityMetadata?: string; - clientCapabilities?: Array; - protocolMode?: ProtocolMode; - azureCloudOptions?: AzureCloudOptions; - skipAuthorityMetadataCache?: boolean; -}; - -/** - * Use this to configure the below cache configuration options: - * - * - cachePlugin - Plugin for reading and writing token cache to disk. - * @public - */ -export type CacheOptions = { - cachePlugin?: ICachePlugin; - /** - * @deprecated claims-based-caching functionality will be removed in the next version of MSALJS - */ - claimsBasedCachingEnabled?: boolean; -}; - -/** - * Use this to configure the below broker options: - * - nativeBrokerPlugin - Native broker implementation (should be imported from msal-node-extensions) - * - * Note: These options are only available for PublicClientApplications using the Authorization Code Flow - * @public - */ -export type BrokerOptions = { - nativeBrokerPlugin?: INativeBrokerPlugin; -}; - -/** - * Type for configuring logger and http client options - * - * - logger - Used to initialize the Logger object; TODO: Expand on logger details or link to the documentation on logger - * - networkClient - Http client used for all http get and post calls. Defaults to using MSAL's default http client. - * @public - */ -export type NodeSystemOptions = { - loggerOptions?: LoggerOptions; - networkClient?: INetworkModule; - proxyUrl?: string; - customAgentOptions?: http.AgentOptions | https.AgentOptions; - disableInternalRetries?: boolean; -}; - -/** @public */ -export type NodeTelemetryOptions = { - application?: ApplicationTelemetry; -}; - -/** - * Use the configuration object to configure MSAL and initialize the client application object - * - * - auth: this is where you configure auth elements like clientID, authority used for authenticating against the Microsoft Identity Platform - * - broker: this is where you configure broker options - * - cache: this is where you configure cache location - * - system: this is where you can configure the network client, logger - * - telemetry: this is where you can configure telemetry options - * @public - */ -export type Configuration = { - auth: NodeAuthOptions; - broker?: BrokerOptions; - cache?: CacheOptions; - system?: NodeSystemOptions; - telemetry?: NodeTelemetryOptions; -}; - -/** @public */ -export type ManagedIdentityIdParams = { - userAssignedClientId?: string; - userAssignedResourceId?: string; - userAssignedObjectId?: string; -}; - -/** @public */ -export type ManagedIdentityConfiguration = { - managedIdentityIdParams?: ManagedIdentityIdParams; - system?: NodeSystemOptions; -}; - -const DEFAULT_AUTH_OPTIONS: Required = { - clientId: Constants.EMPTY_STRING, - authority: Constants.DEFAULT_AUTHORITY, - clientSecret: Constants.EMPTY_STRING, - clientAssertion: Constants.EMPTY_STRING, - clientCertificate: { - thumbprint: Constants.EMPTY_STRING, - thumbprintSha256: Constants.EMPTY_STRING, - privateKey: Constants.EMPTY_STRING, - x5c: Constants.EMPTY_STRING, - }, - knownAuthorities: [], - cloudDiscoveryMetadata: Constants.EMPTY_STRING, - authorityMetadata: Constants.EMPTY_STRING, - clientCapabilities: [], - protocolMode: ProtocolMode.AAD, - azureCloudOptions: { - azureCloudInstance: AzureCloudInstance.None, - tenant: Constants.EMPTY_STRING, - }, - skipAuthorityMetadataCache: false, -}; - -const DEFAULT_CACHE_OPTIONS: CacheOptions = { - claimsBasedCachingEnabled: false, -}; - -const DEFAULT_LOGGER_OPTIONS: LoggerOptions = { - loggerCallback: (): void => { - // allow users to not set logger call back - }, - piiLoggingEnabled: false, - logLevel: LogLevel.Info, -}; - -const DEFAULT_SYSTEM_OPTIONS: Required = { - loggerOptions: DEFAULT_LOGGER_OPTIONS, - networkClient: new HttpClient(), - proxyUrl: Constants.EMPTY_STRING, - customAgentOptions: {} as http.AgentOptions | https.AgentOptions, - disableInternalRetries: false, -}; - -const DEFAULT_TELEMETRY_OPTIONS: Required = { - application: { - appName: Constants.EMPTY_STRING, - appVersion: Constants.EMPTY_STRING, - }, -}; - -/** @internal */ -export type NodeConfiguration = { - auth: Required; - broker: BrokerOptions; - cache: CacheOptions; - system: Required; - telemetry: Required; -}; - -/** - * Sets the default options when not explicitly configured from app developer - * - * @param auth - Authentication options - * @param cache - Cache options - * @param system - System options - * @param telemetry - Telemetry options - * - * @returns Configuration - * @internal - */ -export function buildAppConfiguration({ - auth, - broker, - cache, - system, - telemetry, -}: Configuration): NodeConfiguration { - const systemOptions: Required = { - ...DEFAULT_SYSTEM_OPTIONS, - networkClient: new HttpClient( - system?.proxyUrl, - system?.customAgentOptions as http.AgentOptions | https.AgentOptions - ), - loggerOptions: system?.loggerOptions || DEFAULT_LOGGER_OPTIONS, - disableInternalRetries: system?.disableInternalRetries || false, - }; - - // if client certificate was provided, ensure that at least one of the SHA-1 or SHA-256 thumbprints were provided - if ( - !!auth.clientCertificate && - !!!auth.clientCertificate.thumbprint && - !!!auth.clientCertificate.thumbprintSha256 - ) { - throw NodeAuthError.createStateNotFoundError(); - } - - return { - auth: { ...DEFAULT_AUTH_OPTIONS, ...auth }, - broker: { ...broker }, - cache: { ...DEFAULT_CACHE_OPTIONS, ...cache }, - system: { ...systemOptions, ...system }, - telemetry: { ...DEFAULT_TELEMETRY_OPTIONS, ...telemetry }, - }; -} - -/** @internal */ -export type ManagedIdentityNodeConfiguration = { - managedIdentityId: ManagedIdentityId; - system: Required< - Pick - >; -}; - -export function buildManagedIdentityConfiguration({ - managedIdentityIdParams, - system, -}: ManagedIdentityConfiguration): ManagedIdentityNodeConfiguration { - const managedIdentityId: ManagedIdentityId = new ManagedIdentityId( - managedIdentityIdParams - ); - - const loggerOptions: LoggerOptions = - system?.loggerOptions || DEFAULT_LOGGER_OPTIONS; - - let networkClient: INetworkModule; - // use developer provided network client if passed in - if (system?.networkClient) { - networkClient = system.networkClient; - // otherwise, create a new one - } else { - networkClient = new HttpClient( - system?.proxyUrl, - system?.customAgentOptions as http.AgentOptions | https.AgentOptions - ); - } - - // wrap the network client with a retry policy if the developer has not disabled the option to do so - if (!system?.disableInternalRetries) { - const linearRetryPolicy: LinearRetryPolicy = new LinearRetryPolicy( - MANAGED_IDENTITY_MAX_RETRIES, - MANAGED_IDENTITY_RETRY_DELAY, - MANAGED_IDENTITY_HTTP_STATUS_CODES_TO_RETRY_ON - ); - networkClient = new HttpClientWithRetries( - networkClient, - linearRetryPolicy - ); - } - - return { - managedIdentityId: managedIdentityId, - system: { - loggerOptions, - networkClient, - }, - }; -} diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/src/config/ManagedIdentityId.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/src/config/ManagedIdentityId.ts deleted file mode 100644 index b67a05e..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/src/config/ManagedIdentityId.ts +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import { - ManagedIdentityErrorCodes, - createManagedIdentityError, -} from "../error/ManagedIdentityError.js"; -import { - DEFAULT_MANAGED_IDENTITY_ID, - ManagedIdentityIdType, -} from "../utils/Constants.js"; -import { ManagedIdentityIdParams } from "./Configuration.js"; - -export class ManagedIdentityId { - private _id: string; - public get id(): string { - return this._id; - } - private set id(value: string) { - this._id = value; - } - - private _idType: ManagedIdentityIdType; - public get idType(): ManagedIdentityIdType { - return this._idType; - } - private set idType(value: ManagedIdentityIdType) { - this._idType = value; - } - - constructor(managedIdentityIdParams?: ManagedIdentityIdParams) { - const userAssignedClientId = - managedIdentityIdParams?.userAssignedClientId; - const userAssignedResourceId = - managedIdentityIdParams?.userAssignedResourceId; - const userAssignedObjectId = - managedIdentityIdParams?.userAssignedObjectId; - - if (userAssignedClientId) { - if (userAssignedResourceId || userAssignedObjectId) { - throw createManagedIdentityError( - ManagedIdentityErrorCodes.invalidManagedIdentityIdType - ); - } - - this.id = userAssignedClientId; - this.idType = ManagedIdentityIdType.USER_ASSIGNED_CLIENT_ID; - } else if (userAssignedResourceId) { - if (userAssignedClientId || userAssignedObjectId) { - throw createManagedIdentityError( - ManagedIdentityErrorCodes.invalidManagedIdentityIdType - ); - } - - this.id = userAssignedResourceId; - this.idType = ManagedIdentityIdType.USER_ASSIGNED_RESOURCE_ID; - } else if (userAssignedObjectId) { - if (userAssignedClientId || userAssignedResourceId) { - throw createManagedIdentityError( - ManagedIdentityErrorCodes.invalidManagedIdentityIdType - ); - } - - this.id = userAssignedObjectId; - this.idType = ManagedIdentityIdType.USER_ASSIGNED_OBJECT_ID; - } else { - this.id = DEFAULT_MANAGED_IDENTITY_ID; - this.idType = ManagedIdentityIdType.SYSTEM_ASSIGNED; - } - } -} diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/src/config/ManagedIdentityRequestParameters.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/src/config/ManagedIdentityRequestParameters.ts deleted file mode 100644 index fd033d7..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/src/config/ManagedIdentityRequestParameters.ts +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import { RequestParameterBuilder, UrlString } from "@azure/msal-common/node"; -import { HttpMethod } from "../utils/Constants.js"; - -export class ManagedIdentityRequestParameters { - private _baseEndpoint: string; - public httpMethod: HttpMethod; - public headers: Record; - public bodyParameters: Record; - public queryParameters: Record; - - constructor(httpMethod: HttpMethod, endpoint: string) { - this.httpMethod = httpMethod; - this._baseEndpoint = endpoint; - this.headers = {} as Record; - this.bodyParameters = {} as Record; - this.queryParameters = {} as Record; - } - - public computeUri(): string { - const parameterBuilder = new RequestParameterBuilder(); - - if (this.queryParameters) { - parameterBuilder.addExtraQueryParameters(this.queryParameters); - } - - const queryParametersString = parameterBuilder.createQueryString(); - - return UrlString.appendQueryString( - this._baseEndpoint, - queryParametersString - ); - } - - public computeParametersBodyString(): string { - const parameterBuilder = new RequestParameterBuilder(); - - if (this.bodyParameters) { - parameterBuilder.addExtraQueryParameters(this.bodyParameters); - } - - return parameterBuilder.createQueryString(); - } -} diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/src/crypto/CryptoProvider.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/src/crypto/CryptoProvider.ts deleted file mode 100644 index c3359b3..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/src/crypto/CryptoProvider.ts +++ /dev/null @@ -1,113 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import { ICrypto, PkceCodes } from "@azure/msal-common/node"; -import { GuidGenerator } from "./GuidGenerator.js"; -import { EncodingUtils } from "../utils/EncodingUtils.js"; -import { PkceGenerator } from "./PkceGenerator.js"; -import { HashUtils } from "./HashUtils.js"; - -/** - * This class implements MSAL node's crypto interface, which allows it to perform base64 encoding and decoding, generating cryptographically random GUIDs and - * implementing Proof Key for Code Exchange specs for the OAuth Authorization Code Flow using PKCE (rfc here: https://tools.ietf.org/html/rfc7636). - * @public - */ -export class CryptoProvider implements ICrypto { - private pkceGenerator: PkceGenerator; - private guidGenerator: GuidGenerator; - private hashUtils: HashUtils; - - constructor() { - // Browser crypto needs to be validated first before any other classes can be set. - this.pkceGenerator = new PkceGenerator(); - this.guidGenerator = new GuidGenerator(); - this.hashUtils = new HashUtils(); - } - - /** - * base64 URL safe encoded string - */ - base64UrlEncode(): string { - throw new Error("Method not implemented."); - } - /** - * Stringifies and base64Url encodes input public key - * @param inputKid - public key id - * @returns Base64Url encoded public key - */ - encodeKid(): string { - throw new Error("Method not implemented."); - } - - /** - * Creates a new random GUID - used to populate state and nonce. - * @returns string (GUID) - */ - createNewGuid(): string { - return this.guidGenerator.generateGuid(); - } - - /** - * Encodes input string to base64. - * @param input - string to be encoded - */ - base64Encode(input: string): string { - return EncodingUtils.base64Encode(input); - } - - /** - * Decodes input string from base64. - * @param input - string to be decoded - */ - base64Decode(input: string): string { - return EncodingUtils.base64Decode(input); - } - - /** - * Generates PKCE codes used in Authorization Code Flow. - */ - generatePkceCodes(): Promise { - return this.pkceGenerator.generatePkceCodes(); - } - - /** - * Generates a keypair, stores it and returns a thumbprint - not yet implemented for node - */ - getPublicKeyThumbprint(): Promise { - throw new Error("Method not implemented."); - } - - /** - * Removes cryptographic keypair from key store matching the keyId passed in - * @param kid - public key id - */ - removeTokenBindingKey(): Promise { - throw new Error("Method not implemented."); - } - - /** - * Removes all cryptographic keys from Keystore - */ - clearKeystore(): Promise { - throw new Error("Method not implemented."); - } - - /** - * Signs the given object as a jwt payload with private key retrieved by given kid - currently not implemented for node - */ - signJwt(): Promise { - throw new Error("Method not implemented."); - } - - /** - * Returns the SHA-256 hash of an input string - */ - async hashString(plainText: string): Promise { - return EncodingUtils.base64EncodeUrl( - this.hashUtils.sha256(plainText).toString("base64"), - "base64" - ); - } -} diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/src/crypto/GuidGenerator.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/src/crypto/GuidGenerator.ts deleted file mode 100644 index 33596ab..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/src/crypto/GuidGenerator.ts +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import { IGuidGenerator } from "@azure/msal-common/node"; -import { v4 as uuidv4 } from "uuid"; - -export class GuidGenerator implements IGuidGenerator { - /** - * - * RFC4122: The version 4 UUID is meant for generating UUIDs from truly-random or pseudo-random numbers. - * uuidv4 generates guids from cryprtographically-string random - */ - generateGuid(): string { - return uuidv4(); - } - - /** - * verifies if a string is GUID - * @param guid - */ - isGuid(guid: string): boolean { - const regexGuid = - /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i; - return regexGuid.test(guid); - } -} diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/src/crypto/HashUtils.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/src/crypto/HashUtils.ts deleted file mode 100644 index 27a9c75..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/src/crypto/HashUtils.ts +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import { Hash } from "../utils/Constants.js"; -import crypto from "crypto"; - -export class HashUtils { - /** - * generate 'SHA256' hash - * @param buffer - */ - sha256(buffer: string): Buffer { - return crypto.createHash(Hash.SHA256).update(buffer).digest(); - } -} diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/src/crypto/PkceGenerator.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/src/crypto/PkceGenerator.ts deleted file mode 100644 index 8c36a6a..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/src/crypto/PkceGenerator.ts +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import { Constants, PkceCodes } from "@azure/msal-common/node"; -import { CharSet, RANDOM_OCTET_SIZE } from "../utils/Constants.js"; -import { EncodingUtils } from "../utils/EncodingUtils.js"; -import { HashUtils } from "./HashUtils.js"; -import crypto from "crypto"; - -/** - * https://tools.ietf.org/html/rfc7636#page-8 - */ -export class PkceGenerator { - private hashUtils: HashUtils; - - constructor() { - this.hashUtils = new HashUtils(); - } - /** - * generates the codeVerfier and the challenge from the codeVerfier - * reference: https://tools.ietf.org/html/rfc7636#section-4.1 and https://tools.ietf.org/html/rfc7636#section-4.2 - */ - async generatePkceCodes(): Promise { - const verifier = this.generateCodeVerifier(); - const challenge = this.generateCodeChallengeFromVerifier(verifier); - return { verifier, challenge }; - } - - /** - * generates the codeVerfier; reference: https://tools.ietf.org/html/rfc7636#section-4.1 - */ - private generateCodeVerifier(): string { - const charArr = []; - const maxNumber = 256 - (256 % CharSet.CV_CHARSET.length); - while (charArr.length <= RANDOM_OCTET_SIZE) { - const byte = crypto.randomBytes(1)[0]; - if (byte >= maxNumber) { - /* - * Ignore this number to maintain randomness. - * Including it would result in an unequal distribution of characters after doing the modulo - */ - continue; - } - const index = byte % CharSet.CV_CHARSET.length; - charArr.push(CharSet.CV_CHARSET[index]); - } - const verifier: string = charArr.join(Constants.EMPTY_STRING); - return EncodingUtils.base64EncodeUrl(verifier); - } - - /** - * generate the challenge from the codeVerfier; reference: https://tools.ietf.org/html/rfc7636#section-4.2 - * @param codeVerifier - */ - private generateCodeChallengeFromVerifier(codeVerifier: string): string { - return EncodingUtils.base64EncodeUrl( - this.hashUtils.sha256(codeVerifier).toString("base64"), - "base64" - ); - } -} diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/src/error/ManagedIdentityError.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/src/error/ManagedIdentityError.ts deleted file mode 100644 index 631ceda..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/src/error/ManagedIdentityError.ts +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import { AuthError } from "@azure/msal-common/node"; -import * as ManagedIdentityErrorCodes from "./ManagedIdentityErrorCodes.js"; -import { ManagedIdentityEnvironmentVariableNames } from "../utils/Constants.js"; -export { ManagedIdentityErrorCodes }; - -/** - * ManagedIdentityErrorMessage class containing string constants used by error codes and messages. - */ -export const ManagedIdentityErrorMessages = { - [ManagedIdentityErrorCodes.invalidFileExtension]: - "The file path in the WWW-Authenticate header does not contain a .key file.", - [ManagedIdentityErrorCodes.invalidFilePath]: - "The file path in the WWW-Authenticate header is not in a valid Windows or Linux Format.", - [ManagedIdentityErrorCodes.invalidManagedIdentityIdType]: - "More than one ManagedIdentityIdType was provided.", - [ManagedIdentityErrorCodes.invalidSecret]: - "The secret in the file on the file path in the WWW-Authenticate header is greater than 4096 bytes.", - [ManagedIdentityErrorCodes.platformNotSupported]: - "The platform is not supported by Azure Arc. Azure Arc only supports Windows and Linux.", - [ManagedIdentityErrorCodes.missingId]: - "A ManagedIdentityId id was not provided.", - [ManagedIdentityErrorCodes.MsiEnvironmentVariableUrlMalformedErrorCodes - .AZURE_POD_IDENTITY_AUTHORITY_HOST]: `The Managed Identity's '${ManagedIdentityEnvironmentVariableNames.AZURE_POD_IDENTITY_AUTHORITY_HOST}' environment variable is malformed.`, - [ManagedIdentityErrorCodes.MsiEnvironmentVariableUrlMalformedErrorCodes - .IDENTITY_ENDPOINT]: `The Managed Identity's '${ManagedIdentityEnvironmentVariableNames.IDENTITY_ENDPOINT}' environment variable is malformed.`, - [ManagedIdentityErrorCodes.MsiEnvironmentVariableUrlMalformedErrorCodes - .IMDS_ENDPOINT]: `The Managed Identity's '${ManagedIdentityEnvironmentVariableNames.IMDS_ENDPOINT}' environment variable is malformed.`, - [ManagedIdentityErrorCodes.MsiEnvironmentVariableUrlMalformedErrorCodes - .MSI_ENDPOINT]: `The Managed Identity's '${ManagedIdentityEnvironmentVariableNames.MSI_ENDPOINT}' environment variable is malformed.`, - [ManagedIdentityErrorCodes.networkUnavailable]: - "Authentication unavailable. The request to the managed identity endpoint timed out.", - [ManagedIdentityErrorCodes.unableToCreateAzureArc]: - "Azure Arc Managed Identities can only be system assigned.", - [ManagedIdentityErrorCodes.unableToCreateCloudShell]: - "Cloud Shell Managed Identities can only be system assigned.", - [ManagedIdentityErrorCodes.unableToCreateSource]: - "Unable to create a Managed Identity source based on environment variables.", - [ManagedIdentityErrorCodes.unableToReadSecretFile]: - "Unable to read the secret file.", - [ManagedIdentityErrorCodes.userAssignedNotAvailableAtRuntime]: - "Service Fabric user assigned managed identity ClientId or ResourceId is not configurable at runtime.", - [ManagedIdentityErrorCodes.wwwAuthenticateHeaderMissing]: - "A 401 response was received form the Azure Arc Managed Identity, but the www-authenticate header is missing.", - [ManagedIdentityErrorCodes.wwwAuthenticateHeaderUnsupportedFormat]: - "A 401 response was received form the Azure Arc Managed Identity, but the www-authenticate header is in an unsupported format.", -}; - -export class ManagedIdentityError extends AuthError { - constructor(errorCode: string) { - super(errorCode, ManagedIdentityErrorMessages[errorCode]); - this.name = "ManagedIdentityError"; - Object.setPrototypeOf(this, ManagedIdentityError.prototype); - } -} - -export function createManagedIdentityError( - errorCode: string -): ManagedIdentityError { - return new ManagedIdentityError(errorCode); -} diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/src/error/ManagedIdentityErrorCodes.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/src/error/ManagedIdentityErrorCodes.ts deleted file mode 100644 index 5cff60b..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/src/error/ManagedIdentityErrorCodes.ts +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import { ManagedIdentityEnvironmentVariableNames } from "../utils/Constants.js"; - -export const invalidFileExtension = "invalid_file_extension"; -export const invalidFilePath = "invalid_file_path"; -export const invalidManagedIdentityIdType = "invalid_managed_identity_id_type"; -export const invalidSecret = "invalid_secret"; -export const missingId = "missing_client_id"; -export const networkUnavailable = "network_unavailable"; -export const platformNotSupported = "platform_not_supported"; -export const unableToCreateAzureArc = "unable_to_create_azure_arc"; -export const unableToCreateCloudShell = "unable_to_create_cloud_shell"; -export const unableToCreateSource = "unable_to_create_source"; -export const unableToReadSecretFile = "unable_to_read_secret_file"; -export const urlParseError = "url_parse_error"; -export const userAssignedNotAvailableAtRuntime = - "user_assigned_not_available_at_runtime"; -export const wwwAuthenticateHeaderMissing = "www_authenticate_header_missing"; -export const wwwAuthenticateHeaderUnsupportedFormat = - "www_authenticate_header_unsupported_format"; - -export const MsiEnvironmentVariableUrlMalformedErrorCodes = { - [ManagedIdentityEnvironmentVariableNames.AZURE_POD_IDENTITY_AUTHORITY_HOST]: - "azure_pod_identity_authority_host_url_malformed", - [ManagedIdentityEnvironmentVariableNames.IDENTITY_ENDPOINT]: - "identity_endpoint_url_malformed", - [ManagedIdentityEnvironmentVariableNames.IMDS_ENDPOINT]: - "imds_endpoint_url_malformed", - [ManagedIdentityEnvironmentVariableNames.MSI_ENDPOINT]: - "msi_endpoint_url_malformed", -} as const; -export type MsiEnvironmentVariableErrorCodes = - (typeof MsiEnvironmentVariableUrlMalformedErrorCodes)[keyof typeof MsiEnvironmentVariableUrlMalformedErrorCodes]; diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/src/error/NodeAuthError.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/src/error/NodeAuthError.ts deleted file mode 100644 index c8fd60d..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/src/error/NodeAuthError.ts +++ /dev/null @@ -1,131 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import { AuthError } from "@azure/msal-common/node"; - -/** - * NodeAuthErrorMessage class containing string constants used by error codes and messages. - */ -export const NodeAuthErrorMessage = { - invalidLoopbackAddressType: { - code: "invalid_loopback_server_address_type", - desc: "Loopback server address is not type string. This is unexpected.", - }, - unableToLoadRedirectUri: { - code: "unable_to_load_redirectUrl", - desc: "Loopback server callback was invoked without a url. This is unexpected.", - }, - noAuthCodeInResponse: { - code: "no_auth_code_in_response", - desc: "No auth code found in the server response. Please check your network trace to determine what happened.", - }, - noLoopbackServerExists: { - code: "no_loopback_server_exists", - desc: "No loopback server exists yet.", - }, - loopbackServerAlreadyExists: { - code: "loopback_server_already_exists", - desc: "Loopback server already exists. Cannot create another.", - }, - loopbackServerTimeout: { - code: "loopback_server_timeout", - desc: "Timed out waiting for auth code listener to be registered.", - }, - stateNotFoundError: { - code: "state_not_found", - desc: "State not found. Please verify that the request originated from msal.", - }, - thumbprintMissing: { - code: "thumbprint_missing_from_client_certificate", - desc: "Client certificate does not contain a SHA-1 or SHA-256 thumbprint.", - }, -}; - -export class NodeAuthError extends AuthError { - constructor(errorCode: string, errorMessage?: string) { - super(errorCode, errorMessage); - this.name = "NodeAuthError"; - } - - /** - * Creates an error thrown if loopback server address is of type string. - */ - static createInvalidLoopbackAddressTypeError(): NodeAuthError { - return new NodeAuthError( - NodeAuthErrorMessage.invalidLoopbackAddressType.code, - `${NodeAuthErrorMessage.invalidLoopbackAddressType.desc}` - ); - } - - /** - * Creates an error thrown if the loopback server is unable to get a url. - */ - static createUnableToLoadRedirectUrlError(): NodeAuthError { - return new NodeAuthError( - NodeAuthErrorMessage.unableToLoadRedirectUri.code, - `${NodeAuthErrorMessage.unableToLoadRedirectUri.desc}` - ); - } - - /** - * Creates an error thrown if the server response does not contain an auth code. - */ - static createNoAuthCodeInResponseError(): NodeAuthError { - return new NodeAuthError( - NodeAuthErrorMessage.noAuthCodeInResponse.code, - `${NodeAuthErrorMessage.noAuthCodeInResponse.desc}` - ); - } - - /** - * Creates an error thrown if the loopback server has not been spun up yet. - */ - static createNoLoopbackServerExistsError(): NodeAuthError { - return new NodeAuthError( - NodeAuthErrorMessage.noLoopbackServerExists.code, - `${NodeAuthErrorMessage.noLoopbackServerExists.desc}` - ); - } - - /** - * Creates an error thrown if a loopback server already exists when attempting to create another one. - */ - static createLoopbackServerAlreadyExistsError(): NodeAuthError { - return new NodeAuthError( - NodeAuthErrorMessage.loopbackServerAlreadyExists.code, - `${NodeAuthErrorMessage.loopbackServerAlreadyExists.desc}` - ); - } - - /** - * Creates an error thrown if the loopback server times out registering the auth code listener. - */ - static createLoopbackServerTimeoutError(): NodeAuthError { - return new NodeAuthError( - NodeAuthErrorMessage.loopbackServerTimeout.code, - `${NodeAuthErrorMessage.loopbackServerTimeout.desc}` - ); - } - - /** - * Creates an error thrown when the state is not present. - */ - static createStateNotFoundError(): NodeAuthError { - return new NodeAuthError( - NodeAuthErrorMessage.stateNotFoundError.code, - NodeAuthErrorMessage.stateNotFoundError.desc - ); - } - - /** - * Creates an error thrown when client certificate was provided, but neither the SHA-1 or SHA-256 thumbprints were provided - */ - static createThumbprintMissingError(): NodeAuthError { - return new NodeAuthError( - NodeAuthErrorMessage.thumbprintMissing.code, - NodeAuthErrorMessage.thumbprintMissing.desc - ); - } -} diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/src/index.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/src/index.ts deleted file mode 100644 index 4e66540..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/src/index.ts +++ /dev/null @@ -1,133 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -/** - * @packageDocumentation - * @module @azure/msal-node - */ - -/** - * Warning: This set of exports is purely intended to be used by other MSAL libraries, and should be considered potentially unstable. We strongly discourage using them directly, you do so at your own risk. - * Breaking changes to these APIs will be shipped under a minor version, instead of a major version. - */ - -import * as internals from "./internals.js"; -export { internals }; - -// Interfaces -export { IPublicClientApplication } from "./client/IPublicClientApplication.js"; -export { IConfidentialClientApplication } from "./client/IConfidentialClientApplication.js"; -export { ITokenCache } from "./cache/ITokenCache.js"; -export { ICacheClient } from "./cache/distributed/ICacheClient.js"; -export { IPartitionManager } from "./cache/distributed/IPartitionManager.js"; -export { ILoopbackClient } from "./network/ILoopbackClient.js"; - -// Clients and Configuration -export { PublicClientApplication } from "./client/PublicClientApplication.js"; -export { ConfidentialClientApplication } from "./client/ConfidentialClientApplication.js"; -export { ClientApplication } from "./client/ClientApplication.js"; -export { ClientCredentialClient } from "./client/ClientCredentialClient.js"; -export { DeviceCodeClient } from "./client/DeviceCodeClient.js"; -export { OnBehalfOfClient } from "./client/OnBehalfOfClient.js"; -export { ManagedIdentityApplication } from "./client/ManagedIdentityApplication.js"; -export { UsernamePasswordClient } from "./client/UsernamePasswordClient.js"; - -export { - Configuration, - ManagedIdentityConfiguration, - ManagedIdentityIdParams, - NodeAuthOptions, - NodeSystemOptions, - BrokerOptions, - NodeTelemetryOptions, - CacheOptions, -} from "./config/Configuration.js"; -export { ClientAssertion } from "./client/ClientAssertion.js"; - -// Cache and Storage -export { TokenCache } from "./cache/TokenCache.js"; -export { NodeStorage } from "./cache/NodeStorage.js"; -export { - CacheKVStore, - JsonCache, - InMemoryCache, - SerializedAccountEntity, - SerializedIdTokenEntity, - SerializedAccessTokenEntity, - SerializedAppMetadataEntity, - SerializedRefreshTokenEntity, -} from "./cache/serializer/SerializerTypes.js"; -export { DistributedCachePlugin } from "./cache/distributed/DistributedCachePlugin.js"; - -// Constants -export { ManagedIdentitySourceNames } from "./utils/Constants.js"; - -// Crypto -export { CryptoProvider } from "./crypto/CryptoProvider.js"; - -// Request objects -export type { AuthorizationCodeRequest } from "./request/AuthorizationCodeRequest.js"; -export type { AuthorizationUrlRequest } from "./request/AuthorizationUrlRequest.js"; -export type { ClientCredentialRequest } from "./request/ClientCredentialRequest.js"; -export type { DeviceCodeRequest } from "./request/DeviceCodeRequest.js"; -export type { OnBehalfOfRequest } from "./request/OnBehalfOfRequest.js"; -export type { UsernamePasswordRequest } from "./request/UsernamePasswordRequest.js"; -export type { RefreshTokenRequest } from "./request/RefreshTokenRequest.js"; -export type { SilentFlowRequest } from "./request/SilentFlowRequest.js"; -export type { InteractiveRequest } from "./request/InteractiveRequest.js"; -export type { SignOutRequest } from "./request/SignOutRequest.js"; -export type { ManagedIdentityRequestParams } from "./request/ManagedIdentityRequestParams.js"; - -// Common Object Formats -export { - // Request - PromptValue, - ResponseMode, - AuthorizationCodePayload, - // Response - AuthenticationResult, - ServerAuthorizationCodeResponse, - IdTokenClaims, - // Cache - AccountInfo, - ValidCacheType, - // Error - AuthError, - AuthErrorMessage, - AuthErrorCodes, - ClientAuthError, - ClientAuthErrorCodes, - ClientAuthErrorMessage, - ClientConfigurationError, - ClientConfigurationErrorCodes, - ClientConfigurationErrorMessage, - InteractionRequiredAuthError, - InteractionRequiredAuthErrorCodes, - InteractionRequiredAuthErrorMessage, - ServerError, - // Network Interface - INetworkModule, - NetworkRequestOptions, - NetworkResponse, - // Logger - Logger, - LogLevel, - // ProtocolMode enum - ProtocolMode, - ICachePlugin, - TokenCacheContext, - ISerializableTokenCache, - // AzureCloudInstance enum - AzureCloudInstance, - AzureCloudOptions, - // IAppTokenProvider - IAppTokenProvider, - AppTokenProviderParameters, - AppTokenProviderResult, - INativeBrokerPlugin, - ClientAssertionCallback, -} from "@azure/msal-common/node"; - -export { version } from "./packageMetadata.js"; diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/src/internals.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/src/internals.ts deleted file mode 100644 index 03aa1f9..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/src/internals.ts +++ /dev/null @@ -1,12 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -/** - * Warning: This set of exports is purely intended to be used by other MSAL libraries, and should be considered potentially unstable. We strongly discourage using them directly, you do so at your own risk. - * Breaking changes to these APIs will be shipped under a minor version, instead of a major version. - */ - -export { Serializer } from "./cache/serializer/Serializer.js"; -export { Deserializer } from "./cache/serializer/Deserializer.js"; diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/src/network/HttpClient.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/src/network/HttpClient.ts deleted file mode 100644 index 7c02321..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/src/network/HttpClient.ts +++ /dev/null @@ -1,425 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import { - INetworkModule, - NetworkRequestOptions, - NetworkResponse, - HttpStatus, -} from "@azure/msal-common/node"; -import { HttpMethod, Constants, ProxyStatus } from "../utils/Constants.js"; -import { NetworkUtils } from "../utils/NetworkUtils.js"; -import http from "http"; -import https from "https"; - -/** - * This class implements the API for network requests. - */ -export class HttpClient implements INetworkModule { - private proxyUrl: string; - private customAgentOptions: http.AgentOptions | https.AgentOptions; - - constructor( - proxyUrl?: string, - customAgentOptions?: http.AgentOptions | https.AgentOptions - ) { - this.proxyUrl = proxyUrl || ""; - this.customAgentOptions = customAgentOptions || {}; - } - - /** - * Http Get request - * @param url - * @param options - */ - async sendGetRequestAsync( - url: string, - options?: NetworkRequestOptions, - timeout?: number - ): Promise> { - if (this.proxyUrl) { - return networkRequestViaProxy( - url, - this.proxyUrl, - HttpMethod.GET, - options, - this.customAgentOptions as http.AgentOptions, - timeout - ); - } else { - return networkRequestViaHttps( - url, - HttpMethod.GET, - options, - this.customAgentOptions as https.AgentOptions, - timeout - ); - } - } - - /** - * Http Post request - * @param url - * @param options - */ - async sendPostRequestAsync( - url: string, - options?: NetworkRequestOptions - ): Promise> { - if (this.proxyUrl) { - return networkRequestViaProxy( - url, - this.proxyUrl, - HttpMethod.POST, - options, - this.customAgentOptions as http.AgentOptions - ); - } else { - return networkRequestViaHttps( - url, - HttpMethod.POST, - options, - this.customAgentOptions as https.AgentOptions - ); - } - } -} - -const networkRequestViaProxy = ( - destinationUrlString: string, - proxyUrlString: string, - httpMethod: string, - options?: NetworkRequestOptions, - agentOptions?: http.AgentOptions, - timeout?: number -): Promise> => { - const destinationUrl = new URL(destinationUrlString); - const proxyUrl = new URL(proxyUrlString); - - // "method: connect" must be used to establish a connection to the proxy - const headers = options?.headers || ({} as Record); - const tunnelRequestOptions: https.RequestOptions = { - host: proxyUrl.hostname, - port: proxyUrl.port, - method: "CONNECT", - path: destinationUrl.hostname, - headers: headers, - }; - - if (agentOptions && Object.keys(agentOptions).length) { - tunnelRequestOptions.agent = new http.Agent(agentOptions); - } - - // compose a request string for the socket - let postRequestStringContent: string = ""; - if (httpMethod === HttpMethod.POST) { - const body = options?.body || ""; - postRequestStringContent = - "Content-Type: application/x-www-form-urlencoded\r\n" + - `Content-Length: ${body.length}\r\n` + - `\r\n${body}`; - } else { - // optional timeout is only for get requests (regionDiscovery, for example) - if (timeout) { - tunnelRequestOptions.timeout = timeout; - } - } - const outgoingRequestString = - `${httpMethod.toUpperCase()} ${destinationUrl.href} HTTP/1.1\r\n` + - `Host: ${destinationUrl.host}\r\n` + - "Connection: close\r\n" + - postRequestStringContent + - "\r\n"; - - return new Promise>((resolve, reject) => { - const request = http.request(tunnelRequestOptions); - - if (timeout) { - request.on("timeout", () => { - request.destroy(); - reject(new Error("Request time out")); - }); - } - - request.end(); - - // establish connection to the proxy - request.on("connect", (response, socket) => { - const proxyStatusCode = - response?.statusCode || ProxyStatus.SERVER_ERROR; - if ( - proxyStatusCode < ProxyStatus.SUCCESS_RANGE_START || - proxyStatusCode > ProxyStatus.SUCCESS_RANGE_END - ) { - request.destroy(); - socket.destroy(); - reject( - new Error( - `Error connecting to proxy. Http status code: ${ - response.statusCode - }. Http status message: ${ - response?.statusMessage || "Unknown" - }` - ) - ); - } - - // make a request over an HTTP tunnel - socket.write(outgoingRequestString); - - const data: Buffer[] = []; - socket.on("data", (chunk) => { - data.push(chunk); - }); - - socket.on("end", () => { - // combine all received buffer streams into one buffer, and then into a string - const dataString = Buffer.concat([...data]).toString(); - - // separate each line into it's own entry in an arry - const dataStringArray = dataString.split("\r\n"); - // the first entry will contain the statusCode and statusMessage - const httpStatusCode = parseInt( - dataStringArray[0].split(" ")[1] - ); - // remove "HTTP/1.1" and the status code to get the status message - const statusMessage = dataStringArray[0] - .split(" ") - .slice(2) - .join(" "); - // the last entry will contain the body - const body = dataStringArray[dataStringArray.length - 1]; - - // everything in between the first and last entries are the headers - const headersArray = dataStringArray.slice( - 1, - dataStringArray.length - 2 - ); - - // build an object out of all the headers - const entries = new Map(); - headersArray.forEach((header) => { - /** - * the header might look like "Content-Length: 1531", but that is just a string - * it needs to be converted to a key/value pair - * split the string at the first instance of ":" - * there may be more than one ":" if the value of the header is supposed to be a JSON object - */ - const headerKeyValue = header.split(new RegExp(/:\s(.*)/s)); - const headerKey = headerKeyValue[0]; - let headerValue = headerKeyValue[1]; - - // check if the value of the header is supposed to be a JSON object - try { - const object = JSON.parse(headerValue); - - // if it is, then convert it from a string to a JSON object - if (object && typeof object === "object") { - headerValue = object; - } - } catch (e) { - // otherwise, leave it as a string - } - - entries.set(headerKey, headerValue); - }); - const headers = Object.fromEntries(entries); - - const parsedHeaders = headers as Record; - const networkResponse = NetworkUtils.getNetworkResponse( - parsedHeaders, - parseBody( - httpStatusCode, - statusMessage, - parsedHeaders, - body - ) as T, - httpStatusCode - ); - - if ( - (httpStatusCode < HttpStatus.SUCCESS_RANGE_START || - httpStatusCode > HttpStatus.SUCCESS_RANGE_END) && - // do not destroy the request for the device code flow - networkResponse.body["error"] !== - Constants.AUTHORIZATION_PENDING - ) { - request.destroy(); - } - resolve(networkResponse); - }); - - socket.on("error", (chunk) => { - request.destroy(); - socket.destroy(); - reject(new Error(chunk.toString())); - }); - }); - - request.on("error", (chunk) => { - request.destroy(); - reject(new Error(chunk.toString())); - }); - }); -}; - -const networkRequestViaHttps = ( - urlString: string, - httpMethod: string, - options?: NetworkRequestOptions, - agentOptions?: https.AgentOptions, - timeout?: number -): Promise> => { - const isPostRequest = httpMethod === HttpMethod.POST; - const body: string = options?.body || ""; - - const url = new URL(urlString); - const headers = options?.headers || ({} as Record); - const customOptions: https.RequestOptions = { - method: httpMethod, - headers: headers, - ...NetworkUtils.urlToHttpOptions(url), - }; - - if (agentOptions && Object.keys(agentOptions).length) { - customOptions.agent = new https.Agent(agentOptions); - } - - if (isPostRequest) { - // needed for post request to work - customOptions.headers = { - ...customOptions.headers, - "Content-Length": body.length, - }; - } else { - // optional timeout is only for get requests (regionDiscovery, for example) - if (timeout) { - customOptions.timeout = timeout; - } - } - - return new Promise>((resolve, reject) => { - let request: http.ClientRequest; - // managed identity sources use http instead of https - if (customOptions.protocol === "http:") { - request = http.request(customOptions); - } else { - request = https.request(customOptions); - } - - if (isPostRequest) { - request.write(body); - } - - if (timeout) { - request.on("timeout", () => { - request.destroy(); - reject(new Error("Request time out")); - }); - } - - request.end(); - - request.on("response", (response) => { - const headers = response.headers; - const statusCode = response.statusCode as number; - const statusMessage = response.statusMessage; - - const data: Buffer[] = []; - response.on("data", (chunk) => { - data.push(chunk); - }); - - response.on("end", () => { - // combine all received buffer streams into one buffer, and then into a string - const body = Buffer.concat([...data]).toString(); - - const parsedHeaders = headers as Record; - const networkResponse = NetworkUtils.getNetworkResponse( - parsedHeaders, - parseBody( - statusCode, - statusMessage, - parsedHeaders, - body - ) as T, - statusCode - ); - - if ( - (statusCode < HttpStatus.SUCCESS_RANGE_START || - statusCode > HttpStatus.SUCCESS_RANGE_END) && - // do not destroy the request for the device code flow - networkResponse.body["error"] !== - Constants.AUTHORIZATION_PENDING - ) { - request.destroy(); - } - resolve(networkResponse); - }); - }); - - request.on("error", (chunk) => { - request.destroy(); - reject(new Error(chunk.toString())); - }); - }); -}; - -/** - * Check if extra parsing is needed on the repsonse from the server - * @param statusCode {number} the status code of the response from the server - * @param statusMessage {string | undefined} the status message of the response from the server - * @param headers {Record} the headers of the response from the server - * @param body {string} the body from the response of the server - * @returns {Object} JSON parsed body or error object - */ -const parseBody = ( - statusCode: number, - statusMessage: string | undefined, - headers: Record, - body: string -) => { - /* - * Informational responses (100 – 199) - * Successful responses (200 – 299) - * Redirection messages (300 – 399) - * Client error responses (400 – 499) - * Server error responses (500 – 599) - */ - - let parsedBody; - try { - parsedBody = JSON.parse(body); - } catch (error) { - let errorType; - let errorDescriptionHelper; - if ( - statusCode >= HttpStatus.CLIENT_ERROR_RANGE_START && - statusCode <= HttpStatus.CLIENT_ERROR_RANGE_END - ) { - errorType = "client_error"; - errorDescriptionHelper = "A client"; - } else if ( - statusCode >= HttpStatus.SERVER_ERROR_RANGE_START && - statusCode <= HttpStatus.SERVER_ERROR_RANGE_END - ) { - errorType = "server_error"; - errorDescriptionHelper = "A server"; - } else { - errorType = "unknown_error"; - errorDescriptionHelper = "An unknown"; - } - - parsedBody = { - error: errorType, - error_description: `${errorDescriptionHelper} error occured.\nHttp status code: ${statusCode}\nHttp status message: ${ - statusMessage || "Unknown" - }\nHeaders: ${JSON.stringify(headers)}`, - }; - } - - return parsedBody; -}; diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/src/network/HttpClientWithRetries.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/src/network/HttpClientWithRetries.ts deleted file mode 100644 index 61db37e..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/src/network/HttpClientWithRetries.ts +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import { - HeaderNames, - INetworkModule, - NetworkRequestOptions, - NetworkResponse, -} from "@azure/msal-common/node"; -import { IHttpRetryPolicy } from "../retry/IHttpRetryPolicy.js"; -import { HttpMethod } from "../utils/Constants.js"; - -export class HttpClientWithRetries implements INetworkModule { - private httpClientNoRetries: INetworkModule; - private retryPolicy: IHttpRetryPolicy; - - constructor( - httpClientNoRetries: INetworkModule, - retryPolicy: IHttpRetryPolicy - ) { - this.httpClientNoRetries = httpClientNoRetries; - this.retryPolicy = retryPolicy; - } - - private async sendNetworkRequestAsyncHelper( - httpMethod: HttpMethod, - url: string, - options?: NetworkRequestOptions - ): Promise> { - if (httpMethod === HttpMethod.GET) { - return this.httpClientNoRetries.sendGetRequestAsync(url, options); - } else { - return this.httpClientNoRetries.sendPostRequestAsync(url, options); - } - } - - private async sendNetworkRequestAsync( - httpMethod: HttpMethod, - url: string, - options?: NetworkRequestOptions - ): Promise> { - // the underlying network module (custom or HttpClient) will make the call - let response: NetworkResponse = - await this.sendNetworkRequestAsyncHelper(httpMethod, url, options); - - let currentRetry: number = 0; - while ( - await this.retryPolicy.pauseForRetry( - response.status, - currentRetry, - response.headers[HeaderNames.RETRY_AFTER] - ) - ) { - response = await this.sendNetworkRequestAsyncHelper( - httpMethod, - url, - options - ); - currentRetry++; - } - - return response; - } - - public async sendGetRequestAsync( - url: string, - options?: NetworkRequestOptions - ): Promise> { - return this.sendNetworkRequestAsync(HttpMethod.GET, url, options); - } - - public async sendPostRequestAsync( - url: string, - options?: NetworkRequestOptions - ): Promise> { - return this.sendNetworkRequestAsync(HttpMethod.POST, url, options); - } -} diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/src/network/ILoopbackClient.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/src/network/ILoopbackClient.ts deleted file mode 100644 index 2933b78..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/src/network/ILoopbackClient.ts +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import { ServerAuthorizationCodeResponse } from "@azure/msal-common/node"; - -/** - * Interface for LoopbackClient allowing to replace the default loopback server with a custom implementation. - * @public - */ -export interface ILoopbackClient { - listenForAuthCode( - successTemplate?: string, - errorTemplate?: string - ): Promise; - getRedirectUri(): string; - closeServer(): void; -} diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/src/network/LoopbackClient.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/src/network/LoopbackClient.ts deleted file mode 100644 index fc6877a..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/src/network/LoopbackClient.ts +++ /dev/null @@ -1,120 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import { - Constants as CommonConstants, - ServerAuthorizationCodeResponse, - HttpStatus, - UrlUtils, -} from "@azure/msal-common/node"; -import http from "http"; -import { NodeAuthError } from "../error/NodeAuthError.js"; -import { Constants } from "../utils/Constants.js"; -import { ILoopbackClient } from "./ILoopbackClient.js"; - -export class LoopbackClient implements ILoopbackClient { - private server: http.Server | undefined; - - /** - * Spins up a loopback server which returns the server response when the localhost redirectUri is hit - * @param successTemplate - * @param errorTemplate - * @returns - */ - async listenForAuthCode( - successTemplate?: string, - errorTemplate?: string - ): Promise { - if (this.server) { - throw NodeAuthError.createLoopbackServerAlreadyExistsError(); - } - - return new Promise( - (resolve, reject) => { - this.server = http.createServer( - (req: http.IncomingMessage, res: http.ServerResponse) => { - const url = req.url; - if (!url) { - res.end( - errorTemplate || - "Error occurred loading redirectUrl" - ); - reject( - NodeAuthError.createUnableToLoadRedirectUrlError() - ); - return; - } else if (url === CommonConstants.FORWARD_SLASH) { - res.end( - successTemplate || - "Auth code was successfully acquired. You can close this window now." - ); - return; - } - - const redirectUri = this.getRedirectUri(); - const parsedUrl = new URL(url, redirectUri); - const authCodeResponse = - UrlUtils.getDeserializedResponse( - parsedUrl.search - ) || {}; - if (authCodeResponse.code) { - res.writeHead(HttpStatus.REDIRECT, { - location: redirectUri, - }); // Prevent auth code from being saved in the browser history - res.end(); - } - if (authCodeResponse.error) { - res.end( - errorTemplate || - `Error occurred: ${authCodeResponse.error}` - ); - } - resolve(authCodeResponse); - } - ); - this.server.listen(0, "127.0.0.1"); // Listen on any available port - } - ); - } - - /** - * Get the port that the loopback server is running on - * @returns - */ - getRedirectUri(): string { - if (!this.server || !this.server.listening) { - throw NodeAuthError.createNoLoopbackServerExistsError(); - } - - const address = this.server.address(); - if (!address || typeof address === "string" || !address.port) { - this.closeServer(); - throw NodeAuthError.createInvalidLoopbackAddressTypeError(); - } - - const port = address && address.port; - - return `${Constants.HTTP_PROTOCOL}${Constants.LOCALHOST}:${port}`; - } - - /** - * Close the loopback server - */ - closeServer(): void { - if (this.server) { - // Only stops accepting new connections, server will close once open/idle connections are closed. - this.server.close(); - - if (typeof this.server.closeAllConnections === "function") { - /* - * Close open/idle connections. This API is available in Node versions 18.2 and higher - */ - this.server.closeAllConnections(); - } - this.server.unref(); - this.server = undefined; - } - } -} diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/src/packageMetadata.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/src/packageMetadata.ts deleted file mode 100644 index c55b883..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/src/packageMetadata.ts +++ /dev/null @@ -1,3 +0,0 @@ -/* eslint-disable header/header */ -export const name = "@azure/msal-node"; -export const version = "2.16.3"; diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/src/request/AuthorizationCodeRequest.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/src/request/AuthorizationCodeRequest.ts deleted file mode 100644 index 2e7f28b..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/src/request/AuthorizationCodeRequest.ts +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import { CommonAuthorizationCodeRequest } from "@azure/msal-common/node"; - -/** - * Request object passed by user to acquire a token from the server exchanging a valid authorization code (second leg of OAuth2.0 Authorization Code flow) - * - * - scopes - Array of scopes the application is requesting access to. - * - claims - A stringified claims request which will be added to all /authorize and /token calls - * - authority: - URL of the authority, the security token service (STS) from which MSAL will acquire tokens. If authority is set on client application object, this will override that value. Overriding the value will cause for authority validation to happen each time. If the same authority will be used for all request, set on the application object instead of the requests. - * - correlationId - Unique GUID set per request to trace a request end-to-end for telemetry purposes. - * - redirectUri - The redirect URI of your app, where the authority will redirect to after the user inputs credentials and consents. It must exactly match one of the redirect URIs you registered in the portal. - * - tokenQueryParameters - String to string map of custom query parameters added to the /token call - * - code - The authorization_code that the user acquired in the first leg of the flow. - * - codeVerifier - The same code_verifier that was used to obtain the authorization_code. Required if PKCE was used in the authorization code grant request.For more information, see the PKCE RFC: https://tools.ietf.org/html/rfc7636 - * - state - Unique GUID generated by the user that is cached by the user and sent to the server during the first leg of the flow. This string is sent back by the server with the authorization code. The user cached state is then compared with the state received from the server to mitigate the risk of CSRF attacks. See https://datatracker.ietf.org/doc/html/rfc6819#section-3.6. - * @public - */ -export type AuthorizationCodeRequest = Partial< - Omit< - CommonAuthorizationCodeRequest, - | "scopes" - | "redirectUri" - | "code" - | "authenticationScheme" - | "resourceRequestMethod" - | "resourceRequestUri" - | "requestedClaimsHash" - | "storeInCache" - > -> & { - scopes: Array; - redirectUri: string; - code: string; - state?: string; -}; diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/src/request/AuthorizationUrlRequest.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/src/request/AuthorizationUrlRequest.ts deleted file mode 100644 index 4327450..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/src/request/AuthorizationUrlRequest.ts +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import { CommonAuthorizationUrlRequest } from "@azure/msal-common/node"; - -/** - * Request object passed by user to retrieve a Code from the server (first leg of authorization code grant flow) - * - * - scopes - Array of scopes the application is requesting access to. - * - claims - A stringified claims request which will be added to all /authorize and /token calls - * - authority - Url of the authority which the application acquires tokens from. - * - correlationId - Unique GUID set per request to trace a request end-to-end for telemetry purposes. - * - redirectUri - The redirect URI where authentication responses can be received by your application. It must exactly match one of the redirect URIs registered in the Azure portal. - * - extraScopesToConsent - Scopes for a different resource when the user needs consent upfront. - * - responseMode - Specifies the method that should be used to send the authentication result to your app. Can be query, form_post, or fragment. If no value is passed in, it defaults to query. - * - codeChallenge - Used to secure authorization code grant via Proof of Key for Code Exchange (PKCE). For more information, see the PKCE RCF:https://tools.ietf.org/html/rfc7636 - * - codeChallengeMethod - The method used to encode the code verifier for the code challenge parameter. Can be "plain" or "S256". If excluded, code challenge is assumed to be plaintext. For more information, see the PKCE RCF: https://tools.ietf.org/html/rfc7636 - * - state - A value included in the request that is also returned in the token response. A randomly generated unique value is typically used for preventing cross site request forgery attacks. The state is also used to encode information about the user's state in the app before the authentication request occurred. - * - prompt - Indicates the type of user interaction that is required. - * login: will force the user to enter their credentials on that request, negating single-sign on - * none: will ensure that the user isn't presented with any interactive prompt. if request can't be completed via single-sign on, the endpoint will return an interaction_required error - * consent: will the trigger the OAuth consent dialog after the user signs in, asking the user to grant permissions to the app - * select_account: will interrupt single sign-=on providing account selection experience listing all the accounts in session or any remembered accounts or an option to choose to use a different account - * create: will direct the user to the account creation experience instead of the log in experience - * - account - AccountInfo obtained from a getAccount API. Will be used in certain scenarios to generate login_hint if both loginHint and sid params are not provided. - * - loginHint - Can be used to pre-fill the username/email address field of the sign-in page for the user, if you know the username/email address ahead of time. Often apps use this parameter during re-authentication, having already extracted the username from a previous sign-in using the preferred_username claim. - * - sid - Session ID, unique identifier for the session. Available as an optional claim on ID tokens. - * - domainHint - Provides a hint about the tenant or domain that the user should use to sign in. The value of the domain hint is a registered domain for the tenant. - * - extraQueryParameters - String to string map of custom query parameters added to the /authorize call - * - tokenQueryParameters - String to string map of custom query parameters added to the /token call - * - nonce - A value included in the request that is returned in the id token. A randomly generated unique value is typically used to mitigate replay attacks. - * @public - */ -export type AuthorizationUrlRequest = Partial< - Omit< - CommonAuthorizationUrlRequest, - | "scopes" - | "redirectUri" - | "resourceRequestMethod" - | "resourceRequestUri" - | "authenticationScheme" - | "requestedClaimsHash" - | "storeInCache" - > -> & { - scopes: Array; - redirectUri: string; -}; diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/src/request/ClientCredentialRequest.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/src/request/ClientCredentialRequest.ts deleted file mode 100644 index 6908dcd..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/src/request/ClientCredentialRequest.ts +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import { - ClientAssertionCallback, - CommonClientCredentialRequest, -} from "@azure/msal-common/node"; - -/** - * CommonClientCredentialRequest - * - scopes - Array of scopes the application is requesting access to. Typically contains only the .default scope for a single resource. See: https://learn.microsoft.com/azure/active-directory/develop/scopes-oidc#the-default-scope - * - authority - URL of the authority, the security token service (STS) from which MSAL will acquire tokens. - * - correlationId - Unique GUID set per request to trace a request end-to-end for telemetry purposes. - * - skipCache - Skip token cache lookup and force request to authority to get a a new token. Defaults to false. - * - clientAssertion - An assertion string or a callback function that returns an assertion string (both are Base64Url-encoded signed JWTs) used in the Client Credential flow - * - tokenQueryParameters - String to string map of custom query parameters added to the /token call - * @public - */ -export type ClientCredentialRequest = Partial< - Omit< - CommonClientCredentialRequest, - | "resourceRequestMethod" - | "resourceRequestUri" - | "requestedClaimsHash" - | "clientAssertion" - | "storeInCache" - > -> & { - clientAssertion?: string | ClientAssertionCallback; -}; diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/src/request/DeviceCodeRequest.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/src/request/DeviceCodeRequest.ts deleted file mode 100644 index 3966a72..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/src/request/DeviceCodeRequest.ts +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import { - CommonDeviceCodeRequest, - DeviceCodeResponse, -} from "@azure/msal-common/node"; - -/** - * Parameters for Oauth2 device code flow. - * - scopes - Array of scopes the application is requesting access to. - * - authority: - URL of the authority, the security token service (STS) from which MSAL will acquire tokens. If authority is set on client application object, this will override that value. Overriding the value will cause for authority validation to happen each time. If the same authority will be used for all request, set on the application object instead of the requests. - * - correlationId - Unique GUID set per request to trace a request end-to-end for telemetry purposes. - * - deviceCodeCallback - Callback containing device code response. Message should be shown to end user. End user can then navigate to the verification_uri, input the user_code, and input credentials. - * - cancel - Boolean to cancel polling of device code endpoint. While the user authenticates on a separate device, MSAL polls the the token endpoint of security token service for the interval specified in the device code response (usually 15 minutes). To stop polling and cancel the request, set cancel=true. - * - extraQueryParameters - String to string map of custom query parameters added to the query string - * @public - */ -export type DeviceCodeRequest = Partial< - Omit< - CommonDeviceCodeRequest, - | "scopes" - | "deviceCodeCallback" - | "resourceRequestMethod" - | "resourceRequestUri" - | "requestedClaimsHash" - | "storeInCache" - > -> & { - scopes: Array; - deviceCodeCallback: (response: DeviceCodeResponse) => void; -}; diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/src/request/InteractiveRequest.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/src/request/InteractiveRequest.ts deleted file mode 100644 index d78e8a8..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/src/request/InteractiveRequest.ts +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import { CommonAuthorizationUrlRequest } from "@azure/msal-common/node"; -import { ILoopbackClient } from "../network/ILoopbackClient.js"; - -/** - * Request object passed by user to configure acquireTokenInteractive API - * - * - openBrowser - Function to open a browser instance on user's system. - * - scopes - Array of scopes the application is requesting access to. - * - successTemplate: - Template to be displayed on the opened browser instance upon successful token acquisition. - * - errorTemplate - Template to be displayed on the opened browser instance upon token acquisition failure. - * - windowHandle - Used in native broker flows to properly parent the native broker window - * - loopbackClient - Custom implementation for a loopback server to listen for authorization code response. - * @public - */ -export type InteractiveRequest = Partial< - Omit< - CommonAuthorizationUrlRequest, - "scopes" | "redirectUri" | "requestedClaimsHash" | "storeInCache" - > -> & { - openBrowser: (url: string) => Promise; - scopes?: Array; - successTemplate?: string; - errorTemplate?: string; - windowHandle?: Buffer; // Relevant only to brokered requests - loopbackClient?: ILoopbackClient; -}; diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/src/request/ManagedIdentityRequest.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/src/request/ManagedIdentityRequest.ts deleted file mode 100644 index a99ae12..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/src/request/ManagedIdentityRequest.ts +++ /dev/null @@ -1,15 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import { CommonClientCredentialRequest } from "@azure/msal-common/node"; -import { ManagedIdentityRequestParams } from "./ManagedIdentityRequestParams.js"; - -/** - * ManagedIdentityRequest - * - forceRefresh - forces managed identity requests to skip the cache and make network calls if true - * - resource - resource requested to access the protected API. It should be of the form "{ResourceIdUri}" or {ResourceIdUri/.default}. For instance https://management.azure.net or, for Microsoft Graph, https://graph.microsoft.com/.default - */ -export type ManagedIdentityRequest = ManagedIdentityRequestParams & - CommonClientCredentialRequest; diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/src/request/ManagedIdentityRequestParams.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/src/request/ManagedIdentityRequestParams.ts deleted file mode 100644 index 9ba9ef4..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/src/request/ManagedIdentityRequestParams.ts +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -/** - * ManagedIdentityRequest - * - claims - a stringified claims request which will be used to determine whether or not the cache should be skipped - * - forceRefresh - forces managed identity requests to skip the cache and make network calls if true - * - resource - resource requested to access the protected API. It should be of the form "ResourceIdUri" or "ResourceIdUri/.default". For instance https://management.azure.net or, for Microsoft Graph, https://graph.microsoft.com/.default - * @public - */ -export type ManagedIdentityRequestParams = { - claims?: string; - forceRefresh?: boolean; - resource: string; -}; diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/src/request/OnBehalfOfRequest.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/src/request/OnBehalfOfRequest.ts deleted file mode 100644 index 6fe0572..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/src/request/OnBehalfOfRequest.ts +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import { CommonOnBehalfOfRequest } from "@azure/msal-common/node"; - -/** - * - scopes - Array of scopes the application is requesting access to. - * - authority - URL of the authority, the security token service (STS) from which MSAL will acquire tokens. - * - correlationId - Unique GUID set per request to trace a request end-to-end for telemetry purposes. - * - oboAssertion - The access token that was sent to the middle-tier API. This token must have an audience of the app making this OBO request. - * - skipCache - Skip token cache lookup and force request to authority to get a a new token. Defaults to false. - * - tokenQueryParameters - String to string map of custom query parameters added to the /token call - * @public - */ -export type OnBehalfOfRequest = Partial< - Omit< - CommonOnBehalfOfRequest, - | "oboAssertion" - | "scopes" - | "resourceRequestMethod" - | "resourceRequestUri" - | "requestedClaimsHash" - | "storeInCache" - > -> & { - oboAssertion: string; - scopes: Array; -}; diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/src/request/RefreshTokenRequest.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/src/request/RefreshTokenRequest.ts deleted file mode 100644 index 8a2472b..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/src/request/RefreshTokenRequest.ts +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import { CommonRefreshTokenRequest } from "@azure/msal-common/node"; - -/** - * CommonRefreshTokenRequest - * - scopes - Array of scopes the application is requesting access to. - * - claims - A stringified claims request which will be added to all /authorize and /token calls - * - authority - URL of the authority, the security token service (STS) from which MSAL will acquire tokens. - * - correlationId - Unique GUID set per request to trace a request end-to-end for telemetry purposes. - * - refreshToken - A refresh token returned from a previous request to the Identity provider. - * - tokenQueryParameters - String to string map of custom query parameters added to the /token call - * - forceCache - Force MSAL to cache a refresh token flow response when there is no account in the cache. Used for migration scenarios. - * @public - */ -export type RefreshTokenRequest = Partial< - Omit< - CommonRefreshTokenRequest, - | "scopes" - | "refreshToken" - | "authenticationScheme" - | "resourceRequestMethod" - | "resourceRequestUri" - | "requestedClaimsHash" - | "storeInCache" - > -> & { - scopes: Array; - refreshToken: string; - forceCache?: boolean; -}; diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/src/request/SignOutRequest.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/src/request/SignOutRequest.ts deleted file mode 100644 index 4551b92..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/src/request/SignOutRequest.ts +++ /dev/null @@ -1,12 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import { AccountInfo } from "@azure/msal-common/node"; - -/** @public */ -export type SignOutRequest = { - account: AccountInfo; - correlationId?: string; -}; diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/src/request/SilentFlowRequest.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/src/request/SilentFlowRequest.ts deleted file mode 100644 index aef948c..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/src/request/SilentFlowRequest.ts +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import { AccountInfo, CommonSilentFlowRequest } from "@azure/msal-common/node"; - -/** - * SilentFlow parameters passed by the user to retrieve credentials silently - * - scopes - Array of scopes the application is requesting access to. - * - claims - A stringified claims request which will be added to all /authorize and /token calls. When included on a silent request, cache lookup will be skipped and token will be refreshed. - * - authority - Url of the authority which the application acquires tokens from. - * - correlationId - Unique GUID set per request to trace a request end-to-end for telemetry purposes. - * - tokenQueryParameters - String to string map of custom query parameters added to the /token call - * - account - Account entity to lookup the credentials. - * - forceRefresh - Forces silent requests to make network calls if true. - * @public - */ -export type SilentFlowRequest = Partial< - Omit< - CommonSilentFlowRequest, - "account" | "scopes" | "requestedClaimsHash" | "storeInCache" - > -> & { - account: AccountInfo; - scopes: Array; -}; diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/src/request/UsernamePasswordRequest.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/src/request/UsernamePasswordRequest.ts deleted file mode 100644 index 2296fec..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/src/request/UsernamePasswordRequest.ts +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import { CommonUsernamePasswordRequest } from "@azure/msal-common/node"; - -/** - * UsernamePassword parameters passed by the user to retrieve credentials - * Note: The latest OAuth 2.0 Security Best Current Practice disallows the password grant entirely. This flow is added for internal testing. - * - * - scopes - Array of scopes the application is requesting access to. - * - claims - A stringified claims request which will be added to all /authorize and /token calls. When included on a silent request, cache lookup will be skipped and token will be refreshed. - * - authority - Url of the authority which the application acquires tokens from. - * - correlationId - Unique GUID set per request to trace a request end-to-end for telemetry purposes. - * - username - username of the client - * - password - credentials - * - tokenQueryParameters - String to string map of custom query parameters added to the /token call - * @public - */ -export type UsernamePasswordRequest = Partial< - Omit< - CommonUsernamePasswordRequest, - | "scopes" - | "resourceRequestMethod" - | "resourceRequestUri" - | "username" - | "password" - | "requestedClaimsHash" - | "storeInCache" - > -> & { - scopes: Array; - username: string; - password: string; -}; diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/src/response/ManagedIdentityTokenResponse.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/src/response/ManagedIdentityTokenResponse.ts deleted file mode 100644 index d31ea41..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/src/response/ManagedIdentityTokenResponse.ts +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import { AuthenticationScheme } from "@azure/msal-common/node"; - -/** - * Deserialized response object from server managed identity request. - * - * In case of success: - * - access_token - The requested access token. When called via a secured REST API, the token is embedded in the Authorization request header field as a "bearer" token, allowing the API to authenticate the caller - * - client_id - A unique identifier generated by Azure AD for the Azure Resource. The Client ID is a GUID value that uniquely identifies the application and its configuration within the identity platform - * - expires_on - The timespan when the access token expires. The date is represented as the number of seconds from "1970-01-01T0:0:0Z UTC" (corresponds to the token's exp claim) - * - resource - The resource the access token was requested for. It matches the resource query string parameter of the request - * - token_type - The type of token returned by the Managed Identity endpoint. It's a "Bearer" access token, which means the resource can give access to the bearer of this token - * - * In case of error: - * - message: A specific error message that can help a developer identify the root cause of an authentication error. - * - correlationId: A unique identifier for the request that can help in diagnostics across components. - */ -export type ManagedIdentityTokenResponse = { - // success - access_token?: string; - client_id?: string; - expires_on?: number; // will be converted to expires_in - resource?: string; // equivalent to ServerAuthorizationTokenResponse's "scope" field - token_type?: AuthenticationScheme; - - // error - - /* - * (Web/Function) App Service - * 500 errors can return this from all MI sources as well - */ - message?: string; - correlationId?: string; - - // IMDS, Azure Arc, Service Fabric (unconfirmed) - error?: string | ErrorObject; - error_description?: string; - error_codes?: Array; - correlation_id?: string; - timestamp?: string; - trace_id?: string; -}; - -/* - * This is the only error property that exists for Cloud Shell - * It can also be the only thing App Service will return - */ -export type ErrorObject = { - code: string; - message: string; -}; diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/src/retry/IHttpRetryPolicy.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/src/retry/IHttpRetryPolicy.ts deleted file mode 100644 index 2701b5b..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/src/retry/IHttpRetryPolicy.ts +++ /dev/null @@ -1,18 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import http from "http"; - -export interface IHttpRetryPolicy { - /* - * if retry conditions occur, pauses and returns true - * otherwise return false - */ - pauseForRetry( - httpStatusCode: number, - currentRetry: number, - retryAfterHeader: http.IncomingHttpHeaders["retry-after"] - ): Promise; -} diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/src/retry/LinearRetryPolicy.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/src/retry/LinearRetryPolicy.ts deleted file mode 100644 index cabbd6d..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/src/retry/LinearRetryPolicy.ts +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import http from "http"; -import { IHttpRetryPolicy } from "./IHttpRetryPolicy.js"; - -export class LinearRetryPolicy implements IHttpRetryPolicy { - maxRetries: number; - retryDelay: number; - httpStatusCodesToRetryOn: Array; - - constructor( - maxRetries: number, - retryDelay: number, - httpStatusCodesToRetryOn: Array - ) { - this.maxRetries = maxRetries; - this.retryDelay = retryDelay; - this.httpStatusCodesToRetryOn = httpStatusCodesToRetryOn; - } - - private retryAfterMillisecondsToSleep( - retryHeader: http.IncomingHttpHeaders["retry-after"] - ): number { - if (!retryHeader) { - return 0; - } - - // retry-after header is in seconds - let millisToSleep = Math.round(parseFloat(retryHeader) * 1000); - - /* - * retry-after header is in HTTP Date format - * , :: GMT - */ - if (isNaN(millisToSleep)) { - millisToSleep = Math.max( - 0, - // .valueOf() is needed to subtract dates in TypeScript - new Date(retryHeader).valueOf() - new Date().valueOf() - ); - } - - return millisToSleep; - } - - async pauseForRetry( - httpStatusCode: number, - currentRetry: number, - retryAfterHeader: http.IncomingHttpHeaders["retry-after"] - ): Promise { - if ( - this.httpStatusCodesToRetryOn.includes(httpStatusCode) && - currentRetry < this.maxRetries - ) { - const retryAfterDelay: number = - this.retryAfterMillisecondsToSleep(retryAfterHeader); - - await new Promise((resolve) => { - // retryAfterHeader value of 0 evaluates to false, and this.retryDelay will be used - return setTimeout(resolve, retryAfterDelay || this.retryDelay); - }); - - return true; - } - - return false; - } -} diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/src/utils/Constants.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/src/utils/Constants.ts deleted file mode 100644 index efbffa2..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/src/utils/Constants.ts +++ /dev/null @@ -1,178 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import { HttpStatus } from "@azure/msal-common/node"; - -// MSI Constants. Docs for MSI are available here https://docs.microsoft.com/azure/app-service/overview-managed-identity -export const AUTHORIZATION_HEADER_NAME: string = "Authorization"; -export const METADATA_HEADER_NAME: string = "Metadata"; -export const APP_SERVICE_SECRET_HEADER_NAME: string = "X-IDENTITY-HEADER"; -export const SERVICE_FABRIC_SECRET_HEADER_NAME: string = "secret"; -export const API_VERSION_QUERY_PARAMETER_NAME: string = "api-version"; -export const RESOURCE_BODY_OR_QUERY_PARAMETER_NAME: string = "resource"; -export const DEFAULT_MANAGED_IDENTITY_ID = "system_assigned_managed_identity"; -export const MANAGED_IDENTITY_DEFAULT_TENANT = "managed_identity"; -export const DEFAULT_AUTHORITY_FOR_MANAGED_IDENTITY = `https://login.microsoftonline.com/${MANAGED_IDENTITY_DEFAULT_TENANT}/`; - -/** - * Managed Identity Environment Variable Names - */ -export const ManagedIdentityEnvironmentVariableNames = { - AZURE_POD_IDENTITY_AUTHORITY_HOST: "AZURE_POD_IDENTITY_AUTHORITY_HOST", - IDENTITY_ENDPOINT: "IDENTITY_ENDPOINT", - IDENTITY_HEADER: "IDENTITY_HEADER", - IDENTITY_SERVER_THUMBPRINT: "IDENTITY_SERVER_THUMBPRINT", - IMDS_ENDPOINT: "IMDS_ENDPOINT", - MSI_ENDPOINT: "MSI_ENDPOINT", -} as const; -export type ManagedIdentityEnvironmentVariableNames = - (typeof ManagedIdentityEnvironmentVariableNames)[keyof typeof ManagedIdentityEnvironmentVariableNames]; - -/** - * Managed Identity Source Names - * @public - */ -export const ManagedIdentitySourceNames = { - APP_SERVICE: "AppService", - AZURE_ARC: "AzureArc", - CLOUD_SHELL: "CloudShell", - DEFAULT_TO_IMDS: "DefaultToImds", - IMDS: "Imds", - SERVICE_FABRIC: "ServiceFabric", -} as const; -/** - * The ManagedIdentitySourceNames type - * @public - */ -export type ManagedIdentitySourceNames = - (typeof ManagedIdentitySourceNames)[keyof typeof ManagedIdentitySourceNames]; - -/** - * Managed Identity Ids - */ -export const ManagedIdentityIdType = { - SYSTEM_ASSIGNED: "system-assigned", - USER_ASSIGNED_CLIENT_ID: "user-assigned-client-id", - USER_ASSIGNED_RESOURCE_ID: "user-assigned-resource-id", - USER_ASSIGNED_OBJECT_ID: "user-assigned-object-id", -} as const; -export type ManagedIdentityIdType = - (typeof ManagedIdentityIdType)[keyof typeof ManagedIdentityIdType]; - -/** - * http methods - */ -export const HttpMethod = { - GET: "get", - POST: "post", -} as const; -export type HttpMethod = (typeof HttpMethod)[keyof typeof HttpMethod]; - -export const ProxyStatus = { - SUCCESS: HttpStatus.SUCCESS, - SUCCESS_RANGE_START: HttpStatus.SUCCESS_RANGE_START, - SUCCESS_RANGE_END: HttpStatus.SUCCESS_RANGE_END, - SERVER_ERROR: HttpStatus.SERVER_ERROR, -} as const; -export type ProxyStatus = (typeof ProxyStatus)[keyof typeof ProxyStatus]; - -/** - * Constants used for region discovery - */ -export const REGION_ENVIRONMENT_VARIABLE = "REGION_NAME"; -export const MSAL_FORCE_REGION = "MSAL_FORCE_REGION"; - -/** - * Constant used for PKCE - */ -export const RANDOM_OCTET_SIZE = 32; - -/** - * Constants used in PKCE - */ -export const Hash = { - SHA256: "sha256", -}; - -/** - * Constants for encoding schemes - */ -export const CharSet = { - CV_CHARSET: - "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~", -}; - -/** - * Cache Constants - */ -export const CACHE = { - FILE_CACHE: "fileCache", - EXTENSION_LIB: "extenstion_library", -}; - -/** - * Constants - */ -export const Constants = { - MSAL_SKU: "msal.js.node", - JWT_BEARER_ASSERTION_TYPE: - "urn:ietf:params:oauth:client-assertion-type:jwt-bearer", - AUTHORIZATION_PENDING: "authorization_pending", - HTTP_PROTOCOL: "http://", - LOCALHOST: "localhost", -}; - -/** - * API Codes for Telemetry purposes. - * Before adding a new code you must claim it in the MSAL Telemetry tracker as these number spaces are shared across all MSALs - * 0-99 Silent Flow - * 600-699 Device Code Flow - * 800-899 Auth Code Flow - */ -export const ApiId = { - acquireTokenSilent: 62, - acquireTokenByUsernamePassword: 371, - acquireTokenByDeviceCode: 671, - acquireTokenByClientCredential: 771, - acquireTokenByCode: 871, - acquireTokenByRefreshToken: 872, -}; -export type ApiId = (typeof ApiId)[keyof typeof ApiId]; - -/** - * JWT constants - */ -export const JwtConstants = { - ALGORITHM: "alg", - RSA_256: "RS256", - PSS_256: "PS256", - X5T_256: "x5t#S256", - X5T: "x5t", - X5C: "x5c", - AUDIENCE: "aud", - EXPIRATION_TIME: "exp", - ISSUER: "iss", - SUBJECT: "sub", - NOT_BEFORE: "nbf", - JWT_ID: "jti", -}; - -export const LOOPBACK_SERVER_CONSTANTS = { - INTERVAL_MS: 100, - TIMEOUT_MS: 5000, -}; - -export const AZURE_ARC_SECRET_FILE_MAX_SIZE_BYTES = 4096; // 4 KB - -export const MANAGED_IDENTITY_MAX_RETRIES = 3; -export const MANAGED_IDENTITY_RETRY_DELAY = 1000; -export const MANAGED_IDENTITY_HTTP_STATUS_CODES_TO_RETRY_ON = [ - HttpStatus.NOT_FOUND, - HttpStatus.REQUEST_TIMEOUT, - HttpStatus.TOO_MANY_REQUESTS, - HttpStatus.SERVER_ERROR, - HttpStatus.SERVICE_UNAVAILABLE, - HttpStatus.GATEWAY_TIMEOUT, -]; diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/src/utils/EncodingUtils.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/src/utils/EncodingUtils.ts deleted file mode 100644 index 3ee03a3..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/src/utils/EncodingUtils.ts +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import { Constants } from "@azure/msal-common/node"; - -export class EncodingUtils { - /** - * 'utf8': Multibyte encoded Unicode characters. Many web pages and other document formats use UTF-8. - * 'base64': Base64 encoding. - * - * @param str text - */ - static base64Encode(str: string, encoding?: BufferEncoding): string { - return Buffer.from(str, encoding).toString("base64"); - } - - /** - * encode a URL - * @param str - */ - static base64EncodeUrl(str: string, encoding?: BufferEncoding): string { - return EncodingUtils.base64Encode(str, encoding) - .replace(/=/g, Constants.EMPTY_STRING) - .replace(/\+/g, "-") - .replace(/\//g, "_"); - } - - /** - * 'utf8': Multibyte encoded Unicode characters. Many web pages and other document formats use UTF-8. - * 'base64': Base64 encoding. - * - * @param base64Str Base64 encoded text - */ - static base64Decode(base64Str: string): string { - return Buffer.from(base64Str, "base64").toString("utf8"); - } - - /** - * @param base64Str Base64 encoded Url - */ - static base64DecodeUrl(base64Str: string): string { - let str = base64Str.replace(/-/g, "+").replace(/_/g, "/"); - while (str.length % 4) { - str += "="; - } - return EncodingUtils.base64Decode(str); - } -} diff --git a/PBandGraphScaffold/node_modules/@azure/msal-node/src/utils/NetworkUtils.ts b/PBandGraphScaffold/node_modules/@azure/msal-node/src/utils/NetworkUtils.ts deleted file mode 100644 index 3be864c..0000000 --- a/PBandGraphScaffold/node_modules/@azure/msal-node/src/utils/NetworkUtils.ts +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -import { NetworkResponse } from "@azure/msal-common/node"; - -export type UrlToHttpRequestOptions = { - protocol: string; - hostname: string; - hash: string; - search: string; - pathname: string; - path: string; - href: string; - port?: number; - auth?: string; -}; - -export class NetworkUtils { - static getNetworkResponse( - headers: Record, - body: T, - statusCode: number - ): NetworkResponse { - return { - headers: headers, - body: body, - status: statusCode, - }; - } - - /* - * Utility function that converts a URL object into an ordinary options object as expected by the - * http.request and https.request APIs. - * https://github.com/nodejs/node/blob/main/lib/internal/url.js#L1090 - */ - static urlToHttpOptions(url: URL): UrlToHttpRequestOptions { - const options: UrlToHttpRequestOptions = { - protocol: url.protocol, - hostname: - url.hostname && url.hostname.startsWith("[") - ? url.hostname.slice(1, -1) - : url.hostname, - hash: url.hash, - search: url.search, - pathname: url.pathname, - path: `${url.pathname || ""}${url.search || ""}`, - href: url.href, - }; - if (url.port !== "") { - options.port = Number(url.port); - } - if (url.username || url.password) { - options.auth = `${decodeURIComponent( - url.username - )}:${decodeURIComponent(url.password)}`; - } - return options; - } -} diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/LICENSE b/PBandGraphScaffold/node_modules/@babel/runtime/LICENSE deleted file mode 100644 index f31575e..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -MIT License - -Copyright (c) 2014-present Sebastian McKenzie and other contributors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/README.md b/PBandGraphScaffold/node_modules/@babel/runtime/README.md deleted file mode 100644 index 2f3368e..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/README.md +++ /dev/null @@ -1,19 +0,0 @@ -# @babel/runtime - -> babel's modular runtime helpers - -See our website [@babel/runtime](https://babeljs.io/docs/babel-runtime) for more information. - -## Install - -Using npm: - -```sh -npm install --save @babel/runtime -``` - -or using yarn: - -```sh -yarn add @babel/runtime -``` diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/AwaitValue.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/AwaitValue.js deleted file mode 100644 index 52a7e69..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/AwaitValue.js +++ /dev/null @@ -1,4 +0,0 @@ -function _AwaitValue(t) { - this.wrapped = t; -} -module.exports = _AwaitValue, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/OverloadYield.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/OverloadYield.js deleted file mode 100644 index 0eca88c..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/OverloadYield.js +++ /dev/null @@ -1,4 +0,0 @@ -function _OverloadYield(e, d) { - this.v = e, this.k = d; -} -module.exports = _OverloadYield, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/applyDecoratedDescriptor.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/applyDecoratedDescriptor.js deleted file mode 100644 index 0ff780e..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/applyDecoratedDescriptor.js +++ /dev/null @@ -1,9 +0,0 @@ -function _applyDecoratedDescriptor(i, e, r, n, l) { - var a = {}; - return Object.keys(n).forEach(function (i) { - a[i] = n[i]; - }), a.enumerable = !!a.enumerable, a.configurable = !!a.configurable, ("value" in a || a.initializer) && (a.writable = !0), a = r.slice().reverse().reduce(function (r, n) { - return n(i, e, r) || r; - }, a), l && void 0 !== a.initializer && (a.value = a.initializer ? a.initializer.call(l) : void 0, a.initializer = void 0), void 0 === a.initializer ? (Object.defineProperty(i, e, a), null) : a; -} -module.exports = _applyDecoratedDescriptor, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/applyDecs.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/applyDecs.js deleted file mode 100644 index 3770c5a..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/applyDecs.js +++ /dev/null @@ -1,236 +0,0 @@ -var _typeof = require("./typeof.js")["default"]; -var setFunctionName = require("./setFunctionName.js"); -var toPropertyKey = require("./toPropertyKey.js"); -function old_createMetadataMethodsForProperty(e, t, a, r) { - return { - getMetadata: function getMetadata(o) { - old_assertNotFinished(r, "getMetadata"), old_assertMetadataKey(o); - var i = e[o]; - if (void 0 !== i) if (1 === t) { - var n = i["public"]; - if (void 0 !== n) return n[a]; - } else if (2 === t) { - var l = i["private"]; - if (void 0 !== l) return l.get(a); - } else if (Object.hasOwnProperty.call(i, "constructor")) return i.constructor; - }, - setMetadata: function setMetadata(o, i) { - old_assertNotFinished(r, "setMetadata"), old_assertMetadataKey(o); - var n = e[o]; - if (void 0 === n && (n = e[o] = {}), 1 === t) { - var l = n["public"]; - void 0 === l && (l = n["public"] = {}), l[a] = i; - } else if (2 === t) { - var s = n.priv; - void 0 === s && (s = n["private"] = new Map()), s.set(a, i); - } else n.constructor = i; - } - }; -} -function old_convertMetadataMapToFinal(e, t) { - var a = e[Symbol.metadata || Symbol["for"]("Symbol.metadata")], - r = Object.getOwnPropertySymbols(t); - if (0 !== r.length) { - for (var o = 0; o < r.length; o++) { - var i = r[o], - n = t[i], - l = a ? a[i] : null, - s = n["public"], - c = l ? l["public"] : null; - s && c && Object.setPrototypeOf(s, c); - var d = n["private"]; - if (d) { - var u = Array.from(d.values()), - f = l ? l["private"] : null; - f && (u = u.concat(f)), n["private"] = u; - } - l && Object.setPrototypeOf(n, l); - } - a && Object.setPrototypeOf(t, a), e[Symbol.metadata || Symbol["for"]("Symbol.metadata")] = t; - } -} -function old_createAddInitializerMethod(e, t) { - return function (a) { - old_assertNotFinished(t, "addInitializer"), old_assertCallable(a, "An initializer"), e.push(a); - }; -} -function old_memberDec(e, t, a, r, o, i, n, l, s) { - var c; - switch (i) { - case 1: - c = "accessor"; - break; - case 2: - c = "method"; - break; - case 3: - c = "getter"; - break; - case 4: - c = "setter"; - break; - default: - c = "field"; - } - var d, - u, - f = { - kind: c, - name: l ? "#" + t : toPropertyKey(t), - isStatic: n, - isPrivate: l - }, - p = { - v: !1 - }; - if (0 !== i && (f.addInitializer = old_createAddInitializerMethod(o, p)), l) { - d = 2, u = Symbol(t); - var v = {}; - 0 === i ? (v.get = a.get, v.set = a.set) : 2 === i ? v.get = function () { - return a.value; - } : (1 !== i && 3 !== i || (v.get = function () { - return a.get.call(this); - }), 1 !== i && 4 !== i || (v.set = function (e) { - a.set.call(this, e); - })), f.access = v; - } else d = 1, u = t; - try { - return e(s, Object.assign(f, old_createMetadataMethodsForProperty(r, d, u, p))); - } finally { - p.v = !0; - } -} -function old_assertNotFinished(e, t) { - if (e.v) throw Error("attempted to call " + t + " after decoration was finished"); -} -function old_assertMetadataKey(e) { - if ("symbol" != _typeof(e)) throw new TypeError("Metadata keys must be symbols, received: " + e); -} -function old_assertCallable(e, t) { - if ("function" != typeof e) throw new TypeError(t + " must be a function"); -} -function old_assertValidReturnValue(e, t) { - var a = _typeof(t); - if (1 === e) { - if ("object" !== a || null === t) throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0"); - void 0 !== t.get && old_assertCallable(t.get, "accessor.get"), void 0 !== t.set && old_assertCallable(t.set, "accessor.set"), void 0 !== t.init && old_assertCallable(t.init, "accessor.init"), void 0 !== t.initializer && old_assertCallable(t.initializer, "accessor.initializer"); - } else if ("function" !== a) throw new TypeError((0 === e ? "field" : 10 === e ? "class" : "method") + " decorators must return a function or void 0"); -} -function old_getInit(e) { - var t; - return null == (t = e.init) && (t = e.initializer) && void 0 !== console && console.warn(".initializer has been renamed to .init as of March 2022"), t; -} -function old_applyMemberDec(e, t, a, r, o, i, n, l, s) { - var c, - d, - u, - f, - p, - v, - y, - h = a[0]; - if (n ? (0 === o || 1 === o ? (c = { - get: a[3], - set: a[4] - }, u = "get") : 3 === o ? (c = { - get: a[3] - }, u = "get") : 4 === o ? (c = { - set: a[3] - }, u = "set") : c = { - value: a[3] - }, 0 !== o && (1 === o && setFunctionName(a[4], "#" + r, "set"), setFunctionName(a[3], "#" + r, u))) : 0 !== o && (c = Object.getOwnPropertyDescriptor(t, r)), 1 === o ? f = { - get: c.get, - set: c.set - } : 2 === o ? f = c.value : 3 === o ? f = c.get : 4 === o && (f = c.set), "function" == typeof h) void 0 !== (p = old_memberDec(h, r, c, l, s, o, i, n, f)) && (old_assertValidReturnValue(o, p), 0 === o ? d = p : 1 === o ? (d = old_getInit(p), v = p.get || f.get, y = p.set || f.set, f = { - get: v, - set: y - }) : f = p);else for (var m = h.length - 1; m >= 0; m--) { - var b; - void 0 !== (p = old_memberDec(h[m], r, c, l, s, o, i, n, f)) && (old_assertValidReturnValue(o, p), 0 === o ? b = p : 1 === o ? (b = old_getInit(p), v = p.get || f.get, y = p.set || f.set, f = { - get: v, - set: y - }) : f = p, void 0 !== b && (void 0 === d ? d = b : "function" == typeof d ? d = [d, b] : d.push(b))); - } - if (0 === o || 1 === o) { - if (void 0 === d) d = function d(e, t) { - return t; - };else if ("function" != typeof d) { - var g = d; - d = function d(e, t) { - for (var a = t, r = 0; r < g.length; r++) a = g[r].call(e, a); - return a; - }; - } else { - var _ = d; - d = function d(e, t) { - return _.call(e, t); - }; - } - e.push(d); - } - 0 !== o && (1 === o ? (c.get = f.get, c.set = f.set) : 2 === o ? c.value = f : 3 === o ? c.get = f : 4 === o && (c.set = f), n ? 1 === o ? (e.push(function (e, t) { - return f.get.call(e, t); - }), e.push(function (e, t) { - return f.set.call(e, t); - })) : 2 === o ? e.push(f) : e.push(function (e, t) { - return f.call(e, t); - }) : Object.defineProperty(t, r, c)); -} -function old_applyMemberDecs(e, t, a, r, o) { - for (var i, n, l = new Map(), s = new Map(), c = 0; c < o.length; c++) { - var d = o[c]; - if (Array.isArray(d)) { - var u, - f, - p, - v = d[1], - y = d[2], - h = d.length > 3, - m = v >= 5; - if (m ? (u = t, f = r, 0 != (v -= 5) && (p = n = n || [])) : (u = t.prototype, f = a, 0 !== v && (p = i = i || [])), 0 !== v && !h) { - var b = m ? s : l, - g = b.get(y) || 0; - if (!0 === g || 3 === g && 4 !== v || 4 === g && 3 !== v) throw Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + y); - !g && v > 2 ? b.set(y, v) : b.set(y, !0); - } - old_applyMemberDec(e, u, d, y, v, m, h, f, p); - } - } - old_pushInitializers(e, i), old_pushInitializers(e, n); -} -function old_pushInitializers(e, t) { - t && e.push(function (e) { - for (var a = 0; a < t.length; a++) t[a].call(e); - return e; - }); -} -function old_applyClassDecs(e, t, a, r) { - if (r.length > 0) { - for (var o = [], i = t, n = t.name, l = r.length - 1; l >= 0; l--) { - var s = { - v: !1 - }; - try { - var c = Object.assign({ - kind: "class", - name: n, - addInitializer: old_createAddInitializerMethod(o, s) - }, old_createMetadataMethodsForProperty(a, 0, n, s)), - d = r[l](i, c); - } finally { - s.v = !0; - } - void 0 !== d && (old_assertValidReturnValue(10, d), i = d); - } - e.push(i, function () { - for (var e = 0; e < o.length; e++) o[e].call(i); - }); - } -} -function applyDecs(e, t, a) { - var r = [], - o = {}, - i = {}; - return old_applyMemberDecs(r, e, i, o, t), old_convertMetadataMapToFinal(e.prototype, i), old_applyClassDecs(r, e, o, a), old_convertMetadataMapToFinal(e, o), r; -} -module.exports = applyDecs, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/applyDecs2203.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/applyDecs2203.js deleted file mode 100644 index 5af267c..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/applyDecs2203.js +++ /dev/null @@ -1,184 +0,0 @@ -var _typeof = require("./typeof.js")["default"]; -function applyDecs2203Factory() { - function createAddInitializerMethod(e, t) { - return function (r) { - !function (e) { - if (e.v) throw Error("attempted to call addInitializer after decoration was finished"); - }(t), assertCallable(r, "An initializer"), e.push(r); - }; - } - function memberDec(e, t, r, a, n, i, s, o) { - var c; - switch (n) { - case 1: - c = "accessor"; - break; - case 2: - c = "method"; - break; - case 3: - c = "getter"; - break; - case 4: - c = "setter"; - break; - default: - c = "field"; - } - var l, - u, - f = { - kind: c, - name: s ? "#" + t : t, - "static": i, - "private": s - }, - p = { - v: !1 - }; - 0 !== n && (f.addInitializer = createAddInitializerMethod(a, p)), 0 === n ? s ? (l = r.get, u = r.set) : (l = function l() { - return this[t]; - }, u = function u(e) { - this[t] = e; - }) : 2 === n ? l = function l() { - return r.value; - } : (1 !== n && 3 !== n || (l = function l() { - return r.get.call(this); - }), 1 !== n && 4 !== n || (u = function u(e) { - r.set.call(this, e); - })), f.access = l && u ? { - get: l, - set: u - } : l ? { - get: l - } : { - set: u - }; - try { - return e(o, f); - } finally { - p.v = !0; - } - } - function assertCallable(e, t) { - if ("function" != typeof e) throw new TypeError(t + " must be a function"); - } - function assertValidReturnValue(e, t) { - var r = _typeof(t); - if (1 === e) { - if ("object" !== r || null === t) throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0"); - void 0 !== t.get && assertCallable(t.get, "accessor.get"), void 0 !== t.set && assertCallable(t.set, "accessor.set"), void 0 !== t.init && assertCallable(t.init, "accessor.init"); - } else if ("function" !== r) throw new TypeError((0 === e ? "field" : 10 === e ? "class" : "method") + " decorators must return a function or void 0"); - } - function applyMemberDec(e, t, r, a, n, i, s, o) { - var c, - l, - u, - f, - p, - d, - h = r[0]; - if (s ? c = 0 === n || 1 === n ? { - get: r[3], - set: r[4] - } : 3 === n ? { - get: r[3] - } : 4 === n ? { - set: r[3] - } : { - value: r[3] - } : 0 !== n && (c = Object.getOwnPropertyDescriptor(t, a)), 1 === n ? u = { - get: c.get, - set: c.set - } : 2 === n ? u = c.value : 3 === n ? u = c.get : 4 === n && (u = c.set), "function" == typeof h) void 0 !== (f = memberDec(h, a, c, o, n, i, s, u)) && (assertValidReturnValue(n, f), 0 === n ? l = f : 1 === n ? (l = f.init, p = f.get || u.get, d = f.set || u.set, u = { - get: p, - set: d - }) : u = f);else for (var v = h.length - 1; v >= 0; v--) { - var g; - void 0 !== (f = memberDec(h[v], a, c, o, n, i, s, u)) && (assertValidReturnValue(n, f), 0 === n ? g = f : 1 === n ? (g = f.init, p = f.get || u.get, d = f.set || u.set, u = { - get: p, - set: d - }) : u = f, void 0 !== g && (void 0 === l ? l = g : "function" == typeof l ? l = [l, g] : l.push(g))); - } - if (0 === n || 1 === n) { - if (void 0 === l) l = function l(e, t) { - return t; - };else if ("function" != typeof l) { - var y = l; - l = function l(e, t) { - for (var r = t, a = 0; a < y.length; a++) r = y[a].call(e, r); - return r; - }; - } else { - var m = l; - l = function l(e, t) { - return m.call(e, t); - }; - } - e.push(l); - } - 0 !== n && (1 === n ? (c.get = u.get, c.set = u.set) : 2 === n ? c.value = u : 3 === n ? c.get = u : 4 === n && (c.set = u), s ? 1 === n ? (e.push(function (e, t) { - return u.get.call(e, t); - }), e.push(function (e, t) { - return u.set.call(e, t); - })) : 2 === n ? e.push(u) : e.push(function (e, t) { - return u.call(e, t); - }) : Object.defineProperty(t, a, c)); - } - function pushInitializers(e, t) { - t && e.push(function (e) { - for (var r = 0; r < t.length; r++) t[r].call(e); - return e; - }); - } - return function (e, t, r) { - var a = []; - return function (e, t, r) { - for (var a, n, i = new Map(), s = new Map(), o = 0; o < r.length; o++) { - var c = r[o]; - if (Array.isArray(c)) { - var l, - u, - f = c[1], - p = c[2], - d = c.length > 3, - h = f >= 5; - if (h ? (l = t, 0 != (f -= 5) && (u = n = n || [])) : (l = t.prototype, 0 !== f && (u = a = a || [])), 0 !== f && !d) { - var v = h ? s : i, - g = v.get(p) || 0; - if (!0 === g || 3 === g && 4 !== f || 4 === g && 3 !== f) throw Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + p); - !g && f > 2 ? v.set(p, f) : v.set(p, !0); - } - applyMemberDec(e, l, c, p, f, h, d, u); - } - } - pushInitializers(e, a), pushInitializers(e, n); - }(a, e, t), function (e, t, r) { - if (r.length > 0) { - for (var a = [], n = t, i = t.name, s = r.length - 1; s >= 0; s--) { - var o = { - v: !1 - }; - try { - var c = r[s](n, { - kind: "class", - name: i, - addInitializer: createAddInitializerMethod(a, o) - }); - } finally { - o.v = !0; - } - void 0 !== c && (assertValidReturnValue(10, c), n = c); - } - e.push(n, function () { - for (var e = 0; e < a.length; e++) a[e].call(n); - }); - } - }(a, e, r), a; - }; -} -var applyDecs2203Impl; -function applyDecs2203(e, t, r) { - return (applyDecs2203Impl = applyDecs2203Impl || applyDecs2203Factory())(e, t, r); -} -module.exports = applyDecs2203, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/applyDecs2203R.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/applyDecs2203R.js deleted file mode 100644 index 1be7f5e..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/applyDecs2203R.js +++ /dev/null @@ -1,191 +0,0 @@ -var _typeof = require("./typeof.js")["default"]; -var setFunctionName = require("./setFunctionName.js"); -var toPropertyKey = require("./toPropertyKey.js"); -function applyDecs2203RFactory() { - function createAddInitializerMethod(e, t) { - return function (r) { - !function (e) { - if (e.v) throw Error("attempted to call addInitializer after decoration was finished"); - }(t), assertCallable(r, "An initializer"), e.push(r); - }; - } - function memberDec(e, t, r, n, a, i, o, s) { - var c; - switch (a) { - case 1: - c = "accessor"; - break; - case 2: - c = "method"; - break; - case 3: - c = "getter"; - break; - case 4: - c = "setter"; - break; - default: - c = "field"; - } - var l, - u, - f = { - kind: c, - name: o ? "#" + t : toPropertyKey(t), - "static": i, - "private": o - }, - p = { - v: !1 - }; - 0 !== a && (f.addInitializer = createAddInitializerMethod(n, p)), 0 === a ? o ? (l = r.get, u = r.set) : (l = function l() { - return this[t]; - }, u = function u(e) { - this[t] = e; - }) : 2 === a ? l = function l() { - return r.value; - } : (1 !== a && 3 !== a || (l = function l() { - return r.get.call(this); - }), 1 !== a && 4 !== a || (u = function u(e) { - r.set.call(this, e); - })), f.access = l && u ? { - get: l, - set: u - } : l ? { - get: l - } : { - set: u - }; - try { - return e(s, f); - } finally { - p.v = !0; - } - } - function assertCallable(e, t) { - if ("function" != typeof e) throw new TypeError(t + " must be a function"); - } - function assertValidReturnValue(e, t) { - var r = _typeof(t); - if (1 === e) { - if ("object" !== r || null === t) throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0"); - void 0 !== t.get && assertCallable(t.get, "accessor.get"), void 0 !== t.set && assertCallable(t.set, "accessor.set"), void 0 !== t.init && assertCallable(t.init, "accessor.init"); - } else if ("function" !== r) throw new TypeError((0 === e ? "field" : 10 === e ? "class" : "method") + " decorators must return a function or void 0"); - } - function applyMemberDec(e, t, r, n, a, i, o, s) { - var c, - l, - u, - f, - p, - d, - h, - v = r[0]; - if (o ? (0 === a || 1 === a ? (c = { - get: r[3], - set: r[4] - }, u = "get") : 3 === a ? (c = { - get: r[3] - }, u = "get") : 4 === a ? (c = { - set: r[3] - }, u = "set") : c = { - value: r[3] - }, 0 !== a && (1 === a && setFunctionName(r[4], "#" + n, "set"), setFunctionName(r[3], "#" + n, u))) : 0 !== a && (c = Object.getOwnPropertyDescriptor(t, n)), 1 === a ? f = { - get: c.get, - set: c.set - } : 2 === a ? f = c.value : 3 === a ? f = c.get : 4 === a && (f = c.set), "function" == typeof v) void 0 !== (p = memberDec(v, n, c, s, a, i, o, f)) && (assertValidReturnValue(a, p), 0 === a ? l = p : 1 === a ? (l = p.init, d = p.get || f.get, h = p.set || f.set, f = { - get: d, - set: h - }) : f = p);else for (var g = v.length - 1; g >= 0; g--) { - var y; - void 0 !== (p = memberDec(v[g], n, c, s, a, i, o, f)) && (assertValidReturnValue(a, p), 0 === a ? y = p : 1 === a ? (y = p.init, d = p.get || f.get, h = p.set || f.set, f = { - get: d, - set: h - }) : f = p, void 0 !== y && (void 0 === l ? l = y : "function" == typeof l ? l = [l, y] : l.push(y))); - } - if (0 === a || 1 === a) { - if (void 0 === l) l = function l(e, t) { - return t; - };else if ("function" != typeof l) { - var m = l; - l = function l(e, t) { - for (var r = t, n = 0; n < m.length; n++) r = m[n].call(e, r); - return r; - }; - } else { - var b = l; - l = function l(e, t) { - return b.call(e, t); - }; - } - e.push(l); - } - 0 !== a && (1 === a ? (c.get = f.get, c.set = f.set) : 2 === a ? c.value = f : 3 === a ? c.get = f : 4 === a && (c.set = f), o ? 1 === a ? (e.push(function (e, t) { - return f.get.call(e, t); - }), e.push(function (e, t) { - return f.set.call(e, t); - })) : 2 === a ? e.push(f) : e.push(function (e, t) { - return f.call(e, t); - }) : Object.defineProperty(t, n, c)); - } - function applyMemberDecs(e, t) { - for (var r, n, a = [], i = new Map(), o = new Map(), s = 0; s < t.length; s++) { - var c = t[s]; - if (Array.isArray(c)) { - var l, - u, - f = c[1], - p = c[2], - d = c.length > 3, - h = f >= 5; - if (h ? (l = e, 0 != (f -= 5) && (u = n = n || [])) : (l = e.prototype, 0 !== f && (u = r = r || [])), 0 !== f && !d) { - var v = h ? o : i, - g = v.get(p) || 0; - if (!0 === g || 3 === g && 4 !== f || 4 === g && 3 !== f) throw Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + p); - !g && f > 2 ? v.set(p, f) : v.set(p, !0); - } - applyMemberDec(a, l, c, p, f, h, d, u); - } - } - return pushInitializers(a, r), pushInitializers(a, n), a; - } - function pushInitializers(e, t) { - t && e.push(function (e) { - for (var r = 0; r < t.length; r++) t[r].call(e); - return e; - }); - } - return function (e, t, r) { - return { - e: applyMemberDecs(e, t), - get c() { - return function (e, t) { - if (t.length > 0) { - for (var r = [], n = e, a = e.name, i = t.length - 1; i >= 0; i--) { - var o = { - v: !1 - }; - try { - var s = t[i](n, { - kind: "class", - name: a, - addInitializer: createAddInitializerMethod(r, o) - }); - } finally { - o.v = !0; - } - void 0 !== s && (assertValidReturnValue(10, s), n = s); - } - return [n, function () { - for (var e = 0; e < r.length; e++) r[e].call(n); - }]; - } - }(e, r); - } - }; - }; -} -function applyDecs2203R(e, t, r) { - return (module.exports = applyDecs2203R = applyDecs2203RFactory(), module.exports.__esModule = true, module.exports["default"] = module.exports)(e, t, r); -} -module.exports = applyDecs2203R, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/applyDecs2301.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/applyDecs2301.js deleted file mode 100644 index 577eee8..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/applyDecs2301.js +++ /dev/null @@ -1,222 +0,0 @@ -var _typeof = require("./typeof.js")["default"]; -var checkInRHS = require("./checkInRHS.js"); -var setFunctionName = require("./setFunctionName.js"); -var toPropertyKey = require("./toPropertyKey.js"); -function applyDecs2301Factory() { - function createAddInitializerMethod(e, t) { - return function (r) { - !function (e) { - if (e.v) throw Error("attempted to call addInitializer after decoration was finished"); - }(t), assertCallable(r, "An initializer"), e.push(r); - }; - } - function assertInstanceIfPrivate(e, t) { - if (!e(t)) throw new TypeError("Attempted to access private element on non-instance"); - } - function memberDec(e, t, r, n, a, i, s, o, c) { - var u; - switch (a) { - case 1: - u = "accessor"; - break; - case 2: - u = "method"; - break; - case 3: - u = "getter"; - break; - case 4: - u = "setter"; - break; - default: - u = "field"; - } - var l, - f, - p = { - kind: u, - name: s ? "#" + t : toPropertyKey(t), - "static": i, - "private": s - }, - d = { - v: !1 - }; - if (0 !== a && (p.addInitializer = createAddInitializerMethod(n, d)), s || 0 !== a && 2 !== a) { - if (2 === a) l = function l(e) { - return assertInstanceIfPrivate(c, e), r.value; - };else { - var h = 0 === a || 1 === a; - (h || 3 === a) && (l = s ? function (e) { - return assertInstanceIfPrivate(c, e), r.get.call(e); - } : function (e) { - return r.get.call(e); - }), (h || 4 === a) && (f = s ? function (e, t) { - assertInstanceIfPrivate(c, e), r.set.call(e, t); - } : function (e, t) { - r.set.call(e, t); - }); - } - } else l = function l(e) { - return e[t]; - }, 0 === a && (f = function f(e, r) { - e[t] = r; - }); - var v = s ? c.bind() : function (e) { - return t in e; - }; - p.access = l && f ? { - get: l, - set: f, - has: v - } : l ? { - get: l, - has: v - } : { - set: f, - has: v - }; - try { - return e(o, p); - } finally { - d.v = !0; - } - } - function assertCallable(e, t) { - if ("function" != typeof e) throw new TypeError(t + " must be a function"); - } - function assertValidReturnValue(e, t) { - var r = _typeof(t); - if (1 === e) { - if ("object" !== r || null === t) throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0"); - void 0 !== t.get && assertCallable(t.get, "accessor.get"), void 0 !== t.set && assertCallable(t.set, "accessor.set"), void 0 !== t.init && assertCallable(t.init, "accessor.init"); - } else if ("function" !== r) throw new TypeError((0 === e ? "field" : 10 === e ? "class" : "method") + " decorators must return a function or void 0"); - } - function curryThis2(e) { - return function (t) { - e(this, t); - }; - } - function applyMemberDec(e, t, r, n, a, i, s, o, c) { - var u, - l, - f, - p, - d, - h, - v, - y, - g = r[0]; - if (s ? (0 === a || 1 === a ? (u = { - get: (d = r[3], function () { - return d(this); - }), - set: curryThis2(r[4]) - }, f = "get") : 3 === a ? (u = { - get: r[3] - }, f = "get") : 4 === a ? (u = { - set: r[3] - }, f = "set") : u = { - value: r[3] - }, 0 !== a && (1 === a && setFunctionName(u.set, "#" + n, "set"), setFunctionName(u[f || "value"], "#" + n, f))) : 0 !== a && (u = Object.getOwnPropertyDescriptor(t, n)), 1 === a ? p = { - get: u.get, - set: u.set - } : 2 === a ? p = u.value : 3 === a ? p = u.get : 4 === a && (p = u.set), "function" == typeof g) void 0 !== (h = memberDec(g, n, u, o, a, i, s, p, c)) && (assertValidReturnValue(a, h), 0 === a ? l = h : 1 === a ? (l = h.init, v = h.get || p.get, y = h.set || p.set, p = { - get: v, - set: y - }) : p = h);else for (var m = g.length - 1; m >= 0; m--) { - var b; - void 0 !== (h = memberDec(g[m], n, u, o, a, i, s, p, c)) && (assertValidReturnValue(a, h), 0 === a ? b = h : 1 === a ? (b = h.init, v = h.get || p.get, y = h.set || p.set, p = { - get: v, - set: y - }) : p = h, void 0 !== b && (void 0 === l ? l = b : "function" == typeof l ? l = [l, b] : l.push(b))); - } - if (0 === a || 1 === a) { - if (void 0 === l) l = function l(e, t) { - return t; - };else if ("function" != typeof l) { - var I = l; - l = function l(e, t) { - for (var r = t, n = 0; n < I.length; n++) r = I[n].call(e, r); - return r; - }; - } else { - var w = l; - l = function l(e, t) { - return w.call(e, t); - }; - } - e.push(l); - } - 0 !== a && (1 === a ? (u.get = p.get, u.set = p.set) : 2 === a ? u.value = p : 3 === a ? u.get = p : 4 === a && (u.set = p), s ? 1 === a ? (e.push(function (e, t) { - return p.get.call(e, t); - }), e.push(function (e, t) { - return p.set.call(e, t); - })) : 2 === a ? e.push(p) : e.push(function (e, t) { - return p.call(e, t); - }) : Object.defineProperty(t, n, u)); - } - function applyMemberDecs(e, t, r) { - for (var n, a, i, s = [], o = new Map(), c = new Map(), u = 0; u < t.length; u++) { - var l = t[u]; - if (Array.isArray(l)) { - var f, - p, - d = l[1], - h = l[2], - v = l.length > 3, - y = d >= 5, - g = r; - if (y ? (f = e, 0 != (d -= 5) && (p = a = a || []), v && !i && (i = function i(t) { - return checkInRHS(t) === e; - }), g = i) : (f = e.prototype, 0 !== d && (p = n = n || [])), 0 !== d && !v) { - var m = y ? c : o, - b = m.get(h) || 0; - if (!0 === b || 3 === b && 4 !== d || 4 === b && 3 !== d) throw Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + h); - !b && d > 2 ? m.set(h, d) : m.set(h, !0); - } - applyMemberDec(s, f, l, h, d, y, v, p, g); - } - } - return pushInitializers(s, n), pushInitializers(s, a), s; - } - function pushInitializers(e, t) { - t && e.push(function (e) { - for (var r = 0; r < t.length; r++) t[r].call(e); - return e; - }); - } - return function (e, t, r, n) { - return { - e: applyMemberDecs(e, t, n), - get c() { - return function (e, t) { - if (t.length > 0) { - for (var r = [], n = e, a = e.name, i = t.length - 1; i >= 0; i--) { - var s = { - v: !1 - }; - try { - var o = t[i](n, { - kind: "class", - name: a, - addInitializer: createAddInitializerMethod(r, s) - }); - } finally { - s.v = !0; - } - void 0 !== o && (assertValidReturnValue(10, o), n = o); - } - return [n, function () { - for (var e = 0; e < r.length; e++) r[e].call(n); - }]; - } - }(e, r); - } - }; - }; -} -function applyDecs2301(e, t, r, n) { - return (module.exports = applyDecs2301 = applyDecs2301Factory(), module.exports.__esModule = true, module.exports["default"] = module.exports)(e, t, r, n); -} -module.exports = applyDecs2301, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/applyDecs2305.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/applyDecs2305.js deleted file mode 100644 index 744c352..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/applyDecs2305.js +++ /dev/null @@ -1,133 +0,0 @@ -var _typeof = require("./typeof.js")["default"]; -var checkInRHS = require("./checkInRHS.js"); -var setFunctionName = require("./setFunctionName.js"); -var toPropertyKey = require("./toPropertyKey.js"); -function applyDecs2305(e, t, r, n, o, a) { - function i(e, t, r) { - return function (n, o) { - return r && r(n), e[t].call(n, o); - }; - } - function c(e, t) { - for (var r = 0; r < e.length; r++) e[r].call(t); - return t; - } - function s(e, t, r, n) { - if ("function" != typeof e && (n || void 0 !== e)) throw new TypeError(t + " must " + (r || "be") + " a function" + (n ? "" : " or undefined")); - return e; - } - function applyDec(e, t, r, n, o, a, c, u, l, f, p, d, h) { - function m(e) { - if (!h(e)) throw new TypeError("Attempted to access private element on non-instance"); - } - var y, - v = t[0], - g = t[3], - b = !u; - if (!b) { - r || Array.isArray(v) || (v = [v]); - var w = {}, - S = [], - A = 3 === o ? "get" : 4 === o || d ? "set" : "value"; - f ? (p || d ? w = { - get: setFunctionName(function () { - return g(this); - }, n, "get"), - set: function set(e) { - t[4](this, e); - } - } : w[A] = g, p || setFunctionName(w[A], n, 2 === o ? "" : A)) : p || (w = Object.getOwnPropertyDescriptor(e, n)); - } - for (var P = e, j = v.length - 1; j >= 0; j -= r ? 2 : 1) { - var D = v[j], - E = r ? v[j - 1] : void 0, - I = {}, - O = { - kind: ["field", "accessor", "method", "getter", "setter", "class"][o], - name: n, - metadata: a, - addInitializer: function (e, t) { - if (e.v) throw Error("attempted to call addInitializer after decoration was finished"); - s(t, "An initializer", "be", !0), c.push(t); - }.bind(null, I) - }; - try { - if (b) (y = s(D.call(E, P, O), "class decorators", "return")) && (P = y);else { - var k, F; - O["static"] = l, O["private"] = f, f ? 2 === o ? k = function k(e) { - return m(e), w.value; - } : (o < 4 && (k = i(w, "get", m)), 3 !== o && (F = i(w, "set", m))) : (k = function k(e) { - return e[n]; - }, (o < 2 || 4 === o) && (F = function F(e, t) { - e[n] = t; - })); - var N = O.access = { - has: f ? h.bind() : function (e) { - return n in e; - } - }; - if (k && (N.get = k), F && (N.set = F), P = D.call(E, d ? { - get: w.get, - set: w.set - } : w[A], O), d) { - if ("object" == _typeof(P) && P) (y = s(P.get, "accessor.get")) && (w.get = y), (y = s(P.set, "accessor.set")) && (w.set = y), (y = s(P.init, "accessor.init")) && S.push(y);else if (void 0 !== P) throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0"); - } else s(P, (p ? "field" : "method") + " decorators", "return") && (p ? S.push(P) : w[A] = P); - } - } finally { - I.v = !0; - } - } - return (p || d) && u.push(function (e, t) { - for (var r = S.length - 1; r >= 0; r--) t = S[r].call(e, t); - return t; - }), p || b || (f ? d ? u.push(i(w, "get"), i(w, "set")) : u.push(2 === o ? w[A] : i.call.bind(w[A])) : Object.defineProperty(e, n, w)), P; - } - function u(e, t) { - return Object.defineProperty(e, Symbol.metadata || Symbol["for"]("Symbol.metadata"), { - configurable: !0, - enumerable: !0, - value: t - }); - } - if (arguments.length >= 6) var l = a[Symbol.metadata || Symbol["for"]("Symbol.metadata")]; - var f = Object.create(null == l ? null : l), - p = function (e, t, r, n) { - var o, - a, - i = [], - s = function s(t) { - return checkInRHS(t) === e; - }, - u = new Map(); - function l(e) { - e && i.push(c.bind(null, e)); - } - for (var f = 0; f < t.length; f++) { - var p = t[f]; - if (Array.isArray(p)) { - var d = p[1], - h = p[2], - m = p.length > 3, - y = 16 & d, - v = !!(8 & d), - g = 0 == (d &= 7), - b = h + "/" + v; - if (!g && !m) { - var w = u.get(b); - if (!0 === w || 3 === w && 4 !== d || 4 === w && 3 !== d) throw Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + h); - u.set(b, !(d > 2) || d); - } - applyDec(v ? e : e.prototype, p, y, m ? "#" + h : toPropertyKey(h), d, n, v ? a = a || [] : o = o || [], i, v, m, g, 1 === d, v && m ? s : r); - } - } - return l(o), l(a), i; - }(e, t, o, f); - return r.length || u(e, f), { - e: p, - get c() { - var t = []; - return r.length && [u(applyDec(e, [r], n, e.name, 5, f, t), f), c.bind(null, t, e)]; - } - }; -} -module.exports = applyDecs2305, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/applyDecs2311.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/applyDecs2311.js deleted file mode 100644 index 5c7ed77..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/applyDecs2311.js +++ /dev/null @@ -1,124 +0,0 @@ -var _typeof = require("./typeof.js")["default"]; -var checkInRHS = require("./checkInRHS.js"); -var setFunctionName = require("./setFunctionName.js"); -var toPropertyKey = require("./toPropertyKey.js"); -function applyDecs2311(e, t, n, r, o, i) { - var a, - c, - u, - s, - f, - l, - p, - d = Symbol.metadata || Symbol["for"]("Symbol.metadata"), - m = Object.defineProperty, - h = Object.create, - y = [h(null), h(null)], - v = t.length; - function g(t, n, r) { - return function (o, i) { - n && (i = o, o = e); - for (var a = 0; a < t.length; a++) i = t[a].apply(o, r ? [i] : []); - return r ? i : o; - }; - } - function b(e, t, n, r) { - if ("function" != typeof e && (r || void 0 !== e)) throw new TypeError(t + " must " + (n || "be") + " a function" + (r ? "" : " or undefined")); - return e; - } - function applyDec(e, t, n, r, o, i, u, s, f, l, p) { - function d(e) { - if (!p(e)) throw new TypeError("Attempted to access private element on non-instance"); - } - var h = [].concat(t[0]), - v = t[3], - w = !u, - D = 1 === o, - S = 3 === o, - j = 4 === o, - E = 2 === o; - function I(t, n, r) { - return function (o, i) { - return n && (i = o, o = e), r && r(o), P[t].call(o, i); - }; - } - if (!w) { - var P = {}, - k = [], - F = S ? "get" : j || D ? "set" : "value"; - if (f ? (l || D ? P = { - get: setFunctionName(function () { - return v(this); - }, r, "get"), - set: function set(e) { - t[4](this, e); - } - } : P[F] = v, l || setFunctionName(P[F], r, E ? "" : F)) : l || (P = Object.getOwnPropertyDescriptor(e, r)), !l && !f) { - if ((c = y[+s][r]) && 7 !== (c ^ o)) throw Error("Decorating two elements with the same name (" + P[F].name + ") is not supported yet"); - y[+s][r] = o < 3 ? 1 : o; - } - } - for (var N = e, O = h.length - 1; O >= 0; O -= n ? 2 : 1) { - var T = b(h[O], "A decorator", "be", !0), - z = n ? h[O - 1] : void 0, - A = {}, - H = { - kind: ["field", "accessor", "method", "getter", "setter", "class"][o], - name: r, - metadata: a, - addInitializer: function (e, t) { - if (e.v) throw new TypeError("attempted to call addInitializer after decoration was finished"); - b(t, "An initializer", "be", !0), i.push(t); - }.bind(null, A) - }; - if (w) c = T.call(z, N, H), A.v = 1, b(c, "class decorators", "return") && (N = c);else if (H["static"] = s, H["private"] = f, c = H.access = { - has: f ? p.bind() : function (e) { - return r in e; - } - }, j || (c.get = f ? E ? function (e) { - return d(e), P.value; - } : I("get", 0, d) : function (e) { - return e[r]; - }), E || S || (c.set = f ? I("set", 0, d) : function (e, t) { - e[r] = t; - }), N = T.call(z, D ? { - get: P.get, - set: P.set - } : P[F], H), A.v = 1, D) { - if ("object" == _typeof(N) && N) (c = b(N.get, "accessor.get")) && (P.get = c), (c = b(N.set, "accessor.set")) && (P.set = c), (c = b(N.init, "accessor.init")) && k.unshift(c);else if (void 0 !== N) throw new TypeError("accessor decorators must return an object with get, set, or init properties or undefined"); - } else b(N, (l ? "field" : "method") + " decorators", "return") && (l ? k.unshift(N) : P[F] = N); - } - return o < 2 && u.push(g(k, s, 1), g(i, s, 0)), l || w || (f ? D ? u.splice(-1, 0, I("get", s), I("set", s)) : u.push(E ? P[F] : b.call.bind(P[F])) : m(e, r, P)), N; - } - function w(e) { - return m(e, d, { - configurable: !0, - enumerable: !0, - value: a - }); - } - return void 0 !== i && (a = i[d]), a = h(null == a ? null : a), f = [], l = function l(e) { - e && f.push(g(e)); - }, p = function p(t, r) { - for (var i = 0; i < n.length; i++) { - var a = n[i], - c = a[1], - l = 7 & c; - if ((8 & c) == t && !l == r) { - var p = a[2], - d = !!a[3], - m = 16 & c; - applyDec(t ? e : e.prototype, a, m, d ? "#" + p : toPropertyKey(p), l, l < 2 ? [] : t ? s = s || [] : u = u || [], f, !!t, d, r, t && d ? function (t) { - return checkInRHS(t) === e; - } : o); - } - } - }, p(8, 0), p(0, 0), p(8, 1), p(0, 1), l(u), l(s), c = f, v || w(e), { - e: c, - get c() { - var n = []; - return v && [w(e = applyDec(e, [t], r, e.name, 5, n)), g(n, 1)]; - } - }; -} -module.exports = applyDecs2311, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/arrayLikeToArray.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/arrayLikeToArray.js deleted file mode 100644 index 19787e3..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/arrayLikeToArray.js +++ /dev/null @@ -1,6 +0,0 @@ -function _arrayLikeToArray(r, a) { - (null == a || a > r.length) && (a = r.length); - for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; - return n; -} -module.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/arrayWithHoles.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/arrayWithHoles.js deleted file mode 100644 index 78bdd93..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/arrayWithHoles.js +++ /dev/null @@ -1,4 +0,0 @@ -function _arrayWithHoles(r) { - if (Array.isArray(r)) return r; -} -module.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/arrayWithoutHoles.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/arrayWithoutHoles.js deleted file mode 100644 index 42218f5..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/arrayWithoutHoles.js +++ /dev/null @@ -1,5 +0,0 @@ -var arrayLikeToArray = require("./arrayLikeToArray.js"); -function _arrayWithoutHoles(r) { - if (Array.isArray(r)) return arrayLikeToArray(r); -} -module.exports = _arrayWithoutHoles, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/assertClassBrand.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/assertClassBrand.js deleted file mode 100644 index e63ed8f..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/assertClassBrand.js +++ /dev/null @@ -1,5 +0,0 @@ -function _assertClassBrand(e, t, n) { - if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; - throw new TypeError("Private element is not present on this object"); -} -module.exports = _assertClassBrand, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/assertThisInitialized.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/assertThisInitialized.js deleted file mode 100644 index 02594fb..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/assertThisInitialized.js +++ /dev/null @@ -1,5 +0,0 @@ -function _assertThisInitialized(e) { - if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); - return e; -} -module.exports = _assertThisInitialized, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/asyncGeneratorDelegate.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/asyncGeneratorDelegate.js deleted file mode 100644 index 023568e..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/asyncGeneratorDelegate.js +++ /dev/null @@ -1,24 +0,0 @@ -var OverloadYield = require("./OverloadYield.js"); -function _asyncGeneratorDelegate(t) { - var e = {}, - n = !1; - function pump(e, r) { - return n = !0, r = new Promise(function (n) { - n(t[e](r)); - }), { - done: !1, - value: new OverloadYield(r, 1) - }; - } - return e["undefined" != typeof Symbol && Symbol.iterator || "@@iterator"] = function () { - return this; - }, e.next = function (t) { - return n ? (n = !1, t) : pump("next", t); - }, "function" == typeof t["throw"] && (e["throw"] = function (t) { - if (n) throw n = !1, t; - return pump("throw", t); - }), "function" == typeof t["return"] && (e["return"] = function (t) { - return n ? (n = !1, t) : pump("return", t); - }), e; -} -module.exports = _asyncGeneratorDelegate, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/asyncIterator.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/asyncIterator.js deleted file mode 100644 index 9c0c95c..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/asyncIterator.js +++ /dev/null @@ -1,45 +0,0 @@ -function _asyncIterator(r) { - var n, - t, - o, - e = 2; - for ("undefined" != typeof Symbol && (t = Symbol.asyncIterator, o = Symbol.iterator); e--;) { - if (t && null != (n = r[t])) return n.call(r); - if (o && null != (n = r[o])) return new AsyncFromSyncIterator(n.call(r)); - t = "@@asyncIterator", o = "@@iterator"; - } - throw new TypeError("Object is not async iterable"); -} -function AsyncFromSyncIterator(r) { - function AsyncFromSyncIteratorContinuation(r) { - if (Object(r) !== r) return Promise.reject(new TypeError(r + " is not an object.")); - var n = r.done; - return Promise.resolve(r.value).then(function (r) { - return { - value: r, - done: n - }; - }); - } - return AsyncFromSyncIterator = function AsyncFromSyncIterator(r) { - this.s = r, this.n = r.next; - }, AsyncFromSyncIterator.prototype = { - s: null, - n: null, - next: function next() { - return AsyncFromSyncIteratorContinuation(this.n.apply(this.s, arguments)); - }, - "return": function _return(r) { - var n = this.s["return"]; - return void 0 === n ? Promise.resolve({ - value: r, - done: !0 - }) : AsyncFromSyncIteratorContinuation(n.apply(this.s, arguments)); - }, - "throw": function _throw(r) { - var n = this.s["return"]; - return void 0 === n ? Promise.reject(r) : AsyncFromSyncIteratorContinuation(n.apply(this.s, arguments)); - } - }, new AsyncFromSyncIterator(r); -} -module.exports = _asyncIterator, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/asyncToGenerator.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/asyncToGenerator.js deleted file mode 100644 index a080339..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/asyncToGenerator.js +++ /dev/null @@ -1,26 +0,0 @@ -function asyncGeneratorStep(n, t, e, r, o, a, c) { - try { - var i = n[a](c), - u = i.value; - } catch (n) { - return void e(n); - } - i.done ? t(u) : Promise.resolve(u).then(r, o); -} -function _asyncToGenerator(n) { - return function () { - var t = this, - e = arguments; - return new Promise(function (r, o) { - var a = n.apply(t, e); - function _next(n) { - asyncGeneratorStep(a, r, o, _next, _throw, "next", n); - } - function _throw(n) { - asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); - } - _next(void 0); - }); - }; -} -module.exports = _asyncToGenerator, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/awaitAsyncGenerator.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/awaitAsyncGenerator.js deleted file mode 100644 index 2d6fab9..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/awaitAsyncGenerator.js +++ /dev/null @@ -1,5 +0,0 @@ -var OverloadYield = require("./OverloadYield.js"); -function _awaitAsyncGenerator(e) { - return new OverloadYield(e, 0); -} -module.exports = _awaitAsyncGenerator, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/callSuper.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/callSuper.js deleted file mode 100644 index 38eaf7f..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/callSuper.js +++ /dev/null @@ -1,7 +0,0 @@ -var getPrototypeOf = require("./getPrototypeOf.js"); -var isNativeReflectConstruct = require("./isNativeReflectConstruct.js"); -var possibleConstructorReturn = require("./possibleConstructorReturn.js"); -function _callSuper(t, o, e) { - return o = getPrototypeOf(o), possibleConstructorReturn(t, isNativeReflectConstruct() ? Reflect.construct(o, e || [], getPrototypeOf(t).constructor) : o.apply(t, e)); -} -module.exports = _callSuper, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/checkInRHS.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/checkInRHS.js deleted file mode 100644 index 4eea13d..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/checkInRHS.js +++ /dev/null @@ -1,6 +0,0 @@ -var _typeof = require("./typeof.js")["default"]; -function _checkInRHS(e) { - if (Object(e) !== e) throw TypeError("right-hand side of 'in' should be an object, got " + (null !== e ? _typeof(e) : "null")); - return e; -} -module.exports = _checkInRHS, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/checkPrivateRedeclaration.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/checkPrivateRedeclaration.js deleted file mode 100644 index 33ad54c..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/checkPrivateRedeclaration.js +++ /dev/null @@ -1,4 +0,0 @@ -function _checkPrivateRedeclaration(e, t) { - if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); -} -module.exports = _checkPrivateRedeclaration, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/classApplyDescriptorDestructureSet.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/classApplyDescriptorDestructureSet.js deleted file mode 100644 index 9998b83..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/classApplyDescriptorDestructureSet.js +++ /dev/null @@ -1,10 +0,0 @@ -function _classApplyDescriptorDestructureSet(e, t) { - if (t.set) return "__destrObj" in t || (t.__destrObj = { - set value(r) { - t.set.call(e, r); - } - }), t.__destrObj; - if (!t.writable) throw new TypeError("attempted to set read only private field"); - return t; -} -module.exports = _classApplyDescriptorDestructureSet, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/classApplyDescriptorGet.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/classApplyDescriptorGet.js deleted file mode 100644 index ab62724..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/classApplyDescriptorGet.js +++ /dev/null @@ -1,4 +0,0 @@ -function _classApplyDescriptorGet(e, t) { - return t.get ? t.get.call(e) : t.value; -} -module.exports = _classApplyDescriptorGet, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/classApplyDescriptorSet.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/classApplyDescriptorSet.js deleted file mode 100644 index 0975f95..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/classApplyDescriptorSet.js +++ /dev/null @@ -1,7 +0,0 @@ -function _classApplyDescriptorSet(e, t, l) { - if (t.set) t.set.call(e, l);else { - if (!t.writable) throw new TypeError("attempted to set read only private field"); - t.value = l; - } -} -module.exports = _classApplyDescriptorSet, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/classCallCheck.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/classCallCheck.js deleted file mode 100644 index 21b8390..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/classCallCheck.js +++ /dev/null @@ -1,4 +0,0 @@ -function _classCallCheck(a, n) { - if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); -} -module.exports = _classCallCheck, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/classCheckPrivateStaticAccess.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/classCheckPrivateStaticAccess.js deleted file mode 100644 index 7520f74..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/classCheckPrivateStaticAccess.js +++ /dev/null @@ -1,5 +0,0 @@ -var assertClassBrand = require("./assertClassBrand.js"); -function _classCheckPrivateStaticAccess(s, a, r) { - return assertClassBrand(a, s, r); -} -module.exports = _classCheckPrivateStaticAccess, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/classCheckPrivateStaticFieldDescriptor.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/classCheckPrivateStaticFieldDescriptor.js deleted file mode 100644 index 7f70395..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/classCheckPrivateStaticFieldDescriptor.js +++ /dev/null @@ -1,4 +0,0 @@ -function _classCheckPrivateStaticFieldDescriptor(t, e) { - if (void 0 === t) throw new TypeError("attempted to " + e + " private static field before its declaration"); -} -module.exports = _classCheckPrivateStaticFieldDescriptor, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/classExtractFieldDescriptor.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/classExtractFieldDescriptor.js deleted file mode 100644 index be855be..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/classExtractFieldDescriptor.js +++ /dev/null @@ -1,5 +0,0 @@ -var classPrivateFieldGet2 = require("./classPrivateFieldGet2.js"); -function _classExtractFieldDescriptor(e, t) { - return classPrivateFieldGet2(t, e); -} -module.exports = _classExtractFieldDescriptor, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/classNameTDZError.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/classNameTDZError.js deleted file mode 100644 index 8141ff8..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/classNameTDZError.js +++ /dev/null @@ -1,4 +0,0 @@ -function _classNameTDZError(e) { - throw new ReferenceError('Class "' + e + '" cannot be referenced in computed property keys.'); -} -module.exports = _classNameTDZError, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/classPrivateFieldDestructureSet.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/classPrivateFieldDestructureSet.js deleted file mode 100644 index 97c764d..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/classPrivateFieldDestructureSet.js +++ /dev/null @@ -1,7 +0,0 @@ -var classApplyDescriptorDestructureSet = require("./classApplyDescriptorDestructureSet.js"); -var classPrivateFieldGet2 = require("./classPrivateFieldGet2.js"); -function _classPrivateFieldDestructureSet(e, t) { - var r = classPrivateFieldGet2(t, e); - return classApplyDescriptorDestructureSet(e, r); -} -module.exports = _classPrivateFieldDestructureSet, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/classPrivateFieldGet.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/classPrivateFieldGet.js deleted file mode 100644 index bbee142..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/classPrivateFieldGet.js +++ /dev/null @@ -1,7 +0,0 @@ -var classApplyDescriptorGet = require("./classApplyDescriptorGet.js"); -var classPrivateFieldGet2 = require("./classPrivateFieldGet2.js"); -function _classPrivateFieldGet(e, t) { - var r = classPrivateFieldGet2(t, e); - return classApplyDescriptorGet(e, r); -} -module.exports = _classPrivateFieldGet, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/classPrivateFieldGet2.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/classPrivateFieldGet2.js deleted file mode 100644 index d4c271c..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/classPrivateFieldGet2.js +++ /dev/null @@ -1,5 +0,0 @@ -var assertClassBrand = require("./assertClassBrand.js"); -function _classPrivateFieldGet2(s, a) { - return s.get(assertClassBrand(s, a)); -} -module.exports = _classPrivateFieldGet2, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/classPrivateFieldInitSpec.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/classPrivateFieldInitSpec.js deleted file mode 100644 index a290c19..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/classPrivateFieldInitSpec.js +++ /dev/null @@ -1,5 +0,0 @@ -var checkPrivateRedeclaration = require("./checkPrivateRedeclaration.js"); -function _classPrivateFieldInitSpec(e, t, a) { - checkPrivateRedeclaration(e, t), t.set(e, a); -} -module.exports = _classPrivateFieldInitSpec, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/classPrivateFieldLooseBase.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/classPrivateFieldLooseBase.js deleted file mode 100644 index f9e46f2..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/classPrivateFieldLooseBase.js +++ /dev/null @@ -1,5 +0,0 @@ -function _classPrivateFieldBase(e, t) { - if (!{}.hasOwnProperty.call(e, t)) throw new TypeError("attempted to use private field on non-instance"); - return e; -} -module.exports = _classPrivateFieldBase, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/classPrivateFieldLooseKey.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/classPrivateFieldLooseKey.js deleted file mode 100644 index 5dc687f..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/classPrivateFieldLooseKey.js +++ /dev/null @@ -1,5 +0,0 @@ -var id = 0; -function _classPrivateFieldKey(e) { - return "__private_" + id++ + "_" + e; -} -module.exports = _classPrivateFieldKey, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/classPrivateFieldSet.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/classPrivateFieldSet.js deleted file mode 100644 index f3746e7..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/classPrivateFieldSet.js +++ /dev/null @@ -1,7 +0,0 @@ -var classApplyDescriptorSet = require("./classApplyDescriptorSet.js"); -var classPrivateFieldGet2 = require("./classPrivateFieldGet2.js"); -function _classPrivateFieldSet(e, t, r) { - var s = classPrivateFieldGet2(t, e); - return classApplyDescriptorSet(e, s, r), r; -} -module.exports = _classPrivateFieldSet, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/classPrivateFieldSet2.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/classPrivateFieldSet2.js deleted file mode 100644 index 25c60ca..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/classPrivateFieldSet2.js +++ /dev/null @@ -1,5 +0,0 @@ -var assertClassBrand = require("./assertClassBrand.js"); -function _classPrivateFieldSet2(s, a, r) { - return s.set(assertClassBrand(s, a), r), r; -} -module.exports = _classPrivateFieldSet2, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/classPrivateGetter.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/classPrivateGetter.js deleted file mode 100644 index 1b3cf30..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/classPrivateGetter.js +++ /dev/null @@ -1,5 +0,0 @@ -var assertClassBrand = require("./assertClassBrand.js"); -function _classPrivateGetter(s, r, a) { - return a(assertClassBrand(s, r)); -} -module.exports = _classPrivateGetter, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/classPrivateMethodGet.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/classPrivateMethodGet.js deleted file mode 100644 index e4af387..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/classPrivateMethodGet.js +++ /dev/null @@ -1,5 +0,0 @@ -var assertClassBrand = require("./assertClassBrand.js"); -function _classPrivateMethodGet(s, a, r) { - return assertClassBrand(a, s), r; -} -module.exports = _classPrivateMethodGet, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/classPrivateMethodInitSpec.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/classPrivateMethodInitSpec.js deleted file mode 100644 index 821c8ed..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/classPrivateMethodInitSpec.js +++ /dev/null @@ -1,5 +0,0 @@ -var checkPrivateRedeclaration = require("./checkPrivateRedeclaration.js"); -function _classPrivateMethodInitSpec(e, a) { - checkPrivateRedeclaration(e, a), a.add(e); -} -module.exports = _classPrivateMethodInitSpec, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/classPrivateMethodSet.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/classPrivateMethodSet.js deleted file mode 100644 index a44fd78..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/classPrivateMethodSet.js +++ /dev/null @@ -1,4 +0,0 @@ -function _classPrivateMethodSet() { - throw new TypeError("attempted to reassign private method"); -} -module.exports = _classPrivateMethodSet, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/classPrivateSetter.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/classPrivateSetter.js deleted file mode 100644 index 494f81f..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/classPrivateSetter.js +++ /dev/null @@ -1,5 +0,0 @@ -var assertClassBrand = require("./assertClassBrand.js"); -function _classPrivateSetter(s, r, a, t) { - return r(assertClassBrand(s, a), t), t; -} -module.exports = _classPrivateSetter, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/classStaticPrivateFieldDestructureSet.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/classStaticPrivateFieldDestructureSet.js deleted file mode 100644 index 2bb6e8b..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/classStaticPrivateFieldDestructureSet.js +++ /dev/null @@ -1,7 +0,0 @@ -var classApplyDescriptorDestructureSet = require("./classApplyDescriptorDestructureSet.js"); -var assertClassBrand = require("./assertClassBrand.js"); -var classCheckPrivateStaticFieldDescriptor = require("./classCheckPrivateStaticFieldDescriptor.js"); -function _classStaticPrivateFieldDestructureSet(t, r, s) { - return assertClassBrand(r, t), classCheckPrivateStaticFieldDescriptor(s, "set"), classApplyDescriptorDestructureSet(t, s); -} -module.exports = _classStaticPrivateFieldDestructureSet, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/classStaticPrivateFieldSpecGet.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/classStaticPrivateFieldSpecGet.js deleted file mode 100644 index eb2365f..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/classStaticPrivateFieldSpecGet.js +++ /dev/null @@ -1,7 +0,0 @@ -var classApplyDescriptorGet = require("./classApplyDescriptorGet.js"); -var assertClassBrand = require("./assertClassBrand.js"); -var classCheckPrivateStaticFieldDescriptor = require("./classCheckPrivateStaticFieldDescriptor.js"); -function _classStaticPrivateFieldSpecGet(t, s, r) { - return assertClassBrand(s, t), classCheckPrivateStaticFieldDescriptor(r, "get"), classApplyDescriptorGet(t, r); -} -module.exports = _classStaticPrivateFieldSpecGet, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/classStaticPrivateFieldSpecSet.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/classStaticPrivateFieldSpecSet.js deleted file mode 100644 index 7783cd8..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/classStaticPrivateFieldSpecSet.js +++ /dev/null @@ -1,7 +0,0 @@ -var classApplyDescriptorSet = require("./classApplyDescriptorSet.js"); -var assertClassBrand = require("./assertClassBrand.js"); -var classCheckPrivateStaticFieldDescriptor = require("./classCheckPrivateStaticFieldDescriptor.js"); -function _classStaticPrivateFieldSpecSet(s, t, r, e) { - return assertClassBrand(t, s), classCheckPrivateStaticFieldDescriptor(r, "set"), classApplyDescriptorSet(s, r, e), e; -} -module.exports = _classStaticPrivateFieldSpecSet, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/classStaticPrivateMethodGet.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/classStaticPrivateMethodGet.js deleted file mode 100644 index c895be5..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/classStaticPrivateMethodGet.js +++ /dev/null @@ -1,5 +0,0 @@ -var assertClassBrand = require("./assertClassBrand.js"); -function _classStaticPrivateMethodGet(s, a, t) { - return assertClassBrand(a, s), t; -} -module.exports = _classStaticPrivateMethodGet, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/classStaticPrivateMethodSet.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/classStaticPrivateMethodSet.js deleted file mode 100644 index 72560e6..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/classStaticPrivateMethodSet.js +++ /dev/null @@ -1,4 +0,0 @@ -function _classStaticPrivateMethodSet() { - throw new TypeError("attempted to set read only static private field"); -} -module.exports = _classStaticPrivateMethodSet, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/construct.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/construct.js deleted file mode 100644 index aee8e70..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/construct.js +++ /dev/null @@ -1,10 +0,0 @@ -var isNativeReflectConstruct = require("./isNativeReflectConstruct.js"); -var setPrototypeOf = require("./setPrototypeOf.js"); -function _construct(t, e, r) { - if (isNativeReflectConstruct()) return Reflect.construct.apply(null, arguments); - var o = [null]; - o.push.apply(o, e); - var p = new (t.bind.apply(t, o))(); - return r && setPrototypeOf(p, r.prototype), p; -} -module.exports = _construct, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/createClass.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/createClass.js deleted file mode 100644 index 8757f9e..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/createClass.js +++ /dev/null @@ -1,13 +0,0 @@ -var toPropertyKey = require("./toPropertyKey.js"); -function _defineProperties(e, r) { - for (var t = 0; t < r.length; t++) { - var o = r[t]; - o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, toPropertyKey(o.key), o); - } -} -function _createClass(e, r, t) { - return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { - writable: !1 - }), e; -} -module.exports = _createClass, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/createForOfIteratorHelper.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/createForOfIteratorHelper.js deleted file mode 100644 index 2778307..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/createForOfIteratorHelper.js +++ /dev/null @@ -1,50 +0,0 @@ -var unsupportedIterableToArray = require("./unsupportedIterableToArray.js"); -function _createForOfIteratorHelper(r, e) { - var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; - if (!t) { - if (Array.isArray(r) || (t = unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { - t && (r = t); - var _n = 0, - F = function F() {}; - return { - s: F, - n: function n() { - return _n >= r.length ? { - done: !0 - } : { - done: !1, - value: r[_n++] - }; - }, - e: function e(r) { - throw r; - }, - f: F - }; - } - throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); - } - var o, - a = !0, - u = !1; - return { - s: function s() { - t = t.call(r); - }, - n: function n() { - var r = t.next(); - return a = r.done, r; - }, - e: function e(r) { - u = !0, o = r; - }, - f: function f() { - try { - a || null == t["return"] || t["return"](); - } finally { - if (u) throw o; - } - } - }; -} -module.exports = _createForOfIteratorHelper, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/createForOfIteratorHelperLoose.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/createForOfIteratorHelperLoose.js deleted file mode 100644 index bc81b1c..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/createForOfIteratorHelperLoose.js +++ /dev/null @@ -1,19 +0,0 @@ -var unsupportedIterableToArray = require("./unsupportedIterableToArray.js"); -function _createForOfIteratorHelperLoose(r, e) { - var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; - if (t) return (t = t.call(r)).next.bind(t); - if (Array.isArray(r) || (t = unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { - t && (r = t); - var o = 0; - return function () { - return o >= r.length ? { - done: !0 - } : { - done: !1, - value: r[o++] - }; - }; - } - throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); -} -module.exports = _createForOfIteratorHelperLoose, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/createSuper.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/createSuper.js deleted file mode 100644 index b1869e6..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/createSuper.js +++ /dev/null @@ -1,16 +0,0 @@ -var getPrototypeOf = require("./getPrototypeOf.js"); -var isNativeReflectConstruct = require("./isNativeReflectConstruct.js"); -var possibleConstructorReturn = require("./possibleConstructorReturn.js"); -function _createSuper(t) { - var r = isNativeReflectConstruct(); - return function () { - var e, - o = getPrototypeOf(t); - if (r) { - var s = getPrototypeOf(this).constructor; - e = Reflect.construct(o, arguments, s); - } else e = o.apply(this, arguments); - return possibleConstructorReturn(this, e); - }; -} -module.exports = _createSuper, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/decorate.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/decorate.js deleted file mode 100644 index bc22acf..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/decorate.js +++ /dev/null @@ -1,250 +0,0 @@ -var toArray = require("./toArray.js"); -var toPropertyKey = require("./toPropertyKey.js"); -function _decorate(e, r, t, i) { - var o = _getDecoratorsApi(); - if (i) for (var n = 0; n < i.length; n++) o = i[n](o); - var s = r(function (e) { - o.initializeInstanceElements(e, a.elements); - }, t), - a = o.decorateClass(_coalesceClassElements(s.d.map(_createElementDescriptor)), e); - return o.initializeClassElements(s.F, a.elements), o.runClassFinishers(s.F, a.finishers); -} -function _getDecoratorsApi() { - _getDecoratorsApi = function _getDecoratorsApi() { - return e; - }; - var e = { - elementsDefinitionOrder: [["method"], ["field"]], - initializeInstanceElements: function initializeInstanceElements(e, r) { - ["method", "field"].forEach(function (t) { - r.forEach(function (r) { - r.kind === t && "own" === r.placement && this.defineClassElement(e, r); - }, this); - }, this); - }, - initializeClassElements: function initializeClassElements(e, r) { - var t = e.prototype; - ["method", "field"].forEach(function (i) { - r.forEach(function (r) { - var o = r.placement; - if (r.kind === i && ("static" === o || "prototype" === o)) { - var n = "static" === o ? e : t; - this.defineClassElement(n, r); - } - }, this); - }, this); - }, - defineClassElement: function defineClassElement(e, r) { - var t = r.descriptor; - if ("field" === r.kind) { - var i = r.initializer; - t = { - enumerable: t.enumerable, - writable: t.writable, - configurable: t.configurable, - value: void 0 === i ? void 0 : i.call(e) - }; - } - Object.defineProperty(e, r.key, t); - }, - decorateClass: function decorateClass(e, r) { - var t = [], - i = [], - o = { - "static": [], - prototype: [], - own: [] - }; - if (e.forEach(function (e) { - this.addElementPlacement(e, o); - }, this), e.forEach(function (e) { - if (!_hasDecorators(e)) return t.push(e); - var r = this.decorateElement(e, o); - t.push(r.element), t.push.apply(t, r.extras), i.push.apply(i, r.finishers); - }, this), !r) return { - elements: t, - finishers: i - }; - var n = this.decorateConstructor(t, r); - return i.push.apply(i, n.finishers), n.finishers = i, n; - }, - addElementPlacement: function addElementPlacement(e, r, t) { - var i = r[e.placement]; - if (!t && -1 !== i.indexOf(e.key)) throw new TypeError("Duplicated element (" + e.key + ")"); - i.push(e.key); - }, - decorateElement: function decorateElement(e, r) { - for (var t = [], i = [], o = e.decorators, n = o.length - 1; n >= 0; n--) { - var s = r[e.placement]; - s.splice(s.indexOf(e.key), 1); - var a = this.fromElementDescriptor(e), - l = this.toElementFinisherExtras((0, o[n])(a) || a); - e = l.element, this.addElementPlacement(e, r), l.finisher && i.push(l.finisher); - var c = l.extras; - if (c) { - for (var p = 0; p < c.length; p++) this.addElementPlacement(c[p], r); - t.push.apply(t, c); - } - } - return { - element: e, - finishers: i, - extras: t - }; - }, - decorateConstructor: function decorateConstructor(e, r) { - for (var t = [], i = r.length - 1; i >= 0; i--) { - var o = this.fromClassDescriptor(e), - n = this.toClassDescriptor((0, r[i])(o) || o); - if (void 0 !== n.finisher && t.push(n.finisher), void 0 !== n.elements) { - e = n.elements; - for (var s = 0; s < e.length - 1; s++) for (var a = s + 1; a < e.length; a++) if (e[s].key === e[a].key && e[s].placement === e[a].placement) throw new TypeError("Duplicated element (" + e[s].key + ")"); - } - } - return { - elements: e, - finishers: t - }; - }, - fromElementDescriptor: function fromElementDescriptor(e) { - var r = { - kind: e.kind, - key: e.key, - placement: e.placement, - descriptor: e.descriptor - }; - return Object.defineProperty(r, Symbol.toStringTag, { - value: "Descriptor", - configurable: !0 - }), "field" === e.kind && (r.initializer = e.initializer), r; - }, - toElementDescriptors: function toElementDescriptors(e) { - if (void 0 !== e) return toArray(e).map(function (e) { - var r = this.toElementDescriptor(e); - return this.disallowProperty(e, "finisher", "An element descriptor"), this.disallowProperty(e, "extras", "An element descriptor"), r; - }, this); - }, - toElementDescriptor: function toElementDescriptor(e) { - var r = e.kind + ""; - if ("method" !== r && "field" !== r) throw new TypeError('An element descriptor\'s .kind property must be either "method" or "field", but a decorator created an element descriptor with .kind "' + r + '"'); - var t = toPropertyKey(e.key), - i = e.placement + ""; - if ("static" !== i && "prototype" !== i && "own" !== i) throw new TypeError('An element descriptor\'s .placement property must be one of "static", "prototype" or "own", but a decorator created an element descriptor with .placement "' + i + '"'); - var o = e.descriptor; - this.disallowProperty(e, "elements", "An element descriptor"); - var n = { - kind: r, - key: t, - placement: i, - descriptor: Object.assign({}, o) - }; - return "field" !== r ? this.disallowProperty(e, "initializer", "A method descriptor") : (this.disallowProperty(o, "get", "The property descriptor of a field descriptor"), this.disallowProperty(o, "set", "The property descriptor of a field descriptor"), this.disallowProperty(o, "value", "The property descriptor of a field descriptor"), n.initializer = e.initializer), n; - }, - toElementFinisherExtras: function toElementFinisherExtras(e) { - return { - element: this.toElementDescriptor(e), - finisher: _optionalCallableProperty(e, "finisher"), - extras: this.toElementDescriptors(e.extras) - }; - }, - fromClassDescriptor: function fromClassDescriptor(e) { - var r = { - kind: "class", - elements: e.map(this.fromElementDescriptor, this) - }; - return Object.defineProperty(r, Symbol.toStringTag, { - value: "Descriptor", - configurable: !0 - }), r; - }, - toClassDescriptor: function toClassDescriptor(e) { - var r = e.kind + ""; - if ("class" !== r) throw new TypeError('A class descriptor\'s .kind property must be "class", but a decorator created a class descriptor with .kind "' + r + '"'); - this.disallowProperty(e, "key", "A class descriptor"), this.disallowProperty(e, "placement", "A class descriptor"), this.disallowProperty(e, "descriptor", "A class descriptor"), this.disallowProperty(e, "initializer", "A class descriptor"), this.disallowProperty(e, "extras", "A class descriptor"); - var t = _optionalCallableProperty(e, "finisher"); - return { - elements: this.toElementDescriptors(e.elements), - finisher: t - }; - }, - runClassFinishers: function runClassFinishers(e, r) { - for (var t = 0; t < r.length; t++) { - var i = (0, r[t])(e); - if (void 0 !== i) { - if ("function" != typeof i) throw new TypeError("Finishers must return a constructor."); - e = i; - } - } - return e; - }, - disallowProperty: function disallowProperty(e, r, t) { - if (void 0 !== e[r]) throw new TypeError(t + " can't have a ." + r + " property."); - } - }; - return e; -} -function _createElementDescriptor(e) { - var r, - t = toPropertyKey(e.key); - "method" === e.kind ? r = { - value: e.value, - writable: !0, - configurable: !0, - enumerable: !1 - } : "get" === e.kind ? r = { - get: e.value, - configurable: !0, - enumerable: !1 - } : "set" === e.kind ? r = { - set: e.value, - configurable: !0, - enumerable: !1 - } : "field" === e.kind && (r = { - configurable: !0, - writable: !0, - enumerable: !0 - }); - var i = { - kind: "field" === e.kind ? "field" : "method", - key: t, - placement: e["static"] ? "static" : "field" === e.kind ? "own" : "prototype", - descriptor: r - }; - return e.decorators && (i.decorators = e.decorators), "field" === e.kind && (i.initializer = e.value), i; -} -function _coalesceGetterSetter(e, r) { - void 0 !== e.descriptor.get ? r.descriptor.get = e.descriptor.get : r.descriptor.set = e.descriptor.set; -} -function _coalesceClassElements(e) { - for (var r = [], isSameElement = function isSameElement(e) { - return "method" === e.kind && e.key === o.key && e.placement === o.placement; - }, t = 0; t < e.length; t++) { - var i, - o = e[t]; - if ("method" === o.kind && (i = r.find(isSameElement))) { - if (_isDataDescriptor(o.descriptor) || _isDataDescriptor(i.descriptor)) { - if (_hasDecorators(o) || _hasDecorators(i)) throw new ReferenceError("Duplicated methods (" + o.key + ") can't be decorated."); - i.descriptor = o.descriptor; - } else { - if (_hasDecorators(o)) { - if (_hasDecorators(i)) throw new ReferenceError("Decorators can't be placed on different accessors with for the same property (" + o.key + ")."); - i.decorators = o.decorators; - } - _coalesceGetterSetter(o, i); - } - } else r.push(o); - } - return r; -} -function _hasDecorators(e) { - return e.decorators && e.decorators.length; -} -function _isDataDescriptor(e) { - return void 0 !== e && !(void 0 === e.value && void 0 === e.writable); -} -function _optionalCallableProperty(e, r) { - var t = e[r]; - if (void 0 !== t && "function" != typeof t) throw new TypeError("Expected '" + r + "' to be a function"); - return t; -} -module.exports = _decorate, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/defaults.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/defaults.js deleted file mode 100644 index dfdbbb0..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/defaults.js +++ /dev/null @@ -1,9 +0,0 @@ -function _defaults(e, r) { - for (var t = Object.getOwnPropertyNames(r), o = 0; o < t.length; o++) { - var n = t[o], - a = Object.getOwnPropertyDescriptor(r, n); - a && a.configurable && void 0 === e[n] && Object.defineProperty(e, n, a); - } - return e; -} -module.exports = _defaults, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/defineAccessor.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/defineAccessor.js deleted file mode 100644 index dc065f0..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/defineAccessor.js +++ /dev/null @@ -1,8 +0,0 @@ -function _defineAccessor(e, r, n, t) { - var c = { - configurable: !0, - enumerable: !0 - }; - return c[e] = t, Object.defineProperty(r, n, c); -} -module.exports = _defineAccessor, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/defineEnumerableProperties.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/defineEnumerableProperties.js deleted file mode 100644 index ab9f43c..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/defineEnumerableProperties.js +++ /dev/null @@ -1,12 +0,0 @@ -function _defineEnumerableProperties(e, r) { - for (var t in r) { - var n = r[t]; - n.configurable = n.enumerable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, t, n); - } - if (Object.getOwnPropertySymbols) for (var a = Object.getOwnPropertySymbols(r), b = 0; b < a.length; b++) { - var i = a[b]; - (n = r[i]).configurable = n.enumerable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, i, n); - } - return e; -} -module.exports = _defineEnumerableProperties, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/defineProperty.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/defineProperty.js deleted file mode 100644 index 2c2ff1e..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/defineProperty.js +++ /dev/null @@ -1,10 +0,0 @@ -var toPropertyKey = require("./toPropertyKey.js"); -function _defineProperty(e, r, t) { - return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, { - value: t, - enumerable: !0, - configurable: !0, - writable: !0 - }) : e[r] = t, e; -} -module.exports = _defineProperty, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/dispose.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/dispose.js deleted file mode 100644 index c20193c..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/dispose.js +++ /dev/null @@ -1,28 +0,0 @@ -function dispose_SuppressedError(r, e) { - return "undefined" != typeof SuppressedError ? dispose_SuppressedError = SuppressedError : (dispose_SuppressedError = function dispose_SuppressedError(r, e) { - this.suppressed = e, this.error = r, this.stack = Error().stack; - }, dispose_SuppressedError.prototype = Object.create(Error.prototype, { - constructor: { - value: dispose_SuppressedError, - writable: !0, - configurable: !0 - } - })), new dispose_SuppressedError(r, e); -} -function _dispose(r, e, s) { - function next() { - for (; r.length > 0;) try { - var o = r.pop(), - p = o.d.call(o.v); - if (o.a) return Promise.resolve(p).then(next, err); - } catch (r) { - return err(r); - } - if (s) throw e; - } - function err(r) { - return e = s ? new dispose_SuppressedError(e, r) : r, s = !0, next(); - } - return next(); -} -module.exports = _dispose, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/AwaitValue.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/AwaitValue.js deleted file mode 100644 index 6f210c9..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/AwaitValue.js +++ /dev/null @@ -1,4 +0,0 @@ -function _AwaitValue(t) { - this.wrapped = t; -} -export { _AwaitValue as default }; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/OverloadYield.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/OverloadYield.js deleted file mode 100644 index d7753a6..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/OverloadYield.js +++ /dev/null @@ -1,4 +0,0 @@ -function _OverloadYield(e, d) { - this.v = e, this.k = d; -} -export { _OverloadYield as default }; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/applyDecoratedDescriptor.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/applyDecoratedDescriptor.js deleted file mode 100644 index 0f33483..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/applyDecoratedDescriptor.js +++ /dev/null @@ -1,9 +0,0 @@ -function _applyDecoratedDescriptor(i, e, r, n, l) { - var a = {}; - return Object.keys(n).forEach(function (i) { - a[i] = n[i]; - }), a.enumerable = !!a.enumerable, a.configurable = !!a.configurable, ("value" in a || a.initializer) && (a.writable = !0), a = r.slice().reverse().reduce(function (r, n) { - return n(i, e, r) || r; - }, a), l && void 0 !== a.initializer && (a.value = a.initializer ? a.initializer.call(l) : void 0, a.initializer = void 0), void 0 === a.initializer ? (Object.defineProperty(i, e, a), null) : a; -} -export { _applyDecoratedDescriptor as default }; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/applyDecs.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/applyDecs.js deleted file mode 100644 index 2b75dfd..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/applyDecs.js +++ /dev/null @@ -1,236 +0,0 @@ -import _typeof from "./typeof.js"; -import setFunctionName from "./setFunctionName.js"; -import toPropertyKey from "./toPropertyKey.js"; -function old_createMetadataMethodsForProperty(e, t, a, r) { - return { - getMetadata: function getMetadata(o) { - old_assertNotFinished(r, "getMetadata"), old_assertMetadataKey(o); - var i = e[o]; - if (void 0 !== i) if (1 === t) { - var n = i["public"]; - if (void 0 !== n) return n[a]; - } else if (2 === t) { - var l = i["private"]; - if (void 0 !== l) return l.get(a); - } else if (Object.hasOwnProperty.call(i, "constructor")) return i.constructor; - }, - setMetadata: function setMetadata(o, i) { - old_assertNotFinished(r, "setMetadata"), old_assertMetadataKey(o); - var n = e[o]; - if (void 0 === n && (n = e[o] = {}), 1 === t) { - var l = n["public"]; - void 0 === l && (l = n["public"] = {}), l[a] = i; - } else if (2 === t) { - var s = n.priv; - void 0 === s && (s = n["private"] = new Map()), s.set(a, i); - } else n.constructor = i; - } - }; -} -function old_convertMetadataMapToFinal(e, t) { - var a = e[Symbol.metadata || Symbol["for"]("Symbol.metadata")], - r = Object.getOwnPropertySymbols(t); - if (0 !== r.length) { - for (var o = 0; o < r.length; o++) { - var i = r[o], - n = t[i], - l = a ? a[i] : null, - s = n["public"], - c = l ? l["public"] : null; - s && c && Object.setPrototypeOf(s, c); - var d = n["private"]; - if (d) { - var u = Array.from(d.values()), - f = l ? l["private"] : null; - f && (u = u.concat(f)), n["private"] = u; - } - l && Object.setPrototypeOf(n, l); - } - a && Object.setPrototypeOf(t, a), e[Symbol.metadata || Symbol["for"]("Symbol.metadata")] = t; - } -} -function old_createAddInitializerMethod(e, t) { - return function (a) { - old_assertNotFinished(t, "addInitializer"), old_assertCallable(a, "An initializer"), e.push(a); - }; -} -function old_memberDec(e, t, a, r, o, i, n, l, s) { - var c; - switch (i) { - case 1: - c = "accessor"; - break; - case 2: - c = "method"; - break; - case 3: - c = "getter"; - break; - case 4: - c = "setter"; - break; - default: - c = "field"; - } - var d, - u, - f = { - kind: c, - name: l ? "#" + t : toPropertyKey(t), - isStatic: n, - isPrivate: l - }, - p = { - v: !1 - }; - if (0 !== i && (f.addInitializer = old_createAddInitializerMethod(o, p)), l) { - d = 2, u = Symbol(t); - var v = {}; - 0 === i ? (v.get = a.get, v.set = a.set) : 2 === i ? v.get = function () { - return a.value; - } : (1 !== i && 3 !== i || (v.get = function () { - return a.get.call(this); - }), 1 !== i && 4 !== i || (v.set = function (e) { - a.set.call(this, e); - })), f.access = v; - } else d = 1, u = t; - try { - return e(s, Object.assign(f, old_createMetadataMethodsForProperty(r, d, u, p))); - } finally { - p.v = !0; - } -} -function old_assertNotFinished(e, t) { - if (e.v) throw Error("attempted to call " + t + " after decoration was finished"); -} -function old_assertMetadataKey(e) { - if ("symbol" != _typeof(e)) throw new TypeError("Metadata keys must be symbols, received: " + e); -} -function old_assertCallable(e, t) { - if ("function" != typeof e) throw new TypeError(t + " must be a function"); -} -function old_assertValidReturnValue(e, t) { - var a = _typeof(t); - if (1 === e) { - if ("object" !== a || null === t) throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0"); - void 0 !== t.get && old_assertCallable(t.get, "accessor.get"), void 0 !== t.set && old_assertCallable(t.set, "accessor.set"), void 0 !== t.init && old_assertCallable(t.init, "accessor.init"), void 0 !== t.initializer && old_assertCallable(t.initializer, "accessor.initializer"); - } else if ("function" !== a) throw new TypeError((0 === e ? "field" : 10 === e ? "class" : "method") + " decorators must return a function or void 0"); -} -function old_getInit(e) { - var t; - return null == (t = e.init) && (t = e.initializer) && void 0 !== console && console.warn(".initializer has been renamed to .init as of March 2022"), t; -} -function old_applyMemberDec(e, t, a, r, o, i, n, l, s) { - var c, - d, - u, - f, - p, - v, - y, - h = a[0]; - if (n ? (0 === o || 1 === o ? (c = { - get: a[3], - set: a[4] - }, u = "get") : 3 === o ? (c = { - get: a[3] - }, u = "get") : 4 === o ? (c = { - set: a[3] - }, u = "set") : c = { - value: a[3] - }, 0 !== o && (1 === o && setFunctionName(a[4], "#" + r, "set"), setFunctionName(a[3], "#" + r, u))) : 0 !== o && (c = Object.getOwnPropertyDescriptor(t, r)), 1 === o ? f = { - get: c.get, - set: c.set - } : 2 === o ? f = c.value : 3 === o ? f = c.get : 4 === o && (f = c.set), "function" == typeof h) void 0 !== (p = old_memberDec(h, r, c, l, s, o, i, n, f)) && (old_assertValidReturnValue(o, p), 0 === o ? d = p : 1 === o ? (d = old_getInit(p), v = p.get || f.get, y = p.set || f.set, f = { - get: v, - set: y - }) : f = p);else for (var m = h.length - 1; m >= 0; m--) { - var b; - void 0 !== (p = old_memberDec(h[m], r, c, l, s, o, i, n, f)) && (old_assertValidReturnValue(o, p), 0 === o ? b = p : 1 === o ? (b = old_getInit(p), v = p.get || f.get, y = p.set || f.set, f = { - get: v, - set: y - }) : f = p, void 0 !== b && (void 0 === d ? d = b : "function" == typeof d ? d = [d, b] : d.push(b))); - } - if (0 === o || 1 === o) { - if (void 0 === d) d = function d(e, t) { - return t; - };else if ("function" != typeof d) { - var g = d; - d = function d(e, t) { - for (var a = t, r = 0; r < g.length; r++) a = g[r].call(e, a); - return a; - }; - } else { - var _ = d; - d = function d(e, t) { - return _.call(e, t); - }; - } - e.push(d); - } - 0 !== o && (1 === o ? (c.get = f.get, c.set = f.set) : 2 === o ? c.value = f : 3 === o ? c.get = f : 4 === o && (c.set = f), n ? 1 === o ? (e.push(function (e, t) { - return f.get.call(e, t); - }), e.push(function (e, t) { - return f.set.call(e, t); - })) : 2 === o ? e.push(f) : e.push(function (e, t) { - return f.call(e, t); - }) : Object.defineProperty(t, r, c)); -} -function old_applyMemberDecs(e, t, a, r, o) { - for (var i, n, l = new Map(), s = new Map(), c = 0; c < o.length; c++) { - var d = o[c]; - if (Array.isArray(d)) { - var u, - f, - p, - v = d[1], - y = d[2], - h = d.length > 3, - m = v >= 5; - if (m ? (u = t, f = r, 0 != (v -= 5) && (p = n = n || [])) : (u = t.prototype, f = a, 0 !== v && (p = i = i || [])), 0 !== v && !h) { - var b = m ? s : l, - g = b.get(y) || 0; - if (!0 === g || 3 === g && 4 !== v || 4 === g && 3 !== v) throw Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + y); - !g && v > 2 ? b.set(y, v) : b.set(y, !0); - } - old_applyMemberDec(e, u, d, y, v, m, h, f, p); - } - } - old_pushInitializers(e, i), old_pushInitializers(e, n); -} -function old_pushInitializers(e, t) { - t && e.push(function (e) { - for (var a = 0; a < t.length; a++) t[a].call(e); - return e; - }); -} -function old_applyClassDecs(e, t, a, r) { - if (r.length > 0) { - for (var o = [], i = t, n = t.name, l = r.length - 1; l >= 0; l--) { - var s = { - v: !1 - }; - try { - var c = Object.assign({ - kind: "class", - name: n, - addInitializer: old_createAddInitializerMethod(o, s) - }, old_createMetadataMethodsForProperty(a, 0, n, s)), - d = r[l](i, c); - } finally { - s.v = !0; - } - void 0 !== d && (old_assertValidReturnValue(10, d), i = d); - } - e.push(i, function () { - for (var e = 0; e < o.length; e++) o[e].call(i); - }); - } -} -function applyDecs(e, t, a) { - var r = [], - o = {}, - i = {}; - return old_applyMemberDecs(r, e, i, o, t), old_convertMetadataMapToFinal(e.prototype, i), old_applyClassDecs(r, e, o, a), old_convertMetadataMapToFinal(e, o), r; -} -export { applyDecs as default }; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/applyDecs2203.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/applyDecs2203.js deleted file mode 100644 index 8a9d7c5..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/applyDecs2203.js +++ /dev/null @@ -1,184 +0,0 @@ -import _typeof from "./typeof.js"; -function applyDecs2203Factory() { - function createAddInitializerMethod(e, t) { - return function (r) { - !function (e) { - if (e.v) throw Error("attempted to call addInitializer after decoration was finished"); - }(t), assertCallable(r, "An initializer"), e.push(r); - }; - } - function memberDec(e, t, r, a, n, i, s, o) { - var c; - switch (n) { - case 1: - c = "accessor"; - break; - case 2: - c = "method"; - break; - case 3: - c = "getter"; - break; - case 4: - c = "setter"; - break; - default: - c = "field"; - } - var l, - u, - f = { - kind: c, - name: s ? "#" + t : t, - "static": i, - "private": s - }, - p = { - v: !1 - }; - 0 !== n && (f.addInitializer = createAddInitializerMethod(a, p)), 0 === n ? s ? (l = r.get, u = r.set) : (l = function l() { - return this[t]; - }, u = function u(e) { - this[t] = e; - }) : 2 === n ? l = function l() { - return r.value; - } : (1 !== n && 3 !== n || (l = function l() { - return r.get.call(this); - }), 1 !== n && 4 !== n || (u = function u(e) { - r.set.call(this, e); - })), f.access = l && u ? { - get: l, - set: u - } : l ? { - get: l - } : { - set: u - }; - try { - return e(o, f); - } finally { - p.v = !0; - } - } - function assertCallable(e, t) { - if ("function" != typeof e) throw new TypeError(t + " must be a function"); - } - function assertValidReturnValue(e, t) { - var r = _typeof(t); - if (1 === e) { - if ("object" !== r || null === t) throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0"); - void 0 !== t.get && assertCallable(t.get, "accessor.get"), void 0 !== t.set && assertCallable(t.set, "accessor.set"), void 0 !== t.init && assertCallable(t.init, "accessor.init"); - } else if ("function" !== r) throw new TypeError((0 === e ? "field" : 10 === e ? "class" : "method") + " decorators must return a function or void 0"); - } - function applyMemberDec(e, t, r, a, n, i, s, o) { - var c, - l, - u, - f, - p, - d, - h = r[0]; - if (s ? c = 0 === n || 1 === n ? { - get: r[3], - set: r[4] - } : 3 === n ? { - get: r[3] - } : 4 === n ? { - set: r[3] - } : { - value: r[3] - } : 0 !== n && (c = Object.getOwnPropertyDescriptor(t, a)), 1 === n ? u = { - get: c.get, - set: c.set - } : 2 === n ? u = c.value : 3 === n ? u = c.get : 4 === n && (u = c.set), "function" == typeof h) void 0 !== (f = memberDec(h, a, c, o, n, i, s, u)) && (assertValidReturnValue(n, f), 0 === n ? l = f : 1 === n ? (l = f.init, p = f.get || u.get, d = f.set || u.set, u = { - get: p, - set: d - }) : u = f);else for (var v = h.length - 1; v >= 0; v--) { - var g; - void 0 !== (f = memberDec(h[v], a, c, o, n, i, s, u)) && (assertValidReturnValue(n, f), 0 === n ? g = f : 1 === n ? (g = f.init, p = f.get || u.get, d = f.set || u.set, u = { - get: p, - set: d - }) : u = f, void 0 !== g && (void 0 === l ? l = g : "function" == typeof l ? l = [l, g] : l.push(g))); - } - if (0 === n || 1 === n) { - if (void 0 === l) l = function l(e, t) { - return t; - };else if ("function" != typeof l) { - var y = l; - l = function l(e, t) { - for (var r = t, a = 0; a < y.length; a++) r = y[a].call(e, r); - return r; - }; - } else { - var m = l; - l = function l(e, t) { - return m.call(e, t); - }; - } - e.push(l); - } - 0 !== n && (1 === n ? (c.get = u.get, c.set = u.set) : 2 === n ? c.value = u : 3 === n ? c.get = u : 4 === n && (c.set = u), s ? 1 === n ? (e.push(function (e, t) { - return u.get.call(e, t); - }), e.push(function (e, t) { - return u.set.call(e, t); - })) : 2 === n ? e.push(u) : e.push(function (e, t) { - return u.call(e, t); - }) : Object.defineProperty(t, a, c)); - } - function pushInitializers(e, t) { - t && e.push(function (e) { - for (var r = 0; r < t.length; r++) t[r].call(e); - return e; - }); - } - return function (e, t, r) { - var a = []; - return function (e, t, r) { - for (var a, n, i = new Map(), s = new Map(), o = 0; o < r.length; o++) { - var c = r[o]; - if (Array.isArray(c)) { - var l, - u, - f = c[1], - p = c[2], - d = c.length > 3, - h = f >= 5; - if (h ? (l = t, 0 != (f -= 5) && (u = n = n || [])) : (l = t.prototype, 0 !== f && (u = a = a || [])), 0 !== f && !d) { - var v = h ? s : i, - g = v.get(p) || 0; - if (!0 === g || 3 === g && 4 !== f || 4 === g && 3 !== f) throw Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + p); - !g && f > 2 ? v.set(p, f) : v.set(p, !0); - } - applyMemberDec(e, l, c, p, f, h, d, u); - } - } - pushInitializers(e, a), pushInitializers(e, n); - }(a, e, t), function (e, t, r) { - if (r.length > 0) { - for (var a = [], n = t, i = t.name, s = r.length - 1; s >= 0; s--) { - var o = { - v: !1 - }; - try { - var c = r[s](n, { - kind: "class", - name: i, - addInitializer: createAddInitializerMethod(a, o) - }); - } finally { - o.v = !0; - } - void 0 !== c && (assertValidReturnValue(10, c), n = c); - } - e.push(n, function () { - for (var e = 0; e < a.length; e++) a[e].call(n); - }); - } - }(a, e, r), a; - }; -} -var applyDecs2203Impl; -function applyDecs2203(e, t, r) { - return (applyDecs2203Impl = applyDecs2203Impl || applyDecs2203Factory())(e, t, r); -} -export { applyDecs2203 as default }; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/applyDecs2203R.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/applyDecs2203R.js deleted file mode 100644 index bccc42e..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/applyDecs2203R.js +++ /dev/null @@ -1,191 +0,0 @@ -import _typeof from "./typeof.js"; -import setFunctionName from "./setFunctionName.js"; -import toPropertyKey from "./toPropertyKey.js"; -function applyDecs2203RFactory() { - function createAddInitializerMethod(e, t) { - return function (r) { - !function (e) { - if (e.v) throw Error("attempted to call addInitializer after decoration was finished"); - }(t), assertCallable(r, "An initializer"), e.push(r); - }; - } - function memberDec(e, t, r, n, a, i, o, s) { - var c; - switch (a) { - case 1: - c = "accessor"; - break; - case 2: - c = "method"; - break; - case 3: - c = "getter"; - break; - case 4: - c = "setter"; - break; - default: - c = "field"; - } - var l, - u, - f = { - kind: c, - name: o ? "#" + t : toPropertyKey(t), - "static": i, - "private": o - }, - p = { - v: !1 - }; - 0 !== a && (f.addInitializer = createAddInitializerMethod(n, p)), 0 === a ? o ? (l = r.get, u = r.set) : (l = function l() { - return this[t]; - }, u = function u(e) { - this[t] = e; - }) : 2 === a ? l = function l() { - return r.value; - } : (1 !== a && 3 !== a || (l = function l() { - return r.get.call(this); - }), 1 !== a && 4 !== a || (u = function u(e) { - r.set.call(this, e); - })), f.access = l && u ? { - get: l, - set: u - } : l ? { - get: l - } : { - set: u - }; - try { - return e(s, f); - } finally { - p.v = !0; - } - } - function assertCallable(e, t) { - if ("function" != typeof e) throw new TypeError(t + " must be a function"); - } - function assertValidReturnValue(e, t) { - var r = _typeof(t); - if (1 === e) { - if ("object" !== r || null === t) throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0"); - void 0 !== t.get && assertCallable(t.get, "accessor.get"), void 0 !== t.set && assertCallable(t.set, "accessor.set"), void 0 !== t.init && assertCallable(t.init, "accessor.init"); - } else if ("function" !== r) throw new TypeError((0 === e ? "field" : 10 === e ? "class" : "method") + " decorators must return a function or void 0"); - } - function applyMemberDec(e, t, r, n, a, i, o, s) { - var c, - l, - u, - f, - p, - d, - h, - v = r[0]; - if (o ? (0 === a || 1 === a ? (c = { - get: r[3], - set: r[4] - }, u = "get") : 3 === a ? (c = { - get: r[3] - }, u = "get") : 4 === a ? (c = { - set: r[3] - }, u = "set") : c = { - value: r[3] - }, 0 !== a && (1 === a && setFunctionName(r[4], "#" + n, "set"), setFunctionName(r[3], "#" + n, u))) : 0 !== a && (c = Object.getOwnPropertyDescriptor(t, n)), 1 === a ? f = { - get: c.get, - set: c.set - } : 2 === a ? f = c.value : 3 === a ? f = c.get : 4 === a && (f = c.set), "function" == typeof v) void 0 !== (p = memberDec(v, n, c, s, a, i, o, f)) && (assertValidReturnValue(a, p), 0 === a ? l = p : 1 === a ? (l = p.init, d = p.get || f.get, h = p.set || f.set, f = { - get: d, - set: h - }) : f = p);else for (var g = v.length - 1; g >= 0; g--) { - var y; - void 0 !== (p = memberDec(v[g], n, c, s, a, i, o, f)) && (assertValidReturnValue(a, p), 0 === a ? y = p : 1 === a ? (y = p.init, d = p.get || f.get, h = p.set || f.set, f = { - get: d, - set: h - }) : f = p, void 0 !== y && (void 0 === l ? l = y : "function" == typeof l ? l = [l, y] : l.push(y))); - } - if (0 === a || 1 === a) { - if (void 0 === l) l = function l(e, t) { - return t; - };else if ("function" != typeof l) { - var m = l; - l = function l(e, t) { - for (var r = t, n = 0; n < m.length; n++) r = m[n].call(e, r); - return r; - }; - } else { - var b = l; - l = function l(e, t) { - return b.call(e, t); - }; - } - e.push(l); - } - 0 !== a && (1 === a ? (c.get = f.get, c.set = f.set) : 2 === a ? c.value = f : 3 === a ? c.get = f : 4 === a && (c.set = f), o ? 1 === a ? (e.push(function (e, t) { - return f.get.call(e, t); - }), e.push(function (e, t) { - return f.set.call(e, t); - })) : 2 === a ? e.push(f) : e.push(function (e, t) { - return f.call(e, t); - }) : Object.defineProperty(t, n, c)); - } - function applyMemberDecs(e, t) { - for (var r, n, a = [], i = new Map(), o = new Map(), s = 0; s < t.length; s++) { - var c = t[s]; - if (Array.isArray(c)) { - var l, - u, - f = c[1], - p = c[2], - d = c.length > 3, - h = f >= 5; - if (h ? (l = e, 0 != (f -= 5) && (u = n = n || [])) : (l = e.prototype, 0 !== f && (u = r = r || [])), 0 !== f && !d) { - var v = h ? o : i, - g = v.get(p) || 0; - if (!0 === g || 3 === g && 4 !== f || 4 === g && 3 !== f) throw Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + p); - !g && f > 2 ? v.set(p, f) : v.set(p, !0); - } - applyMemberDec(a, l, c, p, f, h, d, u); - } - } - return pushInitializers(a, r), pushInitializers(a, n), a; - } - function pushInitializers(e, t) { - t && e.push(function (e) { - for (var r = 0; r < t.length; r++) t[r].call(e); - return e; - }); - } - return function (e, t, r) { - return { - e: applyMemberDecs(e, t), - get c() { - return function (e, t) { - if (t.length > 0) { - for (var r = [], n = e, a = e.name, i = t.length - 1; i >= 0; i--) { - var o = { - v: !1 - }; - try { - var s = t[i](n, { - kind: "class", - name: a, - addInitializer: createAddInitializerMethod(r, o) - }); - } finally { - o.v = !0; - } - void 0 !== s && (assertValidReturnValue(10, s), n = s); - } - return [n, function () { - for (var e = 0; e < r.length; e++) r[e].call(n); - }]; - } - }(e, r); - } - }; - }; -} -function applyDecs2203R(e, t, r) { - return (applyDecs2203R = applyDecs2203RFactory())(e, t, r); -} -export { applyDecs2203R as default }; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/applyDecs2301.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/applyDecs2301.js deleted file mode 100644 index 8d110f7..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/applyDecs2301.js +++ /dev/null @@ -1,222 +0,0 @@ -import _typeof from "./typeof.js"; -import checkInRHS from "./checkInRHS.js"; -import setFunctionName from "./setFunctionName.js"; -import toPropertyKey from "./toPropertyKey.js"; -function applyDecs2301Factory() { - function createAddInitializerMethod(e, t) { - return function (r) { - !function (e) { - if (e.v) throw Error("attempted to call addInitializer after decoration was finished"); - }(t), assertCallable(r, "An initializer"), e.push(r); - }; - } - function assertInstanceIfPrivate(e, t) { - if (!e(t)) throw new TypeError("Attempted to access private element on non-instance"); - } - function memberDec(e, t, r, n, a, i, s, o, c) { - var u; - switch (a) { - case 1: - u = "accessor"; - break; - case 2: - u = "method"; - break; - case 3: - u = "getter"; - break; - case 4: - u = "setter"; - break; - default: - u = "field"; - } - var l, - f, - p = { - kind: u, - name: s ? "#" + t : toPropertyKey(t), - "static": i, - "private": s - }, - d = { - v: !1 - }; - if (0 !== a && (p.addInitializer = createAddInitializerMethod(n, d)), s || 0 !== a && 2 !== a) { - if (2 === a) l = function l(e) { - return assertInstanceIfPrivate(c, e), r.value; - };else { - var h = 0 === a || 1 === a; - (h || 3 === a) && (l = s ? function (e) { - return assertInstanceIfPrivate(c, e), r.get.call(e); - } : function (e) { - return r.get.call(e); - }), (h || 4 === a) && (f = s ? function (e, t) { - assertInstanceIfPrivate(c, e), r.set.call(e, t); - } : function (e, t) { - r.set.call(e, t); - }); - } - } else l = function l(e) { - return e[t]; - }, 0 === a && (f = function f(e, r) { - e[t] = r; - }); - var v = s ? c.bind() : function (e) { - return t in e; - }; - p.access = l && f ? { - get: l, - set: f, - has: v - } : l ? { - get: l, - has: v - } : { - set: f, - has: v - }; - try { - return e(o, p); - } finally { - d.v = !0; - } - } - function assertCallable(e, t) { - if ("function" != typeof e) throw new TypeError(t + " must be a function"); - } - function assertValidReturnValue(e, t) { - var r = _typeof(t); - if (1 === e) { - if ("object" !== r || null === t) throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0"); - void 0 !== t.get && assertCallable(t.get, "accessor.get"), void 0 !== t.set && assertCallable(t.set, "accessor.set"), void 0 !== t.init && assertCallable(t.init, "accessor.init"); - } else if ("function" !== r) throw new TypeError((0 === e ? "field" : 10 === e ? "class" : "method") + " decorators must return a function or void 0"); - } - function curryThis2(e) { - return function (t) { - e(this, t); - }; - } - function applyMemberDec(e, t, r, n, a, i, s, o, c) { - var u, - l, - f, - p, - d, - h, - v, - y, - g = r[0]; - if (s ? (0 === a || 1 === a ? (u = { - get: (d = r[3], function () { - return d(this); - }), - set: curryThis2(r[4]) - }, f = "get") : 3 === a ? (u = { - get: r[3] - }, f = "get") : 4 === a ? (u = { - set: r[3] - }, f = "set") : u = { - value: r[3] - }, 0 !== a && (1 === a && setFunctionName(u.set, "#" + n, "set"), setFunctionName(u[f || "value"], "#" + n, f))) : 0 !== a && (u = Object.getOwnPropertyDescriptor(t, n)), 1 === a ? p = { - get: u.get, - set: u.set - } : 2 === a ? p = u.value : 3 === a ? p = u.get : 4 === a && (p = u.set), "function" == typeof g) void 0 !== (h = memberDec(g, n, u, o, a, i, s, p, c)) && (assertValidReturnValue(a, h), 0 === a ? l = h : 1 === a ? (l = h.init, v = h.get || p.get, y = h.set || p.set, p = { - get: v, - set: y - }) : p = h);else for (var m = g.length - 1; m >= 0; m--) { - var b; - void 0 !== (h = memberDec(g[m], n, u, o, a, i, s, p, c)) && (assertValidReturnValue(a, h), 0 === a ? b = h : 1 === a ? (b = h.init, v = h.get || p.get, y = h.set || p.set, p = { - get: v, - set: y - }) : p = h, void 0 !== b && (void 0 === l ? l = b : "function" == typeof l ? l = [l, b] : l.push(b))); - } - if (0 === a || 1 === a) { - if (void 0 === l) l = function l(e, t) { - return t; - };else if ("function" != typeof l) { - var I = l; - l = function l(e, t) { - for (var r = t, n = 0; n < I.length; n++) r = I[n].call(e, r); - return r; - }; - } else { - var w = l; - l = function l(e, t) { - return w.call(e, t); - }; - } - e.push(l); - } - 0 !== a && (1 === a ? (u.get = p.get, u.set = p.set) : 2 === a ? u.value = p : 3 === a ? u.get = p : 4 === a && (u.set = p), s ? 1 === a ? (e.push(function (e, t) { - return p.get.call(e, t); - }), e.push(function (e, t) { - return p.set.call(e, t); - })) : 2 === a ? e.push(p) : e.push(function (e, t) { - return p.call(e, t); - }) : Object.defineProperty(t, n, u)); - } - function applyMemberDecs(e, t, r) { - for (var n, a, i, s = [], o = new Map(), c = new Map(), u = 0; u < t.length; u++) { - var l = t[u]; - if (Array.isArray(l)) { - var f, - p, - d = l[1], - h = l[2], - v = l.length > 3, - y = d >= 5, - g = r; - if (y ? (f = e, 0 != (d -= 5) && (p = a = a || []), v && !i && (i = function i(t) { - return checkInRHS(t) === e; - }), g = i) : (f = e.prototype, 0 !== d && (p = n = n || [])), 0 !== d && !v) { - var m = y ? c : o, - b = m.get(h) || 0; - if (!0 === b || 3 === b && 4 !== d || 4 === b && 3 !== d) throw Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + h); - !b && d > 2 ? m.set(h, d) : m.set(h, !0); - } - applyMemberDec(s, f, l, h, d, y, v, p, g); - } - } - return pushInitializers(s, n), pushInitializers(s, a), s; - } - function pushInitializers(e, t) { - t && e.push(function (e) { - for (var r = 0; r < t.length; r++) t[r].call(e); - return e; - }); - } - return function (e, t, r, n) { - return { - e: applyMemberDecs(e, t, n), - get c() { - return function (e, t) { - if (t.length > 0) { - for (var r = [], n = e, a = e.name, i = t.length - 1; i >= 0; i--) { - var s = { - v: !1 - }; - try { - var o = t[i](n, { - kind: "class", - name: a, - addInitializer: createAddInitializerMethod(r, s) - }); - } finally { - s.v = !0; - } - void 0 !== o && (assertValidReturnValue(10, o), n = o); - } - return [n, function () { - for (var e = 0; e < r.length; e++) r[e].call(n); - }]; - } - }(e, r); - } - }; - }; -} -function applyDecs2301(e, t, r, n) { - return (applyDecs2301 = applyDecs2301Factory())(e, t, r, n); -} -export { applyDecs2301 as default }; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/applyDecs2305.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/applyDecs2305.js deleted file mode 100644 index a11b2b9..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/applyDecs2305.js +++ /dev/null @@ -1,133 +0,0 @@ -import _typeof from "./typeof.js"; -import checkInRHS from "./checkInRHS.js"; -import setFunctionName from "./setFunctionName.js"; -import toPropertyKey from "./toPropertyKey.js"; -function applyDecs2305(e, t, r, n, o, a) { - function i(e, t, r) { - return function (n, o) { - return r && r(n), e[t].call(n, o); - }; - } - function c(e, t) { - for (var r = 0; r < e.length; r++) e[r].call(t); - return t; - } - function s(e, t, r, n) { - if ("function" != typeof e && (n || void 0 !== e)) throw new TypeError(t + " must " + (r || "be") + " a function" + (n ? "" : " or undefined")); - return e; - } - function applyDec(e, t, r, n, o, a, c, u, l, f, p, d, h) { - function m(e) { - if (!h(e)) throw new TypeError("Attempted to access private element on non-instance"); - } - var y, - v = t[0], - g = t[3], - b = !u; - if (!b) { - r || Array.isArray(v) || (v = [v]); - var w = {}, - S = [], - A = 3 === o ? "get" : 4 === o || d ? "set" : "value"; - f ? (p || d ? w = { - get: setFunctionName(function () { - return g(this); - }, n, "get"), - set: function set(e) { - t[4](this, e); - } - } : w[A] = g, p || setFunctionName(w[A], n, 2 === o ? "" : A)) : p || (w = Object.getOwnPropertyDescriptor(e, n)); - } - for (var P = e, j = v.length - 1; j >= 0; j -= r ? 2 : 1) { - var D = v[j], - E = r ? v[j - 1] : void 0, - I = {}, - O = { - kind: ["field", "accessor", "method", "getter", "setter", "class"][o], - name: n, - metadata: a, - addInitializer: function (e, t) { - if (e.v) throw Error("attempted to call addInitializer after decoration was finished"); - s(t, "An initializer", "be", !0), c.push(t); - }.bind(null, I) - }; - try { - if (b) (y = s(D.call(E, P, O), "class decorators", "return")) && (P = y);else { - var k, F; - O["static"] = l, O["private"] = f, f ? 2 === o ? k = function k(e) { - return m(e), w.value; - } : (o < 4 && (k = i(w, "get", m)), 3 !== o && (F = i(w, "set", m))) : (k = function k(e) { - return e[n]; - }, (o < 2 || 4 === o) && (F = function F(e, t) { - e[n] = t; - })); - var N = O.access = { - has: f ? h.bind() : function (e) { - return n in e; - } - }; - if (k && (N.get = k), F && (N.set = F), P = D.call(E, d ? { - get: w.get, - set: w.set - } : w[A], O), d) { - if ("object" == _typeof(P) && P) (y = s(P.get, "accessor.get")) && (w.get = y), (y = s(P.set, "accessor.set")) && (w.set = y), (y = s(P.init, "accessor.init")) && S.push(y);else if (void 0 !== P) throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0"); - } else s(P, (p ? "field" : "method") + " decorators", "return") && (p ? S.push(P) : w[A] = P); - } - } finally { - I.v = !0; - } - } - return (p || d) && u.push(function (e, t) { - for (var r = S.length - 1; r >= 0; r--) t = S[r].call(e, t); - return t; - }), p || b || (f ? d ? u.push(i(w, "get"), i(w, "set")) : u.push(2 === o ? w[A] : i.call.bind(w[A])) : Object.defineProperty(e, n, w)), P; - } - function u(e, t) { - return Object.defineProperty(e, Symbol.metadata || Symbol["for"]("Symbol.metadata"), { - configurable: !0, - enumerable: !0, - value: t - }); - } - if (arguments.length >= 6) var l = a[Symbol.metadata || Symbol["for"]("Symbol.metadata")]; - var f = Object.create(null == l ? null : l), - p = function (e, t, r, n) { - var o, - a, - i = [], - s = function s(t) { - return checkInRHS(t) === e; - }, - u = new Map(); - function l(e) { - e && i.push(c.bind(null, e)); - } - for (var f = 0; f < t.length; f++) { - var p = t[f]; - if (Array.isArray(p)) { - var d = p[1], - h = p[2], - m = p.length > 3, - y = 16 & d, - v = !!(8 & d), - g = 0 == (d &= 7), - b = h + "/" + v; - if (!g && !m) { - var w = u.get(b); - if (!0 === w || 3 === w && 4 !== d || 4 === w && 3 !== d) throw Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + h); - u.set(b, !(d > 2) || d); - } - applyDec(v ? e : e.prototype, p, y, m ? "#" + h : toPropertyKey(h), d, n, v ? a = a || [] : o = o || [], i, v, m, g, 1 === d, v && m ? s : r); - } - } - return l(o), l(a), i; - }(e, t, o, f); - return r.length || u(e, f), { - e: p, - get c() { - var t = []; - return r.length && [u(applyDec(e, [r], n, e.name, 5, f, t), f), c.bind(null, t, e)]; - } - }; -} -export { applyDecs2305 as default }; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/applyDecs2311.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/applyDecs2311.js deleted file mode 100644 index ab8c0fd..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/applyDecs2311.js +++ /dev/null @@ -1,124 +0,0 @@ -import _typeof from "./typeof.js"; -import checkInRHS from "./checkInRHS.js"; -import setFunctionName from "./setFunctionName.js"; -import toPropertyKey from "./toPropertyKey.js"; -function applyDecs2311(e, t, n, r, o, i) { - var a, - c, - u, - s, - f, - l, - p, - d = Symbol.metadata || Symbol["for"]("Symbol.metadata"), - m = Object.defineProperty, - h = Object.create, - y = [h(null), h(null)], - v = t.length; - function g(t, n, r) { - return function (o, i) { - n && (i = o, o = e); - for (var a = 0; a < t.length; a++) i = t[a].apply(o, r ? [i] : []); - return r ? i : o; - }; - } - function b(e, t, n, r) { - if ("function" != typeof e && (r || void 0 !== e)) throw new TypeError(t + " must " + (n || "be") + " a function" + (r ? "" : " or undefined")); - return e; - } - function applyDec(e, t, n, r, o, i, u, s, f, l, p) { - function d(e) { - if (!p(e)) throw new TypeError("Attempted to access private element on non-instance"); - } - var h = [].concat(t[0]), - v = t[3], - w = !u, - D = 1 === o, - S = 3 === o, - j = 4 === o, - E = 2 === o; - function I(t, n, r) { - return function (o, i) { - return n && (i = o, o = e), r && r(o), P[t].call(o, i); - }; - } - if (!w) { - var P = {}, - k = [], - F = S ? "get" : j || D ? "set" : "value"; - if (f ? (l || D ? P = { - get: setFunctionName(function () { - return v(this); - }, r, "get"), - set: function set(e) { - t[4](this, e); - } - } : P[F] = v, l || setFunctionName(P[F], r, E ? "" : F)) : l || (P = Object.getOwnPropertyDescriptor(e, r)), !l && !f) { - if ((c = y[+s][r]) && 7 !== (c ^ o)) throw Error("Decorating two elements with the same name (" + P[F].name + ") is not supported yet"); - y[+s][r] = o < 3 ? 1 : o; - } - } - for (var N = e, O = h.length - 1; O >= 0; O -= n ? 2 : 1) { - var T = b(h[O], "A decorator", "be", !0), - z = n ? h[O - 1] : void 0, - A = {}, - H = { - kind: ["field", "accessor", "method", "getter", "setter", "class"][o], - name: r, - metadata: a, - addInitializer: function (e, t) { - if (e.v) throw new TypeError("attempted to call addInitializer after decoration was finished"); - b(t, "An initializer", "be", !0), i.push(t); - }.bind(null, A) - }; - if (w) c = T.call(z, N, H), A.v = 1, b(c, "class decorators", "return") && (N = c);else if (H["static"] = s, H["private"] = f, c = H.access = { - has: f ? p.bind() : function (e) { - return r in e; - } - }, j || (c.get = f ? E ? function (e) { - return d(e), P.value; - } : I("get", 0, d) : function (e) { - return e[r]; - }), E || S || (c.set = f ? I("set", 0, d) : function (e, t) { - e[r] = t; - }), N = T.call(z, D ? { - get: P.get, - set: P.set - } : P[F], H), A.v = 1, D) { - if ("object" == _typeof(N) && N) (c = b(N.get, "accessor.get")) && (P.get = c), (c = b(N.set, "accessor.set")) && (P.set = c), (c = b(N.init, "accessor.init")) && k.unshift(c);else if (void 0 !== N) throw new TypeError("accessor decorators must return an object with get, set, or init properties or undefined"); - } else b(N, (l ? "field" : "method") + " decorators", "return") && (l ? k.unshift(N) : P[F] = N); - } - return o < 2 && u.push(g(k, s, 1), g(i, s, 0)), l || w || (f ? D ? u.splice(-1, 0, I("get", s), I("set", s)) : u.push(E ? P[F] : b.call.bind(P[F])) : m(e, r, P)), N; - } - function w(e) { - return m(e, d, { - configurable: !0, - enumerable: !0, - value: a - }); - } - return void 0 !== i && (a = i[d]), a = h(null == a ? null : a), f = [], l = function l(e) { - e && f.push(g(e)); - }, p = function p(t, r) { - for (var i = 0; i < n.length; i++) { - var a = n[i], - c = a[1], - l = 7 & c; - if ((8 & c) == t && !l == r) { - var p = a[2], - d = !!a[3], - m = 16 & c; - applyDec(t ? e : e.prototype, a, m, d ? "#" + p : toPropertyKey(p), l, l < 2 ? [] : t ? s = s || [] : u = u || [], f, !!t, d, r, t && d ? function (t) { - return checkInRHS(t) === e; - } : o); - } - } - }, p(8, 0), p(0, 0), p(8, 1), p(0, 1), l(u), l(s), c = f, v || w(e), { - e: c, - get c() { - var n = []; - return v && [w(e = applyDec(e, [t], r, e.name, 5, n)), g(n, 1)]; - } - }; -} -export { applyDecs2311 as default }; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js deleted file mode 100644 index 9ace772..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js +++ /dev/null @@ -1,6 +0,0 @@ -function _arrayLikeToArray(r, a) { - (null == a || a > r.length) && (a = r.length); - for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; - return n; -} -export { _arrayLikeToArray as default }; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js deleted file mode 100644 index 99fa715..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js +++ /dev/null @@ -1,4 +0,0 @@ -function _arrayWithHoles(r) { - if (Array.isArray(r)) return r; -} -export { _arrayWithHoles as default }; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js deleted file mode 100644 index 1ce6f21..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js +++ /dev/null @@ -1,5 +0,0 @@ -import arrayLikeToArray from "./arrayLikeToArray.js"; -function _arrayWithoutHoles(r) { - if (Array.isArray(r)) return arrayLikeToArray(r); -} -export { _arrayWithoutHoles as default }; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/assertClassBrand.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/assertClassBrand.js deleted file mode 100644 index ae7b712..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/assertClassBrand.js +++ /dev/null @@ -1,5 +0,0 @@ -function _assertClassBrand(e, t, n) { - if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; - throw new TypeError("Private element is not present on this object"); -} -export { _assertClassBrand as default }; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js deleted file mode 100644 index 4a41bde..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js +++ /dev/null @@ -1,5 +0,0 @@ -function _assertThisInitialized(e) { - if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); - return e; -} -export { _assertThisInitialized as default }; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/asyncGeneratorDelegate.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/asyncGeneratorDelegate.js deleted file mode 100644 index e026689..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/asyncGeneratorDelegate.js +++ /dev/null @@ -1,24 +0,0 @@ -import OverloadYield from "./OverloadYield.js"; -function _asyncGeneratorDelegate(t) { - var e = {}, - n = !1; - function pump(e, r) { - return n = !0, r = new Promise(function (n) { - n(t[e](r)); - }), { - done: !1, - value: new OverloadYield(r, 1) - }; - } - return e["undefined" != typeof Symbol && Symbol.iterator || "@@iterator"] = function () { - return this; - }, e.next = function (t) { - return n ? (n = !1, t) : pump("next", t); - }, "function" == typeof t["throw"] && (e["throw"] = function (t) { - if (n) throw n = !1, t; - return pump("throw", t); - }), "function" == typeof t["return"] && (e["return"] = function (t) { - return n ? (n = !1, t) : pump("return", t); - }), e; -} -export { _asyncGeneratorDelegate as default }; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/asyncIterator.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/asyncIterator.js deleted file mode 100644 index 2ed00b7..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/asyncIterator.js +++ /dev/null @@ -1,45 +0,0 @@ -function _asyncIterator(r) { - var n, - t, - o, - e = 2; - for ("undefined" != typeof Symbol && (t = Symbol.asyncIterator, o = Symbol.iterator); e--;) { - if (t && null != (n = r[t])) return n.call(r); - if (o && null != (n = r[o])) return new AsyncFromSyncIterator(n.call(r)); - t = "@@asyncIterator", o = "@@iterator"; - } - throw new TypeError("Object is not async iterable"); -} -function AsyncFromSyncIterator(r) { - function AsyncFromSyncIteratorContinuation(r) { - if (Object(r) !== r) return Promise.reject(new TypeError(r + " is not an object.")); - var n = r.done; - return Promise.resolve(r.value).then(function (r) { - return { - value: r, - done: n - }; - }); - } - return AsyncFromSyncIterator = function AsyncFromSyncIterator(r) { - this.s = r, this.n = r.next; - }, AsyncFromSyncIterator.prototype = { - s: null, - n: null, - next: function next() { - return AsyncFromSyncIteratorContinuation(this.n.apply(this.s, arguments)); - }, - "return": function _return(r) { - var n = this.s["return"]; - return void 0 === n ? Promise.resolve({ - value: r, - done: !0 - }) : AsyncFromSyncIteratorContinuation(n.apply(this.s, arguments)); - }, - "throw": function _throw(r) { - var n = this.s["return"]; - return void 0 === n ? Promise.reject(r) : AsyncFromSyncIteratorContinuation(n.apply(this.s, arguments)); - } - }, new AsyncFromSyncIterator(r); -} -export { _asyncIterator as default }; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js deleted file mode 100644 index 00f29b1..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js +++ /dev/null @@ -1,26 +0,0 @@ -function asyncGeneratorStep(n, t, e, r, o, a, c) { - try { - var i = n[a](c), - u = i.value; - } catch (n) { - return void e(n); - } - i.done ? t(u) : Promise.resolve(u).then(r, o); -} -function _asyncToGenerator(n) { - return function () { - var t = this, - e = arguments; - return new Promise(function (r, o) { - var a = n.apply(t, e); - function _next(n) { - asyncGeneratorStep(a, r, o, _next, _throw, "next", n); - } - function _throw(n) { - asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); - } - _next(void 0); - }); - }; -} -export { _asyncToGenerator as default }; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/awaitAsyncGenerator.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/awaitAsyncGenerator.js deleted file mode 100644 index 097c88c..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/awaitAsyncGenerator.js +++ /dev/null @@ -1,5 +0,0 @@ -import OverloadYield from "./OverloadYield.js"; -function _awaitAsyncGenerator(e) { - return new OverloadYield(e, 0); -} -export { _awaitAsyncGenerator as default }; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/callSuper.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/callSuper.js deleted file mode 100644 index 6d17a4e..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/callSuper.js +++ /dev/null @@ -1,7 +0,0 @@ -import getPrototypeOf from "./getPrototypeOf.js"; -import isNativeReflectConstruct from "./isNativeReflectConstruct.js"; -import possibleConstructorReturn from "./possibleConstructorReturn.js"; -function _callSuper(t, o, e) { - return o = getPrototypeOf(o), possibleConstructorReturn(t, isNativeReflectConstruct() ? Reflect.construct(o, e || [], getPrototypeOf(t).constructor) : o.apply(t, e)); -} -export { _callSuper as default }; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/checkInRHS.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/checkInRHS.js deleted file mode 100644 index 12f59b4..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/checkInRHS.js +++ /dev/null @@ -1,6 +0,0 @@ -import _typeof from "./typeof.js"; -function _checkInRHS(e) { - if (Object(e) !== e) throw TypeError("right-hand side of 'in' should be an object, got " + (null !== e ? _typeof(e) : "null")); - return e; -} -export { _checkInRHS as default }; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/checkPrivateRedeclaration.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/checkPrivateRedeclaration.js deleted file mode 100644 index e9e6b3b..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/checkPrivateRedeclaration.js +++ /dev/null @@ -1,4 +0,0 @@ -function _checkPrivateRedeclaration(e, t) { - if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); -} -export { _checkPrivateRedeclaration as default }; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/classApplyDescriptorDestructureSet.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/classApplyDescriptorDestructureSet.js deleted file mode 100644 index 5623419..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/classApplyDescriptorDestructureSet.js +++ /dev/null @@ -1,10 +0,0 @@ -function _classApplyDescriptorDestructureSet(e, t) { - if (t.set) return "__destrObj" in t || (t.__destrObj = { - set value(r) { - t.set.call(e, r); - } - }), t.__destrObj; - if (!t.writable) throw new TypeError("attempted to set read only private field"); - return t; -} -export { _classApplyDescriptorDestructureSet as default }; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/classApplyDescriptorGet.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/classApplyDescriptorGet.js deleted file mode 100644 index b9259d3..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/classApplyDescriptorGet.js +++ /dev/null @@ -1,4 +0,0 @@ -function _classApplyDescriptorGet(e, t) { - return t.get ? t.get.call(e) : t.value; -} -export { _classApplyDescriptorGet as default }; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/classApplyDescriptorSet.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/classApplyDescriptorSet.js deleted file mode 100644 index d9c4fbd..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/classApplyDescriptorSet.js +++ /dev/null @@ -1,7 +0,0 @@ -function _classApplyDescriptorSet(e, t, l) { - if (t.set) t.set.call(e, l);else { - if (!t.writable) throw new TypeError("attempted to set read only private field"); - t.value = l; - } -} -export { _classApplyDescriptorSet as default }; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/classCallCheck.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/classCallCheck.js deleted file mode 100644 index bf97219..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/classCallCheck.js +++ /dev/null @@ -1,4 +0,0 @@ -function _classCallCheck(a, n) { - if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); -} -export { _classCallCheck as default }; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/classCheckPrivateStaticAccess.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/classCheckPrivateStaticAccess.js deleted file mode 100644 index 366ed05..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/classCheckPrivateStaticAccess.js +++ /dev/null @@ -1,5 +0,0 @@ -import assertClassBrand from "./assertClassBrand.js"; -function _classCheckPrivateStaticAccess(s, a, r) { - return assertClassBrand(a, s, r); -} -export { _classCheckPrivateStaticAccess as default }; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/classCheckPrivateStaticFieldDescriptor.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/classCheckPrivateStaticFieldDescriptor.js deleted file mode 100644 index 844be91..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/classCheckPrivateStaticFieldDescriptor.js +++ /dev/null @@ -1,4 +0,0 @@ -function _classCheckPrivateStaticFieldDescriptor(t, e) { - if (void 0 === t) throw new TypeError("attempted to " + e + " private static field before its declaration"); -} -export { _classCheckPrivateStaticFieldDescriptor as default }; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/classExtractFieldDescriptor.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/classExtractFieldDescriptor.js deleted file mode 100644 index 652689d..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/classExtractFieldDescriptor.js +++ /dev/null @@ -1,5 +0,0 @@ -import classPrivateFieldGet2 from "./classPrivateFieldGet2.js"; -function _classExtractFieldDescriptor(e, t) { - return classPrivateFieldGet2(t, e); -} -export { _classExtractFieldDescriptor as default }; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/classNameTDZError.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/classNameTDZError.js deleted file mode 100644 index 68e76ff..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/classNameTDZError.js +++ /dev/null @@ -1,4 +0,0 @@ -function _classNameTDZError(e) { - throw new ReferenceError('Class "' + e + '" cannot be referenced in computed property keys.'); -} -export { _classNameTDZError as default }; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/classPrivateFieldDestructureSet.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/classPrivateFieldDestructureSet.js deleted file mode 100644 index 9303366..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/classPrivateFieldDestructureSet.js +++ /dev/null @@ -1,7 +0,0 @@ -import classApplyDescriptorDestructureSet from "./classApplyDescriptorDestructureSet.js"; -import classPrivateFieldGet2 from "./classPrivateFieldGet2.js"; -function _classPrivateFieldDestructureSet(e, t) { - var r = classPrivateFieldGet2(t, e); - return classApplyDescriptorDestructureSet(e, r); -} -export { _classPrivateFieldDestructureSet as default }; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/classPrivateFieldGet.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/classPrivateFieldGet.js deleted file mode 100644 index ce7ebcb..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/classPrivateFieldGet.js +++ /dev/null @@ -1,7 +0,0 @@ -import classApplyDescriptorGet from "./classApplyDescriptorGet.js"; -import classPrivateFieldGet2 from "./classPrivateFieldGet2.js"; -function _classPrivateFieldGet(e, t) { - var r = classPrivateFieldGet2(t, e); - return classApplyDescriptorGet(e, r); -} -export { _classPrivateFieldGet as default }; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/classPrivateFieldGet2.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/classPrivateFieldGet2.js deleted file mode 100644 index 4aa3da6..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/classPrivateFieldGet2.js +++ /dev/null @@ -1,5 +0,0 @@ -import assertClassBrand from "./assertClassBrand.js"; -function _classPrivateFieldGet2(s, a) { - return s.get(assertClassBrand(s, a)); -} -export { _classPrivateFieldGet2 as default }; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/classPrivateFieldInitSpec.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/classPrivateFieldInitSpec.js deleted file mode 100644 index 5dcdbe0..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/classPrivateFieldInitSpec.js +++ /dev/null @@ -1,5 +0,0 @@ -import checkPrivateRedeclaration from "./checkPrivateRedeclaration.js"; -function _classPrivateFieldInitSpec(e, t, a) { - checkPrivateRedeclaration(e, t), t.set(e, a); -} -export { _classPrivateFieldInitSpec as default }; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/classPrivateFieldLooseBase.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/classPrivateFieldLooseBase.js deleted file mode 100644 index 4bd662c..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/classPrivateFieldLooseBase.js +++ /dev/null @@ -1,5 +0,0 @@ -function _classPrivateFieldBase(e, t) { - if (!{}.hasOwnProperty.call(e, t)) throw new TypeError("attempted to use private field on non-instance"); - return e; -} -export { _classPrivateFieldBase as default }; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/classPrivateFieldLooseKey.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/classPrivateFieldLooseKey.js deleted file mode 100644 index 90d2193..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/classPrivateFieldLooseKey.js +++ /dev/null @@ -1,5 +0,0 @@ -var id = 0; -function _classPrivateFieldKey(e) { - return "__private_" + id++ + "_" + e; -} -export { _classPrivateFieldKey as default }; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/classPrivateFieldSet.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/classPrivateFieldSet.js deleted file mode 100644 index b5161bd..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/classPrivateFieldSet.js +++ /dev/null @@ -1,7 +0,0 @@ -import classApplyDescriptorSet from "./classApplyDescriptorSet.js"; -import classPrivateFieldGet2 from "./classPrivateFieldGet2.js"; -function _classPrivateFieldSet(e, t, r) { - var s = classPrivateFieldGet2(t, e); - return classApplyDescriptorSet(e, s, r), r; -} -export { _classPrivateFieldSet as default }; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/classPrivateFieldSet2.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/classPrivateFieldSet2.js deleted file mode 100644 index 337b01a..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/classPrivateFieldSet2.js +++ /dev/null @@ -1,5 +0,0 @@ -import assertClassBrand from "./assertClassBrand.js"; -function _classPrivateFieldSet2(s, a, r) { - return s.set(assertClassBrand(s, a), r), r; -} -export { _classPrivateFieldSet2 as default }; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/classPrivateGetter.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/classPrivateGetter.js deleted file mode 100644 index ff3e985..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/classPrivateGetter.js +++ /dev/null @@ -1,5 +0,0 @@ -import assertClassBrand from "./assertClassBrand.js"; -function _classPrivateGetter(s, r, a) { - return a(assertClassBrand(s, r)); -} -export { _classPrivateGetter as default }; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/classPrivateMethodGet.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/classPrivateMethodGet.js deleted file mode 100644 index 4832fc6..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/classPrivateMethodGet.js +++ /dev/null @@ -1,5 +0,0 @@ -import assertClassBrand from "./assertClassBrand.js"; -function _classPrivateMethodGet(s, a, r) { - return assertClassBrand(a, s), r; -} -export { _classPrivateMethodGet as default }; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/classPrivateMethodInitSpec.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/classPrivateMethodInitSpec.js deleted file mode 100644 index 61e23e2..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/classPrivateMethodInitSpec.js +++ /dev/null @@ -1,5 +0,0 @@ -import checkPrivateRedeclaration from "./checkPrivateRedeclaration.js"; -function _classPrivateMethodInitSpec(e, a) { - checkPrivateRedeclaration(e, a), a.add(e); -} -export { _classPrivateMethodInitSpec as default }; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/classPrivateMethodSet.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/classPrivateMethodSet.js deleted file mode 100644 index d181b51..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/classPrivateMethodSet.js +++ /dev/null @@ -1,4 +0,0 @@ -function _classPrivateMethodSet() { - throw new TypeError("attempted to reassign private method"); -} -export { _classPrivateMethodSet as default }; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/classPrivateSetter.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/classPrivateSetter.js deleted file mode 100644 index 9a80d59..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/classPrivateSetter.js +++ /dev/null @@ -1,5 +0,0 @@ -import assertClassBrand from "./assertClassBrand.js"; -function _classPrivateSetter(s, r, a, t) { - return r(assertClassBrand(s, a), t), t; -} -export { _classPrivateSetter as default }; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/classStaticPrivateFieldDestructureSet.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/classStaticPrivateFieldDestructureSet.js deleted file mode 100644 index 747e639..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/classStaticPrivateFieldDestructureSet.js +++ /dev/null @@ -1,7 +0,0 @@ -import classApplyDescriptorDestructureSet from "./classApplyDescriptorDestructureSet.js"; -import assertClassBrand from "./assertClassBrand.js"; -import classCheckPrivateStaticFieldDescriptor from "./classCheckPrivateStaticFieldDescriptor.js"; -function _classStaticPrivateFieldDestructureSet(t, r, s) { - return assertClassBrand(r, t), classCheckPrivateStaticFieldDescriptor(s, "set"), classApplyDescriptorDestructureSet(t, s); -} -export { _classStaticPrivateFieldDestructureSet as default }; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/classStaticPrivateFieldSpecGet.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/classStaticPrivateFieldSpecGet.js deleted file mode 100644 index 23684b7..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/classStaticPrivateFieldSpecGet.js +++ /dev/null @@ -1,7 +0,0 @@ -import classApplyDescriptorGet from "./classApplyDescriptorGet.js"; -import assertClassBrand from "./assertClassBrand.js"; -import classCheckPrivateStaticFieldDescriptor from "./classCheckPrivateStaticFieldDescriptor.js"; -function _classStaticPrivateFieldSpecGet(t, s, r) { - return assertClassBrand(s, t), classCheckPrivateStaticFieldDescriptor(r, "get"), classApplyDescriptorGet(t, r); -} -export { _classStaticPrivateFieldSpecGet as default }; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/classStaticPrivateFieldSpecSet.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/classStaticPrivateFieldSpecSet.js deleted file mode 100644 index 3a31468..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/classStaticPrivateFieldSpecSet.js +++ /dev/null @@ -1,7 +0,0 @@ -import classApplyDescriptorSet from "./classApplyDescriptorSet.js"; -import assertClassBrand from "./assertClassBrand.js"; -import classCheckPrivateStaticFieldDescriptor from "./classCheckPrivateStaticFieldDescriptor.js"; -function _classStaticPrivateFieldSpecSet(s, t, r, e) { - return assertClassBrand(t, s), classCheckPrivateStaticFieldDescriptor(r, "set"), classApplyDescriptorSet(s, r, e), e; -} -export { _classStaticPrivateFieldSpecSet as default }; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/classStaticPrivateMethodGet.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/classStaticPrivateMethodGet.js deleted file mode 100644 index 047b177..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/classStaticPrivateMethodGet.js +++ /dev/null @@ -1,5 +0,0 @@ -import assertClassBrand from "./assertClassBrand.js"; -function _classStaticPrivateMethodGet(s, a, t) { - return assertClassBrand(a, s), t; -} -export { _classStaticPrivateMethodGet as default }; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/classStaticPrivateMethodSet.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/classStaticPrivateMethodSet.js deleted file mode 100644 index a61ae63..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/classStaticPrivateMethodSet.js +++ /dev/null @@ -1,4 +0,0 @@ -function _classStaticPrivateMethodSet() { - throw new TypeError("attempted to set read only static private field"); -} -export { _classStaticPrivateMethodSet as default }; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/construct.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/construct.js deleted file mode 100644 index 91609ff..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/construct.js +++ /dev/null @@ -1,10 +0,0 @@ -import isNativeReflectConstruct from "./isNativeReflectConstruct.js"; -import setPrototypeOf from "./setPrototypeOf.js"; -function _construct(t, e, r) { - if (isNativeReflectConstruct()) return Reflect.construct.apply(null, arguments); - var o = [null]; - o.push.apply(o, e); - var p = new (t.bind.apply(t, o))(); - return r && setPrototypeOf(p, r.prototype), p; -} -export { _construct as default }; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/createClass.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/createClass.js deleted file mode 100644 index 9b17851..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/createClass.js +++ /dev/null @@ -1,13 +0,0 @@ -import toPropertyKey from "./toPropertyKey.js"; -function _defineProperties(e, r) { - for (var t = 0; t < r.length; t++) { - var o = r[t]; - o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, toPropertyKey(o.key), o); - } -} -function _createClass(e, r, t) { - return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { - writable: !1 - }), e; -} -export { _createClass as default }; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelper.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelper.js deleted file mode 100644 index 93b97f9..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelper.js +++ /dev/null @@ -1,50 +0,0 @@ -import unsupportedIterableToArray from "./unsupportedIterableToArray.js"; -function _createForOfIteratorHelper(r, e) { - var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; - if (!t) { - if (Array.isArray(r) || (t = unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { - t && (r = t); - var _n = 0, - F = function F() {}; - return { - s: F, - n: function n() { - return _n >= r.length ? { - done: !0 - } : { - done: !1, - value: r[_n++] - }; - }, - e: function e(r) { - throw r; - }, - f: F - }; - } - throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); - } - var o, - a = !0, - u = !1; - return { - s: function s() { - t = t.call(r); - }, - n: function n() { - var r = t.next(); - return a = r.done, r; - }, - e: function e(r) { - u = !0, o = r; - }, - f: function f() { - try { - a || null == t["return"] || t["return"](); - } finally { - if (u) throw o; - } - } - }; -} -export { _createForOfIteratorHelper as default }; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelperLoose.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelperLoose.js deleted file mode 100644 index 3deaae4..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelperLoose.js +++ /dev/null @@ -1,19 +0,0 @@ -import unsupportedIterableToArray from "./unsupportedIterableToArray.js"; -function _createForOfIteratorHelperLoose(r, e) { - var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; - if (t) return (t = t.call(r)).next.bind(t); - if (Array.isArray(r) || (t = unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { - t && (r = t); - var o = 0; - return function () { - return o >= r.length ? { - done: !0 - } : { - done: !1, - value: r[o++] - }; - }; - } - throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); -} -export { _createForOfIteratorHelperLoose as default }; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/createSuper.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/createSuper.js deleted file mode 100644 index dfabf71..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/createSuper.js +++ /dev/null @@ -1,16 +0,0 @@ -import getPrototypeOf from "./getPrototypeOf.js"; -import isNativeReflectConstruct from "./isNativeReflectConstruct.js"; -import possibleConstructorReturn from "./possibleConstructorReturn.js"; -function _createSuper(t) { - var r = isNativeReflectConstruct(); - return function () { - var e, - o = getPrototypeOf(t); - if (r) { - var s = getPrototypeOf(this).constructor; - e = Reflect.construct(o, arguments, s); - } else e = o.apply(this, arguments); - return possibleConstructorReturn(this, e); - }; -} -export { _createSuper as default }; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/decorate.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/decorate.js deleted file mode 100644 index f76b6a6..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/decorate.js +++ /dev/null @@ -1,250 +0,0 @@ -import toArray from "./toArray.js"; -import toPropertyKey from "./toPropertyKey.js"; -function _decorate(e, r, t, i) { - var o = _getDecoratorsApi(); - if (i) for (var n = 0; n < i.length; n++) o = i[n](o); - var s = r(function (e) { - o.initializeInstanceElements(e, a.elements); - }, t), - a = o.decorateClass(_coalesceClassElements(s.d.map(_createElementDescriptor)), e); - return o.initializeClassElements(s.F, a.elements), o.runClassFinishers(s.F, a.finishers); -} -function _getDecoratorsApi() { - _getDecoratorsApi = function _getDecoratorsApi() { - return e; - }; - var e = { - elementsDefinitionOrder: [["method"], ["field"]], - initializeInstanceElements: function initializeInstanceElements(e, r) { - ["method", "field"].forEach(function (t) { - r.forEach(function (r) { - r.kind === t && "own" === r.placement && this.defineClassElement(e, r); - }, this); - }, this); - }, - initializeClassElements: function initializeClassElements(e, r) { - var t = e.prototype; - ["method", "field"].forEach(function (i) { - r.forEach(function (r) { - var o = r.placement; - if (r.kind === i && ("static" === o || "prototype" === o)) { - var n = "static" === o ? e : t; - this.defineClassElement(n, r); - } - }, this); - }, this); - }, - defineClassElement: function defineClassElement(e, r) { - var t = r.descriptor; - if ("field" === r.kind) { - var i = r.initializer; - t = { - enumerable: t.enumerable, - writable: t.writable, - configurable: t.configurable, - value: void 0 === i ? void 0 : i.call(e) - }; - } - Object.defineProperty(e, r.key, t); - }, - decorateClass: function decorateClass(e, r) { - var t = [], - i = [], - o = { - "static": [], - prototype: [], - own: [] - }; - if (e.forEach(function (e) { - this.addElementPlacement(e, o); - }, this), e.forEach(function (e) { - if (!_hasDecorators(e)) return t.push(e); - var r = this.decorateElement(e, o); - t.push(r.element), t.push.apply(t, r.extras), i.push.apply(i, r.finishers); - }, this), !r) return { - elements: t, - finishers: i - }; - var n = this.decorateConstructor(t, r); - return i.push.apply(i, n.finishers), n.finishers = i, n; - }, - addElementPlacement: function addElementPlacement(e, r, t) { - var i = r[e.placement]; - if (!t && -1 !== i.indexOf(e.key)) throw new TypeError("Duplicated element (" + e.key + ")"); - i.push(e.key); - }, - decorateElement: function decorateElement(e, r) { - for (var t = [], i = [], o = e.decorators, n = o.length - 1; n >= 0; n--) { - var s = r[e.placement]; - s.splice(s.indexOf(e.key), 1); - var a = this.fromElementDescriptor(e), - l = this.toElementFinisherExtras((0, o[n])(a) || a); - e = l.element, this.addElementPlacement(e, r), l.finisher && i.push(l.finisher); - var c = l.extras; - if (c) { - for (var p = 0; p < c.length; p++) this.addElementPlacement(c[p], r); - t.push.apply(t, c); - } - } - return { - element: e, - finishers: i, - extras: t - }; - }, - decorateConstructor: function decorateConstructor(e, r) { - for (var t = [], i = r.length - 1; i >= 0; i--) { - var o = this.fromClassDescriptor(e), - n = this.toClassDescriptor((0, r[i])(o) || o); - if (void 0 !== n.finisher && t.push(n.finisher), void 0 !== n.elements) { - e = n.elements; - for (var s = 0; s < e.length - 1; s++) for (var a = s + 1; a < e.length; a++) if (e[s].key === e[a].key && e[s].placement === e[a].placement) throw new TypeError("Duplicated element (" + e[s].key + ")"); - } - } - return { - elements: e, - finishers: t - }; - }, - fromElementDescriptor: function fromElementDescriptor(e) { - var r = { - kind: e.kind, - key: e.key, - placement: e.placement, - descriptor: e.descriptor - }; - return Object.defineProperty(r, Symbol.toStringTag, { - value: "Descriptor", - configurable: !0 - }), "field" === e.kind && (r.initializer = e.initializer), r; - }, - toElementDescriptors: function toElementDescriptors(e) { - if (void 0 !== e) return toArray(e).map(function (e) { - var r = this.toElementDescriptor(e); - return this.disallowProperty(e, "finisher", "An element descriptor"), this.disallowProperty(e, "extras", "An element descriptor"), r; - }, this); - }, - toElementDescriptor: function toElementDescriptor(e) { - var r = e.kind + ""; - if ("method" !== r && "field" !== r) throw new TypeError('An element descriptor\'s .kind property must be either "method" or "field", but a decorator created an element descriptor with .kind "' + r + '"'); - var t = toPropertyKey(e.key), - i = e.placement + ""; - if ("static" !== i && "prototype" !== i && "own" !== i) throw new TypeError('An element descriptor\'s .placement property must be one of "static", "prototype" or "own", but a decorator created an element descriptor with .placement "' + i + '"'); - var o = e.descriptor; - this.disallowProperty(e, "elements", "An element descriptor"); - var n = { - kind: r, - key: t, - placement: i, - descriptor: Object.assign({}, o) - }; - return "field" !== r ? this.disallowProperty(e, "initializer", "A method descriptor") : (this.disallowProperty(o, "get", "The property descriptor of a field descriptor"), this.disallowProperty(o, "set", "The property descriptor of a field descriptor"), this.disallowProperty(o, "value", "The property descriptor of a field descriptor"), n.initializer = e.initializer), n; - }, - toElementFinisherExtras: function toElementFinisherExtras(e) { - return { - element: this.toElementDescriptor(e), - finisher: _optionalCallableProperty(e, "finisher"), - extras: this.toElementDescriptors(e.extras) - }; - }, - fromClassDescriptor: function fromClassDescriptor(e) { - var r = { - kind: "class", - elements: e.map(this.fromElementDescriptor, this) - }; - return Object.defineProperty(r, Symbol.toStringTag, { - value: "Descriptor", - configurable: !0 - }), r; - }, - toClassDescriptor: function toClassDescriptor(e) { - var r = e.kind + ""; - if ("class" !== r) throw new TypeError('A class descriptor\'s .kind property must be "class", but a decorator created a class descriptor with .kind "' + r + '"'); - this.disallowProperty(e, "key", "A class descriptor"), this.disallowProperty(e, "placement", "A class descriptor"), this.disallowProperty(e, "descriptor", "A class descriptor"), this.disallowProperty(e, "initializer", "A class descriptor"), this.disallowProperty(e, "extras", "A class descriptor"); - var t = _optionalCallableProperty(e, "finisher"); - return { - elements: this.toElementDescriptors(e.elements), - finisher: t - }; - }, - runClassFinishers: function runClassFinishers(e, r) { - for (var t = 0; t < r.length; t++) { - var i = (0, r[t])(e); - if (void 0 !== i) { - if ("function" != typeof i) throw new TypeError("Finishers must return a constructor."); - e = i; - } - } - return e; - }, - disallowProperty: function disallowProperty(e, r, t) { - if (void 0 !== e[r]) throw new TypeError(t + " can't have a ." + r + " property."); - } - }; - return e; -} -function _createElementDescriptor(e) { - var r, - t = toPropertyKey(e.key); - "method" === e.kind ? r = { - value: e.value, - writable: !0, - configurable: !0, - enumerable: !1 - } : "get" === e.kind ? r = { - get: e.value, - configurable: !0, - enumerable: !1 - } : "set" === e.kind ? r = { - set: e.value, - configurable: !0, - enumerable: !1 - } : "field" === e.kind && (r = { - configurable: !0, - writable: !0, - enumerable: !0 - }); - var i = { - kind: "field" === e.kind ? "field" : "method", - key: t, - placement: e["static"] ? "static" : "field" === e.kind ? "own" : "prototype", - descriptor: r - }; - return e.decorators && (i.decorators = e.decorators), "field" === e.kind && (i.initializer = e.value), i; -} -function _coalesceGetterSetter(e, r) { - void 0 !== e.descriptor.get ? r.descriptor.get = e.descriptor.get : r.descriptor.set = e.descriptor.set; -} -function _coalesceClassElements(e) { - for (var r = [], isSameElement = function isSameElement(e) { - return "method" === e.kind && e.key === o.key && e.placement === o.placement; - }, t = 0; t < e.length; t++) { - var i, - o = e[t]; - if ("method" === o.kind && (i = r.find(isSameElement))) { - if (_isDataDescriptor(o.descriptor) || _isDataDescriptor(i.descriptor)) { - if (_hasDecorators(o) || _hasDecorators(i)) throw new ReferenceError("Duplicated methods (" + o.key + ") can't be decorated."); - i.descriptor = o.descriptor; - } else { - if (_hasDecorators(o)) { - if (_hasDecorators(i)) throw new ReferenceError("Decorators can't be placed on different accessors with for the same property (" + o.key + ")."); - i.decorators = o.decorators; - } - _coalesceGetterSetter(o, i); - } - } else r.push(o); - } - return r; -} -function _hasDecorators(e) { - return e.decorators && e.decorators.length; -} -function _isDataDescriptor(e) { - return void 0 !== e && !(void 0 === e.value && void 0 === e.writable); -} -function _optionalCallableProperty(e, r) { - var t = e[r]; - if (void 0 !== t && "function" != typeof t) throw new TypeError("Expected '" + r + "' to be a function"); - return t; -} -export { _decorate as default }; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/defaults.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/defaults.js deleted file mode 100644 index d3041a3..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/defaults.js +++ /dev/null @@ -1,9 +0,0 @@ -function _defaults(e, r) { - for (var t = Object.getOwnPropertyNames(r), o = 0; o < t.length; o++) { - var n = t[o], - a = Object.getOwnPropertyDescriptor(r, n); - a && a.configurable && void 0 === e[n] && Object.defineProperty(e, n, a); - } - return e; -} -export { _defaults as default }; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/defineAccessor.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/defineAccessor.js deleted file mode 100644 index a8292de..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/defineAccessor.js +++ /dev/null @@ -1,8 +0,0 @@ -function _defineAccessor(e, r, n, t) { - var c = { - configurable: !0, - enumerable: !0 - }; - return c[e] = t, Object.defineProperty(r, n, c); -} -export { _defineAccessor as default }; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/defineEnumerableProperties.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/defineEnumerableProperties.js deleted file mode 100644 index 3d31d98..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/defineEnumerableProperties.js +++ /dev/null @@ -1,12 +0,0 @@ -function _defineEnumerableProperties(e, r) { - for (var t in r) { - var n = r[t]; - n.configurable = n.enumerable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, t, n); - } - if (Object.getOwnPropertySymbols) for (var a = Object.getOwnPropertySymbols(r), b = 0; b < a.length; b++) { - var i = a[b]; - (n = r[i]).configurable = n.enumerable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, i, n); - } - return e; -} -export { _defineEnumerableProperties as default }; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/defineProperty.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/defineProperty.js deleted file mode 100644 index 05ec32b..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/defineProperty.js +++ /dev/null @@ -1,10 +0,0 @@ -import toPropertyKey from "./toPropertyKey.js"; -function _defineProperty(e, r, t) { - return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, { - value: t, - enumerable: !0, - configurable: !0, - writable: !0 - }) : e[r] = t, e; -} -export { _defineProperty as default }; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/dispose.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/dispose.js deleted file mode 100644 index a87ab20..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/dispose.js +++ /dev/null @@ -1,28 +0,0 @@ -function dispose_SuppressedError(r, e) { - return "undefined" != typeof SuppressedError ? dispose_SuppressedError = SuppressedError : (dispose_SuppressedError = function dispose_SuppressedError(r, e) { - this.suppressed = e, this.error = r, this.stack = Error().stack; - }, dispose_SuppressedError.prototype = Object.create(Error.prototype, { - constructor: { - value: dispose_SuppressedError, - writable: !0, - configurable: !0 - } - })), new dispose_SuppressedError(r, e); -} -function _dispose(r, e, s) { - function next() { - for (; r.length > 0;) try { - var o = r.pop(), - p = o.d.call(o.v); - if (o.a) return Promise.resolve(p).then(next, err); - } catch (r) { - return err(r); - } - if (s) throw e; - } - function err(r) { - return e = s ? new dispose_SuppressedError(e, r) : r, s = !0, next(); - } - return next(); -} -export { _dispose as default }; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/extends.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/extends.js deleted file mode 100644 index 53f118c..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/extends.js +++ /dev/null @@ -1,10 +0,0 @@ -function _extends() { - return _extends = Object.assign ? Object.assign.bind() : function (n) { - for (var e = 1; e < arguments.length; e++) { - var t = arguments[e]; - for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); - } - return n; - }, _extends.apply(null, arguments); -} -export { _extends as default }; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/get.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/get.js deleted file mode 100644 index 8124bc0..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/get.js +++ /dev/null @@ -1,11 +0,0 @@ -import superPropBase from "./superPropBase.js"; -function _get() { - return _get = "undefined" != typeof Reflect && Reflect.get ? Reflect.get.bind() : function (e, t, r) { - var p = superPropBase(e, t); - if (p) { - var n = Object.getOwnPropertyDescriptor(p, t); - return n.get ? n.get.call(arguments.length < 3 ? e : r) : n.value; - } - }, _get.apply(null, arguments); -} -export { _get as default }; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js deleted file mode 100644 index 9073c45..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js +++ /dev/null @@ -1,6 +0,0 @@ -function _getPrototypeOf(t) { - return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { - return t.__proto__ || Object.getPrototypeOf(t); - }, _getPrototypeOf(t); -} -export { _getPrototypeOf as default }; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/identity.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/identity.js deleted file mode 100644 index 6b564ac..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/identity.js +++ /dev/null @@ -1,4 +0,0 @@ -function _identity(t) { - return t; -} -export { _identity as default }; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/importDeferProxy.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/importDeferProxy.js deleted file mode 100644 index 6d35b52..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/importDeferProxy.js +++ /dev/null @@ -1,27 +0,0 @@ -function _importDeferProxy(e) { - var t = null, - constValue = function constValue(e) { - return function () { - return e; - }; - }, - proxy = function proxy(r) { - return function (n, o, f) { - return null === t && (t = e()), r(t, o, f); - }; - }; - return new Proxy({}, { - defineProperty: constValue(!1), - deleteProperty: constValue(!1), - get: proxy(Reflect.get), - getOwnPropertyDescriptor: proxy(Reflect.getOwnPropertyDescriptor), - getPrototypeOf: constValue(null), - isExtensible: constValue(!1), - has: proxy(Reflect.has), - ownKeys: proxy(Reflect.ownKeys), - preventExtensions: constValue(!0), - set: constValue(!1), - setPrototypeOf: constValue(!1) - }); -} -export { _importDeferProxy as default }; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/inherits.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/inherits.js deleted file mode 100644 index 78f6e4e..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/inherits.js +++ /dev/null @@ -1,14 +0,0 @@ -import setPrototypeOf from "./setPrototypeOf.js"; -function _inherits(t, e) { - if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); - t.prototype = Object.create(e && e.prototype, { - constructor: { - value: t, - writable: !0, - configurable: !0 - } - }), Object.defineProperty(t, "prototype", { - writable: !1 - }), e && setPrototypeOf(t, e); -} -export { _inherits as default }; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js deleted file mode 100644 index 0bd1330..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js +++ /dev/null @@ -1,5 +0,0 @@ -import setPrototypeOf from "./setPrototypeOf.js"; -function _inheritsLoose(t, o) { - t.prototype = Object.create(o.prototype), t.prototype.constructor = t, setPrototypeOf(t, o); -} -export { _inheritsLoose as default }; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/initializerDefineProperty.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/initializerDefineProperty.js deleted file mode 100644 index 68bcc2c..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/initializerDefineProperty.js +++ /dev/null @@ -1,9 +0,0 @@ -function _initializerDefineProperty(e, i, r, l) { - r && Object.defineProperty(e, i, { - enumerable: r.enumerable, - configurable: r.configurable, - writable: r.writable, - value: r.initializer ? r.initializer.call(l) : void 0 - }); -} -export { _initializerDefineProperty as default }; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/initializerWarningHelper.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/initializerWarningHelper.js deleted file mode 100644 index 0a658e3..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/initializerWarningHelper.js +++ /dev/null @@ -1,4 +0,0 @@ -function _initializerWarningHelper(r, e) { - throw Error("Decorating class property failed. Please ensure that transform-class-properties is enabled and runs after the decorators transform."); -} -export { _initializerWarningHelper as default }; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/instanceof.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/instanceof.js deleted file mode 100644 index 316539e..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/instanceof.js +++ /dev/null @@ -1,4 +0,0 @@ -function _instanceof(n, e) { - return null != e && "undefined" != typeof Symbol && e[Symbol.hasInstance] ? !!e[Symbol.hasInstance](n) : n instanceof e; -} -export { _instanceof as default }; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/interopRequireDefault.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/interopRequireDefault.js deleted file mode 100644 index 365d248..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/interopRequireDefault.js +++ /dev/null @@ -1,6 +0,0 @@ -function _interopRequireDefault(e) { - return e && e.__esModule ? e : { - "default": e - }; -} -export { _interopRequireDefault as default }; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/interopRequireWildcard.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/interopRequireWildcard.js deleted file mode 100644 index ed9ca31..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/interopRequireWildcard.js +++ /dev/null @@ -1,22 +0,0 @@ -import _typeof from "./typeof.js"; -function _interopRequireWildcard(e, t) { - if ("function" == typeof WeakMap) var r = new WeakMap(), - n = new WeakMap(); - return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { - if (!t && e && e.__esModule) return e; - var o, - i, - f = { - __proto__: null, - "default": e - }; - if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; - if (o = t ? n : r) { - if (o.has(e)) return o.get(e); - o.set(e, f); - } - for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); - return f; - })(e, t); -} -export { _interopRequireWildcard as default }; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/isNativeFunction.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/isNativeFunction.js deleted file mode 100644 index 0cfe276..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/isNativeFunction.js +++ /dev/null @@ -1,8 +0,0 @@ -function _isNativeFunction(t) { - try { - return -1 !== Function.toString.call(t).indexOf("[native code]"); - } catch (n) { - return "function" == typeof t; - } -} -export { _isNativeFunction as default }; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js deleted file mode 100644 index 0eb5e39..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js +++ /dev/null @@ -1,9 +0,0 @@ -function _isNativeReflectConstruct() { - try { - var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); - } catch (t) {} - return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { - return !!t; - })(); -} -export { _isNativeReflectConstruct as default }; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/iterableToArray.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/iterableToArray.js deleted file mode 100644 index b7de339..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/iterableToArray.js +++ /dev/null @@ -1,4 +0,0 @@ -function _iterableToArray(r) { - if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); -} -export { _iterableToArray as default }; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js deleted file mode 100644 index 473f067..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js +++ /dev/null @@ -1,28 +0,0 @@ -function _iterableToArrayLimit(r, l) { - var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; - if (null != t) { - var e, - n, - i, - u, - a = [], - f = !0, - o = !1; - try { - if (i = (t = t.call(r)).next, 0 === l) { - if (Object(t) !== t) return; - f = !1; - } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); - } catch (r) { - o = !0, n = r; - } finally { - try { - if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; - } finally { - if (o) throw n; - } - } - return a; - } -} -export { _iterableToArrayLimit as default }; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/jsx.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/jsx.js deleted file mode 100644 index a120e5b..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/jsx.js +++ /dev/null @@ -1,22 +0,0 @@ -var REACT_ELEMENT_TYPE; -function _createRawReactElement(e, r, E, l) { - REACT_ELEMENT_TYPE || (REACT_ELEMENT_TYPE = "function" == typeof Symbol && Symbol["for"] && Symbol["for"]("react.element") || 60103); - var o = e && e.defaultProps, - n = arguments.length - 3; - if (r || 0 === n || (r = { - children: void 0 - }), 1 === n) r.children = l;else if (n > 1) { - for (var t = Array(n), f = 0; f < n; f++) t[f] = arguments[f + 3]; - r.children = t; - } - if (r && o) for (var i in o) void 0 === r[i] && (r[i] = o[i]);else r || (r = o || {}); - return { - $$typeof: REACT_ELEMENT_TYPE, - type: e, - key: void 0 === E ? null : "" + E, - ref: null, - props: r, - _owner: null - }; -} -export { _createRawReactElement as default }; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/maybeArrayLike.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/maybeArrayLike.js deleted file mode 100644 index 527c682..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/maybeArrayLike.js +++ /dev/null @@ -1,9 +0,0 @@ -import arrayLikeToArray from "./arrayLikeToArray.js"; -function _maybeArrayLike(r, a, e) { - if (a && !Array.isArray(a) && "number" == typeof a.length) { - var y = a.length; - return arrayLikeToArray(a, void 0 !== e && e < y ? e : y); - } - return r(a, e); -} -export { _maybeArrayLike as default }; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/newArrowCheck.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/newArrowCheck.js deleted file mode 100644 index 5f70e0d..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/newArrowCheck.js +++ /dev/null @@ -1,4 +0,0 @@ -function _newArrowCheck(n, r) { - if (n !== r) throw new TypeError("Cannot instantiate an arrow function"); -} -export { _newArrowCheck as default }; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/nonIterableRest.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/nonIterableRest.js deleted file mode 100644 index 9050250..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/nonIterableRest.js +++ /dev/null @@ -1,4 +0,0 @@ -function _nonIterableRest() { - throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); -} -export { _nonIterableRest as default }; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js deleted file mode 100644 index fb03235..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js +++ /dev/null @@ -1,4 +0,0 @@ -function _nonIterableSpread() { - throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); -} -export { _nonIterableSpread as default }; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/nullishReceiverError.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/nullishReceiverError.js deleted file mode 100644 index d8c3060..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/nullishReceiverError.js +++ /dev/null @@ -1,4 +0,0 @@ -function _nullishReceiverError(r) { - throw new TypeError("Cannot set property of null or undefined."); -} -export { _nullishReceiverError as default }; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/objectDestructuringEmpty.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/objectDestructuringEmpty.js deleted file mode 100644 index a92eac8..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/objectDestructuringEmpty.js +++ /dev/null @@ -1,4 +0,0 @@ -function _objectDestructuringEmpty(t) { - if (null == t) throw new TypeError("Cannot destructure " + t); -} -export { _objectDestructuringEmpty as default }; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/objectSpread.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/objectSpread.js deleted file mode 100644 index 0f82f06..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/objectSpread.js +++ /dev/null @@ -1,14 +0,0 @@ -import defineProperty from "./defineProperty.js"; -function _objectSpread(e) { - for (var r = 1; r < arguments.length; r++) { - var t = null != arguments[r] ? Object(arguments[r]) : {}, - o = Object.keys(t); - "function" == typeof Object.getOwnPropertySymbols && o.push.apply(o, Object.getOwnPropertySymbols(t).filter(function (e) { - return Object.getOwnPropertyDescriptor(t, e).enumerable; - })), o.forEach(function (r) { - defineProperty(e, r, t[r]); - }); - } - return e; -} -export { _objectSpread as default }; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/objectSpread2.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/objectSpread2.js deleted file mode 100644 index 0035bc7..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/objectSpread2.js +++ /dev/null @@ -1,23 +0,0 @@ -import defineProperty from "./defineProperty.js"; -function ownKeys(e, r) { - var t = Object.keys(e); - if (Object.getOwnPropertySymbols) { - var o = Object.getOwnPropertySymbols(e); - r && (o = o.filter(function (r) { - return Object.getOwnPropertyDescriptor(e, r).enumerable; - })), t.push.apply(t, o); - } - return t; -} -function _objectSpread2(e) { - for (var r = 1; r < arguments.length; r++) { - var t = null != arguments[r] ? arguments[r] : {}; - r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { - defineProperty(e, r, t[r]); - }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { - Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); - }); - } - return e; -} -export { _objectSpread2 as default }; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js deleted file mode 100644 index 598fb9a..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js +++ /dev/null @@ -1,13 +0,0 @@ -import objectWithoutPropertiesLoose from "./objectWithoutPropertiesLoose.js"; -function _objectWithoutProperties(e, t) { - if (null == e) return {}; - var o, - r, - i = objectWithoutPropertiesLoose(e, t); - if (Object.getOwnPropertySymbols) { - var n = Object.getOwnPropertySymbols(e); - for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); - } - return i; -} -export { _objectWithoutProperties as default }; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js deleted file mode 100644 index 90f68f3..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js +++ /dev/null @@ -1,10 +0,0 @@ -function _objectWithoutPropertiesLoose(r, e) { - if (null == r) return {}; - var t = {}; - for (var n in r) if ({}.hasOwnProperty.call(r, n)) { - if (-1 !== e.indexOf(n)) continue; - t[n] = r[n]; - } - return t; -} -export { _objectWithoutPropertiesLoose as default }; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/package.json b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/package.json deleted file mode 100644 index aead43d..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/package.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "type": "module" -} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js deleted file mode 100644 index d84e1e6..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js +++ /dev/null @@ -1,8 +0,0 @@ -import _typeof from "./typeof.js"; -import assertThisInitialized from "./assertThisInitialized.js"; -function _possibleConstructorReturn(t, e) { - if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; - if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); - return assertThisInitialized(t); -} -export { _possibleConstructorReturn as default }; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/readOnlyError.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/readOnlyError.js deleted file mode 100644 index fcc3e33..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/readOnlyError.js +++ /dev/null @@ -1,4 +0,0 @@ -function _readOnlyError(r) { - throw new TypeError('"' + r + '" is read-only'); -} -export { _readOnlyError as default }; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/regenerator.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/regenerator.js deleted file mode 100644 index 6f2f2a1..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/regenerator.js +++ /dev/null @@ -1,89 +0,0 @@ -import regeneratorDefine from "./regeneratorDefine.js"; -function _regenerator() { - /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ - var e, - t, - r = "function" == typeof Symbol ? Symbol : {}, - n = r.iterator || "@@iterator", - o = r.toStringTag || "@@toStringTag"; - function i(r, n, o, i) { - var c = n && n.prototype instanceof Generator ? n : Generator, - u = Object.create(c.prototype); - return regeneratorDefine(u, "_invoke", function (r, n, o) { - var i, - c, - u, - f = 0, - p = o || [], - y = !1, - G = { - p: 0, - n: 0, - v: e, - a: d, - f: d.bind(e, 4), - d: function d(t, r) { - return i = t, c = 0, u = e, G.n = r, a; - } - }; - function d(r, n) { - for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { - var o, - i = p[t], - d = G.p, - l = i[2]; - r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); - } - if (o || r > 1) return a; - throw y = !0, n; - } - return function (o, p, l) { - if (f > 1) throw TypeError("Generator is already running"); - for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { - i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); - try { - if (f = 2, i) { - if (c || (o = "next"), t = i[o]) { - if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); - if (!t.done) return t; - u = t.value, c < 2 && (c = 0); - } else 1 === c && (t = i["return"]) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); - i = e; - } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; - } catch (t) { - i = e, c = 1, u = t; - } finally { - f = 1; - } - } - return { - value: t, - done: y - }; - }; - }(r, o, i), !0), u; - } - var a = {}; - function Generator() {} - function GeneratorFunction() {} - function GeneratorFunctionPrototype() {} - t = Object.getPrototypeOf; - var c = [][n] ? t(t([][n]())) : (regeneratorDefine(t = {}, n, function () { - return this; - }), t), - u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); - function f(e) { - return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, regeneratorDefine(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; - } - return GeneratorFunction.prototype = GeneratorFunctionPrototype, regeneratorDefine(u, "constructor", GeneratorFunctionPrototype), regeneratorDefine(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", regeneratorDefine(GeneratorFunctionPrototype, o, "GeneratorFunction"), regeneratorDefine(u), regeneratorDefine(u, o, "Generator"), regeneratorDefine(u, n, function () { - return this; - }), regeneratorDefine(u, "toString", function () { - return "[object Generator]"; - }), (_regenerator = function _regenerator() { - return { - w: i, - m: f - }; - })(); -} -export { _regenerator as default }; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/regeneratorAsync.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/regeneratorAsync.js deleted file mode 100644 index f73d4e6..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/regeneratorAsync.js +++ /dev/null @@ -1,8 +0,0 @@ -import regeneratorAsyncGen from "./regeneratorAsyncGen.js"; -function _regeneratorAsync(n, e, r, t, o) { - var a = regeneratorAsyncGen(n, e, r, t, o); - return a.next().then(function (n) { - return n.done ? n.value : a.next(); - }); -} -export { _regeneratorAsync as default }; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/regeneratorAsyncGen.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/regeneratorAsyncGen.js deleted file mode 100644 index 1932bcd..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/regeneratorAsyncGen.js +++ /dev/null @@ -1,6 +0,0 @@ -import regenerator from "./regenerator.js"; -import regeneratorAsyncIterator from "./regeneratorAsyncIterator.js"; -function _regeneratorAsyncGen(r, e, t, o, n) { - return new regeneratorAsyncIterator(regenerator().w(r, e, t, o), n || Promise); -} -export { _regeneratorAsyncGen as default }; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/regeneratorAsyncIterator.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/regeneratorAsyncIterator.js deleted file mode 100644 index 90d84cc..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/regeneratorAsyncIterator.js +++ /dev/null @@ -1,33 +0,0 @@ -import OverloadYield from "./OverloadYield.js"; -import regeneratorDefine from "./regeneratorDefine.js"; -function AsyncIterator(t, e) { - function n(r, o, i, f) { - try { - var c = t[r](o), - u = c.value; - return u instanceof OverloadYield ? e.resolve(u.v).then(function (t) { - n("next", t, i, f); - }, function (t) { - n("throw", t, i, f); - }) : e.resolve(u).then(function (t) { - c.value = t, i(c); - }, function (t) { - return n("throw", t, i, f); - }); - } catch (t) { - f(t); - } - } - var r; - this.next || (regeneratorDefine(AsyncIterator.prototype), regeneratorDefine(AsyncIterator.prototype, "function" == typeof Symbol && Symbol.asyncIterator || "@asyncIterator", function () { - return this; - })), regeneratorDefine(this, "_invoke", function (t, o, i) { - function f() { - return new e(function (e, r) { - n(t, i, e, r); - }); - } - return r = r ? r.then(f, f) : f(); - }, !0); -} -export { AsyncIterator as default }; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/regeneratorDefine.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/regeneratorDefine.js deleted file mode 100644 index 7140470..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/regeneratorDefine.js +++ /dev/null @@ -1,22 +0,0 @@ -function _regeneratorDefine(e, r, n, t) { - var i = Object.defineProperty; - try { - i({}, "", {}); - } catch (e) { - i = 0; - } - _regeneratorDefine = function regeneratorDefine(e, r, n, t) { - function o(r, n) { - _regeneratorDefine(e, r, function (e) { - return this._invoke(r, n, e); - }); - } - r ? i ? i(e, r, { - value: n, - enumerable: !t, - configurable: !t, - writable: !t - }) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2)); - }, _regeneratorDefine(e, r, n, t); -} -export { _regeneratorDefine as default }; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/regeneratorKeys.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/regeneratorKeys.js deleted file mode 100644 index 5d0d48b..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/regeneratorKeys.js +++ /dev/null @@ -1,10 +0,0 @@ -function _regeneratorKeys(e) { - var n = Object(e), - r = []; - for (var t in n) r.unshift(t); - return function e() { - for (; r.length;) if ((t = r.pop()) in n) return e.value = t, e.done = !1, e; - return e.done = !0, e; - }; -} -export { _regeneratorKeys as default }; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/regeneratorRuntime.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/regeneratorRuntime.js deleted file mode 100644 index 3350188..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/regeneratorRuntime.js +++ /dev/null @@ -1,77 +0,0 @@ -import OverloadYield from "./OverloadYield.js"; -import regenerator from "./regenerator.js"; -import regeneratorAsync from "./regeneratorAsync.js"; -import regeneratorAsyncGen from "./regeneratorAsyncGen.js"; -import regeneratorAsyncIterator from "./regeneratorAsyncIterator.js"; -import regeneratorKeys from "./regeneratorKeys.js"; -import regeneratorValues from "./regeneratorValues.js"; -function _regeneratorRuntime() { - "use strict"; - - var r = regenerator(), - e = r.m(_regeneratorRuntime), - t = (Object.getPrototypeOf ? Object.getPrototypeOf(e) : e.__proto__).constructor; - function n(r) { - var e = "function" == typeof r && r.constructor; - return !!e && (e === t || "GeneratorFunction" === (e.displayName || e.name)); - } - var o = { - "throw": 1, - "return": 2, - "break": 3, - "continue": 3 - }; - function a(r) { - var e, t; - return function (n) { - e || (e = { - stop: function stop() { - return t(n.a, 2); - }, - "catch": function _catch() { - return n.v; - }, - abrupt: function abrupt(r, e) { - return t(n.a, o[r], e); - }, - delegateYield: function delegateYield(r, o, a) { - return e.resultName = o, t(n.d, regeneratorValues(r), a); - }, - finish: function finish(r) { - return t(n.f, r); - } - }, t = function t(r, _t, o) { - n.p = e.prev, n.n = e.next; - try { - return r(_t, o); - } finally { - e.next = n.n; - } - }), e.resultName && (e[e.resultName] = n.v, e.resultName = void 0), e.sent = n.v, e.next = n.n; - try { - return r.call(this, e); - } finally { - n.p = e.prev, n.n = e.next; - } - }; - } - return (_regeneratorRuntime = function _regeneratorRuntime() { - return { - wrap: function wrap(e, t, n, o) { - return r.w(a(e), t, n, o && o.reverse()); - }, - isGeneratorFunction: n, - mark: r.m, - awrap: function awrap(r, e) { - return new OverloadYield(r, e); - }, - AsyncIterator: regeneratorAsyncIterator, - async: function async(r, e, t, o, u) { - return (n(e) ? regeneratorAsyncGen : regeneratorAsync)(a(r), e, t, o, u); - }, - keys: regeneratorKeys, - values: regeneratorValues - }; - })(); -} -export { _regeneratorRuntime as default }; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/regeneratorValues.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/regeneratorValues.js deleted file mode 100644 index 9996852..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/regeneratorValues.js +++ /dev/null @@ -1,19 +0,0 @@ -import _typeof from "./typeof.js"; -function _regeneratorValues(e) { - if (null != e) { - var t = e["function" == typeof Symbol && Symbol.iterator || "@@iterator"], - r = 0; - if (t) return t.call(e); - if ("function" == typeof e.next) return e; - if (!isNaN(e.length)) return { - next: function next() { - return e && r >= e.length && (e = void 0), { - value: e && e[r++], - done: !e - }; - } - }; - } - throw new TypeError(_typeof(e) + " is not iterable"); -} -export { _regeneratorValues as default }; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/set.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/set.js deleted file mode 100644 index ed0a803..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/set.js +++ /dev/null @@ -1,22 +0,0 @@ -import superPropBase from "./superPropBase.js"; -import defineProperty from "./defineProperty.js"; -function set(e, r, t, o) { - return set = "undefined" != typeof Reflect && Reflect.set ? Reflect.set : function (e, r, t, o) { - var f, - i = superPropBase(e, r); - if (i) { - if ((f = Object.getOwnPropertyDescriptor(i, r)).set) return f.set.call(o, t), !0; - if (!f.writable) return !1; - } - if (f = Object.getOwnPropertyDescriptor(o, r)) { - if (!f.writable) return !1; - f.value = t, Object.defineProperty(o, r, f); - } else defineProperty(o, r, t); - return !0; - }, set(e, r, t, o); -} -function _set(e, r, t, o, f) { - if (!set(e, r, t, o || e) && f) throw new TypeError("failed to set property"); - return t; -} -export { _set as default }; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/setFunctionName.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/setFunctionName.js deleted file mode 100644 index 82213ce..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/setFunctionName.js +++ /dev/null @@ -1,12 +0,0 @@ -import _typeof from "./typeof.js"; -function setFunctionName(e, t, n) { - "symbol" == _typeof(t) && (t = (t = t.description) ? "[" + t + "]" : ""); - try { - Object.defineProperty(e, "name", { - configurable: !0, - value: n ? n + " " + t : t - }); - } catch (e) {} - return e; -} -export { setFunctionName as default }; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js deleted file mode 100644 index c30983c..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js +++ /dev/null @@ -1,6 +0,0 @@ -function _setPrototypeOf(t, e) { - return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { - return t.__proto__ = e, t; - }, _setPrototypeOf(t, e); -} -export { _setPrototypeOf as default }; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/skipFirstGeneratorNext.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/skipFirstGeneratorNext.js deleted file mode 100644 index 41d5738..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/skipFirstGeneratorNext.js +++ /dev/null @@ -1,7 +0,0 @@ -function _skipFirstGeneratorNext(t) { - return function () { - var r = t.apply(this, arguments); - return r.next(), r; - }; -} -export { _skipFirstGeneratorNext as default }; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/slicedToArray.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/slicedToArray.js deleted file mode 100644 index c044c2a..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/slicedToArray.js +++ /dev/null @@ -1,8 +0,0 @@ -import arrayWithHoles from "./arrayWithHoles.js"; -import iterableToArrayLimit from "./iterableToArrayLimit.js"; -import unsupportedIterableToArray from "./unsupportedIterableToArray.js"; -import nonIterableRest from "./nonIterableRest.js"; -function _slicedToArray(r, e) { - return arrayWithHoles(r) || iterableToArrayLimit(r, e) || unsupportedIterableToArray(r, e) || nonIterableRest(); -} -export { _slicedToArray as default }; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/superPropBase.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/superPropBase.js deleted file mode 100644 index a5fa386..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/superPropBase.js +++ /dev/null @@ -1,6 +0,0 @@ -import getPrototypeOf from "./getPrototypeOf.js"; -function _superPropBase(t, o) { - for (; !{}.hasOwnProperty.call(t, o) && null !== (t = getPrototypeOf(t));); - return t; -} -export { _superPropBase as default }; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/superPropGet.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/superPropGet.js deleted file mode 100644 index b2b60a8..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/superPropGet.js +++ /dev/null @@ -1,9 +0,0 @@ -import get from "./get.js"; -import getPrototypeOf from "./getPrototypeOf.js"; -function _superPropGet(t, o, e, r) { - var p = get(getPrototypeOf(1 & r ? t.prototype : t), o, e); - return 2 & r && "function" == typeof p ? function (t) { - return p.apply(e, t); - } : p; -} -export { _superPropGet as default }; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/superPropSet.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/superPropSet.js deleted file mode 100644 index e182f38..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/superPropSet.js +++ /dev/null @@ -1,6 +0,0 @@ -import set from "./set.js"; -import getPrototypeOf from "./getPrototypeOf.js"; -function _superPropSet(t, e, o, r, p, f) { - return set(getPrototypeOf(f ? t.prototype : t), e, o, r, p); -} -export { _superPropSet as default }; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/taggedTemplateLiteral.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/taggedTemplateLiteral.js deleted file mode 100644 index 3d842cd..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/taggedTemplateLiteral.js +++ /dev/null @@ -1,8 +0,0 @@ -function _taggedTemplateLiteral(e, t) { - return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { - raw: { - value: Object.freeze(t) - } - })); -} -export { _taggedTemplateLiteral as default }; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/taggedTemplateLiteralLoose.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/taggedTemplateLiteralLoose.js deleted file mode 100644 index 741aeb8..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/taggedTemplateLiteralLoose.js +++ /dev/null @@ -1,4 +0,0 @@ -function _taggedTemplateLiteralLoose(e, t) { - return t || (t = e.slice(0)), e.raw = t, e; -} -export { _taggedTemplateLiteralLoose as default }; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/tdz.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/tdz.js deleted file mode 100644 index 58df493..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/tdz.js +++ /dev/null @@ -1,4 +0,0 @@ -function _tdzError(e) { - throw new ReferenceError(e + " is not defined - temporal dead zone"); -} -export { _tdzError as default }; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/temporalRef.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/temporalRef.js deleted file mode 100644 index 8dbf014..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/temporalRef.js +++ /dev/null @@ -1,6 +0,0 @@ -import temporalUndefined from "./temporalUndefined.js"; -import tdz from "./tdz.js"; -function _temporalRef(r, e) { - return r === temporalUndefined ? tdz(e) : r; -} -export { _temporalRef as default }; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/temporalUndefined.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/temporalUndefined.js deleted file mode 100644 index 2ec0b0d..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/temporalUndefined.js +++ /dev/null @@ -1,2 +0,0 @@ -function _temporalUndefined() {} -export { _temporalUndefined as default }; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/toArray.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/toArray.js deleted file mode 100644 index e5f0f52..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/toArray.js +++ /dev/null @@ -1,8 +0,0 @@ -import arrayWithHoles from "./arrayWithHoles.js"; -import iterableToArray from "./iterableToArray.js"; -import unsupportedIterableToArray from "./unsupportedIterableToArray.js"; -import nonIterableRest from "./nonIterableRest.js"; -function _toArray(r) { - return arrayWithHoles(r) || iterableToArray(r) || unsupportedIterableToArray(r) || nonIterableRest(); -} -export { _toArray as default }; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js deleted file mode 100644 index f7338e4..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js +++ /dev/null @@ -1,8 +0,0 @@ -import arrayWithoutHoles from "./arrayWithoutHoles.js"; -import iterableToArray from "./iterableToArray.js"; -import unsupportedIterableToArray from "./unsupportedIterableToArray.js"; -import nonIterableSpread from "./nonIterableSpread.js"; -function _toConsumableArray(r) { - return arrayWithoutHoles(r) || iterableToArray(r) || unsupportedIterableToArray(r) || nonIterableSpread(); -} -export { _toConsumableArray as default }; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/toPrimitive.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/toPrimitive.js deleted file mode 100644 index 9a3de46..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/toPrimitive.js +++ /dev/null @@ -1,12 +0,0 @@ -import _typeof from "./typeof.js"; -function toPrimitive(t, r) { - if ("object" != _typeof(t) || !t) return t; - var e = t[Symbol.toPrimitive]; - if (void 0 !== e) { - var i = e.call(t, r || "default"); - if ("object" != _typeof(i)) return i; - throw new TypeError("@@toPrimitive must return a primitive value."); - } - return ("string" === r ? String : Number)(t); -} -export { toPrimitive as default }; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js deleted file mode 100644 index b3274d8..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js +++ /dev/null @@ -1,7 +0,0 @@ -import _typeof from "./typeof.js"; -import toPrimitive from "./toPrimitive.js"; -function toPropertyKey(t) { - var i = toPrimitive(t, "string"); - return "symbol" == _typeof(i) ? i : i + ""; -} -export { toPropertyKey as default }; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/toSetter.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/toSetter.js deleted file mode 100644 index b1dbf7a..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/toSetter.js +++ /dev/null @@ -1,10 +0,0 @@ -function _toSetter(t, e, n) { - e || (e = []); - var r = e.length++; - return Object.defineProperty({}, "_", { - set: function set(o) { - e[r] = o, t.apply(n, e); - } - }); -} -export { _toSetter as default }; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/tsRewriteRelativeImportExtensions.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/tsRewriteRelativeImportExtensions.js deleted file mode 100644 index 28ffc0b..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/tsRewriteRelativeImportExtensions.js +++ /dev/null @@ -1,6 +0,0 @@ -function tsRewriteRelativeImportExtensions(t, e) { - return "string" == typeof t && /^\.\.?\//.test(t) ? t.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+)?)\.([cm]?)ts$/i, function (t, s, r, n, o) { - return s ? e ? ".jsx" : ".js" : !r || n && o ? r + n + "." + o.toLowerCase() + "js" : t; - }) : t; -} -export { tsRewriteRelativeImportExtensions as default }; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/typeof.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/typeof.js deleted file mode 100644 index 5b0bc9b..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/typeof.js +++ /dev/null @@ -1,10 +0,0 @@ -function _typeof(o) { - "@babel/helpers - typeof"; - - return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { - return typeof o; - } : function (o) { - return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; - }, _typeof(o); -} -export { _typeof as default }; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js deleted file mode 100644 index 33adc49..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js +++ /dev/null @@ -1,9 +0,0 @@ -import arrayLikeToArray from "./arrayLikeToArray.js"; -function _unsupportedIterableToArray(r, a) { - if (r) { - if ("string" == typeof r) return arrayLikeToArray(r, a); - var t = {}.toString.call(r).slice(8, -1); - return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? arrayLikeToArray(r, a) : void 0; - } -} -export { _unsupportedIterableToArray as default }; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/using.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/using.js deleted file mode 100644 index 9bda17b..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/using.js +++ /dev/null @@ -1,12 +0,0 @@ -function _using(o, n, e) { - if (null == n) return n; - if (Object(n) !== n) throw new TypeError("using declarations can only be used with objects, functions, null, or undefined."); - if (e) var r = n[Symbol.asyncDispose || Symbol["for"]("Symbol.asyncDispose")]; - if (null == r && (r = n[Symbol.dispose || Symbol["for"]("Symbol.dispose")]), "function" != typeof r) throw new TypeError("Property [Symbol.dispose] is not a function."); - return o.push({ - v: n, - d: r, - a: e - }), n; -} -export { _using as default }; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/usingCtx.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/usingCtx.js deleted file mode 100644 index 1464379..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/usingCtx.js +++ /dev/null @@ -1,59 +0,0 @@ -function _usingCtx() { - var r = "function" == typeof SuppressedError ? SuppressedError : function (r, e) { - var n = Error(); - return n.name = "SuppressedError", n.error = r, n.suppressed = e, n; - }, - e = {}, - n = []; - function using(r, e) { - if (null != e) { - if (Object(e) !== e) throw new TypeError("using declarations can only be used with objects, functions, null, or undefined."); - if (r) var o = e[Symbol.asyncDispose || Symbol["for"]("Symbol.asyncDispose")]; - if (void 0 === o && (o = e[Symbol.dispose || Symbol["for"]("Symbol.dispose")], r)) var t = o; - if ("function" != typeof o) throw new TypeError("Object is not disposable."); - t && (o = function o() { - try { - t.call(e); - } catch (r) { - return Promise.reject(r); - } - }), n.push({ - v: e, - d: o, - a: r - }); - } else r && n.push({ - d: e, - a: r - }); - return e; - } - return { - e: e, - u: using.bind(null, !1), - a: using.bind(null, !0), - d: function d() { - var o, - t = this.e, - s = 0; - function next() { - for (; o = n.pop();) try { - if (!o.a && 1 === s) return s = 0, n.push(o), Promise.resolve().then(next); - if (o.d) { - var r = o.d.call(o.v); - if (o.a) return s |= 2, Promise.resolve(r).then(next, err); - } else s |= 1; - } catch (r) { - return err(r); - } - if (1 === s) return t !== e ? Promise.reject(t) : Promise.resolve(); - if (t !== e) throw t; - } - function err(n) { - return t = t !== e ? new r(n, t) : n, next(); - } - return next(); - } - }; -} -export { _usingCtx as default }; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/wrapAsyncGenerator.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/wrapAsyncGenerator.js deleted file mode 100644 index ffeea5d..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/wrapAsyncGenerator.js +++ /dev/null @@ -1,69 +0,0 @@ -import OverloadYield from "./OverloadYield.js"; -function _wrapAsyncGenerator(e) { - return function () { - return new AsyncGenerator(e.apply(this, arguments)); - }; -} -function AsyncGenerator(e) { - var r, t; - function resume(r, t) { - try { - var n = e[r](t), - o = n.value, - u = o instanceof OverloadYield; - Promise.resolve(u ? o.v : o).then(function (t) { - if (u) { - var i = "return" === r ? "return" : "next"; - if (!o.k || t.done) return resume(i, t); - t = e[i](t).value; - } - settle(n.done ? "return" : "normal", t); - }, function (e) { - resume("throw", e); - }); - } catch (e) { - settle("throw", e); - } - } - function settle(e, n) { - switch (e) { - case "return": - r.resolve({ - value: n, - done: !0 - }); - break; - case "throw": - r.reject(n); - break; - default: - r.resolve({ - value: n, - done: !1 - }); - } - (r = r.next) ? resume(r.key, r.arg) : t = null; - } - this._invoke = function (e, n) { - return new Promise(function (o, u) { - var i = { - key: e, - arg: n, - resolve: o, - reject: u, - next: null - }; - t ? t = t.next = i : (r = t = i, resume(e, n)); - }); - }, "function" != typeof e["return"] && (this["return"] = void 0); -} -AsyncGenerator.prototype["function" == typeof Symbol && Symbol.asyncIterator || "@@asyncIterator"] = function () { - return this; -}, AsyncGenerator.prototype.next = function (e) { - return this._invoke("next", e); -}, AsyncGenerator.prototype["throw"] = function (e) { - return this._invoke("throw", e); -}, AsyncGenerator.prototype["return"] = function (e) { - return this._invoke("return", e); -}; -export { _wrapAsyncGenerator as default }; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/wrapNativeSuper.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/wrapNativeSuper.js deleted file mode 100644 index 15bf78f..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/wrapNativeSuper.js +++ /dev/null @@ -1,27 +0,0 @@ -import getPrototypeOf from "./getPrototypeOf.js"; -import setPrototypeOf from "./setPrototypeOf.js"; -import isNativeFunction from "./isNativeFunction.js"; -import construct from "./construct.js"; -function _wrapNativeSuper(t) { - var r = "function" == typeof Map ? new Map() : void 0; - return _wrapNativeSuper = function _wrapNativeSuper(t) { - if (null === t || !isNativeFunction(t)) return t; - if ("function" != typeof t) throw new TypeError("Super expression must either be null or a function"); - if (void 0 !== r) { - if (r.has(t)) return r.get(t); - r.set(t, Wrapper); - } - function Wrapper() { - return construct(t, arguments, getPrototypeOf(this).constructor); - } - return Wrapper.prototype = Object.create(t.prototype, { - constructor: { - value: Wrapper, - enumerable: !1, - writable: !0, - configurable: !0 - } - }), setPrototypeOf(Wrapper, t); - }, _wrapNativeSuper(t); -} -export { _wrapNativeSuper as default }; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/wrapRegExp.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/wrapRegExp.js deleted file mode 100644 index c455faa..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/wrapRegExp.js +++ /dev/null @@ -1,52 +0,0 @@ -import _typeof from "./typeof.js"; -import setPrototypeOf from "./setPrototypeOf.js"; -import inherits from "./inherits.js"; -function _wrapRegExp() { - _wrapRegExp = function _wrapRegExp(e, r) { - return new BabelRegExp(e, void 0, r); - }; - var e = RegExp.prototype, - r = new WeakMap(); - function BabelRegExp(e, t, p) { - var o = RegExp(e, t); - return r.set(o, p || r.get(e)), setPrototypeOf(o, BabelRegExp.prototype); - } - function buildGroups(e, t) { - var p = r.get(t); - return Object.keys(p).reduce(function (r, t) { - var o = p[t]; - if ("number" == typeof o) r[t] = e[o];else { - for (var i = 0; void 0 === e[o[i]] && i + 1 < o.length;) i++; - r[t] = e[o[i]]; - } - return r; - }, Object.create(null)); - } - return inherits(BabelRegExp, RegExp), BabelRegExp.prototype.exec = function (r) { - var t = e.exec.call(this, r); - if (t) { - t.groups = buildGroups(t, this); - var p = t.indices; - p && (p.groups = buildGroups(p, this)); - } - return t; - }, BabelRegExp.prototype[Symbol.replace] = function (t, p) { - if ("string" == typeof p) { - var o = r.get(this); - return e[Symbol.replace].call(this, t, p.replace(/\$<([^>]+)(>|$)/g, function (e, r, t) { - if ("" === t) return e; - var p = o[r]; - return Array.isArray(p) ? "$" + p.join("$") : "number" == typeof p ? "$" + p : ""; - })); - } - if ("function" == typeof p) { - var i = this; - return e[Symbol.replace].call(this, t, function () { - var e = arguments; - return "object" != _typeof(e[e.length - 1]) && (e = [].slice.call(e)).push(buildGroups(e, i)), p.apply(this, e); - }); - } - return e[Symbol.replace].call(this, t, p); - }, _wrapRegExp.apply(this, arguments); -} -export { _wrapRegExp as default }; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/writeOnlyError.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/writeOnlyError.js deleted file mode 100644 index 250c286..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/esm/writeOnlyError.js +++ /dev/null @@ -1,4 +0,0 @@ -function _writeOnlyError(r) { - throw new TypeError('"' + r + '" is write-only'); -} -export { _writeOnlyError as default }; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/extends.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/extends.js deleted file mode 100644 index eee4a1f..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/extends.js +++ /dev/null @@ -1,10 +0,0 @@ -function _extends() { - return module.exports = _extends = Object.assign ? Object.assign.bind() : function (n) { - for (var e = 1; e < arguments.length; e++) { - var t = arguments[e]; - for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); - } - return n; - }, module.exports.__esModule = true, module.exports["default"] = module.exports, _extends.apply(null, arguments); -} -module.exports = _extends, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/get.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/get.js deleted file mode 100644 index 15428de..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/get.js +++ /dev/null @@ -1,11 +0,0 @@ -var superPropBase = require("./superPropBase.js"); -function _get() { - return module.exports = _get = "undefined" != typeof Reflect && Reflect.get ? Reflect.get.bind() : function (e, t, r) { - var p = superPropBase(e, t); - if (p) { - var n = Object.getOwnPropertyDescriptor(p, t); - return n.get ? n.get.call(arguments.length < 3 ? e : r) : n.value; - } - }, module.exports.__esModule = true, module.exports["default"] = module.exports, _get.apply(null, arguments); -} -module.exports = _get, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/getPrototypeOf.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/getPrototypeOf.js deleted file mode 100644 index 9070748..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/getPrototypeOf.js +++ /dev/null @@ -1,6 +0,0 @@ -function _getPrototypeOf(t) { - return module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { - return t.__proto__ || Object.getPrototypeOf(t); - }, module.exports.__esModule = true, module.exports["default"] = module.exports, _getPrototypeOf(t); -} -module.exports = _getPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/identity.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/identity.js deleted file mode 100644 index 54de5b5..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/identity.js +++ /dev/null @@ -1,4 +0,0 @@ -function _identity(t) { - return t; -} -module.exports = _identity, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/importDeferProxy.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/importDeferProxy.js deleted file mode 100644 index cffaae6..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/importDeferProxy.js +++ /dev/null @@ -1,27 +0,0 @@ -function _importDeferProxy(e) { - var t = null, - constValue = function constValue(e) { - return function () { - return e; - }; - }, - proxy = function proxy(r) { - return function (n, o, f) { - return null === t && (t = e()), r(t, o, f); - }; - }; - return new Proxy({}, { - defineProperty: constValue(!1), - deleteProperty: constValue(!1), - get: proxy(Reflect.get), - getOwnPropertyDescriptor: proxy(Reflect.getOwnPropertyDescriptor), - getPrototypeOf: constValue(null), - isExtensible: constValue(!1), - has: proxy(Reflect.has), - ownKeys: proxy(Reflect.ownKeys), - preventExtensions: constValue(!0), - set: constValue(!1), - setPrototypeOf: constValue(!1) - }); -} -module.exports = _importDeferProxy, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/inherits.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/inherits.js deleted file mode 100644 index 715a78e..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/inherits.js +++ /dev/null @@ -1,14 +0,0 @@ -var setPrototypeOf = require("./setPrototypeOf.js"); -function _inherits(t, e) { - if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); - t.prototype = Object.create(e && e.prototype, { - constructor: { - value: t, - writable: !0, - configurable: !0 - } - }), Object.defineProperty(t, "prototype", { - writable: !1 - }), e && setPrototypeOf(t, e); -} -module.exports = _inherits, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/inheritsLoose.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/inheritsLoose.js deleted file mode 100644 index a27baf0..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/inheritsLoose.js +++ /dev/null @@ -1,5 +0,0 @@ -var setPrototypeOf = require("./setPrototypeOf.js"); -function _inheritsLoose(t, o) { - t.prototype = Object.create(o.prototype), t.prototype.constructor = t, setPrototypeOf(t, o); -} -module.exports = _inheritsLoose, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/initializerDefineProperty.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/initializerDefineProperty.js deleted file mode 100644 index f9fa317..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/initializerDefineProperty.js +++ /dev/null @@ -1,9 +0,0 @@ -function _initializerDefineProperty(e, i, r, l) { - r && Object.defineProperty(e, i, { - enumerable: r.enumerable, - configurable: r.configurable, - writable: r.writable, - value: r.initializer ? r.initializer.call(l) : void 0 - }); -} -module.exports = _initializerDefineProperty, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/initializerWarningHelper.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/initializerWarningHelper.js deleted file mode 100644 index e14ce59..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/initializerWarningHelper.js +++ /dev/null @@ -1,4 +0,0 @@ -function _initializerWarningHelper(r, e) { - throw Error("Decorating class property failed. Please ensure that transform-class-properties is enabled and runs after the decorators transform."); -} -module.exports = _initializerWarningHelper, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/instanceof.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/instanceof.js deleted file mode 100644 index 9952301..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/instanceof.js +++ /dev/null @@ -1,4 +0,0 @@ -function _instanceof(n, e) { - return null != e && "undefined" != typeof Symbol && e[Symbol.hasInstance] ? !!e[Symbol.hasInstance](n) : n instanceof e; -} -module.exports = _instanceof, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/interopRequireDefault.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/interopRequireDefault.js deleted file mode 100644 index 6944715..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/interopRequireDefault.js +++ /dev/null @@ -1,6 +0,0 @@ -function _interopRequireDefault(e) { - return e && e.__esModule ? e : { - "default": e - }; -} -module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/interopRequireWildcard.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/interopRequireWildcard.js deleted file mode 100644 index d5f1054..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/interopRequireWildcard.js +++ /dev/null @@ -1,22 +0,0 @@ -var _typeof = require("./typeof.js")["default"]; -function _interopRequireWildcard(e, t) { - if ("function" == typeof WeakMap) var r = new WeakMap(), - n = new WeakMap(); - return (module.exports = _interopRequireWildcard = function _interopRequireWildcard(e, t) { - if (!t && e && e.__esModule) return e; - var o, - i, - f = { - __proto__: null, - "default": e - }; - if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; - if (o = t ? n : r) { - if (o.has(e)) return o.get(e); - o.set(e, f); - } - for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); - return f; - }, module.exports.__esModule = true, module.exports["default"] = module.exports)(e, t); -} -module.exports = _interopRequireWildcard, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/isNativeFunction.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/isNativeFunction.js deleted file mode 100644 index f0eb49e..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/isNativeFunction.js +++ /dev/null @@ -1,8 +0,0 @@ -function _isNativeFunction(t) { - try { - return -1 !== Function.toString.call(t).indexOf("[native code]"); - } catch (n) { - return "function" == typeof t; - } -} -module.exports = _isNativeFunction, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js deleted file mode 100644 index b677e10..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js +++ /dev/null @@ -1,9 +0,0 @@ -function _isNativeReflectConstruct() { - try { - var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); - } catch (t) {} - return (module.exports = _isNativeReflectConstruct = function _isNativeReflectConstruct() { - return !!t; - }, module.exports.__esModule = true, module.exports["default"] = module.exports)(); -} -module.exports = _isNativeReflectConstruct, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/iterableToArray.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/iterableToArray.js deleted file mode 100644 index c839a32..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/iterableToArray.js +++ /dev/null @@ -1,4 +0,0 @@ -function _iterableToArray(r) { - if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); -} -module.exports = _iterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/iterableToArrayLimit.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/iterableToArrayLimit.js deleted file mode 100644 index 2671778..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/iterableToArrayLimit.js +++ /dev/null @@ -1,28 +0,0 @@ -function _iterableToArrayLimit(r, l) { - var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; - if (null != t) { - var e, - n, - i, - u, - a = [], - f = !0, - o = !1; - try { - if (i = (t = t.call(r)).next, 0 === l) { - if (Object(t) !== t) return; - f = !1; - } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); - } catch (r) { - o = !0, n = r; - } finally { - try { - if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; - } finally { - if (o) throw n; - } - } - return a; - } -} -module.exports = _iterableToArrayLimit, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/jsx.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/jsx.js deleted file mode 100644 index 3415eea..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/jsx.js +++ /dev/null @@ -1,22 +0,0 @@ -var REACT_ELEMENT_TYPE; -function _createRawReactElement(e, r, E, l) { - REACT_ELEMENT_TYPE || (REACT_ELEMENT_TYPE = "function" == typeof Symbol && Symbol["for"] && Symbol["for"]("react.element") || 60103); - var o = e && e.defaultProps, - n = arguments.length - 3; - if (r || 0 === n || (r = { - children: void 0 - }), 1 === n) r.children = l;else if (n > 1) { - for (var t = Array(n), f = 0; f < n; f++) t[f] = arguments[f + 3]; - r.children = t; - } - if (r && o) for (var i in o) void 0 === r[i] && (r[i] = o[i]);else r || (r = o || {}); - return { - $$typeof: REACT_ELEMENT_TYPE, - type: e, - key: void 0 === E ? null : "" + E, - ref: null, - props: r, - _owner: null - }; -} -module.exports = _createRawReactElement, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/maybeArrayLike.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/maybeArrayLike.js deleted file mode 100644 index 9873cc7..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/maybeArrayLike.js +++ /dev/null @@ -1,9 +0,0 @@ -var arrayLikeToArray = require("./arrayLikeToArray.js"); -function _maybeArrayLike(r, a, e) { - if (a && !Array.isArray(a) && "number" == typeof a.length) { - var y = a.length; - return arrayLikeToArray(a, void 0 !== e && e < y ? e : y); - } - return r(a, e); -} -module.exports = _maybeArrayLike, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/newArrowCheck.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/newArrowCheck.js deleted file mode 100644 index 8e74d99..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/newArrowCheck.js +++ /dev/null @@ -1,4 +0,0 @@ -function _newArrowCheck(n, r) { - if (n !== r) throw new TypeError("Cannot instantiate an arrow function"); -} -module.exports = _newArrowCheck, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/nonIterableRest.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/nonIterableRest.js deleted file mode 100644 index 95265ba..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/nonIterableRest.js +++ /dev/null @@ -1,4 +0,0 @@ -function _nonIterableRest() { - throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); -} -module.exports = _nonIterableRest, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/nonIterableSpread.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/nonIterableSpread.js deleted file mode 100644 index 3fcf23f..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/nonIterableSpread.js +++ /dev/null @@ -1,4 +0,0 @@ -function _nonIterableSpread() { - throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); -} -module.exports = _nonIterableSpread, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/nullishReceiverError.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/nullishReceiverError.js deleted file mode 100644 index 970e023..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/nullishReceiverError.js +++ /dev/null @@ -1,4 +0,0 @@ -function _nullishReceiverError(r) { - throw new TypeError("Cannot set property of null or undefined."); -} -module.exports = _nullishReceiverError, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/objectDestructuringEmpty.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/objectDestructuringEmpty.js deleted file mode 100644 index 9f62a1b..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/objectDestructuringEmpty.js +++ /dev/null @@ -1,4 +0,0 @@ -function _objectDestructuringEmpty(t) { - if (null == t) throw new TypeError("Cannot destructure " + t); -} -module.exports = _objectDestructuringEmpty, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/objectSpread.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/objectSpread.js deleted file mode 100644 index a367643..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/objectSpread.js +++ /dev/null @@ -1,14 +0,0 @@ -var defineProperty = require("./defineProperty.js"); -function _objectSpread(e) { - for (var r = 1; r < arguments.length; r++) { - var t = null != arguments[r] ? Object(arguments[r]) : {}, - o = Object.keys(t); - "function" == typeof Object.getOwnPropertySymbols && o.push.apply(o, Object.getOwnPropertySymbols(t).filter(function (e) { - return Object.getOwnPropertyDescriptor(t, e).enumerable; - })), o.forEach(function (r) { - defineProperty(e, r, t[r]); - }); - } - return e; -} -module.exports = _objectSpread, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/objectSpread2.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/objectSpread2.js deleted file mode 100644 index 4f3b9fa..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/objectSpread2.js +++ /dev/null @@ -1,23 +0,0 @@ -var defineProperty = require("./defineProperty.js"); -function ownKeys(e, r) { - var t = Object.keys(e); - if (Object.getOwnPropertySymbols) { - var o = Object.getOwnPropertySymbols(e); - r && (o = o.filter(function (r) { - return Object.getOwnPropertyDescriptor(e, r).enumerable; - })), t.push.apply(t, o); - } - return t; -} -function _objectSpread2(e) { - for (var r = 1; r < arguments.length; r++) { - var t = null != arguments[r] ? arguments[r] : {}; - r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { - defineProperty(e, r, t[r]); - }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { - Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); - }); - } - return e; -} -module.exports = _objectSpread2, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/objectWithoutProperties.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/objectWithoutProperties.js deleted file mode 100644 index 3a40f9e..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/objectWithoutProperties.js +++ /dev/null @@ -1,13 +0,0 @@ -var objectWithoutPropertiesLoose = require("./objectWithoutPropertiesLoose.js"); -function _objectWithoutProperties(e, t) { - if (null == e) return {}; - var o, - r, - i = objectWithoutPropertiesLoose(e, t); - if (Object.getOwnPropertySymbols) { - var n = Object.getOwnPropertySymbols(e); - for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); - } - return i; -} -module.exports = _objectWithoutProperties, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js deleted file mode 100644 index c243acd..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js +++ /dev/null @@ -1,10 +0,0 @@ -function _objectWithoutPropertiesLoose(r, e) { - if (null == r) return {}; - var t = {}; - for (var n in r) if ({}.hasOwnProperty.call(r, n)) { - if (-1 !== e.indexOf(n)) continue; - t[n] = r[n]; - } - return t; -} -module.exports = _objectWithoutPropertiesLoose, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/possibleConstructorReturn.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/possibleConstructorReturn.js deleted file mode 100644 index 06e6e6d..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/possibleConstructorReturn.js +++ /dev/null @@ -1,8 +0,0 @@ -var _typeof = require("./typeof.js")["default"]; -var assertThisInitialized = require("./assertThisInitialized.js"); -function _possibleConstructorReturn(t, e) { - if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; - if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); - return assertThisInitialized(t); -} -module.exports = _possibleConstructorReturn, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/readOnlyError.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/readOnlyError.js deleted file mode 100644 index 1bf3e09..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/readOnlyError.js +++ /dev/null @@ -1,4 +0,0 @@ -function _readOnlyError(r) { - throw new TypeError('"' + r + '" is read-only'); -} -module.exports = _readOnlyError, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/regenerator.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/regenerator.js deleted file mode 100644 index 0cf8710..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/regenerator.js +++ /dev/null @@ -1,89 +0,0 @@ -var regeneratorDefine = require("./regeneratorDefine.js"); -function _regenerator() { - /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ - var e, - t, - r = "function" == typeof Symbol ? Symbol : {}, - n = r.iterator || "@@iterator", - o = r.toStringTag || "@@toStringTag"; - function i(r, n, o, i) { - var c = n && n.prototype instanceof Generator ? n : Generator, - u = Object.create(c.prototype); - return regeneratorDefine(u, "_invoke", function (r, n, o) { - var i, - c, - u, - f = 0, - p = o || [], - y = !1, - G = { - p: 0, - n: 0, - v: e, - a: d, - f: d.bind(e, 4), - d: function d(t, r) { - return i = t, c = 0, u = e, G.n = r, a; - } - }; - function d(r, n) { - for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { - var o, - i = p[t], - d = G.p, - l = i[2]; - r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); - } - if (o || r > 1) return a; - throw y = !0, n; - } - return function (o, p, l) { - if (f > 1) throw TypeError("Generator is already running"); - for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { - i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); - try { - if (f = 2, i) { - if (c || (o = "next"), t = i[o]) { - if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); - if (!t.done) return t; - u = t.value, c < 2 && (c = 0); - } else 1 === c && (t = i["return"]) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); - i = e; - } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; - } catch (t) { - i = e, c = 1, u = t; - } finally { - f = 1; - } - } - return { - value: t, - done: y - }; - }; - }(r, o, i), !0), u; - } - var a = {}; - function Generator() {} - function GeneratorFunction() {} - function GeneratorFunctionPrototype() {} - t = Object.getPrototypeOf; - var c = [][n] ? t(t([][n]())) : (regeneratorDefine(t = {}, n, function () { - return this; - }), t), - u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); - function f(e) { - return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, regeneratorDefine(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; - } - return GeneratorFunction.prototype = GeneratorFunctionPrototype, regeneratorDefine(u, "constructor", GeneratorFunctionPrototype), regeneratorDefine(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", regeneratorDefine(GeneratorFunctionPrototype, o, "GeneratorFunction"), regeneratorDefine(u), regeneratorDefine(u, o, "Generator"), regeneratorDefine(u, n, function () { - return this; - }), regeneratorDefine(u, "toString", function () { - return "[object Generator]"; - }), (module.exports = _regenerator = function _regenerator() { - return { - w: i, - m: f - }; - }, module.exports.__esModule = true, module.exports["default"] = module.exports)(); -} -module.exports = _regenerator, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/regeneratorAsync.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/regeneratorAsync.js deleted file mode 100644 index d1e4c3f..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/regeneratorAsync.js +++ /dev/null @@ -1,8 +0,0 @@ -var regeneratorAsyncGen = require("./regeneratorAsyncGen.js"); -function _regeneratorAsync(n, e, r, t, o) { - var a = regeneratorAsyncGen(n, e, r, t, o); - return a.next().then(function (n) { - return n.done ? n.value : a.next(); - }); -} -module.exports = _regeneratorAsync, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/regeneratorAsyncGen.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/regeneratorAsyncGen.js deleted file mode 100644 index f0212e3..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/regeneratorAsyncGen.js +++ /dev/null @@ -1,6 +0,0 @@ -var regenerator = require("./regenerator.js"); -var regeneratorAsyncIterator = require("./regeneratorAsyncIterator.js"); -function _regeneratorAsyncGen(r, e, t, o, n) { - return new regeneratorAsyncIterator(regenerator().w(r, e, t, o), n || Promise); -} -module.exports = _regeneratorAsyncGen, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/regeneratorAsyncIterator.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/regeneratorAsyncIterator.js deleted file mode 100644 index afcb060..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/regeneratorAsyncIterator.js +++ /dev/null @@ -1,33 +0,0 @@ -var OverloadYield = require("./OverloadYield.js"); -var regeneratorDefine = require("./regeneratorDefine.js"); -function AsyncIterator(t, e) { - function n(r, o, i, f) { - try { - var c = t[r](o), - u = c.value; - return u instanceof OverloadYield ? e.resolve(u.v).then(function (t) { - n("next", t, i, f); - }, function (t) { - n("throw", t, i, f); - }) : e.resolve(u).then(function (t) { - c.value = t, i(c); - }, function (t) { - return n("throw", t, i, f); - }); - } catch (t) { - f(t); - } - } - var r; - this.next || (regeneratorDefine(AsyncIterator.prototype), regeneratorDefine(AsyncIterator.prototype, "function" == typeof Symbol && Symbol.asyncIterator || "@asyncIterator", function () { - return this; - })), regeneratorDefine(this, "_invoke", function (t, o, i) { - function f() { - return new e(function (e, r) { - n(t, i, e, r); - }); - } - return r = r ? r.then(f, f) : f(); - }, !0); -} -module.exports = AsyncIterator, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/regeneratorDefine.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/regeneratorDefine.js deleted file mode 100644 index 8d7ffe0..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/regeneratorDefine.js +++ /dev/null @@ -1,22 +0,0 @@ -function _regeneratorDefine(e, r, n, t) { - var i = Object.defineProperty; - try { - i({}, "", {}); - } catch (e) { - i = 0; - } - module.exports = _regeneratorDefine = function regeneratorDefine(e, r, n, t) { - function o(r, n) { - _regeneratorDefine(e, r, function (e) { - return this._invoke(r, n, e); - }); - } - r ? i ? i(e, r, { - value: n, - enumerable: !t, - configurable: !t, - writable: !t - }) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2)); - }, module.exports.__esModule = true, module.exports["default"] = module.exports, _regeneratorDefine(e, r, n, t); -} -module.exports = _regeneratorDefine, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/regeneratorKeys.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/regeneratorKeys.js deleted file mode 100644 index 99442bd..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/regeneratorKeys.js +++ /dev/null @@ -1,10 +0,0 @@ -function _regeneratorKeys(e) { - var n = Object(e), - r = []; - for (var t in n) r.unshift(t); - return function e() { - for (; r.length;) if ((t = r.pop()) in n) return e.value = t, e.done = !1, e; - return e.done = !0, e; - }; -} -module.exports = _regeneratorKeys, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/regeneratorRuntime.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/regeneratorRuntime.js deleted file mode 100644 index 24baaa0..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/regeneratorRuntime.js +++ /dev/null @@ -1,77 +0,0 @@ -var OverloadYield = require("./OverloadYield.js"); -var regenerator = require("./regenerator.js"); -var regeneratorAsync = require("./regeneratorAsync.js"); -var regeneratorAsyncGen = require("./regeneratorAsyncGen.js"); -var regeneratorAsyncIterator = require("./regeneratorAsyncIterator.js"); -var regeneratorKeys = require("./regeneratorKeys.js"); -var regeneratorValues = require("./regeneratorValues.js"); -function _regeneratorRuntime() { - "use strict"; - - var r = regenerator(), - e = r.m(_regeneratorRuntime), - t = (Object.getPrototypeOf ? Object.getPrototypeOf(e) : e.__proto__).constructor; - function n(r) { - var e = "function" == typeof r && r.constructor; - return !!e && (e === t || "GeneratorFunction" === (e.displayName || e.name)); - } - var o = { - "throw": 1, - "return": 2, - "break": 3, - "continue": 3 - }; - function a(r) { - var e, t; - return function (n) { - e || (e = { - stop: function stop() { - return t(n.a, 2); - }, - "catch": function _catch() { - return n.v; - }, - abrupt: function abrupt(r, e) { - return t(n.a, o[r], e); - }, - delegateYield: function delegateYield(r, o, a) { - return e.resultName = o, t(n.d, regeneratorValues(r), a); - }, - finish: function finish(r) { - return t(n.f, r); - } - }, t = function t(r, _t, o) { - n.p = e.prev, n.n = e.next; - try { - return r(_t, o); - } finally { - e.next = n.n; - } - }), e.resultName && (e[e.resultName] = n.v, e.resultName = void 0), e.sent = n.v, e.next = n.n; - try { - return r.call(this, e); - } finally { - n.p = e.prev, n.n = e.next; - } - }; - } - return (module.exports = _regeneratorRuntime = function _regeneratorRuntime() { - return { - wrap: function wrap(e, t, n, o) { - return r.w(a(e), t, n, o && o.reverse()); - }, - isGeneratorFunction: n, - mark: r.m, - awrap: function awrap(r, e) { - return new OverloadYield(r, e); - }, - AsyncIterator: regeneratorAsyncIterator, - async: function async(r, e, t, o, u) { - return (n(e) ? regeneratorAsyncGen : regeneratorAsync)(a(r), e, t, o, u); - }, - keys: regeneratorKeys, - values: regeneratorValues - }; - }, module.exports.__esModule = true, module.exports["default"] = module.exports)(); -} -module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/regeneratorValues.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/regeneratorValues.js deleted file mode 100644 index 1335a23..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/regeneratorValues.js +++ /dev/null @@ -1,19 +0,0 @@ -var _typeof = require("./typeof.js")["default"]; -function _regeneratorValues(e) { - if (null != e) { - var t = e["function" == typeof Symbol && Symbol.iterator || "@@iterator"], - r = 0; - if (t) return t.call(e); - if ("function" == typeof e.next) return e; - if (!isNaN(e.length)) return { - next: function next() { - return e && r >= e.length && (e = void 0), { - value: e && e[r++], - done: !e - }; - } - }; - } - throw new TypeError(_typeof(e) + " is not iterable"); -} -module.exports = _regeneratorValues, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/set.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/set.js deleted file mode 100644 index 6421470..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/set.js +++ /dev/null @@ -1,22 +0,0 @@ -var superPropBase = require("./superPropBase.js"); -var defineProperty = require("./defineProperty.js"); -function set(e, r, t, o) { - return set = "undefined" != typeof Reflect && Reflect.set ? Reflect.set : function (e, r, t, o) { - var f, - i = superPropBase(e, r); - if (i) { - if ((f = Object.getOwnPropertyDescriptor(i, r)).set) return f.set.call(o, t), !0; - if (!f.writable) return !1; - } - if (f = Object.getOwnPropertyDescriptor(o, r)) { - if (!f.writable) return !1; - f.value = t, Object.defineProperty(o, r, f); - } else defineProperty(o, r, t); - return !0; - }, set(e, r, t, o); -} -function _set(e, r, t, o, f) { - if (!set(e, r, t, o || e) && f) throw new TypeError("failed to set property"); - return t; -} -module.exports = _set, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/setFunctionName.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/setFunctionName.js deleted file mode 100644 index 9664076..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/setFunctionName.js +++ /dev/null @@ -1,12 +0,0 @@ -var _typeof = require("./typeof.js")["default"]; -function setFunctionName(e, t, n) { - "symbol" == _typeof(t) && (t = (t = t.description) ? "[" + t + "]" : ""); - try { - Object.defineProperty(e, "name", { - configurable: !0, - value: n ? n + " " + t : t - }); - } catch (e) {} - return e; -} -module.exports = setFunctionName, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/setPrototypeOf.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/setPrototypeOf.js deleted file mode 100644 index 7d991ff..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/setPrototypeOf.js +++ /dev/null @@ -1,6 +0,0 @@ -function _setPrototypeOf(t, e) { - return module.exports = _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { - return t.__proto__ = e, t; - }, module.exports.__esModule = true, module.exports["default"] = module.exports, _setPrototypeOf(t, e); -} -module.exports = _setPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/skipFirstGeneratorNext.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/skipFirstGeneratorNext.js deleted file mode 100644 index 2aed548..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/skipFirstGeneratorNext.js +++ /dev/null @@ -1,7 +0,0 @@ -function _skipFirstGeneratorNext(t) { - return function () { - var r = t.apply(this, arguments); - return r.next(), r; - }; -} -module.exports = _skipFirstGeneratorNext, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/slicedToArray.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/slicedToArray.js deleted file mode 100644 index 3d752c4..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/slicedToArray.js +++ /dev/null @@ -1,8 +0,0 @@ -var arrayWithHoles = require("./arrayWithHoles.js"); -var iterableToArrayLimit = require("./iterableToArrayLimit.js"); -var unsupportedIterableToArray = require("./unsupportedIterableToArray.js"); -var nonIterableRest = require("./nonIterableRest.js"); -function _slicedToArray(r, e) { - return arrayWithHoles(r) || iterableToArrayLimit(r, e) || unsupportedIterableToArray(r, e) || nonIterableRest(); -} -module.exports = _slicedToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/superPropBase.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/superPropBase.js deleted file mode 100644 index 5cad459..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/superPropBase.js +++ /dev/null @@ -1,6 +0,0 @@ -var getPrototypeOf = require("./getPrototypeOf.js"); -function _superPropBase(t, o) { - for (; !{}.hasOwnProperty.call(t, o) && null !== (t = getPrototypeOf(t));); - return t; -} -module.exports = _superPropBase, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/superPropGet.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/superPropGet.js deleted file mode 100644 index baf8b10..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/superPropGet.js +++ /dev/null @@ -1,9 +0,0 @@ -var get = require("./get.js"); -var getPrototypeOf = require("./getPrototypeOf.js"); -function _superPropGet(t, o, e, r) { - var p = get(getPrototypeOf(1 & r ? t.prototype : t), o, e); - return 2 & r && "function" == typeof p ? function (t) { - return p.apply(e, t); - } : p; -} -module.exports = _superPropGet, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/superPropSet.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/superPropSet.js deleted file mode 100644 index e0578c0..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/superPropSet.js +++ /dev/null @@ -1,6 +0,0 @@ -var set = require("./set.js"); -var getPrototypeOf = require("./getPrototypeOf.js"); -function _superPropSet(t, e, o, r, p, f) { - return set(getPrototypeOf(f ? t.prototype : t), e, o, r, p); -} -module.exports = _superPropSet, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/taggedTemplateLiteral.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/taggedTemplateLiteral.js deleted file mode 100644 index 38d6065..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/taggedTemplateLiteral.js +++ /dev/null @@ -1,8 +0,0 @@ -function _taggedTemplateLiteral(e, t) { - return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { - raw: { - value: Object.freeze(t) - } - })); -} -module.exports = _taggedTemplateLiteral, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/taggedTemplateLiteralLoose.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/taggedTemplateLiteralLoose.js deleted file mode 100644 index 2f8c146..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/taggedTemplateLiteralLoose.js +++ /dev/null @@ -1,4 +0,0 @@ -function _taggedTemplateLiteralLoose(e, t) { - return t || (t = e.slice(0)), e.raw = t, e; -} -module.exports = _taggedTemplateLiteralLoose, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/tdz.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/tdz.js deleted file mode 100644 index c66f476..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/tdz.js +++ /dev/null @@ -1,4 +0,0 @@ -function _tdzError(e) { - throw new ReferenceError(e + " is not defined - temporal dead zone"); -} -module.exports = _tdzError, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/temporalRef.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/temporalRef.js deleted file mode 100644 index 54c9190..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/temporalRef.js +++ /dev/null @@ -1,6 +0,0 @@ -var temporalUndefined = require("./temporalUndefined.js"); -var tdz = require("./tdz.js"); -function _temporalRef(r, e) { - return r === temporalUndefined ? tdz(e) : r; -} -module.exports = _temporalRef, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/temporalUndefined.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/temporalUndefined.js deleted file mode 100644 index f8def80..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/temporalUndefined.js +++ /dev/null @@ -1,2 +0,0 @@ -function _temporalUndefined() {} -module.exports = _temporalUndefined, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/toArray.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/toArray.js deleted file mode 100644 index 2be1d2b..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/toArray.js +++ /dev/null @@ -1,8 +0,0 @@ -var arrayWithHoles = require("./arrayWithHoles.js"); -var iterableToArray = require("./iterableToArray.js"); -var unsupportedIterableToArray = require("./unsupportedIterableToArray.js"); -var nonIterableRest = require("./nonIterableRest.js"); -function _toArray(r) { - return arrayWithHoles(r) || iterableToArray(r) || unsupportedIterableToArray(r) || nonIterableRest(); -} -module.exports = _toArray, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/toConsumableArray.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/toConsumableArray.js deleted file mode 100644 index 698f9c6..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/toConsumableArray.js +++ /dev/null @@ -1,8 +0,0 @@ -var arrayWithoutHoles = require("./arrayWithoutHoles.js"); -var iterableToArray = require("./iterableToArray.js"); -var unsupportedIterableToArray = require("./unsupportedIterableToArray.js"); -var nonIterableSpread = require("./nonIterableSpread.js"); -function _toConsumableArray(r) { - return arrayWithoutHoles(r) || iterableToArray(r) || unsupportedIterableToArray(r) || nonIterableSpread(); -} -module.exports = _toConsumableArray, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/toPrimitive.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/toPrimitive.js deleted file mode 100644 index ef9d249..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/toPrimitive.js +++ /dev/null @@ -1,12 +0,0 @@ -var _typeof = require("./typeof.js")["default"]; -function toPrimitive(t, r) { - if ("object" != _typeof(t) || !t) return t; - var e = t[Symbol.toPrimitive]; - if (void 0 !== e) { - var i = e.call(t, r || "default"); - if ("object" != _typeof(i)) return i; - throw new TypeError("@@toPrimitive must return a primitive value."); - } - return ("string" === r ? String : Number)(t); -} -module.exports = toPrimitive, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/toPropertyKey.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/toPropertyKey.js deleted file mode 100644 index 3ca3d4f..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/toPropertyKey.js +++ /dev/null @@ -1,7 +0,0 @@ -var _typeof = require("./typeof.js")["default"]; -var toPrimitive = require("./toPrimitive.js"); -function toPropertyKey(t) { - var i = toPrimitive(t, "string"); - return "symbol" == _typeof(i) ? i : i + ""; -} -module.exports = toPropertyKey, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/toSetter.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/toSetter.js deleted file mode 100644 index e0012a8..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/toSetter.js +++ /dev/null @@ -1,10 +0,0 @@ -function _toSetter(t, e, n) { - e || (e = []); - var r = e.length++; - return Object.defineProperty({}, "_", { - set: function set(o) { - e[r] = o, t.apply(n, e); - } - }); -} -module.exports = _toSetter, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/tsRewriteRelativeImportExtensions.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/tsRewriteRelativeImportExtensions.js deleted file mode 100644 index 4de0e4d..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/tsRewriteRelativeImportExtensions.js +++ /dev/null @@ -1,6 +0,0 @@ -function tsRewriteRelativeImportExtensions(t, e) { - return "string" == typeof t && /^\.\.?\//.test(t) ? t.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+)?)\.([cm]?)ts$/i, function (t, s, r, n, o) { - return s ? e ? ".jsx" : ".js" : !r || n && o ? r + n + "." + o.toLowerCase() + "js" : t; - }) : t; -} -module.exports = tsRewriteRelativeImportExtensions, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/typeof.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/typeof.js deleted file mode 100644 index b6fbfaf..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/typeof.js +++ /dev/null @@ -1,10 +0,0 @@ -function _typeof(o) { - "@babel/helpers - typeof"; - - return module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { - return typeof o; - } : function (o) { - return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; - }, module.exports.__esModule = true, module.exports["default"] = module.exports, _typeof(o); -} -module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js deleted file mode 100644 index 8fb1a71..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js +++ /dev/null @@ -1,9 +0,0 @@ -var arrayLikeToArray = require("./arrayLikeToArray.js"); -function _unsupportedIterableToArray(r, a) { - if (r) { - if ("string" == typeof r) return arrayLikeToArray(r, a); - var t = {}.toString.call(r).slice(8, -1); - return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? arrayLikeToArray(r, a) : void 0; - } -} -module.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/using.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/using.js deleted file mode 100644 index 37c79e2..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/using.js +++ /dev/null @@ -1,12 +0,0 @@ -function _using(o, n, e) { - if (null == n) return n; - if (Object(n) !== n) throw new TypeError("using declarations can only be used with objects, functions, null, or undefined."); - if (e) var r = n[Symbol.asyncDispose || Symbol["for"]("Symbol.asyncDispose")]; - if (null == r && (r = n[Symbol.dispose || Symbol["for"]("Symbol.dispose")]), "function" != typeof r) throw new TypeError("Property [Symbol.dispose] is not a function."); - return o.push({ - v: n, - d: r, - a: e - }), n; -} -module.exports = _using, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/usingCtx.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/usingCtx.js deleted file mode 100644 index 652ab15..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/usingCtx.js +++ /dev/null @@ -1,59 +0,0 @@ -function _usingCtx() { - var r = "function" == typeof SuppressedError ? SuppressedError : function (r, e) { - var n = Error(); - return n.name = "SuppressedError", n.error = r, n.suppressed = e, n; - }, - e = {}, - n = []; - function using(r, e) { - if (null != e) { - if (Object(e) !== e) throw new TypeError("using declarations can only be used with objects, functions, null, or undefined."); - if (r) var o = e[Symbol.asyncDispose || Symbol["for"]("Symbol.asyncDispose")]; - if (void 0 === o && (o = e[Symbol.dispose || Symbol["for"]("Symbol.dispose")], r)) var t = o; - if ("function" != typeof o) throw new TypeError("Object is not disposable."); - t && (o = function o() { - try { - t.call(e); - } catch (r) { - return Promise.reject(r); - } - }), n.push({ - v: e, - d: o, - a: r - }); - } else r && n.push({ - d: e, - a: r - }); - return e; - } - return { - e: e, - u: using.bind(null, !1), - a: using.bind(null, !0), - d: function d() { - var o, - t = this.e, - s = 0; - function next() { - for (; o = n.pop();) try { - if (!o.a && 1 === s) return s = 0, n.push(o), Promise.resolve().then(next); - if (o.d) { - var r = o.d.call(o.v); - if (o.a) return s |= 2, Promise.resolve(r).then(next, err); - } else s |= 1; - } catch (r) { - return err(r); - } - if (1 === s) return t !== e ? Promise.reject(t) : Promise.resolve(); - if (t !== e) throw t; - } - function err(n) { - return t = t !== e ? new r(n, t) : n, next(); - } - return next(); - } - }; -} -module.exports = _usingCtx, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/wrapAsyncGenerator.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/wrapAsyncGenerator.js deleted file mode 100644 index b818e2e..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/wrapAsyncGenerator.js +++ /dev/null @@ -1,69 +0,0 @@ -var OverloadYield = require("./OverloadYield.js"); -function _wrapAsyncGenerator(e) { - return function () { - return new AsyncGenerator(e.apply(this, arguments)); - }; -} -function AsyncGenerator(e) { - var r, t; - function resume(r, t) { - try { - var n = e[r](t), - o = n.value, - u = o instanceof OverloadYield; - Promise.resolve(u ? o.v : o).then(function (t) { - if (u) { - var i = "return" === r ? "return" : "next"; - if (!o.k || t.done) return resume(i, t); - t = e[i](t).value; - } - settle(n.done ? "return" : "normal", t); - }, function (e) { - resume("throw", e); - }); - } catch (e) { - settle("throw", e); - } - } - function settle(e, n) { - switch (e) { - case "return": - r.resolve({ - value: n, - done: !0 - }); - break; - case "throw": - r.reject(n); - break; - default: - r.resolve({ - value: n, - done: !1 - }); - } - (r = r.next) ? resume(r.key, r.arg) : t = null; - } - this._invoke = function (e, n) { - return new Promise(function (o, u) { - var i = { - key: e, - arg: n, - resolve: o, - reject: u, - next: null - }; - t ? t = t.next = i : (r = t = i, resume(e, n)); - }); - }, "function" != typeof e["return"] && (this["return"] = void 0); -} -AsyncGenerator.prototype["function" == typeof Symbol && Symbol.asyncIterator || "@@asyncIterator"] = function () { - return this; -}, AsyncGenerator.prototype.next = function (e) { - return this._invoke("next", e); -}, AsyncGenerator.prototype["throw"] = function (e) { - return this._invoke("throw", e); -}, AsyncGenerator.prototype["return"] = function (e) { - return this._invoke("return", e); -}; -module.exports = _wrapAsyncGenerator, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/wrapNativeSuper.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/wrapNativeSuper.js deleted file mode 100644 index acd87ab..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/wrapNativeSuper.js +++ /dev/null @@ -1,27 +0,0 @@ -var getPrototypeOf = require("./getPrototypeOf.js"); -var setPrototypeOf = require("./setPrototypeOf.js"); -var isNativeFunction = require("./isNativeFunction.js"); -var construct = require("./construct.js"); -function _wrapNativeSuper(t) { - var r = "function" == typeof Map ? new Map() : void 0; - return module.exports = _wrapNativeSuper = function _wrapNativeSuper(t) { - if (null === t || !isNativeFunction(t)) return t; - if ("function" != typeof t) throw new TypeError("Super expression must either be null or a function"); - if (void 0 !== r) { - if (r.has(t)) return r.get(t); - r.set(t, Wrapper); - } - function Wrapper() { - return construct(t, arguments, getPrototypeOf(this).constructor); - } - return Wrapper.prototype = Object.create(t.prototype, { - constructor: { - value: Wrapper, - enumerable: !1, - writable: !0, - configurable: !0 - } - }), setPrototypeOf(Wrapper, t); - }, module.exports.__esModule = true, module.exports["default"] = module.exports, _wrapNativeSuper(t); -} -module.exports = _wrapNativeSuper, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/wrapRegExp.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/wrapRegExp.js deleted file mode 100644 index 3d6e6ce..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/wrapRegExp.js +++ /dev/null @@ -1,52 +0,0 @@ -var _typeof = require("./typeof.js")["default"]; -var setPrototypeOf = require("./setPrototypeOf.js"); -var inherits = require("./inherits.js"); -function _wrapRegExp() { - module.exports = _wrapRegExp = function _wrapRegExp(e, r) { - return new BabelRegExp(e, void 0, r); - }, module.exports.__esModule = true, module.exports["default"] = module.exports; - var e = RegExp.prototype, - r = new WeakMap(); - function BabelRegExp(e, t, p) { - var o = RegExp(e, t); - return r.set(o, p || r.get(e)), setPrototypeOf(o, BabelRegExp.prototype); - } - function buildGroups(e, t) { - var p = r.get(t); - return Object.keys(p).reduce(function (r, t) { - var o = p[t]; - if ("number" == typeof o) r[t] = e[o];else { - for (var i = 0; void 0 === e[o[i]] && i + 1 < o.length;) i++; - r[t] = e[o[i]]; - } - return r; - }, Object.create(null)); - } - return inherits(BabelRegExp, RegExp), BabelRegExp.prototype.exec = function (r) { - var t = e.exec.call(this, r); - if (t) { - t.groups = buildGroups(t, this); - var p = t.indices; - p && (p.groups = buildGroups(p, this)); - } - return t; - }, BabelRegExp.prototype[Symbol.replace] = function (t, p) { - if ("string" == typeof p) { - var o = r.get(this); - return e[Symbol.replace].call(this, t, p.replace(/\$<([^>]+)(>|$)/g, function (e, r, t) { - if ("" === t) return e; - var p = o[r]; - return Array.isArray(p) ? "$" + p.join("$") : "number" == typeof p ? "$" + p : ""; - })); - } - if ("function" == typeof p) { - var i = this; - return e[Symbol.replace].call(this, t, function () { - var e = arguments; - return "object" != _typeof(e[e.length - 1]) && (e = [].slice.call(e)).push(buildGroups(e, i)), p.apply(this, e); - }); - } - return e[Symbol.replace].call(this, t, p); - }, _wrapRegExp.apply(this, arguments); -} -module.exports = _wrapRegExp, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/writeOnlyError.js b/PBandGraphScaffold/node_modules/@babel/runtime/helpers/writeOnlyError.js deleted file mode 100644 index c98ee82..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/helpers/writeOnlyError.js +++ /dev/null @@ -1,4 +0,0 @@ -function _writeOnlyError(r) { - throw new TypeError('"' + r + '" is write-only'); -} -module.exports = _writeOnlyError, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/package.json b/PBandGraphScaffold/node_modules/@babel/runtime/package.json deleted file mode 100644 index 1a8098a..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/package.json +++ /dev/null @@ -1,1107 +0,0 @@ -{ - "name": "@babel/runtime", - "version": "7.28.4", - "description": "babel's modular runtime helpers", - "license": "MIT", - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git", - "url": "https://github.com/babel/babel.git", - "directory": "packages/babel-runtime" - }, - "homepage": "https://babel.dev/docs/en/next/babel-runtime", - "author": "The Babel Team (https://babel.dev/team)", - "exports": { - "./helpers/OverloadYield": [ - { - "node": "./helpers/OverloadYield.js", - "import": "./helpers/esm/OverloadYield.js", - "default": "./helpers/OverloadYield.js" - }, - "./helpers/OverloadYield.js" - ], - "./helpers/esm/OverloadYield": "./helpers/esm/OverloadYield.js", - "./helpers/applyDecoratedDescriptor": [ - { - "node": "./helpers/applyDecoratedDescriptor.js", - "import": "./helpers/esm/applyDecoratedDescriptor.js", - "default": "./helpers/applyDecoratedDescriptor.js" - }, - "./helpers/applyDecoratedDescriptor.js" - ], - "./helpers/esm/applyDecoratedDescriptor": "./helpers/esm/applyDecoratedDescriptor.js", - "./helpers/applyDecs2311": [ - { - "node": "./helpers/applyDecs2311.js", - "import": "./helpers/esm/applyDecs2311.js", - "default": "./helpers/applyDecs2311.js" - }, - "./helpers/applyDecs2311.js" - ], - "./helpers/esm/applyDecs2311": "./helpers/esm/applyDecs2311.js", - "./helpers/arrayLikeToArray": [ - { - "node": "./helpers/arrayLikeToArray.js", - "import": "./helpers/esm/arrayLikeToArray.js", - "default": "./helpers/arrayLikeToArray.js" - }, - "./helpers/arrayLikeToArray.js" - ], - "./helpers/esm/arrayLikeToArray": "./helpers/esm/arrayLikeToArray.js", - "./helpers/arrayWithHoles": [ - { - "node": "./helpers/arrayWithHoles.js", - "import": "./helpers/esm/arrayWithHoles.js", - "default": "./helpers/arrayWithHoles.js" - }, - "./helpers/arrayWithHoles.js" - ], - "./helpers/esm/arrayWithHoles": "./helpers/esm/arrayWithHoles.js", - "./helpers/arrayWithoutHoles": [ - { - "node": "./helpers/arrayWithoutHoles.js", - "import": "./helpers/esm/arrayWithoutHoles.js", - "default": "./helpers/arrayWithoutHoles.js" - }, - "./helpers/arrayWithoutHoles.js" - ], - "./helpers/esm/arrayWithoutHoles": "./helpers/esm/arrayWithoutHoles.js", - "./helpers/assertClassBrand": [ - { - "node": "./helpers/assertClassBrand.js", - "import": "./helpers/esm/assertClassBrand.js", - "default": "./helpers/assertClassBrand.js" - }, - "./helpers/assertClassBrand.js" - ], - "./helpers/esm/assertClassBrand": "./helpers/esm/assertClassBrand.js", - "./helpers/assertThisInitialized": [ - { - "node": "./helpers/assertThisInitialized.js", - "import": "./helpers/esm/assertThisInitialized.js", - "default": "./helpers/assertThisInitialized.js" - }, - "./helpers/assertThisInitialized.js" - ], - "./helpers/esm/assertThisInitialized": "./helpers/esm/assertThisInitialized.js", - "./helpers/asyncGeneratorDelegate": [ - { - "node": "./helpers/asyncGeneratorDelegate.js", - "import": "./helpers/esm/asyncGeneratorDelegate.js", - "default": "./helpers/asyncGeneratorDelegate.js" - }, - "./helpers/asyncGeneratorDelegate.js" - ], - "./helpers/esm/asyncGeneratorDelegate": "./helpers/esm/asyncGeneratorDelegate.js", - "./helpers/asyncIterator": [ - { - "node": "./helpers/asyncIterator.js", - "import": "./helpers/esm/asyncIterator.js", - "default": "./helpers/asyncIterator.js" - }, - "./helpers/asyncIterator.js" - ], - "./helpers/esm/asyncIterator": "./helpers/esm/asyncIterator.js", - "./helpers/asyncToGenerator": [ - { - "node": "./helpers/asyncToGenerator.js", - "import": "./helpers/esm/asyncToGenerator.js", - "default": "./helpers/asyncToGenerator.js" - }, - "./helpers/asyncToGenerator.js" - ], - "./helpers/esm/asyncToGenerator": "./helpers/esm/asyncToGenerator.js", - "./helpers/awaitAsyncGenerator": [ - { - "node": "./helpers/awaitAsyncGenerator.js", - "import": "./helpers/esm/awaitAsyncGenerator.js", - "default": "./helpers/awaitAsyncGenerator.js" - }, - "./helpers/awaitAsyncGenerator.js" - ], - "./helpers/esm/awaitAsyncGenerator": "./helpers/esm/awaitAsyncGenerator.js", - "./helpers/callSuper": [ - { - "node": "./helpers/callSuper.js", - "import": "./helpers/esm/callSuper.js", - "default": "./helpers/callSuper.js" - }, - "./helpers/callSuper.js" - ], - "./helpers/esm/callSuper": "./helpers/esm/callSuper.js", - "./helpers/checkInRHS": [ - { - "node": "./helpers/checkInRHS.js", - "import": "./helpers/esm/checkInRHS.js", - "default": "./helpers/checkInRHS.js" - }, - "./helpers/checkInRHS.js" - ], - "./helpers/esm/checkInRHS": "./helpers/esm/checkInRHS.js", - "./helpers/checkPrivateRedeclaration": [ - { - "node": "./helpers/checkPrivateRedeclaration.js", - "import": "./helpers/esm/checkPrivateRedeclaration.js", - "default": "./helpers/checkPrivateRedeclaration.js" - }, - "./helpers/checkPrivateRedeclaration.js" - ], - "./helpers/esm/checkPrivateRedeclaration": "./helpers/esm/checkPrivateRedeclaration.js", - "./helpers/classCallCheck": [ - { - "node": "./helpers/classCallCheck.js", - "import": "./helpers/esm/classCallCheck.js", - "default": "./helpers/classCallCheck.js" - }, - "./helpers/classCallCheck.js" - ], - "./helpers/esm/classCallCheck": "./helpers/esm/classCallCheck.js", - "./helpers/classNameTDZError": [ - { - "node": "./helpers/classNameTDZError.js", - "import": "./helpers/esm/classNameTDZError.js", - "default": "./helpers/classNameTDZError.js" - }, - "./helpers/classNameTDZError.js" - ], - "./helpers/esm/classNameTDZError": "./helpers/esm/classNameTDZError.js", - "./helpers/classPrivateFieldGet2": [ - { - "node": "./helpers/classPrivateFieldGet2.js", - "import": "./helpers/esm/classPrivateFieldGet2.js", - "default": "./helpers/classPrivateFieldGet2.js" - }, - "./helpers/classPrivateFieldGet2.js" - ], - "./helpers/esm/classPrivateFieldGet2": "./helpers/esm/classPrivateFieldGet2.js", - "./helpers/classPrivateFieldInitSpec": [ - { - "node": "./helpers/classPrivateFieldInitSpec.js", - "import": "./helpers/esm/classPrivateFieldInitSpec.js", - "default": "./helpers/classPrivateFieldInitSpec.js" - }, - "./helpers/classPrivateFieldInitSpec.js" - ], - "./helpers/esm/classPrivateFieldInitSpec": "./helpers/esm/classPrivateFieldInitSpec.js", - "./helpers/classPrivateFieldLooseBase": [ - { - "node": "./helpers/classPrivateFieldLooseBase.js", - "import": "./helpers/esm/classPrivateFieldLooseBase.js", - "default": "./helpers/classPrivateFieldLooseBase.js" - }, - "./helpers/classPrivateFieldLooseBase.js" - ], - "./helpers/esm/classPrivateFieldLooseBase": "./helpers/esm/classPrivateFieldLooseBase.js", - "./helpers/classPrivateFieldLooseKey": [ - { - "node": "./helpers/classPrivateFieldLooseKey.js", - "import": "./helpers/esm/classPrivateFieldLooseKey.js", - "default": "./helpers/classPrivateFieldLooseKey.js" - }, - "./helpers/classPrivateFieldLooseKey.js" - ], - "./helpers/esm/classPrivateFieldLooseKey": "./helpers/esm/classPrivateFieldLooseKey.js", - "./helpers/classPrivateFieldSet2": [ - { - "node": "./helpers/classPrivateFieldSet2.js", - "import": "./helpers/esm/classPrivateFieldSet2.js", - "default": "./helpers/classPrivateFieldSet2.js" - }, - "./helpers/classPrivateFieldSet2.js" - ], - "./helpers/esm/classPrivateFieldSet2": "./helpers/esm/classPrivateFieldSet2.js", - "./helpers/classPrivateGetter": [ - { - "node": "./helpers/classPrivateGetter.js", - "import": "./helpers/esm/classPrivateGetter.js", - "default": "./helpers/classPrivateGetter.js" - }, - "./helpers/classPrivateGetter.js" - ], - "./helpers/esm/classPrivateGetter": "./helpers/esm/classPrivateGetter.js", - "./helpers/classPrivateMethodInitSpec": [ - { - "node": "./helpers/classPrivateMethodInitSpec.js", - "import": "./helpers/esm/classPrivateMethodInitSpec.js", - "default": "./helpers/classPrivateMethodInitSpec.js" - }, - "./helpers/classPrivateMethodInitSpec.js" - ], - "./helpers/esm/classPrivateMethodInitSpec": "./helpers/esm/classPrivateMethodInitSpec.js", - "./helpers/classPrivateSetter": [ - { - "node": "./helpers/classPrivateSetter.js", - "import": "./helpers/esm/classPrivateSetter.js", - "default": "./helpers/classPrivateSetter.js" - }, - "./helpers/classPrivateSetter.js" - ], - "./helpers/esm/classPrivateSetter": "./helpers/esm/classPrivateSetter.js", - "./helpers/classStaticPrivateMethodGet": [ - { - "node": "./helpers/classStaticPrivateMethodGet.js", - "import": "./helpers/esm/classStaticPrivateMethodGet.js", - "default": "./helpers/classStaticPrivateMethodGet.js" - }, - "./helpers/classStaticPrivateMethodGet.js" - ], - "./helpers/esm/classStaticPrivateMethodGet": "./helpers/esm/classStaticPrivateMethodGet.js", - "./helpers/construct": [ - { - "node": "./helpers/construct.js", - "import": "./helpers/esm/construct.js", - "default": "./helpers/construct.js" - }, - "./helpers/construct.js" - ], - "./helpers/esm/construct": "./helpers/esm/construct.js", - "./helpers/createClass": [ - { - "node": "./helpers/createClass.js", - "import": "./helpers/esm/createClass.js", - "default": "./helpers/createClass.js" - }, - "./helpers/createClass.js" - ], - "./helpers/esm/createClass": "./helpers/esm/createClass.js", - "./helpers/createForOfIteratorHelper": [ - { - "node": "./helpers/createForOfIteratorHelper.js", - "import": "./helpers/esm/createForOfIteratorHelper.js", - "default": "./helpers/createForOfIteratorHelper.js" - }, - "./helpers/createForOfIteratorHelper.js" - ], - "./helpers/esm/createForOfIteratorHelper": "./helpers/esm/createForOfIteratorHelper.js", - "./helpers/createForOfIteratorHelperLoose": [ - { - "node": "./helpers/createForOfIteratorHelperLoose.js", - "import": "./helpers/esm/createForOfIteratorHelperLoose.js", - "default": "./helpers/createForOfIteratorHelperLoose.js" - }, - "./helpers/createForOfIteratorHelperLoose.js" - ], - "./helpers/esm/createForOfIteratorHelperLoose": "./helpers/esm/createForOfIteratorHelperLoose.js", - "./helpers/createSuper": [ - { - "node": "./helpers/createSuper.js", - "import": "./helpers/esm/createSuper.js", - "default": "./helpers/createSuper.js" - }, - "./helpers/createSuper.js" - ], - "./helpers/esm/createSuper": "./helpers/esm/createSuper.js", - "./helpers/decorate": [ - { - "node": "./helpers/decorate.js", - "import": "./helpers/esm/decorate.js", - "default": "./helpers/decorate.js" - }, - "./helpers/decorate.js" - ], - "./helpers/esm/decorate": "./helpers/esm/decorate.js", - "./helpers/defaults": [ - { - "node": "./helpers/defaults.js", - "import": "./helpers/esm/defaults.js", - "default": "./helpers/defaults.js" - }, - "./helpers/defaults.js" - ], - "./helpers/esm/defaults": "./helpers/esm/defaults.js", - "./helpers/defineAccessor": [ - { - "node": "./helpers/defineAccessor.js", - "import": "./helpers/esm/defineAccessor.js", - "default": "./helpers/defineAccessor.js" - }, - "./helpers/defineAccessor.js" - ], - "./helpers/esm/defineAccessor": "./helpers/esm/defineAccessor.js", - "./helpers/defineProperty": [ - { - "node": "./helpers/defineProperty.js", - "import": "./helpers/esm/defineProperty.js", - "default": "./helpers/defineProperty.js" - }, - "./helpers/defineProperty.js" - ], - "./helpers/esm/defineProperty": "./helpers/esm/defineProperty.js", - "./helpers/extends": [ - { - "node": "./helpers/extends.js", - "import": "./helpers/esm/extends.js", - "default": "./helpers/extends.js" - }, - "./helpers/extends.js" - ], - "./helpers/esm/extends": "./helpers/esm/extends.js", - "./helpers/get": [ - { - "node": "./helpers/get.js", - "import": "./helpers/esm/get.js", - "default": "./helpers/get.js" - }, - "./helpers/get.js" - ], - "./helpers/esm/get": "./helpers/esm/get.js", - "./helpers/getPrototypeOf": [ - { - "node": "./helpers/getPrototypeOf.js", - "import": "./helpers/esm/getPrototypeOf.js", - "default": "./helpers/getPrototypeOf.js" - }, - "./helpers/getPrototypeOf.js" - ], - "./helpers/esm/getPrototypeOf": "./helpers/esm/getPrototypeOf.js", - "./helpers/identity": [ - { - "node": "./helpers/identity.js", - "import": "./helpers/esm/identity.js", - "default": "./helpers/identity.js" - }, - "./helpers/identity.js" - ], - "./helpers/esm/identity": "./helpers/esm/identity.js", - "./helpers/importDeferProxy": [ - { - "node": "./helpers/importDeferProxy.js", - "import": "./helpers/esm/importDeferProxy.js", - "default": "./helpers/importDeferProxy.js" - }, - "./helpers/importDeferProxy.js" - ], - "./helpers/esm/importDeferProxy": "./helpers/esm/importDeferProxy.js", - "./helpers/inherits": [ - { - "node": "./helpers/inherits.js", - "import": "./helpers/esm/inherits.js", - "default": "./helpers/inherits.js" - }, - "./helpers/inherits.js" - ], - "./helpers/esm/inherits": "./helpers/esm/inherits.js", - "./helpers/inheritsLoose": [ - { - "node": "./helpers/inheritsLoose.js", - "import": "./helpers/esm/inheritsLoose.js", - "default": "./helpers/inheritsLoose.js" - }, - "./helpers/inheritsLoose.js" - ], - "./helpers/esm/inheritsLoose": "./helpers/esm/inheritsLoose.js", - "./helpers/initializerDefineProperty": [ - { - "node": "./helpers/initializerDefineProperty.js", - "import": "./helpers/esm/initializerDefineProperty.js", - "default": "./helpers/initializerDefineProperty.js" - }, - "./helpers/initializerDefineProperty.js" - ], - "./helpers/esm/initializerDefineProperty": "./helpers/esm/initializerDefineProperty.js", - "./helpers/initializerWarningHelper": [ - { - "node": "./helpers/initializerWarningHelper.js", - "import": "./helpers/esm/initializerWarningHelper.js", - "default": "./helpers/initializerWarningHelper.js" - }, - "./helpers/initializerWarningHelper.js" - ], - "./helpers/esm/initializerWarningHelper": "./helpers/esm/initializerWarningHelper.js", - "./helpers/instanceof": [ - { - "node": "./helpers/instanceof.js", - "import": "./helpers/esm/instanceof.js", - "default": "./helpers/instanceof.js" - }, - "./helpers/instanceof.js" - ], - "./helpers/esm/instanceof": "./helpers/esm/instanceof.js", - "./helpers/interopRequireDefault": [ - { - "node": "./helpers/interopRequireDefault.js", - "import": "./helpers/esm/interopRequireDefault.js", - "default": "./helpers/interopRequireDefault.js" - }, - "./helpers/interopRequireDefault.js" - ], - "./helpers/esm/interopRequireDefault": "./helpers/esm/interopRequireDefault.js", - "./helpers/interopRequireWildcard": [ - { - "node": "./helpers/interopRequireWildcard.js", - "import": "./helpers/esm/interopRequireWildcard.js", - "default": "./helpers/interopRequireWildcard.js" - }, - "./helpers/interopRequireWildcard.js" - ], - "./helpers/esm/interopRequireWildcard": "./helpers/esm/interopRequireWildcard.js", - "./helpers/isNativeFunction": [ - { - "node": "./helpers/isNativeFunction.js", - "import": "./helpers/esm/isNativeFunction.js", - "default": "./helpers/isNativeFunction.js" - }, - "./helpers/isNativeFunction.js" - ], - "./helpers/esm/isNativeFunction": "./helpers/esm/isNativeFunction.js", - "./helpers/isNativeReflectConstruct": [ - { - "node": "./helpers/isNativeReflectConstruct.js", - "import": "./helpers/esm/isNativeReflectConstruct.js", - "default": "./helpers/isNativeReflectConstruct.js" - }, - "./helpers/isNativeReflectConstruct.js" - ], - "./helpers/esm/isNativeReflectConstruct": "./helpers/esm/isNativeReflectConstruct.js", - "./helpers/iterableToArray": [ - { - "node": "./helpers/iterableToArray.js", - "import": "./helpers/esm/iterableToArray.js", - "default": "./helpers/iterableToArray.js" - }, - "./helpers/iterableToArray.js" - ], - "./helpers/esm/iterableToArray": "./helpers/esm/iterableToArray.js", - "./helpers/iterableToArrayLimit": [ - { - "node": "./helpers/iterableToArrayLimit.js", - "import": "./helpers/esm/iterableToArrayLimit.js", - "default": "./helpers/iterableToArrayLimit.js" - }, - "./helpers/iterableToArrayLimit.js" - ], - "./helpers/esm/iterableToArrayLimit": "./helpers/esm/iterableToArrayLimit.js", - "./helpers/jsx": [ - { - "node": "./helpers/jsx.js", - "import": "./helpers/esm/jsx.js", - "default": "./helpers/jsx.js" - }, - "./helpers/jsx.js" - ], - "./helpers/esm/jsx": "./helpers/esm/jsx.js", - "./helpers/maybeArrayLike": [ - { - "node": "./helpers/maybeArrayLike.js", - "import": "./helpers/esm/maybeArrayLike.js", - "default": "./helpers/maybeArrayLike.js" - }, - "./helpers/maybeArrayLike.js" - ], - "./helpers/esm/maybeArrayLike": "./helpers/esm/maybeArrayLike.js", - "./helpers/newArrowCheck": [ - { - "node": "./helpers/newArrowCheck.js", - "import": "./helpers/esm/newArrowCheck.js", - "default": "./helpers/newArrowCheck.js" - }, - "./helpers/newArrowCheck.js" - ], - "./helpers/esm/newArrowCheck": "./helpers/esm/newArrowCheck.js", - "./helpers/nonIterableRest": [ - { - "node": "./helpers/nonIterableRest.js", - "import": "./helpers/esm/nonIterableRest.js", - "default": "./helpers/nonIterableRest.js" - }, - "./helpers/nonIterableRest.js" - ], - "./helpers/esm/nonIterableRest": "./helpers/esm/nonIterableRest.js", - "./helpers/nonIterableSpread": [ - { - "node": "./helpers/nonIterableSpread.js", - "import": "./helpers/esm/nonIterableSpread.js", - "default": "./helpers/nonIterableSpread.js" - }, - "./helpers/nonIterableSpread.js" - ], - "./helpers/esm/nonIterableSpread": "./helpers/esm/nonIterableSpread.js", - "./helpers/nullishReceiverError": [ - { - "node": "./helpers/nullishReceiverError.js", - "import": "./helpers/esm/nullishReceiverError.js", - "default": "./helpers/nullishReceiverError.js" - }, - "./helpers/nullishReceiverError.js" - ], - "./helpers/esm/nullishReceiverError": "./helpers/esm/nullishReceiverError.js", - "./helpers/objectDestructuringEmpty": [ - { - "node": "./helpers/objectDestructuringEmpty.js", - "import": "./helpers/esm/objectDestructuringEmpty.js", - "default": "./helpers/objectDestructuringEmpty.js" - }, - "./helpers/objectDestructuringEmpty.js" - ], - "./helpers/esm/objectDestructuringEmpty": "./helpers/esm/objectDestructuringEmpty.js", - "./helpers/objectSpread2": [ - { - "node": "./helpers/objectSpread2.js", - "import": "./helpers/esm/objectSpread2.js", - "default": "./helpers/objectSpread2.js" - }, - "./helpers/objectSpread2.js" - ], - "./helpers/esm/objectSpread2": "./helpers/esm/objectSpread2.js", - "./helpers/objectWithoutProperties": [ - { - "node": "./helpers/objectWithoutProperties.js", - "import": "./helpers/esm/objectWithoutProperties.js", - "default": "./helpers/objectWithoutProperties.js" - }, - "./helpers/objectWithoutProperties.js" - ], - "./helpers/esm/objectWithoutProperties": "./helpers/esm/objectWithoutProperties.js", - "./helpers/objectWithoutPropertiesLoose": [ - { - "node": "./helpers/objectWithoutPropertiesLoose.js", - "import": "./helpers/esm/objectWithoutPropertiesLoose.js", - "default": "./helpers/objectWithoutPropertiesLoose.js" - }, - "./helpers/objectWithoutPropertiesLoose.js" - ], - "./helpers/esm/objectWithoutPropertiesLoose": "./helpers/esm/objectWithoutPropertiesLoose.js", - "./helpers/possibleConstructorReturn": [ - { - "node": "./helpers/possibleConstructorReturn.js", - "import": "./helpers/esm/possibleConstructorReturn.js", - "default": "./helpers/possibleConstructorReturn.js" - }, - "./helpers/possibleConstructorReturn.js" - ], - "./helpers/esm/possibleConstructorReturn": "./helpers/esm/possibleConstructorReturn.js", - "./helpers/readOnlyError": [ - { - "node": "./helpers/readOnlyError.js", - "import": "./helpers/esm/readOnlyError.js", - "default": "./helpers/readOnlyError.js" - }, - "./helpers/readOnlyError.js" - ], - "./helpers/esm/readOnlyError": "./helpers/esm/readOnlyError.js", - "./helpers/regenerator": [ - { - "node": "./helpers/regenerator.js", - "import": "./helpers/esm/regenerator.js", - "default": "./helpers/regenerator.js" - }, - "./helpers/regenerator.js" - ], - "./helpers/esm/regenerator": "./helpers/esm/regenerator.js", - "./helpers/regeneratorAsync": [ - { - "node": "./helpers/regeneratorAsync.js", - "import": "./helpers/esm/regeneratorAsync.js", - "default": "./helpers/regeneratorAsync.js" - }, - "./helpers/regeneratorAsync.js" - ], - "./helpers/esm/regeneratorAsync": "./helpers/esm/regeneratorAsync.js", - "./helpers/regeneratorAsyncGen": [ - { - "node": "./helpers/regeneratorAsyncGen.js", - "import": "./helpers/esm/regeneratorAsyncGen.js", - "default": "./helpers/regeneratorAsyncGen.js" - }, - "./helpers/regeneratorAsyncGen.js" - ], - "./helpers/esm/regeneratorAsyncGen": "./helpers/esm/regeneratorAsyncGen.js", - "./helpers/regeneratorKeys": [ - { - "node": "./helpers/regeneratorKeys.js", - "import": "./helpers/esm/regeneratorKeys.js", - "default": "./helpers/regeneratorKeys.js" - }, - "./helpers/regeneratorKeys.js" - ], - "./helpers/esm/regeneratorKeys": "./helpers/esm/regeneratorKeys.js", - "./helpers/regeneratorValues": [ - { - "node": "./helpers/regeneratorValues.js", - "import": "./helpers/esm/regeneratorValues.js", - "default": "./helpers/regeneratorValues.js" - }, - "./helpers/regeneratorValues.js" - ], - "./helpers/esm/regeneratorValues": "./helpers/esm/regeneratorValues.js", - "./helpers/set": [ - { - "node": "./helpers/set.js", - "import": "./helpers/esm/set.js", - "default": "./helpers/set.js" - }, - "./helpers/set.js" - ], - "./helpers/esm/set": "./helpers/esm/set.js", - "./helpers/setFunctionName": [ - { - "node": "./helpers/setFunctionName.js", - "import": "./helpers/esm/setFunctionName.js", - "default": "./helpers/setFunctionName.js" - }, - "./helpers/setFunctionName.js" - ], - "./helpers/esm/setFunctionName": "./helpers/esm/setFunctionName.js", - "./helpers/setPrototypeOf": [ - { - "node": "./helpers/setPrototypeOf.js", - "import": "./helpers/esm/setPrototypeOf.js", - "default": "./helpers/setPrototypeOf.js" - }, - "./helpers/setPrototypeOf.js" - ], - "./helpers/esm/setPrototypeOf": "./helpers/esm/setPrototypeOf.js", - "./helpers/skipFirstGeneratorNext": [ - { - "node": "./helpers/skipFirstGeneratorNext.js", - "import": "./helpers/esm/skipFirstGeneratorNext.js", - "default": "./helpers/skipFirstGeneratorNext.js" - }, - "./helpers/skipFirstGeneratorNext.js" - ], - "./helpers/esm/skipFirstGeneratorNext": "./helpers/esm/skipFirstGeneratorNext.js", - "./helpers/slicedToArray": [ - { - "node": "./helpers/slicedToArray.js", - "import": "./helpers/esm/slicedToArray.js", - "default": "./helpers/slicedToArray.js" - }, - "./helpers/slicedToArray.js" - ], - "./helpers/esm/slicedToArray": "./helpers/esm/slicedToArray.js", - "./helpers/superPropBase": [ - { - "node": "./helpers/superPropBase.js", - "import": "./helpers/esm/superPropBase.js", - "default": "./helpers/superPropBase.js" - }, - "./helpers/superPropBase.js" - ], - "./helpers/esm/superPropBase": "./helpers/esm/superPropBase.js", - "./helpers/superPropGet": [ - { - "node": "./helpers/superPropGet.js", - "import": "./helpers/esm/superPropGet.js", - "default": "./helpers/superPropGet.js" - }, - "./helpers/superPropGet.js" - ], - "./helpers/esm/superPropGet": "./helpers/esm/superPropGet.js", - "./helpers/superPropSet": [ - { - "node": "./helpers/superPropSet.js", - "import": "./helpers/esm/superPropSet.js", - "default": "./helpers/superPropSet.js" - }, - "./helpers/superPropSet.js" - ], - "./helpers/esm/superPropSet": "./helpers/esm/superPropSet.js", - "./helpers/taggedTemplateLiteral": [ - { - "node": "./helpers/taggedTemplateLiteral.js", - "import": "./helpers/esm/taggedTemplateLiteral.js", - "default": "./helpers/taggedTemplateLiteral.js" - }, - "./helpers/taggedTemplateLiteral.js" - ], - "./helpers/esm/taggedTemplateLiteral": "./helpers/esm/taggedTemplateLiteral.js", - "./helpers/taggedTemplateLiteralLoose": [ - { - "node": "./helpers/taggedTemplateLiteralLoose.js", - "import": "./helpers/esm/taggedTemplateLiteralLoose.js", - "default": "./helpers/taggedTemplateLiteralLoose.js" - }, - "./helpers/taggedTemplateLiteralLoose.js" - ], - "./helpers/esm/taggedTemplateLiteralLoose": "./helpers/esm/taggedTemplateLiteralLoose.js", - "./helpers/tdz": [ - { - "node": "./helpers/tdz.js", - "import": "./helpers/esm/tdz.js", - "default": "./helpers/tdz.js" - }, - "./helpers/tdz.js" - ], - "./helpers/esm/tdz": "./helpers/esm/tdz.js", - "./helpers/temporalRef": [ - { - "node": "./helpers/temporalRef.js", - "import": "./helpers/esm/temporalRef.js", - "default": "./helpers/temporalRef.js" - }, - "./helpers/temporalRef.js" - ], - "./helpers/esm/temporalRef": "./helpers/esm/temporalRef.js", - "./helpers/temporalUndefined": [ - { - "node": "./helpers/temporalUndefined.js", - "import": "./helpers/esm/temporalUndefined.js", - "default": "./helpers/temporalUndefined.js" - }, - "./helpers/temporalUndefined.js" - ], - "./helpers/esm/temporalUndefined": "./helpers/esm/temporalUndefined.js", - "./helpers/toArray": [ - { - "node": "./helpers/toArray.js", - "import": "./helpers/esm/toArray.js", - "default": "./helpers/toArray.js" - }, - "./helpers/toArray.js" - ], - "./helpers/esm/toArray": "./helpers/esm/toArray.js", - "./helpers/toConsumableArray": [ - { - "node": "./helpers/toConsumableArray.js", - "import": "./helpers/esm/toConsumableArray.js", - "default": "./helpers/toConsumableArray.js" - }, - "./helpers/toConsumableArray.js" - ], - "./helpers/esm/toConsumableArray": "./helpers/esm/toConsumableArray.js", - "./helpers/toPrimitive": [ - { - "node": "./helpers/toPrimitive.js", - "import": "./helpers/esm/toPrimitive.js", - "default": "./helpers/toPrimitive.js" - }, - "./helpers/toPrimitive.js" - ], - "./helpers/esm/toPrimitive": "./helpers/esm/toPrimitive.js", - "./helpers/toPropertyKey": [ - { - "node": "./helpers/toPropertyKey.js", - "import": "./helpers/esm/toPropertyKey.js", - "default": "./helpers/toPropertyKey.js" - }, - "./helpers/toPropertyKey.js" - ], - "./helpers/esm/toPropertyKey": "./helpers/esm/toPropertyKey.js", - "./helpers/toSetter": [ - { - "node": "./helpers/toSetter.js", - "import": "./helpers/esm/toSetter.js", - "default": "./helpers/toSetter.js" - }, - "./helpers/toSetter.js" - ], - "./helpers/esm/toSetter": "./helpers/esm/toSetter.js", - "./helpers/tsRewriteRelativeImportExtensions": [ - { - "node": "./helpers/tsRewriteRelativeImportExtensions.js", - "import": "./helpers/esm/tsRewriteRelativeImportExtensions.js", - "default": "./helpers/tsRewriteRelativeImportExtensions.js" - }, - "./helpers/tsRewriteRelativeImportExtensions.js" - ], - "./helpers/esm/tsRewriteRelativeImportExtensions": "./helpers/esm/tsRewriteRelativeImportExtensions.js", - "./helpers/typeof": [ - { - "node": "./helpers/typeof.js", - "import": "./helpers/esm/typeof.js", - "default": "./helpers/typeof.js" - }, - "./helpers/typeof.js" - ], - "./helpers/esm/typeof": "./helpers/esm/typeof.js", - "./helpers/unsupportedIterableToArray": [ - { - "node": "./helpers/unsupportedIterableToArray.js", - "import": "./helpers/esm/unsupportedIterableToArray.js", - "default": "./helpers/unsupportedIterableToArray.js" - }, - "./helpers/unsupportedIterableToArray.js" - ], - "./helpers/esm/unsupportedIterableToArray": "./helpers/esm/unsupportedIterableToArray.js", - "./helpers/usingCtx": [ - { - "node": "./helpers/usingCtx.js", - "import": "./helpers/esm/usingCtx.js", - "default": "./helpers/usingCtx.js" - }, - "./helpers/usingCtx.js" - ], - "./helpers/esm/usingCtx": "./helpers/esm/usingCtx.js", - "./helpers/wrapAsyncGenerator": [ - { - "node": "./helpers/wrapAsyncGenerator.js", - "import": "./helpers/esm/wrapAsyncGenerator.js", - "default": "./helpers/wrapAsyncGenerator.js" - }, - "./helpers/wrapAsyncGenerator.js" - ], - "./helpers/esm/wrapAsyncGenerator": "./helpers/esm/wrapAsyncGenerator.js", - "./helpers/wrapNativeSuper": [ - { - "node": "./helpers/wrapNativeSuper.js", - "import": "./helpers/esm/wrapNativeSuper.js", - "default": "./helpers/wrapNativeSuper.js" - }, - "./helpers/wrapNativeSuper.js" - ], - "./helpers/esm/wrapNativeSuper": "./helpers/esm/wrapNativeSuper.js", - "./helpers/wrapRegExp": [ - { - "node": "./helpers/wrapRegExp.js", - "import": "./helpers/esm/wrapRegExp.js", - "default": "./helpers/wrapRegExp.js" - }, - "./helpers/wrapRegExp.js" - ], - "./helpers/esm/wrapRegExp": "./helpers/esm/wrapRegExp.js", - "./helpers/writeOnlyError": [ - { - "node": "./helpers/writeOnlyError.js", - "import": "./helpers/esm/writeOnlyError.js", - "default": "./helpers/writeOnlyError.js" - }, - "./helpers/writeOnlyError.js" - ], - "./helpers/esm/writeOnlyError": "./helpers/esm/writeOnlyError.js", - "./helpers/AwaitValue": [ - { - "node": "./helpers/AwaitValue.js", - "import": "./helpers/esm/AwaitValue.js", - "default": "./helpers/AwaitValue.js" - }, - "./helpers/AwaitValue.js" - ], - "./helpers/esm/AwaitValue": "./helpers/esm/AwaitValue.js", - "./helpers/applyDecs": [ - { - "node": "./helpers/applyDecs.js", - "import": "./helpers/esm/applyDecs.js", - "default": "./helpers/applyDecs.js" - }, - "./helpers/applyDecs.js" - ], - "./helpers/esm/applyDecs": "./helpers/esm/applyDecs.js", - "./helpers/applyDecs2203": [ - { - "node": "./helpers/applyDecs2203.js", - "import": "./helpers/esm/applyDecs2203.js", - "default": "./helpers/applyDecs2203.js" - }, - "./helpers/applyDecs2203.js" - ], - "./helpers/esm/applyDecs2203": "./helpers/esm/applyDecs2203.js", - "./helpers/applyDecs2203R": [ - { - "node": "./helpers/applyDecs2203R.js", - "import": "./helpers/esm/applyDecs2203R.js", - "default": "./helpers/applyDecs2203R.js" - }, - "./helpers/applyDecs2203R.js" - ], - "./helpers/esm/applyDecs2203R": "./helpers/esm/applyDecs2203R.js", - "./helpers/applyDecs2301": [ - { - "node": "./helpers/applyDecs2301.js", - "import": "./helpers/esm/applyDecs2301.js", - "default": "./helpers/applyDecs2301.js" - }, - "./helpers/applyDecs2301.js" - ], - "./helpers/esm/applyDecs2301": "./helpers/esm/applyDecs2301.js", - "./helpers/applyDecs2305": [ - { - "node": "./helpers/applyDecs2305.js", - "import": "./helpers/esm/applyDecs2305.js", - "default": "./helpers/applyDecs2305.js" - }, - "./helpers/applyDecs2305.js" - ], - "./helpers/esm/applyDecs2305": "./helpers/esm/applyDecs2305.js", - "./helpers/classApplyDescriptorDestructureSet": [ - { - "node": "./helpers/classApplyDescriptorDestructureSet.js", - "import": "./helpers/esm/classApplyDescriptorDestructureSet.js", - "default": "./helpers/classApplyDescriptorDestructureSet.js" - }, - "./helpers/classApplyDescriptorDestructureSet.js" - ], - "./helpers/esm/classApplyDescriptorDestructureSet": "./helpers/esm/classApplyDescriptorDestructureSet.js", - "./helpers/classApplyDescriptorGet": [ - { - "node": "./helpers/classApplyDescriptorGet.js", - "import": "./helpers/esm/classApplyDescriptorGet.js", - "default": "./helpers/classApplyDescriptorGet.js" - }, - "./helpers/classApplyDescriptorGet.js" - ], - "./helpers/esm/classApplyDescriptorGet": "./helpers/esm/classApplyDescriptorGet.js", - "./helpers/classApplyDescriptorSet": [ - { - "node": "./helpers/classApplyDescriptorSet.js", - "import": "./helpers/esm/classApplyDescriptorSet.js", - "default": "./helpers/classApplyDescriptorSet.js" - }, - "./helpers/classApplyDescriptorSet.js" - ], - "./helpers/esm/classApplyDescriptorSet": "./helpers/esm/classApplyDescriptorSet.js", - "./helpers/classCheckPrivateStaticAccess": [ - { - "node": "./helpers/classCheckPrivateStaticAccess.js", - "import": "./helpers/esm/classCheckPrivateStaticAccess.js", - "default": "./helpers/classCheckPrivateStaticAccess.js" - }, - "./helpers/classCheckPrivateStaticAccess.js" - ], - "./helpers/esm/classCheckPrivateStaticAccess": "./helpers/esm/classCheckPrivateStaticAccess.js", - "./helpers/classCheckPrivateStaticFieldDescriptor": [ - { - "node": "./helpers/classCheckPrivateStaticFieldDescriptor.js", - "import": "./helpers/esm/classCheckPrivateStaticFieldDescriptor.js", - "default": "./helpers/classCheckPrivateStaticFieldDescriptor.js" - }, - "./helpers/classCheckPrivateStaticFieldDescriptor.js" - ], - "./helpers/esm/classCheckPrivateStaticFieldDescriptor": "./helpers/esm/classCheckPrivateStaticFieldDescriptor.js", - "./helpers/classExtractFieldDescriptor": [ - { - "node": "./helpers/classExtractFieldDescriptor.js", - "import": "./helpers/esm/classExtractFieldDescriptor.js", - "default": "./helpers/classExtractFieldDescriptor.js" - }, - "./helpers/classExtractFieldDescriptor.js" - ], - "./helpers/esm/classExtractFieldDescriptor": "./helpers/esm/classExtractFieldDescriptor.js", - "./helpers/classPrivateFieldDestructureSet": [ - { - "node": "./helpers/classPrivateFieldDestructureSet.js", - "import": "./helpers/esm/classPrivateFieldDestructureSet.js", - "default": "./helpers/classPrivateFieldDestructureSet.js" - }, - "./helpers/classPrivateFieldDestructureSet.js" - ], - "./helpers/esm/classPrivateFieldDestructureSet": "./helpers/esm/classPrivateFieldDestructureSet.js", - "./helpers/classPrivateFieldGet": [ - { - "node": "./helpers/classPrivateFieldGet.js", - "import": "./helpers/esm/classPrivateFieldGet.js", - "default": "./helpers/classPrivateFieldGet.js" - }, - "./helpers/classPrivateFieldGet.js" - ], - "./helpers/esm/classPrivateFieldGet": "./helpers/esm/classPrivateFieldGet.js", - "./helpers/classPrivateFieldSet": [ - { - "node": "./helpers/classPrivateFieldSet.js", - "import": "./helpers/esm/classPrivateFieldSet.js", - "default": "./helpers/classPrivateFieldSet.js" - }, - "./helpers/classPrivateFieldSet.js" - ], - "./helpers/esm/classPrivateFieldSet": "./helpers/esm/classPrivateFieldSet.js", - "./helpers/classPrivateMethodGet": [ - { - "node": "./helpers/classPrivateMethodGet.js", - "import": "./helpers/esm/classPrivateMethodGet.js", - "default": "./helpers/classPrivateMethodGet.js" - }, - "./helpers/classPrivateMethodGet.js" - ], - "./helpers/esm/classPrivateMethodGet": "./helpers/esm/classPrivateMethodGet.js", - "./helpers/classPrivateMethodSet": [ - { - "node": "./helpers/classPrivateMethodSet.js", - "import": "./helpers/esm/classPrivateMethodSet.js", - "default": "./helpers/classPrivateMethodSet.js" - }, - "./helpers/classPrivateMethodSet.js" - ], - "./helpers/esm/classPrivateMethodSet": "./helpers/esm/classPrivateMethodSet.js", - "./helpers/classStaticPrivateFieldDestructureSet": [ - { - "node": "./helpers/classStaticPrivateFieldDestructureSet.js", - "import": "./helpers/esm/classStaticPrivateFieldDestructureSet.js", - "default": "./helpers/classStaticPrivateFieldDestructureSet.js" - }, - "./helpers/classStaticPrivateFieldDestructureSet.js" - ], - "./helpers/esm/classStaticPrivateFieldDestructureSet": "./helpers/esm/classStaticPrivateFieldDestructureSet.js", - "./helpers/classStaticPrivateFieldSpecGet": [ - { - "node": "./helpers/classStaticPrivateFieldSpecGet.js", - "import": "./helpers/esm/classStaticPrivateFieldSpecGet.js", - "default": "./helpers/classStaticPrivateFieldSpecGet.js" - }, - "./helpers/classStaticPrivateFieldSpecGet.js" - ], - "./helpers/esm/classStaticPrivateFieldSpecGet": "./helpers/esm/classStaticPrivateFieldSpecGet.js", - "./helpers/classStaticPrivateFieldSpecSet": [ - { - "node": "./helpers/classStaticPrivateFieldSpecSet.js", - "import": "./helpers/esm/classStaticPrivateFieldSpecSet.js", - "default": "./helpers/classStaticPrivateFieldSpecSet.js" - }, - "./helpers/classStaticPrivateFieldSpecSet.js" - ], - "./helpers/esm/classStaticPrivateFieldSpecSet": "./helpers/esm/classStaticPrivateFieldSpecSet.js", - "./helpers/classStaticPrivateMethodSet": [ - { - "node": "./helpers/classStaticPrivateMethodSet.js", - "import": "./helpers/esm/classStaticPrivateMethodSet.js", - "default": "./helpers/classStaticPrivateMethodSet.js" - }, - "./helpers/classStaticPrivateMethodSet.js" - ], - "./helpers/esm/classStaticPrivateMethodSet": "./helpers/esm/classStaticPrivateMethodSet.js", - "./helpers/defineEnumerableProperties": [ - { - "node": "./helpers/defineEnumerableProperties.js", - "import": "./helpers/esm/defineEnumerableProperties.js", - "default": "./helpers/defineEnumerableProperties.js" - }, - "./helpers/defineEnumerableProperties.js" - ], - "./helpers/esm/defineEnumerableProperties": "./helpers/esm/defineEnumerableProperties.js", - "./helpers/dispose": [ - { - "node": "./helpers/dispose.js", - "import": "./helpers/esm/dispose.js", - "default": "./helpers/dispose.js" - }, - "./helpers/dispose.js" - ], - "./helpers/esm/dispose": "./helpers/esm/dispose.js", - "./helpers/objectSpread": [ - { - "node": "./helpers/objectSpread.js", - "import": "./helpers/esm/objectSpread.js", - "default": "./helpers/objectSpread.js" - }, - "./helpers/objectSpread.js" - ], - "./helpers/esm/objectSpread": "./helpers/esm/objectSpread.js", - "./helpers/regeneratorRuntime": [ - { - "node": "./helpers/regeneratorRuntime.js", - "import": "./helpers/esm/regeneratorRuntime.js", - "default": "./helpers/regeneratorRuntime.js" - }, - "./helpers/regeneratorRuntime.js" - ], - "./helpers/esm/regeneratorRuntime": "./helpers/esm/regeneratorRuntime.js", - "./helpers/using": [ - { - "node": "./helpers/using.js", - "import": "./helpers/esm/using.js", - "default": "./helpers/using.js" - }, - "./helpers/using.js" - ], - "./helpers/esm/using": "./helpers/esm/using.js", - "./package": "./package.json", - "./package.json": "./package.json", - "./regenerator": "./regenerator/index.js", - "./regenerator/*.js": "./regenerator/*.js", - "./regenerator/": "./regenerator/" - }, - "engines": { - "node": ">=6.9.0" - }, - "type": "commonjs" -} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@babel/runtime/regenerator/index.js b/PBandGraphScaffold/node_modules/@babel/runtime/regenerator/index.js deleted file mode 100644 index 5881357..0000000 --- a/PBandGraphScaffold/node_modules/@babel/runtime/regenerator/index.js +++ /dev/null @@ -1,15 +0,0 @@ -// TODO(Babel 8): Remove this file. - -var runtime = require("../helpers/regeneratorRuntime")(); -module.exports = runtime; - -// Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736= -try { - regeneratorRuntime = runtime; -} catch (accidentalStrictMode) { - if (typeof globalThis === "object") { - globalThis.regeneratorRuntime = runtime; - } else { - Function("r", "regeneratorRuntime = r")(runtime); - } -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/LICENSE b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/LICENSE deleted file mode 100644 index 506ab97..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2018 Microsoft Corporation - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/README.md b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/README.md deleted file mode 100644 index 187a0fe..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/README.md +++ /dev/null @@ -1,227 +0,0 @@ -# Microsoft Graph JavaScript Client Library - -[![npm version badge](https://img.shields.io/npm/v/@microsoft/microsoft-graph-client.svg?maxAge=86400)](https://www.npmjs.com/package/@microsoft/microsoft-graph-client) [![Known Vulnerabilities](https://snyk.io/test/github/microsoftgraph/msgraph-sdk-javascript/badge.svg?maxAge=86400)](https://snyk.io/test/github/microsoftgraph/msgraph-sdk-javascript) [![Licence](https://img.shields.io/github/license/microsoftgraph/msgraph-sdk-javascript.svg)](https://github.com/microsoftgraph/msgraph-sdk-javascript) [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/microsoftgraph/msgraph-sdk-javascript) [![Downloads](https://img.shields.io/npm/dm/@microsoft/microsoft-graph-client.svg?maxAge=86400)](https://www.npmjs.com/package/@microsoft/microsoft-graph-client) - -The Microsoft Graph JavaScript client library is a lightweight wrapper around the Microsoft Graph API that can be used server-side and in the browser. - -- [Microsoft Graph JavaScript Client Library](#microsoft-graph-javascript-client-library) - - [Installation](#installation) - - [Via npm](#via-npm) - - [Via Script Tag](#via-script-tag) - - [Getting started](#getting-started) - - [1. Register your application](#1-register-your-application) - - [2. Create a Client Instance](#2-create-a-client-instance) - - [3. Make requests to the graph](#3-make-requests-to-the-graph) - - Documentation - - [HTTP Actions](docs/Actions.md) - - [Chained APIs to call Microsoft Graph](docs/CallingPattern.md) - - [OData system query options - Query Parameters](docs/QueryParameters.md) - - [Batch multiple requests into single HTTP request](docs/content/Batching.md) - - [Cancel a HTTP request](docs/CancellingAHTTPRequest.md) - - [Configurations to your request](docs/OtherAPIs.md) - - [Query](docs/OtherAPIs.md#QUERY) - - [Version](docs/OtherAPIs.md#VERSION) - - [Headers](docs/OtherAPIs.md#HEADER-AND-HEADERS) - - [Options](docs/OtherAPIs.md#OPTION-AND-OPTIONS) - - [MiddlewareOptions](docs/OtherAPIs.md#MIDDLEWAREOPTIONS) - - [ResponseType](docs/OtherAPIs.md#RESPONSETYPE) - - [Upload large files to OneDrive, Outlook, Print API](docs/tasks/LargeFileUploadTask.md) - - [Page Iteration](docs/tasks/PageIterator.md) - - [Getting Raw Response](docs/GettingRawResponse.md) - - [Creating an instance of TokenCredentialAuthenticationProvider](docs/TokenCredentialAuthenticationProvider.md) - - [Samples and tutorials](#samples-and-tutorials) - - Step-by-step training exercises on creating a basic application using the Microsoft Graph JavaScript SDK: - - [Build Angular single-page apps with Microsoft Graph](https://docs.microsoft.com/graph/tutorials/angular) - - [Build Node.js Express apps with Microsoft Graph](https://docs.microsoft.com/graph/tutorials/node) - - [Build React Native apps with Microsoft Graph](https://docs.microsoft.com/graph/tutorials/react-native) - - [Build React single-page apps with Microsoft Graph](https://docs.microsoft.com/graph/tutorials/react) - - [Build JavaScript single-page apps with Microsoft Graph](https://docs.microsoft.com/graph/tutorials/javascript) - - [Explore Microsoft Graph scenarios for JavaScript development](https://docs.microsoft.com/learn/paths/m365-msgraph-scenarios/) - - Samples using `TokenCredentialAuthenticationProvider` with the `@azure/identity` library: - - [TokenCredentialAuthenticationProvider Samples](samples/) - - Samples using `LargeFileUploadTask` and `OneDriveLargeFileTask`: - - [LargeFileUploadTask Samples](samples/) - - Samples to learn more about authentication using `MSAL`libraries: - - [Azure-Sample Vanilla JS SPA using MSAL Browser and Microsoft Graph JavaScript SDK](https://github.com/Azure-Samples/ms-identity-javascript-tutorial/tree/main/2-Authorization-I/1-call-graph) - - [ Azure-Sample Angular SPA using MSAL Angular and Microsoft Graph JavaScript SDK](https://github.com/Azure-Samples/ms-identity-javascript-angular-tutorial/tree/main/2-Authorization-I/1-call-graph) - - [ Azure-Sample React SPA using MSAL React and Microsoft Graph JavaScript SDK](https://github.com/Azure-Samples/ms-identity-javascript-react-tutorial/tree/main/2-Authorization-I/1-call-graph) - - [Questions and comments](#questions-and-comments) - - [Contributing](#contributing) - - [Additional resources](#additional-resources) - - [Third Party Notices](#third-party-notices) - - [Security Reporting](#security-reporting) - - [License](#license) - - [We Value and Adhere to the Microsoft Open Source Code of Conduct](#we-value-and-adhere-to-the-microsoft-open-source-code-of-conduct) - -**Looking for IntelliSense on models (Users, Groups, etc.)? Check out the Microsoft Graph Types [v1.0](https://github.com/microsoftgraph/msgraph-typescript-typings) and [beta](https://github.com/microsoftgraph/msgraph-beta-typescript-typings)!!** - -[![TypeScript demo](https://raw.githubusercontent.com/microsoftgraph/msgraph-sdk-javascript/master/types-demo.PNG)](https://github.com/microsoftgraph/msgraph-typescript-typings) - -## Node version requirement - -Node.js 12 LTS or higher. The active Long Term Service (LTS) version of Node.js is used for on-going testing of existing and upcoming product features. - -For Node.js 18 users, it is recommended to disable the experimental `fetch` feature by supplying the `--no-experimental-fetch` command-line flag while using the Microsoft Graph JavaScript client library. - -## Installation - -### Via npm - -```cmd -npm install @microsoft/microsoft-graph-client -``` - -import `@microsoft/microsoft-graph-client` into your module. - -Also, you will need to import any fetch polyfill which suits your requirements. Following are some fetch polyfills - - -- [isomorphic-fetch](https://www.npmjs.com/package/isomorphic-fetch). -- [cross-fetch](https://www.npmjs.com/package/cross-fetch) -- [whatwg-fetch](https://www.npmjs.com/package/whatwg-fetch) - -```typescript -import "isomorphic-fetch"; // or import the fetch polyfill you installed -import { Client } from "@microsoft/microsoft-graph-client"; -``` - -### Via Script Tag - -Include [graph-js-sdk.js](https://cdn.jsdelivr.net/npm/@microsoft/microsoft-graph-client/lib/graph-js-sdk.js) in your HTML page. - -```HTML - -``` - -In case your browser doesn't have support for [Fetch](https://developer.mozilla.org/docs/Web/API/Fetch_API) [[support](https://developer.mozilla.org/docs/Web/API/Fetch_API#Browser_compatibility)] or [Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise) [[support](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#Browser_compatibility)], you need to use polyfills like [github/fetch](https://github.com/github/fetch) for fetch and [es6-promise](https://github.com/stefanpenner/es6-promise) for promise. - -```HTML - - - - - - - - -``` - -## Getting started - -### 1. Register your application - -To call Microsoft Graph, your app must acquire an access token from the Microsoft identity platform. Learn more about this - - -- [Authentication and authorization basics for Microsoft Graph](https://docs.microsoft.com/graph/auth/auth-concepts) -- [Register your app with the Microsoft identity platform](https://docs.microsoft.com/graph/auth-register-app-v2) - -### 2. Create a Client Instance - -The Microsoft Graph client is designed to make it simple to make calls to Microsoft Graph. You can use a single client instance for the lifetime of the application. - -For information on how to create a client instance, see [Creating Client Instance](./docs/CreatingClientInstance.md) - -### 3. Make requests to the graph - -Once you have authentication setup and an instance of Client, you can begin to make calls to the service. All requests should start with `client.api(path)` and end with an [action](./docs/Actions.md). - -Example of getting user details: - -```typescript -try { - let userDetails = await client.api("/me").get(); - console.log(userDetails); -} catch (error) { - throw error; -} -``` - -Example of sending an email to the recipients: - -```typescript -// Construct email object -const mail = { - subject: "Microsoft Graph JavaScript Sample", - toRecipients: [ - { - emailAddress: { - address: "example@example.com", - }, - }, - ], - body: { - content: "

MicrosoftGraph JavaScript Sample

Check out https://github.com/microsoftgraph/msgraph-sdk-javascript", - contentType: "html", - }, -}; -try { - let response = await client.api("/me/sendMail").post({ message: mail }); - console.log(response); -} catch (error) { - throw error; -} -``` - -For more information, refer: [Calling Pattern](docs/CallingPattern.md), [Actions](docs/Actions.md), [Query Params](docs/QueryParameters.md), [API Methods](docs/OtherAPIs.md) and [more](docs/). - -## Samples and tutorials - -Step-by-step training exercises that guide you through creating a basic application that accesses data via the Microsoft Graph: - -- [Build Angular single-page apps with Microsoft Graph](https://docs.microsoft.com/graph/tutorials/angular) -- [Build Node.js Express apps with Microsoft Graph](https://docs.microsoft.com/graph/tutorials/node) -- [Build React Native apps with Microsoft Graph](https://docs.microsoft.com/graph/tutorials/react-native) -- [Build React single-page apps with Microsoft Graph](https://docs.microsoft.com/graph/tutorials/react) -- [Build JavaScript single-page apps with Microsoft Graph](https://docs.microsoft.com/graph/tutorials/javascript) -- [Explore Microsoft Graph scenarios for JavaScript development](https://docs.microsoft.com/learn/paths/m365-msgraph-scenarios/) - -The Microsoft Graph JavaScript SDK provides a `TokenCredentialAuthenticationProvider` to authenticate using the `@azure/identity` auth library. Learn more: - -- [Documentation for creating an instance of TokenCredentialAuthenticationProvider](docs/TokenCredentialAuthenticationProvider.md) -- [TokenCredentialAuthenticationProvider Samples](samples/) - -The Microsoft Graph JavaScript SDK provides a `LargeFileUploadTask` to upload large files to OneDrive, Outlook and Print API: - -- [LargeFileUploadTask documentation](docs/tasks/LargeFileUploadTask.md) -- [Samples using `LargeFileUploadTask` and `OneDriveLargeFileTask`](samples/) The following `MSAL` samples provide information on authentication using `MSAL` libraries and how to use the Microsoft Graph JavaScript SDK client with MSAL as a custom authentication provider to query the Graph API: - -- [Azure-Sample Vanilla JS SPA using MSAL Browser and Microsoft Graph JavaScript SDK](https://github.com/Azure-Samples/ms-identity-javascript-tutorial/tree/main/2-Authorization-I/1-call-graph) -- [Azure-Sample Angular SPA using MSAL Angular and Microsoft Graph JavaScript SDK](https://github.com/Azure-Samples/ms-identity-javascript-angular-tutorial/tree/main/2-Authorization-I/1-call-graph) -- [Azure-Sample React SPA using MSAL React and Microsoft Graph JavaScript SDK](https://github.com/Azure-Samples/ms-identity-javascript-react-tutorial/tree/main/2-Authorization-I/1-call-graph) - -## Questions and comments - -We'd love to get your feedback about the Microsoft Graph JavaScript client library. You can send your questions and suggestions to us in the [Issues](https://github.com/microsoftgraph/msgraph-sdk-javascript/issues) section of this repository. - -## Contributing - -Please see the [contributing guidelines](CONTRIBUTING.md). - -## Additional resources - -- [Microsoft Graph website](https://graph.microsoft.io) -- The Microsoft Graph TypeScript definitions enable editors to provide intellisense on Microsoft Graph objects including users, messages, and groups. - - [@microsoft/microsoft-graph-types](https://www.npmjs.com/package/@microsoft/microsoft-graph-types) or [@types/microsoft-graph](https://www.npmjs.com/package/@types/microsoft-graph) - - [@microsoft/microsoft-graph-types-beta](https://www.npmjs.com/package/@microsoft/microsoft-graph-types-beta) -- [Microsoft Graph Toolkit: UI Components and Authentication Providers for Microsoft Graph](https://docs.microsoft.com/graph/toolkit/overview) -- [Office Dev Center](http://dev.office.com/) - -## Tips and Tricks - -- [Microsoft Graph SDK `n.call is not a function` by Lee Ford](https://www.lee-ford.co.uk/posts/graph-sdk-is-not-a-function/) -- [Example of using the Graph JS library with ESM and `importmaps` ](https://github.com/waldekmastykarz/js-graph-101/blob/main/index_esm.html) - -## Third Party Notices - -See [Third Party Notices](./THIRD%20PARTY%20NOTICES) for information on the packages that are included in the [package.json](./package.json) - -## Security Reporting - -If you find a security issue with our libraries or services please report it to [secure@microsoft.com](mailto:secure@microsoft.com) with as much detail as possible. Your submission may be eligible for a bounty through the [Microsoft Bounty](http://aka.ms/bugbounty) program. Please do not post security issues to GitHub Issues or any other public site. We will contact you shortly upon receiving the information. We encourage you to get notifications of when security incidents occur by visiting [this page](https://technet.microsoft.com/security/dd252948) and subscribing to Security Advisory Alerts. - -## License - -Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT License (the "[License](./LICENSE)"); - -## We Value and Adhere to the Microsoft Open Source Code of Conduct - -This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/authProviderOptions/ReadMe.md b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/authProviderOptions/ReadMe.md deleted file mode 100644 index b42e8c7..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/authProviderOptions/ReadMe.md +++ /dev/null @@ -1,5 +0,0 @@ -The authProviderOptions/ folders contains barrels for exporting Authentication Provider options such as MSAL and Azure Identity Token Credentials. - -[tsconfig-sub-cjs.json](../tsconfig-sub-es.json) and [tsconfig-sub-cjs.json](../tsconfig-sub-es.json) contains the config for transpiling the files to authProviders/ output folder. - -This approach is used because of the limitations of creating a submodule structure - References - https://github.com/microsoft/TypeScript/issues/8305 https://github.com/microsoft/TypeScript/issues/33079 diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/authProviderOptions/authCodeMsalBrowser/index.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/authProviderOptions/authCodeMsalBrowser/index.ts deleted file mode 100644 index a38e757..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/authProviderOptions/authCodeMsalBrowser/index.ts +++ /dev/null @@ -1,8 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -export * from "../../lib/src/authentication/msal-browser/AuthCodeMSALBrowserAuthenticationProvider"; -export * from "../../lib/src/authentication/msalOptions/MSALAuthenticationProviderOptions"; diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/authProviderOptions/azureTokenCredentials/index.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/authProviderOptions/azureTokenCredentials/index.ts deleted file mode 100644 index 6b417ef..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/authProviderOptions/azureTokenCredentials/index.ts +++ /dev/null @@ -1,8 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -export * from "../../lib/src/authentication/azureTokenCredentials/TokenCredentialAuthenticationProvider"; -export * from "../../lib/src/authentication/azureTokenCredentials/ITokenCredentialAuthenticationProviderOptions"; diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/authProviderOptions/es/authCodeMsalBrowser/index.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/authProviderOptions/es/authCodeMsalBrowser/index.ts deleted file mode 100644 index a9ad2f6..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/authProviderOptions/es/authCodeMsalBrowser/index.ts +++ /dev/null @@ -1,8 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -export * from "../../../lib/es/src/authentication/msal-browser/AuthCodeMSALBrowserAuthenticationProvider"; -export * from "../../../lib/es/src/authentication/msalOptions/MSALAuthenticationProviderOptions"; diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/authProviderOptions/es/azureTokenCredentials/index.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/authProviderOptions/es/azureTokenCredentials/index.ts deleted file mode 100644 index a0b6cfc..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/authProviderOptions/es/azureTokenCredentials/index.ts +++ /dev/null @@ -1,8 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -export * from "../../../lib/es/src/authentication/azureTokenCredentials/TokenCredentialAuthenticationProvider"; -export * from "../../../lib/es/src/authentication/azureTokenCredentials/ITokenCredentialAuthenticationProviderOptions"; diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/authProviders/authCodeMsalBrowser/index.d.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/authProviders/authCodeMsalBrowser/index.d.ts deleted file mode 100644 index a38e757..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/authProviders/authCodeMsalBrowser/index.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -export * from "../../lib/src/authentication/msal-browser/AuthCodeMSALBrowserAuthenticationProvider"; -export * from "../../lib/src/authentication/msalOptions/MSALAuthenticationProviderOptions"; diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/authProviders/authCodeMsalBrowser/index.js b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/authProviders/authCodeMsalBrowser/index.js deleted file mode 100644 index 1f44c02..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/authProviders/authCodeMsalBrowser/index.js +++ /dev/null @@ -1,12 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -var tslib_1 = require("tslib"); -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -tslib_1.__exportStar(require("../../lib/src/authentication/msal-browser/AuthCodeMSALBrowserAuthenticationProvider"), exports); -tslib_1.__exportStar(require("../../lib/src/authentication/msalOptions/MSALAuthenticationProviderOptions"), exports); -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/authProviders/authCodeMsalBrowser/index.js.map b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/authProviders/authCodeMsalBrowser/index.js.map deleted file mode 100644 index fefa10b..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/authProviders/authCodeMsalBrowser/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../authProviderOptions/authCodeMsalBrowser/index.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,8HAAoG;AACpG,qHAA2F"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/authProviders/azureTokenCredentials/index.d.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/authProviders/azureTokenCredentials/index.d.ts deleted file mode 100644 index 6b417ef..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/authProviders/azureTokenCredentials/index.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -export * from "../../lib/src/authentication/azureTokenCredentials/TokenCredentialAuthenticationProvider"; -export * from "../../lib/src/authentication/azureTokenCredentials/ITokenCredentialAuthenticationProviderOptions"; diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/authProviders/azureTokenCredentials/index.js b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/authProviders/azureTokenCredentials/index.js deleted file mode 100644 index 8af7b08..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/authProviders/azureTokenCredentials/index.js +++ /dev/null @@ -1,12 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -var tslib_1 = require("tslib"); -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -tslib_1.__exportStar(require("../../lib/src/authentication/azureTokenCredentials/TokenCredentialAuthenticationProvider"), exports); -tslib_1.__exportStar(require("../../lib/src/authentication/azureTokenCredentials/ITokenCredentialAuthenticationProviderOptions"), exports); -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/authProviders/azureTokenCredentials/index.js.map b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/authProviders/azureTokenCredentials/index.js.map deleted file mode 100644 index 63faeab..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/authProviders/azureTokenCredentials/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../authProviderOptions/azureTokenCredentials/index.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,mIAAyG;AACzG,2IAAiH"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/authProviders/es/authCodeMsalBrowser/index.d.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/authProviders/es/authCodeMsalBrowser/index.d.ts deleted file mode 100644 index a9ad2f6..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/authProviders/es/authCodeMsalBrowser/index.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -export * from "../../../lib/es/src/authentication/msal-browser/AuthCodeMSALBrowserAuthenticationProvider"; -export * from "../../../lib/es/src/authentication/msalOptions/MSALAuthenticationProviderOptions"; diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/authProviders/es/authCodeMsalBrowser/index.js b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/authProviders/es/authCodeMsalBrowser/index.js deleted file mode 100644 index 684eead..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/authProviders/es/authCodeMsalBrowser/index.js +++ /dev/null @@ -1,9 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -export * from "../../../lib/es/src/authentication/msal-browser/AuthCodeMSALBrowserAuthenticationProvider"; -export * from "../../../lib/es/src/authentication/msalOptions/MSALAuthenticationProviderOptions"; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/authProviders/es/authCodeMsalBrowser/index.js.map b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/authProviders/es/authCodeMsalBrowser/index.js.map deleted file mode 100644 index 2e6089d..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/authProviders/es/authCodeMsalBrowser/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../authProviderOptions/es/authCodeMsalBrowser/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,cAAc,2FAA2F,CAAC;AAC1G,cAAc,kFAAkF,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/authProviders/es/azureTokenCredentials/index.d.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/authProviders/es/azureTokenCredentials/index.d.ts deleted file mode 100644 index a0b6cfc..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/authProviders/es/azureTokenCredentials/index.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -export * from "../../../lib/es/src/authentication/azureTokenCredentials/TokenCredentialAuthenticationProvider"; -export * from "../../../lib/es/src/authentication/azureTokenCredentials/ITokenCredentialAuthenticationProviderOptions"; diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/authProviders/es/azureTokenCredentials/index.js b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/authProviders/es/azureTokenCredentials/index.js deleted file mode 100644 index d3a10ab..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/authProviders/es/azureTokenCredentials/index.js +++ /dev/null @@ -1,9 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -export * from "../../../lib/es/src/authentication/azureTokenCredentials/TokenCredentialAuthenticationProvider"; -export * from "../../../lib/es/src/authentication/azureTokenCredentials/ITokenCredentialAuthenticationProviderOptions"; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/authProviders/es/azureTokenCredentials/index.js.map b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/authProviders/es/azureTokenCredentials/index.js.map deleted file mode 100644 index ed5c519..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/authProviders/es/azureTokenCredentials/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../authProviderOptions/es/azureTokenCredentials/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,cAAc,gGAAgG,CAAC;AAC/G,cAAc,wGAAwG,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/Client.d.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/Client.d.ts deleted file mode 100644 index 44d744b..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/Client.d.ts +++ /dev/null @@ -1,51 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -import { GraphRequest } from "./GraphRequest"; -import { ClientOptions } from "./IClientOptions"; -import { Options } from "./IOptions"; -export declare class Client { - /** - * @private - * A member which stores the Client instance options - */ - private config; - /** - * @private - * A member which holds the HTTPClient instance - */ - private httpClient; - /** - * @public - * @static - * To create a client instance with options and initializes the default middleware chain - * @param {Options} options - The options for client instance - * @returns The Client instance - */ - static init(options: Options): Client; - /** - * @public - * @static - * To create a client instance with the Client Options - * @param {ClientOptions} clientOptions - The options object for initializing the client - * @returns The Client instance - */ - static initWithMiddleware(clientOptions: ClientOptions): Client; - /** - * @private - * @constructor - * Creates an instance of Client - * @param {ClientOptions} clientOptions - The options to instantiate the client object - */ - private constructor(); - /** - * @public - * Entry point to make requests - * @param {string} path - The path string value - * @returns The graph request instance - */ - api(path: string): GraphRequest; -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/Client.js b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/Client.js deleted file mode 100644 index 65e5af1..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/Client.js +++ /dev/null @@ -1,96 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -/** - * @module Client - */ -import { GRAPH_API_VERSION, GRAPH_BASE_URL } from "./Constants"; -import { CustomAuthenticationProvider } from "./CustomAuthenticationProvider"; -import { GraphRequest } from "./GraphRequest"; -import { HTTPClient } from "./HTTPClient"; -import { HTTPClientFactory } from "./HTTPClientFactory"; -import { validatePolyFilling } from "./ValidatePolyFilling"; -export class Client { - /** - * @public - * @static - * To create a client instance with options and initializes the default middleware chain - * @param {Options} options - The options for client instance - * @returns The Client instance - */ - static init(options) { - const clientOptions = {}; - for (const i in options) { - if (Object.prototype.hasOwnProperty.call(options, i)) { - clientOptions[i] = i === "authProvider" ? new CustomAuthenticationProvider(options[i]) : options[i]; - } - } - return Client.initWithMiddleware(clientOptions); - } - /** - * @public - * @static - * To create a client instance with the Client Options - * @param {ClientOptions} clientOptions - The options object for initializing the client - * @returns The Client instance - */ - static initWithMiddleware(clientOptions) { - return new Client(clientOptions); - } - /** - * @private - * @constructor - * Creates an instance of Client - * @param {ClientOptions} clientOptions - The options to instantiate the client object - */ - constructor(clientOptions) { - /** - * @private - * A member which stores the Client instance options - */ - this.config = { - baseUrl: GRAPH_BASE_URL, - debugLogging: false, - defaultVersion: GRAPH_API_VERSION, - }; - validatePolyFilling(); - for (const key in clientOptions) { - if (Object.prototype.hasOwnProperty.call(clientOptions, key)) { - this.config[key] = clientOptions[key]; - } - } - let httpClient; - if (clientOptions.authProvider !== undefined && clientOptions.middleware !== undefined) { - const error = new Error(); - error.name = "AmbiguityInInitialization"; - error.message = "Unable to Create Client, Please provide either authentication provider for default middleware chain or custom middleware chain not both"; - throw error; - } - else if (clientOptions.authProvider !== undefined) { - httpClient = HTTPClientFactory.createWithAuthenticationProvider(clientOptions.authProvider); - } - else if (clientOptions.middleware !== undefined) { - httpClient = new HTTPClient(...[].concat(clientOptions.middleware)); - } - else { - const error = new Error(); - error.name = "InvalidMiddlewareChain"; - error.message = "Unable to Create Client, Please provide either authentication provider for default middleware chain or custom middleware chain"; - throw error; - } - this.httpClient = httpClient; - } - /** - * @public - * Entry point to make requests - * @param {string} path - The path string value - * @returns The graph request instance - */ - api(path) { - return new GraphRequest(this.httpClient, this.config, path); - } -} -//# sourceMappingURL=Client.js.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/Client.js.map b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/Client.js.map deleted file mode 100644 index b6b41fe..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/Client.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Client.js","sourceRoot":"","sources":["../../../src/Client.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;GAEG;AAEH,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAChE,OAAO,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AAC9E,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAA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Aa,CAAC,UAAU,KAAK,SAAS,EAAE;YACvF,MAAM,KAAK,GAAG,IAAI,KAAK,EAAE,CAAC;YAC1B,KAAK,CAAC,IAAI,GAAG,2BAA2B,CAAC;YACzC,KAAK,CAAC,OAAO,GAAG,yIAAyI,CAAC;YAC1J,MAAM,KAAK,CAAC;SACZ;aAAM,IAAI,aAAa,CAAC,YAAY,KAAK,SAAS,EAAE;YACpD,UAAU,GAAG,iBAAiB,CAAC,gCAAgC,CAAC,aAAa,CAAC,YAAY,CAAC,CAAC;SAC5F;aAAM,IAAI,aAAa,CAAC,UAAU,KAAK,SAAS,EAAE;YAClD,UAAU,GAAG,IAAI,UAAU,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC,CAAC;SACpE;aAAM;YACN,MAAM,KAAK,GAAG,IAAI,KAAK,EAAE,CAAC;YAC1B,KAAK,CAAC,IAAI,GAAG,wBAAwB,CAAC;YACtC,KAAK,CAAC,OAAO,GAAG,gIAAgI,CAAC;YACjJ,MAAM,KAAK,CAAC;SACZ;QACD,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;IAC9B,CAAC;IAED;;;;;OAKG;IACI,GAAG,CAAC,IAAY;QACtB,OAAO,IAAI,YAAY,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;IAC7D,CAAC;CACD"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/Constants.d.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/Constants.d.ts deleted file mode 100644 index 9d035f4..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/Constants.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -/** - * @module Constants - */ -/** - * @constant - * A Default API endpoint version for a request - */ -export declare const GRAPH_API_VERSION = "v1.0"; -/** - * @constant - * A Default base url for a request - */ -export declare const GRAPH_BASE_URL = "https://graph.microsoft.com/"; -/** - * To hold list of the service root endpoints for Microsoft Graph and Graph Explorer for each national cloud. - * Set(iterable:Object) is not supported in Internet Explorer. The consumer is recommended to use a suitable polyfill. - */ -export declare const GRAPH_URLS: Set; diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/Constants.js b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/Constants.js deleted file mode 100644 index f7b6bc8..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/Constants.js +++ /dev/null @@ -1,25 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -/** - * @module Constants - */ -/** - * @constant - * A Default API endpoint version for a request - */ -export const GRAPH_API_VERSION = "v1.0"; -/** - * @constant - * A Default base url for a request - */ -export const GRAPH_BASE_URL = "https://graph.microsoft.com/"; -/** - * To hold list of the service root endpoints for Microsoft Graph and Graph Explorer for each national cloud. - * Set(iterable:Object) is not supported in Internet Explorer. The consumer is recommended to use a suitable polyfill. - */ -export const GRAPH_URLS = new Set(["graph.microsoft.com", "graph.microsoft.us", "dod-graph.microsoft.us", "graph.microsoft.de", "microsoftgraph.chinacloudapi.cn", "canary.graph.microsoft.com"]); -//# sourceMappingURL=Constants.js.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/Constants.js.map b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/Constants.js.map deleted file mode 100644 index 421c831..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/Constants.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Constants.js","sourceRoot":"","sources":["../../../src/Constants.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;GAEG;AAEH;;;GAGG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,MAAM,CAAC;AAExC;;;GAGG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,8BAA8B,CAAC;AAE7D;;;GAGG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,IAAI,GAAG,CAAS,CAAC,qBAAqB,EAAE,oBAAoB,EAAE,wBAAwB,EAAE,oBAAoB,EAAE,iCAAiC,EAAE,4BAA4B,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/CustomAuthenticationProvider.d.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/CustomAuthenticationProvider.d.ts deleted file mode 100644 index d41571e..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/CustomAuthenticationProvider.d.ts +++ /dev/null @@ -1,35 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -import { AuthenticationProvider } from "./IAuthenticationProvider"; -import { AuthProvider } from "./IAuthProvider"; -/** - * @class - * Class representing CustomAuthenticationProvider - * @extends AuthenticationProvider - */ -export declare class CustomAuthenticationProvider implements AuthenticationProvider { - /** - * @private - * A member to hold authProvider callback - */ - private provider; - /** - * @public - * @constructor - * Creates an instance of CustomAuthenticationProvider - * @param {AuthProviderCallback} provider - An authProvider function - * @returns An instance of CustomAuthenticationProvider - */ - constructor(provider: AuthProvider); - /** - * @public - * @async - * To get the access token - * @returns The promise that resolves to an access token - */ - getAccessToken(): Promise; -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/CustomAuthenticationProvider.js b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/CustomAuthenticationProvider.js deleted file mode 100644 index 922d285..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/CustomAuthenticationProvider.js +++ /dev/null @@ -1,56 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -import { __awaiter } from "tslib"; -/** - * @module CustomAuthenticationProvider - */ -import { GraphClientError } from "./GraphClientError"; -/** - * @class - * Class representing CustomAuthenticationProvider - * @extends AuthenticationProvider - */ -export class CustomAuthenticationProvider { - /** - * @public - * @constructor - * Creates an instance of CustomAuthenticationProvider - * @param {AuthProviderCallback} provider - An authProvider function - * @returns An instance of CustomAuthenticationProvider - */ - constructor(provider) { - this.provider = provider; - } - /** - * @public - * @async - * To get the access token - * @returns The promise that resolves to an access token - */ - getAccessToken() { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => { - this.provider((error, accessToken) => __awaiter(this, void 0, void 0, function* () { - if (accessToken) { - resolve(accessToken); - } - else { - if (!error) { - const invalidTokenMessage = "Access token is undefined or empty.\ - Please provide a valid token.\ - For more help - https://github.com/microsoftgraph/msgraph-sdk-javascript/blob/dev/docs/CustomAuthenticationProvider.md"; - error = new GraphClientError(invalidTokenMessage); - } - const err = yield GraphClientError.setGraphClientError(error); - reject(err); - } - })); - }); - }); - } -} -//# sourceMappingURL=CustomAuthenticationProvider.js.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/CustomAuthenticationProvider.js.map b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/CustomAuthenticationProvider.js.map deleted file mode 100644 index 75c796d..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/CustomAuthenticationProvider.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"CustomAuthenticationProvider.js","sourceRoot":"","sources":["../../../src/CustomAuthenticationProvider.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH;;GAEG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAItD;;;;GAIG;AACH,MAAM,OAAO,4BAA4B;IAOxC;;;;;;OAMG;IACH,YAAmB,QAAsB;QACxC,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC1B,CAAC;IAED;;;;;OAKG;IACU,cAAc;;YAC1B,OAAO,IAAI,OAAO,CAAC,CAAC,OAAsC,EAAE,MAA4B,EAAE,EAAE;gBAC3F,IAAI,CAAC,QAAQ,CAAC,CAAO,KAAU,EAAE,WAA0B,EAAE,EAAE;oBAC9D,IAAI,WAAW,EAAE;wBAChB,OAAO,CAAC,WAAW,CAAC,CAAC;qBACrB;yBAAM;wBACN,IAAI,CAAC,KAAK,EAAE;4BACX,MAAM,mBAAmB,GAAG;;6HAE2F,CAAC;4BACxH,KAAK,GAAG,IAAI,gBAAgB,CAAC,mBAAmB,CAAC,CAAC;yBAClD;wBACD,MAAM,GAAG,GAAG,MAAM,gBAAgB,CAAC,mBAAmB,CAAC,KAAK,CAAC,CAAC;wBAC9D,MAAM,CAAC,GAAG,CAAC,CAAC;qBACZ;gBACF,CAAC,CAAA,CAAC,CAAC;YACJ,CAAC,CAAC,CAAC;QACJ,CAAC;KAAA;CACD"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/GraphClientError.d.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/GraphClientError.d.ts deleted file mode 100644 index 363ce16..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/GraphClientError.d.ts +++ /dev/null @@ -1,44 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -/** - * @module GraphClientError - */ -/** - * @class - * Create GraphClientError object to handle client-side errors - * encountered within the JavaScript Client SDK. - * Whereas GraphError Class should be used to handle errors in the response from the Graph API. - */ -export declare class GraphClientError extends Error { - /** - * @public - * A custom error. This property should set be when the error is not of instanceOf Error/GraphClientError. - * Example = - * const client = MicrosoftGraph.Client.init({ - * defaultVersion: "v1.0", - * authProvider: (done) => { done({TokenError:"AccessToken cannot be null"}, ""); - * }); - */ - customError?: any; - /** - * @public - * @static - * @async - * To set the GraphClientError object - * @param {any} error - The error returned encountered by the Graph JavaScript Client SDK while processing request - * @returns GraphClientError object set to the error passed - */ - static setGraphClientError(error: any): GraphClientError; - /** - * @public - * @constructor - * Creates an instance of GraphClientError - * @param {string} message? - Error message - * @returns An instance of GraphClientError - */ - constructor(message?: string); -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/GraphClientError.js b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/GraphClientError.js deleted file mode 100644 index 36c2cb4..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/GraphClientError.js +++ /dev/null @@ -1,48 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -/** - * @module GraphClientError - */ -/** - * @class - * Create GraphClientError object to handle client-side errors - * encountered within the JavaScript Client SDK. - * Whereas GraphError Class should be used to handle errors in the response from the Graph API. - */ -export class GraphClientError extends Error { - /** - * @public - * @static - * @async - * To set the GraphClientError object - * @param {any} error - The error returned encountered by the Graph JavaScript Client SDK while processing request - * @returns GraphClientError object set to the error passed - */ - static setGraphClientError(error) { - let graphClientError; - if (error instanceof Error) { - graphClientError = error; - } - else { - graphClientError = new GraphClientError(); - graphClientError.customError = error; - } - return graphClientError; - } - /** - * @public - * @constructor - * Creates an instance of GraphClientError - * @param {string} message? - Error message - * @returns An instance of GraphClientError - */ - constructor(message) { - super(message); - Object.setPrototypeOf(this, GraphClientError.prototype); - } -} -//# sourceMappingURL=GraphClientError.js.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/GraphClientError.js.map b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/GraphClientError.js.map deleted file mode 100644 index a3da2e5..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/GraphClientError.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"GraphClientError.js","sourceRoot":"","sources":["../../../src/GraphClientError.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;GAEG;AAEH;;;;;GAKG;AAEH,MAAM,OAAO,gBAAiB,SAAQ,KAAK;IAY1C;;;;;;;OAOG;IACI,MAAM,CAAC,mBAAmB,CAAC,KAAU;QAC3C,IAAI,gBAAkC,CAAC;QACvC,IAAI,KAAK,YAAY,KAAK,EAAE;YAC3B,gBAAgB,GAAG,KAAK,CAAC;SACzB;aAAM;YACN,gBAAgB,GAAG,IAAI,gBAAgB,EAAE,CAAC;YAC1C,gBAAgB,CAAC,WAAW,GAAG,KAAK,CAAC;SACrC;QACD,OAAO,gBAAgB,CAAC;IACzB,CAAC;IAED;;;;;;OAMG;IACH,YAAmB,OAAgB;QAClC,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,gBAAgB,CAAC,SAAS,CAAC,CAAC;IACzD,CAAC;CACD"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/GraphError.d.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/GraphError.d.ts deleted file mode 100644 index 84bf9a0..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/GraphError.d.ts +++ /dev/null @@ -1,54 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -/** - * @module GraphError - */ -/** - * @class - * Class for GraphError - * @NOTE: This is NOT what is returned from the Graph - * GraphError is created from parsing JSON errors returned from the graph - * Some fields are renamed ie, "request-id" => requestId so you can use dot notation - */ -export declare class GraphError extends Error { - /** - * @public - * A member holding status code of the error - */ - statusCode: number; - /** - * @public - * A member holding code i.e name of the error - */ - code: string | null; - /** - * @public - * A member holding request-id i.e identifier of the request - */ - requestId: string | null; - /** - * @public - * A member holding processed date and time of the request - */ - date: Date; - headers?: Headers; - /** - * @public - * A member holding original error response by the graph service - */ - body: any; - /** - * @public - * @constructor - * Creates an instance of GraphError - * @param {number} [statusCode = -1] - The status code of the error - * @param {string} [message] - The message of the error - * @param {Error} [baseError] - The base error - * @returns An instance of GraphError - */ - constructor(statusCode?: number, message?: string, baseError?: Error); -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/GraphError.js b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/GraphError.js deleted file mode 100644 index 9635f14..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/GraphError.js +++ /dev/null @@ -1,39 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -/** - * @module GraphError - */ -/** - * @class - * Class for GraphError - * @NOTE: This is NOT what is returned from the Graph - * GraphError is created from parsing JSON errors returned from the graph - * Some fields are renamed ie, "request-id" => requestId so you can use dot notation - */ -export class GraphError extends Error { - /** - * @public - * @constructor - * Creates an instance of GraphError - * @param {number} [statusCode = -1] - The status code of the error - * @param {string} [message] - The message of the error - * @param {Error} [baseError] - The base error - * @returns An instance of GraphError - */ - constructor(statusCode = -1, message, baseError) { - super(message || (baseError && baseError.message)); - // https://github.com/Microsoft/TypeScript/wiki/Breaking-Changes#extending-built-ins-like-error-array-and-map-may-no-longer-work - Object.setPrototypeOf(this, GraphError.prototype); - this.statusCode = statusCode; - this.code = null; - this.requestId = null; - this.date = new Date(); - this.body = null; - this.stack = baseError ? baseError.stack : this.stack; - } -} -//# sourceMappingURL=GraphError.js.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/GraphError.js.map b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/GraphError.js.map deleted file mode 100644 index f63ad5f..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/GraphError.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"GraphError.js","sourceRoot":"","sources":["../../../src/GraphError.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;GAEG;AAEH;;;;;;GAMG;AAEH,MAAM,OAAO,UAAW,SAAQ,KAAK;IAiCpC;;;;;;;;OAQG;IACH,YAAmB,UAAU,GAAG,CAAC,CAAC,EAAE,OAAgB,EAAE,SAAiB;QACtE,KAAK,CAAC,OAAO,IAAI,CAAC,SAAS,IAAI,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC;QACnD,gIAAgI;QAChI,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC;QAClD,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;QACtB,IAAI,CAAC,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;QACvB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,KAAK,GAAG,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC;IACvD,CAAC;CACD"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/GraphErrorHandler.d.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/GraphErrorHandler.d.ts deleted file mode 100644 index 95489bf..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/GraphErrorHandler.d.ts +++ /dev/null @@ -1,60 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -/** - * @module GraphErrorHandler - */ -import { GraphError } from "./GraphError"; -import { GraphRequestCallback } from "./IGraphRequestCallback"; -/** - * @class - * Class for GraphErrorHandler - */ -export declare class GraphErrorHandler { - /** - * @private - * @static - * Populates the GraphError instance with Error instance values - * @param {Error} error - The error returned by graph service or some native error - * @param {number} [statusCode] - The status code of the response - * @returns The GraphError instance - */ - private static constructError; - /** - * @private - * @static - * @async - * Populates the GraphError instance from the Error returned by graph service - * @param {GraphAPIErrorResponse} graphError - The error possibly returned by graph service or some native error - * @param {number} statusCode - The status code of the response - * @returns A promise that resolves to GraphError instance - * - * Example error for https://graph.microsoft.com/v1.0/me/events?$top=3&$search=foo - * { - * "error": { - * "code": "SearchEvents", - * "message": "The parameter $search is not currently supported on the Events resource.", - * "innerError": { - * "request-id": "b31c83fd-944c-4663-aa50-5d9ceb367e19", - * "date": "2016-11-17T18:37:45" - * } - * } - * } - */ - private static constructErrorFromResponse; - /** - * @public - * @static - * @async - * To get the GraphError object - * Reference - https://docs.microsoft.com/en-us/graph/errors - * @param {any} [error = null] - The error returned by graph service or some native error - * @param {number} [statusCode = -1] - The status code of the response - * @param {GraphRequestCallback} [callback] - The graph request callback function - * @returns A promise that resolves to GraphError instance - */ - static getError(error?: any, statusCode?: number, callback?: GraphRequestCallback, rawResponse?: Response): Promise; -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/GraphErrorHandler.js b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/GraphErrorHandler.js deleted file mode 100644 index 3280b2e..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/GraphErrorHandler.js +++ /dev/null @@ -1,101 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -import { __awaiter } from "tslib"; -/** - * @module GraphErrorHandler - */ -import { GraphError } from "./GraphError"; -/** - * @class - * Class for GraphErrorHandler - */ -export class GraphErrorHandler { - /** - * @private - * @static - * Populates the GraphError instance with Error instance values - * @param {Error} error - The error returned by graph service or some native error - * @param {number} [statusCode] - The status code of the response - * @returns The GraphError instance - */ - static constructError(error, statusCode, rawResponse) { - const gError = new GraphError(statusCode, "", error); - if (error.name !== undefined) { - gError.code = error.name; - } - gError.body = error.toString(); - gError.date = new Date(); - gError.headers = rawResponse === null || rawResponse === void 0 ? void 0 : rawResponse.headers; - return gError; - } - /** - * @private - * @static - * @async - * Populates the GraphError instance from the Error returned by graph service - * @param {GraphAPIErrorResponse} graphError - The error possibly returned by graph service or some native error - * @param {number} statusCode - The status code of the response - * @returns A promise that resolves to GraphError instance - * - * Example error for https://graph.microsoft.com/v1.0/me/events?$top=3&$search=foo - * { - * "error": { - * "code": "SearchEvents", - * "message": "The parameter $search is not currently supported on the Events resource.", - * "innerError": { - * "request-id": "b31c83fd-944c-4663-aa50-5d9ceb367e19", - * "date": "2016-11-17T18:37:45" - * } - * } - * } - */ - static constructErrorFromResponse(graphError, statusCode, rawResponse) { - const error = graphError.error; - const gError = new GraphError(statusCode, error.message); - gError.code = error.code; - if (error.innerError !== undefined) { - gError.requestId = error.innerError["request-id"]; - gError.date = new Date(error.innerError.date); - } - gError.body = JSON.stringify(error); - gError.headers = rawResponse === null || rawResponse === void 0 ? void 0 : rawResponse.headers; - return gError; - } - /** - * @public - * @static - * @async - * To get the GraphError object - * Reference - https://docs.microsoft.com/en-us/graph/errors - * @param {any} [error = null] - The error returned by graph service or some native error - * @param {number} [statusCode = -1] - The status code of the response - * @param {GraphRequestCallback} [callback] - The graph request callback function - * @returns A promise that resolves to GraphError instance - */ - static getError(error = null, statusCode = -1, callback, rawResponse) { - return __awaiter(this, void 0, void 0, function* () { - let gError; - if (error && error.error) { - gError = GraphErrorHandler.constructErrorFromResponse(error, statusCode, rawResponse); - } - else if (error instanceof Error) { - gError = GraphErrorHandler.constructError(error, statusCode, rawResponse); - } - else { - gError = new GraphError(statusCode); - gError.body = error; // if a custom error is passed which is not instance of Error object or a graph API response - } - if (typeof callback === "function") { - callback(gError, null); - } - else { - return gError; - } - }); - } -} -//# sourceMappingURL=GraphErrorHandler.js.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/GraphErrorHandler.js.map b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/GraphErrorHandler.js.map deleted file mode 100644 index 0d1b8d0..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/GraphErrorHandler.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"GraphErrorHandler.js","sourceRoot":"","sources":["../../../src/GraphErrorHandler.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAiB1C;;;GAGG;AAEH,MAAM,OAAO,iBAAiB;IAC7B;;;;;;;OAOG;IACK,MAAM,CAAC,cAAc,CAAC,KAAY,EAAE,UAAmB,EAAE,WAAsB;QACtF,MAAM,MAAM,GAAG,IAAI,UAAU,CAAC,UAAU,EAAE,EAAE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,CAAC,KAAK,EAAE;gBACzB,MAAM,GAAG,iBAAiB,CAAC,0BAA0B,CAAC,KAAK,EAAE,UAAU,EAAE,WAAW,CAAC,CAAC;aACtF;iBAAM,IAAI,KAAK,YAAY,KAAK,EAAE;gBAClC,MAAM,GAAG,iBAAiB,CAAC,cAAc,CAAC,KAAK,EAAE,UAAU,EAAE,WAAW,CAAC,CAAC;aAC1E;iBAAM;gBACN,MAAM,GAAG,IAAI,UAAU,CAAC,UAAU,CAAC,CAAC;gBACpC,MAAM,CAAC,IAAI,GAAG,KAAK,CAAC,CAAC,4FAA4F;aACjH;YACD,IAAI,OAAO,QAAQ,KAAK,UAAU,EAAE;gBACnC,QAAQ,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;aACvB;iBAAM;gBACN,OAAO,MAAM,CAAC;aACd;QACF,CAAC;KAAA;CACD"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/GraphRequest.d.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/GraphRequest.d.ts deleted file mode 100644 index 29d8a42..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/GraphRequest.d.ts +++ /dev/null @@ -1,380 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -import { HTTPClient } from "./HTTPClient"; -import { ClientOptions } from "./IClientOptions"; -import { GraphRequestCallback } from "./IGraphRequestCallback"; -import { MiddlewareOptions } from "./middleware/options/IMiddlewareOptions"; -import { ResponseType } from "./ResponseType"; -/** - * @interface - * Signature to representing key value pairs - * @property {[key: string] : string | number} - The Key value pair - */ -interface KeyValuePairObjectStringNumber { - [key: string]: string | number; -} -/** - * @interface - * Signature to define URL components - * @template http://graph.microsoft.com/VERSION/PATH?QUERYSTRING&OTHER_QUERY_PARAMS - * - * @property {string} host - The host to which the request needs to be made - * @property {string} version - Version of the graph endpoint - * @property {string} [path] - The path of the resource request - * @property {KeyValuePairObjectStringNumber} oDataQueryParams - The oData Query Params - * @property {KeyValuePairObjectStringNumber} otherURLQueryParams - The other query params for a request - * @property {string[]} otherURLQueryOptions - The non key-value query parameters. Example- '/me?$whatif' - */ -export interface URLComponents { - host: string; - version: string; - path?: string; - oDataQueryParams: KeyValuePairObjectStringNumber; - otherURLQueryParams: KeyValuePairObjectStringNumber; - otherURLQueryOptions?: string[]; -} -/** - * @class - * A Class representing GraphRequest - */ -export declare class GraphRequest { - /** - * @private - * A member variable to hold HTTPClient instance - */ - private httpClient; - /** - * @private - * A member variable to hold client options - */ - private config; - /** - * @private - * A member to hold URL Components data - */ - private urlComponents; - /** - * @private - * A member to hold custom header options for a request - */ - private _headers; - /** - * @private - * A member to hold custom options for a request - */ - private _options; - /** - * @private - * A member to hold the array of middleware options for a request - */ - private _middlewareOptions; - /** - * @private - * A member to hold custom response type for a request - */ - private _responseType; - /** - * @public - * @constructor - * Creates an instance of GraphRequest - * @param {HTTPClient} httpClient - The HTTPClient instance - * @param {ClientOptions} config - The options for making request - * @param {string} path - A path string - */ - constructor(httpClient: HTTPClient, config: ClientOptions, path: string); - /** - * @private - * Parses the path string and creates URLComponents out of it - * @param {string} path - The request path string - * @returns Nothing - */ - private parsePath; - /** - * @private - * Adds the query parameter as comma separated values - * @param {string} propertyName - The name of a property - * @param {string|string[]} propertyValue - The vale of a property - * @param {IArguments} additionalProperties - The additional properties - * @returns Nothing - */ - private addCsvQueryParameter; - /** - * @private - * Builds the full url from the URLComponents to make a request - * @returns The URL string that is qualified to make a request to graph endpoint - */ - private buildFullUrl; - /** - * @private - * Builds the query string from the URLComponents - * @returns The Constructed query string - */ - private createQueryString; - /** - * @private - * Parses the query parameters to set the urlComponents property of the GraphRequest object - * @param {string|KeyValuePairObjectStringNumber} queryDictionaryOrString - The query parameter - * @returns The same GraphRequest instance that is being called with - */ - private parseQueryParameter; - /** - * @private - * Parses the query parameter of string type to set the urlComponents property of the GraphRequest object - * @param {string} queryParameter - the query parameters - * returns nothing - */ - private parseQueryParamenterString; - /** - * @private - * Sets values into the urlComponents property of GraphRequest object. - * @param {string} paramKey - the query parameter key - * @param {string} paramValue - the query paramter value - * @returns nothing - */ - private setURLComponentsQueryParamater; - /** - * @private - * Check if the query parameter string has a valid key-value structure - * @param {string} queryString - the query parameter string. Example -> "name=value" - * #returns true if the query string has a valid key-value structure else false - */ - private isValidQueryKeyValuePair; - /** - * @private - * Updates the custom headers and options for a request - * @param {FetchOptions} options - The request options object - * @returns Nothing - */ - private updateRequestOptions; - /** - * @private - * @async - * Adds the custom headers and options to the request and makes the HTTPClient send request call - * @param {RequestInfo} request - The request url string or the Request object value - * @param {FetchOptions} options - The options to make a request - * @param {GraphRequestCallback} [callback] - The callback function to be called in response with async call - * @returns A promise that resolves to the response content - */ - private send; - /** - * @private - * Checks if the content-type is present in the _headers property. If not present, defaults the content-type to application/json - * @param none - * @returns nothing - */ - private setHeaderContentType; - /** - * @public - * Sets the custom header for a request - * @param {string} headerKey - A header key - * @param {string} headerValue - A header value - * @returns The same GraphRequest instance that is being called with - */ - header(headerKey: string, headerValue: string): GraphRequest; - /** - * @public - * Sets the custom headers for a request - * @param {KeyValuePairObjectStringNumber | HeadersInit} headers - The request headers - * @returns The same GraphRequest instance that is being called with - */ - headers(headers: KeyValuePairObjectStringNumber | HeadersInit): GraphRequest; - /** - * @public - * Sets the option for making a request - * @param {string} key - The key value - * @param {any} value - The value - * @returns The same GraphRequest instance that is being called with - */ - option(key: string, value: any): GraphRequest; - /** - * @public - * Sets the options for making a request - * @param {{ [key: string]: any }} options - The options key value pair - * @returns The same GraphRequest instance that is being called with - */ - options(options: { - [key: string]: any; - }): GraphRequest; - /** - * @public - * Sets the middleware options for a request - * @param {MiddlewareOptions[]} options - The array of middleware options - * @returns The same GraphRequest instance that is being called with - */ - middlewareOptions(options: MiddlewareOptions[]): GraphRequest; - /** - * @public - * Sets the api endpoint version for a request - * @param {string} version - The version value - * @returns The same GraphRequest instance that is being called with - */ - version(version: string): GraphRequest; - /** - * @public - * Sets the api endpoint version for a request - * @param {ResponseType} responseType - The response type value - * @returns The same GraphRequest instance that is being called with - */ - responseType(responseType: ResponseType): GraphRequest; - /** - * @public - * To add properties for select OData Query param - * @param {string|string[]} properties - The Properties value - * @returns The same GraphRequest instance that is being called with, after adding the properties for $select query - */ - select(properties: string | string[]): GraphRequest; - /** - * @public - * To add properties for expand OData Query param - * @param {string|string[]} properties - The Properties value - * @returns The same GraphRequest instance that is being called with, after adding the properties for $expand query - */ - expand(properties: string | string[]): GraphRequest; - /** - * @public - * To add properties for orderby OData Query param - * @param {string|string[]} properties - The Properties value - * @returns The same GraphRequest instance that is being called with, after adding the properties for $orderby query - */ - orderby(properties: string | string[]): GraphRequest; - /** - * @public - * To add query string for filter OData Query param. The request URL accepts only one $filter Odata Query option and its value is set to the most recently passed filter query string. - * @param {string} filterStr - The filter query string - * @returns The same GraphRequest instance that is being called with, after adding the $filter query - */ - filter(filterStr: string): GraphRequest; - /** - * @public - * To add criterion for search OData Query param. The request URL accepts only one $search Odata Query option and its value is set to the most recently passed search criterion string. - * @param {string} searchStr - The search criterion string - * @returns The same GraphRequest instance that is being called with, after adding the $search query criteria - */ - search(searchStr: string): GraphRequest; - /** - * @public - * To add number for top OData Query param. The request URL accepts only one $top Odata Query option and its value is set to the most recently passed number value. - * @param {number} n - The number value - * @returns The same GraphRequest instance that is being called with, after adding the number for $top query - */ - top(n: number): GraphRequest; - /** - * @public - * To add number for skip OData Query param. The request URL accepts only one $skip Odata Query option and its value is set to the most recently passed number value. - * @param {number} n - The number value - * @returns The same GraphRequest instance that is being called with, after adding the number for the $skip query - */ - skip(n: number): GraphRequest; - /** - * @public - * To add token string for skipToken OData Query param. The request URL accepts only one $skipToken Odata Query option and its value is set to the most recently passed token value. - * @param {string} token - The token value - * @returns The same GraphRequest instance that is being called with, after adding the token string for $skipToken query option - */ - skipToken(token: string): GraphRequest; - /** - * @public - * To add boolean for count OData Query param. The URL accepts only one $count Odata Query option and its value is set to the most recently passed boolean value. - * @param {boolean} isCount - The count boolean - * @returns The same GraphRequest instance that is being called with, after adding the boolean value for the $count query option - */ - count(isCount?: boolean): GraphRequest; - /** - * @public - * Appends query string to the urlComponent - * @param {string|KeyValuePairObjectStringNumber} queryDictionaryOrString - The query value - * @returns The same GraphRequest instance that is being called with, after appending the query string to the url component - */ - query(queryDictionaryOrString: string | KeyValuePairObjectStringNumber): GraphRequest; - /** - * @public - * @async - * Makes a http request with GET method - * @param {GraphRequestCallback} [callback] - The callback function to be called in response with async call - * @returns A promise that resolves to the get response - */ - get(callback?: GraphRequestCallback): Promise; - /** - * @public - * @async - * Makes a http request with POST method - * @param {any} content - The content that needs to be sent with the request - * @param {GraphRequestCallback} [callback] - The callback function to be called in response with async call - * @returns A promise that resolves to the post response - */ - post(content: any, callback?: GraphRequestCallback): Promise; - /** - * @public - * @async - * Alias for Post request call - * @param {any} content - The content that needs to be sent with the request - * @param {GraphRequestCallback} [callback] - The callback function to be called in response with async call - * @returns A promise that resolves to the post response - */ - create(content: any, callback?: GraphRequestCallback): Promise; - /** - * @public - * @async - * Makes http request with PUT method - * @param {any} content - The content that needs to be sent with the request - * @param {GraphRequestCallback} [callback] - The callback function to be called in response with async call - * @returns A promise that resolves to the put response - */ - put(content: any, callback?: GraphRequestCallback): Promise; - /** - * @public - * @async - * Makes http request with PATCH method - * @param {any} content - The content that needs to be sent with the request - * @param {GraphRequestCallback} [callback] - The callback function to be called in response with async call - * @returns A promise that resolves to the patch response - */ - patch(content: any, callback?: GraphRequestCallback): Promise; - /** - * @public - * @async - * Alias for PATCH request - * @param {any} content - The content that needs to be sent with the request - * @param {GraphRequestCallback} [callback] - The callback function to be called in response with async call - * @returns A promise that resolves to the patch response - */ - update(content: any, callback?: GraphRequestCallback): Promise; - /** - * @public - * @async - * Makes http request with DELETE method - * @param {GraphRequestCallback} [callback] - The callback function to be called in response with async call - * @returns A promise that resolves to the delete response - */ - delete(callback?: GraphRequestCallback): Promise; - /** - * @public - * @async - * Alias for delete request call - * @param {GraphRequestCallback} [callback] - The callback function to be called in response with async call - * @returns A promise that resolves to the delete response - */ - del(callback?: GraphRequestCallback): Promise; - /** - * @public - * @async - * Makes a http request with GET method to read response as a stream. - * @param {GraphRequestCallback} [callback] - The callback function to be called in response with async call - * @returns A promise that resolves to the getStream response - */ - getStream(callback?: GraphRequestCallback): Promise; - /** - * @public - * @async - * Makes a http request with GET method to read response as a stream. - * @param {any} stream - The stream instance - * @param {GraphRequestCallback} [callback] - The callback function to be called in response with async call - * @returns A promise that resolves to the putStream response - */ - putStream(stream: any, callback?: GraphRequestCallback): Promise; -} -export {}; diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/GraphRequest.js b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/GraphRequest.js deleted file mode 100644 index ced6c5b..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/GraphRequest.js +++ /dev/null @@ -1,688 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -import { __awaiter } from "tslib"; -/** - * @module GraphRequest - */ -import { GraphClientError } from "./GraphClientError"; -import { GraphErrorHandler } from "./GraphErrorHandler"; -import { oDataQueryNames, serializeContent, urlJoin } from "./GraphRequestUtil"; -import { GraphResponseHandler } from "./GraphResponseHandler"; -import { MiddlewareControl } from "./middleware/MiddlewareControl"; -import { RequestMethod } from "./RequestMethod"; -import { ResponseType } from "./ResponseType"; -/** - * @class - * A Class representing GraphRequest - */ -export class GraphRequest { - /** - * @public - * @constructor - * Creates an instance of GraphRequest - * @param {HTTPClient} httpClient - The HTTPClient instance - * @param {ClientOptions} config - The options for making request - * @param {string} path - A path string - */ - constructor(httpClient, config, path) { - /** - * @private - * Parses the path string and creates URLComponents out of it - * @param {string} path - The request path string - * @returns Nothing - */ - this.parsePath = (path) => { - // Strips out the base of the url if they passed in - if (path.indexOf("https://") !== -1) { - path = path.replace("https://", ""); - // Find where the host ends - const endOfHostStrPos = path.indexOf("/"); - if (endOfHostStrPos !== -1) { - // Parse out the host - this.urlComponents.host = "https://" + path.substring(0, endOfHostStrPos); - // Strip the host from path - path = path.substring(endOfHostStrPos + 1, path.length); - } - // Remove the following version - const endOfVersionStrPos = path.indexOf("/"); - if (endOfVersionStrPos !== -1) { - // Parse out the version - this.urlComponents.version = path.substring(0, endOfVersionStrPos); - // Strip version from path - path = path.substring(endOfVersionStrPos + 1, path.length); - } - } - // Strip out any leading "/" - if (path.charAt(0) === "/") { - path = path.substr(1); - } - const queryStrPos = path.indexOf("?"); - if (queryStrPos === -1) { - // No query string - this.urlComponents.path = path; - } - else { - this.urlComponents.path = path.substr(0, queryStrPos); - // Capture query string into oDataQueryParams and otherURLQueryParams - const queryParams = path.substring(queryStrPos + 1, path.length).split("&"); - for (const queryParam of queryParams) { - this.parseQueryParameter(queryParam); - } - } - }; - this.httpClient = httpClient; - this.config = config; - this.urlComponents = { - host: this.config.baseUrl, - version: this.config.defaultVersion, - oDataQueryParams: {}, - otherURLQueryParams: {}, - otherURLQueryOptions: [], - }; - this._headers = {}; - this._options = {}; - this._middlewareOptions = []; - this.parsePath(path); - } - /** - * @private - * Adds the query parameter as comma separated values - * @param {string} propertyName - The name of a property - * @param {string|string[]} propertyValue - The vale of a property - * @param {IArguments} additionalProperties - The additional properties - * @returns Nothing - */ - addCsvQueryParameter(propertyName, propertyValue, additionalProperties) { - // If there are already $propertyName value there, append a "," - this.urlComponents.oDataQueryParams[propertyName] = this.urlComponents.oDataQueryParams[propertyName] ? this.urlComponents.oDataQueryParams[propertyName] + "," : ""; - let allValues = []; - if (additionalProperties.length > 1 && typeof propertyValue === "string") { - allValues = Array.prototype.slice.call(additionalProperties); - } - else if (typeof propertyValue === "string") { - allValues.push(propertyValue); - } - else { - allValues = allValues.concat(propertyValue); - } - this.urlComponents.oDataQueryParams[propertyName] += allValues.join(","); - } - /** - * @private - * Builds the full url from the URLComponents to make a request - * @returns The URL string that is qualified to make a request to graph endpoint - */ - buildFullUrl() { - const url = urlJoin([this.urlComponents.host, this.urlComponents.version, this.urlComponents.path]) + this.createQueryString(); - if (this.config.debugLogging) { - console.log(url); - } - return url; - } - /** - * @private - * Builds the query string from the URLComponents - * @returns The Constructed query string - */ - createQueryString() { - // Combining query params from oDataQueryParams and otherURLQueryParams - const urlComponents = this.urlComponents; - const query = []; - if (Object.keys(urlComponents.oDataQueryParams).length !== 0) { - for (const property in urlComponents.oDataQueryParams) { - if (Object.prototype.hasOwnProperty.call(urlComponents.oDataQueryParams, property)) { - query.push(property + "=" + urlComponents.oDataQueryParams[property]); - } - } - } - if (Object.keys(urlComponents.otherURLQueryParams).length !== 0) { - for (const property in urlComponents.otherURLQueryParams) { - if (Object.prototype.hasOwnProperty.call(urlComponents.otherURLQueryParams, property)) { - query.push(property + "=" + urlComponents.otherURLQueryParams[property]); - } - } - } - if (urlComponents.otherURLQueryOptions.length !== 0) { - for (const str of urlComponents.otherURLQueryOptions) { - query.push(str); - } - } - return query.length > 0 ? "?" + query.join("&") : ""; - } - /** - * @private - * Parses the query parameters to set the urlComponents property of the GraphRequest object - * @param {string|KeyValuePairObjectStringNumber} queryDictionaryOrString - The query parameter - * @returns The same GraphRequest instance that is being called with - */ - parseQueryParameter(queryDictionaryOrString) { - if (typeof queryDictionaryOrString === "string") { - if (queryDictionaryOrString.charAt(0) === "?") { - queryDictionaryOrString = queryDictionaryOrString.substring(1); - } - if (queryDictionaryOrString.indexOf("&") !== -1) { - const queryParams = queryDictionaryOrString.split("&"); - for (const str of queryParams) { - this.parseQueryParamenterString(str); - } - } - else { - this.parseQueryParamenterString(queryDictionaryOrString); - } - } - else if (queryDictionaryOrString.constructor === Object) { - for (const key in queryDictionaryOrString) { - if (Object.prototype.hasOwnProperty.call(queryDictionaryOrString, key)) { - this.setURLComponentsQueryParamater(key, queryDictionaryOrString[key]); - } - } - } - return this; - } - /** - * @private - * Parses the query parameter of string type to set the urlComponents property of the GraphRequest object - * @param {string} queryParameter - the query parameters - * returns nothing - */ - parseQueryParamenterString(queryParameter) { - /* The query key-value pair must be split on the first equals sign to avoid errors in parsing nested query parameters. - Example-> "/me?$expand=home($select=city)" */ - if (this.isValidQueryKeyValuePair(queryParameter)) { - const indexOfFirstEquals = queryParameter.indexOf("="); - const paramKey = queryParameter.substring(0, indexOfFirstEquals); - const paramValue = queryParameter.substring(indexOfFirstEquals + 1); - this.setURLComponentsQueryParamater(paramKey, paramValue); - } - else { - /* Push values which are not of key-value structure. - Example-> Handle an invalid input->.query(test), .query($select($select=name)) and let the Graph API respond with the error in the URL*/ - this.urlComponents.otherURLQueryOptions.push(queryParameter); - } - } - /** - * @private - * Sets values into the urlComponents property of GraphRequest object. - * @param {string} paramKey - the query parameter key - * @param {string} paramValue - the query paramter value - * @returns nothing - */ - setURLComponentsQueryParamater(paramKey, paramValue) { - if (oDataQueryNames.indexOf(paramKey) !== -1) { - const currentValue = this.urlComponents.oDataQueryParams[paramKey]; - const isValueAppendable = currentValue && (paramKey === "$expand" || paramKey === "$select" || paramKey === "$orderby"); - this.urlComponents.oDataQueryParams[paramKey] = isValueAppendable ? currentValue + "," + paramValue : paramValue; - } - else { - this.urlComponents.otherURLQueryParams[paramKey] = paramValue; - } - } - /** - * @private - * Check if the query parameter string has a valid key-value structure - * @param {string} queryString - the query parameter string. Example -> "name=value" - * #returns true if the query string has a valid key-value structure else false - */ - isValidQueryKeyValuePair(queryString) { - const indexofFirstEquals = queryString.indexOf("="); - if (indexofFirstEquals === -1) { - return false; - } - const indexofOpeningParanthesis = queryString.indexOf("("); - if (indexofOpeningParanthesis !== -1 && queryString.indexOf("(") < indexofFirstEquals) { - // Example -> .query($select($expand=true)); - return false; - } - return true; - } - /** - * @private - * Updates the custom headers and options for a request - * @param {FetchOptions} options - The request options object - * @returns Nothing - */ - updateRequestOptions(options) { - const optionsHeaders = Object.assign({}, options.headers); - if (this.config.fetchOptions !== undefined) { - const fetchOptions = Object.assign({}, this.config.fetchOptions); - Object.assign(options, fetchOptions); - if (typeof this.config.fetchOptions.headers !== undefined) { - options.headers = Object.assign({}, this.config.fetchOptions.headers); - } - } - Object.assign(options, this._options); - if (options.headers !== undefined) { - Object.assign(optionsHeaders, options.headers); - } - Object.assign(optionsHeaders, this._headers); - options.headers = optionsHeaders; - } - /** - * @private - * @async - * Adds the custom headers and options to the request and makes the HTTPClient send request call - * @param {RequestInfo} request - The request url string or the Request object value - * @param {FetchOptions} options - The options to make a request - * @param {GraphRequestCallback} [callback] - The callback function to be called in response with async call - * @returns A promise that resolves to the response content - */ - send(request, options, callback) { - var _a; - return __awaiter(this, void 0, void 0, function* () { - let rawResponse; - const middlewareControl = new MiddlewareControl(this._middlewareOptions); - this.updateRequestOptions(options); - const customHosts = (_a = this.config) === null || _a === void 0 ? void 0 : _a.customHosts; - try { - const context = yield this.httpClient.sendRequest({ - request, - options, - middlewareControl, - customHosts, - }); - rawResponse = context.response; - const response = yield GraphResponseHandler.getResponse(rawResponse, this._responseType, callback); - return response; - } - catch (error) { - if (error instanceof GraphClientError) { - throw error; - } - let statusCode; - if (rawResponse) { - statusCode = rawResponse.status; - } - const gError = yield GraphErrorHandler.getError(error, statusCode, callback, rawResponse); - throw gError; - } - }); - } - /** - * @private - * Checks if the content-type is present in the _headers property. If not present, defaults the content-type to application/json - * @param none - * @returns nothing - */ - setHeaderContentType() { - if (!this._headers) { - this.header("Content-Type", "application/json"); - return; - } - const headerKeys = Object.keys(this._headers); - for (const headerKey of headerKeys) { - if (headerKey.toLowerCase() === "content-type") { - return; - } - } - // Default the content-type to application/json in case the content-type is not present in the header - this.header("Content-Type", "application/json"); - } - /** - * @public - * Sets the custom header for a request - * @param {string} headerKey - A header key - * @param {string} headerValue - A header value - * @returns The same GraphRequest instance that is being called with - */ - header(headerKey, headerValue) { - this._headers[headerKey] = headerValue; - return this; - } - /** - * @public - * Sets the custom headers for a request - * @param {KeyValuePairObjectStringNumber | HeadersInit} headers - The request headers - * @returns The same GraphRequest instance that is being called with - */ - headers(headers) { - for (const key in headers) { - if (Object.prototype.hasOwnProperty.call(headers, key)) { - this._headers[key] = headers[key]; - } - } - return this; - } - /** - * @public - * Sets the option for making a request - * @param {string} key - The key value - * @param {any} value - The value - * @returns The same GraphRequest instance that is being called with - */ - option(key, value) { - this._options[key] = value; - return this; - } - /** - * @public - * Sets the options for making a request - * @param {{ [key: string]: any }} options - The options key value pair - * @returns The same GraphRequest instance that is being called with - */ - options(options) { - for (const key in options) { - if (Object.prototype.hasOwnProperty.call(options, key)) { - this._options[key] = options[key]; - } - } - return this; - } - /** - * @public - * Sets the middleware options for a request - * @param {MiddlewareOptions[]} options - The array of middleware options - * @returns The same GraphRequest instance that is being called with - */ - middlewareOptions(options) { - this._middlewareOptions = options; - return this; - } - /** - * @public - * Sets the api endpoint version for a request - * @param {string} version - The version value - * @returns The same GraphRequest instance that is being called with - */ - version(version) { - this.urlComponents.version = version; - return this; - } - /** - * @public - * Sets the api endpoint version for a request - * @param {ResponseType} responseType - The response type value - * @returns The same GraphRequest instance that is being called with - */ - responseType(responseType) { - this._responseType = responseType; - return this; - } - /** - * @public - * To add properties for select OData Query param - * @param {string|string[]} properties - The Properties value - * @returns The same GraphRequest instance that is being called with, after adding the properties for $select query - */ - /* - * Accepts .select("displayName,birthday") - * and .select(["displayName", "birthday"]) - * and .select("displayName", "birthday") - * - */ - select(properties) { - this.addCsvQueryParameter("$select", properties, arguments); - return this; - } - /** - * @public - * To add properties for expand OData Query param - * @param {string|string[]} properties - The Properties value - * @returns The same GraphRequest instance that is being called with, after adding the properties for $expand query - */ - expand(properties) { - this.addCsvQueryParameter("$expand", properties, arguments); - return this; - } - /** - * @public - * To add properties for orderby OData Query param - * @param {string|string[]} properties - The Properties value - * @returns The same GraphRequest instance that is being called with, after adding the properties for $orderby query - */ - orderby(properties) { - this.addCsvQueryParameter("$orderby", properties, arguments); - return this; - } - /** - * @public - * To add query string for filter OData Query param. The request URL accepts only one $filter Odata Query option and its value is set to the most recently passed filter query string. - * @param {string} filterStr - The filter query string - * @returns The same GraphRequest instance that is being called with, after adding the $filter query - */ - filter(filterStr) { - this.urlComponents.oDataQueryParams.$filter = filterStr; - return this; - } - /** - * @public - * To add criterion for search OData Query param. The request URL accepts only one $search Odata Query option and its value is set to the most recently passed search criterion string. - * @param {string} searchStr - The search criterion string - * @returns The same GraphRequest instance that is being called with, after adding the $search query criteria - */ - search(searchStr) { - this.urlComponents.oDataQueryParams.$search = searchStr; - return this; - } - /** - * @public - * To add number for top OData Query param. The request URL accepts only one $top Odata Query option and its value is set to the most recently passed number value. - * @param {number} n - The number value - * @returns The same GraphRequest instance that is being called with, after adding the number for $top query - */ - top(n) { - this.urlComponents.oDataQueryParams.$top = n; - return this; - } - /** - * @public - * To add number for skip OData Query param. The request URL accepts only one $skip Odata Query option and its value is set to the most recently passed number value. - * @param {number} n - The number value - * @returns The same GraphRequest instance that is being called with, after adding the number for the $skip query - */ - skip(n) { - this.urlComponents.oDataQueryParams.$skip = n; - return this; - } - /** - * @public - * To add token string for skipToken OData Query param. The request URL accepts only one $skipToken Odata Query option and its value is set to the most recently passed token value. - * @param {string} token - The token value - * @returns The same GraphRequest instance that is being called with, after adding the token string for $skipToken query option - */ - skipToken(token) { - this.urlComponents.oDataQueryParams.$skipToken = token; - return this; - } - /** - * @public - * To add boolean for count OData Query param. The URL accepts only one $count Odata Query option and its value is set to the most recently passed boolean value. - * @param {boolean} isCount - The count boolean - * @returns The same GraphRequest instance that is being called with, after adding the boolean value for the $count query option - */ - count(isCount = true) { - this.urlComponents.oDataQueryParams.$count = isCount.toString(); - return this; - } - /** - * @public - * Appends query string to the urlComponent - * @param {string|KeyValuePairObjectStringNumber} queryDictionaryOrString - The query value - * @returns The same GraphRequest instance that is being called with, after appending the query string to the url component - */ - /* - * Accepts .query("displayName=xyz") - * and .select({ name: "value" }) - */ - query(queryDictionaryOrString) { - return this.parseQueryParameter(queryDictionaryOrString); - } - /** - * @public - * @async - * Makes a http request with GET method - * @param {GraphRequestCallback} [callback] - The callback function to be called in response with async call - * @returns A promise that resolves to the get response - */ - get(callback) { - return __awaiter(this, void 0, void 0, function* () { - const url = this.buildFullUrl(); - const options = { - method: RequestMethod.GET, - }; - const response = yield this.send(url, options, callback); - return response; - }); - } - /** - * @public - * @async - * Makes a http request with POST method - * @param {any} content - The content that needs to be sent with the request - * @param {GraphRequestCallback} [callback] - The callback function to be called in response with async call - * @returns A promise that resolves to the post response - */ - post(content, callback) { - return __awaiter(this, void 0, void 0, function* () { - const url = this.buildFullUrl(); - const options = { - method: RequestMethod.POST, - body: serializeContent(content), - }; - const className = content && content.constructor && content.constructor.name; - if (className === "FormData") { - // Content-Type headers should not be specified in case the of FormData type content - options.headers = {}; - } - else { - this.setHeaderContentType(); - options.headers = this._headers; - } - return yield this.send(url, options, callback); - }); - } - /** - * @public - * @async - * Alias for Post request call - * @param {any} content - The content that needs to be sent with the request - * @param {GraphRequestCallback} [callback] - The callback function to be called in response with async call - * @returns A promise that resolves to the post response - */ - create(content, callback) { - return __awaiter(this, void 0, void 0, function* () { - return yield this.post(content, callback); - }); - } - /** - * @public - * @async - * Makes http request with PUT method - * @param {any} content - The content that needs to be sent with the request - * @param {GraphRequestCallback} [callback] - The callback function to be called in response with async call - * @returns A promise that resolves to the put response - */ - put(content, callback) { - return __awaiter(this, void 0, void 0, function* () { - const url = this.buildFullUrl(); - this.setHeaderContentType(); - const options = { - method: RequestMethod.PUT, - body: serializeContent(content), - }; - return yield this.send(url, options, callback); - }); - } - /** - * @public - * @async - * Makes http request with PATCH method - * @param {any} content - The content that needs to be sent with the request - * @param {GraphRequestCallback} [callback] - The callback function to be called in response with async call - * @returns A promise that resolves to the patch response - */ - patch(content, callback) { - return __awaiter(this, void 0, void 0, function* () { - const url = this.buildFullUrl(); - this.setHeaderContentType(); - const options = { - method: RequestMethod.PATCH, - body: serializeContent(content), - }; - return yield this.send(url, options, callback); - }); - } - /** - * @public - * @async - * Alias for PATCH request - * @param {any} content - The content that needs to be sent with the request - * @param {GraphRequestCallback} [callback] - The callback function to be called in response with async call - * @returns A promise that resolves to the patch response - */ - update(content, callback) { - return __awaiter(this, void 0, void 0, function* () { - return yield this.patch(content, callback); - }); - } - /** - * @public - * @async - * Makes http request with DELETE method - * @param {GraphRequestCallback} [callback] - The callback function to be called in response with async call - * @returns A promise that resolves to the delete response - */ - delete(callback) { - return __awaiter(this, void 0, void 0, function* () { - const url = this.buildFullUrl(); - const options = { - method: RequestMethod.DELETE, - }; - return yield this.send(url, options, callback); - }); - } - /** - * @public - * @async - * Alias for delete request call - * @param {GraphRequestCallback} [callback] - The callback function to be called in response with async call - * @returns A promise that resolves to the delete response - */ - del(callback) { - return __awaiter(this, void 0, void 0, function* () { - return yield this.delete(callback); - }); - } - /** - * @public - * @async - * Makes a http request with GET method to read response as a stream. - * @param {GraphRequestCallback} [callback] - The callback function to be called in response with async call - * @returns A promise that resolves to the getStream response - */ - getStream(callback) { - return __awaiter(this, void 0, void 0, function* () { - const url = this.buildFullUrl(); - const options = { - method: RequestMethod.GET, - }; - this.responseType(ResponseType.STREAM); - return yield this.send(url, options, callback); - }); - } - /** - * @public - * @async - * Makes a http request with GET method to read response as a stream. - * @param {any} stream - The stream instance - * @param {GraphRequestCallback} [callback] - The callback function to be called in response with async call - * @returns A promise that resolves to the putStream response - */ - putStream(stream, callback) { - return __awaiter(this, void 0, void 0, function* () { - const url = this.buildFullUrl(); - const options = { - method: RequestMethod.PUT, - headers: { - "Content-Type": "application/octet-stream", - }, - body: stream, - }; - return yield this.send(url, options, callback); - }); - } -} -//# sourceMappingURL=GraphRequest.js.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/GraphRequest.js.map b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/GraphRequest.js.map deleted file mode 100644 index efb804e..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/GraphRequest.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"GraphRequest.js","sourceRoot":"","sources":["../../../src/GraphRequest.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH;;GAEG;AACH,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAChF,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAM9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AAEnE,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AA+B9C;;;GAGG;AACH,MAAM,OAAO,YAAY;IA2CxB;;;;;;;OAOG;IACH,YAAmB,UAAsB,EAAE,MAAqB,EAAE,IAAY;QAgB9E;;;;;WAKG;QACK,cAAS,GAAG,CAAC,IAAY,EAAQ,EAAE;YAC1C,mDAAmD;YACnD,IAAI,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,EAAE;gBACpC,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;gBAEpC,2BAA2B;gBAC3B,MAAM,eAAe,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;gBAC1C,IAAI,eAAe,KAAK,CAAC,CAAC,EAAE;oBAC3B,qBAAqB;oBACrB,IAAI,CAAC,aAAa,CAAC,IAAI,GAAG,UAAU,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,EAAE,eAAe,CAAC,CAAC;oBAC1E,2BAA2B;oBA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B;;YAClD,MAAM,GAAG,GAAG,IAAI,CAAC,YAAY,EAAE,CAAC;YAChC,MAAM,OAAO,GAAiB;gBAC7B,MAAM,EAAE,aAAa,CAAC,MAAM;aAC5B,CAAC;YACF,OAAO,MAAM,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;QAChD,CAAC;KAAA;IAED;;;;;;OAMG;IACU,GAAG,CAAC,QAA+B;;YAC/C,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;QACpC,CAAC;KAAA;IAED;;;;;;OAMG;IACU,SAAS,CAAC,QAA+B;;YACrD,MAAM,GAAG,GAAG,IAAI,CAAC,YAAY,EAAE,CAAC;YAChC,MAAM,OAAO,GAAG;gBACf,MAAM,EAAE,aAAa,CAAC,GAAG;aACzB,CAAC;YACF,IAAI,CAAC,YAAY,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC;YACvC,OAAO,MAAM,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;QAChD,CAAC;KAAA;IAED;;;;;;;OAOG;IACU,SAAS,CAAC,MAAW,EAAE,QAA+B;;YAClE,MAAM,GAAG,GAAG,IAAI,CAAC,YAAY,EAAE,CAAC;YAChC,MAAM,OAAO,GAAG;gBACf,MAAM,EAAE,aAAa,CAAC,GAAG;gBACzB,OAAO,EAAE;oBACR,cAAc,EAAE,0BAA0B;iBAC1C;gBACD,IAAI,EAAE,MAAM;aACZ,CAAC;YACF,OAAO,MAAM,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;QAChD,CAAC;KAAA;CACD"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/GraphRequestUtil.d.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/GraphRequestUtil.d.ts deleted file mode 100644 index c77364e..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/GraphRequestUtil.d.ts +++ /dev/null @@ -1,42 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -/** - * To hold list of OData query params - */ -export declare const oDataQueryNames: string[]; -/** - * To construct the URL by appending the segments with "/" - * @param {string[]} urlSegments - The array of strings - * @returns The constructed URL string - */ -export declare const urlJoin: (urlSegments: string[]) => string; -/** - * Serializes the content - * @param {any} content - The content value that needs to be serialized - * @returns The serialized content - * - * Note: - * This conversion is required due to the following reasons: - * Body parameter of Request method of isomorphic-fetch only accepts Blob, ArrayBuffer, FormData, TypedArrays string. - * Node.js platform does not support Blob, FormData. Javascript File object inherits from Blob so it is also not supported in node. Therefore content of type Blob, File, FormData will only come from browsers. - * Parallel to ArrayBuffer in javascript, node provides Buffer interface. Node's Buffer is able to send the arbitrary binary data to the server successfully for both Browser and Node platform. Whereas sending binary data via ArrayBuffer or TypedArrays was only possible using Browser. To support both Node and Browser, `serializeContent` converts TypedArrays or ArrayBuffer to `Node Buffer`. - * If the data received is in JSON format, `serializeContent` converts the JSON to string. - */ -export declare const serializeContent: (content: any) => any; -/** - * Checks if the url is one of the service root endpoints for Microsoft Graph and Graph Explorer. - * @param {string} url - The url to be verified - * @returns {boolean} - Returns true if the url is a Graph URL - */ -export declare const isGraphURL: (url: string) => boolean; -/** - * Checks if the url is for one of the custom hosts provided during client initialization - * @param {string} url - The url to be verified - * @param {Set} customHosts - The url to be verified - * @returns {boolean} - Returns true if the url is a for a custom host - */ -export declare const isCustomHost: (url: string, customHosts: Set) => boolean; diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/GraphRequestUtil.js b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/GraphRequestUtil.js deleted file mode 100644 index 159476a..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/GraphRequestUtil.js +++ /dev/null @@ -1,116 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -/** - * @module GraphRequestUtil - */ -import { GRAPH_URLS } from "./Constants"; -import { GraphClientError } from "./GraphClientError"; -/** - * To hold list of OData query params - */ -export const oDataQueryNames = ["$select", "$expand", "$orderby", "$filter", "$top", "$skip", "$skipToken", "$count"]; -/** - * To construct the URL by appending the segments with "/" - * @param {string[]} urlSegments - The array of strings - * @returns The constructed URL string - */ -export const urlJoin = (urlSegments) => { - const removePostSlash = (s) => s.replace(/\/+$/, ""); - const removePreSlash = (s) => s.replace(/^\/+/, ""); - const joiner = (pre, cur) => [removePostSlash(pre), removePreSlash(cur)].join("/"); - const parts = Array.prototype.slice.call(urlSegments); - return parts.reduce(joiner); -}; -/** - * Serializes the content - * @param {any} content - The content value that needs to be serialized - * @returns The serialized content - * - * Note: - * This conversion is required due to the following reasons: - * Body parameter of Request method of isomorphic-fetch only accepts Blob, ArrayBuffer, FormData, TypedArrays string. - * Node.js platform does not support Blob, FormData. Javascript File object inherits from Blob so it is also not supported in node. Therefore content of type Blob, File, FormData will only come from browsers. - * Parallel to ArrayBuffer in javascript, node provides Buffer interface. Node's Buffer is able to send the arbitrary binary data to the server successfully for both Browser and Node platform. Whereas sending binary data via ArrayBuffer or TypedArrays was only possible using Browser. To support both Node and Browser, `serializeContent` converts TypedArrays or ArrayBuffer to `Node Buffer`. - * If the data received is in JSON format, `serializeContent` converts the JSON to string. - */ -export const serializeContent = (content) => { - const className = content && content.constructor && content.constructor.name; - if (className === "Buffer" || className === "Blob" || className === "File" || className === "FormData" || typeof content === "string") { - return content; - } - if (className === "ArrayBuffer") { - content = Buffer.from(content); - } - else if (className === "Int8Array" || className === "Int16Array" || className === "Int32Array" || className === "Uint8Array" || className === "Uint16Array" || className === "Uint32Array" || className === "Uint8ClampedArray" || className === "Float32Array" || className === "Float64Array" || className === "DataView") { - content = Buffer.from(content.buffer); - } - else { - try { - content = JSON.stringify(content); - } - catch (error) { - throw new Error("Unable to stringify the content"); - } - } - return content; -}; -/** - * Checks if the url is one of the service root endpoints for Microsoft Graph and Graph Explorer. - * @param {string} url - The url to be verified - * @returns {boolean} - Returns true if the url is a Graph URL - */ -export const isGraphURL = (url) => { - return isValidEndpoint(url); -}; -/** - * Checks if the url is for one of the custom hosts provided during client initialization - * @param {string} url - The url to be verified - * @param {Set} customHosts - The url to be verified - * @returns {boolean} - Returns true if the url is a for a custom host - */ -export const isCustomHost = (url, customHosts) => { - customHosts.forEach((host) => isCustomHostValid(host)); - return isValidEndpoint(url, customHosts); -}; -/** - * Checks if the url is for one of the provided hosts. - * @param {string} url - The url to be verified - * @param {Set} allowedHosts - A set of hosts. - * @returns {boolean} - Returns true is for one of the provided endpoints. - */ -const isValidEndpoint = (url, allowedHosts = GRAPH_URLS) => { - // Valid Graph URL pattern - https://graph.microsoft.com/{version}/{resource}?{query-parameters} - // Valid Graph URL example - https://graph.microsoft.com/v1.0/ - url = url.toLowerCase(); - if (url.indexOf("https://") !== -1) { - url = url.replace("https://", ""); - // Find where the host ends - const startofPortNoPos = url.indexOf(":"); - const endOfHostStrPos = url.indexOf("/"); - let hostName = ""; - if (endOfHostStrPos !== -1) { - if (startofPortNoPos !== -1 && startofPortNoPos < endOfHostStrPos) { - hostName = url.substring(0, startofPortNoPos); - return allowedHosts.has(hostName); - } - // Parse out the host - hostName = url.substring(0, endOfHostStrPos); - return allowedHosts.has(hostName); - } - } - return false; -}; -/** - * Throws error if the string is not a valid host/hostname and contains other url parts. - * @param {string} host - The host to be verified - */ -const isCustomHostValid = (host) => { - if (host.indexOf("/") !== -1) { - throw new GraphClientError("Please add only hosts or hostnames to the CustomHosts config. If the url is `http://example.com:3000/`, host is `example:3000`"); - } -}; -//# sourceMappingURL=GraphRequestUtil.js.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/GraphRequestUtil.js.map b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/GraphRequestUtil.js.map deleted file mode 100644 index fd3521b..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/GraphRequestUtil.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"GraphRequestUtil.js","sourceRoot":"","sources":["../../../src/GraphRequestUtil.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;GAEG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD;;GAEG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,SAAS,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,YAAY,EAAE,QAAQ,CAAC,CAAC;AAEtH;;;;GAIG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,WAAqB,EAAU,EAAE;IACxD,MAAM,eAAe,GAAG,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;IACrD,MAAM,cAAc,GAAG,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;IACpD,MAAM,MAAM,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,CAAC,CAAC,eAAe,CAAC,GAAG,CAAC,EAAE,cAAc,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACnF,MAAM,KAAK,GAAG,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IACtD,OAAO,KAAK,CAAC,MAAM,CAAC,MA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AO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE;QAC7B,MAAM,IAAI,gBAAgB,CAAC,gIAAgI,CAAC,CAAC;KAC7J;AACF,CAAC,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/GraphResponseHandler.d.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/GraphResponseHandler.d.ts deleted file mode 100644 index 730118a..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/GraphResponseHandler.d.ts +++ /dev/null @@ -1,62 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -/** - * @module GraphResponseHandler - * References - https://fetch.spec.whatwg.org/#responses - */ -import { GraphRequestCallback } from "./IGraphRequestCallback"; -import { ResponseType } from "./ResponseType"; -/** - * @enum - * Enum for document types - * @property {string} TEXT_HTML - The text/html content type - * @property {string} TEXT_XML - The text/xml content type - * @property {string} APPLICATION_XML - The application/xml content type - * @property {string} APPLICATION_XHTML - The application/xhml+xml content type - */ -export declare enum DocumentType { - TEXT_HTML = "text/html", - TEXT_XML = "text/xml", - APPLICATION_XML = "application/xml", - APPLICATION_XHTML = "application/xhtml+xml" -} -/** - * @class - * Class for GraphResponseHandler - */ -export declare class GraphResponseHandler { - /** - * @private - * @static - * To parse Document response - * @param {Response} rawResponse - The response object - * @param {DocumentType} type - The type to which the document needs to be parsed - * @returns A promise that resolves to a document content - */ - private static parseDocumentResponse; - /** - * @private - * @static - * @async - * To convert the native Response to response content - * @param {Response} rawResponse - The response object - * @param {ResponseType} [responseType] - The response type value - * @returns A promise that resolves to the converted response content - */ - private static convertResponse; - /** - * @public - * @static - * @async - * To get the parsed response - * @param {Response} rawResponse - The response object - * @param {ResponseType} [responseType] - The response type value - * @param {GraphRequestCallback} [callback] - The graph request callback function - * @returns The parsed response - */ - static getResponse(rawResponse: Response, responseType?: ResponseType, callback?: GraphRequestCallback): Promise; -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/GraphResponseHandler.js b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/GraphResponseHandler.js deleted file mode 100644 index 8c4e063..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/GraphResponseHandler.js +++ /dev/null @@ -1,186 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -import { __awaiter } from "tslib"; -import { ResponseType } from "./ResponseType"; -/** - * @enum - * Enum for document types - * @property {string} TEXT_HTML - The text/html content type - * @property {string} TEXT_XML - The text/xml content type - * @property {string} APPLICATION_XML - The application/xml content type - * @property {string} APPLICATION_XHTML - The application/xhml+xml content type - */ -export var DocumentType; -(function (DocumentType) { - DocumentType["TEXT_HTML"] = "text/html"; - DocumentType["TEXT_XML"] = "text/xml"; - DocumentType["APPLICATION_XML"] = "application/xml"; - DocumentType["APPLICATION_XHTML"] = "application/xhtml+xml"; -})(DocumentType || (DocumentType = {})); -/** - * @enum - * Enum for Content types - * @property {string} TEXT_PLAIN - The text/plain content type - * @property {string} APPLICATION_JSON - The application/json content type - */ -var ContentType; -(function (ContentType) { - ContentType["TEXT_PLAIN"] = "text/plain"; - ContentType["APPLICATION_JSON"] = "application/json"; -})(ContentType || (ContentType = {})); -/** - * @enum - * Enum for Content type regex - * @property {string} DOCUMENT - The regex to match document content types - * @property {string} IMAGE - The regex to match image content types - */ -var ContentTypeRegexStr; -(function (ContentTypeRegexStr) { - ContentTypeRegexStr["DOCUMENT"] = "^(text\\/(html|xml))|(application\\/(xml|xhtml\\+xml))$"; - ContentTypeRegexStr["IMAGE"] = "^image\\/.+"; -})(ContentTypeRegexStr || (ContentTypeRegexStr = {})); -/** - * @class - * Class for GraphResponseHandler - */ -export class GraphResponseHandler { - /** - * @private - * @static - * To parse Document response - * @param {Response} rawResponse - The response object - * @param {DocumentType} type - The type to which the document needs to be parsed - * @returns A promise that resolves to a document content - */ - static parseDocumentResponse(rawResponse, type) { - if (typeof DOMParser !== "undefined") { - return new Promise((resolve, reject) => { - rawResponse.text().then((xmlString) => { - try { - const parser = new DOMParser(); - const xmlDoc = parser.parseFromString(xmlString, type); - resolve(xmlDoc); - } - catch (error) { - reject(error); - } - }); - }); - } - else { - return Promise.resolve(rawResponse.body); - } - } - /** - * @private - * @static - * @async - * To convert the native Response to response content - * @param {Response} rawResponse - The response object - * @param {ResponseType} [responseType] - The response type value - * @returns A promise that resolves to the converted response content - */ - static convertResponse(rawResponse, responseType) { - return __awaiter(this, void 0, void 0, function* () { - if (rawResponse.status === 204) { - // NO CONTENT - return Promise.resolve(); - } - let responseValue; - const contentType = rawResponse.headers.get("Content-type"); - switch (responseType) { - case ResponseType.ARRAYBUFFER: - responseValue = yield rawResponse.arrayBuffer(); - break; - case ResponseType.BLOB: - responseValue = yield rawResponse.blob(); - break; - case ResponseType.DOCUMENT: - responseValue = yield GraphResponseHandler.parseDocumentResponse(rawResponse, DocumentType.TEXT_XML); - break; - case ResponseType.JSON: - responseValue = yield rawResponse.json(); - break; - case ResponseType.STREAM: - responseValue = yield Promise.resolve(rawResponse.body); - break; - case ResponseType.TEXT: - responseValue = yield rawResponse.text(); - break; - default: - if (contentType !== null) { - const mimeType = contentType.split(";")[0]; - if (new RegExp(ContentTypeRegexStr.DOCUMENT).test(mimeType)) { - responseValue = yield GraphResponseHandler.parseDocumentResponse(rawResponse, mimeType); - } - else if (new RegExp(ContentTypeRegexStr.IMAGE).test(mimeType)) { - responseValue = rawResponse.blob(); - } - else if (mimeType === ContentType.TEXT_PLAIN) { - responseValue = yield rawResponse.text(); - } - else if (mimeType === ContentType.APPLICATION_JSON) { - responseValue = yield rawResponse.json(); - } - else { - responseValue = Promise.resolve(rawResponse.body); - } - } - else { - /** - * RFC specification {@link https://tools.ietf.org/html/rfc7231#section-3.1.1.5} says: - * A sender that generates a message containing a payload body SHOULD - * generate a Content-Type header field in that message unless the - * intended media type of the enclosed representation is unknown to the - * sender. If a Content-Type header field is not present, the recipient - * MAY either assume a media type of "application/octet-stream" - * ([RFC2046], Section 4.5.1) or examine the data to determine its type. - * - * So assuming it as a stream type so returning the body. - */ - responseValue = Promise.resolve(rawResponse.body); - } - break; - } - return responseValue; - }); - } - /** - * @public - * @static - * @async - * To get the parsed response - * @param {Response} rawResponse - The response object - * @param {ResponseType} [responseType] - The response type value - * @param {GraphRequestCallback} [callback] - The graph request callback function - * @returns The parsed response - */ - static getResponse(rawResponse, responseType, callback) { - return __awaiter(this, void 0, void 0, function* () { - if (responseType === ResponseType.RAW) { - return Promise.resolve(rawResponse); - } - else { - const response = yield GraphResponseHandler.convertResponse(rawResponse, responseType); - if (rawResponse.ok) { - // Status Code 2XX - if (typeof callback === "function") { - callback(null, response); - } - else { - return response; - } - } - else { - // NOT OK Response - throw response; - } - } - }); - } -} -//# sourceMappingURL=GraphResponseHandler.js.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/GraphResponseHandler.js.map b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/GraphResponseHandler.js.map deleted file mode 100644 index f3805be..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/GraphResponseHandler.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"GraphResponseHandler.js","sourceRoot":"","sources":["../../../src/GraphResponseHandler.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAQH,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C;;;;;;;GAOG;AACH,MAAM,CAAN,IAAY,YAKX;AALD,WAAY,YAAY;IACvB,uCAAuB,CAAA;IACvB,qCAAqB,CA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AAW,CAAC,IAAI,EAAE,CAAC;yBACnC;6BAAM,IAAI,QAAQ,KAAK,WAAW,CAAC,UAAU,EAAE;4BAC/C,aAAa,GAAG,MAAM,WAAW,CAAC,IAAI,EAAE,CAAC;yBACzC;6BAAM,IAAI,QAAQ,KAAK,WAAW,CAAC,gBAAgB,EAAE;4BACrD,aAAa,GAAG,MAAM,WAAW,CAAC,IAAI,EAAE,CAAC;yBACzC;6BAAM;4BACN,aAAa,GAAG,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;yBAClD;qBACD;yBAAM;wBACN;;;;;;;;;;2BAUG;wBACH,aAAa,GAAG,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;qBAClD;oBACD,MAAM;aACP;YACD,OAAO,aAAa,CAAC;QACtB,CAAC;KAAA;IAED;;;;;;;;;OASG;IACI,MAAM,CAAO,WAAW,CAAC,WAAqB,EAAE,YAA2B,EAAE,QAA+B;;YAClH,IAAI,YAAY,KAAK,YAAY,CAAC,GAAG,EAAE;gBACtC,OAAO,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;aACpC;iBAAM;gBACN,MAAM,QAAQ,GAAG,MAAM,oBAAoB,CAAC,eAAe,CAAC,WAAW,EAAE,YAAY,CAAC,CAAC;gBACvF,IAAI,WAAW,CAAC,EAAE,EAAE;oBACnB,kBAAkB;oBAClB,IAAI,OAAO,QAAQ,KAAK,UAAU,EAAE;wBACnC,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;qBACzB;yBAAM;wBACN,OAAO,QAAQ,CAAC;qBAChB;iBACD;qBAAM;oBACN,kBAAkB;oBAClB,MAAM,QAAQ,CAAC;iBACf;aACD;QACF,CAAC;KAAA;CACD"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/HTTPClient.d.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/HTTPClient.d.ts deleted file mode 100644 index 6b37b24..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/HTTPClient.d.ts +++ /dev/null @@ -1,54 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -/** - * @module HTTPClient - */ -import { Context } from "./IContext"; -import { Middleware } from "./middleware/IMiddleware"; -/** - * @class - * Class representing HTTPClient - */ -export declare class HTTPClient { - /** - * @private - * A member holding first middleware of the middleware chain - */ - private middleware; - /** - * @public - * @constructor - * Creates an instance of a HTTPClient - * @param {...Middleware} middleware - The first middleware of the middleware chain or a sequence of all the Middleware handlers - */ - constructor(...middleware: Middleware[]); - /** - * @private - * Processes the middleware parameter passed to set this.middleware property - * The calling function should validate if middleware is not undefined or not empty. - * @param {...Middleware} middleware - The middleware passed - * @returns Nothing - */ - private setMiddleware; - /** - * @private - * Processes the middleware array to construct the chain - * and sets this.middleware property to the first middleware handler of the array - * The calling function should validate if middleware is not undefined or not empty - * @param {Middleware[]} middlewareArray - The array of middleware handlers - * @returns Nothing - */ - private parseMiddleWareArray; - /** - * @public - * @async - * To send the request through the middleware chain - * @param {Context} context - The context of a request - * @returns A promise that resolves to the Context - */ - sendRequest(context: Context): Promise; -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/HTTPClient.js b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/HTTPClient.js deleted file mode 100644 index 917694f..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/HTTPClient.js +++ /dev/null @@ -1,79 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -import { __awaiter } from "tslib"; -/** - * @class - * Class representing HTTPClient - */ -export class HTTPClient { - /** - * @public - * @constructor - * Creates an instance of a HTTPClient - * @param {...Middleware} middleware - The first middleware of the middleware chain or a sequence of all the Middleware handlers - */ - constructor(...middleware) { - if (!middleware || !middleware.length) { - const error = new Error(); - error.name = "InvalidMiddlewareChain"; - error.message = "Please provide a default middleware chain or custom middleware chain"; - throw error; - } - this.setMiddleware(...middleware); - } - /** - * @private - * Processes the middleware parameter passed to set this.middleware property - * The calling function should validate if middleware is not undefined or not empty. - * @param {...Middleware} middleware - The middleware passed - * @returns Nothing - */ - setMiddleware(...middleware) { - if (middleware.length > 1) { - this.parseMiddleWareArray(middleware); - } - else { - this.middleware = middleware[0]; - } - } - /** - * @private - * Processes the middleware array to construct the chain - * and sets this.middleware property to the first middleware handler of the array - * The calling function should validate if middleware is not undefined or not empty - * @param {Middleware[]} middlewareArray - The array of middleware handlers - * @returns Nothing - */ - parseMiddleWareArray(middlewareArray) { - middlewareArray.forEach((element, index) => { - if (index < middlewareArray.length - 1) { - element.setNext(middlewareArray[index + 1]); - } - }); - this.middleware = middlewareArray[0]; - } - /** - * @public - * @async - * To send the request through the middleware chain - * @param {Context} context - The context of a request - * @returns A promise that resolves to the Context - */ - sendRequest(context) { - return __awaiter(this, void 0, void 0, function* () { - if (typeof context.request === "string" && context.options === undefined) { - const error = new Error(); - error.name = "InvalidRequestOptions"; - error.message = "Unable to execute the middleware, Please provide valid options for a request"; - throw error; - } - yield this.middleware.execute(context); - return context; - }); - } -} -//# sourceMappingURL=HTTPClient.js.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/HTTPClient.js.map b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/HTTPClient.js.map deleted file mode 100644 index 83e5879..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/HTTPClient.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"HTTPClient.js","sourceRoot":"","sources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AAuB,CAAC;gBACrC,KAAK,CAAC,OAAO,GAAG,8EAA8E,CAAC;gBAC/F,MAAM,KAAK,CAAC;aACZ;YACD,MAAM,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;YACvC,OAAO,OAAO,CAAC;QAChB,CAAC;KAAA;CACD"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/HTTPClientFactory.d.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/HTTPClientFactory.d.ts deleted file mode 100644 index 53cc7bc..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/HTTPClientFactory.d.ts +++ /dev/null @@ -1,40 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -/** - * @module HTTPClientFactory - */ -import { HTTPClient } from "./HTTPClient"; -import { AuthenticationProvider } from "./IAuthenticationProvider"; -import { Middleware } from "./middleware/IMiddleware"; -/** - * @class - * Class representing HTTPClientFactory - */ -export declare class HTTPClientFactory { - /** - * @public - * @static - * Creates HTTPClient with default middleware chain - * @param {AuthenticationProvider} authProvider - The authentication provider instance - * @returns A HTTPClient instance - * - * NOTE: These are the things that we need to remember while doing modifications in the below default pipeline. - * * HTTPMessageHandler should be the last one in the middleware pipeline, because this makes the actual network call of the request - * * TelemetryHandler should be the one prior to the last middleware in the chain, because this is the one which actually collects and appends the usage flag and placing this handler * before making the actual network call ensures that the usage of all features are recorded in the flag. - * * The best place for AuthenticationHandler is in the starting of the pipeline, because every other handler might have to work for multiple times for a request but the auth token for - * them will remain same. For example, Retry and Redirect handlers might be working multiple times for a request based on the response but their auth token would remain same. - */ - static createWithAuthenticationProvider(authProvider: AuthenticationProvider): HTTPClient; - /** - * @public - * @static - * Creates a middleware chain with the given one - * @property {...Middleware} middleware - The first middleware of the middleware chain or a sequence of all the Middleware handlers - * @returns A HTTPClient instance - */ - static createWithMiddleware(...middleware: Middleware[]): HTTPClient; -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/HTTPClientFactory.js b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/HTTPClientFactory.js deleted file mode 100644 index bd45563..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/HTTPClientFactory.js +++ /dev/null @@ -1,73 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -/** - * @module HTTPClientFactory - */ -import { HTTPClient } from "./HTTPClient"; -import { AuthenticationHandler } from "./middleware/AuthenticationHandler"; -import { HTTPMessageHandler } from "./middleware/HTTPMessageHandler"; -import { RedirectHandlerOptions } from "./middleware/options/RedirectHandlerOptions"; -import { RetryHandlerOptions } from "./middleware/options/RetryHandlerOptions"; -import { RedirectHandler } from "./middleware/RedirectHandler"; -import { RetryHandler } from "./middleware/RetryHandler"; -import { TelemetryHandler } from "./middleware/TelemetryHandler"; -/** - * @private - * To check whether the environment is node or not - * @returns A boolean representing the environment is node or not - */ -const isNodeEnvironment = () => { - return typeof process === "object" && typeof require === "function"; -}; -/** - * @class - * Class representing HTTPClientFactory - */ -export class HTTPClientFactory { - /** - * @public - * @static - * Creates HTTPClient with default middleware chain - * @param {AuthenticationProvider} authProvider - The authentication provider instance - * @returns A HTTPClient instance - * - * NOTE: These are the things that we need to remember while doing modifications in the below default pipeline. - * * HTTPMessageHandler should be the last one in the middleware pipeline, because this makes the actual network call of the request - * * TelemetryHandler should be the one prior to the last middleware in the chain, because this is the one which actually collects and appends the usage flag and placing this handler * before making the actual network call ensures that the usage of all features are recorded in the flag. - * * The best place for AuthenticationHandler is in the starting of the pipeline, because every other handler might have to work for multiple times for a request but the auth token for - * them will remain same. For example, Retry and Redirect handlers might be working multiple times for a request based on the response but their auth token would remain same. - */ - static createWithAuthenticationProvider(authProvider) { - const authenticationHandler = new AuthenticationHandler(authProvider); - const retryHandler = new RetryHandler(new RetryHandlerOptions()); - const telemetryHandler = new TelemetryHandler(); - const httpMessageHandler = new HTTPMessageHandler(); - authenticationHandler.setNext(retryHandler); - if (isNodeEnvironment()) { - const redirectHandler = new RedirectHandler(new RedirectHandlerOptions()); - retryHandler.setNext(redirectHandler); - redirectHandler.setNext(telemetryHandler); - } - else { - retryHandler.setNext(telemetryHandler); - } - telemetryHandler.setNext(httpMessageHandler); - return HTTPClientFactory.createWithMiddleware(authenticationHandler); - } - /** - * @public - * @static - * Creates a middleware chain with the given one - * @property {...Middleware} middleware - The first middleware of the middleware chain or a sequence of all the Middleware handlers - * @returns A HTTPClient instance - */ - static createWithMiddleware(...middleware) { - // Middleware should not empty or undefined. This is check is present in the HTTPClient constructor. - return new HTTPClient(...middleware); - } -} -//# sourceMappingURL=HTTPClientFactory.js.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/HTTPClientFactory.js.map b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/HTTPClientFactory.js.map deleted file mode 100644 index bbe2219..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/HTTPClientFactory.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"HTTPClientFactory.js","sourceRoot":"","sources":["../../../src/HTTPClientFactory.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,OAAO,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAC3E,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAErE,OAAO,EAAE,sBAAsB,EAAE,MAAM,6CAA6C,CAAC;AACrF,O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pG,OAAO,IAAI,UAAU,CAAC,GAAG,UAAU,CAAC,CAAC;IACtC,CAAC;CACD"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/IAuthProvider.d.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/IAuthProvider.d.ts deleted file mode 100644 index 749d1ef..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/IAuthProvider.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -import { AuthProviderCallback } from "./IAuthProviderCallback"; -/** - * @interface - * Signature that holds authProvider - * @callback - The anonymous callback function which takes a single param - */ -export type AuthProvider = (done: AuthProviderCallback) => void; diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/IAuthProvider.js b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/IAuthProvider.js deleted file mode 100644 index 8bf6e47..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/IAuthProvider.js +++ /dev/null @@ -1,8 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -export {}; -//# sourceMappingURL=IAuthProvider.js.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/IAuthProvider.js.map b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/IAuthProvider.js.map deleted file mode 100644 index 65df281..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/IAuthProvider.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"IAuthProvider.js","sourceRoot":"","sources":["../../../src/IAuthProvider.ts"],"names":[],"mappings":"AAAA;;;;;GAKG"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/IAuthProviderCallback.d.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/IAuthProviderCallback.d.ts deleted file mode 100644 index 406a093..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/IAuthProviderCallback.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -/** - * @interface - * Signature that defines callback for an authentication provider - * @callback - The anonymous callback function which takes two params - */ -export type AuthProviderCallback = (error: any, accessToken: string | null) => void; diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/IAuthProviderCallback.js b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/IAuthProviderCallback.js deleted file mode 100644 index 7d56c77..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/IAuthProviderCallback.js +++ /dev/null @@ -1,8 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -export {}; -//# sourceMappingURL=IAuthProviderCallback.js.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/IAuthProviderCallback.js.map b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/IAuthProviderCallback.js.map deleted file mode 100644 index 0bf9a7d..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/IAuthProviderCallback.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"IAuthProviderCallback.js","sourceRoot":"","sources":["../../../src/IAuthProviderCallback.ts"],"names":[],"mappings":"AAAA;;;;;GAKG"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/IAuthenticationProvider.d.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/IAuthenticationProvider.d.ts deleted file mode 100644 index 10de952..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/IAuthenticationProvider.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -import { AuthenticationProviderOptions } from "./IAuthenticationProviderOptions"; -/** - * @interface - * A signature representing Authentication provider - * @property {Function} getAccessToken - The function to get the access token from the authentication provider - */ -export interface AuthenticationProvider { - /** - * To get access token from the authentication provider - * @param {AuthenticationProviderOptions} [authenticationProviderOptions] - The authentication provider options instance - * @returns A promise that resolves to an access token - */ - getAccessToken: (authenticationProviderOptions?: AuthenticationProviderOptions) => Promise; -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/IAuthenticationProvider.js b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/IAuthenticationProvider.js deleted file mode 100644 index 54a9377..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/IAuthenticationProvider.js +++ /dev/null @@ -1,8 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -export {}; -//# sourceMappingURL=IAuthenticationProvider.js.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/IAuthenticationProvider.js.map b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/IAuthenticationProvider.js.map deleted file mode 100644 index f371ae7..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/IAuthenticationProvider.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"IAuthenticationProvider.js","sourceRoot":"","sources":["../../../src/IAuthenticationProvider.ts"],"names":[],"mappings":"AAAA;;;;;GAKG"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/IAuthenticationProviderOptions.d.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/IAuthenticationProviderOptions.d.ts deleted file mode 100644 index 5cbc7ee..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/IAuthenticationProviderOptions.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -/** - * @interface - * A signature represents the Authentication provider options - * @property {string[]} [scopes] - The array of scopes - */ -export interface AuthenticationProviderOptions { - scopes?: string[]; -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/IAuthenticationProviderOptions.js b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/IAuthenticationProviderOptions.js deleted file mode 100644 index b2b2987..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/IAuthenticationProviderOptions.js +++ /dev/null @@ -1,8 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -export {}; -//# sourceMappingURL=IAuthenticationProviderOptions.js.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/IAuthenticationProviderOptions.js.map b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/IAuthenticationProviderOptions.js.map deleted file mode 100644 index df7bd74..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/IAuthenticationProviderOptions.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"IAuthenticationProviderOptions.js","sourceRoot":"","sources":["../../../src/IAuthenticationProviderOptions.ts"],"names":[],"mappings":"AAAA;;;;;GAKG"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/IClientOptions.d.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/IClientOptions.d.ts deleted file mode 100644 index bad9a1a..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/IClientOptions.d.ts +++ /dev/null @@ -1,32 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -import { AuthenticationProvider } from "./IAuthenticationProvider"; -import { FetchOptions } from "./IFetchOptions"; -import { Middleware } from "./middleware/IMiddleware"; -/** - * @interface - * Options for initializing the Graph Client - * @property {Function} [authProvider] - The authentication provider instance - * @property {string} [baseUrl] - Base url that needs to be appended to every request - * @property {boolean} [debugLogging] - The boolean to enable/disable debug logging - * @property {string} [defaultVersion] - The default version that needs to be used while making graph api request - * @property {FetchOptions} [fetchOptions] - The options for fetch request - * @property {Middleware| Middleware[]} [middleware] - The first middleware of the middleware chain or an array of the Middleware handlers - * @property {Set}[customHosts] - A set of custom host names. Should contain hostnames only. - */ -export interface ClientOptions { - authProvider?: AuthenticationProvider; - baseUrl?: string; - debugLogging?: boolean; - defaultVersion?: string; - fetchOptions?: FetchOptions; - middleware?: Middleware | Middleware[]; - /** - * Example - If URL is "https://test_host/v1.0", then set property "customHosts" as "customHosts: Set(["test_host"])" - */ - customHosts?: Set; -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/IClientOptions.js b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/IClientOptions.js deleted file mode 100644 index 3688a6e..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/IClientOptions.js +++ /dev/null @@ -1,8 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -export {}; -//# sourceMappingURL=IClientOptions.js.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/IClientOptions.js.map b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/IClientOptions.js.map deleted file mode 100644 index 2570451..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/IClientOptions.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"IClientOptions.js","sourceRoot":"","sources":["../../../src/IClientOptions.ts"],"names":[],"mappings":"AAAA;;;;;GAKG"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/IContext.d.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/IContext.d.ts deleted file mode 100644 index 9cf1832..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/IContext.d.ts +++ /dev/null @@ -1,27 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -import { FetchOptions } from "./IFetchOptions"; -import { MiddlewareControl } from "./middleware/MiddlewareControl"; -/** - * @interface - * @property {RequestInfo} request - The request url string or the Request instance - * @property {FetchOptions} [options] - The options for the request - * @property {Response} [response] - The response content - * @property {MiddlewareControl} [middlewareControl] - The options for the middleware chain - * @property {Set}[customHosts] - A set of custom host names. Should contain hostnames only. - * - */ -export interface Context { - request: RequestInfo; - options?: FetchOptions; - response?: Response; - middlewareControl?: MiddlewareControl; - /** - * Example - If URL is "https://test_host", then set property "customHosts" as "customHosts: Set(["test_host"])" - */ - customHosts?: Set; -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/IContext.js b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/IContext.js deleted file mode 100644 index 84e6518..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/IContext.js +++ /dev/null @@ -1,8 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -export {}; -//# sourceMappingURL=IContext.js.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/IContext.js.map b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/IContext.js.map deleted file mode 100644 index 6a26661..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/IContext.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"IContext.js","sourceRoot":"","sources":["../../../src/IContext.ts"],"names":[],"mappings":"AAAA;;;;;GAKG"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/IFetchOptions.d.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/IFetchOptions.d.ts deleted file mode 100644 index 750d52d..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/IFetchOptions.d.ts +++ /dev/null @@ -1,32 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -/** - * @interface {@link https://github.com/bitinn/node-fetch/#options} - * Signature to define the fetch request options for node environment - * @property {number} [follow] - node-fetch option: maximum redirect count. 0 to not follow redirect - * @property {number} [compress] - node-fetch option: support gzip/deflate content encoding. false to disable - * @property {number} [size] - node-fetch option: maximum response body size in bytes. 0 to disable - * @property {any} [agent] - node-fetch option: HTTP(S).Agent instance, allows custom proxy, certificate, lookup, family etc. - * @property {number} [highWaterMark] - node-fetch option: maximum number of bytes to store in the internal buffer before ceasing to read from the underlying resource. - * @property {boolean} [insecureHTTPParser] - node-fetch option: use an insecure HTTP parser that accepts invalid HTTP headers when `true`. - */ -export interface NodeFetchInit { - follow?: number; - compress?: boolean; - size?: number; - agent?: any; - highWaterMark?: number; - insecureHTTPParser?: boolean; -} -/** - * @interface - * Signature to define the fetch api options which includes both fetch standard options and also the extended node fetch options - * @extends RequestInit @see {@link https://fetch.spec.whatwg.org/#requestinit} - * @extends NodeFetchInit - */ -export interface FetchOptions extends RequestInit, NodeFetchInit { -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/IFetchOptions.js b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/IFetchOptions.js deleted file mode 100644 index d19b70c..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/IFetchOptions.js +++ /dev/null @@ -1,8 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -export {}; -//# sourceMappingURL=IFetchOptions.js.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/IFetchOptions.js.map b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/IFetchOptions.js.map deleted file mode 100644 index 798ed37..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/IFetchOptions.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"IFetchOptions.js","sourceRoot":"","sources":["../../../src/IFetchOptions.ts"],"names":[],"mappings":"AAAA;;;;;GAKG"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/IGraphRequestCallback.d.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/IGraphRequestCallback.d.ts deleted file mode 100644 index 0c3f4ba..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/IGraphRequestCallback.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -import { GraphError } from "./GraphError"; -/** - * @interface - * Signature to define the GraphRequest callback - * @callback - The anonymous callback function - */ -export type GraphRequestCallback = (error: GraphError, response: any, rawResponse?: any) => void; diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/IGraphRequestCallback.js b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/IGraphRequestCallback.js deleted file mode 100644 index be83006..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/IGraphRequestCallback.js +++ /dev/null @@ -1,8 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -export {}; -//# sourceMappingURL=IGraphRequestCallback.js.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/IGraphRequestCallback.js.map b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/IGraphRequestCallback.js.map deleted file mode 100644 index ac70624..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/IGraphRequestCallback.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"IGraphRequestCallback.js","sourceRoot":"","sources":["../../../src/IGraphRequestCallback.ts"],"names":[],"mappings":"AAAA;;;;;GAKG"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/IOptions.d.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/IOptions.d.ts deleted file mode 100644 index 291789a..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/IOptions.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -import { AuthProvider } from "./IAuthProvider"; -import { FetchOptions } from "./IFetchOptions"; -/** - * @interface - * Options for initializing the Graph Client - * @property {AuthProvider} authProvider - The function to get the authentication token - * @property {string} [baseUrl] - Base url that needs to be appended to every request - * @property {boolean} [debugLogging] - The boolean to enable/disable debug logging - * @property {string} [defaultVersion] - The default version that needs to be used while making graph api request - * @property {FetchOptions} [fetchOptions] - The options for fetch request - * @property {Set}[customHosts] - A set of custom host names. Should contain hostnames only. - */ -export interface Options { - authProvider: AuthProvider; - baseUrl?: string; - debugLogging?: boolean; - defaultVersion?: string; - fetchOptions?: FetchOptions; - /** - * Example - If URL is "https://test_host/v1.0", then set property "customHosts" as "customHosts: Set(["test_host"])" - */ - customHosts?: Set; -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/IOptions.js b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/IOptions.js deleted file mode 100644 index ad64aec..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/IOptions.js +++ /dev/null @@ -1,8 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -export {}; -//# sourceMappingURL=IOptions.js.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/IOptions.js.map b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/IOptions.js.map deleted file mode 100644 index 689ff92..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/IOptions.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"IOptions.js","sourceRoot":"","sources":["../../../src/IOptions.ts"],"names":[],"mappings":"AAAA;;;;;GAKG"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/RequestMethod.d.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/RequestMethod.d.ts deleted file mode 100644 index f4a368e..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/RequestMethod.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -/** - * @enum - * Enum for RequestMethods - * @property {string} GET - The get request type - * @property {string} PATCH - The patch request type - * @property {string} POST - The post request type - * @property {string} PUT - The put request type - * @property {string} DELETE - The delete request type - */ -export declare enum RequestMethod { - GET = "GET", - PATCH = "PATCH", - POST = "POST", - PUT = "PUT", - DELETE = "DELETE" -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/RequestMethod.js b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/RequestMethod.js deleted file mode 100644 index f0c9db1..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/RequestMethod.js +++ /dev/null @@ -1,24 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -/** - * @enum - * Enum for RequestMethods - * @property {string} GET - The get request type - * @property {string} PATCH - The patch request type - * @property {string} POST - The post request type - * @property {string} PUT - The put request type - * @property {string} DELETE - The delete request type - */ -export var RequestMethod; -(function (RequestMethod) { - RequestMethod["GET"] = "GET"; - RequestMethod["PATCH"] = "PATCH"; - RequestMethod["POST"] = "POST"; - RequestMethod["PUT"] = "PUT"; - RequestMethod["DELETE"] = "DELETE"; -})(RequestMethod || (RequestMethod = {})); -//# sourceMappingURL=RequestMethod.js.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/RequestMethod.js.map b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/RequestMethod.js.map deleted file mode 100644 index 16d57be..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/RequestMethod.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"RequestMethod.js","sourceRoot":"","sources":["../../../src/RequestMethod.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;;;;;;;GAQG;AACH,MAAM,CAAN,IAAY,aAMX;AAND,WAAY,aAAa;IACxB,4BAAW,CAAA;IACX,gCAAe,CAAA;IACf,8BAAa,CAAA;IACb,4BAAW,CAAA;IACX,kCAAiB,CAAA;AAClB,CAAC,EANW,aAAa,KAAb,aAAa,QAMxB"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/ResponseType.d.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/ResponseType.d.ts deleted file mode 100644 index cd135df..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/ResponseType.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -/** - * @enum - * Enum for ResponseType values - * @property {string} ARRAYBUFFER - To download response content as an [ArrayBuffer]{@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer} - * @property {string} BLOB - To download content as a [binary/blob] {@link https://developer.mozilla.org/en-US/docs/Web/API/Blob} - * @property {string} DOCUMENT - This downloads content as a document or stream - * @property {string} JSON - To download response content as a json - * @property {string} STREAM - To download response as a [stream]{@link https://nodejs.org/api/stream.html} - * @property {string} TEXT - For downloading response as a text - */ -export declare enum ResponseType { - ARRAYBUFFER = "arraybuffer", - BLOB = "blob", - DOCUMENT = "document", - JSON = "json", - RAW = "raw", - STREAM = "stream", - TEXT = "text" -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/ResponseType.js b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/ResponseType.js deleted file mode 100644 index adf7ee8..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/ResponseType.js +++ /dev/null @@ -1,27 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -/** - * @enum - * Enum for ResponseType values - * @property {string} ARRAYBUFFER - To download response content as an [ArrayBuffer]{@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer} - * @property {string} BLOB - To download content as a [binary/blob] {@link https://developer.mozilla.org/en-US/docs/Web/API/Blob} - * @property {string} DOCUMENT - This downloads content as a document or stream - * @property {string} JSON - To download response content as a json - * @property {string} STREAM - To download response as a [stream]{@link https://nodejs.org/api/stream.html} - * @property {string} TEXT - For downloading response as a text - */ -export var ResponseType; -(function (ResponseType) { - ResponseType["ARRAYBUFFER"] = "arraybuffer"; - ResponseType["BLOB"] = "blob"; - ResponseType["DOCUMENT"] = "document"; - ResponseType["JSON"] = "json"; - ResponseType["RAW"] = "raw"; - ResponseType["STREAM"] = "stream"; - ResponseType["TEXT"] = "text"; -})(ResponseType || (ResponseType = {})); -//# sourceMappingURL=ResponseType.js.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/ResponseType.js.map b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/ResponseType.js.map deleted file mode 100644 index 1c8d332..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/ResponseType.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ResponseType.js","sourceRoot":"","sources":["../../../src/ResponseType.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;;;;;;;;GASG;AAEH,MAAM,CAAN,IAAY,YAQX;AARD,WAAY,YAAY;IACvB,2CAA2B,CAAA;IAC3B,6BAAa,CAAA;IACb,qCAAqB,CAAA;IACrB,6BAAa,CAAA;IACb,2BAAW,CAAA;IACX,iCAAiB,CAAA;IACjB,6BAAa,CAAA;AACd,CAAC,EARW,YAAY,KAAZ,YAAY,QAQvB"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/ValidatePolyFilling.d.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/ValidatePolyFilling.d.ts deleted file mode 100644 index cdeb15a..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/ValidatePolyFilling.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -/** - * @constant - * @function - * Validates availability of Promise and fetch in global context - * @returns The true in case the Promise and fetch available, otherwise throws error - */ -export declare const validatePolyFilling: () => boolean; diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/ValidatePolyFilling.js b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/ValidatePolyFilling.js deleted file mode 100644 index 368af59..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/ValidatePolyFilling.js +++ /dev/null @@ -1,31 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -/** - * @constant - * @function - * Validates availability of Promise and fetch in global context - * @returns The true in case the Promise and fetch available, otherwise throws error - */ -export const validatePolyFilling = () => { - if (typeof Promise === "undefined" && typeof fetch === "undefined") { - const error = new Error("Library cannot function without Promise and fetch. So, please provide polyfill for them."); - error.name = "PolyFillNotAvailable"; - throw error; - } - else if (typeof Promise === "undefined") { - const error = new Error("Library cannot function without Promise. So, please provide polyfill for it."); - error.name = "PolyFillNotAvailable"; - throw error; - } - else if (typeof fetch === "undefined") { - const error = new Error("Library cannot function without fetch. So, please provide polyfill for it."); - error.name = "PolyFillNotAvailable"; - throw error; - } - return true; -}; -//# sourceMappingURL=ValidatePolyFilling.js.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/ValidatePolyFilling.js.map b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/ValidatePolyFilling.js.map deleted file mode 100644 index 9d06d97..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/ValidatePolyFilling.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ValidatePolyFilling.js","sourceRoot":"","sources":["../../../src/ValidatePolyFilling.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;;;;GAKG;AAEH,MAAM,CAAC,MAAM,mBAAmB,GAAG,GAAY,EAAE;IAChD,IAAI,OAAO,OAAO,KAAK,WAAW,IAAI,OAAO,KAAK,KAAK,WAAW,EAAE;QACnE,MAAM,KAAK,GAAG,IAAI,KAAK,CAAC,0FAA0F,CAAC,CAAC;QACpH,KAAK,CAAC,IAAI,GAAG,sBAAsB,CAAC;QACpC,MAAM,KAAK,CAAC;KACZ;SAAM,IAAI,OAAO,OAAO,KAAK,WAAW,EAAE;QAC1C,MAAM,KAAK,GAAG,IAAI,KAAK,CAAC,8EAA8E,CAAC,CAAC;QACxG,KAAK,CAAC,IAAI,GAAG,sBAAsB,CAAC;QACpC,MAAM,KAAK,CAAC;KACZ;SAAM,IAAI,OAAO,KAAK,KAAK,WAAW,EAAE;QACxC,MAAM,KAAK,GAAG,IAAI,KAAK,CAAC,4EAA4E,CAAC,CAAC;QACtG,KAAK,CAAC,IAAI,GAAG,sBAAsB,CAAC;QACpC,MAAM,KAAK,CAAC;KACZ;IACD,OAAO,IAAI,CAAC;AACb,CAAC,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/Version.d.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/Version.d.ts deleted file mode 100644 index d22e6f3..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/Version.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -/** - * @module Version - */ -export declare const PACKAGE_VERSION = "3.0.7"; diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/Version.js b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/Version.js deleted file mode 100644 index 307bbf6..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/Version.js +++ /dev/null @@ -1,13 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -// THIS FILE IS AUTO GENERATED -// ANY CHANGES WILL BE LOST DURING BUILD -/** - * @module Version - */ -export const PACKAGE_VERSION = "3.0.7"; -//# sourceMappingURL=Version.js.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/Version.js.map b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/Version.js.map deleted file mode 100644 index 06f3cb3..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/Version.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Version.js","sourceRoot":"","sources":["../../../src/Version.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,8BAA8B;AAC9B,wCAAwC;AAExC;;GAEG;AAEH,MAAM,CAAC,MAAM,eAAe,GAAG,OAAO,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/authentication/azureTokenCredentials/ITokenCredentialAuthenticationProviderOptions.d.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/authentication/azureTokenCredentials/ITokenCredentialAuthenticationProviderOptions.d.ts deleted file mode 100644 index 408e671..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/authentication/azureTokenCredentials/ITokenCredentialAuthenticationProviderOptions.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -import { GetTokenOptions } from "@azure/identity"; -import { AuthenticationProviderOptions } from "../../IAuthenticationProviderOptions"; -/** - * @interface - * A signature represents the Authentication provider options for Token Credentials - * @property {getTokenOptions} [GetTokenOptions] - Defines options for TokenCredential.getToken. - */ -export interface TokenCredentialAuthenticationProviderOptions extends AuthenticationProviderOptions { - getTokenOptions?: GetTokenOptions; -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/authentication/azureTokenCredentials/ITokenCredentialAuthenticationProviderOptions.js b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/authentication/azureTokenCredentials/ITokenCredentialAuthenticationProviderOptions.js deleted file mode 100644 index 35f3999..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/authentication/azureTokenCredentials/ITokenCredentialAuthenticationProviderOptions.js +++ /dev/null @@ -1,2 +0,0 @@ -export {}; -//# sourceMappingURL=ITokenCredentialAuthenticationProviderOptions.js.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/authentication/azureTokenCredentials/ITokenCredentialAuthenticationProviderOptions.js.map b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/authentication/azureTokenCredentials/ITokenCredentialAuthenticationProviderOptions.js.map deleted file mode 100644 index 9b0e82f..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/authentication/azureTokenCredentials/ITokenCredentialAuthenticationProviderOptions.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ITokenCredentialAuthenticationProviderOptions.js","sourceRoot":"","sources":["../../../../../src/authentication/azureTokenCredentials/ITokenCredentialAuthenticationProviderOptions.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/authentication/azureTokenCredentials/TokenCredentialAuthenticationProvider.d.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/authentication/azureTokenCredentials/TokenCredentialAuthenticationProvider.d.ts deleted file mode 100644 index 1439e1b..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/authentication/azureTokenCredentials/TokenCredentialAuthenticationProvider.d.ts +++ /dev/null @@ -1,48 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -import { TokenCredential } from "@azure/identity"; -import { AuthenticationProvider } from "../../IAuthenticationProvider"; -import { TokenCredentialAuthenticationProviderOptions } from "./ITokenCredentialAuthenticationProviderOptions"; -/** - * @module TokenCredentialAuthenticationProvider - */ -/** - * @class - * Class representing TokenCredentialAuthenticationProvider - * This feature is introduced in Version 3.0.0 - * @extends AuthenticationProvider - * Reference - https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/identity/identity/README.md - */ -export declare class TokenCredentialAuthenticationProvider implements AuthenticationProvider { - /** - * @private - * A member holding an instance of @azure/identity TokenCredential - */ - private tokenCredential; - /** - * @private - * A member holding an instance of TokenCredentialAuthenticationProviderOptions - */ - private authenticationProviderOptions; - /** - * @public - * @constructor - * Creates an instance of TokenCredentialAuthenticationProvider - * @param {TokenCredential} tokenCredential - An instance of @azure/identity TokenCredential - * @param {TokenCredentialAuthenticationProviderOptions} authenticationProviderOptions - An instance of TokenCredentialAuthenticationProviderOptions - * @returns An instance of TokenCredentialAuthenticationProvider - */ - constructor(tokenCredential: TokenCredential, authenticationProviderOptions: TokenCredentialAuthenticationProviderOptions); - /** - * @public - * @async - * To get the access token - * @param {TokenCredentialAuthenticationProviderOptions} authenticationProviderOptions - The authentication provider options object - * @returns The promise that resolves to an access token - */ - getAccessToken(): Promise; -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/authentication/azureTokenCredentials/TokenCredentialAuthenticationProvider.js b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/authentication/azureTokenCredentials/TokenCredentialAuthenticationProvider.js deleted file mode 100644 index efb7295..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/authentication/azureTokenCredentials/TokenCredentialAuthenticationProvider.js +++ /dev/null @@ -1,64 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -import { __awaiter } from "tslib"; -import { GraphClientError } from "../../GraphClientError"; -/** - * @module TokenCredentialAuthenticationProvider - */ -/** - * @class - * Class representing TokenCredentialAuthenticationProvider - * This feature is introduced in Version 3.0.0 - * @extends AuthenticationProvider - * Reference - https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/identity/identity/README.md - */ -export class TokenCredentialAuthenticationProvider { - /** - * @public - * @constructor - * Creates an instance of TokenCredentialAuthenticationProvider - * @param {TokenCredential} tokenCredential - An instance of @azure/identity TokenCredential - * @param {TokenCredentialAuthenticationProviderOptions} authenticationProviderOptions - An instance of TokenCredentialAuthenticationProviderOptions - * @returns An instance of TokenCredentialAuthenticationProvider - */ - constructor(tokenCredential, authenticationProviderOptions) { - if (!tokenCredential) { - throw new GraphClientError("Please pass a token credential object to the TokenCredentialAuthenticationProvider class constructor"); - } - if (!authenticationProviderOptions) { - throw new GraphClientError("Please pass the TokenCredentialAuthenticationProviderOptions with scopes to the TokenCredentialAuthenticationProvider class constructor"); - } - this.authenticationProviderOptions = authenticationProviderOptions; - this.tokenCredential = tokenCredential; - } - /** - * @public - * @async - * To get the access token - * @param {TokenCredentialAuthenticationProviderOptions} authenticationProviderOptions - The authentication provider options object - * @returns The promise that resolves to an access token - */ - getAccessToken() { - return __awaiter(this, void 0, void 0, function* () { - const scopes = this.authenticationProviderOptions.scopes; - const error = new GraphClientError(); - if (!scopes || scopes.length === 0) { - error.name = "Empty Scopes"; - error.message = "Scopes cannot be empty, Please provide scopes"; - throw error; - } - const response = yield this.tokenCredential.getToken(scopes, this.authenticationProviderOptions.getTokenOptions); - if (response) { - return response.token; - } - error.message = "Cannot retrieve accessToken from the Token Credential object"; - error.name = "Access token is undefined"; - throw error; - }); - } -} -//# sourceMappingURL=TokenCredentialAuthenticationProvider.js.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/authentication/azureTokenCredentials/TokenCredentialAuthenticationProvider.js.map b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/authentication/azureTokenCredentials/TokenCredentialAuthenticationProvider.js.map deleted file mode 100644 index 03edc5d..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/authentication/azureTokenCredentials/TokenCredentialAuthenticationProvider.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"TokenCredentialAuthenticationProvider.js","sourceRoot":"","sources":["../../../../../src/authentication/azureTokenCredentials/TokenCredentialAuthenticationProvider.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAIH,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAI1D;;GAEG;AAEH;;;;;;GAMG;AACH,MAAM,OAAO,qCAAqC;IAajD;;;;;;;OAOG;IACH,YAAmB,eAAgC,EAAE,6BAA2E;QAC/H,IAAI,CAAC,eAAe,EAAE;YACrB,MAAM,IAAI,gBAAgB,CAAC,sGAAsG,CAAC,CAAC;SACnI;QACD,IAAI,CAAC,6BAA6B,EAAE;YACnC,MAAM,IAAI,gBAAgB,CAAC,yIAAyI,CAAC,CAAC;SACtK;QACD,IAAI,CAAC,6BAA6B,GAAG,6BAA6B,CAAC;QACnE,IAAI,CAAC,eAAe,GAAG,eAAe,CAAC;IACxC,CAAC;IAED;;;;;;OAMG;IACU,cAAc;;YAC1B,MAAM,MAAM,GAAG,IAAI,CAAC,6BAA6B,CAAC,MAAM,CAAC;YACzD,MAAM,KAAK,GAAG,IAAI,gBAAgB,EAAE,CAAC;YAErC,IAAI,CAAC,MAAM,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE;gBACnC,KAAK,CAAC,IAAI,GAAG,cAAc,CAAC;gBAC5B,KAAK,CAAC,OAAO,GAAG,+CAA+C,CAAC;gBAChE,MAAM,KAAK,CAAC;aACZ;YACD,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,eAAe,CAAC,QAAQ,CAAC,MAAM,EAAE,IAAI,CAAC,6BAA6B,CAAC,eAAe,CAAC,CAAC;YACjH,IAAI,QAAQ,EAAE;gBACb,OAAO,QAAQ,CAAC,KAAK,CAAC;aACtB;YACD,KAAK,CAAC,OAAO,GAAG,8DAA8D,CAAC;YAC/E,KAAK,CAAC,IAAI,GAAG,2BAA2B,CAAC;YACzC,MAAM,KAAK,CAAC;QACb,CAAC;KAAA;CACD"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/authentication/azureTokenCredentials/index.d.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/authentication/azureTokenCredentials/index.d.ts deleted file mode 100644 index 6d672ef..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/authentication/azureTokenCredentials/index.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -export { TokenCredentialAuthenticationProviderOptions } from "./ITokenCredentialAuthenticationProviderOptions"; -export { TokenCredentialAuthenticationProvider } from "./TokenCredentialAuthenticationProvider"; diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/authentication/azureTokenCredentials/index.js b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/authentication/azureTokenCredentials/index.js deleted file mode 100644 index 7c2d026..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/authentication/azureTokenCredentials/index.js +++ /dev/null @@ -1,2 +0,0 @@ -export { TokenCredentialAuthenticationProvider } from "./TokenCredentialAuthenticationProvider"; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/authentication/azureTokenCredentials/index.js.map b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/authentication/azureTokenCredentials/index.js.map deleted file mode 100644 index 292a2a6..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/authentication/azureTokenCredentials/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/authentication/azureTokenCredentials/index.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,qCAAqC,EAAE,MAAM,yCAAyC,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/authentication/msal-browser/AuthCodeMSALBrowserAuthenticationProvider.d.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/authentication/msal-browser/AuthCodeMSALBrowserAuthenticationProvider.d.ts deleted file mode 100644 index 488486e..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/authentication/msal-browser/AuthCodeMSALBrowserAuthenticationProvider.d.ts +++ /dev/null @@ -1,38 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -/** - * @module AuthCodeMSALBrowserAuthenticationProvider - */ -import { PublicClientApplication } from "@azure/msal-browser"; -import { AuthenticationProvider } from "../../IAuthenticationProvider"; -import { AuthCodeMSALBrowserAuthenticationProviderOptions } from "../msalOptions/MSALAuthenticationProviderOptions"; -/** - * an AuthenticationProvider implementation supporting msal-browser library. - * This feature is introduced in Version 3.0.0 - * @class - * @extends AuthenticationProvider - */ -export declare class AuthCodeMSALBrowserAuthenticationProvider implements AuthenticationProvider { - private publicClientApplication; - private options; - /** - * @public - * @constructor - * Creates an instance of ImplicitMSALAuthenticationProvider - * @param {PublicClientApplication} msalApplication - An instance of MSAL PublicClientApplication - * @param {AuthCodeMSALBrowserAuthenticationProviderOptions} options - An instance of MSALAuthenticationProviderOptions - * @returns An instance of ImplicitMSALAuthenticationProvider - */ - constructor(publicClientApplication: PublicClientApplication, options: AuthCodeMSALBrowserAuthenticationProviderOptions); - /** - * @public - * @async - * To get the access token for the request - * @returns The promise that resolves to an access token - */ - getAccessToken(): Promise; -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/authentication/msal-browser/AuthCodeMSALBrowserAuthenticationProvider.js b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/authentication/msal-browser/AuthCodeMSALBrowserAuthenticationProvider.js deleted file mode 100644 index 2edeac3..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/authentication/msal-browser/AuthCodeMSALBrowserAuthenticationProvider.js +++ /dev/null @@ -1,80 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -import { __awaiter } from "tslib"; -/** - * @module AuthCodeMSALBrowserAuthenticationProvider - */ -import { InteractionRequiredAuthError, InteractionType } from "@azure/msal-browser"; -import { GraphClientError } from "../../GraphClientError"; -/** - * an AuthenticationProvider implementation supporting msal-browser library. - * This feature is introduced in Version 3.0.0 - * @class - * @extends AuthenticationProvider - */ -export class AuthCodeMSALBrowserAuthenticationProvider { - /** - * @public - * @constructor - * Creates an instance of ImplicitMSALAuthenticationProvider - * @param {PublicClientApplication} msalApplication - An instance of MSAL PublicClientApplication - * @param {AuthCodeMSALBrowserAuthenticationProviderOptions} options - An instance of MSALAuthenticationProviderOptions - * @returns An instance of ImplicitMSALAuthenticationProvider - */ - constructor(publicClientApplication, options) { - this.publicClientApplication = publicClientApplication; - this.options = options; - if (!options || !publicClientApplication) { - throw new GraphClientError("Please pass valid PublicClientApplication instance and AuthCodeMSALBrowserAuthenticationProviderOptions instance to instantiate MSALBrowserAuthenticationProvider"); - } - } - /** - * @public - * @async - * To get the access token for the request - * @returns The promise that resolves to an access token - */ - getAccessToken() { - return __awaiter(this, void 0, void 0, function* () { - const scopes = this.options && this.options.scopes; - const account = this.options && this.options.account; - const error = new GraphClientError(); - if (!scopes || scopes.length === 0) { - error.name = "Empty Scopes"; - error.message = "Scopes cannot be empty, Please provide scopes"; - throw error; - } - try { - const response = yield this.publicClientApplication.acquireTokenSilent({ - scopes, - account, - }); - if (!response || !response.accessToken) { - error.name = "Access token is undefined"; - error.message = "Received empty access token from PublicClientApplication"; - throw error; - } - return response.accessToken; - } - catch (error) { - if (error instanceof InteractionRequiredAuthError) { - if (this.options.interactionType === InteractionType.Redirect) { - this.publicClientApplication.acquireTokenRedirect({ scopes }); - } - else if (this.options.interactionType === InteractionType.Popup) { - const response = yield this.publicClientApplication.acquireTokenPopup({ scopes }); - return response.accessToken; - } - } - else { - throw error; - } - } - }); - } -} -//# sourceMappingURL=AuthCodeMSALBrowserAuthenticationProvider.js.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/authentication/msal-browser/AuthCodeMSALBrowserAuthenticationProvider.js.map b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/authentication/msal-browser/AuthCodeMSALBrowserAuthenticationProvider.js.map deleted file mode 100644 index 4e85ea0..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/authentication/msal-browser/AuthCodeMSALBrowserAuthenticationProvider.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AuthCodeMSALBrowserAuthenticationProvider.js","sourceRoot":"","sources":["../../../../../src/authentication/msal-browser/AuthCodeMSALBrowserAuthenticationProvider.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH;;GAEG;AAEH,OAAO,EAAwB,4BAA4B,EAAE,eAAe,EAA2B,MAAM,qBAAqB,CAAC;AAEnI,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAI1D;;;;;GAKG;AACH,MAAM,OAAO,yCAAyC;IACrD;;;;;;;OAOG;IACH,YAA2B,uBAAgD,EAAU,OAAyD;QAAnH,4BAAuB,GAAvB,uBAAuB,CAAyB;QAAU,YAAO,GAAP,OAAO,CAAkD;QAC7I,IAAI,CAAC,OAAO,IAAI,CAAC,uBAAuB,EAAE;YACzC,MAAM,IAAI,gBAAgB,CAAC,mKAAmK,CAAC,CAAC;SAChM;IACF,CAAC;IAED;;;;;OAKG;IACU,cAAc;;YAC1B,MAAM,MAAM,GAAG,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC;YACnD,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC;YACrD,MAAM,KAAK,GAAG,IAAI,gBAAgB,EAAE,CAAC;YACrC,IAAI,CAAC,MAAM,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE;gBACnC,KAAK,CAAC,IAAI,GAAG,cAAc,CAAC;gBAC5B,KAAK,CAAC,OAAO,GAAG,+CAA+C,CAAC;gBAChE,MAAM,KAAK,CAAC;aACZ;YACD,IAAI;gBACH,MAAM,QAAQ,GAAyB,MAAM,IAAI,CAAC,uBAAuB,CAAC,kBAAkB,CAAC;oBAC5F,MAAM;oBACN,OAAO;iBACP,CAAC,CAAC;gBACH,IAAI,CAAC,QAAQ,IAAI,CAAC,QAAQ,CAAC,WAAW,EAAE;oBACvC,KAAK,CAAC,IAAI,GAAG,2BAA2B,CAAC;oBACzC,KAAK,CAAC,OAAO,GAAG,0DAA0D,CAAC;oBAC3E,MAAM,KAAK,CAAC;iBACZ;gBACD,OAAO,QAAQ,CAAC,WAAW,CAAC;aAC5B;YAAC,OAAO,KAAK,EAAE;gBACf,IAAI,KAAK,YAAY,4BAA4B,EAAE;oBAClD,IAAI,IAAI,CAAC,OAAO,CAAC,eAAe,KAAK,eAAe,CAAC,QAAQ,EAAE;wBAC9D,IAAI,CAAC,uBAAuB,CAAC,oBAAoB,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC;qBAC9D;yBAAM,IAAI,IAAI,CAAC,OAAO,CAAC,eAAe,KAAK,eAAe,CAAC,KAAK,EAAE;wBAClE,MAAM,QAAQ,GAAyB,MAAM,IAAI,CAAC,uBAAuB,CAAC,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC;wBACxG,OAAO,QAAQ,CAAC,WAAW,CAAC;qBAC5B;iBACD;qBAAM;oBACN,MAAM,KAAK,CAAC;iBACZ;aACD;QACF,CAAC;KAAA;CACD"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/authentication/msal-browser/index.d.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/authentication/msal-browser/index.d.ts deleted file mode 100644 index a2f66ed..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/authentication/msal-browser/index.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -export { AuthCodeMSALBrowserAuthenticationProvider } from "./AuthCodeMSALBrowserAuthenticationProvider"; diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/authentication/msal-browser/index.js b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/authentication/msal-browser/index.js deleted file mode 100644 index da42299..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/authentication/msal-browser/index.js +++ /dev/null @@ -1,8 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -export { AuthCodeMSALBrowserAuthenticationProvider } from "./AuthCodeMSALBrowserAuthenticationProvider"; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/authentication/msal-browser/index.js.map b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/authentication/msal-browser/index.js.map deleted file mode 100644 index 0097911..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/authentication/msal-browser/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/authentication/msal-browser/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,yCAAyC,EAAE,MAAM,6CAA6C,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/authentication/msalOptions/MSALAuthenticationProviderOptions.d.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/authentication/msalOptions/MSALAuthenticationProviderOptions.d.ts deleted file mode 100644 index 292b014..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/authentication/msalOptions/MSALAuthenticationProviderOptions.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -/** - * @module MSALAuthenticationProviderOptions - */ -import { AccountInfo, InteractionType } from "@azure/msal-browser"; -import { AuthenticationProviderOptions } from "../../IAuthenticationProviderOptions"; -export interface AuthCodeMSALBrowserAuthenticationProviderOptions extends AuthenticationProviderOptions { - scopes: string[]; - account: AccountInfo; - interactionType: InteractionType; -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/authentication/msalOptions/MSALAuthenticationProviderOptions.js b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/authentication/msalOptions/MSALAuthenticationProviderOptions.js deleted file mode 100644 index 64e5eac..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/authentication/msalOptions/MSALAuthenticationProviderOptions.js +++ /dev/null @@ -1,8 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -export {}; -//# sourceMappingURL=MSALAuthenticationProviderOptions.js.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/authentication/msalOptions/MSALAuthenticationProviderOptions.js.map b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/authentication/msalOptions/MSALAuthenticationProviderOptions.js.map deleted file mode 100644 index 506aad7..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/authentication/msalOptions/MSALAuthenticationProviderOptions.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"MSALAuthenticationProviderOptions.js","sourceRoot":"","sources":["../../../../../src/authentication/msalOptions/MSALAuthenticationProviderOptions.ts"],"names":[],"mappings":"AAAA;;;;;GAKG"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/browser/index.d.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/browser/index.d.ts deleted file mode 100644 index c9ad7ee..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/browser/index.d.ts +++ /dev/null @@ -1,48 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -/// -export { BatchRequestStep, BatchRequestData, BatchRequestContent, RequestData, BatchRequestBody } from "../content/BatchRequestContent"; -export { BatchResponseBody, BatchResponseContent } from "../content/BatchResponseContent"; -export { AuthenticationHandler } from "../middleware/AuthenticationHandler"; -export { HTTPMessageHandler } from "../middleware/HTTPMessageHandler"; -export { Middleware } from "../middleware/IMiddleware"; -export { RetryHandler } from "../middleware/RetryHandler"; -export { RedirectHandler } from "../middleware/RedirectHandler"; -export { TelemetryHandler } from "../middleware/TelemetryHandler"; -export { MiddlewareFactory } from "../middleware/MiddlewareFactory"; -export { AuthenticationHandlerOptions } from "../middleware/options/AuthenticationHandlerOptions"; -export { MiddlewareOptions } from "../middleware/options/IMiddlewareOptions"; -export { ShouldRetry, RetryHandlerOptions } from "../middleware/options/RetryHandlerOptions"; -export { ShouldRedirect, RedirectHandlerOptions } from "../middleware/options/RedirectHandlerOptions"; -export { FeatureUsageFlag, TelemetryHandlerOptions } from "../middleware/options/TelemetryHandlerOptions"; -export { ChaosHandlerOptions } from "../middleware/options/ChaosHandlerOptions"; -export { ChaosStrategy } from "../middleware/options/ChaosStrategy"; -export { ChaosHandler } from "../middleware/ChaosHandler"; -export { SliceType, LargeFileUploadTaskOptions, LargeFileUploadTask, LargeFileUploadSession, FileObject } from "../tasks/LargeFileUploadTask"; -export { OneDriveLargeFileUploadTask, OneDriveLargeFileUploadOptions } from "../tasks/OneDriveLargeFileUploadTask"; -export { getValidRangeSize } from "../tasks/OneDriveLargeFileUploadTaskUtil"; -export { StreamUpload } from "../tasks/FileUploadTask/FileObjectClasses/StreamUpload"; -export { FileUpload } from "../tasks/FileUploadTask/FileObjectClasses/FileUpload"; -export { UploadResult } from "../tasks/FileUploadTask/UploadResult"; -export { UploadEventHandlers } from "../tasks/FileUploadTask/Interfaces/IUploadEventHandlers"; -export { Range } from "../tasks/FileUploadTask/Range"; -export { PageIteratorCallback, PageIterator, PageCollection, GraphRequestOptions } from "../tasks/PageIterator"; -export { Client } from "../Client"; -export { CustomAuthenticationProvider } from "../CustomAuthenticationProvider"; -export { GraphError } from "../GraphError"; -export { GraphClientError } from "../GraphClientError"; -export { GraphRequest } from "../GraphRequest"; -export { AuthProvider } from "../IAuthProvider"; -export { AuthenticationProvider } from "../IAuthenticationProvider"; -export { AuthenticationProviderOptions } from "../IAuthenticationProviderOptions"; -export { AuthProviderCallback } from "../IAuthProviderCallback"; -export { ClientOptions } from "../IClientOptions"; -export { Context } from "../IContext"; -export { NodeFetchInit, FetchOptions } from "../IFetchOptions"; -export { GraphRequestCallback } from "../IGraphRequestCallback"; -export { Options } from "../IOptions"; -export { ResponseType } from "../ResponseType"; diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/browser/index.js b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/browser/index.js deleted file mode 100644 index ff9e1c6..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/browser/index.js +++ /dev/null @@ -1,38 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -// eslint-disable-next-line @typescript-eslint/triple-slash-reference -/// -export { BatchRequestContent } from "../content/BatchRequestContent"; -export { BatchResponseContent } from "../content/BatchResponseContent"; -export { AuthenticationHandler } from "../middleware/AuthenticationHandler"; -export { HTTPMessageHandler } from "../middleware/HTTPMessageHandler"; -export { RetryHandler } from "../middleware/RetryHandler"; -export { RedirectHandler } from "../middleware/RedirectHandler"; -export { TelemetryHandler } from "../middleware/TelemetryHandler"; -export { MiddlewareFactory } from "../middleware/MiddlewareFactory"; -export { AuthenticationHandlerOptions } from "../middleware/options/AuthenticationHandlerOptions"; -export { RetryHandlerOptions } from "../middleware/options/RetryHandlerOptions"; -export { RedirectHandlerOptions } from "../middleware/options/RedirectHandlerOptions"; -export { FeatureUsageFlag, TelemetryHandlerOptions } from "../middleware/options/TelemetryHandlerOptions"; -export { ChaosHandlerOptions } from "../middleware/options/ChaosHandlerOptions"; -export { ChaosStrategy } from "../middleware/options/ChaosStrategy"; -export { ChaosHandler } from "../middleware/ChaosHandler"; -export { LargeFileUploadTask } from "../tasks/LargeFileUploadTask"; -export { OneDriveLargeFileUploadTask } from "../tasks/OneDriveLargeFileUploadTask"; -export { getValidRangeSize } from "../tasks/OneDriveLargeFileUploadTaskUtil"; -export { StreamUpload } from "../tasks/FileUploadTask/FileObjectClasses/StreamUpload"; -export { FileUpload } from "../tasks/FileUploadTask/FileObjectClasses/FileUpload"; -export { UploadResult } from "../tasks/FileUploadTask/UploadResult"; -export { Range } from "../tasks/FileUploadTask/Range"; -export { PageIterator } from "../tasks/PageIterator"; -export { Client } from "../Client"; -export { CustomAuthenticationProvider } from "../CustomAuthenticationProvider"; -export { GraphError } from "../GraphError"; -export { GraphClientError } from "../GraphClientError"; -export { GraphRequest } from "../GraphRequest"; -export { ResponseType } from "../ResponseType"; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/browser/index.js.map b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/browser/index.js.map deleted file mode 100644 index a5ee246..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/browser/index.js.map +++ /dev/null @@ -1 +0,0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CAAsC,CAAC;AAEpE,OAAO,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAC;AACtD,OAAO,EAAwB,YAAY,EAAuC,MAAM,uBAAuB,CAAC;AAEhH,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACnC,OAAO,EAAE,4BAA4B,EAAE,MAAM,iCAAiC,CAAC;AAC/E,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAU/C,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/content/BatchRequestContent.d.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/content/BatchRequestContent.d.ts deleted file mode 100644 index a73e013..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/content/BatchRequestContent.d.ts +++ /dev/null @@ -1,144 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -/** - * @interface - * Signature representing BatchRequestStep data - * @property {string} id - Unique identity for the request, Should not be an empty string - * @property {string[]} [dependsOn] - Array of dependencies - * @property {Request} request - The Request object - */ -export interface BatchRequestStep { - id: string; - dependsOn?: string[]; - request: Request; -} -/** - * @interface - * Signature representing single request in a Batching - * @extends RequestInit - * @see {@link https://github.com/Microsoft/TypeScript/blob/master/lib/lib.dom.d.ts#L1337} and {@link https://fetch.spec.whatwg.org/#requestinit} - * - * @property {string} url - The url value of the request - */ -export interface RequestData extends RequestInit { - url: string; -} -/** - * @interface - * Signature representing batch request data - * @property {string} id - Unique identity for the request, Should not be an empty string - * @property {string[]} [dependsOn] - Array of dependencies - */ -export interface BatchRequestData extends RequestData { - id: string; - dependsOn?: string[]; -} -/** - * @interface - * Signature representing batch request body - * @property {BatchRequestData[]} requests - Array of request data, a json representation of requests for batch - */ -export interface BatchRequestBody { - requests: BatchRequestData[]; -} -/** - * @class - * Class for handling BatchRequestContent - */ -export declare class BatchRequestContent { - /** - * @private - * @static - * Limit for number of requests {@link - https://developer.microsoft.com/en-us/graph/docs/concepts/known_issues#json-batching} - */ - private static requestLimit; - /** - * @public - * To keep track of requests, key will be id of the request and value will be the request json - */ - requests: Map; - /** - * @private - * @static - * Validates the dependency chain of the requests - * - * Note: - * Individual requests can depend on other individual requests. Currently, requests can only depend on a single other request, and must follow one of these three patterns: - * 1. Parallel - no individual request states a dependency in the dependsOn property. - * 2. Serial - all individual requests depend on the previous individual request. - * 3. Same - all individual requests that state a dependency in the dependsOn property, state the same dependency. - * As JSON batching matures, these limitations will be removed. - * @see {@link https://developer.microsoft.com/en-us/graph/docs/concepts/known_issues#json-batching} - * - * @param {Map} requests - The map of requests. - * @returns The boolean indicating the validation status - */ - private static validateDependencies; - /** - * @private - * @static - * @async - * Converts Request Object instance to a JSON - * @param {IsomorphicRequest} request - The IsomorphicRequest Object instance - * @returns A promise that resolves to JSON representation of a request - */ - private static getRequestData; - /** - * @private - * @static - * @async - * Gets the body of a Request object instance - * @param {IsomorphicRequest} request - The IsomorphicRequest object instance - * @returns The Promise that resolves to a body value of a Request - */ - private static getRequestBody; - /** - * @public - * @constructor - * Constructs a BatchRequestContent instance - * @param {BatchRequestStep[]} [requests] - Array of requests value - * @returns An instance of a BatchRequestContent - */ - constructor(requests?: BatchRequestStep[]); - /** - * @public - * Adds a request to the batch request content - * @param {BatchRequestStep} request - The request value - * @returns The id of the added request - */ - addRequest(request: BatchRequestStep): string; - /** - * @public - * Removes request from the batch payload and its dependencies from all dependents - * @param {string} requestId - The id of a request that needs to be removed - * @returns The boolean indicating removed status - */ - removeRequest(requestId: string): boolean; - /** - * @public - * @async - * Serialize content from BatchRequestContent instance - * @returns The body content to make batch request - */ - getContent(): Promise; - /** - * @public - * Adds a dependency for a given dependent request - * @param {string} dependentId - The id of the dependent request - * @param {string} [dependencyId] - The id of the dependency request, if not specified the preceding request will be considered as a dependency - * @returns Nothing - */ - addDependency(dependentId: string, dependencyId?: string): void; - /** - * @public - * Removes a dependency for a given dependent request id - * @param {string} dependentId - The id of the dependent request - * @param {string} [dependencyId] - The id of the dependency request, if not specified will remove all the dependencies of that request - * @returns The boolean indicating removed status - */ - removeDependency(dependentId: string, dependencyId?: string): boolean; -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/content/BatchRequestContent.js b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/content/BatchRequestContent.js deleted file mode 100644 index 71aec79..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/content/BatchRequestContent.js +++ /dev/null @@ -1,417 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -import { __awaiter } from "tslib"; -/** - * @module BatchRequestContent - */ -import { RequestMethod } from "../RequestMethod"; -/** - * @class - * Class for handling BatchRequestContent - */ -export class BatchRequestContent { - /** - * @private - * @static - * Validates the dependency chain of the requests - * - * Note: - * Individual requests can depend on other individual requests. Currently, requests can only depend on a single other request, and must follow one of these three patterns: - * 1. Parallel - no individual request states a dependency in the dependsOn property. - * 2. Serial - all individual requests depend on the previous individual request. - * 3. Same - all individual requests that state a dependency in the dependsOn property, state the same dependency. - * As JSON batching matures, these limitations will be removed. - * @see {@link https://developer.microsoft.com/en-us/graph/docs/concepts/known_issues#json-batching} - * - * @param {Map} requests - The map of requests. - * @returns The boolean indicating the validation status - */ - static validateDependencies(requests) { - const isParallel = (reqs) => { - const iterator = reqs.entries(); - let cur = iterator.next(); - while (!cur.done) { - const curReq = cur.value[1]; - if (curReq.dependsOn !== undefined && curReq.dependsOn.length > 0) { - return false; - } - cur = iterator.next(); - } - return true; - }; - const isSerial = (reqs) => { - const iterator = reqs.entries(); - let cur = iterator.next(); - const firstRequest = cur.value[1]; - if (firstRequest.dependsOn !== undefined && firstRequest.dependsOn.length > 0) { - return false; - } - let prev = cur; - cur = iterator.next(); - while (!cur.done) { - const curReq = cur.value[1]; - if (curReq.dependsOn === undefined || curReq.dependsOn.length !== 1 || curReq.dependsOn[0] !== prev.value[1].id) { - return false; - } - prev = cur; - cur = iterator.next(); - } - return true; - }; - const isSame = (reqs) => { - const iterator = reqs.entries(); - let cur = iterator.next(); - const firstRequest = cur.value[1]; - let dependencyId; - if (firstRequest.dependsOn === undefined || firstRequest.dependsOn.length === 0) { - dependencyId = firstRequest.id; - } - else { - if (firstRequest.dependsOn.length === 1) { - const fDependencyId = firstRequest.dependsOn[0]; - if (fDependencyId !== firstRequest.id && reqs.has(fDependencyId)) { - dependencyId = fDependencyId; - } - else { - return false; - } - } - else { - return false; - } - } - cur = iterator.next(); - while (!cur.done) { - const curReq = cur.value[1]; - if ((curReq.dependsOn === undefined || curReq.dependsOn.length === 0) && dependencyId !== curReq.id) { - return false; - } - if (curReq.dependsOn !== undefined && curReq.dependsOn.length !== 0) { - if (curReq.dependsOn.length === 1 && (curReq.id === dependencyId || curReq.dependsOn[0] !== dependencyId)) { - return false; - } - if (curReq.dependsOn.length > 1) { - return false; - } - } - cur = iterator.next(); - } - return true; - }; - if (requests.size === 0) { - const error = new Error("Empty requests map, Please provide at least one request."); - error.name = "Empty Requests Error"; - throw error; - } - return isParallel(requests) || isSerial(requests) || isSame(requests); - } - /** - * @private - * @static - * @async - * Converts Request Object instance to a JSON - * @param {IsomorphicRequest} request - The IsomorphicRequest Object instance - * @returns A promise that resolves to JSON representation of a request - */ - static getRequestData(request) { - return __awaiter(this, void 0, void 0, function* () { - const requestData = { - url: "", - }; - const hasHttpRegex = new RegExp("^https?://"); - // Stripping off hostname, port and url scheme - requestData.url = hasHttpRegex.test(request.url) ? "/" + request.url.split(/.*?\/\/.*?\//)[1] : request.url; - requestData.method = request.method; - const headers = {}; - request.headers.forEach((value, key) => { - headers[key] = value; - }); - if (Object.keys(headers).length) { - requestData.headers = headers; - } - if (request.method === RequestMethod.PATCH || request.method === RequestMethod.POST || request.method === RequestMethod.PUT) { - requestData.body = yield BatchRequestContent.getRequestBody(request); - } - /** - * TODO: Check any other property needs to be used from the Request object and add them - */ - return requestData; - }); - } - /** - * @private - * @static - * @async - * Gets the body of a Request object instance - * @param {IsomorphicRequest} request - The IsomorphicRequest object instance - * @returns The Promise that resolves to a body value of a Request - */ - static getRequestBody(request) { - return __awaiter(this, void 0, void 0, function* () { - let bodyParsed = false; - let body; - try { - const cloneReq = request.clone(); - body = yield cloneReq.json(); - bodyParsed = true; - } - catch (e) { - //TODO- Handle empty catches - } - if (!bodyParsed) { - try { - if (typeof Blob !== "undefined") { - const blob = yield request.blob(); - const reader = new FileReader(); - body = yield new Promise((resolve) => { - reader.addEventListener("load", () => { - const dataURL = reader.result; - /** - * Some valid dataURL schemes: - * 1. data:text/vnd-example+xyz;foo=bar;base64,R0lGODdh - * 2. data:text/plain;charset=UTF-8;page=21,the%20data:1234,5678 - * 3. data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg== - * 4. data:image/png,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg== - * 5. data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg== - * @see Syntax {@link https://en.wikipedia.org/wiki/Data_URI_scheme} for more - */ - const regex = new RegExp("^s*data:(.+?/.+?(;.+?=.+?)*)?(;base64)?,(.*)s*$"); - const segments = regex.exec(dataURL); - resolve(segments[4]); - }, false); - reader.readAsDataURL(blob); - }); - } - else if (typeof Buffer !== "undefined") { - const buffer = yield request.buffer(); - body = buffer.toString("base64"); - } - bodyParsed = true; - } - catch (e) { - // TODO-Handle empty catches - } - } - return body; - }); - } - /** - * @public - * @constructor - * Constructs a BatchRequestContent instance - * @param {BatchRequestStep[]} [requests] - Array of requests value - * @returns An instance of a BatchRequestContent - */ - constructor(requests) { - this.requests = new Map(); - if (typeof requests !== "undefined") { - const limit = BatchRequestContent.requestLimit; - if (requests.length > limit) { - const error = new Error(`Maximum requests limit exceeded, Max allowed number of requests are ${limit}`); - error.name = "Limit Exceeded Error"; - throw error; - } - for (const req of requests) { - this.addRequest(req); - } - } - } - /** - * @public - * Adds a request to the batch request content - * @param {BatchRequestStep} request - The request value - * @returns The id of the added request - */ - addRequest(request) { - const limit = BatchRequestContent.requestLimit; - if (request.id === "") { - const error = new Error(`Id for a request is empty, Please provide an unique id`); - error.name = "Empty Id For Request"; - throw error; - } - if (this.requests.size === limit) { - const error = new Error(`Maximum requests limit exceeded, Max allowed number of requests are ${limit}`); - error.name = "Limit Exceeded Error"; - throw error; - } - if (this.requests.has(request.id)) { - const error = new Error(`Adding request with duplicate id ${request.id}, Make the id of the requests unique`); - error.name = "Duplicate RequestId Error"; - throw error; - } - this.requests.set(request.id, request); - return request.id; - } - /** - * @public - * Removes request from the batch payload and its dependencies from all dependents - * @param {string} requestId - The id of a request that needs to be removed - * @returns The boolean indicating removed status - */ - removeRequest(requestId) { - const deleteStatus = this.requests.delete(requestId); - const iterator = this.requests.entries(); - let cur = iterator.next(); - /** - * Removing dependencies where this request is present as a dependency - */ - while (!cur.done) { - const dependencies = cur.value[1].dependsOn; - if (typeof dependencies !== "undefined") { - const index = dependencies.indexOf(requestId); - if (index !== -1) { - dependencies.splice(index, 1); - } - if (dependencies.length === 0) { - delete cur.value[1].dependsOn; - } - } - cur = iterator.next(); - } - return deleteStatus; - } - /** - * @public - * @async - * Serialize content from BatchRequestContent instance - * @returns The body content to make batch request - */ - getContent() { - return __awaiter(this, void 0, void 0, function* () { - const requests = []; - const requestBody = { - requests, - }; - const iterator = this.requests.entries(); - let cur = iterator.next(); - if (cur.done) { - const error = new Error("No requests added yet, Please add at least one request."); - error.name = "Empty Payload"; - throw error; - } - if (!BatchRequestContent.validateDependencies(this.requests)) { - const error = new Error(`Invalid dependency found, Dependency should be: -1. Parallel - no individual request states a dependency in the dependsOn property. -2. Serial - all individual requests depend on the previous individual request. -3. Same - all individual requests that state a dependency in the dependsOn property, state the same dependency.`); - error.name = "Invalid Dependency"; - throw error; - } - while (!cur.done) { - const requestStep = cur.value[1]; - const batchRequestData = (yield BatchRequestContent.getRequestData(requestStep.request)); - /** - * @see{@https://tools.ietf.org/html/rfc7578#section-4.4} - * TODO- Setting/Defaulting of content-type header to the correct value - * @see {@link https://developer.microsoft.com/en-us/graph/docs/concepts/json_batching#request-format} - */ - if (batchRequestData.body !== undefined && (batchRequestData.headers === undefined || batchRequestData.headers["content-type"] === undefined)) { - const error = new Error(`Content-type header is not mentioned for request #${requestStep.id}, For request having body, Content-type header should be mentioned`); - error.name = "Invalid Content-type header"; - throw error; - } - batchRequestData.id = requestStep.id; - if (requestStep.dependsOn !== undefined && requestStep.dependsOn.length > 0) { - batchRequestData.dependsOn = requestStep.dependsOn; - } - requests.push(batchRequestData); - cur = iterator.next(); - } - requestBody.requests = requests; - return requestBody; - }); - } - /** - * @public - * Adds a dependency for a given dependent request - * @param {string} dependentId - The id of the dependent request - * @param {string} [dependencyId] - The id of the dependency request, if not specified the preceding request will be considered as a dependency - * @returns Nothing - */ - addDependency(dependentId, dependencyId) { - if (!this.requests.has(dependentId)) { - const error = new Error(`Dependent ${dependentId} does not exists, Please check the id`); - error.name = "Invalid Dependent"; - throw error; - } - if (typeof dependencyId !== "undefined" && !this.requests.has(dependencyId)) { - const error = new Error(`Dependency ${dependencyId} does not exists, Please check the id`); - error.name = "Invalid Dependency"; - throw error; - } - if (typeof dependencyId !== "undefined") { - const dependent = this.requests.get(dependentId); - if (dependent.dependsOn === undefined) { - dependent.dependsOn = []; - } - if (dependent.dependsOn.indexOf(dependencyId) !== -1) { - const error = new Error(`Dependency ${dependencyId} is already added for the request ${dependentId}`); - error.name = "Duplicate Dependency"; - throw error; - } - dependent.dependsOn.push(dependencyId); - } - else { - const iterator = this.requests.entries(); - let prev; - let cur = iterator.next(); - while (!cur.done && cur.value[1].id !== dependentId) { - prev = cur; - cur = iterator.next(); - } - if (typeof prev !== "undefined") { - const dId = prev.value[0]; - if (cur.value[1].dependsOn === undefined) { - cur.value[1].dependsOn = []; - } - if (cur.value[1].dependsOn.indexOf(dId) !== -1) { - const error = new Error(`Dependency ${dId} is already added for the request ${dependentId}`); - error.name = "Duplicate Dependency"; - throw error; - } - cur.value[1].dependsOn.push(dId); - } - else { - const error = new Error(`Can't add dependency ${dependencyId}, There is only a dependent request in the batch`); - error.name = "Invalid Dependency Addition"; - throw error; - } - } - } - /** - * @public - * Removes a dependency for a given dependent request id - * @param {string} dependentId - The id of the dependent request - * @param {string} [dependencyId] - The id of the dependency request, if not specified will remove all the dependencies of that request - * @returns The boolean indicating removed status - */ - removeDependency(dependentId, dependencyId) { - const request = this.requests.get(dependentId); - if (typeof request === "undefined" || request.dependsOn === undefined || request.dependsOn.length === 0) { - return false; - } - if (typeof dependencyId !== "undefined") { - const index = request.dependsOn.indexOf(dependencyId); - if (index === -1) { - return false; - } - request.dependsOn.splice(index, 1); - return true; - } - else { - delete request.dependsOn; - return true; - } - } -} -/** - * @private - * @static - * Limit for number of requests {@link - https://developer.microsoft.com/en-us/graph/docs/concepts/known_issues#json-batching} - */ -BatchRequestContent.requestLimit = 20; -//# sourceMappingURL=BatchRequestContent.js.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/content/BatchRequestContent.js.map b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/content/BatchRequestContent.js.map deleted file mode 100644 index 128b32f..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/content/BatchRequestContent.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"BatchRequestContent.js","sourceRoot":"","sources":["../../../../src/content/BatchRequestContent.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH;;GAEG;AACH,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAkEjD;;;GAGG;AACH,MAAM,OAAO,mBAAmB;IAc/B;;;;;;;;;;;;;;;OAeG;IAEK,MAAM,CAAC,oBAAoB,CAAC,QAAuC;QAC1E,MAAM,UAAU,GAAG,CAAC,IAAmC,EAAW,EAAE;YACnE,MAAM,QAAQ,GAAG,IAAI,CAAC,OAAO,EAAE,CAAC;YAChC,IAAI,GAAG,GAAG,QAAQ,CAAC,IAAI,EAAE,CAAC;YAC1B,OAAO,CAAC,GAAG,CAAC,IAAI,EAAE;gBACjB,MAAM,MAAM,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;gBAC5B,IAAI,MAAM,CAAC,SAAS,KAAK,SAAS,IAAI,MAAM,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,EAAE;oBAClE,OAAO,KAAK,CAAC;iBACb;gBACD,GAAG,GAAG,QAAQ,CAAC,IAAI,EAAE,CAAC;aACtB;YACD,OAAO,IAAI,CAAC;QACb,CAAC,CAAC;QACF,MAAM,QAAQ,GAAG,CAAC,IAAmC,EAAW,EAAE;YACjE,MAAM,QAAQ,GAAG,IAAI,CAAC,OAAO,EAAE,CAAC;YAChC,IAAI,GAAG,GAAG,QAAQ,CAAC,IAAI,EAAE,CAAC;YAC1B,MAAM,YAAY,GAAqB,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;YACpD,IAAI,YAAY,CAAC,SAAS,KAAK,SAA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AI,OAAO,OAAO,KAAK,WAAW,IAAI,OAAO,CAAC,SAAS,KAAK,SAAS,IAAI,OAAO,CAAC,SAAS,CAAC,MAAM,KAAK,CAAC,EAAE;YACxG,OAAO,KAAK,CAAC;SACb;QACD,IAAI,OAAO,YAAY,KAAK,WAAW,EAAE;YACxC,MAAM,KAAK,GAAG,OAAO,CAAC,SAAS,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;YACtD,IAAI,KAAK,KAAK,CAAC,CAAC,EAAE;gBACjB,OAAO,KAAK,CAAC;aACb;YACD,OAAO,CAAC,SAAS,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;YACnC,OAAO,IAAI,CAAC;SACZ;aAAM;YACN,OAAO,OAAO,CAAC,SAAS,CAAC;YACzB,OAAO,IAAI,CAAC;SACZ;IACF,CAAC;;AAnZD;;;;GAIG;AACY,gCAAY,GAAG,EAAE,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/content/BatchResponseContent.d.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/content/BatchResponseContent.d.ts deleted file mode 100644 index 131b082..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/content/BatchResponseContent.d.ts +++ /dev/null @@ -1,82 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -/** - * @module BatchResponseContent - */ -/** - * @interface - * Signature represents key value pair object - */ -interface KeyValuePairObject { - [key: string]: any; -} -/** - * @interface - * Signature representing Batch response body - * @property {KeyValuePairObject[]} responses - An array of key value pair representing response object for every request - * @property {string} [@odata.nextLink] - The nextLink value to get next set of responses in case of asynchronous batch requests - */ -export interface BatchResponseBody { - responses: KeyValuePairObject[]; - "@odata.nextLink"?: string; -} -/** - * @class - * Class that handles BatchResponseContent - */ -export declare class BatchResponseContent { - /** - * To hold the responses - */ - private responses; - /** - * Holds the next link url - */ - private nextLink; - /** - * @public - * @constructor - * Creates the BatchResponseContent instance - * @param {BatchResponseBody} response - The response body returned for batch request from server - * @returns An instance of a BatchResponseContent - */ - constructor(response: BatchResponseBody); - /** - * @private - * Creates native Response object from the json representation of it. - * @param {KeyValuePairObject} responseJSON - The response json value - * @returns The Response Object instance - */ - private createResponseObject; - /** - * @public - * Updates the Batch response content instance with given responses. - * @param {BatchResponseBody} response - The response json representing batch response message - * @returns Nothing - */ - update(response: BatchResponseBody): void; - /** - * @public - * To get the response of a request for a given request id - * @param {string} requestId - The request id value - * @returns The Response object instance for the particular request - */ - getResponseById(requestId: string): Response; - /** - * @public - * To get all the responses of the batch request - * @returns The Map of id and Response objects - */ - getResponses(): Map; - /** - * @public - * To get the iterator for the responses - * @returns The Iterable generator for the response objects - */ - getResponsesIterator(): IterableIterator<[string, Response]>; -} -export {}; diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/content/BatchResponseContent.js b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/content/BatchResponseContent.js deleted file mode 100644 index 44e92b1..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/content/BatchResponseContent.js +++ /dev/null @@ -1,89 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -/** - * @class - * Class that handles BatchResponseContent - */ -export class BatchResponseContent { - /** - * @public - * @constructor - * Creates the BatchResponseContent instance - * @param {BatchResponseBody} response - The response body returned for batch request from server - * @returns An instance of a BatchResponseContent - */ - constructor(response) { - this.responses = new Map(); - this.update(response); - } - /** - * @private - * Creates native Response object from the json representation of it. - * @param {KeyValuePairObject} responseJSON - The response json value - * @returns The Response Object instance - */ - createResponseObject(responseJSON) { - const body = responseJSON.body; - const options = {}; - options.status = responseJSON.status; - if (responseJSON.statusText !== undefined) { - options.statusText = responseJSON.statusText; - } - options.headers = responseJSON.headers; - if (options.headers !== undefined && options.headers["Content-Type"] !== undefined) { - if (options.headers["Content-Type"].split(";")[0] === "application/json") { - const bodyString = JSON.stringify(body); - return new Response(bodyString, options); - } - } - return new Response(body, options); - } - /** - * @public - * Updates the Batch response content instance with given responses. - * @param {BatchResponseBody} response - The response json representing batch response message - * @returns Nothing - */ - update(response) { - this.nextLink = response["@odata.nextLink"]; - const responses = response.responses; - for (let i = 0, l = responses.length; i < l; i++) { - this.responses.set(responses[i].id, this.createResponseObject(responses[i])); - } - } - /** - * @public - * To get the response of a request for a given request id - * @param {string} requestId - The request id value - * @returns The Response object instance for the particular request - */ - getResponseById(requestId) { - return this.responses.get(requestId); - } - /** - * @public - * To get all the responses of the batch request - * @returns The Map of id and Response objects - */ - getResponses() { - return this.responses; - } - /** - * @public - * To get the iterator for the responses - * @returns The Iterable generator for the response objects - */ - *getResponsesIterator() { - const iterator = this.responses.entries(); - let cur = iterator.next(); - while (!cur.done) { - yield cur.value; - cur = iterator.next(); - } - } -} -//# sourceMappingURL=BatchResponseContent.js.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/content/BatchResponseContent.js.map b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/content/BatchResponseContent.js.map deleted file mode 100644 index ab4f237..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/content/BatchResponseContent.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"BatchResponseContent.js","sourceRoot":"","sources":["../../../../src/content/BatchResponseContent.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAyBH;;;GAGG;AACH,MAAM,OAAO,oBAAoB;IAWhC;;;;;;OAMG;IACH,YAAmB,QAA2B;QAC7C,IAAI,CAAC,SAAS,GAAG,IAAI,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oBAAoB,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;SAC7E;IACF,CAAC;IAED;;;;;OAKG;IACI,eAAe,CAAC,SAAiB;QACvC,OAAO,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IACtC,CAAC;IAED;;;;OAIG;IACI,YAAY;QAClB,OAAO,IAAI,CAAC,SAAS,CAAC;IACvB,CAAC;IAED;;;;OAIG;IACI,CAAC,oBAAoB;QAC3B,MAAM,QAAQ,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,CAAC;QAC1C,IAAI,GAAG,GAAG,QAAQ,CAAC,IAAI,EAAE,CAAC;QAC1B,OAAO,CAAC,GAAG,CAAC,IAAI,EAAE;YACjB,MAAM,GAAG,CAAC,KAAK,CAAC;YAChB,GAAG,GAAG,QAAQ,CAAC,IAAI,EAAE,CAAC;SACtB;IACF,CAAC;CACD"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/index.d.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/index.d.ts deleted file mode 100644 index 86dc79a..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/index.d.ts +++ /dev/null @@ -1,48 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -/// -export { BatchRequestBody, RequestData, BatchRequestContent, BatchRequestData, BatchRequestStep } from "./content/BatchRequestContent"; -export { BatchResponseBody, BatchResponseContent } from "./content/BatchResponseContent"; -export { AuthenticationHandler } from "./middleware/AuthenticationHandler"; -export { HTTPMessageHandler } from "./middleware/HTTPMessageHandler"; -export { Middleware } from "./middleware/IMiddleware"; -export { RetryHandler } from "./middleware/RetryHandler"; -export { RedirectHandler } from "./middleware/RedirectHandler"; -export { TelemetryHandler } from "./middleware/TelemetryHandler"; -export { MiddlewareFactory } from "./middleware/MiddlewareFactory"; -export { AuthenticationHandlerOptions } from "./middleware/options/AuthenticationHandlerOptions"; -export { MiddlewareOptions } from "./middleware/options/IMiddlewareOptions"; -export { RetryHandlerOptions, ShouldRetry } from "./middleware/options/RetryHandlerOptions"; -export { RedirectHandlerOptions, ShouldRedirect } from "./middleware/options/RedirectHandlerOptions"; -export { FeatureUsageFlag, TelemetryHandlerOptions } from "./middleware/options/TelemetryHandlerOptions"; -export { ChaosHandlerOptions } from "./middleware/options/ChaosHandlerOptions"; -export { ChaosStrategy } from "./middleware/options/ChaosStrategy"; -export { ChaosHandler } from "./middleware/ChaosHandler"; -export { FileObject, LargeFileUploadSession, LargeFileUploadTask, LargeFileUploadTaskOptions, SliceType } from "./tasks/LargeFileUploadTask"; -export { OneDriveLargeFileUploadOptions, OneDriveLargeFileUploadTask } from "./tasks/OneDriveLargeFileUploadTask"; -export { getValidRangeSize } from "./tasks/OneDriveLargeFileUploadTaskUtil"; -export { StreamUpload } from "./tasks/FileUploadTask/FileObjectClasses/StreamUpload"; -export { FileUpload } from "./tasks/FileUploadTask/FileObjectClasses/FileUpload"; -export { UploadResult } from "./tasks/FileUploadTask/UploadResult"; -export { UploadEventHandlers } from "./tasks/FileUploadTask/Interfaces/IUploadEventHandlers"; -export { Range } from "./tasks/FileUploadTask/Range"; -export { GraphRequestOptions, PageCollection, PageIterator, PageIteratorCallback } from "./tasks/PageIterator"; -export { Client } from "./Client"; -export { CustomAuthenticationProvider } from "./CustomAuthenticationProvider"; -export { GraphError } from "./GraphError"; -export { GraphClientError } from "./GraphClientError"; -export { GraphRequest, URLComponents } from "./GraphRequest"; -export { AuthProvider } from "./IAuthProvider"; -export { AuthenticationProvider } from "./IAuthenticationProvider"; -export { AuthenticationProviderOptions } from "./IAuthenticationProviderOptions"; -export { AuthProviderCallback } from "./IAuthProviderCallback"; -export { ClientOptions } from "./IClientOptions"; -export { Context } from "./IContext"; -export { FetchOptions, NodeFetchInit } from "./IFetchOptions"; -export { GraphRequestCallback } from "./IGraphRequestCallback"; -export { Options } from "./IOptions"; -export { ResponseType } from "./ResponseType"; diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/index.js b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/index.js deleted file mode 100644 index d1cdc19..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/index.js +++ /dev/null @@ -1,38 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -// eslint-disable-next-line @typescript-eslint/triple-slash-reference -/// -export { BatchRequestContent } from "./content/BatchRequestContent"; -export { BatchResponseContent } from "./content/BatchResponseContent"; -export { AuthenticationHandler } from "./middleware/AuthenticationHandler"; -export { HTTPMessageHandler } from "./middleware/HTTPMessageHandler"; -export { RetryHandler } from "./middleware/RetryHandler"; -export { RedirectHandler } from "./middleware/RedirectHandler"; -export { TelemetryHandler } from "./middleware/TelemetryHandler"; -export { MiddlewareFactory } from "./middleware/MiddlewareFactory"; -export { AuthenticationHandlerOptions } from "./middleware/options/AuthenticationHandlerOptions"; -export { RetryHandlerOptions } from "./middleware/options/RetryHandlerOptions"; -export { RedirectHandlerOptions } from "./middleware/options/RedirectHandlerOptions"; -export { FeatureUsageFlag, TelemetryHandlerOptions } from "./middleware/options/TelemetryHandlerOptions"; -export { ChaosHandlerOptions } from "./middleware/options/ChaosHandlerOptions"; -export { ChaosStrategy } from "./middleware/options/ChaosStrategy"; -export { ChaosHandler } from "./middleware/ChaosHandler"; -export { LargeFileUploadTask } from "./tasks/LargeFileUploadTask"; -export { OneDriveLargeFileUploadTask } from "./tasks/OneDriveLargeFileUploadTask"; -export { getValidRangeSize } from "./tasks/OneDriveLargeFileUploadTaskUtil"; -export { StreamUpload } from "./tasks/FileUploadTask/FileObjectClasses/StreamUpload"; -export { FileUpload } from "./tasks/FileUploadTask/FileObjectClasses/FileUpload"; -export { UploadResult } from "./tasks/FileUploadTask/UploadResult"; -export { Range } from "./tasks/FileUploadTask/Range"; -export { PageIterator } from "./tasks/PageIterator"; -export { Client } from "./Client"; -export { CustomAuthenticationProvider } from "./CustomAuthenticationProvider"; -export { GraphError } from "./GraphError"; -export { GraphClientError } from "./GraphClientError"; -export { GraphRequest } from "./GraphRequest"; -export { ResponseType } from "./ResponseType"; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/index.js.map b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/index.js.map deleted file mode 100644 index 90b7981..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,qEAAqE;AACrE,yCAAyC;AAEzC,OAAO,EAAiC,mBAAmB,EAAsC,MAAM,+BAA+B,CAAC;AACvI,OAAO,EAAqB,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AAEzF,OAAO,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAC3E,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAErE,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,EAAE,4BAA4B,EAAE,MAAM,mDAAmD,CAAC;AAEjG,OAAO,EAAE,mBAAmB,EAAe,MAAM,0CAA0C,CAAC;AAC5F,OAAO,EAAE,sBAAsB,EAAkB,MAAM,6CAA6C,CAAC;AACrG,OAAO,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,MAAM,8CAA8C,CAAC;AACzG,OAAO,EAAE,mBAAmB,EAAE,MAAM,0CAA0C,CAAC;AAC/E,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAEzD,OAAO,EAAsC,mBAAmB,EAAyC,MAAM,6BAA6B,CAAC;AAC7I,OAAO,EAAkC,2BAA2B,EAAE,MAAM,qCAAqC,CAAC;AAClH,OAAO,EAAE,iBAAiB,EAAE,MAAM,yCAAyC,CAAC;AAC5E,OAAO,EAAE,YAAY,EAAE,MAAM,uDAAuD,CAAC;AACrF,OAAO,EAAE,UAAU,EAAE,MAAM,qDAAqD,CAAC;AACjF,OAAO,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAC;AAEnE,OAAO,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAC;AACrD,OAAO,EAAuC,YAAY,EAAwB,MAAM,sBAAsB,CAAC;AAE/G,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AAC9E,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,YAAY,EAAiB,MAAM,gBAAgB,CAAC;AAU7D,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/AuthenticationHandler.d.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/AuthenticationHandler.d.ts deleted file mode 100644 index 21aab8a..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/AuthenticationHandler.d.ts +++ /dev/null @@ -1,53 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -import { AuthenticationProvider } from "../IAuthenticationProvider"; -import { Context } from "../IContext"; -import { Middleware } from "./IMiddleware"; -/** - * @class - * @implements Middleware - * Class representing AuthenticationHandler - */ -export declare class AuthenticationHandler implements Middleware { - /** - * @private - * A member representing the authorization header name - */ - private static AUTHORIZATION_HEADER; - /** - * @private - * A member to hold an AuthenticationProvider instance - */ - private authenticationProvider; - /** - * @private - * A member to hold next middleware in the middleware chain - */ - private nextMiddleware; - /** - * @public - * @constructor - * Creates an instance of AuthenticationHandler - * @param {AuthenticationProvider} authenticationProvider - The authentication provider for the authentication handler - */ - constructor(authenticationProvider: AuthenticationProvider); - /** - * @public - * @async - * To execute the current middleware - * @param {Context} context - The context object of the request - * @returns A Promise that resolves to nothing - */ - execute(context: Context): Promise; - /** - * @public - * To set the next middleware in the chain - * @param {Middleware} next - The middleware instance - * @returns Nothing - */ - setNext(next: Middleware): void; -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/AuthenticationHandler.js b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/AuthenticationHandler.js deleted file mode 100644 index 5c1d96c..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/AuthenticationHandler.js +++ /dev/null @@ -1,83 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -import { __awaiter } from "tslib"; -/** - * @module AuthenticationHandler - */ -import { isCustomHost, isGraphURL } from "../GraphRequestUtil"; -import { MiddlewareControl } from "./MiddlewareControl"; -import { appendRequestHeader } from "./MiddlewareUtil"; -import { AuthenticationHandlerOptions } from "./options/AuthenticationHandlerOptions"; -import { FeatureUsageFlag, TelemetryHandlerOptions } from "./options/TelemetryHandlerOptions"; -/** - * @class - * @implements Middleware - * Class representing AuthenticationHandler - */ -export class AuthenticationHandler { - /** - * @public - * @constructor - * Creates an instance of AuthenticationHandler - * @param {AuthenticationProvider} authenticationProvider - The authentication provider for the authentication handler - */ - constructor(authenticationProvider) { - this.authenticationProvider = authenticationProvider; - } - /** - * @public - * @async - * To execute the current middleware - * @param {Context} context - The context object of the request - * @returns A Promise that resolves to nothing - */ - execute(context) { - return __awaiter(this, void 0, void 0, function* () { - const url = typeof context.request === "string" ? context.request : context.request.url; - if (isGraphURL(url) || (context.customHosts && isCustomHost(url, context.customHosts))) { - let options; - if (context.middlewareControl instanceof MiddlewareControl) { - options = context.middlewareControl.getMiddlewareOptions(AuthenticationHandlerOptions); - } - let authenticationProvider; - let authenticationProviderOptions; - if (options) { - authenticationProvider = options.authenticationProvider; - authenticationProviderOptions = options.authenticationProviderOptions; - } - if (!authenticationProvider) { - authenticationProvider = this.authenticationProvider; - } - const token = yield authenticationProvider.getAccessToken(authenticationProviderOptions); - const bearerKey = `Bearer ${token}`; - appendRequestHeader(context.request, context.options, AuthenticationHandler.AUTHORIZATION_HEADER, bearerKey); - TelemetryHandlerOptions.updateFeatureUsageFlag(context, FeatureUsageFlag.AUTHENTICATION_HANDLER_ENABLED); - } - else { - if (context.options.headers) { - delete context.options.headers[AuthenticationHandler.AUTHORIZATION_HEADER]; - } - } - return yield this.nextMiddleware.execute(context); - }); - } - /** - * @public - * To set the next middleware in the chain - * @param {Middleware} next - The middleware instance - * @returns Nothing - */ - setNext(next) { - this.nextMiddleware = next; - } -} -/** - * @private - * A member representing the authorization header name - */ -AuthenticationHandler.AUTHORIZATION_HEADER = "Authorization"; -//# sourceMappingURL=AuthenticationHandler.js.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/AuthenticationHandler.js.map b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/AuthenticationHandler.js.map deleted file mode 100644 index f0c6970..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/AuthenticationHandler.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AuthenticationHandler.js","sourceRoot":"","sources":["../../../../src/middleware/AuthenticationHandler.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH;;GAEG;AAEH,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAK/D,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,4BAA4B,EAAE,MAAM,wCAAwC,CAAC;AACtF,OAAO,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,MAAM,mCAAmC,CAAC;AAE9F;;;;GAIG;AACH,MAAM,OAAO,qBAAqB;IAmBjC;;;;;OAKG;IACH,YAAmB,sBAA8C;QAChE,IAAI,CAAC,sBAAsB,GAAG,sBAAsB,CAAC;IACtD,CAAC;IAED;;;;;;OAMG;IACU,OAAO,CAAC,OAAgB;;YACpC,MAAM,GAAG,GAAG,OAAO,OAAO,CAAC,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC;YACxF,IAAI,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,WAAW,IAAI,YAAY,CAAC,GAAG,EAAE,OAAO,CAAC,WAAW,CAAC,CAAC,EAAE;gBACvF,IAAI,OAAqC,CAAC;gBAC1C,IAAI,OAAO,CAAC,iBAAiB,YAAY,iBAAiB,EAAE;oBAC3D,OAAO,GAAG,OAAO,CAAC,iBAAiB,CAAC,oBAAoB,CAAC,4BAA4B,CAAiC,CAAC;iBACvH;gBACD,IAAI,sBAA8C,CAAC;gBACnD,IAAI,6BAA4D,CAAC;gBACjE,IAAI,OAAO,EAAE;oBACZ,sBAAsB,GAAG,OAAO,CAAC,sBAAsB,CAAC;oBACxD,6BAA6B,GAAG,OAAO,CAAC,6BAA6B,CAAC;iBACtE;gBACD,IAAI,CAAC,sBAAsB,EAAE;oBAC5B,sBAAsB,GAAG,IAAI,CAAC,sBAAsB,CAAC;iBACrD;gBACD,MAAM,KAAK,GAAW,MAAM,sBAAsB,CAAC,cAAc,CAAC,6BAA6B,CAAC,CAAC;gBACjG,MAAM,SAAS,GAAG,UAAU,KAAK,EAAE,CAAC;gBACpC,mBAAmB,CAAC,OAAO,CAAC,OAAO,EAAE,OAAO,CAAC,OAAO,EAAE,qBAAqB,CAAC,oBAAoB,EAAE,SAAS,CAAC,CAAC;gBAC7G,uBAAuB,CAAC,sBAAsB,CAAC,OAAO,EAAE,gBAAgB,CAAC,8BAA8B,CAAC,CAAC;aACzG;iBAAM;gBACN,IAAI,OAAO,CAAC,OAAO,CAAC,OAAO,EAAE;oBAC5B,OAAO,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,qBAAqB,CAAC,oBAAoB,CAAC,CAAC;iBAC3E;aACD;YACD,OAAO,MAAM,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QACnD,CAAC;KAAA;IAED;;;;;OAKG;IACI,OAAO,CAAC,IAAgB;QAC9B,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC;IAC5B,CAAC;;AAvED;;;GAGG;AACY,0CAAoB,GAAG,eAAe,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/ChaosHandler.d.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/ChaosHandler.d.ts deleted file mode 100644 index 5d15cdd..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/ChaosHandler.d.ts +++ /dev/null @@ -1,123 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -/** - * @module ChaosHandler - */ -import { Context } from "../IContext"; -import { Middleware } from "./IMiddleware"; -import { ChaosHandlerOptions } from "./options/ChaosHandlerOptions"; -/** - * Class representing ChaosHandler - * @class - * Class - * @implements Middleware - */ -export declare class ChaosHandler implements Middleware { - /** - * A member holding options to customize the handler behavior - * - * @private - */ - private options; - /** - * container for the manual map that has been written by the client - * - * @private - */ - private manualMap; - /** - * @private - * A member to hold next middleware in the middleware chain - */ - private nextMiddleware; - /** - * @public - * @constructor - * To create an instance of Testing Handler - * @param {ChaosHandlerOptions} [options = new ChaosHandlerOptions()] - The testing handler options instance - * @param manualMap - The Map passed by user containing url-statusCode info - * @returns An instance of Testing Handler - */ - constructor(options?: ChaosHandlerOptions, manualMap?: Map>); - /** - * Generates responseHeader - * @private - * @param {ChaosHandlerOptions} chaosHandlerOptions - The ChaosHandlerOptions object - * @param {string} requestID - request id - * @param {string} requestDate - date of the request - * @returns response Header - */ - private createResponseHeaders; - /** - * Generates responseBody - * @private - * @param {ChaosHandlerOptions} chaosHandlerOptions - The ChaosHandlerOptions object - * @param {string} requestID - request id - * @param {string} requestDate - date of the request - * * @returns response body - */ - private createResponseBody; - /** - * creates a response - * @private - * @param {ChaosHandlerOptions} chaosHandlerOptions - The ChaosHandlerOptions object - * @param {Context} context - Contains the context of the request - */ - private createResponse; - /** - * Decides whether to send the request to the graph or not - * @private - * @param {ChaosHandlerOptions} chaosHandlerOptions - A ChaosHandlerOptions object - * @param {Context} context - Contains the context of the request - * @returns nothing - */ - private sendRequest; - /** - * Fetches a random status code for the RANDOM mode from the predefined array - * @private - * @param {string} requestMethod - the API method for the request - * @returns a random status code from a given set of status codes - */ - private getRandomStatusCode; - /** - * To fetch the relative URL out of the complete URL using a predefined regex pattern - * @private - * @param {string} urlMethod - the complete URL - * @returns the string as relative URL - */ - private getRelativeURL; - /** - * To fetch the status code from the map(if needed), then returns response by calling createResponse - * @private - * @param {ChaosHandlerOptions} chaosHandlerOptions - The ChaosHandlerOptions object - * @param {string} requestURL - the URL for the request - * @param {string} requestMethod - the API method for the request - */ - private setStatusCode; - /** - * To get the options for execution of the middleware - * @private - * @param {Context} context - The context object - * @returns options for middleware execution - */ - private getOptions; - /** - * To execute the current middleware - * @public - * @async - * @param {Context} context - The context object of the request - * @returns A Promise that resolves to nothing - */ - execute(context: Context): Promise; - /** - * @public - * To set the next middleware in the chain - * @param {Middleware} next - The middleware instance - * @returns Nothing - */ - setNext(next: Middleware): void; -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/ChaosHandler.js b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/ChaosHandler.js deleted file mode 100644 index 94efa99..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/ChaosHandler.js +++ /dev/null @@ -1,222 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -import { __awaiter } from "tslib"; -import { MiddlewareControl } from "./MiddlewareControl"; -import { generateUUID } from "./MiddlewareUtil"; -import { httpStatusCode, methodStatusCode } from "./options/ChaosHandlerData"; -import { ChaosHandlerOptions } from "./options/ChaosHandlerOptions"; -import { ChaosStrategy } from "./options/ChaosStrategy"; -/** - * Class representing ChaosHandler - * @class - * Class - * @implements Middleware - */ -export class ChaosHandler { - /** - * @public - * @constructor - * To create an instance of Testing Handler - * @param {ChaosHandlerOptions} [options = new ChaosHandlerOptions()] - The testing handler options instance - * @param manualMap - The Map passed by user containing url-statusCode info - * @returns An instance of Testing Handler - */ - constructor(options = new ChaosHandlerOptions(), manualMap) { - this.options = options; - this.manualMap = manualMap; - } - /** - * Generates responseHeader - * @private - * @param {ChaosHandlerOptions} chaosHandlerOptions - The ChaosHandlerOptions object - * @param {string} requestID - request id - * @param {string} requestDate - date of the request - * @returns response Header - */ - createResponseHeaders(chaosHandlerOptions, requestID, requestDate) { - const responseHeader = chaosHandlerOptions.headers ? new Headers(chaosHandlerOptions.headers) : new Headers(); - responseHeader.append("Cache-Control", "no-store"); - responseHeader.append("request-id", requestID); - responseHeader.append("client-request-id", requestID); - responseHeader.append("x-ms-ags-diagnostic", ""); - responseHeader.append("Date", requestDate); - responseHeader.append("Strict-Transport-Security", ""); - if (chaosHandlerOptions.statusCode === 429) { - // throttling case has to have a timeout scenario - responseHeader.append("retry-after", "3"); - } - return responseHeader; - } - /** - * Generates responseBody - * @private - * @param {ChaosHandlerOptions} chaosHandlerOptions - The ChaosHandlerOptions object - * @param {string} requestID - request id - * @param {string} requestDate - date of the request - * * @returns response body - */ - createResponseBody(chaosHandlerOptions, requestID, requestDate) { - if (chaosHandlerOptions.responseBody) { - return chaosHandlerOptions.responseBody; - } - let body; - if (chaosHandlerOptions.statusCode >= 400) { - const codeMessage = httpStatusCode[chaosHandlerOptions.statusCode]; - const errMessage = chaosHandlerOptions.statusMessage; - body = { - error: { - code: codeMessage, - message: errMessage, - innerError: { - "request-id": requestID, - date: requestDate, - }, - }, - }; - } - else { - body = {}; - } - return body; - } - /** - * creates a response - * @private - * @param {ChaosHandlerOptions} chaosHandlerOptions - The ChaosHandlerOptions object - * @param {Context} context - Contains the context of the request - */ - createResponse(chaosHandlerOptions, context) { - const requestURL = context.request; - const requestID = generateUUID(); - const requestDate = new Date(); - const responseHeader = this.createResponseHeaders(chaosHandlerOptions, requestID, requestDate.toString()); - const responseBody = this.createResponseBody(chaosHandlerOptions, requestID, requestDate.toString()); - const init = { url: requestURL, status: chaosHandlerOptions.statusCode, statusText: chaosHandlerOptions.statusMessage, headers: responseHeader }; - context.response = new Response(typeof responseBody === "string" ? responseBody : JSON.stringify(responseBody), init); - } - /** - * Decides whether to send the request to the graph or not - * @private - * @param {ChaosHandlerOptions} chaosHandlerOptions - A ChaosHandlerOptions object - * @param {Context} context - Contains the context of the request - * @returns nothing - */ - sendRequest(chaosHandlerOptions, context) { - return __awaiter(this, void 0, void 0, function* () { - this.setStatusCode(chaosHandlerOptions, context.request, context.options.method); - if ((chaosHandlerOptions.chaosStrategy === ChaosStrategy.MANUAL && !this.nextMiddleware) || Math.floor(Math.random() * 100) < chaosHandlerOptions.chaosPercentage) { - this.createResponse(chaosHandlerOptions, context); - } - else if (this.nextMiddleware) { - yield this.nextMiddleware.execute(context); - } - }); - } - /** - * Fetches a random status code for the RANDOM mode from the predefined array - * @private - * @param {string} requestMethod - the API method for the request - * @returns a random status code from a given set of status codes - */ - getRandomStatusCode(requestMethod) { - const statusCodeArray = methodStatusCode[requestMethod]; - return statusCodeArray[Math.floor(Math.random() * statusCodeArray.length)]; - } - /** - * To fetch the relative URL out of the complete URL using a predefined regex pattern - * @private - * @param {string} urlMethod - the complete URL - * @returns the string as relative URL - */ - getRelativeURL(urlMethod) { - const pattern = /https?:\/\/graph\.microsoft\.com\/[^/]+(.+?)(\?|$)/; - let relativeURL; - if (pattern.exec(urlMethod) !== null) { - relativeURL = pattern.exec(urlMethod)[1]; - } - return relativeURL; - } - /** - * To fetch the status code from the map(if needed), then returns response by calling createResponse - * @private - * @param {ChaosHandlerOptions} chaosHandlerOptions - The ChaosHandlerOptions object - * @param {string} requestURL - the URL for the request - * @param {string} requestMethod - the API method for the request - */ - setStatusCode(chaosHandlerOptions, requestURL, requestMethod) { - if (chaosHandlerOptions.chaosStrategy === ChaosStrategy.MANUAL) { - if (chaosHandlerOptions.statusCode === undefined) { - // manual mode with no status code, can be a global level or request level without statusCode - const relativeURL = this.getRelativeURL(requestURL); - if (this.manualMap.get(relativeURL) !== undefined) { - // checking Manual Map for exact match - if (this.manualMap.get(relativeURL).get(requestMethod) !== undefined) { - chaosHandlerOptions.statusCode = this.manualMap.get(relativeURL).get(requestMethod); - } - // else statusCode would be undefined - } - else { - // checking for regex match if exact match doesn't work - this.manualMap.forEach((value, key) => { - const regexURL = new RegExp(key + "$"); - if (regexURL.test(relativeURL)) { - if (this.manualMap.get(key).get(requestMethod) !== undefined) { - chaosHandlerOptions.statusCode = this.manualMap.get(key).get(requestMethod); - } - // else statusCode would be undefined - } - }); - } - // Case of redirection or request url not in map ---> statusCode would be undefined - } - } - else { - // Handling the case of Random here - chaosHandlerOptions.statusCode = this.getRandomStatusCode(requestMethod); - // else statusCode would be undefined - } - } - /** - * To get the options for execution of the middleware - * @private - * @param {Context} context - The context object - * @returns options for middleware execution - */ - getOptions(context) { - let options; - if (context.middlewareControl instanceof MiddlewareControl) { - options = context.middlewareControl.getMiddlewareOptions(ChaosHandlerOptions); - } - if (typeof options === "undefined") { - options = Object.assign(new ChaosHandlerOptions(), this.options); - } - return options; - } - /** - * To execute the current middleware - * @public - * @async - * @param {Context} context - The context object of the request - * @returns A Promise that resolves to nothing - */ - execute(context) { - return __awaiter(this, void 0, void 0, function* () { - const chaosHandlerOptions = this.getOptions(context); - return yield this.sendRequest(chaosHandlerOptions, context); - }); - } - /** - * @public - * To set the next middleware in the chain - * @param {Middleware} next - The middleware instance - * @returns Nothing - */ - setNext(next) { - this.nextMiddleware = next; - } -} -//# sourceMappingURL=ChaosHandler.js.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/ChaosHandler.js.map b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/ChaosHandler.js.map deleted file mode 100644 index c86ae24..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/ChaosHandler.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ChaosHandler.js","sourceRoot":"","sources":["../../../../src/middleware/ChaosHandler.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAS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C,UAAU,GAAG,IAAI,CAAC,mBAAmB,CAAC,aAAa,CAAC,CAAC;YACzE,qCAAqC;SACrC;IACF,CAAC;IAED;;;;;OAKG;IACK,UAAU,CAAC,OAAgB;QAClC,IAAI,OAA4B,CAAC;QACjC,IAAI,OAAO,CAAC,iBAAiB,YAAY,iBAAiB,EAAE;YAC3D,OAAO,GAAG,OAAO,CAAC,iBAAiB,CAAC,oBAAoB,CAAC,mBAAmB,CAAwB,CAAC;SACrG;QACD,IAAI,OAAO,OAAO,KAAK,WAAW,EAAE;YACnC,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,mBAAmB,EAAE,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;SACjE;QAED,OAAO,OAAO,CAAC;IAChB,CAAC;IAED;;;;;;OAMG;IACU,OAAO,CAAC,OAAgB;;YACpC,MAAM,mBAAmB,GAAwB,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;YAC1E,OAAO,MAAM,IAAI,CAAC,WAAW,CAAC,mBAAmB,EAAE,OAAO,CAAC,CAAC;QAC7D,CAAC;KAAA;IAED;;;;;OAKG;IACI,OAAO,CAAC,IAAgB;QAC9B,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC;IAC5B,CAAC;CACD"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/HTTPMessageHandler.d.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/HTTPMessageHandler.d.ts deleted file mode 100644 index 14b30de..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/HTTPMessageHandler.d.ts +++ /dev/null @@ -1,26 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -/** - * @module HTTPMessageHandler - */ -import { Context } from "../IContext"; -import { Middleware } from "./IMiddleware"; -/** - * @class - * @implements Middleware - * Class for HTTPMessageHandler - */ -export declare class HTTPMessageHandler implements Middleware { - /** - * @public - * @async - * To execute the current middleware - * @param {Context} context - The request context object - * @returns A promise that resolves to nothing - */ - execute(context: Context): Promise; -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/HTTPMessageHandler.js b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/HTTPMessageHandler.js deleted file mode 100644 index 4c946d8..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/HTTPMessageHandler.js +++ /dev/null @@ -1,27 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -import { __awaiter } from "tslib"; -/** - * @class - * @implements Middleware - * Class for HTTPMessageHandler - */ -export class HTTPMessageHandler { - /** - * @public - * @async - * To execute the current middleware - * @param {Context} context - The request context object - * @returns A promise that resolves to nothing - */ - execute(context) { - return __awaiter(this, void 0, void 0, function* () { - context.response = yield fetch(context.request, context.options); - }); - } -} -//# sourceMappingURL=HTTPMessageHandler.js.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/HTTPMessageHandler.js.map b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/HTTPMessageHandler.js.map deleted file mode 100644 index 016e29b..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/HTTPMessageHandler.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"HTTPMessageHandler.js","sourceRoot":"","sources":["../../../../src/middleware/HTTPMessageHandler.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AASH;;;;GAIG;AACH,MAAM,OAAO,kBAAkB;IAC9B;;;;;;OAMG;IACU,OAAO,CAAC,OAAgB;;YACpC,OAAO,CAAC,QAAQ,GAAG,MAAM,KAAK,CAAC,OAAO,CAAC,OAAO,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;QAClE,CAAC;KAAA;CACD"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/IMiddleware.d.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/IMiddleware.d.ts deleted file mode 100644 index 878ea9b..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/IMiddleware.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -import { Context } from "../IContext"; -/** - * @interface - * @property {Function} execute - The method to execute the middleware - * @property {Function} [setNext] - A method to set the next middleware in the chain - */ -export interface Middleware { - execute: (context: Context) => Promise; - setNext?: (middleware: Middleware) => void; -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/IMiddleware.js b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/IMiddleware.js deleted file mode 100644 index 45d1919..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/IMiddleware.js +++ /dev/null @@ -1,8 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -export {}; -//# sourceMappingURL=IMiddleware.js.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/IMiddleware.js.map b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/IMiddleware.js.map deleted file mode 100644 index 5f18bc6..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/IMiddleware.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"IMiddleware.js","sourceRoot":"","sources":["../../../../src/middleware/IMiddleware.ts"],"names":[],"mappings":"AAAA;;;;;GAKG"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/MiddlewareControl.d.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/MiddlewareControl.d.ts deleted file mode 100644 index 8fff536..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/MiddlewareControl.d.ts +++ /dev/null @@ -1,48 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -/** - * @module MiddlewareControl - */ -import { MiddlewareOptions } from "./options/IMiddlewareOptions"; -/** - * @class - * Class representing MiddlewareControl - */ -export declare class MiddlewareControl { - /** - * @private - * A member holding map of MiddlewareOptions - */ - private middlewareOptions; - /** - * @public - * @constructor - * Creates an instance of MiddlewareControl - * @param {MiddlewareOptions[]} [middlewareOptions = []] - The array of middlewareOptions - * @returns The instance of MiddlewareControl - */ - constructor(middlewareOptions?: MiddlewareOptions[]); - /** - * @public - * To get the middleware option using the class of the option - * @param {Function} fn - The class of the strongly typed option class - * @returns The middleware option - * @example - * // if you wanted to return the middleware option associated with this class (MiddlewareControl) - * // call this function like this: - * getMiddlewareOptions(MiddlewareControl) - */ - getMiddlewareOptions(fn: Function): MiddlewareOptions; - /** - * @public - * To set the middleware options using the class of the option - * @param {Function} fn - The class of the strongly typed option class - * @param {MiddlewareOptions} option - The strongly typed middleware option - * @returns nothing - */ - setMiddlewareOptions(fn: Function, option: MiddlewareOptions): void; -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/MiddlewareControl.js b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/MiddlewareControl.js deleted file mode 100644 index ba1dd77..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/MiddlewareControl.js +++ /dev/null @@ -1,50 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -/** - * @class - * Class representing MiddlewareControl - */ -export class MiddlewareControl { - /** - * @public - * @constructor - * Creates an instance of MiddlewareControl - * @param {MiddlewareOptions[]} [middlewareOptions = []] - The array of middlewareOptions - * @returns The instance of MiddlewareControl - */ - constructor(middlewareOptions = []) { - this.middlewareOptions = new Map(); - for (const option of middlewareOptions) { - const fn = option.constructor; - this.middlewareOptions.set(fn, option); - } - } - /** - * @public - * To get the middleware option using the class of the option - * @param {Function} fn - The class of the strongly typed option class - * @returns The middleware option - * @example - * // if you wanted to return the middleware option associated with this class (MiddlewareControl) - * // call this function like this: - * getMiddlewareOptions(MiddlewareControl) - */ - getMiddlewareOptions(fn) { - return this.middlewareOptions.get(fn); - } - /** - * @public - * To set the middleware options using the class of the option - * @param {Function} fn - The class of the strongly typed option class - * @param {MiddlewareOptions} option - The strongly typed middleware option - * @returns nothing - */ - setMiddlewareOptions(fn, option) { - this.middlewareOptions.set(fn, option); - } -} -//# sourceMappingURL=MiddlewareControl.js.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/MiddlewareControl.js.map b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/MiddlewareControl.js.map deleted file mode 100644 index 1444537..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/MiddlewareControl.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"MiddlewareControl.js","sourceRoot":"","sources":["../../../../src/middleware/MiddlewareControl.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAQH;;;GAGG;AACH,MAAM,OAAO,iBAAiB;IAO7B;;;;;;OAMG;IACH,YAAmB,oBAAyC,EAAE;QAC7D,IAAI,CAAC,iBAAiB,GAAG,IAAI,GAAG,EAA+B,CAAC;QAChE,KAAK,MAAM,MAAM,IAAI,iBAAiB,EAAE;YACvC,MAAM,EAAE,GAAG,MAAM,CAAC,WAAW,CAAC;YAC9B,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC;SACvC;IACF,CAAC;IAED;;;;;;;;;OASG;IACI,oBAAoB,CAAC,EAAY;QACvC,OAAO,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IACvC,CAAC;IAED;;;;;;OAMG;IACI,oBAAoB,CAAC,EAAY,EAAE,MAAyB;QAClE,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC;IACxC,CAAC;CACD"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/MiddlewareFactory.d.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/MiddlewareFactory.d.ts deleted file mode 100644 index 71d9170..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/MiddlewareFactory.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -/** - * @module MiddlewareFactory - */ -import { AuthenticationProvider } from "../IAuthenticationProvider"; -import { Middleware } from "./IMiddleware"; -/** - * @class - * Class containing function(s) related to the middleware pipelines. - */ -export declare class MiddlewareFactory { - /** - * @public - * @static - * Returns the default middleware chain an array with the middleware handlers - * @param {AuthenticationProvider} authProvider - The authentication provider instance - * @returns an array of the middleware handlers of the default middleware chain - */ - static getDefaultMiddlewareChain(authProvider: AuthenticationProvider): Middleware[]; -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/MiddlewareFactory.js b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/MiddlewareFactory.js deleted file mode 100644 index bd28211..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/MiddlewareFactory.js +++ /dev/null @@ -1,51 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -import { AuthenticationHandler } from "./AuthenticationHandler"; -import { HTTPMessageHandler } from "./HTTPMessageHandler"; -import { RedirectHandlerOptions } from "./options/RedirectHandlerOptions"; -import { RetryHandlerOptions } from "./options/RetryHandlerOptions"; -import { RedirectHandler } from "./RedirectHandler"; -import { RetryHandler } from "./RetryHandler"; -import { TelemetryHandler } from "./TelemetryHandler"; -/** - * @private - * To check whether the environment is node or not - * @returns A boolean representing the environment is node or not - */ -const isNodeEnvironment = () => { - return typeof process === "object" && typeof require === "function"; -}; -/** - * @class - * Class containing function(s) related to the middleware pipelines. - */ -export class MiddlewareFactory { - /** - * @public - * @static - * Returns the default middleware chain an array with the middleware handlers - * @param {AuthenticationProvider} authProvider - The authentication provider instance - * @returns an array of the middleware handlers of the default middleware chain - */ - static getDefaultMiddlewareChain(authProvider) { - const middleware = []; - const authenticationHandler = new AuthenticationHandler(authProvider); - const retryHandler = new RetryHandler(new RetryHandlerOptions()); - const telemetryHandler = new TelemetryHandler(); - const httpMessageHandler = new HTTPMessageHandler(); - middleware.push(authenticationHandler); - middleware.push(retryHandler); - if (isNodeEnvironment()) { - const redirectHandler = new RedirectHandler(new RedirectHandlerOptions()); - middleware.push(redirectHandler); - } - middleware.push(telemetryHandler); - middleware.push(httpMessageHandler); - return middleware; - } -} -//# sourceMappingURL=MiddlewareFactory.js.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/MiddlewareFactory.js.map b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/MiddlewareFactory.js.map deleted file mode 100644 index d197e78..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/MiddlewareFactory.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"MiddlewareFactory.js","sourceRoot":"","sources":["../../../../src/middleware/MiddlewareFactory.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAOH,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D,OAAO,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;AAC1E,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AACpE,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEtD;;;;GAIG;AACH,MAAM,iBAAiB,GAAG,GAAY,EAAE;IACvC,OAAO,OAAO,OAAO,KAAK,QAAQ,IAAI,OAAO,OAAO,KAAK,UAAU,CAAC;AACrE,CAAC,CAAC;AAEF;;;GAGG;AACH,MAAM,OAAO,iBAAiB;IAC7B;;;;;;OAMG;IACI,MAAM,CAAC,yBAAyB,CAAC,YAAoC;QAC3E,MAAM,UAAU,GAAiB,EAAE,CAAC;QACpC,MAAM,qBAAqB,GAAG,IAAI,qBAAqB,CAAC,YAAY,CAAC,CAAC;QACtE,MAAM,YAAY,GAAG,IAAI,YAAY,CAAC,IAAI,mBAAmB,EAAE,CAAC,CAAC;QACjE,MAAM,gBAAgB,GAAG,IAAI,gBAAgB,EAAE,CAAC;QAChD,MAAM,kBAAkB,GAAG,IAAI,kBAAkB,EAAE,CAAC;QAEpD,UAAU,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAC;QACvC,UAAU,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QAC9B,IAAI,iBAAiB,EAAE,EAAE;YACxB,MAAM,eAAe,GAAG,IAAI,eAAe,CAAC,IAAI,sBAAsB,EAAE,CAAC,CAAC;YAC1E,UAAU,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;SACjC;QACD,UAAU,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;QAClC,UAAU,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC;QAEpC,OAAO,UAAU,CAAC;IACnB,CAAC;CACD"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/MiddlewareUtil.d.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/MiddlewareUtil.d.ts deleted file mode 100644 index 502c12f..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/MiddlewareUtil.d.ts +++ /dev/null @@ -1,53 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -/** - * @module MiddlewareUtil - */ -import { FetchOptions } from "../IFetchOptions"; -/** - * @constant - * To generate the UUID - * @returns The UUID string - */ -export declare const generateUUID: () => string; -/** - * @constant - * To get the request header from the request - * @param {RequestInfo} request - The request object or the url string - * @param {FetchOptions|undefined} options - The request options object - * @param {string} key - The header key string - * @returns A header value for the given key from the request - */ -export declare const getRequestHeader: (request: RequestInfo, options: FetchOptions | undefined, key: string) => string | null; -/** - * @constant - * To set the header value to the given request - * @param {RequestInfo} request - The request object or the url string - * @param {FetchOptions|undefined} options - The request options object - * @param {string} key - The header key string - * @param {string } value - The header value string - * @returns Nothing - */ -export declare const setRequestHeader: (request: RequestInfo, options: FetchOptions | undefined, key: string, value: string) => void; -/** - * @constant - * To append the header value to the given request - * @param {RequestInfo} request - The request object or the url string - * @param {FetchOptions|undefined} options - The request options object - * @param {string} key - The header key string - * @param {string } value - The header value string - * @returns Nothing - */ -export declare const appendRequestHeader: (request: RequestInfo, options: FetchOptions | undefined, key: string, value: string) => void; -/** - * @constant - * To clone the request with the new url - * @param {string} url - The new url string - * @param {Request} request - The request object - * @returns A promise that resolves to request object - */ -export declare const cloneRequestWithNewUrl: (newUrl: string, request: Request) => Promise; diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/MiddlewareUtil.js b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/MiddlewareUtil.js deleted file mode 100644 index dbf12e9..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/MiddlewareUtil.js +++ /dev/null @@ -1,148 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -import { __awaiter } from "tslib"; -/** - * @constant - * To generate the UUID - * @returns The UUID string - */ -export const generateUUID = () => { - let uuid = ""; - for (let j = 0; j < 32; j++) { - if (j === 8 || j === 12 || j === 16 || j === 20) { - uuid += "-"; - } - uuid += Math.floor(Math.random() * 16).toString(16); - } - return uuid; -}; -/** - * @constant - * To get the request header from the request - * @param {RequestInfo} request - The request object or the url string - * @param {FetchOptions|undefined} options - The request options object - * @param {string} key - The header key string - * @returns A header value for the given key from the request - */ -export const getRequestHeader = (request, options, key) => { - let value = null; - if (typeof Request !== "undefined" && request instanceof Request) { - value = request.headers.get(key); - } - else if (typeof options !== "undefined" && options.headers !== undefined) { - if (typeof Headers !== "undefined" && options.headers instanceof Headers) { - value = options.headers.get(key); - } - else if (options.headers instanceof Array) { - const headers = options.headers; - for (let i = 0, l = headers.length; i < l; i++) { - if (headers[i][0] === key) { - value = headers[i][1]; - break; - } - } - } - else if (options.headers[key] !== undefined) { - value = options.headers[key]; - } - } - return value; -}; -/** - * @constant - * To set the header value to the given request - * @param {RequestInfo} request - The request object or the url string - * @param {FetchOptions|undefined} options - The request options object - * @param {string} key - The header key string - * @param {string } value - The header value string - * @returns Nothing - */ -export const setRequestHeader = (request, options, key, value) => { - if (typeof Request !== "undefined" && request instanceof Request) { - request.headers.set(key, value); - } - else if (typeof options !== "undefined") { - if (options.headers === undefined) { - options.headers = new Headers({ - [key]: value, - }); - } - else { - if (typeof Headers !== "undefined" && options.headers instanceof Headers) { - options.headers.set(key, value); - } - else if (options.headers instanceof Array) { - let i = 0; - const l = options.headers.length; - for (; i < l; i++) { - const header = options.headers[i]; - if (header[0] === key) { - header[1] = value; - break; - } - } - if (i === l) { - options.headers.push([key, value]); - } - } - else { - Object.assign(options.headers, { [key]: value }); - } - } - } -}; -/** - * @constant - * To append the header value to the given request - * @param {RequestInfo} request - The request object or the url string - * @param {FetchOptions|undefined} options - The request options object - * @param {string} key - The header key string - * @param {string } value - The header value string - * @returns Nothing - */ -export const appendRequestHeader = (request, options, key, value) => { - if (typeof Request !== "undefined" && request instanceof Request) { - request.headers.append(key, value); - } - else if (typeof options !== "undefined") { - if (options.headers === undefined) { - options.headers = new Headers({ - [key]: value, - }); - } - else { - if (typeof Headers !== "undefined" && options.headers instanceof Headers) { - options.headers.append(key, value); - } - else if (options.headers instanceof Array) { - options.headers.push([key, value]); - } - else if (options.headers === undefined) { - options.headers = { [key]: value }; - } - else if (options.headers[key] === undefined) { - options.headers[key] = value; - } - else { - options.headers[key] += `, ${value}`; - } - } - } -}; -/** - * @constant - * To clone the request with the new url - * @param {string} url - The new url string - * @param {Request} request - The request object - * @returns A promise that resolves to request object - */ -export const cloneRequestWithNewUrl = (newUrl, request) => __awaiter(void 0, void 0, void 0, function* () { - const body = request.headers.get("Content-Type") ? yield request.blob() : yield Promise.resolve(undefined); - const { method, headers, referrer, referrerPolicy, mode, credentials, cache, redirect, integrity, keepalive, signal } = request; - return new Request(newUrl, { method, headers, body, referrer, referrerPolicy, mode, credentials, cache, redirect, integrity, keepalive, signal }); -}); -//# sourceMappingURL=MiddlewareUtil.js.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/MiddlewareUtil.js.map b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/MiddlewareUtil.js.map deleted file mode 100644 index 937ffd8..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/MiddlewareUtil.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"MiddlewareUtil.js","sourceRoot":"","sources":["../../../../src/middleware/MiddlewareUtil.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAQH;;;;GAIG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,GAAW,EAAE;IACxC,IAAI,IAAI,GAAG,EAAE,CAAC;IACd,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,EAAE,EAAE;QAC5B,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,EAAE;YAChD,IAAI,IAAI,GAAG,CAAC;SACZ;QACD,IAAI,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;KACpD;IACD,OAAO,IAAI,CAAC;AACb,CAAC,CAAC;AAEF;;;;;;;GAOG;AAC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,GAAG,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,MAAM,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,MAAM,OAAO,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IAC3G,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC;IAChI,OAAO,IAAI,OAAO,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,cAAc,EAAE,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,EAAE,CAAC,CAAC;AACnJ,CAAC,CAAA,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/RedirectHandler.d.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/RedirectHandler.d.ts deleted file mode 100644 index d01bb4b..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/RedirectHandler.d.ts +++ /dev/null @@ -1,145 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -/** - * @module RedirectHandler - */ -import { Context } from "../IContext"; -import { Middleware } from "./IMiddleware"; -import { RedirectHandlerOptions } from "./options/RedirectHandlerOptions"; -/** - * @class - * Class - * @implements Middleware - * Class representing RedirectHandler - */ -export declare class RedirectHandler implements Middleware { - /** - * @private - * @static - * A member holding the array of redirect status codes - */ - private static REDIRECT_STATUS_CODES; - /** - * @private - * @static - * A member holding SeeOther status code - */ - private static STATUS_CODE_SEE_OTHER; - /** - * @private - * @static - * A member holding the name of the location header - */ - private static LOCATION_HEADER; - /** - * @private - * @static - * A member representing the authorization header name - */ - private static AUTHORIZATION_HEADER; - /** - * @private - * @static - * A member holding the manual redirect value - */ - private static MANUAL_REDIRECT; - /** - * @private - * A member holding options to customize the handler behavior - */ - private options; - /** - * @private - * A member to hold next middleware in the middleware chain - */ - private nextMiddleware; - /** - * @public - * @constructor - * To create an instance of RedirectHandler - * @param {RedirectHandlerOptions} [options = new RedirectHandlerOptions()] - The redirect handler options instance - * @returns An instance of RedirectHandler - */ - constructor(options?: RedirectHandlerOptions); - /** - * @private - * To check whether the response has the redirect status code or not - * @param {Response} response - The response object - * @returns A boolean representing whether the response contains the redirect status code or not - */ - private isRedirect; - /** - * @private - * To check whether the response has location header or not - * @param {Response} response - The response object - * @returns A boolean representing the whether the response has location header or not - */ - private hasLocationHeader; - /** - * @private - * To get the redirect url from location header in response object - * @param {Response} response - The response object - * @returns A redirect url from location header - */ - private getLocationHeader; - /** - * @private - * To check whether the given url is a relative url or not - * @param {string} url - The url string value - * @returns A boolean representing whether the given url is a relative url or not - */ - private isRelativeURL; - /** - * @private - * To check whether the authorization header in the request should be dropped for consequent redirected requests - * @param {string} requestUrl - The request url value - * @param {string} redirectUrl - The redirect url value - * @returns A boolean representing whether the authorization header in the request should be dropped for consequent redirected requests - */ - private shouldDropAuthorizationHeader; - /** - * @private - * @async - * To update a request url with the redirect url - * @param {string} redirectUrl - The redirect url value - * @param {Context} context - The context object value - * @returns Nothing - */ - private updateRequestUrl; - /** - * @private - * To get the options for execution of the middleware - * @param {Context} context - The context object - * @returns A options for middleware execution - */ - private getOptions; - /** - * @private - * @async - * To execute the next middleware and to handle in case of redirect response returned by the server - * @param {Context} context - The context object - * @param {number} redirectCount - The redirect count value - * @param {RedirectHandlerOptions} options - The redirect handler options instance - * @returns A promise that resolves to nothing - */ - private executeWithRedirect; - /** - * @public - * @async - * To execute the current middleware - * @param {Context} context - The context object of the request - * @returns A Promise that resolves to nothing - */ - execute(context: Context): Promise; - /** - * @public - * To set the next middleware in the chain - * @param {Middleware} next - The middleware instance - * @returns Nothing - */ - setNext(next: Middleware): void; -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/RedirectHandler.js b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/RedirectHandler.js deleted file mode 100644 index 9a1e04f..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/RedirectHandler.js +++ /dev/null @@ -1,211 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -import { __awaiter } from "tslib"; -import { RequestMethod } from "../RequestMethod"; -import { MiddlewareControl } from "./MiddlewareControl"; -import { cloneRequestWithNewUrl } from "./MiddlewareUtil"; -import { RedirectHandlerOptions } from "./options/RedirectHandlerOptions"; -import { FeatureUsageFlag, TelemetryHandlerOptions } from "./options/TelemetryHandlerOptions"; -/** - * @class - * Class - * @implements Middleware - * Class representing RedirectHandler - */ -export class RedirectHandler { - /** - * @public - * @constructor - * To create an instance of RedirectHandler - * @param {RedirectHandlerOptions} [options = new RedirectHandlerOptions()] - The redirect handler options instance - * @returns An instance of RedirectHandler - */ - constructor(options = new RedirectHandlerOptions()) { - this.options = options; - } - /** - * @private - * To check whether the response has the redirect status code or not - * @param {Response} response - The response object - * @returns A boolean representing whether the response contains the redirect status code or not - */ - isRedirect(response) { - return RedirectHandler.REDIRECT_STATUS_CODES.indexOf(response.status) !== -1; - } - /** - * @private - * To check whether the response has location header or not - * @param {Response} response - The response object - * @returns A boolean representing the whether the response has location header or not - */ - hasLocationHeader(response) { - return response.headers.has(RedirectHandler.LOCATION_HEADER); - } - /** - * @private - * To get the redirect url from location header in response object - * @param {Response} response - The response object - * @returns A redirect url from location header - */ - getLocationHeader(response) { - return response.headers.get(RedirectHandler.LOCATION_HEADER); - } - /** - * @private - * To check whether the given url is a relative url or not - * @param {string} url - The url string value - * @returns A boolean representing whether the given url is a relative url or not - */ - isRelativeURL(url) { - return url.indexOf("://") === -1; - } - /** - * @private - * To check whether the authorization header in the request should be dropped for consequent redirected requests - * @param {string} requestUrl - The request url value - * @param {string} redirectUrl - The redirect url value - * @returns A boolean representing whether the authorization header in the request should be dropped for consequent redirected requests - */ - shouldDropAuthorizationHeader(requestUrl, redirectUrl) { - const schemeHostRegex = /^[A-Za-z].+?:\/\/.+?(?=\/|$)/; - const requestMatches = schemeHostRegex.exec(requestUrl); - let requestAuthority; - let redirectAuthority; - if (requestMatches !== null) { - requestAuthority = requestMatches[0]; - } - const redirectMatches = schemeHostRegex.exec(redirectUrl); - if (redirectMatches !== null) { - redirectAuthority = redirectMatches[0]; - } - return typeof requestAuthority !== "undefined" && typeof redirectAuthority !== "undefined" && requestAuthority !== redirectAuthority; - } - /** - * @private - * @async - * To update a request url with the redirect url - * @param {string} redirectUrl - The redirect url value - * @param {Context} context - The context object value - * @returns Nothing - */ - updateRequestUrl(redirectUrl, context) { - return __awaiter(this, void 0, void 0, function* () { - context.request = typeof context.request === "string" ? redirectUrl : yield cloneRequestWithNewUrl(redirectUrl, context.request); - }); - } - /** - * @private - * To get the options for execution of the middleware - * @param {Context} context - The context object - * @returns A options for middleware execution - */ - getOptions(context) { - let options; - if (context.middlewareControl instanceof MiddlewareControl) { - options = context.middlewareControl.getMiddlewareOptions(RedirectHandlerOptions); - } - if (typeof options === "undefined") { - options = Object.assign(new RedirectHandlerOptions(), this.options); - } - return options; - } - /** - * @private - * @async - * To execute the next middleware and to handle in case of redirect response returned by the server - * @param {Context} context - The context object - * @param {number} redirectCount - The redirect count value - * @param {RedirectHandlerOptions} options - The redirect handler options instance - * @returns A promise that resolves to nothing - */ - executeWithRedirect(context, redirectCount, options) { - return __awaiter(this, void 0, void 0, function* () { - yield this.nextMiddleware.execute(context); - const response = context.response; - if (redirectCount < options.maxRedirects && this.isRedirect(response) && this.hasLocationHeader(response) && options.shouldRedirect(response)) { - ++redirectCount; - if (response.status === RedirectHandler.STATUS_CODE_SEE_OTHER) { - context.options.method = RequestMethod.GET; - delete context.options.body; - } - else { - const redirectUrl = this.getLocationHeader(response); - if (!this.isRelativeURL(redirectUrl) && this.shouldDropAuthorizationHeader(response.url, redirectUrl)) { - delete context.options.headers[RedirectHandler.AUTHORIZATION_HEADER]; - } - yield this.updateRequestUrl(redirectUrl, context); - } - yield this.executeWithRedirect(context, redirectCount, options); - } - else { - return; - } - }); - } - /** - * @public - * @async - * To execute the current middleware - * @param {Context} context - The context object of the request - * @returns A Promise that resolves to nothing - */ - execute(context) { - return __awaiter(this, void 0, void 0, function* () { - const redirectCount = 0; - const options = this.getOptions(context); - context.options.redirect = RedirectHandler.MANUAL_REDIRECT; - TelemetryHandlerOptions.updateFeatureUsageFlag(context, FeatureUsageFlag.REDIRECT_HANDLER_ENABLED); - return yield this.executeWithRedirect(context, redirectCount, options); - }); - } - /** - * @public - * To set the next middleware in the chain - * @param {Middleware} next - The middleware instance - * @returns Nothing - */ - setNext(next) { - this.nextMiddleware = next; - } -} -/** - * @private - * @static - * A member holding the array of redirect status codes - */ -RedirectHandler.REDIRECT_STATUS_CODES = [ - 301, - 302, - 303, - 307, - 308, // Moved Permanently -]; -/** - * @private - * @static - * A member holding SeeOther status code - */ -RedirectHandler.STATUS_CODE_SEE_OTHER = 303; -/** - * @private - * @static - * A member holding the name of the location header - */ -RedirectHandler.LOCATION_HEADER = "Location"; -/** - * @private - * @static - * A member representing the authorization header name - */ -RedirectHandler.AUTHORIZATION_HEADER = "Authorization"; -/** - * @private - * @static - * A member holding the manual redirect value - */ -RedirectHandler.MANUAL_REDIRECT = "manual"; -//# sourceMappingURL=RedirectHandler.js.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/RedirectHandler.js.map b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/RedirectHandler.js.map deleted file mode 100644 index 69ffc12..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/RedirectHandler.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"RedirectHandler.js","sourceRoot":"","sources":["../../../../src/middleware/RedirectHandler.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAOH,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;AAC1E,OAAO,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,MAAM,mCAAmC,CAAC;AAE9F;;;;;GAKG;AACH,MAAM,OAAO,eAAe;IAsD3B;;;;;;OAMG;IAEH,YAAmB,UAAkC,IAAI,sBAAsB,EAAE;QAChF,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACxB,CAAC;IAED;;;;;OAKG;IACK,UAAU,CAAC,QAAkB;QACpC,OAAO,eAAe,CAAC,qBAAqB,CAAC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;IAC9E,CAAC;IAED;;;;;OAKG;IACK,iBAAiB,CAAC,QAAkB;QAC3C,OAAO,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,eAAe,CAAC,CAAC;IAC9D,CAAC;IAED;;;;;OAKG;IACK,iBAAiB,CAAC,QAAkB;QAC3C,OAAO,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,eAAe,CAAC,CAAC;IAC9D,CAAC;IAED;;;;;OAKG;IACK,aAAa,CAAC,GAAW;QAChC,OAAO,GAAG,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC;IAClC,CAAC;IAED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,OAAO,CAAC,OAAO,CAAC,QAAQ,GAAG,eAAe,CAAC,eAAe,CAAC;YAC3D,uBAAuB,CAAC,sBAAsB,CAAC,OAAO,EAAE,gBAAgB,CAAC,wBAAwB,CAAC,CAAC;YACnG,OAAO,MAAM,IAAI,CAAC,mBAAmB,CAAC,OAAO,EAAE,aAAa,EAAE,OAAO,CAAC,CAAC;QACxE,CAAC;KAAA;IAED;;;;;OAKG;IACI,OAAO,CAAC,IAAgB;QAC9B,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC;IAC5B,CAAC;;AAjND;;;;GAIG;AACY,qCAAqB,GAAa;IAChD,GAAG;IACH,GAAG;IACH,GAAG;IACH,GAAG;IACH,GAAG,EAAE,oBAAoB;CACzB,CAAC;AAEF;;;;GAIG;AACY,qCAAqB,GAAG,GAAG,CAAC;AAE3C;;;;GAIG;AACY,+BAAe,GAAG,UAAU,CAAC;AAE5C;;;;GAIG;AACY,oCAAoB,GAAG,eAAe,CAAC;AAEtD;;;;GAIG;AACY,+BAAe,GAAoB,QAAQ,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/RetryHandler.d.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/RetryHandler.d.ts deleted file mode 100644 index 996496f..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/RetryHandler.d.ts +++ /dev/null @@ -1,121 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -/** - * @module RetryHandler - */ -import { Context } from "../IContext"; -import { Middleware } from "./IMiddleware"; -import { RetryHandlerOptions } from "./options/RetryHandlerOptions"; -/** - * @class - * @implements Middleware - * Class for RetryHandler - */ -export declare class RetryHandler implements Middleware { - /** - * @private - * @static - * A list of status codes that needs to be retried - */ - private static RETRY_STATUS_CODES; - /** - * @private - * @static - * A member holding the name of retry attempt header - */ - private static RETRY_ATTEMPT_HEADER; - /** - * @private - * @static - * A member holding the name of retry after header - */ - private static RETRY_AFTER_HEADER; - /** - * @private - * A member to hold next middleware in the middleware chain - */ - private nextMiddleware; - /** - * @private - * A member holding the retry handler options - */ - private options; - /** - * @public - * @constructor - * To create an instance of RetryHandler - * @param {RetryHandlerOptions} [options = new RetryHandlerOptions()] - The retry handler options value - * @returns An instance of RetryHandler - */ - constructor(options?: RetryHandlerOptions); - /** - * - * @private - * To check whether the response has the retry status code - * @param {Response} response - The response object - * @returns Whether the response has retry status code or not - */ - private isRetry; - /** - * @private - * To check whether the payload is buffered or not - * @param {RequestInfo} request - The url string or the request object value - * @param {FetchOptions} options - The options of a request - * @returns Whether the payload is buffered or not - */ - private isBuffered; - /** - * @private - * To get the delay for a retry - * @param {Response} response - The response object - * @param {number} retryAttempts - The current attempt count - * @param {number} delay - The delay value in seconds - * @returns A delay for a retry - */ - private getDelay; - /** - * @private - * To get an exponential back off value - * @param {number} attempts - The current attempt count - * @returns An exponential back off value - */ - private getExponentialBackOffTime; - /** - * @private - * @async - * To add delay for the execution - * @param {number} delaySeconds - The delay value in seconds - * @returns Nothing - */ - private sleep; - private getOptions; - /** - * @private - * @async - * To execute the middleware with retries - * @param {Context} context - The context object - * @param {number} retryAttempts - The current attempt count - * @param {RetryHandlerOptions} options - The retry middleware options instance - * @returns A Promise that resolves to nothing - */ - private executeWithRetry; - /** - * @public - * @async - * To execute the current middleware - * @param {Context} context - The context object of the request - * @returns A Promise that resolves to nothing - */ - execute(context: Context): Promise; - /** - * @public - * To set the next middleware in the chain - * @param {Middleware} next - The middleware instance - * @returns Nothing - */ - setNext(next: Middleware): void; -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/RetryHandler.js b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/RetryHandler.js deleted file mode 100644 index 235ebec..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/RetryHandler.js +++ /dev/null @@ -1,186 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -import { __awaiter } from "tslib"; -import { RequestMethod } from "../RequestMethod"; -import { MiddlewareControl } from "./MiddlewareControl"; -import { getRequestHeader, setRequestHeader } from "./MiddlewareUtil"; -import { RetryHandlerOptions } from "./options/RetryHandlerOptions"; -import { FeatureUsageFlag, TelemetryHandlerOptions } from "./options/TelemetryHandlerOptions"; -/** - * @class - * @implements Middleware - * Class for RetryHandler - */ -export class RetryHandler { - /** - * @public - * @constructor - * To create an instance of RetryHandler - * @param {RetryHandlerOptions} [options = new RetryHandlerOptions()] - The retry handler options value - * @returns An instance of RetryHandler - */ - constructor(options = new RetryHandlerOptions()) { - this.options = options; - } - /** - * - * @private - * To check whether the response has the retry status code - * @param {Response} response - The response object - * @returns Whether the response has retry status code or not - */ - isRetry(response) { - return RetryHandler.RETRY_STATUS_CODES.indexOf(response.status) !== -1; - } - /** - * @private - * To check whether the payload is buffered or not - * @param {RequestInfo} request - The url string or the request object value - * @param {FetchOptions} options - The options of a request - * @returns Whether the payload is buffered or not - */ - isBuffered(request, options) { - const method = typeof request === "string" ? options.method : request.method; - const isPutPatchOrPost = method === RequestMethod.PUT || method === RequestMethod.PATCH || method === RequestMethod.POST; - if (isPutPatchOrPost) { - const isStream = getRequestHeader(request, options, "Content-Type") === "application/octet-stream"; - if (isStream) { - return false; - } - } - return true; - } - /** - * @private - * To get the delay for a retry - * @param {Response} response - The response object - * @param {number} retryAttempts - The current attempt count - * @param {number} delay - The delay value in seconds - * @returns A delay for a retry - */ - getDelay(response, retryAttempts, delay) { - const getRandomness = () => Number(Math.random().toFixed(3)); - const retryAfter = response.headers !== undefined ? response.headers.get(RetryHandler.RETRY_AFTER_HEADER) : null; - let newDelay; - if (retryAfter !== null) { - if (Number.isNaN(Number(retryAfter))) { - newDelay = Math.round((new Date(retryAfter).getTime() - Date.now()) / 1000); - } - else { - newDelay = Number(retryAfter); - } - } - else { - // Adding randomness to avoid retrying at a same - newDelay = retryAttempts >= 2 ? this.getExponentialBackOffTime(retryAttempts) + delay + getRandomness() : delay + getRandomness(); - } - return Math.min(newDelay, this.options.getMaxDelay() + getRandomness()); - } - /** - * @private - * To get an exponential back off value - * @param {number} attempts - The current attempt count - * @returns An exponential back off value - */ - getExponentialBackOffTime(attempts) { - return Math.round((1 / 2) * (Math.pow(2, attempts) - 1)); - } - /** - * @private - * @async - * To add delay for the execution - * @param {number} delaySeconds - The delay value in seconds - * @returns Nothing - */ - sleep(delaySeconds) { - return __awaiter(this, void 0, void 0, function* () { - const delayMilliseconds = delaySeconds * 1000; - return new Promise((resolve) => setTimeout(resolve, delayMilliseconds)); - }); - } - getOptions(context) { - let options; - if (context.middlewareControl instanceof MiddlewareControl) { - options = context.middlewareControl.getMiddlewareOptions(this.options.constructor); - } - if (typeof options === "undefined") { - options = Object.assign(new RetryHandlerOptions(), this.options); - } - return options; - } - /** - * @private - * @async - * To execute the middleware with retries - * @param {Context} context - The context object - * @param {number} retryAttempts - The current attempt count - * @param {RetryHandlerOptions} options - The retry middleware options instance - * @returns A Promise that resolves to nothing - */ - executeWithRetry(context, retryAttempts, options) { - return __awaiter(this, void 0, void 0, function* () { - yield this.nextMiddleware.execute(context); - if (retryAttempts < options.maxRetries && this.isRetry(context.response) && this.isBuffered(context.request, context.options) && options.shouldRetry(options.delay, retryAttempts, context.request, context.options, context.response)) { - ++retryAttempts; - setRequestHeader(context.request, context.options, RetryHandler.RETRY_ATTEMPT_HEADER, retryAttempts.toString()); - const delay = this.getDelay(context.response, retryAttempts, options.delay); - yield this.sleep(delay); - return yield this.executeWithRetry(context, retryAttempts, options); - } - else { - return; - } - }); - } - /** - * @public - * @async - * To execute the current middleware - * @param {Context} context - The context object of the request - * @returns A Promise that resolves to nothing - */ - execute(context) { - return __awaiter(this, void 0, void 0, function* () { - const retryAttempts = 0; - const options = this.getOptions(context); - TelemetryHandlerOptions.updateFeatureUsageFlag(context, FeatureUsageFlag.RETRY_HANDLER_ENABLED); - return yield this.executeWithRetry(context, retryAttempts, options); - }); - } - /** - * @public - * To set the next middleware in the chain - * @param {Middleware} next - The middleware instance - * @returns Nothing - */ - setNext(next) { - this.nextMiddleware = next; - } -} -/** - * @private - * @static - * A list of status codes that needs to be retried - */ -RetryHandler.RETRY_STATUS_CODES = [ - 429, - 503, - 504, // Gateway timeout -]; -/** - * @private - * @static - * A member holding the name of retry attempt header - */ -RetryHandler.RETRY_ATTEMPT_HEADER = "Retry-Attempt"; -/** - * @private - * @static - * A member holding the name of retry after header - */ -RetryHandler.RETRY_AFTER_HEADER = "Retry-After"; -//# sourceMappingURL=RetryHandler.js.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/RetryHandler.js.map b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/RetryHandler.js.map deleted file mode 100644 index 84cf8f9..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/RetryHandler.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"RetryHandler.js","sourceRoot":"","sources":["../../../../src/middleware/RetryHandler.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAQH,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACtE,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,MAAM,mCAAmC,CAAC;AAE9F;;;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AAC;YACxB,MAAM,OAAO,GAAwB,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;YAC9D,uBAAuB,CAAC,sBAAsB,CAAC,OAAO,EAAE,gBAAgB,CAAC,qBAAqB,CAAC,CAAC;YAChG,OAAO,MAAM,IAAI,CAAC,gBAAgB,CAAC,OAAO,EAAE,aAAa,EAAE,OAAO,CAAC,CAAC;QACrE,CAAC;KAAA;IAED;;;;;OAKG;IACI,OAAO,CAAC,IAAgB;QAC9B,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC;IAC5B,CAAC;;AApLD;;;;GAIG;AACY,+BAAkB,GAAa;IAC7C,GAAG;IACH,GAAG;IACH,GAAG,EAAE,kBAAkB;CACvB,CAAC;AAEF;;;;GAIG;AACY,iCAAoB,GAAG,eAAe,CAAC;AAEtD;;;;GAIG;AACY,+BAAkB,GAAG,aAAa,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/TelemetryHandler.d.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/TelemetryHandler.d.ts deleted file mode 100644 index ba84cbb..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/TelemetryHandler.d.ts +++ /dev/null @@ -1,59 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -import { Context } from "../IContext"; -import { Middleware } from "./IMiddleware"; -/** - * @class - * @implements Middleware - * Class for TelemetryHandler - */ -export declare class TelemetryHandler implements Middleware { - /** - * @private - * @static - * A member holding the name of the client request id header - */ - private static CLIENT_REQUEST_ID_HEADER; - /** - * @private - * @static - * A member holding the name of the sdk version header - */ - private static SDK_VERSION_HEADER; - /** - * @private - * @static - * A member holding the language prefix for the sdk version header value - */ - private static PRODUCT_NAME; - /** - * @private - * @static - * A member holding the key for the feature usage metrics - */ - private static FEATURE_USAGE_STRING; - /** - * @private - * A member to hold next middleware in the middleware chain - */ - private nextMiddleware; - /** - * @public - * @async - * To execute the current middleware - * @param {Context} context - The context object of the request - * @returns A Promise that resolves to nothing - */ - execute(context: Context): Promise; - /** - * @public - * To set the next middleware in the chain - * @param {Middleware} next - The middleware instance - * @returns Nothing - */ - setNext(next: Middleware): void; -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/TelemetryHandler.js b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/TelemetryHandler.js deleted file mode 100644 index a070f27..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/TelemetryHandler.js +++ /dev/null @@ -1,93 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -import { __awaiter } from "tslib"; -/** - * @module TelemetryHandler - */ -import { isCustomHost, isGraphURL } from "../GraphRequestUtil"; -import { PACKAGE_VERSION } from "../Version"; -import { MiddlewareControl } from "./MiddlewareControl"; -import { appendRequestHeader, generateUUID, getRequestHeader, setRequestHeader } from "./MiddlewareUtil"; -import { TelemetryHandlerOptions } from "./options/TelemetryHandlerOptions"; -/** - * @class - * @implements Middleware - * Class for TelemetryHandler - */ -export class TelemetryHandler { - /** - * @public - * @async - * To execute the current middleware - * @param {Context} context - The context object of the request - * @returns A Promise that resolves to nothing - */ - execute(context) { - return __awaiter(this, void 0, void 0, function* () { - const url = typeof context.request === "string" ? context.request : context.request.url; - if (isGraphURL(url) || (context.customHosts && isCustomHost(url, context.customHosts))) { - // Add telemetry only if the request url is a Graph URL. - // Errors are reported as in issue #265 if headers are present when redirecting to a non Graph URL - let clientRequestId = getRequestHeader(context.request, context.options, TelemetryHandler.CLIENT_REQUEST_ID_HEADER); - if (!clientRequestId) { - clientRequestId = generateUUID(); - setRequestHeader(context.request, context.options, TelemetryHandler.CLIENT_REQUEST_ID_HEADER, clientRequestId); - } - let sdkVersionValue = `${TelemetryHandler.PRODUCT_NAME}/${PACKAGE_VERSION}`; - let options; - if (context.middlewareControl instanceof MiddlewareControl) { - options = context.middlewareControl.getMiddlewareOptions(TelemetryHandlerOptions); - } - if (options) { - const featureUsage = options.getFeatureUsage(); - sdkVersionValue += ` (${TelemetryHandler.FEATURE_USAGE_STRING}=${featureUsage})`; - } - appendRequestHeader(context.request, context.options, TelemetryHandler.SDK_VERSION_HEADER, sdkVersionValue); - } - else { - // Remove telemetry headers if present during redirection. - delete context.options.headers[TelemetryHandler.CLIENT_REQUEST_ID_HEADER]; - delete context.options.headers[TelemetryHandler.SDK_VERSION_HEADER]; - } - return yield this.nextMiddleware.execute(context); - }); - } - /** - * @public - * To set the next middleware in the chain - * @param {Middleware} next - The middleware instance - * @returns Nothing - */ - setNext(next) { - this.nextMiddleware = next; - } -} -/** - * @private - * @static - * A member holding the name of the client request id header - */ -TelemetryHandler.CLIENT_REQUEST_ID_HEADER = "client-request-id"; -/** - * @private - * @static - * A member holding the name of the sdk version header - */ -TelemetryHandler.SDK_VERSION_HEADER = "SdkVersion"; -/** - * @private - * @static - * A member holding the language prefix for the sdk version header value - */ -TelemetryHandler.PRODUCT_NAME = "graph-js"; -/** - * @private - * @static - * A member holding the key for the feature usage metrics - */ -TelemetryHandler.FEATURE_USAGE_STRING = "featureUsage"; -//# sourceMappingURL=TelemetryHandler.js.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/TelemetryHandler.js.map b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/TelemetryHandler.js.map deleted file mode 100644 index eb359c0..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/TelemetryHandler.js.map +++ /dev/null @@ -1 +0,0 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,IAAI,OAAgC,CAAC;gBACrC,IAAI,OAAO,CAAC,iBAAiB,YAAY,iBAAiB,EAAE;oBAC3D,OAAO,GAAG,OAAO,CAAC,iBAAiB,CAAC,oBAAoB,CAAC,uBAAuB,CAA4B,CAAC;iBAC7G;gBACD,IAAI,OAAO,EAAE;oBACZ,MAAM,YAAY,GAAW,OAAO,CAAC,eAAe,EAAE,CAAC;oBACvD,eAAe,IAAI,KAAK,gBAAgB,CAAC,oBAAoB,IAAI,YAAY,GAAG,CAAC;iBACjF;gBACD,mBAAmB,CAAC,OAAO,CAAC,OAAO,EAAE,OAAO,CAAC,OAAO,EAAE,gBAAgB,CAAC,kBAAkB,EAAE,eAAe,CAAC,CAAC;aAC5G;iBAAM;gBACN,0DAA0D;gBAC1D,OAAO,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,gBAAgB,CAAC,wBAAwB,CAAC,CAAC;gBAC1E,OAAO,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,gBAAgB,CAAC,kBAAkB,CAAC,CAAC;aACpE;YACD,OAAO,MAAM,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QACnD,CAAC;KAAA;IAED;;;;;OAKG;IACI,OAAO,CAAC,IAAgB;QAC9B,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC;IAC5B,CAAC;;AA7ED;;;;GAIG;AACY,yCAAwB,GAAG,mBAAmB,CAAC;AAE9D;;;;GAIG;AACY,mCAAkB,GAAG,YAAY,CAAC;AAEjD;;;;GAIG;AACY,6BAAY,GAAG,UAAU,CAAC;AAEzC;;;;GAIG;AACY,qCAAoB,GAAG,cAAc,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/options/AuthenticationHandlerOptions.d.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/options/AuthenticationHandlerOptions.d.ts deleted file mode 100644 index 3192bfe..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/options/AuthenticationHandlerOptions.d.ts +++ /dev/null @@ -1,38 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -/** - * @module AuthenticationHandlerOptions - */ -import { AuthenticationProvider } from "../../IAuthenticationProvider"; -import { AuthenticationProviderOptions } from "../../IAuthenticationProviderOptions"; -import { MiddlewareOptions } from "./IMiddlewareOptions"; -/** - * @class - * @implements MiddlewareOptions - * Class representing AuthenticationHandlerOptions - */ -export declare class AuthenticationHandlerOptions implements MiddlewareOptions { - /** - * @public - * A member holding an instance of an authentication provider - */ - authenticationProvider: AuthenticationProvider; - /** - * @public - * A member holding an instance of authentication provider options - */ - authenticationProviderOptions: AuthenticationProviderOptions; - /** - * @public - * @constructor - * To create an instance of AuthenticationHandlerOptions - * @param {AuthenticationProvider} [authenticationProvider] - The authentication provider instance - * @param {AuthenticationProviderOptions} [authenticationProviderOptions] - The authentication provider options instance - * @returns An instance of AuthenticationHandlerOptions - */ - constructor(authenticationProvider?: AuthenticationProvider, authenticationProviderOptions?: AuthenticationProviderOptions); -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/options/AuthenticationHandlerOptions.js b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/options/AuthenticationHandlerOptions.js deleted file mode 100644 index 3ccfa00..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/options/AuthenticationHandlerOptions.js +++ /dev/null @@ -1,26 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -/** - * @class - * @implements MiddlewareOptions - * Class representing AuthenticationHandlerOptions - */ -export class AuthenticationHandlerOptions { - /** - * @public - * @constructor - * To create an instance of AuthenticationHandlerOptions - * @param {AuthenticationProvider} [authenticationProvider] - The authentication provider instance - * @param {AuthenticationProviderOptions} [authenticationProviderOptions] - The authentication provider options instance - * @returns An instance of AuthenticationHandlerOptions - */ - constructor(authenticationProvider, authenticationProviderOptions) { - this.authenticationProvider = authenticationProvider; - this.authenticationProviderOptions = authenticationProviderOptions; - } -} -//# sourceMappingURL=AuthenticationHandlerOptions.js.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/options/AuthenticationHandlerOptions.js.map b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/options/AuthenticationHandlerOptions.js.map deleted file mode 100644 index 04bb9b5..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/options/AuthenticationHandlerOptions.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AuthenticationHandlerOptions.js","sourceRoot":"","sources":["../../../../../src/middleware/options/AuthenticationHandlerOptions.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAUH;;;;GAIG;AACH,MAAM,OAAO,4BAA4B;IAaxC;;;;;;;OAOG;IACH,YAAmB,sBAA+C,EAAE,6BAA6D;QAChI,IAAI,CAAC,sBAAsB,GAAG,sBAAsB,CAAC;QACrD,IAAI,CAAC,6BAA6B,GAAG,6BAA6B,CAAC;IACpE,CAAC;CACD"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/options/ChaosHandlerData.d.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/options/ChaosHandlerData.d.ts deleted file mode 100644 index 8f70cde..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/options/ChaosHandlerData.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -/** - * @module ChaosHandlerData - */ -/** - * Contains RequestMethod to corresponding array of possible status codes, used for Random mode - */ -export declare const methodStatusCode: { - [key: string]: number[]; -}; -/** - * Contains statusCode to statusMessage map - */ -export declare const httpStatusCode: { - [key: number]: string; -}; diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/options/ChaosHandlerData.js b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/options/ChaosHandlerData.js deleted file mode 100644 index 7c4fb91..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/options/ChaosHandlerData.js +++ /dev/null @@ -1,86 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -/** - * @module ChaosHandlerData - */ -/** - * Contains RequestMethod to corresponding array of possible status codes, used for Random mode - */ -export const methodStatusCode = { - GET: [429, 500, 502, 503, 504], - POST: [429, 500, 502, 503, 504, 507], - PUT: [429, 500, 502, 503, 504, 507], - PATCH: [429, 500, 502, 503, 504], - DELETE: [429, 500, 502, 503, 504, 507], -}; -/** - * Contains statusCode to statusMessage map - */ -export const httpStatusCode = { - 100: "Continue", - 101: "Switching Protocols", - 102: "Processing", - 103: "Early Hints", - 200: "OK", - 201: "Created", - 202: "Accepted", - 203: "Non-Authoritative Information", - 204: "No Content", - 205: "Reset Content", - 206: "Partial Content", - 207: "Multi-Status", - 208: "Already Reported", - 226: "IM Used", - 300: "Multiple Choices", - 301: "Moved Permanently", - 302: "Found", - 303: "See Other", - 304: "Not Modified", - 305: "Use Proxy", - 307: "Temporary Redirect", - 308: "Permanent Redirect", - 400: "Bad Request", - 401: "Unauthorized", - 402: "Payment Required", - 403: "Forbidden", - 404: "Not Found", - 405: "Method Not Allowed", - 406: "Not Acceptable", - 407: "Proxy Authentication Required", - 408: "Request Timeout", - 409: "Conflict", - 410: "Gone", - 411: "Length Required", - 412: "Precondition Failed", - 413: "Payload Too Large", - 414: "URI Too Long", - 415: "Unsupported Media Type", - 416: "Range Not Satisfiable", - 417: "Expectation Failed", - 421: "Misdirected Request", - 422: "Unprocessable Entity", - 423: "Locked", - 424: "Failed Dependency", - 425: "Too Early", - 426: "Upgrade Required", - 428: "Precondition Required", - 429: "Too Many Requests", - 431: "Request Header Fields Too Large", - 451: "Unavailable For Legal Reasons", - 500: "Internal Server Error", - 501: "Not Implemented", - 502: "Bad Gateway", - 503: "Service Unavailable", - 504: "Gateway Timeout", - 505: "HTTP Version Not Supported", - 506: "Variant Also Negotiates", - 507: "Insufficient Storage", - 508: "Loop Detected", - 510: "Not Extended", - 511: "Network Authentication Required", -}; -//# sourceMappingURL=ChaosHandlerData.js.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/options/ChaosHandlerData.js.map b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/options/ChaosHandlerData.js.map deleted file mode 100644 index 26fd6e1..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/options/ChaosHandlerData.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ChaosHandlerData.js","sourceRoot":"","sources":["../../../../../src/middleware/options/ChaosHandlerData.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;GAEG;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAgC;IAC5D,GAAG,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC;IAC9B,IAAI,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,E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,GAAG,EAAE,mBAAmB;IACxB,GAAG,EAAE,cAAc;IACnB,GAAG,EAAE,wBAAwB;IAC7B,GAAG,EAAE,uBAAuB;IAC5B,GAAG,EAAE,oBAAoB;IACzB,GAAG,EAAE,qBAAqB;IAC1B,GAAG,EAAE,sBAAsB;IAC3B,GAAG,EAAE,QAAQ;IACb,GAAG,EAAE,mBAAmB;IACxB,GAAG,EAAE,WAAW;IAChB,GAAG,EAAE,kBAAkB;IACvB,GAAG,EAAE,uBAAuB;IAC5B,GAAG,EAAE,mBAAmB;IACxB,GAAG,EAAE,iCAAiC;IACtC,GAAG,EAAE,+BAA+B;IACpC,GAAG,EAAE,uBAAuB;IAC5B,GAAG,EAAE,iBAAiB;IACtB,GAAG,EAAE,aAAa;IAClB,GAAG,EAAE,qBAAqB;IAC1B,GAAG,EAAE,iBAAiB;IACtB,GAAG,EAAE,4BAA4B;IACjC,GAAG,EAAE,yBAAyB;IAC9B,GAAG,EAAE,sBAAsB;IAC3B,GAAG,EAAE,eAAe;IACpB,GAAG,EAAE,cAAc;IACnB,GAAG,EAAE,iCAAiC;CACtC,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/options/ChaosHandlerOptions.d.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/options/ChaosHandlerOptions.d.ts deleted file mode 100644 index ec151cc..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/options/ChaosHandlerOptions.d.ts +++ /dev/null @@ -1,68 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -/** - * @module ChaosHandlerOptions - */ -import { ChaosStrategy } from "./ChaosStrategy"; -import { MiddlewareOptions } from "./IMiddlewareOptions"; -/** - * Class representing ChaosHandlerOptions - * @class - * Class - * @implements MiddlewareOptions - */ -export declare class ChaosHandlerOptions implements MiddlewareOptions { - /** - * Specifies the startegy used for the Testing Handler -> RANDOM/MANUAL - * - * @public - */ - chaosStrategy: ChaosStrategy; - /** - * Status code to be returned in the response - * - * @public - */ - statusCode: number; - /** - * The Message to be returned in the response - * - * @public - */ - statusMessage: string; - /** - * The percentage of randomness/chaos in the handler - * - * Setting the default value as 10% - * @public - */ - chaosPercentage: number; - /** - * The response body to be returned in the response - * - * @public - */ - responseBody: any; - /** - * The response headers to be returned in the response - * - * @public - */ - headers: Headers; - /** - * @public - * @constructor - * To create an instance of Testing Handler Options - * @param {ChaosStrategy} chaosStrategy - Specifies the startegy used for the Testing Handler -> RAMDOM/MANUAL - * @param {string} statusMessage - The Message to be returned in the response - * @param {number?} statusCode - The statusCode to be returned in the response - * @param {number?} chaosPercentage - The percentage of randomness/chaos in the handler - * @param {any?} responseBody - The response body to be returned in the response - * @returns An instance of ChaosHandlerOptions - */ - constructor(chaosStrategy?: ChaosStrategy, statusMessage?: string, statusCode?: number, chaosPercentage?: number, responseBody?: any, headers?: Headers); -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/options/ChaosHandlerOptions.js b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/options/ChaosHandlerOptions.js deleted file mode 100644 index 5d5047b..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/options/ChaosHandlerOptions.js +++ /dev/null @@ -1,41 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -/** - * @module ChaosHandlerOptions - */ -import { ChaosStrategy } from "./ChaosStrategy"; -/** - * Class representing ChaosHandlerOptions - * @class - * Class - * @implements MiddlewareOptions - */ -export class ChaosHandlerOptions { - /** - * @public - * @constructor - * To create an instance of Testing Handler Options - * @param {ChaosStrategy} chaosStrategy - Specifies the startegy used for the Testing Handler -> RAMDOM/MANUAL - * @param {string} statusMessage - The Message to be returned in the response - * @param {number?} statusCode - The statusCode to be returned in the response - * @param {number?} chaosPercentage - The percentage of randomness/chaos in the handler - * @param {any?} responseBody - The response body to be returned in the response - * @returns An instance of ChaosHandlerOptions - */ - constructor(chaosStrategy = ChaosStrategy.RANDOM, statusMessage = "Some error Happened", statusCode, chaosPercentage, responseBody, headers) { - this.chaosStrategy = chaosStrategy; - this.statusCode = statusCode; - this.statusMessage = statusMessage; - this.chaosPercentage = chaosPercentage !== undefined ? chaosPercentage : 10; - this.responseBody = responseBody; - this.headers = headers; - if (this.chaosPercentage > 100) { - throw new Error("Error Pecentage can not be more than 100"); - } - } -} -//# sourceMappingURL=ChaosHandlerOptions.js.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/options/ChaosHandlerOptions.js.map b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/options/ChaosHandlerOptions.js.map deleted file mode 100644 index d509f31..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/options/ChaosHandlerOptions.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ChaosHandlerOptions.js","sourceRoot":"","sources":["../../../../../src/middleware/options/ChaosHandlerOptions.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;GAEG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAGhD;;;;;GAKG;AACH,MAAM,OAAO,mBAAmB;IA4C/B;;;;;;;;;;OAUG;IACH,YAAmB,gBAA+B,aAAa,CAAC,MAAM,EAAE,aAAa,GAAG,qBAAqB,EAAE,UAAmB,EAAE,eAAwB,EAAE,YAAkB,EAAE,OAAiB;QAClM,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;QACnC,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;QACnC,IAAI,CAAC,eAAe,GAAG,eAAe,KAAK,SAAS,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,EAAE,CAAC;QAC5E,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;QACjC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,IAAI,CAAC,eAAe,GAAG,GAAG,EAAE;YAC/B,MAAM,IAAI,KAAK,CAAC,0CAA0C,CAAC,CAAC;SAC5D;IACF,CAAC;CACD"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/options/ChaosStrategy.d.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/options/ChaosStrategy.d.ts deleted file mode 100644 index c355ae6..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/options/ChaosStrategy.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -/** - * @module ChaosStrategy - */ -/** - * Strategy used for Testing Handler - * @enum - */ -export declare enum ChaosStrategy { - MANUAL = 0, - RANDOM = 1 -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/options/ChaosStrategy.js b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/options/ChaosStrategy.js deleted file mode 100644 index cb2d317..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/options/ChaosStrategy.js +++ /dev/null @@ -1,19 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -/** - * @module ChaosStrategy - */ -/** - * Strategy used for Testing Handler - * @enum - */ -export var ChaosStrategy; -(function (ChaosStrategy) { - ChaosStrategy[ChaosStrategy["MANUAL"] = 0] = "MANUAL"; - ChaosStrategy[ChaosStrategy["RANDOM"] = 1] = "RANDOM"; -})(ChaosStrategy || (ChaosStrategy = {})); -//# sourceMappingURL=ChaosStrategy.js.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/options/ChaosStrategy.js.map b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/options/ChaosStrategy.js.map deleted file mode 100644 index 4e569c5..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/options/ChaosStrategy.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ChaosStrategy.js","sourceRoot":"","sources":["../../../../../src/middleware/options/ChaosStrategy.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;GAEG;AAEH;;;GAGG;AACH,MAAM,CAAN,IAAY,aAGX;AAHD,WAAY,aAAa;IACxB,qDAAM,CAAA;IACN,qDAAM,CAAA;AACP,CAAC,EAHW,aAAa,KAAb,aAAa,QAGxB"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/options/IMiddlewareOptions.d.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/options/IMiddlewareOptions.d.ts deleted file mode 100644 index 3241ae9..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/options/IMiddlewareOptions.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -/** - * @interface - * Signature representing the middleware options - */ -export interface MiddlewareOptions { -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/options/IMiddlewareOptions.js b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/options/IMiddlewareOptions.js deleted file mode 100644 index 3ac802d..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/options/IMiddlewareOptions.js +++ /dev/null @@ -1,8 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -export {}; -//# sourceMappingURL=IMiddlewareOptions.js.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/options/IMiddlewareOptions.js.map b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/options/IMiddlewareOptions.js.map deleted file mode 100644 index 25b8576..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/options/IMiddlewareOptions.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"IMiddlewareOptions.js","sourceRoot":"","sources":["../../../../../src/middleware/options/IMiddlewareOptions.ts"],"names":[],"mappings":"AAAA;;;;;GAKG"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/options/RedirectHandlerOptions.d.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/options/RedirectHandlerOptions.d.ts deleted file mode 100644 index ca0ef07..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/options/RedirectHandlerOptions.d.ts +++ /dev/null @@ -1,58 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -/** - * @module RedirectHandlerOptions - */ -import { MiddlewareOptions } from "./IMiddlewareOptions"; -/** - * @type - * A type declaration for shouldRetry callback - */ -export type ShouldRedirect = (response: Response) => boolean; -/** - * @class - * @implements MiddlewareOptions - * A class representing RedirectHandlerOptions - */ -export declare class RedirectHandlerOptions implements MiddlewareOptions { - /** - * @private - * @static - * A member holding default max redirects value - */ - private static DEFAULT_MAX_REDIRECTS; - /** - * @private - * @static - * A member holding maximum max redirects value - */ - private static MAX_MAX_REDIRECTS; - /** - * @public - * A member holding max redirects value - */ - maxRedirects: number; - /** - * @public - * A member holding shouldRedirect callback - */ - shouldRedirect: ShouldRedirect; - /** - * @private - * A member holding default shouldRedirect callback - */ - private static defaultShouldRedirect; - /** - * @public - * @constructor - * To create an instance of RedirectHandlerOptions - * @param {number} [maxRedirects = RedirectHandlerOptions.DEFAULT_MAX_REDIRECTS] - The max redirects value - * @param {ShouldRedirect} [shouldRedirect = RedirectHandlerOptions.DEFAULT_SHOULD_RETRY] - The should redirect callback - * @returns An instance of RedirectHandlerOptions - */ - constructor(maxRedirects?: number, shouldRedirect?: ShouldRedirect); -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/options/RedirectHandlerOptions.js b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/options/RedirectHandlerOptions.js deleted file mode 100644 index 20039a4..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/options/RedirectHandlerOptions.js +++ /dev/null @@ -1,53 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -/** - * @class - * @implements MiddlewareOptions - * A class representing RedirectHandlerOptions - */ -export class RedirectHandlerOptions { - /** - * @public - * @constructor - * To create an instance of RedirectHandlerOptions - * @param {number} [maxRedirects = RedirectHandlerOptions.DEFAULT_MAX_REDIRECTS] - The max redirects value - * @param {ShouldRedirect} [shouldRedirect = RedirectHandlerOptions.DEFAULT_SHOULD_RETRY] - The should redirect callback - * @returns An instance of RedirectHandlerOptions - */ - constructor(maxRedirects = RedirectHandlerOptions.DEFAULT_MAX_REDIRECTS, shouldRedirect = RedirectHandlerOptions.defaultShouldRedirect) { - if (maxRedirects > RedirectHandlerOptions.MAX_MAX_REDIRECTS) { - const error = new Error(`MaxRedirects should not be more than ${RedirectHandlerOptions.MAX_MAX_REDIRECTS}`); - error.name = "MaxLimitExceeded"; - throw error; - } - if (maxRedirects < 0) { - const error = new Error(`MaxRedirects should not be negative`); - error.name = "MinExpectationNotMet"; - throw error; - } - this.maxRedirects = maxRedirects; - this.shouldRedirect = shouldRedirect; - } -} -/** - * @private - * @static - * A member holding default max redirects value - */ -RedirectHandlerOptions.DEFAULT_MAX_REDIRECTS = 5; -/** - * @private - * @static - * A member holding maximum max redirects value - */ -RedirectHandlerOptions.MAX_MAX_REDIRECTS = 20; -/** - * @private - * A member holding default shouldRedirect callback - */ -RedirectHandlerOptions.defaultShouldRedirect = () => true; -//# sourceMappingURL=RedirectHandlerOptions.js.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/options/RedirectHandlerOptions.js.map b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/options/RedirectHandlerOptions.js.map deleted file mode 100644 index 302d6bf..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/options/RedirectHandlerOptions.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"RedirectHandlerOptions.js","sourceRoot":"","sources":["../../../../../src/middleware/options/RedirectHandlerOptions.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAcH;;;;GAIG;AACH,MAAM,OAAO,sBAAsB;IAiClC;;;;;;;OAOG;IACH,YAAmB,eAAuB,sBAAsB,CAAC,qBAAqB,EAAE,iBAAiC,sBAAsB,CAAC,qBAAqB;QACpK,IAAI,YAAY,GAAG,sBAAsB,CAAC,iBAAiB,EAAE;YAC5D,MAAM,KAAK,GAAG,IAAI,KAAK,CAAC,wCAAwC,sBAAsB,CAAC,iBAAiB,EAAE,CAAC,CAAC;YAC5G,KAAK,CAAC,IAAI,GAAG,kBAAkB,CAAC;YAChC,MAAM,KAAK,CAAC;SACZ;QACD,IAAI,YAAY,GAAG,CAAC,EAAE;YACrB,MAAM,KAAK,GAAG,IAAI,KAAK,CAAC,qCAAqC,CAAC,CAAC;YAC/D,KAAK,CAAC,IAAI,GAAG,sBAAsB,CAAC;YACpC,MAAM,KAAK,CAAC;SACZ;QACD,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;QACjC,IAAI,CAAC,cAAc,GAAG,cAAc,CAAC;IACtC,CAAC;;AArDD;;;;GAIG;AACY,4CAAqB,GAAG,CAAC,CAAC;AAEzC;;;;GAIG;AACY,wCAAiB,GAAG,EAAE,CAAC;AActC;;;GAGG;AACY,4CAAqB,GAAmB,GAAG,EAAE,CAAC,IAAI,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/options/RetryHandlerOptions.d.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/options/RetryHandlerOptions.d.ts deleted file mode 100644 index 10f3e49..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/options/RetryHandlerOptions.d.ts +++ /dev/null @@ -1,83 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -/** - * @module RetryHandlerOptions - */ -import { FetchOptions } from "../../IFetchOptions"; -import { MiddlewareOptions } from "./IMiddlewareOptions"; -/** - * @type - * A type declaration for shouldRetry callback - */ -export type ShouldRetry = (delay: number, attempt: number, request: RequestInfo, options: FetchOptions | undefined, response: Response) => boolean; -/** - * @class - * @implements MiddlewareOptions - * Class for RetryHandlerOptions - */ -export declare class RetryHandlerOptions implements MiddlewareOptions { - /** - * @private - * @static - * A member holding default delay value in seconds - */ - private static DEFAULT_DELAY; - /** - * @private - * @static - * A member holding default maxRetries value - */ - private static DEFAULT_MAX_RETRIES; - /** - * @private - * @static - * A member holding maximum delay value in seconds - */ - private static MAX_DELAY; - /** - * @private - * @static - * A member holding maximum maxRetries value - */ - private static MAX_MAX_RETRIES; - /** - * @public - * A member holding delay value in seconds - */ - delay: number; - /** - * @public - * A member holding maxRetries value - */ - maxRetries: number; - /** - * @public - * A member holding shouldRetry callback - */ - shouldRetry: ShouldRetry; - /** - * @private - * A member holding default shouldRetry callback - */ - private static defaultShouldRetry; - /** - * @public - * @constructor - * To create an instance of RetryHandlerOptions - * @param {number} [delay = RetryHandlerOptions.DEFAULT_DELAY] - The delay value in seconds - * @param {number} [maxRetries = RetryHandlerOptions.DEFAULT_MAX_RETRIES] - The maxRetries value - * @param {ShouldRetry} [shouldRetry = RetryHandlerOptions.DEFAULT_SHOULD_RETRY] - The shouldRetry callback function - * @returns An instance of RetryHandlerOptions - */ - constructor(delay?: number, maxRetries?: number, shouldRetry?: ShouldRetry); - /** - * @public - * To get the maximum delay - * @returns A maximum delay - */ - getMaxDelay(): number; -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/options/RetryHandlerOptions.js b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/options/RetryHandlerOptions.js deleted file mode 100644 index 7c2e379..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/options/RetryHandlerOptions.js +++ /dev/null @@ -1,95 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -/** - * @class - * @implements MiddlewareOptions - * Class for RetryHandlerOptions - */ -export class RetryHandlerOptions { - /** - * @public - * @constructor - * To create an instance of RetryHandlerOptions - * @param {number} [delay = RetryHandlerOptions.DEFAULT_DELAY] - The delay value in seconds - * @param {number} [maxRetries = RetryHandlerOptions.DEFAULT_MAX_RETRIES] - The maxRetries value - * @param {ShouldRetry} [shouldRetry = RetryHandlerOptions.DEFAULT_SHOULD_RETRY] - The shouldRetry callback function - * @returns An instance of RetryHandlerOptions - */ - constructor(delay = RetryHandlerOptions.DEFAULT_DELAY, maxRetries = RetryHandlerOptions.DEFAULT_MAX_RETRIES, shouldRetry = RetryHandlerOptions.defaultShouldRetry) { - if (delay > RetryHandlerOptions.MAX_DELAY && maxRetries > RetryHandlerOptions.MAX_MAX_RETRIES) { - const error = new Error(`Delay and MaxRetries should not be more than ${RetryHandlerOptions.MAX_DELAY} and ${RetryHandlerOptions.MAX_MAX_RETRIES}`); - error.name = "MaxLimitExceeded"; - throw error; - } - else if (delay > RetryHandlerOptions.MAX_DELAY) { - const error = new Error(`Delay should not be more than ${RetryHandlerOptions.MAX_DELAY}`); - error.name = "MaxLimitExceeded"; - throw error; - } - else if (maxRetries > RetryHandlerOptions.MAX_MAX_RETRIES) { - const error = new Error(`MaxRetries should not be more than ${RetryHandlerOptions.MAX_MAX_RETRIES}`); - error.name = "MaxLimitExceeded"; - throw error; - } - else if (delay < 0 && maxRetries < 0) { - const error = new Error(`Delay and MaxRetries should not be negative`); - error.name = "MinExpectationNotMet"; - throw error; - } - else if (delay < 0) { - const error = new Error(`Delay should not be negative`); - error.name = "MinExpectationNotMet"; - throw error; - } - else if (maxRetries < 0) { - const error = new Error(`MaxRetries should not be negative`); - error.name = "MinExpectationNotMet"; - throw error; - } - this.delay = Math.min(delay, RetryHandlerOptions.MAX_DELAY); - this.maxRetries = Math.min(maxRetries, RetryHandlerOptions.MAX_MAX_RETRIES); - this.shouldRetry = shouldRetry; - } - /** - * @public - * To get the maximum delay - * @returns A maximum delay - */ - getMaxDelay() { - return RetryHandlerOptions.MAX_DELAY; - } -} -/** - * @private - * @static - * A member holding default delay value in seconds - */ -RetryHandlerOptions.DEFAULT_DELAY = 3; -/** - * @private - * @static - * A member holding default maxRetries value - */ -RetryHandlerOptions.DEFAULT_MAX_RETRIES = 3; -/** - * @private - * @static - * A member holding maximum delay value in seconds - */ -RetryHandlerOptions.MAX_DELAY = 180; -/** - * @private - * @static - * A member holding maximum maxRetries value - */ -RetryHandlerOptions.MAX_MAX_RETRIES = 10; -/** - * @private - * A member holding default shouldRetry callback - */ -RetryHandlerOptions.defaultShouldRetry = () => true; -//# sourceMappingURL=RetryHandlerOptions.js.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/options/RetryHandlerOptions.js.map b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/options/RetryHandlerOptions.js.map deleted file mode 100644 index 718aad5..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/options/RetryHandlerOptions.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"RetryHandlerOptions.js","sourceRoot":"","sources":["../../../../../src/middleware/options/RetryHandlerOptions.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAeH;;;;GAIG;AAEH,MAAM,OAAO,mBAAmB;IAqD/B;;;;;;;;OAQG;IACH,YAAmB,QAAgB,mBAAmB,CAAC,aAAa,EAAE,aAAqB,mBAAmB,CAAC,mBAAmB,EAAE,cAA2B,mBAAmB,CAAC,kBAAkB;QACpM,IAAI,KAAK,GAAG,mBAAmB,CAAC,SAAS,IAAI,UAAU,GAAG,mBAAmB,CAAC,eAAe,EAAE;YAC9F,MAAM,KAAK,GAAG,IAAI,KAAK,CAAC,gDAAgD,mBAAmB,CAAC,SAAS,QAAQ,mBAAmB,CAAC,eAA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EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;QAC5E,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;IAChC,CAAC;IAED;;;;OAIG;IACI,WAAW;QACjB,OAAO,mBAAmB,CAAC,SAAS,CAAC;IACtC,CAAC;;AAnGD;;;;GAIG;AACY,iCAAa,GAAG,CAAC,CAAC;AAEjC;;;;GAIG;AACY,uCAAmB,GAAG,CAAC,CAAC;AAEvC;;;;GAIG;AACY,6BAAS,GAAG,GAAG,CAAC;AAE/B;;;;GAIG;AACY,mCAAe,GAAG,EAAE,CAAC;AAoBpC;;;GAGG;AACY,sCAAkB,GAAgB,GAAG,EAAE,CAAC,IAAI,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/options/TelemetryHandlerOptions.d.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/options/TelemetryHandlerOptions.d.ts deleted file mode 100644 index db2685b..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/options/TelemetryHandlerOptions.d.ts +++ /dev/null @@ -1,58 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -/** - * @module TelemetryHandlerOptions - */ -import { Context } from "../../IContext"; -import { MiddlewareOptions } from "./IMiddlewareOptions"; -/** - * @enum - * @property {number} NONE - The hexadecimal flag value for nothing enabled - * @property {number} REDIRECT_HANDLER_ENABLED - The hexadecimal flag value for redirect handler enabled - * @property {number} RETRY_HANDLER_ENABLED - The hexadecimal flag value for retry handler enabled - * @property {number} AUTHENTICATION_HANDLER_ENABLED - The hexadecimal flag value for the authentication handler enabled - */ -export declare enum FeatureUsageFlag { - NONE = 0, - REDIRECT_HANDLER_ENABLED = 1, - RETRY_HANDLER_ENABLED = 2, - AUTHENTICATION_HANDLER_ENABLED = 4 -} -/** - * @class - * @implements MiddlewareOptions - * Class for TelemetryHandlerOptions - */ -export declare class TelemetryHandlerOptions implements MiddlewareOptions { - /** - * @private - * A member to hold the OR of feature usage flags - */ - private featureUsage; - /** - * @public - * @static - * To update the feature usage in the context object - * @param {Context} context - The request context object containing middleware options - * @param {FeatureUsageFlag} flag - The flag value - * @returns nothing - */ - static updateFeatureUsageFlag(context: Context, flag: FeatureUsageFlag): void; - /** - * @private - * To set the feature usage flag - * @param {FeatureUsageFlag} flag - The flag value - * @returns nothing - */ - private setFeatureUsage; - /** - * @public - * To get the feature usage - * @returns A feature usage flag as hexadecimal string - */ - getFeatureUsage(): string; -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/options/TelemetryHandlerOptions.js b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/options/TelemetryHandlerOptions.js deleted file mode 100644 index 48e3f85..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/options/TelemetryHandlerOptions.js +++ /dev/null @@ -1,77 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -import { MiddlewareControl } from "../MiddlewareControl"; -/** - * @enum - * @property {number} NONE - The hexadecimal flag value for nothing enabled - * @property {number} REDIRECT_HANDLER_ENABLED - The hexadecimal flag value for redirect handler enabled - * @property {number} RETRY_HANDLER_ENABLED - The hexadecimal flag value for retry handler enabled - * @property {number} AUTHENTICATION_HANDLER_ENABLED - The hexadecimal flag value for the authentication handler enabled - */ -export var FeatureUsageFlag; -(function (FeatureUsageFlag) { - /* eslint-disable @typescript-eslint/naming-convention */ - FeatureUsageFlag[FeatureUsageFlag["NONE"] = 0] = "NONE"; - FeatureUsageFlag[FeatureUsageFlag["REDIRECT_HANDLER_ENABLED"] = 1] = "REDIRECT_HANDLER_ENABLED"; - FeatureUsageFlag[FeatureUsageFlag["RETRY_HANDLER_ENABLED"] = 2] = "RETRY_HANDLER_ENABLED"; - FeatureUsageFlag[FeatureUsageFlag["AUTHENTICATION_HANDLER_ENABLED"] = 4] = "AUTHENTICATION_HANDLER_ENABLED"; - /* eslint-enable @typescript-eslint/naming-convention */ -})(FeatureUsageFlag || (FeatureUsageFlag = {})); -/** - * @class - * @implements MiddlewareOptions - * Class for TelemetryHandlerOptions - */ -export class TelemetryHandlerOptions { - constructor() { - /** - * @private - * A member to hold the OR of feature usage flags - */ - this.featureUsage = FeatureUsageFlag.NONE; - } - /** - * @public - * @static - * To update the feature usage in the context object - * @param {Context} context - The request context object containing middleware options - * @param {FeatureUsageFlag} flag - The flag value - * @returns nothing - */ - static updateFeatureUsageFlag(context, flag) { - let options; - if (context.middlewareControl instanceof MiddlewareControl) { - options = context.middlewareControl.getMiddlewareOptions(TelemetryHandlerOptions); - } - else { - context.middlewareControl = new MiddlewareControl(); - } - if (typeof options === "undefined") { - options = new TelemetryHandlerOptions(); - context.middlewareControl.setMiddlewareOptions(TelemetryHandlerOptions, options); - } - options.setFeatureUsage(flag); - } - /** - * @private - * To set the feature usage flag - * @param {FeatureUsageFlag} flag - The flag value - * @returns nothing - */ - setFeatureUsage(flag) { - this.featureUsage = this.featureUsage | flag; - } - /** - * @public - * To get the feature usage - * @returns A feature usage flag as hexadecimal string - */ - getFeatureUsage() { - return this.featureUsage.toString(16); - } -} -//# sourceMappingURL=TelemetryHandlerOptions.js.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/options/TelemetryHandlerOptions.js.map b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/options/TelemetryHandlerOptions.js.map deleted file mode 100644 index 239ef76..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/middleware/options/TelemetryHandlerOptions.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"TelemetryHandlerOptions.js","sourceRoot":"","sources":["../../../../../src/middleware/options/TelemetryHandlerOptions.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAOH,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAGzD;;;;;;GAMG;AAEH,MAAM,CAAN,IAAY,gBAOX;AAPD,WAAY,gBAAgB;IAC3B,0DAA0D;IAC1D,uDAAU,CAAA;IACV,+FAA8B,CAAA;IAC9B,yFAA2B,CAAA;IAC3B,2GAAoC,CAAA;IACpC,yDAAyD;AAC1D,CAAC,EAPW,gBAAgB,KAAhB,gBAAgB,QAO3B;AAED;;;;GAIG;AAEH,MAAM,OAAO,uBAAuB;IAApC;QACC;;;WAGG;QACK,iBAAY,GAAqB,gBAAgB,CAAC,IAAI,CAAC;IA0ChE,CAAC;IAxCA;;;;;;;OAOG;IACI,MAAM,CAAC,sBAAsB,CAAC,OAAgB,EAAE,IAAsB;QAC5E,IAAI,OAAgC,CAAC;QACrC,IAAI,OAAO,CAAC,iBAAiB,YAAY,iBAAiB,EAAE;YAC3D,OAAO,GAAG,OAAO,CAAC,iBAAiB,CAAC,oBAAoB,CAAC,uBAAuB,CAA4B,CAAC;SAC7G;aAAM;YACN,OAAO,CAAC,iBAAiB,GAAG,IAAI,iBAAiB,EAAE,CAAC;SACpD;QACD,IAAI,OAAO,OAAO,KAAK,WAAW,EAAE;YACnC,OAAO,GAAG,IAAI,uBAAuB,EAAE,CAAC;YACxC,OAAO,CAAC,iBAAiB,CAAC,oBAAoB,CAAC,uBAAuB,EAAE,OAAO,CAAC,CAAC;SACjF;QACD,OAAO,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;IAC/B,CAAC;IAED;;;;;OAKG;IACK,eAAe,CAAC,IAAsB;QAC7C,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC;IAC9C,CAAC;IAED;;;;OAIG;IACI,eAAe;QACrB,OAAO,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;IACvC,CAAC;CACD"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/tasks/FileUploadTask/FileObjectClasses/FileUpload.d.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/tasks/FileUploadTask/FileObjectClasses/FileUpload.d.ts deleted file mode 100644 index 7ab72fe..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/tasks/FileUploadTask/FileObjectClasses/FileUpload.d.ts +++ /dev/null @@ -1,34 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -import { FileObject, SliceType } from "../../LargeFileUploadTask"; -import { Range } from "../Range"; -/** - * @class - * Class used for creating LargeFileUploadTask fileobject. - * This class accepts files of type ArrayBuffer, Blob, Uint8Array. - */ -export declare class FileUpload implements FileObject { - content: ArrayBuffer | Blob | Uint8Array; - name: string; - size: number; - /** - * @public - * @constructor - * @param {ArrayBuffer | Blob | Uint8Array} content - The file to be uploaded - * @param {string} name - The name of the file to be uploaded - * @param {number} size - The total size of the file to be uploaded - * @returns An instance of the FileUpload class - */ - constructor(content: ArrayBuffer | Blob | Uint8Array, name: string, size: number); - /** - * @public - * Slices the file content to the given range - * @param {Range} range - The range value - * @returns The sliced file part - */ - sliceFile(range: Range): ArrayBuffer | Blob | Uint8Array; -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/tasks/FileUploadTask/FileObjectClasses/FileUpload.js b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/tasks/FileUploadTask/FileObjectClasses/FileUpload.js deleted file mode 100644 index c639e92..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/tasks/FileUploadTask/FileObjectClasses/FileUpload.js +++ /dev/null @@ -1,40 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -import { GraphClientError } from "../../../GraphClientError"; -/** - * @class - * Class used for creating LargeFileUploadTask fileobject. - * This class accepts files of type ArrayBuffer, Blob, Uint8Array. - */ -export class FileUpload { - /** - * @public - * @constructor - * @param {ArrayBuffer | Blob | Uint8Array} content - The file to be uploaded - * @param {string} name - The name of the file to be uploaded - * @param {number} size - The total size of the file to be uploaded - * @returns An instance of the FileUpload class - */ - constructor(content, name, size) { - this.content = content; - this.name = name; - this.size = size; - if (!content || !name || !size) { - throw new GraphClientError("Please provide the upload content, name of the file and size of the file"); - } - } - /** - * @public - * Slices the file content to the given range - * @param {Range} range - The range value - * @returns The sliced file part - */ - sliceFile(range) { - return this.content.slice(range.minValue, range.maxValue + 1); - } -} -//# sourceMappingURL=FileUpload.js.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/tasks/FileUploadTask/FileObjectClasses/FileUpload.js.map b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/tasks/FileUploadTask/FileObjectClasses/FileUpload.js.map deleted file mode 100644 index 1d669d6..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/tasks/FileUploadTask/FileObjectClasses/FileUpload.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"FileUpload.js","sourceRoot":"","sources":["../../../../../../src/tasks/FileUploadTask/FileObjectClasses/FileUpload.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAI7D;;;;GAIG;AACH,MAAM,OAAO,UAAU;IACtB;;;;;;;OAOG;IACH,YAA0B,OAAwC,EAAS,IAAY,EAAS,IAAY;QAAlF,YAAO,GAAP,OAAO,CAAiC;QAAS,SAAI,GAAJ,IAAI,CAAQ;QAAS,SAAI,GAAJ,IAAI,CAAQ;QAC3G,IAAI,CAAC,OAAO,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,EAAE;YAC/B,MAAM,IAAI,gBAAgB,CAAC,0EAA0E,CAAC,CAAC;SACvG;IACF,CAAC;IAED;;;;;OAKG;IACI,SAAS,CAAC,KAAY;QAC5B,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,QAAQ,EAAE,KAAK,CAAC,QAAQ,GAAG,CAAC,CAAC,CAAC;IAC/D,CAAC;CACD"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/tasks/FileUploadTask/FileObjectClasses/StreamUpload.d.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/tasks/FileUploadTask/FileObjectClasses/StreamUpload.d.ts deleted file mode 100644 index 4b87c2e..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/tasks/FileUploadTask/FileObjectClasses/StreamUpload.d.ts +++ /dev/null @@ -1,32 +0,0 @@ -import { FileObject, SliceType } from "../../LargeFileUploadTask"; -import { Range } from "../Range"; -/** - * @class - * FileObject class for Readable Stream upload - */ -export declare class StreamUpload implements FileObject { - content: NodeStream; - name: string; - size: number; - /** - * @private - * Represents a cache of the last attempted upload slice. - * This can be used when resuming a previously failed slice upload. - */ - private previousSlice; - constructor(content: NodeStream, name: string, size: number); - /** - * @public - * Slices the file content to the given range - * @param {Range} range - The range value - * @returns The sliced file part - */ - sliceFile(range: Range): Promise; - /** - * @private - * Reads the specified byte size from the stream - * @param {number} size - The size of bytes to be read - * @returns Buffer with the given length of data. - */ - private readNBytesFromStream; -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/tasks/FileUploadTask/FileObjectClasses/StreamUpload.js b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/tasks/FileUploadTask/FileObjectClasses/StreamUpload.js deleted file mode 100644 index 0bb6433..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/tasks/FileUploadTask/FileObjectClasses/StreamUpload.js +++ /dev/null @@ -1,121 +0,0 @@ -import { __awaiter } from "tslib"; -import { GraphClientError } from "../../../GraphClientError"; -/** - * @class - * FileObject class for Readable Stream upload - */ -export class StreamUpload { - constructor(content, name, size) { - this.content = content; - this.name = name; - this.size = size; - if (!content || !name || !size) { - throw new GraphClientError("Please provide the Readable Stream content, name of the file and size of the file"); - } - } - /** - * @public - * Slices the file content to the given range - * @param {Range} range - The range value - * @returns The sliced file part - */ - sliceFile(range) { - return __awaiter(this, void 0, void 0, function* () { - let rangeSize = range.maxValue - range.minValue + 1; - /* readable.readable Is true if it is safe to call readable.read(), - * which means the stream has not been destroyed or emitted 'error' or 'end' - */ - const bufs = []; - /** - * The sliceFile reads the first `rangeSize` number of bytes from the stream. - * The previousSlice property is used to seek the range of bytes in the previous slice. - * Suppose, the sliceFile reads bytes from `10 - 20` from the stream but the upload of this slice fails. - * When the user resumes, the stream will have bytes from position 21. - * The previousSlice.Range is used to compare if the requested range is cached in the previousSlice property or present in the Readable Stream. - */ - if (this.previousSlice) { - if (range.minValue < this.previousSlice.range.minValue) { - throw new GraphClientError("An error occurred while uploading the stream. Please restart the stream upload from the first byte of the file."); - } - if (range.minValue < this.previousSlice.range.maxValue) { - const previousRangeMin = this.previousSlice.range.minValue; - const previousRangeMax = this.previousSlice.range.maxValue; - // Check if the requested range is same as previously sliced range - if (range.minValue === previousRangeMin && range.maxValue === previousRangeMax) { - return this.previousSlice.fileSlice; - } - /** - * The following check considers a possibility - * of an upload failing after some of the bytes of the previous slice - * were successfully uploaded. - * Example - Previous slice range - `10 - 20`. Current requested range is `15 - 20`. - */ - if (range.maxValue === previousRangeMax) { - return this.previousSlice.fileSlice.slice(range.minValue, range.maxValue + 1); - } - /** - * If an upload fails after some of the bytes of the previous slice - * were successfully uploaded and the new Range.Maximum is greater than the previous Range.Maximum - * Example - Previous slice range - `10 - 20`. Current requested range is `15 - 25`, - * then read the bytes from position 15 to 20 from previousSlice.fileSlice and read bytes from position 21 to 25 from the Readable Stream - */ - bufs.push(this.previousSlice.fileSlice.slice(range.minValue, previousRangeMax + 1)); - rangeSize = range.maxValue - previousRangeMax; - } - } - if (this.content && this.content.readable) { - if (this.content.readableLength >= rangeSize) { - bufs.push(this.content.read(rangeSize)); - } - else { - bufs.push(yield this.readNBytesFromStream(rangeSize)); - } - } - else { - throw new GraphClientError("Stream is not readable."); - } - const slicedChunk = Buffer.concat(bufs); - this.previousSlice = { fileSlice: slicedChunk, range }; - return slicedChunk; - }); - } - /** - * @private - * Reads the specified byte size from the stream - * @param {number} size - The size of bytes to be read - * @returns Buffer with the given length of data. - */ - readNBytesFromStream(size) { - return new Promise((resolve, reject) => { - const chunks = []; - let remainder = size; - let length = 0; - this.content.on("end", () => { - if (remainder > 0) { - return reject(new GraphClientError("Stream ended before reading required range size")); - } - }); - this.content.on("readable", () => { - /** - * (chunk = this.content.read(size)) can return null if size of stream is less than 'size' parameter. - * Read the remainder number of bytes from the stream iteratively as they are available. - */ - let chunk; - while (length < size && (chunk = this.content.read(remainder)) !== null) { - length += chunk.length; - chunks.push(chunk); - if (remainder > 0) { - remainder = size - length; - } - } - if (length === size) { - return resolve(Buffer.concat(chunks)); - } - if (!this.content || !this.content.readable) { - return reject(new GraphClientError("Error encountered while reading the stream during the upload")); - } - }); - }); - } -} -//# sourceMappingURL=StreamUpload.js.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/tasks/FileUploadTask/FileObjectClasses/StreamUpload.js.map b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/tasks/FileUploadTask/FileObjectClasses/StreamUpload.js.map deleted file mode 100644 index 93eefaf..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/tasks/FileUploadTask/FileObjectClasses/StreamUpload.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"StreamUpload.js","sourceRoot":"","sources":["../../../../../../src/tasks/FileUploadTask/FileObjectClasses/StreamUpload.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAe7D;;;GAGG;AACH,MAAM,OAAO,YAAY;IAQxB,YAA0B,OAAmB,EAAS,IAAY,EAAS,IAAY;QAA7D,YAAO,GAAP,OAAO,CAAY;QAAS,SAAI,GAAJ,IAAI,CAAQ;QAAS,SAAI,GAAJ,IAAI,CAAQ;QACtF,IAAI,CAAC,OAAO,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,EAAE;YAC/B,MAAM,IAAI,gBAAgB,CAAC,mFAAmF,CAAC,CAAC;SAChH;IACF,CAAC;IAED;;;;;OAKG;IACU,SAAS,CAAC,KAAY;;YAClC,IAAI,SAAS,GAAG,KAAK,CAAC,QAAQ,GAAG,KAAK,CAAC,QAAQ,GAAG,CAAC,CAAC;YACpD;;eAEG;YACH,MAAM,IAAI,GAAG,EAAE,CAAC;YAEhB;;;;;;eAMG;YACH,IAAI,IAAI,CAAC,aAAa,EAAE;gBACvB,IAAI,KAAK,CAAC,QAAQ,GAAG,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,QAAQ,EAAE;oBACvD,MAAM,IAAI,gBAAgB,CAAC,iHAAiH,CAAC,CAAC;iBAC9I;gBAED,IAAI,KAAK,CAAC,QAAQ,GAAG,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,QAAQ,EAAE;oBACvD,MAAM,gBAAgB,GAAG,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,QAAQ,CAAC;oBAC3D,MAAM,gBAAgB,GAAG,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,QAAQ,CAAC;oBAE3D,kEAAkE;oBAClE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,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YACtC,MAAM,MAAM,GAAG,EAAE,CAAC;YAClB,IAAI,SAAS,GAAG,IAAI,CAAC;YACrB,IAAI,MAAM,GAAG,CAAC,CAAC;YACf,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE;gBAC3B,IAAI,SAAS,GAAG,CAAC,EAAE;oBAClB,OAAO,MAAM,CAAC,IAAI,gBAAgB,CAAC,iDAAiD,CAAC,CAAC,CAAC;iBACvF;YACF,CAAC,CAAC,CAAC;YACH,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,UAAU,EAAE,GAAG,EAAE;gBAChC;;;mBAGG;gBACH,IAAI,KAAK,CAAC;gBACV,OAAO,MAAM,GAAG,IAAI,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,KAAK,IAAI,EAAE;oBACxE,MAAM,IAAI,KAAK,CAAC,MAAM,CAAC;oBACvB,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;oBACnB,IAAI,SAAS,GAAG,CAAC,EAAE;wBAClB,SAAS,GAAG,IAAI,GAAG,MAAM,CAAC;qBAC1B;iBACD;gBAED,IAAI,MAAM,KAAK,IAAI,EAAE;oBACpB,OAAO,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC;iBACtC;gBAED,IAAI,CAAC,IAAI,CAAC,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE;oBAC5C,OAAO,MAAM,CAAC,IAAI,gBAAgB,CAAC,8DAA8D,CAAC,CAAC,CAAC;iBACpG;YACF,CAAC,CAAC,CAAC;QACJ,CAAC,CAAC,CAAC;IACJ,CAAC;CACD"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/tasks/FileUploadTask/Interfaces/IUploadEventHandlers.d.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/tasks/FileUploadTask/Interfaces/IUploadEventHandlers.d.ts deleted file mode 100644 index 2165e25..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/tasks/FileUploadTask/Interfaces/IUploadEventHandlers.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { Range } from "../Range"; -/** - * Interface enabling progress handling with callbacks. - */ -export interface UploadEventHandlers { - /** - * Parameters that are passed into the progress, completed, failure callback options. - */ - extraCallbackParam?: unknown; - /** - * Callback function called on each slice upload during the LargeFileUploadTask.upload() process - */ - progress?: (range?: Range, extraCallbackParam?: unknown) => void; -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/tasks/FileUploadTask/Interfaces/IUploadEventHandlers.js b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/tasks/FileUploadTask/Interfaces/IUploadEventHandlers.js deleted file mode 100644 index 211d752..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/tasks/FileUploadTask/Interfaces/IUploadEventHandlers.js +++ /dev/null @@ -1,2 +0,0 @@ -export {}; -//# sourceMappingURL=IUploadEventHandlers.js.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/tasks/FileUploadTask/Interfaces/IUploadEventHandlers.js.map b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/tasks/FileUploadTask/Interfaces/IUploadEventHandlers.js.map deleted file mode 100644 index f794c27..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/tasks/FileUploadTask/Interfaces/IUploadEventHandlers.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"IUploadEventHandlers.js","sourceRoot":"","sources":["../../../../../../src/tasks/FileUploadTask/Interfaces/IUploadEventHandlers.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/tasks/FileUploadTask/Range.d.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/tasks/FileUploadTask/Range.d.ts deleted file mode 100644 index dec9b39..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/tasks/FileUploadTask/Range.d.ts +++ /dev/null @@ -1,34 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -/** - * @module Range - */ -/** - * @class - * Class representing Range - */ -export declare class Range { - /** - * @public - * The minimum value of the range - */ - minValue: number; - /** - * @public - * The maximum value of the range - */ - maxValue: number; - /** - * @public - * @constructor - * Creates a range for given min and max values - * @param {number} [minVal = -1] - The minimum value. - * @param {number} [maxVal = -1] - The maximum value. - * @returns An instance of a Range - */ - constructor(minVal?: number, maxVal?: number); -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/tasks/FileUploadTask/Range.js b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/tasks/FileUploadTask/Range.js deleted file mode 100644 index cb52764..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/tasks/FileUploadTask/Range.js +++ /dev/null @@ -1,28 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -/** - * @module Range - */ -/** - * @class - * Class representing Range - */ -export class Range { - /** - * @public - * @constructor - * Creates a range for given min and max values - * @param {number} [minVal = -1] - The minimum value. - * @param {number} [maxVal = -1] - The maximum value. - * @returns An instance of a Range - */ - constructor(minVal = -1, maxVal = -1) { - this.minValue = minVal; - this.maxValue = maxVal; - } -} -//# sourceMappingURL=Range.js.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/tasks/FileUploadTask/Range.js.map b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/tasks/FileUploadTask/Range.js.map deleted file mode 100644 index 4bae278..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/tasks/FileUploadTask/Range.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Range.js","sourceRoot":"","sources":["../../../../../src/tasks/FileUploadTask/Range.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;GAEG;AAEH;;;GAGG;AACH,MAAM,OAAO,KAAK;IAajB;;;;;;;OAOG;IACH,YAAmB,MAAM,GAAG,CAAC,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC;QAC1C,IAAI,CAAC,QAAQ,GAAG,MAAM,CAAC;QACvB,IAAI,CAAC,QAAQ,GAAG,MAAM,CAAC;IACxB,CAAC;CACD"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/tasks/FileUploadTask/UploadResult.d.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/tasks/FileUploadTask/UploadResult.d.ts deleted file mode 100644 index e8c170e..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/tasks/FileUploadTask/UploadResult.d.ts +++ /dev/null @@ -1,55 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -/** - * Class representing a successful file upload result - */ -export declare class UploadResult { - /** - * @private - * Location value looked up in the response header - */ - private _location; - /** - * @private - * Response body of the final raw response - */ - private _responseBody; - /** - * @public - * Get of the location value. - * Location value is looked up in the response header - */ - get location(): string; - /** - * @public - * Set the location value - * Location value is looked up in the response header - */ - set location(location: string); - /** - * @public - * Get The response body from the completed upload response - */ - get responseBody(): unknown; - /** - * @public - * Set the response body from the completed upload response - */ - set responseBody(responseBody: unknown); - /** - * @public - * @param {responseBody} responsebody - The response body from the completed upload response - * @param {location} location - The location value from the headers from the completed upload response - */ - constructor(responseBody: unknown, location: string); - /** - * @public - * @param {responseBody} responseBody - The response body from the completed upload response - * @param {responseHeaders} responseHeaders - The headers from the completed upload response - */ - static CreateUploadResult(responseBody?: unknown, responseHeaders?: Headers): UploadResult; -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/tasks/FileUploadTask/UploadResult.js b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/tasks/FileUploadTask/UploadResult.js deleted file mode 100644 index ba05401..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/tasks/FileUploadTask/UploadResult.js +++ /dev/null @@ -1,60 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -/** - * Class representing a successful file upload result - */ -export class UploadResult { - /** - * @public - * Get of the location value. - * Location value is looked up in the response header - */ - get location() { - return this._location; - } - /** - * @public - * Set the location value - * Location value is looked up in the response header - */ - set location(location) { - this._location = location; - } - /** - * @public - * Get The response body from the completed upload response - */ - get responseBody() { - return this._responseBody; - } - /** - * @public - * Set the response body from the completed upload response - */ - set responseBody(responseBody) { - this._responseBody = responseBody; - } - /** - * @public - * @param {responseBody} responsebody - The response body from the completed upload response - * @param {location} location - The location value from the headers from the completed upload response - */ - constructor(responseBody, location) { - // Response body or the location parameter can be undefined. - this._location = location; - this._responseBody = responseBody; - } - /** - * @public - * @param {responseBody} responseBody - The response body from the completed upload response - * @param {responseHeaders} responseHeaders - The headers from the completed upload response - */ - static CreateUploadResult(responseBody, responseHeaders) { - return new UploadResult(responseBody, responseHeaders.get("location")); - } -} -//# sourceMappingURL=UploadResult.js.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/tasks/FileUploadTask/UploadResult.js.map b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/tasks/FileUploadTask/UploadResult.js.map deleted file mode 100644 index 4b529b4..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/tasks/FileUploadTask/UploadResult.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"UploadResult.js","sourceRoot":"","sources":["../../../../../src/tasks/FileUploadTask/UploadResult.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;GAEG;AACH,MAAM,OAAO,YAAY;IAaxB;;;;OAIG;IACH,IAAW,QAAQ;QAClB,OAAO,IAAI,CAAC,SAAS,CAAC;IACvB,CAAC;IAED;;;;OAIG;IACH,IAAW,QAAQ,CAAC,QAAgB;QACnC,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;IAC3B,CAAC;IAED;;;OAGG;IACH,IAAW,YAAY;QACtB,OAAO,IAAI,CAAC,aAAa,CAAC;IAC3B,CAAC;IAED;;;OAGG;IACH,IAAW,YAAY,CAAC,YAAqB;QAC5C,IAAI,CAAC,aAAa,GAAG,YAAY,CAAC;IACnC,CAAC;IAED;;;;OAIG;IACH,YAAmB,YAAqB,EAAE,QAAgB;QACzD,4DAA4D;QAC5D,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;QAC1B,IAAI,CAAC,aAAa,GAAG,YAAY,CAAC;IACnC,CAAC;IAED;;;;OAIG;IACI,MAAM,CAAC,kBAAkB,CAAC,YAAsB,EAAE,eAAyB;QACjF,OAAO,IAAI,YAAY,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC;IACxE,CAAC;CACD"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/tasks/LargeFileUploadTask.d.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/tasks/LargeFileUploadTask.d.ts deleted file mode 100644 index 0f19ddd..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/tasks/LargeFileUploadTask.d.ts +++ /dev/null @@ -1,201 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -import { Client } from "../index"; -import { UploadEventHandlers } from "./FileUploadTask/Interfaces/IUploadEventHandlers"; -import { Range } from "./FileUploadTask/Range"; -import { UploadResult } from "./FileUploadTask/UploadResult"; -/** - * @interface - * Signature to representing key value pairs - * @property {[key: string] : string | number} - The Key value pair - */ -interface KeyValuePairObjectStringNumber { - [key: string]: string | number; -} -/** - * @interface - * Signature to define options for upload task - * @property {number} [rangeSize = LargeFileUploadTask.DEFAULT_FILE_SIZE] - Specifies the range chunk size - * @property {UploadEventHandlers} uploadEventHandlers - UploadEventHandlers attached to an upload task - */ -export interface LargeFileUploadTaskOptions { - rangeSize?: number; - uploadEventHandlers?: UploadEventHandlers; -} -/** - * @interface - * Signature to represent upload session resulting from the session creation in the server - * @property {string} url - The URL to which the file upload is made - * @property {Date} expiry - The expiration of the time of the upload session - */ -export interface LargeFileUploadSession { - url: string; - expiry: Date; - isCancelled?: boolean; -} -/** - * @type - * Representing the return type of the sliceFile function that is type of the slice of a given range. - */ -export type SliceType = ArrayBuffer | Blob | Uint8Array; -/** - * @interface - * Signature to define the properties and content of the file in upload task - * @property {ArrayBuffer | File} content - The actual file content - * @property {string} name - Specifies the file name with extension - * @property {number} size - Specifies size of the file - */ -export interface FileObject { - content: T; - name: string; - size: number; - sliceFile(range: Range): SliceType | Promise; -} -/** - * @class - * Class representing LargeFileUploadTask - */ -export declare class LargeFileUploadTask { - /** - * @private - * Default value for the rangeSize - */ - private DEFAULT_FILE_SIZE; - /** - * @protected - * The GraphClient instance - */ - protected client: Client; - /** - * @protected - * The object holding file details - */ - protected file: FileObject; - /** - * @protected - * The object holding options for the task - */ - protected options: LargeFileUploadTaskOptions; - /** - * @protected - * The object for upload session - */ - protected uploadSession: LargeFileUploadSession; - /** - * @protected - * The next range needs to be uploaded - */ - protected nextRange: Range; - /** - * @public - * @static - * @async - * Makes request to the server to create an upload session - * @param {Client} client - The GraphClient instance - * @param {string} requestUrl - The URL to create the upload session - * @param {any} payload - The payload that needs to be sent - * @param {KeyValuePairObjectStringNumber} headers - The headers that needs to be sent - * @returns The promise that resolves to LargeFileUploadSession - */ - static createUploadSession(client: Client, requestUrl: string, payload: any, headers?: KeyValuePairObjectStringNumber): Promise; - /** - * @public - * @constructor - * Constructs a LargeFileUploadTask - * @param {Client} client - The GraphClient instance - * @param {FileObject} file - The FileObject holding details of a file that needs to be uploaded - * @param {LargeFileUploadSession} uploadSession - The upload session to which the upload has to be done - * @param {LargeFileUploadTaskOptions} options - The upload task options - * @returns An instance of LargeFileUploadTask - */ - constructor(client: Client, file: FileObject, uploadSession: LargeFileUploadSession, options?: LargeFileUploadTaskOptions); - /** - * @private - * Parses given range string to the Range instance - * @param {string[]} ranges - The ranges value - * @returns The range instance - */ - private parseRange; - /** - * @private - * Updates the expiration date and the next range - * @param {UploadStatusResponse} response - The response of the upload status - * @returns Nothing - */ - private updateTaskStatus; - /** - * @public - * Gets next range that needs to be uploaded - * @returns The range instance - */ - getNextRange(): Range; - /** - * @deprecated This function has been moved into FileObject interface. - * @public - * Slices the file content to the given range - * @param {Range} range - The range value - * @returns The sliced ArrayBuffer or Blob - */ - sliceFile(range: Range): ArrayBuffer | Blob; - /** - * @public - * @async - * Uploads file to the server in a sequential order by slicing the file - * @returns The promise resolves to uploaded response - */ - upload(): Promise; - private reportProgress; - /** - * @public - * @async - * Uploads given slice to the server - * @param {ArrayBuffer | Blob | File} fileSlice - The file slice - * @param {Range} range - The range value - * @param {number} totalSize - The total size of a complete file - * @returns The response body of the upload slice result - */ - uploadSlice(fileSlice: ArrayBuffer | Blob | File, range: Range, totalSize: number): Promise; - /** - * @public - * @async - * Uploads given slice to the server - * @param {unknown} fileSlice - The file slice - * @param {Range} range - The range value - * @param {number} totalSize - The total size of a complete file - * @returns The raw response of the upload slice result - */ - uploadSliceGetRawResponse(fileSlice: unknown, range: Range, totalSize: number): Promise; - /** - * @public - * @async - * Deletes upload session in the server - * @returns The promise resolves to cancelled response - */ - cancel(): Promise; - /** - * @public - * @async - * Gets status for the upload session - * @returns The promise resolves to the status enquiry response - */ - getStatus(): Promise; - /** - * @public - * @async - * Resumes upload session and continue uploading the file from the last sent range - * @returns The promise resolves to the uploaded response - */ - resume(): Promise; - /** - * @public - * @async - * Get the upload session information - * @returns The large file upload session - */ - getUploadSession(): LargeFileUploadSession; -} -export {}; diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/tasks/LargeFileUploadTask.js b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/tasks/LargeFileUploadTask.js deleted file mode 100644 index c131a6a..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/tasks/LargeFileUploadTask.js +++ /dev/null @@ -1,279 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -import { __awaiter } from "tslib"; -/** - * @module LargeFileUploadTask - */ -import { GraphClientError } from "../GraphClientError"; -import { GraphResponseHandler } from "../GraphResponseHandler"; -import { ResponseType } from "../ResponseType"; -import { Range } from "./FileUploadTask/Range"; -import { UploadResult } from "./FileUploadTask/UploadResult"; -/** - * @class - * Class representing LargeFileUploadTask - */ -export class LargeFileUploadTask { - /** - * @public - * @static - * @async - * Makes request to the server to create an upload session - * @param {Client} client - The GraphClient instance - * @param {string} requestUrl - The URL to create the upload session - * @param {any} payload - The payload that needs to be sent - * @param {KeyValuePairObjectStringNumber} headers - The headers that needs to be sent - * @returns The promise that resolves to LargeFileUploadSession - */ - static createUploadSession(client, requestUrl, payload, headers = {}) { - return __awaiter(this, void 0, void 0, function* () { - const session = yield client - .api(requestUrl) - .headers(headers) - .post(payload); - const largeFileUploadSession = { - url: session.uploadUrl, - expiry: new Date(session.expirationDateTime), - isCancelled: false, - }; - return largeFileUploadSession; - }); - } - /** - * @public - * @constructor - * Constructs a LargeFileUploadTask - * @param {Client} client - The GraphClient instance - * @param {FileObject} file - The FileObject holding details of a file that needs to be uploaded - * @param {LargeFileUploadSession} uploadSession - The upload session to which the upload has to be done - * @param {LargeFileUploadTaskOptions} options - The upload task options - * @returns An instance of LargeFileUploadTask - */ - constructor(client, file, uploadSession, options = {}) { - /** - * @private - * Default value for the rangeSize - */ - this.DEFAULT_FILE_SIZE = 5 * 1024 * 1024; - this.client = client; - if (!file.sliceFile) { - throw new GraphClientError("Please pass the FileUpload object, StreamUpload object or any custom implementation of the FileObject interface"); - } - else { - this.file = file; - } - this.file = file; - if (!options.rangeSize) { - options.rangeSize = this.DEFAULT_FILE_SIZE; - } - this.options = options; - this.uploadSession = uploadSession; - this.nextRange = new Range(0, this.options.rangeSize - 1); - } - /** - * @private - * Parses given range string to the Range instance - * @param {string[]} ranges - The ranges value - * @returns The range instance - */ - parseRange(ranges) { - const rangeStr = ranges[0]; - if (typeof rangeStr === "undefined" || rangeStr === "") { - return new Range(); - } - const firstRange = rangeStr.split("-"); - const minVal = parseInt(firstRange[0], 10); - let maxVal = parseInt(firstRange[1], 10); - if (Number.isNaN(maxVal)) { - maxVal = this.file.size - 1; - } - return new Range(minVal, maxVal); - } - /** - * @private - * Updates the expiration date and the next range - * @param {UploadStatusResponse} response - The response of the upload status - * @returns Nothing - */ - updateTaskStatus(response) { - this.uploadSession.expiry = new Date(response.expirationDateTime); - this.nextRange = this.parseRange(response.nextExpectedRanges); - } - /** - * @public - * Gets next range that needs to be uploaded - * @returns The range instance - */ - getNextRange() { - if (this.nextRange.minValue === -1) { - return this.nextRange; - } - const minVal = this.nextRange.minValue; - let maxValue = minVal + this.options.rangeSize - 1; - if (maxValue >= this.file.size) { - maxValue = this.file.size - 1; - } - return new Range(minVal, maxValue); - } - /** - * @deprecated This function has been moved into FileObject interface. - * @public - * Slices the file content to the given range - * @param {Range} range - The range value - * @returns The sliced ArrayBuffer or Blob - */ - sliceFile(range) { - console.warn("The LargeFileUploadTask.sliceFile() function has been deprecated and moved into the FileObject interface."); - if (this.file.content instanceof ArrayBuffer || this.file.content instanceof Blob || this.file.content instanceof Uint8Array) { - return this.file.content.slice(range.minValue, range.maxValue + 1); - } - throw new GraphClientError("The LargeFileUploadTask.sliceFile() function expects only Blob, ArrayBuffer or Uint8Array file content. Please note that the sliceFile() function is deprecated."); - } - /** - * @public - * @async - * Uploads file to the server in a sequential order by slicing the file - * @returns The promise resolves to uploaded response - */ - upload() { - return __awaiter(this, void 0, void 0, function* () { - const uploadEventHandlers = this.options && this.options.uploadEventHandlers; - while (!this.uploadSession.isCancelled) { - const nextRange = this.getNextRange(); - if (nextRange.maxValue === -1) { - const err = new Error("Task with which you are trying to upload is already completed, Please check for your uploaded file"); - err.name = "Invalid Session"; - throw err; - } - const fileSlice = yield this.file.sliceFile(nextRange); - const rawResponse = yield this.uploadSliceGetRawResponse(fileSlice, nextRange, this.file.size); - if (!rawResponse) { - throw new GraphClientError("Something went wrong! Large file upload slice response is null."); - } - const responseBody = yield GraphResponseHandler.getResponse(rawResponse); - /** - * (rawResponse.status === 201) -> This condition is applicable for OneDrive, PrintDocument and Outlook APIs. - * (rawResponse.status === 200 && responseBody.id) -> This additional condition is applicable only for OneDrive API. - */ - if (rawResponse.status === 201 || (rawResponse.status === 200 && responseBody.id)) { - this.reportProgress(uploadEventHandlers, nextRange); - return UploadResult.CreateUploadResult(responseBody, rawResponse.headers); - } - /* Handling the API issue where the case of Outlook upload response property -'nextExpectedRanges' is not uniform. - * https://github.com/microsoftgraph/msgraph-sdk-serviceissues/issues/39 - */ - const res = { - expirationDateTime: responseBody.expirationDateTime || responseBody.ExpirationDateTime, - nextExpectedRanges: responseBody.NextExpectedRanges || responseBody.nextExpectedRanges, - }; - this.updateTaskStatus(res); - this.reportProgress(uploadEventHandlers, nextRange); - } - }); - } - reportProgress(uploadEventHandlers, nextRange) { - if (uploadEventHandlers && uploadEventHandlers.progress) { - uploadEventHandlers.progress(nextRange, uploadEventHandlers.extraCallbackParam); - } - } - /** - * @public - * @async - * Uploads given slice to the server - * @param {ArrayBuffer | Blob | File} fileSlice - The file slice - * @param {Range} range - The range value - * @param {number} totalSize - The total size of a complete file - * @returns The response body of the upload slice result - */ - uploadSlice(fileSlice, range, totalSize) { - return __awaiter(this, void 0, void 0, function* () { - return yield this.client - .api(this.uploadSession.url) - .headers({ - "Content-Length": `${range.maxValue - range.minValue + 1}`, - "Content-Range": `bytes ${range.minValue}-${range.maxValue}/${totalSize}`, - "Content-Type": "application/octet-stream", - }) - .put(fileSlice); - }); - } - /** - * @public - * @async - * Uploads given slice to the server - * @param {unknown} fileSlice - The file slice - * @param {Range} range - The range value - * @param {number} totalSize - The total size of a complete file - * @returns The raw response of the upload slice result - */ - uploadSliceGetRawResponse(fileSlice, range, totalSize) { - return __awaiter(this, void 0, void 0, function* () { - return yield this.client - .api(this.uploadSession.url) - .headers({ - "Content-Length": `${range.maxValue - range.minValue + 1}`, - "Content-Range": `bytes ${range.minValue}-${range.maxValue}/${totalSize}`, - "Content-Type": "application/octet-stream", - }) - .responseType(ResponseType.RAW) - .put(fileSlice); - }); - } - /** - * @public - * @async - * Deletes upload session in the server - * @returns The promise resolves to cancelled response - */ - cancel() { - return __awaiter(this, void 0, void 0, function* () { - const cancelResponse = yield this.client - .api(this.uploadSession.url) - .responseType(ResponseType.RAW) - .delete(); - if (cancelResponse.status === 204) { - this.uploadSession.isCancelled = true; - } - return cancelResponse; - }); - } - /** - * @public - * @async - * Gets status for the upload session - * @returns The promise resolves to the status enquiry response - */ - getStatus() { - return __awaiter(this, void 0, void 0, function* () { - const response = yield this.client.api(this.uploadSession.url).get(); - this.updateTaskStatus(response); - return response; - }); - } - /** - * @public - * @async - * Resumes upload session and continue uploading the file from the last sent range - * @returns The promise resolves to the uploaded response - */ - resume() { - return __awaiter(this, void 0, void 0, function* () { - yield this.getStatus(); - return yield this.upload(); - }); - } - /** - * @public - * @async - * Get the upload session information - * @returns The large file upload session - */ - getUploadSession() { - return this.uploadSession; - } -} -//# sourceMappingURL=LargeFileUploadTask.js.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/tasks/LargeFileUploadTask.js.map b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/tasks/LargeFileUploadTask.js.map deleted file mode 100644 index a1df153..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/tasks/LargeFileUploadTask.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"LargeFileUploadTask.js","sourceRoot":"","sources":["../../../../src/tasks/LargeFileUploadTask.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH;;GAEG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAE/D,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAiE7D;;;GAGG;AACH,MAAM,OAAO,mBAAmB;IAqC/B;;;;;;;;;;OAUG;IACI,MAAM,CAAO,mBAAmB,CAAC,MAAc,EAAE,UAAkB,EAAE,OAAY,EAAE,UAA0C,EAAE;;YACrI,MAAM,OAAO,GAAG,MAAM,MAAM;iBAC1B,GAAG,CAAC,UAAU,CAAC;iBACf,OAAO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CAAC,aAAa,CAAC;IAC3B,CAAC;CACD"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/tasks/OneDriveLargeFileUploadTask.d.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/tasks/OneDriveLargeFileUploadTask.d.ts deleted file mode 100644 index 9e70ea1..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/tasks/OneDriveLargeFileUploadTask.d.ts +++ /dev/null @@ -1,123 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -import { Client } from "../index"; -import { UploadEventHandlers } from "./FileUploadTask/Interfaces/IUploadEventHandlers"; -import { FileObject, LargeFileUploadSession, LargeFileUploadTask, LargeFileUploadTaskOptions } from "./LargeFileUploadTask"; -/** - * @interface - * Signature to define options when creating an upload task - * @property {string} fileName - Specifies the name of a file to be uploaded (with extension) - * @property {string} [fileDescription] - Specifies the description of the file to be uploaded - * @property {string} [path] - The path to which the file needs to be uploaded - * @property {number} [rangeSize] - Specifies the range chunk size - * @property {string} [conflictBehavior] - Conflict behaviour option - * @property {UploadEventHandlers} [uploadEventHandlers] - UploadEventHandlers attached to an upload task - */ -export interface OneDriveLargeFileUploadOptions { - fileName: string; - fileDescription?: string; - path?: string; - rangeSize?: number; - conflictBehavior?: string; - uploadEventHandlers?: UploadEventHandlers; - uploadSessionURL?: string; -} -/** - * @interface - * Signature to define options when creating an upload task - * @property {string} fileName - Specifies the name of a file to be uploaded (with extension) - * @property {string} [fileDescription] - Specifies the description of the file to be uploaded - * @property {string} [conflictBehavior] - Conflict behaviour option - */ -interface OneDriveFileUploadSessionPayLoad { - fileName: string; - fileDescription?: string; - conflictBehavior?: string; -} -/** - * @class - * Class representing OneDriveLargeFileUploadTask - */ -export declare class OneDriveLargeFileUploadTask extends LargeFileUploadTask { - /** - * @private - * @static - * Default path for the file being uploaded - */ - private static DEFAULT_UPLOAD_PATH; - /** - * @private - * @static - * Constructs the create session url for Onedrive - * @param {string} fileName - The name of the file - * @param {path} [path = OneDriveLargeFileUploadTask.DEFAULT_UPLOAD_PATH] - The path for the upload - * @returns The constructed create session url - */ - private static constructCreateSessionUrl; - /** - * @private - * @static - * Get file information - * @param {Blob | Uint8Array | File} file - The file entity - * @param {string} fileName - The file name - * @returns {FileInfo} The file information - */ - private static getFileInfo; - /** - * @public - * @static - * @async - * Creates a OneDriveLargeFileUploadTask - * @param {Client} client - The GraphClient instance - * @param {Blob | Uint8Array | File} file - File represented as Blob, Uint8Array or File - * @param {OneDriveLargeFileUploadOptions} options - The options for upload task - * @returns The promise that will be resolves to OneDriveLargeFileUploadTask instance - */ - static create(client: Client, file: Blob | Uint8Array | File, options: OneDriveLargeFileUploadOptions): Promise>; - /** - * @public - * @static - * @async - * Creates a OneDriveLargeFileUploadTask - * @param {Client} client - The GraphClient instance - * @param {FileObject} fileObject - FileObject instance - * @param {OneDriveLargeFileUploadOptions} options - The options for upload task - * @returns The promise that will be resolves to OneDriveLargeFileUploadTask instance - */ - static createTaskWithFileObject(client: Client, fileObject: FileObject, options: OneDriveLargeFileUploadOptions): Promise>; - /** - * @public - * @static - * @async - * Makes request to the server to create an upload session - * @param {Client} client - The GraphClient instance - * @param {string} requestUrl - The URL to create the upload session - * @param {string} payloadOptions - The payload option. Default conflictBehavior is 'rename' - * @returns The promise that resolves to LargeFileUploadSession - */ - static createUploadSession(client: Client, requestUrl: string, payloadOptions: OneDriveFileUploadSessionPayLoad): Promise; - /** - * @public - * @constructor - * Constructs a OneDriveLargeFileUploadTask - * @param {Client} client - The GraphClient instance - * @param {FileObject} file - The FileObject holding details of a file that needs to be uploaded - * @param {LargeFileUploadSession} uploadSession - The upload session to which the upload has to be done - * @param {LargeFileUploadTaskOptions} options - The upload task options - * @returns An instance of OneDriveLargeFileUploadTask - */ - constructor(client: Client, file: FileObject, uploadSession: LargeFileUploadSession, options: LargeFileUploadTaskOptions); - /** - * @public - * Commits upload session to end uploading - * @param {string} requestUrl - The URL to commit the upload session - * @param {string} conflictBehavior - Conflict behaviour option. Default is 'rename' - * @returns The promise resolves to committed response - */ - commit(requestUrl: string, conflictBehavior?: string): Promise; -} -export {}; diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/tasks/OneDriveLargeFileUploadTask.js b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/tasks/OneDriveLargeFileUploadTask.js deleted file mode 100644 index 653ce7f..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/tasks/OneDriveLargeFileUploadTask.js +++ /dev/null @@ -1,188 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -import { __awaiter } from "tslib"; -/** - * @module OneDriveLargeFileUploadTask - */ -import { GraphClientError } from "../GraphClientError"; -import { FileUpload } from "./FileUploadTask/FileObjectClasses/FileUpload"; -import { LargeFileUploadTask } from "./LargeFileUploadTask"; -import { getValidRangeSize } from "./OneDriveLargeFileUploadTaskUtil"; -/** - * @class - * Class representing OneDriveLargeFileUploadTask - */ -export class OneDriveLargeFileUploadTask extends LargeFileUploadTask { - /** - * @private - * @static - * Constructs the create session url for Onedrive - * @param {string} fileName - The name of the file - * @param {path} [path = OneDriveLargeFileUploadTask.DEFAULT_UPLOAD_PATH] - The path for the upload - * @returns The constructed create session url - */ - static constructCreateSessionUrl(fileName, path = OneDriveLargeFileUploadTask.DEFAULT_UPLOAD_PATH) { - fileName = fileName.trim(); - path = path.trim(); - if (path === "") { - path = "/"; - } - if (path[0] !== "/") { - path = `/${path}`; - } - if (path[path.length - 1] !== "/") { - path = `${path}/`; - } - // we choose to encode each component of the file path separately because when encoding full URI - // with encodeURI, special characters like # or % in the file name doesn't get encoded as desired - return `/me/drive/root:${path - .split("/") - .map((p) => encodeURIComponent(p)) - .join("/")}${encodeURIComponent(fileName)}:/createUploadSession`; - } - /** - * @private - * @static - * Get file information - * @param {Blob | Uint8Array | File} file - The file entity - * @param {string} fileName - The file name - * @returns {FileInfo} The file information - */ - static getFileInfo(file, fileName) { - let content; - let size; - if (typeof Blob !== "undefined" && file instanceof Blob) { - content = new File([file], fileName); - size = content.size; - } - else if (typeof File !== "undefined" && file instanceof File) { - content = file; - size = content.size; - } - else if (typeof Uint8Array !== "undefined" && file instanceof Uint8Array) { - const b = file; - size = b.byteLength; - content = b.buffer.slice(b.byteOffset, b.byteOffset + b.byteLength); - } - return { - content, - size, - }; - } - /** - * @public - * @static - * @async - * Creates a OneDriveLargeFileUploadTask - * @param {Client} client - The GraphClient instance - * @param {Blob | Uint8Array | File} file - File represented as Blob, Uint8Array or File - * @param {OneDriveLargeFileUploadOptions} options - The options for upload task - * @returns The promise that will be resolves to OneDriveLargeFileUploadTask instance - */ - static create(client, file, options) { - return __awaiter(this, void 0, void 0, function* () { - if (!client || !file || !options) { - throw new GraphClientError("Please provide the Graph client instance, file object and OneDriveLargeFileUploadOptions value"); - } - const fileName = options.fileName; - const fileInfo = OneDriveLargeFileUploadTask.getFileInfo(file, fileName); - const fileObj = new FileUpload(fileInfo.content, fileName, fileInfo.size); - return this.createTaskWithFileObject(client, fileObj, options); - }); - } - /** - * @public - * @static - * @async - * Creates a OneDriveLargeFileUploadTask - * @param {Client} client - The GraphClient instance - * @param {FileObject} fileObject - FileObject instance - * @param {OneDriveLargeFileUploadOptions} options - The options for upload task - * @returns The promise that will be resolves to OneDriveLargeFileUploadTask instance - */ - static createTaskWithFileObject(client, fileObject, options) { - return __awaiter(this, void 0, void 0, function* () { - if (!client || !fileObject || !options) { - throw new GraphClientError("Please provide the Graph client instance, FileObject interface implementation and OneDriveLargeFileUploadOptions value"); - } - const requestUrl = options.uploadSessionURL ? options.uploadSessionURL : OneDriveLargeFileUploadTask.constructCreateSessionUrl(options.fileName, options.path); - const uploadSessionPayload = { - fileName: options.fileName, - fileDescription: options.fileDescription, - conflictBehavior: options.conflictBehavior, - }; - const session = yield OneDriveLargeFileUploadTask.createUploadSession(client, requestUrl, uploadSessionPayload); - const rangeSize = getValidRangeSize(options.rangeSize); - return new OneDriveLargeFileUploadTask(client, fileObject, session, { - rangeSize, - uploadEventHandlers: options.uploadEventHandlers, - }); - }); - } - /** - * @public - * @static - * @async - * Makes request to the server to create an upload session - * @param {Client} client - The GraphClient instance - * @param {string} requestUrl - The URL to create the upload session - * @param {string} payloadOptions - The payload option. Default conflictBehavior is 'rename' - * @returns The promise that resolves to LargeFileUploadSession - */ - static createUploadSession(client, requestUrl, payloadOptions) { - const _super = Object.create(null, { - createUploadSession: { get: () => super.createUploadSession } - }); - return __awaiter(this, void 0, void 0, function* () { - const payload = { - item: { - "@microsoft.graph.conflictBehavior": (payloadOptions === null || payloadOptions === void 0 ? void 0 : payloadOptions.conflictBehavior) || "rename", - name: payloadOptions === null || payloadOptions === void 0 ? void 0 : payloadOptions.fileName, - description: payloadOptions === null || payloadOptions === void 0 ? void 0 : payloadOptions.fileDescription, - }, - }; - return _super.createUploadSession.call(this, client, requestUrl, payload); - }); - } - /** - * @public - * @constructor - * Constructs a OneDriveLargeFileUploadTask - * @param {Client} client - The GraphClient instance - * @param {FileObject} file - The FileObject holding details of a file that needs to be uploaded - * @param {LargeFileUploadSession} uploadSession - The upload session to which the upload has to be done - * @param {LargeFileUploadTaskOptions} options - The upload task options - * @returns An instance of OneDriveLargeFileUploadTask - */ - constructor(client, file, uploadSession, options) { - super(client, file, uploadSession, options); - } - /** - * @public - * Commits upload session to end uploading - * @param {string} requestUrl - The URL to commit the upload session - * @param {string} conflictBehavior - Conflict behaviour option. Default is 'rename' - * @returns The promise resolves to committed response - */ - commit(requestUrl, conflictBehavior = "rename") { - return __awaiter(this, void 0, void 0, function* () { - const payload = { - name: this.file.name, - "@microsoft.graph.conflictBehavior": conflictBehavior, - "@microsoft.graph.sourceUrl": this.uploadSession.url, - }; - return yield this.client.api(requestUrl).put(payload); - }); - } -} -/** - * @private - * @static - * Default path for the file being uploaded - */ -OneDriveLargeFileUploadTask.DEFAULT_UPLOAD_PATH = "/"; -//# sourceMappingURL=OneDriveLargeFileUploadTask.js.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/tasks/OneDriveLargeFileUploadTask.js.map b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/tasks/OneDriveLargeFileUploadTask.js.map deleted file mode 100644 index 33ebc3a..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/tasks/OneDriveLargeFileUploadTask.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"OneDriveLargeFileUploadTask.js","sourceRoot":"","sources":["../../../../src/tasks/OneDriveLargeFileUploadTask.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH;;GAEG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAEvD,OAAO,EAAE,UAAU,EAAE,MAAM,+CAA+C,CAAC;AAE3E,OAAO,EAAsC,mBAAmB,EAA8B,MAAM,uBAAuB,CAAC;AAC5H,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AAkDtE;;;GAGG;AACH,MAAM,OAAO,2BAA+B,SAAQ,mBAAsB;IAQzE;;;;;;;OAOG;IACK,MAAM,CAAC,yBAAyB,CAAC,QAAgB,EAAE,OAAe,2BAA2B,CAAC,mBAAmB;QACxH,QAAQ,GAAG,QAAQ,CAAC,IAAI,EAAE,CAAC;QAC3B,IAAI,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC;QACnB,IAAI,IAAI,KAAK,EAAE,EAAE;YAChB,IAAI,GAAG,GAAG,CAAC;SACX;QACD,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,GAAG,EAAE;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of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/tasks/OneDriveLargeFileUploadTaskUtil.d.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/tasks/OneDriveLargeFileUploadTaskUtil.d.ts deleted file mode 100644 index 5f59e5e..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/tasks/OneDriveLargeFileUploadTaskUtil.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -/** - * @constant - * Get the valid rangeSize for a file slicing (validity is based on the constrains mentioned in here - * {@link https://developer.microsoft.com/en-us/graph/docs/api-reference/v1.0/api/driveitem_createuploadsession#upload-bytes-to-the-upload-session}) - * - * @param {number} [rangeSize = DEFAULT_FILE_SIZE] - The rangeSize value. - * @returns The valid rangeSize - */ -export declare const getValidRangeSize: (rangeSize?: number) => number; diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/tasks/OneDriveLargeFileUploadTaskUtil.js b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/tasks/OneDriveLargeFileUploadTaskUtil.js deleted file mode 100644 index c673c31..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/tasks/OneDriveLargeFileUploadTaskUtil.js +++ /dev/null @@ -1,43 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -/** - * @module OneDriveLargeFileUploadTaskUtil - */ -/** - * @constant - * Default value for the rangeSize - * Recommended size is between 5 - 10 MB {@link https://developer.microsoft.com/en-us/graph/docs/api-reference/v1.0/api/driveitem_createuploadsession#best-practices} - */ -const DEFAULT_FILE_SIZE = 5 * 1024 * 1024; -/** - * @constant - * Rounds off the given value to a multiple of 320 KB - * @param {number} value - The value - * @returns The rounded off value - */ -const roundTo320KB = (value) => { - if (value > 320 * 1024) { - value = Math.floor(value / (320 * 1024)) * 320 * 1024; - } - return value; -}; -/** - * @constant - * Get the valid rangeSize for a file slicing (validity is based on the constrains mentioned in here - * {@link https://developer.microsoft.com/en-us/graph/docs/api-reference/v1.0/api/driveitem_createuploadsession#upload-bytes-to-the-upload-session}) - * - * @param {number} [rangeSize = DEFAULT_FILE_SIZE] - The rangeSize value. - * @returns The valid rangeSize - */ -export const getValidRangeSize = (rangeSize = DEFAULT_FILE_SIZE) => { - const sixtyMB = 60 * 1024 * 1024; - if (rangeSize > sixtyMB) { - rangeSize = sixtyMB; - } - return roundTo320KB(rangeSize); -}; -//# sourceMappingURL=OneDriveLargeFileUploadTaskUtil.js.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/tasks/OneDriveLargeFileUploadTaskUtil.js.map b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/tasks/OneDriveLargeFileUploadTaskUtil.js.map deleted file mode 100644 index a84cb05..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/tasks/OneDriveLargeFileUploadTaskUtil.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"OneDriveLargeFileUploadTaskUtil.js","sourceRoot":"","sources":["../../../../src/tasks/OneDriveLargeFileUploadTaskUtil.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;GAEG;AAEH;;;;GAIG;AACH,MAAM,iBAAiB,GAAW,CAAC,GAAG,IAAI,GAAG,IAAI,CAAC;AAElD;;;;;GAKG;AACH,MAAM,YAAY,GAAG,CAAC,KAAa,EAAU,EAAE;IAC9C,IAAI,KAAK,GAAG,GAAG,GAAG,IAAI,EAAE;QACvB,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,CAAC,GAAG,GAAG,IAAI,CAAC,CAAC,GAAG,GAAG,GAAG,IAAI,CAAC;KACtD;IACD,OAAO,KAAK,CAAC;AACd,CAAC,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,YAAoB,iBAAiB,EAAU,EAAE;IAClF,MAAM,OAAO,GAAG,EAAE,GAAG,IAAI,GAAG,IAAI,CAAC;IACjC,IAAI,SAAS,GAAG,OAAO,EAAE;QACxB,SAAS,GAAG,OAAO,CAAC;KACpB;IACD,OAAO,YAAY,CAAC,SAAS,CAAC,CAAC;AAChC,CAAC,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/tasks/PageIterator.d.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/tasks/PageIterator.d.ts deleted file mode 100644 index 5911bac..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/tasks/PageIterator.d.ts +++ /dev/null @@ -1,140 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -/** - * @module PageIterator - */ -import { FetchOptions } from "../IFetchOptions"; -import { Client } from "../index"; -import { MiddlewareOptions } from "../middleware/options/IMiddlewareOptions"; -/** - * Signature representing PageCollection - * @property {any[]} value - The collection value - * @property {string} [@odata.nextLink] - The nextLink value - * @property {string} [@odata.deltaLink] - The deltaLink value - * @property {any} Additional - Any number of additional properties (This is to accept the any additional data returned by in the response to the nextLink request) - */ -export interface PageCollection { - value: any[]; - "@odata.nextLink"?: string; - "@odata.deltaLink"?: string; - [Key: string]: any; -} -/** - * Signature to define the request options to be sent during request. - * The values of the GraphRequestOptions properties are passed to the Graph Request object. - * @property {HeadersInit} headers - the header options for the request - * @property {MiddlewareOptions[]} middlewareoptions - The middleware options for the request - * @property {FetchOptions} options - The fetch options for the request - */ -export interface GraphRequestOptions { - headers?: HeadersInit; - middlewareOptions?: MiddlewareOptions[]; - options?: FetchOptions; -} -/** - * Signature representing callback for page iterator - * @property {Function} callback - The callback function which should return boolean to continue the continue/stop the iteration. - */ -export type PageIteratorCallback = (data: any) => boolean; -/** - * @class - * Class for PageIterator - */ -export declare class PageIterator { - /** - * @private - * Member holding the GraphClient instance - */ - private client; - /** - * @private - * Member holding the page collection - */ - private collection; - /** - * @private - * Member variable referring to nextLink of the page collection - */ - private nextLink; - /** - * @private - * Member variable referring to deltaLink of the request - */ - private deltaLink; - /** - * @private - * Holding callback for Iteration. - */ - private callback; - /** - * @private - * Member holding a complete/incomplete status of an iterator - */ - private complete; - /** - * @private - * Information to be added to the request - */ - private requestOptions; - /** - * @private - * Member holding the current position on the collection - */ - private cursor; - /** - * @public - * @constructor - * Creates new instance for PageIterator - * @param {Client} client - The graph client instance - * @param {PageCollection} pageCollection - The page collection object - * @param {PageIteratorCallback} callBack - The callback function - * @param {GraphRequestOptions} requestOptions - The request options - * @returns An instance of a PageIterator - */ - constructor(client: Client, pageCollection: PageCollection, callback: PageIteratorCallback, requestOptions?: GraphRequestOptions); - /** - * @private - * Iterates over a collection by enqueuing entries one by one and kicking the callback with the enqueued entry - * @returns A boolean indicating the continue flag to process next page - */ - private iterationHelper; - /** - * @private - * @async - * Helper to make a get request to fetch next page with nextLink url and update the page iterator instance with the returned response - * @returns A promise that resolves to a response data with next page collection - */ - private fetchAndUpdateNextPageData; - /** - * @public - * Getter to get the deltaLink in the current response - * @returns A deltaLink which is being used to make delta requests in future - */ - getDeltaLink(): string | undefined; - /** - * @public - * @async - * Iterates over the collection and kicks callback for each item on iteration. Fetches next set of data through nextLink and iterates over again - * This happens until the nextLink is drained out or the user responds with a red flag to continue from callback - * @returns A Promise that resolves to nothing on completion and throws error incase of any discrepancy. - */ - iterate(): Promise; - /** - * @public - * @async - * To resume the iteration - * Note: This internally calls the iterate method, It's just for more readability. - * @returns A Promise that resolves to nothing on completion and throws error incase of any discrepancy - */ - resume(): Promise; - /** - * @public - * To get the completeness status of the iterator - * @returns Boolean indicating the completeness - */ - isComplete(): boolean; -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/tasks/PageIterator.js b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/tasks/PageIterator.js deleted file mode 100644 index 02d3ad0..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/tasks/PageIterator.js +++ /dev/null @@ -1,130 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -import { __awaiter } from "tslib"; -/** - * @class - * Class for PageIterator - */ -export class PageIterator { - /** - * @public - * @constructor - * Creates new instance for PageIterator - * @param {Client} client - The graph client instance - * @param {PageCollection} pageCollection - The page collection object - * @param {PageIteratorCallback} callBack - The callback function - * @param {GraphRequestOptions} requestOptions - The request options - * @returns An instance of a PageIterator - */ - constructor(client, pageCollection, callback, requestOptions) { - this.client = client; - this.collection = pageCollection.value; - this.nextLink = pageCollection["@odata.nextLink"]; - this.deltaLink = pageCollection["@odata.deltaLink"]; - this.callback = callback; - this.cursor = 0; - this.complete = false; - this.requestOptions = requestOptions; - } - /** - * @private - * Iterates over a collection by enqueuing entries one by one and kicking the callback with the enqueued entry - * @returns A boolean indicating the continue flag to process next page - */ - iterationHelper() { - if (this.collection === undefined) { - return false; - } - let advance = true; - while (advance && this.cursor < this.collection.length) { - const item = this.collection[this.cursor]; - advance = this.callback(item); - this.cursor++; - } - return advance; - } - /** - * @private - * @async - * Helper to make a get request to fetch next page with nextLink url and update the page iterator instance with the returned response - * @returns A promise that resolves to a response data with next page collection - */ - fetchAndUpdateNextPageData() { - return __awaiter(this, void 0, void 0, function* () { - let graphRequest = this.client.api(this.nextLink); - if (this.requestOptions) { - if (this.requestOptions.headers) { - graphRequest = graphRequest.headers(this.requestOptions.headers); - } - if (this.requestOptions.middlewareOptions) { - graphRequest = graphRequest.middlewareOptions(this.requestOptions.middlewareOptions); - } - if (this.requestOptions.options) { - graphRequest = graphRequest.options(this.requestOptions.options); - } - } - const response = yield graphRequest.get(); - this.collection = response.value; - this.cursor = 0; - this.nextLink = response["@odata.nextLink"]; - this.deltaLink = response["@odata.deltaLink"]; - }); - } - /** - * @public - * Getter to get the deltaLink in the current response - * @returns A deltaLink which is being used to make delta requests in future - */ - getDeltaLink() { - return this.deltaLink; - } - /** - * @public - * @async - * Iterates over the collection and kicks callback for each item on iteration. Fetches next set of data through nextLink and iterates over again - * This happens until the nextLink is drained out or the user responds with a red flag to continue from callback - * @returns A Promise that resolves to nothing on completion and throws error incase of any discrepancy. - */ - iterate() { - return __awaiter(this, void 0, void 0, function* () { - let advance = this.iterationHelper(); - while (advance) { - if (this.nextLink !== undefined) { - yield this.fetchAndUpdateNextPageData(); - advance = this.iterationHelper(); - } - else { - advance = false; - } - } - if (this.nextLink === undefined && this.cursor >= this.collection.length) { - this.complete = true; - } - }); - } - /** - * @public - * @async - * To resume the iteration - * Note: This internally calls the iterate method, It's just for more readability. - * @returns A Promise that resolves to nothing on completion and throws error incase of any discrepancy - */ - resume() { - return __awaiter(this, void 0, void 0, function* () { - return this.iterate(); - }); - } - /** - * @public - * To get the completeness status of the iterator - * @returns Boolean indicating the completeness - */ - isComplete() { - return this.complete; - } -} -//# sourceMappingURL=PageIterator.js.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/tasks/PageIterator.js.map b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/tasks/PageIterator.js.map deleted file mode 100644 index 7dba6b1..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/es/src/tasks/PageIterator.js.map +++ /dev/null @@ -1 +0,0 @@ -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CAAC,QAAQ,GAAG,IAAI,CAAC;aACrB;QACF,CAAC;KAAA;IAED;;;;;;OAMG;IACU,MAAM;;YAClB,OAAO,IAAI,CAAC,OAAO,EAAE,CAAC;QACvB,CAAC;KAAA;IAED;;;;OAIG;IACI,UAAU;QAChB,OAAO,IAAI,CAAC,QAAQ,CAAC;IACtB,CAAC;CACD"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/graph-client-msalBrowserAuthProvider.js b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/graph-client-msalBrowserAuthProvider.js deleted file mode 100644 index 460bbf4..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/graph-client-msalBrowserAuthProvider.js +++ /dev/null @@ -1,7 +0,0 @@ -/** -* ------------------------------------------------------------------------------------------- -* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. -* See License in the project root for license information. -* ------------------------------------------------------------------------------------------- -*/ -var MSGraphAuthCodeMSALBrowserAuthProvider=function(t,e){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function o(t){var e=function(t,e){if("object"!==n(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var o=r.call(t,e||"default");if("object"!==n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===n(e)?e:String(e)}function i(t,e){for(var r=0;r=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var u=c.call(i,"catchLoc"),s=c.call(i,"finallyLoc");if(u&&s){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&c.call(n,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),R(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;R(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:C(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=n),g}},o}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports}(u);var l=(0,u.exports)(),p=l;try{regeneratorRuntime=l}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=l:Function("r","regeneratorRuntime = r")(l)}var h=a(p);function y(t,e,r,n){return new(r||(r=Promise))((function(o,i){function c(t){try{u(n.next(t))}catch(t){i(t)}}function a(t){try{u(n.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(c,a)}u((n=n.apply(t,e||[])).next())}))}function v(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function d(t,e){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},d(t,e)}function b(t){return b=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},b(t)}function m(t,e,r){return m=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}()?Reflect.construct.bind():function(t,e,r){var n=[null];n.push.apply(n,e);var o=new(Function.bind.apply(t,n));return r&&d(o,r.prototype),o},m.apply(null,arguments)}function g(t){var e="function"==typeof Map?new Map:void 0;return g=function(t){if(null===t||(r=t,-1===Function.toString.call(r).indexOf("[native code]")))return t;var r;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,n)}function n(){return m(t,arguments,b(this).constructor)}return n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),d(n,t)},g(t)}function w(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,o=b(t);if(e){var i=b(this).constructor;r=Reflect.construct(o,arguments,i)}else r=o.apply(this,arguments);return function(t,e){if(e&&("object"===n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return v(t)}(this,r)}}"function"==typeof SuppressedError&&SuppressedError;var x=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&d(t,e)}(n,t);var e=w(n);function n(t){var o;return r(this,n),o=e.call(this,t),Object.setPrototypeOf(v(o),n.prototype),o}return c(n,null,[{key:"setGraphClientError",value:function(t){var e;return t instanceof Error?e=t:(e=new n).customError=t,e}}]),n}(g(Error)),E=function(){function t(e,n){if(r(this,t),this.publicClientApplication=e,this.options=n,!n||!e)throw new x("Please pass valid PublicClientApplication instance and AuthCodeMSALBrowserAuthenticationProviderOptions instance to instantiate MSALBrowserAuthenticationProvider")}return c(t,[{key:"getAccessToken",value:function(){return y(this,void 0,void 0,h.mark((function t(){var r,n,o,i,c;return h.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=this.options&&this.options.scopes,n=this.options&&this.options.account,o=new x,r&&0!==r.length){t.next=7;break}throw o.name="Empty Scopes",o.message="Scopes cannot be empty, Please provide scopes",o;case 7:return t.prev=7,t.next=10,this.publicClientApplication.acquireTokenSilent({scopes:r,account:n});case 10:if((i=t.sent)&&i.accessToken){t.next=15;break}throw o.name="Access token is undefined",o.message="Received empty access token from PublicClientApplication",o;case 15:return t.abrupt("return",i.accessToken);case 18:if(t.prev=18,t.t0=t.catch(7),!(t.t0 instanceof e.InteractionRequiredAuthError)){t.next=32;break}if(this.options.interactionType!==e.InteractionType.Redirect){t.next=25;break}this.publicClientApplication.acquireTokenRedirect({scopes:r}),t.next=30;break;case 25:if(this.options.interactionType!==e.InteractionType.Popup){t.next=30;break}return t.next=28,this.publicClientApplication.acquireTokenPopup({scopes:r});case 28:return c=t.sent,t.abrupt("return",c.accessToken);case 30:t.next=33;break;case 32:throw t.t0;case 33:case"end":return t.stop()}}),t,this,[[7,18]])})))}}]),t}();return t.AuthCodeMSALBrowserAuthenticationProvider=E,t}({},msal); diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/graph-client-tokenCredentialAuthProvider.js b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/graph-client-tokenCredentialAuthProvider.js deleted file mode 100644 index 7285c2c..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/graph-client-tokenCredentialAuthProvider.js +++ /dev/null @@ -1,7 +0,0 @@ -/** -* ------------------------------------------------------------------------------------------- -* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. -* See License in the project root for license information. -* ------------------------------------------------------------------------------------------- -*/ -var MicrosoftGraphTokenCredentialAuthProvider=function(t){"use strict";function e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function n(t){var e=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e||"default");if("object"!==r(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===r(e)?e:String(e)}function o(t,e){for(var r=0;r=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var u=a.call(i,"catchLoc"),f=a.call(i,"finallyLoc");if(u&&f){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&a.call(n,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),C(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;C(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:A(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=n),g}},o}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports}(c);var s=(0,c.exports)(),l=s;try{regeneratorRuntime=s}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=s:Function("r","regeneratorRuntime = r")(s)}var p=a(l);function h(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{u(n.next(t))}catch(t){i(t)}}function c(t){try{u(n.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,c)}u((n=n.apply(t,e||[])).next())}))}function y(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function v(t,e){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},v(t,e)}function d(t){return d=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},d(t)}function m(t,e,r){return m=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}()?Reflect.construct.bind():function(t,e,r){var n=[null];n.push.apply(n,e);var o=new(Function.bind.apply(t,n));return r&&v(o,r.prototype),o},m.apply(null,arguments)}function b(t){var e="function"==typeof Map?new Map:void 0;return b=function(t){if(null===t||(r=t,-1===Function.toString.call(r).indexOf("[native code]")))return t;var r;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,n)}function n(){return m(t,arguments,d(this).constructor)}return n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),v(n,t)},b(t)}function g(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,o=d(t);if(e){var i=d(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return function(t,e){if(e&&("object"===r(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return y(t)}(this,n)}}"function"==typeof SuppressedError&&SuppressedError;var w=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&v(t,e)}(n,t);var r=g(n);function n(t){var o;return e(this,n),o=r.call(this,t),Object.setPrototypeOf(y(o),n.prototype),o}return i(n,null,[{key:"setGraphClientError",value:function(t){var e;return t instanceof Error?e=t:(e=new n).customError=t,e}}]),n}(b(Error)),x=function(){function t(r,n){if(e(this,t),!r)throw new w("Please pass a token credential object to the TokenCredentialAuthenticationProvider class constructor");if(!n)throw new w("Please pass the TokenCredentialAuthenticationProviderOptions with scopes to the TokenCredentialAuthenticationProvider class constructor");this.authenticationProviderOptions=n,this.tokenCredential=r}return i(t,[{key:"getAccessToken",value:function(){return h(this,void 0,void 0,p.mark((function t(){var e,r,n;return p.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=this.authenticationProviderOptions.scopes,r=new w,e&&0!==e.length){t.next=6;break}throw r.name="Empty Scopes",r.message="Scopes cannot be empty, Please provide scopes",r;case 6:return t.next=8,this.tokenCredential.getToken(e,this.authenticationProviderOptions.getTokenOptions);case 8:if(!(n=t.sent)){t.next=11;break}return t.abrupt("return",n.token);case 11:throw r.message="Cannot retrieve accessToken from the Token Credential object",r.name="Access token is undefined",r;case 14:case"end":return t.stop()}}),t,this)})))}}]),t}();return t.TokenCredentialAuthenticationProvider=x,t}({}); diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/graph-js-sdk.js b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/graph-js-sdk.js deleted file mode 100644 index e41562e..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/graph-js-sdk.js +++ /dev/null @@ -1,7 +0,0 @@ -/** -* ------------------------------------------------------------------------------------------- -* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. -* See License in the project root for license information. -* ------------------------------------------------------------------------------------------- -*/ -var MicrosoftGraph=function(e){"use strict";function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function n(e){var t=function(e,t){if("object"!==r(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===r(t)?t:String(t)}function i(e,t){for(var r=0;r=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var u=a.call(o,"catchLoc"),c=a.call(o,"finallyLoc");if(u&&c){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&a.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),D(r),w}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;D(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:M(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=n),w}},i}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports}(s);var l=(0,s.exports)(),d=l;try{regeneratorRuntime=l}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=l:Function("r","regeneratorRuntime = r")(l)}var f,h=a(d);function p(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))}function v(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return y(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return y(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);rn){var i=new Error("Maximum requests limit exceeded, Max allowed number of requests are ".concat(n));throw i.name="Limit Exceeded Error",i}var o,a=v(r);try{for(a.s();!(o=a.n()).done;){var s=o.value;this.addRequest(s)}}catch(e){a.e(e)}finally{a.f()}}}return o(e,[{key:"addRequest",value:function(t){var r=e.requestLimit;if(""===t.id){var n=new Error("Id for a request is empty, Please provide an unique id");throw n.name="Empty Id For Request",n}if(this.requests.size===r){var i=new Error("Maximum requests limit exceeded, Max allowed number of requests are ".concat(r));throw i.name="Limit Exceeded Error",i}if(this.requests.has(t.id)){var o=new Error("Adding request with duplicate id ".concat(t.id,", Make the id of the requests unique"));throw o.name="Duplicate RequestId Error",o}return this.requests.set(t.id,t),t.id}},{key:"removeRequest",value:function(e){for(var t=this.requests.delete(e),r=this.requests.entries(),n=r.next();!n.done;){var i=n.value[1].dependsOn;if(void 0!==i){var o=i.indexOf(e);-1!==o&&i.splice(o,1),0===i.length&&delete n.value[1].dependsOn}n=r.next()}return t}},{key:"getContent",value:function(){return p(this,void 0,void 0,h.mark((function t(){var r,n,i,o,a,s,u,c,l;return h.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n={requests:r=[]},i=this.requests.entries(),!(o=i.next()).done){t.next=8;break}throw(a=new Error("No requests added yet, Please add at least one request.")).name="Empty Payload",a;case 8:if(e.validateDependencies(this.requests)){t.next=12;break}throw(s=new Error("Invalid dependency found, Dependency should be:\n1. Parallel - no individual request states a dependency in the dependsOn property.\n2. Serial - all individual requests depend on the previous individual request.\n3. Same - all individual requests that state a dependency in the dependsOn property, state the same dependency.")).name="Invalid Dependency",s;case 12:if(o.done){t.next=27;break}return u=o.value[1],t.next=16,e.getRequestData(u.request);case 16:if(void 0===(c=t.sent).body||void 0!==c.headers&&void 0!==c.headers["content-type"]){t.next=21;break}throw(l=new Error("Content-type header is not mentioned for request #".concat(u.id,", For request having body, Content-type header should be mentioned"))).name="Invalid Content-type header",l;case 21:c.id=u.id,void 0!==u.dependsOn&&u.dependsOn.length>0&&(c.dependsOn=u.dependsOn),r.push(c),o=i.next(),t.next=12;break;case 27:return n.requests=r,t.abrupt("return",n);case 29:case"end":return t.stop()}}),t,this)})))}},{key:"addDependency",value:function(e,t){if(!this.requests.has(e)){var r=new Error("Dependent ".concat(e," does not exists, Please check the id"));throw r.name="Invalid Dependent",r}if(void 0!==t&&!this.requests.has(t)){var n=new Error("Dependency ".concat(t," does not exists, Please check the id"));throw n.name="Invalid Dependency",n}if(void 0!==t){var i=this.requests.get(e);if(void 0===i.dependsOn&&(i.dependsOn=[]),-1!==i.dependsOn.indexOf(t)){var o=new Error("Dependency ".concat(t," is already added for the request ").concat(e));throw o.name="Duplicate Dependency",o}i.dependsOn.push(t)}else{for(var a,s=this.requests.entries(),u=s.next();!u.done&&u.value[1].id!==e;)a=u,u=s.next();if(void 0===a){var c=new Error("Can't add dependency ".concat(t,", There is only a dependent request in the batch"));throw c.name="Invalid Dependency Addition",c}var l=a.value[0];if(void 0===u.value[1].dependsOn&&(u.value[1].dependsOn=[]),-1!==u.value[1].dependsOn.indexOf(l)){var d=new Error("Dependency ".concat(l," is already added for the request ").concat(e));throw d.name="Duplicate Dependency",d}u.value[1].dependsOn.push(l)}}},{key:"removeDependency",value:function(e,t){var r=this.requests.get(e);if(void 0===r||void 0===r.dependsOn||0===r.dependsOn.length)return!1;if(void 0!==t){var n=r.dependsOn.indexOf(t);return-1!==n&&(r.dependsOn.splice(n,1),!0)}return delete r.dependsOn,!0}}],[{key:"validateDependencies",value:function(e){if(0===e.size){var t=new Error("Empty requests map, Please provide at least one request.");throw t.name="Empty Requests Error",t}return function(e){for(var t=e.entries(),r=t.next();!r.done;){var n=r.value[1];if(void 0!==n.dependsOn&&n.dependsOn.length>0)return!1;r=t.next()}return!0}(e)||function(e){var t=e.entries(),r=t.next(),n=r.value[1];if(void 0!==n.dependsOn&&n.dependsOn.length>0)return!1;var i=r;for(r=t.next();!r.done;){var o=r.value[1];if(void 0===o.dependsOn||1!==o.dependsOn.length||o.dependsOn[0]!==i.value[1].id)return!1;i=r,r=t.next()}return!0}(e)||function(e){var t,r=e.entries(),n=r.next(),i=n.value[1];if(void 0===i.dependsOn||0===i.dependsOn.length)t=i.id;else{if(1!==i.dependsOn.length)return!1;var o=i.dependsOn[0];if(o===i.id||!e.has(o))return!1;t=o}for(n=r.next();!n.done;){var a=n.value[1];if((void 0===a.dependsOn||0===a.dependsOn.length)&&t!==a.id)return!1;if(void 0!==a.dependsOn&&0!==a.dependsOn.length){if(1===a.dependsOn.length&&(a.id===t||a.dependsOn[0]!==t))return!1;if(a.dependsOn.length>1)return!1}n=r.next()}return!0}(e)}},{key:"getRequestData",value:function(t){return p(this,void 0,void 0,h.mark((function r(){var n,i,o;return h.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(n={url:""},i=new RegExp("^https?://"),n.url=i.test(t.url)?"/"+t.url.split(/.*?\/\/.*?\//)[1]:t.url,n.method=t.method,o={},t.headers.forEach((function(e,t){o[t]=e})),Object.keys(o).length&&(n.headers=o),t.method!==f.PATCH&&t.method!==f.POST&&t.method!==f.PUT){r.next=11;break}return r.next=10,e.getRequestBody(t);case 10:n.body=r.sent;case 11:return r.abrupt("return",n);case 12:case"end":return r.stop()}}),r)})))}},{key:"getRequestBody",value:function(e){return p(this,void 0,void 0,h.mark((function t(){var r,n,i,o,a,s;return h.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=!1,t.prev=1,i=e.clone(),t.next=5,i.json();case 5:n=t.sent,r=!0,t.next=11;break;case 9:t.prev=9,t.t0=t.catch(1);case 11:if(r){t.next=33;break}if(t.prev=12,"undefined"==typeof Blob){t.next=23;break}return t.next=16,e.blob();case 16:return o=t.sent,a=new FileReader,t.next=20,new Promise((function(e){a.addEventListener("load",(function(){var t=a.result,r=new RegExp("^s*data:(.+?/.+?(;.+?=.+?)*)?(;base64)?,(.*)s*$").exec(t);e(r[4])}),!1),a.readAsDataURL(o)}));case 20:n=t.sent,t.next=28;break;case 23:if("undefined"==typeof Buffer){t.next=28;break}return t.next=26,e.buffer();case 26:s=t.sent,n=s.toString("base64");case 28:r=!0,t.next=33;break;case 31:t.prev=31,t.t1=t.catch(12);case 33:return t.abrupt("return",n);case 34:case"end":return t.stop()}}),t,null,[[1,9],[12,31]])})))}}]),e}();m.requestLimit=20;var g=function(){function e(r){t(this,e),this.responses=new Map,this.update(r)}return o(e,[{key:"createResponseObject",value:function(e){var t=e.body,r={};if(r.status=e.status,void 0!==e.statusText&&(r.statusText=e.statusText),r.headers=e.headers,void 0!==r.headers&&void 0!==r.headers["Content-Type"]&&"application/json"===r.headers["Content-Type"].split(";")[0]){var n=JSON.stringify(t);return new Response(n,r)}return new Response(t,r)}},{key:"update",value:function(e){this.nextLink=e["@odata.nextLink"];for(var t=e.responses,r=0,n=t.length;r1&&void 0!==arguments[1]?arguments[1]:w;if(-1!==(e=e.toLowerCase()).indexOf("https://")){var r=(e=e.replace("https://","")).indexOf(":"),n=e.indexOf("/"),i="";if(-1!==n)return-1!==r&&r=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}function N(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&void 0!==arguments[0]?arguments[0]:[];t(this,e),this.middlewareOptions=new Map;var n,i=U(r);try{for(i.s();!(n=i.n()).done;){var o=n.value,a=o.constructor;this.middlewareOptions.set(a,o)}}catch(e){i.e(e)}finally{i.f()}}return o(e,[{key:"getMiddlewareOptions",value:function(e){return this.middlewareOptions.get(e)}},{key:"setMiddlewareOptions",value:function(e,t){this.middlewareOptions.set(e,t)}}]),e}();function I(e,t,r){return(t=n(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var F,H=function(){for(var e="",t=0;t<32;t++)8!==t&&12!==t&&16!==t&&20!==t||(e+="-"),e+=Math.floor(16*Math.random()).toString(16);return e},j=function(e,t,r){var n=null;if("undefined"!=typeof Request&&e instanceof Request)n=e.headers.get(r);else if(void 0!==t&&void 0!==t.headers)if("undefined"!=typeof Headers&&t.headers instanceof Headers)n=t.headers.get(r);else if(t.headers instanceof Array){for(var i=t.headers,o=0,a=i.length;o0&&void 0!==arguments[0]?arguments[0]:e.DEFAULT_DELAY,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.DEFAULT_MAX_RETRIES,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.defaultShouldRetry;if(t(this,e),r>e.MAX_DELAY&&n>e.MAX_MAX_RETRIES){var o=new Error("Delay and MaxRetries should not be more than ".concat(e.MAX_DELAY," and ").concat(e.MAX_MAX_RETRIES));throw o.name="MaxLimitExceeded",o}if(r>e.MAX_DELAY){var a=new Error("Delay should not be more than ".concat(e.MAX_DELAY));throw a.name="MaxLimitExceeded",a}if(n>e.MAX_MAX_RETRIES){var s=new Error("MaxRetries should not be more than ".concat(e.MAX_MAX_RETRIES));throw s.name="MaxLimitExceeded",s}if(r<0&&n<0){var u=new Error("Delay and MaxRetries should not be negative");throw u.name="MinExpectationNotMet",u}if(r<0){var c=new Error("Delay should not be negative");throw c.name="MinExpectationNotMet",c}if(n<0){var l=new Error("MaxRetries should not be negative");throw l.name="MinExpectationNotMet",l}this.delay=Math.min(r,e.MAX_DELAY),this.maxRetries=Math.min(n,e.MAX_MAX_RETRIES),this.shouldRetry=i}return o(e,[{key:"getMaxDelay",value:function(){return e.MAX_DELAY}}]),e}();Y.DEFAULT_DELAY=3,Y.DEFAULT_MAX_RETRIES=3,Y.MAX_DELAY=180,Y.MAX_MAX_RETRIES=10,Y.defaultShouldRetry=function(){return!0};var W=function(){function r(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Y;t(this,r),this.options=e}return o(r,[{key:"isRetry",value:function(e){return-1!==r.RETRY_STATUS_CODES.indexOf(e.status)}},{key:"isBuffered",value:function(e,t){var r="string"==typeof e?t.method:e.method;if((r===f.PUT||r===f.PATCH||r===f.POST)&&"application/octet-stream"===j(e,t,"Content-Type"))return!1;return!0}},{key:"getDelay",value:function(e,t,n){var i,o=function(){return Number(Math.random().toFixed(3))},a=void 0!==e.headers?e.headers.get(r.RETRY_AFTER_HEADER):null;return i=null!==a?Number.isNaN(Number(a))?Math.round((new Date(a).getTime()-Date.now())/1e3):Number(a):t>=2?this.getExponentialBackOffTime(t)+n+o():n+o(),Math.min(i,this.options.getMaxDelay()+o())}},{key:"getExponentialBackOffTime",value:function(e){return Math.round(.5*(Math.pow(2,e)-1))}},{key:"sleep",value:function(e){return p(this,void 0,void 0,h.mark((function t(){var r;return h.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=1e3*e,t.abrupt("return",new Promise((function(e){return setTimeout(e,r)})));case 2:case"end":return t.stop()}}),t)})))}},{key:"getOptions",value:function(e){var t;return e.middlewareControl instanceof q&&(t=e.middlewareControl.getMiddlewareOptions(this.options.constructor)),void 0===t&&(t=Object.assign(new Y,this.options)),t}},{key:"executeWithRetry",value:function(e,t,n){return p(this,void 0,void 0,h.mark((function i(){var o;return h.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,this.nextMiddleware.execute(e);case 2:if(!(t0&&void 0!==arguments[0]?arguments[0]:e.DEFAULT_MAX_REDIRECTS,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.defaultShouldRedirect;if(t(this,e),r>e.MAX_MAX_REDIRECTS){var i=new Error("MaxRedirects should not be more than ".concat(e.MAX_MAX_REDIRECTS));throw i.name="MaxLimitExceeded",i}if(r<0){var o=new Error("MaxRedirects should not be negative");throw o.name="MinExpectationNotMet",o}this.maxRedirects=r,this.shouldRedirect=n}));J.DEFAULT_MAX_REDIRECTS=5,J.MAX_MAX_REDIRECTS=20,J.defaultShouldRedirect=function(){return!0};var Z=function(){function r(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new J;t(this,r),this.options=e}return o(r,[{key:"isRedirect",value:function(e){return-1!==r.REDIRECT_STATUS_CODES.indexOf(e.status)}},{key:"hasLocationHeader",value:function(e){return e.headers.has(r.LOCATION_HEADER)}},{key:"getLocationHeader",value:function(e){return e.headers.get(r.LOCATION_HEADER)}},{key:"isRelativeURL",value:function(e){return-1===e.indexOf("://")}},{key:"shouldDropAuthorizationHeader",value:function(e,t){var r,n,i=/^[A-Za-z].+?:\/\/.+?(?=\/|$)/,o=i.exec(e);null!==o&&(r=o[0]);var a=i.exec(t);return null!==a&&(n=a[0]),void 0!==r&&void 0!==n&&r!==n}},{key:"updateRequestUrl",value:function(e,t){return p(this,void 0,void 0,h.mark((function r(){return h.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if("string"!=typeof t.request){r.next=4;break}r.t0=e,r.next=7;break;case 4:return r.next=6,V(e,t.request);case 6:r.t0=r.sent;case 7:t.request=r.t0;case 8:case"end":return r.stop()}}),r)})))}},{key:"getOptions",value:function(e){var t;return e.middlewareControl instanceof q&&(t=e.middlewareControl.getMiddlewareOptions(J)),void 0===t&&(t=Object.assign(new J,this.options)),t}},{key:"executeWithRedirect",value:function(e,t,n){return p(this,void 0,void 0,h.mark((function i(){var o,a;return h.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,this.nextMiddleware.execute(e);case 2:if(o=e.response,!(t0&&void 0!==arguments[0]?arguments[0]:e.ChaosStrategy.RANDOM,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Some error Happened",o=arguments.length>2?arguments[2]:void 0,a=arguments.length>3?arguments[3]:void 0,s=arguments.length>4?arguments[4]:void 0,u=arguments.length>5?arguments[5]:void 0;if(t(this,r),this.chaosStrategy=n,this.statusCode=o,this.statusMessage=i,this.chaosPercentage=void 0!==a?a:10,this.responseBody=s,this.headers=u,this.chaosPercentage>100)throw new Error("Error Pecentage can not be more than 100")})),se={GET:[429,500,502,503,504],POST:[429,500,502,503,504,507],PUT:[429,500,502,503,504,507],PATCH:[429,500,502,503,504],DELETE:[429,500,502,503,504,507]},ue={100:"Continue",101:"Switching Protocols",102:"Processing",103:"Early Hints",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Too Early",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",510:"Not Extended",511:"Network Authentication Required"},ce=function(){function r(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new ae,n=arguments.length>1?arguments[1]:void 0;t(this,r),this.options=e,this.manualMap=n}return o(r,[{key:"createResponseHeaders",value:function(e,t,r){var n=e.headers?new Headers(e.headers):new Headers;return n.append("Cache-Control","no-store"),n.append("request-id",t),n.append("client-request-id",t),n.append("x-ms-ags-diagnostic",""),n.append("Date",r),n.append("Strict-Transport-Security",""),429===e.statusCode&&n.append("retry-after","3"),n}},{key:"createResponseBody",value:function(e,t,r){if(e.responseBody)return e.responseBody;var n;e.statusCode>=400?n={error:{code:ue[e.statusCode],message:e.statusMessage,innerError:{"request-id":t,date:r}}}:n={};return n}},{key:"createResponse",value:function(e,t){var r=t.request,n=H(),i=new Date,o=this.createResponseHeaders(e,n,i.toString()),a=this.createResponseBody(e,n,i.toString()),s={url:r,status:e.statusCode,statusText:e.statusMessage,headers:o};t.response=new Response("string"==typeof a?a:JSON.stringify(a),s)}},{key:"sendRequest",value:function(t,r){return p(this,void 0,void 0,h.mark((function n(){return h.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(this.setStatusCode(t,r.request,r.options.method),!(t.chaosStrategy===e.ChaosStrategy.MANUAL&&!this.nextMiddleware||Math.floor(100*Math.random())0&&void 0!==arguments[0]?arguments[0]:-1,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;t(this,e),this.minValue=r,this.maxValue=n})),fe=function(){function e(r,n){t(this,e),this._location=n,this._responseBody=r}return o(e,[{key:"location",get:function(){return this._location},set:function(e){this._location=e}},{key:"responseBody",get:function(){return this._responseBody},set:function(e){this._responseBody=e}}],[{key:"CreateUploadResult",value:function(t,r){return new e(t,r.get("location"))}}]),e}(),he=function(){function r(e,n,i){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(t(this,r),this.DEFAULT_FILE_SIZE=5242880,this.client=e,!n.sliceFile)throw new S("Please pass the FileUpload object, StreamUpload object or any custom implementation of the FileObject interface");this.file=n,this.file=n,o.rangeSize||(o.rangeSize=this.DEFAULT_FILE_SIZE),this.options=o,this.uploadSession=i,this.nextRange=new de(0,this.options.rangeSize-1)}return o(r,[{key:"parseRange",value:function(e){var t=e[0];if(void 0===t||""===t)return new de;var r=t.split("-"),n=parseInt(r[0],10),i=parseInt(r[1],10);return Number.isNaN(i)&&(i=this.file.size-1),new de(n,i)}},{key:"updateTaskStatus",value:function(e){this.uploadSession.expiry=new Date(e.expirationDateTime),this.nextRange=this.parseRange(e.nextExpectedRanges)}},{key:"getNextRange",value:function(){if(-1===this.nextRange.minValue)return this.nextRange;var e=this.nextRange.minValue,t=e+this.options.rangeSize-1;return t>=this.file.size&&(t=this.file.size-1),new de(e,t)}},{key:"sliceFile",value:function(e){if(console.warn("The LargeFileUploadTask.sliceFile() function has been deprecated and moved into the FileObject interface."),this.file.content instanceof ArrayBuffer||this.file.content instanceof Blob||this.file.content instanceof Uint8Array)return this.file.content.slice(e.minValue,e.maxValue+1);throw new S("The LargeFileUploadTask.sliceFile() function expects only Blob, ArrayBuffer or Uint8Array file content. Please note that the sliceFile() function is deprecated.")}},{key:"upload",value:function(){return p(this,void 0,void 0,h.mark((function e(){var t,r,n,i,o,a,s;return h.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=this.options&&this.options.uploadEventHandlers;case 1:if(this.uploadSession.isCancelled){e.next=26;break}if(-1!==(r=this.getNextRange()).maxValue){e.next=7;break}throw(n=new Error("Task with which you are trying to upload is already completed, Please check for your uploaded file")).name="Invalid Session",n;case 7:return e.next=9,this.file.sliceFile(r);case 9:return i=e.sent,e.next=12,this.uploadSliceGetRawResponse(i,r,this.file.size);case 12:if(o=e.sent){e.next=15;break}throw new S("Something went wrong! Large file upload slice response is null.");case 15:return e.next=17,le.getResponse(o);case 17:if(a=e.sent,!(201===o.status||200===o.status&&a.id)){e.next=21;break}return this.reportProgress(t,r),e.abrupt("return",fe.CreateUploadResult(a,o.headers));case 21:s={expirationDateTime:a.expirationDateTime||a.ExpirationDateTime,nextExpectedRanges:a.NextExpectedRanges||a.nextExpectedRanges},this.updateTaskStatus(s),this.reportProgress(t,r),e.next=1;break;case 26:case"end":return e.stop()}}),e,this)})))}},{key:"reportProgress",value:function(e,t){e&&e.progress&&e.progress(t,e.extraCallbackParam)}},{key:"uploadSlice",value:function(e,t,r){return p(this,void 0,void 0,h.mark((function n(){return h.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,this.client.api(this.uploadSession.url).headers({"Content-Length":"".concat(t.maxValue-t.minValue+1),"Content-Range":"bytes ".concat(t.minValue,"-").concat(t.maxValue,"/").concat(r),"Content-Type":"application/octet-stream"}).put(e);case 2:return n.abrupt("return",n.sent);case 3:case"end":return n.stop()}}),n,this)})))}},{key:"uploadSliceGetRawResponse",value:function(t,r,n){return p(this,void 0,void 0,h.mark((function i(){return h.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,this.client.api(this.uploadSession.url).headers({"Content-Length":"".concat(r.maxValue-r.minValue+1),"Content-Range":"bytes ".concat(r.minValue,"-").concat(r.maxValue,"/").concat(n),"Content-Type":"application/octet-stream"}).responseType(e.ResponseType.RAW).put(t);case 2:return i.abrupt("return",i.sent);case 3:case"end":return i.stop()}}),i,this)})))}},{key:"cancel",value:function(){return p(this,void 0,void 0,h.mark((function t(){var r;return h.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.client.api(this.uploadSession.url).responseType(e.ResponseType.RAW).delete();case 2:return 204===(r=t.sent).status&&(this.uploadSession.isCancelled=!0),t.abrupt("return",r);case 5:case"end":return t.stop()}}),t,this)})))}},{key:"getStatus",value:function(){return p(this,void 0,void 0,h.mark((function e(){var t;return h.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.client.api(this.uploadSession.url).get();case 2:return t=e.sent,this.updateTaskStatus(t),e.abrupt("return",t);case 5:case"end":return e.stop()}}),e,this)})))}},{key:"resume",value:function(){return p(this,void 0,void 0,h.mark((function e(){return h.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getStatus();case 2:return e.next=4,this.upload();case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e,this)})))}},{key:"getUploadSession",value:function(){return this.uploadSession}}],[{key:"createUploadSession",value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return p(this,void 0,void 0,h.mark((function i(){var o,a;return h.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,e.api(t).headers(n).post(r);case 2:return o=i.sent,a={url:o.uploadUrl,expiry:new Date(o.expirationDateTime),isCancelled:!1},i.abrupt("return",a);case 5:case"end":return i.stop()}}),i)})))}}]),r}();function pe(){return pe="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=R(e)););return e}(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(arguments.length<3?e:r):i.value}},pe.apply(this,arguments)}var ve=function(){function e(r,n,i){if(t(this,e),this.content=r,this.name=n,this.size=i,!r||!n||!i)throw new S("Please provide the upload content, name of the file and size of the file")}return o(e,[{key:"sliceFile",value:function(e){return this.content.slice(e.minValue,e.maxValue+1)}}]),e}(),ye=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:5242880,r=62914560;return t>r&&(t=r),(e=t)>327680&&(e=320*Math.floor(e/327680)*1024),e};function me(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=R(e);if(t){var i=R(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return k(this,r)}}var ge=function(e){E(n,e);var r=me(n);function n(e,i,o,a){return t(this,n),r.call(this,e,i,o,a)}return o(n,[{key:"commit",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"rename";return p(this,void 0,void 0,h.mark((function r(){var n;return h.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return n={name:this.file.name,"@microsoft.graph.conflictBehavior":t,"@microsoft.graph.sourceUrl":this.uploadSession.url},r.next=3,this.client.api(e).put(n);case 3:return r.abrupt("return",r.sent);case 4:case"end":return r.stop()}}),r,this)})))}}],[{key:"constructCreateSessionUrl",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.DEFAULT_UPLOAD_PATH;return e=e.trim(),""===(t=t.trim())&&(t="/"),"/"!==t[0]&&(t="/".concat(t)),"/"!==t[t.length-1]&&(t="".concat(t,"/")),"/me/drive/root:".concat(t.split("/").map((function(e){return encodeURIComponent(e)})).join("/")).concat(encodeURIComponent(e),":/createUploadSession")}},{key:"getFileInfo",value:function(e,t){var r,n;if("undefined"!=typeof Blob&&e instanceof Blob)n=(r=new File([e],t)).size;else if("undefined"!=typeof File&&e instanceof File)n=(r=e).size;else if("undefined"!=typeof Uint8Array&&e instanceof Uint8Array){var i=e;n=i.byteLength,r=i.buffer.slice(i.byteOffset,i.byteOffset+i.byteLength)}return{content:r,size:n}}},{key:"create",value:function(e,t,r){return p(this,void 0,void 0,h.mark((function i(){var o,a,s;return h.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:if(e&&t&&r){i.next=2;break}throw new S("Please provide the Graph client instance, file object and OneDriveLargeFileUploadOptions value");case 2:return o=r.fileName,a=n.getFileInfo(t,o),s=new ve(a.content,o,a.size),i.abrupt("return",this.createTaskWithFileObject(e,s,r));case 6:case"end":return i.stop()}}),i,this)})))}},{key:"createTaskWithFileObject",value:function(e,t,r){return p(this,void 0,void 0,h.mark((function i(){var o,a,s,u;return h.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:if(e&&t&&r){i.next=2;break}throw new S("Please provide the Graph client instance, FileObject interface implementation and OneDriveLargeFileUploadOptions value");case 2:return o=r.uploadSessionURL?r.uploadSessionURL:n.constructCreateSessionUrl(r.fileName,r.path),a={fileName:r.fileName,fileDescription:r.fileDescription,conflictBehavior:r.conflictBehavior},i.next=6,n.createUploadSession(e,o,a);case 6:return s=i.sent,u=ye(r.rangeSize),i.abrupt("return",new n(e,t,s,{rangeSize:u,uploadEventHandlers:r.uploadEventHandlers}));case 9:case"end":return i.stop()}}),i)})))}},{key:"createUploadSession",value:function(e,t,r){var i=this,o=Object.create(null,{createUploadSession:{get:function(){return pe(R(n),"createUploadSession",i)}}});return p(this,void 0,void 0,h.mark((function n(){var i;return h.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return i={item:{"@microsoft.graph.conflictBehavior":(null==r?void 0:r.conflictBehavior)||"rename",name:null==r?void 0:r.fileName,description:null==r?void 0:r.fileDescription}},n.abrupt("return",o.createUploadSession.call(this,e,t,i));case 2:case"end":return n.stop()}}),n,this)})))}}]),n}(he);ge.DEFAULT_UPLOAD_PATH="/";var we=function(){function e(r,n,i){if(t(this,e),this.content=r,this.name=n,this.size=i,!r||!n||!i)throw new S("Please provide the Readable Stream content, name of the file and size of the file")}return o(e,[{key:"sliceFile",value:function(e){return p(this,void 0,void 0,h.mark((function t(){var r,n,i,o,a;return h.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e.maxValue-e.minValue+1,n=[],!this.previousSlice){t.next=14;break}if(!(e.minValue=r)){t.next=19;break}n.push(this.content.read(r)),t.next=24;break;case 19:return t.t0=n,t.next=22,this.readNBytesFromStream(r);case 22:t.t1=t.sent,t.t0.push.call(t.t0,t.t1);case 24:t.next=27;break;case 26:throw new S("Stream is not readable.");case 27:return a=Buffer.concat(n),this.previousSlice={fileSlice:a,range:e},t.abrupt("return",a);case 30:case"end":return t.stop()}}),t,this)})))}},{key:"readNBytesFromStream",value:function(e){var t=this;return new Promise((function(r,n){var i=[],o=e,a=0;t.content.on("end",(function(){if(o>0)return n(new S("Stream ended before reading required range size"))})),t.content.on("readable",(function(){for(var s;a0&&(o=e-a);return a===e?r(Buffer.concat(i)):t.content&&t.content.readable?void 0:n(new S("Error encountered while reading the stream during the upload"))}))}))}}]),e}(),xe=function(){function e(r,n,i,o){t(this,e),this.client=r,this.collection=n.value,this.nextLink=n["@odata.nextLink"],this.deltaLink=n["@odata.deltaLink"],this.callback=i,this.cursor=0,this.complete=!1,this.requestOptions=o}return o(e,[{key:"iterationHelper",value:function(){if(void 0===this.collection)return!1;for(var e=!0;e&&this.cursor=this.collection.length&&(this.complete=!0);case 12:case"end":return e.stop()}}),e,this)})))}},{key:"resume",value:function(){return p(this,void 0,void 0,h.mark((function e(){return h.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.iterate());case 1:case"end":return e.stop()}}),e,this)})))}},{key:"isComplete",value:function(){return this.complete}}]),e}();function be(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&void 0!==arguments[0]?arguments[0]:-1,o=arguments.length>1?arguments[1]:void 0,a=arguments.length>2?arguments[2]:void 0;return t(this,n),e=r.call(this,o||a&&a.message),Object.setPrototypeOf(x(e),n.prototype),e.statusCode=i,e.code=null,e.requestId=null,e.date=new Date,e.body=null,e.stack=a?a.stack:e.stack,e}return o(n)}(A(Error)),Ae=function(){function e(){t(this,e)}return o(e,null,[{key:"constructError",value:function(e,t,r){var n=new Oe(t,"",e);return void 0!==e.name&&(n.code=e.name),n.body=e.toString(),n.date=new Date,n.headers=null==r?void 0:r.headers,n}},{key:"constructErrorFromResponse",value:function(e,t,r){var n=e.error,i=new Oe(t,n.message);return i.code=n.code,void 0!==n.innerError&&(i.requestId=n.innerError["request-id"],i.date=new Date(n.innerError.date)),i.body=JSON.stringify(n),i.headers=null==r?void 0:r.headers,i}},{key:"getError",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1,n=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0;return p(this,void 0,void 0,h.mark((function o(){var a;return h.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:if(t&&t.error?a=e.constructErrorFromResponse(t,r,i):t instanceof Error?a=e.constructError(t,r,i):(a=new Oe(r)).body=t,"function"!=typeof n){o.next=5;break}n(a,null),o.next=6;break;case 5:return o.abrupt("return",a);case 6:case"end":return o.stop()}}),o)})))}}]),e}();function Te(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return Se(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Se(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}function Se(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r1&&"string"==typeof t?n=Array.prototype.slice.call(r):"string"==typeof t?n.push(t):n=n.concat(t),this.urlComponents.oDataQueryParams[e]+=n.join(",")}},{key:"buildFullUrl",value:function(){var e,t,r=(e=[this.urlComponents.host,this.urlComponents.version,this.urlComponents.path],t=function(e){return e.replace(/^\/+/,"")},Array.prototype.slice.call(e).reduce((function(e,r){return[(n=e,n.replace(/\/+$/,"")),t(r)].join("/");var n}))+this.createQueryString());return this.config.debugLogging&&console.log(r),r}},{key:"createQueryString",value:function(){var e=this.urlComponents,t=[];if(0!==Object.keys(e.oDataQueryParams).length)for(var r in e.oDataQueryParams)Object.prototype.hasOwnProperty.call(e.oDataQueryParams,r)&&t.push(r+"="+e.oDataQueryParams[r]);if(0!==Object.keys(e.otherURLQueryParams).length)for(var n in e.otherURLQueryParams)Object.prototype.hasOwnProperty.call(e.otherURLQueryParams,n)&&t.push(n+"="+e.otherURLQueryParams[n]);if(0!==e.otherURLQueryOptions.length){var i,o=Te(e.otherURLQueryOptions);try{for(o.s();!(i=o.n()).done;){var a=i.value;t.push(a)}}catch(e){o.e(e)}finally{o.f()}}return t.length>0?"?"+t.join("&"):""}},{key:"parseQueryParameter",value:function(e){if("string"==typeof e)if("?"===e.charAt(0)&&(e=e.substring(1)),-1!==e.indexOf("&")){var t,r=Te(e.split("&"));try{for(r.s();!(t=r.n()).done;){var n=t.value;this.parseQueryParamenterString(n)}}catch(e){r.e(e)}finally{r.f()}}else this.parseQueryParamenterString(e);else if(e.constructor===Object)for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&this.setURLComponentsQueryParamater(i,e[i]);return this}},{key:"parseQueryParamenterString",value:function(e){if(this.isValidQueryKeyValuePair(e)){var t=e.indexOf("="),r=e.substring(0,t),n=e.substring(t+1);this.setURLComponentsQueryParamater(r,n)}else this.urlComponents.otherURLQueryOptions.push(e)}},{key:"setURLComponentsQueryParamater",value:function(e,t){if(-1!==P.indexOf(e)){var r=this.urlComponents.oDataQueryParams[e],n=r&&("$expand"===e||"$select"===e||"$orderby"===e);this.urlComponents.oDataQueryParams[e]=n?r+","+t:t}else this.urlComponents.otherURLQueryParams[e]=t}},{key:"isValidQueryKeyValuePair",value:function(e){var t=e.indexOf("=");return-1!==t&&!(-1!==e.indexOf("(")&&e.indexOf("(")0&&void 0!==arguments[0])||arguments[0];return this.urlComponents.oDataQueryParams.$count=e.toString(),this}},{key:"query",value:function(e){return this.parseQueryParameter(e)}},{key:"get",value:function(e){return p(this,void 0,void 0,h.mark((function t(){var r,n,i;return h.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=this.buildFullUrl(),n={method:f.GET},t.next=4,this.send(r,n,e);case 4:return i=t.sent,t.abrupt("return",i);case 6:case"end":return t.stop()}}),t,this)})))}},{key:"post",value:function(e,t){return p(this,void 0,void 0,h.mark((function r(){var n,i;return h.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return n=this.buildFullUrl(),i={method:f.POST,body:C(e)},"FormData"===(e&&e.constructor&&e.constructor.name)?i.headers={}:(this.setHeaderContentType(),i.headers=this._headers),r.next=6,this.send(n,i,t);case 6:return r.abrupt("return",r.sent);case 7:case"end":return r.stop()}}),r,this)})))}},{key:"create",value:function(e,t){return p(this,void 0,void 0,h.mark((function r(){return h.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,this.post(e,t);case 2:return r.abrupt("return",r.sent);case 3:case"end":return r.stop()}}),r,this)})))}},{key:"put",value:function(e,t){return p(this,void 0,void 0,h.mark((function r(){var n,i;return h.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return n=this.buildFullUrl(),this.setHeaderContentType(),i={method:f.PUT,body:C(e)},r.next=5,this.send(n,i,t);case 5:return r.abrupt("return",r.sent);case 6:case"end":return r.stop()}}),r,this)})))}},{key:"patch",value:function(e,t){return p(this,void 0,void 0,h.mark((function r(){var n,i;return h.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return n=this.buildFullUrl(),this.setHeaderContentType(),i={method:f.PATCH,body:C(e)},r.next=5,this.send(n,i,t);case 5:return r.abrupt("return",r.sent);case 6:case"end":return r.stop()}}),r,this)})))}},{key:"update",value:function(e,t){return p(this,void 0,void 0,h.mark((function r(){return h.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,this.patch(e,t);case 2:return r.abrupt("return",r.sent);case 3:case"end":return r.stop()}}),r,this)})))}},{key:"delete",value:function(e){return p(this,void 0,void 0,h.mark((function t(){var r,n;return h.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=this.buildFullUrl(),n={method:f.DELETE},t.next=4,this.send(r,n,e);case 4:return t.abrupt("return",t.sent);case 5:case"end":return t.stop()}}),t,this)})))}},{key:"del",value:function(e){return p(this,void 0,void 0,h.mark((function t(){return h.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.delete(e);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t,this)})))}},{key:"getStream",value:function(t){return p(this,void 0,void 0,h.mark((function r(){var n,i;return h.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return n=this.buildFullUrl(),i={method:f.GET},this.responseType(e.ResponseType.STREAM),r.next=5,this.send(n,i,t);case 5:return r.abrupt("return",r.sent);case 6:case"end":return r.stop()}}),r,this)})))}},{key:"putStream",value:function(e,t){return p(this,void 0,void 0,h.mark((function r(){var n,i;return h.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return n=this.buildFullUrl(),i={method:f.PUT,headers:{"Content-Type":"application/octet-stream"},body:e},r.next=4,this.send(n,i,t);case 4:return r.abrupt("return",r.sent);case 5:case"end":return r.stop()}}),r,this)})))}}]),n}(),Ce=function(){function e(){for(var r=arguments.length,n=new Array(r),i=0;i1?this.parseMiddleWareArray(t):this.middleware=t[0]}},{key:"parseMiddleWareArray",value:function(e){e.forEach((function(t,r){r; diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/Constants.js b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/Constants.js deleted file mode 100644 index db52461..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/Constants.js +++ /dev/null @@ -1,28 +0,0 @@ -"use strict"; -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.GRAPH_URLS = exports.GRAPH_BASE_URL = exports.GRAPH_API_VERSION = void 0; -/** - * @module Constants - */ -/** - * @constant - * A Default API endpoint version for a request - */ -exports.GRAPH_API_VERSION = "v1.0"; -/** - * @constant - * A Default base url for a request - */ -exports.GRAPH_BASE_URL = "https://graph.microsoft.com/"; -/** - * To hold list of the service root endpoints for Microsoft Graph and Graph Explorer for each national cloud. - * Set(iterable:Object) is not supported in Internet Explorer. The consumer is recommended to use a suitable polyfill. - */ -exports.GRAPH_URLS = new Set(["graph.microsoft.com", "graph.microsoft.us", "dod-graph.microsoft.us", "graph.microsoft.de", "microsoftgraph.chinacloudapi.cn", "canary.graph.microsoft.com"]); -//# sourceMappingURL=Constants.js.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/Constants.js.map b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/Constants.js.map deleted file mode 100644 index e973356..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/Constants.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Constants.js","sourceRoot":"","sources":["../../src/Constants.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH;;GAEG;AAEH;;;GAGG;AACU,QAAA,iBAAiB,GAAG,MAAM,CAAC;AAExC;;;GAGG;AACU,QAAA,cAAc,GAAG,8BAA8B,CAAC;AAE7D;;;GAGG;AACU,QAAA,UAAU,GAAG,IAAI,GAAG,CAAS,CAAC,qBAAqB,EAAE,oBAAoB,EAAE,wBAAwB,EAAE,oBAAoB,EAAE,iCAAiC,EAAE,4BAA4B,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/CustomAuthenticationProvider.d.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/CustomAuthenticationProvider.d.ts deleted file mode 100644 index d41571e..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/CustomAuthenticationProvider.d.ts +++ /dev/null @@ -1,35 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -import { AuthenticationProvider } from "./IAuthenticationProvider"; -import { AuthProvider } from "./IAuthProvider"; -/** - * @class - * Class representing CustomAuthenticationProvider - * @extends AuthenticationProvider - */ -export declare class CustomAuthenticationProvider implements AuthenticationProvider { - /** - * @private - * A member to hold authProvider callback - */ - private provider; - /** - * @public - * @constructor - * Creates an instance of CustomAuthenticationProvider - * @param {AuthProviderCallback} provider - An authProvider function - * @returns An instance of CustomAuthenticationProvider - */ - constructor(provider: AuthProvider); - /** - * @public - * @async - * To get the access token - * @returns The promise that resolves to an access token - */ - getAccessToken(): Promise; -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/CustomAuthenticationProvider.js b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/CustomAuthenticationProvider.js deleted file mode 100644 index e1bce6c..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/CustomAuthenticationProvider.js +++ /dev/null @@ -1,73 +0,0 @@ -"use strict"; -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.CustomAuthenticationProvider = void 0; -var tslib_1 = require("tslib"); -/** - * @module CustomAuthenticationProvider - */ -var GraphClientError_1 = require("./GraphClientError"); -/** - * @class - * Class representing CustomAuthenticationProvider - * @extends AuthenticationProvider - */ -var CustomAuthenticationProvider = /** @class */ (function () { - /** - * @public - * @constructor - * Creates an instance of CustomAuthenticationProvider - * @param {AuthProviderCallback} provider - An authProvider function - * @returns An instance of CustomAuthenticationProvider - */ - function CustomAuthenticationProvider(provider) { - this.provider = provider; - } - /** - * @public - * @async - * To get the access token - * @returns The promise that resolves to an access token - */ - CustomAuthenticationProvider.prototype.getAccessToken = function () { - return tslib_1.__awaiter(this, void 0, void 0, function () { - var _this = this; - return tslib_1.__generator(this, function (_a) { - return [2 /*return*/, new Promise(function (resolve, reject) { - _this.provider(function (error, accessToken) { return tslib_1.__awaiter(_this, void 0, void 0, function () { - var invalidTokenMessage, err; - return tslib_1.__generator(this, function (_a) { - switch (_a.label) { - case 0: - if (!accessToken) return [3 /*break*/, 1]; - resolve(accessToken); - return [3 /*break*/, 3]; - case 1: - if (!error) { - invalidTokenMessage = "Access token is undefined or empty.\ - Please provide a valid token.\ - For more help - https://github.com/microsoftgraph/msgraph-sdk-javascript/blob/dev/docs/CustomAuthenticationProvider.md"; - error = new GraphClientError_1.GraphClientError(invalidTokenMessage); - } - return [4 /*yield*/, GraphClientError_1.GraphClientError.setGraphClientError(error)]; - case 2: - err = _a.sent(); - reject(err); - _a.label = 3; - case 3: return [2 /*return*/]; - } - }); - }); }); - })]; - }); - }); - }; - return CustomAuthenticationProvider; -}()); -exports.CustomAuthenticationProvider = CustomAuthenticationProvider; -//# sourceMappingURL=CustomAuthenticationProvider.js.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/CustomAuthenticationProvider.js.map b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/CustomAuthenticationProvider.js.map deleted file mode 100644 index b14807b..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/CustomAuthenticationProvider.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"CustomAuthenticationProvider.js","sourceRoot":"","sources":["../../src/CustomAuthenticationProvider.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;AAEH;;GAEG;AAEH,uDAAsD;AAItD;;;;GAIG;AACH;IAOC;;;;;;OAMG;IACH,sCAAmB,QAAsB;QACxC,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC1B,CAAC;IAED;;;;;OAKG;IACU,qDAAc,GAA3B;;;;gBACC,sBAAO,IAAI,OAAO,CAAC,UAAC,OAAsC,EAAE,MAA4B;wBACvF,KAAI,CAAC,QAAQ,CAAC,UAAO,KAAU,EAAE,WAA0B;;;;;6CACtD,WAAW,EAAX,wBAAW;wCACd,OAAO,CAAC,WAAW,CAAC,CAAC;;;wCAErB,IAAI,CAAC,KAAK,EAAE;4CACL,mBAAmB,GAAG;;6HAE2F,CAAC;4CACxH,KAAK,GAAG,IAAI,mCAAgB,CAAC,mBAAmB,CAAC,CAAC;yCAClD;wCACW,qBAAM,mCAAgB,CAAC,mBAAmB,CAAC,KAAK,CAAC,EAAA;;wCAAvD,GAAG,GAAG,SAAiD;wCAC7D,MAAM,CAAC,GAAG,CAAC,CAAC;;;;;6BAEb,CAAC,CAAC;oBACJ,CAAC,CAAC,EAAC;;;KACH;IACF,mCAAC;AAAD,CAAC,AA1CD,IA0CC;AA1CY,oEAA4B"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/GraphClientError.d.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/GraphClientError.d.ts deleted file mode 100644 index 363ce16..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/GraphClientError.d.ts +++ /dev/null @@ -1,44 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -/** - * @module GraphClientError - */ -/** - * @class - * Create GraphClientError object to handle client-side errors - * encountered within the JavaScript Client SDK. - * Whereas GraphError Class should be used to handle errors in the response from the Graph API. - */ -export declare class GraphClientError extends Error { - /** - * @public - * A custom error. This property should set be when the error is not of instanceOf Error/GraphClientError. - * Example = - * const client = MicrosoftGraph.Client.init({ - * defaultVersion: "v1.0", - * authProvider: (done) => { done({TokenError:"AccessToken cannot be null"}, ""); - * }); - */ - customError?: any; - /** - * @public - * @static - * @async - * To set the GraphClientError object - * @param {any} error - The error returned encountered by the Graph JavaScript Client SDK while processing request - * @returns GraphClientError object set to the error passed - */ - static setGraphClientError(error: any): GraphClientError; - /** - * @public - * @constructor - * Creates an instance of GraphClientError - * @param {string} message? - Error message - * @returns An instance of GraphClientError - */ - constructor(message?: string); -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/GraphClientError.js b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/GraphClientError.js deleted file mode 100644 index a0febfd..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/GraphClientError.js +++ /dev/null @@ -1,56 +0,0 @@ -"use strict"; -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.GraphClientError = void 0; -var tslib_1 = require("tslib"); -/** - * @module GraphClientError - */ -/** - * @class - * Create GraphClientError object to handle client-side errors - * encountered within the JavaScript Client SDK. - * Whereas GraphError Class should be used to handle errors in the response from the Graph API. - */ -var GraphClientError = /** @class */ (function (_super) { - tslib_1.__extends(GraphClientError, _super); - /** - * @public - * @constructor - * Creates an instance of GraphClientError - * @param {string} message? - Error message - * @returns An instance of GraphClientError - */ - function GraphClientError(message) { - var _this = _super.call(this, message) || this; - Object.setPrototypeOf(_this, GraphClientError.prototype); - return _this; - } - /** - * @public - * @static - * @async - * To set the GraphClientError object - * @param {any} error - The error returned encountered by the Graph JavaScript Client SDK while processing request - * @returns GraphClientError object set to the error passed - */ - GraphClientError.setGraphClientError = function (error) { - var graphClientError; - if (error instanceof Error) { - graphClientError = error; - } - else { - graphClientError = new GraphClientError(); - graphClientError.customError = error; - } - return graphClientError; - }; - return GraphClientError; -}(Error)); -exports.GraphClientError = GraphClientError; -//# sourceMappingURL=GraphClientError.js.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/GraphClientError.js.map b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/GraphClientError.js.map deleted file mode 100644 index abb029b..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/GraphClientError.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"GraphClientError.js","sourceRoot":"","sources":["../../src/GraphClientError.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;AAEH;;GAEG;AAEH;;;;;GAKG;AAEH;IAAsC,4CAAK;IA+B1C;;;;;;OAMG;IACH,0BAAmB,OAAgB;QAAnC,YACC,kBAAM,OAAO,CAAC,SAEd;QADA,MAAM,CAAC,cAAc,CAAC,KAAI,EAAE,gBAAgB,CAAC,SAAS,CAAC,CAAC;;IACzD,CAAC;IA7BD;;;;;;;OAOG;IACW,oCAAmB,GAAjC,UAAkC,KAAU;QAC3C,IAAI,gBAAkC,CAAC;QACvC,IAAI,KAAK,YAAY,KAAK,EAAE;YAC3B,gBAAgB,GAAG,KAAK,CAAC;SACzB;aAAM;YACN,gBAAgB,GAAG,IAAI,gBAAgB,EAAE,CAAC;YAC1C,gBAAgB,CAAC,WAAW,GAAG,KAAK,CAAC;SACrC;QACD,OAAO,gBAAgB,CAAC;IACzB,CAAC;IAaF,uBAAC;AAAD,CAAC,AA1CD,CAAsC,KAAK,GA0C1C;AA1CY,4CAAgB"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/GraphError.d.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/GraphError.d.ts deleted file mode 100644 index 84bf9a0..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/GraphError.d.ts +++ /dev/null @@ -1,54 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -/** - * @module GraphError - */ -/** - * @class - * Class for GraphError - * @NOTE: This is NOT what is returned from the Graph - * GraphError is created from parsing JSON errors returned from the graph - * Some fields are renamed ie, "request-id" => requestId so you can use dot notation - */ -export declare class GraphError extends Error { - /** - * @public - * A member holding status code of the error - */ - statusCode: number; - /** - * @public - * A member holding code i.e name of the error - */ - code: string | null; - /** - * @public - * A member holding request-id i.e identifier of the request - */ - requestId: string | null; - /** - * @public - * A member holding processed date and time of the request - */ - date: Date; - headers?: Headers; - /** - * @public - * A member holding original error response by the graph service - */ - body: any; - /** - * @public - * @constructor - * Creates an instance of GraphError - * @param {number} [statusCode = -1] - The status code of the error - * @param {string} [message] - The message of the error - * @param {Error} [baseError] - The base error - * @returns An instance of GraphError - */ - constructor(statusCode?: number, message?: string, baseError?: Error); -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/GraphError.js b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/GraphError.js deleted file mode 100644 index e013005..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/GraphError.js +++ /dev/null @@ -1,48 +0,0 @@ -"use strict"; -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.GraphError = void 0; -var tslib_1 = require("tslib"); -/** - * @module GraphError - */ -/** - * @class - * Class for GraphError - * @NOTE: This is NOT what is returned from the Graph - * GraphError is created from parsing JSON errors returned from the graph - * Some fields are renamed ie, "request-id" => requestId so you can use dot notation - */ -var GraphError = /** @class */ (function (_super) { - tslib_1.__extends(GraphError, _super); - /** - * @public - * @constructor - * Creates an instance of GraphError - * @param {number} [statusCode = -1] - The status code of the error - * @param {string} [message] - The message of the error - * @param {Error} [baseError] - The base error - * @returns An instance of GraphError - */ - function GraphError(statusCode, message, baseError) { - if (statusCode === void 0) { statusCode = -1; } - var _this = _super.call(this, message || (baseError && baseError.message)) || this; - // https://github.com/Microsoft/TypeScript/wiki/Breaking-Changes#extending-built-ins-like-error-array-and-map-may-no-longer-work - Object.setPrototypeOf(_this, GraphError.prototype); - _this.statusCode = statusCode; - _this.code = null; - _this.requestId = null; - _this.date = new Date(); - _this.body = null; - _this.stack = baseError ? baseError.stack : _this.stack; - return _this; - } - return GraphError; -}(Error)); -exports.GraphError = GraphError; -//# sourceMappingURL=GraphError.js.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/GraphError.js.map b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/GraphError.js.map deleted file mode 100644 index 2936de8..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/GraphError.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"GraphError.js","sourceRoot":"","sources":["../../src/GraphError.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;AAEH;;GAEG;AAEH;;;;;;GAMG;AAEH;IAAgC,sCAAK;IAiCpC;;;;;;;;OAQG;IACH,oBAAmB,UAAe,EAAE,OAAgB,EAAE,SAAiB;QAApD,2BAAA,EAAA,cAAc,CAAC;QAAlC,YACC,kBAAM,OAAO,IAAI,CAAC,SAAS,IAAI,SAAS,CAAC,OAAO,CAAC,CAAC,SASlD;QARA,gIAAgI;QAChI,MAAM,CAAC,cAAc,CAAC,KAAI,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC;QAClD,KAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,KAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,KAAI,CAAC,SAAS,GAAG,IAAI,CAAC;QACtB,KAAI,CAAC,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;QACvB,KAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,KAAI,CAAC,KAAK,GAAG,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,KAAI,CAAC,KAAK,CAAC;;IACvD,CAAC;IACF,iBAAC;AAAD,CAAC,AArDD,CAAgC,KAAK,GAqDpC;AArDY,gCAAU"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/GraphErrorHandler.d.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/GraphErrorHandler.d.ts deleted file mode 100644 index 95489bf..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/GraphErrorHandler.d.ts +++ /dev/null @@ -1,60 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -/** - * @module GraphErrorHandler - */ -import { GraphError } from "./GraphError"; -import { GraphRequestCallback } from "./IGraphRequestCallback"; -/** - * @class - * Class for GraphErrorHandler - */ -export declare class GraphErrorHandler { - /** - * @private - * @static - * Populates the GraphError instance with Error instance values - * @param {Error} error - The error returned by graph service or some native error - * @param {number} [statusCode] - The status code of the response - * @returns The GraphError instance - */ - private static constructError; - /** - * @private - * @static - * @async - * Populates the GraphError instance from the Error returned by graph service - * @param {GraphAPIErrorResponse} graphError - The error possibly returned by graph service or some native error - * @param {number} statusCode - The status code of the response - * @returns A promise that resolves to GraphError instance - * - * Example error for https://graph.microsoft.com/v1.0/me/events?$top=3&$search=foo - * { - * "error": { - * "code": "SearchEvents", - * "message": "The parameter $search is not currently supported on the Events resource.", - * "innerError": { - * "request-id": "b31c83fd-944c-4663-aa50-5d9ceb367e19", - * "date": "2016-11-17T18:37:45" - * } - * } - * } - */ - private static constructErrorFromResponse; - /** - * @public - * @static - * @async - * To get the GraphError object - * Reference - https://docs.microsoft.com/en-us/graph/errors - * @param {any} [error = null] - The error returned by graph service or some native error - * @param {number} [statusCode = -1] - The status code of the response - * @param {GraphRequestCallback} [callback] - The graph request callback function - * @returns A promise that resolves to GraphError instance - */ - static getError(error?: any, statusCode?: number, callback?: GraphRequestCallback, rawResponse?: Response): Promise; -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/GraphErrorHandler.js b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/GraphErrorHandler.js deleted file mode 100644 index 4989265..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/GraphErrorHandler.js +++ /dev/null @@ -1,113 +0,0 @@ -"use strict"; -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.GraphErrorHandler = void 0; -var tslib_1 = require("tslib"); -/** - * @module GraphErrorHandler - */ -var GraphError_1 = require("./GraphError"); -/** - * @class - * Class for GraphErrorHandler - */ -var GraphErrorHandler = /** @class */ (function () { - function GraphErrorHandler() { - } - /** - * @private - * @static - * Populates the GraphError instance with Error instance values - * @param {Error} error - The error returned by graph service or some native error - * @param {number} [statusCode] - The status code of the response - * @returns The GraphError instance - */ - GraphErrorHandler.constructError = function (error, statusCode, rawResponse) { - var gError = new GraphError_1.GraphError(statusCode, "", error); - if (error.name !== undefined) { - gError.code = error.name; - } - gError.body = error.toString(); - gError.date = new Date(); - gError.headers = rawResponse === null || rawResponse === void 0 ? void 0 : rawResponse.headers; - return gError; - }; - /** - * @private - * @static - * @async - * Populates the GraphError instance from the Error returned by graph service - * @param {GraphAPIErrorResponse} graphError - The error possibly returned by graph service or some native error - * @param {number} statusCode - The status code of the response - * @returns A promise that resolves to GraphError instance - * - * Example error for https://graph.microsoft.com/v1.0/me/events?$top=3&$search=foo - * { - * "error": { - * "code": "SearchEvents", - * "message": "The parameter $search is not currently supported on the Events resource.", - * "innerError": { - * "request-id": "b31c83fd-944c-4663-aa50-5d9ceb367e19", - * "date": "2016-11-17T18:37:45" - * } - * } - * } - */ - GraphErrorHandler.constructErrorFromResponse = function (graphError, statusCode, rawResponse) { - var error = graphError.error; - var gError = new GraphError_1.GraphError(statusCode, error.message); - gError.code = error.code; - if (error.innerError !== undefined) { - gError.requestId = error.innerError["request-id"]; - gError.date = new Date(error.innerError.date); - } - gError.body = JSON.stringify(error); - gError.headers = rawResponse === null || rawResponse === void 0 ? void 0 : rawResponse.headers; - return gError; - }; - /** - * @public - * @static - * @async - * To get the GraphError object - * Reference - https://docs.microsoft.com/en-us/graph/errors - * @param {any} [error = null] - The error returned by graph service or some native error - * @param {number} [statusCode = -1] - The status code of the response - * @param {GraphRequestCallback} [callback] - The graph request callback function - * @returns A promise that resolves to GraphError instance - */ - GraphErrorHandler.getError = function (error, statusCode, callback, rawResponse) { - if (error === void 0) { error = null; } - if (statusCode === void 0) { statusCode = -1; } - return tslib_1.__awaiter(this, void 0, void 0, function () { - var gError; - return tslib_1.__generator(this, function (_a) { - if (error && error.error) { - gError = GraphErrorHandler.constructErrorFromResponse(error, statusCode, rawResponse); - } - else if (error instanceof Error) { - gError = GraphErrorHandler.constructError(error, statusCode, rawResponse); - } - else { - gError = new GraphError_1.GraphError(statusCode); - gError.body = error; // if a custom error is passed which is not instance of Error object or a graph API response - } - if (typeof callback === "function") { - callback(gError, null); - } - else { - return [2 /*return*/, gError]; - } - return [2 /*return*/]; - }); - }); - }; - return GraphErrorHandler; -}()); -exports.GraphErrorHandler = GraphErrorHandler; -//# sourceMappingURL=GraphErrorHandler.js.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/GraphErrorHandler.js.map b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/GraphErrorHandler.js.map deleted file mode 100644 index 98b73a9..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/GraphErrorHandler.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"GraphErrorHandler.js","sourceRoot":"","sources":["../../src/GraphErrorHandler.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;AAEH;;GAEG;AAEH,2CAA0C;AAiB1C;;;GAGG;AAEH;IAAA;IAmFA,CAAC;IAlFA;;;;;;;OAOG;IACY,gCAAc,GAA7B,UAA8B,KAAY,EAAE,UAAmB,EAAE,WAAsB;Q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AiB;QAAE,2BAAA,EAAA,cAAc,CAAC;;;;gBAE9D,IAAI,KAAK,IAAI,KAAK,CAAC,KAAK,EAAE;oBACzB,MAAM,GAAG,iBAAiB,CAAC,0BAA0B,CAAC,KAAK,EAAE,UAAU,EAAE,WAAW,CAAC,CAAC;iBACtF;qBAAM,IAAI,KAAK,YAAY,KAAK,EAAE;oBAClC,MAAM,GAAG,iBAAiB,CAAC,cAAc,CAAC,KAAK,EAAE,UAAU,EAAE,WAAW,CAAC,CAAC;iBAC1E;qBAAM;oBACN,MAAM,GAAG,IAAI,uBAAU,CAAC,UAAU,CAAC,CAAC;oBACpC,MAAM,CAAC,IAAI,GAAG,KAAK,CAAC,CAAC,4FAA4F;iBACjH;gBACD,IAAI,OAAO,QAAQ,KAAK,UAAU,EAAE;oBACnC,QAAQ,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;iBACvB;qBAAM;oBACN,sBAAO,MAAM,EAAC;iBACd;;;;KACD;IACF,wBAAC;AAAD,CAAC,AAnFD,IAmFC;AAnFY,8CAAiB"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/GraphRequest.d.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/GraphRequest.d.ts deleted file mode 100644 index 29d8a42..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/GraphRequest.d.ts +++ /dev/null @@ -1,380 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -import { HTTPClient } from "./HTTPClient"; -import { ClientOptions } from "./IClientOptions"; -import { GraphRequestCallback } from "./IGraphRequestCallback"; -import { MiddlewareOptions } from "./middleware/options/IMiddlewareOptions"; -import { ResponseType } from "./ResponseType"; -/** - * @interface - * Signature to representing key value pairs - * @property {[key: string] : string | number} - The Key value pair - */ -interface KeyValuePairObjectStringNumber { - [key: string]: string | number; -} -/** - * @interface - * Signature to define URL components - * @template http://graph.microsoft.com/VERSION/PATH?QUERYSTRING&OTHER_QUERY_PARAMS - * - * @property {string} host - The host to which the request needs to be made - * @property {string} version - Version of the graph endpoint - * @property {string} [path] - The path of the resource request - * @property {KeyValuePairObjectStringNumber} oDataQueryParams - The oData Query Params - * @property {KeyValuePairObjectStringNumber} otherURLQueryParams - The other query params for a request - * @property {string[]} otherURLQueryOptions - The non key-value query parameters. Example- '/me?$whatif' - */ -export interface URLComponents { - host: string; - version: string; - path?: string; - oDataQueryParams: KeyValuePairObjectStringNumber; - otherURLQueryParams: KeyValuePairObjectStringNumber; - otherURLQueryOptions?: string[]; -} -/** - * @class - * A Class representing GraphRequest - */ -export declare class GraphRequest { - /** - * @private - * A member variable to hold HTTPClient instance - */ - private httpClient; - /** - * @private - * A member variable to hold client options - */ - private config; - /** - * @private - * A member to hold URL Components data - */ - private urlComponents; - /** - * @private - * A member to hold custom header options for a request - */ - private _headers; - /** - * @private - * A member to hold custom options for a request - */ - private _options; - /** - * @private - * A member to hold the array of middleware options for a request - */ - private _middlewareOptions; - /** - * @private - * A member to hold custom response type for a request - */ - private _responseType; - /** - * @public - * @constructor - * Creates an instance of GraphRequest - * @param {HTTPClient} httpClient - The HTTPClient instance - * @param {ClientOptions} config - The options for making request - * @param {string} path - A path string - */ - constructor(httpClient: HTTPClient, config: ClientOptions, path: string); - /** - * @private - * Parses the path string and creates URLComponents out of it - * @param {string} path - The request path string - * @returns Nothing - */ - private parsePath; - /** - * @private - * Adds the query parameter as comma separated values - * @param {string} propertyName - The name of a property - * @param {string|string[]} propertyValue - The vale of a property - * @param {IArguments} additionalProperties - The additional properties - * @returns Nothing - */ - private addCsvQueryParameter; - /** - * @private - * Builds the full url from the URLComponents to make a request - * @returns The URL string that is qualified to make a request to graph endpoint - */ - private buildFullUrl; - /** - * @private - * Builds the query string from the URLComponents - * @returns The Constructed query string - */ - private createQueryString; - /** - * @private - * Parses the query parameters to set the urlComponents property of the GraphRequest object - * @param {string|KeyValuePairObjectStringNumber} queryDictionaryOrString - The query parameter - * @returns The same GraphRequest instance that is being called with - */ - private parseQueryParameter; - /** - * @private - * Parses the query parameter of string type to set the urlComponents property of the GraphRequest object - * @param {string} queryParameter - the query parameters - * returns nothing - */ - private parseQueryParamenterString; - /** - * @private - * Sets values into the urlComponents property of GraphRequest object. - * @param {string} paramKey - the query parameter key - * @param {string} paramValue - the query paramter value - * @returns nothing - */ - private setURLComponentsQueryParamater; - /** - * @private - * Check if the query parameter string has a valid key-value structure - * @param {string} queryString - the query parameter string. Example -> "name=value" - * #returns true if the query string has a valid key-value structure else false - */ - private isValidQueryKeyValuePair; - /** - * @private - * Updates the custom headers and options for a request - * @param {FetchOptions} options - The request options object - * @returns Nothing - */ - private updateRequestOptions; - /** - * @private - * @async - * Adds the custom headers and options to the request and makes the HTTPClient send request call - * @param {RequestInfo} request - The request url string or the Request object value - * @param {FetchOptions} options - The options to make a request - * @param {GraphRequestCallback} [callback] - The callback function to be called in response with async call - * @returns A promise that resolves to the response content - */ - private send; - /** - * @private - * Checks if the content-type is present in the _headers property. If not present, defaults the content-type to application/json - * @param none - * @returns nothing - */ - private setHeaderContentType; - /** - * @public - * Sets the custom header for a request - * @param {string} headerKey - A header key - * @param {string} headerValue - A header value - * @returns The same GraphRequest instance that is being called with - */ - header(headerKey: string, headerValue: string): GraphRequest; - /** - * @public - * Sets the custom headers for a request - * @param {KeyValuePairObjectStringNumber | HeadersInit} headers - The request headers - * @returns The same GraphRequest instance that is being called with - */ - headers(headers: KeyValuePairObjectStringNumber | HeadersInit): GraphRequest; - /** - * @public - * Sets the option for making a request - * @param {string} key - The key value - * @param {any} value - The value - * @returns The same GraphRequest instance that is being called with - */ - option(key: string, value: any): GraphRequest; - /** - * @public - * Sets the options for making a request - * @param {{ [key: string]: any }} options - The options key value pair - * @returns The same GraphRequest instance that is being called with - */ - options(options: { - [key: string]: any; - }): GraphRequest; - /** - * @public - * Sets the middleware options for a request - * @param {MiddlewareOptions[]} options - The array of middleware options - * @returns The same GraphRequest instance that is being called with - */ - middlewareOptions(options: MiddlewareOptions[]): GraphRequest; - /** - * @public - * Sets the api endpoint version for a request - * @param {string} version - The version value - * @returns The same GraphRequest instance that is being called with - */ - version(version: string): GraphRequest; - /** - * @public - * Sets the api endpoint version for a request - * @param {ResponseType} responseType - The response type value - * @returns The same GraphRequest instance that is being called with - */ - responseType(responseType: ResponseType): GraphRequest; - /** - * @public - * To add properties for select OData Query param - * @param {string|string[]} properties - The Properties value - * @returns The same GraphRequest instance that is being called with, after adding the properties for $select query - */ - select(properties: string | string[]): GraphRequest; - /** - * @public - * To add properties for expand OData Query param - * @param {string|string[]} properties - The Properties value - * @returns The same GraphRequest instance that is being called with, after adding the properties for $expand query - */ - expand(properties: string | string[]): GraphRequest; - /** - * @public - * To add properties for orderby OData Query param - * @param {string|string[]} properties - The Properties value - * @returns The same GraphRequest instance that is being called with, after adding the properties for $orderby query - */ - orderby(properties: string | string[]): GraphRequest; - /** - * @public - * To add query string for filter OData Query param. The request URL accepts only one $filter Odata Query option and its value is set to the most recently passed filter query string. - * @param {string} filterStr - The filter query string - * @returns The same GraphRequest instance that is being called with, after adding the $filter query - */ - filter(filterStr: string): GraphRequest; - /** - * @public - * To add criterion for search OData Query param. The request URL accepts only one $search Odata Query option and its value is set to the most recently passed search criterion string. - * @param {string} searchStr - The search criterion string - * @returns The same GraphRequest instance that is being called with, after adding the $search query criteria - */ - search(searchStr: string): GraphRequest; - /** - * @public - * To add number for top OData Query param. The request URL accepts only one $top Odata Query option and its value is set to the most recently passed number value. - * @param {number} n - The number value - * @returns The same GraphRequest instance that is being called with, after adding the number for $top query - */ - top(n: number): GraphRequest; - /** - * @public - * To add number for skip OData Query param. The request URL accepts only one $skip Odata Query option and its value is set to the most recently passed number value. - * @param {number} n - The number value - * @returns The same GraphRequest instance that is being called with, after adding the number for the $skip query - */ - skip(n: number): GraphRequest; - /** - * @public - * To add token string for skipToken OData Query param. The request URL accepts only one $skipToken Odata Query option and its value is set to the most recently passed token value. - * @param {string} token - The token value - * @returns The same GraphRequest instance that is being called with, after adding the token string for $skipToken query option - */ - skipToken(token: string): GraphRequest; - /** - * @public - * To add boolean for count OData Query param. The URL accepts only one $count Odata Query option and its value is set to the most recently passed boolean value. - * @param {boolean} isCount - The count boolean - * @returns The same GraphRequest instance that is being called with, after adding the boolean value for the $count query option - */ - count(isCount?: boolean): GraphRequest; - /** - * @public - * Appends query string to the urlComponent - * @param {string|KeyValuePairObjectStringNumber} queryDictionaryOrString - The query value - * @returns The same GraphRequest instance that is being called with, after appending the query string to the url component - */ - query(queryDictionaryOrString: string | KeyValuePairObjectStringNumber): GraphRequest; - /** - * @public - * @async - * Makes a http request with GET method - * @param {GraphRequestCallback} [callback] - The callback function to be called in response with async call - * @returns A promise that resolves to the get response - */ - get(callback?: GraphRequestCallback): Promise; - /** - * @public - * @async - * Makes a http request with POST method - * @param {any} content - The content that needs to be sent with the request - * @param {GraphRequestCallback} [callback] - The callback function to be called in response with async call - * @returns A promise that resolves to the post response - */ - post(content: any, callback?: GraphRequestCallback): Promise; - /** - * @public - * @async - * Alias for Post request call - * @param {any} content - The content that needs to be sent with the request - * @param {GraphRequestCallback} [callback] - The callback function to be called in response with async call - * @returns A promise that resolves to the post response - */ - create(content: any, callback?: GraphRequestCallback): Promise; - /** - * @public - * @async - * Makes http request with PUT method - * @param {any} content - The content that needs to be sent with the request - * @param {GraphRequestCallback} [callback] - The callback function to be called in response with async call - * @returns A promise that resolves to the put response - */ - put(content: any, callback?: GraphRequestCallback): Promise; - /** - * @public - * @async - * Makes http request with PATCH method - * @param {any} content - The content that needs to be sent with the request - * @param {GraphRequestCallback} [callback] - The callback function to be called in response with async call - * @returns A promise that resolves to the patch response - */ - patch(content: any, callback?: GraphRequestCallback): Promise; - /** - * @public - * @async - * Alias for PATCH request - * @param {any} content - The content that needs to be sent with the request - * @param {GraphRequestCallback} [callback] - The callback function to be called in response with async call - * @returns A promise that resolves to the patch response - */ - update(content: any, callback?: GraphRequestCallback): Promise; - /** - * @public - * @async - * Makes http request with DELETE method - * @param {GraphRequestCallback} [callback] - The callback function to be called in response with async call - * @returns A promise that resolves to the delete response - */ - delete(callback?: GraphRequestCallback): Promise; - /** - * @public - * @async - * Alias for delete request call - * @param {GraphRequestCallback} [callback] - The callback function to be called in response with async call - * @returns A promise that resolves to the delete response - */ - del(callback?: GraphRequestCallback): Promise; - /** - * @public - * @async - * Makes a http request with GET method to read response as a stream. - * @param {GraphRequestCallback} [callback] - The callback function to be called in response with async call - * @returns A promise that resolves to the getStream response - */ - getStream(callback?: GraphRequestCallback): Promise; - /** - * @public - * @async - * Makes a http request with GET method to read response as a stream. - * @param {any} stream - The stream instance - * @param {GraphRequestCallback} [callback] - The callback function to be called in response with async call - * @returns A promise that resolves to the putStream response - */ - putStream(stream: any, callback?: GraphRequestCallback): Promise; -} -export {}; diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/GraphRequest.js b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/GraphRequest.js deleted file mode 100644 index e58079f..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/GraphRequest.js +++ /dev/null @@ -1,777 +0,0 @@ -"use strict"; -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.GraphRequest = void 0; -var tslib_1 = require("tslib"); -/** - * @module GraphRequest - */ -var GraphClientError_1 = require("./GraphClientError"); -var GraphErrorHandler_1 = require("./GraphErrorHandler"); -var GraphRequestUtil_1 = require("./GraphRequestUtil"); -var GraphResponseHandler_1 = require("./GraphResponseHandler"); -var MiddlewareControl_1 = require("./middleware/MiddlewareControl"); -var RequestMethod_1 = require("./RequestMethod"); -var ResponseType_1 = require("./ResponseType"); -/** - * @class - * A Class representing GraphRequest - */ -var GraphRequest = /** @class */ (function () { - /** - * @public - * @constructor - * Creates an instance of GraphRequest - * @param {HTTPClient} httpClient - The HTTPClient instance - * @param {ClientOptions} config - The options for making request - * @param {string} path - A path string - */ - function GraphRequest(httpClient, config, path) { - var _this = this; - /** - * @private - * Parses the path string and creates URLComponents out of it - * @param {string} path - The request path string - * @returns Nothing - */ - this.parsePath = function (path) { - // Strips out the base of the url if they passed in - if (path.indexOf("https://") !== -1) { - path = path.replace("https://", ""); - // Find where the host ends - var endOfHostStrPos = path.indexOf("/"); - if (endOfHostStrPos !== -1) { - // Parse out the host - _this.urlComponents.host = "https://" + path.substring(0, endOfHostStrPos); - // Strip the host from path - path = path.substring(endOfHostStrPos + 1, path.length); - } - // Remove the following version - var endOfVersionStrPos = path.indexOf("/"); - if (endOfVersionStrPos !== -1) { - // Parse out the version - _this.urlComponents.version = path.substring(0, endOfVersionStrPos); - // Strip version from path - path = path.substring(endOfVersionStrPos + 1, path.length); - } - } - // Strip out any leading "/" - if (path.charAt(0) === "/") { - path = path.substr(1); - } - var queryStrPos = path.indexOf("?"); - if (queryStrPos === -1) { - // No query string - _this.urlComponents.path = path; - } - else { - _this.urlComponents.path = path.substr(0, queryStrPos); - // Capture query string into oDataQueryParams and otherURLQueryParams - var queryParams = path.substring(queryStrPos + 1, path.length).split("&"); - for (var _i = 0, queryParams_1 = queryParams; _i < queryParams_1.length; _i++) { - var queryParam = queryParams_1[_i]; - _this.parseQueryParameter(queryParam); - } - } - }; - this.httpClient = httpClient; - this.config = config; - this.urlComponents = { - host: this.config.baseUrl, - version: this.config.defaultVersion, - oDataQueryParams: {}, - otherURLQueryParams: {}, - otherURLQueryOptions: [], - }; - this._headers = {}; - this._options = {}; - this._middlewareOptions = []; - this.parsePath(path); - } - /** - * @private - * Adds the query parameter as comma separated values - * @param {string} propertyName - The name of a property - * @param {string|string[]} propertyValue - The vale of a property - * @param {IArguments} additionalProperties - The additional properties - * @returns Nothing - */ - GraphRequest.prototype.addCsvQueryParameter = function (propertyName, propertyValue, additionalProperties) { - // If there are already $propertyName value there, append a "," - this.urlComponents.oDataQueryParams[propertyName] = this.urlComponents.oDataQueryParams[propertyName] ? this.urlComponents.oDataQueryParams[propertyName] + "," : ""; - var allValues = []; - if (additionalProperties.length > 1 && typeof propertyValue === "string") { - allValues = Array.prototype.slice.call(additionalProperties); - } - else if (typeof propertyValue === "string") { - allValues.push(propertyValue); - } - else { - allValues = allValues.concat(propertyValue); - } - this.urlComponents.oDataQueryParams[propertyName] += allValues.join(","); - }; - /** - * @private - * Builds the full url from the URLComponents to make a request - * @returns The URL string that is qualified to make a request to graph endpoint - */ - GraphRequest.prototype.buildFullUrl = function () { - var url = (0, GraphRequestUtil_1.urlJoin)([this.urlComponents.host, this.urlComponents.version, this.urlComponents.path]) + this.createQueryString(); - if (this.config.debugLogging) { - console.log(url); - } - return url; - }; - /** - * @private - * Builds the query string from the URLComponents - * @returns The Constructed query string - */ - GraphRequest.prototype.createQueryString = function () { - // Combining query params from oDataQueryParams and otherURLQueryParams - var urlComponents = this.urlComponents; - var query = []; - if (Object.keys(urlComponents.oDataQueryParams).length !== 0) { - for (var property in urlComponents.oDataQueryParams) { - if (Object.prototype.hasOwnProperty.call(urlComponents.oDataQueryParams, property)) { - query.push(property + "=" + urlComponents.oDataQueryParams[property]); - } - } - } - if (Object.keys(urlComponents.otherURLQueryParams).length !== 0) { - for (var property in urlComponents.otherURLQueryParams) { - if (Object.prototype.hasOwnProperty.call(urlComponents.otherURLQueryParams, property)) { - query.push(property + "=" + urlComponents.otherURLQueryParams[property]); - } - } - } - if (urlComponents.otherURLQueryOptions.length !== 0) { - for (var _i = 0, _a = urlComponents.otherURLQueryOptions; _i < _a.length; _i++) { - var str = _a[_i]; - query.push(str); - } - } - return query.length > 0 ? "?" + query.join("&") : ""; - }; - /** - * @private - * Parses the query parameters to set the urlComponents property of the GraphRequest object - * @param {string|KeyValuePairObjectStringNumber} queryDictionaryOrString - The query parameter - * @returns The same GraphRequest instance that is being called with - */ - GraphRequest.prototype.parseQueryParameter = function (queryDictionaryOrString) { - if (typeof queryDictionaryOrString === "string") { - if (queryDictionaryOrString.charAt(0) === "?") { - queryDictionaryOrString = queryDictionaryOrString.substring(1); - } - if (queryDictionaryOrString.indexOf("&") !== -1) { - var queryParams = queryDictionaryOrString.split("&"); - for (var _i = 0, queryParams_2 = queryParams; _i < queryParams_2.length; _i++) { - var str = queryParams_2[_i]; - this.parseQueryParamenterString(str); - } - } - else { - this.parseQueryParamenterString(queryDictionaryOrString); - } - } - else if (queryDictionaryOrString.constructor === Object) { - for (var key in queryDictionaryOrString) { - if (Object.prototype.hasOwnProperty.call(queryDictionaryOrString, key)) { - this.setURLComponentsQueryParamater(key, queryDictionaryOrString[key]); - } - } - } - return this; - }; - /** - * @private - * Parses the query parameter of string type to set the urlComponents property of the GraphRequest object - * @param {string} queryParameter - the query parameters - * returns nothing - */ - GraphRequest.prototype.parseQueryParamenterString = function (queryParameter) { - /* The query key-value pair must be split on the first equals sign to avoid errors in parsing nested query parameters. - Example-> "/me?$expand=home($select=city)" */ - if (this.isValidQueryKeyValuePair(queryParameter)) { - var indexOfFirstEquals = queryParameter.indexOf("="); - var paramKey = queryParameter.substring(0, indexOfFirstEquals); - var paramValue = queryParameter.substring(indexOfFirstEquals + 1); - this.setURLComponentsQueryParamater(paramKey, paramValue); - } - else { - /* Push values which are not of key-value structure. - Example-> Handle an invalid input->.query(test), .query($select($select=name)) and let the Graph API respond with the error in the URL*/ - this.urlComponents.otherURLQueryOptions.push(queryParameter); - } - }; - /** - * @private - * Sets values into the urlComponents property of GraphRequest object. - * @param {string} paramKey - the query parameter key - * @param {string} paramValue - the query paramter value - * @returns nothing - */ - GraphRequest.prototype.setURLComponentsQueryParamater = function (paramKey, paramValue) { - if (GraphRequestUtil_1.oDataQueryNames.indexOf(paramKey) !== -1) { - var currentValue = this.urlComponents.oDataQueryParams[paramKey]; - var isValueAppendable = currentValue && (paramKey === "$expand" || paramKey === "$select" || paramKey === "$orderby"); - this.urlComponents.oDataQueryParams[paramKey] = isValueAppendable ? currentValue + "," + paramValue : paramValue; - } - else { - this.urlComponents.otherURLQueryParams[paramKey] = paramValue; - } - }; - /** - * @private - * Check if the query parameter string has a valid key-value structure - * @param {string} queryString - the query parameter string. Example -> "name=value" - * #returns true if the query string has a valid key-value structure else false - */ - GraphRequest.prototype.isValidQueryKeyValuePair = function (queryString) { - var indexofFirstEquals = queryString.indexOf("="); - if (indexofFirstEquals === -1) { - return false; - } - var indexofOpeningParanthesis = queryString.indexOf("("); - if (indexofOpeningParanthesis !== -1 && queryString.indexOf("(") < indexofFirstEquals) { - // Example -> .query($select($expand=true)); - return false; - } - return true; - }; - /** - * @private - * Updates the custom headers and options for a request - * @param {FetchOptions} options - The request options object - * @returns Nothing - */ - GraphRequest.prototype.updateRequestOptions = function (options) { - var optionsHeaders = tslib_1.__assign({}, options.headers); - if (this.config.fetchOptions !== undefined) { - var fetchOptions = tslib_1.__assign({}, this.config.fetchOptions); - Object.assign(options, fetchOptions); - if (typeof this.config.fetchOptions.headers !== undefined) { - options.headers = tslib_1.__assign({}, this.config.fetchOptions.headers); - } - } - Object.assign(options, this._options); - if (options.headers !== undefined) { - Object.assign(optionsHeaders, options.headers); - } - Object.assign(optionsHeaders, this._headers); - options.headers = optionsHeaders; - }; - /** - * @private - * @async - * Adds the custom headers and options to the request and makes the HTTPClient send request call - * @param {RequestInfo} request - The request url string or the Request object value - * @param {FetchOptions} options - The options to make a request - * @param {GraphRequestCallback} [callback] - The callback function to be called in response with async call - * @returns A promise that resolves to the response content - */ - GraphRequest.prototype.send = function (request, options, callback) { - var _a; - return tslib_1.__awaiter(this, void 0, void 0, function () { - var rawResponse, middlewareControl, customHosts, context_1, response, error_1, statusCode, gError; - return tslib_1.__generator(this, function (_b) { - switch (_b.label) { - case 0: - middlewareControl = new MiddlewareControl_1.MiddlewareControl(this._middlewareOptions); - this.updateRequestOptions(options); - customHosts = (_a = this.config) === null || _a === void 0 ? void 0 : _a.customHosts; - _b.label = 1; - case 1: - _b.trys.push([1, 4, , 6]); - return [4 /*yield*/, this.httpClient.sendRequest({ - request: request, - options: options, - middlewareControl: middlewareControl, - customHosts: customHosts, - })]; - case 2: - context_1 = _b.sent(); - rawResponse = context_1.response; - return [4 /*yield*/, GraphResponseHandler_1.GraphResponseHandler.getResponse(rawResponse, this._responseType, callback)]; - case 3: - response = _b.sent(); - return [2 /*return*/, response]; - case 4: - error_1 = _b.sent(); - if (error_1 instanceof GraphClientError_1.GraphClientError) { - throw error_1; - } - statusCode = void 0; - if (rawResponse) { - statusCode = rawResponse.status; - } - return [4 /*yield*/, GraphErrorHandler_1.GraphErrorHandler.getError(error_1, statusCode, callback, rawResponse)]; - case 5: - gError = _b.sent(); - throw gError; - case 6: return [2 /*return*/]; - } - }); - }); - }; - /** - * @private - * Checks if the content-type is present in the _headers property. If not present, defaults the content-type to application/json - * @param none - * @returns nothing - */ - GraphRequest.prototype.setHeaderContentType = function () { - if (!this._headers) { - this.header("Content-Type", "application/json"); - return; - } - var headerKeys = Object.keys(this._headers); - for (var _i = 0, headerKeys_1 = headerKeys; _i < headerKeys_1.length; _i++) { - var headerKey = headerKeys_1[_i]; - if (headerKey.toLowerCase() === "content-type") { - return; - } - } - // Default the content-type to application/json in case the content-type is not present in the header - this.header("Content-Type", "application/json"); - }; - /** - * @public - * Sets the custom header for a request - * @param {string} headerKey - A header key - * @param {string} headerValue - A header value - * @returns The same GraphRequest instance that is being called with - */ - GraphRequest.prototype.header = function (headerKey, headerValue) { - this._headers[headerKey] = headerValue; - return this; - }; - /** - * @public - * Sets the custom headers for a request - * @param {KeyValuePairObjectStringNumber | HeadersInit} headers - The request headers - * @returns The same GraphRequest instance that is being called with - */ - GraphRequest.prototype.headers = function (headers) { - for (var key in headers) { - if (Object.prototype.hasOwnProperty.call(headers, key)) { - this._headers[key] = headers[key]; - } - } - return this; - }; - /** - * @public - * Sets the option for making a request - * @param {string} key - The key value - * @param {any} value - The value - * @returns The same GraphRequest instance that is being called with - */ - GraphRequest.prototype.option = function (key, value) { - this._options[key] = value; - return this; - }; - /** - * @public - * Sets the options for making a request - * @param {{ [key: string]: any }} options - The options key value pair - * @returns The same GraphRequest instance that is being called with - */ - GraphRequest.prototype.options = function (options) { - for (var key in options) { - if (Object.prototype.hasOwnProperty.call(options, key)) { - this._options[key] = options[key]; - } - } - return this; - }; - /** - * @public - * Sets the middleware options for a request - * @param {MiddlewareOptions[]} options - The array of middleware options - * @returns The same GraphRequest instance that is being called with - */ - GraphRequest.prototype.middlewareOptions = function (options) { - this._middlewareOptions = options; - return this; - }; - /** - * @public - * Sets the api endpoint version for a request - * @param {string} version - The version value - * @returns The same GraphRequest instance that is being called with - */ - GraphRequest.prototype.version = function (version) { - this.urlComponents.version = version; - return this; - }; - /** - * @public - * Sets the api endpoint version for a request - * @param {ResponseType} responseType - The response type value - * @returns The same GraphRequest instance that is being called with - */ - GraphRequest.prototype.responseType = function (responseType) { - this._responseType = responseType; - return this; - }; - /** - * @public - * To add properties for select OData Query param - * @param {string|string[]} properties - The Properties value - * @returns The same GraphRequest instance that is being called with, after adding the properties for $select query - */ - /* - * Accepts .select("displayName,birthday") - * and .select(["displayName", "birthday"]) - * and .select("displayName", "birthday") - * - */ - GraphRequest.prototype.select = function (properties) { - this.addCsvQueryParameter("$select", properties, arguments); - return this; - }; - /** - * @public - * To add properties for expand OData Query param - * @param {string|string[]} properties - The Properties value - * @returns The same GraphRequest instance that is being called with, after adding the properties for $expand query - */ - GraphRequest.prototype.expand = function (properties) { - this.addCsvQueryParameter("$expand", properties, arguments); - return this; - }; - /** - * @public - * To add properties for orderby OData Query param - * @param {string|string[]} properties - The Properties value - * @returns The same GraphRequest instance that is being called with, after adding the properties for $orderby query - */ - GraphRequest.prototype.orderby = function (properties) { - this.addCsvQueryParameter("$orderby", properties, arguments); - return this; - }; - /** - * @public - * To add query string for filter OData Query param. The request URL accepts only one $filter Odata Query option and its value is set to the most recently passed filter query string. - * @param {string} filterStr - The filter query string - * @returns The same GraphRequest instance that is being called with, after adding the $filter query - */ - GraphRequest.prototype.filter = function (filterStr) { - this.urlComponents.oDataQueryParams.$filter = filterStr; - return this; - }; - /** - * @public - * To add criterion for search OData Query param. The request URL accepts only one $search Odata Query option and its value is set to the most recently passed search criterion string. - * @param {string} searchStr - The search criterion string - * @returns The same GraphRequest instance that is being called with, after adding the $search query criteria - */ - GraphRequest.prototype.search = function (searchStr) { - this.urlComponents.oDataQueryParams.$search = searchStr; - return this; - }; - /** - * @public - * To add number for top OData Query param. The request URL accepts only one $top Odata Query option and its value is set to the most recently passed number value. - * @param {number} n - The number value - * @returns The same GraphRequest instance that is being called with, after adding the number for $top query - */ - GraphRequest.prototype.top = function (n) { - this.urlComponents.oDataQueryParams.$top = n; - return this; - }; - /** - * @public - * To add number for skip OData Query param. The request URL accepts only one $skip Odata Query option and its value is set to the most recently passed number value. - * @param {number} n - The number value - * @returns The same GraphRequest instance that is being called with, after adding the number for the $skip query - */ - GraphRequest.prototype.skip = function (n) { - this.urlComponents.oDataQueryParams.$skip = n; - return this; - }; - /** - * @public - * To add token string for skipToken OData Query param. The request URL accepts only one $skipToken Odata Query option and its value is set to the most recently passed token value. - * @param {string} token - The token value - * @returns The same GraphRequest instance that is being called with, after adding the token string for $skipToken query option - */ - GraphRequest.prototype.skipToken = function (token) { - this.urlComponents.oDataQueryParams.$skipToken = token; - return this; - }; - /** - * @public - * To add boolean for count OData Query param. The URL accepts only one $count Odata Query option and its value is set to the most recently passed boolean value. - * @param {boolean} isCount - The count boolean - * @returns The same GraphRequest instance that is being called with, after adding the boolean value for the $count query option - */ - GraphRequest.prototype.count = function (isCount) { - if (isCount === void 0) { isCount = true; } - this.urlComponents.oDataQueryParams.$count = isCount.toString(); - return this; - }; - /** - * @public - * Appends query string to the urlComponent - * @param {string|KeyValuePairObjectStringNumber} queryDictionaryOrString - The query value - * @returns The same GraphRequest instance that is being called with, after appending the query string to the url component - */ - /* - * Accepts .query("displayName=xyz") - * and .select({ name: "value" }) - */ - GraphRequest.prototype.query = function (queryDictionaryOrString) { - return this.parseQueryParameter(queryDictionaryOrString); - }; - /** - * @public - * @async - * Makes a http request with GET method - * @param {GraphRequestCallback} [callback] - The callback function to be called in response with async call - * @returns A promise that resolves to the get response - */ - GraphRequest.prototype.get = function (callback) { - return tslib_1.__awaiter(this, void 0, void 0, function () { - var url, options, response; - return tslib_1.__generator(this, function (_a) { - switch (_a.label) { - case 0: - url = this.buildFullUrl(); - options = { - method: RequestMethod_1.RequestMethod.GET, - }; - return [4 /*yield*/, this.send(url, options, callback)]; - case 1: - response = _a.sent(); - return [2 /*return*/, response]; - } - }); - }); - }; - /** - * @public - * @async - * Makes a http request with POST method - * @param {any} content - The content that needs to be sent with the request - * @param {GraphRequestCallback} [callback] - The callback function to be called in response with async call - * @returns A promise that resolves to the post response - */ - GraphRequest.prototype.post = function (content, callback) { - return tslib_1.__awaiter(this, void 0, void 0, function () { - var url, options, className; - return tslib_1.__generator(this, function (_a) { - switch (_a.label) { - case 0: - url = this.buildFullUrl(); - options = { - method: RequestMethod_1.RequestMethod.POST, - body: (0, GraphRequestUtil_1.serializeContent)(content), - }; - className = content && content.constructor && content.constructor.name; - if (className === "FormData") { - // Content-Type headers should not be specified in case the of FormData type content - options.headers = {}; - } - else { - this.setHeaderContentType(); - options.headers = this._headers; - } - return [4 /*yield*/, this.send(url, options, callback)]; - case 1: return [2 /*return*/, _a.sent()]; - } - }); - }); - }; - /** - * @public - * @async - * Alias for Post request call - * @param {any} content - The content that needs to be sent with the request - * @param {GraphRequestCallback} [callback] - The callback function to be called in response with async call - * @returns A promise that resolves to the post response - */ - GraphRequest.prototype.create = function (content, callback) { - return tslib_1.__awaiter(this, void 0, void 0, function () { - return tslib_1.__generator(this, function (_a) { - switch (_a.label) { - case 0: return [4 /*yield*/, this.post(content, callback)]; - case 1: return [2 /*return*/, _a.sent()]; - } - }); - }); - }; - /** - * @public - * @async - * Makes http request with PUT method - * @param {any} content - The content that needs to be sent with the request - * @param {GraphRequestCallback} [callback] - The callback function to be called in response with async call - * @returns A promise that resolves to the put response - */ - GraphRequest.prototype.put = function (content, callback) { - return tslib_1.__awaiter(this, void 0, void 0, function () { - var url, options; - return tslib_1.__generator(this, function (_a) { - switch (_a.label) { - case 0: - url = this.buildFullUrl(); - this.setHeaderContentType(); - options = { - method: RequestMethod_1.RequestMethod.PUT, - body: (0, GraphRequestUtil_1.serializeContent)(content), - }; - return [4 /*yield*/, this.send(url, options, callback)]; - case 1: return [2 /*return*/, _a.sent()]; - } - }); - }); - }; - /** - * @public - * @async - * Makes http request with PATCH method - * @param {any} content - The content that needs to be sent with the request - * @param {GraphRequestCallback} [callback] - The callback function to be called in response with async call - * @returns A promise that resolves to the patch response - */ - GraphRequest.prototype.patch = function (content, callback) { - return tslib_1.__awaiter(this, void 0, void 0, function () { - var url, options; - return tslib_1.__generator(this, function (_a) { - switch (_a.label) { - case 0: - url = this.buildFullUrl(); - this.setHeaderContentType(); - options = { - method: RequestMethod_1.RequestMethod.PATCH, - body: (0, GraphRequestUtil_1.serializeContent)(content), - }; - return [4 /*yield*/, this.send(url, options, callback)]; - case 1: return [2 /*return*/, _a.sent()]; - } - }); - }); - }; - /** - * @public - * @async - * Alias for PATCH request - * @param {any} content - The content that needs to be sent with the request - * @param {GraphRequestCallback} [callback] - The callback function to be called in response with async call - * @returns A promise that resolves to the patch response - */ - GraphRequest.prototype.update = function (content, callback) { - return tslib_1.__awaiter(this, void 0, void 0, function () { - return tslib_1.__generator(this, function (_a) { - switch (_a.label) { - case 0: return [4 /*yield*/, this.patch(content, callback)]; - case 1: return [2 /*return*/, _a.sent()]; - } - }); - }); - }; - /** - * @public - * @async - * Makes http request with DELETE method - * @param {GraphRequestCallback} [callback] - The callback function to be called in response with async call - * @returns A promise that resolves to the delete response - */ - GraphRequest.prototype.delete = function (callback) { - return tslib_1.__awaiter(this, void 0, void 0, function () { - var url, options; - return tslib_1.__generator(this, function (_a) { - switch (_a.label) { - case 0: - url = this.buildFullUrl(); - options = { - method: RequestMethod_1.RequestMethod.DELETE, - }; - return [4 /*yield*/, this.send(url, options, callback)]; - case 1: return [2 /*return*/, _a.sent()]; - } - }); - }); - }; - /** - * @public - * @async - * Alias for delete request call - * @param {GraphRequestCallback} [callback] - The callback function to be called in response with async call - * @returns A promise that resolves to the delete response - */ - GraphRequest.prototype.del = function (callback) { - return tslib_1.__awaiter(this, void 0, void 0, function () { - return tslib_1.__generator(this, function (_a) { - switch (_a.label) { - case 0: return [4 /*yield*/, this.delete(callback)]; - case 1: return [2 /*return*/, _a.sent()]; - } - }); - }); - }; - /** - * @public - * @async - * Makes a http request with GET method to read response as a stream. - * @param {GraphRequestCallback} [callback] - The callback function to be called in response with async call - * @returns A promise that resolves to the getStream response - */ - GraphRequest.prototype.getStream = function (callback) { - return tslib_1.__awaiter(this, void 0, void 0, function () { - var url, options; - return tslib_1.__generator(this, function (_a) { - switch (_a.label) { - case 0: - url = this.buildFullUrl(); - options = { - method: RequestMethod_1.RequestMethod.GET, - }; - this.responseType(ResponseType_1.ResponseType.STREAM); - return [4 /*yield*/, this.send(url, options, callback)]; - case 1: return [2 /*return*/, _a.sent()]; - } - }); - }); - }; - /** - * @public - * @async - * Makes a http request with GET method to read response as a stream. - * @param {any} stream - The stream instance - * @param {GraphRequestCallback} [callback] - The callback function to be called in response with async call - * @returns A promise that resolves to the putStream response - */ - GraphRequest.prototype.putStream = function (stream, callback) { - return tslib_1.__awaiter(this, void 0, void 0, function () { - var url, options; - return tslib_1.__generator(this, function (_a) { - switch (_a.label) { - case 0: - url = this.buildFullUrl(); - options = { - method: RequestMethod_1.RequestMethod.PUT, - headers: { - "Content-Type": "application/octet-stream", - }, - body: stream, - }; - return [4 /*yield*/, this.send(url, options, callback)]; - case 1: return [2 /*return*/, _a.sent()]; - } - }); - }); - }; - return GraphRequest; -}()); -exports.GraphRequest = GraphRequest; -//# sourceMappingURL=GraphRequest.js.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/GraphRequest.js.map b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/GraphRequest.js.map deleted file mode 100644 index 45e1b54..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/GraphRequest.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"GraphRequest.js","sourceRoot":"","sources":["../../src/GraphRequest.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;AAEH;;GAEG;AACH,uDAAsD;AAEtD,yDAAwD;AACxD,uDAAgF;AAChF,+DAA8D;AAM9D,oEAAmE;AAEnE,iDAAgD;AAChD,+CAA8C;AA+B9C;;;GAGG;AACH;IA2CC;;;;;;;OAOG;IACH,sBAAmB,UAAsB,EAAE,MAAqB,EAAE,IAAY;QAA9E,iBAcC;QAED;;;;;WAKG;QACK,cAAS,GAAG,UAAC,IAAY;YAChC,mDAAmD;YACnD,IAAI,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,EAAE;gBACpC,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;gBAEpC,2BAA2B;gBAC3B,IAAM,eAAe,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;gBAC1C,IAAI,eAAe,KAAK,CAAC,CAAC,EAAE;oBAC3B,qBAAqB;oBACrB,KAAI,CAAC,aAAa,CAAC,IAAI,GAAG,UAAU,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,EAAE,eAAe,CAAC,CAAC;oBAC1E,2BAA2B;oBAC3B,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,eAAe,GAAG,CAAC,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;iBACxD;gBAED,+BAA+B;gBAC/B,IAAM,kBAAkB,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;gBAC7C,IAAI,kBAAkB,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AAG,GAAG,IAAI,CAAC,YAAY,EAAE,CAAC;wBAC1B,OAAO,GAAG;4BACf,MAAM,EAAE,6BAAa,CAAC,GAAG;4BACzB,OAAO,EAAE;gCACR,cAAc,EAAE,0BAA0B;6BAC1C;4BACD,IAAI,EAAE,MAAM;yBACZ,CAAC;wBACK,qBAAM,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,OAAO,EAAE,QAAQ,CAAC,EAAA;4BAA9C,sBAAO,SAAuC,EAAC;;;;KAC/C;IACF,mBAAC;AAAD,CAAC,AAttBD,IAstBC;AAttBY,oCAAY"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/GraphRequestUtil.d.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/GraphRequestUtil.d.ts deleted file mode 100644 index c77364e..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/GraphRequestUtil.d.ts +++ /dev/null @@ -1,42 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -/** - * To hold list of OData query params - */ -export declare const oDataQueryNames: string[]; -/** - * To construct the URL by appending the segments with "/" - * @param {string[]} urlSegments - The array of strings - * @returns The constructed URL string - */ -export declare const urlJoin: (urlSegments: string[]) => string; -/** - * Serializes the content - * @param {any} content - The content value that needs to be serialized - * @returns The serialized content - * - * Note: - * This conversion is required due to the following reasons: - * Body parameter of Request method of isomorphic-fetch only accepts Blob, ArrayBuffer, FormData, TypedArrays string. - * Node.js platform does not support Blob, FormData. Javascript File object inherits from Blob so it is also not supported in node. Therefore content of type Blob, File, FormData will only come from browsers. - * Parallel to ArrayBuffer in javascript, node provides Buffer interface. Node's Buffer is able to send the arbitrary binary data to the server successfully for both Browser and Node platform. Whereas sending binary data via ArrayBuffer or TypedArrays was only possible using Browser. To support both Node and Browser, `serializeContent` converts TypedArrays or ArrayBuffer to `Node Buffer`. - * If the data received is in JSON format, `serializeContent` converts the JSON to string. - */ -export declare const serializeContent: (content: any) => any; -/** - * Checks if the url is one of the service root endpoints for Microsoft Graph and Graph Explorer. - * @param {string} url - The url to be verified - * @returns {boolean} - Returns true if the url is a Graph URL - */ -export declare const isGraphURL: (url: string) => boolean; -/** - * Checks if the url is for one of the custom hosts provided during client initialization - * @param {string} url - The url to be verified - * @param {Set} customHosts - The url to be verified - * @returns {boolean} - Returns true if the url is a for a custom host - */ -export declare const isCustomHost: (url: string, customHosts: Set) => boolean; diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/GraphRequestUtil.js b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/GraphRequestUtil.js deleted file mode 100644 index 2bb64cd..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/GraphRequestUtil.js +++ /dev/null @@ -1,124 +0,0 @@ -"use strict"; -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.isCustomHost = exports.isGraphURL = exports.serializeContent = exports.urlJoin = exports.oDataQueryNames = void 0; -/** - * @module GraphRequestUtil - */ -var Constants_1 = require("./Constants"); -var GraphClientError_1 = require("./GraphClientError"); -/** - * To hold list of OData query params - */ -exports.oDataQueryNames = ["$select", "$expand", "$orderby", "$filter", "$top", "$skip", "$skipToken", "$count"]; -/** - * To construct the URL by appending the segments with "/" - * @param {string[]} urlSegments - The array of strings - * @returns The constructed URL string - */ -var urlJoin = function (urlSegments) { - var removePostSlash = function (s) { return s.replace(/\/+$/, ""); }; - var removePreSlash = function (s) { return s.replace(/^\/+/, ""); }; - var joiner = function (pre, cur) { return [removePostSlash(pre), removePreSlash(cur)].join("/"); }; - var parts = Array.prototype.slice.call(urlSegments); - return parts.reduce(joiner); -}; -exports.urlJoin = urlJoin; -/** - * Serializes the content - * @param {any} content - The content value that needs to be serialized - * @returns The serialized content - * - * Note: - * This conversion is required due to the following reasons: - * Body parameter of Request method of isomorphic-fetch only accepts Blob, ArrayBuffer, FormData, TypedArrays string. - * Node.js platform does not support Blob, FormData. Javascript File object inherits from Blob so it is also not supported in node. Therefore content of type Blob, File, FormData will only come from browsers. - * Parallel to ArrayBuffer in javascript, node provides Buffer interface. Node's Buffer is able to send the arbitrary binary data to the server successfully for both Browser and Node platform. Whereas sending binary data via ArrayBuffer or TypedArrays was only possible using Browser. To support both Node and Browser, `serializeContent` converts TypedArrays or ArrayBuffer to `Node Buffer`. - * If the data received is in JSON format, `serializeContent` converts the JSON to string. - */ -var serializeContent = function (content) { - var className = content && content.constructor && content.constructor.name; - if (className === "Buffer" || className === "Blob" || className === "File" || className === "FormData" || typeof content === "string") { - return content; - } - if (className === "ArrayBuffer") { - content = Buffer.from(content); - } - else if (className === "Int8Array" || className === "Int16Array" || className === "Int32Array" || className === "Uint8Array" || className === "Uint16Array" || className === "Uint32Array" || className === "Uint8ClampedArray" || className === "Float32Array" || className === "Float64Array" || className === "DataView") { - content = Buffer.from(content.buffer); - } - else { - try { - content = JSON.stringify(content); - } - catch (error) { - throw new Error("Unable to stringify the content"); - } - } - return content; -}; -exports.serializeContent = serializeContent; -/** - * Checks if the url is one of the service root endpoints for Microsoft Graph and Graph Explorer. - * @param {string} url - The url to be verified - * @returns {boolean} - Returns true if the url is a Graph URL - */ -var isGraphURL = function (url) { - return isValidEndpoint(url); -}; -exports.isGraphURL = isGraphURL; -/** - * Checks if the url is for one of the custom hosts provided during client initialization - * @param {string} url - The url to be verified - * @param {Set} customHosts - The url to be verified - * @returns {boolean} - Returns true if the url is a for a custom host - */ -var isCustomHost = function (url, customHosts) { - customHosts.forEach(function (host) { return isCustomHostValid(host); }); - return isValidEndpoint(url, customHosts); -}; -exports.isCustomHost = isCustomHost; -/** - * Checks if the url is for one of the provided hosts. - * @param {string} url - The url to be verified - * @param {Set} allowedHosts - A set of hosts. - * @returns {boolean} - Returns true is for one of the provided endpoints. - */ -var isValidEndpoint = function (url, allowedHosts) { - if (allowedHosts === void 0) { allowedHosts = Constants_1.GRAPH_URLS; } - // Valid Graph URL pattern - https://graph.microsoft.com/{version}/{resource}?{query-parameters} - // Valid Graph URL example - https://graph.microsoft.com/v1.0/ - url = url.toLowerCase(); - if (url.indexOf("https://") !== -1) { - url = url.replace("https://", ""); - // Find where the host ends - var startofPortNoPos = url.indexOf(":"); - var endOfHostStrPos = url.indexOf("/"); - var hostName = ""; - if (endOfHostStrPos !== -1) { - if (startofPortNoPos !== -1 && startofPortNoPos < endOfHostStrPos) { - hostName = url.substring(0, startofPortNoPos); - return allowedHosts.has(hostName); - } - // Parse out the host - hostName = url.substring(0, endOfHostStrPos); - return allowedHosts.has(hostName); - } - } - return false; -}; -/** - * Throws error if the string is not a valid host/hostname and contains other url parts. - * @param {string} host - The host to be verified - */ -var isCustomHostValid = function (host) { - if (host.indexOf("/") !== -1) { - throw new GraphClientError_1.GraphClientError("Please add only hosts or hostnames to the CustomHosts config. If the url is `http://example.com:3000/`, host is `example:3000`"); - } -}; -//# sourceMappingURL=GraphRequestUtil.js.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/GraphRequestUtil.js.map b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/GraphRequestUtil.js.map deleted file mode 100644 index 9f1bf6b..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/GraphRequestUtil.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"GraphRequestUtil.js","sourceRoot":"","sources":["../../src/GraphRequestUtil.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH;;GAEG;AACH,yCAAyC;AACzC,uDAAsD;AACtD;;GAEG;AACU,QAAA,eAAe,GAAG,CAAC,SAAS,EA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AE,CAAC,CAAC;QAElC,2BAA2B;QAC3B,IAAM,gBAAgB,GAAG,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QAC1C,IAAM,eAAe,GAAG,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QACzC,IAAI,QAAQ,GAAG,EAAE,CAAC;QAClB,IAAI,eAAe,KAAK,CAAC,CAAC,EAAE;YAC3B,IAAI,gBAAgB,KAAK,CAAC,CAAC,IAAI,gBAAgB,GAAG,eAAe,EAAE;gBAClE,QAAQ,GAAG,GAAG,CAAC,SAAS,CAAC,CAAC,EAAE,gBAAgB,CAAC,CAAC;gBAC9C,OAAO,YAAY,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;aAClC;YACD,qBAAqB;YACrB,QAAQ,GAAG,GAAG,CAAC,SAAS,CAAC,CAAC,EAAE,eAAe,CAAC,CAAC;YAC7C,OAAO,YAAY,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;SAClC;KACD;IAED,OAAO,KAAK,CAAC;AACd,CAAC,CAAC;AAEF;;;GAGG;AACH,IAAM,iBAAiB,GAAG,UAAC,IAAY;IACtC,IAAI,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE;QAC7B,MAAM,IAAI,mCAAgB,CAAC,gIAAgI,CAAC,CAAC;KAC7J;AACF,CAAC,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/GraphResponseHandler.d.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/GraphResponseHandler.d.ts deleted file mode 100644 index 730118a..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/GraphResponseHandler.d.ts +++ /dev/null @@ -1,62 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -/** - * @module GraphResponseHandler - * References - https://fetch.spec.whatwg.org/#responses - */ -import { GraphRequestCallback } from "./IGraphRequestCallback"; -import { ResponseType } from "./ResponseType"; -/** - * @enum - * Enum for document types - * @property {string} TEXT_HTML - The text/html content type - * @property {string} TEXT_XML - The text/xml content type - * @property {string} APPLICATION_XML - The application/xml content type - * @property {string} APPLICATION_XHTML - The application/xhml+xml content type - */ -export declare enum DocumentType { - TEXT_HTML = "text/html", - TEXT_XML = "text/xml", - APPLICATION_XML = "application/xml", - APPLICATION_XHTML = "application/xhtml+xml" -} -/** - * @class - * Class for GraphResponseHandler - */ -export declare class GraphResponseHandler { - /** - * @private - * @static - * To parse Document response - * @param {Response} rawResponse - The response object - * @param {DocumentType} type - The type to which the document needs to be parsed - * @returns A promise that resolves to a document content - */ - private static parseDocumentResponse; - /** - * @private - * @static - * @async - * To convert the native Response to response content - * @param {Response} rawResponse - The response object - * @param {ResponseType} [responseType] - The response type value - * @returns A promise that resolves to the converted response content - */ - private static convertResponse; - /** - * @public - * @static - * @async - * To get the parsed response - * @param {Response} rawResponse - The response object - * @param {ResponseType} [responseType] - The response type value - * @param {GraphRequestCallback} [callback] - The graph request callback function - * @returns The parsed response - */ - static getResponse(rawResponse: Response, responseType?: ResponseType, callback?: GraphRequestCallback): Promise; -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/GraphResponseHandler.js b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/GraphResponseHandler.js deleted file mode 100644 index dd7ae32..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/GraphResponseHandler.js +++ /dev/null @@ -1,228 +0,0 @@ -"use strict"; -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.GraphResponseHandler = exports.DocumentType = void 0; -var tslib_1 = require("tslib"); -var ResponseType_1 = require("./ResponseType"); -/** - * @enum - * Enum for document types - * @property {string} TEXT_HTML - The text/html content type - * @property {string} TEXT_XML - The text/xml content type - * @property {string} APPLICATION_XML - The application/xml content type - * @property {string} APPLICATION_XHTML - The application/xhml+xml content type - */ -var DocumentType; -(function (DocumentType) { - DocumentType["TEXT_HTML"] = "text/html"; - DocumentType["TEXT_XML"] = "text/xml"; - DocumentType["APPLICATION_XML"] = "application/xml"; - DocumentType["APPLICATION_XHTML"] = "application/xhtml+xml"; -})(DocumentType || (exports.DocumentType = DocumentType = {})); -/** - * @enum - * Enum for Content types - * @property {string} TEXT_PLAIN - The text/plain content type - * @property {string} APPLICATION_JSON - The application/json content type - */ -var ContentType; -(function (ContentType) { - ContentType["TEXT_PLAIN"] = "text/plain"; - ContentType["APPLICATION_JSON"] = "application/json"; -})(ContentType || (ContentType = {})); -/** - * @enum - * Enum for Content type regex - * @property {string} DOCUMENT - The regex to match document content types - * @property {string} IMAGE - The regex to match image content types - */ -var ContentTypeRegexStr; -(function (ContentTypeRegexStr) { - ContentTypeRegexStr["DOCUMENT"] = "^(text\\/(html|xml))|(application\\/(xml|xhtml\\+xml))$"; - ContentTypeRegexStr["IMAGE"] = "^image\\/.+"; -})(ContentTypeRegexStr || (ContentTypeRegexStr = {})); -/** - * @class - * Class for GraphResponseHandler - */ -var GraphResponseHandler = /** @class */ (function () { - function GraphResponseHandler() { - } - /** - * @private - * @static - * To parse Document response - * @param {Response} rawResponse - The response object - * @param {DocumentType} type - The type to which the document needs to be parsed - * @returns A promise that resolves to a document content - */ - GraphResponseHandler.parseDocumentResponse = function (rawResponse, type) { - if (typeof DOMParser !== "undefined") { - return new Promise(function (resolve, reject) { - rawResponse.text().then(function (xmlString) { - try { - var parser = new DOMParser(); - var xmlDoc = parser.parseFromString(xmlString, type); - resolve(xmlDoc); - } - catch (error) { - reject(error); - } - }); - }); - } - else { - return Promise.resolve(rawResponse.body); - } - }; - /** - * @private - * @static - * @async - * To convert the native Response to response content - * @param {Response} rawResponse - The response object - * @param {ResponseType} [responseType] - The response type value - * @returns A promise that resolves to the converted response content - */ - GraphResponseHandler.convertResponse = function (rawResponse, responseType) { - return tslib_1.__awaiter(this, void 0, void 0, function () { - var responseValue, contentType, _a, mimeType; - return tslib_1.__generator(this, function (_b) { - switch (_b.label) { - case 0: - if (rawResponse.status === 204) { - // NO CONTENT - return [2 /*return*/, Promise.resolve()]; - } - contentType = rawResponse.headers.get("Content-type"); - _a = responseType; - switch (_a) { - case ResponseType_1.ResponseType.ARRAYBUFFER: return [3 /*break*/, 1]; - case ResponseType_1.ResponseType.BLOB: return [3 /*break*/, 3]; - case ResponseType_1.ResponseType.DOCUMENT: return [3 /*break*/, 5]; - case ResponseType_1.ResponseType.JSON: return [3 /*break*/, 7]; - case ResponseType_1.ResponseType.STREAM: return [3 /*break*/, 9]; - case ResponseType_1.ResponseType.TEXT: return [3 /*break*/, 11]; - } - return [3 /*break*/, 13]; - case 1: return [4 /*yield*/, rawResponse.arrayBuffer()]; - case 2: - responseValue = _b.sent(); - return [3 /*break*/, 24]; - case 3: return [4 /*yield*/, rawResponse.blob()]; - case 4: - responseValue = _b.sent(); - return [3 /*break*/, 24]; - case 5: return [4 /*yield*/, GraphResponseHandler.parseDocumentResponse(rawResponse, DocumentType.TEXT_XML)]; - case 6: - responseValue = _b.sent(); - return [3 /*break*/, 24]; - case 7: return [4 /*yield*/, rawResponse.json()]; - case 8: - responseValue = _b.sent(); - return [3 /*break*/, 24]; - case 9: return [4 /*yield*/, Promise.resolve(rawResponse.body)]; - case 10: - responseValue = _b.sent(); - return [3 /*break*/, 24]; - case 11: return [4 /*yield*/, rawResponse.text()]; - case 12: - responseValue = _b.sent(); - return [3 /*break*/, 24]; - case 13: - if (!(contentType !== null)) return [3 /*break*/, 22]; - mimeType = contentType.split(";")[0]; - if (!new RegExp(ContentTypeRegexStr.DOCUMENT).test(mimeType)) return [3 /*break*/, 15]; - return [4 /*yield*/, GraphResponseHandler.parseDocumentResponse(rawResponse, mimeType)]; - case 14: - responseValue = _b.sent(); - return [3 /*break*/, 21]; - case 15: - if (!new RegExp(ContentTypeRegexStr.IMAGE).test(mimeType)) return [3 /*break*/, 16]; - responseValue = rawResponse.blob(); - return [3 /*break*/, 21]; - case 16: - if (!(mimeType === ContentType.TEXT_PLAIN)) return [3 /*break*/, 18]; - return [4 /*yield*/, rawResponse.text()]; - case 17: - responseValue = _b.sent(); - return [3 /*break*/, 21]; - case 18: - if (!(mimeType === ContentType.APPLICATION_JSON)) return [3 /*break*/, 20]; - return [4 /*yield*/, rawResponse.json()]; - case 19: - responseValue = _b.sent(); - return [3 /*break*/, 21]; - case 20: - responseValue = Promise.resolve(rawResponse.body); - _b.label = 21; - case 21: return [3 /*break*/, 23]; - case 22: - /** - * RFC specification {@link https://tools.ietf.org/html/rfc7231#section-3.1.1.5} says: - * A sender that generates a message containing a payload body SHOULD - * generate a Content-Type header field in that message unless the - * intended media type of the enclosed representation is unknown to the - * sender. If a Content-Type header field is not present, the recipient - * MAY either assume a media type of "application/octet-stream" - * ([RFC2046], Section 4.5.1) or examine the data to determine its type. - * - * So assuming it as a stream type so returning the body. - */ - responseValue = Promise.resolve(rawResponse.body); - _b.label = 23; - case 23: return [3 /*break*/, 24]; - case 24: return [2 /*return*/, responseValue]; - } - }); - }); - }; - /** - * @public - * @static - * @async - * To get the parsed response - * @param {Response} rawResponse - The response object - * @param {ResponseType} [responseType] - The response type value - * @param {GraphRequestCallback} [callback] - The graph request callback function - * @returns The parsed response - */ - GraphResponseHandler.getResponse = function (rawResponse, responseType, callback) { - return tslib_1.__awaiter(this, void 0, void 0, function () { - var response; - return tslib_1.__generator(this, function (_a) { - switch (_a.label) { - case 0: - if (!(responseType === ResponseType_1.ResponseType.RAW)) return [3 /*break*/, 1]; - return [2 /*return*/, Promise.resolve(rawResponse)]; - case 1: return [4 /*yield*/, GraphResponseHandler.convertResponse(rawResponse, responseType)]; - case 2: - response = _a.sent(); - if (rawResponse.ok) { - // Status Code 2XX - if (typeof callback === "function") { - callback(null, response); - } - else { - return [2 /*return*/, response]; - } - } - else { - // NOT OK Response - throw response; - } - _a.label = 3; - case 3: return [2 /*return*/]; - } - }); - }); - }; - return GraphResponseHandler; -}()); -exports.GraphResponseHandler = GraphResponseHandler; -//# sourceMappingURL=GraphResponseHandler.js.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/GraphResponseHandler.js.map b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/GraphResponseHandler.js.map deleted file mode 100644 index 1f081f0..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/GraphResponseHandler.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"GraphResponseHandler.js","sourceRoot":"","sources":["../../src/GraphResponseHandler.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;AAQH,+CAA8C;AAE9C;;;;;;;GAOG;AACH,IAAY,YAKX;AALD,WAAY,YAAY;IACvB,uCAAuB,CAAA;IACvB,qCAAqB,CAAA;IACrB,mDAAmC,CAAA;IACnC,2DAA2C,CAAA;AAC5C,CAAC,EALW,YAAY,4BAAZ,YAAY,QAKvB;AAED;;;;;GAKG;AAEH,IAAK,WAGJ;AAHD,WAAK,WAAW;IACf,wCAAyB,CAAA;IACzB,oDAAqC,CAAA;AACtC,CAAC,EAHI,WAAW,KAAX,WAAW,QAGf;AAED;;;;;GAKG;AACH,IAAK,mBAGJ;AAHD,WAAK,mBAAmB;IACvB,2FAAoE,CAAA;IACpE,4CAAqB,CAAA;AACtB,CAAC,EAHI,mBAAmB,KAAnB,mBAAmB,QAGvB;AAED;;;GAGG;AAEH;IAAA;IA2HA,CAAC;IA1HA;;;;;;;OAOG;IACY,0CAAqB,GAApC,UAAqC,WAAqB,EAAE,IAAkB;QAC7E,IAAI,OAAO,SAAS,KAAK,WAAW,EAAE;YACrC,OAAO,IAAI,OAAO,CAA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aAAa,GAAG,SAAwB,CAAC;;;wBAEzC,aAAa,GAAG,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;;;;wBAGnD;;;;;;;;;;2BAUG;wBACH,aAAa,GAAG,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;;6BAEnD,yBAAM;6BAER,sBAAO,aAAa,EAAC;;;;KACrB;IAED;;;;;;;;;OASG;IACiB,gCAAW,GAA/B,UAAgC,WAAqB,EAAE,YAA2B,EAAE,QAA+B;;;;;;6BAC9G,CAAA,YAAY,KAAK,2BAAY,CAAC,GAAG,CAAA,EAAjC,wBAAiC;wBACpC,sBAAO,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC,EAAC;4BAEnB,qBAAM,oBAAoB,CAAC,eAAe,CAAC,WAAW,EAAE,YAAY,CAAC,EAAA;;wBAAhF,QAAQ,GAAG,SAAqE;wBACtF,IAAI,WAAW,CAAC,EAAE,EAAE;4BACnB,kBAAkB;4BAClB,IAAI,OAAO,QAAQ,KAAK,UAAU,EAAE;gCACnC,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;6BACzB;iCAAM;gCACN,sBAAO,QAAQ,EAAC;6BAChB;yBACD;6BAAM;4BACN,kBAAkB;4BAClB,MAAM,QAAQ,CAAC;yBACf;;;;;;KAEF;IACF,2BAAC;AAAD,CAAC,AA3HD,IA2HC;AA3HY,oDAAoB"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/HTTPClient.d.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/HTTPClient.d.ts deleted file mode 100644 index 6b37b24..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/HTTPClient.d.ts +++ /dev/null @@ -1,54 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -/** - * @module HTTPClient - */ -import { Context } from "./IContext"; -import { Middleware } from "./middleware/IMiddleware"; -/** - * @class - * Class representing HTTPClient - */ -export declare class HTTPClient { - /** - * @private - * A member holding first middleware of the middleware chain - */ - private middleware; - /** - * @public - * @constructor - * Creates an instance of a HTTPClient - * @param {...Middleware} middleware - The first middleware of the middleware chain or a sequence of all the Middleware handlers - */ - constructor(...middleware: Middleware[]); - /** - * @private - * Processes the middleware parameter passed to set this.middleware property - * The calling function should validate if middleware is not undefined or not empty. - * @param {...Middleware} middleware - The middleware passed - * @returns Nothing - */ - private setMiddleware; - /** - * @private - * Processes the middleware array to construct the chain - * and sets this.middleware property to the first middleware handler of the array - * The calling function should validate if middleware is not undefined or not empty - * @param {Middleware[]} middlewareArray - The array of middleware handlers - * @returns Nothing - */ - private parseMiddleWareArray; - /** - * @public - * @async - * To send the request through the middleware chain - * @param {Context} context - The context of a request - * @returns A promise that resolves to the Context - */ - sendRequest(context: Context): Promise; -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/HTTPClient.js b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/HTTPClient.js deleted file mode 100644 index cfa5e38..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/HTTPClient.js +++ /dev/null @@ -1,100 +0,0 @@ -"use strict"; -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.HTTPClient = void 0; -var tslib_1 = require("tslib"); -/** - * @class - * Class representing HTTPClient - */ -var HTTPClient = /** @class */ (function () { - /** - * @public - * @constructor - * Creates an instance of a HTTPClient - * @param {...Middleware} middleware - The first middleware of the middleware chain or a sequence of all the Middleware handlers - */ - function HTTPClient() { - var middleware = []; - for (var _i = 0; _i < arguments.length; _i++) { - middleware[_i] = arguments[_i]; - } - if (!middleware || !middleware.length) { - var error = new Error(); - error.name = "InvalidMiddlewareChain"; - error.message = "Please provide a default middleware chain or custom middleware chain"; - throw error; - } - this.setMiddleware.apply(this, middleware); - } - /** - * @private - * Processes the middleware parameter passed to set this.middleware property - * The calling function should validate if middleware is not undefined or not empty. - * @param {...Middleware} middleware - The middleware passed - * @returns Nothing - */ - HTTPClient.prototype.setMiddleware = function () { - var middleware = []; - for (var _i = 0; _i < arguments.length; _i++) { - middleware[_i] = arguments[_i]; - } - if (middleware.length > 1) { - this.parseMiddleWareArray(middleware); - } - else { - this.middleware = middleware[0]; - } - }; - /** - * @private - * Processes the middleware array to construct the chain - * and sets this.middleware property to the first middleware handler of the array - * The calling function should validate if middleware is not undefined or not empty - * @param {Middleware[]} middlewareArray - The array of middleware handlers - * @returns Nothing - */ - HTTPClient.prototype.parseMiddleWareArray = function (middlewareArray) { - middlewareArray.forEach(function (element, index) { - if (index < middlewareArray.length - 1) { - element.setNext(middlewareArray[index + 1]); - } - }); - this.middleware = middlewareArray[0]; - }; - /** - * @public - * @async - * To send the request through the middleware chain - * @param {Context} context - The context of a request - * @returns A promise that resolves to the Context - */ - HTTPClient.prototype.sendRequest = function (context) { - return tslib_1.__awaiter(this, void 0, void 0, function () { - var error; - return tslib_1.__generator(this, function (_a) { - switch (_a.label) { - case 0: - if (typeof context.request === "string" && context.options === undefined) { - error = new Error(); - error.name = "InvalidRequestOptions"; - error.message = "Unable to execute the middleware, Please provide valid options for a request"; - throw error; - } - return [4 /*yield*/, this.middleware.execute(context)]; - case 1: - _a.sent(); - return [2 /*return*/, context]; - } - }); - }); - }; - return HTTPClient; -}()); -exports.HTTPClient = HTTPClient; -//# sourceMappingURL=HTTPClient.js.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/HTTPClient.js.map b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/HTTPClient.js.map deleted file mode 100644 index df971a6..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/HTTPClient.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"HTTPClient.js","sourceRoot":"","sources":["../../src/HTTPClient.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;AASH;;;GAGG;AACH;IAOC;;;;;OAKG;IACH;QAAmB,oBAA2B;aAA3B,UAA2B,EAA3B,qBAA2B,EAA3B,IAA2B;YAA3B,+BAA2B;;QAC7C,IAAI,CAAC,UAAU,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE;YACtC,IAAM,KAAK,GAAG,IAAI,KAAK,EAAE,CAAC;YAC1B,KAAK,CAAC,IAAI,GAAG,wBAAwB,CAAC;YACtC,KAAK,CAAC,OAAO,GAAG,sEAAsE,CAAC;YACvF,MAAM,KAAK,CAAC;SACZ;QACD,IAAI,CAAC,aAAa,OAAlB,IAAI,EAAkB,UAAU,EAAE;IACnC,CAAC;IAED;;;;;;OAMG;IACK,kCAAa,GAArB;QAAsB,oBAA2B;aAA3B,UAA2B,EAA3B,qBAA2B,EAA3B,IAA2B;YAA3B,+BAA2B;;QAChD,IAAI,UAAU,CAAC,MAAM,GAAG,CAAC,EAAE;YAC1B,IAAI,CAAC,oBAAoB,CAAC,UAAU,CAAC,CAAC;SACtC;aAAM;YACN,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC;SAChC;IACF,CAAC;IAED;;;;;;;OAOG;IACK,yCAAoB,GAA5B,UAA6B,eAA6B;QACzD,eAAe,CAAC,OAAO,CAAC,UAAC,OAAO,EAAE,KAAK;YACtC,IAAI,KAAK,GAAG,eAAe,CAAC,MAAM,GAAG,CAAC,EAAE;gBACvC,OAAO,CAAC,OAAO,CAAC,eAAe,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC;aAC5C;QACF,CAAC,CAAC,CAAC;QACH,IAAI,CAAC,UAAU,GAAG,eAAe,CAAC,CAAC,CAAC,CAAC;IACtC,CAAC;IAED;;;;;;OAMG;IACU,gCAAW,GAAxB,UAAyB,OAAgB;;;;;;wBACxC,IAAI,OAAO,OAAO,CAAC,OAAO,KAAK,QAAQ,IAAI,OAAO,CAAC,OAAO,KAAK,SAAS,EAAE;4BACnE,KAAK,GAAG,IAAI,KAAK,EAAE,CAAC;4BAC1B,KAAK,CAAC,IAAI,GAAG,uBAAuB,CAAC;4BACrC,KAAK,CAAC,OAAO,GAAG,8EAA8E,CAAC;4BAC/F,MAAM,KAAK,CAAC;yBACZ;wBACD,qBAAM,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,OAAO,CAAC,EAAA;;wBAAtC,SAAsC,CAAC;wBACvC,sBAAO,OAAO,EAAC;;;;KACf;IACF,iBAAC;AAAD,CAAC,AAxED,IAwEC;AAxEY,gCAAU"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/HTTPClientFactory.d.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/HTTPClientFactory.d.ts deleted file mode 100644 index 53cc7bc..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/HTTPClientFactory.d.ts +++ /dev/null @@ -1,40 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -/** - * @module HTTPClientFactory - */ -import { HTTPClient } from "./HTTPClient"; -import { AuthenticationProvider } from "./IAuthenticationProvider"; -import { Middleware } from "./middleware/IMiddleware"; -/** - * @class - * Class representing HTTPClientFactory - */ -export declare class HTTPClientFactory { - /** - * @public - * @static - * Creates HTTPClient with default middleware chain - * @param {AuthenticationProvider} authProvider - The authentication provider instance - * @returns A HTTPClient instance - * - * NOTE: These are the things that we need to remember while doing modifications in the below default pipeline. - * * HTTPMessageHandler should be the last one in the middleware pipeline, because this makes the actual network call of the request - * * TelemetryHandler should be the one prior to the last middleware in the chain, because this is the one which actually collects and appends the usage flag and placing this handler * before making the actual network call ensures that the usage of all features are recorded in the flag. - * * The best place for AuthenticationHandler is in the starting of the pipeline, because every other handler might have to work for multiple times for a request but the auth token for - * them will remain same. For example, Retry and Redirect handlers might be working multiple times for a request based on the response but their auth token would remain same. - */ - static createWithAuthenticationProvider(authProvider: AuthenticationProvider): HTTPClient; - /** - * @public - * @static - * Creates a middleware chain with the given one - * @property {...Middleware} middleware - The first middleware of the middleware chain or a sequence of all the Middleware handlers - * @returns A HTTPClient instance - */ - static createWithMiddleware(...middleware: Middleware[]): HTTPClient; -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/HTTPClientFactory.js b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/HTTPClientFactory.js deleted file mode 100644 index 74b75d9..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/HTTPClientFactory.js +++ /dev/null @@ -1,85 +0,0 @@ -"use strict"; -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.HTTPClientFactory = void 0; -var tslib_1 = require("tslib"); -/** - * @module HTTPClientFactory - */ -var HTTPClient_1 = require("./HTTPClient"); -var AuthenticationHandler_1 = require("./middleware/AuthenticationHandler"); -var HTTPMessageHandler_1 = require("./middleware/HTTPMessageHandler"); -var RedirectHandlerOptions_1 = require("./middleware/options/RedirectHandlerOptions"); -var RetryHandlerOptions_1 = require("./middleware/options/RetryHandlerOptions"); -var RedirectHandler_1 = require("./middleware/RedirectHandler"); -var RetryHandler_1 = require("./middleware/RetryHandler"); -var TelemetryHandler_1 = require("./middleware/TelemetryHandler"); -/** - * @private - * To check whether the environment is node or not - * @returns A boolean representing the environment is node or not - */ -var isNodeEnvironment = function () { - return typeof process === "object" && typeof require === "function"; -}; -/** - * @class - * Class representing HTTPClientFactory - */ -var HTTPClientFactory = /** @class */ (function () { - function HTTPClientFactory() { - } - /** - * @public - * @static - * Creates HTTPClient with default middleware chain - * @param {AuthenticationProvider} authProvider - The authentication provider instance - * @returns A HTTPClient instance - * - * NOTE: These are the things that we need to remember while doing modifications in the below default pipeline. - * * HTTPMessageHandler should be the last one in the middleware pipeline, because this makes the actual network call of the request - * * TelemetryHandler should be the one prior to the last middleware in the chain, because this is the one which actually collects and appends the usage flag and placing this handler * before making the actual network call ensures that the usage of all features are recorded in the flag. - * * The best place for AuthenticationHandler is in the starting of the pipeline, because every other handler might have to work for multiple times for a request but the auth token for - * them will remain same. For example, Retry and Redirect handlers might be working multiple times for a request based on the response but their auth token would remain same. - */ - HTTPClientFactory.createWithAuthenticationProvider = function (authProvider) { - var authenticationHandler = new AuthenticationHandler_1.AuthenticationHandler(authProvider); - var retryHandler = new RetryHandler_1.RetryHandler(new RetryHandlerOptions_1.RetryHandlerOptions()); - var telemetryHandler = new TelemetryHandler_1.TelemetryHandler(); - var httpMessageHandler = new HTTPMessageHandler_1.HTTPMessageHandler(); - authenticationHandler.setNext(retryHandler); - if (isNodeEnvironment()) { - var redirectHandler = new RedirectHandler_1.RedirectHandler(new RedirectHandlerOptions_1.RedirectHandlerOptions()); - retryHandler.setNext(redirectHandler); - redirectHandler.setNext(telemetryHandler); - } - else { - retryHandler.setNext(telemetryHandler); - } - telemetryHandler.setNext(httpMessageHandler); - return HTTPClientFactory.createWithMiddleware(authenticationHandler); - }; - /** - * @public - * @static - * Creates a middleware chain with the given one - * @property {...Middleware} middleware - The first middleware of the middleware chain or a sequence of all the Middleware handlers - * @returns A HTTPClient instance - */ - HTTPClientFactory.createWithMiddleware = function () { - var middleware = []; - for (var _i = 0; _i < arguments.length; _i++) { - middleware[_i] = arguments[_i]; - } - // Middleware should not empty or undefined. This is check is present in the HTTPClient constructor. - return new (HTTPClient_1.HTTPClient.bind.apply(HTTPClient_1.HTTPClient, tslib_1.__spreadArray([void 0], middleware, false)))(); - }; - return HTTPClientFactory; -}()); -exports.HTTPClientFactory = HTTPClientFactory; -//# sourceMappingURL=HTTPClientFactory.js.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/HTTPClientFactory.js.map b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/HTTPClientFactory.js.map deleted file mode 100644 index 7373214..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/HTTPClientFactory.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"HTTPClientFactory.js","sourceRoot":"","sources":["../../src/HTTPClientFactory.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;AAEH;;GAEG;AAEH,2CAA0C;AAE1C,4EAA2E;AAC3E,sEAAqE;AAErE,sFAAqF;AACrF,gFAA+E;AAC/E,gEAA+D;AAC/D,0DAAyD;AACzD,kEAAiE;AAEjE;;;;GAIG;AACH,IAAM,iBAAiB,GAAG;IACzB,OAAO,OAAO,OAAO,KAAK,QAAQ,IAAI,OAAO,OAAO,KAAK,UAAU,CAAC;AACrE,CAAC,CAAC;AAEF;;;GAGG;AACH;IAAA;IA2CA,CAAC;IA1CA;;;;;;;;;;;;OAYG;IACW,kDAAgC,GAA9C,UAA+C,YAAoC;QAClF,IAAM,qBAAqB,GAAG,IAAI,6CAAqB,CAAC,YAAY,CAAC,CAAC;QACtE,IAAM,YAAY,GAAG,IAAI,2BAAY,CAAC,IAAI,yCAAmB,EAAE,CAAC,CAAC;QACjE,IAAM,gBAAgB,GAAG,IAAI,mCAAgB,EAAE,CAAC;QAChD,IAAM,kBAAkB,GAAG,IAAI,uCAAkB,EAAE,CAAC;QAEpD,qBAAqB,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;QAC5C,IAAI,iBAAiB,EAAE,EAAE;YACxB,IAAM,eAAe,GAAG,IAAI,iCAAe,CAAC,IAAI,+CAAsB,EAAE,CAAC,CAAC;YAC1E,YAAY,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC;YACtC,eAAe,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC;SAC1C;aAAM;YACN,YAAY,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC;SACvC;QACD,gBAAgB,CAAC,OAAO,CAAC,kBAAkB,CAAC,CAAC;QAC7C,OAAO,iBAAiB,CAAC,oBAAoB,CAAC,qBAAqB,CAAC,CAAC;IACtE,CAAC;IAED;;;;;;OAMG;IACW,sCAAoB,GAAlC;QAAmC,oBAA2B;aAA3B,UAA2B,EAA3B,qBAA2B,EAA3B,IAA2B;YAA3B,+BAA2B;;QAC7D,oGAAoG;QACpG,YAAW,uBAAU,YAAV,uBAAU,kCAAI,UAAU,aAAE;IACtC,CAAC;IACF,wBAAC;AAAD,CAAC,AA3CD,IA2CC;AA3CY,8CAAiB"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/IAuthProvider.d.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/IAuthProvider.d.ts deleted file mode 100644 index 749d1ef..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/IAuthProvider.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -import { AuthProviderCallback } from "./IAuthProviderCallback"; -/** - * @interface - * Signature that holds authProvider - * @callback - The anonymous callback function which takes a single param - */ -export type AuthProvider = (done: AuthProviderCallback) => void; diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/IAuthProvider.js b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/IAuthProvider.js deleted file mode 100644 index 7126de6..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/IAuthProvider.js +++ /dev/null @@ -1,9 +0,0 @@ -"use strict"; -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=IAuthProvider.js.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/IAuthProvider.js.map b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/IAuthProvider.js.map deleted file mode 100644 index 5332d07..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/IAuthProvider.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"IAuthProvider.js","sourceRoot":"","sources":["../../src/IAuthProvider.ts"],"names":[],"mappings":";AAAA;;;;;GAKG"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/IAuthProviderCallback.d.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/IAuthProviderCallback.d.ts deleted file mode 100644 index 406a093..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/IAuthProviderCallback.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -/** - * @interface - * Signature that defines callback for an authentication provider - * @callback - The anonymous callback function which takes two params - */ -export type AuthProviderCallback = (error: any, accessToken: string | null) => void; diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/IAuthProviderCallback.js b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/IAuthProviderCallback.js deleted file mode 100644 index 75be655..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/IAuthProviderCallback.js +++ /dev/null @@ -1,9 +0,0 @@ -"use strict"; -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=IAuthProviderCallback.js.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/IAuthProviderCallback.js.map b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/IAuthProviderCallback.js.map deleted file mode 100644 index 8ff9e44..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/IAuthProviderCallback.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"IAuthProviderCallback.js","sourceRoot":"","sources":["../../src/IAuthProviderCallback.ts"],"names":[],"mappings":";AAAA;;;;;GAKG"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/IAuthenticationProvider.d.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/IAuthenticationProvider.d.ts deleted file mode 100644 index 10de952..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/IAuthenticationProvider.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -import { AuthenticationProviderOptions } from "./IAuthenticationProviderOptions"; -/** - * @interface - * A signature representing Authentication provider - * @property {Function} getAccessToken - The function to get the access token from the authentication provider - */ -export interface AuthenticationProvider { - /** - * To get access token from the authentication provider - * @param {AuthenticationProviderOptions} [authenticationProviderOptions] - The authentication provider options instance - * @returns A promise that resolves to an access token - */ - getAccessToken: (authenticationProviderOptions?: AuthenticationProviderOptions) => Promise; -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/IAuthenticationProvider.js b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/IAuthenticationProvider.js deleted file mode 100644 index 9020b61..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/IAuthenticationProvider.js +++ /dev/null @@ -1,9 +0,0 @@ -"use strict"; -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=IAuthenticationProvider.js.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/IAuthenticationProvider.js.map b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/IAuthenticationProvider.js.map deleted file mode 100644 index ca50c67..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/IAuthenticationProvider.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"IAuthenticationProvider.js","sourceRoot":"","sources":["../../src/IAuthenticationProvider.ts"],"names":[],"mappings":";AAAA;;;;;GAKG"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/IAuthenticationProviderOptions.d.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/IAuthenticationProviderOptions.d.ts deleted file mode 100644 index 5cbc7ee..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/IAuthenticationProviderOptions.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -/** - * @interface - * A signature represents the Authentication provider options - * @property {string[]} [scopes] - The array of scopes - */ -export interface AuthenticationProviderOptions { - scopes?: string[]; -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/IAuthenticationProviderOptions.js b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/IAuthenticationProviderOptions.js deleted file mode 100644 index c778e9b..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/IAuthenticationProviderOptions.js +++ /dev/null @@ -1,9 +0,0 @@ -"use strict"; -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=IAuthenticationProviderOptions.js.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/IAuthenticationProviderOptions.js.map b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/IAuthenticationProviderOptions.js.map deleted file mode 100644 index 06534b5..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/IAuthenticationProviderOptions.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"IAuthenticationProviderOptions.js","sourceRoot":"","sources":["../../src/IAuthenticationProviderOptions.ts"],"names":[],"mappings":";AAAA;;;;;GAKG"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/IClientOptions.d.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/IClientOptions.d.ts deleted file mode 100644 index bad9a1a..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/IClientOptions.d.ts +++ /dev/null @@ -1,32 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -import { AuthenticationProvider } from "./IAuthenticationProvider"; -import { FetchOptions } from "./IFetchOptions"; -import { Middleware } from "./middleware/IMiddleware"; -/** - * @interface - * Options for initializing the Graph Client - * @property {Function} [authProvider] - The authentication provider instance - * @property {string} [baseUrl] - Base url that needs to be appended to every request - * @property {boolean} [debugLogging] - The boolean to enable/disable debug logging - * @property {string} [defaultVersion] - The default version that needs to be used while making graph api request - * @property {FetchOptions} [fetchOptions] - The options for fetch request - * @property {Middleware| Middleware[]} [middleware] - The first middleware of the middleware chain or an array of the Middleware handlers - * @property {Set}[customHosts] - A set of custom host names. Should contain hostnames only. - */ -export interface ClientOptions { - authProvider?: AuthenticationProvider; - baseUrl?: string; - debugLogging?: boolean; - defaultVersion?: string; - fetchOptions?: FetchOptions; - middleware?: Middleware | Middleware[]; - /** - * Example - If URL is "https://test_host/v1.0", then set property "customHosts" as "customHosts: Set(["test_host"])" - */ - customHosts?: Set; -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/IClientOptions.js b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/IClientOptions.js deleted file mode 100644 index 6bb3124..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/IClientOptions.js +++ /dev/null @@ -1,9 +0,0 @@ -"use strict"; -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=IClientOptions.js.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/IClientOptions.js.map b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/IClientOptions.js.map deleted file mode 100644 index 17aee41..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/IClientOptions.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"IClientOptions.js","sourceRoot":"","sources":["../../src/IClientOptions.ts"],"names":[],"mappings":";AAAA;;;;;GAKG"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/IContext.d.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/IContext.d.ts deleted file mode 100644 index 9cf1832..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/IContext.d.ts +++ /dev/null @@ -1,27 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -import { FetchOptions } from "./IFetchOptions"; -import { MiddlewareControl } from "./middleware/MiddlewareControl"; -/** - * @interface - * @property {RequestInfo} request - The request url string or the Request instance - * @property {FetchOptions} [options] - The options for the request - * @property {Response} [response] - The response content - * @property {MiddlewareControl} [middlewareControl] - The options for the middleware chain - * @property {Set}[customHosts] - A set of custom host names. Should contain hostnames only. - * - */ -export interface Context { - request: RequestInfo; - options?: FetchOptions; - response?: Response; - middlewareControl?: MiddlewareControl; - /** - * Example - If URL is "https://test_host", then set property "customHosts" as "customHosts: Set(["test_host"])" - */ - customHosts?: Set; -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/IContext.js b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/IContext.js deleted file mode 100644 index a4233ca..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/IContext.js +++ /dev/null @@ -1,9 +0,0 @@ -"use strict"; -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=IContext.js.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/IContext.js.map b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/IContext.js.map deleted file mode 100644 index f825880..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/IContext.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"IContext.js","sourceRoot":"","sources":["../../src/IContext.ts"],"names":[],"mappings":";AAAA;;;;;GAKG"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/IFetchOptions.d.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/IFetchOptions.d.ts deleted file mode 100644 index 750d52d..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/IFetchOptions.d.ts +++ /dev/null @@ -1,32 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -/** - * @interface {@link https://github.com/bitinn/node-fetch/#options} - * Signature to define the fetch request options for node environment - * @property {number} [follow] - node-fetch option: maximum redirect count. 0 to not follow redirect - * @property {number} [compress] - node-fetch option: support gzip/deflate content encoding. false to disable - * @property {number} [size] - node-fetch option: maximum response body size in bytes. 0 to disable - * @property {any} [agent] - node-fetch option: HTTP(S).Agent instance, allows custom proxy, certificate, lookup, family etc. - * @property {number} [highWaterMark] - node-fetch option: maximum number of bytes to store in the internal buffer before ceasing to read from the underlying resource. - * @property {boolean} [insecureHTTPParser] - node-fetch option: use an insecure HTTP parser that accepts invalid HTTP headers when `true`. - */ -export interface NodeFetchInit { - follow?: number; - compress?: boolean; - size?: number; - agent?: any; - highWaterMark?: number; - insecureHTTPParser?: boolean; -} -/** - * @interface - * Signature to define the fetch api options which includes both fetch standard options and also the extended node fetch options - * @extends RequestInit @see {@link https://fetch.spec.whatwg.org/#requestinit} - * @extends NodeFetchInit - */ -export interface FetchOptions extends RequestInit, NodeFetchInit { -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/IFetchOptions.js b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/IFetchOptions.js deleted file mode 100644 index bf4c7d1..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/IFetchOptions.js +++ /dev/null @@ -1,9 +0,0 @@ -"use strict"; -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=IFetchOptions.js.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/IFetchOptions.js.map b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/IFetchOptions.js.map deleted file mode 100644 index 97d8a74..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/IFetchOptions.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"IFetchOptions.js","sourceRoot":"","sources":["../../src/IFetchOptions.ts"],"names":[],"mappings":";AAAA;;;;;GAKG"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/IGraphRequestCallback.d.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/IGraphRequestCallback.d.ts deleted file mode 100644 index 0c3f4ba..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/IGraphRequestCallback.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -import { GraphError } from "./GraphError"; -/** - * @interface - * Signature to define the GraphRequest callback - * @callback - The anonymous callback function - */ -export type GraphRequestCallback = (error: GraphError, response: any, rawResponse?: any) => void; diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/IGraphRequestCallback.js b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/IGraphRequestCallback.js deleted file mode 100644 index f44aa63..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/IGraphRequestCallback.js +++ /dev/null @@ -1,9 +0,0 @@ -"use strict"; -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=IGraphRequestCallback.js.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/IGraphRequestCallback.js.map b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/IGraphRequestCallback.js.map deleted file mode 100644 index c0fe9ef..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/IGraphRequestCallback.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"IGraphRequestCallback.js","sourceRoot":"","sources":["../../src/IGraphRequestCallback.ts"],"names":[],"mappings":";AAAA;;;;;GAKG"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/IOptions.d.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/IOptions.d.ts deleted file mode 100644 index 291789a..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/IOptions.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -import { AuthProvider } from "./IAuthProvider"; -import { FetchOptions } from "./IFetchOptions"; -/** - * @interface - * Options for initializing the Graph Client - * @property {AuthProvider} authProvider - The function to get the authentication token - * @property {string} [baseUrl] - Base url that needs to be appended to every request - * @property {boolean} [debugLogging] - The boolean to enable/disable debug logging - * @property {string} [defaultVersion] - The default version that needs to be used while making graph api request - * @property {FetchOptions} [fetchOptions] - The options for fetch request - * @property {Set}[customHosts] - A set of custom host names. Should contain hostnames only. - */ -export interface Options { - authProvider: AuthProvider; - baseUrl?: string; - debugLogging?: boolean; - defaultVersion?: string; - fetchOptions?: FetchOptions; - /** - * Example - If URL is "https://test_host/v1.0", then set property "customHosts" as "customHosts: Set(["test_host"])" - */ - customHosts?: Set; -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/IOptions.js b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/IOptions.js deleted file mode 100644 index af390ea..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/IOptions.js +++ /dev/null @@ -1,9 +0,0 @@ -"use strict"; -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=IOptions.js.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/IOptions.js.map b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/IOptions.js.map deleted file mode 100644 index 622a9fc..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/IOptions.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"IOptions.js","sourceRoot":"","sources":["../../src/IOptions.ts"],"names":[],"mappings":";AAAA;;;;;GAKG"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/RequestMethod.d.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/RequestMethod.d.ts deleted file mode 100644 index f4a368e..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/RequestMethod.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -/** - * @enum - * Enum for RequestMethods - * @property {string} GET - The get request type - * @property {string} PATCH - The patch request type - * @property {string} POST - The post request type - * @property {string} PUT - The put request type - * @property {string} DELETE - The delete request type - */ -export declare enum RequestMethod { - GET = "GET", - PATCH = "PATCH", - POST = "POST", - PUT = "PUT", - DELETE = "DELETE" -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/RequestMethod.js b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/RequestMethod.js deleted file mode 100644 index 2cf13b9..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/RequestMethod.js +++ /dev/null @@ -1,27 +0,0 @@ -"use strict"; -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.RequestMethod = void 0; -/** - * @enum - * Enum for RequestMethods - * @property {string} GET - The get request type - * @property {string} PATCH - The patch request type - * @property {string} POST - The post request type - * @property {string} PUT - The put request type - * @property {string} DELETE - The delete request type - */ -var RequestMethod; -(function (RequestMethod) { - RequestMethod["GET"] = "GET"; - RequestMethod["PATCH"] = "PATCH"; - RequestMethod["POST"] = "POST"; - RequestMethod["PUT"] = "PUT"; - RequestMethod["DELETE"] = "DELETE"; -})(RequestMethod || (exports.RequestMethod = RequestMethod = {})); -//# sourceMappingURL=RequestMethod.js.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/RequestMethod.js.map b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/RequestMethod.js.map deleted file mode 100644 index 5dc4da9..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/RequestMethod.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"RequestMethod.js","sourceRoot":"","sources":["../../src/RequestMethod.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH;;;;;;;;GAQG;AACH,IAAY,aAMX;AAND,WAAY,aAAa;IACxB,4BAAW,CAAA;IACX,gCAAe,CAAA;IACf,8BAAa,CAAA;IACb,4BAAW,CAAA;IACX,kCAAiB,CAAA;AAClB,CAAC,EANW,aAAa,6BAAb,aAAa,QAMxB"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/ResponseType.d.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/ResponseType.d.ts deleted file mode 100644 index cd135df..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/ResponseType.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -/** - * @enum - * Enum for ResponseType values - * @property {string} ARRAYBUFFER - To download response content as an [ArrayBuffer]{@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer} - * @property {string} BLOB - To download content as a [binary/blob] {@link https://developer.mozilla.org/en-US/docs/Web/API/Blob} - * @property {string} DOCUMENT - This downloads content as a document or stream - * @property {string} JSON - To download response content as a json - * @property {string} STREAM - To download response as a [stream]{@link https://nodejs.org/api/stream.html} - * @property {string} TEXT - For downloading response as a text - */ -export declare enum ResponseType { - ARRAYBUFFER = "arraybuffer", - BLOB = "blob", - DOCUMENT = "document", - JSON = "json", - RAW = "raw", - STREAM = "stream", - TEXT = "text" -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/ResponseType.js b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/ResponseType.js deleted file mode 100644 index 98c0b0b..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/ResponseType.js +++ /dev/null @@ -1,30 +0,0 @@ -"use strict"; -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ResponseType = void 0; -/** - * @enum - * Enum for ResponseType values - * @property {string} ARRAYBUFFER - To download response content as an [ArrayBuffer]{@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer} - * @property {string} BLOB - To download content as a [binary/blob] {@link https://developer.mozilla.org/en-US/docs/Web/API/Blob} - * @property {string} DOCUMENT - This downloads content as a document or stream - * @property {string} JSON - To download response content as a json - * @property {string} STREAM - To download response as a [stream]{@link https://nodejs.org/api/stream.html} - * @property {string} TEXT - For downloading response as a text - */ -var ResponseType; -(function (ResponseType) { - ResponseType["ARRAYBUFFER"] = "arraybuffer"; - ResponseType["BLOB"] = "blob"; - ResponseType["DOCUMENT"] = "document"; - ResponseType["JSON"] = "json"; - ResponseType["RAW"] = "raw"; - ResponseType["STREAM"] = "stream"; - ResponseType["TEXT"] = "text"; -})(ResponseType || (exports.ResponseType = ResponseType = {})); -//# sourceMappingURL=ResponseType.js.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/ResponseType.js.map b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/ResponseType.js.map deleted file mode 100644 index 25ae68b..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/ResponseType.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ResponseType.js","sourceRoot":"","sources":["../../src/ResponseType.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH;;;;;;;;;GASG;AAEH,IAAY,YAQX;AARD,WAAY,YAAY;IACvB,2CAA2B,CAAA;IAC3B,6BAAa,CAAA;IACb,qCAAqB,CAAA;IACrB,6BAAa,CAAA;IACb,2BAAW,CAAA;IACX,iCAAiB,CAAA;IACjB,6BAAa,CAAA;AACd,CAAC,EARW,YAAY,4BAAZ,YAAY,QAQvB"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/ValidatePolyFilling.d.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/ValidatePolyFilling.d.ts deleted file mode 100644 index cdeb15a..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/ValidatePolyFilling.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -/** - * @constant - * @function - * Validates availability of Promise and fetch in global context - * @returns The true in case the Promise and fetch available, otherwise throws error - */ -export declare const validatePolyFilling: () => boolean; diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/ValidatePolyFilling.js b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/ValidatePolyFilling.js deleted file mode 100644 index b9d4542..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/ValidatePolyFilling.js +++ /dev/null @@ -1,35 +0,0 @@ -"use strict"; -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.validatePolyFilling = void 0; -/** - * @constant - * @function - * Validates availability of Promise and fetch in global context - * @returns The true in case the Promise and fetch available, otherwise throws error - */ -var validatePolyFilling = function () { - if (typeof Promise === "undefined" && typeof fetch === "undefined") { - var error = new Error("Library cannot function without Promise and fetch. So, please provide polyfill for them."); - error.name = "PolyFillNotAvailable"; - throw error; - } - else if (typeof Promise === "undefined") { - var error = new Error("Library cannot function without Promise. So, please provide polyfill for it."); - error.name = "PolyFillNotAvailable"; - throw error; - } - else if (typeof fetch === "undefined") { - var error = new Error("Library cannot function without fetch. So, please provide polyfill for it."); - error.name = "PolyFillNotAvailable"; - throw error; - } - return true; -}; -exports.validatePolyFilling = validatePolyFilling; -//# sourceMappingURL=ValidatePolyFilling.js.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/ValidatePolyFilling.js.map b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/ValidatePolyFilling.js.map deleted file mode 100644 index efa21ce..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/ValidatePolyFilling.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ValidatePolyFilling.js","sourceRoot":"","sources":["../../src/ValidatePolyFilling.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH;;;;;GAKG;AAEI,IAAM,mBAAmB,GAAG;IAClC,IAAI,OAAO,OAAO,KAAK,WAAW,IAAI,OAAO,KAAK,KAAK,WAAW,EAAE;QACnE,IAAM,KAAK,GAAG,IAAI,KAAK,CAAC,0FAA0F,CAAC,CAAC;QACpH,KAAK,CAAC,IAAI,GAAG,sBAAsB,CAAC;QACpC,MAAM,KAAK,CAAC;KACZ;SAAM,IAAI,OAAO,OAAO,KAAK,WAAW,EAAE;QAC1C,IAAM,KAAK,GAAG,IAAI,KAAK,CAAC,8EAA8E,CAAC,CAAC;QACxG,KAAK,CAAC,IAAI,GAAG,sBAAsB,CAAC;QACpC,MAAM,KAAK,CAAC;KACZ;SAAM,IAAI,OAAO,KAAK,KAAK,WAAW,EAAE;QACxC,IAAM,KAAK,GAAG,IAAI,KAAK,CAAC,4EAA4E,CAAC,CAAC;QACtG,KAAK,CAAC,IAAI,GAAG,sBAAsB,CAAC;QACpC,MAAM,KAAK,CAAC;KACZ;IACD,OAAO,IAAI,CAAC;AACb,CAAC,CAAC;AAfW,QAAA,mBAAmB,uBAe9B"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/Version.d.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/Version.d.ts deleted file mode 100644 index d22e6f3..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/Version.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -/** - * @module Version - */ -export declare const PACKAGE_VERSION = "3.0.7"; diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/Version.js b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/Version.js deleted file mode 100644 index 3c9b6c7..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/Version.js +++ /dev/null @@ -1,16 +0,0 @@ -"use strict"; -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.PACKAGE_VERSION = void 0; -// THIS FILE IS AUTO GENERATED -// ANY CHANGES WILL BE LOST DURING BUILD -/** - * @module Version - */ -exports.PACKAGE_VERSION = "3.0.7"; -//# sourceMappingURL=Version.js.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/Version.js.map b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/Version.js.map deleted file mode 100644 index 2d142ef..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/Version.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Version.js","sourceRoot":"","sources":["../../src/Version.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,8BAA8B;AAC9B,wCAAwC;AAExC;;GAEG;AAEU,QAAA,eAAe,GAAG,OAAO,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/authentication/azureTokenCredentials/ITokenCredentialAuthenticationProviderOptions.d.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/authentication/azureTokenCredentials/ITokenCredentialAuthenticationProviderOptions.d.ts deleted file mode 100644 index 408e671..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/authentication/azureTokenCredentials/ITokenCredentialAuthenticationProviderOptions.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -import { GetTokenOptions } from "@azure/identity"; -import { AuthenticationProviderOptions } from "../../IAuthenticationProviderOptions"; -/** - * @interface - * A signature represents the Authentication provider options for Token Credentials - * @property {getTokenOptions} [GetTokenOptions] - Defines options for TokenCredential.getToken. - */ -export interface TokenCredentialAuthenticationProviderOptions extends AuthenticationProviderOptions { - getTokenOptions?: GetTokenOptions; -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/authentication/azureTokenCredentials/ITokenCredentialAuthenticationProviderOptions.js b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/authentication/azureTokenCredentials/ITokenCredentialAuthenticationProviderOptions.js deleted file mode 100644 index c0df7fd..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/authentication/azureTokenCredentials/ITokenCredentialAuthenticationProviderOptions.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=ITokenCredentialAuthenticationProviderOptions.js.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/authentication/azureTokenCredentials/ITokenCredentialAuthenticationProviderOptions.js.map b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/authentication/azureTokenCredentials/ITokenCredentialAuthenticationProviderOptions.js.map deleted file mode 100644 index 062e23e..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/authentication/azureTokenCredentials/ITokenCredentialAuthenticationProviderOptions.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ITokenCredentialAuthenticationProviderOptions.js","sourceRoot":"","sources":["../../../../src/authentication/azureTokenCredentials/ITokenCredentialAuthenticationProviderOptions.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/authentication/azureTokenCredentials/TokenCredentialAuthenticationProvider.d.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/authentication/azureTokenCredentials/TokenCredentialAuthenticationProvider.d.ts deleted file mode 100644 index 1439e1b..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/authentication/azureTokenCredentials/TokenCredentialAuthenticationProvider.d.ts +++ /dev/null @@ -1,48 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -import { TokenCredential } from "@azure/identity"; -import { AuthenticationProvider } from "../../IAuthenticationProvider"; -import { TokenCredentialAuthenticationProviderOptions } from "./ITokenCredentialAuthenticationProviderOptions"; -/** - * @module TokenCredentialAuthenticationProvider - */ -/** - * @class - * Class representing TokenCredentialAuthenticationProvider - * This feature is introduced in Version 3.0.0 - * @extends AuthenticationProvider - * Reference - https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/identity/identity/README.md - */ -export declare class TokenCredentialAuthenticationProvider implements AuthenticationProvider { - /** - * @private - * A member holding an instance of @azure/identity TokenCredential - */ - private tokenCredential; - /** - * @private - * A member holding an instance of TokenCredentialAuthenticationProviderOptions - */ - private authenticationProviderOptions; - /** - * @public - * @constructor - * Creates an instance of TokenCredentialAuthenticationProvider - * @param {TokenCredential} tokenCredential - An instance of @azure/identity TokenCredential - * @param {TokenCredentialAuthenticationProviderOptions} authenticationProviderOptions - An instance of TokenCredentialAuthenticationProviderOptions - * @returns An instance of TokenCredentialAuthenticationProvider - */ - constructor(tokenCredential: TokenCredential, authenticationProviderOptions: TokenCredentialAuthenticationProviderOptions); - /** - * @public - * @async - * To get the access token - * @param {TokenCredentialAuthenticationProviderOptions} authenticationProviderOptions - The authentication provider options object - * @returns The promise that resolves to an access token - */ - getAccessToken(): Promise; -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/authentication/azureTokenCredentials/TokenCredentialAuthenticationProvider.js b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/authentication/azureTokenCredentials/TokenCredentialAuthenticationProvider.js deleted file mode 100644 index 9833507..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/authentication/azureTokenCredentials/TokenCredentialAuthenticationProvider.js +++ /dev/null @@ -1,77 +0,0 @@ -"use strict"; -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.TokenCredentialAuthenticationProvider = void 0; -var tslib_1 = require("tslib"); -var GraphClientError_1 = require("../../GraphClientError"); -/** - * @module TokenCredentialAuthenticationProvider - */ -/** - * @class - * Class representing TokenCredentialAuthenticationProvider - * This feature is introduced in Version 3.0.0 - * @extends AuthenticationProvider - * Reference - https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/identity/identity/README.md - */ -var TokenCredentialAuthenticationProvider = /** @class */ (function () { - /** - * @public - * @constructor - * Creates an instance of TokenCredentialAuthenticationProvider - * @param {TokenCredential} tokenCredential - An instance of @azure/identity TokenCredential - * @param {TokenCredentialAuthenticationProviderOptions} authenticationProviderOptions - An instance of TokenCredentialAuthenticationProviderOptions - * @returns An instance of TokenCredentialAuthenticationProvider - */ - function TokenCredentialAuthenticationProvider(tokenCredential, authenticationProviderOptions) { - if (!tokenCredential) { - throw new GraphClientError_1.GraphClientError("Please pass a token credential object to the TokenCredentialAuthenticationProvider class constructor"); - } - if (!authenticationProviderOptions) { - throw new GraphClientError_1.GraphClientError("Please pass the TokenCredentialAuthenticationProviderOptions with scopes to the TokenCredentialAuthenticationProvider class constructor"); - } - this.authenticationProviderOptions = authenticationProviderOptions; - this.tokenCredential = tokenCredential; - } - /** - * @public - * @async - * To get the access token - * @param {TokenCredentialAuthenticationProviderOptions} authenticationProviderOptions - The authentication provider options object - * @returns The promise that resolves to an access token - */ - TokenCredentialAuthenticationProvider.prototype.getAccessToken = function () { - return tslib_1.__awaiter(this, void 0, void 0, function () { - var scopes, error, response; - return tslib_1.__generator(this, function (_a) { - switch (_a.label) { - case 0: - scopes = this.authenticationProviderOptions.scopes; - error = new GraphClientError_1.GraphClientError(); - if (!scopes || scopes.length === 0) { - error.name = "Empty Scopes"; - error.message = "Scopes cannot be empty, Please provide scopes"; - throw error; - } - return [4 /*yield*/, this.tokenCredential.getToken(scopes, this.authenticationProviderOptions.getTokenOptions)]; - case 1: - response = _a.sent(); - if (response) { - return [2 /*return*/, response.token]; - } - error.message = "Cannot retrieve accessToken from the Token Credential object"; - error.name = "Access token is undefined"; - throw error; - } - }); - }); - }; - return TokenCredentialAuthenticationProvider; -}()); -exports.TokenCredentialAuthenticationProvider = TokenCredentialAuthenticationProvider; -//# sourceMappingURL=TokenCredentialAuthenticationProvider.js.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/authentication/azureTokenCredentials/TokenCredentialAuthenticationProvider.js.map b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/authentication/azureTokenCredentials/TokenCredentialAuthenticationProvider.js.map deleted file mode 100644 index 954244d..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/authentication/azureTokenCredentials/TokenCredentialAuthenticationProvider.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"TokenCredentialAuthenticationProvider.js","sourceRoot":"","sources":["../../../../src/authentication/azureTokenCredentials/TokenCredentialAuthenticationProvider.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;AAIH,2DAA0D;AAI1D;;GAEG;AAEH;;;;;;GAMG;AACH;IAaC;;;;;;;OAOG;IACH,+CAAmB,eAAgC,EAAE,6BAA2E;QAC/H,IAAI,CAAC,eAAe,EAAE;YACrB,MAAM,IAAI,mCAAgB,CAAC,sGAAsG,CAAC,CAAC;SACnI;QACD,IAAI,CAAC,6BAA6B,EAAE;YACnC,MAAM,IAAI,mCAAgB,CAAC,yIAAyI,CAAC,CAAC;SACtK;QACD,IAAI,CAAC,6BAA6B,GAAG,6BAA6B,CAAC;QACnE,IAAI,CAAC,eAAe,GAAG,eAAe,CAAC;IACxC,CAAC;IAED;;;;;;OAMG;IACU,8DAAc,GAA3B;;;;;;wBACO,MAAM,GAAG,IAAI,CAAC,6BAA6B,CAAC,MAAM,CAAC;wBACnD,KAAK,GAAG,IAAI,mCAAgB,EAAE,CAAC;wBAErC,IAAI,CAAC,MAAM,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE;4BACnC,KAAK,CAAC,IAAI,GAAG,cAAc,CAAC;4BAC5B,KAAK,CAAC,OAAO,GAAG,+CAA+C,CAAC;4BAChE,MAAM,KAAK,CAAC;yBACZ;wBACgB,qBAAM,IAAI,CAAC,eAAe,CAAC,QAAQ,CAAC,MAAM,EAAE,IAAI,CAAC,6BAA6B,CAAC,eAAe,CAAC,EAAA;;wBAA1G,QAAQ,GAAG,SAA+F;wBAChH,IAAI,QAAQ,EAAE;4BACb,sBAAO,QAAQ,CAAC,KAAK,EAAC;yBACtB;wBACD,KAAK,CAAC,OAAO,GAAG,8DAA8D,CAAC;wBAC/E,KAAK,CAAC,IAAI,GAAG,2BAA2B,CAAC;wBACzC,MAAM,KAAK,CAAC;;;;KACZ;IACF,4CAAC;AAAD,CAAC,AAxDD,IAwDC;AAxDY,sFAAqC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/authentication/azureTokenCredentials/index.d.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/authentication/azureTokenCredentials/index.d.ts deleted file mode 100644 index 6d672ef..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/authentication/azureTokenCredentials/index.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -export { TokenCredentialAuthenticationProviderOptions } from "./ITokenCredentialAuthenticationProviderOptions"; -export { TokenCredentialAuthenticationProvider } from "./TokenCredentialAuthenticationProvider"; diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/authentication/azureTokenCredentials/index.js b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/authentication/azureTokenCredentials/index.js deleted file mode 100644 index e211083..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/authentication/azureTokenCredentials/index.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.TokenCredentialAuthenticationProvider = void 0; -var TokenCredentialAuthenticationProvider_1 = require("./TokenCredentialAuthenticationProvider"); -Object.defineProperty(exports, "TokenCredentialAuthenticationProvider", { enumerable: true, get: function () { return TokenCredentialAuthenticationProvider_1.TokenCredentialAuthenticationProvider; } }); -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/authentication/azureTokenCredentials/index.js.map b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/authentication/azureTokenCredentials/index.js.map deleted file mode 100644 index 96e8c1f..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/authentication/azureTokenCredentials/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/authentication/azureTokenCredentials/index.ts"],"names":[],"mappings":";;;AAOA,iGAAgG;AAAvF,8JAAA,qCAAqC,OAAA"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/authentication/msal-browser/AuthCodeMSALBrowserAuthenticationProvider.d.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/authentication/msal-browser/AuthCodeMSALBrowserAuthenticationProvider.d.ts deleted file mode 100644 index 488486e..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/authentication/msal-browser/AuthCodeMSALBrowserAuthenticationProvider.d.ts +++ /dev/null @@ -1,38 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -/** - * @module AuthCodeMSALBrowserAuthenticationProvider - */ -import { PublicClientApplication } from "@azure/msal-browser"; -import { AuthenticationProvider } from "../../IAuthenticationProvider"; -import { AuthCodeMSALBrowserAuthenticationProviderOptions } from "../msalOptions/MSALAuthenticationProviderOptions"; -/** - * an AuthenticationProvider implementation supporting msal-browser library. - * This feature is introduced in Version 3.0.0 - * @class - * @extends AuthenticationProvider - */ -export declare class AuthCodeMSALBrowserAuthenticationProvider implements AuthenticationProvider { - private publicClientApplication; - private options; - /** - * @public - * @constructor - * Creates an instance of ImplicitMSALAuthenticationProvider - * @param {PublicClientApplication} msalApplication - An instance of MSAL PublicClientApplication - * @param {AuthCodeMSALBrowserAuthenticationProviderOptions} options - An instance of MSALAuthenticationProviderOptions - * @returns An instance of ImplicitMSALAuthenticationProvider - */ - constructor(publicClientApplication: PublicClientApplication, options: AuthCodeMSALBrowserAuthenticationProviderOptions); - /** - * @public - * @async - * To get the access token for the request - * @returns The promise that resolves to an access token - */ - getAccessToken(): Promise; -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/authentication/msal-browser/AuthCodeMSALBrowserAuthenticationProvider.js b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/authentication/msal-browser/AuthCodeMSALBrowserAuthenticationProvider.js deleted file mode 100644 index bfbb455..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/authentication/msal-browser/AuthCodeMSALBrowserAuthenticationProvider.js +++ /dev/null @@ -1,96 +0,0 @@ -"use strict"; -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.AuthCodeMSALBrowserAuthenticationProvider = void 0; -var tslib_1 = require("tslib"); -/** - * @module AuthCodeMSALBrowserAuthenticationProvider - */ -var msal_browser_1 = require("@azure/msal-browser"); -var GraphClientError_1 = require("../../GraphClientError"); -/** - * an AuthenticationProvider implementation supporting msal-browser library. - * This feature is introduced in Version 3.0.0 - * @class - * @extends AuthenticationProvider - */ -var AuthCodeMSALBrowserAuthenticationProvider = /** @class */ (function () { - /** - * @public - * @constructor - * Creates an instance of ImplicitMSALAuthenticationProvider - * @param {PublicClientApplication} msalApplication - An instance of MSAL PublicClientApplication - * @param {AuthCodeMSALBrowserAuthenticationProviderOptions} options - An instance of MSALAuthenticationProviderOptions - * @returns An instance of ImplicitMSALAuthenticationProvider - */ - function AuthCodeMSALBrowserAuthenticationProvider(publicClientApplication, options) { - this.publicClientApplication = publicClientApplication; - this.options = options; - if (!options || !publicClientApplication) { - throw new GraphClientError_1.GraphClientError("Please pass valid PublicClientApplication instance and AuthCodeMSALBrowserAuthenticationProviderOptions instance to instantiate MSALBrowserAuthenticationProvider"); - } - } - /** - * @public - * @async - * To get the access token for the request - * @returns The promise that resolves to an access token - */ - AuthCodeMSALBrowserAuthenticationProvider.prototype.getAccessToken = function () { - return tslib_1.__awaiter(this, void 0, void 0, function () { - var scopes, account, error, response, error_1, response; - return tslib_1.__generator(this, function (_a) { - switch (_a.label) { - case 0: - scopes = this.options && this.options.scopes; - account = this.options && this.options.account; - error = new GraphClientError_1.GraphClientError(); - if (!scopes || scopes.length === 0) { - error.name = "Empty Scopes"; - error.message = "Scopes cannot be empty, Please provide scopes"; - throw error; - } - _a.label = 1; - case 1: - _a.trys.push([1, 3, , 9]); - return [4 /*yield*/, this.publicClientApplication.acquireTokenSilent({ - scopes: scopes, - account: account, - })]; - case 2: - response = _a.sent(); - if (!response || !response.accessToken) { - error.name = "Access token is undefined"; - error.message = "Received empty access token from PublicClientApplication"; - throw error; - } - return [2 /*return*/, response.accessToken]; - case 3: - error_1 = _a.sent(); - if (!(error_1 instanceof msal_browser_1.InteractionRequiredAuthError)) return [3 /*break*/, 7]; - if (!(this.options.interactionType === msal_browser_1.InteractionType.Redirect)) return [3 /*break*/, 4]; - this.publicClientApplication.acquireTokenRedirect({ scopes: scopes }); - return [3 /*break*/, 6]; - case 4: - if (!(this.options.interactionType === msal_browser_1.InteractionType.Popup)) return [3 /*break*/, 6]; - return [4 /*yield*/, this.publicClientApplication.acquireTokenPopup({ scopes: scopes })]; - case 5: - response = _a.sent(); - return [2 /*return*/, response.accessToken]; - case 6: return [3 /*break*/, 8]; - case 7: throw error_1; - case 8: return [3 /*break*/, 9]; - case 9: return [2 /*return*/]; - } - }); - }); - }; - return AuthCodeMSALBrowserAuthenticationProvider; -}()); -exports.AuthCodeMSALBrowserAuthenticationProvider = AuthCodeMSALBrowserAuthenticationProvider; -//# sourceMappingURL=AuthCodeMSALBrowserAuthenticationProvider.js.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/authentication/msal-browser/AuthCodeMSALBrowserAuthenticationProvider.js.map b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/authentication/msal-browser/AuthCodeMSALBrowserAuthenticationProvider.js.map deleted file mode 100644 index ca5d8f3..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/authentication/msal-browser/AuthCodeMSALBrowserAuthenticationProvider.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AuthCodeMSALBrowserAuthenticationProvider.js","sourceRoot":"","sources":["../../../../src/authentication/msal-browser/AuthCodeMSALBrowserAuthenticationProvider.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;AAEH;;GAEG;AAEH,oDAAmI;AAEnI,2DAA0D;AAI1D;;;;;GAKG;AACH;IACC;;;;;;;OAOG;IACH,mDAA2B,uBAAgD,EAAU,OAAyD;QAAnH,4BAAuB,GAAvB,uBAAuB,CAAyB;QAAU,YAAO,GAAP,OAAO,CAAkD;QAC7I,IAAI,CAAC,OAAO,IAAI,CAAC,uBAAuB,EAAE;YACzC,MAAM,IAAI,mCAAgB,CAAC,mKAAmK,CAAC,CAAC;SAChM;IACF,CAAC;IAED;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G,QAAQ,GAAyB,SAAgE;wBACvG,sBAAO,QAAQ,CAAC,WAAW,EAAC;;4BAG7B,MAAM,OAAK,CAAC;;;;;;KAGd;IACF,gDAAC;AAAD,CAAC,AAtDD,IAsDC;AAtDY,8FAAyC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/authentication/msal-browser/index.d.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/authentication/msal-browser/index.d.ts deleted file mode 100644 index a2f66ed..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/authentication/msal-browser/index.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -export { AuthCodeMSALBrowserAuthenticationProvider } from "./AuthCodeMSALBrowserAuthenticationProvider"; diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/authentication/msal-browser/index.js b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/authentication/msal-browser/index.js deleted file mode 100644 index 9833416..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/authentication/msal-browser/index.js +++ /dev/null @@ -1,12 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.AuthCodeMSALBrowserAuthenticationProvider = void 0; -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -var AuthCodeMSALBrowserAuthenticationProvider_1 = require("./AuthCodeMSALBrowserAuthenticationProvider"); -Object.defineProperty(exports, "AuthCodeMSALBrowserAuthenticationProvider", { enumerable: true, get: function () { return AuthCodeMSALBrowserAuthenticationProvider_1.AuthCodeMSALBrowserAuthenticationProvider; } }); -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/authentication/msal-browser/index.js.map b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/authentication/msal-browser/index.js.map deleted file mode 100644 index b3c18e4..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/authentication/msal-browser/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/authentication/msal-browser/index.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,yGAAwG;AAA/F,sKAAA,yCAAyC,OAAA"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/authentication/msalOptions/MSALAuthenticationProviderOptions.d.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/authentication/msalOptions/MSALAuthenticationProviderOptions.d.ts deleted file mode 100644 index 292b014..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/authentication/msalOptions/MSALAuthenticationProviderOptions.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -/** - * @module MSALAuthenticationProviderOptions - */ -import { AccountInfo, InteractionType } from "@azure/msal-browser"; -import { AuthenticationProviderOptions } from "../../IAuthenticationProviderOptions"; -export interface AuthCodeMSALBrowserAuthenticationProviderOptions extends AuthenticationProviderOptions { - scopes: string[]; - account: AccountInfo; - interactionType: InteractionType; -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/authentication/msalOptions/MSALAuthenticationProviderOptions.js b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/authentication/msalOptions/MSALAuthenticationProviderOptions.js deleted file mode 100644 index 0c3755b..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/authentication/msalOptions/MSALAuthenticationProviderOptions.js +++ /dev/null @@ -1,9 +0,0 @@ -"use strict"; -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=MSALAuthenticationProviderOptions.js.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/authentication/msalOptions/MSALAuthenticationProviderOptions.js.map b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/authentication/msalOptions/MSALAuthenticationProviderOptions.js.map deleted file mode 100644 index ba41fe5..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/authentication/msalOptions/MSALAuthenticationProviderOptions.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"MSALAuthenticationProviderOptions.js","sourceRoot":"","sources":["../../../../src/authentication/msalOptions/MSALAuthenticationProviderOptions.ts"],"names":[],"mappings":";AAAA;;;;;GAKG"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/browser/index.d.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/browser/index.d.ts deleted file mode 100644 index 7ffe8bb..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/browser/index.d.ts +++ /dev/null @@ -1,48 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -/// -export { BatchRequestStep, BatchRequestData, BatchRequestContent, RequestData, BatchRequestBody } from "../content/BatchRequestContent"; -export { BatchResponseBody, BatchResponseContent } from "../content/BatchResponseContent"; -export { AuthenticationHandler } from "../middleware/AuthenticationHandler"; -export { HTTPMessageHandler } from "../middleware/HTTPMessageHandler"; -export { Middleware } from "../middleware/IMiddleware"; -export { RetryHandler } from "../middleware/RetryHandler"; -export { RedirectHandler } from "../middleware/RedirectHandler"; -export { TelemetryHandler } from "../middleware/TelemetryHandler"; -export { MiddlewareFactory } from "../middleware/MiddlewareFactory"; -export { AuthenticationHandlerOptions } from "../middleware/options/AuthenticationHandlerOptions"; -export { MiddlewareOptions } from "../middleware/options/IMiddlewareOptions"; -export { ShouldRetry, RetryHandlerOptions } from "../middleware/options/RetryHandlerOptions"; -export { ShouldRedirect, RedirectHandlerOptions } from "../middleware/options/RedirectHandlerOptions"; -export { FeatureUsageFlag, TelemetryHandlerOptions } from "../middleware/options/TelemetryHandlerOptions"; -export { ChaosHandlerOptions } from "../middleware/options/ChaosHandlerOptions"; -export { ChaosStrategy } from "../middleware/options/ChaosStrategy"; -export { ChaosHandler } from "../middleware/ChaosHandler"; -export { SliceType, LargeFileUploadTaskOptions, LargeFileUploadTask, LargeFileUploadSession, FileObject } from "../tasks/LargeFileUploadTask"; -export { OneDriveLargeFileUploadTask, OneDriveLargeFileUploadOptions } from "../tasks/OneDriveLargeFileUploadTask"; -export { getValidRangeSize } from "../tasks/OneDriveLargeFileUploadTaskUtil"; -export { StreamUpload } from "../tasks/FileUploadTask/FileObjectClasses/StreamUpload"; -export { FileUpload } from "../tasks/FileUploadTask/FileObjectClasses/FileUpload"; -export { UploadResult } from "../tasks/FileUploadTask/UploadResult"; -export { UploadEventHandlers } from "../tasks/FileUploadTask/Interfaces/IUploadEventHandlers"; -export { Range } from "../tasks/FileUploadTask/Range"; -export { PageIteratorCallback, PageIterator, PageCollection, GraphRequestOptions } from "../tasks/PageIterator"; -export { Client } from "../Client"; -export { CustomAuthenticationProvider } from "../CustomAuthenticationProvider"; -export { GraphError } from "../GraphError"; -export { GraphClientError } from "../GraphClientError"; -export { GraphRequest } from "../GraphRequest"; -export { AuthProvider } from "../IAuthProvider"; -export { AuthenticationProvider } from "../IAuthenticationProvider"; -export { AuthenticationProviderOptions } from "../IAuthenticationProviderOptions"; -export { AuthProviderCallback } from "../IAuthProviderCallback"; -export { ClientOptions } from "../IClientOptions"; -export { Context } from "../IContext"; -export { NodeFetchInit, FetchOptions } from "../IFetchOptions"; -export { GraphRequestCallback } from "../IGraphRequestCallback"; -export { Options } from "../IOptions"; -export { ResponseType } from "../ResponseType"; diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/browser/index.js b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/browser/index.js deleted file mode 100644 index a6e88e6..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/browser/index.js +++ /dev/null @@ -1,71 +0,0 @@ -"use strict"; -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ResponseType = exports.GraphRequest = exports.GraphClientError = exports.GraphError = exports.CustomAuthenticationProvider = exports.Client = exports.PageIterator = exports.Range = exports.UploadResult = exports.FileUpload = exports.StreamUpload = exports.getValidRangeSize = exports.OneDriveLargeFileUploadTask = exports.LargeFileUploadTask = exports.ChaosHandler = exports.ChaosStrategy = exports.ChaosHandlerOptions = exports.TelemetryHandlerOptions = exports.FeatureUsageFlag = exports.RedirectHandlerOptions = exports.RetryHandlerOptions = exports.AuthenticationHandlerOptions = exports.MiddlewareFactory = exports.TelemetryHandler = exports.RedirectHandler = exports.RetryHandler = exports.HTTPMessageHandler = exports.AuthenticationHandler = exports.BatchResponseContent = exports.BatchRequestContent = void 0; -// eslint-disable-next-line @typescript-eslint/triple-slash-reference -/// -var BatchRequestContent_1 = require("../content/BatchRequestContent"); -Object.defineProperty(exports, "BatchRequestContent", { enumerable: true, get: function () { return BatchRequestContent_1.BatchRequestContent; } }); -var BatchResponseContent_1 = require("../content/BatchResponseContent"); -Object.defineProperty(exports, "BatchResponseContent", { enumerable: true, get: function () { return BatchResponseContent_1.BatchResponseContent; } }); -var AuthenticationHandler_1 = require("../middleware/AuthenticationHandler"); -Object.defineProperty(exports, "AuthenticationHandler", { enumerable: true, get: function () { return AuthenticationHandler_1.AuthenticationHandler; } }); -var HTTPMessageHandler_1 = require("../middleware/HTTPMessageHandler"); -Object.defineProperty(exports, "HTTPMessageHandler", { enumerable: true, get: function () { return HTTPMessageHandler_1.HTTPMessageHandler; } }); -var RetryHandler_1 = require("../middleware/RetryHandler"); -Object.defineProperty(exports, "RetryHandler", { enumerable: true, get: function () { return RetryHandler_1.RetryHandler; } }); -var RedirectHandler_1 = require("../middleware/RedirectHandler"); -Object.defineProperty(exports, "RedirectHandler", { enumerable: true, get: function () { return RedirectHandler_1.RedirectHandler; } }); -var TelemetryHandler_1 = require("../middleware/TelemetryHandler"); -Object.defineProperty(exports, "TelemetryHandler", { enumerable: true, get: function () { return TelemetryHandler_1.TelemetryHandler; } }); -var MiddlewareFactory_1 = require("../middleware/MiddlewareFactory"); -Object.defineProperty(exports, "MiddlewareFactory", { enumerable: true, get: function () { return MiddlewareFactory_1.MiddlewareFactory; } }); -var AuthenticationHandlerOptions_1 = require("../middleware/options/AuthenticationHandlerOptions"); -Object.defineProperty(exports, "AuthenticationHandlerOptions", { enumerable: true, get: function () { return AuthenticationHandlerOptions_1.AuthenticationHandlerOptions; } }); -var RetryHandlerOptions_1 = require("../middleware/options/RetryHandlerOptions"); -Object.defineProperty(exports, "RetryHandlerOptions", { enumerable: true, get: function () { return RetryHandlerOptions_1.RetryHandlerOptions; } }); -var RedirectHandlerOptions_1 = require("../middleware/options/RedirectHandlerOptions"); -Object.defineProperty(exports, "RedirectHandlerOptions", { enumerable: true, get: function () { return RedirectHandlerOptions_1.RedirectHandlerOptions; } }); -var TelemetryHandlerOptions_1 = require("../middleware/options/TelemetryHandlerOptions"); -Object.defineProperty(exports, "FeatureUsageFlag", { enumerable: true, get: function () { return TelemetryHandlerOptions_1.FeatureUsageFlag; } }); -Object.defineProperty(exports, "TelemetryHandlerOptions", { enumerable: true, get: function () { return TelemetryHandlerOptions_1.TelemetryHandlerOptions; } }); -var ChaosHandlerOptions_1 = require("../middleware/options/ChaosHandlerOptions"); -Object.defineProperty(exports, "ChaosHandlerOptions", { enumerable: true, get: function () { return ChaosHandlerOptions_1.ChaosHandlerOptions; } }); -var ChaosStrategy_1 = require("../middleware/options/ChaosStrategy"); -Object.defineProperty(exports, "ChaosStrategy", { enumerable: true, get: function () { return ChaosStrategy_1.ChaosStrategy; } }); -var ChaosHandler_1 = require("../middleware/ChaosHandler"); -Object.defineProperty(exports, "ChaosHandler", { enumerable: true, get: function () { return ChaosHandler_1.ChaosHandler; } }); -var LargeFileUploadTask_1 = require("../tasks/LargeFileUploadTask"); -Object.defineProperty(exports, "LargeFileUploadTask", { enumerable: true, get: function () { return LargeFileUploadTask_1.LargeFileUploadTask; } }); -var OneDriveLargeFileUploadTask_1 = require("../tasks/OneDriveLargeFileUploadTask"); -Object.defineProperty(exports, "OneDriveLargeFileUploadTask", { enumerable: true, get: function () { return OneDriveLargeFileUploadTask_1.OneDriveLargeFileUploadTask; } }); -var OneDriveLargeFileUploadTaskUtil_1 = require("../tasks/OneDriveLargeFileUploadTaskUtil"); -Object.defineProperty(exports, "getValidRangeSize", { enumerable: true, get: function () { return OneDriveLargeFileUploadTaskUtil_1.getValidRangeSize; } }); -var StreamUpload_1 = require("../tasks/FileUploadTask/FileObjectClasses/StreamUpload"); -Object.defineProperty(exports, "StreamUpload", { enumerable: true, get: function () { return StreamUpload_1.StreamUpload; } }); -var FileUpload_1 = require("../tasks/FileUploadTask/FileObjectClasses/FileUpload"); -Object.defineProperty(exports, "FileUpload", { enumerable: true, get: function () { return FileUpload_1.FileUpload; } }); -var UploadResult_1 = require("../tasks/FileUploadTask/UploadResult"); -Object.defineProperty(exports, "UploadResult", { enumerable: true, get: function () { return UploadResult_1.UploadResult; } }); -var Range_1 = require("../tasks/FileUploadTask/Range"); -Object.defineProperty(exports, "Range", { enumerable: true, get: function () { return Range_1.Range; } }); -var PageIterator_1 = require("../tasks/PageIterator"); -Object.defineProperty(exports, "PageIterator", { enumerable: true, get: function () { return PageIterator_1.PageIterator; } }); -var Client_1 = require("../Client"); -Object.defineProperty(exports, "Client", { enumerable: true, get: function () { return Client_1.Client; } }); -var CustomAuthenticationProvider_1 = require("../CustomAuthenticationProvider"); -Object.defineProperty(exports, "CustomAuthenticationProvider", { enumerable: true, get: function () { return CustomAuthenticationProvider_1.CustomAuthenticationProvider; } }); -var GraphError_1 = require("../GraphError"); -Object.defineProperty(exports, "GraphError", { enumerable: true, get: function () { return GraphError_1.GraphError; } }); -var GraphClientError_1 = require("../GraphClientError"); -Object.defineProperty(exports, "GraphClientError", { enumerable: true, get: function () { return GraphClientError_1.GraphClientError; } }); -var GraphRequest_1 = require("../GraphRequest"); -Object.defineProperty(exports, "GraphRequest", { enumerable: true, get: function () { return GraphRequest_1.GraphRequest; } }); -var ResponseType_1 = require("../ResponseType"); -Object.defineProperty(exports, "ResponseType", { enumerable: true, get: function () { return ResponseType_1.ResponseType; } }); -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/browser/index.js.map b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/browser/index.js.map deleted file mode 100644 index 96c5449..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/browser/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/browser/index.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,qEAAqE;AACrE,0CAA0C;AAC1C,sEAAwI;AAA3F,0HAAA,mBAAmB,OAAA;AAChE,wEAA0F;AAA9D,4HAAA,oBAAoB,OAAA;AAEhD,6EAA4E;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ent.d.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/content/BatchRequestContent.d.ts deleted file mode 100644 index a73e013..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/content/BatchRequestContent.d.ts +++ /dev/null @@ -1,144 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -/** - * @interface - * Signature representing BatchRequestStep data - * @property {string} id - Unique identity for the request, Should not be an empty string - * @property {string[]} [dependsOn] - Array of dependencies - * @property {Request} request - The Request object - */ -export interface BatchRequestStep { - id: string; - dependsOn?: string[]; - request: Request; -} -/** - * @interface - * Signature representing single request in a Batching - * @extends RequestInit - * @see {@link https://github.com/Microsoft/TypeScript/blob/master/lib/lib.dom.d.ts#L1337} and {@link https://fetch.spec.whatwg.org/#requestinit} - * - * @property {string} url - The url value of the request - */ -export interface RequestData extends RequestInit { - url: string; -} -/** - * @interface - * Signature representing batch request data - * @property {string} id - Unique identity for the request, Should not be an empty string - * @property {string[]} [dependsOn] - Array of dependencies - */ -export interface BatchRequestData extends RequestData { - id: string; - dependsOn?: string[]; -} -/** - * @interface - * Signature representing batch request body - * @property {BatchRequestData[]} requests - Array of request data, a json representation of requests for batch - */ -export interface BatchRequestBody { - requests: BatchRequestData[]; -} -/** - * @class - * Class for handling BatchRequestContent - */ -export declare class BatchRequestContent { - /** - * @private - * @static - * Limit for number of requests {@link - https://developer.microsoft.com/en-us/graph/docs/concepts/known_issues#json-batching} - */ - private static requestLimit; - /** - * @public - * To keep track of requests, key will be id of the request and value will be the request json - */ - requests: Map; - /** - * @private - * @static - * Validates the dependency chain of the requests - * - * Note: - * Individual requests can depend on other individual requests. Currently, requests can only depend on a single other request, and must follow one of these three patterns: - * 1. Parallel - no individual request states a dependency in the dependsOn property. - * 2. Serial - all individual requests depend on the previous individual request. - * 3. Same - all individual requests that state a dependency in the dependsOn property, state the same dependency. - * As JSON batching matures, these limitations will be removed. - * @see {@link https://developer.microsoft.com/en-us/graph/docs/concepts/known_issues#json-batching} - * - * @param {Map} requests - The map of requests. - * @returns The boolean indicating the validation status - */ - private static validateDependencies; - /** - * @private - * @static - * @async - * Converts Request Object instance to a JSON - * @param {IsomorphicRequest} request - The IsomorphicRequest Object instance - * @returns A promise that resolves to JSON representation of a request - */ - private static getRequestData; - /** - * @private - * @static - * @async - * Gets the body of a Request object instance - * @param {IsomorphicRequest} request - The IsomorphicRequest object instance - * @returns The Promise that resolves to a body value of a Request - */ - private static getRequestBody; - /** - * @public - * @constructor - * Constructs a BatchRequestContent instance - * @param {BatchRequestStep[]} [requests] - Array of requests value - * @returns An instance of a BatchRequestContent - */ - constructor(requests?: BatchRequestStep[]); - /** - * @public - * Adds a request to the batch request content - * @param {BatchRequestStep} request - The request value - * @returns The id of the added request - */ - addRequest(request: BatchRequestStep): string; - /** - * @public - * Removes request from the batch payload and its dependencies from all dependents - * @param {string} requestId - The id of a request that needs to be removed - * @returns The boolean indicating removed status - */ - removeRequest(requestId: string): boolean; - /** - * @public - * @async - * Serialize content from BatchRequestContent instance - * @returns The body content to make batch request - */ - getContent(): Promise; - /** - * @public - * Adds a dependency for a given dependent request - * @param {string} dependentId - The id of the dependent request - * @param {string} [dependencyId] - The id of the dependency request, if not specified the preceding request will be considered as a dependency - * @returns Nothing - */ - addDependency(dependentId: string, dependencyId?: string): void; - /** - * @public - * Removes a dependency for a given dependent request id - * @param {string} dependentId - The id of the dependent request - * @param {string} [dependencyId] - The id of the dependency request, if not specified will remove all the dependencies of that request - * @returns The boolean indicating removed status - */ - removeDependency(dependentId: string, dependencyId?: string): boolean; -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/content/BatchRequestContent.js b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/content/BatchRequestContent.js deleted file mode 100644 index 9fe909a..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/content/BatchRequestContent.js +++ /dev/null @@ -1,460 +0,0 @@ -"use strict"; -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.BatchRequestContent = void 0; -var tslib_1 = require("tslib"); -/** - * @module BatchRequestContent - */ -var RequestMethod_1 = require("../RequestMethod"); -/** - * @class - * Class for handling BatchRequestContent - */ -var BatchRequestContent = /** @class */ (function () { - /** - * @public - * @constructor - * Constructs a BatchRequestContent instance - * @param {BatchRequestStep[]} [requests] - Array of requests value - * @returns An instance of a BatchRequestContent - */ - function BatchRequestContent(requests) { - this.requests = new Map(); - if (typeof requests !== "undefined") { - var limit = BatchRequestContent.requestLimit; - if (requests.length > limit) { - var error = new Error("Maximum requests limit exceeded, Max allowed number of requests are ".concat(limit)); - error.name = "Limit Exceeded Error"; - throw error; - } - for (var _i = 0, requests_1 = requests; _i < requests_1.length; _i++) { - var req = requests_1[_i]; - this.addRequest(req); - } - } - } - /** - * @private - * @static - * Validates the dependency chain of the requests - * - * Note: - * Individual requests can depend on other individual requests. Currently, requests can only depend on a single other request, and must follow one of these three patterns: - * 1. Parallel - no individual request states a dependency in the dependsOn property. - * 2. Serial - all individual requests depend on the previous individual request. - * 3. Same - all individual requests that state a dependency in the dependsOn property, state the same dependency. - * As JSON batching matures, these limitations will be removed. - * @see {@link https://developer.microsoft.com/en-us/graph/docs/concepts/known_issues#json-batching} - * - * @param {Map} requests - The map of requests. - * @returns The boolean indicating the validation status - */ - BatchRequestContent.validateDependencies = function (requests) { - var isParallel = function (reqs) { - var iterator = reqs.entries(); - var cur = iterator.next(); - while (!cur.done) { - var curReq = cur.value[1]; - if (curReq.dependsOn !== undefined && curReq.dependsOn.length > 0) { - return false; - } - cur = iterator.next(); - } - return true; - }; - var isSerial = function (reqs) { - var iterator = reqs.entries(); - var cur = iterator.next(); - var firstRequest = cur.value[1]; - if (firstRequest.dependsOn !== undefined && firstRequest.dependsOn.length > 0) { - return false; - } - var prev = cur; - cur = iterator.next(); - while (!cur.done) { - var curReq = cur.value[1]; - if (curReq.dependsOn === undefined || curReq.dependsOn.length !== 1 || curReq.dependsOn[0] !== prev.value[1].id) { - return false; - } - prev = cur; - cur = iterator.next(); - } - return true; - }; - var isSame = function (reqs) { - var iterator = reqs.entries(); - var cur = iterator.next(); - var firstRequest = cur.value[1]; - var dependencyId; - if (firstRequest.dependsOn === undefined || firstRequest.dependsOn.length === 0) { - dependencyId = firstRequest.id; - } - else { - if (firstRequest.dependsOn.length === 1) { - var fDependencyId = firstRequest.dependsOn[0]; - if (fDependencyId !== firstRequest.id && reqs.has(fDependencyId)) { - dependencyId = fDependencyId; - } - else { - return false; - } - } - else { - return false; - } - } - cur = iterator.next(); - while (!cur.done) { - var curReq = cur.value[1]; - if ((curReq.dependsOn === undefined || curReq.dependsOn.length === 0) && dependencyId !== curReq.id) { - return false; - } - if (curReq.dependsOn !== undefined && curReq.dependsOn.length !== 0) { - if (curReq.dependsOn.length === 1 && (curReq.id === dependencyId || curReq.dependsOn[0] !== dependencyId)) { - return false; - } - if (curReq.dependsOn.length > 1) { - return false; - } - } - cur = iterator.next(); - } - return true; - }; - if (requests.size === 0) { - var error = new Error("Empty requests map, Please provide at least one request."); - error.name = "Empty Requests Error"; - throw error; - } - return isParallel(requests) || isSerial(requests) || isSame(requests); - }; - /** - * @private - * @static - * @async - * Converts Request Object instance to a JSON - * @param {IsomorphicRequest} request - The IsomorphicRequest Object instance - * @returns A promise that resolves to JSON representation of a request - */ - BatchRequestContent.getRequestData = function (request) { - return tslib_1.__awaiter(this, void 0, void 0, function () { - var requestData, hasHttpRegex, headers, _a; - return tslib_1.__generator(this, function (_b) { - switch (_b.label) { - case 0: - requestData = { - url: "", - }; - hasHttpRegex = new RegExp("^https?://"); - // Stripping off hostname, port and url scheme - requestData.url = hasHttpRegex.test(request.url) ? "/" + request.url.split(/.*?\/\/.*?\//)[1] : request.url; - requestData.method = request.method; - headers = {}; - request.headers.forEach(function (value, key) { - headers[key] = value; - }); - if (Object.keys(headers).length) { - requestData.headers = headers; - } - if (!(request.method === RequestMethod_1.RequestMethod.PATCH || request.method === RequestMethod_1.RequestMethod.POST || request.method === RequestMethod_1.RequestMethod.PUT)) return [3 /*break*/, 2]; - _a = requestData; - return [4 /*yield*/, BatchRequestContent.getRequestBody(request)]; - case 1: - _a.body = _b.sent(); - _b.label = 2; - case 2: - /** - * TODO: Check any other property needs to be used from the Request object and add them - */ - return [2 /*return*/, requestData]; - } - }); - }); - }; - /** - * @private - * @static - * @async - * Gets the body of a Request object instance - * @param {IsomorphicRequest} request - The IsomorphicRequest object instance - * @returns The Promise that resolves to a body value of a Request - */ - BatchRequestContent.getRequestBody = function (request) { - return tslib_1.__awaiter(this, void 0, void 0, function () { - var bodyParsed, body, cloneReq, e_1, blob_1, reader_1, buffer, e_2; - return tslib_1.__generator(this, function (_a) { - switch (_a.label) { - case 0: - bodyParsed = false; - _a.label = 1; - case 1: - _a.trys.push([1, 3, , 4]); - cloneReq = request.clone(); - return [4 /*yield*/, cloneReq.json()]; - case 2: - body = _a.sent(); - bodyParsed = true; - return [3 /*break*/, 4]; - case 3: - e_1 = _a.sent(); - return [3 /*break*/, 4]; - case 4: - if (!!bodyParsed) return [3 /*break*/, 12]; - _a.label = 5; - case 5: - _a.trys.push([5, 11, , 12]); - if (!(typeof Blob !== "undefined")) return [3 /*break*/, 8]; - return [4 /*yield*/, request.blob()]; - case 6: - blob_1 = _a.sent(); - reader_1 = new FileReader(); - return [4 /*yield*/, new Promise(function (resolve) { - reader_1.addEventListener("load", function () { - var dataURL = reader_1.result; - /** - * Some valid dataURL schemes: - * 1. data:text/vnd-example+xyz;foo=bar;base64,R0lGODdh - * 2. data:text/plain;charset=UTF-8;page=21,the%20data:1234,5678 - * 3. data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg== - * 4. data:image/png,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg== - * 5. data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg== - * @see Syntax {@link https://en.wikipedia.org/wiki/Data_URI_scheme} for more - */ - var regex = new RegExp("^s*data:(.+?/.+?(;.+?=.+?)*)?(;base64)?,(.*)s*$"); - var segments = regex.exec(dataURL); - resolve(segments[4]); - }, false); - reader_1.readAsDataURL(blob_1); - })]; - case 7: - body = _a.sent(); - return [3 /*break*/, 10]; - case 8: - if (!(typeof Buffer !== "undefined")) return [3 /*break*/, 10]; - return [4 /*yield*/, request.buffer()]; - case 9: - buffer = _a.sent(); - body = buffer.toString("base64"); - _a.label = 10; - case 10: - bodyParsed = true; - return [3 /*break*/, 12]; - case 11: - e_2 = _a.sent(); - return [3 /*break*/, 12]; - case 12: return [2 /*return*/, body]; - } - }); - }); - }; - /** - * @public - * Adds a request to the batch request content - * @param {BatchRequestStep} request - The request value - * @returns The id of the added request - */ - BatchRequestContent.prototype.addRequest = function (request) { - var limit = BatchRequestContent.requestLimit; - if (request.id === "") { - var error = new Error("Id for a request is empty, Please provide an unique id"); - error.name = "Empty Id For Request"; - throw error; - } - if (this.requests.size === limit) { - var error = new Error("Maximum requests limit exceeded, Max allowed number of requests are ".concat(limit)); - error.name = "Limit Exceeded Error"; - throw error; - } - if (this.requests.has(request.id)) { - var error = new Error("Adding request with duplicate id ".concat(request.id, ", Make the id of the requests unique")); - error.name = "Duplicate RequestId Error"; - throw error; - } - this.requests.set(request.id, request); - return request.id; - }; - /** - * @public - * Removes request from the batch payload and its dependencies from all dependents - * @param {string} requestId - The id of a request that needs to be removed - * @returns The boolean indicating removed status - */ - BatchRequestContent.prototype.removeRequest = function (requestId) { - var deleteStatus = this.requests.delete(requestId); - var iterator = this.requests.entries(); - var cur = iterator.next(); - /** - * Removing dependencies where this request is present as a dependency - */ - while (!cur.done) { - var dependencies = cur.value[1].dependsOn; - if (typeof dependencies !== "undefined") { - var index = dependencies.indexOf(requestId); - if (index !== -1) { - dependencies.splice(index, 1); - } - if (dependencies.length === 0) { - delete cur.value[1].dependsOn; - } - } - cur = iterator.next(); - } - return deleteStatus; - }; - /** - * @public - * @async - * Serialize content from BatchRequestContent instance - * @returns The body content to make batch request - */ - BatchRequestContent.prototype.getContent = function () { - return tslib_1.__awaiter(this, void 0, void 0, function () { - var requests, requestBody, iterator, cur, error, error, requestStep, batchRequestData, error; - return tslib_1.__generator(this, function (_a) { - switch (_a.label) { - case 0: - requests = []; - requestBody = { - requests: requests, - }; - iterator = this.requests.entries(); - cur = iterator.next(); - if (cur.done) { - error = new Error("No requests added yet, Please add at least one request."); - error.name = "Empty Payload"; - throw error; - } - if (!BatchRequestContent.validateDependencies(this.requests)) { - error = new Error("Invalid dependency found, Dependency should be:\n1. Parallel - no individual request states a dependency in the dependsOn property.\n2. Serial - all individual requests depend on the previous individual request.\n3. Same - all individual requests that state a dependency in the dependsOn property, state the same dependency."); - error.name = "Invalid Dependency"; - throw error; - } - _a.label = 1; - case 1: - if (!!cur.done) return [3 /*break*/, 3]; - requestStep = cur.value[1]; - return [4 /*yield*/, BatchRequestContent.getRequestData(requestStep.request)]; - case 2: - batchRequestData = (_a.sent()); - /** - * @see{@https://tools.ietf.org/html/rfc7578#section-4.4} - * TODO- Setting/Defaulting of content-type header to the correct value - * @see {@link https://developer.microsoft.com/en-us/graph/docs/concepts/json_batching#request-format} - */ - if (batchRequestData.body !== undefined && (batchRequestData.headers === undefined || batchRequestData.headers["content-type"] === undefined)) { - error = new Error("Content-type header is not mentioned for request #".concat(requestStep.id, ", For request having body, Content-type header should be mentioned")); - error.name = "Invalid Content-type header"; - throw error; - } - batchRequestData.id = requestStep.id; - if (requestStep.dependsOn !== undefined && requestStep.dependsOn.length > 0) { - batchRequestData.dependsOn = requestStep.dependsOn; - } - requests.push(batchRequestData); - cur = iterator.next(); - return [3 /*break*/, 1]; - case 3: - requestBody.requests = requests; - return [2 /*return*/, requestBody]; - } - }); - }); - }; - /** - * @public - * Adds a dependency for a given dependent request - * @param {string} dependentId - The id of the dependent request - * @param {string} [dependencyId] - The id of the dependency request, if not specified the preceding request will be considered as a dependency - * @returns Nothing - */ - BatchRequestContent.prototype.addDependency = function (dependentId, dependencyId) { - if (!this.requests.has(dependentId)) { - var error = new Error("Dependent ".concat(dependentId, " does not exists, Please check the id")); - error.name = "Invalid Dependent"; - throw error; - } - if (typeof dependencyId !== "undefined" && !this.requests.has(dependencyId)) { - var error = new Error("Dependency ".concat(dependencyId, " does not exists, Please check the id")); - error.name = "Invalid Dependency"; - throw error; - } - if (typeof dependencyId !== "undefined") { - var dependent = this.requests.get(dependentId); - if (dependent.dependsOn === undefined) { - dependent.dependsOn = []; - } - if (dependent.dependsOn.indexOf(dependencyId) !== -1) { - var error = new Error("Dependency ".concat(dependencyId, " is already added for the request ").concat(dependentId)); - error.name = "Duplicate Dependency"; - throw error; - } - dependent.dependsOn.push(dependencyId); - } - else { - var iterator = this.requests.entries(); - var prev = void 0; - var cur = iterator.next(); - while (!cur.done && cur.value[1].id !== dependentId) { - prev = cur; - cur = iterator.next(); - } - if (typeof prev !== "undefined") { - var dId = prev.value[0]; - if (cur.value[1].dependsOn === undefined) { - cur.value[1].dependsOn = []; - } - if (cur.value[1].dependsOn.indexOf(dId) !== -1) { - var error = new Error("Dependency ".concat(dId, " is already added for the request ").concat(dependentId)); - error.name = "Duplicate Dependency"; - throw error; - } - cur.value[1].dependsOn.push(dId); - } - else { - var error = new Error("Can't add dependency ".concat(dependencyId, ", There is only a dependent request in the batch")); - error.name = "Invalid Dependency Addition"; - throw error; - } - } - }; - /** - * @public - * Removes a dependency for a given dependent request id - * @param {string} dependentId - The id of the dependent request - * @param {string} [dependencyId] - The id of the dependency request, if not specified will remove all the dependencies of that request - * @returns The boolean indicating removed status - */ - BatchRequestContent.prototype.removeDependency = function (dependentId, dependencyId) { - var request = this.requests.get(dependentId); - if (typeof request === "undefined" || request.dependsOn === undefined || request.dependsOn.length === 0) { - return false; - } - if (typeof dependencyId !== "undefined") { - var index = request.dependsOn.indexOf(dependencyId); - if (index === -1) { - return false; - } - request.dependsOn.splice(index, 1); - return true; - } - else { - delete request.dependsOn; - return true; - } - }; - /** - * @private - * @static - * Limit for number of requests {@link - https://developer.microsoft.com/en-us/graph/docs/concepts/known_issues#json-batching} - */ - BatchRequestContent.requestLimit = 20; - return BatchRequestContent; -}()); -exports.BatchRequestContent = BatchRequestContent; -//# sourceMappingURL=BatchRequestContent.js.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/content/BatchRequestContent.js.map b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/content/BatchRequestContent.js.map deleted file mode 100644 index 598a187..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/content/BatchRequestContent.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"BatchRequestContent.js","sourceRoot":"","sources":["../../../src/content/BatchRequestContent.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;AAEH;;GAEG;AACH,kDAAiD;AAkEjD;;;GAGG;AACH;IAqMC;;;;;;OAMG;IACH,6BAAmB,QAA6B;QAC/C,IAAI,CAAC,QAAQ,GAAG,IAAI,GAAG,EAAE,CAAC;QAC1B,IAAI,OAAO,QAAQ,KAAK,WAAW,EAAE;YACpC,IAAM,KAAK,GAAG,mBAAmB,CAAC,YAAY,CAAC;YAC/C,IAAI,QAAQ,CAAC,MAAM,GAAG,KAAK,E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node_modules/@microsoft/microsoft-graph-client/lib/src/content/BatchResponseContent.d.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/content/BatchResponseContent.d.ts deleted file mode 100644 index 131b082..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/content/BatchResponseContent.d.ts +++ /dev/null @@ -1,82 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -/** - * @module BatchResponseContent - */ -/** - * @interface - * Signature represents key value pair object - */ -interface KeyValuePairObject { - [key: string]: any; -} -/** - * @interface - * Signature representing Batch response body - * @property {KeyValuePairObject[]} responses - An array of key value pair representing response object for every request - * @property {string} [@odata.nextLink] - The nextLink value to get next set of responses in case of asynchronous batch requests - */ -export interface BatchResponseBody { - responses: KeyValuePairObject[]; - "@odata.nextLink"?: string; -} -/** - * @class - * Class that handles BatchResponseContent - */ -export declare class BatchResponseContent { - /** - * To hold the responses - */ - private responses; - /** - * Holds the next link url - */ - private nextLink; - /** - * @public - * @constructor - * Creates the BatchResponseContent instance - * @param {BatchResponseBody} response - The response body returned for batch request from server - * @returns An instance of a BatchResponseContent - */ - constructor(response: BatchResponseBody); - /** - * @private - * Creates native Response object from the json representation of it. - * @param {KeyValuePairObject} responseJSON - The response json value - * @returns The Response Object instance - */ - private createResponseObject; - /** - * @public - * Updates the Batch response content instance with given responses. - * @param {BatchResponseBody} response - The response json representing batch response message - * @returns Nothing - */ - update(response: BatchResponseBody): void; - /** - * @public - * To get the response of a request for a given request id - * @param {string} requestId - The request id value - * @returns The Response object instance for the particular request - */ - getResponseById(requestId: string): Response; - /** - * @public - * To get all the responses of the batch request - * @returns The Map of id and Response objects - */ - getResponses(): Map; - /** - * @public - * To get the iterator for the responses - * @returns The Iterable generator for the response objects - */ - getResponsesIterator(): IterableIterator<[string, Response]>; -} -export {}; diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/content/BatchResponseContent.js b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/content/BatchResponseContent.js deleted file mode 100644 index 1fd5da1..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/content/BatchResponseContent.js +++ /dev/null @@ -1,106 +0,0 @@ -"use strict"; -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.BatchResponseContent = void 0; -var tslib_1 = require("tslib"); -/** - * @class - * Class that handles BatchResponseContent - */ -var BatchResponseContent = /** @class */ (function () { - /** - * @public - * @constructor - * Creates the BatchResponseContent instance - * @param {BatchResponseBody} response - The response body returned for batch request from server - * @returns An instance of a BatchResponseContent - */ - function BatchResponseContent(response) { - this.responses = new Map(); - this.update(response); - } - /** - * @private - * Creates native Response object from the json representation of it. - * @param {KeyValuePairObject} responseJSON - The response json value - * @returns The Response Object instance - */ - BatchResponseContent.prototype.createResponseObject = function (responseJSON) { - var body = responseJSON.body; - var options = {}; - options.status = responseJSON.status; - if (responseJSON.statusText !== undefined) { - options.statusText = responseJSON.statusText; - } - options.headers = responseJSON.headers; - if (options.headers !== undefined && options.headers["Content-Type"] !== undefined) { - if (options.headers["Content-Type"].split(";")[0] === "application/json") { - var bodyString = JSON.stringify(body); - return new Response(bodyString, options); - } - } - return new Response(body, options); - }; - /** - * @public - * Updates the Batch response content instance with given responses. - * @param {BatchResponseBody} response - The response json representing batch response message - * @returns Nothing - */ - BatchResponseContent.prototype.update = function (response) { - this.nextLink = response["@odata.nextLink"]; - var responses = response.responses; - for (var i = 0, l = responses.length; i < l; i++) { - this.responses.set(responses[i].id, this.createResponseObject(responses[i])); - } - }; - /** - * @public - * To get the response of a request for a given request id - * @param {string} requestId - The request id value - * @returns The Response object instance for the particular request - */ - BatchResponseContent.prototype.getResponseById = function (requestId) { - return this.responses.get(requestId); - }; - /** - * @public - * To get all the responses of the batch request - * @returns The Map of id and Response objects - */ - BatchResponseContent.prototype.getResponses = function () { - return this.responses; - }; - /** - * @public - * To get the iterator for the responses - * @returns The Iterable generator for the response objects - */ - BatchResponseContent.prototype.getResponsesIterator = function () { - var iterator, cur; - return tslib_1.__generator(this, function (_a) { - switch (_a.label) { - case 0: - iterator = this.responses.entries(); - cur = iterator.next(); - _a.label = 1; - case 1: - if (!!cur.done) return [3 /*break*/, 3]; - return [4 /*yield*/, cur.value]; - case 2: - _a.sent(); - cur = iterator.next(); - return [3 /*break*/, 1]; - case 3: return [2 /*return*/]; - } - }); - }; - return BatchResponseContent; -}()); -exports.BatchResponseContent = BatchResponseContent; -//# sourceMappingURL=BatchResponseContent.js.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/content/BatchResponseContent.js.map b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/content/BatchResponseContent.js.map deleted file mode 100644 index 4cfe801..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/content/BatchResponseContent.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"BatchResponseContent.js","sourceRoot":"","sources":["../../../src/content/BatchResponseContent.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;AAyBH;;;GAGG;AACH;IAWC;;;;;;OAMG;IACH,8BAAmB,QAA2B;QAC7C,IAAI,CAAC,SAAS,GAAG,IAAI,GAAG,EAAE,CAAC;QAC3B,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;IACvB,CAAC;IAED;;;;;OAKG;IACK,mDAAoB,GAA5B,UAA6B,YAAgC;QAC5D,IAAM,IAAI,GAAG,YAAY,CAAC,IAAI,CAAC;QAC/B,IAAM,OAAO,GAAuB,EAAE,CAAC;QACvC,OAAO,CAAC,MAAM,GAAG,YAA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ACC,OAAO,IAAI,CAAC,SAAS,CAAC;IACvB,CAAC;IAED;;;;OAIG;IACK,mDAAoB,GAA5B;;;;;oBACO,QAAQ,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,CAAC;oBACtC,GAAG,GAAG,QAAQ,CAAC,IAAI,EAAE,CAAC;;;yBACnB,CAAC,GAAG,CAAC,IAAI;oBACf,qBAAM,GAAG,CAAC,KAAK,EAAA;;oBAAf,SAAe,CAAC;oBAChB,GAAG,GAAG,QAAQ,CAAC,IAAI,EAAE,CAAC;;;;;KAEvB;IACF,2BAAC;AAAD,CAAC,AA5FD,IA4FC;AA5FY,oDAAoB"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/index.d.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/index.d.ts deleted file mode 100644 index ad6cd33..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/index.d.ts +++ /dev/null @@ -1,48 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -/// -export { BatchRequestBody, RequestData, BatchRequestContent, BatchRequestData, BatchRequestStep } from "./content/BatchRequestContent"; -export { BatchResponseBody, BatchResponseContent } from "./content/BatchResponseContent"; -export { AuthenticationHandler } from "./middleware/AuthenticationHandler"; -export { HTTPMessageHandler } from "./middleware/HTTPMessageHandler"; -export { Middleware } from "./middleware/IMiddleware"; -export { RetryHandler } from "./middleware/RetryHandler"; -export { RedirectHandler } from "./middleware/RedirectHandler"; -export { TelemetryHandler } from "./middleware/TelemetryHandler"; -export { MiddlewareFactory } from "./middleware/MiddlewareFactory"; -export { AuthenticationHandlerOptions } from "./middleware/options/AuthenticationHandlerOptions"; -export { MiddlewareOptions } from "./middleware/options/IMiddlewareOptions"; -export { RetryHandlerOptions, ShouldRetry } from "./middleware/options/RetryHandlerOptions"; -export { RedirectHandlerOptions, ShouldRedirect } from "./middleware/options/RedirectHandlerOptions"; -export { FeatureUsageFlag, TelemetryHandlerOptions } from "./middleware/options/TelemetryHandlerOptions"; -export { ChaosHandlerOptions } from "./middleware/options/ChaosHandlerOptions"; -export { ChaosStrategy } from "./middleware/options/ChaosStrategy"; -export { ChaosHandler } from "./middleware/ChaosHandler"; -export { FileObject, LargeFileUploadSession, LargeFileUploadTask, LargeFileUploadTaskOptions, SliceType } from "./tasks/LargeFileUploadTask"; -export { OneDriveLargeFileUploadOptions, OneDriveLargeFileUploadTask } from "./tasks/OneDriveLargeFileUploadTask"; -export { getValidRangeSize } from "./tasks/OneDriveLargeFileUploadTaskUtil"; -export { StreamUpload } from "./tasks/FileUploadTask/FileObjectClasses/StreamUpload"; -export { FileUpload } from "./tasks/FileUploadTask/FileObjectClasses/FileUpload"; -export { UploadResult } from "./tasks/FileUploadTask/UploadResult"; -export { UploadEventHandlers } from "./tasks/FileUploadTask/Interfaces/IUploadEventHandlers"; -export { Range } from "./tasks/FileUploadTask/Range"; -export { GraphRequestOptions, PageCollection, PageIterator, PageIteratorCallback } from "./tasks/PageIterator"; -export { Client } from "./Client"; -export { CustomAuthenticationProvider } from "./CustomAuthenticationProvider"; -export { GraphError } from "./GraphError"; -export { GraphClientError } from "./GraphClientError"; -export { GraphRequest, URLComponents } from "./GraphRequest"; -export { AuthProvider } from "./IAuthProvider"; -export { AuthenticationProvider } from "./IAuthenticationProvider"; -export { AuthenticationProviderOptions } from "./IAuthenticationProviderOptions"; -export { AuthProviderCallback } from "./IAuthProviderCallback"; -export { ClientOptions } from "./IClientOptions"; -export { Context } from "./IContext"; -export { FetchOptions, NodeFetchInit } from "./IFetchOptions"; -export { GraphRequestCallback } from "./IGraphRequestCallback"; -export { Options } from "./IOptions"; -export { ResponseType } from "./ResponseType"; diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/index.js b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/index.js deleted file mode 100644 index 7a5f0b2..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/index.js +++ /dev/null @@ -1,71 +0,0 @@ -"use strict"; -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ResponseType = exports.GraphRequest = exports.GraphClientError = exports.GraphError = exports.CustomAuthenticationProvider = exports.Client = exports.PageIterator = exports.Range = exports.UploadResult = exports.FileUpload = exports.StreamUpload = exports.getValidRangeSize = exports.OneDriveLargeFileUploadTask = exports.LargeFileUploadTask = exports.ChaosHandler = exports.ChaosStrategy = exports.ChaosHandlerOptions = exports.TelemetryHandlerOptions = exports.FeatureUsageFlag = exports.RedirectHandlerOptions = exports.RetryHandlerOptions = exports.AuthenticationHandlerOptions = exports.MiddlewareFactory = exports.TelemetryHandler = exports.RedirectHandler = exports.RetryHandler = exports.HTTPMessageHandler = exports.AuthenticationHandler = exports.BatchResponseContent = exports.BatchRequestContent = void 0; -// eslint-disable-next-line @typescript-eslint/triple-slash-reference -/// -var BatchRequestContent_1 = require("./content/BatchRequestContent"); -Object.defineProperty(exports, "BatchRequestContent", { enumerable: true, get: function () { return BatchRequestContent_1.BatchRequestContent; } }); -var BatchResponseContent_1 = require("./content/BatchResponseContent"); -Object.defineProperty(exports, "BatchResponseContent", { enumerable: true, get: function () { return BatchResponseContent_1.BatchResponseContent; } }); -var AuthenticationHandler_1 = require("./middleware/AuthenticationHandler"); -Object.defineProperty(exports, "AuthenticationHandler", { enumerable: true, get: function () { return AuthenticationHandler_1.AuthenticationHandler; } }); -var HTTPMessageHandler_1 = require("./middleware/HTTPMessageHandler"); -Object.defineProperty(exports, "HTTPMessageHandler", { enumerable: true, get: function () { return HTTPMessageHandler_1.HTTPMessageHandler; } }); -var RetryHandler_1 = require("./middleware/RetryHandler"); -Object.defineProperty(exports, "RetryHandler", { enumerable: true, get: function () { return RetryHandler_1.RetryHandler; } }); -var RedirectHandler_1 = require("./middleware/RedirectHandler"); -Object.defineProperty(exports, "RedirectHandler", { enumerable: true, get: function () { return RedirectHandler_1.RedirectHandler; } }); -var TelemetryHandler_1 = require("./middleware/TelemetryHandler"); -Object.defineProperty(exports, "TelemetryHandler", { enumerable: true, get: function () { return TelemetryHandler_1.TelemetryHandler; } }); -var MiddlewareFactory_1 = require("./middleware/MiddlewareFactory"); -Object.defineProperty(exports, "MiddlewareFactory", { enumerable: true, get: function () { return MiddlewareFactory_1.MiddlewareFactory; } }); -var AuthenticationHandlerOptions_1 = require("./middleware/options/AuthenticationHandlerOptions"); -Object.defineProperty(exports, "AuthenticationHandlerOptions", { enumerable: true, get: function () { return AuthenticationHandlerOptions_1.AuthenticationHandlerOptions; } }); -var RetryHandlerOptions_1 = require("./middleware/options/RetryHandlerOptions"); -Object.defineProperty(exports, "RetryHandlerOptions", { enumerable: true, get: function () { return RetryHandlerOptions_1.RetryHandlerOptions; } }); -var RedirectHandlerOptions_1 = require("./middleware/options/RedirectHandlerOptions"); -Object.defineProperty(exports, "RedirectHandlerOptions", { enumerable: true, get: function () { return RedirectHandlerOptions_1.RedirectHandlerOptions; } }); -var TelemetryHandlerOptions_1 = require("./middleware/options/TelemetryHandlerOptions"); -Object.defineProperty(exports, "FeatureUsageFlag", { enumerable: true, get: function () { return TelemetryHandlerOptions_1.FeatureUsageFlag; } }); -Object.defineProperty(exports, "TelemetryHandlerOptions", { enumerable: true, get: function () { return TelemetryHandlerOptions_1.TelemetryHandlerOptions; } }); -var ChaosHandlerOptions_1 = require("./middleware/options/ChaosHandlerOptions"); -Object.defineProperty(exports, "ChaosHandlerOptions", { enumerable: true, get: function () { return ChaosHandlerOptions_1.ChaosHandlerOptions; } }); -var ChaosStrategy_1 = require("./middleware/options/ChaosStrategy"); -Object.defineProperty(exports, "ChaosStrategy", { enumerable: true, get: function () { return ChaosStrategy_1.ChaosStrategy; } }); -var ChaosHandler_1 = require("./middleware/ChaosHandler"); -Object.defineProperty(exports, "ChaosHandler", { enumerable: true, get: function () { return ChaosHandler_1.ChaosHandler; } }); -var LargeFileUploadTask_1 = require("./tasks/LargeFileUploadTask"); -Object.defineProperty(exports, "LargeFileUploadTask", { enumerable: true, get: function () { return LargeFileUploadTask_1.LargeFileUploadTask; } }); -var OneDriveLargeFileUploadTask_1 = require("./tasks/OneDriveLargeFileUploadTask"); -Object.defineProperty(exports, "OneDriveLargeFileUploadTask", { enumerable: true, get: function () { return OneDriveLargeFileUploadTask_1.OneDriveLargeFileUploadTask; } }); -var OneDriveLargeFileUploadTaskUtil_1 = require("./tasks/OneDriveLargeFileUploadTaskUtil"); -Object.defineProperty(exports, "getValidRangeSize", { enumerable: true, get: function () { return OneDriveLargeFileUploadTaskUtil_1.getValidRangeSize; } }); -var StreamUpload_1 = require("./tasks/FileUploadTask/FileObjectClasses/StreamUpload"); -Object.defineProperty(exports, "StreamUpload", { enumerable: true, get: function () { return StreamUpload_1.StreamUpload; } }); -var FileUpload_1 = require("./tasks/FileUploadTask/FileObjectClasses/FileUpload"); -Object.defineProperty(exports, "FileUpload", { enumerable: true, get: function () { return FileUpload_1.FileUpload; } }); -var UploadResult_1 = require("./tasks/FileUploadTask/UploadResult"); -Object.defineProperty(exports, "UploadResult", { enumerable: true, get: function () { return UploadResult_1.UploadResult; } }); -var Range_1 = require("./tasks/FileUploadTask/Range"); -Object.defineProperty(exports, "Range", { enumerable: true, get: function () { return Range_1.Range; } }); -var PageIterator_1 = require("./tasks/PageIterator"); -Object.defineProperty(exports, "PageIterator", { enumerable: true, get: function () { return PageIterator_1.PageIterator; } }); -var Client_1 = require("./Client"); -Object.defineProperty(exports, "Client", { enumerable: true, get: function () { return Client_1.Client; } }); -var CustomAuthenticationProvider_1 = require("./CustomAuthenticationProvider"); -Object.defineProperty(exports, "CustomAuthenticationProvider", { enumerable: true, get: function () { return CustomAuthenticationProvider_1.CustomAuthenticationProvider; } }); -var GraphError_1 = require("./GraphError"); -Object.defineProperty(exports, "GraphError", { enumerable: true, get: function () { return GraphError_1.GraphError; } }); -var GraphClientError_1 = require("./GraphClientError"); -Object.defineProperty(exports, "GraphClientError", { enumerable: true, get: function () { return GraphClientError_1.GraphClientError; } }); -var GraphRequest_1 = require("./GraphRequest"); -Object.defineProperty(exports, "GraphRequest", { enumerable: true, get: function () { return GraphRequest_1.GraphRequest; } }); -var ResponseType_1 = require("./ResponseType"); -Object.defineProperty(exports, "ResponseType", { enumerable: true, get: function () { return ResponseType_1.ResponseType; } }); -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/index.js.map b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/index.js.map deleted file mode 100644 index 5496e3a..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,qEAAqE;AACrE,yCAAyC;AAEzC,qEAAuI;AAA/F,0HAAA,mBAAmB,OAAA;AAC3D,uEAAyF;AAA7D,4HAAA,oBAAoB,OAAA;AAEhD,4EAA2E;AAAlE,8HAAA,qBAAqB,OAAA;AAC9B,sEAAqE;AAA5D,wHAAA,kBAAkB,OAAA;AAE3B,0DAAyD;AAAhD,4GAAA,YAAY,OAAA;AACrB,gEAA+D;AAAtD,kHAAA,eAAe,OAAA;AACxB,kEAAiE;AAAxD,oHAAA,gBAAgB,OAAA;AACzB,oEAAmE;AAA1D,sHAAA,iBAAiB,OAAA;AAC1B,kGAAiG;AAAxF,4IAAA,4BAA4B,OAAA;AAErC,gFAA4F;AAAnF,0HAAA,mBAAmB,OAAA;AAC5B,sFAAqG;AAA5F,gIAAA,sBAAsB,OAAA;AAC/B,wFAAyG;AAAhG,2HAAA,gBAAgB,OAAA;AAAE,kIAAA,uBAAuB,OAAA;AAClD,gFAA+E;AAAtE,0HAAA,mBAAmB,OAAA;AAC5B,oEAAmE;AAA1D,8GAAA,aAAa,OAAA;AACtB,0DAAyD;AAAhD,4GAAA,YAAY,OAAA;AAErB,mEAA6I;AAAhG,0HAAA,mBAAmB,OAAA;AAChE,mFAAkH;AAAzE,0IAAA,2BAA2B,OAAA;AACpE,2FAA4E;AAAnE,oIAAA,iBAAiB,OAAA;AAC1B,sFAAqF;AAA5E,4GAAA,YAAY,OAAA;AACrB,kFAAiF;AAAxE,wGAAA,UAAU,OAAA;AACnB,oEAAmE;AAA1D,4GAAA,YAAY,OAAA;AAErB,sDAAqD;AAA5C,8FAAA,KAAK,OAAA;AACd,qDAA+G;AAAjE,4GAAA,YAAY,OAAA;AAE1D,mCAAkC;AAAzB,gGAAA,MAAM,OAAA;AACf,+EAA8E;AAArE,4IAAA,4BAA4B,OAAA;AACrC,2CAA0C;AAAjC,wGAAA,UAAU,OAAA;AACnB,uDAAsD;AAA7C,oHAAA,gBAAgB,OAAA;AACzB,+CAA6D;AAApD,4GAAA,YAAY,OAAA;AAUrB,+CAA8C;AAArC,4GAAA,YAAY,OAAA"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/AuthenticationHandler.d.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/AuthenticationHandler.d.ts deleted file mode 100644 index 21aab8a..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/AuthenticationHandler.d.ts +++ /dev/null @@ -1,53 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -import { AuthenticationProvider } from "../IAuthenticationProvider"; -import { Context } from "../IContext"; -import { Middleware } from "./IMiddleware"; -/** - * @class - * @implements Middleware - * Class representing AuthenticationHandler - */ -export declare class AuthenticationHandler implements Middleware { - /** - * @private - * A member representing the authorization header name - */ - private static AUTHORIZATION_HEADER; - /** - * @private - * A member to hold an AuthenticationProvider instance - */ - private authenticationProvider; - /** - * @private - * A member to hold next middleware in the middleware chain - */ - private nextMiddleware; - /** - * @public - * @constructor - * Creates an instance of AuthenticationHandler - * @param {AuthenticationProvider} authenticationProvider - The authentication provider for the authentication handler - */ - constructor(authenticationProvider: AuthenticationProvider); - /** - * @public - * @async - * To execute the current middleware - * @param {Context} context - The context object of the request - * @returns A Promise that resolves to nothing - */ - execute(context: Context): Promise; - /** - * @public - * To set the next middleware in the chain - * @param {Middleware} next - The middleware instance - * @returns Nothing - */ - setNext(next: Middleware): void; -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/AuthenticationHandler.js b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/AuthenticationHandler.js deleted file mode 100644 index 3c4698b..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/AuthenticationHandler.js +++ /dev/null @@ -1,97 +0,0 @@ -"use strict"; -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.AuthenticationHandler = void 0; -var tslib_1 = require("tslib"); -/** - * @module AuthenticationHandler - */ -var GraphRequestUtil_1 = require("../GraphRequestUtil"); -var MiddlewareControl_1 = require("./MiddlewareControl"); -var MiddlewareUtil_1 = require("./MiddlewareUtil"); -var AuthenticationHandlerOptions_1 = require("./options/AuthenticationHandlerOptions"); -var TelemetryHandlerOptions_1 = require("./options/TelemetryHandlerOptions"); -/** - * @class - * @implements Middleware - * Class representing AuthenticationHandler - */ -var AuthenticationHandler = /** @class */ (function () { - /** - * @public - * @constructor - * Creates an instance of AuthenticationHandler - * @param {AuthenticationProvider} authenticationProvider - The authentication provider for the authentication handler - */ - function AuthenticationHandler(authenticationProvider) { - this.authenticationProvider = authenticationProvider; - } - /** - * @public - * @async - * To execute the current middleware - * @param {Context} context - The context object of the request - * @returns A Promise that resolves to nothing - */ - AuthenticationHandler.prototype.execute = function (context) { - return tslib_1.__awaiter(this, void 0, void 0, function () { - var url, options, authenticationProvider, authenticationProviderOptions, token, bearerKey; - return tslib_1.__generator(this, function (_a) { - switch (_a.label) { - case 0: - url = typeof context.request === "string" ? context.request : context.request.url; - if (!((0, GraphRequestUtil_1.isGraphURL)(url) || (context.customHosts && (0, GraphRequestUtil_1.isCustomHost)(url, context.customHosts)))) return [3 /*break*/, 2]; - options = void 0; - if (context.middlewareControl instanceof MiddlewareControl_1.MiddlewareControl) { - options = context.middlewareControl.getMiddlewareOptions(AuthenticationHandlerOptions_1.AuthenticationHandlerOptions); - } - authenticationProvider = void 0; - authenticationProviderOptions = void 0; - if (options) { - authenticationProvider = options.authenticationProvider; - authenticationProviderOptions = options.authenticationProviderOptions; - } - if (!authenticationProvider) { - authenticationProvider = this.authenticationProvider; - } - return [4 /*yield*/, authenticationProvider.getAccessToken(authenticationProviderOptions)]; - case 1: - token = _a.sent(); - bearerKey = "Bearer ".concat(token); - (0, MiddlewareUtil_1.appendRequestHeader)(context.request, context.options, AuthenticationHandler.AUTHORIZATION_HEADER, bearerKey); - TelemetryHandlerOptions_1.TelemetryHandlerOptions.updateFeatureUsageFlag(context, TelemetryHandlerOptions_1.FeatureUsageFlag.AUTHENTICATION_HANDLER_ENABLED); - return [3 /*break*/, 3]; - case 2: - if (context.options.headers) { - delete context.options.headers[AuthenticationHandler.AUTHORIZATION_HEADER]; - } - _a.label = 3; - case 3: return [4 /*yield*/, this.nextMiddleware.execute(context)]; - case 4: return [2 /*return*/, _a.sent()]; - } - }); - }); - }; - /** - * @public - * To set the next middleware in the chain - * @param {Middleware} next - The middleware instance - * @returns Nothing - */ - AuthenticationHandler.prototype.setNext = function (next) { - this.nextMiddleware = next; - }; - /** - * @private - * A member representing the authorization header name - */ - AuthenticationHandler.AUTHORIZATION_HEADER = "Authorization"; - return AuthenticationHandler; -}()); -exports.AuthenticationHandler = AuthenticationHandler; -//# sourceMappingURL=AuthenticationHandler.js.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/AuthenticationHandler.js.map b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/AuthenticationHandler.js.map deleted file mode 100644 index a2a6b58..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/AuthenticationHandler.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AuthenticationHandler.js","sourceRoot":"","sources":["../../../src/middleware/AuthenticationHandler.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;AAEH;;GAEG;AAEH,wDAA+D;AAK/D,yDAAwD;AACxD,mDAAuD;AACvD,uFAAsF;AACtF,6EAA8F;AAE9F;;;;GAIG;AACH;IAmBC;;;;;OAKG;IACH,+BAAmB,sBAA8C;QAChE,IAAI,CAAC,sBAAsB,GAAG,sBAAsB,CAAC;IACtD,CAAC;IAED;;;;;;OAMG;IACU,uCAAO,GAApB,UAAqB,OAAgB;;;;;;wBAC9B,GAAG,GAAG,OAAO,OAAO,CAAC,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC;6BACpF,CAAA,IAAA,6BAAU,EAAC,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,WAAW,IAAI,IAAA,+BAAY,EAAC,GAAG,EAAE,OAAO,CAAC,WAAW,CAAC,CAAC,CAAA,EAAlF,wBAAkF;wBACjF,OAAO,SAA8B,CAAC;wBAC1C,IAAI,OAAO,CAAC,iBAAiB,YAAY,qCAAiB,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/middleware/ChaosHandler.d.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/ChaosHandler.d.ts deleted file mode 100644 index 5d15cdd..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/ChaosHandler.d.ts +++ /dev/null @@ -1,123 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -/** - * @module ChaosHandler - */ -import { Context } from "../IContext"; -import { Middleware } from "./IMiddleware"; -import { ChaosHandlerOptions } from "./options/ChaosHandlerOptions"; -/** - * Class representing ChaosHandler - * @class - * Class - * @implements Middleware - */ -export declare class ChaosHandler implements Middleware { - /** - * A member holding options to customize the handler behavior - * - * @private - */ - private options; - /** - * container for the manual map that has been written by the client - * - * @private - */ - private manualMap; - /** - * @private - * A member to hold next middleware in the middleware chain - */ - private nextMiddleware; - /** - * @public - * @constructor - * To create an instance of Testing Handler - * @param {ChaosHandlerOptions} [options = new ChaosHandlerOptions()] - The testing handler options instance - * @param manualMap - The Map passed by user containing url-statusCode info - * @returns An instance of Testing Handler - */ - constructor(options?: ChaosHandlerOptions, manualMap?: Map>); - /** - * Generates responseHeader - * @private - * @param {ChaosHandlerOptions} chaosHandlerOptions - The ChaosHandlerOptions object - * @param {string} requestID - request id - * @param {string} requestDate - date of the request - * @returns response Header - */ - private createResponseHeaders; - /** - * Generates responseBody - * @private - * @param {ChaosHandlerOptions} chaosHandlerOptions - The ChaosHandlerOptions object - * @param {string} requestID - request id - * @param {string} requestDate - date of the request - * * @returns response body - */ - private createResponseBody; - /** - * creates a response - * @private - * @param {ChaosHandlerOptions} chaosHandlerOptions - The ChaosHandlerOptions object - * @param {Context} context - Contains the context of the request - */ - private createResponse; - /** - * Decides whether to send the request to the graph or not - * @private - * @param {ChaosHandlerOptions} chaosHandlerOptions - A ChaosHandlerOptions object - * @param {Context} context - Contains the context of the request - * @returns nothing - */ - private sendRequest; - /** - * Fetches a random status code for the RANDOM mode from the predefined array - * @private - * @param {string} requestMethod - the API method for the request - * @returns a random status code from a given set of status codes - */ - private getRandomStatusCode; - /** - * To fetch the relative URL out of the complete URL using a predefined regex pattern - * @private - * @param {string} urlMethod - the complete URL - * @returns the string as relative URL - */ - private getRelativeURL; - /** - * To fetch the status code from the map(if needed), then returns response by calling createResponse - * @private - * @param {ChaosHandlerOptions} chaosHandlerOptions - The ChaosHandlerOptions object - * @param {string} requestURL - the URL for the request - * @param {string} requestMethod - the API method for the request - */ - private setStatusCode; - /** - * To get the options for execution of the middleware - * @private - * @param {Context} context - The context object - * @returns options for middleware execution - */ - private getOptions; - /** - * To execute the current middleware - * @public - * @async - * @param {Context} context - The context object of the request - * @returns A Promise that resolves to nothing - */ - execute(context: Context): Promise; - /** - * @public - * To set the next middleware in the chain - * @param {Middleware} next - The middleware instance - * @returns Nothing - */ - setNext(next: Middleware): void; -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/ChaosHandler.js b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/ChaosHandler.js deleted file mode 100644 index 04c4a91..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/ChaosHandler.js +++ /dev/null @@ -1,245 +0,0 @@ -"use strict"; -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ChaosHandler = void 0; -var tslib_1 = require("tslib"); -var MiddlewareControl_1 = require("./MiddlewareControl"); -var MiddlewareUtil_1 = require("./MiddlewareUtil"); -var ChaosHandlerData_1 = require("./options/ChaosHandlerData"); -var ChaosHandlerOptions_1 = require("./options/ChaosHandlerOptions"); -var ChaosStrategy_1 = require("./options/ChaosStrategy"); -/** - * Class representing ChaosHandler - * @class - * Class - * @implements Middleware - */ -var ChaosHandler = /** @class */ (function () { - /** - * @public - * @constructor - * To create an instance of Testing Handler - * @param {ChaosHandlerOptions} [options = new ChaosHandlerOptions()] - The testing handler options instance - * @param manualMap - The Map passed by user containing url-statusCode info - * @returns An instance of Testing Handler - */ - function ChaosHandler(options, manualMap) { - if (options === void 0) { options = new ChaosHandlerOptions_1.ChaosHandlerOptions(); } - this.options = options; - this.manualMap = manualMap; - } - /** - * Generates responseHeader - * @private - * @param {ChaosHandlerOptions} chaosHandlerOptions - The ChaosHandlerOptions object - * @param {string} requestID - request id - * @param {string} requestDate - date of the request - * @returns response Header - */ - ChaosHandler.prototype.createResponseHeaders = function (chaosHandlerOptions, requestID, requestDate) { - var responseHeader = chaosHandlerOptions.headers ? new Headers(chaosHandlerOptions.headers) : new Headers(); - responseHeader.append("Cache-Control", "no-store"); - responseHeader.append("request-id", requestID); - responseHeader.append("client-request-id", requestID); - responseHeader.append("x-ms-ags-diagnostic", ""); - responseHeader.append("Date", requestDate); - responseHeader.append("Strict-Transport-Security", ""); - if (chaosHandlerOptions.statusCode === 429) { - // throttling case has to have a timeout scenario - responseHeader.append("retry-after", "3"); - } - return responseHeader; - }; - /** - * Generates responseBody - * @private - * @param {ChaosHandlerOptions} chaosHandlerOptions - The ChaosHandlerOptions object - * @param {string} requestID - request id - * @param {string} requestDate - date of the request - * * @returns response body - */ - ChaosHandler.prototype.createResponseBody = function (chaosHandlerOptions, requestID, requestDate) { - if (chaosHandlerOptions.responseBody) { - return chaosHandlerOptions.responseBody; - } - var body; - if (chaosHandlerOptions.statusCode >= 400) { - var codeMessage = ChaosHandlerData_1.httpStatusCode[chaosHandlerOptions.statusCode]; - var errMessage = chaosHandlerOptions.statusMessage; - body = { - error: { - code: codeMessage, - message: errMessage, - innerError: { - "request-id": requestID, - date: requestDate, - }, - }, - }; - } - else { - body = {}; - } - return body; - }; - /** - * creates a response - * @private - * @param {ChaosHandlerOptions} chaosHandlerOptions - The ChaosHandlerOptions object - * @param {Context} context - Contains the context of the request - */ - ChaosHandler.prototype.createResponse = function (chaosHandlerOptions, context) { - var requestURL = context.request; - var requestID = (0, MiddlewareUtil_1.generateUUID)(); - var requestDate = new Date(); - var responseHeader = this.createResponseHeaders(chaosHandlerOptions, requestID, requestDate.toString()); - var responseBody = this.createResponseBody(chaosHandlerOptions, requestID, requestDate.toString()); - var init = { url: requestURL, status: chaosHandlerOptions.statusCode, statusText: chaosHandlerOptions.statusMessage, headers: responseHeader }; - context.response = new Response(typeof responseBody === "string" ? responseBody : JSON.stringify(responseBody), init); - }; - /** - * Decides whether to send the request to the graph or not - * @private - * @param {ChaosHandlerOptions} chaosHandlerOptions - A ChaosHandlerOptions object - * @param {Context} context - Contains the context of the request - * @returns nothing - */ - ChaosHandler.prototype.sendRequest = function (chaosHandlerOptions, context) { - return tslib_1.__awaiter(this, void 0, void 0, function () { - return tslib_1.__generator(this, function (_a) { - switch (_a.label) { - case 0: - this.setStatusCode(chaosHandlerOptions, context.request, context.options.method); - if (!((chaosHandlerOptions.chaosStrategy === ChaosStrategy_1.ChaosStrategy.MANUAL && !this.nextMiddleware) || Math.floor(Math.random() * 100) < chaosHandlerOptions.chaosPercentage)) return [3 /*break*/, 1]; - this.createResponse(chaosHandlerOptions, context); - return [3 /*break*/, 3]; - case 1: - if (!this.nextMiddleware) return [3 /*break*/, 3]; - return [4 /*yield*/, this.nextMiddleware.execute(context)]; - case 2: - _a.sent(); - _a.label = 3; - case 3: return [2 /*return*/]; - } - }); - }); - }; - /** - * Fetches a random status code for the RANDOM mode from the predefined array - * @private - * @param {string} requestMethod - the API method for the request - * @returns a random status code from a given set of status codes - */ - ChaosHandler.prototype.getRandomStatusCode = function (requestMethod) { - var statusCodeArray = ChaosHandlerData_1.methodStatusCode[requestMethod]; - return statusCodeArray[Math.floor(Math.random() * statusCodeArray.length)]; - }; - /** - * To fetch the relative URL out of the complete URL using a predefined regex pattern - * @private - * @param {string} urlMethod - the complete URL - * @returns the string as relative URL - */ - ChaosHandler.prototype.getRelativeURL = function (urlMethod) { - var pattern = /https?:\/\/graph\.microsoft\.com\/[^/]+(.+?)(\?|$)/; - var relativeURL; - if (pattern.exec(urlMethod) !== null) { - relativeURL = pattern.exec(urlMethod)[1]; - } - return relativeURL; - }; - /** - * To fetch the status code from the map(if needed), then returns response by calling createResponse - * @private - * @param {ChaosHandlerOptions} chaosHandlerOptions - The ChaosHandlerOptions object - * @param {string} requestURL - the URL for the request - * @param {string} requestMethod - the API method for the request - */ - ChaosHandler.prototype.setStatusCode = function (chaosHandlerOptions, requestURL, requestMethod) { - var _this = this; - if (chaosHandlerOptions.chaosStrategy === ChaosStrategy_1.ChaosStrategy.MANUAL) { - if (chaosHandlerOptions.statusCode === undefined) { - // manual mode with no status code, can be a global level or request level without statusCode - var relativeURL_1 = this.getRelativeURL(requestURL); - if (this.manualMap.get(relativeURL_1) !== undefined) { - // checking Manual Map for exact match - if (this.manualMap.get(relativeURL_1).get(requestMethod) !== undefined) { - chaosHandlerOptions.statusCode = this.manualMap.get(relativeURL_1).get(requestMethod); - } - // else statusCode would be undefined - } - else { - // checking for regex match if exact match doesn't work - this.manualMap.forEach(function (value, key) { - var regexURL = new RegExp(key + "$"); - if (regexURL.test(relativeURL_1)) { - if (_this.manualMap.get(key).get(requestMethod) !== undefined) { - chaosHandlerOptions.statusCode = _this.manualMap.get(key).get(requestMethod); - } - // else statusCode would be undefined - } - }); - } - // Case of redirection or request url not in map ---> statusCode would be undefined - } - } - else { - // Handling the case of Random here - chaosHandlerOptions.statusCode = this.getRandomStatusCode(requestMethod); - // else statusCode would be undefined - } - }; - /** - * To get the options for execution of the middleware - * @private - * @param {Context} context - The context object - * @returns options for middleware execution - */ - ChaosHandler.prototype.getOptions = function (context) { - var options; - if (context.middlewareControl instanceof MiddlewareControl_1.MiddlewareControl) { - options = context.middlewareControl.getMiddlewareOptions(ChaosHandlerOptions_1.ChaosHandlerOptions); - } - if (typeof options === "undefined") { - options = Object.assign(new ChaosHandlerOptions_1.ChaosHandlerOptions(), this.options); - } - return options; - }; - /** - * To execute the current middleware - * @public - * @async - * @param {Context} context - The context object of the request - * @returns A Promise that resolves to nothing - */ - ChaosHandler.prototype.execute = function (context) { - return tslib_1.__awaiter(this, void 0, void 0, function () { - var chaosHandlerOptions; - return tslib_1.__generator(this, function (_a) { - switch (_a.label) { - case 0: - chaosHandlerOptions = this.getOptions(context); - return [4 /*yield*/, this.sendRequest(chaosHandlerOptions, context)]; - case 1: return [2 /*return*/, _a.sent()]; - } - }); - }); - }; - /** - * @public - * To set the next middleware in the chain - * @param {Middleware} next - The middleware instance - * @returns Nothing - */ - ChaosHandler.prototype.setNext = function (next) { - this.nextMiddleware = next; - }; - return ChaosHandler; -}()); -exports.ChaosHandler = ChaosHandler; -//# sourceMappingURL=ChaosHandler.js.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/ChaosHandler.js.map b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/ChaosHandler.js.map deleted file mode 100644 index 0ad32f1..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/ChaosHandler.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ChaosHandler.js","sourceRoot":"","sources":["../../../src/middleware/ChaosHandler.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;AASH,yDAAwD;AACxD,mDAAgD;AAChD,+DAA8E;AAC9E,qEAAoE;AACpE,yDAAwD;AAExD;;;;;GAKG;AACH;IAqBC;;;;;;;OAOG;IACH,sBAAmB,OAAwD,EAAE,SAA4C;QAAtG,wBAAA,EAAA,cAAmC,yCAAmB,EAAE;QAC1E,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;IAC5B,CAAC;IAED;;;;;;;OAOG;IACK,4CAAqB,GAA7B,UAA8B,m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AAI,CAAC,OAAO,CAAC,CAAC;SACjE;QAED,OAAO,OAAO,CAAC;IAChB,CAAC;IAED;;;;;;OAMG;IACU,8BAAO,GAApB,UAAqB,OAAgB;;;;;;wBAC9B,mBAAmB,GAAwB,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;wBACnE,qBAAM,IAAI,CAAC,WAAW,CAAC,mBAAmB,EAAE,OAAO,CAAC,EAAA;4BAA3D,sBAAO,SAAoD,EAAC;;;;KAC5D;IAED;;;;;OAKG;IACI,8BAAO,GAAd,UAAe,IAAgB;QAC9B,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC;IAC5B,CAAC;IACF,mBAAC;AAAD,CAAC,AArOD,IAqOC;AArOY,oCAAY"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/HTTPMessageHandler.d.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/HTTPMessageHandler.d.ts deleted file mode 100644 index 14b30de..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/HTTPMessageHandler.d.ts +++ /dev/null @@ -1,26 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -/** - * @module HTTPMessageHandler - */ -import { Context } from "../IContext"; -import { Middleware } from "./IMiddleware"; -/** - * @class - * @implements Middleware - * Class for HTTPMessageHandler - */ -export declare class HTTPMessageHandler implements Middleware { - /** - * @public - * @async - * To execute the current middleware - * @param {Context} context - The request context object - * @returns A promise that resolves to nothing - */ - execute(context: Context): Promise; -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/HTTPMessageHandler.js b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/HTTPMessageHandler.js deleted file mode 100644 index 4ce0e7f..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/HTTPMessageHandler.js +++ /dev/null @@ -1,44 +0,0 @@ -"use strict"; -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.HTTPMessageHandler = void 0; -var tslib_1 = require("tslib"); -/** - * @class - * @implements Middleware - * Class for HTTPMessageHandler - */ -var HTTPMessageHandler = /** @class */ (function () { - function HTTPMessageHandler() { - } - /** - * @public - * @async - * To execute the current middleware - * @param {Context} context - The request context object - * @returns A promise that resolves to nothing - */ - HTTPMessageHandler.prototype.execute = function (context) { - return tslib_1.__awaiter(this, void 0, void 0, function () { - var _a; - return tslib_1.__generator(this, function (_b) { - switch (_b.label) { - case 0: - _a = context; - return [4 /*yield*/, fetch(context.request, context.options)]; - case 1: - _a.response = _b.sent(); - return [2 /*return*/]; - } - }); - }); - }; - return HTTPMessageHandler; -}()); -exports.HTTPMessageHandler = HTTPMessageHandler; -//# sourceMappingURL=HTTPMessageHandler.js.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/HTTPMessageHandler.js.map b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/HTTPMessageHandler.js.map deleted file mode 100644 index fa2f987..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/HTTPMessageHandler.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"HTTPMessageHandler.js","sourceRoot":"","sources":["../../../src/middleware/HTTPMessageHandler.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;AASH;;;;GAIG;AACH;IAAA;IAWA,CAAC;IAVA;;;;;;OAMG;IACU,oCAAO,GAApB,UAAqB,OAAgB;;;;;;wBACpC,KAAA,OAAO,CAAA;wBAAY,qBAAM,KAAK,CAAC,OAAO,CAAC,OAAO,EAAE,OAAO,CAAC,OAAO,CAAC,EAAA;;wBAAhE,GAAQ,QAAQ,GAAG,SAA6C,CAAC;;;;;KACjE;IACF,yBAAC;AAAD,CAAC,AAXD,IAWC;AAXY,gDAAkB"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/IMiddleware.d.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/IMiddleware.d.ts deleted file mode 100644 index 878ea9b..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/IMiddleware.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -import { Context } from "../IContext"; -/** - * @interface - * @property {Function} execute - The method to execute the middleware - * @property {Function} [setNext] - A method to set the next middleware in the chain - */ -export interface Middleware { - execute: (context: Context) => Promise; - setNext?: (middleware: Middleware) => void; -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/IMiddleware.js b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/IMiddleware.js deleted file mode 100644 index 8bcf8a1..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/IMiddleware.js +++ /dev/null @@ -1,9 +0,0 @@ -"use strict"; -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=IMiddleware.js.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/IMiddleware.js.map b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/IMiddleware.js.map deleted file mode 100644 index bb9bf1b..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/IMiddleware.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"IMiddleware.js","sourceRoot":"","sources":["../../../src/middleware/IMiddleware.ts"],"names":[],"mappings":";AAAA;;;;;GAKG"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/MiddlewareControl.d.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/MiddlewareControl.d.ts deleted file mode 100644 index 8fff536..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/MiddlewareControl.d.ts +++ /dev/null @@ -1,48 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -/** - * @module MiddlewareControl - */ -import { MiddlewareOptions } from "./options/IMiddlewareOptions"; -/** - * @class - * Class representing MiddlewareControl - */ -export declare class MiddlewareControl { - /** - * @private - * A member holding map of MiddlewareOptions - */ - private middlewareOptions; - /** - * @public - * @constructor - * Creates an instance of MiddlewareControl - * @param {MiddlewareOptions[]} [middlewareOptions = []] - The array of middlewareOptions - * @returns The instance of MiddlewareControl - */ - constructor(middlewareOptions?: MiddlewareOptions[]); - /** - * @public - * To get the middleware option using the class of the option - * @param {Function} fn - The class of the strongly typed option class - * @returns The middleware option - * @example - * // if you wanted to return the middleware option associated with this class (MiddlewareControl) - * // call this function like this: - * getMiddlewareOptions(MiddlewareControl) - */ - getMiddlewareOptions(fn: Function): MiddlewareOptions; - /** - * @public - * To set the middleware options using the class of the option - * @param {Function} fn - The class of the strongly typed option class - * @param {MiddlewareOptions} option - The strongly typed middleware option - * @returns nothing - */ - setMiddlewareOptions(fn: Function, option: MiddlewareOptions): void; -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/MiddlewareControl.js b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/MiddlewareControl.js deleted file mode 100644 index f122c46..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/MiddlewareControl.js +++ /dev/null @@ -1,57 +0,0 @@ -"use strict"; -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.MiddlewareControl = void 0; -/** - * @class - * Class representing MiddlewareControl - */ -var MiddlewareControl = /** @class */ (function () { - /** - * @public - * @constructor - * Creates an instance of MiddlewareControl - * @param {MiddlewareOptions[]} [middlewareOptions = []] - The array of middlewareOptions - * @returns The instance of MiddlewareControl - */ - function MiddlewareControl(middlewareOptions) { - if (middlewareOptions === void 0) { middlewareOptions = []; } - this.middlewareOptions = new Map(); - for (var _i = 0, middlewareOptions_1 = middlewareOptions; _i < middlewareOptions_1.length; _i++) { - var option = middlewareOptions_1[_i]; - var fn = option.constructor; - this.middlewareOptions.set(fn, option); - } - } - /** - * @public - * To get the middleware option using the class of the option - * @param {Function} fn - The class of the strongly typed option class - * @returns The middleware option - * @example - * // if you wanted to return the middleware option associated with this class (MiddlewareControl) - * // call this function like this: - * getMiddlewareOptions(MiddlewareControl) - */ - MiddlewareControl.prototype.getMiddlewareOptions = function (fn) { - return this.middlewareOptions.get(fn); - }; - /** - * @public - * To set the middleware options using the class of the option - * @param {Function} fn - The class of the strongly typed option class - * @param {MiddlewareOptions} option - The strongly typed middleware option - * @returns nothing - */ - MiddlewareControl.prototype.setMiddlewareOptions = function (fn, option) { - this.middlewareOptions.set(fn, option); - }; - return MiddlewareControl; -}()); -exports.MiddlewareControl = MiddlewareControl; -//# sourceMappingURL=MiddlewareControl.js.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/MiddlewareControl.js.map b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/MiddlewareControl.js.map deleted file mode 100644 index 5153179..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/MiddlewareControl.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"MiddlewareControl.js","sourceRoot":"","sources":["../../../src/middleware/MiddlewareControl.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAQH;;;GAGG;AACH;IAOC;;;;;;OAMG;IACH,2BAAmB,iBAA2C;QAA3C,kCAAA,EAAA,sBAA2C;QAC7D,IAAI,CAAC,iBAAiB,GAAG,IAAI,GAAG,EAA+B,CAAC;QAChE,KAAqB,UAAiB,EAAjB,uCAAiB,EAAjB,+BAAiB,EAAjB,IAAiB,EAAE;YAAnC,IAAM,MAAM,0BAAA;YAChB,IAAM,EAAE,GAAG,MAAM,CAAC,WAAW,CAAC;YAC9B,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC;SACvC;IACF,CAAC;IAED;;;;;;;;;OASG;IACI,gDAAoB,GAA3B,UAA4B,EAAY;QACvC,OAAO,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IACvC,CAAC;IAED;;;;;;OAMG;IACI,gDAAoB,GAA3B,UAA4B,EAAY,EAAE,MAAyB;QAClE,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC;IACxC,CAAC;IACF,wBAAC;AAAD,CAAC,AA9CD,IA8CC;AA9CY,8CAAiB"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/MiddlewareFactory.d.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/MiddlewareFactory.d.ts deleted file mode 100644 index 71d9170..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/MiddlewareFactory.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -/** - * @module MiddlewareFactory - */ -import { AuthenticationProvider } from "../IAuthenticationProvider"; -import { Middleware } from "./IMiddleware"; -/** - * @class - * Class containing function(s) related to the middleware pipelines. - */ -export declare class MiddlewareFactory { - /** - * @public - * @static - * Returns the default middleware chain an array with the middleware handlers - * @param {AuthenticationProvider} authProvider - The authentication provider instance - * @returns an array of the middleware handlers of the default middleware chain - */ - static getDefaultMiddlewareChain(authProvider: AuthenticationProvider): Middleware[]; -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/MiddlewareFactory.js b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/MiddlewareFactory.js deleted file mode 100644 index 052a57e..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/MiddlewareFactory.js +++ /dev/null @@ -1,58 +0,0 @@ -"use strict"; -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.MiddlewareFactory = void 0; -var AuthenticationHandler_1 = require("./AuthenticationHandler"); -var HTTPMessageHandler_1 = require("./HTTPMessageHandler"); -var RedirectHandlerOptions_1 = require("./options/RedirectHandlerOptions"); -var RetryHandlerOptions_1 = require("./options/RetryHandlerOptions"); -var RedirectHandler_1 = require("./RedirectHandler"); -var RetryHandler_1 = require("./RetryHandler"); -var TelemetryHandler_1 = require("./TelemetryHandler"); -/** - * @private - * To check whether the environment is node or not - * @returns A boolean representing the environment is node or not - */ -var isNodeEnvironment = function () { - return typeof process === "object" && typeof require === "function"; -}; -/** - * @class - * Class containing function(s) related to the middleware pipelines. - */ -var MiddlewareFactory = /** @class */ (function () { - function MiddlewareFactory() { - } - /** - * @public - * @static - * Returns the default middleware chain an array with the middleware handlers - * @param {AuthenticationProvider} authProvider - The authentication provider instance - * @returns an array of the middleware handlers of the default middleware chain - */ - MiddlewareFactory.getDefaultMiddlewareChain = function (authProvider) { - var middleware = []; - var authenticationHandler = new AuthenticationHandler_1.AuthenticationHandler(authProvider); - var retryHandler = new RetryHandler_1.RetryHandler(new RetryHandlerOptions_1.RetryHandlerOptions()); - var telemetryHandler = new TelemetryHandler_1.TelemetryHandler(); - var httpMessageHandler = new HTTPMessageHandler_1.HTTPMessageHandler(); - middleware.push(authenticationHandler); - middleware.push(retryHandler); - if (isNodeEnvironment()) { - var redirectHandler = new RedirectHandler_1.RedirectHandler(new RedirectHandlerOptions_1.RedirectHandlerOptions()); - middleware.push(redirectHandler); - } - middleware.push(telemetryHandler); - middleware.push(httpMessageHandler); - return middleware; - }; - return MiddlewareFactory; -}()); -exports.MiddlewareFactory = MiddlewareFactory; -//# sourceMappingURL=MiddlewareFactory.js.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/MiddlewareFactory.js.map b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/MiddlewareFactory.js.map deleted file mode 100644 index 9cc1df4..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/MiddlewareFactory.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"MiddlewareFactory.js","sourceRoot":"","sources":["../../../src/middleware/MiddlewareFactory.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAOH,iEAAgE;AAChE,2DAA0D;AAE1D,2EAA0E;AAC1E,qEAAoE;AACpE,qDAAoD;AACpD,+CAA8C;AAC9C,uDAAsD;AAEtD;;;;GAIG;AACH,IAAM,iBAAiB,GAAG;IACzB,OAAO,OAAO,OAAO,KAAK,QAAQ,IAAI,OAAO,OAAO,KAAK,UAAU,CAAC;AACrE,CAAC,CAAC;AAEF;;;GAGG;AACH;IAAA;IA0BA,CAAC;IAzBA;;;;;;OAMG;IACW,2CAAyB,GAAvC,UAAwC,YAAoC;QAC3E,IAAM,UAAU,GAAiB,EAAE,CAAC;QACpC,IAAM,qBAAqB,GAAG,IAAI,6CAAqB,CAAC,YAAY,CAAC,CAAC;QACtE,IAAM,YAAY,GAAG,IAAI,2BAAY,CAAC,IAAI,yCAAmB,EAAE,CAAC,CAAC;QACjE,IAAM,gBAAgB,GAAG,IAAI,mCAAgB,EAAE,CAAC;QAChD,IAAM,kBAAkB,GAAG,IAAI,uCAAkB,EAAE,CAAC;QAEpD,UAAU,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAC;QACvC,UAAU,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QAC9B,IAAI,iBAAiB,EAAE,EAAE;YACxB,IAAM,eAAe,GAAG,IAAI,iCAAe,CAAC,IAAI,+CAAsB,EAAE,CAAC,CAAC;YAC1E,UAAU,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;SACjC;QACD,UAAU,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;QAClC,UAAU,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC;QAEpC,OAAO,UAAU,CAAC;IACnB,CAAC;IACF,wBAAC;AAAD,CAAC,AA1BD,IA0BC;AA1BY,8CAAiB"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/MiddlewareUtil.d.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/MiddlewareUtil.d.ts deleted file mode 100644 index 502c12f..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/MiddlewareUtil.d.ts +++ /dev/null @@ -1,53 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -/** - * @module MiddlewareUtil - */ -import { FetchOptions } from "../IFetchOptions"; -/** - * @constant - * To generate the UUID - * @returns The UUID string - */ -export declare const generateUUID: () => string; -/** - * @constant - * To get the request header from the request - * @param {RequestInfo} request - The request object or the url string - * @param {FetchOptions|undefined} options - The request options object - * @param {string} key - The header key string - * @returns A header value for the given key from the request - */ -export declare const getRequestHeader: (request: RequestInfo, options: FetchOptions | undefined, key: string) => string | null; -/** - * @constant - * To set the header value to the given request - * @param {RequestInfo} request - The request object or the url string - * @param {FetchOptions|undefined} options - The request options object - * @param {string} key - The header key string - * @param {string } value - The header value string - * @returns Nothing - */ -export declare const setRequestHeader: (request: RequestInfo, options: FetchOptions | undefined, key: string, value: string) => void; -/** - * @constant - * To append the header value to the given request - * @param {RequestInfo} request - The request object or the url string - * @param {FetchOptions|undefined} options - The request options object - * @param {string} key - The header key string - * @param {string } value - The header value string - * @returns Nothing - */ -export declare const appendRequestHeader: (request: RequestInfo, options: FetchOptions | undefined, key: string, value: string) => void; -/** - * @constant - * To clone the request with the new url - * @param {string} url - The new url string - * @param {Request} request - The request object - * @returns A promise that resolves to request object - */ -export declare const cloneRequestWithNewUrl: (newUrl: string, request: Request) => Promise; diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/MiddlewareUtil.js b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/MiddlewareUtil.js deleted file mode 100644 index 60b64ba..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/MiddlewareUtil.js +++ /dev/null @@ -1,174 +0,0 @@ -"use strict"; -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.cloneRequestWithNewUrl = exports.appendRequestHeader = exports.setRequestHeader = exports.getRequestHeader = exports.generateUUID = void 0; -var tslib_1 = require("tslib"); -/** - * @constant - * To generate the UUID - * @returns The UUID string - */ -var generateUUID = function () { - var uuid = ""; - for (var j = 0; j < 32; j++) { - if (j === 8 || j === 12 || j === 16 || j === 20) { - uuid += "-"; - } - uuid += Math.floor(Math.random() * 16).toString(16); - } - return uuid; -}; -exports.generateUUID = generateUUID; -/** - * @constant - * To get the request header from the request - * @param {RequestInfo} request - The request object or the url string - * @param {FetchOptions|undefined} options - The request options object - * @param {string} key - The header key string - * @returns A header value for the given key from the request - */ -var getRequestHeader = function (request, options, key) { - var value = null; - if (typeof Request !== "undefined" && request instanceof Request) { - value = request.headers.get(key); - } - else if (typeof options !== "undefined" && options.headers !== undefined) { - if (typeof Headers !== "undefined" && options.headers instanceof Headers) { - value = options.headers.get(key); - } - else if (options.headers instanceof Array) { - var headers = options.headers; - for (var i = 0, l = headers.length; i < l; i++) { - if (headers[i][0] === key) { - value = headers[i][1]; - break; - } - } - } - else if (options.headers[key] !== undefined) { - value = options.headers[key]; - } - } - return value; -}; -exports.getRequestHeader = getRequestHeader; -/** - * @constant - * To set the header value to the given request - * @param {RequestInfo} request - The request object or the url string - * @param {FetchOptions|undefined} options - The request options object - * @param {string} key - The header key string - * @param {string } value - The header value string - * @returns Nothing - */ -var setRequestHeader = function (request, options, key, value) { - var _a, _b; - if (typeof Request !== "undefined" && request instanceof Request) { - request.headers.set(key, value); - } - else if (typeof options !== "undefined") { - if (options.headers === undefined) { - options.headers = new Headers((_a = {}, - _a[key] = value, - _a)); - } - else { - if (typeof Headers !== "undefined" && options.headers instanceof Headers) { - options.headers.set(key, value); - } - else if (options.headers instanceof Array) { - var i = 0; - var l = options.headers.length; - for (; i < l; i++) { - var header = options.headers[i]; - if (header[0] === key) { - header[1] = value; - break; - } - } - if (i === l) { - options.headers.push([key, value]); - } - } - else { - Object.assign(options.headers, (_b = {}, _b[key] = value, _b)); - } - } - } -}; -exports.setRequestHeader = setRequestHeader; -/** - * @constant - * To append the header value to the given request - * @param {RequestInfo} request - The request object or the url string - * @param {FetchOptions|undefined} options - The request options object - * @param {string} key - The header key string - * @param {string } value - The header value string - * @returns Nothing - */ -var appendRequestHeader = function (request, options, key, value) { - var _a, _b; - if (typeof Request !== "undefined" && request instanceof Request) { - request.headers.append(key, value); - } - else if (typeof options !== "undefined") { - if (options.headers === undefined) { - options.headers = new Headers((_a = {}, - _a[key] = value, - _a)); - } - else { - if (typeof Headers !== "undefined" && options.headers instanceof Headers) { - options.headers.append(key, value); - } - else if (options.headers instanceof Array) { - options.headers.push([key, value]); - } - else if (options.headers === undefined) { - options.headers = (_b = {}, _b[key] = value, _b); - } - else if (options.headers[key] === undefined) { - options.headers[key] = value; - } - else { - options.headers[key] += ", ".concat(value); - } - } - } -}; -exports.appendRequestHeader = appendRequestHeader; -/** - * @constant - * To clone the request with the new url - * @param {string} url - The new url string - * @param {Request} request - The request object - * @returns A promise that resolves to request object - */ -var cloneRequestWithNewUrl = function (newUrl, request) { return tslib_1.__awaiter(void 0, void 0, void 0, function () { - var body, _a, method, headers, referrer, referrerPolicy, mode, credentials, cache, redirect, integrity, keepalive, signal; - return tslib_1.__generator(this, function (_b) { - switch (_b.label) { - case 0: - if (!request.headers.get("Content-Type")) return [3 /*break*/, 2]; - return [4 /*yield*/, request.blob()]; - case 1: - _a = _b.sent(); - return [3 /*break*/, 4]; - case 2: return [4 /*yield*/, Promise.resolve(undefined)]; - case 3: - _a = _b.sent(); - _b.label = 4; - case 4: - body = _a; - method = request.method, headers = request.headers, referrer = request.referrer, referrerPolicy = request.referrerPolicy, mode = request.mode, credentials = request.credentials, cache = request.cache, redirect = request.redirect, integrity = request.integrity, keepalive = request.keepalive, signal = request.signal; - return [2 /*return*/, new Request(newUrl, { method: method, headers: headers, body: body, referrer: referrer, referrerPolicy: referrerPolicy, mode: mode, credentials: credentials, cache: cache, redirect: redirect, integrity: integrity, keepalive: keepalive, signal: signal })]; - } - }); -}); }; -exports.cloneRequestWithNewUrl = cloneRequestWithNewUrl; -//# sourceMappingURL=MiddlewareUtil.js.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/MiddlewareUtil.js.map b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/MiddlewareUtil.js.map deleted file mode 100644 index 737a100..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/MiddlewareUtil.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"MiddlewareUtil.js","sourceRoot":"","sources":["../../../src/middleware/MiddlewareUtil.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;AAQH;;;;GAIG;AACI,IAAM,YAAY,GAAG;IAC3B,IAAI,IAAI,GAAG,EAAE,CAAC;IACd,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,EAAE,EAAE;QAC5B,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,EAAE;YAChD,IAAI,IAAI,GAAG,CAAC;SACZ;QACD,IAAI,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;KACpD;IACD,OAAO,IAAI,CAAC;AACb,CAAC,CAAC;AATW,QAAA,YAAY,gBASvB;AAEF;;;;;;;GAOG;AACI,IAAM,gBAAgB,GAAG,UAAC,OAAoB,EAAE,OAAiC,EAAE,GAAW;IACpG,IAAI,KAAK,GAAW,IAAI,CAAC;IACzB,IAAI,OAAO,OAAO,KAAK,WAAW,IAAI,OAAO,YAAY,O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AA0G,OAAO,OAAjH,EAAE,OAAO,GAAiG,OAAO,QAAxG,EAAE,QAAQ,GAAuF,OAAO,SAA9F,EAAE,cAAc,GAAuE,OAAO,eAA9E,EAAE,IAAI,GAAiE,OAAO,KAAxE,EAAE,WAAW,GAAoD,OAAO,YAA3D,EAAE,KAAK,GAA6C,OAAO,MAApD,EAAE,QAAQ,GAAmC,OAAO,SAA1C,EAAE,SAAS,GAAwB,OAAO,UAA/B,EAAE,SAAS,GAAa,OAAO,UAApB,EAAE,MAAM,GAAK,OAAO,OAAZ,CAAa;gBAChI,sBAAO,IAAI,OAAO,CAAC,MAAM,EAAE,EAAE,MAAM,QAAA,EAAE,OAAO,SAAA,EAAE,IAAI,MAAA,EAAE,QAAQ,UAAA,EAAE,cAAc,gBAAA,EAAE,IAAI,MAAA,EAAE,WAAW,aAAA,EAAE,KAAK,OAAA,EAAE,QAAQ,UAAA,EAAE,SAAS,WAAA,EAAE,SAAS,WAAA,EAAE,MAAM,QAAA,EAAE,CAAC,EAAC;;;KAClJ,CAAC;AAJW,QAAA,sBAAsB,0BAIjC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/RedirectHandler.d.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/RedirectHandler.d.ts deleted file mode 100644 index d01bb4b..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/RedirectHandler.d.ts +++ /dev/null @@ -1,145 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -/** - * @module RedirectHandler - */ -import { Context } from "../IContext"; -import { Middleware } from "./IMiddleware"; -import { RedirectHandlerOptions } from "./options/RedirectHandlerOptions"; -/** - * @class - * Class - * @implements Middleware - * Class representing RedirectHandler - */ -export declare class RedirectHandler implements Middleware { - /** - * @private - * @static - * A member holding the array of redirect status codes - */ - private static REDIRECT_STATUS_CODES; - /** - * @private - * @static - * A member holding SeeOther status code - */ - private static STATUS_CODE_SEE_OTHER; - /** - * @private - * @static - * A member holding the name of the location header - */ - private static LOCATION_HEADER; - /** - * @private - * @static - * A member representing the authorization header name - */ - private static AUTHORIZATION_HEADER; - /** - * @private - * @static - * A member holding the manual redirect value - */ - private static MANUAL_REDIRECT; - /** - * @private - * A member holding options to customize the handler behavior - */ - private options; - /** - * @private - * A member to hold next middleware in the middleware chain - */ - private nextMiddleware; - /** - * @public - * @constructor - * To create an instance of RedirectHandler - * @param {RedirectHandlerOptions} [options = new RedirectHandlerOptions()] - The redirect handler options instance - * @returns An instance of RedirectHandler - */ - constructor(options?: RedirectHandlerOptions); - /** - * @private - * To check whether the response has the redirect status code or not - * @param {Response} response - The response object - * @returns A boolean representing whether the response contains the redirect status code or not - */ - private isRedirect; - /** - * @private - * To check whether the response has location header or not - * @param {Response} response - The response object - * @returns A boolean representing the whether the response has location header or not - */ - private hasLocationHeader; - /** - * @private - * To get the redirect url from location header in response object - * @param {Response} response - The response object - * @returns A redirect url from location header - */ - private getLocationHeader; - /** - * @private - * To check whether the given url is a relative url or not - * @param {string} url - The url string value - * @returns A boolean representing whether the given url is a relative url or not - */ - private isRelativeURL; - /** - * @private - * To check whether the authorization header in the request should be dropped for consequent redirected requests - * @param {string} requestUrl - The request url value - * @param {string} redirectUrl - The redirect url value - * @returns A boolean representing whether the authorization header in the request should be dropped for consequent redirected requests - */ - private shouldDropAuthorizationHeader; - /** - * @private - * @async - * To update a request url with the redirect url - * @param {string} redirectUrl - The redirect url value - * @param {Context} context - The context object value - * @returns Nothing - */ - private updateRequestUrl; - /** - * @private - * To get the options for execution of the middleware - * @param {Context} context - The context object - * @returns A options for middleware execution - */ - private getOptions; - /** - * @private - * @async - * To execute the next middleware and to handle in case of redirect response returned by the server - * @param {Context} context - The context object - * @param {number} redirectCount - The redirect count value - * @param {RedirectHandlerOptions} options - The redirect handler options instance - * @returns A promise that resolves to nothing - */ - private executeWithRedirect; - /** - * @public - * @async - * To execute the current middleware - * @param {Context} context - The context object of the request - * @returns A Promise that resolves to nothing - */ - execute(context: Context): Promise; - /** - * @public - * To set the next middleware in the chain - * @param {Middleware} next - The middleware instance - * @returns Nothing - */ - setNext(next: Middleware): void; -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/RedirectHandler.js b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/RedirectHandler.js deleted file mode 100644 index 3790195..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/RedirectHandler.js +++ /dev/null @@ -1,250 +0,0 @@ -"use strict"; -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.RedirectHandler = void 0; -var tslib_1 = require("tslib"); -var RequestMethod_1 = require("../RequestMethod"); -var MiddlewareControl_1 = require("./MiddlewareControl"); -var MiddlewareUtil_1 = require("./MiddlewareUtil"); -var RedirectHandlerOptions_1 = require("./options/RedirectHandlerOptions"); -var TelemetryHandlerOptions_1 = require("./options/TelemetryHandlerOptions"); -/** - * @class - * Class - * @implements Middleware - * Class representing RedirectHandler - */ -var RedirectHandler = /** @class */ (function () { - /** - * @public - * @constructor - * To create an instance of RedirectHandler - * @param {RedirectHandlerOptions} [options = new RedirectHandlerOptions()] - The redirect handler options instance - * @returns An instance of RedirectHandler - */ - function RedirectHandler(options) { - if (options === void 0) { options = new RedirectHandlerOptions_1.RedirectHandlerOptions(); } - this.options = options; - } - /** - * @private - * To check whether the response has the redirect status code or not - * @param {Response} response - The response object - * @returns A boolean representing whether the response contains the redirect status code or not - */ - RedirectHandler.prototype.isRedirect = function (response) { - return RedirectHandler.REDIRECT_STATUS_CODES.indexOf(response.status) !== -1; - }; - /** - * @private - * To check whether the response has location header or not - * @param {Response} response - The response object - * @returns A boolean representing the whether the response has location header or not - */ - RedirectHandler.prototype.hasLocationHeader = function (response) { - return response.headers.has(RedirectHandler.LOCATION_HEADER); - }; - /** - * @private - * To get the redirect url from location header in response object - * @param {Response} response - The response object - * @returns A redirect url from location header - */ - RedirectHandler.prototype.getLocationHeader = function (response) { - return response.headers.get(RedirectHandler.LOCATION_HEADER); - }; - /** - * @private - * To check whether the given url is a relative url or not - * @param {string} url - The url string value - * @returns A boolean representing whether the given url is a relative url or not - */ - RedirectHandler.prototype.isRelativeURL = function (url) { - return url.indexOf("://") === -1; - }; - /** - * @private - * To check whether the authorization header in the request should be dropped for consequent redirected requests - * @param {string} requestUrl - The request url value - * @param {string} redirectUrl - The redirect url value - * @returns A boolean representing whether the authorization header in the request should be dropped for consequent redirected requests - */ - RedirectHandler.prototype.shouldDropAuthorizationHeader = function (requestUrl, redirectUrl) { - var schemeHostRegex = /^[A-Za-z].+?:\/\/.+?(?=\/|$)/; - var requestMatches = schemeHostRegex.exec(requestUrl); - var requestAuthority; - var redirectAuthority; - if (requestMatches !== null) { - requestAuthority = requestMatches[0]; - } - var redirectMatches = schemeHostRegex.exec(redirectUrl); - if (redirectMatches !== null) { - redirectAuthority = redirectMatches[0]; - } - return typeof requestAuthority !== "undefined" && typeof redirectAuthority !== "undefined" && requestAuthority !== redirectAuthority; - }; - /** - * @private - * @async - * To update a request url with the redirect url - * @param {string} redirectUrl - The redirect url value - * @param {Context} context - The context object value - * @returns Nothing - */ - RedirectHandler.prototype.updateRequestUrl = function (redirectUrl, context) { - return tslib_1.__awaiter(this, void 0, void 0, function () { - var _a, _b; - return tslib_1.__generator(this, function (_c) { - switch (_c.label) { - case 0: - _a = context; - if (!(typeof context.request === "string")) return [3 /*break*/, 1]; - _b = redirectUrl; - return [3 /*break*/, 3]; - case 1: return [4 /*yield*/, (0, MiddlewareUtil_1.cloneRequestWithNewUrl)(redirectUrl, context.request)]; - case 2: - _b = _c.sent(); - _c.label = 3; - case 3: - _a.request = _b; - return [2 /*return*/]; - } - }); - }); - }; - /** - * @private - * To get the options for execution of the middleware - * @param {Context} context - The context object - * @returns A options for middleware execution - */ - RedirectHandler.prototype.getOptions = function (context) { - var options; - if (context.middlewareControl instanceof MiddlewareControl_1.MiddlewareControl) { - options = context.middlewareControl.getMiddlewareOptions(RedirectHandlerOptions_1.RedirectHandlerOptions); - } - if (typeof options === "undefined") { - options = Object.assign(new RedirectHandlerOptions_1.RedirectHandlerOptions(), this.options); - } - return options; - }; - /** - * @private - * @async - * To execute the next middleware and to handle in case of redirect response returned by the server - * @param {Context} context - The context object - * @param {number} redirectCount - The redirect count value - * @param {RedirectHandlerOptions} options - The redirect handler options instance - * @returns A promise that resolves to nothing - */ - RedirectHandler.prototype.executeWithRedirect = function (context, redirectCount, options) { - return tslib_1.__awaiter(this, void 0, void 0, function () { - var response, redirectUrl; - return tslib_1.__generator(this, function (_a) { - switch (_a.label) { - case 0: return [4 /*yield*/, this.nextMiddleware.execute(context)]; - case 1: - _a.sent(); - response = context.response; - if (!(redirectCount < options.maxRedirects && this.isRedirect(response) && this.hasLocationHeader(response) && options.shouldRedirect(response))) return [3 /*break*/, 6]; - ++redirectCount; - if (!(response.status === RedirectHandler.STATUS_CODE_SEE_OTHER)) return [3 /*break*/, 2]; - context.options.method = RequestMethod_1.RequestMethod.GET; - delete context.options.body; - return [3 /*break*/, 4]; - case 2: - redirectUrl = this.getLocationHeader(response); - if (!this.isRelativeURL(redirectUrl) && this.shouldDropAuthorizationHeader(response.url, redirectUrl)) { - delete context.options.headers[RedirectHandler.AUTHORIZATION_HEADER]; - } - return [4 /*yield*/, this.updateRequestUrl(redirectUrl, context)]; - case 3: - _a.sent(); - _a.label = 4; - case 4: return [4 /*yield*/, this.executeWithRedirect(context, redirectCount, options)]; - case 5: - _a.sent(); - return [3 /*break*/, 7]; - case 6: return [2 /*return*/]; - case 7: return [2 /*return*/]; - } - }); - }); - }; - /** - * @public - * @async - * To execute the current middleware - * @param {Context} context - The context object of the request - * @returns A Promise that resolves to nothing - */ - RedirectHandler.prototype.execute = function (context) { - return tslib_1.__awaiter(this, void 0, void 0, function () { - var redirectCount, options; - return tslib_1.__generator(this, function (_a) { - switch (_a.label) { - case 0: - redirectCount = 0; - options = this.getOptions(context); - context.options.redirect = RedirectHandler.MANUAL_REDIRECT; - TelemetryHandlerOptions_1.TelemetryHandlerOptions.updateFeatureUsageFlag(context, TelemetryHandlerOptions_1.FeatureUsageFlag.REDIRECT_HANDLER_ENABLED); - return [4 /*yield*/, this.executeWithRedirect(context, redirectCount, options)]; - case 1: return [2 /*return*/, _a.sent()]; - } - }); - }); - }; - /** - * @public - * To set the next middleware in the chain - * @param {Middleware} next - The middleware instance - * @returns Nothing - */ - RedirectHandler.prototype.setNext = function (next) { - this.nextMiddleware = next; - }; - /** - * @private - * @static - * A member holding the array of redirect status codes - */ - RedirectHandler.REDIRECT_STATUS_CODES = [ - 301, - 302, - 303, - 307, - 308, // Moved Permanently - ]; - /** - * @private - * @static - * A member holding SeeOther status code - */ - RedirectHandler.STATUS_CODE_SEE_OTHER = 303; - /** - * @private - * @static - * A member holding the name of the location header - */ - RedirectHandler.LOCATION_HEADER = "Location"; - /** - * @private - * @static - * A member representing the authorization header name - */ - RedirectHandler.AUTHORIZATION_HEADER = "Authorization"; - /** - * @private - * @static - * A member holding the manual redirect value - */ - RedirectHandler.MANUAL_REDIRECT = "manual"; - return RedirectHandler; -}()); -exports.RedirectHandler = RedirectHandler; -//# sourceMappingURL=RedirectHandler.js.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/RedirectHandler.js.map b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/RedirectHandler.js.map deleted file mode 100644 index 661b370..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/RedirectHandler.js.map +++ /dev/null @@ -1 +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EAAE,0CAAgB,CAAC,wBAAwB,CAAC,CAAC;wBAC5F,qBAAM,IAAI,CAAC,mBAAmB,CAAC,OAAO,EAAE,aAAa,EAAE,OAAO,CAAC,EAAA;4BAAtE,sBAAO,SAA+D,EAAC;;;;KACvE;IAED;;;;;OAKG;IACI,iCAAO,GAAd,UAAe,IAAgB;QAC9B,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC;IAC5B,CAAC;IAjND;;;;OAIG;IACY,qCAAqB,GAAa;QAChD,GAAG;QACH,GAAG;QACH,GAAG;QACH,GAAG;QACH,GAAG,EAAE,oBAAoB;KACzB,CAAC;IAEF;;;;OAIG;IACY,qCAAqB,GAAG,GAAG,CAAC;IAE3C;;;;OAIG;IACY,+BAAe,GAAG,UAAU,CAAC;IAE5C;;;;OAIG;IACY,oCAAoB,GAAG,eAAe,CAAC;IAEtD;;;;OAIG;IACY,+BAAe,GAAoB,QAAQ,CAAC;IA2K5D,sBAAC;CAAA,AAnND,IAmNC;AAnNY,0CAAe"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/RetryHandler.d.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/RetryHandler.d.ts deleted file mode 100644 index 996496f..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/RetryHandler.d.ts +++ /dev/null @@ -1,121 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -/** - * @module RetryHandler - */ -import { Context } from "../IContext"; -import { Middleware } from "./IMiddleware"; -import { RetryHandlerOptions } from "./options/RetryHandlerOptions"; -/** - * @class - * @implements Middleware - * Class for RetryHandler - */ -export declare class RetryHandler implements Middleware { - /** - * @private - * @static - * A list of status codes that needs to be retried - */ - private static RETRY_STATUS_CODES; - /** - * @private - * @static - * A member holding the name of retry attempt header - */ - private static RETRY_ATTEMPT_HEADER; - /** - * @private - * @static - * A member holding the name of retry after header - */ - private static RETRY_AFTER_HEADER; - /** - * @private - * A member to hold next middleware in the middleware chain - */ - private nextMiddleware; - /** - * @private - * A member holding the retry handler options - */ - private options; - /** - * @public - * @constructor - * To create an instance of RetryHandler - * @param {RetryHandlerOptions} [options = new RetryHandlerOptions()] - The retry handler options value - * @returns An instance of RetryHandler - */ - constructor(options?: RetryHandlerOptions); - /** - * - * @private - * To check whether the response has the retry status code - * @param {Response} response - The response object - * @returns Whether the response has retry status code or not - */ - private isRetry; - /** - * @private - * To check whether the payload is buffered or not - * @param {RequestInfo} request - The url string or the request object value - * @param {FetchOptions} options - The options of a request - * @returns Whether the payload is buffered or not - */ - private isBuffered; - /** - * @private - * To get the delay for a retry - * @param {Response} response - The response object - * @param {number} retryAttempts - The current attempt count - * @param {number} delay - The delay value in seconds - * @returns A delay for a retry - */ - private getDelay; - /** - * @private - * To get an exponential back off value - * @param {number} attempts - The current attempt count - * @returns An exponential back off value - */ - private getExponentialBackOffTime; - /** - * @private - * @async - * To add delay for the execution - * @param {number} delaySeconds - The delay value in seconds - * @returns Nothing - */ - private sleep; - private getOptions; - /** - * @private - * @async - * To execute the middleware with retries - * @param {Context} context - The context object - * @param {number} retryAttempts - The current attempt count - * @param {RetryHandlerOptions} options - The retry middleware options instance - * @returns A Promise that resolves to nothing - */ - private executeWithRetry; - /** - * @public - * @async - * To execute the current middleware - * @param {Context} context - The context object of the request - * @returns A Promise that resolves to nothing - */ - execute(context: Context): Promise; - /** - * @public - * To set the next middleware in the chain - * @param {Middleware} next - The middleware instance - * @returns Nothing - */ - setNext(next: Middleware): void; -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/RetryHandler.js b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/RetryHandler.js deleted file mode 100644 index 93949cf..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/RetryHandler.js +++ /dev/null @@ -1,209 +0,0 @@ -"use strict"; -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.RetryHandler = void 0; -var tslib_1 = require("tslib"); -var RequestMethod_1 = require("../RequestMethod"); -var MiddlewareControl_1 = require("./MiddlewareControl"); -var MiddlewareUtil_1 = require("./MiddlewareUtil"); -var RetryHandlerOptions_1 = require("./options/RetryHandlerOptions"); -var TelemetryHandlerOptions_1 = require("./options/TelemetryHandlerOptions"); -/** - * @class - * @implements Middleware - * Class for RetryHandler - */ -var RetryHandler = /** @class */ (function () { - /** - * @public - * @constructor - * To create an instance of RetryHandler - * @param {RetryHandlerOptions} [options = new RetryHandlerOptions()] - The retry handler options value - * @returns An instance of RetryHandler - */ - function RetryHandler(options) { - if (options === void 0) { options = new RetryHandlerOptions_1.RetryHandlerOptions(); } - this.options = options; - } - /** - * - * @private - * To check whether the response has the retry status code - * @param {Response} response - The response object - * @returns Whether the response has retry status code or not - */ - RetryHandler.prototype.isRetry = function (response) { - return RetryHandler.RETRY_STATUS_CODES.indexOf(response.status) !== -1; - }; - /** - * @private - * To check whether the payload is buffered or not - * @param {RequestInfo} request - The url string or the request object value - * @param {FetchOptions} options - The options of a request - * @returns Whether the payload is buffered or not - */ - RetryHandler.prototype.isBuffered = function (request, options) { - var method = typeof request === "string" ? options.method : request.method; - var isPutPatchOrPost = method === RequestMethod_1.RequestMethod.PUT || method === RequestMethod_1.RequestMethod.PATCH || method === RequestMethod_1.RequestMethod.POST; - if (isPutPatchOrPost) { - var isStream = (0, MiddlewareUtil_1.getRequestHeader)(request, options, "Content-Type") === "application/octet-stream"; - if (isStream) { - return false; - } - } - return true; - }; - /** - * @private - * To get the delay for a retry - * @param {Response} response - The response object - * @param {number} retryAttempts - The current attempt count - * @param {number} delay - The delay value in seconds - * @returns A delay for a retry - */ - RetryHandler.prototype.getDelay = function (response, retryAttempts, delay) { - var getRandomness = function () { return Number(Math.random().toFixed(3)); }; - var retryAfter = response.headers !== undefined ? response.headers.get(RetryHandler.RETRY_AFTER_HEADER) : null; - var newDelay; - if (retryAfter !== null) { - if (Number.isNaN(Number(retryAfter))) { - newDelay = Math.round((new Date(retryAfter).getTime() - Date.now()) / 1000); - } - else { - newDelay = Number(retryAfter); - } - } - else { - // Adding randomness to avoid retrying at a same - newDelay = retryAttempts >= 2 ? this.getExponentialBackOffTime(retryAttempts) + delay + getRandomness() : delay + getRandomness(); - } - return Math.min(newDelay, this.options.getMaxDelay() + getRandomness()); - }; - /** - * @private - * To get an exponential back off value - * @param {number} attempts - The current attempt count - * @returns An exponential back off value - */ - RetryHandler.prototype.getExponentialBackOffTime = function (attempts) { - return Math.round((1 / 2) * (Math.pow(2, attempts) - 1)); - }; - /** - * @private - * @async - * To add delay for the execution - * @param {number} delaySeconds - The delay value in seconds - * @returns Nothing - */ - RetryHandler.prototype.sleep = function (delaySeconds) { - return tslib_1.__awaiter(this, void 0, void 0, function () { - var delayMilliseconds; - return tslib_1.__generator(this, function (_a) { - delayMilliseconds = delaySeconds * 1000; - return [2 /*return*/, new Promise(function (resolve) { return setTimeout(resolve, delayMilliseconds); })]; - }); - }); - }; - RetryHandler.prototype.getOptions = function (context) { - var options; - if (context.middlewareControl instanceof MiddlewareControl_1.MiddlewareControl) { - options = context.middlewareControl.getMiddlewareOptions(this.options.constructor); - } - if (typeof options === "undefined") { - options = Object.assign(new RetryHandlerOptions_1.RetryHandlerOptions(), this.options); - } - return options; - }; - /** - * @private - * @async - * To execute the middleware with retries - * @param {Context} context - The context object - * @param {number} retryAttempts - The current attempt count - * @param {RetryHandlerOptions} options - The retry middleware options instance - * @returns A Promise that resolves to nothing - */ - RetryHandler.prototype.executeWithRetry = function (context, retryAttempts, options) { - return tslib_1.__awaiter(this, void 0, void 0, function () { - var delay; - return tslib_1.__generator(this, function (_a) { - switch (_a.label) { - case 0: return [4 /*yield*/, this.nextMiddleware.execute(context)]; - case 1: - _a.sent(); - if (!(retryAttempts < options.maxRetries && this.isRetry(context.response) && this.isBuffered(context.request, context.options) && options.shouldRetry(options.delay, retryAttempts, context.request, context.options, context.response))) return [3 /*break*/, 4]; - ++retryAttempts; - (0, MiddlewareUtil_1.setRequestHeader)(context.request, context.options, RetryHandler.RETRY_ATTEMPT_HEADER, retryAttempts.toString()); - delay = this.getDelay(context.response, retryAttempts, options.delay); - return [4 /*yield*/, this.sleep(delay)]; - case 2: - _a.sent(); - return [4 /*yield*/, this.executeWithRetry(context, retryAttempts, options)]; - case 3: return [2 /*return*/, _a.sent()]; - case 4: return [2 /*return*/]; - } - }); - }); - }; - /** - * @public - * @async - * To execute the current middleware - * @param {Context} context - The context object of the request - * @returns A Promise that resolves to nothing - */ - RetryHandler.prototype.execute = function (context) { - return tslib_1.__awaiter(this, void 0, void 0, function () { - var retryAttempts, options; - return tslib_1.__generator(this, function (_a) { - switch (_a.label) { - case 0: - retryAttempts = 0; - options = this.getOptions(context); - TelemetryHandlerOptions_1.TelemetryHandlerOptions.updateFeatureUsageFlag(context, TelemetryHandlerOptions_1.FeatureUsageFlag.RETRY_HANDLER_ENABLED); - return [4 /*yield*/, this.executeWithRetry(context, retryAttempts, options)]; - case 1: return [2 /*return*/, _a.sent()]; - } - }); - }); - }; - /** - * @public - * To set the next middleware in the chain - * @param {Middleware} next - The middleware instance - * @returns Nothing - */ - RetryHandler.prototype.setNext = function (next) { - this.nextMiddleware = next; - }; - /** - * @private - * @static - * A list of status codes that needs to be retried - */ - RetryHandler.RETRY_STATUS_CODES = [ - 429, - 503, - 504, // Gateway timeout - ]; - /** - * @private - * @static - * A member holding the name of retry attempt header - */ - RetryHandler.RETRY_ATTEMPT_HEADER = "Retry-Attempt"; - /** - * @private - * @static - * A member holding the name of retry after header - */ - RetryHandler.RETRY_AFTER_HEADER = "Retry-After"; - return RetryHandler; -}()); -exports.RetryHandler = RetryHandler; -//# sourceMappingURL=RetryHandler.js.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/RetryHandler.js.map b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/RetryHandler.js.map deleted file mode 100644 index 4e3dd17..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/RetryHandler.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"RetryHandler.js","sourceRoot":"","sources":["../../../src/middleware/RetryHandler.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;AAQH,kDAAiD;AAEjD,yDAAwD;AACxD,mDAAsE;AACtE,qEAAoE;AACpE,6EAA8F;AAE9F;;;;GAIG;AACH;IAsCC;;;;;;OAMG;IACH,sBAAmB,OAAwD;QAAxD,wBAAA,EAAA,cAAmC,yCAAmB,EAAE;QAC1E,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACxB,CAAC;IAED;;;;;;OAMG;IACK,8BAAO,GAAf,UAAgB,QAAkB;QACjC,OAAO,YAAY,CAAC,kBAAkB,CAAC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;IACxE,CAAC;IAED;;;;;;OAMG;IACK,iCAAU,GAAlB,UAAmB,OAAoB,EAAE,OAAiC;QACzE,IAAM,MAAM,GAAG,OAAO,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAE,OAAmB,CAAC,MAAM,CAAC;QAC1F,IAAM,gBAAgB,GAAY,MAAM,KAAK,6BAAa,CAAC,GAAG,IAAI,MAAM,KAAK,6BAAa,CAAC,KAAK,IAAI,MAAM,KAAK,6BAAa,CAAC,IAAI,CAAC;QAClI,IAAI,gBAAgB,EAAE;YACrB,IAAM,QAAQ,GAAG,IAAA,iCAAgB,EAAC,OAAO,EAAE,OAAO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;IA8JnD,mBAAC;CAAA,AAtLD,IAsLC;AAtLY,oCAAY"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/TelemetryHandler.d.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/TelemetryHandler.d.ts deleted file mode 100644 index ba84cbb..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/TelemetryHandler.d.ts +++ /dev/null @@ -1,59 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -import { Context } from "../IContext"; -import { Middleware } from "./IMiddleware"; -/** - * @class - * @implements Middleware - * Class for TelemetryHandler - */ -export declare class TelemetryHandler implements Middleware { - /** - * @private - * @static - * A member holding the name of the client request id header - */ - private static CLIENT_REQUEST_ID_HEADER; - /** - * @private - * @static - * A member holding the name of the sdk version header - */ - private static SDK_VERSION_HEADER; - /** - * @private - * @static - * A member holding the language prefix for the sdk version header value - */ - private static PRODUCT_NAME; - /** - * @private - * @static - * A member holding the key for the feature usage metrics - */ - private static FEATURE_USAGE_STRING; - /** - * @private - * A member to hold next middleware in the middleware chain - */ - private nextMiddleware; - /** - * @public - * @async - * To execute the current middleware - * @param {Context} context - The context object of the request - * @returns A Promise that resolves to nothing - */ - execute(context: Context): Promise; - /** - * @public - * To set the next middleware in the chain - * @param {Middleware} next - The middleware instance - * @returns Nothing - */ - setNext(next: Middleware): void; -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/TelemetryHandler.js b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/TelemetryHandler.js deleted file mode 100644 index aebedd5..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/TelemetryHandler.js +++ /dev/null @@ -1,105 +0,0 @@ -"use strict"; -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.TelemetryHandler = void 0; -var tslib_1 = require("tslib"); -/** - * @module TelemetryHandler - */ -var GraphRequestUtil_1 = require("../GraphRequestUtil"); -var Version_1 = require("../Version"); -var MiddlewareControl_1 = require("./MiddlewareControl"); -var MiddlewareUtil_1 = require("./MiddlewareUtil"); -var TelemetryHandlerOptions_1 = require("./options/TelemetryHandlerOptions"); -/** - * @class - * @implements Middleware - * Class for TelemetryHandler - */ -var TelemetryHandler = /** @class */ (function () { - function TelemetryHandler() { - } - /** - * @public - * @async - * To execute the current middleware - * @param {Context} context - The context object of the request - * @returns A Promise that resolves to nothing - */ - TelemetryHandler.prototype.execute = function (context) { - return tslib_1.__awaiter(this, void 0, void 0, function () { - var url, clientRequestId, sdkVersionValue, options, featureUsage; - return tslib_1.__generator(this, function (_a) { - switch (_a.label) { - case 0: - url = typeof context.request === "string" ? context.request : context.request.url; - if ((0, GraphRequestUtil_1.isGraphURL)(url) || (context.customHosts && (0, GraphRequestUtil_1.isCustomHost)(url, context.customHosts))) { - clientRequestId = (0, MiddlewareUtil_1.getRequestHeader)(context.request, context.options, TelemetryHandler.CLIENT_REQUEST_ID_HEADER); - if (!clientRequestId) { - clientRequestId = (0, MiddlewareUtil_1.generateUUID)(); - (0, MiddlewareUtil_1.setRequestHeader)(context.request, context.options, TelemetryHandler.CLIENT_REQUEST_ID_HEADER, clientRequestId); - } - sdkVersionValue = "".concat(TelemetryHandler.PRODUCT_NAME, "/").concat(Version_1.PACKAGE_VERSION); - options = void 0; - if (context.middlewareControl instanceof MiddlewareControl_1.MiddlewareControl) { - options = context.middlewareControl.getMiddlewareOptions(TelemetryHandlerOptions_1.TelemetryHandlerOptions); - } - if (options) { - featureUsage = options.getFeatureUsage(); - sdkVersionValue += " (".concat(TelemetryHandler.FEATURE_USAGE_STRING, "=").concat(featureUsage, ")"); - } - (0, MiddlewareUtil_1.appendRequestHeader)(context.request, context.options, TelemetryHandler.SDK_VERSION_HEADER, sdkVersionValue); - } - else { - // Remove telemetry headers if present during redirection. - delete context.options.headers[TelemetryHandler.CLIENT_REQUEST_ID_HEADER]; - delete context.options.headers[TelemetryHandler.SDK_VERSION_HEADER]; - } - return [4 /*yield*/, this.nextMiddleware.execute(context)]; - case 1: return [2 /*return*/, _a.sent()]; - } - }); - }); - }; - /** - * @public - * To set the next middleware in the chain - * @param {Middleware} next - The middleware instance - * @returns Nothing - */ - TelemetryHandler.prototype.setNext = function (next) { - this.nextMiddleware = next; - }; - /** - * @private - * @static - * A member holding the name of the client request id header - */ - TelemetryHandler.CLIENT_REQUEST_ID_HEADER = "client-request-id"; - /** - * @private - * @static - * A member holding the name of the sdk version header - */ - TelemetryHandler.SDK_VERSION_HEADER = "SdkVersion"; - /** - * @private - * @static - * A member holding the language prefix for the sdk version header value - */ - TelemetryHandler.PRODUCT_NAME = "graph-js"; - /** - * @private - * @static - * A member holding the key for the feature usage metrics - */ - TelemetryHandler.FEATURE_USAGE_STRING = "featureUsage"; - return TelemetryHandler; -}()); -exports.TelemetryHandler = TelemetryHandler; -//# sourceMappingURL=TelemetryHandler.js.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/TelemetryHandler.js.map b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/TelemetryHandler.js.map deleted file mode 100644 index 20e63cc..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/TelemetryHandler.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"TelemetryHandler.js","sourceRoot":"","sources":["../../../src/middleware/TelemetryHandler.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;AAEH;;GAEG;AACH,wDAA+D;AAE/D,sCAA6C;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,EAAE,gBAAgB,CAAC,kBAAkB,EAAE,eAAe,CAAC,CAAC;yBAC5G;6BAAM;4BACN,0DAA0D;4BAC1D,OAAO,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,gBAAgB,CAAC,wBAAwB,CAAC,CAAC;4BAC1E,OAAO,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,gBAAgB,CAAC,kBAAkB,CAAC,CAAC;yBACpE;wBACM,qBAAM,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,OAAO,CAAC,EAAA;4BAAjD,sBAAO,SAA0C,EAAC;;;;KAClD;IAED;;;;;OAKG;IACI,kCAAO,GAAd,UAAe,IAAgB;QAC9B,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC;IAC5B,CAAC;IA7ED;;;;OAIG;IACY,yCAAwB,GAAG,mBAAmB,CAAC;IAE9D;;;;OAIG;IACY,mCAAkB,GAAG,YAAY,CAAC;IAEjD;;;;OAIG;IACY,6BAAY,GAAG,UAAU,CAAC;IAEzC;;;;OAIG;IACY,qCAAoB,GAAG,cAAc,CAAC;IAoDtD,uBAAC;CAAA,AA/ED,IA+EC;AA/EY,4CAAgB"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/options/AuthenticationHandlerOptions.d.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/options/AuthenticationHandlerOptions.d.ts deleted file mode 100644 index 3192bfe..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/options/AuthenticationHandlerOptions.d.ts +++ /dev/null @@ -1,38 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -/** - * @module AuthenticationHandlerOptions - */ -import { AuthenticationProvider } from "../../IAuthenticationProvider"; -import { AuthenticationProviderOptions } from "../../IAuthenticationProviderOptions"; -import { MiddlewareOptions } from "./IMiddlewareOptions"; -/** - * @class - * @implements MiddlewareOptions - * Class representing AuthenticationHandlerOptions - */ -export declare class AuthenticationHandlerOptions implements MiddlewareOptions { - /** - * @public - * A member holding an instance of an authentication provider - */ - authenticationProvider: AuthenticationProvider; - /** - * @public - * A member holding an instance of authentication provider options - */ - authenticationProviderOptions: AuthenticationProviderOptions; - /** - * @public - * @constructor - * To create an instance of AuthenticationHandlerOptions - * @param {AuthenticationProvider} [authenticationProvider] - The authentication provider instance - * @param {AuthenticationProviderOptions} [authenticationProviderOptions] - The authentication provider options instance - * @returns An instance of AuthenticationHandlerOptions - */ - constructor(authenticationProvider?: AuthenticationProvider, authenticationProviderOptions?: AuthenticationProviderOptions); -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/options/AuthenticationHandlerOptions.js b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/options/AuthenticationHandlerOptions.js deleted file mode 100644 index 1d488bf..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/options/AuthenticationHandlerOptions.js +++ /dev/null @@ -1,31 +0,0 @@ -"use strict"; -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.AuthenticationHandlerOptions = void 0; -/** - * @class - * @implements MiddlewareOptions - * Class representing AuthenticationHandlerOptions - */ -var AuthenticationHandlerOptions = /** @class */ (function () { - /** - * @public - * @constructor - * To create an instance of AuthenticationHandlerOptions - * @param {AuthenticationProvider} [authenticationProvider] - The authentication provider instance - * @param {AuthenticationProviderOptions} [authenticationProviderOptions] - The authentication provider options instance - * @returns An instance of AuthenticationHandlerOptions - */ - function AuthenticationHandlerOptions(authenticationProvider, authenticationProviderOptions) { - this.authenticationProvider = authenticationProvider; - this.authenticationProviderOptions = authenticationProviderOptions; - } - return AuthenticationHandlerOptions; -}()); -exports.AuthenticationHandlerOptions = AuthenticationHandlerOptions; -//# sourceMappingURL=AuthenticationHandlerOptions.js.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/options/AuthenticationHandlerOptions.js.map b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/options/AuthenticationHandlerOptions.js.map deleted file mode 100644 index c43a97c..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/options/AuthenticationHandlerOptions.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AuthenticationHandlerOptions.js","sourceRoot":"","sources":["../../../../src/middleware/options/AuthenticationHandlerOptions.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAUH;;;;GAIG;AACH;IAaC;;;;;;;OAOG;IACH,sCAAmB,sBAA+C,EAAE,6BAA6D;QAChI,IAAI,CAAC,sBAAsB,GAAG,sBAAsB,CAAC;QACrD,IAAI,CAAC,6BAA6B,GAAG,6BAA6B,CAAC;IACpE,CAAC;IACF,mCAAC;AAAD,CAAC,AAzBD,IAyBC;AAzBY,oEAA4B"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/options/ChaosHandlerData.d.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/options/ChaosHandlerData.d.ts deleted file mode 100644 index 8f70cde..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/options/ChaosHandlerData.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -/** - * @module ChaosHandlerData - */ -/** - * Contains RequestMethod to corresponding array of possible status codes, used for Random mode - */ -export declare const methodStatusCode: { - [key: string]: number[]; -}; -/** - * Contains statusCode to statusMessage map - */ -export declare const httpStatusCode: { - [key: number]: string; -}; diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/options/ChaosHandlerData.js b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/options/ChaosHandlerData.js deleted file mode 100644 index 8e922ea..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/options/ChaosHandlerData.js +++ /dev/null @@ -1,89 +0,0 @@ -"use strict"; -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.httpStatusCode = exports.methodStatusCode = void 0; -/** - * @module ChaosHandlerData - */ -/** - * Contains RequestMethod to corresponding array of possible status codes, used for Random mode - */ -exports.methodStatusCode = { - GET: [429, 500, 502, 503, 504], - POST: [429, 500, 502, 503, 504, 507], - PUT: [429, 500, 502, 503, 504, 507], - PATCH: [429, 500, 502, 503, 504], - DELETE: [429, 500, 502, 503, 504, 507], -}; -/** - * Contains statusCode to statusMessage map - */ -exports.httpStatusCode = { - 100: "Continue", - 101: "Switching Protocols", - 102: "Processing", - 103: "Early Hints", - 200: "OK", - 201: "Created", - 202: "Accepted", - 203: "Non-Authoritative Information", - 204: "No Content", - 205: "Reset Content", - 206: "Partial Content", - 207: "Multi-Status", - 208: "Already Reported", - 226: "IM Used", - 300: "Multiple Choices", - 301: "Moved Permanently", - 302: "Found", - 303: "See Other", - 304: "Not Modified", - 305: "Use Proxy", - 307: "Temporary Redirect", - 308: "Permanent Redirect", - 400: "Bad Request", - 401: "Unauthorized", - 402: "Payment Required", - 403: "Forbidden", - 404: "Not Found", - 405: "Method Not Allowed", - 406: "Not Acceptable", - 407: "Proxy Authentication Required", - 408: "Request Timeout", - 409: "Conflict", - 410: "Gone", - 411: "Length Required", - 412: "Precondition Failed", - 413: "Payload Too Large", - 414: "URI Too Long", - 415: "Unsupported Media Type", - 416: "Range Not Satisfiable", - 417: "Expectation Failed", - 421: "Misdirected Request", - 422: "Unprocessable Entity", - 423: "Locked", - 424: "Failed Dependency", - 425: "Too Early", - 426: "Upgrade Required", - 428: "Precondition Required", - 429: "Too Many Requests", - 431: "Request Header Fields Too Large", - 451: "Unavailable For Legal Reasons", - 500: "Internal Server Error", - 501: "Not Implemented", - 502: "Bad Gateway", - 503: "Service Unavailable", - 504: "Gateway Timeout", - 505: "HTTP Version Not Supported", - 506: "Variant Also Negotiates", - 507: "Insufficient Storage", - 508: "Loop Detected", - 510: "Not Extended", - 511: "Network Authentication Required", -}; -//# sourceMappingURL=ChaosHandlerData.js.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/options/ChaosHandlerData.js.map b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/options/ChaosHandlerData.js.map deleted file mode 100644 index 80ee0f3..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/options/ChaosHandlerData.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ChaosHandlerData.js","sourceRoot":"","sources":["../../../../src/middleware/options/ChaosHandlerData.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH;;GAEG;AAEH;;GAEG;AACU,QAAA,gBAAgB,GAAgC;IAC5D,GAAG,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC;IAC9B,IAAI,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC;IACpC,GAAG,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC;IAC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IACzB,GAAG,EAAE,qBAAqB;IAC1B,GAAG,EAAE,sBAAsB;IAC3B,GAAG,EAAE,QAAQ;IACb,GAAG,EAAE,mBAAmB;IACxB,GAAG,EAAE,WAAW;IAChB,GAAG,EAAE,kBAAkB;IACvB,GAAG,EAAE,uBAAuB;IAC5B,GAAG,EAAE,mBAAmB;IACxB,GAAG,EAAE,iCAAiC;IACtC,GAAG,EAAE,+BAA+B;IACpC,GAAG,EAAE,uBAAuB;IAC5B,GAAG,EAAE,iBAAiB;IACtB,GAAG,EAAE,aAAa;IAClB,GAAG,EAAE,qBAAqB;IAC1B,GAAG,EAAE,iBAAiB;IACtB,GAAG,EAAE,4BAA4B;IACjC,GAAG,EAAE,yBAAyB;IAC9B,GAAG,EAAE,sBAAsB;IAC3B,GAAG,EAAE,eAAe;IACpB,GAAG,EAAE,cAAc;IACnB,GAAG,EAAE,iCAAiC;CACtC,CAAC"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/options/ChaosHandlerOptions.d.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/options/ChaosHandlerOptions.d.ts deleted file mode 100644 index ec151cc..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/options/ChaosHandlerOptions.d.ts +++ /dev/null @@ -1,68 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -/** - * @module ChaosHandlerOptions - */ -import { ChaosStrategy } from "./ChaosStrategy"; -import { MiddlewareOptions } from "./IMiddlewareOptions"; -/** - * Class representing ChaosHandlerOptions - * @class - * Class - * @implements MiddlewareOptions - */ -export declare class ChaosHandlerOptions implements MiddlewareOptions { - /** - * Specifies the startegy used for the Testing Handler -> RANDOM/MANUAL - * - * @public - */ - chaosStrategy: ChaosStrategy; - /** - * Status code to be returned in the response - * - * @public - */ - statusCode: number; - /** - * The Message to be returned in the response - * - * @public - */ - statusMessage: string; - /** - * The percentage of randomness/chaos in the handler - * - * Setting the default value as 10% - * @public - */ - chaosPercentage: number; - /** - * The response body to be returned in the response - * - * @public - */ - responseBody: any; - /** - * The response headers to be returned in the response - * - * @public - */ - headers: Headers; - /** - * @public - * @constructor - * To create an instance of Testing Handler Options - * @param {ChaosStrategy} chaosStrategy - Specifies the startegy used for the Testing Handler -> RAMDOM/MANUAL - * @param {string} statusMessage - The Message to be returned in the response - * @param {number?} statusCode - The statusCode to be returned in the response - * @param {number?} chaosPercentage - The percentage of randomness/chaos in the handler - * @param {any?} responseBody - The response body to be returned in the response - * @returns An instance of ChaosHandlerOptions - */ - constructor(chaosStrategy?: ChaosStrategy, statusMessage?: string, statusCode?: number, chaosPercentage?: number, responseBody?: any, headers?: Headers); -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/options/ChaosHandlerOptions.js b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/options/ChaosHandlerOptions.js deleted file mode 100644 index d0ef844..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/options/ChaosHandlerOptions.js +++ /dev/null @@ -1,48 +0,0 @@ -"use strict"; -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ChaosHandlerOptions = void 0; -/** - * @module ChaosHandlerOptions - */ -var ChaosStrategy_1 = require("./ChaosStrategy"); -/** - * Class representing ChaosHandlerOptions - * @class - * Class - * @implements MiddlewareOptions - */ -var ChaosHandlerOptions = /** @class */ (function () { - /** - * @public - * @constructor - * To create an instance of Testing Handler Options - * @param {ChaosStrategy} chaosStrategy - Specifies the startegy used for the Testing Handler -> RAMDOM/MANUAL - * @param {string} statusMessage - The Message to be returned in the response - * @param {number?} statusCode - The statusCode to be returned in the response - * @param {number?} chaosPercentage - The percentage of randomness/chaos in the handler - * @param {any?} responseBody - The response body to be returned in the response - * @returns An instance of ChaosHandlerOptions - */ - function ChaosHandlerOptions(chaosStrategy, statusMessage, statusCode, chaosPercentage, responseBody, headers) { - if (chaosStrategy === void 0) { chaosStrategy = ChaosStrategy_1.ChaosStrategy.RANDOM; } - if (statusMessage === void 0) { statusMessage = "Some error Happened"; } - this.chaosStrategy = chaosStrategy; - this.statusCode = statusCode; - this.statusMessage = statusMessage; - this.chaosPercentage = chaosPercentage !== undefined ? chaosPercentage : 10; - this.responseBody = responseBody; - this.headers = headers; - if (this.chaosPercentage > 100) { - throw new Error("Error Pecentage can not be more than 100"); - } - } - return ChaosHandlerOptions; -}()); -exports.ChaosHandlerOptions = ChaosHandlerOptions; -//# sourceMappingURL=ChaosHandlerOptions.js.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/options/ChaosHandlerOptions.js.map b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/options/ChaosHandlerOptions.js.map deleted file mode 100644 index c8ab43f..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/options/ChaosHandlerOptions.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ChaosHandlerOptions.js","sourceRoot":"","sources":["../../../../src/middleware/options/ChaosHandlerOptions.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH;;GAEG;AAEH,iDAAgD;AAGhD;;;;;GAKG;AACH;IA4CC;;;;;;;;;;OAUG;IACH,6BAAmB,aAAmD,EAAE,aAAqC,EAAE,UAAmB,EAAE,eAAwB,EAAE,YAAkB,EAAE,OAAiB;QAAhL,8BAAA,EAAA,gBAA+B,6BAAa,CAAC,MAAM;QAAE,8BAAA,EAAA,qCAAqC;QAC5G,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;QACnC,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;QACnC,IAAI,CAAC,eAAe,GAAG,eAAe,KAAK,SAAS,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,EAAE,CAAC;QAC5E,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;QACjC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,IAAI,CAAC,eAAe,GAAG,GAAG,EAAE;YAC/B,MAAM,IAAI,KAAK,CAAC,0CAA0C,CAAC,CAAC;SAC5D;IACF,CAAC;IACF,0BAAC;AAAD,CAAC,AAlED,IAkEC;AAlEY,kDAAmB"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/options/ChaosStrategy.d.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/options/ChaosStrategy.d.ts deleted file mode 100644 index c355ae6..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/options/ChaosStrategy.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -/** - * @module ChaosStrategy - */ -/** - * Strategy used for Testing Handler - * @enum - */ -export declare enum ChaosStrategy { - MANUAL = 0, - RANDOM = 1 -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/options/ChaosStrategy.js b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/options/ChaosStrategy.js deleted file mode 100644 index 98a4094..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/options/ChaosStrategy.js +++ /dev/null @@ -1,22 +0,0 @@ -"use strict"; -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ChaosStrategy = void 0; -/** - * @module ChaosStrategy - */ -/** - * Strategy used for Testing Handler - * @enum - */ -var ChaosStrategy; -(function (ChaosStrategy) { - ChaosStrategy[ChaosStrategy["MANUAL"] = 0] = "MANUAL"; - ChaosStrategy[ChaosStrategy["RANDOM"] = 1] = "RANDOM"; -})(ChaosStrategy || (exports.ChaosStrategy = ChaosStrategy = {})); -//# sourceMappingURL=ChaosStrategy.js.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/options/ChaosStrategy.js.map b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/options/ChaosStrategy.js.map deleted file mode 100644 index 901a2bc..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/options/ChaosStrategy.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ChaosStrategy.js","sourceRoot":"","sources":["../../../../src/middleware/options/ChaosStrategy.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH;;GAEG;AAEH;;;GAGG;AACH,IAAY,aAGX;AAHD,WAAY,aAAa;IACxB,qDAAM,CAAA;IACN,qDAAM,CAAA;AACP,CAAC,EAHW,aAAa,6BAAb,aAAa,QAGxB"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/options/IMiddlewareOptions.d.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/options/IMiddlewareOptions.d.ts deleted file mode 100644 index 3241ae9..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/options/IMiddlewareOptions.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -/** - * @interface - * Signature representing the middleware options - */ -export interface MiddlewareOptions { -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/options/IMiddlewareOptions.js b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/options/IMiddlewareOptions.js deleted file mode 100644 index bd7acab..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/options/IMiddlewareOptions.js +++ /dev/null @@ -1,9 +0,0 @@ -"use strict"; -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=IMiddlewareOptions.js.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/options/IMiddlewareOptions.js.map b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/options/IMiddlewareOptions.js.map deleted file mode 100644 index ae1f908..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/options/IMiddlewareOptions.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"IMiddlewareOptions.js","sourceRoot":"","sources":["../../../../src/middleware/options/IMiddlewareOptions.ts"],"names":[],"mappings":";AAAA;;;;;GAKG"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/options/RedirectHandlerOptions.d.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/options/RedirectHandlerOptions.d.ts deleted file mode 100644 index ca0ef07..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/options/RedirectHandlerOptions.d.ts +++ /dev/null @@ -1,58 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -/** - * @module RedirectHandlerOptions - */ -import { MiddlewareOptions } from "./IMiddlewareOptions"; -/** - * @type - * A type declaration for shouldRetry callback - */ -export type ShouldRedirect = (response: Response) => boolean; -/** - * @class - * @implements MiddlewareOptions - * A class representing RedirectHandlerOptions - */ -export declare class RedirectHandlerOptions implements MiddlewareOptions { - /** - * @private - * @static - * A member holding default max redirects value - */ - private static DEFAULT_MAX_REDIRECTS; - /** - * @private - * @static - * A member holding maximum max redirects value - */ - private static MAX_MAX_REDIRECTS; - /** - * @public - * A member holding max redirects value - */ - maxRedirects: number; - /** - * @public - * A member holding shouldRedirect callback - */ - shouldRedirect: ShouldRedirect; - /** - * @private - * A member holding default shouldRedirect callback - */ - private static defaultShouldRedirect; - /** - * @public - * @constructor - * To create an instance of RedirectHandlerOptions - * @param {number} [maxRedirects = RedirectHandlerOptions.DEFAULT_MAX_REDIRECTS] - The max redirects value - * @param {ShouldRedirect} [shouldRedirect = RedirectHandlerOptions.DEFAULT_SHOULD_RETRY] - The should redirect callback - * @returns An instance of RedirectHandlerOptions - */ - constructor(maxRedirects?: number, shouldRedirect?: ShouldRedirect); -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/options/RedirectHandlerOptions.js b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/options/RedirectHandlerOptions.js deleted file mode 100644 index bd2248f..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/options/RedirectHandlerOptions.js +++ /dev/null @@ -1,60 +0,0 @@ -"use strict"; -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.RedirectHandlerOptions = void 0; -/** - * @class - * @implements MiddlewareOptions - * A class representing RedirectHandlerOptions - */ -var RedirectHandlerOptions = /** @class */ (function () { - /** - * @public - * @constructor - * To create an instance of RedirectHandlerOptions - * @param {number} [maxRedirects = RedirectHandlerOptions.DEFAULT_MAX_REDIRECTS] - The max redirects value - * @param {ShouldRedirect} [shouldRedirect = RedirectHandlerOptions.DEFAULT_SHOULD_RETRY] - The should redirect callback - * @returns An instance of RedirectHandlerOptions - */ - function RedirectHandlerOptions(maxRedirects, shouldRedirect) { - if (maxRedirects === void 0) { maxRedirects = RedirectHandlerOptions.DEFAULT_MAX_REDIRECTS; } - if (shouldRedirect === void 0) { shouldRedirect = RedirectHandlerOptions.defaultShouldRedirect; } - if (maxRedirects > RedirectHandlerOptions.MAX_MAX_REDIRECTS) { - var error = new Error("MaxRedirects should not be more than ".concat(RedirectHandlerOptions.MAX_MAX_REDIRECTS)); - error.name = "MaxLimitExceeded"; - throw error; - } - if (maxRedirects < 0) { - var error = new Error("MaxRedirects should not be negative"); - error.name = "MinExpectationNotMet"; - throw error; - } - this.maxRedirects = maxRedirects; - this.shouldRedirect = shouldRedirect; - } - /** - * @private - * @static - * A member holding default max redirects value - */ - RedirectHandlerOptions.DEFAULT_MAX_REDIRECTS = 5; - /** - * @private - * @static - * A member holding maximum max redirects value - */ - RedirectHandlerOptions.MAX_MAX_REDIRECTS = 20; - /** - * @private - * A member holding default shouldRedirect callback - */ - RedirectHandlerOptions.defaultShouldRedirect = function () { return true; }; - return RedirectHandlerOptions; -}()); -exports.RedirectHandlerOptions = RedirectHandlerOptions; -//# sourceMappingURL=RedirectHandlerOptions.js.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/options/RedirectHandlerOptions.js.map b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/options/RedirectHandlerOptions.js.map deleted file mode 100644 index 9253383..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/options/RedirectHandlerOptions.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"RedirectHandlerOptions.js","sourceRoot":"","sources":["../../../../src/middleware/options/RedirectHandlerOptions.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAcH;;;;GAIG;AACH;IAiCC;;;;;;;OAOG;IACH,gCAAmB,YAAmE,EAAE,cAA6E;QAAlJ,6BAAA,EAAA,eAAuB,sBAAsB,CAAC,qBAAqB;QAAE,+BAAA,EAAA,iBAAiC,sBAAsB,CAAC,qBAAqB;QACpK,IAAI,YAAY,GAAG,sBAAsB,CAAC,iBAAiB,EAAE;YAC5D,IAAM,KAAK,GAAG,IAAI,KAAK,CAAC,+CAAwC,sBAAsB,CAAC,iBAAiB,CAAE,CAAC,CAAC;YAC5G,KAAK,CAAC,IAAI,GAAG,kBAAkB,CAAC;YAChC,MAAM,KAAK,CAAC;SACZ;QACD,IAAI,YAAY,GAAG,CAAC,EAAE;YACrB,IAAM,KAAK,GAAG,IAAI,KAAK,CAAC,qCAAqC,CAAC,CAAC;YAC/D,KAAK,CAAC,IAAI,GAAG,sBAAsB,CAAC;YACpC,MAAM,KAAK,CAAC;SACZ;QACD,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;QACjC,IAAI,CAAC,cAAc,GAAG,cAAc,CAAC;IACtC,CAAC;IArDD;;;;OAIG;IACY,4CAAqB,GAAG,CAAC,CAAC;IAEzC;;;;OAIG;IACY,wCAAiB,GAAG,EAAE,CAAC;IActC;;;OAGG;IACY,4CAAqB,GAAmB,cAAM,OAAA,IAAI,EAAJ,CAAI,CAAC;IAwBnE,6BAAC;CAAA,AAvDD,IAuDC;AAvDY,wDAAsB"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/options/RetryHandlerOptions.d.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/options/RetryHandlerOptions.d.ts deleted file mode 100644 index 10f3e49..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/options/RetryHandlerOptions.d.ts +++ /dev/null @@ -1,83 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -/** - * @module RetryHandlerOptions - */ -import { FetchOptions } from "../../IFetchOptions"; -import { MiddlewareOptions } from "./IMiddlewareOptions"; -/** - * @type - * A type declaration for shouldRetry callback - */ -export type ShouldRetry = (delay: number, attempt: number, request: RequestInfo, options: FetchOptions | undefined, response: Response) => boolean; -/** - * @class - * @implements MiddlewareOptions - * Class for RetryHandlerOptions - */ -export declare class RetryHandlerOptions implements MiddlewareOptions { - /** - * @private - * @static - * A member holding default delay value in seconds - */ - private static DEFAULT_DELAY; - /** - * @private - * @static - * A member holding default maxRetries value - */ - private static DEFAULT_MAX_RETRIES; - /** - * @private - * @static - * A member holding maximum delay value in seconds - */ - private static MAX_DELAY; - /** - * @private - * @static - * A member holding maximum maxRetries value - */ - private static MAX_MAX_RETRIES; - /** - * @public - * A member holding delay value in seconds - */ - delay: number; - /** - * @public - * A member holding maxRetries value - */ - maxRetries: number; - /** - * @public - * A member holding shouldRetry callback - */ - shouldRetry: ShouldRetry; - /** - * @private - * A member holding default shouldRetry callback - */ - private static defaultShouldRetry; - /** - * @public - * @constructor - * To create an instance of RetryHandlerOptions - * @param {number} [delay = RetryHandlerOptions.DEFAULT_DELAY] - The delay value in seconds - * @param {number} [maxRetries = RetryHandlerOptions.DEFAULT_MAX_RETRIES] - The maxRetries value - * @param {ShouldRetry} [shouldRetry = RetryHandlerOptions.DEFAULT_SHOULD_RETRY] - The shouldRetry callback function - * @returns An instance of RetryHandlerOptions - */ - constructor(delay?: number, maxRetries?: number, shouldRetry?: ShouldRetry); - /** - * @public - * To get the maximum delay - * @returns A maximum delay - */ - getMaxDelay(): number; -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/options/RetryHandlerOptions.js b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/options/RetryHandlerOptions.js deleted file mode 100644 index 7384120..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/options/RetryHandlerOptions.js +++ /dev/null @@ -1,103 +0,0 @@ -"use strict"; -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.RetryHandlerOptions = void 0; -/** - * @class - * @implements MiddlewareOptions - * Class for RetryHandlerOptions - */ -var RetryHandlerOptions = /** @class */ (function () { - /** - * @public - * @constructor - * To create an instance of RetryHandlerOptions - * @param {number} [delay = RetryHandlerOptions.DEFAULT_DELAY] - The delay value in seconds - * @param {number} [maxRetries = RetryHandlerOptions.DEFAULT_MAX_RETRIES] - The maxRetries value - * @param {ShouldRetry} [shouldRetry = RetryHandlerOptions.DEFAULT_SHOULD_RETRY] - The shouldRetry callback function - * @returns An instance of RetryHandlerOptions - */ - function RetryHandlerOptions(delay, maxRetries, shouldRetry) { - if (delay === void 0) { delay = RetryHandlerOptions.DEFAULT_DELAY; } - if (maxRetries === void 0) { maxRetries = RetryHandlerOptions.DEFAULT_MAX_RETRIES; } - if (shouldRetry === void 0) { shouldRetry = RetryHandlerOptions.defaultShouldRetry; } - if (delay > RetryHandlerOptions.MAX_DELAY && maxRetries > RetryHandlerOptions.MAX_MAX_RETRIES) { - var error = new Error("Delay and MaxRetries should not be more than ".concat(RetryHandlerOptions.MAX_DELAY, " and ").concat(RetryHandlerOptions.MAX_MAX_RETRIES)); - error.name = "MaxLimitExceeded"; - throw error; - } - else if (delay > RetryHandlerOptions.MAX_DELAY) { - var error = new Error("Delay should not be more than ".concat(RetryHandlerOptions.MAX_DELAY)); - error.name = "MaxLimitExceeded"; - throw error; - } - else if (maxRetries > RetryHandlerOptions.MAX_MAX_RETRIES) { - var error = new Error("MaxRetries should not be more than ".concat(RetryHandlerOptions.MAX_MAX_RETRIES)); - error.name = "MaxLimitExceeded"; - throw error; - } - else if (delay < 0 && maxRetries < 0) { - var error = new Error("Delay and MaxRetries should not be negative"); - error.name = "MinExpectationNotMet"; - throw error; - } - else if (delay < 0) { - var error = new Error("Delay should not be negative"); - error.name = "MinExpectationNotMet"; - throw error; - } - else if (maxRetries < 0) { - var error = new Error("MaxRetries should not be negative"); - error.name = "MinExpectationNotMet"; - throw error; - } - this.delay = Math.min(delay, RetryHandlerOptions.MAX_DELAY); - this.maxRetries = Math.min(maxRetries, RetryHandlerOptions.MAX_MAX_RETRIES); - this.shouldRetry = shouldRetry; - } - /** - * @public - * To get the maximum delay - * @returns A maximum delay - */ - RetryHandlerOptions.prototype.getMaxDelay = function () { - return RetryHandlerOptions.MAX_DELAY; - }; - /** - * @private - * @static - * A member holding default delay value in seconds - */ - RetryHandlerOptions.DEFAULT_DELAY = 3; - /** - * @private - * @static - * A member holding default maxRetries value - */ - RetryHandlerOptions.DEFAULT_MAX_RETRIES = 3; - /** - * @private - * @static - * A member holding maximum delay value in seconds - */ - RetryHandlerOptions.MAX_DELAY = 180; - /** - * @private - * @static - * A member holding maximum maxRetries value - */ - RetryHandlerOptions.MAX_MAX_RETRIES = 10; - /** - * @private - * A member holding default shouldRetry callback - */ - RetryHandlerOptions.defaultShouldRetry = function () { return true; }; - return RetryHandlerOptions; -}()); -exports.RetryHandlerOptions = RetryHandlerOptions; -//# sourceMappingURL=RetryHandlerOptions.js.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/options/RetryHandlerOptions.js.map b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/options/RetryHandlerOptions.js.map deleted file mode 100644 index 6031fd8..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/options/RetryHandlerOptions.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"RetryHandlerOptions.js","sourceRoot":"","sources":["../../../../src/middleware/options/RetryHandlerOptions.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAeH;;;;GAIG;AAEH;IAqDC;;;;;;;;OAQG;IACH,6BAAmB,KAAiD,EAAE,UAA4D,EAAE,WAAiE;QAAlL,sBAAA,EAAA,QAAgB,mBAAmB,CAAC,aAAa;QAAE,2BAAA,EAAA,aAAqB,mBAAmB,CAAC,mBAAmB;QAAE,4BAAA,EAAA,cAA2B,mBAAmB,CAAC,kBAAkB;QACpM,IAAI,KAAK,GAAG,mBAAmB,CAAC,SAAS,IAAI,UAAU,GAAG,mBAAmB,CAAC,eAAe,EAAE;YAC9F,IAAM,KAAK,GAAG,IAAI,KAAK,CAAC,uDAAgD,mBAAmB,CAAC,SAAS,kBAAQ,mBAAmB,CAAC,eAAe,CAAE,CAAC,CAAC;YACpJ,KAAK,CAAC,IAAI,GAAG,kBAAkB,CAAC;YAChC,MAAM,KAAK,CAAC;SACZ;aAAM,IAAI,KAAK,GAAG,mBAAmB,CAAC,SAAS,EAAE;YACjD,IAAM,KAAK,GAAG,IAAI,KAAK,CAAC,wCAAiC,mBAAmB,CAAC,SAAS,CAAE,CAAC,CAAC;YAC1F,KAAK,CAAC,IAAI,GAAG,kBAAkB,CAAC;YAChC,MAAM,KAAK,CAAC;SACZ;aAAM,IAAI,UAAU,GAAG,mBAAmB,CAAC,eAAe,EAAE;YAC5D,IAAM,KAAK,GAAG,IAAI,KAAK,CAAC,6CAAsC,mBAAmB,CAAC,eAAe,CAAE,CAAC,CAAC;YACrG,KAAK,CAAC,IAAI,GAAG,kBAAkB,CAAC;YAChC,MAAM,KAAK,CAAC;SACZ;aAAM,IAAI,K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-graph-client/lib/src/middleware/options/TelemetryHandlerOptions.d.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/options/TelemetryHandlerOptions.d.ts deleted file mode 100644 index db2685b..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/options/TelemetryHandlerOptions.d.ts +++ /dev/null @@ -1,58 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -/** - * @module TelemetryHandlerOptions - */ -import { Context } from "../../IContext"; -import { MiddlewareOptions } from "./IMiddlewareOptions"; -/** - * @enum - * @property {number} NONE - The hexadecimal flag value for nothing enabled - * @property {number} REDIRECT_HANDLER_ENABLED - The hexadecimal flag value for redirect handler enabled - * @property {number} RETRY_HANDLER_ENABLED - The hexadecimal flag value for retry handler enabled - * @property {number} AUTHENTICATION_HANDLER_ENABLED - The hexadecimal flag value for the authentication handler enabled - */ -export declare enum FeatureUsageFlag { - NONE = 0, - REDIRECT_HANDLER_ENABLED = 1, - RETRY_HANDLER_ENABLED = 2, - AUTHENTICATION_HANDLER_ENABLED = 4 -} -/** - * @class - * @implements MiddlewareOptions - * Class for TelemetryHandlerOptions - */ -export declare class TelemetryHandlerOptions implements MiddlewareOptions { - /** - * @private - * A member to hold the OR of feature usage flags - */ - private featureUsage; - /** - * @public - * @static - * To update the feature usage in the context object - * @param {Context} context - The request context object containing middleware options - * @param {FeatureUsageFlag} flag - The flag value - * @returns nothing - */ - static updateFeatureUsageFlag(context: Context, flag: FeatureUsageFlag): void; - /** - * @private - * To set the feature usage flag - * @param {FeatureUsageFlag} flag - The flag value - * @returns nothing - */ - private setFeatureUsage; - /** - * @public - * To get the feature usage - * @returns A feature usage flag as hexadecimal string - */ - getFeatureUsage(): string; -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/options/TelemetryHandlerOptions.js b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/options/TelemetryHandlerOptions.js deleted file mode 100644 index 7d7d23c..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/options/TelemetryHandlerOptions.js +++ /dev/null @@ -1,82 +0,0 @@ -"use strict"; -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.TelemetryHandlerOptions = exports.FeatureUsageFlag = void 0; -var MiddlewareControl_1 = require("../MiddlewareControl"); -/** - * @enum - * @property {number} NONE - The hexadecimal flag value for nothing enabled - * @property {number} REDIRECT_HANDLER_ENABLED - The hexadecimal flag value for redirect handler enabled - * @property {number} RETRY_HANDLER_ENABLED - The hexadecimal flag value for retry handler enabled - * @property {number} AUTHENTICATION_HANDLER_ENABLED - The hexadecimal flag value for the authentication handler enabled - */ -var FeatureUsageFlag; -(function (FeatureUsageFlag) { - /* eslint-disable @typescript-eslint/naming-convention */ - FeatureUsageFlag[FeatureUsageFlag["NONE"] = 0] = "NONE"; - FeatureUsageFlag[FeatureUsageFlag["REDIRECT_HANDLER_ENABLED"] = 1] = "REDIRECT_HANDLER_ENABLED"; - FeatureUsageFlag[FeatureUsageFlag["RETRY_HANDLER_ENABLED"] = 2] = "RETRY_HANDLER_ENABLED"; - FeatureUsageFlag[FeatureUsageFlag["AUTHENTICATION_HANDLER_ENABLED"] = 4] = "AUTHENTICATION_HANDLER_ENABLED"; - /* eslint-enable @typescript-eslint/naming-convention */ -})(FeatureUsageFlag || (exports.FeatureUsageFlag = FeatureUsageFlag = {})); -/** - * @class - * @implements MiddlewareOptions - * Class for TelemetryHandlerOptions - */ -var TelemetryHandlerOptions = /** @class */ (function () { - function TelemetryHandlerOptions() { - /** - * @private - * A member to hold the OR of feature usage flags - */ - this.featureUsage = FeatureUsageFlag.NONE; - } - /** - * @public - * @static - * To update the feature usage in the context object - * @param {Context} context - The request context object containing middleware options - * @param {FeatureUsageFlag} flag - The flag value - * @returns nothing - */ - TelemetryHandlerOptions.updateFeatureUsageFlag = function (context, flag) { - var options; - if (context.middlewareControl instanceof MiddlewareControl_1.MiddlewareControl) { - options = context.middlewareControl.getMiddlewareOptions(TelemetryHandlerOptions); - } - else { - context.middlewareControl = new MiddlewareControl_1.MiddlewareControl(); - } - if (typeof options === "undefined") { - options = new TelemetryHandlerOptions(); - context.middlewareControl.setMiddlewareOptions(TelemetryHandlerOptions, options); - } - options.setFeatureUsage(flag); - }; - /** - * @private - * To set the feature usage flag - * @param {FeatureUsageFlag} flag - The flag value - * @returns nothing - */ - TelemetryHandlerOptions.prototype.setFeatureUsage = function (flag) { - this.featureUsage = this.featureUsage | flag; - }; - /** - * @public - * To get the feature usage - * @returns A feature usage flag as hexadecimal string - */ - TelemetryHandlerOptions.prototype.getFeatureUsage = function () { - return this.featureUsage.toString(16); - }; - return TelemetryHandlerOptions; -}()); -exports.TelemetryHandlerOptions = TelemetryHandlerOptions; -//# sourceMappingURL=TelemetryHandlerOptions.js.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/options/TelemetryHandlerOptions.js.map b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/options/TelemetryHandlerOptions.js.map deleted file mode 100644 index 9065439..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/middleware/options/TelemetryHandlerOptions.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"TelemetryHandlerOptions.js","sourceRoot":"","sources":["../../../../src/middleware/options/TelemetryHandlerOptions.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAOH,0DAAyD;AAGzD;;;;;;GAMG;AAEH,IAAY,gBAOX;AAPD,WAAY,gBAAgB;IAC3B,0DAA0D;IAC1D,uDAAU,CAAA;IACV,+FAA8B,CAAA;IAC9B,yFAA2B,CAAA;IAC3B,2GAAoC,CAAA;IACpC,yDAAyD;AAC1D,CAAC,EAPW,gBAAgB,gCAAhB,gBAAgB,QAO3B;AAED;;;;GAIG;AAEH;IAAA;QACC;;;WAGG;QACK,iBAAY,GAAqB,gBAAgB,CAAC,IAAI,CAAC;IA0ChE,CAAC;IAxCA;;;;;;;OAOG;IACW,8CAAsB,GAApC,UAAqC,OAAgB,EAAE,IAAsB;QAC5E,IAAI,OAAgC,CAAC;QACrC,IAAI,OAAO,CAAC,iBAAiB,YAAY,qCAAiB,EAAE;YAC3D,OAAO,GAAG,OAAO,CAAC,iBAAiB,CAAC,oBAAoB,CAAC,uBAAuB,CAA4B,CAAC;SAC7G;aAAM;YACN,OAAO,CAAC,iBAAiB,GAAG,IAAI,qCAAiB,EAAE,CAAC;SACpD;QACD,IAAI,OAAO,OAAO,KAAK,WAAW,EAAE;YACnC,OAAO,GAAG,IAAI,uBAAuB,EAAE,CAAC;YACxC,OAAO,CAAC,iBAAiB,CAAC,oBAAoB,CAAC,uBAAuB,EAAE,OAAO,CAAC,CAAC;SACjF;QACD,OAAO,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;IAC/B,CAAC;IAED;;;;;OAKG;IACK,iDAAe,GAAvB,UAAwB,IAAsB;QAC7C,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC;IAC9C,CAAC;IAED;;;;OAIG;IACI,iDAAe,GAAtB;QACC,OAAO,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;IACvC,CAAC;IACF,8BAAC;AAAD,CAAC,AA/CD,IA+CC;AA/CY,0DAAuB"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/tasks/FileUploadTask/FileObjectClasses/FileUpload.d.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/tasks/FileUploadTask/FileObjectClasses/FileUpload.d.ts deleted file mode 100644 index 7ab72fe..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/tasks/FileUploadTask/FileObjectClasses/FileUpload.d.ts +++ /dev/null @@ -1,34 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -import { FileObject, SliceType } from "../../LargeFileUploadTask"; -import { Range } from "../Range"; -/** - * @class - * Class used for creating LargeFileUploadTask fileobject. - * This class accepts files of type ArrayBuffer, Blob, Uint8Array. - */ -export declare class FileUpload implements FileObject { - content: ArrayBuffer | Blob | Uint8Array; - name: string; - size: number; - /** - * @public - * @constructor - * @param {ArrayBuffer | Blob | Uint8Array} content - The file to be uploaded - * @param {string} name - The name of the file to be uploaded - * @param {number} size - The total size of the file to be uploaded - * @returns An instance of the FileUpload class - */ - constructor(content: ArrayBuffer | Blob | Uint8Array, name: string, size: number); - /** - * @public - * Slices the file content to the given range - * @param {Range} range - The range value - * @returns The sliced file part - */ - sliceFile(range: Range): ArrayBuffer | Blob | Uint8Array; -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/tasks/FileUploadTask/FileObjectClasses/FileUpload.js b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/tasks/FileUploadTask/FileObjectClasses/FileUpload.js deleted file mode 100644 index 31cecb2..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/tasks/FileUploadTask/FileObjectClasses/FileUpload.js +++ /dev/null @@ -1,45 +0,0 @@ -"use strict"; -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.FileUpload = void 0; -var GraphClientError_1 = require("../../../GraphClientError"); -/** - * @class - * Class used for creating LargeFileUploadTask fileobject. - * This class accepts files of type ArrayBuffer, Blob, Uint8Array. - */ -var FileUpload = /** @class */ (function () { - /** - * @public - * @constructor - * @param {ArrayBuffer | Blob | Uint8Array} content - The file to be uploaded - * @param {string} name - The name of the file to be uploaded - * @param {number} size - The total size of the file to be uploaded - * @returns An instance of the FileUpload class - */ - function FileUpload(content, name, size) { - this.content = content; - this.name = name; - this.size = size; - if (!content || !name || !size) { - throw new GraphClientError_1.GraphClientError("Please provide the upload content, name of the file and size of the file"); - } - } - /** - * @public - * Slices the file content to the given range - * @param {Range} range - The range value - * @returns The sliced file part - */ - FileUpload.prototype.sliceFile = function (range) { - return this.content.slice(range.minValue, range.maxValue + 1); - }; - return FileUpload; -}()); -exports.FileUpload = FileUpload; -//# sourceMappingURL=FileUpload.js.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/tasks/FileUploadTask/FileObjectClasses/FileUpload.js.map b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/tasks/FileUploadTask/FileObjectClasses/FileUpload.js.map deleted file mode 100644 index 9930925..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/tasks/FileUploadTask/FileObjectClasses/FileUpload.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"FileUpload.js","sourceRoot":"","sources":["../../../../../src/tasks/FileUploadTask/FileObjectClasses/FileUpload.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,8DAA6D;AAI7D;;;;GAIG;AACH;IACC;;;;;;;OAOG;IACH,oBAA0B,OAAwC,EAAS,IAAY,EAAS,IAAY;QAAlF,YAAO,GAAP,OAAO,CAAiC;QAAS,SAAI,GAAJ,IAAI,CAAQ;QAAS,SAAI,GAAJ,IAAI,CAAQ;QAC3G,IAAI,CAAC,OAAO,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,EAAE;YAC/B,MAAM,IAAI,mCAAgB,CAAC,0EAA0E,CAAC,CAAC;SACvG;IACF,CAAC;IAED;;;;;OAKG;IACI,8BAAS,GAAhB,UAAiB,KAAY;QAC5B,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,QAAQ,EAAE,KAAK,CAAC,QAAQ,GAAG,CAAC,CAAC,CAAC;IAC/D,CAAC;IACF,iBAAC;AAAD,CAAC,AAxBD,IAwBC;AAxBY,gCAAU"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/tasks/FileUploadTask/FileObjectClasses/StreamUpload.d.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/tasks/FileUploadTask/FileObjectClasses/StreamUpload.d.ts deleted file mode 100644 index 4b87c2e..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/tasks/FileUploadTask/FileObjectClasses/StreamUpload.d.ts +++ /dev/null @@ -1,32 +0,0 @@ -import { FileObject, SliceType } from "../../LargeFileUploadTask"; -import { Range } from "../Range"; -/** - * @class - * FileObject class for Readable Stream upload - */ -export declare class StreamUpload implements FileObject { - content: NodeStream; - name: string; - size: number; - /** - * @private - * Represents a cache of the last attempted upload slice. - * This can be used when resuming a previously failed slice upload. - */ - private previousSlice; - constructor(content: NodeStream, name: string, size: number); - /** - * @public - * Slices the file content to the given range - * @param {Range} range - The range value - * @returns The sliced file part - */ - sliceFile(range: Range): Promise; - /** - * @private - * Reads the specified byte size from the stream - * @param {number} size - The size of bytes to be read - * @returns Buffer with the given length of data. - */ - private readNBytesFromStream; -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/tasks/FileUploadTask/FileObjectClasses/StreamUpload.js b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/tasks/FileUploadTask/FileObjectClasses/StreamUpload.js deleted file mode 100644 index aeefb9d..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/tasks/FileUploadTask/FileObjectClasses/StreamUpload.js +++ /dev/null @@ -1,132 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.StreamUpload = void 0; -var tslib_1 = require("tslib"); -var GraphClientError_1 = require("../../../GraphClientError"); -/** - * @class - * FileObject class for Readable Stream upload - */ -var StreamUpload = /** @class */ (function () { - function StreamUpload(content, name, size) { - this.content = content; - this.name = name; - this.size = size; - if (!content || !name || !size) { - throw new GraphClientError_1.GraphClientError("Please provide the Readable Stream content, name of the file and size of the file"); - } - } - /** - * @public - * Slices the file content to the given range - * @param {Range} range - The range value - * @returns The sliced file part - */ - StreamUpload.prototype.sliceFile = function (range) { - return tslib_1.__awaiter(this, void 0, void 0, function () { - var rangeSize, bufs, previousRangeMin, previousRangeMax, _a, _b, slicedChunk; - return tslib_1.__generator(this, function (_c) { - switch (_c.label) { - case 0: - rangeSize = range.maxValue - range.minValue + 1; - bufs = []; - /** - * The sliceFile reads the first `rangeSize` number of bytes from the stream. - * The previousSlice property is used to seek the range of bytes in the previous slice. - * Suppose, the sliceFile reads bytes from `10 - 20` from the stream but the upload of this slice fails. - * When the user resumes, the stream will have bytes from position 21. - * The previousSlice.Range is used to compare if the requested range is cached in the previousSlice property or present in the Readable Stream. - */ - if (this.previousSlice) { - if (range.minValue < this.previousSlice.range.minValue) { - throw new GraphClientError_1.GraphClientError("An error occurred while uploading the stream. Please restart the stream upload from the first byte of the file."); - } - if (range.minValue < this.previousSlice.range.maxValue) { - previousRangeMin = this.previousSlice.range.minValue; - previousRangeMax = this.previousSlice.range.maxValue; - // Check if the requested range is same as previously sliced range - if (range.minValue === previousRangeMin && range.maxValue === previousRangeMax) { - return [2 /*return*/, this.previousSlice.fileSlice]; - } - /** - * The following check considers a possibility - * of an upload failing after some of the bytes of the previous slice - * were successfully uploaded. - * Example - Previous slice range - `10 - 20`. Current requested range is `15 - 20`. - */ - if (range.maxValue === previousRangeMax) { - return [2 /*return*/, this.previousSlice.fileSlice.slice(range.minValue, range.maxValue + 1)]; - } - /** - * If an upload fails after some of the bytes of the previous slice - * were successfully uploaded and the new Range.Maximum is greater than the previous Range.Maximum - * Example - Previous slice range - `10 - 20`. Current requested range is `15 - 25`, - * then read the bytes from position 15 to 20 from previousSlice.fileSlice and read bytes from position 21 to 25 from the Readable Stream - */ - bufs.push(this.previousSlice.fileSlice.slice(range.minValue, previousRangeMax + 1)); - rangeSize = range.maxValue - previousRangeMax; - } - } - if (!(this.content && this.content.readable)) return [3 /*break*/, 4]; - if (!(this.content.readableLength >= rangeSize)) return [3 /*break*/, 1]; - bufs.push(this.content.read(rangeSize)); - return [3 /*break*/, 3]; - case 1: - _b = (_a = bufs).push; - return [4 /*yield*/, this.readNBytesFromStream(rangeSize)]; - case 2: - _b.apply(_a, [_c.sent()]); - _c.label = 3; - case 3: return [3 /*break*/, 5]; - case 4: throw new GraphClientError_1.GraphClientError("Stream is not readable."); - case 5: - slicedChunk = Buffer.concat(bufs); - this.previousSlice = { fileSlice: slicedChunk, range: range }; - return [2 /*return*/, slicedChunk]; - } - }); - }); - }; - /** - * @private - * Reads the specified byte size from the stream - * @param {number} size - The size of bytes to be read - * @returns Buffer with the given length of data. - */ - StreamUpload.prototype.readNBytesFromStream = function (size) { - var _this = this; - return new Promise(function (resolve, reject) { - var chunks = []; - var remainder = size; - var length = 0; - _this.content.on("end", function () { - if (remainder > 0) { - return reject(new GraphClientError_1.GraphClientError("Stream ended before reading required range size")); - } - }); - _this.content.on("readable", function () { - /** - * (chunk = this.content.read(size)) can return null if size of stream is less than 'size' parameter. - * Read the remainder number of bytes from the stream iteratively as they are available. - */ - var chunk; - while (length < size && (chunk = _this.content.read(remainder)) !== null) { - length += chunk.length; - chunks.push(chunk); - if (remainder > 0) { - remainder = size - length; - } - } - if (length === size) { - return resolve(Buffer.concat(chunks)); - } - if (!_this.content || !_this.content.readable) { - return reject(new GraphClientError_1.GraphClientError("Error encountered while reading the stream during the upload")); - } - }); - }); - }; - return StreamUpload; -}()); -exports.StreamUpload = StreamUpload; -//# sourceMappingURL=StreamUpload.js.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/tasks/FileUploadTask/FileObjectClasses/StreamUpload.js.map b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/tasks/FileUploadTask/FileObjectClasses/StreamUpload.js.map deleted file mode 100644 index f31557a..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/tasks/FileUploadTask/FileObjectClasses/StreamUpload.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"StreamUpload.js","sourceRoot":"","sources":["../../../../../src/tasks/FileUploadTask/FileObjectClasses/StreamUpload.ts"],"names":[],"mappings":";;;;AAAA,8DAA6D;AAe7D;;;GAGG;AACH;IAQC,sBAA0B,OAAmB,EAAS,IAAY,EAAS,IAAY;QAA7D,YAAO,GAAP,OAAO,CAAY;QAAS,SAAI,GAAJ,IAAI,CAAQ;QAAS,SAAI,GAAJ,IAAI,CAAQ;QACtF,IAAI,CAAC,OAAO,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,EAAE;YAC/B,MAAM,IAAI,mCAAgB,CAAC,mFAAmF,CAAC,CAAC;SAChH;IACF,CAAC;IAED;;;;;OAKG;IACU,gCAAS,GAAtB,UAAuB,KAAY;;;;;;wBAC9B,SAAS,GAAG,KAAK,CAAC,QAAQ,GAAG,KAAK,CAAC,QAAQ,GAAG,CAAC,CAAC;wBAI9C,IAAI,GAAG,EAAE,CAAC;wBAEhB;;;;;;2BAMG;wBACH,IAAI,IAAI,CAAC,aAAa,EAAE;4BACvB,IAAI,KAAK,CAAC,QAAQ,GAAG,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,QAAQ,EAAE;gCACvD,MAAM,IAAI,mCAAgB,CAAC,iHAAiH,CAAC,CAAC;6BAC9I;4BAED,IAAI,KAAK,CAAC,QAAQ,GAAG,IAAI,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,CAAC,QAAQ,EAAE;oBAC5C,OAAO,MAAM,CAAC,IAAI,mCAAgB,CAAC,8DAA8D,CAAC,CAAC,CAAC;iBACpG;YACF,CAAC,CAAC,CAAC;QACJ,CAAC,CAAC,CAAC;IACJ,CAAC;IACF,mBAAC;AAAD,CAAC,AA9HD,IA8HC;AA9HY,oCAAY"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/tasks/FileUploadTask/Interfaces/IUploadEventHandlers.d.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/tasks/FileUploadTask/Interfaces/IUploadEventHandlers.d.ts deleted file mode 100644 index 2165e25..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/tasks/FileUploadTask/Interfaces/IUploadEventHandlers.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { Range } from "../Range"; -/** - * Interface enabling progress handling with callbacks. - */ -export interface UploadEventHandlers { - /** - * Parameters that are passed into the progress, completed, failure callback options. - */ - extraCallbackParam?: unknown; - /** - * Callback function called on each slice upload during the LargeFileUploadTask.upload() process - */ - progress?: (range?: Range, extraCallbackParam?: unknown) => void; -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/tasks/FileUploadTask/Interfaces/IUploadEventHandlers.js b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/tasks/FileUploadTask/Interfaces/IUploadEventHandlers.js deleted file mode 100644 index 9388720..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/tasks/FileUploadTask/Interfaces/IUploadEventHandlers.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=IUploadEventHandlers.js.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/tasks/FileUploadTask/Interfaces/IUploadEventHandlers.js.map b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/tasks/FileUploadTask/Interfaces/IUploadEventHandlers.js.map deleted file mode 100644 index efa9e87..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/tasks/FileUploadTask/Interfaces/IUploadEventHandlers.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"IUploadEventHandlers.js","sourceRoot":"","sources":["../../../../../src/tasks/FileUploadTask/Interfaces/IUploadEventHandlers.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/tasks/FileUploadTask/Range.d.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/tasks/FileUploadTask/Range.d.ts deleted file mode 100644 index dec9b39..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/tasks/FileUploadTask/Range.d.ts +++ /dev/null @@ -1,34 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -/** - * @module Range - */ -/** - * @class - * Class representing Range - */ -export declare class Range { - /** - * @public - * The minimum value of the range - */ - minValue: number; - /** - * @public - * The maximum value of the range - */ - maxValue: number; - /** - * @public - * @constructor - * Creates a range for given min and max values - * @param {number} [minVal = -1] - The minimum value. - * @param {number} [maxVal = -1] - The maximum value. - * @returns An instance of a Range - */ - constructor(minVal?: number, maxVal?: number); -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/tasks/FileUploadTask/Range.js b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/tasks/FileUploadTask/Range.js deleted file mode 100644 index 676a450..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/tasks/FileUploadTask/Range.js +++ /dev/null @@ -1,35 +0,0 @@ -"use strict"; -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Range = void 0; -/** - * @module Range - */ -/** - * @class - * Class representing Range - */ -var Range = /** @class */ (function () { - /** - * @public - * @constructor - * Creates a range for given min and max values - * @param {number} [minVal = -1] - The minimum value. - * @param {number} [maxVal = -1] - The maximum value. - * @returns An instance of a Range - */ - function Range(minVal, maxVal) { - if (minVal === void 0) { minVal = -1; } - if (maxVal === void 0) { maxVal = -1; } - this.minValue = minVal; - this.maxValue = maxVal; - } - return Range; -}()); -exports.Range = Range; -//# sourceMappingURL=Range.js.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/tasks/FileUploadTask/Range.js.map b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/tasks/FileUploadTask/Range.js.map deleted file mode 100644 index a8f91e4..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/tasks/FileUploadTask/Range.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Range.js","sourceRoot":"","sources":["../../../../src/tasks/FileUploadTask/Range.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH;;GAEG;AAEH;;;GAGG;AACH;IAaC;;;;;;;OAOG;IACH,eAAmB,MAAW,EAAE,MAAW;QAAxB,uBAAA,EAAA,UAAU,CAAC;QAAE,uBAAA,EAAA,UAAU,CAAC;QAC1C,IAAI,CAAC,QAAQ,GAAG,MAAM,CAAC;QACvB,IAAI,CAAC,QAAQ,GAAG,MAAM,CAAC;IACxB,CAAC;IACF,YAAC;AAAD,CAAC,AAzBD,IAyBC;AAzBY,sBAAK"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/tasks/FileUploadTask/UploadResult.d.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/tasks/FileUploadTask/UploadResult.d.ts deleted file mode 100644 index e8c170e..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/tasks/FileUploadTask/UploadResult.d.ts +++ /dev/null @@ -1,55 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -/** - * Class representing a successful file upload result - */ -export declare class UploadResult { - /** - * @private - * Location value looked up in the response header - */ - private _location; - /** - * @private - * Response body of the final raw response - */ - private _responseBody; - /** - * @public - * Get of the location value. - * Location value is looked up in the response header - */ - get location(): string; - /** - * @public - * Set the location value - * Location value is looked up in the response header - */ - set location(location: string); - /** - * @public - * Get The response body from the completed upload response - */ - get responseBody(): unknown; - /** - * @public - * Set the response body from the completed upload response - */ - set responseBody(responseBody: unknown); - /** - * @public - * @param {responseBody} responsebody - The response body from the completed upload response - * @param {location} location - The location value from the headers from the completed upload response - */ - constructor(responseBody: unknown, location: string); - /** - * @public - * @param {responseBody} responseBody - The response body from the completed upload response - * @param {responseHeaders} responseHeaders - The headers from the completed upload response - */ - static CreateUploadResult(responseBody?: unknown, responseHeaders?: Headers): UploadResult; -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/tasks/FileUploadTask/UploadResult.js b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/tasks/FileUploadTask/UploadResult.js deleted file mode 100644 index 5b2652f..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/tasks/FileUploadTask/UploadResult.js +++ /dev/null @@ -1,73 +0,0 @@ -"use strict"; -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.UploadResult = void 0; -/** - * Class representing a successful file upload result - */ -var UploadResult = /** @class */ (function () { - /** - * @public - * @param {responseBody} responsebody - The response body from the completed upload response - * @param {location} location - The location value from the headers from the completed upload response - */ - function UploadResult(responseBody, location) { - // Response body or the location parameter can be undefined. - this._location = location; - this._responseBody = responseBody; - } - Object.defineProperty(UploadResult.prototype, "location", { - /** - * @public - * Get of the location value. - * Location value is looked up in the response header - */ - get: function () { - return this._location; - }, - /** - * @public - * Set the location value - * Location value is looked up in the response header - */ - set: function (location) { - this._location = location; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(UploadResult.prototype, "responseBody", { - /** - * @public - * Get The response body from the completed upload response - */ - get: function () { - return this._responseBody; - }, - /** - * @public - * Set the response body from the completed upload response - */ - set: function (responseBody) { - this._responseBody = responseBody; - }, - enumerable: false, - configurable: true - }); - /** - * @public - * @param {responseBody} responseBody - The response body from the completed upload response - * @param {responseHeaders} responseHeaders - The headers from the completed upload response - */ - UploadResult.CreateUploadResult = function (responseBody, responseHeaders) { - return new UploadResult(responseBody, responseHeaders.get("location")); - }; - return UploadResult; -}()); -exports.UploadResult = UploadResult; -//# sourceMappingURL=UploadResult.js.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/tasks/FileUploadTask/UploadResult.js.map b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/tasks/FileUploadTask/UploadResult.js.map deleted file mode 100644 index 908f3e7..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/tasks/FileUploadTask/UploadResult.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"UploadResult.js","sourceRoot":"","sources":["../../../../src/tasks/FileUploadTask/UploadResult.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH;;GAEG;AACH;IA+CC;;;;OAIG;IACH,sBAAmB,YAAqB,EAAE,QAAgB;QACzD,4DAA4D;QAC5D,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;QAC1B,IAAI,CAAC,aAAa,GAAG,YAAY,CAAC;IACnC,CAAC;IAtCD,sBAAW,kCAAQ;QALnB;;;;WAIG;aACH;YACC,OAAO,IAAI,CAAC,SAAS,CAAC;QACvB,CAAC;QAED;;;;WAIG;aACH,UAAoB,QAAgB;YACnC,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;QAC3B,CAAC;;;OATA;IAeD,sBAAW,sCAAY;QAJvB;;;WAGG;aACH;YACC,OAAO,IAAI,CAAC,aAAa,CAAC;QAC3B,CAAC;QAED;;;WAGG;aACH,UAAwB,YAAqB;YAC5C,IAAI,CAAC,aAAa,GAAG,YAAY,CAAC;QACnC,CAAC;;;OARA;IAqBD;;;;OAIG;IACW,+BAAkB,GAAhC,UAAiC,YAAsB,EAAE,eAAyB;QACjF,OAAO,IAAI,YAAY,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC;IACxE,CAAC;IACF,mBAAC;AAAD,CAAC,AAlED,IAkEC;AAlEY,oCAAY"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/tasks/LargeFileUploadTask.d.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/tasks/LargeFileUploadTask.d.ts deleted file mode 100644 index 0f19ddd..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/tasks/LargeFileUploadTask.d.ts +++ /dev/null @@ -1,201 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -import { Client } from "../index"; -import { UploadEventHandlers } from "./FileUploadTask/Interfaces/IUploadEventHandlers"; -import { Range } from "./FileUploadTask/Range"; -import { UploadResult } from "./FileUploadTask/UploadResult"; -/** - * @interface - * Signature to representing key value pairs - * @property {[key: string] : string | number} - The Key value pair - */ -interface KeyValuePairObjectStringNumber { - [key: string]: string | number; -} -/** - * @interface - * Signature to define options for upload task - * @property {number} [rangeSize = LargeFileUploadTask.DEFAULT_FILE_SIZE] - Specifies the range chunk size - * @property {UploadEventHandlers} uploadEventHandlers - UploadEventHandlers attached to an upload task - */ -export interface LargeFileUploadTaskOptions { - rangeSize?: number; - uploadEventHandlers?: UploadEventHandlers; -} -/** - * @interface - * Signature to represent upload session resulting from the session creation in the server - * @property {string} url - The URL to which the file upload is made - * @property {Date} expiry - The expiration of the time of the upload session - */ -export interface LargeFileUploadSession { - url: string; - expiry: Date; - isCancelled?: boolean; -} -/** - * @type - * Representing the return type of the sliceFile function that is type of the slice of a given range. - */ -export type SliceType = ArrayBuffer | Blob | Uint8Array; -/** - * @interface - * Signature to define the properties and content of the file in upload task - * @property {ArrayBuffer | File} content - The actual file content - * @property {string} name - Specifies the file name with extension - * @property {number} size - Specifies size of the file - */ -export interface FileObject { - content: T; - name: string; - size: number; - sliceFile(range: Range): SliceType | Promise; -} -/** - * @class - * Class representing LargeFileUploadTask - */ -export declare class LargeFileUploadTask { - /** - * @private - * Default value for the rangeSize - */ - private DEFAULT_FILE_SIZE; - /** - * @protected - * The GraphClient instance - */ - protected client: Client; - /** - * @protected - * The object holding file details - */ - protected file: FileObject; - /** - * @protected - * The object holding options for the task - */ - protected options: LargeFileUploadTaskOptions; - /** - * @protected - * The object for upload session - */ - protected uploadSession: LargeFileUploadSession; - /** - * @protected - * The next range needs to be uploaded - */ - protected nextRange: Range; - /** - * @public - * @static - * @async - * Makes request to the server to create an upload session - * @param {Client} client - The GraphClient instance - * @param {string} requestUrl - The URL to create the upload session - * @param {any} payload - The payload that needs to be sent - * @param {KeyValuePairObjectStringNumber} headers - The headers that needs to be sent - * @returns The promise that resolves to LargeFileUploadSession - */ - static createUploadSession(client: Client, requestUrl: string, payload: any, headers?: KeyValuePairObjectStringNumber): Promise; - /** - * @public - * @constructor - * Constructs a LargeFileUploadTask - * @param {Client} client - The GraphClient instance - * @param {FileObject} file - The FileObject holding details of a file that needs to be uploaded - * @param {LargeFileUploadSession} uploadSession - The upload session to which the upload has to be done - * @param {LargeFileUploadTaskOptions} options - The upload task options - * @returns An instance of LargeFileUploadTask - */ - constructor(client: Client, file: FileObject, uploadSession: LargeFileUploadSession, options?: LargeFileUploadTaskOptions); - /** - * @private - * Parses given range string to the Range instance - * @param {string[]} ranges - The ranges value - * @returns The range instance - */ - private parseRange; - /** - * @private - * Updates the expiration date and the next range - * @param {UploadStatusResponse} response - The response of the upload status - * @returns Nothing - */ - private updateTaskStatus; - /** - * @public - * Gets next range that needs to be uploaded - * @returns The range instance - */ - getNextRange(): Range; - /** - * @deprecated This function has been moved into FileObject interface. - * @public - * Slices the file content to the given range - * @param {Range} range - The range value - * @returns The sliced ArrayBuffer or Blob - */ - sliceFile(range: Range): ArrayBuffer | Blob; - /** - * @public - * @async - * Uploads file to the server in a sequential order by slicing the file - * @returns The promise resolves to uploaded response - */ - upload(): Promise; - private reportProgress; - /** - * @public - * @async - * Uploads given slice to the server - * @param {ArrayBuffer | Blob | File} fileSlice - The file slice - * @param {Range} range - The range value - * @param {number} totalSize - The total size of a complete file - * @returns The response body of the upload slice result - */ - uploadSlice(fileSlice: ArrayBuffer | Blob | File, range: Range, totalSize: number): Promise; - /** - * @public - * @async - * Uploads given slice to the server - * @param {unknown} fileSlice - The file slice - * @param {Range} range - The range value - * @param {number} totalSize - The total size of a complete file - * @returns The raw response of the upload slice result - */ - uploadSliceGetRawResponse(fileSlice: unknown, range: Range, totalSize: number): Promise; - /** - * @public - * @async - * Deletes upload session in the server - * @returns The promise resolves to cancelled response - */ - cancel(): Promise; - /** - * @public - * @async - * Gets status for the upload session - * @returns The promise resolves to the status enquiry response - */ - getStatus(): Promise; - /** - * @public - * @async - * Resumes upload session and continue uploading the file from the last sent range - * @returns The promise resolves to the uploaded response - */ - resume(): Promise; - /** - * @public - * @async - * Get the upload session information - * @returns The large file upload session - */ - getUploadSession(): LargeFileUploadSession; -} -export {}; diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/tasks/LargeFileUploadTask.js b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/tasks/LargeFileUploadTask.js deleted file mode 100644 index ad03725..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/tasks/LargeFileUploadTask.js +++ /dev/null @@ -1,336 +0,0 @@ -"use strict"; -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.LargeFileUploadTask = void 0; -var tslib_1 = require("tslib"); -/** - * @module LargeFileUploadTask - */ -var GraphClientError_1 = require("../GraphClientError"); -var GraphResponseHandler_1 = require("../GraphResponseHandler"); -var ResponseType_1 = require("../ResponseType"); -var Range_1 = require("./FileUploadTask/Range"); -var UploadResult_1 = require("./FileUploadTask/UploadResult"); -/** - * @class - * Class representing LargeFileUploadTask - */ -var LargeFileUploadTask = /** @class */ (function () { - /** - * @public - * @constructor - * Constructs a LargeFileUploadTask - * @param {Client} client - The GraphClient instance - * @param {FileObject} file - The FileObject holding details of a file that needs to be uploaded - * @param {LargeFileUploadSession} uploadSession - The upload session to which the upload has to be done - * @param {LargeFileUploadTaskOptions} options - The upload task options - * @returns An instance of LargeFileUploadTask - */ - function LargeFileUploadTask(client, file, uploadSession, options) { - if (options === void 0) { options = {}; } - /** - * @private - * Default value for the rangeSize - */ - this.DEFAULT_FILE_SIZE = 5 * 1024 * 1024; - this.client = client; - if (!file.sliceFile) { - throw new GraphClientError_1.GraphClientError("Please pass the FileUpload object, StreamUpload object or any custom implementation of the FileObject interface"); - } - else { - this.file = file; - } - this.file = file; - if (!options.rangeSize) { - options.rangeSize = this.DEFAULT_FILE_SIZE; - } - this.options = options; - this.uploadSession = uploadSession; - this.nextRange = new Range_1.Range(0, this.options.rangeSize - 1); - } - /** - * @public - * @static - * @async - * Makes request to the server to create an upload session - * @param {Client} client - The GraphClient instance - * @param {string} requestUrl - The URL to create the upload session - * @param {any} payload - The payload that needs to be sent - * @param {KeyValuePairObjectStringNumber} headers - The headers that needs to be sent - * @returns The promise that resolves to LargeFileUploadSession - */ - LargeFileUploadTask.createUploadSession = function (client, requestUrl, payload, headers) { - if (headers === void 0) { headers = {}; } - return tslib_1.__awaiter(this, void 0, void 0, function () { - var session, largeFileUploadSession; - return tslib_1.__generator(this, function (_a) { - switch (_a.label) { - case 0: return [4 /*yield*/, client - .api(requestUrl) - .headers(headers) - .post(payload)]; - case 1: - session = _a.sent(); - largeFileUploadSession = { - url: session.uploadUrl, - expiry: new Date(session.expirationDateTime), - isCancelled: false, - }; - return [2 /*return*/, largeFileUploadSession]; - } - }); - }); - }; - /** - * @private - * Parses given range string to the Range instance - * @param {string[]} ranges - The ranges value - * @returns The range instance - */ - LargeFileUploadTask.prototype.parseRange = function (ranges) { - var rangeStr = ranges[0]; - if (typeof rangeStr === "undefined" || rangeStr === "") { - return new Range_1.Range(); - } - var firstRange = rangeStr.split("-"); - var minVal = parseInt(firstRange[0], 10); - var maxVal = parseInt(firstRange[1], 10); - if (Number.isNaN(maxVal)) { - maxVal = this.file.size - 1; - } - return new Range_1.Range(minVal, maxVal); - }; - /** - * @private - * Updates the expiration date and the next range - * @param {UploadStatusResponse} response - The response of the upload status - * @returns Nothing - */ - LargeFileUploadTask.prototype.updateTaskStatus = function (response) { - this.uploadSession.expiry = new Date(response.expirationDateTime); - this.nextRange = this.parseRange(response.nextExpectedRanges); - }; - /** - * @public - * Gets next range that needs to be uploaded - * @returns The range instance - */ - LargeFileUploadTask.prototype.getNextRange = function () { - if (this.nextRange.minValue === -1) { - return this.nextRange; - } - var minVal = this.nextRange.minValue; - var maxValue = minVal + this.options.rangeSize - 1; - if (maxValue >= this.file.size) { - maxValue = this.file.size - 1; - } - return new Range_1.Range(minVal, maxValue); - }; - /** - * @deprecated This function has been moved into FileObject interface. - * @public - * Slices the file content to the given range - * @param {Range} range - The range value - * @returns The sliced ArrayBuffer or Blob - */ - LargeFileUploadTask.prototype.sliceFile = function (range) { - console.warn("The LargeFileUploadTask.sliceFile() function has been deprecated and moved into the FileObject interface."); - if (this.file.content instanceof ArrayBuffer || this.file.content instanceof Blob || this.file.content instanceof Uint8Array) { - return this.file.content.slice(range.minValue, range.maxValue + 1); - } - throw new GraphClientError_1.GraphClientError("The LargeFileUploadTask.sliceFile() function expects only Blob, ArrayBuffer or Uint8Array file content. Please note that the sliceFile() function is deprecated."); - }; - /** - * @public - * @async - * Uploads file to the server in a sequential order by slicing the file - * @returns The promise resolves to uploaded response - */ - LargeFileUploadTask.prototype.upload = function () { - return tslib_1.__awaiter(this, void 0, void 0, function () { - var uploadEventHandlers, nextRange, err, fileSlice, rawResponse, responseBody, res; - return tslib_1.__generator(this, function (_a) { - switch (_a.label) { - case 0: - uploadEventHandlers = this.options && this.options.uploadEventHandlers; - _a.label = 1; - case 1: - if (!!this.uploadSession.isCancelled) return [3 /*break*/, 5]; - nextRange = this.getNextRange(); - if (nextRange.maxValue === -1) { - err = new Error("Task with which you are trying to upload is already completed, Please check for your uploaded file"); - err.name = "Invalid Session"; - throw err; - } - return [4 /*yield*/, this.file.sliceFile(nextRange)]; - case 2: - fileSlice = _a.sent(); - return [4 /*yield*/, this.uploadSliceGetRawResponse(fileSlice, nextRange, this.file.size)]; - case 3: - rawResponse = _a.sent(); - if (!rawResponse) { - throw new GraphClientError_1.GraphClientError("Something went wrong! Large file upload slice response is null."); - } - return [4 /*yield*/, GraphResponseHandler_1.GraphResponseHandler.getResponse(rawResponse)]; - case 4: - responseBody = _a.sent(); - /** - * (rawResponse.status === 201) -> This condition is applicable for OneDrive, PrintDocument and Outlook APIs. - * (rawResponse.status === 200 && responseBody.id) -> This additional condition is applicable only for OneDrive API. - */ - if (rawResponse.status === 201 || (rawResponse.status === 200 && responseBody.id)) { - this.reportProgress(uploadEventHandlers, nextRange); - return [2 /*return*/, UploadResult_1.UploadResult.CreateUploadResult(responseBody, rawResponse.headers)]; - } - res = { - expirationDateTime: responseBody.expirationDateTime || responseBody.ExpirationDateTime, - nextExpectedRanges: responseBody.NextExpectedRanges || responseBody.nextExpectedRanges, - }; - this.updateTaskStatus(res); - this.reportProgress(uploadEventHandlers, nextRange); - return [3 /*break*/, 1]; - case 5: return [2 /*return*/]; - } - }); - }); - }; - LargeFileUploadTask.prototype.reportProgress = function (uploadEventHandlers, nextRange) { - if (uploadEventHandlers && uploadEventHandlers.progress) { - uploadEventHandlers.progress(nextRange, uploadEventHandlers.extraCallbackParam); - } - }; - /** - * @public - * @async - * Uploads given slice to the server - * @param {ArrayBuffer | Blob | File} fileSlice - The file slice - * @param {Range} range - The range value - * @param {number} totalSize - The total size of a complete file - * @returns The response body of the upload slice result - */ - LargeFileUploadTask.prototype.uploadSlice = function (fileSlice, range, totalSize) { - return tslib_1.__awaiter(this, void 0, void 0, function () { - return tslib_1.__generator(this, function (_a) { - switch (_a.label) { - case 0: return [4 /*yield*/, this.client - .api(this.uploadSession.url) - .headers({ - "Content-Length": "".concat(range.maxValue - range.minValue + 1), - "Content-Range": "bytes ".concat(range.minValue, "-").concat(range.maxValue, "/").concat(totalSize), - "Content-Type": "application/octet-stream", - }) - .put(fileSlice)]; - case 1: return [2 /*return*/, _a.sent()]; - } - }); - }); - }; - /** - * @public - * @async - * Uploads given slice to the server - * @param {unknown} fileSlice - The file slice - * @param {Range} range - The range value - * @param {number} totalSize - The total size of a complete file - * @returns The raw response of the upload slice result - */ - LargeFileUploadTask.prototype.uploadSliceGetRawResponse = function (fileSlice, range, totalSize) { - return tslib_1.__awaiter(this, void 0, void 0, function () { - return tslib_1.__generator(this, function (_a) { - switch (_a.label) { - case 0: return [4 /*yield*/, this.client - .api(this.uploadSession.url) - .headers({ - "Content-Length": "".concat(range.maxValue - range.minValue + 1), - "Content-Range": "bytes ".concat(range.minValue, "-").concat(range.maxValue, "/").concat(totalSize), - "Content-Type": "application/octet-stream", - }) - .responseType(ResponseType_1.ResponseType.RAW) - .put(fileSlice)]; - case 1: return [2 /*return*/, _a.sent()]; - } - }); - }); - }; - /** - * @public - * @async - * Deletes upload session in the server - * @returns The promise resolves to cancelled response - */ - LargeFileUploadTask.prototype.cancel = function () { - return tslib_1.__awaiter(this, void 0, void 0, function () { - var cancelResponse; - return tslib_1.__generator(this, function (_a) { - switch (_a.label) { - case 0: return [4 /*yield*/, this.client - .api(this.uploadSession.url) - .responseType(ResponseType_1.ResponseType.RAW) - .delete()]; - case 1: - cancelResponse = _a.sent(); - if (cancelResponse.status === 204) { - this.uploadSession.isCancelled = true; - } - return [2 /*return*/, cancelResponse]; - } - }); - }); - }; - /** - * @public - * @async - * Gets status for the upload session - * @returns The promise resolves to the status enquiry response - */ - LargeFileUploadTask.prototype.getStatus = function () { - return tslib_1.__awaiter(this, void 0, void 0, function () { - var response; - return tslib_1.__generator(this, function (_a) { - switch (_a.label) { - case 0: return [4 /*yield*/, this.client.api(this.uploadSession.url).get()]; - case 1: - response = _a.sent(); - this.updateTaskStatus(response); - return [2 /*return*/, response]; - } - }); - }); - }; - /** - * @public - * @async - * Resumes upload session and continue uploading the file from the last sent range - * @returns The promise resolves to the uploaded response - */ - LargeFileUploadTask.prototype.resume = function () { - return tslib_1.__awaiter(this, void 0, void 0, function () { - return tslib_1.__generator(this, function (_a) { - switch (_a.label) { - case 0: return [4 /*yield*/, this.getStatus()]; - case 1: - _a.sent(); - return [4 /*yield*/, this.upload()]; - case 2: return [2 /*return*/, _a.sent()]; - } - }); - }); - }; - /** - * @public - * @async - * Get the upload session information - * @returns The large file upload session - */ - LargeFileUploadTask.prototype.getUploadSession = function () { - return this.uploadSession; - }; - return LargeFileUploadTask; -}()); -exports.LargeFileUploadTask = LargeFileUploadTask; -//# sourceMappingURL=LargeFileUploadTask.js.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/tasks/LargeFileUploadTask.js.map b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/tasks/LargeFileUploadTask.js.map deleted file mode 100644 index e3b5865..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/tasks/LargeFileUploadTask.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"LargeFileUploadTask.js","sourceRoot":"","sources":["../../../src/tasks/LargeFileUploadTask.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;AAEH;;GAEG;AAEH,wDAAuD;AACvD,gEAA+D;AAE/D,gDAA+C;AAE/C,gDAA+C;AAC/C,8DAA6D;AAiE7D;;;GAGG;AACH;IA6DC;;;;;;;;;OASG;IACH,6BAAmB,MAAc,EAAE,IAAmB,EAAE,aAAqC,EAAE,OAAwC;QAAxC,wBAAA,EAAA,YAAwC;QAtEvI;;;WAGG;QACK,sBAAiB,GAAW,CAAC,GAAG,IAAI,GAAG,IAAI,CAAC;QAmEnD,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QAErB,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE;YACpB,MAAM,IAAI,mCAAgB,CAAC,iHAAiH,CAAC,CAAC;SAC9I;aAAM;YACN,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;SACjB;QACD,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE;YACvB,OAAO,CAAC,SAAS,GAAG,IAAI,CAAC,iBAAiB,CAAC;SAC3C;QAED,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;QACnC,IAAI,CAAC,SAAS,GAAG,IAAI,aAAK,CAAC,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,SAAS,GAAG,CAAC,CAAC,CAAC;IAC3D,CAAC;IAlDD;;;;;;;;;;OAUG;IACiB,uCAAmB,GAAvC,UAAwC,MAAc,EAAE,UA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CAAM,GAAnB;;;;;4BACwB,qBAAM,IAAI,CAAC,MAAM;6BACtC,GAAG,CAAC,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC;6BAC3B,YAAY,CAAC,2BAAY,CAAC,GAAG,CAAC;6BAC9B,MAAM,EAAE,EAAA;;wBAHJ,cAAc,GAAG,SAGb;wBACV,IAAI,cAAc,CAAC,MAAM,KAAK,GAAG,EAAE;4BAClC,IAAI,CAAC,aAAa,CAAC,WAAW,GAAG,IAAI,CAAC;yBACtC;wBACD,sBAAO,cAAc,EAAC;;;;KACtB;IAED;;;;;OAKG;IACU,uCAAS,GAAtB;;;;;4BACkB,qBAAM,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAA;;wBAA9D,QAAQ,GAAG,SAAmD;wBACpE,IAAI,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAAC;wBAChC,sBAAO,QAAQ,EAAC;;;;KAChB;IAED;;;;;OAKG;IACU,oCAAM,GAAnB;;;;4BACC,qBAAM,IAAI,CAAC,SAAS,EAAE,EAAA;;wBAAtB,SAAsB,CAAC;wBAChB,qBAAM,IAAI,CAAC,MAAM,EAAE,EAAA;4BAA1B,sBAAO,SAAmB,EAAC;;;;KAC3B;IAED;;;;;OAKG;IACI,8CAAgB,GAAvB;QACC,OAAO,IAAI,CAAC,aAAa,CAAC;IAC3B,CAAC;IACF,0BAAC;AAAD,CAAC,AAnSD,IAmSC;AAnSY,kDAAmB"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/tasks/OneDriveLargeFileUploadTask.d.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/tasks/OneDriveLargeFileUploadTask.d.ts deleted file mode 100644 index 9e70ea1..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/tasks/OneDriveLargeFileUploadTask.d.ts +++ /dev/null @@ -1,123 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -import { Client } from "../index"; -import { UploadEventHandlers } from "./FileUploadTask/Interfaces/IUploadEventHandlers"; -import { FileObject, LargeFileUploadSession, LargeFileUploadTask, LargeFileUploadTaskOptions } from "./LargeFileUploadTask"; -/** - * @interface - * Signature to define options when creating an upload task - * @property {string} fileName - Specifies the name of a file to be uploaded (with extension) - * @property {string} [fileDescription] - Specifies the description of the file to be uploaded - * @property {string} [path] - The path to which the file needs to be uploaded - * @property {number} [rangeSize] - Specifies the range chunk size - * @property {string} [conflictBehavior] - Conflict behaviour option - * @property {UploadEventHandlers} [uploadEventHandlers] - UploadEventHandlers attached to an upload task - */ -export interface OneDriveLargeFileUploadOptions { - fileName: string; - fileDescription?: string; - path?: string; - rangeSize?: number; - conflictBehavior?: string; - uploadEventHandlers?: UploadEventHandlers; - uploadSessionURL?: string; -} -/** - * @interface - * Signature to define options when creating an upload task - * @property {string} fileName - Specifies the name of a file to be uploaded (with extension) - * @property {string} [fileDescription] - Specifies the description of the file to be uploaded - * @property {string} [conflictBehavior] - Conflict behaviour option - */ -interface OneDriveFileUploadSessionPayLoad { - fileName: string; - fileDescription?: string; - conflictBehavior?: string; -} -/** - * @class - * Class representing OneDriveLargeFileUploadTask - */ -export declare class OneDriveLargeFileUploadTask extends LargeFileUploadTask { - /** - * @private - * @static - * Default path for the file being uploaded - */ - private static DEFAULT_UPLOAD_PATH; - /** - * @private - * @static - * Constructs the create session url for Onedrive - * @param {string} fileName - The name of the file - * @param {path} [path = OneDriveLargeFileUploadTask.DEFAULT_UPLOAD_PATH] - The path for the upload - * @returns The constructed create session url - */ - private static constructCreateSessionUrl; - /** - * @private - * @static - * Get file information - * @param {Blob | Uint8Array | File} file - The file entity - * @param {string} fileName - The file name - * @returns {FileInfo} The file information - */ - private static getFileInfo; - /** - * @public - * @static - * @async - * Creates a OneDriveLargeFileUploadTask - * @param {Client} client - The GraphClient instance - * @param {Blob | Uint8Array | File} file - File represented as Blob, Uint8Array or File - * @param {OneDriveLargeFileUploadOptions} options - The options for upload task - * @returns The promise that will be resolves to OneDriveLargeFileUploadTask instance - */ - static create(client: Client, file: Blob | Uint8Array | File, options: OneDriveLargeFileUploadOptions): Promise>; - /** - * @public - * @static - * @async - * Creates a OneDriveLargeFileUploadTask - * @param {Client} client - The GraphClient instance - * @param {FileObject} fileObject - FileObject instance - * @param {OneDriveLargeFileUploadOptions} options - The options for upload task - * @returns The promise that will be resolves to OneDriveLargeFileUploadTask instance - */ - static createTaskWithFileObject(client: Client, fileObject: FileObject, options: OneDriveLargeFileUploadOptions): Promise>; - /** - * @public - * @static - * @async - * Makes request to the server to create an upload session - * @param {Client} client - The GraphClient instance - * @param {string} requestUrl - The URL to create the upload session - * @param {string} payloadOptions - The payload option. Default conflictBehavior is 'rename' - * @returns The promise that resolves to LargeFileUploadSession - */ - static createUploadSession(client: Client, requestUrl: string, payloadOptions: OneDriveFileUploadSessionPayLoad): Promise; - /** - * @public - * @constructor - * Constructs a OneDriveLargeFileUploadTask - * @param {Client} client - The GraphClient instance - * @param {FileObject} file - The FileObject holding details of a file that needs to be uploaded - * @param {LargeFileUploadSession} uploadSession - The upload session to which the upload has to be done - * @param {LargeFileUploadTaskOptions} options - The upload task options - * @returns An instance of OneDriveLargeFileUploadTask - */ - constructor(client: Client, file: FileObject, uploadSession: LargeFileUploadSession, options: LargeFileUploadTaskOptions); - /** - * @public - * Commits upload session to end uploading - * @param {string} requestUrl - The URL to commit the upload session - * @param {string} conflictBehavior - Conflict behaviour option. Default is 'rename' - * @returns The promise resolves to committed response - */ - commit(requestUrl: string, conflictBehavior?: string): Promise; -} -export {}; diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/tasks/OneDriveLargeFileUploadTask.js b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/tasks/OneDriveLargeFileUploadTask.js deleted file mode 100644 index c68fb12..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/tasks/OneDriveLargeFileUploadTask.js +++ /dev/null @@ -1,214 +0,0 @@ -"use strict"; -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.OneDriveLargeFileUploadTask = void 0; -var tslib_1 = require("tslib"); -/** - * @module OneDriveLargeFileUploadTask - */ -var GraphClientError_1 = require("../GraphClientError"); -var FileUpload_1 = require("./FileUploadTask/FileObjectClasses/FileUpload"); -var LargeFileUploadTask_1 = require("./LargeFileUploadTask"); -var OneDriveLargeFileUploadTaskUtil_1 = require("./OneDriveLargeFileUploadTaskUtil"); -/** - * @class - * Class representing OneDriveLargeFileUploadTask - */ -var OneDriveLargeFileUploadTask = /** @class */ (function (_super) { - tslib_1.__extends(OneDriveLargeFileUploadTask, _super); - /** - * @public - * @constructor - * Constructs a OneDriveLargeFileUploadTask - * @param {Client} client - The GraphClient instance - * @param {FileObject} file - The FileObject holding details of a file that needs to be uploaded - * @param {LargeFileUploadSession} uploadSession - The upload session to which the upload has to be done - * @param {LargeFileUploadTaskOptions} options - The upload task options - * @returns An instance of OneDriveLargeFileUploadTask - */ - function OneDriveLargeFileUploadTask(client, file, uploadSession, options) { - return _super.call(this, client, file, uploadSession, options) || this; - } - /** - * @private - * @static - * Constructs the create session url for Onedrive - * @param {string} fileName - The name of the file - * @param {path} [path = OneDriveLargeFileUploadTask.DEFAULT_UPLOAD_PATH] - The path for the upload - * @returns The constructed create session url - */ - OneDriveLargeFileUploadTask.constructCreateSessionUrl = function (fileName, path) { - if (path === void 0) { path = OneDriveLargeFileUploadTask.DEFAULT_UPLOAD_PATH; } - fileName = fileName.trim(); - path = path.trim(); - if (path === "") { - path = "/"; - } - if (path[0] !== "/") { - path = "/".concat(path); - } - if (path[path.length - 1] !== "/") { - path = "".concat(path, "/"); - } - // we choose to encode each component of the file path separately because when encoding full URI - // with encodeURI, special characters like # or % in the file name doesn't get encoded as desired - return "/me/drive/root:".concat(path - .split("/") - .map(function (p) { return encodeURIComponent(p); }) - .join("/")).concat(encodeURIComponent(fileName), ":/createUploadSession"); - }; - /** - * @private - * @static - * Get file information - * @param {Blob | Uint8Array | File} file - The file entity - * @param {string} fileName - The file name - * @returns {FileInfo} The file information - */ - OneDriveLargeFileUploadTask.getFileInfo = function (file, fileName) { - var content; - var size; - if (typeof Blob !== "undefined" && file instanceof Blob) { - content = new File([file], fileName); - size = content.size; - } - else if (typeof File !== "undefined" && file instanceof File) { - content = file; - size = content.size; - } - else if (typeof Uint8Array !== "undefined" && file instanceof Uint8Array) { - var b = file; - size = b.byteLength; - content = b.buffer.slice(b.byteOffset, b.byteOffset + b.byteLength); - } - return { - content: content, - size: size, - }; - }; - /** - * @public - * @static - * @async - * Creates a OneDriveLargeFileUploadTask - * @param {Client} client - The GraphClient instance - * @param {Blob | Uint8Array | File} file - File represented as Blob, Uint8Array or File - * @param {OneDriveLargeFileUploadOptions} options - The options for upload task - * @returns The promise that will be resolves to OneDriveLargeFileUploadTask instance - */ - OneDriveLargeFileUploadTask.create = function (client, file, options) { - return tslib_1.__awaiter(this, void 0, void 0, function () { - var fileName, fileInfo, fileObj; - return tslib_1.__generator(this, function (_a) { - if (!client || !file || !options) { - throw new GraphClientError_1.GraphClientError("Please provide the Graph client instance, file object and OneDriveLargeFileUploadOptions value"); - } - fileName = options.fileName; - fileInfo = OneDriveLargeFileUploadTask.getFileInfo(file, fileName); - fileObj = new FileUpload_1.FileUpload(fileInfo.content, fileName, fileInfo.size); - return [2 /*return*/, this.createTaskWithFileObject(client, fileObj, options)]; - }); - }); - }; - /** - * @public - * @static - * @async - * Creates a OneDriveLargeFileUploadTask - * @param {Client} client - The GraphClient instance - * @param {FileObject} fileObject - FileObject instance - * @param {OneDriveLargeFileUploadOptions} options - The options for upload task - * @returns The promise that will be resolves to OneDriveLargeFileUploadTask instance - */ - OneDriveLargeFileUploadTask.createTaskWithFileObject = function (client, fileObject, options) { - return tslib_1.__awaiter(this, void 0, void 0, function () { - var requestUrl, uploadSessionPayload, session, rangeSize; - return tslib_1.__generator(this, function (_a) { - switch (_a.label) { - case 0: - if (!client || !fileObject || !options) { - throw new GraphClientError_1.GraphClientError("Please provide the Graph client instance, FileObject interface implementation and OneDriveLargeFileUploadOptions value"); - } - requestUrl = options.uploadSessionURL ? options.uploadSessionURL : OneDriveLargeFileUploadTask.constructCreateSessionUrl(options.fileName, options.path); - uploadSessionPayload = { - fileName: options.fileName, - fileDescription: options.fileDescription, - conflictBehavior: options.conflictBehavior, - }; - return [4 /*yield*/, OneDriveLargeFileUploadTask.createUploadSession(client, requestUrl, uploadSessionPayload)]; - case 1: - session = _a.sent(); - rangeSize = (0, OneDriveLargeFileUploadTaskUtil_1.getValidRangeSize)(options.rangeSize); - return [2 /*return*/, new OneDriveLargeFileUploadTask(client, fileObject, session, { - rangeSize: rangeSize, - uploadEventHandlers: options.uploadEventHandlers, - })]; - } - }); - }); - }; - /** - * @public - * @static - * @async - * Makes request to the server to create an upload session - * @param {Client} client - The GraphClient instance - * @param {string} requestUrl - The URL to create the upload session - * @param {string} payloadOptions - The payload option. Default conflictBehavior is 'rename' - * @returns The promise that resolves to LargeFileUploadSession - */ - OneDriveLargeFileUploadTask.createUploadSession = function (client, requestUrl, payloadOptions) { - return tslib_1.__awaiter(this, void 0, void 0, function () { - var payload; - return tslib_1.__generator(this, function (_a) { - payload = { - item: { - "@microsoft.graph.conflictBehavior": (payloadOptions === null || payloadOptions === void 0 ? void 0 : payloadOptions.conflictBehavior) || "rename", - name: payloadOptions === null || payloadOptions === void 0 ? void 0 : payloadOptions.fileName, - description: payloadOptions === null || payloadOptions === void 0 ? void 0 : payloadOptions.fileDescription, - }, - }; - return [2 /*return*/, _super.createUploadSession.call(this, client, requestUrl, payload)]; - }); - }); - }; - /** - * @public - * Commits upload session to end uploading - * @param {string} requestUrl - The URL to commit the upload session - * @param {string} conflictBehavior - Conflict behaviour option. Default is 'rename' - * @returns The promise resolves to committed response - */ - OneDriveLargeFileUploadTask.prototype.commit = function (requestUrl, conflictBehavior) { - if (conflictBehavior === void 0) { conflictBehavior = "rename"; } - return tslib_1.__awaiter(this, void 0, void 0, function () { - var payload; - return tslib_1.__generator(this, function (_a) { - switch (_a.label) { - case 0: - payload = { - name: this.file.name, - "@microsoft.graph.conflictBehavior": conflictBehavior, - "@microsoft.graph.sourceUrl": this.uploadSession.url, - }; - return [4 /*yield*/, this.client.api(requestUrl).put(payload)]; - case 1: return [2 /*return*/, _a.sent()]; - } - }); - }); - }; - /** - * @private - * @static - * Default path for the file being uploaded - */ - OneDriveLargeFileUploadTask.DEFAULT_UPLOAD_PATH = "/"; - return OneDriveLargeFileUploadTask; -}(LargeFileUploadTask_1.LargeFileUploadTask)); -exports.OneDriveLargeFileUploadTask = OneDriveLargeFileUploadTask; -//# sourceMappingURL=OneDriveLargeFileUploadTask.js.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/tasks/OneDriveLargeFileUploadTask.js.map b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/tasks/OneDriveLargeFileUploadTask.js.map deleted file mode 100644 index 7822ec3..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/tasks/OneDriveLargeFileUploadTask.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"OneDriveLargeFileUploadTask.js","sourceRoot":"","sources":["../../../src/tasks/OneDriveLargeFileUploadTask.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;AAEH;;GAEG;AAEH,wDAAuD;AAEvD,4EAA2E;AAE3E,6DAA4H;AAC5H,qFAAsE;AAkDtE;;;GAGG;AACH;IAAoD,uDAAsB;IAqIzE;;;;;;;;;OAS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;;;;wBAC5D,OAAO,GAAG;4BACf,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI;4BACpB,mCAAmC,EAAE,gBAAgB;4BACrD,4BAA4B,EAAE,IAAI,CAAC,aAAa,CAAC,GAAG;yBACpD,CAAC;wBACK,qBAAM,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,EAAA;4BAArD,sBAAO,SAA8C,EAAC;;;;KACtD;IAhKD;;;;OAIG;IACY,+CAAmB,GAAG,GAAG,CAAC;IA4J1C,kCAAC;CAAA,AAlKD,CAAoD,yCAAmB,GAkKtE;AAlKY,kEAA2B"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/tasks/OneDriveLargeFileUploadTaskUtil.d.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/tasks/OneDriveLargeFileUploadTaskUtil.d.ts deleted file mode 100644 index 5f59e5e..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/tasks/OneDriveLargeFileUploadTaskUtil.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -/** - * @constant - * Get the valid rangeSize for a file slicing (validity is based on the constrains mentioned in here - * {@link https://developer.microsoft.com/en-us/graph/docs/api-reference/v1.0/api/driveitem_createuploadsession#upload-bytes-to-the-upload-session}) - * - * @param {number} [rangeSize = DEFAULT_FILE_SIZE] - The rangeSize value. - * @returns The valid rangeSize - */ -export declare const getValidRangeSize: (rangeSize?: number) => number; diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/tasks/OneDriveLargeFileUploadTaskUtil.js b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/tasks/OneDriveLargeFileUploadTaskUtil.js deleted file mode 100644 index 056aa77..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/tasks/OneDriveLargeFileUploadTaskUtil.js +++ /dev/null @@ -1,48 +0,0 @@ -"use strict"; -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.getValidRangeSize = void 0; -/** - * @module OneDriveLargeFileUploadTaskUtil - */ -/** - * @constant - * Default value for the rangeSize - * Recommended size is between 5 - 10 MB {@link https://developer.microsoft.com/en-us/graph/docs/api-reference/v1.0/api/driveitem_createuploadsession#best-practices} - */ -var DEFAULT_FILE_SIZE = 5 * 1024 * 1024; -/** - * @constant - * Rounds off the given value to a multiple of 320 KB - * @param {number} value - The value - * @returns The rounded off value - */ -var roundTo320KB = function (value) { - if (value > 320 * 1024) { - value = Math.floor(value / (320 * 1024)) * 320 * 1024; - } - return value; -}; -/** - * @constant - * Get the valid rangeSize for a file slicing (validity is based on the constrains mentioned in here - * {@link https://developer.microsoft.com/en-us/graph/docs/api-reference/v1.0/api/driveitem_createuploadsession#upload-bytes-to-the-upload-session}) - * - * @param {number} [rangeSize = DEFAULT_FILE_SIZE] - The rangeSize value. - * @returns The valid rangeSize - */ -var getValidRangeSize = function (rangeSize) { - if (rangeSize === void 0) { rangeSize = DEFAULT_FILE_SIZE; } - var sixtyMB = 60 * 1024 * 1024; - if (rangeSize > sixtyMB) { - rangeSize = sixtyMB; - } - return roundTo320KB(rangeSize); -}; -exports.getValidRangeSize = getValidRangeSize; -//# sourceMappingURL=OneDriveLargeFileUploadTaskUtil.js.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/tasks/OneDriveLargeFileUploadTaskUtil.js.map b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/tasks/OneDriveLargeFileUploadTaskUtil.js.map deleted file mode 100644 index 3f56a26..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/tasks/OneDriveLargeFileUploadTaskUtil.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"OneDriveLargeFileUploadTaskUtil.js","sourceRoot":"","sources":["../../../src/tasks/OneDriveLargeFileUploadTaskUtil.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH;;GAEG;AAEH;;;;GAIG;AACH,IAAM,iBAAiB,GAAW,CAAC,GAAG,IAAI,GAAG,IAAI,CAAC;AAElD;;;;;GAKG;AACH,IAAM,YAAY,GAAG,UAAC,KAAa;IAClC,IAAI,KAAK,GAAG,GAAG,GAAG,IAAI,EAAE;QACvB,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,CAAC,GAAG,GAAG,IAAI,CAAC,CAAC,GAAG,GAAG,GAAG,IAAI,CAAC;KACtD;IACD,OAAO,KAAK,CAAC;AACd,CAAC,CAAC;AAEF;;;;;;;GAOG;AACI,IAAM,iBAAiB,GAAG,UAAC,SAAqC;IAArC,0BAAA,EAAA,6BAAqC;IACtE,IAAM,OAAO,GAAG,EAAE,GAAG,IAAI,GAAG,IAAI,CAAC;IACjC,IAAI,SAAS,GAAG,OAAO,EAAE;QACxB,SAAS,GAAG,OAAO,CAAC;KACpB;IACD,OAAO,YAAY,CAAC,SAAS,CAAC,CAAC;AAChC,CAAC,CAAC;AANW,QAAA,iBAAiB,qBAM5B"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/tasks/PageIterator.d.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/tasks/PageIterator.d.ts deleted file mode 100644 index 5911bac..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/tasks/PageIterator.d.ts +++ /dev/null @@ -1,140 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -/** - * @module PageIterator - */ -import { FetchOptions } from "../IFetchOptions"; -import { Client } from "../index"; -import { MiddlewareOptions } from "../middleware/options/IMiddlewareOptions"; -/** - * Signature representing PageCollection - * @property {any[]} value - The collection value - * @property {string} [@odata.nextLink] - The nextLink value - * @property {string} [@odata.deltaLink] - The deltaLink value - * @property {any} Additional - Any number of additional properties (This is to accept the any additional data returned by in the response to the nextLink request) - */ -export interface PageCollection { - value: any[]; - "@odata.nextLink"?: string; - "@odata.deltaLink"?: string; - [Key: string]: any; -} -/** - * Signature to define the request options to be sent during request. - * The values of the GraphRequestOptions properties are passed to the Graph Request object. - * @property {HeadersInit} headers - the header options for the request - * @property {MiddlewareOptions[]} middlewareoptions - The middleware options for the request - * @property {FetchOptions} options - The fetch options for the request - */ -export interface GraphRequestOptions { - headers?: HeadersInit; - middlewareOptions?: MiddlewareOptions[]; - options?: FetchOptions; -} -/** - * Signature representing callback for page iterator - * @property {Function} callback - The callback function which should return boolean to continue the continue/stop the iteration. - */ -export type PageIteratorCallback = (data: any) => boolean; -/** - * @class - * Class for PageIterator - */ -export declare class PageIterator { - /** - * @private - * Member holding the GraphClient instance - */ - private client; - /** - * @private - * Member holding the page collection - */ - private collection; - /** - * @private - * Member variable referring to nextLink of the page collection - */ - private nextLink; - /** - * @private - * Member variable referring to deltaLink of the request - */ - private deltaLink; - /** - * @private - * Holding callback for Iteration. - */ - private callback; - /** - * @private - * Member holding a complete/incomplete status of an iterator - */ - private complete; - /** - * @private - * Information to be added to the request - */ - private requestOptions; - /** - * @private - * Member holding the current position on the collection - */ - private cursor; - /** - * @public - * @constructor - * Creates new instance for PageIterator - * @param {Client} client - The graph client instance - * @param {PageCollection} pageCollection - The page collection object - * @param {PageIteratorCallback} callBack - The callback function - * @param {GraphRequestOptions} requestOptions - The request options - * @returns An instance of a PageIterator - */ - constructor(client: Client, pageCollection: PageCollection, callback: PageIteratorCallback, requestOptions?: GraphRequestOptions); - /** - * @private - * Iterates over a collection by enqueuing entries one by one and kicking the callback with the enqueued entry - * @returns A boolean indicating the continue flag to process next page - */ - private iterationHelper; - /** - * @private - * @async - * Helper to make a get request to fetch next page with nextLink url and update the page iterator instance with the returned response - * @returns A promise that resolves to a response data with next page collection - */ - private fetchAndUpdateNextPageData; - /** - * @public - * Getter to get the deltaLink in the current response - * @returns A deltaLink which is being used to make delta requests in future - */ - getDeltaLink(): string | undefined; - /** - * @public - * @async - * Iterates over the collection and kicks callback for each item on iteration. Fetches next set of data through nextLink and iterates over again - * This happens until the nextLink is drained out or the user responds with a red flag to continue from callback - * @returns A Promise that resolves to nothing on completion and throws error incase of any discrepancy. - */ - iterate(): Promise; - /** - * @public - * @async - * To resume the iteration - * Note: This internally calls the iterate method, It's just for more readability. - * @returns A Promise that resolves to nothing on completion and throws error incase of any discrepancy - */ - resume(): Promise; - /** - * @public - * To get the completeness status of the iterator - * @returns Boolean indicating the completeness - */ - isComplete(): boolean; -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/tasks/PageIterator.js b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/tasks/PageIterator.js deleted file mode 100644 index 20cfef5..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/tasks/PageIterator.js +++ /dev/null @@ -1,158 +0,0 @@ -"use strict"; -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.PageIterator = void 0; -var tslib_1 = require("tslib"); -/** - * @class - * Class for PageIterator - */ -var PageIterator = /** @class */ (function () { - /** - * @public - * @constructor - * Creates new instance for PageIterator - * @param {Client} client - The graph client instance - * @param {PageCollection} pageCollection - The page collection object - * @param {PageIteratorCallback} callBack - The callback function - * @param {GraphRequestOptions} requestOptions - The request options - * @returns An instance of a PageIterator - */ - function PageIterator(client, pageCollection, callback, requestOptions) { - this.client = client; - this.collection = pageCollection.value; - this.nextLink = pageCollection["@odata.nextLink"]; - this.deltaLink = pageCollection["@odata.deltaLink"]; - this.callback = callback; - this.cursor = 0; - this.complete = false; - this.requestOptions = requestOptions; - } - /** - * @private - * Iterates over a collection by enqueuing entries one by one and kicking the callback with the enqueued entry - * @returns A boolean indicating the continue flag to process next page - */ - PageIterator.prototype.iterationHelper = function () { - if (this.collection === undefined) { - return false; - } - var advance = true; - while (advance && this.cursor < this.collection.length) { - var item = this.collection[this.cursor]; - advance = this.callback(item); - this.cursor++; - } - return advance; - }; - /** - * @private - * @async - * Helper to make a get request to fetch next page with nextLink url and update the page iterator instance with the returned response - * @returns A promise that resolves to a response data with next page collection - */ - PageIterator.prototype.fetchAndUpdateNextPageData = function () { - return tslib_1.__awaiter(this, void 0, void 0, function () { - var graphRequest, response; - return tslib_1.__generator(this, function (_a) { - switch (_a.label) { - case 0: - graphRequest = this.client.api(this.nextLink); - if (this.requestOptions) { - if (this.requestOptions.headers) { - graphRequest = graphRequest.headers(this.requestOptions.headers); - } - if (this.requestOptions.middlewareOptions) { - graphRequest = graphRequest.middlewareOptions(this.requestOptions.middlewareOptions); - } - if (this.requestOptions.options) { - graphRequest = graphRequest.options(this.requestOptions.options); - } - } - return [4 /*yield*/, graphRequest.get()]; - case 1: - response = _a.sent(); - this.collection = response.value; - this.cursor = 0; - this.nextLink = response["@odata.nextLink"]; - this.deltaLink = response["@odata.deltaLink"]; - return [2 /*return*/]; - } - }); - }); - }; - /** - * @public - * Getter to get the deltaLink in the current response - * @returns A deltaLink which is being used to make delta requests in future - */ - PageIterator.prototype.getDeltaLink = function () { - return this.deltaLink; - }; - /** - * @public - * @async - * Iterates over the collection and kicks callback for each item on iteration. Fetches next set of data through nextLink and iterates over again - * This happens until the nextLink is drained out or the user responds with a red flag to continue from callback - * @returns A Promise that resolves to nothing on completion and throws error incase of any discrepancy. - */ - PageIterator.prototype.iterate = function () { - return tslib_1.__awaiter(this, void 0, void 0, function () { - var advance; - return tslib_1.__generator(this, function (_a) { - switch (_a.label) { - case 0: - advance = this.iterationHelper(); - _a.label = 1; - case 1: - if (!advance) return [3 /*break*/, 5]; - if (!(this.nextLink !== undefined)) return [3 /*break*/, 3]; - return [4 /*yield*/, this.fetchAndUpdateNextPageData()]; - case 2: - _a.sent(); - advance = this.iterationHelper(); - return [3 /*break*/, 4]; - case 3: - advance = false; - _a.label = 4; - case 4: return [3 /*break*/, 1]; - case 5: - if (this.nextLink === undefined && this.cursor >= this.collection.length) { - this.complete = true; - } - return [2 /*return*/]; - } - }); - }); - }; - /** - * @public - * @async - * To resume the iteration - * Note: This internally calls the iterate method, It's just for more readability. - * @returns A Promise that resolves to nothing on completion and throws error incase of any discrepancy - */ - PageIterator.prototype.resume = function () { - return tslib_1.__awaiter(this, void 0, void 0, function () { - return tslib_1.__generator(this, function (_a) { - return [2 /*return*/, this.iterate()]; - }); - }); - }; - /** - * @public - * To get the completeness status of the iterator - * @returns Boolean indicating the completeness - */ - PageIterator.prototype.isComplete = function () { - return this.complete; - }; - return PageIterator; -}()); -exports.PageIterator = PageIterator; -//# sourceMappingURL=PageIterator.js.map \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/tasks/PageIterator.js.map b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/tasks/PageIterator.js.map deleted file mode 100644 index b86614a..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/lib/src/tasks/PageIterator.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"PageIterator.js","sourceRoot":"","sources":["../../../src/tasks/PageIterator.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;AA2CH;;;GAGG;AACH;IAkDC;;;;;;;;;OASG;IACH,sBAAmB,MAAc,EAAE,cAA8B,EAAE,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;KACtB;IAED;;;;OAIG;IACI,iCAAU,GAAjB;QACC,OAAO,IAAI,CAAC,QAAQ,CAAC;IACtB,CAAC;IACF,mBAAC;AAAD,CAAC,AAtKD,IAsKC;AAtKY,oCAAY"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/package.json b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/package.json deleted file mode 100644 index 18c15fc..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/package.json +++ /dev/null @@ -1,151 +0,0 @@ -{ - "name": "@microsoft/microsoft-graph-client", - "version": "3.0.7", - "description": "Microsoft Graph Client Library", - "keywords": [ - "Microsoft", - "Graph", - "SDK", - "JavaScript", - "Client" - ], - "repository": { - "type": "git", - "url": "https://github.com/microsoftgraph/msgraph-sdk-javascript.git" - }, - "license": "MIT", - "main": "lib/src/index.js", - "module": "lib/es/src/index.js", - "browser": { - "./lib/es/src/index.js": "./lib/es/src/browser/index.js", - "stream": "stream-browserify" - }, - "types": "./lib/src/index.d.ts", - "typings": "lib/src/index", - "files": [ - "lib/", - "src/", - "authProviders/", - "shims.d.ts", - "authProviderOptions" - ], - "scripts": { - "build": "npm run pre-build && npm run build:sub_cjs && npm run build:sub_es && rollup --bundleConfigAsCjs -c", - "build:cjs": "tsc --p tsconfig-cjs.json", - "build:es": "tsc --p tsconfig-es.json", - "build:sub_cjs": "tsc -b tsconfig-sub-cjs.json", - "build:sub_es": "tsc -b tsconfig-sub-es.json", - "format": "npm run format:css && npm run format:html && npm run format:js && npm run format:json && npm run format:md && npm run format:rc && npm run format:ts", - "format:css": "prettier --write \"**/*.css\"", - "format:html": "prettier --write \"**/*.html\"", - "format:js": "prettier --write \"**/*.js\"", - "format:json": "prettier --write \"**/*.json\"", - "format:md": "prettier --write \"**/*.md\"", - "format:rc": "prettier --write --parser json \"**/.*rc\"", - "format:ts": "prettier --write \"**/*.ts\"", - "karma": "karma start --single-run --browsers ChromeHeadless karma.conf.js", - "lint": "eslint . --ext .ts", - "lint:fix": "eslint . --ext .ts --fix", - "prepack": "npm install && npm run build && npm run test", - "pre-build": "npm run setVersion", - "setVersion": "gulp setVersion", - "test": "npm run test:cjs && npm run karma", - "test:cjs": "npm run build:sub_cjs && mocha", - "test:coverage": "TS_NODE_PROJECT='./tsconfig-cjs.json' nyc mocha --require isomorphic-fetch -r ts-node/register test/common/**/*.ts && mocha --require isomorphic-fetch -r ts-node/register test/common/**/*.ts", - "test:development": "tsc --p test/tsconfig-test-development.json && mocha 'lib/test/development/**/*.js' --require isomorphic-fetch" - }, - "mocha": { - "reporter": [ - "mocha-junit-reporter" - ], - "reporterOptions": { - "mochaFile": "./testResult.xml" - }, - "spec": [ - "lib/test/common/**/*.js", - "lib/test/node/**/*.js" - ], - "require": [ - "isomorphic-fetch" - ] - }, - "nyc": { - "all": true, - "cache": false, - "exclude": [ - "samples/", - "*.js", - "lib/" - ], - "include": [ - "src/" - ] - }, - "dependencies": { - "@babel/runtime": "^7.12.5", - "tslib": "^2.2.0" - }, - "devDependencies": { - "@azure/identity": "^3.0.0", - "@azure/msal-browser": "^2.15.0", - "@babel/core": "^7.12.10", - "@babel/plugin-transform-runtime": "^7.12.10", - "@babel/preset-env": "^7.12.11", - "@istanbuljs/nyc-config-typescript": "^1.0.1", - "@microsoft/microsoft-graph-types": "^2.11.0", - "@rollup/plugin-babel": "^6.0.0", - "@rollup/plugin-commonjs": "^25.0.0", - "@rollup/plugin-node-resolve": "^15.0.0", - "@rollup/plugin-terser": "^0.4.0", - "@types/chai": "^4.2.14", - "@types/mocha": "^10.0.1", - "@types/node": "^20.1.4", - "@types/sinon": "^10.0.8", - "@typescript-eslint/eslint-plugin": "^5.12.1", - "@typescript-eslint/parser": "^5.12.1", - "chai": "^4.2.0", - "eslint": "^8.9.0", - "eslint-config-prettier": "^9.0.0", - "eslint-plugin-prettier": "^5.0.0", - "eslint-plugin-simple-import-sort": "^10.0.0", - "form-data": "^4.0.0", - "gulp": "^4.0.2", - "husky": "^8.0.0", - "isomorphic-fetch": "^3.0.0", - "karma": "^6.3.2", - "karma-chai": "^0.1.0", - "karma-chrome-launcher": "^3.1.0", - "karma-firefox-launcher": "^2.1.0", - "karma-mocha": "^2.0.1", - "karma-typescript": "^5.2.0", - "lint-staged": "^14.0.0", - "mocha": "^10.2.0", - "mocha-junit-reporter": "^2.1.1", - "nyc": "^15.1.0", - "prettier": "^3.0.0", - "rollup": "^3.9.1", - "sinon": "^15.0.0", - "source-map-support": "^0.5.19", - "stream-browserify": "^3.0.0", - "ts-node": "^10.4.0", - "typescript": "^5.1.6", - "uglify-es": "^3.3.9" - }, - "peerDependenciesMeta": { - "@azure/identity": { - "optional": true - }, - "buffer": { - "optional": true - }, - "stream-browserify": { - "optional": true - }, - "@azure/msal-browser": { - "optional": true - } - }, - "engines": { - "node": ">=12.0.0" - } -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/shims.d.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/shims.d.ts deleted file mode 100644 index fac059d..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/shims.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ - -/** - * Shim for Node stream interface. - */ -interface NodeStream { - /** - * Shim for Node stream interface when the environment does not use @types/node. - * Using @types/node appends the ambient Node definition to the global scope which is not desirable. - * https://github.com/microsoftgraph/msgraph-sdk-javascript/issues/600 - */ - readable: boolean; - readableLength: number; - read(size?: number): any; - on(event: string | symbol, listener: (...args: any[]) => void): this; -} - -interface Headers{} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/Client.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/Client.ts deleted file mode 100644 index ac8a768..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/Client.ts +++ /dev/null @@ -1,107 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ - -/** - * @module Client - */ - -import { GRAPH_API_VERSION, GRAPH_BASE_URL } from "./Constants"; -import { CustomAuthenticationProvider } from "./CustomAuthenticationProvider"; -import { GraphRequest } from "./GraphRequest"; -import { HTTPClient } from "./HTTPClient"; -import { HTTPClientFactory } from "./HTTPClientFactory"; -import { ClientOptions } from "./IClientOptions"; -import { Options } from "./IOptions"; -import { validatePolyFilling } from "./ValidatePolyFilling"; - -export class Client { - /** - * @private - * A member which stores the Client instance options - */ - private config: ClientOptions = { - baseUrl: GRAPH_BASE_URL, - debugLogging: false, - defaultVersion: GRAPH_API_VERSION, - }; - - /** - * @private - * A member which holds the HTTPClient instance - */ - private httpClient: HTTPClient; - - /** - * @public - * @static - * To create a client instance with options and initializes the default middleware chain - * @param {Options} options - The options for client instance - * @returns The Client instance - */ - public static init(options: Options): Client { - const clientOptions: ClientOptions = {}; - for (const i in options) { - if (Object.prototype.hasOwnProperty.call(options, i)) { - clientOptions[i] = i === "authProvider" ? new CustomAuthenticationProvider(options[i]) : options[i]; - } - } - return Client.initWithMiddleware(clientOptions); - } - - /** - * @public - * @static - * To create a client instance with the Client Options - * @param {ClientOptions} clientOptions - The options object for initializing the client - * @returns The Client instance - */ - public static initWithMiddleware(clientOptions: ClientOptions): Client { - return new Client(clientOptions); - } - - /** - * @private - * @constructor - * Creates an instance of Client - * @param {ClientOptions} clientOptions - The options to instantiate the client object - */ - private constructor(clientOptions: ClientOptions) { - validatePolyFilling(); - for (const key in clientOptions) { - if (Object.prototype.hasOwnProperty.call(clientOptions, key)) { - this.config[key] = clientOptions[key]; - } - } - let httpClient: HTTPClient; - if (clientOptions.authProvider !== undefined && clientOptions.middleware !== undefined) { - const error = new Error(); - error.name = "AmbiguityInInitialization"; - error.message = "Unable to Create Client, Please provide either authentication provider for default middleware chain or custom middleware chain not both"; - throw error; - } else if (clientOptions.authProvider !== undefined) { - httpClient = HTTPClientFactory.createWithAuthenticationProvider(clientOptions.authProvider); - } else if (clientOptions.middleware !== undefined) { - httpClient = new HTTPClient(...[].concat(clientOptions.middleware)); - } else { - const error = new Error(); - error.name = "InvalidMiddlewareChain"; - error.message = "Unable to Create Client, Please provide either authentication provider for default middleware chain or custom middleware chain"; - throw error; - } - this.httpClient = httpClient; - } - - /** - * @public - * Entry point to make requests - * @param {string} path - The path string value - * @returns The graph request instance - */ - public api(path: string): GraphRequest { - return new GraphRequest(this.httpClient, this.config, path); - } -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/Constants.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/Constants.ts deleted file mode 100644 index f77d37e..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/Constants.ts +++ /dev/null @@ -1,28 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ - -/** - * @module Constants - */ - -/** - * @constant - * A Default API endpoint version for a request - */ -export const GRAPH_API_VERSION = "v1.0"; - -/** - * @constant - * A Default base url for a request - */ -export const GRAPH_BASE_URL = "https://graph.microsoft.com/"; - -/** - * To hold list of the service root endpoints for Microsoft Graph and Graph Explorer for each national cloud. - * Set(iterable:Object) is not supported in Internet Explorer. The consumer is recommended to use a suitable polyfill. - */ -export const GRAPH_URLS = new Set(["graph.microsoft.com", "graph.microsoft.us", "dod-graph.microsoft.us", "graph.microsoft.de", "microsoftgraph.chinacloudapi.cn", "canary.graph.microsoft.com"]); diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/CustomAuthenticationProvider.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/CustomAuthenticationProvider.ts deleted file mode 100644 index eac4ba6..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/CustomAuthenticationProvider.ts +++ /dev/null @@ -1,63 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ - -/** - * @module CustomAuthenticationProvider - */ - -import { GraphClientError } from "./GraphClientError"; -import { AuthenticationProvider } from "./IAuthenticationProvider"; -import { AuthProvider } from "./IAuthProvider"; - -/** - * @class - * Class representing CustomAuthenticationProvider - * @extends AuthenticationProvider - */ -export class CustomAuthenticationProvider implements AuthenticationProvider { - /** - * @private - * A member to hold authProvider callback - */ - private provider: AuthProvider; - - /** - * @public - * @constructor - * Creates an instance of CustomAuthenticationProvider - * @param {AuthProviderCallback} provider - An authProvider function - * @returns An instance of CustomAuthenticationProvider - */ - public constructor(provider: AuthProvider) { - this.provider = provider; - } - - /** - * @public - * @async - * To get the access token - * @returns The promise that resolves to an access token - */ - public async getAccessToken(): Promise { - return new Promise((resolve: (accessToken: string) => void, reject: (error: any) => void) => { - this.provider(async (error: any, accessToken: string | null) => { - if (accessToken) { - resolve(accessToken); - } else { - if (!error) { - const invalidTokenMessage = "Access token is undefined or empty.\ - Please provide a valid token.\ - For more help - https://github.com/microsoftgraph/msgraph-sdk-javascript/blob/dev/docs/CustomAuthenticationProvider.md"; - error = new GraphClientError(invalidTokenMessage); - } - const err = await GraphClientError.setGraphClientError(error); - reject(err); - } - }); - }); - } -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/GraphClientError.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/GraphClientError.ts deleted file mode 100644 index 9509c38..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/GraphClientError.ts +++ /dev/null @@ -1,61 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ - -/** - * @module GraphClientError - */ - -/** - * @class - * Create GraphClientError object to handle client-side errors - * encountered within the JavaScript Client SDK. - * Whereas GraphError Class should be used to handle errors in the response from the Graph API. - */ - -export class GraphClientError extends Error { - /** - * @public - * A custom error. This property should set be when the error is not of instanceOf Error/GraphClientError. - * Example = - * const client = MicrosoftGraph.Client.init({ - * defaultVersion: "v1.0", - * authProvider: (done) => { done({TokenError:"AccessToken cannot be null"}, ""); - * }); - */ - public customError?: any; - - /** - * @public - * @static - * @async - * To set the GraphClientError object - * @param {any} error - The error returned encountered by the Graph JavaScript Client SDK while processing request - * @returns GraphClientError object set to the error passed - */ - public static setGraphClientError(error: any): GraphClientError { - let graphClientError: GraphClientError; - if (error instanceof Error) { - graphClientError = error; - } else { - graphClientError = new GraphClientError(); - graphClientError.customError = error; - } - return graphClientError; - } - - /** - * @public - * @constructor - * Creates an instance of GraphClientError - * @param {string} message? - Error message - * @returns An instance of GraphClientError - */ - public constructor(message?: string) { - super(message); - Object.setPrototypeOf(this, GraphClientError.prototype); - } -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/GraphError.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/GraphError.ts deleted file mode 100644 index 1e3b2dc..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/GraphError.ts +++ /dev/null @@ -1,73 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ - -/** - * @module GraphError - */ - -/** - * @class - * Class for GraphError - * @NOTE: This is NOT what is returned from the Graph - * GraphError is created from parsing JSON errors returned from the graph - * Some fields are renamed ie, "request-id" => requestId so you can use dot notation - */ - -export class GraphError extends Error { - /** - * @public - * A member holding status code of the error - */ - public statusCode: number; - - /** - * @public - * A member holding code i.e name of the error - */ - public code: string | null; - - /** - * @public - * A member holding request-id i.e identifier of the request - */ - public requestId: string | null; - - /** - * @public - * A member holding processed date and time of the request - */ - public date: Date; - - public headers?: Headers; - - /** - * @public - * A member holding original error response by the graph service - */ - public body: any; - - /** - * @public - * @constructor - * Creates an instance of GraphError - * @param {number} [statusCode = -1] - The status code of the error - * @param {string} [message] - The message of the error - * @param {Error} [baseError] - The base error - * @returns An instance of GraphError - */ - public constructor(statusCode = -1, message?: string, baseError?: Error) { - super(message || (baseError && baseError.message)); - // https://github.com/Microsoft/TypeScript/wiki/Breaking-Changes#extending-built-ins-like-error-array-and-map-may-no-longer-work - Object.setPrototypeOf(this, GraphError.prototype); - this.statusCode = statusCode; - this.code = null; - this.requestId = null; - this.date = new Date(); - this.body = null; - this.stack = baseError ? baseError.stack : this.stack; - } -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/GraphErrorHandler.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/GraphErrorHandler.ts deleted file mode 100644 index b0fdee2..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/GraphErrorHandler.ts +++ /dev/null @@ -1,117 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ - -/** - * @module GraphErrorHandler - */ - -import { GraphError } from "./GraphError"; -import { GraphRequestCallback } from "./IGraphRequestCallback"; - -/** - * @interface - * Signature for the json represent of the error response from the Graph API - * https://docs.microsoft.com/en-us/graph/errors - * @property {[key: string] : string | number} - The Key value pair - */ -interface GraphAPIErrorResponse { - error: { - code: string; - message: string; - innerError: any; - }; -} - -/** - * @class - * Class for GraphErrorHandler - */ - -export class GraphErrorHandler { - /** - * @private - * @static - * Populates the GraphError instance with Error instance values - * @param {Error} error - The error returned by graph service or some native error - * @param {number} [statusCode] - The status code of the response - * @returns The GraphError instance - */ - private static constructError(error: Error, statusCode?: number, rawResponse?: Response): GraphError { - const gError = new GraphError(statusCode, "", error); - if (error.name !== undefined) { - gError.code = error.name; - } - gError.body = error.toString(); - gError.date = new Date(); - gError.headers = rawResponse?.headers; - return gError; - } - - /** - * @private - * @static - * @async - * Populates the GraphError instance from the Error returned by graph service - * @param {GraphAPIErrorResponse} graphError - The error possibly returned by graph service or some native error - * @param {number} statusCode - The status code of the response - * @returns A promise that resolves to GraphError instance - * - * Example error for https://graph.microsoft.com/v1.0/me/events?$top=3&$search=foo - * { - * "error": { - * "code": "SearchEvents", - * "message": "The parameter $search is not currently supported on the Events resource.", - * "innerError": { - * "request-id": "b31c83fd-944c-4663-aa50-5d9ceb367e19", - * "date": "2016-11-17T18:37:45" - * } - * } - * } - */ - private static constructErrorFromResponse(graphError: GraphAPIErrorResponse, statusCode: number, rawResponse?: Response): GraphError { - const error = graphError.error; - const gError = new GraphError(statusCode, error.message); - gError.code = error.code; - if (error.innerError !== undefined) { - gError.requestId = error.innerError["request-id"]; - gError.date = new Date(error.innerError.date); - } - - gError.body = JSON.stringify(error); - gError.headers = rawResponse?.headers; - - return gError; - } - - /** - * @public - * @static - * @async - * To get the GraphError object - * Reference - https://docs.microsoft.com/en-us/graph/errors - * @param {any} [error = null] - The error returned by graph service or some native error - * @param {number} [statusCode = -1] - The status code of the response - * @param {GraphRequestCallback} [callback] - The graph request callback function - * @returns A promise that resolves to GraphError instance - */ - public static async getError(error: any = null, statusCode = -1, callback?: GraphRequestCallback, rawResponse?: Response): Promise { - let gError: GraphError; - if (error && error.error) { - gError = GraphErrorHandler.constructErrorFromResponse(error, statusCode, rawResponse); - } else if (error instanceof Error) { - gError = GraphErrorHandler.constructError(error, statusCode, rawResponse); - } else { - gError = new GraphError(statusCode); - gError.body = error; // if a custom error is passed which is not instance of Error object or a graph API response - } - if (typeof callback === "function") { - callback(gError, null); - } else { - return gError; - } - } -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/GraphRequest.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/GraphRequest.ts deleted file mode 100644 index 80a9e2c..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/GraphRequest.ts +++ /dev/null @@ -1,785 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ - -/** - * @module GraphRequest - */ -import { GraphClientError } from "./GraphClientError"; -import { GraphError } from "./GraphError"; -import { GraphErrorHandler } from "./GraphErrorHandler"; -import { oDataQueryNames, serializeContent, urlJoin } from "./GraphRequestUtil"; -import { GraphResponseHandler } from "./GraphResponseHandler"; -import { HTTPClient } from "./HTTPClient"; -import { ClientOptions } from "./IClientOptions"; -import { Context } from "./IContext"; -import { FetchOptions } from "./IFetchOptions"; -import { GraphRequestCallback } from "./IGraphRequestCallback"; -import { MiddlewareControl } from "./middleware/MiddlewareControl"; -import { MiddlewareOptions } from "./middleware/options/IMiddlewareOptions"; -import { RequestMethod } from "./RequestMethod"; -import { ResponseType } from "./ResponseType"; -/** - * @interface - * Signature to representing key value pairs - * @property {[key: string] : string | number} - The Key value pair - */ -interface KeyValuePairObjectStringNumber { - [key: string]: string | number; -} - -/** - * @interface - * Signature to define URL components - * @template http://graph.microsoft.com/VERSION/PATH?QUERYSTRING&OTHER_QUERY_PARAMS - * - * @property {string} host - The host to which the request needs to be made - * @property {string} version - Version of the graph endpoint - * @property {string} [path] - The path of the resource request - * @property {KeyValuePairObjectStringNumber} oDataQueryParams - The oData Query Params - * @property {KeyValuePairObjectStringNumber} otherURLQueryParams - The other query params for a request - * @property {string[]} otherURLQueryOptions - The non key-value query parameters. Example- '/me?$whatif' - */ -export interface URLComponents { - host: string; - version: string; - path?: string; - oDataQueryParams: KeyValuePairObjectStringNumber; - otherURLQueryParams: KeyValuePairObjectStringNumber; - otherURLQueryOptions?: string[]; -} - -/** - * @class - * A Class representing GraphRequest - */ -export class GraphRequest { - /** - * @private - * A member variable to hold HTTPClient instance - */ - private httpClient: HTTPClient; - - /** - * @private - * A member variable to hold client options - */ - private config: ClientOptions; - - /** - * @private - * A member to hold URL Components data - */ - private urlComponents: URLComponents; - - /** - * @private - * A member to hold custom header options for a request - */ - private _headers: HeadersInit; - - /** - * @private - * A member to hold custom options for a request - */ - private _options: FetchOptions; - - /** - * @private - * A member to hold the array of middleware options for a request - */ - private _middlewareOptions: MiddlewareOptions[]; - - /** - * @private - * A member to hold custom response type for a request - */ - private _responseType: ResponseType; - - /** - * @public - * @constructor - * Creates an instance of GraphRequest - * @param {HTTPClient} httpClient - The HTTPClient instance - * @param {ClientOptions} config - The options for making request - * @param {string} path - A path string - */ - public constructor(httpClient: HTTPClient, config: ClientOptions, path: string) { - this.httpClient = httpClient; - this.config = config; - this.urlComponents = { - host: this.config.baseUrl, - version: this.config.defaultVersion, - oDataQueryParams: {}, - otherURLQueryParams: {}, - otherURLQueryOptions: [], - }; - this._headers = {}; - this._options = {}; - this._middlewareOptions = []; - this.parsePath(path); - } - - /** - * @private - * Parses the path string and creates URLComponents out of it - * @param {string} path - The request path string - * @returns Nothing - */ - private parsePath = (path: string): void => { - // Strips out the base of the url if they passed in - if (path.indexOf("https://") !== -1) { - path = path.replace("https://", ""); - - // Find where the host ends - const endOfHostStrPos = path.indexOf("/"); - if (endOfHostStrPos !== -1) { - // Parse out the host - this.urlComponents.host = "https://" + path.substring(0, endOfHostStrPos); - // Strip the host from path - path = path.substring(endOfHostStrPos + 1, path.length); - } - - // Remove the following version - const endOfVersionStrPos = path.indexOf("/"); - if (endOfVersionStrPos !== -1) { - // Parse out the version - this.urlComponents.version = path.substring(0, endOfVersionStrPos); - // Strip version from path - path = path.substring(endOfVersionStrPos + 1, path.length); - } - } - - // Strip out any leading "/" - if (path.charAt(0) === "/") { - path = path.substr(1); - } - - const queryStrPos = path.indexOf("?"); - if (queryStrPos === -1) { - // No query string - this.urlComponents.path = path; - } else { - this.urlComponents.path = path.substr(0, queryStrPos); - - // Capture query string into oDataQueryParams and otherURLQueryParams - const queryParams = path.substring(queryStrPos + 1, path.length).split("&"); - for (const queryParam of queryParams) { - this.parseQueryParameter(queryParam); - } - } - }; - - /** - * @private - * Adds the query parameter as comma separated values - * @param {string} propertyName - The name of a property - * @param {string|string[]} propertyValue - The vale of a property - * @param {IArguments} additionalProperties - The additional properties - * @returns Nothing - */ - private addCsvQueryParameter(propertyName: string, propertyValue: string | string[], additionalProperties: IArguments): void { - // If there are already $propertyName value there, append a "," - this.urlComponents.oDataQueryParams[propertyName] = this.urlComponents.oDataQueryParams[propertyName] ? this.urlComponents.oDataQueryParams[propertyName] + "," : ""; - - let allValues: string[] = []; - - if (additionalProperties.length > 1 && typeof propertyValue === "string") { - allValues = Array.prototype.slice.call(additionalProperties); - } else if (typeof propertyValue === "string") { - allValues.push(propertyValue); - } else { - allValues = allValues.concat(propertyValue); - } - - this.urlComponents.oDataQueryParams[propertyName] += allValues.join(","); - } - - /** - * @private - * Builds the full url from the URLComponents to make a request - * @returns The URL string that is qualified to make a request to graph endpoint - */ - private buildFullUrl(): string { - const url = urlJoin([this.urlComponents.host, this.urlComponents.version, this.urlComponents.path]) + this.createQueryString(); - - if (this.config.debugLogging) { - console.log(url); - } - return url; - } - - /** - * @private - * Builds the query string from the URLComponents - * @returns The Constructed query string - */ - private createQueryString(): string { - // Combining query params from oDataQueryParams and otherURLQueryParams - const urlComponents = this.urlComponents; - const query: string[] = []; - if (Object.keys(urlComponents.oDataQueryParams).length !== 0) { - for (const property in urlComponents.oDataQueryParams) { - if (Object.prototype.hasOwnProperty.call(urlComponents.oDataQueryParams, property)) { - query.push(property + "=" + urlComponents.oDataQueryParams[property]); - } - } - } - if (Object.keys(urlComponents.otherURLQueryParams).length !== 0) { - for (const property in urlComponents.otherURLQueryParams) { - if (Object.prototype.hasOwnProperty.call(urlComponents.otherURLQueryParams, property)) { - query.push(property + "=" + urlComponents.otherURLQueryParams[property]); - } - } - } - - if (urlComponents.otherURLQueryOptions.length !== 0) { - for (const str of urlComponents.otherURLQueryOptions) { - query.push(str); - } - } - return query.length > 0 ? "?" + query.join("&") : ""; - } - - /** - * @private - * Parses the query parameters to set the urlComponents property of the GraphRequest object - * @param {string|KeyValuePairObjectStringNumber} queryDictionaryOrString - The query parameter - * @returns The same GraphRequest instance that is being called with - */ - private parseQueryParameter(queryDictionaryOrString: string | KeyValuePairObjectStringNumber): GraphRequest { - if (typeof queryDictionaryOrString === "string") { - if (queryDictionaryOrString.charAt(0) === "?") { - queryDictionaryOrString = queryDictionaryOrString.substring(1); - } - - if (queryDictionaryOrString.indexOf("&") !== -1) { - const queryParams = queryDictionaryOrString.split("&"); - for (const str of queryParams) { - this.parseQueryParamenterString(str); - } - } else { - this.parseQueryParamenterString(queryDictionaryOrString); - } - } else if (queryDictionaryOrString.constructor === Object) { - for (const key in queryDictionaryOrString) { - if (Object.prototype.hasOwnProperty.call(queryDictionaryOrString, key)) { - this.setURLComponentsQueryParamater(key, queryDictionaryOrString[key]); - } - } - } - - return this; - } - - /** - * @private - * Parses the query parameter of string type to set the urlComponents property of the GraphRequest object - * @param {string} queryParameter - the query parameters - * returns nothing - */ - private parseQueryParamenterString(queryParameter: string): void { - /* The query key-value pair must be split on the first equals sign to avoid errors in parsing nested query parameters. - Example-> "/me?$expand=home($select=city)" */ - if (this.isValidQueryKeyValuePair(queryParameter)) { - const indexOfFirstEquals = queryParameter.indexOf("="); - const paramKey = queryParameter.substring(0, indexOfFirstEquals); - const paramValue = queryParameter.substring(indexOfFirstEquals + 1); - this.setURLComponentsQueryParamater(paramKey, paramValue); - } else { - /* Push values which are not of key-value structure. - Example-> Handle an invalid input->.query(test), .query($select($select=name)) and let the Graph API respond with the error in the URL*/ - this.urlComponents.otherURLQueryOptions.push(queryParameter); - } - } - - /** - * @private - * Sets values into the urlComponents property of GraphRequest object. - * @param {string} paramKey - the query parameter key - * @param {string} paramValue - the query paramter value - * @returns nothing - */ - private setURLComponentsQueryParamater(paramKey: string, paramValue: string | number): void { - if (oDataQueryNames.indexOf(paramKey) !== -1) { - const currentValue = this.urlComponents.oDataQueryParams[paramKey]; - const isValueAppendable = currentValue && (paramKey === "$expand" || paramKey === "$select" || paramKey === "$orderby"); - this.urlComponents.oDataQueryParams[paramKey] = isValueAppendable ? currentValue + "," + paramValue : paramValue; - } else { - this.urlComponents.otherURLQueryParams[paramKey] = paramValue; - } - } - /** - * @private - * Check if the query parameter string has a valid key-value structure - * @param {string} queryString - the query parameter string. Example -> "name=value" - * #returns true if the query string has a valid key-value structure else false - */ - private isValidQueryKeyValuePair(queryString: string): boolean { - const indexofFirstEquals = queryString.indexOf("="); - if (indexofFirstEquals === -1) { - return false; - } - const indexofOpeningParanthesis = queryString.indexOf("("); - if (indexofOpeningParanthesis !== -1 && queryString.indexOf("(") < indexofFirstEquals) { - // Example -> .query($select($expand=true)); - return false; - } - return true; - } - - /** - * @private - * Updates the custom headers and options for a request - * @param {FetchOptions} options - The request options object - * @returns Nothing - */ - private updateRequestOptions(options: FetchOptions): void { - const optionsHeaders: HeadersInit = { ...options.headers }; - if (this.config.fetchOptions !== undefined) { - const fetchOptions: FetchOptions = { ...this.config.fetchOptions }; - Object.assign(options, fetchOptions); - if (typeof this.config.fetchOptions.headers !== undefined) { - options.headers = { ...this.config.fetchOptions.headers }; - } - } - Object.assign(options, this._options); - if (options.headers !== undefined) { - Object.assign(optionsHeaders, options.headers); - } - Object.assign(optionsHeaders, this._headers); - options.headers = optionsHeaders; - } - - /** - * @private - * @async - * Adds the custom headers and options to the request and makes the HTTPClient send request call - * @param {RequestInfo} request - The request url string or the Request object value - * @param {FetchOptions} options - The options to make a request - * @param {GraphRequestCallback} [callback] - The callback function to be called in response with async call - * @returns A promise that resolves to the response content - */ - private async send(request: RequestInfo, options: FetchOptions, callback?: GraphRequestCallback): Promise { - let rawResponse: Response; - const middlewareControl = new MiddlewareControl(this._middlewareOptions); - this.updateRequestOptions(options); - const customHosts = this.config?.customHosts; - try { - const context: Context = await this.httpClient.sendRequest({ - request, - options, - middlewareControl, - customHosts, - }); - - rawResponse = context.response; - const response: any = await GraphResponseHandler.getResponse(rawResponse, this._responseType, callback); - return response; - } catch (error) { - if (error instanceof GraphClientError) { - throw error; - } - let statusCode: number; - - if (rawResponse) { - statusCode = rawResponse.status; - } - const gError: GraphError = await GraphErrorHandler.getError(error, statusCode, callback, rawResponse); - throw gError; - } - } - - /** - * @private - * Checks if the content-type is present in the _headers property. If not present, defaults the content-type to application/json - * @param none - * @returns nothing - */ - private setHeaderContentType(): void { - if (!this._headers) { - this.header("Content-Type", "application/json"); - return; - } - const headerKeys = Object.keys(this._headers); - for (const headerKey of headerKeys) { - if (headerKey.toLowerCase() === "content-type") { - return; - } - } - // Default the content-type to application/json in case the content-type is not present in the header - this.header("Content-Type", "application/json"); - } - - /** - * @public - * Sets the custom header for a request - * @param {string} headerKey - A header key - * @param {string} headerValue - A header value - * @returns The same GraphRequest instance that is being called with - */ - public header(headerKey: string, headerValue: string): GraphRequest { - this._headers[headerKey] = headerValue; - return this; - } - - /** - * @public - * Sets the custom headers for a request - * @param {KeyValuePairObjectStringNumber | HeadersInit} headers - The request headers - * @returns The same GraphRequest instance that is being called with - */ - public headers(headers: KeyValuePairObjectStringNumber | HeadersInit): GraphRequest { - for (const key in headers) { - if (Object.prototype.hasOwnProperty.call(headers, key)) { - this._headers[key] = headers[key] as string; - } - } - return this; - } - - /** - * @public - * Sets the option for making a request - * @param {string} key - The key value - * @param {any} value - The value - * @returns The same GraphRequest instance that is being called with - */ - public option(key: string, value: any): GraphRequest { - this._options[key] = value; - return this; - } - - /** - * @public - * Sets the options for making a request - * @param {{ [key: string]: any }} options - The options key value pair - * @returns The same GraphRequest instance that is being called with - */ - public options(options: { [key: string]: any }): GraphRequest { - for (const key in options) { - if (Object.prototype.hasOwnProperty.call(options, key)) { - this._options[key] = options[key]; - } - } - return this; - } - - /** - * @public - * Sets the middleware options for a request - * @param {MiddlewareOptions[]} options - The array of middleware options - * @returns The same GraphRequest instance that is being called with - */ - public middlewareOptions(options: MiddlewareOptions[]): GraphRequest { - this._middlewareOptions = options; - return this; - } - - /** - * @public - * Sets the api endpoint version for a request - * @param {string} version - The version value - * @returns The same GraphRequest instance that is being called with - */ - public version(version: string): GraphRequest { - this.urlComponents.version = version; - return this; - } - - /** - * @public - * Sets the api endpoint version for a request - * @param {ResponseType} responseType - The response type value - * @returns The same GraphRequest instance that is being called with - */ - public responseType(responseType: ResponseType): GraphRequest { - this._responseType = responseType; - return this; - } - - /** - * @public - * To add properties for select OData Query param - * @param {string|string[]} properties - The Properties value - * @returns The same GraphRequest instance that is being called with, after adding the properties for $select query - */ - /* - * Accepts .select("displayName,birthday") - * and .select(["displayName", "birthday"]) - * and .select("displayName", "birthday") - * - */ - public select(properties: string | string[]): GraphRequest { - this.addCsvQueryParameter("$select", properties, arguments); - return this; - } - - /** - * @public - * To add properties for expand OData Query param - * @param {string|string[]} properties - The Properties value - * @returns The same GraphRequest instance that is being called with, after adding the properties for $expand query - */ - public expand(properties: string | string[]): GraphRequest { - this.addCsvQueryParameter("$expand", properties, arguments); - return this; - } - - /** - * @public - * To add properties for orderby OData Query param - * @param {string|string[]} properties - The Properties value - * @returns The same GraphRequest instance that is being called with, after adding the properties for $orderby query - */ - public orderby(properties: string | string[]): GraphRequest { - this.addCsvQueryParameter("$orderby", properties, arguments); - return this; - } - - /** - * @public - * To add query string for filter OData Query param. The request URL accepts only one $filter Odata Query option and its value is set to the most recently passed filter query string. - * @param {string} filterStr - The filter query string - * @returns The same GraphRequest instance that is being called with, after adding the $filter query - */ - public filter(filterStr: string): GraphRequest { - this.urlComponents.oDataQueryParams.$filter = filterStr; - return this; - } - - /** - * @public - * To add criterion for search OData Query param. The request URL accepts only one $search Odata Query option and its value is set to the most recently passed search criterion string. - * @param {string} searchStr - The search criterion string - * @returns The same GraphRequest instance that is being called with, after adding the $search query criteria - */ - public search(searchStr: string): GraphRequest { - this.urlComponents.oDataQueryParams.$search = searchStr; - return this; - } - - /** - * @public - * To add number for top OData Query param. The request URL accepts only one $top Odata Query option and its value is set to the most recently passed number value. - * @param {number} n - The number value - * @returns The same GraphRequest instance that is being called with, after adding the number for $top query - */ - public top(n: number): GraphRequest { - this.urlComponents.oDataQueryParams.$top = n; - return this; - } - - /** - * @public - * To add number for skip OData Query param. The request URL accepts only one $skip Odata Query option and its value is set to the most recently passed number value. - * @param {number} n - The number value - * @returns The same GraphRequest instance that is being called with, after adding the number for the $skip query - */ - public skip(n: number): GraphRequest { - this.urlComponents.oDataQueryParams.$skip = n; - return this; - } - - /** - * @public - * To add token string for skipToken OData Query param. The request URL accepts only one $skipToken Odata Query option and its value is set to the most recently passed token value. - * @param {string} token - The token value - * @returns The same GraphRequest instance that is being called with, after adding the token string for $skipToken query option - */ - public skipToken(token: string): GraphRequest { - this.urlComponents.oDataQueryParams.$skipToken = token; - return this; - } - - /** - * @public - * To add boolean for count OData Query param. The URL accepts only one $count Odata Query option and its value is set to the most recently passed boolean value. - * @param {boolean} isCount - The count boolean - * @returns The same GraphRequest instance that is being called with, after adding the boolean value for the $count query option - */ - public count(isCount = true): GraphRequest { - this.urlComponents.oDataQueryParams.$count = isCount.toString(); - return this; - } - - /** - * @public - * Appends query string to the urlComponent - * @param {string|KeyValuePairObjectStringNumber} queryDictionaryOrString - The query value - * @returns The same GraphRequest instance that is being called with, after appending the query string to the url component - */ - /* - * Accepts .query("displayName=xyz") - * and .select({ name: "value" }) - */ - public query(queryDictionaryOrString: string | KeyValuePairObjectStringNumber): GraphRequest { - return this.parseQueryParameter(queryDictionaryOrString); - } - - /** - * @public - * @async - * Makes a http request with GET method - * @param {GraphRequestCallback} [callback] - The callback function to be called in response with async call - * @returns A promise that resolves to the get response - */ - public async get(callback?: GraphRequestCallback): Promise { - const url = this.buildFullUrl(); - const options: FetchOptions = { - method: RequestMethod.GET, - }; - const response = await this.send(url, options, callback); - return response; - } - - /** - * @public - * @async - * Makes a http request with POST method - * @param {any} content - The content that needs to be sent with the request - * @param {GraphRequestCallback} [callback] - The callback function to be called in response with async call - * @returns A promise that resolves to the post response - */ - public async post(content: any, callback?: GraphRequestCallback): Promise { - const url = this.buildFullUrl(); - const options: FetchOptions = { - method: RequestMethod.POST, - body: serializeContent(content), - }; - const className: string = content && content.constructor && content.constructor.name; - if (className === "FormData") { - // Content-Type headers should not be specified in case the of FormData type content - options.headers = {}; - } else { - this.setHeaderContentType(); - options.headers = this._headers; - } - return await this.send(url, options, callback); - } - - /** - * @public - * @async - * Alias for Post request call - * @param {any} content - The content that needs to be sent with the request - * @param {GraphRequestCallback} [callback] - The callback function to be called in response with async call - * @returns A promise that resolves to the post response - */ - public async create(content: any, callback?: GraphRequestCallback): Promise { - return await this.post(content, callback); - } - - /** - * @public - * @async - * Makes http request with PUT method - * @param {any} content - The content that needs to be sent with the request - * @param {GraphRequestCallback} [callback] - The callback function to be called in response with async call - * @returns A promise that resolves to the put response - */ - public async put(content: any, callback?: GraphRequestCallback): Promise { - const url = this.buildFullUrl(); - this.setHeaderContentType(); - const options: FetchOptions = { - method: RequestMethod.PUT, - body: serializeContent(content), - }; - return await this.send(url, options, callback); - } - - /** - * @public - * @async - * Makes http request with PATCH method - * @param {any} content - The content that needs to be sent with the request - * @param {GraphRequestCallback} [callback] - The callback function to be called in response with async call - * @returns A promise that resolves to the patch response - */ - public async patch(content: any, callback?: GraphRequestCallback): Promise { - const url = this.buildFullUrl(); - this.setHeaderContentType(); - const options: FetchOptions = { - method: RequestMethod.PATCH, - body: serializeContent(content), - }; - return await this.send(url, options, callback); - } - - /** - * @public - * @async - * Alias for PATCH request - * @param {any} content - The content that needs to be sent with the request - * @param {GraphRequestCallback} [callback] - The callback function to be called in response with async call - * @returns A promise that resolves to the patch response - */ - public async update(content: any, callback?: GraphRequestCallback): Promise { - return await this.patch(content, callback); - } - - /** - * @public - * @async - * Makes http request with DELETE method - * @param {GraphRequestCallback} [callback] - The callback function to be called in response with async call - * @returns A promise that resolves to the delete response - */ - public async delete(callback?: GraphRequestCallback): Promise { - const url = this.buildFullUrl(); - const options: FetchOptions = { - method: RequestMethod.DELETE, - }; - return await this.send(url, options, callback); - } - - /** - * @public - * @async - * Alias for delete request call - * @param {GraphRequestCallback} [callback] - The callback function to be called in response with async call - * @returns A promise that resolves to the delete response - */ - public async del(callback?: GraphRequestCallback): Promise { - return await this.delete(callback); - } - - /** - * @public - * @async - * Makes a http request with GET method to read response as a stream. - * @param {GraphRequestCallback} [callback] - The callback function to be called in response with async call - * @returns A promise that resolves to the getStream response - */ - public async getStream(callback?: GraphRequestCallback): Promise { - const url = this.buildFullUrl(); - const options = { - method: RequestMethod.GET, - }; - this.responseType(ResponseType.STREAM); - return await this.send(url, options, callback); - } - - /** - * @public - * @async - * Makes a http request with GET method to read response as a stream. - * @param {any} stream - The stream instance - * @param {GraphRequestCallback} [callback] - The callback function to be called in response with async call - * @returns A promise that resolves to the putStream response - */ - public async putStream(stream: any, callback?: GraphRequestCallback): Promise { - const url = this.buildFullUrl(); - const options = { - method: RequestMethod.PUT, - headers: { - "Content-Type": "application/octet-stream", - }, - body: stream, - }; - return await this.send(url, options, callback); - } -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/GraphRequestUtil.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/GraphRequestUtil.ts deleted file mode 100644 index 02cf6c1..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/GraphRequestUtil.ts +++ /dev/null @@ -1,123 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ - -/** - * @module GraphRequestUtil - */ -import { GRAPH_URLS } from "./Constants"; -import { GraphClientError } from "./GraphClientError"; -/** - * To hold list of OData query params - */ -export const oDataQueryNames = ["$select", "$expand", "$orderby", "$filter", "$top", "$skip", "$skipToken", "$count"]; - -/** - * To construct the URL by appending the segments with "/" - * @param {string[]} urlSegments - The array of strings - * @returns The constructed URL string - */ -export const urlJoin = (urlSegments: string[]): string => { - const removePostSlash = (s) => s.replace(/\/+$/, ""); - const removePreSlash = (s) => s.replace(/^\/+/, ""); - const joiner = (pre, cur) => [removePostSlash(pre), removePreSlash(cur)].join("/"); - const parts = Array.prototype.slice.call(urlSegments); - return parts.reduce(joiner); -}; - -/** - * Serializes the content - * @param {any} content - The content value that needs to be serialized - * @returns The serialized content - * - * Note: - * This conversion is required due to the following reasons: - * Body parameter of Request method of isomorphic-fetch only accepts Blob, ArrayBuffer, FormData, TypedArrays string. - * Node.js platform does not support Blob, FormData. Javascript File object inherits from Blob so it is also not supported in node. Therefore content of type Blob, File, FormData will only come from browsers. - * Parallel to ArrayBuffer in javascript, node provides Buffer interface. Node's Buffer is able to send the arbitrary binary data to the server successfully for both Browser and Node platform. Whereas sending binary data via ArrayBuffer or TypedArrays was only possible using Browser. To support both Node and Browser, `serializeContent` converts TypedArrays or ArrayBuffer to `Node Buffer`. - * If the data received is in JSON format, `serializeContent` converts the JSON to string. - */ - -export const serializeContent = (content: any): any => { - const className: string = content && content.constructor && content.constructor.name; - if (className === "Buffer" || className === "Blob" || className === "File" || className === "FormData" || typeof content === "string") { - return content; - } - if (className === "ArrayBuffer") { - content = Buffer.from(content); - } else if (className === "Int8Array" || className === "Int16Array" || className === "Int32Array" || className === "Uint8Array" || className === "Uint16Array" || className === "Uint32Array" || className === "Uint8ClampedArray" || className === "Float32Array" || className === "Float64Array" || className === "DataView") { - content = Buffer.from(content.buffer); - } else { - try { - content = JSON.stringify(content); - } catch (error) { - throw new Error("Unable to stringify the content"); - } - } - return content; -}; - -/** - * Checks if the url is one of the service root endpoints for Microsoft Graph and Graph Explorer. - * @param {string} url - The url to be verified - * @returns {boolean} - Returns true if the url is a Graph URL - */ -export const isGraphURL = (url: string): boolean => { - return isValidEndpoint(url); -}; - -/** - * Checks if the url is for one of the custom hosts provided during client initialization - * @param {string} url - The url to be verified - * @param {Set} customHosts - The url to be verified - * @returns {boolean} - Returns true if the url is a for a custom host - */ -export const isCustomHost = (url: string, customHosts: Set): boolean => { - customHosts.forEach((host) => isCustomHostValid(host)); - return isValidEndpoint(url, customHosts); -}; - -/** - * Checks if the url is for one of the provided hosts. - * @param {string} url - The url to be verified - * @param {Set} allowedHosts - A set of hosts. - * @returns {boolean} - Returns true is for one of the provided endpoints. - */ -const isValidEndpoint = (url: string, allowedHosts: Set = GRAPH_URLS): boolean => { - // Valid Graph URL pattern - https://graph.microsoft.com/{version}/{resource}?{query-parameters} - // Valid Graph URL example - https://graph.microsoft.com/v1.0/ - url = url.toLowerCase(); - - if (url.indexOf("https://") !== -1) { - url = url.replace("https://", ""); - - // Find where the host ends - const startofPortNoPos = url.indexOf(":"); - const endOfHostStrPos = url.indexOf("/"); - let hostName = ""; - if (endOfHostStrPos !== -1) { - if (startofPortNoPos !== -1 && startofPortNoPos < endOfHostStrPos) { - hostName = url.substring(0, startofPortNoPos); - return allowedHosts.has(hostName); - } - // Parse out the host - hostName = url.substring(0, endOfHostStrPos); - return allowedHosts.has(hostName); - } - } - - return false; -}; - -/** - * Throws error if the string is not a valid host/hostname and contains other url parts. - * @param {string} host - The host to be verified - */ -const isCustomHostValid = (host: string) => { - if (host.indexOf("/") !== -1) { - throw new GraphClientError("Please add only hosts or hostnames to the CustomHosts config. If the url is `http://example.com:3000/`, host is `example:3000`"); - } -}; diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/GraphResponseHandler.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/GraphResponseHandler.ts deleted file mode 100644 index a1caa83..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/GraphResponseHandler.ts +++ /dev/null @@ -1,182 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ - -/** - * @module GraphResponseHandler - * References - https://fetch.spec.whatwg.org/#responses - */ - -import { GraphRequestCallback } from "./IGraphRequestCallback"; -import { ResponseType } from "./ResponseType"; - -/** - * @enum - * Enum for document types - * @property {string} TEXT_HTML - The text/html content type - * @property {string} TEXT_XML - The text/xml content type - * @property {string} APPLICATION_XML - The application/xml content type - * @property {string} APPLICATION_XHTML - The application/xhml+xml content type - */ -export enum DocumentType { - TEXT_HTML = "text/html", - TEXT_XML = "text/xml", - APPLICATION_XML = "application/xml", - APPLICATION_XHTML = "application/xhtml+xml", -} - -/** - * @enum - * Enum for Content types - * @property {string} TEXT_PLAIN - The text/plain content type - * @property {string} APPLICATION_JSON - The application/json content type - */ - -enum ContentType { - TEXT_PLAIN = "text/plain", - APPLICATION_JSON = "application/json", -} - -/** - * @enum - * Enum for Content type regex - * @property {string} DOCUMENT - The regex to match document content types - * @property {string} IMAGE - The regex to match image content types - */ -enum ContentTypeRegexStr { - DOCUMENT = "^(text\\/(html|xml))|(application\\/(xml|xhtml\\+xml))$", - IMAGE = "^image\\/.+", -} - -/** - * @class - * Class for GraphResponseHandler - */ - -export class GraphResponseHandler { - /** - * @private - * @static - * To parse Document response - * @param {Response} rawResponse - The response object - * @param {DocumentType} type - The type to which the document needs to be parsed - * @returns A promise that resolves to a document content - */ - private static parseDocumentResponse(rawResponse: Response, type: DocumentType): Promise { - if (typeof DOMParser !== "undefined") { - return new Promise((resolve, reject) => { - rawResponse.text().then((xmlString) => { - try { - const parser = new DOMParser(); - const xmlDoc = parser.parseFromString(xmlString, type); - resolve(xmlDoc); - } catch (error) { - reject(error); - } - }); - }); - } else { - return Promise.resolve(rawResponse.body); - } - } - - /** - * @private - * @static - * @async - * To convert the native Response to response content - * @param {Response} rawResponse - The response object - * @param {ResponseType} [responseType] - The response type value - * @returns A promise that resolves to the converted response content - */ - private static async convertResponse(rawResponse: Response, responseType?: ResponseType): Promise { - if (rawResponse.status === 204) { - // NO CONTENT - return Promise.resolve(); - } - let responseValue: any; - const contentType = rawResponse.headers.get("Content-type"); - switch (responseType) { - case ResponseType.ARRAYBUFFER: - responseValue = await rawResponse.arrayBuffer(); - break; - case ResponseType.BLOB: - responseValue = await rawResponse.blob(); - break; - case ResponseType.DOCUMENT: - responseValue = await GraphResponseHandler.parseDocumentResponse(rawResponse, DocumentType.TEXT_XML); - break; - case ResponseType.JSON: - responseValue = await rawResponse.json(); - break; - case ResponseType.STREAM: - responseValue = await Promise.resolve(rawResponse.body); - break; - case ResponseType.TEXT: - responseValue = await rawResponse.text(); - break; - default: - if (contentType !== null) { - const mimeType = contentType.split(";")[0]; - if (new RegExp(ContentTypeRegexStr.DOCUMENT).test(mimeType)) { - responseValue = await GraphResponseHandler.parseDocumentResponse(rawResponse, mimeType as DocumentType); - } else if (new RegExp(ContentTypeRegexStr.IMAGE).test(mimeType)) { - responseValue = rawResponse.blob(); - } else if (mimeType === ContentType.TEXT_PLAIN) { - responseValue = await rawResponse.text(); - } else if (mimeType === ContentType.APPLICATION_JSON) { - responseValue = await rawResponse.json(); - } else { - responseValue = Promise.resolve(rawResponse.body); - } - } else { - /** - * RFC specification {@link https://tools.ietf.org/html/rfc7231#section-3.1.1.5} says: - * A sender that generates a message containing a payload body SHOULD - * generate a Content-Type header field in that message unless the - * intended media type of the enclosed representation is unknown to the - * sender. If a Content-Type header field is not present, the recipient - * MAY either assume a media type of "application/octet-stream" - * ([RFC2046], Section 4.5.1) or examine the data to determine its type. - * - * So assuming it as a stream type so returning the body. - */ - responseValue = Promise.resolve(rawResponse.body); - } - break; - } - return responseValue; - } - - /** - * @public - * @static - * @async - * To get the parsed response - * @param {Response} rawResponse - The response object - * @param {ResponseType} [responseType] - The response type value - * @param {GraphRequestCallback} [callback] - The graph request callback function - * @returns The parsed response - */ - public static async getResponse(rawResponse: Response, responseType?: ResponseType, callback?: GraphRequestCallback): Promise { - if (responseType === ResponseType.RAW) { - return Promise.resolve(rawResponse); - } else { - const response = await GraphResponseHandler.convertResponse(rawResponse, responseType); - if (rawResponse.ok) { - // Status Code 2XX - if (typeof callback === "function") { - callback(null, response); - } else { - return response; - } - } else { - // NOT OK Response - throw response; - } - } - } -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/HTTPClient.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/HTTPClient.ts deleted file mode 100644 index c740f6b..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/HTTPClient.ts +++ /dev/null @@ -1,91 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ - -/** - * @module HTTPClient - */ - -import { Context } from "./IContext"; -import { Middleware } from "./middleware/IMiddleware"; - -/** - * @class - * Class representing HTTPClient - */ -export class HTTPClient { - /** - * @private - * A member holding first middleware of the middleware chain - */ - private middleware: Middleware; - - /** - * @public - * @constructor - * Creates an instance of a HTTPClient - * @param {...Middleware} middleware - The first middleware of the middleware chain or a sequence of all the Middleware handlers - */ - public constructor(...middleware: Middleware[]) { - if (!middleware || !middleware.length) { - const error = new Error(); - error.name = "InvalidMiddlewareChain"; - error.message = "Please provide a default middleware chain or custom middleware chain"; - throw error; - } - this.setMiddleware(...middleware); - } - - /** - * @private - * Processes the middleware parameter passed to set this.middleware property - * The calling function should validate if middleware is not undefined or not empty. - * @param {...Middleware} middleware - The middleware passed - * @returns Nothing - */ - private setMiddleware(...middleware: Middleware[]): void { - if (middleware.length > 1) { - this.parseMiddleWareArray(middleware); - } else { - this.middleware = middleware[0]; - } - } - - /** - * @private - * Processes the middleware array to construct the chain - * and sets this.middleware property to the first middleware handler of the array - * The calling function should validate if middleware is not undefined or not empty - * @param {Middleware[]} middlewareArray - The array of middleware handlers - * @returns Nothing - */ - private parseMiddleWareArray(middlewareArray: Middleware[]) { - middlewareArray.forEach((element, index) => { - if (index < middlewareArray.length - 1) { - element.setNext(middlewareArray[index + 1]); - } - }); - this.middleware = middlewareArray[0]; - } - - /** - * @public - * @async - * To send the request through the middleware chain - * @param {Context} context - The context of a request - * @returns A promise that resolves to the Context - */ - public async sendRequest(context: Context): Promise { - if (typeof context.request === "string" && context.options === undefined) { - const error = new Error(); - error.name = "InvalidRequestOptions"; - error.message = "Unable to execute the middleware, Please provide valid options for a request"; - throw error; - } - await this.middleware.execute(context); - return context; - } -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/HTTPClientFactory.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/HTTPClientFactory.ts deleted file mode 100644 index 1b01b9f..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/HTTPClientFactory.ts +++ /dev/null @@ -1,79 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ - -/** - * @module HTTPClientFactory - */ - -import { HTTPClient } from "./HTTPClient"; -import { AuthenticationProvider } from "./IAuthenticationProvider"; -import { AuthenticationHandler } from "./middleware/AuthenticationHandler"; -import { HTTPMessageHandler } from "./middleware/HTTPMessageHandler"; -import { Middleware } from "./middleware/IMiddleware"; -import { RedirectHandlerOptions } from "./middleware/options/RedirectHandlerOptions"; -import { RetryHandlerOptions } from "./middleware/options/RetryHandlerOptions"; -import { RedirectHandler } from "./middleware/RedirectHandler"; -import { RetryHandler } from "./middleware/RetryHandler"; -import { TelemetryHandler } from "./middleware/TelemetryHandler"; - -/** - * @private - * To check whether the environment is node or not - * @returns A boolean representing the environment is node or not - */ -const isNodeEnvironment = (): boolean => { - return typeof process === "object" && typeof require === "function"; -}; - -/** - * @class - * Class representing HTTPClientFactory - */ -export class HTTPClientFactory { - /** - * @public - * @static - * Creates HTTPClient with default middleware chain - * @param {AuthenticationProvider} authProvider - The authentication provider instance - * @returns A HTTPClient instance - * - * NOTE: These are the things that we need to remember while doing modifications in the below default pipeline. - * * HTTPMessageHandler should be the last one in the middleware pipeline, because this makes the actual network call of the request - * * TelemetryHandler should be the one prior to the last middleware in the chain, because this is the one which actually collects and appends the usage flag and placing this handler * before making the actual network call ensures that the usage of all features are recorded in the flag. - * * The best place for AuthenticationHandler is in the starting of the pipeline, because every other handler might have to work for multiple times for a request but the auth token for - * them will remain same. For example, Retry and Redirect handlers might be working multiple times for a request based on the response but their auth token would remain same. - */ - public static createWithAuthenticationProvider(authProvider: AuthenticationProvider): HTTPClient { - const authenticationHandler = new AuthenticationHandler(authProvider); - const retryHandler = new RetryHandler(new RetryHandlerOptions()); - const telemetryHandler = new TelemetryHandler(); - const httpMessageHandler = new HTTPMessageHandler(); - - authenticationHandler.setNext(retryHandler); - if (isNodeEnvironment()) { - const redirectHandler = new RedirectHandler(new RedirectHandlerOptions()); - retryHandler.setNext(redirectHandler); - redirectHandler.setNext(telemetryHandler); - } else { - retryHandler.setNext(telemetryHandler); - } - telemetryHandler.setNext(httpMessageHandler); - return HTTPClientFactory.createWithMiddleware(authenticationHandler); - } - - /** - * @public - * @static - * Creates a middleware chain with the given one - * @property {...Middleware} middleware - The first middleware of the middleware chain or a sequence of all the Middleware handlers - * @returns A HTTPClient instance - */ - public static createWithMiddleware(...middleware: Middleware[]): HTTPClient { - // Middleware should not empty or undefined. This is check is present in the HTTPClient constructor. - return new HTTPClient(...middleware); - } -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/IAuthProvider.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/IAuthProvider.ts deleted file mode 100644 index 452a978..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/IAuthProvider.ts +++ /dev/null @@ -1,15 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ - -import { AuthProviderCallback } from "./IAuthProviderCallback"; - -/** - * @interface - * Signature that holds authProvider - * @callback - The anonymous callback function which takes a single param - */ -export type AuthProvider = (done: AuthProviderCallback) => void; diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/IAuthProviderCallback.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/IAuthProviderCallback.ts deleted file mode 100644 index 9fc0084..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/IAuthProviderCallback.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ - -/** - * @interface - * Signature that defines callback for an authentication provider - * @callback - The anonymous callback function which takes two params - */ -export type AuthProviderCallback = (error: any, accessToken: string | null) => void; diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/IAuthenticationProvider.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/IAuthenticationProvider.ts deleted file mode 100644 index 4fbd817..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/IAuthenticationProvider.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ - -import { AuthenticationProviderOptions } from "./IAuthenticationProviderOptions"; - -/** - * @interface - * A signature representing Authentication provider - * @property {Function} getAccessToken - The function to get the access token from the authentication provider - */ -export interface AuthenticationProvider { - /** - * To get access token from the authentication provider - * @param {AuthenticationProviderOptions} [authenticationProviderOptions] - The authentication provider options instance - * @returns A promise that resolves to an access token - */ - getAccessToken: (authenticationProviderOptions?: AuthenticationProviderOptions) => Promise; -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/IAuthenticationProviderOptions.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/IAuthenticationProviderOptions.ts deleted file mode 100644 index 21b3f30..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/IAuthenticationProviderOptions.ts +++ /dev/null @@ -1,15 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ - -/** - * @interface - * A signature represents the Authentication provider options - * @property {string[]} [scopes] - The array of scopes - */ -export interface AuthenticationProviderOptions { - scopes?: string[]; -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/IClientOptions.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/IClientOptions.ts deleted file mode 100644 index ee9f620..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/IClientOptions.ts +++ /dev/null @@ -1,35 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ - -import { AuthenticationProvider } from "./IAuthenticationProvider"; -import { FetchOptions } from "./IFetchOptions"; -import { Middleware } from "./middleware/IMiddleware"; - -/** - * @interface - * Options for initializing the Graph Client - * @property {Function} [authProvider] - The authentication provider instance - * @property {string} [baseUrl] - Base url that needs to be appended to every request - * @property {boolean} [debugLogging] - The boolean to enable/disable debug logging - * @property {string} [defaultVersion] - The default version that needs to be used while making graph api request - * @property {FetchOptions} [fetchOptions] - The options for fetch request - * @property {Middleware| Middleware[]} [middleware] - The first middleware of the middleware chain or an array of the Middleware handlers - * @property {Set}[customHosts] - A set of custom host names. Should contain hostnames only. - */ - -export interface ClientOptions { - authProvider?: AuthenticationProvider; - baseUrl?: string; - debugLogging?: boolean; - defaultVersion?: string; - fetchOptions?: FetchOptions; - middleware?: Middleware | Middleware[]; - /** - * Example - If URL is "https://test_host/v1.0", then set property "customHosts" as "customHosts: Set(["test_host"])" - */ - customHosts?: Set; -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/IContext.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/IContext.ts deleted file mode 100644 index c657cce..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/IContext.ts +++ /dev/null @@ -1,30 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ - -import { FetchOptions } from "./IFetchOptions"; -import { MiddlewareControl } from "./middleware/MiddlewareControl"; - -/** - * @interface - * @property {RequestInfo} request - The request url string or the Request instance - * @property {FetchOptions} [options] - The options for the request - * @property {Response} [response] - The response content - * @property {MiddlewareControl} [middlewareControl] - The options for the middleware chain - * @property {Set}[customHosts] - A set of custom host names. Should contain hostnames only. - * - */ - -export interface Context { - request: RequestInfo; - options?: FetchOptions; - response?: Response; - middlewareControl?: MiddlewareControl; - /** - * Example - If URL is "https://test_host", then set property "customHosts" as "customHosts: Set(["test_host"])" - */ - customHosts?: Set; -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/IFetchOptions.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/IFetchOptions.ts deleted file mode 100644 index ddbf7ff..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/IFetchOptions.ts +++ /dev/null @@ -1,33 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ - -/** - * @interface {@link https://github.com/bitinn/node-fetch/#options} - * Signature to define the fetch request options for node environment - * @property {number} [follow] - node-fetch option: maximum redirect count. 0 to not follow redirect - * @property {number} [compress] - node-fetch option: support gzip/deflate content encoding. false to disable - * @property {number} [size] - node-fetch option: maximum response body size in bytes. 0 to disable - * @property {any} [agent] - node-fetch option: HTTP(S).Agent instance, allows custom proxy, certificate, lookup, family etc. - * @property {number} [highWaterMark] - node-fetch option: maximum number of bytes to store in the internal buffer before ceasing to read from the underlying resource. - * @property {boolean} [insecureHTTPParser] - node-fetch option: use an insecure HTTP parser that accepts invalid HTTP headers when `true`. - */ -export interface NodeFetchInit { - follow?: number; - compress?: boolean; - size?: number; - agent?: any; - highWaterMark?: number; - insecureHTTPParser?: boolean; -} - -/** - * @interface - * Signature to define the fetch api options which includes both fetch standard options and also the extended node fetch options - * @extends RequestInit @see {@link https://fetch.spec.whatwg.org/#requestinit} - * @extends NodeFetchInit - */ -export interface FetchOptions extends RequestInit, NodeFetchInit {} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/IGraphRequestCallback.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/IGraphRequestCallback.ts deleted file mode 100644 index ecfdc67..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/IGraphRequestCallback.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ - -import { GraphError } from "./GraphError"; -/** - * @interface - * Signature to define the GraphRequest callback - * @callback - The anonymous callback function - */ -export type GraphRequestCallback = (error: GraphError, response: any, rawResponse?: any) => void; diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/IOptions.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/IOptions.ts deleted file mode 100644 index 967c14a..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/IOptions.ts +++ /dev/null @@ -1,31 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ - -import { AuthProvider } from "./IAuthProvider"; -import { FetchOptions } from "./IFetchOptions"; - -/** - * @interface - * Options for initializing the Graph Client - * @property {AuthProvider} authProvider - The function to get the authentication token - * @property {string} [baseUrl] - Base url that needs to be appended to every request - * @property {boolean} [debugLogging] - The boolean to enable/disable debug logging - * @property {string} [defaultVersion] - The default version that needs to be used while making graph api request - * @property {FetchOptions} [fetchOptions] - The options for fetch request - * @property {Set}[customHosts] - A set of custom host names. Should contain hostnames only. - */ -export interface Options { - authProvider: AuthProvider; - baseUrl?: string; - debugLogging?: boolean; - defaultVersion?: string; - fetchOptions?: FetchOptions; - /** - * Example - If URL is "https://test_host/v1.0", then set property "customHosts" as "customHosts: Set(["test_host"])" - */ - customHosts?: Set; -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/RequestMethod.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/RequestMethod.ts deleted file mode 100644 index ae6f00d..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/RequestMethod.ts +++ /dev/null @@ -1,23 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ - -/** - * @enum - * Enum for RequestMethods - * @property {string} GET - The get request type - * @property {string} PATCH - The patch request type - * @property {string} POST - The post request type - * @property {string} PUT - The put request type - * @property {string} DELETE - The delete request type - */ -export enum RequestMethod { - GET = "GET", - PATCH = "PATCH", - POST = "POST", - PUT = "PUT", - DELETE = "DELETE", -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/ResponseType.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/ResponseType.ts deleted file mode 100644 index fda5940..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/ResponseType.ts +++ /dev/null @@ -1,27 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ - -/** - * @enum - * Enum for ResponseType values - * @property {string} ARRAYBUFFER - To download response content as an [ArrayBuffer]{@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer} - * @property {string} BLOB - To download content as a [binary/blob] {@link https://developer.mozilla.org/en-US/docs/Web/API/Blob} - * @property {string} DOCUMENT - This downloads content as a document or stream - * @property {string} JSON - To download response content as a json - * @property {string} STREAM - To download response as a [stream]{@link https://nodejs.org/api/stream.html} - * @property {string} TEXT - For downloading response as a text - */ - -export enum ResponseType { - ARRAYBUFFER = "arraybuffer", - BLOB = "blob", - DOCUMENT = "document", - JSON = "json", - RAW = "raw", - STREAM = "stream", - TEXT = "text", -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/ValidatePolyFilling.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/ValidatePolyFilling.ts deleted file mode 100644 index 53ec118..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/ValidatePolyFilling.ts +++ /dev/null @@ -1,30 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ - -/** - * @constant - * @function - * Validates availability of Promise and fetch in global context - * @returns The true in case the Promise and fetch available, otherwise throws error - */ - -export const validatePolyFilling = (): boolean => { - if (typeof Promise === "undefined" && typeof fetch === "undefined") { - const error = new Error("Library cannot function without Promise and fetch. So, please provide polyfill for them."); - error.name = "PolyFillNotAvailable"; - throw error; - } else if (typeof Promise === "undefined") { - const error = new Error("Library cannot function without Promise. So, please provide polyfill for it."); - error.name = "PolyFillNotAvailable"; - throw error; - } else if (typeof fetch === "undefined") { - const error = new Error("Library cannot function without fetch. So, please provide polyfill for it."); - error.name = "PolyFillNotAvailable"; - throw error; - } - return true; -}; diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/Version.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/Version.ts deleted file mode 100644 index 1b7fc28..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/Version.ts +++ /dev/null @@ -1,15 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ - -// THIS FILE IS AUTO GENERATED -// ANY CHANGES WILL BE LOST DURING BUILD - -/** - * @module Version - */ - -export const PACKAGE_VERSION = "3.0.7"; diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/authentication/azureTokenCredentials/ITokenCredentialAuthenticationProviderOptions.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/authentication/azureTokenCredentials/ITokenCredentialAuthenticationProviderOptions.ts deleted file mode 100644 index c07ffb1..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/authentication/azureTokenCredentials/ITokenCredentialAuthenticationProviderOptions.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -import { GetTokenOptions } from "@azure/identity"; - -import { AuthenticationProviderOptions } from "../../IAuthenticationProviderOptions"; - -/** - * @interface - * A signature represents the Authentication provider options for Token Credentials - * @property {getTokenOptions} [GetTokenOptions] - Defines options for TokenCredential.getToken. - */ -export interface TokenCredentialAuthenticationProviderOptions extends AuthenticationProviderOptions { - getTokenOptions?: GetTokenOptions; -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/authentication/azureTokenCredentials/TokenCredentialAuthenticationProvider.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/authentication/azureTokenCredentials/TokenCredentialAuthenticationProvider.ts deleted file mode 100644 index 9e4b63b..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/authentication/azureTokenCredentials/TokenCredentialAuthenticationProvider.ts +++ /dev/null @@ -1,81 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ - -import { TokenCredential } from "@azure/identity"; - -import { GraphClientError } from "../../GraphClientError"; -import { AuthenticationProvider } from "../../IAuthenticationProvider"; -import { TokenCredentialAuthenticationProviderOptions } from "./ITokenCredentialAuthenticationProviderOptions"; - -/** - * @module TokenCredentialAuthenticationProvider - */ - -/** - * @class - * Class representing TokenCredentialAuthenticationProvider - * This feature is introduced in Version 3.0.0 - * @extends AuthenticationProvider - * Reference - https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/identity/identity/README.md - */ -export class TokenCredentialAuthenticationProvider implements AuthenticationProvider { - /** - * @private - * A member holding an instance of @azure/identity TokenCredential - */ - private tokenCredential: TokenCredential; - - /** - * @private - * A member holding an instance of TokenCredentialAuthenticationProviderOptions - */ - private authenticationProviderOptions: TokenCredentialAuthenticationProviderOptions; - - /** - * @public - * @constructor - * Creates an instance of TokenCredentialAuthenticationProvider - * @param {TokenCredential} tokenCredential - An instance of @azure/identity TokenCredential - * @param {TokenCredentialAuthenticationProviderOptions} authenticationProviderOptions - An instance of TokenCredentialAuthenticationProviderOptions - * @returns An instance of TokenCredentialAuthenticationProvider - */ - public constructor(tokenCredential: TokenCredential, authenticationProviderOptions: TokenCredentialAuthenticationProviderOptions) { - if (!tokenCredential) { - throw new GraphClientError("Please pass a token credential object to the TokenCredentialAuthenticationProvider class constructor"); - } - if (!authenticationProviderOptions) { - throw new GraphClientError("Please pass the TokenCredentialAuthenticationProviderOptions with scopes to the TokenCredentialAuthenticationProvider class constructor"); - } - this.authenticationProviderOptions = authenticationProviderOptions; - this.tokenCredential = tokenCredential; - } - - /** - * @public - * @async - * To get the access token - * @param {TokenCredentialAuthenticationProviderOptions} authenticationProviderOptions - The authentication provider options object - * @returns The promise that resolves to an access token - */ - public async getAccessToken(): Promise { - const scopes = this.authenticationProviderOptions.scopes; - const error = new GraphClientError(); - - if (!scopes || scopes.length === 0) { - error.name = "Empty Scopes"; - error.message = "Scopes cannot be empty, Please provide scopes"; - throw error; - } - const response = await this.tokenCredential.getToken(scopes, this.authenticationProviderOptions.getTokenOptions); - if (response) { - return response.token; - } - error.message = "Cannot retrieve accessToken from the Token Credential object"; - error.name = "Access token is undefined"; - throw error; - } -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/authentication/azureTokenCredentials/index.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/authentication/azureTokenCredentials/index.ts deleted file mode 100644 index 6d672ef..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/authentication/azureTokenCredentials/index.ts +++ /dev/null @@ -1,8 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -export { TokenCredentialAuthenticationProviderOptions } from "./ITokenCredentialAuthenticationProviderOptions"; -export { TokenCredentialAuthenticationProvider } from "./TokenCredentialAuthenticationProvider"; diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/authentication/msal-browser/AuthCodeMSALBrowserAuthenticationProvider.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/authentication/msal-browser/AuthCodeMSALBrowserAuthenticationProvider.ts deleted file mode 100644 index 0d80004..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/authentication/msal-browser/AuthCodeMSALBrowserAuthenticationProvider.ts +++ /dev/null @@ -1,78 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ - -/** - * @module AuthCodeMSALBrowserAuthenticationProvider - */ - -import { AuthenticationResult, InteractionRequiredAuthError, InteractionType, PublicClientApplication } from "@azure/msal-browser"; - -import { GraphClientError } from "../../GraphClientError"; -import { AuthenticationProvider } from "../../IAuthenticationProvider"; -import { AuthCodeMSALBrowserAuthenticationProviderOptions } from "../msalOptions/MSALAuthenticationProviderOptions"; - -/** - * an AuthenticationProvider implementation supporting msal-browser library. - * This feature is introduced in Version 3.0.0 - * @class - * @extends AuthenticationProvider - */ -export class AuthCodeMSALBrowserAuthenticationProvider implements AuthenticationProvider { - /** - * @public - * @constructor - * Creates an instance of ImplicitMSALAuthenticationProvider - * @param {PublicClientApplication} msalApplication - An instance of MSAL PublicClientApplication - * @param {AuthCodeMSALBrowserAuthenticationProviderOptions} options - An instance of MSALAuthenticationProviderOptions - * @returns An instance of ImplicitMSALAuthenticationProvider - */ - public constructor(private publicClientApplication: PublicClientApplication, private options: AuthCodeMSALBrowserAuthenticationProviderOptions) { - if (!options || !publicClientApplication) { - throw new GraphClientError("Please pass valid PublicClientApplication instance and AuthCodeMSALBrowserAuthenticationProviderOptions instance to instantiate MSALBrowserAuthenticationProvider"); - } - } - - /** - * @public - * @async - * To get the access token for the request - * @returns The promise that resolves to an access token - */ - public async getAccessToken(): Promise { - const scopes = this.options && this.options.scopes; - const account = this.options && this.options.account; - const error = new GraphClientError(); - if (!scopes || scopes.length === 0) { - error.name = "Empty Scopes"; - error.message = "Scopes cannot be empty, Please provide scopes"; - throw error; - } - try { - const response: AuthenticationResult = await this.publicClientApplication.acquireTokenSilent({ - scopes, - account, - }); - if (!response || !response.accessToken) { - error.name = "Access token is undefined"; - error.message = "Received empty access token from PublicClientApplication"; - throw error; - } - return response.accessToken; - } catch (error) { - if (error instanceof InteractionRequiredAuthError) { - if (this.options.interactionType === InteractionType.Redirect) { - this.publicClientApplication.acquireTokenRedirect({ scopes }); - } else if (this.options.interactionType === InteractionType.Popup) { - const response: AuthenticationResult = await this.publicClientApplication.acquireTokenPopup({ scopes }); - return response.accessToken; - } - } else { - throw error; - } - } - } -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/authentication/msal-browser/index.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/authentication/msal-browser/index.ts deleted file mode 100644 index a2f66ed..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/authentication/msal-browser/index.ts +++ /dev/null @@ -1,7 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ -export { AuthCodeMSALBrowserAuthenticationProvider } from "./AuthCodeMSALBrowserAuthenticationProvider"; diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/authentication/msalOptions/MSALAuthenticationProviderOptions.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/authentication/msalOptions/MSALAuthenticationProviderOptions.ts deleted file mode 100644 index 5e70cbd..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/authentication/msalOptions/MSALAuthenticationProviderOptions.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ - -/** - * @module MSALAuthenticationProviderOptions - */ - -import { AccountInfo, InteractionType } from "@azure/msal-browser"; - -import { AuthenticationProviderOptions } from "../../IAuthenticationProviderOptions"; - -export interface AuthCodeMSALBrowserAuthenticationProviderOptions extends AuthenticationProviderOptions { - scopes: string[]; - account: AccountInfo; - interactionType: InteractionType; -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/browser/index.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/browser/index.ts deleted file mode 100644 index 4a25774..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/browser/index.ts +++ /dev/null @@ -1,53 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ - -// eslint-disable-next-line @typescript-eslint/triple-slash-reference -/// -export { BatchRequestStep, BatchRequestData, BatchRequestContent, RequestData, BatchRequestBody } from "../content/BatchRequestContent"; -export { BatchResponseBody, BatchResponseContent } from "../content/BatchResponseContent"; - -export { AuthenticationHandler } from "../middleware/AuthenticationHandler"; -export { HTTPMessageHandler } from "../middleware/HTTPMessageHandler"; -export { Middleware } from "../middleware/IMiddleware"; -export { RetryHandler } from "../middleware/RetryHandler"; -export { RedirectHandler } from "../middleware/RedirectHandler"; -export { TelemetryHandler } from "../middleware/TelemetryHandler"; -export { MiddlewareFactory } from "../middleware/MiddlewareFactory"; -export { AuthenticationHandlerOptions } from "../middleware/options/AuthenticationHandlerOptions"; -export { MiddlewareOptions } from "../middleware/options/IMiddlewareOptions"; -export { ShouldRetry, RetryHandlerOptions } from "../middleware/options/RetryHandlerOptions"; -export { ShouldRedirect, RedirectHandlerOptions } from "../middleware/options/RedirectHandlerOptions"; -export { FeatureUsageFlag, TelemetryHandlerOptions } from "../middleware/options/TelemetryHandlerOptions"; -export { ChaosHandlerOptions } from "../middleware/options/ChaosHandlerOptions"; -export { ChaosStrategy } from "../middleware/options/ChaosStrategy"; -export { ChaosHandler } from "../middleware/ChaosHandler"; - -export { SliceType, LargeFileUploadTaskOptions, LargeFileUploadTask, LargeFileUploadSession, FileObject } from "../tasks/LargeFileUploadTask"; -export { OneDriveLargeFileUploadTask, OneDriveLargeFileUploadOptions } from "../tasks/OneDriveLargeFileUploadTask"; -export { getValidRangeSize } from "../tasks/OneDriveLargeFileUploadTaskUtil"; -export { StreamUpload } from "../tasks/FileUploadTask/FileObjectClasses/StreamUpload"; -export { FileUpload } from "../tasks/FileUploadTask/FileObjectClasses/FileUpload"; -export { UploadResult } from "../tasks/FileUploadTask/UploadResult"; -export { UploadEventHandlers } from "../tasks/FileUploadTask/Interfaces/IUploadEventHandlers"; -export { Range } from "../tasks/FileUploadTask/Range"; -export { PageIteratorCallback, PageIterator, PageCollection, GraphRequestOptions } from "../tasks/PageIterator"; - -export { Client } from "../Client"; -export { CustomAuthenticationProvider } from "../CustomAuthenticationProvider"; -export { GraphError } from "../GraphError"; -export { GraphClientError } from "../GraphClientError"; -export { GraphRequest } from "../GraphRequest"; -export { AuthProvider } from "../IAuthProvider"; -export { AuthenticationProvider } from "../IAuthenticationProvider"; -export { AuthenticationProviderOptions } from "../IAuthenticationProviderOptions"; -export { AuthProviderCallback } from "../IAuthProviderCallback"; -export { ClientOptions } from "../IClientOptions"; -export { Context } from "../IContext"; -export { NodeFetchInit, FetchOptions } from "../IFetchOptions"; -export { GraphRequestCallback } from "../IGraphRequestCallback"; -export { Options } from "../IOptions"; -export { ResponseType } from "../ResponseType"; diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/content/BatchRequestContent.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/content/BatchRequestContent.ts deleted file mode 100644 index ce76ead..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/content/BatchRequestContent.ts +++ /dev/null @@ -1,486 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ - -/** - * @module BatchRequestContent - */ -import { RequestMethod } from "../RequestMethod"; - -/** - * @interface - * Signature to represent the buffer request body parsing method - * @property {Function} buffer - Returns a promise that resolves to a buffer of the request body - */ -interface NodeBody { - buffer(): Promise; -} - -/** - * @interface - * Signature to represent the Request for both Node and browser environments - * @extends Request - * @extends NodeBody - */ -interface IsomorphicRequest extends Request, NodeBody {} - -/** - * @interface - * Signature representing BatchRequestStep data - * @property {string} id - Unique identity for the request, Should not be an empty string - * @property {string[]} [dependsOn] - Array of dependencies - * @property {Request} request - The Request object - */ -export interface BatchRequestStep { - id: string; - dependsOn?: string[]; - request: Request; -} - -/** - * @interface - * Signature representing single request in a Batching - * @extends RequestInit - * @see {@link https://github.com/Microsoft/TypeScript/blob/master/lib/lib.dom.d.ts#L1337} and {@link https://fetch.spec.whatwg.org/#requestinit} - * - * @property {string} url - The url value of the request - */ - -export interface RequestData extends RequestInit { - url: string; -} - -/** - * @interface - * Signature representing batch request data - * @property {string} id - Unique identity for the request, Should not be an empty string - * @property {string[]} [dependsOn] - Array of dependencies - */ -export interface BatchRequestData extends RequestData { - id: string; - dependsOn?: string[]; -} - -/** - * @interface - * Signature representing batch request body - * @property {BatchRequestData[]} requests - Array of request data, a json representation of requests for batch - */ - -export interface BatchRequestBody { - requests: BatchRequestData[]; -} - -/** - * @class - * Class for handling BatchRequestContent - */ -export class BatchRequestContent { - /** - * @private - * @static - * Limit for number of requests {@link - https://developer.microsoft.com/en-us/graph/docs/concepts/known_issues#json-batching} - */ - private static requestLimit = 20; - - /** - * @public - * To keep track of requests, key will be id of the request and value will be the request json - */ - public requests: Map; - - /** - * @private - * @static - * Validates the dependency chain of the requests - * - * Note: - * Individual requests can depend on other individual requests. Currently, requests can only depend on a single other request, and must follow one of these three patterns: - * 1. Parallel - no individual request states a dependency in the dependsOn property. - * 2. Serial - all individual requests depend on the previous individual request. - * 3. Same - all individual requests that state a dependency in the dependsOn property, state the same dependency. - * As JSON batching matures, these limitations will be removed. - * @see {@link https://developer.microsoft.com/en-us/graph/docs/concepts/known_issues#json-batching} - * - * @param {Map} requests - The map of requests. - * @returns The boolean indicating the validation status - */ - - private static validateDependencies(requests: Map): boolean { - const isParallel = (reqs: Map): boolean => { - const iterator = reqs.entries(); - let cur = iterator.next(); - while (!cur.done) { - const curReq = cur.value[1]; - if (curReq.dependsOn !== undefined && curReq.dependsOn.length > 0) { - return false; - } - cur = iterator.next(); - } - return true; - }; - const isSerial = (reqs: Map): boolean => { - const iterator = reqs.entries(); - let cur = iterator.next(); - const firstRequest: BatchRequestStep = cur.value[1]; - if (firstRequest.dependsOn !== undefined && firstRequest.dependsOn.length > 0) { - return false; - } - let prev = cur; - cur = iterator.next(); - while (!cur.done) { - const curReq: BatchRequestStep = cur.value[1]; - if (curReq.dependsOn === undefined || curReq.dependsOn.length !== 1 || curReq.dependsOn[0] !== prev.value[1].id) { - return false; - } - prev = cur; - cur = iterator.next(); - } - return true; - }; - const isSame = (reqs: Map): boolean => { - const iterator = reqs.entries(); - let cur = iterator.next(); - const firstRequest: BatchRequestStep = cur.value[1]; - let dependencyId: string; - if (firstRequest.dependsOn === undefined || firstRequest.dependsOn.length === 0) { - dependencyId = firstRequest.id; - } else { - if (firstRequest.dependsOn.length === 1) { - const fDependencyId = firstRequest.dependsOn[0]; - if (fDependencyId !== firstRequest.id && reqs.has(fDependencyId)) { - dependencyId = fDependencyId; - } else { - return false; - } - } else { - return false; - } - } - cur = iterator.next(); - while (!cur.done) { - const curReq = cur.value[1]; - if ((curReq.dependsOn === undefined || curReq.dependsOn.length === 0) && dependencyId !== curReq.id) { - return false; - } - if (curReq.dependsOn !== undefined && curReq.dependsOn.length !== 0) { - if (curReq.dependsOn.length === 1 && (curReq.id === dependencyId || curReq.dependsOn[0] !== dependencyId)) { - return false; - } - if (curReq.dependsOn.length > 1) { - return false; - } - } - cur = iterator.next(); - } - return true; - }; - if (requests.size === 0) { - const error = new Error("Empty requests map, Please provide at least one request."); - error.name = "Empty Requests Error"; - throw error; - } - return isParallel(requests) || isSerial(requests) || isSame(requests); - } - - /** - * @private - * @static - * @async - * Converts Request Object instance to a JSON - * @param {IsomorphicRequest} request - The IsomorphicRequest Object instance - * @returns A promise that resolves to JSON representation of a request - */ - private static async getRequestData(request: IsomorphicRequest): Promise { - const requestData: RequestData = { - url: "", - }; - const hasHttpRegex = new RegExp("^https?://"); - // Stripping off hostname, port and url scheme - requestData.url = hasHttpRegex.test(request.url) ? "/" + request.url.split(/.*?\/\/.*?\//)[1] : request.url; - requestData.method = request.method; - const headers = {}; - request.headers.forEach((value, key) => { - headers[key] = value; - }); - if (Object.keys(headers).length) { - requestData.headers = headers; - } - if (request.method === RequestMethod.PATCH || request.method === RequestMethod.POST || request.method === RequestMethod.PUT) { - requestData.body = await BatchRequestContent.getRequestBody(request); - } - /** - * TODO: Check any other property needs to be used from the Request object and add them - */ - return requestData; - } - - /** - * @private - * @static - * @async - * Gets the body of a Request object instance - * @param {IsomorphicRequest} request - The IsomorphicRequest object instance - * @returns The Promise that resolves to a body value of a Request - */ - private static async getRequestBody(request: IsomorphicRequest): Promise { - let bodyParsed = false; - let body; - try { - const cloneReq = request.clone(); - body = await cloneReq.json(); - bodyParsed = true; - } catch (e) { - //TODO- Handle empty catches - } - if (!bodyParsed) { - try { - if (typeof Blob !== "undefined") { - const blob = await request.blob(); - const reader = new FileReader(); - body = await new Promise((resolve) => { - reader.addEventListener( - "load", - () => { - const dataURL = reader.result as string; - /** - * Some valid dataURL schemes: - * 1. data:text/vnd-example+xyz;foo=bar;base64,R0lGODdh - * 2. data:text/plain;charset=UTF-8;page=21,the%20data:1234,5678 - * 3. data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg== - * 4. data:image/png,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg== - * 5. data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg== - * @see Syntax {@link https://en.wikipedia.org/wiki/Data_URI_scheme} for more - */ - const regex = new RegExp("^s*data:(.+?/.+?(;.+?=.+?)*)?(;base64)?,(.*)s*$"); - const segments = regex.exec(dataURL); - resolve(segments[4]); - }, - false, - ); - reader.readAsDataURL(blob); - }); - } else if (typeof Buffer !== "undefined") { - const buffer = await request.buffer(); - body = buffer.toString("base64"); - } - bodyParsed = true; - } catch (e) { - // TODO-Handle empty catches - } - } - return body; - } - - /** - * @public - * @constructor - * Constructs a BatchRequestContent instance - * @param {BatchRequestStep[]} [requests] - Array of requests value - * @returns An instance of a BatchRequestContent - */ - public constructor(requests?: BatchRequestStep[]) { - this.requests = new Map(); - if (typeof requests !== "undefined") { - const limit = BatchRequestContent.requestLimit; - if (requests.length > limit) { - const error = new Error(`Maximum requests limit exceeded, Max allowed number of requests are ${limit}`); - error.name = "Limit Exceeded Error"; - throw error; - } - for (const req of requests) { - this.addRequest(req); - } - } - } - - /** - * @public - * Adds a request to the batch request content - * @param {BatchRequestStep} request - The request value - * @returns The id of the added request - */ - public addRequest(request: BatchRequestStep): string { - const limit = BatchRequestContent.requestLimit; - if (request.id === "") { - const error = new Error(`Id for a request is empty, Please provide an unique id`); - error.name = "Empty Id For Request"; - throw error; - } - if (this.requests.size === limit) { - const error = new Error(`Maximum requests limit exceeded, Max allowed number of requests are ${limit}`); - error.name = "Limit Exceeded Error"; - throw error; - } - if (this.requests.has(request.id)) { - const error = new Error(`Adding request with duplicate id ${request.id}, Make the id of the requests unique`); - error.name = "Duplicate RequestId Error"; - throw error; - } - this.requests.set(request.id, request); - return request.id; - } - - /** - * @public - * Removes request from the batch payload and its dependencies from all dependents - * @param {string} requestId - The id of a request that needs to be removed - * @returns The boolean indicating removed status - */ - public removeRequest(requestId: string): boolean { - const deleteStatus = this.requests.delete(requestId); - const iterator = this.requests.entries(); - let cur = iterator.next(); - /** - * Removing dependencies where this request is present as a dependency - */ - while (!cur.done) { - const dependencies = cur.value[1].dependsOn; - if (typeof dependencies !== "undefined") { - const index = dependencies.indexOf(requestId); - if (index !== -1) { - dependencies.splice(index, 1); - } - if (dependencies.length === 0) { - delete cur.value[1].dependsOn; - } - } - cur = iterator.next(); - } - return deleteStatus; - } - - /** - * @public - * @async - * Serialize content from BatchRequestContent instance - * @returns The body content to make batch request - */ - public async getContent(): Promise { - const requests: BatchRequestData[] = []; - const requestBody: BatchRequestBody = { - requests, - }; - const iterator = this.requests.entries(); - let cur = iterator.next(); - if (cur.done) { - const error = new Error("No requests added yet, Please add at least one request."); - error.name = "Empty Payload"; - throw error; - } - if (!BatchRequestContent.validateDependencies(this.requests)) { - const error = new Error(`Invalid dependency found, Dependency should be: -1. Parallel - no individual request states a dependency in the dependsOn property. -2. Serial - all individual requests depend on the previous individual request. -3. Same - all individual requests that state a dependency in the dependsOn property, state the same dependency.`); - error.name = "Invalid Dependency"; - throw error; - } - while (!cur.done) { - const requestStep: BatchRequestStep = cur.value[1]; - const batchRequestData: BatchRequestData = (await BatchRequestContent.getRequestData(requestStep.request as IsomorphicRequest)) as BatchRequestData; - /** - * @see{@https://tools.ietf.org/html/rfc7578#section-4.4} - * TODO- Setting/Defaulting of content-type header to the correct value - * @see {@link https://developer.microsoft.com/en-us/graph/docs/concepts/json_batching#request-format} - */ - if (batchRequestData.body !== undefined && (batchRequestData.headers === undefined || batchRequestData.headers["content-type"] === undefined)) { - const error = new Error(`Content-type header is not mentioned for request #${requestStep.id}, For request having body, Content-type header should be mentioned`); - error.name = "Invalid Content-type header"; - throw error; - } - batchRequestData.id = requestStep.id; - if (requestStep.dependsOn !== undefined && requestStep.dependsOn.length > 0) { - batchRequestData.dependsOn = requestStep.dependsOn; - } - requests.push(batchRequestData); - cur = iterator.next(); - } - requestBody.requests = requests; - return requestBody; - } - - /** - * @public - * Adds a dependency for a given dependent request - * @param {string} dependentId - The id of the dependent request - * @param {string} [dependencyId] - The id of the dependency request, if not specified the preceding request will be considered as a dependency - * @returns Nothing - */ - public addDependency(dependentId: string, dependencyId?: string): void { - if (!this.requests.has(dependentId)) { - const error = new Error(`Dependent ${dependentId} does not exists, Please check the id`); - error.name = "Invalid Dependent"; - throw error; - } - if (typeof dependencyId !== "undefined" && !this.requests.has(dependencyId)) { - const error = new Error(`Dependency ${dependencyId} does not exists, Please check the id`); - error.name = "Invalid Dependency"; - throw error; - } - if (typeof dependencyId !== "undefined") { - const dependent = this.requests.get(dependentId); - if (dependent.dependsOn === undefined) { - dependent.dependsOn = []; - } - if (dependent.dependsOn.indexOf(dependencyId) !== -1) { - const error = new Error(`Dependency ${dependencyId} is already added for the request ${dependentId}`); - error.name = "Duplicate Dependency"; - throw error; - } - dependent.dependsOn.push(dependencyId); - } else { - const iterator = this.requests.entries(); - let prev; - let cur = iterator.next(); - while (!cur.done && cur.value[1].id !== dependentId) { - prev = cur; - cur = iterator.next(); - } - if (typeof prev !== "undefined") { - const dId = prev.value[0]; - if (cur.value[1].dependsOn === undefined) { - cur.value[1].dependsOn = []; - } - if (cur.value[1].dependsOn.indexOf(dId) !== -1) { - const error = new Error(`Dependency ${dId} is already added for the request ${dependentId}`); - error.name = "Duplicate Dependency"; - throw error; - } - cur.value[1].dependsOn.push(dId); - } else { - const error = new Error(`Can't add dependency ${dependencyId}, There is only a dependent request in the batch`); - error.name = "Invalid Dependency Addition"; - throw error; - } - } - } - - /** - * @public - * Removes a dependency for a given dependent request id - * @param {string} dependentId - The id of the dependent request - * @param {string} [dependencyId] - The id of the dependency request, if not specified will remove all the dependencies of that request - * @returns The boolean indicating removed status - */ - public removeDependency(dependentId: string, dependencyId?: string): boolean { - const request = this.requests.get(dependentId); - if (typeof request === "undefined" || request.dependsOn === undefined || request.dependsOn.length === 0) { - return false; - } - if (typeof dependencyId !== "undefined") { - const index = request.dependsOn.indexOf(dependencyId); - if (index === -1) { - return false; - } - request.dependsOn.splice(index, 1); - return true; - } else { - delete request.dependsOn; - return true; - } - } -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/content/BatchResponseContent.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/content/BatchResponseContent.ts deleted file mode 100644 index 1acbf02..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/content/BatchResponseContent.ts +++ /dev/null @@ -1,127 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ - -/** - * @module BatchResponseContent - */ - -/** - * @interface - * Signature represents key value pair object - */ -interface KeyValuePairObject { - [key: string]: any; -} - -/** - * @interface - * Signature representing Batch response body - * @property {KeyValuePairObject[]} responses - An array of key value pair representing response object for every request - * @property {string} [@odata.nextLink] - The nextLink value to get next set of responses in case of asynchronous batch requests - */ -export interface BatchResponseBody { - responses: KeyValuePairObject[]; - "@odata.nextLink"?: string; -} - -/** - * @class - * Class that handles BatchResponseContent - */ -export class BatchResponseContent { - /** - * To hold the responses - */ - private responses: Map; - - /** - * Holds the next link url - */ - private nextLink: string; - - /** - * @public - * @constructor - * Creates the BatchResponseContent instance - * @param {BatchResponseBody} response - The response body returned for batch request from server - * @returns An instance of a BatchResponseContent - */ - public constructor(response: BatchResponseBody) { - this.responses = new Map(); - this.update(response); - } - - /** - * @private - * Creates native Response object from the json representation of it. - * @param {KeyValuePairObject} responseJSON - The response json value - * @returns The Response Object instance - */ - private createResponseObject(responseJSON: KeyValuePairObject): Response { - const body = responseJSON.body; - const options: KeyValuePairObject = {}; - options.status = responseJSON.status; - if (responseJSON.statusText !== undefined) { - options.statusText = responseJSON.statusText; - } - options.headers = responseJSON.headers; - if (options.headers !== undefined && options.headers["Content-Type"] !== undefined) { - if (options.headers["Content-Type"].split(";")[0] === "application/json") { - const bodyString = JSON.stringify(body); - return new Response(bodyString, options); - } - } - return new Response(body, options); - } - - /** - * @public - * Updates the Batch response content instance with given responses. - * @param {BatchResponseBody} response - The response json representing batch response message - * @returns Nothing - */ - public update(response: BatchResponseBody): void { - this.nextLink = response["@odata.nextLink"]; - const responses = response.responses; - for (let i = 0, l = responses.length; i < l; i++) { - this.responses.set(responses[i].id, this.createResponseObject(responses[i])); - } - } - - /** - * @public - * To get the response of a request for a given request id - * @param {string} requestId - The request id value - * @returns The Response object instance for the particular request - */ - public getResponseById(requestId: string): Response { - return this.responses.get(requestId); - } - - /** - * @public - * To get all the responses of the batch request - * @returns The Map of id and Response objects - */ - public getResponses(): Map { - return this.responses; - } - - /** - * @public - * To get the iterator for the responses - * @returns The Iterable generator for the response objects - */ - public *getResponsesIterator(): IterableIterator<[string, Response]> { - const iterator = this.responses.entries(); - let cur = iterator.next(); - while (!cur.done) { - yield cur.value; - cur = iterator.next(); - } - } -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/index.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/index.ts deleted file mode 100644 index d250517..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/index.ts +++ /dev/null @@ -1,54 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ - -// eslint-disable-next-line @typescript-eslint/triple-slash-reference -/// - -export { BatchRequestBody, RequestData, BatchRequestContent, BatchRequestData, BatchRequestStep } from "./content/BatchRequestContent"; -export { BatchResponseBody, BatchResponseContent } from "./content/BatchResponseContent"; - -export { AuthenticationHandler } from "./middleware/AuthenticationHandler"; -export { HTTPMessageHandler } from "./middleware/HTTPMessageHandler"; -export { Middleware } from "./middleware/IMiddleware"; -export { RetryHandler } from "./middleware/RetryHandler"; -export { RedirectHandler } from "./middleware/RedirectHandler"; -export { TelemetryHandler } from "./middleware/TelemetryHandler"; -export { MiddlewareFactory } from "./middleware/MiddlewareFactory"; -export { AuthenticationHandlerOptions } from "./middleware/options/AuthenticationHandlerOptions"; -export { MiddlewareOptions } from "./middleware/options/IMiddlewareOptions"; -export { RetryHandlerOptions, ShouldRetry } from "./middleware/options/RetryHandlerOptions"; -export { RedirectHandlerOptions, ShouldRedirect } from "./middleware/options/RedirectHandlerOptions"; -export { FeatureUsageFlag, TelemetryHandlerOptions } from "./middleware/options/TelemetryHandlerOptions"; -export { ChaosHandlerOptions } from "./middleware/options/ChaosHandlerOptions"; -export { ChaosStrategy } from "./middleware/options/ChaosStrategy"; -export { ChaosHandler } from "./middleware/ChaosHandler"; - -export { FileObject, LargeFileUploadSession, LargeFileUploadTask, LargeFileUploadTaskOptions, SliceType } from "./tasks/LargeFileUploadTask"; -export { OneDriveLargeFileUploadOptions, OneDriveLargeFileUploadTask } from "./tasks/OneDriveLargeFileUploadTask"; -export { getValidRangeSize } from "./tasks/OneDriveLargeFileUploadTaskUtil"; -export { StreamUpload } from "./tasks/FileUploadTask/FileObjectClasses/StreamUpload"; -export { FileUpload } from "./tasks/FileUploadTask/FileObjectClasses/FileUpload"; -export { UploadResult } from "./tasks/FileUploadTask/UploadResult"; -export { UploadEventHandlers } from "./tasks/FileUploadTask/Interfaces/IUploadEventHandlers"; -export { Range } from "./tasks/FileUploadTask/Range"; -export { GraphRequestOptions, PageCollection, PageIterator, PageIteratorCallback } from "./tasks/PageIterator"; - -export { Client } from "./Client"; -export { CustomAuthenticationProvider } from "./CustomAuthenticationProvider"; -export { GraphError } from "./GraphError"; -export { GraphClientError } from "./GraphClientError"; -export { GraphRequest, URLComponents } from "./GraphRequest"; -export { AuthProvider } from "./IAuthProvider"; -export { AuthenticationProvider } from "./IAuthenticationProvider"; -export { AuthenticationProviderOptions } from "./IAuthenticationProviderOptions"; -export { AuthProviderCallback } from "./IAuthProviderCallback"; -export { ClientOptions } from "./IClientOptions"; -export { Context } from "./IContext"; -export { FetchOptions, NodeFetchInit } from "./IFetchOptions"; -export { GraphRequestCallback } from "./IGraphRequestCallback"; -export { Options } from "./IOptions"; -export { ResponseType } from "./ResponseType"; diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/middleware/AuthenticationHandler.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/middleware/AuthenticationHandler.ts deleted file mode 100644 index 3e25f7c..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/middleware/AuthenticationHandler.ts +++ /dev/null @@ -1,100 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ - -/** - * @module AuthenticationHandler - */ - -import { isCustomHost, isGraphURL } from "../GraphRequestUtil"; -import { AuthenticationProvider } from "../IAuthenticationProvider"; -import { AuthenticationProviderOptions } from "../IAuthenticationProviderOptions"; -import { Context } from "../IContext"; -import { Middleware } from "./IMiddleware"; -import { MiddlewareControl } from "./MiddlewareControl"; -import { appendRequestHeader } from "./MiddlewareUtil"; -import { AuthenticationHandlerOptions } from "./options/AuthenticationHandlerOptions"; -import { FeatureUsageFlag, TelemetryHandlerOptions } from "./options/TelemetryHandlerOptions"; - -/** - * @class - * @implements Middleware - * Class representing AuthenticationHandler - */ -export class AuthenticationHandler implements Middleware { - /** - * @private - * A member representing the authorization header name - */ - private static AUTHORIZATION_HEADER = "Authorization"; - - /** - * @private - * A member to hold an AuthenticationProvider instance - */ - private authenticationProvider: AuthenticationProvider; - - /** - * @private - * A member to hold next middleware in the middleware chain - */ - private nextMiddleware: Middleware; - - /** - * @public - * @constructor - * Creates an instance of AuthenticationHandler - * @param {AuthenticationProvider} authenticationProvider - The authentication provider for the authentication handler - */ - public constructor(authenticationProvider: AuthenticationProvider) { - this.authenticationProvider = authenticationProvider; - } - - /** - * @public - * @async - * To execute the current middleware - * @param {Context} context - The context object of the request - * @returns A Promise that resolves to nothing - */ - public async execute(context: Context): Promise { - const url = typeof context.request === "string" ? context.request : context.request.url; - if (isGraphURL(url) || (context.customHosts && isCustomHost(url, context.customHosts))) { - let options: AuthenticationHandlerOptions; - if (context.middlewareControl instanceof MiddlewareControl) { - options = context.middlewareControl.getMiddlewareOptions(AuthenticationHandlerOptions) as AuthenticationHandlerOptions; - } - let authenticationProvider: AuthenticationProvider; - let authenticationProviderOptions: AuthenticationProviderOptions; - if (options) { - authenticationProvider = options.authenticationProvider; - authenticationProviderOptions = options.authenticationProviderOptions; - } - if (!authenticationProvider) { - authenticationProvider = this.authenticationProvider; - } - const token: string = await authenticationProvider.getAccessToken(authenticationProviderOptions); - const bearerKey = `Bearer ${token}`; - appendRequestHeader(context.request, context.options, AuthenticationHandler.AUTHORIZATION_HEADER, bearerKey); - TelemetryHandlerOptions.updateFeatureUsageFlag(context, FeatureUsageFlag.AUTHENTICATION_HANDLER_ENABLED); - } else { - if (context.options.headers) { - delete context.options.headers[AuthenticationHandler.AUTHORIZATION_HEADER]; - } - } - return await this.nextMiddleware.execute(context); - } - - /** - * @public - * To set the next middleware in the chain - * @param {Middleware} next - The middleware instance - * @returns Nothing - */ - public setNext(next: Middleware): void { - this.nextMiddleware = next; - } -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/middleware/ChaosHandler.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/middleware/ChaosHandler.ts deleted file mode 100644 index 8f5d607..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/middleware/ChaosHandler.ts +++ /dev/null @@ -1,256 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ - -/** - * @module ChaosHandler - */ - -import { Context } from "../IContext"; -import { RequestMethod } from "../RequestMethod"; -import { Middleware } from "./IMiddleware"; -import { MiddlewareControl } from "./MiddlewareControl"; -import { generateUUID } from "./MiddlewareUtil"; -import { httpStatusCode, methodStatusCode } from "./options/ChaosHandlerData"; -import { ChaosHandlerOptions } from "./options/ChaosHandlerOptions"; -import { ChaosStrategy } from "./options/ChaosStrategy"; - -/** - * Class representing ChaosHandler - * @class - * Class - * @implements Middleware - */ -export class ChaosHandler implements Middleware { - /** - * A member holding options to customize the handler behavior - * - * @private - */ - private options: ChaosHandlerOptions; - - /** - * container for the manual map that has been written by the client - * - * @private - */ - private manualMap: Map>; - - /** - * @private - * A member to hold next middleware in the middleware chain - */ - private nextMiddleware: Middleware; - - /** - * @public - * @constructor - * To create an instance of Testing Handler - * @param {ChaosHandlerOptions} [options = new ChaosHandlerOptions()] - The testing handler options instance - * @param manualMap - The Map passed by user containing url-statusCode info - * @returns An instance of Testing Handler - */ - public constructor(options: ChaosHandlerOptions = new ChaosHandlerOptions(), manualMap?: Map>) { - this.options = options; - this.manualMap = manualMap; - } - - /** - * Generates responseHeader - * @private - * @param {ChaosHandlerOptions} chaosHandlerOptions - The ChaosHandlerOptions object - * @param {string} requestID - request id - * @param {string} requestDate - date of the request - * @returns response Header - */ - private createResponseHeaders(chaosHandlerOptions: ChaosHandlerOptions, requestID: string, requestDate: string) { - const responseHeader: Headers = chaosHandlerOptions.headers ? new Headers(chaosHandlerOptions.headers) : new Headers(); - responseHeader.append("Cache-Control", "no-store"); - responseHeader.append("request-id", requestID); - responseHeader.append("client-request-id", requestID); - responseHeader.append("x-ms-ags-diagnostic", ""); - responseHeader.append("Date", requestDate); - responseHeader.append("Strict-Transport-Security", ""); - - if (chaosHandlerOptions.statusCode === 429) { - // throttling case has to have a timeout scenario - responseHeader.append("retry-after", "3"); - } - - return responseHeader; - } - - /** - * Generates responseBody - * @private - * @param {ChaosHandlerOptions} chaosHandlerOptions - The ChaosHandlerOptions object - * @param {string} requestID - request id - * @param {string} requestDate - date of the request - * * @returns response body - */ - private createResponseBody(chaosHandlerOptions: ChaosHandlerOptions, requestID: string, requestDate: string) { - if (chaosHandlerOptions.responseBody) { - return chaosHandlerOptions.responseBody; - } - let body: any; - if (chaosHandlerOptions.statusCode >= 400) { - const codeMessage: string = httpStatusCode[chaosHandlerOptions.statusCode]; - const errMessage: string = chaosHandlerOptions.statusMessage; - - body = { - error: { - code: codeMessage, - message: errMessage, - innerError: { - "request-id": requestID, - date: requestDate, - }, - }, - }; - } else { - body = {}; - } - return body; - } - - /** - * creates a response - * @private - * @param {ChaosHandlerOptions} chaosHandlerOptions - The ChaosHandlerOptions object - * @param {Context} context - Contains the context of the request - */ - private createResponse(chaosHandlerOptions: ChaosHandlerOptions, context: Context) { - const requestURL = context.request as string; - const requestID = generateUUID(); - const requestDate = new Date(); - const responseHeader = this.createResponseHeaders(chaosHandlerOptions, requestID, requestDate.toString()); - const responseBody = this.createResponseBody(chaosHandlerOptions, requestID, requestDate.toString()); - const init: any = { url: requestURL, status: chaosHandlerOptions.statusCode, statusText: chaosHandlerOptions.statusMessage, headers: responseHeader }; - context.response = new Response(typeof responseBody === "string" ? responseBody : JSON.stringify(responseBody), init); - } - - /** - * Decides whether to send the request to the graph or not - * @private - * @param {ChaosHandlerOptions} chaosHandlerOptions - A ChaosHandlerOptions object - * @param {Context} context - Contains the context of the request - * @returns nothing - */ - private async sendRequest(chaosHandlerOptions: ChaosHandlerOptions, context: Context): Promise { - this.setStatusCode(chaosHandlerOptions, context.request as string, context.options.method as RequestMethod); - if ((chaosHandlerOptions.chaosStrategy === ChaosStrategy.MANUAL && !this.nextMiddleware) || Math.floor(Math.random() * 100) < chaosHandlerOptions.chaosPercentage) { - this.createResponse(chaosHandlerOptions, context); - } else if (this.nextMiddleware) { - await this.nextMiddleware.execute(context); - } - } - - /** - * Fetches a random status code for the RANDOM mode from the predefined array - * @private - * @param {string} requestMethod - the API method for the request - * @returns a random status code from a given set of status codes - */ - private getRandomStatusCode(requestMethod: RequestMethod): number { - const statusCodeArray: number[] = methodStatusCode[requestMethod] as number[]; - return statusCodeArray[Math.floor(Math.random() * statusCodeArray.length)]; - } - - /** - * To fetch the relative URL out of the complete URL using a predefined regex pattern - * @private - * @param {string} urlMethod - the complete URL - * @returns the string as relative URL - */ - private getRelativeURL(urlMethod: string): string { - const pattern = /https?:\/\/graph\.microsoft\.com\/[^/]+(.+?)(\?|$)/; - let relativeURL: string; - if (pattern.exec(urlMethod) !== null) { - relativeURL = pattern.exec(urlMethod)[1]; - } - return relativeURL; - } - - /** - * To fetch the status code from the map(if needed), then returns response by calling createResponse - * @private - * @param {ChaosHandlerOptions} chaosHandlerOptions - The ChaosHandlerOptions object - * @param {string} requestURL - the URL for the request - * @param {string} requestMethod - the API method for the request - */ - private setStatusCode(chaosHandlerOptions: ChaosHandlerOptions, requestURL: string, requestMethod: RequestMethod) { - if (chaosHandlerOptions.chaosStrategy === ChaosStrategy.MANUAL) { - if (chaosHandlerOptions.statusCode === undefined) { - // manual mode with no status code, can be a global level or request level without statusCode - const relativeURL: string = this.getRelativeURL(requestURL); - if (this.manualMap.get(relativeURL) !== undefined) { - // checking Manual Map for exact match - if (this.manualMap.get(relativeURL).get(requestMethod) !== undefined) { - chaosHandlerOptions.statusCode = this.manualMap.get(relativeURL).get(requestMethod); - } - // else statusCode would be undefined - } else { - // checking for regex match if exact match doesn't work - this.manualMap.forEach((value: Map, key: string) => { - const regexURL = new RegExp(key + "$"); - if (regexURL.test(relativeURL)) { - if (this.manualMap.get(key).get(requestMethod) !== undefined) { - chaosHandlerOptions.statusCode = this.manualMap.get(key).get(requestMethod); - } - // else statusCode would be undefined - } - }); - } - - // Case of redirection or request url not in map ---> statusCode would be undefined - } - } else { - // Handling the case of Random here - chaosHandlerOptions.statusCode = this.getRandomStatusCode(requestMethod); - // else statusCode would be undefined - } - } - - /** - * To get the options for execution of the middleware - * @private - * @param {Context} context - The context object - * @returns options for middleware execution - */ - private getOptions(context: Context): ChaosHandlerOptions { - let options: ChaosHandlerOptions; - if (context.middlewareControl instanceof MiddlewareControl) { - options = context.middlewareControl.getMiddlewareOptions(ChaosHandlerOptions) as ChaosHandlerOptions; - } - if (typeof options === "undefined") { - options = Object.assign(new ChaosHandlerOptions(), this.options); - } - - return options; - } - - /** - * To execute the current middleware - * @public - * @async - * @param {Context} context - The context object of the request - * @returns A Promise that resolves to nothing - */ - public async execute(context: Context): Promise { - const chaosHandlerOptions: ChaosHandlerOptions = this.getOptions(context); - return await this.sendRequest(chaosHandlerOptions, context); - } - - /** - * @public - * To set the next middleware in the chain - * @param {Middleware} next - The middleware instance - * @returns Nothing - */ - public setNext(next: Middleware): void { - this.nextMiddleware = next; - } -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/middleware/HTTPMessageHandler.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/middleware/HTTPMessageHandler.ts deleted file mode 100644 index cc6f504..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/middleware/HTTPMessageHandler.ts +++ /dev/null @@ -1,31 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ - -/** - * @module HTTPMessageHandler - */ - -import { Context } from "../IContext"; -import { Middleware } from "./IMiddleware"; - -/** - * @class - * @implements Middleware - * Class for HTTPMessageHandler - */ -export class HTTPMessageHandler implements Middleware { - /** - * @public - * @async - * To execute the current middleware - * @param {Context} context - The request context object - * @returns A promise that resolves to nothing - */ - public async execute(context: Context): Promise { - context.response = await fetch(context.request, context.options); - } -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/middleware/IMiddleware.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/middleware/IMiddleware.ts deleted file mode 100644 index 70dacc7..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/middleware/IMiddleware.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ - -import { Context } from "../IContext"; - -/** - * @interface - * @property {Function} execute - The method to execute the middleware - * @property {Function} [setNext] - A method to set the next middleware in the chain - */ -export interface Middleware { - execute: (context: Context) => Promise; - setNext?: (middleware: Middleware) => void; -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/middleware/MiddlewareControl.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/middleware/MiddlewareControl.ts deleted file mode 100644 index 93ab7ad..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/middleware/MiddlewareControl.ts +++ /dev/null @@ -1,64 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ - -/** - * @module MiddlewareControl - */ - -import { MiddlewareOptions } from "./options/IMiddlewareOptions"; - -/** - * @class - * Class representing MiddlewareControl - */ -export class MiddlewareControl { - /** - * @private - * A member holding map of MiddlewareOptions - */ - private middlewareOptions: Map; - - /** - * @public - * @constructor - * Creates an instance of MiddlewareControl - * @param {MiddlewareOptions[]} [middlewareOptions = []] - The array of middlewareOptions - * @returns The instance of MiddlewareControl - */ - public constructor(middlewareOptions: MiddlewareOptions[] = []) { - this.middlewareOptions = new Map(); - for (const option of middlewareOptions) { - const fn = option.constructor; - this.middlewareOptions.set(fn, option); - } - } - - /** - * @public - * To get the middleware option using the class of the option - * @param {Function} fn - The class of the strongly typed option class - * @returns The middleware option - * @example - * // if you wanted to return the middleware option associated with this class (MiddlewareControl) - * // call this function like this: - * getMiddlewareOptions(MiddlewareControl) - */ - public getMiddlewareOptions(fn: Function): MiddlewareOptions { - return this.middlewareOptions.get(fn); - } - - /** - * @public - * To set the middleware options using the class of the option - * @param {Function} fn - The class of the strongly typed option class - * @param {MiddlewareOptions} option - The strongly typed middleware option - * @returns nothing - */ - public setMiddlewareOptions(fn: Function, option: MiddlewareOptions): void { - this.middlewareOptions.set(fn, option); - } -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/middleware/MiddlewareFactory.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/middleware/MiddlewareFactory.ts deleted file mode 100644 index 98bb6f0..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/middleware/MiddlewareFactory.ts +++ /dev/null @@ -1,61 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ - -/** - * @module MiddlewareFactory - */ - -import { AuthenticationProvider } from "../IAuthenticationProvider"; -import { AuthenticationHandler } from "./AuthenticationHandler"; -import { HTTPMessageHandler } from "./HTTPMessageHandler"; -import { Middleware } from "./IMiddleware"; -import { RedirectHandlerOptions } from "./options/RedirectHandlerOptions"; -import { RetryHandlerOptions } from "./options/RetryHandlerOptions"; -import { RedirectHandler } from "./RedirectHandler"; -import { RetryHandler } from "./RetryHandler"; -import { TelemetryHandler } from "./TelemetryHandler"; - -/** - * @private - * To check whether the environment is node or not - * @returns A boolean representing the environment is node or not - */ -const isNodeEnvironment = (): boolean => { - return typeof process === "object" && typeof require === "function"; -}; - -/** - * @class - * Class containing function(s) related to the middleware pipelines. - */ -export class MiddlewareFactory { - /** - * @public - * @static - * Returns the default middleware chain an array with the middleware handlers - * @param {AuthenticationProvider} authProvider - The authentication provider instance - * @returns an array of the middleware handlers of the default middleware chain - */ - public static getDefaultMiddlewareChain(authProvider: AuthenticationProvider): Middleware[] { - const middleware: Middleware[] = []; - const authenticationHandler = new AuthenticationHandler(authProvider); - const retryHandler = new RetryHandler(new RetryHandlerOptions()); - const telemetryHandler = new TelemetryHandler(); - const httpMessageHandler = new HTTPMessageHandler(); - - middleware.push(authenticationHandler); - middleware.push(retryHandler); - if (isNodeEnvironment()) { - const redirectHandler = new RedirectHandler(new RedirectHandlerOptions()); - middleware.push(redirectHandler); - } - middleware.push(telemetryHandler); - middleware.push(httpMessageHandler); - - return middleware; - } -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/middleware/MiddlewareUtil.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/middleware/MiddlewareUtil.ts deleted file mode 100644 index b346037..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/middleware/MiddlewareUtil.ts +++ /dev/null @@ -1,144 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ - -/** - * @module MiddlewareUtil - */ - -import { FetchOptions } from "../IFetchOptions"; - -/** - * @constant - * To generate the UUID - * @returns The UUID string - */ -export const generateUUID = (): string => { - let uuid = ""; - for (let j = 0; j < 32; j++) { - if (j === 8 || j === 12 || j === 16 || j === 20) { - uuid += "-"; - } - uuid += Math.floor(Math.random() * 16).toString(16); - } - return uuid; -}; - -/** - * @constant - * To get the request header from the request - * @param {RequestInfo} request - The request object or the url string - * @param {FetchOptions|undefined} options - The request options object - * @param {string} key - The header key string - * @returns A header value for the given key from the request - */ -export const getRequestHeader = (request: RequestInfo, options: FetchOptions | undefined, key: string): string | null => { - let value: string = null; - if (typeof Request !== "undefined" && request instanceof Request) { - value = (request as Request).headers.get(key); - } else if (typeof options !== "undefined" && options.headers !== undefined) { - if (typeof Headers !== "undefined" && options.headers instanceof Headers) { - value = (options.headers as Headers).get(key); - } else if (options.headers instanceof Array) { - const headers = options.headers as string[][]; - for (let i = 0, l = headers.length; i < l; i++) { - if (headers[i][0] === key) { - value = headers[i][1]; - break; - } - } - } else if (options.headers[key] !== undefined) { - value = options.headers[key]; - } - } - return value; -}; - -/** - * @constant - * To set the header value to the given request - * @param {RequestInfo} request - The request object or the url string - * @param {FetchOptions|undefined} options - The request options object - * @param {string} key - The header key string - * @param {string } value - The header value string - * @returns Nothing - */ -export const setRequestHeader = (request: RequestInfo, options: FetchOptions | undefined, key: string, value: string): void => { - if (typeof Request !== "undefined" && request instanceof Request) { - (request as Request).headers.set(key, value); - } else if (typeof options !== "undefined") { - if (options.headers === undefined) { - options.headers = new Headers({ - [key]: value, - }); - } else { - if (typeof Headers !== "undefined" && options.headers instanceof Headers) { - (options.headers as Headers).set(key, value); - } else if (options.headers instanceof Array) { - let i = 0; - const l = options.headers.length; - for (; i < l; i++) { - const header = options.headers[i]; - if (header[0] === key) { - header[1] = value; - break; - } - } - if (i === l) { - (options.headers as string[][]).push([key, value]); - } - } else { - Object.assign(options.headers, { [key]: value }); - } - } - } -}; - -/** - * @constant - * To append the header value to the given request - * @param {RequestInfo} request - The request object or the url string - * @param {FetchOptions|undefined} options - The request options object - * @param {string} key - The header key string - * @param {string } value - The header value string - * @returns Nothing - */ -export const appendRequestHeader = (request: RequestInfo, options: FetchOptions | undefined, key: string, value: string): void => { - if (typeof Request !== "undefined" && request instanceof Request) { - (request as Request).headers.append(key, value); - } else if (typeof options !== "undefined") { - if (options.headers === undefined) { - options.headers = new Headers({ - [key]: value, - }); - } else { - if (typeof Headers !== "undefined" && options.headers instanceof Headers) { - (options.headers as Headers).append(key, value); - } else if (options.headers instanceof Array) { - (options.headers as string[][]).push([key, value]); - } else if (options.headers === undefined) { - options.headers = { [key]: value }; - } else if (options.headers[key] === undefined) { - options.headers[key] = value; - } else { - options.headers[key] += `, ${value}`; - } - } - } -}; - -/** - * @constant - * To clone the request with the new url - * @param {string} url - The new url string - * @param {Request} request - The request object - * @returns A promise that resolves to request object - */ -export const cloneRequestWithNewUrl = async (newUrl: string, request: Request): Promise => { - const body = request.headers.get("Content-Type") ? await request.blob() : await Promise.resolve(undefined); - const { method, headers, referrer, referrerPolicy, mode, credentials, cache, redirect, integrity, keepalive, signal } = request; - return new Request(newUrl, { method, headers, body, referrer, referrerPolicy, mode, credentials, cache, redirect, integrity, keepalive, signal }); -}; diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/middleware/RedirectHandler.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/middleware/RedirectHandler.ts deleted file mode 100644 index 911e408..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/middleware/RedirectHandler.ts +++ /dev/null @@ -1,237 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ - -/** - * @module RedirectHandler - */ - -import { Context } from "../IContext"; -import { RequestMethod } from "../RequestMethod"; -import { Middleware } from "./IMiddleware"; -import { MiddlewareControl } from "./MiddlewareControl"; -import { cloneRequestWithNewUrl } from "./MiddlewareUtil"; -import { RedirectHandlerOptions } from "./options/RedirectHandlerOptions"; -import { FeatureUsageFlag, TelemetryHandlerOptions } from "./options/TelemetryHandlerOptions"; - -/** - * @class - * Class - * @implements Middleware - * Class representing RedirectHandler - */ -export class RedirectHandler implements Middleware { - /** - * @private - * @static - * A member holding the array of redirect status codes - */ - private static REDIRECT_STATUS_CODES: number[] = [ - 301, // Moved Permanently - 302, // Found - 303, // See Other - 307, // Temporary Permanently - 308, // Moved Permanently - ]; - - /** - * @private - * @static - * A member holding SeeOther status code - */ - private static STATUS_CODE_SEE_OTHER = 303; - - /** - * @private - * @static - * A member holding the name of the location header - */ - private static LOCATION_HEADER = "Location"; - - /** - * @private - * @static - * A member representing the authorization header name - */ - private static AUTHORIZATION_HEADER = "Authorization"; - - /** - * @private - * @static - * A member holding the manual redirect value - */ - private static MANUAL_REDIRECT: RequestRedirect = "manual"; - - /** - * @private - * A member holding options to customize the handler behavior - */ - private options: RedirectHandlerOptions; - - /** - * @private - * A member to hold next middleware in the middleware chain - */ - private nextMiddleware: Middleware; - - /** - * @public - * @constructor - * To create an instance of RedirectHandler - * @param {RedirectHandlerOptions} [options = new RedirectHandlerOptions()] - The redirect handler options instance - * @returns An instance of RedirectHandler - */ - - public constructor(options: RedirectHandlerOptions = new RedirectHandlerOptions()) { - this.options = options; - } - - /** - * @private - * To check whether the response has the redirect status code or not - * @param {Response} response - The response object - * @returns A boolean representing whether the response contains the redirect status code or not - */ - private isRedirect(response: Response): boolean { - return RedirectHandler.REDIRECT_STATUS_CODES.indexOf(response.status) !== -1; - } - - /** - * @private - * To check whether the response has location header or not - * @param {Response} response - The response object - * @returns A boolean representing the whether the response has location header or not - */ - private hasLocationHeader(response: Response): boolean { - return response.headers.has(RedirectHandler.LOCATION_HEADER); - } - - /** - * @private - * To get the redirect url from location header in response object - * @param {Response} response - The response object - * @returns A redirect url from location header - */ - private getLocationHeader(response: Response): string { - return response.headers.get(RedirectHandler.LOCATION_HEADER); - } - - /** - * @private - * To check whether the given url is a relative url or not - * @param {string} url - The url string value - * @returns A boolean representing whether the given url is a relative url or not - */ - private isRelativeURL(url: string): boolean { - return url.indexOf("://") === -1; - } - - /** - * @private - * To check whether the authorization header in the request should be dropped for consequent redirected requests - * @param {string} requestUrl - The request url value - * @param {string} redirectUrl - The redirect url value - * @returns A boolean representing whether the authorization header in the request should be dropped for consequent redirected requests - */ - private shouldDropAuthorizationHeader(requestUrl: string, redirectUrl: string): boolean { - const schemeHostRegex = /^[A-Za-z].+?:\/\/.+?(?=\/|$)/; - const requestMatches: string[] = schemeHostRegex.exec(requestUrl); - let requestAuthority: string; - let redirectAuthority: string; - if (requestMatches !== null) { - requestAuthority = requestMatches[0]; - } - const redirectMatches: string[] = schemeHostRegex.exec(redirectUrl); - if (redirectMatches !== null) { - redirectAuthority = redirectMatches[0]; - } - return typeof requestAuthority !== "undefined" && typeof redirectAuthority !== "undefined" && requestAuthority !== redirectAuthority; - } - - /** - * @private - * @async - * To update a request url with the redirect url - * @param {string} redirectUrl - The redirect url value - * @param {Context} context - The context object value - * @returns Nothing - */ - private async updateRequestUrl(redirectUrl: string, context: Context): Promise { - context.request = typeof context.request === "string" ? redirectUrl : await cloneRequestWithNewUrl(redirectUrl, context.request as Request); - } - - /** - * @private - * To get the options for execution of the middleware - * @param {Context} context - The context object - * @returns A options for middleware execution - */ - private getOptions(context: Context): RedirectHandlerOptions { - let options: RedirectHandlerOptions; - if (context.middlewareControl instanceof MiddlewareControl) { - options = context.middlewareControl.getMiddlewareOptions(RedirectHandlerOptions) as RedirectHandlerOptions; - } - if (typeof options === "undefined") { - options = Object.assign(new RedirectHandlerOptions(), this.options); - } - return options; - } - - /** - * @private - * @async - * To execute the next middleware and to handle in case of redirect response returned by the server - * @param {Context} context - The context object - * @param {number} redirectCount - The redirect count value - * @param {RedirectHandlerOptions} options - The redirect handler options instance - * @returns A promise that resolves to nothing - */ - private async executeWithRedirect(context: Context, redirectCount: number, options: RedirectHandlerOptions): Promise { - await this.nextMiddleware.execute(context); - const response = context.response; - if (redirectCount < options.maxRedirects && this.isRedirect(response) && this.hasLocationHeader(response) && options.shouldRedirect(response)) { - ++redirectCount; - if (response.status === RedirectHandler.STATUS_CODE_SEE_OTHER) { - context.options.method = RequestMethod.GET; - delete context.options.body; - } else { - const redirectUrl: string = this.getLocationHeader(response); - if (!this.isRelativeURL(redirectUrl) && this.shouldDropAuthorizationHeader(response.url, redirectUrl)) { - delete context.options.headers[RedirectHandler.AUTHORIZATION_HEADER]; - } - await this.updateRequestUrl(redirectUrl, context); - } - await this.executeWithRedirect(context, redirectCount, options); - } else { - return; - } - } - - /** - * @public - * @async - * To execute the current middleware - * @param {Context} context - The context object of the request - * @returns A Promise that resolves to nothing - */ - public async execute(context: Context): Promise { - const redirectCount = 0; - const options = this.getOptions(context); - context.options.redirect = RedirectHandler.MANUAL_REDIRECT; - TelemetryHandlerOptions.updateFeatureUsageFlag(context, FeatureUsageFlag.REDIRECT_HANDLER_ENABLED); - return await this.executeWithRedirect(context, redirectCount, options); - } - - /** - * @public - * To set the next middleware in the chain - * @param {Middleware} next - The middleware instance - * @returns Nothing - */ - public setNext(next: Middleware): void { - this.nextMiddleware = next; - } -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/middleware/RetryHandler.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/middleware/RetryHandler.ts deleted file mode 100644 index 36836fe..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/middleware/RetryHandler.ts +++ /dev/null @@ -1,208 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ - -/** - * @module RetryHandler - */ - -import { Context } from "../IContext"; -import { FetchOptions } from "../IFetchOptions"; -import { RequestMethod } from "../RequestMethod"; -import { Middleware } from "./IMiddleware"; -import { MiddlewareControl } from "./MiddlewareControl"; -import { getRequestHeader, setRequestHeader } from "./MiddlewareUtil"; -import { RetryHandlerOptions } from "./options/RetryHandlerOptions"; -import { FeatureUsageFlag, TelemetryHandlerOptions } from "./options/TelemetryHandlerOptions"; - -/** - * @class - * @implements Middleware - * Class for RetryHandler - */ -export class RetryHandler implements Middleware { - /** - * @private - * @static - * A list of status codes that needs to be retried - */ - private static RETRY_STATUS_CODES: number[] = [ - 429, // Too many requests - 503, // Service unavailable - 504, // Gateway timeout - ]; - - /** - * @private - * @static - * A member holding the name of retry attempt header - */ - private static RETRY_ATTEMPT_HEADER = "Retry-Attempt"; - - /** - * @private - * @static - * A member holding the name of retry after header - */ - private static RETRY_AFTER_HEADER = "Retry-After"; - - /** - * @private - * A member to hold next middleware in the middleware chain - */ - private nextMiddleware: Middleware; - - /** - * @private - * A member holding the retry handler options - */ - private options: RetryHandlerOptions; - - /** - * @public - * @constructor - * To create an instance of RetryHandler - * @param {RetryHandlerOptions} [options = new RetryHandlerOptions()] - The retry handler options value - * @returns An instance of RetryHandler - */ - public constructor(options: RetryHandlerOptions = new RetryHandlerOptions()) { - this.options = options; - } - - /** - * - * @private - * To check whether the response has the retry status code - * @param {Response} response - The response object - * @returns Whether the response has retry status code or not - */ - private isRetry(response: Response): boolean { - return RetryHandler.RETRY_STATUS_CODES.indexOf(response.status) !== -1; - } - - /** - * @private - * To check whether the payload is buffered or not - * @param {RequestInfo} request - The url string or the request object value - * @param {FetchOptions} options - The options of a request - * @returns Whether the payload is buffered or not - */ - private isBuffered(request: RequestInfo, options: FetchOptions | undefined): boolean { - const method = typeof request === "string" ? options.method : (request as Request).method; - const isPutPatchOrPost: boolean = method === RequestMethod.PUT || method === RequestMethod.PATCH || method === RequestMethod.POST; - if (isPutPatchOrPost) { - const isStream = getRequestHeader(request, options, "Content-Type") === "application/octet-stream"; - if (isStream) { - return false; - } - } - return true; - } - - /** - * @private - * To get the delay for a retry - * @param {Response} response - The response object - * @param {number} retryAttempts - The current attempt count - * @param {number} delay - The delay value in seconds - * @returns A delay for a retry - */ - private getDelay(response: Response, retryAttempts: number, delay: number): number { - const getRandomness = () => Number(Math.random().toFixed(3)); - const retryAfter = response.headers !== undefined ? response.headers.get(RetryHandler.RETRY_AFTER_HEADER) : null; - let newDelay: number; - if (retryAfter !== null) { - if (Number.isNaN(Number(retryAfter))) { - newDelay = Math.round((new Date(retryAfter).getTime() - Date.now()) / 1000); - } else { - newDelay = Number(retryAfter); - } - } else { - // Adding randomness to avoid retrying at a same - newDelay = retryAttempts >= 2 ? this.getExponentialBackOffTime(retryAttempts) + delay + getRandomness() : delay + getRandomness(); - } - return Math.min(newDelay, this.options.getMaxDelay() + getRandomness()); - } - - /** - * @private - * To get an exponential back off value - * @param {number} attempts - The current attempt count - * @returns An exponential back off value - */ - private getExponentialBackOffTime(attempts: number): number { - return Math.round((1 / 2) * (2 ** attempts - 1)); - } - - /** - * @private - * @async - * To add delay for the execution - * @param {number} delaySeconds - The delay value in seconds - * @returns Nothing - */ - private async sleep(delaySeconds: number): Promise { - const delayMilliseconds = delaySeconds * 1000; - return new Promise((resolve) => setTimeout(resolve, delayMilliseconds)); - } - - private getOptions(context: Context): RetryHandlerOptions { - let options: RetryHandlerOptions; - if (context.middlewareControl instanceof MiddlewareControl) { - options = context.middlewareControl.getMiddlewareOptions(this.options.constructor) as RetryHandlerOptions; - } - if (typeof options === "undefined") { - options = Object.assign(new RetryHandlerOptions(), this.options); - } - return options; - } - - /** - * @private - * @async - * To execute the middleware with retries - * @param {Context} context - The context object - * @param {number} retryAttempts - The current attempt count - * @param {RetryHandlerOptions} options - The retry middleware options instance - * @returns A Promise that resolves to nothing - */ - private async executeWithRetry(context: Context, retryAttempts: number, options: RetryHandlerOptions): Promise { - await this.nextMiddleware.execute(context); - if (retryAttempts < options.maxRetries && this.isRetry(context.response) && this.isBuffered(context.request, context.options) && options.shouldRetry(options.delay, retryAttempts, context.request, context.options, context.response)) { - ++retryAttempts; - setRequestHeader(context.request, context.options, RetryHandler.RETRY_ATTEMPT_HEADER, retryAttempts.toString()); - const delay = this.getDelay(context.response, retryAttempts, options.delay); - await this.sleep(delay); - return await this.executeWithRetry(context, retryAttempts, options); - } else { - return; - } - } - - /** - * @public - * @async - * To execute the current middleware - * @param {Context} context - The context object of the request - * @returns A Promise that resolves to nothing - */ - public async execute(context: Context): Promise { - const retryAttempts = 0; - const options: RetryHandlerOptions = this.getOptions(context); - TelemetryHandlerOptions.updateFeatureUsageFlag(context, FeatureUsageFlag.RETRY_HANDLER_ENABLED); - return await this.executeWithRetry(context, retryAttempts, options); - } - - /** - * @public - * To set the next middleware in the chain - * @param {Middleware} next - The middleware instance - * @returns Nothing - */ - public setNext(next: Middleware): void { - this.nextMiddleware = next; - } -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/middleware/TelemetryHandler.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/middleware/TelemetryHandler.ts deleted file mode 100644 index 7727843..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/middleware/TelemetryHandler.ts +++ /dev/null @@ -1,103 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ - -/** - * @module TelemetryHandler - */ -import { isCustomHost, isGraphURL } from "../GraphRequestUtil"; -import { Context } from "../IContext"; -import { PACKAGE_VERSION } from "../Version"; -import { Middleware } from "./IMiddleware"; -import { MiddlewareControl } from "./MiddlewareControl"; -import { appendRequestHeader, generateUUID, getRequestHeader, setRequestHeader } from "./MiddlewareUtil"; -import { TelemetryHandlerOptions } from "./options/TelemetryHandlerOptions"; - -/** - * @class - * @implements Middleware - * Class for TelemetryHandler - */ -export class TelemetryHandler implements Middleware { - /** - * @private - * @static - * A member holding the name of the client request id header - */ - private static CLIENT_REQUEST_ID_HEADER = "client-request-id"; - - /** - * @private - * @static - * A member holding the name of the sdk version header - */ - private static SDK_VERSION_HEADER = "SdkVersion"; - - /** - * @private - * @static - * A member holding the language prefix for the sdk version header value - */ - private static PRODUCT_NAME = "graph-js"; - - /** - * @private - * @static - * A member holding the key for the feature usage metrics - */ - private static FEATURE_USAGE_STRING = "featureUsage"; - - /** - * @private - * A member to hold next middleware in the middleware chain - */ - private nextMiddleware: Middleware; - - /** - * @public - * @async - * To execute the current middleware - * @param {Context} context - The context object of the request - * @returns A Promise that resolves to nothing - */ - public async execute(context: Context): Promise { - const url = typeof context.request === "string" ? context.request : context.request.url; - if (isGraphURL(url) || (context.customHosts && isCustomHost(url, context.customHosts))) { - // Add telemetry only if the request url is a Graph URL. - // Errors are reported as in issue #265 if headers are present when redirecting to a non Graph URL - let clientRequestId: string = getRequestHeader(context.request, context.options, TelemetryHandler.CLIENT_REQUEST_ID_HEADER); - if (!clientRequestId) { - clientRequestId = generateUUID(); - setRequestHeader(context.request, context.options, TelemetryHandler.CLIENT_REQUEST_ID_HEADER, clientRequestId); - } - let sdkVersionValue = `${TelemetryHandler.PRODUCT_NAME}/${PACKAGE_VERSION}`; - let options: TelemetryHandlerOptions; - if (context.middlewareControl instanceof MiddlewareControl) { - options = context.middlewareControl.getMiddlewareOptions(TelemetryHandlerOptions) as TelemetryHandlerOptions; - } - if (options) { - const featureUsage: string = options.getFeatureUsage(); - sdkVersionValue += ` (${TelemetryHandler.FEATURE_USAGE_STRING}=${featureUsage})`; - } - appendRequestHeader(context.request, context.options, TelemetryHandler.SDK_VERSION_HEADER, sdkVersionValue); - } else { - // Remove telemetry headers if present during redirection. - delete context.options.headers[TelemetryHandler.CLIENT_REQUEST_ID_HEADER]; - delete context.options.headers[TelemetryHandler.SDK_VERSION_HEADER]; - } - return await this.nextMiddleware.execute(context); - } - - /** - * @public - * To set the next middleware in the chain - * @param {Middleware} next - The middleware instance - * @returns Nothing - */ - public setNext(next: Middleware): void { - this.nextMiddleware = next; - } -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/middleware/options/AuthenticationHandlerOptions.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/middleware/options/AuthenticationHandlerOptions.ts deleted file mode 100644 index 547b326..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/middleware/options/AuthenticationHandlerOptions.ts +++ /dev/null @@ -1,46 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ - -/** - * @module AuthenticationHandlerOptions - */ - -import { AuthenticationProvider } from "../../IAuthenticationProvider"; -import { AuthenticationProviderOptions } from "../../IAuthenticationProviderOptions"; -import { MiddlewareOptions } from "./IMiddlewareOptions"; - -/** - * @class - * @implements MiddlewareOptions - * Class representing AuthenticationHandlerOptions - */ -export class AuthenticationHandlerOptions implements MiddlewareOptions { - /** - * @public - * A member holding an instance of an authentication provider - */ - public authenticationProvider: AuthenticationProvider; - - /** - * @public - * A member holding an instance of authentication provider options - */ - public authenticationProviderOptions: AuthenticationProviderOptions; - - /** - * @public - * @constructor - * To create an instance of AuthenticationHandlerOptions - * @param {AuthenticationProvider} [authenticationProvider] - The authentication provider instance - * @param {AuthenticationProviderOptions} [authenticationProviderOptions] - The authentication provider options instance - * @returns An instance of AuthenticationHandlerOptions - */ - public constructor(authenticationProvider?: AuthenticationProvider, authenticationProviderOptions?: AuthenticationProviderOptions) { - this.authenticationProvider = authenticationProvider; - this.authenticationProviderOptions = authenticationProviderOptions; - } -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/middleware/options/ChaosHandlerData.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/middleware/options/ChaosHandlerData.ts deleted file mode 100644 index 2b3a592..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/middleware/options/ChaosHandlerData.ts +++ /dev/null @@ -1,88 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ - -/** - * @module ChaosHandlerData - */ - -/** - * Contains RequestMethod to corresponding array of possible status codes, used for Random mode - */ -export const methodStatusCode: { [key: string]: number[] } = { - GET: [429, 500, 502, 503, 504], - POST: [429, 500, 502, 503, 504, 507], - PUT: [429, 500, 502, 503, 504, 507], - PATCH: [429, 500, 502, 503, 504], - DELETE: [429, 500, 502, 503, 504, 507], -}; - -/** - * Contains statusCode to statusMessage map - */ -export const httpStatusCode: { [key: number]: string } = { - 100: "Continue", - 101: "Switching Protocols", - 102: "Processing", - 103: "Early Hints", - 200: "OK", - 201: "Created", - 202: "Accepted", - 203: "Non-Authoritative Information", - 204: "No Content", - 205: "Reset Content", - 206: "Partial Content", - 207: "Multi-Status", - 208: "Already Reported", - 226: "IM Used", - 300: "Multiple Choices", - 301: "Moved Permanently", - 302: "Found", - 303: "See Other", - 304: "Not Modified", - 305: "Use Proxy", - 307: "Temporary Redirect", - 308: "Permanent Redirect", - 400: "Bad Request", - 401: "Unauthorized", - 402: "Payment Required", - 403: "Forbidden", - 404: "Not Found", - 405: "Method Not Allowed", - 406: "Not Acceptable", - 407: "Proxy Authentication Required", - 408: "Request Timeout", - 409: "Conflict", - 410: "Gone", - 411: "Length Required", - 412: "Precondition Failed", - 413: "Payload Too Large", - 414: "URI Too Long", - 415: "Unsupported Media Type", - 416: "Range Not Satisfiable", - 417: "Expectation Failed", - 421: "Misdirected Request", - 422: "Unprocessable Entity", - 423: "Locked", - 424: "Failed Dependency", - 425: "Too Early", - 426: "Upgrade Required", - 428: "Precondition Required", - 429: "Too Many Requests", - 431: "Request Header Fields Too Large", - 451: "Unavailable For Legal Reasons", - 500: "Internal Server Error", - 501: "Not Implemented", - 502: "Bad Gateway", - 503: "Service Unavailable", - 504: "Gateway Timeout", - 505: "HTTP Version Not Supported", - 506: "Variant Also Negotiates", - 507: "Insufficient Storage", - 508: "Loop Detected", - 510: "Not Extended", - 511: "Network Authentication Required", -}; diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/middleware/options/ChaosHandlerOptions.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/middleware/options/ChaosHandlerOptions.ts deleted file mode 100644 index 39fcd1c..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/middleware/options/ChaosHandlerOptions.ts +++ /dev/null @@ -1,87 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ - -/** - * @module ChaosHandlerOptions - */ - -import { ChaosStrategy } from "./ChaosStrategy"; -import { MiddlewareOptions } from "./IMiddlewareOptions"; - -/** - * Class representing ChaosHandlerOptions - * @class - * Class - * @implements MiddlewareOptions - */ -export class ChaosHandlerOptions implements MiddlewareOptions { - /** - * Specifies the startegy used for the Testing Handler -> RANDOM/MANUAL - * - * @public - */ - public chaosStrategy: ChaosStrategy; - - /** - * Status code to be returned in the response - * - * @public - */ - public statusCode: number; - - /** - * The Message to be returned in the response - * - * @public - */ - public statusMessage: string; - - /** - * The percentage of randomness/chaos in the handler - * - * Setting the default value as 10% - * @public - */ - public chaosPercentage: number; - - /** - * The response body to be returned in the response - * - * @public - */ - public responseBody: any; - - /** - * The response headers to be returned in the response - * - * @public - */ - public headers: Headers; - - /** - * @public - * @constructor - * To create an instance of Testing Handler Options - * @param {ChaosStrategy} chaosStrategy - Specifies the startegy used for the Testing Handler -> RAMDOM/MANUAL - * @param {string} statusMessage - The Message to be returned in the response - * @param {number?} statusCode - The statusCode to be returned in the response - * @param {number?} chaosPercentage - The percentage of randomness/chaos in the handler - * @param {any?} responseBody - The response body to be returned in the response - * @returns An instance of ChaosHandlerOptions - */ - public constructor(chaosStrategy: ChaosStrategy = ChaosStrategy.RANDOM, statusMessage = "Some error Happened", statusCode?: number, chaosPercentage?: number, responseBody?: any, headers?: Headers) { - this.chaosStrategy = chaosStrategy; - this.statusCode = statusCode; - this.statusMessage = statusMessage; - this.chaosPercentage = chaosPercentage !== undefined ? chaosPercentage : 10; - this.responseBody = responseBody; - this.headers = headers; - if (this.chaosPercentage > 100) { - throw new Error("Error Pecentage can not be more than 100"); - } - } -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/middleware/options/ChaosStrategy.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/middleware/options/ChaosStrategy.ts deleted file mode 100644 index 5450f86..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/middleware/options/ChaosStrategy.ts +++ /dev/null @@ -1,19 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ - -/** - * @module ChaosStrategy - */ - -/** - * Strategy used for Testing Handler - * @enum - */ -export enum ChaosStrategy { - MANUAL, - RANDOM, -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/middleware/options/IMiddlewareOptions.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/middleware/options/IMiddlewareOptions.ts deleted file mode 100644 index ebbf308..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/middleware/options/IMiddlewareOptions.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ - -/** - * @interface - * Signature representing the middleware options - */ - -// eslint-disable-next-line @typescript-eslint/no-empty-interface -export interface MiddlewareOptions {} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/middleware/options/RedirectHandlerOptions.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/middleware/options/RedirectHandlerOptions.ts deleted file mode 100644 index dd3df2e..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/middleware/options/RedirectHandlerOptions.ts +++ /dev/null @@ -1,80 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ - -/** - * @module RedirectHandlerOptions - */ - -import { MiddlewareOptions } from "./IMiddlewareOptions"; - -/** - * @type - * A type declaration for shouldRetry callback - */ -export type ShouldRedirect = (response: Response) => boolean; - -/** - * @class - * @implements MiddlewareOptions - * A class representing RedirectHandlerOptions - */ -export class RedirectHandlerOptions implements MiddlewareOptions { - /** - * @private - * @static - * A member holding default max redirects value - */ - private static DEFAULT_MAX_REDIRECTS = 5; - - /** - * @private - * @static - * A member holding maximum max redirects value - */ - private static MAX_MAX_REDIRECTS = 20; - - /** - * @public - * A member holding max redirects value - */ - public maxRedirects: number; - - /** - * @public - * A member holding shouldRedirect callback - */ - public shouldRedirect: ShouldRedirect; - - /** - * @private - * A member holding default shouldRedirect callback - */ - private static defaultShouldRedirect: ShouldRedirect = () => true; - - /** - * @public - * @constructor - * To create an instance of RedirectHandlerOptions - * @param {number} [maxRedirects = RedirectHandlerOptions.DEFAULT_MAX_REDIRECTS] - The max redirects value - * @param {ShouldRedirect} [shouldRedirect = RedirectHandlerOptions.DEFAULT_SHOULD_RETRY] - The should redirect callback - * @returns An instance of RedirectHandlerOptions - */ - public constructor(maxRedirects: number = RedirectHandlerOptions.DEFAULT_MAX_REDIRECTS, shouldRedirect: ShouldRedirect = RedirectHandlerOptions.defaultShouldRedirect) { - if (maxRedirects > RedirectHandlerOptions.MAX_MAX_REDIRECTS) { - const error = new Error(`MaxRedirects should not be more than ${RedirectHandlerOptions.MAX_MAX_REDIRECTS}`); - error.name = "MaxLimitExceeded"; - throw error; - } - if (maxRedirects < 0) { - const error = new Error(`MaxRedirects should not be negative`); - error.name = "MinExpectationNotMet"; - throw error; - } - this.maxRedirects = maxRedirects; - this.shouldRedirect = shouldRedirect; - } -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/middleware/options/RetryHandlerOptions.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/middleware/options/RetryHandlerOptions.ts deleted file mode 100644 index 8191d16..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/middleware/options/RetryHandlerOptions.ts +++ /dev/null @@ -1,128 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ - -/** - * @module RetryHandlerOptions - */ - -import { FetchOptions } from "../../IFetchOptions"; -import { MiddlewareOptions } from "./IMiddlewareOptions"; - -/** - * @type - * A type declaration for shouldRetry callback - */ -export type ShouldRetry = (delay: number, attempt: number, request: RequestInfo, options: FetchOptions | undefined, response: Response) => boolean; - -/** - * @class - * @implements MiddlewareOptions - * Class for RetryHandlerOptions - */ - -export class RetryHandlerOptions implements MiddlewareOptions { - /** - * @private - * @static - * A member holding default delay value in seconds - */ - private static DEFAULT_DELAY = 3; - - /** - * @private - * @static - * A member holding default maxRetries value - */ - private static DEFAULT_MAX_RETRIES = 3; - - /** - * @private - * @static - * A member holding maximum delay value in seconds - */ - private static MAX_DELAY = 180; - - /** - * @private - * @static - * A member holding maximum maxRetries value - */ - private static MAX_MAX_RETRIES = 10; - - /** - * @public - * A member holding delay value in seconds - */ - public delay: number; - - /** - * @public - * A member holding maxRetries value - */ - public maxRetries: number; - - /** - * @public - * A member holding shouldRetry callback - */ - public shouldRetry: ShouldRetry; - - /** - * @private - * A member holding default shouldRetry callback - */ - private static defaultShouldRetry: ShouldRetry = () => true; - - /** - * @public - * @constructor - * To create an instance of RetryHandlerOptions - * @param {number} [delay = RetryHandlerOptions.DEFAULT_DELAY] - The delay value in seconds - * @param {number} [maxRetries = RetryHandlerOptions.DEFAULT_MAX_RETRIES] - The maxRetries value - * @param {ShouldRetry} [shouldRetry = RetryHandlerOptions.DEFAULT_SHOULD_RETRY] - The shouldRetry callback function - * @returns An instance of RetryHandlerOptions - */ - public constructor(delay: number = RetryHandlerOptions.DEFAULT_DELAY, maxRetries: number = RetryHandlerOptions.DEFAULT_MAX_RETRIES, shouldRetry: ShouldRetry = RetryHandlerOptions.defaultShouldRetry) { - if (delay > RetryHandlerOptions.MAX_DELAY && maxRetries > RetryHandlerOptions.MAX_MAX_RETRIES) { - const error = new Error(`Delay and MaxRetries should not be more than ${RetryHandlerOptions.MAX_DELAY} and ${RetryHandlerOptions.MAX_MAX_RETRIES}`); - error.name = "MaxLimitExceeded"; - throw error; - } else if (delay > RetryHandlerOptions.MAX_DELAY) { - const error = new Error(`Delay should not be more than ${RetryHandlerOptions.MAX_DELAY}`); - error.name = "MaxLimitExceeded"; - throw error; - } else if (maxRetries > RetryHandlerOptions.MAX_MAX_RETRIES) { - const error = new Error(`MaxRetries should not be more than ${RetryHandlerOptions.MAX_MAX_RETRIES}`); - error.name = "MaxLimitExceeded"; - throw error; - } else if (delay < 0 && maxRetries < 0) { - const error = new Error(`Delay and MaxRetries should not be negative`); - error.name = "MinExpectationNotMet"; - throw error; - } else if (delay < 0) { - const error = new Error(`Delay should not be negative`); - error.name = "MinExpectationNotMet"; - throw error; - } else if (maxRetries < 0) { - const error = new Error(`MaxRetries should not be negative`); - error.name = "MinExpectationNotMet"; - throw error; - } - this.delay = Math.min(delay, RetryHandlerOptions.MAX_DELAY); - this.maxRetries = Math.min(maxRetries, RetryHandlerOptions.MAX_MAX_RETRIES); - this.shouldRetry = shouldRetry; - } - - /** - * @public - * To get the maximum delay - * @returns A maximum delay - */ - public getMaxDelay(): number { - return RetryHandlerOptions.MAX_DELAY; - } -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/middleware/options/TelemetryHandlerOptions.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/middleware/options/TelemetryHandlerOptions.ts deleted file mode 100644 index f268218..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/middleware/options/TelemetryHandlerOptions.ts +++ /dev/null @@ -1,86 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ - -/** - * @module TelemetryHandlerOptions - */ - -import { Context } from "../../IContext"; -import { MiddlewareControl } from "../MiddlewareControl"; -import { MiddlewareOptions } from "./IMiddlewareOptions"; - -/** - * @enum - * @property {number} NONE - The hexadecimal flag value for nothing enabled - * @property {number} REDIRECT_HANDLER_ENABLED - The hexadecimal flag value for redirect handler enabled - * @property {number} RETRY_HANDLER_ENABLED - The hexadecimal flag value for retry handler enabled - * @property {number} AUTHENTICATION_HANDLER_ENABLED - The hexadecimal flag value for the authentication handler enabled - */ - -export enum FeatureUsageFlag { - /* eslint-disable @typescript-eslint/naming-convention */ - NONE = 0x0, - REDIRECT_HANDLER_ENABLED = 0x1, - RETRY_HANDLER_ENABLED = 0x2, - AUTHENTICATION_HANDLER_ENABLED = 0x4, - /* eslint-enable @typescript-eslint/naming-convention */ -} - -/** - * @class - * @implements MiddlewareOptions - * Class for TelemetryHandlerOptions - */ - -export class TelemetryHandlerOptions implements MiddlewareOptions { - /** - * @private - * A member to hold the OR of feature usage flags - */ - private featureUsage: FeatureUsageFlag = FeatureUsageFlag.NONE; - - /** - * @public - * @static - * To update the feature usage in the context object - * @param {Context} context - The request context object containing middleware options - * @param {FeatureUsageFlag} flag - The flag value - * @returns nothing - */ - public static updateFeatureUsageFlag(context: Context, flag: FeatureUsageFlag): void { - let options: TelemetryHandlerOptions; - if (context.middlewareControl instanceof MiddlewareControl) { - options = context.middlewareControl.getMiddlewareOptions(TelemetryHandlerOptions) as TelemetryHandlerOptions; - } else { - context.middlewareControl = new MiddlewareControl(); - } - if (typeof options === "undefined") { - options = new TelemetryHandlerOptions(); - context.middlewareControl.setMiddlewareOptions(TelemetryHandlerOptions, options); - } - options.setFeatureUsage(flag); - } - - /** - * @private - * To set the feature usage flag - * @param {FeatureUsageFlag} flag - The flag value - * @returns nothing - */ - private setFeatureUsage(flag: FeatureUsageFlag): void { - this.featureUsage = this.featureUsage | flag; - } - - /** - * @public - * To get the feature usage - * @returns A feature usage flag as hexadecimal string - */ - public getFeatureUsage(): string { - return this.featureUsage.toString(16); - } -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/tasks/FileUploadTask/FileObjectClasses/FileUpload.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/tasks/FileUploadTask/FileObjectClasses/FileUpload.ts deleted file mode 100644 index 7368a61..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/tasks/FileUploadTask/FileObjectClasses/FileUpload.ts +++ /dev/null @@ -1,41 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ - -import { GraphClientError } from "../../../GraphClientError"; -import { FileObject, SliceType } from "../../LargeFileUploadTask"; -import { Range } from "../Range"; - -/** - * @class - * Class used for creating LargeFileUploadTask fileobject. - * This class accepts files of type ArrayBuffer, Blob, Uint8Array. - */ -export class FileUpload implements FileObject { - /** - * @public - * @constructor - * @param {ArrayBuffer | Blob | Uint8Array} content - The file to be uploaded - * @param {string} name - The name of the file to be uploaded - * @param {number} size - The total size of the file to be uploaded - * @returns An instance of the FileUpload class - */ - public constructor(public content: ArrayBuffer | Blob | Uint8Array, public name: string, public size: number) { - if (!content || !name || !size) { - throw new GraphClientError("Please provide the upload content, name of the file and size of the file"); - } - } - - /** - * @public - * Slices the file content to the given range - * @param {Range} range - The range value - * @returns The sliced file part - */ - public sliceFile(range: Range): ArrayBuffer | Blob | Uint8Array { - return this.content.slice(range.minValue, range.maxValue + 1); - } -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/tasks/FileUploadTask/FileObjectClasses/StreamUpload.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/tasks/FileUploadTask/FileObjectClasses/StreamUpload.ts deleted file mode 100644 index b1b853f..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/tasks/FileUploadTask/FileObjectClasses/StreamUpload.ts +++ /dev/null @@ -1,146 +0,0 @@ -import { GraphClientError } from "../../../GraphClientError"; -import { FileObject, SliceType } from "../../LargeFileUploadTask"; -import { Range } from "../Range"; - -/** - * @interface - * Interface to store slice of a stream and range of the slice. - * @property {Buffer} fileSlice - The slice of the stream - * @property {Range} range - The range of the slice - */ -interface SliceRecord { - fileSlice: Buffer; - range: Range; -} - -/** - * @class - * FileObject class for Readable Stream upload - */ -export class StreamUpload implements FileObject { - /** - * @private - * Represents a cache of the last attempted upload slice. - * This can be used when resuming a previously failed slice upload. - */ - private previousSlice: SliceRecord; - - public constructor(public content: NodeStream, public name: string, public size: number) { - if (!content || !name || !size) { - throw new GraphClientError("Please provide the Readable Stream content, name of the file and size of the file"); - } - } - - /** - * @public - * Slices the file content to the given range - * @param {Range} range - The range value - * @returns The sliced file part - */ - public async sliceFile(range: Range): Promise { - let rangeSize = range.maxValue - range.minValue + 1; - /* readable.readable Is true if it is safe to call readable.read(), - * which means the stream has not been destroyed or emitted 'error' or 'end' - */ - const bufs = []; - - /** - * The sliceFile reads the first `rangeSize` number of bytes from the stream. - * The previousSlice property is used to seek the range of bytes in the previous slice. - * Suppose, the sliceFile reads bytes from `10 - 20` from the stream but the upload of this slice fails. - * When the user resumes, the stream will have bytes from position 21. - * The previousSlice.Range is used to compare if the requested range is cached in the previousSlice property or present in the Readable Stream. - */ - if (this.previousSlice) { - if (range.minValue < this.previousSlice.range.minValue) { - throw new GraphClientError("An error occurred while uploading the stream. Please restart the stream upload from the first byte of the file."); - } - - if (range.minValue < this.previousSlice.range.maxValue) { - const previousRangeMin = this.previousSlice.range.minValue; - const previousRangeMax = this.previousSlice.range.maxValue; - - // Check if the requested range is same as previously sliced range - if (range.minValue === previousRangeMin && range.maxValue === previousRangeMax) { - return this.previousSlice.fileSlice; - } - - /** - * The following check considers a possibility - * of an upload failing after some of the bytes of the previous slice - * were successfully uploaded. - * Example - Previous slice range - `10 - 20`. Current requested range is `15 - 20`. - */ - if (range.maxValue === previousRangeMax) { - return this.previousSlice.fileSlice.slice(range.minValue, range.maxValue + 1); - } - - /** - * If an upload fails after some of the bytes of the previous slice - * were successfully uploaded and the new Range.Maximum is greater than the previous Range.Maximum - * Example - Previous slice range - `10 - 20`. Current requested range is `15 - 25`, - * then read the bytes from position 15 to 20 from previousSlice.fileSlice and read bytes from position 21 to 25 from the Readable Stream - */ - bufs.push(this.previousSlice.fileSlice.slice(range.minValue, previousRangeMax + 1)); - - rangeSize = range.maxValue - previousRangeMax; - } - } - - if (this.content && this.content.readable) { - if (this.content.readableLength >= rangeSize) { - bufs.push(this.content.read(rangeSize)); - } else { - bufs.push(await this.readNBytesFromStream(rangeSize)); - } - } else { - throw new GraphClientError("Stream is not readable."); - } - const slicedChunk = Buffer.concat(bufs); - this.previousSlice = { fileSlice: slicedChunk, range }; - - return slicedChunk; - } - - /** - * @private - * Reads the specified byte size from the stream - * @param {number} size - The size of bytes to be read - * @returns Buffer with the given length of data. - */ - - private readNBytesFromStream(size: number): Promise { - return new Promise((resolve, reject) => { - const chunks = []; - let remainder = size; - let length = 0; - this.content.on("end", () => { - if (remainder > 0) { - return reject(new GraphClientError("Stream ended before reading required range size")); - } - }); - this.content.on("readable", () => { - /** - * (chunk = this.content.read(size)) can return null if size of stream is less than 'size' parameter. - * Read the remainder number of bytes from the stream iteratively as they are available. - */ - let chunk; - while (length < size && (chunk = this.content.read(remainder)) !== null) { - length += chunk.length; - chunks.push(chunk); - if (remainder > 0) { - remainder = size - length; - } - } - - if (length === size) { - return resolve(Buffer.concat(chunks)); - } - - if (!this.content || !this.content.readable) { - return reject(new GraphClientError("Error encountered while reading the stream during the upload")); - } - }); - }); - } -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/tasks/FileUploadTask/Interfaces/IUploadEventHandlers.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/tasks/FileUploadTask/Interfaces/IUploadEventHandlers.ts deleted file mode 100644 index ffd8de8..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/tasks/FileUploadTask/Interfaces/IUploadEventHandlers.ts +++ /dev/null @@ -1,16 +0,0 @@ -/* eslint-disable @typescript-eslint/type-annotation-spacing */ -import { Range } from "../Range"; - -/** - * Interface enabling progress handling with callbacks. - */ -export interface UploadEventHandlers { - /** - * Parameters that are passed into the progress, completed, failure callback options. - */ - extraCallbackParam?: unknown; - /** - * Callback function called on each slice upload during the LargeFileUploadTask.upload() process - */ - progress?: (range?: Range, extraCallbackParam?: unknown) => void; -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/tasks/FileUploadTask/Range.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/tasks/FileUploadTask/Range.ts deleted file mode 100644 index bf552c8..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/tasks/FileUploadTask/Range.ts +++ /dev/null @@ -1,41 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ - -/** - * @module Range - */ - -/** - * @class - * Class representing Range - */ -export class Range { - /** - * @public - * The minimum value of the range - */ - public minValue: number; - - /** - * @public - * The maximum value of the range - */ - public maxValue: number; - - /** - * @public - * @constructor - * Creates a range for given min and max values - * @param {number} [minVal = -1] - The minimum value. - * @param {number} [maxVal = -1] - The maximum value. - * @returns An instance of a Range - */ - public constructor(minVal = -1, maxVal = -1) { - this.minValue = minVal; - this.maxValue = maxVal; - } -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/tasks/FileUploadTask/UploadResult.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/tasks/FileUploadTask/UploadResult.ts deleted file mode 100644 index e2d88dd..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/tasks/FileUploadTask/UploadResult.ts +++ /dev/null @@ -1,77 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ - -/** - * Class representing a successful file upload result - */ -export class UploadResult { - /** - * @private - * Location value looked up in the response header - */ - private _location: string; - - /** - * @private - * Response body of the final raw response - */ - private _responseBody: unknown; - - /** - * @public - * Get of the location value. - * Location value is looked up in the response header - */ - public get location(): string { - return this._location; - } - - /** - * @public - * Set the location value - * Location value is looked up in the response header - */ - public set location(location: string) { - this._location = location; - } - - /** - * @public - * Get The response body from the completed upload response - */ - public get responseBody() { - return this._responseBody; - } - - /** - * @public - * Set the response body from the completed upload response - */ - public set responseBody(responseBody: unknown) { - this._responseBody = responseBody; - } - - /** - * @public - * @param {responseBody} responsebody - The response body from the completed upload response - * @param {location} location - The location value from the headers from the completed upload response - */ - public constructor(responseBody: unknown, location: string) { - // Response body or the location parameter can be undefined. - this._location = location; - this._responseBody = responseBody; - } - - /** - * @public - * @param {responseBody} responseBody - The response body from the completed upload response - * @param {responseHeaders} responseHeaders - The headers from the completed upload response - */ - public static CreateUploadResult(responseBody?: unknown, responseHeaders?: Headers) { - return new UploadResult(responseBody, responseHeaders.get("location")); - } -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/tasks/LargeFileUploadTask.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/tasks/LargeFileUploadTask.ts deleted file mode 100644 index b9ecd59..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/tasks/LargeFileUploadTask.ts +++ /dev/null @@ -1,378 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ - -/** - * @module LargeFileUploadTask - */ - -import { GraphClientError } from "../GraphClientError"; -import { GraphResponseHandler } from "../GraphResponseHandler"; -import { Client } from "../index"; -import { ResponseType } from "../ResponseType"; -import { UploadEventHandlers } from "./FileUploadTask/Interfaces/IUploadEventHandlers"; -import { Range } from "./FileUploadTask/Range"; -import { UploadResult } from "./FileUploadTask/UploadResult"; - -/** - * @interface - * Signature to representing key value pairs - * @property {[key: string] : string | number} - The Key value pair - */ -interface KeyValuePairObjectStringNumber { - [key: string]: string | number; -} - -/** - * @interface - * Signature to represent the resulting response in the status enquiry request - * @property {string} expirationDateTime - The expiration time of the upload session - * @property {string[]} nextExpectedRanges - The ranges expected in next consecutive request in the upload - */ -interface UploadStatusResponse { - expirationDateTime: string; - nextExpectedRanges: string[]; -} - -/** - * @interface - * Signature to define options for upload task - * @property {number} [rangeSize = LargeFileUploadTask.DEFAULT_FILE_SIZE] - Specifies the range chunk size - * @property {UploadEventHandlers} uploadEventHandlers - UploadEventHandlers attached to an upload task - */ -export interface LargeFileUploadTaskOptions { - rangeSize?: number; - uploadEventHandlers?: UploadEventHandlers; -} - -/** - * @interface - * Signature to represent upload session resulting from the session creation in the server - * @property {string} url - The URL to which the file upload is made - * @property {Date} expiry - The expiration of the time of the upload session - */ -export interface LargeFileUploadSession { - url: string; - expiry: Date; - isCancelled?: boolean; -} - -/** - * @type - * Representing the return type of the sliceFile function that is type of the slice of a given range. - */ -export type SliceType = ArrayBuffer | Blob | Uint8Array; - -/** - * @interface - * Signature to define the properties and content of the file in upload task - * @property {ArrayBuffer | File} content - The actual file content - * @property {string} name - Specifies the file name with extension - * @property {number} size - Specifies size of the file - */ -export interface FileObject { - content: T; - name: string; - size: number; - sliceFile(range: Range): SliceType | Promise; -} - -/** - * @class - * Class representing LargeFileUploadTask - */ -export class LargeFileUploadTask { - /** - * @private - * Default value for the rangeSize - */ - private DEFAULT_FILE_SIZE: number = 5 * 1024 * 1024; - - /** - * @protected - * The GraphClient instance - */ - protected client: Client; - - /** - * @protected - * The object holding file details - */ - protected file: FileObject; - - /** - * @protected - * The object holding options for the task - */ - protected options: LargeFileUploadTaskOptions; - - /** - * @protected - * The object for upload session - */ - protected uploadSession: LargeFileUploadSession; - - /** - * @protected - * The next range needs to be uploaded - */ - protected nextRange: Range; - - /** - * @public - * @static - * @async - * Makes request to the server to create an upload session - * @param {Client} client - The GraphClient instance - * @param {string} requestUrl - The URL to create the upload session - * @param {any} payload - The payload that needs to be sent - * @param {KeyValuePairObjectStringNumber} headers - The headers that needs to be sent - * @returns The promise that resolves to LargeFileUploadSession - */ - public static async createUploadSession(client: Client, requestUrl: string, payload: any, headers: KeyValuePairObjectStringNumber = {}): Promise { - const session = await client - .api(requestUrl) - .headers(headers) - .post(payload); - const largeFileUploadSession: LargeFileUploadSession = { - url: session.uploadUrl, - expiry: new Date(session.expirationDateTime), - isCancelled: false, - }; - return largeFileUploadSession; - } - - /** - * @public - * @constructor - * Constructs a LargeFileUploadTask - * @param {Client} client - The GraphClient instance - * @param {FileObject} file - The FileObject holding details of a file that needs to be uploaded - * @param {LargeFileUploadSession} uploadSession - The upload session to which the upload has to be done - * @param {LargeFileUploadTaskOptions} options - The upload task options - * @returns An instance of LargeFileUploadTask - */ - public constructor(client: Client, file: FileObject, uploadSession: LargeFileUploadSession, options: LargeFileUploadTaskOptions = {}) { - this.client = client; - - if (!file.sliceFile) { - throw new GraphClientError("Please pass the FileUpload object, StreamUpload object or any custom implementation of the FileObject interface"); - } else { - this.file = file; - } - this.file = file; - if (!options.rangeSize) { - options.rangeSize = this.DEFAULT_FILE_SIZE; - } - - this.options = options; - this.uploadSession = uploadSession; - this.nextRange = new Range(0, this.options.rangeSize - 1); - } - - /** - * @private - * Parses given range string to the Range instance - * @param {string[]} ranges - The ranges value - * @returns The range instance - */ - private parseRange(ranges: string[]): Range { - const rangeStr = ranges[0]; - if (typeof rangeStr === "undefined" || rangeStr === "") { - return new Range(); - } - const firstRange = rangeStr.split("-"); - const minVal = parseInt(firstRange[0], 10); - let maxVal = parseInt(firstRange[1], 10); - if (Number.isNaN(maxVal)) { - maxVal = this.file.size - 1; - } - return new Range(minVal, maxVal); - } - - /** - * @private - * Updates the expiration date and the next range - * @param {UploadStatusResponse} response - The response of the upload status - * @returns Nothing - */ - private updateTaskStatus(response: UploadStatusResponse): void { - this.uploadSession.expiry = new Date(response.expirationDateTime); - this.nextRange = this.parseRange(response.nextExpectedRanges); - } - - /** - * @public - * Gets next range that needs to be uploaded - * @returns The range instance - */ - public getNextRange(): Range { - if (this.nextRange.minValue === -1) { - return this.nextRange; - } - const minVal = this.nextRange.minValue; - let maxValue = minVal + this.options.rangeSize - 1; - if (maxValue >= this.file.size) { - maxValue = this.file.size - 1; - } - return new Range(minVal, maxValue); - } - - /** - * @deprecated This function has been moved into FileObject interface. - * @public - * Slices the file content to the given range - * @param {Range} range - The range value - * @returns The sliced ArrayBuffer or Blob - */ - public sliceFile(range: Range): ArrayBuffer | Blob { - console.warn("The LargeFileUploadTask.sliceFile() function has been deprecated and moved into the FileObject interface."); - if (this.file.content instanceof ArrayBuffer || this.file.content instanceof Blob || this.file.content instanceof Uint8Array) { - return this.file.content.slice(range.minValue, range.maxValue + 1); - } - throw new GraphClientError("The LargeFileUploadTask.sliceFile() function expects only Blob, ArrayBuffer or Uint8Array file content. Please note that the sliceFile() function is deprecated."); - } - - /** - * @public - * @async - * Uploads file to the server in a sequential order by slicing the file - * @returns The promise resolves to uploaded response - */ - public async upload(): Promise { - const uploadEventHandlers = this.options && this.options.uploadEventHandlers; - while (!this.uploadSession.isCancelled) { - const nextRange = this.getNextRange(); - if (nextRange.maxValue === -1) { - const err = new Error("Task with which you are trying to upload is already completed, Please check for your uploaded file"); - err.name = "Invalid Session"; - throw err; - } - const fileSlice = await this.file.sliceFile(nextRange); - const rawResponse = await this.uploadSliceGetRawResponse(fileSlice, nextRange, this.file.size); - if (!rawResponse) { - throw new GraphClientError("Something went wrong! Large file upload slice response is null."); - } - - const responseBody = await GraphResponseHandler.getResponse(rawResponse); - /** - * (rawResponse.status === 201) -> This condition is applicable for OneDrive, PrintDocument and Outlook APIs. - * (rawResponse.status === 200 && responseBody.id) -> This additional condition is applicable only for OneDrive API. - */ - if (rawResponse.status === 201 || (rawResponse.status === 200 && responseBody.id)) { - this.reportProgress(uploadEventHandlers, nextRange); - return UploadResult.CreateUploadResult(responseBody, rawResponse.headers); - } - - /* Handling the API issue where the case of Outlook upload response property -'nextExpectedRanges' is not uniform. - * https://github.com/microsoftgraph/msgraph-sdk-serviceissues/issues/39 - */ - const res: UploadStatusResponse = { - expirationDateTime: responseBody.expirationDateTime || responseBody.ExpirationDateTime, - nextExpectedRanges: responseBody.NextExpectedRanges || responseBody.nextExpectedRanges, - }; - this.updateTaskStatus(res); - this.reportProgress(uploadEventHandlers, nextRange); - } - } - - private reportProgress(uploadEventHandlers: UploadEventHandlers, nextRange: Range) { - if (uploadEventHandlers && uploadEventHandlers.progress) { - uploadEventHandlers.progress(nextRange, uploadEventHandlers.extraCallbackParam); - } - } - - /** - * @public - * @async - * Uploads given slice to the server - * @param {ArrayBuffer | Blob | File} fileSlice - The file slice - * @param {Range} range - The range value - * @param {number} totalSize - The total size of a complete file - * @returns The response body of the upload slice result - */ - public async uploadSlice(fileSlice: ArrayBuffer | Blob | File, range: Range, totalSize: number): Promise { - return await this.client - .api(this.uploadSession.url) - .headers({ - "Content-Length": `${range.maxValue - range.minValue + 1}`, - "Content-Range": `bytes ${range.minValue}-${range.maxValue}/${totalSize}`, - "Content-Type": "application/octet-stream", - }) - .put(fileSlice); - } - - /** - * @public - * @async - * Uploads given slice to the server - * @param {unknown} fileSlice - The file slice - * @param {Range} range - The range value - * @param {number} totalSize - The total size of a complete file - * @returns The raw response of the upload slice result - */ - public async uploadSliceGetRawResponse(fileSlice: unknown, range: Range, totalSize: number): Promise { - return await this.client - .api(this.uploadSession.url) - .headers({ - "Content-Length": `${range.maxValue - range.minValue + 1}`, - "Content-Range": `bytes ${range.minValue}-${range.maxValue}/${totalSize}`, - "Content-Type": "application/octet-stream", - }) - .responseType(ResponseType.RAW) - .put(fileSlice); - } - - /** - * @public - * @async - * Deletes upload session in the server - * @returns The promise resolves to cancelled response - */ - public async cancel(): Promise { - const cancelResponse = await this.client - .api(this.uploadSession.url) - .responseType(ResponseType.RAW) - .delete(); - if (cancelResponse.status === 204) { - this.uploadSession.isCancelled = true; - } - return cancelResponse; - } - - /** - * @public - * @async - * Gets status for the upload session - * @returns The promise resolves to the status enquiry response - */ - public async getStatus(): Promise { - const response = await this.client.api(this.uploadSession.url).get(); - this.updateTaskStatus(response); - return response; - } - - /** - * @public - * @async - * Resumes upload session and continue uploading the file from the last sent range - * @returns The promise resolves to the uploaded response - */ - public async resume(): Promise { - await this.getStatus(); - return await this.upload(); - } - - /** - * @public - * @async - * Get the upload session information - * @returns The large file upload session - */ - public getUploadSession(): LargeFileUploadSession { - return this.uploadSession; - } -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/tasks/OneDriveLargeFileUploadTask.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/tasks/OneDriveLargeFileUploadTask.ts deleted file mode 100644 index a35b59c..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/tasks/OneDriveLargeFileUploadTask.ts +++ /dev/null @@ -1,233 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ - -/** - * @module OneDriveLargeFileUploadTask - */ - -import { GraphClientError } from "../GraphClientError"; -import { Client } from "../index"; -import { FileUpload } from "./FileUploadTask/FileObjectClasses/FileUpload"; -import { UploadEventHandlers } from "./FileUploadTask/Interfaces/IUploadEventHandlers"; -import { FileObject, LargeFileUploadSession, LargeFileUploadTask, LargeFileUploadTaskOptions } from "./LargeFileUploadTask"; -import { getValidRangeSize } from "./OneDriveLargeFileUploadTaskUtil"; - -/** - * @interface - * Signature to define options when creating an upload task - * @property {string} fileName - Specifies the name of a file to be uploaded (with extension) - * @property {string} [fileDescription] - Specifies the description of the file to be uploaded - * @property {string} [path] - The path to which the file needs to be uploaded - * @property {number} [rangeSize] - Specifies the range chunk size - * @property {string} [conflictBehavior] - Conflict behaviour option - * @property {UploadEventHandlers} [uploadEventHandlers] - UploadEventHandlers attached to an upload task - */ -export interface OneDriveLargeFileUploadOptions { - fileName: string; - fileDescription?: string; - path?: string; - rangeSize?: number; - conflictBehavior?: string; - uploadEventHandlers?: UploadEventHandlers; - /// - /// Default upload session url is : "/me/drive/root:/{file-path}:/createUploadSession" - /// Set this property to override the default upload session url. Example: "/me/drive/special/{name}" - /// - uploadSessionURL?: string; -} - -/** - * @interface - * Signature to define options when creating an upload task - * @property {string} fileName - Specifies the name of a file to be uploaded (with extension) - * @property {string} [fileDescription] - Specifies the description of the file to be uploaded - * @property {string} [conflictBehavior] - Conflict behaviour option - */ -interface OneDriveFileUploadSessionPayLoad { - fileName: string; - fileDescription?: string; - conflictBehavior?: string; -} - -/** - * @interface - * Signature to define the file information when processing an upload task - * @property {File | Uint8Array} content - The file content - * @property {number} size - The size of file - */ -interface FileInfo { - content: File | Uint8Array; - size: number; -} - -/** - * @class - * Class representing OneDriveLargeFileUploadTask - */ -export class OneDriveLargeFileUploadTask extends LargeFileUploadTask { - /** - * @private - * @static - * Default path for the file being uploaded - */ - private static DEFAULT_UPLOAD_PATH = "/"; - - /** - * @private - * @static - * Constructs the create session url for Onedrive - * @param {string} fileName - The name of the file - * @param {path} [path = OneDriveLargeFileUploadTask.DEFAULT_UPLOAD_PATH] - The path for the upload - * @returns The constructed create session url - */ - private static constructCreateSessionUrl(fileName: string, path: string = OneDriveLargeFileUploadTask.DEFAULT_UPLOAD_PATH): string { - fileName = fileName.trim(); - path = path.trim(); - if (path === "") { - path = "/"; - } - if (path[0] !== "/") { - path = `/${path}`; - } - if (path[path.length - 1] !== "/") { - path = `${path}/`; - } - // we choose to encode each component of the file path separately because when encoding full URI - // with encodeURI, special characters like # or % in the file name doesn't get encoded as desired - return `/me/drive/root:${path - .split("/") - .map((p) => encodeURIComponent(p)) - .join("/")}${encodeURIComponent(fileName)}:/createUploadSession`; - } - - /** - * @private - * @static - * Get file information - * @param {Blob | Uint8Array | File} file - The file entity - * @param {string} fileName - The file name - * @returns {FileInfo} The file information - */ - private static getFileInfo(file: Blob | Uint8Array | File, fileName: string): FileInfo { - let content; - let size; - if (typeof Blob !== "undefined" && file instanceof Blob) { - content = new File([file as Blob], fileName); - size = content.size; - } else if (typeof File !== "undefined" && file instanceof File) { - content = file as File; - size = content.size; - } else if (typeof Uint8Array !== "undefined" && file instanceof Uint8Array) { - const b = file as Uint8Array; - size = b.byteLength; - content = b.buffer.slice(b.byteOffset, b.byteOffset + b.byteLength); - } - return { - content, - size, - }; - } - - /** - * @public - * @static - * @async - * Creates a OneDriveLargeFileUploadTask - * @param {Client} client - The GraphClient instance - * @param {Blob | Uint8Array | File} file - File represented as Blob, Uint8Array or File - * @param {OneDriveLargeFileUploadOptions} options - The options for upload task - * @returns The promise that will be resolves to OneDriveLargeFileUploadTask instance - */ - public static async create(client: Client, file: Blob | Uint8Array | File, options: OneDriveLargeFileUploadOptions): Promise> { - if (!client || !file || !options) { - throw new GraphClientError("Please provide the Graph client instance, file object and OneDriveLargeFileUploadOptions value"); - } - const fileName = options.fileName; - const fileInfo = OneDriveLargeFileUploadTask.getFileInfo(file, fileName); - const fileObj = new FileUpload(fileInfo.content, fileName, fileInfo.size); - return this.createTaskWithFileObject(client, fileObj, options); - } - - /** - * @public - * @static - * @async - * Creates a OneDriveLargeFileUploadTask - * @param {Client} client - The GraphClient instance - * @param {FileObject} fileObject - FileObject instance - * @param {OneDriveLargeFileUploadOptions} options - The options for upload task - * @returns The promise that will be resolves to OneDriveLargeFileUploadTask instance - */ - public static async createTaskWithFileObject(client: Client, fileObject: FileObject, options: OneDriveLargeFileUploadOptions): Promise> { - if (!client || !fileObject || !options) { - throw new GraphClientError("Please provide the Graph client instance, FileObject interface implementation and OneDriveLargeFileUploadOptions value"); - } - const requestUrl = options.uploadSessionURL ? options.uploadSessionURL: OneDriveLargeFileUploadTask.constructCreateSessionUrl(options.fileName, options.path); - const uploadSessionPayload: OneDriveFileUploadSessionPayLoad = { - fileName: options.fileName, - fileDescription: options.fileDescription, - conflictBehavior: options.conflictBehavior, - }; - const session = await OneDriveLargeFileUploadTask.createUploadSession(client, requestUrl, uploadSessionPayload); - const rangeSize = getValidRangeSize(options.rangeSize); - return new OneDriveLargeFileUploadTask(client, fileObject, session, { - rangeSize, - uploadEventHandlers: options.uploadEventHandlers, - }); - } - - /** - * @public - * @static - * @async - * Makes request to the server to create an upload session - * @param {Client} client - The GraphClient instance - * @param {string} requestUrl - The URL to create the upload session - * @param {string} payloadOptions - The payload option. Default conflictBehavior is 'rename' - * @returns The promise that resolves to LargeFileUploadSession - */ - public static async createUploadSession(client: Client, requestUrl: string, payloadOptions: OneDriveFileUploadSessionPayLoad): Promise { - const payload = { - item: { - "@microsoft.graph.conflictBehavior": payloadOptions?.conflictBehavior || "rename", - name: payloadOptions?.fileName, - description: payloadOptions?.fileDescription, - }, - }; - return super.createUploadSession(client, requestUrl, payload); - } - - /** - * @public - * @constructor - * Constructs a OneDriveLargeFileUploadTask - * @param {Client} client - The GraphClient instance - * @param {FileObject} file - The FileObject holding details of a file that needs to be uploaded - * @param {LargeFileUploadSession} uploadSession - The upload session to which the upload has to be done - * @param {LargeFileUploadTaskOptions} options - The upload task options - * @returns An instance of OneDriveLargeFileUploadTask - */ - public constructor(client: Client, file: FileObject, uploadSession: LargeFileUploadSession, options: LargeFileUploadTaskOptions) { - super(client, file, uploadSession, options); - } - - /** - * @public - * Commits upload session to end uploading - * @param {string} requestUrl - The URL to commit the upload session - * @param {string} conflictBehavior - Conflict behaviour option. Default is 'rename' - * @returns The promise resolves to committed response - */ - public async commit(requestUrl: string, conflictBehavior = "rename"): Promise { - const payload = { - name: this.file.name, - "@microsoft.graph.conflictBehavior": conflictBehavior, - "@microsoft.graph.sourceUrl": this.uploadSession.url, - }; - return await this.client.api(requestUrl).put(payload); - } -} diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/tasks/OneDriveLargeFileUploadTaskUtil.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/tasks/OneDriveLargeFileUploadTaskUtil.ts deleted file mode 100644 index 2683994..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/tasks/OneDriveLargeFileUploadTaskUtil.ts +++ /dev/null @@ -1,46 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ - -/** - * @module OneDriveLargeFileUploadTaskUtil - */ - -/** - * @constant - * Default value for the rangeSize - * Recommended size is between 5 - 10 MB {@link https://developer.microsoft.com/en-us/graph/docs/api-reference/v1.0/api/driveitem_createuploadsession#best-practices} - */ -const DEFAULT_FILE_SIZE: number = 5 * 1024 * 1024; - -/** - * @constant - * Rounds off the given value to a multiple of 320 KB - * @param {number} value - The value - * @returns The rounded off value - */ -const roundTo320KB = (value: number): number => { - if (value > 320 * 1024) { - value = Math.floor(value / (320 * 1024)) * 320 * 1024; - } - return value; -}; - -/** - * @constant - * Get the valid rangeSize for a file slicing (validity is based on the constrains mentioned in here - * {@link https://developer.microsoft.com/en-us/graph/docs/api-reference/v1.0/api/driveitem_createuploadsession#upload-bytes-to-the-upload-session}) - * - * @param {number} [rangeSize = DEFAULT_FILE_SIZE] - The rangeSize value. - * @returns The valid rangeSize - */ -export const getValidRangeSize = (rangeSize: number = DEFAULT_FILE_SIZE): number => { - const sixtyMB = 60 * 1024 * 1024; - if (rangeSize > sixtyMB) { - rangeSize = sixtyMB; - } - return roundTo320KB(rangeSize); -}; diff --git a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/tasks/PageIterator.ts b/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/tasks/PageIterator.ts deleted file mode 100644 index 5f34223..0000000 --- a/PBandGraphScaffold/node_modules/@microsoft/microsoft-graph-client/src/tasks/PageIterator.ts +++ /dev/null @@ -1,219 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ - -/** - * @module PageIterator - */ - -import { FetchOptions } from "../IFetchOptions"; -import { Client } from "../index"; -import { MiddlewareOptions } from "../middleware/options/IMiddlewareOptions"; - -/** - * Signature representing PageCollection - * @property {any[]} value - The collection value - * @property {string} [@odata.nextLink] - The nextLink value - * @property {string} [@odata.deltaLink] - The deltaLink value - * @property {any} Additional - Any number of additional properties (This is to accept the any additional data returned by in the response to the nextLink request) - */ -export interface PageCollection { - value: any[]; - "@odata.nextLink"?: string; - "@odata.deltaLink"?: string; - [Key: string]: any; -} - -/** - * Signature to define the request options to be sent during request. - * The values of the GraphRequestOptions properties are passed to the Graph Request object. - * @property {HeadersInit} headers - the header options for the request - * @property {MiddlewareOptions[]} middlewareoptions - The middleware options for the request - * @property {FetchOptions} options - The fetch options for the request - */ -export interface GraphRequestOptions { - headers?: HeadersInit; - middlewareOptions?: MiddlewareOptions[]; - options?: FetchOptions; -} - -/** - * Signature representing callback for page iterator - * @property {Function} callback - The callback function which should return boolean to continue the continue/stop the iteration. - */ -export type PageIteratorCallback = (data: any) => boolean; - -/** - * @class - * Class for PageIterator - */ -export class PageIterator { - /** - * @private - * Member holding the GraphClient instance - */ - private client: Client; - - /** - * @private - * Member holding the page collection - */ - private collection: any[]; - - /** - * @private - * Member variable referring to nextLink of the page collection - */ - private nextLink: string | undefined; - - /** - * @private - * Member variable referring to deltaLink of the request - */ - private deltaLink: string | undefined; - - /** - * @private - * Holding callback for Iteration. - */ - - private callback: PageIteratorCallback; - - /** - * @private - * Member holding a complete/incomplete status of an iterator - */ - private complete: boolean; - - /** - * @private - * Information to be added to the request - */ - private requestOptions: GraphRequestOptions; - - /** - * @private - * Member holding the current position on the collection - */ - private cursor: number; - - /** - * @public - * @constructor - * Creates new instance for PageIterator - * @param {Client} client - The graph client instance - * @param {PageCollection} pageCollection - The page collection object - * @param {PageIteratorCallback} callBack - The callback function - * @param {GraphRequestOptions} requestOptions - The request options - * @returns An instance of a PageIterator - */ - public constructor(client: Client, pageCollection: PageCollection, callback: PageIteratorCallback, requestOptions?: GraphRequestOptions) { - this.client = client; - this.collection = pageCollection.value; - this.nextLink = pageCollection["@odata.nextLink"]; - this.deltaLink = pageCollection["@odata.deltaLink"]; - this.callback = callback; - this.cursor = 0; - this.complete = false; - this.requestOptions = requestOptions; - } - - /** - * @private - * Iterates over a collection by enqueuing entries one by one and kicking the callback with the enqueued entry - * @returns A boolean indicating the continue flag to process next page - */ - private iterationHelper(): boolean { - if (this.collection === undefined) { - return false; - } - let advance = true; - while (advance && this.cursor < this.collection.length) { - const item = this.collection[this.cursor]; - advance = this.callback(item); - this.cursor++; - } - return advance; - } - - /** - * @private - * @async - * Helper to make a get request to fetch next page with nextLink url and update the page iterator instance with the returned response - * @returns A promise that resolves to a response data with next page collection - */ - private async fetchAndUpdateNextPageData(): Promise { - let graphRequest = this.client.api(this.nextLink); - if (this.requestOptions) { - if (this.requestOptions.headers) { - graphRequest = graphRequest.headers(this.requestOptions.headers); - } - if (this.requestOptions.middlewareOptions) { - graphRequest = graphRequest.middlewareOptions(this.requestOptions.middlewareOptions); - } - if (this.requestOptions.options) { - graphRequest = graphRequest.options(this.requestOptions.options); - } - } - - const response: PageCollection = await graphRequest.get(); - this.collection = response.value; - this.cursor = 0; - this.nextLink = response["@odata.nextLink"]; - this.deltaLink = response["@odata.deltaLink"]; - } - - /** - * @public - * Getter to get the deltaLink in the current response - * @returns A deltaLink which is being used to make delta requests in future - */ - public getDeltaLink(): string | undefined { - return this.deltaLink; - } - - /** - * @public - * @async - * Iterates over the collection and kicks callback for each item on iteration. Fetches next set of data through nextLink and iterates over again - * This happens until the nextLink is drained out or the user responds with a red flag to continue from callback - * @returns A Promise that resolves to nothing on completion and throws error incase of any discrepancy. - */ - public async iterate(): Promise { - let advance = this.iterationHelper(); - while (advance) { - if (this.nextLink !== undefined) { - await this.fetchAndUpdateNextPageData(); - advance = this.iterationHelper(); - } else { - advance = false; - } - } - if (this.nextLink === undefined && this.cursor >= this.collection.length) { - this.complete = true; - } - } - - /** - * @public - * @async - * To resume the iteration - * Note: This internally calls the iterate method, It's just for more readability. - * @returns A Promise that resolves to nothing on completion and throws error incase of any discrepancy - */ - public async resume(): Promise { - return this.iterate(); - } - - /** - * @public - * To get the completeness status of the iterator - * @returns Boolean indicating the completeness - */ - public isComplete(): boolean { - return this.complete; - } -} diff --git a/PBandGraphScaffold/node_modules/@types/bun/LICENSE b/PBandGraphScaffold/node_modules/@types/bun/LICENSE deleted file mode 100644 index 9e841e7..0000000 --- a/PBandGraphScaffold/node_modules/@types/bun/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ - MIT License - - Copyright (c) Microsoft Corporation. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE diff --git a/PBandGraphScaffold/node_modules/@types/bun/README.md b/PBandGraphScaffold/node_modules/@types/bun/README.md deleted file mode 100644 index 9eec018..0000000 --- a/PBandGraphScaffold/node_modules/@types/bun/README.md +++ /dev/null @@ -1,20 +0,0 @@ -# Installation -> `npm install --save @types/bun` - -# Summary -This package contains type definitions for bun (https://bun.com). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/bun. -## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/bun/index.d.ts) -````ts -/// - -```` - -### Additional Details - * Last updated: Thu, 18 Dec 2025 18:43:14 GMT - * Dependencies: [bun-types](https://npmjs.com/package/bun-types) - -# Credits -These definitions were written by [Jarred Sumner](https://github.com/Jarred-Sumner), [Robobun](https://github.com/robobun), [Dylan Conway](https://github.com/dylan-conway), [Meghan Denny](https://github.com/nektro), [Michael H](https://github.com/RiskyMH), and [Alistair Smith](https://github.com/alii). diff --git a/PBandGraphScaffold/node_modules/@types/bun/index.d.ts b/PBandGraphScaffold/node_modules/@types/bun/index.d.ts deleted file mode 100644 index 22f6a66..0000000 --- a/PBandGraphScaffold/node_modules/@types/bun/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -/// diff --git a/PBandGraphScaffold/node_modules/@types/bun/package.json b/PBandGraphScaffold/node_modules/@types/bun/package.json deleted file mode 100644 index 57214e0..0000000 --- a/PBandGraphScaffold/node_modules/@types/bun/package.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "name": "@types/bun", - "version": "1.3.5", - "description": "TypeScript definitions for bun", - "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/bun", - "license": "MIT", - "contributors": [ - { - "name": "Jarred Sumner", - "githubUsername": "Jarred-Sumner", - "url": "https://github.com/Jarred-Sumner" - }, - { - "name": "Robobun", - "githubUsername": "robobun", - "url": "https://github.com/robobun" - }, - { - "name": "Dylan Conway", - "githubUsername": "dylan-conway", - "url": "https://github.com/dylan-conway" - }, - { - "name": "Meghan Denny", - "githubUsername": "nektro", - "url": "https://github.com/nektro" - }, - { - "name": "Michael H", - "githubUsername": "RiskyMH", - "url": "https://github.com/RiskyMH" - }, - { - "name": "Alistair Smith", - "githubUsername": "alii", - "url": "https://github.com/alii" - } - ], - "main": "", - "types": "index.d.ts", - "repository": { - "type": "git", - "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git", - "directory": "types/bun" - }, - "scripts": {}, - "dependencies": { - "bun-types": "1.3.5" - }, - "peerDependencies": {}, - "typesPublisherContentHash": "2a95cd2410aa85bcfc6ccb52bce7e3a79dca3347b50f56a37dc44f9cfe86b9bd", - "typeScriptVersion": "5.2" -} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@types/node/LICENSE b/PBandGraphScaffold/node_modules/@types/node/LICENSE deleted file mode 100644 index 9e841e7..0000000 --- a/PBandGraphScaffold/node_modules/@types/node/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ - MIT License - - Copyright (c) Microsoft Corporation. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE diff --git a/PBandGraphScaffold/node_modules/@types/node/README.md b/PBandGraphScaffold/node_modules/@types/node/README.md deleted file mode 100644 index 3ecaaae..0000000 --- a/PBandGraphScaffold/node_modules/@types/node/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# Installation -> `npm install --save @types/node` - -# Summary -This package contains type definitions for node (https://nodejs.org/). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node. - -### Additional Details - * Last updated: Tue, 16 Dec 2025 21:35:18 GMT - * Dependencies: [undici-types](https://npmjs.com/package/undici-types) - -# Credits -These definitions were written by [Microsoft TypeScript](https://github.com/Microsoft), [Alberto Schiabel](https://github.com/jkomyno), [Andrew Makarov](https://github.com/r3nya), [Benjamin Toueg](https://github.com/btoueg), [David Junger](https://github.com/touffy), [Mohsen Azimi](https://github.com/mohsen1), [Nikita Galkin](https://github.com/galkin), [Sebastian Silbermann](https://github.com/eps1lon), [Wilco Bakker](https://github.com/WilcoBakker), [Marcin Kopacz](https://github.com/chyzwar), [Trivikram Kamat](https://github.com/trivikr), [Junxiao Shi](https://github.com/yoursunny), [Ilia Baryshnikov](https://github.com/qwelias), [ExE Boss](https://github.com/ExE-Boss), [Piotr Błażejewicz](https://github.com/peterblazejewicz), [Anna Henningsen](https://github.com/addaleax), [Victor Perin](https://github.com/victorperin), [NodeJS Contributors](https://github.com/NodeJS), [Linus Unnebäck](https://github.com/LinusU), [wafuwafu13](https://github.com/wafuwafu13), [Matteo Collina](https://github.com/mcollina), [Dmitry Semigradsky](https://github.com/Semigradsky), [René](https://github.com/Renegade334), and [Yagiz Nizipli](https://github.com/anonrig). diff --git a/PBandGraphScaffold/node_modules/@types/node/assert.d.ts b/PBandGraphScaffold/node_modules/@types/node/assert.d.ts deleted file mode 100644 index ef4d852..0000000 --- a/PBandGraphScaffold/node_modules/@types/node/assert.d.ts +++ /dev/null @@ -1,955 +0,0 @@ -/** - * The `node:assert` module provides a set of assertion functions for verifying - * invariants. - * @see [source](https://github.com/nodejs/node/blob/v25.x/lib/assert.js) - */ -declare module "node:assert" { - import strict = require("node:assert/strict"); - /** - * An alias of {@link assert.ok}. - * @since v0.5.9 - * @param value The input that is checked for being truthy. - */ - function assert(value: unknown, message?: string | Error): asserts value; - const kOptions: unique symbol; - namespace assert { - type AssertMethodNames = - | "deepEqual" - | "deepStrictEqual" - | "doesNotMatch" - | "doesNotReject" - | "doesNotThrow" - | "equal" - | "fail" - | "ifError" - | "match" - | "notDeepEqual" - | "notDeepStrictEqual" - | "notEqual" - | "notStrictEqual" - | "ok" - | "partialDeepStrictEqual" - | "rejects" - | "strictEqual" - | "throws"; - interface AssertOptions { - /** - * If set to `'full'`, shows the full diff in assertion errors. - * @default 'simple' - */ - diff?: "simple" | "full" | undefined; - /** - * If set to `true`, non-strict methods behave like their - * corresponding strict methods. - * @default true - */ - strict?: boolean | undefined; - /** - * If set to `true`, skips prototype and constructor - * comparison in deep equality checks. - * @since v24.9.0 - * @default false - */ - skipPrototype?: boolean | undefined; - } - interface Assert extends Pick { - readonly [kOptions]: AssertOptions & { strict: false }; - } - interface AssertStrict extends Pick { - readonly [kOptions]: AssertOptions & { strict: true }; - } - /** - * The `Assert` class allows creating independent assertion instances with custom options. - * @since v24.6.0 - */ - var Assert: { - /** - * Creates a new assertion instance. The `diff` option controls the verbosity of diffs in assertion error messages. - * - * ```js - * const { Assert } = require('node:assert'); - * const assertInstance = new Assert({ diff: 'full' }); - * assertInstance.deepStrictEqual({ a: 1 }, { a: 2 }); - * // Shows a full diff in the error message. - * ``` - * - * **Important**: When destructuring assertion methods from an `Assert` instance, - * the methods lose their connection to the instance's configuration options (such - * as `diff`, `strict`, and `skipPrototype` settings). - * The destructured methods will fall back to default behavior instead. - * - * ```js - * const myAssert = new Assert({ diff: 'full' }); - * - * // This works as expected - uses 'full' diff - * myAssert.strictEqual({ a: 1 }, { b: { c: 1 } }); - * - * // This loses the 'full' diff setting - falls back to default 'simple' diff - * const { strictEqual } = myAssert; - * strictEqual({ a: 1 }, { b: { c: 1 } }); - * ``` - * - * The `skipPrototype` option affects all deep equality methods: - * - * ```js - * class Foo { - * constructor(a) { - * this.a = a; - * } - * } - * - * class Bar { - * constructor(a) { - * this.a = a; - * } - * } - * - * const foo = new Foo(1); - * const bar = new Bar(1); - * - * // Default behavior - fails due to different constructors - * const assert1 = new Assert(); - * assert1.deepStrictEqual(foo, bar); // AssertionError - * - * // Skip prototype comparison - passes if properties are equal - * const assert2 = new Assert({ skipPrototype: true }); - * assert2.deepStrictEqual(foo, bar); // OK - * ``` - * - * When destructured, methods lose access to the instance's `this` context and revert to default assertion behavior - * (diff: 'simple', non-strict mode). - * To maintain custom options when using destructured methods, avoid - * destructuring and call methods directly on the instance. - * @since v24.6.0 - */ - new( - options?: AssertOptions & { strict?: true | undefined }, - ): AssertStrict; - new( - options: AssertOptions, - ): Assert; - }; - interface AssertionErrorOptions { - /** - * If provided, the error message is set to this value. - */ - message?: string | undefined; - /** - * The `actual` property on the error instance. - */ - actual?: unknown; - /** - * The `expected` property on the error instance. - */ - expected?: unknown; - /** - * The `operator` property on the error instance. - */ - operator?: string | undefined; - /** - * If provided, the generated stack trace omits frames before this function. - */ - stackStartFn?: Function | undefined; - /** - * If set to `'full'`, shows the full diff in assertion errors. - * @default 'simple' - */ - diff?: "simple" | "full" | undefined; - } - /** - * Indicates the failure of an assertion. All errors thrown by the `node:assert` module will be instances of the `AssertionError` class. - */ - class AssertionError extends Error { - constructor(options: AssertionErrorOptions); - /** - * Set to the `actual` argument for methods such as {@link assert.strictEqual()}. - */ - actual: unknown; - /** - * Set to the `expected` argument for methods such as {@link assert.strictEqual()}. - */ - expected: unknown; - /** - * Indicates if the message was auto-generated (`true`) or not. - */ - generatedMessage: boolean; - /** - * Value is always `ERR_ASSERTION` to show that the error is an assertion error. - */ - code: "ERR_ASSERTION"; - /** - * Set to the passed in operator value. - */ - operator: string; - } - type AssertPredicate = RegExp | (new() => object) | ((thrown: unknown) => boolean) | object | Error; - /** - * Throws an `AssertionError` with the provided error message or a default - * error message. If the `message` parameter is an instance of an `Error` then - * it will be thrown instead of the `AssertionError`. - * - * ```js - * import assert from 'node:assert/strict'; - * - * assert.fail(); - * // AssertionError [ERR_ASSERTION]: Failed - * - * assert.fail('boom'); - * // AssertionError [ERR_ASSERTION]: boom - * - * assert.fail(new TypeError('need array')); - * // TypeError: need array - * ``` - * @since v0.1.21 - * @param [message='Failed'] - */ - function fail(message?: string | Error): never; - /** - * Tests if `value` is truthy. It is equivalent to `assert.equal(!!value, true, message)`. - * - * If `value` is not truthy, an `AssertionError` is thrown with a `message` property set equal to the value of the `message` parameter. If the `message` parameter is `undefined`, a default - * error message is assigned. If the `message` parameter is an instance of an `Error` then it will be thrown instead of the `AssertionError`. - * If no arguments are passed in at all `message` will be set to the string:`` 'No value argument passed to `assert.ok()`' ``. - * - * Be aware that in the `repl` the error message will be different to the one - * thrown in a file! See below for further details. - * - * ```js - * import assert from 'node:assert/strict'; - * - * assert.ok(true); - * // OK - * assert.ok(1); - * // OK - * - * assert.ok(); - * // AssertionError: No value argument passed to `assert.ok()` - * - * assert.ok(false, 'it\'s false'); - * // AssertionError: it's false - * - * // In the repl: - * assert.ok(typeof 123 === 'string'); - * // AssertionError: false == true - * - * // In a file (e.g. test.js): - * assert.ok(typeof 123 === 'string'); - * // AssertionError: The expression evaluated to a falsy value: - * // - * // assert.ok(typeof 123 === 'string') - * - * assert.ok(false); - * // AssertionError: The expression evaluated to a falsy value: - * // - * // assert.ok(false) - * - * assert.ok(0); - * // AssertionError: The expression evaluated to a falsy value: - * // - * // assert.ok(0) - * ``` - * - * ```js - * import assert from 'node:assert/strict'; - * - * // Using `assert()` works the same: - * assert(0); - * // AssertionError: The expression evaluated to a falsy value: - * // - * // assert(0) - * ``` - * @since v0.1.21 - */ - function ok(value: unknown, message?: string | Error): asserts value; - /** - * **Strict assertion mode** - * - * An alias of {@link strictEqual}. - * - * **Legacy assertion mode** - * - * > Stability: 3 - Legacy: Use {@link strictEqual} instead. - * - * Tests shallow, coercive equality between the `actual` and `expected` parameters - * using the [`==` operator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Equality). `NaN` is specially handled - * and treated as being identical if both sides are `NaN`. - * - * ```js - * import assert from 'node:assert'; - * - * assert.equal(1, 1); - * // OK, 1 == 1 - * assert.equal(1, '1'); - * // OK, 1 == '1' - * assert.equal(NaN, NaN); - * // OK - * - * assert.equal(1, 2); - * // AssertionError: 1 == 2 - * assert.equal({ a: { b: 1 } }, { a: { b: 1 } }); - * // AssertionError: { a: { b: 1 } } == { a: { b: 1 } } - * ``` - * - * If the values are not equal, an `AssertionError` is thrown with a `message` property set equal to the value of the `message` parameter. If the `message` parameter is undefined, a default - * error message is assigned. If the `message` parameter is an instance of an `Error` then it will be thrown instead of the `AssertionError`. - * @since v0.1.21 - */ - function equal(actual: unknown, expected: unknown, message?: string | Error): void; - /** - * **Strict assertion mode** - * - * An alias of {@link notStrictEqual}. - * - * **Legacy assertion mode** - * - * > Stability: 3 - Legacy: Use {@link notStrictEqual} instead. - * - * Tests shallow, coercive inequality with the [`!=` operator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Inequality). `NaN` is - * specially handled and treated as being identical if both sides are `NaN`. - * - * ```js - * import assert from 'node:assert'; - * - * assert.notEqual(1, 2); - * // OK - * - * assert.notEqual(1, 1); - * // AssertionError: 1 != 1 - * - * assert.notEqual(1, '1'); - * // AssertionError: 1 != '1' - * ``` - * - * If the values are equal, an `AssertionError` is thrown with a `message` property set equal to the value of the `message` parameter. If the `message` parameter is undefined, a default error - * message is assigned. If the `message` parameter is an instance of an `Error` then it will be thrown instead of the `AssertionError`. - * @since v0.1.21 - */ - function notEqual(actual: unknown, expected: unknown, message?: string | Error): void; - /** - * **Strict assertion mode** - * - * An alias of {@link deepStrictEqual}. - * - * **Legacy assertion mode** - * - * > Stability: 3 - Legacy: Use {@link deepStrictEqual} instead. - * - * Tests for deep equality between the `actual` and `expected` parameters. Consider - * using {@link deepStrictEqual} instead. {@link deepEqual} can have - * surprising results. - * - * _Deep equality_ means that the enumerable "own" properties of child objects - * are also recursively evaluated by the following rules. - * @since v0.1.21 - */ - function deepEqual(actual: unknown, expected: unknown, message?: string | Error): void; - /** - * **Strict assertion mode** - * - * An alias of {@link notDeepStrictEqual}. - * - * **Legacy assertion mode** - * - * > Stability: 3 - Legacy: Use {@link notDeepStrictEqual} instead. - * - * Tests for any deep inequality. Opposite of {@link deepEqual}. - * - * ```js - * import assert from 'node:assert'; - * - * const obj1 = { - * a: { - * b: 1, - * }, - * }; - * const obj2 = { - * a: { - * b: 2, - * }, - * }; - * const obj3 = { - * a: { - * b: 1, - * }, - * }; - * const obj4 = { __proto__: obj1 }; - * - * assert.notDeepEqual(obj1, obj1); - * // AssertionError: { a: { b: 1 } } notDeepEqual { a: { b: 1 } } - * - * assert.notDeepEqual(obj1, obj2); - * // OK - * - * assert.notDeepEqual(obj1, obj3); - * // AssertionError: { a: { b: 1 } } notDeepEqual { a: { b: 1 } } - * - * assert.notDeepEqual(obj1, obj4); - * // OK - * ``` - * - * If the values are deeply equal, an `AssertionError` is thrown with a `message` property set equal to the value of the `message` parameter. If the `message` parameter is undefined, a default - * error message is assigned. If the `message` parameter is an instance of an `Error` then it will be thrown - * instead of the `AssertionError`. - * @since v0.1.21 - */ - function notDeepEqual(actual: unknown, expected: unknown, message?: string | Error): void; - /** - * Tests strict equality between the `actual` and `expected` parameters as - * determined by [`Object.is()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is). - * - * ```js - * import assert from 'node:assert/strict'; - * - * assert.strictEqual(1, 2); - * // AssertionError [ERR_ASSERTION]: Expected inputs to be strictly equal: - * // - * // 1 !== 2 - * - * assert.strictEqual(1, 1); - * // OK - * - * assert.strictEqual('Hello foobar', 'Hello World!'); - * // AssertionError [ERR_ASSERTION]: Expected inputs to be strictly equal: - * // + actual - expected - * // - * // + 'Hello foobar' - * // - 'Hello World!' - * // ^ - * - * const apples = 1; - * const oranges = 2; - * assert.strictEqual(apples, oranges, `apples ${apples} !== oranges ${oranges}`); - * // AssertionError [ERR_ASSERTION]: apples 1 !== oranges 2 - * - * assert.strictEqual(1, '1', new TypeError('Inputs are not identical')); - * // TypeError: Inputs are not identical - * ``` - * - * If the values are not strictly equal, an `AssertionError` is thrown with a `message` property set equal to the value of the `message` parameter. If the `message` parameter is undefined, a - * default error message is assigned. If the `message` parameter is an instance of an `Error` then it will be thrown - * instead of the `AssertionError`. - * @since v0.1.21 - */ - function strictEqual(actual: unknown, expected: T, message?: string | Error): asserts actual is T; - /** - * Tests strict inequality between the `actual` and `expected` parameters as - * determined by [`Object.is()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is). - * - * ```js - * import assert from 'node:assert/strict'; - * - * assert.notStrictEqual(1, 2); - * // OK - * - * assert.notStrictEqual(1, 1); - * // AssertionError [ERR_ASSERTION]: Expected "actual" to be strictly unequal to: - * // - * // 1 - * - * assert.notStrictEqual(1, '1'); - * // OK - * ``` - * - * If the values are strictly equal, an `AssertionError` is thrown with a `message` property set equal to the value of the `message` parameter. If the `message` parameter is undefined, a - * default error message is assigned. If the `message` parameter is an instance of an `Error` then it will be thrown - * instead of the `AssertionError`. - * @since v0.1.21 - */ - function notStrictEqual(actual: unknown, expected: unknown, message?: string | Error): void; - /** - * Tests for deep equality between the `actual` and `expected` parameters. - * "Deep" equality means that the enumerable "own" properties of child objects - * are recursively evaluated also by the following rules. - * @since v1.2.0 - */ - function deepStrictEqual(actual: unknown, expected: T, message?: string | Error): asserts actual is T; - /** - * Tests for deep strict inequality. Opposite of {@link deepStrictEqual}. - * - * ```js - * import assert from 'node:assert/strict'; - * - * assert.notDeepStrictEqual({ a: 1 }, { a: '1' }); - * // OK - * ``` - * - * If the values are deeply and strictly equal, an `AssertionError` is thrown - * with a `message` property set equal to the value of the `message` parameter. If - * the `message` parameter is undefined, a default error message is assigned. If - * the `message` parameter is an instance of an `Error` then it will be thrown - * instead of the `AssertionError`. - * @since v1.2.0 - */ - function notDeepStrictEqual(actual: unknown, expected: unknown, message?: string | Error): void; - /** - * Expects the function `fn` to throw an error. - * - * If specified, `error` can be a [`Class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes), - * [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions), a validation function, - * a validation object where each property will be tested for strict deep equality, - * or an instance of error where each property will be tested for strict deep - * equality including the non-enumerable `message` and `name` properties. When - * using an object, it is also possible to use a regular expression, when - * validating against a string property. See below for examples. - * - * If specified, `message` will be appended to the message provided by the `AssertionError` if the `fn` call fails to throw or in case the error validation - * fails. - * - * Custom validation object/error instance: - * - * ```js - * import assert from 'node:assert/strict'; - * - * const err = new TypeError('Wrong value'); - * err.code = 404; - * err.foo = 'bar'; - * err.info = { - * nested: true, - * baz: 'text', - * }; - * err.reg = /abc/i; - * - * assert.throws( - * () => { - * throw err; - * }, - * { - * name: 'TypeError', - * message: 'Wrong value', - * info: { - * nested: true, - * baz: 'text', - * }, - * // Only properties on the validation object will be tested for. - * // Using nested objects requires all properties to be present. Otherwise - * // the validation is going to fail. - * }, - * ); - * - * // Using regular expressions to validate error properties: - * assert.throws( - * () => { - * throw err; - * }, - * { - * // The `name` and `message` properties are strings and using regular - * // expressions on those will match against the string. If they fail, an - * // error is thrown. - * name: /^TypeError$/, - * message: /Wrong/, - * foo: 'bar', - * info: { - * nested: true, - * // It is not possible to use regular expressions for nested properties! - * baz: 'text', - * }, - * // The `reg` property contains a regular expression and only if the - * // validation object contains an identical regular expression, it is going - * // to pass. - * reg: /abc/i, - * }, - * ); - * - * // Fails due to the different `message` and `name` properties: - * assert.throws( - * () => { - * const otherErr = new Error('Not found'); - * // Copy all enumerable properties from `err` to `otherErr`. - * for (const [key, value] of Object.entries(err)) { - * otherErr[key] = value; - * } - * throw otherErr; - * }, - * // The error's `message` and `name` properties will also be checked when using - * // an error as validation object. - * err, - * ); - * ``` - * - * Validate instanceof using constructor: - * - * ```js - * import assert from 'node:assert/strict'; - * - * assert.throws( - * () => { - * throw new Error('Wrong value'); - * }, - * Error, - * ); - * ``` - * - * Validate error message using [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions): - * - * Using a regular expression runs `.toString` on the error object, and will - * therefore also include the error name. - * - * ```js - * import assert from 'node:assert/strict'; - * - * assert.throws( - * () => { - * throw new Error('Wrong value'); - * }, - * /^Error: Wrong value$/, - * ); - * ``` - * - * Custom error validation: - * - * The function must return `true` to indicate all internal validations passed. - * It will otherwise fail with an `AssertionError`. - * - * ```js - * import assert from 'node:assert/strict'; - * - * assert.throws( - * () => { - * throw new Error('Wrong value'); - * }, - * (err) => { - * assert(err instanceof Error); - * assert(/value/.test(err)); - * // Avoid returning anything from validation functions besides `true`. - * // Otherwise, it's not clear what part of the validation failed. Instead, - * // throw an error about the specific validation that failed (as done in this - * // example) and add as much helpful debugging information to that error as - * // possible. - * return true; - * }, - * 'unexpected error', - * ); - * ``` - * - * `error` cannot be a string. If a string is provided as the second - * argument, then `error` is assumed to be omitted and the string will be used for `message` instead. This can lead to easy-to-miss mistakes. Using the same - * message as the thrown error message is going to result in an `ERR_AMBIGUOUS_ARGUMENT` error. Please read the example below carefully if using - * a string as the second argument gets considered: - * - * ```js - * import assert from 'node:assert/strict'; - * - * function throwingFirst() { - * throw new Error('First'); - * } - * - * function throwingSecond() { - * throw new Error('Second'); - * } - * - * function notThrowing() {} - * - * // The second argument is a string and the input function threw an Error. - * // The first case will not throw as it does not match for the error message - * // thrown by the input function! - * assert.throws(throwingFirst, 'Second'); - * // In the next example the message has no benefit over the message from the - * // error and since it is not clear if the user intended to actually match - * // against the error message, Node.js throws an `ERR_AMBIGUOUS_ARGUMENT` error. - * assert.throws(throwingSecond, 'Second'); - * // TypeError [ERR_AMBIGUOUS_ARGUMENT] - * - * // The string is only used (as message) in case the function does not throw: - * assert.throws(notThrowing, 'Second'); - * // AssertionError [ERR_ASSERTION]: Missing expected exception: Second - * - * // If it was intended to match for the error message do this instead: - * // It does not throw because the error messages match. - * assert.throws(throwingSecond, /Second$/); - * - * // If the error message does not match, an AssertionError is thrown. - * assert.throws(throwingFirst, /Second$/); - * // AssertionError [ERR_ASSERTION] - * ``` - * - * Due to the confusing error-prone notation, avoid a string as the second - * argument. - * @since v0.1.21 - */ - function throws(block: () => unknown, message?: string | Error): void; - function throws(block: () => unknown, error: AssertPredicate, message?: string | Error): void; - /** - * Asserts that the function `fn` does not throw an error. - * - * Using `assert.doesNotThrow()` is actually not useful because there - * is no benefit in catching an error and then rethrowing it. Instead, consider - * adding a comment next to the specific code path that should not throw and keep - * error messages as expressive as possible. - * - * When `assert.doesNotThrow()` is called, it will immediately call the `fn` function. - * - * If an error is thrown and it is the same type as that specified by the `error` parameter, then an `AssertionError` is thrown. If the error is of a - * different type, or if the `error` parameter is undefined, the error is - * propagated back to the caller. - * - * If specified, `error` can be a [`Class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes), - * [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions), or a validation - * function. See {@link throws} for more details. - * - * The following, for instance, will throw the `TypeError` because there is no - * matching error type in the assertion: - * - * ```js - * import assert from 'node:assert/strict'; - * - * assert.doesNotThrow( - * () => { - * throw new TypeError('Wrong value'); - * }, - * SyntaxError, - * ); - * ``` - * - * However, the following will result in an `AssertionError` with the message - * 'Got unwanted exception...': - * - * ```js - * import assert from 'node:assert/strict'; - * - * assert.doesNotThrow( - * () => { - * throw new TypeError('Wrong value'); - * }, - * TypeError, - * ); - * ``` - * - * If an `AssertionError` is thrown and a value is provided for the `message` parameter, the value of `message` will be appended to the `AssertionError` message: - * - * ```js - * import assert from 'node:assert/strict'; - * - * assert.doesNotThrow( - * () => { - * throw new TypeError('Wrong value'); - * }, - * /Wrong value/, - * 'Whoops', - * ); - * // Throws: AssertionError: Got unwanted exception: Whoops - * ``` - * @since v0.1.21 - */ - function doesNotThrow(block: () => unknown, message?: string | Error): void; - function doesNotThrow(block: () => unknown, error: AssertPredicate, message?: string | Error): void; - /** - * Throws `value` if `value` is not `undefined` or `null`. This is useful when - * testing the `error` argument in callbacks. The stack trace contains all frames - * from the error passed to `ifError()` including the potential new frames for `ifError()` itself. - * - * ```js - * import assert from 'node:assert/strict'; - * - * assert.ifError(null); - * // OK - * assert.ifError(0); - * // AssertionError [ERR_ASSERTION]: ifError got unwanted exception: 0 - * assert.ifError('error'); - * // AssertionError [ERR_ASSERTION]: ifError got unwanted exception: 'error' - * assert.ifError(new Error()); - * // AssertionError [ERR_ASSERTION]: ifError got unwanted exception: Error - * - * // Create some random error frames. - * let err; - * (function errorFrame() { - * err = new Error('test error'); - * })(); - * - * (function ifErrorFrame() { - * assert.ifError(err); - * })(); - * // AssertionError [ERR_ASSERTION]: ifError got unwanted exception: test error - * // at ifErrorFrame - * // at errorFrame - * ``` - * @since v0.1.97 - */ - function ifError(value: unknown): asserts value is null | undefined; - /** - * Awaits the `asyncFn` promise or, if `asyncFn` is a function, immediately - * calls the function and awaits the returned promise to complete. It will then - * check that the promise is rejected. - * - * If `asyncFn` is a function and it throws an error synchronously, `assert.rejects()` will return a rejected `Promise` with that error. If the - * function does not return a promise, `assert.rejects()` will return a rejected `Promise` with an [ERR_INVALID_RETURN_VALUE](https://nodejs.org/docs/latest-v25.x/api/errors.html#err_invalid_return_value) - * error. In both cases the error handler is skipped. - * - * Besides the async nature to await the completion behaves identically to {@link throws}. - * - * If specified, `error` can be a [`Class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes), - * [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions), a validation function, - * an object where each property will be tested for, or an instance of error where - * each property will be tested for including the non-enumerable `message` and `name` properties. - * - * If specified, `message` will be the message provided by the `{@link AssertionError}` if the `asyncFn` fails to reject. - * - * ```js - * import assert from 'node:assert/strict'; - * - * await assert.rejects( - * async () => { - * throw new TypeError('Wrong value'); - * }, - * { - * name: 'TypeError', - * message: 'Wrong value', - * }, - * ); - * ``` - * - * ```js - * import assert from 'node:assert/strict'; - * - * await assert.rejects( - * async () => { - * throw new TypeError('Wrong value'); - * }, - * (err) => { - * assert.strictEqual(err.name, 'TypeError'); - * assert.strictEqual(err.message, 'Wrong value'); - * return true; - * }, - * ); - * ``` - * - * ```js - * import assert from 'node:assert/strict'; - * - * assert.rejects( - * Promise.reject(new Error('Wrong value')), - * Error, - * ).then(() => { - * // ... - * }); - * ``` - * - * `error` cannot be a string. If a string is provided as the second argument, then `error` is assumed to - * be omitted and the string will be used for `message` instead. This can lead to easy-to-miss mistakes. Please read the - * example in {@link throws} carefully if using a string as the second argument gets considered. - * @since v10.0.0 - */ - function rejects(block: (() => Promise) | Promise, message?: string | Error): Promise; - function rejects( - block: (() => Promise) | Promise, - error: AssertPredicate, - message?: string | Error, - ): Promise; - /** - * Awaits the `asyncFn` promise or, if `asyncFn` is a function, immediately - * calls the function and awaits the returned promise to complete. It will then - * check that the promise is not rejected. - * - * If `asyncFn` is a function and it throws an error synchronously, `assert.doesNotReject()` will return a rejected `Promise` with that error. If - * the function does not return a promise, `assert.doesNotReject()` will return a - * rejected `Promise` with an [ERR_INVALID_RETURN_VALUE](https://nodejs.org/docs/latest-v25.x/api/errors.html#err_invalid_return_value) error. In both cases - * the error handler is skipped. - * - * Using `assert.doesNotReject()` is actually not useful because there is little - * benefit in catching a rejection and then rejecting it again. Instead, consider - * adding a comment next to the specific code path that should not reject and keep - * error messages as expressive as possible. - * - * If specified, `error` can be a [`Class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes), - * [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions), or a validation - * function. See {@link throws} for more details. - * - * Besides the async nature to await the completion behaves identically to {@link doesNotThrow}. - * - * ```js - * import assert from 'node:assert/strict'; - * - * await assert.doesNotReject( - * async () => { - * throw new TypeError('Wrong value'); - * }, - * SyntaxError, - * ); - * ``` - * - * ```js - * import assert from 'node:assert/strict'; - * - * assert.doesNotReject(Promise.reject(new TypeError('Wrong value'))) - * .then(() => { - * // ... - * }); - * ``` - * @since v10.0.0 - */ - function doesNotReject( - block: (() => Promise) | Promise, - message?: string | Error, - ): Promise; - function doesNotReject( - block: (() => Promise) | Promise, - error: AssertPredicate, - message?: string | Error, - ): Promise; - /** - * Expects the `string` input to match the regular expression. - * - * ```js - * import assert from 'node:assert/strict'; - * - * assert.match('I will fail', /pass/); - * // AssertionError [ERR_ASSERTION]: The input did not match the regular ... - * - * assert.match(123, /pass/); - * // AssertionError [ERR_ASSERTION]: The "string" argument must be of type string. - * - * assert.match('I will pass', /pass/); - * // OK - * ``` - * - * If the values do not match, or if the `string` argument is of another type than `string`, an `{@link AssertionError}` is thrown with a `message` property set equal - * to the value of the `message` parameter. If the `message` parameter is - * undefined, a default error message is assigned. If the `message` parameter is an - * instance of an [Error](https://nodejs.org/docs/latest-v25.x/api/errors.html#class-error) then it will be thrown instead of the `{@link AssertionError}`. - * @since v13.6.0, v12.16.0 - */ - function match(value: string, regExp: RegExp, message?: string | Error): void; - /** - * Expects the `string` input not to match the regular expression. - * - * ```js - * import assert from 'node:assert/strict'; - * - * assert.doesNotMatch('I will fail', /fail/); - * // AssertionError [ERR_ASSERTION]: The input was expected to not match the ... - * - * assert.doesNotMatch(123, /pass/); - * // AssertionError [ERR_ASSERTION]: The "string" argument must be of type string. - * - * assert.doesNotMatch('I will pass', /different/); - * // OK - * ``` - * - * If the values do match, or if the `string` argument is of another type than `string`, an `{@link AssertionError}` is thrown with a `message` property set equal - * to the value of the `message` parameter. If the `message` parameter is - * undefined, a default error message is assigned. If the `message` parameter is an - * instance of an [Error](https://nodejs.org/docs/latest-v25.x/api/errors.html#class-error) then it will be thrown instead of the `{@link AssertionError}`. - * @since v13.6.0, v12.16.0 - */ - function doesNotMatch(value: string, regExp: RegExp, message?: string | Error): void; - /** - * Tests for partial deep equality between the `actual` and `expected` parameters. - * "Deep" equality means that the enumerable "own" properties of child objects - * are recursively evaluated also by the following rules. "Partial" equality means - * that only properties that exist on the `expected` parameter are going to be - * compared. - * - * This method always passes the same test cases as `assert.deepStrictEqual()`, - * behaving as a super set of it. - * @since v22.13.0 - */ - function partialDeepStrictEqual(actual: unknown, expected: unknown, message?: string | Error): void; - } - namespace assert { - export { strict }; - } - export = assert; -} -declare module "assert" { - import assert = require("node:assert"); - export = assert; -} diff --git a/PBandGraphScaffold/node_modules/@types/node/assert/strict.d.ts b/PBandGraphScaffold/node_modules/@types/node/assert/strict.d.ts deleted file mode 100644 index 51bb352..0000000 --- a/PBandGraphScaffold/node_modules/@types/node/assert/strict.d.ts +++ /dev/null @@ -1,105 +0,0 @@ -/** - * In strict assertion mode, non-strict methods behave like their corresponding - * strict methods. For example, `assert.deepEqual()` will behave like - * `assert.deepStrictEqual()`. - * - * In strict assertion mode, error messages for objects display a diff. In legacy - * assertion mode, error messages for objects display the objects, often truncated. - * - * To use strict assertion mode: - * - * ```js - * import { strict as assert } from 'node:assert'; - * ``` - * - * ```js - * import assert from 'node:assert/strict'; - * ``` - * - * Example error diff: - * - * ```js - * import { strict as assert } from 'node:assert'; - * - * assert.deepEqual([[[1, 2, 3]], 4, 5], [[[1, 2, '3']], 4, 5]); - * // AssertionError: Expected inputs to be strictly deep-equal: - * // + actual - expected ... Lines skipped - * // - * // [ - * // [ - * // ... - * // 2, - * // + 3 - * // - '3' - * // ], - * // ... - * // 5 - * // ] - * ``` - * - * To deactivate the colors, use the `NO_COLOR` or `NODE_DISABLE_COLORS` - * environment variables. This will also deactivate the colors in the REPL. For - * more on color support in terminal environments, read the tty - * [`getColorDepth()`](https://nodejs.org/docs/latest-v25.x/api/tty.html#writestreamgetcolordepthenv) documentation. - * @since v15.0.0 - * @see [source](https://github.com/nodejs/node/blob/v25.x/lib/assert/strict.js) - */ -declare module "node:assert/strict" { - import { - Assert, - AssertionError, - AssertionErrorOptions, - AssertOptions, - AssertPredicate, - AssertStrict, - deepStrictEqual, - doesNotMatch, - doesNotReject, - doesNotThrow, - fail, - ifError, - match, - notDeepStrictEqual, - notStrictEqual, - ok, - partialDeepStrictEqual, - rejects, - strictEqual, - throws, - } from "node:assert"; - function strict(value: unknown, message?: string | Error): asserts value; - namespace strict { - export { - Assert, - AssertionError, - AssertionErrorOptions, - AssertOptions, - AssertPredicate, - AssertStrict, - deepStrictEqual, - deepStrictEqual as deepEqual, - doesNotMatch, - doesNotReject, - doesNotThrow, - fail, - ifError, - match, - notDeepStrictEqual, - notDeepStrictEqual as notDeepEqual, - notStrictEqual, - notStrictEqual as notEqual, - ok, - partialDeepStrictEqual, - rejects, - strict, - strictEqual, - strictEqual as equal, - throws, - }; - } - export = strict; -} -declare module "assert/strict" { - import strict = require("node:assert/strict"); - export = strict; -} diff --git a/PBandGraphScaffold/node_modules/@types/node/async_hooks.d.ts b/PBandGraphScaffold/node_modules/@types/node/async_hooks.d.ts deleted file mode 100644 index aa692c1..0000000 --- a/PBandGraphScaffold/node_modules/@types/node/async_hooks.d.ts +++ /dev/null @@ -1,623 +0,0 @@ -/** - * We strongly discourage the use of the `async_hooks` API. - * Other APIs that can cover most of its use cases include: - * - * * [`AsyncLocalStorage`](https://nodejs.org/docs/latest-v25.x/api/async_context.html#class-asynclocalstorage) tracks async context - * * [`process.getActiveResourcesInfo()`](https://nodejs.org/docs/latest-v25.x/api/process.html#processgetactiveresourcesinfo) tracks active resources - * - * The `node:async_hooks` module provides an API to track asynchronous resources. - * It can be accessed using: - * - * ```js - * import async_hooks from 'node:async_hooks'; - * ``` - * @experimental - * @see [source](https://github.com/nodejs/node/blob/v25.x/lib/async_hooks.js) - */ -declare module "node:async_hooks" { - /** - * ```js - * import { executionAsyncId } from 'node:async_hooks'; - * import fs from 'node:fs'; - * - * console.log(executionAsyncId()); // 1 - bootstrap - * const path = '.'; - * fs.open(path, 'r', (err, fd) => { - * console.log(executionAsyncId()); // 6 - open() - * }); - * ``` - * - * The ID returned from `executionAsyncId()` is related to execution timing, not - * causality (which is covered by `triggerAsyncId()`): - * - * ```js - * const server = net.createServer((conn) => { - * // Returns the ID of the server, not of the new connection, because the - * // callback runs in the execution scope of the server's MakeCallback(). - * async_hooks.executionAsyncId(); - * - * }).listen(port, () => { - * // Returns the ID of a TickObject (process.nextTick()) because all - * // callbacks passed to .listen() are wrapped in a nextTick(). - * async_hooks.executionAsyncId(); - * }); - * ``` - * - * Promise contexts may not get precise `executionAsyncIds` by default. - * See the section on [promise execution tracking](https://nodejs.org/docs/latest-v25.x/api/async_hooks.html#promise-execution-tracking). - * @since v8.1.0 - * @return The `asyncId` of the current execution context. Useful to track when something calls. - */ - function executionAsyncId(): number; - /** - * Resource objects returned by `executionAsyncResource()` are most often internal - * Node.js handle objects with undocumented APIs. Using any functions or properties - * on the object is likely to crash your application and should be avoided. - * - * Using `executionAsyncResource()` in the top-level execution context will - * return an empty object as there is no handle or request object to use, - * but having an object representing the top-level can be helpful. - * - * ```js - * import { open } from 'node:fs'; - * import { executionAsyncId, executionAsyncResource } from 'node:async_hooks'; - * - * console.log(executionAsyncId(), executionAsyncResource()); // 1 {} - * open(new URL(import.meta.url), 'r', (err, fd) => { - * console.log(executionAsyncId(), executionAsyncResource()); // 7 FSReqWrap - * }); - * ``` - * - * This can be used to implement continuation local storage without the - * use of a tracking `Map` to store the metadata: - * - * ```js - * import { createServer } from 'node:http'; - * import { - * executionAsyncId, - * executionAsyncResource, - * createHook, - * } from 'node:async_hooks'; - * const sym = Symbol('state'); // Private symbol to avoid pollution - * - * createHook({ - * init(asyncId, type, triggerAsyncId, resource) { - * const cr = executionAsyncResource(); - * if (cr) { - * resource[sym] = cr[sym]; - * } - * }, - * }).enable(); - * - * const server = createServer((req, res) => { - * executionAsyncResource()[sym] = { state: req.url }; - * setTimeout(function() { - * res.end(JSON.stringify(executionAsyncResource()[sym])); - * }, 100); - * }).listen(3000); - * ``` - * @since v13.9.0, v12.17.0 - * @return The resource representing the current execution. Useful to store data within the resource. - */ - function executionAsyncResource(): object; - /** - * ```js - * const server = net.createServer((conn) => { - * // The resource that caused (or triggered) this callback to be called - * // was that of the new connection. Thus the return value of triggerAsyncId() - * // is the asyncId of "conn". - * async_hooks.triggerAsyncId(); - * - * }).listen(port, () => { - * // Even though all callbacks passed to .listen() are wrapped in a nextTick() - * // the callback itself exists because the call to the server's .listen() - * // was made. So the return value would be the ID of the server. - * async_hooks.triggerAsyncId(); - * }); - * ``` - * - * Promise contexts may not get valid `triggerAsyncId`s by default. See - * the section on [promise execution tracking](https://nodejs.org/docs/latest-v25.x/api/async_hooks.html#promise-execution-tracking). - * @return The ID of the resource responsible for calling the callback that is currently being executed. - */ - function triggerAsyncId(): number; - interface HookCallbacks { - /** - * Called when a class is constructed that has the possibility to emit an asynchronous event. - * @param asyncId A unique ID for the async resource - * @param type The type of the async resource - * @param triggerAsyncId The unique ID of the async resource in whose execution context this async resource was created - * @param resource Reference to the resource representing the async operation, needs to be released during destroy - */ - init?(asyncId: number, type: string, triggerAsyncId: number, resource: object): void; - /** - * When an asynchronous operation is initiated or completes a callback is called to notify the user. - * The before callback is called just before said callback is executed. - * @param asyncId the unique identifier assigned to the resource about to execute the callback. - */ - before?(asyncId: number): void; - /** - * Called immediately after the callback specified in `before` is completed. - * - * If an uncaught exception occurs during execution of the callback, then `after` will run after the `'uncaughtException'` event is emitted or a `domain`'s handler runs. - * @param asyncId the unique identifier assigned to the resource which has executed the callback. - */ - after?(asyncId: number): void; - /** - * Called when a promise has resolve() called. This may not be in the same execution id - * as the promise itself. - * @param asyncId the unique id for the promise that was resolve()d. - */ - promiseResolve?(asyncId: number): void; - /** - * Called after the resource corresponding to asyncId is destroyed - * @param asyncId a unique ID for the async resource - */ - destroy?(asyncId: number): void; - } - interface AsyncHook { - /** - * Enable the callbacks for a given AsyncHook instance. If no callbacks are provided enabling is a noop. - */ - enable(): this; - /** - * Disable the callbacks for a given AsyncHook instance from the global pool of AsyncHook callbacks to be executed. Once a hook has been disabled it will not be called again until enabled. - */ - disable(): this; - } - /** - * Registers functions to be called for different lifetime events of each async - * operation. - * - * The callbacks `init()`/`before()`/`after()`/`destroy()` are called for the - * respective asynchronous event during a resource's lifetime. - * - * All callbacks are optional. For example, if only resource cleanup needs to - * be tracked, then only the `destroy` callback needs to be passed. The - * specifics of all functions that can be passed to `callbacks` is in the `Hook Callbacks` section. - * - * ```js - * import { createHook } from 'node:async_hooks'; - * - * const asyncHook = createHook({ - * init(asyncId, type, triggerAsyncId, resource) { }, - * destroy(asyncId) { }, - * }); - * ``` - * - * The callbacks will be inherited via the prototype chain: - * - * ```js - * class MyAsyncCallbacks { - * init(asyncId, type, triggerAsyncId, resource) { } - * destroy(asyncId) {} - * } - * - * class MyAddedCallbacks extends MyAsyncCallbacks { - * before(asyncId) { } - * after(asyncId) { } - * } - * - * const asyncHook = async_hooks.createHook(new MyAddedCallbacks()); - * ``` - * - * Because promises are asynchronous resources whose lifecycle is tracked - * via the async hooks mechanism, the `init()`, `before()`, `after()`, and`destroy()` callbacks _must not_ be async functions that return promises. - * @since v8.1.0 - * @param callbacks The `Hook Callbacks` to register - * @return Instance used for disabling and enabling hooks - */ - function createHook(callbacks: HookCallbacks): AsyncHook; - interface AsyncResourceOptions { - /** - * The ID of the execution context that created this async event. - * @default executionAsyncId() - */ - triggerAsyncId?: number | undefined; - /** - * Disables automatic `emitDestroy` when the object is garbage collected. - * This usually does not need to be set (even if `emitDestroy` is called - * manually), unless the resource's `asyncId` is retrieved and the - * sensitive API's `emitDestroy` is called with it. - * @default false - */ - requireManualDestroy?: boolean | undefined; - } - /** - * The class `AsyncResource` is designed to be extended by the embedder's async - * resources. Using this, users can easily trigger the lifetime events of their - * own resources. - * - * The `init` hook will trigger when an `AsyncResource` is instantiated. - * - * The following is an overview of the `AsyncResource` API. - * - * ```js - * import { AsyncResource, executionAsyncId } from 'node:async_hooks'; - * - * // AsyncResource() is meant to be extended. Instantiating a - * // new AsyncResource() also triggers init. If triggerAsyncId is omitted then - * // async_hook.executionAsyncId() is used. - * const asyncResource = new AsyncResource( - * type, { triggerAsyncId: executionAsyncId(), requireManualDestroy: false }, - * ); - * - * // Run a function in the execution context of the resource. This will - * // * establish the context of the resource - * // * trigger the AsyncHooks before callbacks - * // * call the provided function `fn` with the supplied arguments - * // * trigger the AsyncHooks after callbacks - * // * restore the original execution context - * asyncResource.runInAsyncScope(fn, thisArg, ...args); - * - * // Call AsyncHooks destroy callbacks. - * asyncResource.emitDestroy(); - * - * // Return the unique ID assigned to the AsyncResource instance. - * asyncResource.asyncId(); - * - * // Return the trigger ID for the AsyncResource instance. - * asyncResource.triggerAsyncId(); - * ``` - */ - class AsyncResource { - /** - * AsyncResource() is meant to be extended. Instantiating a - * new AsyncResource() also triggers init. If triggerAsyncId is omitted then - * async_hook.executionAsyncId() is used. - * @param type The type of async event. - * @param triggerAsyncId The ID of the execution context that created - * this async event (default: `executionAsyncId()`), or an - * AsyncResourceOptions object (since v9.3.0) - */ - constructor(type: string, triggerAsyncId?: number | AsyncResourceOptions); - /** - * Binds the given function to the current execution context. - * @since v14.8.0, v12.19.0 - * @param fn The function to bind to the current execution context. - * @param type An optional name to associate with the underlying `AsyncResource`. - */ - static bind any, ThisArg>( - fn: Func, - type?: string, - thisArg?: ThisArg, - ): Func; - /** - * Binds the given function to execute to this `AsyncResource`'s scope. - * @since v14.8.0, v12.19.0 - * @param fn The function to bind to the current `AsyncResource`. - */ - bind any>(fn: Func): Func; - /** - * Call the provided function with the provided arguments in the execution context - * of the async resource. This will establish the context, trigger the AsyncHooks - * before callbacks, call the function, trigger the AsyncHooks after callbacks, and - * then restore the original execution context. - * @since v9.6.0 - * @param fn The function to call in the execution context of this async resource. - * @param thisArg The receiver to be used for the function call. - * @param args Optional arguments to pass to the function. - */ - runInAsyncScope( - fn: (this: This, ...args: any[]) => Result, - thisArg?: This, - ...args: any[] - ): Result; - /** - * Call all `destroy` hooks. This should only ever be called once. An error will - * be thrown if it is called more than once. This **must** be manually called. If - * the resource is left to be collected by the GC then the `destroy` hooks will - * never be called. - * @return A reference to `asyncResource`. - */ - emitDestroy(): this; - /** - * @return The unique `asyncId` assigned to the resource. - */ - asyncId(): number; - /** - * @return The same `triggerAsyncId` that is passed to the `AsyncResource` constructor. - */ - triggerAsyncId(): number; - } - interface AsyncLocalStorageOptions { - /** - * The default value to be used when no store is provided. - */ - defaultValue?: any; - /** - * A name for the `AsyncLocalStorage` value. - */ - name?: string | undefined; - } - /** - * This class creates stores that stay coherent through asynchronous operations. - * - * While you can create your own implementation on top of the `node:async_hooks` module, `AsyncLocalStorage` should be preferred as it is a performant and memory - * safe implementation that involves significant optimizations that are non-obvious - * to implement. - * - * The following example uses `AsyncLocalStorage` to build a simple logger - * that assigns IDs to incoming HTTP requests and includes them in messages - * logged within each request. - * - * ```js - * import http from 'node:http'; - * import { AsyncLocalStorage } from 'node:async_hooks'; - * - * const asyncLocalStorage = new AsyncLocalStorage(); - * - * function logWithId(msg) { - * const id = asyncLocalStorage.getStore(); - * console.log(`${id !== undefined ? id : '-'}:`, msg); - * } - * - * let idSeq = 0; - * http.createServer((req, res) => { - * asyncLocalStorage.run(idSeq++, () => { - * logWithId('start'); - * // Imagine any chain of async operations here - * setImmediate(() => { - * logWithId('finish'); - * res.end(); - * }); - * }); - * }).listen(8080); - * - * http.get('http://localhost:8080'); - * http.get('http://localhost:8080'); - * // Prints: - * // 0: start - * // 0: finish - * // 1: start - * // 1: finish - * ``` - * - * Each instance of `AsyncLocalStorage` maintains an independent storage context. - * Multiple instances can safely exist simultaneously without risk of interfering - * with each other's data. - * @since v13.10.0, v12.17.0 - */ - class AsyncLocalStorage { - /** - * Creates a new instance of `AsyncLocalStorage`. Store is only provided within a - * `run()` call or after an `enterWith()` call. - */ - constructor(options?: AsyncLocalStorageOptions); - /** - * Binds the given function to the current execution context. - * @since v19.8.0 - * @param fn The function to bind to the current execution context. - * @return A new function that calls `fn` within the captured execution context. - */ - static bind any>(fn: Func): Func; - /** - * Captures the current execution context and returns a function that accepts a - * function as an argument. Whenever the returned function is called, it - * calls the function passed to it within the captured context. - * - * ```js - * const asyncLocalStorage = new AsyncLocalStorage(); - * const runInAsyncScope = asyncLocalStorage.run(123, () => AsyncLocalStorage.snapshot()); - * const result = asyncLocalStorage.run(321, () => runInAsyncScope(() => asyncLocalStorage.getStore())); - * console.log(result); // returns 123 - * ``` - * - * AsyncLocalStorage.snapshot() can replace the use of AsyncResource for simple - * async context tracking purposes, for example: - * - * ```js - * class Foo { - * #runInAsyncScope = AsyncLocalStorage.snapshot(); - * - * get() { return this.#runInAsyncScope(() => asyncLocalStorage.getStore()); } - * } - * - * const foo = asyncLocalStorage.run(123, () => new Foo()); - * console.log(asyncLocalStorage.run(321, () => foo.get())); // returns 123 - * ``` - * @since v19.8.0 - * @return A new function with the signature `(fn: (...args) : R, ...args) : R`. - */ - static snapshot(): (fn: (...args: TArgs) => R, ...args: TArgs) => R; - /** - * Disables the instance of `AsyncLocalStorage`. All subsequent calls - * to `asyncLocalStorage.getStore()` will return `undefined` until `asyncLocalStorage.run()` or `asyncLocalStorage.enterWith()` is called again. - * - * When calling `asyncLocalStorage.disable()`, all current contexts linked to the - * instance will be exited. - * - * Calling `asyncLocalStorage.disable()` is required before the `asyncLocalStorage` can be garbage collected. This does not apply to stores - * provided by the `asyncLocalStorage`, as those objects are garbage collected - * along with the corresponding async resources. - * - * Use this method when the `asyncLocalStorage` is not in use anymore - * in the current process. - * @since v13.10.0, v12.17.0 - * @experimental - */ - disable(): void; - /** - * Returns the current store. - * If called outside of an asynchronous context initialized by - * calling `asyncLocalStorage.run()` or `asyncLocalStorage.enterWith()`, it - * returns `undefined`. - * @since v13.10.0, v12.17.0 - */ - getStore(): T | undefined; - /** - * The name of the `AsyncLocalStorage` instance if provided. - * @since v24.0.0 - */ - readonly name: string; - /** - * Runs a function synchronously within a context and returns its - * return value. The store is not accessible outside of the callback function. - * The store is accessible to any asynchronous operations created within the - * callback. - * - * The optional `args` are passed to the callback function. - * - * If the callback function throws an error, the error is thrown by `run()` too. - * The stacktrace is not impacted by this call and the context is exited. - * - * Example: - * - * ```js - * const store = { id: 2 }; - * try { - * asyncLocalStorage.run(store, () => { - * asyncLocalStorage.getStore(); // Returns the store object - * setTimeout(() => { - * asyncLocalStorage.getStore(); // Returns the store object - * }, 200); - * throw new Error(); - * }); - * } catch (e) { - * asyncLocalStorage.getStore(); // Returns undefined - * // The error will be caught here - * } - * ``` - * @since v13.10.0, v12.17.0 - */ - run(store: T, callback: () => R): R; - run(store: T, callback: (...args: TArgs) => R, ...args: TArgs): R; - /** - * Runs a function synchronously outside of a context and returns its - * return value. The store is not accessible within the callback function or - * the asynchronous operations created within the callback. Any `getStore()` call done within the callback function will always return `undefined`. - * - * The optional `args` are passed to the callback function. - * - * If the callback function throws an error, the error is thrown by `exit()` too. - * The stacktrace is not impacted by this call and the context is re-entered. - * - * Example: - * - * ```js - * // Within a call to run - * try { - * asyncLocalStorage.getStore(); // Returns the store object or value - * asyncLocalStorage.exit(() => { - * asyncLocalStorage.getStore(); // Returns undefined - * throw new Error(); - * }); - * } catch (e) { - * asyncLocalStorage.getStore(); // Returns the same object or value - * // The error will be caught here - * } - * ``` - * @since v13.10.0, v12.17.0 - * @experimental - */ - exit(callback: (...args: TArgs) => R, ...args: TArgs): R; - /** - * Transitions into the context for the remainder of the current - * synchronous execution and then persists the store through any following - * asynchronous calls. - * - * Example: - * - * ```js - * const store = { id: 1 }; - * // Replaces previous store with the given store object - * asyncLocalStorage.enterWith(store); - * asyncLocalStorage.getStore(); // Returns the store object - * someAsyncOperation(() => { - * asyncLocalStorage.getStore(); // Returns the same object - * }); - * ``` - * - * This transition will continue for the _entire_ synchronous execution. - * This means that if, for example, the context is entered within an event - * handler subsequent event handlers will also run within that context unless - * specifically bound to another context with an `AsyncResource`. That is why `run()` should be preferred over `enterWith()` unless there are strong reasons - * to use the latter method. - * - * ```js - * const store = { id: 1 }; - * - * emitter.on('my-event', () => { - * asyncLocalStorage.enterWith(store); - * }); - * emitter.on('my-event', () => { - * asyncLocalStorage.getStore(); // Returns the same object - * }); - * - * asyncLocalStorage.getStore(); // Returns undefined - * emitter.emit('my-event'); - * asyncLocalStorage.getStore(); // Returns the same object - * ``` - * @since v13.11.0, v12.17.0 - * @experimental - */ - enterWith(store: T): void; - } - /** - * @since v17.2.0, v16.14.0 - * @return A map of provider types to the corresponding numeric id. - * This map contains all the event types that might be emitted by the `async_hooks.init()` event. - */ - namespace asyncWrapProviders { - const NONE: number; - const DIRHANDLE: number; - const DNSCHANNEL: number; - const ELDHISTOGRAM: number; - const FILEHANDLE: number; - const FILEHANDLECLOSEREQ: number; - const FIXEDSIZEBLOBCOPY: number; - const FSEVENTWRAP: number; - const FSREQCALLBACK: number; - const FSREQPROMISE: number; - const GETADDRINFOREQWRAP: number; - const GETNAMEINFOREQWRAP: number; - const HEAPSNAPSHOT: number; - const HTTP2SESSION: number; - const HTTP2STREAM: number; - const HTTP2PING: number; - const HTTP2SETTINGS: number; - const HTTPINCOMINGMESSAGE: number; - const HTTPCLIENTREQUEST: number; - const JSSTREAM: number; - const JSUDPWRAP: number; - const MESSAGEPORT: number; - const PIPECONNECTWRAP: number; - const PIPESERVERWRAP: number; - const PIPEWRAP: number; - const PROCESSWRAP: number; - const PROMISE: number; - const QUERYWRAP: number; - const SHUTDOWNWRAP: number; - const SIGNALWRAP: number; - const STATWATCHER: number; - const STREAMPIPE: number; - const TCPCONNECTWRAP: number; - const TCPSERVERWRAP: number; - const TCPWRAP: number; - const TTYWRAP: number; - const UDPSENDWRAP: number; - const UDPWRAP: number; - const SIGINTWATCHDOG: number; - const WORKER: number; - const WORKERHEAPSNAPSHOT: number; - const WRITEWRAP: number; - const ZLIB: number; - const CHECKPRIMEREQUEST: number; - const PBKDF2REQUEST: number; - const KEYPAIRGENREQUEST: number; - const KEYGENREQUEST: number; - const KEYEXPORTREQUEST: number; - const CIPHERREQUEST: number; - const DERIVEBITSREQUEST: number; - const HASHREQUEST: number; - const RANDOMBYTESREQUEST: number; - const RANDOMPRIMEREQUEST: number; - const SCRYPTREQUEST: number; - const SIGNREQUEST: number; - const TLSWRAP: number; - const VERIFYREQUEST: number; - } -} -declare module "async_hooks" { - export * from "node:async_hooks"; -} diff --git a/PBandGraphScaffold/node_modules/@types/node/buffer.buffer.d.ts b/PBandGraphScaffold/node_modules/@types/node/buffer.buffer.d.ts deleted file mode 100644 index a3c2304..0000000 --- a/PBandGraphScaffold/node_modules/@types/node/buffer.buffer.d.ts +++ /dev/null @@ -1,466 +0,0 @@ -declare module "node:buffer" { - type ImplicitArrayBuffer> = T extends - { valueOf(): infer V extends ArrayBufferLike } ? V : T; - global { - interface BufferConstructor { - // see buffer.d.ts for implementation shared with all TypeScript versions - - /** - * Allocates a new buffer containing the given {str}. - * - * @param str String to store in buffer. - * @param encoding encoding to use, optional. Default is 'utf8' - * @deprecated since v10.0.0 - Use `Buffer.from(string[, encoding])` instead. - */ - new(str: string, encoding?: BufferEncoding): Buffer; - /** - * Allocates a new buffer of {size} octets. - * - * @param size count of octets to allocate. - * @deprecated since v10.0.0 - Use `Buffer.alloc()` instead (also see `Buffer.allocUnsafe()`). - */ - new(size: number): Buffer; - /** - * Allocates a new buffer containing the given {array} of octets. - * - * @param array The octets to store. - * @deprecated since v10.0.0 - Use `Buffer.from(array)` instead. - */ - new(array: ArrayLike): Buffer; - /** - * Produces a Buffer backed by the same allocated memory as - * the given {ArrayBuffer}/{SharedArrayBuffer}. - * - * @param arrayBuffer The ArrayBuffer with which to share memory. - * @deprecated since v10.0.0 - Use `Buffer.from(arrayBuffer[, byteOffset[, length]])` instead. - */ - new(arrayBuffer: TArrayBuffer): Buffer; - /** - * Allocates a new `Buffer` using an `array` of bytes in the range `0` – `255`. - * Array entries outside that range will be truncated to fit into it. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * // Creates a new Buffer containing the UTF-8 bytes of the string 'buffer'. - * const buf = Buffer.from([0x62, 0x75, 0x66, 0x66, 0x65, 0x72]); - * ``` - * - * If `array` is an `Array`-like object (that is, one with a `length` property of - * type `number`), it is treated as if it is an array, unless it is a `Buffer` or - * a `Uint8Array`. This means all other `TypedArray` variants get treated as an - * `Array`. To create a `Buffer` from the bytes backing a `TypedArray`, use - * `Buffer.copyBytesFrom()`. - * - * A `TypeError` will be thrown if `array` is not an `Array` or another type - * appropriate for `Buffer.from()` variants. - * - * `Buffer.from(array)` and `Buffer.from(string)` may also use the internal - * `Buffer` pool like `Buffer.allocUnsafe()` does. - * @since v5.10.0 - */ - from(array: WithImplicitCoercion>): Buffer; - /** - * This creates a view of the `ArrayBuffer` without copying the underlying - * memory. For example, when passed a reference to the `.buffer` property of a - * `TypedArray` instance, the newly created `Buffer` will share the same - * allocated memory as the `TypedArray`'s underlying `ArrayBuffer`. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const arr = new Uint16Array(2); - * - * arr[0] = 5000; - * arr[1] = 4000; - * - * // Shares memory with `arr`. - * const buf = Buffer.from(arr.buffer); - * - * console.log(buf); - * // Prints: - * - * // Changing the original Uint16Array changes the Buffer also. - * arr[1] = 6000; - * - * console.log(buf); - * // Prints: - * ``` - * - * The optional `byteOffset` and `length` arguments specify a memory range within - * the `arrayBuffer` that will be shared by the `Buffer`. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const ab = new ArrayBuffer(10); - * const buf = Buffer.from(ab, 0, 2); - * - * console.log(buf.length); - * // Prints: 2 - * ``` - * - * A `TypeError` will be thrown if `arrayBuffer` is not an `ArrayBuffer` or a - * `SharedArrayBuffer` or another type appropriate for `Buffer.from()` - * variants. - * - * It is important to remember that a backing `ArrayBuffer` can cover a range - * of memory that extends beyond the bounds of a `TypedArray` view. A new - * `Buffer` created using the `buffer` property of a `TypedArray` may extend - * beyond the range of the `TypedArray`: - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const arrA = Uint8Array.from([0x63, 0x64, 0x65, 0x66]); // 4 elements - * const arrB = new Uint8Array(arrA.buffer, 1, 2); // 2 elements - * console.log(arrA.buffer === arrB.buffer); // true - * - * const buf = Buffer.from(arrB.buffer); - * console.log(buf); - * // Prints: - * ``` - * @since v5.10.0 - * @param arrayBuffer An `ArrayBuffer`, `SharedArrayBuffer`, for example the - * `.buffer` property of a `TypedArray`. - * @param byteOffset Index of first byte to expose. **Default:** `0`. - * @param length Number of bytes to expose. **Default:** - * `arrayBuffer.byteLength - byteOffset`. - */ - from>( - arrayBuffer: TArrayBuffer, - byteOffset?: number, - length?: number, - ): Buffer>; - /** - * Creates a new `Buffer` containing `string`. The `encoding` parameter identifies - * the character encoding to be used when converting `string` into bytes. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf1 = Buffer.from('this is a tést'); - * const buf2 = Buffer.from('7468697320697320612074c3a97374', 'hex'); - * - * console.log(buf1.toString()); - * // Prints: this is a tést - * console.log(buf2.toString()); - * // Prints: this is a tést - * console.log(buf1.toString('latin1')); - * // Prints: this is a tést - * ``` - * - * A `TypeError` will be thrown if `string` is not a string or another type - * appropriate for `Buffer.from()` variants. - * - * `Buffer.from(string)` may also use the internal `Buffer` pool like - * `Buffer.allocUnsafe()` does. - * @since v5.10.0 - * @param string A string to encode. - * @param encoding The encoding of `string`. **Default:** `'utf8'`. - */ - from(string: WithImplicitCoercion, encoding?: BufferEncoding): Buffer; - from(arrayOrString: WithImplicitCoercion | string>): Buffer; - /** - * Creates a new Buffer using the passed {data} - * @param values to create a new Buffer - */ - of(...items: number[]): Buffer; - /** - * Returns a new `Buffer` which is the result of concatenating all the `Buffer` instances in the `list` together. - * - * If the list has no items, or if the `totalLength` is 0, then a new zero-length `Buffer` is returned. - * - * If `totalLength` is not provided, it is calculated from the `Buffer` instances - * in `list` by adding their lengths. - * - * If `totalLength` is provided, it is coerced to an unsigned integer. If the - * combined length of the `Buffer`s in `list` exceeds `totalLength`, the result is - * truncated to `totalLength`. If the combined length of the `Buffer`s in `list` is - * less than `totalLength`, the remaining space is filled with zeros. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * // Create a single `Buffer` from a list of three `Buffer` instances. - * - * const buf1 = Buffer.alloc(10); - * const buf2 = Buffer.alloc(14); - * const buf3 = Buffer.alloc(18); - * const totalLength = buf1.length + buf2.length + buf3.length; - * - * console.log(totalLength); - * // Prints: 42 - * - * const bufA = Buffer.concat([buf1, buf2, buf3], totalLength); - * - * console.log(bufA); - * // Prints: - * console.log(bufA.length); - * // Prints: 42 - * ``` - * - * `Buffer.concat()` may also use the internal `Buffer` pool like `Buffer.allocUnsafe()` does. - * @since v0.7.11 - * @param list List of `Buffer` or {@link Uint8Array} instances to concatenate. - * @param totalLength Total length of the `Buffer` instances in `list` when concatenated. - */ - concat(list: readonly Uint8Array[], totalLength?: number): Buffer; - /** - * Copies the underlying memory of `view` into a new `Buffer`. - * - * ```js - * const u16 = new Uint16Array([0, 0xffff]); - * const buf = Buffer.copyBytesFrom(u16, 1, 1); - * u16[1] = 0; - * console.log(buf.length); // 2 - * console.log(buf[0]); // 255 - * console.log(buf[1]); // 255 - * ``` - * @since v19.8.0 - * @param view The {TypedArray} to copy. - * @param [offset=0] The starting offset within `view`. - * @param [length=view.length - offset] The number of elements from `view` to copy. - */ - copyBytesFrom(view: NodeJS.TypedArray, offset?: number, length?: number): Buffer; - /** - * Allocates a new `Buffer` of `size` bytes. If `fill` is `undefined`, the`Buffer` will be zero-filled. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.alloc(5); - * - * console.log(buf); - * // Prints: - * ``` - * - * If `size` is larger than {@link constants.MAX_LENGTH} or smaller than 0, `ERR_OUT_OF_RANGE` is thrown. - * - * If `fill` is specified, the allocated `Buffer` will be initialized by calling `buf.fill(fill)`. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.alloc(5, 'a'); - * - * console.log(buf); - * // Prints: - * ``` - * - * If both `fill` and `encoding` are specified, the allocated `Buffer` will be - * initialized by calling `buf.fill(fill, encoding)`. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.alloc(11, 'aGVsbG8gd29ybGQ=', 'base64'); - * - * console.log(buf); - * // Prints: - * ``` - * - * Calling `Buffer.alloc()` can be measurably slower than the alternative `Buffer.allocUnsafe()` but ensures that the newly created `Buffer` instance - * contents will never contain sensitive data from previous allocations, including - * data that might not have been allocated for `Buffer`s. - * - * A `TypeError` will be thrown if `size` is not a number. - * @since v5.10.0 - * @param size The desired length of the new `Buffer`. - * @param [fill=0] A value to pre-fill the new `Buffer` with. - * @param [encoding='utf8'] If `fill` is a string, this is its encoding. - */ - alloc(size: number, fill?: string | Uint8Array | number, encoding?: BufferEncoding): Buffer; - /** - * Allocates a new `Buffer` of `size` bytes. If `size` is larger than {@link constants.MAX_LENGTH} or smaller than 0, `ERR_OUT_OF_RANGE` is thrown. - * - * The underlying memory for `Buffer` instances created in this way is _not_ - * _initialized_. The contents of the newly created `Buffer` are unknown and _may contain sensitive data_. Use `Buffer.alloc()` instead to initialize`Buffer` instances with zeroes. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.allocUnsafe(10); - * - * console.log(buf); - * // Prints (contents may vary): - * - * buf.fill(0); - * - * console.log(buf); - * // Prints: - * ``` - * - * A `TypeError` will be thrown if `size` is not a number. - * - * The `Buffer` module pre-allocates an internal `Buffer` instance of - * size `Buffer.poolSize` that is used as a pool for the fast allocation of new `Buffer` instances created using `Buffer.allocUnsafe()`, `Buffer.from(array)`, - * and `Buffer.concat()` only when `size` is less than `Buffer.poolSize >>> 1` (floor of `Buffer.poolSize` divided by two). - * - * Use of this pre-allocated internal memory pool is a key difference between - * calling `Buffer.alloc(size, fill)` vs. `Buffer.allocUnsafe(size).fill(fill)`. - * Specifically, `Buffer.alloc(size, fill)` will _never_ use the internal `Buffer`pool, while `Buffer.allocUnsafe(size).fill(fill)`_will_ use the internal`Buffer` pool if `size` is less - * than or equal to half `Buffer.poolSize`. The - * difference is subtle but can be important when an application requires the - * additional performance that `Buffer.allocUnsafe()` provides. - * @since v5.10.0 - * @param size The desired length of the new `Buffer`. - */ - allocUnsafe(size: number): Buffer; - /** - * Allocates a new `Buffer` of `size` bytes. If `size` is larger than {@link constants.MAX_LENGTH} or smaller than 0, `ERR_OUT_OF_RANGE` is thrown. A zero-length `Buffer` is created if - * `size` is 0. - * - * The underlying memory for `Buffer` instances created in this way is _not_ - * _initialized_. The contents of the newly created `Buffer` are unknown and _may contain sensitive data_. Use `buf.fill(0)` to initialize - * such `Buffer` instances with zeroes. - * - * When using `Buffer.allocUnsafe()` to allocate new `Buffer` instances, - * allocations under 4 KiB are sliced from a single pre-allocated `Buffer`. This - * allows applications to avoid the garbage collection overhead of creating many - * individually allocated `Buffer` instances. This approach improves both - * performance and memory usage by eliminating the need to track and clean up as - * many individual `ArrayBuffer` objects. - * - * However, in the case where a developer may need to retain a small chunk of - * memory from a pool for an indeterminate amount of time, it may be appropriate - * to create an un-pooled `Buffer` instance using `Buffer.allocUnsafeSlow()` and - * then copying out the relevant bits. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * // Need to keep around a few small chunks of memory. - * const store = []; - * - * socket.on('readable', () => { - * let data; - * while (null !== (data = readable.read())) { - * // Allocate for retained data. - * const sb = Buffer.allocUnsafeSlow(10); - * - * // Copy the data into the new allocation. - * data.copy(sb, 0, 0, 10); - * - * store.push(sb); - * } - * }); - * ``` - * - * A `TypeError` will be thrown if `size` is not a number. - * @since v5.12.0 - * @param size The desired length of the new `Buffer`. - */ - allocUnsafeSlow(size: number): Buffer; - } - interface Buffer extends Uint8Array { - // see buffer.d.ts for implementation shared with all TypeScript versions - - /** - * Returns a new `Buffer` that references the same memory as the original, but - * offset and cropped by the `start` and `end` indices. - * - * This method is not compatible with the `Uint8Array.prototype.slice()`, - * which is a superclass of `Buffer`. To copy the slice, use`Uint8Array.prototype.slice()`. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.from('buffer'); - * - * const copiedBuf = Uint8Array.prototype.slice.call(buf); - * copiedBuf[0]++; - * console.log(copiedBuf.toString()); - * // Prints: cuffer - * - * console.log(buf.toString()); - * // Prints: buffer - * - * // With buf.slice(), the original buffer is modified. - * const notReallyCopiedBuf = buf.slice(); - * notReallyCopiedBuf[0]++; - * console.log(notReallyCopiedBuf.toString()); - * // Prints: cuffer - * console.log(buf.toString()); - * // Also prints: cuffer (!) - * ``` - * @since v0.3.0 - * @deprecated Use `subarray` instead. - * @param [start=0] Where the new `Buffer` will start. - * @param [end=buf.length] Where the new `Buffer` will end (not inclusive). - */ - slice(start?: number, end?: number): Buffer; - /** - * Returns a new `Buffer` that references the same memory as the original, but - * offset and cropped by the `start` and `end` indices. - * - * Specifying `end` greater than `buf.length` will return the same result as - * that of `end` equal to `buf.length`. - * - * This method is inherited from [`TypedArray.prototype.subarray()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/subarray). - * - * Modifying the new `Buffer` slice will modify the memory in the original `Buffer`because the allocated memory of the two objects overlap. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * // Create a `Buffer` with the ASCII alphabet, take a slice, and modify one byte - * // from the original `Buffer`. - * - * const buf1 = Buffer.allocUnsafe(26); - * - * for (let i = 0; i < 26; i++) { - * // 97 is the decimal ASCII value for 'a'. - * buf1[i] = i + 97; - * } - * - * const buf2 = buf1.subarray(0, 3); - * - * console.log(buf2.toString('ascii', 0, buf2.length)); - * // Prints: abc - * - * buf1[0] = 33; - * - * console.log(buf2.toString('ascii', 0, buf2.length)); - * // Prints: !bc - * ``` - * - * Specifying negative indexes causes the slice to be generated relative to the - * end of `buf` rather than the beginning. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.from('buffer'); - * - * console.log(buf.subarray(-6, -1).toString()); - * // Prints: buffe - * // (Equivalent to buf.subarray(0, 5).) - * - * console.log(buf.subarray(-6, -2).toString()); - * // Prints: buff - * // (Equivalent to buf.subarray(0, 4).) - * - * console.log(buf.subarray(-5, -2).toString()); - * // Prints: uff - * // (Equivalent to buf.subarray(1, 4).) - * ``` - * @since v3.0.0 - * @param [start=0] Where the new `Buffer` will start. - * @param [end=buf.length] Where the new `Buffer` will end (not inclusive). - */ - subarray(start?: number, end?: number): Buffer; - } - // TODO: remove globals in future version - /** - * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports - * TypeScript versions earlier than 5.7. - */ - type NonSharedBuffer = Buffer; - /** - * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports - * TypeScript versions earlier than 5.7. - */ - type AllowSharedBuffer = Buffer; - } -} diff --git a/PBandGraphScaffold/node_modules/@types/node/buffer.d.ts b/PBandGraphScaffold/node_modules/@types/node/buffer.d.ts deleted file mode 100644 index bb0f004..0000000 --- a/PBandGraphScaffold/node_modules/@types/node/buffer.d.ts +++ /dev/null @@ -1,1810 +0,0 @@ -/** - * `Buffer` objects are used to represent a fixed-length sequence of bytes. Many - * Node.js APIs support `Buffer`s. - * - * The `Buffer` class is a subclass of JavaScript's [`Uint8Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) class and - * extends it with methods that cover additional use cases. Node.js APIs accept - * plain [`Uint8Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) s wherever `Buffer`s are supported as well. - * - * While the `Buffer` class is available within the global scope, it is still - * recommended to explicitly reference it via an import or require statement. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * // Creates a zero-filled Buffer of length 10. - * const buf1 = Buffer.alloc(10); - * - * // Creates a Buffer of length 10, - * // filled with bytes which all have the value `1`. - * const buf2 = Buffer.alloc(10, 1); - * - * // Creates an uninitialized buffer of length 10. - * // This is faster than calling Buffer.alloc() but the returned - * // Buffer instance might contain old data that needs to be - * // overwritten using fill(), write(), or other functions that fill the Buffer's - * // contents. - * const buf3 = Buffer.allocUnsafe(10); - * - * // Creates a Buffer containing the bytes [1, 2, 3]. - * const buf4 = Buffer.from([1, 2, 3]); - * - * // Creates a Buffer containing the bytes [1, 1, 1, 1] – the entries - * // are all truncated using `(value & 255)` to fit into the range 0–255. - * const buf5 = Buffer.from([257, 257.5, -255, '1']); - * - * // Creates a Buffer containing the UTF-8-encoded bytes for the string 'tést': - * // [0x74, 0xc3, 0xa9, 0x73, 0x74] (in hexadecimal notation) - * // [116, 195, 169, 115, 116] (in decimal notation) - * const buf6 = Buffer.from('tést'); - * - * // Creates a Buffer containing the Latin-1 bytes [0x74, 0xe9, 0x73, 0x74]. - * const buf7 = Buffer.from('tést', 'latin1'); - * ``` - * @see [source](https://github.com/nodejs/node/blob/v25.x/lib/buffer.js) - */ -declare module "node:buffer" { - import { ReadableStream } from "node:stream/web"; - /** - * This function returns `true` if `input` contains only valid UTF-8-encoded data, - * including the case in which `input` is empty. - * - * Throws if the `input` is a detached array buffer. - * @since v19.4.0, v18.14.0 - * @param input The input to validate. - */ - export function isUtf8(input: ArrayBuffer | NodeJS.TypedArray): boolean; - /** - * This function returns `true` if `input` contains only valid ASCII-encoded data, - * including the case in which `input` is empty. - * - * Throws if the `input` is a detached array buffer. - * @since v19.6.0, v18.15.0 - * @param input The input to validate. - */ - export function isAscii(input: ArrayBuffer | NodeJS.TypedArray): boolean; - export let INSPECT_MAX_BYTES: number; - export const kMaxLength: number; - export const kStringMaxLength: number; - export const constants: { - MAX_LENGTH: number; - MAX_STRING_LENGTH: number; - }; - export type TranscodeEncoding = - | "ascii" - | "utf8" - | "utf-8" - | "utf16le" - | "utf-16le" - | "ucs2" - | "ucs-2" - | "latin1" - | "binary"; - /** - * Re-encodes the given `Buffer` or `Uint8Array` instance from one character - * encoding to another. Returns a new `Buffer` instance. - * - * Throws if the `fromEnc` or `toEnc` specify invalid character encodings or if - * conversion from `fromEnc` to `toEnc` is not permitted. - * - * Encodings supported by `buffer.transcode()` are: `'ascii'`, `'utf8'`, `'utf16le'`, `'ucs2'`, `'latin1'`, and `'binary'`. - * - * The transcoding process will use substitution characters if a given byte - * sequence cannot be adequately represented in the target encoding. For instance: - * - * ```js - * import { Buffer, transcode } from 'node:buffer'; - * - * const newBuf = transcode(Buffer.from('€'), 'utf8', 'ascii'); - * console.log(newBuf.toString('ascii')); - * // Prints: '?' - * ``` - * - * Because the Euro (`€`) sign is not representable in US-ASCII, it is replaced - * with `?` in the transcoded `Buffer`. - * @since v7.1.0 - * @param source A `Buffer` or `Uint8Array` instance. - * @param fromEnc The current encoding. - * @param toEnc To target encoding. - */ - export function transcode( - source: Uint8Array, - fromEnc: TranscodeEncoding, - toEnc: TranscodeEncoding, - ): NonSharedBuffer; - /** - * Resolves a `'blob:nodedata:...'` an associated `Blob` object registered using - * a prior call to `URL.createObjectURL()`. - * @since v16.7.0 - * @param id A `'blob:nodedata:...` URL string returned by a prior call to `URL.createObjectURL()`. - */ - export function resolveObjectURL(id: string): Blob | undefined; - export { type AllowSharedBuffer, Buffer, type NonSharedBuffer }; - /** @deprecated This alias will be removed in a future version. Use the canonical `BlobPropertyBag` instead. */ - // TODO: remove in future major - export interface BlobOptions extends BlobPropertyBag {} - /** @deprecated This alias will be removed in a future version. Use the canonical `FilePropertyBag` instead. */ - export interface FileOptions extends FilePropertyBag {} - export type WithImplicitCoercion = - | T - | { valueOf(): T } - | (T extends string ? { [Symbol.toPrimitive](hint: "string"): T } : never); - global { - namespace NodeJS { - export { BufferEncoding }; - } - // Buffer class - type BufferEncoding = - | "ascii" - | "utf8" - | "utf-8" - | "utf16le" - | "utf-16le" - | "ucs2" - | "ucs-2" - | "base64" - | "base64url" - | "latin1" - | "binary" - | "hex"; - /** - * Raw data is stored in instances of the Buffer class. - * A Buffer is similar to an array of integers but corresponds to a raw memory allocation outside the V8 heap. A Buffer cannot be resized. - * Valid string encodings: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'base64url'|'binary'(deprecated)|'hex' - */ - interface BufferConstructor { - // see buffer.buffer.d.ts for implementation specific to TypeScript 5.7 and later - // see ts5.6/buffer.buffer.d.ts for implementation specific to TypeScript 5.6 and earlier - - /** - * Returns `true` if `obj` is a `Buffer`, `false` otherwise. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * Buffer.isBuffer(Buffer.alloc(10)); // true - * Buffer.isBuffer(Buffer.from('foo')); // true - * Buffer.isBuffer('a string'); // false - * Buffer.isBuffer([]); // false - * Buffer.isBuffer(new Uint8Array(1024)); // false - * ``` - * @since v0.1.101 - */ - isBuffer(obj: any): obj is Buffer; - /** - * Returns `true` if `encoding` is the name of a supported character encoding, - * or `false` otherwise. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * console.log(Buffer.isEncoding('utf8')); - * // Prints: true - * - * console.log(Buffer.isEncoding('hex')); - * // Prints: true - * - * console.log(Buffer.isEncoding('utf/8')); - * // Prints: false - * - * console.log(Buffer.isEncoding('')); - * // Prints: false - * ``` - * @since v0.9.1 - * @param encoding A character encoding name to check. - */ - isEncoding(encoding: string): encoding is BufferEncoding; - /** - * Returns the byte length of a string when encoded using `encoding`. - * This is not the same as [`String.prototype.length`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/length), which does not account - * for the encoding that is used to convert the string into bytes. - * - * For `'base64'`, `'base64url'`, and `'hex'`, this function assumes valid input. - * For strings that contain non-base64/hex-encoded data (e.g. whitespace), the - * return value might be greater than the length of a `Buffer` created from the - * string. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const str = '\u00bd + \u00bc = \u00be'; - * - * console.log(`${str}: ${str.length} characters, ` + - * `${Buffer.byteLength(str, 'utf8')} bytes`); - * // Prints: ½ + ¼ = ¾: 9 characters, 12 bytes - * ``` - * - * When `string` is a - * `Buffer`/[`DataView`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView)/[`TypedArray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/- - * Reference/Global_Objects/TypedArray)/[`ArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer)/[`SharedArrayBuffer`](https://develop- - * er.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer), the byte length as reported by `.byteLength`is returned. - * @since v0.1.90 - * @param string A value to calculate the length of. - * @param [encoding='utf8'] If `string` is a string, this is its encoding. - * @return The number of bytes contained within `string`. - */ - byteLength( - string: string | NodeJS.ArrayBufferView | ArrayBufferLike, - encoding?: BufferEncoding, - ): number; - /** - * Compares `buf1` to `buf2`, typically for the purpose of sorting arrays of `Buffer` instances. This is equivalent to calling `buf1.compare(buf2)`. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf1 = Buffer.from('1234'); - * const buf2 = Buffer.from('0123'); - * const arr = [buf1, buf2]; - * - * console.log(arr.sort(Buffer.compare)); - * // Prints: [ , ] - * // (This result is equal to: [buf2, buf1].) - * ``` - * @since v0.11.13 - * @return Either `-1`, `0`, or `1`, depending on the result of the comparison. See `compare` for details. - */ - compare(buf1: Uint8Array, buf2: Uint8Array): -1 | 0 | 1; - /** - * This is the size (in bytes) of pre-allocated internal `Buffer` instances used - * for pooling. This value may be modified. - * @since v0.11.3 - */ - poolSize: number; - } - interface Buffer { - // see buffer.buffer.d.ts for implementation specific to TypeScript 5.7 and later - // see ts5.6/buffer.buffer.d.ts for implementation specific to TypeScript 5.6 and earlier - - /** - * Writes `string` to `buf` at `offset` according to the character encoding in`encoding`. The `length` parameter is the number of bytes to write. If `buf` did - * not contain enough space to fit the entire string, only part of `string` will be - * written. However, partially encoded characters will not be written. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.alloc(256); - * - * const len = buf.write('\u00bd + \u00bc = \u00be', 0); - * - * console.log(`${len} bytes: ${buf.toString('utf8', 0, len)}`); - * // Prints: 12 bytes: ½ + ¼ = ¾ - * - * const buffer = Buffer.alloc(10); - * - * const length = buffer.write('abcd', 8); - * - * console.log(`${length} bytes: ${buffer.toString('utf8', 8, 10)}`); - * // Prints: 2 bytes : ab - * ``` - * @since v0.1.90 - * @param string String to write to `buf`. - * @param [offset=0] Number of bytes to skip before starting to write `string`. - * @param [length=buf.length - offset] Maximum number of bytes to write (written bytes will not exceed `buf.length - offset`). - * @param [encoding='utf8'] The character encoding of `string`. - * @return Number of bytes written. - */ - write(string: string, encoding?: BufferEncoding): number; - write(string: string, offset: number, encoding?: BufferEncoding): number; - write(string: string, offset: number, length: number, encoding?: BufferEncoding): number; - /** - * Decodes `buf` to a string according to the specified character encoding in`encoding`. `start` and `end` may be passed to decode only a subset of `buf`. - * - * If `encoding` is `'utf8'` and a byte sequence in the input is not valid UTF-8, - * then each invalid byte is replaced with the replacement character `U+FFFD`. - * - * The maximum length of a string instance (in UTF-16 code units) is available - * as {@link constants.MAX_STRING_LENGTH}. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf1 = Buffer.allocUnsafe(26); - * - * for (let i = 0; i < 26; i++) { - * // 97 is the decimal ASCII value for 'a'. - * buf1[i] = i + 97; - * } - * - * console.log(buf1.toString('utf8')); - * // Prints: abcdefghijklmnopqrstuvwxyz - * console.log(buf1.toString('utf8', 0, 5)); - * // Prints: abcde - * - * const buf2 = Buffer.from('tést'); - * - * console.log(buf2.toString('hex')); - * // Prints: 74c3a97374 - * console.log(buf2.toString('utf8', 0, 3)); - * // Prints: té - * console.log(buf2.toString(undefined, 0, 3)); - * // Prints: té - * ``` - * @since v0.1.90 - * @param [encoding='utf8'] The character encoding to use. - * @param [start=0] The byte offset to start decoding at. - * @param [end=buf.length] The byte offset to stop decoding at (not inclusive). - */ - toString(encoding?: BufferEncoding, start?: number, end?: number): string; - /** - * Returns a JSON representation of `buf`. [`JSON.stringify()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify) implicitly calls - * this function when stringifying a `Buffer` instance. - * - * `Buffer.from()` accepts objects in the format returned from this method. - * In particular, `Buffer.from(buf.toJSON())` works like `Buffer.from(buf)`. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.from([0x1, 0x2, 0x3, 0x4, 0x5]); - * const json = JSON.stringify(buf); - * - * console.log(json); - * // Prints: {"type":"Buffer","data":[1,2,3,4,5]} - * - * const copy = JSON.parse(json, (key, value) => { - * return value && value.type === 'Buffer' ? - * Buffer.from(value) : - * value; - * }); - * - * console.log(copy); - * // Prints: - * ``` - * @since v0.9.2 - */ - toJSON(): { - type: "Buffer"; - data: number[]; - }; - /** - * Returns `true` if both `buf` and `otherBuffer` have exactly the same bytes,`false` otherwise. Equivalent to `buf.compare(otherBuffer) === 0`. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf1 = Buffer.from('ABC'); - * const buf2 = Buffer.from('414243', 'hex'); - * const buf3 = Buffer.from('ABCD'); - * - * console.log(buf1.equals(buf2)); - * // Prints: true - * console.log(buf1.equals(buf3)); - * // Prints: false - * ``` - * @since v0.11.13 - * @param otherBuffer A `Buffer` or {@link Uint8Array} with which to compare `buf`. - */ - equals(otherBuffer: Uint8Array): boolean; - /** - * Compares `buf` with `target` and returns a number indicating whether `buf`comes before, after, or is the same as `target` in sort order. - * Comparison is based on the actual sequence of bytes in each `Buffer`. - * - * * `0` is returned if `target` is the same as `buf` - * * `1` is returned if `target` should come _before_`buf` when sorted. - * * `-1` is returned if `target` should come _after_`buf` when sorted. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf1 = Buffer.from('ABC'); - * const buf2 = Buffer.from('BCD'); - * const buf3 = Buffer.from('ABCD'); - * - * console.log(buf1.compare(buf1)); - * // Prints: 0 - * console.log(buf1.compare(buf2)); - * // Prints: -1 - * console.log(buf1.compare(buf3)); - * // Prints: -1 - * console.log(buf2.compare(buf1)); - * // Prints: 1 - * console.log(buf2.compare(buf3)); - * // Prints: 1 - * console.log([buf1, buf2, buf3].sort(Buffer.compare)); - * // Prints: [ , , ] - * // (This result is equal to: [buf1, buf3, buf2].) - * ``` - * - * The optional `targetStart`, `targetEnd`, `sourceStart`, and `sourceEnd` arguments can be used to limit the comparison to specific ranges within `target` and `buf` respectively. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf1 = Buffer.from([1, 2, 3, 4, 5, 6, 7, 8, 9]); - * const buf2 = Buffer.from([5, 6, 7, 8, 9, 1, 2, 3, 4]); - * - * console.log(buf1.compare(buf2, 5, 9, 0, 4)); - * // Prints: 0 - * console.log(buf1.compare(buf2, 0, 6, 4)); - * // Prints: -1 - * console.log(buf1.compare(buf2, 5, 6, 5)); - * // Prints: 1 - * ``` - * - * `ERR_OUT_OF_RANGE` is thrown if `targetStart < 0`, `sourceStart < 0`, `targetEnd > target.byteLength`, or `sourceEnd > source.byteLength`. - * @since v0.11.13 - * @param target A `Buffer` or {@link Uint8Array} with which to compare `buf`. - * @param [targetStart=0] The offset within `target` at which to begin comparison. - * @param [targetEnd=target.length] The offset within `target` at which to end comparison (not inclusive). - * @param [sourceStart=0] The offset within `buf` at which to begin comparison. - * @param [sourceEnd=buf.length] The offset within `buf` at which to end comparison (not inclusive). - */ - compare( - target: Uint8Array, - targetStart?: number, - targetEnd?: number, - sourceStart?: number, - sourceEnd?: number, - ): -1 | 0 | 1; - /** - * Copies data from a region of `buf` to a region in `target`, even if the `target`memory region overlaps with `buf`. - * - * [`TypedArray.prototype.set()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/set) performs the same operation, and is available - * for all TypedArrays, including Node.js `Buffer`s, although it takes - * different function arguments. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * // Create two `Buffer` instances. - * const buf1 = Buffer.allocUnsafe(26); - * const buf2 = Buffer.allocUnsafe(26).fill('!'); - * - * for (let i = 0; i < 26; i++) { - * // 97 is the decimal ASCII value for 'a'. - * buf1[i] = i + 97; - * } - * - * // Copy `buf1` bytes 16 through 19 into `buf2` starting at byte 8 of `buf2`. - * buf1.copy(buf2, 8, 16, 20); - * // This is equivalent to: - * // buf2.set(buf1.subarray(16, 20), 8); - * - * console.log(buf2.toString('ascii', 0, 25)); - * // Prints: !!!!!!!!qrst!!!!!!!!!!!!! - * ``` - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * // Create a `Buffer` and copy data from one region to an overlapping region - * // within the same `Buffer`. - * - * const buf = Buffer.allocUnsafe(26); - * - * for (let i = 0; i < 26; i++) { - * // 97 is the decimal ASCII value for 'a'. - * buf[i] = i + 97; - * } - * - * buf.copy(buf, 0, 4, 10); - * - * console.log(buf.toString()); - * // Prints: efghijghijklmnopqrstuvwxyz - * ``` - * @since v0.1.90 - * @param target A `Buffer` or {@link Uint8Array} to copy into. - * @param [targetStart=0] The offset within `target` at which to begin writing. - * @param [sourceStart=0] The offset within `buf` from which to begin copying. - * @param [sourceEnd=buf.length] The offset within `buf` at which to stop copying (not inclusive). - * @return The number of bytes copied. - */ - copy(target: Uint8Array, targetStart?: number, sourceStart?: number, sourceEnd?: number): number; - /** - * Writes `value` to `buf` at the specified `offset` as big-endian. - * - * `value` is interpreted and written as a two's complement signed integer. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.allocUnsafe(8); - * - * buf.writeBigInt64BE(0x0102030405060708n, 0); - * - * console.log(buf); - * // Prints: - * ``` - * @since v12.0.0, v10.20.0 - * @param value Number to be written to `buf`. - * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy: `0 <= offset <= buf.length - 8`. - * @return `offset` plus the number of bytes written. - */ - writeBigInt64BE(value: bigint, offset?: number): number; - /** - * Writes `value` to `buf` at the specified `offset` as little-endian. - * - * `value` is interpreted and written as a two's complement signed integer. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.allocUnsafe(8); - * - * buf.writeBigInt64LE(0x0102030405060708n, 0); - * - * console.log(buf); - * // Prints: - * ``` - * @since v12.0.0, v10.20.0 - * @param value Number to be written to `buf`. - * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy: `0 <= offset <= buf.length - 8`. - * @return `offset` plus the number of bytes written. - */ - writeBigInt64LE(value: bigint, offset?: number): number; - /** - * Writes `value` to `buf` at the specified `offset` as big-endian. - * - * This function is also available under the `writeBigUint64BE` alias. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.allocUnsafe(8); - * - * buf.writeBigUInt64BE(0xdecafafecacefaden, 0); - * - * console.log(buf); - * // Prints: - * ``` - * @since v12.0.0, v10.20.0 - * @param value Number to be written to `buf`. - * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy: `0 <= offset <= buf.length - 8`. - * @return `offset` plus the number of bytes written. - */ - writeBigUInt64BE(value: bigint, offset?: number): number; - /** - * @alias Buffer.writeBigUInt64BE - * @since v14.10.0, v12.19.0 - */ - writeBigUint64BE(value: bigint, offset?: number): number; - /** - * Writes `value` to `buf` at the specified `offset` as little-endian - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.allocUnsafe(8); - * - * buf.writeBigUInt64LE(0xdecafafecacefaden, 0); - * - * console.log(buf); - * // Prints: - * ``` - * - * This function is also available under the `writeBigUint64LE` alias. - * @since v12.0.0, v10.20.0 - * @param value Number to be written to `buf`. - * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy: `0 <= offset <= buf.length - 8`. - * @return `offset` plus the number of bytes written. - */ - writeBigUInt64LE(value: bigint, offset?: number): number; - /** - * @alias Buffer.writeBigUInt64LE - * @since v14.10.0, v12.19.0 - */ - writeBigUint64LE(value: bigint, offset?: number): number; - /** - * Writes `byteLength` bytes of `value` to `buf` at the specified `offset`as little-endian. Supports up to 48 bits of accuracy. Behavior is undefined - * when `value` is anything other than an unsigned integer. - * - * This function is also available under the `writeUintLE` alias. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.allocUnsafe(6); - * - * buf.writeUIntLE(0x1234567890ab, 0, 6); - * - * console.log(buf); - * // Prints: - * ``` - * @since v0.5.5 - * @param value Number to be written to `buf`. - * @param offset Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - byteLength`. - * @param byteLength Number of bytes to write. Must satisfy `0 < byteLength <= 6`. - * @return `offset` plus the number of bytes written. - */ - writeUIntLE(value: number, offset: number, byteLength: number): number; - /** - * @alias Buffer.writeUIntLE - * @since v14.9.0, v12.19.0 - */ - writeUintLE(value: number, offset: number, byteLength: number): number; - /** - * Writes `byteLength` bytes of `value` to `buf` at the specified `offset`as big-endian. Supports up to 48 bits of accuracy. Behavior is undefined - * when `value` is anything other than an unsigned integer. - * - * This function is also available under the `writeUintBE` alias. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.allocUnsafe(6); - * - * buf.writeUIntBE(0x1234567890ab, 0, 6); - * - * console.log(buf); - * // Prints: - * ``` - * @since v0.5.5 - * @param value Number to be written to `buf`. - * @param offset Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - byteLength`. - * @param byteLength Number of bytes to write. Must satisfy `0 < byteLength <= 6`. - * @return `offset` plus the number of bytes written. - */ - writeUIntBE(value: number, offset: number, byteLength: number): number; - /** - * @alias Buffer.writeUIntBE - * @since v14.9.0, v12.19.0 - */ - writeUintBE(value: number, offset: number, byteLength: number): number; - /** - * Writes `byteLength` bytes of `value` to `buf` at the specified `offset`as little-endian. Supports up to 48 bits of accuracy. Behavior is undefined - * when `value` is anything other than a signed integer. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.allocUnsafe(6); - * - * buf.writeIntLE(0x1234567890ab, 0, 6); - * - * console.log(buf); - * // Prints: - * ``` - * @since v0.11.15 - * @param value Number to be written to `buf`. - * @param offset Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - byteLength`. - * @param byteLength Number of bytes to write. Must satisfy `0 < byteLength <= 6`. - * @return `offset` plus the number of bytes written. - */ - writeIntLE(value: number, offset: number, byteLength: number): number; - /** - * Writes `byteLength` bytes of `value` to `buf` at the specified `offset`as big-endian. Supports up to 48 bits of accuracy. Behavior is undefined when`value` is anything other than a - * signed integer. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.allocUnsafe(6); - * - * buf.writeIntBE(0x1234567890ab, 0, 6); - * - * console.log(buf); - * // Prints: - * ``` - * @since v0.11.15 - * @param value Number to be written to `buf`. - * @param offset Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - byteLength`. - * @param byteLength Number of bytes to write. Must satisfy `0 < byteLength <= 6`. - * @return `offset` plus the number of bytes written. - */ - writeIntBE(value: number, offset: number, byteLength: number): number; - /** - * Reads an unsigned, big-endian 64-bit integer from `buf` at the specified`offset`. - * - * This function is also available under the `readBigUint64BE` alias. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.from([0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff]); - * - * console.log(buf.readBigUInt64BE(0)); - * // Prints: 4294967295n - * ``` - * @since v12.0.0, v10.20.0 - * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy: `0 <= offset <= buf.length - 8`. - */ - readBigUInt64BE(offset?: number): bigint; - /** - * @alias Buffer.readBigUInt64BE - * @since v14.10.0, v12.19.0 - */ - readBigUint64BE(offset?: number): bigint; - /** - * Reads an unsigned, little-endian 64-bit integer from `buf` at the specified`offset`. - * - * This function is also available under the `readBigUint64LE` alias. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.from([0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff]); - * - * console.log(buf.readBigUInt64LE(0)); - * // Prints: 18446744069414584320n - * ``` - * @since v12.0.0, v10.20.0 - * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy: `0 <= offset <= buf.length - 8`. - */ - readBigUInt64LE(offset?: number): bigint; - /** - * @alias Buffer.readBigUInt64LE - * @since v14.10.0, v12.19.0 - */ - readBigUint64LE(offset?: number): bigint; - /** - * Reads a signed, big-endian 64-bit integer from `buf` at the specified `offset`. - * - * Integers read from a `Buffer` are interpreted as two's complement signed - * values. - * @since v12.0.0, v10.20.0 - * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy: `0 <= offset <= buf.length - 8`. - */ - readBigInt64BE(offset?: number): bigint; - /** - * Reads a signed, little-endian 64-bit integer from `buf` at the specified`offset`. - * - * Integers read from a `Buffer` are interpreted as two's complement signed - * values. - * @since v12.0.0, v10.20.0 - * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy: `0 <= offset <= buf.length - 8`. - */ - readBigInt64LE(offset?: number): bigint; - /** - * Reads `byteLength` number of bytes from `buf` at the specified `offset` and interprets the result as an unsigned, little-endian integer supporting - * up to 48 bits of accuracy. - * - * This function is also available under the `readUintLE` alias. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.from([0x12, 0x34, 0x56, 0x78, 0x90, 0xab]); - * - * console.log(buf.readUIntLE(0, 6).toString(16)); - * // Prints: ab9078563412 - * ``` - * @since v0.11.15 - * @param offset Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - byteLength`. - * @param byteLength Number of bytes to read. Must satisfy `0 < byteLength <= 6`. - */ - readUIntLE(offset: number, byteLength: number): number; - /** - * @alias Buffer.readUIntLE - * @since v14.9.0, v12.19.0 - */ - readUintLE(offset: number, byteLength: number): number; - /** - * Reads `byteLength` number of bytes from `buf` at the specified `offset` and interprets the result as an unsigned big-endian integer supporting - * up to 48 bits of accuracy. - * - * This function is also available under the `readUintBE` alias. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.from([0x12, 0x34, 0x56, 0x78, 0x90, 0xab]); - * - * console.log(buf.readUIntBE(0, 6).toString(16)); - * // Prints: 1234567890ab - * console.log(buf.readUIntBE(1, 6).toString(16)); - * // Throws ERR_OUT_OF_RANGE. - * ``` - * @since v0.11.15 - * @param offset Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - byteLength`. - * @param byteLength Number of bytes to read. Must satisfy `0 < byteLength <= 6`. - */ - readUIntBE(offset: number, byteLength: number): number; - /** - * @alias Buffer.readUIntBE - * @since v14.9.0, v12.19.0 - */ - readUintBE(offset: number, byteLength: number): number; - /** - * Reads `byteLength` number of bytes from `buf` at the specified `offset` and interprets the result as a little-endian, two's complement signed value - * supporting up to 48 bits of accuracy. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.from([0x12, 0x34, 0x56, 0x78, 0x90, 0xab]); - * - * console.log(buf.readIntLE(0, 6).toString(16)); - * // Prints: -546f87a9cbee - * ``` - * @since v0.11.15 - * @param offset Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - byteLength`. - * @param byteLength Number of bytes to read. Must satisfy `0 < byteLength <= 6`. - */ - readIntLE(offset: number, byteLength: number): number; - /** - * Reads `byteLength` number of bytes from `buf` at the specified `offset` and interprets the result as a big-endian, two's complement signed value - * supporting up to 48 bits of accuracy. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.from([0x12, 0x34, 0x56, 0x78, 0x90, 0xab]); - * - * console.log(buf.readIntBE(0, 6).toString(16)); - * // Prints: 1234567890ab - * console.log(buf.readIntBE(1, 6).toString(16)); - * // Throws ERR_OUT_OF_RANGE. - * console.log(buf.readIntBE(1, 0).toString(16)); - * // Throws ERR_OUT_OF_RANGE. - * ``` - * @since v0.11.15 - * @param offset Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - byteLength`. - * @param byteLength Number of bytes to read. Must satisfy `0 < byteLength <= 6`. - */ - readIntBE(offset: number, byteLength: number): number; - /** - * Reads an unsigned 8-bit integer from `buf` at the specified `offset`. - * - * This function is also available under the `readUint8` alias. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.from([1, -2]); - * - * console.log(buf.readUInt8(0)); - * // Prints: 1 - * console.log(buf.readUInt8(1)); - * // Prints: 254 - * console.log(buf.readUInt8(2)); - * // Throws ERR_OUT_OF_RANGE. - * ``` - * @since v0.5.0 - * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 1`. - */ - readUInt8(offset?: number): number; - /** - * @alias Buffer.readUInt8 - * @since v14.9.0, v12.19.0 - */ - readUint8(offset?: number): number; - /** - * Reads an unsigned, little-endian 16-bit integer from `buf` at the specified `offset`. - * - * This function is also available under the `readUint16LE` alias. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.from([0x12, 0x34, 0x56]); - * - * console.log(buf.readUInt16LE(0).toString(16)); - * // Prints: 3412 - * console.log(buf.readUInt16LE(1).toString(16)); - * // Prints: 5634 - * console.log(buf.readUInt16LE(2).toString(16)); - * // Throws ERR_OUT_OF_RANGE. - * ``` - * @since v0.5.5 - * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 2`. - */ - readUInt16LE(offset?: number): number; - /** - * @alias Buffer.readUInt16LE - * @since v14.9.0, v12.19.0 - */ - readUint16LE(offset?: number): number; - /** - * Reads an unsigned, big-endian 16-bit integer from `buf` at the specified`offset`. - * - * This function is also available under the `readUint16BE` alias. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.from([0x12, 0x34, 0x56]); - * - * console.log(buf.readUInt16BE(0).toString(16)); - * // Prints: 1234 - * console.log(buf.readUInt16BE(1).toString(16)); - * // Prints: 3456 - * ``` - * @since v0.5.5 - * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 2`. - */ - readUInt16BE(offset?: number): number; - /** - * @alias Buffer.readUInt16BE - * @since v14.9.0, v12.19.0 - */ - readUint16BE(offset?: number): number; - /** - * Reads an unsigned, little-endian 32-bit integer from `buf` at the specified`offset`. - * - * This function is also available under the `readUint32LE` alias. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.from([0x12, 0x34, 0x56, 0x78]); - * - * console.log(buf.readUInt32LE(0).toString(16)); - * // Prints: 78563412 - * console.log(buf.readUInt32LE(1).toString(16)); - * // Throws ERR_OUT_OF_RANGE. - * ``` - * @since v0.5.5 - * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`. - */ - readUInt32LE(offset?: number): number; - /** - * @alias Buffer.readUInt32LE - * @since v14.9.0, v12.19.0 - */ - readUint32LE(offset?: number): number; - /** - * Reads an unsigned, big-endian 32-bit integer from `buf` at the specified`offset`. - * - * This function is also available under the `readUint32BE` alias. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.from([0x12, 0x34, 0x56, 0x78]); - * - * console.log(buf.readUInt32BE(0).toString(16)); - * // Prints: 12345678 - * ``` - * @since v0.5.5 - * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`. - */ - readUInt32BE(offset?: number): number; - /** - * @alias Buffer.readUInt32BE - * @since v14.9.0, v12.19.0 - */ - readUint32BE(offset?: number): number; - /** - * Reads a signed 8-bit integer from `buf` at the specified `offset`. - * - * Integers read from a `Buffer` are interpreted as two's complement signed values. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.from([-1, 5]); - * - * console.log(buf.readInt8(0)); - * // Prints: -1 - * console.log(buf.readInt8(1)); - * // Prints: 5 - * console.log(buf.readInt8(2)); - * // Throws ERR_OUT_OF_RANGE. - * ``` - * @since v0.5.0 - * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 1`. - */ - readInt8(offset?: number): number; - /** - * Reads a signed, little-endian 16-bit integer from `buf` at the specified`offset`. - * - * Integers read from a `Buffer` are interpreted as two's complement signed values. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.from([0, 5]); - * - * console.log(buf.readInt16LE(0)); - * // Prints: 1280 - * console.log(buf.readInt16LE(1)); - * // Throws ERR_OUT_OF_RANGE. - * ``` - * @since v0.5.5 - * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 2`. - */ - readInt16LE(offset?: number): number; - /** - * Reads a signed, big-endian 16-bit integer from `buf` at the specified `offset`. - * - * Integers read from a `Buffer` are interpreted as two's complement signed values. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.from([0, 5]); - * - * console.log(buf.readInt16BE(0)); - * // Prints: 5 - * ``` - * @since v0.5.5 - * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 2`. - */ - readInt16BE(offset?: number): number; - /** - * Reads a signed, little-endian 32-bit integer from `buf` at the specified`offset`. - * - * Integers read from a `Buffer` are interpreted as two's complement signed values. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.from([0, 0, 0, 5]); - * - * console.log(buf.readInt32LE(0)); - * // Prints: 83886080 - * console.log(buf.readInt32LE(1)); - * // Throws ERR_OUT_OF_RANGE. - * ``` - * @since v0.5.5 - * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`. - */ - readInt32LE(offset?: number): number; - /** - * Reads a signed, big-endian 32-bit integer from `buf` at the specified `offset`. - * - * Integers read from a `Buffer` are interpreted as two's complement signed values. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.from([0, 0, 0, 5]); - * - * console.log(buf.readInt32BE(0)); - * // Prints: 5 - * ``` - * @since v0.5.5 - * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`. - */ - readInt32BE(offset?: number): number; - /** - * Reads a 32-bit, little-endian float from `buf` at the specified `offset`. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.from([1, 2, 3, 4]); - * - * console.log(buf.readFloatLE(0)); - * // Prints: 1.539989614439558e-36 - * console.log(buf.readFloatLE(1)); - * // Throws ERR_OUT_OF_RANGE. - * ``` - * @since v0.11.15 - * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`. - */ - readFloatLE(offset?: number): number; - /** - * Reads a 32-bit, big-endian float from `buf` at the specified `offset`. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.from([1, 2, 3, 4]); - * - * console.log(buf.readFloatBE(0)); - * // Prints: 2.387939260590663e-38 - * ``` - * @since v0.11.15 - * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`. - */ - readFloatBE(offset?: number): number; - /** - * Reads a 64-bit, little-endian double from `buf` at the specified `offset`. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.from([1, 2, 3, 4, 5, 6, 7, 8]); - * - * console.log(buf.readDoubleLE(0)); - * // Prints: 5.447603722011605e-270 - * console.log(buf.readDoubleLE(1)); - * // Throws ERR_OUT_OF_RANGE. - * ``` - * @since v0.11.15 - * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 8`. - */ - readDoubleLE(offset?: number): number; - /** - * Reads a 64-bit, big-endian double from `buf` at the specified `offset`. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.from([1, 2, 3, 4, 5, 6, 7, 8]); - * - * console.log(buf.readDoubleBE(0)); - * // Prints: 8.20788039913184e-304 - * ``` - * @since v0.11.15 - * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 8`. - */ - readDoubleBE(offset?: number): number; - reverse(): this; - /** - * Interprets `buf` as an array of unsigned 16-bit integers and swaps the - * byte order _in-place_. Throws `ERR_INVALID_BUFFER_SIZE` if `buf.length` is not a multiple of 2. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf1 = Buffer.from([0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8]); - * - * console.log(buf1); - * // Prints: - * - * buf1.swap16(); - * - * console.log(buf1); - * // Prints: - * - * const buf2 = Buffer.from([0x1, 0x2, 0x3]); - * - * buf2.swap16(); - * // Throws ERR_INVALID_BUFFER_SIZE. - * ``` - * - * One convenient use of `buf.swap16()` is to perform a fast in-place conversion - * between UTF-16 little-endian and UTF-16 big-endian: - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.from('This is little-endian UTF-16', 'utf16le'); - * buf.swap16(); // Convert to big-endian UTF-16 text. - * ``` - * @since v5.10.0 - * @return A reference to `buf`. - */ - swap16(): this; - /** - * Interprets `buf` as an array of unsigned 32-bit integers and swaps the - * byte order _in-place_. Throws `ERR_INVALID_BUFFER_SIZE` if `buf.length` is not a multiple of 4. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf1 = Buffer.from([0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8]); - * - * console.log(buf1); - * // Prints: - * - * buf1.swap32(); - * - * console.log(buf1); - * // Prints: - * - * const buf2 = Buffer.from([0x1, 0x2, 0x3]); - * - * buf2.swap32(); - * // Throws ERR_INVALID_BUFFER_SIZE. - * ``` - * @since v5.10.0 - * @return A reference to `buf`. - */ - swap32(): this; - /** - * Interprets `buf` as an array of 64-bit numbers and swaps byte order _in-place_. - * Throws `ERR_INVALID_BUFFER_SIZE` if `buf.length` is not a multiple of 8. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf1 = Buffer.from([0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8]); - * - * console.log(buf1); - * // Prints: - * - * buf1.swap64(); - * - * console.log(buf1); - * // Prints: - * - * const buf2 = Buffer.from([0x1, 0x2, 0x3]); - * - * buf2.swap64(); - * // Throws ERR_INVALID_BUFFER_SIZE. - * ``` - * @since v6.3.0 - * @return A reference to `buf`. - */ - swap64(): this; - /** - * Writes `value` to `buf` at the specified `offset`. `value` must be a - * valid unsigned 8-bit integer. Behavior is undefined when `value` is anything - * other than an unsigned 8-bit integer. - * - * This function is also available under the `writeUint8` alias. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.allocUnsafe(4); - * - * buf.writeUInt8(0x3, 0); - * buf.writeUInt8(0x4, 1); - * buf.writeUInt8(0x23, 2); - * buf.writeUInt8(0x42, 3); - * - * console.log(buf); - * // Prints: - * ``` - * @since v0.5.0 - * @param value Number to be written to `buf`. - * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 1`. - * @return `offset` plus the number of bytes written. - */ - writeUInt8(value: number, offset?: number): number; - /** - * @alias Buffer.writeUInt8 - * @since v14.9.0, v12.19.0 - */ - writeUint8(value: number, offset?: number): number; - /** - * Writes `value` to `buf` at the specified `offset` as little-endian. The `value` must be a valid unsigned 16-bit integer. Behavior is undefined when `value` is - * anything other than an unsigned 16-bit integer. - * - * This function is also available under the `writeUint16LE` alias. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.allocUnsafe(4); - * - * buf.writeUInt16LE(0xdead, 0); - * buf.writeUInt16LE(0xbeef, 2); - * - * console.log(buf); - * // Prints: - * ``` - * @since v0.5.5 - * @param value Number to be written to `buf`. - * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 2`. - * @return `offset` plus the number of bytes written. - */ - writeUInt16LE(value: number, offset?: number): number; - /** - * @alias Buffer.writeUInt16LE - * @since v14.9.0, v12.19.0 - */ - writeUint16LE(value: number, offset?: number): number; - /** - * Writes `value` to `buf` at the specified `offset` as big-endian. The `value` must be a valid unsigned 16-bit integer. Behavior is undefined when `value`is anything other than an - * unsigned 16-bit integer. - * - * This function is also available under the `writeUint16BE` alias. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.allocUnsafe(4); - * - * buf.writeUInt16BE(0xdead, 0); - * buf.writeUInt16BE(0xbeef, 2); - * - * console.log(buf); - * // Prints: - * ``` - * @since v0.5.5 - * @param value Number to be written to `buf`. - * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 2`. - * @return `offset` plus the number of bytes written. - */ - writeUInt16BE(value: number, offset?: number): number; - /** - * @alias Buffer.writeUInt16BE - * @since v14.9.0, v12.19.0 - */ - writeUint16BE(value: number, offset?: number): number; - /** - * Writes `value` to `buf` at the specified `offset` as little-endian. The `value` must be a valid unsigned 32-bit integer. Behavior is undefined when `value` is - * anything other than an unsigned 32-bit integer. - * - * This function is also available under the `writeUint32LE` alias. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.allocUnsafe(4); - * - * buf.writeUInt32LE(0xfeedface, 0); - * - * console.log(buf); - * // Prints: - * ``` - * @since v0.5.5 - * @param value Number to be written to `buf`. - * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`. - * @return `offset` plus the number of bytes written. - */ - writeUInt32LE(value: number, offset?: number): number; - /** - * @alias Buffer.writeUInt32LE - * @since v14.9.0, v12.19.0 - */ - writeUint32LE(value: number, offset?: number): number; - /** - * Writes `value` to `buf` at the specified `offset` as big-endian. The `value` must be a valid unsigned 32-bit integer. Behavior is undefined when `value`is anything other than an - * unsigned 32-bit integer. - * - * This function is also available under the `writeUint32BE` alias. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.allocUnsafe(4); - * - * buf.writeUInt32BE(0xfeedface, 0); - * - * console.log(buf); - * // Prints: - * ``` - * @since v0.5.5 - * @param value Number to be written to `buf`. - * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`. - * @return `offset` plus the number of bytes written. - */ - writeUInt32BE(value: number, offset?: number): number; - /** - * @alias Buffer.writeUInt32BE - * @since v14.9.0, v12.19.0 - */ - writeUint32BE(value: number, offset?: number): number; - /** - * Writes `value` to `buf` at the specified `offset`. `value` must be a valid - * signed 8-bit integer. Behavior is undefined when `value` is anything other than - * a signed 8-bit integer. - * - * `value` is interpreted and written as a two's complement signed integer. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.allocUnsafe(2); - * - * buf.writeInt8(2, 0); - * buf.writeInt8(-2, 1); - * - * console.log(buf); - * // Prints: - * ``` - * @since v0.5.0 - * @param value Number to be written to `buf`. - * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 1`. - * @return `offset` plus the number of bytes written. - */ - writeInt8(value: number, offset?: number): number; - /** - * Writes `value` to `buf` at the specified `offset` as little-endian. The `value` must be a valid signed 16-bit integer. Behavior is undefined when `value` is - * anything other than a signed 16-bit integer. - * - * The `value` is interpreted and written as a two's complement signed integer. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.allocUnsafe(2); - * - * buf.writeInt16LE(0x0304, 0); - * - * console.log(buf); - * // Prints: - * ``` - * @since v0.5.5 - * @param value Number to be written to `buf`. - * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 2`. - * @return `offset` plus the number of bytes written. - */ - writeInt16LE(value: number, offset?: number): number; - /** - * Writes `value` to `buf` at the specified `offset` as big-endian. The `value` must be a valid signed 16-bit integer. Behavior is undefined when `value` is - * anything other than a signed 16-bit integer. - * - * The `value` is interpreted and written as a two's complement signed integer. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.allocUnsafe(2); - * - * buf.writeInt16BE(0x0102, 0); - * - * console.log(buf); - * // Prints: - * ``` - * @since v0.5.5 - * @param value Number to be written to `buf`. - * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 2`. - * @return `offset` plus the number of bytes written. - */ - writeInt16BE(value: number, offset?: number): number; - /** - * Writes `value` to `buf` at the specified `offset` as little-endian. The `value` must be a valid signed 32-bit integer. Behavior is undefined when `value` is - * anything other than a signed 32-bit integer. - * - * The `value` is interpreted and written as a two's complement signed integer. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.allocUnsafe(4); - * - * buf.writeInt32LE(0x05060708, 0); - * - * console.log(buf); - * // Prints: - * ``` - * @since v0.5.5 - * @param value Number to be written to `buf`. - * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`. - * @return `offset` plus the number of bytes written. - */ - writeInt32LE(value: number, offset?: number): number; - /** - * Writes `value` to `buf` at the specified `offset` as big-endian. The `value` must be a valid signed 32-bit integer. Behavior is undefined when `value` is - * anything other than a signed 32-bit integer. - * - * The `value` is interpreted and written as a two's complement signed integer. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.allocUnsafe(4); - * - * buf.writeInt32BE(0x01020304, 0); - * - * console.log(buf); - * // Prints: - * ``` - * @since v0.5.5 - * @param value Number to be written to `buf`. - * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`. - * @return `offset` plus the number of bytes written. - */ - writeInt32BE(value: number, offset?: number): number; - /** - * Writes `value` to `buf` at the specified `offset` as little-endian. Behavior is - * undefined when `value` is anything other than a JavaScript number. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.allocUnsafe(4); - * - * buf.writeFloatLE(0xcafebabe, 0); - * - * console.log(buf); - * // Prints: - * ``` - * @since v0.11.15 - * @param value Number to be written to `buf`. - * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`. - * @return `offset` plus the number of bytes written. - */ - writeFloatLE(value: number, offset?: number): number; - /** - * Writes `value` to `buf` at the specified `offset` as big-endian. Behavior is - * undefined when `value` is anything other than a JavaScript number. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.allocUnsafe(4); - * - * buf.writeFloatBE(0xcafebabe, 0); - * - * console.log(buf); - * // Prints: - * ``` - * @since v0.11.15 - * @param value Number to be written to `buf`. - * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`. - * @return `offset` plus the number of bytes written. - */ - writeFloatBE(value: number, offset?: number): number; - /** - * Writes `value` to `buf` at the specified `offset` as little-endian. The `value` must be a JavaScript number. Behavior is undefined when `value` is anything - * other than a JavaScript number. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.allocUnsafe(8); - * - * buf.writeDoubleLE(123.456, 0); - * - * console.log(buf); - * // Prints: - * ``` - * @since v0.11.15 - * @param value Number to be written to `buf`. - * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 8`. - * @return `offset` plus the number of bytes written. - */ - writeDoubleLE(value: number, offset?: number): number; - /** - * Writes `value` to `buf` at the specified `offset` as big-endian. The `value` must be a JavaScript number. Behavior is undefined when `value` is anything - * other than a JavaScript number. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.allocUnsafe(8); - * - * buf.writeDoubleBE(123.456, 0); - * - * console.log(buf); - * // Prints: - * ``` - * @since v0.11.15 - * @param value Number to be written to `buf`. - * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 8`. - * @return `offset` plus the number of bytes written. - */ - writeDoubleBE(value: number, offset?: number): number; - /** - * Fills `buf` with the specified `value`. If the `offset` and `end` are not given, - * the entire `buf` will be filled: - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * // Fill a `Buffer` with the ASCII character 'h'. - * - * const b = Buffer.allocUnsafe(50).fill('h'); - * - * console.log(b.toString()); - * // Prints: hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh - * - * // Fill a buffer with empty string - * const c = Buffer.allocUnsafe(5).fill(''); - * - * console.log(c.fill('')); - * // Prints: - * ``` - * - * `value` is coerced to a `uint32` value if it is not a string, `Buffer`, or - * integer. If the resulting integer is greater than `255` (decimal), `buf` will be - * filled with `value & 255`. - * - * If the final write of a `fill()` operation falls on a multi-byte character, - * then only the bytes of that character that fit into `buf` are written: - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * // Fill a `Buffer` with character that takes up two bytes in UTF-8. - * - * console.log(Buffer.allocUnsafe(5).fill('\u0222')); - * // Prints: - * ``` - * - * If `value` contains invalid characters, it is truncated; if no valid - * fill data remains, an exception is thrown: - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.allocUnsafe(5); - * - * console.log(buf.fill('a')); - * // Prints: - * console.log(buf.fill('aazz', 'hex')); - * // Prints: - * console.log(buf.fill('zz', 'hex')); - * // Throws an exception. - * ``` - * @since v0.5.0 - * @param value The value with which to fill `buf`. Empty value (string, Uint8Array, Buffer) is coerced to `0`. - * @param [offset=0] Number of bytes to skip before starting to fill `buf`. - * @param [end=buf.length] Where to stop filling `buf` (not inclusive). - * @param [encoding='utf8'] The encoding for `value` if `value` is a string. - * @return A reference to `buf`. - */ - fill(value: string | Uint8Array | number, offset?: number, end?: number, encoding?: BufferEncoding): this; - fill(value: string | Uint8Array | number, offset: number, encoding: BufferEncoding): this; - fill(value: string | Uint8Array | number, encoding: BufferEncoding): this; - /** - * If `value` is: - * - * * a string, `value` is interpreted according to the character encoding in `encoding`. - * * a `Buffer` or [`Uint8Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array), `value` will be used in its entirety. - * To compare a partial `Buffer`, use `buf.subarray`. - * * a number, `value` will be interpreted as an unsigned 8-bit integer - * value between `0` and `255`. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.from('this is a buffer'); - * - * console.log(buf.indexOf('this')); - * // Prints: 0 - * console.log(buf.indexOf('is')); - * // Prints: 2 - * console.log(buf.indexOf(Buffer.from('a buffer'))); - * // Prints: 8 - * console.log(buf.indexOf(97)); - * // Prints: 8 (97 is the decimal ASCII value for 'a') - * console.log(buf.indexOf(Buffer.from('a buffer example'))); - * // Prints: -1 - * console.log(buf.indexOf(Buffer.from('a buffer example').slice(0, 8))); - * // Prints: 8 - * - * const utf16Buffer = Buffer.from('\u039a\u0391\u03a3\u03a3\u0395', 'utf16le'); - * - * console.log(utf16Buffer.indexOf('\u03a3', 0, 'utf16le')); - * // Prints: 4 - * console.log(utf16Buffer.indexOf('\u03a3', -4, 'utf16le')); - * // Prints: 6 - * ``` - * - * If `value` is not a string, number, or `Buffer`, this method will throw a `TypeError`. If `value` is a number, it will be coerced to a valid byte value, - * an integer between 0 and 255. - * - * If `byteOffset` is not a number, it will be coerced to a number. If the result - * of coercion is `NaN` or `0`, then the entire buffer will be searched. This - * behavior matches [`String.prototype.indexOf()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/indexOf). - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const b = Buffer.from('abcdef'); - * - * // Passing a value that's a number, but not a valid byte. - * // Prints: 2, equivalent to searching for 99 or 'c'. - * console.log(b.indexOf(99.9)); - * console.log(b.indexOf(256 + 99)); - * - * // Passing a byteOffset that coerces to NaN or 0. - * // Prints: 1, searching the whole buffer. - * console.log(b.indexOf('b', undefined)); - * console.log(b.indexOf('b', {})); - * console.log(b.indexOf('b', null)); - * console.log(b.indexOf('b', [])); - * ``` - * - * If `value` is an empty string or empty `Buffer` and `byteOffset` is less - * than `buf.length`, `byteOffset` will be returned. If `value` is empty and`byteOffset` is at least `buf.length`, `buf.length` will be returned. - * @since v1.5.0 - * @param value What to search for. - * @param [byteOffset=0] Where to begin searching in `buf`. If negative, then offset is calculated from the end of `buf`. - * @param [encoding='utf8'] If `value` is a string, this is the encoding used to determine the binary representation of the string that will be searched for in `buf`. - * @return The index of the first occurrence of `value` in `buf`, or `-1` if `buf` does not contain `value`. - */ - indexOf(value: string | number | Uint8Array, byteOffset?: number, encoding?: BufferEncoding): number; - indexOf(value: string | number | Uint8Array, encoding: BufferEncoding): number; - /** - * Identical to `buf.indexOf()`, except the last occurrence of `value` is found - * rather than the first occurrence. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.from('this buffer is a buffer'); - * - * console.log(buf.lastIndexOf('this')); - * // Prints: 0 - * console.log(buf.lastIndexOf('buffer')); - * // Prints: 17 - * console.log(buf.lastIndexOf(Buffer.from('buffer'))); - * // Prints: 17 - * console.log(buf.lastIndexOf(97)); - * // Prints: 15 (97 is the decimal ASCII value for 'a') - * console.log(buf.lastIndexOf(Buffer.from('yolo'))); - * // Prints: -1 - * console.log(buf.lastIndexOf('buffer', 5)); - * // Prints: 5 - * console.log(buf.lastIndexOf('buffer', 4)); - * // Prints: -1 - * - * const utf16Buffer = Buffer.from('\u039a\u0391\u03a3\u03a3\u0395', 'utf16le'); - * - * console.log(utf16Buffer.lastIndexOf('\u03a3', undefined, 'utf16le')); - * // Prints: 6 - * console.log(utf16Buffer.lastIndexOf('\u03a3', -5, 'utf16le')); - * // Prints: 4 - * ``` - * - * If `value` is not a string, number, or `Buffer`, this method will throw a `TypeError`. If `value` is a number, it will be coerced to a valid byte value, - * an integer between 0 and 255. - * - * If `byteOffset` is not a number, it will be coerced to a number. Any arguments - * that coerce to `NaN`, like `{}` or `undefined`, will search the whole buffer. - * This behavior matches [`String.prototype.lastIndexOf()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/lastIndexOf). - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const b = Buffer.from('abcdef'); - * - * // Passing a value that's a number, but not a valid byte. - * // Prints: 2, equivalent to searching for 99 or 'c'. - * console.log(b.lastIndexOf(99.9)); - * console.log(b.lastIndexOf(256 + 99)); - * - * // Passing a byteOffset that coerces to NaN. - * // Prints: 1, searching the whole buffer. - * console.log(b.lastIndexOf('b', undefined)); - * console.log(b.lastIndexOf('b', {})); - * - * // Passing a byteOffset that coerces to 0. - * // Prints: -1, equivalent to passing 0. - * console.log(b.lastIndexOf('b', null)); - * console.log(b.lastIndexOf('b', [])); - * ``` - * - * If `value` is an empty string or empty `Buffer`, `byteOffset` will be returned. - * @since v6.0.0 - * @param value What to search for. - * @param [byteOffset=buf.length - 1] Where to begin searching in `buf`. If negative, then offset is calculated from the end of `buf`. - * @param [encoding='utf8'] If `value` is a string, this is the encoding used to determine the binary representation of the string that will be searched for in `buf`. - * @return The index of the last occurrence of `value` in `buf`, or `-1` if `buf` does not contain `value`. - */ - lastIndexOf(value: string | number | Uint8Array, byteOffset?: number, encoding?: BufferEncoding): number; - lastIndexOf(value: string | number | Uint8Array, encoding: BufferEncoding): number; - /** - * Equivalent to `buf.indexOf() !== -1`. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.from('this is a buffer'); - * - * console.log(buf.includes('this')); - * // Prints: true - * console.log(buf.includes('is')); - * // Prints: true - * console.log(buf.includes(Buffer.from('a buffer'))); - * // Prints: true - * console.log(buf.includes(97)); - * // Prints: true (97 is the decimal ASCII value for 'a') - * console.log(buf.includes(Buffer.from('a buffer example'))); - * // Prints: false - * console.log(buf.includes(Buffer.from('a buffer example').slice(0, 8))); - * // Prints: true - * console.log(buf.includes('this', 4)); - * // Prints: false - * ``` - * @since v5.3.0 - * @param value What to search for. - * @param [byteOffset=0] Where to begin searching in `buf`. If negative, then offset is calculated from the end of `buf`. - * @param [encoding='utf8'] If `value` is a string, this is its encoding. - * @return `true` if `value` was found in `buf`, `false` otherwise. - */ - includes(value: string | number | Buffer, byteOffset?: number, encoding?: BufferEncoding): boolean; - includes(value: string | number | Buffer, encoding: BufferEncoding): boolean; - } - var Buffer: BufferConstructor; - } - // #region web types - export type BlobPart = NodeJS.BufferSource | Blob | string; - export interface BlobPropertyBag { - endings?: "native" | "transparent"; - type?: string; - } - export interface FilePropertyBag extends BlobPropertyBag { - lastModified?: number; - } - export interface Blob { - readonly size: number; - readonly type: string; - arrayBuffer(): Promise; - bytes(): Promise; - slice(start?: number, end?: number, contentType?: string): Blob; - stream(): ReadableStream; - text(): Promise; - } - export var Blob: { - prototype: Blob; - new(blobParts?: BlobPart[], options?: BlobPropertyBag): Blob; - }; - export interface File extends Blob { - readonly lastModified: number; - readonly name: string; - readonly webkitRelativePath: string; - } - export var File: { - prototype: File; - new(fileBits: BlobPart[], fileName: string, options?: FilePropertyBag): File; - }; - export import atob = globalThis.atob; - export import btoa = globalThis.btoa; - // #endregion -} -declare module "buffer" { - export * from "node:buffer"; -} diff --git a/PBandGraphScaffold/node_modules/@types/node/child_process.d.ts b/PBandGraphScaffold/node_modules/@types/node/child_process.d.ts deleted file mode 100644 index e546fe6..0000000 --- a/PBandGraphScaffold/node_modules/@types/node/child_process.d.ts +++ /dev/null @@ -1,1428 +0,0 @@ -/** - * The `node:child_process` module provides the ability to spawn subprocesses in - * a manner that is similar, but not identical, to [`popen(3)`](http://man7.org/linux/man-pages/man3/popen.3.html). This capability - * is primarily provided by the {@link spawn} function: - * - * ```js - * import { spawn } from 'node:child_process'; - * const ls = spawn('ls', ['-lh', '/usr']); - * - * ls.stdout.on('data', (data) => { - * console.log(`stdout: ${data}`); - * }); - * - * ls.stderr.on('data', (data) => { - * console.error(`stderr: ${data}`); - * }); - * - * ls.on('close', (code) => { - * console.log(`child process exited with code ${code}`); - * }); - * ``` - * - * By default, pipes for `stdin`, `stdout`, and `stderr` are established between - * the parent Node.js process and the spawned subprocess. These pipes have - * limited (and platform-specific) capacity. If the subprocess writes to - * stdout in excess of that limit without the output being captured, the - * subprocess blocks, waiting for the pipe buffer to accept more data. This is - * identical to the behavior of pipes in the shell. Use the `{ stdio: 'ignore' }` option if the output will not be consumed. - * - * The command lookup is performed using the `options.env.PATH` environment - * variable if `env` is in the `options` object. Otherwise, `process.env.PATH` is - * used. If `options.env` is set without `PATH`, lookup on Unix is performed - * on a default search path search of `/usr/bin:/bin` (see your operating system's - * manual for execvpe/execvp), on Windows the current processes environment - * variable `PATH` is used. - * - * On Windows, environment variables are case-insensitive. Node.js - * lexicographically sorts the `env` keys and uses the first one that - * case-insensitively matches. Only first (in lexicographic order) entry will be - * passed to the subprocess. This might lead to issues on Windows when passing - * objects to the `env` option that have multiple variants of the same key, such as `PATH` and `Path`. - * - * The {@link spawn} method spawns the child process asynchronously, - * without blocking the Node.js event loop. The {@link spawnSync} function provides equivalent functionality in a synchronous manner that blocks - * the event loop until the spawned process either exits or is terminated. - * - * For convenience, the `node:child_process` module provides a handful of - * synchronous and asynchronous alternatives to {@link spawn} and {@link spawnSync}. Each of these alternatives are implemented on - * top of {@link spawn} or {@link spawnSync}. - * - * * {@link exec}: spawns a shell and runs a command within that - * shell, passing the `stdout` and `stderr` to a callback function when - * complete. - * * {@link execFile}: similar to {@link exec} except - * that it spawns the command directly without first spawning a shell by - * default. - * * {@link fork}: spawns a new Node.js process and invokes a - * specified module with an IPC communication channel established that allows - * sending messages between parent and child. - * * {@link execSync}: a synchronous version of {@link exec} that will block the Node.js event loop. - * * {@link execFileSync}: a synchronous version of {@link execFile} that will block the Node.js event loop. - * - * For certain use cases, such as automating shell scripts, the `synchronous counterparts` may be more convenient. In many cases, however, - * the synchronous methods can have significant impact on performance due to - * stalling the event loop while spawned processes complete. - * @see [source](https://github.com/nodejs/node/blob/v25.x/lib/child_process.js) - */ -declare module "node:child_process" { - import { NonSharedBuffer } from "node:buffer"; - import * as dgram from "node:dgram"; - import { Abortable, EventEmitter, InternalEventEmitter } from "node:events"; - import * as net from "node:net"; - import { Readable, Stream, Writable } from "node:stream"; - import { URL } from "node:url"; - type Serializable = string | object | number | boolean | bigint; - type SendHandle = net.Socket | net.Server | dgram.Socket | undefined; - interface ChildProcessEventMap { - "close": [code: number | null, signal: NodeJS.Signals | null]; - "disconnect": []; - "error": [err: Error]; - "exit": [code: number | null, signal: NodeJS.Signals | null]; - "message": [message: Serializable, sendHandle: SendHandle]; - "spawn": []; - } - /** - * Instances of the `ChildProcess` represent spawned child processes. - * - * Instances of `ChildProcess` are not intended to be created directly. Rather, - * use the {@link spawn}, {@link exec},{@link execFile}, or {@link fork} methods to create - * instances of `ChildProcess`. - * @since v2.2.0 - */ - class ChildProcess implements EventEmitter { - /** - * A `Writable Stream` that represents the child process's `stdin`. - * - * If a child process waits to read all of its input, the child will not continue - * until this stream has been closed via `end()`. - * - * If the child was spawned with `stdio[0]` set to anything other than `'pipe'`, - * then this will be `null`. - * - * `subprocess.stdin` is an alias for `subprocess.stdio[0]`. Both properties will - * refer to the same value. - * - * The `subprocess.stdin` property can be `null` or `undefined` if the child process could not be successfully spawned. - * @since v0.1.90 - */ - stdin: Writable | null; - /** - * A `Readable Stream` that represents the child process's `stdout`. - * - * If the child was spawned with `stdio[1]` set to anything other than `'pipe'`, - * then this will be `null`. - * - * `subprocess.stdout` is an alias for `subprocess.stdio[1]`. Both properties will - * refer to the same value. - * - * ```js - * import { spawn } from 'node:child_process'; - * - * const subprocess = spawn('ls'); - * - * subprocess.stdout.on('data', (data) => { - * console.log(`Received chunk ${data}`); - * }); - * ``` - * - * The `subprocess.stdout` property can be `null` or `undefined` if the child process could not be successfully spawned. - * @since v0.1.90 - */ - stdout: Readable | null; - /** - * A `Readable Stream` that represents the child process's `stderr`. - * - * If the child was spawned with `stdio[2]` set to anything other than `'pipe'`, - * then this will be `null`. - * - * `subprocess.stderr` is an alias for `subprocess.stdio[2]`. Both properties will - * refer to the same value. - * - * The `subprocess.stderr` property can be `null` or `undefined` if the child process could not be successfully spawned. - * @since v0.1.90 - */ - stderr: Readable | null; - /** - * The `subprocess.channel` property is a reference to the child's IPC channel. If - * no IPC channel exists, this property is `undefined`. - * @since v7.1.0 - */ - readonly channel?: Control | null; - /** - * A sparse array of pipes to the child process, corresponding with positions in - * the `stdio` option passed to {@link spawn} that have been set - * to the value `'pipe'`. `subprocess.stdio[0]`, `subprocess.stdio[1]`, and `subprocess.stdio[2]` are also available as `subprocess.stdin`, `subprocess.stdout`, and `subprocess.stderr`, - * respectively. - * - * In the following example, only the child's fd `1` (stdout) is configured as a - * pipe, so only the parent's `subprocess.stdio[1]` is a stream, all other values - * in the array are `null`. - * - * ```js - * import assert from 'node:assert'; - * import fs from 'node:fs'; - * import child_process from 'node:child_process'; - * - * const subprocess = child_process.spawn('ls', { - * stdio: [ - * 0, // Use parent's stdin for child. - * 'pipe', // Pipe child's stdout to parent. - * fs.openSync('err.out', 'w'), // Direct child's stderr to a file. - * ], - * }); - * - * assert.strictEqual(subprocess.stdio[0], null); - * assert.strictEqual(subprocess.stdio[0], subprocess.stdin); - * - * assert(subprocess.stdout); - * assert.strictEqual(subprocess.stdio[1], subprocess.stdout); - * - * assert.strictEqual(subprocess.stdio[2], null); - * assert.strictEqual(subprocess.stdio[2], subprocess.stderr); - * ``` - * - * The `subprocess.stdio` property can be `undefined` if the child process could - * not be successfully spawned. - * @since v0.7.10 - */ - readonly stdio: [ - Writable | null, - // stdin - Readable | null, - // stdout - Readable | null, - // stderr - Readable | Writable | null | undefined, - // extra - Readable | Writable | null | undefined, // extra - ]; - /** - * The `subprocess.killed` property indicates whether the child process - * successfully received a signal from `subprocess.kill()`. The `killed` property - * does not indicate that the child process has been terminated. - * @since v0.5.10 - */ - readonly killed: boolean; - /** - * Returns the process identifier (PID) of the child process. If the child process - * fails to spawn due to errors, then the value is `undefined` and `error` is - * emitted. - * - * ```js - * import { spawn } from 'node:child_process'; - * const grep = spawn('grep', ['ssh']); - * - * console.log(`Spawned child pid: ${grep.pid}`); - * grep.stdin.end(); - * ``` - * @since v0.1.90 - */ - readonly pid?: number | undefined; - /** - * The `subprocess.connected` property indicates whether it is still possible to - * send and receive messages from a child process. When `subprocess.connected` is `false`, it is no longer possible to send or receive messages. - * @since v0.7.2 - */ - readonly connected: boolean; - /** - * The `subprocess.exitCode` property indicates the exit code of the child process. - * If the child process is still running, the field will be `null`. - */ - readonly exitCode: number | null; - /** - * The `subprocess.signalCode` property indicates the signal received by - * the child process if any, else `null`. - */ - readonly signalCode: NodeJS.Signals | null; - /** - * The `subprocess.spawnargs` property represents the full list of command-line - * arguments the child process was launched with. - */ - readonly spawnargs: string[]; - /** - * The `subprocess.spawnfile` property indicates the executable file name of - * the child process that is launched. - * - * For {@link fork}, its value will be equal to `process.execPath`. - * For {@link spawn}, its value will be the name of - * the executable file. - * For {@link exec}, its value will be the name of the shell - * in which the child process is launched. - */ - readonly spawnfile: string; - /** - * The `subprocess.kill()` method sends a signal to the child process. If no - * argument is given, the process will be sent the `'SIGTERM'` signal. See [`signal(7)`](http://man7.org/linux/man-pages/man7/signal.7.html) for a list of available signals. This function - * returns `true` if [`kill(2)`](http://man7.org/linux/man-pages/man2/kill.2.html) succeeds, and `false` otherwise. - * - * ```js - * import { spawn } from 'node:child_process'; - * const grep = spawn('grep', ['ssh']); - * - * grep.on('close', (code, signal) => { - * console.log( - * `child process terminated due to receipt of signal ${signal}`); - * }); - * - * // Send SIGHUP to process. - * grep.kill('SIGHUP'); - * ``` - * - * The `ChildProcess` object may emit an `'error'` event if the signal - * cannot be delivered. Sending a signal to a child process that has already exited - * is not an error but may have unforeseen consequences. Specifically, if the - * process identifier (PID) has been reassigned to another process, the signal will - * be delivered to that process instead which can have unexpected results. - * - * While the function is called `kill`, the signal delivered to the child process - * may not actually terminate the process. - * - * See [`kill(2)`](http://man7.org/linux/man-pages/man2/kill.2.html) for reference. - * - * On Windows, where POSIX signals do not exist, the `signal` argument will be - * ignored, and the process will be killed forcefully and abruptly (similar to `'SIGKILL'`). - * See `Signal Events` for more details. - * - * On Linux, child processes of child processes will not be terminated - * when attempting to kill their parent. This is likely to happen when running a - * new process in a shell or with the use of the `shell` option of `ChildProcess`: - * - * ```js - * 'use strict'; - * import { spawn } from 'node:child_process'; - * - * const subprocess = spawn( - * 'sh', - * [ - * '-c', - * `node -e "setInterval(() => { - * console.log(process.pid, 'is alive') - * }, 500);"`, - * ], { - * stdio: ['inherit', 'inherit', 'inherit'], - * }, - * ); - * - * setTimeout(() => { - * subprocess.kill(); // Does not terminate the Node.js process in the shell. - * }, 2000); - * ``` - * @since v0.1.90 - */ - kill(signal?: NodeJS.Signals | number): boolean; - /** - * Calls {@link ChildProcess.kill} with `'SIGTERM'`. - * @since v20.5.0 - */ - [Symbol.dispose](): void; - /** - * When an IPC channel has been established between the parent and child ( - * i.e. when using {@link fork}), the `subprocess.send()` method can - * be used to send messages to the child process. When the child process is a - * Node.js instance, these messages can be received via the `'message'` event. - * - * The message goes through serialization and parsing. The resulting - * message might not be the same as what is originally sent. - * - * For example, in the parent script: - * - * ```js - * import cp from 'node:child_process'; - * const n = cp.fork(`${__dirname}/sub.js`); - * - * n.on('message', (m) => { - * console.log('PARENT got message:', m); - * }); - * - * // Causes the child to print: CHILD got message: { hello: 'world' } - * n.send({ hello: 'world' }); - * ``` - * - * And then the child script, `'sub.js'` might look like this: - * - * ```js - * process.on('message', (m) => { - * console.log('CHILD got message:', m); - * }); - * - * // Causes the parent to print: PARENT got message: { foo: 'bar', baz: null } - * process.send({ foo: 'bar', baz: NaN }); - * ``` - * - * Child Node.js processes will have a `process.send()` method of their own - * that allows the child to send messages back to the parent. - * - * There is a special case when sending a `{cmd: 'NODE_foo'}` message. Messages - * containing a `NODE_` prefix in the `cmd` property are reserved for use within - * Node.js core and will not be emitted in the child's `'message'` event. Rather, such messages are emitted using the `'internalMessage'` event and are consumed internally by Node.js. - * Applications should avoid using such messages or listening for `'internalMessage'` events as it is subject to change without notice. - * - * The optional `sendHandle` argument that may be passed to `subprocess.send()` is - * for passing a TCP server or socket object to the child process. The child will - * receive the object as the second argument passed to the callback function - * registered on the `'message'` event. Any data that is received and buffered in - * the socket will not be sent to the child. Sending IPC sockets is not supported on Windows. - * - * The optional `callback` is a function that is invoked after the message is - * sent but before the child may have received it. The function is called with a - * single argument: `null` on success, or an `Error` object on failure. - * - * If no `callback` function is provided and the message cannot be sent, an `'error'` event will be emitted by the `ChildProcess` object. This can - * happen, for instance, when the child process has already exited. - * - * `subprocess.send()` will return `false` if the channel has closed or when the - * backlog of unsent messages exceeds a threshold that makes it unwise to send - * more. Otherwise, the method returns `true`. The `callback` function can be - * used to implement flow control. - * - * #### Example: sending a server object - * - * The `sendHandle` argument can be used, for instance, to pass the handle of - * a TCP server object to the child process as illustrated in the example below: - * - * ```js - * import { createServer } from 'node:net'; - * import { fork } from 'node:child_process'; - * const subprocess = fork('subprocess.js'); - * - * // Open up the server object and send the handle. - * const server = createServer(); - * server.on('connection', (socket) => { - * socket.end('handled by parent'); - * }); - * server.listen(1337, () => { - * subprocess.send('server', server); - * }); - * ``` - * - * The child would then receive the server object as: - * - * ```js - * process.on('message', (m, server) => { - * if (m === 'server') { - * server.on('connection', (socket) => { - * socket.end('handled by child'); - * }); - * } - * }); - * ``` - * - * Once the server is now shared between the parent and child, some connections - * can be handled by the parent and some by the child. - * - * While the example above uses a server created using the `node:net` module, `node:dgram` module servers use exactly the same workflow with the exceptions of - * listening on a `'message'` event instead of `'connection'` and using `server.bind()` instead of `server.listen()`. This is, however, only - * supported on Unix platforms. - * - * #### Example: sending a socket object - * - * Similarly, the `sendHandler` argument can be used to pass the handle of a - * socket to the child process. The example below spawns two children that each - * handle connections with "normal" or "special" priority: - * - * ```js - * import { createServer } from 'node:net'; - * import { fork } from 'node:child_process'; - * const normal = fork('subprocess.js', ['normal']); - * const special = fork('subprocess.js', ['special']); - * - * // Open up the server and send sockets to child. Use pauseOnConnect to prevent - * // the sockets from being read before they are sent to the child process. - * const server = createServer({ pauseOnConnect: true }); - * server.on('connection', (socket) => { - * - * // If this is special priority... - * if (socket.remoteAddress === '74.125.127.100') { - * special.send('socket', socket); - * return; - * } - * // This is normal priority. - * normal.send('socket', socket); - * }); - * server.listen(1337); - * ``` - * - * The `subprocess.js` would receive the socket handle as the second argument - * passed to the event callback function: - * - * ```js - * process.on('message', (m, socket) => { - * if (m === 'socket') { - * if (socket) { - * // Check that the client socket exists. - * // It is possible for the socket to be closed between the time it is - * // sent and the time it is received in the child process. - * socket.end(`Request handled with ${process.argv[2]} priority`); - * } - * } - * }); - * ``` - * - * Do not use `.maxConnections` on a socket that has been passed to a subprocess. - * The parent cannot track when the socket is destroyed. - * - * Any `'message'` handlers in the subprocess should verify that `socket` exists, - * as the connection may have been closed during the time it takes to send the - * connection to the child. - * @since v0.5.9 - * @param sendHandle `undefined`, or a [`net.Socket`](https://nodejs.org/docs/latest-v25.x/api/net.html#class-netsocket), [`net.Server`](https://nodejs.org/docs/latest-v25.x/api/net.html#class-netserver), or [`dgram.Socket`](https://nodejs.org/docs/latest-v25.x/api/dgram.html#class-dgramsocket) object. - * @param options The `options` argument, if present, is an object used to parameterize the sending of certain types of handles. `options` supports the following properties: - */ - send(message: Serializable, callback?: (error: Error | null) => void): boolean; - send(message: Serializable, sendHandle?: SendHandle, callback?: (error: Error | null) => void): boolean; - send( - message: Serializable, - sendHandle?: SendHandle, - options?: MessageOptions, - callback?: (error: Error | null) => void, - ): boolean; - /** - * Closes the IPC channel between parent and child, allowing the child to exit - * gracefully once there are no other connections keeping it alive. After calling - * this method the `subprocess.connected` and `process.connected` properties in - * both the parent and child (respectively) will be set to `false`, and it will be - * no longer possible to pass messages between the processes. - * - * The `'disconnect'` event will be emitted when there are no messages in the - * process of being received. This will most often be triggered immediately after - * calling `subprocess.disconnect()`. - * - * When the child process is a Node.js instance (e.g. spawned using {@link fork}), the `process.disconnect()` method can be invoked - * within the child process to close the IPC channel as well. - * @since v0.7.2 - */ - disconnect(): void; - /** - * By default, the parent will wait for the detached child to exit. To prevent the - * parent from waiting for a given `subprocess` to exit, use the `subprocess.unref()` method. Doing so will cause the parent's event loop to not - * include the child in its reference count, allowing the parent to exit - * independently of the child, unless there is an established IPC channel between - * the child and the parent. - * - * ```js - * import { spawn } from 'node:child_process'; - * - * const subprocess = spawn(process.argv[0], ['child_program.js'], { - * detached: true, - * stdio: 'ignore', - * }); - * - * subprocess.unref(); - * ``` - * @since v0.7.10 - */ - unref(): void; - /** - * Calling `subprocess.ref()` after making a call to `subprocess.unref()` will - * restore the removed reference count for the child process, forcing the parent - * to wait for the child to exit before exiting itself. - * - * ```js - * import { spawn } from 'node:child_process'; - * - * const subprocess = spawn(process.argv[0], ['child_program.js'], { - * detached: true, - * stdio: 'ignore', - * }); - * - * subprocess.unref(); - * subprocess.ref(); - * ``` - * @since v0.7.10 - */ - ref(): void; - } - interface ChildProcess extends InternalEventEmitter {} - // return this object when stdio option is undefined or not specified - interface ChildProcessWithoutNullStreams extends ChildProcess { - stdin: Writable; - stdout: Readable; - stderr: Readable; - readonly stdio: [ - Writable, - Readable, - Readable, - // stderr - Readable | Writable | null | undefined, - // extra, no modification - Readable | Writable | null | undefined, // extra, no modification - ]; - } - // return this object when stdio option is a tuple of 3 - interface ChildProcessByStdio - extends ChildProcess - { - stdin: I; - stdout: O; - stderr: E; - readonly stdio: [ - I, - O, - E, - Readable | Writable | null | undefined, - // extra, no modification - Readable | Writable | null | undefined, // extra, no modification - ]; - } - interface Control extends EventEmitter { - ref(): void; - unref(): void; - } - interface MessageOptions { - keepOpen?: boolean | undefined; - } - type IOType = "overlapped" | "pipe" | "ignore" | "inherit"; - type StdioOptions = IOType | Array; - type SerializationType = "json" | "advanced"; - interface MessagingOptions extends Abortable { - /** - * Specify the kind of serialization used for sending messages between processes. - * @default 'json' - */ - serialization?: SerializationType | undefined; - /** - * The signal value to be used when the spawned process will be killed by the abort signal. - * @default 'SIGTERM' - */ - killSignal?: NodeJS.Signals | number | undefined; - /** - * In milliseconds the maximum amount of time the process is allowed to run. - */ - timeout?: number | undefined; - } - interface ProcessEnvOptions { - uid?: number | undefined; - gid?: number | undefined; - cwd?: string | URL | undefined; - env?: NodeJS.ProcessEnv | undefined; - } - interface CommonOptions extends ProcessEnvOptions { - /** - * @default false - */ - windowsHide?: boolean | undefined; - /** - * @default 0 - */ - timeout?: number | undefined; - } - interface CommonSpawnOptions extends CommonOptions, MessagingOptions, Abortable { - argv0?: string | undefined; - /** - * Can be set to 'pipe', 'inherit', 'overlapped', or 'ignore', or an array of these strings. - * If passed as an array, the first element is used for `stdin`, the second for - * `stdout`, and the third for `stderr`. A fourth element can be used to - * specify the `stdio` behavior beyond the standard streams. See - * {@link ChildProcess.stdio} for more information. - * - * @default 'pipe' - */ - stdio?: StdioOptions | undefined; - shell?: boolean | string | undefined; - windowsVerbatimArguments?: boolean | undefined; - } - interface SpawnOptions extends CommonSpawnOptions { - detached?: boolean | undefined; - } - interface SpawnOptionsWithoutStdio extends SpawnOptions { - stdio?: StdioPipeNamed | StdioPipe[] | undefined; - } - type StdioNull = "inherit" | "ignore" | Stream; - type StdioPipeNamed = "pipe" | "overlapped"; - type StdioPipe = undefined | null | StdioPipeNamed; - interface SpawnOptionsWithStdioTuple< - Stdin extends StdioNull | StdioPipe, - Stdout extends StdioNull | StdioPipe, - Stderr extends StdioNull | StdioPipe, - > extends SpawnOptions { - stdio: [Stdin, Stdout, Stderr]; - } - /** - * The `child_process.spawn()` method spawns a new process using the given `command`, with command-line arguments in `args`. If omitted, `args` defaults - * to an empty array. - * - * **If the `shell` option is enabled, do not pass unsanitized user input to this** - * **function. Any input containing shell metacharacters may be used to trigger** - * **arbitrary command execution.** - * - * A third argument may be used to specify additional options, with these defaults: - * - * ```js - * const defaults = { - * cwd: undefined, - * env: process.env, - * }; - * ``` - * - * Use `cwd` to specify the working directory from which the process is spawned. - * If not given, the default is to inherit the current working directory. If given, - * but the path does not exist, the child process emits an `ENOENT` error - * and exits immediately. `ENOENT` is also emitted when the command - * does not exist. - * - * Use `env` to specify environment variables that will be visible to the new - * process, the default is `process.env`. - * - * `undefined` values in `env` will be ignored. - * - * Example of running `ls -lh /usr`, capturing `stdout`, `stderr`, and the - * exit code: - * - * ```js - * import { spawn } from 'node:child_process'; - * const ls = spawn('ls', ['-lh', '/usr']); - * - * ls.stdout.on('data', (data) => { - * console.log(`stdout: ${data}`); - * }); - * - * ls.stderr.on('data', (data) => { - * console.error(`stderr: ${data}`); - * }); - * - * ls.on('close', (code) => { - * console.log(`child process exited with code ${code}`); - * }); - * ``` - * - * Example: A very elaborate way to run `ps ax | grep ssh` - * - * ```js - * import { spawn } from 'node:child_process'; - * const ps = spawn('ps', ['ax']); - * const grep = spawn('grep', ['ssh']); - * - * ps.stdout.on('data', (data) => { - * grep.stdin.write(data); - * }); - * - * ps.stderr.on('data', (data) => { - * console.error(`ps stderr: ${data}`); - * }); - * - * ps.on('close', (code) => { - * if (code !== 0) { - * console.log(`ps process exited with code ${code}`); - * } - * grep.stdin.end(); - * }); - * - * grep.stdout.on('data', (data) => { - * console.log(data.toString()); - * }); - * - * grep.stderr.on('data', (data) => { - * console.error(`grep stderr: ${data}`); - * }); - * - * grep.on('close', (code) => { - * if (code !== 0) { - * console.log(`grep process exited with code ${code}`); - * } - * }); - * ``` - * - * Example of checking for failed `spawn`: - * - * ```js - * import { spawn } from 'node:child_process'; - * const subprocess = spawn('bad_command'); - * - * subprocess.on('error', (err) => { - * console.error('Failed to start subprocess.'); - * }); - * ``` - * - * Certain platforms (macOS, Linux) will use the value of `argv[0]` for the process - * title while others (Windows, SunOS) will use `command`. - * - * Node.js overwrites `argv[0]` with `process.execPath` on startup, so `process.argv[0]` in a Node.js child process will not match the `argv0` parameter passed to `spawn` from the parent. Retrieve - * it with the `process.argv0` property instead. - * - * If the `signal` option is enabled, calling `.abort()` on the corresponding `AbortController` is similar to calling `.kill()` on the child process except - * the error passed to the callback will be an `AbortError`: - * - * ```js - * import { spawn } from 'node:child_process'; - * const controller = new AbortController(); - * const { signal } = controller; - * const grep = spawn('grep', ['ssh'], { signal }); - * grep.on('error', (err) => { - * // This will be called with err being an AbortError if the controller aborts - * }); - * controller.abort(); // Stops the child process - * ``` - * @since v0.1.90 - * @param command The command to run. - * @param args List of string arguments. - */ - function spawn(command: string, options?: SpawnOptionsWithoutStdio): ChildProcessWithoutNullStreams; - function spawn( - command: string, - options: SpawnOptionsWithStdioTuple, - ): ChildProcessByStdio; - function spawn( - command: string, - options: SpawnOptionsWithStdioTuple, - ): ChildProcessByStdio; - function spawn( - command: string, - options: SpawnOptionsWithStdioTuple, - ): ChildProcessByStdio; - function spawn( - command: string, - options: SpawnOptionsWithStdioTuple, - ): ChildProcessByStdio; - function spawn( - command: string, - options: SpawnOptionsWithStdioTuple, - ): ChildProcessByStdio; - function spawn( - command: string, - options: SpawnOptionsWithStdioTuple, - ): ChildProcessByStdio; - function spawn( - command: string, - options: SpawnOptionsWithStdioTuple, - ): ChildProcessByStdio; - function spawn( - command: string, - options: SpawnOptionsWithStdioTuple, - ): ChildProcessByStdio; - function spawn(command: string, options: SpawnOptions): ChildProcess; - // overloads of spawn with 'args' - function spawn( - command: string, - args?: readonly string[], - options?: SpawnOptionsWithoutStdio, - ): ChildProcessWithoutNullStreams; - function spawn( - command: string, - args: readonly string[], - options: SpawnOptionsWithStdioTuple, - ): ChildProcessByStdio; - function spawn( - command: string, - args: readonly string[], - options: SpawnOptionsWithStdioTuple, - ): ChildProcessByStdio; - function spawn( - command: string, - args: readonly string[], - options: SpawnOptionsWithStdioTuple, - ): ChildProcessByStdio; - function spawn( - command: string, - args: readonly string[], - options: SpawnOptionsWithStdioTuple, - ): ChildProcessByStdio; - function spawn( - command: string, - args: readonly string[], - options: SpawnOptionsWithStdioTuple, - ): ChildProcessByStdio; - function spawn( - command: string, - args: readonly string[], - options: SpawnOptionsWithStdioTuple, - ): ChildProcessByStdio; - function spawn( - command: string, - args: readonly string[], - options: SpawnOptionsWithStdioTuple, - ): ChildProcessByStdio; - function spawn( - command: string, - args: readonly string[], - options: SpawnOptionsWithStdioTuple, - ): ChildProcessByStdio; - function spawn(command: string, args: readonly string[], options: SpawnOptions): ChildProcess; - interface ExecOptions extends CommonOptions { - shell?: string | undefined; - signal?: AbortSignal | undefined; - maxBuffer?: number | undefined; - killSignal?: NodeJS.Signals | number | undefined; - encoding?: string | null | undefined; - } - interface ExecOptionsWithStringEncoding extends ExecOptions { - encoding?: BufferEncoding | undefined; - } - interface ExecOptionsWithBufferEncoding extends ExecOptions { - encoding: "buffer" | null; // specify `null`. - } - // TODO: Just Plain Wrong™ (see also nodejs/node#57392) - interface ExecException extends Error { - cmd?: string; - killed?: boolean; - code?: number; - signal?: NodeJS.Signals; - stdout?: string; - stderr?: string; - } - /** - * Spawns a shell then executes the `command` within that shell, buffering any - * generated output. The `command` string passed to the exec function is processed - * directly by the shell and special characters (vary based on [shell](https://en.wikipedia.org/wiki/List_of_command-line_interpreters)) - * need to be dealt with accordingly: - * - * ```js - * import { exec } from 'node:child_process'; - * - * exec('"/path/to/test file/test.sh" arg1 arg2'); - * // Double quotes are used so that the space in the path is not interpreted as - * // a delimiter of multiple arguments. - * - * exec('echo "The \\$HOME variable is $HOME"'); - * // The $HOME variable is escaped in the first instance, but not in the second. - * ``` - * - * **Never pass unsanitized user input to this function. Any input containing shell** - * **metacharacters may be used to trigger arbitrary command execution.** - * - * If a `callback` function is provided, it is called with the arguments `(error, stdout, stderr)`. On success, `error` will be `null`. On error, `error` will be an instance of `Error`. The - * `error.code` property will be - * the exit code of the process. By convention, any exit code other than `0` indicates an error. `error.signal` will be the signal that terminated the - * process. - * - * The `stdout` and `stderr` arguments passed to the callback will contain the - * stdout and stderr output of the child process. By default, Node.js will decode - * the output as UTF-8 and pass strings to the callback. The `encoding` option - * can be used to specify the character encoding used to decode the stdout and - * stderr output. If `encoding` is `'buffer'`, or an unrecognized character - * encoding, `Buffer` objects will be passed to the callback instead. - * - * ```js - * import { exec } from 'node:child_process'; - * exec('cat *.js missing_file | wc -l', (error, stdout, stderr) => { - * if (error) { - * console.error(`exec error: ${error}`); - * return; - * } - * console.log(`stdout: ${stdout}`); - * console.error(`stderr: ${stderr}`); - * }); - * ``` - * - * If `timeout` is greater than `0`, the parent will send the signal - * identified by the `killSignal` property (the default is `'SIGTERM'`) if the - * child runs longer than `timeout` milliseconds. - * - * Unlike the [`exec(3)`](http://man7.org/linux/man-pages/man3/exec.3.html) POSIX system call, `child_process.exec()` does not replace - * the existing process and uses a shell to execute the command. - * - * If this method is invoked as its `util.promisify()` ed version, it returns - * a `Promise` for an `Object` with `stdout` and `stderr` properties. The returned `ChildProcess` instance is attached to the `Promise` as a `child` property. In - * case of an error (including any error resulting in an exit code other than 0), a - * rejected promise is returned, with the same `error` object given in the - * callback, but with two additional properties `stdout` and `stderr`. - * - * ```js - * import util from 'node:util'; - * import child_process from 'node:child_process'; - * const exec = util.promisify(child_process.exec); - * - * async function lsExample() { - * const { stdout, stderr } = await exec('ls'); - * console.log('stdout:', stdout); - * console.error('stderr:', stderr); - * } - * lsExample(); - * ``` - * - * If the `signal` option is enabled, calling `.abort()` on the corresponding `AbortController` is similar to calling `.kill()` on the child process except - * the error passed to the callback will be an `AbortError`: - * - * ```js - * import { exec } from 'node:child_process'; - * const controller = new AbortController(); - * const { signal } = controller; - * const child = exec('grep ssh', { signal }, (error) => { - * console.error(error); // an AbortError - * }); - * controller.abort(); - * ``` - * @since v0.1.90 - * @param command The command to run, with space-separated arguments. - * @param callback called with the output when process terminates. - */ - function exec( - command: string, - callback?: (error: ExecException | null, stdout: string, stderr: string) => void, - ): ChildProcess; - // `options` with `"buffer"` or `null` for `encoding` means stdout/stderr are definitely `Buffer`. - function exec( - command: string, - options: ExecOptionsWithBufferEncoding, - callback?: (error: ExecException | null, stdout: NonSharedBuffer, stderr: NonSharedBuffer) => void, - ): ChildProcess; - // `options` with well-known or absent `encoding` means stdout/stderr are definitely `string`. - function exec( - command: string, - options: ExecOptionsWithStringEncoding, - callback?: (error: ExecException | null, stdout: string, stderr: string) => void, - ): ChildProcess; - // fallback if nothing else matches. Worst case is always `string | Buffer`. - function exec( - command: string, - options: ExecOptions | undefined | null, - callback?: ( - error: ExecException | null, - stdout: string | NonSharedBuffer, - stderr: string | NonSharedBuffer, - ) => void, - ): ChildProcess; - interface PromiseWithChild extends Promise { - child: ChildProcess; - } - namespace exec { - function __promisify__(command: string): PromiseWithChild<{ - stdout: string; - stderr: string; - }>; - function __promisify__( - command: string, - options: ExecOptionsWithBufferEncoding, - ): PromiseWithChild<{ - stdout: NonSharedBuffer; - stderr: NonSharedBuffer; - }>; - function __promisify__( - command: string, - options: ExecOptionsWithStringEncoding, - ): PromiseWithChild<{ - stdout: string; - stderr: string; - }>; - function __promisify__( - command: string, - options: ExecOptions | undefined | null, - ): PromiseWithChild<{ - stdout: string | NonSharedBuffer; - stderr: string | NonSharedBuffer; - }>; - } - interface ExecFileOptions extends CommonOptions, Abortable { - maxBuffer?: number | undefined; - killSignal?: NodeJS.Signals | number | undefined; - windowsVerbatimArguments?: boolean | undefined; - shell?: boolean | string | undefined; - signal?: AbortSignal | undefined; - encoding?: string | null | undefined; - } - interface ExecFileOptionsWithStringEncoding extends ExecFileOptions { - encoding?: BufferEncoding | undefined; - } - interface ExecFileOptionsWithBufferEncoding extends ExecFileOptions { - encoding: "buffer" | null; - } - /** @deprecated Use `ExecFileOptions` instead. */ - interface ExecFileOptionsWithOtherEncoding extends ExecFileOptions {} - // TODO: execFile exceptions can take many forms... this accurately describes none of them - type ExecFileException = - & Omit - & Omit - & { code?: string | number | null }; - /** - * The `child_process.execFile()` function is similar to {@link exec} except that it does not spawn a shell by default. Rather, the specified - * executable `file` is spawned directly as a new process making it slightly more - * efficient than {@link exec}. - * - * The same options as {@link exec} are supported. Since a shell is - * not spawned, behaviors such as I/O redirection and file globbing are not - * supported. - * - * ```js - * import { execFile } from 'node:child_process'; - * const child = execFile('node', ['--version'], (error, stdout, stderr) => { - * if (error) { - * throw error; - * } - * console.log(stdout); - * }); - * ``` - * - * The `stdout` and `stderr` arguments passed to the callback will contain the - * stdout and stderr output of the child process. By default, Node.js will decode - * the output as UTF-8 and pass strings to the callback. The `encoding` option - * can be used to specify the character encoding used to decode the stdout and - * stderr output. If `encoding` is `'buffer'`, or an unrecognized character - * encoding, `Buffer` objects will be passed to the callback instead. - * - * If this method is invoked as its `util.promisify()` ed version, it returns - * a `Promise` for an `Object` with `stdout` and `stderr` properties. The returned `ChildProcess` instance is attached to the `Promise` as a `child` property. In - * case of an error (including any error resulting in an exit code other than 0), a - * rejected promise is returned, with the same `error` object given in the - * callback, but with two additional properties `stdout` and `stderr`. - * - * ```js - * import util from 'node:util'; - * import child_process from 'node:child_process'; - * const execFile = util.promisify(child_process.execFile); - * async function getVersion() { - * const { stdout } = await execFile('node', ['--version']); - * console.log(stdout); - * } - * getVersion(); - * ``` - * - * **If the `shell` option is enabled, do not pass unsanitized user input to this** - * **function. Any input containing shell metacharacters may be used to trigger** - * **arbitrary command execution.** - * - * If the `signal` option is enabled, calling `.abort()` on the corresponding `AbortController` is similar to calling `.kill()` on the child process except - * the error passed to the callback will be an `AbortError`: - * - * ```js - * import { execFile } from 'node:child_process'; - * const controller = new AbortController(); - * const { signal } = controller; - * const child = execFile('node', ['--version'], { signal }, (error) => { - * console.error(error); // an AbortError - * }); - * controller.abort(); - * ``` - * @since v0.1.91 - * @param file The name or path of the executable file to run. - * @param args List of string arguments. - * @param callback Called with the output when process terminates. - */ - // no `options` definitely means stdout/stderr are `string`. - function execFile( - file: string, - callback?: (error: ExecFileException | null, stdout: string, stderr: string) => void, - ): ChildProcess; - function execFile( - file: string, - args: readonly string[] | undefined | null, - callback?: (error: ExecFileException | null, stdout: string, stderr: string) => void, - ): ChildProcess; - // `options` with `"buffer"` or `null` for `encoding` means stdout/stderr are definitely `Buffer`. - function execFile( - file: string, - options: ExecFileOptionsWithBufferEncoding, - callback?: (error: ExecFileException | null, stdout: NonSharedBuffer, stderr: NonSharedBuffer) => void, - ): ChildProcess; - function execFile( - file: string, - args: readonly string[] | undefined | null, - options: ExecFileOptionsWithBufferEncoding, - callback?: (error: ExecFileException | null, stdout: NonSharedBuffer, stderr: NonSharedBuffer) => void, - ): ChildProcess; - // `options` with well-known or absent `encoding` means stdout/stderr are definitely `string`. - function execFile( - file: string, - options: ExecFileOptionsWithStringEncoding, - callback?: (error: ExecFileException | null, stdout: string, stderr: string) => void, - ): ChildProcess; - function execFile( - file: string, - args: readonly string[] | undefined | null, - options: ExecFileOptionsWithStringEncoding, - callback?: (error: ExecFileException | null, stdout: string, stderr: string) => void, - ): ChildProcess; - // fallback if nothing else matches. Worst case is always `string | Buffer`. - function execFile( - file: string, - options: ExecFileOptions | undefined | null, - callback: - | (( - error: ExecFileException | null, - stdout: string | NonSharedBuffer, - stderr: string | NonSharedBuffer, - ) => void) - | undefined - | null, - ): ChildProcess; - function execFile( - file: string, - args: readonly string[] | undefined | null, - options: ExecFileOptions | undefined | null, - callback: - | (( - error: ExecFileException | null, - stdout: string | NonSharedBuffer, - stderr: string | NonSharedBuffer, - ) => void) - | undefined - | null, - ): ChildProcess; - namespace execFile { - function __promisify__(file: string): PromiseWithChild<{ - stdout: string; - stderr: string; - }>; - function __promisify__( - file: string, - args: readonly string[] | undefined | null, - ): PromiseWithChild<{ - stdout: string; - stderr: string; - }>; - function __promisify__( - file: string, - options: ExecFileOptionsWithBufferEncoding, - ): PromiseWithChild<{ - stdout: NonSharedBuffer; - stderr: NonSharedBuffer; - }>; - function __promisify__( - file: string, - args: readonly string[] | undefined | null, - options: ExecFileOptionsWithBufferEncoding, - ): PromiseWithChild<{ - stdout: NonSharedBuffer; - stderr: NonSharedBuffer; - }>; - function __promisify__( - file: string, - options: ExecFileOptionsWithStringEncoding, - ): PromiseWithChild<{ - stdout: string; - stderr: string; - }>; - function __promisify__( - file: string, - args: readonly string[] | undefined | null, - options: ExecFileOptionsWithStringEncoding, - ): PromiseWithChild<{ - stdout: string; - stderr: string; - }>; - function __promisify__( - file: string, - options: ExecFileOptions | undefined | null, - ): PromiseWithChild<{ - stdout: string | NonSharedBuffer; - stderr: string | NonSharedBuffer; - }>; - function __promisify__( - file: string, - args: readonly string[] | undefined | null, - options: ExecFileOptions | undefined | null, - ): PromiseWithChild<{ - stdout: string | NonSharedBuffer; - stderr: string | NonSharedBuffer; - }>; - } - interface ForkOptions extends ProcessEnvOptions, MessagingOptions, Abortable { - execPath?: string | undefined; - execArgv?: string[] | undefined; - silent?: boolean | undefined; - /** - * Can be set to 'pipe', 'inherit', 'overlapped', or 'ignore', or an array of these strings. - * If passed as an array, the first element is used for `stdin`, the second for - * `stdout`, and the third for `stderr`. A fourth element can be used to - * specify the `stdio` behavior beyond the standard streams. See - * {@link ChildProcess.stdio} for more information. - * - * @default 'pipe' - */ - stdio?: StdioOptions | undefined; - detached?: boolean | undefined; - windowsVerbatimArguments?: boolean | undefined; - } - /** - * The `child_process.fork()` method is a special case of {@link spawn} used specifically to spawn new Node.js processes. - * Like {@link spawn}, a `ChildProcess` object is returned. The - * returned `ChildProcess` will have an additional communication channel - * built-in that allows messages to be passed back and forth between the parent and - * child. See `subprocess.send()` for details. - * - * Keep in mind that spawned Node.js child processes are - * independent of the parent with exception of the IPC communication channel - * that is established between the two. Each process has its own memory, with - * their own V8 instances. Because of the additional resource allocations - * required, spawning a large number of child Node.js processes is not - * recommended. - * - * By default, `child_process.fork()` will spawn new Node.js instances using the `process.execPath` of the parent process. The `execPath` property in the `options` object allows for an alternative - * execution path to be used. - * - * Node.js processes launched with a custom `execPath` will communicate with the - * parent process using the file descriptor (fd) identified using the - * environment variable `NODE_CHANNEL_FD` on the child process. - * - * Unlike the [`fork(2)`](http://man7.org/linux/man-pages/man2/fork.2.html) POSIX system call, `child_process.fork()` does not clone the - * current process. - * - * The `shell` option available in {@link spawn} is not supported by `child_process.fork()` and will be ignored if set. - * - * If the `signal` option is enabled, calling `.abort()` on the corresponding `AbortController` is similar to calling `.kill()` on the child process except - * the error passed to the callback will be an `AbortError`: - * - * ```js - * if (process.argv[2] === 'child') { - * setTimeout(() => { - * console.log(`Hello from ${process.argv[2]}!`); - * }, 1_000); - * } else { - * import { fork } from 'node:child_process'; - * const controller = new AbortController(); - * const { signal } = controller; - * const child = fork(__filename, ['child'], { signal }); - * child.on('error', (err) => { - * // This will be called with err being an AbortError if the controller aborts - * }); - * controller.abort(); // Stops the child process - * } - * ``` - * @since v0.5.0 - * @param modulePath The module to run in the child. - * @param args List of string arguments. - */ - function fork(modulePath: string | URL, options?: ForkOptions): ChildProcess; - function fork(modulePath: string | URL, args?: readonly string[], options?: ForkOptions): ChildProcess; - interface SpawnSyncOptions extends CommonSpawnOptions { - input?: string | NodeJS.ArrayBufferView | undefined; - maxBuffer?: number | undefined; - encoding?: BufferEncoding | "buffer" | null | undefined; - } - interface SpawnSyncOptionsWithStringEncoding extends SpawnSyncOptions { - encoding: BufferEncoding; - } - interface SpawnSyncOptionsWithBufferEncoding extends SpawnSyncOptions { - encoding?: "buffer" | null | undefined; - } - interface SpawnSyncReturns { - pid: number; - output: Array; - stdout: T; - stderr: T; - status: number | null; - signal: NodeJS.Signals | null; - error?: Error; - } - /** - * The `child_process.spawnSync()` method is generally identical to {@link spawn} with the exception that the function will not return - * until the child process has fully closed. When a timeout has been encountered - * and `killSignal` is sent, the method won't return until the process has - * completely exited. If the process intercepts and handles the `SIGTERM` signal - * and doesn't exit, the parent process will wait until the child process has - * exited. - * - * **If the `shell` option is enabled, do not pass unsanitized user input to this** - * **function. Any input containing shell metacharacters may be used to trigger** - * **arbitrary command execution.** - * @since v0.11.12 - * @param command The command to run. - * @param args List of string arguments. - */ - function spawnSync(command: string): SpawnSyncReturns; - function spawnSync(command: string, options: SpawnSyncOptionsWithStringEncoding): SpawnSyncReturns; - function spawnSync(command: string, options: SpawnSyncOptionsWithBufferEncoding): SpawnSyncReturns; - function spawnSync(command: string, options?: SpawnSyncOptions): SpawnSyncReturns; - function spawnSync(command: string, args: readonly string[]): SpawnSyncReturns; - function spawnSync( - command: string, - args: readonly string[], - options: SpawnSyncOptionsWithStringEncoding, - ): SpawnSyncReturns; - function spawnSync( - command: string, - args: readonly string[], - options: SpawnSyncOptionsWithBufferEncoding, - ): SpawnSyncReturns; - function spawnSync( - command: string, - args?: readonly string[], - options?: SpawnSyncOptions, - ): SpawnSyncReturns; - interface CommonExecOptions extends CommonOptions { - input?: string | NodeJS.ArrayBufferView | undefined; - /** - * Can be set to 'pipe', 'inherit, or 'ignore', or an array of these strings. - * If passed as an array, the first element is used for `stdin`, the second for - * `stdout`, and the third for `stderr`. A fourth element can be used to - * specify the `stdio` behavior beyond the standard streams. See - * {@link ChildProcess.stdio} for more information. - * - * @default 'pipe' - */ - stdio?: StdioOptions | undefined; - killSignal?: NodeJS.Signals | number | undefined; - maxBuffer?: number | undefined; - encoding?: BufferEncoding | "buffer" | null | undefined; - } - interface ExecSyncOptions extends CommonExecOptions { - shell?: string | undefined; - } - interface ExecSyncOptionsWithStringEncoding extends ExecSyncOptions { - encoding: BufferEncoding; - } - interface ExecSyncOptionsWithBufferEncoding extends ExecSyncOptions { - encoding?: "buffer" | null | undefined; - } - /** - * The `child_process.execSync()` method is generally identical to {@link exec} with the exception that the method will not return - * until the child process has fully closed. When a timeout has been encountered - * and `killSignal` is sent, the method won't return until the process has - * completely exited. If the child process intercepts and handles the `SIGTERM` signal and doesn't exit, the parent process will wait until the child process - * has exited. - * - * If the process times out or has a non-zero exit code, this method will throw. - * The `Error` object will contain the entire result from {@link spawnSync}. - * - * **Never pass unsanitized user input to this function. Any input containing shell** - * **metacharacters may be used to trigger arbitrary command execution.** - * @since v0.11.12 - * @param command The command to run. - * @return The stdout from the command. - */ - function execSync(command: string): NonSharedBuffer; - function execSync(command: string, options: ExecSyncOptionsWithStringEncoding): string; - function execSync(command: string, options: ExecSyncOptionsWithBufferEncoding): NonSharedBuffer; - function execSync(command: string, options?: ExecSyncOptions): string | NonSharedBuffer; - interface ExecFileSyncOptions extends CommonExecOptions { - shell?: boolean | string | undefined; - } - interface ExecFileSyncOptionsWithStringEncoding extends ExecFileSyncOptions { - encoding: BufferEncoding; - } - interface ExecFileSyncOptionsWithBufferEncoding extends ExecFileSyncOptions { - encoding?: "buffer" | null | undefined; // specify `null`. - } - /** - * The `child_process.execFileSync()` method is generally identical to {@link execFile} with the exception that the method will not - * return until the child process has fully closed. When a timeout has been - * encountered and `killSignal` is sent, the method won't return until the process - * has completely exited. - * - * If the child process intercepts and handles the `SIGTERM` signal and - * does not exit, the parent process will still wait until the child process has - * exited. - * - * If the process times out or has a non-zero exit code, this method will throw an `Error` that will include the full result of the underlying {@link spawnSync}. - * - * **If the `shell` option is enabled, do not pass unsanitized user input to this** - * **function. Any input containing shell metacharacters may be used to trigger** - * **arbitrary command execution.** - * @since v0.11.12 - * @param file The name or path of the executable file to run. - * @param args List of string arguments. - * @return The stdout from the command. - */ - function execFileSync(file: string): NonSharedBuffer; - function execFileSync(file: string, options: ExecFileSyncOptionsWithStringEncoding): string; - function execFileSync(file: string, options: ExecFileSyncOptionsWithBufferEncoding): NonSharedBuffer; - function execFileSync(file: string, options?: ExecFileSyncOptions): string | NonSharedBuffer; - function execFileSync(file: string, args: readonly string[]): NonSharedBuffer; - function execFileSync( - file: string, - args: readonly string[], - options: ExecFileSyncOptionsWithStringEncoding, - ): string; - function execFileSync( - file: string, - args: readonly string[], - options: ExecFileSyncOptionsWithBufferEncoding, - ): NonSharedBuffer; - function execFileSync( - file: string, - args?: readonly string[], - options?: ExecFileSyncOptions, - ): string | NonSharedBuffer; -} -declare module "child_process" { - export * from "node:child_process"; -} diff --git a/PBandGraphScaffold/node_modules/@types/node/cluster.d.ts b/PBandGraphScaffold/node_modules/@types/node/cluster.d.ts deleted file mode 100644 index 4e5efbf..0000000 --- a/PBandGraphScaffold/node_modules/@types/node/cluster.d.ts +++ /dev/null @@ -1,486 +0,0 @@ -/** - * Clusters of Node.js processes can be used to run multiple instances of Node.js - * that can distribute workloads among their application threads. When process isolation - * is not needed, use the [`worker_threads`](https://nodejs.org/docs/latest-v25.x/api/worker_threads.html) - * module instead, which allows running multiple application threads within a single Node.js instance. - * - * The cluster module allows easy creation of child processes that all share - * server ports. - * - * ```js - * import cluster from 'node:cluster'; - * import http from 'node:http'; - * import { availableParallelism } from 'node:os'; - * import process from 'node:process'; - * - * const numCPUs = availableParallelism(); - * - * if (cluster.isPrimary) { - * console.log(`Primary ${process.pid} is running`); - * - * // Fork workers. - * for (let i = 0; i < numCPUs; i++) { - * cluster.fork(); - * } - * - * cluster.on('exit', (worker, code, signal) => { - * console.log(`worker ${worker.process.pid} died`); - * }); - * } else { - * // Workers can share any TCP connection - * // In this case it is an HTTP server - * http.createServer((req, res) => { - * res.writeHead(200); - * res.end('hello world\n'); - * }).listen(8000); - * - * console.log(`Worker ${process.pid} started`); - * } - * ``` - * - * Running Node.js will now share port 8000 between the workers: - * - * ```console - * $ node server.js - * Primary 3596 is running - * Worker 4324 started - * Worker 4520 started - * Worker 6056 started - * Worker 5644 started - * ``` - * - * On Windows, it is not yet possible to set up a named pipe server in a worker. - * @see [source](https://github.com/nodejs/node/blob/v25.x/lib/cluster.js) - */ -declare module "node:cluster" { - import * as child_process from "node:child_process"; - import { EventEmitter, InternalEventEmitter } from "node:events"; - class Worker implements EventEmitter { - constructor(options?: cluster.WorkerOptions); - /** - * Each new worker is given its own unique id, this id is stored in the `id`. - * - * While a worker is alive, this is the key that indexes it in `cluster.workers`. - * @since v0.8.0 - */ - id: number; - /** - * All workers are created using [`child_process.fork()`](https://nodejs.org/docs/latest-v25.x/api/child_process.html#child_processforkmodulepath-args-options), the returned object - * from this function is stored as `.process`. In a worker, the global `process` is stored. - * - * See: [Child Process module](https://nodejs.org/docs/latest-v25.x/api/child_process.html#child_processforkmodulepath-args-options). - * - * Workers will call `process.exit(0)` if the `'disconnect'` event occurs - * on `process` and `.exitedAfterDisconnect` is not `true`. This protects against - * accidental disconnection. - * @since v0.7.0 - */ - process: child_process.ChildProcess; - /** - * Send a message to a worker or primary, optionally with a handle. - * - * In the primary, this sends a message to a specific worker. It is identical to [`ChildProcess.send()`](https://nodejs.org/docs/latest-v25.x/api/child_process.html#subprocesssendmessage-sendhandle-options-callback). - * - * In a worker, this sends a message to the primary. It is identical to `process.send()`. - * - * This example will echo back all messages from the primary: - * - * ```js - * if (cluster.isPrimary) { - * const worker = cluster.fork(); - * worker.send('hi there'); - * - * } else if (cluster.isWorker) { - * process.on('message', (msg) => { - * process.send(msg); - * }); - * } - * ``` - * @since v0.7.0 - * @param options The `options` argument, if present, is an object used to parameterize the sending of certain types of handles. - */ - send(message: child_process.Serializable, callback?: (error: Error | null) => void): boolean; - send( - message: child_process.Serializable, - sendHandle: child_process.SendHandle, - callback?: (error: Error | null) => void, - ): boolean; - send( - message: child_process.Serializable, - sendHandle: child_process.SendHandle, - options?: child_process.MessageOptions, - callback?: (error: Error | null) => void, - ): boolean; - /** - * This function will kill the worker. In the primary worker, it does this by - * disconnecting the `worker.process`, and once disconnected, killing with `signal`. In the worker, it does it by killing the process with `signal`. - * - * The `kill()` function kills the worker process without waiting for a graceful - * disconnect, it has the same behavior as `worker.process.kill()`. - * - * This method is aliased as `worker.destroy()` for backwards compatibility. - * - * In a worker, `process.kill()` exists, but it is not this function; - * it is [`kill()`](https://nodejs.org/docs/latest-v25.x/api/process.html#processkillpid-signal). - * @since v0.9.12 - * @param [signal='SIGTERM'] Name of the kill signal to send to the worker process. - */ - kill(signal?: string): void; - destroy(signal?: string): void; - /** - * In a worker, this function will close all servers, wait for the `'close'` event - * on those servers, and then disconnect the IPC channel. - * - * In the primary, an internal message is sent to the worker causing it to call `.disconnect()` on itself. - * - * Causes `.exitedAfterDisconnect` to be set. - * - * After a server is closed, it will no longer accept new connections, - * but connections may be accepted by any other listening worker. Existing - * connections will be allowed to close as usual. When no more connections exist, - * see `server.close()`, the IPC channel to the worker will close allowing it - * to die gracefully. - * - * The above applies _only_ to server connections, client connections are not - * automatically closed by workers, and disconnect does not wait for them to close - * before exiting. - * - * In a worker, `process.disconnect` exists, but it is not this function; - * it is `disconnect()`. - * - * Because long living server connections may block workers from disconnecting, it - * may be useful to send a message, so application specific actions may be taken to - * close them. It also may be useful to implement a timeout, killing a worker if - * the `'disconnect'` event has not been emitted after some time. - * - * ```js - * import net from 'node:net'; - * - * if (cluster.isPrimary) { - * const worker = cluster.fork(); - * let timeout; - * - * worker.on('listening', (address) => { - * worker.send('shutdown'); - * worker.disconnect(); - * timeout = setTimeout(() => { - * worker.kill(); - * }, 2000); - * }); - * - * worker.on('disconnect', () => { - * clearTimeout(timeout); - * }); - * - * } else if (cluster.isWorker) { - * const server = net.createServer((socket) => { - * // Connections never end - * }); - * - * server.listen(8000); - * - * process.on('message', (msg) => { - * if (msg === 'shutdown') { - * // Initiate graceful close of any connections to server - * } - * }); - * } - * ``` - * @since v0.7.7 - * @return A reference to `worker`. - */ - disconnect(): this; - /** - * This function returns `true` if the worker is connected to its primary via its - * IPC channel, `false` otherwise. A worker is connected to its primary after it - * has been created. It is disconnected after the `'disconnect'` event is emitted. - * @since v0.11.14 - */ - isConnected(): boolean; - /** - * This function returns `true` if the worker's process has terminated (either - * because of exiting or being signaled). Otherwise, it returns `false`. - * - * ```js - * import cluster from 'node:cluster'; - * import http from 'node:http'; - * import { availableParallelism } from 'node:os'; - * import process from 'node:process'; - * - * const numCPUs = availableParallelism(); - * - * if (cluster.isPrimary) { - * console.log(`Primary ${process.pid} is running`); - * - * // Fork workers. - * for (let i = 0; i < numCPUs; i++) { - * cluster.fork(); - * } - * - * cluster.on('fork', (worker) => { - * console.log('worker is dead:', worker.isDead()); - * }); - * - * cluster.on('exit', (worker, code, signal) => { - * console.log('worker is dead:', worker.isDead()); - * }); - * } else { - * // Workers can share any TCP connection. In this case, it is an HTTP server. - * http.createServer((req, res) => { - * res.writeHead(200); - * res.end(`Current process\n ${process.pid}`); - * process.kill(process.pid); - * }).listen(8000); - * } - * ``` - * @since v0.11.14 - */ - isDead(): boolean; - /** - * This property is `true` if the worker exited due to `.disconnect()`. - * If the worker exited any other way, it is `false`. If the - * worker has not exited, it is `undefined`. - * - * The boolean `worker.exitedAfterDisconnect` allows distinguishing between - * voluntary and accidental exit, the primary may choose not to respawn a worker - * based on this value. - * - * ```js - * cluster.on('exit', (worker, code, signal) => { - * if (worker.exitedAfterDisconnect === true) { - * console.log('Oh, it was just voluntary – no need to worry'); - * } - * }); - * - * // kill worker - * worker.kill(); - * ``` - * @since v6.0.0 - */ - exitedAfterDisconnect: boolean; - } - interface Worker extends InternalEventEmitter {} - type _Worker = Worker; - namespace cluster { - interface Worker extends _Worker {} - interface WorkerOptions { - id?: number | undefined; - process?: child_process.ChildProcess | undefined; - state?: string | undefined; - } - interface WorkerEventMap { - "disconnect": []; - "error": [error: Error]; - "exit": [code: number, signal: string]; - "listening": [address: Address]; - "message": [message: any, handle: child_process.SendHandle]; - "online": []; - } - interface ClusterSettings { - /** - * List of string arguments passed to the Node.js executable. - * @default process.execArgv - */ - execArgv?: string[] | undefined; - /** - * File path to worker file. - * @default process.argv[1] - */ - exec?: string | undefined; - /** - * String arguments passed to worker. - * @default process.argv.slice(2) - */ - args?: readonly string[] | undefined; - /** - * Whether or not to send output to parent's stdio. - * @default false - */ - silent?: boolean | undefined; - /** - * Configures the stdio of forked processes. Because the cluster module relies on IPC to function, this configuration must - * contain an `'ipc'` entry. When this option is provided, it overrides `silent`. See [`child_prcess.spawn()`](https://nodejs.org/docs/latest-v25.x/api/child_process.html#child_processspawncommand-args-options)'s - * [`stdio`](https://nodejs.org/docs/latest-v25.x/api/child_process.html#optionsstdio). - */ - stdio?: any[] | undefined; - /** - * Sets the user identity of the process. (See [`setuid(2)`](https://man7.org/linux/man-pages/man2/setuid.2.html).) - */ - uid?: number | undefined; - /** - * Sets the group identity of the process. (See [`setgid(2)`](https://man7.org/linux/man-pages/man2/setgid.2.html).) - */ - gid?: number | undefined; - /** - * Sets inspector port of worker. This can be a number, or a function that takes no arguments and returns a number. - * By default each worker gets its own port, incremented from the primary's `process.debugPort`. - */ - inspectPort?: number | (() => number) | undefined; - /** - * Specify the kind of serialization used for sending messages between processes. Possible values are `'json'` and `'advanced'`. - * See [Advanced serialization for `child_process`](https://nodejs.org/docs/latest-v25.x/api/child_process.html#advanced-serialization) for more details. - * @default false - */ - serialization?: "json" | "advanced" | undefined; - /** - * Current working directory of the worker process. - * @default undefined (inherits from parent process) - */ - cwd?: string | undefined; - /** - * Hide the forked processes console window that would normally be created on Windows systems. - * @default false - */ - windowsHide?: boolean | undefined; - } - interface Address { - address: string; - port: number; - /** - * The `addressType` is one of: - * - * * `4` (TCPv4) - * * `6` (TCPv6) - * * `-1` (Unix domain socket) - * * `'udp4'` or `'udp6'` (UDPv4 or UDPv6) - */ - addressType: 4 | 6 | -1 | "udp4" | "udp6"; - } - interface ClusterEventMap { - "disconnect": [worker: Worker]; - "exit": [worker: Worker, code: number, signal: string]; - "fork": [worker: Worker]; - "listening": [worker: Worker, address: Address]; - "message": [worker: Worker, message: any, handle: child_process.SendHandle]; - "online": [worker: Worker]; - "setup": [settings: ClusterSettings]; - } - interface Cluster extends InternalEventEmitter { - /** - * A `Worker` object contains all public information and method about a worker. - * In the primary it can be obtained using `cluster.workers`. In a worker - * it can be obtained using `cluster.worker`. - * @since v0.7.0 - */ - Worker: typeof Worker; - disconnect(callback?: () => void): void; - /** - * Spawn a new worker process. - * - * This can only be called from the primary process. - * @param env Key/value pairs to add to worker process environment. - * @since v0.6.0 - */ - fork(env?: any): Worker; - /** @deprecated since v16.0.0 - use isPrimary. */ - readonly isMaster: boolean; - /** - * True if the process is a primary. This is determined by the `process.env.NODE_UNIQUE_ID`. If `process.env.NODE_UNIQUE_ID` - * is undefined, then `isPrimary` is `true`. - * @since v16.0.0 - */ - readonly isPrimary: boolean; - /** - * True if the process is not a primary (it is the negation of `cluster.isPrimary`). - * @since v0.6.0 - */ - readonly isWorker: boolean; - /** - * The scheduling policy, either `cluster.SCHED_RR` for round-robin or `cluster.SCHED_NONE` to leave it to the operating system. This is a - * global setting and effectively frozen once either the first worker is spawned, or [`.setupPrimary()`](https://nodejs.org/docs/latest-v25.x/api/cluster.html#clustersetupprimarysettings) - * is called, whichever comes first. - * - * `SCHED_RR` is the default on all operating systems except Windows. Windows will change to `SCHED_RR` once libuv is able to effectively distribute - * IOCP handles without incurring a large performance hit. - * - * `cluster.schedulingPolicy` can also be set through the `NODE_CLUSTER_SCHED_POLICY` environment variable. Valid values are `'rr'` and `'none'`. - * @since v0.11.2 - */ - schedulingPolicy: number; - /** - * After calling [`.setupPrimary()`](https://nodejs.org/docs/latest-v25.x/api/cluster.html#clustersetupprimarysettings) - * (or [`.fork()`](https://nodejs.org/docs/latest-v25.x/api/cluster.html#clusterforkenv)) this settings object will contain - * the settings, including the default values. - * - * This object is not intended to be changed or set manually. - * @since v0.7.1 - */ - readonly settings: ClusterSettings; - /** @deprecated since v16.0.0 - use [`.setupPrimary()`](https://nodejs.org/docs/latest-v25.x/api/cluster.html#clustersetupprimarysettings) instead. */ - setupMaster(settings?: ClusterSettings): void; - /** - * `setupPrimary` is used to change the default 'fork' behavior. Once called, the settings will be present in `cluster.settings`. - * - * Any settings changes only affect future calls to [`.fork()`](https://nodejs.org/docs/latest-v25.x/api/cluster.html#clusterforkenv) - * and have no effect on workers that are already running. - * - * The only attribute of a worker that cannot be set via `.setupPrimary()` is the `env` passed to - * [`.fork()`](https://nodejs.org/docs/latest-v25.x/api/cluster.html#clusterforkenv). - * - * The defaults above apply to the first call only; the defaults for later calls are the current values at the time of - * `cluster.setupPrimary()` is called. - * - * ```js - * import cluster from 'node:cluster'; - * - * cluster.setupPrimary({ - * exec: 'worker.js', - * args: ['--use', 'https'], - * silent: true, - * }); - * cluster.fork(); // https worker - * cluster.setupPrimary({ - * exec: 'worker.js', - * args: ['--use', 'http'], - * }); - * cluster.fork(); // http worker - * ``` - * - * This can only be called from the primary process. - * @since v16.0.0 - */ - setupPrimary(settings?: ClusterSettings): void; - /** - * A reference to the current worker object. Not available in the primary process. - * - * ```js - * import cluster from 'node:cluster'; - * - * if (cluster.isPrimary) { - * console.log('I am primary'); - * cluster.fork(); - * cluster.fork(); - * } else if (cluster.isWorker) { - * console.log(`I am worker #${cluster.worker.id}`); - * } - * ``` - * @since v0.7.0 - */ - readonly worker?: Worker; - /** - * A hash that stores the active worker objects, keyed by `id` field. This makes it easy to loop through all the workers. It is only available in the primary process. - * - * A worker is removed from `cluster.workers` after the worker has disconnected _and_ exited. The order between these two events cannot be determined in advance. However, it - * is guaranteed that the removal from the `cluster.workers` list happens before the last `'disconnect'` or `'exit'` event is emitted. - * - * ```js - * import cluster from 'node:cluster'; - * - * for (const worker of Object.values(cluster.workers)) { - * worker.send('big announcement to all workers'); - * } - * ``` - * @since v0.7.0 - */ - readonly workers?: NodeJS.Dict; - readonly SCHED_NONE: number; - readonly SCHED_RR: number; - } - } - var cluster: cluster.Cluster; - export = cluster; -} -declare module "cluster" { - import cluster = require("node:cluster"); - export = cluster; -} diff --git a/PBandGraphScaffold/node_modules/@types/node/compatibility/iterators.d.ts b/PBandGraphScaffold/node_modules/@types/node/compatibility/iterators.d.ts deleted file mode 100644 index 156e785..0000000 --- a/PBandGraphScaffold/node_modules/@types/node/compatibility/iterators.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -// Backwards-compatible iterator interfaces, augmented with iterator helper methods by lib.esnext.iterator in TypeScript 5.6. -// The IterableIterator interface does not contain these methods, which creates assignability issues in places where IteratorObjects -// are expected (eg. DOM-compatible APIs) if lib.esnext.iterator is loaded. -// Also ensures that iterators returned by the Node API, which inherit from Iterator.prototype, correctly expose the iterator helper methods -// if lib.esnext.iterator is loaded. -// TODO: remove once this package no longer supports TS 5.5, and replace NodeJS.BuiltinIteratorReturn with BuiltinIteratorReturn. - -// Placeholders for TS <5.6 -interface IteratorObject {} -interface AsyncIteratorObject {} - -declare namespace NodeJS { - // Populate iterator methods for TS <5.6 - interface Iterator extends globalThis.Iterator {} - interface AsyncIterator extends globalThis.AsyncIterator {} - - // Polyfill for TS 5.6's instrinsic BuiltinIteratorReturn type, required for DOM-compatible iterators - type BuiltinIteratorReturn = ReturnType extends - globalThis.Iterator ? TReturn - : any; -} diff --git a/PBandGraphScaffold/node_modules/@types/node/console.d.ts b/PBandGraphScaffold/node_modules/@types/node/console.d.ts deleted file mode 100644 index 3943442..0000000 --- a/PBandGraphScaffold/node_modules/@types/node/console.d.ts +++ /dev/null @@ -1,151 +0,0 @@ -/** - * The `node:console` module provides a simple debugging console that is similar to - * the JavaScript console mechanism provided by web browsers. - * - * The module exports two specific components: - * - * * A `Console` class with methods such as `console.log()`, `console.error()`, and `console.warn()` that can be used to write to any Node.js stream. - * * A global `console` instance configured to write to [`process.stdout`](https://nodejs.org/docs/latest-v25.x/api/process.html#processstdout) and - * [`process.stderr`](https://nodejs.org/docs/latest-v25.x/api/process.html#processstderr). The global `console` can be used without importing the `node:console` module. - * - * _**Warning**_: The global console object's methods are neither consistently - * synchronous like the browser APIs they resemble, nor are they consistently - * asynchronous like all other Node.js streams. See the [`note on process I/O`](https://nodejs.org/docs/latest-v25.x/api/process.html#a-note-on-process-io) for - * more information. - * - * Example using the global `console`: - * - * ```js - * console.log('hello world'); - * // Prints: hello world, to stdout - * console.log('hello %s', 'world'); - * // Prints: hello world, to stdout - * console.error(new Error('Whoops, something bad happened')); - * // Prints error message and stack trace to stderr: - * // Error: Whoops, something bad happened - * // at [eval]:5:15 - * // at Script.runInThisContext (node:vm:132:18) - * // at Object.runInThisContext (node:vm:309:38) - * // at node:internal/process/execution:77:19 - * // at [eval]-wrapper:6:22 - * // at evalScript (node:internal/process/execution:76:60) - * // at node:internal/main/eval_string:23:3 - * - * const name = 'Will Robinson'; - * console.warn(`Danger ${name}! Danger!`); - * // Prints: Danger Will Robinson! Danger!, to stderr - * ``` - * - * Example using the `Console` class: - * - * ```js - * const out = getStreamSomehow(); - * const err = getStreamSomehow(); - * const myConsole = new console.Console(out, err); - * - * myConsole.log('hello world'); - * // Prints: hello world, to out - * myConsole.log('hello %s', 'world'); - * // Prints: hello world, to out - * myConsole.error(new Error('Whoops, something bad happened')); - * // Prints: [Error: Whoops, something bad happened], to err - * - * const name = 'Will Robinson'; - * myConsole.warn(`Danger ${name}! Danger!`); - * // Prints: Danger Will Robinson! Danger!, to err - * ``` - * @see [source](https://github.com/nodejs/node/blob/v25.x/lib/console.js) - */ -declare module "node:console" { - import { InspectOptions } from "node:util"; - namespace console { - interface ConsoleOptions { - stdout: NodeJS.WritableStream; - stderr?: NodeJS.WritableStream | undefined; - /** - * Ignore errors when writing to the underlying streams. - * @default true - */ - ignoreErrors?: boolean | undefined; - /** - * Set color support for this `Console` instance. Setting to true enables coloring while inspecting - * values. Setting to `false` disables coloring while inspecting values. Setting to `'auto'` makes color - * support depend on the value of the `isTTY` property and the value returned by `getColorDepth()` on the - * respective stream. This option can not be used, if `inspectOptions.colors` is set as well. - * @default 'auto' - */ - colorMode?: boolean | "auto" | undefined; - /** - * Specifies options that are passed along to - * [`util.inspect()`](https://nodejs.org/docs/latest-v25.x/api/util.html#utilinspectobject-options). - */ - inspectOptions?: InspectOptions | ReadonlyMap | undefined; - /** - * Set group indentation. - * @default 2 - */ - groupIndentation?: number | undefined; - } - interface Console { - readonly Console: { - prototype: Console; - new(stdout: NodeJS.WritableStream, stderr?: NodeJS.WritableStream, ignoreErrors?: boolean): Console; - new(options: ConsoleOptions): Console; - }; - assert(condition?: unknown, ...data: any[]): void; - clear(): void; - count(label?: string): void; - countReset(label?: string): void; - debug(...data: any[]): void; - dir(item?: any, options?: InspectOptions): void; - dirxml(...data: any[]): void; - error(...data: any[]): void; - group(...data: any[]): void; - groupCollapsed(...data: any[]): void; - groupEnd(): void; - info(...data: any[]): void; - log(...data: any[]): void; - table(tabularData?: any, properties?: string[]): void; - time(label?: string): void; - timeEnd(label?: string): void; - timeLog(label?: string, ...data: any[]): void; - trace(...data: any[]): void; - warn(...data: any[]): void; - /** - * This method does not display anything unless used in the inspector. The `console.profile()` - * method starts a JavaScript CPU profile with an optional label until {@link profileEnd} - * is called. The profile is then added to the Profile panel of the inspector. - * - * ```js - * console.profile('MyLabel'); - * // Some code - * console.profileEnd('MyLabel'); - * // Adds the profile 'MyLabel' to the Profiles panel of the inspector. - * ``` - * @since v8.0.0 - */ - profile(label?: string): void; - /** - * This method does not display anything unless used in the inspector. Stops the current - * JavaScript CPU profiling session if one has been started and prints the report to the - * Profiles panel of the inspector. See {@link profile} for an example. - * - * If this method is called without a label, the most recently started profile is stopped. - * @since v8.0.0 - */ - profileEnd(label?: string): void; - /** - * This method does not display anything unless used in the inspector. The `console.timeStamp()` - * method adds an event with the label `'label'` to the Timeline panel of the inspector. - * @since v8.0.0 - */ - timeStamp(label?: string): void; - } - } - var console: console.Console; - export = console; -} -declare module "console" { - import console = require("node:console"); - export = console; -} diff --git a/PBandGraphScaffold/node_modules/@types/node/constants.d.ts b/PBandGraphScaffold/node_modules/@types/node/constants.d.ts deleted file mode 100644 index c24ad98..0000000 --- a/PBandGraphScaffold/node_modules/@types/node/constants.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * @deprecated The `node:constants` module is deprecated. When requiring access to constants - * relevant to specific Node.js builtin modules, developers should instead refer - * to the `constants` property exposed by the relevant module. For instance, - * `require('node:fs').constants` and `require('node:os').constants`. - */ -declare module "node:constants" { - const constants: - & typeof import("node:os").constants.dlopen - & typeof import("node:os").constants.errno - & typeof import("node:os").constants.priority - & typeof import("node:os").constants.signals - & typeof import("node:fs").constants - & typeof import("node:crypto").constants; - export = constants; -} -declare module "constants" { - import constants = require("node:constants"); - export = constants; -} diff --git a/PBandGraphScaffold/node_modules/@types/node/crypto.d.ts b/PBandGraphScaffold/node_modules/@types/node/crypto.d.ts deleted file mode 100644 index 0ae42e4..0000000 --- a/PBandGraphScaffold/node_modules/@types/node/crypto.d.ts +++ /dev/null @@ -1,4065 +0,0 @@ -/** - * The `node:crypto` module provides cryptographic functionality that includes a - * set of wrappers for OpenSSL's hash, HMAC, cipher, decipher, sign, and verify - * functions. - * - * ```js - * const { createHmac } = await import('node:crypto'); - * - * const secret = 'abcdefg'; - * const hash = createHmac('sha256', secret) - * .update('I love cupcakes') - * .digest('hex'); - * console.log(hash); - * // Prints: - * // c0fa1bc00531bd78ef38c628449c5102aeabd49b5dc3a2a516ea6ea959d6658e - * ``` - * @see [source](https://github.com/nodejs/node/blob/v25.x/lib/crypto.js) - */ -declare module "node:crypto" { - import { NonSharedBuffer } from "node:buffer"; - import * as stream from "node:stream"; - import { PeerCertificate } from "node:tls"; - /** - * SPKAC is a Certificate Signing Request mechanism originally implemented by - * Netscape and was specified formally as part of HTML5's `keygen` element. - * - * `` is deprecated since [HTML 5.2](https://www.w3.org/TR/html52/changes.html#features-removed) and new projects - * should not use this element anymore. - * - * The `node:crypto` module provides the `Certificate` class for working with SPKAC - * data. The most common usage is handling output generated by the HTML5 `` element. Node.js uses [OpenSSL's SPKAC - * implementation](https://www.openssl.org/docs/man3.0/man1/openssl-spkac.html) internally. - * @since v0.11.8 - */ - class Certificate { - /** - * ```js - * const { Certificate } = await import('node:crypto'); - * const spkac = getSpkacSomehow(); - * const challenge = Certificate.exportChallenge(spkac); - * console.log(challenge.toString('utf8')); - * // Prints: the challenge as a UTF8 string - * ``` - * @since v9.0.0 - * @param encoding The `encoding` of the `spkac` string. - * @return The challenge component of the `spkac` data structure, which includes a public key and a challenge. - */ - static exportChallenge(spkac: BinaryLike): NonSharedBuffer; - /** - * ```js - * const { Certificate } = await import('node:crypto'); - * const spkac = getSpkacSomehow(); - * const publicKey = Certificate.exportPublicKey(spkac); - * console.log(publicKey); - * // Prints: the public key as - * ``` - * @since v9.0.0 - * @param encoding The `encoding` of the `spkac` string. - * @return The public key component of the `spkac` data structure, which includes a public key and a challenge. - */ - static exportPublicKey(spkac: BinaryLike, encoding?: string): NonSharedBuffer; - /** - * ```js - * import { Buffer } from 'node:buffer'; - * const { Certificate } = await import('node:crypto'); - * - * const spkac = getSpkacSomehow(); - * console.log(Certificate.verifySpkac(Buffer.from(spkac))); - * // Prints: true or false - * ``` - * @since v9.0.0 - * @param encoding The `encoding` of the `spkac` string. - * @return `true` if the given `spkac` data structure is valid, `false` otherwise. - */ - static verifySpkac(spkac: NodeJS.ArrayBufferView): boolean; - /** - * @deprecated - * @param spkac - * @returns The challenge component of the `spkac` data structure, - * which includes a public key and a challenge. - */ - exportChallenge(spkac: BinaryLike): NonSharedBuffer; - /** - * @deprecated - * @param spkac - * @param encoding The encoding of the spkac string. - * @returns The public key component of the `spkac` data structure, - * which includes a public key and a challenge. - */ - exportPublicKey(spkac: BinaryLike, encoding?: string): NonSharedBuffer; - /** - * @deprecated - * @param spkac - * @returns `true` if the given `spkac` data structure is valid, - * `false` otherwise. - */ - verifySpkac(spkac: NodeJS.ArrayBufferView): boolean; - } - namespace constants { - // https://nodejs.org/dist/latest-v25.x/docs/api/crypto.html#crypto-constants - const OPENSSL_VERSION_NUMBER: number; - /** Applies multiple bug workarounds within OpenSSL. See https://www.openssl.org/docs/man1.0.2/ssl/SSL_CTX_set_options.html for detail. */ - const SSL_OP_ALL: number; - /** Instructs OpenSSL to allow a non-[EC]DHE-based key exchange mode for TLS v1.3 */ - const SSL_OP_ALLOW_NO_DHE_KEX: number; - /** Allows legacy insecure renegotiation between OpenSSL and unpatched clients or servers. See https://www.openssl.org/docs/man1.0.2/ssl/SSL_CTX_set_options.html. */ - const SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION: number; - /** Attempts to use the server's preferences instead of the client's when selecting a cipher. See https://www.openssl.org/docs/man1.0.2/ssl/SSL_CTX_set_options.html. */ - const SSL_OP_CIPHER_SERVER_PREFERENCE: number; - /** Instructs OpenSSL to use Cisco's version identifier of DTLS_BAD_VER. */ - const SSL_OP_CISCO_ANYCONNECT: number; - /** Instructs OpenSSL to turn on cookie exchange. */ - const SSL_OP_COOKIE_EXCHANGE: number; - /** Instructs OpenSSL to add server-hello extension from an early version of the cryptopro draft. */ - const SSL_OP_CRYPTOPRO_TLSEXT_BUG: number; - /** Instructs OpenSSL to disable a SSL 3.0/TLS 1.0 vulnerability workaround added in OpenSSL 0.9.6d. */ - const SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS: number; - /** Allows initial connection to servers that do not support RI. */ - const SSL_OP_LEGACY_SERVER_CONNECT: number; - /** Instructs OpenSSL to disable support for SSL/TLS compression. */ - const SSL_OP_NO_COMPRESSION: number; - /** Instructs OpenSSL to disable encrypt-then-MAC. */ - const SSL_OP_NO_ENCRYPT_THEN_MAC: number; - const SSL_OP_NO_QUERY_MTU: number; - /** Instructs OpenSSL to disable renegotiation. */ - const SSL_OP_NO_RENEGOTIATION: number; - /** Instructs OpenSSL to always start a new session when performing renegotiation. */ - const SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION: number; - /** Instructs OpenSSL to turn off SSL v2 */ - const SSL_OP_NO_SSLv2: number; - /** Instructs OpenSSL to turn off SSL v3 */ - const SSL_OP_NO_SSLv3: number; - /** Instructs OpenSSL to disable use of RFC4507bis tickets. */ - const SSL_OP_NO_TICKET: number; - /** Instructs OpenSSL to turn off TLS v1 */ - const SSL_OP_NO_TLSv1: number; - /** Instructs OpenSSL to turn off TLS v1.1 */ - const SSL_OP_NO_TLSv1_1: number; - /** Instructs OpenSSL to turn off TLS v1.2 */ - const SSL_OP_NO_TLSv1_2: number; - /** Instructs OpenSSL to turn off TLS v1.3 */ - const SSL_OP_NO_TLSv1_3: number; - /** Instructs OpenSSL server to prioritize ChaCha20-Poly1305 when the client does. This option has no effect if `SSL_OP_CIPHER_SERVER_PREFERENCE` is not enabled. */ - const SSL_OP_PRIORITIZE_CHACHA: number; - /** Instructs OpenSSL to disable version rollback attack detection. */ - const SSL_OP_TLS_ROLLBACK_BUG: number; - const ENGINE_METHOD_RSA: number; - const ENGINE_METHOD_DSA: number; - const ENGINE_METHOD_DH: number; - const ENGINE_METHOD_RAND: number; - const ENGINE_METHOD_EC: number; - const ENGINE_METHOD_CIPHERS: number; - const ENGINE_METHOD_DIGESTS: number; - const ENGINE_METHOD_PKEY_METHS: number; - const ENGINE_METHOD_PKEY_ASN1_METHS: number; - const ENGINE_METHOD_ALL: number; - const ENGINE_METHOD_NONE: number; - const DH_CHECK_P_NOT_SAFE_PRIME: number; - const DH_CHECK_P_NOT_PRIME: number; - const DH_UNABLE_TO_CHECK_GENERATOR: number; - const DH_NOT_SUITABLE_GENERATOR: number; - const RSA_PKCS1_PADDING: number; - const RSA_SSLV23_PADDING: number; - const RSA_NO_PADDING: number; - const RSA_PKCS1_OAEP_PADDING: number; - const RSA_X931_PADDING: number; - const RSA_PKCS1_PSS_PADDING: number; - /** Sets the salt length for RSA_PKCS1_PSS_PADDING to the digest size when signing or verifying. */ - const RSA_PSS_SALTLEN_DIGEST: number; - /** Sets the salt length for RSA_PKCS1_PSS_PADDING to the maximum permissible value when signing data. */ - const RSA_PSS_SALTLEN_MAX_SIGN: number; - /** Causes the salt length for RSA_PKCS1_PSS_PADDING to be determined automatically when verifying a signature. */ - const RSA_PSS_SALTLEN_AUTO: number; - const POINT_CONVERSION_COMPRESSED: number; - const POINT_CONVERSION_UNCOMPRESSED: number; - const POINT_CONVERSION_HYBRID: number; - /** Specifies the built-in default cipher list used by Node.js (colon-separated values). */ - const defaultCoreCipherList: string; - /** Specifies the active default cipher list used by the current Node.js process (colon-separated values). */ - const defaultCipherList: string; - } - interface HashOptions extends stream.TransformOptions { - /** - * For XOF hash functions such as `shake256`, the - * outputLength option can be used to specify the desired output length in bytes. - */ - outputLength?: number | undefined; - } - /** @deprecated since v10.0.0 */ - const fips: boolean; - /** - * Creates and returns a `Hash` object that can be used to generate hash digests - * using the given `algorithm`. Optional `options` argument controls stream - * behavior. For XOF hash functions such as `'shake256'`, the `outputLength` option - * can be used to specify the desired output length in bytes. - * - * The `algorithm` is dependent on the available algorithms supported by the - * version of OpenSSL on the platform. Examples are `'sha256'`, `'sha512'`, etc. - * On recent releases of OpenSSL, `openssl list -digest-algorithms` will - * display the available digest algorithms. - * - * Example: generating the sha256 sum of a file - * - * ```js - * import { - * createReadStream, - * } from 'node:fs'; - * import { argv } from 'node:process'; - * const { - * createHash, - * } = await import('node:crypto'); - * - * const filename = argv[2]; - * - * const hash = createHash('sha256'); - * - * const input = createReadStream(filename); - * input.on('readable', () => { - * // Only one element is going to be produced by the - * // hash stream. - * const data = input.read(); - * if (data) - * hash.update(data); - * else { - * console.log(`${hash.digest('hex')} ${filename}`); - * } - * }); - * ``` - * @since v0.1.92 - * @param options `stream.transform` options - */ - function createHash(algorithm: string, options?: HashOptions): Hash; - /** - * Creates and returns an `Hmac` object that uses the given `algorithm` and `key`. - * Optional `options` argument controls stream behavior. - * - * The `algorithm` is dependent on the available algorithms supported by the - * version of OpenSSL on the platform. Examples are `'sha256'`, `'sha512'`, etc. - * On recent releases of OpenSSL, `openssl list -digest-algorithms` will - * display the available digest algorithms. - * - * The `key` is the HMAC key used to generate the cryptographic HMAC hash. If it is - * a `KeyObject`, its type must be `secret`. If it is a string, please consider `caveats when using strings as inputs to cryptographic APIs`. If it was - * obtained from a cryptographically secure source of entropy, such as {@link randomBytes} or {@link generateKey}, its length should not - * exceed the block size of `algorithm` (e.g., 512 bits for SHA-256). - * - * Example: generating the sha256 HMAC of a file - * - * ```js - * import { - * createReadStream, - * } from 'node:fs'; - * import { argv } from 'node:process'; - * const { - * createHmac, - * } = await import('node:crypto'); - * - * const filename = argv[2]; - * - * const hmac = createHmac('sha256', 'a secret'); - * - * const input = createReadStream(filename); - * input.on('readable', () => { - * // Only one element is going to be produced by the - * // hash stream. - * const data = input.read(); - * if (data) - * hmac.update(data); - * else { - * console.log(`${hmac.digest('hex')} ${filename}`); - * } - * }); - * ``` - * @since v0.1.94 - * @param options `stream.transform` options - */ - function createHmac(algorithm: string, key: BinaryLike | KeyObject, options?: stream.TransformOptions): Hmac; - // https://nodejs.org/api/buffer.html#buffer_buffers_and_character_encodings - type BinaryToTextEncoding = "base64" | "base64url" | "hex" | "binary"; - type CharacterEncoding = "utf8" | "utf-8" | "utf16le" | "utf-16le" | "latin1"; - type LegacyCharacterEncoding = "ascii" | "binary" | "ucs2" | "ucs-2"; - type Encoding = BinaryToTextEncoding | CharacterEncoding | LegacyCharacterEncoding; - type ECDHKeyFormat = "compressed" | "uncompressed" | "hybrid"; - /** - * The `Hash` class is a utility for creating hash digests of data. It can be - * used in one of two ways: - * - * * As a `stream` that is both readable and writable, where data is written - * to produce a computed hash digest on the readable side, or - * * Using the `hash.update()` and `hash.digest()` methods to produce the - * computed hash. - * - * The {@link createHash} method is used to create `Hash` instances. `Hash`objects are not to be created directly using the `new` keyword. - * - * Example: Using `Hash` objects as streams: - * - * ```js - * const { - * createHash, - * } = await import('node:crypto'); - * - * const hash = createHash('sha256'); - * - * hash.on('readable', () => { - * // Only one element is going to be produced by the - * // hash stream. - * const data = hash.read(); - * if (data) { - * console.log(data.toString('hex')); - * // Prints: - * // 6a2da20943931e9834fc12cfe5bb47bbd9ae43489a30726962b576f4e3993e50 - * } - * }); - * - * hash.write('some data to hash'); - * hash.end(); - * ``` - * - * Example: Using `Hash` and piped streams: - * - * ```js - * import { createReadStream } from 'node:fs'; - * import { stdout } from 'node:process'; - * const { createHash } = await import('node:crypto'); - * - * const hash = createHash('sha256'); - * - * const input = createReadStream('test.js'); - * input.pipe(hash).setEncoding('hex').pipe(stdout); - * ``` - * - * Example: Using the `hash.update()` and `hash.digest()` methods: - * - * ```js - * const { - * createHash, - * } = await import('node:crypto'); - * - * const hash = createHash('sha256'); - * - * hash.update('some data to hash'); - * console.log(hash.digest('hex')); - * // Prints: - * // 6a2da20943931e9834fc12cfe5bb47bbd9ae43489a30726962b576f4e3993e50 - * ``` - * @since v0.1.92 - */ - class Hash extends stream.Transform { - private constructor(); - /** - * Creates a new `Hash` object that contains a deep copy of the internal state - * of the current `Hash` object. - * - * The optional `options` argument controls stream behavior. For XOF hash - * functions such as `'shake256'`, the `outputLength` option can be used to - * specify the desired output length in bytes. - * - * An error is thrown when an attempt is made to copy the `Hash` object after - * its `hash.digest()` method has been called. - * - * ```js - * // Calculate a rolling hash. - * const { - * createHash, - * } = await import('node:crypto'); - * - * const hash = createHash('sha256'); - * - * hash.update('one'); - * console.log(hash.copy().digest('hex')); - * - * hash.update('two'); - * console.log(hash.copy().digest('hex')); - * - * hash.update('three'); - * console.log(hash.copy().digest('hex')); - * - * // Etc. - * ``` - * @since v13.1.0 - * @param options `stream.transform` options - */ - copy(options?: HashOptions): Hash; - /** - * Updates the hash content with the given `data`, the encoding of which - * is given in `inputEncoding`. - * If `encoding` is not provided, and the `data` is a string, an - * encoding of `'utf8'` is enforced. If `data` is a `Buffer`, `TypedArray`, or`DataView`, then `inputEncoding` is ignored. - * - * This can be called many times with new data as it is streamed. - * @since v0.1.92 - * @param inputEncoding The `encoding` of the `data` string. - */ - update(data: BinaryLike): Hash; - update(data: string, inputEncoding: Encoding): Hash; - /** - * Calculates the digest of all of the data passed to be hashed (using the `hash.update()` method). - * If `encoding` is provided a string will be returned; otherwise - * a `Buffer` is returned. - * - * The `Hash` object can not be used again after `hash.digest()` method has been - * called. Multiple calls will cause an error to be thrown. - * @since v0.1.92 - * @param encoding The `encoding` of the return value. - */ - digest(): NonSharedBuffer; - digest(encoding: BinaryToTextEncoding): string; - } - /** - * The `Hmac` class is a utility for creating cryptographic HMAC digests. It can - * be used in one of two ways: - * - * * As a `stream` that is both readable and writable, where data is written - * to produce a computed HMAC digest on the readable side, or - * * Using the `hmac.update()` and `hmac.digest()` methods to produce the - * computed HMAC digest. - * - * The {@link createHmac} method is used to create `Hmac` instances. `Hmac`objects are not to be created directly using the `new` keyword. - * - * Example: Using `Hmac` objects as streams: - * - * ```js - * const { - * createHmac, - * } = await import('node:crypto'); - * - * const hmac = createHmac('sha256', 'a secret'); - * - * hmac.on('readable', () => { - * // Only one element is going to be produced by the - * // hash stream. - * const data = hmac.read(); - * if (data) { - * console.log(data.toString('hex')); - * // Prints: - * // 7fd04df92f636fd450bc841c9418e5825c17f33ad9c87c518115a45971f7f77e - * } - * }); - * - * hmac.write('some data to hash'); - * hmac.end(); - * ``` - * - * Example: Using `Hmac` and piped streams: - * - * ```js - * import { createReadStream } from 'node:fs'; - * import { stdout } from 'node:process'; - * const { - * createHmac, - * } = await import('node:crypto'); - * - * const hmac = createHmac('sha256', 'a secret'); - * - * const input = createReadStream('test.js'); - * input.pipe(hmac).pipe(stdout); - * ``` - * - * Example: Using the `hmac.update()` and `hmac.digest()` methods: - * - * ```js - * const { - * createHmac, - * } = await import('node:crypto'); - * - * const hmac = createHmac('sha256', 'a secret'); - * - * hmac.update('some data to hash'); - * console.log(hmac.digest('hex')); - * // Prints: - * // 7fd04df92f636fd450bc841c9418e5825c17f33ad9c87c518115a45971f7f77e - * ``` - * @since v0.1.94 - */ - class Hmac extends stream.Transform { - private constructor(); - /** - * Updates the `Hmac` content with the given `data`, the encoding of which - * is given in `inputEncoding`. - * If `encoding` is not provided, and the `data` is a string, an - * encoding of `'utf8'` is enforced. If `data` is a `Buffer`, `TypedArray`, or`DataView`, then `inputEncoding` is ignored. - * - * This can be called many times with new data as it is streamed. - * @since v0.1.94 - * @param inputEncoding The `encoding` of the `data` string. - */ - update(data: BinaryLike): Hmac; - update(data: string, inputEncoding: Encoding): Hmac; - /** - * Calculates the HMAC digest of all of the data passed using `hmac.update()`. - * If `encoding` is - * provided a string is returned; otherwise a `Buffer` is returned; - * - * The `Hmac` object can not be used again after `hmac.digest()` has been - * called. Multiple calls to `hmac.digest()` will result in an error being thrown. - * @since v0.1.94 - * @param encoding The `encoding` of the return value. - */ - digest(): NonSharedBuffer; - digest(encoding: BinaryToTextEncoding): string; - } - type KeyFormat = "pem" | "der" | "jwk"; - type KeyObjectType = "secret" | "public" | "private"; - type PublicKeyExportType = "pkcs1" | "spki"; - type PrivateKeyExportType = "pkcs1" | "pkcs8" | "sec1"; - type KeyExportOptions = - | SymmetricKeyExportOptions - | PublicKeyExportOptions - | PrivateKeyExportOptions - | JwkKeyExportOptions; - interface SymmetricKeyExportOptions { - format?: "buffer" | undefined; - } - interface PublicKeyExportOptions { - type: T; - format: Exclude; - } - interface PrivateKeyExportOptions { - type: T; - format: Exclude; - cipher?: string | undefined; - passphrase?: string | Buffer | undefined; - } - interface JwkKeyExportOptions { - format: "jwk"; - } - interface KeyPairExportOptions< - TPublic extends PublicKeyExportType = PublicKeyExportType, - TPrivate extends PrivateKeyExportType = PrivateKeyExportType, - > { - publicKeyEncoding?: PublicKeyExportOptions | JwkKeyExportOptions | undefined; - privateKeyEncoding?: PrivateKeyExportOptions | JwkKeyExportOptions | undefined; - } - type KeyExportResult = T extends { format: infer F extends KeyFormat } - ? { der: NonSharedBuffer; jwk: webcrypto.JsonWebKey; pem: string }[F] - : Default; - interface KeyPairExportResult { - publicKey: KeyExportResult; - privateKey: KeyExportResult; - } - type KeyPairExportCallback = ( - err: Error | null, - publicKey: KeyExportResult, - privateKey: KeyExportResult, - ) => void; - type MLDSAKeyType = `ml-dsa-${44 | 65 | 87}`; - type MLKEMKeyType = `ml-kem-${1024 | 512 | 768}`; - type SLHDSAKeyType = `slh-dsa-${"sha2" | "shake"}-${128 | 192 | 256}${"f" | "s"}`; - type AsymmetricKeyType = - | "dh" - | "dsa" - | "ec" - | "ed25519" - | "ed448" - | MLDSAKeyType - | MLKEMKeyType - | "rsa-pss" - | "rsa" - | SLHDSAKeyType - | "x25519" - | "x448"; - interface AsymmetricKeyDetails { - /** - * Key size in bits (RSA, DSA). - */ - modulusLength?: number; - /** - * Public exponent (RSA). - */ - publicExponent?: bigint; - /** - * Name of the message digest (RSA-PSS). - */ - hashAlgorithm?: string; - /** - * Name of the message digest used by MGF1 (RSA-PSS). - */ - mgf1HashAlgorithm?: string; - /** - * Minimal salt length in bytes (RSA-PSS). - */ - saltLength?: number; - /** - * Size of q in bits (DSA). - */ - divisorLength?: number; - /** - * Name of the curve (EC). - */ - namedCurve?: string; - } - /** - * Node.js uses a `KeyObject` class to represent a symmetric or asymmetric key, - * and each kind of key exposes different functions. The {@link createSecretKey}, {@link createPublicKey} and {@link createPrivateKey} methods are used to create `KeyObject`instances. `KeyObject` - * objects are not to be created directly using the `new`keyword. - * - * Most applications should consider using the new `KeyObject` API instead of - * passing keys as strings or `Buffer`s due to improved security features. - * - * `KeyObject` instances can be passed to other threads via `postMessage()`. - * The receiver obtains a cloned `KeyObject`, and the `KeyObject` does not need to - * be listed in the `transferList` argument. - * @since v11.6.0 - */ - class KeyObject { - private constructor(); - /** - * Example: Converting a `CryptoKey` instance to a `KeyObject`: - * - * ```js - * const { KeyObject } = await import('node:crypto'); - * const { subtle } = globalThis.crypto; - * - * const key = await subtle.generateKey({ - * name: 'HMAC', - * hash: 'SHA-256', - * length: 256, - * }, true, ['sign', 'verify']); - * - * const keyObject = KeyObject.from(key); - * console.log(keyObject.symmetricKeySize); - * // Prints: 32 (symmetric key size in bytes) - * ``` - * @since v15.0.0 - */ - static from(key: webcrypto.CryptoKey): KeyObject; - /** - * For asymmetric keys, this property represents the type of the key. See the - * supported [asymmetric key types](https://nodejs.org/docs/latest-v25.x/api/crypto.html#asymmetric-key-types). - * - * This property is `undefined` for unrecognized `KeyObject` types and symmetric - * keys. - * @since v11.6.0 - */ - asymmetricKeyType?: AsymmetricKeyType; - /** - * This property exists only on asymmetric keys. Depending on the type of the key, - * this object contains information about the key. None of the information obtained - * through this property can be used to uniquely identify a key or to compromise - * the security of the key. - * - * For RSA-PSS keys, if the key material contains a `RSASSA-PSS-params` sequence, - * the `hashAlgorithm`, `mgf1HashAlgorithm`, and `saltLength` properties will be - * set. - * - * Other key details might be exposed via this API using additional attributes. - * @since v15.7.0 - */ - asymmetricKeyDetails?: AsymmetricKeyDetails; - /** - * For symmetric keys, the following encoding options can be used: - * - * For public keys, the following encoding options can be used: - * - * For private keys, the following encoding options can be used: - * - * The result type depends on the selected encoding format, when PEM the - * result is a string, when DER it will be a buffer containing the data - * encoded as DER, when [JWK](https://tools.ietf.org/html/rfc7517) it will be an object. - * - * When [JWK](https://tools.ietf.org/html/rfc7517) encoding format was selected, all other encoding options are - * ignored. - * - * PKCS#1, SEC1, and PKCS#8 type keys can be encrypted by using a combination of - * the `cipher` and `format` options. The PKCS#8 `type` can be used with any`format` to encrypt any key algorithm (RSA, EC, or DH) by specifying a`cipher`. PKCS#1 and SEC1 can only be - * encrypted by specifying a `cipher`when the PEM `format` is used. For maximum compatibility, use PKCS#8 for - * encrypted private keys. Since PKCS#8 defines its own - * encryption mechanism, PEM-level encryption is not supported when encrypting - * a PKCS#8 key. See [RFC 5208](https://www.rfc-editor.org/rfc/rfc5208.txt) for PKCS#8 encryption and [RFC 1421](https://www.rfc-editor.org/rfc/rfc1421.txt) for - * PKCS#1 and SEC1 encryption. - * @since v11.6.0 - */ - export(options?: T): KeyExportResult; - /** - * Returns `true` or `false` depending on whether the keys have exactly the same - * type, value, and parameters. This method is not [constant time](https://en.wikipedia.org/wiki/Timing_attack). - * @since v17.7.0, v16.15.0 - * @param otherKeyObject A `KeyObject` with which to compare `keyObject`. - */ - equals(otherKeyObject: KeyObject): boolean; - /** - * For secret keys, this property represents the size of the key in bytes. This - * property is `undefined` for asymmetric keys. - * @since v11.6.0 - */ - symmetricKeySize?: number; - /** - * Converts a `KeyObject` instance to a `CryptoKey`. - * @since 22.10.0 - */ - toCryptoKey( - algorithm: - | webcrypto.AlgorithmIdentifier - | webcrypto.RsaHashedImportParams - | webcrypto.EcKeyImportParams - | webcrypto.HmacImportParams, - extractable: boolean, - keyUsages: readonly webcrypto.KeyUsage[], - ): webcrypto.CryptoKey; - /** - * Depending on the type of this `KeyObject`, this property is either`'secret'` for secret (symmetric) keys, `'public'` for public (asymmetric) keys - * or `'private'` for private (asymmetric) keys. - * @since v11.6.0 - */ - type: KeyObjectType; - } - type CipherCCMTypes = "aes-128-ccm" | "aes-192-ccm" | "aes-256-ccm"; - type CipherGCMTypes = "aes-128-gcm" | "aes-192-gcm" | "aes-256-gcm"; - type CipherOCBTypes = "aes-128-ocb" | "aes-192-ocb" | "aes-256-ocb"; - type CipherChaCha20Poly1305Types = "chacha20-poly1305"; - type BinaryLike = string | NodeJS.ArrayBufferView; - type CipherKey = BinaryLike | KeyObject; - interface CipherCCMOptions extends stream.TransformOptions { - authTagLength: number; - } - interface CipherGCMOptions extends stream.TransformOptions { - authTagLength?: number | undefined; - } - interface CipherOCBOptions extends stream.TransformOptions { - authTagLength: number; - } - interface CipherChaCha20Poly1305Options extends stream.TransformOptions { - /** @default 16 */ - authTagLength?: number | undefined; - } - /** - * Creates and returns a `Cipher` object, with the given `algorithm`, `key` and - * initialization vector (`iv`). - * - * The `options` argument controls stream behavior and is optional except when a - * cipher in CCM or OCB mode (e.g. `'aes-128-ccm'`) is used. In that case, the`authTagLength` option is required and specifies the length of the - * authentication tag in bytes, see `CCM mode`. In GCM mode, the `authTagLength`option is not required but can be used to set the length of the authentication - * tag that will be returned by `getAuthTag()` and defaults to 16 bytes. - * For `chacha20-poly1305`, the `authTagLength` option defaults to 16 bytes. - * - * The `algorithm` is dependent on OpenSSL, examples are `'aes192'`, etc. On - * recent OpenSSL releases, `openssl list -cipher-algorithms` will - * display the available cipher algorithms. - * - * The `key` is the raw key used by the `algorithm` and `iv` is an [initialization vector](https://en.wikipedia.org/wiki/Initialization_vector). Both arguments must be `'utf8'` encoded - * strings,`Buffers`, `TypedArray`, or `DataView`s. The `key` may optionally be - * a `KeyObject` of type `secret`. If the cipher does not need - * an initialization vector, `iv` may be `null`. - * - * When passing strings for `key` or `iv`, please consider `caveats when using strings as inputs to cryptographic APIs`. - * - * Initialization vectors should be unpredictable and unique; ideally, they will be - * cryptographically random. They do not have to be secret: IVs are typically just - * added to ciphertext messages unencrypted. It may sound contradictory that - * something has to be unpredictable and unique, but does not have to be secret; - * remember that an attacker must not be able to predict ahead of time what a - * given IV will be. - * @since v0.1.94 - * @param options `stream.transform` options - */ - function createCipheriv( - algorithm: CipherCCMTypes, - key: CipherKey, - iv: BinaryLike, - options: CipherCCMOptions, - ): CipherCCM; - function createCipheriv( - algorithm: CipherOCBTypes, - key: CipherKey, - iv: BinaryLike, - options: CipherOCBOptions, - ): CipherOCB; - function createCipheriv( - algorithm: CipherGCMTypes, - key: CipherKey, - iv: BinaryLike, - options?: CipherGCMOptions, - ): CipherGCM; - function createCipheriv( - algorithm: CipherChaCha20Poly1305Types, - key: CipherKey, - iv: BinaryLike, - options?: CipherChaCha20Poly1305Options, - ): CipherChaCha20Poly1305; - function createCipheriv( - algorithm: string, - key: CipherKey, - iv: BinaryLike | null, - options?: stream.TransformOptions, - ): Cipheriv; - /** - * Instances of the `Cipheriv` class are used to encrypt data. The class can be - * used in one of two ways: - * - * * As a `stream` that is both readable and writable, where plain unencrypted - * data is written to produce encrypted data on the readable side, or - * * Using the `cipher.update()` and `cipher.final()` methods to produce - * the encrypted data. - * - * The {@link createCipheriv} method is - * used to create `Cipheriv` instances. `Cipheriv` objects are not to be created - * directly using the `new` keyword. - * - * Example: Using `Cipheriv` objects as streams: - * - * ```js - * const { - * scrypt, - * randomFill, - * createCipheriv, - * } = await import('node:crypto'); - * - * const algorithm = 'aes-192-cbc'; - * const password = 'Password used to generate key'; - * - * // First, we'll generate the key. The key length is dependent on the algorithm. - * // In this case for aes192, it is 24 bytes (192 bits). - * scrypt(password, 'salt', 24, (err, key) => { - * if (err) throw err; - * // Then, we'll generate a random initialization vector - * randomFill(new Uint8Array(16), (err, iv) => { - * if (err) throw err; - * - * // Once we have the key and iv, we can create and use the cipher... - * const cipher = createCipheriv(algorithm, key, iv); - * - * let encrypted = ''; - * cipher.setEncoding('hex'); - * - * cipher.on('data', (chunk) => encrypted += chunk); - * cipher.on('end', () => console.log(encrypted)); - * - * cipher.write('some clear text data'); - * cipher.end(); - * }); - * }); - * ``` - * - * Example: Using `Cipheriv` and piped streams: - * - * ```js - * import { - * createReadStream, - * createWriteStream, - * } from 'node:fs'; - * - * import { - * pipeline, - * } from 'node:stream'; - * - * const { - * scrypt, - * randomFill, - * createCipheriv, - * } = await import('node:crypto'); - * - * const algorithm = 'aes-192-cbc'; - * const password = 'Password used to generate key'; - * - * // First, we'll generate the key. The key length is dependent on the algorithm. - * // In this case for aes192, it is 24 bytes (192 bits). - * scrypt(password, 'salt', 24, (err, key) => { - * if (err) throw err; - * // Then, we'll generate a random initialization vector - * randomFill(new Uint8Array(16), (err, iv) => { - * if (err) throw err; - * - * const cipher = createCipheriv(algorithm, key, iv); - * - * const input = createReadStream('test.js'); - * const output = createWriteStream('test.enc'); - * - * pipeline(input, cipher, output, (err) => { - * if (err) throw err; - * }); - * }); - * }); - * ``` - * - * Example: Using the `cipher.update()` and `cipher.final()` methods: - * - * ```js - * const { - * scrypt, - * randomFill, - * createCipheriv, - * } = await import('node:crypto'); - * - * const algorithm = 'aes-192-cbc'; - * const password = 'Password used to generate key'; - * - * // First, we'll generate the key. The key length is dependent on the algorithm. - * // In this case for aes192, it is 24 bytes (192 bits). - * scrypt(password, 'salt', 24, (err, key) => { - * if (err) throw err; - * // Then, we'll generate a random initialization vector - * randomFill(new Uint8Array(16), (err, iv) => { - * if (err) throw err; - * - * const cipher = createCipheriv(algorithm, key, iv); - * - * let encrypted = cipher.update('some clear text data', 'utf8', 'hex'); - * encrypted += cipher.final('hex'); - * console.log(encrypted); - * }); - * }); - * ``` - * @since v0.1.94 - */ - class Cipheriv extends stream.Transform { - private constructor(); - /** - * Updates the cipher with `data`. If the `inputEncoding` argument is given, - * the `data`argument is a string using the specified encoding. If the `inputEncoding`argument is not given, `data` must be a `Buffer`, `TypedArray`, or `DataView`. If `data` is a `Buffer`, - * `TypedArray`, or `DataView`, then `inputEncoding` is ignored. - * - * The `outputEncoding` specifies the output format of the enciphered - * data. If the `outputEncoding`is specified, a string using the specified encoding is returned. If no`outputEncoding` is provided, a `Buffer` is returned. - * - * The `cipher.update()` method can be called multiple times with new data until `cipher.final()` is called. Calling `cipher.update()` after `cipher.final()` will result in an error being - * thrown. - * @since v0.1.94 - * @param inputEncoding The `encoding` of the data. - * @param outputEncoding The `encoding` of the return value. - */ - update(data: BinaryLike): NonSharedBuffer; - update(data: string, inputEncoding: Encoding): NonSharedBuffer; - update(data: NodeJS.ArrayBufferView, inputEncoding: undefined, outputEncoding: Encoding): string; - update(data: string, inputEncoding: Encoding | undefined, outputEncoding: Encoding): string; - /** - * Once the `cipher.final()` method has been called, the `Cipheriv` object can no - * longer be used to encrypt data. Attempts to call `cipher.final()` more than - * once will result in an error being thrown. - * @since v0.1.94 - * @param outputEncoding The `encoding` of the return value. - * @return Any remaining enciphered contents. If `outputEncoding` is specified, a string is returned. If an `outputEncoding` is not provided, a {@link Buffer} is returned. - */ - final(): NonSharedBuffer; - final(outputEncoding: BufferEncoding): string; - /** - * When using block encryption algorithms, the `Cipheriv` class will automatically - * add padding to the input data to the appropriate block size. To disable the - * default padding call `cipher.setAutoPadding(false)`. - * - * When `autoPadding` is `false`, the length of the entire input data must be a - * multiple of the cipher's block size or `cipher.final()` will throw an error. - * Disabling automatic padding is useful for non-standard padding, for instance - * using `0x0` instead of PKCS padding. - * - * The `cipher.setAutoPadding()` method must be called before `cipher.final()`. - * @since v0.7.1 - * @param [autoPadding=true] - * @return for method chaining. - */ - setAutoPadding(autoPadding?: boolean): this; - } - interface CipherCCM extends Cipheriv { - setAAD( - buffer: NodeJS.ArrayBufferView, - options: { - plaintextLength: number; - }, - ): this; - getAuthTag(): NonSharedBuffer; - } - interface CipherGCM extends Cipheriv { - setAAD( - buffer: NodeJS.ArrayBufferView, - options?: { - plaintextLength: number; - }, - ): this; - getAuthTag(): NonSharedBuffer; - } - interface CipherOCB extends Cipheriv { - setAAD( - buffer: NodeJS.ArrayBufferView, - options?: { - plaintextLength: number; - }, - ): this; - getAuthTag(): NonSharedBuffer; - } - interface CipherChaCha20Poly1305 extends Cipheriv { - setAAD( - buffer: NodeJS.ArrayBufferView, - options: { - plaintextLength: number; - }, - ): this; - getAuthTag(): NonSharedBuffer; - } - /** - * Creates and returns a `Decipheriv` object that uses the given `algorithm`, `key` and initialization vector (`iv`). - * - * The `options` argument controls stream behavior and is optional except when a - * cipher in CCM or OCB mode (e.g. `'aes-128-ccm'`) is used. In that case, the `authTagLength` option is required and specifies the length of the - * authentication tag in bytes, see `CCM mode`. In GCM mode, the `authTagLength` option is not required but can be used to restrict accepted authentication tags - * to those with the specified length. - * For `chacha20-poly1305`, the `authTagLength` option defaults to 16 bytes. - * - * The `algorithm` is dependent on OpenSSL, examples are `'aes192'`, etc. On - * recent OpenSSL releases, `openssl list -cipher-algorithms` will - * display the available cipher algorithms. - * - * The `key` is the raw key used by the `algorithm` and `iv` is an [initialization vector](https://en.wikipedia.org/wiki/Initialization_vector). Both arguments must be `'utf8'` encoded - * strings,`Buffers`, `TypedArray`, or `DataView`s. The `key` may optionally be - * a `KeyObject` of type `secret`. If the cipher does not need - * an initialization vector, `iv` may be `null`. - * - * When passing strings for `key` or `iv`, please consider `caveats when using strings as inputs to cryptographic APIs`. - * - * Initialization vectors should be unpredictable and unique; ideally, they will be - * cryptographically random. They do not have to be secret: IVs are typically just - * added to ciphertext messages unencrypted. It may sound contradictory that - * something has to be unpredictable and unique, but does not have to be secret; - * remember that an attacker must not be able to predict ahead of time what a given - * IV will be. - * @since v0.1.94 - * @param options `stream.transform` options - */ - function createDecipheriv( - algorithm: CipherCCMTypes, - key: CipherKey, - iv: BinaryLike, - options: CipherCCMOptions, - ): DecipherCCM; - function createDecipheriv( - algorithm: CipherOCBTypes, - key: CipherKey, - iv: BinaryLike, - options: CipherOCBOptions, - ): DecipherOCB; - function createDecipheriv( - algorithm: CipherGCMTypes, - key: CipherKey, - iv: BinaryLike, - options?: CipherGCMOptions, - ): DecipherGCM; - function createDecipheriv( - algorithm: CipherChaCha20Poly1305Types, - key: CipherKey, - iv: BinaryLike, - options?: CipherChaCha20Poly1305Options, - ): DecipherChaCha20Poly1305; - function createDecipheriv( - algorithm: string, - key: CipherKey, - iv: BinaryLike | null, - options?: stream.TransformOptions, - ): Decipheriv; - /** - * Instances of the `Decipheriv` class are used to decrypt data. The class can be - * used in one of two ways: - * - * * As a `stream` that is both readable and writable, where plain encrypted - * data is written to produce unencrypted data on the readable side, or - * * Using the `decipher.update()` and `decipher.final()` methods to - * produce the unencrypted data. - * - * The {@link createDecipheriv} method is - * used to create `Decipheriv` instances. `Decipheriv` objects are not to be created - * directly using the `new` keyword. - * - * Example: Using `Decipheriv` objects as streams: - * - * ```js - * import { Buffer } from 'node:buffer'; - * const { - * scryptSync, - * createDecipheriv, - * } = await import('node:crypto'); - * - * const algorithm = 'aes-192-cbc'; - * const password = 'Password used to generate key'; - * // Key length is dependent on the algorithm. In this case for aes192, it is - * // 24 bytes (192 bits). - * // Use the async `crypto.scrypt()` instead. - * const key = scryptSync(password, 'salt', 24); - * // The IV is usually passed along with the ciphertext. - * const iv = Buffer.alloc(16, 0); // Initialization vector. - * - * const decipher = createDecipheriv(algorithm, key, iv); - * - * let decrypted = ''; - * decipher.on('readable', () => { - * let chunk; - * while (null !== (chunk = decipher.read())) { - * decrypted += chunk.toString('utf8'); - * } - * }); - * decipher.on('end', () => { - * console.log(decrypted); - * // Prints: some clear text data - * }); - * - * // Encrypted with same algorithm, key and iv. - * const encrypted = - * 'e5f79c5915c02171eec6b212d5520d44480993d7d622a7c4c2da32f6efda0ffa'; - * decipher.write(encrypted, 'hex'); - * decipher.end(); - * ``` - * - * Example: Using `Decipheriv` and piped streams: - * - * ```js - * import { - * createReadStream, - * createWriteStream, - * } from 'node:fs'; - * import { Buffer } from 'node:buffer'; - * const { - * scryptSync, - * createDecipheriv, - * } = await import('node:crypto'); - * - * const algorithm = 'aes-192-cbc'; - * const password = 'Password used to generate key'; - * // Use the async `crypto.scrypt()` instead. - * const key = scryptSync(password, 'salt', 24); - * // The IV is usually passed along with the ciphertext. - * const iv = Buffer.alloc(16, 0); // Initialization vector. - * - * const decipher = createDecipheriv(algorithm, key, iv); - * - * const input = createReadStream('test.enc'); - * const output = createWriteStream('test.js'); - * - * input.pipe(decipher).pipe(output); - * ``` - * - * Example: Using the `decipher.update()` and `decipher.final()` methods: - * - * ```js - * import { Buffer } from 'node:buffer'; - * const { - * scryptSync, - * createDecipheriv, - * } = await import('node:crypto'); - * - * const algorithm = 'aes-192-cbc'; - * const password = 'Password used to generate key'; - * // Use the async `crypto.scrypt()` instead. - * const key = scryptSync(password, 'salt', 24); - * // The IV is usually passed along with the ciphertext. - * const iv = Buffer.alloc(16, 0); // Initialization vector. - * - * const decipher = createDecipheriv(algorithm, key, iv); - * - * // Encrypted using same algorithm, key and iv. - * const encrypted = - * 'e5f79c5915c02171eec6b212d5520d44480993d7d622a7c4c2da32f6efda0ffa'; - * let decrypted = decipher.update(encrypted, 'hex', 'utf8'); - * decrypted += decipher.final('utf8'); - * console.log(decrypted); - * // Prints: some clear text data - * ``` - * @since v0.1.94 - */ - class Decipheriv extends stream.Transform { - private constructor(); - /** - * Updates the decipher with `data`. If the `inputEncoding` argument is given, - * the `data` argument is a string using the specified encoding. If the `inputEncoding` argument is not given, `data` must be a `Buffer`. If `data` is a `Buffer` then `inputEncoding` is - * ignored. - * - * The `outputEncoding` specifies the output format of the enciphered - * data. If the `outputEncoding` is specified, a string using the specified encoding is returned. If no `outputEncoding` is provided, a `Buffer` is returned. - * - * The `decipher.update()` method can be called multiple times with new data until `decipher.final()` is called. Calling `decipher.update()` after `decipher.final()` will result in an error - * being thrown. - * @since v0.1.94 - * @param inputEncoding The `encoding` of the `data` string. - * @param outputEncoding The `encoding` of the return value. - */ - update(data: NodeJS.ArrayBufferView): NonSharedBuffer; - update(data: string, inputEncoding: Encoding): NonSharedBuffer; - update(data: NodeJS.ArrayBufferView, inputEncoding: undefined, outputEncoding: Encoding): string; - update(data: string, inputEncoding: Encoding | undefined, outputEncoding: Encoding): string; - /** - * Once the `decipher.final()` method has been called, the `Decipheriv` object can - * no longer be used to decrypt data. Attempts to call `decipher.final()` more - * than once will result in an error being thrown. - * @since v0.1.94 - * @param outputEncoding The `encoding` of the return value. - * @return Any remaining deciphered contents. If `outputEncoding` is specified, a string is returned. If an `outputEncoding` is not provided, a {@link Buffer} is returned. - */ - final(): NonSharedBuffer; - final(outputEncoding: BufferEncoding): string; - /** - * When data has been encrypted without standard block padding, calling `decipher.setAutoPadding(false)` will disable automatic padding to prevent `decipher.final()` from checking for and - * removing padding. - * - * Turning auto padding off will only work if the input data's length is a - * multiple of the ciphers block size. - * - * The `decipher.setAutoPadding()` method must be called before `decipher.final()`. - * @since v0.7.1 - * @param [autoPadding=true] - * @return for method chaining. - */ - setAutoPadding(auto_padding?: boolean): this; - } - interface DecipherCCM extends Decipheriv { - setAuthTag(buffer: NodeJS.ArrayBufferView): this; - setAAD( - buffer: NodeJS.ArrayBufferView, - options: { - plaintextLength: number; - }, - ): this; - } - interface DecipherGCM extends Decipheriv { - setAuthTag(buffer: NodeJS.ArrayBufferView): this; - setAAD( - buffer: NodeJS.ArrayBufferView, - options?: { - plaintextLength: number; - }, - ): this; - } - interface DecipherOCB extends Decipheriv { - setAuthTag(buffer: NodeJS.ArrayBufferView): this; - setAAD( - buffer: NodeJS.ArrayBufferView, - options?: { - plaintextLength: number; - }, - ): this; - } - interface DecipherChaCha20Poly1305 extends Decipheriv { - setAuthTag(buffer: NodeJS.ArrayBufferView): this; - setAAD( - buffer: NodeJS.ArrayBufferView, - options: { - plaintextLength: number; - }, - ): this; - } - interface PrivateKeyInput { - key: string | Buffer; - format?: KeyFormat | undefined; - type?: PrivateKeyExportType | undefined; - passphrase?: string | Buffer | undefined; - encoding?: string | undefined; - } - interface PublicKeyInput { - key: string | Buffer; - format?: KeyFormat | undefined; - type?: PublicKeyExportType | undefined; - encoding?: string | undefined; - } - /** - * Asynchronously generates a new random secret key of the given `length`. The `type` will determine which validations will be performed on the `length`. - * - * ```js - * const { - * generateKey, - * } = await import('node:crypto'); - * - * generateKey('hmac', { length: 512 }, (err, key) => { - * if (err) throw err; - * console.log(key.export().toString('hex')); // 46e..........620 - * }); - * ``` - * - * The size of a generated HMAC key should not exceed the block size of the - * underlying hash function. See {@link createHmac} for more information. - * @since v15.0.0 - * @param type The intended use of the generated secret key. Currently accepted values are `'hmac'` and `'aes'`. - */ - function generateKey( - type: "hmac" | "aes", - options: { - length: number; - }, - callback: (err: Error | null, key: KeyObject) => void, - ): void; - /** - * Synchronously generates a new random secret key of the given `length`. The `type` will determine which validations will be performed on the `length`. - * - * ```js - * const { - * generateKeySync, - * } = await import('node:crypto'); - * - * const key = generateKeySync('hmac', { length: 512 }); - * console.log(key.export().toString('hex')); // e89..........41e - * ``` - * - * The size of a generated HMAC key should not exceed the block size of the - * underlying hash function. See {@link createHmac} for more information. - * @since v15.0.0 - * @param type The intended use of the generated secret key. Currently accepted values are `'hmac'` and `'aes'`. - */ - function generateKeySync( - type: "hmac" | "aes", - options: { - length: number; - }, - ): KeyObject; - interface JsonWebKeyInput { - key: webcrypto.JsonWebKey; - format: "jwk"; - } - /** - * Creates and returns a new key object containing a private key. If `key` is a - * string or `Buffer`, `format` is assumed to be `'pem'`; otherwise, `key` must be an object with the properties described above. - * - * If the private key is encrypted, a `passphrase` must be specified. The length - * of the passphrase is limited to 1024 bytes. - * @since v11.6.0 - */ - function createPrivateKey(key: PrivateKeyInput | string | Buffer | JsonWebKeyInput): KeyObject; - /** - * Creates and returns a new key object containing a public key. If `key` is a - * string or `Buffer`, `format` is assumed to be `'pem'`; if `key` is a `KeyObject` with type `'private'`, the public key is derived from the given private key; - * otherwise, `key` must be an object with the properties described above. - * - * If the format is `'pem'`, the `'key'` may also be an X.509 certificate. - * - * Because public keys can be derived from private keys, a private key may be - * passed instead of a public key. In that case, this function behaves as if {@link createPrivateKey} had been called, except that the type of the - * returned `KeyObject` will be `'public'` and that the private key cannot be - * extracted from the returned `KeyObject`. Similarly, if a `KeyObject` with type `'private'` is given, a new `KeyObject` with type `'public'` will be returned - * and it will be impossible to extract the private key from the returned object. - * @since v11.6.0 - */ - function createPublicKey(key: PublicKeyInput | string | Buffer | KeyObject | JsonWebKeyInput): KeyObject; - /** - * Creates and returns a new key object containing a secret key for symmetric - * encryption or `Hmac`. - * @since v11.6.0 - * @param encoding The string encoding when `key` is a string. - */ - function createSecretKey(key: NodeJS.ArrayBufferView): KeyObject; - function createSecretKey(key: string, encoding: BufferEncoding): KeyObject; - /** - * Creates and returns a `Sign` object that uses the given `algorithm`. Use {@link getHashes} to obtain the names of the available digest algorithms. - * Optional `options` argument controls the `stream.Writable` behavior. - * - * In some cases, a `Sign` instance can be created using the name of a signature - * algorithm, such as `'RSA-SHA256'`, instead of a digest algorithm. This will use - * the corresponding digest algorithm. This does not work for all signature - * algorithms, such as `'ecdsa-with-SHA256'`, so it is best to always use digest - * algorithm names. - * @since v0.1.92 - * @param options `stream.Writable` options - */ - // TODO: signing algorithm type - function createSign(algorithm: string, options?: stream.WritableOptions): Sign; - type DSAEncoding = "der" | "ieee-p1363"; - interface SigningOptions { - /** - * @see crypto.constants.RSA_PKCS1_PADDING - */ - padding?: number | undefined; - saltLength?: number | undefined; - dsaEncoding?: DSAEncoding | undefined; - context?: ArrayBuffer | NodeJS.ArrayBufferView | undefined; - } - interface SignPrivateKeyInput extends PrivateKeyInput, SigningOptions {} - interface SignKeyObjectInput extends SigningOptions { - key: KeyObject; - } - interface SignJsonWebKeyInput extends JsonWebKeyInput, SigningOptions {} - interface VerifyPublicKeyInput extends PublicKeyInput, SigningOptions {} - interface VerifyKeyObjectInput extends SigningOptions { - key: KeyObject; - } - interface VerifyJsonWebKeyInput extends JsonWebKeyInput, SigningOptions {} - type KeyLike = string | Buffer | KeyObject; - /** - * The `Sign` class is a utility for generating signatures. It can be used in one - * of two ways: - * - * * As a writable `stream`, where data to be signed is written and the `sign.sign()` method is used to generate and return the signature, or - * * Using the `sign.update()` and `sign.sign()` methods to produce the - * signature. - * - * The {@link createSign} method is used to create `Sign` instances. The - * argument is the string name of the hash function to use. `Sign` objects are not - * to be created directly using the `new` keyword. - * - * Example: Using `Sign` and `Verify` objects as streams: - * - * ```js - * const { - * generateKeyPairSync, - * createSign, - * createVerify, - * } = await import('node:crypto'); - * - * const { privateKey, publicKey } = generateKeyPairSync('ec', { - * namedCurve: 'sect239k1', - * }); - * - * const sign = createSign('SHA256'); - * sign.write('some data to sign'); - * sign.end(); - * const signature = sign.sign(privateKey, 'hex'); - * - * const verify = createVerify('SHA256'); - * verify.write('some data to sign'); - * verify.end(); - * console.log(verify.verify(publicKey, signature, 'hex')); - * // Prints: true - * ``` - * - * Example: Using the `sign.update()` and `verify.update()` methods: - * - * ```js - * const { - * generateKeyPairSync, - * createSign, - * createVerify, - * } = await import('node:crypto'); - * - * const { privateKey, publicKey } = generateKeyPairSync('rsa', { - * modulusLength: 2048, - * }); - * - * const sign = createSign('SHA256'); - * sign.update('some data to sign'); - * sign.end(); - * const signature = sign.sign(privateKey); - * - * const verify = createVerify('SHA256'); - * verify.update('some data to sign'); - * verify.end(); - * console.log(verify.verify(publicKey, signature)); - * // Prints: true - * ``` - * @since v0.1.92 - */ - class Sign extends stream.Writable { - private constructor(); - /** - * Updates the `Sign` content with the given `data`, the encoding of which - * is given in `inputEncoding`. - * If `encoding` is not provided, and the `data` is a string, an - * encoding of `'utf8'` is enforced. If `data` is a `Buffer`, `TypedArray`, or`DataView`, then `inputEncoding` is ignored. - * - * This can be called many times with new data as it is streamed. - * @since v0.1.92 - * @param inputEncoding The `encoding` of the `data` string. - */ - update(data: BinaryLike): this; - update(data: string, inputEncoding: Encoding): this; - /** - * Calculates the signature on all the data passed through using either `sign.update()` or `sign.write()`. - * - * If `privateKey` is not a `KeyObject`, this function behaves as if `privateKey` had been passed to {@link createPrivateKey}. If it is an - * object, the following additional properties can be passed: - * - * If `outputEncoding` is provided a string is returned; otherwise a `Buffer` is returned. - * - * The `Sign` object can not be again used after `sign.sign()` method has been - * called. Multiple calls to `sign.sign()` will result in an error being thrown. - * @since v0.1.92 - */ - sign(privateKey: KeyLike | SignKeyObjectInput | SignPrivateKeyInput | SignJsonWebKeyInput): NonSharedBuffer; - sign( - privateKey: KeyLike | SignKeyObjectInput | SignPrivateKeyInput | SignJsonWebKeyInput, - outputFormat: BinaryToTextEncoding, - ): string; - } - /** - * Creates and returns a `Verify` object that uses the given algorithm. - * Use {@link getHashes} to obtain an array of names of the available - * signing algorithms. Optional `options` argument controls the `stream.Writable` behavior. - * - * In some cases, a `Verify` instance can be created using the name of a signature - * algorithm, such as `'RSA-SHA256'`, instead of a digest algorithm. This will use - * the corresponding digest algorithm. This does not work for all signature - * algorithms, such as `'ecdsa-with-SHA256'`, so it is best to always use digest - * algorithm names. - * @since v0.1.92 - * @param options `stream.Writable` options - */ - function createVerify(algorithm: string, options?: stream.WritableOptions): Verify; - /** - * The `Verify` class is a utility for verifying signatures. It can be used in one - * of two ways: - * - * * As a writable `stream` where written data is used to validate against the - * supplied signature, or - * * Using the `verify.update()` and `verify.verify()` methods to verify - * the signature. - * - * The {@link createVerify} method is used to create `Verify` instances. `Verify` objects are not to be created directly using the `new` keyword. - * - * See `Sign` for examples. - * @since v0.1.92 - */ - class Verify extends stream.Writable { - private constructor(); - /** - * Updates the `Verify` content with the given `data`, the encoding of which - * is given in `inputEncoding`. - * If `inputEncoding` is not provided, and the `data` is a string, an - * encoding of `'utf8'` is enforced. If `data` is a `Buffer`, `TypedArray`, or `DataView`, then `inputEncoding` is ignored. - * - * This can be called many times with new data as it is streamed. - * @since v0.1.92 - * @param inputEncoding The `encoding` of the `data` string. - */ - update(data: BinaryLike): Verify; - update(data: string, inputEncoding: Encoding): Verify; - /** - * Verifies the provided data using the given `object` and `signature`. - * - * If `object` is not a `KeyObject`, this function behaves as if `object` had been passed to {@link createPublicKey}. If it is an - * object, the following additional properties can be passed: - * - * The `signature` argument is the previously calculated signature for the data, in - * the `signatureEncoding`. - * If a `signatureEncoding` is specified, the `signature` is expected to be a - * string; otherwise `signature` is expected to be a `Buffer`, `TypedArray`, or `DataView`. - * - * The `verify` object can not be used again after `verify.verify()` has been - * called. Multiple calls to `verify.verify()` will result in an error being - * thrown. - * - * Because public keys can be derived from private keys, a private key may - * be passed instead of a public key. - * @since v0.1.92 - */ - verify( - object: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput | VerifyJsonWebKeyInput, - signature: NodeJS.ArrayBufferView, - ): boolean; - verify( - object: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput | VerifyJsonWebKeyInput, - signature: string, - signature_format?: BinaryToTextEncoding, - ): boolean; - } - /** - * Creates a `DiffieHellman` key exchange object using the supplied `prime` and an - * optional specific `generator`. - * - * The `generator` argument can be a number, string, or `Buffer`. If `generator` is not specified, the value `2` is used. - * - * If `primeEncoding` is specified, `prime` is expected to be a string; otherwise - * a `Buffer`, `TypedArray`, or `DataView` is expected. - * - * If `generatorEncoding` is specified, `generator` is expected to be a string; - * otherwise a number, `Buffer`, `TypedArray`, or `DataView` is expected. - * @since v0.11.12 - * @param primeEncoding The `encoding` of the `prime` string. - * @param [generator=2] - * @param generatorEncoding The `encoding` of the `generator` string. - */ - function createDiffieHellman(primeLength: number, generator?: number): DiffieHellman; - function createDiffieHellman( - prime: ArrayBuffer | NodeJS.ArrayBufferView, - generator?: number | ArrayBuffer | NodeJS.ArrayBufferView, - ): DiffieHellman; - function createDiffieHellman( - prime: ArrayBuffer | NodeJS.ArrayBufferView, - generator: string, - generatorEncoding: BinaryToTextEncoding, - ): DiffieHellman; - function createDiffieHellman( - prime: string, - primeEncoding: BinaryToTextEncoding, - generator?: number | ArrayBuffer | NodeJS.ArrayBufferView, - ): DiffieHellman; - function createDiffieHellman( - prime: string, - primeEncoding: BinaryToTextEncoding, - generator: string, - generatorEncoding: BinaryToTextEncoding, - ): DiffieHellman; - /** - * The `DiffieHellman` class is a utility for creating Diffie-Hellman key - * exchanges. - * - * Instances of the `DiffieHellman` class can be created using the {@link createDiffieHellman} function. - * - * ```js - * import assert from 'node:assert'; - * - * const { - * createDiffieHellman, - * } = await import('node:crypto'); - * - * // Generate Alice's keys... - * const alice = createDiffieHellman(2048); - * const aliceKey = alice.generateKeys(); - * - * // Generate Bob's keys... - * const bob = createDiffieHellman(alice.getPrime(), alice.getGenerator()); - * const bobKey = bob.generateKeys(); - * - * // Exchange and generate the secret... - * const aliceSecret = alice.computeSecret(bobKey); - * const bobSecret = bob.computeSecret(aliceKey); - * - * // OK - * assert.strictEqual(aliceSecret.toString('hex'), bobSecret.toString('hex')); - * ``` - * @since v0.5.0 - */ - class DiffieHellman { - private constructor(); - /** - * Generates private and public Diffie-Hellman key values unless they have been - * generated or computed already, and returns - * the public key in the specified `encoding`. This key should be - * transferred to the other party. - * If `encoding` is provided a string is returned; otherwise a `Buffer` is returned. - * - * This function is a thin wrapper around [`DH_generate_key()`](https://www.openssl.org/docs/man3.0/man3/DH_generate_key.html). In particular, - * once a private key has been generated or set, calling this function only updates - * the public key but does not generate a new private key. - * @since v0.5.0 - * @param encoding The `encoding` of the return value. - */ - generateKeys(): NonSharedBuffer; - generateKeys(encoding: BinaryToTextEncoding): string; - /** - * Computes the shared secret using `otherPublicKey` as the other - * party's public key and returns the computed shared secret. The supplied - * key is interpreted using the specified `inputEncoding`, and secret is - * encoded using specified `outputEncoding`. - * If the `inputEncoding` is not - * provided, `otherPublicKey` is expected to be a `Buffer`, `TypedArray`, or `DataView`. - * - * If `outputEncoding` is given a string is returned; otherwise, a `Buffer` is returned. - * @since v0.5.0 - * @param inputEncoding The `encoding` of an `otherPublicKey` string. - * @param outputEncoding The `encoding` of the return value. - */ - computeSecret( - otherPublicKey: NodeJS.ArrayBufferView, - inputEncoding?: null, - outputEncoding?: null, - ): NonSharedBuffer; - computeSecret( - otherPublicKey: string, - inputEncoding: BinaryToTextEncoding, - outputEncoding?: null, - ): NonSharedBuffer; - computeSecret( - otherPublicKey: NodeJS.ArrayBufferView, - inputEncoding: null, - outputEncoding: BinaryToTextEncoding, - ): string; - computeSecret( - otherPublicKey: string, - inputEncoding: BinaryToTextEncoding, - outputEncoding: BinaryToTextEncoding, - ): string; - /** - * Returns the Diffie-Hellman prime in the specified `encoding`. - * If `encoding` is provided a string is - * returned; otherwise a `Buffer` is returned. - * @since v0.5.0 - * @param encoding The `encoding` of the return value. - */ - getPrime(): NonSharedBuffer; - getPrime(encoding: BinaryToTextEncoding): string; - /** - * Returns the Diffie-Hellman generator in the specified `encoding`. - * If `encoding` is provided a string is - * returned; otherwise a `Buffer` is returned. - * @since v0.5.0 - * @param encoding The `encoding` of the return value. - */ - getGenerator(): NonSharedBuffer; - getGenerator(encoding: BinaryToTextEncoding): string; - /** - * Returns the Diffie-Hellman public key in the specified `encoding`. - * If `encoding` is provided a - * string is returned; otherwise a `Buffer` is returned. - * @since v0.5.0 - * @param encoding The `encoding` of the return value. - */ - getPublicKey(): NonSharedBuffer; - getPublicKey(encoding: BinaryToTextEncoding): string; - /** - * Returns the Diffie-Hellman private key in the specified `encoding`. - * If `encoding` is provided a - * string is returned; otherwise a `Buffer` is returned. - * @since v0.5.0 - * @param encoding The `encoding` of the return value. - */ - getPrivateKey(): NonSharedBuffer; - getPrivateKey(encoding: BinaryToTextEncoding): string; - /** - * Sets the Diffie-Hellman public key. If the `encoding` argument is provided, `publicKey` is expected - * to be a string. If no `encoding` is provided, `publicKey` is expected - * to be a `Buffer`, `TypedArray`, or `DataView`. - * @since v0.5.0 - * @param encoding The `encoding` of the `publicKey` string. - */ - setPublicKey(publicKey: NodeJS.ArrayBufferView): void; - setPublicKey(publicKey: string, encoding: BufferEncoding): void; - /** - * Sets the Diffie-Hellman private key. If the `encoding` argument is provided,`privateKey` is expected - * to be a string. If no `encoding` is provided, `privateKey` is expected - * to be a `Buffer`, `TypedArray`, or `DataView`. - * - * This function does not automatically compute the associated public key. Either `diffieHellman.setPublicKey()` or `diffieHellman.generateKeys()` can be - * used to manually provide the public key or to automatically derive it. - * @since v0.5.0 - * @param encoding The `encoding` of the `privateKey` string. - */ - setPrivateKey(privateKey: NodeJS.ArrayBufferView): void; - setPrivateKey(privateKey: string, encoding: BufferEncoding): void; - /** - * A bit field containing any warnings and/or errors resulting from a check - * performed during initialization of the `DiffieHellman` object. - * - * The following values are valid for this property (as defined in `node:constants` module): - * - * * `DH_CHECK_P_NOT_SAFE_PRIME` - * * `DH_CHECK_P_NOT_PRIME` - * * `DH_UNABLE_TO_CHECK_GENERATOR` - * * `DH_NOT_SUITABLE_GENERATOR` - * @since v0.11.12 - */ - verifyError: number; - } - /** - * The `DiffieHellmanGroup` class takes a well-known modp group as its argument. - * It works the same as `DiffieHellman`, except that it does not allow changing its keys after creation. - * In other words, it does not implement `setPublicKey()` or `setPrivateKey()` methods. - * - * ```js - * const { createDiffieHellmanGroup } = await import('node:crypto'); - * const dh = createDiffieHellmanGroup('modp1'); - * ``` - * The name (e.g. `'modp1'`) is taken from [RFC 2412](https://www.rfc-editor.org/rfc/rfc2412.txt) (modp1 and 2) and [RFC 3526](https://www.rfc-editor.org/rfc/rfc3526.txt): - * ```bash - * $ perl -ne 'print "$1\n" if /"(modp\d+)"/' src/node_crypto_groups.h - * modp1 # 768 bits - * modp2 # 1024 bits - * modp5 # 1536 bits - * modp14 # 2048 bits - * modp15 # etc. - * modp16 - * modp17 - * modp18 - * ``` - * @since v0.7.5 - */ - const DiffieHellmanGroup: DiffieHellmanGroupConstructor; - interface DiffieHellmanGroupConstructor { - new(name: string): DiffieHellmanGroup; - (name: string): DiffieHellmanGroup; - readonly prototype: DiffieHellmanGroup; - } - type DiffieHellmanGroup = Omit; - /** - * Creates a predefined `DiffieHellmanGroup` key exchange object. The - * supported groups are listed in the documentation for `DiffieHellmanGroup`. - * - * The returned object mimics the interface of objects created by {@link createDiffieHellman}, but will not allow changing - * the keys (with `diffieHellman.setPublicKey()`, for example). The - * advantage of using this method is that the parties do not have to - * generate nor exchange a group modulus beforehand, saving both processor - * and communication time. - * - * Example (obtaining a shared secret): - * - * ```js - * const { - * getDiffieHellman, - * } = await import('node:crypto'); - * const alice = getDiffieHellman('modp14'); - * const bob = getDiffieHellman('modp14'); - * - * alice.generateKeys(); - * bob.generateKeys(); - * - * const aliceSecret = alice.computeSecret(bob.getPublicKey(), null, 'hex'); - * const bobSecret = bob.computeSecret(alice.getPublicKey(), null, 'hex'); - * - * // aliceSecret and bobSecret should be the same - * console.log(aliceSecret === bobSecret); - * ``` - * @since v0.7.5 - */ - function getDiffieHellman(groupName: string): DiffieHellmanGroup; - /** - * An alias for {@link getDiffieHellman} - * @since v0.9.3 - */ - function createDiffieHellmanGroup(name: string): DiffieHellmanGroup; - /** - * Provides an asynchronous Password-Based Key Derivation Function 2 (PBKDF2) - * implementation. A selected HMAC digest algorithm specified by `digest` is - * applied to derive a key of the requested byte length (`keylen`) from the `password`, `salt` and `iterations`. - * - * The supplied `callback` function is called with two arguments: `err` and `derivedKey`. If an error occurs while deriving the key, `err` will be set; - * otherwise `err` will be `null`. By default, the successfully generated `derivedKey` will be passed to the callback as a `Buffer`. An error will be - * thrown if any of the input arguments specify invalid values or types. - * - * The `iterations` argument must be a number set as high as possible. The - * higher the number of iterations, the more secure the derived key will be, - * but will take a longer amount of time to complete. - * - * The `salt` should be as unique as possible. It is recommended that a salt is - * random and at least 16 bytes long. See [NIST SP 800-132](https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-132.pdf) for details. - * - * When passing strings for `password` or `salt`, please consider `caveats when using strings as inputs to cryptographic APIs`. - * - * ```js - * const { - * pbkdf2, - * } = await import('node:crypto'); - * - * pbkdf2('secret', 'salt', 100000, 64, 'sha512', (err, derivedKey) => { - * if (err) throw err; - * console.log(derivedKey.toString('hex')); // '3745e48...08d59ae' - * }); - * ``` - * - * An array of supported digest functions can be retrieved using {@link getHashes}. - * - * This API uses libuv's threadpool, which can have surprising and - * negative performance implications for some applications; see the `UV_THREADPOOL_SIZE` documentation for more information. - * @since v0.5.5 - */ - function pbkdf2( - password: BinaryLike, - salt: BinaryLike, - iterations: number, - keylen: number, - digest: string, - callback: (err: Error | null, derivedKey: NonSharedBuffer) => void, - ): void; - /** - * Provides a synchronous Password-Based Key Derivation Function 2 (PBKDF2) - * implementation. A selected HMAC digest algorithm specified by `digest` is - * applied to derive a key of the requested byte length (`keylen`) from the `password`, `salt` and `iterations`. - * - * If an error occurs an `Error` will be thrown, otherwise the derived key will be - * returned as a `Buffer`. - * - * The `iterations` argument must be a number set as high as possible. The - * higher the number of iterations, the more secure the derived key will be, - * but will take a longer amount of time to complete. - * - * The `salt` should be as unique as possible. It is recommended that a salt is - * random and at least 16 bytes long. See [NIST SP 800-132](https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-132.pdf) for details. - * - * When passing strings for `password` or `salt`, please consider `caveats when using strings as inputs to cryptographic APIs`. - * - * ```js - * const { - * pbkdf2Sync, - * } = await import('node:crypto'); - * - * const key = pbkdf2Sync('secret', 'salt', 100000, 64, 'sha512'); - * console.log(key.toString('hex')); // '3745e48...08d59ae' - * ``` - * - * An array of supported digest functions can be retrieved using {@link getHashes}. - * @since v0.9.3 - */ - function pbkdf2Sync( - password: BinaryLike, - salt: BinaryLike, - iterations: number, - keylen: number, - digest: string, - ): NonSharedBuffer; - /** - * Generates cryptographically strong pseudorandom data. The `size` argument - * is a number indicating the number of bytes to generate. - * - * If a `callback` function is provided, the bytes are generated asynchronously - * and the `callback` function is invoked with two arguments: `err` and `buf`. - * If an error occurs, `err` will be an `Error` object; otherwise it is `null`. The `buf` argument is a `Buffer` containing the generated bytes. - * - * ```js - * // Asynchronous - * const { - * randomBytes, - * } = await import('node:crypto'); - * - * randomBytes(256, (err, buf) => { - * if (err) throw err; - * console.log(`${buf.length} bytes of random data: ${buf.toString('hex')}`); - * }); - * ``` - * - * If the `callback` function is not provided, the random bytes are generated - * synchronously and returned as a `Buffer`. An error will be thrown if - * there is a problem generating the bytes. - * - * ```js - * // Synchronous - * const { - * randomBytes, - * } = await import('node:crypto'); - * - * const buf = randomBytes(256); - * console.log( - * `${buf.length} bytes of random data: ${buf.toString('hex')}`); - * ``` - * - * The `crypto.randomBytes()` method will not complete until there is - * sufficient entropy available. - * This should normally never take longer than a few milliseconds. The only time - * when generating the random bytes may conceivably block for a longer period of - * time is right after boot, when the whole system is still low on entropy. - * - * This API uses libuv's threadpool, which can have surprising and - * negative performance implications for some applications; see the `UV_THREADPOOL_SIZE` documentation for more information. - * - * The asynchronous version of `crypto.randomBytes()` is carried out in a single - * threadpool request. To minimize threadpool task length variation, partition - * large `randomBytes` requests when doing so as part of fulfilling a client - * request. - * @since v0.5.8 - * @param size The number of bytes to generate. The `size` must not be larger than `2**31 - 1`. - * @return if the `callback` function is not provided. - */ - function randomBytes(size: number): NonSharedBuffer; - function randomBytes(size: number, callback: (err: Error | null, buf: NonSharedBuffer) => void): void; - function pseudoRandomBytes(size: number): NonSharedBuffer; - function pseudoRandomBytes(size: number, callback: (err: Error | null, buf: NonSharedBuffer) => void): void; - /** - * Return a random integer `n` such that `min <= n < max`. This - * implementation avoids [modulo bias](https://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle#Modulo_bias). - * - * The range (`max - min`) must be less than 2**48. `min` and `max` must - * be [safe integers](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isSafeInteger). - * - * If the `callback` function is not provided, the random integer is - * generated synchronously. - * - * ```js - * // Asynchronous - * const { - * randomInt, - * } = await import('node:crypto'); - * - * randomInt(3, (err, n) => { - * if (err) throw err; - * console.log(`Random number chosen from (0, 1, 2): ${n}`); - * }); - * ``` - * - * ```js - * // Synchronous - * const { - * randomInt, - * } = await import('node:crypto'); - * - * const n = randomInt(3); - * console.log(`Random number chosen from (0, 1, 2): ${n}`); - * ``` - * - * ```js - * // With `min` argument - * const { - * randomInt, - * } = await import('node:crypto'); - * - * const n = randomInt(1, 7); - * console.log(`The dice rolled: ${n}`); - * ``` - * @since v14.10.0, v12.19.0 - * @param [min=0] Start of random range (inclusive). - * @param max End of random range (exclusive). - * @param callback `function(err, n) {}`. - */ - function randomInt(max: number): number; - function randomInt(min: number, max: number): number; - function randomInt(max: number, callback: (err: Error | null, value: number) => void): void; - function randomInt(min: number, max: number, callback: (err: Error | null, value: number) => void): void; - /** - * Synchronous version of {@link randomFill}. - * - * ```js - * import { Buffer } from 'node:buffer'; - * const { randomFillSync } = await import('node:crypto'); - * - * const buf = Buffer.alloc(10); - * console.log(randomFillSync(buf).toString('hex')); - * - * randomFillSync(buf, 5); - * console.log(buf.toString('hex')); - * - * // The above is equivalent to the following: - * randomFillSync(buf, 5, 5); - * console.log(buf.toString('hex')); - * ``` - * - * Any `ArrayBuffer`, `TypedArray` or `DataView` instance may be passed as`buffer`. - * - * ```js - * import { Buffer } from 'node:buffer'; - * const { randomFillSync } = await import('node:crypto'); - * - * const a = new Uint32Array(10); - * console.log(Buffer.from(randomFillSync(a).buffer, - * a.byteOffset, a.byteLength).toString('hex')); - * - * const b = new DataView(new ArrayBuffer(10)); - * console.log(Buffer.from(randomFillSync(b).buffer, - * b.byteOffset, b.byteLength).toString('hex')); - * - * const c = new ArrayBuffer(10); - * console.log(Buffer.from(randomFillSync(c)).toString('hex')); - * ``` - * @since v7.10.0, v6.13.0 - * @param buffer Must be supplied. The size of the provided `buffer` must not be larger than `2**31 - 1`. - * @param [offset=0] - * @param [size=buffer.length - offset] - * @return The object passed as `buffer` argument. - */ - function randomFillSync(buffer: T, offset?: number, size?: number): T; - /** - * This function is similar to {@link randomBytes} but requires the first - * argument to be a `Buffer` that will be filled. It also - * requires that a callback is passed in. - * - * If the `callback` function is not provided, an error will be thrown. - * - * ```js - * import { Buffer } from 'node:buffer'; - * const { randomFill } = await import('node:crypto'); - * - * const buf = Buffer.alloc(10); - * randomFill(buf, (err, buf) => { - * if (err) throw err; - * console.log(buf.toString('hex')); - * }); - * - * randomFill(buf, 5, (err, buf) => { - * if (err) throw err; - * console.log(buf.toString('hex')); - * }); - * - * // The above is equivalent to the following: - * randomFill(buf, 5, 5, (err, buf) => { - * if (err) throw err; - * console.log(buf.toString('hex')); - * }); - * ``` - * - * Any `ArrayBuffer`, `TypedArray`, or `DataView` instance may be passed as `buffer`. - * - * While this includes instances of `Float32Array` and `Float64Array`, this - * function should not be used to generate random floating-point numbers. The - * result may contain `+Infinity`, `-Infinity`, and `NaN`, and even if the array - * contains finite numbers only, they are not drawn from a uniform random - * distribution and have no meaningful lower or upper bounds. - * - * ```js - * import { Buffer } from 'node:buffer'; - * const { randomFill } = await import('node:crypto'); - * - * const a = new Uint32Array(10); - * randomFill(a, (err, buf) => { - * if (err) throw err; - * console.log(Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength) - * .toString('hex')); - * }); - * - * const b = new DataView(new ArrayBuffer(10)); - * randomFill(b, (err, buf) => { - * if (err) throw err; - * console.log(Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength) - * .toString('hex')); - * }); - * - * const c = new ArrayBuffer(10); - * randomFill(c, (err, buf) => { - * if (err) throw err; - * console.log(Buffer.from(buf).toString('hex')); - * }); - * ``` - * - * This API uses libuv's threadpool, which can have surprising and - * negative performance implications for some applications; see the `UV_THREADPOOL_SIZE` documentation for more information. - * - * The asynchronous version of `crypto.randomFill()` is carried out in a single - * threadpool request. To minimize threadpool task length variation, partition - * large `randomFill` requests when doing so as part of fulfilling a client - * request. - * @since v7.10.0, v6.13.0 - * @param buffer Must be supplied. The size of the provided `buffer` must not be larger than `2**31 - 1`. - * @param [offset=0] - * @param [size=buffer.length - offset] - * @param callback `function(err, buf) {}`. - */ - function randomFill( - buffer: T, - callback: (err: Error | null, buf: T) => void, - ): void; - function randomFill( - buffer: T, - offset: number, - callback: (err: Error | null, buf: T) => void, - ): void; - function randomFill( - buffer: T, - offset: number, - size: number, - callback: (err: Error | null, buf: T) => void, - ): void; - interface ScryptOptions { - cost?: number | undefined; - blockSize?: number | undefined; - parallelization?: number | undefined; - N?: number | undefined; - r?: number | undefined; - p?: number | undefined; - maxmem?: number | undefined; - } - /** - * Provides an asynchronous [scrypt](https://en.wikipedia.org/wiki/Scrypt) implementation. Scrypt is a password-based - * key derivation function that is designed to be expensive computationally and - * memory-wise in order to make brute-force attacks unrewarding. - * - * The `salt` should be as unique as possible. It is recommended that a salt is - * random and at least 16 bytes long. See [NIST SP 800-132](https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-132.pdf) for details. - * - * When passing strings for `password` or `salt`, please consider `caveats when using strings as inputs to cryptographic APIs`. - * - * The `callback` function is called with two arguments: `err` and `derivedKey`. `err` is an exception object when key derivation fails, otherwise `err` is `null`. `derivedKey` is passed to the - * callback as a `Buffer`. - * - * An exception is thrown when any of the input arguments specify invalid values - * or types. - * - * ```js - * const { - * scrypt, - * } = await import('node:crypto'); - * - * // Using the factory defaults. - * scrypt('password', 'salt', 64, (err, derivedKey) => { - * if (err) throw err; - * console.log(derivedKey.toString('hex')); // '3745e48...08d59ae' - * }); - * // Using a custom N parameter. Must be a power of two. - * scrypt('password', 'salt', 64, { N: 1024 }, (err, derivedKey) => { - * if (err) throw err; - * console.log(derivedKey.toString('hex')); // '3745e48...aa39b34' - * }); - * ``` - * @since v10.5.0 - */ - function scrypt( - password: BinaryLike, - salt: BinaryLike, - keylen: number, - callback: (err: Error | null, derivedKey: NonSharedBuffer) => void, - ): void; - function scrypt( - password: BinaryLike, - salt: BinaryLike, - keylen: number, - options: ScryptOptions, - callback: (err: Error | null, derivedKey: NonSharedBuffer) => void, - ): void; - /** - * Provides a synchronous [scrypt](https://en.wikipedia.org/wiki/Scrypt) implementation. Scrypt is a password-based - * key derivation function that is designed to be expensive computationally and - * memory-wise in order to make brute-force attacks unrewarding. - * - * The `salt` should be as unique as possible. It is recommended that a salt is - * random and at least 16 bytes long. See [NIST SP 800-132](https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-132.pdf) for details. - * - * When passing strings for `password` or `salt`, please consider `caveats when using strings as inputs to cryptographic APIs`. - * - * An exception is thrown when key derivation fails, otherwise the derived key is - * returned as a `Buffer`. - * - * An exception is thrown when any of the input arguments specify invalid values - * or types. - * - * ```js - * const { - * scryptSync, - * } = await import('node:crypto'); - * // Using the factory defaults. - * - * const key1 = scryptSync('password', 'salt', 64); - * console.log(key1.toString('hex')); // '3745e48...08d59ae' - * // Using a custom N parameter. Must be a power of two. - * const key2 = scryptSync('password', 'salt', 64, { N: 1024 }); - * console.log(key2.toString('hex')); // '3745e48...aa39b34' - * ``` - * @since v10.5.0 - */ - function scryptSync( - password: BinaryLike, - salt: BinaryLike, - keylen: number, - options?: ScryptOptions, - ): NonSharedBuffer; - interface RsaPublicKey { - key: KeyLike; - padding?: number | undefined; - } - interface RsaPrivateKey { - key: KeyLike; - passphrase?: string | undefined; - /** - * @default 'sha1' - */ - oaepHash?: string | undefined; - oaepLabel?: NodeJS.TypedArray | undefined; - padding?: number | undefined; - } - /** - * Encrypts the content of `buffer` with `key` and returns a new `Buffer` with encrypted content. The returned data can be decrypted using - * the corresponding private key, for example using {@link privateDecrypt}. - * - * If `key` is not a `KeyObject`, this function behaves as if `key` had been passed to {@link createPublicKey}. If it is an - * object, the `padding` property can be passed. Otherwise, this function uses `RSA_PKCS1_OAEP_PADDING`. - * - * Because RSA public keys can be derived from private keys, a private key may - * be passed instead of a public key. - * @since v0.11.14 - */ - function publicEncrypt( - key: RsaPublicKey | RsaPrivateKey | KeyLike, - buffer: NodeJS.ArrayBufferView | string, - ): NonSharedBuffer; - /** - * Decrypts `buffer` with `key`.`buffer` was previously encrypted using - * the corresponding private key, for example using {@link privateEncrypt}. - * - * If `key` is not a `KeyObject`, this function behaves as if `key` had been passed to {@link createPublicKey}. If it is an - * object, the `padding` property can be passed. Otherwise, this function uses `RSA_PKCS1_PADDING`. - * - * Because RSA public keys can be derived from private keys, a private key may - * be passed instead of a public key. - * @since v1.1.0 - */ - function publicDecrypt( - key: RsaPublicKey | RsaPrivateKey | KeyLike, - buffer: NodeJS.ArrayBufferView | string, - ): NonSharedBuffer; - /** - * Decrypts `buffer` with `privateKey`. `buffer` was previously encrypted using - * the corresponding public key, for example using {@link publicEncrypt}. - * - * If `privateKey` is not a `KeyObject`, this function behaves as if `privateKey` had been passed to {@link createPrivateKey}. If it is an - * object, the `padding` property can be passed. Otherwise, this function uses `RSA_PKCS1_OAEP_PADDING`. - * @since v0.11.14 - */ - function privateDecrypt( - privateKey: RsaPrivateKey | KeyLike, - buffer: NodeJS.ArrayBufferView | string, - ): NonSharedBuffer; - /** - * Encrypts `buffer` with `privateKey`. The returned data can be decrypted using - * the corresponding public key, for example using {@link publicDecrypt}. - * - * If `privateKey` is not a `KeyObject`, this function behaves as if `privateKey` had been passed to {@link createPrivateKey}. If it is an - * object, the `padding` property can be passed. Otherwise, this function uses `RSA_PKCS1_PADDING`. - * @since v1.1.0 - */ - function privateEncrypt( - privateKey: RsaPrivateKey | KeyLike, - buffer: NodeJS.ArrayBufferView | string, - ): NonSharedBuffer; - /** - * ```js - * const { - * getCiphers, - * } = await import('node:crypto'); - * - * console.log(getCiphers()); // ['aes-128-cbc', 'aes-128-ccm', ...] - * ``` - * @since v0.9.3 - * @return An array with the names of the supported cipher algorithms. - */ - function getCiphers(): string[]; - /** - * ```js - * const { - * getCurves, - * } = await import('node:crypto'); - * - * console.log(getCurves()); // ['Oakley-EC2N-3', 'Oakley-EC2N-4', ...] - * ``` - * @since v2.3.0 - * @return An array with the names of the supported elliptic curves. - */ - function getCurves(): string[]; - /** - * @since v10.0.0 - * @return `1` if and only if a FIPS compliant crypto provider is currently in use, `0` otherwise. A future semver-major release may change the return type of this API to a {boolean}. - */ - function getFips(): 1 | 0; - /** - * Enables the FIPS compliant crypto provider in a FIPS-enabled Node.js build. - * Throws an error if FIPS mode is not available. - * @since v10.0.0 - * @param bool `true` to enable FIPS mode. - */ - function setFips(bool: boolean): void; - /** - * ```js - * const { - * getHashes, - * } = await import('node:crypto'); - * - * console.log(getHashes()); // ['DSA', 'DSA-SHA', 'DSA-SHA1', ...] - * ``` - * @since v0.9.3 - * @return An array of the names of the supported hash algorithms, such as `'RSA-SHA256'`. Hash algorithms are also called "digest" algorithms. - */ - function getHashes(): string[]; - /** - * The `ECDH` class is a utility for creating Elliptic Curve Diffie-Hellman (ECDH) - * key exchanges. - * - * Instances of the `ECDH` class can be created using the {@link createECDH} function. - * - * ```js - * import assert from 'node:assert'; - * - * const { - * createECDH, - * } = await import('node:crypto'); - * - * // Generate Alice's keys... - * const alice = createECDH('secp521r1'); - * const aliceKey = alice.generateKeys(); - * - * // Generate Bob's keys... - * const bob = createECDH('secp521r1'); - * const bobKey = bob.generateKeys(); - * - * // Exchange and generate the secret... - * const aliceSecret = alice.computeSecret(bobKey); - * const bobSecret = bob.computeSecret(aliceKey); - * - * assert.strictEqual(aliceSecret.toString('hex'), bobSecret.toString('hex')); - * // OK - * ``` - * @since v0.11.14 - */ - class ECDH { - private constructor(); - /** - * Converts the EC Diffie-Hellman public key specified by `key` and `curve` to the - * format specified by `format`. The `format` argument specifies point encoding - * and can be `'compressed'`, `'uncompressed'` or `'hybrid'`. The supplied key is - * interpreted using the specified `inputEncoding`, and the returned key is encoded - * using the specified `outputEncoding`. - * - * Use {@link getCurves} to obtain a list of available curve names. - * On recent OpenSSL releases, `openssl ecparam -list_curves` will also display - * the name and description of each available elliptic curve. - * - * If `format` is not specified the point will be returned in `'uncompressed'` format. - * - * If the `inputEncoding` is not provided, `key` is expected to be a `Buffer`, `TypedArray`, or `DataView`. - * - * Example (uncompressing a key): - * - * ```js - * const { - * createECDH, - * ECDH, - * } = await import('node:crypto'); - * - * const ecdh = createECDH('secp256k1'); - * ecdh.generateKeys(); - * - * const compressedKey = ecdh.getPublicKey('hex', 'compressed'); - * - * const uncompressedKey = ECDH.convertKey(compressedKey, - * 'secp256k1', - * 'hex', - * 'hex', - * 'uncompressed'); - * - * // The converted key and the uncompressed public key should be the same - * console.log(uncompressedKey === ecdh.getPublicKey('hex')); - * ``` - * @since v10.0.0 - * @param inputEncoding The `encoding` of the `key` string. - * @param outputEncoding The `encoding` of the return value. - * @param [format='uncompressed'] - */ - static convertKey( - key: BinaryLike, - curve: string, - inputEncoding?: BinaryToTextEncoding, - outputEncoding?: "latin1" | "hex" | "base64" | "base64url", - format?: "uncompressed" | "compressed" | "hybrid", - ): NonSharedBuffer | string; - /** - * Generates private and public EC Diffie-Hellman key values, and returns - * the public key in the specified `format` and `encoding`. This key should be - * transferred to the other party. - * - * The `format` argument specifies point encoding and can be `'compressed'` or `'uncompressed'`. If `format` is not specified, the point will be returned in`'uncompressed'` format. - * - * If `encoding` is provided a string is returned; otherwise a `Buffer` is returned. - * @since v0.11.14 - * @param encoding The `encoding` of the return value. - * @param [format='uncompressed'] - */ - generateKeys(): NonSharedBuffer; - generateKeys(encoding: BinaryToTextEncoding, format?: ECDHKeyFormat): string; - /** - * Computes the shared secret using `otherPublicKey` as the other - * party's public key and returns the computed shared secret. The supplied - * key is interpreted using specified `inputEncoding`, and the returned secret - * is encoded using the specified `outputEncoding`. - * If the `inputEncoding` is not - * provided, `otherPublicKey` is expected to be a `Buffer`, `TypedArray`, or `DataView`. - * - * If `outputEncoding` is given a string will be returned; otherwise a `Buffer` is returned. - * - * `ecdh.computeSecret` will throw an`ERR_CRYPTO_ECDH_INVALID_PUBLIC_KEY` error when `otherPublicKey` lies outside of the elliptic curve. Since `otherPublicKey` is - * usually supplied from a remote user over an insecure network, - * be sure to handle this exception accordingly. - * @since v0.11.14 - * @param inputEncoding The `encoding` of the `otherPublicKey` string. - * @param outputEncoding The `encoding` of the return value. - */ - computeSecret(otherPublicKey: NodeJS.ArrayBufferView): NonSharedBuffer; - computeSecret(otherPublicKey: string, inputEncoding: BinaryToTextEncoding): NonSharedBuffer; - computeSecret(otherPublicKey: NodeJS.ArrayBufferView, outputEncoding: BinaryToTextEncoding): string; - computeSecret( - otherPublicKey: string, - inputEncoding: BinaryToTextEncoding, - outputEncoding: BinaryToTextEncoding, - ): string; - /** - * If `encoding` is specified, a string is returned; otherwise a `Buffer` is - * returned. - * @since v0.11.14 - * @param encoding The `encoding` of the return value. - * @return The EC Diffie-Hellman in the specified `encoding`. - */ - getPrivateKey(): NonSharedBuffer; - getPrivateKey(encoding: BinaryToTextEncoding): string; - /** - * The `format` argument specifies point encoding and can be `'compressed'` or `'uncompressed'`. If `format` is not specified the point will be returned in`'uncompressed'` format. - * - * If `encoding` is specified, a string is returned; otherwise a `Buffer` is - * returned. - * @since v0.11.14 - * @param encoding The `encoding` of the return value. - * @param [format='uncompressed'] - * @return The EC Diffie-Hellman public key in the specified `encoding` and `format`. - */ - getPublicKey(encoding?: null, format?: ECDHKeyFormat): NonSharedBuffer; - getPublicKey(encoding: BinaryToTextEncoding, format?: ECDHKeyFormat): string; - /** - * Sets the EC Diffie-Hellman private key. - * If `encoding` is provided, `privateKey` is expected - * to be a string; otherwise `privateKey` is expected to be a `Buffer`, `TypedArray`, or `DataView`. - * - * If `privateKey` is not valid for the curve specified when the `ECDH` object was - * created, an error is thrown. Upon setting the private key, the associated - * public point (key) is also generated and set in the `ECDH` object. - * @since v0.11.14 - * @param encoding The `encoding` of the `privateKey` string. - */ - setPrivateKey(privateKey: NodeJS.ArrayBufferView): void; - setPrivateKey(privateKey: string, encoding: BinaryToTextEncoding): void; - } - /** - * Creates an Elliptic Curve Diffie-Hellman (`ECDH`) key exchange object using a - * predefined curve specified by the `curveName` string. Use {@link getCurves} to obtain a list of available curve names. On recent - * OpenSSL releases, `openssl ecparam -list_curves` will also display the name - * and description of each available elliptic curve. - * @since v0.11.14 - */ - function createECDH(curveName: string): ECDH; - /** - * This function compares the underlying bytes that represent the given `ArrayBuffer`, `TypedArray`, or `DataView` instances using a constant-time - * algorithm. - * - * This function does not leak timing information that - * would allow an attacker to guess one of the values. This is suitable for - * comparing HMAC digests or secret values like authentication cookies or [capability urls](https://www.w3.org/TR/capability-urls/). - * - * `a` and `b` must both be `Buffer`s, `TypedArray`s, or `DataView`s, and they - * must have the same byte length. An error is thrown if `a` and `b` have - * different byte lengths. - * - * If at least one of `a` and `b` is a `TypedArray` with more than one byte per - * entry, such as `Uint16Array`, the result will be computed using the platform - * byte order. - * - * **When both of the inputs are `Float32Array`s or `Float64Array`s, this function might return unexpected results due to IEEE 754** - * **encoding of floating-point numbers. In particular, neither `x === y` nor `Object.is(x, y)` implies that the byte representations of two floating-point** - * **numbers `x` and `y` are equal.** - * - * Use of `crypto.timingSafeEqual` does not guarantee that the _surrounding_ code - * is timing-safe. Care should be taken to ensure that the surrounding code does - * not introduce timing vulnerabilities. - * @since v6.6.0 - */ - function timingSafeEqual(a: NodeJS.ArrayBufferView, b: NodeJS.ArrayBufferView): boolean; - interface DHKeyPairOptions extends KeyPairExportOptions<"spki", "pkcs8"> { - /** - * The prime parameter - */ - prime?: Buffer | undefined; - /** - * Prime length in bits - */ - primeLength?: number | undefined; - /** - * Custom generator - * @default 2 - */ - generator?: number | undefined; - /** - * Diffie-Hellman group name - * @see {@link getDiffieHellman} - */ - groupName?: string | undefined; - } - interface DSAKeyPairOptions extends KeyPairExportOptions<"spki", "pkcs8"> { - /** - * Key size in bits - */ - modulusLength: number; - /** - * Size of q in bits - */ - divisorLength: number; - } - interface ECKeyPairOptions extends KeyPairExportOptions<"spki", "pkcs8" | "sec1"> { - /** - * Name of the curve to use - */ - namedCurve: string; - /** - * Must be `'named'` or `'explicit'` - * @default 'named' - */ - paramEncoding?: "explicit" | "named" | undefined; - } - interface ED25519KeyPairOptions extends KeyPairExportOptions<"spki", "pkcs8"> {} - interface ED448KeyPairOptions extends KeyPairExportOptions<"spki", "pkcs8"> {} - interface MLDSAKeyPairOptions extends KeyPairExportOptions<"spki", "pkcs8"> {} - interface MLKEMKeyPairOptions extends KeyPairExportOptions<"spki", "pkcs8"> {} - interface RSAPSSKeyPairOptions extends KeyPairExportOptions<"spki", "pkcs8"> { - /** - * Key size in bits - */ - modulusLength: number; - /** - * Public exponent - * @default 0x10001 - */ - publicExponent?: number | undefined; - /** - * Name of the message digest - */ - hashAlgorithm?: string | undefined; - /** - * Name of the message digest used by MGF1 - */ - mgf1HashAlgorithm?: string | undefined; - /** - * Minimal salt length in bytes - */ - saltLength?: string | undefined; - } - interface RSAKeyPairOptions extends KeyPairExportOptions<"pkcs1" | "spki", "pkcs1" | "pkcs8"> { - /** - * Key size in bits - */ - modulusLength: number; - /** - * Public exponent - * @default 0x10001 - */ - publicExponent?: number | undefined; - } - interface SLHDSAKeyPairOptions extends KeyPairExportOptions<"spki", "pkcs8"> {} - interface X25519KeyPairOptions extends KeyPairExportOptions<"spki", "pkcs8"> {} - interface X448KeyPairOptions extends KeyPairExportOptions<"spki", "pkcs8"> {} - /** - * Generates a new asymmetric key pair of the given `type`. RSA, RSA-PSS, DSA, EC, - * Ed25519, Ed448, X25519, X448, DH, and ML-DSA are currently supported. - * - * If a `publicKeyEncoding` or `privateKeyEncoding` was specified, this function - * behaves as if `keyObject.export()` had been called on its result. Otherwise, - * the respective part of the key is returned as a `KeyObject`. - * - * When encoding public keys, it is recommended to use `'spki'`. When encoding - * private keys, it is recommended to use `'pkcs8'` with a strong passphrase, - * and to keep the passphrase confidential. - * - * ```js - * const { - * generateKeyPairSync, - * } = await import('node:crypto'); - * - * const { - * publicKey, - * privateKey, - * } = generateKeyPairSync('rsa', { - * modulusLength: 4096, - * publicKeyEncoding: { - * type: 'spki', - * format: 'pem', - * }, - * privateKeyEncoding: { - * type: 'pkcs8', - * format: 'pem', - * cipher: 'aes-256-cbc', - * passphrase: 'top secret', - * }, - * }); - * ``` - * - * The return value `{ publicKey, privateKey }` represents the generated key pair. - * When PEM encoding was selected, the respective key will be a string, otherwise - * it will be a buffer containing the data encoded as DER. - * @since v10.12.0 - * @param type The asymmetric key type to generate. See the - * supported [asymmetric key types](https://nodejs.org/docs/latest-v25.x/api/crypto.html#asymmetric-key-types). - */ - function generateKeyPairSync( - type: "dh", - options: T, - ): KeyPairExportResult; - function generateKeyPairSync( - type: "dsa", - options: T, - ): KeyPairExportResult; - function generateKeyPairSync( - type: "ec", - options: T, - ): KeyPairExportResult; - function generateKeyPairSync( - type: "ed25519", - options?: T, - ): KeyPairExportResult; - function generateKeyPairSync( - type: "ed448", - options?: T, - ): KeyPairExportResult; - function generateKeyPairSync( - type: MLDSAKeyType, - options?: T, - ): KeyPairExportResult; - function generateKeyPairSync( - type: MLKEMKeyType, - options?: T, - ): KeyPairExportResult; - function generateKeyPairSync( - type: "rsa-pss", - options: T, - ): KeyPairExportResult; - function generateKeyPairSync( - type: "rsa", - options: T, - ): KeyPairExportResult; - function generateKeyPairSync( - type: SLHDSAKeyType, - options?: T, - ): KeyPairExportResult; - function generateKeyPairSync( - type: "x25519", - options?: T, - ): KeyPairExportResult; - function generateKeyPairSync( - type: "x448", - options?: T, - ): KeyPairExportResult; - /** - * Generates a new asymmetric key pair of the given `type`. RSA, RSA-PSS, DSA, EC, - * Ed25519, Ed448, X25519, X448, and DH are currently supported. - * - * If a `publicKeyEncoding` or `privateKeyEncoding` was specified, this function - * behaves as if `keyObject.export()` had been called on its result. Otherwise, - * the respective part of the key is returned as a `KeyObject`. - * - * It is recommended to encode public keys as `'spki'` and private keys as `'pkcs8'` with encryption for long-term storage: - * - * ```js - * const { - * generateKeyPair, - * } = await import('node:crypto'); - * - * generateKeyPair('rsa', { - * modulusLength: 4096, - * publicKeyEncoding: { - * type: 'spki', - * format: 'pem', - * }, - * privateKeyEncoding: { - * type: 'pkcs8', - * format: 'pem', - * cipher: 'aes-256-cbc', - * passphrase: 'top secret', - * }, - * }, (err, publicKey, privateKey) => { - * // Handle errors and use the generated key pair. - * }); - * ``` - * - * On completion, `callback` will be called with `err` set to `undefined` and `publicKey` / `privateKey` representing the generated key pair. - * - * If this method is invoked as its `util.promisify()` ed version, it returns - * a `Promise` for an `Object` with `publicKey` and `privateKey` properties. - * @since v10.12.0 - * @param type The asymmetric key type to generate. See the - * supported [asymmetric key types](https://nodejs.org/docs/latest-v25.x/api/crypto.html#asymmetric-key-types). - */ - function generateKeyPair( - type: "dh", - options: T, - callback: KeyPairExportCallback, - ): void; - function generateKeyPair( - type: "dsa", - options: T, - callback: KeyPairExportCallback, - ): void; - function generateKeyPair( - type: "ec", - options: T, - callback: KeyPairExportCallback, - ): void; - function generateKeyPair( - type: "ed25519", - options: T | undefined, - callback: KeyPairExportCallback, - ): void; - function generateKeyPair( - type: "ed448", - options: T | undefined, - callback: KeyPairExportCallback, - ): void; - function generateKeyPair( - type: MLDSAKeyType, - options: T | undefined, - callback: KeyPairExportCallback, - ): void; - function generateKeyPair( - type: MLKEMKeyType, - options: T | undefined, - callback: KeyPairExportCallback, - ): void; - function generateKeyPair( - type: "rsa-pss", - options: T, - callback: KeyPairExportCallback, - ): void; - function generateKeyPair( - type: "rsa", - options: T, - callback: KeyPairExportCallback, - ): void; - function generateKeyPair( - type: SLHDSAKeyType, - options: T | undefined, - callback: KeyPairExportCallback, - ): void; - function generateKeyPair( - type: "x25519", - options: T | undefined, - callback: KeyPairExportCallback, - ): void; - function generateKeyPair( - type: "x448", - options: T | undefined, - callback: KeyPairExportCallback, - ): void; - namespace generateKeyPair { - function __promisify__( - type: "dh", - options: T, - ): Promise>; - function __promisify__( - type: "dsa", - options: T, - ): Promise>; - function __promisify__( - type: "ec", - options: T, - ): Promise>; - function __promisify__( - type: "ed25519", - options?: T, - ): Promise>; - function __promisify__( - type: "ed448", - options?: T, - ): Promise>; - function __promisify__( - type: MLDSAKeyType, - options?: T, - ): Promise>; - function __promisify__( - type: MLKEMKeyType, - options?: T, - ): Promise>; - function __promisify__( - type: "rsa-pss", - options: T, - ): Promise>; - function __promisify__( - type: "rsa", - options: T, - ): Promise>; - function __promisify__( - type: SLHDSAKeyType, - options?: T, - ): Promise>; - function __promisify__( - type: "x25519", - options?: T, - ): Promise>; - function __promisify__( - type: "x448", - options?: T, - ): Promise>; - } - /** - * Calculates and returns the signature for `data` using the given private key and - * algorithm. If `algorithm` is `null` or `undefined`, then the algorithm is - * dependent upon the key type. - * - * `algorithm` is required to be `null` or `undefined` for Ed25519, Ed448, and - * ML-DSA. - * - * If `key` is not a `KeyObject`, this function behaves as if `key` had been - * passed to {@link createPrivateKey}. If it is an object, the following - * additional properties can be passed: - * - * If the `callback` function is provided this function uses libuv's threadpool. - * @since v12.0.0 - */ - function sign( - algorithm: string | null | undefined, - data: NodeJS.ArrayBufferView, - key: KeyLike | SignKeyObjectInput | SignPrivateKeyInput | SignJsonWebKeyInput, - ): NonSharedBuffer; - function sign( - algorithm: string | null | undefined, - data: NodeJS.ArrayBufferView, - key: KeyLike | SignKeyObjectInput | SignPrivateKeyInput | SignJsonWebKeyInput, - callback: (error: Error | null, data: NonSharedBuffer) => void, - ): void; - /** - * Verifies the given signature for `data` using the given key and algorithm. If - * `algorithm` is `null` or `undefined`, then the algorithm is dependent upon the - * key type. - * - * `algorithm` is required to be `null` or `undefined` for Ed25519, Ed448, and - * ML-DSA. - * - * If `key` is not a `KeyObject`, this function behaves as if `key` had been - * passed to {@link createPublicKey}. If it is an object, the following - * additional properties can be passed: - * - * The `signature` argument is the previously calculated signature for the `data`. - * - * Because public keys can be derived from private keys, a private key or a public - * key may be passed for `key`. - * - * If the `callback` function is provided this function uses libuv's threadpool. - * @since v12.0.0 - */ - function verify( - algorithm: string | null | undefined, - data: NodeJS.ArrayBufferView, - key: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput | VerifyJsonWebKeyInput, - signature: NodeJS.ArrayBufferView, - ): boolean; - function verify( - algorithm: string | null | undefined, - data: NodeJS.ArrayBufferView, - key: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput | VerifyJsonWebKeyInput, - signature: NodeJS.ArrayBufferView, - callback: (error: Error | null, result: boolean) => void, - ): void; - /** - * Key decapsulation using a KEM algorithm with a private key. - * - * Supported key types and their KEM algorithms are: - * - * * `'rsa'` RSA Secret Value Encapsulation - * * `'ec'` DHKEM(P-256, HKDF-SHA256), DHKEM(P-384, HKDF-SHA256), DHKEM(P-521, HKDF-SHA256) - * * `'x25519'` DHKEM(X25519, HKDF-SHA256) - * * `'x448'` DHKEM(X448, HKDF-SHA512) - * * `'ml-kem-512'` ML-KEM - * * `'ml-kem-768'` ML-KEM - * * `'ml-kem-1024'` ML-KEM - * - * If `key` is not a {@link KeyObject}, this function behaves as if `key` had been - * passed to `crypto.createPrivateKey()`. - * - * If the `callback` function is provided this function uses libuv's threadpool. - * @since v24.7.0 - */ - function decapsulate( - key: KeyLike | PrivateKeyInput | JsonWebKeyInput, - ciphertext: ArrayBuffer | NodeJS.ArrayBufferView, - ): NonSharedBuffer; - function decapsulate( - key: KeyLike | PrivateKeyInput | JsonWebKeyInput, - ciphertext: ArrayBuffer | NodeJS.ArrayBufferView, - callback: (err: Error, sharedKey: NonSharedBuffer) => void, - ): void; - /** - * Computes the Diffie-Hellman shared secret based on a `privateKey` and a `publicKey`. - * Both keys must have the same `asymmetricKeyType` and must support either the DH or - * ECDH operation. - * - * If the `callback` function is provided this function uses libuv's threadpool. - * @since v13.9.0, v12.17.0 - */ - function diffieHellman(options: { privateKey: KeyObject; publicKey: KeyObject }): NonSharedBuffer; - function diffieHellman( - options: { privateKey: KeyObject; publicKey: KeyObject }, - callback: (err: Error | null, secret: NonSharedBuffer) => void, - ): void; - /** - * Key encapsulation using a KEM algorithm with a public key. - * - * Supported key types and their KEM algorithms are: - * - * * `'rsa'` RSA Secret Value Encapsulation - * * `'ec'` DHKEM(P-256, HKDF-SHA256), DHKEM(P-384, HKDF-SHA256), DHKEM(P-521, HKDF-SHA256) - * * `'x25519'` DHKEM(X25519, HKDF-SHA256) - * * `'x448'` DHKEM(X448, HKDF-SHA512) - * * `'ml-kem-512'` ML-KEM - * * `'ml-kem-768'` ML-KEM - * * `'ml-kem-1024'` ML-KEM - * - * If `key` is not a {@link KeyObject}, this function behaves as if `key` had been - * passed to `crypto.createPublicKey()`. - * - * If the `callback` function is provided this function uses libuv's threadpool. - * @since v24.7.0 - */ - function encapsulate( - key: KeyLike | PublicKeyInput | JsonWebKeyInput, - ): { sharedKey: NonSharedBuffer; ciphertext: NonSharedBuffer }; - function encapsulate( - key: KeyLike | PublicKeyInput | JsonWebKeyInput, - callback: (err: Error, result: { sharedKey: NonSharedBuffer; ciphertext: NonSharedBuffer }) => void, - ): void; - interface OneShotDigestOptions { - /** - * Encoding used to encode the returned digest. - * @default 'hex' - */ - outputEncoding?: BinaryToTextEncoding | "buffer" | undefined; - /** - * For XOF hash functions such as 'shake256', the outputLength option - * can be used to specify the desired output length in bytes. - */ - outputLength?: number | undefined; - } - interface OneShotDigestOptionsWithStringEncoding extends OneShotDigestOptions { - outputEncoding?: BinaryToTextEncoding | undefined; - } - interface OneShotDigestOptionsWithBufferEncoding extends OneShotDigestOptions { - outputEncoding: "buffer"; - } - /** - * A utility for creating one-shot hash digests of data. It can be faster than - * the object-based `crypto.createHash()` when hashing a smaller amount of data - * (<= 5MB) that's readily available. If the data can be big or if it is streamed, - * it's still recommended to use `crypto.createHash()` instead. - * - * The `algorithm` is dependent on the available algorithms supported by the - * version of OpenSSL on the platform. Examples are `'sha256'`, `'sha512'`, etc. - * On recent releases of OpenSSL, `openssl list -digest-algorithms` will - * display the available digest algorithms. - * - * If `options` is a string, then it specifies the `outputEncoding`. - * - * Example: - * - * ```js - * import crypto from 'node:crypto'; - * import { Buffer } from 'node:buffer'; - * - * // Hashing a string and return the result as a hex-encoded string. - * const string = 'Node.js'; - * // 10b3493287f831e81a438811a1ffba01f8cec4b7 - * console.log(crypto.hash('sha1', string)); - * - * // Encode a base64-encoded string into a Buffer, hash it and return - * // the result as a buffer. - * const base64 = 'Tm9kZS5qcw=='; - * // - * console.log(crypto.hash('sha1', Buffer.from(base64, 'base64'), 'buffer')); - * ``` - * @since v21.7.0, v20.12.0 - * @param data When `data` is a string, it will be encoded as UTF-8 before being hashed. If a different - * input encoding is desired for a string input, user could encode the string - * into a `TypedArray` using either `TextEncoder` or `Buffer.from()` and passing - * the encoded `TypedArray` into this API instead. - */ - function hash( - algorithm: string, - data: BinaryLike, - options?: OneShotDigestOptionsWithStringEncoding | BinaryToTextEncoding, - ): string; - function hash( - algorithm: string, - data: BinaryLike, - options: OneShotDigestOptionsWithBufferEncoding | "buffer", - ): NonSharedBuffer; - function hash( - algorithm: string, - data: BinaryLike, - options: OneShotDigestOptions | BinaryToTextEncoding | "buffer", - ): string | NonSharedBuffer; - type CipherMode = "cbc" | "ccm" | "cfb" | "ctr" | "ecb" | "gcm" | "ocb" | "ofb" | "stream" | "wrap" | "xts"; - interface CipherInfoOptions { - /** - * A test key length. - */ - keyLength?: number | undefined; - /** - * A test IV length. - */ - ivLength?: number | undefined; - } - interface CipherInfo { - /** - * The name of the cipher. - */ - name: string; - /** - * The nid of the cipher. - */ - nid: number; - /** - * The block size of the cipher in bytes. - * This property is omitted when mode is 'stream'. - */ - blockSize?: number | undefined; - /** - * The expected or default initialization vector length in bytes. - * This property is omitted if the cipher does not use an initialization vector. - */ - ivLength?: number | undefined; - /** - * The expected or default key length in bytes. - */ - keyLength: number; - /** - * The cipher mode. - */ - mode: CipherMode; - } - /** - * Returns information about a given cipher. - * - * Some ciphers accept variable length keys and initialization vectors. By default, - * the `crypto.getCipherInfo()` method will return the default values for these - * ciphers. To test if a given key length or iv length is acceptable for given - * cipher, use the `keyLength` and `ivLength` options. If the given values are - * unacceptable, `undefined` will be returned. - * @since v15.0.0 - * @param nameOrNid The name or nid of the cipher to query. - */ - function getCipherInfo(nameOrNid: string | number, options?: CipherInfoOptions): CipherInfo | undefined; - /** - * HKDF is a simple key derivation function defined in RFC 5869\. The given `ikm`, `salt` and `info` are used with the `digest` to derive a key of `keylen` bytes. - * - * The supplied `callback` function is called with two arguments: `err` and `derivedKey`. If an errors occurs while deriving the key, `err` will be set; - * otherwise `err` will be `null`. The successfully generated `derivedKey` will - * be passed to the callback as an [ArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer). An error will be thrown if any - * of the input arguments specify invalid values or types. - * - * ```js - * import { Buffer } from 'node:buffer'; - * const { - * hkdf, - * } = await import('node:crypto'); - * - * hkdf('sha512', 'key', 'salt', 'info', 64, (err, derivedKey) => { - * if (err) throw err; - * console.log(Buffer.from(derivedKey).toString('hex')); // '24156e2...5391653' - * }); - * ``` - * @since v15.0.0 - * @param digest The digest algorithm to use. - * @param ikm The input keying material. Must be provided but can be zero-length. - * @param salt The salt value. Must be provided but can be zero-length. - * @param info Additional info value. Must be provided but can be zero-length, and cannot be more than 1024 bytes. - * @param keylen The length of the key to generate. Must be greater than 0. The maximum allowable value is `255` times the number of bytes produced by the selected digest function (e.g. `sha512` - * generates 64-byte hashes, making the maximum HKDF output 16320 bytes). - */ - function hkdf( - digest: string, - irm: BinaryLike | KeyObject, - salt: BinaryLike, - info: BinaryLike, - keylen: number, - callback: (err: Error | null, derivedKey: ArrayBuffer) => void, - ): void; - /** - * Provides a synchronous HKDF key derivation function as defined in RFC 5869\. The - * given `ikm`, `salt` and `info` are used with the `digest` to derive a key of `keylen` bytes. - * - * The successfully generated `derivedKey` will be returned as an [ArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer). - * - * An error will be thrown if any of the input arguments specify invalid values or - * types, or if the derived key cannot be generated. - * - * ```js - * import { Buffer } from 'node:buffer'; - * const { - * hkdfSync, - * } = await import('node:crypto'); - * - * const derivedKey = hkdfSync('sha512', 'key', 'salt', 'info', 64); - * console.log(Buffer.from(derivedKey).toString('hex')); // '24156e2...5391653' - * ``` - * @since v15.0.0 - * @param digest The digest algorithm to use. - * @param ikm The input keying material. Must be provided but can be zero-length. - * @param salt The salt value. Must be provided but can be zero-length. - * @param info Additional info value. Must be provided but can be zero-length, and cannot be more than 1024 bytes. - * @param keylen The length of the key to generate. Must be greater than 0. The maximum allowable value is `255` times the number of bytes produced by the selected digest function (e.g. `sha512` - * generates 64-byte hashes, making the maximum HKDF output 16320 bytes). - */ - function hkdfSync( - digest: string, - ikm: BinaryLike | KeyObject, - salt: BinaryLike, - info: BinaryLike, - keylen: number, - ): ArrayBuffer; - interface SecureHeapUsage { - /** - * The total allocated secure heap size as specified using the `--secure-heap=n` command-line flag. - */ - total: number; - /** - * The minimum allocation from the secure heap as specified using the `--secure-heap-min` command-line flag. - */ - min: number; - /** - * The total number of bytes currently allocated from the secure heap. - */ - used: number; - /** - * The calculated ratio of `used` to `total` allocated bytes. - */ - utilization: number; - } - /** - * @since v15.6.0 - */ - function secureHeapUsed(): SecureHeapUsage; - interface RandomUUIDOptions { - /** - * By default, to improve performance, - * Node.js will pre-emptively generate and persistently cache enough - * random data to generate up to 128 random UUIDs. To generate a UUID - * without using the cache, set `disableEntropyCache` to `true`. - * - * @default `false` - */ - disableEntropyCache?: boolean | undefined; - } - type UUID = `${string}-${string}-${string}-${string}-${string}`; - /** - * Generates a random [RFC 4122](https://www.rfc-editor.org/rfc/rfc4122.txt) version 4 UUID. The UUID is generated using a - * cryptographic pseudorandom number generator. - * @since v15.6.0, v14.17.0 - */ - function randomUUID(options?: RandomUUIDOptions): UUID; - interface X509CheckOptions { - /** - * @default 'always' - */ - subject?: "always" | "default" | "never" | undefined; - /** - * @default true - */ - wildcards?: boolean | undefined; - /** - * @default true - */ - partialWildcards?: boolean | undefined; - /** - * @default false - */ - multiLabelWildcards?: boolean | undefined; - /** - * @default false - */ - singleLabelSubdomains?: boolean | undefined; - } - /** - * Encapsulates an X509 certificate and provides read-only access to - * its information. - * - * ```js - * const { X509Certificate } = await import('node:crypto'); - * - * const x509 = new X509Certificate('{... pem encoded cert ...}'); - * - * console.log(x509.subject); - * ``` - * @since v15.6.0 - */ - class X509Certificate { - /** - * Will be \`true\` if this is a Certificate Authority (CA) certificate. - * @since v15.6.0 - */ - readonly ca: boolean; - /** - * The SHA-1 fingerprint of this certificate. - * - * Because SHA-1 is cryptographically broken and because the security of SHA-1 is - * significantly worse than that of algorithms that are commonly used to sign - * certificates, consider using `x509.fingerprint256` instead. - * @since v15.6.0 - */ - readonly fingerprint: string; - /** - * The SHA-256 fingerprint of this certificate. - * @since v15.6.0 - */ - readonly fingerprint256: string; - /** - * The SHA-512 fingerprint of this certificate. - * - * Because computing the SHA-256 fingerprint is usually faster and because it is - * only half the size of the SHA-512 fingerprint, `x509.fingerprint256` may be - * a better choice. While SHA-512 presumably provides a higher level of security in - * general, the security of SHA-256 matches that of most algorithms that are - * commonly used to sign certificates. - * @since v17.2.0, v16.14.0 - */ - readonly fingerprint512: string; - /** - * The complete subject of this certificate. - * @since v15.6.0 - */ - readonly subject: string; - /** - * The subject alternative name specified for this certificate. - * - * This is a comma-separated list of subject alternative names. Each entry begins - * with a string identifying the kind of the subject alternative name followed by - * a colon and the value associated with the entry. - * - * Earlier versions of Node.js incorrectly assumed that it is safe to split this - * property at the two-character sequence `', '` (see [CVE-2021-44532](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-44532)). However, - * both malicious and legitimate certificates can contain subject alternative names - * that include this sequence when represented as a string. - * - * After the prefix denoting the type of the entry, the remainder of each entry - * might be enclosed in quotes to indicate that the value is a JSON string literal. - * For backward compatibility, Node.js only uses JSON string literals within this - * property when necessary to avoid ambiguity. Third-party code should be prepared - * to handle both possible entry formats. - * @since v15.6.0 - */ - readonly subjectAltName: string | undefined; - /** - * A textual representation of the certificate's authority information access - * extension. - * - * This is a line feed separated list of access descriptions. Each line begins with - * the access method and the kind of the access location, followed by a colon and - * the value associated with the access location. - * - * After the prefix denoting the access method and the kind of the access location, - * the remainder of each line might be enclosed in quotes to indicate that the - * value is a JSON string literal. For backward compatibility, Node.js only uses - * JSON string literals within this property when necessary to avoid ambiguity. - * Third-party code should be prepared to handle both possible entry formats. - * @since v15.6.0 - */ - readonly infoAccess: string | undefined; - /** - * An array detailing the key usages for this certificate. - * @since v15.6.0 - */ - readonly keyUsage: string[]; - /** - * The issuer identification included in this certificate. - * @since v15.6.0 - */ - readonly issuer: string; - /** - * The issuer certificate or `undefined` if the issuer certificate is not - * available. - * @since v15.9.0 - */ - readonly issuerCertificate: X509Certificate | undefined; - /** - * The public key `KeyObject` for this certificate. - * @since v15.6.0 - */ - readonly publicKey: KeyObject; - /** - * A `Buffer` containing the DER encoding of this certificate. - * @since v15.6.0 - */ - readonly raw: NonSharedBuffer; - /** - * The serial number of this certificate. - * - * Serial numbers are assigned by certificate authorities and do not uniquely - * identify certificates. Consider using `x509.fingerprint256` as a unique - * identifier instead. - * @since v15.6.0 - */ - readonly serialNumber: string; - /** - * The algorithm used to sign the certificate or `undefined` if the signature algorithm is unknown by OpenSSL. - * @since v24.9.0 - */ - readonly signatureAlgorithm: string | undefined; - /** - * The OID of the algorithm used to sign the certificate. - * @since v24.9.0 - */ - readonly signatureAlgorithmOid: string; - /** - * The date/time from which this certificate is considered valid. - * @since v15.6.0 - */ - readonly validFrom: string; - /** - * The date/time from which this certificate is valid, encapsulated in a `Date` object. - * @since v22.10.0 - */ - readonly validFromDate: Date; - /** - * The date/time until which this certificate is considered valid. - * @since v15.6.0 - */ - readonly validTo: string; - /** - * The date/time until which this certificate is valid, encapsulated in a `Date` object. - * @since v22.10.0 - */ - readonly validToDate: Date; - constructor(buffer: BinaryLike); - /** - * Checks whether the certificate matches the given email address. - * - * If the `'subject'` option is undefined or set to `'default'`, the certificate - * subject is only considered if the subject alternative name extension either does - * not exist or does not contain any email addresses. - * - * If the `'subject'` option is set to `'always'` and if the subject alternative - * name extension either does not exist or does not contain a matching email - * address, the certificate subject is considered. - * - * If the `'subject'` option is set to `'never'`, the certificate subject is never - * considered, even if the certificate contains no subject alternative names. - * @since v15.6.0 - * @return Returns `email` if the certificate matches, `undefined` if it does not. - */ - checkEmail(email: string, options?: Pick): string | undefined; - /** - * Checks whether the certificate matches the given host name. - * - * If the certificate matches the given host name, the matching subject name is - * returned. The returned name might be an exact match (e.g., `foo.example.com`) - * or it might contain wildcards (e.g., `*.example.com`). Because host name - * comparisons are case-insensitive, the returned subject name might also differ - * from the given `name` in capitalization. - * - * If the `'subject'` option is undefined or set to `'default'`, the certificate - * subject is only considered if the subject alternative name extension either does - * not exist or does not contain any DNS names. This behavior is consistent with [RFC 2818](https://www.rfc-editor.org/rfc/rfc2818.txt) ("HTTP Over TLS"). - * - * If the `'subject'` option is set to `'always'` and if the subject alternative - * name extension either does not exist or does not contain a matching DNS name, - * the certificate subject is considered. - * - * If the `'subject'` option is set to `'never'`, the certificate subject is never - * considered, even if the certificate contains no subject alternative names. - * @since v15.6.0 - * @return Returns a subject name that matches `name`, or `undefined` if no subject name matches `name`. - */ - checkHost(name: string, options?: X509CheckOptions): string | undefined; - /** - * Checks whether the certificate matches the given IP address (IPv4 or IPv6). - * - * Only [RFC 5280](https://www.rfc-editor.org/rfc/rfc5280.txt) `iPAddress` subject alternative names are considered, and they - * must match the given `ip` address exactly. Other subject alternative names as - * well as the subject field of the certificate are ignored. - * @since v15.6.0 - * @return Returns `ip` if the certificate matches, `undefined` if it does not. - */ - checkIP(ip: string): string | undefined; - /** - * Checks whether this certificate was potentially issued by the given `otherCert` - * by comparing the certificate metadata. - * - * This is useful for pruning a list of possible issuer certificates which have been - * selected using a more rudimentary filtering routine, i.e. just based on subject - * and issuer names. - * - * Finally, to verify that this certificate's signature was produced by a private key - * corresponding to `otherCert`'s public key use `x509.verify(publicKey)` - * with `otherCert`'s public key represented as a `KeyObject` - * like so - * - * ```js - * if (!x509.verify(otherCert.publicKey)) { - * throw new Error('otherCert did not issue x509'); - * } - * ``` - * @since v15.6.0 - */ - checkIssued(otherCert: X509Certificate): boolean; - /** - * Checks whether the public key for this certificate is consistent with - * the given private key. - * @since v15.6.0 - * @param privateKey A private key. - */ - checkPrivateKey(privateKey: KeyObject): boolean; - /** - * There is no standard JSON encoding for X509 certificates. The`toJSON()` method returns a string containing the PEM encoded - * certificate. - * @since v15.6.0 - */ - toJSON(): string; - /** - * Returns information about this certificate using the legacy `certificate object` encoding. - * @since v15.6.0 - */ - toLegacyObject(): PeerCertificate; - /** - * Returns the PEM-encoded certificate. - * @since v15.6.0 - */ - toString(): string; - /** - * Verifies that this certificate was signed by the given public key. - * Does not perform any other validation checks on the certificate. - * @since v15.6.0 - * @param publicKey A public key. - */ - verify(publicKey: KeyObject): boolean; - } - type LargeNumberLike = NodeJS.ArrayBufferView | SharedArrayBuffer | ArrayBuffer | bigint; - interface GeneratePrimeOptions { - add?: LargeNumberLike | undefined; - rem?: LargeNumberLike | undefined; - /** - * @default false - */ - safe?: boolean | undefined; - bigint?: boolean | undefined; - } - interface GeneratePrimeOptionsBigInt extends GeneratePrimeOptions { - bigint: true; - } - interface GeneratePrimeOptionsArrayBuffer extends GeneratePrimeOptions { - bigint?: false | undefined; - } - /** - * Generates a pseudorandom prime of `size` bits. - * - * If `options.safe` is `true`, the prime will be a safe prime -- that is, `(prime - 1) / 2` will also be a prime. - * - * The `options.add` and `options.rem` parameters can be used to enforce additional - * requirements, e.g., for Diffie-Hellman: - * - * * If `options.add` and `options.rem` are both set, the prime will satisfy the - * condition that `prime % add = rem`. - * * If only `options.add` is set and `options.safe` is not `true`, the prime will - * satisfy the condition that `prime % add = 1`. - * * If only `options.add` is set and `options.safe` is set to `true`, the prime - * will instead satisfy the condition that `prime % add = 3`. This is necessary - * because `prime % add = 1` for `options.add > 2` would contradict the condition - * enforced by `options.safe`. - * * `options.rem` is ignored if `options.add` is not given. - * - * Both `options.add` and `options.rem` must be encoded as big-endian sequences - * if given as an `ArrayBuffer`, `SharedArrayBuffer`, `TypedArray`, `Buffer`, or `DataView`. - * - * By default, the prime is encoded as a big-endian sequence of octets - * in an [ArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer). If the `bigint` option is `true`, then a - * [bigint](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt) is provided. - * @since v15.8.0 - * @param size The size (in bits) of the prime to generate. - */ - function generatePrime(size: number, callback: (err: Error | null, prime: ArrayBuffer) => void): void; - function generatePrime( - size: number, - options: GeneratePrimeOptionsBigInt, - callback: (err: Error | null, prime: bigint) => void, - ): void; - function generatePrime( - size: number, - options: GeneratePrimeOptionsArrayBuffer, - callback: (err: Error | null, prime: ArrayBuffer) => void, - ): void; - function generatePrime( - size: number, - options: GeneratePrimeOptions, - callback: (err: Error | null, prime: ArrayBuffer | bigint) => void, - ): void; - /** - * Generates a pseudorandom prime of `size` bits. - * - * If `options.safe` is `true`, the prime will be a safe prime -- that is, `(prime - 1) / 2` will also be a prime. - * - * The `options.add` and `options.rem` parameters can be used to enforce additional - * requirements, e.g., for Diffie-Hellman: - * - * * If `options.add` and `options.rem` are both set, the prime will satisfy the - * condition that `prime % add = rem`. - * * If only `options.add` is set and `options.safe` is not `true`, the prime will - * satisfy the condition that `prime % add = 1`. - * * If only `options.add` is set and `options.safe` is set to `true`, the prime - * will instead satisfy the condition that `prime % add = 3`. This is necessary - * because `prime % add = 1` for `options.add > 2` would contradict the condition - * enforced by `options.safe`. - * * `options.rem` is ignored if `options.add` is not given. - * - * Both `options.add` and `options.rem` must be encoded as big-endian sequences - * if given as an `ArrayBuffer`, `SharedArrayBuffer`, `TypedArray`, `Buffer`, or `DataView`. - * - * By default, the prime is encoded as a big-endian sequence of octets - * in an [ArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer). If the `bigint` option is `true`, then a - * [bigint](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt) is provided. - * @since v15.8.0 - * @param size The size (in bits) of the prime to generate. - */ - function generatePrimeSync(size: number): ArrayBuffer; - function generatePrimeSync(size: number, options: GeneratePrimeOptionsBigInt): bigint; - function generatePrimeSync(size: number, options: GeneratePrimeOptionsArrayBuffer): ArrayBuffer; - function generatePrimeSync(size: number, options: GeneratePrimeOptions): ArrayBuffer | bigint; - interface CheckPrimeOptions { - /** - * The number of Miller-Rabin probabilistic primality iterations to perform. - * When the value is 0 (zero), a number of checks is used that yields a false positive rate of at most `2**-64` for random input. - * Care must be used when selecting a number of checks. - * Refer to the OpenSSL documentation for the BN_is_prime_ex function nchecks options for more details. - * - * @default 0 - */ - checks?: number | undefined; - } - /** - * Checks the primality of the `candidate`. - * @since v15.8.0 - * @param candidate A possible prime encoded as a sequence of big endian octets of arbitrary length. - */ - function checkPrime(value: LargeNumberLike, callback: (err: Error | null, result: boolean) => void): void; - function checkPrime( - value: LargeNumberLike, - options: CheckPrimeOptions, - callback: (err: Error | null, result: boolean) => void, - ): void; - /** - * Checks the primality of the `candidate`. - * @since v15.8.0 - * @param candidate A possible prime encoded as a sequence of big endian octets of arbitrary length. - * @return `true` if the candidate is a prime with an error probability less than `0.25 ** options.checks`. - */ - function checkPrimeSync(candidate: LargeNumberLike, options?: CheckPrimeOptions): boolean; - /** - * Load and set the `engine` for some or all OpenSSL functions (selected by flags). - * - * `engine` could be either an id or a path to the engine's shared library. - * - * The optional `flags` argument uses `ENGINE_METHOD_ALL` by default. The `flags` is a bit field taking one of or a mix of the following flags (defined in `crypto.constants`): - * - * * `crypto.constants.ENGINE_METHOD_RSA` - * * `crypto.constants.ENGINE_METHOD_DSA` - * * `crypto.constants.ENGINE_METHOD_DH` - * * `crypto.constants.ENGINE_METHOD_RAND` - * * `crypto.constants.ENGINE_METHOD_EC` - * * `crypto.constants.ENGINE_METHOD_CIPHERS` - * * `crypto.constants.ENGINE_METHOD_DIGESTS` - * * `crypto.constants.ENGINE_METHOD_PKEY_METHS` - * * `crypto.constants.ENGINE_METHOD_PKEY_ASN1_METHS` - * * `crypto.constants.ENGINE_METHOD_ALL` - * * `crypto.constants.ENGINE_METHOD_NONE` - * @since v0.11.11 - * @param flags - */ - function setEngine(engine: string, flags?: number): void; - /** - * A convenient alias for {@link webcrypto.getRandomValues}. This - * implementation is not compliant with the Web Crypto spec, to write - * web-compatible code use {@link webcrypto.getRandomValues} instead. - * @since v17.4.0 - * @return Returns `typedArray`. - */ - function getRandomValues< - T extends Exclude< - NodeJS.NonSharedTypedArray, - NodeJS.NonSharedFloat16Array | NodeJS.NonSharedFloat32Array | NodeJS.NonSharedFloat64Array - >, - >(typedArray: T): T; - type Argon2Algorithm = "argon2d" | "argon2i" | "argon2id"; - interface Argon2Parameters { - /** - * REQUIRED, this is the password for password hashing applications of Argon2. - */ - message: string | ArrayBuffer | NodeJS.ArrayBufferView; - /** - * REQUIRED, must be at least 8 bytes long. This is the salt for password hashing applications of Argon2. - */ - nonce: string | ArrayBuffer | NodeJS.ArrayBufferView; - /** - * REQUIRED, degree of parallelism determines how many computational chains (lanes) - * can be run. Must be greater than 1 and less than `2**24-1`. - */ - parallelism: number; - /** - * REQUIRED, the length of the key to generate. Must be greater than 4 and - * less than `2**32-1`. - */ - tagLength: number; - /** - * REQUIRED, memory cost in 1KiB blocks. Must be greater than - * `8 * parallelism` and less than `2**32-1`. The actual number of blocks is rounded - * down to the nearest multiple of `4 * parallelism`. - */ - memory: number; - /** - * REQUIRED, number of passes (iterations). Must be greater than 1 and less - * than `2**32-1`. - */ - passes: number; - /** - * OPTIONAL, Random additional input, - * similar to the salt, that should **NOT** be stored with the derived key. This is known as pepper in - * password hashing applications. If used, must have a length not greater than `2**32-1` bytes. - */ - secret?: string | ArrayBuffer | NodeJS.ArrayBufferView | undefined; - /** - * OPTIONAL, Additional data to - * be added to the hash, functionally equivalent to salt or secret, but meant for - * non-random data. If used, must have a length not greater than `2**32-1` bytes. - */ - associatedData?: string | ArrayBuffer | NodeJS.ArrayBufferView | undefined; - } - /** - * Provides an asynchronous [Argon2](https://www.rfc-editor.org/rfc/rfc9106.html) implementation. Argon2 is a password-based - * key derivation function that is designed to be expensive computationally and - * memory-wise in order to make brute-force attacks unrewarding. - * - * The `nonce` should be as unique as possible. It is recommended that a nonce is - * random and at least 16 bytes long. See [NIST SP 800-132](https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-132.pdf) for details. - * - * When passing strings for `message`, `nonce`, `secret` or `associatedData`, please - * consider [caveats when using strings as inputs to cryptographic APIs](https://nodejs.org/docs/latest-v25.x/api/crypto.html#using-strings-as-inputs-to-cryptographic-apis). - * - * The `callback` function is called with two arguments: `err` and `derivedKey`. - * `err` is an exception object when key derivation fails, otherwise `err` is - * `null`. `derivedKey` is passed to the callback as a `Buffer`. - * - * An exception is thrown when any of the input arguments specify invalid values - * or types. - * - * ```js - * const { argon2, randomBytes } = await import('node:crypto'); - * - * const parameters = { - * message: 'password', - * nonce: randomBytes(16), - * parallelism: 4, - * tagLength: 64, - * memory: 65536, - * passes: 3, - * }; - * - * argon2('argon2id', parameters, (err, derivedKey) => { - * if (err) throw err; - * console.log(derivedKey.toString('hex')); // 'af91dad...9520f15' - * }); - * ``` - * @since v24.7.0 - * @param algorithm Variant of Argon2, one of `"argon2d"`, `"argon2i"` or `"argon2id"`. - * @experimental - */ - function argon2( - algorithm: Argon2Algorithm, - parameters: Argon2Parameters, - callback: (err: Error | null, derivedKey: NonSharedBuffer) => void, - ): void; - /** - * Provides a synchronous [Argon2][] implementation. Argon2 is a password-based - * key derivation function that is designed to be expensive computationally and - * memory-wise in order to make brute-force attacks unrewarding. - * - * The `nonce` should be as unique as possible. It is recommended that a nonce is - * random and at least 16 bytes long. See [NIST SP 800-132](https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-132.pdf) for details. - * - * When passing strings for `message`, `nonce`, `secret` or `associatedData`, please - * consider [caveats when using strings as inputs to cryptographic APIs](https://nodejs.org/docs/latest-v25.x/api/crypto.html#using-strings-as-inputs-to-cryptographic-apis). - * - * An exception is thrown when key derivation fails, otherwise the derived key is - * returned as a `Buffer`. - * - * An exception is thrown when any of the input arguments specify invalid values - * or types. - * - * ```js - * const { argon2Sync, randomBytes } = await import('node:crypto'); - * - * const parameters = { - * message: 'password', - * nonce: randomBytes(16), - * parallelism: 4, - * tagLength: 64, - * memory: 65536, - * passes: 3, - * }; - * - * const derivedKey = argon2Sync('argon2id', parameters); - * console.log(derivedKey.toString('hex')); // 'af91dad...9520f15' - * ``` - * @since v24.7.0 - * @experimental - */ - function argon2Sync(algorithm: Argon2Algorithm, parameters: Argon2Parameters): NonSharedBuffer; - /** - * A convenient alias for `crypto.webcrypto.subtle`. - * @since v17.4.0 - */ - const subtle: webcrypto.SubtleCrypto; - /** - * An implementation of the Web Crypto API standard. - * - * See the {@link https://nodejs.org/docs/latest/api/webcrypto.html Web Crypto API documentation} for details. - * @since v15.0.0 - */ - const webcrypto: webcrypto.Crypto; - namespace webcrypto { - type AlgorithmIdentifier = Algorithm | string; - type BigInteger = NodeJS.NonSharedUint8Array; - type KeyFormat = "jwk" | "pkcs8" | "raw" | "raw-public" | "raw-secret" | "raw-seed" | "spki"; - type KeyType = "private" | "public" | "secret"; - type KeyUsage = - | "decapsulateBits" - | "decapsulateKey" - | "decrypt" - | "deriveBits" - | "deriveKey" - | "encapsulateBits" - | "encapsulateKey" - | "encrypt" - | "sign" - | "unwrapKey" - | "verify" - | "wrapKey"; - type HashAlgorithmIdentifier = AlgorithmIdentifier; - type NamedCurve = string; - interface AeadParams extends Algorithm { - additionalData?: NodeJS.BufferSource; - iv: NodeJS.BufferSource; - tagLength: number; - } - interface AesCbcParams extends Algorithm { - iv: NodeJS.BufferSource; - } - interface AesCtrParams extends Algorithm { - counter: NodeJS.BufferSource; - length: number; - } - interface AesDerivedKeyParams extends Algorithm { - length: number; - } - interface AesKeyAlgorithm extends KeyAlgorithm { - length: number; - } - interface AesKeyGenParams extends Algorithm { - length: number; - } - interface Algorithm { - name: string; - } - interface Argon2Params extends Algorithm { - associatedData?: NodeJS.BufferSource; - memory: number; - nonce: NodeJS.BufferSource; - parallelism: number; - passes: number; - secretValue?: NodeJS.BufferSource; - version?: number; - } - interface CShakeParams extends Algorithm { - customization?: NodeJS.BufferSource; - functionName?: NodeJS.BufferSource; - length: number; - } - interface ContextParams extends Algorithm { - context?: NodeJS.BufferSource; - } - interface EcKeyAlgorithm extends KeyAlgorithm { - namedCurve: NamedCurve; - } - interface EcKeyGenParams extends Algorithm { - namedCurve: NamedCurve; - } - interface EcKeyImportParams extends Algorithm { - namedCurve: NamedCurve; - } - interface EcdhKeyDeriveParams extends Algorithm { - public: CryptoKey; - } - interface EcdsaParams extends Algorithm { - hash: HashAlgorithmIdentifier; - } - interface HkdfParams extends Algorithm { - hash: HashAlgorithmIdentifier; - info: NodeJS.BufferSource; - salt: NodeJS.BufferSource; - } - interface HmacImportParams extends Algorithm { - hash: HashAlgorithmIdentifier; - length?: number; - } - interface HmacKeyAlgorithm extends KeyAlgorithm { - hash: KeyAlgorithm; - length: number; - } - interface HmacKeyGenParams extends Algorithm { - hash: HashAlgorithmIdentifier; - length?: number; - } - interface JsonWebKey { - alg?: string; - crv?: string; - d?: string; - dp?: string; - dq?: string; - e?: string; - ext?: boolean; - k?: string; - key_ops?: string[]; - kty?: string; - n?: string; - oth?: RsaOtherPrimesInfo[]; - p?: string; - q?: string; - qi?: string; - use?: string; - x?: string; - y?: string; - } - interface KeyAlgorithm { - name: string; - } - interface KmacImportParams extends Algorithm { - length?: number; - } - interface KmacKeyAlgorithm extends KeyAlgorithm { - length: number; - } - interface KmacKeyGenParams extends Algorithm { - length?: number; - } - interface KmacParams extends Algorithm { - customization?: NodeJS.BufferSource; - length: number; - } - interface Pbkdf2Params extends Algorithm { - hash: HashAlgorithmIdentifier; - iterations: number; - salt: NodeJS.BufferSource; - } - interface RsaHashedImportParams extends Algorithm { - hash: HashAlgorithmIdentifier; - } - interface RsaHashedKeyAlgorithm extends RsaKeyAlgorithm { - hash: KeyAlgorithm; - } - interface RsaHashedKeyGenParams extends RsaKeyGenParams { - hash: HashAlgorithmIdentifier; - } - interface RsaKeyAlgorithm extends KeyAlgorithm { - modulusLength: number; - publicExponent: BigInteger; - } - interface RsaKeyGenParams extends Algorithm { - modulusLength: number; - publicExponent: BigInteger; - } - interface RsaOaepParams extends Algorithm { - label?: NodeJS.BufferSource; - } - interface RsaOtherPrimesInfo { - d?: string; - r?: string; - t?: string; - } - interface RsaPssParams extends Algorithm { - saltLength: number; - } - interface Crypto { - readonly subtle: SubtleCrypto; - getRandomValues< - T extends Exclude< - NodeJS.NonSharedTypedArray, - NodeJS.NonSharedFloat16Array | NodeJS.NonSharedFloat32Array | NodeJS.NonSharedFloat64Array - >, - >( - typedArray: T, - ): T; - randomUUID(): UUID; - } - interface CryptoKey { - readonly algorithm: KeyAlgorithm; - readonly extractable: boolean; - readonly type: KeyType; - readonly usages: KeyUsage[]; - } - interface CryptoKeyPair { - privateKey: CryptoKey; - publicKey: CryptoKey; - } - interface EncapsulatedBits { - sharedKey: ArrayBuffer; - ciphertext: ArrayBuffer; - } - interface EncapsulatedKey { - sharedKey: CryptoKey; - ciphertext: ArrayBuffer; - } - interface SubtleCrypto { - decapsulateBits( - decapsulationAlgorithm: AlgorithmIdentifier, - decapsulationKey: CryptoKey, - ciphertext: NodeJS.BufferSource, - ): Promise; - decapsulateKey( - decapsulationAlgorithm: AlgorithmIdentifier, - decapsulationKey: CryptoKey, - ciphertext: NodeJS.BufferSource, - sharedKeyAlgorithm: AlgorithmIdentifier | HmacImportParams | AesDerivedKeyParams | KmacImportParams, - extractable: boolean, - usages: KeyUsage[], - ): Promise; - decrypt( - algorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AeadParams, - key: CryptoKey, - data: NodeJS.BufferSource, - ): Promise; - deriveBits( - algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params | Argon2Params, - baseKey: CryptoKey, - length?: number | null, - ): Promise; - deriveKey( - algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params | Argon2Params, - baseKey: CryptoKey, - derivedKeyType: AlgorithmIdentifier | AesDerivedKeyParams | HmacImportParams | KmacImportParams, - extractable: boolean, - keyUsages: readonly KeyUsage[], - ): Promise; - digest(algorithm: AlgorithmIdentifier | CShakeParams, data: NodeJS.BufferSource): Promise; - encapsulateBits( - encapsulationAlgorithm: AlgorithmIdentifier, - encapsulationKey: CryptoKey, - ): Promise; - encapsulateKey( - encapsulationAlgorithm: AlgorithmIdentifier, - encapsulationKey: CryptoKey, - sharedKeyAlgorithm: AlgorithmIdentifier | AesDerivedKeyParams | HmacImportParams | KmacImportParams, - extractable: boolean, - usages: KeyUsage[], - ): Promise; - encrypt( - algorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AeadParams, - key: CryptoKey, - data: NodeJS.BufferSource, - ): Promise; - exportKey(format: "jwk", key: CryptoKey): Promise; - exportKey(format: Exclude, key: CryptoKey): Promise; - exportKey(format: KeyFormat, key: CryptoKey): Promise; - generateKey( - algorithm: RsaHashedKeyGenParams | EcKeyGenParams, - extractable: boolean, - keyUsages: KeyUsage[], - ): Promise; - generateKey( - algorithm: AesKeyGenParams | HmacKeyGenParams | Pbkdf2Params | KmacKeyGenParams, - extractable: boolean, - keyUsages: KeyUsage[], - ): Promise; - generateKey( - algorithm: AlgorithmIdentifier, - extractable: boolean, - keyUsages: KeyUsage[], - ): Promise; - getPublicKey(key: CryptoKey, keyUsages: KeyUsage[]): Promise; - importKey( - format: "jwk", - keyData: JsonWebKey, - algorithm: - | AlgorithmIdentifier - | RsaHashedImportParams - | EcKeyImportParams - | HmacImportParams - | AesKeyAlgorithm - | KmacImportParams, - extractable: boolean, - keyUsages: KeyUsage[], - ): Promise; - importKey( - format: Exclude, - keyData: NodeJS.BufferSource, - algorithm: - | AlgorithmIdentifier - | RsaHashedImportParams - | EcKeyImportParams - | HmacImportParams - | AesKeyAlgorithm - | KmacImportParams, - extractable: boolean, - keyUsages: KeyUsage[], - ): Promise; - sign( - algorithm: AlgorithmIdentifier | RsaPssParams | EcdsaParams | ContextParams | KmacParams, - key: CryptoKey, - data: NodeJS.BufferSource, - ): Promise; - unwrapKey( - format: KeyFormat, - wrappedKey: NodeJS.BufferSource, - unwrappingKey: CryptoKey, - unwrapAlgorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AeadParams, - unwrappedKeyAlgorithm: - | AlgorithmIdentifier - | RsaHashedImportParams - | EcKeyImportParams - | HmacImportParams - | AesKeyAlgorithm - | KmacImportParams, - extractable: boolean, - keyUsages: KeyUsage[], - ): Promise; - verify( - algorithm: AlgorithmIdentifier | RsaPssParams | EcdsaParams | ContextParams | KmacParams, - key: CryptoKey, - signature: NodeJS.BufferSource, - data: NodeJS.BufferSource, - ): Promise; - wrapKey( - format: KeyFormat, - key: CryptoKey, - wrappingKey: CryptoKey, - wrapAlgorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AeadParams, - ): Promise; - } - } -} -declare module "crypto" { - export * from "node:crypto"; -} diff --git a/PBandGraphScaffold/node_modules/@types/node/dgram.d.ts b/PBandGraphScaffold/node_modules/@types/node/dgram.d.ts deleted file mode 100644 index 3672e08..0000000 --- a/PBandGraphScaffold/node_modules/@types/node/dgram.d.ts +++ /dev/null @@ -1,564 +0,0 @@ -/** - * The `node:dgram` module provides an implementation of UDP datagram sockets. - * - * ```js - * import dgram from 'node:dgram'; - * - * const server = dgram.createSocket('udp4'); - * - * server.on('error', (err) => { - * console.error(`server error:\n${err.stack}`); - * server.close(); - * }); - * - * server.on('message', (msg, rinfo) => { - * console.log(`server got: ${msg} from ${rinfo.address}:${rinfo.port}`); - * }); - * - * server.on('listening', () => { - * const address = server.address(); - * console.log(`server listening ${address.address}:${address.port}`); - * }); - * - * server.bind(41234); - * // Prints: server listening 0.0.0.0:41234 - * ``` - * @see [source](https://github.com/nodejs/node/blob/v25.x/lib/dgram.js) - */ -declare module "node:dgram" { - import { NonSharedBuffer } from "node:buffer"; - import * as dns from "node:dns"; - import { Abortable, EventEmitter, InternalEventEmitter } from "node:events"; - import { AddressInfo, BlockList } from "node:net"; - interface RemoteInfo { - address: string; - family: "IPv4" | "IPv6"; - port: number; - size: number; - } - interface BindOptions { - port?: number | undefined; - address?: string | undefined; - exclusive?: boolean | undefined; - fd?: number | undefined; - } - type SocketType = "udp4" | "udp6"; - interface SocketOptions extends Abortable { - type: SocketType; - reuseAddr?: boolean | undefined; - reusePort?: boolean | undefined; - /** - * @default false - */ - ipv6Only?: boolean | undefined; - recvBufferSize?: number | undefined; - sendBufferSize?: number | undefined; - lookup?: - | (( - hostname: string, - options: dns.LookupOneOptions, - callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void, - ) => void) - | undefined; - receiveBlockList?: BlockList | undefined; - sendBlockList?: BlockList | undefined; - } - /** - * Creates a `dgram.Socket` object. Once the socket is created, calling `socket.bind()` will instruct the socket to begin listening for datagram - * messages. When `address` and `port` are not passed to `socket.bind()` the - * method will bind the socket to the "all interfaces" address on a random port - * (it does the right thing for both `udp4` and `udp6` sockets). The bound address - * and port can be retrieved using `socket.address().address` and `socket.address().port`. - * - * If the `signal` option is enabled, calling `.abort()` on the corresponding `AbortController` is similar to calling `.close()` on the socket: - * - * ```js - * const controller = new AbortController(); - * const { signal } = controller; - * const server = dgram.createSocket({ type: 'udp4', signal }); - * server.on('message', (msg, rinfo) => { - * console.log(`server got: ${msg} from ${rinfo.address}:${rinfo.port}`); - * }); - * // Later, when you want to close the server. - * controller.abort(); - * ``` - * @since v0.11.13 - * @param options Available options are: - * @param callback Attached as a listener for `'message'` events. Optional. - */ - function createSocket(type: SocketType, callback?: (msg: NonSharedBuffer, rinfo: RemoteInfo) => void): Socket; - function createSocket(options: SocketOptions, callback?: (msg: NonSharedBuffer, rinfo: RemoteInfo) => void): Socket; - interface SocketEventMap { - "close": []; - "connect": []; - "error": [err: Error]; - "listening": []; - "message": [msg: NonSharedBuffer, rinfo: RemoteInfo]; - } - /** - * Encapsulates the datagram functionality. - * - * New instances of `dgram.Socket` are created using {@link createSocket}. - * The `new` keyword is not to be used to create `dgram.Socket` instances. - * @since v0.1.99 - */ - class Socket implements EventEmitter { - /** - * Tells the kernel to join a multicast group at the given `multicastAddress` and `multicastInterface` using the `IP_ADD_MEMBERSHIP` socket option. If the `multicastInterface` argument is not - * specified, the operating system will choose - * one interface and will add membership to it. To add membership to every - * available interface, call `addMembership` multiple times, once per interface. - * - * When called on an unbound socket, this method will implicitly bind to a random - * port, listening on all interfaces. - * - * When sharing a UDP socket across multiple `cluster` workers, the`socket.addMembership()` function must be called only once or an`EADDRINUSE` error will occur: - * - * ```js - * import cluster from 'node:cluster'; - * import dgram from 'node:dgram'; - * - * if (cluster.isPrimary) { - * cluster.fork(); // Works ok. - * cluster.fork(); // Fails with EADDRINUSE. - * } else { - * const s = dgram.createSocket('udp4'); - * s.bind(1234, () => { - * s.addMembership('224.0.0.114'); - * }); - * } - * ``` - * @since v0.6.9 - */ - addMembership(multicastAddress: string, multicastInterface?: string): void; - /** - * Returns an object containing the address information for a socket. - * For UDP sockets, this object will contain `address`, `family`, and `port` properties. - * - * This method throws `EBADF` if called on an unbound socket. - * @since v0.1.99 - */ - address(): AddressInfo; - /** - * For UDP sockets, causes the `dgram.Socket` to listen for datagram - * messages on a named `port` and optional `address`. If `port` is not - * specified or is `0`, the operating system will attempt to bind to a - * random port. If `address` is not specified, the operating system will - * attempt to listen on all addresses. Once binding is complete, a `'listening'` event is emitted and the optional `callback` function is - * called. - * - * Specifying both a `'listening'` event listener and passing a `callback` to the `socket.bind()` method is not harmful but not very - * useful. - * - * A bound datagram socket keeps the Node.js process running to receive - * datagram messages. - * - * If binding fails, an `'error'` event is generated. In rare case (e.g. - * attempting to bind with a closed socket), an `Error` may be thrown. - * - * Example of a UDP server listening on port 41234: - * - * ```js - * import dgram from 'node:dgram'; - * - * const server = dgram.createSocket('udp4'); - * - * server.on('error', (err) => { - * console.error(`server error:\n${err.stack}`); - * server.close(); - * }); - * - * server.on('message', (msg, rinfo) => { - * console.log(`server got: ${msg} from ${rinfo.address}:${rinfo.port}`); - * }); - * - * server.on('listening', () => { - * const address = server.address(); - * console.log(`server listening ${address.address}:${address.port}`); - * }); - * - * server.bind(41234); - * // Prints: server listening 0.0.0.0:41234 - * ``` - * @since v0.1.99 - * @param callback with no parameters. Called when binding is complete. - */ - bind(port?: number, address?: string, callback?: () => void): this; - bind(port?: number, callback?: () => void): this; - bind(callback?: () => void): this; - bind(options: BindOptions, callback?: () => void): this; - /** - * Close the underlying socket and stop listening for data on it. If a callback is - * provided, it is added as a listener for the `'close'` event. - * @since v0.1.99 - * @param callback Called when the socket has been closed. - */ - close(callback?: () => void): this; - /** - * Associates the `dgram.Socket` to a remote address and port. Every - * message sent by this handle is automatically sent to that destination. Also, - * the socket will only receive messages from that remote peer. - * Trying to call `connect()` on an already connected socket will result - * in an `ERR_SOCKET_DGRAM_IS_CONNECTED` exception. If `address` is not - * provided, `'127.0.0.1'` (for `udp4` sockets) or `'::1'` (for `udp6` sockets) - * will be used by default. Once the connection is complete, a `'connect'` event - * is emitted and the optional `callback` function is called. In case of failure, - * the `callback` is called or, failing this, an `'error'` event is emitted. - * @since v12.0.0 - * @param callback Called when the connection is completed or on error. - */ - connect(port: number, address?: string, callback?: () => void): void; - connect(port: number, callback: () => void): void; - /** - * A synchronous function that disassociates a connected `dgram.Socket` from - * its remote address. Trying to call `disconnect()` on an unbound or already - * disconnected socket will result in an `ERR_SOCKET_DGRAM_NOT_CONNECTED` exception. - * @since v12.0.0 - */ - disconnect(): void; - /** - * Instructs the kernel to leave a multicast group at `multicastAddress` using the `IP_DROP_MEMBERSHIP` socket option. This method is automatically called by the - * kernel when the socket is closed or the process terminates, so most apps will - * never have reason to call this. - * - * If `multicastInterface` is not specified, the operating system will attempt to - * drop membership on all valid interfaces. - * @since v0.6.9 - */ - dropMembership(multicastAddress: string, multicastInterface?: string): void; - /** - * This method throws `ERR_SOCKET_BUFFER_SIZE` if called on an unbound socket. - * @since v8.7.0 - * @return the `SO_RCVBUF` socket receive buffer size in bytes. - */ - getRecvBufferSize(): number; - /** - * This method throws `ERR_SOCKET_BUFFER_SIZE` if called on an unbound socket. - * @since v8.7.0 - * @return the `SO_SNDBUF` socket send buffer size in bytes. - */ - getSendBufferSize(): number; - /** - * @since v18.8.0, v16.19.0 - * @return Number of bytes queued for sending. - */ - getSendQueueSize(): number; - /** - * @since v18.8.0, v16.19.0 - * @return Number of send requests currently in the queue awaiting to be processed. - */ - getSendQueueCount(): number; - /** - * By default, binding a socket will cause it to block the Node.js process from - * exiting as long as the socket is open. The `socket.unref()` method can be used - * to exclude the socket from the reference counting that keeps the Node.js - * process active. The `socket.ref()` method adds the socket back to the reference - * counting and restores the default behavior. - * - * Calling `socket.ref()` multiples times will have no additional effect. - * - * The `socket.ref()` method returns a reference to the socket so calls can be - * chained. - * @since v0.9.1 - */ - ref(): this; - /** - * Returns an object containing the `address`, `family`, and `port` of the remote - * endpoint. This method throws an `ERR_SOCKET_DGRAM_NOT_CONNECTED` exception - * if the socket is not connected. - * @since v12.0.0 - */ - remoteAddress(): AddressInfo; - /** - * Broadcasts a datagram on the socket. - * For connectionless sockets, the destination `port` and `address` must be - * specified. Connected sockets, on the other hand, will use their associated - * remote endpoint, so the `port` and `address` arguments must not be set. - * - * The `msg` argument contains the message to be sent. - * Depending on its type, different behavior can apply. If `msg` is a `Buffer`, - * any `TypedArray` or a `DataView`, - * the `offset` and `length` specify the offset within the `Buffer` where the - * message begins and the number of bytes in the message, respectively. - * If `msg` is a `String`, then it is automatically converted to a `Buffer` with `'utf8'` encoding. With messages that - * contain multi-byte characters, `offset` and `length` will be calculated with - * respect to `byte length` and not the character position. - * If `msg` is an array, `offset` and `length` must not be specified. - * - * The `address` argument is a string. If the value of `address` is a host name, - * DNS will be used to resolve the address of the host. If `address` is not - * provided or otherwise nullish, `'127.0.0.1'` (for `udp4` sockets) or `'::1'` (for `udp6` sockets) will be used by default. - * - * If the socket has not been previously bound with a call to `bind`, the socket - * is assigned a random port number and is bound to the "all interfaces" address - * (`'0.0.0.0'` for `udp4` sockets, `'::0'` for `udp6` sockets.) - * - * An optional `callback` function may be specified to as a way of reporting - * DNS errors or for determining when it is safe to reuse the `buf` object. - * DNS lookups delay the time to send for at least one tick of the - * Node.js event loop. - * - * The only way to know for sure that the datagram has been sent is by using a `callback`. If an error occurs and a `callback` is given, the error will be - * passed as the first argument to the `callback`. If a `callback` is not given, - * the error is emitted as an `'error'` event on the `socket` object. - * - * Offset and length are optional but both _must_ be set if either are used. - * They are supported only when the first argument is a `Buffer`, a `TypedArray`, - * or a `DataView`. - * - * This method throws `ERR_SOCKET_BAD_PORT` if called on an unbound socket. - * - * Example of sending a UDP packet to a port on `localhost`; - * - * ```js - * import dgram from 'node:dgram'; - * import { Buffer } from 'node:buffer'; - * - * const message = Buffer.from('Some bytes'); - * const client = dgram.createSocket('udp4'); - * client.send(message, 41234, 'localhost', (err) => { - * client.close(); - * }); - * ``` - * - * Example of sending a UDP packet composed of multiple buffers to a port on`127.0.0.1`; - * - * ```js - * import dgram from 'node:dgram'; - * import { Buffer } from 'node:buffer'; - * - * const buf1 = Buffer.from('Some '); - * const buf2 = Buffer.from('bytes'); - * const client = dgram.createSocket('udp4'); - * client.send([buf1, buf2], 41234, (err) => { - * client.close(); - * }); - * ``` - * - * Sending multiple buffers might be faster or slower depending on the - * application and operating system. Run benchmarks to - * determine the optimal strategy on a case-by-case basis. Generally speaking, - * however, sending multiple buffers is faster. - * - * Example of sending a UDP packet using a socket connected to a port on `localhost`: - * - * ```js - * import dgram from 'node:dgram'; - * import { Buffer } from 'node:buffer'; - * - * const message = Buffer.from('Some bytes'); - * const client = dgram.createSocket('udp4'); - * client.connect(41234, 'localhost', (err) => { - * client.send(message, (err) => { - * client.close(); - * }); - * }); - * ``` - * @since v0.1.99 - * @param msg Message to be sent. - * @param offset Offset in the buffer where the message starts. - * @param length Number of bytes in the message. - * @param port Destination port. - * @param address Destination host name or IP address. - * @param callback Called when the message has been sent. - */ - send( - msg: string | NodeJS.ArrayBufferView | readonly any[], - port?: number, - address?: string, - callback?: (error: Error | null, bytes: number) => void, - ): void; - send( - msg: string | NodeJS.ArrayBufferView | readonly any[], - port?: number, - callback?: (error: Error | null, bytes: number) => void, - ): void; - send( - msg: string | NodeJS.ArrayBufferView | readonly any[], - callback?: (error: Error | null, bytes: number) => void, - ): void; - send( - msg: string | NodeJS.ArrayBufferView, - offset: number, - length: number, - port?: number, - address?: string, - callback?: (error: Error | null, bytes: number) => void, - ): void; - send( - msg: string | NodeJS.ArrayBufferView, - offset: number, - length: number, - port?: number, - callback?: (error: Error | null, bytes: number) => void, - ): void; - send( - msg: string | NodeJS.ArrayBufferView, - offset: number, - length: number, - callback?: (error: Error | null, bytes: number) => void, - ): void; - /** - * Sets or clears the `SO_BROADCAST` socket option. When set to `true`, UDP - * packets may be sent to a local interface's broadcast address. - * - * This method throws `EBADF` if called on an unbound socket. - * @since v0.6.9 - */ - setBroadcast(flag: boolean): void; - /** - * _All references to scope in this section are referring to [IPv6 Zone Indices](https://en.wikipedia.org/wiki/IPv6_address#Scoped_literal_IPv6_addresses), which are defined by [RFC - * 4007](https://tools.ietf.org/html/rfc4007). In string form, an IP_ - * _with a scope index is written as `'IP%scope'` where scope is an interface name_ - * _or interface number._ - * - * Sets the default outgoing multicast interface of the socket to a chosen - * interface or back to system interface selection. The `multicastInterface` must - * be a valid string representation of an IP from the socket's family. - * - * For IPv4 sockets, this should be the IP configured for the desired physical - * interface. All packets sent to multicast on the socket will be sent on the - * interface determined by the most recent successful use of this call. - * - * For IPv6 sockets, `multicastInterface` should include a scope to indicate the - * interface as in the examples that follow. In IPv6, individual `send` calls can - * also use explicit scope in addresses, so only packets sent to a multicast - * address without specifying an explicit scope are affected by the most recent - * successful use of this call. - * - * This method throws `EBADF` if called on an unbound socket. - * - * #### Example: IPv6 outgoing multicast interface - * - * On most systems, where scope format uses the interface name: - * - * ```js - * const socket = dgram.createSocket('udp6'); - * - * socket.bind(1234, () => { - * socket.setMulticastInterface('::%eth1'); - * }); - * ``` - * - * On Windows, where scope format uses an interface number: - * - * ```js - * const socket = dgram.createSocket('udp6'); - * - * socket.bind(1234, () => { - * socket.setMulticastInterface('::%2'); - * }); - * ``` - * - * #### Example: IPv4 outgoing multicast interface - * - * All systems use an IP of the host on the desired physical interface: - * - * ```js - * const socket = dgram.createSocket('udp4'); - * - * socket.bind(1234, () => { - * socket.setMulticastInterface('10.0.0.2'); - * }); - * ``` - * @since v8.6.0 - */ - setMulticastInterface(multicastInterface: string): void; - /** - * Sets or clears the `IP_MULTICAST_LOOP` socket option. When set to `true`, - * multicast packets will also be received on the local interface. - * - * This method throws `EBADF` if called on an unbound socket. - * @since v0.3.8 - */ - setMulticastLoopback(flag: boolean): boolean; - /** - * Sets the `IP_MULTICAST_TTL` socket option. While TTL generally stands for - * "Time to Live", in this context it specifies the number of IP hops that a - * packet is allowed to travel through, specifically for multicast traffic. Each - * router or gateway that forwards a packet decrements the TTL. If the TTL is - * decremented to 0 by a router, it will not be forwarded. - * - * The `ttl` argument may be between 0 and 255\. The default on most systems is `1`. - * - * This method throws `EBADF` if called on an unbound socket. - * @since v0.3.8 - */ - setMulticastTTL(ttl: number): number; - /** - * Sets the `SO_RCVBUF` socket option. Sets the maximum socket receive buffer - * in bytes. - * - * This method throws `ERR_SOCKET_BUFFER_SIZE` if called on an unbound socket. - * @since v8.7.0 - */ - setRecvBufferSize(size: number): void; - /** - * Sets the `SO_SNDBUF` socket option. Sets the maximum socket send buffer - * in bytes. - * - * This method throws `ERR_SOCKET_BUFFER_SIZE` if called on an unbound socket. - * @since v8.7.0 - */ - setSendBufferSize(size: number): void; - /** - * Sets the `IP_TTL` socket option. While TTL generally stands for "Time to Live", - * in this context it specifies the number of IP hops that a packet is allowed to - * travel through. Each router or gateway that forwards a packet decrements the - * TTL. If the TTL is decremented to 0 by a router, it will not be forwarded. - * Changing TTL values is typically done for network probes or when multicasting. - * - * The `ttl` argument may be between 1 and 255\. The default on most systems - * is 64. - * - * This method throws `EBADF` if called on an unbound socket. - * @since v0.1.101 - */ - setTTL(ttl: number): number; - /** - * By default, binding a socket will cause it to block the Node.js process from - * exiting as long as the socket is open. The `socket.unref()` method can be used - * to exclude the socket from the reference counting that keeps the Node.js - * process active, allowing the process to exit even if the socket is still - * listening. - * - * Calling `socket.unref()` multiple times will have no additional effect. - * - * The `socket.unref()` method returns a reference to the socket so calls can be - * chained. - * @since v0.9.1 - */ - unref(): this; - /** - * Tells the kernel to join a source-specific multicast channel at the given `sourceAddress` and `groupAddress`, using the `multicastInterface` with the `IP_ADD_SOURCE_MEMBERSHIP` socket - * option. If the `multicastInterface` argument - * is not specified, the operating system will choose one interface and will add - * membership to it. To add membership to every available interface, call `socket.addSourceSpecificMembership()` multiple times, once per interface. - * - * When called on an unbound socket, this method will implicitly bind to a random - * port, listening on all interfaces. - * @since v13.1.0, v12.16.0 - */ - addSourceSpecificMembership(sourceAddress: string, groupAddress: string, multicastInterface?: string): void; - /** - * Instructs the kernel to leave a source-specific multicast channel at the given `sourceAddress` and `groupAddress` using the `IP_DROP_SOURCE_MEMBERSHIP` socket option. This method is - * automatically called by the kernel when the - * socket is closed or the process terminates, so most apps will never have - * reason to call this. - * - * If `multicastInterface` is not specified, the operating system will attempt to - * drop membership on all valid interfaces. - * @since v13.1.0, v12.16.0 - */ - dropSourceSpecificMembership(sourceAddress: string, groupAddress: string, multicastInterface?: string): void; - /** - * Calls `socket.close()` and returns a promise that fulfills when the socket has closed. - * @since v20.5.0 - */ - [Symbol.asyncDispose](): Promise; - } - interface Socket extends InternalEventEmitter {} -} -declare module "dgram" { - export * from "node:dgram"; -} diff --git a/PBandGraphScaffold/node_modules/@types/node/diagnostics_channel.d.ts b/PBandGraphScaffold/node_modules/@types/node/diagnostics_channel.d.ts deleted file mode 100644 index 206592b..0000000 --- a/PBandGraphScaffold/node_modules/@types/node/diagnostics_channel.d.ts +++ /dev/null @@ -1,576 +0,0 @@ -/** - * The `node:diagnostics_channel` module provides an API to create named channels - * to report arbitrary message data for diagnostics purposes. - * - * It can be accessed using: - * - * ```js - * import diagnostics_channel from 'node:diagnostics_channel'; - * ``` - * - * It is intended that a module writer wanting to report diagnostics messages - * will create one or many top-level channels to report messages through. - * Channels may also be acquired at runtime but it is not encouraged - * due to the additional overhead of doing so. Channels may be exported for - * convenience, but as long as the name is known it can be acquired anywhere. - * - * If you intend for your module to produce diagnostics data for others to - * consume it is recommended that you include documentation of what named - * channels are used along with the shape of the message data. Channel names - * should generally include the module name to avoid collisions with data from - * other modules. - * @since v15.1.0, v14.17.0 - * @see [source](https://github.com/nodejs/node/blob/v25.x/lib/diagnostics_channel.js) - */ -declare module "node:diagnostics_channel" { - import { AsyncLocalStorage } from "node:async_hooks"; - /** - * Check if there are active subscribers to the named channel. This is helpful if - * the message you want to send might be expensive to prepare. - * - * This API is optional but helpful when trying to publish messages from very - * performance-sensitive code. - * - * ```js - * import diagnostics_channel from 'node:diagnostics_channel'; - * - * if (diagnostics_channel.hasSubscribers('my-channel')) { - * // There are subscribers, prepare and publish message - * } - * ``` - * @since v15.1.0, v14.17.0 - * @param name The channel name - * @return If there are active subscribers - */ - function hasSubscribers(name: string | symbol): boolean; - /** - * This is the primary entry-point for anyone wanting to publish to a named - * channel. It produces a channel object which is optimized to reduce overhead at - * publish time as much as possible. - * - * ```js - * import diagnostics_channel from 'node:diagnostics_channel'; - * - * const channel = diagnostics_channel.channel('my-channel'); - * ``` - * @since v15.1.0, v14.17.0 - * @param name The channel name - * @return The named channel object - */ - function channel(name: string | symbol): Channel; - type ChannelListener = (message: unknown, name: string | symbol) => void; - /** - * Register a message handler to subscribe to this channel. This message handler - * will be run synchronously whenever a message is published to the channel. Any - * errors thrown in the message handler will trigger an `'uncaughtException'`. - * - * ```js - * import diagnostics_channel from 'node:diagnostics_channel'; - * - * diagnostics_channel.subscribe('my-channel', (message, name) => { - * // Received data - * }); - * ``` - * @since v18.7.0, v16.17.0 - * @param name The channel name - * @param onMessage The handler to receive channel messages - */ - function subscribe(name: string | symbol, onMessage: ChannelListener): void; - /** - * Remove a message handler previously registered to this channel with {@link subscribe}. - * - * ```js - * import diagnostics_channel from 'node:diagnostics_channel'; - * - * function onMessage(message, name) { - * // Received data - * } - * - * diagnostics_channel.subscribe('my-channel', onMessage); - * - * diagnostics_channel.unsubscribe('my-channel', onMessage); - * ``` - * @since v18.7.0, v16.17.0 - * @param name The channel name - * @param onMessage The previous subscribed handler to remove - * @return `true` if the handler was found, `false` otherwise. - */ - function unsubscribe(name: string | symbol, onMessage: ChannelListener): boolean; - /** - * Creates a `TracingChannel` wrapper for the given `TracingChannel Channels`. If a name is given, the corresponding tracing - * channels will be created in the form of `tracing:${name}:${eventType}` where `eventType` corresponds to the types of `TracingChannel Channels`. - * - * ```js - * import diagnostics_channel from 'node:diagnostics_channel'; - * - * const channelsByName = diagnostics_channel.tracingChannel('my-channel'); - * - * // or... - * - * const channelsByCollection = diagnostics_channel.tracingChannel({ - * start: diagnostics_channel.channel('tracing:my-channel:start'), - * end: diagnostics_channel.channel('tracing:my-channel:end'), - * asyncStart: diagnostics_channel.channel('tracing:my-channel:asyncStart'), - * asyncEnd: diagnostics_channel.channel('tracing:my-channel:asyncEnd'), - * error: diagnostics_channel.channel('tracing:my-channel:error'), - * }); - * ``` - * @since v19.9.0 - * @experimental - * @param nameOrChannels Channel name or object containing all the `TracingChannel Channels` - * @return Collection of channels to trace with - */ - function tracingChannel< - StoreType = unknown, - ContextType extends object = StoreType extends object ? StoreType : object, - >( - nameOrChannels: string | TracingChannelCollection, - ): TracingChannel; - /** - * The class `Channel` represents an individual named channel within the data - * pipeline. It is used to track subscribers and to publish messages when there - * are subscribers present. It exists as a separate object to avoid channel - * lookups at publish time, enabling very fast publish speeds and allowing - * for heavy use while incurring very minimal cost. Channels are created with {@link channel}, constructing a channel directly - * with `new Channel(name)` is not supported. - * @since v15.1.0, v14.17.0 - */ - class Channel { - readonly name: string | symbol; - /** - * Check if there are active subscribers to this channel. This is helpful if - * the message you want to send might be expensive to prepare. - * - * This API is optional but helpful when trying to publish messages from very - * performance-sensitive code. - * - * ```js - * import diagnostics_channel from 'node:diagnostics_channel'; - * - * const channel = diagnostics_channel.channel('my-channel'); - * - * if (channel.hasSubscribers) { - * // There are subscribers, prepare and publish message - * } - * ``` - * @since v15.1.0, v14.17.0 - */ - readonly hasSubscribers: boolean; - private constructor(name: string | symbol); - /** - * Publish a message to any subscribers to the channel. This will trigger - * message handlers synchronously so they will execute within the same context. - * - * ```js - * import diagnostics_channel from 'node:diagnostics_channel'; - * - * const channel = diagnostics_channel.channel('my-channel'); - * - * channel.publish({ - * some: 'message', - * }); - * ``` - * @since v15.1.0, v14.17.0 - * @param message The message to send to the channel subscribers - */ - publish(message: unknown): void; - /** - * Register a message handler to subscribe to this channel. This message handler - * will be run synchronously whenever a message is published to the channel. Any - * errors thrown in the message handler will trigger an `'uncaughtException'`. - * - * ```js - * import diagnostics_channel from 'node:diagnostics_channel'; - * - * const channel = diagnostics_channel.channel('my-channel'); - * - * channel.subscribe((message, name) => { - * // Received data - * }); - * ``` - * @since v15.1.0, v14.17.0 - * @param onMessage The handler to receive channel messages - */ - subscribe(onMessage: ChannelListener): void; - /** - * Remove a message handler previously registered to this channel with `channel.subscribe(onMessage)`. - * - * ```js - * import diagnostics_channel from 'node:diagnostics_channel'; - * - * const channel = diagnostics_channel.channel('my-channel'); - * - * function onMessage(message, name) { - * // Received data - * } - * - * channel.subscribe(onMessage); - * - * channel.unsubscribe(onMessage); - * ``` - * @since v15.1.0, v14.17.0 - * @param onMessage The previous subscribed handler to remove - * @return `true` if the handler was found, `false` otherwise. - */ - unsubscribe(onMessage: ChannelListener): void; - /** - * When `channel.runStores(context, ...)` is called, the given context data - * will be applied to any store bound to the channel. If the store has already been - * bound the previous `transform` function will be replaced with the new one. - * The `transform` function may be omitted to set the given context data as the - * context directly. - * - * ```js - * import diagnostics_channel from 'node:diagnostics_channel'; - * import { AsyncLocalStorage } from 'node:async_hooks'; - * - * const store = new AsyncLocalStorage(); - * - * const channel = diagnostics_channel.channel('my-channel'); - * - * channel.bindStore(store, (data) => { - * return { data }; - * }); - * ``` - * @since v19.9.0 - * @experimental - * @param store The store to which to bind the context data - * @param transform Transform context data before setting the store context - */ - bindStore(store: AsyncLocalStorage, transform?: (context: ContextType) => StoreType): void; - /** - * Remove a message handler previously registered to this channel with `channel.bindStore(store)`. - * - * ```js - * import diagnostics_channel from 'node:diagnostics_channel'; - * import { AsyncLocalStorage } from 'node:async_hooks'; - * - * const store = new AsyncLocalStorage(); - * - * const channel = diagnostics_channel.channel('my-channel'); - * - * channel.bindStore(store); - * channel.unbindStore(store); - * ``` - * @since v19.9.0 - * @experimental - * @param store The store to unbind from the channel. - * @return `true` if the store was found, `false` otherwise. - */ - unbindStore(store: AsyncLocalStorage): boolean; - /** - * Applies the given data to any AsyncLocalStorage instances bound to the channel - * for the duration of the given function, then publishes to the channel within - * the scope of that data is applied to the stores. - * - * If a transform function was given to `channel.bindStore(store)` it will be - * applied to transform the message data before it becomes the context value for - * the store. The prior storage context is accessible from within the transform - * function in cases where context linking is required. - * - * The context applied to the store should be accessible in any async code which - * continues from execution which began during the given function, however - * there are some situations in which `context loss` may occur. - * - * ```js - * import diagnostics_channel from 'node:diagnostics_channel'; - * import { AsyncLocalStorage } from 'node:async_hooks'; - * - * const store = new AsyncLocalStorage(); - * - * const channel = diagnostics_channel.channel('my-channel'); - * - * channel.bindStore(store, (message) => { - * const parent = store.getStore(); - * return new Span(message, parent); - * }); - * channel.runStores({ some: 'message' }, () => { - * store.getStore(); // Span({ some: 'message' }) - * }); - * ``` - * @since v19.9.0 - * @experimental - * @param context Message to send to subscribers and bind to stores - * @param fn Handler to run within the entered storage context - * @param thisArg The receiver to be used for the function call. - * @param args Optional arguments to pass to the function. - */ - runStores( - context: ContextType, - fn: (this: ThisArg, ...args: Args) => Result, - thisArg?: ThisArg, - ...args: Args - ): Result; - } - interface TracingChannelSubscribers { - start: (message: ContextType) => void; - end: ( - message: ContextType & { - error?: unknown; - result?: unknown; - }, - ) => void; - asyncStart: ( - message: ContextType & { - error?: unknown; - result?: unknown; - }, - ) => void; - asyncEnd: ( - message: ContextType & { - error?: unknown; - result?: unknown; - }, - ) => void; - error: ( - message: ContextType & { - error: unknown; - }, - ) => void; - } - interface TracingChannelCollection { - start: Channel; - end: Channel; - asyncStart: Channel; - asyncEnd: Channel; - error: Channel; - } - /** - * The class `TracingChannel` is a collection of `TracingChannel Channels` which - * together express a single traceable action. It is used to formalize and - * simplify the process of producing events for tracing application flow. {@link tracingChannel} is used to construct a `TracingChannel`. As with `Channel` it is recommended to create and reuse a - * single `TracingChannel` at the top-level of the file rather than creating them - * dynamically. - * @since v19.9.0 - * @experimental - */ - class TracingChannel implements TracingChannelCollection { - start: Channel; - end: Channel; - asyncStart: Channel; - asyncEnd: Channel; - error: Channel; - /** - * Helper to subscribe a collection of functions to the corresponding channels. - * This is the same as calling `channel.subscribe(onMessage)` on each channel - * individually. - * - * ```js - * import diagnostics_channel from 'node:diagnostics_channel'; - * - * const channels = diagnostics_channel.tracingChannel('my-channel'); - * - * channels.subscribe({ - * start(message) { - * // Handle start message - * }, - * end(message) { - * // Handle end message - * }, - * asyncStart(message) { - * // Handle asyncStart message - * }, - * asyncEnd(message) { - * // Handle asyncEnd message - * }, - * error(message) { - * // Handle error message - * }, - * }); - * ``` - * @since v19.9.0 - * @experimental - * @param subscribers Set of `TracingChannel Channels` subscribers - */ - subscribe(subscribers: TracingChannelSubscribers): void; - /** - * Helper to unsubscribe a collection of functions from the corresponding channels. - * This is the same as calling `channel.unsubscribe(onMessage)` on each channel - * individually. - * - * ```js - * import diagnostics_channel from 'node:diagnostics_channel'; - * - * const channels = diagnostics_channel.tracingChannel('my-channel'); - * - * channels.unsubscribe({ - * start(message) { - * // Handle start message - * }, - * end(message) { - * // Handle end message - * }, - * asyncStart(message) { - * // Handle asyncStart message - * }, - * asyncEnd(message) { - * // Handle asyncEnd message - * }, - * error(message) { - * // Handle error message - * }, - * }); - * ``` - * @since v19.9.0 - * @experimental - * @param subscribers Set of `TracingChannel Channels` subscribers - * @return `true` if all handlers were successfully unsubscribed, and `false` otherwise. - */ - unsubscribe(subscribers: TracingChannelSubscribers): void; - /** - * Trace a synchronous function call. This will always produce a `start event` and `end event` around the execution and may produce an `error event` if the given function throws an error. - * This will run the given function using `channel.runStores(context, ...)` on the `start` channel which ensures all - * events should have any bound stores set to match this trace context. - * - * To ensure only correct trace graphs are formed, events will only be published if subscribers are present prior to starting the trace. Subscriptions - * which are added after the trace begins will not receive future events from that trace, only future traces will be seen. - * - * ```js - * import diagnostics_channel from 'node:diagnostics_channel'; - * - * const channels = diagnostics_channel.tracingChannel('my-channel'); - * - * channels.traceSync(() => { - * // Do something - * }, { - * some: 'thing', - * }); - * ``` - * @since v19.9.0 - * @experimental - * @param fn Function to wrap a trace around - * @param context Shared object to correlate events through - * @param thisArg The receiver to be used for the function call - * @param args Optional arguments to pass to the function - * @return The return value of the given function - */ - traceSync( - fn: (this: ThisArg, ...args: Args) => Result, - context?: ContextType, - thisArg?: ThisArg, - ...args: Args - ): Result; - /** - * Trace a promise-returning function call. This will always produce a `start event` and `end event` around the synchronous portion of the - * function execution, and will produce an `asyncStart event` and `asyncEnd event` when a promise continuation is reached. It may also - * produce an `error event` if the given function throws an error or the - * returned promise rejects. This will run the given function using `channel.runStores(context, ...)` on the `start` channel which ensures all - * events should have any bound stores set to match this trace context. - * - * To ensure only correct trace graphs are formed, events will only be published if subscribers are present prior to starting the trace. Subscriptions - * which are added after the trace begins will not receive future events from that trace, only future traces will be seen. - * - * ```js - * import diagnostics_channel from 'node:diagnostics_channel'; - * - * const channels = diagnostics_channel.tracingChannel('my-channel'); - * - * channels.tracePromise(async () => { - * // Do something - * }, { - * some: 'thing', - * }); - * ``` - * @since v19.9.0 - * @experimental - * @param fn Promise-returning function to wrap a trace around - * @param context Shared object to correlate trace events through - * @param thisArg The receiver to be used for the function call - * @param args Optional arguments to pass to the function - * @return Chained from promise returned by the given function - */ - tracePromise( - fn: (this: ThisArg, ...args: Args) => Promise, - context?: ContextType, - thisArg?: ThisArg, - ...args: Args - ): Promise; - /** - * Trace a callback-receiving function call. This will always produce a `start event` and `end event` around the synchronous portion of the - * function execution, and will produce a `asyncStart event` and `asyncEnd event` around the callback execution. It may also produce an `error event` if the given function throws an error or - * the returned - * promise rejects. This will run the given function using `channel.runStores(context, ...)` on the `start` channel which ensures all - * events should have any bound stores set to match this trace context. - * - * The `position` will be -1 by default to indicate the final argument should - * be used as the callback. - * - * ```js - * import diagnostics_channel from 'node:diagnostics_channel'; - * - * const channels = diagnostics_channel.tracingChannel('my-channel'); - * - * channels.traceCallback((arg1, callback) => { - * // Do something - * callback(null, 'result'); - * }, 1, { - * some: 'thing', - * }, thisArg, arg1, callback); - * ``` - * - * The callback will also be run with `channel.runStores(context, ...)` which - * enables context loss recovery in some cases. - * - * To ensure only correct trace graphs are formed, events will only be published if subscribers are present prior to starting the trace. Subscriptions - * which are added after the trace begins will not receive future events from that trace, only future traces will be seen. - * - * ```js - * import diagnostics_channel from 'node:diagnostics_channel'; - * import { AsyncLocalStorage } from 'node:async_hooks'; - * - * const channels = diagnostics_channel.tracingChannel('my-channel'); - * const myStore = new AsyncLocalStorage(); - * - * // The start channel sets the initial store data to something - * // and stores that store data value on the trace context object - * channels.start.bindStore(myStore, (data) => { - * const span = new Span(data); - * data.span = span; - * return span; - * }); - * - * // Then asyncStart can restore from that data it stored previously - * channels.asyncStart.bindStore(myStore, (data) => { - * return data.span; - * }); - * ``` - * @since v19.9.0 - * @experimental - * @param fn callback using function to wrap a trace around - * @param position Zero-indexed argument position of expected callback - * @param context Shared object to correlate trace events through - * @param thisArg The receiver to be used for the function call - * @param args Optional arguments to pass to the function - * @return The return value of the given function - */ - traceCallback( - fn: (this: ThisArg, ...args: Args) => Result, - position?: number, - context?: ContextType, - thisArg?: ThisArg, - ...args: Args - ): Result; - /** - * `true` if any of the individual channels has a subscriber, `false` if not. - * - * This is a helper method available on a {@link TracingChannel} instance to check - * if any of the [TracingChannel Channels](https://nodejs.org/api/diagnostics_channel.html#tracingchannel-channels) have subscribers. - * A `true` is returned if any of them have at least one subscriber, a `false` is returned otherwise. - * - * ```js - * const diagnostics_channel = require('node:diagnostics_channel'); - * - * const channels = diagnostics_channel.tracingChannel('my-channel'); - * - * if (channels.hasSubscribers) { - * // Do something - * } - * ``` - * @since v22.0.0, v20.13.0 - */ - readonly hasSubscribers: boolean; - } -} -declare module "diagnostics_channel" { - export * from "node:diagnostics_channel"; -} diff --git a/PBandGraphScaffold/node_modules/@types/node/dns.d.ts b/PBandGraphScaffold/node_modules/@types/node/dns.d.ts deleted file mode 100644 index 80a2272..0000000 --- a/PBandGraphScaffold/node_modules/@types/node/dns.d.ts +++ /dev/null @@ -1,922 +0,0 @@ -/** - * The `node:dns` module enables name resolution. For example, use it to look up IP - * addresses of host names. - * - * Although named for the [Domain Name System (DNS)](https://en.wikipedia.org/wiki/Domain_Name_System), it does not always use the - * DNS protocol for lookups. {@link lookup} uses the operating system - * facilities to perform name resolution. It may not need to perform any network - * communication. To perform name resolution the way other applications on the same - * system do, use {@link lookup}. - * - * ```js - * import dns from 'node:dns'; - * - * dns.lookup('example.org', (err, address, family) => { - * console.log('address: %j family: IPv%s', address, family); - * }); - * // address: "93.184.216.34" family: IPv4 - * ``` - * - * All other functions in the `node:dns` module connect to an actual DNS server to - * perform name resolution. They will always use the network to perform DNS - * queries. These functions do not use the same set of configuration files used by {@link lookup} (e.g. `/etc/hosts`). Use these functions to always perform - * DNS queries, bypassing other name-resolution facilities. - * - * ```js - * import dns from 'node:dns'; - * - * dns.resolve4('archive.org', (err, addresses) => { - * if (err) throw err; - * - * console.log(`addresses: ${JSON.stringify(addresses)}`); - * - * addresses.forEach((a) => { - * dns.reverse(a, (err, hostnames) => { - * if (err) { - * throw err; - * } - * console.log(`reverse for ${a}: ${JSON.stringify(hostnames)}`); - * }); - * }); - * }); - * ``` - * - * See the [Implementation considerations section](https://nodejs.org/docs/latest-v25.x/api/dns.html#implementation-considerations) for more information. - * @see [source](https://github.com/nodejs/node/blob/v25.x/lib/dns.js) - */ -declare module "node:dns" { - // Supported getaddrinfo flags. - /** - * Limits returned address types to the types of non-loopback addresses configured on the system. For example, IPv4 addresses are - * only returned if the current system has at least one IPv4 address configured. - */ - const ADDRCONFIG: number; - /** - * If the IPv6 family was specified, but no IPv6 addresses were found, then return IPv4 mapped IPv6 addresses. It is not supported - * on some operating systems (e.g. FreeBSD 10.1). - */ - const V4MAPPED: number; - /** - * If `dns.V4MAPPED` is specified, return resolved IPv6 addresses as - * well as IPv4 mapped IPv6 addresses. - */ - const ALL: number; - interface LookupOptions { - /** - * The record family. Must be `4`, `6`, or `0`. For backward compatibility reasons, `'IPv4'` and `'IPv6'` are interpreted - * as `4` and `6` respectively. The value 0 indicates that either an IPv4 or IPv6 address is returned. If the value `0` is used - * with `{ all: true } (see below)`, both IPv4 and IPv6 addresses are returned. - * @default 0 - */ - family?: number | "IPv4" | "IPv6" | undefined; - /** - * One or more [supported `getaddrinfo`](https://nodejs.org/docs/latest-v25.x/api/dns.html#supported-getaddrinfo-flags) flags. Multiple flags may be - * passed by bitwise `OR`ing their values. - */ - hints?: number | undefined; - /** - * When `true`, the callback returns all resolved addresses in an array. Otherwise, returns a single address. - * @default false - */ - all?: boolean | undefined; - /** - * When `verbatim`, the resolved addresses are return unsorted. When `ipv4first`, the resolved addresses are sorted - * by placing IPv4 addresses before IPv6 addresses. When `ipv6first`, the resolved addresses are sorted by placing IPv6 - * addresses before IPv4 addresses. Default value is configurable using - * {@link setDefaultResultOrder} or [`--dns-result-order`](https://nodejs.org/docs/latest-v25.x/api/cli.html#--dns-result-orderorder). - * @default `verbatim` (addresses are not reordered) - * @since v22.1.0 - */ - order?: "ipv4first" | "ipv6first" | "verbatim" | undefined; - /** - * When `true`, the callback receives IPv4 and IPv6 addresses in the order the DNS resolver returned them. When `false`, IPv4 - * addresses are placed before IPv6 addresses. This option will be deprecated in favor of `order`. When both are specified, - * `order` has higher precedence. New code should only use `order`. Default value is configurable using {@link setDefaultResultOrder} - * @default true (addresses are not reordered) - * @deprecated Please use `order` option - */ - verbatim?: boolean | undefined; - } - interface LookupOneOptions extends LookupOptions { - all?: false | undefined; - } - interface LookupAllOptions extends LookupOptions { - all: true; - } - interface LookupAddress { - /** - * A string representation of an IPv4 or IPv6 address. - */ - address: string; - /** - * `4` or `6`, denoting the family of `address`, or `0` if the address is not an IPv4 or IPv6 address. `0` is a likely indicator of a - * bug in the name resolution service used by the operating system. - */ - family: number; - } - /** - * Resolves a host name (e.g. `'nodejs.org'`) into the first found A (IPv4) or - * AAAA (IPv6) record. All `option` properties are optional. If `options` is an - * integer, then it must be `4` or `6` – if `options` is `0` or not provided, then - * IPv4 and IPv6 addresses are both returned if found. - * - * With the `all` option set to `true`, the arguments for `callback` change to `(err, addresses)`, with `addresses` being an array of objects with the - * properties `address` and `family`. - * - * On error, `err` is an `Error` object, where `err.code` is the error code. - * Keep in mind that `err.code` will be set to `'ENOTFOUND'` not only when - * the host name does not exist but also when the lookup fails in other ways - * such as no available file descriptors. - * - * `dns.lookup()` does not necessarily have anything to do with the DNS protocol. - * The implementation uses an operating system facility that can associate names - * with addresses and vice versa. This implementation can have subtle but - * important consequences on the behavior of any Node.js program. Please take some - * time to consult the [Implementation considerations section](https://nodejs.org/docs/latest-v25.x/api/dns.html#implementation-considerations) - * before using `dns.lookup()`. - * - * Example usage: - * - * ```js - * import dns from 'node:dns'; - * const options = { - * family: 6, - * hints: dns.ADDRCONFIG | dns.V4MAPPED, - * }; - * dns.lookup('example.com', options, (err, address, family) => - * console.log('address: %j family: IPv%s', address, family)); - * // address: "2606:2800:220:1:248:1893:25c8:1946" family: IPv6 - * - * // When options.all is true, the result will be an Array. - * options.all = true; - * dns.lookup('example.com', options, (err, addresses) => - * console.log('addresses: %j', addresses)); - * // addresses: [{"address":"2606:2800:220:1:248:1893:25c8:1946","family":6}] - * ``` - * - * If this method is invoked as its [util.promisify()](https://nodejs.org/docs/latest-v25.x/api/util.html#utilpromisifyoriginal) ed - * version, and `all` is not set to `true`, it returns a `Promise` for an `Object` with `address` and `family` properties. - * @since v0.1.90 - */ - function lookup( - hostname: string, - family: number, - callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void, - ): void; - function lookup( - hostname: string, - options: LookupOneOptions, - callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void, - ): void; - function lookup( - hostname: string, - options: LookupAllOptions, - callback: (err: NodeJS.ErrnoException | null, addresses: LookupAddress[]) => void, - ): void; - function lookup( - hostname: string, - options: LookupOptions, - callback: (err: NodeJS.ErrnoException | null, address: string | LookupAddress[], family: number) => void, - ): void; - function lookup( - hostname: string, - callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void, - ): void; - namespace lookup { - function __promisify__(hostname: string, options: LookupAllOptions): Promise; - function __promisify__(hostname: string, options?: LookupOneOptions | number): Promise; - function __promisify__(hostname: string, options: LookupOptions): Promise; - } - /** - * Resolves the given `address` and `port` into a host name and service using - * the operating system's underlying `getnameinfo` implementation. - * - * If `address` is not a valid IP address, a `TypeError` will be thrown. - * The `port` will be coerced to a number. If it is not a legal port, a `TypeError` will be thrown. - * - * On an error, `err` is an [`Error`](https://nodejs.org/docs/latest-v25.x/api/errors.html#class-error) object, - * where `err.code` is the error code. - * - * ```js - * import dns from 'node:dns'; - * dns.lookupService('127.0.0.1', 22, (err, hostname, service) => { - * console.log(hostname, service); - * // Prints: localhost ssh - * }); - * ``` - * - * If this method is invoked as its [util.promisify()](https://nodejs.org/docs/latest-v25.x/api/util.html#utilpromisifyoriginal) ed - * version, it returns a `Promise` for an `Object` with `hostname` and `service` properties. - * @since v0.11.14 - */ - function lookupService( - address: string, - port: number, - callback: (err: NodeJS.ErrnoException | null, hostname: string, service: string) => void, - ): void; - namespace lookupService { - function __promisify__( - address: string, - port: number, - ): Promise<{ - hostname: string; - service: string; - }>; - } - interface ResolveOptions { - ttl: boolean; - } - interface ResolveWithTtlOptions extends ResolveOptions { - ttl: true; - } - interface RecordWithTtl { - address: string; - ttl: number; - } - interface AnyARecord extends RecordWithTtl { - type: "A"; - } - interface AnyAaaaRecord extends RecordWithTtl { - type: "AAAA"; - } - interface CaaRecord { - critical: number; - issue?: string | undefined; - issuewild?: string | undefined; - iodef?: string | undefined; - contactemail?: string | undefined; - contactphone?: string | undefined; - } - interface AnyCaaRecord extends CaaRecord { - type: "CAA"; - } - interface MxRecord { - priority: number; - exchange: string; - } - interface AnyMxRecord extends MxRecord { - type: "MX"; - } - interface NaptrRecord { - flags: string; - service: string; - regexp: string; - replacement: string; - order: number; - preference: number; - } - interface AnyNaptrRecord extends NaptrRecord { - type: "NAPTR"; - } - interface SoaRecord { - nsname: string; - hostmaster: string; - serial: number; - refresh: number; - retry: number; - expire: number; - minttl: number; - } - interface AnySoaRecord extends SoaRecord { - type: "SOA"; - } - interface SrvRecord { - priority: number; - weight: number; - port: number; - name: string; - } - interface AnySrvRecord extends SrvRecord { - type: "SRV"; - } - interface TlsaRecord { - certUsage: number; - selector: number; - match: number; - data: ArrayBuffer; - } - interface AnyTlsaRecord extends TlsaRecord { - type: "TLSA"; - } - interface AnyTxtRecord { - type: "TXT"; - entries: string[]; - } - interface AnyNsRecord { - type: "NS"; - value: string; - } - interface AnyPtrRecord { - type: "PTR"; - value: string; - } - interface AnyCnameRecord { - type: "CNAME"; - value: string; - } - type AnyRecord = - | AnyARecord - | AnyAaaaRecord - | AnyCaaRecord - | AnyCnameRecord - | AnyMxRecord - | AnyNaptrRecord - | AnyNsRecord - | AnyPtrRecord - | AnySoaRecord - | AnySrvRecord - | AnyTlsaRecord - | AnyTxtRecord; - /** - * Uses the DNS protocol to resolve a host name (e.g. `'nodejs.org'`) into an array - * of the resource records. The `callback` function has arguments `(err, records)`. When successful, `records` will be an array of resource - * records. The type and structure of individual results varies based on `rrtype`: - * - * - * - * On error, `err` is an [`Error`](https://nodejs.org/docs/latest-v25.x/api/errors.html#class-error) object, - * where `err.code` is one of the `DNS error codes`. - * @since v0.1.27 - * @param hostname Host name to resolve. - * @param [rrtype='A'] Resource record type. - */ - function resolve( - hostname: string, - callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void, - ): void; - function resolve( - hostname: string, - rrtype: "A" | "AAAA" | "CNAME" | "NS" | "PTR", - callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void, - ): void; - function resolve( - hostname: string, - rrtype: "ANY", - callback: (err: NodeJS.ErrnoException | null, addresses: AnyRecord[]) => void, - ): void; - function resolve( - hostname: string, - rrtype: "CAA", - callback: (err: NodeJS.ErrnoException | null, address: CaaRecord[]) => void, - ): void; - function resolve( - hostname: string, - rrtype: "MX", - callback: (err: NodeJS.ErrnoException | null, addresses: MxRecord[]) => void, - ): void; - function resolve( - hostname: string, - rrtype: "NAPTR", - callback: (err: NodeJS.ErrnoException | null, addresses: NaptrRecord[]) => void, - ): void; - function resolve( - hostname: string, - rrtype: "SOA", - callback: (err: NodeJS.ErrnoException | null, addresses: SoaRecord) => void, - ): void; - function resolve( - hostname: string, - rrtype: "SRV", - callback: (err: NodeJS.ErrnoException | null, addresses: SrvRecord[]) => void, - ): void; - function resolve( - hostname: string, - rrtype: "TLSA", - callback: (err: NodeJS.ErrnoException | null, addresses: TlsaRecord[]) => void, - ): void; - function resolve( - hostname: string, - rrtype: "TXT", - callback: (err: NodeJS.ErrnoException | null, addresses: string[][]) => void, - ): void; - function resolve( - hostname: string, - rrtype: string, - callback: ( - err: NodeJS.ErrnoException | null, - addresses: - | string[] - | CaaRecord[] - | MxRecord[] - | NaptrRecord[] - | SoaRecord - | SrvRecord[] - | TlsaRecord[] - | string[][] - | AnyRecord[], - ) => void, - ): void; - namespace resolve { - function __promisify__(hostname: string, rrtype?: "A" | "AAAA" | "CNAME" | "NS" | "PTR"): Promise; - function __promisify__(hostname: string, rrtype: "ANY"): Promise; - function __promisify__(hostname: string, rrtype: "CAA"): Promise; - function __promisify__(hostname: string, rrtype: "MX"): Promise; - function __promisify__(hostname: string, rrtype: "NAPTR"): Promise; - function __promisify__(hostname: string, rrtype: "SOA"): Promise; - function __promisify__(hostname: string, rrtype: "SRV"): Promise; - function __promisify__(hostname: string, rrtype: "TLSA"): Promise; - function __promisify__(hostname: string, rrtype: "TXT"): Promise; - function __promisify__( - hostname: string, - rrtype: string, - ): Promise< - | string[] - | CaaRecord[] - | MxRecord[] - | NaptrRecord[] - | SoaRecord - | SrvRecord[] - | TlsaRecord[] - | string[][] - | AnyRecord[] - >; - } - /** - * Uses the DNS protocol to resolve a IPv4 addresses (`A` records) for the `hostname`. The `addresses` argument passed to the `callback` function - * will contain an array of IPv4 addresses (e.g.`['74.125.79.104', '74.125.79.105', '74.125.79.106']`). - * @since v0.1.16 - * @param hostname Host name to resolve. - */ - function resolve4( - hostname: string, - callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void, - ): void; - function resolve4( - hostname: string, - options: ResolveWithTtlOptions, - callback: (err: NodeJS.ErrnoException | null, addresses: RecordWithTtl[]) => void, - ): void; - function resolve4( - hostname: string, - options: ResolveOptions, - callback: (err: NodeJS.ErrnoException | null, addresses: string[] | RecordWithTtl[]) => void, - ): void; - namespace resolve4 { - function __promisify__(hostname: string): Promise; - function __promisify__(hostname: string, options: ResolveWithTtlOptions): Promise; - function __promisify__(hostname: string, options?: ResolveOptions): Promise; - } - /** - * Uses the DNS protocol to resolve IPv6 addresses (`AAAA` records) for the `hostname`. The `addresses` argument passed to the `callback` function - * will contain an array of IPv6 addresses. - * @since v0.1.16 - * @param hostname Host name to resolve. - */ - function resolve6( - hostname: string, - callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void, - ): void; - function resolve6( - hostname: string, - options: ResolveWithTtlOptions, - callback: (err: NodeJS.ErrnoException | null, addresses: RecordWithTtl[]) => void, - ): void; - function resolve6( - hostname: string, - options: ResolveOptions, - callback: (err: NodeJS.ErrnoException | null, addresses: string[] | RecordWithTtl[]) => void, - ): void; - namespace resolve6 { - function __promisify__(hostname: string): Promise; - function __promisify__(hostname: string, options: ResolveWithTtlOptions): Promise; - function __promisify__(hostname: string, options?: ResolveOptions): Promise; - } - /** - * Uses the DNS protocol to resolve `CNAME` records for the `hostname`. The `addresses` argument passed to the `callback` function - * will contain an array of canonical name records available for the `hostname` (e.g. `['bar.example.com']`). - * @since v0.3.2 - */ - function resolveCname( - hostname: string, - callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void, - ): void; - namespace resolveCname { - function __promisify__(hostname: string): Promise; - } - /** - * Uses the DNS protocol to resolve `CAA` records for the `hostname`. The `addresses` argument passed to the `callback` function - * will contain an array of certification authority authorization records - * available for the `hostname` (e.g. `[{critical: 0, iodef: 'mailto:pki@example.com'}, {critical: 128, issue: 'pki.example.com'}]`). - * @since v15.0.0, v14.17.0 - */ - function resolveCaa( - hostname: string, - callback: (err: NodeJS.ErrnoException | null, records: CaaRecord[]) => void, - ): void; - namespace resolveCaa { - function __promisify__(hostname: string): Promise; - } - /** - * Uses the DNS protocol to resolve mail exchange records (`MX` records) for the `hostname`. The `addresses` argument passed to the `callback` function will - * contain an array of objects containing both a `priority` and `exchange` property (e.g. `[{priority: 10, exchange: 'mx.example.com'}, ...]`). - * @since v0.1.27 - */ - function resolveMx( - hostname: string, - callback: (err: NodeJS.ErrnoException | null, addresses: MxRecord[]) => void, - ): void; - namespace resolveMx { - function __promisify__(hostname: string): Promise; - } - /** - * Uses the DNS protocol to resolve regular expression-based records (`NAPTR` records) for the `hostname`. The `addresses` argument passed to the `callback` function will contain an array of - * objects with the following properties: - * - * * `flags` - * * `service` - * * `regexp` - * * `replacement` - * * `order` - * * `preference` - * - * ```js - * { - * flags: 's', - * service: 'SIP+D2U', - * regexp: '', - * replacement: '_sip._udp.example.com', - * order: 30, - * preference: 100 - * } - * ``` - * @since v0.9.12 - */ - function resolveNaptr( - hostname: string, - callback: (err: NodeJS.ErrnoException | null, addresses: NaptrRecord[]) => void, - ): void; - namespace resolveNaptr { - function __promisify__(hostname: string): Promise; - } - /** - * Uses the DNS protocol to resolve name server records (`NS` records) for the `hostname`. The `addresses` argument passed to the `callback` function will - * contain an array of name server records available for `hostname` (e.g. `['ns1.example.com', 'ns2.example.com']`). - * @since v0.1.90 - */ - function resolveNs( - hostname: string, - callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void, - ): void; - namespace resolveNs { - function __promisify__(hostname: string): Promise; - } - /** - * Uses the DNS protocol to resolve pointer records (`PTR` records) for the `hostname`. The `addresses` argument passed to the `callback` function will - * be an array of strings containing the reply records. - * @since v6.0.0 - */ - function resolvePtr( - hostname: string, - callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void, - ): void; - namespace resolvePtr { - function __promisify__(hostname: string): Promise; - } - /** - * Uses the DNS protocol to resolve a start of authority record (`SOA` record) for - * the `hostname`. The `address` argument passed to the `callback` function will - * be an object with the following properties: - * - * * `nsname` - * * `hostmaster` - * * `serial` - * * `refresh` - * * `retry` - * * `expire` - * * `minttl` - * - * ```js - * { - * nsname: 'ns.example.com', - * hostmaster: 'root.example.com', - * serial: 2013101809, - * refresh: 10000, - * retry: 2400, - * expire: 604800, - * minttl: 3600 - * } - * ``` - * @since v0.11.10 - */ - function resolveSoa( - hostname: string, - callback: (err: NodeJS.ErrnoException | null, address: SoaRecord) => void, - ): void; - namespace resolveSoa { - function __promisify__(hostname: string): Promise; - } - /** - * Uses the DNS protocol to resolve service records (`SRV` records) for the `hostname`. The `addresses` argument passed to the `callback` function will - * be an array of objects with the following properties: - * - * * `priority` - * * `weight` - * * `port` - * * `name` - * - * ```js - * { - * priority: 10, - * weight: 5, - * port: 21223, - * name: 'service.example.com' - * } - * ``` - * @since v0.1.27 - */ - function resolveSrv( - hostname: string, - callback: (err: NodeJS.ErrnoException | null, addresses: SrvRecord[]) => void, - ): void; - namespace resolveSrv { - function __promisify__(hostname: string): Promise; - } - /** - * Uses the DNS protocol to resolve certificate associations (`TLSA` records) for - * the `hostname`. The `records` argument passed to the `callback` function is an - * array of objects with these properties: - * - * * `certUsage` - * * `selector` - * * `match` - * * `data` - * - * ```js - * { - * certUsage: 3, - * selector: 1, - * match: 1, - * data: [ArrayBuffer] - * } - * ``` - * @since v23.9.0, v22.15.0 - */ - function resolveTlsa( - hostname: string, - callback: (err: NodeJS.ErrnoException | null, addresses: TlsaRecord[]) => void, - ): void; - namespace resolveTlsa { - function __promisify__(hostname: string): Promise; - } - /** - * Uses the DNS protocol to resolve text queries (`TXT` records) for the `hostname`. The `records` argument passed to the `callback` function is a - * two-dimensional array of the text records available for `hostname` (e.g.`[ ['v=spf1 ip4:0.0.0.0 ', '~all' ] ]`). Each sub-array contains TXT chunks of - * one record. Depending on the use case, these could be either joined together or - * treated separately. - * @since v0.1.27 - */ - function resolveTxt( - hostname: string, - callback: (err: NodeJS.ErrnoException | null, addresses: string[][]) => void, - ): void; - namespace resolveTxt { - function __promisify__(hostname: string): Promise; - } - /** - * Uses the DNS protocol to resolve all records (also known as `ANY` or `*` query). - * The `ret` argument passed to the `callback` function will be an array containing - * various types of records. Each object has a property `type` that indicates the - * type of the current record. And depending on the `type`, additional properties - * will be present on the object: - * - * - * - * Here is an example of the `ret` object passed to the callback: - * - * ```js - * [ { type: 'A', address: '127.0.0.1', ttl: 299 }, - * { type: 'CNAME', value: 'example.com' }, - * { type: 'MX', exchange: 'alt4.aspmx.l.example.com', priority: 50 }, - * { type: 'NS', value: 'ns1.example.com' }, - * { type: 'TXT', entries: [ 'v=spf1 include:_spf.example.com ~all' ] }, - * { type: 'SOA', - * nsname: 'ns1.example.com', - * hostmaster: 'admin.example.com', - * serial: 156696742, - * refresh: 900, - * retry: 900, - * expire: 1800, - * minttl: 60 } ] - * ``` - * - * DNS server operators may choose not to respond to `ANY` queries. It may be better to call individual methods like {@link resolve4}, {@link resolveMx}, and so on. For more details, see - * [RFC 8482](https://tools.ietf.org/html/rfc8482). - */ - function resolveAny( - hostname: string, - callback: (err: NodeJS.ErrnoException | null, addresses: AnyRecord[]) => void, - ): void; - namespace resolveAny { - function __promisify__(hostname: string): Promise; - } - /** - * Performs a reverse DNS query that resolves an IPv4 or IPv6 address to an - * array of host names. - * - * On error, `err` is an [`Error`](https://nodejs.org/docs/latest-v25.x/api/errors.html#class-error) object, where `err.code` is - * one of the [DNS error codes](https://nodejs.org/docs/latest-v25.x/api/dns.html#error-codes). - * @since v0.1.16 - */ - function reverse( - ip: string, - callback: (err: NodeJS.ErrnoException | null, hostnames: string[]) => void, - ): void; - /** - * Get the default value for `order` in {@link lookup} and [`dnsPromises.lookup()`](https://nodejs.org/docs/latest-v25.x/api/dns.html#dnspromiseslookuphostname-options). - * The value could be: - * - * * `ipv4first`: for `order` defaulting to `ipv4first`. - * * `ipv6first`: for `order` defaulting to `ipv6first`. - * * `verbatim`: for `order` defaulting to `verbatim`. - * @since v18.17.0 - */ - function getDefaultResultOrder(): "ipv4first" | "ipv6first" | "verbatim"; - /** - * Sets the IP address and port of servers to be used when performing DNS - * resolution. The `servers` argument is an array of [RFC 5952](https://tools.ietf.org/html/rfc5952#section-6) formatted - * addresses. If the port is the IANA default DNS port (53) it can be omitted. - * - * ```js - * dns.setServers([ - * '4.4.4.4', - * '[2001:4860:4860::8888]', - * '4.4.4.4:1053', - * '[2001:4860:4860::8888]:1053', - * ]); - * ``` - * - * An error will be thrown if an invalid address is provided. - * - * The `dns.setServers()` method must not be called while a DNS query is in - * progress. - * - * The {@link setServers} method affects only {@link resolve}, `dns.resolve*()` and {@link reverse} (and specifically _not_ {@link lookup}). - * - * This method works much like [resolve.conf](https://man7.org/linux/man-pages/man5/resolv.conf.5.html). - * That is, if attempting to resolve with the first server provided results in a `NOTFOUND` error, the `resolve()` method will _not_ attempt to resolve with - * subsequent servers provided. Fallback DNS servers will only be used if the - * earlier ones time out or result in some other error. - * @since v0.11.3 - * @param servers array of [RFC 5952](https://datatracker.ietf.org/doc/html/rfc5952#section-6) formatted addresses - */ - function setServers(servers: readonly string[]): void; - /** - * Returns an array of IP address strings, formatted according to [RFC 5952](https://tools.ietf.org/html/rfc5952#section-6), - * that are currently configured for DNS resolution. A string will include a port - * section if a custom port is used. - * - * ```js - * [ - * '4.4.4.4', - * '2001:4860:4860::8888', - * '4.4.4.4:1053', - * '[2001:4860:4860::8888]:1053', - * ] - * ``` - * @since v0.11.3 - */ - function getServers(): string[]; - /** - * Set the default value of `order` in {@link lookup} and [`dnsPromises.lookup()`](https://nodejs.org/docs/latest-v25.x/api/dns.html#dnspromiseslookuphostname-options). - * The value could be: - * - * * `ipv4first`: sets default `order` to `ipv4first`. - * * `ipv6first`: sets default `order` to `ipv6first`. - * * `verbatim`: sets default `order` to `verbatim`. - * - * The default is `verbatim` and {@link setDefaultResultOrder} have higher - * priority than [`--dns-result-order`](https://nodejs.org/docs/latest-v25.x/api/cli.html#--dns-result-orderorder). When using - * [worker threads](https://nodejs.org/docs/latest-v25.x/api/worker_threads.html), {@link setDefaultResultOrder} from the main - * thread won't affect the default dns orders in workers. - * @since v16.4.0, v14.18.0 - * @param order must be `'ipv4first'`, `'ipv6first'` or `'verbatim'`. - */ - function setDefaultResultOrder(order: "ipv4first" | "ipv6first" | "verbatim"): void; - // Error codes - const NODATA: "ENODATA"; - const FORMERR: "EFORMERR"; - const SERVFAIL: "ESERVFAIL"; - const NOTFOUND: "ENOTFOUND"; - const NOTIMP: "ENOTIMP"; - const REFUSED: "EREFUSED"; - const BADQUERY: "EBADQUERY"; - const BADNAME: "EBADNAME"; - const BADFAMILY: "EBADFAMILY"; - const BADRESP: "EBADRESP"; - const CONNREFUSED: "ECONNREFUSED"; - const TIMEOUT: "ETIMEOUT"; - const EOF: "EOF"; - const FILE: "EFILE"; - const NOMEM: "ENOMEM"; - const DESTRUCTION: "EDESTRUCTION"; - const BADSTR: "EBADSTR"; - const BADFLAGS: "EBADFLAGS"; - const NONAME: "ENONAME"; - const BADHINTS: "EBADHINTS"; - const NOTINITIALIZED: "ENOTINITIALIZED"; - const LOADIPHLPAPI: "ELOADIPHLPAPI"; - const ADDRGETNETWORKPARAMS: "EADDRGETNETWORKPARAMS"; - const CANCELLED: "ECANCELLED"; - interface ResolverOptions { - /** - * Query timeout in milliseconds, or `-1` to use the default timeout. - */ - timeout?: number | undefined; - /** - * The number of tries the resolver will try contacting each name server before giving up. - * @default 4 - */ - tries?: number | undefined; - /** - * The max retry timeout, in milliseconds. - * @default 0 - */ - maxTimeout?: number | undefined; - } - /** - * An independent resolver for DNS requests. - * - * Creating a new resolver uses the default server settings. Setting - * the servers used for a resolver using [`resolver.setServers()`](https://nodejs.org/docs/latest-v25.x/api/dns.html#dnssetserversservers) does not affect - * other resolvers: - * - * ```js - * import { Resolver } from 'node:dns'; - * const resolver = new Resolver(); - * resolver.setServers(['4.4.4.4']); - * - * // This request will use the server at 4.4.4.4, independent of global settings. - * resolver.resolve4('example.org', (err, addresses) => { - * // ... - * }); - * ``` - * - * The following methods from the `node:dns` module are available: - * - * * `resolver.getServers()` - * * `resolver.resolve()` - * * `resolver.resolve4()` - * * `resolver.resolve6()` - * * `resolver.resolveAny()` - * * `resolver.resolveCaa()` - * * `resolver.resolveCname()` - * * `resolver.resolveMx()` - * * `resolver.resolveNaptr()` - * * `resolver.resolveNs()` - * * `resolver.resolvePtr()` - * * `resolver.resolveSoa()` - * * `resolver.resolveSrv()` - * * `resolver.resolveTxt()` - * * `resolver.reverse()` - * * `resolver.setServers()` - * @since v8.3.0 - */ - class Resolver { - constructor(options?: ResolverOptions); - /** - * Cancel all outstanding DNS queries made by this resolver. The corresponding - * callbacks will be called with an error with code `ECANCELLED`. - * @since v8.3.0 - */ - cancel(): void; - getServers: typeof getServers; - resolve: typeof resolve; - resolve4: typeof resolve4; - resolve6: typeof resolve6; - resolveAny: typeof resolveAny; - resolveCaa: typeof resolveCaa; - resolveCname: typeof resolveCname; - resolveMx: typeof resolveMx; - resolveNaptr: typeof resolveNaptr; - resolveNs: typeof resolveNs; - resolvePtr: typeof resolvePtr; - resolveSoa: typeof resolveSoa; - resolveSrv: typeof resolveSrv; - resolveTlsa: typeof resolveTlsa; - resolveTxt: typeof resolveTxt; - reverse: typeof reverse; - /** - * The resolver instance will send its requests from the specified IP address. - * This allows programs to specify outbound interfaces when used on multi-homed - * systems. - * - * If a v4 or v6 address is not specified, it is set to the default and the - * operating system will choose a local address automatically. - * - * The resolver will use the v4 local address when making requests to IPv4 DNS - * servers, and the v6 local address when making requests to IPv6 DNS servers. - * The `rrtype` of resolution requests has no impact on the local address used. - * @since v15.1.0, v14.17.0 - * @param [ipv4='0.0.0.0'] A string representation of an IPv4 address. - * @param [ipv6='::0'] A string representation of an IPv6 address. - */ - setLocalAddress(ipv4?: string, ipv6?: string): void; - setServers: typeof setServers; - } -} -declare module "node:dns" { - export * as promises from "node:dns/promises"; -} -declare module "dns" { - export * from "node:dns"; -} diff --git a/PBandGraphScaffold/node_modules/@types/node/dns/promises.d.ts b/PBandGraphScaffold/node_modules/@types/node/dns/promises.d.ts deleted file mode 100644 index 8d5f989..0000000 --- a/PBandGraphScaffold/node_modules/@types/node/dns/promises.d.ts +++ /dev/null @@ -1,503 +0,0 @@ -/** - * The `dns.promises` API provides an alternative set of asynchronous DNS methods - * that return `Promise` objects rather than using callbacks. The API is accessible - * via `import { promises as dnsPromises } from 'node:dns'` or `import dnsPromises from 'node:dns/promises'`. - * @since v10.6.0 - */ -declare module "node:dns/promises" { - import { - AnyRecord, - CaaRecord, - LookupAddress, - LookupAllOptions, - LookupOneOptions, - LookupOptions, - MxRecord, - NaptrRecord, - RecordWithTtl, - ResolveOptions, - ResolverOptions, - ResolveWithTtlOptions, - SoaRecord, - SrvRecord, - TlsaRecord, - } from "node:dns"; - /** - * Returns an array of IP address strings, formatted according to [RFC 5952](https://tools.ietf.org/html/rfc5952#section-6), - * that are currently configured for DNS resolution. A string will include a port - * section if a custom port is used. - * - * ```js - * [ - * '4.4.4.4', - * '2001:4860:4860::8888', - * '4.4.4.4:1053', - * '[2001:4860:4860::8888]:1053', - * ] - * ``` - * @since v10.6.0 - */ - function getServers(): string[]; - /** - * Resolves a host name (e.g. `'nodejs.org'`) into the first found A (IPv4) or - * AAAA (IPv6) record. All `option` properties are optional. If `options` is an - * integer, then it must be `4` or `6` – if `options` is not provided, then IPv4 - * and IPv6 addresses are both returned if found. - * - * With the `all` option set to `true`, the `Promise` is resolved with `addresses` being an array of objects with the properties `address` and `family`. - * - * On error, the `Promise` is rejected with an [`Error`](https://nodejs.org/docs/latest-v20.x/api/errors.html#class-error) object, where `err.code` is the error code. - * Keep in mind that `err.code` will be set to `'ENOTFOUND'` not only when - * the host name does not exist but also when the lookup fails in other ways - * such as no available file descriptors. - * - * [`dnsPromises.lookup()`](https://nodejs.org/docs/latest-v20.x/api/dns.html#dnspromiseslookuphostname-options) does not necessarily have anything to do with the DNS - * protocol. The implementation uses an operating system facility that can - * associate names with addresses and vice versa. This implementation can have - * subtle but important consequences on the behavior of any Node.js program. Please - * take some time to consult the [Implementation considerations section](https://nodejs.org/docs/latest-v20.x/api/dns.html#implementation-considerations) before - * using `dnsPromises.lookup()`. - * - * Example usage: - * - * ```js - * import dns from 'node:dns'; - * const dnsPromises = dns.promises; - * const options = { - * family: 6, - * hints: dns.ADDRCONFIG | dns.V4MAPPED, - * }; - * - * dnsPromises.lookup('example.com', options).then((result) => { - * console.log('address: %j family: IPv%s', result.address, result.family); - * // address: "2606:2800:220:1:248:1893:25c8:1946" family: IPv6 - * }); - * - * // When options.all is true, the result will be an Array. - * options.all = true; - * dnsPromises.lookup('example.com', options).then((result) => { - * console.log('addresses: %j', result); - * // addresses: [{"address":"2606:2800:220:1:248:1893:25c8:1946","family":6}] - * }); - * ``` - * @since v10.6.0 - */ - function lookup(hostname: string, family: number): Promise; - function lookup(hostname: string, options: LookupOneOptions): Promise; - function lookup(hostname: string, options: LookupAllOptions): Promise; - function lookup(hostname: string, options: LookupOptions): Promise; - function lookup(hostname: string): Promise; - /** - * Resolves the given `address` and `port` into a host name and service using - * the operating system's underlying `getnameinfo` implementation. - * - * If `address` is not a valid IP address, a `TypeError` will be thrown. - * The `port` will be coerced to a number. If it is not a legal port, a `TypeError` will be thrown. - * - * On error, the `Promise` is rejected with an [`Error`](https://nodejs.org/docs/latest-v20.x/api/errors.html#class-error) object, where `err.code` is the error code. - * - * ```js - * import dnsPromises from 'node:dns'; - * dnsPromises.lookupService('127.0.0.1', 22).then((result) => { - * console.log(result.hostname, result.service); - * // Prints: localhost ssh - * }); - * ``` - * @since v10.6.0 - */ - function lookupService( - address: string, - port: number, - ): Promise<{ - hostname: string; - service: string; - }>; - /** - * Uses the DNS protocol to resolve a host name (e.g. `'nodejs.org'`) into an array - * of the resource records. When successful, the `Promise` is resolved with an - * array of resource records. The type and structure of individual results vary - * based on `rrtype`: - * - * - * - * On error, the `Promise` is rejected with an [`Error`](https://nodejs.org/docs/latest-v20.x/api/errors.html#class-error) object, where `err.code` - * is one of the [DNS error codes](https://nodejs.org/docs/latest-v20.x/api/dns.html#error-codes). - * @since v10.6.0 - * @param hostname Host name to resolve. - * @param [rrtype='A'] Resource record type. - */ - function resolve(hostname: string): Promise; - function resolve(hostname: string, rrtype: "A" | "AAAA" | "CNAME" | "NS" | "PTR"): Promise; - function resolve(hostname: string, rrtype: "ANY"): Promise; - function resolve(hostname: string, rrtype: "CAA"): Promise; - function resolve(hostname: string, rrtype: "MX"): Promise; - function resolve(hostname: string, rrtype: "NAPTR"): Promise; - function resolve(hostname: string, rrtype: "SOA"): Promise; - function resolve(hostname: string, rrtype: "SRV"): Promise; - function resolve(hostname: string, rrtype: "TLSA"): Promise; - function resolve(hostname: string, rrtype: "TXT"): Promise; - function resolve(hostname: string, rrtype: string): Promise< - | string[] - | CaaRecord[] - | MxRecord[] - | NaptrRecord[] - | SoaRecord - | SrvRecord[] - | TlsaRecord[] - | string[][] - | AnyRecord[] - >; - /** - * Uses the DNS protocol to resolve IPv4 addresses (`A` records) for the `hostname`. On success, the `Promise` is resolved with an array of IPv4 - * addresses (e.g. `['74.125.79.104', '74.125.79.105', '74.125.79.106']`). - * @since v10.6.0 - * @param hostname Host name to resolve. - */ - function resolve4(hostname: string): Promise; - function resolve4(hostname: string, options: ResolveWithTtlOptions): Promise; - function resolve4(hostname: string, options: ResolveOptions): Promise; - /** - * Uses the DNS protocol to resolve IPv6 addresses (`AAAA` records) for the `hostname`. On success, the `Promise` is resolved with an array of IPv6 - * addresses. - * @since v10.6.0 - * @param hostname Host name to resolve. - */ - function resolve6(hostname: string): Promise; - function resolve6(hostname: string, options: ResolveWithTtlOptions): Promise; - function resolve6(hostname: string, options: ResolveOptions): Promise; - /** - * Uses the DNS protocol to resolve all records (also known as `ANY` or `*` query). - * On success, the `Promise` is resolved with an array containing various types of - * records. Each object has a property `type` that indicates the type of the - * current record. And depending on the `type`, additional properties will be - * present on the object: - * - * - * - * Here is an example of the result object: - * - * ```js - * [ { type: 'A', address: '127.0.0.1', ttl: 299 }, - * { type: 'CNAME', value: 'example.com' }, - * { type: 'MX', exchange: 'alt4.aspmx.l.example.com', priority: 50 }, - * { type: 'NS', value: 'ns1.example.com' }, - * { type: 'TXT', entries: [ 'v=spf1 include:_spf.example.com ~all' ] }, - * { type: 'SOA', - * nsname: 'ns1.example.com', - * hostmaster: 'admin.example.com', - * serial: 156696742, - * refresh: 900, - * retry: 900, - * expire: 1800, - * minttl: 60 } ] - * ``` - * @since v10.6.0 - */ - function resolveAny(hostname: string): Promise; - /** - * Uses the DNS protocol to resolve `CAA` records for the `hostname`. On success, - * the `Promise` is resolved with an array of objects containing available - * certification authority authorization records available for the `hostname` (e.g. `[{critical: 0, iodef: 'mailto:pki@example.com'},{critical: 128, issue: 'pki.example.com'}]`). - * @since v15.0.0, v14.17.0 - */ - function resolveCaa(hostname: string): Promise; - /** - * Uses the DNS protocol to resolve `CNAME` records for the `hostname`. On success, - * the `Promise` is resolved with an array of canonical name records available for - * the `hostname` (e.g. `['bar.example.com']`). - * @since v10.6.0 - */ - function resolveCname(hostname: string): Promise; - /** - * Uses the DNS protocol to resolve mail exchange records (`MX` records) for the `hostname`. On success, the `Promise` is resolved with an array of objects - * containing both a `priority` and `exchange` property (e.g.`[{priority: 10, exchange: 'mx.example.com'}, ...]`). - * @since v10.6.0 - */ - function resolveMx(hostname: string): Promise; - /** - * Uses the DNS protocol to resolve regular expression-based records (`NAPTR` records) for the `hostname`. On success, the `Promise` is resolved with an array - * of objects with the following properties: - * - * * `flags` - * * `service` - * * `regexp` - * * `replacement` - * * `order` - * * `preference` - * - * ```js - * { - * flags: 's', - * service: 'SIP+D2U', - * regexp: '', - * replacement: '_sip._udp.example.com', - * order: 30, - * preference: 100 - * } - * ``` - * @since v10.6.0 - */ - function resolveNaptr(hostname: string): Promise; - /** - * Uses the DNS protocol to resolve name server records (`NS` records) for the `hostname`. On success, the `Promise` is resolved with an array of name server - * records available for `hostname` (e.g.`['ns1.example.com', 'ns2.example.com']`). - * @since v10.6.0 - */ - function resolveNs(hostname: string): Promise; - /** - * Uses the DNS protocol to resolve pointer records (`PTR` records) for the `hostname`. On success, the `Promise` is resolved with an array of strings - * containing the reply records. - * @since v10.6.0 - */ - function resolvePtr(hostname: string): Promise; - /** - * Uses the DNS protocol to resolve a start of authority record (`SOA` record) for - * the `hostname`. On success, the `Promise` is resolved with an object with the - * following properties: - * - * * `nsname` - * * `hostmaster` - * * `serial` - * * `refresh` - * * `retry` - * * `expire` - * * `minttl` - * - * ```js - * { - * nsname: 'ns.example.com', - * hostmaster: 'root.example.com', - * serial: 2013101809, - * refresh: 10000, - * retry: 2400, - * expire: 604800, - * minttl: 3600 - * } - * ``` - * @since v10.6.0 - */ - function resolveSoa(hostname: string): Promise; - /** - * Uses the DNS protocol to resolve service records (`SRV` records) for the `hostname`. On success, the `Promise` is resolved with an array of objects with - * the following properties: - * - * * `priority` - * * `weight` - * * `port` - * * `name` - * - * ```js - * { - * priority: 10, - * weight: 5, - * port: 21223, - * name: 'service.example.com' - * } - * ``` - * @since v10.6.0 - */ - function resolveSrv(hostname: string): Promise; - /** - * Uses the DNS protocol to resolve certificate associations (`TLSA` records) for - * the `hostname`. On success, the `Promise` is resolved with an array of objectsAdd commentMore actions - * with these properties: - * - * * `certUsage` - * * `selector` - * * `match` - * * `data` - * - * ```js - * { - * certUsage: 3, - * selector: 1, - * match: 1, - * data: [ArrayBuffer] - * } - * ``` - * @since v23.9.0, v22.15.0 - */ - function resolveTlsa(hostname: string): Promise; - /** - * Uses the DNS protocol to resolve text queries (`TXT` records) for the `hostname`. On success, the `Promise` is resolved with a two-dimensional array - * of the text records available for `hostname` (e.g.`[ ['v=spf1 ip4:0.0.0.0 ', '~all' ] ]`). Each sub-array contains TXT chunks of - * one record. Depending on the use case, these could be either joined together or - * treated separately. - * @since v10.6.0 - */ - function resolveTxt(hostname: string): Promise; - /** - * Performs a reverse DNS query that resolves an IPv4 or IPv6 address to an - * array of host names. - * - * On error, the `Promise` is rejected with an [`Error`](https://nodejs.org/docs/latest-v20.x/api/errors.html#class-error) object, where `err.code` - * is one of the [DNS error codes](https://nodejs.org/docs/latest-v20.x/api/dns.html#error-codes). - * @since v10.6.0 - */ - function reverse(ip: string): Promise; - /** - * Get the default value for `verbatim` in {@link lookup} and [dnsPromises.lookup()](https://nodejs.org/docs/latest-v20.x/api/dns.html#dnspromiseslookuphostname-options). - * The value could be: - * - * * `ipv4first`: for `verbatim` defaulting to `false`. - * * `verbatim`: for `verbatim` defaulting to `true`. - * @since v20.1.0 - */ - function getDefaultResultOrder(): "ipv4first" | "verbatim"; - /** - * Sets the IP address and port of servers to be used when performing DNS - * resolution. The `servers` argument is an array of [RFC 5952](https://tools.ietf.org/html/rfc5952#section-6) formatted - * addresses. If the port is the IANA default DNS port (53) it can be omitted. - * - * ```js - * dnsPromises.setServers([ - * '4.4.4.4', - * '[2001:4860:4860::8888]', - * '4.4.4.4:1053', - * '[2001:4860:4860::8888]:1053', - * ]); - * ``` - * - * An error will be thrown if an invalid address is provided. - * - * The `dnsPromises.setServers()` method must not be called while a DNS query is in - * progress. - * - * This method works much like [resolve.conf](https://man7.org/linux/man-pages/man5/resolv.conf.5.html). - * That is, if attempting to resolve with the first server provided results in a `NOTFOUND` error, the `resolve()` method will _not_ attempt to resolve with - * subsequent servers provided. Fallback DNS servers will only be used if the - * earlier ones time out or result in some other error. - * @since v10.6.0 - * @param servers array of `RFC 5952` formatted addresses - */ - function setServers(servers: readonly string[]): void; - /** - * Set the default value of `order` in `dns.lookup()` and `{@link lookup}`. The value could be: - * - * * `ipv4first`: sets default `order` to `ipv4first`. - * * `ipv6first`: sets default `order` to `ipv6first`. - * * `verbatim`: sets default `order` to `verbatim`. - * - * The default is `verbatim` and [dnsPromises.setDefaultResultOrder()](https://nodejs.org/docs/latest-v20.x/api/dns.html#dnspromisessetdefaultresultorderorder) - * have higher priority than [`--dns-result-order`](https://nodejs.org/docs/latest-v20.x/api/cli.html#--dns-result-orderorder). - * When using [worker threads](https://nodejs.org/docs/latest-v20.x/api/worker_threads.html), [`dnsPromises.setDefaultResultOrder()`](https://nodejs.org/docs/latest-v20.x/api/dns.html#dnspromisessetdefaultresultorderorder) - * from the main thread won't affect the default dns orders in workers. - * @since v16.4.0, v14.18.0 - * @param order must be `'ipv4first'`, `'ipv6first'` or `'verbatim'`. - */ - function setDefaultResultOrder(order: "ipv4first" | "ipv6first" | "verbatim"): void; - // Error codes - const NODATA: "ENODATA"; - const FORMERR: "EFORMERR"; - const SERVFAIL: "ESERVFAIL"; - const NOTFOUND: "ENOTFOUND"; - const NOTIMP: "ENOTIMP"; - const REFUSED: "EREFUSED"; - const BADQUERY: "EBADQUERY"; - const BADNAME: "EBADNAME"; - const BADFAMILY: "EBADFAMILY"; - const BADRESP: "EBADRESP"; - const CONNREFUSED: "ECONNREFUSED"; - const TIMEOUT: "ETIMEOUT"; - const EOF: "EOF"; - const FILE: "EFILE"; - const NOMEM: "ENOMEM"; - const DESTRUCTION: "EDESTRUCTION"; - const BADSTR: "EBADSTR"; - const BADFLAGS: "EBADFLAGS"; - const NONAME: "ENONAME"; - const BADHINTS: "EBADHINTS"; - const NOTINITIALIZED: "ENOTINITIALIZED"; - const LOADIPHLPAPI: "ELOADIPHLPAPI"; - const ADDRGETNETWORKPARAMS: "EADDRGETNETWORKPARAMS"; - const CANCELLED: "ECANCELLED"; - - /** - * An independent resolver for DNS requests. - * - * Creating a new resolver uses the default server settings. Setting - * the servers used for a resolver using [`resolver.setServers()`](https://nodejs.org/docs/latest-v20.x/api/dns.html#dnspromisessetserversservers) does not affect - * other resolvers: - * - * ```js - * import { promises } from 'node:dns'; - * const resolver = new promises.Resolver(); - * resolver.setServers(['4.4.4.4']); - * - * // This request will use the server at 4.4.4.4, independent of global settings. - * resolver.resolve4('example.org').then((addresses) => { - * // ... - * }); - * - * // Alternatively, the same code can be written using async-await style. - * (async function() { - * const addresses = await resolver.resolve4('example.org'); - * })(); - * ``` - * - * The following methods from the `dnsPromises` API are available: - * - * * `resolver.getServers()` - * * `resolver.resolve()` - * * `resolver.resolve4()` - * * `resolver.resolve6()` - * * `resolver.resolveAny()` - * * `resolver.resolveCaa()` - * * `resolver.resolveCname()` - * * `resolver.resolveMx()` - * * `resolver.resolveNaptr()` - * * `resolver.resolveNs()` - * * `resolver.resolvePtr()` - * * `resolver.resolveSoa()` - * * `resolver.resolveSrv()` - * * `resolver.resolveTxt()` - * * `resolver.reverse()` - * * `resolver.setServers()` - * @since v10.6.0 - */ - class Resolver { - constructor(options?: ResolverOptions); - /** - * Cancel all outstanding DNS queries made by this resolver. The corresponding - * callbacks will be called with an error with code `ECANCELLED`. - * @since v8.3.0 - */ - cancel(): void; - getServers: typeof getServers; - resolve: typeof resolve; - resolve4: typeof resolve4; - resolve6: typeof resolve6; - resolveAny: typeof resolveAny; - resolveCaa: typeof resolveCaa; - resolveCname: typeof resolveCname; - resolveMx: typeof resolveMx; - resolveNaptr: typeof resolveNaptr; - resolveNs: typeof resolveNs; - resolvePtr: typeof resolvePtr; - resolveSoa: typeof resolveSoa; - resolveSrv: typeof resolveSrv; - resolveTlsa: typeof resolveTlsa; - resolveTxt: typeof resolveTxt; - reverse: typeof reverse; - /** - * The resolver instance will send its requests from the specified IP address. - * This allows programs to specify outbound interfaces when used on multi-homed - * systems. - * - * If a v4 or v6 address is not specified, it is set to the default and the - * operating system will choose a local address automatically. - * - * The resolver will use the v4 local address when making requests to IPv4 DNS - * servers, and the v6 local address when making requests to IPv6 DNS servers. - * The `rrtype` of resolution requests has no impact on the local address used. - * @since v15.1.0, v14.17.0 - * @param [ipv4='0.0.0.0'] A string representation of an IPv4 address. - * @param [ipv6='::0'] A string representation of an IPv6 address. - */ - setLocalAddress(ipv4?: string, ipv6?: string): void; - setServers: typeof setServers; - } -} -declare module "dns/promises" { - export * from "node:dns/promises"; -} diff --git a/PBandGraphScaffold/node_modules/@types/node/domain.d.ts b/PBandGraphScaffold/node_modules/@types/node/domain.d.ts deleted file mode 100644 index 24a0981..0000000 --- a/PBandGraphScaffold/node_modules/@types/node/domain.d.ts +++ /dev/null @@ -1,166 +0,0 @@ -/** - * **This module is pending deprecation.** Once a replacement API has been - * finalized, this module will be fully deprecated. Most developers should - * **not** have cause to use this module. Users who absolutely must have - * the functionality that domains provide may rely on it for the time being - * but should expect to have to migrate to a different solution - * in the future. - * - * Domains provide a way to handle multiple different IO operations as a - * single group. If any of the event emitters or callbacks registered to a - * domain emit an `'error'` event, or throw an error, then the domain object - * will be notified, rather than losing the context of the error in the `process.on('uncaughtException')` handler, or causing the program to - * exit immediately with an error code. - * @deprecated Since v1.4.2 - Deprecated - * @see [source](https://github.com/nodejs/node/blob/v25.x/lib/domain.js) - */ -declare module "node:domain" { - import { EventEmitter } from "node:events"; - /** - * The `Domain` class encapsulates the functionality of routing errors and - * uncaught exceptions to the active `Domain` object. - * - * To handle the errors that it catches, listen to its `'error'` event. - */ - class Domain extends EventEmitter { - /** - * An array of event emitters that have been explicitly added to the domain. - */ - members: EventEmitter[]; - /** - * The `enter()` method is plumbing used by the `run()`, `bind()`, and `intercept()` methods to set the active domain. It sets `domain.active` and `process.domain` to the domain, and implicitly - * pushes the domain onto the domain - * stack managed by the domain module (see {@link exit} for details on the - * domain stack). The call to `enter()` delimits the beginning of a chain of - * asynchronous calls and I/O operations bound to a domain. - * - * Calling `enter()` changes only the active domain, and does not alter the domain - * itself. `enter()` and `exit()` can be called an arbitrary number of times on a - * single domain. - */ - enter(): void; - /** - * The `exit()` method exits the current domain, popping it off the domain stack. - * Any time execution is going to switch to the context of a different chain of - * asynchronous calls, it's important to ensure that the current domain is exited. - * The call to `exit()` delimits either the end of or an interruption to the chain - * of asynchronous calls and I/O operations bound to a domain. - * - * If there are multiple, nested domains bound to the current execution context, `exit()` will exit any domains nested within this domain. - * - * Calling `exit()` changes only the active domain, and does not alter the domain - * itself. `enter()` and `exit()` can be called an arbitrary number of times on a - * single domain. - */ - exit(): void; - /** - * Run the supplied function in the context of the domain, implicitly - * binding all event emitters, timers, and low-level requests that are - * created in that context. Optionally, arguments can be passed to - * the function. - * - * This is the most basic way to use a domain. - * - * ```js - * import domain from 'node:domain'; - * import fs from 'node:fs'; - * const d = domain.create(); - * d.on('error', (er) => { - * console.error('Caught error!', er); - * }); - * d.run(() => { - * process.nextTick(() => { - * setTimeout(() => { // Simulating some various async stuff - * fs.open('non-existent file', 'r', (er, fd) => { - * if (er) throw er; - * // proceed... - * }); - * }, 100); - * }); - * }); - * ``` - * - * In this example, the `d.on('error')` handler will be triggered, rather - * than crashing the program. - */ - run(fn: (...args: any[]) => T, ...args: any[]): T; - /** - * Explicitly adds an emitter to the domain. If any event handlers called by - * the emitter throw an error, or if the emitter emits an `'error'` event, it - * will be routed to the domain's `'error'` event, just like with implicit - * binding. - * - * If the `EventEmitter` was already bound to a domain, it is removed from that - * one, and bound to this one instead. - * @param emitter emitter to be added to the domain - */ - add(emitter: EventEmitter): void; - /** - * The opposite of {@link add}. Removes domain handling from the - * specified emitter. - * @param emitter emitter to be removed from the domain - */ - remove(emitter: EventEmitter): void; - /** - * The returned function will be a wrapper around the supplied callback - * function. When the returned function is called, any errors that are - * thrown will be routed to the domain's `'error'` event. - * - * ```js - * const d = domain.create(); - * - * function readSomeFile(filename, cb) { - * fs.readFile(filename, 'utf8', d.bind((er, data) => { - * // If this throws, it will also be passed to the domain. - * return cb(er, data ? JSON.parse(data) : null); - * })); - * } - * - * d.on('error', (er) => { - * // An error occurred somewhere. If we throw it now, it will crash the program - * // with the normal line number and stack message. - * }); - * ``` - * @param callback The callback function - * @return The bound function - */ - bind(callback: T): T; - /** - * This method is almost identical to {@link bind}. However, in - * addition to catching thrown errors, it will also intercept `Error` objects sent as the first argument to the function. - * - * In this way, the common `if (err) return callback(err);` pattern can be replaced - * with a single error handler in a single place. - * - * ```js - * const d = domain.create(); - * - * function readSomeFile(filename, cb) { - * fs.readFile(filename, 'utf8', d.intercept((data) => { - * // Note, the first argument is never passed to the - * // callback since it is assumed to be the 'Error' argument - * // and thus intercepted by the domain. - * - * // If this throws, it will also be passed to the domain - * // so the error-handling logic can be moved to the 'error' - * // event on the domain instead of being repeated throughout - * // the program. - * return cb(null, JSON.parse(data)); - * })); - * } - * - * d.on('error', (er) => { - * // An error occurred somewhere. If we throw it now, it will crash the program - * // with the normal line number and stack message. - * }); - * ``` - * @param callback The callback function - * @return The intercepted function - */ - intercept(callback: T): T; - } - function create(): Domain; -} -declare module "domain" { - export * from "node:domain"; -} diff --git a/PBandGraphScaffold/node_modules/@types/node/events.d.ts b/PBandGraphScaffold/node_modules/@types/node/events.d.ts deleted file mode 100644 index 4ed0f65..0000000 --- a/PBandGraphScaffold/node_modules/@types/node/events.d.ts +++ /dev/null @@ -1,1054 +0,0 @@ -/** - * Much of the Node.js core API is built around an idiomatic asynchronous - * event-driven architecture in which certain kinds of objects (called "emitters") - * emit named events that cause `Function` objects ("listeners") to be called. - * - * For instance: a `net.Server` object emits an event each time a peer - * connects to it; a `fs.ReadStream` emits an event when the file is opened; - * a `stream` emits an event whenever data is available to be read. - * - * All objects that emit events are instances of the `EventEmitter` class. These - * objects expose an `eventEmitter.on()` function that allows one or more - * functions to be attached to named events emitted by the object. Typically, - * event names are camel-cased strings but any valid JavaScript property key - * can be used. - * - * When the `EventEmitter` object emits an event, all of the functions attached - * to that specific event are called _synchronously_. Any values returned by the - * called listeners are _ignored_ and discarded. - * - * The following example shows a simple `EventEmitter` instance with a single - * listener. The `eventEmitter.on()` method is used to register listeners, while - * the `eventEmitter.emit()` method is used to trigger the event. - * - * ```js - * import { EventEmitter } from 'node:events'; - * - * class MyEmitter extends EventEmitter {} - * - * const myEmitter = new MyEmitter(); - * myEmitter.on('event', () => { - * console.log('an event occurred!'); - * }); - * myEmitter.emit('event'); - * ``` - * @see [source](https://github.com/nodejs/node/blob/v25.x/lib/events.js) - */ -declare module "node:events" { - import { AsyncResource, AsyncResourceOptions } from "node:async_hooks"; - // #region Event map helpers - type EventMap = Record; - type IfEventMap, True, False> = {} extends Events ? False : True; - type Args, EventName extends string | symbol> = IfEventMap< - Events, - EventName extends keyof Events ? Events[EventName] - : EventName extends keyof EventEmitterEventMap ? EventEmitterEventMap[EventName] - : any[], - any[] - >; - type EventNames, EventName extends string | symbol> = IfEventMap< - Events, - EventName | (keyof Events & (string | symbol)) | keyof EventEmitterEventMap, - string | symbol - >; - type Listener, EventName extends string | symbol> = IfEventMap< - Events, - ( - ...args: EventName extends keyof Events ? Events[EventName] - : EventName extends keyof EventEmitterEventMap ? EventEmitterEventMap[EventName] - : any[] - ) => void, - (...args: any[]) => void - >; - interface EventEmitterEventMap { - newListener: [eventName: string | symbol, listener: (...args: any[]) => void]; - removeListener: [eventName: string | symbol, listener: (...args: any[]) => void]; - } - // #endregion - interface EventEmitterOptions { - /** - * It enables - * [automatic capturing of promise rejection](https://nodejs.org/docs/latest-v25.x/api/events.html#capture-rejections-of-promises). - * @default false - */ - captureRejections?: boolean | undefined; - } - /** - * The `EventEmitter` class is defined and exposed by the `node:events` module: - * - * ```js - * import { EventEmitter } from 'node:events'; - * ``` - * - * All `EventEmitter`s emit the event `'newListener'` when new listeners are - * added and `'removeListener'` when existing listeners are removed. - * - * It supports the following option: - * @since v0.1.26 - */ - class EventEmitter = any> { - constructor(options?: EventEmitterOptions); - } - interface EventEmitter = any> extends NodeJS.EventEmitter {} - global { - namespace NodeJS { - interface EventEmitter = any> { - /** - * The `Symbol.for('nodejs.rejection')` method is called in case a - * promise rejection happens when emitting an event and - * `captureRejections` is enabled on the emitter. - * It is possible to use `events.captureRejectionSymbol` in - * place of `Symbol.for('nodejs.rejection')`. - * - * ```js - * import { EventEmitter, captureRejectionSymbol } from 'node:events'; - * - * class MyClass extends EventEmitter { - * constructor() { - * super({ captureRejections: true }); - * } - * - * [captureRejectionSymbol](err, event, ...args) { - * console.log('rejection happened for', event, 'with', err, ...args); - * this.destroy(err); - * } - * - * destroy(err) { - * // Tear the resource down here. - * } - * } - * ``` - * @since v13.4.0, v12.16.0 - */ - [EventEmitter.captureRejectionSymbol]?(error: Error, event: string | symbol, ...args: any[]): void; - /** - * Alias for `emitter.on(eventName, listener)`. - * @since v0.1.26 - */ - addListener(eventName: EventNames, listener: Listener): this; - /** - * Synchronously calls each of the listeners registered for the event named - * `eventName`, in the order they were registered, passing the supplied arguments - * to each. - * - * Returns `true` if the event had listeners, `false` otherwise. - * - * ```js - * import { EventEmitter } from 'node:events'; - * const myEmitter = new EventEmitter(); - * - * // First listener - * myEmitter.on('event', function firstListener() { - * console.log('Helloooo! first listener'); - * }); - * // Second listener - * myEmitter.on('event', function secondListener(arg1, arg2) { - * console.log(`event with parameters ${arg1}, ${arg2} in second listener`); - * }); - * // Third listener - * myEmitter.on('event', function thirdListener(...args) { - * const parameters = args.join(', '); - * console.log(`event with parameters ${parameters} in third listener`); - * }); - * - * console.log(myEmitter.listeners('event')); - * - * myEmitter.emit('event', 1, 2, 3, 4, 5); - * - * // Prints: - * // [ - * // [Function: firstListener], - * // [Function: secondListener], - * // [Function: thirdListener] - * // ] - * // Helloooo! first listener - * // event with parameters 1, 2 in second listener - * // event with parameters 1, 2, 3, 4, 5 in third listener - * ``` - * @since v0.1.26 - */ - emit(eventName: EventNames, ...args: Args): boolean; - /** - * Returns an array listing the events for which the emitter has registered - * listeners. - * - * ```js - * import { EventEmitter } from 'node:events'; - * - * const myEE = new EventEmitter(); - * myEE.on('foo', () => {}); - * myEE.on('bar', () => {}); - * - * const sym = Symbol('symbol'); - * myEE.on(sym, () => {}); - * - * console.log(myEE.eventNames()); - * // Prints: [ 'foo', 'bar', Symbol(symbol) ] - * ``` - * @since v6.0.0 - */ - eventNames(): (string | symbol)[]; - /** - * Returns the current max listener value for the `EventEmitter` which is either - * set by `emitter.setMaxListeners(n)` or defaults to - * `events.defaultMaxListeners`. - * @since v1.0.0 - */ - getMaxListeners(): number; - /** - * Returns the number of listeners listening for the event named `eventName`. - * If `listener` is provided, it will return how many times the listener is found - * in the list of the listeners of the event. - * @since v3.2.0 - * @param eventName The name of the event being listened for - * @param listener The event handler function - */ - listenerCount( - eventName: EventNames, - listener?: Listener, - ): number; - /** - * Returns a copy of the array of listeners for the event named `eventName`. - * - * ```js - * server.on('connection', (stream) => { - * console.log('someone connected!'); - * }); - * console.log(util.inspect(server.listeners('connection'))); - * // Prints: [ [Function] ] - * ``` - * @since v0.1.26 - */ - listeners(eventName: EventNames): Listener[]; - /** - * Alias for `emitter.removeListener()`. - * @since v10.0.0 - */ - off(eventName: EventNames, listener: Listener): this; - /** - * Adds the `listener` function to the end of the listeners array for the - * event named `eventName`. No checks are made to see if the `listener` has - * already been added. Multiple calls passing the same combination of `eventName` - * and `listener` will result in the `listener` being added, and called, multiple - * times. - * - * ```js - * server.on('connection', (stream) => { - * console.log('someone connected!'); - * }); - * ``` - * - * Returns a reference to the `EventEmitter`, so that calls can be chained. - * - * By default, event listeners are invoked in the order they are added. The - * `emitter.prependListener()` method can be used as an alternative to add the - * event listener to the beginning of the listeners array. - * - * ```js - * import { EventEmitter } from 'node:events'; - * const myEE = new EventEmitter(); - * myEE.on('foo', () => console.log('a')); - * myEE.prependListener('foo', () => console.log('b')); - * myEE.emit('foo'); - * // Prints: - * // b - * // a - * ``` - * @since v0.1.101 - * @param eventName The name of the event. - * @param listener The callback function - */ - on(eventName: EventNames, listener: Listener): this; - /** - * Adds a **one-time** `listener` function for the event named `eventName`. The - * next time `eventName` is triggered, this listener is removed and then invoked. - * - * ```js - * server.once('connection', (stream) => { - * console.log('Ah, we have our first user!'); - * }); - * ``` - * - * Returns a reference to the `EventEmitter`, so that calls can be chained. - * - * By default, event listeners are invoked in the order they are added. The - * `emitter.prependOnceListener()` method can be used as an alternative to add the - * event listener to the beginning of the listeners array. - * - * ```js - * import { EventEmitter } from 'node:events'; - * const myEE = new EventEmitter(); - * myEE.once('foo', () => console.log('a')); - * myEE.prependOnceListener('foo', () => console.log('b')); - * myEE.emit('foo'); - * // Prints: - * // b - * // a - * ``` - * @since v0.3.0 - * @param eventName The name of the event. - * @param listener The callback function - */ - once(eventName: EventNames, listener: Listener): this; - /** - * Adds the `listener` function to the _beginning_ of the listeners array for the - * event named `eventName`. No checks are made to see if the `listener` has - * already been added. Multiple calls passing the same combination of `eventName` - * and `listener` will result in the `listener` being added, and called, multiple - * times. - * - * ```js - * server.prependListener('connection', (stream) => { - * console.log('someone connected!'); - * }); - * ``` - * - * Returns a reference to the `EventEmitter`, so that calls can be chained. - * @since v6.0.0 - * @param eventName The name of the event. - * @param listener The callback function - */ - prependListener(eventName: EventNames, listener: Listener): this; - /** - * Adds a **one-time** `listener` function for the event named `eventName` to the - * _beginning_ of the listeners array. The next time `eventName` is triggered, this - * listener is removed, and then invoked. - * - * ```js - * server.prependOnceListener('connection', (stream) => { - * console.log('Ah, we have our first user!'); - * }); - * ``` - * - * Returns a reference to the `EventEmitter`, so that calls can be chained. - * @since v6.0.0 - * @param eventName The name of the event. - * @param listener The callback function - */ - prependOnceListener( - eventName: EventNames, - listener: Listener, - ): this; - /** - * Returns a copy of the array of listeners for the event named `eventName`, - * including any wrappers (such as those created by `.once()`). - * - * ```js - * import { EventEmitter } from 'node:events'; - * const emitter = new EventEmitter(); - * emitter.once('log', () => console.log('log once')); - * - * // Returns a new Array with a function `onceWrapper` which has a property - * // `listener` which contains the original listener bound above - * const listeners = emitter.rawListeners('log'); - * const logFnWrapper = listeners[0]; - * - * // Logs "log once" to the console and does not unbind the `once` event - * logFnWrapper.listener(); - * - * // Logs "log once" to the console and removes the listener - * logFnWrapper(); - * - * emitter.on('log', () => console.log('log persistently')); - * // Will return a new Array with a single function bound by `.on()` above - * const newListeners = emitter.rawListeners('log'); - * - * // Logs "log persistently" twice - * newListeners[0](); - * emitter.emit('log'); - * ``` - * @since v9.4.0 - */ - rawListeners(eventName: EventNames): Listener[]; - /** - * Removes all listeners, or those of the specified `eventName`. - * - * It is bad practice to remove listeners added elsewhere in the code, - * particularly when the `EventEmitter` instance was created by some other - * component or module (e.g. sockets or file streams). - * - * Returns a reference to the `EventEmitter`, so that calls can be chained. - * @since v0.1.26 - */ - // eslint-disable-next-line @definitelytyped/no-unnecessary-generics - removeAllListeners(eventName?: EventNames): this; - /** - * Removes the specified `listener` from the listener array for the event named - * `eventName`. - * - * ```js - * const callback = (stream) => { - * console.log('someone connected!'); - * }; - * server.on('connection', callback); - * // ... - * server.removeListener('connection', callback); - * ``` - * - * `removeListener()` will remove, at most, one instance of a listener from the - * listener array. If any single listener has been added multiple times to the - * listener array for the specified `eventName`, then `removeListener()` must be - * called multiple times to remove each instance. - * - * Once an event is emitted, all listeners attached to it at the - * time of emitting are called in order. This implies that any - * `removeListener()` or `removeAllListeners()` calls _after_ emitting and - * _before_ the last listener finishes execution will not remove them from - * `emit()` in progress. Subsequent events behave as expected. - * - * ```js - * import { EventEmitter } from 'node:events'; - * class MyEmitter extends EventEmitter {} - * const myEmitter = new MyEmitter(); - * - * const callbackA = () => { - * console.log('A'); - * myEmitter.removeListener('event', callbackB); - * }; - * - * const callbackB = () => { - * console.log('B'); - * }; - * - * myEmitter.on('event', callbackA); - * - * myEmitter.on('event', callbackB); - * - * // callbackA removes listener callbackB but it will still be called. - * // Internal listener array at time of emit [callbackA, callbackB] - * myEmitter.emit('event'); - * // Prints: - * // A - * // B - * - * // callbackB is now removed. - * // Internal listener array [callbackA] - * myEmitter.emit('event'); - * // Prints: - * // A - * ``` - * - * Because listeners are managed using an internal array, calling this will - * change the position indexes of any listener registered _after_ the listener - * being removed. This will not impact the order in which listeners are called, - * but it means that any copies of the listener array as returned by - * the `emitter.listeners()` method will need to be recreated. - * - * When a single function has been added as a handler multiple times for a single - * event (as in the example below), `removeListener()` will remove the most - * recently added instance. In the example the `once('ping')` - * listener is removed: - * - * ```js - * import { EventEmitter } from 'node:events'; - * const ee = new EventEmitter(); - * - * function pong() { - * console.log('pong'); - * } - * - * ee.on('ping', pong); - * ee.once('ping', pong); - * ee.removeListener('ping', pong); - * - * ee.emit('ping'); - * ee.emit('ping'); - * ``` - * - * Returns a reference to the `EventEmitter`, so that calls can be chained. - * @since v0.1.26 - */ - removeListener(eventName: EventNames, listener: Listener): this; - /** - * By default `EventEmitter`s will print a warning if more than `10` listeners are - * added for a particular event. This is a useful default that helps finding - * memory leaks. The `emitter.setMaxListeners()` method allows the limit to be - * modified for this specific `EventEmitter` instance. The value can be set to - * `Infinity` (or `0`) to indicate an unlimited number of listeners. - * - * Returns a reference to the `EventEmitter`, so that calls can be chained. - * @since v0.3.5 - */ - setMaxListeners(n: number): this; - } - } - } - namespace EventEmitter { - export { EventEmitter, EventEmitterEventMap, EventEmitterOptions }; - } - namespace EventEmitter { - interface Abortable { - signal?: AbortSignal | undefined; - } - /** - * See how to write a custom [rejection handler](https://nodejs.org/docs/latest-v25.x/api/events.html#emittersymbolfornodejsrejectionerr-eventname-args). - * @since v13.4.0, v12.16.0 - */ - const captureRejectionSymbol: unique symbol; - /** - * Change the default `captureRejections` option on all new `EventEmitter` objects. - * @since v13.4.0, v12.16.0 - */ - let captureRejections: boolean; - /** - * By default, a maximum of `10` listeners can be registered for any single - * event. This limit can be changed for individual `EventEmitter` instances - * using the `emitter.setMaxListeners(n)` method. To change the default - * for _all_ `EventEmitter` instances, the `events.defaultMaxListeners` - * property can be used. If this value is not a positive number, a `RangeError` - * is thrown. - * - * Take caution when setting the `events.defaultMaxListeners` because the - * change affects _all_ `EventEmitter` instances, including those created before - * the change is made. However, calling `emitter.setMaxListeners(n)` still has - * precedence over `events.defaultMaxListeners`. - * - * This is not a hard limit. The `EventEmitter` instance will allow - * more listeners to be added but will output a trace warning to stderr indicating - * that a "possible EventEmitter memory leak" has been detected. For any single - * `EventEmitter`, the `emitter.getMaxListeners()` and `emitter.setMaxListeners()` - * methods can be used to temporarily avoid this warning: - * - * `defaultMaxListeners` has no effect on `AbortSignal` instances. While it is - * still possible to use `emitter.setMaxListeners(n)` to set a warning limit - * for individual `AbortSignal` instances, per default `AbortSignal` instances will not warn. - * - * ```js - * import { EventEmitter } from 'node:events'; - * const emitter = new EventEmitter(); - * emitter.setMaxListeners(emitter.getMaxListeners() + 1); - * emitter.once('event', () => { - * // do stuff - * emitter.setMaxListeners(Math.max(emitter.getMaxListeners() - 1, 0)); - * }); - * ``` - * - * The `--trace-warnings` command-line flag can be used to display the - * stack trace for such warnings. - * - * The emitted warning can be inspected with `process.on('warning')` and will - * have the additional `emitter`, `type`, and `count` properties, referring to - * the event emitter instance, the event's name and the number of attached - * listeners, respectively. - * Its `name` property is set to `'MaxListenersExceededWarning'`. - * @since v0.11.2 - */ - let defaultMaxListeners: number; - /** - * This symbol shall be used to install a listener for only monitoring `'error'` - * events. Listeners installed using this symbol are called before the regular - * `'error'` listeners are called. - * - * Installing a listener using this symbol does not change the behavior once an - * `'error'` event is emitted. Therefore, the process will still crash if no - * regular `'error'` listener is installed. - * @since v13.6.0, v12.17.0 - */ - const errorMonitor: unique symbol; - /** - * Listens once to the `abort` event on the provided `signal`. - * - * Listening to the `abort` event on abort signals is unsafe and may - * lead to resource leaks since another third party with the signal can - * call `e.stopImmediatePropagation()`. Unfortunately Node.js cannot change - * this since it would violate the web standard. Additionally, the original - * API makes it easy to forget to remove listeners. - * - * This API allows safely using `AbortSignal`s in Node.js APIs by solving these - * two issues by listening to the event such that `stopImmediatePropagation` does - * not prevent the listener from running. - * - * Returns a disposable so that it may be unsubscribed from more easily. - * - * ```js - * import { addAbortListener } from 'node:events'; - * - * function example(signal) { - * let disposable; - * try { - * signal.addEventListener('abort', (e) => e.stopImmediatePropagation()); - * disposable = addAbortListener(signal, (e) => { - * // Do something when signal is aborted. - * }); - * } finally { - * disposable?.[Symbol.dispose](); - * } - * } - * ``` - * @since v20.5.0 - * @return Disposable that removes the `abort` listener. - */ - function addAbortListener(signal: AbortSignal, resource: (event: Event) => void): Disposable; - /** - * Returns a copy of the array of listeners for the event named `eventName`. - * - * For `EventEmitter`s this behaves exactly the same as calling `.listeners` on - * the emitter. - * - * For `EventTarget`s this is the only way to get the event listeners for the - * event target. This is useful for debugging and diagnostic purposes. - * - * ```js - * import { getEventListeners, EventEmitter } from 'node:events'; - * - * { - * const ee = new EventEmitter(); - * const listener = () => console.log('Events are fun'); - * ee.on('foo', listener); - * console.log(getEventListeners(ee, 'foo')); // [ [Function: listener] ] - * } - * { - * const et = new EventTarget(); - * const listener = () => console.log('Events are fun'); - * et.addEventListener('foo', listener); - * console.log(getEventListeners(et, 'foo')); // [ [Function: listener] ] - * } - * ``` - * @since v15.2.0, v14.17.0 - */ - function getEventListeners(emitter: EventEmitter, name: string | symbol): ((...args: any[]) => void)[]; - function getEventListeners(emitter: EventTarget, name: string): ((...args: any[]) => void)[]; - /** - * Returns the currently set max amount of listeners. - * - * For `EventEmitter`s this behaves exactly the same as calling `.getMaxListeners` on - * the emitter. - * - * For `EventTarget`s this is the only way to get the max event listeners for the - * event target. If the number of event handlers on a single EventTarget exceeds - * the max set, the EventTarget will print a warning. - * - * ```js - * import { getMaxListeners, setMaxListeners, EventEmitter } from 'node:events'; - * - * { - * const ee = new EventEmitter(); - * console.log(getMaxListeners(ee)); // 10 - * setMaxListeners(11, ee); - * console.log(getMaxListeners(ee)); // 11 - * } - * { - * const et = new EventTarget(); - * console.log(getMaxListeners(et)); // 10 - * setMaxListeners(11, et); - * console.log(getMaxListeners(et)); // 11 - * } - * ``` - * @since v19.9.0 - */ - function getMaxListeners(emitter: EventEmitter | EventTarget): number; - /** - * A class method that returns the number of listeners for the given `eventName` - * registered on the given `emitter`. - * - * ```js - * import { EventEmitter, listenerCount } from 'node:events'; - * - * const myEmitter = new EventEmitter(); - * myEmitter.on('event', () => {}); - * myEmitter.on('event', () => {}); - * console.log(listenerCount(myEmitter, 'event')); - * // Prints: 2 - * ``` - * @since v0.9.12 - * @deprecated Use `emitter.listenerCount()` instead. - * @param emitter The emitter to query - * @param eventName The event name - */ - function listenerCount(emitter: EventEmitter, eventName: string | symbol): number; - interface OnOptions extends Abortable { - /** - * Names of events that will end the iteration. - */ - close?: readonly string[] | undefined; - /** - * The high watermark. The emitter is paused every time the size of events - * being buffered is higher than it. Supported only on emitters implementing - * `pause()` and `resume()` methods. - * @default Number.MAX_SAFE_INTEGER - */ - highWaterMark?: number | undefined; - /** - * The low watermark. The emitter is resumed every time the size of events - * being buffered is lower than it. Supported only on emitters implementing - * `pause()` and `resume()` methods. - * @default 1 - */ - lowWaterMark?: number | undefined; - } - /** - * ```js - * import { on, EventEmitter } from 'node:events'; - * import process from 'node:process'; - * - * const ee = new EventEmitter(); - * - * // Emit later on - * process.nextTick(() => { - * ee.emit('foo', 'bar'); - * ee.emit('foo', 42); - * }); - * - * for await (const event of on(ee, 'foo')) { - * // The execution of this inner block is synchronous and it - * // processes one event at a time (even with await). Do not use - * // if concurrent execution is required. - * console.log(event); // prints ['bar'] [42] - * } - * // Unreachable here - * ``` - * - * Returns an `AsyncIterator` that iterates `eventName` events. It will throw - * if the `EventEmitter` emits `'error'`. It removes all listeners when - * exiting the loop. The `value` returned by each iteration is an array - * composed of the emitted event arguments. - * - * An `AbortSignal` can be used to cancel waiting on events: - * - * ```js - * import { on, EventEmitter } from 'node:events'; - * import process from 'node:process'; - * - * const ac = new AbortController(); - * - * (async () => { - * const ee = new EventEmitter(); - * - * // Emit later on - * process.nextTick(() => { - * ee.emit('foo', 'bar'); - * ee.emit('foo', 42); - * }); - * - * for await (const event of on(ee, 'foo', { signal: ac.signal })) { - * // The execution of this inner block is synchronous and it - * // processes one event at a time (even with await). Do not use - * // if concurrent execution is required. - * console.log(event); // prints ['bar'] [42] - * } - * // Unreachable here - * })(); - * - * process.nextTick(() => ac.abort()); - * ``` - * @since v13.6.0, v12.16.0 - * @returns `AsyncIterator` that iterates `eventName` events emitted by the `emitter` - */ - function on( - emitter: EventEmitter, - eventName: string | symbol, - options?: OnOptions, - ): NodeJS.AsyncIterator; - function on( - emitter: EventTarget, - eventName: string, - options?: OnOptions, - ): NodeJS.AsyncIterator; - interface OnceOptions extends Abortable {} - /** - * Creates a `Promise` that is fulfilled when the `EventEmitter` emits the given - * event or that is rejected if the `EventEmitter` emits `'error'` while waiting. - * The `Promise` will resolve with an array of all the arguments emitted to the - * given event. - * - * This method is intentionally generic and works with the web platform - * [EventTarget][WHATWG-EventTarget] interface, which has no special - * `'error'` event semantics and does not listen to the `'error'` event. - * - * ```js - * import { once, EventEmitter } from 'node:events'; - * import process from 'node:process'; - * - * const ee = new EventEmitter(); - * - * process.nextTick(() => { - * ee.emit('myevent', 42); - * }); - * - * const [value] = await once(ee, 'myevent'); - * console.log(value); - * - * const err = new Error('kaboom'); - * process.nextTick(() => { - * ee.emit('error', err); - * }); - * - * try { - * await once(ee, 'myevent'); - * } catch (err) { - * console.error('error happened', err); - * } - * ``` - * - * The special handling of the `'error'` event is only used when `events.once()` - * is used to wait for another event. If `events.once()` is used to wait for the - * '`error'` event itself, then it is treated as any other kind of event without - * special handling: - * - * ```js - * import { EventEmitter, once } from 'node:events'; - * - * const ee = new EventEmitter(); - * - * once(ee, 'error') - * .then(([err]) => console.log('ok', err.message)) - * .catch((err) => console.error('error', err.message)); - * - * ee.emit('error', new Error('boom')); - * - * // Prints: ok boom - * ``` - * - * An `AbortSignal` can be used to cancel waiting for the event: - * - * ```js - * import { EventEmitter, once } from 'node:events'; - * - * const ee = new EventEmitter(); - * const ac = new AbortController(); - * - * async function foo(emitter, event, signal) { - * try { - * await once(emitter, event, { signal }); - * console.log('event emitted!'); - * } catch (error) { - * if (error.name === 'AbortError') { - * console.error('Waiting for the event was canceled!'); - * } else { - * console.error('There was an error', error.message); - * } - * } - * } - * - * foo(ee, 'foo', ac.signal); - * ac.abort(); // Prints: Waiting for the event was canceled! - * ``` - * @since v11.13.0, v10.16.0 - */ - function once( - emitter: EventEmitter, - eventName: string | symbol, - options?: OnceOptions, - ): Promise; - function once(emitter: EventTarget, eventName: string, options?: OnceOptions): Promise; - /** - * ```js - * import { setMaxListeners, EventEmitter } from 'node:events'; - * - * const target = new EventTarget(); - * const emitter = new EventEmitter(); - * - * setMaxListeners(5, target, emitter); - * ``` - * @since v15.4.0 - * @param n A non-negative number. The maximum number of listeners per `EventTarget` event. - * @param eventTargets Zero or more `EventTarget` - * or `EventEmitter` instances. If none are specified, `n` is set as the default - * max for all newly created `EventTarget` and `EventEmitter` objects. - * objects. - */ - function setMaxListeners(n: number, ...eventTargets: ReadonlyArray): void; - /** - * This is the interface from which event-emitting Node.js APIs inherit in the types package. - * **It is not intended for consumer use.** - * - * It provides event-mapped definitions similar to EventEmitter, except that its signatures - * are deliberately permissive: they provide type _hinting_, but not rigid type-checking, - * for compatibility reasons. - * - * Classes that inherit directly from EventEmitter in JavaScript can inherit directly from - * this interface in the type definitions. Classes that are more than one inheritance level - * away from EventEmitter (eg. `net.Socket` > `stream.Duplex` > `EventEmitter`) must instead - * copy these method definitions into the derived class. Search "#region InternalEventEmitter" - * for examples. - * @internal - */ - interface InternalEventEmitter> extends EventEmitter { - addListener(eventName: E, listener: (...args: T[E]) => void): this; - addListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - emit(eventName: E, ...args: T[E]): boolean; - emit(eventName: string | symbol, ...args: any[]): boolean; - listenerCount(eventName: E, listener?: (...args: T[E]) => void): number; - listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number; - listeners(eventName: E): ((...args: T[E]) => void)[]; - listeners(eventName: string | symbol): ((...args: any[]) => void)[]; - off(eventName: E, listener: (...args: T[E]) => void): this; - off(eventName: string | symbol, listener: (...args: any[]) => void): this; - on(eventName: E, listener: (...args: T[E]) => void): this; - on(eventName: string | symbol, listener: (...args: any[]) => void): this; - once(eventName: E, listener: (...args: T[E]) => void): this; - once(eventName: string | symbol, listener: (...args: any[]) => void): this; - prependListener(eventName: E, listener: (...args: T[E]) => void): this; - prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - prependOnceListener(eventName: E, listener: (...args: T[E]) => void): this; - prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - rawListeners(eventName: E): ((...args: T[E]) => void)[]; - rawListeners(eventName: string | symbol): ((...args: any[]) => void)[]; - // eslint-disable-next-line @definitelytyped/no-unnecessary-generics - removeAllListeners(eventName?: E): this; - removeAllListeners(eventName?: string | symbol): this; - removeListener(eventName: E, listener: (...args: T[E]) => void): this; - removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - } - interface EventEmitterReferencingAsyncResource extends AsyncResource { - readonly eventEmitter: EventEmitterAsyncResource; - } - interface EventEmitterAsyncResourceOptions extends AsyncResourceOptions, EventEmitterOptions { - /** - * The type of async event. - * @default new.target.name - */ - name?: string | undefined; - } - /** - * Integrates `EventEmitter` with `AsyncResource` for `EventEmitter`s that - * require manual async tracking. Specifically, all events emitted by instances - * of `events.EventEmitterAsyncResource` will run within its [async context](https://nodejs.org/docs/latest-v25.x/api/async_context.html). - * - * ```js - * import { EventEmitterAsyncResource, EventEmitter } from 'node:events'; - * import { notStrictEqual, strictEqual } from 'node:assert'; - * import { executionAsyncId, triggerAsyncId } from 'node:async_hooks'; - * - * // Async tracking tooling will identify this as 'Q'. - * const ee1 = new EventEmitterAsyncResource({ name: 'Q' }); - * - * // 'foo' listeners will run in the EventEmitters async context. - * ee1.on('foo', () => { - * strictEqual(executionAsyncId(), ee1.asyncId); - * strictEqual(triggerAsyncId(), ee1.triggerAsyncId); - * }); - * - * const ee2 = new EventEmitter(); - * - * // 'foo' listeners on ordinary EventEmitters that do not track async - * // context, however, run in the same async context as the emit(). - * ee2.on('foo', () => { - * notStrictEqual(executionAsyncId(), ee2.asyncId); - * notStrictEqual(triggerAsyncId(), ee2.triggerAsyncId); - * }); - * - * Promise.resolve().then(() => { - * ee1.emit('foo'); - * ee2.emit('foo'); - * }); - * ``` - * - * The `EventEmitterAsyncResource` class has the same methods and takes the - * same options as `EventEmitter` and `AsyncResource` themselves. - * @since v17.4.0, v16.14.0 - */ - class EventEmitterAsyncResource extends EventEmitter { - constructor(options?: EventEmitterAsyncResourceOptions); - /** - * The unique `asyncId` assigned to the resource. - */ - readonly asyncId: number; - /** - * The returned `AsyncResource` object has an additional `eventEmitter` property - * that provides a reference to this `EventEmitterAsyncResource`. - */ - readonly asyncResource: EventEmitterReferencingAsyncResource; - /** - * Call all `destroy` hooks. This should only ever be called once. An error will - * be thrown if it is called more than once. This **must** be manually called. If - * the resource is left to be collected by the GC then the `destroy` hooks will - * never be called. - */ - emitDestroy(): void; - /** - * The same `triggerAsyncId` that is passed to the - * `AsyncResource` constructor. - */ - readonly triggerAsyncId: number; - } - /** - * The `NodeEventTarget` is a Node.js-specific extension to `EventTarget` - * that emulates a subset of the `EventEmitter` API. - * @since v14.5.0 - */ - interface NodeEventTarget extends EventTarget { - /** - * Node.js-specific extension to the `EventTarget` class that emulates the - * equivalent `EventEmitter` API. The only difference between `addListener()` and - * `addEventListener()` is that `addListener()` will return a reference to the - * `EventTarget`. - * @since v14.5.0 - */ - addListener(type: string, listener: (arg: any) => void): this; - /** - * Node.js-specific extension to the `EventTarget` class that dispatches the - * `arg` to the list of handlers for `type`. - * @since v15.2.0 - * @returns `true` if event listeners registered for the `type` exist, - * otherwise `false`. - */ - emit(type: string, arg: any): boolean; - /** - * Node.js-specific extension to the `EventTarget` class that returns an array - * of event `type` names for which event listeners are registered. - * @since 14.5.0 - */ - eventNames(): string[]; - /** - * Node.js-specific extension to the `EventTarget` class that returns the number - * of event listeners registered for the `type`. - * @since v14.5.0 - */ - listenerCount(type: string): number; - /** - * Node.js-specific extension to the `EventTarget` class that sets the number - * of max event listeners as `n`. - * @since v14.5.0 - */ - setMaxListeners(n: number): void; - /** - * Node.js-specific extension to the `EventTarget` class that returns the number - * of max event listeners. - * @since v14.5.0 - */ - getMaxListeners(): number; - /** - * Node.js-specific alias for `eventTarget.removeEventListener()`. - * @since v14.5.0 - */ - off(type: string, listener: (arg: any) => void, options?: EventListenerOptions): this; - /** - * Node.js-specific alias for `eventTarget.addEventListener()`. - * @since v14.5.0 - */ - on(type: string, listener: (arg: any) => void): this; - /** - * Node.js-specific extension to the `EventTarget` class that adds a `once` - * listener for the given event `type`. This is equivalent to calling `on` - * with the `once` option set to `true`. - * @since v14.5.0 - */ - once(type: string, listener: (arg: any) => void): this; - /** - * Node.js-specific extension to the `EventTarget` class. If `type` is specified, - * removes all registered listeners for `type`, otherwise removes all registered - * listeners. - * @since v14.5.0 - */ - removeAllListeners(type?: string): this; - /** - * Node.js-specific extension to the `EventTarget` class that removes the - * `listener` for the given `type`. The only difference between `removeListener()` - * and `removeEventListener()` is that `removeListener()` will return a reference - * to the `EventTarget`. - * @since v14.5.0 - */ - removeListener(type: string, listener: (arg: any) => void, options?: EventListenerOptions): this; - } - /** @internal */ - type InternalEventTargetEventProperties = { - [K in keyof T & string as `on${K}`]: ((ev: T[K]) => void) | null; - }; - } - export = EventEmitter; -} -declare module "events" { - import events = require("node:events"); - export = events; -} diff --git a/PBandGraphScaffold/node_modules/@types/node/fs.d.ts b/PBandGraphScaffold/node_modules/@types/node/fs.d.ts deleted file mode 100644 index 6eb6984..0000000 --- a/PBandGraphScaffold/node_modules/@types/node/fs.d.ts +++ /dev/null @@ -1,4676 +0,0 @@ -/** - * The `node:fs` module enables interacting with the file system in a - * way modeled on standard POSIX functions. - * - * To use the promise-based APIs: - * - * ```js - * import * as fs from 'node:fs/promises'; - * ``` - * - * To use the callback and sync APIs: - * - * ```js - * import * as fs from 'node:fs'; - * ``` - * - * All file system operations have synchronous, callback, and promise-based - * forms, and are accessible using both CommonJS syntax and ES6 Modules (ESM). - * @see [source](https://github.com/nodejs/node/blob/v25.x/lib/fs.js) - */ -declare module "node:fs" { - import { NonSharedBuffer } from "node:buffer"; - import { Abortable, EventEmitter, InternalEventEmitter } from "node:events"; - import { FileHandle } from "node:fs/promises"; - import * as stream from "node:stream"; - import { URL } from "node:url"; - /** - * Valid types for path values in "fs". - */ - type PathLike = string | Buffer | URL; - type PathOrFileDescriptor = PathLike | number; - type TimeLike = string | number | Date; - type NoParamCallback = (err: NodeJS.ErrnoException | null) => void; - type BufferEncodingOption = - | "buffer" - | { - encoding: "buffer"; - }; - interface ObjectEncodingOptions { - encoding?: BufferEncoding | null | undefined; - } - type EncodingOption = ObjectEncodingOptions | BufferEncoding | undefined | null; - type OpenMode = number | string; - type Mode = number | string; - interface StatsBase { - isFile(): boolean; - isDirectory(): boolean; - isBlockDevice(): boolean; - isCharacterDevice(): boolean; - isSymbolicLink(): boolean; - isFIFO(): boolean; - isSocket(): boolean; - dev: T; - ino: T; - mode: T; - nlink: T; - uid: T; - gid: T; - rdev: T; - size: T; - blksize: T; - blocks: T; - atimeMs: T; - mtimeMs: T; - ctimeMs: T; - birthtimeMs: T; - atime: Date; - mtime: Date; - ctime: Date; - birthtime: Date; - } - interface Stats extends StatsBase {} - /** - * A `fs.Stats` object provides information about a file. - * - * Objects returned from {@link stat}, {@link lstat}, {@link fstat}, and - * their synchronous counterparts are of this type. - * If `bigint` in the `options` passed to those methods is true, the numeric values - * will be `bigint` instead of `number`, and the object will contain additional - * nanosecond-precision properties suffixed with `Ns`. `Stat` objects are not to be created directly using the `new` keyword. - * - * ```console - * Stats { - * dev: 2114, - * ino: 48064969, - * mode: 33188, - * nlink: 1, - * uid: 85, - * gid: 100, - * rdev: 0, - * size: 527, - * blksize: 4096, - * blocks: 8, - * atimeMs: 1318289051000.1, - * mtimeMs: 1318289051000.1, - * ctimeMs: 1318289051000.1, - * birthtimeMs: 1318289051000.1, - * atime: Mon, 10 Oct 2011 23:24:11 GMT, - * mtime: Mon, 10 Oct 2011 23:24:11 GMT, - * ctime: Mon, 10 Oct 2011 23:24:11 GMT, - * birthtime: Mon, 10 Oct 2011 23:24:11 GMT } - * ``` - * - * `bigint` version: - * - * ```console - * BigIntStats { - * dev: 2114n, - * ino: 48064969n, - * mode: 33188n, - * nlink: 1n, - * uid: 85n, - * gid: 100n, - * rdev: 0n, - * size: 527n, - * blksize: 4096n, - * blocks: 8n, - * atimeMs: 1318289051000n, - * mtimeMs: 1318289051000n, - * ctimeMs: 1318289051000n, - * birthtimeMs: 1318289051000n, - * atimeNs: 1318289051000000000n, - * mtimeNs: 1318289051000000000n, - * ctimeNs: 1318289051000000000n, - * birthtimeNs: 1318289051000000000n, - * atime: Mon, 10 Oct 2011 23:24:11 GMT, - * mtime: Mon, 10 Oct 2011 23:24:11 GMT, - * ctime: Mon, 10 Oct 2011 23:24:11 GMT, - * birthtime: Mon, 10 Oct 2011 23:24:11 GMT } - * ``` - * @since v0.1.21 - */ - class Stats { - private constructor(); - } - interface StatsFsBase { - /** Type of file system. */ - type: T; - /** Optimal transfer block size. */ - bsize: T; - /** Total data blocks in file system. */ - blocks: T; - /** Free blocks in file system. */ - bfree: T; - /** Available blocks for unprivileged users */ - bavail: T; - /** Total file nodes in file system. */ - files: T; - /** Free file nodes in file system. */ - ffree: T; - } - interface StatsFs extends StatsFsBase {} - /** - * Provides information about a mounted file system. - * - * Objects returned from {@link statfs} and its synchronous counterpart are of - * this type. If `bigint` in the `options` passed to those methods is `true`, the - * numeric values will be `bigint` instead of `number`. - * - * ```console - * StatFs { - * type: 1397114950, - * bsize: 4096, - * blocks: 121938943, - * bfree: 61058895, - * bavail: 61058895, - * files: 999, - * ffree: 1000000 - * } - * ``` - * - * `bigint` version: - * - * ```console - * StatFs { - * type: 1397114950n, - * bsize: 4096n, - * blocks: 121938943n, - * bfree: 61058895n, - * bavail: 61058895n, - * files: 999n, - * ffree: 1000000n - * } - * ``` - * @since v19.6.0, v18.15.0 - */ - class StatsFs {} - interface BigIntStatsFs extends StatsFsBase {} - interface StatFsOptions { - bigint?: boolean | undefined; - } - /** - * A representation of a directory entry, which can be a file or a subdirectory - * within the directory, as returned by reading from an `fs.Dir`. The - * directory entry is a combination of the file name and file type pairs. - * - * Additionally, when {@link readdir} or {@link readdirSync} is called with - * the `withFileTypes` option set to `true`, the resulting array is filled with `fs.Dirent` objects, rather than strings or `Buffer` s. - * @since v10.10.0 - */ - class Dirent { - /** - * Returns `true` if the `fs.Dirent` object describes a regular file. - * @since v10.10.0 - */ - isFile(): boolean; - /** - * Returns `true` if the `fs.Dirent` object describes a file system - * directory. - * @since v10.10.0 - */ - isDirectory(): boolean; - /** - * Returns `true` if the `fs.Dirent` object describes a block device. - * @since v10.10.0 - */ - isBlockDevice(): boolean; - /** - * Returns `true` if the `fs.Dirent` object describes a character device. - * @since v10.10.0 - */ - isCharacterDevice(): boolean; - /** - * Returns `true` if the `fs.Dirent` object describes a symbolic link. - * @since v10.10.0 - */ - isSymbolicLink(): boolean; - /** - * Returns `true` if the `fs.Dirent` object describes a first-in-first-out - * (FIFO) pipe. - * @since v10.10.0 - */ - isFIFO(): boolean; - /** - * Returns `true` if the `fs.Dirent` object describes a socket. - * @since v10.10.0 - */ - isSocket(): boolean; - /** - * The file name that this `fs.Dirent` object refers to. The type of this - * value is determined by the `options.encoding` passed to {@link readdir} or {@link readdirSync}. - * @since v10.10.0 - */ - name: Name; - /** - * The path to the parent directory of the file this `fs.Dirent` object refers to. - * @since v20.12.0, v18.20.0 - */ - parentPath: string; - } - /** - * A class representing a directory stream. - * - * Created by {@link opendir}, {@link opendirSync}, or `fsPromises.opendir()`. - * - * ```js - * import { opendir } from 'node:fs/promises'; - * - * try { - * const dir = await opendir('./'); - * for await (const dirent of dir) - * console.log(dirent.name); - * } catch (err) { - * console.error(err); - * } - * ``` - * - * When using the async iterator, the `fs.Dir` object will be automatically - * closed after the iterator exits. - * @since v12.12.0 - */ - class Dir implements AsyncIterable { - /** - * The read-only path of this directory as was provided to {@link opendir},{@link opendirSync}, or `fsPromises.opendir()`. - * @since v12.12.0 - */ - readonly path: string; - /** - * Asynchronously iterates over the directory via `readdir(3)` until all entries have been read. - */ - [Symbol.asyncIterator](): NodeJS.AsyncIterator; - /** - * Asynchronously close the directory's underlying resource handle. - * Subsequent reads will result in errors. - * - * A promise is returned that will be fulfilled after the resource has been - * closed. - * @since v12.12.0 - */ - close(): Promise; - close(cb: NoParamCallback): void; - /** - * Synchronously close the directory's underlying resource handle. - * Subsequent reads will result in errors. - * @since v12.12.0 - */ - closeSync(): void; - /** - * Asynchronously read the next directory entry via [`readdir(3)`](http://man7.org/linux/man-pages/man3/readdir.3.html) as an `fs.Dirent`. - * - * A promise is returned that will be fulfilled with an `fs.Dirent`, or `null` if there are no more directory entries to read. - * - * Directory entries returned by this function are in no particular order as - * provided by the operating system's underlying directory mechanisms. - * Entries added or removed while iterating over the directory might not be - * included in the iteration results. - * @since v12.12.0 - * @return containing {fs.Dirent|null} - */ - read(): Promise; - read(cb: (err: NodeJS.ErrnoException | null, dirEnt: Dirent | null) => void): void; - /** - * Synchronously read the next directory entry as an `fs.Dirent`. See the - * POSIX [`readdir(3)`](http://man7.org/linux/man-pages/man3/readdir.3.html) documentation for more detail. - * - * If there are no more directory entries to read, `null` will be returned. - * - * Directory entries returned by this function are in no particular order as - * provided by the operating system's underlying directory mechanisms. - * Entries added or removed while iterating over the directory might not be - * included in the iteration results. - * @since v12.12.0 - */ - readSync(): Dirent | null; - /** - * Calls `dir.close()` if the directory handle is open, and returns a promise that - * fulfills when disposal is complete. - * @since v24.1.0 - */ - [Symbol.asyncDispose](): Promise; - /** - * Calls `dir.closeSync()` if the directory handle is open, and returns - * `undefined`. - * @since v24.1.0 - */ - [Symbol.dispose](): void; - } - /** - * Class: fs.StatWatcher - * @since v14.3.0, v12.20.0 - * Extends `EventEmitter` - * A successful call to {@link watchFile} method will return a new fs.StatWatcher object. - */ - interface StatWatcher extends EventEmitter { - /** - * When called, requests that the Node.js event loop _not_ exit so long as the `fs.StatWatcher` is active. Calling `watcher.ref()` multiple times will have - * no effect. - * - * By default, all `fs.StatWatcher` objects are "ref'ed", making it normally - * unnecessary to call `watcher.ref()` unless `watcher.unref()` had been - * called previously. - * @since v14.3.0, v12.20.0 - */ - ref(): this; - /** - * When called, the active `fs.StatWatcher` object will not require the Node.js - * event loop to remain active. If there is no other activity keeping the - * event loop running, the process may exit before the `fs.StatWatcher` object's - * callback is invoked. Calling `watcher.unref()` multiple times will have - * no effect. - * @since v14.3.0, v12.20.0 - */ - unref(): this; - } - interface FSWatcherEventMap { - "change": [eventType: string, filename: string | NonSharedBuffer]; - "close": []; - "error": [error: Error]; - } - interface FSWatcher extends InternalEventEmitter { - /** - * Stop watching for changes on the given `fs.FSWatcher`. Once stopped, the `fs.FSWatcher` object is no longer usable. - * @since v0.5.8 - */ - close(): void; - /** - * When called, requests that the Node.js event loop _not_ exit so long as the `fs.FSWatcher` is active. Calling `watcher.ref()` multiple times will have - * no effect. - * - * By default, all `fs.FSWatcher` objects are "ref'ed", making it normally - * unnecessary to call `watcher.ref()` unless `watcher.unref()` had been - * called previously. - * @since v14.3.0, v12.20.0 - */ - ref(): this; - /** - * When called, the active `fs.FSWatcher` object will not require the Node.js - * event loop to remain active. If there is no other activity keeping the - * event loop running, the process may exit before the `fs.FSWatcher` object's - * callback is invoked. Calling `watcher.unref()` multiple times will have - * no effect. - * @since v14.3.0, v12.20.0 - */ - unref(): this; - } - interface ReadStreamEventMap extends stream.ReadableEventMap { - "close": []; - "data": [chunk: string | NonSharedBuffer]; - "open": [fd: number]; - "ready": []; - } - /** - * Instances of `fs.ReadStream` are created and returned using the {@link createReadStream} function. - * @since v0.1.93 - */ - class ReadStream extends stream.Readable { - close(callback?: (err?: NodeJS.ErrnoException | null) => void): void; - /** - * The number of bytes that have been read so far. - * @since v6.4.0 - */ - bytesRead: number; - /** - * The path to the file the stream is reading from as specified in the first - * argument to `fs.createReadStream()`. If `path` is passed as a string, then`readStream.path` will be a string. If `path` is passed as a `Buffer`, then`readStream.path` will be a - * `Buffer`. If `fd` is specified, then`readStream.path` will be `undefined`. - * @since v0.1.93 - */ - path: string | Buffer; - /** - * This property is `true` if the underlying file has not been opened yet, - * i.e. before the `'ready'` event is emitted. - * @since v11.2.0, v10.16.0 - */ - pending: boolean; - // #region InternalEventEmitter - addListener( - eventName: E, - listener: (...args: ReadStreamEventMap[E]) => void, - ): this; - addListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - emit(eventName: E, ...args: ReadStreamEventMap[E]): boolean; - emit(eventName: string | symbol, ...args: any[]): boolean; - listenerCount( - eventName: E, - listener?: (...args: ReadStreamEventMap[E]) => void, - ): number; - listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number; - listeners(eventName: E): ((...args: ReadStreamEventMap[E]) => void)[]; - listeners(eventName: string | symbol): ((...args: any[]) => void)[]; - off(eventName: E, listener: (...args: ReadStreamEventMap[E]) => void): this; - off(eventName: string | symbol, listener: (...args: any[]) => void): this; - on(eventName: E, listener: (...args: ReadStreamEventMap[E]) => void): this; - on(eventName: string | symbol, listener: (...args: any[]) => void): this; - once( - eventName: E, - listener: (...args: ReadStreamEventMap[E]) => void, - ): this; - once(eventName: string | symbol, listener: (...args: any[]) => void): this; - prependListener( - eventName: E, - listener: (...args: ReadStreamEventMap[E]) => void, - ): this; - prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - prependOnceListener( - eventName: E, - listener: (...args: ReadStreamEventMap[E]) => void, - ): this; - prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - rawListeners(eventName: E): ((...args: ReadStreamEventMap[E]) => void)[]; - rawListeners(eventName: string | symbol): ((...args: any[]) => void)[]; - // eslint-disable-next-line @definitelytyped/no-unnecessary-generics - removeAllListeners(eventName?: E): this; - removeAllListeners(eventName?: string | symbol): this; - removeListener( - eventName: E, - listener: (...args: ReadStreamEventMap[E]) => void, - ): this; - removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - // #endregion - } - interface Utf8StreamOptions { - /** - * Appends writes to dest file instead of truncating it. - * @default true - */ - append?: boolean | undefined; - /** - * Which type of data you can send to the write - * function, supported values are `'utf8'` or `'buffer'`. - * @default 'utf8' - */ - contentMode?: "utf8" | "buffer" | undefined; - /** - * A path to a file to be written to (mode controlled by the - * append option). - */ - dest?: string | undefined; - /** - * A file descriptor, something that is returned by `fs.open()` - * or `fs.openSync()`. - */ - fd?: number | undefined; - /** - * An object that has the same API as the `fs` module, useful - * for mocking, testing, or customizing the behavior of the stream. - */ - fs?: object | undefined; - /** - * Perform a `fs.fsyncSync()` every time a write is - * completed. - */ - fsync?: boolean | undefined; - /** - * The maximum length of the internal buffer. If a write - * operation would cause the buffer to exceed `maxLength`, the data written is - * dropped and a drop event is emitted with the dropped data - */ - maxLength?: number | undefined; - /** - * The maximum number of bytes that can be written; - * @default 16384 - */ - maxWrite?: number | undefined; - /** - * The minimum length of the internal buffer that is - * required to be full before flushing. - */ - minLength?: number | undefined; - /** - * Ensure directory for `dest` file exists when true. - * @default false - */ - mkdir?: boolean | undefined; - /** - * Specify the creating file mode (see `fs.open()`). - */ - mode?: number | string | undefined; - /** - * Calls flush every `periodicFlush` milliseconds. - */ - periodicFlush?: number | undefined; - /** - * A function that will be called when `write()`, - * `writeSync()`, or `flushSync()` encounters an `EAGAIN` or `EBUSY` error. - * If the return value is `true` the operation will be retried, otherwise it - * will bubble the error. The `err` is the error that caused this function to - * be called, `writeBufferLen` is the length of the buffer that was written, - * and `remainingBufferLen` is the length of the remaining buffer that the - * stream did not try to write. - */ - retryEAGAIN?: ((err: Error | null, writeBufferLen: number, remainingBufferLen: number) => boolean) | undefined; - /** - * Perform writes synchronously. - */ - sync?: boolean | undefined; - } - interface Utf8StreamEventMap { - "close": []; - "drain": []; - "drop": [data: string | Buffer]; - "error": [error: Error]; - "finish": []; - "ready": []; - "write": [n: number]; - } - /** - * An optimized UTF-8 stream writer that allows for flushing all the internal - * buffering on demand. It handles `EAGAIN` errors correctly, allowing for - * customization, for example, by dropping content if the disk is busy. - * @since v24.6.0 - * @experimental - */ - class Utf8Stream implements EventEmitter { - constructor(options: Utf8StreamOptions); - /** - * Whether the stream is appending to the file or truncating it. - */ - readonly append: boolean; - /** - * The type of data that can be written to the stream. Supported - * values are `'utf8'` or `'buffer'`. - * @default 'utf8' - */ - readonly contentMode: "utf8" | "buffer"; - /** - * Close the stream immediately, without flushing the internal buffer. - */ - destroy(): void; - /** - * Close the stream gracefully, flushing the internal buffer before closing. - */ - end(): void; - /** - * The file descriptor that is being written to. - */ - readonly fd: number; - /** - * The file that is being written to. - */ - readonly file: string; - /** - * Writes the current buffer to the file if a write was not in progress. Do - * nothing if `minLength` is zero or if it is already writing. - */ - flush(callback: (err: Error | null) => void): void; - /** - * Flushes the buffered data synchronously. This is a costly operation. - */ - flushSync(): void; - /** - * Whether the stream is performing a `fs.fsyncSync()` after every - * write operation. - */ - readonly fsync: boolean; - /** - * The maximum length of the internal buffer. If a write - * operation would cause the buffer to exceed `maxLength`, the data written is - * dropped and a drop event is emitted with the dropped data. - */ - readonly maxLength: number; - /** - * The minimum length of the internal buffer that is required to be - * full before flushing. - */ - readonly minLength: number; - /** - * Whether the stream should ensure that the directory for the - * `dest` file exists. If `true`, it will create the directory if it does not - * exist. - * @default false - */ - readonly mkdir: boolean; - /** - * The mode of the file that is being written to. - */ - readonly mode: number | string; - /** - * The number of milliseconds between flushes. If set to `0`, no - * periodic flushes will be performed. - */ - readonly periodicFlush: number; - /** - * Reopen the file in place, useful for log rotation. - * @param file A path to a file to be written to (mode - * controlled by the append option). - */ - reopen(file: PathLike): void; - /** - * Whether the stream is writing synchronously or asynchronously. - */ - readonly sync: boolean; - /** - * When the `options.contentMode` is set to `'utf8'` when the stream is created, - * the `data` argument must be a string. If the `contentMode` is set to `'buffer'`, - * the `data` argument must be a `Buffer`. - * @param data The data to write. - */ - write(data: string | Buffer): boolean; - /** - * Whether the stream is currently writing data to the file. - */ - readonly writing: boolean; - /** - * Calls `utf8Stream.destroy()`. - */ - [Symbol.dispose](): void; - } - interface Utf8Stream extends InternalEventEmitter {} - interface WriteStreamEventMap extends stream.WritableEventMap { - "close": []; - "open": [fd: number]; - "ready": []; - } - /** - * Instances of `fs.WriteStream` are created and returned using the {@link createWriteStream} function. - * @since v0.1.93 - */ - class WriteStream extends stream.Writable { - /** - * Closes `writeStream`. Optionally accepts a - * callback that will be executed once the `writeStream`is closed. - * @since v0.9.4 - */ - close(callback?: (err?: NodeJS.ErrnoException | null) => void): void; - /** - * The number of bytes written so far. Does not include data that is still queued - * for writing. - * @since v0.4.7 - */ - bytesWritten: number; - /** - * The path to the file the stream is writing to as specified in the first - * argument to {@link createWriteStream}. If `path` is passed as a string, then`writeStream.path` will be a string. If `path` is passed as a `Buffer`, then`writeStream.path` will be a - * `Buffer`. - * @since v0.1.93 - */ - path: string | Buffer; - /** - * This property is `true` if the underlying file has not been opened yet, - * i.e. before the `'ready'` event is emitted. - * @since v11.2.0 - */ - pending: boolean; - // #region InternalEventEmitter - addListener( - eventName: E, - listener: (...args: WriteStreamEventMap[E]) => void, - ): this; - addListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - emit(eventName: E, ...args: WriteStreamEventMap[E]): boolean; - emit(eventName: string | symbol, ...args: any[]): boolean; - listenerCount( - eventName: E, - listener?: (...args: WriteStreamEventMap[E]) => void, - ): number; - listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number; - listeners(eventName: E): ((...args: WriteStreamEventMap[E]) => void)[]; - listeners(eventName: string | symbol): ((...args: any[]) => void)[]; - off( - eventName: E, - listener: (...args: WriteStreamEventMap[E]) => void, - ): this; - off(eventName: string | symbol, listener: (...args: any[]) => void): this; - on( - eventName: E, - listener: (...args: WriteStreamEventMap[E]) => void, - ): this; - on(eventName: string | symbol, listener: (...args: any[]) => void): this; - once( - eventName: E, - listener: (...args: WriteStreamEventMap[E]) => void, - ): this; - once(eventName: string | symbol, listener: (...args: any[]) => void): this; - prependListener( - eventName: E, - listener: (...args: WriteStreamEventMap[E]) => void, - ): this; - prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - prependOnceListener( - eventName: E, - listener: (...args: WriteStreamEventMap[E]) => void, - ): this; - prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - rawListeners(eventName: E): ((...args: WriteStreamEventMap[E]) => void)[]; - rawListeners(eventName: string | symbol): ((...args: any[]) => void)[]; - // eslint-disable-next-line @definitelytyped/no-unnecessary-generics - removeAllListeners(eventName?: E): this; - removeAllListeners(eventName?: string | symbol): this; - removeListener( - eventName: E, - listener: (...args: WriteStreamEventMap[E]) => void, - ): this; - removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - // #endregion - } - /** - * Asynchronously rename file at `oldPath` to the pathname provided - * as `newPath`. In the case that `newPath` already exists, it will - * be overwritten. If there is a directory at `newPath`, an error will - * be raised instead. No arguments other than a possible exception are - * given to the completion callback. - * - * See also: [`rename(2)`](http://man7.org/linux/man-pages/man2/rename.2.html). - * - * ```js - * import { rename } from 'node:fs'; - * - * rename('oldFile.txt', 'newFile.txt', (err) => { - * if (err) throw err; - * console.log('Rename complete!'); - * }); - * ``` - * @since v0.0.2 - */ - function rename(oldPath: PathLike, newPath: PathLike, callback: NoParamCallback): void; - namespace rename { - /** - * Asynchronous rename(2) - Change the name or location of a file or directory. - * @param oldPath A path to a file. If a URL is provided, it must use the `file:` protocol. - * URL support is _experimental_. - * @param newPath A path to a file. If a URL is provided, it must use the `file:` protocol. - * URL support is _experimental_. - */ - function __promisify__(oldPath: PathLike, newPath: PathLike): Promise; - } - /** - * Renames the file from `oldPath` to `newPath`. Returns `undefined`. - * - * See the POSIX [`rename(2)`](http://man7.org/linux/man-pages/man2/rename.2.html) documentation for more details. - * @since v0.1.21 - */ - function renameSync(oldPath: PathLike, newPath: PathLike): void; - /** - * Truncates the file. No arguments other than a possible exception are - * given to the completion callback. A file descriptor can also be passed as the - * first argument. In this case, `fs.ftruncate()` is called. - * - * ```js - * import { truncate } from 'node:fs'; - * // Assuming that 'path/file.txt' is a regular file. - * truncate('path/file.txt', (err) => { - * if (err) throw err; - * console.log('path/file.txt was truncated'); - * }); - * ``` - * - * Passing a file descriptor is deprecated and may result in an error being thrown - * in the future. - * - * See the POSIX [`truncate(2)`](http://man7.org/linux/man-pages/man2/truncate.2.html) documentation for more details. - * @since v0.8.6 - * @param [len=0] - */ - function truncate(path: PathLike, len: number | undefined, callback: NoParamCallback): void; - /** - * Asynchronous truncate(2) - Truncate a file to a specified length. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - */ - function truncate(path: PathLike, callback: NoParamCallback): void; - namespace truncate { - /** - * Asynchronous truncate(2) - Truncate a file to a specified length. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param len If not specified, defaults to `0`. - */ - function __promisify__(path: PathLike, len?: number): Promise; - } - /** - * Truncates the file. Returns `undefined`. A file descriptor can also be - * passed as the first argument. In this case, `fs.ftruncateSync()` is called. - * - * Passing a file descriptor is deprecated and may result in an error being thrown - * in the future. - * @since v0.8.6 - * @param [len=0] - */ - function truncateSync(path: PathLike, len?: number): void; - /** - * Truncates the file descriptor. No arguments other than a possible exception are - * given to the completion callback. - * - * See the POSIX [`ftruncate(2)`](http://man7.org/linux/man-pages/man2/ftruncate.2.html) documentation for more detail. - * - * If the file referred to by the file descriptor was larger than `len` bytes, only - * the first `len` bytes will be retained in the file. - * - * For example, the following program retains only the first four bytes of the - * file: - * - * ```js - * import { open, close, ftruncate } from 'node:fs'; - * - * function closeFd(fd) { - * close(fd, (err) => { - * if (err) throw err; - * }); - * } - * - * open('temp.txt', 'r+', (err, fd) => { - * if (err) throw err; - * - * try { - * ftruncate(fd, 4, (err) => { - * closeFd(fd); - * if (err) throw err; - * }); - * } catch (err) { - * closeFd(fd); - * if (err) throw err; - * } - * }); - * ``` - * - * If the file previously was shorter than `len` bytes, it is extended, and the - * extended part is filled with null bytes (`'\0'`): - * - * If `len` is negative then `0` will be used. - * @since v0.8.6 - * @param [len=0] - */ - function ftruncate(fd: number, len: number | undefined, callback: NoParamCallback): void; - /** - * Asynchronous ftruncate(2) - Truncate a file to a specified length. - * @param fd A file descriptor. - */ - function ftruncate(fd: number, callback: NoParamCallback): void; - namespace ftruncate { - /** - * Asynchronous ftruncate(2) - Truncate a file to a specified length. - * @param fd A file descriptor. - * @param len If not specified, defaults to `0`. - */ - function __promisify__(fd: number, len?: number): Promise; - } - /** - * Truncates the file descriptor. Returns `undefined`. - * - * For detailed information, see the documentation of the asynchronous version of - * this API: {@link ftruncate}. - * @since v0.8.6 - * @param [len=0] - */ - function ftruncateSync(fd: number, len?: number): void; - /** - * Asynchronously changes owner and group of a file. No arguments other than a - * possible exception are given to the completion callback. - * - * See the POSIX [`chown(2)`](http://man7.org/linux/man-pages/man2/chown.2.html) documentation for more detail. - * @since v0.1.97 - */ - function chown(path: PathLike, uid: number, gid: number, callback: NoParamCallback): void; - namespace chown { - /** - * Asynchronous chown(2) - Change ownership of a file. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - */ - function __promisify__(path: PathLike, uid: number, gid: number): Promise; - } - /** - * Synchronously changes owner and group of a file. Returns `undefined`. - * This is the synchronous version of {@link chown}. - * - * See the POSIX [`chown(2)`](http://man7.org/linux/man-pages/man2/chown.2.html) documentation for more detail. - * @since v0.1.97 - */ - function chownSync(path: PathLike, uid: number, gid: number): void; - /** - * Sets the owner of the file. No arguments other than a possible exception are - * given to the completion callback. - * - * See the POSIX [`fchown(2)`](http://man7.org/linux/man-pages/man2/fchown.2.html) documentation for more detail. - * @since v0.4.7 - */ - function fchown(fd: number, uid: number, gid: number, callback: NoParamCallback): void; - namespace fchown { - /** - * Asynchronous fchown(2) - Change ownership of a file. - * @param fd A file descriptor. - */ - function __promisify__(fd: number, uid: number, gid: number): Promise; - } - /** - * Sets the owner of the file. Returns `undefined`. - * - * See the POSIX [`fchown(2)`](http://man7.org/linux/man-pages/man2/fchown.2.html) documentation for more detail. - * @since v0.4.7 - * @param uid The file's new owner's user id. - * @param gid The file's new group's group id. - */ - function fchownSync(fd: number, uid: number, gid: number): void; - /** - * Set the owner of the symbolic link. No arguments other than a possible - * exception are given to the completion callback. - * - * See the POSIX [`lchown(2)`](http://man7.org/linux/man-pages/man2/lchown.2.html) documentation for more detail. - */ - function lchown(path: PathLike, uid: number, gid: number, callback: NoParamCallback): void; - namespace lchown { - /** - * Asynchronous lchown(2) - Change ownership of a file. Does not dereference symbolic links. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - */ - function __promisify__(path: PathLike, uid: number, gid: number): Promise; - } - /** - * Set the owner for the path. Returns `undefined`. - * - * See the POSIX [`lchown(2)`](http://man7.org/linux/man-pages/man2/lchown.2.html) documentation for more details. - * @param uid The file's new owner's user id. - * @param gid The file's new group's group id. - */ - function lchownSync(path: PathLike, uid: number, gid: number): void; - /** - * Changes the access and modification times of a file in the same way as {@link utimes}, with the difference that if the path refers to a symbolic - * link, then the link is not dereferenced: instead, the timestamps of the - * symbolic link itself are changed. - * - * No arguments other than a possible exception are given to the completion - * callback. - * @since v14.5.0, v12.19.0 - */ - function lutimes(path: PathLike, atime: TimeLike, mtime: TimeLike, callback: NoParamCallback): void; - namespace lutimes { - /** - * Changes the access and modification times of a file in the same way as `fsPromises.utimes()`, - * with the difference that if the path refers to a symbolic link, then the link is not - * dereferenced: instead, the timestamps of the symbolic link itself are changed. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param atime The last access time. If a string is provided, it will be coerced to number. - * @param mtime The last modified time. If a string is provided, it will be coerced to number. - */ - function __promisify__(path: PathLike, atime: TimeLike, mtime: TimeLike): Promise; - } - /** - * Change the file system timestamps of the symbolic link referenced by `path`. - * Returns `undefined`, or throws an exception when parameters are incorrect or - * the operation fails. This is the synchronous version of {@link lutimes}. - * @since v14.5.0, v12.19.0 - */ - function lutimesSync(path: PathLike, atime: TimeLike, mtime: TimeLike): void; - /** - * Asynchronously changes the permissions of a file. No arguments other than a - * possible exception are given to the completion callback. - * - * See the POSIX [`chmod(2)`](http://man7.org/linux/man-pages/man2/chmod.2.html) documentation for more detail. - * - * ```js - * import { chmod } from 'node:fs'; - * - * chmod('my_file.txt', 0o775, (err) => { - * if (err) throw err; - * console.log('The permissions for file "my_file.txt" have been changed!'); - * }); - * ``` - * @since v0.1.30 - */ - function chmod(path: PathLike, mode: Mode, callback: NoParamCallback): void; - namespace chmod { - /** - * Asynchronous chmod(2) - Change permissions of a file. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param mode A file mode. If a string is passed, it is parsed as an octal integer. - */ - function __promisify__(path: PathLike, mode: Mode): Promise; - } - /** - * For detailed information, see the documentation of the asynchronous version of - * this API: {@link chmod}. - * - * See the POSIX [`chmod(2)`](http://man7.org/linux/man-pages/man2/chmod.2.html) documentation for more detail. - * @since v0.6.7 - */ - function chmodSync(path: PathLike, mode: Mode): void; - /** - * Sets the permissions on the file. No arguments other than a possible exception - * are given to the completion callback. - * - * See the POSIX [`fchmod(2)`](http://man7.org/linux/man-pages/man2/fchmod.2.html) documentation for more detail. - * @since v0.4.7 - */ - function fchmod(fd: number, mode: Mode, callback: NoParamCallback): void; - namespace fchmod { - /** - * Asynchronous fchmod(2) - Change permissions of a file. - * @param fd A file descriptor. - * @param mode A file mode. If a string is passed, it is parsed as an octal integer. - */ - function __promisify__(fd: number, mode: Mode): Promise; - } - /** - * Sets the permissions on the file. Returns `undefined`. - * - * See the POSIX [`fchmod(2)`](http://man7.org/linux/man-pages/man2/fchmod.2.html) documentation for more detail. - * @since v0.4.7 - */ - function fchmodSync(fd: number, mode: Mode): void; - /** - * Changes the permissions on a symbolic link. No arguments other than a possible - * exception are given to the completion callback. - * - * This method is only implemented on macOS. - * - * See the POSIX [`lchmod(2)`](https://www.freebsd.org/cgi/man.cgi?query=lchmod&sektion=2) documentation for more detail. - * @deprecated Since v0.4.7 - */ - function lchmod(path: PathLike, mode: Mode, callback: NoParamCallback): void; - /** @deprecated */ - namespace lchmod { - /** - * Asynchronous lchmod(2) - Change permissions of a file. Does not dereference symbolic links. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param mode A file mode. If a string is passed, it is parsed as an octal integer. - */ - function __promisify__(path: PathLike, mode: Mode): Promise; - } - /** - * Changes the permissions on a symbolic link. Returns `undefined`. - * - * This method is only implemented on macOS. - * - * See the POSIX [`lchmod(2)`](https://www.freebsd.org/cgi/man.cgi?query=lchmod&sektion=2) documentation for more detail. - * @deprecated Since v0.4.7 - */ - function lchmodSync(path: PathLike, mode: Mode): void; - /** - * Asynchronous [`stat(2)`](http://man7.org/linux/man-pages/man2/stat.2.html). The callback gets two arguments `(err, stats)` where`stats` is an `fs.Stats` object. - * - * In case of an error, the `err.code` will be one of `Common System Errors`. - * - * {@link stat} follows symbolic links. Use {@link lstat} to look at the - * links themselves. - * - * Using `fs.stat()` to check for the existence of a file before calling`fs.open()`, `fs.readFile()`, or `fs.writeFile()` is not recommended. - * Instead, user code should open/read/write the file directly and handle the - * error raised if the file is not available. - * - * To check if a file exists without manipulating it afterwards, {@link access} is recommended. - * - * For example, given the following directory structure: - * - * ```text - * - txtDir - * -- file.txt - * - app.js - * ``` - * - * The next program will check for the stats of the given paths: - * - * ```js - * import { stat } from 'node:fs'; - * - * const pathsToCheck = ['./txtDir', './txtDir/file.txt']; - * - * for (let i = 0; i < pathsToCheck.length; i++) { - * stat(pathsToCheck[i], (err, stats) => { - * console.log(stats.isDirectory()); - * console.log(stats); - * }); - * } - * ``` - * - * The resulting output will resemble: - * - * ```console - * true - * Stats { - * dev: 16777220, - * mode: 16877, - * nlink: 3, - * uid: 501, - * gid: 20, - * rdev: 0, - * blksize: 4096, - * ino: 14214262, - * size: 96, - * blocks: 0, - * atimeMs: 1561174653071.963, - * mtimeMs: 1561174614583.3518, - * ctimeMs: 1561174626623.5366, - * birthtimeMs: 1561174126937.2893, - * atime: 2019-06-22T03:37:33.072Z, - * mtime: 2019-06-22T03:36:54.583Z, - * ctime: 2019-06-22T03:37:06.624Z, - * birthtime: 2019-06-22T03:28:46.937Z - * } - * false - * Stats { - * dev: 16777220, - * mode: 33188, - * nlink: 1, - * uid: 501, - * gid: 20, - * rdev: 0, - * blksize: 4096, - * ino: 14214074, - * size: 8, - * blocks: 8, - * atimeMs: 1561174616618.8555, - * mtimeMs: 1561174614584, - * ctimeMs: 1561174614583.8145, - * birthtimeMs: 1561174007710.7478, - * atime: 2019-06-22T03:36:56.619Z, - * mtime: 2019-06-22T03:36:54.584Z, - * ctime: 2019-06-22T03:36:54.584Z, - * birthtime: 2019-06-22T03:26:47.711Z - * } - * ``` - * @since v0.0.2 - */ - function stat(path: PathLike, callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void): void; - function stat( - path: PathLike, - options: - | (StatOptions & { - bigint?: false | undefined; - }) - | undefined, - callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void, - ): void; - function stat( - path: PathLike, - options: StatOptions & { - bigint: true; - }, - callback: (err: NodeJS.ErrnoException | null, stats: BigIntStats) => void, - ): void; - function stat( - path: PathLike, - options: StatOptions | undefined, - callback: (err: NodeJS.ErrnoException | null, stats: Stats | BigIntStats) => void, - ): void; - namespace stat { - /** - * Asynchronous stat(2) - Get file status. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - */ - function __promisify__( - path: PathLike, - options?: StatOptions & { - bigint?: false | undefined; - }, - ): Promise; - function __promisify__( - path: PathLike, - options: StatOptions & { - bigint: true; - }, - ): Promise; - function __promisify__(path: PathLike, options?: StatOptions): Promise; - } - interface StatSyncFn extends Function { - (path: PathLike, options?: undefined): Stats; - ( - path: PathLike, - options?: StatSyncOptions & { - bigint?: false | undefined; - throwIfNoEntry: false; - }, - ): Stats | undefined; - ( - path: PathLike, - options: StatSyncOptions & { - bigint: true; - throwIfNoEntry: false; - }, - ): BigIntStats | undefined; - ( - path: PathLike, - options?: StatSyncOptions & { - bigint?: false | undefined; - }, - ): Stats; - ( - path: PathLike, - options: StatSyncOptions & { - bigint: true; - }, - ): BigIntStats; - ( - path: PathLike, - options: StatSyncOptions & { - bigint: boolean; - throwIfNoEntry?: false | undefined; - }, - ): Stats | BigIntStats; - (path: PathLike, options?: StatSyncOptions): Stats | BigIntStats | undefined; - } - /** - * Synchronous stat(2) - Get file status. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - */ - const statSync: StatSyncFn; - /** - * Invokes the callback with the `fs.Stats` for the file descriptor. - * - * See the POSIX [`fstat(2)`](http://man7.org/linux/man-pages/man2/fstat.2.html) documentation for more detail. - * @since v0.1.95 - */ - function fstat(fd: number, callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void): void; - function fstat( - fd: number, - options: - | (StatOptions & { - bigint?: false | undefined; - }) - | undefined, - callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void, - ): void; - function fstat( - fd: number, - options: StatOptions & { - bigint: true; - }, - callback: (err: NodeJS.ErrnoException | null, stats: BigIntStats) => void, - ): void; - function fstat( - fd: number, - options: StatOptions | undefined, - callback: (err: NodeJS.ErrnoException | null, stats: Stats | BigIntStats) => void, - ): void; - namespace fstat { - /** - * Asynchronous fstat(2) - Get file status. - * @param fd A file descriptor. - */ - function __promisify__( - fd: number, - options?: StatOptions & { - bigint?: false | undefined; - }, - ): Promise; - function __promisify__( - fd: number, - options: StatOptions & { - bigint: true; - }, - ): Promise; - function __promisify__(fd: number, options?: StatOptions): Promise; - } - /** - * Retrieves the `fs.Stats` for the file descriptor. - * - * See the POSIX [`fstat(2)`](http://man7.org/linux/man-pages/man2/fstat.2.html) documentation for more detail. - * @since v0.1.95 - */ - function fstatSync( - fd: number, - options?: StatOptions & { - bigint?: false | undefined; - }, - ): Stats; - function fstatSync( - fd: number, - options: StatOptions & { - bigint: true; - }, - ): BigIntStats; - function fstatSync(fd: number, options?: StatOptions): Stats | BigIntStats; - /** - * Retrieves the `fs.Stats` for the symbolic link referred to by the path. - * The callback gets two arguments `(err, stats)` where `stats` is a `fs.Stats` object. `lstat()` is identical to `stat()`, except that if `path` is a symbolic - * link, then the link itself is stat-ed, not the file that it refers to. - * - * See the POSIX [`lstat(2)`](http://man7.org/linux/man-pages/man2/lstat.2.html) documentation for more details. - * @since v0.1.30 - */ - function lstat(path: PathLike, callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void): void; - function lstat( - path: PathLike, - options: - | (StatOptions & { - bigint?: false | undefined; - }) - | undefined, - callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void, - ): void; - function lstat( - path: PathLike, - options: StatOptions & { - bigint: true; - }, - callback: (err: NodeJS.ErrnoException | null, stats: BigIntStats) => void, - ): void; - function lstat( - path: PathLike, - options: StatOptions | undefined, - callback: (err: NodeJS.ErrnoException | null, stats: Stats | BigIntStats) => void, - ): void; - namespace lstat { - /** - * Asynchronous lstat(2) - Get file status. Does not dereference symbolic links. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - */ - function __promisify__( - path: PathLike, - options?: StatOptions & { - bigint?: false | undefined; - }, - ): Promise; - function __promisify__( - path: PathLike, - options: StatOptions & { - bigint: true; - }, - ): Promise; - function __promisify__(path: PathLike, options?: StatOptions): Promise; - } - /** - * Asynchronous [`statfs(2)`](http://man7.org/linux/man-pages/man2/statfs.2.html). Returns information about the mounted file system which - * contains `path`. The callback gets two arguments `(err, stats)` where `stats`is an `fs.StatFs` object. - * - * In case of an error, the `err.code` will be one of `Common System Errors`. - * @since v19.6.0, v18.15.0 - * @param path A path to an existing file or directory on the file system to be queried. - */ - function statfs(path: PathLike, callback: (err: NodeJS.ErrnoException | null, stats: StatsFs) => void): void; - function statfs( - path: PathLike, - options: - | (StatFsOptions & { - bigint?: false | undefined; - }) - | undefined, - callback: (err: NodeJS.ErrnoException | null, stats: StatsFs) => void, - ): void; - function statfs( - path: PathLike, - options: StatFsOptions & { - bigint: true; - }, - callback: (err: NodeJS.ErrnoException | null, stats: BigIntStatsFs) => void, - ): void; - function statfs( - path: PathLike, - options: StatFsOptions | undefined, - callback: (err: NodeJS.ErrnoException | null, stats: StatsFs | BigIntStatsFs) => void, - ): void; - namespace statfs { - /** - * Asynchronous statfs(2) - Returns information about the mounted file system which contains path. The callback gets two arguments (err, stats) where stats is an object. - * @param path A path to an existing file or directory on the file system to be queried. - */ - function __promisify__( - path: PathLike, - options?: StatFsOptions & { - bigint?: false | undefined; - }, - ): Promise; - function __promisify__( - path: PathLike, - options: StatFsOptions & { - bigint: true; - }, - ): Promise; - function __promisify__(path: PathLike, options?: StatFsOptions): Promise; - } - /** - * Synchronous [`statfs(2)`](http://man7.org/linux/man-pages/man2/statfs.2.html). Returns information about the mounted file system which - * contains `path`. - * - * In case of an error, the `err.code` will be one of `Common System Errors`. - * @since v19.6.0, v18.15.0 - * @param path A path to an existing file or directory on the file system to be queried. - */ - function statfsSync( - path: PathLike, - options?: StatFsOptions & { - bigint?: false | undefined; - }, - ): StatsFs; - function statfsSync( - path: PathLike, - options: StatFsOptions & { - bigint: true; - }, - ): BigIntStatsFs; - function statfsSync(path: PathLike, options?: StatFsOptions): StatsFs | BigIntStatsFs; - /** - * Synchronous lstat(2) - Get file status. Does not dereference symbolic links. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - */ - const lstatSync: StatSyncFn; - /** - * Creates a new link from the `existingPath` to the `newPath`. See the POSIX [`link(2)`](http://man7.org/linux/man-pages/man2/link.2.html) documentation for more detail. No arguments other than - * a possible - * exception are given to the completion callback. - * @since v0.1.31 - */ - function link(existingPath: PathLike, newPath: PathLike, callback: NoParamCallback): void; - namespace link { - /** - * Asynchronous link(2) - Create a new link (also known as a hard link) to an existing file. - * @param existingPath A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param newPath A path to a file. If a URL is provided, it must use the `file:` protocol. - */ - function __promisify__(existingPath: PathLike, newPath: PathLike): Promise; - } - /** - * Creates a new link from the `existingPath` to the `newPath`. See the POSIX [`link(2)`](http://man7.org/linux/man-pages/man2/link.2.html) documentation for more detail. Returns `undefined`. - * @since v0.1.31 - */ - function linkSync(existingPath: PathLike, newPath: PathLike): void; - /** - * Creates the link called `path` pointing to `target`. No arguments other than a - * possible exception are given to the completion callback. - * - * See the POSIX [`symlink(2)`](http://man7.org/linux/man-pages/man2/symlink.2.html) documentation for more details. - * - * The `type` argument is only available on Windows and ignored on other platforms. - * It can be set to `'dir'`, `'file'`, or `'junction'`. If the `type` argument is - * not a string, Node.js will autodetect `target` type and use `'file'` or `'dir'`. - * If the `target` does not exist, `'file'` will be used. Windows junction points - * require the destination path to be absolute. When using `'junction'`, the`target` argument will automatically be normalized to absolute path. Junction - * points on NTFS volumes can only point to directories. - * - * Relative targets are relative to the link's parent directory. - * - * ```js - * import { symlink } from 'node:fs'; - * - * symlink('./mew', './mewtwo', callback); - * ``` - * - * The above example creates a symbolic link `mewtwo` which points to `mew` in the - * same directory: - * - * ```bash - * $ tree . - * . - * ├── mew - * └── mewtwo -> ./mew - * ``` - * @since v0.1.31 - * @param [type='null'] - */ - function symlink( - target: PathLike, - path: PathLike, - type: symlink.Type | undefined | null, - callback: NoParamCallback, - ): void; - /** - * Asynchronous symlink(2) - Create a new symbolic link to an existing file. - * @param target A path to an existing file. If a URL is provided, it must use the `file:` protocol. - * @param path A path to the new symlink. If a URL is provided, it must use the `file:` protocol. - */ - function symlink(target: PathLike, path: PathLike, callback: NoParamCallback): void; - namespace symlink { - /** - * Asynchronous symlink(2) - Create a new symbolic link to an existing file. - * @param target A path to an existing file. If a URL is provided, it must use the `file:` protocol. - * @param path A path to the new symlink. If a URL is provided, it must use the `file:` protocol. - * @param type May be set to `'dir'`, `'file'`, or `'junction'` (default is `'file'`) and is only available on Windows (ignored on other platforms). - * When using `'junction'`, the `target` argument will automatically be normalized to an absolute path. - */ - function __promisify__(target: PathLike, path: PathLike, type?: string | null): Promise; - type Type = "dir" | "file" | "junction"; - } - /** - * Returns `undefined`. - * - * For detailed information, see the documentation of the asynchronous version of - * this API: {@link symlink}. - * @since v0.1.31 - * @param [type='null'] - */ - function symlinkSync(target: PathLike, path: PathLike, type?: symlink.Type | null): void; - /** - * Reads the contents of the symbolic link referred to by `path`. The callback gets - * two arguments `(err, linkString)`. - * - * See the POSIX [`readlink(2)`](http://man7.org/linux/man-pages/man2/readlink.2.html) documentation for more details. - * - * The optional `options` argument can be a string specifying an encoding, or an - * object with an `encoding` property specifying the character encoding to use for - * the link path passed to the callback. If the `encoding` is set to `'buffer'`, - * the link path returned will be passed as a `Buffer` object. - * @since v0.1.31 - */ - function readlink( - path: PathLike, - options: EncodingOption, - callback: (err: NodeJS.ErrnoException | null, linkString: string) => void, - ): void; - /** - * Asynchronous readlink(2) - read value of a symbolic link. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function readlink( - path: PathLike, - options: BufferEncodingOption, - callback: (err: NodeJS.ErrnoException | null, linkString: NonSharedBuffer) => void, - ): void; - /** - * Asynchronous readlink(2) - read value of a symbolic link. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function readlink( - path: PathLike, - options: EncodingOption, - callback: (err: NodeJS.ErrnoException | null, linkString: string | NonSharedBuffer) => void, - ): void; - /** - * Asynchronous readlink(2) - read value of a symbolic link. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - */ - function readlink( - path: PathLike, - callback: (err: NodeJS.ErrnoException | null, linkString: string) => void, - ): void; - namespace readlink { - /** - * Asynchronous readlink(2) - read value of a symbolic link. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function __promisify__(path: PathLike, options?: EncodingOption): Promise; - /** - * Asynchronous readlink(2) - read value of a symbolic link. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function __promisify__(path: PathLike, options: BufferEncodingOption): Promise; - /** - * Asynchronous readlink(2) - read value of a symbolic link. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function __promisify__(path: PathLike, options?: EncodingOption): Promise; - } - /** - * Returns the symbolic link's string value. - * - * See the POSIX [`readlink(2)`](http://man7.org/linux/man-pages/man2/readlink.2.html) documentation for more details. - * - * The optional `options` argument can be a string specifying an encoding, or an - * object with an `encoding` property specifying the character encoding to use for - * the link path returned. If the `encoding` is set to `'buffer'`, - * the link path returned will be passed as a `Buffer` object. - * @since v0.1.31 - */ - function readlinkSync(path: PathLike, options?: EncodingOption): string; - /** - * Synchronous readlink(2) - read value of a symbolic link. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function readlinkSync(path: PathLike, options: BufferEncodingOption): NonSharedBuffer; - /** - * Synchronous readlink(2) - read value of a symbolic link. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function readlinkSync(path: PathLike, options?: EncodingOption): string | NonSharedBuffer; - /** - * Asynchronously computes the canonical pathname by resolving `.`, `..`, and - * symbolic links. - * - * A canonical pathname is not necessarily unique. Hard links and bind mounts can - * expose a file system entity through many pathnames. - * - * This function behaves like [`realpath(3)`](http://man7.org/linux/man-pages/man3/realpath.3.html), with some exceptions: - * - * 1. No case conversion is performed on case-insensitive file systems. - * 2. The maximum number of symbolic links is platform-independent and generally - * (much) higher than what the native [`realpath(3)`](http://man7.org/linux/man-pages/man3/realpath.3.html) implementation supports. - * - * The `callback` gets two arguments `(err, resolvedPath)`. May use `process.cwd` to resolve relative paths. - * - * Only paths that can be converted to UTF8 strings are supported. - * - * The optional `options` argument can be a string specifying an encoding, or an - * object with an `encoding` property specifying the character encoding to use for - * the path passed to the callback. If the `encoding` is set to `'buffer'`, - * the path returned will be passed as a `Buffer` object. - * - * If `path` resolves to a socket or a pipe, the function will return a system - * dependent name for that object. - * @since v0.1.31 - */ - function realpath( - path: PathLike, - options: EncodingOption, - callback: (err: NodeJS.ErrnoException | null, resolvedPath: string) => void, - ): void; - /** - * Asynchronous realpath(3) - return the canonicalized absolute pathname. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function realpath( - path: PathLike, - options: BufferEncodingOption, - callback: (err: NodeJS.ErrnoException | null, resolvedPath: NonSharedBuffer) => void, - ): void; - /** - * Asynchronous realpath(3) - return the canonicalized absolute pathname. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function realpath( - path: PathLike, - options: EncodingOption, - callback: (err: NodeJS.ErrnoException | null, resolvedPath: string | NonSharedBuffer) => void, - ): void; - /** - * Asynchronous realpath(3) - return the canonicalized absolute pathname. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - */ - function realpath( - path: PathLike, - callback: (err: NodeJS.ErrnoException | null, resolvedPath: string) => void, - ): void; - namespace realpath { - /** - * Asynchronous realpath(3) - return the canonicalized absolute pathname. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function __promisify__(path: PathLike, options?: EncodingOption): Promise; - /** - * Asynchronous realpath(3) - return the canonicalized absolute pathname. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function __promisify__(path: PathLike, options: BufferEncodingOption): Promise; - /** - * Asynchronous realpath(3) - return the canonicalized absolute pathname. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function __promisify__(path: PathLike, options?: EncodingOption): Promise; - /** - * Asynchronous [`realpath(3)`](http://man7.org/linux/man-pages/man3/realpath.3.html). - * - * The `callback` gets two arguments `(err, resolvedPath)`. - * - * Only paths that can be converted to UTF8 strings are supported. - * - * The optional `options` argument can be a string specifying an encoding, or an - * object with an `encoding` property specifying the character encoding to use for - * the path passed to the callback. If the `encoding` is set to `'buffer'`, - * the path returned will be passed as a `Buffer` object. - * - * On Linux, when Node.js is linked against musl libc, the procfs file system must - * be mounted on `/proc` in order for this function to work. Glibc does not have - * this restriction. - * @since v9.2.0 - */ - function native( - path: PathLike, - options: EncodingOption, - callback: (err: NodeJS.ErrnoException | null, resolvedPath: string) => void, - ): void; - function native( - path: PathLike, - options: BufferEncodingOption, - callback: (err: NodeJS.ErrnoException | null, resolvedPath: NonSharedBuffer) => void, - ): void; - function native( - path: PathLike, - options: EncodingOption, - callback: (err: NodeJS.ErrnoException | null, resolvedPath: string | NonSharedBuffer) => void, - ): void; - function native( - path: PathLike, - callback: (err: NodeJS.ErrnoException | null, resolvedPath: string) => void, - ): void; - } - /** - * Returns the resolved pathname. - * - * For detailed information, see the documentation of the asynchronous version of - * this API: {@link realpath}. - * @since v0.1.31 - */ - function realpathSync(path: PathLike, options?: EncodingOption): string; - /** - * Synchronous realpath(3) - return the canonicalized absolute pathname. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function realpathSync(path: PathLike, options: BufferEncodingOption): NonSharedBuffer; - /** - * Synchronous realpath(3) - return the canonicalized absolute pathname. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function realpathSync(path: PathLike, options?: EncodingOption): string | NonSharedBuffer; - namespace realpathSync { - function native(path: PathLike, options?: EncodingOption): string; - function native(path: PathLike, options: BufferEncodingOption): NonSharedBuffer; - function native(path: PathLike, options?: EncodingOption): string | NonSharedBuffer; - } - /** - * Asynchronously removes a file or symbolic link. No arguments other than a - * possible exception are given to the completion callback. - * - * ```js - * import { unlink } from 'node:fs'; - * // Assuming that 'path/file.txt' is a regular file. - * unlink('path/file.txt', (err) => { - * if (err) throw err; - * console.log('path/file.txt was deleted'); - * }); - * ``` - * - * `fs.unlink()` will not work on a directory, empty or otherwise. To remove a - * directory, use {@link rmdir}. - * - * See the POSIX [`unlink(2)`](http://man7.org/linux/man-pages/man2/unlink.2.html) documentation for more details. - * @since v0.0.2 - */ - function unlink(path: PathLike, callback: NoParamCallback): void; - namespace unlink { - /** - * Asynchronous unlink(2) - delete a name and possibly the file it refers to. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - */ - function __promisify__(path: PathLike): Promise; - } - /** - * Synchronous [`unlink(2)`](http://man7.org/linux/man-pages/man2/unlink.2.html). Returns `undefined`. - * @since v0.1.21 - */ - function unlinkSync(path: PathLike): void; - /** @deprecated `rmdir()` no longer provides any options. This interface will be removed in a future version. */ - // TODO: remove in future major - interface RmDirOptions {} - /** - * Asynchronous [`rmdir(2)`](http://man7.org/linux/man-pages/man2/rmdir.2.html). No arguments other than a possible exception are given - * to the completion callback. - * - * Using `fs.rmdir()` on a file (not a directory) results in an `ENOENT` error on - * Windows and an `ENOTDIR` error on POSIX. - * - * To get a behavior similar to the `rm -rf` Unix command, use {@link rm} with options `{ recursive: true, force: true }`. - * @since v0.0.2 - */ - function rmdir(path: PathLike, callback: NoParamCallback): void; - namespace rmdir { - /** - * Asynchronous rmdir(2) - delete a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - */ - function __promisify__(path: PathLike): Promise; - } - /** - * Synchronous [`rmdir(2)`](http://man7.org/linux/man-pages/man2/rmdir.2.html). Returns `undefined`. - * - * Using `fs.rmdirSync()` on a file (not a directory) results in an `ENOENT` error - * on Windows and an `ENOTDIR` error on POSIX. - * - * To get a behavior similar to the `rm -rf` Unix command, use {@link rmSync} with options `{ recursive: true, force: true }`. - * @since v0.1.21 - */ - function rmdirSync(path: PathLike): void; - interface RmOptions { - /** - * When `true`, exceptions will be ignored if `path` does not exist. - * @default false - */ - force?: boolean | undefined; - /** - * If an `EBUSY`, `EMFILE`, `ENFILE`, `ENOTEMPTY`, or - * `EPERM` error is encountered, Node.js will retry the operation with a linear - * backoff wait of `retryDelay` ms longer on each try. This option represents the - * number of retries. This option is ignored if the `recursive` option is not - * `true`. - * @default 0 - */ - maxRetries?: number | undefined; - /** - * If `true`, perform a recursive directory removal. In - * recursive mode, operations are retried on failure. - * @default false - */ - recursive?: boolean | undefined; - /** - * The amount of time in milliseconds to wait between retries. - * This option is ignored if the `recursive` option is not `true`. - * @default 100 - */ - retryDelay?: number | undefined; - } - /** - * Asynchronously removes files and directories (modeled on the standard POSIX `rm` utility). No arguments other than a possible exception are given to the - * completion callback. - * @since v14.14.0 - */ - function rm(path: PathLike, callback: NoParamCallback): void; - function rm(path: PathLike, options: RmOptions, callback: NoParamCallback): void; - namespace rm { - /** - * Asynchronously removes files and directories (modeled on the standard POSIX `rm` utility). - */ - function __promisify__(path: PathLike, options?: RmOptions): Promise; - } - /** - * Synchronously removes files and directories (modeled on the standard POSIX `rm` utility). Returns `undefined`. - * @since v14.14.0 - */ - function rmSync(path: PathLike, options?: RmOptions): void; - interface MakeDirectoryOptions { - /** - * Indicates whether parent folders should be created. - * If a folder was created, the path to the first created folder will be returned. - * @default false - */ - recursive?: boolean | undefined; - /** - * A file mode. If a string is passed, it is parsed as an octal integer. If not specified - * @default 0o777 - */ - mode?: Mode | undefined; - } - /** - * Asynchronously creates a directory. - * - * The callback is given a possible exception and, if `recursive` is `true`, the - * first directory path created, `(err[, path])`.`path` can still be `undefined` when `recursive` is `true`, if no directory was - * created (for instance, if it was previously created). - * - * The optional `options` argument can be an integer specifying `mode` (permission - * and sticky bits), or an object with a `mode` property and a `recursive` property indicating whether parent directories should be created. Calling `fs.mkdir()` when `path` is a directory that - * exists results in an error only - * when `recursive` is false. If `recursive` is false and the directory exists, - * an `EEXIST` error occurs. - * - * ```js - * import { mkdir } from 'node:fs'; - * - * // Create ./tmp/a/apple, regardless of whether ./tmp and ./tmp/a exist. - * mkdir('./tmp/a/apple', { recursive: true }, (err) => { - * if (err) throw err; - * }); - * ``` - * - * On Windows, using `fs.mkdir()` on the root directory even with recursion will - * result in an error: - * - * ```js - * import { mkdir } from 'node:fs'; - * - * mkdir('/', { recursive: true }, (err) => { - * // => [Error: EPERM: operation not permitted, mkdir 'C:\'] - * }); - * ``` - * - * See the POSIX [`mkdir(2)`](http://man7.org/linux/man-pages/man2/mkdir.2.html) documentation for more details. - * @since v0.1.8 - */ - function mkdir( - path: PathLike, - options: MakeDirectoryOptions & { - recursive: true; - }, - callback: (err: NodeJS.ErrnoException | null, path?: string) => void, - ): void; - /** - * Asynchronous mkdir(2) - create a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders - * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`. - */ - function mkdir( - path: PathLike, - options: - | Mode - | (MakeDirectoryOptions & { - recursive?: false | undefined; - }) - | null - | undefined, - callback: NoParamCallback, - ): void; - /** - * Asynchronous mkdir(2) - create a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders - * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`. - */ - function mkdir( - path: PathLike, - options: Mode | MakeDirectoryOptions | null | undefined, - callback: (err: NodeJS.ErrnoException | null, path?: string) => void, - ): void; - /** - * Asynchronous mkdir(2) - create a directory with a mode of `0o777`. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - */ - function mkdir(path: PathLike, callback: NoParamCallback): void; - namespace mkdir { - /** - * Asynchronous mkdir(2) - create a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders - * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`. - */ - function __promisify__( - path: PathLike, - options: MakeDirectoryOptions & { - recursive: true; - }, - ): Promise; - /** - * Asynchronous mkdir(2) - create a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders - * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`. - */ - function __promisify__( - path: PathLike, - options?: - | Mode - | (MakeDirectoryOptions & { - recursive?: false | undefined; - }) - | null, - ): Promise; - /** - * Asynchronous mkdir(2) - create a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders - * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`. - */ - function __promisify__( - path: PathLike, - options?: Mode | MakeDirectoryOptions | null, - ): Promise; - } - /** - * Synchronously creates a directory. Returns `undefined`, or if `recursive` is `true`, the first directory path created. - * This is the synchronous version of {@link mkdir}. - * - * See the POSIX [`mkdir(2)`](http://man7.org/linux/man-pages/man2/mkdir.2.html) documentation for more details. - * @since v0.1.21 - */ - function mkdirSync( - path: PathLike, - options: MakeDirectoryOptions & { - recursive: true; - }, - ): string | undefined; - /** - * Synchronous mkdir(2) - create a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders - * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`. - */ - function mkdirSync( - path: PathLike, - options?: - | Mode - | (MakeDirectoryOptions & { - recursive?: false | undefined; - }) - | null, - ): void; - /** - * Synchronous mkdir(2) - create a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders - * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`. - */ - function mkdirSync(path: PathLike, options?: Mode | MakeDirectoryOptions | null): string | undefined; - /** - * Creates a unique temporary directory. - * - * Generates six random characters to be appended behind a required `prefix` to create a unique temporary directory. Due to platform - * inconsistencies, avoid trailing `X` characters in `prefix`. Some platforms, - * notably the BSDs, can return more than six random characters, and replace - * trailing `X` characters in `prefix` with random characters. - * - * The created directory path is passed as a string to the callback's second - * parameter. - * - * The optional `options` argument can be a string specifying an encoding, or an - * object with an `encoding` property specifying the character encoding to use. - * - * ```js - * import { mkdtemp } from 'node:fs'; - * import { join } from 'node:path'; - * import { tmpdir } from 'node:os'; - * - * mkdtemp(join(tmpdir(), 'foo-'), (err, directory) => { - * if (err) throw err; - * console.log(directory); - * // Prints: /tmp/foo-itXde2 or C:\Users\...\AppData\Local\Temp\foo-itXde2 - * }); - * ``` - * - * The `fs.mkdtemp()` method will append the six randomly selected characters - * directly to the `prefix` string. For instance, given a directory `/tmp`, if the - * intention is to create a temporary directory _within_`/tmp`, the `prefix`must end with a trailing platform-specific path separator - * (`import { sep } from 'node:path'`). - * - * ```js - * import { tmpdir } from 'node:os'; - * import { mkdtemp } from 'node:fs'; - * - * // The parent directory for the new temporary directory - * const tmpDir = tmpdir(); - * - * // This method is *INCORRECT*: - * mkdtemp(tmpDir, (err, directory) => { - * if (err) throw err; - * console.log(directory); - * // Will print something similar to `/tmpabc123`. - * // A new temporary directory is created at the file system root - * // rather than *within* the /tmp directory. - * }); - * - * // This method is *CORRECT*: - * import { sep } from 'node:path'; - * mkdtemp(`${tmpDir}${sep}`, (err, directory) => { - * if (err) throw err; - * console.log(directory); - * // Will print something similar to `/tmp/abc123`. - * // A new temporary directory is created within - * // the /tmp directory. - * }); - * ``` - * @since v5.10.0 - */ - function mkdtemp( - prefix: string, - options: EncodingOption, - callback: (err: NodeJS.ErrnoException | null, folder: string) => void, - ): void; - /** - * Asynchronously creates a unique temporary directory. - * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function mkdtemp( - prefix: string, - options: BufferEncodingOption, - callback: (err: NodeJS.ErrnoException | null, folder: NonSharedBuffer) => void, - ): void; - /** - * Asynchronously creates a unique temporary directory. - * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function mkdtemp( - prefix: string, - options: EncodingOption, - callback: (err: NodeJS.ErrnoException | null, folder: string | NonSharedBuffer) => void, - ): void; - /** - * Asynchronously creates a unique temporary directory. - * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. - */ - function mkdtemp( - prefix: string, - callback: (err: NodeJS.ErrnoException | null, folder: string) => void, - ): void; - namespace mkdtemp { - /** - * Asynchronously creates a unique temporary directory. - * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function __promisify__(prefix: string, options?: EncodingOption): Promise; - /** - * Asynchronously creates a unique temporary directory. - * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function __promisify__(prefix: string, options: BufferEncodingOption): Promise; - /** - * Asynchronously creates a unique temporary directory. - * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function __promisify__(prefix: string, options?: EncodingOption): Promise; - } - /** - * Returns the created directory path. - * - * For detailed information, see the documentation of the asynchronous version of - * this API: {@link mkdtemp}. - * - * The optional `options` argument can be a string specifying an encoding, or an - * object with an `encoding` property specifying the character encoding to use. - * @since v5.10.0 - */ - function mkdtempSync(prefix: string, options?: EncodingOption): string; - /** - * Synchronously creates a unique temporary directory. - * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function mkdtempSync(prefix: string, options: BufferEncodingOption): NonSharedBuffer; - /** - * Synchronously creates a unique temporary directory. - * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function mkdtempSync(prefix: string, options?: EncodingOption): string | NonSharedBuffer; - interface DisposableTempDir extends AsyncDisposable { - /** - * The path of the created directory. - */ - path: string; - /** - * A function which removes the created directory. - */ - remove(): Promise; - /** - * The same as `remove`. - */ - [Symbol.asyncDispose](): Promise; - } - /** - * Returns a disposable object whose `path` property holds the created directory - * path. When the object is disposed, the directory and its contents will be - * removed if it still exists. If the directory cannot be deleted, disposal will - * throw an error. The object has a `remove()` method which will perform the same - * task. - * - * - * - * For detailed information, see the documentation of `fs.mkdtemp()`. - * - * There is no callback-based version of this API because it is designed for use - * with the `using` syntax. - * - * The optional `options` argument can be a string specifying an encoding, or an - * object with an `encoding` property specifying the character encoding to use. - * @since v24.4.0 - */ - function mkdtempDisposableSync(prefix: string, options?: EncodingOption): DisposableTempDir; - /** - * Reads the contents of a directory. The callback gets two arguments `(err, files)` where `files` is an array of the names of the files in the directory excluding `'.'` and `'..'`. - * - * See the POSIX [`readdir(3)`](http://man7.org/linux/man-pages/man3/readdir.3.html) documentation for more details. - * - * The optional `options` argument can be a string specifying an encoding, or an - * object with an `encoding` property specifying the character encoding to use for - * the filenames passed to the callback. If the `encoding` is set to `'buffer'`, - * the filenames returned will be passed as `Buffer` objects. - * - * If `options.withFileTypes` is set to `true`, the `files` array will contain `fs.Dirent` objects. - * @since v0.1.8 - */ - function readdir( - path: PathLike, - options: - | { - encoding: BufferEncoding | null; - withFileTypes?: false | undefined; - recursive?: boolean | undefined; - } - | BufferEncoding - | undefined - | null, - callback: (err: NodeJS.ErrnoException | null, files: string[]) => void, - ): void; - /** - * Asynchronous readdir(3) - read a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function readdir( - path: PathLike, - options: - | { - encoding: "buffer"; - withFileTypes?: false | undefined; - recursive?: boolean | undefined; - } - | "buffer", - callback: (err: NodeJS.ErrnoException | null, files: NonSharedBuffer[]) => void, - ): void; - /** - * Asynchronous readdir(3) - read a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function readdir( - path: PathLike, - options: - | (ObjectEncodingOptions & { - withFileTypes?: false | undefined; - recursive?: boolean | undefined; - }) - | BufferEncoding - | undefined - | null, - callback: (err: NodeJS.ErrnoException | null, files: string[] | NonSharedBuffer[]) => void, - ): void; - /** - * Asynchronous readdir(3) - read a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - */ - function readdir( - path: PathLike, - callback: (err: NodeJS.ErrnoException | null, files: string[]) => void, - ): void; - /** - * Asynchronous readdir(3) - read a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options If called with `withFileTypes: true` the result data will be an array of Dirent. - */ - function readdir( - path: PathLike, - options: ObjectEncodingOptions & { - withFileTypes: true; - recursive?: boolean | undefined; - }, - callback: (err: NodeJS.ErrnoException | null, files: Dirent[]) => void, - ): void; - /** - * Asynchronous readdir(3) - read a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options Must include `withFileTypes: true` and `encoding: 'buffer'`. - */ - function readdir( - path: PathLike, - options: { - encoding: "buffer"; - withFileTypes: true; - recursive?: boolean | undefined; - }, - callback: (err: NodeJS.ErrnoException | null, files: Dirent[]) => void, - ): void; - namespace readdir { - /** - * Asynchronous readdir(3) - read a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function __promisify__( - path: PathLike, - options?: - | { - encoding: BufferEncoding | null; - withFileTypes?: false | undefined; - recursive?: boolean | undefined; - } - | BufferEncoding - | null, - ): Promise; - /** - * Asynchronous readdir(3) - read a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function __promisify__( - path: PathLike, - options: - | "buffer" - | { - encoding: "buffer"; - withFileTypes?: false | undefined; - recursive?: boolean | undefined; - }, - ): Promise; - /** - * Asynchronous readdir(3) - read a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function __promisify__( - path: PathLike, - options?: - | (ObjectEncodingOptions & { - withFileTypes?: false | undefined; - recursive?: boolean | undefined; - }) - | BufferEncoding - | null, - ): Promise; - /** - * Asynchronous readdir(3) - read a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options If called with `withFileTypes: true` the result data will be an array of Dirent - */ - function __promisify__( - path: PathLike, - options: ObjectEncodingOptions & { - withFileTypes: true; - recursive?: boolean | undefined; - }, - ): Promise; - /** - * Asynchronous readdir(3) - read a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options Must include `withFileTypes: true` and `encoding: 'buffer'`. - */ - function __promisify__( - path: PathLike, - options: { - encoding: "buffer"; - withFileTypes: true; - recursive?: boolean | undefined; - }, - ): Promise[]>; - } - /** - * Reads the contents of the directory. - * - * See the POSIX [`readdir(3)`](http://man7.org/linux/man-pages/man3/readdir.3.html) documentation for more details. - * - * The optional `options` argument can be a string specifying an encoding, or an - * object with an `encoding` property specifying the character encoding to use for - * the filenames returned. If the `encoding` is set to `'buffer'`, - * the filenames returned will be passed as `Buffer` objects. - * - * If `options.withFileTypes` is set to `true`, the result will contain `fs.Dirent` objects. - * @since v0.1.21 - */ - function readdirSync( - path: PathLike, - options?: - | { - encoding: BufferEncoding | null; - withFileTypes?: false | undefined; - recursive?: boolean | undefined; - } - | BufferEncoding - | null, - ): string[]; - /** - * Synchronous readdir(3) - read a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function readdirSync( - path: PathLike, - options: - | { - encoding: "buffer"; - withFileTypes?: false | undefined; - recursive?: boolean | undefined; - } - | "buffer", - ): NonSharedBuffer[]; - /** - * Synchronous readdir(3) - read a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function readdirSync( - path: PathLike, - options?: - | (ObjectEncodingOptions & { - withFileTypes?: false | undefined; - recursive?: boolean | undefined; - }) - | BufferEncoding - | null, - ): string[] | NonSharedBuffer[]; - /** - * Synchronous readdir(3) - read a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options If called with `withFileTypes: true` the result data will be an array of Dirent. - */ - function readdirSync( - path: PathLike, - options: ObjectEncodingOptions & { - withFileTypes: true; - recursive?: boolean | undefined; - }, - ): Dirent[]; - /** - * Synchronous readdir(3) - read a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options Must include `withFileTypes: true` and `encoding: 'buffer'`. - */ - function readdirSync( - path: PathLike, - options: { - encoding: "buffer"; - withFileTypes: true; - recursive?: boolean | undefined; - }, - ): Dirent[]; - /** - * Closes the file descriptor. No arguments other than a possible exception are - * given to the completion callback. - * - * Calling `fs.close()` on any file descriptor (`fd`) that is currently in use - * through any other `fs` operation may lead to undefined behavior. - * - * See the POSIX [`close(2)`](http://man7.org/linux/man-pages/man2/close.2.html) documentation for more detail. - * @since v0.0.2 - */ - function close(fd: number, callback?: NoParamCallback): void; - namespace close { - /** - * Asynchronous close(2) - close a file descriptor. - * @param fd A file descriptor. - */ - function __promisify__(fd: number): Promise; - } - /** - * Closes the file descriptor. Returns `undefined`. - * - * Calling `fs.closeSync()` on any file descriptor (`fd`) that is currently in use - * through any other `fs` operation may lead to undefined behavior. - * - * See the POSIX [`close(2)`](http://man7.org/linux/man-pages/man2/close.2.html) documentation for more detail. - * @since v0.1.21 - */ - function closeSync(fd: number): void; - /** - * Asynchronous file open. See the POSIX [`open(2)`](http://man7.org/linux/man-pages/man2/open.2.html) documentation for more details. - * - * `mode` sets the file mode (permission and sticky bits), but only if the file was - * created. On Windows, only the write permission can be manipulated; see {@link chmod}. - * - * The callback gets two arguments `(err, fd)`. - * - * Some characters (`< > : " / \ | ? *`) are reserved under Windows as documented - * by [Naming Files, Paths, and Namespaces](https://docs.microsoft.com/en-us/windows/desktop/FileIO/naming-a-file). Under NTFS, if the filename contains - * a colon, Node.js will open a file system stream, as described by [this MSDN page](https://docs.microsoft.com/en-us/windows/desktop/FileIO/using-streams). - * - * Functions based on `fs.open()` exhibit this behavior as well:`fs.writeFile()`, `fs.readFile()`, etc. - * @since v0.0.2 - * @param [flags='r'] See `support of file system `flags``. - * @param [mode=0o666] - */ - function open( - path: PathLike, - flags: OpenMode | undefined, - mode: Mode | undefined | null, - callback: (err: NodeJS.ErrnoException | null, fd: number) => void, - ): void; - /** - * Asynchronous open(2) - open and possibly create a file. If the file is created, its mode will be `0o666`. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param [flags='r'] See `support of file system `flags``. - */ - function open( - path: PathLike, - flags: OpenMode | undefined, - callback: (err: NodeJS.ErrnoException | null, fd: number) => void, - ): void; - /** - * Asynchronous open(2) - open and possibly create a file. If the file is created, its mode will be `0o666`. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - */ - function open(path: PathLike, callback: (err: NodeJS.ErrnoException | null, fd: number) => void): void; - namespace open { - /** - * Asynchronous open(2) - open and possibly create a file. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param mode A file mode. If a string is passed, it is parsed as an octal integer. If not supplied, defaults to `0o666`. - */ - function __promisify__(path: PathLike, flags: OpenMode, mode?: Mode | null): Promise; - } - /** - * Returns an integer representing the file descriptor. - * - * For detailed information, see the documentation of the asynchronous version of - * this API: {@link open}. - * @since v0.1.21 - * @param [flags='r'] - * @param [mode=0o666] - */ - function openSync(path: PathLike, flags: OpenMode, mode?: Mode | null): number; - /** - * Change the file system timestamps of the object referenced by `path`. - * - * The `atime` and `mtime` arguments follow these rules: - * - * * Values can be either numbers representing Unix epoch time in seconds, `Date`s, or a numeric string like `'123456789.0'`. - * * If the value can not be converted to a number, or is `NaN`, `Infinity`, or `-Infinity`, an `Error` will be thrown. - * @since v0.4.2 - */ - function utimes(path: PathLike, atime: TimeLike, mtime: TimeLike, callback: NoParamCallback): void; - namespace utimes { - /** - * Asynchronously change file timestamps of the file referenced by the supplied path. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param atime The last access time. If a string is provided, it will be coerced to number. - * @param mtime The last modified time. If a string is provided, it will be coerced to number. - */ - function __promisify__(path: PathLike, atime: TimeLike, mtime: TimeLike): Promise; - } - /** - * Returns `undefined`. - * - * For detailed information, see the documentation of the asynchronous version of - * this API: {@link utimes}. - * @since v0.4.2 - */ - function utimesSync(path: PathLike, atime: TimeLike, mtime: TimeLike): void; - /** - * Change the file system timestamps of the object referenced by the supplied file - * descriptor. See {@link utimes}. - * @since v0.4.2 - */ - function futimes(fd: number, atime: TimeLike, mtime: TimeLike, callback: NoParamCallback): void; - namespace futimes { - /** - * Asynchronously change file timestamps of the file referenced by the supplied file descriptor. - * @param fd A file descriptor. - * @param atime The last access time. If a string is provided, it will be coerced to number. - * @param mtime The last modified time. If a string is provided, it will be coerced to number. - */ - function __promisify__(fd: number, atime: TimeLike, mtime: TimeLike): Promise; - } - /** - * Synchronous version of {@link futimes}. Returns `undefined`. - * @since v0.4.2 - */ - function futimesSync(fd: number, atime: TimeLike, mtime: TimeLike): void; - /** - * Request that all data for the open file descriptor is flushed to the storage - * device. The specific implementation is operating system and device specific. - * Refer to the POSIX [`fsync(2)`](http://man7.org/linux/man-pages/man2/fsync.2.html) documentation for more detail. No arguments other - * than a possible exception are given to the completion callback. - * @since v0.1.96 - */ - function fsync(fd: number, callback: NoParamCallback): void; - namespace fsync { - /** - * Asynchronous fsync(2) - synchronize a file's in-core state with the underlying storage device. - * @param fd A file descriptor. - */ - function __promisify__(fd: number): Promise; - } - /** - * Request that all data for the open file descriptor is flushed to the storage - * device. The specific implementation is operating system and device specific. - * Refer to the POSIX [`fsync(2)`](http://man7.org/linux/man-pages/man2/fsync.2.html) documentation for more detail. Returns `undefined`. - * @since v0.1.96 - */ - function fsyncSync(fd: number): void; - interface WriteOptions { - /** - * @default 0 - */ - offset?: number | undefined; - /** - * @default `buffer.byteLength - offset` - */ - length?: number | undefined; - /** - * @default null - */ - position?: number | null | undefined; - } - /** - * Write `buffer` to the file specified by `fd`. - * - * `offset` determines the part of the buffer to be written, and `length` is - * an integer specifying the number of bytes to write. - * - * `position` refers to the offset from the beginning of the file where this data - * should be written. If `typeof position !== 'number'`, the data will be written - * at the current position. See [`pwrite(2)`](http://man7.org/linux/man-pages/man2/pwrite.2.html). - * - * The callback will be given three arguments `(err, bytesWritten, buffer)` where `bytesWritten` specifies how many _bytes_ were written from `buffer`. - * - * If this method is invoked as its `util.promisify()` ed version, it returns - * a promise for an `Object` with `bytesWritten` and `buffer` properties. - * - * It is unsafe to use `fs.write()` multiple times on the same file without waiting - * for the callback. For this scenario, {@link createWriteStream} is - * recommended. - * - * On Linux, positional writes don't work when the file is opened in append mode. - * The kernel ignores the position argument and always appends the data to - * the end of the file. - * @since v0.0.2 - * @param [offset=0] - * @param [length=buffer.byteLength - offset] - * @param [position='null'] - */ - function write( - fd: number, - buffer: TBuffer, - offset: number | undefined | null, - length: number | undefined | null, - position: number | undefined | null, - callback: (err: NodeJS.ErrnoException | null, written: number, buffer: TBuffer) => void, - ): void; - /** - * Asynchronously writes `buffer` to the file referenced by the supplied file descriptor. - * @param fd A file descriptor. - * @param offset The part of the buffer to be written. If not supplied, defaults to `0`. - * @param length The number of bytes to write. If not supplied, defaults to `buffer.length - offset`. - */ - function write( - fd: number, - buffer: TBuffer, - offset: number | undefined | null, - length: number | undefined | null, - callback: (err: NodeJS.ErrnoException | null, written: number, buffer: TBuffer) => void, - ): void; - /** - * Asynchronously writes `buffer` to the file referenced by the supplied file descriptor. - * @param fd A file descriptor. - * @param offset The part of the buffer to be written. If not supplied, defaults to `0`. - */ - function write( - fd: number, - buffer: TBuffer, - offset: number | undefined | null, - callback: (err: NodeJS.ErrnoException | null, written: number, buffer: TBuffer) => void, - ): void; - /** - * Asynchronously writes `buffer` to the file referenced by the supplied file descriptor. - * @param fd A file descriptor. - */ - function write( - fd: number, - buffer: TBuffer, - callback: (err: NodeJS.ErrnoException | null, written: number, buffer: TBuffer) => void, - ): void; - /** - * Asynchronously writes `buffer` to the file referenced by the supplied file descriptor. - * @param fd A file descriptor. - * @param options An object with the following properties: - * * `offset` The part of the buffer to be written. If not supplied, defaults to `0`. - * * `length` The number of bytes to write. If not supplied, defaults to `buffer.length - offset`. - * * `position` The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position. - */ - function write( - fd: number, - buffer: TBuffer, - options: WriteOptions, - callback: (err: NodeJS.ErrnoException | null, written: number, buffer: TBuffer) => void, - ): void; - /** - * Asynchronously writes `string` to the file referenced by the supplied file descriptor. - * @param fd A file descriptor. - * @param string A string to write. - * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position. - * @param encoding The expected string encoding. - */ - function write( - fd: number, - string: string, - position: number | undefined | null, - encoding: BufferEncoding | undefined | null, - callback: (err: NodeJS.ErrnoException | null, written: number, str: string) => void, - ): void; - /** - * Asynchronously writes `string` to the file referenced by the supplied file descriptor. - * @param fd A file descriptor. - * @param string A string to write. - * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position. - */ - function write( - fd: number, - string: string, - position: number | undefined | null, - callback: (err: NodeJS.ErrnoException | null, written: number, str: string) => void, - ): void; - /** - * Asynchronously writes `string` to the file referenced by the supplied file descriptor. - * @param fd A file descriptor. - * @param string A string to write. - */ - function write( - fd: number, - string: string, - callback: (err: NodeJS.ErrnoException | null, written: number, str: string) => void, - ): void; - namespace write { - /** - * Asynchronously writes `buffer` to the file referenced by the supplied file descriptor. - * @param fd A file descriptor. - * @param offset The part of the buffer to be written. If not supplied, defaults to `0`. - * @param length The number of bytes to write. If not supplied, defaults to `buffer.length - offset`. - * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position. - */ - function __promisify__( - fd: number, - buffer?: TBuffer, - offset?: number, - length?: number, - position?: number | null, - ): Promise<{ - bytesWritten: number; - buffer: TBuffer; - }>; - /** - * Asynchronously writes `buffer` to the file referenced by the supplied file descriptor. - * @param fd A file descriptor. - * @param options An object with the following properties: - * * `offset` The part of the buffer to be written. If not supplied, defaults to `0`. - * * `length` The number of bytes to write. If not supplied, defaults to `buffer.length - offset`. - * * `position` The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position. - */ - function __promisify__( - fd: number, - buffer?: TBuffer, - options?: WriteOptions, - ): Promise<{ - bytesWritten: number; - buffer: TBuffer; - }>; - /** - * Asynchronously writes `string` to the file referenced by the supplied file descriptor. - * @param fd A file descriptor. - * @param string A string to write. - * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position. - * @param encoding The expected string encoding. - */ - function __promisify__( - fd: number, - string: string, - position?: number | null, - encoding?: BufferEncoding | null, - ): Promise<{ - bytesWritten: number; - buffer: string; - }>; - } - /** - * For detailed information, see the documentation of the asynchronous version of - * this API: {@link write}. - * @since v0.1.21 - * @param [offset=0] - * @param [length=buffer.byteLength - offset] - * @param [position='null'] - * @return The number of bytes written. - */ - function writeSync( - fd: number, - buffer: NodeJS.ArrayBufferView, - offset?: number | null, - length?: number | null, - position?: number | null, - ): number; - /** - * Synchronously writes `string` to the file referenced by the supplied file descriptor, returning the number of bytes written. - * @param fd A file descriptor. - * @param string A string to write. - * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position. - * @param encoding The expected string encoding. - */ - function writeSync( - fd: number, - string: string, - position?: number | null, - encoding?: BufferEncoding | null, - ): number; - type ReadPosition = number | bigint; - interface ReadOptions { - /** - * @default 0 - */ - offset?: number | undefined; - /** - * @default `length of buffer` - */ - length?: number | undefined; - /** - * @default null - */ - position?: ReadPosition | null | undefined; - } - interface ReadOptionsWithBuffer extends ReadOptions { - buffer?: T | undefined; - } - /** @deprecated Use `ReadOptions` instead. */ - // TODO: remove in future major - interface ReadSyncOptions extends ReadOptions {} - /** @deprecated Use `ReadOptionsWithBuffer` instead. */ - // TODO: remove in future major - interface ReadAsyncOptions extends ReadOptionsWithBuffer {} - /** - * Read data from the file specified by `fd`. - * - * The callback is given the three arguments, `(err, bytesRead, buffer)`. - * - * If the file is not modified concurrently, the end-of-file is reached when the - * number of bytes read is zero. - * - * If this method is invoked as its `util.promisify()` ed version, it returns - * a promise for an `Object` with `bytesRead` and `buffer` properties. - * @since v0.0.2 - * @param buffer The buffer that the data will be written to. - * @param offset The position in `buffer` to write the data to. - * @param length The number of bytes to read. - * @param position Specifies where to begin reading from in the file. If `position` is `null` or `-1 `, data will be read from the current file position, and the file position will be updated. If - * `position` is an integer, the file position will be unchanged. - */ - function read( - fd: number, - buffer: TBuffer, - offset: number, - length: number, - position: ReadPosition | null, - callback: (err: NodeJS.ErrnoException | null, bytesRead: number, buffer: TBuffer) => void, - ): void; - /** - * Similar to the above `fs.read` function, this version takes an optional `options` object. - * If not otherwise specified in an `options` object, - * `buffer` defaults to `Buffer.alloc(16384)`, - * `offset` defaults to `0`, - * `length` defaults to `buffer.byteLength`, `- offset` as of Node 17.6.0 - * `position` defaults to `null` - * @since v12.17.0, 13.11.0 - */ - function read( - fd: number, - options: ReadOptionsWithBuffer, - callback: (err: NodeJS.ErrnoException | null, bytesRead: number, buffer: TBuffer) => void, - ): void; - function read( - fd: number, - buffer: TBuffer, - options: ReadOptions, - callback: (err: NodeJS.ErrnoException | null, bytesRead: number, buffer: TBuffer) => void, - ): void; - function read( - fd: number, - buffer: TBuffer, - callback: (err: NodeJS.ErrnoException | null, bytesRead: number, buffer: TBuffer) => void, - ): void; - function read( - fd: number, - callback: (err: NodeJS.ErrnoException | null, bytesRead: number, buffer: NonSharedBuffer) => void, - ): void; - namespace read { - /** - * @param fd A file descriptor. - * @param buffer The buffer that the data will be written to. - * @param offset The offset in the buffer at which to start writing. - * @param length The number of bytes to read. - * @param position The offset from the beginning of the file from which data should be read. If `null`, data will be read from the current position. - */ - function __promisify__( - fd: number, - buffer: TBuffer, - offset: number, - length: number, - position: ReadPosition | null, - ): Promise<{ - bytesRead: number; - buffer: TBuffer; - }>; - function __promisify__( - fd: number, - options: ReadOptionsWithBuffer, - ): Promise<{ - bytesRead: number; - buffer: TBuffer; - }>; - function __promisify__(fd: number): Promise<{ - bytesRead: number; - buffer: NonSharedBuffer; - }>; - } - /** - * Returns the number of `bytesRead`. - * - * For detailed information, see the documentation of the asynchronous version of - * this API: {@link read}. - * @since v0.1.21 - * @param [position='null'] - */ - function readSync( - fd: number, - buffer: NodeJS.ArrayBufferView, - offset: number, - length: number, - position: ReadPosition | null, - ): number; - /** - * Similar to the above `fs.readSync` function, this version takes an optional `options` object. - * If no `options` object is specified, it will default with the above values. - */ - function readSync(fd: number, buffer: NodeJS.ArrayBufferView, opts?: ReadOptions): number; - /** - * Asynchronously reads the entire contents of a file. - * - * ```js - * import { readFile } from 'node:fs'; - * - * readFile('/etc/passwd', (err, data) => { - * if (err) throw err; - * console.log(data); - * }); - * ``` - * - * The callback is passed two arguments `(err, data)`, where `data` is the - * contents of the file. - * - * If no encoding is specified, then the raw buffer is returned. - * - * If `options` is a string, then it specifies the encoding: - * - * ```js - * import { readFile } from 'node:fs'; - * - * readFile('/etc/passwd', 'utf8', callback); - * ``` - * - * When the path is a directory, the behavior of `fs.readFile()` and {@link readFileSync} is platform-specific. On macOS, Linux, and Windows, an - * error will be returned. On FreeBSD, a representation of the directory's contents - * will be returned. - * - * ```js - * import { readFile } from 'node:fs'; - * - * // macOS, Linux, and Windows - * readFile('', (err, data) => { - * // => [Error: EISDIR: illegal operation on a directory, read ] - * }); - * - * // FreeBSD - * readFile('', (err, data) => { - * // => null, - * }); - * ``` - * - * It is possible to abort an ongoing request using an `AbortSignal`. If a - * request is aborted the callback is called with an `AbortError`: - * - * ```js - * import { readFile } from 'node:fs'; - * - * const controller = new AbortController(); - * const signal = controller.signal; - * readFile(fileInfo[0].name, { signal }, (err, buf) => { - * // ... - * }); - * // When you want to abort the request - * controller.abort(); - * ``` - * - * The `fs.readFile()` function buffers the entire file. To minimize memory costs, - * when possible prefer streaming via `fs.createReadStream()`. - * - * Aborting an ongoing request does not abort individual operating - * system requests but rather the internal buffering `fs.readFile` performs. - * @since v0.1.29 - * @param path filename or file descriptor - */ - function readFile( - path: PathOrFileDescriptor, - options: - | ({ - encoding?: null | undefined; - flag?: string | undefined; - } & Abortable) - | undefined - | null, - callback: (err: NodeJS.ErrnoException | null, data: NonSharedBuffer) => void, - ): void; - /** - * Asynchronously reads the entire contents of a file. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * If a file descriptor is provided, the underlying file will _not_ be closed automatically. - * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag. - * If a flag is not provided, it defaults to `'r'`. - */ - function readFile( - path: PathOrFileDescriptor, - options: - | ({ - encoding: BufferEncoding; - flag?: string | undefined; - } & Abortable) - | BufferEncoding, - callback: (err: NodeJS.ErrnoException | null, data: string) => void, - ): void; - /** - * Asynchronously reads the entire contents of a file. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * If a file descriptor is provided, the underlying file will _not_ be closed automatically. - * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag. - * If a flag is not provided, it defaults to `'r'`. - */ - function readFile( - path: PathOrFileDescriptor, - options: - | (ObjectEncodingOptions & { - flag?: string | undefined; - } & Abortable) - | BufferEncoding - | undefined - | null, - callback: (err: NodeJS.ErrnoException | null, data: string | NonSharedBuffer) => void, - ): void; - /** - * Asynchronously reads the entire contents of a file. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * If a file descriptor is provided, the underlying file will _not_ be closed automatically. - */ - function readFile( - path: PathOrFileDescriptor, - callback: (err: NodeJS.ErrnoException | null, data: NonSharedBuffer) => void, - ): void; - namespace readFile { - /** - * Asynchronously reads the entire contents of a file. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * If a file descriptor is provided, the underlying file will _not_ be closed automatically. - * @param options An object that may contain an optional flag. - * If a flag is not provided, it defaults to `'r'`. - */ - function __promisify__( - path: PathOrFileDescriptor, - options?: { - encoding?: null | undefined; - flag?: string | undefined; - } | null, - ): Promise; - /** - * Asynchronously reads the entire contents of a file. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * URL support is _experimental_. - * If a file descriptor is provided, the underlying file will _not_ be closed automatically. - * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag. - * If a flag is not provided, it defaults to `'r'`. - */ - function __promisify__( - path: PathOrFileDescriptor, - options: - | { - encoding: BufferEncoding; - flag?: string | undefined; - } - | BufferEncoding, - ): Promise; - /** - * Asynchronously reads the entire contents of a file. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * URL support is _experimental_. - * If a file descriptor is provided, the underlying file will _not_ be closed automatically. - * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag. - * If a flag is not provided, it defaults to `'r'`. - */ - function __promisify__( - path: PathOrFileDescriptor, - options?: - | (ObjectEncodingOptions & { - flag?: string | undefined; - }) - | BufferEncoding - | null, - ): Promise; - } - /** - * Returns the contents of the `path`. - * - * For detailed information, see the documentation of the asynchronous version of - * this API: {@link readFile}. - * - * If the `encoding` option is specified then this function returns a - * string. Otherwise it returns a buffer. - * - * Similar to {@link readFile}, when the path is a directory, the behavior of `fs.readFileSync()` is platform-specific. - * - * ```js - * import { readFileSync } from 'node:fs'; - * - * // macOS, Linux, and Windows - * readFileSync(''); - * // => [Error: EISDIR: illegal operation on a directory, read ] - * - * // FreeBSD - * readFileSync(''); // => - * ``` - * @since v0.1.8 - * @param path filename or file descriptor - */ - function readFileSync( - path: PathOrFileDescriptor, - options?: { - encoding?: null | undefined; - flag?: string | undefined; - } | null, - ): NonSharedBuffer; - /** - * Synchronously reads the entire contents of a file. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * If a file descriptor is provided, the underlying file will _not_ be closed automatically. - * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag. - * If a flag is not provided, it defaults to `'r'`. - */ - function readFileSync( - path: PathOrFileDescriptor, - options: - | { - encoding: BufferEncoding; - flag?: string | undefined; - } - | BufferEncoding, - ): string; - /** - * Synchronously reads the entire contents of a file. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * If a file descriptor is provided, the underlying file will _not_ be closed automatically. - * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag. - * If a flag is not provided, it defaults to `'r'`. - */ - function readFileSync( - path: PathOrFileDescriptor, - options?: - | (ObjectEncodingOptions & { - flag?: string | undefined; - }) - | BufferEncoding - | null, - ): string | NonSharedBuffer; - type WriteFileOptions = - | ( - & ObjectEncodingOptions - & Abortable - & { - mode?: Mode | undefined; - flag?: string | undefined; - flush?: boolean | undefined; - } - ) - | BufferEncoding - | null; - /** - * When `file` is a filename, asynchronously writes data to the file, replacing the - * file if it already exists. `data` can be a string or a buffer. - * - * When `file` is a file descriptor, the behavior is similar to calling `fs.write()` directly (which is recommended). See the notes below on using - * a file descriptor. - * - * The `encoding` option is ignored if `data` is a buffer. - * - * The `mode` option only affects the newly created file. See {@link open} for more details. - * - * ```js - * import { writeFile } from 'node:fs'; - * import { Buffer } from 'node:buffer'; - * - * const data = new Uint8Array(Buffer.from('Hello Node.js')); - * writeFile('message.txt', data, (err) => { - * if (err) throw err; - * console.log('The file has been saved!'); - * }); - * ``` - * - * If `options` is a string, then it specifies the encoding: - * - * ```js - * import { writeFile } from 'node:fs'; - * - * writeFile('message.txt', 'Hello Node.js', 'utf8', callback); - * ``` - * - * It is unsafe to use `fs.writeFile()` multiple times on the same file without - * waiting for the callback. For this scenario, {@link createWriteStream} is - * recommended. - * - * Similarly to `fs.readFile` \- `fs.writeFile` is a convenience method that - * performs multiple `write` calls internally to write the buffer passed to it. - * For performance sensitive code consider using {@link createWriteStream}. - * - * It is possible to use an `AbortSignal` to cancel an `fs.writeFile()`. - * Cancelation is "best effort", and some amount of data is likely still - * to be written. - * - * ```js - * import { writeFile } from 'node:fs'; - * import { Buffer } from 'node:buffer'; - * - * const controller = new AbortController(); - * const { signal } = controller; - * const data = new Uint8Array(Buffer.from('Hello Node.js')); - * writeFile('message.txt', data, { signal }, (err) => { - * // When a request is aborted - the callback is called with an AbortError - * }); - * // When the request should be aborted - * controller.abort(); - * ``` - * - * Aborting an ongoing request does not abort individual operating - * system requests but rather the internal buffering `fs.writeFile` performs. - * @since v0.1.29 - * @param file filename or file descriptor - */ - function writeFile( - file: PathOrFileDescriptor, - data: string | NodeJS.ArrayBufferView, - options: WriteFileOptions, - callback: NoParamCallback, - ): void; - /** - * Asynchronously writes data to a file, replacing the file if it already exists. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * If a file descriptor is provided, the underlying file will _not_ be closed automatically. - * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string. - */ - function writeFile( - path: PathOrFileDescriptor, - data: string | NodeJS.ArrayBufferView, - callback: NoParamCallback, - ): void; - namespace writeFile { - /** - * Asynchronously writes data to a file, replacing the file if it already exists. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * URL support is _experimental_. - * If a file descriptor is provided, the underlying file will _not_ be closed automatically. - * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string. - * @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag. - * If `encoding` is not supplied, the default of `'utf8'` is used. - * If `mode` is not supplied, the default of `0o666` is used. - * If `mode` is a string, it is parsed as an octal integer. - * If `flag` is not supplied, the default of `'w'` is used. - */ - function __promisify__( - path: PathOrFileDescriptor, - data: string | NodeJS.ArrayBufferView, - options?: WriteFileOptions, - ): Promise; - } - /** - * Returns `undefined`. - * - * The `mode` option only affects the newly created file. See {@link open} for more details. - * - * For detailed information, see the documentation of the asynchronous version of - * this API: {@link writeFile}. - * @since v0.1.29 - * @param file filename or file descriptor - */ - function writeFileSync( - file: PathOrFileDescriptor, - data: string | NodeJS.ArrayBufferView, - options?: WriteFileOptions, - ): void; - /** - * Asynchronously append data to a file, creating the file if it does not yet - * exist. `data` can be a string or a `Buffer`. - * - * The `mode` option only affects the newly created file. See {@link open} for more details. - * - * ```js - * import { appendFile } from 'node:fs'; - * - * appendFile('message.txt', 'data to append', (err) => { - * if (err) throw err; - * console.log('The "data to append" was appended to file!'); - * }); - * ``` - * - * If `options` is a string, then it specifies the encoding: - * - * ```js - * import { appendFile } from 'node:fs'; - * - * appendFile('message.txt', 'data to append', 'utf8', callback); - * ``` - * - * The `path` may be specified as a numeric file descriptor that has been opened - * for appending (using `fs.open()` or `fs.openSync()`). The file descriptor will - * not be closed automatically. - * - * ```js - * import { open, close, appendFile } from 'node:fs'; - * - * function closeFd(fd) { - * close(fd, (err) => { - * if (err) throw err; - * }); - * } - * - * open('message.txt', 'a', (err, fd) => { - * if (err) throw err; - * - * try { - * appendFile(fd, 'data to append', 'utf8', (err) => { - * closeFd(fd); - * if (err) throw err; - * }); - * } catch (err) { - * closeFd(fd); - * throw err; - * } - * }); - * ``` - * @since v0.6.7 - * @param path filename or file descriptor - */ - function appendFile( - path: PathOrFileDescriptor, - data: string | Uint8Array, - options: WriteFileOptions, - callback: NoParamCallback, - ): void; - /** - * Asynchronously append data to a file, creating the file if it does not exist. - * @param file A path to a file. If a URL is provided, it must use the `file:` protocol. - * If a file descriptor is provided, the underlying file will _not_ be closed automatically. - * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string. - */ - function appendFile(file: PathOrFileDescriptor, data: string | Uint8Array, callback: NoParamCallback): void; - namespace appendFile { - /** - * Asynchronously append data to a file, creating the file if it does not exist. - * @param file A path to a file. If a URL is provided, it must use the `file:` protocol. - * URL support is _experimental_. - * If a file descriptor is provided, the underlying file will _not_ be closed automatically. - * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string. - * @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag. - * If `encoding` is not supplied, the default of `'utf8'` is used. - * If `mode` is not supplied, the default of `0o666` is used. - * If `mode` is a string, it is parsed as an octal integer. - * If `flag` is not supplied, the default of `'a'` is used. - */ - function __promisify__( - file: PathOrFileDescriptor, - data: string | Uint8Array, - options?: WriteFileOptions, - ): Promise; - } - /** - * Synchronously append data to a file, creating the file if it does not yet - * exist. `data` can be a string or a `Buffer`. - * - * The `mode` option only affects the newly created file. See {@link open} for more details. - * - * ```js - * import { appendFileSync } from 'node:fs'; - * - * try { - * appendFileSync('message.txt', 'data to append'); - * console.log('The "data to append" was appended to file!'); - * } catch (err) { - * // Handle the error - * } - * ``` - * - * If `options` is a string, then it specifies the encoding: - * - * ```js - * import { appendFileSync } from 'node:fs'; - * - * appendFileSync('message.txt', 'data to append', 'utf8'); - * ``` - * - * The `path` may be specified as a numeric file descriptor that has been opened - * for appending (using `fs.open()` or `fs.openSync()`). The file descriptor will - * not be closed automatically. - * - * ```js - * import { openSync, closeSync, appendFileSync } from 'node:fs'; - * - * let fd; - * - * try { - * fd = openSync('message.txt', 'a'); - * appendFileSync(fd, 'data to append', 'utf8'); - * } catch (err) { - * // Handle the error - * } finally { - * if (fd !== undefined) - * closeSync(fd); - * } - * ``` - * @since v0.6.7 - * @param path filename or file descriptor - */ - function appendFileSync( - path: PathOrFileDescriptor, - data: string | Uint8Array, - options?: WriteFileOptions, - ): void; - /** - * Watch for changes on `filename`. The callback `listener` will be called each - * time the file is accessed. - * - * The `options` argument may be omitted. If provided, it should be an object. The `options` object may contain a boolean named `persistent` that indicates - * whether the process should continue to run as long as files are being watched. - * The `options` object may specify an `interval` property indicating how often the - * target should be polled in milliseconds. - * - * The `listener` gets two arguments the current stat object and the previous - * stat object: - * - * ```js - * import { watchFile } from 'node:fs'; - * - * watchFile('message.text', (curr, prev) => { - * console.log(`the current mtime is: ${curr.mtime}`); - * console.log(`the previous mtime was: ${prev.mtime}`); - * }); - * ``` - * - * These stat objects are instances of `fs.Stat`. If the `bigint` option is `true`, - * the numeric values in these objects are specified as `BigInt`s. - * - * To be notified when the file was modified, not just accessed, it is necessary - * to compare `curr.mtimeMs` and `prev.mtimeMs`. - * - * When an `fs.watchFile` operation results in an `ENOENT` error, it - * will invoke the listener once, with all the fields zeroed (or, for dates, the - * Unix Epoch). If the file is created later on, the listener will be called - * again, with the latest stat objects. This is a change in functionality since - * v0.10. - * - * Using {@link watch} is more efficient than `fs.watchFile` and `fs.unwatchFile`. `fs.watch` should be used instead of `fs.watchFile` and `fs.unwatchFile` when possible. - * - * When a file being watched by `fs.watchFile()` disappears and reappears, - * then the contents of `previous` in the second callback event (the file's - * reappearance) will be the same as the contents of `previous` in the first - * callback event (its disappearance). - * - * This happens when: - * - * * the file is deleted, followed by a restore - * * the file is renamed and then renamed a second time back to its original name - * @since v0.1.31 - */ - interface WatchFileOptions { - bigint?: boolean | undefined; - persistent?: boolean | undefined; - interval?: number | undefined; - } - /** - * Watch for changes on `filename`. The callback `listener` will be called each - * time the file is accessed. - * - * The `options` argument may be omitted. If provided, it should be an object. The `options` object may contain a boolean named `persistent` that indicates - * whether the process should continue to run as long as files are being watched. - * The `options` object may specify an `interval` property indicating how often the - * target should be polled in milliseconds. - * - * The `listener` gets two arguments the current stat object and the previous - * stat object: - * - * ```js - * import { watchFile } from 'node:fs'; - * - * watchFile('message.text', (curr, prev) => { - * console.log(`the current mtime is: ${curr.mtime}`); - * console.log(`the previous mtime was: ${prev.mtime}`); - * }); - * ``` - * - * These stat objects are instances of `fs.Stat`. If the `bigint` option is `true`, - * the numeric values in these objects are specified as `BigInt`s. - * - * To be notified when the file was modified, not just accessed, it is necessary - * to compare `curr.mtimeMs` and `prev.mtimeMs`. - * - * When an `fs.watchFile` operation results in an `ENOENT` error, it - * will invoke the listener once, with all the fields zeroed (or, for dates, the - * Unix Epoch). If the file is created later on, the listener will be called - * again, with the latest stat objects. This is a change in functionality since - * v0.10. - * - * Using {@link watch} is more efficient than `fs.watchFile` and `fs.unwatchFile`. `fs.watch` should be used instead of `fs.watchFile` and `fs.unwatchFile` when possible. - * - * When a file being watched by `fs.watchFile()` disappears and reappears, - * then the contents of `previous` in the second callback event (the file's - * reappearance) will be the same as the contents of `previous` in the first - * callback event (its disappearance). - * - * This happens when: - * - * * the file is deleted, followed by a restore - * * the file is renamed and then renamed a second time back to its original name - * @since v0.1.31 - */ - function watchFile( - filename: PathLike, - options: - | (WatchFileOptions & { - bigint?: false | undefined; - }) - | undefined, - listener: StatsListener, - ): StatWatcher; - function watchFile( - filename: PathLike, - options: - | (WatchFileOptions & { - bigint: true; - }) - | undefined, - listener: BigIntStatsListener, - ): StatWatcher; - /** - * Watch for changes on `filename`. The callback `listener` will be called each time the file is accessed. - * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol. - */ - function watchFile(filename: PathLike, listener: StatsListener): StatWatcher; - /** - * Stop watching for changes on `filename`. If `listener` is specified, only that - * particular listener is removed. Otherwise, _all_ listeners are removed, - * effectively stopping watching of `filename`. - * - * Calling `fs.unwatchFile()` with a filename that is not being watched is a - * no-op, not an error. - * - * Using {@link watch} is more efficient than `fs.watchFile()` and `fs.unwatchFile()`. `fs.watch()` should be used instead of `fs.watchFile()` and `fs.unwatchFile()` when possible. - * @since v0.1.31 - * @param listener Optional, a listener previously attached using `fs.watchFile()` - */ - function unwatchFile(filename: PathLike, listener?: StatsListener): void; - function unwatchFile(filename: PathLike, listener?: BigIntStatsListener): void; - interface WatchOptions extends Abortable { - encoding?: BufferEncoding | "buffer" | undefined; - persistent?: boolean | undefined; - recursive?: boolean | undefined; - } - interface WatchOptionsWithBufferEncoding extends WatchOptions { - encoding: "buffer"; - } - interface WatchOptionsWithStringEncoding extends WatchOptions { - encoding?: BufferEncoding | undefined; - } - type WatchEventType = "rename" | "change"; - type WatchListener = (event: WatchEventType, filename: T | null) => void; - type StatsListener = (curr: Stats, prev: Stats) => void; - type BigIntStatsListener = (curr: BigIntStats, prev: BigIntStats) => void; - /** - * Watch for changes on `filename`, where `filename` is either a file or a - * directory. - * - * The second argument is optional. If `options` is provided as a string, it - * specifies the `encoding`. Otherwise `options` should be passed as an object. - * - * The listener callback gets two arguments `(eventType, filename)`. `eventType`is either `'rename'` or `'change'`, and `filename` is the name of the file - * which triggered the event. - * - * On most platforms, `'rename'` is emitted whenever a filename appears or - * disappears in the directory. - * - * The listener callback is attached to the `'change'` event fired by `fs.FSWatcher`, but it is not the same thing as the `'change'` value of `eventType`. - * - * If a `signal` is passed, aborting the corresponding AbortController will close - * the returned `fs.FSWatcher`. - * @since v0.5.10 - * @param listener - */ - function watch( - filename: PathLike, - options?: WatchOptionsWithStringEncoding | BufferEncoding | null, - listener?: WatchListener, - ): FSWatcher; - function watch( - filename: PathLike, - options: WatchOptionsWithBufferEncoding | "buffer", - listener: WatchListener, - ): FSWatcher; - function watch( - filename: PathLike, - options: WatchOptions | BufferEncoding | "buffer" | null, - listener: WatchListener, - ): FSWatcher; - function watch(filename: PathLike, listener: WatchListener): FSWatcher; - /** - * Test whether or not the given path exists by checking with the file system. - * Then call the `callback` argument with either true or false: - * - * ```js - * import { exists } from 'node:fs'; - * - * exists('/etc/passwd', (e) => { - * console.log(e ? 'it exists' : 'no passwd!'); - * }); - * ``` - * - * **The parameters for this callback are not consistent with other Node.js** - * **callbacks.** Normally, the first parameter to a Node.js callback is an `err` parameter, optionally followed by other parameters. The `fs.exists()` callback - * has only one boolean parameter. This is one reason `fs.access()` is recommended - * instead of `fs.exists()`. - * - * Using `fs.exists()` to check for the existence of a file before calling `fs.open()`, `fs.readFile()`, or `fs.writeFile()` is not recommended. Doing - * so introduces a race condition, since other processes may change the file's - * state between the two calls. Instead, user code should open/read/write the - * file directly and handle the error raised if the file does not exist. - * - * **write (NOT RECOMMENDED)** - * - * ```js - * import { exists, open, close } from 'node:fs'; - * - * exists('myfile', (e) => { - * if (e) { - * console.error('myfile already exists'); - * } else { - * open('myfile', 'wx', (err, fd) => { - * if (err) throw err; - * - * try { - * writeMyData(fd); - * } finally { - * close(fd, (err) => { - * if (err) throw err; - * }); - * } - * }); - * } - * }); - * ``` - * - * **write (RECOMMENDED)** - * - * ```js - * import { open, close } from 'node:fs'; - * open('myfile', 'wx', (err, fd) => { - * if (err) { - * if (err.code === 'EEXIST') { - * console.error('myfile already exists'); - * return; - * } - * - * throw err; - * } - * - * try { - * writeMyData(fd); - * } finally { - * close(fd, (err) => { - * if (err) throw err; - * }); - * } - * }); - * ``` - * - * **read (NOT RECOMMENDED)** - * - * ```js - * import { open, close, exists } from 'node:fs'; - * - * exists('myfile', (e) => { - * if (e) { - * open('myfile', 'r', (err, fd) => { - * if (err) throw err; - * - * try { - * readMyData(fd); - * } finally { - * close(fd, (err) => { - * if (err) throw err; - * }); - * } - * }); - * } else { - * console.error('myfile does not exist'); - * } - * }); - * ``` - * - * **read (RECOMMENDED)** - * - * ```js - * import { open, close } from 'node:fs'; - * - * open('myfile', 'r', (err, fd) => { - * if (err) { - * if (err.code === 'ENOENT') { - * console.error('myfile does not exist'); - * return; - * } - * - * throw err; - * } - * - * try { - * readMyData(fd); - * } finally { - * close(fd, (err) => { - * if (err) throw err; - * }); - * } - * }); - * ``` - * - * The "not recommended" examples above check for existence and then use the - * file; the "recommended" examples are better because they use the file directly - * and handle the error, if any. - * - * In general, check for the existence of a file only if the file won't be - * used directly, for example when its existence is a signal from another - * process. - * @since v0.0.2 - * @deprecated Since v1.0.0 - Use {@link stat} or {@link access} instead. - */ - function exists(path: PathLike, callback: (exists: boolean) => void): void; - /** @deprecated */ - namespace exists { - /** - * @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol. - * URL support is _experimental_. - */ - function __promisify__(path: PathLike): Promise; - } - /** - * Returns `true` if the path exists, `false` otherwise. - * - * For detailed information, see the documentation of the asynchronous version of - * this API: {@link exists}. - * - * `fs.exists()` is deprecated, but `fs.existsSync()` is not. The `callback` parameter to `fs.exists()` accepts parameters that are inconsistent with other - * Node.js callbacks. `fs.existsSync()` does not use a callback. - * - * ```js - * import { existsSync } from 'node:fs'; - * - * if (existsSync('/etc/passwd')) - * console.log('The path exists.'); - * ``` - * @since v0.1.21 - */ - function existsSync(path: PathLike): boolean; - namespace constants { - // File Access Constants - /** Constant for fs.access(). File is visible to the calling process. */ - const F_OK: number; - /** Constant for fs.access(). File can be read by the calling process. */ - const R_OK: number; - /** Constant for fs.access(). File can be written by the calling process. */ - const W_OK: number; - /** Constant for fs.access(). File can be executed by the calling process. */ - const X_OK: number; - // File Copy Constants - /** Constant for fs.copyFile. Flag indicating the destination file should not be overwritten if it already exists. */ - const COPYFILE_EXCL: number; - /** - * Constant for fs.copyFile. copy operation will attempt to create a copy-on-write reflink. - * If the underlying platform does not support copy-on-write, then a fallback copy mechanism is used. - */ - const COPYFILE_FICLONE: number; - /** - * Constant for fs.copyFile. Copy operation will attempt to create a copy-on-write reflink. - * If the underlying platform does not support copy-on-write, then the operation will fail with an error. - */ - const COPYFILE_FICLONE_FORCE: number; - // File Open Constants - /** Constant for fs.open(). Flag indicating to open a file for read-only access. */ - const O_RDONLY: number; - /** Constant for fs.open(). Flag indicating to open a file for write-only access. */ - const O_WRONLY: number; - /** Constant for fs.open(). Flag indicating to open a file for read-write access. */ - const O_RDWR: number; - /** Constant for fs.open(). Flag indicating to create the file if it does not already exist. */ - const O_CREAT: number; - /** Constant for fs.open(). Flag indicating that opening a file should fail if the O_CREAT flag is set and the file already exists. */ - const O_EXCL: number; - /** - * Constant for fs.open(). Flag indicating that if path identifies a terminal device, - * opening the path shall not cause that terminal to become the controlling terminal for the process - * (if the process does not already have one). - */ - const O_NOCTTY: number; - /** Constant for fs.open(). Flag indicating that if the file exists and is a regular file, and the file is opened successfully for write access, its length shall be truncated to zero. */ - const O_TRUNC: number; - /** Constant for fs.open(). Flag indicating that data will be appended to the end of the file. */ - const O_APPEND: number; - /** Constant for fs.open(). Flag indicating that the open should fail if the path is not a directory. */ - const O_DIRECTORY: number; - /** - * constant for fs.open(). - * Flag indicating reading accesses to the file system will no longer result in - * an update to the atime information associated with the file. - * This flag is available on Linux operating systems only. - */ - const O_NOATIME: number; - /** Constant for fs.open(). Flag indicating that the open should fail if the path is a symbolic link. */ - const O_NOFOLLOW: number; - /** Constant for fs.open(). Flag indicating that the file is opened for synchronous I/O. */ - const O_SYNC: number; - /** Constant for fs.open(). Flag indicating that the file is opened for synchronous I/O with write operations waiting for data integrity. */ - const O_DSYNC: number; - /** Constant for fs.open(). Flag indicating to open the symbolic link itself rather than the resource it is pointing to. */ - const O_SYMLINK: number; - /** Constant for fs.open(). When set, an attempt will be made to minimize caching effects of file I/O. */ - const O_DIRECT: number; - /** Constant for fs.open(). Flag indicating to open the file in nonblocking mode when possible. */ - const O_NONBLOCK: number; - // File Type Constants - /** Constant for fs.Stats mode property for determining a file's type. Bit mask used to extract the file type code. */ - const S_IFMT: number; - /** Constant for fs.Stats mode property for determining a file's type. File type constant for a regular file. */ - const S_IFREG: number; - /** Constant for fs.Stats mode property for determining a file's type. File type constant for a directory. */ - const S_IFDIR: number; - /** Constant for fs.Stats mode property for determining a file's type. File type constant for a character-oriented device file. */ - const S_IFCHR: number; - /** Constant for fs.Stats mode property for determining a file's type. File type constant for a block-oriented device file. */ - const S_IFBLK: number; - /** Constant for fs.Stats mode property for determining a file's type. File type constant for a FIFO/pipe. */ - const S_IFIFO: number; - /** Constant for fs.Stats mode property for determining a file's type. File type constant for a symbolic link. */ - const S_IFLNK: number; - /** Constant for fs.Stats mode property for determining a file's type. File type constant for a socket. */ - const S_IFSOCK: number; - // File Mode Constants - /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable, writable and executable by owner. */ - const S_IRWXU: number; - /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable by owner. */ - const S_IRUSR: number; - /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating writable by owner. */ - const S_IWUSR: number; - /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating executable by owner. */ - const S_IXUSR: number; - /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable, writable and executable by group. */ - const S_IRWXG: number; - /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable by group. */ - const S_IRGRP: number; - /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating writable by group. */ - const S_IWGRP: number; - /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating executable by group. */ - const S_IXGRP: number; - /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable, writable and executable by others. */ - const S_IRWXO: number; - /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable by others. */ - const S_IROTH: number; - /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating writable by others. */ - const S_IWOTH: number; - /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating executable by others. */ - const S_IXOTH: number; - /** - * When set, a memory file mapping is used to access the file. This flag - * is available on Windows operating systems only. On other operating systems, - * this flag is ignored. - */ - const UV_FS_O_FILEMAP: number; - } - /** - * Tests a user's permissions for the file or directory specified by `path`. - * The `mode` argument is an optional integer that specifies the accessibility - * checks to be performed. `mode` should be either the value `fs.constants.F_OK` or a mask consisting of the bitwise OR of any of `fs.constants.R_OK`, `fs.constants.W_OK`, and `fs.constants.X_OK` - * (e.g.`fs.constants.W_OK | fs.constants.R_OK`). Check `File access constants` for - * possible values of `mode`. - * - * The final argument, `callback`, is a callback function that is invoked with - * a possible error argument. If any of the accessibility checks fail, the error - * argument will be an `Error` object. The following examples check if `package.json` exists, and if it is readable or writable. - * - * ```js - * import { access, constants } from 'node:fs'; - * - * const file = 'package.json'; - * - * // Check if the file exists in the current directory. - * access(file, constants.F_OK, (err) => { - * console.log(`${file} ${err ? 'does not exist' : 'exists'}`); - * }); - * - * // Check if the file is readable. - * access(file, constants.R_OK, (err) => { - * console.log(`${file} ${err ? 'is not readable' : 'is readable'}`); - * }); - * - * // Check if the file is writable. - * access(file, constants.W_OK, (err) => { - * console.log(`${file} ${err ? 'is not writable' : 'is writable'}`); - * }); - * - * // Check if the file is readable and writable. - * access(file, constants.R_OK | constants.W_OK, (err) => { - * console.log(`${file} ${err ? 'is not' : 'is'} readable and writable`); - * }); - * ``` - * - * Do not use `fs.access()` to check for the accessibility of a file before calling `fs.open()`, `fs.readFile()`, or `fs.writeFile()`. Doing - * so introduces a race condition, since other processes may change the file's - * state between the two calls. Instead, user code should open/read/write the - * file directly and handle the error raised if the file is not accessible. - * - * **write (NOT RECOMMENDED)** - * - * ```js - * import { access, open, close } from 'node:fs'; - * - * access('myfile', (err) => { - * if (!err) { - * console.error('myfile already exists'); - * return; - * } - * - * open('myfile', 'wx', (err, fd) => { - * if (err) throw err; - * - * try { - * writeMyData(fd); - * } finally { - * close(fd, (err) => { - * if (err) throw err; - * }); - * } - * }); - * }); - * ``` - * - * **write (RECOMMENDED)** - * - * ```js - * import { open, close } from 'node:fs'; - * - * open('myfile', 'wx', (err, fd) => { - * if (err) { - * if (err.code === 'EEXIST') { - * console.error('myfile already exists'); - * return; - * } - * - * throw err; - * } - * - * try { - * writeMyData(fd); - * } finally { - * close(fd, (err) => { - * if (err) throw err; - * }); - * } - * }); - * ``` - * - * **read (NOT RECOMMENDED)** - * - * ```js - * import { access, open, close } from 'node:fs'; - * access('myfile', (err) => { - * if (err) { - * if (err.code === 'ENOENT') { - * console.error('myfile does not exist'); - * return; - * } - * - * throw err; - * } - * - * open('myfile', 'r', (err, fd) => { - * if (err) throw err; - * - * try { - * readMyData(fd); - * } finally { - * close(fd, (err) => { - * if (err) throw err; - * }); - * } - * }); - * }); - * ``` - * - * **read (RECOMMENDED)** - * - * ```js - * import { open, close } from 'node:fs'; - * - * open('myfile', 'r', (err, fd) => { - * if (err) { - * if (err.code === 'ENOENT') { - * console.error('myfile does not exist'); - * return; - * } - * - * throw err; - * } - * - * try { - * readMyData(fd); - * } finally { - * close(fd, (err) => { - * if (err) throw err; - * }); - * } - * }); - * ``` - * - * The "not recommended" examples above check for accessibility and then use the - * file; the "recommended" examples are better because they use the file directly - * and handle the error, if any. - * - * In general, check for the accessibility of a file only if the file will not be - * used directly, for example when its accessibility is a signal from another - * process. - * - * On Windows, access-control policies (ACLs) on a directory may limit access to - * a file or directory. The `fs.access()` function, however, does not check the - * ACL and therefore may report that a path is accessible even if the ACL restricts - * the user from reading or writing to it. - * @since v0.11.15 - * @param [mode=fs.constants.F_OK] - */ - function access(path: PathLike, mode: number | undefined, callback: NoParamCallback): void; - /** - * Asynchronously tests a user's permissions for the file specified by path. - * @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol. - */ - function access(path: PathLike, callback: NoParamCallback): void; - namespace access { - /** - * Asynchronously tests a user's permissions for the file specified by path. - * @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol. - * URL support is _experimental_. - */ - function __promisify__(path: PathLike, mode?: number): Promise; - } - /** - * Synchronously tests a user's permissions for the file or directory specified - * by `path`. The `mode` argument is an optional integer that specifies the - * accessibility checks to be performed. `mode` should be either the value `fs.constants.F_OK` or a mask consisting of the bitwise OR of any of `fs.constants.R_OK`, `fs.constants.W_OK`, and - * `fs.constants.X_OK` (e.g.`fs.constants.W_OK | fs.constants.R_OK`). Check `File access constants` for - * possible values of `mode`. - * - * If any of the accessibility checks fail, an `Error` will be thrown. Otherwise, - * the method will return `undefined`. - * - * ```js - * import { accessSync, constants } from 'node:fs'; - * - * try { - * accessSync('etc/passwd', constants.R_OK | constants.W_OK); - * console.log('can read/write'); - * } catch (err) { - * console.error('no access!'); - * } - * ``` - * @since v0.11.15 - * @param [mode=fs.constants.F_OK] - */ - function accessSync(path: PathLike, mode?: number): void; - interface StreamOptions { - flags?: string | undefined; - encoding?: BufferEncoding | undefined; - fd?: number | FileHandle | undefined; - mode?: number | undefined; - autoClose?: boolean | undefined; - emitClose?: boolean | undefined; - start?: number | undefined; - signal?: AbortSignal | null | undefined; - highWaterMark?: number | undefined; - } - interface FSImplementation { - open?: (...args: any[]) => any; - close?: (...args: any[]) => any; - } - interface CreateReadStreamFSImplementation extends FSImplementation { - read: (...args: any[]) => any; - } - interface CreateWriteStreamFSImplementation extends FSImplementation { - write: (...args: any[]) => any; - writev?: (...args: any[]) => any; - } - interface ReadStreamOptions extends StreamOptions { - fs?: CreateReadStreamFSImplementation | null | undefined; - end?: number | undefined; - } - interface WriteStreamOptions extends StreamOptions { - fs?: CreateWriteStreamFSImplementation | null | undefined; - flush?: boolean | undefined; - } - /** - * `options` can include `start` and `end` values to read a range of bytes from - * the file instead of the entire file. Both `start` and `end` are inclusive and - * start counting at 0, allowed values are in the - * \[0, [`Number.MAX_SAFE_INTEGER`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER)\] range. If `fd` is specified and `start` is - * omitted or `undefined`, `fs.createReadStream()` reads sequentially from the - * current file position. The `encoding` can be any one of those accepted by `Buffer`. - * - * If `fd` is specified, `ReadStream` will ignore the `path` argument and will use - * the specified file descriptor. This means that no `'open'` event will be - * emitted. `fd` should be blocking; non-blocking `fd`s should be passed to `net.Socket`. - * - * If `fd` points to a character device that only supports blocking reads - * (such as keyboard or sound card), read operations do not finish until data is - * available. This can prevent the process from exiting and the stream from - * closing naturally. - * - * By default, the stream will emit a `'close'` event after it has been - * destroyed. Set the `emitClose` option to `false` to change this behavior. - * - * By providing the `fs` option, it is possible to override the corresponding `fs` implementations for `open`, `read`, and `close`. When providing the `fs` option, - * an override for `read` is required. If no `fd` is provided, an override for `open` is also required. If `autoClose` is `true`, an override for `close` is - * also required. - * - * ```js - * import { createReadStream } from 'node:fs'; - * - * // Create a stream from some character device. - * const stream = createReadStream('/dev/input/event0'); - * setTimeout(() => { - * stream.close(); // This may not close the stream. - * // Artificially marking end-of-stream, as if the underlying resource had - * // indicated end-of-file by itself, allows the stream to close. - * // This does not cancel pending read operations, and if there is such an - * // operation, the process may still not be able to exit successfully - * // until it finishes. - * stream.push(null); - * stream.read(0); - * }, 100); - * ``` - * - * If `autoClose` is false, then the file descriptor won't be closed, even if - * there's an error. It is the application's responsibility to close it and make - * sure there's no file descriptor leak. If `autoClose` is set to true (default - * behavior), on `'error'` or `'end'` the file descriptor will be closed - * automatically. - * - * `mode` sets the file mode (permission and sticky bits), but only if the - * file was created. - * - * An example to read the last 10 bytes of a file which is 100 bytes long: - * - * ```js - * import { createReadStream } from 'node:fs'; - * - * createReadStream('sample.txt', { start: 90, end: 99 }); - * ``` - * - * If `options` is a string, then it specifies the encoding. - * @since v0.1.31 - */ - function createReadStream(path: PathLike, options?: BufferEncoding | ReadStreamOptions): ReadStream; - /** - * `options` may also include a `start` option to allow writing data at some - * position past the beginning of the file, allowed values are in the - * \[0, [`Number.MAX_SAFE_INTEGER`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER)\] range. Modifying a file rather than - * replacing it may require the `flags` option to be set to `r+` rather than the - * default `w`. The `encoding` can be any one of those accepted by `Buffer`. - * - * If `autoClose` is set to true (default behavior) on `'error'` or `'finish'` the file descriptor will be closed automatically. If `autoClose` is false, - * then the file descriptor won't be closed, even if there's an error. - * It is the application's responsibility to close it and make sure there's no - * file descriptor leak. - * - * By default, the stream will emit a `'close'` event after it has been - * destroyed. Set the `emitClose` option to `false` to change this behavior. - * - * By providing the `fs` option it is possible to override the corresponding `fs` implementations for `open`, `write`, `writev`, and `close`. Overriding `write()` without `writev()` can reduce - * performance as some optimizations (`_writev()`) - * will be disabled. When providing the `fs` option, overrides for at least one of `write` and `writev` are required. If no `fd` option is supplied, an override - * for `open` is also required. If `autoClose` is `true`, an override for `close` is also required. - * - * Like `fs.ReadStream`, if `fd` is specified, `fs.WriteStream` will ignore the `path` argument and will use the specified file descriptor. This means that no `'open'` event will be - * emitted. `fd` should be blocking; non-blocking `fd`s - * should be passed to `net.Socket`. - * - * If `options` is a string, then it specifies the encoding. - * @since v0.1.31 - */ - function createWriteStream(path: PathLike, options?: BufferEncoding | WriteStreamOptions): WriteStream; - /** - * Forces all currently queued I/O operations associated with the file to the - * operating system's synchronized I/O completion state. Refer to the POSIX [`fdatasync(2)`](http://man7.org/linux/man-pages/man2/fdatasync.2.html) documentation for details. No arguments other - * than a possible - * exception are given to the completion callback. - * @since v0.1.96 - */ - function fdatasync(fd: number, callback: NoParamCallback): void; - namespace fdatasync { - /** - * Asynchronous fdatasync(2) - synchronize a file's in-core state with storage device. - * @param fd A file descriptor. - */ - function __promisify__(fd: number): Promise; - } - /** - * Forces all currently queued I/O operations associated with the file to the - * operating system's synchronized I/O completion state. Refer to the POSIX [`fdatasync(2)`](http://man7.org/linux/man-pages/man2/fdatasync.2.html) documentation for details. Returns `undefined`. - * @since v0.1.96 - */ - function fdatasyncSync(fd: number): void; - /** - * Asynchronously copies `src` to `dest`. By default, `dest` is overwritten if it - * already exists. No arguments other than a possible exception are given to the - * callback function. Node.js makes no guarantees about the atomicity of the copy - * operation. If an error occurs after the destination file has been opened for - * writing, Node.js will attempt to remove the destination. - * - * `mode` is an optional integer that specifies the behavior - * of the copy operation. It is possible to create a mask consisting of the bitwise - * OR of two or more values (e.g.`fs.constants.COPYFILE_EXCL | fs.constants.COPYFILE_FICLONE`). - * - * * `fs.constants.COPYFILE_EXCL`: The copy operation will fail if `dest` already - * exists. - * * `fs.constants.COPYFILE_FICLONE`: The copy operation will attempt to create a - * copy-on-write reflink. If the platform does not support copy-on-write, then a - * fallback copy mechanism is used. - * * `fs.constants.COPYFILE_FICLONE_FORCE`: The copy operation will attempt to - * create a copy-on-write reflink. If the platform does not support - * copy-on-write, then the operation will fail. - * - * ```js - * import { copyFile, constants } from 'node:fs'; - * - * function callback(err) { - * if (err) throw err; - * console.log('source.txt was copied to destination.txt'); - * } - * - * // destination.txt will be created or overwritten by default. - * copyFile('source.txt', 'destination.txt', callback); - * - * // By using COPYFILE_EXCL, the operation will fail if destination.txt exists. - * copyFile('source.txt', 'destination.txt', constants.COPYFILE_EXCL, callback); - * ``` - * @since v8.5.0 - * @param src source filename to copy - * @param dest destination filename of the copy operation - * @param [mode=0] modifiers for copy operation. - */ - function copyFile(src: PathLike, dest: PathLike, callback: NoParamCallback): void; - function copyFile(src: PathLike, dest: PathLike, mode: number, callback: NoParamCallback): void; - namespace copyFile { - function __promisify__(src: PathLike, dst: PathLike, mode?: number): Promise; - } - /** - * Synchronously copies `src` to `dest`. By default, `dest` is overwritten if it - * already exists. Returns `undefined`. Node.js makes no guarantees about the - * atomicity of the copy operation. If an error occurs after the destination file - * has been opened for writing, Node.js will attempt to remove the destination. - * - * `mode` is an optional integer that specifies the behavior - * of the copy operation. It is possible to create a mask consisting of the bitwise - * OR of two or more values (e.g.`fs.constants.COPYFILE_EXCL | fs.constants.COPYFILE_FICLONE`). - * - * * `fs.constants.COPYFILE_EXCL`: The copy operation will fail if `dest` already - * exists. - * * `fs.constants.COPYFILE_FICLONE`: The copy operation will attempt to create a - * copy-on-write reflink. If the platform does not support copy-on-write, then a - * fallback copy mechanism is used. - * * `fs.constants.COPYFILE_FICLONE_FORCE`: The copy operation will attempt to - * create a copy-on-write reflink. If the platform does not support - * copy-on-write, then the operation will fail. - * - * ```js - * import { copyFileSync, constants } from 'node:fs'; - * - * // destination.txt will be created or overwritten by default. - * copyFileSync('source.txt', 'destination.txt'); - * console.log('source.txt was copied to destination.txt'); - * - * // By using COPYFILE_EXCL, the operation will fail if destination.txt exists. - * copyFileSync('source.txt', 'destination.txt', constants.COPYFILE_EXCL); - * ``` - * @since v8.5.0 - * @param src source filename to copy - * @param dest destination filename of the copy operation - * @param [mode=0] modifiers for copy operation. - */ - function copyFileSync(src: PathLike, dest: PathLike, mode?: number): void; - /** - * Write an array of `ArrayBufferView`s to the file specified by `fd` using `writev()`. - * - * `position` is the offset from the beginning of the file where this data - * should be written. If `typeof position !== 'number'`, the data will be written - * at the current position. - * - * The callback will be given three arguments: `err`, `bytesWritten`, and `buffers`. `bytesWritten` is how many bytes were written from `buffers`. - * - * If this method is `util.promisify()` ed, it returns a promise for an `Object` with `bytesWritten` and `buffers` properties. - * - * It is unsafe to use `fs.writev()` multiple times on the same file without - * waiting for the callback. For this scenario, use {@link createWriteStream}. - * - * On Linux, positional writes don't work when the file is opened in append mode. - * The kernel ignores the position argument and always appends the data to - * the end of the file. - * @since v12.9.0 - * @param [position='null'] - */ - function writev( - fd: number, - buffers: TBuffers, - cb: (err: NodeJS.ErrnoException | null, bytesWritten: number, buffers: TBuffers) => void, - ): void; - function writev( - fd: number, - buffers: TBuffers, - position: number | null, - cb: (err: NodeJS.ErrnoException | null, bytesWritten: number, buffers: TBuffers) => void, - ): void; - // Providing a default type parameter doesn't provide true BC for userland consumers, but at least suppresses TS2314 - // TODO: remove default in future major version - interface WriteVResult { - bytesWritten: number; - buffers: T; - } - namespace writev { - function __promisify__( - fd: number, - buffers: TBuffers, - position?: number, - ): Promise>; - } - /** - * For detailed information, see the documentation of the asynchronous version of - * this API: {@link writev}. - * @since v12.9.0 - * @param [position='null'] - * @return The number of bytes written. - */ - function writevSync(fd: number, buffers: readonly NodeJS.ArrayBufferView[], position?: number): number; - /** - * Read from a file specified by `fd` and write to an array of `ArrayBufferView`s - * using `readv()`. - * - * `position` is the offset from the beginning of the file from where data - * should be read. If `typeof position !== 'number'`, the data will be read - * from the current position. - * - * The callback will be given three arguments: `err`, `bytesRead`, and `buffers`. `bytesRead` is how many bytes were read from the file. - * - * If this method is invoked as its `util.promisify()` ed version, it returns - * a promise for an `Object` with `bytesRead` and `buffers` properties. - * @since v13.13.0, v12.17.0 - * @param [position='null'] - */ - function readv( - fd: number, - buffers: TBuffers, - cb: (err: NodeJS.ErrnoException | null, bytesRead: number, buffers: TBuffers) => void, - ): void; - function readv( - fd: number, - buffers: TBuffers, - position: number | null, - cb: (err: NodeJS.ErrnoException | null, bytesRead: number, buffers: TBuffers) => void, - ): void; - // Providing a default type parameter doesn't provide true BC for userland consumers, but at least suppresses TS2314 - // TODO: remove default in future major version - interface ReadVResult { - bytesRead: number; - buffers: T; - } - namespace readv { - function __promisify__( - fd: number, - buffers: TBuffers, - position?: number, - ): Promise>; - } - /** - * For detailed information, see the documentation of the asynchronous version of - * this API: {@link readv}. - * @since v13.13.0, v12.17.0 - * @param [position='null'] - * @return The number of bytes read. - */ - function readvSync(fd: number, buffers: readonly NodeJS.ArrayBufferView[], position?: number): number; - - interface OpenAsBlobOptions { - /** - * An optional mime type for the blob. - * - * @default 'undefined' - */ - type?: string | undefined; - } - - /** - * Returns a `Blob` whose data is backed by the given file. - * - * The file must not be modified after the `Blob` is created. Any modifications - * will cause reading the `Blob` data to fail with a `DOMException` error. - * Synchronous stat operations on the file when the `Blob` is created, and before - * each read in order to detect whether the file data has been modified on disk. - * - * ```js - * import { openAsBlob } from 'node:fs'; - * - * const blob = await openAsBlob('the.file.txt'); - * const ab = await blob.arrayBuffer(); - * blob.stream(); - * ``` - * @since v19.8.0 - */ - function openAsBlob(path: PathLike, options?: OpenAsBlobOptions): Promise; - - interface OpenDirOptions { - /** - * @default 'utf8' - */ - encoding?: BufferEncoding | undefined; - /** - * Number of directory entries that are buffered - * internally when reading from the directory. Higher values lead to better - * performance but higher memory usage. - * @default 32 - */ - bufferSize?: number | undefined; - /** - * @default false - */ - recursive?: boolean | undefined; - } - /** - * Synchronously open a directory. See [`opendir(3)`](http://man7.org/linux/man-pages/man3/opendir.3.html). - * - * Creates an `fs.Dir`, which contains all further functions for reading from - * and cleaning up the directory. - * - * The `encoding` option sets the encoding for the `path` while opening the - * directory and subsequent read operations. - * @since v12.12.0 - */ - function opendirSync(path: PathLike, options?: OpenDirOptions): Dir; - /** - * Asynchronously open a directory. See the POSIX [`opendir(3)`](http://man7.org/linux/man-pages/man3/opendir.3.html) documentation for - * more details. - * - * Creates an `fs.Dir`, which contains all further functions for reading from - * and cleaning up the directory. - * - * The `encoding` option sets the encoding for the `path` while opening the - * directory and subsequent read operations. - * @since v12.12.0 - */ - function opendir(path: PathLike, cb: (err: NodeJS.ErrnoException | null, dir: Dir) => void): void; - function opendir( - path: PathLike, - options: OpenDirOptions, - cb: (err: NodeJS.ErrnoException | null, dir: Dir) => void, - ): void; - namespace opendir { - function __promisify__(path: PathLike, options?: OpenDirOptions): Promise; - } - interface BigIntStats extends StatsBase { - atimeNs: bigint; - mtimeNs: bigint; - ctimeNs: bigint; - birthtimeNs: bigint; - } - interface BigIntOptions { - bigint: true; - } - interface StatOptions { - bigint?: boolean | undefined; - } - interface StatSyncOptions extends StatOptions { - throwIfNoEntry?: boolean | undefined; - } - interface CopyOptionsBase { - /** - * Dereference symlinks - * @default false - */ - dereference?: boolean | undefined; - /** - * When `force` is `false`, and the destination - * exists, throw an error. - * @default false - */ - errorOnExist?: boolean | undefined; - /** - * Overwrite existing file or directory. _The copy - * operation will ignore errors if you set this to false and the destination - * exists. Use the `errorOnExist` option to change this behavior. - * @default true - */ - force?: boolean | undefined; - /** - * Modifiers for copy operation. See `mode` flag of {@link copyFileSync()} - */ - mode?: number | undefined; - /** - * When `true` timestamps from `src` will - * be preserved. - * @default false - */ - preserveTimestamps?: boolean | undefined; - /** - * Copy directories recursively. - * @default false - */ - recursive?: boolean | undefined; - /** - * When true, path resolution for symlinks will be skipped - * @default false - */ - verbatimSymlinks?: boolean | undefined; - } - interface CopyOptions extends CopyOptionsBase { - /** - * Function to filter copied files/directories. Return - * `true` to copy the item, `false` to ignore it. - */ - filter?: ((source: string, destination: string) => boolean | Promise) | undefined; - } - interface CopySyncOptions extends CopyOptionsBase { - /** - * Function to filter copied files/directories. Return - * `true` to copy the item, `false` to ignore it. - */ - filter?: ((source: string, destination: string) => boolean) | undefined; - } - /** - * Asynchronously copies the entire directory structure from `src` to `dest`, - * including subdirectories and files. - * - * When copying a directory to another directory, globs are not supported and - * behavior is similar to `cp dir1/ dir2/`. - * @since v16.7.0 - * @experimental - * @param src source path to copy. - * @param dest destination path to copy to. - */ - function cp( - source: string | URL, - destination: string | URL, - callback: (err: NodeJS.ErrnoException | null) => void, - ): void; - function cp( - source: string | URL, - destination: string | URL, - opts: CopyOptions, - callback: (err: NodeJS.ErrnoException | null) => void, - ): void; - /** - * Synchronously copies the entire directory structure from `src` to `dest`, - * including subdirectories and files. - * - * When copying a directory to another directory, globs are not supported and - * behavior is similar to `cp dir1/ dir2/`. - * @since v16.7.0 - * @experimental - * @param src source path to copy. - * @param dest destination path to copy to. - */ - function cpSync(source: string | URL, destination: string | URL, opts?: CopySyncOptions): void; - - // TODO: collapse - interface _GlobOptions { - /** - * Current working directory. - * @default process.cwd() - */ - cwd?: string | URL | undefined; - /** - * `true` if the glob should return paths as `Dirent`s, `false` otherwise. - * @default false - * @since v22.2.0 - */ - withFileTypes?: boolean | undefined; - /** - * Function to filter out files/directories or a - * list of glob patterns to be excluded. If a function is provided, return - * `true` to exclude the item, `false` to include it. - * If a string array is provided, each string should be a glob pattern that - * specifies paths to exclude. Note: Negation patterns (e.g., '!foo.js') are - * not supported. - * @default undefined - */ - exclude?: ((fileName: T) => boolean) | readonly string[] | undefined; - } - interface GlobOptions extends _GlobOptions {} - interface GlobOptionsWithFileTypes extends _GlobOptions { - withFileTypes: true; - } - interface GlobOptionsWithoutFileTypes extends _GlobOptions { - withFileTypes?: false | undefined; - } - - /** - * Retrieves the files matching the specified pattern. - * - * ```js - * import { glob } from 'node:fs'; - * - * glob('*.js', (err, matches) => { - * if (err) throw err; - * console.log(matches); - * }); - * ``` - * @since v22.0.0 - */ - function glob( - pattern: string | readonly string[], - callback: (err: NodeJS.ErrnoException | null, matches: string[]) => void, - ): void; - function glob( - pattern: string | readonly string[], - options: GlobOptionsWithFileTypes, - callback: ( - err: NodeJS.ErrnoException | null, - matches: Dirent[], - ) => void, - ): void; - function glob( - pattern: string | readonly string[], - options: GlobOptionsWithoutFileTypes, - callback: ( - err: NodeJS.ErrnoException | null, - matches: string[], - ) => void, - ): void; - function glob( - pattern: string | readonly string[], - options: GlobOptions, - callback: ( - err: NodeJS.ErrnoException | null, - matches: Dirent[] | string[], - ) => void, - ): void; - /** - * ```js - * import { globSync } from 'node:fs'; - * - * console.log(globSync('*.js')); - * ``` - * @since v22.0.0 - * @returns paths of files that match the pattern. - */ - function globSync(pattern: string | readonly string[]): string[]; - function globSync( - pattern: string | readonly string[], - options: GlobOptionsWithFileTypes, - ): Dirent[]; - function globSync( - pattern: string | readonly string[], - options: GlobOptionsWithoutFileTypes, - ): string[]; - function globSync( - pattern: string | readonly string[], - options: GlobOptions, - ): Dirent[] | string[]; -} -declare module "node:fs" { - export * as promises from "node:fs/promises"; -} -declare module "fs" { - export * from "node:fs"; -} diff --git a/PBandGraphScaffold/node_modules/@types/node/fs/promises.d.ts b/PBandGraphScaffold/node_modules/@types/node/fs/promises.d.ts deleted file mode 100644 index ded1b24..0000000 --- a/PBandGraphScaffold/node_modules/@types/node/fs/promises.d.ts +++ /dev/null @@ -1,1316 +0,0 @@ -/** - * The `fs/promises` API provides asynchronous file system methods that return - * promises. - * - * The promise APIs use the underlying Node.js threadpool to perform file - * system operations off the event loop thread. These operations are not - * synchronized or threadsafe. Care must be taken when performing multiple - * concurrent modifications on the same file or data corruption may occur. - * @since v10.0.0 - */ -declare module "node:fs/promises" { - import { NonSharedBuffer } from "node:buffer"; - import { Abortable } from "node:events"; - import { Interface as ReadlineInterface } from "node:readline"; - import { - BigIntStats, - BigIntStatsFs, - BufferEncodingOption, - constants as fsConstants, - CopyOptions, - Dir, - Dirent, - DisposableTempDir, - EncodingOption, - GlobOptions, - GlobOptionsWithFileTypes, - GlobOptionsWithoutFileTypes, - MakeDirectoryOptions, - Mode, - ObjectEncodingOptions, - OpenDirOptions, - OpenMode, - PathLike, - ReadOptions, - ReadOptionsWithBuffer, - ReadPosition, - ReadStream, - ReadVResult, - RmOptions, - StatFsOptions, - StatOptions, - Stats, - StatsFs, - TimeLike, - WatchEventType, - WatchOptions as _WatchOptions, - WriteStream, - WriteVResult, - } from "node:fs"; - import { Stream } from "node:stream"; - import { ReadableStream } from "node:stream/web"; - interface FileChangeInfo { - eventType: WatchEventType; - filename: T | null; - } - interface FlagAndOpenMode { - mode?: Mode | undefined; - flag?: OpenMode | undefined; - } - interface FileReadResult { - bytesRead: number; - buffer: T; - } - /** @deprecated This interface will be removed in a future version. Use `import { ReadOptionsWithBuffer } from "node:fs"` instead. */ - interface FileReadOptions { - /** - * @default `Buffer.alloc(0xffff)` - */ - buffer?: T; - /** - * @default 0 - */ - offset?: number | null; - /** - * @default `buffer.byteLength` - */ - length?: number | null; - position?: ReadPosition | null; - } - interface CreateReadStreamOptions extends Abortable { - encoding?: BufferEncoding | null | undefined; - autoClose?: boolean | undefined; - emitClose?: boolean | undefined; - start?: number | undefined; - end?: number | undefined; - highWaterMark?: number | undefined; - } - interface CreateWriteStreamOptions { - encoding?: BufferEncoding | null | undefined; - autoClose?: boolean | undefined; - emitClose?: boolean | undefined; - start?: number | undefined; - highWaterMark?: number | undefined; - flush?: boolean | undefined; - } - interface ReadableWebStreamOptions { - autoClose?: boolean | undefined; - } - // TODO: Add `EventEmitter` close - interface FileHandle { - /** - * The numeric file descriptor managed by the {FileHandle} object. - * @since v10.0.0 - */ - readonly fd: number; - /** - * Alias of `filehandle.writeFile()`. - * - * When operating on file handles, the mode cannot be changed from what it was set - * to with `fsPromises.open()`. Therefore, this is equivalent to `filehandle.writeFile()`. - * @since v10.0.0 - * @return Fulfills with `undefined` upon success. - */ - appendFile( - data: string | Uint8Array, - options?: - | (ObjectEncodingOptions & Abortable) - | BufferEncoding - | null, - ): Promise; - /** - * Changes the ownership of the file. A wrapper for [`chown(2)`](http://man7.org/linux/man-pages/man2/chown.2.html). - * @since v10.0.0 - * @param uid The file's new owner's user id. - * @param gid The file's new group's group id. - * @return Fulfills with `undefined` upon success. - */ - chown(uid: number, gid: number): Promise; - /** - * Modifies the permissions on the file. See [`chmod(2)`](http://man7.org/linux/man-pages/man2/chmod.2.html). - * @since v10.0.0 - * @param mode the file mode bit mask. - * @return Fulfills with `undefined` upon success. - */ - chmod(mode: Mode): Promise; - /** - * Unlike the 16 KiB default `highWaterMark` for a `stream.Readable`, the stream - * returned by this method has a default `highWaterMark` of 64 KiB. - * - * `options` can include `start` and `end` values to read a range of bytes from - * the file instead of the entire file. Both `start` and `end` are inclusive and - * start counting at 0, allowed values are in the - * \[0, [`Number.MAX_SAFE_INTEGER`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER)\] range. If `start` is - * omitted or `undefined`, `filehandle.createReadStream()` reads sequentially from - * the current file position. The `encoding` can be any one of those accepted by `Buffer`. - * - * If the `FileHandle` points to a character device that only supports blocking - * reads (such as keyboard or sound card), read operations do not finish until data - * is available. This can prevent the process from exiting and the stream from - * closing naturally. - * - * By default, the stream will emit a `'close'` event after it has been - * destroyed. Set the `emitClose` option to `false` to change this behavior. - * - * ```js - * import { open } from 'node:fs/promises'; - * - * const fd = await open('/dev/input/event0'); - * // Create a stream from some character device. - * const stream = fd.createReadStream(); - * setTimeout(() => { - * stream.close(); // This may not close the stream. - * // Artificially marking end-of-stream, as if the underlying resource had - * // indicated end-of-file by itself, allows the stream to close. - * // This does not cancel pending read operations, and if there is such an - * // operation, the process may still not be able to exit successfully - * // until it finishes. - * stream.push(null); - * stream.read(0); - * }, 100); - * ``` - * - * If `autoClose` is false, then the file descriptor won't be closed, even if - * there's an error. It is the application's responsibility to close it and make - * sure there's no file descriptor leak. If `autoClose` is set to true (default - * behavior), on `'error'` or `'end'` the file descriptor will be closed - * automatically. - * - * An example to read the last 10 bytes of a file which is 100 bytes long: - * - * ```js - * import { open } from 'node:fs/promises'; - * - * const fd = await open('sample.txt'); - * fd.createReadStream({ start: 90, end: 99 }); - * ``` - * @since v16.11.0 - */ - createReadStream(options?: CreateReadStreamOptions): ReadStream; - /** - * `options` may also include a `start` option to allow writing data at some - * position past the beginning of the file, allowed values are in the - * \[0, [`Number.MAX_SAFE_INTEGER`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER)\] range. Modifying a file rather than - * replacing it may require the `flags` `open` option to be set to `r+` rather than - * the default `r`. The `encoding` can be any one of those accepted by `Buffer`. - * - * If `autoClose` is set to true (default behavior) on `'error'` or `'finish'` the file descriptor will be closed automatically. If `autoClose` is false, - * then the file descriptor won't be closed, even if there's an error. - * It is the application's responsibility to close it and make sure there's no - * file descriptor leak. - * - * By default, the stream will emit a `'close'` event after it has been - * destroyed. Set the `emitClose` option to `false` to change this behavior. - * @since v16.11.0 - */ - createWriteStream(options?: CreateWriteStreamOptions): WriteStream; - /** - * Forces all currently queued I/O operations associated with the file to the - * operating system's synchronized I/O completion state. Refer to the POSIX [`fdatasync(2)`](http://man7.org/linux/man-pages/man2/fdatasync.2.html) documentation for details. - * - * Unlike `filehandle.sync` this method does not flush modified metadata. - * @since v10.0.0 - * @return Fulfills with `undefined` upon success. - */ - datasync(): Promise; - /** - * Request that all data for the open file descriptor is flushed to the storage - * device. The specific implementation is operating system and device specific. - * Refer to the POSIX [`fsync(2)`](http://man7.org/linux/man-pages/man2/fsync.2.html) documentation for more detail. - * @since v10.0.0 - * @return Fulfills with `undefined` upon success. - */ - sync(): Promise; - /** - * Reads data from the file and stores that in the given buffer. - * - * If the file is not modified concurrently, the end-of-file is reached when the - * number of bytes read is zero. - * @since v10.0.0 - * @param buffer A buffer that will be filled with the file data read. - * @param offset The location in the buffer at which to start filling. - * @param length The number of bytes to read. - * @param position The location where to begin reading data from the file. If `null`, data will be read from the current file position, and the position will be updated. If `position` is an - * integer, the current file position will remain unchanged. - * @return Fulfills upon success with an object with two properties: - */ - read( - buffer: T, - offset?: number | null, - length?: number | null, - position?: ReadPosition | null, - ): Promise>; - read( - buffer: T, - options?: ReadOptions, - ): Promise>; - read( - options?: ReadOptionsWithBuffer, - ): Promise>; - /** - * Returns a byte-oriented `ReadableStream` that may be used to read the file's - * contents. - * - * An error will be thrown if this method is called more than once or is called - * after the `FileHandle` is closed or closing. - * - * ```js - * import { - * open, - * } from 'node:fs/promises'; - * - * const file = await open('./some/file/to/read'); - * - * for await (const chunk of file.readableWebStream()) - * console.log(chunk); - * - * await file.close(); - * ``` - * - * While the `ReadableStream` will read the file to completion, it will not - * close the `FileHandle` automatically. User code must still call the`fileHandle.close()` method. - * @since v17.0.0 - */ - readableWebStream(options?: ReadableWebStreamOptions): ReadableStream; - /** - * Asynchronously reads the entire contents of a file. - * - * If `options` is a string, then it specifies the `encoding`. - * - * The `FileHandle` has to support reading. - * - * If one or more `filehandle.read()` calls are made on a file handle and then a `filehandle.readFile()` call is made, the data will be read from the current - * position till the end of the file. It doesn't always read from the beginning - * of the file. - * @since v10.0.0 - * @return Fulfills upon a successful read with the contents of the file. If no encoding is specified (using `options.encoding`), the data is returned as a {Buffer} object. Otherwise, the - * data will be a string. - */ - readFile( - options?: - | ({ encoding?: null | undefined } & Abortable) - | null, - ): Promise; - /** - * Asynchronously reads the entire contents of a file. The underlying file will _not_ be closed automatically. - * The `FileHandle` must have been opened for reading. - */ - readFile( - options: - | ({ encoding: BufferEncoding } & Abortable) - | BufferEncoding, - ): Promise; - /** - * Asynchronously reads the entire contents of a file. The underlying file will _not_ be closed automatically. - * The `FileHandle` must have been opened for reading. - */ - readFile( - options?: - | (ObjectEncodingOptions & Abortable) - | BufferEncoding - | null, - ): Promise; - /** - * Convenience method to create a `readline` interface and stream over the file. - * See `filehandle.createReadStream()` for the options. - * - * ```js - * import { open } from 'node:fs/promises'; - * - * const file = await open('./some/file/to/read'); - * - * for await (const line of file.readLines()) { - * console.log(line); - * } - * ``` - * @since v18.11.0 - */ - readLines(options?: CreateReadStreamOptions): ReadlineInterface; - /** - * @since v10.0.0 - * @return Fulfills with an {fs.Stats} for the file. - */ - stat( - opts?: StatOptions & { - bigint?: false | undefined; - }, - ): Promise; - stat( - opts: StatOptions & { - bigint: true; - }, - ): Promise; - stat(opts?: StatOptions): Promise; - /** - * Truncates the file. - * - * If the file was larger than `len` bytes, only the first `len` bytes will be - * retained in the file. - * - * The following example retains only the first four bytes of the file: - * - * ```js - * import { open } from 'node:fs/promises'; - * - * let filehandle = null; - * try { - * filehandle = await open('temp.txt', 'r+'); - * await filehandle.truncate(4); - * } finally { - * await filehandle?.close(); - * } - * ``` - * - * If the file previously was shorter than `len` bytes, it is extended, and the - * extended part is filled with null bytes (`'\0'`): - * - * If `len` is negative then `0` will be used. - * @since v10.0.0 - * @param [len=0] - * @return Fulfills with `undefined` upon success. - */ - truncate(len?: number): Promise; - /** - * Change the file system timestamps of the object referenced by the `FileHandle` then fulfills the promise with no arguments upon success. - * @since v10.0.0 - */ - utimes(atime: TimeLike, mtime: TimeLike): Promise; - /** - * Asynchronously writes data to a file, replacing the file if it already exists. `data` can be a string, a buffer, an - * [AsyncIterable](https://tc39.github.io/ecma262/#sec-asynciterable-interface), or an - * [Iterable](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols#The_iterable_protocol) object. - * The promise is fulfilled with no arguments upon success. - * - * If `options` is a string, then it specifies the `encoding`. - * - * The `FileHandle` has to support writing. - * - * It is unsafe to use `filehandle.writeFile()` multiple times on the same file - * without waiting for the promise to be fulfilled (or rejected). - * - * If one or more `filehandle.write()` calls are made on a file handle and then a`filehandle.writeFile()` call is made, the data will be written from the - * current position till the end of the file. It doesn't always write from the - * beginning of the file. - * @since v10.0.0 - */ - writeFile( - data: string | Uint8Array, - options?: - | (ObjectEncodingOptions & Abortable) - | BufferEncoding - | null, - ): Promise; - /** - * Write `buffer` to the file. - * - * The promise is fulfilled with an object containing two properties: - * - * It is unsafe to use `filehandle.write()` multiple times on the same file - * without waiting for the promise to be fulfilled (or rejected). For this - * scenario, use `filehandle.createWriteStream()`. - * - * On Linux, positional writes do not work when the file is opened in append mode. - * The kernel ignores the position argument and always appends the data to - * the end of the file. - * @since v10.0.0 - * @param offset The start position from within `buffer` where the data to write begins. - * @param [length=buffer.byteLength - offset] The number of bytes from `buffer` to write. - * @param [position='null'] The offset from the beginning of the file where the data from `buffer` should be written. If `position` is not a `number`, the data will be written at the current - * position. See the POSIX pwrite(2) documentation for more detail. - */ - write( - buffer: TBuffer, - offset?: number | null, - length?: number | null, - position?: number | null, - ): Promise<{ - bytesWritten: number; - buffer: TBuffer; - }>; - write( - buffer: TBuffer, - options?: { offset?: number; length?: number; position?: number }, - ): Promise<{ - bytesWritten: number; - buffer: TBuffer; - }>; - write( - data: string, - position?: number | null, - encoding?: BufferEncoding | null, - ): Promise<{ - bytesWritten: number; - buffer: string; - }>; - /** - * Write an array of [ArrayBufferView](https://developer.mozilla.org/en-US/docs/Web/API/ArrayBufferView) s to the file. - * - * The promise is fulfilled with an object containing a two properties: - * - * It is unsafe to call `writev()` multiple times on the same file without waiting - * for the promise to be fulfilled (or rejected). - * - * On Linux, positional writes don't work when the file is opened in append mode. - * The kernel ignores the position argument and always appends the data to - * the end of the file. - * @since v12.9.0 - * @param [position='null'] The offset from the beginning of the file where the data from `buffers` should be written. If `position` is not a `number`, the data will be written at the current - * position. - */ - writev( - buffers: TBuffers, - position?: number, - ): Promise>; - /** - * Read from a file and write to an array of [ArrayBufferView](https://developer.mozilla.org/en-US/docs/Web/API/ArrayBufferView) s - * @since v13.13.0, v12.17.0 - * @param [position='null'] The offset from the beginning of the file where the data should be read from. If `position` is not a `number`, the data will be read from the current position. - * @return Fulfills upon success an object containing two properties: - */ - readv( - buffers: TBuffers, - position?: number, - ): Promise>; - /** - * Closes the file handle after waiting for any pending operation on the handle to - * complete. - * - * ```js - * import { open } from 'node:fs/promises'; - * - * let filehandle; - * try { - * filehandle = await open('thefile.txt', 'r'); - * } finally { - * await filehandle?.close(); - * } - * ``` - * @since v10.0.0 - * @return Fulfills with `undefined` upon success. - */ - close(): Promise; - /** - * Calls `filehandle.close()` and returns a promise that fulfills when the - * filehandle is closed. - * @since v20.4.0, v18.8.0 - */ - [Symbol.asyncDispose](): Promise; - } - const constants: typeof fsConstants; - /** - * Tests a user's permissions for the file or directory specified by `path`. - * The `mode` argument is an optional integer that specifies the accessibility - * checks to be performed. `mode` should be either the value `fs.constants.F_OK` or a mask consisting of the bitwise OR of any of `fs.constants.R_OK`, `fs.constants.W_OK`, and `fs.constants.X_OK` - * (e.g.`fs.constants.W_OK | fs.constants.R_OK`). Check `File access constants` for - * possible values of `mode`. - * - * If the accessibility check is successful, the promise is fulfilled with no - * value. If any of the accessibility checks fail, the promise is rejected - * with an [Error](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error) object. The following example checks if the file`/etc/passwd` can be read and - * written by the current process. - * - * ```js - * import { access, constants } from 'node:fs/promises'; - * - * try { - * await access('/etc/passwd', constants.R_OK | constants.W_OK); - * console.log('can access'); - * } catch { - * console.error('cannot access'); - * } - * ``` - * - * Using `fsPromises.access()` to check for the accessibility of a file before - * calling `fsPromises.open()` is not recommended. Doing so introduces a race - * condition, since other processes may change the file's state between the two - * calls. Instead, user code should open/read/write the file directly and handle - * the error raised if the file is not accessible. - * @since v10.0.0 - * @param [mode=fs.constants.F_OK] - * @return Fulfills with `undefined` upon success. - */ - function access(path: PathLike, mode?: number): Promise; - /** - * Asynchronously copies `src` to `dest`. By default, `dest` is overwritten if it - * already exists. - * - * No guarantees are made about the atomicity of the copy operation. If an - * error occurs after the destination file has been opened for writing, an attempt - * will be made to remove the destination. - * - * ```js - * import { copyFile, constants } from 'node:fs/promises'; - * - * try { - * await copyFile('source.txt', 'destination.txt'); - * console.log('source.txt was copied to destination.txt'); - * } catch { - * console.error('The file could not be copied'); - * } - * - * // By using COPYFILE_EXCL, the operation will fail if destination.txt exists. - * try { - * await copyFile('source.txt', 'destination.txt', constants.COPYFILE_EXCL); - * console.log('source.txt was copied to destination.txt'); - * } catch { - * console.error('The file could not be copied'); - * } - * ``` - * @since v10.0.0 - * @param src source filename to copy - * @param dest destination filename of the copy operation - * @param [mode=0] Optional modifiers that specify the behavior of the copy operation. It is possible to create a mask consisting of the bitwise OR of two or more values (e.g. - * `fs.constants.COPYFILE_EXCL | fs.constants.COPYFILE_FICLONE`) - * @return Fulfills with `undefined` upon success. - */ - function copyFile(src: PathLike, dest: PathLike, mode?: number): Promise; - /** - * Opens a `FileHandle`. - * - * Refer to the POSIX [`open(2)`](http://man7.org/linux/man-pages/man2/open.2.html) documentation for more detail. - * - * Some characters (`< > : " / \ | ? *`) are reserved under Windows as documented - * by [Naming Files, Paths, and Namespaces](https://docs.microsoft.com/en-us/windows/desktop/FileIO/naming-a-file). Under NTFS, if the filename contains - * a colon, Node.js will open a file system stream, as described by [this MSDN page](https://docs.microsoft.com/en-us/windows/desktop/FileIO/using-streams). - * @since v10.0.0 - * @param [flags='r'] See `support of file system `flags``. - * @param [mode=0o666] Sets the file mode (permission and sticky bits) if the file is created. - * @return Fulfills with a {FileHandle} object. - */ - function open(path: PathLike, flags?: string | number, mode?: Mode): Promise; - /** - * Renames `oldPath` to `newPath`. - * @since v10.0.0 - * @return Fulfills with `undefined` upon success. - */ - function rename(oldPath: PathLike, newPath: PathLike): Promise; - /** - * Truncates (shortens or extends the length) of the content at `path` to `len` bytes. - * @since v10.0.0 - * @param [len=0] - * @return Fulfills with `undefined` upon success. - */ - function truncate(path: PathLike, len?: number): Promise; - /** - * Removes the directory identified by `path`. - * - * Using `fsPromises.rmdir()` on a file (not a directory) results in the - * promise being rejected with an `ENOENT` error on Windows and an `ENOTDIR` error on POSIX. - * - * To get a behavior similar to the `rm -rf` Unix command, use `fsPromises.rm()` with options `{ recursive: true, force: true }`. - * @since v10.0.0 - * @return Fulfills with `undefined` upon success. - */ - function rmdir(path: PathLike): Promise; - /** - * Removes files and directories (modeled on the standard POSIX `rm` utility). - * @since v14.14.0 - * @return Fulfills with `undefined` upon success. - */ - function rm(path: PathLike, options?: RmOptions): Promise; - /** - * Asynchronously creates a directory. - * - * The optional `options` argument can be an integer specifying `mode` (permission - * and sticky bits), or an object with a `mode` property and a `recursive` property indicating whether parent directories should be created. Calling `fsPromises.mkdir()` when `path` is a directory - * that exists results in a - * rejection only when `recursive` is false. - * - * ```js - * import { mkdir } from 'node:fs/promises'; - * - * try { - * const projectFolder = new URL('./test/project/', import.meta.url); - * const createDir = await mkdir(projectFolder, { recursive: true }); - * - * console.log(`created ${createDir}`); - * } catch (err) { - * console.error(err.message); - * } - * ``` - * @since v10.0.0 - * @return Upon success, fulfills with `undefined` if `recursive` is `false`, or the first directory path created if `recursive` is `true`. - */ - function mkdir( - path: PathLike, - options: MakeDirectoryOptions & { - recursive: true; - }, - ): Promise; - /** - * Asynchronous mkdir(2) - create a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders - * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`. - */ - function mkdir( - path: PathLike, - options?: - | Mode - | (MakeDirectoryOptions & { - recursive?: false | undefined; - }) - | null, - ): Promise; - /** - * Asynchronous mkdir(2) - create a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders - * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`. - */ - function mkdir(path: PathLike, options?: Mode | MakeDirectoryOptions | null): Promise; - /** - * Reads the contents of a directory. - * - * The optional `options` argument can be a string specifying an encoding, or an - * object with an `encoding` property specifying the character encoding to use for - * the filenames. If the `encoding` is set to `'buffer'`, the filenames returned - * will be passed as `Buffer` objects. - * - * If `options.withFileTypes` is set to `true`, the returned array will contain `fs.Dirent` objects. - * - * ```js - * import { readdir } from 'node:fs/promises'; - * - * try { - * const files = await readdir(path); - * for (const file of files) - * console.log(file); - * } catch (err) { - * console.error(err); - * } - * ``` - * @since v10.0.0 - * @return Fulfills with an array of the names of the files in the directory excluding `'.'` and `'..'`. - */ - function readdir( - path: PathLike, - options?: - | (ObjectEncodingOptions & { - withFileTypes?: false | undefined; - recursive?: boolean | undefined; - }) - | BufferEncoding - | null, - ): Promise; - /** - * Asynchronous readdir(3) - read a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function readdir( - path: PathLike, - options: - | { - encoding: "buffer"; - withFileTypes?: false | undefined; - recursive?: boolean | undefined; - } - | "buffer", - ): Promise; - /** - * Asynchronous readdir(3) - read a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function readdir( - path: PathLike, - options?: - | (ObjectEncodingOptions & { - withFileTypes?: false | undefined; - recursive?: boolean | undefined; - }) - | BufferEncoding - | null, - ): Promise; - /** - * Asynchronous readdir(3) - read a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options If called with `withFileTypes: true` the result data will be an array of Dirent. - */ - function readdir( - path: PathLike, - options: ObjectEncodingOptions & { - withFileTypes: true; - recursive?: boolean | undefined; - }, - ): Promise; - /** - * Asynchronous readdir(3) - read a directory. - * @param path A path to a directory. If a URL is provided, it must use the `file:` protocol. - * @param options Must include `withFileTypes: true` and `encoding: 'buffer'`. - */ - function readdir( - path: PathLike, - options: { - encoding: "buffer"; - withFileTypes: true; - recursive?: boolean | undefined; - }, - ): Promise[]>; - /** - * Reads the contents of the symbolic link referred to by `path`. See the POSIX [`readlink(2)`](http://man7.org/linux/man-pages/man2/readlink.2.html) documentation for more detail. The promise is - * fulfilled with the`linkString` upon success. - * - * The optional `options` argument can be a string specifying an encoding, or an - * object with an `encoding` property specifying the character encoding to use for - * the link path returned. If the `encoding` is set to `'buffer'`, the link path - * returned will be passed as a `Buffer` object. - * @since v10.0.0 - * @return Fulfills with the `linkString` upon success. - */ - function readlink(path: PathLike, options?: ObjectEncodingOptions | BufferEncoding | null): Promise; - /** - * Asynchronous readlink(2) - read value of a symbolic link. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function readlink(path: PathLike, options: BufferEncodingOption): Promise; - /** - * Asynchronous readlink(2) - read value of a symbolic link. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function readlink( - path: PathLike, - options?: ObjectEncodingOptions | string | null, - ): Promise; - /** - * Creates a symbolic link. - * - * The `type` argument is only used on Windows platforms and can be one of `'dir'`, `'file'`, or `'junction'`. If the `type` argument is not a string, Node.js will - * autodetect `target` type and use `'file'` or `'dir'`. If the `target` does not - * exist, `'file'` will be used. Windows junction points require the destination - * path to be absolute. When using `'junction'`, the `target` argument will - * automatically be normalized to absolute path. Junction points on NTFS volumes - * can only point to directories. - * @since v10.0.0 - * @param [type='null'] - * @return Fulfills with `undefined` upon success. - */ - function symlink(target: PathLike, path: PathLike, type?: string | null): Promise; - /** - * Equivalent to `fsPromises.stat()` unless `path` refers to a symbolic link, - * in which case the link itself is stat-ed, not the file that it refers to. - * Refer to the POSIX [`lstat(2)`](http://man7.org/linux/man-pages/man2/lstat.2.html) document for more detail. - * @since v10.0.0 - * @return Fulfills with the {fs.Stats} object for the given symbolic link `path`. - */ - function lstat( - path: PathLike, - opts?: StatOptions & { - bigint?: false | undefined; - }, - ): Promise; - function lstat( - path: PathLike, - opts: StatOptions & { - bigint: true; - }, - ): Promise; - function lstat(path: PathLike, opts?: StatOptions): Promise; - /** - * @since v10.0.0 - * @return Fulfills with the {fs.Stats} object for the given `path`. - */ - function stat( - path: PathLike, - opts?: StatOptions & { - bigint?: false | undefined; - }, - ): Promise; - function stat( - path: PathLike, - opts: StatOptions & { - bigint: true; - }, - ): Promise; - function stat(path: PathLike, opts?: StatOptions): Promise; - /** - * @since v19.6.0, v18.15.0 - * @return Fulfills with the {fs.StatFs} object for the given `path`. - */ - function statfs( - path: PathLike, - opts?: StatFsOptions & { - bigint?: false | undefined; - }, - ): Promise; - function statfs( - path: PathLike, - opts: StatFsOptions & { - bigint: true; - }, - ): Promise; - function statfs(path: PathLike, opts?: StatFsOptions): Promise; - /** - * Creates a new link from the `existingPath` to the `newPath`. See the POSIX [`link(2)`](http://man7.org/linux/man-pages/man2/link.2.html) documentation for more detail. - * @since v10.0.0 - * @return Fulfills with `undefined` upon success. - */ - function link(existingPath: PathLike, newPath: PathLike): Promise; - /** - * If `path` refers to a symbolic link, then the link is removed without affecting - * the file or directory to which that link refers. If the `path` refers to a file - * path that is not a symbolic link, the file is deleted. See the POSIX [`unlink(2)`](http://man7.org/linux/man-pages/man2/unlink.2.html) documentation for more detail. - * @since v10.0.0 - * @return Fulfills with `undefined` upon success. - */ - function unlink(path: PathLike): Promise; - /** - * Changes the permissions of a file. - * @since v10.0.0 - * @return Fulfills with `undefined` upon success. - */ - function chmod(path: PathLike, mode: Mode): Promise; - /** - * Changes the permissions on a symbolic link. - * - * This method is only implemented on macOS. - * @deprecated Since v10.0.0 - * @return Fulfills with `undefined` upon success. - */ - function lchmod(path: PathLike, mode: Mode): Promise; - /** - * Changes the ownership on a symbolic link. - * @since v10.0.0 - * @return Fulfills with `undefined` upon success. - */ - function lchown(path: PathLike, uid: number, gid: number): Promise; - /** - * Changes the access and modification times of a file in the same way as `fsPromises.utimes()`, with the difference that if the path refers to a - * symbolic link, then the link is not dereferenced: instead, the timestamps of - * the symbolic link itself are changed. - * @since v14.5.0, v12.19.0 - * @return Fulfills with `undefined` upon success. - */ - function lutimes(path: PathLike, atime: TimeLike, mtime: TimeLike): Promise; - /** - * Changes the ownership of a file. - * @since v10.0.0 - * @return Fulfills with `undefined` upon success. - */ - function chown(path: PathLike, uid: number, gid: number): Promise; - /** - * Change the file system timestamps of the object referenced by `path`. - * - * The `atime` and `mtime` arguments follow these rules: - * - * * Values can be either numbers representing Unix epoch time, `Date`s, or a - * numeric string like `'123456789.0'`. - * * If the value can not be converted to a number, or is `NaN`, `Infinity`, or `-Infinity`, an `Error` will be thrown. - * @since v10.0.0 - * @return Fulfills with `undefined` upon success. - */ - function utimes(path: PathLike, atime: TimeLike, mtime: TimeLike): Promise; - /** - * Determines the actual location of `path` using the same semantics as the `fs.realpath.native()` function. - * - * Only paths that can be converted to UTF8 strings are supported. - * - * The optional `options` argument can be a string specifying an encoding, or an - * object with an `encoding` property specifying the character encoding to use for - * the path. If the `encoding` is set to `'buffer'`, the path returned will be - * passed as a `Buffer` object. - * - * On Linux, when Node.js is linked against musl libc, the procfs file system must - * be mounted on `/proc` in order for this function to work. Glibc does not have - * this restriction. - * @since v10.0.0 - * @return Fulfills with the resolved path upon success. - */ - function realpath(path: PathLike, options?: ObjectEncodingOptions | BufferEncoding | null): Promise; - /** - * Asynchronous realpath(3) - return the canonicalized absolute pathname. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function realpath(path: PathLike, options: BufferEncodingOption): Promise; - /** - * Asynchronous realpath(3) - return the canonicalized absolute pathname. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function realpath( - path: PathLike, - options?: ObjectEncodingOptions | BufferEncoding | null, - ): Promise; - /** - * Creates a unique temporary directory. A unique directory name is generated by - * appending six random characters to the end of the provided `prefix`. Due to - * platform inconsistencies, avoid trailing `X` characters in `prefix`. Some - * platforms, notably the BSDs, can return more than six random characters, and - * replace trailing `X` characters in `prefix` with random characters. - * - * The optional `options` argument can be a string specifying an encoding, or an - * object with an `encoding` property specifying the character encoding to use. - * - * ```js - * import { mkdtemp } from 'node:fs/promises'; - * import { join } from 'node:path'; - * import { tmpdir } from 'node:os'; - * - * try { - * await mkdtemp(join(tmpdir(), 'foo-')); - * } catch (err) { - * console.error(err); - * } - * ``` - * - * The `fsPromises.mkdtemp()` method will append the six randomly selected - * characters directly to the `prefix` string. For instance, given a directory `/tmp`, if the intention is to create a temporary directory _within_ `/tmp`, the `prefix` must end with a trailing - * platform-specific path separator - * (`import { sep } from 'node:path'`). - * @since v10.0.0 - * @return Fulfills with a string containing the file system path of the newly created temporary directory. - */ - function mkdtemp(prefix: string, options?: ObjectEncodingOptions | BufferEncoding | null): Promise; - /** - * Asynchronously creates a unique temporary directory. - * Generates six random characters to be appended behind a required `prefix` to create a unique temporary directory. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function mkdtemp(prefix: string, options: BufferEncodingOption): Promise; - /** - * Asynchronously creates a unique temporary directory. - * Generates six random characters to be appended behind a required `prefix` to create a unique temporary directory. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function mkdtemp( - prefix: string, - options?: ObjectEncodingOptions | BufferEncoding | null, - ): Promise; - /** - * The resulting Promise holds an async-disposable object whose `path` property - * holds the created directory path. When the object is disposed, the directory - * and its contents will be removed asynchronously if it still exists. If the - * directory cannot be deleted, disposal will throw an error. The object has an - * async `remove()` method which will perform the same task. - * - * Both this function and the disposal function on the resulting object are - * async, so it should be used with `await` + `await using` as in - * `await using dir = await fsPromises.mkdtempDisposable('prefix')`. - * - * - * - * For detailed information, see the documentation of `fsPromises.mkdtemp()`. - * - * The optional `options` argument can be a string specifying an encoding, or an - * object with an `encoding` property specifying the character encoding to use. - * @since v24.4.0 - */ - function mkdtempDisposable(prefix: PathLike, options?: EncodingOption): Promise; - /** - * Asynchronously writes data to a file, replacing the file if it already exists. `data` can be a string, a buffer, an - * [AsyncIterable](https://tc39.github.io/ecma262/#sec-asynciterable-interface), or an - * [Iterable](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols#The_iterable_protocol) object. - * - * The `encoding` option is ignored if `data` is a buffer. - * - * If `options` is a string, then it specifies the encoding. - * - * The `mode` option only affects the newly created file. See `fs.open()` for more details. - * - * Any specified `FileHandle` has to support writing. - * - * It is unsafe to use `fsPromises.writeFile()` multiple times on the same file - * without waiting for the promise to be settled. - * - * Similarly to `fsPromises.readFile` \- `fsPromises.writeFile` is a convenience - * method that performs multiple `write` calls internally to write the buffer - * passed to it. For performance sensitive code consider using `fs.createWriteStream()` or `filehandle.createWriteStream()`. - * - * It is possible to use an `AbortSignal` to cancel an `fsPromises.writeFile()`. - * Cancelation is "best effort", and some amount of data is likely still - * to be written. - * - * ```js - * import { writeFile } from 'node:fs/promises'; - * import { Buffer } from 'node:buffer'; - * - * try { - * const controller = new AbortController(); - * const { signal } = controller; - * const data = new Uint8Array(Buffer.from('Hello Node.js')); - * const promise = writeFile('message.txt', data, { signal }); - * - * // Abort the request before the promise settles. - * controller.abort(); - * - * await promise; - * } catch (err) { - * // When a request is aborted - err is an AbortError - * console.error(err); - * } - * ``` - * - * Aborting an ongoing request does not abort individual operating - * system requests but rather the internal buffering `fs.writeFile` performs. - * @since v10.0.0 - * @param file filename or `FileHandle` - * @return Fulfills with `undefined` upon success. - */ - function writeFile( - file: PathLike | FileHandle, - data: - | string - | NodeJS.ArrayBufferView - | Iterable - | AsyncIterable - | Stream, - options?: - | (ObjectEncodingOptions & { - mode?: Mode | undefined; - flag?: OpenMode | undefined; - /** - * If all data is successfully written to the file, and `flush` - * is `true`, `filehandle.sync()` is used to flush the data. - * @default false - */ - flush?: boolean | undefined; - } & Abortable) - | BufferEncoding - | null, - ): Promise; - /** - * Asynchronously append data to a file, creating the file if it does not yet - * exist. `data` can be a string or a `Buffer`. - * - * If `options` is a string, then it specifies the `encoding`. - * - * The `mode` option only affects the newly created file. See `fs.open()` for more details. - * - * The `path` may be specified as a `FileHandle` that has been opened - * for appending (using `fsPromises.open()`). - * @since v10.0.0 - * @param path filename or {FileHandle} - * @return Fulfills with `undefined` upon success. - */ - function appendFile( - path: PathLike | FileHandle, - data: string | Uint8Array, - options?: (ObjectEncodingOptions & FlagAndOpenMode & { flush?: boolean | undefined }) | BufferEncoding | null, - ): Promise; - /** - * Asynchronously reads the entire contents of a file. - * - * If no encoding is specified (using `options.encoding`), the data is returned - * as a `Buffer` object. Otherwise, the data will be a string. - * - * If `options` is a string, then it specifies the encoding. - * - * When the `path` is a directory, the behavior of `fsPromises.readFile()` is - * platform-specific. On macOS, Linux, and Windows, the promise will be rejected - * with an error. On FreeBSD, a representation of the directory's contents will be - * returned. - * - * An example of reading a `package.json` file located in the same directory of the - * running code: - * - * ```js - * import { readFile } from 'node:fs/promises'; - * try { - * const filePath = new URL('./package.json', import.meta.url); - * const contents = await readFile(filePath, { encoding: 'utf8' }); - * console.log(contents); - * } catch (err) { - * console.error(err.message); - * } - * ``` - * - * It is possible to abort an ongoing `readFile` using an `AbortSignal`. If a - * request is aborted the promise returned is rejected with an `AbortError`: - * - * ```js - * import { readFile } from 'node:fs/promises'; - * - * try { - * const controller = new AbortController(); - * const { signal } = controller; - * const promise = readFile(fileName, { signal }); - * - * // Abort the request before the promise settles. - * controller.abort(); - * - * await promise; - * } catch (err) { - * // When a request is aborted - err is an AbortError - * console.error(err); - * } - * ``` - * - * Aborting an ongoing request does not abort individual operating - * system requests but rather the internal buffering `fs.readFile` performs. - * - * Any specified `FileHandle` has to support reading. - * @since v10.0.0 - * @param path filename or `FileHandle` - * @return Fulfills with the contents of the file. - */ - function readFile( - path: PathLike | FileHandle, - options?: - | ({ - encoding?: null | undefined; - flag?: OpenMode | undefined; - } & Abortable) - | null, - ): Promise; - /** - * Asynchronously reads the entire contents of a file. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * If a `FileHandle` is provided, the underlying file will _not_ be closed automatically. - * @param options An object that may contain an optional flag. - * If a flag is not provided, it defaults to `'r'`. - */ - function readFile( - path: PathLike | FileHandle, - options: - | ({ - encoding: BufferEncoding; - flag?: OpenMode | undefined; - } & Abortable) - | BufferEncoding, - ): Promise; - /** - * Asynchronously reads the entire contents of a file. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * If a `FileHandle` is provided, the underlying file will _not_ be closed automatically. - * @param options An object that may contain an optional flag. - * If a flag is not provided, it defaults to `'r'`. - */ - function readFile( - path: PathLike | FileHandle, - options?: - | ( - & ObjectEncodingOptions - & Abortable - & { - flag?: OpenMode | undefined; - } - ) - | BufferEncoding - | null, - ): Promise; - /** - * Asynchronously open a directory for iterative scanning. See the POSIX [`opendir(3)`](http://man7.org/linux/man-pages/man3/opendir.3.html) documentation for more detail. - * - * Creates an `fs.Dir`, which contains all further functions for reading from - * and cleaning up the directory. - * - * The `encoding` option sets the encoding for the `path` while opening the - * directory and subsequent read operations. - * - * Example using async iteration: - * - * ```js - * import { opendir } from 'node:fs/promises'; - * - * try { - * const dir = await opendir('./'); - * for await (const dirent of dir) - * console.log(dirent.name); - * } catch (err) { - * console.error(err); - * } - * ``` - * - * When using the async iterator, the `fs.Dir` object will be automatically - * closed after the iterator exits. - * @since v12.12.0 - * @return Fulfills with an {fs.Dir}. - */ - function opendir(path: PathLike, options?: OpenDirOptions): Promise; - interface WatchOptions extends _WatchOptions { - maxQueue?: number | undefined; - overflow?: "ignore" | "throw" | undefined; - } - interface WatchOptionsWithBufferEncoding extends WatchOptions { - encoding: "buffer"; - } - interface WatchOptionsWithStringEncoding extends WatchOptions { - encoding?: BufferEncoding | undefined; - } - /** - * Returns an async iterator that watches for changes on `filename`, where `filename`is either a file or a directory. - * - * ```js - * import { watch } from 'node:fs/promises'; - * - * const ac = new AbortController(); - * const { signal } = ac; - * setTimeout(() => ac.abort(), 10000); - * - * (async () => { - * try { - * const watcher = watch(__filename, { signal }); - * for await (const event of watcher) - * console.log(event); - * } catch (err) { - * if (err.name === 'AbortError') - * return; - * throw err; - * } - * })(); - * ``` - * - * On most platforms, `'rename'` is emitted whenever a filename appears or - * disappears in the directory. - * - * All the `caveats` for `fs.watch()` also apply to `fsPromises.watch()`. - * @since v15.9.0, v14.18.0 - * @return of objects with the properties: - */ - function watch( - filename: PathLike, - options?: WatchOptionsWithStringEncoding | BufferEncoding, - ): NodeJS.AsyncIterator>; - function watch( - filename: PathLike, - options: WatchOptionsWithBufferEncoding | "buffer", - ): NodeJS.AsyncIterator>; - function watch( - filename: PathLike, - options: WatchOptions | BufferEncoding | "buffer", - ): NodeJS.AsyncIterator>; - /** - * Asynchronously copies the entire directory structure from `src` to `dest`, - * including subdirectories and files. - * - * When copying a directory to another directory, globs are not supported and - * behavior is similar to `cp dir1/ dir2/`. - * @since v16.7.0 - * @experimental - * @param src source path to copy. - * @param dest destination path to copy to. - * @return Fulfills with `undefined` upon success. - */ - function cp(source: string | URL, destination: string | URL, opts?: CopyOptions): Promise; - /** - * ```js - * import { glob } from 'node:fs/promises'; - * - * for await (const entry of glob('*.js')) - * console.log(entry); - * ``` - * @since v22.0.0 - * @returns An AsyncIterator that yields the paths of files - * that match the pattern. - */ - function glob(pattern: string | readonly string[]): NodeJS.AsyncIterator; - function glob( - pattern: string | readonly string[], - options: GlobOptionsWithFileTypes, - ): NodeJS.AsyncIterator; - function glob( - pattern: string | readonly string[], - options: GlobOptionsWithoutFileTypes, - ): NodeJS.AsyncIterator; - function glob( - pattern: string | readonly string[], - options: GlobOptions, - ): NodeJS.AsyncIterator; -} -declare module "fs/promises" { - export * from "node:fs/promises"; -} diff --git a/PBandGraphScaffold/node_modules/@types/node/globals.d.ts b/PBandGraphScaffold/node_modules/@types/node/globals.d.ts deleted file mode 100644 index 36e7f90..0000000 --- a/PBandGraphScaffold/node_modules/@types/node/globals.d.ts +++ /dev/null @@ -1,150 +0,0 @@ -declare var global: typeof globalThis; - -declare var process: NodeJS.Process; - -interface ErrorConstructor { - /** - * Creates a `.stack` property on `targetObject`, which when accessed returns - * a string representing the location in the code at which - * `Error.captureStackTrace()` was called. - * - * ```js - * const myObject = {}; - * Error.captureStackTrace(myObject); - * myObject.stack; // Similar to `new Error().stack` - * ``` - * - * The first line of the trace will be prefixed with - * `${myObject.name}: ${myObject.message}`. - * - * The optional `constructorOpt` argument accepts a function. If given, all frames - * above `constructorOpt`, including `constructorOpt`, will be omitted from the - * generated stack trace. - * - * The `constructorOpt` argument is useful for hiding implementation - * details of error generation from the user. For instance: - * - * ```js - * function a() { - * b(); - * } - * - * function b() { - * c(); - * } - * - * function c() { - * // Create an error without stack trace to avoid calculating the stack trace twice. - * const { stackTraceLimit } = Error; - * Error.stackTraceLimit = 0; - * const error = new Error(); - * Error.stackTraceLimit = stackTraceLimit; - * - * // Capture the stack trace above function b - * Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace - * throw error; - * } - * - * a(); - * ``` - */ - captureStackTrace(targetObject: object, constructorOpt?: Function): void; - /** - * @see https://v8.dev/docs/stack-trace-api#customizing-stack-traces - */ - prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any; - /** - * The `Error.stackTraceLimit` property specifies the number of stack frames - * collected by a stack trace (whether generated by `new Error().stack` or - * `Error.captureStackTrace(obj)`). - * - * The default value is `10` but may be set to any valid JavaScript number. Changes - * will affect any stack trace captured _after_ the value has been changed. - * - * If set to a non-number value, or set to a negative number, stack traces will - * not capture any frames. - */ - stackTraceLimit: number; -} - -/** - * Enable this API with the `--expose-gc` CLI flag. - */ -declare var gc: NodeJS.GCFunction | undefined; - -declare namespace NodeJS { - interface CallSite { - getColumnNumber(): number | null; - getEnclosingColumnNumber(): number | null; - getEnclosingLineNumber(): number | null; - getEvalOrigin(): string | undefined; - getFileName(): string | null; - getFunction(): Function | undefined; - getFunctionName(): string | null; - getLineNumber(): number | null; - getMethodName(): string | null; - getPosition(): number; - getPromiseIndex(): number | null; - getScriptHash(): string; - getScriptNameOrSourceURL(): string | null; - getThis(): unknown; - getTypeName(): string | null; - isAsync(): boolean; - isConstructor(): boolean; - isEval(): boolean; - isNative(): boolean; - isPromiseAll(): boolean; - isToplevel(): boolean; - } - - interface ErrnoException extends Error { - errno?: number | undefined; - code?: string | undefined; - path?: string | undefined; - syscall?: string | undefined; - } - - interface RefCounted { - ref(): this; - unref(): this; - } - - interface Dict { - [key: string]: T | undefined; - } - - interface ReadOnlyDict { - readonly [key: string]: T | undefined; - } - - type PartialOptions = { [K in keyof T]?: T[K] | undefined }; - - interface GCFunction { - (minor?: boolean): void; - (options: NodeJS.GCOptions & { execution: "async" }): Promise; - (options: NodeJS.GCOptions): void; - } - - interface GCOptions { - execution?: "sync" | "async" | undefined; - flavor?: "regular" | "last-resort" | undefined; - type?: "major-snapshot" | "major" | "minor" | undefined; - filename?: string | undefined; - } - - /** An iterable iterator returned by the Node.js API. */ - interface Iterator extends IteratorObject { - [Symbol.iterator](): NodeJS.Iterator; - } - - /** An async iterable iterator returned by the Node.js API. */ - interface AsyncIterator extends AsyncIteratorObject { - [Symbol.asyncIterator](): NodeJS.AsyncIterator; - } - - /** The [`BufferSource`](https://webidl.spec.whatwg.org/#BufferSource) type from the Web IDL specification. */ - type BufferSource = NonSharedArrayBufferView | ArrayBuffer; - - /** The [`AllowSharedBufferSource`](https://webidl.spec.whatwg.org/#AllowSharedBufferSource) type from the Web IDL specification. */ - type AllowSharedBufferSource = ArrayBufferView | ArrayBufferLike; -} diff --git a/PBandGraphScaffold/node_modules/@types/node/globals.typedarray.d.ts b/PBandGraphScaffold/node_modules/@types/node/globals.typedarray.d.ts deleted file mode 100644 index e69dd0c..0000000 --- a/PBandGraphScaffold/node_modules/@types/node/globals.typedarray.d.ts +++ /dev/null @@ -1,101 +0,0 @@ -export {}; // Make this a module - -declare global { - namespace NodeJS { - type TypedArray = - | Uint8Array - | Uint8ClampedArray - | Uint16Array - | Uint32Array - | Int8Array - | Int16Array - | Int32Array - | BigUint64Array - | BigInt64Array - | Float16Array - | Float32Array - | Float64Array; - type ArrayBufferView = - | TypedArray - | DataView; - - // The following aliases are required to allow use of non-shared ArrayBufferViews in @types/node - // while maintaining compatibility with TS <=5.6. - // TODO: remove once @types/node no longer supports TS 5.6, and replace with native types. - /** - * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports - * TypeScript versions earlier than 5.7. - */ - type NonSharedUint8Array = Uint8Array; - /** - * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports - * TypeScript versions earlier than 5.7. - */ - type NonSharedUint8ClampedArray = Uint8ClampedArray; - /** - * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports - * TypeScript versions earlier than 5.7. - */ - type NonSharedUint16Array = Uint16Array; - /** - * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports - * TypeScript versions earlier than 5.7. - */ - type NonSharedUint32Array = Uint32Array; - /** - * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports - * TypeScript versions earlier than 5.7. - */ - type NonSharedInt8Array = Int8Array; - /** - * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports - * TypeScript versions earlier than 5.7. - */ - type NonSharedInt16Array = Int16Array; - /** - * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports - * TypeScript versions earlier than 5.7. - */ - type NonSharedInt32Array = Int32Array; - /** - * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports - * TypeScript versions earlier than 5.7. - */ - type NonSharedBigUint64Array = BigUint64Array; - /** - * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports - * TypeScript versions earlier than 5.7. - */ - type NonSharedBigInt64Array = BigInt64Array; - /** - * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports - * TypeScript versions earlier than 5.7. - */ - type NonSharedFloat16Array = Float16Array; - /** - * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports - * TypeScript versions earlier than 5.7. - */ - type NonSharedFloat32Array = Float32Array; - /** - * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports - * TypeScript versions earlier than 5.7. - */ - type NonSharedFloat64Array = Float64Array; - /** - * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports - * TypeScript versions earlier than 5.7. - */ - type NonSharedDataView = DataView; - /** - * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports - * TypeScript versions earlier than 5.7. - */ - type NonSharedTypedArray = TypedArray; - /** - * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports - * TypeScript versions earlier than 5.7. - */ - type NonSharedArrayBufferView = ArrayBufferView; - } -} diff --git a/PBandGraphScaffold/node_modules/@types/node/http.d.ts b/PBandGraphScaffold/node_modules/@types/node/http.d.ts deleted file mode 100644 index 44444d3..0000000 --- a/PBandGraphScaffold/node_modules/@types/node/http.d.ts +++ /dev/null @@ -1,2143 +0,0 @@ -/** - * To use the HTTP server and client one must import the `node:http` module. - * - * The HTTP interfaces in Node.js are designed to support many features - * of the protocol which have been traditionally difficult to use. - * In particular, large, possibly chunk-encoded, messages. The interface is - * careful to never buffer entire requests or responses, so the - * user is able to stream data. - * - * HTTP message headers are represented by an object like this: - * - * ```json - * { "content-length": "123", - * "content-type": "text/plain", - * "connection": "keep-alive", - * "host": "example.com", - * "accept": "*" } - * ``` - * - * Keys are lowercased. Values are not modified. - * - * In order to support the full spectrum of possible HTTP applications, the Node.js - * HTTP API is very low-level. It deals with stream handling and message - * parsing only. It parses a message into headers and body but it does not - * parse the actual headers or the body. - * - * See `message.headers` for details on how duplicate headers are handled. - * - * The raw headers as they were received are retained in the `rawHeaders` property, which is an array of `[key, value, key2, value2, ...]`. For - * example, the previous message header object might have a `rawHeaders` list like the following: - * - * ```js - * [ 'ConTent-Length', '123456', - * 'content-LENGTH', '123', - * 'content-type', 'text/plain', - * 'CONNECTION', 'keep-alive', - * 'Host', 'example.com', - * 'accepT', '*' ] - * ``` - * @see [source](https://github.com/nodejs/node/blob/v25.x/lib/http.js) - */ -declare module "node:http" { - import { NonSharedBuffer } from "node:buffer"; - import { LookupOptions } from "node:dns"; - import { EventEmitter } from "node:events"; - import * as net from "node:net"; - import * as stream from "node:stream"; - import { URL } from "node:url"; - // incoming headers will never contain number - interface IncomingHttpHeaders extends NodeJS.Dict { - accept?: string | undefined; - "accept-encoding"?: string | undefined; - "accept-language"?: string | undefined; - "accept-patch"?: string | undefined; - "accept-ranges"?: string | undefined; - "access-control-allow-credentials"?: string | undefined; - "access-control-allow-headers"?: string | undefined; - "access-control-allow-methods"?: string | undefined; - "access-control-allow-origin"?: string | undefined; - "access-control-expose-headers"?: string | undefined; - "access-control-max-age"?: string | undefined; - "access-control-request-headers"?: string | undefined; - "access-control-request-method"?: string | undefined; - age?: string | undefined; - allow?: string | undefined; - "alt-svc"?: string | undefined; - authorization?: string | undefined; - "cache-control"?: string | undefined; - connection?: string | undefined; - "content-disposition"?: string | undefined; - "content-encoding"?: string | undefined; - "content-language"?: string | undefined; - "content-length"?: string | undefined; - "content-location"?: string | undefined; - "content-range"?: string | undefined; - "content-type"?: string | undefined; - cookie?: string | undefined; - date?: string | undefined; - etag?: string | undefined; - expect?: string | undefined; - expires?: string | undefined; - forwarded?: string | undefined; - from?: string | undefined; - host?: string | undefined; - "if-match"?: string | undefined; - "if-modified-since"?: string | undefined; - "if-none-match"?: string | undefined; - "if-unmodified-since"?: string | undefined; - "last-modified"?: string | undefined; - location?: string | undefined; - origin?: string | undefined; - pragma?: string | undefined; - "proxy-authenticate"?: string | undefined; - "proxy-authorization"?: string | undefined; - "public-key-pins"?: string | undefined; - range?: string | undefined; - referer?: string | undefined; - "retry-after"?: string | undefined; - "sec-fetch-site"?: string | undefined; - "sec-fetch-mode"?: string | undefined; - "sec-fetch-user"?: string | undefined; - "sec-fetch-dest"?: string | undefined; - "sec-websocket-accept"?: string | undefined; - "sec-websocket-extensions"?: string | undefined; - "sec-websocket-key"?: string | undefined; - "sec-websocket-protocol"?: string | undefined; - "sec-websocket-version"?: string | undefined; - "set-cookie"?: string[] | undefined; - "strict-transport-security"?: string | undefined; - tk?: string | undefined; - trailer?: string | undefined; - "transfer-encoding"?: string | undefined; - upgrade?: string | undefined; - "user-agent"?: string | undefined; - vary?: string | undefined; - via?: string | undefined; - warning?: string | undefined; - "www-authenticate"?: string | undefined; - } - // outgoing headers allows numbers (as they are converted internally to strings) - type OutgoingHttpHeader = number | string | string[]; - interface OutgoingHttpHeaders extends NodeJS.Dict { - accept?: string | string[] | undefined; - "accept-charset"?: string | string[] | undefined; - "accept-encoding"?: string | string[] | undefined; - "accept-language"?: string | string[] | undefined; - "accept-ranges"?: string | undefined; - "access-control-allow-credentials"?: string | undefined; - "access-control-allow-headers"?: string | undefined; - "access-control-allow-methods"?: string | undefined; - "access-control-allow-origin"?: string | undefined; - "access-control-expose-headers"?: string | undefined; - "access-control-max-age"?: string | undefined; - "access-control-request-headers"?: string | undefined; - "access-control-request-method"?: string | undefined; - age?: string | undefined; - allow?: string | undefined; - authorization?: string | undefined; - "cache-control"?: string | undefined; - "cdn-cache-control"?: string | undefined; - connection?: string | string[] | undefined; - "content-disposition"?: string | undefined; - "content-encoding"?: string | undefined; - "content-language"?: string | undefined; - "content-length"?: string | number | undefined; - "content-location"?: string | undefined; - "content-range"?: string | undefined; - "content-security-policy"?: string | undefined; - "content-security-policy-report-only"?: string | undefined; - "content-type"?: string | undefined; - cookie?: string | string[] | undefined; - dav?: string | string[] | undefined; - dnt?: string | undefined; - date?: string | undefined; - etag?: string | undefined; - expect?: string | undefined; - expires?: string | undefined; - forwarded?: string | undefined; - from?: string | undefined; - host?: string | undefined; - "if-match"?: string | undefined; - "if-modified-since"?: string | undefined; - "if-none-match"?: string | undefined; - "if-range"?: string | undefined; - "if-unmodified-since"?: string | undefined; - "last-modified"?: string | undefined; - link?: string | string[] | undefined; - location?: string | undefined; - "max-forwards"?: string | undefined; - origin?: string | undefined; - pragma?: string | string[] | undefined; - "proxy-authenticate"?: string | string[] | undefined; - "proxy-authorization"?: string | undefined; - "public-key-pins"?: string | undefined; - "public-key-pins-report-only"?: string | undefined; - range?: string | undefined; - referer?: string | undefined; - "referrer-policy"?: string | undefined; - refresh?: string | undefined; - "retry-after"?: string | undefined; - "sec-websocket-accept"?: string | undefined; - "sec-websocket-extensions"?: string | string[] | undefined; - "sec-websocket-key"?: string | undefined; - "sec-websocket-protocol"?: string | string[] | undefined; - "sec-websocket-version"?: string | undefined; - server?: string | undefined; - "set-cookie"?: string | string[] | undefined; - "strict-transport-security"?: string | undefined; - te?: string | undefined; - trailer?: string | undefined; - "transfer-encoding"?: string | undefined; - "user-agent"?: string | undefined; - upgrade?: string | undefined; - "upgrade-insecure-requests"?: string | undefined; - vary?: string | undefined; - via?: string | string[] | undefined; - warning?: string | undefined; - "www-authenticate"?: string | string[] | undefined; - "x-content-type-options"?: string | undefined; - "x-dns-prefetch-control"?: string | undefined; - "x-frame-options"?: string | undefined; - "x-xss-protection"?: string | undefined; - } - interface ClientRequestArgs extends Pick { - _defaultAgent?: Agent | undefined; - agent?: Agent | boolean | undefined; - auth?: string | null | undefined; - createConnection?: - | (( - options: ClientRequestArgs, - oncreate: (err: Error | null, socket: stream.Duplex) => void, - ) => stream.Duplex | null | undefined) - | undefined; - defaultPort?: number | string | undefined; - family?: number | undefined; - headers?: OutgoingHttpHeaders | readonly string[] | undefined; - host?: string | null | undefined; - hostname?: string | null | undefined; - insecureHTTPParser?: boolean | undefined; - localAddress?: string | undefined; - localPort?: number | undefined; - lookup?: net.LookupFunction | undefined; - /** - * @default 16384 - */ - maxHeaderSize?: number | undefined; - method?: string | undefined; - path?: string | null | undefined; - port?: number | string | null | undefined; - protocol?: string | null | undefined; - setDefaultHeaders?: boolean | undefined; - setHost?: boolean | undefined; - signal?: AbortSignal | undefined; - socketPath?: string | undefined; - timeout?: number | undefined; - uniqueHeaders?: Array | undefined; - joinDuplicateHeaders?: boolean | undefined; - } - interface ServerOptions< - Request extends typeof IncomingMessage = typeof IncomingMessage, - Response extends typeof ServerResponse> = typeof ServerResponse, - > { - /** - * Specifies the `IncomingMessage` class to be used. Useful for extending the original `IncomingMessage`. - */ - IncomingMessage?: Request | undefined; - /** - * Specifies the `ServerResponse` class to be used. Useful for extending the original `ServerResponse`. - */ - ServerResponse?: Response | undefined; - /** - * Sets the timeout value in milliseconds for receiving the entire request from the client. - * @see Server.requestTimeout for more information. - * @default 300000 - * @since v18.0.0 - */ - requestTimeout?: number | undefined; - /** - * It joins the field line values of multiple headers in a request with `, ` instead of discarding the duplicates. - * @default false - * @since v18.14.0 - */ - joinDuplicateHeaders?: boolean | undefined; - /** - * The number of milliseconds of inactivity a server needs to wait for additional incoming data, - * after it has finished writing the last response, before a socket will be destroyed. - * @see Server.keepAliveTimeout for more information. - * @default 5000 - * @since v18.0.0 - */ - keepAliveTimeout?: number | undefined; - /** - * An additional buffer time added to the - * `server.keepAliveTimeout` to extend the internal socket timeout. - * @since 24.6.0 - * @default 1000 - */ - keepAliveTimeoutBuffer?: number | undefined; - /** - * Sets the interval value in milliseconds to check for request and headers timeout in incomplete requests. - * @default 30000 - */ - connectionsCheckingInterval?: number | undefined; - /** - * Sets the timeout value in milliseconds for receiving the complete HTTP headers from the client. - * See {@link Server.headersTimeout} for more information. - * @default 60000 - * @since 18.0.0 - */ - headersTimeout?: number | undefined; - /** - * Optionally overrides all `socket`s' `readableHighWaterMark` and `writableHighWaterMark`. - * This affects `highWaterMark` property of both `IncomingMessage` and `ServerResponse`. - * Default: @see stream.getDefaultHighWaterMark(). - * @since v20.1.0 - */ - highWaterMark?: number | undefined; - /** - * Use an insecure HTTP parser that accepts invalid HTTP headers when `true`. - * Using the insecure parser should be avoided. - * See --insecure-http-parser for more information. - * @default false - */ - insecureHTTPParser?: boolean | undefined; - /** - * Optionally overrides the value of `--max-http-header-size` for requests received by - * this server, i.e. the maximum length of request headers in bytes. - * @default 16384 - * @since v13.3.0 - */ - maxHeaderSize?: number | undefined; - /** - * If set to `true`, it disables the use of Nagle's algorithm immediately after a new incoming connection is received. - * @default true - * @since v16.5.0 - */ - noDelay?: boolean | undefined; - /** - * If set to `true`, it forces the server to respond with a 400 (Bad Request) status code - * to any HTTP/1.1 request message that lacks a Host header (as mandated by the specification). - * @default true - * @since 20.0.0 - */ - requireHostHeader?: boolean | undefined; - /** - * If set to `true`, it enables keep-alive functionality on the socket immediately after a new incoming connection is received, - * similarly on what is done in `socket.setKeepAlive([enable][, initialDelay])`. - * @default false - * @since v16.5.0 - */ - keepAlive?: boolean | undefined; - /** - * If set to a positive number, it sets the initial delay before the first keepalive probe is sent on an idle socket. - * @default 0 - * @since v16.5.0 - */ - keepAliveInitialDelay?: number | undefined; - /** - * A list of response headers that should be sent only once. - * If the header's value is an array, the items will be joined using `; `. - */ - uniqueHeaders?: Array | undefined; - /** - * A callback which receives an - * incoming request and returns a boolean, to control which upgrade attempts - * should be accepted. Accepted upgrades will fire an `'upgrade'` event (or - * their sockets will be destroyed, if no listener is registered) while - * rejected upgrades will fire a `'request'` event like any non-upgrade - * request. - * @since v24.9.0 - * @default () => server.listenerCount('upgrade') > 0 - */ - shouldUpgradeCallback?: ((request: InstanceType) => boolean) | undefined; - /** - * If set to `true`, an error is thrown when writing to an HTTP response which does not have a body. - * @default false - * @since v18.17.0, v20.2.0 - */ - rejectNonStandardBodyWrites?: boolean | undefined; - } - type RequestListener< - Request extends typeof IncomingMessage = typeof IncomingMessage, - Response extends typeof ServerResponse> = typeof ServerResponse, - > = (request: InstanceType, response: InstanceType & { req: InstanceType }) => void; - interface ServerEventMap< - Request extends typeof IncomingMessage = typeof IncomingMessage, - Response extends typeof ServerResponse> = typeof ServerResponse, - > extends net.ServerEventMap { - "checkContinue": Parameters>; - "checkExpectation": Parameters>; - "clientError": [exception: Error, socket: stream.Duplex]; - "connect": [request: InstanceType, socket: stream.Duplex, head: NonSharedBuffer]; - "connection": [socket: net.Socket]; - "dropRequest": [request: InstanceType, socket: stream.Duplex]; - "request": Parameters>; - "upgrade": [req: InstanceType, socket: stream.Duplex, head: NonSharedBuffer]; - } - /** - * @since v0.1.17 - */ - class Server< - Request extends typeof IncomingMessage = typeof IncomingMessage, - Response extends typeof ServerResponse> = typeof ServerResponse, - > extends net.Server { - constructor(requestListener?: RequestListener); - constructor(options: ServerOptions, requestListener?: RequestListener); - /** - * Sets the timeout value for sockets, and emits a `'timeout'` event on - * the Server object, passing the socket as an argument, if a timeout - * occurs. - * - * If there is a `'timeout'` event listener on the Server object, then it - * will be called with the timed-out socket as an argument. - * - * By default, the Server does not timeout sockets. However, if a callback - * is assigned to the Server's `'timeout'` event, timeouts must be handled - * explicitly. - * @since v0.9.12 - * @param [msecs=0 (no timeout)] - */ - setTimeout(msecs?: number, callback?: (socket: net.Socket) => void): this; - setTimeout(callback: (socket: net.Socket) => void): this; - /** - * Limits maximum incoming headers count. If set to 0, no limit will be applied. - * @since v0.7.0 - */ - maxHeadersCount: number | null; - /** - * The maximum number of requests socket can handle - * before closing keep alive connection. - * - * A value of `0` will disable the limit. - * - * When the limit is reached it will set the `Connection` header value to `close`, - * but will not actually close the connection, subsequent requests sent - * after the limit is reached will get `503 Service Unavailable` as a response. - * @since v16.10.0 - */ - maxRequestsPerSocket: number | null; - /** - * The number of milliseconds of inactivity before a socket is presumed - * to have timed out. - * - * A value of `0` will disable the timeout behavior on incoming connections. - * - * The socket timeout logic is set up on connection, so changing this - * value only affects new connections to the server, not any existing connections. - * @since v0.9.12 - */ - timeout: number; - /** - * Limit the amount of time the parser will wait to receive the complete HTTP - * headers. - * - * If the timeout expires, the server responds with status 408 without - * forwarding the request to the request listener and then closes the connection. - * - * It must be set to a non-zero value (e.g. 120 seconds) to protect against - * potential Denial-of-Service attacks in case the server is deployed without a - * reverse proxy in front. - * @since v11.3.0, v10.14.0 - */ - headersTimeout: number; - /** - * The number of milliseconds of inactivity a server needs to wait for additional - * incoming data, after it has finished writing the last response, before a socket - * will be destroyed. - * - * This timeout value is combined with the - * `server.keepAliveTimeoutBuffer` option to determine the actual socket - * timeout, calculated as: - * socketTimeout = keepAliveTimeout + keepAliveTimeoutBuffer - * If the server receives new data before the keep-alive timeout has fired, it - * will reset the regular inactivity timeout, i.e., `server.timeout`. - * - * A value of `0` will disable the keep-alive timeout behavior on incoming - * connections. - * A value of `0` makes the HTTP server behave similarly to Node.js versions prior - * to 8.0.0, which did not have a keep-alive timeout. - * - * The socket timeout logic is set up on connection, so changing this value only - * affects new connections to the server, not any existing connections. - * @since v8.0.0 - */ - keepAliveTimeout: number; - /** - * An additional buffer time added to the - * `server.keepAliveTimeout` to extend the internal socket timeout. - * - * This buffer helps reduce connection reset (`ECONNRESET`) errors by increasing - * the socket timeout slightly beyond the advertised keep-alive timeout. - * - * This option applies only to new incoming connections. - * @since v24.6.0 - * @default 1000 - */ - keepAliveTimeoutBuffer: number; - /** - * Sets the timeout value in milliseconds for receiving the entire request from - * the client. - * - * If the timeout expires, the server responds with status 408 without - * forwarding the request to the request listener and then closes the connection. - * - * It must be set to a non-zero value (e.g. 120 seconds) to protect against - * potential Denial-of-Service attacks in case the server is deployed without a - * reverse proxy in front. - * @since v14.11.0 - */ - requestTimeout: number; - /** - * Closes all connections connected to this server. - * @since v18.2.0 - */ - closeAllConnections(): void; - /** - * Closes all connections connected to this server which are not sending a request - * or waiting for a response. - * @since v18.2.0 - */ - closeIdleConnections(): void; - // #region InternalEventEmitter - addListener( - eventName: E, - listener: (...args: ServerEventMap[E]) => void, - ): this; - addListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - emit(eventName: E, ...args: ServerEventMap[E]): boolean; - emit(eventName: string | symbol, ...args: any[]): boolean; - listenerCount( - eventName: E, - listener?: (...args: ServerEventMap[E]) => void, - ): number; - listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number; - listeners( - eventName: E, - ): ((...args: ServerEventMap[E]) => void)[]; - listeners(eventName: string | symbol): ((...args: any[]) => void)[]; - off( - eventName: E, - listener: (...args: ServerEventMap[E]) => void, - ): this; - off(eventName: string | symbol, listener: (...args: any[]) => void): this; - on( - eventName: E, - listener: (...args: ServerEventMap[E]) => void, - ): this; - on(eventName: string | symbol, listener: (...args: any[]) => void): this; - once( - eventName: E, - listener: (...args: ServerEventMap[E]) => void, - ): this; - once(eventName: string | symbol, listener: (...args: any[]) => void): this; - prependListener( - eventName: E, - listener: (...args: ServerEventMap[E]) => void, - ): this; - prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - prependOnceListener( - eventName: E, - listener: (...args: ServerEventMap[E]) => void, - ): this; - prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - rawListeners( - eventName: E, - ): ((...args: ServerEventMap[E]) => void)[]; - rawListeners(eventName: string | symbol): ((...args: any[]) => void)[]; - // eslint-disable-next-line @definitelytyped/no-unnecessary-generics - removeAllListeners(eventName?: E): this; - removeAllListeners(eventName?: string | symbol): this; - removeListener( - eventName: E, - listener: (...args: ServerEventMap[E]) => void, - ): this; - removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - // #endregion - } - interface OutgoingMessageEventMap extends stream.WritableEventMap { - "prefinish": []; - } - /** - * This class serves as the parent class of {@link ClientRequest} and {@link ServerResponse}. It is an abstract outgoing message from - * the perspective of the participants of an HTTP transaction. - * @since v0.1.17 - */ - class OutgoingMessage extends stream.Writable { - constructor(); - readonly req: Request; - chunkedEncoding: boolean; - shouldKeepAlive: boolean; - useChunkedEncodingByDefault: boolean; - sendDate: boolean; - /** - * @deprecated Use `writableEnded` instead. - */ - finished: boolean; - /** - * Read-only. `true` if the headers were sent, otherwise `false`. - * @since v0.9.3 - */ - readonly headersSent: boolean; - /** - * Alias of `outgoingMessage.socket`. - * @since v0.3.0 - * @deprecated Since v15.12.0,v14.17.1 - Use `socket` instead. - */ - readonly connection: net.Socket | null; - /** - * Reference to the underlying socket. Usually, users will not want to access - * this property. - * - * After calling `outgoingMessage.end()`, this property will be nulled. - * @since v0.3.0 - */ - readonly socket: net.Socket | null; - /** - * Once a socket is associated with the message and is connected, `socket.setTimeout()` will be called with `msecs` as the first parameter. - * @since v0.9.12 - * @param callback Optional function to be called when a timeout occurs. Same as binding to the `timeout` event. - */ - setTimeout(msecs: number, callback?: () => void): this; - /** - * Sets a single header value. If the header already exists in the to-be-sent - * headers, its value will be replaced. Use an array of strings to send multiple - * headers with the same name. - * @since v0.4.0 - * @param name Header name - * @param value Header value - */ - setHeader(name: string, value: number | string | readonly string[]): this; - /** - * Sets multiple header values for implicit headers. headers must be an instance of - * `Headers` or `Map`, if a header already exists in the to-be-sent headers, its - * value will be replaced. - * - * ```js - * const headers = new Headers({ foo: 'bar' }); - * outgoingMessage.setHeaders(headers); - * ``` - * - * or - * - * ```js - * const headers = new Map([['foo', 'bar']]); - * outgoingMessage.setHeaders(headers); - * ``` - * - * When headers have been set with `outgoingMessage.setHeaders()`, they will be - * merged with any headers passed to `response.writeHead()`, with the headers passed - * to `response.writeHead()` given precedence. - * - * ```js - * // Returns content-type = text/plain - * const server = http.createServer((req, res) => { - * const headers = new Headers({ 'Content-Type': 'text/html' }); - * res.setHeaders(headers); - * res.writeHead(200, { 'Content-Type': 'text/plain' }); - * res.end('ok'); - * }); - * ``` - * - * @since v19.6.0, v18.15.0 - * @param name Header name - * @param value Header value - */ - setHeaders(headers: Headers | Map): this; - /** - * Append a single header value to the header object. - * - * If the value is an array, this is equivalent to calling this method multiple - * times. - * - * If there were no previous values for the header, this is equivalent to calling `outgoingMessage.setHeader(name, value)`. - * - * Depending of the value of `options.uniqueHeaders` when the client request or the - * server were created, this will end up in the header being sent multiple times or - * a single time with values joined using `; `. - * @since v18.3.0, v16.17.0 - * @param name Header name - * @param value Header value - */ - appendHeader(name: string, value: string | readonly string[]): this; - /** - * Gets the value of the HTTP header with the given name. If that header is not - * set, the returned value will be `undefined`. - * @since v0.4.0 - * @param name Name of header - */ - getHeader(name: string): number | string | string[] | undefined; - /** - * Returns a shallow copy of the current outgoing headers. Since a shallow - * copy is used, array values may be mutated without additional calls to - * various header-related HTTP module methods. The keys of the returned - * object are the header names and the values are the respective header - * values. All header names are lowercase. - * - * The object returned by the `outgoingMessage.getHeaders()` method does - * not prototypically inherit from the JavaScript `Object`. This means that - * typical `Object` methods such as `obj.toString()`, `obj.hasOwnProperty()`, - * and others are not defined and will not work. - * - * ```js - * outgoingMessage.setHeader('Foo', 'bar'); - * outgoingMessage.setHeader('Set-Cookie', ['foo=bar', 'bar=baz']); - * - * const headers = outgoingMessage.getHeaders(); - * // headers === { foo: 'bar', 'set-cookie': ['foo=bar', 'bar=baz'] } - * ``` - * @since v7.7.0 - */ - getHeaders(): OutgoingHttpHeaders; - /** - * Returns an array containing the unique names of the current outgoing headers. - * All names are lowercase. - * @since v7.7.0 - */ - getHeaderNames(): string[]; - /** - * Returns `true` if the header identified by `name` is currently set in the - * outgoing headers. The header name is case-insensitive. - * - * ```js - * const hasContentType = outgoingMessage.hasHeader('content-type'); - * ``` - * @since v7.7.0 - */ - hasHeader(name: string): boolean; - /** - * Removes a header that is queued for implicit sending. - * - * ```js - * outgoingMessage.removeHeader('Content-Encoding'); - * ``` - * @since v0.4.0 - * @param name Header name - */ - removeHeader(name: string): void; - /** - * Adds HTTP trailers (headers but at the end of the message) to the message. - * - * Trailers will **only** be emitted if the message is chunked encoded. If not, - * the trailers will be silently discarded. - * - * HTTP requires the `Trailer` header to be sent to emit trailers, - * with a list of header field names in its value, e.g. - * - * ```js - * message.writeHead(200, { 'Content-Type': 'text/plain', - * 'Trailer': 'Content-MD5' }); - * message.write(fileData); - * message.addTrailers({ 'Content-MD5': '7895bf4b8828b55ceaf47747b4bca667' }); - * message.end(); - * ``` - * - * Attempting to set a header field name or value that contains invalid characters - * will result in a `TypeError` being thrown. - * @since v0.3.0 - */ - addTrailers(headers: OutgoingHttpHeaders | ReadonlyArray<[string, string]>): void; - /** - * Flushes the message headers. - * - * For efficiency reason, Node.js normally buffers the message headers - * until `outgoingMessage.end()` is called or the first chunk of message data - * is written. It then tries to pack the headers and data into a single TCP - * packet. - * - * It is usually desired (it saves a TCP round-trip), but not when the first - * data is not sent until possibly much later. `outgoingMessage.flushHeaders()` bypasses the optimization and kickstarts the message. - * @since v1.6.0 - */ - flushHeaders(): void; - // #region InternalEventEmitter - addListener( - eventName: E, - listener: (...args: OutgoingMessageEventMap[E]) => void, - ): this; - addListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - emit(eventName: E, ...args: OutgoingMessageEventMap[E]): boolean; - emit(eventName: string | symbol, ...args: any[]): boolean; - listenerCount( - eventName: E, - listener?: (...args: OutgoingMessageEventMap[E]) => void, - ): number; - listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number; - listeners( - eventName: E, - ): ((...args: OutgoingMessageEventMap[E]) => void)[]; - listeners(eventName: string | symbol): ((...args: any[]) => void)[]; - off( - eventName: E, - listener: (...args: OutgoingMessageEventMap[E]) => void, - ): this; - off(eventName: string | symbol, listener: (...args: any[]) => void): this; - on( - eventName: E, - listener: (...args: OutgoingMessageEventMap[E]) => void, - ): this; - on(eventName: string | symbol, listener: (...args: any[]) => void): this; - once( - eventName: E, - listener: (...args: OutgoingMessageEventMap[E]) => void, - ): this; - once(eventName: string | symbol, listener: (...args: any[]) => void): this; - prependListener( - eventName: E, - listener: (...args: OutgoingMessageEventMap[E]) => void, - ): this; - prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - prependOnceListener( - eventName: E, - listener: (...args: OutgoingMessageEventMap[E]) => void, - ): this; - prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - rawListeners( - eventName: E, - ): ((...args: OutgoingMessageEventMap[E]) => void)[]; - rawListeners(eventName: string | symbol): ((...args: any[]) => void)[]; - // eslint-disable-next-line @definitelytyped/no-unnecessary-generics - removeAllListeners(eventName?: E): this; - removeAllListeners(eventName?: string | symbol): this; - removeListener( - eventName: E, - listener: (...args: OutgoingMessageEventMap[E]) => void, - ): this; - removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - // #endregion - } - /** - * This object is created internally by an HTTP server, not by the user. It is - * passed as the second parameter to the `'request'` event. - * @since v0.1.17 - */ - class ServerResponse extends OutgoingMessage { - /** - * When using implicit headers (not calling `response.writeHead()` explicitly), - * this property controls the status code that will be sent to the client when - * the headers get flushed. - * - * ```js - * response.statusCode = 404; - * ``` - * - * After response header was sent to the client, this property indicates the - * status code which was sent out. - * @since v0.4.0 - */ - statusCode: number; - /** - * When using implicit headers (not calling `response.writeHead()` explicitly), - * this property controls the status message that will be sent to the client when - * the headers get flushed. If this is left as `undefined` then the standard - * message for the status code will be used. - * - * ```js - * response.statusMessage = 'Not found'; - * ``` - * - * After response header was sent to the client, this property indicates the - * status message which was sent out. - * @since v0.11.8 - */ - statusMessage: string; - /** - * If set to `true`, Node.js will check whether the `Content-Length` header value and the size of the body, in bytes, are equal. - * Mismatching the `Content-Length` header value will result - * in an `Error` being thrown, identified by `code:``'ERR_HTTP_CONTENT_LENGTH_MISMATCH'`. - * @since v18.10.0, v16.18.0 - */ - strictContentLength: boolean; - constructor(req: Request); - assignSocket(socket: net.Socket): void; - detachSocket(socket: net.Socket): void; - /** - * Sends an HTTP/1.1 100 Continue message to the client, indicating that - * the request body should be sent. See the `'checkContinue'` event on `Server`. - * @since v0.3.0 - */ - writeContinue(callback?: () => void): void; - /** - * Sends an HTTP/1.1 103 Early Hints message to the client with a Link header, - * indicating that the user agent can preload/preconnect the linked resources. - * The `hints` is an object containing the values of headers to be sent with - * early hints message. The optional `callback` argument will be called when - * the response message has been written. - * - * **Example** - * - * ```js - * const earlyHintsLink = '; rel=preload; as=style'; - * response.writeEarlyHints({ - * 'link': earlyHintsLink, - * }); - * - * const earlyHintsLinks = [ - * '; rel=preload; as=style', - * '; rel=preload; as=script', - * ]; - * response.writeEarlyHints({ - * 'link': earlyHintsLinks, - * 'x-trace-id': 'id for diagnostics', - * }); - * - * const earlyHintsCallback = () => console.log('early hints message sent'); - * response.writeEarlyHints({ - * 'link': earlyHintsLinks, - * }, earlyHintsCallback); - * ``` - * @since v18.11.0 - * @param hints An object containing the values of headers - * @param callback Will be called when the response message has been written - */ - writeEarlyHints(hints: Record, callback?: () => void): void; - /** - * Sends a response header to the request. The status code is a 3-digit HTTP - * status code, like `404`. The last argument, `headers`, are the response headers. - * Optionally one can give a human-readable `statusMessage` as the second - * argument. - * - * `headers` may be an `Array` where the keys and values are in the same list. - * It is _not_ a list of tuples. So, the even-numbered offsets are key values, - * and the odd-numbered offsets are the associated values. The array is in the same - * format as `request.rawHeaders`. - * - * Returns a reference to the `ServerResponse`, so that calls can be chained. - * - * ```js - * const body = 'hello world'; - * response - * .writeHead(200, { - * 'Content-Length': Buffer.byteLength(body), - * 'Content-Type': 'text/plain', - * }) - * .end(body); - * ``` - * - * This method must only be called once on a message and it must - * be called before `response.end()` is called. - * - * If `response.write()` or `response.end()` are called before calling - * this, the implicit/mutable headers will be calculated and call this function. - * - * When headers have been set with `response.setHeader()`, they will be merged - * with any headers passed to `response.writeHead()`, with the headers passed - * to `response.writeHead()` given precedence. - * - * If this method is called and `response.setHeader()` has not been called, - * it will directly write the supplied header values onto the network channel - * without caching internally, and the `response.getHeader()` on the header - * will not yield the expected result. If progressive population of headers is - * desired with potential future retrieval and modification, use `response.setHeader()` instead. - * - * ```js - * // Returns content-type = text/plain - * const server = http.createServer((req, res) => { - * res.setHeader('Content-Type', 'text/html'); - * res.setHeader('X-Foo', 'bar'); - * res.writeHead(200, { 'Content-Type': 'text/plain' }); - * res.end('ok'); - * }); - * ``` - * - * `Content-Length` is read in bytes, not characters. Use `Buffer.byteLength()` to determine the length of the body in bytes. Node.js - * will check whether `Content-Length` and the length of the body which has - * been transmitted are equal or not. - * - * Attempting to set a header field name or value that contains invalid characters - * will result in a \[`Error`\]\[\] being thrown. - * @since v0.1.30 - */ - writeHead( - statusCode: number, - statusMessage?: string, - headers?: OutgoingHttpHeaders | OutgoingHttpHeader[], - ): this; - writeHead(statusCode: number, headers?: OutgoingHttpHeaders | OutgoingHttpHeader[]): this; - /** - * Sends a HTTP/1.1 102 Processing message to the client, indicating that - * the request body should be sent. - * @since v10.0.0 - */ - writeProcessing(callback?: () => void): void; - } - interface InformationEvent { - httpVersion: string; - httpVersionMajor: number; - httpVersionMinor: number; - statusCode: number; - statusMessage: string; - headers: IncomingHttpHeaders; - rawHeaders: string[]; - } - interface ClientRequestEventMap extends stream.WritableEventMap { - /** @deprecated Listen for the `'close'` event instead. */ - "abort": []; - "connect": [response: IncomingMessage, socket: net.Socket, head: NonSharedBuffer]; - "continue": []; - "information": [info: InformationEvent]; - "response": [response: IncomingMessage]; - "socket": [socket: net.Socket]; - "timeout": []; - "upgrade": [response: IncomingMessage, socket: net.Socket, head: NonSharedBuffer]; - } - /** - * This object is created internally and returned from {@link request}. It - * represents an _in-progress_ request whose header has already been queued. The - * header is still mutable using the `setHeader(name, value)`, `getHeader(name)`, `removeHeader(name)` API. The actual header will - * be sent along with the first data chunk or when calling `request.end()`. - * - * To get the response, add a listener for `'response'` to the request object. `'response'` will be emitted from the request object when the response - * headers have been received. The `'response'` event is executed with one - * argument which is an instance of {@link IncomingMessage}. - * - * During the `'response'` event, one can add listeners to the - * response object; particularly to listen for the `'data'` event. - * - * If no `'response'` handler is added, then the response will be - * entirely discarded. However, if a `'response'` event handler is added, - * then the data from the response object **must** be consumed, either by - * calling `response.read()` whenever there is a `'readable'` event, or - * by adding a `'data'` handler, or by calling the `.resume()` method. - * Until the data is consumed, the `'end'` event will not fire. Also, until - * the data is read it will consume memory that can eventually lead to a - * 'process out of memory' error. - * - * For backward compatibility, `res` will only emit `'error'` if there is an `'error'` listener registered. - * - * Set `Content-Length` header to limit the response body size. - * If `response.strictContentLength` is set to `true`, mismatching the `Content-Length` header value will result in an `Error` being thrown, - * identified by `code:``'ERR_HTTP_CONTENT_LENGTH_MISMATCH'`. - * - * `Content-Length` value should be in bytes, not characters. Use `Buffer.byteLength()` to determine the length of the body in bytes. - * @since v0.1.17 - */ - class ClientRequest extends OutgoingMessage { - /** - * The `request.aborted` property will be `true` if the request has - * been aborted. - * @since v0.11.14 - * @deprecated Since v17.0.0, v16.12.0 - Check `destroyed` instead. - */ - aborted: boolean; - /** - * The request host. - * @since v14.5.0, v12.19.0 - */ - host: string; - /** - * The request protocol. - * @since v14.5.0, v12.19.0 - */ - protocol: string; - /** - * When sending request through a keep-alive enabled agent, the underlying socket - * might be reused. But if server closes connection at unfortunate time, client - * may run into a 'ECONNRESET' error. - * - * ```js - * import http from 'node:http'; - * - * // Server has a 5 seconds keep-alive timeout by default - * http - * .createServer((req, res) => { - * res.write('hello\n'); - * res.end(); - * }) - * .listen(3000); - * - * setInterval(() => { - * // Adapting a keep-alive agent - * http.get('http://localhost:3000', { agent }, (res) => { - * res.on('data', (data) => { - * // Do nothing - * }); - * }); - * }, 5000); // Sending request on 5s interval so it's easy to hit idle timeout - * ``` - * - * By marking a request whether it reused socket or not, we can do - * automatic error retry base on it. - * - * ```js - * import http from 'node:http'; - * const agent = new http.Agent({ keepAlive: true }); - * - * function retriableRequest() { - * const req = http - * .get('http://localhost:3000', { agent }, (res) => { - * // ... - * }) - * .on('error', (err) => { - * // Check if retry is needed - * if (req.reusedSocket && err.code === 'ECONNRESET') { - * retriableRequest(); - * } - * }); - * } - * - * retriableRequest(); - * ``` - * @since v13.0.0, v12.16.0 - */ - reusedSocket: boolean; - /** - * Limits maximum response headers count. If set to 0, no limit will be applied. - */ - maxHeadersCount: number; - constructor(url: string | URL | ClientRequestArgs, cb?: (res: IncomingMessage) => void); - /** - * The request method. - * @since v0.1.97 - */ - method: string; - /** - * The request path. - * @since v0.4.0 - */ - path: string; - /** - * Marks the request as aborting. Calling this will cause remaining data - * in the response to be dropped and the socket to be destroyed. - * @since v0.3.8 - * @deprecated Since v14.1.0,v13.14.0 - Use `destroy` instead. - */ - abort(): void; - onSocket(socket: net.Socket): void; - /** - * Once a socket is assigned to this request and is connected `socket.setTimeout()` will be called. - * @since v0.5.9 - * @param timeout Milliseconds before a request times out. - * @param callback Optional function to be called when a timeout occurs. Same as binding to the `'timeout'` event. - */ - setTimeout(timeout: number, callback?: () => void): this; - /** - * Once a socket is assigned to this request and is connected `socket.setNoDelay()` will be called. - * @since v0.5.9 - */ - setNoDelay(noDelay?: boolean): void; - /** - * Once a socket is assigned to this request and is connected `socket.setKeepAlive()` will be called. - * @since v0.5.9 - */ - setSocketKeepAlive(enable?: boolean, initialDelay?: number): void; - /** - * Returns an array containing the unique names of the current outgoing raw - * headers. Header names are returned with their exact casing being set. - * - * ```js - * request.setHeader('Foo', 'bar'); - * request.setHeader('Set-Cookie', ['foo=bar', 'bar=baz']); - * - * const headerNames = request.getRawHeaderNames(); - * // headerNames === ['Foo', 'Set-Cookie'] - * ``` - * @since v15.13.0, v14.17.0 - */ - getRawHeaderNames(): string[]; - // #region InternalEventEmitter - addListener( - eventName: E, - listener: (...args: ClientRequestEventMap[E]) => void, - ): this; - addListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - emit(eventName: E, ...args: ClientRequestEventMap[E]): boolean; - emit(eventName: string | symbol, ...args: any[]): boolean; - listenerCount( - eventName: E, - listener?: (...args: ClientRequestEventMap[E]) => void, - ): number; - listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number; - listeners(eventName: E): ((...args: ClientRequestEventMap[E]) => void)[]; - listeners(eventName: string | symbol): ((...args: any[]) => void)[]; - off( - eventName: E, - listener: (...args: ClientRequestEventMap[E]) => void, - ): this; - off(eventName: string | symbol, listener: (...args: any[]) => void): this; - on( - eventName: E, - listener: (...args: ClientRequestEventMap[E]) => void, - ): this; - on(eventName: string | symbol, listener: (...args: any[]) => void): this; - once( - eventName: E, - listener: (...args: ClientRequestEventMap[E]) => void, - ): this; - once(eventName: string | symbol, listener: (...args: any[]) => void): this; - prependListener( - eventName: E, - listener: (...args: ClientRequestEventMap[E]) => void, - ): this; - prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - prependOnceListener( - eventName: E, - listener: (...args: ClientRequestEventMap[E]) => void, - ): this; - prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - rawListeners( - eventName: E, - ): ((...args: ClientRequestEventMap[E]) => void)[]; - rawListeners(eventName: string | symbol): ((...args: any[]) => void)[]; - // eslint-disable-next-line @definitelytyped/no-unnecessary-generics - removeAllListeners(eventName?: E): this; - removeAllListeners(eventName?: string | symbol): this; - removeListener( - eventName: E, - listener: (...args: ClientRequestEventMap[E]) => void, - ): this; - removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - // #endregion - } - interface IncomingMessageEventMap extends stream.ReadableEventMap { - /** @deprecated Listen for `'close'` event instead. */ - "aborted": []; - } - /** - * An `IncomingMessage` object is created by {@link Server} or {@link ClientRequest} and passed as the first argument to the `'request'` and `'response'` event respectively. It may be used to - * access response - * status, headers, and data. - * - * Different from its `socket` value which is a subclass of `stream.Duplex`, the `IncomingMessage` itself extends `stream.Readable` and is created separately to - * parse and emit the incoming HTTP headers and payload, as the underlying socket - * may be reused multiple times in case of keep-alive. - * @since v0.1.17 - */ - class IncomingMessage extends stream.Readable { - constructor(socket: net.Socket); - /** - * The `message.aborted` property will be `true` if the request has - * been aborted. - * @since v10.1.0 - * @deprecated Since v17.0.0,v16.12.0 - Check `message.destroyed` from stream.Readable. - */ - aborted: boolean; - /** - * In case of server request, the HTTP version sent by the client. In the case of - * client response, the HTTP version of the connected-to server. - * Probably either `'1.1'` or `'1.0'`. - * - * Also `message.httpVersionMajor` is the first integer and `message.httpVersionMinor` is the second. - * @since v0.1.1 - */ - httpVersion: string; - httpVersionMajor: number; - httpVersionMinor: number; - /** - * The `message.complete` property will be `true` if a complete HTTP message has - * been received and successfully parsed. - * - * This property is particularly useful as a means of determining if a client or - * server fully transmitted a message before a connection was terminated: - * - * ```js - * const req = http.request({ - * host: '127.0.0.1', - * port: 8080, - * method: 'POST', - * }, (res) => { - * res.resume(); - * res.on('end', () => { - * if (!res.complete) - * console.error( - * 'The connection was terminated while the message was still being sent'); - * }); - * }); - * ``` - * @since v0.3.0 - */ - complete: boolean; - /** - * Alias for `message.socket`. - * @since v0.1.90 - * @deprecated Since v16.0.0 - Use `socket`. - */ - connection: net.Socket; - /** - * The `net.Socket` object associated with the connection. - * - * With HTTPS support, use `request.socket.getPeerCertificate()` to obtain the - * client's authentication details. - * - * This property is guaranteed to be an instance of the `net.Socket` class, - * a subclass of `stream.Duplex`, unless the user specified a socket - * type other than `net.Socket` or internally nulled. - * @since v0.3.0 - */ - socket: net.Socket; - /** - * The request/response headers object. - * - * Key-value pairs of header names and values. Header names are lower-cased. - * - * ```js - * // Prints something like: - * // - * // { 'user-agent': 'curl/7.22.0', - * // host: '127.0.0.1:8000', - * // accept: '*' } - * console.log(request.headers); - * ``` - * - * Duplicates in raw headers are handled in the following ways, depending on the - * header name: - * - * * Duplicates of `age`, `authorization`, `content-length`, `content-type`, `etag`, `expires`, `from`, `host`, `if-modified-since`, `if-unmodified-since`, `last-modified`, `location`, - * `max-forwards`, `proxy-authorization`, `referer`, `retry-after`, `server`, or `user-agent` are discarded. - * To allow duplicate values of the headers listed above to be joined, - * use the option `joinDuplicateHeaders` in {@link request} and {@link createServer}. See RFC 9110 Section 5.3 for more - * information. - * * `set-cookie` is always an array. Duplicates are added to the array. - * * For duplicate `cookie` headers, the values are joined together with `; `. - * * For all other headers, the values are joined together with `, `. - * @since v0.1.5 - */ - headers: IncomingHttpHeaders; - /** - * Similar to `message.headers`, but there is no join logic and the values are - * always arrays of strings, even for headers received just once. - * - * ```js - * // Prints something like: - * // - * // { 'user-agent': ['curl/7.22.0'], - * // host: ['127.0.0.1:8000'], - * // accept: ['*'] } - * console.log(request.headersDistinct); - * ``` - * @since v18.3.0, v16.17.0 - */ - headersDistinct: NodeJS.Dict; - /** - * The raw request/response headers list exactly as they were received. - * - * The keys and values are in the same list. It is _not_ a - * list of tuples. So, the even-numbered offsets are key values, and the - * odd-numbered offsets are the associated values. - * - * Header names are not lowercased, and duplicates are not merged. - * - * ```js - * // Prints something like: - * // - * // [ 'user-agent', - * // 'this is invalid because there can be only one', - * // 'User-Agent', - * // 'curl/7.22.0', - * // 'Host', - * // '127.0.0.1:8000', - * // 'ACCEPT', - * // '*' ] - * console.log(request.rawHeaders); - * ``` - * @since v0.11.6 - */ - rawHeaders: string[]; - /** - * The request/response trailers object. Only populated at the `'end'` event. - * @since v0.3.0 - */ - trailers: NodeJS.Dict; - /** - * Similar to `message.trailers`, but there is no join logic and the values are - * always arrays of strings, even for headers received just once. - * Only populated at the `'end'` event. - * @since v18.3.0, v16.17.0 - */ - trailersDistinct: NodeJS.Dict; - /** - * The raw request/response trailer keys and values exactly as they were - * received. Only populated at the `'end'` event. - * @since v0.11.6 - */ - rawTrailers: string[]; - /** - * Calls `message.socket.setTimeout(msecs, callback)`. - * @since v0.5.9 - */ - setTimeout(msecs: number, callback?: () => void): this; - /** - * **Only valid for request obtained from {@link Server}.** - * - * The request method as a string. Read only. Examples: `'GET'`, `'DELETE'`. - * @since v0.1.1 - */ - method?: string | undefined; - /** - * **Only valid for request obtained from {@link Server}.** - * - * Request URL string. This contains only the URL that is present in the actual - * HTTP request. Take the following request: - * - * ```http - * GET /status?name=ryan HTTP/1.1 - * Accept: text/plain - * ``` - * - * To parse the URL into its parts: - * - * ```js - * new URL(`http://${process.env.HOST ?? 'localhost'}${request.url}`); - * ``` - * - * When `request.url` is `'/status?name=ryan'` and `process.env.HOST` is undefined: - * - * ```console - * $ node - * > new URL(`http://${process.env.HOST ?? 'localhost'}${request.url}`); - * URL { - * href: 'http://localhost/status?name=ryan', - * origin: 'http://localhost', - * protocol: 'http:', - * username: '', - * password: '', - * host: 'localhost', - * hostname: 'localhost', - * port: '', - * pathname: '/status', - * search: '?name=ryan', - * searchParams: URLSearchParams { 'name' => 'ryan' }, - * hash: '' - * } - * ``` - * - * Ensure that you set `process.env.HOST` to the server's host name, or consider replacing this part entirely. If using `req.headers.host`, ensure proper - * validation is used, as clients may specify a custom `Host` header. - * @since v0.1.90 - */ - url?: string | undefined; - /** - * **Only valid for response obtained from {@link ClientRequest}.** - * - * The 3-digit HTTP response status code. E.G. `404`. - * @since v0.1.1 - */ - statusCode?: number | undefined; - /** - * **Only valid for response obtained from {@link ClientRequest}.** - * - * The HTTP response status message (reason phrase). E.G. `OK` or `Internal Server Error`. - * @since v0.11.10 - */ - statusMessage?: string | undefined; - /** - * Calls `destroy()` on the socket that received the `IncomingMessage`. If `error` is provided, an `'error'` event is emitted on the socket and `error` is passed - * as an argument to any listeners on the event. - * @since v0.3.0 - */ - destroy(error?: Error): this; - // #region InternalEventEmitter - addListener( - eventName: E, - listener: (...args: IncomingMessageEventMap[E]) => void, - ): this; - addListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - emit(eventName: E, ...args: IncomingMessageEventMap[E]): boolean; - emit(eventName: string | symbol, ...args: any[]): boolean; - listenerCount( - eventName: E, - listener?: (...args: IncomingMessageEventMap[E]) => void, - ): number; - listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number; - listeners( - eventName: E, - ): ((...args: IncomingMessageEventMap[E]) => void)[]; - listeners(eventName: string | symbol): ((...args: any[]) => void)[]; - off( - eventName: E, - listener: (...args: IncomingMessageEventMap[E]) => void, - ): this; - off(eventName: string | symbol, listener: (...args: any[]) => void): this; - on( - eventName: E, - listener: (...args: IncomingMessageEventMap[E]) => void, - ): this; - on(eventName: string | symbol, listener: (...args: any[]) => void): this; - once( - eventName: E, - listener: (...args: IncomingMessageEventMap[E]) => void, - ): this; - once(eventName: string | symbol, listener: (...args: any[]) => void): this; - prependListener( - eventName: E, - listener: (...args: IncomingMessageEventMap[E]) => void, - ): this; - prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - prependOnceListener( - eventName: E, - listener: (...args: IncomingMessageEventMap[E]) => void, - ): this; - prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - rawListeners( - eventName: E, - ): ((...args: IncomingMessageEventMap[E]) => void)[]; - rawListeners(eventName: string | symbol): ((...args: any[]) => void)[]; - // eslint-disable-next-line @definitelytyped/no-unnecessary-generics - removeAllListeners(eventName?: E): this; - removeAllListeners(eventName?: string | symbol): this; - removeListener( - eventName: E, - listener: (...args: IncomingMessageEventMap[E]) => void, - ): this; - removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - // #endregion - } - interface ProxyEnv extends NodeJS.ProcessEnv { - HTTP_PROXY?: string | undefined; - HTTPS_PROXY?: string | undefined; - NO_PROXY?: string | undefined; - http_proxy?: string | undefined; - https_proxy?: string | undefined; - no_proxy?: string | undefined; - } - interface AgentOptions extends NodeJS.PartialOptions { - /** - * Keep sockets around in a pool to be used by other requests in the future. Default = false - */ - keepAlive?: boolean | undefined; - /** - * When using HTTP KeepAlive, how often to send TCP KeepAlive packets over sockets being kept alive. Default = 1000. - * Only relevant if keepAlive is set to true. - */ - keepAliveMsecs?: number | undefined; - /** - * Milliseconds to subtract from - * the server-provided `keep-alive: timeout=...` hint when determining socket - * expiration time. This buffer helps ensure the agent closes the socket - * slightly before the server does, reducing the chance of sending a request - * on a socket that’s about to be closed by the server. - * @since v24.7.0 - * @default 1000 - */ - agentKeepAliveTimeoutBuffer?: number | undefined; - /** - * Maximum number of sockets to allow per host. Default for Node 0.10 is 5, default for Node 0.12 is Infinity - */ - maxSockets?: number | undefined; - /** - * Maximum number of sockets allowed for all hosts in total. Each request will use a new socket until the maximum is reached. Default: Infinity. - */ - maxTotalSockets?: number | undefined; - /** - * Maximum number of sockets to leave open in a free state. Only relevant if keepAlive is set to true. Default = 256. - */ - maxFreeSockets?: number | undefined; - /** - * Socket timeout in milliseconds. This will set the timeout after the socket is connected. - */ - timeout?: number | undefined; - /** - * Scheduling strategy to apply when picking the next free socket to use. - * @default `lifo` - */ - scheduling?: "fifo" | "lifo" | undefined; - /** - * Environment variables for proxy configuration. See - * [Built-in Proxy Support](https://nodejs.org/docs/latest-v25.x/api/http.html#built-in-proxy-support) for details. - * @since v24.5.0 - */ - proxyEnv?: ProxyEnv | undefined; - /** - * Default port to use when the port is not specified in requests. - * @since v24.5.0 - */ - defaultPort?: number | undefined; - /** - * The protocol to use for the agent. - * @since v24.5.0 - */ - protocol?: string | undefined; - } - /** - * An `Agent` is responsible for managing connection persistence - * and reuse for HTTP clients. It maintains a queue of pending requests - * for a given host and port, reusing a single socket connection for each - * until the queue is empty, at which time the socket is either destroyed - * or put into a pool where it is kept to be used again for requests to the - * same host and port. Whether it is destroyed or pooled depends on the `keepAlive` `option`. - * - * Pooled connections have TCP Keep-Alive enabled for them, but servers may - * still close idle connections, in which case they will be removed from the - * pool and a new connection will be made when a new HTTP request is made for - * that host and port. Servers may also refuse to allow multiple requests - * over the same connection, in which case the connection will have to be - * remade for every request and cannot be pooled. The `Agent` will still make - * the requests to that server, but each one will occur over a new connection. - * - * When a connection is closed by the client or the server, it is removed - * from the pool. Any unused sockets in the pool will be unrefed so as not - * to keep the Node.js process running when there are no outstanding requests. - * (see `socket.unref()`). - * - * It is good practice, to `destroy()` an `Agent` instance when it is no - * longer in use, because unused sockets consume OS resources. - * - * Sockets are removed from an agent when the socket emits either - * a `'close'` event or an `'agentRemove'` event. When intending to keep one - * HTTP request open for a long time without keeping it in the agent, something - * like the following may be done: - * - * ```js - * http.get(options, (res) => { - * // Do stuff - * }).on('socket', (socket) => { - * socket.emit('agentRemove'); - * }); - * ``` - * - * An agent may also be used for an individual request. By providing `{agent: false}` as an option to the `http.get()` or `http.request()` functions, a one-time use `Agent` with default options - * will be used - * for the client connection. - * - * `agent:false`: - * - * ```js - * http.get({ - * hostname: 'localhost', - * port: 80, - * path: '/', - * agent: false, // Create a new agent just for this one request - * }, (res) => { - * // Do stuff with response - * }); - * ``` - * - * `options` in [`socket.connect()`](https://nodejs.org/docs/latest-v25.x/api/net.html#socketconnectoptions-connectlistener) are also supported. - * - * To configure any of them, a custom {@link Agent} instance must be created. - * - * ```js - * import http from 'node:http'; - * const keepAliveAgent = new http.Agent({ keepAlive: true }); - * options.agent = keepAliveAgent; - * http.request(options, onResponseCallback) - * ``` - * @since v0.3.4 - */ - class Agent extends EventEmitter { - /** - * By default set to 256. For agents with `keepAlive` enabled, this - * sets the maximum number of sockets that will be left open in the free - * state. - * @since v0.11.7 - */ - maxFreeSockets: number; - /** - * By default set to `Infinity`. Determines how many concurrent sockets the agent - * can have open per origin. Origin is the returned value of `agent.getName()`. - * @since v0.3.6 - */ - maxSockets: number; - /** - * By default set to `Infinity`. Determines how many concurrent sockets the agent - * can have open. Unlike `maxSockets`, this parameter applies across all origins. - * @since v14.5.0, v12.19.0 - */ - maxTotalSockets: number; - /** - * An object which contains arrays of sockets currently awaiting use by - * the agent when `keepAlive` is enabled. Do not modify. - * - * Sockets in the `freeSockets` list will be automatically destroyed and - * removed from the array on `'timeout'`. - * @since v0.11.4 - */ - readonly freeSockets: NodeJS.ReadOnlyDict; - /** - * An object which contains arrays of sockets currently in use by the - * agent. Do not modify. - * @since v0.3.6 - */ - readonly sockets: NodeJS.ReadOnlyDict; - /** - * An object which contains queues of requests that have not yet been assigned to - * sockets. Do not modify. - * @since v0.5.9 - */ - readonly requests: NodeJS.ReadOnlyDict; - constructor(opts?: AgentOptions); - /** - * Destroy any sockets that are currently in use by the agent. - * - * It is usually not necessary to do this. However, if using an - * agent with `keepAlive` enabled, then it is best to explicitly shut down - * the agent when it is no longer needed. Otherwise, - * sockets might stay open for quite a long time before the server - * terminates them. - * @since v0.11.4 - */ - destroy(): void; - /** - * Produces a socket/stream to be used for HTTP requests. - * - * By default, this function is the same as `net.createConnection()`. However, - * custom agents may override this method in case greater flexibility is desired. - * - * A socket/stream can be supplied in one of two ways: by returning the - * socket/stream from this function, or by passing the socket/stream to `callback`. - * - * This method is guaranteed to return an instance of the `net.Socket` class, - * a subclass of `stream.Duplex`, unless the user specifies a socket - * type other than `net.Socket`. - * - * `callback` has a signature of `(err, stream)`. - * @since v0.11.4 - * @param options Options containing connection details. Check `createConnection` for the format of the options - * @param callback Callback function that receives the created socket - */ - createConnection( - options: ClientRequestArgs, - callback?: (err: Error | null, stream: stream.Duplex) => void, - ): stream.Duplex | null | undefined; - /** - * Called when `socket` is detached from a request and could be persisted by the`Agent`. Default behavior is to: - * - * ```js - * socket.setKeepAlive(true, this.keepAliveMsecs); - * socket.unref(); - * return true; - * ``` - * - * This method can be overridden by a particular `Agent` subclass. If this - * method returns a falsy value, the socket will be destroyed instead of persisting - * it for use with the next request. - * - * The `socket` argument can be an instance of `net.Socket`, a subclass of `stream.Duplex`. - * @since v8.1.0 - */ - keepSocketAlive(socket: stream.Duplex): void; - /** - * Called when `socket` is attached to `request` after being persisted because of - * the keep-alive options. Default behavior is to: - * - * ```js - * socket.ref(); - * ``` - * - * This method can be overridden by a particular `Agent` subclass. - * - * The `socket` argument can be an instance of `net.Socket`, a subclass of `stream.Duplex`. - * @since v8.1.0 - */ - reuseSocket(socket: stream.Duplex, request: ClientRequest): void; - /** - * Get a unique name for a set of request options, to determine whether a - * connection can be reused. For an HTTP agent, this returns`host:port:localAddress` or `host:port:localAddress:family`. For an HTTPS agent, - * the name includes the CA, cert, ciphers, and other HTTPS/TLS-specific options - * that determine socket reusability. - * @since v0.11.4 - * @param options A set of options providing information for name generation - */ - getName(options?: ClientRequestArgs): string; - } - const METHODS: string[]; - const STATUS_CODES: { - [errorCode: number]: string | undefined; - [errorCode: string]: string | undefined; - }; - /** - * Returns a new instance of {@link Server}. - * - * The `requestListener` is a function which is automatically - * added to the `'request'` event. - * - * ```js - * import http from 'node:http'; - * - * // Create a local server to receive data from - * const server = http.createServer((req, res) => { - * res.writeHead(200, { 'Content-Type': 'application/json' }); - * res.end(JSON.stringify({ - * data: 'Hello World!', - * })); - * }); - * - * server.listen(8000); - * ``` - * - * ```js - * import http from 'node:http'; - * - * // Create a local server to receive data from - * const server = http.createServer(); - * - * // Listen to the request event - * server.on('request', (request, res) => { - * res.writeHead(200, { 'Content-Type': 'application/json' }); - * res.end(JSON.stringify({ - * data: 'Hello World!', - * })); - * }); - * - * server.listen(8000); - * ``` - * @since v0.1.13 - */ - function createServer< - Request extends typeof IncomingMessage = typeof IncomingMessage, - Response extends typeof ServerResponse> = typeof ServerResponse, - >(requestListener?: RequestListener): Server; - function createServer< - Request extends typeof IncomingMessage = typeof IncomingMessage, - Response extends typeof ServerResponse> = typeof ServerResponse, - >( - options: ServerOptions, - requestListener?: RequestListener, - ): Server; - // although RequestOptions are passed as ClientRequestArgs to ClientRequest directly, - // create interface RequestOptions would make the naming more clear to developers - interface RequestOptions extends ClientRequestArgs {} - /** - * `options` in `socket.connect()` are also supported. - * - * Node.js maintains several connections per server to make HTTP requests. - * This function allows one to transparently issue requests. - * - * `url` can be a string or a `URL` object. If `url` is a - * string, it is automatically parsed with `new URL()`. If it is a `URL` object, it will be automatically converted to an ordinary `options` object. - * - * If both `url` and `options` are specified, the objects are merged, with the `options` properties taking precedence. - * - * The optional `callback` parameter will be added as a one-time listener for - * the `'response'` event. - * - * `http.request()` returns an instance of the {@link ClientRequest} class. The `ClientRequest` instance is a writable stream. If one needs to - * upload a file with a POST request, then write to the `ClientRequest` object. - * - * ```js - * import http from 'node:http'; - * import { Buffer } from 'node:buffer'; - * - * const postData = JSON.stringify({ - * 'msg': 'Hello World!', - * }); - * - * const options = { - * hostname: 'www.google.com', - * port: 80, - * path: '/upload', - * method: 'POST', - * headers: { - * 'Content-Type': 'application/json', - * 'Content-Length': Buffer.byteLength(postData), - * }, - * }; - * - * const req = http.request(options, (res) => { - * console.log(`STATUS: ${res.statusCode}`); - * console.log(`HEADERS: ${JSON.stringify(res.headers)}`); - * res.setEncoding('utf8'); - * res.on('data', (chunk) => { - * console.log(`BODY: ${chunk}`); - * }); - * res.on('end', () => { - * console.log('No more data in response.'); - * }); - * }); - * - * req.on('error', (e) => { - * console.error(`problem with request: ${e.message}`); - * }); - * - * // Write data to request body - * req.write(postData); - * req.end(); - * ``` - * - * In the example `req.end()` was called. With `http.request()` one - * must always call `req.end()` to signify the end of the request - - * even if there is no data being written to the request body. - * - * If any error is encountered during the request (be that with DNS resolution, - * TCP level errors, or actual HTTP parse errors) an `'error'` event is emitted - * on the returned request object. As with all `'error'` events, if no listeners - * are registered the error will be thrown. - * - * There are a few special headers that should be noted. - * - * * Sending a 'Connection: keep-alive' will notify Node.js that the connection to - * the server should be persisted until the next request. - * * Sending a 'Content-Length' header will disable the default chunked encoding. - * * Sending an 'Expect' header will immediately send the request headers. - * Usually, when sending 'Expect: 100-continue', both a timeout and a listener - * for the `'continue'` event should be set. See RFC 2616 Section 8.2.3 for more - * information. - * * Sending an Authorization header will override using the `auth` option - * to compute basic authentication. - * - * Example using a `URL` as `options`: - * - * ```js - * const options = new URL('http://abc:xyz@example.com'); - * - * const req = http.request(options, (res) => { - * // ... - * }); - * ``` - * - * In a successful request, the following events will be emitted in the following - * order: - * - * * `'socket'` - * * `'response'` - * * `'data'` any number of times, on the `res` object - * (`'data'` will not be emitted at all if the response body is empty, for - * instance, in most redirects) - * * `'end'` on the `res` object - * * `'close'` - * - * In the case of a connection error, the following events will be emitted: - * - * * `'socket'` - * * `'error'` - * * `'close'` - * - * In the case of a premature connection close before the response is received, - * the following events will be emitted in the following order: - * - * * `'socket'` - * * `'error'` with an error with message `'Error: socket hang up'` and code `'ECONNRESET'` - * * `'close'` - * - * In the case of a premature connection close after the response is received, - * the following events will be emitted in the following order: - * - * * `'socket'` - * * `'response'` - * * `'data'` any number of times, on the `res` object - * * (connection closed here) - * * `'aborted'` on the `res` object - * * `'close'` - * * `'error'` on the `res` object with an error with message `'Error: aborted'` and code `'ECONNRESET'` - * * `'close'` on the `res` object - * - * If `req.destroy()` is called before a socket is assigned, the following - * events will be emitted in the following order: - * - * * (`req.destroy()` called here) - * * `'error'` with an error with message `'Error: socket hang up'` and code `'ECONNRESET'`, or the error with which `req.destroy()` was called - * * `'close'` - * - * If `req.destroy()` is called before the connection succeeds, the following - * events will be emitted in the following order: - * - * * `'socket'` - * * (`req.destroy()` called here) - * * `'error'` with an error with message `'Error: socket hang up'` and code `'ECONNRESET'`, or the error with which `req.destroy()` was called - * * `'close'` - * - * If `req.destroy()` is called after the response is received, the following - * events will be emitted in the following order: - * - * * `'socket'` - * * `'response'` - * * `'data'` any number of times, on the `res` object - * * (`req.destroy()` called here) - * * `'aborted'` on the `res` object - * * `'close'` - * * `'error'` on the `res` object with an error with message `'Error: aborted'` and code `'ECONNRESET'`, or the error with which `req.destroy()` was called - * * `'close'` on the `res` object - * - * If `req.abort()` is called before a socket is assigned, the following - * events will be emitted in the following order: - * - * * (`req.abort()` called here) - * * `'abort'` - * * `'close'` - * - * If `req.abort()` is called before the connection succeeds, the following - * events will be emitted in the following order: - * - * * `'socket'` - * * (`req.abort()` called here) - * * `'abort'` - * * `'error'` with an error with message `'Error: socket hang up'` and code `'ECONNRESET'` - * * `'close'` - * - * If `req.abort()` is called after the response is received, the following - * events will be emitted in the following order: - * - * * `'socket'` - * * `'response'` - * * `'data'` any number of times, on the `res` object - * * (`req.abort()` called here) - * * `'abort'` - * * `'aborted'` on the `res` object - * * `'error'` on the `res` object with an error with message `'Error: aborted'` and code `'ECONNRESET'`. - * * `'close'` - * * `'close'` on the `res` object - * - * Setting the `timeout` option or using the `setTimeout()` function will - * not abort the request or do anything besides add a `'timeout'` event. - * - * Passing an `AbortSignal` and then calling `abort()` on the corresponding `AbortController` will behave the same way as calling `.destroy()` on the - * request. Specifically, the `'error'` event will be emitted with an error with - * the message `'AbortError: The operation was aborted'`, the code `'ABORT_ERR'` and the `cause`, if one was provided. - * @since v0.3.6 - */ - function request(options: RequestOptions | string | URL, callback?: (res: IncomingMessage) => void): ClientRequest; - function request( - url: string | URL, - options: RequestOptions, - callback?: (res: IncomingMessage) => void, - ): ClientRequest; - /** - * Since most requests are GET requests without bodies, Node.js provides this - * convenience method. The only difference between this method and {@link request} is that it sets the method to GET by default and calls `req.end()` automatically. The callback must take care to - * consume the response - * data for reasons stated in {@link ClientRequest} section. - * - * The `callback` is invoked with a single argument that is an instance of {@link IncomingMessage}. - * - * JSON fetching example: - * - * ```js - * http.get('http://localhost:8000/', (res) => { - * const { statusCode } = res; - * const contentType = res.headers['content-type']; - * - * let error; - * // Any 2xx status code signals a successful response but - * // here we're only checking for 200. - * if (statusCode !== 200) { - * error = new Error('Request Failed.\n' + - * `Status Code: ${statusCode}`); - * } else if (!/^application\/json/.test(contentType)) { - * error = new Error('Invalid content-type.\n' + - * `Expected application/json but received ${contentType}`); - * } - * if (error) { - * console.error(error.message); - * // Consume response data to free up memory - * res.resume(); - * return; - * } - * - * res.setEncoding('utf8'); - * let rawData = ''; - * res.on('data', (chunk) => { rawData += chunk; }); - * res.on('end', () => { - * try { - * const parsedData = JSON.parse(rawData); - * console.log(parsedData); - * } catch (e) { - * console.error(e.message); - * } - * }); - * }).on('error', (e) => { - * console.error(`Got error: ${e.message}`); - * }); - * - * // Create a local server to receive data from - * const server = http.createServer((req, res) => { - * res.writeHead(200, { 'Content-Type': 'application/json' }); - * res.end(JSON.stringify({ - * data: 'Hello World!', - * })); - * }); - * - * server.listen(8000); - * ``` - * @since v0.3.6 - * @param options Accepts the same `options` as {@link request}, with the method set to GET by default. - */ - function get(options: RequestOptions | string | URL, callback?: (res: IncomingMessage) => void): ClientRequest; - function get(url: string | URL, options: RequestOptions, callback?: (res: IncomingMessage) => void): ClientRequest; - /** - * Performs the low-level validations on the provided `name` that are done when `res.setHeader(name, value)` is called. - * - * Passing illegal value as `name` will result in a `TypeError` being thrown, - * identified by `code: 'ERR_INVALID_HTTP_TOKEN'`. - * - * It is not necessary to use this method before passing headers to an HTTP request - * or response. The HTTP module will automatically validate such headers. - * - * Example: - * - * ```js - * import { validateHeaderName } from 'node:http'; - * - * try { - * validateHeaderName(''); - * } catch (err) { - * console.error(err instanceof TypeError); // --> true - * console.error(err.code); // --> 'ERR_INVALID_HTTP_TOKEN' - * console.error(err.message); // --> 'Header name must be a valid HTTP token [""]' - * } - * ``` - * @since v14.3.0 - * @param [label='Header name'] Label for error message. - */ - function validateHeaderName(name: string): void; - /** - * Performs the low-level validations on the provided `value` that are done when `res.setHeader(name, value)` is called. - * - * Passing illegal value as `value` will result in a `TypeError` being thrown. - * - * * Undefined value error is identified by `code: 'ERR_HTTP_INVALID_HEADER_VALUE'`. - * * Invalid value character error is identified by `code: 'ERR_INVALID_CHAR'`. - * - * It is not necessary to use this method before passing headers to an HTTP request - * or response. The HTTP module will automatically validate such headers. - * - * Examples: - * - * ```js - * import { validateHeaderValue } from 'node:http'; - * - * try { - * validateHeaderValue('x-my-header', undefined); - * } catch (err) { - * console.error(err instanceof TypeError); // --> true - * console.error(err.code === 'ERR_HTTP_INVALID_HEADER_VALUE'); // --> true - * console.error(err.message); // --> 'Invalid value "undefined" for header "x-my-header"' - * } - * - * try { - * validateHeaderValue('x-my-header', 'oʊmɪɡə'); - * } catch (err) { - * console.error(err instanceof TypeError); // --> true - * console.error(err.code === 'ERR_INVALID_CHAR'); // --> true - * console.error(err.message); // --> 'Invalid character in header content ["x-my-header"]' - * } - * ``` - * @since v14.3.0 - * @param name Header name - * @param value Header value - */ - function validateHeaderValue(name: string, value: string): void; - /** - * Set the maximum number of idle HTTP parsers. - * @since v18.8.0, v16.18.0 - * @param [max=1000] - */ - function setMaxIdleHTTPParsers(max: number): void; - /** - * Global instance of `Agent` which is used as the default for all HTTP client - * requests. Diverges from a default `Agent` configuration by having `keepAlive` - * enabled and a `timeout` of 5 seconds. - * @since v0.5.9 - */ - let globalAgent: Agent; - /** - * Read-only property specifying the maximum allowed size of HTTP headers in bytes. - * Defaults to 16KB. Configurable using the `--max-http-header-size` CLI option. - */ - const maxHeaderSize: number; - /** - * A browser-compatible implementation of `WebSocket`. - * @since v22.5.0 - */ - const WebSocket: typeof import("undici-types").WebSocket; - /** - * @since v22.5.0 - */ - const CloseEvent: typeof import("undici-types").CloseEvent; - /** - * @since v22.5.0 - */ - const MessageEvent: typeof import("undici-types").MessageEvent; -} -declare module "http" { - export * from "node:http"; -} diff --git a/PBandGraphScaffold/node_modules/@types/node/http2.d.ts b/PBandGraphScaffold/node_modules/@types/node/http2.d.ts deleted file mode 100644 index 4130bfe..0000000 --- a/PBandGraphScaffold/node_modules/@types/node/http2.d.ts +++ /dev/null @@ -1,2480 +0,0 @@ -/** - * The `node:http2` module provides an implementation of the [HTTP/2](https://tools.ietf.org/html/rfc7540) protocol. - * It can be accessed using: - * - * ```js - * import http2 from 'node:http2'; - * ``` - * @since v8.4.0 - * @see [source](https://github.com/nodejs/node/blob/v25.x/lib/http2.js) - */ -declare module "node:http2" { - import { NonSharedBuffer } from "node:buffer"; - import { InternalEventEmitter } from "node:events"; - import * as fs from "node:fs"; - import * as net from "node:net"; - import * as stream from "node:stream"; - import * as tls from "node:tls"; - import * as url from "node:url"; - import { - IncomingHttpHeaders as Http1IncomingHttpHeaders, - IncomingMessage, - OutgoingHttpHeaders, - ServerResponse, - } from "node:http"; - interface IncomingHttpStatusHeader { - ":status"?: number | undefined; - } - interface IncomingHttpHeaders extends Http1IncomingHttpHeaders { - ":path"?: string | undefined; - ":method"?: string | undefined; - ":authority"?: string | undefined; - ":scheme"?: string | undefined; - } - // Http2Stream - interface StreamState { - localWindowSize?: number | undefined; - state?: number | undefined; - localClose?: number | undefined; - remoteClose?: number | undefined; - /** @deprecated */ - sumDependencyWeight?: number | undefined; - /** @deprecated */ - weight?: number | undefined; - } - interface ServerStreamResponseOptions { - endStream?: boolean | undefined; - waitForTrailers?: boolean | undefined; - } - interface StatOptions { - offset: number; - length: number; - } - interface ServerStreamFileResponseOptions { - statCheck?: - | ((stats: fs.Stats, headers: OutgoingHttpHeaders, statOptions: StatOptions) => void) - | undefined; - waitForTrailers?: boolean | undefined; - offset?: number | undefined; - length?: number | undefined; - } - interface ServerStreamFileResponseOptionsWithError extends ServerStreamFileResponseOptions { - onError?: ((err: NodeJS.ErrnoException) => void) | undefined; - } - interface Http2StreamEventMap extends stream.DuplexEventMap { - "aborted": []; - "data": [chunk: string | NonSharedBuffer]; - "frameError": [type: number, code: number, id: number]; - "ready": []; - "streamClosed": [code: number]; - "timeout": []; - "trailers": [trailers: IncomingHttpHeaders, flags: number]; - "wantTrailers": []; - } - interface Http2Stream extends stream.Duplex { - /** - * Set to `true` if the `Http2Stream` instance was aborted abnormally. When set, - * the `'aborted'` event will have been emitted. - * @since v8.4.0 - */ - readonly aborted: boolean; - /** - * This property shows the number of characters currently buffered to be written. - * See `net.Socket.bufferSize` for details. - * @since v11.2.0, v10.16.0 - */ - readonly bufferSize: number; - /** - * Set to `true` if the `Http2Stream` instance has been closed. - * @since v9.4.0 - */ - readonly closed: boolean; - /** - * Set to `true` if the `Http2Stream` instance has been destroyed and is no longer - * usable. - * @since v8.4.0 - */ - readonly destroyed: boolean; - /** - * Set to `true` if the `END_STREAM` flag was set in the request or response - * HEADERS frame received, indicating that no additional data should be received - * and the readable side of the `Http2Stream` will be closed. - * @since v10.11.0 - */ - readonly endAfterHeaders: boolean; - /** - * The numeric stream identifier of this `Http2Stream` instance. Set to `undefined` if the stream identifier has not yet been assigned. - * @since v8.4.0 - */ - readonly id?: number | undefined; - /** - * Set to `true` if the `Http2Stream` instance has not yet been assigned a - * numeric stream identifier. - * @since v9.4.0 - */ - readonly pending: boolean; - /** - * Set to the `RST_STREAM` `error code` reported when the `Http2Stream` is - * destroyed after either receiving an `RST_STREAM` frame from the connected peer, - * calling `http2stream.close()`, or `http2stream.destroy()`. Will be `undefined` if the `Http2Stream` has not been closed. - * @since v8.4.0 - */ - readonly rstCode: number; - /** - * An object containing the outbound headers sent for this `Http2Stream`. - * @since v9.5.0 - */ - readonly sentHeaders: OutgoingHttpHeaders; - /** - * An array of objects containing the outbound informational (additional) headers - * sent for this `Http2Stream`. - * @since v9.5.0 - */ - readonly sentInfoHeaders?: OutgoingHttpHeaders[] | undefined; - /** - * An object containing the outbound trailers sent for this `HttpStream`. - * @since v9.5.0 - */ - readonly sentTrailers?: OutgoingHttpHeaders | undefined; - /** - * A reference to the `Http2Session` instance that owns this `Http2Stream`. The - * value will be `undefined` after the `Http2Stream` instance is destroyed. - * @since v8.4.0 - */ - readonly session: Http2Session | undefined; - /** - * Provides miscellaneous information about the current state of the `Http2Stream`. - * - * A current state of this `Http2Stream`. - * @since v8.4.0 - */ - readonly state: StreamState; - /** - * Closes the `Http2Stream` instance by sending an `RST_STREAM` frame to the - * connected HTTP/2 peer. - * @since v8.4.0 - * @param [code=http2.constants.NGHTTP2_NO_ERROR] Unsigned 32-bit integer identifying the error code. - * @param callback An optional function registered to listen for the `'close'` event. - */ - close(code?: number, callback?: () => void): void; - /** - * @deprecated Priority signaling is no longer supported in Node.js. - */ - priority(options: unknown): void; - /** - * ```js - * import http2 from 'node:http2'; - * const client = http2.connect('http://example.org:8000'); - * const { NGHTTP2_CANCEL } = http2.constants; - * const req = client.request({ ':path': '/' }); - * - * // Cancel the stream if there's no activity after 5 seconds - * req.setTimeout(5000, () => req.close(NGHTTP2_CANCEL)); - * ``` - * @since v8.4.0 - */ - setTimeout(msecs: number, callback?: () => void): void; - /** - * Sends a trailing `HEADERS` frame to the connected HTTP/2 peer. This method - * will cause the `Http2Stream` to be immediately closed and must only be - * called after the `'wantTrailers'` event has been emitted. When sending a - * request or sending a response, the `options.waitForTrailers` option must be set - * in order to keep the `Http2Stream` open after the final `DATA` frame so that - * trailers can be sent. - * - * ```js - * import http2 from 'node:http2'; - * const server = http2.createServer(); - * server.on('stream', (stream) => { - * stream.respond(undefined, { waitForTrailers: true }); - * stream.on('wantTrailers', () => { - * stream.sendTrailers({ xyz: 'abc' }); - * }); - * stream.end('Hello World'); - * }); - * ``` - * - * The HTTP/1 specification forbids trailers from containing HTTP/2 pseudo-header - * fields (e.g. `':method'`, `':path'`, etc). - * @since v10.0.0 - */ - sendTrailers(headers: OutgoingHttpHeaders): void; - // #region InternalEventEmitter - addListener( - eventName: E, - listener: (...args: Http2StreamEventMap[E]) => void, - ): this; - addListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - emit(eventName: E, ...args: Http2StreamEventMap[E]): boolean; - emit(eventName: string | symbol, ...args: any[]): boolean; - listenerCount( - eventName: E, - listener?: (...args: Http2StreamEventMap[E]) => void, - ): number; - listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number; - listeners(eventName: E): ((...args: Http2StreamEventMap[E]) => void)[]; - listeners(eventName: string | symbol): ((...args: any[]) => void)[]; - off( - eventName: E, - listener: (...args: Http2StreamEventMap[E]) => void, - ): this; - off(eventName: string | symbol, listener: (...args: any[]) => void): this; - on( - eventName: E, - listener: (...args: Http2StreamEventMap[E]) => void, - ): this; - on(eventName: string | symbol, listener: (...args: any[]) => void): this; - once( - eventName: E, - listener: (...args: Http2StreamEventMap[E]) => void, - ): this; - once(eventName: string | symbol, listener: (...args: any[]) => void): this; - prependListener( - eventName: E, - listener: (...args: Http2StreamEventMap[E]) => void, - ): this; - prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - prependOnceListener( - eventName: E, - listener: (...args: Http2StreamEventMap[E]) => void, - ): this; - prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - rawListeners(eventName: E): ((...args: Http2StreamEventMap[E]) => void)[]; - rawListeners(eventName: string | symbol): ((...args: any[]) => void)[]; - // eslint-disable-next-line @definitelytyped/no-unnecessary-generics - removeAllListeners(eventName?: E): this; - removeAllListeners(eventName?: string | symbol): this; - removeListener( - eventName: E, - listener: (...args: Http2StreamEventMap[E]) => void, - ): this; - removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - // #endregion - } - interface ClientHttp2StreamEventMap extends Http2StreamEventMap { - "continue": []; - "headers": [headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number, rawHeaders: string[]]; - "push": [headers: IncomingHttpHeaders, flags: number]; - "response": [headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number, rawHeaders: string[]]; - } - interface ClientHttp2Stream extends Http2Stream { - // #region InternalEventEmitter - addListener( - eventName: E, - listener: (...args: ClientHttp2StreamEventMap[E]) => void, - ): this; - addListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - emit(eventName: E, ...args: ClientHttp2StreamEventMap[E]): boolean; - emit(eventName: string | symbol, ...args: any[]): boolean; - listenerCount( - eventName: E, - listener?: (...args: ClientHttp2StreamEventMap[E]) => void, - ): number; - listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number; - listeners( - eventName: E, - ): ((...args: ClientHttp2StreamEventMap[E]) => void)[]; - listeners(eventName: string | symbol): ((...args: any[]) => void)[]; - off( - eventName: E, - listener: (...args: ClientHttp2StreamEventMap[E]) => void, - ): this; - off(eventName: string | symbol, listener: (...args: any[]) => void): this; - on( - eventName: E, - listener: (...args: ClientHttp2StreamEventMap[E]) => void, - ): this; - on(eventName: string | symbol, listener: (...args: any[]) => void): this; - once( - eventName: E, - listener: (...args: ClientHttp2StreamEventMap[E]) => void, - ): this; - once(eventName: string | symbol, listener: (...args: any[]) => void): this; - prependListener( - eventName: E, - listener: (...args: ClientHttp2StreamEventMap[E]) => void, - ): this; - prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - prependOnceListener( - eventName: E, - listener: (...args: ClientHttp2StreamEventMap[E]) => void, - ): this; - prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - rawListeners( - eventName: E, - ): ((...args: ClientHttp2StreamEventMap[E]) => void)[]; - rawListeners(eventName: string | symbol): ((...args: any[]) => void)[]; - // eslint-disable-next-line @definitelytyped/no-unnecessary-generics - removeAllListeners(eventName?: E): this; - removeAllListeners(eventName?: string | symbol): this; - removeListener( - eventName: E, - listener: (...args: ClientHttp2StreamEventMap[E]) => void, - ): this; - removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - // #endregion - } - interface ServerHttp2Stream extends Http2Stream { - /** - * True if headers were sent, false otherwise (read-only). - * @since v8.4.0 - */ - readonly headersSent: boolean; - /** - * Read-only property mapped to the `SETTINGS_ENABLE_PUSH` flag of the remote - * client's most recent `SETTINGS` frame. Will be `true` if the remote peer - * accepts push streams, `false` otherwise. Settings are the same for every `Http2Stream` in the same `Http2Session`. - * @since v8.4.0 - */ - readonly pushAllowed: boolean; - /** - * Sends an additional informational `HEADERS` frame to the connected HTTP/2 peer. - * @since v8.4.0 - */ - additionalHeaders(headers: OutgoingHttpHeaders): void; - /** - * Initiates a push stream. The callback is invoked with the new `Http2Stream` instance created for the push stream passed as the second argument, or an `Error` passed as the first argument. - * - * ```js - * import http2 from 'node:http2'; - * const server = http2.createServer(); - * server.on('stream', (stream) => { - * stream.respond({ ':status': 200 }); - * stream.pushStream({ ':path': '/' }, (err, pushStream, headers) => { - * if (err) throw err; - * pushStream.respond({ ':status': 200 }); - * pushStream.end('some pushed data'); - * }); - * stream.end('some data'); - * }); - * ``` - * - * Setting the weight of a push stream is not allowed in the `HEADERS` frame. Pass - * a `weight` value to `http2stream.priority` with the `silent` option set to `true` to enable server-side bandwidth balancing between concurrent streams. - * - * Calling `http2stream.pushStream()` from within a pushed stream is not permitted - * and will throw an error. - * @since v8.4.0 - * @param callback Callback that is called once the push stream has been initiated. - */ - pushStream( - headers: OutgoingHttpHeaders, - callback?: (err: Error | null, pushStream: ServerHttp2Stream, headers: OutgoingHttpHeaders) => void, - ): void; - pushStream( - headers: OutgoingHttpHeaders, - options?: Pick, - callback?: (err: Error | null, pushStream: ServerHttp2Stream, headers: OutgoingHttpHeaders) => void, - ): void; - /** - * ```js - * import http2 from 'node:http2'; - * const server = http2.createServer(); - * server.on('stream', (stream) => { - * stream.respond({ ':status': 200 }); - * stream.end('some data'); - * }); - * ``` - * - * Initiates a response. When the `options.waitForTrailers` option is set, the `'wantTrailers'` event - * will be emitted immediately after queuing the last chunk of payload data to be sent. - * The `http2stream.sendTrailers()` method can then be used to send trailing header fields to the peer. - * - * When `options.waitForTrailers` is set, the `Http2Stream` will not automatically - * close when the final `DATA` frame is transmitted. User code must call either `http2stream.sendTrailers()` or `http2stream.close()` to close the `Http2Stream`. - * - * ```js - * import http2 from 'node:http2'; - * const server = http2.createServer(); - * server.on('stream', (stream) => { - * stream.respond({ ':status': 200 }, { waitForTrailers: true }); - * stream.on('wantTrailers', () => { - * stream.sendTrailers({ ABC: 'some value to send' }); - * }); - * stream.end('some data'); - * }); - * ``` - * @since v8.4.0 - */ - respond(headers?: OutgoingHttpHeaders | readonly string[], options?: ServerStreamResponseOptions): void; - /** - * Initiates a response whose data is read from the given file descriptor. No - * validation is performed on the given file descriptor. If an error occurs while - * attempting to read data using the file descriptor, the `Http2Stream` will be - * closed using an `RST_STREAM` frame using the standard `INTERNAL_ERROR` code. - * - * When used, the `Http2Stream` object's `Duplex` interface will be closed - * automatically. - * - * ```js - * import http2 from 'node:http2'; - * import fs from 'node:fs'; - * - * const server = http2.createServer(); - * server.on('stream', (stream) => { - * const fd = fs.openSync('/some/file', 'r'); - * - * const stat = fs.fstatSync(fd); - * const headers = { - * 'content-length': stat.size, - * 'last-modified': stat.mtime.toUTCString(), - * 'content-type': 'text/plain; charset=utf-8', - * }; - * stream.respondWithFD(fd, headers); - * stream.on('close', () => fs.closeSync(fd)); - * }); - * ``` - * - * The optional `options.statCheck` function may be specified to give user code - * an opportunity to set additional content headers based on the `fs.Stat` details - * of the given fd. If the `statCheck` function is provided, the `http2stream.respondWithFD()` method will - * perform an `fs.fstat()` call to collect details on the provided file descriptor. - * - * The `offset` and `length` options may be used to limit the response to a - * specific range subset. This can be used, for instance, to support HTTP Range - * requests. - * - * The file descriptor or `FileHandle` is not closed when the stream is closed, - * so it will need to be closed manually once it is no longer needed. - * Using the same file descriptor concurrently for multiple streams - * is not supported and may result in data loss. Re-using a file descriptor - * after a stream has finished is supported. - * - * When the `options.waitForTrailers` option is set, the `'wantTrailers'` event - * will be emitted immediately after queuing the last chunk of payload data to be - * sent. The `http2stream.sendTrailers()` method can then be used to sent trailing - * header fields to the peer. - * - * When `options.waitForTrailers` is set, the `Http2Stream` will not automatically - * close when the final `DATA` frame is transmitted. User code _must_ call either `http2stream.sendTrailers()` - * or `http2stream.close()` to close the `Http2Stream`. - * - * ```js - * import http2 from 'node:http2'; - * import fs from 'node:fs'; - * - * const server = http2.createServer(); - * server.on('stream', (stream) => { - * const fd = fs.openSync('/some/file', 'r'); - * - * const stat = fs.fstatSync(fd); - * const headers = { - * 'content-length': stat.size, - * 'last-modified': stat.mtime.toUTCString(), - * 'content-type': 'text/plain; charset=utf-8', - * }; - * stream.respondWithFD(fd, headers, { waitForTrailers: true }); - * stream.on('wantTrailers', () => { - * stream.sendTrailers({ ABC: 'some value to send' }); - * }); - * - * stream.on('close', () => fs.closeSync(fd)); - * }); - * ``` - * @since v8.4.0 - * @param fd A readable file descriptor. - */ - respondWithFD( - fd: number | fs.promises.FileHandle, - headers?: OutgoingHttpHeaders, - options?: ServerStreamFileResponseOptions, - ): void; - /** - * Sends a regular file as the response. The `path` must specify a regular file - * or an `'error'` event will be emitted on the `Http2Stream` object. - * - * When used, the `Http2Stream` object's `Duplex` interface will be closed - * automatically. - * - * The optional `options.statCheck` function may be specified to give user code - * an opportunity to set additional content headers based on the `fs.Stat` details - * of the given file: - * - * If an error occurs while attempting to read the file data, the `Http2Stream` will be closed using an - * `RST_STREAM` frame using the standard `INTERNAL_ERROR` code. - * If the `onError` callback is defined, then it will be called. Otherwise, the stream will be destroyed. - * - * Example using a file path: - * - * ```js - * import http2 from 'node:http2'; - * const server = http2.createServer(); - * server.on('stream', (stream) => { - * function statCheck(stat, headers) { - * headers['last-modified'] = stat.mtime.toUTCString(); - * } - * - * function onError(err) { - * // stream.respond() can throw if the stream has been destroyed by - * // the other side. - * try { - * if (err.code === 'ENOENT') { - * stream.respond({ ':status': 404 }); - * } else { - * stream.respond({ ':status': 500 }); - * } - * } catch (err) { - * // Perform actual error handling. - * console.error(err); - * } - * stream.end(); - * } - * - * stream.respondWithFile('/some/file', - * { 'content-type': 'text/plain; charset=utf-8' }, - * { statCheck, onError }); - * }); - * ``` - * - * The `options.statCheck` function may also be used to cancel the send operation - * by returning `false`. For instance, a conditional request may check the stat - * results to determine if the file has been modified to return an appropriate `304` response: - * - * ```js - * import http2 from 'node:http2'; - * const server = http2.createServer(); - * server.on('stream', (stream) => { - * function statCheck(stat, headers) { - * // Check the stat here... - * stream.respond({ ':status': 304 }); - * return false; // Cancel the send operation - * } - * stream.respondWithFile('/some/file', - * { 'content-type': 'text/plain; charset=utf-8' }, - * { statCheck }); - * }); - * ``` - * - * The `content-length` header field will be automatically set. - * - * The `offset` and `length` options may be used to limit the response to a - * specific range subset. This can be used, for instance, to support HTTP Range - * requests. - * - * The `options.onError` function may also be used to handle all the errors - * that could happen before the delivery of the file is initiated. The - * default behavior is to destroy the stream. - * - * When the `options.waitForTrailers` option is set, the `'wantTrailers'` event - * will be emitted immediately after queuing the last chunk of payload data to be - * sent. The `http2stream.sendTrailers()` method can then be used to sent trailing - * header fields to the peer. - * - * When `options.waitForTrailers` is set, the `Http2Stream` will not automatically - * close when the final `DATA` frame is transmitted. User code must call either`http2stream.sendTrailers()` or `http2stream.close()` to close the`Http2Stream`. - * - * ```js - * import http2 from 'node:http2'; - * const server = http2.createServer(); - * server.on('stream', (stream) => { - * stream.respondWithFile('/some/file', - * { 'content-type': 'text/plain; charset=utf-8' }, - * { waitForTrailers: true }); - * stream.on('wantTrailers', () => { - * stream.sendTrailers({ ABC: 'some value to send' }); - * }); - * }); - * ``` - * @since v8.4.0 - */ - respondWithFile( - path: string, - headers?: OutgoingHttpHeaders, - options?: ServerStreamFileResponseOptionsWithError, - ): void; - } - // Http2Session - interface Settings { - headerTableSize?: number | undefined; - enablePush?: boolean | undefined; - initialWindowSize?: number | undefined; - maxFrameSize?: number | undefined; - maxConcurrentStreams?: number | undefined; - maxHeaderListSize?: number | undefined; - enableConnectProtocol?: boolean | undefined; - } - interface ClientSessionRequestOptions { - endStream?: boolean | undefined; - exclusive?: boolean | undefined; - parent?: number | undefined; - waitForTrailers?: boolean | undefined; - signal?: AbortSignal | undefined; - } - interface SessionState { - effectiveLocalWindowSize?: number | undefined; - effectiveRecvDataLength?: number | undefined; - nextStreamID?: number | undefined; - localWindowSize?: number | undefined; - lastProcStreamID?: number | undefined; - remoteWindowSize?: number | undefined; - outboundQueueSize?: number | undefined; - deflateDynamicTableSize?: number | undefined; - inflateDynamicTableSize?: number | undefined; - } - interface Http2SessionEventMap { - "close": []; - "connect": [session: Http2Session, socket: net.Socket | tls.TLSSocket]; - "error": [err: Error]; - "frameError": [type: number, code: number, id: number]; - "goaway": [errorCode: number, lastStreamID: number, opaqueData?: NonSharedBuffer]; - "localSettings": [settings: Settings]; - "ping": [payload: Buffer]; - "remoteSettings": [settings: Settings]; - "stream": [ - stream: Http2Stream, - headers: IncomingHttpHeaders & IncomingHttpStatusHeader, - flags: number, - rawHeaders: string[], - ]; - "timeout": []; - } - interface Http2Session extends InternalEventEmitter { - /** - * Value will be `undefined` if the `Http2Session` is not yet connected to a - * socket, `h2c` if the `Http2Session` is not connected to a `TLSSocket`, or - * will return the value of the connected `TLSSocket`'s own `alpnProtocol` property. - * @since v9.4.0 - */ - readonly alpnProtocol?: string | undefined; - /** - * Will be `true` if this `Http2Session` instance has been closed, otherwise `false`. - * @since v9.4.0 - */ - readonly closed: boolean; - /** - * Will be `true` if this `Http2Session` instance is still connecting, will be set - * to `false` before emitting `connect` event and/or calling the `http2.connect` callback. - * @since v10.0.0 - */ - readonly connecting: boolean; - /** - * Will be `true` if this `Http2Session` instance has been destroyed and must no - * longer be used, otherwise `false`. - * @since v8.4.0 - */ - readonly destroyed: boolean; - /** - * Value is `undefined` if the `Http2Session` session socket has not yet been - * connected, `true` if the `Http2Session` is connected with a `TLSSocket`, - * and `false` if the `Http2Session` is connected to any other kind of socket - * or stream. - * @since v9.4.0 - */ - readonly encrypted?: boolean | undefined; - /** - * A prototype-less object describing the current local settings of this `Http2Session`. - * The local settings are local to _this_`Http2Session` instance. - * @since v8.4.0 - */ - readonly localSettings: Settings; - /** - * If the `Http2Session` is connected to a `TLSSocket`, the `originSet` property - * will return an `Array` of origins for which the `Http2Session` may be - * considered authoritative. - * - * The `originSet` property is only available when using a secure TLS connection. - * @since v9.4.0 - */ - readonly originSet?: string[] | undefined; - /** - * Indicates whether the `Http2Session` is currently waiting for acknowledgment of - * a sent `SETTINGS` frame. Will be `true` after calling the `http2session.settings()` method. - * Will be `false` once all sent `SETTINGS` frames have been acknowledged. - * @since v8.4.0 - */ - readonly pendingSettingsAck: boolean; - /** - * A prototype-less object describing the current remote settings of this`Http2Session`. - * The remote settings are set by the _connected_ HTTP/2 peer. - * @since v8.4.0 - */ - readonly remoteSettings: Settings; - /** - * Returns a `Proxy` object that acts as a `net.Socket` (or `tls.TLSSocket`) but - * limits available methods to ones safe to use with HTTP/2. - * - * `destroy`, `emit`, `end`, `pause`, `read`, `resume`, and `write` will throw - * an error with code `ERR_HTTP2_NO_SOCKET_MANIPULATION`. See `Http2Session and Sockets` for more information. - * - * `setTimeout` method will be called on this `Http2Session`. - * - * All other interactions will be routed directly to the socket. - * @since v8.4.0 - */ - readonly socket: net.Socket | tls.TLSSocket; - /** - * Provides miscellaneous information about the current state of the`Http2Session`. - * - * An object describing the current status of this `Http2Session`. - * @since v8.4.0 - */ - readonly state: SessionState; - /** - * The `http2session.type` will be equal to `http2.constants.NGHTTP2_SESSION_SERVER` if this `Http2Session` instance is a - * server, and `http2.constants.NGHTTP2_SESSION_CLIENT` if the instance is a - * client. - * @since v8.4.0 - */ - readonly type: number; - /** - * Gracefully closes the `Http2Session`, allowing any existing streams to - * complete on their own and preventing new `Http2Stream` instances from being - * created. Once closed, `http2session.destroy()`_might_ be called if there - * are no open `Http2Stream` instances. - * - * If specified, the `callback` function is registered as a handler for the`'close'` event. - * @since v9.4.0 - */ - close(callback?: () => void): void; - /** - * Immediately terminates the `Http2Session` and the associated `net.Socket` or `tls.TLSSocket`. - * - * Once destroyed, the `Http2Session` will emit the `'close'` event. If `error` is not undefined, an `'error'` event will be emitted immediately before the `'close'` event. - * - * If there are any remaining open `Http2Streams` associated with the `Http2Session`, those will also be destroyed. - * @since v8.4.0 - * @param error An `Error` object if the `Http2Session` is being destroyed due to an error. - * @param code The HTTP/2 error code to send in the final `GOAWAY` frame. If unspecified, and `error` is not undefined, the default is `INTERNAL_ERROR`, otherwise defaults to `NO_ERROR`. - */ - destroy(error?: Error, code?: number): void; - /** - * Transmits a `GOAWAY` frame to the connected peer _without_ shutting down the`Http2Session`. - * @since v9.4.0 - * @param code An HTTP/2 error code - * @param lastStreamID The numeric ID of the last processed `Http2Stream` - * @param opaqueData A `TypedArray` or `DataView` instance containing additional data to be carried within the `GOAWAY` frame. - */ - goaway(code?: number, lastStreamID?: number, opaqueData?: NodeJS.ArrayBufferView): void; - /** - * Sends a `PING` frame to the connected HTTP/2 peer. A `callback` function must - * be provided. The method will return `true` if the `PING` was sent, `false` otherwise. - * - * The maximum number of outstanding (unacknowledged) pings is determined by the `maxOutstandingPings` configuration option. The default maximum is 10. - * - * If provided, the `payload` must be a `Buffer`, `TypedArray`, or `DataView` containing 8 bytes of data that will be transmitted with the `PING` and - * returned with the ping acknowledgment. - * - * The callback will be invoked with three arguments: an error argument that will - * be `null` if the `PING` was successfully acknowledged, a `duration` argument - * that reports the number of milliseconds elapsed since the ping was sent and the - * acknowledgment was received, and a `Buffer` containing the 8-byte `PING` payload. - * - * ```js - * session.ping(Buffer.from('abcdefgh'), (err, duration, payload) => { - * if (!err) { - * console.log(`Ping acknowledged in ${duration} milliseconds`); - * console.log(`With payload '${payload.toString()}'`); - * } - * }); - * ``` - * - * If the `payload` argument is not specified, the default payload will be the - * 64-bit timestamp (little endian) marking the start of the `PING` duration. - * @since v8.9.3 - * @param payload Optional ping payload. - */ - ping(callback: (err: Error | null, duration: number, payload: NonSharedBuffer) => void): boolean; - ping( - payload: NodeJS.ArrayBufferView, - callback: (err: Error | null, duration: number, payload: NonSharedBuffer) => void, - ): boolean; - /** - * Calls `ref()` on this `Http2Session` instance's underlying `net.Socket`. - * @since v9.4.0 - */ - ref(): void; - /** - * Sets the local endpoint's window size. - * The `windowSize` is the total window size to set, not - * the delta. - * - * ```js - * import http2 from 'node:http2'; - * - * const server = http2.createServer(); - * const expectedWindowSize = 2 ** 20; - * server.on('connect', (session) => { - * - * // Set local window size to be 2 ** 20 - * session.setLocalWindowSize(expectedWindowSize); - * }); - * ``` - * @since v15.3.0, v14.18.0 - */ - setLocalWindowSize(windowSize: number): void; - /** - * Used to set a callback function that is called when there is no activity on - * the `Http2Session` after `msecs` milliseconds. The given `callback` is - * registered as a listener on the `'timeout'` event. - * @since v8.4.0 - */ - setTimeout(msecs: number, callback?: () => void): void; - /** - * Updates the current local settings for this `Http2Session` and sends a new `SETTINGS` frame to the connected HTTP/2 peer. - * - * Once called, the `http2session.pendingSettingsAck` property will be `true` while the session is waiting for the remote peer to acknowledge the new - * settings. - * - * The new settings will not become effective until the `SETTINGS` acknowledgment - * is received and the `'localSettings'` event is emitted. It is possible to send - * multiple `SETTINGS` frames while acknowledgment is still pending. - * @since v8.4.0 - * @param callback Callback that is called once the session is connected or right away if the session is already connected. - */ - settings( - settings: Settings, - callback?: (err: Error | null, settings: Settings, duration: number) => void, - ): void; - /** - * Calls `unref()` on this `Http2Session`instance's underlying `net.Socket`. - * @since v9.4.0 - */ - unref(): void; - } - interface ClientHttp2SessionEventMap extends Http2SessionEventMap { - "altsvc": [alt: string, origin: string, streamId: number]; - "connect": [session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket]; - "origin": [origins: string[]]; - "stream": [ - stream: ClientHttp2Stream, - headers: IncomingHttpHeaders & IncomingHttpStatusHeader, - flags: number, - rawHeaders: string[], - ]; - } - interface ClientHttp2Session extends Http2Session { - /** - * For HTTP/2 Client `Http2Session` instances only, the `http2session.request()` creates and returns an `Http2Stream` instance that can be used to send an - * HTTP/2 request to the connected server. - * - * When a `ClientHttp2Session` is first created, the socket may not yet be - * connected. if `clienthttp2session.request()` is called during this time, the - * actual request will be deferred until the socket is ready to go. - * If the `session` is closed before the actual request be executed, an `ERR_HTTP2_GOAWAY_SESSION` is thrown. - * - * This method is only available if `http2session.type` is equal to `http2.constants.NGHTTP2_SESSION_CLIENT`. - * - * ```js - * import http2 from 'node:http2'; - * const clientSession = http2.connect('https://localhost:1234'); - * const { - * HTTP2_HEADER_PATH, - * HTTP2_HEADER_STATUS, - * } = http2.constants; - * - * const req = clientSession.request({ [HTTP2_HEADER_PATH]: '/' }); - * req.on('response', (headers) => { - * console.log(headers[HTTP2_HEADER_STATUS]); - * req.on('data', (chunk) => { // .. }); - * req.on('end', () => { // .. }); - * }); - * ``` - * - * When the `options.waitForTrailers` option is set, the `'wantTrailers'` event - * is emitted immediately after queuing the last chunk of payload data to be sent. - * The `http2stream.sendTrailers()` method can then be called to send trailing - * headers to the peer. - * - * When `options.waitForTrailers` is set, the `Http2Stream` will not automatically - * close when the final `DATA` frame is transmitted. User code must call either`http2stream.sendTrailers()` or `http2stream.close()` to close the`Http2Stream`. - * - * When `options.signal` is set with an `AbortSignal` and then `abort` on the - * corresponding `AbortController` is called, the request will emit an `'error'`event with an `AbortError` error. - * - * The `:method` and `:path` pseudo-headers are not specified within `headers`, - * they respectively default to: - * - * * `:method` \= `'GET'` - * * `:path` \= `/` - * @since v8.4.0 - */ - request( - headers?: OutgoingHttpHeaders | readonly string[], - options?: ClientSessionRequestOptions, - ): ClientHttp2Stream; - // #region InternalEventEmitter - addListener( - eventName: E, - listener: (...args: ClientHttp2StreamEventMap[E]) => void, - ): this; - addListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - emit(eventName: E, ...args: ClientHttp2StreamEventMap[E]): boolean; - emit(eventName: string | symbol, ...args: any[]): boolean; - listenerCount( - eventName: E, - listener?: (...args: ClientHttp2StreamEventMap[E]) => void, - ): number; - listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number; - listeners( - eventName: E, - ): ((...args: ClientHttp2StreamEventMap[E]) => void)[]; - listeners(eventName: string | symbol): ((...args: any[]) => void)[]; - off( - eventName: E, - listener: (...args: ClientHttp2StreamEventMap[E]) => void, - ): this; - off(eventName: string | symbol, listener: (...args: any[]) => void): this; - on( - eventName: E, - listener: (...args: ClientHttp2StreamEventMap[E]) => void, - ): this; - on(eventName: string | symbol, listener: (...args: any[]) => void): this; - once( - eventName: E, - listener: (...args: ClientHttp2StreamEventMap[E]) => void, - ): this; - once(eventName: string | symbol, listener: (...args: any[]) => void): this; - prependListener( - eventName: E, - listener: (...args: ClientHttp2StreamEventMap[E]) => void, - ): this; - prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - prependOnceListener( - eventName: E, - listener: (...args: ClientHttp2StreamEventMap[E]) => void, - ): this; - prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - rawListeners( - eventName: E, - ): ((...args: ClientHttp2StreamEventMap[E]) => void)[]; - rawListeners(eventName: string | symbol): ((...args: any[]) => void)[]; - // eslint-disable-next-line @definitelytyped/no-unnecessary-generics - removeAllListeners(eventName?: E): this; - removeAllListeners(eventName?: string | symbol): this; - removeListener( - eventName: E, - listener: (...args: ClientHttp2StreamEventMap[E]) => void, - ): this; - removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - // #endregion - } - interface AlternativeServiceOptions { - origin: number | string | url.URL; - } - interface ServerHttp2SessionEventMap< - Http1Request extends typeof IncomingMessage = typeof IncomingMessage, - Http1Response extends typeof ServerResponse> = typeof ServerResponse, - Http2Request extends typeof Http2ServerRequest = typeof Http2ServerRequest, - Http2Response extends typeof Http2ServerResponse> = typeof Http2ServerResponse, - > extends Http2SessionEventMap { - "connect": [ - session: ServerHttp2Session, - socket: net.Socket | tls.TLSSocket, - ]; - "stream": [stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number, rawHeaders: string[]]; - } - interface ServerHttp2Session< - Http1Request extends typeof IncomingMessage = typeof IncomingMessage, - Http1Response extends typeof ServerResponse> = typeof ServerResponse, - Http2Request extends typeof Http2ServerRequest = typeof Http2ServerRequest, - Http2Response extends typeof Http2ServerResponse> = typeof Http2ServerResponse, - > extends Http2Session { - readonly server: - | Http2Server - | Http2SecureServer; - /** - * Submits an `ALTSVC` frame (as defined by [RFC 7838](https://tools.ietf.org/html/rfc7838)) to the connected client. - * - * ```js - * import http2 from 'node:http2'; - * - * const server = http2.createServer(); - * server.on('session', (session) => { - * // Set altsvc for origin https://example.org:80 - * session.altsvc('h2=":8000"', 'https://example.org:80'); - * }); - * - * server.on('stream', (stream) => { - * // Set altsvc for a specific stream - * stream.session.altsvc('h2=":8000"', stream.id); - * }); - * ``` - * - * Sending an `ALTSVC` frame with a specific stream ID indicates that the alternate - * service is associated with the origin of the given `Http2Stream`. - * - * The `alt` and origin string _must_ contain only ASCII bytes and are - * strictly interpreted as a sequence of ASCII bytes. The special value `'clear'`may be passed to clear any previously set alternative service for a given - * domain. - * - * When a string is passed for the `originOrStream` argument, it will be parsed as - * a URL and the origin will be derived. For instance, the origin for the - * HTTP URL `'https://example.org/foo/bar'` is the ASCII string`'https://example.org'`. An error will be thrown if either the given string - * cannot be parsed as a URL or if a valid origin cannot be derived. - * - * A `URL` object, or any object with an `origin` property, may be passed as`originOrStream`, in which case the value of the `origin` property will be - * used. The value of the `origin` property _must_ be a properly serialized - * ASCII origin. - * @since v9.4.0 - * @param alt A description of the alternative service configuration as defined by `RFC 7838`. - * @param originOrStream Either a URL string specifying the origin (or an `Object` with an `origin` property) or the numeric identifier of an active `Http2Stream` as given by the - * `http2stream.id` property. - */ - altsvc(alt: string, originOrStream: number | string | url.URL | AlternativeServiceOptions): void; - /** - * Submits an `ORIGIN` frame (as defined by [RFC 8336](https://tools.ietf.org/html/rfc8336)) to the connected client - * to advertise the set of origins for which the server is capable of providing - * authoritative responses. - * - * ```js - * import http2 from 'node:http2'; - * const options = getSecureOptionsSomehow(); - * const server = http2.createSecureServer(options); - * server.on('stream', (stream) => { - * stream.respond(); - * stream.end('ok'); - * }); - * server.on('session', (session) => { - * session.origin('https://example.com', 'https://example.org'); - * }); - * ``` - * - * When a string is passed as an `origin`, it will be parsed as a URL and the - * origin will be derived. For instance, the origin for the HTTP URL `'https://example.org/foo/bar'` is the ASCII string` 'https://example.org'`. An error will be thrown if either the given - * string - * cannot be parsed as a URL or if a valid origin cannot be derived. - * - * A `URL` object, or any object with an `origin` property, may be passed as - * an `origin`, in which case the value of the `origin` property will be - * used. The value of the `origin` property _must_ be a properly serialized - * ASCII origin. - * - * Alternatively, the `origins` option may be used when creating a new HTTP/2 - * server using the `http2.createSecureServer()` method: - * - * ```js - * import http2 from 'node:http2'; - * const options = getSecureOptionsSomehow(); - * options.origins = ['https://example.com', 'https://example.org']; - * const server = http2.createSecureServer(options); - * server.on('stream', (stream) => { - * stream.respond(); - * stream.end('ok'); - * }); - * ``` - * @since v10.12.0 - * @param origins One or more URL Strings passed as separate arguments. - */ - origin( - ...origins: Array< - | string - | url.URL - | { - origin: string; - } - > - ): void; - // #region InternalEventEmitter - addListener( - eventName: E, - listener: ( - ...args: ServerHttp2SessionEventMap[E] - ) => void, - ): this; - addListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - emit( - eventName: E, - ...args: ServerHttp2SessionEventMap[E] - ): boolean; - emit(eventName: string | symbol, ...args: any[]): boolean; - listenerCount( - eventName: E, - listener?: ( - ...args: ServerHttp2SessionEventMap[E] - ) => void, - ): number; - listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number; - listeners( - eventName: E, - ): (( - ...args: ServerHttp2SessionEventMap[E] - ) => void)[]; - listeners(eventName: string | symbol): ((...args: any[]) => void)[]; - off( - eventName: E, - listener: ( - ...args: ServerHttp2SessionEventMap[E] - ) => void, - ): this; - off(eventName: string | symbol, listener: (...args: any[]) => void): this; - on( - eventName: E, - listener: ( - ...args: ServerHttp2SessionEventMap[E] - ) => void, - ): this; - on(eventName: string | symbol, listener: (...args: any[]) => void): this; - once( - eventName: E, - listener: ( - ...args: ServerHttp2SessionEventMap[E] - ) => void, - ): this; - once(eventName: string | symbol, listener: (...args: any[]) => void): this; - prependListener( - eventName: E, - listener: ( - ...args: ServerHttp2SessionEventMap[E] - ) => void, - ): this; - prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - prependOnceListener( - eventName: E, - listener: ( - ...args: ServerHttp2SessionEventMap[E] - ) => void, - ): this; - prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - rawListeners( - eventName: E, - ): (( - ...args: ServerHttp2SessionEventMap[E] - ) => void)[]; - rawListeners(eventName: string | symbol): ((...args: any[]) => void)[]; - // eslint-disable-next-line @definitelytyped/no-unnecessary-generics - removeAllListeners(eventName?: E): this; - removeAllListeners(eventName?: string | symbol): this; - removeListener( - eventName: E, - listener: ( - ...args: ServerHttp2SessionEventMap[E] - ) => void, - ): this; - removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - // #endregion - } - // Http2Server - interface SessionOptions { - /** - * Sets the maximum dynamic table size for deflating header fields. - * @default 4Kib - */ - maxDeflateDynamicTableSize?: number | undefined; - /** - * Sets the maximum number of settings entries per `SETTINGS` frame. - * The minimum value allowed is `1`. - * @default 32 - */ - maxSettings?: number | undefined; - /** - * Sets the maximum memory that the `Http2Session` is permitted to use. - * The value is expressed in terms of number of megabytes, e.g. `1` equal 1 megabyte. - * The minimum value allowed is `1`. - * This is a credit based limit, existing `Http2Stream`s may cause this limit to be exceeded, - * but new `Http2Stream` instances will be rejected while this limit is exceeded. - * The current number of `Http2Stream` sessions, the current memory use of the header compression tables, - * current data queued to be sent, and unacknowledged `PING` and `SETTINGS` frames are all counted towards the current limit. - * @default 10 - */ - maxSessionMemory?: number | undefined; - /** - * Sets the maximum number of header entries. - * This is similar to `server.maxHeadersCount` or `request.maxHeadersCount` in the `node:http` module. - * The minimum value is `1`. - * @default 128 - */ - maxHeaderListPairs?: number | undefined; - /** - * Sets the maximum number of outstanding, unacknowledged pings. - * @default 10 - */ - maxOutstandingPings?: number | undefined; - /** - * Sets the maximum allowed size for a serialized, compressed block of headers. - * Attempts to send headers that exceed this limit will result in - * a `'frameError'` event being emitted and the stream being closed and destroyed. - */ - maxSendHeaderBlockLength?: number | undefined; - /** - * Strategy used for determining the amount of padding to use for `HEADERS` and `DATA` frames. - * @default http2.constants.PADDING_STRATEGY_NONE - */ - paddingStrategy?: number | undefined; - /** - * Sets the maximum number of concurrent streams for the remote peer as if a `SETTINGS` frame had been received. - * Will be overridden if the remote peer sets its own value for `maxConcurrentStreams`. - * @default 100 - */ - peerMaxConcurrentStreams?: number | undefined; - /** - * The initial settings to send to the remote peer upon connection. - */ - settings?: Settings | undefined; - /** - * The array of integer values determines the settings types, - * which are included in the `CustomSettings`-property of the received remoteSettings. - * Please see the `CustomSettings`-property of the `Http2Settings` object for more information, on the allowed setting types. - */ - remoteCustomSettings?: number[] | undefined; - /** - * Specifies a timeout in milliseconds that - * a server should wait when an [`'unknownProtocol'`][] is emitted. If the - * socket has not been destroyed by that time the server will destroy it. - * @default 100000 - */ - unknownProtocolTimeout?: number | undefined; - /** - * If `true`, it turns on strict leading - * and trailing whitespace validation for HTTP/2 header field names and values - * as per [RFC-9113](https://www.rfc-editor.org/rfc/rfc9113.html#section-8.2.1). - * @since v24.2.0 - * @default true - */ - strictFieldWhitespaceValidation?: boolean | undefined; - } - interface ClientSessionOptions extends SessionOptions { - /** - * Sets the maximum number of reserved push streams the client will accept at any given time. - * Once the current number of currently reserved push streams exceeds reaches this limit, - * new push streams sent by the server will be automatically rejected. - * The minimum allowed value is 0. The maximum allowed value is 232-1. - * A negative value sets this option to the maximum allowed value. - * @default 200 - */ - maxReservedRemoteStreams?: number | undefined; - /** - * An optional callback that receives the `URL` instance passed to `connect` and the `options` object, - * and returns any `Duplex` stream that is to be used as the connection for this session. - */ - createConnection?: ((authority: url.URL, option: SessionOptions) => stream.Duplex) | undefined; - /** - * The protocol to connect with, if not set in the `authority`. - * Value may be either `'http:'` or `'https:'`. - * @default 'https:' - */ - protocol?: "http:" | "https:" | undefined; - } - interface ServerSessionOptions< - Http1Request extends typeof IncomingMessage = typeof IncomingMessage, - Http1Response extends typeof ServerResponse> = typeof ServerResponse, - Http2Request extends typeof Http2ServerRequest = typeof Http2ServerRequest, - Http2Response extends typeof Http2ServerResponse> = typeof Http2ServerResponse, - > extends SessionOptions { - streamResetBurst?: number | undefined; - streamResetRate?: number | undefined; - Http1IncomingMessage?: Http1Request | undefined; - Http1ServerResponse?: Http1Response | undefined; - Http2ServerRequest?: Http2Request | undefined; - Http2ServerResponse?: Http2Response | undefined; - } - interface SecureClientSessionOptions extends ClientSessionOptions, tls.ConnectionOptions {} - interface SecureServerSessionOptions< - Http1Request extends typeof IncomingMessage = typeof IncomingMessage, - Http1Response extends typeof ServerResponse> = typeof ServerResponse, - Http2Request extends typeof Http2ServerRequest = typeof Http2ServerRequest, - Http2Response extends typeof Http2ServerResponse> = typeof Http2ServerResponse, - > extends ServerSessionOptions, tls.TlsOptions {} - interface ServerOptions< - Http1Request extends typeof IncomingMessage = typeof IncomingMessage, - Http1Response extends typeof ServerResponse> = typeof ServerResponse, - Http2Request extends typeof Http2ServerRequest = typeof Http2ServerRequest, - Http2Response extends typeof Http2ServerResponse> = typeof Http2ServerResponse, - > extends ServerSessionOptions {} - interface SecureServerOptions< - Http1Request extends typeof IncomingMessage = typeof IncomingMessage, - Http1Response extends typeof ServerResponse> = typeof ServerResponse, - Http2Request extends typeof Http2ServerRequest = typeof Http2ServerRequest, - Http2Response extends typeof Http2ServerResponse> = typeof Http2ServerResponse, - > extends SecureServerSessionOptions { - allowHTTP1?: boolean | undefined; - origins?: string[] | undefined; - } - interface Http2ServerCommon { - setTimeout(msec?: number, callback?: () => void): this; - /** - * Throws ERR_HTTP2_INVALID_SETTING_VALUE for invalid settings values. - * Throws ERR_INVALID_ARG_TYPE for invalid settings argument. - */ - updateSettings(settings: Settings): void; - } - interface Http2ServerEventMap< - Http1Request extends typeof IncomingMessage = typeof IncomingMessage, - Http1Response extends typeof ServerResponse> = typeof ServerResponse, - Http2Request extends typeof Http2ServerRequest = typeof Http2ServerRequest, - Http2Response extends typeof Http2ServerResponse> = typeof Http2ServerResponse, - > extends net.ServerEventMap, Pick { - "checkContinue": [request: InstanceType, response: InstanceType]; - "request": [request: InstanceType, response: InstanceType]; - "session": [session: ServerHttp2Session]; - "sessionError": [err: Error]; - } - interface Http2Server< - Http1Request extends typeof IncomingMessage = typeof IncomingMessage, - Http1Response extends typeof ServerResponse> = typeof ServerResponse, - Http2Request extends typeof Http2ServerRequest = typeof Http2ServerRequest, - Http2Response extends typeof Http2ServerResponse> = typeof Http2ServerResponse, - > extends net.Server, Http2ServerCommon { - // #region InternalEventEmitter - addListener( - eventName: E, - listener: ( - ...args: Http2ServerEventMap[E] - ) => void, - ): this; - addListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - emit( - eventName: E, - ...args: Http2ServerEventMap[E] - ): boolean; - emit(eventName: string | symbol, ...args: any[]): boolean; - listenerCount( - eventName: E, - listener?: ( - ...args: Http2ServerEventMap[E] - ) => void, - ): number; - listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number; - listeners( - eventName: E, - ): ((...args: Http2ServerEventMap[E]) => void)[]; - listeners(eventName: string | symbol): ((...args: any[]) => void)[]; - off( - eventName: E, - listener: ( - ...args: Http2ServerEventMap[E] - ) => void, - ): this; - off(eventName: string | symbol, listener: (...args: any[]) => void): this; - on( - eventName: E, - listener: ( - ...args: Http2ServerEventMap[E] - ) => void, - ): this; - on(eventName: string | symbol, listener: (...args: any[]) => void): this; - once( - eventName: E, - listener: ( - ...args: Http2ServerEventMap[E] - ) => void, - ): this; - once(eventName: string | symbol, listener: (...args: any[]) => void): this; - prependListener( - eventName: E, - listener: ( - ...args: Http2ServerEventMap[E] - ) => void, - ): this; - prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - prependOnceListener( - eventName: E, - listener: ( - ...args: Http2ServerEventMap[E] - ) => void, - ): this; - prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - rawListeners( - eventName: E, - ): ((...args: Http2ServerEventMap[E]) => void)[]; - rawListeners(eventName: string | symbol): ((...args: any[]) => void)[]; - // eslint-disable-next-line @definitelytyped/no-unnecessary-generics - removeAllListeners(eventName?: E): this; - removeAllListeners(eventName?: string | symbol): this; - removeListener( - eventName: E, - listener: ( - ...args: Http2ServerEventMap[E] - ) => void, - ): this; - removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - // #endregion - } - interface Http2SecureServerEventMap< - Http1Request extends typeof IncomingMessage = typeof IncomingMessage, - Http1Response extends typeof ServerResponse> = typeof ServerResponse, - Http2Request extends typeof Http2ServerRequest = typeof Http2ServerRequest, - Http2Response extends typeof Http2ServerResponse> = typeof Http2ServerResponse, - > extends tls.ServerEventMap, Http2ServerEventMap { - "unknownProtocol": [socket: tls.TLSSocket]; - } - interface Http2SecureServer< - Http1Request extends typeof IncomingMessage = typeof IncomingMessage, - Http1Response extends typeof ServerResponse> = typeof ServerResponse, - Http2Request extends typeof Http2ServerRequest = typeof Http2ServerRequest, - Http2Response extends typeof Http2ServerResponse> = typeof Http2ServerResponse, - > extends tls.Server, Http2ServerCommon { - // #region InternalEventEmitter - addListener( - eventName: E, - listener: ( - ...args: Http2SecureServerEventMap[E] - ) => void, - ): this; - addListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - emit( - eventName: E, - ...args: Http2SecureServerEventMap[E] - ): boolean; - emit(eventName: string | symbol, ...args: any[]): boolean; - listenerCount( - eventName: E, - listener?: ( - ...args: Http2SecureServerEventMap[E] - ) => void, - ): number; - listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number; - listeners( - eventName: E, - ): (( - ...args: Http2SecureServerEventMap[E] - ) => void)[]; - listeners(eventName: string | symbol): ((...args: any[]) => void)[]; - off( - eventName: E, - listener: ( - ...args: Http2SecureServerEventMap[E] - ) => void, - ): this; - off(eventName: string | symbol, listener: (...args: any[]) => void): this; - on( - eventName: E, - listener: ( - ...args: Http2SecureServerEventMap[E] - ) => void, - ): this; - on(eventName: string | symbol, listener: (...args: any[]) => void): this; - once( - eventName: E, - listener: ( - ...args: Http2SecureServerEventMap[E] - ) => void, - ): this; - once(eventName: string | symbol, listener: (...args: any[]) => void): this; - prependListener( - eventName: E, - listener: ( - ...args: Http2SecureServerEventMap[E] - ) => void, - ): this; - prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - prependOnceListener( - eventName: E, - listener: ( - ...args: Http2SecureServerEventMap[E] - ) => void, - ): this; - prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - rawListeners( - eventName: E, - ): (( - ...args: Http2SecureServerEventMap[E] - ) => void)[]; - rawListeners(eventName: string | symbol): ((...args: any[]) => void)[]; - // eslint-disable-next-line @definitelytyped/no-unnecessary-generics - removeAllListeners(eventName?: E): this; - removeAllListeners(eventName?: string | symbol): this; - removeListener( - eventName: E, - listener: ( - ...args: Http2SecureServerEventMap[E] - ) => void, - ): this; - removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - // #endregion - } - interface Http2ServerRequestEventMap extends stream.ReadableEventMap { - "aborted": [hadError: boolean, code: number]; - "data": [chunk: string | NonSharedBuffer]; - } - /** - * A `Http2ServerRequest` object is created by {@link Server} or {@link SecureServer} and passed as the first argument to the `'request'` event. It may be used to access a request status, - * headers, and - * data. - * @since v8.4.0 - */ - class Http2ServerRequest extends stream.Readable { - constructor( - stream: ServerHttp2Stream, - headers: IncomingHttpHeaders, - options: stream.ReadableOptions, - rawHeaders: readonly string[], - ); - /** - * The `request.aborted` property will be `true` if the request has - * been aborted. - * @since v10.1.0 - */ - readonly aborted: boolean; - /** - * The request authority pseudo header field. Because HTTP/2 allows requests - * to set either `:authority` or `host`, this value is derived from `req.headers[':authority']` if present. Otherwise, it is derived from `req.headers['host']`. - * @since v8.4.0 - */ - readonly authority: string; - /** - * See `request.socket`. - * @since v8.4.0 - * @deprecated Since v13.0.0 - Use `socket`. - */ - readonly connection: net.Socket | tls.TLSSocket; - /** - * The `request.complete` property will be `true` if the request has - * been completed, aborted, or destroyed. - * @since v12.10.0 - */ - readonly complete: boolean; - /** - * The request/response headers object. - * - * Key-value pairs of header names and values. Header names are lower-cased. - * - * ```js - * // Prints something like: - * // - * // { 'user-agent': 'curl/7.22.0', - * // host: '127.0.0.1:8000', - * // accept: '*' } - * console.log(request.headers); - * ``` - * - * See `HTTP/2 Headers Object`. - * - * In HTTP/2, the request path, host name, protocol, and method are represented as - * special headers prefixed with the `:` character (e.g. `':path'`). These special - * headers will be included in the `request.headers` object. Care must be taken not - * to inadvertently modify these special headers or errors may occur. For instance, - * removing all headers from the request will cause errors to occur: - * - * ```js - * removeAllHeaders(request.headers); - * assert(request.url); // Fails because the :path header has been removed - * ``` - * @since v8.4.0 - */ - readonly headers: IncomingHttpHeaders; - /** - * In case of server request, the HTTP version sent by the client. In the case of - * client response, the HTTP version of the connected-to server. Returns `'2.0'`. - * - * Also `message.httpVersionMajor` is the first integer and `message.httpVersionMinor` is the second. - * @since v8.4.0 - */ - readonly httpVersion: string; - readonly httpVersionMinor: number; - readonly httpVersionMajor: number; - /** - * The request method as a string. Read-only. Examples: `'GET'`, `'DELETE'`. - * @since v8.4.0 - */ - readonly method: string; - /** - * The raw request/response headers list exactly as they were received. - * - * The keys and values are in the same list. It is _not_ a - * list of tuples. So, the even-numbered offsets are key values, and the - * odd-numbered offsets are the associated values. - * - * Header names are not lowercased, and duplicates are not merged. - * - * ```js - * // Prints something like: - * // - * // [ 'user-agent', - * // 'this is invalid because there can be only one', - * // 'User-Agent', - * // 'curl/7.22.0', - * // 'Host', - * // '127.0.0.1:8000', - * // 'ACCEPT', - * // '*' ] - * console.log(request.rawHeaders); - * ``` - * @since v8.4.0 - */ - readonly rawHeaders: string[]; - /** - * The raw request/response trailer keys and values exactly as they were - * received. Only populated at the `'end'` event. - * @since v8.4.0 - */ - readonly rawTrailers: string[]; - /** - * The request scheme pseudo header field indicating the scheme - * portion of the target URL. - * @since v8.4.0 - */ - readonly scheme: string; - /** - * Returns a `Proxy` object that acts as a `net.Socket` (or `tls.TLSSocket`) but - * applies getters, setters, and methods based on HTTP/2 logic. - * - * `destroyed`, `readable`, and `writable` properties will be retrieved from and - * set on `request.stream`. - * - * `destroy`, `emit`, `end`, `on` and `once` methods will be called on `request.stream`. - * - * `setTimeout` method will be called on `request.stream.session`. - * - * `pause`, `read`, `resume`, and `write` will throw an error with code `ERR_HTTP2_NO_SOCKET_MANIPULATION`. See `Http2Session and Sockets` for - * more information. - * - * All other interactions will be routed directly to the socket. With TLS support, - * use `request.socket.getPeerCertificate()` to obtain the client's - * authentication details. - * @since v8.4.0 - */ - readonly socket: net.Socket | tls.TLSSocket; - /** - * The `Http2Stream` object backing the request. - * @since v8.4.0 - */ - readonly stream: ServerHttp2Stream; - /** - * The request/response trailers object. Only populated at the `'end'` event. - * @since v8.4.0 - */ - readonly trailers: IncomingHttpHeaders; - /** - * Request URL string. This contains only the URL that is present in the actual - * HTTP request. If the request is: - * - * ```http - * GET /status?name=ryan HTTP/1.1 - * Accept: text/plain - * ``` - * - * Then `request.url` will be: - * - * ```js - * '/status?name=ryan' - * ``` - * - * To parse the url into its parts, `new URL()` can be used: - * - * ```console - * $ node - * > new URL('/status?name=ryan', 'http://example.com') - * URL { - * href: 'http://example.com/status?name=ryan', - * origin: 'http://example.com', - * protocol: 'http:', - * username: '', - * password: '', - * host: 'example.com', - * hostname: 'example.com', - * port: '', - * pathname: '/status', - * search: '?name=ryan', - * searchParams: URLSearchParams { 'name' => 'ryan' }, - * hash: '' - * } - * ``` - * @since v8.4.0 - */ - url: string; - /** - * Sets the `Http2Stream`'s timeout value to `msecs`. If a callback is - * provided, then it is added as a listener on the `'timeout'` event on - * the response object. - * - * If no `'timeout'` listener is added to the request, the response, or - * the server, then `Http2Stream`s are destroyed when they time out. If a - * handler is assigned to the request, the response, or the server's `'timeout'`events, timed out sockets must be handled explicitly. - * @since v8.4.0 - */ - setTimeout(msecs: number, callback?: () => void): void; - read(size?: number): Buffer | string | null; - // #region InternalEventEmitter - addListener( - eventName: E, - listener: (...args: Http2ServerRequestEventMap[E]) => void, - ): this; - addListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - emit(eventName: E, ...args: Http2ServerRequestEventMap[E]): boolean; - emit(eventName: string | symbol, ...args: any[]): boolean; - listenerCount( - eventName: E, - listener?: (...args: Http2ServerRequestEventMap[E]) => void, - ): number; - listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number; - listeners( - eventName: E, - ): ((...args: Http2ServerRequestEventMap[E]) => void)[]; - listeners(eventName: string | symbol): ((...args: any[]) => void)[]; - off( - eventName: E, - listener: (...args: Http2ServerRequestEventMap[E]) => void, - ): this; - off(eventName: string | symbol, listener: (...args: any[]) => void): this; - on( - eventName: E, - listener: (...args: Http2ServerRequestEventMap[E]) => void, - ): this; - on(eventName: string | symbol, listener: (...args: any[]) => void): this; - once( - eventName: E, - listener: (...args: Http2ServerRequestEventMap[E]) => void, - ): this; - once(eventName: string | symbol, listener: (...args: any[]) => void): this; - prependListener( - eventName: E, - listener: (...args: Http2ServerRequestEventMap[E]) => void, - ): this; - prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - prependOnceListener( - eventName: E, - listener: (...args: Http2ServerRequestEventMap[E]) => void, - ): this; - prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - rawListeners( - eventName: E, - ): ((...args: Http2ServerRequestEventMap[E]) => void)[]; - rawListeners(eventName: string | symbol): ((...args: any[]) => void)[]; - // eslint-disable-next-line @definitelytyped/no-unnecessary-generics - removeAllListeners(eventName?: E): this; - removeAllListeners(eventName?: string | symbol): this; - removeListener( - eventName: E, - listener: (...args: Http2ServerRequestEventMap[E]) => void, - ): this; - removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - // #endregion - } - /** - * This object is created internally by an HTTP server, not by the user. It is - * passed as the second parameter to the `'request'` event. - * @since v8.4.0 - */ - class Http2ServerResponse extends stream.Writable { - constructor(stream: ServerHttp2Stream); - /** - * See `response.socket`. - * @since v8.4.0 - * @deprecated Since v13.0.0 - Use `socket`. - */ - readonly connection: net.Socket | tls.TLSSocket; - /** - * Append a single header value to the header object. - * - * If the value is an array, this is equivalent to calling this method multiple times. - * - * If there were no previous values for the header, this is equivalent to calling {@link setHeader}. - * - * Attempting to set a header field name or value that contains invalid characters will result in a - * [TypeError](https://nodejs.org/docs/latest-v25.x/api/errors.html#class-typeerror) being thrown. - * - * ```js - * // Returns headers including "set-cookie: a" and "set-cookie: b" - * const server = http2.createServer((req, res) => { - * res.setHeader('set-cookie', 'a'); - * res.appendHeader('set-cookie', 'b'); - * res.writeHead(200); - * res.end('ok'); - * }); - * ``` - * @since v20.12.0 - */ - appendHeader(name: string, value: string | string[]): void; - /** - * Boolean value that indicates whether the response has completed. Starts - * as `false`. After `response.end()` executes, the value will be `true`. - * @since v8.4.0 - * @deprecated Since v13.4.0,v12.16.0 - Use `writableEnded`. - */ - readonly finished: boolean; - /** - * True if headers were sent, false otherwise (read-only). - * @since v8.4.0 - */ - readonly headersSent: boolean; - /** - * A reference to the original HTTP2 `request` object. - * @since v15.7.0 - */ - readonly req: Request; - /** - * Returns a `Proxy` object that acts as a `net.Socket` (or `tls.TLSSocket`) but - * applies getters, setters, and methods based on HTTP/2 logic. - * - * `destroyed`, `readable`, and `writable` properties will be retrieved from and - * set on `response.stream`. - * - * `destroy`, `emit`, `end`, `on` and `once` methods will be called on `response.stream`. - * - * `setTimeout` method will be called on `response.stream.session`. - * - * `pause`, `read`, `resume`, and `write` will throw an error with code `ERR_HTTP2_NO_SOCKET_MANIPULATION`. See `Http2Session and Sockets` for - * more information. - * - * All other interactions will be routed directly to the socket. - * - * ```js - * import http2 from 'node:http2'; - * const server = http2.createServer((req, res) => { - * const ip = req.socket.remoteAddress; - * const port = req.socket.remotePort; - * res.end(`Your IP address is ${ip} and your source port is ${port}.`); - * }).listen(3000); - * ``` - * @since v8.4.0 - */ - readonly socket: net.Socket | tls.TLSSocket; - /** - * The `Http2Stream` object backing the response. - * @since v8.4.0 - */ - readonly stream: ServerHttp2Stream; - /** - * When true, the Date header will be automatically generated and sent in - * the response if it is not already present in the headers. Defaults to true. - * - * This should only be disabled for testing; HTTP requires the Date header - * in responses. - * @since v8.4.0 - */ - sendDate: boolean; - /** - * When using implicit headers (not calling `response.writeHead()` explicitly), - * this property controls the status code that will be sent to the client when - * the headers get flushed. - * - * ```js - * response.statusCode = 404; - * ``` - * - * After response header was sent to the client, this property indicates the - * status code which was sent out. - * @since v8.4.0 - */ - statusCode: number; - /** - * Status message is not supported by HTTP/2 (RFC 7540 8.1.2.4). It returns - * an empty string. - * @since v8.4.0 - */ - statusMessage: ""; - /** - * This method adds HTTP trailing headers (a header but at the end of the - * message) to the response. - * - * Attempting to set a header field name or value that contains invalid characters - * will result in a `TypeError` being thrown. - * @since v8.4.0 - */ - addTrailers(trailers: OutgoingHttpHeaders): void; - /** - * This method signals to the server that all of the response headers and body - * have been sent; that server should consider this message complete. - * The method, `response.end()`, MUST be called on each response. - * - * If `data` is specified, it is equivalent to calling `response.write(data, encoding)` followed by `response.end(callback)`. - * - * If `callback` is specified, it will be called when the response stream - * is finished. - * @since v8.4.0 - */ - end(callback?: () => void): this; - end(data: string | Uint8Array, callback?: () => void): this; - end(data: string | Uint8Array, encoding: BufferEncoding, callback?: () => void): this; - /** - * Reads out a header that has already been queued but not sent to the client. - * The name is case-insensitive. - * - * ```js - * const contentType = response.getHeader('content-type'); - * ``` - * @since v8.4.0 - */ - getHeader(name: string): string; - /** - * Returns an array containing the unique names of the current outgoing headers. - * All header names are lowercase. - * - * ```js - * response.setHeader('Foo', 'bar'); - * response.setHeader('Set-Cookie', ['foo=bar', 'bar=baz']); - * - * const headerNames = response.getHeaderNames(); - * // headerNames === ['foo', 'set-cookie'] - * ``` - * @since v8.4.0 - */ - getHeaderNames(): string[]; - /** - * Returns a shallow copy of the current outgoing headers. Since a shallow copy - * is used, array values may be mutated without additional calls to various - * header-related http module methods. The keys of the returned object are the - * header names and the values are the respective header values. All header names - * are lowercase. - * - * The object returned by the `response.getHeaders()` method _does not_ prototypically inherit from the JavaScript `Object`. This means that typical `Object` methods such as `obj.toString()`, - * `obj.hasOwnProperty()`, and others - * are not defined and _will not work_. - * - * ```js - * response.setHeader('Foo', 'bar'); - * response.setHeader('Set-Cookie', ['foo=bar', 'bar=baz']); - * - * const headers = response.getHeaders(); - * // headers === { foo: 'bar', 'set-cookie': ['foo=bar', 'bar=baz'] } - * ``` - * @since v8.4.0 - */ - getHeaders(): OutgoingHttpHeaders; - /** - * Returns `true` if the header identified by `name` is currently set in the - * outgoing headers. The header name matching is case-insensitive. - * - * ```js - * const hasContentType = response.hasHeader('content-type'); - * ``` - * @since v8.4.0 - */ - hasHeader(name: string): boolean; - /** - * Removes a header that has been queued for implicit sending. - * - * ```js - * response.removeHeader('Content-Encoding'); - * ``` - * @since v8.4.0 - */ - removeHeader(name: string): void; - /** - * Sets a single header value for implicit headers. If this header already exists - * in the to-be-sent headers, its value will be replaced. Use an array of strings - * here to send multiple headers with the same name. - * - * ```js - * response.setHeader('Content-Type', 'text/html; charset=utf-8'); - * ``` - * - * or - * - * ```js - * response.setHeader('Set-Cookie', ['type=ninja', 'language=javascript']); - * ``` - * - * Attempting to set a header field name or value that contains invalid characters - * will result in a `TypeError` being thrown. - * - * When headers have been set with `response.setHeader()`, they will be merged - * with any headers passed to `response.writeHead()`, with the headers passed - * to `response.writeHead()` given precedence. - * - * ```js - * // Returns content-type = text/plain - * const server = http2.createServer((req, res) => { - * res.setHeader('Content-Type', 'text/html; charset=utf-8'); - * res.setHeader('X-Foo', 'bar'); - * res.writeHead(200, { 'Content-Type': 'text/plain; charset=utf-8' }); - * res.end('ok'); - * }); - * ``` - * @since v8.4.0 - */ - setHeader(name: string, value: number | string | readonly string[]): void; - /** - * Sets the `Http2Stream`'s timeout value to `msecs`. If a callback is - * provided, then it is added as a listener on the `'timeout'` event on - * the response object. - * - * If no `'timeout'` listener is added to the request, the response, or - * the server, then `Http2Stream` s are destroyed when they time out. If a - * handler is assigned to the request, the response, or the server's `'timeout'` events, timed out sockets must be handled explicitly. - * @since v8.4.0 - */ - setTimeout(msecs: number, callback?: () => void): void; - /** - * If this method is called and `response.writeHead()` has not been called, - * it will switch to implicit header mode and flush the implicit headers. - * - * This sends a chunk of the response body. This method may - * be called multiple times to provide successive parts of the body. - * - * In the `node:http` module, the response body is omitted when the - * request is a HEAD request. Similarly, the `204` and `304` responses _must not_ include a message body. - * - * `chunk` can be a string or a buffer. If `chunk` is a string, - * the second parameter specifies how to encode it into a byte stream. - * By default the `encoding` is `'utf8'`. `callback` will be called when this chunk - * of data is flushed. - * - * This is the raw HTTP body and has nothing to do with higher-level multi-part - * body encodings that may be used. - * - * The first time `response.write()` is called, it will send the buffered - * header information and the first chunk of the body to the client. The second - * time `response.write()` is called, Node.js assumes data will be streamed, - * and sends the new data separately. That is, the response is buffered up to the - * first chunk of the body. - * - * Returns `true` if the entire data was flushed successfully to the kernel - * buffer. Returns `false` if all or part of the data was queued in user memory.`'drain'` will be emitted when the buffer is free again. - * @since v8.4.0 - */ - write(chunk: string | Uint8Array, callback?: (err: Error) => void): boolean; - write(chunk: string | Uint8Array, encoding: BufferEncoding, callback?: (err: Error) => void): boolean; - /** - * Sends a status `100 Continue` to the client, indicating that the request body - * should be sent. See the `'checkContinue'` event on `Http2Server` and `Http2SecureServer`. - * @since v8.4.0 - */ - writeContinue(): void; - /** - * Sends a status `103 Early Hints` to the client with a Link header, - * indicating that the user agent can preload/preconnect the linked resources. - * The `hints` is an object containing the values of headers to be sent with - * early hints message. - * - * **Example** - * - * ```js - * const earlyHintsLink = '; rel=preload; as=style'; - * response.writeEarlyHints({ - * 'link': earlyHintsLink, - * }); - * - * const earlyHintsLinks = [ - * '; rel=preload; as=style', - * '; rel=preload; as=script', - * ]; - * response.writeEarlyHints({ - * 'link': earlyHintsLinks, - * }); - * ``` - * @since v18.11.0 - */ - writeEarlyHints(hints: Record): void; - /** - * Sends a response header to the request. The status code is a 3-digit HTTP - * status code, like `404`. The last argument, `headers`, are the response headers. - * - * Returns a reference to the `Http2ServerResponse`, so that calls can be chained. - * - * For compatibility with `HTTP/1`, a human-readable `statusMessage` may be - * passed as the second argument. However, because the `statusMessage` has no - * meaning within HTTP/2, the argument will have no effect and a process warning - * will be emitted. - * - * ```js - * const body = 'hello world'; - * response.writeHead(200, { - * 'Content-Length': Buffer.byteLength(body), - * 'Content-Type': 'text/plain; charset=utf-8', - * }); - * ``` - * - * `Content-Length` is given in bytes not characters. The`Buffer.byteLength()` API may be used to determine the number of bytes in a - * given encoding. On outbound messages, Node.js does not check if Content-Length - * and the length of the body being transmitted are equal or not. However, when - * receiving messages, Node.js will automatically reject messages when the `Content-Length` does not match the actual payload size. - * - * This method may be called at most one time on a message before `response.end()` is called. - * - * If `response.write()` or `response.end()` are called before calling - * this, the implicit/mutable headers will be calculated and call this function. - * - * When headers have been set with `response.setHeader()`, they will be merged - * with any headers passed to `response.writeHead()`, with the headers passed - * to `response.writeHead()` given precedence. - * - * ```js - * // Returns content-type = text/plain - * const server = http2.createServer((req, res) => { - * res.setHeader('Content-Type', 'text/html; charset=utf-8'); - * res.setHeader('X-Foo', 'bar'); - * res.writeHead(200, { 'Content-Type': 'text/plain; charset=utf-8' }); - * res.end('ok'); - * }); - * ``` - * - * Attempting to set a header field name or value that contains invalid characters - * will result in a `TypeError` being thrown. - * @since v8.4.0 - */ - writeHead(statusCode: number, headers?: OutgoingHttpHeaders | readonly string[]): this; - writeHead(statusCode: number, statusMessage: string, headers?: OutgoingHttpHeaders | readonly string[]): this; - /** - * Call `http2stream.pushStream()` with the given headers, and wrap the - * given `Http2Stream` on a newly created `Http2ServerResponse` as the callback - * parameter if successful. When `Http2ServerRequest` is closed, the callback is - * called with an error `ERR_HTTP2_INVALID_STREAM`. - * @since v8.4.0 - * @param headers An object describing the headers - * @param callback Called once `http2stream.pushStream()` is finished, or either when the attempt to create the pushed `Http2Stream` has failed or has been rejected, or the state of - * `Http2ServerRequest` is closed prior to calling the `http2stream.pushStream()` method - */ - createPushResponse( - headers: OutgoingHttpHeaders, - callback: (err: Error | null, res: Http2ServerResponse) => void, - ): void; - } - namespace constants { - const NGHTTP2_SESSION_SERVER: number; - const NGHTTP2_SESSION_CLIENT: number; - const NGHTTP2_STREAM_STATE_IDLE: number; - const NGHTTP2_STREAM_STATE_OPEN: number; - const NGHTTP2_STREAM_STATE_RESERVED_LOCAL: number; - const NGHTTP2_STREAM_STATE_RESERVED_REMOTE: number; - const NGHTTP2_STREAM_STATE_HALF_CLOSED_LOCAL: number; - const NGHTTP2_STREAM_STATE_HALF_CLOSED_REMOTE: number; - const NGHTTP2_STREAM_STATE_CLOSED: number; - const NGHTTP2_NO_ERROR: number; - const NGHTTP2_PROTOCOL_ERROR: number; - const NGHTTP2_INTERNAL_ERROR: number; - const NGHTTP2_FLOW_CONTROL_ERROR: number; - const NGHTTP2_SETTINGS_TIMEOUT: number; - const NGHTTP2_STREAM_CLOSED: number; - const NGHTTP2_FRAME_SIZE_ERROR: number; - const NGHTTP2_REFUSED_STREAM: number; - const NGHTTP2_CANCEL: number; - const NGHTTP2_COMPRESSION_ERROR: number; - const NGHTTP2_CONNECT_ERROR: number; - const NGHTTP2_ENHANCE_YOUR_CALM: number; - const NGHTTP2_INADEQUATE_SECURITY: number; - const NGHTTP2_HTTP_1_1_REQUIRED: number; - const NGHTTP2_ERR_FRAME_SIZE_ERROR: number; - const NGHTTP2_FLAG_NONE: number; - const NGHTTP2_FLAG_END_STREAM: number; - const NGHTTP2_FLAG_END_HEADERS: number; - const NGHTTP2_FLAG_ACK: number; - const NGHTTP2_FLAG_PADDED: number; - const NGHTTP2_FLAG_PRIORITY: number; - const DEFAULT_SETTINGS_HEADER_TABLE_SIZE: number; - const DEFAULT_SETTINGS_ENABLE_PUSH: number; - const DEFAULT_SETTINGS_INITIAL_WINDOW_SIZE: number; - const DEFAULT_SETTINGS_MAX_FRAME_SIZE: number; - const MAX_MAX_FRAME_SIZE: number; - const MIN_MAX_FRAME_SIZE: number; - const MAX_INITIAL_WINDOW_SIZE: number; - const NGHTTP2_DEFAULT_WEIGHT: number; - const NGHTTP2_SETTINGS_HEADER_TABLE_SIZE: number; - const NGHTTP2_SETTINGS_ENABLE_PUSH: number; - const NGHTTP2_SETTINGS_MAX_CONCURRENT_STREAMS: number; - const NGHTTP2_SETTINGS_INITIAL_WINDOW_SIZE: number; - const NGHTTP2_SETTINGS_MAX_FRAME_SIZE: number; - const NGHTTP2_SETTINGS_MAX_HEADER_LIST_SIZE: number; - const PADDING_STRATEGY_NONE: number; - const PADDING_STRATEGY_MAX: number; - const PADDING_STRATEGY_CALLBACK: number; - const HTTP2_HEADER_STATUS: string; - const HTTP2_HEADER_METHOD: string; - const HTTP2_HEADER_AUTHORITY: string; - const HTTP2_HEADER_SCHEME: string; - const HTTP2_HEADER_PATH: string; - const HTTP2_HEADER_ACCEPT_CHARSET: string; - const HTTP2_HEADER_ACCEPT_ENCODING: string; - const HTTP2_HEADER_ACCEPT_LANGUAGE: string; - const HTTP2_HEADER_ACCEPT_RANGES: string; - const HTTP2_HEADER_ACCEPT: string; - const HTTP2_HEADER_ACCESS_CONTROL_ALLOW_CREDENTIALS: string; - const HTTP2_HEADER_ACCESS_CONTROL_ALLOW_HEADERS: string; - const HTTP2_HEADER_ACCESS_CONTROL_ALLOW_METHODS: string; - const HTTP2_HEADER_ACCESS_CONTROL_ALLOW_ORIGIN: string; - const HTTP2_HEADER_ACCESS_CONTROL_EXPOSE_HEADERS: string; - const HTTP2_HEADER_ACCESS_CONTROL_REQUEST_HEADERS: string; - const HTTP2_HEADER_ACCESS_CONTROL_REQUEST_METHOD: string; - const HTTP2_HEADER_AGE: string; - const HTTP2_HEADER_ALLOW: string; - const HTTP2_HEADER_AUTHORIZATION: string; - const HTTP2_HEADER_CACHE_CONTROL: string; - const HTTP2_HEADER_CONNECTION: string; - const HTTP2_HEADER_CONTENT_DISPOSITION: string; - const HTTP2_HEADER_CONTENT_ENCODING: string; - const HTTP2_HEADER_CONTENT_LANGUAGE: string; - const HTTP2_HEADER_CONTENT_LENGTH: string; - const HTTP2_HEADER_CONTENT_LOCATION: string; - const HTTP2_HEADER_CONTENT_MD5: string; - const HTTP2_HEADER_CONTENT_RANGE: string; - const HTTP2_HEADER_CONTENT_TYPE: string; - const HTTP2_HEADER_COOKIE: string; - const HTTP2_HEADER_DATE: string; - const HTTP2_HEADER_ETAG: string; - const HTTP2_HEADER_EXPECT: string; - const HTTP2_HEADER_EXPIRES: string; - const HTTP2_HEADER_FROM: string; - const HTTP2_HEADER_HOST: string; - const HTTP2_HEADER_IF_MATCH: string; - const HTTP2_HEADER_IF_MODIFIED_SINCE: string; - const HTTP2_HEADER_IF_NONE_MATCH: string; - const HTTP2_HEADER_IF_RANGE: string; - const HTTP2_HEADER_IF_UNMODIFIED_SINCE: string; - const HTTP2_HEADER_LAST_MODIFIED: string; - const HTTP2_HEADER_LINK: string; - const HTTP2_HEADER_LOCATION: string; - const HTTP2_HEADER_MAX_FORWARDS: string; - const HTTP2_HEADER_PREFER: string; - const HTTP2_HEADER_PROXY_AUTHENTICATE: string; - const HTTP2_HEADER_PROXY_AUTHORIZATION: string; - const HTTP2_HEADER_RANGE: string; - const HTTP2_HEADER_REFERER: string; - const HTTP2_HEADER_REFRESH: string; - const HTTP2_HEADER_RETRY_AFTER: string; - const HTTP2_HEADER_SERVER: string; - const HTTP2_HEADER_SET_COOKIE: string; - const HTTP2_HEADER_STRICT_TRANSPORT_SECURITY: string; - const HTTP2_HEADER_TRANSFER_ENCODING: string; - const HTTP2_HEADER_TE: string; - const HTTP2_HEADER_UPGRADE: string; - const HTTP2_HEADER_USER_AGENT: string; - const HTTP2_HEADER_VARY: string; - const HTTP2_HEADER_VIA: string; - const HTTP2_HEADER_WWW_AUTHENTICATE: string; - const HTTP2_HEADER_HTTP2_SETTINGS: string; - const HTTP2_HEADER_KEEP_ALIVE: string; - const HTTP2_HEADER_PROXY_CONNECTION: string; - const HTTP2_METHOD_ACL: string; - const HTTP2_METHOD_BASELINE_CONTROL: string; - const HTTP2_METHOD_BIND: string; - const HTTP2_METHOD_CHECKIN: string; - const HTTP2_METHOD_CHECKOUT: string; - const HTTP2_METHOD_CONNECT: string; - const HTTP2_METHOD_COPY: string; - const HTTP2_METHOD_DELETE: string; - const HTTP2_METHOD_GET: string; - const HTTP2_METHOD_HEAD: string; - const HTTP2_METHOD_LABEL: string; - const HTTP2_METHOD_LINK: string; - const HTTP2_METHOD_LOCK: string; - const HTTP2_METHOD_MERGE: string; - const HTTP2_METHOD_MKACTIVITY: string; - const HTTP2_METHOD_MKCALENDAR: string; - const HTTP2_METHOD_MKCOL: string; - const HTTP2_METHOD_MKREDIRECTREF: string; - const HTTP2_METHOD_MKWORKSPACE: string; - const HTTP2_METHOD_MOVE: string; - const HTTP2_METHOD_OPTIONS: string; - const HTTP2_METHOD_ORDERPATCH: string; - const HTTP2_METHOD_PATCH: string; - const HTTP2_METHOD_POST: string; - const HTTP2_METHOD_PRI: string; - const HTTP2_METHOD_PROPFIND: string; - const HTTP2_METHOD_PROPPATCH: string; - const HTTP2_METHOD_PUT: string; - const HTTP2_METHOD_REBIND: string; - const HTTP2_METHOD_REPORT: string; - const HTTP2_METHOD_SEARCH: string; - const HTTP2_METHOD_TRACE: string; - const HTTP2_METHOD_UNBIND: string; - const HTTP2_METHOD_UNCHECKOUT: string; - const HTTP2_METHOD_UNLINK: string; - const HTTP2_METHOD_UNLOCK: string; - const HTTP2_METHOD_UPDATE: string; - const HTTP2_METHOD_UPDATEREDIRECTREF: string; - const HTTP2_METHOD_VERSION_CONTROL: string; - const HTTP_STATUS_CONTINUE: number; - const HTTP_STATUS_SWITCHING_PROTOCOLS: number; - const HTTP_STATUS_PROCESSING: number; - const HTTP_STATUS_OK: number; - const HTTP_STATUS_CREATED: number; - const HTTP_STATUS_ACCEPTED: number; - const HTTP_STATUS_NON_AUTHORITATIVE_INFORMATION: number; - const HTTP_STATUS_NO_CONTENT: number; - const HTTP_STATUS_RESET_CONTENT: number; - const HTTP_STATUS_PARTIAL_CONTENT: number; - const HTTP_STATUS_MULTI_STATUS: number; - const HTTP_STATUS_ALREADY_REPORTED: number; - const HTTP_STATUS_IM_USED: number; - const HTTP_STATUS_MULTIPLE_CHOICES: number; - const HTTP_STATUS_MOVED_PERMANENTLY: number; - const HTTP_STATUS_FOUND: number; - const HTTP_STATUS_SEE_OTHER: number; - const HTTP_STATUS_NOT_MODIFIED: number; - const HTTP_STATUS_USE_PROXY: number; - const HTTP_STATUS_TEMPORARY_REDIRECT: number; - const HTTP_STATUS_PERMANENT_REDIRECT: number; - const HTTP_STATUS_BAD_REQUEST: number; - const HTTP_STATUS_UNAUTHORIZED: number; - const HTTP_STATUS_PAYMENT_REQUIRED: number; - const HTTP_STATUS_FORBIDDEN: number; - const HTTP_STATUS_NOT_FOUND: number; - const HTTP_STATUS_METHOD_NOT_ALLOWED: number; - const HTTP_STATUS_NOT_ACCEPTABLE: number; - const HTTP_STATUS_PROXY_AUTHENTICATION_REQUIRED: number; - const HTTP_STATUS_REQUEST_TIMEOUT: number; - const HTTP_STATUS_CONFLICT: number; - const HTTP_STATUS_GONE: number; - const HTTP_STATUS_LENGTH_REQUIRED: number; - const HTTP_STATUS_PRECONDITION_FAILED: number; - const HTTP_STATUS_PAYLOAD_TOO_LARGE: number; - const HTTP_STATUS_URI_TOO_LONG: number; - const HTTP_STATUS_UNSUPPORTED_MEDIA_TYPE: number; - const HTTP_STATUS_RANGE_NOT_SATISFIABLE: number; - const HTTP_STATUS_EXPECTATION_FAILED: number; - const HTTP_STATUS_TEAPOT: number; - const HTTP_STATUS_MISDIRECTED_REQUEST: number; - const HTTP_STATUS_UNPROCESSABLE_ENTITY: number; - const HTTP_STATUS_LOCKED: number; - const HTTP_STATUS_FAILED_DEPENDENCY: number; - const HTTP_STATUS_UNORDERED_COLLECTION: number; - const HTTP_STATUS_UPGRADE_REQUIRED: number; - const HTTP_STATUS_PRECONDITION_REQUIRED: number; - const HTTP_STATUS_TOO_MANY_REQUESTS: number; - const HTTP_STATUS_REQUEST_HEADER_FIELDS_TOO_LARGE: number; - const HTTP_STATUS_UNAVAILABLE_FOR_LEGAL_REASONS: number; - const HTTP_STATUS_INTERNAL_SERVER_ERROR: number; - const HTTP_STATUS_NOT_IMPLEMENTED: number; - const HTTP_STATUS_BAD_GATEWAY: number; - const HTTP_STATUS_SERVICE_UNAVAILABLE: number; - const HTTP_STATUS_GATEWAY_TIMEOUT: number; - const HTTP_STATUS_HTTP_VERSION_NOT_SUPPORTED: number; - const HTTP_STATUS_VARIANT_ALSO_NEGOTIATES: number; - const HTTP_STATUS_INSUFFICIENT_STORAGE: number; - const HTTP_STATUS_LOOP_DETECTED: number; - const HTTP_STATUS_BANDWIDTH_LIMIT_EXCEEDED: number; - const HTTP_STATUS_NOT_EXTENDED: number; - const HTTP_STATUS_NETWORK_AUTHENTICATION_REQUIRED: number; - } - /** - * This symbol can be set as a property on the HTTP/2 headers object with - * an array value in order to provide a list of headers considered sensitive. - */ - const sensitiveHeaders: symbol; - /** - * Returns an object containing the default settings for an `Http2Session` instance. This method returns a new object instance every time it is called - * so instances returned may be safely modified for use. - * @since v8.4.0 - */ - function getDefaultSettings(): Settings; - /** - * Returns a `Buffer` instance containing serialized representation of the given - * HTTP/2 settings as specified in the [HTTP/2](https://tools.ietf.org/html/rfc7540) specification. This is intended - * for use with the `HTTP2-Settings` header field. - * - * ```js - * import http2 from 'node:http2'; - * - * const packed = http2.getPackedSettings({ enablePush: false }); - * - * console.log(packed.toString('base64')); - * // Prints: AAIAAAAA - * ``` - * @since v8.4.0 - */ - function getPackedSettings(settings: Settings): NonSharedBuffer; - /** - * Returns a `HTTP/2 Settings Object` containing the deserialized settings from - * the given `Buffer` as generated by `http2.getPackedSettings()`. - * @since v8.4.0 - * @param buf The packed settings. - */ - function getUnpackedSettings(buf: Uint8Array): Settings; - /** - * Returns a `net.Server` instance that creates and manages `Http2Session` instances. - * - * Since there are no browsers known that support [unencrypted HTTP/2](https://http2.github.io/faq/#does-http2-require-encryption), the use of {@link createSecureServer} is necessary when - * communicating - * with browser clients. - * - * ```js - * import http2 from 'node:http2'; - * - * // Create an unencrypted HTTP/2 server. - * // Since there are no browsers known that support - * // unencrypted HTTP/2, the use of `http2.createSecureServer()` - * // is necessary when communicating with browser clients. - * const server = http2.createServer(); - * - * server.on('stream', (stream, headers) => { - * stream.respond({ - * 'content-type': 'text/html; charset=utf-8', - * ':status': 200, - * }); - * stream.end('

Hello World

'); - * }); - * - * server.listen(8000); - * ``` - * @since v8.4.0 - * @param onRequestHandler See `Compatibility API` - */ - function createServer( - onRequestHandler?: (request: Http2ServerRequest, response: Http2ServerResponse) => void, - ): Http2Server; - function createServer< - Http1Request extends typeof IncomingMessage = typeof IncomingMessage, - Http1Response extends typeof ServerResponse> = typeof ServerResponse, - Http2Request extends typeof Http2ServerRequest = typeof Http2ServerRequest, - Http2Response extends typeof Http2ServerResponse> = typeof Http2ServerResponse, - >( - options: ServerOptions, - onRequestHandler?: (request: InstanceType, response: InstanceType) => void, - ): Http2Server; - /** - * Returns a `tls.Server` instance that creates and manages `Http2Session` instances. - * - * ```js - * import http2 from 'node:http2'; - * import fs from 'node:fs'; - * - * const options = { - * key: fs.readFileSync('server-key.pem'), - * cert: fs.readFileSync('server-cert.pem'), - * }; - * - * // Create a secure HTTP/2 server - * const server = http2.createSecureServer(options); - * - * server.on('stream', (stream, headers) => { - * stream.respond({ - * 'content-type': 'text/html; charset=utf-8', - * ':status': 200, - * }); - * stream.end('

Hello World

'); - * }); - * - * server.listen(8443); - * ``` - * @since v8.4.0 - * @param onRequestHandler See `Compatibility API` - */ - function createSecureServer( - onRequestHandler?: (request: Http2ServerRequest, response: Http2ServerResponse) => void, - ): Http2SecureServer; - function createSecureServer< - Http1Request extends typeof IncomingMessage = typeof IncomingMessage, - Http1Response extends typeof ServerResponse> = typeof ServerResponse, - Http2Request extends typeof Http2ServerRequest = typeof Http2ServerRequest, - Http2Response extends typeof Http2ServerResponse> = typeof Http2ServerResponse, - >( - options: SecureServerOptions, - onRequestHandler?: (request: InstanceType, response: InstanceType) => void, - ): Http2SecureServer; - /** - * Returns a `ClientHttp2Session` instance. - * - * ```js - * import http2 from 'node:http2'; - * const client = http2.connect('https://localhost:1234'); - * - * // Use the client - * - * client.close(); - * ``` - * @since v8.4.0 - * @param authority The remote HTTP/2 server to connect to. This must be in the form of a minimal, valid URL with the `http://` or `https://` prefix, host name, and IP port (if a non-default port - * is used). Userinfo (user ID and password), path, querystring, and fragment details in the URL will be ignored. - * @param listener Will be registered as a one-time listener of the {@link 'connect'} event. - */ - function connect( - authority: string | url.URL, - listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void, - ): ClientHttp2Session; - function connect( - authority: string | url.URL, - options?: ClientSessionOptions | SecureClientSessionOptions, - listener?: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void, - ): ClientHttp2Session; - /** - * Create an HTTP/2 server session from an existing socket. - * @param socket A Duplex Stream - * @param options Any `{@link createServer}` options can be provided. - * @since v20.12.0 - */ - function performServerHandshake< - Http1Request extends typeof IncomingMessage = typeof IncomingMessage, - Http1Response extends typeof ServerResponse> = typeof ServerResponse, - Http2Request extends typeof Http2ServerRequest = typeof Http2ServerRequest, - Http2Response extends typeof Http2ServerResponse> = typeof Http2ServerResponse, - >( - socket: stream.Duplex, - options?: ServerOptions, - ): ServerHttp2Session; -} -declare module "node:http2" { - export { OutgoingHttpHeaders } from "node:http"; -} -declare module "http2" { - export * from "node:http2"; -} diff --git a/PBandGraphScaffold/node_modules/@types/node/https.d.ts b/PBandGraphScaffold/node_modules/@types/node/https.d.ts deleted file mode 100644 index c4fbe8c..0000000 --- a/PBandGraphScaffold/node_modules/@types/node/https.d.ts +++ /dev/null @@ -1,399 +0,0 @@ -/** - * HTTPS is the HTTP protocol over TLS/SSL. In Node.js this is implemented as a - * separate module. - * @see [source](https://github.com/nodejs/node/blob/v25.x/lib/https.js) - */ -declare module "node:https" { - import * as http from "node:http"; - import { Duplex } from "node:stream"; - import * as tls from "node:tls"; - import { URL } from "node:url"; - interface ServerOptions< - Request extends typeof http.IncomingMessage = typeof http.IncomingMessage, - Response extends typeof http.ServerResponse> = typeof http.ServerResponse, - > extends http.ServerOptions, tls.TlsOptions {} - interface RequestOptions extends http.RequestOptions, tls.SecureContextOptions { - checkServerIdentity?: - | ((hostname: string, cert: tls.DetailedPeerCertificate) => Error | undefined) - | undefined; - rejectUnauthorized?: boolean | undefined; // Defaults to true - servername?: string | undefined; // SNI TLS Extension - } - interface AgentOptions extends http.AgentOptions, tls.ConnectionOptions { - maxCachedSessions?: number | undefined; - } - /** - * An `Agent` object for HTTPS similar to `http.Agent`. See {@link request} for more information. - * @since v0.4.5 - */ - class Agent extends http.Agent { - constructor(options?: AgentOptions); - options: AgentOptions; - createConnection( - options: RequestOptions, - callback?: (err: Error | null, stream: Duplex) => void, - ): Duplex | null | undefined; - getName(options?: RequestOptions): string; - } - interface ServerEventMap< - Request extends typeof http.IncomingMessage = typeof http.IncomingMessage, - Response extends typeof http.ServerResponse> = typeof http.ServerResponse, - > extends http.ServerEventMap, tls.ServerEventMap {} - /** - * See `http.Server` for more information. - * @since v0.3.4 - */ - class Server< - Request extends typeof http.IncomingMessage = typeof http.IncomingMessage, - Response extends typeof http.ServerResponse> = typeof http.ServerResponse, - > extends tls.Server { - constructor(requestListener?: http.RequestListener); - constructor( - options: ServerOptions, - requestListener?: http.RequestListener, - ); - /** - * Closes all connections connected to this server. - * @since v18.2.0 - */ - closeAllConnections(): void; - /** - * Closes all connections connected to this server which are not sending a request or waiting for a response. - * @since v18.2.0 - */ - closeIdleConnections(): void; - // #region InternalEventEmitter - addListener( - eventName: E, - listener: (...args: ServerEventMap[E]) => void, - ): this; - addListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - emit(eventName: E, ...args: ServerEventMap[E]): boolean; - emit(eventName: string | symbol, ...args: any[]): boolean; - listenerCount( - eventName: E, - listener?: (...args: ServerEventMap[E]) => void, - ): number; - listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number; - listeners( - eventName: E, - ): ((...args: ServerEventMap[E]) => void)[]; - listeners(eventName: string | symbol): ((...args: any[]) => void)[]; - off( - eventName: E, - listener: (...args: ServerEventMap[E]) => void, - ): this; - off(eventName: string | symbol, listener: (...args: any[]) => void): this; - on( - eventName: E, - listener: (...args: ServerEventMap[E]) => void, - ): this; - on(eventName: string | symbol, listener: (...args: any[]) => void): this; - once( - eventName: E, - listener: (...args: ServerEventMap[E]) => void, - ): this; - once(eventName: string | symbol, listener: (...args: any[]) => void): this; - prependListener( - eventName: E, - listener: (...args: ServerEventMap[E]) => void, - ): this; - prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - prependOnceListener( - eventName: E, - listener: (...args: ServerEventMap[E]) => void, - ): this; - prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - rawListeners( - eventName: E, - ): ((...args: ServerEventMap[E]) => void)[]; - rawListeners(eventName: string | symbol): ((...args: any[]) => void)[]; - // eslint-disable-next-line @definitelytyped/no-unnecessary-generics - removeAllListeners(eventName?: E): this; - removeAllListeners(eventName?: string | symbol): this; - removeListener( - eventName: E, - listener: (...args: ServerEventMap[E]) => void, - ): this; - removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - // #endregion - } - interface Server< - Request extends typeof http.IncomingMessage = typeof http.IncomingMessage, - Response extends typeof http.ServerResponse> = typeof http.ServerResponse, - > extends http.Server {} - /** - * ```js - * // curl -k https://localhost:8000/ - * import https from 'node:https'; - * import fs from 'node:fs'; - * - * const options = { - * key: fs.readFileSync('test/fixtures/keys/agent2-key.pem'), - * cert: fs.readFileSync('test/fixtures/keys/agent2-cert.pem'), - * }; - * - * https.createServer(options, (req, res) => { - * res.writeHead(200); - * res.end('hello world\n'); - * }).listen(8000); - * ``` - * - * Or - * - * ```js - * import https from 'node:https'; - * import fs from 'node:fs'; - * - * const options = { - * pfx: fs.readFileSync('test/fixtures/test_cert.pfx'), - * passphrase: 'sample', - * }; - * - * https.createServer(options, (req, res) => { - * res.writeHead(200); - * res.end('hello world\n'); - * }).listen(8000); - * ``` - * @since v0.3.4 - * @param options Accepts `options` from `createServer`, `createSecureContext` and `createServer`. - * @param requestListener A listener to be added to the `'request'` event. - */ - function createServer< - Request extends typeof http.IncomingMessage = typeof http.IncomingMessage, - Response extends typeof http.ServerResponse> = typeof http.ServerResponse, - >(requestListener?: http.RequestListener): Server; - function createServer< - Request extends typeof http.IncomingMessage = typeof http.IncomingMessage, - Response extends typeof http.ServerResponse> = typeof http.ServerResponse, - >( - options: ServerOptions, - requestListener?: http.RequestListener, - ): Server; - /** - * Makes a request to a secure web server. - * - * The following additional `options` from `tls.connect()` are also accepted: `ca`, `cert`, `ciphers`, `clientCertEngine`, `crl`, `dhparam`, `ecdhCurve`, `honorCipherOrder`, `key`, `passphrase`, - * `pfx`, `rejectUnauthorized`, `secureOptions`, `secureProtocol`, `servername`, `sessionIdContext`, `highWaterMark`. - * - * `options` can be an object, a string, or a `URL` object. If `options` is a - * string, it is automatically parsed with `new URL()`. If it is a `URL` object, it will be automatically converted to an ordinary `options` object. - * - * `https.request()` returns an instance of the `http.ClientRequest` class. The `ClientRequest` instance is a writable stream. If one needs to - * upload a file with a POST request, then write to the `ClientRequest` object. - * - * ```js - * import https from 'node:https'; - * - * const options = { - * hostname: 'encrypted.google.com', - * port: 443, - * path: '/', - * method: 'GET', - * }; - * - * const req = https.request(options, (res) => { - * console.log('statusCode:', res.statusCode); - * console.log('headers:', res.headers); - * - * res.on('data', (d) => { - * process.stdout.write(d); - * }); - * }); - * - * req.on('error', (e) => { - * console.error(e); - * }); - * req.end(); - * ``` - * - * Example using options from `tls.connect()`: - * - * ```js - * const options = { - * hostname: 'encrypted.google.com', - * port: 443, - * path: '/', - * method: 'GET', - * key: fs.readFileSync('test/fixtures/keys/agent2-key.pem'), - * cert: fs.readFileSync('test/fixtures/keys/agent2-cert.pem'), - * }; - * options.agent = new https.Agent(options); - * - * const req = https.request(options, (res) => { - * // ... - * }); - * ``` - * - * Alternatively, opt out of connection pooling by not using an `Agent`. - * - * ```js - * const options = { - * hostname: 'encrypted.google.com', - * port: 443, - * path: '/', - * method: 'GET', - * key: fs.readFileSync('test/fixtures/keys/agent2-key.pem'), - * cert: fs.readFileSync('test/fixtures/keys/agent2-cert.pem'), - * agent: false, - * }; - * - * const req = https.request(options, (res) => { - * // ... - * }); - * ``` - * - * Example using a `URL` as `options`: - * - * ```js - * const options = new URL('https://abc:xyz@example.com'); - * - * const req = https.request(options, (res) => { - * // ... - * }); - * ``` - * - * Example pinning on certificate fingerprint, or the public key (similar to`pin-sha256`): - * - * ```js - * import tls from 'node:tls'; - * import https from 'node:https'; - * import crypto from 'node:crypto'; - * - * function sha256(s) { - * return crypto.createHash('sha256').update(s).digest('base64'); - * } - * const options = { - * hostname: 'github.com', - * port: 443, - * path: '/', - * method: 'GET', - * checkServerIdentity: function(host, cert) { - * // Make sure the certificate is issued to the host we are connected to - * const err = tls.checkServerIdentity(host, cert); - * if (err) { - * return err; - * } - * - * // Pin the public key, similar to HPKP pin-sha256 pinning - * const pubkey256 = 'pL1+qb9HTMRZJmuC/bB/ZI9d302BYrrqiVuRyW+DGrU='; - * if (sha256(cert.pubkey) !== pubkey256) { - * const msg = 'Certificate verification error: ' + - * `The public key of '${cert.subject.CN}' ` + - * 'does not match our pinned fingerprint'; - * return new Error(msg); - * } - * - * // Pin the exact certificate, rather than the pub key - * const cert256 = '25:FE:39:32:D9:63:8C:8A:FC:A1:9A:29:87:' + - * 'D8:3E:4C:1D:98:DB:71:E4:1A:48:03:98:EA:22:6A:BD:8B:93:16'; - * if (cert.fingerprint256 !== cert256) { - * const msg = 'Certificate verification error: ' + - * `The certificate of '${cert.subject.CN}' ` + - * 'does not match our pinned fingerprint'; - * return new Error(msg); - * } - * - * // This loop is informational only. - * // Print the certificate and public key fingerprints of all certs in the - * // chain. Its common to pin the public key of the issuer on the public - * // internet, while pinning the public key of the service in sensitive - * // environments. - * do { - * console.log('Subject Common Name:', cert.subject.CN); - * console.log(' Certificate SHA256 fingerprint:', cert.fingerprint256); - * - * hash = crypto.createHash('sha256'); - * console.log(' Public key ping-sha256:', sha256(cert.pubkey)); - * - * lastprint256 = cert.fingerprint256; - * cert = cert.issuerCertificate; - * } while (cert.fingerprint256 !== lastprint256); - * - * }, - * }; - * - * options.agent = new https.Agent(options); - * const req = https.request(options, (res) => { - * console.log('All OK. Server matched our pinned cert or public key'); - * console.log('statusCode:', res.statusCode); - * // Print the HPKP values - * console.log('headers:', res.headers['public-key-pins']); - * - * res.on('data', (d) => {}); - * }); - * - * req.on('error', (e) => { - * console.error(e.message); - * }); - * req.end(); - * ``` - * - * Outputs for example: - * - * ```text - * Subject Common Name: github.com - * Certificate SHA256 fingerprint: 25:FE:39:32:D9:63:8C:8A:FC:A1:9A:29:87:D8:3E:4C:1D:98:DB:71:E4:1A:48:03:98:EA:22:6A:BD:8B:93:16 - * Public key ping-sha256: pL1+qb9HTMRZJmuC/bB/ZI9d302BYrrqiVuRyW+DGrU= - * Subject Common Name: DigiCert SHA2 Extended Validation Server CA - * Certificate SHA256 fingerprint: 40:3E:06:2A:26:53:05:91:13:28:5B:AF:80:A0:D4:AE:42:2C:84:8C:9F:78:FA:D0:1F:C9:4B:C5:B8:7F:EF:1A - * Public key ping-sha256: RRM1dGqnDFsCJXBTHky16vi1obOlCgFFn/yOhI/y+ho= - * Subject Common Name: DigiCert High Assurance EV Root CA - * Certificate SHA256 fingerprint: 74:31:E5:F4:C3:C1:CE:46:90:77:4F:0B:61:E0:54:40:88:3B:A9:A0:1E:D0:0B:A6:AB:D7:80:6E:D3:B1:18:CF - * Public key ping-sha256: WoiWRyIOVNa9ihaBciRSC7XHjliYS9VwUGOIud4PB18= - * All OK. Server matched our pinned cert or public key - * statusCode: 200 - * headers: max-age=0; pin-sha256="WoiWRyIOVNa9ihaBciRSC7XHjliYS9VwUGOIud4PB18="; pin-sha256="RRM1dGqnDFsCJXBTHky16vi1obOlCgFFn/yOhI/y+ho="; - * pin-sha256="k2v657xBsOVe1PQRwOsHsw3bsGT2VzIqz5K+59sNQws="; pin-sha256="K87oWBWM9UZfyddvDfoxL+8lpNyoUB2ptGtn0fv6G2Q="; pin-sha256="IQBnNBEiFuhj+8x6X8XLgh01V9Ic5/V3IRQLNFFc7v4="; - * pin-sha256="iie1VXtL7HzAMF+/PVPR9xzT80kQxdZeJ+zduCB3uj0="; pin-sha256="LvRiGEjRqfzurezaWuj8Wie2gyHMrW5Q06LspMnox7A="; includeSubDomains - * ``` - * @since v0.3.6 - * @param options Accepts all `options` from `request`, with some differences in default values: - */ - function request( - options: RequestOptions | string | URL, - callback?: (res: http.IncomingMessage) => void, - ): http.ClientRequest; - function request( - url: string | URL, - options: RequestOptions, - callback?: (res: http.IncomingMessage) => void, - ): http.ClientRequest; - /** - * Like `http.get()` but for HTTPS. - * - * `options` can be an object, a string, or a `URL` object. If `options` is a - * string, it is automatically parsed with `new URL()`. If it is a `URL` object, it will be automatically converted to an ordinary `options` object. - * - * ```js - * import https from 'node:https'; - * - * https.get('https://encrypted.google.com/', (res) => { - * console.log('statusCode:', res.statusCode); - * console.log('headers:', res.headers); - * - * res.on('data', (d) => { - * process.stdout.write(d); - * }); - * - * }).on('error', (e) => { - * console.error(e); - * }); - * ``` - * @since v0.3.6 - * @param options Accepts the same `options` as {@link request}, with the `method` always set to `GET`. - */ - function get( - options: RequestOptions | string | URL, - callback?: (res: http.IncomingMessage) => void, - ): http.ClientRequest; - function get( - url: string | URL, - options: RequestOptions, - callback?: (res: http.IncomingMessage) => void, - ): http.ClientRequest; - let globalAgent: Agent; -} -declare module "https" { - export * from "node:https"; -} diff --git a/PBandGraphScaffold/node_modules/@types/node/index.d.ts b/PBandGraphScaffold/node_modules/@types/node/index.d.ts deleted file mode 100644 index 08ab4f0..0000000 --- a/PBandGraphScaffold/node_modules/@types/node/index.d.ts +++ /dev/null @@ -1,115 +0,0 @@ -/** - * License for programmatically and manually incorporated - * documentation aka. `JSDoc` from https://github.com/nodejs/node/tree/master/doc - * - * Copyright Node.js contributors. All rights reserved. - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS - * IN THE SOFTWARE. - */ - -// NOTE: These definitions support Node.js and TypeScript 5.8+. - -// Reference required TypeScript libraries: -/// -/// -/// - -// Iterator definitions required for compatibility with TypeScript <5.6: -/// - -// Definitions for Node.js modules specific to TypeScript 5.7+: -/// -/// - -// Definitions for Node.js modules that are not specific to any version of TypeScript: -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// diff --git a/PBandGraphScaffold/node_modules/@types/node/inspector.d.ts b/PBandGraphScaffold/node_modules/@types/node/inspector.d.ts deleted file mode 100644 index c3a7785..0000000 --- a/PBandGraphScaffold/node_modules/@types/node/inspector.d.ts +++ /dev/null @@ -1,224 +0,0 @@ -/** - * The `node:inspector` module provides an API for interacting with the V8 - * inspector. - * @see [source](https://github.com/nodejs/node/blob/v25.x/lib/inspector.js) - */ -declare module "node:inspector" { - import { EventEmitter } from "node:events"; - /** - * The `inspector.Session` is used for dispatching messages to the V8 inspector - * back-end and receiving message responses and notifications. - */ - class Session extends EventEmitter { - /** - * Create a new instance of the inspector.Session class. - * The inspector session needs to be connected through `session.connect()` before the messages can be dispatched to the inspector backend. - */ - constructor(); - /** - * Connects a session to the inspector back-end. - */ - connect(): void; - /** - * Connects a session to the inspector back-end. - * An exception will be thrown if this API was not called on a Worker thread. - * @since v12.11.0 - */ - connectToMainThread(): void; - /** - * Immediately close the session. All pending message callbacks will be called with an error. - * `session.connect()` will need to be called to be able to send messages again. - * Reconnected session will lose all inspector state, such as enabled agents or configured breakpoints. - */ - disconnect(): void; - } - /** - * Activate inspector on host and port. Equivalent to `node --inspect=[[host:]port]`, but can be done programmatically after node has - * started. - * - * If wait is `true`, will block until a client has connected to the inspect port - * and flow control has been passed to the debugger client. - * - * See the [security warning](https://nodejs.org/docs/latest-v25.x/api/cli.html#warning-binding-inspector-to-a-public-ipport-combination-is-insecure) - * regarding the `host` parameter usage. - * @param port Port to listen on for inspector connections. Defaults to what was specified on the CLI. - * @param host Host to listen on for inspector connections. Defaults to what was specified on the CLI. - * @param wait Block until a client has connected. Defaults to what was specified on the CLI. - * @returns Disposable that calls `inspector.close()`. - */ - function open(port?: number, host?: string, wait?: boolean): Disposable; - /** - * Deactivate the inspector. Blocks until there are no active connections. - */ - function close(): void; - /** - * Return the URL of the active inspector, or `undefined` if there is none. - * - * ```console - * $ node --inspect -p 'inspector.url()' - * Debugger listening on ws://127.0.0.1:9229/166e272e-7a30-4d09-97ce-f1c012b43c34 - * For help, see: https://nodejs.org/en/docs/inspector - * ws://127.0.0.1:9229/166e272e-7a30-4d09-97ce-f1c012b43c34 - * - * $ node --inspect=localhost:3000 -p 'inspector.url()' - * Debugger listening on ws://localhost:3000/51cf8d0e-3c36-4c59-8efd-54519839e56a - * For help, see: https://nodejs.org/en/docs/inspector - * ws://localhost:3000/51cf8d0e-3c36-4c59-8efd-54519839e56a - * - * $ node -p 'inspector.url()' - * undefined - * ``` - */ - function url(): string | undefined; - /** - * Blocks until a client (existing or connected later) has sent `Runtime.runIfWaitingForDebugger` command. - * - * An exception will be thrown if there is no active inspector. - * @since v12.7.0 - */ - function waitForDebugger(): void; - // These methods are exposed by the V8 inspector console API (inspector/v8-console.h). - // The method signatures differ from those of the Node.js console, and are deliberately - // typed permissively. - interface InspectorConsole { - debug(...data: any[]): void; - error(...data: any[]): void; - info(...data: any[]): void; - log(...data: any[]): void; - warn(...data: any[]): void; - dir(...data: any[]): void; - dirxml(...data: any[]): void; - table(...data: any[]): void; - trace(...data: any[]): void; - group(...data: any[]): void; - groupCollapsed(...data: any[]): void; - groupEnd(...data: any[]): void; - clear(...data: any[]): void; - count(label?: any): void; - countReset(label?: any): void; - assert(value?: any, ...data: any[]): void; - profile(label?: any): void; - profileEnd(label?: any): void; - time(label?: any): void; - timeLog(label?: any): void; - timeStamp(label?: any): void; - } - /** - * An object to send messages to the remote inspector console. - * @since v11.0.0 - */ - const console: InspectorConsole; - // DevTools protocol event broadcast methods - namespace Network { - /** - * This feature is only available with the `--experimental-network-inspection` flag enabled. - * - * Broadcasts the `Network.requestWillBeSent` event to connected frontends. This event indicates that - * the application is about to send an HTTP request. - * @since v22.6.0 - */ - function requestWillBeSent(params: RequestWillBeSentEventDataType): void; - /** - * This feature is only available with the `--experimental-network-inspection` flag enabled. - * - * Broadcasts the `Network.dataReceived` event to connected frontends, or buffers the data if - * `Network.streamResourceContent` command was not invoked for the given request yet. - * - * Also enables `Network.getResponseBody` command to retrieve the response data. - * @since v24.2.0 - */ - function dataReceived(params: DataReceivedEventDataType): void; - /** - * This feature is only available with the `--experimental-network-inspection` flag enabled. - * - * Enables `Network.getRequestPostData` command to retrieve the request data. - * @since v24.3.0 - */ - function dataSent(params: unknown): void; - /** - * This feature is only available with the `--experimental-network-inspection` flag enabled. - * - * Broadcasts the `Network.responseReceived` event to connected frontends. This event indicates that - * HTTP response is available. - * @since v22.6.0 - */ - function responseReceived(params: ResponseReceivedEventDataType): void; - /** - * This feature is only available with the `--experimental-network-inspection` flag enabled. - * - * Broadcasts the `Network.loadingFinished` event to connected frontends. This event indicates that - * HTTP request has finished loading. - * @since v22.6.0 - */ - function loadingFinished(params: LoadingFinishedEventDataType): void; - /** - * This feature is only available with the `--experimental-network-inspection` flag enabled. - * - * Broadcasts the `Network.loadingFailed` event to connected frontends. This event indicates that - * HTTP request has failed to load. - * @since v22.7.0 - */ - function loadingFailed(params: LoadingFailedEventDataType): void; - /** - * This feature is only available with the `--experimental-network-inspection` flag enabled. - * - * Broadcasts the `Network.webSocketCreated` event to connected frontends. This event indicates that - * a WebSocket connection has been initiated. - * @since v24.7.0 - */ - function webSocketCreated(params: WebSocketCreatedEventDataType): void; - /** - * This feature is only available with the `--experimental-network-inspection` flag enabled. - * - * Broadcasts the `Network.webSocketHandshakeResponseReceived` event to connected frontends. - * This event indicates that the WebSocket handshake response has been received. - * @since v24.7.0 - */ - function webSocketHandshakeResponseReceived(params: WebSocketHandshakeResponseReceivedEventDataType): void; - /** - * This feature is only available with the `--experimental-network-inspection` flag enabled. - * - * Broadcasts the `Network.webSocketClosed` event to connected frontends. - * This event indicates that a WebSocket connection has been closed. - * @since v24.7.0 - */ - function webSocketClosed(params: WebSocketClosedEventDataType): void; - } - namespace NetworkResources { - /** - * This feature is only available with the `--experimental-inspector-network-resource` flag enabled. - * - * The inspector.NetworkResources.put method is used to provide a response for a loadNetworkResource - * request issued via the Chrome DevTools Protocol (CDP). - * This is typically triggered when a source map is specified by URL, and a DevTools frontend—such as - * Chrome—requests the resource to retrieve the source map. - * - * This method allows developers to predefine the resource content to be served in response to such CDP requests. - * - * ```js - * const inspector = require('node:inspector'); - * // By preemptively calling put to register the resource, a source map can be resolved when - * // a loadNetworkResource request is made from the frontend. - * async function setNetworkResources() { - * const mapUrl = 'http://localhost:3000/dist/app.js.map'; - * const tsUrl = 'http://localhost:3000/src/app.ts'; - * const distAppJsMap = await fetch(mapUrl).then((res) => res.text()); - * const srcAppTs = await fetch(tsUrl).then((res) => res.text()); - * inspector.NetworkResources.put(mapUrl, distAppJsMap); - * inspector.NetworkResources.put(tsUrl, srcAppTs); - * }; - * setNetworkResources().then(() => { - * require('./dist/app'); - * }); - * ``` - * - * For more details, see the official CDP documentation: [Network.loadNetworkResource](https://chromedevtools.github.io/devtools-protocol/tot/Network/#method-loadNetworkResource) - * @since v24.5.0 - * @experimental - */ - function put(url: string, data: string): void; - } -} -declare module "inspector" { - export * from "node:inspector"; -} diff --git a/PBandGraphScaffold/node_modules/@types/node/inspector.generated.d.ts b/PBandGraphScaffold/node_modules/@types/node/inspector.generated.d.ts deleted file mode 100644 index 84c482d..0000000 --- a/PBandGraphScaffold/node_modules/@types/node/inspector.generated.d.ts +++ /dev/null @@ -1,4226 +0,0 @@ -// These definitions are automatically generated by the generate-inspector script. -// Do not edit this file directly. -// See scripts/generate-inspector/README.md for information on how to update the protocol definitions. -// Changes to the module itself should be added to the generator template (scripts/generate-inspector/inspector.d.ts.template). - -declare module "node:inspector" { - interface InspectorNotification { - method: string; - params: T; - } - namespace Schema { - /** - * Description of the protocol domain. - */ - interface Domain { - /** - * Domain name. - */ - name: string; - /** - * Domain version. - */ - version: string; - } - interface GetDomainsReturnType { - /** - * List of supported domains. - */ - domains: Domain[]; - } - } - namespace Runtime { - /** - * Unique script identifier. - */ - type ScriptId = string; - /** - * Unique object identifier. - */ - type RemoteObjectId = string; - /** - * Primitive value which cannot be JSON-stringified. - */ - type UnserializableValue = string; - /** - * Mirror object referencing original JavaScript object. - */ - interface RemoteObject { - /** - * Object type. - */ - type: string; - /** - * Object subtype hint. Specified for object type values only. - */ - subtype?: string | undefined; - /** - * Object class (constructor) name. Specified for object type values only. - */ - className?: string | undefined; - /** - * Remote object value in case of primitive values or JSON values (if it was requested). - */ - value?: any; - /** - * Primitive value which can not be JSON-stringified does not have value, but gets this property. - */ - unserializableValue?: UnserializableValue | undefined; - /** - * String representation of the object. - */ - description?: string | undefined; - /** - * Unique object identifier (for non-primitive values). - */ - objectId?: RemoteObjectId | undefined; - /** - * Preview containing abbreviated property values. Specified for object type values only. - * @experimental - */ - preview?: ObjectPreview | undefined; - /** - * @experimental - */ - customPreview?: CustomPreview | undefined; - } - /** - * @experimental - */ - interface CustomPreview { - header: string; - hasBody: boolean; - formatterObjectId: RemoteObjectId; - bindRemoteObjectFunctionId: RemoteObjectId; - configObjectId?: RemoteObjectId | undefined; - } - /** - * Object containing abbreviated remote object value. - * @experimental - */ - interface ObjectPreview { - /** - * Object type. - */ - type: string; - /** - * Object subtype hint. Specified for object type values only. - */ - subtype?: string | undefined; - /** - * String representation of the object. - */ - description?: string | undefined; - /** - * True iff some of the properties or entries of the original object did not fit. - */ - overflow: boolean; - /** - * List of the properties. - */ - properties: PropertyPreview[]; - /** - * List of the entries. Specified for map and set subtype values only. - */ - entries?: EntryPreview[] | undefined; - } - /** - * @experimental - */ - interface PropertyPreview { - /** - * Property name. - */ - name: string; - /** - * Object type. Accessor means that the property itself is an accessor property. - */ - type: string; - /** - * User-friendly property value string. - */ - value?: string | undefined; - /** - * Nested value preview. - */ - valuePreview?: ObjectPreview | undefined; - /** - * Object subtype hint. Specified for object type values only. - */ - subtype?: string | undefined; - } - /** - * @experimental - */ - interface EntryPreview { - /** - * Preview of the key. Specified for map-like collection entries. - */ - key?: ObjectPreview | undefined; - /** - * Preview of the value. - */ - value: ObjectPreview; - } - /** - * Object property descriptor. - */ - interface PropertyDescriptor { - /** - * Property name or symbol description. - */ - name: string; - /** - * The value associated with the property. - */ - value?: RemoteObject | undefined; - /** - * True if the value associated with the property may be changed (data descriptors only). - */ - writable?: boolean | undefined; - /** - * A function which serves as a getter for the property, or undefined if there is no getter (accessor descriptors only). - */ - get?: RemoteObject | undefined; - /** - * A function which serves as a setter for the property, or undefined if there is no setter (accessor descriptors only). - */ - set?: RemoteObject | undefined; - /** - * True if the type of this property descriptor may be changed and if the property may be deleted from the corresponding object. - */ - configurable: boolean; - /** - * True if this property shows up during enumeration of the properties on the corresponding object. - */ - enumerable: boolean; - /** - * True if the result was thrown during the evaluation. - */ - wasThrown?: boolean | undefined; - /** - * True if the property is owned for the object. - */ - isOwn?: boolean | undefined; - /** - * Property symbol object, if the property is of the symbol type. - */ - symbol?: RemoteObject | undefined; - } - /** - * Object internal property descriptor. This property isn't normally visible in JavaScript code. - */ - interface InternalPropertyDescriptor { - /** - * Conventional property name. - */ - name: string; - /** - * The value associated with the property. - */ - value?: RemoteObject | undefined; - } - /** - * Represents function call argument. Either remote object id objectId, primitive value, unserializable primitive value or neither of (for undefined) them should be specified. - */ - interface CallArgument { - /** - * Primitive value or serializable javascript object. - */ - value?: any; - /** - * Primitive value which can not be JSON-stringified. - */ - unserializableValue?: UnserializableValue | undefined; - /** - * Remote object handle. - */ - objectId?: RemoteObjectId | undefined; - } - /** - * Id of an execution context. - */ - type ExecutionContextId = number; - /** - * Description of an isolated world. - */ - interface ExecutionContextDescription { - /** - * Unique id of the execution context. It can be used to specify in which execution context script evaluation should be performed. - */ - id: ExecutionContextId; - /** - * Execution context origin. - */ - origin: string; - /** - * Human readable name describing given context. - */ - name: string; - /** - * Embedder-specific auxiliary data. - */ - auxData?: object | undefined; - } - /** - * Detailed information about exception (or error) that was thrown during script compilation or execution. - */ - interface ExceptionDetails { - /** - * Exception id. - */ - exceptionId: number; - /** - * Exception text, which should be used together with exception object when available. - */ - text: string; - /** - * Line number of the exception location (0-based). - */ - lineNumber: number; - /** - * Column number of the exception location (0-based). - */ - columnNumber: number; - /** - * Script ID of the exception location. - */ - scriptId?: ScriptId | undefined; - /** - * URL of the exception location, to be used when the script was not reported. - */ - url?: string | undefined; - /** - * JavaScript stack trace if available. - */ - stackTrace?: StackTrace | undefined; - /** - * Exception object if available. - */ - exception?: RemoteObject | undefined; - /** - * Identifier of the context where exception happened. - */ - executionContextId?: ExecutionContextId | undefined; - } - /** - * Number of milliseconds since epoch. - */ - type Timestamp = number; - /** - * Stack entry for runtime errors and assertions. - */ - interface CallFrame { - /** - * JavaScript function name. - */ - functionName: string; - /** - * JavaScript script id. - */ - scriptId: ScriptId; - /** - * JavaScript script name or url. - */ - url: string; - /** - * JavaScript script line number (0-based). - */ - lineNumber: number; - /** - * JavaScript script column number (0-based). - */ - columnNumber: number; - } - /** - * Call frames for assertions or error messages. - */ - interface StackTrace { - /** - * String label of this stack trace. For async traces this may be a name of the function that initiated the async call. - */ - description?: string | undefined; - /** - * JavaScript function name. - */ - callFrames: CallFrame[]; - /** - * Asynchronous JavaScript stack trace that preceded this stack, if available. - */ - parent?: StackTrace | undefined; - /** - * Asynchronous JavaScript stack trace that preceded this stack, if available. - * @experimental - */ - parentId?: StackTraceId | undefined; - } - /** - * Unique identifier of current debugger. - * @experimental - */ - type UniqueDebuggerId = string; - /** - * If debuggerId is set stack trace comes from another debugger and can be resolved there. This allows to track cross-debugger calls. See Runtime.StackTrace and Debugger.paused for usages. - * @experimental - */ - interface StackTraceId { - id: string; - debuggerId?: UniqueDebuggerId | undefined; - } - interface EvaluateParameterType { - /** - * Expression to evaluate. - */ - expression: string; - /** - * Symbolic group name that can be used to release multiple objects. - */ - objectGroup?: string | undefined; - /** - * Determines whether Command Line API should be available during the evaluation. - */ - includeCommandLineAPI?: boolean | undefined; - /** - * In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides setPauseOnException state. - */ - silent?: boolean | undefined; - /** - * Specifies in which execution context to perform evaluation. If the parameter is omitted the evaluation will be performed in the context of the inspected page. - */ - contextId?: ExecutionContextId | undefined; - /** - * Whether the result is expected to be a JSON object that should be sent by value. - */ - returnByValue?: boolean | undefined; - /** - * Whether preview should be generated for the result. - * @experimental - */ - generatePreview?: boolean | undefined; - /** - * Whether execution should be treated as initiated by user in the UI. - */ - userGesture?: boolean | undefined; - /** - * Whether execution should await for resulting value and return once awaited promise is resolved. - */ - awaitPromise?: boolean | undefined; - } - interface AwaitPromiseParameterType { - /** - * Identifier of the promise. - */ - promiseObjectId: RemoteObjectId; - /** - * Whether the result is expected to be a JSON object that should be sent by value. - */ - returnByValue?: boolean | undefined; - /** - * Whether preview should be generated for the result. - */ - generatePreview?: boolean | undefined; - } - interface CallFunctionOnParameterType { - /** - * Declaration of the function to call. - */ - functionDeclaration: string; - /** - * Identifier of the object to call function on. Either objectId or executionContextId should be specified. - */ - objectId?: RemoteObjectId | undefined; - /** - * Call arguments. All call arguments must belong to the same JavaScript world as the target object. - */ - arguments?: CallArgument[] | undefined; - /** - * In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides setPauseOnException state. - */ - silent?: boolean | undefined; - /** - * Whether the result is expected to be a JSON object which should be sent by value. - */ - returnByValue?: boolean | undefined; - /** - * Whether preview should be generated for the result. - * @experimental - */ - generatePreview?: boolean | undefined; - /** - * Whether execution should be treated as initiated by user in the UI. - */ - userGesture?: boolean | undefined; - /** - * Whether execution should await for resulting value and return once awaited promise is resolved. - */ - awaitPromise?: boolean | undefined; - /** - * Specifies execution context which global object will be used to call function on. Either executionContextId or objectId should be specified. - */ - executionContextId?: ExecutionContextId | undefined; - /** - * Symbolic group name that can be used to release multiple objects. If objectGroup is not specified and objectId is, objectGroup will be inherited from object. - */ - objectGroup?: string | undefined; - } - interface GetPropertiesParameterType { - /** - * Identifier of the object to return properties for. - */ - objectId: RemoteObjectId; - /** - * If true, returns properties belonging only to the element itself, not to its prototype chain. - */ - ownProperties?: boolean | undefined; - /** - * If true, returns accessor properties (with getter/setter) only; internal properties are not returned either. - * @experimental - */ - accessorPropertiesOnly?: boolean | undefined; - /** - * Whether preview should be generated for the results. - * @experimental - */ - generatePreview?: boolean | undefined; - } - interface ReleaseObjectParameterType { - /** - * Identifier of the object to release. - */ - objectId: RemoteObjectId; - } - interface ReleaseObjectGroupParameterType { - /** - * Symbolic object group name. - */ - objectGroup: string; - } - interface SetCustomObjectFormatterEnabledParameterType { - enabled: boolean; - } - interface CompileScriptParameterType { - /** - * Expression to compile. - */ - expression: string; - /** - * Source url to be set for the script. - */ - sourceURL: string; - /** - * Specifies whether the compiled script should be persisted. - */ - persistScript: boolean; - /** - * Specifies in which execution context to perform script run. If the parameter is omitted the evaluation will be performed in the context of the inspected page. - */ - executionContextId?: ExecutionContextId | undefined; - } - interface RunScriptParameterType { - /** - * Id of the script to run. - */ - scriptId: ScriptId; - /** - * Specifies in which execution context to perform script run. If the parameter is omitted the evaluation will be performed in the context of the inspected page. - */ - executionContextId?: ExecutionContextId | undefined; - /** - * Symbolic group name that can be used to release multiple objects. - */ - objectGroup?: string | undefined; - /** - * In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides setPauseOnException state. - */ - silent?: boolean | undefined; - /** - * Determines whether Command Line API should be available during the evaluation. - */ - includeCommandLineAPI?: boolean | undefined; - /** - * Whether the result is expected to be a JSON object which should be sent by value. - */ - returnByValue?: boolean | undefined; - /** - * Whether preview should be generated for the result. - */ - generatePreview?: boolean | undefined; - /** - * Whether execution should await for resulting value and return once awaited promise is resolved. - */ - awaitPromise?: boolean | undefined; - } - interface QueryObjectsParameterType { - /** - * Identifier of the prototype to return objects for. - */ - prototypeObjectId: RemoteObjectId; - } - interface GlobalLexicalScopeNamesParameterType { - /** - * Specifies in which execution context to lookup global scope variables. - */ - executionContextId?: ExecutionContextId | undefined; - } - interface EvaluateReturnType { - /** - * Evaluation result. - */ - result: RemoteObject; - /** - * Exception details. - */ - exceptionDetails?: ExceptionDetails | undefined; - } - interface AwaitPromiseReturnType { - /** - * Promise result. Will contain rejected value if promise was rejected. - */ - result: RemoteObject; - /** - * Exception details if stack strace is available. - */ - exceptionDetails?: ExceptionDetails | undefined; - } - interface CallFunctionOnReturnType { - /** - * Call result. - */ - result: RemoteObject; - /** - * Exception details. - */ - exceptionDetails?: ExceptionDetails | undefined; - } - interface GetPropertiesReturnType { - /** - * Object properties. - */ - result: PropertyDescriptor[]; - /** - * Internal object properties (only of the element itself). - */ - internalProperties?: InternalPropertyDescriptor[] | undefined; - /** - * Exception details. - */ - exceptionDetails?: ExceptionDetails | undefined; - } - interface CompileScriptReturnType { - /** - * Id of the script. - */ - scriptId?: ScriptId | undefined; - /** - * Exception details. - */ - exceptionDetails?: ExceptionDetails | undefined; - } - interface RunScriptReturnType { - /** - * Run result. - */ - result: RemoteObject; - /** - * Exception details. - */ - exceptionDetails?: ExceptionDetails | undefined; - } - interface QueryObjectsReturnType { - /** - * Array with objects. - */ - objects: RemoteObject; - } - interface GlobalLexicalScopeNamesReturnType { - names: string[]; - } - interface ExecutionContextCreatedEventDataType { - /** - * A newly created execution context. - */ - context: ExecutionContextDescription; - } - interface ExecutionContextDestroyedEventDataType { - /** - * Id of the destroyed context - */ - executionContextId: ExecutionContextId; - } - interface ExceptionThrownEventDataType { - /** - * Timestamp of the exception. - */ - timestamp: Timestamp; - exceptionDetails: ExceptionDetails; - } - interface ExceptionRevokedEventDataType { - /** - * Reason describing why exception was revoked. - */ - reason: string; - /** - * The id of revoked exception, as reported in exceptionThrown. - */ - exceptionId: number; - } - interface ConsoleAPICalledEventDataType { - /** - * Type of the call. - */ - type: string; - /** - * Call arguments. - */ - args: RemoteObject[]; - /** - * Identifier of the context where the call was made. - */ - executionContextId: ExecutionContextId; - /** - * Call timestamp. - */ - timestamp: Timestamp; - /** - * Stack trace captured when the call was made. - */ - stackTrace?: StackTrace | undefined; - /** - * Console context descriptor for calls on non-default console context (not console.*): 'anonymous#unique-logger-id' for call on unnamed context, 'name#unique-logger-id' for call on named context. - * @experimental - */ - context?: string | undefined; - } - interface InspectRequestedEventDataType { - object: RemoteObject; - hints: object; - } - } - namespace Debugger { - /** - * Breakpoint identifier. - */ - type BreakpointId = string; - /** - * Call frame identifier. - */ - type CallFrameId = string; - /** - * Location in the source code. - */ - interface Location { - /** - * Script identifier as reported in the Debugger.scriptParsed. - */ - scriptId: Runtime.ScriptId; - /** - * Line number in the script (0-based). - */ - lineNumber: number; - /** - * Column number in the script (0-based). - */ - columnNumber?: number | undefined; - } - /** - * Location in the source code. - * @experimental - */ - interface ScriptPosition { - lineNumber: number; - columnNumber: number; - } - /** - * JavaScript call frame. Array of call frames form the call stack. - */ - interface CallFrame { - /** - * Call frame identifier. This identifier is only valid while the virtual machine is paused. - */ - callFrameId: CallFrameId; - /** - * Name of the JavaScript function called on this call frame. - */ - functionName: string; - /** - * Location in the source code. - */ - functionLocation?: Location | undefined; - /** - * Location in the source code. - */ - location: Location; - /** - * JavaScript script name or url. - */ - url: string; - /** - * Scope chain for this call frame. - */ - scopeChain: Scope[]; - /** - * this object for this call frame. - */ - this: Runtime.RemoteObject; - /** - * The value being returned, if the function is at return point. - */ - returnValue?: Runtime.RemoteObject | undefined; - } - /** - * Scope description. - */ - interface Scope { - /** - * Scope type. - */ - type: string; - /** - * Object representing the scope. For global and with scopes it represents the actual object; for the rest of the scopes, it is artificial transient object enumerating scope variables as its properties. - */ - object: Runtime.RemoteObject; - name?: string | undefined; - /** - * Location in the source code where scope starts - */ - startLocation?: Location | undefined; - /** - * Location in the source code where scope ends - */ - endLocation?: Location | undefined; - } - /** - * Search match for resource. - */ - interface SearchMatch { - /** - * Line number in resource content. - */ - lineNumber: number; - /** - * Line with match content. - */ - lineContent: string; - } - interface BreakLocation { - /** - * Script identifier as reported in the Debugger.scriptParsed. - */ - scriptId: Runtime.ScriptId; - /** - * Line number in the script (0-based). - */ - lineNumber: number; - /** - * Column number in the script (0-based). - */ - columnNumber?: number | undefined; - type?: string | undefined; - } - interface SetBreakpointsActiveParameterType { - /** - * New value for breakpoints active state. - */ - active: boolean; - } - interface SetSkipAllPausesParameterType { - /** - * New value for skip pauses state. - */ - skip: boolean; - } - interface SetBreakpointByUrlParameterType { - /** - * Line number to set breakpoint at. - */ - lineNumber: number; - /** - * URL of the resources to set breakpoint on. - */ - url?: string | undefined; - /** - * Regex pattern for the URLs of the resources to set breakpoints on. Either url or urlRegex must be specified. - */ - urlRegex?: string | undefined; - /** - * Script hash of the resources to set breakpoint on. - */ - scriptHash?: string | undefined; - /** - * Offset in the line to set breakpoint at. - */ - columnNumber?: number | undefined; - /** - * Expression to use as a breakpoint condition. When specified, debugger will only stop on the breakpoint if this expression evaluates to true. - */ - condition?: string | undefined; - } - interface SetBreakpointParameterType { - /** - * Location to set breakpoint in. - */ - location: Location; - /** - * Expression to use as a breakpoint condition. When specified, debugger will only stop on the breakpoint if this expression evaluates to true. - */ - condition?: string | undefined; - } - interface RemoveBreakpointParameterType { - breakpointId: BreakpointId; - } - interface GetPossibleBreakpointsParameterType { - /** - * Start of range to search possible breakpoint locations in. - */ - start: Location; - /** - * End of range to search possible breakpoint locations in (excluding). When not specified, end of scripts is used as end of range. - */ - end?: Location | undefined; - /** - * Only consider locations which are in the same (non-nested) function as start. - */ - restrictToFunction?: boolean | undefined; - } - interface ContinueToLocationParameterType { - /** - * Location to continue to. - */ - location: Location; - targetCallFrames?: string | undefined; - } - interface PauseOnAsyncCallParameterType { - /** - * Debugger will pause when async call with given stack trace is started. - */ - parentStackTraceId: Runtime.StackTraceId; - } - interface StepIntoParameterType { - /** - * Debugger will issue additional Debugger.paused notification if any async task is scheduled before next pause. - * @experimental - */ - breakOnAsyncCall?: boolean | undefined; - } - interface GetStackTraceParameterType { - stackTraceId: Runtime.StackTraceId; - } - interface SearchInContentParameterType { - /** - * Id of the script to search in. - */ - scriptId: Runtime.ScriptId; - /** - * String to search for. - */ - query: string; - /** - * If true, search is case sensitive. - */ - caseSensitive?: boolean | undefined; - /** - * If true, treats string parameter as regex. - */ - isRegex?: boolean | undefined; - } - interface SetScriptSourceParameterType { - /** - * Id of the script to edit. - */ - scriptId: Runtime.ScriptId; - /** - * New content of the script. - */ - scriptSource: string; - /** - * If true the change will not actually be applied. Dry run may be used to get result description without actually modifying the code. - */ - dryRun?: boolean | undefined; - } - interface RestartFrameParameterType { - /** - * Call frame identifier to evaluate on. - */ - callFrameId: CallFrameId; - } - interface GetScriptSourceParameterType { - /** - * Id of the script to get source for. - */ - scriptId: Runtime.ScriptId; - } - interface SetPauseOnExceptionsParameterType { - /** - * Pause on exceptions mode. - */ - state: string; - } - interface EvaluateOnCallFrameParameterType { - /** - * Call frame identifier to evaluate on. - */ - callFrameId: CallFrameId; - /** - * Expression to evaluate. - */ - expression: string; - /** - * String object group name to put result into (allows rapid releasing resulting object handles using releaseObjectGroup). - */ - objectGroup?: string | undefined; - /** - * Specifies whether command line API should be available to the evaluated expression, defaults to false. - */ - includeCommandLineAPI?: boolean | undefined; - /** - * In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides setPauseOnException state. - */ - silent?: boolean | undefined; - /** - * Whether the result is expected to be a JSON object that should be sent by value. - */ - returnByValue?: boolean | undefined; - /** - * Whether preview should be generated for the result. - * @experimental - */ - generatePreview?: boolean | undefined; - /** - * Whether to throw an exception if side effect cannot be ruled out during evaluation. - */ - throwOnSideEffect?: boolean | undefined; - } - interface SetVariableValueParameterType { - /** - * 0-based number of scope as was listed in scope chain. Only 'local', 'closure' and 'catch' scope types are allowed. Other scopes could be manipulated manually. - */ - scopeNumber: number; - /** - * Variable name. - */ - variableName: string; - /** - * New variable value. - */ - newValue: Runtime.CallArgument; - /** - * Id of callframe that holds variable. - */ - callFrameId: CallFrameId; - } - interface SetReturnValueParameterType { - /** - * New return value. - */ - newValue: Runtime.CallArgument; - } - interface SetAsyncCallStackDepthParameterType { - /** - * Maximum depth of async call stacks. Setting to 0 will effectively disable collecting async call stacks (default). - */ - maxDepth: number; - } - interface SetBlackboxPatternsParameterType { - /** - * Array of regexps that will be used to check script url for blackbox state. - */ - patterns: string[]; - } - interface SetBlackboxedRangesParameterType { - /** - * Id of the script. - */ - scriptId: Runtime.ScriptId; - positions: ScriptPosition[]; - } - interface EnableReturnType { - /** - * Unique identifier of the debugger. - * @experimental - */ - debuggerId: Runtime.UniqueDebuggerId; - } - interface SetBreakpointByUrlReturnType { - /** - * Id of the created breakpoint for further reference. - */ - breakpointId: BreakpointId; - /** - * List of the locations this breakpoint resolved into upon addition. - */ - locations: Location[]; - } - interface SetBreakpointReturnType { - /** - * Id of the created breakpoint for further reference. - */ - breakpointId: BreakpointId; - /** - * Location this breakpoint resolved into. - */ - actualLocation: Location; - } - interface GetPossibleBreakpointsReturnType { - /** - * List of the possible breakpoint locations. - */ - locations: BreakLocation[]; - } - interface GetStackTraceReturnType { - stackTrace: Runtime.StackTrace; - } - interface SearchInContentReturnType { - /** - * List of search matches. - */ - result: SearchMatch[]; - } - interface SetScriptSourceReturnType { - /** - * New stack trace in case editing has happened while VM was stopped. - */ - callFrames?: CallFrame[] | undefined; - /** - * Whether current call stack was modified after applying the changes. - */ - stackChanged?: boolean | undefined; - /** - * Async stack trace, if any. - */ - asyncStackTrace?: Runtime.StackTrace | undefined; - /** - * Async stack trace, if any. - * @experimental - */ - asyncStackTraceId?: Runtime.StackTraceId | undefined; - /** - * Exception details if any. - */ - exceptionDetails?: Runtime.ExceptionDetails | undefined; - } - interface RestartFrameReturnType { - /** - * New stack trace. - */ - callFrames: CallFrame[]; - /** - * Async stack trace, if any. - */ - asyncStackTrace?: Runtime.StackTrace | undefined; - /** - * Async stack trace, if any. - * @experimental - */ - asyncStackTraceId?: Runtime.StackTraceId | undefined; - } - interface GetScriptSourceReturnType { - /** - * Script source. - */ - scriptSource: string; - } - interface EvaluateOnCallFrameReturnType { - /** - * Object wrapper for the evaluation result. - */ - result: Runtime.RemoteObject; - /** - * Exception details. - */ - exceptionDetails?: Runtime.ExceptionDetails | undefined; - } - interface ScriptParsedEventDataType { - /** - * Identifier of the script parsed. - */ - scriptId: Runtime.ScriptId; - /** - * URL or name of the script parsed (if any). - */ - url: string; - /** - * Line offset of the script within the resource with given URL (for script tags). - */ - startLine: number; - /** - * Column offset of the script within the resource with given URL. - */ - startColumn: number; - /** - * Last line of the script. - */ - endLine: number; - /** - * Length of the last line of the script. - */ - endColumn: number; - /** - * Specifies script creation context. - */ - executionContextId: Runtime.ExecutionContextId; - /** - * Content hash of the script. - */ - hash: string; - /** - * Embedder-specific auxiliary data. - */ - executionContextAuxData?: object | undefined; - /** - * True, if this script is generated as a result of the live edit operation. - * @experimental - */ - isLiveEdit?: boolean | undefined; - /** - * URL of source map associated with script (if any). - */ - sourceMapURL?: string | undefined; - /** - * True, if this script has sourceURL. - */ - hasSourceURL?: boolean | undefined; - /** - * True, if this script is ES6 module. - */ - isModule?: boolean | undefined; - /** - * This script length. - */ - length?: number | undefined; - /** - * JavaScript top stack frame of where the script parsed event was triggered if available. - * @experimental - */ - stackTrace?: Runtime.StackTrace | undefined; - } - interface ScriptFailedToParseEventDataType { - /** - * Identifier of the script parsed. - */ - scriptId: Runtime.ScriptId; - /** - * URL or name of the script parsed (if any). - */ - url: string; - /** - * Line offset of the script within the resource with given URL (for script tags). - */ - startLine: number; - /** - * Column offset of the script within the resource with given URL. - */ - startColumn: number; - /** - * Last line of the script. - */ - endLine: number; - /** - * Length of the last line of the script. - */ - endColumn: number; - /** - * Specifies script creation context. - */ - executionContextId: Runtime.ExecutionContextId; - /** - * Content hash of the script. - */ - hash: string; - /** - * Embedder-specific auxiliary data. - */ - executionContextAuxData?: object | undefined; - /** - * URL of source map associated with script (if any). - */ - sourceMapURL?: string | undefined; - /** - * True, if this script has sourceURL. - */ - hasSourceURL?: boolean | undefined; - /** - * True, if this script is ES6 module. - */ - isModule?: boolean | undefined; - /** - * This script length. - */ - length?: number | undefined; - /** - * JavaScript top stack frame of where the script parsed event was triggered if available. - * @experimental - */ - stackTrace?: Runtime.StackTrace | undefined; - } - interface BreakpointResolvedEventDataType { - /** - * Breakpoint unique identifier. - */ - breakpointId: BreakpointId; - /** - * Actual breakpoint location. - */ - location: Location; - } - interface PausedEventDataType { - /** - * Call stack the virtual machine stopped on. - */ - callFrames: CallFrame[]; - /** - * Pause reason. - */ - reason: string; - /** - * Object containing break-specific auxiliary properties. - */ - data?: object | undefined; - /** - * Hit breakpoints IDs - */ - hitBreakpoints?: string[] | undefined; - /** - * Async stack trace, if any. - */ - asyncStackTrace?: Runtime.StackTrace | undefined; - /** - * Async stack trace, if any. - * @experimental - */ - asyncStackTraceId?: Runtime.StackTraceId | undefined; - /** - * Just scheduled async call will have this stack trace as parent stack during async execution. This field is available only after Debugger.stepInto call with breakOnAsynCall flag. - * @experimental - */ - asyncCallStackTraceId?: Runtime.StackTraceId | undefined; - } - } - namespace Console { - /** - * Console message. - */ - interface ConsoleMessage { - /** - * Message source. - */ - source: string; - /** - * Message severity. - */ - level: string; - /** - * Message text. - */ - text: string; - /** - * URL of the message origin. - */ - url?: string | undefined; - /** - * Line number in the resource that generated this message (1-based). - */ - line?: number | undefined; - /** - * Column number in the resource that generated this message (1-based). - */ - column?: number | undefined; - } - interface MessageAddedEventDataType { - /** - * Console message that has been added. - */ - message: ConsoleMessage; - } - } - namespace Profiler { - /** - * Profile node. Holds callsite information, execution statistics and child nodes. - */ - interface ProfileNode { - /** - * Unique id of the node. - */ - id: number; - /** - * Function location. - */ - callFrame: Runtime.CallFrame; - /** - * Number of samples where this node was on top of the call stack. - */ - hitCount?: number | undefined; - /** - * Child node ids. - */ - children?: number[] | undefined; - /** - * The reason of being not optimized. The function may be deoptimized or marked as don't optimize. - */ - deoptReason?: string | undefined; - /** - * An array of source position ticks. - */ - positionTicks?: PositionTickInfo[] | undefined; - } - /** - * Profile. - */ - interface Profile { - /** - * The list of profile nodes. First item is the root node. - */ - nodes: ProfileNode[]; - /** - * Profiling start timestamp in microseconds. - */ - startTime: number; - /** - * Profiling end timestamp in microseconds. - */ - endTime: number; - /** - * Ids of samples top nodes. - */ - samples?: number[] | undefined; - /** - * Time intervals between adjacent samples in microseconds. The first delta is relative to the profile startTime. - */ - timeDeltas?: number[] | undefined; - } - /** - * Specifies a number of samples attributed to a certain source position. - */ - interface PositionTickInfo { - /** - * Source line number (1-based). - */ - line: number; - /** - * Number of samples attributed to the source line. - */ - ticks: number; - } - /** - * Coverage data for a source range. - */ - interface CoverageRange { - /** - * JavaScript script source offset for the range start. - */ - startOffset: number; - /** - * JavaScript script source offset for the range end. - */ - endOffset: number; - /** - * Collected execution count of the source range. - */ - count: number; - } - /** - * Coverage data for a JavaScript function. - */ - interface FunctionCoverage { - /** - * JavaScript function name. - */ - functionName: string; - /** - * Source ranges inside the function with coverage data. - */ - ranges: CoverageRange[]; - /** - * Whether coverage data for this function has block granularity. - */ - isBlockCoverage: boolean; - } - /** - * Coverage data for a JavaScript script. - */ - interface ScriptCoverage { - /** - * JavaScript script id. - */ - scriptId: Runtime.ScriptId; - /** - * JavaScript script name or url. - */ - url: string; - /** - * Functions contained in the script that has coverage data. - */ - functions: FunctionCoverage[]; - } - interface SetSamplingIntervalParameterType { - /** - * New sampling interval in microseconds. - */ - interval: number; - } - interface StartPreciseCoverageParameterType { - /** - * Collect accurate call counts beyond simple 'covered' or 'not covered'. - */ - callCount?: boolean | undefined; - /** - * Collect block-based coverage. - */ - detailed?: boolean | undefined; - } - interface StopReturnType { - /** - * Recorded profile. - */ - profile: Profile; - } - interface TakePreciseCoverageReturnType { - /** - * Coverage data for the current isolate. - */ - result: ScriptCoverage[]; - } - interface GetBestEffortCoverageReturnType { - /** - * Coverage data for the current isolate. - */ - result: ScriptCoverage[]; - } - interface ConsoleProfileStartedEventDataType { - id: string; - /** - * Location of console.profile(). - */ - location: Debugger.Location; - /** - * Profile title passed as an argument to console.profile(). - */ - title?: string | undefined; - } - interface ConsoleProfileFinishedEventDataType { - id: string; - /** - * Location of console.profileEnd(). - */ - location: Debugger.Location; - profile: Profile; - /** - * Profile title passed as an argument to console.profile(). - */ - title?: string | undefined; - } - } - namespace HeapProfiler { - /** - * Heap snapshot object id. - */ - type HeapSnapshotObjectId = string; - /** - * Sampling Heap Profile node. Holds callsite information, allocation statistics and child nodes. - */ - interface SamplingHeapProfileNode { - /** - * Function location. - */ - callFrame: Runtime.CallFrame; - /** - * Allocations size in bytes for the node excluding children. - */ - selfSize: number; - /** - * Child nodes. - */ - children: SamplingHeapProfileNode[]; - } - /** - * Profile. - */ - interface SamplingHeapProfile { - head: SamplingHeapProfileNode; - } - interface StartTrackingHeapObjectsParameterType { - trackAllocations?: boolean | undefined; - } - interface StopTrackingHeapObjectsParameterType { - /** - * If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken when the tracking is stopped. - */ - reportProgress?: boolean | undefined; - } - interface TakeHeapSnapshotParameterType { - /** - * If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken. - */ - reportProgress?: boolean | undefined; - } - interface GetObjectByHeapObjectIdParameterType { - objectId: HeapSnapshotObjectId; - /** - * Symbolic group name that can be used to release multiple objects. - */ - objectGroup?: string | undefined; - } - interface AddInspectedHeapObjectParameterType { - /** - * Heap snapshot object id to be accessible by means of $x command line API. - */ - heapObjectId: HeapSnapshotObjectId; - } - interface GetHeapObjectIdParameterType { - /** - * Identifier of the object to get heap object id for. - */ - objectId: Runtime.RemoteObjectId; - } - interface StartSamplingParameterType { - /** - * Average sample interval in bytes. Poisson distribution is used for the intervals. The default value is 32768 bytes. - */ - samplingInterval?: number | undefined; - } - interface GetObjectByHeapObjectIdReturnType { - /** - * Evaluation result. - */ - result: Runtime.RemoteObject; - } - interface GetHeapObjectIdReturnType { - /** - * Id of the heap snapshot object corresponding to the passed remote object id. - */ - heapSnapshotObjectId: HeapSnapshotObjectId; - } - interface StopSamplingReturnType { - /** - * Recorded sampling heap profile. - */ - profile: SamplingHeapProfile; - } - interface GetSamplingProfileReturnType { - /** - * Return the sampling profile being collected. - */ - profile: SamplingHeapProfile; - } - interface AddHeapSnapshotChunkEventDataType { - chunk: string; - } - interface ReportHeapSnapshotProgressEventDataType { - done: number; - total: number; - finished?: boolean | undefined; - } - interface LastSeenObjectIdEventDataType { - lastSeenObjectId: number; - timestamp: number; - } - interface HeapStatsUpdateEventDataType { - /** - * An array of triplets. Each triplet describes a fragment. The first integer is the fragment index, the second integer is a total count of objects for the fragment, the third integer is a total size of the objects for the fragment. - */ - statsUpdate: number[]; - } - } - namespace NodeTracing { - interface TraceConfig { - /** - * Controls how the trace buffer stores data. - */ - recordMode?: string | undefined; - /** - * Included category filters. - */ - includedCategories: string[]; - } - interface StartParameterType { - traceConfig: TraceConfig; - } - interface GetCategoriesReturnType { - /** - * A list of supported tracing categories. - */ - categories: string[]; - } - interface DataCollectedEventDataType { - value: object[]; - } - } - namespace NodeWorker { - type WorkerID = string; - /** - * Unique identifier of attached debugging session. - */ - type SessionID = string; - interface WorkerInfo { - workerId: WorkerID; - type: string; - title: string; - url: string; - } - interface SendMessageToWorkerParameterType { - message: string; - /** - * Identifier of the session. - */ - sessionId: SessionID; - } - interface EnableParameterType { - /** - * Whether to new workers should be paused until the frontend sends `Runtime.runIfWaitingForDebugger` - * message to run them. - */ - waitForDebuggerOnStart: boolean; - } - interface DetachParameterType { - sessionId: SessionID; - } - interface AttachedToWorkerEventDataType { - /** - * Identifier assigned to the session used to send/receive messages. - */ - sessionId: SessionID; - workerInfo: WorkerInfo; - waitingForDebugger: boolean; - } - interface DetachedFromWorkerEventDataType { - /** - * Detached session identifier. - */ - sessionId: SessionID; - } - interface ReceivedMessageFromWorkerEventDataType { - /** - * Identifier of a session which sends a message. - */ - sessionId: SessionID; - message: string; - } - } - namespace Network { - /** - * Resource type as it was perceived by the rendering engine. - */ - type ResourceType = string; - /** - * Unique request identifier. - */ - type RequestId = string; - /** - * UTC time in seconds, counted from January 1, 1970. - */ - type TimeSinceEpoch = number; - /** - * Monotonically increasing time in seconds since an arbitrary point in the past. - */ - type MonotonicTime = number; - /** - * Information about the request initiator. - */ - interface Initiator { - /** - * Type of this initiator. - */ - type: string; - /** - * Initiator JavaScript stack trace, set for Script only. - * Requires the Debugger domain to be enabled. - */ - stack?: Runtime.StackTrace | undefined; - /** - * Initiator URL, set for Parser type or for Script type (when script is importing module) or for SignedExchange type. - */ - url?: string | undefined; - /** - * Initiator line number, set for Parser type or for Script type (when script is importing - * module) (0-based). - */ - lineNumber?: number | undefined; - /** - * Initiator column number, set for Parser type or for Script type (when script is importing - * module) (0-based). - */ - columnNumber?: number | undefined; - /** - * Set if another request triggered this request (e.g. preflight). - */ - requestId?: RequestId | undefined; - } - /** - * HTTP request data. - */ - interface Request { - url: string; - method: string; - headers: Headers; - hasPostData: boolean; - } - /** - * HTTP response data. - */ - interface Response { - url: string; - status: number; - statusText: string; - headers: Headers; - mimeType: string; - charset: string; - } - /** - * Request / response headers as keys / values of JSON object. - */ - interface Headers { - } - interface LoadNetworkResourcePageResult { - success: boolean; - stream?: IO.StreamHandle | undefined; - } - /** - * WebSocket response data. - */ - interface WebSocketResponse { - /** - * HTTP response status code. - */ - status: number; - /** - * HTTP response status text. - */ - statusText: string; - /** - * HTTP response headers. - */ - headers: Headers; - } - interface GetRequestPostDataParameterType { - /** - * Identifier of the network request to get content for. - */ - requestId: RequestId; - } - interface GetResponseBodyParameterType { - /** - * Identifier of the network request to get content for. - */ - requestId: RequestId; - } - interface StreamResourceContentParameterType { - /** - * Identifier of the request to stream. - */ - requestId: RequestId; - } - interface LoadNetworkResourceParameterType { - /** - * URL of the resource to get content for. - */ - url: string; - } - interface GetRequestPostDataReturnType { - /** - * Request body string, omitting files from multipart requests - */ - postData: string; - } - interface GetResponseBodyReturnType { - /** - * Response body. - */ - body: string; - /** - * True, if content was sent as base64. - */ - base64Encoded: boolean; - } - interface StreamResourceContentReturnType { - /** - * Data that has been buffered until streaming is enabled. - */ - bufferedData: string; - } - interface LoadNetworkResourceReturnType { - resource: LoadNetworkResourcePageResult; - } - interface RequestWillBeSentEventDataType { - /** - * Request identifier. - */ - requestId: RequestId; - /** - * Request data. - */ - request: Request; - /** - * Request initiator. - */ - initiator: Initiator; - /** - * Timestamp. - */ - timestamp: MonotonicTime; - /** - * Timestamp. - */ - wallTime: TimeSinceEpoch; - } - interface ResponseReceivedEventDataType { - /** - * Request identifier. - */ - requestId: RequestId; - /** - * Timestamp. - */ - timestamp: MonotonicTime; - /** - * Resource type. - */ - type: ResourceType; - /** - * Response data. - */ - response: Response; - } - interface LoadingFailedEventDataType { - /** - * Request identifier. - */ - requestId: RequestId; - /** - * Timestamp. - */ - timestamp: MonotonicTime; - /** - * Resource type. - */ - type: ResourceType; - /** - * Error message. - */ - errorText: string; - } - interface LoadingFinishedEventDataType { - /** - * Request identifier. - */ - requestId: RequestId; - /** - * Timestamp. - */ - timestamp: MonotonicTime; - } - interface DataReceivedEventDataType { - /** - * Request identifier. - */ - requestId: RequestId; - /** - * Timestamp. - */ - timestamp: MonotonicTime; - /** - * Data chunk length. - */ - dataLength: number; - /** - * Actual bytes received (might be less than dataLength for compressed encodings). - */ - encodedDataLength: number; - /** - * Data that was received. - * @experimental - */ - data?: string | undefined; - } - interface WebSocketCreatedEventDataType { - /** - * Request identifier. - */ - requestId: RequestId; - /** - * WebSocket request URL. - */ - url: string; - /** - * Request initiator. - */ - initiator: Initiator; - } - interface WebSocketClosedEventDataType { - /** - * Request identifier. - */ - requestId: RequestId; - /** - * Timestamp. - */ - timestamp: MonotonicTime; - } - interface WebSocketHandshakeResponseReceivedEventDataType { - /** - * Request identifier. - */ - requestId: RequestId; - /** - * Timestamp. - */ - timestamp: MonotonicTime; - /** - * WebSocket response data. - */ - response: WebSocketResponse; - } - } - namespace NodeRuntime { - interface NotifyWhenWaitingForDisconnectParameterType { - enabled: boolean; - } - } - namespace Target { - type SessionID = string; - type TargetID = string; - interface TargetInfo { - targetId: TargetID; - type: string; - title: string; - url: string; - attached: boolean; - canAccessOpener: boolean; - } - interface SetAutoAttachParameterType { - autoAttach: boolean; - waitForDebuggerOnStart: boolean; - } - interface TargetCreatedEventDataType { - targetInfo: TargetInfo; - } - interface AttachedToTargetEventDataType { - sessionId: SessionID; - targetInfo: TargetInfo; - waitingForDebugger: boolean; - } - } - namespace IO { - type StreamHandle = string; - interface ReadParameterType { - /** - * Handle of the stream to read. - */ - handle: StreamHandle; - /** - * Seek to the specified offset before reading (if not specified, proceed with offset - * following the last read). Some types of streams may only support sequential reads. - */ - offset?: number | undefined; - /** - * Maximum number of bytes to read (left upon the agent discretion if not specified). - */ - size?: number | undefined; - } - interface CloseParameterType { - /** - * Handle of the stream to close. - */ - handle: StreamHandle; - } - interface ReadReturnType { - /** - * Data that were read. - */ - data: string; - /** - * Set if the end-of-file condition occurred while reading. - */ - eof: boolean; - } - } - interface Session { - /** - * Posts a message to the inspector back-end. `callback` will be notified when - * a response is received. `callback` is a function that accepts two optional - * arguments: error and message-specific result. - * - * ```js - * session.post('Runtime.evaluate', { expression: '2 + 2' }, - * (error, { result }) => console.log(result)); - * // Output: { type: 'number', value: 4, description: '4' } - * ``` - * - * The latest version of the V8 inspector protocol is published on the - * [Chrome DevTools Protocol Viewer](https://chromedevtools.github.io/devtools-protocol/v8/). - * - * Node.js inspector supports all the Chrome DevTools Protocol domains declared - * by V8. Chrome DevTools Protocol domain provides an interface for interacting - * with one of the runtime agents used to inspect the application state and listen - * to the run-time events. - */ - post(method: string, callback?: (err: Error | null, params?: object) => void): void; - post(method: string, params?: object, callback?: (err: Error | null, params?: object) => void): void; - /** - * Returns supported domains. - */ - post(method: "Schema.getDomains", callback?: (err: Error | null, params: Schema.GetDomainsReturnType) => void): void; - /** - * Evaluates expression on global object. - */ - post(method: "Runtime.evaluate", params?: Runtime.EvaluateParameterType, callback?: (err: Error | null, params: Runtime.EvaluateReturnType) => void): void; - post(method: "Runtime.evaluate", callback?: (err: Error | null, params: Runtime.EvaluateReturnType) => void): void; - /** - * Add handler to promise with given promise object id. - */ - post(method: "Runtime.awaitPromise", params?: Runtime.AwaitPromiseParameterType, callback?: (err: Error | null, params: Runtime.AwaitPromiseReturnType) => void): void; - post(method: "Runtime.awaitPromise", callback?: (err: Error | null, params: Runtime.AwaitPromiseReturnType) => void): void; - /** - * Calls function with given declaration on the given object. Object group of the result is inherited from the target object. - */ - post(method: "Runtime.callFunctionOn", params?: Runtime.CallFunctionOnParameterType, callback?: (err: Error | null, params: Runtime.CallFunctionOnReturnType) => void): void; - post(method: "Runtime.callFunctionOn", callback?: (err: Error | null, params: Runtime.CallFunctionOnReturnType) => void): void; - /** - * Returns properties of a given object. Object group of the result is inherited from the target object. - */ - post(method: "Runtime.getProperties", params?: Runtime.GetPropertiesParameterType, callback?: (err: Error | null, params: Runtime.GetPropertiesReturnType) => void): void; - post(method: "Runtime.getProperties", callback?: (err: Error | null, params: Runtime.GetPropertiesReturnType) => void): void; - /** - * Releases remote object with given id. - */ - post(method: "Runtime.releaseObject", params?: Runtime.ReleaseObjectParameterType, callback?: (err: Error | null) => void): void; - post(method: "Runtime.releaseObject", callback?: (err: Error | null) => void): void; - /** - * Releases all remote objects that belong to a given group. - */ - post(method: "Runtime.releaseObjectGroup", params?: Runtime.ReleaseObjectGroupParameterType, callback?: (err: Error | null) => void): void; - post(method: "Runtime.releaseObjectGroup", callback?: (err: Error | null) => void): void; - /** - * Tells inspected instance to run if it was waiting for debugger to attach. - */ - post(method: "Runtime.runIfWaitingForDebugger", callback?: (err: Error | null) => void): void; - /** - * Enables reporting of execution contexts creation by means of executionContextCreated event. When the reporting gets enabled the event will be sent immediately for each existing execution context. - */ - post(method: "Runtime.enable", callback?: (err: Error | null) => void): void; - /** - * Disables reporting of execution contexts creation. - */ - post(method: "Runtime.disable", callback?: (err: Error | null) => void): void; - /** - * Discards collected exceptions and console API calls. - */ - post(method: "Runtime.discardConsoleEntries", callback?: (err: Error | null) => void): void; - /** - * @experimental - */ - post(method: "Runtime.setCustomObjectFormatterEnabled", params?: Runtime.SetCustomObjectFormatterEnabledParameterType, callback?: (err: Error | null) => void): void; - post(method: "Runtime.setCustomObjectFormatterEnabled", callback?: (err: Error | null) => void): void; - /** - * Compiles expression. - */ - post(method: "Runtime.compileScript", params?: Runtime.CompileScriptParameterType, callback?: (err: Error | null, params: Runtime.CompileScriptReturnType) => void): void; - post(method: "Runtime.compileScript", callback?: (err: Error | null, params: Runtime.CompileScriptReturnType) => void): void; - /** - * Runs script with given id in a given context. - */ - post(method: "Runtime.runScript", params?: Runtime.RunScriptParameterType, callback?: (err: Error | null, params: Runtime.RunScriptReturnType) => void): void; - post(method: "Runtime.runScript", callback?: (err: Error | null, params: Runtime.RunScriptReturnType) => void): void; - post(method: "Runtime.queryObjects", params?: Runtime.QueryObjectsParameterType, callback?: (err: Error | null, params: Runtime.QueryObjectsReturnType) => void): void; - post(method: "Runtime.queryObjects", callback?: (err: Error | null, params: Runtime.QueryObjectsReturnType) => void): void; - /** - * Returns all let, const and class variables from global scope. - */ - post( - method: "Runtime.globalLexicalScopeNames", - params?: Runtime.GlobalLexicalScopeNamesParameterType, - callback?: (err: Error | null, params: Runtime.GlobalLexicalScopeNamesReturnType) => void - ): void; - post(method: "Runtime.globalLexicalScopeNames", callback?: (err: Error | null, params: Runtime.GlobalLexicalScopeNamesReturnType) => void): void; - /** - * Enables debugger for the given page. Clients should not assume that the debugging has been enabled until the result for this command is received. - */ - post(method: "Debugger.enable", callback?: (err: Error | null, params: Debugger.EnableReturnType) => void): void; - /** - * Disables debugger for given page. - */ - post(method: "Debugger.disable", callback?: (err: Error | null) => void): void; - /** - * Activates / deactivates all breakpoints on the page. - */ - post(method: "Debugger.setBreakpointsActive", params?: Debugger.SetBreakpointsActiveParameterType, callback?: (err: Error | null) => void): void; - post(method: "Debugger.setBreakpointsActive", callback?: (err: Error | null) => void): void; - /** - * Makes page not interrupt on any pauses (breakpoint, exception, dom exception etc). - */ - post(method: "Debugger.setSkipAllPauses", params?: Debugger.SetSkipAllPausesParameterType, callback?: (err: Error | null) => void): void; - post(method: "Debugger.setSkipAllPauses", callback?: (err: Error | null) => void): void; - /** - * Sets JavaScript breakpoint at given location specified either by URL or URL regex. Once this command is issued, all existing parsed scripts will have breakpoints resolved and returned in locations property. Further matching script parsing will result in subsequent breakpointResolved events issued. This logical breakpoint will survive page reloads. - */ - post(method: "Debugger.setBreakpointByUrl", params?: Debugger.SetBreakpointByUrlParameterType, callback?: (err: Error | null, params: Debugger.SetBreakpointByUrlReturnType) => void): void; - post(method: "Debugger.setBreakpointByUrl", callback?: (err: Error | null, params: Debugger.SetBreakpointByUrlReturnType) => void): void; - /** - * Sets JavaScript breakpoint at a given location. - */ - post(method: "Debugger.setBreakpoint", params?: Debugger.SetBreakpointParameterType, callback?: (err: Error | null, params: Debugger.SetBreakpointReturnType) => void): void; - post(method: "Debugger.setBreakpoint", callback?: (err: Error | null, params: Debugger.SetBreakpointReturnType) => void): void; - /** - * Removes JavaScript breakpoint. - */ - post(method: "Debugger.removeBreakpoint", params?: Debugger.RemoveBreakpointParameterType, callback?: (err: Error | null) => void): void; - post(method: "Debugger.removeBreakpoint", callback?: (err: Error | null) => void): void; - /** - * Returns possible locations for breakpoint. scriptId in start and end range locations should be the same. - */ - post( - method: "Debugger.getPossibleBreakpoints", - params?: Debugger.GetPossibleBreakpointsParameterType, - callback?: (err: Error | null, params: Debugger.GetPossibleBreakpointsReturnType) => void - ): void; - post(method: "Debugger.getPossibleBreakpoints", callback?: (err: Error | null, params: Debugger.GetPossibleBreakpointsReturnType) => void): void; - /** - * Continues execution until specific location is reached. - */ - post(method: "Debugger.continueToLocation", params?: Debugger.ContinueToLocationParameterType, callback?: (err: Error | null) => void): void; - post(method: "Debugger.continueToLocation", callback?: (err: Error | null) => void): void; - /** - * @experimental - */ - post(method: "Debugger.pauseOnAsyncCall", params?: Debugger.PauseOnAsyncCallParameterType, callback?: (err: Error | null) => void): void; - post(method: "Debugger.pauseOnAsyncCall", callback?: (err: Error | null) => void): void; - /** - * Steps over the statement. - */ - post(method: "Debugger.stepOver", callback?: (err: Error | null) => void): void; - /** - * Steps into the function call. - */ - post(method: "Debugger.stepInto", params?: Debugger.StepIntoParameterType, callback?: (err: Error | null) => void): void; - post(method: "Debugger.stepInto", callback?: (err: Error | null) => void): void; - /** - * Steps out of the function call. - */ - post(method: "Debugger.stepOut", callback?: (err: Error | null) => void): void; - /** - * Stops on the next JavaScript statement. - */ - post(method: "Debugger.pause", callback?: (err: Error | null) => void): void; - /** - * This method is deprecated - use Debugger.stepInto with breakOnAsyncCall and Debugger.pauseOnAsyncTask instead. Steps into next scheduled async task if any is scheduled before next pause. Returns success when async task is actually scheduled, returns error if no task were scheduled or another scheduleStepIntoAsync was called. - * @experimental - */ - post(method: "Debugger.scheduleStepIntoAsync", callback?: (err: Error | null) => void): void; - /** - * Resumes JavaScript execution. - */ - post(method: "Debugger.resume", callback?: (err: Error | null) => void): void; - /** - * Returns stack trace with given stackTraceId. - * @experimental - */ - post(method: "Debugger.getStackTrace", params?: Debugger.GetStackTraceParameterType, callback?: (err: Error | null, params: Debugger.GetStackTraceReturnType) => void): void; - post(method: "Debugger.getStackTrace", callback?: (err: Error | null, params: Debugger.GetStackTraceReturnType) => void): void; - /** - * Searches for given string in script content. - */ - post(method: "Debugger.searchInContent", params?: Debugger.SearchInContentParameterType, callback?: (err: Error | null, params: Debugger.SearchInContentReturnType) => void): void; - post(method: "Debugger.searchInContent", callback?: (err: Error | null, params: Debugger.SearchInContentReturnType) => void): void; - /** - * Edits JavaScript source live. - */ - post(method: "Debugger.setScriptSource", params?: Debugger.SetScriptSourceParameterType, callback?: (err: Error | null, params: Debugger.SetScriptSourceReturnType) => void): void; - post(method: "Debugger.setScriptSource", callback?: (err: Error | null, params: Debugger.SetScriptSourceReturnType) => void): void; - /** - * Restarts particular call frame from the beginning. - */ - post(method: "Debugger.restartFrame", params?: Debugger.RestartFrameParameterType, callback?: (err: Error | null, params: Debugger.RestartFrameReturnType) => void): void; - post(method: "Debugger.restartFrame", callback?: (err: Error | null, params: Debugger.RestartFrameReturnType) => void): void; - /** - * Returns source for the script with given id. - */ - post(method: "Debugger.getScriptSource", params?: Debugger.GetScriptSourceParameterType, callback?: (err: Error | null, params: Debugger.GetScriptSourceReturnType) => void): void; - post(method: "Debugger.getScriptSource", callback?: (err: Error | null, params: Debugger.GetScriptSourceReturnType) => void): void; - /** - * Defines pause on exceptions state. Can be set to stop on all exceptions, uncaught exceptions or no exceptions. Initial pause on exceptions state is none. - */ - post(method: "Debugger.setPauseOnExceptions", params?: Debugger.SetPauseOnExceptionsParameterType, callback?: (err: Error | null) => void): void; - post(method: "Debugger.setPauseOnExceptions", callback?: (err: Error | null) => void): void; - /** - * Evaluates expression on a given call frame. - */ - post(method: "Debugger.evaluateOnCallFrame", params?: Debugger.EvaluateOnCallFrameParameterType, callback?: (err: Error | null, params: Debugger.EvaluateOnCallFrameReturnType) => void): void; - post(method: "Debugger.evaluateOnCallFrame", callback?: (err: Error | null, params: Debugger.EvaluateOnCallFrameReturnType) => void): void; - /** - * Changes value of variable in a callframe. Object-based scopes are not supported and must be mutated manually. - */ - post(method: "Debugger.setVariableValue", params?: Debugger.SetVariableValueParameterType, callback?: (err: Error | null) => void): void; - post(method: "Debugger.setVariableValue", callback?: (err: Error | null) => void): void; - /** - * Changes return value in top frame. Available only at return break position. - * @experimental - */ - post(method: "Debugger.setReturnValue", params?: Debugger.SetReturnValueParameterType, callback?: (err: Error | null) => void): void; - post(method: "Debugger.setReturnValue", callback?: (err: Error | null) => void): void; - /** - * Enables or disables async call stacks tracking. - */ - post(method: "Debugger.setAsyncCallStackDepth", params?: Debugger.SetAsyncCallStackDepthParameterType, callback?: (err: Error | null) => void): void; - post(method: "Debugger.setAsyncCallStackDepth", callback?: (err: Error | null) => void): void; - /** - * Replace previous blackbox patterns with passed ones. Forces backend to skip stepping/pausing in scripts with url matching one of the patterns. VM will try to leave blackboxed script by performing 'step in' several times, finally resorting to 'step out' if unsuccessful. - * @experimental - */ - post(method: "Debugger.setBlackboxPatterns", params?: Debugger.SetBlackboxPatternsParameterType, callback?: (err: Error | null) => void): void; - post(method: "Debugger.setBlackboxPatterns", callback?: (err: Error | null) => void): void; - /** - * Makes backend skip steps in the script in blackboxed ranges. VM will try leave blacklisted scripts by performing 'step in' several times, finally resorting to 'step out' if unsuccessful. Positions array contains positions where blackbox state is changed. First interval isn't blackboxed. Array should be sorted. - * @experimental - */ - post(method: "Debugger.setBlackboxedRanges", params?: Debugger.SetBlackboxedRangesParameterType, callback?: (err: Error | null) => void): void; - post(method: "Debugger.setBlackboxedRanges", callback?: (err: Error | null) => void): void; - /** - * Enables console domain, sends the messages collected so far to the client by means of the messageAdded notification. - */ - post(method: "Console.enable", callback?: (err: Error | null) => void): void; - /** - * Disables console domain, prevents further console messages from being reported to the client. - */ - post(method: "Console.disable", callback?: (err: Error | null) => void): void; - /** - * Does nothing. - */ - post(method: "Console.clearMessages", callback?: (err: Error | null) => void): void; - post(method: "Profiler.enable", callback?: (err: Error | null) => void): void; - post(method: "Profiler.disable", callback?: (err: Error | null) => void): void; - /** - * Changes CPU profiler sampling interval. Must be called before CPU profiles recording started. - */ - post(method: "Profiler.setSamplingInterval", params?: Profiler.SetSamplingIntervalParameterType, callback?: (err: Error | null) => void): void; - post(method: "Profiler.setSamplingInterval", callback?: (err: Error | null) => void): void; - post(method: "Profiler.start", callback?: (err: Error | null) => void): void; - post(method: "Profiler.stop", callback?: (err: Error | null, params: Profiler.StopReturnType) => void): void; - /** - * Enable precise code coverage. Coverage data for JavaScript executed before enabling precise code coverage may be incomplete. Enabling prevents running optimized code and resets execution counters. - */ - post(method: "Profiler.startPreciseCoverage", params?: Profiler.StartPreciseCoverageParameterType, callback?: (err: Error | null) => void): void; - post(method: "Profiler.startPreciseCoverage", callback?: (err: Error | null) => void): void; - /** - * Disable precise code coverage. Disabling releases unnecessary execution count records and allows executing optimized code. - */ - post(method: "Profiler.stopPreciseCoverage", callback?: (err: Error | null) => void): void; - /** - * Collect coverage data for the current isolate, and resets execution counters. Precise code coverage needs to have started. - */ - post(method: "Profiler.takePreciseCoverage", callback?: (err: Error | null, params: Profiler.TakePreciseCoverageReturnType) => void): void; - /** - * Collect coverage data for the current isolate. The coverage data may be incomplete due to garbage collection. - */ - post(method: "Profiler.getBestEffortCoverage", callback?: (err: Error | null, params: Profiler.GetBestEffortCoverageReturnType) => void): void; - post(method: "HeapProfiler.enable", callback?: (err: Error | null) => void): void; - post(method: "HeapProfiler.disable", callback?: (err: Error | null) => void): void; - post(method: "HeapProfiler.startTrackingHeapObjects", params?: HeapProfiler.StartTrackingHeapObjectsParameterType, callback?: (err: Error | null) => void): void; - post(method: "HeapProfiler.startTrackingHeapObjects", callback?: (err: Error | null) => void): void; - post(method: "HeapProfiler.stopTrackingHeapObjects", params?: HeapProfiler.StopTrackingHeapObjectsParameterType, callback?: (err: Error | null) => void): void; - post(method: "HeapProfiler.stopTrackingHeapObjects", callback?: (err: Error | null) => void): void; - post(method: "HeapProfiler.takeHeapSnapshot", params?: HeapProfiler.TakeHeapSnapshotParameterType, callback?: (err: Error | null) => void): void; - post(method: "HeapProfiler.takeHeapSnapshot", callback?: (err: Error | null) => void): void; - post(method: "HeapProfiler.collectGarbage", callback?: (err: Error | null) => void): void; - post( - method: "HeapProfiler.getObjectByHeapObjectId", - params?: HeapProfiler.GetObjectByHeapObjectIdParameterType, - callback?: (err: Error | null, params: HeapProfiler.GetObjectByHeapObjectIdReturnType) => void - ): void; - post(method: "HeapProfiler.getObjectByHeapObjectId", callback?: (err: Error | null, params: HeapProfiler.GetObjectByHeapObjectIdReturnType) => void): void; - /** - * Enables console to refer to the node with given id via $x (see Command Line API for more details $x functions). - */ - post(method: "HeapProfiler.addInspectedHeapObject", params?: HeapProfiler.AddInspectedHeapObjectParameterType, callback?: (err: Error | null) => void): void; - post(method: "HeapProfiler.addInspectedHeapObject", callback?: (err: Error | null) => void): void; - post(method: "HeapProfiler.getHeapObjectId", params?: HeapProfiler.GetHeapObjectIdParameterType, callback?: (err: Error | null, params: HeapProfiler.GetHeapObjectIdReturnType) => void): void; - post(method: "HeapProfiler.getHeapObjectId", callback?: (err: Error | null, params: HeapProfiler.GetHeapObjectIdReturnType) => void): void; - post(method: "HeapProfiler.startSampling", params?: HeapProfiler.StartSamplingParameterType, callback?: (err: Error | null) => void): void; - post(method: "HeapProfiler.startSampling", callback?: (err: Error | null) => void): void; - post(method: "HeapProfiler.stopSampling", callback?: (err: Error | null, params: HeapProfiler.StopSamplingReturnType) => void): void; - post(method: "HeapProfiler.getSamplingProfile", callback?: (err: Error | null, params: HeapProfiler.GetSamplingProfileReturnType) => void): void; - /** - * Gets supported tracing categories. - */ - post(method: "NodeTracing.getCategories", callback?: (err: Error | null, params: NodeTracing.GetCategoriesReturnType) => void): void; - /** - * Start trace events collection. - */ - post(method: "NodeTracing.start", params?: NodeTracing.StartParameterType, callback?: (err: Error | null) => void): void; - post(method: "NodeTracing.start", callback?: (err: Error | null) => void): void; - /** - * Stop trace events collection. Remaining collected events will be sent as a sequence of - * dataCollected events followed by tracingComplete event. - */ - post(method: "NodeTracing.stop", callback?: (err: Error | null) => void): void; - /** - * Sends protocol message over session with given id. - */ - post(method: "NodeWorker.sendMessageToWorker", params?: NodeWorker.SendMessageToWorkerParameterType, callback?: (err: Error | null) => void): void; - post(method: "NodeWorker.sendMessageToWorker", callback?: (err: Error | null) => void): void; - /** - * Instructs the inspector to attach to running workers. Will also attach to new workers - * as they start - */ - post(method: "NodeWorker.enable", params?: NodeWorker.EnableParameterType, callback?: (err: Error | null) => void): void; - post(method: "NodeWorker.enable", callback?: (err: Error | null) => void): void; - /** - * Detaches from all running workers and disables attaching to new workers as they are started. - */ - post(method: "NodeWorker.disable", callback?: (err: Error | null) => void): void; - /** - * Detached from the worker with given sessionId. - */ - post(method: "NodeWorker.detach", params?: NodeWorker.DetachParameterType, callback?: (err: Error | null) => void): void; - post(method: "NodeWorker.detach", callback?: (err: Error | null) => void): void; - /** - * Disables network tracking, prevents network events from being sent to the client. - */ - post(method: "Network.disable", callback?: (err: Error | null) => void): void; - /** - * Enables network tracking, network events will now be delivered to the client. - */ - post(method: "Network.enable", callback?: (err: Error | null) => void): void; - /** - * Returns post data sent with the request. Returns an error when no data was sent with the request. - */ - post(method: "Network.getRequestPostData", params?: Network.GetRequestPostDataParameterType, callback?: (err: Error | null, params: Network.GetRequestPostDataReturnType) => void): void; - post(method: "Network.getRequestPostData", callback?: (err: Error | null, params: Network.GetRequestPostDataReturnType) => void): void; - /** - * Returns content served for the given request. - */ - post(method: "Network.getResponseBody", params?: Network.GetResponseBodyParameterType, callback?: (err: Error | null, params: Network.GetResponseBodyReturnType) => void): void; - post(method: "Network.getResponseBody", callback?: (err: Error | null, params: Network.GetResponseBodyReturnType) => void): void; - /** - * Enables streaming of the response for the given requestId. - * If enabled, the dataReceived event contains the data that was received during streaming. - * @experimental - */ - post( - method: "Network.streamResourceContent", - params?: Network.StreamResourceContentParameterType, - callback?: (err: Error | null, params: Network.StreamResourceContentReturnType) => void - ): void; - post(method: "Network.streamResourceContent", callback?: (err: Error | null, params: Network.StreamResourceContentReturnType) => void): void; - /** - * Fetches the resource and returns the content. - */ - post(method: "Network.loadNetworkResource", params?: Network.LoadNetworkResourceParameterType, callback?: (err: Error | null, params: Network.LoadNetworkResourceReturnType) => void): void; - post(method: "Network.loadNetworkResource", callback?: (err: Error | null, params: Network.LoadNetworkResourceReturnType) => void): void; - /** - * Enable the NodeRuntime events except by `NodeRuntime.waitingForDisconnect`. - */ - post(method: "NodeRuntime.enable", callback?: (err: Error | null) => void): void; - /** - * Disable NodeRuntime events - */ - post(method: "NodeRuntime.disable", callback?: (err: Error | null) => void): void; - /** - * Enable the `NodeRuntime.waitingForDisconnect`. - */ - post(method: "NodeRuntime.notifyWhenWaitingForDisconnect", params?: NodeRuntime.NotifyWhenWaitingForDisconnectParameterType, callback?: (err: Error | null) => void): void; - post(method: "NodeRuntime.notifyWhenWaitingForDisconnect", callback?: (err: Error | null) => void): void; - post(method: "Target.setAutoAttach", params?: Target.SetAutoAttachParameterType, callback?: (err: Error | null) => void): void; - post(method: "Target.setAutoAttach", callback?: (err: Error | null) => void): void; - /** - * Read a chunk of the stream - */ - post(method: "IO.read", params?: IO.ReadParameterType, callback?: (err: Error | null, params: IO.ReadReturnType) => void): void; - post(method: "IO.read", callback?: (err: Error | null, params: IO.ReadReturnType) => void): void; - post(method: "IO.close", params?: IO.CloseParameterType, callback?: (err: Error | null) => void): void; - post(method: "IO.close", callback?: (err: Error | null) => void): void; - addListener(event: string, listener: (...args: any[]) => void): this; - /** - * Emitted when any notification from the V8 Inspector is received. - */ - addListener(event: "inspectorNotification", listener: (message: InspectorNotification) => void): this; - /** - * Issued when new execution context is created. - */ - addListener(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification) => void): this; - /** - * Issued when execution context is destroyed. - */ - addListener(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification) => void): this; - /** - * Issued when all executionContexts were cleared in browser - */ - addListener(event: "Runtime.executionContextsCleared", listener: () => void): this; - /** - * Issued when exception was thrown and unhandled. - */ - addListener(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification) => void): this; - /** - * Issued when unhandled exception was revoked. - */ - addListener(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification) => void): this; - /** - * Issued when console API was called. - */ - addListener(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification) => void): this; - /** - * Issued when object should be inspected (for example, as a result of inspect() command line API call). - */ - addListener(event: "Runtime.inspectRequested", listener: (message: InspectorNotification) => void): this; - /** - * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger. - */ - addListener(event: "Debugger.scriptParsed", listener: (message: InspectorNotification) => void): this; - /** - * Fired when virtual machine fails to parse the script. - */ - addListener(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification) => void): this; - /** - * Fired when breakpoint is resolved to an actual script and location. - */ - addListener(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification) => void): this; - /** - * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. - */ - addListener(event: "Debugger.paused", listener: (message: InspectorNotification) => void): this; - /** - * Fired when the virtual machine resumed execution. - */ - addListener(event: "Debugger.resumed", listener: () => void): this; - /** - * Issued when new console message is added. - */ - addListener(event: "Console.messageAdded", listener: (message: InspectorNotification) => void): this; - /** - * Sent when new profile recording is started using console.profile() call. - */ - addListener(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification) => void): this; - addListener(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification) => void): this; - addListener(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification) => void): this; - addListener(event: "HeapProfiler.resetProfiles", listener: () => void): this; - addListener(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification) => void): this; - /** - * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event. - */ - addListener(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification) => void): this; - /** - * If heap objects tracking has been started then backend may send update for one or more fragments - */ - addListener(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification) => void): this; - /** - * Contains an bucket of collected trace events. - */ - addListener(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification) => void): this; - /** - * Signals that tracing is stopped and there is no trace buffers pending flush, all data were - * delivered via dataCollected events. - */ - addListener(event: "NodeTracing.tracingComplete", listener: () => void): this; - /** - * Issued when attached to a worker. - */ - addListener(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification) => void): this; - /** - * Issued when detached from the worker. - */ - addListener(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification) => void): this; - /** - * Notifies about a new protocol message received from the session - * (session ID is provided in attachedToWorker notification). - */ - addListener(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification) => void): this; - /** - * Fired when page is about to send HTTP request. - */ - addListener(event: "Network.requestWillBeSent", listener: (message: InspectorNotification) => void): this; - /** - * Fired when HTTP response is available. - */ - addListener(event: "Network.responseReceived", listener: (message: InspectorNotification) => void): this; - addListener(event: "Network.loadingFailed", listener: (message: InspectorNotification) => void): this; - addListener(event: "Network.loadingFinished", listener: (message: InspectorNotification) => void): this; - /** - * Fired when data chunk was received over the network. - */ - addListener(event: "Network.dataReceived", listener: (message: InspectorNotification) => void): this; - /** - * Fired upon WebSocket creation. - */ - addListener(event: "Network.webSocketCreated", listener: (message: InspectorNotification) => void): this; - /** - * Fired when WebSocket is closed. - */ - addListener(event: "Network.webSocketClosed", listener: (message: InspectorNotification) => void): this; - /** - * Fired when WebSocket handshake response becomes available. - */ - addListener(event: "Network.webSocketHandshakeResponseReceived", listener: (message: InspectorNotification) => void): this; - /** - * This event is fired instead of `Runtime.executionContextDestroyed` when - * enabled. - * It is fired when the Node process finished all code execution and is - * waiting for all frontends to disconnect. - */ - addListener(event: "NodeRuntime.waitingForDisconnect", listener: () => void): this; - /** - * This event is fired when the runtime is waiting for the debugger. For - * example, when inspector.waitingForDebugger is called - */ - addListener(event: "NodeRuntime.waitingForDebugger", listener: () => void): this; - addListener(event: "Target.targetCreated", listener: (message: InspectorNotification) => void): this; - addListener(event: "Target.attachedToTarget", listener: (message: InspectorNotification) => void): this; - emit(event: string | symbol, ...args: any[]): boolean; - emit(event: "inspectorNotification", message: InspectorNotification): boolean; - emit(event: "Runtime.executionContextCreated", message: InspectorNotification): boolean; - emit(event: "Runtime.executionContextDestroyed", message: InspectorNotification): boolean; - emit(event: "Runtime.executionContextsCleared"): boolean; - emit(event: "Runtime.exceptionThrown", message: InspectorNotification): boolean; - emit(event: "Runtime.exceptionRevoked", message: InspectorNotification): boolean; - emit(event: "Runtime.consoleAPICalled", message: InspectorNotification): boolean; - emit(event: "Runtime.inspectRequested", message: InspectorNotification): boolean; - emit(event: "Debugger.scriptParsed", message: InspectorNotification): boolean; - emit(event: "Debugger.scriptFailedToParse", message: InspectorNotification): boolean; - emit(event: "Debugger.breakpointResolved", message: InspectorNotification): boolean; - emit(event: "Debugger.paused", message: InspectorNotification): boolean; - emit(event: "Debugger.resumed"): boolean; - emit(event: "Console.messageAdded", message: InspectorNotification): boolean; - emit(event: "Profiler.consoleProfileStarted", message: InspectorNotification): boolean; - emit(event: "Profiler.consoleProfileFinished", message: InspectorNotification): boolean; - emit(event: "HeapProfiler.addHeapSnapshotChunk", message: InspectorNotification): boolean; - emit(event: "HeapProfiler.resetProfiles"): boolean; - emit(event: "HeapProfiler.reportHeapSnapshotProgress", message: InspectorNotification): boolean; - emit(event: "HeapProfiler.lastSeenObjectId", message: InspectorNotification): boolean; - emit(event: "HeapProfiler.heapStatsUpdate", message: InspectorNotification): boolean; - emit(event: "NodeTracing.dataCollected", message: InspectorNotification): boolean; - emit(event: "NodeTracing.tracingComplete"): boolean; - emit(event: "NodeWorker.attachedToWorker", message: InspectorNotification): boolean; - emit(event: "NodeWorker.detachedFromWorker", message: InspectorNotification): boolean; - emit(event: "NodeWorker.receivedMessageFromWorker", message: InspectorNotification): boolean; - emit(event: "Network.requestWillBeSent", message: InspectorNotification): boolean; - emit(event: "Network.responseReceived", message: InspectorNotification): boolean; - emit(event: "Network.loadingFailed", message: InspectorNotification): boolean; - emit(event: "Network.loadingFinished", message: InspectorNotification): boolean; - emit(event: "Network.dataReceived", message: InspectorNotification): boolean; - emit(event: "Network.webSocketCreated", message: InspectorNotification): boolean; - emit(event: "Network.webSocketClosed", message: InspectorNotification): boolean; - emit(event: "Network.webSocketHandshakeResponseReceived", message: InspectorNotification): boolean; - emit(event: "NodeRuntime.waitingForDisconnect"): boolean; - emit(event: "NodeRuntime.waitingForDebugger"): boolean; - emit(event: "Target.targetCreated", message: InspectorNotification): boolean; - emit(event: "Target.attachedToTarget", message: InspectorNotification): boolean; - on(event: string, listener: (...args: any[]) => void): this; - /** - * Emitted when any notification from the V8 Inspector is received. - */ - on(event: "inspectorNotification", listener: (message: InspectorNotification) => void): this; - /** - * Issued when new execution context is created. - */ - on(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification) => void): this; - /** - * Issued when execution context is destroyed. - */ - on(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification) => void): this; - /** - * Issued when all executionContexts were cleared in browser - */ - on(event: "Runtime.executionContextsCleared", listener: () => void): this; - /** - * Issued when exception was thrown and unhandled. - */ - on(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification) => void): this; - /** - * Issued when unhandled exception was revoked. - */ - on(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification) => void): this; - /** - * Issued when console API was called. - */ - on(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification) => void): this; - /** - * Issued when object should be inspected (for example, as a result of inspect() command line API call). - */ - on(event: "Runtime.inspectRequested", listener: (message: InspectorNotification) => void): this; - /** - * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger. - */ - on(event: "Debugger.scriptParsed", listener: (message: InspectorNotification) => void): this; - /** - * Fired when virtual machine fails to parse the script. - */ - on(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification) => void): this; - /** - * Fired when breakpoint is resolved to an actual script and location. - */ - on(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification) => void): this; - /** - * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. - */ - on(event: "Debugger.paused", listener: (message: InspectorNotification) => void): this; - /** - * Fired when the virtual machine resumed execution. - */ - on(event: "Debugger.resumed", listener: () => void): this; - /** - * Issued when new console message is added. - */ - on(event: "Console.messageAdded", listener: (message: InspectorNotification) => void): this; - /** - * Sent when new profile recording is started using console.profile() call. - */ - on(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification) => void): this; - on(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification) => void): this; - on(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification) => void): this; - on(event: "HeapProfiler.resetProfiles", listener: () => void): this; - on(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification) => void): this; - /** - * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event. - */ - on(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification) => void): this; - /** - * If heap objects tracking has been started then backend may send update for one or more fragments - */ - on(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification) => void): this; - /** - * Contains an bucket of collected trace events. - */ - on(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification) => void): this; - /** - * Signals that tracing is stopped and there is no trace buffers pending flush, all data were - * delivered via dataCollected events. - */ - on(event: "NodeTracing.tracingComplete", listener: () => void): this; - /** - * Issued when attached to a worker. - */ - on(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification) => void): this; - /** - * Issued when detached from the worker. - */ - on(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification) => void): this; - /** - * Notifies about a new protocol message received from the session - * (session ID is provided in attachedToWorker notification). - */ - on(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification) => void): this; - /** - * Fired when page is about to send HTTP request. - */ - on(event: "Network.requestWillBeSent", listener: (message: InspectorNotification) => void): this; - /** - * Fired when HTTP response is available. - */ - on(event: "Network.responseReceived", listener: (message: InspectorNotification) => void): this; - on(event: "Network.loadingFailed", listener: (message: InspectorNotification) => void): this; - on(event: "Network.loadingFinished", listener: (message: InspectorNotification) => void): this; - /** - * Fired when data chunk was received over the network. - */ - on(event: "Network.dataReceived", listener: (message: InspectorNotification) => void): this; - /** - * Fired upon WebSocket creation. - */ - on(event: "Network.webSocketCreated", listener: (message: InspectorNotification) => void): this; - /** - * Fired when WebSocket is closed. - */ - on(event: "Network.webSocketClosed", listener: (message: InspectorNotification) => void): this; - /** - * Fired when WebSocket handshake response becomes available. - */ - on(event: "Network.webSocketHandshakeResponseReceived", listener: (message: InspectorNotification) => void): this; - /** - * This event is fired instead of `Runtime.executionContextDestroyed` when - * enabled. - * It is fired when the Node process finished all code execution and is - * waiting for all frontends to disconnect. - */ - on(event: "NodeRuntime.waitingForDisconnect", listener: () => void): this; - /** - * This event is fired when the runtime is waiting for the debugger. For - * example, when inspector.waitingForDebugger is called - */ - on(event: "NodeRuntime.waitingForDebugger", listener: () => void): this; - on(event: "Target.targetCreated", listener: (message: InspectorNotification) => void): this; - on(event: "Target.attachedToTarget", listener: (message: InspectorNotification) => void): this; - once(event: string, listener: (...args: any[]) => void): this; - /** - * Emitted when any notification from the V8 Inspector is received. - */ - once(event: "inspectorNotification", listener: (message: InspectorNotification) => void): this; - /** - * Issued when new execution context is created. - */ - once(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification) => void): this; - /** - * Issued when execution context is destroyed. - */ - once(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification) => void): this; - /** - * Issued when all executionContexts were cleared in browser - */ - once(event: "Runtime.executionContextsCleared", listener: () => void): this; - /** - * Issued when exception was thrown and unhandled. - */ - once(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification) => void): this; - /** - * Issued when unhandled exception was revoked. - */ - once(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification) => void): this; - /** - * Issued when console API was called. - */ - once(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification) => void): this; - /** - * Issued when object should be inspected (for example, as a result of inspect() command line API call). - */ - once(event: "Runtime.inspectRequested", listener: (message: InspectorNotification) => void): this; - /** - * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger. - */ - once(event: "Debugger.scriptParsed", listener: (message: InspectorNotification) => void): this; - /** - * Fired when virtual machine fails to parse the script. - */ - once(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification) => void): this; - /** - * Fired when breakpoint is resolved to an actual script and location. - */ - once(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification) => void): this; - /** - * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. - */ - once(event: "Debugger.paused", listener: (message: InspectorNotification) => void): this; - /** - * Fired when the virtual machine resumed execution. - */ - once(event: "Debugger.resumed", listener: () => void): this; - /** - * Issued when new console message is added. - */ - once(event: "Console.messageAdded", listener: (message: InspectorNotification) => void): this; - /** - * Sent when new profile recording is started using console.profile() call. - */ - once(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification) => void): this; - once(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification) => void): this; - once(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification) => void): this; - once(event: "HeapProfiler.resetProfiles", listener: () => void): this; - once(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification) => void): this; - /** - * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event. - */ - once(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification) => void): this; - /** - * If heap objects tracking has been started then backend may send update for one or more fragments - */ - once(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification) => void): this; - /** - * Contains an bucket of collected trace events. - */ - once(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification) => void): this; - /** - * Signals that tracing is stopped and there is no trace buffers pending flush, all data were - * delivered via dataCollected events. - */ - once(event: "NodeTracing.tracingComplete", listener: () => void): this; - /** - * Issued when attached to a worker. - */ - once(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification) => void): this; - /** - * Issued when detached from the worker. - */ - once(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification) => void): this; - /** - * Notifies about a new protocol message received from the session - * (session ID is provided in attachedToWorker notification). - */ - once(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification) => void): this; - /** - * Fired when page is about to send HTTP request. - */ - once(event: "Network.requestWillBeSent", listener: (message: InspectorNotification) => void): this; - /** - * Fired when HTTP response is available. - */ - once(event: "Network.responseReceived", listener: (message: InspectorNotification) => void): this; - once(event: "Network.loadingFailed", listener: (message: InspectorNotification) => void): this; - once(event: "Network.loadingFinished", listener: (message: InspectorNotification) => void): this; - /** - * Fired when data chunk was received over the network. - */ - once(event: "Network.dataReceived", listener: (message: InspectorNotification) => void): this; - /** - * Fired upon WebSocket creation. - */ - once(event: "Network.webSocketCreated", listener: (message: InspectorNotification) => void): this; - /** - * Fired when WebSocket is closed. - */ - once(event: "Network.webSocketClosed", listener: (message: InspectorNotification) => void): this; - /** - * Fired when WebSocket handshake response becomes available. - */ - once(event: "Network.webSocketHandshakeResponseReceived", listener: (message: InspectorNotification) => void): this; - /** - * This event is fired instead of `Runtime.executionContextDestroyed` when - * enabled. - * It is fired when the Node process finished all code execution and is - * waiting for all frontends to disconnect. - */ - once(event: "NodeRuntime.waitingForDisconnect", listener: () => void): this; - /** - * This event is fired when the runtime is waiting for the debugger. For - * example, when inspector.waitingForDebugger is called - */ - once(event: "NodeRuntime.waitingForDebugger", listener: () => void): this; - once(event: "Target.targetCreated", listener: (message: InspectorNotification) => void): this; - once(event: "Target.attachedToTarget", listener: (message: InspectorNotification) => void): this; - prependListener(event: string, listener: (...args: any[]) => void): this; - /** - * Emitted when any notification from the V8 Inspector is received. - */ - prependListener(event: "inspectorNotification", listener: (message: InspectorNotification) => void): this; - /** - * Issued when new execution context is created. - */ - prependListener(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification) => void): this; - /** - * Issued when execution context is destroyed. - */ - prependListener(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification) => void): this; - /** - * Issued when all executionContexts were cleared in browser - */ - prependListener(event: "Runtime.executionContextsCleared", listener: () => void): this; - /** - * Issued when exception was thrown and unhandled. - */ - prependListener(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification) => void): this; - /** - * Issued when unhandled exception was revoked. - */ - prependListener(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification) => void): this; - /** - * Issued when console API was called. - */ - prependListener(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification) => void): this; - /** - * Issued when object should be inspected (for example, as a result of inspect() command line API call). - */ - prependListener(event: "Runtime.inspectRequested", listener: (message: InspectorNotification) => void): this; - /** - * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger. - */ - prependListener(event: "Debugger.scriptParsed", listener: (message: InspectorNotification) => void): this; - /** - * Fired when virtual machine fails to parse the script. - */ - prependListener(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification) => void): this; - /** - * Fired when breakpoint is resolved to an actual script and location. - */ - prependListener(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification) => void): this; - /** - * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. - */ - prependListener(event: "Debugger.paused", listener: (message: InspectorNotification) => void): this; - /** - * Fired when the virtual machine resumed execution. - */ - prependListener(event: "Debugger.resumed", listener: () => void): this; - /** - * Issued when new console message is added. - */ - prependListener(event: "Console.messageAdded", listener: (message: InspectorNotification) => void): this; - /** - * Sent when new profile recording is started using console.profile() call. - */ - prependListener(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification) => void): this; - prependListener(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification) => void): this; - prependListener(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification) => void): this; - prependListener(event: "HeapProfiler.resetProfiles", listener: () => void): this; - prependListener(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification) => void): this; - /** - * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event. - */ - prependListener(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification) => void): this; - /** - * If heap objects tracking has been started then backend may send update for one or more fragments - */ - prependListener(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification) => void): this; - /** - * Contains an bucket of collected trace events. - */ - prependListener(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification) => void): this; - /** - * Signals that tracing is stopped and there is no trace buffers pending flush, all data were - * delivered via dataCollected events. - */ - prependListener(event: "NodeTracing.tracingComplete", listener: () => void): this; - /** - * Issued when attached to a worker. - */ - prependListener(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification) => void): this; - /** - * Issued when detached from the worker. - */ - prependListener(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification) => void): this; - /** - * Notifies about a new protocol message received from the session - * (session ID is provided in attachedToWorker notification). - */ - prependListener(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification) => void): this; - /** - * Fired when page is about to send HTTP request. - */ - prependListener(event: "Network.requestWillBeSent", listener: (message: InspectorNotification) => void): this; - /** - * Fired when HTTP response is available. - */ - prependListener(event: "Network.responseReceived", listener: (message: InspectorNotification) => void): this; - prependListener(event: "Network.loadingFailed", listener: (message: InspectorNotification) => void): this; - prependListener(event: "Network.loadingFinished", listener: (message: InspectorNotification) => void): this; - /** - * Fired when data chunk was received over the network. - */ - prependListener(event: "Network.dataReceived", listener: (message: InspectorNotification) => void): this; - /** - * Fired upon WebSocket creation. - */ - prependListener(event: "Network.webSocketCreated", listener: (message: InspectorNotification) => void): this; - /** - * Fired when WebSocket is closed. - */ - prependListener(event: "Network.webSocketClosed", listener: (message: InspectorNotification) => void): this; - /** - * Fired when WebSocket handshake response becomes available. - */ - prependListener(event: "Network.webSocketHandshakeResponseReceived", listener: (message: InspectorNotification) => void): this; - /** - * This event is fired instead of `Runtime.executionContextDestroyed` when - * enabled. - * It is fired when the Node process finished all code execution and is - * waiting for all frontends to disconnect. - */ - prependListener(event: "NodeRuntime.waitingForDisconnect", listener: () => void): this; - /** - * This event is fired when the runtime is waiting for the debugger. For - * example, when inspector.waitingForDebugger is called - */ - prependListener(event: "NodeRuntime.waitingForDebugger", listener: () => void): this; - prependListener(event: "Target.targetCreated", listener: (message: InspectorNotification) => void): this; - prependListener(event: "Target.attachedToTarget", listener: (message: InspectorNotification) => void): this; - prependOnceListener(event: string, listener: (...args: any[]) => void): this; - /** - * Emitted when any notification from the V8 Inspector is received. - */ - prependOnceListener(event: "inspectorNotification", listener: (message: InspectorNotification) => void): this; - /** - * Issued when new execution context is created. - */ - prependOnceListener(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification) => void): this; - /** - * Issued when execution context is destroyed. - */ - prependOnceListener(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification) => void): this; - /** - * Issued when all executionContexts were cleared in browser - */ - prependOnceListener(event: "Runtime.executionContextsCleared", listener: () => void): this; - /** - * Issued when exception was thrown and unhandled. - */ - prependOnceListener(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification) => void): this; - /** - * Issued when unhandled exception was revoked. - */ - prependOnceListener(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification) => void): this; - /** - * Issued when console API was called. - */ - prependOnceListener(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification) => void): this; - /** - * Issued when object should be inspected (for example, as a result of inspect() command line API call). - */ - prependOnceListener(event: "Runtime.inspectRequested", listener: (message: InspectorNotification) => void): this; - /** - * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger. - */ - prependOnceListener(event: "Debugger.scriptParsed", listener: (message: InspectorNotification) => void): this; - /** - * Fired when virtual machine fails to parse the script. - */ - prependOnceListener(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification) => void): this; - /** - * Fired when breakpoint is resolved to an actual script and location. - */ - prependOnceListener(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification) => void): this; - /** - * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. - */ - prependOnceListener(event: "Debugger.paused", listener: (message: InspectorNotification) => void): this; - /** - * Fired when the virtual machine resumed execution. - */ - prependOnceListener(event: "Debugger.resumed", listener: () => void): this; - /** - * Issued when new console message is added. - */ - prependOnceListener(event: "Console.messageAdded", listener: (message: InspectorNotification) => void): this; - /** - * Sent when new profile recording is started using console.profile() call. - */ - prependOnceListener(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification) => void): this; - prependOnceListener(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification) => void): this; - prependOnceListener(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification) => void): this; - prependOnceListener(event: "HeapProfiler.resetProfiles", listener: () => void): this; - prependOnceListener(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification) => void): this; - /** - * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event. - */ - prependOnceListener(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification) => void): this; - /** - * If heap objects tracking has been started then backend may send update for one or more fragments - */ - prependOnceListener(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification) => void): this; - /** - * Contains an bucket of collected trace events. - */ - prependOnceListener(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification) => void): this; - /** - * Signals that tracing is stopped and there is no trace buffers pending flush, all data were - * delivered via dataCollected events. - */ - prependOnceListener(event: "NodeTracing.tracingComplete", listener: () => void): this; - /** - * Issued when attached to a worker. - */ - prependOnceListener(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification) => void): this; - /** - * Issued when detached from the worker. - */ - prependOnceListener(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification) => void): this; - /** - * Notifies about a new protocol message received from the session - * (session ID is provided in attachedToWorker notification). - */ - prependOnceListener(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification) => void): this; - /** - * Fired when page is about to send HTTP request. - */ - prependOnceListener(event: "Network.requestWillBeSent", listener: (message: InspectorNotification) => void): this; - /** - * Fired when HTTP response is available. - */ - prependOnceListener(event: "Network.responseReceived", listener: (message: InspectorNotification) => void): this; - prependOnceListener(event: "Network.loadingFailed", listener: (message: InspectorNotification) => void): this; - prependOnceListener(event: "Network.loadingFinished", listener: (message: InspectorNotification) => void): this; - /** - * Fired when data chunk was received over the network. - */ - prependOnceListener(event: "Network.dataReceived", listener: (message: InspectorNotification) => void): this; - /** - * Fired upon WebSocket creation. - */ - prependOnceListener(event: "Network.webSocketCreated", listener: (message: InspectorNotification) => void): this; - /** - * Fired when WebSocket is closed. - */ - prependOnceListener(event: "Network.webSocketClosed", listener: (message: InspectorNotification) => void): this; - /** - * Fired when WebSocket handshake response becomes available. - */ - prependOnceListener(event: "Network.webSocketHandshakeResponseReceived", listener: (message: InspectorNotification) => void): this; - /** - * This event is fired instead of `Runtime.executionContextDestroyed` when - * enabled. - * It is fired when the Node process finished all code execution and is - * waiting for all frontends to disconnect. - */ - prependOnceListener(event: "NodeRuntime.waitingForDisconnect", listener: () => void): this; - /** - * This event is fired when the runtime is waiting for the debugger. For - * example, when inspector.waitingForDebugger is called - */ - prependOnceListener(event: "NodeRuntime.waitingForDebugger", listener: () => void): this; - prependOnceListener(event: "Target.targetCreated", listener: (message: InspectorNotification) => void): this; - prependOnceListener(event: "Target.attachedToTarget", listener: (message: InspectorNotification) => void): this; - } -} -declare module "node:inspector/promises" { - export { - Schema, - Runtime, - Debugger, - Console, - Profiler, - HeapProfiler, - NodeTracing, - NodeWorker, - Network, - NodeRuntime, - Target, - IO, - } from 'inspector'; -} -declare module "node:inspector/promises" { - import { - InspectorNotification, - Schema, - Runtime, - Debugger, - Console, - Profiler, - HeapProfiler, - NodeTracing, - NodeWorker, - Network, - NodeRuntime, - Target, - IO, - } from "inspector"; - /** - * The `inspector.Session` is used for dispatching messages to the V8 inspector - * back-end and receiving message responses and notifications. - * @since v19.0.0 - */ - interface Session { - /** - * Posts a message to the inspector back-end. - * - * ```js - * import { Session } from 'node:inspector/promises'; - * try { - * const session = new Session(); - * session.connect(); - * const result = await session.post('Runtime.evaluate', { expression: '2 + 2' }); - * console.log(result); - * } catch (error) { - * console.error(error); - * } - * // Output: { result: { type: 'number', value: 4, description: '4' } } - * ``` - * - * The latest version of the V8 inspector protocol is published on the - * [Chrome DevTools Protocol Viewer](https://chromedevtools.github.io/devtools-protocol/v8/). - * - * Node.js inspector supports all the Chrome DevTools Protocol domains declared - * by V8. Chrome DevTools Protocol domain provides an interface for interacting - * with one of the runtime agents used to inspect the application state and listen - * to the run-time events. - */ - post(method: string, params?: object): Promise; - /** - * Returns supported domains. - */ - post(method: "Schema.getDomains"): Promise; - /** - * Evaluates expression on global object. - */ - post(method: "Runtime.evaluate", params?: Runtime.EvaluateParameterType): Promise; - /** - * Add handler to promise with given promise object id. - */ - post(method: "Runtime.awaitPromise", params?: Runtime.AwaitPromiseParameterType): Promise; - /** - * Calls function with given declaration on the given object. Object group of the result is inherited from the target object. - */ - post(method: "Runtime.callFunctionOn", params?: Runtime.CallFunctionOnParameterType): Promise; - /** - * Returns properties of a given object. Object group of the result is inherited from the target object. - */ - post(method: "Runtime.getProperties", params?: Runtime.GetPropertiesParameterType): Promise; - /** - * Releases remote object with given id. - */ - post(method: "Runtime.releaseObject", params?: Runtime.ReleaseObjectParameterType): Promise; - /** - * Releases all remote objects that belong to a given group. - */ - post(method: "Runtime.releaseObjectGroup", params?: Runtime.ReleaseObjectGroupParameterType): Promise; - /** - * Tells inspected instance to run if it was waiting for debugger to attach. - */ - post(method: "Runtime.runIfWaitingForDebugger"): Promise; - /** - * Enables reporting of execution contexts creation by means of executionContextCreated event. When the reporting gets enabled the event will be sent immediately for each existing execution context. - */ - post(method: "Runtime.enable"): Promise; - /** - * Disables reporting of execution contexts creation. - */ - post(method: "Runtime.disable"): Promise; - /** - * Discards collected exceptions and console API calls. - */ - post(method: "Runtime.discardConsoleEntries"): Promise; - /** - * @experimental - */ - post(method: "Runtime.setCustomObjectFormatterEnabled", params?: Runtime.SetCustomObjectFormatterEnabledParameterType): Promise; - /** - * Compiles expression. - */ - post(method: "Runtime.compileScript", params?: Runtime.CompileScriptParameterType): Promise; - /** - * Runs script with given id in a given context. - */ - post(method: "Runtime.runScript", params?: Runtime.RunScriptParameterType): Promise; - post(method: "Runtime.queryObjects", params?: Runtime.QueryObjectsParameterType): Promise; - /** - * Returns all let, const and class variables from global scope. - */ - post(method: "Runtime.globalLexicalScopeNames", params?: Runtime.GlobalLexicalScopeNamesParameterType): Promise; - /** - * Enables debugger for the given page. Clients should not assume that the debugging has been enabled until the result for this command is received. - */ - post(method: "Debugger.enable"): Promise; - /** - * Disables debugger for given page. - */ - post(method: "Debugger.disable"): Promise; - /** - * Activates / deactivates all breakpoints on the page. - */ - post(method: "Debugger.setBreakpointsActive", params?: Debugger.SetBreakpointsActiveParameterType): Promise; - /** - * Makes page not interrupt on any pauses (breakpoint, exception, dom exception etc). - */ - post(method: "Debugger.setSkipAllPauses", params?: Debugger.SetSkipAllPausesParameterType): Promise; - /** - * Sets JavaScript breakpoint at given location specified either by URL or URL regex. Once this command is issued, all existing parsed scripts will have breakpoints resolved and returned in locations property. Further matching script parsing will result in subsequent breakpointResolved events issued. This logical breakpoint will survive page reloads. - */ - post(method: "Debugger.setBreakpointByUrl", params?: Debugger.SetBreakpointByUrlParameterType): Promise; - /** - * Sets JavaScript breakpoint at a given location. - */ - post(method: "Debugger.setBreakpoint", params?: Debugger.SetBreakpointParameterType): Promise; - /** - * Removes JavaScript breakpoint. - */ - post(method: "Debugger.removeBreakpoint", params?: Debugger.RemoveBreakpointParameterType): Promise; - /** - * Returns possible locations for breakpoint. scriptId in start and end range locations should be the same. - */ - post(method: "Debugger.getPossibleBreakpoints", params?: Debugger.GetPossibleBreakpointsParameterType): Promise; - /** - * Continues execution until specific location is reached. - */ - post(method: "Debugger.continueToLocation", params?: Debugger.ContinueToLocationParameterType): Promise; - /** - * @experimental - */ - post(method: "Debugger.pauseOnAsyncCall", params?: Debugger.PauseOnAsyncCallParameterType): Promise; - /** - * Steps over the statement. - */ - post(method: "Debugger.stepOver"): Promise; - /** - * Steps into the function call. - */ - post(method: "Debugger.stepInto", params?: Debugger.StepIntoParameterType): Promise; - /** - * Steps out of the function call. - */ - post(method: "Debugger.stepOut"): Promise; - /** - * Stops on the next JavaScript statement. - */ - post(method: "Debugger.pause"): Promise; - /** - * This method is deprecated - use Debugger.stepInto with breakOnAsyncCall and Debugger.pauseOnAsyncTask instead. Steps into next scheduled async task if any is scheduled before next pause. Returns success when async task is actually scheduled, returns error if no task were scheduled or another scheduleStepIntoAsync was called. - * @experimental - */ - post(method: "Debugger.scheduleStepIntoAsync"): Promise; - /** - * Resumes JavaScript execution. - */ - post(method: "Debugger.resume"): Promise; - /** - * Returns stack trace with given stackTraceId. - * @experimental - */ - post(method: "Debugger.getStackTrace", params?: Debugger.GetStackTraceParameterType): Promise; - /** - * Searches for given string in script content. - */ - post(method: "Debugger.searchInContent", params?: Debugger.SearchInContentParameterType): Promise; - /** - * Edits JavaScript source live. - */ - post(method: "Debugger.setScriptSource", params?: Debugger.SetScriptSourceParameterType): Promise; - /** - * Restarts particular call frame from the beginning. - */ - post(method: "Debugger.restartFrame", params?: Debugger.RestartFrameParameterType): Promise; - /** - * Returns source for the script with given id. - */ - post(method: "Debugger.getScriptSource", params?: Debugger.GetScriptSourceParameterType): Promise; - /** - * Defines pause on exceptions state. Can be set to stop on all exceptions, uncaught exceptions or no exceptions. Initial pause on exceptions state is none. - */ - post(method: "Debugger.setPauseOnExceptions", params?: Debugger.SetPauseOnExceptionsParameterType): Promise; - /** - * Evaluates expression on a given call frame. - */ - post(method: "Debugger.evaluateOnCallFrame", params?: Debugger.EvaluateOnCallFrameParameterType): Promise; - /** - * Changes value of variable in a callframe. Object-based scopes are not supported and must be mutated manually. - */ - post(method: "Debugger.setVariableValue", params?: Debugger.SetVariableValueParameterType): Promise; - /** - * Changes return value in top frame. Available only at return break position. - * @experimental - */ - post(method: "Debugger.setReturnValue", params?: Debugger.SetReturnValueParameterType): Promise; - /** - * Enables or disables async call stacks tracking. - */ - post(method: "Debugger.setAsyncCallStackDepth", params?: Debugger.SetAsyncCallStackDepthParameterType): Promise; - /** - * Replace previous blackbox patterns with passed ones. Forces backend to skip stepping/pausing in scripts with url matching one of the patterns. VM will try to leave blackboxed script by performing 'step in' several times, finally resorting to 'step out' if unsuccessful. - * @experimental - */ - post(method: "Debugger.setBlackboxPatterns", params?: Debugger.SetBlackboxPatternsParameterType): Promise; - /** - * Makes backend skip steps in the script in blackboxed ranges. VM will try leave blacklisted scripts by performing 'step in' several times, finally resorting to 'step out' if unsuccessful. Positions array contains positions where blackbox state is changed. First interval isn't blackboxed. Array should be sorted. - * @experimental - */ - post(method: "Debugger.setBlackboxedRanges", params?: Debugger.SetBlackboxedRangesParameterType): Promise; - /** - * Enables console domain, sends the messages collected so far to the client by means of the messageAdded notification. - */ - post(method: "Console.enable"): Promise; - /** - * Disables console domain, prevents further console messages from being reported to the client. - */ - post(method: "Console.disable"): Promise; - /** - * Does nothing. - */ - post(method: "Console.clearMessages"): Promise; - post(method: "Profiler.enable"): Promise; - post(method: "Profiler.disable"): Promise; - /** - * Changes CPU profiler sampling interval. Must be called before CPU profiles recording started. - */ - post(method: "Profiler.setSamplingInterval", params?: Profiler.SetSamplingIntervalParameterType): Promise; - post(method: "Profiler.start"): Promise; - post(method: "Profiler.stop"): Promise; - /** - * Enable precise code coverage. Coverage data for JavaScript executed before enabling precise code coverage may be incomplete. Enabling prevents running optimized code and resets execution counters. - */ - post(method: "Profiler.startPreciseCoverage", params?: Profiler.StartPreciseCoverageParameterType): Promise; - /** - * Disable precise code coverage. Disabling releases unnecessary execution count records and allows executing optimized code. - */ - post(method: "Profiler.stopPreciseCoverage"): Promise; - /** - * Collect coverage data for the current isolate, and resets execution counters. Precise code coverage needs to have started. - */ - post(method: "Profiler.takePreciseCoverage"): Promise; - /** - * Collect coverage data for the current isolate. The coverage data may be incomplete due to garbage collection. - */ - post(method: "Profiler.getBestEffortCoverage"): Promise; - post(method: "HeapProfiler.enable"): Promise; - post(method: "HeapProfiler.disable"): Promise; - post(method: "HeapProfiler.startTrackingHeapObjects", params?: HeapProfiler.StartTrackingHeapObjectsParameterType): Promise; - post(method: "HeapProfiler.stopTrackingHeapObjects", params?: HeapProfiler.StopTrackingHeapObjectsParameterType): Promise; - post(method: "HeapProfiler.takeHeapSnapshot", params?: HeapProfiler.TakeHeapSnapshotParameterType): Promise; - post(method: "HeapProfiler.collectGarbage"): Promise; - post(method: "HeapProfiler.getObjectByHeapObjectId", params?: HeapProfiler.GetObjectByHeapObjectIdParameterType): Promise; - /** - * Enables console to refer to the node with given id via $x (see Command Line API for more details $x functions). - */ - post(method: "HeapProfiler.addInspectedHeapObject", params?: HeapProfiler.AddInspectedHeapObjectParameterType): Promise; - post(method: "HeapProfiler.getHeapObjectId", params?: HeapProfiler.GetHeapObjectIdParameterType): Promise; - post(method: "HeapProfiler.startSampling", params?: HeapProfiler.StartSamplingParameterType): Promise; - post(method: "HeapProfiler.stopSampling"): Promise; - post(method: "HeapProfiler.getSamplingProfile"): Promise; - /** - * Gets supported tracing categories. - */ - post(method: "NodeTracing.getCategories"): Promise; - /** - * Start trace events collection. - */ - post(method: "NodeTracing.start", params?: NodeTracing.StartParameterType): Promise; - /** - * Stop trace events collection. Remaining collected events will be sent as a sequence of - * dataCollected events followed by tracingComplete event. - */ - post(method: "NodeTracing.stop"): Promise; - /** - * Sends protocol message over session with given id. - */ - post(method: "NodeWorker.sendMessageToWorker", params?: NodeWorker.SendMessageToWorkerParameterType): Promise; - /** - * Instructs the inspector to attach to running workers. Will also attach to new workers - * as they start - */ - post(method: "NodeWorker.enable", params?: NodeWorker.EnableParameterType): Promise; - /** - * Detaches from all running workers and disables attaching to new workers as they are started. - */ - post(method: "NodeWorker.disable"): Promise; - /** - * Detached from the worker with given sessionId. - */ - post(method: "NodeWorker.detach", params?: NodeWorker.DetachParameterType): Promise; - /** - * Disables network tracking, prevents network events from being sent to the client. - */ - post(method: "Network.disable"): Promise; - /** - * Enables network tracking, network events will now be delivered to the client. - */ - post(method: "Network.enable"): Promise; - /** - * Returns post data sent with the request. Returns an error when no data was sent with the request. - */ - post(method: "Network.getRequestPostData", params?: Network.GetRequestPostDataParameterType): Promise; - /** - * Returns content served for the given request. - */ - post(method: "Network.getResponseBody", params?: Network.GetResponseBodyParameterType): Promise; - /** - * Enables streaming of the response for the given requestId. - * If enabled, the dataReceived event contains the data that was received during streaming. - * @experimental - */ - post(method: "Network.streamResourceContent", params?: Network.StreamResourceContentParameterType): Promise; - /** - * Fetches the resource and returns the content. - */ - post(method: "Network.loadNetworkResource", params?: Network.LoadNetworkResourceParameterType): Promise; - /** - * Enable the NodeRuntime events except by `NodeRuntime.waitingForDisconnect`. - */ - post(method: "NodeRuntime.enable"): Promise; - /** - * Disable NodeRuntime events - */ - post(method: "NodeRuntime.disable"): Promise; - /** - * Enable the `NodeRuntime.waitingForDisconnect`. - */ - post(method: "NodeRuntime.notifyWhenWaitingForDisconnect", params?: NodeRuntime.NotifyWhenWaitingForDisconnectParameterType): Promise; - post(method: "Target.setAutoAttach", params?: Target.SetAutoAttachParameterType): Promise; - /** - * Read a chunk of the stream - */ - post(method: "IO.read", params?: IO.ReadParameterType): Promise; - post(method: "IO.close", params?: IO.CloseParameterType): Promise; - addListener(event: string, listener: (...args: any[]) => void): this; - /** - * Emitted when any notification from the V8 Inspector is received. - */ - addListener(event: "inspectorNotification", listener: (message: InspectorNotification) => void): this; - /** - * Issued when new execution context is created. - */ - addListener(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification) => void): this; - /** - * Issued when execution context is destroyed. - */ - addListener(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification) => void): this; - /** - * Issued when all executionContexts were cleared in browser - */ - addListener(event: "Runtime.executionContextsCleared", listener: () => void): this; - /** - * Issued when exception was thrown and unhandled. - */ - addListener(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification) => void): this; - /** - * Issued when unhandled exception was revoked. - */ - addListener(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification) => void): this; - /** - * Issued when console API was called. - */ - addListener(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification) => void): this; - /** - * Issued when object should be inspected (for example, as a result of inspect() command line API call). - */ - addListener(event: "Runtime.inspectRequested", listener: (message: InspectorNotification) => void): this; - /** - * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger. - */ - addListener(event: "Debugger.scriptParsed", listener: (message: InspectorNotification) => void): this; - /** - * Fired when virtual machine fails to parse the script. - */ - addListener(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification) => void): this; - /** - * Fired when breakpoint is resolved to an actual script and location. - */ - addListener(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification) => void): this; - /** - * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. - */ - addListener(event: "Debugger.paused", listener: (message: InspectorNotification) => void): this; - /** - * Fired when the virtual machine resumed execution. - */ - addListener(event: "Debugger.resumed", listener: () => void): this; - /** - * Issued when new console message is added. - */ - addListener(event: "Console.messageAdded", listener: (message: InspectorNotification) => void): this; - /** - * Sent when new profile recording is started using console.profile() call. - */ - addListener(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification) => void): this; - addListener(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification) => void): this; - addListener(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification) => void): this; - addListener(event: "HeapProfiler.resetProfiles", listener: () => void): this; - addListener(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification) => void): this; - /** - * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event. - */ - addListener(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification) => void): this; - /** - * If heap objects tracking has been started then backend may send update for one or more fragments - */ - addListener(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification) => void): this; - /** - * Contains an bucket of collected trace events. - */ - addListener(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification) => void): this; - /** - * Signals that tracing is stopped and there is no trace buffers pending flush, all data were - * delivered via dataCollected events. - */ - addListener(event: "NodeTracing.tracingComplete", listener: () => void): this; - /** - * Issued when attached to a worker. - */ - addListener(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification) => void): this; - /** - * Issued when detached from the worker. - */ - addListener(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification) => void): this; - /** - * Notifies about a new protocol message received from the session - * (session ID is provided in attachedToWorker notification). - */ - addListener(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification) => void): this; - /** - * Fired when page is about to send HTTP request. - */ - addListener(event: "Network.requestWillBeSent", listener: (message: InspectorNotification) => void): this; - /** - * Fired when HTTP response is available. - */ - addListener(event: "Network.responseReceived", listener: (message: InspectorNotification) => void): this; - addListener(event: "Network.loadingFailed", listener: (message: InspectorNotification) => void): this; - addListener(event: "Network.loadingFinished", listener: (message: InspectorNotification) => void): this; - /** - * Fired when data chunk was received over the network. - */ - addListener(event: "Network.dataReceived", listener: (message: InspectorNotification) => void): this; - /** - * Fired upon WebSocket creation. - */ - addListener(event: "Network.webSocketCreated", listener: (message: InspectorNotification) => void): this; - /** - * Fired when WebSocket is closed. - */ - addListener(event: "Network.webSocketClosed", listener: (message: InspectorNotification) => void): this; - /** - * Fired when WebSocket handshake response becomes available. - */ - addListener(event: "Network.webSocketHandshakeResponseReceived", listener: (message: InspectorNotification) => void): this; - /** - * This event is fired instead of `Runtime.executionContextDestroyed` when - * enabled. - * It is fired when the Node process finished all code execution and is - * waiting for all frontends to disconnect. - */ - addListener(event: "NodeRuntime.waitingForDisconnect", listener: () => void): this; - /** - * This event is fired when the runtime is waiting for the debugger. For - * example, when inspector.waitingForDebugger is called - */ - addListener(event: "NodeRuntime.waitingForDebugger", listener: () => void): this; - addListener(event: "Target.targetCreated", listener: (message: InspectorNotification) => void): this; - addListener(event: "Target.attachedToTarget", listener: (message: InspectorNotification) => void): this; - emit(event: string | symbol, ...args: any[]): boolean; - emit(event: "inspectorNotification", message: InspectorNotification): boolean; - emit(event: "Runtime.executionContextCreated", message: InspectorNotification): boolean; - emit(event: "Runtime.executionContextDestroyed", message: InspectorNotification): boolean; - emit(event: "Runtime.executionContextsCleared"): boolean; - emit(event: "Runtime.exceptionThrown", message: InspectorNotification): boolean; - emit(event: "Runtime.exceptionRevoked", message: InspectorNotification): boolean; - emit(event: "Runtime.consoleAPICalled", message: InspectorNotification): boolean; - emit(event: "Runtime.inspectRequested", message: InspectorNotification): boolean; - emit(event: "Debugger.scriptParsed", message: InspectorNotification): boolean; - emit(event: "Debugger.scriptFailedToParse", message: InspectorNotification): boolean; - emit(event: "Debugger.breakpointResolved", message: InspectorNotification): boolean; - emit(event: "Debugger.paused", message: InspectorNotification): boolean; - emit(event: "Debugger.resumed"): boolean; - emit(event: "Console.messageAdded", message: InspectorNotification): boolean; - emit(event: "Profiler.consoleProfileStarted", message: InspectorNotification): boolean; - emit(event: "Profiler.consoleProfileFinished", message: InspectorNotification): boolean; - emit(event: "HeapProfiler.addHeapSnapshotChunk", message: InspectorNotification): boolean; - emit(event: "HeapProfiler.resetProfiles"): boolean; - emit(event: "HeapProfiler.reportHeapSnapshotProgress", message: InspectorNotification): boolean; - emit(event: "HeapProfiler.lastSeenObjectId", message: InspectorNotification): boolean; - emit(event: "HeapProfiler.heapStatsUpdate", message: InspectorNotification): boolean; - emit(event: "NodeTracing.dataCollected", message: InspectorNotification): boolean; - emit(event: "NodeTracing.tracingComplete"): boolean; - emit(event: "NodeWorker.attachedToWorker", message: InspectorNotification): boolean; - emit(event: "NodeWorker.detachedFromWorker", message: InspectorNotification): boolean; - emit(event: "NodeWorker.receivedMessageFromWorker", message: InspectorNotification): boolean; - emit(event: "Network.requestWillBeSent", message: InspectorNotification): boolean; - emit(event: "Network.responseReceived", message: InspectorNotification): boolean; - emit(event: "Network.loadingFailed", message: InspectorNotification): boolean; - emit(event: "Network.loadingFinished", message: InspectorNotification): boolean; - emit(event: "Network.dataReceived", message: InspectorNotification): boolean; - emit(event: "Network.webSocketCreated", message: InspectorNotification): boolean; - emit(event: "Network.webSocketClosed", message: InspectorNotification): boolean; - emit(event: "Network.webSocketHandshakeResponseReceived", message: InspectorNotification): boolean; - emit(event: "NodeRuntime.waitingForDisconnect"): boolean; - emit(event: "NodeRuntime.waitingForDebugger"): boolean; - emit(event: "Target.targetCreated", message: InspectorNotification): boolean; - emit(event: "Target.attachedToTarget", message: InspectorNotification): boolean; - on(event: string, listener: (...args: any[]) => void): this; - /** - * Emitted when any notification from the V8 Inspector is received. - */ - on(event: "inspectorNotification", listener: (message: InspectorNotification) => void): this; - /** - * Issued when new execution context is created. - */ - on(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification) => void): this; - /** - * Issued when execution context is destroyed. - */ - on(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification) => void): this; - /** - * Issued when all executionContexts were cleared in browser - */ - on(event: "Runtime.executionContextsCleared", listener: () => void): this; - /** - * Issued when exception was thrown and unhandled. - */ - on(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification) => void): this; - /** - * Issued when unhandled exception was revoked. - */ - on(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification) => void): this; - /** - * Issued when console API was called. - */ - on(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification) => void): this; - /** - * Issued when object should be inspected (for example, as a result of inspect() command line API call). - */ - on(event: "Runtime.inspectRequested", listener: (message: InspectorNotification) => void): this; - /** - * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger. - */ - on(event: "Debugger.scriptParsed", listener: (message: InspectorNotification) => void): this; - /** - * Fired when virtual machine fails to parse the script. - */ - on(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification) => void): this; - /** - * Fired when breakpoint is resolved to an actual script and location. - */ - on(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification) => void): this; - /** - * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. - */ - on(event: "Debugger.paused", listener: (message: InspectorNotification) => void): this; - /** - * Fired when the virtual machine resumed execution. - */ - on(event: "Debugger.resumed", listener: () => void): this; - /** - * Issued when new console message is added. - */ - on(event: "Console.messageAdded", listener: (message: InspectorNotification) => void): this; - /** - * Sent when new profile recording is started using console.profile() call. - */ - on(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification) => void): this; - on(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification) => void): this; - on(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification) => void): this; - on(event: "HeapProfiler.resetProfiles", listener: () => void): this; - on(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification) => void): this; - /** - * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event. - */ - on(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification) => void): this; - /** - * If heap objects tracking has been started then backend may send update for one or more fragments - */ - on(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification) => void): this; - /** - * Contains an bucket of collected trace events. - */ - on(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification) => void): this; - /** - * Signals that tracing is stopped and there is no trace buffers pending flush, all data were - * delivered via dataCollected events. - */ - on(event: "NodeTracing.tracingComplete", listener: () => void): this; - /** - * Issued when attached to a worker. - */ - on(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification) => void): this; - /** - * Issued when detached from the worker. - */ - on(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification) => void): this; - /** - * Notifies about a new protocol message received from the session - * (session ID is provided in attachedToWorker notification). - */ - on(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification) => void): this; - /** - * Fired when page is about to send HTTP request. - */ - on(event: "Network.requestWillBeSent", listener: (message: InspectorNotification) => void): this; - /** - * Fired when HTTP response is available. - */ - on(event: "Network.responseReceived", listener: (message: InspectorNotification) => void): this; - on(event: "Network.loadingFailed", listener: (message: InspectorNotification) => void): this; - on(event: "Network.loadingFinished", listener: (message: InspectorNotification) => void): this; - /** - * Fired when data chunk was received over the network. - */ - on(event: "Network.dataReceived", listener: (message: InspectorNotification) => void): this; - /** - * Fired upon WebSocket creation. - */ - on(event: "Network.webSocketCreated", listener: (message: InspectorNotification) => void): this; - /** - * Fired when WebSocket is closed. - */ - on(event: "Network.webSocketClosed", listener: (message: InspectorNotification) => void): this; - /** - * Fired when WebSocket handshake response becomes available. - */ - on(event: "Network.webSocketHandshakeResponseReceived", listener: (message: InspectorNotification) => void): this; - /** - * This event is fired instead of `Runtime.executionContextDestroyed` when - * enabled. - * It is fired when the Node process finished all code execution and is - * waiting for all frontends to disconnect. - */ - on(event: "NodeRuntime.waitingForDisconnect", listener: () => void): this; - /** - * This event is fired when the runtime is waiting for the debugger. For - * example, when inspector.waitingForDebugger is called - */ - on(event: "NodeRuntime.waitingForDebugger", listener: () => void): this; - on(event: "Target.targetCreated", listener: (message: InspectorNotification) => void): this; - on(event: "Target.attachedToTarget", listener: (message: InspectorNotification) => void): this; - once(event: string, listener: (...args: any[]) => void): this; - /** - * Emitted when any notification from the V8 Inspector is received. - */ - once(event: "inspectorNotification", listener: (message: InspectorNotification) => void): this; - /** - * Issued when new execution context is created. - */ - once(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification) => void): this; - /** - * Issued when execution context is destroyed. - */ - once(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification) => void): this; - /** - * Issued when all executionContexts were cleared in browser - */ - once(event: "Runtime.executionContextsCleared", listener: () => void): this; - /** - * Issued when exception was thrown and unhandled. - */ - once(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification) => void): this; - /** - * Issued when unhandled exception was revoked. - */ - once(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification) => void): this; - /** - * Issued when console API was called. - */ - once(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification) => void): this; - /** - * Issued when object should be inspected (for example, as a result of inspect() command line API call). - */ - once(event: "Runtime.inspectRequested", listener: (message: InspectorNotification) => void): this; - /** - * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger. - */ - once(event: "Debugger.scriptParsed", listener: (message: InspectorNotification) => void): this; - /** - * Fired when virtual machine fails to parse the script. - */ - once(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification) => void): this; - /** - * Fired when breakpoint is resolved to an actual script and location. - */ - once(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification) => void): this; - /** - * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. - */ - once(event: "Debugger.paused", listener: (message: InspectorNotification) => void): this; - /** - * Fired when the virtual machine resumed execution. - */ - once(event: "Debugger.resumed", listener: () => void): this; - /** - * Issued when new console message is added. - */ - once(event: "Console.messageAdded", listener: (message: InspectorNotification) => void): this; - /** - * Sent when new profile recording is started using console.profile() call. - */ - once(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification) => void): this; - once(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification) => void): this; - once(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification) => void): this; - once(event: "HeapProfiler.resetProfiles", listener: () => void): this; - once(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification) => void): this; - /** - * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event. - */ - once(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification) => void): this; - /** - * If heap objects tracking has been started then backend may send update for one or more fragments - */ - once(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification) => void): this; - /** - * Contains an bucket of collected trace events. - */ - once(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification) => void): this; - /** - * Signals that tracing is stopped and there is no trace buffers pending flush, all data were - * delivered via dataCollected events. - */ - once(event: "NodeTracing.tracingComplete", listener: () => void): this; - /** - * Issued when attached to a worker. - */ - once(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification) => void): this; - /** - * Issued when detached from the worker. - */ - once(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification) => void): this; - /** - * Notifies about a new protocol message received from the session - * (session ID is provided in attachedToWorker notification). - */ - once(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification) => void): this; - /** - * Fired when page is about to send HTTP request. - */ - once(event: "Network.requestWillBeSent", listener: (message: InspectorNotification) => void): this; - /** - * Fired when HTTP response is available. - */ - once(event: "Network.responseReceived", listener: (message: InspectorNotification) => void): this; - once(event: "Network.loadingFailed", listener: (message: InspectorNotification) => void): this; - once(event: "Network.loadingFinished", listener: (message: InspectorNotification) => void): this; - /** - * Fired when data chunk was received over the network. - */ - once(event: "Network.dataReceived", listener: (message: InspectorNotification) => void): this; - /** - * Fired upon WebSocket creation. - */ - once(event: "Network.webSocketCreated", listener: (message: InspectorNotification) => void): this; - /** - * Fired when WebSocket is closed. - */ - once(event: "Network.webSocketClosed", listener: (message: InspectorNotification) => void): this; - /** - * Fired when WebSocket handshake response becomes available. - */ - once(event: "Network.webSocketHandshakeResponseReceived", listener: (message: InspectorNotification) => void): this; - /** - * This event is fired instead of `Runtime.executionContextDestroyed` when - * enabled. - * It is fired when the Node process finished all code execution and is - * waiting for all frontends to disconnect. - */ - once(event: "NodeRuntime.waitingForDisconnect", listener: () => void): this; - /** - * This event is fired when the runtime is waiting for the debugger. For - * example, when inspector.waitingForDebugger is called - */ - once(event: "NodeRuntime.waitingForDebugger", listener: () => void): this; - once(event: "Target.targetCreated", listener: (message: InspectorNotification) => void): this; - once(event: "Target.attachedToTarget", listener: (message: InspectorNotification) => void): this; - prependListener(event: string, listener: (...args: any[]) => void): this; - /** - * Emitted when any notification from the V8 Inspector is received. - */ - prependListener(event: "inspectorNotification", listener: (message: InspectorNotification) => void): this; - /** - * Issued when new execution context is created. - */ - prependListener(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification) => void): this; - /** - * Issued when execution context is destroyed. - */ - prependListener(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification) => void): this; - /** - * Issued when all executionContexts were cleared in browser - */ - prependListener(event: "Runtime.executionContextsCleared", listener: () => void): this; - /** - * Issued when exception was thrown and unhandled. - */ - prependListener(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification) => void): this; - /** - * Issued when unhandled exception was revoked. - */ - prependListener(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification) => void): this; - /** - * Issued when console API was called. - */ - prependListener(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification) => void): this; - /** - * Issued when object should be inspected (for example, as a result of inspect() command line API call). - */ - prependListener(event: "Runtime.inspectRequested", listener: (message: InspectorNotification) => void): this; - /** - * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger. - */ - prependListener(event: "Debugger.scriptParsed", listener: (message: InspectorNotification) => void): this; - /** - * Fired when virtual machine fails to parse the script. - */ - prependListener(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification) => void): this; - /** - * Fired when breakpoint is resolved to an actual script and location. - */ - prependListener(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification) => void): this; - /** - * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. - */ - prependListener(event: "Debugger.paused", listener: (message: InspectorNotification) => void): this; - /** - * Fired when the virtual machine resumed execution. - */ - prependListener(event: "Debugger.resumed", listener: () => void): this; - /** - * Issued when new console message is added. - */ - prependListener(event: "Console.messageAdded", listener: (message: InspectorNotification) => void): this; - /** - * Sent when new profile recording is started using console.profile() call. - */ - prependListener(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification) => void): this; - prependListener(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification) => void): this; - prependListener(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification) => void): this; - prependListener(event: "HeapProfiler.resetProfiles", listener: () => void): this; - prependListener(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification) => void): this; - /** - * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event. - */ - prependListener(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification) => void): this; - /** - * If heap objects tracking has been started then backend may send update for one or more fragments - */ - prependListener(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification) => void): this; - /** - * Contains an bucket of collected trace events. - */ - prependListener(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification) => void): this; - /** - * Signals that tracing is stopped and there is no trace buffers pending flush, all data were - * delivered via dataCollected events. - */ - prependListener(event: "NodeTracing.tracingComplete", listener: () => void): this; - /** - * Issued when attached to a worker. - */ - prependListener(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification) => void): this; - /** - * Issued when detached from the worker. - */ - prependListener(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification) => void): this; - /** - * Notifies about a new protocol message received from the session - * (session ID is provided in attachedToWorker notification). - */ - prependListener(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification) => void): this; - /** - * Fired when page is about to send HTTP request. - */ - prependListener(event: "Network.requestWillBeSent", listener: (message: InspectorNotification) => void): this; - /** - * Fired when HTTP response is available. - */ - prependListener(event: "Network.responseReceived", listener: (message: InspectorNotification) => void): this; - prependListener(event: "Network.loadingFailed", listener: (message: InspectorNotification) => void): this; - prependListener(event: "Network.loadingFinished", listener: (message: InspectorNotification) => void): this; - /** - * Fired when data chunk was received over the network. - */ - prependListener(event: "Network.dataReceived", listener: (message: InspectorNotification) => void): this; - /** - * Fired upon WebSocket creation. - */ - prependListener(event: "Network.webSocketCreated", listener: (message: InspectorNotification) => void): this; - /** - * Fired when WebSocket is closed. - */ - prependListener(event: "Network.webSocketClosed", listener: (message: InspectorNotification) => void): this; - /** - * Fired when WebSocket handshake response becomes available. - */ - prependListener(event: "Network.webSocketHandshakeResponseReceived", listener: (message: InspectorNotification) => void): this; - /** - * This event is fired instead of `Runtime.executionContextDestroyed` when - * enabled. - * It is fired when the Node process finished all code execution and is - * waiting for all frontends to disconnect. - */ - prependListener(event: "NodeRuntime.waitingForDisconnect", listener: () => void): this; - /** - * This event is fired when the runtime is waiting for the debugger. For - * example, when inspector.waitingForDebugger is called - */ - prependListener(event: "NodeRuntime.waitingForDebugger", listener: () => void): this; - prependListener(event: "Target.targetCreated", listener: (message: InspectorNotification) => void): this; - prependListener(event: "Target.attachedToTarget", listener: (message: InspectorNotification) => void): this; - prependOnceListener(event: string, listener: (...args: any[]) => void): this; - /** - * Emitted when any notification from the V8 Inspector is received. - */ - prependOnceListener(event: "inspectorNotification", listener: (message: InspectorNotification) => void): this; - /** - * Issued when new execution context is created. - */ - prependOnceListener(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification) => void): this; - /** - * Issued when execution context is destroyed. - */ - prependOnceListener(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification) => void): this; - /** - * Issued when all executionContexts were cleared in browser - */ - prependOnceListener(event: "Runtime.executionContextsCleared", listener: () => void): this; - /** - * Issued when exception was thrown and unhandled. - */ - prependOnceListener(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification) => void): this; - /** - * Issued when unhandled exception was revoked. - */ - prependOnceListener(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification) => void): this; - /** - * Issued when console API was called. - */ - prependOnceListener(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification) => void): this; - /** - * Issued when object should be inspected (for example, as a result of inspect() command line API call). - */ - prependOnceListener(event: "Runtime.inspectRequested", listener: (message: InspectorNotification) => void): this; - /** - * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger. - */ - prependOnceListener(event: "Debugger.scriptParsed", listener: (message: InspectorNotification) => void): this; - /** - * Fired when virtual machine fails to parse the script. - */ - prependOnceListener(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification) => void): this; - /** - * Fired when breakpoint is resolved to an actual script and location. - */ - prependOnceListener(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification) => void): this; - /** - * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. - */ - prependOnceListener(event: "Debugger.paused", listener: (message: InspectorNotification) => void): this; - /** - * Fired when the virtual machine resumed execution. - */ - prependOnceListener(event: "Debugger.resumed", listener: () => void): this; - /** - * Issued when new console message is added. - */ - prependOnceListener(event: "Console.messageAdded", listener: (message: InspectorNotification) => void): this; - /** - * Sent when new profile recording is started using console.profile() call. - */ - prependOnceListener(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification) => void): this; - prependOnceListener(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification) => void): this; - prependOnceListener(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification) => void): this; - prependOnceListener(event: "HeapProfiler.resetProfiles", listener: () => void): this; - prependOnceListener(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification) => void): this; - /** - * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event. - */ - prependOnceListener(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification) => void): this; - /** - * If heap objects tracking has been started then backend may send update for one or more fragments - */ - prependOnceListener(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification) => void): this; - /** - * Contains an bucket of collected trace events. - */ - prependOnceListener(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification) => void): this; - /** - * Signals that tracing is stopped and there is no trace buffers pending flush, all data were - * delivered via dataCollected events. - */ - prependOnceListener(event: "NodeTracing.tracingComplete", listener: () => void): this; - /** - * Issued when attached to a worker. - */ - prependOnceListener(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification) => void): this; - /** - * Issued when detached from the worker. - */ - prependOnceListener(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification) => void): this; - /** - * Notifies about a new protocol message received from the session - * (session ID is provided in attachedToWorker notification). - */ - prependOnceListener(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification) => void): this; - /** - * Fired when page is about to send HTTP request. - */ - prependOnceListener(event: "Network.requestWillBeSent", listener: (message: InspectorNotification) => void): this; - /** - * Fired when HTTP response is available. - */ - prependOnceListener(event: "Network.responseReceived", listener: (message: InspectorNotification) => void): this; - prependOnceListener(event: "Network.loadingFailed", listener: (message: InspectorNotification) => void): this; - prependOnceListener(event: "Network.loadingFinished", listener: (message: InspectorNotification) => void): this; - /** - * Fired when data chunk was received over the network. - */ - prependOnceListener(event: "Network.dataReceived", listener: (message: InspectorNotification) => void): this; - /** - * Fired upon WebSocket creation. - */ - prependOnceListener(event: "Network.webSocketCreated", listener: (message: InspectorNotification) => void): this; - /** - * Fired when WebSocket is closed. - */ - prependOnceListener(event: "Network.webSocketClosed", listener: (message: InspectorNotification) => void): this; - /** - * Fired when WebSocket handshake response becomes available. - */ - prependOnceListener(event: "Network.webSocketHandshakeResponseReceived", listener: (message: InspectorNotification) => void): this; - /** - * This event is fired instead of `Runtime.executionContextDestroyed` when - * enabled. - * It is fired when the Node process finished all code execution and is - * waiting for all frontends to disconnect. - */ - prependOnceListener(event: "NodeRuntime.waitingForDisconnect", listener: () => void): this; - /** - * This event is fired when the runtime is waiting for the debugger. For - * example, when inspector.waitingForDebugger is called - */ - prependOnceListener(event: "NodeRuntime.waitingForDebugger", listener: () => void): this; - prependOnceListener(event: "Target.targetCreated", listener: (message: InspectorNotification) => void): this; - prependOnceListener(event: "Target.attachedToTarget", listener: (message: InspectorNotification) => void): this; - } -} diff --git a/PBandGraphScaffold/node_modules/@types/node/inspector/promises.d.ts b/PBandGraphScaffold/node_modules/@types/node/inspector/promises.d.ts deleted file mode 100644 index 54e1250..0000000 --- a/PBandGraphScaffold/node_modules/@types/node/inspector/promises.d.ts +++ /dev/null @@ -1,41 +0,0 @@ -/** - * The `node:inspector/promises` module provides an API for interacting with the V8 - * inspector. - * @see [source](https://github.com/nodejs/node/blob/v25.x/lib/inspector/promises.js) - * @since v19.0.0 - */ -declare module "node:inspector/promises" { - import { EventEmitter } from "node:events"; - export { close, console, NetworkResources, open, url, waitForDebugger } from "node:inspector"; - /** - * The `inspector.Session` is used for dispatching messages to the V8 inspector - * back-end and receiving message responses and notifications. - * @since v19.0.0 - */ - export class Session extends EventEmitter { - /** - * Create a new instance of the inspector.Session class. - * The inspector session needs to be connected through `session.connect()` before the messages can be dispatched to the inspector backend. - */ - constructor(); - /** - * Connects a session to the inspector back-end. - */ - connect(): void; - /** - * Connects a session to the inspector back-end. - * An exception will be thrown if this API was not called on a Worker thread. - * @since v12.11.0 - */ - connectToMainThread(): void; - /** - * Immediately close the session. All pending message callbacks will be called with an error. - * `session.connect()` will need to be called to be able to send messages again. - * Reconnected session will lose all inspector state, such as enabled agents or configured breakpoints. - */ - disconnect(): void; - } -} -declare module "inspector/promises" { - export * from "node:inspector/promises"; -} diff --git a/PBandGraphScaffold/node_modules/@types/node/module.d.ts b/PBandGraphScaffold/node_modules/@types/node/module.d.ts deleted file mode 100644 index 14c898f..0000000 --- a/PBandGraphScaffold/node_modules/@types/node/module.d.ts +++ /dev/null @@ -1,819 +0,0 @@ -/** - * @since v0.3.7 - */ -declare module "node:module" { - import { URL } from "node:url"; - class Module { - constructor(id: string, parent?: Module); - } - interface Module extends NodeJS.Module {} - namespace Module { - export { Module }; - } - namespace Module { - /** - * A list of the names of all modules provided by Node.js. Can be used to verify - * if a module is maintained by a third party or not. - * - * Note: the list doesn't contain prefix-only modules like `node:test`. - * @since v9.3.0, v8.10.0, v6.13.0 - */ - const builtinModules: readonly string[]; - /** - * @since v12.2.0 - * @param path Filename to be used to construct the require - * function. Must be a file URL object, file URL string, or absolute path - * string. - */ - function createRequire(path: string | URL): NodeJS.Require; - namespace constants { - /** - * The following constants are returned as the `status` field in the object returned by - * {@link enableCompileCache} to indicate the result of the attempt to enable the - * [module compile cache](https://nodejs.org/docs/latest-v25.x/api/module.html#module-compile-cache). - * @since v22.8.0 - */ - namespace compileCacheStatus { - /** - * Node.js has enabled the compile cache successfully. The directory used to store the - * compile cache will be returned in the `directory` field in the - * returned object. - */ - const ENABLED: number; - /** - * The compile cache has already been enabled before, either by a previous call to - * {@link enableCompileCache}, or by the `NODE_COMPILE_CACHE=dir` - * environment variable. The directory used to store the - * compile cache will be returned in the `directory` field in the - * returned object. - */ - const ALREADY_ENABLED: number; - /** - * Node.js fails to enable the compile cache. This can be caused by the lack of - * permission to use the specified directory, or various kinds of file system errors. - * The detail of the failure will be returned in the `message` field in the - * returned object. - */ - const FAILED: number; - /** - * Node.js cannot enable the compile cache because the environment variable - * `NODE_DISABLE_COMPILE_CACHE=1` has been set. - */ - const DISABLED: number; - } - } - interface EnableCompileCacheOptions { - /** - * Optional. Directory to store the compile cache. If not specified, - * the directory specified by the `NODE_COMPILE_CACHE=dir` environment variable - * will be used if it's set, or `path.join(os.tmpdir(), 'node-compile-cache')` - * otherwise. - * @since v25.0.0 - */ - directory?: string | undefined; - /** - * Optional. If `true`, enables portable compile cache so that - * the cache can be reused even if the project directory is moved. This is a best-effort - * feature. If not specified, it will depend on whether the environment variable - * `NODE_COMPILE_CACHE_PORTABLE=1` is set. - * @since v25.0.0 - */ - portable?: boolean | undefined; - } - interface EnableCompileCacheResult { - /** - * One of the {@link constants.compileCacheStatus} - */ - status: number; - /** - * If Node.js cannot enable the compile cache, this contains - * the error message. Only set if `status` is `module.constants.compileCacheStatus.FAILED`. - */ - message?: string; - /** - * If the compile cache is enabled, this contains the directory - * where the compile cache is stored. Only set if `status` is - * `module.constants.compileCacheStatus.ENABLED` or - * `module.constants.compileCacheStatus.ALREADY_ENABLED`. - */ - directory?: string; - } - /** - * Enable [module compile cache](https://nodejs.org/docs/latest-v25.x/api/module.html#module-compile-cache) - * in the current Node.js instance. - * - * For general use cases, it's recommended to call `module.enableCompileCache()` without - * specifying the `options.directory`, so that the directory can be overridden by the - * `NODE_COMPILE_CACHE` environment variable when necessary. - * - * Since compile cache is supposed to be a optimization that is not mission critical, this - * method is designed to not throw any exception when the compile cache cannot be enabled. - * Instead, it will return an object containing an error message in the `message` field to - * aid debugging. If compile cache is enabled successfully, the `directory` field in the - * returned object contains the path to the directory where the compile cache is stored. The - * `status` field in the returned object would be one of the `module.constants.compileCacheStatus` - * values to indicate the result of the attempt to enable the - * [module compile cache](https://nodejs.org/docs/latest-v25.x/api/module.html#module-compile-cache). - * - * This method only affects the current Node.js instance. To enable it in child worker threads, - * either call this method in child worker threads too, or set the - * `process.env.NODE_COMPILE_CACHE` value to compile cache directory so the behavior can - * be inherited into the child workers. The directory can be obtained either from the - * `directory` field returned by this method, or with {@link getCompileCacheDir}. - * @since v22.8.0 - * @param options Optional. If a string is passed, it is considered to be `options.directory`. - */ - function enableCompileCache(options?: string | EnableCompileCacheOptions): EnableCompileCacheResult; - /** - * Flush the [module compile cache](https://nodejs.org/docs/latest-v25.x/api/module.html#module-compile-cache) - * accumulated from modules already loaded - * in the current Node.js instance to disk. This returns after all the flushing - * file system operations come to an end, no matter they succeed or not. If there - * are any errors, this will fail silently, since compile cache misses should not - * interfere with the actual operation of the application. - * @since v22.10.0 - */ - function flushCompileCache(): void; - /** - * @since v22.8.0 - * @return Path to the [module compile cache](https://nodejs.org/docs/latest-v25.x/api/module.html#module-compile-cache) - * directory if it is enabled, or `undefined` otherwise. - */ - function getCompileCacheDir(): string | undefined; - /** - * ```text - * /path/to/project - * ├ packages/ - * ├ bar/ - * ├ bar.js - * └ package.json // name = '@foo/bar' - * └ qux/ - * ├ node_modules/ - * └ some-package/ - * └ package.json // name = 'some-package' - * ├ qux.js - * └ package.json // name = '@foo/qux' - * ├ main.js - * └ package.json // name = '@foo' - * ``` - * ```js - * // /path/to/project/packages/bar/bar.js - * import { findPackageJSON } from 'node:module'; - * - * findPackageJSON('..', import.meta.url); - * // '/path/to/project/package.json' - * // Same result when passing an absolute specifier instead: - * findPackageJSON(new URL('../', import.meta.url)); - * findPackageJSON(import.meta.resolve('../')); - * - * findPackageJSON('some-package', import.meta.url); - * // '/path/to/project/packages/bar/node_modules/some-package/package.json' - * // When passing an absolute specifier, you might get a different result if the - * // resolved module is inside a subfolder that has nested `package.json`. - * findPackageJSON(import.meta.resolve('some-package')); - * // '/path/to/project/packages/bar/node_modules/some-package/some-subfolder/package.json' - * - * findPackageJSON('@foo/qux', import.meta.url); - * // '/path/to/project/packages/qux/package.json' - * ``` - * @since v22.14.0 - * @param specifier The specifier for the module whose `package.json` to - * retrieve. When passing a _bare specifier_, the `package.json` at the root of - * the package is returned. When passing a _relative specifier_ or an _absolute specifier_, - * the closest parent `package.json` is returned. - * @param base The absolute location (`file:` URL string or FS path) of the - * containing module. For CJS, use `__filename` (not `__dirname`!); for ESM, use - * `import.meta.url`. You do not need to pass it if `specifier` is an _absolute specifier_. - * @returns A path if the `package.json` is found. When `startLocation` - * is a package, the package's root `package.json`; when a relative or unresolved, the closest - * `package.json` to the `startLocation`. - */ - function findPackageJSON(specifier: string | URL, base?: string | URL): string | undefined; - /** - * @since v18.6.0, v16.17.0 - */ - function isBuiltin(moduleName: string): boolean; - interface RegisterOptions { - /** - * If you want to resolve `specifier` relative to a - * base URL, such as `import.meta.url`, you can pass that URL here. This - * property is ignored if the `parentURL` is supplied as the second argument. - * @default 'data:' - */ - parentURL?: string | URL | undefined; - /** - * Any arbitrary, cloneable JavaScript value to pass into the - * {@link initialize} hook. - */ - data?: Data | undefined; - /** - * [Transferable objects](https://nodejs.org/docs/latest-v25.x/api/worker_threads.html#portpostmessagevalue-transferlist) - * to be passed into the `initialize` hook. - */ - transferList?: any[] | undefined; - } - /* eslint-disable @definitelytyped/no-unnecessary-generics */ - /** - * Register a module that exports hooks that customize Node.js module - * resolution and loading behavior. See - * [Customization hooks](https://nodejs.org/docs/latest-v25.x/api/module.html#customization-hooks). - * - * This feature requires `--allow-worker` if used with the - * [Permission Model](https://nodejs.org/docs/latest-v25.x/api/permissions.html#permission-model). - * @since v20.6.0, v18.19.0 - * @param specifier Customization hooks to be registered; this should be - * the same string that would be passed to `import()`, except that if it is - * relative, it is resolved relative to `parentURL`. - * @param parentURL f you want to resolve `specifier` relative to a base - * URL, such as `import.meta.url`, you can pass that URL here. - */ - function register( - specifier: string | URL, - parentURL?: string | URL, - options?: RegisterOptions, - ): void; - function register(specifier: string | URL, options?: RegisterOptions): void; - interface RegisterHooksOptions { - /** - * See [load hook](https://nodejs.org/docs/latest-v25.x/api/module.html#loadurl-context-nextload). - * @default undefined - */ - load?: LoadHookSync | undefined; - /** - * See [resolve hook](https://nodejs.org/docs/latest-v25.x/api/module.html#resolvespecifier-context-nextresolve). - * @default undefined - */ - resolve?: ResolveHookSync | undefined; - } - interface ModuleHooks { - /** - * Deregister the hook instance. - */ - deregister(): void; - } - /** - * Register [hooks](https://nodejs.org/docs/latest-v25.x/api/module.html#customization-hooks) - * that customize Node.js module resolution and loading behavior. - * @since v22.15.0 - * @experimental - */ - function registerHooks(options: RegisterHooksOptions): ModuleHooks; - interface StripTypeScriptTypesOptions { - /** - * Possible values are: - * * `'strip'` Only strip type annotations without performing the transformation of TypeScript features. - * * `'transform'` Strip type annotations and transform TypeScript features to JavaScript. - * @default 'strip' - */ - mode?: "strip" | "transform" | undefined; - /** - * Only when `mode` is `'transform'`, if `true`, a source map - * will be generated for the transformed code. - * @default false - */ - sourceMap?: boolean | undefined; - /** - * Specifies the source url used in the source map. - */ - sourceUrl?: string | undefined; - } - /** - * `module.stripTypeScriptTypes()` removes type annotations from TypeScript code. It - * can be used to strip type annotations from TypeScript code before running it - * with `vm.runInContext()` or `vm.compileFunction()`. - * By default, it will throw an error if the code contains TypeScript features - * that require transformation such as `Enums`, - * see [type-stripping](https://nodejs.org/docs/latest-v25.x/api/typescript.md#type-stripping) for more information. - * When mode is `'transform'`, it also transforms TypeScript features to JavaScript, - * see [transform TypeScript features](https://nodejs.org/docs/latest-v25.x/api/typescript.md#typescript-features) for more information. - * When mode is `'strip'`, source maps are not generated, because locations are preserved. - * If `sourceMap` is provided, when mode is `'strip'`, an error will be thrown. - * - * _WARNING_: The output of this function should not be considered stable across Node.js versions, - * due to changes in the TypeScript parser. - * - * ```js - * import { stripTypeScriptTypes } from 'node:module'; - * const code = 'const a: number = 1;'; - * const strippedCode = stripTypeScriptTypes(code); - * console.log(strippedCode); - * // Prints: const a = 1; - * ``` - * - * If `sourceUrl` is provided, it will be used appended as a comment at the end of the output: - * - * ```js - * import { stripTypeScriptTypes } from 'node:module'; - * const code = 'const a: number = 1;'; - * const strippedCode = stripTypeScriptTypes(code, { mode: 'strip', sourceUrl: 'source.ts' }); - * console.log(strippedCode); - * // Prints: const a = 1\n\n//# sourceURL=source.ts; - * ``` - * - * When `mode` is `'transform'`, the code is transformed to JavaScript: - * - * ```js - * import { stripTypeScriptTypes } from 'node:module'; - * const code = ` - * namespace MathUtil { - * export const add = (a: number, b: number) => a + b; - * }`; - * const strippedCode = stripTypeScriptTypes(code, { mode: 'transform', sourceMap: true }); - * console.log(strippedCode); - * // Prints: - * // var MathUtil; - * // (function(MathUtil) { - * // MathUtil.add = (a, b)=>a + b; - * // })(MathUtil || (MathUtil = {})); - * // # sourceMappingURL=data:application/json;base64, ... - * ``` - * @since v22.13.0 - * @param code The code to strip type annotations from. - * @returns The code with type annotations stripped. - */ - function stripTypeScriptTypes(code: string, options?: StripTypeScriptTypesOptions): string; - /* eslint-enable @definitelytyped/no-unnecessary-generics */ - /** - * The `module.syncBuiltinESMExports()` method updates all the live bindings for - * builtin `ES Modules` to match the properties of the `CommonJS` exports. It - * does not add or remove exported names from the `ES Modules`. - * - * ```js - * import fs from 'node:fs'; - * import assert from 'node:assert'; - * import { syncBuiltinESMExports } from 'node:module'; - * - * fs.readFile = newAPI; - * - * delete fs.readFileSync; - * - * function newAPI() { - * // ... - * } - * - * fs.newAPI = newAPI; - * - * syncBuiltinESMExports(); - * - * import('node:fs').then((esmFS) => { - * // It syncs the existing readFile property with the new value - * assert.strictEqual(esmFS.readFile, newAPI); - * // readFileSync has been deleted from the required fs - * assert.strictEqual('readFileSync' in fs, false); - * // syncBuiltinESMExports() does not remove readFileSync from esmFS - * assert.strictEqual('readFileSync' in esmFS, true); - * // syncBuiltinESMExports() does not add names - * assert.strictEqual(esmFS.newAPI, undefined); - * }); - * ``` - * @since v12.12.0 - */ - function syncBuiltinESMExports(): void; - interface ImportAttributes extends NodeJS.Dict { - type?: string | undefined; - } - type ImportPhase = "source" | "evaluation"; - type ModuleFormat = - | "addon" - | "builtin" - | "commonjs" - | "commonjs-typescript" - | "json" - | "module" - | "module-typescript" - | "wasm"; - type ModuleSource = string | ArrayBuffer | NodeJS.TypedArray; - /** - * The `initialize` hook provides a way to define a custom function that runs in - * the hooks thread when the hooks module is initialized. Initialization happens - * when the hooks module is registered via {@link register}. - * - * This hook can receive data from a {@link register} invocation, including - * ports and other transferable objects. The return value of `initialize` can be a - * `Promise`, in which case it will be awaited before the main application thread - * execution resumes. - */ - type InitializeHook = (data: Data) => void | Promise; - interface ResolveHookContext { - /** - * Export conditions of the relevant `package.json` - */ - conditions: string[]; - /** - * An object whose key-value pairs represent the assertions for the module to import - */ - importAttributes: ImportAttributes; - /** - * The module importing this one, or undefined if this is the Node.js entry point - */ - parentURL: string | undefined; - } - interface ResolveFnOutput { - /** - * A hint to the load hook (it might be ignored); can be an intermediary value. - */ - format?: string | null | undefined; - /** - * The import attributes to use when caching the module (optional; if excluded the input will be used) - */ - importAttributes?: ImportAttributes | undefined; - /** - * A signal that this hook intends to terminate the chain of `resolve` hooks. - * @default false - */ - shortCircuit?: boolean | undefined; - /** - * The absolute URL to which this input resolves - */ - url: string; - } - /** - * The `resolve` hook chain is responsible for telling Node.js where to find and - * how to cache a given `import` statement or expression, or `require` call. It can - * optionally return a format (such as `'module'`) as a hint to the `load` hook. If - * a format is specified, the `load` hook is ultimately responsible for providing - * the final `format` value (and it is free to ignore the hint provided by - * `resolve`); if `resolve` provides a `format`, a custom `load` hook is required - * even if only to pass the value to the Node.js default `load` hook. - */ - type ResolveHook = ( - specifier: string, - context: ResolveHookContext, - nextResolve: ( - specifier: string, - context?: Partial, - ) => ResolveFnOutput | Promise, - ) => ResolveFnOutput | Promise; - type ResolveHookSync = ( - specifier: string, - context: ResolveHookContext, - nextResolve: ( - specifier: string, - context?: Partial, - ) => ResolveFnOutput, - ) => ResolveFnOutput; - interface LoadHookContext { - /** - * Export conditions of the relevant `package.json` - */ - conditions: string[]; - /** - * The format optionally supplied by the `resolve` hook chain (can be an intermediary value). - */ - format: string | null | undefined; - /** - * An object whose key-value pairs represent the assertions for the module to import - */ - importAttributes: ImportAttributes; - } - interface LoadFnOutput { - format: string | null | undefined; - /** - * A signal that this hook intends to terminate the chain of `resolve` hooks. - * @default false - */ - shortCircuit?: boolean | undefined; - /** - * The source for Node.js to evaluate - */ - source?: ModuleSource | undefined; - } - /** - * The `load` hook provides a way to define a custom method of determining how a - * URL should be interpreted, retrieved, and parsed. It is also in charge of - * validating the import attributes. - */ - type LoadHook = ( - url: string, - context: LoadHookContext, - nextLoad: ( - url: string, - context?: Partial, - ) => LoadFnOutput | Promise, - ) => LoadFnOutput | Promise; - type LoadHookSync = ( - url: string, - context: LoadHookContext, - nextLoad: ( - url: string, - context?: Partial, - ) => LoadFnOutput, - ) => LoadFnOutput; - interface SourceMapsSupport { - /** - * If the source maps support is enabled - */ - enabled: boolean; - /** - * If the support is enabled for files in `node_modules`. - */ - nodeModules: boolean; - /** - * If the support is enabled for generated code from `eval` or `new Function`. - */ - generatedCode: boolean; - } - /** - * This method returns whether the [Source Map v3](https://tc39.es/ecma426/) support for stack - * traces is enabled. - * @since v23.7.0, v22.14.0 - */ - function getSourceMapsSupport(): SourceMapsSupport; - /** - * `path` is the resolved path for the file for which a corresponding source map - * should be fetched. - * @since v13.7.0, v12.17.0 - * @return Returns `module.SourceMap` if a source map is found, `undefined` otherwise. - */ - function findSourceMap(path: string): SourceMap | undefined; - interface SetSourceMapsSupportOptions { - /** - * If enabling the support for files in `node_modules`. - * @default false - */ - nodeModules?: boolean | undefined; - /** - * If enabling the support for generated code from `eval` or `new Function`. - * @default false - */ - generatedCode?: boolean | undefined; - } - /** - * This function enables or disables the [Source Map v3](https://tc39.es/ecma426/) support for - * stack traces. - * - * It provides same features as launching Node.js process with commandline options - * `--enable-source-maps`, with additional options to alter the support for files - * in `node_modules` or generated codes. - * - * Only source maps in JavaScript files that are loaded after source maps has been - * enabled will be parsed and loaded. Preferably, use the commandline options - * `--enable-source-maps` to avoid losing track of source maps of modules loaded - * before this API call. - * @since v23.7.0, v22.14.0 - */ - function setSourceMapsSupport(enabled: boolean, options?: SetSourceMapsSupportOptions): void; - interface SourceMapConstructorOptions { - /** - * @since v21.0.0, v20.5.0 - */ - lineLengths?: readonly number[] | undefined; - } - interface SourceMapPayload { - file: string; - version: number; - sources: string[]; - sourcesContent: string[]; - names: string[]; - mappings: string; - sourceRoot: string; - } - interface SourceMapping { - generatedLine: number; - generatedColumn: number; - originalSource: string; - originalLine: number; - originalColumn: number; - } - interface SourceOrigin { - /** - * The name of the range in the source map, if one was provided - */ - name: string | undefined; - /** - * The file name of the original source, as reported in the SourceMap - */ - fileName: string; - /** - * The 1-indexed lineNumber of the corresponding call site in the original source - */ - lineNumber: number; - /** - * The 1-indexed columnNumber of the corresponding call site in the original source - */ - columnNumber: number; - } - /** - * @since v13.7.0, v12.17.0 - */ - class SourceMap { - constructor(payload: SourceMapPayload, options?: SourceMapConstructorOptions); - /** - * Getter for the payload used to construct the `SourceMap` instance. - */ - readonly payload: SourceMapPayload; - /** - * Given a line offset and column offset in the generated source - * file, returns an object representing the SourceMap range in the - * original file if found, or an empty object if not. - * - * The object returned contains the following keys: - * - * The returned value represents the raw range as it appears in the - * SourceMap, based on zero-indexed offsets, _not_ 1-indexed line and - * column numbers as they appear in Error messages and CallSite - * objects. - * - * To get the corresponding 1-indexed line and column numbers from a - * lineNumber and columnNumber as they are reported by Error stacks - * and CallSite objects, use `sourceMap.findOrigin(lineNumber, columnNumber)` - * @param lineOffset The zero-indexed line number offset in the generated source - * @param columnOffset The zero-indexed column number offset in the generated source - */ - findEntry(lineOffset: number, columnOffset: number): SourceMapping | {}; - /** - * Given a 1-indexed `lineNumber` and `columnNumber` from a call site in the generated source, - * find the corresponding call site location in the original source. - * - * If the `lineNumber` and `columnNumber` provided are not found in any source map, - * then an empty object is returned. - * @param lineNumber The 1-indexed line number of the call site in the generated source - * @param columnNumber The 1-indexed column number of the call site in the generated source - */ - findOrigin(lineNumber: number, columnNumber: number): SourceOrigin | {}; - } - function runMain(main?: string): void; - function wrap(script: string): string; - } - global { - namespace NodeJS { - interface Module { - /** - * The module objects required for the first time by this one. - * @since v0.1.16 - */ - children: Module[]; - /** - * The `module.exports` object is created by the `Module` system. Sometimes this is - * not acceptable; many want their module to be an instance of some class. To do - * this, assign the desired export object to `module.exports`. - * @since v0.1.16 - */ - exports: any; - /** - * The fully resolved filename of the module. - * @since v0.1.16 - */ - filename: string; - /** - * The identifier for the module. Typically this is the fully resolved - * filename. - * @since v0.1.16 - */ - id: string; - /** - * `true` if the module is running during the Node.js preload - * phase. - * @since v15.4.0, v14.17.0 - */ - isPreloading: boolean; - /** - * Whether or not the module is done loading, or is in the process of - * loading. - * @since v0.1.16 - */ - loaded: boolean; - /** - * The module that first required this one, or `null` if the current module is the - * entry point of the current process, or `undefined` if the module was loaded by - * something that is not a CommonJS module (e.g. REPL or `import`). - * @since v0.1.16 - * @deprecated Please use `require.main` and `module.children` instead. - */ - parent: Module | null | undefined; - /** - * The directory name of the module. This is usually the same as the - * `path.dirname()` of the `module.id`. - * @since v11.14.0 - */ - path: string; - /** - * The search paths for the module. - * @since v0.4.0 - */ - paths: string[]; - /** - * The `module.require()` method provides a way to load a module as if - * `require()` was called from the original module. - * @since v0.5.1 - */ - require(id: string): any; - } - interface Require { - /** - * Used to import modules, `JSON`, and local files. - * @since v0.1.13 - */ - (id: string): any; - /** - * Modules are cached in this object when they are required. By deleting a key - * value from this object, the next `require` will reload the module. - * This does not apply to - * [native addons](https://nodejs.org/docs/latest-v25.x/api/addons.html), - * for which reloading will result in an error. - * @since v0.3.0 - */ - cache: Dict; - /** - * Instruct `require` on how to handle certain file extensions. - * @since v0.3.0 - * @deprecated - */ - extensions: RequireExtensions; - /** - * The `Module` object representing the entry script loaded when the Node.js - * process launched, or `undefined` if the entry point of the program is not a - * CommonJS module. - * @since v0.1.17 - */ - main: Module | undefined; - /** - * @since v0.3.0 - */ - resolve: RequireResolve; - } - /** @deprecated */ - interface RequireExtensions extends Dict<(module: Module, filename: string) => any> { - ".js": (module: Module, filename: string) => any; - ".json": (module: Module, filename: string) => any; - ".node": (module: Module, filename: string) => any; - } - interface RequireResolveOptions { - /** - * Paths to resolve module location from. If present, these - * paths are used instead of the default resolution paths, with the exception - * of - * [GLOBAL\_FOLDERS](https://nodejs.org/docs/latest-v25.x/api/modules.html#loading-from-the-global-folders) - * like `$HOME/.node_modules`, which are - * always included. Each of these paths is used as a starting point for - * the module resolution algorithm, meaning that the `node_modules` hierarchy - * is checked from this location. - * @since v8.9.0 - */ - paths?: string[] | undefined; - } - interface RequireResolve { - /** - * Use the internal `require()` machinery to look up the location of a module, - * but rather than loading the module, just return the resolved filename. - * - * If the module can not be found, a `MODULE_NOT_FOUND` error is thrown. - * @since v0.3.0 - * @param request The module path to resolve. - */ - (request: string, options?: RequireResolveOptions): string; - /** - * Returns an array containing the paths searched during resolution of `request` or - * `null` if the `request` string references a core module, for example `http` or - * `fs`. - * @since v8.9.0 - * @param request The module path whose lookup paths are being retrieved. - */ - paths(request: string): string[] | null; - } - } - /** - * The directory name of the current module. This is the same as the - * `path.dirname()` of the `__filename`. - * @since v0.1.27 - */ - var __dirname: string; - /** - * The file name of the current module. This is the current module file's absolute - * path with symlinks resolved. - * - * For a main program this is not necessarily the same as the file name used in the - * command line. - * @since v0.0.1 - */ - var __filename: string; - /** - * The `exports` variable is available within a module's file-level scope, and is - * assigned the value of `module.exports` before the module is evaluated. - * @since v0.1.16 - */ - var exports: NodeJS.Module["exports"]; - /** - * A reference to the current module. - * @since v0.1.16 - */ - var module: NodeJS.Module; - /** - * @since v0.1.13 - */ - var require: NodeJS.Require; - // Global-scope aliases for backwards compatibility with @types/node <13.0.x - // TODO: consider removing in a future major version update - /** @deprecated Use `NodeJS.Module` instead. */ - interface NodeModule extends NodeJS.Module {} - /** @deprecated Use `NodeJS.Require` instead. */ - interface NodeRequire extends NodeJS.Require {} - /** @deprecated Use `NodeJS.RequireResolve` instead. */ - interface RequireResolve extends NodeJS.RequireResolve {} - } - export = Module; -} -declare module "module" { - import module = require("node:module"); - export = module; -} diff --git a/PBandGraphScaffold/node_modules/@types/node/net.d.ts b/PBandGraphScaffold/node_modules/@types/node/net.d.ts deleted file mode 100644 index e0cf837..0000000 --- a/PBandGraphScaffold/node_modules/@types/node/net.d.ts +++ /dev/null @@ -1,933 +0,0 @@ -/** - * > Stability: 2 - Stable - * - * The `node:net` module provides an asynchronous network API for creating stream-based - * TCP or `IPC` servers ({@link createServer}) and clients - * ({@link createConnection}). - * - * It can be accessed using: - * - * ```js - * import net from 'node:net'; - * ``` - * @see [source](https://github.com/nodejs/node/blob/v25.x/lib/net.js) - */ -declare module "node:net" { - import { NonSharedBuffer } from "node:buffer"; - import * as dns from "node:dns"; - import { Abortable, EventEmitter, InternalEventEmitter } from "node:events"; - import * as stream from "node:stream"; - type LookupFunction = ( - hostname: string, - options: dns.LookupOptions, - callback: (err: NodeJS.ErrnoException | null, address: string | dns.LookupAddress[], family?: number) => void, - ) => void; - interface AddressInfo { - address: string; - family: string; - port: number; - } - interface SocketConstructorOpts { - fd?: number | undefined; - allowHalfOpen?: boolean | undefined; - onread?: OnReadOpts | undefined; - readable?: boolean | undefined; - writable?: boolean | undefined; - signal?: AbortSignal | undefined; - } - interface OnReadOpts { - buffer: Uint8Array | (() => Uint8Array); - /** - * This function is called for every chunk of incoming data. - * Two arguments are passed to it: the number of bytes written to `buffer` and a reference to `buffer`. - * Return `false` from this function to implicitly `pause()` the socket. - */ - callback(bytesWritten: number, buffer: Uint8Array): boolean; - } - interface TcpSocketConnectOpts { - port: number; - host?: string | undefined; - localAddress?: string | undefined; - localPort?: number | undefined; - hints?: number | undefined; - family?: number | undefined; - lookup?: LookupFunction | undefined; - noDelay?: boolean | undefined; - keepAlive?: boolean | undefined; - keepAliveInitialDelay?: number | undefined; - /** - * @since v18.13.0 - */ - autoSelectFamily?: boolean | undefined; - /** - * @since v18.13.0 - */ - autoSelectFamilyAttemptTimeout?: number | undefined; - blockList?: BlockList | undefined; - } - interface IpcSocketConnectOpts { - path: string; - } - type SocketConnectOpts = TcpSocketConnectOpts | IpcSocketConnectOpts; - type SocketReadyState = "opening" | "open" | "readOnly" | "writeOnly" | "closed"; - interface SocketEventMap extends Omit { - "close": [hadError: boolean]; - "connect": []; - "connectionAttempt": [ip: string, port: number, family: number]; - "connectionAttemptFailed": [ip: string, port: number, family: number, error: Error]; - "connectionAttemptTimeout": [ip: string, port: number, family: number]; - "data": [data: string | NonSharedBuffer]; - "lookup": [err: Error | null, address: string, family: number | null, host: string]; - "ready": []; - "timeout": []; - } - /** - * This class is an abstraction of a TCP socket or a streaming `IPC` endpoint - * (uses named pipes on Windows, and Unix domain sockets otherwise). It is also - * an `EventEmitter`. - * - * A `net.Socket` can be created by the user and used directly to interact with - * a server. For example, it is returned by {@link createConnection}, - * so the user can use it to talk to the server. - * - * It can also be created by Node.js and passed to the user when a connection - * is received. For example, it is passed to the listeners of a `'connection'` event emitted on a {@link Server}, so the user can use - * it to interact with the client. - * @since v0.3.4 - */ - class Socket extends stream.Duplex { - constructor(options?: SocketConstructorOpts); - /** - * Destroys the socket after all data is written. If the `finish` event was already emitted the socket is destroyed immediately. - * If the socket is still writable it implicitly calls `socket.end()`. - * @since v0.3.4 - */ - destroySoon(): void; - /** - * Sends data on the socket. The second parameter specifies the encoding in the - * case of a string. It defaults to UTF8 encoding. - * - * Returns `true` if the entire data was flushed successfully to the kernel - * buffer. Returns `false` if all or part of the data was queued in user memory.`'drain'` will be emitted when the buffer is again free. - * - * The optional `callback` parameter will be executed when the data is finally - * written out, which may not be immediately. - * - * See `Writable` stream `write()` method for more - * information. - * @since v0.1.90 - * @param [encoding='utf8'] Only used when data is `string`. - */ - write(buffer: Uint8Array | string, cb?: (err?: Error | null) => void): boolean; - write(str: Uint8Array | string, encoding?: BufferEncoding, cb?: (err?: Error | null) => void): boolean; - /** - * Initiate a connection on a given socket. - * - * Possible signatures: - * - * * `socket.connect(options[, connectListener])` - * * `socket.connect(path[, connectListener])` for `IPC` connections. - * * `socket.connect(port[, host][, connectListener])` for TCP connections. - * * Returns: `net.Socket` The socket itself. - * - * This function is asynchronous. When the connection is established, the `'connect'` event will be emitted. If there is a problem connecting, - * instead of a `'connect'` event, an `'error'` event will be emitted with - * the error passed to the `'error'` listener. - * The last parameter `connectListener`, if supplied, will be added as a listener - * for the `'connect'` event **once**. - * - * This function should only be used for reconnecting a socket after`'close'` has been emitted or otherwise it may lead to undefined - * behavior. - */ - connect(options: SocketConnectOpts, connectionListener?: () => void): this; - connect(port: number, host: string, connectionListener?: () => void): this; - connect(port: number, connectionListener?: () => void): this; - connect(path: string, connectionListener?: () => void): this; - /** - * Set the encoding for the socket as a `Readable Stream`. See `readable.setEncoding()` for more information. - * @since v0.1.90 - * @return The socket itself. - */ - setEncoding(encoding?: BufferEncoding): this; - /** - * Pauses the reading of data. That is, `'data'` events will not be emitted. - * Useful to throttle back an upload. - * @return The socket itself. - */ - pause(): this; - /** - * Close the TCP connection by sending an RST packet and destroy the stream. - * If this TCP socket is in connecting status, it will send an RST packet and destroy this TCP socket once it is connected. - * Otherwise, it will call `socket.destroy` with an `ERR_SOCKET_CLOSED` Error. - * If this is not a TCP socket (for example, a pipe), calling this method will immediately throw an `ERR_INVALID_HANDLE_TYPE` Error. - * @since v18.3.0, v16.17.0 - */ - resetAndDestroy(): this; - /** - * Resumes reading after a call to `socket.pause()`. - * @return The socket itself. - */ - resume(): this; - /** - * Sets the socket to timeout after `timeout` milliseconds of inactivity on - * the socket. By default `net.Socket` do not have a timeout. - * - * When an idle timeout is triggered the socket will receive a `'timeout'` event but the connection will not be severed. The user must manually call `socket.end()` or `socket.destroy()` to - * end the connection. - * - * ```js - * socket.setTimeout(3000); - * socket.on('timeout', () => { - * console.log('socket timeout'); - * socket.end(); - * }); - * ``` - * - * If `timeout` is 0, then the existing idle timeout is disabled. - * - * The optional `callback` parameter will be added as a one-time listener for the `'timeout'` event. - * @since v0.1.90 - * @return The socket itself. - */ - setTimeout(timeout: number, callback?: () => void): this; - /** - * Enable/disable the use of Nagle's algorithm. - * - * When a TCP connection is created, it will have Nagle's algorithm enabled. - * - * Nagle's algorithm delays data before it is sent via the network. It attempts - * to optimize throughput at the expense of latency. - * - * Passing `true` for `noDelay` or not passing an argument will disable Nagle's - * algorithm for the socket. Passing `false` for `noDelay` will enable Nagle's - * algorithm. - * @since v0.1.90 - * @param [noDelay=true] - * @return The socket itself. - */ - setNoDelay(noDelay?: boolean): this; - /** - * Enable/disable keep-alive functionality, and optionally set the initial - * delay before the first keepalive probe is sent on an idle socket. - * - * Set `initialDelay` (in milliseconds) to set the delay between the last - * data packet received and the first keepalive probe. Setting `0` for`initialDelay` will leave the value unchanged from the default - * (or previous) setting. - * - * Enabling the keep-alive functionality will set the following socket options: - * - * * `SO_KEEPALIVE=1` - * * `TCP_KEEPIDLE=initialDelay` - * * `TCP_KEEPCNT=10` - * * `TCP_KEEPINTVL=1` - * @since v0.1.92 - * @param [enable=false] - * @param [initialDelay=0] - * @return The socket itself. - */ - setKeepAlive(enable?: boolean, initialDelay?: number): this; - /** - * Returns the bound `address`, the address `family` name and `port` of the - * socket as reported by the operating system:`{ port: 12346, family: 'IPv4', address: '127.0.0.1' }` - * @since v0.1.90 - */ - address(): AddressInfo | {}; - /** - * Calling `unref()` on a socket will allow the program to exit if this is the only - * active socket in the event system. If the socket is already `unref`ed calling`unref()` again will have no effect. - * @since v0.9.1 - * @return The socket itself. - */ - unref(): this; - /** - * Opposite of `unref()`, calling `ref()` on a previously `unref`ed socket will _not_ let the program exit if it's the only socket left (the default behavior). - * If the socket is `ref`ed calling `ref` again will have no effect. - * @since v0.9.1 - * @return The socket itself. - */ - ref(): this; - /** - * This property is only present if the family autoselection algorithm is enabled in `socket.connect(options)` - * and it is an array of the addresses that have been attempted. - * - * Each address is a string in the form of `$IP:$PORT`. - * If the connection was successful, then the last address is the one that the socket is currently connected to. - * @since v19.4.0 - */ - readonly autoSelectFamilyAttemptedAddresses: string[]; - /** - * This property shows the number of characters buffered for writing. The buffer - * may contain strings whose length after encoding is not yet known. So this number - * is only an approximation of the number of bytes in the buffer. - * - * `net.Socket` has the property that `socket.write()` always works. This is to - * help users get up and running quickly. The computer cannot always keep up - * with the amount of data that is written to a socket. The network connection - * simply might be too slow. Node.js will internally queue up the data written to a - * socket and send it out over the wire when it is possible. - * - * The consequence of this internal buffering is that memory may grow. - * Users who experience large or growing `bufferSize` should attempt to - * "throttle" the data flows in their program with `socket.pause()` and `socket.resume()`. - * @since v0.3.8 - * @deprecated Since v14.6.0 - Use `writableLength` instead. - */ - readonly bufferSize: number; - /** - * The amount of received bytes. - * @since v0.5.3 - */ - readonly bytesRead: number; - /** - * The amount of bytes sent. - * @since v0.5.3 - */ - readonly bytesWritten: number; - /** - * If `true`, `socket.connect(options[, connectListener])` was - * called and has not yet finished. It will stay `true` until the socket becomes - * connected, then it is set to `false` and the `'connect'` event is emitted. Note - * that the `socket.connect(options[, connectListener])` callback is a listener for the `'connect'` event. - * @since v6.1.0 - */ - readonly connecting: boolean; - /** - * This is `true` if the socket is not connected yet, either because `.connect()`has not yet been called or because it is still in the process of connecting - * (see `socket.connecting`). - * @since v11.2.0, v10.16.0 - */ - readonly pending: boolean; - /** - * See `writable.destroyed` for further details. - */ - readonly destroyed: boolean; - /** - * The string representation of the local IP address the remote client is - * connecting on. For example, in a server listening on `'0.0.0.0'`, if a client - * connects on `'192.168.1.1'`, the value of `socket.localAddress` would be`'192.168.1.1'`. - * @since v0.9.6 - */ - readonly localAddress?: string; - /** - * The numeric representation of the local port. For example, `80` or `21`. - * @since v0.9.6 - */ - readonly localPort?: number; - /** - * The string representation of the local IP family. `'IPv4'` or `'IPv6'`. - * @since v18.8.0, v16.18.0 - */ - readonly localFamily?: string; - /** - * This property represents the state of the connection as a string. - * - * * If the stream is connecting `socket.readyState` is `opening`. - * * If the stream is readable and writable, it is `open`. - * * If the stream is readable and not writable, it is `readOnly`. - * * If the stream is not readable and writable, it is `writeOnly`. - * @since v0.5.0 - */ - readonly readyState: SocketReadyState; - /** - * The string representation of the remote IP address. For example,`'74.125.127.100'` or `'2001:4860:a005::68'`. Value may be `undefined` if - * the socket is destroyed (for example, if the client disconnected). - * @since v0.5.10 - */ - readonly remoteAddress: string | undefined; - /** - * The string representation of the remote IP family. `'IPv4'` or `'IPv6'`. Value may be `undefined` if - * the socket is destroyed (for example, if the client disconnected). - * @since v0.11.14 - */ - readonly remoteFamily: string | undefined; - /** - * The numeric representation of the remote port. For example, `80` or `21`. Value may be `undefined` if - * the socket is destroyed (for example, if the client disconnected). - * @since v0.5.10 - */ - readonly remotePort: number | undefined; - /** - * The socket timeout in milliseconds as set by `socket.setTimeout()`. - * It is `undefined` if a timeout has not been set. - * @since v10.7.0 - */ - readonly timeout?: number; - /** - * Half-closes the socket. i.e., it sends a FIN packet. It is possible the - * server will still send some data. - * - * See `writable.end()` for further details. - * @since v0.1.90 - * @param [encoding='utf8'] Only used when data is `string`. - * @param callback Optional callback for when the socket is finished. - * @return The socket itself. - */ - end(callback?: () => void): this; - end(buffer: Uint8Array | string, callback?: () => void): this; - end(str: Uint8Array | string, encoding?: BufferEncoding, callback?: () => void): this; - // #region InternalEventEmitter - addListener(eventName: E, listener: (...args: SocketEventMap[E]) => void): this; - addListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - emit(eventName: E, ...args: SocketEventMap[E]): boolean; - emit(eventName: string | symbol, ...args: any[]): boolean; - listenerCount( - eventName: E, - listener?: (...args: SocketEventMap[E]) => void, - ): number; - listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number; - listeners(eventName: E): ((...args: SocketEventMap[E]) => void)[]; - listeners(eventName: string | symbol): ((...args: any[]) => void)[]; - off(eventName: E, listener: (...args: SocketEventMap[E]) => void): this; - off(eventName: string | symbol, listener: (...args: any[]) => void): this; - on(eventName: E, listener: (...args: SocketEventMap[E]) => void): this; - on(eventName: string | symbol, listener: (...args: any[]) => void): this; - once(eventName: E, listener: (...args: SocketEventMap[E]) => void): this; - once(eventName: string | symbol, listener: (...args: any[]) => void): this; - prependListener( - eventName: E, - listener: (...args: SocketEventMap[E]) => void, - ): this; - prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - prependOnceListener( - eventName: E, - listener: (...args: SocketEventMap[E]) => void, - ): this; - prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - rawListeners(eventName: E): ((...args: SocketEventMap[E]) => void)[]; - rawListeners(eventName: string | symbol): ((...args: any[]) => void)[]; - // eslint-disable-next-line @definitelytyped/no-unnecessary-generics - removeAllListeners(eventName?: E): this; - removeAllListeners(eventName?: string | symbol): this; - removeListener( - eventName: E, - listener: (...args: SocketEventMap[E]) => void, - ): this; - removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - // #endregion - } - interface ListenOptions extends Abortable { - backlog?: number | undefined; - exclusive?: boolean | undefined; - host?: string | undefined; - /** - * @default false - */ - ipv6Only?: boolean | undefined; - reusePort?: boolean | undefined; - path?: string | undefined; - port?: number | undefined; - readableAll?: boolean | undefined; - writableAll?: boolean | undefined; - } - interface ServerOpts { - /** - * Indicates whether half-opened TCP connections are allowed. - * @default false - */ - allowHalfOpen?: boolean | undefined; - /** - * Indicates whether the socket should be paused on incoming connections. - * @default false - */ - pauseOnConnect?: boolean | undefined; - /** - * If set to `true`, it disables the use of Nagle's algorithm immediately after a new incoming connection is received. - * @default false - * @since v16.5.0 - */ - noDelay?: boolean | undefined; - /** - * If set to `true`, it enables keep-alive functionality on the socket immediately after a new incoming connection is received, - * similarly on what is done in `socket.setKeepAlive([enable][, initialDelay])`. - * @default false - * @since v16.5.0 - */ - keepAlive?: boolean | undefined; - /** - * If set to a positive number, it sets the initial delay before the first keepalive probe is sent on an idle socket. - * @default 0 - * @since v16.5.0 - */ - keepAliveInitialDelay?: number | undefined; - /** - * Optionally overrides all `net.Socket`s' `readableHighWaterMark` and `writableHighWaterMark`. - * @default See [stream.getDefaultHighWaterMark()](https://nodejs.org/docs/latest-v25.x/api/stream.html#streamgetdefaulthighwatermarkobjectmode). - * @since v18.17.0, v20.1.0 - */ - highWaterMark?: number | undefined; - /** - * `blockList` can be used for disabling inbound - * access to specific IP addresses, IP ranges, or IP subnets. This does not - * work if the server is behind a reverse proxy, NAT, etc. because the address - * checked against the block list is the address of the proxy, or the one - * specified by the NAT. - * @since v22.13.0 - */ - blockList?: BlockList | undefined; - } - interface DropArgument { - localAddress?: string; - localPort?: number; - localFamily?: string; - remoteAddress?: string; - remotePort?: number; - remoteFamily?: string; - } - interface ServerEventMap { - "close": []; - "connection": [socket: Socket]; - "error": [err: Error]; - "listening": []; - "drop": [data?: DropArgument]; - } - /** - * This class is used to create a TCP or `IPC` server. - * @since v0.1.90 - */ - class Server implements EventEmitter { - constructor(connectionListener?: (socket: Socket) => void); - constructor(options?: ServerOpts, connectionListener?: (socket: Socket) => void); - /** - * Start a server listening for connections. A `net.Server` can be a TCP or - * an `IPC` server depending on what it listens to. - * - * Possible signatures: - * - * * `server.listen(handle[, backlog][, callback])` - * * `server.listen(options[, callback])` - * * `server.listen(path[, backlog][, callback])` for `IPC` servers - * * `server.listen([port[, host[, backlog]]][, callback])` for TCP servers - * - * This function is asynchronous. When the server starts listening, the `'listening'` event will be emitted. The last parameter `callback`will be added as a listener for the `'listening'` - * event. - * - * All `listen()` methods can take a `backlog` parameter to specify the maximum - * length of the queue of pending connections. The actual length will be determined - * by the OS through sysctl settings such as `tcp_max_syn_backlog` and `somaxconn` on Linux. The default value of this parameter is 511 (not 512). - * - * All {@link Socket} are set to `SO_REUSEADDR` (see [`socket(7)`](https://man7.org/linux/man-pages/man7/socket.7.html) for - * details). - * - * The `server.listen()` method can be called again if and only if there was an - * error during the first `server.listen()` call or `server.close()` has been - * called. Otherwise, an `ERR_SERVER_ALREADY_LISTEN` error will be thrown. - * - * One of the most common errors raised when listening is `EADDRINUSE`. - * This happens when another server is already listening on the requested`port`/`path`/`handle`. One way to handle this would be to retry - * after a certain amount of time: - * - * ```js - * server.on('error', (e) => { - * if (e.code === 'EADDRINUSE') { - * console.error('Address in use, retrying...'); - * setTimeout(() => { - * server.close(); - * server.listen(PORT, HOST); - * }, 1000); - * } - * }); - * ``` - */ - listen(port?: number, hostname?: string, backlog?: number, listeningListener?: () => void): this; - listen(port?: number, hostname?: string, listeningListener?: () => void): this; - listen(port?: number, backlog?: number, listeningListener?: () => void): this; - listen(port?: number, listeningListener?: () => void): this; - listen(path: string, backlog?: number, listeningListener?: () => void): this; - listen(path: string, listeningListener?: () => void): this; - listen(options: ListenOptions, listeningListener?: () => void): this; - listen(handle: any, backlog?: number, listeningListener?: () => void): this; - listen(handle: any, listeningListener?: () => void): this; - /** - * Stops the server from accepting new connections and keeps existing - * connections. This function is asynchronous, the server is finally closed - * when all connections are ended and the server emits a `'close'` event. - * The optional `callback` will be called once the `'close'` event occurs. Unlike - * that event, it will be called with an `Error` as its only argument if the server - * was not open when it was closed. - * @since v0.1.90 - * @param callback Called when the server is closed. - */ - close(callback?: (err?: Error) => void): this; - /** - * Returns the bound `address`, the address `family` name, and `port` of the server - * as reported by the operating system if listening on an IP socket - * (useful to find which port was assigned when getting an OS-assigned address):`{ port: 12346, family: 'IPv4', address: '127.0.0.1' }`. - * - * For a server listening on a pipe or Unix domain socket, the name is returned - * as a string. - * - * ```js - * const server = net.createServer((socket) => { - * socket.end('goodbye\n'); - * }).on('error', (err) => { - * // Handle errors here. - * throw err; - * }); - * - * // Grab an arbitrary unused port. - * server.listen(() => { - * console.log('opened server on', server.address()); - * }); - * ``` - * - * `server.address()` returns `null` before the `'listening'` event has been - * emitted or after calling `server.close()`. - * @since v0.1.90 - */ - address(): AddressInfo | string | null; - /** - * Asynchronously get the number of concurrent connections on the server. Works - * when sockets were sent to forks. - * - * Callback should take two arguments `err` and `count`. - * @since v0.9.7 - */ - getConnections(cb: (error: Error | null, count: number) => void): this; - /** - * Opposite of `unref()`, calling `ref()` on a previously `unref`ed server will _not_ let the program exit if it's the only server left (the default behavior). - * If the server is `ref`ed calling `ref()` again will have no effect. - * @since v0.9.1 - */ - ref(): this; - /** - * Calling `unref()` on a server will allow the program to exit if this is the only - * active server in the event system. If the server is already `unref`ed calling`unref()` again will have no effect. - * @since v0.9.1 - */ - unref(): this; - /** - * Set this property to reject connections when the server's connection count gets - * high. - * - * It is not recommended to use this option once a socket has been sent to a child - * with `child_process.fork()`. - * @since v0.2.0 - */ - maxConnections: number; - connections: number; - /** - * Indicates whether or not the server is listening for connections. - * @since v5.7.0 - */ - readonly listening: boolean; - /** - * Calls {@link Server.close()} and returns a promise that fulfills when the server has closed. - * @since v20.5.0 - */ - [Symbol.asyncDispose](): Promise; - } - interface Server extends InternalEventEmitter {} - type IPVersion = "ipv4" | "ipv6"; - /** - * The `BlockList` object can be used with some network APIs to specify rules for - * disabling inbound or outbound access to specific IP addresses, IP ranges, or - * IP subnets. - * @since v15.0.0, v14.18.0 - */ - class BlockList { - /** - * Adds a rule to block the given IP address. - * @since v15.0.0, v14.18.0 - * @param address An IPv4 or IPv6 address. - * @param [type='ipv4'] Either `'ipv4'` or `'ipv6'`. - */ - addAddress(address: string, type?: IPVersion): void; - addAddress(address: SocketAddress): void; - /** - * Adds a rule to block a range of IP addresses from `start` (inclusive) to`end` (inclusive). - * @since v15.0.0, v14.18.0 - * @param start The starting IPv4 or IPv6 address in the range. - * @param end The ending IPv4 or IPv6 address in the range. - * @param [type='ipv4'] Either `'ipv4'` or `'ipv6'`. - */ - addRange(start: string, end: string, type?: IPVersion): void; - addRange(start: SocketAddress, end: SocketAddress): void; - /** - * Adds a rule to block a range of IP addresses specified as a subnet mask. - * @since v15.0.0, v14.18.0 - * @param net The network IPv4 or IPv6 address. - * @param prefix The number of CIDR prefix bits. For IPv4, this must be a value between `0` and `32`. For IPv6, this must be between `0` and `128`. - * @param [type='ipv4'] Either `'ipv4'` or `'ipv6'`. - */ - addSubnet(net: SocketAddress, prefix: number): void; - addSubnet(net: string, prefix: number, type?: IPVersion): void; - /** - * Returns `true` if the given IP address matches any of the rules added to the`BlockList`. - * - * ```js - * const blockList = new net.BlockList(); - * blockList.addAddress('123.123.123.123'); - * blockList.addRange('10.0.0.1', '10.0.0.10'); - * blockList.addSubnet('8592:757c:efae:4e45::', 64, 'ipv6'); - * - * console.log(blockList.check('123.123.123.123')); // Prints: true - * console.log(blockList.check('10.0.0.3')); // Prints: true - * console.log(blockList.check('222.111.111.222')); // Prints: false - * - * // IPv6 notation for IPv4 addresses works: - * console.log(blockList.check('::ffff:7b7b:7b7b', 'ipv6')); // Prints: true - * console.log(blockList.check('::ffff:123.123.123.123', 'ipv6')); // Prints: true - * ``` - * @since v15.0.0, v14.18.0 - * @param address The IP address to check - * @param [type='ipv4'] Either `'ipv4'` or `'ipv6'`. - */ - check(address: SocketAddress): boolean; - check(address: string, type?: IPVersion): boolean; - /** - * The list of rules added to the blocklist. - * @since v15.0.0, v14.18.0 - */ - rules: readonly string[]; - /** - * Returns `true` if the `value` is a `net.BlockList`. - * @since v22.13.0 - * @param value Any JS value - */ - static isBlockList(value: unknown): value is BlockList; - /** - * ```js - * const blockList = new net.BlockList(); - * const data = [ - * 'Subnet: IPv4 192.168.1.0/24', - * 'Address: IPv4 10.0.0.5', - * 'Range: IPv4 192.168.2.1-192.168.2.10', - * 'Range: IPv4 10.0.0.1-10.0.0.10', - * ]; - * blockList.fromJSON(data); - * blockList.fromJSON(JSON.stringify(data)); - * ``` - * @since v24.5.0 - * @experimental - */ - fromJSON(data: string | readonly string[]): void; - /** - * @since v24.5.0 - * @experimental - */ - toJSON(): readonly string[]; - } - interface TcpNetConnectOpts extends TcpSocketConnectOpts, SocketConstructorOpts { - timeout?: number | undefined; - } - interface IpcNetConnectOpts extends IpcSocketConnectOpts, SocketConstructorOpts { - timeout?: number | undefined; - } - type NetConnectOpts = TcpNetConnectOpts | IpcNetConnectOpts; - /** - * Creates a new TCP or `IPC` server. - * - * If `allowHalfOpen` is set to `true`, when the other end of the socket - * signals the end of transmission, the server will only send back the end of - * transmission when `socket.end()` is explicitly called. For example, in the - * context of TCP, when a FIN packed is received, a FIN packed is sent - * back only when `socket.end()` is explicitly called. Until then the - * connection is half-closed (non-readable but still writable). See `'end'` event and [RFC 1122](https://tools.ietf.org/html/rfc1122) (section 4.2.2.13) for more information. - * - * If `pauseOnConnect` is set to `true`, then the socket associated with each - * incoming connection will be paused, and no data will be read from its handle. - * This allows connections to be passed between processes without any data being - * read by the original process. To begin reading data from a paused socket, call `socket.resume()`. - * - * The server can be a TCP server or an `IPC` server, depending on what it `listen()` to. - * - * Here is an example of a TCP echo server which listens for connections - * on port 8124: - * - * ```js - * import net from 'node:net'; - * const server = net.createServer((c) => { - * // 'connection' listener. - * console.log('client connected'); - * c.on('end', () => { - * console.log('client disconnected'); - * }); - * c.write('hello\r\n'); - * c.pipe(c); - * }); - * server.on('error', (err) => { - * throw err; - * }); - * server.listen(8124, () => { - * console.log('server bound'); - * }); - * ``` - * - * Test this by using `telnet`: - * - * ```bash - * telnet localhost 8124 - * ``` - * - * To listen on the socket `/tmp/echo.sock`: - * - * ```js - * server.listen('/tmp/echo.sock', () => { - * console.log('server bound'); - * }); - * ``` - * - * Use `nc` to connect to a Unix domain socket server: - * - * ```bash - * nc -U /tmp/echo.sock - * ``` - * @since v0.5.0 - * @param connectionListener Automatically set as a listener for the {@link 'connection'} event. - */ - function createServer(connectionListener?: (socket: Socket) => void): Server; - function createServer(options?: ServerOpts, connectionListener?: (socket: Socket) => void): Server; - /** - * Aliases to {@link createConnection}. - * - * Possible signatures: - * - * * {@link connect} - * * {@link connect} for `IPC` connections. - * * {@link connect} for TCP connections. - */ - function connect(options: NetConnectOpts, connectionListener?: () => void): Socket; - function connect(port: number, host?: string, connectionListener?: () => void): Socket; - function connect(path: string, connectionListener?: () => void): Socket; - /** - * A factory function, which creates a new {@link Socket}, - * immediately initiates connection with `socket.connect()`, - * then returns the `net.Socket` that starts the connection. - * - * When the connection is established, a `'connect'` event will be emitted - * on the returned socket. The last parameter `connectListener`, if supplied, - * will be added as a listener for the `'connect'` event **once**. - * - * Possible signatures: - * - * * {@link createConnection} - * * {@link createConnection} for `IPC` connections. - * * {@link createConnection} for TCP connections. - * - * The {@link connect} function is an alias to this function. - */ - function createConnection(options: NetConnectOpts, connectionListener?: () => void): Socket; - function createConnection(port: number, host?: string, connectionListener?: () => void): Socket; - function createConnection(path: string, connectionListener?: () => void): Socket; - /** - * Gets the current default value of the `autoSelectFamily` option of `socket.connect(options)`. - * The initial default value is `true`, unless the command line option`--no-network-family-autoselection` is provided. - * @since v19.4.0 - */ - function getDefaultAutoSelectFamily(): boolean; - /** - * Sets the default value of the `autoSelectFamily` option of `socket.connect(options)`. - * @param value The new default value. - * The initial default value is `true`, unless the command line option - * `--no-network-family-autoselection` is provided. - * @since v19.4.0 - */ - function setDefaultAutoSelectFamily(value: boolean): void; - /** - * Gets the current default value of the `autoSelectFamilyAttemptTimeout` option of `socket.connect(options)`. - * The initial default value is `250` or the value specified via the command line option `--network-family-autoselection-attempt-timeout`. - * @returns The current default value of the `autoSelectFamilyAttemptTimeout` option. - * @since v19.8.0, v18.8.0 - */ - function getDefaultAutoSelectFamilyAttemptTimeout(): number; - /** - * Sets the default value of the `autoSelectFamilyAttemptTimeout` option of `socket.connect(options)`. - * @param value The new default value, which must be a positive number. If the number is less than `10`, the value `10` is used instead. The initial default value is `250` or the value specified via the command line - * option `--network-family-autoselection-attempt-timeout`. - * @since v19.8.0, v18.8.0 - */ - function setDefaultAutoSelectFamilyAttemptTimeout(value: number): void; - /** - * Returns `6` if `input` is an IPv6 address. Returns `4` if `input` is an IPv4 - * address in [dot-decimal notation](https://en.wikipedia.org/wiki/Dot-decimal_notation) with no leading zeroes. Otherwise, returns`0`. - * - * ```js - * net.isIP('::1'); // returns 6 - * net.isIP('127.0.0.1'); // returns 4 - * net.isIP('127.000.000.001'); // returns 0 - * net.isIP('127.0.0.1/24'); // returns 0 - * net.isIP('fhqwhgads'); // returns 0 - * ``` - * @since v0.3.0 - */ - function isIP(input: string): number; - /** - * Returns `true` if `input` is an IPv4 address in [dot-decimal notation](https://en.wikipedia.org/wiki/Dot-decimal_notation) with no - * leading zeroes. Otherwise, returns `false`. - * - * ```js - * net.isIPv4('127.0.0.1'); // returns true - * net.isIPv4('127.000.000.001'); // returns false - * net.isIPv4('127.0.0.1/24'); // returns false - * net.isIPv4('fhqwhgads'); // returns false - * ``` - * @since v0.3.0 - */ - function isIPv4(input: string): boolean; - /** - * Returns `true` if `input` is an IPv6 address. Otherwise, returns `false`. - * - * ```js - * net.isIPv6('::1'); // returns true - * net.isIPv6('fhqwhgads'); // returns false - * ``` - * @since v0.3.0 - */ - function isIPv6(input: string): boolean; - interface SocketAddressInitOptions { - /** - * The network address as either an IPv4 or IPv6 string. - * @default 127.0.0.1 - */ - address?: string | undefined; - /** - * @default `'ipv4'` - */ - family?: IPVersion | undefined; - /** - * An IPv6 flow-label used only if `family` is `'ipv6'`. - * @default 0 - */ - flowlabel?: number | undefined; - /** - * An IP port. - * @default 0 - */ - port?: number | undefined; - } - /** - * @since v15.14.0, v14.18.0 - */ - class SocketAddress { - constructor(options: SocketAddressInitOptions); - /** - * Either \`'ipv4'\` or \`'ipv6'\`. - * @since v15.14.0, v14.18.0 - */ - readonly address: string; - /** - * Either \`'ipv4'\` or \`'ipv6'\`. - * @since v15.14.0, v14.18.0 - */ - readonly family: IPVersion; - /** - * @since v15.14.0, v14.18.0 - */ - readonly port: number; - /** - * @since v15.14.0, v14.18.0 - */ - readonly flowlabel: number; - /** - * @since v22.13.0 - * @param input An input string containing an IP address and optional port, - * e.g. `123.1.2.3:1234` or `[1::1]:1234`. - * @returns Returns a `SocketAddress` if parsing was successful. - * Otherwise returns `undefined`. - */ - static parse(input: string): SocketAddress | undefined; - } -} -declare module "net" { - export * from "node:net"; -} diff --git a/PBandGraphScaffold/node_modules/@types/node/os.d.ts b/PBandGraphScaffold/node_modules/@types/node/os.d.ts deleted file mode 100644 index db86e9b..0000000 --- a/PBandGraphScaffold/node_modules/@types/node/os.d.ts +++ /dev/null @@ -1,507 +0,0 @@ -/** - * The `node:os` module provides operating system-related utility methods and - * properties. It can be accessed using: - * - * ```js - * import os from 'node:os'; - * ``` - * @see [source](https://github.com/nodejs/node/blob/v25.x/lib/os.js) - */ -declare module "node:os" { - import { NonSharedBuffer } from "buffer"; - interface CpuInfo { - model: string; - speed: number; - times: { - /** The number of milliseconds the CPU has spent in user mode. */ - user: number; - /** The number of milliseconds the CPU has spent in nice mode. */ - nice: number; - /** The number of milliseconds the CPU has spent in sys mode. */ - sys: number; - /** The number of milliseconds the CPU has spent in idle mode. */ - idle: number; - /** The number of milliseconds the CPU has spent in irq mode. */ - irq: number; - }; - } - interface NetworkInterfaceBase { - address: string; - netmask: string; - mac: string; - internal: boolean; - cidr: string | null; - scopeid?: number; - } - interface NetworkInterfaceInfoIPv4 extends NetworkInterfaceBase { - family: "IPv4"; - } - interface NetworkInterfaceInfoIPv6 extends NetworkInterfaceBase { - family: "IPv6"; - scopeid: number; - } - interface UserInfo { - username: T; - uid: number; - gid: number; - shell: T | null; - homedir: T; - } - type NetworkInterfaceInfo = NetworkInterfaceInfoIPv4 | NetworkInterfaceInfoIPv6; - /** - * Returns the host name of the operating system as a string. - * @since v0.3.3 - */ - function hostname(): string; - /** - * Returns an array containing the 1, 5, and 15 minute load averages. - * - * The load average is a measure of system activity calculated by the operating - * system and expressed as a fractional number. - * - * The load average is a Unix-specific concept. On Windows, the return value is - * always `[0, 0, 0]`. - * @since v0.3.3 - */ - function loadavg(): number[]; - /** - * Returns the system uptime in number of seconds. - * @since v0.3.3 - */ - function uptime(): number; - /** - * Returns the amount of free system memory in bytes as an integer. - * @since v0.3.3 - */ - function freemem(): number; - /** - * Returns the total amount of system memory in bytes as an integer. - * @since v0.3.3 - */ - function totalmem(): number; - /** - * Returns an array of objects containing information about each logical CPU core. - * The array will be empty if no CPU information is available, such as if the `/proc` file system is unavailable. - * - * The properties included on each object include: - * - * ```js - * [ - * { - * model: 'Intel(R) Core(TM) i7 CPU 860 @ 2.80GHz', - * speed: 2926, - * times: { - * user: 252020, - * nice: 0, - * sys: 30340, - * idle: 1070356870, - * irq: 0, - * }, - * }, - * { - * model: 'Intel(R) Core(TM) i7 CPU 860 @ 2.80GHz', - * speed: 2926, - * times: { - * user: 306960, - * nice: 0, - * sys: 26980, - * idle: 1071569080, - * irq: 0, - * }, - * }, - * { - * model: 'Intel(R) Core(TM) i7 CPU 860 @ 2.80GHz', - * speed: 2926, - * times: { - * user: 248450, - * nice: 0, - * sys: 21750, - * idle: 1070919370, - * irq: 0, - * }, - * }, - * { - * model: 'Intel(R) Core(TM) i7 CPU 860 @ 2.80GHz', - * speed: 2926, - * times: { - * user: 256880, - * nice: 0, - * sys: 19430, - * idle: 1070905480, - * irq: 20, - * }, - * }, - * ] - * ``` - * - * `nice` values are POSIX-only. On Windows, the `nice` values of all processors - * are always 0. - * - * `os.cpus().length` should not be used to calculate the amount of parallelism - * available to an application. Use {@link availableParallelism} for this purpose. - * @since v0.3.3 - */ - function cpus(): CpuInfo[]; - /** - * Returns an estimate of the default amount of parallelism a program should use. - * Always returns a value greater than zero. - * - * This function is a small wrapper about libuv's [`uv_available_parallelism()`](https://docs.libuv.org/en/v1.x/misc.html#c.uv_available_parallelism). - * @since v19.4.0, v18.14.0 - */ - function availableParallelism(): number; - /** - * Returns the operating system name as returned by [`uname(3)`](https://linux.die.net/man/3/uname). For example, it - * returns `'Linux'` on Linux, `'Darwin'` on macOS, and `'Windows_NT'` on Windows. - * - * See [https://en.wikipedia.org/wiki/Uname#Examples](https://en.wikipedia.org/wiki/Uname#Examples) for additional information - * about the output of running [`uname(3)`](https://linux.die.net/man/3/uname) on various operating systems. - * @since v0.3.3 - */ - function type(): string; - /** - * Returns the operating system as a string. - * - * On POSIX systems, the operating system release is determined by calling [`uname(3)`](https://linux.die.net/man/3/uname). On Windows, `GetVersionExW()` is used. See - * [https://en.wikipedia.org/wiki/Uname#Examples](https://en.wikipedia.org/wiki/Uname#Examples) for more information. - * @since v0.3.3 - */ - function release(): string; - /** - * Returns an object containing network interfaces that have been assigned a - * network address. - * - * Each key on the returned object identifies a network interface. The associated - * value is an array of objects that each describe an assigned network address. - * - * The properties available on the assigned network address object include: - * - * ```js - * { - * lo: [ - * { - * address: '127.0.0.1', - * netmask: '255.0.0.0', - * family: 'IPv4', - * mac: '00:00:00:00:00:00', - * internal: true, - * cidr: '127.0.0.1/8' - * }, - * { - * address: '::1', - * netmask: 'ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff', - * family: 'IPv6', - * mac: '00:00:00:00:00:00', - * scopeid: 0, - * internal: true, - * cidr: '::1/128' - * } - * ], - * eth0: [ - * { - * address: '192.168.1.108', - * netmask: '255.255.255.0', - * family: 'IPv4', - * mac: '01:02:03:0a:0b:0c', - * internal: false, - * cidr: '192.168.1.108/24' - * }, - * { - * address: 'fe80::a00:27ff:fe4e:66a1', - * netmask: 'ffff:ffff:ffff:ffff::', - * family: 'IPv6', - * mac: '01:02:03:0a:0b:0c', - * scopeid: 1, - * internal: false, - * cidr: 'fe80::a00:27ff:fe4e:66a1/64' - * } - * ] - * } - * ``` - * @since v0.6.0 - */ - function networkInterfaces(): NodeJS.Dict; - /** - * Returns the string path of the current user's home directory. - * - * On POSIX, it uses the `$HOME` environment variable if defined. Otherwise it - * uses the [effective UID](https://en.wikipedia.org/wiki/User_identifier#Effective_user_ID) to look up the user's home directory. - * - * On Windows, it uses the `USERPROFILE` environment variable if defined. - * Otherwise it uses the path to the profile directory of the current user. - * @since v2.3.0 - */ - function homedir(): string; - interface UserInfoOptions { - encoding?: BufferEncoding | "buffer" | undefined; - } - interface UserInfoOptionsWithBufferEncoding extends UserInfoOptions { - encoding: "buffer"; - } - interface UserInfoOptionsWithStringEncoding extends UserInfoOptions { - encoding?: BufferEncoding | undefined; - } - /** - * Returns information about the currently effective user. On POSIX platforms, - * this is typically a subset of the password file. The returned object includes - * the `username`, `uid`, `gid`, `shell`, and `homedir`. On Windows, the `uid` and `gid` fields are `-1`, and `shell` is `null`. - * - * The value of `homedir` returned by `os.userInfo()` is provided by the operating - * system. This differs from the result of `os.homedir()`, which queries - * environment variables for the home directory before falling back to the - * operating system response. - * - * Throws a [`SystemError`](https://nodejs.org/docs/latest-v25.x/api/errors.html#class-systemerror) if a user has no `username` or `homedir`. - * @since v6.0.0 - */ - function userInfo(options?: UserInfoOptionsWithStringEncoding): UserInfo; - function userInfo(options: UserInfoOptionsWithBufferEncoding): UserInfo; - function userInfo(options: UserInfoOptions): UserInfo; - type SignalConstants = { - [key in NodeJS.Signals]: number; - }; - namespace constants { - const UV_UDP_REUSEADDR: number; - namespace signals {} - const signals: SignalConstants; - namespace errno { - const E2BIG: number; - const EACCES: number; - const EADDRINUSE: number; - const EADDRNOTAVAIL: number; - const EAFNOSUPPORT: number; - const EAGAIN: number; - const EALREADY: number; - const EBADF: number; - const EBADMSG: number; - const EBUSY: number; - const ECANCELED: number; - const ECHILD: number; - const ECONNABORTED: number; - const ECONNREFUSED: number; - const ECONNRESET: number; - const EDEADLK: number; - const EDESTADDRREQ: number; - const EDOM: number; - const EDQUOT: number; - const EEXIST: number; - const EFAULT: number; - const EFBIG: number; - const EHOSTUNREACH: number; - const EIDRM: number; - const EILSEQ: number; - const EINPROGRESS: number; - const EINTR: number; - const EINVAL: number; - const EIO: number; - const EISCONN: number; - const EISDIR: number; - const ELOOP: number; - const EMFILE: number; - const EMLINK: number; - const EMSGSIZE: number; - const EMULTIHOP: number; - const ENAMETOOLONG: number; - const ENETDOWN: number; - const ENETRESET: number; - const ENETUNREACH: number; - const ENFILE: number; - const ENOBUFS: number; - const ENODATA: number; - const ENODEV: number; - const ENOENT: number; - const ENOEXEC: number; - const ENOLCK: number; - const ENOLINK: number; - const ENOMEM: number; - const ENOMSG: number; - const ENOPROTOOPT: number; - const ENOSPC: number; - const ENOSR: number; - const ENOSTR: number; - const ENOSYS: number; - const ENOTCONN: number; - const ENOTDIR: number; - const ENOTEMPTY: number; - const ENOTSOCK: number; - const ENOTSUP: number; - const ENOTTY: number; - const ENXIO: number; - const EOPNOTSUPP: number; - const EOVERFLOW: number; - const EPERM: number; - const EPIPE: number; - const EPROTO: number; - const EPROTONOSUPPORT: number; - const EPROTOTYPE: number; - const ERANGE: number; - const EROFS: number; - const ESPIPE: number; - const ESRCH: number; - const ESTALE: number; - const ETIME: number; - const ETIMEDOUT: number; - const ETXTBSY: number; - const EWOULDBLOCK: number; - const EXDEV: number; - const WSAEINTR: number; - const WSAEBADF: number; - const WSAEACCES: number; - const WSAEFAULT: number; - const WSAEINVAL: number; - const WSAEMFILE: number; - const WSAEWOULDBLOCK: number; - const WSAEINPROGRESS: number; - const WSAEALREADY: number; - const WSAENOTSOCK: number; - const WSAEDESTADDRREQ: number; - const WSAEMSGSIZE: number; - const WSAEPROTOTYPE: number; - const WSAENOPROTOOPT: number; - const WSAEPROTONOSUPPORT: number; - const WSAESOCKTNOSUPPORT: number; - const WSAEOPNOTSUPP: number; - const WSAEPFNOSUPPORT: number; - const WSAEAFNOSUPPORT: number; - const WSAEADDRINUSE: number; - const WSAEADDRNOTAVAIL: number; - const WSAENETDOWN: number; - const WSAENETUNREACH: number; - const WSAENETRESET: number; - const WSAECONNABORTED: number; - const WSAECONNRESET: number; - const WSAENOBUFS: number; - const WSAEISCONN: number; - const WSAENOTCONN: number; - const WSAESHUTDOWN: number; - const WSAETOOMANYREFS: number; - const WSAETIMEDOUT: number; - const WSAECONNREFUSED: number; - const WSAELOOP: number; - const WSAENAMETOOLONG: number; - const WSAEHOSTDOWN: number; - const WSAEHOSTUNREACH: number; - const WSAENOTEMPTY: number; - const WSAEPROCLIM: number; - const WSAEUSERS: number; - const WSAEDQUOT: number; - const WSAESTALE: number; - const WSAEREMOTE: number; - const WSASYSNOTREADY: number; - const WSAVERNOTSUPPORTED: number; - const WSANOTINITIALISED: number; - const WSAEDISCON: number; - const WSAENOMORE: number; - const WSAECANCELLED: number; - const WSAEINVALIDPROCTABLE: number; - const WSAEINVALIDPROVIDER: number; - const WSAEPROVIDERFAILEDINIT: number; - const WSASYSCALLFAILURE: number; - const WSASERVICE_NOT_FOUND: number; - const WSATYPE_NOT_FOUND: number; - const WSA_E_NO_MORE: number; - const WSA_E_CANCELLED: number; - const WSAEREFUSED: number; - } - namespace dlopen { - const RTLD_LAZY: number; - const RTLD_NOW: number; - const RTLD_GLOBAL: number; - const RTLD_LOCAL: number; - const RTLD_DEEPBIND: number; - } - namespace priority { - const PRIORITY_LOW: number; - const PRIORITY_BELOW_NORMAL: number; - const PRIORITY_NORMAL: number; - const PRIORITY_ABOVE_NORMAL: number; - const PRIORITY_HIGH: number; - const PRIORITY_HIGHEST: number; - } - } - const devNull: string; - /** - * The operating system-specific end-of-line marker. - * * `\n` on POSIX - * * `\r\n` on Windows - */ - const EOL: string; - /** - * Returns the operating system CPU architecture for which the Node.js binary was - * compiled. Possible values are `'arm'`, `'arm64'`, `'ia32'`, `'loong64'`, - * `'mips'`, `'mipsel'`, `'ppc64'`, `'riscv64'`, `'s390x'`, and `'x64'`. - * - * The return value is equivalent to [process.arch](https://nodejs.org/docs/latest-v25.x/api/process.html#processarch). - * @since v0.5.0 - */ - function arch(): NodeJS.Architecture; - /** - * Returns a string identifying the kernel version. - * - * On POSIX systems, the operating system release is determined by calling [`uname(3)`](https://linux.die.net/man/3/uname). On Windows, `RtlGetVersion()` is used, and if it is not - * available, `GetVersionExW()` will be used. See [https://en.wikipedia.org/wiki/Uname#Examples](https://en.wikipedia.org/wiki/Uname#Examples) for more information. - * @since v13.11.0, v12.17.0 - */ - function version(): string; - /** - * Returns a string identifying the operating system platform for which - * the Node.js binary was compiled. The value is set at compile time. - * Possible values are `'aix'`, `'darwin'`, `'freebsd'`, `'linux'`, `'openbsd'`, `'sunos'`, and `'win32'`. - * - * The return value is equivalent to `process.platform`. - * - * The value `'android'` may also be returned if Node.js is built on the Android - * operating system. [Android support is experimental](https://github.com/nodejs/node/blob/HEAD/BUILDING.md#androidandroid-based-devices-eg-firefox-os). - * @since v0.5.0 - */ - function platform(): NodeJS.Platform; - /** - * Returns the machine type as a string, such as `arm`, `arm64`, `aarch64`, - * `mips`, `mips64`, `ppc64`, `ppc64le`, `s390x`, `i386`, `i686`, `x86_64`. - * - * On POSIX systems, the machine type is determined by calling [`uname(3)`](https://linux.die.net/man/3/uname). On Windows, `RtlGetVersion()` is used, and if it is not - * available, `GetVersionExW()` will be used. See [https://en.wikipedia.org/wiki/Uname#Examples](https://en.wikipedia.org/wiki/Uname#Examples) for more information. - * @since v18.9.0, v16.18.0 - */ - function machine(): string; - /** - * Returns the operating system's default directory for temporary files as a - * string. - * @since v0.9.9 - */ - function tmpdir(): string; - /** - * Returns a string identifying the endianness of the CPU for which the Node.js - * binary was compiled. - * - * Possible values are `'BE'` for big endian and `'LE'` for little endian. - * @since v0.9.4 - */ - function endianness(): "BE" | "LE"; - /** - * Returns the scheduling priority for the process specified by `pid`. If `pid` is - * not provided or is `0`, the priority of the current process is returned. - * @since v10.10.0 - * @param [pid=0] The process ID to retrieve scheduling priority for. - */ - function getPriority(pid?: number): number; - /** - * Attempts to set the scheduling priority for the process specified by `pid`. If `pid` is not provided or is `0`, the process ID of the current process is used. - * - * The `priority` input must be an integer between `-20` (high priority) and `19` (low priority). Due to differences between Unix priority levels and Windows - * priority classes, `priority` is mapped to one of six priority constants in `os.constants.priority`. When retrieving a process priority level, this range - * mapping may cause the return value to be slightly different on Windows. To avoid - * confusion, set `priority` to one of the priority constants. - * - * On Windows, setting priority to `PRIORITY_HIGHEST` requires elevated user - * privileges. Otherwise the set priority will be silently reduced to `PRIORITY_HIGH`. - * @since v10.10.0 - * @param [pid=0] The process ID to set scheduling priority for. - * @param priority The scheduling priority to assign to the process. - */ - function setPriority(priority: number): void; - function setPriority(pid: number, priority: number): void; -} -declare module "os" { - export * from "node:os"; -} diff --git a/PBandGraphScaffold/node_modules/@types/node/package.json b/PBandGraphScaffold/node_modules/@types/node/package.json deleted file mode 100644 index 752925e..0000000 --- a/PBandGraphScaffold/node_modules/@types/node/package.json +++ /dev/null @@ -1,155 +0,0 @@ -{ - "name": "@types/node", - "version": "25.0.3", - "description": "TypeScript definitions for node", - "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node", - "license": "MIT", - "contributors": [ - { - "name": "Microsoft TypeScript", - "githubUsername": "Microsoft", - "url": "https://github.com/Microsoft" - }, - { - "name": "Alberto Schiabel", - "githubUsername": "jkomyno", - "url": "https://github.com/jkomyno" - }, - { - "name": "Andrew Makarov", - "githubUsername": "r3nya", - "url": "https://github.com/r3nya" - }, - { - "name": "Benjamin Toueg", - "githubUsername": "btoueg", - "url": "https://github.com/btoueg" - }, - { - "name": "David Junger", - "githubUsername": "touffy", - "url": "https://github.com/touffy" - }, - { - "name": "Mohsen Azimi", - "githubUsername": "mohsen1", - "url": "https://github.com/mohsen1" - }, - { - "name": "Nikita Galkin", - "githubUsername": "galkin", - "url": "https://github.com/galkin" - }, - { - "name": "Sebastian Silbermann", - "githubUsername": "eps1lon", - "url": "https://github.com/eps1lon" - }, - { - "name": "Wilco Bakker", - "githubUsername": "WilcoBakker", - "url": "https://github.com/WilcoBakker" - }, - { - "name": "Marcin Kopacz", - "githubUsername": "chyzwar", - "url": "https://github.com/chyzwar" - }, - { - "name": "Trivikram Kamat", - "githubUsername": "trivikr", - "url": "https://github.com/trivikr" - }, - { - "name": "Junxiao Shi", - "githubUsername": "yoursunny", - "url": "https://github.com/yoursunny" - }, - { - "name": "Ilia Baryshnikov", - "githubUsername": "qwelias", - "url": "https://github.com/qwelias" - }, - { - "name": "ExE Boss", - "githubUsername": "ExE-Boss", - "url": "https://github.com/ExE-Boss" - }, - { - "name": "Piotr Błażejewicz", - "githubUsername": "peterblazejewicz", - "url": "https://github.com/peterblazejewicz" - }, - { - "name": "Anna Henningsen", - "githubUsername": "addaleax", - "url": "https://github.com/addaleax" - }, - { - "name": "Victor Perin", - "githubUsername": "victorperin", - "url": "https://github.com/victorperin" - }, - { - "name": "NodeJS Contributors", - "githubUsername": "NodeJS", - "url": "https://github.com/NodeJS" - }, - { - "name": "Linus Unnebäck", - "githubUsername": "LinusU", - "url": "https://github.com/LinusU" - }, - { - "name": "wafuwafu13", - "githubUsername": "wafuwafu13", - "url": "https://github.com/wafuwafu13" - }, - { - "name": "Matteo Collina", - "githubUsername": "mcollina", - "url": "https://github.com/mcollina" - }, - { - "name": "Dmitry Semigradsky", - "githubUsername": "Semigradsky", - "url": "https://github.com/Semigradsky" - }, - { - "name": "René", - "githubUsername": "Renegade334", - "url": "https://github.com/Renegade334" - }, - { - "name": "Yagiz Nizipli", - "githubUsername": "anonrig", - "url": "https://github.com/anonrig" - } - ], - "main": "", - "types": "index.d.ts", - "typesVersions": { - "<=5.6": { - "*": [ - "ts5.6/*" - ] - }, - "<=5.7": { - "*": [ - "ts5.7/*" - ] - } - }, - "repository": { - "type": "git", - "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git", - "directory": "types/node" - }, - "scripts": {}, - "dependencies": { - "undici-types": "~7.16.0" - }, - "peerDependencies": {}, - "typesPublisherContentHash": "f232fc4d25235ca95f233b42be2cfd08c384791f716e60e2c105ff6db6b0bdc4", - "typeScriptVersion": "5.2" -} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/@types/node/path.d.ts b/PBandGraphScaffold/node_modules/@types/node/path.d.ts deleted file mode 100644 index c0b22f6..0000000 --- a/PBandGraphScaffold/node_modules/@types/node/path.d.ts +++ /dev/null @@ -1,187 +0,0 @@ -/** - * The `node:path` module provides utilities for working with file and directory - * paths. It can be accessed using: - * - * ```js - * import path from 'node:path'; - * ``` - * @see [source](https://github.com/nodejs/node/blob/v25.x/lib/path.js) - */ -declare module "node:path" { - namespace path { - /** - * A parsed path object generated by path.parse() or consumed by path.format(). - */ - interface ParsedPath { - /** - * The root of the path such as '/' or 'c:\' - */ - root: string; - /** - * The full directory path such as '/home/user/dir' or 'c:\path\dir' - */ - dir: string; - /** - * The file name including extension (if any) such as 'index.html' - */ - base: string; - /** - * The file extension (if any) such as '.html' - */ - ext: string; - /** - * The file name without extension (if any) such as 'index' - */ - name: string; - } - interface FormatInputPathObject { - /** - * The root of the path such as '/' or 'c:\' - */ - root?: string | undefined; - /** - * The full directory path such as '/home/user/dir' or 'c:\path\dir' - */ - dir?: string | undefined; - /** - * The file name including extension (if any) such as 'index.html' - */ - base?: string | undefined; - /** - * The file extension (if any) such as '.html' - */ - ext?: string | undefined; - /** - * The file name without extension (if any) such as 'index' - */ - name?: string | undefined; - } - /** - * Normalize a string path, reducing '..' and '.' parts. - * When multiple slashes are found, they're replaced by a single one; when the path contains a trailing slash, it is preserved. On Windows backslashes are used. If the path is a zero-length string, '.' is returned, representing the current working directory. - * - * @param path string path to normalize. - * @throws {TypeError} if `path` is not a string. - */ - function normalize(path: string): string; - /** - * Join all arguments together and normalize the resulting path. - * - * @param paths paths to join. - * @throws {TypeError} if any of the path segments is not a string. - */ - function join(...paths: string[]): string; - /** - * The right-most parameter is considered {to}. Other parameters are considered an array of {from}. - * - * Starting from leftmost {from} parameter, resolves {to} to an absolute path. - * - * If {to} isn't already absolute, {from} arguments are prepended in right to left order, - * until an absolute path is found. If after using all {from} paths still no absolute path is found, - * the current working directory is used as well. The resulting path is normalized, - * and trailing slashes are removed unless the path gets resolved to the root directory. - * - * @param paths A sequence of paths or path segments. - * @throws {TypeError} if any of the arguments is not a string. - */ - function resolve(...paths: string[]): string; - /** - * The `path.matchesGlob()` method determines if `path` matches the `pattern`. - * @param path The path to glob-match against. - * @param pattern The glob to check the path against. - * @returns Whether or not the `path` matched the `pattern`. - * @throws {TypeError} if `path` or `pattern` are not strings. - * @since v22.5.0 - */ - function matchesGlob(path: string, pattern: string): boolean; - /** - * Determines whether {path} is an absolute path. An absolute path will always resolve to the same location, regardless of the working directory. - * - * If the given {path} is a zero-length string, `false` will be returned. - * - * @param path path to test. - * @throws {TypeError} if `path` is not a string. - */ - function isAbsolute(path: string): boolean; - /** - * Solve the relative path from {from} to {to} based on the current working directory. - * At times we have two absolute paths, and we need to derive the relative path from one to the other. This is actually the reverse transform of path.resolve. - * - * @throws {TypeError} if either `from` or `to` is not a string. - */ - function relative(from: string, to: string): string; - /** - * Return the directory name of a path. Similar to the Unix dirname command. - * - * @param path the path to evaluate. - * @throws {TypeError} if `path` is not a string. - */ - function dirname(path: string): string; - /** - * Return the last portion of a path. Similar to the Unix basename command. - * Often used to extract the file name from a fully qualified path. - * - * @param path the path to evaluate. - * @param suffix optionally, an extension to remove from the result. - * @throws {TypeError} if `path` is not a string or if `ext` is given and is not a string. - */ - function basename(path: string, suffix?: string): string; - /** - * Return the extension of the path, from the last '.' to end of string in the last portion of the path. - * If there is no '.' in the last portion of the path or the first character of it is '.', then it returns an empty string. - * - * @param path the path to evaluate. - * @throws {TypeError} if `path` is not a string. - */ - function extname(path: string): string; - /** - * The platform-specific file separator. '\\' or '/'. - */ - const sep: "\\" | "/"; - /** - * The platform-specific file delimiter. ';' or ':'. - */ - const delimiter: ";" | ":"; - /** - * Returns an object from a path string - the opposite of format(). - * - * @param path path to evaluate. - * @throws {TypeError} if `path` is not a string. - */ - function parse(path: string): ParsedPath; - /** - * Returns a path string from an object - the opposite of parse(). - * - * @param pathObject path to evaluate. - */ - function format(pathObject: FormatInputPathObject): string; - /** - * On Windows systems only, returns an equivalent namespace-prefixed path for the given path. - * If path is not a string, path will be returned without modifications. - * This method is meaningful only on Windows system. - * On POSIX systems, the method is non-operational and always returns path without modifications. - */ - function toNamespacedPath(path: string): string; - } - namespace path { - export { - /** - * The `path.posix` property provides access to POSIX specific implementations of the `path` methods. - * - * The API is accessible via `require('node:path').posix` or `require('node:path/posix')`. - */ - path as posix, - /** - * The `path.win32` property provides access to Windows-specific implementations of the `path` methods. - * - * The API is accessible via `require('node:path').win32` or `require('node:path/win32')`. - */ - path as win32, - }; - } - export = path; -} -declare module "path" { - import path = require("node:path"); - export = path; -} diff --git a/PBandGraphScaffold/node_modules/@types/node/path/posix.d.ts b/PBandGraphScaffold/node_modules/@types/node/path/posix.d.ts deleted file mode 100644 index d60f629..0000000 --- a/PBandGraphScaffold/node_modules/@types/node/path/posix.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -declare module "node:path/posix" { - import path = require("node:path"); - export = path.posix; -} -declare module "path/posix" { - import path = require("path"); - export = path.posix; -} diff --git a/PBandGraphScaffold/node_modules/@types/node/path/win32.d.ts b/PBandGraphScaffold/node_modules/@types/node/path/win32.d.ts deleted file mode 100644 index e6aa9fa..0000000 --- a/PBandGraphScaffold/node_modules/@types/node/path/win32.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -declare module "node:path/win32" { - import path = require("node:path"); - export = path.win32; -} -declare module "path/win32" { - import path = require("path"); - export = path.win32; -} diff --git a/PBandGraphScaffold/node_modules/@types/node/perf_hooks.d.ts b/PBandGraphScaffold/node_modules/@types/node/perf_hooks.d.ts deleted file mode 100644 index 699f3bf..0000000 --- a/PBandGraphScaffold/node_modules/@types/node/perf_hooks.d.ts +++ /dev/null @@ -1,621 +0,0 @@ -/** - * This module provides an implementation of a subset of the W3C [Web Performance APIs](https://w3c.github.io/perf-timing-primer/) as well as additional APIs for - * Node.js-specific performance measurements. - * - * Node.js supports the following [Web Performance APIs](https://w3c.github.io/perf-timing-primer/): - * - * * [High Resolution Time](https://www.w3.org/TR/hr-time-2) - * * [Performance Timeline](https://w3c.github.io/performance-timeline/) - * * [User Timing](https://www.w3.org/TR/user-timing/) - * * [Resource Timing](https://www.w3.org/TR/resource-timing-2/) - * - * ```js - * import { PerformanceObserver, performance } from 'node:perf_hooks'; - * - * const obs = new PerformanceObserver((items) => { - * console.log(items.getEntries()[0].duration); - * performance.clearMarks(); - * }); - * obs.observe({ type: 'measure' }); - * performance.measure('Start to Now'); - * - * performance.mark('A'); - * doSomeLongRunningProcess(() => { - * performance.measure('A to Now', 'A'); - * - * performance.mark('B'); - * performance.measure('A to B', 'A', 'B'); - * }); - * ``` - * @see [source](https://github.com/nodejs/node/blob/v25.x/lib/perf_hooks.js) - */ -declare module "node:perf_hooks" { - import { InternalEventTargetEventProperties } from "node:events"; - // #region web types - type EntryType = - | "dns" // Node.js only - | "function" // Node.js only - | "gc" // Node.js only - | "http2" // Node.js only - | "http" // Node.js only - | "mark" // available on the Web - | "measure" // available on the Web - | "net" // Node.js only - | "node" // Node.js only - | "resource"; // available on the Web - interface EventLoopUtilization { - idle: number; - active: number; - utilization: number; - } - interface ConnectionTimingInfo { - domainLookupStartTime: number; - domainLookupEndTime: number; - connectionStartTime: number; - connectionEndTime: number; - secureConnectionStartTime: number; - ALPNNegotiatedProtocol: string; - } - interface FetchTimingInfo { - startTime: number; - redirectStartTime: number; - redirectEndTime: number; - postRedirectStartTime: number; - finalServiceWorkerStartTime: number; - finalNetworkRequestStartTime: number; - finalNetworkResponseStartTime: number; - endTime: number; - finalConnectionTimingInfo: ConnectionTimingInfo | null; - encodedBodySize: number; - decodedBodySize: number; - } - type PerformanceEntryList = PerformanceEntry[]; - interface PerformanceMarkOptions { - detail?: any; - startTime?: number; - } - interface PerformanceMeasureOptions { - detail?: any; - duration?: number; - end?: string | number; - start?: string | number; - } - interface PerformanceObserverCallback { - (entries: PerformanceObserverEntryList, observer: PerformanceObserver): void; - } - interface PerformanceObserverInit { - buffered?: boolean; - entryTypes?: EntryType[]; - type?: EntryType; - } - interface PerformanceEventMap { - "resourcetimingbufferfull": Event; - } - interface Performance extends EventTarget, InternalEventTargetEventProperties { - readonly nodeTiming: PerformanceNodeTiming; - readonly timeOrigin: number; - clearMarks(markName?: string): void; - clearMeasures(measureName?: string): void; - clearResourceTimings(resourceTimingName?: string): void; - getEntries(): PerformanceEntryList; - getEntriesByName(name: string, type?: EntryType): PerformanceEntryList; - getEntriesByType(type: EntryType): PerformanceEntryList; - mark(markName: string, markOptions?: PerformanceMarkOptions): PerformanceMark; - markResourceTiming( - timingInfo: FetchTimingInfo, - requestedUrl: string, - initiatorType: string, - global: unknown, - cacheMode: string, - bodyInfo: unknown, - responseStatus: number, - deliveryType?: string, - ): PerformanceResourceTiming; - measure(measureName: string, startMark?: string, endMark?: string): PerformanceMeasure; - measure(measureName: string, options: PerformanceMeasureOptions, endMark?: string): PerformanceMeasure; - now(): number; - setResourceTimingBufferSize(maxSize: number): void; - toJSON(): any; - addEventListener( - type: K, - listener: (ev: PerformanceEventMap[K]) => void, - options?: AddEventListenerOptions | boolean, - ): void; - addEventListener( - type: string, - listener: EventListener | EventListenerObject, - options?: AddEventListenerOptions | boolean, - ): void; - removeEventListener( - type: K, - listener: (ev: PerformanceEventMap[K]) => void, - options?: EventListenerOptions | boolean, - ): void; - removeEventListener( - type: string, - listener: EventListener | EventListenerObject, - options?: EventListenerOptions | boolean, - ): void; - /** - * The `eventLoopUtilization()` method returns an object that contains the - * cumulative duration of time the event loop has been both idle and active as a - * high resolution milliseconds timer. The `utilization` value is the calculated - * Event Loop Utilization (ELU). - * - * If bootstrapping has not yet finished on the main thread the properties have - * the value of `0`. The ELU is immediately available on [Worker threads](https://nodejs.org/docs/latest-v25.x/api/worker_threads.html#worker-threads) since - * bootstrap happens within the event loop. - * - * Both `utilization1` and `utilization2` are optional parameters. - * - * If `utilization1` is passed, then the delta between the current call's `active` - * and `idle` times, as well as the corresponding `utilization` value are - * calculated and returned (similar to `process.hrtime()`). - * - * If `utilization1` and `utilization2` are both passed, then the delta is - * calculated between the two arguments. This is a convenience option because, - * unlike `process.hrtime()`, calculating the ELU is more complex than a - * single subtraction. - * - * ELU is similar to CPU utilization, except that it only measures event loop - * statistics and not CPU usage. It represents the percentage of time the event - * loop has spent outside the event loop's event provider (e.g. `epoll_wait`). - * No other CPU idle time is taken into consideration. The following is an example - * of how a mostly idle process will have a high ELU. - * - * ```js - * import { eventLoopUtilization } from 'node:perf_hooks'; - * import { spawnSync } from 'node:child_process'; - * - * setImmediate(() => { - * const elu = eventLoopUtilization(); - * spawnSync('sleep', ['5']); - * console.log(eventLoopUtilization(elu).utilization); - * }); - * ``` - * - * Although the CPU is mostly idle while running this script, the value of - * `utilization` is `1`. This is because the call to - * `child_process.spawnSync()` blocks the event loop from proceeding. - * - * Passing in a user-defined object instead of the result of a previous call to - * `eventLoopUtilization()` will lead to undefined behavior. The return values - * are not guaranteed to reflect any correct state of the event loop. - * @since v14.10.0, v12.19.0 - * @param utilization1 The result of a previous call to - * `eventLoopUtilization()`. - * @param utilization2 The result of a previous call to - * `eventLoopUtilization()` prior to `utilization1`. - */ - eventLoopUtilization( - utilization1?: EventLoopUtilization, - utilization2?: EventLoopUtilization, - ): EventLoopUtilization; - /** - * _This property is an extension by Node.js. It is not available in Web browsers._ - * - * Wraps a function within a new function that measures the running time of the - * wrapped function. A `PerformanceObserver` must be subscribed to the `'function'` - * event type in order for the timing details to be accessed. - * - * ```js - * import { performance, PerformanceObserver } from 'node:perf_hooks'; - * - * function someFunction() { - * console.log('hello world'); - * } - * - * const wrapped = performance.timerify(someFunction); - * - * const obs = new PerformanceObserver((list) => { - * console.log(list.getEntries()[0].duration); - * - * performance.clearMarks(); - * performance.clearMeasures(); - * obs.disconnect(); - * }); - * obs.observe({ entryTypes: ['function'] }); - * - * // A performance timeline entry will be created - * wrapped(); - * ``` - * - * If the wrapped function returns a promise, a finally handler will be attached - * to the promise and the duration will be reported once the finally handler is - * invoked. - * @since v8.5.0 - */ - timerify any>(fn: T, options?: PerformanceTimerifyOptions): T; - } - var Performance: { - prototype: Performance; - new(): Performance; - }; - interface PerformanceEntry { - readonly duration: number; - readonly entryType: EntryType; - readonly name: string; - readonly startTime: number; - toJSON(): any; - } - var PerformanceEntry: { - prototype: PerformanceEntry; - new(): PerformanceEntry; - }; - interface PerformanceMark extends PerformanceEntry { - readonly detail: any; - readonly entryType: "mark"; - } - var PerformanceMark: { - prototype: PerformanceMark; - new(markName: string, markOptions?: PerformanceMarkOptions): PerformanceMark; - }; - interface PerformanceMeasure extends PerformanceEntry { - readonly detail: any; - readonly entryType: "measure"; - } - var PerformanceMeasure: { - prototype: PerformanceMeasure; - new(): PerformanceMeasure; - }; - interface PerformanceObserver { - disconnect(): void; - observe(options: PerformanceObserverInit): void; - takeRecords(): PerformanceEntryList; - } - var PerformanceObserver: { - prototype: PerformanceObserver; - new(callback: PerformanceObserverCallback): PerformanceObserver; - readonly supportedEntryTypes: readonly EntryType[]; - }; - interface PerformanceObserverEntryList { - getEntries(): PerformanceEntryList; - getEntriesByName(name: string, type?: EntryType): PerformanceEntryList; - getEntriesByType(type: EntryType): PerformanceEntryList; - } - var PerformanceObserverEntryList: { - prototype: PerformanceObserverEntryList; - new(): PerformanceObserverEntryList; - }; - interface PerformanceResourceTiming extends PerformanceEntry { - readonly connectEnd: number; - readonly connectStart: number; - readonly decodedBodySize: number; - readonly domainLookupEnd: number; - readonly domainLookupStart: number; - readonly encodedBodySize: number; - readonly entryType: "resource"; - readonly fetchStart: number; - readonly initiatorType: string; - readonly nextHopProtocol: string; - readonly redirectEnd: number; - readonly redirectStart: number; - readonly requestStart: number; - readonly responseEnd: number; - readonly responseStart: number; - readonly responseStatus: number; - readonly secureConnectionStart: number; - readonly transferSize: number; - readonly workerStart: number; - toJSON(): any; - } - var PerformanceResourceTiming: { - prototype: PerformanceResourceTiming; - new(): PerformanceResourceTiming; - }; - var performance: Performance; - // #endregion - interface PerformanceTimerifyOptions { - /** - * A histogram object created using - * `perf_hooks.createHistogram()` that will record runtime durations in - * nanoseconds. - */ - histogram?: RecordableHistogram | undefined; - } - /** - * _This class is an extension by Node.js. It is not available in Web browsers._ - * - * Provides detailed Node.js timing data. - * - * The constructor of this class is not exposed to users directly. - * @since v19.0.0 - */ - class PerformanceNodeEntry extends PerformanceEntry { - /** - * Additional detail specific to the `entryType`. - * @since v16.0.0 - */ - readonly detail: any; - readonly entryType: "dns" | "function" | "gc" | "http2" | "http" | "net" | "node"; - } - interface UVMetrics { - /** - * Number of event loop iterations. - */ - readonly loopCount: number; - /** - * Number of events that have been processed by the event handler. - */ - readonly events: number; - /** - * Number of events that were waiting to be processed when the event provider was called. - */ - readonly eventsWaiting: number; - } - /** - * _This property is an extension by Node.js. It is not available in Web browsers._ - * - * Provides timing details for Node.js itself. The constructor of this class - * is not exposed to users. - * @since v8.5.0 - */ - interface PerformanceNodeTiming extends PerformanceEntry { - /** - * The high resolution millisecond timestamp at which the Node.js process - * completed bootstrapping. If bootstrapping has not yet finished, the property - * has the value of -1. - * @since v8.5.0 - */ - readonly bootstrapComplete: number; - readonly entryType: "node"; - /** - * The high resolution millisecond timestamp at which the Node.js environment was - * initialized. - * @since v8.5.0 - */ - readonly environment: number; - /** - * The high resolution millisecond timestamp of the amount of time the event loop - * has been idle within the event loop's event provider (e.g. `epoll_wait`). This - * does not take CPU usage into consideration. If the event loop has not yet - * started (e.g., in the first tick of the main script), the property has the - * value of 0. - * @since v14.10.0, v12.19.0 - */ - readonly idleTime: number; - /** - * The high resolution millisecond timestamp at which the Node.js event loop - * exited. If the event loop has not yet exited, the property has the value of -1\. - * It can only have a value of not -1 in a handler of the `'exit'` event. - * @since v8.5.0 - */ - readonly loopExit: number; - /** - * The high resolution millisecond timestamp at which the Node.js event loop - * started. If the event loop has not yet started (e.g., in the first tick of the - * main script), the property has the value of -1. - * @since v8.5.0 - */ - readonly loopStart: number; - /** - * The high resolution millisecond timestamp at which the Node.js process was initialized. - * @since v8.5.0 - */ - readonly nodeStart: number; - /** - * This is a wrapper to the `uv_metrics_info` function. - * It returns the current set of event loop metrics. - * - * It is recommended to use this property inside a function whose execution was - * scheduled using `setImmediate` to avoid collecting metrics before finishing all - * operations scheduled during the current loop iteration. - * @since v22.8.0, v20.18.0 - */ - readonly uvMetricsInfo: UVMetrics; - /** - * The high resolution millisecond timestamp at which the V8 platform was - * initialized. - * @since v8.5.0 - */ - readonly v8Start: number; - } - namespace constants { - const NODE_PERFORMANCE_GC_MAJOR: number; - const NODE_PERFORMANCE_GC_MINOR: number; - const NODE_PERFORMANCE_GC_INCREMENTAL: number; - const NODE_PERFORMANCE_GC_WEAKCB: number; - const NODE_PERFORMANCE_GC_FLAGS_NO: number; - const NODE_PERFORMANCE_GC_FLAGS_CONSTRUCT_RETAINED: number; - const NODE_PERFORMANCE_GC_FLAGS_FORCED: number; - const NODE_PERFORMANCE_GC_FLAGS_SYNCHRONOUS_PHANTOM_PROCESSING: number; - const NODE_PERFORMANCE_GC_FLAGS_ALL_AVAILABLE_GARBAGE: number; - const NODE_PERFORMANCE_GC_FLAGS_ALL_EXTERNAL_MEMORY: number; - const NODE_PERFORMANCE_GC_FLAGS_SCHEDULE_IDLE: number; - } - interface EventLoopMonitorOptions { - /** - * The sampling rate in milliseconds. - * Must be greater than zero. - * @default 10 - */ - resolution?: number | undefined; - } - interface Histogram { - /** - * The number of samples recorded by the histogram. - * @since v17.4.0, v16.14.0 - */ - readonly count: number; - /** - * The number of samples recorded by the histogram. - * v17.4.0, v16.14.0 - */ - readonly countBigInt: bigint; - /** - * The number of times the event loop delay exceeded the maximum 1 hour event - * loop delay threshold. - * @since v11.10.0 - */ - readonly exceeds: number; - /** - * The number of times the event loop delay exceeded the maximum 1 hour event loop delay threshold. - * @since v17.4.0, v16.14.0 - */ - readonly exceedsBigInt: bigint; - /** - * The maximum recorded event loop delay. - * @since v11.10.0 - */ - readonly max: number; - /** - * The maximum recorded event loop delay. - * v17.4.0, v16.14.0 - */ - readonly maxBigInt: number; - /** - * The mean of the recorded event loop delays. - * @since v11.10.0 - */ - readonly mean: number; - /** - * The minimum recorded event loop delay. - * @since v11.10.0 - */ - readonly min: number; - /** - * The minimum recorded event loop delay. - * v17.4.0, v16.14.0 - */ - readonly minBigInt: bigint; - /** - * Returns the value at the given percentile. - * @since v11.10.0 - * @param percentile A percentile value in the range (0, 100]. - */ - percentile(percentile: number): number; - /** - * Returns the value at the given percentile. - * @since v17.4.0, v16.14.0 - * @param percentile A percentile value in the range (0, 100]. - */ - percentileBigInt(percentile: number): bigint; - /** - * Returns a `Map` object detailing the accumulated percentile distribution. - * @since v11.10.0 - */ - readonly percentiles: Map; - /** - * Returns a `Map` object detailing the accumulated percentile distribution. - * @since v17.4.0, v16.14.0 - */ - readonly percentilesBigInt: Map; - /** - * Resets the collected histogram data. - * @since v11.10.0 - */ - reset(): void; - /** - * The standard deviation of the recorded event loop delays. - * @since v11.10.0 - */ - readonly stddev: number; - } - interface IntervalHistogram extends Histogram { - /** - * Enables the update interval timer. Returns `true` if the timer was - * started, `false` if it was already started. - * @since v11.10.0 - */ - enable(): boolean; - /** - * Disables the update interval timer. Returns `true` if the timer was - * stopped, `false` if it was already stopped. - * @since v11.10.0 - */ - disable(): boolean; - /** - * Disables the update interval timer when the histogram is disposed. - * - * ```js - * const { monitorEventLoopDelay } = require('node:perf_hooks'); - * { - * using hist = monitorEventLoopDelay({ resolution: 20 }); - * hist.enable(); - * // The histogram will be disabled when the block is exited. - * } - * ``` - * @since v24.2.0 - */ - [Symbol.dispose](): void; - } - interface RecordableHistogram extends Histogram { - /** - * @since v15.9.0, v14.18.0 - * @param val The amount to record in the histogram. - */ - record(val: number | bigint): void; - /** - * Calculates the amount of time (in nanoseconds) that has passed since the - * previous call to `recordDelta()` and records that amount in the histogram. - * @since v15.9.0, v14.18.0 - */ - recordDelta(): void; - /** - * Adds the values from `other` to this histogram. - * @since v17.4.0, v16.14.0 - */ - add(other: RecordableHistogram): void; - } - /** - * _This property is an extension by Node.js. It is not available in Web browsers._ - * - * Creates an `IntervalHistogram` object that samples and reports the event loop - * delay over time. The delays will be reported in nanoseconds. - * - * Using a timer to detect approximate event loop delay works because the - * execution of timers is tied specifically to the lifecycle of the libuv - * event loop. That is, a delay in the loop will cause a delay in the execution - * of the timer, and those delays are specifically what this API is intended to - * detect. - * - * ```js - * import { monitorEventLoopDelay } from 'node:perf_hooks'; - * const h = monitorEventLoopDelay({ resolution: 20 }); - * h.enable(); - * // Do something. - * h.disable(); - * console.log(h.min); - * console.log(h.max); - * console.log(h.mean); - * console.log(h.stddev); - * console.log(h.percentiles); - * console.log(h.percentile(50)); - * console.log(h.percentile(99)); - * ``` - * @since v11.10.0 - */ - function monitorEventLoopDelay(options?: EventLoopMonitorOptions): IntervalHistogram; - interface CreateHistogramOptions { - /** - * The minimum recordable value. Must be an integer value greater than 0. - * @default 1 - */ - lowest?: number | bigint | undefined; - /** - * The maximum recordable value. Must be an integer value greater than min. - * @default Number.MAX_SAFE_INTEGER - */ - highest?: number | bigint | undefined; - /** - * The number of accuracy digits. Must be a number between 1 and 5. - * @default 3 - */ - figures?: number | undefined; - } - /** - * Returns a `RecordableHistogram`. - * @since v15.9.0, v14.18.0 - */ - function createHistogram(options?: CreateHistogramOptions): RecordableHistogram; - // TODO: remove these in a future major - /** @deprecated Use the canonical `PerformanceMarkOptions` instead. */ - interface MarkOptions extends PerformanceMarkOptions {} - /** @deprecated Use the canonical `PerformanceMeasureOptions` instead. */ - interface MeasureOptions extends PerformanceMeasureOptions {} - /** @deprecated Use `PerformanceTimerifyOptions` instead. */ - interface TimerifyOptions extends PerformanceTimerifyOptions {} -} -declare module "perf_hooks" { - export * from "node:perf_hooks"; -} diff --git a/PBandGraphScaffold/node_modules/@types/node/process.d.ts b/PBandGraphScaffold/node_modules/@types/node/process.d.ts deleted file mode 100644 index b3082eb..0000000 --- a/PBandGraphScaffold/node_modules/@types/node/process.d.ts +++ /dev/null @@ -1,2097 +0,0 @@ -declare module "node:process" { - import { Control, MessageOptions, SendHandle } from "node:child_process"; - import { InternalEventEmitter } from "node:events"; - import { PathLike } from "node:fs"; - import * as tty from "node:tty"; - import { Worker } from "node:worker_threads"; - interface BuiltInModule { - "assert": typeof import("assert"); - "node:assert": typeof import("node:assert"); - "assert/strict": typeof import("assert/strict"); - "node:assert/strict": typeof import("node:assert/strict"); - "async_hooks": typeof import("async_hooks"); - "node:async_hooks": typeof import("node:async_hooks"); - "buffer": typeof import("buffer"); - "node:buffer": typeof import("node:buffer"); - "child_process": typeof import("child_process"); - "node:child_process": typeof import("node:child_process"); - "cluster": typeof import("cluster"); - "node:cluster": typeof import("node:cluster"); - "console": typeof import("console"); - "node:console": typeof import("node:console"); - "constants": typeof import("constants"); - "node:constants": typeof import("node:constants"); - "crypto": typeof import("crypto"); - "node:crypto": typeof import("node:crypto"); - "dgram": typeof import("dgram"); - "node:dgram": typeof import("node:dgram"); - "diagnostics_channel": typeof import("diagnostics_channel"); - "node:diagnostics_channel": typeof import("node:diagnostics_channel"); - "dns": typeof import("dns"); - "node:dns": typeof import("node:dns"); - "dns/promises": typeof import("dns/promises"); - "node:dns/promises": typeof import("node:dns/promises"); - "domain": typeof import("domain"); - "node:domain": typeof import("node:domain"); - "events": typeof import("events"); - "node:events": typeof import("node:events"); - "fs": typeof import("fs"); - "node:fs": typeof import("node:fs"); - "fs/promises": typeof import("fs/promises"); - "node:fs/promises": typeof import("node:fs/promises"); - "http": typeof import("http"); - "node:http": typeof import("node:http"); - "http2": typeof import("http2"); - "node:http2": typeof import("node:http2"); - "https": typeof import("https"); - "node:https": typeof import("node:https"); - "inspector": typeof import("inspector"); - "node:inspector": typeof import("node:inspector"); - "inspector/promises": typeof import("inspector/promises"); - "node:inspector/promises": typeof import("node:inspector/promises"); - "module": typeof import("module"); - "node:module": typeof import("node:module"); - "net": typeof import("net"); - "node:net": typeof import("node:net"); - "os": typeof import("os"); - "node:os": typeof import("node:os"); - "path": typeof import("path"); - "node:path": typeof import("node:path"); - "path/posix": typeof import("path/posix"); - "node:path/posix": typeof import("node:path/posix"); - "path/win32": typeof import("path/win32"); - "node:path/win32": typeof import("node:path/win32"); - "perf_hooks": typeof import("perf_hooks"); - "node:perf_hooks": typeof import("node:perf_hooks"); - "process": typeof import("process"); - "node:process": typeof import("node:process"); - "punycode": typeof import("punycode"); - "node:punycode": typeof import("node:punycode"); - "querystring": typeof import("querystring"); - "node:querystring": typeof import("node:querystring"); - "node:quic": typeof import("node:quic"); - "readline": typeof import("readline"); - "node:readline": typeof import("node:readline"); - "readline/promises": typeof import("readline/promises"); - "node:readline/promises": typeof import("node:readline/promises"); - "repl": typeof import("repl"); - "node:repl": typeof import("node:repl"); - "node:sea": typeof import("node:sea"); - "node:sqlite": typeof import("node:sqlite"); - "stream": typeof import("stream"); - "node:stream": typeof import("node:stream"); - "stream/consumers": typeof import("stream/consumers"); - "node:stream/consumers": typeof import("node:stream/consumers"); - "stream/promises": typeof import("stream/promises"); - "node:stream/promises": typeof import("node:stream/promises"); - "stream/web": typeof import("stream/web"); - "node:stream/web": typeof import("node:stream/web"); - "string_decoder": typeof import("string_decoder"); - "node:string_decoder": typeof import("node:string_decoder"); - "node:test": typeof import("node:test"); - "node:test/reporters": typeof import("node:test/reporters"); - "timers": typeof import("timers"); - "node:timers": typeof import("node:timers"); - "timers/promises": typeof import("timers/promises"); - "node:timers/promises": typeof import("node:timers/promises"); - "tls": typeof import("tls"); - "node:tls": typeof import("node:tls"); - "trace_events": typeof import("trace_events"); - "node:trace_events": typeof import("node:trace_events"); - "tty": typeof import("tty"); - "node:tty": typeof import("node:tty"); - "url": typeof import("url"); - "node:url": typeof import("node:url"); - "util": typeof import("util"); - "node:util": typeof import("node:util"); - "util/types": typeof import("util/types"); - "node:util/types": typeof import("node:util/types"); - "v8": typeof import("v8"); - "node:v8": typeof import("node:v8"); - "vm": typeof import("vm"); - "node:vm": typeof import("node:vm"); - "wasi": typeof import("wasi"); - "node:wasi": typeof import("node:wasi"); - "worker_threads": typeof import("worker_threads"); - "node:worker_threads": typeof import("node:worker_threads"); - "zlib": typeof import("zlib"); - "node:zlib": typeof import("node:zlib"); - } - type SignalsEventMap = { [S in NodeJS.Signals]: [signal: S] }; - interface ProcessEventMap extends SignalsEventMap { - "beforeExit": [code: number]; - "disconnect": []; - "exit": [code: number]; - "message": [ - message: object | boolean | number | string | null, - sendHandle: SendHandle | undefined, - ]; - "rejectionHandled": [promise: Promise]; - "uncaughtException": [error: Error, origin: NodeJS.UncaughtExceptionOrigin]; - "uncaughtExceptionMonitor": [error: Error, origin: NodeJS.UncaughtExceptionOrigin]; - "unhandledRejection": [reason: unknown, promise: Promise]; - "warning": [warning: Error]; - "worker": [worker: Worker]; - "workerMessage": [value: any, source: number]; - } - global { - var process: NodeJS.Process; - namespace process { - export { ProcessEventMap }; - } - namespace NodeJS { - // this namespace merge is here because these are specifically used - // as the type for process.stdin, process.stdout, and process.stderr. - // they can't live in tty.d.ts because we need to disambiguate the imported name. - interface ReadStream extends tty.ReadStream {} - interface WriteStream extends tty.WriteStream {} - interface MemoryUsageFn { - /** - * The `process.memoryUsage()` method iterate over each page to gather informations about memory - * usage which can be slow depending on the program memory allocations. - */ - (): MemoryUsage; - /** - * method returns an integer representing the Resident Set Size (RSS) in bytes. - */ - rss(): number; - } - interface MemoryUsage { - /** - * Resident Set Size, is the amount of space occupied in the main memory device (that is a subset of the total allocated memory) for the - * process, including all C++ and JavaScript objects and code. - */ - rss: number; - /** - * Refers to V8's memory usage. - */ - heapTotal: number; - /** - * Refers to V8's memory usage. - */ - heapUsed: number; - external: number; - /** - * Refers to memory allocated for `ArrayBuffer`s and `SharedArrayBuffer`s, including all Node.js Buffers. This is also included - * in the external value. When Node.js is used as an embedded library, this value may be `0` because allocations for `ArrayBuffer`s - * may not be tracked in that case. - */ - arrayBuffers: number; - } - interface CpuUsage { - user: number; - system: number; - } - interface ProcessRelease { - name: string; - sourceUrl?: string | undefined; - headersUrl?: string | undefined; - libUrl?: string | undefined; - lts?: string | undefined; - } - interface ProcessFeatures { - /** - * A boolean value that is `true` if the current Node.js build is caching builtin modules. - * @since v12.0.0 - */ - readonly cached_builtins: boolean; - /** - * A boolean value that is `true` if the current Node.js build is a debug build. - * @since v0.5.5 - */ - readonly debug: boolean; - /** - * A boolean value that is `true` if the current Node.js build includes the inspector. - * @since v11.10.0 - */ - readonly inspector: boolean; - /** - * A boolean value that is `true` if the current Node.js build includes support for IPv6. - * - * Since all Node.js builds have IPv6 support, this value is always `true`. - * @since v0.5.3 - * @deprecated This property is always true, and any checks based on it are redundant. - */ - readonly ipv6: boolean; - /** - * A boolean value that is `true` if the current Node.js build supports - * [loading ECMAScript modules using `require()`](https://nodejs.org/docs/latest-v25.x/api/modules.md#loading-ecmascript-modules-using-require). - * @since v22.10.0 - */ - readonly require_module: boolean; - /** - * A boolean value that is `true` if the current Node.js build includes support for TLS. - * @since v0.5.3 - */ - readonly tls: boolean; - /** - * A boolean value that is `true` if the current Node.js build includes support for ALPN in TLS. - * - * In Node.js 11.0.0 and later versions, the OpenSSL dependencies feature unconditional ALPN support. - * This value is therefore identical to that of `process.features.tls`. - * @since v4.8.0 - * @deprecated Use `process.features.tls` instead. - */ - readonly tls_alpn: boolean; - /** - * A boolean value that is `true` if the current Node.js build includes support for OCSP in TLS. - * - * In Node.js 11.0.0 and later versions, the OpenSSL dependencies feature unconditional OCSP support. - * This value is therefore identical to that of `process.features.tls`. - * @since v0.11.13 - * @deprecated Use `process.features.tls` instead. - */ - readonly tls_ocsp: boolean; - /** - * A boolean value that is `true` if the current Node.js build includes support for SNI in TLS. - * - * In Node.js 11.0.0 and later versions, the OpenSSL dependencies feature unconditional SNI support. - * This value is therefore identical to that of `process.features.tls`. - * @since v0.5.3 - * @deprecated Use `process.features.tls` instead. - */ - readonly tls_sni: boolean; - /** - * A value that is `"strip"` by default, - * `"transform"` if Node.js is run with `--experimental-transform-types`, and `false` if - * Node.js is run with `--no-experimental-strip-types`. - * @since v22.10.0 - */ - readonly typescript: "strip" | "transform" | false; - /** - * A boolean value that is `true` if the current Node.js build includes support for libuv. - * - * Since it's not possible to build Node.js without libuv, this value is always `true`. - * @since v0.5.3 - * @deprecated This property is always true, and any checks based on it are redundant. - */ - readonly uv: boolean; - } - interface ProcessVersions extends Dict { - http_parser: string; - node: string; - v8: string; - ares: string; - uv: string; - zlib: string; - modules: string; - openssl: string; - } - type Platform = - | "aix" - | "android" - | "darwin" - | "freebsd" - | "haiku" - | "linux" - | "openbsd" - | "sunos" - | "win32" - | "cygwin" - | "netbsd"; - type Architecture = - | "arm" - | "arm64" - | "ia32" - | "loong64" - | "mips" - | "mipsel" - | "ppc64" - | "riscv64" - | "s390x" - | "x64"; - type Signals = - | "SIGABRT" - | "SIGALRM" - | "SIGBUS" - | "SIGCHLD" - | "SIGCONT" - | "SIGFPE" - | "SIGHUP" - | "SIGILL" - | "SIGINT" - | "SIGIO" - | "SIGIOT" - | "SIGKILL" - | "SIGPIPE" - | "SIGPOLL" - | "SIGPROF" - | "SIGPWR" - | "SIGQUIT" - | "SIGSEGV" - | "SIGSTKFLT" - | "SIGSTOP" - | "SIGSYS" - | "SIGTERM" - | "SIGTRAP" - | "SIGTSTP" - | "SIGTTIN" - | "SIGTTOU" - | "SIGUNUSED" - | "SIGURG" - | "SIGUSR1" - | "SIGUSR2" - | "SIGVTALRM" - | "SIGWINCH" - | "SIGXCPU" - | "SIGXFSZ" - | "SIGBREAK" - | "SIGLOST" - | "SIGINFO"; - type UncaughtExceptionOrigin = "uncaughtException" | "unhandledRejection"; - /** - * @deprecated Global listener types will be removed in a future version. - * Callbacks passed directly to `process`'s EventEmitter methods - * have their parameter types inferred automatically. - * - * `process` event types are also available via `ProcessEventMap`: - * - * ```ts - * import type { ProcessEventMap } from 'node:process'; - * const listener = (...args: ProcessEventMap['beforeExit']) => { ... }; - * ``` - */ - type BeforeExitListener = (...args: ProcessEventMap["beforeExit"]) => void; - /** - * @deprecated Global listener types will be removed in a future version. - * Callbacks passed directly to `process`'s EventEmitter methods - * have their parameter types inferred automatically. - * - * `process` event types are also available via `ProcessEventMap`: - * - * ```ts - * import type { ProcessEventMap } from 'node:process'; - * const listener = (...args: ProcessEventMap['disconnect']) => { ... }; - * ``` - */ - type DisconnectListener = (...args: ProcessEventMap["disconnect"]) => void; - /** - * @deprecated Global listener types will be removed in a future version. - * Callbacks passed directly to `process`'s EventEmitter methods - * have their parameter types inferred automatically. - * - * `process` event types are also available via `ProcessEventMap`: - * - * ```ts - * import type { ProcessEventMap } from 'node:process'; - * const listener = (...args: ProcessEventMap['exit']) => { ... }; - * ``` - */ - type ExitListener = (...args: ProcessEventMap["exit"]) => void; - /** - * @deprecated Global listener types will be removed in a future version. - * Callbacks passed directly to `process`'s EventEmitter methods - * have their parameter types inferred automatically. - * - * `process` event types are also available via `ProcessEventMap`: - * - * ```ts - * import type { ProcessEventMap } from 'node:process'; - * const listener = (...args: ProcessEventMap['message']) => { ... }; - * ``` - */ - type MessageListener = (...args: ProcessEventMap["message"]) => void; - /** - * @deprecated Global listener types will be removed in a future version. - * Callbacks passed directly to `process`'s EventEmitter methods - * have their parameter types inferred automatically. - * - * `process` event types are also available via `ProcessEventMap`: - * - * ```ts - * import type { ProcessEventMap } from 'node:process'; - * const listener = (...args: ProcessEventMap['rejectionHandled']) => { ... }; - * ``` - */ - type RejectionHandledListener = (...args: ProcessEventMap["rejectionHandled"]) => void; - /** - * @deprecated Global listener types will be removed in a future version. - * Callbacks passed directly to `process`'s EventEmitter methods - * have their parameter types inferred automatically. - */ - type SignalsListener = (signal: Signals) => void; - /** - * @deprecated Global listener types will be removed in a future version. - * Callbacks passed directly to `process`'s EventEmitter methods - * have their parameter types inferred automatically. - * - * `process` event types are also available via `ProcessEventMap`: - * - * ```ts - * import type { ProcessEventMap } from 'node:process'; - * const listener = (...args: ProcessEventMap['uncaughtException']) => { ... }; - * ``` - */ - type UncaughtExceptionListener = (...args: ProcessEventMap["uncaughtException"]) => void; - /** - * @deprecated Global listener types will be removed in a future version. - * Callbacks passed directly to `process`'s EventEmitter methods - * have their parameter types inferred automatically. - * - * `process` event types are also available via `ProcessEventMap`: - * - * ```ts - * import type { ProcessEventMap } from 'node:process'; - * const listener = (...args: ProcessEventMap['unhandledRejection']) => { ... }; - * ``` - */ - type UnhandledRejectionListener = (...args: ProcessEventMap["unhandledRejection"]) => void; - /** - * @deprecated Global listener types will be removed in a future version. - * Callbacks passed directly to `process`'s EventEmitter methods - * have their parameter types inferred automatically. - * - * `process` event types are also available via `ProcessEventMap`: - * - * ```ts - * import type { ProcessEventMap } from 'node:process'; - * const listener = (...args: ProcessEventMap['warning']) => { ... }; - * ``` - */ - type WarningListener = (...args: ProcessEventMap["warning"]) => void; - /** - * @deprecated Global listener types will be removed in a future version. - * Callbacks passed directly to `process`'s EventEmitter methods - * have their parameter types inferred automatically. - * - * `process` event types are also available via `ProcessEventMap`: - * - * ```ts - * import type { ProcessEventMap } from 'node:process'; - * const listener = (...args: ProcessEventMap['worker']) => { ... }; - * ``` - */ - type WorkerListener = (...args: ProcessEventMap["worker"]) => void; - interface Socket extends ReadWriteStream { - isTTY?: true | undefined; - } - // Alias for compatibility - interface ProcessEnv extends Dict { - /** - * Can be used to change the default timezone at runtime - */ - TZ?: string | undefined; - } - interface HRTime { - /** - * This is the legacy version of {@link process.hrtime.bigint()} - * before bigint was introduced in JavaScript. - * - * The `process.hrtime()` method returns the current high-resolution real time in a `[seconds, nanoseconds]` tuple `Array`, - * where `nanoseconds` is the remaining part of the real time that can't be represented in second precision. - * - * `time` is an optional parameter that must be the result of a previous `process.hrtime()` call to diff with the current time. - * If the parameter passed in is not a tuple `Array`, a TypeError will be thrown. - * Passing in a user-defined array instead of the result of a previous call to `process.hrtime()` will lead to undefined behavior. - * - * These times are relative to an arbitrary time in the past, - * and not related to the time of day and therefore not subject to clock drift. - * The primary use is for measuring performance between intervals: - * ```js - * const { hrtime } = require('node:process'); - * const NS_PER_SEC = 1e9; - * const time = hrtime(); - * // [ 1800216, 25 ] - * - * setTimeout(() => { - * const diff = hrtime(time); - * // [ 1, 552 ] - * - * console.log(`Benchmark took ${diff[0] * NS_PER_SEC + diff[1]} nanoseconds`); - * // Benchmark took 1000000552 nanoseconds - * }, 1000); - * ``` - * @since 0.7.6 - * @legacy Use {@link process.hrtime.bigint()} instead. - * @param time The result of a previous call to `process.hrtime()` - */ - (time?: [number, number]): [number, number]; - /** - * The `bigint` version of the {@link process.hrtime()} method returning the current high-resolution real time in nanoseconds as a `bigint`. - * - * Unlike {@link process.hrtime()}, it does not support an additional time argument since the difference can just be computed directly by subtraction of the two `bigint`s. - * ```js - * import { hrtime } from 'node:process'; - * - * const start = hrtime.bigint(); - * // 191051479007711n - * - * setTimeout(() => { - * const end = hrtime.bigint(); - * // 191052633396993n - * - * console.log(`Benchmark took ${end - start} nanoseconds`); - * // Benchmark took 1154389282 nanoseconds - * }, 1000); - * ``` - * @since v10.7.0 - */ - bigint(): bigint; - } - interface ProcessPermission { - /** - * Verifies that the process is able to access the given scope and reference. - * If no reference is provided, a global scope is assumed, for instance, `process.permission.has('fs.read')` - * will check if the process has ALL file system read permissions. - * - * The reference has a meaning based on the provided scope. For example, the reference when the scope is File System means files and folders. - * - * The available scopes are: - * - * * `fs` - All File System - * * `fs.read` - File System read operations - * * `fs.write` - File System write operations - * * `child` - Child process spawning operations - * * `worker` - Worker thread spawning operation - * - * ```js - * // Check if the process has permission to read the README file - * process.permission.has('fs.read', './README.md'); - * // Check if the process has read permission operations - * process.permission.has('fs.read'); - * ``` - * @since v20.0.0 - */ - has(scope: string, reference?: string): boolean; - } - interface ProcessReport { - /** - * Write reports in a compact format, single-line JSON, more easily consumable by log processing systems - * than the default multi-line format designed for human consumption. - * @since v13.12.0, v12.17.0 - */ - compact: boolean; - /** - * Directory where the report is written. - * The default value is the empty string, indicating that reports are written to the current - * working directory of the Node.js process. - */ - directory: string; - /** - * Filename where the report is written. If set to the empty string, the output filename will be comprised - * of a timestamp, PID, and sequence number. The default value is the empty string. - */ - filename: string; - /** - * Returns a JavaScript Object representation of a diagnostic report for the running process. - * The report's JavaScript stack trace is taken from `err`, if present. - */ - getReport(err?: Error): object; - /** - * If true, a diagnostic report is generated on fatal errors, - * such as out of memory errors or failed C++ assertions. - * @default false - */ - reportOnFatalError: boolean; - /** - * If true, a diagnostic report is generated when the process - * receives the signal specified by process.report.signal. - * @default false - */ - reportOnSignal: boolean; - /** - * If true, a diagnostic report is generated on uncaught exception. - * @default false - */ - reportOnUncaughtException: boolean; - /** - * The signal used to trigger the creation of a diagnostic report. - * @default 'SIGUSR2' - */ - signal: Signals; - /** - * Writes a diagnostic report to a file. If filename is not provided, the default filename - * includes the date, time, PID, and a sequence number. - * The report's JavaScript stack trace is taken from `err`, if present. - * - * If the value of filename is set to `'stdout'` or `'stderr'`, the report is written - * to the stdout or stderr of the process respectively. - * @param fileName Name of the file where the report is written. - * This should be a relative path, that will be appended to the directory specified in - * `process.report.directory`, or the current working directory of the Node.js process, - * if unspecified. - * @param err A custom error used for reporting the JavaScript stack. - * @return Filename of the generated report. - */ - writeReport(fileName?: string, err?: Error): string; - writeReport(err?: Error): string; - } - interface ResourceUsage { - fsRead: number; - fsWrite: number; - involuntaryContextSwitches: number; - ipcReceived: number; - ipcSent: number; - majorPageFault: number; - maxRSS: number; - minorPageFault: number; - sharedMemorySize: number; - signalsCount: number; - swappedOut: number; - systemCPUTime: number; - unsharedDataSize: number; - unsharedStackSize: number; - userCPUTime: number; - voluntaryContextSwitches: number; - } - interface EmitWarningOptions { - /** - * When `warning` is a `string`, `type` is the name to use for the _type_ of warning being emitted. - * - * @default 'Warning' - */ - type?: string | undefined; - /** - * A unique identifier for the warning instance being emitted. - */ - code?: string | undefined; - /** - * When `warning` is a `string`, `ctor` is an optional function used to limit the generated stack trace. - * - * @default process.emitWarning - */ - ctor?: Function | undefined; - /** - * Additional text to include with the error. - */ - detail?: string | undefined; - } - interface ProcessConfig { - readonly target_defaults: { - readonly cflags: any[]; - readonly default_configuration: string; - readonly defines: string[]; - readonly include_dirs: string[]; - readonly libraries: string[]; - }; - readonly variables: { - readonly clang: number; - readonly host_arch: string; - readonly node_install_npm: boolean; - readonly node_install_waf: boolean; - readonly node_prefix: string; - readonly node_shared_openssl: boolean; - readonly node_shared_v8: boolean; - readonly node_shared_zlib: boolean; - readonly node_use_dtrace: boolean; - readonly node_use_etw: boolean; - readonly node_use_openssl: boolean; - readonly target_arch: string; - readonly v8_no_strict_aliasing: number; - readonly v8_use_snapshot: boolean; - readonly visibility: string; - }; - } - interface Process extends InternalEventEmitter { - /** - * The `process.stdout` property returns a stream connected to`stdout` (fd `1`). It is a `net.Socket` (which is a `Duplex` stream) unless fd `1` refers to a file, in which case it is - * a `Writable` stream. - * - * For example, to copy `process.stdin` to `process.stdout`: - * - * ```js - * import { stdin, stdout } from 'node:process'; - * - * stdin.pipe(stdout); - * ``` - * - * `process.stdout` differs from other Node.js streams in important ways. See `note on process I/O` for more information. - */ - stdout: WriteStream & { - fd: 1; - }; - /** - * The `process.stderr` property returns a stream connected to`stderr` (fd `2`). It is a `net.Socket` (which is a `Duplex` stream) unless fd `2` refers to a file, in which case it is - * a `Writable` stream. - * - * `process.stderr` differs from other Node.js streams in important ways. See `note on process I/O` for more information. - */ - stderr: WriteStream & { - fd: 2; - }; - /** - * The `process.stdin` property returns a stream connected to`stdin` (fd `0`). It is a `net.Socket` (which is a `Duplex` stream) unless fd `0` refers to a file, in which case it is - * a `Readable` stream. - * - * For details of how to read from `stdin` see `readable.read()`. - * - * As a `Duplex` stream, `process.stdin` can also be used in "old" mode that - * is compatible with scripts written for Node.js prior to v0.10\. - * For more information see `Stream compatibility`. - * - * In "old" streams mode the `stdin` stream is paused by default, so one - * must call `process.stdin.resume()` to read from it. Note also that calling `process.stdin.resume()` itself would switch stream to "old" mode. - */ - stdin: ReadStream & { - fd: 0; - }; - /** - * The `process.argv` property returns an array containing the command-line - * arguments passed when the Node.js process was launched. The first element will - * be {@link execPath}. See `process.argv0` if access to the original value - * of `argv[0]` is needed. The second element will be the path to the JavaScript - * file being executed. The remaining elements will be any additional command-line - * arguments. - * - * For example, assuming the following script for `process-args.js`: - * - * ```js - * import { argv } from 'node:process'; - * - * // print process.argv - * argv.forEach((val, index) => { - * console.log(`${index}: ${val}`); - * }); - * ``` - * - * Launching the Node.js process as: - * - * ```bash - * node process-args.js one two=three four - * ``` - * - * Would generate the output: - * - * ```text - * 0: /usr/local/bin/node - * 1: /Users/mjr/work/node/process-args.js - * 2: one - * 3: two=three - * 4: four - * ``` - * @since v0.1.27 - */ - argv: string[]; - /** - * The `process.argv0` property stores a read-only copy of the original value of`argv[0]` passed when Node.js starts. - * - * ```console - * $ bash -c 'exec -a customArgv0 ./node' - * > process.argv[0] - * '/Volumes/code/external/node/out/Release/node' - * > process.argv0 - * 'customArgv0' - * ``` - * @since v6.4.0 - */ - argv0: string; - /** - * The `process.execArgv` property returns the set of Node.js-specific command-line - * options passed when the Node.js process was launched. These options do not - * appear in the array returned by the {@link argv} property, and do not - * include the Node.js executable, the name of the script, or any options following - * the script name. These options are useful in order to spawn child processes with - * the same execution environment as the parent. - * - * ```bash - * node --icu-data-dir=./foo --require ./bar.js script.js --version - * ``` - * - * Results in `process.execArgv`: - * - * ```js - * ["--icu-data-dir=./foo", "--require", "./bar.js"] - * ``` - * - * And `process.argv`: - * - * ```js - * ['/usr/local/bin/node', 'script.js', '--version'] - * ``` - * - * Refer to `Worker constructor` for the detailed behavior of worker - * threads with this property. - * @since v0.7.7 - */ - execArgv: string[]; - /** - * The `process.execPath` property returns the absolute pathname of the executable - * that started the Node.js process. Symbolic links, if any, are resolved. - * - * ```js - * '/usr/local/bin/node' - * ``` - * @since v0.1.100 - */ - execPath: string; - /** - * The `process.abort()` method causes the Node.js process to exit immediately and - * generate a core file. - * - * This feature is not available in `Worker` threads. - * @since v0.7.0 - */ - abort(): never; - /** - * The `process.chdir()` method changes the current working directory of the - * Node.js process or throws an exception if doing so fails (for instance, if - * the specified `directory` does not exist). - * - * ```js - * import { chdir, cwd } from 'node:process'; - * - * console.log(`Starting directory: ${cwd()}`); - * try { - * chdir('/tmp'); - * console.log(`New directory: ${cwd()}`); - * } catch (err) { - * console.error(`chdir: ${err}`); - * } - * ``` - * - * This feature is not available in `Worker` threads. - * @since v0.1.17 - */ - chdir(directory: string): void; - /** - * The `process.cwd()` method returns the current working directory of the Node.js - * process. - * - * ```js - * import { cwd } from 'node:process'; - * - * console.log(`Current directory: ${cwd()}`); - * ``` - * @since v0.1.8 - */ - cwd(): string; - /** - * The port used by the Node.js debugger when enabled. - * - * ```js - * import process from 'node:process'; - * - * process.debugPort = 5858; - * ``` - * @since v0.7.2 - */ - debugPort: number; - /** - * The `process.dlopen()` method allows dynamically loading shared objects. It is primarily used by `require()` to load C++ Addons, and - * should not be used directly, except in special cases. In other words, `require()` should be preferred over `process.dlopen()` - * unless there are specific reasons such as custom dlopen flags or loading from ES modules. - * - * The `flags` argument is an integer that allows to specify dlopen behavior. See the `[os.constants.dlopen](https://nodejs.org/docs/latest-v25.x/api/os.html#dlopen-constants)` - * documentation for details. - * - * An important requirement when calling `process.dlopen()` is that the `module` instance must be passed. Functions exported by the C++ Addon - * are then accessible via `module.exports`. - * - * The example below shows how to load a C++ Addon, named `local.node`, that exports a `foo` function. All the symbols are loaded before the call returns, by passing the `RTLD_NOW` constant. - * In this example the constant is assumed to be available. - * - * ```js - * import { dlopen } from 'node:process'; - * import { constants } from 'node:os'; - * import { fileURLToPath } from 'node:url'; - * - * const module = { exports: {} }; - * dlopen(module, fileURLToPath(new URL('local.node', import.meta.url)), - * constants.dlopen.RTLD_NOW); - * module.exports.foo(); - * ``` - */ - dlopen(module: object, filename: string, flags?: number): void; - /** - * The `process.emitWarning()` method can be used to emit custom or application - * specific process warnings. These can be listened for by adding a handler to the `'warning'` event. - * - * ```js - * import { emitWarning } from 'node:process'; - * - * // Emit a warning using a string. - * emitWarning('Something happened!'); - * // Emits: (node: 56338) Warning: Something happened! - * ``` - * - * ```js - * import { emitWarning } from 'node:process'; - * - * // Emit a warning using a string and a type. - * emitWarning('Something Happened!', 'CustomWarning'); - * // Emits: (node:56338) CustomWarning: Something Happened! - * ``` - * - * ```js - * import { emitWarning } from 'node:process'; - * - * emitWarning('Something happened!', 'CustomWarning', 'WARN001'); - * // Emits: (node:56338) [WARN001] CustomWarning: Something happened! - * ```js - * - * In each of the previous examples, an `Error` object is generated internally by `process.emitWarning()` and passed through to the `'warning'` handler. - * - * ```js - * import process from 'node:process'; - * - * process.on('warning', (warning) => { - * console.warn(warning.name); // 'Warning' - * console.warn(warning.message); // 'Something happened!' - * console.warn(warning.code); // 'MY_WARNING' - * console.warn(warning.stack); // Stack trace - * console.warn(warning.detail); // 'This is some additional information' - * }); - * ``` - * - * If `warning` is passed as an `Error` object, it will be passed through to the `'warning'` event handler - * unmodified (and the optional `type`, `code` and `ctor` arguments will be ignored): - * - * ```js - * import { emitWarning } from 'node:process'; - * - * // Emit a warning using an Error object. - * const myWarning = new Error('Something happened!'); - * // Use the Error name property to specify the type name - * myWarning.name = 'CustomWarning'; - * myWarning.code = 'WARN001'; - * - * emitWarning(myWarning); - * // Emits: (node:56338) [WARN001] CustomWarning: Something happened! - * ``` - * - * A `TypeError` is thrown if `warning` is anything other than a string or `Error` object. - * - * While process warnings use `Error` objects, the process warning mechanism is not a replacement for normal error handling mechanisms. - * - * The following additional handling is implemented if the warning `type` is `'DeprecationWarning'`: - * * If the `--throw-deprecation` command-line flag is used, the deprecation warning is thrown as an exception rather than being emitted as an event. - * * If the `--no-deprecation` command-line flag is used, the deprecation warning is suppressed. - * * If the `--trace-deprecation` command-line flag is used, the deprecation warning is printed to `stderr` along with the full stack trace. - * @since v8.0.0 - * @param warning The warning to emit. - */ - emitWarning(warning: string | Error, ctor?: Function): void; - emitWarning(warning: string | Error, type?: string, ctor?: Function): void; - emitWarning(warning: string | Error, type?: string, code?: string, ctor?: Function): void; - emitWarning(warning: string | Error, options?: EmitWarningOptions): void; - /** - * The `process.env` property returns an object containing the user environment. - * See [`environ(7)`](http://man7.org/linux/man-pages/man7/environ.7.html). - * - * An example of this object looks like: - * - * ```js - * { - * TERM: 'xterm-256color', - * SHELL: '/usr/local/bin/bash', - * USER: 'maciej', - * PATH: '~/.bin/:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin', - * PWD: '/Users/maciej', - * EDITOR: 'vim', - * SHLVL: '1', - * HOME: '/Users/maciej', - * LOGNAME: 'maciej', - * _: '/usr/local/bin/node' - * } - * ``` - * - * It is possible to modify this object, but such modifications will not be - * reflected outside the Node.js process, or (unless explicitly requested) - * to other `Worker` threads. - * In other words, the following example would not work: - * - * ```bash - * node -e 'process.env.foo = "bar"' && echo $foo - * ``` - * - * While the following will: - * - * ```js - * import { env } from 'node:process'; - * - * env.foo = 'bar'; - * console.log(env.foo); - * ``` - * - * Assigning a property on `process.env` will implicitly convert the value - * to a string. **This behavior is deprecated.** Future versions of Node.js may - * throw an error when the value is not a string, number, or boolean. - * - * ```js - * import { env } from 'node:process'; - * - * env.test = null; - * console.log(env.test); - * // => 'null' - * env.test = undefined; - * console.log(env.test); - * // => 'undefined' - * ``` - * - * Use `delete` to delete a property from `process.env`. - * - * ```js - * import { env } from 'node:process'; - * - * env.TEST = 1; - * delete env.TEST; - * console.log(env.TEST); - * // => undefined - * ``` - * - * On Windows operating systems, environment variables are case-insensitive. - * - * ```js - * import { env } from 'node:process'; - * - * env.TEST = 1; - * console.log(env.test); - * // => 1 - * ``` - * - * Unless explicitly specified when creating a `Worker` instance, - * each `Worker` thread has its own copy of `process.env`, based on its - * parent thread's `process.env`, or whatever was specified as the `env` option - * to the `Worker` constructor. Changes to `process.env` will not be visible - * across `Worker` threads, and only the main thread can make changes that - * are visible to the operating system or to native add-ons. On Windows, a copy of `process.env` on a `Worker` instance operates in a case-sensitive manner - * unlike the main thread. - * @since v0.1.27 - */ - env: ProcessEnv; - /** - * The `process.exit()` method instructs Node.js to terminate the process - * synchronously with an exit status of `code`. If `code` is omitted, exit uses - * either the 'success' code `0` or the value of `process.exitCode` if it has been - * set. Node.js will not terminate until all the `'exit'` event listeners are - * called. - * - * To exit with a 'failure' code: - * - * ```js - * import { exit } from 'node:process'; - * - * exit(1); - * ``` - * - * The shell that executed Node.js should see the exit code as `1`. - * - * Calling `process.exit()` will force the process to exit as quickly as possible - * even if there are still asynchronous operations pending that have not yet - * completed fully, including I/O operations to `process.stdout` and `process.stderr`. - * - * In most situations, it is not actually necessary to call `process.exit()` explicitly. The Node.js process will exit on its own _if there is no additional_ - * _work pending_ in the event loop. The `process.exitCode` property can be set to - * tell the process which exit code to use when the process exits gracefully. - * - * For instance, the following example illustrates a _misuse_ of the `process.exit()` method that could lead to data printed to stdout being - * truncated and lost: - * - * ```js - * import { exit } from 'node:process'; - * - * // This is an example of what *not* to do: - * if (someConditionNotMet()) { - * printUsageToStdout(); - * exit(1); - * } - * ``` - * - * The reason this is problematic is because writes to `process.stdout` in Node.js - * are sometimes _asynchronous_ and may occur over multiple ticks of the Node.js - * event loop. Calling `process.exit()`, however, forces the process to exit _before_ those additional writes to `stdout` can be performed. - * - * Rather than calling `process.exit()` directly, the code _should_ set the `process.exitCode` and allow the process to exit naturally by avoiding - * scheduling any additional work for the event loop: - * - * ```js - * import process from 'node:process'; - * - * // How to properly set the exit code while letting - * // the process exit gracefully. - * if (someConditionNotMet()) { - * printUsageToStdout(); - * process.exitCode = 1; - * } - * ``` - * - * If it is necessary to terminate the Node.js process due to an error condition, - * throwing an _uncaught_ error and allowing the process to terminate accordingly - * is safer than calling `process.exit()`. - * - * In `Worker` threads, this function stops the current thread rather - * than the current process. - * @since v0.1.13 - * @param [code=0] The exit code. For string type, only integer strings (e.g.,'1') are allowed. - */ - exit(code?: number | string | null): never; - /** - * A number which will be the process exit code, when the process either - * exits gracefully, or is exited via {@link exit} without specifying - * a code. - * - * Specifying a code to {@link exit} will override any - * previous setting of `process.exitCode`. - * @default undefined - * @since v0.11.8 - */ - exitCode: number | string | null | undefined; - finalization: { - /** - * This function registers a callback to be called when the process emits the `exit` event if the `ref` object was not garbage collected. - * If the object `ref` was garbage collected before the `exit` event is emitted, the callback will be removed from the finalization registry, and it will not be called on process exit. - * - * Inside the callback you can release the resources allocated by the `ref` object. - * Be aware that all limitations applied to the `beforeExit` event are also applied to the callback function, - * this means that there is a possibility that the callback will not be called under special circumstances. - * - * The idea of ​​this function is to help you free up resources when the starts process exiting, but also let the object be garbage collected if it is no longer being used. - * @param ref The reference to the resource that is being tracked. - * @param callback The callback function to be called when the resource is finalized. - * @since v22.5.0 - * @experimental - */ - register(ref: T, callback: (ref: T, event: "exit") => void): void; - /** - * This function behaves exactly like the `register`, except that the callback will be called when the process emits the `beforeExit` event if `ref` object was not garbage collected. - * - * Be aware that all limitations applied to the `beforeExit` event are also applied to the callback function, this means that there is a possibility that the callback will not be called under special circumstances. - * @param ref The reference to the resource that is being tracked. - * @param callback The callback function to be called when the resource is finalized. - * @since v22.5.0 - * @experimental - */ - registerBeforeExit(ref: T, callback: (ref: T, event: "beforeExit") => void): void; - /** - * This function remove the register of the object from the finalization registry, so the callback will not be called anymore. - * @param ref The reference to the resource that was registered previously. - * @since v22.5.0 - * @experimental - */ - unregister(ref: object): void; - }; - /** - * The `process.getActiveResourcesInfo()` method returns an array of strings containing - * the types of the active resources that are currently keeping the event loop alive. - * - * ```js - * import { getActiveResourcesInfo } from 'node:process'; - * import { setTimeout } from 'node:timers'; - - * console.log('Before:', getActiveResourcesInfo()); - * setTimeout(() => {}, 1000); - * console.log('After:', getActiveResourcesInfo()); - * // Prints: - * // Before: [ 'TTYWrap', 'TTYWrap', 'TTYWrap' ] - * // After: [ 'TTYWrap', 'TTYWrap', 'TTYWrap', 'Timeout' ] - * ``` - * @since v17.3.0, v16.14.0 - */ - getActiveResourcesInfo(): string[]; - /** - * Provides a way to load built-in modules in a globally available function. - * @param id ID of the built-in module being requested. - */ - getBuiltinModule(id: ID): BuiltInModule[ID]; - getBuiltinModule(id: string): object | undefined; - /** - * The `process.getgid()` method returns the numerical group identity of the - * process. (See [`getgid(2)`](http://man7.org/linux/man-pages/man2/getgid.2.html).) - * - * ```js - * import process from 'node:process'; - * - * if (process.getgid) { - * console.log(`Current gid: ${process.getgid()}`); - * } - * ``` - * - * This function is only available on POSIX platforms (i.e. not Windows or - * Android). - * @since v0.1.31 - */ - getgid?: () => number; - /** - * The `process.setgid()` method sets the group identity of the process. (See [`setgid(2)`](http://man7.org/linux/man-pages/man2/setgid.2.html).) The `id` can be passed as either a - * numeric ID or a group name - * string. If a group name is specified, this method blocks while resolving the - * associated numeric ID. - * - * ```js - * import process from 'node:process'; - * - * if (process.getgid && process.setgid) { - * console.log(`Current gid: ${process.getgid()}`); - * try { - * process.setgid(501); - * console.log(`New gid: ${process.getgid()}`); - * } catch (err) { - * console.log(`Failed to set gid: ${err}`); - * } - * } - * ``` - * - * This function is only available on POSIX platforms (i.e. not Windows or - * Android). - * This feature is not available in `Worker` threads. - * @since v0.1.31 - * @param id The group name or ID - */ - setgid?: (id: number | string) => void; - /** - * The `process.getuid()` method returns the numeric user identity of the process. - * (See [`getuid(2)`](http://man7.org/linux/man-pages/man2/getuid.2.html).) - * - * ```js - * import process from 'node:process'; - * - * if (process.getuid) { - * console.log(`Current uid: ${process.getuid()}`); - * } - * ``` - * - * This function is only available on POSIX platforms (i.e. not Windows or - * Android). - * @since v0.1.28 - */ - getuid?: () => number; - /** - * The `process.setuid(id)` method sets the user identity of the process. (See [`setuid(2)`](http://man7.org/linux/man-pages/man2/setuid.2.html).) The `id` can be passed as either a - * numeric ID or a username string. - * If a username is specified, the method blocks while resolving the associated - * numeric ID. - * - * ```js - * import process from 'node:process'; - * - * if (process.getuid && process.setuid) { - * console.log(`Current uid: ${process.getuid()}`); - * try { - * process.setuid(501); - * console.log(`New uid: ${process.getuid()}`); - * } catch (err) { - * console.log(`Failed to set uid: ${err}`); - * } - * } - * ``` - * - * This function is only available on POSIX platforms (i.e. not Windows or - * Android). - * This feature is not available in `Worker` threads. - * @since v0.1.28 - */ - setuid?: (id: number | string) => void; - /** - * The `process.geteuid()` method returns the numerical effective user identity of - * the process. (See [`geteuid(2)`](http://man7.org/linux/man-pages/man2/geteuid.2.html).) - * - * ```js - * import process from 'node:process'; - * - * if (process.geteuid) { - * console.log(`Current uid: ${process.geteuid()}`); - * } - * ``` - * - * This function is only available on POSIX platforms (i.e. not Windows or - * Android). - * @since v2.0.0 - */ - geteuid?: () => number; - /** - * The `process.seteuid()` method sets the effective user identity of the process. - * (See [`seteuid(2)`](http://man7.org/linux/man-pages/man2/seteuid.2.html).) The `id` can be passed as either a numeric ID or a username - * string. If a username is specified, the method blocks while resolving the - * associated numeric ID. - * - * ```js - * import process from 'node:process'; - * - * if (process.geteuid && process.seteuid) { - * console.log(`Current uid: ${process.geteuid()}`); - * try { - * process.seteuid(501); - * console.log(`New uid: ${process.geteuid()}`); - * } catch (err) { - * console.log(`Failed to set uid: ${err}`); - * } - * } - * ``` - * - * This function is only available on POSIX platforms (i.e. not Windows or - * Android). - * This feature is not available in `Worker` threads. - * @since v2.0.0 - * @param id A user name or ID - */ - seteuid?: (id: number | string) => void; - /** - * The `process.getegid()` method returns the numerical effective group identity - * of the Node.js process. (See [`getegid(2)`](http://man7.org/linux/man-pages/man2/getegid.2.html).) - * - * ```js - * import process from 'node:process'; - * - * if (process.getegid) { - * console.log(`Current gid: ${process.getegid()}`); - * } - * ``` - * - * This function is only available on POSIX platforms (i.e. not Windows or - * Android). - * @since v2.0.0 - */ - getegid?: () => number; - /** - * The `process.setegid()` method sets the effective group identity of the process. - * (See [`setegid(2)`](http://man7.org/linux/man-pages/man2/setegid.2.html).) The `id` can be passed as either a numeric ID or a group - * name string. If a group name is specified, this method blocks while resolving - * the associated a numeric ID. - * - * ```js - * import process from 'node:process'; - * - * if (process.getegid && process.setegid) { - * console.log(`Current gid: ${process.getegid()}`); - * try { - * process.setegid(501); - * console.log(`New gid: ${process.getegid()}`); - * } catch (err) { - * console.log(`Failed to set gid: ${err}`); - * } - * } - * ``` - * - * This function is only available on POSIX platforms (i.e. not Windows or - * Android). - * This feature is not available in `Worker` threads. - * @since v2.0.0 - * @param id A group name or ID - */ - setegid?: (id: number | string) => void; - /** - * The `process.getgroups()` method returns an array with the supplementary group - * IDs. POSIX leaves it unspecified if the effective group ID is included but - * Node.js ensures it always is. - * - * ```js - * import process from 'node:process'; - * - * if (process.getgroups) { - * console.log(process.getgroups()); // [ 16, 21, 297 ] - * } - * ``` - * - * This function is only available on POSIX platforms (i.e. not Windows or - * Android). - * @since v0.9.4 - */ - getgroups?: () => number[]; - /** - * The `process.setgroups()` method sets the supplementary group IDs for the - * Node.js process. This is a privileged operation that requires the Node.js - * process to have `root` or the `CAP_SETGID` capability. - * - * The `groups` array can contain numeric group IDs, group names, or both. - * - * ```js - * import process from 'node:process'; - * - * if (process.getgroups && process.setgroups) { - * try { - * process.setgroups([501]); - * console.log(process.getgroups()); // new groups - * } catch (err) { - * console.log(`Failed to set groups: ${err}`); - * } - * } - * ``` - * - * This function is only available on POSIX platforms (i.e. not Windows or - * Android). - * This feature is not available in `Worker` threads. - * @since v0.9.4 - */ - setgroups?: (groups: ReadonlyArray) => void; - /** - * The `process.setUncaughtExceptionCaptureCallback()` function sets a function - * that will be invoked when an uncaught exception occurs, which will receive the - * exception value itself as its first argument. - * - * If such a function is set, the `'uncaughtException'` event will - * not be emitted. If `--abort-on-uncaught-exception` was passed from the - * command line or set through `v8.setFlagsFromString()`, the process will - * not abort. Actions configured to take place on exceptions such as report - * generations will be affected too - * - * To unset the capture function, `process.setUncaughtExceptionCaptureCallback(null)` may be used. Calling this - * method with a non-`null` argument while another capture function is set will - * throw an error. - * - * Using this function is mutually exclusive with using the deprecated `domain` built-in module. - * @since v9.3.0 - */ - setUncaughtExceptionCaptureCallback(cb: ((err: Error) => void) | null): void; - /** - * Indicates whether a callback has been set using {@link setUncaughtExceptionCaptureCallback}. - * @since v9.3.0 - */ - hasUncaughtExceptionCaptureCallback(): boolean; - /** - * The `process.sourceMapsEnabled` property returns whether the [Source Map v3](https://sourcemaps.info/spec.html) support for stack traces is enabled. - * @since v20.7.0 - * @experimental - */ - readonly sourceMapsEnabled: boolean; - /** - * This function enables or disables the [Source Map v3](https://sourcemaps.info/spec.html) support for - * stack traces. - * - * It provides same features as launching Node.js process with commandline options `--enable-source-maps`. - * - * Only source maps in JavaScript files that are loaded after source maps has been - * enabled will be parsed and loaded. - * @since v16.6.0, v14.18.0 - * @experimental - */ - setSourceMapsEnabled(value: boolean): void; - /** - * The `process.version` property contains the Node.js version string. - * - * ```js - * import { version } from 'node:process'; - * - * console.log(`Version: ${version}`); - * // Version: v14.8.0 - * ``` - * - * To get the version string without the prepended _v_, use`process.versions.node`. - * @since v0.1.3 - */ - readonly version: string; - /** - * The `process.versions` property returns an object listing the version strings of - * Node.js and its dependencies. `process.versions.modules` indicates the current - * ABI version, which is increased whenever a C++ API changes. Node.js will refuse - * to load modules that were compiled against a different module ABI version. - * - * ```js - * import { versions } from 'node:process'; - * - * console.log(versions); - * ``` - * - * Will generate an object similar to: - * - * ```console - * { node: '20.2.0', - * acorn: '8.8.2', - * ada: '2.4.0', - * ares: '1.19.0', - * base64: '0.5.0', - * brotli: '1.0.9', - * cjs_module_lexer: '1.2.2', - * cldr: '43.0', - * icu: '73.1', - * llhttp: '8.1.0', - * modules: '115', - * napi: '8', - * nghttp2: '1.52.0', - * nghttp3: '0.7.0', - * ngtcp2: '0.8.1', - * openssl: '3.0.8+quic', - * simdutf: '3.2.9', - * tz: '2023c', - * undici: '5.22.0', - * unicode: '15.0', - * uv: '1.44.2', - * uvwasi: '0.0.16', - * v8: '11.3.244.8-node.9', - * zlib: '1.2.13' } - * ``` - * @since v0.2.0 - */ - readonly versions: ProcessVersions; - /** - * The `process.config` property returns a frozen `Object` containing the - * JavaScript representation of the configure options used to compile the current - * Node.js executable. This is the same as the `config.gypi` file that was produced - * when running the `./configure` script. - * - * An example of the possible output looks like: - * - * ```js - * { - * target_defaults: - * { cflags: [], - * default_configuration: 'Release', - * defines: [], - * include_dirs: [], - * libraries: [] }, - * variables: - * { - * host_arch: 'x64', - * napi_build_version: 5, - * node_install_npm: 'true', - * node_prefix: '', - * node_shared_cares: 'false', - * node_shared_http_parser: 'false', - * node_shared_libuv: 'false', - * node_shared_zlib: 'false', - * node_use_openssl: 'true', - * node_shared_openssl: 'false', - * strict_aliasing: 'true', - * target_arch: 'x64', - * v8_use_snapshot: 1 - * } - * } - * ``` - * @since v0.7.7 - */ - readonly config: ProcessConfig; - /** - * The `process.kill()` method sends the `signal` to the process identified by`pid`. - * - * Signal names are strings such as `'SIGINT'` or `'SIGHUP'`. See `Signal Events` and [`kill(2)`](http://man7.org/linux/man-pages/man2/kill.2.html) for more information. - * - * This method will throw an error if the target `pid` does not exist. As a special - * case, a signal of `0` can be used to test for the existence of a process. - * Windows platforms will throw an error if the `pid` is used to kill a process - * group. - * - * Even though the name of this function is `process.kill()`, it is really just a - * signal sender, like the `kill` system call. The signal sent may do something - * other than kill the target process. - * - * ```js - * import process, { kill } from 'node:process'; - * - * process.on('SIGHUP', () => { - * console.log('Got SIGHUP signal.'); - * }); - * - * setTimeout(() => { - * console.log('Exiting.'); - * process.exit(0); - * }, 100); - * - * kill(process.pid, 'SIGHUP'); - * ``` - * - * When `SIGUSR1` is received by a Node.js process, Node.js will start the - * debugger. See `Signal Events`. - * @since v0.0.6 - * @param pid A process ID - * @param [signal='SIGTERM'] The signal to send, either as a string or number. - */ - kill(pid: number, signal?: string | number): true; - /** - * Loads the environment configuration from a `.env` file into `process.env`. If - * the file is not found, error will be thrown. - * - * To load a specific .env file by specifying its path, use the following code: - * - * ```js - * import { loadEnvFile } from 'node:process'; - * - * loadEnvFile('./development.env') - * ``` - * @since v20.12.0 - * @param path The path to the .env file - */ - loadEnvFile(path?: PathLike): void; - /** - * The `process.pid` property returns the PID of the process. - * - * ```js - * import { pid } from 'node:process'; - * - * console.log(`This process is pid ${pid}`); - * ``` - * @since v0.1.15 - */ - readonly pid: number; - /** - * The `process.ppid` property returns the PID of the parent of the - * current process. - * - * ```js - * import { ppid } from 'node:process'; - * - * console.log(`The parent process is pid ${ppid}`); - * ``` - * @since v9.2.0, v8.10.0, v6.13.0 - */ - readonly ppid: number; - /** - * The `process.threadCpuUsage()` method returns the user and system CPU time usage of - * the current worker thread, in an object with properties `user` and `system`, whose - * values are microsecond values (millionth of a second). - * - * The result of a previous call to `process.threadCpuUsage()` can be passed as the - * argument to the function, to get a diff reading. - * @since v23.9.0 - * @param previousValue A previous return value from calling - * `process.threadCpuUsage()` - */ - threadCpuUsage(previousValue?: CpuUsage): CpuUsage; - /** - * The `process.title` property returns the current process title (i.e. returns - * the current value of `ps`). Assigning a new value to `process.title` modifies - * the current value of `ps`. - * - * When a new value is assigned, different platforms will impose different maximum - * length restrictions on the title. Usually such restrictions are quite limited. - * For instance, on Linux and macOS, `process.title` is limited to the size of the - * binary name plus the length of the command-line arguments because setting the `process.title` overwrites the `argv` memory of the process. Node.js v0.8 - * allowed for longer process title strings by also overwriting the `environ` memory but that was potentially insecure and confusing in some (rather obscure) - * cases. - * - * Assigning a value to `process.title` might not result in an accurate label - * within process manager applications such as macOS Activity Monitor or Windows - * Services Manager. - * @since v0.1.104 - */ - title: string; - /** - * The operating system CPU architecture for which the Node.js binary was compiled. - * Possible values are: `'arm'`, `'arm64'`, `'ia32'`, `'loong64'`, `'mips'`, - * `'mipsel'`, `'ppc64'`, `'riscv64'`, `'s390x'`, and `'x64'`. - * - * ```js - * import { arch } from 'node:process'; - * - * console.log(`This processor architecture is ${arch}`); - * ``` - * @since v0.5.0 - */ - readonly arch: Architecture; - /** - * The `process.platform` property returns a string identifying the operating - * system platform for which the Node.js binary was compiled. - * - * Currently possible values are: - * - * * `'aix'` - * * `'darwin'` - * * `'freebsd'` - * * `'linux'` - * * `'openbsd'` - * * `'sunos'` - * * `'win32'` - * - * ```js - * import { platform } from 'node:process'; - * - * console.log(`This platform is ${platform}`); - * ``` - * - * The value `'android'` may also be returned if the Node.js is built on the - * Android operating system. However, Android support in Node.js [is experimental](https://github.com/nodejs/node/blob/HEAD/BUILDING.md#androidandroid-based-devices-eg-firefox-os). - * @since v0.1.16 - */ - readonly platform: Platform; - /** - * The `process.mainModule` property provides an alternative way of retrieving `require.main`. The difference is that if the main module changes at - * runtime, `require.main` may still refer to the original main module in - * modules that were required before the change occurred. Generally, it's - * safe to assume that the two refer to the same module. - * - * As with `require.main`, `process.mainModule` will be `undefined` if there - * is no entry script. - * @since v0.1.17 - * @deprecated Since v14.0.0 - Use `main` instead. - */ - mainModule?: Module; - memoryUsage: MemoryUsageFn; - /** - * Gets the amount of memory available to the process (in bytes) based on - * limits imposed by the OS. If there is no such constraint, or the constraint - * is unknown, `0` is returned. - * - * See [`uv_get_constrained_memory`](https://docs.libuv.org/en/v1.x/misc.html#c.uv_get_constrained_memory) for more - * information. - * @since v19.6.0, v18.15.0 - */ - constrainedMemory(): number; - /** - * Gets the amount of free memory that is still available to the process (in bytes). - * See [`uv_get_available_memory`](https://nodejs.org/docs/latest-v25.x/api/process.html#processavailablememory) for more information. - * @since v20.13.0 - */ - availableMemory(): number; - /** - * The `process.cpuUsage()` method returns the user and system CPU time usage of - * the current process, in an object with properties `user` and `system`, whose - * values are microsecond values (millionth of a second). These values measure time - * spent in user and system code respectively, and may end up being greater than - * actual elapsed time if multiple CPU cores are performing work for this process. - * - * The result of a previous call to `process.cpuUsage()` can be passed as the - * argument to the function, to get a diff reading. - * - * ```js - * import { cpuUsage } from 'node:process'; - * - * const startUsage = cpuUsage(); - * // { user: 38579, system: 6986 } - * - * // spin the CPU for 500 milliseconds - * const now = Date.now(); - * while (Date.now() - now < 500); - * - * console.log(cpuUsage(startUsage)); - * // { user: 514883, system: 11226 } - * ``` - * @since v6.1.0 - * @param previousValue A previous return value from calling `process.cpuUsage()` - */ - cpuUsage(previousValue?: CpuUsage): CpuUsage; - /** - * `process.nextTick()` adds `callback` to the "next tick queue". This queue is - * fully drained after the current operation on the JavaScript stack runs to - * completion and before the event loop is allowed to continue. It's possible to - * create an infinite loop if one were to recursively call `process.nextTick()`. - * See the [Event Loop](https://nodejs.org/en/docs/guides/event-loop-timers-and-nexttick/#process-nexttick) guide for more background. - * - * ```js - * import { nextTick } from 'node:process'; - * - * console.log('start'); - * nextTick(() => { - * console.log('nextTick callback'); - * }); - * console.log('scheduled'); - * // Output: - * // start - * // scheduled - * // nextTick callback - * ``` - * - * This is important when developing APIs in order to give users the opportunity - * to assign event handlers _after_ an object has been constructed but before any - * I/O has occurred: - * - * ```js - * import { nextTick } from 'node:process'; - * - * function MyThing(options) { - * this.setupOptions(options); - * - * nextTick(() => { - * this.startDoingStuff(); - * }); - * } - * - * const thing = new MyThing(); - * thing.getReadyForStuff(); - * - * // thing.startDoingStuff() gets called now, not before. - * ``` - * - * It is very important for APIs to be either 100% synchronous or 100% - * asynchronous. Consider this example: - * - * ```js - * // WARNING! DO NOT USE! BAD UNSAFE HAZARD! - * function maybeSync(arg, cb) { - * if (arg) { - * cb(); - * return; - * } - * - * fs.stat('file', cb); - * } - * ``` - * - * This API is hazardous because in the following case: - * - * ```js - * const maybeTrue = Math.random() > 0.5; - * - * maybeSync(maybeTrue, () => { - * foo(); - * }); - * - * bar(); - * ``` - * - * It is not clear whether `foo()` or `bar()` will be called first. - * - * The following approach is much better: - * - * ```js - * import { nextTick } from 'node:process'; - * - * function definitelyAsync(arg, cb) { - * if (arg) { - * nextTick(cb); - * return; - * } - * - * fs.stat('file', cb); - * } - * ``` - * @since v0.1.26 - * @param args Additional arguments to pass when invoking the `callback` - */ - nextTick(callback: Function, ...args: any[]): void; - /** - * The process.noDeprecation property indicates whether the --no-deprecation flag is set on the current Node.js process. - * See the documentation for the ['warning' event](https://nodejs.org/docs/latest/api/process.html#event-warning) and the [emitWarning()](https://nodejs.org/docs/latest/api/process.html#processemitwarningwarning-type-code-ctor) method for more information about this flag's behavior. - */ - noDeprecation?: boolean; - /** - * This API is available through the [--permission](https://nodejs.org/api/cli.html#--permission) flag. - * - * `process.permission` is an object whose methods are used to manage permissions for the current process. - * Additional documentation is available in the [Permission Model](https://nodejs.org/api/permissions.html#permission-model). - * @since v20.0.0 - */ - permission: ProcessPermission; - /** - * The `process.release` property returns an `Object` containing metadata related - * to the current release, including URLs for the source tarball and headers-only - * tarball. - * - * `process.release` contains the following properties: - * - * ```js - * { - * name: 'node', - * lts: 'Hydrogen', - * sourceUrl: 'https://nodejs.org/download/release/v18.12.0/node-v18.12.0.tar.gz', - * headersUrl: 'https://nodejs.org/download/release/v18.12.0/node-v18.12.0-headers.tar.gz', - * libUrl: 'https://nodejs.org/download/release/v18.12.0/win-x64/node.lib' - * } - * ``` - * - * In custom builds from non-release versions of the source tree, only the `name` property may be present. The additional properties should not be - * relied upon to exist. - * @since v3.0.0 - */ - readonly release: ProcessRelease; - readonly features: ProcessFeatures; - /** - * `process.umask()` returns the Node.js process's file mode creation mask. Child - * processes inherit the mask from the parent process. - * @since v0.1.19 - * @deprecated Calling `process.umask()` with no argument causes the process-wide umask to be written twice. This introduces a race condition between threads, and is a potential - * security vulnerability. There is no safe, cross-platform alternative API. - */ - umask(): number; - /** - * Can only be set if not in worker thread. - */ - umask(mask: string | number): number; - /** - * The `process.uptime()` method returns the number of seconds the current Node.js - * process has been running. - * - * The return value includes fractions of a second. Use `Math.floor()` to get whole - * seconds. - * @since v0.5.0 - */ - uptime(): number; - hrtime: HRTime; - /** - * If the Node.js process was spawned with an IPC channel, the process.channel property is a reference to the IPC channel. - * If no IPC channel exists, this property is undefined. - * @since v7.1.0 - */ - channel?: Control; - /** - * If Node.js is spawned with an IPC channel, the `process.send()` method can be - * used to send messages to the parent process. Messages will be received as a `'message'` event on the parent's `ChildProcess` object. - * - * If Node.js was not spawned with an IPC channel, `process.send` will be `undefined`. - * - * The message goes through serialization and parsing. The resulting message might - * not be the same as what is originally sent. - * @since v0.5.9 - * @param options used to parameterize the sending of certain types of handles. `options` supports the following properties: - */ - send?( - message: any, - sendHandle?: SendHandle, - options?: MessageOptions, - callback?: (error: Error | null) => void, - ): boolean; - /** - * If the Node.js process is spawned with an IPC channel (see the `Child Process` and `Cluster` documentation), the `process.disconnect()` method will close the - * IPC channel to the parent process, allowing the child process to exit gracefully - * once there are no other connections keeping it alive. - * - * The effect of calling `process.disconnect()` is the same as calling `ChildProcess.disconnect()` from the parent process. - * - * If the Node.js process was not spawned with an IPC channel, `process.disconnect()` will be `undefined`. - * @since v0.7.2 - */ - disconnect?(): void; - /** - * If the Node.js process is spawned with an IPC channel (see the `Child Process` and `Cluster` documentation), the `process.connected` property will return `true` so long as the IPC - * channel is connected and will return `false` after `process.disconnect()` is called. - * - * Once `process.connected` is `false`, it is no longer possible to send messages - * over the IPC channel using `process.send()`. - * @since v0.7.2 - */ - connected: boolean; - /** - * The `process.allowedNodeEnvironmentFlags` property is a special, - * read-only `Set` of flags allowable within the `NODE_OPTIONS` environment variable. - * - * `process.allowedNodeEnvironmentFlags` extends `Set`, but overrides `Set.prototype.has` to recognize several different possible flag - * representations. `process.allowedNodeEnvironmentFlags.has()` will - * return `true` in the following cases: - * - * * Flags may omit leading single (`-`) or double (`--`) dashes; e.g., `inspect-brk` for `--inspect-brk`, or `r` for `-r`. - * * Flags passed through to V8 (as listed in `--v8-options`) may replace - * one or more _non-leading_ dashes for an underscore, or vice-versa; - * e.g., `--perf_basic_prof`, `--perf-basic-prof`, `--perf_basic-prof`, - * etc. - * * Flags may contain one or more equals (`=`) characters; all - * characters after and including the first equals will be ignored; - * e.g., `--stack-trace-limit=100`. - * * Flags _must_ be allowable within `NODE_OPTIONS`. - * - * When iterating over `process.allowedNodeEnvironmentFlags`, flags will - * appear only _once_; each will begin with one or more dashes. Flags - * passed through to V8 will contain underscores instead of non-leading - * dashes: - * - * ```js - * import { allowedNodeEnvironmentFlags } from 'node:process'; - * - * allowedNodeEnvironmentFlags.forEach((flag) => { - * // -r - * // --inspect-brk - * // --abort_on_uncaught_exception - * // ... - * }); - * ``` - * - * The methods `add()`, `clear()`, and `delete()` of`process.allowedNodeEnvironmentFlags` do nothing, and will fail - * silently. - * - * If Node.js was compiled _without_ `NODE_OPTIONS` support (shown in {@link config}), `process.allowedNodeEnvironmentFlags` will - * contain what _would have_ been allowable. - * @since v10.10.0 - */ - allowedNodeEnvironmentFlags: ReadonlySet; - /** - * `process.report` is an object whose methods are used to generate diagnostic reports for the current process. - * Additional documentation is available in the [report documentation](https://nodejs.org/docs/latest-v25.x/api/report.html). - * @since v11.8.0 - */ - report: ProcessReport; - /** - * ```js - * import { resourceUsage } from 'node:process'; - * - * console.log(resourceUsage()); - * /* - * Will output: - * { - * userCPUTime: 82872, - * systemCPUTime: 4143, - * maxRSS: 33164, - * sharedMemorySize: 0, - * unsharedDataSize: 0, - * unsharedStackSize: 0, - * minorPageFault: 2469, - * majorPageFault: 0, - * swappedOut: 0, - * fsRead: 0, - * fsWrite: 8, - * ipcSent: 0, - * ipcReceived: 0, - * signalsCount: 0, - * voluntaryContextSwitches: 79, - * involuntaryContextSwitches: 1 - * } - * - * ``` - * @since v12.6.0 - * @return the resource usage for the current process. All of these values come from the `uv_getrusage` call which returns a [`uv_rusage_t` struct][uv_rusage_t]. - */ - resourceUsage(): ResourceUsage; - /** - * The initial value of `process.throwDeprecation` indicates whether the `--throw-deprecation` flag is set on the current Node.js process. `process.throwDeprecation` - * is mutable, so whether or not deprecation warnings result in errors may be altered at runtime. See the documentation for the 'warning' event and the emitWarning() - * method for more information. - * - * ```bash - * $ node --throw-deprecation -p "process.throwDeprecation" - * true - * $ node -p "process.throwDeprecation" - * undefined - * $ node - * > process.emitWarning('test', 'DeprecationWarning'); - * undefined - * > (node:26598) DeprecationWarning: test - * > process.throwDeprecation = true; - * true - * > process.emitWarning('test', 'DeprecationWarning'); - * Thrown: - * [DeprecationWarning: test] { name: 'DeprecationWarning' } - * ``` - * @since v0.9.12 - */ - throwDeprecation: boolean; - /** - * The `process.traceDeprecation` property indicates whether the `--trace-deprecation` flag is set on the current Node.js process. See the - * documentation for the `'warning' event` and the `emitWarning() method` for more information about this - * flag's behavior. - * @since v0.8.0 - */ - traceDeprecation: boolean; - /** - * An object is "refable" if it implements the Node.js "Refable protocol". - * Specifically, this means that the object implements the `Symbol.for('nodejs.ref')` - * and `Symbol.for('nodejs.unref')` methods. "Ref'd" objects will keep the Node.js - * event loop alive, while "unref'd" objects will not. Historically, this was - * implemented by using `ref()` and `unref()` methods directly on the objects. - * This pattern, however, is being deprecated in favor of the "Refable protocol" - * in order to better support Web Platform API types whose APIs cannot be modified - * to add `ref()` and `unref()` methods but still need to support that behavior. - * @since v22.14.0 - * @experimental - * @param maybeRefable An object that may be "refable". - */ - ref(maybeRefable: any): void; - /** - * An object is "unrefable" if it implements the Node.js "Refable protocol". - * Specifically, this means that the object implements the `Symbol.for('nodejs.ref')` - * and `Symbol.for('nodejs.unref')` methods. "Ref'd" objects will keep the Node.js - * event loop alive, while "unref'd" objects will not. Historically, this was - * implemented by using `ref()` and `unref()` methods directly on the objects. - * This pattern, however, is being deprecated in favor of the "Refable protocol" - * in order to better support Web Platform API types whose APIs cannot be modified - * to add `ref()` and `unref()` methods but still need to support that behavior. - * @since v22.14.0 - * @experimental - * @param maybeRefable An object that may be "unref'd". - */ - unref(maybeRefable: any): void; - /** - * Replaces the current process with a new process. - * - * This is achieved by using the `execve` POSIX function and therefore no memory or other - * resources from the current process are preserved, except for the standard input, - * standard output and standard error file descriptor. - * - * All other resources are discarded by the system when the processes are swapped, without triggering - * any exit or close events and without running any cleanup handler. - * - * This function will never return, unless an error occurred. - * - * This function is not available on Windows or IBM i. - * @since v22.15.0 - * @experimental - * @param file The name or path of the executable file to run. - * @param args List of string arguments. No argument can contain a null-byte (`\u0000`). - * @param env Environment key-value pairs. - * No key or value can contain a null-byte (`\u0000`). - * **Default:** `process.env`. - */ - execve?(file: string, args?: readonly string[], env?: ProcessEnv): never; - } - } - } - export = process; -} -declare module "process" { - import process = require("node:process"); - export = process; -} diff --git a/PBandGraphScaffold/node_modules/@types/node/punycode.d.ts b/PBandGraphScaffold/node_modules/@types/node/punycode.d.ts deleted file mode 100644 index d293553..0000000 --- a/PBandGraphScaffold/node_modules/@types/node/punycode.d.ts +++ /dev/null @@ -1,117 +0,0 @@ -/** - * **The version of the punycode module bundled in Node.js is being deprecated. **In a future major version of Node.js this module will be removed. Users - * currently depending on the `punycode` module should switch to using the - * userland-provided [Punycode.js](https://github.com/bestiejs/punycode.js) module instead. For punycode-based URL - * encoding, see `url.domainToASCII` or, more generally, the `WHATWG URL API`. - * - * The `punycode` module is a bundled version of the [Punycode.js](https://github.com/bestiejs/punycode.js) module. It - * can be accessed using: - * - * ```js - * import punycode from 'node:punycode'; - * ``` - * - * [Punycode](https://tools.ietf.org/html/rfc3492) is a character encoding scheme defined by RFC 3492 that is - * primarily intended for use in Internationalized Domain Names. Because host - * names in URLs are limited to ASCII characters only, Domain Names that contain - * non-ASCII characters must be converted into ASCII using the Punycode scheme. - * For instance, the Japanese character that translates into the English word, `'example'` is `'例'`. The Internationalized Domain Name, `'例.com'` (equivalent - * to `'example.com'`) is represented by Punycode as the ASCII string `'xn--fsq.com'`. - * - * The `punycode` module provides a simple implementation of the Punycode standard. - * - * The `punycode` module is a third-party dependency used by Node.js and - * made available to developers as a convenience. Fixes or other modifications to - * the module must be directed to the [Punycode.js](https://github.com/bestiejs/punycode.js) project. - * @deprecated - * @see [source](https://github.com/nodejs/node/blob/v25.x/lib/punycode.js) - */ -declare module "node:punycode" { - /** - * The `punycode.decode()` method converts a [Punycode](https://tools.ietf.org/html/rfc3492) string of ASCII-only - * characters to the equivalent string of Unicode codepoints. - * - * ```js - * punycode.decode('maana-pta'); // 'mañana' - * punycode.decode('--dqo34k'); // '☃-⌘' - * ``` - * @since v0.5.1 - */ - function decode(string: string): string; - /** - * The `punycode.encode()` method converts a string of Unicode codepoints to a [Punycode](https://tools.ietf.org/html/rfc3492) string of ASCII-only characters. - * - * ```js - * punycode.encode('mañana'); // 'maana-pta' - * punycode.encode('☃-⌘'); // '--dqo34k' - * ``` - * @since v0.5.1 - */ - function encode(string: string): string; - /** - * The `punycode.toUnicode()` method converts a string representing a domain name - * containing [Punycode](https://tools.ietf.org/html/rfc3492) encoded characters into Unicode. Only the [Punycode](https://tools.ietf.org/html/rfc3492) encoded parts of the domain name are be - * converted. - * - * ```js - * // decode domain names - * punycode.toUnicode('xn--maana-pta.com'); // 'mañana.com' - * punycode.toUnicode('xn----dqo34k.com'); // '☃-⌘.com' - * punycode.toUnicode('example.com'); // 'example.com' - * ``` - * @since v0.6.1 - */ - function toUnicode(domain: string): string; - /** - * The `punycode.toASCII()` method converts a Unicode string representing an - * Internationalized Domain Name to [Punycode](https://tools.ietf.org/html/rfc3492). Only the non-ASCII parts of the - * domain name will be converted. Calling `punycode.toASCII()` on a string that - * already only contains ASCII characters will have no effect. - * - * ```js - * // encode domain names - * punycode.toASCII('mañana.com'); // 'xn--maana-pta.com' - * punycode.toASCII('☃-⌘.com'); // 'xn----dqo34k.com' - * punycode.toASCII('example.com'); // 'example.com' - * ``` - * @since v0.6.1 - */ - function toASCII(domain: string): string; - /** - * @deprecated since v7.0.0 - * The version of the punycode module bundled in Node.js is being deprecated. - * In a future major version of Node.js this module will be removed. - * Users currently depending on the punycode module should switch to using - * the userland-provided Punycode.js module instead. - */ - const ucs2: ucs2; - interface ucs2 { - /** - * @deprecated since v7.0.0 - * The version of the punycode module bundled in Node.js is being deprecated. - * In a future major version of Node.js this module will be removed. - * Users currently depending on the punycode module should switch to using - * the userland-provided Punycode.js module instead. - */ - decode(string: string): number[]; - /** - * @deprecated since v7.0.0 - * The version of the punycode module bundled in Node.js is being deprecated. - * In a future major version of Node.js this module will be removed. - * Users currently depending on the punycode module should switch to using - * the userland-provided Punycode.js module instead. - */ - encode(codePoints: readonly number[]): string; - } - /** - * @deprecated since v7.0.0 - * The version of the punycode module bundled in Node.js is being deprecated. - * In a future major version of Node.js this module will be removed. - * Users currently depending on the punycode module should switch to using - * the userland-provided Punycode.js module instead. - */ - const version: string; -} -declare module "punycode" { - export * from "node:punycode"; -} diff --git a/PBandGraphScaffold/node_modules/@types/node/querystring.d.ts b/PBandGraphScaffold/node_modules/@types/node/querystring.d.ts deleted file mode 100644 index dc421bc..0000000 --- a/PBandGraphScaffold/node_modules/@types/node/querystring.d.ts +++ /dev/null @@ -1,152 +0,0 @@ -/** - * The `node:querystring` module provides utilities for parsing and formatting URL - * query strings. It can be accessed using: - * - * ```js - * import querystring from 'node:querystring'; - * ``` - * - * `querystring` is more performant than `URLSearchParams` but is not a - * standardized API. Use `URLSearchParams` when performance is not critical or - * when compatibility with browser code is desirable. - * @see [source](https://github.com/nodejs/node/blob/v25.x/lib/querystring.js) - */ -declare module "node:querystring" { - interface StringifyOptions { - /** - * The function to use when converting URL-unsafe characters to percent-encoding in the query string. - * @default `querystring.escape()` - */ - encodeURIComponent?: ((str: string) => string) | undefined; - } - interface ParseOptions { - /** - * Specifies the maximum number of keys to parse. Specify `0` to remove key counting limitations. - * @default 1000 - */ - maxKeys?: number | undefined; - /** - * The function to use when decoding percent-encoded characters in the query string. - * @default `querystring.unescape()` - */ - decodeURIComponent?: ((str: string) => string) | undefined; - } - interface ParsedUrlQuery extends NodeJS.Dict {} - interface ParsedUrlQueryInput extends - NodeJS.Dict< - | string - | number - | boolean - | bigint - | ReadonlyArray - | null - > - {} - /** - * The `querystring.stringify()` method produces a URL query string from a - * given `obj` by iterating through the object's "own properties". - * - * It serializes the following types of values passed in `obj`: [string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type) | - * [number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type) | - * [bigint](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt) | - * [boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type) | - * [string\[\]](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type) | - * [number\[\]](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type) | - * [bigint\[\]](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt) | - * [boolean\[\]](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type) The numeric values must be finite. Any other input values will be coerced to - * empty strings. - * - * ```js - * querystring.stringify({ foo: 'bar', baz: ['qux', 'quux'], corge: '' }); - * // Returns 'foo=bar&baz=qux&baz=quux&corge=' - * - * querystring.stringify({ foo: 'bar', baz: 'qux' }, ';', ':'); - * // Returns 'foo:bar;baz:qux' - * ``` - * - * By default, characters requiring percent-encoding within the query string will - * be encoded as UTF-8\. If an alternative encoding is required, then an alternative `encodeURIComponent` option will need to be specified: - * - * ```js - * // Assuming gbkEncodeURIComponent function already exists, - * - * querystring.stringify({ w: '中文', foo: 'bar' }, null, null, - * { encodeURIComponent: gbkEncodeURIComponent }); - * ``` - * @since v0.1.25 - * @param obj The object to serialize into a URL query string - * @param [sep='&'] The substring used to delimit key and value pairs in the query string. - * @param [eq='='] . The substring used to delimit keys and values in the query string. - */ - function stringify(obj?: ParsedUrlQueryInput, sep?: string, eq?: string, options?: StringifyOptions): string; - /** - * The `querystring.parse()` method parses a URL query string (`str`) into a - * collection of key and value pairs. - * - * For example, the query string `'foo=bar&abc=xyz&abc=123'` is parsed into: - * - * ```json - * { - * "foo": "bar", - * "abc": ["xyz", "123"] - * } - * ``` - * - * The object returned by the `querystring.parse()` method _does not_ prototypically inherit from the JavaScript `Object`. This means that typical `Object` methods such as `obj.toString()`, - * `obj.hasOwnProperty()`, and others - * are not defined and _will not work_. - * - * By default, percent-encoded characters within the query string will be assumed - * to use UTF-8 encoding. If an alternative character encoding is used, then an - * alternative `decodeURIComponent` option will need to be specified: - * - * ```js - * // Assuming gbkDecodeURIComponent function already exists... - * - * querystring.parse('w=%D6%D0%CE%C4&foo=bar', null, null, - * { decodeURIComponent: gbkDecodeURIComponent }); - * ``` - * @since v0.1.25 - * @param str The URL query string to parse - * @param [sep='&'] The substring used to delimit key and value pairs in the query string. - * @param [eq='='] The substring used to delimit keys and values in the query string. - */ - function parse(str: string, sep?: string, eq?: string, options?: ParseOptions): ParsedUrlQuery; - /** - * The querystring.encode() function is an alias for querystring.stringify(). - */ - const encode: typeof stringify; - /** - * The querystring.decode() function is an alias for querystring.parse(). - */ - const decode: typeof parse; - /** - * The `querystring.escape()` method performs URL percent-encoding on the given `str` in a manner that is optimized for the specific requirements of URL - * query strings. - * - * The `querystring.escape()` method is used by `querystring.stringify()` and is - * generally not expected to be used directly. It is exported primarily to allow - * application code to provide a replacement percent-encoding implementation if - * necessary by assigning `querystring.escape` to an alternative function. - * @since v0.1.25 - */ - function escape(str: string): string; - /** - * The `querystring.unescape()` method performs decoding of URL percent-encoded - * characters on the given `str`. - * - * The `querystring.unescape()` method is used by `querystring.parse()` and is - * generally not expected to be used directly. It is exported primarily to allow - * application code to provide a replacement decoding implementation if - * necessary by assigning `querystring.unescape` to an alternative function. - * - * By default, the `querystring.unescape()` method will attempt to use the - * JavaScript built-in `decodeURIComponent()` method to decode. If that fails, - * a safer equivalent that does not throw on malformed URLs will be used. - * @since v0.1.25 - */ - function unescape(str: string): string; -} -declare module "querystring" { - export * from "node:querystring"; -} diff --git a/PBandGraphScaffold/node_modules/@types/node/quic.d.ts b/PBandGraphScaffold/node_modules/@types/node/quic.d.ts deleted file mode 100644 index 9a6fd97..0000000 --- a/PBandGraphScaffold/node_modules/@types/node/quic.d.ts +++ /dev/null @@ -1,910 +0,0 @@ -/** - * The 'node:quic' module provides an implementation of the QUIC protocol. - * To access it, start Node.js with the `--experimental-quic` option and: - * - * ```js - * import quic from 'node:quic'; - * ``` - * - * The module is only available under the `node:` scheme. - * @since v23.8.0 - * @experimental - * @see [source](https://github.com/nodejs/node/blob/v25.x/lib/quic.js) - */ -declare module "node:quic" { - import { KeyObject, webcrypto } from "node:crypto"; - import { SocketAddress } from "node:net"; - import { ReadableStream } from "node:stream/web"; - /** - * @since v23.8.0 - */ - type OnSessionCallback = (this: QuicEndpoint, session: QuicSession) => void; - /** - * @since v23.8.0 - */ - type OnStreamCallback = (this: QuicSession, stream: QuicStream) => void; - /** - * @since v23.8.0 - */ - type OnDatagramCallback = (this: QuicSession, datagram: Uint8Array, early: boolean) => void; - /** - * @since v23.8.0 - */ - type OnDatagramStatusCallback = (this: QuicSession, id: bigint, status: "lost" | "acknowledged") => void; - /** - * @since v23.8.0 - */ - type OnPathValidationCallback = ( - this: QuicSession, - result: "success" | "failure" | "aborted", - newLocalAddress: SocketAddress, - newRemoteAddress: SocketAddress, - oldLocalAddress: SocketAddress, - oldRemoteAddress: SocketAddress, - preferredAddress: boolean, - ) => void; - /** - * @since v23.8.0 - */ - type OnSessionTicketCallback = (this: QuicSession, ticket: object) => void; - /** - * @since v23.8.0 - */ - type OnVersionNegotiationCallback = ( - this: QuicSession, - version: number, - requestedVersions: number[], - supportedVersions: number[], - ) => void; - /** - * @since v23.8.0 - */ - type OnHandshakeCallback = ( - this: QuicSession, - sni: string, - alpn: string, - cipher: string, - cipherVersion: string, - validationErrorReason: string, - validationErrorCode: number, - earlyDataAccepted: boolean, - ) => void; - /** - * @since v23.8.0 - */ - type OnBlockedCallback = (this: QuicStream) => void; - /** - * @since v23.8.0 - */ - type OnStreamErrorCallback = (this: QuicStream, error: any) => void; - /** - * @since v23.8.0 - */ - interface TransportParams { - /** - * The preferred IPv4 address to advertise. - * @since v23.8.0 - */ - preferredAddressIpv4?: SocketAddress | undefined; - /** - * The preferred IPv6 address to advertise. - * @since v23.8.0 - */ - preferredAddressIpv6?: SocketAddress | undefined; - /** - * @since v23.8.0 - */ - initialMaxStreamDataBidiLocal?: bigint | number | undefined; - /** - * @since v23.8.0 - */ - initialMaxStreamDataBidiRemote?: bigint | number | undefined; - /** - * @since v23.8.0 - */ - initialMaxStreamDataUni?: bigint | number | undefined; - /** - * @since v23.8.0 - */ - initialMaxData?: bigint | number | undefined; - /** - * @since v23.8.0 - */ - initialMaxStreamsBidi?: bigint | number | undefined; - /** - * @since v23.8.0 - */ - initialMaxStreamsUni?: bigint | number | undefined; - /** - * @since v23.8.0 - */ - maxIdleTimeout?: bigint | number | undefined; - /** - * @since v23.8.0 - */ - activeConnectionIDLimit?: bigint | number | undefined; - /** - * @since v23.8.0 - */ - ackDelayExponent?: bigint | number | undefined; - /** - * @since v23.8.0 - */ - maxAckDelay?: bigint | number | undefined; - /** - * @since v23.8.0 - */ - maxDatagramFrameSize?: bigint | number | undefined; - } - /** - * @since v23.8.0 - */ - interface SessionOptions { - /** - * An endpoint to use. - * @since v23.8.0 - */ - endpoint?: EndpointOptions | QuicEndpoint | undefined; - /** - * The ALPN protocol identifier. - * @since v23.8.0 - */ - alpn?: string | undefined; - /** - * The CA certificates to use for sessions. - * @since v23.8.0 - */ - ca?: ArrayBuffer | NodeJS.ArrayBufferView | ReadonlyArray | undefined; - /** - * Specifies the congestion control algorithm that will be used. - * Must be set to one of either `'reno'`, `'cubic'`, or `'bbr'`. - * - * This is an advanced option that users typically won't have need to specify. - * @since v23.8.0 - */ - cc?: `${constants.cc}` | undefined; - /** - * The TLS certificates to use for sessions. - * @since v23.8.0 - */ - certs?: ArrayBuffer | NodeJS.ArrayBufferView | ReadonlyArray | undefined; - /** - * The list of supported TLS 1.3 cipher algorithms. - * @since v23.8.0 - */ - ciphers?: string | undefined; - /** - * The CRL to use for sessions. - * @since v23.8.0 - */ - crl?: ArrayBuffer | NodeJS.ArrayBufferView | ReadonlyArray | undefined; - /** - * The list of support TLS 1.3 cipher groups. - * @since v23.8.0 - */ - groups?: string | undefined; - /** - * True to enable TLS keylogging output. - * @since v23.8.0 - */ - keylog?: boolean | undefined; - /** - * The TLS crypto keys to use for sessions. - * @since v23.8.0 - */ - keys?: KeyObject | webcrypto.CryptoKey | ReadonlyArray | undefined; - /** - * Specifies the maximum UDP packet payload size. - * @since v23.8.0 - */ - maxPayloadSize?: bigint | number | undefined; - /** - * Specifies the maximum stream flow-control window size. - * @since v23.8.0 - */ - maxStreamWindow?: bigint | number | undefined; - /** - * Specifies the maximum session flow-control window size. - * @since v23.8.0 - */ - maxWindow?: bigint | number | undefined; - /** - * The minimum QUIC version number to allow. This is an advanced option that users - * typically won't have need to specify. - * @since v23.8.0 - */ - minVersion?: number | undefined; - /** - * When the remote peer advertises a preferred address, this option specifies whether - * to use it or ignore it. - * @since v23.8.0 - */ - preferredAddressPolicy?: "use" | "ignore" | "default" | undefined; - /** - * True if qlog output should be enabled. - * @since v23.8.0 - */ - qlog?: boolean | undefined; - /** - * A session ticket to use for 0RTT session resumption. - * @since v23.8.0 - */ - sessionTicket?: NodeJS.ArrayBufferView | undefined; - /** - * Specifies the maximum number of milliseconds a TLS handshake is permitted to take - * to complete before timing out. - * @since v23.8.0 - */ - handshakeTimeout?: bigint | number | undefined; - /** - * The peer server name to target. - * @since v23.8.0 - */ - sni?: string | undefined; - /** - * True to enable TLS tracing output. - * @since v23.8.0 - */ - tlsTrace?: boolean | undefined; - /** - * The QUIC transport parameters to use for the session. - * @since v23.8.0 - */ - transportParams?: TransportParams | undefined; - /** - * Specifies the maximum number of unacknowledged packets a session should allow. - * @since v23.8.0 - */ - unacknowledgedPacketThreshold?: bigint | number | undefined; - /** - * True to require verification of TLS client certificate. - * @since v23.8.0 - */ - verifyClient?: boolean | undefined; - /** - * True to require private key verification. - * @since v23.8.0 - */ - verifyPrivateKey?: boolean | undefined; - /** - * The QUIC version number to use. This is an advanced option that users typically - * won't have need to specify. - * @since v23.8.0 - */ - version?: number | undefined; - } - /** - * Initiate a new client-side session. - * - * ```js - * import { connect } from 'node:quic'; - * import { Buffer } from 'node:buffer'; - * - * const enc = new TextEncoder(); - * const alpn = 'foo'; - * const client = await connect('123.123.123.123:8888', { alpn }); - * await client.createUnidirectionalStream({ - * body: enc.encode('hello world'), - * }); - * ``` - * - * By default, every call to `connect(...)` will create a new local - * `QuicEndpoint` instance bound to a new random local IP port. To - * specify the exact local address to use, or to multiplex multiple - * QUIC sessions over a single local port, pass the `endpoint` option - * with either a `QuicEndpoint` or `EndpointOptions` as the argument. - * - * ```js - * import { QuicEndpoint, connect } from 'node:quic'; - * - * const endpoint = new QuicEndpoint({ - * address: '127.0.0.1:1234', - * }); - * - * const client = await connect('123.123.123.123:8888', { endpoint }); - * ``` - * @since v23.8.0 - */ - function connect(address: string | SocketAddress, options?: SessionOptions): Promise; - /** - * Configures the endpoint to listen as a server. When a new session is initiated by - * a remote peer, the given `onsession` callback will be invoked with the created - * session. - * - * ```js - * import { listen } from 'node:quic'; - * - * const endpoint = await listen((session) => { - * // ... handle the session - * }); - * - * // Closing the endpoint allows any sessions open when close is called - * // to complete naturally while preventing new sessions from being - * // initiated. Once all existing sessions have finished, the endpoint - * // will be destroyed. The call returns a promise that is resolved once - * // the endpoint is destroyed. - * await endpoint.close(); - * ``` - * - * By default, every call to `listen(...)` will create a new local - * `QuicEndpoint` instance bound to a new random local IP port. To - * specify the exact local address to use, or to multiplex multiple - * QUIC sessions over a single local port, pass the `endpoint` option - * with either a `QuicEndpoint` or `EndpointOptions` as the argument. - * - * At most, any single `QuicEndpoint` can only be configured to listen as - * a server once. - * @since v23.8.0 - */ - function listen(onsession: OnSessionCallback, options?: SessionOptions): Promise; - /** - * The endpoint configuration options passed when constructing a new `QuicEndpoint` instance. - * @since v23.8.0 - */ - interface EndpointOptions { - /** - * If not specified the endpoint will bind to IPv4 `localhost` on a random port. - * @since v23.8.0 - */ - address?: SocketAddress | string | undefined; - /** - * The endpoint maintains an internal cache of validated socket addresses as a - * performance optimization. This option sets the maximum number of addresses - * that are cache. This is an advanced option that users typically won't have - * need to specify. - * @since v23.8.0 - */ - addressLRUSize?: bigint | number | undefined; - /** - * When `true`, indicates that the endpoint should bind only to IPv6 addresses. - * @since v23.8.0 - */ - ipv6Only?: boolean | undefined; - /** - * Specifies the maximum number of concurrent sessions allowed per remote peer address. - * @since v23.8.0 - */ - maxConnectionsPerHost?: bigint | number | undefined; - /** - * Specifies the maximum total number of concurrent sessions. - * @since v23.8.0 - */ - maxConnectionsTotal?: bigint | number | undefined; - /** - * Specifies the maximum number of QUIC retry attempts allowed per remote peer address. - * @since v23.8.0 - */ - maxRetries?: bigint | number | undefined; - /** - * Specifies the maximum number of stateless resets that are allowed per remote peer address. - * @since v23.8.0 - */ - maxStatelessResetsPerHost?: bigint | number | undefined; - /** - * Specifies the length of time a QUIC retry token is considered valid. - * @since v23.8.0 - */ - retryTokenExpiration?: bigint | number | undefined; - /** - * Specifies the 16-byte secret used to generate QUIC retry tokens. - * @since v23.8.0 - */ - resetTokenSecret?: NodeJS.ArrayBufferView | undefined; - /** - * Specifies the length of time a QUIC token is considered valid. - * @since v23.8.0 - */ - tokenExpiration?: bigint | number | undefined; - /** - * Specifies the 16-byte secret used to generate QUIC tokens. - * @since v23.8.0 - */ - tokenSecret?: NodeJS.ArrayBufferView | undefined; - /** - * @since v23.8.0 - */ - udpReceiveBufferSize?: number | undefined; - /** - * @since v23.8.0 - */ - udpSendBufferSize?: number | undefined; - /** - * @since v23.8.0 - */ - udpTTL?: number | undefined; - /** - * When `true`, requires that the endpoint validate peer addresses using retry packets - * while establishing a new connection. - * @since v23.8.0 - */ - validateAddress?: boolean | undefined; - } - /** - * A `QuicEndpoint` encapsulates the local UDP-port binding for QUIC. It can be - * used as both a client and a server. - * @since v23.8.0 - */ - class QuicEndpoint implements AsyncDisposable { - constructor(options?: EndpointOptions); - /** - * The local UDP socket address to which the endpoint is bound, if any. - * - * If the endpoint is not currently bound then the value will be `undefined`. Read only. - * @since v23.8.0 - */ - readonly address: SocketAddress | undefined; - /** - * When `endpoint.busy` is set to true, the endpoint will temporarily reject - * new sessions from being created. Read/write. - * - * ```js - * // Mark the endpoint busy. New sessions will be prevented. - * endpoint.busy = true; - * - * // Mark the endpoint free. New session will be allowed. - * endpoint.busy = false; - * ``` - * - * The `busy` property is useful when the endpoint is under heavy load and needs to - * temporarily reject new sessions while it catches up. - * @since v23.8.0 - */ - busy: boolean; - /** - * Gracefully close the endpoint. The endpoint will close and destroy itself when - * all currently open sessions close. Once called, new sessions will be rejected. - * - * Returns a promise that is fulfilled when the endpoint is destroyed. - * @since v23.8.0 - */ - close(): Promise; - /** - * A promise that is fulfilled when the endpoint is destroyed. This will be the same promise that is - * returned by the `endpoint.close()` function. Read only. - * @since v23.8.0 - */ - readonly closed: Promise; - /** - * True if `endpoint.close()` has been called and closing the endpoint has not yet completed. - * Read only. - * @since v23.8.0 - */ - readonly closing: boolean; - /** - * Forcefully closes the endpoint by forcing all open sessions to be immediately - * closed. - * @since v23.8.0 - */ - destroy(error?: any): void; - /** - * True if `endpoint.destroy()` has been called. Read only. - * @since v23.8.0 - */ - readonly destroyed: boolean; - /** - * The statistics collected for an active session. Read only. - * @since v23.8.0 - */ - readonly stats: QuicEndpoint.Stats; - /** - * Calls `endpoint.close()` and returns a promise that fulfills when the - * endpoint has closed. - * @since v23.8.0 - */ - [Symbol.asyncDispose](): Promise; - } - namespace QuicEndpoint { - /** - * A view of the collected statistics for an endpoint. - * @since v23.8.0 - */ - class Stats { - private constructor(); - /** - * A timestamp indicating the moment the endpoint was created. Read only. - * @since v23.8.0 - */ - readonly createdAt: bigint; - /** - * A timestamp indicating the moment the endpoint was destroyed. Read only. - * @since v23.8.0 - */ - readonly destroyedAt: bigint; - /** - * The total number of bytes received by this endpoint. Read only. - * @since v23.8.0 - */ - readonly bytesReceived: bigint; - /** - * The total number of bytes sent by this endpoint. Read only. - * @since v23.8.0 - */ - readonly bytesSent: bigint; - /** - * The total number of QUIC packets successfully received by this endpoint. Read only. - * @since v23.8.0 - */ - readonly packetsReceived: bigint; - /** - * The total number of QUIC packets successfully sent by this endpoint. Read only. - * @since v23.8.0 - */ - readonly packetsSent: bigint; - /** - * The total number of peer-initiated sessions received by this endpoint. Read only. - * @since v23.8.0 - */ - readonly serverSessions: bigint; - /** - * The total number of sessions initiated by this endpoint. Read only. - * @since v23.8.0 - */ - readonly clientSessions: bigint; - /** - * The total number of times an initial packet was rejected due to the - * endpoint being marked busy. Read only. - * @since v23.8.0 - */ - readonly serverBusyCount: bigint; - /** - * The total number of QUIC retry attempts on this endpoint. Read only. - * @since v23.8.0 - */ - readonly retryCount: bigint; - /** - * The total number sessions rejected due to QUIC version mismatch. Read only. - * @since v23.8.0 - */ - readonly versionNegotiationCount: bigint; - /** - * The total number of stateless resets handled by this endpoint. Read only. - * @since v23.8.0 - */ - readonly statelessResetCount: bigint; - /** - * The total number of sessions that were closed before handshake completed. Read only. - * @since v23.8.0 - */ - readonly immediateCloseCount: bigint; - } - } - interface CreateStreamOptions { - body?: ArrayBuffer | NodeJS.ArrayBufferView | Blob | undefined; - sendOrder?: number | undefined; - } - interface SessionPath { - local: SocketAddress; - remote: SocketAddress; - } - /** - * A `QuicSession` represents the local side of a QUIC connection. - * @since v23.8.0 - */ - class QuicSession implements AsyncDisposable { - private constructor(); - /** - * Initiate a graceful close of the session. Existing streams will be allowed - * to complete but no new streams will be opened. Once all streams have closed, - * the session will be destroyed. The returned promise will be fulfilled once - * the session has been destroyed. - * @since v23.8.0 - */ - close(): Promise; - /** - * A promise that is fulfilled once the session is destroyed. - * @since v23.8.0 - */ - readonly closed: Promise; - /** - * Immediately destroy the session. All streams will be destroys and the - * session will be closed. - * @since v23.8.0 - */ - destroy(error?: any): void; - /** - * True if `session.destroy()` has been called. Read only. - * @since v23.8.0 - */ - readonly destroyed: boolean; - /** - * The endpoint that created this session. Read only. - * @since v23.8.0 - */ - readonly endpoint: QuicEndpoint; - /** - * The callback to invoke when a new stream is initiated by a remote peer. Read/write. - * @since v23.8.0 - */ - onstream: OnStreamCallback | undefined; - /** - * The callback to invoke when a new datagram is received from a remote peer. Read/write. - * @since v23.8.0 - */ - ondatagram: OnDatagramCallback | undefined; - /** - * The callback to invoke when the status of a datagram is updated. Read/write. - * @since v23.8.0 - */ - ondatagramstatus: OnDatagramStatusCallback | undefined; - /** - * The callback to invoke when the path validation is updated. Read/write. - * @since v23.8.0 - */ - onpathvalidation: OnPathValidationCallback | undefined; - /** - * The callback to invoke when a new session ticket is received. Read/write. - * @since v23.8.0 - */ - onsessionticket: OnSessionTicketCallback | undefined; - /** - * The callback to invoke when a version negotiation is initiated. Read/write. - * @since v23.8.0 - */ - onversionnegotiation: OnVersionNegotiationCallback | undefined; - /** - * The callback to invoke when the TLS handshake is completed. Read/write. - * @since v23.8.0 - */ - onhandshake: OnHandshakeCallback | undefined; - /** - * Open a new bidirectional stream. If the `body` option is not specified, - * the outgoing stream will be half-closed. - * @since v23.8.0 - */ - createBidirectionalStream(options?: CreateStreamOptions): Promise; - /** - * Open a new unidirectional stream. If the `body` option is not specified, - * the outgoing stream will be closed. - * @since v23.8.0 - */ - createUnidirectionalStream(options?: CreateStreamOptions): Promise; - /** - * The local and remote socket addresses associated with the session. Read only. - * @since v23.8.0 - */ - path: SessionPath | undefined; - /** - * Sends an unreliable datagram to the remote peer, returning the datagram ID. - * If the datagram payload is specified as an `ArrayBufferView`, then ownership of - * that view will be transfered to the underlying stream. - * @since v23.8.0 - */ - sendDatagram(datagram: string | NodeJS.ArrayBufferView): bigint; - /** - * Return the current statistics for the session. Read only. - * @since v23.8.0 - */ - readonly stats: QuicSession.Stats; - /** - * Initiate a key update for the session. - * @since v23.8.0 - */ - updateKey(): void; - /** - * Calls `session.close()` and returns a promise that fulfills when the - * session has closed. - * @since v23.8.0 - */ - [Symbol.asyncDispose](): Promise; - } - namespace QuicSession { - /** - * @since v23.8.0 - */ - class Stats { - private constructor(); - /** - * @since v23.8.0 - */ - readonly createdAt: bigint; - /** - * @since v23.8.0 - */ - readonly closingAt: bigint; - /** - * @since v23.8.0 - */ - readonly handshakeCompletedAt: bigint; - /** - * @since v23.8.0 - */ - readonly handshakeConfirmedAt: bigint; - /** - * @since v23.8.0 - */ - readonly bytesReceived: bigint; - /** - * @since v23.8.0 - */ - readonly bytesSent: bigint; - /** - * @since v23.8.0 - */ - readonly bidiInStreamCount: bigint; - /** - * @since v23.8.0 - */ - readonly bidiOutStreamCount: bigint; - /** - * @since v23.8.0 - */ - readonly uniInStreamCount: bigint; - /** - * @since v23.8.0 - */ - readonly uniOutStreamCount: bigint; - /** - * @since v23.8.0 - */ - readonly maxBytesInFlights: bigint; - /** - * @since v23.8.0 - */ - readonly bytesInFlight: bigint; - /** - * @since v23.8.0 - */ - readonly blockCount: bigint; - /** - * @since v23.8.0 - */ - readonly cwnd: bigint; - /** - * @since v23.8.0 - */ - readonly latestRtt: bigint; - /** - * @since v23.8.0 - */ - readonly minRtt: bigint; - /** - * @since v23.8.0 - */ - readonly rttVar: bigint; - /** - * @since v23.8.0 - */ - readonly smoothedRtt: bigint; - /** - * @since v23.8.0 - */ - readonly ssthresh: bigint; - /** - * @since v23.8.0 - */ - readonly datagramsReceived: bigint; - /** - * @since v23.8.0 - */ - readonly datagramsSent: bigint; - /** - * @since v23.8.0 - */ - readonly datagramsAcknowledged: bigint; - /** - * @since v23.8.0 - */ - readonly datagramsLost: bigint; - } - } - /** - * @since v23.8.0 - */ - class QuicStream { - private constructor(); - /** - * A promise that is fulfilled when the stream is fully closed. - * @since v23.8.0 - */ - readonly closed: Promise; - /** - * Immediately and abruptly destroys the stream. - * @since v23.8.0 - */ - destroy(error?: any): void; - /** - * True if `stream.destroy()` has been called. - * @since v23.8.0 - */ - readonly destroyed: boolean; - /** - * The directionality of the stream. Read only. - * @since v23.8.0 - */ - readonly direction: "bidi" | "uni"; - /** - * The stream ID. Read only. - * @since v23.8.0 - */ - readonly id: bigint; - /** - * The callback to invoke when the stream is blocked. Read/write. - * @since v23.8.0 - */ - onblocked: OnBlockedCallback | undefined; - /** - * The callback to invoke when the stream is reset. Read/write. - * @since v23.8.0 - */ - onreset: OnStreamErrorCallback | undefined; - /** - * @since v23.8.0 - */ - readonly readable: ReadableStream; - /** - * The session that created this stream. Read only. - * @since v23.8.0 - */ - readonly session: QuicSession; - /** - * The current statistics for the stream. Read only. - * @since v23.8.0 - */ - readonly stats: QuicStream.Stats; - } - namespace QuicStream { - /** - * @since v23.8.0 - */ - class Stats { - private constructor(); - /** - * @since v23.8.0 - */ - readonly ackedAt: bigint; - /** - * @since v23.8.0 - */ - readonly bytesReceived: bigint; - /** - * @since v23.8.0 - */ - readonly bytesSent: bigint; - /** - * @since v23.8.0 - */ - readonly createdAt: bigint; - /** - * @since v23.8.0 - */ - readonly destroyedAt: bigint; - /** - * @since v23.8.0 - */ - readonly finalSize: bigint; - /** - * @since v23.8.0 - */ - readonly isConnected: bigint; - /** - * @since v23.8.0 - */ - readonly maxOffset: bigint; - /** - * @since v23.8.0 - */ - readonly maxOffsetAcknowledged: bigint; - /** - * @since v23.8.0 - */ - readonly maxOffsetReceived: bigint; - /** - * @since v23.8.0 - */ - readonly openedAt: bigint; - /** - * @since v23.8.0 - */ - readonly receivedAt: bigint; - } - } - namespace constants { - enum cc { - RENO = "reno", - CUBIC = "cubic", - BBR = "bbr", - } - const DEFAULT_CIPHERS: string; - const DEFAULT_GROUPS: string; - } -} diff --git a/PBandGraphScaffold/node_modules/@types/node/readline.d.ts b/PBandGraphScaffold/node_modules/@types/node/readline.d.ts deleted file mode 100644 index a47e185..0000000 --- a/PBandGraphScaffold/node_modules/@types/node/readline.d.ts +++ /dev/null @@ -1,541 +0,0 @@ -/** - * The `node:readline` module provides an interface for reading data from a [Readable](https://nodejs.org/docs/latest-v25.x/api/stream.html#readable-streams) stream - * (such as [`process.stdin`](https://nodejs.org/docs/latest-v25.x/api/process.html#processstdin)) one line at a time. - * - * To use the promise-based APIs: - * - * ```js - * import * as readline from 'node:readline/promises'; - * ``` - * - * To use the callback and sync APIs: - * - * ```js - * import * as readline from 'node:readline'; - * ``` - * - * The following simple example illustrates the basic use of the `node:readline` module. - * - * ```js - * import * as readline from 'node:readline/promises'; - * import { stdin as input, stdout as output } from 'node:process'; - * - * const rl = readline.createInterface({ input, output }); - * - * const answer = await rl.question('What do you think of Node.js? '); - * - * console.log(`Thank you for your valuable feedback: ${answer}`); - * - * rl.close(); - * ``` - * - * Once this code is invoked, the Node.js application will not terminate until the `readline.Interface` is closed because the interface waits for data to be - * received on the `input` stream. - * @see [source](https://github.com/nodejs/node/blob/v25.x/lib/readline.js) - */ -declare module "node:readline" { - import { Abortable, EventEmitter, InternalEventEmitter } from "node:events"; - interface Key { - sequence?: string | undefined; - name?: string | undefined; - ctrl?: boolean | undefined; - meta?: boolean | undefined; - shift?: boolean | undefined; - } - interface InterfaceEventMap { - "close": []; - "history": [history: string[]]; - "line": [input: string]; - "pause": []; - "resume": []; - "SIGCONT": []; - "SIGINT": []; - "SIGTSTP": []; - } - /** - * Instances of the `readline.Interface` class are constructed using the `readline.createInterface()` method. Every instance is associated with a - * single `input` [Readable](https://nodejs.org/docs/latest-v25.x/api/stream.html#readable-streams) stream and a single `output` [Writable](https://nodejs.org/docs/latest-v25.x/api/stream.html#writable-streams) stream. - * The `output` stream is used to print prompts for user input that arrives on, - * and is read from, the `input` stream. - * @since v0.1.104 - */ - class Interface implements EventEmitter, Disposable { - /** - * NOTE: According to the documentation: - * - * > Instances of the `readline.Interface` class are constructed using the - * > `readline.createInterface()` method. - * - * @see https://nodejs.org/dist/latest-v25.x/docs/api/readline.html#class-interfaceconstructor - */ - protected constructor( - input: NodeJS.ReadableStream, - output?: NodeJS.WritableStream, - completer?: Completer | AsyncCompleter, - terminal?: boolean, - ); - /** - * NOTE: According to the documentation: - * - * > Instances of the `readline.Interface` class are constructed using the - * > `readline.createInterface()` method. - * - * @see https://nodejs.org/dist/latest-v25.x/docs/api/readline.html#class-interfaceconstructor - */ - protected constructor(options: ReadLineOptions); - readonly terminal: boolean; - /** - * The current input data being processed by node. - * - * This can be used when collecting input from a TTY stream to retrieve the - * current value that has been processed thus far, prior to the `line` event - * being emitted. Once the `line` event has been emitted, this property will - * be an empty string. - * - * Be aware that modifying the value during the instance runtime may have - * unintended consequences if `rl.cursor` is not also controlled. - * - * **If not using a TTY stream for input, use the `'line'` event.** - * - * One possible use case would be as follows: - * - * ```js - * const values = ['lorem ipsum', 'dolor sit amet']; - * const rl = readline.createInterface(process.stdin); - * const showResults = debounce(() => { - * console.log( - * '\n', - * values.filter((val) => val.startsWith(rl.line)).join(' '), - * ); - * }, 300); - * process.stdin.on('keypress', (c, k) => { - * showResults(); - * }); - * ``` - * @since v0.1.98 - */ - readonly line: string; - /** - * The cursor position relative to `rl.line`. - * - * This will track where the current cursor lands in the input string, when - * reading input from a TTY stream. The position of cursor determines the - * portion of the input string that will be modified as input is processed, - * as well as the column where the terminal caret will be rendered. - * @since v0.1.98 - */ - readonly cursor: number; - /** - * The `rl.getPrompt()` method returns the current prompt used by `rl.prompt()`. - * @since v15.3.0, v14.17.0 - * @return the current prompt string - */ - getPrompt(): string; - /** - * The `rl.setPrompt()` method sets the prompt that will be written to `output` whenever `rl.prompt()` is called. - * @since v0.1.98 - */ - setPrompt(prompt: string): void; - /** - * The `rl.prompt()` method writes the `Interface` instances configured`prompt` to a new line in `output` in order to provide a user with a new - * location at which to provide input. - * - * When called, `rl.prompt()` will resume the `input` stream if it has been - * paused. - * - * If the `Interface` was created with `output` set to `null` or `undefined` the prompt is not written. - * @since v0.1.98 - * @param preserveCursor If `true`, prevents the cursor placement from being reset to `0`. - */ - prompt(preserveCursor?: boolean): void; - /** - * The `rl.question()` method displays the `query` by writing it to the `output`, - * waits for user input to be provided on `input`, then invokes the `callback` function passing the provided input as the first argument. - * - * When called, `rl.question()` will resume the `input` stream if it has been - * paused. - * - * If the `Interface` was created with `output` set to `null` or `undefined` the `query` is not written. - * - * The `callback` function passed to `rl.question()` does not follow the typical - * pattern of accepting an `Error` object or `null` as the first argument. - * The `callback` is called with the provided answer as the only argument. - * - * An error will be thrown if calling `rl.question()` after `rl.close()`. - * - * Example usage: - * - * ```js - * rl.question('What is your favorite food? ', (answer) => { - * console.log(`Oh, so your favorite food is ${answer}`); - * }); - * ``` - * - * Using an `AbortController` to cancel a question. - * - * ```js - * const ac = new AbortController(); - * const signal = ac.signal; - * - * rl.question('What is your favorite food? ', { signal }, (answer) => { - * console.log(`Oh, so your favorite food is ${answer}`); - * }); - * - * signal.addEventListener('abort', () => { - * console.log('The food question timed out'); - * }, { once: true }); - * - * setTimeout(() => ac.abort(), 10000); - * ``` - * @since v0.3.3 - * @param query A statement or query to write to `output`, prepended to the prompt. - * @param callback A callback function that is invoked with the user's input in response to the `query`. - */ - question(query: string, callback: (answer: string) => void): void; - question(query: string, options: Abortable, callback: (answer: string) => void): void; - /** - * The `rl.pause()` method pauses the `input` stream, allowing it to be resumed - * later if necessary. - * - * Calling `rl.pause()` does not immediately pause other events (including `'line'`) from being emitted by the `Interface` instance. - * @since v0.3.4 - */ - pause(): this; - /** - * The `rl.resume()` method resumes the `input` stream if it has been paused. - * @since v0.3.4 - */ - resume(): this; - /** - * The `rl.close()` method closes the `Interface` instance and - * relinquishes control over the `input` and `output` streams. When called, - * the `'close'` event will be emitted. - * - * Calling `rl.close()` does not immediately stop other events (including `'line'`) - * from being emitted by the `Interface` instance. - * @since v0.1.98 - */ - close(): void; - /** - * Alias for `rl.close()`. - * @since v22.15.0 - */ - [Symbol.dispose](): void; - /** - * The `rl.write()` method will write either `data` or a key sequence identified - * by `key` to the `output`. The `key` argument is supported only if `output` is - * a `TTY` text terminal. See `TTY keybindings` for a list of key - * combinations. - * - * If `key` is specified, `data` is ignored. - * - * When called, `rl.write()` will resume the `input` stream if it has been - * paused. - * - * If the `Interface` was created with `output` set to `null` or `undefined` the `data` and `key` are not written. - * - * ```js - * rl.write('Delete this!'); - * // Simulate Ctrl+U to delete the line written previously - * rl.write(null, { ctrl: true, name: 'u' }); - * ``` - * - * The `rl.write()` method will write the data to the `readline` `Interface`'s `input` _as if it were provided by the user_. - * @since v0.1.98 - */ - write(data: string | Buffer, key?: Key): void; - write(data: undefined | null | string | Buffer, key: Key): void; - /** - * Returns the real position of the cursor in relation to the input - * prompt + string. Long input (wrapping) strings, as well as multiple - * line prompts are included in the calculations. - * @since v13.5.0, v12.16.0 - */ - getCursorPos(): CursorPos; - [Symbol.asyncIterator](): NodeJS.AsyncIterator; - } - interface Interface extends InternalEventEmitter {} - type ReadLine = Interface; // type forwarded for backwards compatibility - type Completer = (line: string) => CompleterResult; - type AsyncCompleter = ( - line: string, - callback: (err?: null | Error, result?: CompleterResult) => void, - ) => void; - type CompleterResult = [string[], string]; - interface ReadLineOptions { - /** - * The [`Readable`](https://nodejs.org/docs/latest-v25.x/api/stream.html#readable-streams) stream to listen to - */ - input: NodeJS.ReadableStream; - /** - * The [`Writable`](https://nodejs.org/docs/latest-v25.x/api/stream.html#writable-streams) stream to write readline data to. - */ - output?: NodeJS.WritableStream | undefined; - /** - * An optional function used for Tab autocompletion. - */ - completer?: Completer | AsyncCompleter | undefined; - /** - * `true` if the `input` and `output` streams should be treated like a TTY, - * and have ANSI/VT100 escape codes written to it. - * Default: checking `isTTY` on the `output` stream upon instantiation. - */ - terminal?: boolean | undefined; - /** - * Initial list of history lines. - * This option makes sense only if `terminal` is set to `true` by the user or by an internal `output` check, - * otherwise the history caching mechanism is not initialized at all. - * @default [] - */ - history?: string[] | undefined; - /** - * Maximum number of history lines retained. - * To disable the history set this value to `0`. - * This option makes sense only if `terminal` is set to `true` by the user or by an internal `output` check, - * otherwise the history caching mechanism is not initialized at all. - * @default 30 - */ - historySize?: number | undefined; - /** - * If `true`, when a new input line added to the history list duplicates an older one, - * this removes the older line from the list. - * @default false - */ - removeHistoryDuplicates?: boolean | undefined; - /** - * The prompt string to use. - * @default "> " - */ - prompt?: string | undefined; - /** - * If the delay between `\r` and `\n` exceeds `crlfDelay` milliseconds, - * both `\r` and `\n` will be treated as separate end-of-line input. - * `crlfDelay` will be coerced to a number no less than `100`. - * It can be set to `Infinity`, in which case - * `\r` followed by `\n` will always be considered a single newline - * (which may be reasonable for [reading files](https://nodejs.org/docs/latest-v25.x/api/readline.html#example-read-file-stream-line-by-line) with `\r\n` line delimiter). - * @default 100 - */ - crlfDelay?: number | undefined; - /** - * The duration `readline` will wait for a character - * (when reading an ambiguous key sequence in milliseconds - * one that can both form a complete key sequence using the input read so far - * and can take additional input to complete a longer key sequence). - * @default 500 - */ - escapeCodeTimeout?: number | undefined; - /** - * The number of spaces a tab is equal to (minimum 1). - * @default 8 - */ - tabSize?: number | undefined; - /** - * Allows closing the interface using an AbortSignal. - * Aborting the signal will internally call `close` on the interface. - */ - signal?: AbortSignal | undefined; - } - /** - * The `readline.createInterface()` method creates a new `readline.Interface` instance. - * - * ```js - * import readline from 'node:readline'; - * const rl = readline.createInterface({ - * input: process.stdin, - * output: process.stdout, - * }); - * ``` - * - * Once the `readline.Interface` instance is created, the most common case is to - * listen for the `'line'` event: - * - * ```js - * rl.on('line', (line) => { - * console.log(`Received: ${line}`); - * }); - * ``` - * - * If `terminal` is `true` for this instance then the `output` stream will get - * the best compatibility if it defines an `output.columns` property and emits - * a `'resize'` event on the `output` if or when the columns ever change - * (`process.stdout` does this automatically when it is a TTY). - * - * When creating a `readline.Interface` using `stdin` as input, the program - * will not terminate until it receives an [EOF character](https://en.wikipedia.org/wiki/End-of-file#EOF_character). To exit without - * waiting for user input, call `process.stdin.unref()`. - * @since v0.1.98 - */ - function createInterface( - input: NodeJS.ReadableStream, - output?: NodeJS.WritableStream, - completer?: Completer | AsyncCompleter, - terminal?: boolean, - ): Interface; - function createInterface(options: ReadLineOptions): Interface; - /** - * The `readline.emitKeypressEvents()` method causes the given `Readable` stream to begin emitting `'keypress'` events corresponding to received input. - * - * Optionally, `interface` specifies a `readline.Interface` instance for which - * autocompletion is disabled when copy-pasted input is detected. - * - * If the `stream` is a `TTY`, then it must be in raw mode. - * - * This is automatically called by any readline instance on its `input` if the `input` is a terminal. Closing the `readline` instance does not stop - * the `input` from emitting `'keypress'` events. - * - * ```js - * readline.emitKeypressEvents(process.stdin); - * if (process.stdin.isTTY) - * process.stdin.setRawMode(true); - * ``` - * - * ## Example: Tiny CLI - * - * The following example illustrates the use of `readline.Interface` class to - * implement a small command-line interface: - * - * ```js - * import readline from 'node:readline'; - * const rl = readline.createInterface({ - * input: process.stdin, - * output: process.stdout, - * prompt: 'OHAI> ', - * }); - * - * rl.prompt(); - * - * rl.on('line', (line) => { - * switch (line.trim()) { - * case 'hello': - * console.log('world!'); - * break; - * default: - * console.log(`Say what? I might have heard '${line.trim()}'`); - * break; - * } - * rl.prompt(); - * }).on('close', () => { - * console.log('Have a great day!'); - * process.exit(0); - * }); - * ``` - * - * ## Example: Read file stream line-by-Line - * - * A common use case for `readline` is to consume an input file one line at a - * time. The easiest way to do so is leveraging the `fs.ReadStream` API as - * well as a `for await...of` loop: - * - * ```js - * import fs from 'node:fs'; - * import readline from 'node:readline'; - * - * async function processLineByLine() { - * const fileStream = fs.createReadStream('input.txt'); - * - * const rl = readline.createInterface({ - * input: fileStream, - * crlfDelay: Infinity, - * }); - * // Note: we use the crlfDelay option to recognize all instances of CR LF - * // ('\r\n') in input.txt as a single line break. - * - * for await (const line of rl) { - * // Each line in input.txt will be successively available here as `line`. - * console.log(`Line from file: ${line}`); - * } - * } - * - * processLineByLine(); - * ``` - * - * Alternatively, one could use the `'line'` event: - * - * ```js - * import fs from 'node:fs'; - * import readline from 'node:readline'; - * - * const rl = readline.createInterface({ - * input: fs.createReadStream('sample.txt'), - * crlfDelay: Infinity, - * }); - * - * rl.on('line', (line) => { - * console.log(`Line from file: ${line}`); - * }); - * ``` - * - * Currently, `for await...of` loop can be a bit slower. If `async` / `await` flow and speed are both essential, a mixed approach can be applied: - * - * ```js - * import { once } from 'node:events'; - * import { createReadStream } from 'node:fs'; - * import { createInterface } from 'node:readline'; - * - * (async function processLineByLine() { - * try { - * const rl = createInterface({ - * input: createReadStream('big-file.txt'), - * crlfDelay: Infinity, - * }); - * - * rl.on('line', (line) => { - * // Process the line. - * }); - * - * await once(rl, 'close'); - * - * console.log('File processed.'); - * } catch (err) { - * console.error(err); - * } - * })(); - * ``` - * @since v0.7.7 - */ - function emitKeypressEvents(stream: NodeJS.ReadableStream, readlineInterface?: Interface): void; - type Direction = -1 | 0 | 1; - interface CursorPos { - rows: number; - cols: number; - } - /** - * The `readline.clearLine()` method clears current line of given [TTY](https://nodejs.org/docs/latest-v25.x/api/tty.html) stream - * in a specified direction identified by `dir`. - * @since v0.7.7 - * @param callback Invoked once the operation completes. - * @return `false` if `stream` wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`. - */ - function clearLine(stream: NodeJS.WritableStream, dir: Direction, callback?: () => void): boolean; - /** - * The `readline.clearScreenDown()` method clears the given [TTY](https://nodejs.org/docs/latest-v25.x/api/tty.html) stream from - * the current position of the cursor down. - * @since v0.7.7 - * @param callback Invoked once the operation completes. - * @return `false` if `stream` wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`. - */ - function clearScreenDown(stream: NodeJS.WritableStream, callback?: () => void): boolean; - /** - * The `readline.cursorTo()` method moves cursor to the specified position in a - * given [TTY](https://nodejs.org/docs/latest-v25.x/api/tty.html) `stream`. - * @since v0.7.7 - * @param callback Invoked once the operation completes. - * @return `false` if `stream` wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`. - */ - function cursorTo(stream: NodeJS.WritableStream, x: number, y?: number, callback?: () => void): boolean; - /** - * The `readline.moveCursor()` method moves the cursor _relative_ to its current - * position in a given [TTY](https://nodejs.org/docs/latest-v25.x/api/tty.html) `stream`. - * @since v0.7.7 - * @param callback Invoked once the operation completes. - * @return `false` if `stream` wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`. - */ - function moveCursor(stream: NodeJS.WritableStream, dx: number, dy: number, callback?: () => void): boolean; -} -declare module "node:readline" { - export * as promises from "node:readline/promises"; -} -declare module "readline" { - export * from "node:readline"; -} diff --git a/PBandGraphScaffold/node_modules/@types/node/readline/promises.d.ts b/PBandGraphScaffold/node_modules/@types/node/readline/promises.d.ts deleted file mode 100644 index f449e1b..0000000 --- a/PBandGraphScaffold/node_modules/@types/node/readline/promises.d.ts +++ /dev/null @@ -1,161 +0,0 @@ -/** - * @since v17.0.0 - */ -declare module "node:readline/promises" { - import { Abortable } from "node:events"; - import { - CompleterResult, - Direction, - Interface as _Interface, - ReadLineOptions as _ReadLineOptions, - } from "node:readline"; - /** - * Instances of the `readlinePromises.Interface` class are constructed using the `readlinePromises.createInterface()` method. Every instance is associated with a - * single `input` `Readable` stream and a single `output` `Writable` stream. - * The `output` stream is used to print prompts for user input that arrives on, - * and is read from, the `input` stream. - * @since v17.0.0 - */ - class Interface extends _Interface { - /** - * The `rl.question()` method displays the `query` by writing it to the `output`, - * waits for user input to be provided on `input`, then invokes the `callback` function passing the provided input as the first argument. - * - * When called, `rl.question()` will resume the `input` stream if it has been - * paused. - * - * If the `Interface` was created with `output` set to `null` or `undefined` the `query` is not written. - * - * If the question is called after `rl.close()`, it returns a rejected promise. - * - * Example usage: - * - * ```js - * const answer = await rl.question('What is your favorite food? '); - * console.log(`Oh, so your favorite food is ${answer}`); - * ``` - * - * Using an `AbortSignal` to cancel a question. - * - * ```js - * const signal = AbortSignal.timeout(10_000); - * - * signal.addEventListener('abort', () => { - * console.log('The food question timed out'); - * }, { once: true }); - * - * const answer = await rl.question('What is your favorite food? ', { signal }); - * console.log(`Oh, so your favorite food is ${answer}`); - * ``` - * @since v17.0.0 - * @param query A statement or query to write to `output`, prepended to the prompt. - * @return A promise that is fulfilled with the user's input in response to the `query`. - */ - question(query: string): Promise; - question(query: string, options: Abortable): Promise; - } - /** - * @since v17.0.0 - */ - class Readline { - /** - * @param stream A TTY stream. - */ - constructor( - stream: NodeJS.WritableStream, - options?: { - autoCommit?: boolean | undefined; - }, - ); - /** - * The `rl.clearLine()` method adds to the internal list of pending action an - * action that clears current line of the associated `stream` in a specified - * direction identified by `dir`. - * Call `rl.commit()` to see the effect of this method, unless `autoCommit: true` was passed to the constructor. - * @since v17.0.0 - * @return this - */ - clearLine(dir: Direction): this; - /** - * The `rl.clearScreenDown()` method adds to the internal list of pending action an - * action that clears the associated stream from the current position of the - * cursor down. - * Call `rl.commit()` to see the effect of this method, unless `autoCommit: true` was passed to the constructor. - * @since v17.0.0 - * @return this - */ - clearScreenDown(): this; - /** - * The `rl.commit()` method sends all the pending actions to the associated `stream` and clears the internal list of pending actions. - * @since v17.0.0 - */ - commit(): Promise; - /** - * The `rl.cursorTo()` method adds to the internal list of pending action an action - * that moves cursor to the specified position in the associated `stream`. - * Call `rl.commit()` to see the effect of this method, unless `autoCommit: true` was passed to the constructor. - * @since v17.0.0 - * @return this - */ - cursorTo(x: number, y?: number): this; - /** - * The `rl.moveCursor()` method adds to the internal list of pending action an - * action that moves the cursor _relative_ to its current position in the - * associated `stream`. - * Call `rl.commit()` to see the effect of this method, unless `autoCommit: true` was passed to the constructor. - * @since v17.0.0 - * @return this - */ - moveCursor(dx: number, dy: number): this; - /** - * The `rl.rollback` methods clears the internal list of pending actions without - * sending it to the associated `stream`. - * @since v17.0.0 - * @return this - */ - rollback(): this; - } - type Completer = (line: string) => CompleterResult | Promise; - interface ReadLineOptions extends Omit<_ReadLineOptions, "completer"> { - /** - * An optional function used for Tab autocompletion. - */ - completer?: Completer | undefined; - } - /** - * The `readlinePromises.createInterface()` method creates a new `readlinePromises.Interface` instance. - * - * ```js - * import readlinePromises from 'node:readline/promises'; - * const rl = readlinePromises.createInterface({ - * input: process.stdin, - * output: process.stdout, - * }); - * ``` - * - * Once the `readlinePromises.Interface` instance is created, the most common case - * is to listen for the `'line'` event: - * - * ```js - * rl.on('line', (line) => { - * console.log(`Received: ${line}`); - * }); - * ``` - * - * If `terminal` is `true` for this instance then the `output` stream will get - * the best compatibility if it defines an `output.columns` property and emits - * a `'resize'` event on the `output` if or when the columns ever change - * (`process.stdout` does this automatically when it is a TTY). - * @since v17.0.0 - */ - function createInterface( - input: NodeJS.ReadableStream, - output?: NodeJS.WritableStream, - completer?: Completer, - terminal?: boolean, - ): Interface; - function createInterface(options: ReadLineOptions): Interface; -} -declare module "readline/promises" { - export * from "node:readline/promises"; -} diff --git a/PBandGraphScaffold/node_modules/@types/node/repl.d.ts b/PBandGraphScaffold/node_modules/@types/node/repl.d.ts deleted file mode 100644 index 2d06294..0000000 --- a/PBandGraphScaffold/node_modules/@types/node/repl.d.ts +++ /dev/null @@ -1,415 +0,0 @@ -/** - * The `node:repl` module provides a Read-Eval-Print-Loop (REPL) implementation - * that is available both as a standalone program or includible in other - * applications. It can be accessed using: - * - * ```js - * import repl from 'node:repl'; - * ``` - * @see [source](https://github.com/nodejs/node/blob/v25.x/lib/repl.js) - */ -declare module "node:repl" { - import { AsyncCompleter, Completer, Interface, InterfaceEventMap } from "node:readline"; - import { InspectOptions } from "node:util"; - import { Context } from "node:vm"; - interface ReplOptions { - /** - * The input prompt to display. - * @default "> " - */ - prompt?: string | undefined; - /** - * The `Readable` stream from which REPL input will be read. - * @default process.stdin - */ - input?: NodeJS.ReadableStream | undefined; - /** - * The `Writable` stream to which REPL output will be written. - * @default process.stdout - */ - output?: NodeJS.WritableStream | undefined; - /** - * If `true`, specifies that the output should be treated as a TTY terminal, and have - * ANSI/VT100 escape codes written to it. - * Default: checking the value of the `isTTY` property on the output stream upon - * instantiation. - */ - terminal?: boolean | undefined; - /** - * The function to be used when evaluating each given line of input. - * **Default:** an async wrapper for the JavaScript `eval()` function. An `eval` function can - * error with `repl.Recoverable` to indicate the input was incomplete and prompt for - * additional lines. See the [custom evaluation functions](https://nodejs.org/dist/latest-v25.x/docs/api/repl.html#custom-evaluation-functions) - * section for more details. - */ - eval?: REPLEval | undefined; - /** - * Defines if the repl prints output previews or not. - * @default `true` Always `false` in case `terminal` is falsy. - */ - preview?: boolean | undefined; - /** - * If `true`, specifies that the default `writer` function should include ANSI color - * styling to REPL output. If a custom `writer` function is provided then this has no - * effect. - * @default the REPL instance's `terminal` value - */ - useColors?: boolean | undefined; - /** - * If `true`, specifies that the default evaluation function will use the JavaScript - * `global` as the context as opposed to creating a new separate context for the REPL - * instance. The node CLI REPL sets this value to `true`. - * @default false - */ - useGlobal?: boolean | undefined; - /** - * If `true`, specifies that the default writer will not output the return value of a - * command if it evaluates to `undefined`. - * @default false - */ - ignoreUndefined?: boolean | undefined; - /** - * The function to invoke to format the output of each command before writing to `output`. - * @default a wrapper for `util.inspect` - * - * @see https://nodejs.org/dist/latest-v25.x/docs/api/repl.html#repl_customizing_repl_output - */ - writer?: REPLWriter | undefined; - /** - * An optional function used for custom Tab auto completion. - * - * @see https://nodejs.org/dist/latest-v25.x/docs/api/readline.html#readline_use_of_the_completer_function - */ - completer?: Completer | AsyncCompleter | undefined; - /** - * A flag that specifies whether the default evaluator executes all JavaScript commands in - * strict mode or default (sloppy) mode. - * Accepted values are: - * - `repl.REPL_MODE_SLOPPY` - evaluates expressions in sloppy mode. - * - `repl.REPL_MODE_STRICT` - evaluates expressions in strict mode. This is equivalent to - * prefacing every repl statement with `'use strict'`. - */ - replMode?: typeof REPL_MODE_SLOPPY | typeof REPL_MODE_STRICT | undefined; - /** - * Stop evaluating the current piece of code when `SIGINT` is received, i.e. `Ctrl+C` is - * pressed. This cannot be used together with a custom `eval` function. - * @default false - */ - breakEvalOnSigint?: boolean | undefined; - } - type REPLEval = ( - this: REPLServer, - evalCmd: string, - context: Context, - file: string, - cb: (err: Error | null, result: any) => void, - ) => void; - type REPLWriter = (this: REPLServer, obj: any) => string; - /** - * This is the default "writer" value, if none is passed in the REPL options, - * and it can be overridden by custom print functions. - */ - const writer: REPLWriter & { - options: InspectOptions; - }; - type REPLCommandAction = (this: REPLServer, text: string) => void; - interface REPLCommand { - /** - * Help text to be displayed when `.help` is entered. - */ - help?: string | undefined; - /** - * The function to execute, optionally accepting a single string argument. - */ - action: REPLCommandAction; - } - interface REPLServerSetupHistoryOptions { - filePath?: string | undefined; - size?: number | undefined; - removeHistoryDuplicates?: boolean | undefined; - onHistoryFileLoaded?: ((err: Error | null, repl: REPLServer) => void) | undefined; - } - interface REPLServerEventMap extends InterfaceEventMap { - "exit": []; - "reset": [context: Context]; - } - /** - * Instances of `repl.REPLServer` are created using the {@link start} method - * or directly using the JavaScript `new` keyword. - * - * ```js - * import repl from 'node:repl'; - * - * const options = { useColors: true }; - * - * const firstInstance = repl.start(options); - * const secondInstance = new repl.REPLServer(options); - * ``` - * @since v0.1.91 - */ - class REPLServer extends Interface { - /** - * NOTE: According to the documentation: - * - * > Instances of `repl.REPLServer` are created using the `repl.start()` method and - * > _should not_ be created directly using the JavaScript `new` keyword. - * - * `REPLServer` cannot be subclassed due to implementation specifics in NodeJS. - * - * @see https://nodejs.org/dist/latest-v25.x/docs/api/repl.html#repl_class_replserver - */ - private constructor(); - /** - * The `vm.Context` provided to the `eval` function to be used for JavaScript - * evaluation. - */ - readonly context: Context; - /** - * @deprecated since v14.3.0 - Use `input` instead. - */ - readonly inputStream: NodeJS.ReadableStream; - /** - * @deprecated since v14.3.0 - Use `output` instead. - */ - readonly outputStream: NodeJS.WritableStream; - /** - * The `Readable` stream from which REPL input will be read. - */ - readonly input: NodeJS.ReadableStream; - /** - * The `Writable` stream to which REPL output will be written. - */ - readonly output: NodeJS.WritableStream; - /** - * The commands registered via `replServer.defineCommand()`. - */ - readonly commands: NodeJS.ReadOnlyDict; - /** - * A value indicating whether the REPL is currently in "editor mode". - * - * @see https://nodejs.org/dist/latest-v25.x/docs/api/repl.html#repl_commands_and_special_keys - */ - readonly editorMode: boolean; - /** - * A value indicating whether the `_` variable has been assigned. - * - * @see https://nodejs.org/dist/latest-v25.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable - */ - readonly underscoreAssigned: boolean; - /** - * The last evaluation result from the REPL (assigned to the `_` variable inside of the REPL). - * - * @see https://nodejs.org/dist/latest-v25.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable - */ - readonly last: any; - /** - * A value indicating whether the `_error` variable has been assigned. - * - * @since v9.8.0 - * @see https://nodejs.org/dist/latest-v25.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable - */ - readonly underscoreErrAssigned: boolean; - /** - * The last error raised inside the REPL (assigned to the `_error` variable inside of the REPL). - * - * @since v9.8.0 - * @see https://nodejs.org/dist/latest-v25.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable - */ - readonly lastError: any; - /** - * Specified in the REPL options, this is the function to be used when evaluating each - * given line of input. If not specified in the REPL options, this is an async wrapper - * for the JavaScript `eval()` function. - */ - readonly eval: REPLEval; - /** - * Specified in the REPL options, this is a value indicating whether the default - * `writer` function should include ANSI color styling to REPL output. - */ - readonly useColors: boolean; - /** - * Specified in the REPL options, this is a value indicating whether the default `eval` - * function will use the JavaScript `global` as the context as opposed to creating a new - * separate context for the REPL instance. - */ - readonly useGlobal: boolean; - /** - * Specified in the REPL options, this is a value indicating whether the default `writer` - * function should output the result of a command if it evaluates to `undefined`. - */ - readonly ignoreUndefined: boolean; - /** - * Specified in the REPL options, this is the function to invoke to format the output of - * each command before writing to `outputStream`. If not specified in the REPL options, - * this will be a wrapper for `util.inspect`. - */ - readonly writer: REPLWriter; - /** - * Specified in the REPL options, this is the function to use for custom Tab auto-completion. - */ - readonly completer: Completer | AsyncCompleter; - /** - * Specified in the REPL options, this is a flag that specifies whether the default `eval` - * function should execute all JavaScript commands in strict mode or default (sloppy) mode. - * Possible values are: - * - `repl.REPL_MODE_SLOPPY` - evaluates expressions in sloppy mode. - * - `repl.REPL_MODE_STRICT` - evaluates expressions in strict mode. This is equivalent to - * prefacing every repl statement with `'use strict'`. - */ - readonly replMode: typeof REPL_MODE_SLOPPY | typeof REPL_MODE_STRICT; - /** - * The `replServer.defineCommand()` method is used to add new `.`\-prefixed commands - * to the REPL instance. Such commands are invoked by typing a `.` followed by the `keyword`. The `cmd` is either a `Function` or an `Object` with the following - * properties: - * - * The following example shows two new commands added to the REPL instance: - * - * ```js - * import repl from 'node:repl'; - * - * const replServer = repl.start({ prompt: '> ' }); - * replServer.defineCommand('sayhello', { - * help: 'Say hello', - * action(name) { - * this.clearBufferedCommand(); - * console.log(`Hello, ${name}!`); - * this.displayPrompt(); - * }, - * }); - * replServer.defineCommand('saybye', function saybye() { - * console.log('Goodbye!'); - * this.close(); - * }); - * ``` - * - * The new commands can then be used from within the REPL instance: - * - * ```console - * > .sayhello Node.js User - * Hello, Node.js User! - * > .saybye - * Goodbye! - * ``` - * @since v0.3.0 - * @param keyword The command keyword (_without_ a leading `.` character). - * @param cmd The function to invoke when the command is processed. - */ - defineCommand(keyword: string, cmd: REPLCommandAction | REPLCommand): void; - /** - * The `replServer.displayPrompt()` method readies the REPL instance for input - * from the user, printing the configured `prompt` to a new line in the `output` and resuming the `input` to accept new input. - * - * When multi-line input is being entered, a pipe `'|'` is printed rather than the - * 'prompt'. - * - * When `preserveCursor` is `true`, the cursor placement will not be reset to `0`. - * - * The `replServer.displayPrompt` method is primarily intended to be called from - * within the action function for commands registered using the `replServer.defineCommand()` method. - * @since v0.1.91 - */ - displayPrompt(preserveCursor?: boolean): void; - /** - * The `replServer.clearBufferedCommand()` method clears any command that has been - * buffered but not yet executed. This method is primarily intended to be - * called from within the action function for commands registered using the `replServer.defineCommand()` method. - * @since v9.0.0 - */ - clearBufferedCommand(): void; - /** - * Initializes a history log file for the REPL instance. When executing the - * Node.js binary and using the command-line REPL, a history file is initialized - * by default. However, this is not the case when creating a REPL - * programmatically. Use this method to initialize a history log file when working - * with REPL instances programmatically. - * @since v11.10.0 - * @param historyPath the path to the history file - * @param callback called when history writes are ready or upon error - */ - setupHistory(historyPath: string, callback: (err: Error | null, repl: this) => void): void; - setupHistory( - historyConfig?: REPLServerSetupHistoryOptions, - callback?: (err: Error | null, repl: this) => void, - ): void; - // #region InternalEventEmitter - addListener( - eventName: E, - listener: (...args: REPLServerEventMap[E]) => void, - ): this; - addListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - emit(eventName: E, ...args: REPLServerEventMap[E]): boolean; - emit(eventName: string | symbol, ...args: any[]): boolean; - listenerCount( - eventName: E, - listener?: (...args: REPLServerEventMap[E]) => void, - ): number; - listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number; - listeners(eventName: E): ((...args: REPLServerEventMap[E]) => void)[]; - listeners(eventName: string | symbol): ((...args: any[]) => void)[]; - off(eventName: E, listener: (...args: REPLServerEventMap[E]) => void): this; - off(eventName: string | symbol, listener: (...args: any[]) => void): this; - on(eventName: E, listener: (...args: REPLServerEventMap[E]) => void): this; - on(eventName: string | symbol, listener: (...args: any[]) => void): this; - once( - eventName: E, - listener: (...args: REPLServerEventMap[E]) => void, - ): this; - once(eventName: string | symbol, listener: (...args: any[]) => void): this; - prependListener( - eventName: E, - listener: (...args: REPLServerEventMap[E]) => void, - ): this; - prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - prependOnceListener( - eventName: E, - listener: (...args: REPLServerEventMap[E]) => void, - ): this; - prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - rawListeners(eventName: E): ((...args: REPLServerEventMap[E]) => void)[]; - rawListeners(eventName: string | symbol): ((...args: any[]) => void)[]; - // eslint-disable-next-line @definitelytyped/no-unnecessary-generics - removeAllListeners(eventName?: E): this; - removeAllListeners(eventName?: string | symbol): this; - removeListener( - eventName: E, - listener: (...args: REPLServerEventMap[E]) => void, - ): this; - removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - // #endregion - } - /** - * A flag passed in the REPL options. Evaluates expressions in sloppy mode. - */ - const REPL_MODE_SLOPPY: unique symbol; - /** - * A flag passed in the REPL options. Evaluates expressions in strict mode. - * This is equivalent to prefacing every repl statement with `'use strict'`. - */ - const REPL_MODE_STRICT: unique symbol; - /** - * The `repl.start()` method creates and starts a {@link REPLServer} instance. - * - * If `options` is a string, then it specifies the input prompt: - * - * ```js - * import repl from 'node:repl'; - * - * // a Unix style prompt - * repl.start('$ '); - * ``` - * @since v0.1.91 - */ - function start(options?: string | ReplOptions): REPLServer; - /** - * Indicates a recoverable error that a `REPLServer` can use to support multi-line input. - * - * @see https://nodejs.org/dist/latest-v25.x/docs/api/repl.html#repl_recoverable_errors - */ - class Recoverable extends SyntaxError { - err: Error; - constructor(err: Error); - } -} -declare module "repl" { - export * from "node:repl"; -} diff --git a/PBandGraphScaffold/node_modules/@types/node/sea.d.ts b/PBandGraphScaffold/node_modules/@types/node/sea.d.ts deleted file mode 100644 index 2930c82..0000000 --- a/PBandGraphScaffold/node_modules/@types/node/sea.d.ts +++ /dev/null @@ -1,162 +0,0 @@ -/** - * This feature allows the distribution of a Node.js application conveniently to a - * system that does not have Node.js installed. - * - * Node.js supports the creation of [single executable applications](https://github.com/nodejs/single-executable) by allowing - * the injection of a blob prepared by Node.js, which can contain a bundled script, - * into the `node` binary. During start up, the program checks if anything has been - * injected. If the blob is found, it executes the script in the blob. Otherwise - * Node.js operates as it normally does. - * - * The single executable application feature currently only supports running a - * single embedded script using the `CommonJS` module system. - * - * Users can create a single executable application from their bundled script - * with the `node` binary itself and any tool which can inject resources into the - * binary. - * - * Here are the steps for creating a single executable application using one such - * tool, [postject](https://github.com/nodejs/postject): - * - * 1. Create a JavaScript file: - * ```bash - * echo 'console.log(`Hello, ${process.argv[2]}!`);' > hello.js - * ``` - * 2. Create a configuration file building a blob that can be injected into the - * single executable application (see `Generating single executable preparation blobs` for details): - * ```bash - * echo '{ "main": "hello.js", "output": "sea-prep.blob" }' > sea-config.json - * ``` - * 3. Generate the blob to be injected: - * ```bash - * node --experimental-sea-config sea-config.json - * ``` - * 4. Create a copy of the `node` executable and name it according to your needs: - * * On systems other than Windows: - * ```bash - * cp $(command -v node) hello - * ``` - * * On Windows: - * ```text - * node -e "require('fs').copyFileSync(process.execPath, 'hello.exe')" - * ``` - * The `.exe` extension is necessary. - * 5. Remove the signature of the binary (macOS and Windows only): - * * On macOS: - * ```bash - * codesign --remove-signature hello - * ``` - * * On Windows (optional): - * [signtool](https://learn.microsoft.com/en-us/windows/win32/seccrypto/signtool) can be used from the installed [Windows SDK](https://developer.microsoft.com/en-us/windows/downloads/windows-sdk/). - * If this step is - * skipped, ignore any signature-related warning from postject. - * ```powershell - * signtool remove /s hello.exe - * ``` - * 6. Inject the blob into the copied binary by running `postject` with - * the following options: - * * `hello` / `hello.exe` \- The name of the copy of the `node` executable - * created in step 4. - * * `NODE_SEA_BLOB` \- The name of the resource / note / section in the binary - * where the contents of the blob will be stored. - * * `sea-prep.blob` \- The name of the blob created in step 1. - * * `--sentinel-fuse NODE_SEA_FUSE_fce680ab2cc467b6e072b8b5df1996b2` \- The [fuse](https://www.electronjs.org/docs/latest/tutorial/fuses) used by the Node.js project to detect if a file has been - * injected. - * * `--macho-segment-name NODE_SEA` (only needed on macOS) - The name of the - * segment in the binary where the contents of the blob will be - * stored. - * To summarize, here is the required command for each platform: - * * On Linux: - * ```bash - * npx postject hello NODE_SEA_BLOB sea-prep.blob \ - * --sentinel-fuse NODE_SEA_FUSE_fce680ab2cc467b6e072b8b5df1996b2 - * ``` - * * On Windows - PowerShell: - * ```powershell - * npx postject hello.exe NODE_SEA_BLOB sea-prep.blob ` - * --sentinel-fuse NODE_SEA_FUSE_fce680ab2cc467b6e072b8b5df1996b2 - * ``` - * * On Windows - Command Prompt: - * ```text - * npx postject hello.exe NODE_SEA_BLOB sea-prep.blob ^ - * --sentinel-fuse NODE_SEA_FUSE_fce680ab2cc467b6e072b8b5df1996b2 - * ``` - * * On macOS: - * ```bash - * npx postject hello NODE_SEA_BLOB sea-prep.blob \ - * --sentinel-fuse NODE_SEA_FUSE_fce680ab2cc467b6e072b8b5df1996b2 \ - * --macho-segment-name NODE_SEA - * ``` - * 7. Sign the binary (macOS and Windows only): - * * On macOS: - * ```bash - * codesign --sign - hello - * ``` - * * On Windows (optional): - * A certificate needs to be present for this to work. However, the unsigned - * binary would still be runnable. - * ```powershell - * signtool sign /fd SHA256 hello.exe - * ``` - * 8. Run the binary: - * * On systems other than Windows - * ```console - * $ ./hello world - * Hello, world! - * ``` - * * On Windows - * ```console - * $ .\hello.exe world - * Hello, world! - * ``` - * @since v19.7.0, v18.16.0 - * @experimental - * @see [source](https://github.com/nodejs/node/blob/v25.x/src/node_sea.cc) - */ -declare module "node:sea" { - type AssetKey = string; - /** - * @since v20.12.0 - * @return Whether this script is running inside a single-executable application. - */ - function isSea(): boolean; - /** - * This method can be used to retrieve the assets configured to be bundled into the - * single-executable application at build time. - * An error is thrown when no matching asset can be found. - * @since v20.12.0 - */ - function getAsset(key: AssetKey): ArrayBuffer; - function getAsset(key: AssetKey, encoding: string): string; - /** - * Similar to `sea.getAsset()`, but returns the result in a [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob). - * An error is thrown when no matching asset can be found. - * @since v20.12.0 - */ - function getAssetAsBlob(key: AssetKey, options?: { - type: string; - }): Blob; - /** - * This method can be used to retrieve the assets configured to be bundled into the - * single-executable application at build time. - * An error is thrown when no matching asset can be found. - * - * Unlike `sea.getRawAsset()` or `sea.getAssetAsBlob()`, this method does not - * return a copy. Instead, it returns the raw asset bundled inside the executable. - * - * For now, users should avoid writing to the returned array buffer. If the - * injected section is not marked as writable or not aligned properly, - * writes to the returned array buffer is likely to result in a crash. - * @since v20.12.0 - */ - function getRawAsset(key: AssetKey): ArrayBuffer; - /** - * This method can be used to retrieve an array of all the keys of assets - * embedded into the single-executable application. - * An error is thrown when not running inside a single-executable application. - * @since v24.8.0 - * @returns An array containing all the keys of the assets - * embedded in the executable. If no assets are embedded, returns an empty array. - */ - function getAssetKeys(): string[]; -} diff --git a/PBandGraphScaffold/node_modules/@types/node/sqlite.d.ts b/PBandGraphScaffold/node_modules/@types/node/sqlite.d.ts deleted file mode 100644 index 76e585f..0000000 --- a/PBandGraphScaffold/node_modules/@types/node/sqlite.d.ts +++ /dev/null @@ -1,937 +0,0 @@ -/** - * The `node:sqlite` module facilitates working with SQLite databases. - * To access it: - * - * ```js - * import sqlite from 'node:sqlite'; - * ``` - * - * This module is only available under the `node:` scheme. The following will not - * work: - * - * ```js - * import sqlite from 'sqlite'; - * ``` - * - * The following example shows the basic usage of the `node:sqlite` module to open - * an in-memory database, write data to the database, and then read the data back. - * - * ```js - * import { DatabaseSync } from 'node:sqlite'; - * const database = new DatabaseSync(':memory:'); - * - * // Execute SQL statements from strings. - * database.exec(` - * CREATE TABLE data( - * key INTEGER PRIMARY KEY, - * value TEXT - * ) STRICT - * `); - * // Create a prepared statement to insert data into the database. - * const insert = database.prepare('INSERT INTO data (key, value) VALUES (?, ?)'); - * // Execute the prepared statement with bound values. - * insert.run(1, 'hello'); - * insert.run(2, 'world'); - * // Create a prepared statement to read data from the database. - * const query = database.prepare('SELECT * FROM data ORDER BY key'); - * // Execute the prepared statement and log the result set. - * console.log(query.all()); - * // Prints: [ { key: 1, value: 'hello' }, { key: 2, value: 'world' } ] - * ``` - * @since v22.5.0 - * @experimental - * @see [source](https://github.com/nodejs/node/blob/v25.x/lib/sqlite.js) - */ -declare module "node:sqlite" { - import { PathLike } from "node:fs"; - type SQLInputValue = null | number | bigint | string | NodeJS.ArrayBufferView; - type SQLOutputValue = null | number | bigint | string | NodeJS.NonSharedUint8Array; - interface DatabaseSyncOptions { - /** - * If `true`, the database is opened by the constructor. When - * this value is `false`, the database must be opened via the `open()` method. - * @since v22.5.0 - * @default true - */ - open?: boolean | undefined; - /** - * If `true`, foreign key constraints - * are enabled. This is recommended but can be disabled for compatibility with - * legacy database schemas. The enforcement of foreign key constraints can be - * enabled and disabled after opening the database using - * [`PRAGMA foreign_keys`](https://www.sqlite.org/pragma.html#pragma_foreign_keys). - * @since v22.10.0 - * @default true - */ - enableForeignKeyConstraints?: boolean | undefined; - /** - * If `true`, SQLite will accept - * [double-quoted string literals](https://www.sqlite.org/quirks.html#dblquote). - * This is not recommended but can be - * enabled for compatibility with legacy database schemas. - * @since v22.10.0 - * @default false - */ - enableDoubleQuotedStringLiterals?: boolean | undefined; - /** - * If `true`, the database is opened in read-only mode. - * If the database does not exist, opening it will fail. - * @since v22.12.0 - * @default false - */ - readOnly?: boolean | undefined; - /** - * If `true`, the `loadExtension` SQL function - * and the `loadExtension()` method are enabled. - * You can call `enableLoadExtension(false)` later to disable this feature. - * @since v22.13.0 - * @default false - */ - allowExtension?: boolean | undefined; - /** - * The [busy timeout](https://sqlite.org/c3ref/busy_timeout.html) in milliseconds. This is the maximum amount of - * time that SQLite will wait for a database lock to be released before - * returning an error. - * @since v24.0.0 - * @default 0 - */ - timeout?: number | undefined; - /** - * If `true`, integer fields are read as JavaScript `BigInt` values. If `false`, - * integer fields are read as JavaScript numbers. - * @since v24.4.0 - * @default false - */ - readBigInts?: boolean | undefined; - /** - * If `true`, query results are returned as arrays instead of objects. - * @since v24.4.0 - * @default false - */ - returnArrays?: boolean | undefined; - /** - * If `true`, allows binding named parameters without the prefix - * character (e.g., `foo` instead of `:foo`). - * @since v24.4.40 - * @default true - */ - allowBareNamedParameters?: boolean | undefined; - /** - * If `true`, unknown named parameters are ignored when binding. - * If `false`, an exception is thrown for unknown named parameters. - * @since v24.4.40 - * @default false - */ - allowUnknownNamedParameters?: boolean | undefined; - } - interface CreateSessionOptions { - /** - * A specific table to track changes for. By default, changes to all tables are tracked. - * @since v22.12.0 - */ - table?: string | undefined; - /** - * Name of the database to track. This is useful when multiple databases have been added using - * [`ATTACH DATABASE`](https://www.sqlite.org/lang_attach.html). - * @since v22.12.0 - * @default 'main' - */ - db?: string | undefined; - } - interface ApplyChangesetOptions { - /** - * Skip changes that, when targeted table name is supplied to this function, return a truthy value. - * By default, all changes are attempted. - * @since v22.12.0 - */ - filter?: ((tableName: string) => boolean) | undefined; - /** - * A function that determines how to handle conflicts. The function receives one argument, - * which can be one of the following values: - * - * * `SQLITE_CHANGESET_DATA`: A `DELETE` or `UPDATE` change does not contain the expected "before" values. - * * `SQLITE_CHANGESET_NOTFOUND`: A row matching the primary key of the `DELETE` or `UPDATE` change does not exist. - * * `SQLITE_CHANGESET_CONFLICT`: An `INSERT` change results in a duplicate primary key. - * * `SQLITE_CHANGESET_FOREIGN_KEY`: Applying a change would result in a foreign key violation. - * * `SQLITE_CHANGESET_CONSTRAINT`: Applying a change results in a `UNIQUE`, `CHECK`, or `NOT NULL` constraint - * violation. - * - * The function should return one of the following values: - * - * * `SQLITE_CHANGESET_OMIT`: Omit conflicting changes. - * * `SQLITE_CHANGESET_REPLACE`: Replace existing values with conflicting changes (only valid with - `SQLITE_CHANGESET_DATA` or `SQLITE_CHANGESET_CONFLICT` conflicts). - * * `SQLITE_CHANGESET_ABORT`: Abort on conflict and roll back the database. - * - * When an error is thrown in the conflict handler or when any other value is returned from the handler, - * applying the changeset is aborted and the database is rolled back. - * - * **Default**: A function that returns `SQLITE_CHANGESET_ABORT`. - * @since v22.12.0 - */ - onConflict?: ((conflictType: number) => number) | undefined; - } - interface FunctionOptions { - /** - * If `true`, the [`SQLITE_DETERMINISTIC`](https://www.sqlite.org/c3ref/c_deterministic.html) flag is - * set on the created function. - * @default false - */ - deterministic?: boolean | undefined; - /** - * If `true`, the [`SQLITE_DIRECTONLY`](https://www.sqlite.org/c3ref/c_directonly.html) flag is set on - * the created function. - * @default false - */ - directOnly?: boolean | undefined; - /** - * If `true`, integer arguments to `function` - * are converted to `BigInt`s. If `false`, integer arguments are passed as - * JavaScript numbers. - * @default false - */ - useBigIntArguments?: boolean | undefined; - /** - * If `true`, `function` may be invoked with any number of - * arguments (between zero and - * [`SQLITE_MAX_FUNCTION_ARG`](https://www.sqlite.org/limits.html#max_function_arg)). If `false`, - * `function` must be invoked with exactly `function.length` arguments. - * @default false - */ - varargs?: boolean | undefined; - } - interface AggregateOptions extends FunctionOptions { - /** - * The identity value for the aggregation function. This value is used when the aggregation - * function is initialized. When a `Function` is passed the identity will be its return value. - */ - start: T | (() => T); - /** - * The function to call for each row in the aggregation. The - * function receives the current state and the row value. The return value of - * this function should be the new state. - */ - step: (accumulator: T, ...args: SQLOutputValue[]) => T; - /** - * The function to call to get the result of the - * aggregation. The function receives the final state and should return the - * result of the aggregation. - */ - result?: ((accumulator: T) => SQLInputValue) | undefined; - /** - * When this function is provided, the `aggregate` method will work as a window function. - * The function receives the current state and the dropped row value. The return value of this function should be the - * new state. - */ - inverse?: ((accumulator: T, ...args: SQLOutputValue[]) => T) | undefined; - } - /** - * This class represents a single [connection](https://www.sqlite.org/c3ref/sqlite3.html) to a SQLite database. All APIs - * exposed by this class execute synchronously. - * @since v22.5.0 - */ - class DatabaseSync implements Disposable { - /** - * Constructs a new `DatabaseSync` instance. - * @param path The path of the database. - * A SQLite database can be stored in a file or completely [in memory](https://www.sqlite.org/inmemorydb.html). - * To use a file-backed database, the path should be a file path. - * To use an in-memory database, the path should be the special name `':memory:'`. - * @param options Configuration options for the database connection. - */ - constructor(path: PathLike, options?: DatabaseSyncOptions); - /** - * Registers a new aggregate function with the SQLite database. This method is a wrapper around - * [`sqlite3_create_window_function()`](https://www.sqlite.org/c3ref/create_function.html). - * - * When used as a window function, the `result` function will be called multiple times. - * - * ```js - * import { DatabaseSync } from 'node:sqlite'; - * - * const db = new DatabaseSync(':memory:'); - * db.exec(` - * CREATE TABLE t3(x, y); - * INSERT INTO t3 VALUES ('a', 4), - * ('b', 5), - * ('c', 3), - * ('d', 8), - * ('e', 1); - * `); - * - * db.aggregate('sumint', { - * start: 0, - * step: (acc, value) => acc + value, - * }); - * - * db.prepare('SELECT sumint(y) as total FROM t3').get(); // { total: 21 } - * ``` - * @since v24.0.0 - * @param name The name of the SQLite function to create. - * @param options Function configuration settings. - */ - aggregate(name: string, options: AggregateOptions): void; - aggregate(name: string, options: AggregateOptions): void; - /** - * Closes the database connection. An exception is thrown if the database is not - * open. This method is a wrapper around [`sqlite3_close_v2()`](https://www.sqlite.org/c3ref/close.html). - * @since v22.5.0 - */ - close(): void; - /** - * Loads a shared library into the database connection. This method is a wrapper - * around [`sqlite3_load_extension()`](https://www.sqlite.org/c3ref/load_extension.html). It is required to enable the - * `allowExtension` option when constructing the `DatabaseSync` instance. - * @since v22.13.0 - * @param path The path to the shared library to load. - */ - loadExtension(path: string): void; - /** - * Enables or disables the `loadExtension` SQL function, and the `loadExtension()` - * method. When `allowExtension` is `false` when constructing, you cannot enable - * loading extensions for security reasons. - * @since v22.13.0 - * @param allow Whether to allow loading extensions. - */ - enableLoadExtension(allow: boolean): void; - /** - * This method is a wrapper around [`sqlite3_db_filename()`](https://sqlite.org/c3ref/db_filename.html) - * @since v24.0.0 - * @param dbName Name of the database. This can be `'main'` (the default primary database) or any other - * database that has been added with [`ATTACH DATABASE`](https://www.sqlite.org/lang_attach.html) **Default:** `'main'`. - * @returns The location of the database file. When using an in-memory database, - * this method returns null. - */ - location(dbName?: string): string | null; - /** - * This method allows one or more SQL statements to be executed without returning - * any results. This method is useful when executing SQL statements read from a - * file. This method is a wrapper around [`sqlite3_exec()`](https://www.sqlite.org/c3ref/exec.html). - * @since v22.5.0 - * @param sql A SQL string to execute. - */ - exec(sql: string): void; - /** - * This method is used to create SQLite user-defined functions. This method is a - * wrapper around [`sqlite3_create_function_v2()`](https://www.sqlite.org/c3ref/create_function.html). - * @since v22.13.0 - * @param name The name of the SQLite function to create. - * @param options Optional configuration settings for the function. - * @param func The JavaScript function to call when the SQLite - * function is invoked. The return value of this function should be a valid - * SQLite data type: see - * [Type conversion between JavaScript and SQLite](https://nodejs.org/docs/latest-v25.x/api/sqlite.html#type-conversion-between-javascript-and-sqlite). - * The result defaults to `NULL` if the return value is `undefined`. - */ - function( - name: string, - options: FunctionOptions, - func: (...args: SQLOutputValue[]) => SQLInputValue, - ): void; - function(name: string, func: (...args: SQLOutputValue[]) => SQLInputValue): void; - /** - * Sets an authorizer callback that SQLite will invoke whenever it attempts to - * access data or modify the database schema through prepared statements. - * This can be used to implement security policies, audit access, or restrict certain operations. - * This method is a wrapper around [`sqlite3_set_authorizer()`](https://sqlite.org/c3ref/set_authorizer.html). - * - * When invoked, the callback receives five arguments: - * - * * `actionCode` {number} The type of operation being performed (e.g., - * `SQLITE_INSERT`, `SQLITE_UPDATE`, `SQLITE_SELECT`). - * * `arg1` {string|null} The first argument (context-dependent, often a table name). - * * `arg2` {string|null} The second argument (context-dependent, often a column name). - * * `dbName` {string|null} The name of the database. - * * `triggerOrView` {string|null} The name of the trigger or view causing the access. - * - * The callback must return one of the following constants: - * - * * `SQLITE_OK` - Allow the operation. - * * `SQLITE_DENY` - Deny the operation (causes an error). - * * `SQLITE_IGNORE` - Ignore the operation (silently skip). - * - * ```js - * import { DatabaseSync, constants } from 'node:sqlite'; - * const db = new DatabaseSync(':memory:'); - * - * // Set up an authorizer that denies all table creation - * db.setAuthorizer((actionCode) => { - * if (actionCode === constants.SQLITE_CREATE_TABLE) { - * return constants.SQLITE_DENY; - * } - * return constants.SQLITE_OK; - * }); - * - * // This will work - * db.prepare('SELECT 1').get(); - * - * // This will throw an error due to authorization denial - * try { - * db.exec('CREATE TABLE blocked (id INTEGER)'); - * } catch (err) { - * console.log('Operation blocked:', err.message); - * } - * ``` - * @since v24.10.0 - * @param callback The authorizer function to set, or `null` to - * clear the current authorizer. - */ - setAuthorizer( - callback: - | (( - actionCode: number, - arg1: string | null, - arg2: string | null, - dbName: string | null, - triggerOrView: string | null, - ) => number) - | null, - ): void; - /** - * Whether the database is currently open or not. - * @since v22.15.0 - */ - readonly isOpen: boolean; - /** - * Whether the database is currently within a transaction. This method - * is a wrapper around [`sqlite3_get_autocommit()`](https://sqlite.org/c3ref/get_autocommit.html). - * @since v24.0.0 - */ - readonly isTransaction: boolean; - /** - * Opens the database specified in the `path` argument of the `DatabaseSync`constructor. This method should only be used when the database is not opened via - * the constructor. An exception is thrown if the database is already open. - * @since v22.5.0 - */ - open(): void; - /** - * Compiles a SQL statement into a [prepared statement](https://www.sqlite.org/c3ref/stmt.html). This method is a wrapper - * around [`sqlite3_prepare_v2()`](https://www.sqlite.org/c3ref/prepare.html). - * @since v22.5.0 - * @param sql A SQL string to compile to a prepared statement. - * @return The prepared statement. - */ - prepare(sql: string): StatementSync; - /** - * Creates a new `SQLTagStore`, which is an LRU (Least Recently Used) cache for - * storing prepared statements. This allows for the efficient reuse of prepared - * statements by tagging them with a unique identifier. - * - * When a tagged SQL literal is executed, the `SQLTagStore` checks if a prepared - * statement for that specific SQL string already exists in the cache. If it does, - * the cached statement is used. If not, a new prepared statement is created, - * executed, and then stored in the cache for future use. This mechanism helps to - * avoid the overhead of repeatedly parsing and preparing the same SQL statements. - * - * ```js - * import { DatabaseSync } from 'node:sqlite'; - * - * const db = new DatabaseSync(':memory:'); - * const sql = db.createSQLTagStore(); - * - * db.exec('CREATE TABLE users (id INT, name TEXT)'); - * - * // Using the 'run' method to insert data. - * // The tagged literal is used to identify the prepared statement. - * sql.run`INSERT INTO users VALUES (1, 'Alice')`; - * sql.run`INSERT INTO users VALUES (2, 'Bob')`; - * - * // Using the 'get' method to retrieve a single row. - * const id = 1; - * const user = sql.get`SELECT * FROM users WHERE id = ${id}`; - * console.log(user); // { id: 1, name: 'Alice' } - * - * // Using the 'all' method to retrieve all rows. - * const allUsers = sql.all`SELECT * FROM users ORDER BY id`; - * console.log(allUsers); - * // [ - * // { id: 1, name: 'Alice' }, - * // { id: 2, name: 'Bob' } - * // ] - * ``` - * @since v24.9.0 - * @returns A new SQL tag store for caching prepared statements. - */ - createTagStore(maxSize?: number): SQLTagStore; - /** - * Creates and attaches a session to the database. This method is a wrapper around - * [`sqlite3session_create()`](https://www.sqlite.org/session/sqlite3session_create.html) and - * [`sqlite3session_attach()`](https://www.sqlite.org/session/sqlite3session_attach.html). - * @param options The configuration options for the session. - * @returns A session handle. - * @since v22.12.0 - */ - createSession(options?: CreateSessionOptions): Session; - /** - * An exception is thrown if the database is not - * open. This method is a wrapper around - * [`sqlite3changeset_apply()`](https://www.sqlite.org/session/sqlite3changeset_apply.html). - * - * ```js - * const sourceDb = new DatabaseSync(':memory:'); - * const targetDb = new DatabaseSync(':memory:'); - * - * sourceDb.exec('CREATE TABLE data(key INTEGER PRIMARY KEY, value TEXT)'); - * targetDb.exec('CREATE TABLE data(key INTEGER PRIMARY KEY, value TEXT)'); - * - * const session = sourceDb.createSession(); - * - * const insert = sourceDb.prepare('INSERT INTO data (key, value) VALUES (?, ?)'); - * insert.run(1, 'hello'); - * insert.run(2, 'world'); - * - * const changeset = session.changeset(); - * targetDb.applyChangeset(changeset); - * // Now that the changeset has been applied, targetDb contains the same data as sourceDb. - * ``` - * @param changeset A binary changeset or patchset. - * @param options The configuration options for how the changes will be applied. - * @returns Whether the changeset was applied successfully without being aborted. - * @since v22.12.0 - */ - applyChangeset(changeset: Uint8Array, options?: ApplyChangesetOptions): boolean; - /** - * Closes the database connection. If the database connection is already closed - * then this is a no-op. - * @since v22.15.0 - */ - [Symbol.dispose](): void; - } - /** - * @since v22.12.0 - */ - interface Session { - /** - * Retrieves a changeset containing all changes since the changeset was created. Can be called multiple times. - * An exception is thrown if the database or the session is not open. This method is a wrapper around - * [`sqlite3session_changeset()`](https://www.sqlite.org/session/sqlite3session_changeset.html). - * @returns Binary changeset that can be applied to other databases. - * @since v22.12.0 - */ - changeset(): NodeJS.NonSharedUint8Array; - /** - * Similar to the method above, but generates a more compact patchset. See - * [Changesets and Patchsets](https://www.sqlite.org/sessionintro.html#changesets_and_patchsets) - * in the documentation of SQLite. An exception is thrown if the database or the session is not open. This method is a - * wrapper around - * [`sqlite3session_patchset()`](https://www.sqlite.org/session/sqlite3session_patchset.html). - * @returns Binary patchset that can be applied to other databases. - * @since v22.12.0 - */ - patchset(): NodeJS.NonSharedUint8Array; - /** - * Closes the session. An exception is thrown if the database or the session is not open. This method is a - * wrapper around - * [`sqlite3session_delete()`](https://www.sqlite.org/session/sqlite3session_delete.html). - */ - close(): void; - } - /** - * This class represents a single LRU (Least Recently Used) cache for storing - * prepared statements. - * - * Instances of this class are created via the database.createSQLTagStore() method, - * not by using a constructor. The store caches prepared statements based on the - * provided SQL query string. When the same query is seen again, the store - * retrieves the cached statement and safely applies the new values through - * parameter binding, thereby preventing attacks like SQL injection. - * - * The cache has a maxSize that defaults to 1000 statements, but a custom size can - * be provided (e.g., database.createSQLTagStore(100)). All APIs exposed by this - * class execute synchronously. - * @since v24.9.0 - */ - interface SQLTagStore { - /** - * Executes the given SQL query and returns all resulting rows as an array of objects. - * @since v24.9.0 - */ - all( - stringElements: TemplateStringsArray, - ...boundParameters: SQLInputValue[] - ): Record[]; - /** - * Executes the given SQL query and returns the first resulting row as an object. - * @since v24.9.0 - */ - get( - stringElements: TemplateStringsArray, - ...boundParameters: SQLInputValue[] - ): Record | undefined; - /** - * Executes the given SQL query and returns an iterator over the resulting rows. - * @since v24.9.0 - */ - iterate( - stringElements: TemplateStringsArray, - ...boundParameters: SQLInputValue[] - ): NodeJS.Iterator>; - /** - * Executes the given SQL query, which is expected to not return any rows (e.g., INSERT, UPDATE, DELETE). - * @since v24.9.0 - */ - run(stringElements: TemplateStringsArray, ...boundParameters: SQLInputValue[]): StatementResultingChanges; - /** - * A read-only property that returns the number of prepared statements currently in the cache. - * @since v24.9.0 - * @returns The maximum number of prepared statements the cache can hold. - */ - size(): number; - /** - * A read-only property that returns the maximum number of prepared statements the cache can hold. - * @since v24.9.0 - */ - readonly capacity: number; - /** - * A read-only property that returns the `DatabaseSync` object associated with this `SQLTagStore`. - * @since v24.9.0 - */ - readonly db: DatabaseSync; - /** - * Resets the LRU cache, clearing all stored prepared statements. - * @since v24.9.0 - */ - clear(): void; - } - interface StatementColumnMetadata { - /** - * The unaliased name of the column in the origin - * table, or `null` if the column is the result of an expression or subquery. - * This property is the result of [`sqlite3_column_origin_name()`](https://www.sqlite.org/c3ref/column_database_name.html). - */ - column: string | null; - /** - * The unaliased name of the origin database, or - * `null` if the column is the result of an expression or subquery. This - * property is the result of [`sqlite3_column_database_name()`](https://www.sqlite.org/c3ref/column_database_name.html). - */ - database: string | null; - /** - * The name assigned to the column in the result set of a - * `SELECT` statement. This property is the result of - * [`sqlite3_column_name()`](https://www.sqlite.org/c3ref/column_name.html). - */ - name: string; - /** - * The unaliased name of the origin table, or `null` if - * the column is the result of an expression or subquery. This property is the - * result of [`sqlite3_column_table_name()`](https://www.sqlite.org/c3ref/column_database_name.html). - */ - table: string | null; - /** - * The declared data type of the column, or `null` if the - * column is the result of an expression or subquery. This property is the - * result of [`sqlite3_column_decltype()`](https://www.sqlite.org/c3ref/column_decltype.html). - */ - type: string | null; - } - interface StatementResultingChanges { - /** - * The number of rows modified, inserted, or deleted by the most recently completed `INSERT`, `UPDATE`, or `DELETE` statement. - * This field is either a number or a `BigInt` depending on the prepared statement's configuration. - * This property is the result of [`sqlite3_changes64()`](https://www.sqlite.org/c3ref/changes.html). - */ - changes: number | bigint; - /** - * The most recently inserted rowid. - * This field is either a number or a `BigInt` depending on the prepared statement's configuration. - * This property is the result of [`sqlite3_last_insert_rowid()`](https://www.sqlite.org/c3ref/last_insert_rowid.html). - */ - lastInsertRowid: number | bigint; - } - /** - * This class represents a single [prepared statement](https://www.sqlite.org/c3ref/stmt.html). This class cannot be - * instantiated via its constructor. Instead, instances are created via the`database.prepare()` method. All APIs exposed by this class execute - * synchronously. - * - * A prepared statement is an efficient binary representation of the SQL used to - * create it. Prepared statements are parameterizable, and can be invoked multiple - * times with different bound values. Parameters also offer protection against [SQL injection](https://en.wikipedia.org/wiki/SQL_injection) attacks. For these reasons, prepared statements are - * preferred - * over hand-crafted SQL strings when handling user input. - * @since v22.5.0 - */ - class StatementSync { - private constructor(); - /** - * This method executes a prepared statement and returns all results as an array of - * objects. If the prepared statement does not return any results, this method - * returns an empty array. The prepared statement [parameters are bound](https://www.sqlite.org/c3ref/bind_blob.html) using - * the values in `namedParameters` and `anonymousParameters`. - * @since v22.5.0 - * @param namedParameters An optional object used to bind named parameters. The keys of this object are used to configure the mapping. - * @param anonymousParameters Zero or more values to bind to anonymous parameters. - * @return An array of objects. Each object corresponds to a row returned by executing the prepared statement. The keys and values of each object correspond to the column names and values of - * the row. - */ - all(...anonymousParameters: SQLInputValue[]): Record[]; - all( - namedParameters: Record, - ...anonymousParameters: SQLInputValue[] - ): Record[]; - /** - * This method is used to retrieve information about the columns returned by the - * prepared statement. - * @since v23.11.0 - * @returns An array of objects. Each object corresponds to a column - * in the prepared statement, and contains the following properties: - */ - columns(): StatementColumnMetadata[]; - /** - * The source SQL text of the prepared statement with parameter - * placeholders replaced by the values that were used during the most recent - * execution of this prepared statement. This property is a wrapper around - * [`sqlite3_expanded_sql()`](https://www.sqlite.org/c3ref/expanded_sql.html). - * @since v22.5.0 - */ - readonly expandedSQL: string; - /** - * This method executes a prepared statement and returns the first result as an - * object. If the prepared statement does not return any results, this method - * returns `undefined`. The prepared statement [parameters are bound](https://www.sqlite.org/c3ref/bind_blob.html) using the - * values in `namedParameters` and `anonymousParameters`. - * @since v22.5.0 - * @param namedParameters An optional object used to bind named parameters. The keys of this object are used to configure the mapping. - * @param anonymousParameters Zero or more values to bind to anonymous parameters. - * @return An object corresponding to the first row returned by executing the prepared statement. The keys and values of the object correspond to the column names and values of the row. If no - * rows were returned from the database then this method returns `undefined`. - */ - get(...anonymousParameters: SQLInputValue[]): Record | undefined; - get( - namedParameters: Record, - ...anonymousParameters: SQLInputValue[] - ): Record | undefined; - /** - * This method executes a prepared statement and returns an iterator of - * objects. If the prepared statement does not return any results, this method - * returns an empty iterator. The prepared statement [parameters are bound](https://www.sqlite.org/c3ref/bind_blob.html) using - * the values in `namedParameters` and `anonymousParameters`. - * @since v22.13.0 - * @param namedParameters An optional object used to bind named parameters. - * The keys of this object are used to configure the mapping. - * @param anonymousParameters Zero or more values to bind to anonymous parameters. - * @returns An iterable iterator of objects. Each object corresponds to a row - * returned by executing the prepared statement. The keys and values of each - * object correspond to the column names and values of the row. - */ - iterate(...anonymousParameters: SQLInputValue[]): NodeJS.Iterator>; - iterate( - namedParameters: Record, - ...anonymousParameters: SQLInputValue[] - ): NodeJS.Iterator>; - /** - * This method executes a prepared statement and returns an object summarizing the - * resulting changes. The prepared statement [parameters are bound](https://www.sqlite.org/c3ref/bind_blob.html) using the - * values in `namedParameters` and `anonymousParameters`. - * @since v22.5.0 - * @param namedParameters An optional object used to bind named parameters. The keys of this object are used to configure the mapping. - * @param anonymousParameters Zero or more values to bind to anonymous parameters. - */ - run(...anonymousParameters: SQLInputValue[]): StatementResultingChanges; - run( - namedParameters: Record, - ...anonymousParameters: SQLInputValue[] - ): StatementResultingChanges; - /** - * The names of SQLite parameters begin with a prefix character. By default,`node:sqlite` requires that this prefix character is present when binding - * parameters. However, with the exception of dollar sign character, these - * prefix characters also require extra quoting when used in object keys. - * - * To improve ergonomics, this method can be used to also allow bare named - * parameters, which do not require the prefix character in JavaScript code. There - * are several caveats to be aware of when enabling bare named parameters: - * - * * The prefix character is still required in SQL. - * * The prefix character is still allowed in JavaScript. In fact, prefixed names - * will have slightly better binding performance. - * * Using ambiguous named parameters, such as `$k` and `@k`, in the same prepared - * statement will result in an exception as it cannot be determined how to bind - * a bare name. - * @since v22.5.0 - * @param enabled Enables or disables support for binding named parameters without the prefix character. - */ - setAllowBareNamedParameters(enabled: boolean): void; - /** - * By default, if an unknown name is encountered while binding parameters, an - * exception is thrown. This method allows unknown named parameters to be ignored. - * @since v22.15.0 - * @param enabled Enables or disables support for unknown named parameters. - */ - setAllowUnknownNamedParameters(enabled: boolean): void; - /** - * When enabled, query results returned by the `all()`, `get()`, and `iterate()` methods will be returned as arrays instead - * of objects. - * @since v24.0.0 - * @param enabled Enables or disables the return of query results as arrays. - */ - setReturnArrays(enabled: boolean): void; - /** - * When reading from the database, SQLite `INTEGER`s are mapped to JavaScript - * numbers by default. However, SQLite `INTEGER`s can store values larger than - * JavaScript numbers are capable of representing. In such cases, this method can - * be used to read `INTEGER` data using JavaScript `BigInt`s. This method has no - * impact on database write operations where numbers and `BigInt`s are both - * supported at all times. - * @since v22.5.0 - * @param enabled Enables or disables the use of `BigInt`s when reading `INTEGER` fields from the database. - */ - setReadBigInts(enabled: boolean): void; - /** - * The source SQL text of the prepared statement. This property is a - * wrapper around [`sqlite3_sql()`](https://www.sqlite.org/c3ref/expanded_sql.html). - * @since v22.5.0 - */ - readonly sourceSQL: string; - } - interface BackupOptions { - /** - * Name of the source database. This can be `'main'` (the default primary database) or any other - * database that have been added with [`ATTACH DATABASE`](https://www.sqlite.org/lang_attach.html) - * @default 'main' - */ - source?: string | undefined; - /** - * Name of the target database. This can be `'main'` (the default primary database) or any other - * database that have been added with [`ATTACH DATABASE`](https://www.sqlite.org/lang_attach.html) - * @default 'main' - */ - target?: string | undefined; - /** - * Number of pages to be transmitted in each batch of the backup. - * @default 100 - */ - rate?: number | undefined; - /** - * An optional callback function that will be called after each backup step. The argument passed - * to this callback is an `Object` with `remainingPages` and `totalPages` properties, describing the current progress - * of the backup operation. - */ - progress?: ((progressInfo: BackupProgressInfo) => void) | undefined; - } - interface BackupProgressInfo { - totalPages: number; - remainingPages: number; - } - /** - * This method makes a database backup. This method abstracts the - * [`sqlite3_backup_init()`](https://www.sqlite.org/c3ref/backup_finish.html#sqlite3backupinit), - * [`sqlite3_backup_step()`](https://www.sqlite.org/c3ref/backup_finish.html#sqlite3backupstep) - * and [`sqlite3_backup_finish()`](https://www.sqlite.org/c3ref/backup_finish.html#sqlite3backupfinish) functions. - * - * The backed-up database can be used normally during the backup process. Mutations coming from the same connection - same - * `DatabaseSync` - object will be reflected in the backup right away. However, mutations from other connections will cause - * the backup process to restart. - * - * ```js - * import { backup, DatabaseSync } from 'node:sqlite'; - * - * const sourceDb = new DatabaseSync('source.db'); - * const totalPagesTransferred = await backup(sourceDb, 'backup.db', { - * rate: 1, // Copy one page at a time. - * progress: ({ totalPages, remainingPages }) => { - * console.log('Backup in progress', { totalPages, remainingPages }); - * }, - * }); - * - * console.log('Backup completed', totalPagesTransferred); - * ``` - * @since v23.8.0 - * @param sourceDb The database to backup. The source database must be open. - * @param path The path where the backup will be created. If the file already exists, - * the contents will be overwritten. - * @param options Optional configuration for the backup. The - * following properties are supported: - * @returns A promise that fulfills with the total number of backed-up pages upon completion, or rejects if an - * error occurs. - */ - function backup(sourceDb: DatabaseSync, path: PathLike, options?: BackupOptions): Promise; - /** - * @since v22.13.0 - */ - namespace constants { - /** - * The conflict handler is invoked with this constant when processing a DELETE or UPDATE change if a row with the required PRIMARY KEY fields is present in the database, but one or more other (non primary-key) fields modified by the update do not contain the expected "before" values. - * @since v22.14.0 - */ - const SQLITE_CHANGESET_DATA: number; - /** - * The conflict handler is invoked with this constant when processing a DELETE or UPDATE change if a row with the required PRIMARY KEY fields is not present in the database. - * @since v22.14.0 - */ - const SQLITE_CHANGESET_NOTFOUND: number; - /** - * This constant is passed to the conflict handler while processing an INSERT change if the operation would result in duplicate primary key values. - * @since v22.14.0 - */ - const SQLITE_CHANGESET_CONFLICT: number; - /** - * If foreign key handling is enabled, and applying a changeset leaves the database in a state containing foreign key violations, the conflict handler is invoked with this constant exactly once before the changeset is committed. If the conflict handler returns `SQLITE_CHANGESET_OMIT`, the changes, including those that caused the foreign key constraint violation, are committed. Or, if it returns `SQLITE_CHANGESET_ABORT`, the changeset is rolled back. - * @since v22.14.0 - */ - const SQLITE_CHANGESET_FOREIGN_KEY: number; - /** - * Conflicting changes are omitted. - * @since v22.12.0 - */ - const SQLITE_CHANGESET_OMIT: number; - /** - * Conflicting changes replace existing values. Note that this value can only be returned when the type of conflict is either `SQLITE_CHANGESET_DATA` or `SQLITE_CHANGESET_CONFLICT`. - * @since v22.12.0 - */ - const SQLITE_CHANGESET_REPLACE: number; - /** - * Abort when a change encounters a conflict and roll back database. - * @since v22.12.0 - */ - const SQLITE_CHANGESET_ABORT: number; - /** - * Deny the operation and cause an error to be returned. - * @since v24.10.0 - */ - const SQLITE_DENY: number; - /** - * Ignore the operation and continue as if it had never been requested. - * @since 24.10.0 - */ - const SQLITE_IGNORE: number; - /** - * Allow the operation to proceed normally. - * @since v24.10.0 - */ - const SQLITE_OK: number; - const SQLITE_CREATE_INDEX: number; - const SQLITE_CREATE_TABLE: number; - const SQLITE_CREATE_TEMP_INDEX: number; - const SQLITE_CREATE_TEMP_TABLE: number; - const SQLITE_CREATE_TEMP_TRIGGER: number; - const SQLITE_CREATE_TEMP_VIEW: number; - const SQLITE_CREATE_TRIGGER: number; - const SQLITE_CREATE_VIEW: number; - const SQLITE_DELETE: number; - const SQLITE_DROP_INDEX: number; - const SQLITE_DROP_TABLE: number; - const SQLITE_DROP_TEMP_INDEX: number; - const SQLITE_DROP_TEMP_TABLE: number; - const SQLITE_DROP_TEMP_TRIGGER: number; - const SQLITE_DROP_TEMP_VIEW: number; - const SQLITE_DROP_TRIGGER: number; - const SQLITE_DROP_VIEW: number; - const SQLITE_INSERT: number; - const SQLITE_PRAGMA: number; - const SQLITE_READ: number; - const SQLITE_SELECT: number; - const SQLITE_TRANSACTION: number; - const SQLITE_UPDATE: number; - const SQLITE_ATTACH: number; - const SQLITE_DETACH: number; - const SQLITE_ALTER_TABLE: number; - const SQLITE_REINDEX: number; - const SQLITE_ANALYZE: number; - const SQLITE_CREATE_VTABLE: number; - const SQLITE_DROP_VTABLE: number; - const SQLITE_FUNCTION: number; - const SQLITE_SAVEPOINT: number; - const SQLITE_COPY: number; - const SQLITE_RECURSIVE: number; - } -} diff --git a/PBandGraphScaffold/node_modules/@types/node/stream.d.ts b/PBandGraphScaffold/node_modules/@types/node/stream.d.ts deleted file mode 100644 index 79ad890..0000000 --- a/PBandGraphScaffold/node_modules/@types/node/stream.d.ts +++ /dev/null @@ -1,1760 +0,0 @@ -/** - * A stream is an abstract interface for working with streaming data in Node.js. - * The `node:stream` module provides an API for implementing the stream interface. - * - * There are many stream objects provided by Node.js. For instance, a [request to an HTTP server](https://nodejs.org/docs/latest-v25.x/api/http.html#class-httpincomingmessage) - * and [`process.stdout`](https://nodejs.org/docs/latest-v25.x/api/process.html#processstdout) are both stream instances. - * - * Streams can be readable, writable, or both. All streams are instances of [`EventEmitter`](https://nodejs.org/docs/latest-v25.x/api/events.html#class-eventemitter). - * - * To access the `node:stream` module: - * - * ```js - * import stream from 'node:stream'; - * ``` - * - * The `node:stream` module is useful for creating new types of stream instances. - * It is usually not necessary to use the `node:stream` module to consume streams. - * @see [source](https://github.com/nodejs/node/blob/v25.x/lib/stream.js) - */ -declare module "node:stream" { - import { Blob } from "node:buffer"; - import { Abortable, EventEmitter } from "node:events"; - import * as promises from "node:stream/promises"; - import * as web from "node:stream/web"; - class Stream extends EventEmitter { - /** - * @since v0.9.4 - */ - pipe( - destination: T, - options?: Stream.PipeOptions, - ): T; - } - namespace Stream { - export { promises, Stream }; - } - namespace Stream { - interface PipeOptions { - /** - * End the writer when the reader ends. - * @default true - */ - end?: boolean | undefined; - } - interface StreamOptions extends Abortable { - emitClose?: boolean | undefined; - highWaterMark?: number | undefined; - objectMode?: boolean | undefined; - construct?: ((this: T, callback: (error?: Error | null) => void) => void) | undefined; - destroy?: ((this: T, error: Error | null, callback: (error?: Error | null) => void) => void) | undefined; - autoDestroy?: boolean | undefined; - } - interface ReadableOptions extends StreamOptions { - encoding?: BufferEncoding | undefined; - read?: ((this: T, size: number) => void) | undefined; - } - interface ReadableIteratorOptions { - /** - * When set to `false`, calling `return` on the async iterator, - * or exiting a `for await...of` iteration using a `break`, - * `return`, or `throw` will not destroy the stream. - * @default true - */ - destroyOnReturn?: boolean | undefined; - } - interface ReadableOperatorOptions extends Abortable { - /** - * The maximum concurrent invocations of `fn` to call - * on the stream at once. - * @default 1 - */ - concurrency?: number | undefined; - /** - * How many items to buffer while waiting for user consumption - * of the output. - * @default concurrency * 2 - 1 - */ - highWaterMark?: number | undefined; - } - /** @deprecated Use `ReadableOperatorOptions` instead. */ - interface ArrayOptions extends ReadableOperatorOptions {} - interface ReadableToWebOptions { - strategy?: web.QueuingStrategy | undefined; - } - interface ReadableEventMap { - "close": []; - "data": [chunk: any]; - "end": []; - "error": [err: Error]; - "pause": []; - "readable": []; - "resume": []; - } - /** - * @since v0.9.4 - */ - class Readable extends Stream implements NodeJS.ReadableStream { - constructor(options?: ReadableOptions); - /** - * A utility method for creating Readable Streams out of iterators. - * @since v12.3.0, v10.17.0 - * @param iterable Object implementing the `Symbol.asyncIterator` or `Symbol.iterator` iterable protocol. Emits an 'error' event if a null value is passed. - * @param options Options provided to `new stream.Readable([options])`. By default, `Readable.from()` will set `options.objectMode` to `true`, unless this is explicitly opted out by setting `options.objectMode` to `false`. - */ - static from(iterable: Iterable | AsyncIterable, options?: ReadableOptions): Readable; - /** - * A utility method for creating a `Readable` from a web `ReadableStream`. - * @since v17.0.0 - */ - static fromWeb( - readableStream: web.ReadableStream, - options?: Pick, - ): Readable; - /** - * A utility method for creating a web `ReadableStream` from a `Readable`. - * @since v17.0.0 - */ - static toWeb( - streamReadable: NodeJS.ReadableStream, - options?: ReadableToWebOptions, - ): web.ReadableStream; - /** - * Returns whether the stream has been read from or cancelled. - * @since v16.8.0 - */ - static isDisturbed(stream: NodeJS.ReadableStream | web.ReadableStream): boolean; - /** - * Returns whether the stream was destroyed or errored before emitting `'end'`. - * @since v16.8.0 - */ - readonly readableAborted: boolean; - /** - * Is `true` if it is safe to call {@link read}, which means - * the stream has not been destroyed or emitted `'error'` or `'end'`. - * @since v11.4.0 - */ - readable: boolean; - /** - * Returns whether `'data'` has been emitted. - * @since v16.7.0, v14.18.0 - */ - readonly readableDidRead: boolean; - /** - * Getter for the property `encoding` of a given `Readable` stream. The `encoding` property can be set using the {@link setEncoding} method. - * @since v12.7.0 - */ - readonly readableEncoding: BufferEncoding | null; - /** - * Becomes `true` when [`'end'`](https://nodejs.org/docs/latest-v25.x/api/stream.html#event-end) event is emitted. - * @since v12.9.0 - */ - readonly readableEnded: boolean; - /** - * This property reflects the current state of a `Readable` stream as described - * in the [Three states](https://nodejs.org/docs/latest-v25.x/api/stream.html#three-states) section. - * @since v9.4.0 - */ - readableFlowing: boolean | null; - /** - * Returns the value of `highWaterMark` passed when creating this `Readable`. - * @since v9.3.0 - */ - readonly readableHighWaterMark: number; - /** - * This property contains the number of bytes (or objects) in the queue - * ready to be read. The value provides introspection data regarding - * the status of the `highWaterMark`. - * @since v9.4.0 - */ - readonly readableLength: number; - /** - * Getter for the property `objectMode` of a given `Readable` stream. - * @since v12.3.0 - */ - readonly readableObjectMode: boolean; - /** - * Is `true` after `readable.destroy()` has been called. - * @since v8.0.0 - */ - destroyed: boolean; - /** - * Is `true` after `'close'` has been emitted. - * @since v18.0.0 - */ - readonly closed: boolean; - /** - * Returns error if the stream has been destroyed with an error. - * @since v18.0.0 - */ - readonly errored: Error | null; - _construct?(callback: (error?: Error | null) => void): void; - _read(size: number): void; - /** - * The `readable.read()` method reads data out of the internal buffer and - * returns it. If no data is available to be read, `null` is returned. By default, - * the data is returned as a `Buffer` object unless an encoding has been - * specified using the `readable.setEncoding()` method or the stream is operating - * in object mode. - * - * The optional `size` argument specifies a specific number of bytes to read. If - * `size` bytes are not available to be read, `null` will be returned _unless_ the - * stream has ended, in which case all of the data remaining in the internal buffer - * will be returned. - * - * If the `size` argument is not specified, all of the data contained in the - * internal buffer will be returned. - * - * The `size` argument must be less than or equal to 1 GiB. - * - * The `readable.read()` method should only be called on `Readable` streams - * operating in paused mode. In flowing mode, `readable.read()` is called - * automatically until the internal buffer is fully drained. - * - * ```js - * const readable = getReadableStreamSomehow(); - * - * // 'readable' may be triggered multiple times as data is buffered in - * readable.on('readable', () => { - * let chunk; - * console.log('Stream is readable (new data received in buffer)'); - * // Use a loop to make sure we read all currently available data - * while (null !== (chunk = readable.read())) { - * console.log(`Read ${chunk.length} bytes of data...`); - * } - * }); - * - * // 'end' will be triggered once when there is no more data available - * readable.on('end', () => { - * console.log('Reached end of stream.'); - * }); - * ``` - * - * Each call to `readable.read()` returns a chunk of data, or `null`. The chunks - * are not concatenated. A `while` loop is necessary to consume all data - * currently in the buffer. When reading a large file `.read()` may return `null`, - * having consumed all buffered content so far, but there is still more data to - * come not yet buffered. In this case a new `'readable'` event will be emitted - * when there is more data in the buffer. Finally the `'end'` event will be - * emitted when there is no more data to come. - * - * Therefore to read a file's whole contents from a `readable`, it is necessary - * to collect chunks across multiple `'readable'` events: - * - * ```js - * const chunks = []; - * - * readable.on('readable', () => { - * let chunk; - * while (null !== (chunk = readable.read())) { - * chunks.push(chunk); - * } - * }); - * - * readable.on('end', () => { - * const content = chunks.join(''); - * }); - * ``` - * - * A `Readable` stream in object mode will always return a single item from - * a call to `readable.read(size)`, regardless of the value of the `size` argument. - * - * If the `readable.read()` method returns a chunk of data, a `'data'` event will - * also be emitted. - * - * Calling {@link read} after the `'end'` event has - * been emitted will return `null`. No runtime error will be raised. - * @since v0.9.4 - * @param size Optional argument to specify how much data to read. - */ - read(size?: number): any; - /** - * The `readable.setEncoding()` method sets the character encoding for - * data read from the `Readable` stream. - * - * By default, no encoding is assigned and stream data will be returned as `Buffer` objects. Setting an encoding causes the stream data - * to be returned as strings of the specified encoding rather than as `Buffer` objects. For instance, calling `readable.setEncoding('utf8')` will cause the - * output data to be interpreted as UTF-8 data, and passed as strings. Calling `readable.setEncoding('hex')` will cause the data to be encoded in hexadecimal - * string format. - * - * The `Readable` stream will properly handle multi-byte characters delivered - * through the stream that would otherwise become improperly decoded if simply - * pulled from the stream as `Buffer` objects. - * - * ```js - * const readable = getReadableStreamSomehow(); - * readable.setEncoding('utf8'); - * readable.on('data', (chunk) => { - * assert.equal(typeof chunk, 'string'); - * console.log('Got %d characters of string data:', chunk.length); - * }); - * ``` - * @since v0.9.4 - * @param encoding The encoding to use. - */ - setEncoding(encoding: BufferEncoding): this; - /** - * The `readable.pause()` method will cause a stream in flowing mode to stop - * emitting `'data'` events, switching out of flowing mode. Any data that - * becomes available will remain in the internal buffer. - * - * ```js - * const readable = getReadableStreamSomehow(); - * readable.on('data', (chunk) => { - * console.log(`Received ${chunk.length} bytes of data.`); - * readable.pause(); - * console.log('There will be no additional data for 1 second.'); - * setTimeout(() => { - * console.log('Now data will start flowing again.'); - * readable.resume(); - * }, 1000); - * }); - * ``` - * - * The `readable.pause()` method has no effect if there is a `'readable'` event listener. - * @since v0.9.4 - */ - pause(): this; - /** - * The `readable.resume()` method causes an explicitly paused `Readable` stream to - * resume emitting `'data'` events, switching the stream into flowing mode. - * - * The `readable.resume()` method can be used to fully consume the data from a - * stream without actually processing any of that data: - * - * ```js - * getReadableStreamSomehow() - * .resume() - * .on('end', () => { - * console.log('Reached the end, but did not read anything.'); - * }); - * ``` - * - * The `readable.resume()` method has no effect if there is a `'readable'` event listener. - * @since v0.9.4 - */ - resume(): this; - /** - * The `readable.isPaused()` method returns the current operating state of the `Readable`. - * This is used primarily by the mechanism that underlies the `readable.pipe()` method. - * In most typical cases, there will be no reason to use this method directly. - * - * ```js - * const readable = new stream.Readable(); - * - * readable.isPaused(); // === false - * readable.pause(); - * readable.isPaused(); // === true - * readable.resume(); - * readable.isPaused(); // === false - * ``` - * @since v0.11.14 - */ - isPaused(): boolean; - /** - * The `readable.unpipe()` method detaches a `Writable` stream previously attached - * using the {@link pipe} method. - * - * If the `destination` is not specified, then _all_ pipes are detached. - * - * If the `destination` is specified, but no pipe is set up for it, then - * the method does nothing. - * - * ```js - * import fs from 'node:fs'; - * const readable = getReadableStreamSomehow(); - * const writable = fs.createWriteStream('file.txt'); - * // All the data from readable goes into 'file.txt', - * // but only for the first second. - * readable.pipe(writable); - * setTimeout(() => { - * console.log('Stop writing to file.txt.'); - * readable.unpipe(writable); - * console.log('Manually close the file stream.'); - * writable.end(); - * }, 1000); - * ``` - * @since v0.9.4 - * @param destination Optional specific stream to unpipe - */ - unpipe(destination?: NodeJS.WritableStream): this; - /** - * Passing `chunk` as `null` signals the end of the stream (EOF) and behaves the - * same as `readable.push(null)`, after which no more data can be written. The EOF - * signal is put at the end of the buffer and any buffered data will still be - * flushed. - * - * The `readable.unshift()` method pushes a chunk of data back into the internal - * buffer. This is useful in certain situations where a stream is being consumed by - * code that needs to "un-consume" some amount of data that it has optimistically - * pulled out of the source, so that the data can be passed on to some other party. - * - * The `stream.unshift(chunk)` method cannot be called after the `'end'` event - * has been emitted or a runtime error will be thrown. - * - * Developers using `stream.unshift()` often should consider switching to - * use of a `Transform` stream instead. See the `API for stream implementers` section for more information. - * - * ```js - * // Pull off a header delimited by \n\n. - * // Use unshift() if we get too much. - * // Call the callback with (error, header, stream). - * import { StringDecoder } from 'node:string_decoder'; - * function parseHeader(stream, callback) { - * stream.on('error', callback); - * stream.on('readable', onReadable); - * const decoder = new StringDecoder('utf8'); - * let header = ''; - * function onReadable() { - * let chunk; - * while (null !== (chunk = stream.read())) { - * const str = decoder.write(chunk); - * if (str.includes('\n\n')) { - * // Found the header boundary. - * const split = str.split(/\n\n/); - * header += split.shift(); - * const remaining = split.join('\n\n'); - * const buf = Buffer.from(remaining, 'utf8'); - * stream.removeListener('error', callback); - * // Remove the 'readable' listener before unshifting. - * stream.removeListener('readable', onReadable); - * if (buf.length) - * stream.unshift(buf); - * // Now the body of the message can be read from the stream. - * callback(null, header, stream); - * return; - * } - * // Still reading the header. - * header += str; - * } - * } - * } - * ``` - * - * Unlike {@link push}, `stream.unshift(chunk)` will not - * end the reading process by resetting the internal reading state of the stream. - * This can cause unexpected results if `readable.unshift()` is called during a - * read (i.e. from within a {@link _read} implementation on a - * custom stream). Following the call to `readable.unshift()` with an immediate {@link push} will reset the reading state appropriately, - * however it is best to simply avoid calling `readable.unshift()` while in the - * process of performing a read. - * @since v0.9.11 - * @param chunk Chunk of data to unshift onto the read queue. For streams not operating in object mode, `chunk` must - * be a {string}, {Buffer}, {TypedArray}, {DataView} or `null`. For object mode streams, `chunk` may be any JavaScript value. - * @param encoding Encoding of string chunks. Must be a valid `Buffer` encoding, such as `'utf8'` or `'ascii'`. - */ - unshift(chunk: any, encoding?: BufferEncoding): void; - /** - * Prior to Node.js 0.10, streams did not implement the entire `node:stream` module API as it is currently defined. (See `Compatibility` for more - * information.) - * - * When using an older Node.js library that emits `'data'` events and has a {@link pause} method that is advisory only, the `readable.wrap()` method can be used to create a `Readable` - * stream that uses - * the old stream as its data source. - * - * It will rarely be necessary to use `readable.wrap()` but the method has been - * provided as a convenience for interacting with older Node.js applications and - * libraries. - * - * ```js - * import { OldReader } from './old-api-module.js'; - * import { Readable } from 'node:stream'; - * const oreader = new OldReader(); - * const myReader = new Readable().wrap(oreader); - * - * myReader.on('readable', () => { - * myReader.read(); // etc. - * }); - * ``` - * @since v0.9.4 - * @param stream An "old style" readable stream - */ - wrap(stream: NodeJS.ReadableStream): this; - push(chunk: any, encoding?: BufferEncoding): boolean; - /** - * ```js - * import { Readable } from 'node:stream'; - * - * async function* splitToWords(source) { - * for await (const chunk of source) { - * const words = String(chunk).split(' '); - * - * for (const word of words) { - * yield word; - * } - * } - * } - * - * const wordsStream = Readable.from(['this is', 'compose as operator']).compose(splitToWords); - * const words = await wordsStream.toArray(); - * - * console.log(words); // prints ['this', 'is', 'compose', 'as', 'operator'] - * ``` - * - * See [`stream.compose`](https://nodejs.org/docs/latest-v25.x/api/stream.html#streamcomposestreams) for more information. - * @since v19.1.0, v18.13.0 - * @returns a stream composed with the stream `stream`. - */ - compose( - stream: NodeJS.WritableStream | web.WritableStream | web.TransformStream | ((source: any) => void), - options?: Abortable, - ): Duplex; - /** - * The iterator created by this method gives users the option to cancel the destruction - * of the stream if the `for await...of` loop is exited by `return`, `break`, or `throw`, - * or if the iterator should destroy the stream if the stream emitted an error during iteration. - * @since v16.3.0 - */ - iterator(options?: ReadableIteratorOptions): NodeJS.AsyncIterator; - /** - * This method allows mapping over the stream. The *fn* function will be called for every chunk in the stream. - * If the *fn* function returns a promise - that promise will be `await`ed before being passed to the result stream. - * @since v17.4.0, v16.14.0 - * @param fn a function to map over every chunk in the stream. Async or not. - * @returns a stream mapped with the function *fn*. - */ - map(fn: (data: any, options?: Abortable) => any, options?: ReadableOperatorOptions): Readable; - /** - * This method allows filtering the stream. For each chunk in the stream the *fn* function will be called - * and if it returns a truthy value, the chunk will be passed to the result stream. - * If the *fn* function returns a promise - that promise will be `await`ed. - * @since v17.4.0, v16.14.0 - * @param fn a function to filter chunks from the stream. Async or not. - * @returns a stream filtered with the predicate *fn*. - */ - filter( - fn: (data: any, options?: Abortable) => boolean | Promise, - options?: ReadableOperatorOptions, - ): Readable; - /** - * This method allows iterating a stream. For each chunk in the stream the *fn* function will be called. - * If the *fn* function returns a promise - that promise will be `await`ed. - * - * This method is different from `for await...of` loops in that it can optionally process chunks concurrently. - * In addition, a `forEach` iteration can only be stopped by having passed a `signal` option - * and aborting the related AbortController while `for await...of` can be stopped with `break` or `return`. - * In either case the stream will be destroyed. - * - * This method is different from listening to the `'data'` event in that it uses the `readable` event - * in the underlying machinary and can limit the number of concurrent *fn* calls. - * @since v17.5.0 - * @param fn a function to call on each chunk of the stream. Async or not. - * @returns a promise for when the stream has finished. - */ - forEach( - fn: (data: any, options?: Abortable) => void | Promise, - options?: Pick, - ): Promise; - /** - * This method allows easily obtaining the contents of a stream. - * - * As this method reads the entire stream into memory, it negates the benefits of streams. It's intended - * for interoperability and convenience, not as the primary way to consume streams. - * @since v17.5.0 - * @returns a promise containing an array with the contents of the stream. - */ - toArray(options?: Abortable): Promise; - /** - * This method is similar to `Array.prototype.some` and calls *fn* on each chunk in the stream - * until the awaited return value is `true` (or any truthy value). Once an *fn* call on a chunk - * `await`ed return value is truthy, the stream is destroyed and the promise is fulfilled with `true`. - * If none of the *fn* calls on the chunks return a truthy value, the promise is fulfilled with `false`. - * @since v17.5.0 - * @param fn a function to call on each chunk of the stream. Async or not. - * @returns a promise evaluating to `true` if *fn* returned a truthy value for at least one of the chunks. - */ - some( - fn: (data: any, options?: Abortable) => boolean | Promise, - options?: Pick, - ): Promise; - /** - * This method is similar to `Array.prototype.find` and calls *fn* on each chunk in the stream - * to find a chunk with a truthy value for *fn*. Once an *fn* call's awaited return value is truthy, - * the stream is destroyed and the promise is fulfilled with value for which *fn* returned a truthy value. - * If all of the *fn* calls on the chunks return a falsy value, the promise is fulfilled with `undefined`. - * @since v17.5.0 - * @param fn a function to call on each chunk of the stream. Async or not. - * @returns a promise evaluating to the first chunk for which *fn* evaluated with a truthy value, - * or `undefined` if no element was found. - */ - find( - fn: (data: any, options?: Abortable) => data is T, - options?: Pick, - ): Promise; - find( - fn: (data: any, options?: Abortable) => boolean | Promise, - options?: Pick, - ): Promise; - /** - * This method is similar to `Array.prototype.every` and calls *fn* on each chunk in the stream - * to check if all awaited return values are truthy value for *fn*. Once an *fn* call on a chunk - * `await`ed return value is falsy, the stream is destroyed and the promise is fulfilled with `false`. - * If all of the *fn* calls on the chunks return a truthy value, the promise is fulfilled with `true`. - * @since v17.5.0 - * @param fn a function to call on each chunk of the stream. Async or not. - * @returns a promise evaluating to `true` if *fn* returned a truthy value for every one of the chunks. - */ - every( - fn: (data: any, options?: Abortable) => boolean | Promise, - options?: Pick, - ): Promise; - /** - * This method returns a new stream by applying the given callback to each chunk of the stream - * and then flattening the result. - * - * It is possible to return a stream or another iterable or async iterable from *fn* and the result streams - * will be merged (flattened) into the returned stream. - * @since v17.5.0 - * @param fn a function to map over every chunk in the stream. May be async. May be a stream or generator. - * @returns a stream flat-mapped with the function *fn*. - */ - flatMap( - fn: (data: any, options?: Abortable) => any, - options?: Pick, - ): Readable; - /** - * This method returns a new stream with the first *limit* chunks dropped from the start. - * @since v17.5.0 - * @param limit the number of chunks to drop from the readable. - * @returns a stream with *limit* chunks dropped from the start. - */ - drop(limit: number, options?: Abortable): Readable; - /** - * This method returns a new stream with the first *limit* chunks. - * @since v17.5.0 - * @param limit the number of chunks to take from the readable. - * @returns a stream with *limit* chunks taken. - */ - take(limit: number, options?: Abortable): Readable; - /** - * This method calls *fn* on each chunk of the stream in order, passing it the result from the calculation - * on the previous element. It returns a promise for the final value of the reduction. - * - * If no *initial* value is supplied the first chunk of the stream is used as the initial value. - * If the stream is empty, the promise is rejected with a `TypeError` with the `ERR_INVALID_ARGS` code property. - * - * The reducer function iterates the stream element-by-element which means that there is no *concurrency* parameter - * or parallelism. To perform a reduce concurrently, you can extract the async function to `readable.map` method. - * @since v17.5.0 - * @param fn a reducer function to call over every chunk in the stream. Async or not. - * @param initial the initial value to use in the reduction. - * @returns a promise for the final value of the reduction. - */ - reduce(fn: (previous: any, data: any, options?: Abortable) => T): Promise; - reduce( - fn: (previous: T, data: any, options?: Abortable) => T, - initial: T, - options?: Abortable, - ): Promise; - _destroy(error: Error | null, callback: (error?: Error | null) => void): void; - /** - * Destroy the stream. Optionally emit an `'error'` event, and emit a `'close'` event (unless `emitClose` is set to `false`). After this call, the readable - * stream will release any internal resources and subsequent calls to `push()` will be ignored. - * - * Once `destroy()` has been called any further calls will be a no-op and no - * further errors except from `_destroy()` may be emitted as `'error'`. - * - * Implementors should not override this method, but instead implement `readable._destroy()`. - * @since v8.0.0 - * @param error Error which will be passed as payload in `'error'` event - */ - destroy(error?: Error): this; - /** - * @returns `AsyncIterator` to fully consume the stream. - * @since v10.0.0 - */ - [Symbol.asyncIterator](): NodeJS.AsyncIterator; - /** - * Calls `readable.destroy()` with an `AbortError` and returns - * a promise that fulfills when the stream is finished. - * @since v20.4.0 - */ - [Symbol.asyncDispose](): Promise; - // #region InternalEventEmitter - addListener( - eventName: E, - listener: (...args: ReadableEventMap[E]) => void, - ): this; - addListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - emit(eventName: E, ...args: ReadableEventMap[E]): boolean; - emit(eventName: string | symbol, ...args: any[]): boolean; - listenerCount( - eventName: E, - listener?: (...args: ReadableEventMap[E]) => void, - ): number; - listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number; - listeners(eventName: E): ((...args: ReadableEventMap[E]) => void)[]; - listeners(eventName: string | symbol): ((...args: any[]) => void)[]; - off(eventName: E, listener: (...args: ReadableEventMap[E]) => void): this; - off(eventName: string | symbol, listener: (...args: any[]) => void): this; - on(eventName: E, listener: (...args: ReadableEventMap[E]) => void): this; - on(eventName: string | symbol, listener: (...args: any[]) => void): this; - once( - eventName: E, - listener: (...args: ReadableEventMap[E]) => void, - ): this; - once(eventName: string | symbol, listener: (...args: any[]) => void): this; - prependListener( - eventName: E, - listener: (...args: ReadableEventMap[E]) => void, - ): this; - prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - prependOnceListener( - eventName: E, - listener: (...args: ReadableEventMap[E]) => void, - ): this; - prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - rawListeners(eventName: E): ((...args: ReadableEventMap[E]) => void)[]; - rawListeners(eventName: string | symbol): ((...args: any[]) => void)[]; - // eslint-disable-next-line @definitelytyped/no-unnecessary-generics - removeAllListeners(eventName?: E): this; - removeAllListeners(eventName?: string | symbol): this; - removeListener( - eventName: E, - listener: (...args: ReadableEventMap[E]) => void, - ): this; - removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - // #endregion - } - interface WritableOptions extends StreamOptions { - decodeStrings?: boolean | undefined; - defaultEncoding?: BufferEncoding | undefined; - write?: - | (( - this: T, - chunk: any, - encoding: BufferEncoding, - callback: (error?: Error | null) => void, - ) => void) - | undefined; - writev?: - | (( - this: T, - chunks: { - chunk: any; - encoding: BufferEncoding; - }[], - callback: (error?: Error | null) => void, - ) => void) - | undefined; - final?: ((this: T, callback: (error?: Error | null) => void) => void) | undefined; - } - interface WritableEventMap { - "close": []; - "drain": []; - "error": [err: Error]; - "finish": []; - "pipe": [src: Readable]; - "unpipe": [src: Readable]; - } - /** - * @since v0.9.4 - */ - class Writable extends Stream implements NodeJS.WritableStream { - constructor(options?: WritableOptions); - /** - * A utility method for creating a `Writable` from a web `WritableStream`. - * @since v17.0.0 - */ - static fromWeb( - writableStream: web.WritableStream, - options?: Pick, - ): Writable; - /** - * A utility method for creating a web `WritableStream` from a `Writable`. - * @since v17.0.0 - */ - static toWeb(streamWritable: NodeJS.WritableStream): web.WritableStream; - /** - * Is `true` if it is safe to call `writable.write()`, which means - * the stream has not been destroyed, errored, or ended. - * @since v11.4.0 - */ - writable: boolean; - /** - * Returns whether the stream was destroyed or errored before emitting `'finish'`. - * @since v18.0.0, v16.17.0 - */ - readonly writableAborted: boolean; - /** - * Is `true` after `writable.end()` has been called. This property - * does not indicate whether the data has been flushed, for this use `writable.writableFinished` instead. - * @since v12.9.0 - */ - readonly writableEnded: boolean; - /** - * Is set to `true` immediately before the `'finish'` event is emitted. - * @since v12.6.0 - */ - readonly writableFinished: boolean; - /** - * Return the value of `highWaterMark` passed when creating this `Writable`. - * @since v9.3.0 - */ - readonly writableHighWaterMark: number; - /** - * This property contains the number of bytes (or objects) in the queue - * ready to be written. The value provides introspection data regarding - * the status of the `highWaterMark`. - * @since v9.4.0 - */ - readonly writableLength: number; - /** - * Getter for the property `objectMode` of a given `Writable` stream. - * @since v12.3.0 - */ - readonly writableObjectMode: boolean; - /** - * Number of times `writable.uncork()` needs to be - * called in order to fully uncork the stream. - * @since v13.2.0, v12.16.0 - */ - readonly writableCorked: number; - /** - * Is `true` after `writable.destroy()` has been called. - * @since v8.0.0 - */ - destroyed: boolean; - /** - * Is `true` after `'close'` has been emitted. - * @since v18.0.0 - */ - readonly closed: boolean; - /** - * Returns error if the stream has been destroyed with an error. - * @since v18.0.0 - */ - readonly errored: Error | null; - /** - * Is `true` if the stream's buffer has been full and stream will emit `'drain'`. - * @since v15.2.0, v14.17.0 - */ - readonly writableNeedDrain: boolean; - _write(chunk: any, encoding: BufferEncoding, callback: (error?: Error | null) => void): void; - _writev?( - chunks: { - chunk: any; - encoding: BufferEncoding; - }[], - callback: (error?: Error | null) => void, - ): void; - _construct?(callback: (error?: Error | null) => void): void; - _destroy(error: Error | null, callback: (error?: Error | null) => void): void; - _final(callback: (error?: Error | null) => void): void; - /** - * The `writable.write()` method writes some data to the stream, and calls the - * supplied `callback` once the data has been fully handled. If an error - * occurs, the `callback` will be called with the error as its - * first argument. The `callback` is called asynchronously and before `'error'` is - * emitted. - * - * The return value is `true` if the internal buffer is less than the `highWaterMark` configured when the stream was created after admitting `chunk`. - * If `false` is returned, further attempts to write data to the stream should - * stop until the `'drain'` event is emitted. - * - * While a stream is not draining, calls to `write()` will buffer `chunk`, and - * return false. Once all currently buffered chunks are drained (accepted for - * delivery by the operating system), the `'drain'` event will be emitted. - * Once `write()` returns false, do not write more chunks - * until the `'drain'` event is emitted. While calling `write()` on a stream that - * is not draining is allowed, Node.js will buffer all written chunks until - * maximum memory usage occurs, at which point it will abort unconditionally. - * Even before it aborts, high memory usage will cause poor garbage collector - * performance and high RSS (which is not typically released back to the system, - * even after the memory is no longer required). Since TCP sockets may never - * drain if the remote peer does not read the data, writing a socket that is - * not draining may lead to a remotely exploitable vulnerability. - * - * Writing data while the stream is not draining is particularly - * problematic for a `Transform`, because the `Transform` streams are paused - * by default until they are piped or a `'data'` or `'readable'` event handler - * is added. - * - * If the data to be written can be generated or fetched on demand, it is - * recommended to encapsulate the logic into a `Readable` and use {@link pipe}. However, if calling `write()` is preferred, it is - * possible to respect backpressure and avoid memory issues using the `'drain'` event: - * - * ```js - * function write(data, cb) { - * if (!stream.write(data)) { - * stream.once('drain', cb); - * } else { - * process.nextTick(cb); - * } - * } - * - * // Wait for cb to be called before doing any other write. - * write('hello', () => { - * console.log('Write completed, do more writes now.'); - * }); - * ``` - * - * A `Writable` stream in object mode will always ignore the `encoding` argument. - * @since v0.9.4 - * @param chunk Optional data to write. For streams not operating in object mode, `chunk` must be a {string}, {Buffer}, - * {TypedArray} or {DataView}. For object mode streams, `chunk` may be any JavaScript value other than `null`. - * @param [encoding='utf8'] The encoding, if `chunk` is a string. - * @param callback Callback for when this chunk of data is flushed. - * @return `false` if the stream wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`. - */ - write(chunk: any, callback?: (error: Error | null | undefined) => void): boolean; - write(chunk: any, encoding: BufferEncoding, callback?: (error: Error | null | undefined) => void): boolean; - /** - * The `writable.setDefaultEncoding()` method sets the default `encoding` for a `Writable` stream. - * @since v0.11.15 - * @param encoding The new default encoding - */ - setDefaultEncoding(encoding: BufferEncoding): this; - /** - * Calling the `writable.end()` method signals that no more data will be written - * to the `Writable`. The optional `chunk` and `encoding` arguments allow one - * final additional chunk of data to be written immediately before closing the - * stream. - * - * Calling the {@link write} method after calling {@link end} will raise an error. - * - * ```js - * // Write 'hello, ' and then end with 'world!'. - * import fs from 'node:fs'; - * const file = fs.createWriteStream('example.txt'); - * file.write('hello, '); - * file.end('world!'); - * // Writing more now is not allowed! - * ``` - * @since v0.9.4 - * @param chunk Optional data to write. For streams not operating in object mode, `chunk` must be a {string}, {Buffer}, - * {TypedArray} or {DataView}. For object mode streams, `chunk` may be any JavaScript value other than `null`. - * @param encoding The encoding if `chunk` is a string - * @param callback Callback for when the stream is finished. - */ - end(cb?: () => void): this; - end(chunk: any, cb?: () => void): this; - end(chunk: any, encoding: BufferEncoding, cb?: () => void): this; - /** - * The `writable.cork()` method forces all written data to be buffered in memory. - * The buffered data will be flushed when either the {@link uncork} or {@link end} methods are called. - * - * The primary intent of `writable.cork()` is to accommodate a situation in which - * several small chunks are written to the stream in rapid succession. Instead of - * immediately forwarding them to the underlying destination, `writable.cork()` buffers all the chunks until `writable.uncork()` is called, which will pass them - * all to `writable._writev()`, if present. This prevents a head-of-line blocking - * situation where data is being buffered while waiting for the first small chunk - * to be processed. However, use of `writable.cork()` without implementing `writable._writev()` may have an adverse effect on throughput. - * - * See also: `writable.uncork()`, `writable._writev()`. - * @since v0.11.2 - */ - cork(): void; - /** - * The `writable.uncork()` method flushes all data buffered since {@link cork} was called. - * - * When using `writable.cork()` and `writable.uncork()` to manage the buffering - * of writes to a stream, defer calls to `writable.uncork()` using `process.nextTick()`. Doing so allows batching of all `writable.write()` calls that occur within a given Node.js event - * loop phase. - * - * ```js - * stream.cork(); - * stream.write('some '); - * stream.write('data '); - * process.nextTick(() => stream.uncork()); - * ``` - * - * If the `writable.cork()` method is called multiple times on a stream, the - * same number of calls to `writable.uncork()` must be called to flush the buffered - * data. - * - * ```js - * stream.cork(); - * stream.write('some '); - * stream.cork(); - * stream.write('data '); - * process.nextTick(() => { - * stream.uncork(); - * // The data will not be flushed until uncork() is called a second time. - * stream.uncork(); - * }); - * ``` - * - * See also: `writable.cork()`. - * @since v0.11.2 - */ - uncork(): void; - /** - * Destroy the stream. Optionally emit an `'error'` event, and emit a `'close'` event (unless `emitClose` is set to `false`). After this call, the writable - * stream has ended and subsequent calls to `write()` or `end()` will result in - * an `ERR_STREAM_DESTROYED` error. - * This is a destructive and immediate way to destroy a stream. Previous calls to `write()` may not have drained, and may trigger an `ERR_STREAM_DESTROYED` error. - * Use `end()` instead of destroy if data should flush before close, or wait for - * the `'drain'` event before destroying the stream. - * - * Once `destroy()` has been called any further calls will be a no-op and no - * further errors except from `_destroy()` may be emitted as `'error'`. - * - * Implementors should not override this method, - * but instead implement `writable._destroy()`. - * @since v8.0.0 - * @param error Optional, an error to emit with `'error'` event. - */ - destroy(error?: Error): this; - /** - * Calls `writable.destroy()` with an `AbortError` and returns - * a promise that fulfills when the stream is finished. - * @since v22.4.0, v20.16.0 - */ - [Symbol.asyncDispose](): Promise; - // #region InternalEventEmitter - addListener( - eventName: E, - listener: (...args: WritableEventMap[E]) => void, - ): this; - addListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - emit(eventName: E, ...args: WritableEventMap[E]): boolean; - emit(eventName: string | symbol, ...args: any[]): boolean; - listenerCount( - eventName: E, - listener?: (...args: WritableEventMap[E]) => void, - ): number; - listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number; - listeners(eventName: E): ((...args: WritableEventMap[E]) => void)[]; - listeners(eventName: string | symbol): ((...args: any[]) => void)[]; - off(eventName: E, listener: (...args: WritableEventMap[E]) => void): this; - off(eventName: string | symbol, listener: (...args: any[]) => void): this; - on(eventName: E, listener: (...args: WritableEventMap[E]) => void): this; - on(eventName: string | symbol, listener: (...args: any[]) => void): this; - once( - eventName: E, - listener: (...args: WritableEventMap[E]) => void, - ): this; - once(eventName: string | symbol, listener: (...args: any[]) => void): this; - prependListener( - eventName: E, - listener: (...args: WritableEventMap[E]) => void, - ): this; - prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - prependOnceListener( - eventName: E, - listener: (...args: WritableEventMap[E]) => void, - ): this; - prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - rawListeners(eventName: E): ((...args: WritableEventMap[E]) => void)[]; - rawListeners(eventName: string | symbol): ((...args: any[]) => void)[]; - // eslint-disable-next-line @definitelytyped/no-unnecessary-generics - removeAllListeners(eventName?: E): this; - removeAllListeners(eventName?: string | symbol): this; - removeListener( - eventName: E, - listener: (...args: WritableEventMap[E]) => void, - ): this; - removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - // #endregion - } - interface DuplexOptions extends ReadableOptions, WritableOptions { - allowHalfOpen?: boolean | undefined; - readableObjectMode?: boolean | undefined; - writableObjectMode?: boolean | undefined; - readableHighWaterMark?: number | undefined; - writableHighWaterMark?: number | undefined; - writableCorked?: number | undefined; - } - interface DuplexEventMap extends ReadableEventMap, WritableEventMap {} - /** - * Duplex streams are streams that implement both the `Readable` and `Writable` interfaces. - * - * Examples of `Duplex` streams include: - * - * * `TCP sockets` - * * `zlib streams` - * * `crypto streams` - * @since v0.9.4 - */ - class Duplex extends Stream implements NodeJS.ReadWriteStream { - constructor(options?: DuplexOptions); - /** - * A utility method for creating duplex streams. - * - * - `Stream` converts writable stream into writable `Duplex` and readable stream - * to `Duplex`. - * - `Blob` converts into readable `Duplex`. - * - `string` converts into readable `Duplex`. - * - `ArrayBuffer` converts into readable `Duplex`. - * - `AsyncIterable` converts into a readable `Duplex`. Cannot yield `null`. - * - `AsyncGeneratorFunction` converts into a readable/writable transform - * `Duplex`. Must take a source `AsyncIterable` as first parameter. Cannot yield - * `null`. - * - `AsyncFunction` converts into a writable `Duplex`. Must return - * either `null` or `undefined` - * - `Object ({ writable, readable })` converts `readable` and - * `writable` into `Stream` and then combines them into `Duplex` where the - * `Duplex` will write to the `writable` and read from the `readable`. - * - `Promise` converts into readable `Duplex`. Value `null` is ignored. - * - * @since v16.8.0 - */ - static from( - src: - | NodeJS.ReadableStream - | NodeJS.WritableStream - | Blob - | string - | Iterable - | AsyncIterable - | ((source: AsyncIterable) => AsyncIterable) - | ((source: AsyncIterable) => Promise) - | Promise - | web.ReadableWritablePair - | web.ReadableStream - | web.WritableStream, - ): Duplex; - /** - * A utility method for creating a web `ReadableStream` and `WritableStream` from a `Duplex`. - * @since v17.0.0 - */ - static toWeb(streamDuplex: NodeJS.ReadWriteStream): web.ReadableWritablePair; - /** - * A utility method for creating a `Duplex` from a web `ReadableStream` and `WritableStream`. - * @since v17.0.0 - */ - static fromWeb( - duplexStream: web.ReadableWritablePair, - options?: Pick< - DuplexOptions, - "allowHalfOpen" | "decodeStrings" | "encoding" | "highWaterMark" | "objectMode" | "signal" - >, - ): Duplex; - /** - * If `false` then the stream will automatically end the writable side when the - * readable side ends. Set initially by the `allowHalfOpen` constructor option, - * which defaults to `true`. - * - * This can be changed manually to change the half-open behavior of an existing - * `Duplex` stream instance, but must be changed before the `'end'` event is emitted. - * @since v0.9.4 - */ - allowHalfOpen: boolean; - // #region InternalEventEmitter - addListener( - eventName: E, - listener: (...args: DuplexEventMap[E]) => void, - ): this; - addListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - emit(eventName: E, ...args: DuplexEventMap[E]): boolean; - emit(eventName: string | symbol, ...args: any[]): boolean; - listenerCount( - eventName: E, - listener?: (...args: DuplexEventMap[E]) => void, - ): number; - listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number; - listeners(eventName: E): ((...args: DuplexEventMap[E]) => void)[]; - listeners(eventName: string | symbol): ((...args: any[]) => void)[]; - off(eventName: E, listener: (...args: DuplexEventMap[E]) => void): this; - off(eventName: string | symbol, listener: (...args: any[]) => void): this; - on(eventName: E, listener: (...args: DuplexEventMap[E]) => void): this; - on(eventName: string | symbol, listener: (...args: any[]) => void): this; - once(eventName: E, listener: (...args: DuplexEventMap[E]) => void): this; - once(eventName: string | symbol, listener: (...args: any[]) => void): this; - prependListener( - eventName: E, - listener: (...args: DuplexEventMap[E]) => void, - ): this; - prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - prependOnceListener( - eventName: E, - listener: (...args: DuplexEventMap[E]) => void, - ): this; - prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - rawListeners(eventName: E): ((...args: DuplexEventMap[E]) => void)[]; - rawListeners(eventName: string | symbol): ((...args: any[]) => void)[]; - // eslint-disable-next-line @definitelytyped/no-unnecessary-generics - removeAllListeners(eventName?: E): this; - removeAllListeners(eventName?: string | symbol): this; - removeListener( - eventName: E, - listener: (...args: DuplexEventMap[E]) => void, - ): this; - removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - // #endregion - } - interface Duplex extends Readable, Writable {} - /** - * The utility function `duplexPair` returns an Array with two items, - * each being a `Duplex` stream connected to the other side: - * - * ```js - * const [ sideA, sideB ] = duplexPair(); - * ``` - * - * Whatever is written to one stream is made readable on the other. It provides - * behavior analogous to a network connection, where the data written by the client - * becomes readable by the server, and vice-versa. - * - * The Duplex streams are symmetrical; one or the other may be used without any - * difference in behavior. - * @param options A value to pass to both {@link Duplex} constructors, - * to set options such as buffering. - * @since v22.6.0 - */ - function duplexPair(options?: DuplexOptions): [Duplex, Duplex]; - type TransformCallback = (error?: Error | null, data?: any) => void; - interface TransformOptions extends DuplexOptions { - transform?: - | ((this: T, chunk: any, encoding: BufferEncoding, callback: TransformCallback) => void) - | undefined; - flush?: ((this: T, callback: TransformCallback) => void) | undefined; - } - /** - * Transform streams are `Duplex` streams where the output is in some way - * related to the input. Like all `Duplex` streams, `Transform` streams - * implement both the `Readable` and `Writable` interfaces. - * - * Examples of `Transform` streams include: - * - * * `zlib streams` - * * `crypto streams` - * @since v0.9.4 - */ - class Transform extends Duplex { - constructor(options?: TransformOptions); - _transform(chunk: any, encoding: BufferEncoding, callback: TransformCallback): void; - _flush(callback: TransformCallback): void; - } - /** - * The `stream.PassThrough` class is a trivial implementation of a `Transform` stream that simply passes the input bytes across to the output. Its purpose is - * primarily for examples and testing, but there are some use cases where `stream.PassThrough` is useful as a building block for novel sorts of streams. - */ - class PassThrough extends Transform {} - /** - * A stream to attach a signal to. - * - * Attaches an AbortSignal to a readable or writeable stream. This lets code - * control stream destruction using an `AbortController`. - * - * Calling `abort` on the `AbortController` corresponding to the passed `AbortSignal` will behave the same way as calling `.destroy(new AbortError())` on the - * stream, and `controller.error(new AbortError())` for webstreams. - * - * ```js - * import fs from 'node:fs'; - * - * const controller = new AbortController(); - * const read = addAbortSignal( - * controller.signal, - * fs.createReadStream(('object.json')), - * ); - * // Later, abort the operation closing the stream - * controller.abort(); - * ``` - * - * Or using an `AbortSignal` with a readable stream as an async iterable: - * - * ```js - * const controller = new AbortController(); - * setTimeout(() => controller.abort(), 10_000); // set a timeout - * const stream = addAbortSignal( - * controller.signal, - * fs.createReadStream(('object.json')), - * ); - * (async () => { - * try { - * for await (const chunk of stream) { - * await process(chunk); - * } - * } catch (e) { - * if (e.name === 'AbortError') { - * // The operation was cancelled - * } else { - * throw e; - * } - * } - * })(); - * ``` - * - * Or using an `AbortSignal` with a ReadableStream: - * - * ```js - * const controller = new AbortController(); - * const rs = new ReadableStream({ - * start(controller) { - * controller.enqueue('hello'); - * controller.enqueue('world'); - * controller.close(); - * }, - * }); - * - * addAbortSignal(controller.signal, rs); - * - * finished(rs, (err) => { - * if (err) { - * if (err.name === 'AbortError') { - * // The operation was cancelled - * } - * } - * }); - * - * const reader = rs.getReader(); - * - * reader.read().then(({ value, done }) => { - * console.log(value); // hello - * console.log(done); // false - * controller.abort(); - * }); - * ``` - * @since v15.4.0 - * @param signal A signal representing possible cancellation - * @param stream A stream to attach a signal to. - */ - function addAbortSignal< - T extends NodeJS.ReadableStream | NodeJS.WritableStream | web.ReadableStream | web.WritableStream, - >(signal: AbortSignal, stream: T): T; - /** - * Returns the default highWaterMark used by streams. - * Defaults to `65536` (64 KiB), or `16` for `objectMode`. - * @since v19.9.0 - */ - function getDefaultHighWaterMark(objectMode: boolean): number; - /** - * Sets the default highWaterMark used by streams. - * @since v19.9.0 - * @param value highWaterMark value - */ - function setDefaultHighWaterMark(objectMode: boolean, value: number): void; - interface FinishedOptions extends Abortable { - error?: boolean | undefined; - readable?: boolean | undefined; - writable?: boolean | undefined; - } - /** - * A readable and/or writable stream/webstream. - * - * A function to get notified when a stream is no longer readable, writable - * or has experienced an error or a premature close event. - * - * ```js - * import { finished } from 'node:stream'; - * import fs from 'node:fs'; - * - * const rs = fs.createReadStream('archive.tar'); - * - * finished(rs, (err) => { - * if (err) { - * console.error('Stream failed.', err); - * } else { - * console.log('Stream is done reading.'); - * } - * }); - * - * rs.resume(); // Drain the stream. - * ``` - * - * Especially useful in error handling scenarios where a stream is destroyed - * prematurely (like an aborted HTTP request), and will not emit `'end'` or `'finish'`. - * - * The `finished` API provides [`promise version`](https://nodejs.org/docs/latest-v25.x/api/stream.html#streamfinishedstream-options). - * - * `stream.finished()` leaves dangling event listeners (in particular `'error'`, `'end'`, `'finish'` and `'close'`) after `callback` has been - * invoked. The reason for this is so that unexpected `'error'` events (due to - * incorrect stream implementations) do not cause unexpected crashes. - * If this is unwanted behavior then the returned cleanup function needs to be - * invoked in the callback: - * - * ```js - * const cleanup = finished(rs, (err) => { - * cleanup(); - * // ... - * }); - * ``` - * @since v10.0.0 - * @param stream A readable and/or writable stream. - * @param callback A callback function that takes an optional error argument. - * @returns A cleanup function which removes all registered listeners. - */ - function finished( - stream: NodeJS.ReadableStream | NodeJS.WritableStream | web.ReadableStream | web.WritableStream, - options: FinishedOptions, - callback: (err?: NodeJS.ErrnoException | null) => void, - ): () => void; - function finished( - stream: NodeJS.ReadableStream | NodeJS.WritableStream | web.ReadableStream | web.WritableStream, - callback: (err?: NodeJS.ErrnoException | null) => void, - ): () => void; - namespace finished { - import __promisify__ = promises.finished; - export { __promisify__ }; - } - type PipelineSourceFunction = (options?: Abortable) => Iterable | AsyncIterable; - type PipelineSource = - | NodeJS.ReadableStream - | web.ReadableStream - | web.TransformStream - | Iterable - | AsyncIterable - | PipelineSourceFunction; - type PipelineSourceArgument = (T extends (...args: any[]) => infer R ? R : T) extends infer S - ? S extends web.TransformStream ? web.ReadableStream : S - : never; - type PipelineTransformGenerator, O> = ( - source: PipelineSourceArgument, - options?: Abortable, - ) => AsyncIterable; - type PipelineTransformStreams = - | NodeJS.ReadWriteStream - | web.TransformStream; - type PipelineTransform, O> = S extends - PipelineSource | PipelineTransformStreams | ((...args: any[]) => infer I) - ? PipelineTransformStreams | PipelineTransformGenerator - : never; - type PipelineTransformSource = PipelineSource | PipelineTransform; - type PipelineDestinationFunction, R> = ( - source: PipelineSourceArgument, - options?: Abortable, - ) => R; - type PipelineDestination, R> = S extends - PipelineSource | PipelineTransform ? - | NodeJS.WritableStream - | web.WritableStream - | web.TransformStream - | PipelineDestinationFunction - : never; - type PipelineCallback> = ( - err: NodeJS.ErrnoException | null, - value: S extends (...args: any[]) => PromiseLike ? R : undefined, - ) => void; - type PipelineResult> = S extends NodeJS.WritableStream ? S : Duplex; - /** - * A module method to pipe between streams and generators forwarding errors and - * properly cleaning up and provide a callback when the pipeline is complete. - * - * ```js - * import { pipeline } from 'node:stream'; - * import fs from 'node:fs'; - * import zlib from 'node:zlib'; - * - * // Use the pipeline API to easily pipe a series of streams - * // together and get notified when the pipeline is fully done. - * - * // A pipeline to gzip a potentially huge tar file efficiently: - * - * pipeline( - * fs.createReadStream('archive.tar'), - * zlib.createGzip(), - * fs.createWriteStream('archive.tar.gz'), - * (err) => { - * if (err) { - * console.error('Pipeline failed.', err); - * } else { - * console.log('Pipeline succeeded.'); - * } - * }, - * ); - * ``` - * - * The `pipeline` API provides a [`promise version`](https://nodejs.org/docs/latest-v25.x/api/stream.html#streampipelinesource-transforms-destination-options). - * - * `stream.pipeline()` will call `stream.destroy(err)` on all streams except: - * - * * `Readable` streams which have emitted `'end'` or `'close'`. - * * `Writable` streams which have emitted `'finish'` or `'close'`. - * - * `stream.pipeline()` leaves dangling event listeners on the streams - * after the `callback` has been invoked. In the case of reuse of streams after - * failure, this can cause event listener leaks and swallowed errors. If the last - * stream is readable, dangling event listeners will be removed so that the last - * stream can be consumed later. - * - * `stream.pipeline()` closes all the streams when an error is raised. - * The `IncomingRequest` usage with `pipeline` could lead to an unexpected behavior - * once it would destroy the socket without sending the expected response. - * See the example below: - * - * ```js - * import fs from 'node:fs'; - * import http from 'node:http'; - * import { pipeline } from 'node:stream'; - * - * const server = http.createServer((req, res) => { - * const fileStream = fs.createReadStream('./fileNotExist.txt'); - * pipeline(fileStream, res, (err) => { - * if (err) { - * console.log(err); // No such file - * // this message can't be sent once `pipeline` already destroyed the socket - * return res.end('error!!!'); - * } - * }); - * }); - * ``` - * @since v10.0.0 - * @param callback Called when the pipeline is fully done. - */ - function pipeline, D extends PipelineDestination>( - source: S, - destination: D, - callback: PipelineCallback, - ): PipelineResult; - function pipeline< - S extends PipelineSource, - T extends PipelineTransform, - D extends PipelineDestination, - >( - source: S, - transform: T, - destination: D, - callback: PipelineCallback, - ): PipelineResult; - function pipeline< - S extends PipelineSource, - T1 extends PipelineTransform, - T2 extends PipelineTransform, - D extends PipelineDestination, - >( - source: S, - transform1: T1, - transform2: T2, - destination: D, - callback: PipelineCallback, - ): PipelineResult; - function pipeline< - S extends PipelineSource, - T1 extends PipelineTransform, - T2 extends PipelineTransform, - T3 extends PipelineTransform, - D extends PipelineDestination, - >( - source: S, - transform1: T1, - transform2: T2, - transform3: T3, - destination: D, - callback: PipelineCallback, - ): PipelineResult; - function pipeline< - S extends PipelineSource, - T1 extends PipelineTransform, - T2 extends PipelineTransform, - T3 extends PipelineTransform, - T4 extends PipelineTransform, - D extends PipelineDestination, - >( - source: S, - transform1: T1, - transform2: T2, - transform3: T3, - transform4: T4, - destination: D, - callback: PipelineCallback, - ): PipelineResult; - function pipeline( - streams: ReadonlyArray | PipelineTransform | PipelineDestination>, - callback: (err: NodeJS.ErrnoException | null) => void, - ): NodeJS.WritableStream; - function pipeline( - ...streams: [ - ...[PipelineSource, ...PipelineTransform[], PipelineDestination], - callback: ((err: NodeJS.ErrnoException | null) => void), - ] - ): NodeJS.WritableStream; - namespace pipeline { - import __promisify__ = promises.pipeline; - export { __promisify__ }; - } - type ComposeSource = - | NodeJS.ReadableStream - | web.ReadableStream - | Iterable - | AsyncIterable - | (() => AsyncIterable); - type ComposeTransformStreams = NodeJS.ReadWriteStream | web.TransformStream; - type ComposeTransformGenerator = (source: AsyncIterable) => AsyncIterable; - type ComposeTransform, O> = S extends - ComposeSource | ComposeTransformStreams | ComposeTransformGenerator - ? ComposeTransformStreams | ComposeTransformGenerator - : never; - type ComposeTransformSource = ComposeSource | ComposeTransform; - type ComposeDestination> = S extends ComposeTransformSource ? - | NodeJS.WritableStream - | web.WritableStream - | web.TransformStream - | ((source: AsyncIterable) => void) - : never; - /** - * Combines two or more streams into a `Duplex` stream that writes to the - * first stream and reads from the last. Each provided stream is piped into - * the next, using `stream.pipeline`. If any of the streams error then all - * are destroyed, including the outer `Duplex` stream. - * - * Because `stream.compose` returns a new stream that in turn can (and - * should) be piped into other streams, it enables composition. In contrast, - * when passing streams to `stream.pipeline`, typically the first stream is - * a readable stream and the last a writable stream, forming a closed - * circuit. - * - * If passed a `Function` it must be a factory method taking a `source` - * `Iterable`. - * - * ```js - * import { compose, Transform } from 'node:stream'; - * - * const removeSpaces = new Transform({ - * transform(chunk, encoding, callback) { - * callback(null, String(chunk).replace(' ', '')); - * }, - * }); - * - * async function* toUpper(source) { - * for await (const chunk of source) { - * yield String(chunk).toUpperCase(); - * } - * } - * - * let res = ''; - * for await (const buf of compose(removeSpaces, toUpper).end('hello world')) { - * res += buf; - * } - * - * console.log(res); // prints 'HELLOWORLD' - * ``` - * - * `stream.compose` can be used to convert async iterables, generators and - * functions into streams. - * - * * `AsyncIterable` converts into a readable `Duplex`. Cannot yield - * `null`. - * * `AsyncGeneratorFunction` converts into a readable/writable transform `Duplex`. - * Must take a source `AsyncIterable` as first parameter. Cannot yield - * `null`. - * * `AsyncFunction` converts into a writable `Duplex`. Must return - * either `null` or `undefined`. - * - * ```js - * import { compose } from 'node:stream'; - * import { finished } from 'node:stream/promises'; - * - * // Convert AsyncIterable into readable Duplex. - * const s1 = compose(async function*() { - * yield 'Hello'; - * yield 'World'; - * }()); - * - * // Convert AsyncGenerator into transform Duplex. - * const s2 = compose(async function*(source) { - * for await (const chunk of source) { - * yield String(chunk).toUpperCase(); - * } - * }); - * - * let res = ''; - * - * // Convert AsyncFunction into writable Duplex. - * const s3 = compose(async function(source) { - * for await (const chunk of source) { - * res += chunk; - * } - * }); - * - * await finished(compose(s1, s2, s3)); - * - * console.log(res); // prints 'HELLOWORLD' - * ``` - * - * See [`readable.compose(stream)`](https://nodejs.org/docs/latest-v25.x/api/stream.html#readablecomposestream-options) for `stream.compose` as operator. - * @since v16.9.0 - * @experimental - */ - /* eslint-disable @definitelytyped/no-unnecessary-generics */ - function compose(stream: ComposeSource | ComposeDestination): Duplex; - function compose< - S extends ComposeSource | ComposeTransform, - D extends ComposeTransform | ComposeDestination, - >( - source: S, - destination: D, - ): Duplex; - function compose< - S extends ComposeSource | ComposeTransform, - T extends ComposeTransform, - D extends ComposeTransform | ComposeDestination, - >(source: S, transform: T, destination: D): Duplex; - function compose< - S extends ComposeSource | ComposeTransform, - T1 extends ComposeTransform, - T2 extends ComposeTransform, - D extends ComposeTransform | ComposeDestination, - >(source: S, transform1: T1, transform2: T2, destination: D): Duplex; - function compose< - S extends ComposeSource | ComposeTransform, - T1 extends ComposeTransform, - T2 extends ComposeTransform, - T3 extends ComposeTransform, - D extends ComposeTransform | ComposeDestination, - >(source: S, transform1: T1, transform2: T2, transform3: T3, destination: D): Duplex; - function compose< - S extends ComposeSource | ComposeTransform, - T1 extends ComposeTransform, - T2 extends ComposeTransform, - T3 extends ComposeTransform, - T4 extends ComposeTransform, - D extends ComposeTransform | ComposeDestination, - >(source: S, transform1: T1, transform2: T2, transform3: T3, transform4: T4, destination: D): Duplex; - function compose( - ...streams: [ - ComposeSource, - ...ComposeTransform[], - ComposeDestination, - ] - ): Duplex; - /* eslint-enable @definitelytyped/no-unnecessary-generics */ - /** - * Returns whether the stream has encountered an error. - * @since v17.3.0, v16.14.0 - */ - function isErrored( - stream: NodeJS.ReadableStream | NodeJS.WritableStream | web.ReadableStream | web.WritableStream, - ): boolean; - /** - * Returns whether the stream is readable. - * @since v17.4.0, v16.14.0 - * @returns Only returns `null` if `stream` is not a valid `Readable`, `Duplex` or `ReadableStream`. - */ - function isReadable(stream: NodeJS.ReadableStream | web.ReadableStream): boolean | null; - /** - * Returns whether the stream is writable. - * @since v20.0.0 - * @returns Only returns `null` if `stream` is not a valid `Writable`, `Duplex` or `WritableStream`. - */ - function isWritable(stream: NodeJS.WritableStream | web.WritableStream): boolean | null; - } - global { - namespace NodeJS { - // These interfaces are vestigial, and correspond roughly to the "streams2" interfaces - // from early versions of Node.js, but they are still used widely across the ecosystem. - // Accordingly, they are commonly used as "in-types" for @types/node APIs, so that - // eg. streams returned from older libraries will still be considered valid input to - // functions which accept stream arguments. - // It's not possible to change or remove these without astronomical levels of breakage. - interface ReadableStream extends EventEmitter { - readable: boolean; - read(size?: number): string | Buffer; - setEncoding(encoding: BufferEncoding): this; - pause(): this; - resume(): this; - isPaused(): boolean; - pipe(destination: T, options?: { end?: boolean | undefined }): T; - unpipe(destination?: WritableStream): this; - unshift(chunk: string | Uint8Array, encoding?: BufferEncoding): void; - wrap(oldStream: ReadableStream): this; - [Symbol.asyncIterator](): AsyncIterableIterator; - } - interface WritableStream extends EventEmitter { - writable: boolean; - write(buffer: Uint8Array | string, cb?: (err?: Error | null) => void): boolean; - write(str: string, encoding?: BufferEncoding, cb?: (err?: Error | null) => void): boolean; - end(cb?: () => void): this; - end(data: string | Uint8Array, cb?: () => void): this; - end(str: string, encoding?: BufferEncoding, cb?: () => void): this; - } - interface ReadWriteStream extends ReadableStream, WritableStream {} - } - } - export = Stream; -} -declare module "stream" { - import stream = require("node:stream"); - export = stream; -} diff --git a/PBandGraphScaffold/node_modules/@types/node/stream/consumers.d.ts b/PBandGraphScaffold/node_modules/@types/node/stream/consumers.d.ts deleted file mode 100644 index 97f260d..0000000 --- a/PBandGraphScaffold/node_modules/@types/node/stream/consumers.d.ts +++ /dev/null @@ -1,38 +0,0 @@ -/** - * The utility consumer functions provide common options for consuming - * streams. - * @since v16.7.0 - */ -declare module "node:stream/consumers" { - import { Blob, NonSharedBuffer } from "node:buffer"; - import { ReadableStream } from "node:stream/web"; - /** - * @since v16.7.0 - * @returns Fulfills with an `ArrayBuffer` containing the full contents of the stream. - */ - function arrayBuffer(stream: ReadableStream | NodeJS.ReadableStream | AsyncIterable): Promise; - /** - * @since v16.7.0 - * @returns Fulfills with a `Blob` containing the full contents of the stream. - */ - function blob(stream: ReadableStream | NodeJS.ReadableStream | AsyncIterable): Promise; - /** - * @since v16.7.0 - * @returns Fulfills with a `Buffer` containing the full contents of the stream. - */ - function buffer(stream: ReadableStream | NodeJS.ReadableStream | AsyncIterable): Promise; - /** - * @since v16.7.0 - * @returns Fulfills with the contents of the stream parsed as a - * UTF-8 encoded string that is then passed through `JSON.parse()`. - */ - function json(stream: ReadableStream | NodeJS.ReadableStream | AsyncIterable): Promise; - /** - * @since v16.7.0 - * @returns Fulfills with the contents of the stream parsed as a UTF-8 encoded string. - */ - function text(stream: ReadableStream | NodeJS.ReadableStream | AsyncIterable): Promise; -} -declare module "stream/consumers" { - export * from "node:stream/consumers"; -} diff --git a/PBandGraphScaffold/node_modules/@types/node/stream/promises.d.ts b/PBandGraphScaffold/node_modules/@types/node/stream/promises.d.ts deleted file mode 100644 index c4bd3ea..0000000 --- a/PBandGraphScaffold/node_modules/@types/node/stream/promises.d.ts +++ /dev/null @@ -1,211 +0,0 @@ -declare module "node:stream/promises" { - import { Abortable } from "node:events"; - import { - FinishedOptions as _FinishedOptions, - PipelineDestination, - PipelineSource, - PipelineTransform, - } from "node:stream"; - import { ReadableStream, WritableStream } from "node:stream/web"; - interface FinishedOptions extends _FinishedOptions { - /** - * If true, removes the listeners registered by this function before the promise is fulfilled. - * @default false - */ - cleanup?: boolean | undefined; - } - /** - * ```js - * import { finished } from 'node:stream/promises'; - * import { createReadStream } from 'node:fs'; - * - * const rs = createReadStream('archive.tar'); - * - * async function run() { - * await finished(rs); - * console.log('Stream is done reading.'); - * } - * - * run().catch(console.error); - * rs.resume(); // Drain the stream. - * ``` - * - * The `finished` API also provides a [callback version](https://nodejs.org/docs/latest-v25.x/api/stream.html#streamfinishedstream-options-callback). - * - * `stream.finished()` leaves dangling event listeners (in particular - * `'error'`, `'end'`, `'finish'` and `'close'`) after the returned promise is - * resolved or rejected. The reason for this is so that unexpected `'error'` - * events (due to incorrect stream implementations) do not cause unexpected - * crashes. If this is unwanted behavior then `options.cleanup` should be set to - * `true`: - * - * ```js - * await finished(rs, { cleanup: true }); - * ``` - * @since v15.0.0 - * @returns Fulfills when the stream is no longer readable or writable. - */ - function finished( - stream: NodeJS.ReadableStream | NodeJS.WritableStream | ReadableStream | WritableStream, - options?: FinishedOptions, - ): Promise; - interface PipelineOptions extends Abortable { - end?: boolean | undefined; - } - type PipelineResult> = S extends (...args: any[]) => PromiseLike - ? Promise - : Promise; - /** - * ```js - * import { pipeline } from 'node:stream/promises'; - * import { createReadStream, createWriteStream } from 'node:fs'; - * import { createGzip } from 'node:zlib'; - * - * await pipeline( - * createReadStream('archive.tar'), - * createGzip(), - * createWriteStream('archive.tar.gz'), - * ); - * console.log('Pipeline succeeded.'); - * ``` - * - * To use an `AbortSignal`, pass it inside an options object, as the last argument. - * When the signal is aborted, `destroy` will be called on the underlying pipeline, - * with an `AbortError`. - * - * ```js - * import { pipeline } from 'node:stream/promises'; - * import { createReadStream, createWriteStream } from 'node:fs'; - * import { createGzip } from 'node:zlib'; - * - * const ac = new AbortController(); - * const { signal } = ac; - * setImmediate(() => ac.abort()); - * try { - * await pipeline( - * createReadStream('archive.tar'), - * createGzip(), - * createWriteStream('archive.tar.gz'), - * { signal }, - * ); - * } catch (err) { - * console.error(err); // AbortError - * } - * ``` - * - * The `pipeline` API also supports async generators: - * - * ```js - * import { pipeline } from 'node:stream/promises'; - * import { createReadStream, createWriteStream } from 'node:fs'; - * - * await pipeline( - * createReadStream('lowercase.txt'), - * async function* (source, { signal }) { - * source.setEncoding('utf8'); // Work with strings rather than `Buffer`s. - * for await (const chunk of source) { - * yield await processChunk(chunk, { signal }); - * } - * }, - * createWriteStream('uppercase.txt'), - * ); - * console.log('Pipeline succeeded.'); - * ``` - * - * Remember to handle the `signal` argument passed into the async generator. - * Especially in the case where the async generator is the source for the - * pipeline (i.e. first argument) or the pipeline will never complete. - * - * ```js - * import { pipeline } from 'node:stream/promises'; - * import fs from 'node:fs'; - * await pipeline( - * async function* ({ signal }) { - * await someLongRunningfn({ signal }); - * yield 'asd'; - * }, - * fs.createWriteStream('uppercase.txt'), - * ); - * console.log('Pipeline succeeded.'); - * ``` - * - * The `pipeline` API provides [callback version](https://nodejs.org/docs/latest-v25.x/api/stream.html#streampipelinesource-transforms-destination-callback): - * @since v15.0.0 - * @returns Fulfills when the pipeline is complete. - */ - function pipeline, B extends PipelineDestination>( - source: A, - destination: B, - options?: PipelineOptions, - ): PipelineResult; - function pipeline< - A extends PipelineSource, - T1 extends PipelineTransform, - B extends PipelineDestination, - >( - source: A, - transform1: T1, - destination: B, - options?: PipelineOptions, - ): PipelineResult; - function pipeline< - A extends PipelineSource, - T1 extends PipelineTransform, - T2 extends PipelineTransform, - B extends PipelineDestination, - >( - source: A, - transform1: T1, - transform2: T2, - destination: B, - options?: PipelineOptions, - ): PipelineResult; - function pipeline< - A extends PipelineSource, - T1 extends PipelineTransform, - T2 extends PipelineTransform, - T3 extends PipelineTransform, - B extends PipelineDestination, - >( - source: A, - transform1: T1, - transform2: T2, - transform3: T3, - destination: B, - options?: PipelineOptions, - ): PipelineResult; - function pipeline< - A extends PipelineSource, - T1 extends PipelineTransform, - T2 extends PipelineTransform, - T3 extends PipelineTransform, - T4 extends PipelineTransform, - B extends PipelineDestination, - >( - source: A, - transform1: T1, - transform2: T2, - transform3: T3, - transform4: T4, - destination: B, - options?: PipelineOptions, - ): PipelineResult; - function pipeline( - streams: readonly [PipelineSource, ...PipelineTransform[], PipelineDestination], - options?: PipelineOptions, - ): Promise; - function pipeline( - ...streams: [PipelineSource, ...PipelineTransform[], PipelineDestination] - ): Promise; - function pipeline( - ...streams: [ - PipelineSource, - ...PipelineTransform[], - PipelineDestination, - options: PipelineOptions, - ] - ): Promise; -} -declare module "stream/promises" { - export * from "node:stream/promises"; -} diff --git a/PBandGraphScaffold/node_modules/@types/node/stream/web.d.ts b/PBandGraphScaffold/node_modules/@types/node/stream/web.d.ts deleted file mode 100644 index 32ce406..0000000 --- a/PBandGraphScaffold/node_modules/@types/node/stream/web.d.ts +++ /dev/null @@ -1,296 +0,0 @@ -declare module "node:stream/web" { - import { TextDecoderCommon, TextDecoderOptions, TextEncoderCommon } from "node:util"; - type CompressionFormat = "brotli" | "deflate" | "deflate-raw" | "gzip"; - type ReadableStreamController = ReadableStreamDefaultController | ReadableByteStreamController; - type ReadableStreamReader = ReadableStreamDefaultReader | ReadableStreamBYOBReader; - type ReadableStreamReaderMode = "byob"; - type ReadableStreamReadResult = ReadableStreamReadValueResult | ReadableStreamReadDoneResult; - type ReadableStreamType = "bytes"; - interface GenericTransformStream { - readonly readable: ReadableStream; - readonly writable: WritableStream; - } - interface QueuingStrategy { - highWaterMark?: number; - size?: QueuingStrategySize; - } - interface QueuingStrategyInit { - highWaterMark: number; - } - interface QueuingStrategySize { - (chunk: T): number; - } - interface ReadableStreamBYOBReaderReadOptions { - min?: number; - } - interface ReadableStreamGenericReader { - readonly closed: Promise; - cancel(reason?: any): Promise; - } - interface ReadableStreamGetReaderOptions { - mode?: ReadableStreamReaderMode; - } - interface ReadableStreamIteratorOptions { - preventCancel?: boolean; - } - interface ReadableStreamReadDoneResult { - done: true; - value: T | undefined; - } - interface ReadableStreamReadValueResult { - done: false; - value: T; - } - interface ReadableWritablePair { - readable: ReadableStream; - writable: WritableStream; - } - interface StreamPipeOptions { - preventAbort?: boolean; - preventCancel?: boolean; - preventClose?: boolean; - signal?: AbortSignal; - } - interface Transformer { - flush?: TransformerFlushCallback; - readableType?: undefined; - start?: TransformerStartCallback; - transform?: TransformerTransformCallback; - writableType?: undefined; - } - interface TransformerFlushCallback { - (controller: TransformStreamDefaultController): void | PromiseLike; - } - interface TransformerStartCallback { - (controller: TransformStreamDefaultController): any; - } - interface TransformerTransformCallback { - (chunk: I, controller: TransformStreamDefaultController): void | PromiseLike; - } - interface UnderlyingByteSource { - autoAllocateChunkSize?: number; - cancel?: UnderlyingSourceCancelCallback; - pull?: (controller: ReadableByteStreamController) => void | PromiseLike; - start?: (controller: ReadableByteStreamController) => any; - type: "bytes"; - } - interface UnderlyingDefaultSource { - cancel?: UnderlyingSourceCancelCallback; - pull?: (controller: ReadableStreamDefaultController) => void | PromiseLike; - start?: (controller: ReadableStreamDefaultController) => any; - type?: undefined; - } - interface UnderlyingSink { - abort?: UnderlyingSinkAbortCallback; - close?: UnderlyingSinkCloseCallback; - start?: UnderlyingSinkStartCallback; - type?: undefined; - write?: UnderlyingSinkWriteCallback; - } - interface UnderlyingSinkAbortCallback { - (reason?: any): void | PromiseLike; - } - interface UnderlyingSinkCloseCallback { - (): void | PromiseLike; - } - interface UnderlyingSinkStartCallback { - (controller: WritableStreamDefaultController): any; - } - interface UnderlyingSinkWriteCallback { - (chunk: W, controller: WritableStreamDefaultController): void | PromiseLike; - } - interface UnderlyingSource { - autoAllocateChunkSize?: number; - cancel?: UnderlyingSourceCancelCallback; - pull?: UnderlyingSourcePullCallback; - start?: UnderlyingSourceStartCallback; - type?: ReadableStreamType; - } - interface UnderlyingSourceCancelCallback { - (reason?: any): void | PromiseLike; - } - interface UnderlyingSourcePullCallback { - (controller: ReadableStreamController): void | PromiseLike; - } - interface UnderlyingSourceStartCallback { - (controller: ReadableStreamController): any; - } - interface ByteLengthQueuingStrategy extends QueuingStrategy { - readonly highWaterMark: number; - readonly size: QueuingStrategySize; - } - var ByteLengthQueuingStrategy: { - prototype: ByteLengthQueuingStrategy; - new(init: QueuingStrategyInit): ByteLengthQueuingStrategy; - }; - interface CompressionStream extends GenericTransformStream { - readonly readable: ReadableStream; - readonly writable: WritableStream; - } - var CompressionStream: { - prototype: CompressionStream; - new(format: CompressionFormat): CompressionStream; - }; - interface CountQueuingStrategy extends QueuingStrategy { - readonly highWaterMark: number; - readonly size: QueuingStrategySize; - } - var CountQueuingStrategy: { - prototype: CountQueuingStrategy; - new(init: QueuingStrategyInit): CountQueuingStrategy; - }; - interface DecompressionStream extends GenericTransformStream { - readonly readable: ReadableStream; - readonly writable: WritableStream; - } - var DecompressionStream: { - prototype: DecompressionStream; - new(format: CompressionFormat): DecompressionStream; - }; - interface ReadableByteStreamController { - readonly byobRequest: ReadableStreamBYOBRequest | null; - readonly desiredSize: number | null; - close(): void; - enqueue(chunk: NodeJS.NonSharedArrayBufferView): void; - error(e?: any): void; - } - var ReadableByteStreamController: { - prototype: ReadableByteStreamController; - new(): ReadableByteStreamController; - }; - interface ReadableStream { - readonly locked: boolean; - cancel(reason?: any): Promise; - getReader(options: { mode: "byob" }): ReadableStreamBYOBReader; - getReader(): ReadableStreamDefaultReader; - getReader(options?: ReadableStreamGetReaderOptions): ReadableStreamReader; - pipeThrough(transform: ReadableWritablePair, options?: StreamPipeOptions): ReadableStream; - pipeTo(destination: WritableStream, options?: StreamPipeOptions): Promise; - tee(): [ReadableStream, ReadableStream]; - [Symbol.asyncIterator](options?: ReadableStreamIteratorOptions): ReadableStreamAsyncIterator; - values(options?: ReadableStreamIteratorOptions): ReadableStreamAsyncIterator; - } - var ReadableStream: { - prototype: ReadableStream; - new( - underlyingSource: UnderlyingByteSource, - strategy?: { highWaterMark?: number }, - ): ReadableStream; - new(underlyingSource: UnderlyingDefaultSource, strategy?: QueuingStrategy): ReadableStream; - new(underlyingSource?: UnderlyingSource, strategy?: QueuingStrategy): ReadableStream; - from(iterable: Iterable | AsyncIterable): ReadableStream; - }; - interface ReadableStreamAsyncIterator extends NodeJS.AsyncIterator { - [Symbol.asyncIterator](): ReadableStreamAsyncIterator; - } - interface ReadableStreamBYOBReader extends ReadableStreamGenericReader { - read( - view: T, - options?: ReadableStreamBYOBReaderReadOptions, - ): Promise>; - releaseLock(): void; - } - var ReadableStreamBYOBReader: { - prototype: ReadableStreamBYOBReader; - new(stream: ReadableStream): ReadableStreamBYOBReader; - }; - interface ReadableStreamBYOBRequest { - readonly view: NodeJS.NonSharedArrayBufferView | null; - respond(bytesWritten: number): void; - respondWithNewView(view: NodeJS.NonSharedArrayBufferView): void; - } - var ReadableStreamBYOBRequest: { - prototype: ReadableStreamBYOBRequest; - new(): ReadableStreamBYOBRequest; - }; - interface ReadableStreamDefaultController { - readonly desiredSize: number | null; - close(): void; - enqueue(chunk?: R): void; - error(e?: any): void; - } - var ReadableStreamDefaultController: { - prototype: ReadableStreamDefaultController; - new(): ReadableStreamDefaultController; - }; - interface ReadableStreamDefaultReader extends ReadableStreamGenericReader { - read(): Promise>; - releaseLock(): void; - } - var ReadableStreamDefaultReader: { - prototype: ReadableStreamDefaultReader; - new(stream: ReadableStream): ReadableStreamDefaultReader; - }; - interface TextDecoderStream extends GenericTransformStream, TextDecoderCommon { - readonly readable: ReadableStream; - readonly writable: WritableStream; - } - var TextDecoderStream: { - prototype: TextDecoderStream; - new(label?: string, options?: TextDecoderOptions): TextDecoderStream; - }; - interface TextEncoderStream extends GenericTransformStream, TextEncoderCommon { - readonly readable: ReadableStream; - readonly writable: WritableStream; - } - var TextEncoderStream: { - prototype: TextEncoderStream; - new(): TextEncoderStream; - }; - interface TransformStream { - readonly readable: ReadableStream; - readonly writable: WritableStream; - } - var TransformStream: { - prototype: TransformStream; - new( - transformer?: Transformer, - writableStrategy?: QueuingStrategy, - readableStrategy?: QueuingStrategy, - ): TransformStream; - }; - interface TransformStreamDefaultController { - readonly desiredSize: number | null; - enqueue(chunk?: O): void; - error(reason?: any): void; - terminate(): void; - } - var TransformStreamDefaultController: { - prototype: TransformStreamDefaultController; - new(): TransformStreamDefaultController; - }; - interface WritableStream { - readonly locked: boolean; - abort(reason?: any): Promise; - close(): Promise; - getWriter(): WritableStreamDefaultWriter; - } - var WritableStream: { - prototype: WritableStream; - new(underlyingSink?: UnderlyingSink, strategy?: QueuingStrategy): WritableStream; - }; - interface WritableStreamDefaultController { - readonly signal: AbortSignal; - error(e?: any): void; - } - var WritableStreamDefaultController: { - prototype: WritableStreamDefaultController; - new(): WritableStreamDefaultController; - }; - interface WritableStreamDefaultWriter { - readonly closed: Promise; - readonly desiredSize: number | null; - readonly ready: Promise; - abort(reason?: any): Promise; - close(): Promise; - releaseLock(): void; - write(chunk?: W): Promise; - } - var WritableStreamDefaultWriter: { - prototype: WritableStreamDefaultWriter; - new(stream: WritableStream): WritableStreamDefaultWriter; - }; -} -declare module "stream/web" { - export * from "node:stream/web"; -} diff --git a/PBandGraphScaffold/node_modules/@types/node/string_decoder.d.ts b/PBandGraphScaffold/node_modules/@types/node/string_decoder.d.ts deleted file mode 100644 index a72c374..0000000 --- a/PBandGraphScaffold/node_modules/@types/node/string_decoder.d.ts +++ /dev/null @@ -1,67 +0,0 @@ -/** - * The `node:string_decoder` module provides an API for decoding `Buffer` objects - * into strings in a manner that preserves encoded multi-byte UTF-8 and UTF-16 - * characters. It can be accessed using: - * - * ```js - * import { StringDecoder } from 'node:string_decoder'; - * ``` - * - * The following example shows the basic use of the `StringDecoder` class. - * - * ```js - * import { StringDecoder } from 'node:string_decoder'; - * const decoder = new StringDecoder('utf8'); - * - * const cent = Buffer.from([0xC2, 0xA2]); - * console.log(decoder.write(cent)); // Prints: ¢ - * - * const euro = Buffer.from([0xE2, 0x82, 0xAC]); - * console.log(decoder.write(euro)); // Prints: € - * ``` - * - * When a `Buffer` instance is written to the `StringDecoder` instance, an - * internal buffer is used to ensure that the decoded string does not contain - * any incomplete multibyte characters. These are held in the buffer until the - * next call to `stringDecoder.write()` or until `stringDecoder.end()` is called. - * - * In the following example, the three UTF-8 encoded bytes of the European Euro - * symbol (`€`) are written over three separate operations: - * - * ```js - * import { StringDecoder } from 'node:string_decoder'; - * const decoder = new StringDecoder('utf8'); - * - * decoder.write(Buffer.from([0xE2])); - * decoder.write(Buffer.from([0x82])); - * console.log(decoder.end(Buffer.from([0xAC]))); // Prints: € - * ``` - * @see [source](https://github.com/nodejs/node/blob/v25.x/lib/string_decoder.js) - */ -declare module "node:string_decoder" { - class StringDecoder { - constructor(encoding?: BufferEncoding); - /** - * Returns a decoded string, ensuring that any incomplete multibyte characters at - * the end of the `Buffer`, or `TypedArray`, or `DataView` are omitted from the - * returned string and stored in an internal buffer for the next call to `stringDecoder.write()` or `stringDecoder.end()`. - * @since v0.1.99 - * @param buffer The bytes to decode. - */ - write(buffer: string | NodeJS.ArrayBufferView): string; - /** - * Returns any remaining input stored in the internal buffer as a string. Bytes - * representing incomplete UTF-8 and UTF-16 characters will be replaced with - * substitution characters appropriate for the character encoding. - * - * If the `buffer` argument is provided, one final call to `stringDecoder.write()` is performed before returning the remaining input. - * After `end()` is called, the `stringDecoder` object can be reused for new input. - * @since v0.9.3 - * @param buffer The bytes to decode. - */ - end(buffer?: string | NodeJS.ArrayBufferView): string; - } -} -declare module "string_decoder" { - export * from "node:string_decoder"; -} diff --git a/PBandGraphScaffold/node_modules/@types/node/test.d.ts b/PBandGraphScaffold/node_modules/@types/node/test.d.ts deleted file mode 100644 index 12d1af3..0000000 --- a/PBandGraphScaffold/node_modules/@types/node/test.d.ts +++ /dev/null @@ -1,2239 +0,0 @@ -/** - * The `node:test` module facilitates the creation of JavaScript tests. - * To access it: - * - * ```js - * import test from 'node:test'; - * ``` - * - * This module is only available under the `node:` scheme. The following will not - * work: - * - * ```js - * import test from 'node:test'; - * ``` - * - * Tests created via the `test` module consist of a single function that is - * processed in one of three ways: - * - * 1. A synchronous function that is considered failing if it throws an exception, - * and is considered passing otherwise. - * 2. A function that returns a `Promise` that is considered failing if the `Promise` rejects, and is considered passing if the `Promise` fulfills. - * 3. A function that receives a callback function. If the callback receives any - * truthy value as its first argument, the test is considered failing. If a - * falsy value is passed as the first argument to the callback, the test is - * considered passing. If the test function receives a callback function and - * also returns a `Promise`, the test will fail. - * - * The following example illustrates how tests are written using the `test` module. - * - * ```js - * test('synchronous passing test', (t) => { - * // This test passes because it does not throw an exception. - * assert.strictEqual(1, 1); - * }); - * - * test('synchronous failing test', (t) => { - * // This test fails because it throws an exception. - * assert.strictEqual(1, 2); - * }); - * - * test('asynchronous passing test', async (t) => { - * // This test passes because the Promise returned by the async - * // function is settled and not rejected. - * assert.strictEqual(1, 1); - * }); - * - * test('asynchronous failing test', async (t) => { - * // This test fails because the Promise returned by the async - * // function is rejected. - * assert.strictEqual(1, 2); - * }); - * - * test('failing test using Promises', (t) => { - * // Promises can be used directly as well. - * return new Promise((resolve, reject) => { - * setImmediate(() => { - * reject(new Error('this will cause the test to fail')); - * }); - * }); - * }); - * - * test('callback passing test', (t, done) => { - * // done() is the callback function. When the setImmediate() runs, it invokes - * // done() with no arguments. - * setImmediate(done); - * }); - * - * test('callback failing test', (t, done) => { - * // When the setImmediate() runs, done() is invoked with an Error object and - * // the test fails. - * setImmediate(() => { - * done(new Error('callback failure')); - * }); - * }); - * ``` - * - * If any tests fail, the process exit code is set to `1`. - * @since v18.0.0, v16.17.0 - * @see [source](https://github.com/nodejs/node/blob/v25.x/lib/test.js) - */ -declare module "node:test" { - import { AssertMethodNames } from "node:assert"; - import { Readable, ReadableEventMap } from "node:stream"; - import { TestEvent } from "node:test/reporters"; - import TestFn = test.TestFn; - import TestOptions = test.TestOptions; - /** - * The `test()` function is the value imported from the `test` module. Each - * invocation of this function results in reporting the test to the `TestsStream`. - * - * The `TestContext` object passed to the `fn` argument can be used to perform - * actions related to the current test. Examples include skipping the test, adding - * additional diagnostic information, or creating subtests. - * - * `test()` returns a `Promise` that fulfills once the test completes. - * if `test()` is called within a suite, it fulfills immediately. - * The return value can usually be discarded for top level tests. - * However, the return value from subtests should be used to prevent the parent - * test from finishing first and cancelling the subtest - * as shown in the following example. - * - * ```js - * test('top level test', async (t) => { - * // The setTimeout() in the following subtest would cause it to outlive its - * // parent test if 'await' is removed on the next line. Once the parent test - * // completes, it will cancel any outstanding subtests. - * await t.test('longer running subtest', async (t) => { - * return new Promise((resolve, reject) => { - * setTimeout(resolve, 1000); - * }); - * }); - * }); - * ``` - * - * The `timeout` option can be used to fail the test if it takes longer than `timeout` milliseconds to complete. However, it is not a reliable mechanism for - * canceling tests because a running test might block the application thread and - * thus prevent the scheduled cancellation. - * @since v18.0.0, v16.17.0 - * @param name The name of the test, which is displayed when reporting test results. - * Defaults to the `name` property of `fn`, or `''` if `fn` does not have a name. - * @param options Configuration options for the test. - * @param fn The function under test. The first argument to this function is a {@link TestContext} object. - * If the test uses callbacks, the callback function is passed as the second argument. - * @return Fulfilled with `undefined` once the test completes, or immediately if the test runs within a suite. - */ - function test(name?: string, fn?: TestFn): Promise; - function test(name?: string, options?: TestOptions, fn?: TestFn): Promise; - function test(options?: TestOptions, fn?: TestFn): Promise; - function test(fn?: TestFn): Promise; - namespace test { - export { test }; - export { suite as describe, test as it }; - } - namespace test { - /** - * **Note:** `shard` is used to horizontally parallelize test running across - * machines or processes, ideal for large-scale executions across varied - * environments. It's incompatible with `watch` mode, tailored for rapid - * code iteration by automatically rerunning tests on file changes. - * - * ```js - * import { tap } from 'node:test/reporters'; - * import { run } from 'node:test'; - * import process from 'node:process'; - * import path from 'node:path'; - * - * run({ files: [path.resolve('./tests/test.js')] }) - * .compose(tap) - * .pipe(process.stdout); - * ``` - * @since v18.9.0, v16.19.0 - * @param options Configuration options for running tests. - */ - function run(options?: RunOptions): TestsStream; - /** - * The `suite()` function is imported from the `node:test` module. - * @param name The name of the suite, which is displayed when reporting test results. - * Defaults to the `name` property of `fn`, or `''` if `fn` does not have a name. - * @param options Configuration options for the suite. This supports the same options as {@link test}. - * @param fn The suite function declaring nested tests and suites. The first argument to this function is a {@link SuiteContext} object. - * @return Immediately fulfilled with `undefined`. - * @since v20.13.0 - */ - function suite(name?: string, options?: TestOptions, fn?: SuiteFn): Promise; - function suite(name?: string, fn?: SuiteFn): Promise; - function suite(options?: TestOptions, fn?: SuiteFn): Promise; - function suite(fn?: SuiteFn): Promise; - namespace suite { - /** - * Shorthand for skipping a suite. This is the same as calling {@link suite} with `options.skip` set to `true`. - * @since v20.13.0 - */ - function skip(name?: string, options?: TestOptions, fn?: SuiteFn): Promise; - function skip(name?: string, fn?: SuiteFn): Promise; - function skip(options?: TestOptions, fn?: SuiteFn): Promise; - function skip(fn?: SuiteFn): Promise; - /** - * Shorthand for marking a suite as `TODO`. This is the same as calling {@link suite} with `options.todo` set to `true`. - * @since v20.13.0 - */ - function todo(name?: string, options?: TestOptions, fn?: SuiteFn): Promise; - function todo(name?: string, fn?: SuiteFn): Promise; - function todo(options?: TestOptions, fn?: SuiteFn): Promise; - function todo(fn?: SuiteFn): Promise; - /** - * Shorthand for marking a suite as `only`. This is the same as calling {@link suite} with `options.only` set to `true`. - * @since v20.13.0 - */ - function only(name?: string, options?: TestOptions, fn?: SuiteFn): Promise; - function only(name?: string, fn?: SuiteFn): Promise; - function only(options?: TestOptions, fn?: SuiteFn): Promise; - function only(fn?: SuiteFn): Promise; - } - /** - * Shorthand for skipping a test. This is the same as calling {@link test} with `options.skip` set to `true`. - * @since v20.2.0 - */ - function skip(name?: string, options?: TestOptions, fn?: TestFn): Promise; - function skip(name?: string, fn?: TestFn): Promise; - function skip(options?: TestOptions, fn?: TestFn): Promise; - function skip(fn?: TestFn): Promise; - /** - * Shorthand for marking a test as `TODO`. This is the same as calling {@link test} with `options.todo` set to `true`. - * @since v20.2.0 - */ - function todo(name?: string, options?: TestOptions, fn?: TestFn): Promise; - function todo(name?: string, fn?: TestFn): Promise; - function todo(options?: TestOptions, fn?: TestFn): Promise; - function todo(fn?: TestFn): Promise; - /** - * Shorthand for marking a test as `only`. This is the same as calling {@link test} with `options.only` set to `true`. - * @since v20.2.0 - */ - function only(name?: string, options?: TestOptions, fn?: TestFn): Promise; - function only(name?: string, fn?: TestFn): Promise; - function only(options?: TestOptions, fn?: TestFn): Promise; - function only(fn?: TestFn): Promise; - /** - * The type of a function passed to {@link test}. The first argument to this function is a {@link TestContext} object. - * If the test uses callbacks, the callback function is passed as the second argument. - */ - type TestFn = (t: TestContext, done: (result?: any) => void) => void | Promise; - /** - * The type of a suite test function. The argument to this function is a {@link SuiteContext} object. - */ - type SuiteFn = (s: SuiteContext) => void | Promise; - interface TestShard { - /** - * A positive integer between 1 and `total` that specifies the index of the shard to run. - */ - index: number; - /** - * A positive integer that specifies the total number of shards to split the test files to. - */ - total: number; - } - interface RunOptions { - /** - * If a number is provided, then that many test processes would run in parallel, where each process corresponds to one test file. - * If `true`, it would run `os.availableParallelism() - 1` test files in parallel. If `false`, it would only run one test file at a time. - * @default false - */ - concurrency?: number | boolean | undefined; - /** - * Specifies the current working directory to be used by the test runner. - * Serves as the base path for resolving files according to the - * [test runner execution model](https://nodejs.org/docs/latest-v25.x/api/test.html#test-runner-execution-model). - * @since v23.0.0 - * @default process.cwd() - */ - cwd?: string | undefined; - /** - * An array containing the list of files to run. If omitted, files are run according to the - * [test runner execution model](https://nodejs.org/docs/latest-v25.x/api/test.html#test-runner-execution-model). - */ - files?: readonly string[] | undefined; - /** - * Configures the test runner to exit the process once all known - * tests have finished executing even if the event loop would - * otherwise remain active. - * @default false - */ - forceExit?: boolean | undefined; - /** - * An array containing the list of glob patterns to match test files. - * This option cannot be used together with `files`. If omitted, files are run according to the - * [test runner execution model](https://nodejs.org/docs/latest-v25.x/api/test.html#test-runner-execution-model). - * @since v22.6.0 - */ - globPatterns?: readonly string[] | undefined; - /** - * Sets inspector port of test child process. - * This can be a number, or a function that takes no arguments and returns a - * number. If a nullish value is provided, each process gets its own port, - * incremented from the primary's `process.debugPort`. This option is ignored - * if the `isolation` option is set to `'none'` as no child processes are - * spawned. - * @default undefined - */ - inspectPort?: number | (() => number) | undefined; - /** - * Configures the type of test isolation. If set to - * `'process'`, each test file is run in a separate child process. If set to - * `'none'`, all test files run in the current process. - * @default 'process' - * @since v22.8.0 - */ - isolation?: "process" | "none" | undefined; - /** - * If truthy, the test context will only run tests that have the `only` option set - */ - only?: boolean | undefined; - /** - * A function that accepts the `TestsStream` instance and can be used to setup listeners before any tests are run. - * @default undefined - */ - setup?: ((reporter: TestsStream) => void | Promise) | undefined; - /** - * An array of CLI flags to pass to the `node` executable when - * spawning the subprocesses. This option has no effect when `isolation` is `'none`'. - * @since v22.10.0 - * @default [] - */ - execArgv?: readonly string[] | undefined; - /** - * An array of CLI flags to pass to each test file when spawning the - * subprocesses. This option has no effect when `isolation` is `'none'`. - * @since v22.10.0 - * @default [] - */ - argv?: readonly string[] | undefined; - /** - * Allows aborting an in-progress test execution. - */ - signal?: AbortSignal | undefined; - /** - * If provided, only run tests whose name matches the provided pattern. - * Strings are interpreted as JavaScript regular expressions. - * @default undefined - */ - testNamePatterns?: string | RegExp | ReadonlyArray | undefined; - /** - * A String, RegExp or a RegExp Array, that can be used to exclude running tests whose - * name matches the provided pattern. Test name patterns are interpreted as JavaScript - * regular expressions. For each test that is executed, any corresponding test hooks, - * such as `beforeEach()`, are also run. - * @default undefined - * @since v22.1.0 - */ - testSkipPatterns?: string | RegExp | ReadonlyArray | undefined; - /** - * The number of milliseconds after which the test execution will fail. - * If unspecified, subtests inherit this value from their parent. - * @default Infinity - */ - timeout?: number | undefined; - /** - * Whether to run in watch mode or not. - * @default false - */ - watch?: boolean | undefined; - /** - * Running tests in a specific shard. - * @default undefined - */ - shard?: TestShard | undefined; - /** - * A file path where the test runner will - * store the state of the tests to allow rerunning only the failed tests on a next run. - * @since v24.7.0 - * @default undefined - */ - rerunFailuresFilePath?: string | undefined; - /** - * enable [code coverage](https://nodejs.org/docs/latest-v25.x/api/test.html#collecting-code-coverage) collection. - * @since v22.10.0 - * @default false - */ - coverage?: boolean | undefined; - /** - * Excludes specific files from code coverage - * using a glob pattern, which can match both absolute and relative file paths. - * This property is only applicable when `coverage` was set to `true`. - * If both `coverageExcludeGlobs` and `coverageIncludeGlobs` are provided, - * files must meet **both** criteria to be included in the coverage report. - * @since v22.10.0 - * @default undefined - */ - coverageExcludeGlobs?: string | readonly string[] | undefined; - /** - * Includes specific files in code coverage - * using a glob pattern, which can match both absolute and relative file paths. - * This property is only applicable when `coverage` was set to `true`. - * If both `coverageExcludeGlobs` and `coverageIncludeGlobs` are provided, - * files must meet **both** criteria to be included in the coverage report. - * @since v22.10.0 - * @default undefined - */ - coverageIncludeGlobs?: string | readonly string[] | undefined; - /** - * Require a minimum percent of covered lines. If code - * coverage does not reach the threshold specified, the process will exit with code `1`. - * @since v22.10.0 - * @default 0 - */ - lineCoverage?: number | undefined; - /** - * Require a minimum percent of covered branches. If code - * coverage does not reach the threshold specified, the process will exit with code `1`. - * @since v22.10.0 - * @default 0 - */ - branchCoverage?: number | undefined; - /** - * Require a minimum percent of covered functions. If code - * coverage does not reach the threshold specified, the process will exit with code `1`. - * @since v22.10.0 - * @default 0 - */ - functionCoverage?: number | undefined; - } - interface TestsStreamEventMap extends ReadableEventMap { - "data": [data: TestEvent]; - "test:coverage": [data: EventData.TestCoverage]; - "test:complete": [data: EventData.TestComplete]; - "test:dequeue": [data: EventData.TestDequeue]; - "test:diagnostic": [data: EventData.TestDiagnostic]; - "test:enqueue": [data: EventData.TestEnqueue]; - "test:fail": [data: EventData.TestFail]; - "test:pass": [data: EventData.TestPass]; - "test:plan": [data: EventData.TestPlan]; - "test:start": [data: EventData.TestStart]; - "test:stderr": [data: EventData.TestStderr]; - "test:stdout": [data: EventData.TestStdout]; - "test:summary": [data: EventData.TestSummary]; - "test:watch:drained": []; - "test:watch:restarted": []; - } - /** - * A successful call to `run()` will return a new `TestsStream` object, streaming a series of events representing the execution of the tests. - * - * Some of the events are guaranteed to be emitted in the same order as the tests are defined, while others are emitted in the order that the tests execute. - * @since v18.9.0, v16.19.0 - */ - interface TestsStream extends Readable { - // #region InternalEventEmitter - addListener( - eventName: E, - listener: (...args: TestsStreamEventMap[E]) => void, - ): this; - addListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - emit(eventName: E, ...args: TestsStreamEventMap[E]): boolean; - emit(eventName: string | symbol, ...args: any[]): boolean; - listenerCount( - eventName: E, - listener?: (...args: TestsStreamEventMap[E]) => void, - ): number; - listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number; - listeners(eventName: E): ((...args: TestsStreamEventMap[E]) => void)[]; - listeners(eventName: string | symbol): ((...args: any[]) => void)[]; - off( - eventName: E, - listener: (...args: TestsStreamEventMap[E]) => void, - ): this; - off(eventName: string | symbol, listener: (...args: any[]) => void): this; - on( - eventName: E, - listener: (...args: TestsStreamEventMap[E]) => void, - ): this; - on(eventName: string | symbol, listener: (...args: any[]) => void): this; - once( - eventName: E, - listener: (...args: TestsStreamEventMap[E]) => void, - ): this; - once(eventName: string | symbol, listener: (...args: any[]) => void): this; - prependListener( - eventName: E, - listener: (...args: TestsStreamEventMap[E]) => void, - ): this; - prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - prependOnceListener( - eventName: E, - listener: (...args: TestsStreamEventMap[E]) => void, - ): this; - prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - rawListeners( - eventName: E, - ): ((...args: TestsStreamEventMap[E]) => void)[]; - rawListeners(eventName: string | symbol): ((...args: any[]) => void)[]; - // eslint-disable-next-line @definitelytyped/no-unnecessary-generics - removeAllListeners(eventName?: E): this; - removeAllListeners(eventName?: string | symbol): this; - removeListener( - eventName: E, - listener: (...args: TestsStreamEventMap[E]) => void, - ): this; - removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - // #endregion - } - namespace EventData { - interface Error extends globalThis.Error { - cause: globalThis.Error; - } - interface LocationInfo { - /** - * The column number where the test is defined, or - * `undefined` if the test was run through the REPL. - */ - column?: number; - /** - * The path of the test file, `undefined` if test was run through the REPL. - */ - file?: string; - /** - * The line number where the test is defined, or `undefined` if the test was run through the REPL. - */ - line?: number; - } - interface TestDiagnostic extends LocationInfo { - /** - * The diagnostic message. - */ - message: string; - /** - * The nesting level of the test. - */ - nesting: number; - /** - * The severity level of the diagnostic message. - * Possible values are: - * * `'info'`: Informational messages. - * * `'warn'`: Warnings. - * * `'error'`: Errors. - */ - level: "info" | "warn" | "error"; - } - interface TestCoverage { - /** - * An object containing the coverage report. - */ - summary: { - /** - * An array of coverage reports for individual files. - */ - files: Array<{ - /** - * The absolute path of the file. - */ - path: string; - /** - * The total number of lines. - */ - totalLineCount: number; - /** - * The total number of branches. - */ - totalBranchCount: number; - /** - * The total number of functions. - */ - totalFunctionCount: number; - /** - * The number of covered lines. - */ - coveredLineCount: number; - /** - * The number of covered branches. - */ - coveredBranchCount: number; - /** - * The number of covered functions. - */ - coveredFunctionCount: number; - /** - * The percentage of lines covered. - */ - coveredLinePercent: number; - /** - * The percentage of branches covered. - */ - coveredBranchPercent: number; - /** - * The percentage of functions covered. - */ - coveredFunctionPercent: number; - /** - * An array of functions representing function coverage. - */ - functions: Array<{ - /** - * The name of the function. - */ - name: string; - /** - * The line number where the function is defined. - */ - line: number; - /** - * The number of times the function was called. - */ - count: number; - }>; - /** - * An array of branches representing branch coverage. - */ - branches: Array<{ - /** - * The line number where the branch is defined. - */ - line: number; - /** - * The number of times the branch was taken. - */ - count: number; - }>; - /** - * An array of lines representing line numbers and the number of times they were covered. - */ - lines: Array<{ - /** - * The line number. - */ - line: number; - /** - * The number of times the line was covered. - */ - count: number; - }>; - }>; - /** - * An object containing whether or not the coverage for - * each coverage type. - * @since v22.9.0 - */ - thresholds: { - /** - * The function coverage threshold. - */ - function: number; - /** - * The branch coverage threshold. - */ - branch: number; - /** - * The line coverage threshold. - */ - line: number; - }; - /** - * An object containing a summary of coverage for all files. - */ - totals: { - /** - * The total number of lines. - */ - totalLineCount: number; - /** - * The total number of branches. - */ - totalBranchCount: number; - /** - * The total number of functions. - */ - totalFunctionCount: number; - /** - * The number of covered lines. - */ - coveredLineCount: number; - /** - * The number of covered branches. - */ - coveredBranchCount: number; - /** - * The number of covered functions. - */ - coveredFunctionCount: number; - /** - * The percentage of lines covered. - */ - coveredLinePercent: number; - /** - * The percentage of branches covered. - */ - coveredBranchPercent: number; - /** - * The percentage of functions covered. - */ - coveredFunctionPercent: number; - }; - /** - * The working directory when code coverage began. This - * is useful for displaying relative path names in case - * the tests changed the working directory of the Node.js process. - */ - workingDirectory: string; - }; - /** - * The nesting level of the test. - */ - nesting: number; - } - interface TestComplete extends LocationInfo { - /** - * Additional execution metadata. - */ - details: { - /** - * Whether the test passed or not. - */ - passed: boolean; - /** - * The duration of the test in milliseconds. - */ - duration_ms: number; - /** - * An error wrapping the error thrown by the test if it did not pass. - */ - error?: Error; - /** - * The type of the test, used to denote whether this is a suite. - */ - type?: "suite" | "test"; - }; - /** - * The test name. - */ - name: string; - /** - * The nesting level of the test. - */ - nesting: number; - /** - * The ordinal number of the test. - */ - testNumber: number; - /** - * Present if `context.todo` is called. - */ - todo?: string | boolean; - /** - * Present if `context.skip` is called. - */ - skip?: string | boolean; - } - interface TestDequeue extends LocationInfo { - /** - * The test name. - */ - name: string; - /** - * The nesting level of the test. - */ - nesting: number; - /** - * The test type. Either `'suite'` or `'test'`. - * @since v22.15.0 - */ - type: "suite" | "test"; - } - interface TestEnqueue extends LocationInfo { - /** - * The test name. - */ - name: string; - /** - * The nesting level of the test. - */ - nesting: number; - /** - * The test type. Either `'suite'` or `'test'`. - * @since v22.15.0 - */ - type: "suite" | "test"; - } - interface TestFail extends LocationInfo { - /** - * Additional execution metadata. - */ - details: { - /** - * The duration of the test in milliseconds. - */ - duration_ms: number; - /** - * An error wrapping the error thrown by the test. - */ - error: Error; - /** - * The type of the test, used to denote whether this is a suite. - * @since v20.0.0, v19.9.0, v18.17.0 - */ - type?: "suite" | "test"; - /** - * The attempt number of the test run, - * present only when using the `--test-rerun-failures` flag. - * @since v24.7.0 - */ - attempt?: number; - }; - /** - * The test name. - */ - name: string; - /** - * The nesting level of the test. - */ - nesting: number; - /** - * The ordinal number of the test. - */ - testNumber: number; - /** - * Present if `context.todo` is called. - */ - todo?: string | boolean; - /** - * Present if `context.skip` is called. - */ - skip?: string | boolean; - } - interface TestPass extends LocationInfo { - /** - * Additional execution metadata. - */ - details: { - /** - * The duration of the test in milliseconds. - */ - duration_ms: number; - /** - * The type of the test, used to denote whether this is a suite. - * @since 20.0.0, 19.9.0, 18.17.0 - */ - type?: "suite" | "test"; - /** - * The attempt number of the test run, - * present only when using the `--test-rerun-failures` flag. - * @since v24.7.0 - */ - attempt?: number; - /** - * The attempt number the test passed on, - * present only when using the `--test-rerun-failures` flag. - * @since v24.7.0 - */ - passed_on_attempt?: number; - }; - /** - * The test name. - */ - name: string; - /** - * The nesting level of the test. - */ - nesting: number; - /** - * The ordinal number of the test. - */ - testNumber: number; - /** - * Present if `context.todo` is called. - */ - todo?: string | boolean; - /** - * Present if `context.skip` is called. - */ - skip?: string | boolean; - } - interface TestPlan extends LocationInfo { - /** - * The nesting level of the test. - */ - nesting: number; - /** - * The number of subtests that have ran. - */ - count: number; - } - interface TestStart extends LocationInfo { - /** - * The test name. - */ - name: string; - /** - * The nesting level of the test. - */ - nesting: number; - } - interface TestStderr { - /** - * The path of the test file. - */ - file: string; - /** - * The message written to `stderr`. - */ - message: string; - } - interface TestStdout { - /** - * The path of the test file. - */ - file: string; - /** - * The message written to `stdout`. - */ - message: string; - } - interface TestSummary { - /** - * An object containing the counts of various test results. - */ - counts: { - /** - * The total number of cancelled tests. - */ - cancelled: number; - /** - * The total number of passed tests. - */ - passed: number; - /** - * The total number of skipped tests. - */ - skipped: number; - /** - * The total number of suites run. - */ - suites: number; - /** - * The total number of tests run, excluding suites. - */ - tests: number; - /** - * The total number of TODO tests. - */ - todo: number; - /** - * The total number of top level tests and suites. - */ - topLevel: number; - }; - /** - * The duration of the test run in milliseconds. - */ - duration_ms: number; - /** - * The path of the test file that generated the - * summary. If the summary corresponds to multiple files, this value is - * `undefined`. - */ - file: string | undefined; - /** - * Indicates whether or not the test run is considered - * successful or not. If any error condition occurs, such as a failing test or - * unmet coverage threshold, this value will be set to `false`. - */ - success: boolean; - } - } - /** - * An instance of `TestContext` is passed to each test function in order to - * interact with the test runner. However, the `TestContext` constructor is not - * exposed as part of the API. - * @since v18.0.0, v16.17.0 - */ - interface TestContext { - /** - * An object containing assertion methods bound to the test context. - * The top-level functions from the `node:assert` module are exposed here for the purpose of creating test plans. - * - * **Note:** Some of the functions from `node:assert` contain type assertions. If these are called via the - * TestContext `assert` object, then the context parameter in the test's function signature **must be explicitly typed** - * (ie. the parameter must have a type annotation), otherwise an error will be raised by the TypeScript compiler: - * ```ts - * import { test, type TestContext } from 'node:test'; - * - * // The test function's context parameter must have a type annotation. - * test('example', (t: TestContext) => { - * t.assert.deepStrictEqual(actual, expected); - * }); - * - * // Omitting the type annotation will result in a compilation error. - * test('example', t => { - * t.assert.deepStrictEqual(actual, expected); // Error: 't' needs an explicit type annotation. - * }); - * ``` - * @since v22.2.0, v20.15.0 - */ - readonly assert: TestContextAssert; - readonly attempt: number; - /** - * This function is used to create a hook running before subtest of the current test. - * @param fn The hook function. The first argument to this function is a `TestContext` object. - * If the hook uses callbacks, the callback function is passed as the second argument. - * @param options Configuration options for the hook. - * @since v20.1.0, v18.17.0 - */ - before(fn?: TestContextHookFn, options?: HookOptions): void; - /** - * This function is used to create a hook running before each subtest of the current test. - * @param fn The hook function. The first argument to this function is a `TestContext` object. - * If the hook uses callbacks, the callback function is passed as the second argument. - * @param options Configuration options for the hook. - * @since v18.8.0 - */ - beforeEach(fn?: TestContextHookFn, options?: HookOptions): void; - /** - * This function is used to create a hook that runs after the current test finishes. - * @param fn The hook function. The first argument to this function is a `TestContext` object. - * If the hook uses callbacks, the callback function is passed as the second argument. - * @param options Configuration options for the hook. - * @since v18.13.0 - */ - after(fn?: TestContextHookFn, options?: HookOptions): void; - /** - * This function is used to create a hook running after each subtest of the current test. - * @param fn The hook function. The first argument to this function is a `TestContext` object. - * If the hook uses callbacks, the callback function is passed as the second argument. - * @param options Configuration options for the hook. - * @since v18.8.0 - */ - afterEach(fn?: TestContextHookFn, options?: HookOptions): void; - /** - * This function is used to write diagnostics to the output. Any diagnostic - * information is included at the end of the test's results. This function does - * not return a value. - * - * ```js - * test('top level test', (t) => { - * t.diagnostic('A diagnostic message'); - * }); - * ``` - * @since v18.0.0, v16.17.0 - * @param message Message to be reported. - */ - diagnostic(message: string): void; - /** - * The absolute path of the test file that created the current test. If a test file imports - * additional modules that generate tests, the imported tests will return the path of the root test file. - * @since v22.6.0 - */ - readonly filePath: string | undefined; - /** - * The name of the test and each of its ancestors, separated by `>`. - * @since v22.3.0 - */ - readonly fullName: string; - /** - * The name of the test. - * @since v18.8.0, v16.18.0 - */ - readonly name: string; - /** - * This function is used to set the number of assertions and subtests that are expected to run - * within the test. If the number of assertions and subtests that run does not match the - * expected count, the test will fail. - * - * > Note: To make sure assertions are tracked, `t.assert` must be used instead of `assert` directly. - * - * ```js - * test('top level test', (t) => { - * t.plan(2); - * t.assert.ok('some relevant assertion here'); - * t.test('subtest', () => {}); - * }); - * ``` - * - * When working with asynchronous code, the `plan` function can be used to ensure that the - * correct number of assertions are run: - * - * ```js - * test('planning with streams', (t, done) => { - * function* generate() { - * yield 'a'; - * yield 'b'; - * yield 'c'; - * } - * const expected = ['a', 'b', 'c']; - * t.plan(expected.length); - * const stream = Readable.from(generate()); - * stream.on('data', (chunk) => { - * t.assert.strictEqual(chunk, expected.shift()); - * }); - * - * stream.on('end', () => { - * done(); - * }); - * }); - * ``` - * - * When using the `wait` option, you can control how long the test will wait for the expected assertions. - * For example, setting a maximum wait time ensures that the test will wait for asynchronous assertions - * to complete within the specified timeframe: - * - * ```js - * test('plan with wait: 2000 waits for async assertions', (t) => { - * t.plan(1, { wait: 2000 }); // Waits for up to 2 seconds for the assertion to complete. - * - * const asyncActivity = () => { - * setTimeout(() => { - * * t.assert.ok(true, 'Async assertion completed within the wait time'); - * }, 1000); // Completes after 1 second, within the 2-second wait time. - * }; - * - * asyncActivity(); // The test will pass because the assertion is completed in time. - * }); - * ``` - * - * Note: If a `wait` timeout is specified, it begins counting down only after the test function finishes executing. - * @since v22.2.0 - */ - plan(count: number, options?: TestContextPlanOptions): void; - /** - * If `shouldRunOnlyTests` is truthy, the test context will only run tests that - * have the `only` option set. Otherwise, all tests are run. If Node.js was not - * started with the `--test-only` command-line option, this function is a - * no-op. - * - * ```js - * test('top level test', (t) => { - * // The test context can be set to run subtests with the 'only' option. - * t.runOnly(true); - * return Promise.all([ - * t.test('this subtest is now skipped'), - * t.test('this subtest is run', { only: true }), - * ]); - * }); - * ``` - * @since v18.0.0, v16.17.0 - * @param shouldRunOnlyTests Whether or not to run `only` tests. - */ - runOnly(shouldRunOnlyTests: boolean): void; - /** - * ```js - * test('top level test', async (t) => { - * await fetch('some/uri', { signal: t.signal }); - * }); - * ``` - * @since v18.7.0, v16.17.0 - */ - readonly signal: AbortSignal; - /** - * This function causes the test's output to indicate the test as skipped. If `message` is provided, it is included in the output. Calling `skip()` does - * not terminate execution of the test function. This function does not return a - * value. - * - * ```js - * test('top level test', (t) => { - * // Make sure to return here as well if the test contains additional logic. - * t.skip('this is skipped'); - * }); - * ``` - * @since v18.0.0, v16.17.0 - * @param message Optional skip message. - */ - skip(message?: string): void; - /** - * This function adds a `TODO` directive to the test's output. If `message` is - * provided, it is included in the output. Calling `todo()` does not terminate - * execution of the test function. This function does not return a value. - * - * ```js - * test('top level test', (t) => { - * // This test is marked as `TODO` - * t.todo('this is a todo'); - * }); - * ``` - * @since v18.0.0, v16.17.0 - * @param message Optional `TODO` message. - */ - todo(message?: string): void; - /** - * This function is used to create subtests under the current test. This function behaves in - * the same fashion as the top level {@link test} function. - * @since v18.0.0 - * @param name The name of the test, which is displayed when reporting test results. - * Defaults to the `name` property of `fn`, or `''` if `fn` does not have a name. - * @param options Configuration options for the test. - * @param fn The function under test. This first argument to this function is a {@link TestContext} object. - * If the test uses callbacks, the callback function is passed as the second argument. - * @returns A {@link Promise} resolved with `undefined` once the test completes. - */ - test: typeof test; - /** - * This method polls a `condition` function until that function either returns - * successfully or the operation times out. - * @since v22.14.0 - * @param condition An assertion function that is invoked - * periodically until it completes successfully or the defined polling timeout - * elapses. Successful completion is defined as not throwing or rejecting. This - * function does not accept any arguments, and is allowed to return any value. - * @param options An optional configuration object for the polling operation. - * @returns Fulfilled with the value returned by `condition`. - */ - waitFor(condition: () => T, options?: TestContextWaitForOptions): Promise>; - /** - * Each test provides its own MockTracker instance. - */ - readonly mock: MockTracker; - } - interface TestContextAssert extends Pick { - /** - * This function serializes `value` and writes it to the file specified by `path`. - * - * ```js - * test('snapshot test with default serialization', (t) => { - * t.assert.fileSnapshot({ value1: 1, value2: 2 }, './snapshots/snapshot.json'); - * }); - * ``` - * - * This function differs from `context.assert.snapshot()` in the following ways: - * - * * The snapshot file path is explicitly provided by the user. - * * Each snapshot file is limited to a single snapshot value. - * * No additional escaping is performed by the test runner. - * - * These differences allow snapshot files to better support features such as syntax - * highlighting. - * @since v22.14.0 - * @param value A value to serialize to a string. If Node.js was started with - * the [`--test-update-snapshots`](https://nodejs.org/docs/latest-v25.x/api/cli.html#--test-update-snapshots) - * flag, the serialized value is written to - * `path`. Otherwise, the serialized value is compared to the contents of the - * existing snapshot file. - * @param path The file where the serialized `value` is written. - * @param options Optional configuration options. - */ - fileSnapshot(value: any, path: string, options?: AssertSnapshotOptions): void; - /** - * This function implements assertions for snapshot testing. - * ```js - * test('snapshot test with default serialization', (t) => { - * t.assert.snapshot({ value1: 1, value2: 2 }); - * }); - * - * test('snapshot test with custom serialization', (t) => { - * t.assert.snapshot({ value3: 3, value4: 4 }, { - * serializers: [(value) => JSON.stringify(value)] - * }); - * }); - * ``` - * @since v22.3.0 - * @param value A value to serialize to a string. If Node.js was started with - * the [`--test-update-snapshots`](https://nodejs.org/docs/latest-v25.x/api/cli.html#--test-update-snapshots) - * flag, the serialized value is written to - * the snapshot file. Otherwise, the serialized value is compared to the - * corresponding value in the existing snapshot file. - */ - snapshot(value: any, options?: AssertSnapshotOptions): void; - /** - * A custom assertion function registered with `assert.register()`. - */ - [name: string]: (...args: any[]) => void; - } - interface AssertSnapshotOptions { - /** - * An array of synchronous functions used to serialize `value` into a string. - * `value` is passed as the only argument to the first serializer function. - * The return value of each serializer is passed as input to the next serializer. - * Once all serializers have run, the resulting value is coerced to a string. - * - * If no serializers are provided, the test runner's default serializers are used. - */ - serializers?: ReadonlyArray<(value: any) => any> | undefined; - } - interface TestContextPlanOptions { - /** - * The wait time for the plan: - * * If `true`, the plan waits indefinitely for all assertions and subtests to run. - * * If `false`, the plan performs an immediate check after the test function completes, - * without waiting for any pending assertions or subtests. - * Any assertions or subtests that complete after this check will not be counted towards the plan. - * * If a number, it specifies the maximum wait time in milliseconds - * before timing out while waiting for expected assertions and subtests to be matched. - * If the timeout is reached, the test will fail. - * @default false - */ - wait?: boolean | number | undefined; - } - interface TestContextWaitForOptions { - /** - * The number of milliseconds to wait after an unsuccessful - * invocation of `condition` before trying again. - * @default 50 - */ - interval?: number | undefined; - /** - * The poll timeout in milliseconds. If `condition` has not - * succeeded by the time this elapses, an error occurs. - * @default 1000 - */ - timeout?: number | undefined; - } - /** - * An instance of `SuiteContext` is passed to each suite function in order to - * interact with the test runner. However, the `SuiteContext` constructor is not - * exposed as part of the API. - * @since v18.7.0, v16.17.0 - */ - interface SuiteContext { - /** - * The absolute path of the test file that created the current suite. If a test file imports - * additional modules that generate suites, the imported suites will return the path of the root test file. - * @since v22.6.0 - */ - readonly filePath: string | undefined; - /** - * The name of the suite. - * @since v18.8.0, v16.18.0 - */ - readonly name: string; - /** - * Can be used to abort test subtasks when the test has been aborted. - * @since v18.7.0, v16.17.0 - */ - readonly signal: AbortSignal; - } - interface TestOptions { - /** - * If a number is provided, then that many tests would run in parallel. - * If truthy, it would run (number of cpu cores - 1) tests in parallel. - * For subtests, it will be `Infinity` tests in parallel. - * If falsy, it would only run one test at a time. - * If unspecified, subtests inherit this value from their parent. - * @default false - */ - concurrency?: number | boolean | undefined; - /** - * If truthy, and the test context is configured to run `only` tests, then this test will be - * run. Otherwise, the test is skipped. - * @default false - */ - only?: boolean | undefined; - /** - * Allows aborting an in-progress test. - * @since v18.8.0 - */ - signal?: AbortSignal | undefined; - /** - * If truthy, the test is skipped. If a string is provided, that string is displayed in the - * test results as the reason for skipping the test. - * @default false - */ - skip?: boolean | string | undefined; - /** - * A number of milliseconds the test will fail after. If unspecified, subtests inherit this - * value from their parent. - * @default Infinity - * @since v18.7.0 - */ - timeout?: number | undefined; - /** - * If truthy, the test marked as `TODO`. If a string is provided, that string is displayed in - * the test results as the reason why the test is `TODO`. - * @default false - */ - todo?: boolean | string | undefined; - /** - * The number of assertions and subtests expected to be run in the test. - * If the number of assertions run in the test does not match the number - * specified in the plan, the test will fail. - * @default undefined - * @since v22.2.0 - */ - plan?: number | undefined; - } - /** - * This function creates a hook that runs before executing a suite. - * - * ```js - * describe('tests', async () => { - * before(() => console.log('about to run some test')); - * it('is a subtest', () => { - * assert.ok('some relevant assertion here'); - * }); - * }); - * ``` - * @since v18.8.0, v16.18.0 - * @param fn The hook function. If the hook uses callbacks, the callback function is passed as the second argument. - * @param options Configuration options for the hook. - */ - function before(fn?: HookFn, options?: HookOptions): void; - /** - * This function creates a hook that runs after executing a suite. - * - * ```js - * describe('tests', async () => { - * after(() => console.log('finished running tests')); - * it('is a subtest', () => { - * assert.ok('some relevant assertion here'); - * }); - * }); - * ``` - * @since v18.8.0, v16.18.0 - * @param fn The hook function. If the hook uses callbacks, the callback function is passed as the second argument. - * @param options Configuration options for the hook. - */ - function after(fn?: HookFn, options?: HookOptions): void; - /** - * This function creates a hook that runs before each test in the current suite. - * - * ```js - * describe('tests', async () => { - * beforeEach(() => console.log('about to run a test')); - * it('is a subtest', () => { - * assert.ok('some relevant assertion here'); - * }); - * }); - * ``` - * @since v18.8.0, v16.18.0 - * @param fn The hook function. If the hook uses callbacks, the callback function is passed as the second argument. - * @param options Configuration options for the hook. - */ - function beforeEach(fn?: HookFn, options?: HookOptions): void; - /** - * This function creates a hook that runs after each test in the current suite. - * The `afterEach()` hook is run even if the test fails. - * - * ```js - * describe('tests', async () => { - * afterEach(() => console.log('finished running a test')); - * it('is a subtest', () => { - * assert.ok('some relevant assertion here'); - * }); - * }); - * ``` - * @since v18.8.0, v16.18.0 - * @param fn The hook function. If the hook uses callbacks, the callback function is passed as the second argument. - * @param options Configuration options for the hook. - */ - function afterEach(fn?: HookFn, options?: HookOptions): void; - /** - * The hook function. The first argument is the context in which the hook is called. - * If the hook uses callbacks, the callback function is passed as the second argument. - */ - type HookFn = (c: TestContext | SuiteContext, done: (result?: any) => void) => any; - /** - * The hook function. The first argument is a `TestContext` object. - * If the hook uses callbacks, the callback function is passed as the second argument. - */ - type TestContextHookFn = (t: TestContext, done: (result?: any) => void) => any; - /** - * Configuration options for hooks. - * @since v18.8.0 - */ - interface HookOptions { - /** - * Allows aborting an in-progress hook. - */ - signal?: AbortSignal | undefined; - /** - * A number of milliseconds the hook will fail after. If unspecified, subtests inherit this - * value from their parent. - * @default Infinity - */ - timeout?: number | undefined; - } - interface MockFunctionOptions { - /** - * The number of times that the mock will use the behavior of `implementation`. - * Once the mock function has been called `times` times, - * it will automatically restore the behavior of `original`. - * This value must be an integer greater than zero. - * @default Infinity - */ - times?: number | undefined; - } - interface MockMethodOptions extends MockFunctionOptions { - /** - * If `true`, `object[methodName]` is treated as a getter. - * This option cannot be used with the `setter` option. - */ - getter?: boolean | undefined; - /** - * If `true`, `object[methodName]` is treated as a setter. - * This option cannot be used with the `getter` option. - */ - setter?: boolean | undefined; - } - type Mock = F & { - mock: MockFunctionContext; - }; - interface MockModuleOptions { - /** - * If false, each call to `require()` or `import()` generates a new mock module. - * If true, subsequent calls will return the same module mock, and the mock module is inserted into the CommonJS cache. - * @default false - */ - cache?: boolean | undefined; - /** - * The value to use as the mocked module's default export. - * - * If this value is not provided, ESM mocks do not include a default export. - * If the mock is a CommonJS or builtin module, this setting is used as the value of `module.exports`. - * If this value is not provided, CJS and builtin mocks use an empty object as the value of `module.exports`. - */ - defaultExport?: any; - /** - * An object whose keys and values are used to create the named exports of the mock module. - * - * If the mock is a CommonJS or builtin module, these values are copied onto `module.exports`. - * Therefore, if a mock is created with both named exports and a non-object default export, - * the mock will throw an exception when used as a CJS or builtin module. - */ - namedExports?: object | undefined; - } - /** - * The `MockTracker` class is used to manage mocking functionality. The test runner - * module provides a top level `mock` export which is a `MockTracker` instance. - * Each test also provides its own `MockTracker` instance via the test context's `mock` property. - * @since v19.1.0, v18.13.0 - */ - interface MockTracker { - /** - * This function is used to create a mock function. - * - * The following example creates a mock function that increments a counter by one - * on each invocation. The `times` option is used to modify the mock behavior such - * that the first two invocations add two to the counter instead of one. - * - * ```js - * test('mocks a counting function', (t) => { - * let cnt = 0; - * - * function addOne() { - * cnt++; - * return cnt; - * } - * - * function addTwo() { - * cnt += 2; - * return cnt; - * } - * - * const fn = t.mock.fn(addOne, addTwo, { times: 2 }); - * - * assert.strictEqual(fn(), 2); - * assert.strictEqual(fn(), 4); - * assert.strictEqual(fn(), 5); - * assert.strictEqual(fn(), 6); - * }); - * ``` - * @since v19.1.0, v18.13.0 - * @param original An optional function to create a mock on. - * @param implementation An optional function used as the mock implementation for `original`. This is useful for creating mocks that exhibit one behavior for a specified number of calls and - * then restore the behavior of `original`. - * @param options Optional configuration options for the mock function. - * @return The mocked function. The mocked function contains a special `mock` property, which is an instance of {@link MockFunctionContext}, and can be used for inspecting and changing the - * behavior of the mocked function. - */ - fn undefined>( - original?: F, - options?: MockFunctionOptions, - ): Mock; - fn undefined, Implementation extends Function = F>( - original?: F, - implementation?: Implementation, - options?: MockFunctionOptions, - ): Mock; - /** - * This function is used to create a mock on an existing object method. The - * following example demonstrates how a mock is created on an existing object - * method. - * - * ```js - * test('spies on an object method', (t) => { - * const number = { - * value: 5, - * subtract(a) { - * return this.value - a; - * }, - * }; - * - * t.mock.method(number, 'subtract'); - * assert.strictEqual(number.subtract.mock.calls.length, 0); - * assert.strictEqual(number.subtract(3), 2); - * assert.strictEqual(number.subtract.mock.calls.length, 1); - * - * const call = number.subtract.mock.calls[0]; - * - * assert.deepStrictEqual(call.arguments, [3]); - * assert.strictEqual(call.result, 2); - * assert.strictEqual(call.error, undefined); - * assert.strictEqual(call.target, undefined); - * assert.strictEqual(call.this, number); - * }); - * ``` - * @since v19.1.0, v18.13.0 - * @param object The object whose method is being mocked. - * @param methodName The identifier of the method on `object` to mock. If `object[methodName]` is not a function, an error is thrown. - * @param implementation An optional function used as the mock implementation for `object[methodName]`. - * @param options Optional configuration options for the mock method. - * @return The mocked method. The mocked method contains a special `mock` property, which is an instance of {@link MockFunctionContext}, and can be used for inspecting and changing the - * behavior of the mocked method. - */ - method< - MockedObject extends object, - MethodName extends FunctionPropertyNames, - >( - object: MockedObject, - methodName: MethodName, - options?: MockFunctionOptions, - ): MockedObject[MethodName] extends Function ? Mock - : never; - method< - MockedObject extends object, - MethodName extends FunctionPropertyNames, - Implementation extends Function, - >( - object: MockedObject, - methodName: MethodName, - implementation: Implementation, - options?: MockFunctionOptions, - ): MockedObject[MethodName] extends Function ? Mock - : never; - method( - object: MockedObject, - methodName: keyof MockedObject, - options: MockMethodOptions, - ): Mock; - method( - object: MockedObject, - methodName: keyof MockedObject, - implementation: Function, - options: MockMethodOptions, - ): Mock; - /** - * This function is syntax sugar for `MockTracker.method` with `options.getter` set to `true`. - * @since v19.3.0, v18.13.0 - */ - getter< - MockedObject extends object, - MethodName extends keyof MockedObject, - >( - object: MockedObject, - methodName: MethodName, - options?: MockFunctionOptions, - ): Mock<() => MockedObject[MethodName]>; - getter< - MockedObject extends object, - MethodName extends keyof MockedObject, - Implementation extends Function, - >( - object: MockedObject, - methodName: MethodName, - implementation?: Implementation, - options?: MockFunctionOptions, - ): Mock<(() => MockedObject[MethodName]) | Implementation>; - /** - * This function is syntax sugar for `MockTracker.method` with `options.setter` set to `true`. - * @since v19.3.0, v18.13.0 - */ - setter< - MockedObject extends object, - MethodName extends keyof MockedObject, - >( - object: MockedObject, - methodName: MethodName, - options?: MockFunctionOptions, - ): Mock<(value: MockedObject[MethodName]) => void>; - setter< - MockedObject extends object, - MethodName extends keyof MockedObject, - Implementation extends Function, - >( - object: MockedObject, - methodName: MethodName, - implementation?: Implementation, - options?: MockFunctionOptions, - ): Mock<((value: MockedObject[MethodName]) => void) | Implementation>; - /** - * This function is used to mock the exports of ECMAScript modules, CommonJS modules, JSON modules, and - * Node.js builtin modules. Any references to the original module prior to mocking are not impacted. In - * order to enable module mocking, Node.js must be started with the - * [`--experimental-test-module-mocks`](https://nodejs.org/docs/latest-v25.x/api/cli.html#--experimental-test-module-mocks) - * command-line flag. - * - * The following example demonstrates how a mock is created for a module. - * - * ```js - * test('mocks a builtin module in both module systems', async (t) => { - * // Create a mock of 'node:readline' with a named export named 'fn', which - * // does not exist in the original 'node:readline' module. - * const mock = t.mock.module('node:readline', { - * namedExports: { fn() { return 42; } }, - * }); - * - * let esmImpl = await import('node:readline'); - * let cjsImpl = require('node:readline'); - * - * // cursorTo() is an export of the original 'node:readline' module. - * assert.strictEqual(esmImpl.cursorTo, undefined); - * assert.strictEqual(cjsImpl.cursorTo, undefined); - * assert.strictEqual(esmImpl.fn(), 42); - * assert.strictEqual(cjsImpl.fn(), 42); - * - * mock.restore(); - * - * // The mock is restored, so the original builtin module is returned. - * esmImpl = await import('node:readline'); - * cjsImpl = require('node:readline'); - * - * assert.strictEqual(typeof esmImpl.cursorTo, 'function'); - * assert.strictEqual(typeof cjsImpl.cursorTo, 'function'); - * assert.strictEqual(esmImpl.fn, undefined); - * assert.strictEqual(cjsImpl.fn, undefined); - * }); - * ``` - * @since v22.3.0 - * @experimental - * @param specifier A string identifying the module to mock. - * @param options Optional configuration options for the mock module. - */ - module(specifier: string, options?: MockModuleOptions): MockModuleContext; - /** - * Creates a mock for a property value on an object. This allows you to track and control access to a specific property, - * including how many times it is read (getter) or written (setter), and to restore the original value after mocking. - * - * ```js - * test('mocks a property value', (t) => { - * const obj = { foo: 42 }; - * const prop = t.mock.property(obj, 'foo', 100); - * - * assert.strictEqual(obj.foo, 100); - * assert.strictEqual(prop.mock.accessCount(), 1); - * assert.strictEqual(prop.mock.accesses[0].type, 'get'); - * assert.strictEqual(prop.mock.accesses[0].value, 100); - * - * obj.foo = 200; - * assert.strictEqual(prop.mock.accessCount(), 2); - * assert.strictEqual(prop.mock.accesses[1].type, 'set'); - * assert.strictEqual(prop.mock.accesses[1].value, 200); - * - * prop.mock.restore(); - * assert.strictEqual(obj.foo, 42); - * }); - * ``` - * @since v24.3.0 - * @param object The object whose value is being mocked. - * @param propertyName The identifier of the property on `object` to mock. - * @param value An optional value used as the mock value - * for `object[propertyName]`. **Default:** The original property value. - * @returns A proxy to the mocked object. The mocked object contains a - * special `mock` property, which is an instance of [`MockPropertyContext`][], and - * can be used for inspecting and changing the behavior of the mocked property. - */ - property< - MockedObject extends object, - PropertyName extends keyof MockedObject, - >( - object: MockedObject, - property: PropertyName, - value?: MockedObject[PropertyName], - ): MockedObject & { mock: MockPropertyContext }; - /** - * This function restores the default behavior of all mocks that were previously - * created by this `MockTracker` and disassociates the mocks from the `MockTracker` instance. Once disassociated, the mocks can still be used, but the `MockTracker` instance can no longer be - * used to reset their behavior or - * otherwise interact with them. - * - * After each test completes, this function is called on the test context's `MockTracker`. If the global `MockTracker` is used extensively, calling this - * function manually is recommended. - * @since v19.1.0, v18.13.0 - */ - reset(): void; - /** - * This function restores the default behavior of all mocks that were previously - * created by this `MockTracker`. Unlike `mock.reset()`, `mock.restoreAll()` does - * not disassociate the mocks from the `MockTracker` instance. - * @since v19.1.0, v18.13.0 - */ - restoreAll(): void; - readonly timers: MockTimers; - } - const mock: MockTracker; - interface MockFunctionCall< - F extends Function, - ReturnType = F extends (...args: any) => infer T ? T - : F extends abstract new(...args: any) => infer T ? T - : unknown, - Args = F extends (...args: infer Y) => any ? Y - : F extends abstract new(...args: infer Y) => any ? Y - : unknown[], - > { - /** - * An array of the arguments passed to the mock function. - */ - arguments: Args; - /** - * If the mocked function threw then this property contains the thrown value. - */ - error: unknown | undefined; - /** - * The value returned by the mocked function. - * - * If the mocked function threw, it will be `undefined`. - */ - result: ReturnType | undefined; - /** - * An `Error` object whose stack can be used to determine the callsite of the mocked function invocation. - */ - stack: Error; - /** - * If the mocked function is a constructor, this field contains the class being constructed. - * Otherwise this will be `undefined`. - */ - target: F extends abstract new(...args: any) => any ? F : undefined; - /** - * The mocked function's `this` value. - */ - this: unknown; - } - /** - * The `MockFunctionContext` class is used to inspect or manipulate the behavior of - * mocks created via the `MockTracker` APIs. - * @since v19.1.0, v18.13.0 - */ - interface MockFunctionContext { - /** - * A getter that returns a copy of the internal array used to track calls to the - * mock. Each entry in the array is an object with the following properties. - * @since v19.1.0, v18.13.0 - */ - readonly calls: MockFunctionCall[]; - /** - * This function returns the number of times that this mock has been invoked. This - * function is more efficient than checking `ctx.calls.length` because `ctx.calls` is a getter that creates a copy of the internal call tracking array. - * @since v19.1.0, v18.13.0 - * @return The number of times that this mock has been invoked. - */ - callCount(): number; - /** - * This function is used to change the behavior of an existing mock. - * - * The following example creates a mock function using `t.mock.fn()`, calls the - * mock function, and then changes the mock implementation to a different function. - * - * ```js - * test('changes a mock behavior', (t) => { - * let cnt = 0; - * - * function addOne() { - * cnt++; - * return cnt; - * } - * - * function addTwo() { - * cnt += 2; - * return cnt; - * } - * - * const fn = t.mock.fn(addOne); - * - * assert.strictEqual(fn(), 1); - * fn.mock.mockImplementation(addTwo); - * assert.strictEqual(fn(), 3); - * assert.strictEqual(fn(), 5); - * }); - * ``` - * @since v19.1.0, v18.13.0 - * @param implementation The function to be used as the mock's new implementation. - */ - mockImplementation(implementation: F): void; - /** - * This function is used to change the behavior of an existing mock for a single - * invocation. Once invocation `onCall` has occurred, the mock will revert to - * whatever behavior it would have used had `mockImplementationOnce()` not been - * called. - * - * The following example creates a mock function using `t.mock.fn()`, calls the - * mock function, changes the mock implementation to a different function for the - * next invocation, and then resumes its previous behavior. - * - * ```js - * test('changes a mock behavior once', (t) => { - * let cnt = 0; - * - * function addOne() { - * cnt++; - * return cnt; - * } - * - * function addTwo() { - * cnt += 2; - * return cnt; - * } - * - * const fn = t.mock.fn(addOne); - * - * assert.strictEqual(fn(), 1); - * fn.mock.mockImplementationOnce(addTwo); - * assert.strictEqual(fn(), 3); - * assert.strictEqual(fn(), 4); - * }); - * ``` - * @since v19.1.0, v18.13.0 - * @param implementation The function to be used as the mock's implementation for the invocation number specified by `onCall`. - * @param onCall The invocation number that will use `implementation`. If the specified invocation has already occurred then an exception is thrown. - */ - mockImplementationOnce(implementation: F, onCall?: number): void; - /** - * Resets the call history of the mock function. - * @since v19.3.0, v18.13.0 - */ - resetCalls(): void; - /** - * Resets the implementation of the mock function to its original behavior. The - * mock can still be used after calling this function. - * @since v19.1.0, v18.13.0 - */ - restore(): void; - } - /** - * @since v22.3.0 - * @experimental - */ - interface MockModuleContext { - /** - * Resets the implementation of the mock module. - * @since v22.3.0 - */ - restore(): void; - } - /** - * @since v24.3.0 - */ - class MockPropertyContext { - /** - * A getter that returns a copy of the internal array used to track accesses (get/set) to - * the mocked property. Each entry in the array is an object with the following properties: - */ - readonly accesses: Array<{ - type: "get" | "set"; - value: PropertyType; - stack: Error; - }>; - /** - * This function returns the number of times that the property was accessed. - * This function is more efficient than checking `ctx.accesses.length` because - * `ctx.accesses` is a getter that creates a copy of the internal access tracking array. - * @returns The number of times that the property was accessed (read or written). - */ - accessCount(): number; - /** - * This function is used to change the value returned by the mocked property getter. - * @param value The new value to be set as the mocked property value. - */ - mockImplementation(value: PropertyType): void; - /** - * This function is used to change the behavior of an existing mock for a single - * invocation. Once invocation `onAccess` has occurred, the mock will revert to - * whatever behavior it would have used had `mockImplementationOnce()` not been - * called. - * - * The following example creates a mock function using `t.mock.property()`, calls the - * mock property, changes the mock implementation to a different value for the - * next invocation, and then resumes its previous behavior. - * - * ```js - * test('changes a mock behavior once', (t) => { - * const obj = { foo: 1 }; - * - * const prop = t.mock.property(obj, 'foo', 5); - * - * assert.strictEqual(obj.foo, 5); - * prop.mock.mockImplementationOnce(25); - * assert.strictEqual(obj.foo, 25); - * assert.strictEqual(obj.foo, 5); - * }); - * ``` - * @param value The value to be used as the mock's - * implementation for the invocation number specified by `onAccess`. - * @param onAccess The invocation number that will use `value`. If - * the specified invocation has already occurred then an exception is thrown. - * **Default:** The number of the next invocation. - */ - mockImplementationOnce(value: PropertyType, onAccess?: number): void; - /** - * Resets the access history of the mocked property. - */ - resetAccesses(): void; - /** - * Resets the implementation of the mock property to its original behavior. The - * mock can still be used after calling this function. - */ - restore(): void; - } - interface MockTimersOptions { - apis: ReadonlyArray<"setInterval" | "setTimeout" | "setImmediate" | "Date">; - now?: number | Date | undefined; - } - /** - * Mocking timers is a technique commonly used in software testing to simulate and - * control the behavior of timers, such as `setInterval` and `setTimeout`, - * without actually waiting for the specified time intervals. - * - * The MockTimers API also allows for mocking of the `Date` constructor and - * `setImmediate`/`clearImmediate` functions. - * - * The `MockTracker` provides a top-level `timers` export - * which is a `MockTimers` instance. - * @since v20.4.0 - */ - interface MockTimers { - /** - * Enables timer mocking for the specified timers. - * - * **Note:** When you enable mocking for a specific timer, its associated - * clear function will also be implicitly mocked. - * - * **Note:** Mocking `Date` will affect the behavior of the mocked timers - * as they use the same internal clock. - * - * Example usage without setting initial time: - * - * ```js - * import { mock } from 'node:test'; - * mock.timers.enable({ apis: ['setInterval', 'Date'], now: 1234 }); - * ``` - * - * The above example enables mocking for the `Date` constructor, `setInterval` timer and - * implicitly mocks the `clearInterval` function. Only the `Date` constructor from `globalThis`, - * `setInterval` and `clearInterval` functions from `node:timers`, `node:timers/promises`, and `globalThis` will be mocked. - * - * Example usage with initial time set - * - * ```js - * import { mock } from 'node:test'; - * mock.timers.enable({ apis: ['Date'], now: 1000 }); - * ``` - * - * Example usage with initial Date object as time set - * - * ```js - * import { mock } from 'node:test'; - * mock.timers.enable({ apis: ['Date'], now: new Date() }); - * ``` - * - * Alternatively, if you call `mock.timers.enable()` without any parameters: - * - * All timers (`'setInterval'`, `'clearInterval'`, `'Date'`, `'setImmediate'`, `'clearImmediate'`, `'setTimeout'`, and `'clearTimeout'`) - * will be mocked. - * - * The `setInterval`, `clearInterval`, `setTimeout`, and `clearTimeout` functions from `node:timers`, `node:timers/promises`, - * and `globalThis` will be mocked. - * The `Date` constructor from `globalThis` will be mocked. - * - * If there is no initial epoch set, the initial date will be based on 0 in the Unix epoch. This is `January 1st, 1970, 00:00:00 UTC`. You can - * set an initial date by passing a now property to the `.enable()` method. This value will be used as the initial date for the mocked Date - * object. It can either be a positive integer, or another Date object. - * @since v20.4.0 - */ - enable(options?: MockTimersOptions): void; - /** - * You can use the `.setTime()` method to manually move the mocked date to another time. This method only accepts a positive integer. - * Note: This method will execute any mocked timers that are in the past from the new time. - * In the below example we are setting a new time for the mocked date. - * ```js - * import assert from 'node:assert'; - * import { test } from 'node:test'; - * test('sets the time of a date object', (context) => { - * // Optionally choose what to mock - * context.mock.timers.enable({ apis: ['Date'], now: 100 }); - * assert.strictEqual(Date.now(), 100); - * // Advance in time will also advance the date - * context.mock.timers.setTime(1000); - * context.mock.timers.tick(200); - * assert.strictEqual(Date.now(), 1200); - * }); - * ``` - */ - setTime(time: number): void; - /** - * This function restores the default behavior of all mocks that were previously - * created by this `MockTimers` instance and disassociates the mocks - * from the `MockTracker` instance. - * - * **Note:** After each test completes, this function is called on - * the test context's `MockTracker`. - * - * ```js - * import { mock } from 'node:test'; - * mock.timers.reset(); - * ``` - * @since v20.4.0 - */ - reset(): void; - /** - * Advances time for all mocked timers. - * - * **Note:** This diverges from how `setTimeout` in Node.js behaves and accepts - * only positive numbers. In Node.js, `setTimeout` with negative numbers is - * only supported for web compatibility reasons. - * - * The following example mocks a `setTimeout` function and - * by using `.tick` advances in - * time triggering all pending timers. - * - * ```js - * import assert from 'node:assert'; - * import { test } from 'node:test'; - * - * test('mocks setTimeout to be executed synchronously without having to actually wait for it', (context) => { - * const fn = context.mock.fn(); - * - * context.mock.timers.enable({ apis: ['setTimeout'] }); - * - * setTimeout(fn, 9999); - * - * assert.strictEqual(fn.mock.callCount(), 0); - * - * // Advance in time - * context.mock.timers.tick(9999); - * - * assert.strictEqual(fn.mock.callCount(), 1); - * }); - * ``` - * - * Alternativelly, the `.tick` function can be called many times - * - * ```js - * import assert from 'node:assert'; - * import { test } from 'node:test'; - * - * test('mocks setTimeout to be executed synchronously without having to actually wait for it', (context) => { - * const fn = context.mock.fn(); - * context.mock.timers.enable({ apis: ['setTimeout'] }); - * const nineSecs = 9000; - * setTimeout(fn, nineSecs); - * - * const twoSeconds = 3000; - * context.mock.timers.tick(twoSeconds); - * context.mock.timers.tick(twoSeconds); - * context.mock.timers.tick(twoSeconds); - * - * assert.strictEqual(fn.mock.callCount(), 1); - * }); - * ``` - * - * Advancing time using `.tick` will also advance the time for any `Date` object - * created after the mock was enabled (if `Date` was also set to be mocked). - * - * ```js - * import assert from 'node:assert'; - * import { test } from 'node:test'; - * - * test('mocks setTimeout to be executed synchronously without having to actually wait for it', (context) => { - * const fn = context.mock.fn(); - * - * context.mock.timers.enable({ apis: ['setTimeout', 'Date'] }); - * setTimeout(fn, 9999); - * - * assert.strictEqual(fn.mock.callCount(), 0); - * assert.strictEqual(Date.now(), 0); - * - * // Advance in time - * context.mock.timers.tick(9999); - * assert.strictEqual(fn.mock.callCount(), 1); - * assert.strictEqual(Date.now(), 9999); - * }); - * ``` - * @since v20.4.0 - */ - tick(milliseconds: number): void; - /** - * Triggers all pending mocked timers immediately. If the `Date` object is also - * mocked, it will also advance the `Date` object to the furthest timer's time. - * - * The example below triggers all pending timers immediately, - * causing them to execute without any delay. - * - * ```js - * import assert from 'node:assert'; - * import { test } from 'node:test'; - * - * test('runAll functions following the given order', (context) => { - * context.mock.timers.enable({ apis: ['setTimeout', 'Date'] }); - * const results = []; - * setTimeout(() => results.push(1), 9999); - * - * // Notice that if both timers have the same timeout, - * // the order of execution is guaranteed - * setTimeout(() => results.push(3), 8888); - * setTimeout(() => results.push(2), 8888); - * - * assert.deepStrictEqual(results, []); - * - * context.mock.timers.runAll(); - * assert.deepStrictEqual(results, [3, 2, 1]); - * // The Date object is also advanced to the furthest timer's time - * assert.strictEqual(Date.now(), 9999); - * }); - * ``` - * - * **Note:** The `runAll()` function is specifically designed for - * triggering timers in the context of timer mocking. - * It does not have any effect on real-time system - * clocks or actual timers outside of the mocking environment. - * @since v20.4.0 - */ - runAll(): void; - /** - * Calls {@link MockTimers.reset()}. - */ - [Symbol.dispose](): void; - } - /** - * An object whose methods are used to configure available assertions on the - * `TestContext` objects in the current process. The methods from `node:assert` - * and snapshot testing functions are available by default. - * - * It is possible to apply the same configuration to all files by placing common - * configuration code in a module - * preloaded with `--require` or `--import`. - * @since v22.14.0 - */ - namespace assert { - /** - * Defines a new assertion function with the provided name and function. If an - * assertion already exists with the same name, it is overwritten. - * @since v22.14.0 - */ - function register(name: string, fn: (this: TestContext, ...args: any[]) => void): void; - } - /** - * @since v22.3.0 - */ - namespace snapshot { - /** - * This function is used to customize the default serialization mechanism used by the test runner. - * - * By default, the test runner performs serialization by calling `JSON.stringify(value, null, 2)` on the provided value. - * `JSON.stringify()` does have limitations regarding circular structures and supported data types. - * If a more robust serialization mechanism is required, this function should be used to specify a list of custom serializers. - * - * Serializers are called in order, with the output of the previous serializer passed as input to the next. - * The final result must be a string value. - * @since v22.3.0 - * @param serializers An array of synchronous functions used as the default serializers for snapshot tests. - */ - function setDefaultSnapshotSerializers(serializers: ReadonlyArray<(value: any) => any>): void; - /** - * This function is used to set a custom resolver for the location of the snapshot file used for snapshot testing. - * By default, the snapshot filename is the same as the entry point filename with `.snapshot` appended. - * @since v22.3.0 - * @param fn A function used to compute the location of the snapshot file. - * The function receives the path of the test file as its only argument. If the - * test is not associated with a file (for example in the REPL), the input is - * undefined. `fn()` must return a string specifying the location of the snapshot file. - */ - function setResolveSnapshotPath(fn: (path: string | undefined) => string): void; - } - } - type FunctionPropertyNames = { - [K in keyof T]: T[K] extends Function ? K : never; - }[keyof T]; - export = test; -} diff --git a/PBandGraphScaffold/node_modules/@types/node/test/reporters.d.ts b/PBandGraphScaffold/node_modules/@types/node/test/reporters.d.ts deleted file mode 100644 index 465e80d..0000000 --- a/PBandGraphScaffold/node_modules/@types/node/test/reporters.d.ts +++ /dev/null @@ -1,96 +0,0 @@ -/** - * The `node:test` module supports passing `--test-reporter` - * flags for the test runner to use a specific reporter. - * - * The following built-reporters are supported: - * - * * `spec` - * The `spec` reporter outputs the test results in a human-readable format. This - * is the default reporter. - * - * * `tap` - * The `tap` reporter outputs the test results in the [TAP](https://testanything.org/) format. - * - * * `dot` - * The `dot` reporter outputs the test results in a compact format, - * where each passing test is represented by a `.`, - * and each failing test is represented by a `X`. - * - * * `junit` - * The junit reporter outputs test results in a jUnit XML format - * - * * `lcov` - * The `lcov` reporter outputs test coverage when used with the - * `--experimental-test-coverage` flag. - * - * The exact output of these reporters is subject to change between versions of - * Node.js, and should not be relied on programmatically. If programmatic access - * to the test runner's output is required, use the events emitted by the - * `TestsStream`. - * - * The reporters are available via the `node:test/reporters` module: - * - * ```js - * import { tap, spec, dot, junit, lcov } from 'node:test/reporters'; - * ``` - * @since v19.9.0, v18.17.0 - * @see [source](https://github.com/nodejs/node/blob/v25.x/lib/test/reporters.js) - */ -declare module "node:test/reporters" { - import { Transform, TransformOptions } from "node:stream"; - import { EventData } from "node:test"; - type TestEvent = - | { type: "test:coverage"; data: EventData.TestCoverage } - | { type: "test:complete"; data: EventData.TestComplete } - | { type: "test:dequeue"; data: EventData.TestDequeue } - | { type: "test:diagnostic"; data: EventData.TestDiagnostic } - | { type: "test:enqueue"; data: EventData.TestEnqueue } - | { type: "test:fail"; data: EventData.TestFail } - | { type: "test:pass"; data: EventData.TestPass } - | { type: "test:plan"; data: EventData.TestPlan } - | { type: "test:start"; data: EventData.TestStart } - | { type: "test:stderr"; data: EventData.TestStderr } - | { type: "test:stdout"; data: EventData.TestStdout } - | { type: "test:summary"; data: EventData.TestSummary } - | { type: "test:watch:drained"; data: undefined } - | { type: "test:watch:restarted"; data: undefined }; - interface ReporterConstructorWrapper Transform> { - new(...args: ConstructorParameters): InstanceType; - (...args: ConstructorParameters): InstanceType; - } - /** - * The `dot` reporter outputs the test results in a compact format, - * where each passing test is represented by a `.`, - * and each failing test is represented by a `X`. - * @since v20.0.0 - */ - function dot(source: AsyncIterable): NodeJS.AsyncIterator; - /** - * The `tap` reporter outputs the test results in the [TAP](https://testanything.org/) format. - * @since v20.0.0 - */ - function tap(source: AsyncIterable): NodeJS.AsyncIterator; - class SpecReporter extends Transform { - constructor(); - } - /** - * The `spec` reporter outputs the test results in a human-readable format. - * @since v20.0.0 - */ - const spec: ReporterConstructorWrapper; - /** - * The `junit` reporter outputs test results in a jUnit XML format. - * @since v21.0.0 - */ - function junit(source: AsyncIterable): NodeJS.AsyncIterator; - class LcovReporter extends Transform { - constructor(options?: Omit); - } - /** - * The `lcov` reporter outputs test coverage when used with the - * [`--experimental-test-coverage`](https://nodejs.org/docs/latest-v25.x/api/cli.html#--experimental-test-coverage) flag. - * @since v22.0.0 - */ - const lcov: ReporterConstructorWrapper; - export { dot, junit, lcov, spec, tap, TestEvent }; -} diff --git a/PBandGraphScaffold/node_modules/@types/node/timers.d.ts b/PBandGraphScaffold/node_modules/@types/node/timers.d.ts deleted file mode 100644 index 00a8cd0..0000000 --- a/PBandGraphScaffold/node_modules/@types/node/timers.d.ts +++ /dev/null @@ -1,159 +0,0 @@ -/** - * The `timer` module exposes a global API for scheduling functions to - * be called at some future period of time. Because the timer functions are - * globals, there is no need to import `node:timers` to use the API. - * - * The timer functions within Node.js implement a similar API as the timers API - * provided by Web Browsers but use a different internal implementation that is - * built around the Node.js [Event Loop](https://nodejs.org/en/docs/guides/event-loop-timers-and-nexttick/#setimmediate-vs-settimeout). - * @see [source](https://github.com/nodejs/node/blob/v25.x/lib/timers.js) - */ -declare module "node:timers" { - import { Abortable } from "node:events"; - import * as promises from "node:timers/promises"; - export interface TimerOptions extends Abortable { - /** - * Set to `false` to indicate that the scheduled `Timeout` - * should not require the Node.js event loop to remain active. - * @default true - */ - ref?: boolean | undefined; - } - global { - namespace NodeJS { - /** - * This object is created internally and is returned from `setImmediate()`. It - * can be passed to `clearImmediate()` in order to cancel the scheduled - * actions. - * - * By default, when an immediate is scheduled, the Node.js event loop will continue - * running as long as the immediate is active. The `Immediate` object returned by - * `setImmediate()` exports both `immediate.ref()` and `immediate.unref()` - * functions that can be used to control this default behavior. - */ - interface Immediate extends RefCounted, Disposable { - /** - * If true, the `Immediate` object will keep the Node.js event loop active. - * @since v11.0.0 - */ - hasRef(): boolean; - /** - * When called, requests that the Node.js event loop _not_ exit so long as the - * `Immediate` is active. Calling `immediate.ref()` multiple times will have no - * effect. - * - * By default, all `Immediate` objects are "ref'ed", making it normally unnecessary - * to call `immediate.ref()` unless `immediate.unref()` had been called previously. - * @since v9.7.0 - * @returns a reference to `immediate` - */ - ref(): this; - /** - * When called, the active `Immediate` object will not require the Node.js event - * loop to remain active. If there is no other activity keeping the event loop - * running, the process may exit before the `Immediate` object's callback is - * invoked. Calling `immediate.unref()` multiple times will have no effect. - * @since v9.7.0 - * @returns a reference to `immediate` - */ - unref(): this; - /** - * Cancels the immediate. This is similar to calling `clearImmediate()`. - * @since v20.5.0, v18.18.0 - */ - [Symbol.dispose](): void; - _onImmediate(...args: any[]): void; - } - // Legacy interface used in Node.js v9 and prior - // TODO: remove in a future major version bump - /** @deprecated Use `NodeJS.Timeout` instead. */ - interface Timer extends RefCounted { - hasRef(): boolean; - refresh(): this; - [Symbol.toPrimitive](): number; - } - /** - * This object is created internally and is returned from `setTimeout()` and - * `setInterval()`. It can be passed to either `clearTimeout()` or - * `clearInterval()` in order to cancel the scheduled actions. - * - * By default, when a timer is scheduled using either `setTimeout()` or - * `setInterval()`, the Node.js event loop will continue running as long as the - * timer is active. Each of the `Timeout` objects returned by these functions - * export both `timeout.ref()` and `timeout.unref()` functions that can be used to - * control this default behavior. - */ - interface Timeout extends RefCounted, Disposable, Timer { - /** - * Cancels the timeout. - * @since v0.9.1 - * @legacy Use `clearTimeout()` instead. - * @returns a reference to `timeout` - */ - close(): this; - /** - * If true, the `Timeout` object will keep the Node.js event loop active. - * @since v11.0.0 - */ - hasRef(): boolean; - /** - * When called, requests that the Node.js event loop _not_ exit so long as the - * `Timeout` is active. Calling `timeout.ref()` multiple times will have no effect. - * - * By default, all `Timeout` objects are "ref'ed", making it normally unnecessary - * to call `timeout.ref()` unless `timeout.unref()` had been called previously. - * @since v0.9.1 - * @returns a reference to `timeout` - */ - ref(): this; - /** - * Sets the timer's start time to the current time, and reschedules the timer to - * call its callback at the previously specified duration adjusted to the current - * time. This is useful for refreshing a timer without allocating a new - * JavaScript object. - * - * Using this on a timer that has already called its callback will reactivate the - * timer. - * @since v10.2.0 - * @returns a reference to `timeout` - */ - refresh(): this; - /** - * When called, the active `Timeout` object will not require the Node.js event loop - * to remain active. If there is no other activity keeping the event loop running, - * the process may exit before the `Timeout` object's callback is invoked. Calling - * `timeout.unref()` multiple times will have no effect. - * @since v0.9.1 - * @returns a reference to `timeout` - */ - unref(): this; - /** - * Coerce a `Timeout` to a primitive. The primitive can be used to - * clear the `Timeout`. The primitive can only be used in the - * same thread where the timeout was created. Therefore, to use it - * across `worker_threads` it must first be passed to the correct - * thread. This allows enhanced compatibility with browser - * `setTimeout()` and `setInterval()` implementations. - * @since v14.9.0, v12.19.0 - */ - [Symbol.toPrimitive](): number; - /** - * Cancels the timeout. - * @since v20.5.0, v18.18.0 - */ - [Symbol.dispose](): void; - _onTimeout(...args: any[]): void; - } - } - } - import clearImmediate = globalThis.clearImmediate; - import clearInterval = globalThis.clearInterval; - import clearTimeout = globalThis.clearTimeout; - import setImmediate = globalThis.setImmediate; - import setInterval = globalThis.setInterval; - import setTimeout = globalThis.setTimeout; - export { clearImmediate, clearInterval, clearTimeout, promises, setImmediate, setInterval, setTimeout }; -} -declare module "timers" { - export * from "node:timers"; -} diff --git a/PBandGraphScaffold/node_modules/@types/node/timers/promises.d.ts b/PBandGraphScaffold/node_modules/@types/node/timers/promises.d.ts deleted file mode 100644 index 85bc831..0000000 --- a/PBandGraphScaffold/node_modules/@types/node/timers/promises.d.ts +++ /dev/null @@ -1,108 +0,0 @@ -/** - * The `timers/promises` API provides an alternative set of timer functions - * that return `Promise` objects. The API is accessible via - * `require('node:timers/promises')`. - * - * ```js - * import { - * setTimeout, - * setImmediate, - * setInterval, - * } from 'node:timers/promises'; - * ``` - * @since v15.0.0 - * @see [source](https://github.com/nodejs/node/blob/v25.x/lib/timers/promises.js) - */ -declare module "node:timers/promises" { - import { TimerOptions } from "node:timers"; - /** - * ```js - * import { - * setTimeout, - * } from 'node:timers/promises'; - * - * const res = await setTimeout(100, 'result'); - * - * console.log(res); // Prints 'result' - * ``` - * @since v15.0.0 - * @param delay The number of milliseconds to wait before fulfilling the - * promise. **Default:** `1`. - * @param value A value with which the promise is fulfilled. - */ - function setTimeout(delay?: number, value?: T, options?: TimerOptions): Promise; - /** - * ```js - * import { - * setImmediate, - * } from 'node:timers/promises'; - * - * const res = await setImmediate('result'); - * - * console.log(res); // Prints 'result' - * ``` - * @since v15.0.0 - * @param value A value with which the promise is fulfilled. - */ - function setImmediate(value?: T, options?: TimerOptions): Promise; - /** - * Returns an async iterator that generates values in an interval of `delay` ms. - * If `ref` is `true`, you need to call `next()` of async iterator explicitly - * or implicitly to keep the event loop alive. - * - * ```js - * import { - * setInterval, - * } from 'node:timers/promises'; - * - * const interval = 100; - * for await (const startTime of setInterval(interval, Date.now())) { - * const now = Date.now(); - * console.log(now); - * if ((now - startTime) > 1000) - * break; - * } - * console.log(Date.now()); - * ``` - * @since v15.9.0 - * @param delay The number of milliseconds to wait between iterations. - * **Default:** `1`. - * @param value A value with which the iterator returns. - */ - function setInterval(delay?: number, value?: T, options?: TimerOptions): NodeJS.AsyncIterator; - interface Scheduler { - /** - * An experimental API defined by the [Scheduling APIs](https://github.com/WICG/scheduling-apis) draft specification - * being developed as a standard Web Platform API. - * - * Calling `timersPromises.scheduler.wait(delay, options)` is roughly equivalent - * to calling `timersPromises.setTimeout(delay, undefined, options)` except that - * the `ref` option is not supported. - * - * ```js - * import { scheduler } from 'node:timers/promises'; - * - * await scheduler.wait(1000); // Wait one second before continuing - * ``` - * @since v17.3.0, v16.14.0 - * @experimental - * @param delay The number of milliseconds to wait before resolving the - * promise. - */ - wait(delay: number, options?: { signal?: AbortSignal }): Promise; - /** - * An experimental API defined by the [Scheduling APIs](https://github.com/WICG/scheduling-apis) draft specification - * being developed as a standard Web Platform API. - * - * Calling `timersPromises.scheduler.yield()` is equivalent to calling - * `timersPromises.setImmediate()` with no arguments. - * @since v17.3.0, v16.14.0 - * @experimental - */ - yield(): Promise; - } - const scheduler: Scheduler; -} -declare module "timers/promises" { - export * from "node:timers/promises"; -} diff --git a/PBandGraphScaffold/node_modules/@types/node/tls.d.ts b/PBandGraphScaffold/node_modules/@types/node/tls.d.ts deleted file mode 100644 index 8e2ffa7..0000000 --- a/PBandGraphScaffold/node_modules/@types/node/tls.d.ts +++ /dev/null @@ -1,1194 +0,0 @@ -/** - * The `node:tls` module provides an implementation of the Transport Layer Security - * (TLS) and Secure Socket Layer (SSL) protocols that is built on top of OpenSSL. - * The module can be accessed using: - * - * ```js - * import tls from 'node:tls'; - * ``` - * @see [source](https://github.com/nodejs/node/blob/v25.x/lib/tls.js) - */ -declare module "node:tls" { - import { NonSharedBuffer } from "node:buffer"; - import { X509Certificate } from "node:crypto"; - import * as net from "node:net"; - import * as stream from "stream"; - const CLIENT_RENEG_LIMIT: number; - const CLIENT_RENEG_WINDOW: number; - interface Certificate { - /** - * Country code. - */ - C: string; - /** - * Street. - */ - ST: string; - /** - * Locality. - */ - L: string; - /** - * Organization. - */ - O: string; - /** - * Organizational unit. - */ - OU: string; - /** - * Common name. - */ - CN: string; - } - interface PeerCertificate { - /** - * `true` if a Certificate Authority (CA), `false` otherwise. - * @since v18.13.0 - */ - ca: boolean; - /** - * The DER encoded X.509 certificate data. - */ - raw: NonSharedBuffer; - /** - * The certificate subject. - */ - subject: Certificate; - /** - * The certificate issuer, described in the same terms as the `subject`. - */ - issuer: Certificate; - /** - * The date-time the certificate is valid from. - */ - valid_from: string; - /** - * The date-time the certificate is valid to. - */ - valid_to: string; - /** - * The certificate serial number, as a hex string. - */ - serialNumber: string; - /** - * The SHA-1 digest of the DER encoded certificate. - * It is returned as a `:` separated hexadecimal string. - */ - fingerprint: string; - /** - * The SHA-256 digest of the DER encoded certificate. - * It is returned as a `:` separated hexadecimal string. - */ - fingerprint256: string; - /** - * The SHA-512 digest of the DER encoded certificate. - * It is returned as a `:` separated hexadecimal string. - */ - fingerprint512: string; - /** - * The extended key usage, a set of OIDs. - */ - ext_key_usage?: string[]; - /** - * A string containing concatenated names for the subject, - * an alternative to the `subject` names. - */ - subjectaltname?: string; - /** - * An array describing the AuthorityInfoAccess, used with OCSP. - */ - infoAccess?: NodeJS.Dict; - /** - * For RSA keys: The RSA bit size. - * - * For EC keys: The key size in bits. - */ - bits?: number; - /** - * The RSA exponent, as a string in hexadecimal number notation. - */ - exponent?: string; - /** - * The RSA modulus, as a hexadecimal string. - */ - modulus?: string; - /** - * The public key. - */ - pubkey?: NonSharedBuffer; - /** - * The ASN.1 name of the OID of the elliptic curve. - * Well-known curves are identified by an OID. - * While it is unusual, it is possible that the curve - * is identified by its mathematical properties, - * in which case it will not have an OID. - */ - asn1Curve?: string; - /** - * The NIST name for the elliptic curve, if it has one - * (not all well-known curves have been assigned names by NIST). - */ - nistCurve?: string; - } - interface DetailedPeerCertificate extends PeerCertificate { - /** - * The issuer certificate object. - * For self-signed certificates, this may be a circular reference. - */ - issuerCertificate: DetailedPeerCertificate; - } - interface CipherNameAndProtocol { - /** - * The cipher name. - */ - name: string; - /** - * SSL/TLS protocol version. - */ - version: string; - /** - * IETF name for the cipher suite. - */ - standardName: string; - } - interface EphemeralKeyInfo { - /** - * The supported types are 'DH' and 'ECDH'. - */ - type: string; - /** - * The name property is available only when type is 'ECDH'. - */ - name?: string | undefined; - /** - * The size of parameter of an ephemeral key exchange. - */ - size: number; - } - interface KeyObject { - /** - * Private keys in PEM format. - */ - pem: string | Buffer; - /** - * Optional passphrase. - */ - passphrase?: string | undefined; - } - interface PxfObject { - /** - * PFX or PKCS12 encoded private key and certificate chain. - */ - buf: string | Buffer; - /** - * Optional passphrase. - */ - passphrase?: string | undefined; - } - interface TLSSocketOptions extends SecureContextOptions, CommonConnectionOptions { - /** - * If true the TLS socket will be instantiated in server-mode. - * Defaults to false. - */ - isServer?: boolean | undefined; - /** - * An optional net.Server instance. - */ - server?: net.Server | undefined; - /** - * An optional Buffer instance containing a TLS session. - */ - session?: Buffer | undefined; - /** - * If true, specifies that the OCSP status request extension will be - * added to the client hello and an 'OCSPResponse' event will be - * emitted on the socket before establishing a secure communication - */ - requestOCSP?: boolean | undefined; - } - interface TLSSocketEventMap extends net.SocketEventMap { - "keylog": [line: NonSharedBuffer]; - "OCSPResponse": [response: NonSharedBuffer]; - "secureConnect": []; - "session": [session: NonSharedBuffer]; - } - /** - * Performs transparent encryption of written data and all required TLS - * negotiation. - * - * Instances of `tls.TLSSocket` implement the duplex `Stream` interface. - * - * Methods that return TLS connection metadata (e.g.{@link TLSSocket.getPeerCertificate}) will only return data while the - * connection is open. - * @since v0.11.4 - */ - class TLSSocket extends net.Socket { - /** - * Construct a new tls.TLSSocket object from an existing TCP socket. - */ - constructor(socket: net.Socket | stream.Duplex, options?: TLSSocketOptions); - /** - * This property is `true` if the peer certificate was signed by one of the CAs - * specified when creating the `tls.TLSSocket` instance, otherwise `false`. - * @since v0.11.4 - */ - authorized: boolean; - /** - * Returns the reason why the peer's certificate was not been verified. This - * property is set only when `tlsSocket.authorized === false`. - * @since v0.11.4 - */ - authorizationError: Error; - /** - * Always returns `true`. This may be used to distinguish TLS sockets from regular`net.Socket` instances. - * @since v0.11.4 - */ - encrypted: true; - /** - * String containing the selected ALPN protocol. - * Before a handshake has completed, this value is always null. - * When a handshake is completed but not ALPN protocol was selected, tlsSocket.alpnProtocol equals false. - */ - alpnProtocol: string | false | null; - /** - * Returns an object representing the local certificate. The returned object has - * some properties corresponding to the fields of the certificate. - * - * See {@link TLSSocket.getPeerCertificate} for an example of the certificate - * structure. - * - * If there is no local certificate, an empty object will be returned. If the - * socket has been destroyed, `null` will be returned. - * @since v11.2.0 - */ - getCertificate(): PeerCertificate | object | null; - /** - * Returns an object containing information on the negotiated cipher suite. - * - * For example, a TLSv1.2 protocol with AES256-SHA cipher: - * - * ```json - * { - * "name": "AES256-SHA", - * "standardName": "TLS_RSA_WITH_AES_256_CBC_SHA", - * "version": "SSLv3" - * } - * ``` - * - * See [SSL\_CIPHER\_get\_name](https://www.openssl.org/docs/man1.1.1/man3/SSL_CIPHER_get_name.html) for more information. - * @since v0.11.4 - */ - getCipher(): CipherNameAndProtocol; - /** - * Returns an object representing the type, name, and size of parameter of - * an ephemeral key exchange in `perfect forward secrecy` on a client - * connection. It returns an empty object when the key exchange is not - * ephemeral. As this is only supported on a client socket; `null` is returned - * if called on a server socket. The supported types are `'DH'` and `'ECDH'`. The `name` property is available only when type is `'ECDH'`. - * - * For example: `{ type: 'ECDH', name: 'prime256v1', size: 256 }`. - * @since v5.0.0 - */ - getEphemeralKeyInfo(): EphemeralKeyInfo | object | null; - /** - * As the `Finished` messages are message digests of the complete handshake - * (with a total of 192 bits for TLS 1.0 and more for SSL 3.0), they can - * be used for external authentication procedures when the authentication - * provided by SSL/TLS is not desired or is not enough. - * - * Corresponds to the `SSL_get_finished` routine in OpenSSL and may be used - * to implement the `tls-unique` channel binding from [RFC 5929](https://tools.ietf.org/html/rfc5929). - * @since v9.9.0 - * @return The latest `Finished` message that has been sent to the socket as part of a SSL/TLS handshake, or `undefined` if no `Finished` message has been sent yet. - */ - getFinished(): NonSharedBuffer | undefined; - /** - * Returns an object representing the peer's certificate. If the peer does not - * provide a certificate, an empty object will be returned. If the socket has been - * destroyed, `null` will be returned. - * - * If the full certificate chain was requested, each certificate will include an`issuerCertificate` property containing an object representing its issuer's - * certificate. - * @since v0.11.4 - * @param detailed Include the full certificate chain if `true`, otherwise include just the peer's certificate. - * @return A certificate object. - */ - getPeerCertificate(detailed: true): DetailedPeerCertificate; - getPeerCertificate(detailed?: false): PeerCertificate; - getPeerCertificate(detailed?: boolean): PeerCertificate | DetailedPeerCertificate; - /** - * As the `Finished` messages are message digests of the complete handshake - * (with a total of 192 bits for TLS 1.0 and more for SSL 3.0), they can - * be used for external authentication procedures when the authentication - * provided by SSL/TLS is not desired or is not enough. - * - * Corresponds to the `SSL_get_peer_finished` routine in OpenSSL and may be used - * to implement the `tls-unique` channel binding from [RFC 5929](https://tools.ietf.org/html/rfc5929). - * @since v9.9.0 - * @return The latest `Finished` message that is expected or has actually been received from the socket as part of a SSL/TLS handshake, or `undefined` if there is no `Finished` message so - * far. - */ - getPeerFinished(): NonSharedBuffer | undefined; - /** - * Returns a string containing the negotiated SSL/TLS protocol version of the - * current connection. The value `'unknown'` will be returned for connected - * sockets that have not completed the handshaking process. The value `null` will - * be returned for server sockets or disconnected client sockets. - * - * Protocol versions are: - * - * * `'SSLv3'` - * * `'TLSv1'` - * * `'TLSv1.1'` - * * `'TLSv1.2'` - * * `'TLSv1.3'` - * - * See the OpenSSL [`SSL_get_version`](https://www.openssl.org/docs/man1.1.1/man3/SSL_get_version.html) documentation for more information. - * @since v5.7.0 - */ - getProtocol(): string | null; - /** - * Returns the TLS session data or `undefined` if no session was - * negotiated. On the client, the data can be provided to the `session` option of {@link connect} to resume the connection. On the server, it may be useful - * for debugging. - * - * See `Session Resumption` for more information. - * - * Note: `getSession()` works only for TLSv1.2 and below. For TLSv1.3, applications - * must use the `'session'` event (it also works for TLSv1.2 and below). - * @since v0.11.4 - */ - getSession(): NonSharedBuffer | undefined; - /** - * See [SSL\_get\_shared\_sigalgs](https://www.openssl.org/docs/man1.1.1/man3/SSL_get_shared_sigalgs.html) for more information. - * @since v12.11.0 - * @return List of signature algorithms shared between the server and the client in the order of decreasing preference. - */ - getSharedSigalgs(): string[]; - /** - * For a client, returns the TLS session ticket if one is available, or`undefined`. For a server, always returns `undefined`. - * - * It may be useful for debugging. - * - * See `Session Resumption` for more information. - * @since v0.11.4 - */ - getTLSTicket(): NonSharedBuffer | undefined; - /** - * See `Session Resumption` for more information. - * @since v0.5.6 - * @return `true` if the session was reused, `false` otherwise. - */ - isSessionReused(): boolean; - /** - * The `tlsSocket.renegotiate()` method initiates a TLS renegotiation process. - * Upon completion, the `callback` function will be passed a single argument - * that is either an `Error` (if the request failed) or `null`. - * - * This method can be used to request a peer's certificate after the secure - * connection has been established. - * - * When running as the server, the socket will be destroyed with an error after `handshakeTimeout` timeout. - * - * For TLSv1.3, renegotiation cannot be initiated, it is not supported by the - * protocol. - * @since v0.11.8 - * @param callback If `renegotiate()` returned `true`, callback is attached once to the `'secure'` event. If `renegotiate()` returned `false`, `callback` will be called in the next tick with - * an error, unless the `tlsSocket` has been destroyed, in which case `callback` will not be called at all. - * @return `true` if renegotiation was initiated, `false` otherwise. - */ - renegotiate( - options: { - rejectUnauthorized?: boolean | undefined; - requestCert?: boolean | undefined; - }, - callback: (err: Error | null) => void, - ): undefined | boolean; - /** - * The `tlsSocket.setKeyCert()` method sets the private key and certificate to use for the socket. - * This is mainly useful if you wish to select a server certificate from a TLS server's `ALPNCallback`. - * @since v22.5.0, v20.17.0 - * @param context An object containing at least `key` and `cert` properties from the {@link createSecureContext()} `options`, - * or a TLS context object created with {@link createSecureContext()} itself. - */ - setKeyCert(context: SecureContextOptions | SecureContext): void; - /** - * The `tlsSocket.setMaxSendFragment()` method sets the maximum TLS fragment size. - * Returns `true` if setting the limit succeeded; `false` otherwise. - * - * Smaller fragment sizes decrease the buffering latency on the client: larger - * fragments are buffered by the TLS layer until the entire fragment is received - * and its integrity is verified; large fragments can span multiple roundtrips - * and their processing can be delayed due to packet loss or reordering. However, - * smaller fragments add extra TLS framing bytes and CPU overhead, which may - * decrease overall server throughput. - * @since v0.11.11 - * @param [size=16384] The maximum TLS fragment size. The maximum value is `16384`. - */ - setMaxSendFragment(size: number): boolean; - /** - * Disables TLS renegotiation for this `TLSSocket` instance. Once called, attempts - * to renegotiate will trigger an `'error'` event on the `TLSSocket`. - * @since v8.4.0 - */ - disableRenegotiation(): void; - /** - * When enabled, TLS packet trace information is written to `stderr`. This can be - * used to debug TLS connection problems. - * - * The format of the output is identical to the output of`openssl s_client -trace` or `openssl s_server -trace`. While it is produced by - * OpenSSL's `SSL_trace()` function, the format is undocumented, can change - * without notice, and should not be relied on. - * @since v12.2.0 - */ - enableTrace(): void; - /** - * Returns the peer certificate as an `X509Certificate` object. - * - * If there is no peer certificate, or the socket has been destroyed,`undefined` will be returned. - * @since v15.9.0 - */ - getPeerX509Certificate(): X509Certificate | undefined; - /** - * Returns the local certificate as an `X509Certificate` object. - * - * If there is no local certificate, or the socket has been destroyed,`undefined` will be returned. - * @since v15.9.0 - */ - getX509Certificate(): X509Certificate | undefined; - /** - * Keying material is used for validations to prevent different kind of attacks in - * network protocols, for example in the specifications of IEEE 802.1X. - * - * Example - * - * ```js - * const keyingMaterial = tlsSocket.exportKeyingMaterial( - * 128, - * 'client finished'); - * - * /* - * Example return value of keyingMaterial: - * - * - * ``` - * - * See the OpenSSL [`SSL_export_keying_material`](https://www.openssl.org/docs/man1.1.1/man3/SSL_export_keying_material.html) documentation for more - * information. - * @since v13.10.0, v12.17.0 - * @param length number of bytes to retrieve from keying material - * @param label an application specific label, typically this will be a value from the [IANA Exporter Label - * Registry](https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml#exporter-labels). - * @param context Optionally provide a context. - * @return requested bytes of the keying material - */ - exportKeyingMaterial(length: number, label: string, context: Buffer): NonSharedBuffer; - // #region InternalEventEmitter - addListener( - eventName: E, - listener: (...args: TLSSocketEventMap[E]) => void, - ): this; - addListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - emit(eventName: E, ...args: TLSSocketEventMap[E]): boolean; - emit(eventName: string | symbol, ...args: any[]): boolean; - listenerCount( - eventName: E, - listener?: (...args: TLSSocketEventMap[E]) => void, - ): number; - listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number; - listeners(eventName: E): ((...args: TLSSocketEventMap[E]) => void)[]; - listeners(eventName: string | symbol): ((...args: any[]) => void)[]; - off(eventName: E, listener: (...args: TLSSocketEventMap[E]) => void): this; - off(eventName: string | symbol, listener: (...args: any[]) => void): this; - on(eventName: E, listener: (...args: TLSSocketEventMap[E]) => void): this; - on(eventName: string | symbol, listener: (...args: any[]) => void): this; - once(eventName: E, listener: (...args: TLSSocketEventMap[E]) => void): this; - once(eventName: string | symbol, listener: (...args: any[]) => void): this; - prependListener( - eventName: E, - listener: (...args: TLSSocketEventMap[E]) => void, - ): this; - prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - prependOnceListener( - eventName: E, - listener: (...args: TLSSocketEventMap[E]) => void, - ): this; - prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - rawListeners(eventName: E): ((...args: TLSSocketEventMap[E]) => void)[]; - rawListeners(eventName: string | symbol): ((...args: any[]) => void)[]; - // eslint-disable-next-line @definitelytyped/no-unnecessary-generics - removeAllListeners(eventName?: E): this; - removeAllListeners(eventName?: string | symbol): this; - removeListener( - eventName: E, - listener: (...args: TLSSocketEventMap[E]) => void, - ): this; - removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - // #endregion - } - interface CommonConnectionOptions { - /** - * An optional TLS context object from tls.createSecureContext() - */ - secureContext?: SecureContext | undefined; - /** - * When enabled, TLS packet trace information is written to `stderr`. This can be - * used to debug TLS connection problems. - * @default false - */ - enableTrace?: boolean | undefined; - /** - * If true the server will request a certificate from clients that - * connect and attempt to verify that certificate. Defaults to - * false. - */ - requestCert?: boolean | undefined; - /** - * An array of strings or a Buffer naming possible ALPN protocols. - * (Protocols should be ordered by their priority.) - */ - ALPNProtocols?: readonly string[] | NodeJS.ArrayBufferView | undefined; - /** - * SNICallback(servername, cb) A function that will be - * called if the client supports SNI TLS extension. Two arguments - * will be passed when called: servername and cb. SNICallback should - * invoke cb(null, ctx), where ctx is a SecureContext instance. - * (tls.createSecureContext(...) can be used to get a proper - * SecureContext.) If SNICallback wasn't provided the default callback - * with high-level API will be used (see below). - */ - SNICallback?: ((servername: string, cb: (err: Error | null, ctx?: SecureContext) => void) => void) | undefined; - /** - * If true the server will reject any connection which is not - * authorized with the list of supplied CAs. This option only has an - * effect if requestCert is true. - * @default true - */ - rejectUnauthorized?: boolean | undefined; - } - interface TlsOptions extends SecureContextOptions, CommonConnectionOptions, net.ServerOpts { - /** - * Abort the connection if the SSL/TLS handshake does not finish in the - * specified number of milliseconds. A 'tlsClientError' is emitted on - * the tls.Server object whenever a handshake times out. Default: - * 120000 (120 seconds). - */ - handshakeTimeout?: number | undefined; - /** - * The number of seconds after which a TLS session created by the - * server will no longer be resumable. See Session Resumption for more - * information. Default: 300. - */ - sessionTimeout?: number | undefined; - /** - * 48-bytes of cryptographically strong pseudo-random data. - */ - ticketKeys?: Buffer | undefined; - /** - * @param socket - * @param identity identity parameter sent from the client. - * @return pre-shared key that must either be - * a buffer or `null` to stop the negotiation process. Returned PSK must be - * compatible with the selected cipher's digest. - * - * When negotiating TLS-PSK (pre-shared keys), this function is called - * with the identity provided by the client. - * If the return value is `null` the negotiation process will stop and an - * "unknown_psk_identity" alert message will be sent to the other party. - * If the server wishes to hide the fact that the PSK identity was not known, - * the callback must provide some random data as `psk` to make the connection - * fail with "decrypt_error" before negotiation is finished. - * PSK ciphers are disabled by default, and using TLS-PSK thus - * requires explicitly specifying a cipher suite with the `ciphers` option. - * More information can be found in the RFC 4279. - */ - pskCallback?: ((socket: TLSSocket, identity: string) => NodeJS.ArrayBufferView | null) | undefined; - /** - * hint to send to a client to help - * with selecting the identity during TLS-PSK negotiation. Will be ignored - * in TLS 1.3. Upon failing to set pskIdentityHint `tlsClientError` will be - * emitted with `ERR_TLS_PSK_SET_IDENTIY_HINT_FAILED` code. - */ - pskIdentityHint?: string | undefined; - } - interface PSKCallbackNegotation { - psk: NodeJS.ArrayBufferView; - identity: string; - } - interface ConnectionOptions extends SecureContextOptions, CommonConnectionOptions { - host?: string | undefined; - port?: number | undefined; - path?: string | undefined; // Creates unix socket connection to path. If this option is specified, `host` and `port` are ignored. - socket?: stream.Duplex | undefined; // Establish secure connection on a given socket rather than creating a new socket - checkServerIdentity?: typeof checkServerIdentity | undefined; - servername?: string | undefined; // SNI TLS Extension - session?: Buffer | undefined; - minDHSize?: number | undefined; - lookup?: net.LookupFunction | undefined; - timeout?: number | undefined; - /** - * When negotiating TLS-PSK (pre-shared keys), this function is called - * with optional identity `hint` provided by the server or `null` - * in case of TLS 1.3 where `hint` was removed. - * It will be necessary to provide a custom `tls.checkServerIdentity()` - * for the connection as the default one will try to check hostname/IP - * of the server against the certificate but that's not applicable for PSK - * because there won't be a certificate present. - * More information can be found in the RFC 4279. - * - * @param hint message sent from the server to help client - * decide which identity to use during negotiation. - * Always `null` if TLS 1.3 is used. - * @returns Return `null` to stop the negotiation process. `psk` must be - * compatible with the selected cipher's digest. - * `identity` must use UTF-8 encoding. - */ - pskCallback?: ((hint: string | null) => PSKCallbackNegotation | null) | undefined; - } - interface ServerEventMap extends net.ServerEventMap { - "connection": [socket: net.Socket]; - "keylog": [line: NonSharedBuffer, tlsSocket: TLSSocket]; - "newSession": [sessionId: NonSharedBuffer, sessionData: NonSharedBuffer, callback: () => void]; - "OCSPRequest": [ - certificate: NonSharedBuffer, - issuer: NonSharedBuffer, - callback: (err: Error | null, resp: Buffer | null) => void, - ]; - "resumeSession": [sessionId: Buffer, callback: (err: Error | null, sessionData?: Buffer) => void]; - "secureConnection": [tlsSocket: TLSSocket]; - "tlsClientError": [exception: Error, tlsSocket: TLSSocket]; - } - /** - * Accepts encrypted connections using TLS or SSL. - * @since v0.3.2 - */ - class Server extends net.Server { - constructor(secureConnectionListener?: (socket: TLSSocket) => void); - constructor(options: TlsOptions, secureConnectionListener?: (socket: TLSSocket) => void); - /** - * The `server.addContext()` method adds a secure context that will be used if - * the client request's SNI name matches the supplied `hostname` (or wildcard). - * - * When there are multiple matching contexts, the most recently added one is - * used. - * @since v0.5.3 - * @param hostname A SNI host name or wildcard (e.g. `'*'`) - * @param context An object containing any of the possible properties from the {@link createSecureContext} `options` arguments (e.g. `key`, `cert`, `ca`, etc), or a TLS context object created - * with {@link createSecureContext} itself. - */ - addContext(hostname: string, context: SecureContextOptions | SecureContext): void; - /** - * Returns the session ticket keys. - * - * See `Session Resumption` for more information. - * @since v3.0.0 - * @return A 48-byte buffer containing the session ticket keys. - */ - getTicketKeys(): NonSharedBuffer; - /** - * The `server.setSecureContext()` method replaces the secure context of an - * existing server. Existing connections to the server are not interrupted. - * @since v11.0.0 - * @param options An object containing any of the possible properties from the {@link createSecureContext} `options` arguments (e.g. `key`, `cert`, `ca`, etc). - */ - setSecureContext(options: SecureContextOptions): void; - /** - * Sets the session ticket keys. - * - * Changes to the ticket keys are effective only for future server connections. - * Existing or currently pending server connections will use the previous keys. - * - * See `Session Resumption` for more information. - * @since v3.0.0 - * @param keys A 48-byte buffer containing the session ticket keys. - */ - setTicketKeys(keys: Buffer): void; - // #region InternalEventEmitter - addListener(eventName: E, listener: (...args: ServerEventMap[E]) => void): this; - addListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - emit(eventName: E, ...args: ServerEventMap[E]): boolean; - emit(eventName: string | symbol, ...args: any[]): boolean; - listenerCount( - eventName: E, - listener?: (...args: ServerEventMap[E]) => void, - ): number; - listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number; - listeners(eventName: E): ((...args: ServerEventMap[E]) => void)[]; - listeners(eventName: string | symbol): ((...args: any[]) => void)[]; - off(eventName: E, listener: (...args: ServerEventMap[E]) => void): this; - off(eventName: string | symbol, listener: (...args: any[]) => void): this; - on(eventName: E, listener: (...args: ServerEventMap[E]) => void): this; - on(eventName: string | symbol, listener: (...args: any[]) => void): this; - once(eventName: E, listener: (...args: ServerEventMap[E]) => void): this; - once(eventName: string | symbol, listener: (...args: any[]) => void): this; - prependListener( - eventName: E, - listener: (...args: ServerEventMap[E]) => void, - ): this; - prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - prependOnceListener( - eventName: E, - listener: (...args: ServerEventMap[E]) => void, - ): this; - prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - rawListeners(eventName: E): ((...args: ServerEventMap[E]) => void)[]; - rawListeners(eventName: string | symbol): ((...args: any[]) => void)[]; - // eslint-disable-next-line @definitelytyped/no-unnecessary-generics - removeAllListeners(eventName?: E): this; - removeAllListeners(eventName?: string | symbol): this; - removeListener( - eventName: E, - listener: (...args: ServerEventMap[E]) => void, - ): this; - removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - // #endregion - } - type SecureVersion = "TLSv1.3" | "TLSv1.2" | "TLSv1.1" | "TLSv1"; - interface SecureContextOptions { - /** - * If set, this will be called when a client opens a connection using the ALPN extension. - * One argument will be passed to the callback: an object containing `servername` and `protocols` fields, - * respectively containing the server name from the SNI extension (if any) and an array of - * ALPN protocol name strings. The callback must return either one of the strings listed in `protocols`, - * which will be returned to the client as the selected ALPN protocol, or `undefined`, - * to reject the connection with a fatal alert. If a string is returned that does not match one of - * the client's ALPN protocols, an error will be thrown. - * This option cannot be used with the `ALPNProtocols` option, and setting both options will throw an error. - */ - ALPNCallback?: ((arg: { servername: string; protocols: string[] }) => string | undefined) | undefined; - /** - * Treat intermediate (non-self-signed) - * certificates in the trust CA certificate list as trusted. - * @since v22.9.0, v20.18.0 - */ - allowPartialTrustChain?: boolean | undefined; - /** - * Optionally override the trusted CA certificates. Default is to trust - * the well-known CAs curated by Mozilla. Mozilla's CAs are completely - * replaced when CAs are explicitly specified using this option. - */ - ca?: string | Buffer | Array | undefined; - /** - * Cert chains in PEM format. One cert chain should be provided per - * private key. Each cert chain should consist of the PEM formatted - * certificate for a provided private key, followed by the PEM - * formatted intermediate certificates (if any), in order, and not - * including the root CA (the root CA must be pre-known to the peer, - * see ca). When providing multiple cert chains, they do not have to - * be in the same order as their private keys in key. If the - * intermediate certificates are not provided, the peer will not be - * able to validate the certificate, and the handshake will fail. - */ - cert?: string | Buffer | Array | undefined; - /** - * Colon-separated list of supported signature algorithms. The list - * can contain digest algorithms (SHA256, MD5 etc.), public key - * algorithms (RSA-PSS, ECDSA etc.), combination of both (e.g - * 'RSA+SHA384') or TLS v1.3 scheme names (e.g. rsa_pss_pss_sha512). - */ - sigalgs?: string | undefined; - /** - * Cipher suite specification, replacing the default. For more - * information, see modifying the default cipher suite. Permitted - * ciphers can be obtained via tls.getCiphers(). Cipher names must be - * uppercased in order for OpenSSL to accept them. - */ - ciphers?: string | undefined; - /** - * Name of an OpenSSL engine which can provide the client certificate. - * @deprecated - */ - clientCertEngine?: string | undefined; - /** - * PEM formatted CRLs (Certificate Revocation Lists). - */ - crl?: string | Buffer | Array | undefined; - /** - * `'auto'` or custom Diffie-Hellman parameters, required for non-ECDHE perfect forward secrecy. - * If omitted or invalid, the parameters are silently discarded and DHE ciphers will not be available. - * ECDHE-based perfect forward secrecy will still be available. - */ - dhparam?: string | Buffer | undefined; - /** - * A string describing a named curve or a colon separated list of curve - * NIDs or names, for example P-521:P-384:P-256, to use for ECDH key - * agreement. Set to auto to select the curve automatically. Use - * crypto.getCurves() to obtain a list of available curve names. On - * recent releases, openssl ecparam -list_curves will also display the - * name and description of each available elliptic curve. Default: - * tls.DEFAULT_ECDH_CURVE. - */ - ecdhCurve?: string | undefined; - /** - * Attempt to use the server's cipher suite preferences instead of the - * client's. When true, causes SSL_OP_CIPHER_SERVER_PREFERENCE to be - * set in secureOptions - */ - honorCipherOrder?: boolean | undefined; - /** - * Private keys in PEM format. PEM allows the option of private keys - * being encrypted. Encrypted keys will be decrypted with - * options.passphrase. Multiple keys using different algorithms can be - * provided either as an array of unencrypted key strings or buffers, - * or an array of objects in the form {pem: [, - * passphrase: ]}. The object form can only occur in an array. - * object.passphrase is optional. Encrypted keys will be decrypted with - * object.passphrase if provided, or options.passphrase if it is not. - */ - key?: string | Buffer | Array | undefined; - /** - * Name of an OpenSSL engine to get private key from. Should be used - * together with privateKeyIdentifier. - * @deprecated - */ - privateKeyEngine?: string | undefined; - /** - * Identifier of a private key managed by an OpenSSL engine. Should be - * used together with privateKeyEngine. Should not be set together with - * key, because both options define a private key in different ways. - * @deprecated - */ - privateKeyIdentifier?: string | undefined; - /** - * Optionally set the maximum TLS version to allow. One - * of `'TLSv1.3'`, `'TLSv1.2'`, `'TLSv1.1'`, or `'TLSv1'`. Cannot be specified along with the - * `secureProtocol` option, use one or the other. - * **Default:** `'TLSv1.3'`, unless changed using CLI options. Using - * `--tls-max-v1.2` sets the default to `'TLSv1.2'`. Using `--tls-max-v1.3` sets the default to - * `'TLSv1.3'`. If multiple of the options are provided, the highest maximum is used. - */ - maxVersion?: SecureVersion | undefined; - /** - * Optionally set the minimum TLS version to allow. One - * of `'TLSv1.3'`, `'TLSv1.2'`, `'TLSv1.1'`, or `'TLSv1'`. Cannot be specified along with the - * `secureProtocol` option, use one or the other. It is not recommended to use - * less than TLSv1.2, but it may be required for interoperability. - * **Default:** `'TLSv1.2'`, unless changed using CLI options. Using - * `--tls-v1.0` sets the default to `'TLSv1'`. Using `--tls-v1.1` sets the default to - * `'TLSv1.1'`. Using `--tls-min-v1.3` sets the default to - * 'TLSv1.3'. If multiple of the options are provided, the lowest minimum is used. - */ - minVersion?: SecureVersion | undefined; - /** - * Shared passphrase used for a single private key and/or a PFX. - */ - passphrase?: string | undefined; - /** - * PFX or PKCS12 encoded private key and certificate chain. pfx is an - * alternative to providing key and cert individually. PFX is usually - * encrypted, if it is, passphrase will be used to decrypt it. Multiple - * PFX can be provided either as an array of unencrypted PFX buffers, - * or an array of objects in the form {buf: [, - * passphrase: ]}. The object form can only occur in an array. - * object.passphrase is optional. Encrypted PFX will be decrypted with - * object.passphrase if provided, or options.passphrase if it is not. - */ - pfx?: string | Buffer | Array | undefined; - /** - * Optionally affect the OpenSSL protocol behavior, which is not - * usually necessary. This should be used carefully if at all! Value is - * a numeric bitmask of the SSL_OP_* options from OpenSSL Options - */ - secureOptions?: number | undefined; // Value is a numeric bitmask of the `SSL_OP_*` options - /** - * Legacy mechanism to select the TLS protocol version to use, it does - * not support independent control of the minimum and maximum version, - * and does not support limiting the protocol to TLSv1.3. Use - * minVersion and maxVersion instead. The possible values are listed as - * SSL_METHODS, use the function names as strings. For example, use - * 'TLSv1_1_method' to force TLS version 1.1, or 'TLS_method' to allow - * any TLS protocol version up to TLSv1.3. It is not recommended to use - * TLS versions less than 1.2, but it may be required for - * interoperability. Default: none, see minVersion. - */ - secureProtocol?: string | undefined; - /** - * Opaque identifier used by servers to ensure session state is not - * shared between applications. Unused by clients. - */ - sessionIdContext?: string | undefined; - /** - * 48-bytes of cryptographically strong pseudo-random data. - * See Session Resumption for more information. - */ - ticketKeys?: Buffer | undefined; - /** - * The number of seconds after which a TLS session created by the - * server will no longer be resumable. See Session Resumption for more - * information. Default: 300. - */ - sessionTimeout?: number | undefined; - } - interface SecureContext { - context: any; - } - /** - * Verifies the certificate `cert` is issued to `hostname`. - * - * Returns [Error](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error) object, populating it with `reason`, `host`, and `cert` on - * failure. On success, returns [undefined](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Undefined_type). - * - * This function is intended to be used in combination with the`checkServerIdentity` option that can be passed to {@link connect} and as - * such operates on a `certificate object`. For other purposes, consider using `x509.checkHost()` instead. - * - * This function can be overwritten by providing an alternative function as the `options.checkServerIdentity` option that is passed to `tls.connect()`. The - * overwriting function can call `tls.checkServerIdentity()` of course, to augment - * the checks done with additional verification. - * - * This function is only called if the certificate passed all other checks, such as - * being issued by trusted CA (`options.ca`). - * - * Earlier versions of Node.js incorrectly accepted certificates for a given`hostname` if a matching `uniformResourceIdentifier` subject alternative name - * was present (see [CVE-2021-44531](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-44531)). Applications that wish to accept`uniformResourceIdentifier` subject alternative names can use - * a custom `options.checkServerIdentity` function that implements the desired behavior. - * @since v0.8.4 - * @param hostname The host name or IP address to verify the certificate against. - * @param cert A `certificate object` representing the peer's certificate. - */ - function checkServerIdentity(hostname: string, cert: PeerCertificate): Error | undefined; - /** - * Creates a new {@link Server}. The `secureConnectionListener`, if provided, is - * automatically set as a listener for the `'secureConnection'` event. - * - * The `ticketKeys` options is automatically shared between `node:cluster` module - * workers. - * - * The following illustrates a simple echo server: - * - * ```js - * import tls from 'node:tls'; - * import fs from 'node:fs'; - * - * const options = { - * key: fs.readFileSync('server-key.pem'), - * cert: fs.readFileSync('server-cert.pem'), - * - * // This is necessary only if using client certificate authentication. - * requestCert: true, - * - * // This is necessary only if the client uses a self-signed certificate. - * ca: [ fs.readFileSync('client-cert.pem') ], - * }; - * - * const server = tls.createServer(options, (socket) => { - * console.log('server connected', - * socket.authorized ? 'authorized' : 'unauthorized'); - * socket.write('welcome!\n'); - * socket.setEncoding('utf8'); - * socket.pipe(socket); - * }); - * server.listen(8000, () => { - * console.log('server bound'); - * }); - * ``` - * - * The server can be tested by connecting to it using the example client from {@link connect}. - * @since v0.3.2 - */ - function createServer(secureConnectionListener?: (socket: TLSSocket) => void): Server; - function createServer(options: TlsOptions, secureConnectionListener?: (socket: TLSSocket) => void): Server; - /** - * The `callback` function, if specified, will be added as a listener for the `'secureConnect'` event. - * - * `tls.connect()` returns a {@link TLSSocket} object. - * - * Unlike the `https` API, `tls.connect()` does not enable the - * SNI (Server Name Indication) extension by default, which may cause some - * servers to return an incorrect certificate or reject the connection - * altogether. To enable SNI, set the `servername` option in addition - * to `host`. - * - * The following illustrates a client for the echo server example from {@link createServer}: - * - * ```js - * // Assumes an echo server that is listening on port 8000. - * import tls from 'node:tls'; - * import fs from 'node:fs'; - * - * const options = { - * // Necessary only if the server requires client certificate authentication. - * key: fs.readFileSync('client-key.pem'), - * cert: fs.readFileSync('client-cert.pem'), - * - * // Necessary only if the server uses a self-signed certificate. - * ca: [ fs.readFileSync('server-cert.pem') ], - * - * // Necessary only if the server's cert isn't for "localhost". - * checkServerIdentity: () => { return null; }, - * }; - * - * const socket = tls.connect(8000, options, () => { - * console.log('client connected', - * socket.authorized ? 'authorized' : 'unauthorized'); - * process.stdin.pipe(socket); - * process.stdin.resume(); - * }); - * socket.setEncoding('utf8'); - * socket.on('data', (data) => { - * console.log(data); - * }); - * socket.on('end', () => { - * console.log('server ends connection'); - * }); - * ``` - * @since v0.11.3 - */ - function connect(options: ConnectionOptions, secureConnectListener?: () => void): TLSSocket; - function connect( - port: number, - host?: string, - options?: ConnectionOptions, - secureConnectListener?: () => void, - ): TLSSocket; - function connect(port: number, options?: ConnectionOptions, secureConnectListener?: () => void): TLSSocket; - /** - * `{@link createServer}` sets the default value of the `honorCipherOrder` option - * to `true`, other APIs that create secure contexts leave it unset. - * - * `{@link createServer}` uses a 128 bit truncated SHA1 hash value generated - * from `process.argv` as the default value of the `sessionIdContext` option, other - * APIs that create secure contexts have no default value. - * - * The `tls.createSecureContext()` method creates a `SecureContext` object. It is - * usable as an argument to several `tls` APIs, such as `server.addContext()`, - * but has no public methods. The {@link Server} constructor and the {@link createServer} method do not support the `secureContext` option. - * - * A key is _required_ for ciphers that use certificates. Either `key` or `pfx` can be used to provide it. - * - * If the `ca` option is not given, then Node.js will default to using [Mozilla's publicly trusted list of - * CAs](https://hg.mozilla.org/mozilla-central/raw-file/tip/security/nss/lib/ckfw/builtins/certdata.txt). - * - * Custom DHE parameters are discouraged in favor of the new `dhparam: 'auto' `option. When set to `'auto'`, well-known DHE parameters of sufficient strength - * will be selected automatically. Otherwise, if necessary, `openssl dhparam` can - * be used to create custom parameters. The key length must be greater than or - * equal to 1024 bits or else an error will be thrown. Although 1024 bits is - * permissible, use 2048 bits or larger for stronger security. - * @since v0.11.13 - */ - function createSecureContext(options?: SecureContextOptions): SecureContext; - /** - * Returns an array containing the CA certificates from various sources, depending on `type`: - * - * * `"default"`: return the CA certificates that will be used by the Node.js TLS clients by default. - * * When `--use-bundled-ca` is enabled (default), or `--use-openssl-ca` is not enabled, - * this would include CA certificates from the bundled Mozilla CA store. - * * When `--use-system-ca` is enabled, this would also include certificates from the system's - * trusted store. - * * When `NODE_EXTRA_CA_CERTS` is used, this would also include certificates loaded from the specified - * file. - * * `"system"`: return the CA certificates that are loaded from the system's trusted store, according - * to rules set by `--use-system-ca`. This can be used to get the certificates from the system - * when `--use-system-ca` is not enabled. - * * `"bundled"`: return the CA certificates from the bundled Mozilla CA store. This would be the same - * as `tls.rootCertificates`. - * * `"extra"`: return the CA certificates loaded from `NODE_EXTRA_CA_CERTS`. It's an empty array if - * `NODE_EXTRA_CA_CERTS` is not set. - * @since v22.15.0 - * @param type The type of CA certificates that will be returned. Valid values - * are `"default"`, `"system"`, `"bundled"` and `"extra"`. - * **Default:** `"default"`. - * @returns An array of PEM-encoded certificates. The array may contain duplicates - * if the same certificate is repeatedly stored in multiple sources. - */ - function getCACertificates(type?: "default" | "system" | "bundled" | "extra"): string[]; - /** - * Returns an array with the names of the supported TLS ciphers. The names are - * lower-case for historical reasons, but must be uppercased to be used in - * the `ciphers` option of `{@link createSecureContext}`. - * - * Not all supported ciphers are enabled by default. See - * [Modifying the default TLS cipher suite](https://nodejs.org/docs/latest-v25.x/api/tls.html#modifying-the-default-tls-cipher-suite). - * - * Cipher names that start with `'tls_'` are for TLSv1.3, all the others are for - * TLSv1.2 and below. - * - * ```js - * console.log(tls.getCiphers()); // ['aes128-gcm-sha256', 'aes128-sha', ...] - * ``` - * @since v0.10.2 - */ - function getCiphers(): string[]; - /** - * Sets the default CA certificates used by Node.js TLS clients. If the provided - * certificates are parsed successfully, they will become the default CA - * certificate list returned by {@link getCACertificates} and used - * by subsequent TLS connections that don't specify their own CA certificates. - * The certificates will be deduplicated before being set as the default. - * - * This function only affects the current Node.js thread. Previous - * sessions cached by the HTTPS agent won't be affected by this change, so - * this method should be called before any unwanted cachable TLS connections are - * made. - * - * To use system CA certificates as the default: - * - * ```js - * import tls from 'node:tls'; - * tls.setDefaultCACertificates(tls.getCACertificates('system')); - * ``` - * - * This function completely replaces the default CA certificate list. To add additional - * certificates to the existing defaults, get the current certificates and append to them: - * - * ```js - * import tls from 'node:tls'; - * const currentCerts = tls.getCACertificates('default'); - * const additionalCerts = ['-----BEGIN CERTIFICATE-----\n...']; - * tls.setDefaultCACertificates([...currentCerts, ...additionalCerts]); - * ``` - * @since v24.5.0 - * @param certs An array of CA certificates in PEM format. - */ - function setDefaultCACertificates(certs: ReadonlyArray): void; - /** - * The default curve name to use for ECDH key agreement in a tls server. - * The default value is `'auto'`. See `{@link createSecureContext()}` for further - * information. - * @since v0.11.13 - */ - let DEFAULT_ECDH_CURVE: string; - /** - * The default value of the `maxVersion` option of `{@link createSecureContext()}`. - * It can be assigned any of the supported TLS protocol versions, - * `'TLSv1.3'`, `'TLSv1.2'`, `'TLSv1.1'`, or `'TLSv1'`. **Default:** `'TLSv1.3'`, unless - * changed using CLI options. Using `--tls-max-v1.2` sets the default to `'TLSv1.2'`. Using - * `--tls-max-v1.3` sets the default to `'TLSv1.3'`. If multiple of the options - * are provided, the highest maximum is used. - * @since v11.4.0 - */ - let DEFAULT_MAX_VERSION: SecureVersion; - /** - * The default value of the `minVersion` option of `{@link createSecureContext()}`. - * It can be assigned any of the supported TLS protocol versions, - * `'TLSv1.3'`, `'TLSv1.2'`, `'TLSv1.1'`, or `'TLSv1'`. **Default:** `'TLSv1.2'`, unless - * changed using CLI options. Using `--tls-min-v1.0` sets the default to - * `'TLSv1'`. Using `--tls-min-v1.1` sets the default to `'TLSv1.1'`. Using - * `--tls-min-v1.3` sets the default to `'TLSv1.3'`. If multiple of the options - * are provided, the lowest minimum is used. - * @since v11.4.0 - */ - let DEFAULT_MIN_VERSION: SecureVersion; - /** - * The default value of the `ciphers` option of `{@link createSecureContext()}`. - * It can be assigned any of the supported OpenSSL ciphers. - * Defaults to the content of `crypto.constants.defaultCoreCipherList`, unless - * changed using CLI options using `--tls-default-ciphers`. - * @since v19.8.0 - */ - let DEFAULT_CIPHERS: string; - /** - * An immutable array of strings representing the root certificates (in PEM format) - * from the bundled Mozilla CA store as supplied by the current Node.js version. - * - * The bundled CA store, as supplied by Node.js, is a snapshot of Mozilla CA store - * that is fixed at release time. It is identical on all supported platforms. - * @since v12.3.0 - */ - const rootCertificates: readonly string[]; -} -declare module "tls" { - export * from "node:tls"; -} diff --git a/PBandGraphScaffold/node_modules/@types/node/trace_events.d.ts b/PBandGraphScaffold/node_modules/@types/node/trace_events.d.ts deleted file mode 100644 index b2c6b32..0000000 --- a/PBandGraphScaffold/node_modules/@types/node/trace_events.d.ts +++ /dev/null @@ -1,197 +0,0 @@ -/** - * The `node:trace_events` module provides a mechanism to centralize tracing information - * generated by V8, Node.js core, and userspace code. - * - * Tracing can be enabled with the `--trace-event-categories` command-line flag - * or by using the `trace_events` module. The `--trace-event-categories` flag - * accepts a list of comma-separated category names. - * - * The available categories are: - * - * * `node`: An empty placeholder. - * * `node.async_hooks`: Enables capture of detailed [`async_hooks`](https://nodejs.org/docs/latest-v25.x/api/async_hooks.html) trace data. - * The [`async_hooks`](https://nodejs.org/docs/latest-v25.x/api/async_hooks.html) events have a unique `asyncId` and a special `triggerId` `triggerAsyncId` property. - * * `node.bootstrap`: Enables capture of Node.js bootstrap milestones. - * * `node.console`: Enables capture of `console.time()` and `console.count()` output. - * * `node.threadpoolwork.sync`: Enables capture of trace data for threadpool synchronous operations, such as `blob`, `zlib`, `crypto` and `node_api`. - * * `node.threadpoolwork.async`: Enables capture of trace data for threadpool asynchronous operations, such as `blob`, `zlib`, `crypto` and `node_api`. - * * `node.dns.native`: Enables capture of trace data for DNS queries. - * * `node.net.native`: Enables capture of trace data for network. - * * `node.environment`: Enables capture of Node.js Environment milestones. - * * `node.fs.sync`: Enables capture of trace data for file system sync methods. - * * `node.fs_dir.sync`: Enables capture of trace data for file system sync directory methods. - * * `node.fs.async`: Enables capture of trace data for file system async methods. - * * `node.fs_dir.async`: Enables capture of trace data for file system async directory methods. - * * `node.perf`: Enables capture of [Performance API](https://nodejs.org/docs/latest-v25.x/api/perf_hooks.html) measurements. - * * `node.perf.usertiming`: Enables capture of only Performance API User Timing - * measures and marks. - * * `node.perf.timerify`: Enables capture of only Performance API timerify - * measurements. - * * `node.promises.rejections`: Enables capture of trace data tracking the number - * of unhandled Promise rejections and handled-after-rejections. - * * `node.vm.script`: Enables capture of trace data for the `node:vm` module's `runInNewContext()`, `runInContext()`, and `runInThisContext()` methods. - * * `v8`: The [V8](https://nodejs.org/docs/latest-v25.x/api/v8.html) events are GC, compiling, and execution related. - * * `node.http`: Enables capture of trace data for http request / response. - * - * By default the `node`, `node.async_hooks`, and `v8` categories are enabled. - * - * ```bash - * node --trace-event-categories v8,node,node.async_hooks server.js - * ``` - * - * Prior versions of Node.js required the use of the `--trace-events-enabled` flag to enable trace events. This requirement has been removed. However, the `--trace-events-enabled` flag _may_ still be - * used and will enable the `node`, `node.async_hooks`, and `v8` trace event categories by default. - * - * ```bash - * node --trace-events-enabled - * - * # is equivalent to - * - * node --trace-event-categories v8,node,node.async_hooks - * ``` - * - * Alternatively, trace events may be enabled using the `node:trace_events` module: - * - * ```js - * import trace_events from 'node:trace_events'; - * const tracing = trace_events.createTracing({ categories: ['node.perf'] }); - * tracing.enable(); // Enable trace event capture for the 'node.perf' category - * - * // do work - * - * tracing.disable(); // Disable trace event capture for the 'node.perf' category - * ``` - * - * Running Node.js with tracing enabled will produce log files that can be opened - * in the [`chrome://tracing`](https://www.chromium.org/developers/how-tos/trace-event-profiling-tool) tab of Chrome. - * - * The logging file is by default called `node_trace.${rotation}.log`, where `${rotation}` is an incrementing log-rotation id. The filepath pattern can - * be specified with `--trace-event-file-pattern` that accepts a template - * string that supports `${rotation}` and `${pid}`: - * - * ```bash - * node --trace-event-categories v8 --trace-event-file-pattern '${pid}-${rotation}.log' server.js - * ``` - * - * To guarantee that the log file is properly generated after signal events like `SIGINT`, `SIGTERM`, or `SIGBREAK`, make sure to have the appropriate handlers - * in your code, such as: - * - * ```js - * process.on('SIGINT', function onSigint() { - * console.info('Received SIGINT.'); - * process.exit(130); // Or applicable exit code depending on OS and signal - * }); - * ``` - * - * The tracing system uses the same time source - * as the one used by `process.hrtime()`. - * However the trace-event timestamps are expressed in microseconds, - * unlike `process.hrtime()` which returns nanoseconds. - * - * The features from this module are not available in [`Worker`](https://nodejs.org/docs/latest-v25.x/api/worker_threads.html#class-worker) threads. - * @experimental - * @see [source](https://github.com/nodejs/node/blob/v25.x/lib/trace_events.js) - */ -declare module "node:trace_events" { - /** - * The `Tracing` object is used to enable or disable tracing for sets of - * categories. Instances are created using the - * `trace_events.createTracing()` method. - * - * When created, the `Tracing` object is disabled. Calling the - * `tracing.enable()` method adds the categories to the set of enabled trace - * event categories. Calling `tracing.disable()` will remove the categories - * from the set of enabled trace event categories. - */ - interface Tracing { - /** - * A comma-separated list of the trace event categories covered by this - * `Tracing` object. - * @since v10.0.0 - */ - readonly categories: string; - /** - * Disables this `Tracing` object. - * - * Only trace event categories _not_ covered by other enabled `Tracing` - * objects and _not_ specified by the `--trace-event-categories` flag - * will be disabled. - * - * ```js - * import trace_events from 'node:trace_events'; - * const t1 = trace_events.createTracing({ categories: ['node', 'v8'] }); - * const t2 = trace_events.createTracing({ categories: ['node.perf', 'node'] }); - * t1.enable(); - * t2.enable(); - * - * // Prints 'node,node.perf,v8' - * console.log(trace_events.getEnabledCategories()); - * - * t2.disable(); // Will only disable emission of the 'node.perf' category - * - * // Prints 'node,v8' - * console.log(trace_events.getEnabledCategories()); - * ``` - * @since v10.0.0 - */ - disable(): void; - /** - * Enables this `Tracing` object for the set of categories covered by - * the `Tracing` object. - * @since v10.0.0 - */ - enable(): void; - /** - * `true` only if the `Tracing` object has been enabled. - * @since v10.0.0 - */ - readonly enabled: boolean; - } - interface CreateTracingOptions { - /** - * An array of trace category names. Values included in the array are - * coerced to a string when possible. An error will be thrown if the - * value cannot be coerced. - */ - categories: string[]; - } - /** - * Creates and returns a `Tracing` object for the given set of `categories`. - * - * ```js - * import trace_events from 'node:trace_events'; - * const categories = ['node.perf', 'node.async_hooks']; - * const tracing = trace_events.createTracing({ categories }); - * tracing.enable(); - * // do stuff - * tracing.disable(); - * ``` - * @since v10.0.0 - */ - function createTracing(options: CreateTracingOptions): Tracing; - /** - * Returns a comma-separated list of all currently-enabled trace event - * categories. The current set of enabled trace event categories is determined - * by the _union_ of all currently-enabled `Tracing` objects and any categories - * enabled using the `--trace-event-categories` flag. - * - * Given the file `test.js` below, the command `node --trace-event-categories node.perf test.js` will print `'node.async_hooks,node.perf'` to the console. - * - * ```js - * import trace_events from 'node:trace_events'; - * const t1 = trace_events.createTracing({ categories: ['node.async_hooks'] }); - * const t2 = trace_events.createTracing({ categories: ['node.perf'] }); - * const t3 = trace_events.createTracing({ categories: ['v8'] }); - * - * t1.enable(); - * t2.enable(); - * - * console.log(trace_events.getEnabledCategories()); - * ``` - * @since v10.0.0 - */ - function getEnabledCategories(): string | undefined; -} -declare module "trace_events" { - export * from "node:trace_events"; -} diff --git a/PBandGraphScaffold/node_modules/@types/node/ts5.6/buffer.buffer.d.ts b/PBandGraphScaffold/node_modules/@types/node/ts5.6/buffer.buffer.d.ts deleted file mode 100644 index bd32dc6..0000000 --- a/PBandGraphScaffold/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +++ /dev/null @@ -1,462 +0,0 @@ -declare module "node:buffer" { - global { - interface BufferConstructor { - // see ../buffer.d.ts for implementation shared with all TypeScript versions - - /** - * Allocates a new buffer containing the given {str}. - * - * @param str String to store in buffer. - * @param encoding encoding to use, optional. Default is 'utf8' - * @deprecated since v10.0.0 - Use `Buffer.from(string[, encoding])` instead. - */ - new(str: string, encoding?: BufferEncoding): Buffer; - /** - * Allocates a new buffer of {size} octets. - * - * @param size count of octets to allocate. - * @deprecated since v10.0.0 - Use `Buffer.alloc()` instead (also see `Buffer.allocUnsafe()`). - */ - new(size: number): Buffer; - /** - * Allocates a new buffer containing the given {array} of octets. - * - * @param array The octets to store. - * @deprecated since v10.0.0 - Use `Buffer.from(array)` instead. - */ - new(array: ArrayLike): Buffer; - /** - * Produces a Buffer backed by the same allocated memory as - * the given {ArrayBuffer}/{SharedArrayBuffer}. - * - * @param arrayBuffer The ArrayBuffer with which to share memory. - * @deprecated since v10.0.0 - Use `Buffer.from(arrayBuffer[, byteOffset[, length]])` instead. - */ - new(arrayBuffer: ArrayBufferLike): Buffer; - /** - * Allocates a new `Buffer` using an `array` of bytes in the range `0` – `255`. - * Array entries outside that range will be truncated to fit into it. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * // Creates a new Buffer containing the UTF-8 bytes of the string 'buffer'. - * const buf = Buffer.from([0x62, 0x75, 0x66, 0x66, 0x65, 0x72]); - * ``` - * - * If `array` is an `Array`-like object (that is, one with a `length` property of - * type `number`), it is treated as if it is an array, unless it is a `Buffer` or - * a `Uint8Array`. This means all other `TypedArray` variants get treated as an - * `Array`. To create a `Buffer` from the bytes backing a `TypedArray`, use - * `Buffer.copyBytesFrom()`. - * - * A `TypeError` will be thrown if `array` is not an `Array` or another type - * appropriate for `Buffer.from()` variants. - * - * `Buffer.from(array)` and `Buffer.from(string)` may also use the internal - * `Buffer` pool like `Buffer.allocUnsafe()` does. - * @since v5.10.0 - */ - from(array: WithImplicitCoercion>): Buffer; - /** - * This creates a view of the `ArrayBuffer` without copying the underlying - * memory. For example, when passed a reference to the `.buffer` property of a - * `TypedArray` instance, the newly created `Buffer` will share the same - * allocated memory as the `TypedArray`'s underlying `ArrayBuffer`. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const arr = new Uint16Array(2); - * - * arr[0] = 5000; - * arr[1] = 4000; - * - * // Shares memory with `arr`. - * const buf = Buffer.from(arr.buffer); - * - * console.log(buf); - * // Prints: - * - * // Changing the original Uint16Array changes the Buffer also. - * arr[1] = 6000; - * - * console.log(buf); - * // Prints: - * ``` - * - * The optional `byteOffset` and `length` arguments specify a memory range within - * the `arrayBuffer` that will be shared by the `Buffer`. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const ab = new ArrayBuffer(10); - * const buf = Buffer.from(ab, 0, 2); - * - * console.log(buf.length); - * // Prints: 2 - * ``` - * - * A `TypeError` will be thrown if `arrayBuffer` is not an `ArrayBuffer` or a - * `SharedArrayBuffer` or another type appropriate for `Buffer.from()` - * variants. - * - * It is important to remember that a backing `ArrayBuffer` can cover a range - * of memory that extends beyond the bounds of a `TypedArray` view. A new - * `Buffer` created using the `buffer` property of a `TypedArray` may extend - * beyond the range of the `TypedArray`: - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const arrA = Uint8Array.from([0x63, 0x64, 0x65, 0x66]); // 4 elements - * const arrB = new Uint8Array(arrA.buffer, 1, 2); // 2 elements - * console.log(arrA.buffer === arrB.buffer); // true - * - * const buf = Buffer.from(arrB.buffer); - * console.log(buf); - * // Prints: - * ``` - * @since v5.10.0 - * @param arrayBuffer An `ArrayBuffer`, `SharedArrayBuffer`, for example the - * `.buffer` property of a `TypedArray`. - * @param byteOffset Index of first byte to expose. **Default:** `0`. - * @param length Number of bytes to expose. **Default:** - * `arrayBuffer.byteLength - byteOffset`. - */ - from( - arrayBuffer: WithImplicitCoercion, - byteOffset?: number, - length?: number, - ): Buffer; - /** - * Creates a new `Buffer` containing `string`. The `encoding` parameter identifies - * the character encoding to be used when converting `string` into bytes. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf1 = Buffer.from('this is a tést'); - * const buf2 = Buffer.from('7468697320697320612074c3a97374', 'hex'); - * - * console.log(buf1.toString()); - * // Prints: this is a tést - * console.log(buf2.toString()); - * // Prints: this is a tést - * console.log(buf1.toString('latin1')); - * // Prints: this is a tést - * ``` - * - * A `TypeError` will be thrown if `string` is not a string or another type - * appropriate for `Buffer.from()` variants. - * - * `Buffer.from(string)` may also use the internal `Buffer` pool like - * `Buffer.allocUnsafe()` does. - * @since v5.10.0 - * @param string A string to encode. - * @param encoding The encoding of `string`. **Default:** `'utf8'`. - */ - from(string: WithImplicitCoercion, encoding?: BufferEncoding): Buffer; - from(arrayOrString: WithImplicitCoercion | string>): Buffer; - /** - * Creates a new Buffer using the passed {data} - * @param values to create a new Buffer - */ - of(...items: number[]): Buffer; - /** - * Returns a new `Buffer` which is the result of concatenating all the `Buffer` instances in the `list` together. - * - * If the list has no items, or if the `totalLength` is 0, then a new zero-length `Buffer` is returned. - * - * If `totalLength` is not provided, it is calculated from the `Buffer` instances - * in `list` by adding their lengths. - * - * If `totalLength` is provided, it is coerced to an unsigned integer. If the - * combined length of the `Buffer`s in `list` exceeds `totalLength`, the result is - * truncated to `totalLength`. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * // Create a single `Buffer` from a list of three `Buffer` instances. - * - * const buf1 = Buffer.alloc(10); - * const buf2 = Buffer.alloc(14); - * const buf3 = Buffer.alloc(18); - * const totalLength = buf1.length + buf2.length + buf3.length; - * - * console.log(totalLength); - * // Prints: 42 - * - * const bufA = Buffer.concat([buf1, buf2, buf3], totalLength); - * - * console.log(bufA); - * // Prints: - * console.log(bufA.length); - * // Prints: 42 - * ``` - * - * `Buffer.concat()` may also use the internal `Buffer` pool like `Buffer.allocUnsafe()` does. - * @since v0.7.11 - * @param list List of `Buffer` or {@link Uint8Array} instances to concatenate. - * @param totalLength Total length of the `Buffer` instances in `list` when concatenated. - */ - concat(list: readonly Uint8Array[], totalLength?: number): Buffer; - /** - * Copies the underlying memory of `view` into a new `Buffer`. - * - * ```js - * const u16 = new Uint16Array([0, 0xffff]); - * const buf = Buffer.copyBytesFrom(u16, 1, 1); - * u16[1] = 0; - * console.log(buf.length); // 2 - * console.log(buf[0]); // 255 - * console.log(buf[1]); // 255 - * ``` - * @since v19.8.0 - * @param view The {TypedArray} to copy. - * @param [offset=0] The starting offset within `view`. - * @param [length=view.length - offset] The number of elements from `view` to copy. - */ - copyBytesFrom(view: NodeJS.TypedArray, offset?: number, length?: number): Buffer; - /** - * Allocates a new `Buffer` of `size` bytes. If `fill` is `undefined`, the`Buffer` will be zero-filled. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.alloc(5); - * - * console.log(buf); - * // Prints: - * ``` - * - * If `size` is larger than {@link constants.MAX_LENGTH} or smaller than 0, `ERR_OUT_OF_RANGE` is thrown. - * - * If `fill` is specified, the allocated `Buffer` will be initialized by calling `buf.fill(fill)`. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.alloc(5, 'a'); - * - * console.log(buf); - * // Prints: - * ``` - * - * If both `fill` and `encoding` are specified, the allocated `Buffer` will be - * initialized by calling `buf.fill(fill, encoding)`. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.alloc(11, 'aGVsbG8gd29ybGQ=', 'base64'); - * - * console.log(buf); - * // Prints: - * ``` - * - * Calling `Buffer.alloc()` can be measurably slower than the alternative `Buffer.allocUnsafe()` but ensures that the newly created `Buffer` instance - * contents will never contain sensitive data from previous allocations, including - * data that might not have been allocated for `Buffer`s. - * - * A `TypeError` will be thrown if `size` is not a number. - * @since v5.10.0 - * @param size The desired length of the new `Buffer`. - * @param [fill=0] A value to pre-fill the new `Buffer` with. - * @param [encoding='utf8'] If `fill` is a string, this is its encoding. - */ - alloc(size: number, fill?: string | Uint8Array | number, encoding?: BufferEncoding): Buffer; - /** - * Allocates a new `Buffer` of `size` bytes. If `size` is larger than {@link constants.MAX_LENGTH} or smaller than 0, `ERR_OUT_OF_RANGE` is thrown. - * - * The underlying memory for `Buffer` instances created in this way is _not_ - * _initialized_. The contents of the newly created `Buffer` are unknown and _may contain sensitive data_. Use `Buffer.alloc()` instead to initialize`Buffer` instances with zeroes. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.allocUnsafe(10); - * - * console.log(buf); - * // Prints (contents may vary): - * - * buf.fill(0); - * - * console.log(buf); - * // Prints: - * ``` - * - * A `TypeError` will be thrown if `size` is not a number. - * - * The `Buffer` module pre-allocates an internal `Buffer` instance of - * size `Buffer.poolSize` that is used as a pool for the fast allocation of new `Buffer` instances created using `Buffer.allocUnsafe()`, `Buffer.from(array)`, - * and `Buffer.concat()` only when `size` is less than `Buffer.poolSize >>> 1` (floor of `Buffer.poolSize` divided by two). - * - * Use of this pre-allocated internal memory pool is a key difference between - * calling `Buffer.alloc(size, fill)` vs. `Buffer.allocUnsafe(size).fill(fill)`. - * Specifically, `Buffer.alloc(size, fill)` will _never_ use the internal `Buffer`pool, while `Buffer.allocUnsafe(size).fill(fill)`_will_ use the internal`Buffer` pool if `size` is less - * than or equal to half `Buffer.poolSize`. The - * difference is subtle but can be important when an application requires the - * additional performance that `Buffer.allocUnsafe()` provides. - * @since v5.10.0 - * @param size The desired length of the new `Buffer`. - */ - allocUnsafe(size: number): Buffer; - /** - * Allocates a new `Buffer` of `size` bytes. If `size` is larger than {@link constants.MAX_LENGTH} or smaller than 0, `ERR_OUT_OF_RANGE` is thrown. A zero-length `Buffer` is created if - * `size` is 0. - * - * The underlying memory for `Buffer` instances created in this way is _not_ - * _initialized_. The contents of the newly created `Buffer` are unknown and _may contain sensitive data_. Use `buf.fill(0)` to initialize - * such `Buffer` instances with zeroes. - * - * When using `Buffer.allocUnsafe()` to allocate new `Buffer` instances, - * allocations under 4 KiB are sliced from a single pre-allocated `Buffer`. This - * allows applications to avoid the garbage collection overhead of creating many - * individually allocated `Buffer` instances. This approach improves both - * performance and memory usage by eliminating the need to track and clean up as - * many individual `ArrayBuffer` objects. - * - * However, in the case where a developer may need to retain a small chunk of - * memory from a pool for an indeterminate amount of time, it may be appropriate - * to create an un-pooled `Buffer` instance using `Buffer.allocUnsafeSlow()` and - * then copying out the relevant bits. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * // Need to keep around a few small chunks of memory. - * const store = []; - * - * socket.on('readable', () => { - * let data; - * while (null !== (data = readable.read())) { - * // Allocate for retained data. - * const sb = Buffer.allocUnsafeSlow(10); - * - * // Copy the data into the new allocation. - * data.copy(sb, 0, 0, 10); - * - * store.push(sb); - * } - * }); - * ``` - * - * A `TypeError` will be thrown if `size` is not a number. - * @since v5.12.0 - * @param size The desired length of the new `Buffer`. - */ - allocUnsafeSlow(size: number): Buffer; - } - interface Buffer extends Uint8Array { - // see ../buffer.d.ts for implementation shared with all TypeScript versions - - /** - * Returns a new `Buffer` that references the same memory as the original, but - * offset and cropped by the `start` and `end` indices. - * - * This method is not compatible with the `Uint8Array.prototype.slice()`, - * which is a superclass of `Buffer`. To copy the slice, use`Uint8Array.prototype.slice()`. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.from('buffer'); - * - * const copiedBuf = Uint8Array.prototype.slice.call(buf); - * copiedBuf[0]++; - * console.log(copiedBuf.toString()); - * // Prints: cuffer - * - * console.log(buf.toString()); - * // Prints: buffer - * - * // With buf.slice(), the original buffer is modified. - * const notReallyCopiedBuf = buf.slice(); - * notReallyCopiedBuf[0]++; - * console.log(notReallyCopiedBuf.toString()); - * // Prints: cuffer - * console.log(buf.toString()); - * // Also prints: cuffer (!) - * ``` - * @since v0.3.0 - * @deprecated Use `subarray` instead. - * @param [start=0] Where the new `Buffer` will start. - * @param [end=buf.length] Where the new `Buffer` will end (not inclusive). - */ - slice(start?: number, end?: number): Buffer; - /** - * Returns a new `Buffer` that references the same memory as the original, but - * offset and cropped by the `start` and `end` indices. - * - * Specifying `end` greater than `buf.length` will return the same result as - * that of `end` equal to `buf.length`. - * - * This method is inherited from [`TypedArray.prototype.subarray()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/subarray). - * - * Modifying the new `Buffer` slice will modify the memory in the original `Buffer`because the allocated memory of the two objects overlap. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * // Create a `Buffer` with the ASCII alphabet, take a slice, and modify one byte - * // from the original `Buffer`. - * - * const buf1 = Buffer.allocUnsafe(26); - * - * for (let i = 0; i < 26; i++) { - * // 97 is the decimal ASCII value for 'a'. - * buf1[i] = i + 97; - * } - * - * const buf2 = buf1.subarray(0, 3); - * - * console.log(buf2.toString('ascii', 0, buf2.length)); - * // Prints: abc - * - * buf1[0] = 33; - * - * console.log(buf2.toString('ascii', 0, buf2.length)); - * // Prints: !bc - * ``` - * - * Specifying negative indexes causes the slice to be generated relative to the - * end of `buf` rather than the beginning. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.from('buffer'); - * - * console.log(buf.subarray(-6, -1).toString()); - * // Prints: buffe - * // (Equivalent to buf.subarray(0, 5).) - * - * console.log(buf.subarray(-6, -2).toString()); - * // Prints: buff - * // (Equivalent to buf.subarray(0, 4).) - * - * console.log(buf.subarray(-5, -2).toString()); - * // Prints: uff - * // (Equivalent to buf.subarray(1, 4).) - * ``` - * @since v3.0.0 - * @param [start=0] Where the new `Buffer` will start. - * @param [end=buf.length] Where the new `Buffer` will end (not inclusive). - */ - subarray(start?: number, end?: number): Buffer; - } - /** - * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports - * TypeScript versions earlier than 5.7. - */ - type NonSharedBuffer = Buffer; - /** - * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports - * TypeScript versions earlier than 5.7. - */ - type AllowSharedBuffer = Buffer; - } -} diff --git a/PBandGraphScaffold/node_modules/@types/node/ts5.6/compatibility/float16array.d.ts b/PBandGraphScaffold/node_modules/@types/node/ts5.6/compatibility/float16array.d.ts deleted file mode 100644 index f148cc4..0000000 --- a/PBandGraphScaffold/node_modules/@types/node/ts5.6/compatibility/float16array.d.ts +++ /dev/null @@ -1,71 +0,0 @@ -// Interface declaration for Float16Array, required in @types/node v24+. -// These definitions are specific to TS <=5.6. - -// This needs all of the "common" properties/methods of the TypedArrays, -// otherwise the type unions `TypedArray` and `ArrayBufferView` will be -// empty objects. -interface Float16Array extends Pick { - readonly BYTES_PER_ELEMENT: number; - readonly buffer: ArrayBufferLike; - readonly byteLength: number; - readonly byteOffset: number; - readonly length: number; - readonly [Symbol.toStringTag]: "Float16Array"; - at(index: number): number | undefined; - copyWithin(target: number, start: number, end?: number): this; - every(predicate: (value: number, index: number, array: Float16Array) => unknown, thisArg?: any): boolean; - fill(value: number, start?: number, end?: number): this; - filter(predicate: (value: number, index: number, array: Float16Array) => any, thisArg?: any): Float16Array; - find(predicate: (value: number, index: number, obj: Float16Array) => boolean, thisArg?: any): number | undefined; - findIndex(predicate: (value: number, index: number, obj: Float16Array) => boolean, thisArg?: any): number; - findLast( - predicate: (value: number, index: number, array: Float16Array) => value is S, - thisArg?: any, - ): S | undefined; - findLast( - predicate: (value: number, index: number, array: Float16Array) => unknown, - thisArg?: any, - ): number | undefined; - findLastIndex(predicate: (value: number, index: number, array: Float16Array) => unknown, thisArg?: any): number; - forEach(callbackfn: (value: number, index: number, array: Float16Array) => void, thisArg?: any): void; - includes(searchElement: number, fromIndex?: number): boolean; - indexOf(searchElement: number, fromIndex?: number): number; - join(separator?: string): string; - lastIndexOf(searchElement: number, fromIndex?: number): number; - map(callbackfn: (value: number, index: number, array: Float16Array) => number, thisArg?: any): Float16Array; - reduce( - callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float16Array) => number, - ): number; - reduce( - callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float16Array) => number, - initialValue: number, - ): number; - reduce( - callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Float16Array) => U, - initialValue: U, - ): U; - reduceRight( - callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float16Array) => number, - ): number; - reduceRight( - callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float16Array) => number, - initialValue: number, - ): number; - reduceRight( - callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Float16Array) => U, - initialValue: U, - ): U; - reverse(): Float16Array; - set(array: ArrayLike, offset?: number): void; - slice(start?: number, end?: number): Float16Array; - some(predicate: (value: number, index: number, array: Float16Array) => unknown, thisArg?: any): boolean; - sort(compareFn?: (a: number, b: number) => number): this; - subarray(begin?: number, end?: number): Float16Array; - toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; - toReversed(): Float16Array; - toSorted(compareFn?: (a: number, b: number) => number): Float16Array; - toString(): string; - valueOf(): Float16Array; - with(index: number, value: number): Float16Array; - [index: number]: number; -} diff --git a/PBandGraphScaffold/node_modules/@types/node/ts5.6/globals.typedarray.d.ts b/PBandGraphScaffold/node_modules/@types/node/ts5.6/globals.typedarray.d.ts deleted file mode 100644 index 57a1ab4..0000000 --- a/PBandGraphScaffold/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +++ /dev/null @@ -1,36 +0,0 @@ -export {}; // Make this a module - -declare global { - namespace NodeJS { - type TypedArray = - | Uint8Array - | Uint8ClampedArray - | Uint16Array - | Uint32Array - | Int8Array - | Int16Array - | Int32Array - | BigUint64Array - | BigInt64Array - | Float16Array - | Float32Array - | Float64Array; - type ArrayBufferView = TypedArray | DataView; - - type NonSharedUint8Array = Uint8Array; - type NonSharedUint8ClampedArray = Uint8ClampedArray; - type NonSharedUint16Array = Uint16Array; - type NonSharedUint32Array = Uint32Array; - type NonSharedInt8Array = Int8Array; - type NonSharedInt16Array = Int16Array; - type NonSharedInt32Array = Int32Array; - type NonSharedBigUint64Array = BigUint64Array; - type NonSharedBigInt64Array = BigInt64Array; - type NonSharedFloat16Array = Float16Array; - type NonSharedFloat32Array = Float32Array; - type NonSharedFloat64Array = Float64Array; - type NonSharedDataView = DataView; - type NonSharedTypedArray = TypedArray; - type NonSharedArrayBufferView = ArrayBufferView; - } -} diff --git a/PBandGraphScaffold/node_modules/@types/node/ts5.6/index.d.ts b/PBandGraphScaffold/node_modules/@types/node/ts5.6/index.d.ts deleted file mode 100644 index a157660..0000000 --- a/PBandGraphScaffold/node_modules/@types/node/ts5.6/index.d.ts +++ /dev/null @@ -1,117 +0,0 @@ -/** - * License for programmatically and manually incorporated - * documentation aka. `JSDoc` from https://github.com/nodejs/node/tree/master/doc - * - * Copyright Node.js contributors. All rights reserved. - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS - * IN THE SOFTWARE. - */ - -// NOTE: These definitions support Node.js and TypeScript 5.2 through 5.6. - -// Reference required TypeScript libraries: -/// -/// - -// TypeScript library polyfills required for TypeScript <=5.6: -/// - -// Iterator definitions required for compatibility with TypeScript <5.6: -/// - -// Definitions for Node.js modules specific to TypeScript <=5.6: -/// -/// - -// Definitions for Node.js modules that are not specific to any version of TypeScript: -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// diff --git a/PBandGraphScaffold/node_modules/@types/node/ts5.7/compatibility/float16array.d.ts b/PBandGraphScaffold/node_modules/@types/node/ts5.7/compatibility/float16array.d.ts deleted file mode 100644 index 110b1eb..0000000 --- a/PBandGraphScaffold/node_modules/@types/node/ts5.7/compatibility/float16array.d.ts +++ /dev/null @@ -1,72 +0,0 @@ -// Interface declaration for Float16Array, required in @types/node v24+. -// These definitions are specific to TS 5.7. - -// This needs all of the "common" properties/methods of the TypedArrays, -// otherwise the type unions `TypedArray` and `ArrayBufferView` will be -// empty objects. -interface Float16Array { - readonly BYTES_PER_ELEMENT: number; - readonly buffer: TArrayBuffer; - readonly byteLength: number; - readonly byteOffset: number; - readonly length: number; - readonly [Symbol.toStringTag]: "Float16Array"; - at(index: number): number | undefined; - copyWithin(target: number, start: number, end?: number): this; - entries(): ArrayIterator<[number, number]>; - every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - fill(value: number, start?: number, end?: number): this; - filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Float16Array; - find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; - findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; - findLast( - predicate: (value: number, index: number, array: this) => value is S, - thisArg?: any, - ): S | undefined; - findLast(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): number | undefined; - findLastIndex(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): number; - forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; - includes(searchElement: number, fromIndex?: number): boolean; - indexOf(searchElement: number, fromIndex?: number): number; - join(separator?: string): string; - keys(): ArrayIterator; - lastIndexOf(searchElement: number, fromIndex?: number): number; - map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Float16Array; - reduce( - callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, - ): number; - reduce( - callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, - initialValue: number, - ): number; - reduce( - callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, - initialValue: U, - ): U; - reduceRight( - callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, - ): number; - reduceRight( - callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, - initialValue: number, - ): number; - reduceRight( - callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, - initialValue: U, - ): U; - reverse(): this; - set(array: ArrayLike, offset?: number): void; - slice(start?: number, end?: number): Float16Array; - some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - sort(compareFn?: (a: number, b: number) => number): this; - subarray(begin?: number, end?: number): Float16Array; - toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; - toReversed(): Float16Array; - toSorted(compareFn?: (a: number, b: number) => number): Float16Array; - toString(): string; - valueOf(): this; - values(): ArrayIterator; - with(index: number, value: number): Float16Array; - [Symbol.iterator](): ArrayIterator; - [index: number]: number; -} diff --git a/PBandGraphScaffold/node_modules/@types/node/ts5.7/index.d.ts b/PBandGraphScaffold/node_modules/@types/node/ts5.7/index.d.ts deleted file mode 100644 index 32c541b..0000000 --- a/PBandGraphScaffold/node_modules/@types/node/ts5.7/index.d.ts +++ /dev/null @@ -1,117 +0,0 @@ -/** - * License for programmatically and manually incorporated - * documentation aka. `JSDoc` from https://github.com/nodejs/node/tree/master/doc - * - * Copyright Node.js contributors. All rights reserved. - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS - * IN THE SOFTWARE. - */ - -// NOTE: These definitions support Node.js and TypeScript 5.7. - -// Reference required TypeScript libraries: -/// -/// - -// TypeScript library polyfills required for TypeScript 5.7: -/// - -// Iterator definitions required for compatibility with TypeScript <5.6: -/// - -// Definitions for Node.js modules specific to TypeScript 5.7+: -/// -/// - -// Definitions for Node.js modules that are not specific to any version of TypeScript: -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// diff --git a/PBandGraphScaffold/node_modules/@types/node/tty.d.ts b/PBandGraphScaffold/node_modules/@types/node/tty.d.ts deleted file mode 100644 index 9b97a1e..0000000 --- a/PBandGraphScaffold/node_modules/@types/node/tty.d.ts +++ /dev/null @@ -1,250 +0,0 @@ -/** - * The `node:tty` module provides the `tty.ReadStream` and `tty.WriteStream` classes. In most cases, it will not be necessary or possible to use this module - * directly. However, it can be accessed using: - * - * ```js - * import tty from 'node:tty'; - * ``` - * - * When Node.js detects that it is being run with a text terminal ("TTY") - * attached, `process.stdin` will, by default, be initialized as an instance of `tty.ReadStream` and both `process.stdout` and `process.stderr` will, by - * default, be instances of `tty.WriteStream`. The preferred method of determining - * whether Node.js is being run within a TTY context is to check that the value of - * the `process.stdout.isTTY` property is `true`: - * - * ```console - * $ node -p -e "Boolean(process.stdout.isTTY)" - * true - * $ node -p -e "Boolean(process.stdout.isTTY)" | cat - * false - * ``` - * - * In most cases, there should be little to no reason for an application to - * manually create instances of the `tty.ReadStream` and `tty.WriteStream` classes. - * @see [source](https://github.com/nodejs/node/blob/v25.x/lib/tty.js) - */ -declare module "node:tty" { - import * as net from "node:net"; - /** - * The `tty.isatty()` method returns `true` if the given `fd` is associated with - * a TTY and `false` if it is not, including whenever `fd` is not a non-negative - * integer. - * @since v0.5.8 - * @param fd A numeric file descriptor - */ - function isatty(fd: number): boolean; - /** - * Represents the readable side of a TTY. In normal circumstances `process.stdin` will be the only `tty.ReadStream` instance in a Node.js - * process and there should be no reason to create additional instances. - * @since v0.5.8 - */ - class ReadStream extends net.Socket { - constructor(fd: number, options?: net.SocketConstructorOpts); - /** - * A `boolean` that is `true` if the TTY is currently configured to operate as a - * raw device. - * - * This flag is always `false` when a process starts, even if the terminal is - * operating in raw mode. Its value will change with subsequent calls to `setRawMode`. - * @since v0.7.7 - */ - isRaw: boolean; - /** - * Allows configuration of `tty.ReadStream` so that it operates as a raw device. - * - * When in raw mode, input is always available character-by-character, not - * including modifiers. Additionally, all special processing of characters by the - * terminal is disabled, including echoing input - * characters. Ctrl+C will no longer cause a `SIGINT` when - * in this mode. - * @since v0.7.7 - * @param mode If `true`, configures the `tty.ReadStream` to operate as a raw device. If `false`, configures the `tty.ReadStream` to operate in its default mode. The `readStream.isRaw` - * property will be set to the resulting mode. - * @return The read stream instance. - */ - setRawMode(mode: boolean): this; - /** - * A `boolean` that is always `true` for `tty.ReadStream` instances. - * @since v0.5.8 - */ - isTTY: boolean; - } - /** - * -1 - to the left from cursor - * 0 - the entire line - * 1 - to the right from cursor - */ - type Direction = -1 | 0 | 1; - interface WriteStreamEventMap extends net.SocketEventMap { - "resize": []; - } - /** - * Represents the writable side of a TTY. In normal circumstances, `process.stdout` and `process.stderr` will be the only`tty.WriteStream` instances created for a Node.js process and there - * should be no reason to create additional instances. - * @since v0.5.8 - */ - class WriteStream extends net.Socket { - constructor(fd: number); - /** - * `writeStream.clearLine()` clears the current line of this `WriteStream` in a - * direction identified by `dir`. - * @since v0.7.7 - * @param callback Invoked once the operation completes. - * @return `false` if the stream wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`. - */ - clearLine(dir: Direction, callback?: () => void): boolean; - /** - * `writeStream.clearScreenDown()` clears this `WriteStream` from the current - * cursor down. - * @since v0.7.7 - * @param callback Invoked once the operation completes. - * @return `false` if the stream wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`. - */ - clearScreenDown(callback?: () => void): boolean; - /** - * `writeStream.cursorTo()` moves this `WriteStream`'s cursor to the specified - * position. - * @since v0.7.7 - * @param callback Invoked once the operation completes. - * @return `false` if the stream wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`. - */ - cursorTo(x: number, y?: number, callback?: () => void): boolean; - cursorTo(x: number, callback: () => void): boolean; - /** - * `writeStream.moveCursor()` moves this `WriteStream`'s cursor _relative_ to its - * current position. - * @since v0.7.7 - * @param callback Invoked once the operation completes. - * @return `false` if the stream wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`. - */ - moveCursor(dx: number, dy: number, callback?: () => void): boolean; - /** - * Returns: - * - * * `1` for 2, - * * `4` for 16, - * * `8` for 256, - * * `24` for 16,777,216 colors supported. - * - * Use this to determine what colors the terminal supports. Due to the nature of - * colors in terminals it is possible to either have false positives or false - * negatives. It depends on process information and the environment variables that - * may lie about what terminal is used. - * It is possible to pass in an `env` object to simulate the usage of a specific - * terminal. This can be useful to check how specific environment settings behave. - * - * To enforce a specific color support, use one of the below environment settings. - * - * * 2 colors: `FORCE_COLOR = 0` (Disables colors) - * * 16 colors: `FORCE_COLOR = 1` - * * 256 colors: `FORCE_COLOR = 2` - * * 16,777,216 colors: `FORCE_COLOR = 3` - * - * Disabling color support is also possible by using the `NO_COLOR` and `NODE_DISABLE_COLORS` environment variables. - * @since v9.9.0 - * @param [env=process.env] An object containing the environment variables to check. This enables simulating the usage of a specific terminal. - */ - getColorDepth(env?: object): number; - /** - * Returns `true` if the `writeStream` supports at least as many colors as provided - * in `count`. Minimum support is 2 (black and white). - * - * This has the same false positives and negatives as described in `writeStream.getColorDepth()`. - * - * ```js - * process.stdout.hasColors(); - * // Returns true or false depending on if `stdout` supports at least 16 colors. - * process.stdout.hasColors(256); - * // Returns true or false depending on if `stdout` supports at least 256 colors. - * process.stdout.hasColors({ TMUX: '1' }); - * // Returns true. - * process.stdout.hasColors(2 ** 24, { TMUX: '1' }); - * // Returns false (the environment setting pretends to support 2 ** 8 colors). - * ``` - * @since v11.13.0, v10.16.0 - * @param [count=16] The number of colors that are requested (minimum 2). - * @param [env=process.env] An object containing the environment variables to check. This enables simulating the usage of a specific terminal. - */ - hasColors(count?: number): boolean; - hasColors(env?: object): boolean; - hasColors(count: number, env?: object): boolean; - /** - * `writeStream.getWindowSize()` returns the size of the TTY - * corresponding to this `WriteStream`. The array is of the type `[numColumns, numRows]` where `numColumns` and `numRows` represent the number - * of columns and rows in the corresponding TTY. - * @since v0.7.7 - */ - getWindowSize(): [number, number]; - /** - * A `number` specifying the number of columns the TTY currently has. This property - * is updated whenever the `'resize'` event is emitted. - * @since v0.7.7 - */ - columns: number; - /** - * A `number` specifying the number of rows the TTY currently has. This property - * is updated whenever the `'resize'` event is emitted. - * @since v0.7.7 - */ - rows: number; - /** - * A `boolean` that is always `true`. - * @since v0.5.8 - */ - isTTY: boolean; - // #region InternalEventEmitter - addListener( - eventName: E, - listener: (...args: WriteStreamEventMap[E]) => void, - ): this; - addListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - emit(eventName: E, ...args: WriteStreamEventMap[E]): boolean; - emit(eventName: string | symbol, ...args: any[]): boolean; - listenerCount( - eventName: E, - listener?: (...args: WriteStreamEventMap[E]) => void, - ): number; - listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number; - listeners(eventName: E): ((...args: WriteStreamEventMap[E]) => void)[]; - listeners(eventName: string | symbol): ((...args: any[]) => void)[]; - off( - eventName: E, - listener: (...args: WriteStreamEventMap[E]) => void, - ): this; - off(eventName: string | symbol, listener: (...args: any[]) => void): this; - on( - eventName: E, - listener: (...args: WriteStreamEventMap[E]) => void, - ): this; - on(eventName: string | symbol, listener: (...args: any[]) => void): this; - once( - eventName: E, - listener: (...args: WriteStreamEventMap[E]) => void, - ): this; - once(eventName: string | symbol, listener: (...args: any[]) => void): this; - prependListener( - eventName: E, - listener: (...args: WriteStreamEventMap[E]) => void, - ): this; - prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - prependOnceListener( - eventName: E, - listener: (...args: WriteStreamEventMap[E]) => void, - ): this; - prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - rawListeners(eventName: E): ((...args: WriteStreamEventMap[E]) => void)[]; - rawListeners(eventName: string | symbol): ((...args: any[]) => void)[]; - // eslint-disable-next-line @definitelytyped/no-unnecessary-generics - removeAllListeners(eventName?: E): this; - removeAllListeners(eventName?: string | symbol): this; - removeListener( - eventName: E, - listener: (...args: WriteStreamEventMap[E]) => void, - ): this; - removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this; - // #endregion - } -} -declare module "tty" { - export * from "node:tty"; -} diff --git a/PBandGraphScaffold/node_modules/@types/node/url.d.ts b/PBandGraphScaffold/node_modules/@types/node/url.d.ts deleted file mode 100644 index 6f5b885..0000000 --- a/PBandGraphScaffold/node_modules/@types/node/url.d.ts +++ /dev/null @@ -1,519 +0,0 @@ -/** - * The `node:url` module provides utilities for URL resolution and parsing. It can - * be accessed using: - * - * ```js - * import url from 'node:url'; - * ``` - * @see [source](https://github.com/nodejs/node/blob/v25.x/lib/url.js) - */ -declare module "node:url" { - import { Blob, NonSharedBuffer } from "node:buffer"; - import { ClientRequestArgs } from "node:http"; - import { ParsedUrlQuery, ParsedUrlQueryInput } from "node:querystring"; - // Input to `url.format` - interface UrlObject { - auth?: string | null | undefined; - hash?: string | null | undefined; - host?: string | null | undefined; - hostname?: string | null | undefined; - href?: string | null | undefined; - pathname?: string | null | undefined; - protocol?: string | null | undefined; - search?: string | null | undefined; - slashes?: boolean | null | undefined; - port?: string | number | null | undefined; - query?: string | null | ParsedUrlQueryInput | undefined; - } - // Output of `url.parse` - interface Url { - auth: string | null; - hash: string | null; - host: string | null; - hostname: string | null; - href: string; - path: string | null; - pathname: string | null; - protocol: string | null; - search: string | null; - slashes: boolean | null; - port: string | null; - query: string | null | ParsedUrlQuery; - } - interface UrlWithParsedQuery extends Url { - query: ParsedUrlQuery; - } - interface UrlWithStringQuery extends Url { - query: string | null; - } - interface FileUrlToPathOptions { - /** - * `true` if the `path` should be return as a windows filepath, `false` for posix, and `undefined` for the system default. - * @default undefined - * @since v22.1.0 - */ - windows?: boolean | undefined; - } - interface PathToFileUrlOptions { - /** - * `true` if the `path` should be return as a windows filepath, `false` for posix, and `undefined` for the system default. - * @default undefined - * @since v22.1.0 - */ - windows?: boolean | undefined; - } - /** - * The `url.parse()` method takes a URL string, parses it, and returns a URL - * object. - * - * A `TypeError` is thrown if `urlString` is not a string. - * - * A `URIError` is thrown if the `auth` property is present but cannot be decoded. - * - * `url.parse()` uses a lenient, non-standard algorithm for parsing URL - * strings. It is prone to security issues such as [host name spoofing](https://hackerone.com/reports/678487) - * and incorrect handling of usernames and passwords. Do not use with untrusted - * input. CVEs are not issued for `url.parse()` vulnerabilities. Use the - * [WHATWG URL](https://nodejs.org/docs/latest-v25.x/api/url.html#the-whatwg-url-api) API instead, for example: - * - * ```js - * function getURL(req) { - * const proto = req.headers['x-forwarded-proto'] || 'https'; - * const host = req.headers['x-forwarded-host'] || req.headers.host || 'example.com'; - * return new URL(req.url || '/', `${proto}://${host}`); - * } - * ``` - * - * The example above assumes well-formed headers are forwarded from a reverse - * proxy to your Node.js server. If you are not using a reverse proxy, you should - * use the example below: - * - * ```js - * function getURL(req) { - * return new URL(req.url || '/', 'https://example.com'); - * } - * ``` - * @since v0.1.25 - * @deprecated Use the WHATWG URL API instead. - * @param urlString The URL string to parse. - * @param parseQueryString If `true`, the `query` property will always - * be set to an object returned by the [`querystring`](https://nodejs.org/docs/latest-v25.x/api/querystring.html) module's `parse()` - * method. If `false`, the `query` property on the returned URL object will be an - * unparsed, undecoded string. **Default:** `false`. - * @param slashesDenoteHost If `true`, the first token after the literal - * string `//` and preceding the next `/` will be interpreted as the `host`. - * For instance, given `//foo/bar`, the result would be - * `{host: 'foo', pathname: '/bar'}` rather than `{pathname: '//foo/bar'}`. - * **Default:** `false`. - */ - function parse( - urlString: string, - parseQueryString?: false, - slashesDenoteHost?: boolean, - ): UrlWithStringQuery; - function parse(urlString: string, parseQueryString: true, slashesDenoteHost?: boolean): UrlWithParsedQuery; - function parse(urlString: string, parseQueryString: boolean, slashesDenoteHost?: boolean): Url; - /** - * The `url.format()` method returns a formatted URL string derived from `urlObject`. - * - * ```js - * import url from 'node:url'; - * url.format({ - * protocol: 'https', - * hostname: 'example.com', - * pathname: '/some/path', - * query: { - * page: 1, - * format: 'json', - * }, - * }); - * - * // => 'https://example.com/some/path?page=1&format=json' - * ``` - * - * If `urlObject` is not an object or a string, `url.format()` will throw a `TypeError`. - * - * The formatting process operates as follows: - * - * * A new empty string `result` is created. - * * If `urlObject.protocol` is a string, it is appended as-is to `result`. - * * Otherwise, if `urlObject.protocol` is not `undefined` and is not a string, an `Error` is thrown. - * * For all string values of `urlObject.protocol` that _do not end_ with an ASCII - * colon (`:`) character, the literal string `:` will be appended to `result`. - * * If either of the following conditions is true, then the literal string `//` will be appended to `result`: - * * `urlObject.slashes` property is true; - * * `urlObject.protocol` begins with `http`, `https`, `ftp`, `gopher`, or `file`; - * * If the value of the `urlObject.auth` property is truthy, and either `urlObject.host` or `urlObject.hostname` are not `undefined`, the value of `urlObject.auth` will be coerced into a string - * and appended to `result` followed by the literal string `@`. - * * If the `urlObject.host` property is `undefined` then: - * * If the `urlObject.hostname` is a string, it is appended to `result`. - * * Otherwise, if `urlObject.hostname` is not `undefined` and is not a string, - * an `Error` is thrown. - * * If the `urlObject.port` property value is truthy, and `urlObject.hostname` is not `undefined`: - * * The literal string `:` is appended to `result`, and - * * The value of `urlObject.port` is coerced to a string and appended to `result`. - * * Otherwise, if the `urlObject.host` property value is truthy, the value of `urlObject.host` is coerced to a string and appended to `result`. - * * If the `urlObject.pathname` property is a string that is not an empty string: - * * If the `urlObject.pathname` _does not start_ with an ASCII forward slash - * (`/`), then the literal string `'/'` is appended to `result`. - * * The value of `urlObject.pathname` is appended to `result`. - * * Otherwise, if `urlObject.pathname` is not `undefined` and is not a string, an `Error` is thrown. - * * If the `urlObject.search` property is `undefined` and if the `urlObject.query`property is an `Object`, the literal string `?` is appended to `result` followed by the output of calling the - * `querystring` module's `stringify()` method passing the value of `urlObject.query`. - * * Otherwise, if `urlObject.search` is a string: - * * If the value of `urlObject.search` _does not start_ with the ASCII question - * mark (`?`) character, the literal string `?` is appended to `result`. - * * The value of `urlObject.search` is appended to `result`. - * * Otherwise, if `urlObject.search` is not `undefined` and is not a string, an `Error` is thrown. - * * If the `urlObject.hash` property is a string: - * * If the value of `urlObject.hash` _does not start_ with the ASCII hash (`#`) - * character, the literal string `#` is appended to `result`. - * * The value of `urlObject.hash` is appended to `result`. - * * Otherwise, if the `urlObject.hash` property is not `undefined` and is not a - * string, an `Error` is thrown. - * * `result` is returned. - * @since v0.1.25 - * @legacy Use the WHATWG URL API instead. - * @param urlObject A URL object (as returned by `url.parse()` or constructed otherwise). If a string, it is converted to an object by passing it to `url.parse()`. - */ - function format(urlObject: URL, options?: URLFormatOptions): string; - /** - * The `url.format()` method returns a formatted URL string derived from `urlObject`. - * - * ```js - * import url from 'node:url'; - * url.format({ - * protocol: 'https', - * hostname: 'example.com', - * pathname: '/some/path', - * query: { - * page: 1, - * format: 'json', - * }, - * }); - * - * // => 'https://example.com/some/path?page=1&format=json' - * ``` - * - * If `urlObject` is not an object or a string, `url.format()` will throw a `TypeError`. - * - * The formatting process operates as follows: - * - * * A new empty string `result` is created. - * * If `urlObject.protocol` is a string, it is appended as-is to `result`. - * * Otherwise, if `urlObject.protocol` is not `undefined` and is not a string, an `Error` is thrown. - * * For all string values of `urlObject.protocol` that _do not end_ with an ASCII - * colon (`:`) character, the literal string `:` will be appended to `result`. - * * If either of the following conditions is true, then the literal string `//` will be appended to `result`: - * * `urlObject.slashes` property is true; - * * `urlObject.protocol` begins with `http`, `https`, `ftp`, `gopher`, or `file`; - * * If the value of the `urlObject.auth` property is truthy, and either `urlObject.host` or `urlObject.hostname` are not `undefined`, the value of `urlObject.auth` will be coerced into a string - * and appended to `result` followed by the literal string `@`. - * * If the `urlObject.host` property is `undefined` then: - * * If the `urlObject.hostname` is a string, it is appended to `result`. - * * Otherwise, if `urlObject.hostname` is not `undefined` and is not a string, - * an `Error` is thrown. - * * If the `urlObject.port` property value is truthy, and `urlObject.hostname` is not `undefined`: - * * The literal string `:` is appended to `result`, and - * * The value of `urlObject.port` is coerced to a string and appended to `result`. - * * Otherwise, if the `urlObject.host` property value is truthy, the value of `urlObject.host` is coerced to a string and appended to `result`. - * * If the `urlObject.pathname` property is a string that is not an empty string: - * * If the `urlObject.pathname` _does not start_ with an ASCII forward slash - * (`/`), then the literal string `'/'` is appended to `result`. - * * The value of `urlObject.pathname` is appended to `result`. - * * Otherwise, if `urlObject.pathname` is not `undefined` and is not a string, an `Error` is thrown. - * * If the `urlObject.search` property is `undefined` and if the `urlObject.query`property is an `Object`, the literal string `?` is appended to `result` followed by the output of calling the - * `querystring` module's `stringify()` method passing the value of `urlObject.query`. - * * Otherwise, if `urlObject.search` is a string: - * * If the value of `urlObject.search` _does not start_ with the ASCII question - * mark (`?`) character, the literal string `?` is appended to `result`. - * * The value of `urlObject.search` is appended to `result`. - * * Otherwise, if `urlObject.search` is not `undefined` and is not a string, an `Error` is thrown. - * * If the `urlObject.hash` property is a string: - * * If the value of `urlObject.hash` _does not start_ with the ASCII hash (`#`) - * character, the literal string `#` is appended to `result`. - * * The value of `urlObject.hash` is appended to `result`. - * * Otherwise, if the `urlObject.hash` property is not `undefined` and is not a - * string, an `Error` is thrown. - * * `result` is returned. - * @since v0.1.25 - * @legacy Use the WHATWG URL API instead. - * @param urlObject A URL object (as returned by `url.parse()` or constructed otherwise). If a string, it is converted to an object by passing it to `url.parse()`. - */ - function format(urlObject: UrlObject | string): string; - /** - * The `url.resolve()` method resolves a target URL relative to a base URL in a - * manner similar to that of a web browser resolving an anchor tag. - * - * ```js - * import url from 'node:url'; - * url.resolve('/one/two/three', 'four'); // '/one/two/four' - * url.resolve('http://example.com/', '/one'); // 'http://example.com/one' - * url.resolve('http://example.com/one', '/two'); // 'http://example.com/two' - * ``` - * - * To achieve the same result using the WHATWG URL API: - * - * ```js - * function resolve(from, to) { - * const resolvedUrl = new URL(to, new URL(from, 'resolve://')); - * if (resolvedUrl.protocol === 'resolve:') { - * // `from` is a relative URL. - * const { pathname, search, hash } = resolvedUrl; - * return pathname + search + hash; - * } - * return resolvedUrl.toString(); - * } - * - * resolve('/one/two/three', 'four'); // '/one/two/four' - * resolve('http://example.com/', '/one'); // 'http://example.com/one' - * resolve('http://example.com/one', '/two'); // 'http://example.com/two' - * ``` - * @since v0.1.25 - * @legacy Use the WHATWG URL API instead. - * @param from The base URL to use if `to` is a relative URL. - * @param to The target URL to resolve. - */ - function resolve(from: string, to: string): string; - /** - * Returns the [Punycode](https://tools.ietf.org/html/rfc5891#section-4.4) ASCII serialization of the `domain`. If `domain` is an - * invalid domain, the empty string is returned. - * - * It performs the inverse operation to {@link domainToUnicode}. - * - * ```js - * import url from 'node:url'; - * - * console.log(url.domainToASCII('español.com')); - * // Prints xn--espaol-zwa.com - * console.log(url.domainToASCII('中文.com')); - * // Prints xn--fiq228c.com - * console.log(url.domainToASCII('xn--iñvalid.com')); - * // Prints an empty string - * ``` - * @since v7.4.0, v6.13.0 - */ - function domainToASCII(domain: string): string; - /** - * Returns the Unicode serialization of the `domain`. If `domain` is an invalid - * domain, the empty string is returned. - * - * It performs the inverse operation to {@link domainToASCII}. - * - * ```js - * import url from 'node:url'; - * - * console.log(url.domainToUnicode('xn--espaol-zwa.com')); - * // Prints español.com - * console.log(url.domainToUnicode('xn--fiq228c.com')); - * // Prints 中文.com - * console.log(url.domainToUnicode('xn--iñvalid.com')); - * // Prints an empty string - * ``` - * @since v7.4.0, v6.13.0 - */ - function domainToUnicode(domain: string): string; - /** - * This function ensures the correct decodings of percent-encoded characters as - * well as ensuring a cross-platform valid absolute path string. - * - * ```js - * import { fileURLToPath } from 'node:url'; - * - * const __filename = fileURLToPath(import.meta.url); - * - * new URL('file:///C:/path/').pathname; // Incorrect: /C:/path/ - * fileURLToPath('file:///C:/path/'); // Correct: C:\path\ (Windows) - * - * new URL('file://nas/foo.txt').pathname; // Incorrect: /foo.txt - * fileURLToPath('file://nas/foo.txt'); // Correct: \\nas\foo.txt (Windows) - * - * new URL('file:///你好.txt').pathname; // Incorrect: /%E4%BD%A0%E5%A5%BD.txt - * fileURLToPath('file:///你好.txt'); // Correct: /你好.txt (POSIX) - * - * new URL('file:///hello world').pathname; // Incorrect: /hello%20world - * fileURLToPath('file:///hello world'); // Correct: /hello world (POSIX) - * ``` - * @since v10.12.0 - * @param url The file URL string or URL object to convert to a path. - * @return The fully-resolved platform-specific Node.js file path. - */ - function fileURLToPath(url: string | URL, options?: FileUrlToPathOptions): string; - /** - * Like `url.fileURLToPath(...)` except that instead of returning a string - * representation of the path, a `Buffer` is returned. This conversion is - * helpful when the input URL contains percent-encoded segments that are - * not valid UTF-8 / Unicode sequences. - * @since v24.3.0 - * @param url The file URL string or URL object to convert to a path. - * @returns The fully-resolved platform-specific Node.js file path - * as a `Buffer`. - */ - function fileURLToPathBuffer(url: string | URL, options?: FileUrlToPathOptions): NonSharedBuffer; - /** - * This function ensures that `path` is resolved absolutely, and that the URL - * control characters are correctly encoded when converting into a File URL. - * - * ```js - * import { pathToFileURL } from 'node:url'; - * - * new URL('/foo#1', 'file:'); // Incorrect: file:///foo#1 - * pathToFileURL('/foo#1'); // Correct: file:///foo%231 (POSIX) - * - * new URL('/some/path%.c', 'file:'); // Incorrect: file:///some/path%.c - * pathToFileURL('/some/path%.c'); // Correct: file:///some/path%25.c (POSIX) - * ``` - * @since v10.12.0 - * @param path The path to convert to a File URL. - * @return The file URL object. - */ - function pathToFileURL(path: string, options?: PathToFileUrlOptions): URL; - /** - * This utility function converts a URL object into an ordinary options object as - * expected by the `http.request()` and `https.request()` APIs. - * - * ```js - * import { urlToHttpOptions } from 'node:url'; - * const myURL = new URL('https://a:b@測試?abc#foo'); - * - * console.log(urlToHttpOptions(myURL)); - * /* - * { - * protocol: 'https:', - * hostname: 'xn--g6w251d', - * hash: '#foo', - * search: '?abc', - * pathname: '/', - * path: '/?abc', - * href: 'https://a:b@xn--g6w251d/?abc#foo', - * auth: 'a:b' - * } - * - * ``` - * @since v15.7.0, v14.18.0 - * @param url The `WHATWG URL` object to convert to an options object. - * @return Options object - */ - function urlToHttpOptions(url: URL): ClientRequestArgs; - interface URLFormatOptions { - /** - * `true` if the serialized URL string should include the username and password, `false` otherwise. - * @default true - */ - auth?: boolean | undefined; - /** - * `true` if the serialized URL string should include the fragment, `false` otherwise. - * @default true - */ - fragment?: boolean | undefined; - /** - * `true` if the serialized URL string should include the search query, `false` otherwise. - * @default true - */ - search?: boolean | undefined; - /** - * `true` if Unicode characters appearing in the host component of the URL string should be encoded directly as opposed to - * being Punycode encoded. - * @default false - */ - unicode?: boolean | undefined; - } - // #region web types - type URLPatternInput = string | URLPatternInit; - interface URLPatternComponentResult { - input: string; - groups: Record; - } - interface URLPatternInit { - protocol?: string; - username?: string; - password?: string; - hostname?: string; - port?: string; - pathname?: string; - search?: string; - hash?: string; - baseURL?: string; - } - interface URLPatternOptions { - ignoreCase?: boolean; - } - interface URLPatternResult { - inputs: URLPatternInput[]; - protocol: URLPatternComponentResult; - username: URLPatternComponentResult; - password: URLPatternComponentResult; - hostname: URLPatternComponentResult; - port: URLPatternComponentResult; - pathname: URLPatternComponentResult; - search: URLPatternComponentResult; - hash: URLPatternComponentResult; - } - interface URL { - hash: string; - host: string; - hostname: string; - href: string; - readonly origin: string; - password: string; - pathname: string; - port: string; - protocol: string; - search: string; - readonly searchParams: URLSearchParams; - username: string; - toJSON(): string; - } - var URL: { - prototype: URL; - new(url: string | URL, base?: string | URL): URL; - canParse(input: string | URL, base?: string | URL): boolean; - createObjectURL(blob: Blob): string; - parse(input: string | URL, base?: string | URL): URL | null; - revokeObjectURL(id: string): void; - }; - interface URLPattern { - readonly hasRegExpGroups: boolean; - readonly hash: string; - readonly hostname: string; - readonly password: string; - readonly pathname: string; - readonly port: string; - readonly protocol: string; - readonly search: string; - readonly username: string; - exec(input?: URLPatternInput, baseURL?: string | URL): URLPatternResult | null; - test(input?: URLPatternInput, baseURL?: string | URL): boolean; - } - var URLPattern: { - prototype: URLPattern; - new(input: URLPatternInput, baseURL: string | URL, options?: URLPatternOptions): URLPattern; - new(input?: URLPatternInput, options?: URLPatternOptions): URLPattern; - }; - interface URLSearchParams { - readonly size: number; - append(name: string, value: string): void; - delete(name: string, value?: string): void; - get(name: string): string | null; - getAll(name: string): string[]; - has(name: string, value?: string): boolean; - set(name: string, value: string): void; - sort(): void; - forEach(callbackfn: (value: string, key: string, parent: URLSearchParams) => void, thisArg?: any): void; - [Symbol.iterator](): URLSearchParamsIterator<[string, string]>; - entries(): URLSearchParamsIterator<[string, string]>; - keys(): URLSearchParamsIterator; - values(): URLSearchParamsIterator; - } - var URLSearchParams: { - prototype: URLSearchParams; - new(init?: string[][] | Record | string | URLSearchParams): URLSearchParams; - }; - interface URLSearchParamsIterator extends NodeJS.Iterator { - [Symbol.iterator](): URLSearchParamsIterator; - } - // #endregion -} -declare module "url" { - export * from "node:url"; -} diff --git a/PBandGraphScaffold/node_modules/@types/node/util.d.ts b/PBandGraphScaffold/node_modules/@types/node/util.d.ts deleted file mode 100644 index 70fd51a..0000000 --- a/PBandGraphScaffold/node_modules/@types/node/util.d.ts +++ /dev/null @@ -1,1653 +0,0 @@ -/** - * The `node:util` module supports the needs of Node.js internal APIs. Many of the - * utilities are useful for application and module developers as well. To access - * it: - * - * ```js - * import util from 'node:util'; - * ``` - * @see [source](https://github.com/nodejs/node/blob/v25.x/lib/util.js) - */ -declare module "node:util" { - export * as types from "node:util/types"; - export type InspectStyle = - | "special" - | "number" - | "bigint" - | "boolean" - | "undefined" - | "null" - | "string" - | "symbol" - | "date" - | "name" - | "regexp" - | "module"; - export interface InspectStyles extends Record string)> { - regexp: { - (value: string): string; - colors: InspectColor[]; - }; - } - export type InspectColorModifier = - | "reset" - | "bold" - | "dim" - | "italic" - | "underline" - | "blink" - | "inverse" - | "hidden" - | "strikethrough" - | "doubleunderline"; - export type InspectColorForeground = - | "black" - | "red" - | "green" - | "yellow" - | "blue" - | "magenta" - | "cyan" - | "white" - | "gray" - | "redBright" - | "greenBright" - | "yellowBright" - | "blueBright" - | "magentaBright" - | "cyanBright" - | "whiteBright"; - export type InspectColorBackground = `bg${Capitalize}`; - export type InspectColor = InspectColorModifier | InspectColorForeground | InspectColorBackground; - export interface InspectColors extends Record {} - export interface InspectOptions { - /** - * If `true`, object's non-enumerable symbols and properties are included in the formatted result. - * `WeakMap` and `WeakSet` entries are also included as well as user defined prototype properties (excluding method properties). - * @default false - */ - showHidden?: boolean | undefined; - /** - * Specifies the number of times to recurse while formatting object. - * This is useful for inspecting large objects. - * To recurse up to the maximum call stack size pass `Infinity` or `null`. - * @default 2 - */ - depth?: number | null | undefined; - /** - * If `true`, the output is styled with ANSI color codes. Colors are customizable. - */ - colors?: boolean | undefined; - /** - * If `false`, `[util.inspect.custom](depth, opts, inspect)` functions are not invoked. - * @default true - */ - customInspect?: boolean | undefined; - /** - * If `true`, `Proxy` inspection includes the target and handler objects. - * @default false - */ - showProxy?: boolean | undefined; - /** - * Specifies the maximum number of `Array`, `TypedArray`, `WeakMap`, and `WeakSet` elements - * to include when formatting. Set to `null` or `Infinity` to show all elements. - * Set to `0` or negative to show no elements. - * @default 100 - */ - maxArrayLength?: number | null | undefined; - /** - * Specifies the maximum number of characters to - * include when formatting. Set to `null` or `Infinity` to show all elements. - * Set to `0` or negative to show no characters. - * @default 10000 - */ - maxStringLength?: number | null | undefined; - /** - * The length at which input values are split across multiple lines. - * Set to `Infinity` to format the input as a single line - * (in combination with `compact` set to `true` or any number >= `1`). - * @default 80 - */ - breakLength?: number | undefined; - /** - * Setting this to `false` causes each object key - * to be displayed on a new line. It will also add new lines to text that is - * longer than `breakLength`. If set to a number, the most `n` inner elements - * are united on a single line as long as all properties fit into - * `breakLength`. Short array elements are also grouped together. Note that no - * text will be reduced below 16 characters, no matter the `breakLength` size. - * For more information, see the example below. - * @default true - */ - compact?: boolean | number | undefined; - /** - * If set to `true` or a function, all properties of an object, and `Set` and `Map` - * entries are sorted in the resulting string. - * If set to `true` the default sort is used. - * If set to a function, it is used as a compare function. - */ - sorted?: boolean | ((a: string, b: string) => number) | undefined; - /** - * If set to `true`, getters are going to be - * inspected as well. If set to `'get'` only getters without setter are going - * to be inspected. If set to `'set'` only getters having a corresponding - * setter are going to be inspected. This might cause side effects depending on - * the getter function. - * @default false - */ - getters?: "get" | "set" | boolean | undefined; - /** - * If set to `true`, an underscore is used to separate every three digits in all bigints and numbers. - * @default false - */ - numericSeparator?: boolean | undefined; - } - export interface InspectContext extends Required { - stylize(text: string, styleType: InspectStyle): string; - } - import _inspect = inspect; - export interface Inspectable { - [inspect.custom](depth: number, options: InspectContext, inspect: typeof _inspect): any; - } - // TODO: Remove these in a future major - /** @deprecated Use `InspectStyle` instead. */ - export type Style = Exclude; - /** @deprecated Use the `Inspectable` interface instead. */ - export type CustomInspectFunction = (depth: number, options: InspectContext) => any; - /** @deprecated Use `InspectContext` instead. */ - export interface InspectOptionsStylized extends InspectContext {} - /** @deprecated Use `InspectColorModifier` instead. */ - export type Modifiers = InspectColorModifier; - /** @deprecated Use `InspectColorForeground` instead. */ - export type ForegroundColors = InspectColorForeground; - /** @deprecated Use `InspectColorBackground` instead. */ - export type BackgroundColors = InspectColorBackground; - export interface CallSiteObject { - /** - * Returns the name of the function associated with this call site. - */ - functionName: string; - /** - * Returns the name of the resource that contains the script for the - * function for this call site. - */ - scriptName: string; - /** - * Returns the unique id of the script, as in Chrome DevTools protocol - * [`Runtime.ScriptId`](https://chromedevtools.github.io/devtools-protocol/1-3/Runtime/#type-ScriptId). - * @since v22.14.0 - */ - scriptId: string; - /** - * Returns the number, 1-based, of the line for the associate function call. - */ - lineNumber: number; - /** - * Returns the 1-based column offset on the line for the associated function call. - */ - columnNumber: number; - } - export type DiffEntry = [operation: -1 | 0 | 1, value: string]; - /** - * `util.diff()` compares two string or array values and returns an array of difference entries. - * It uses the Myers diff algorithm to compute minimal differences, which is the same algorithm - * used internally by assertion error messages. - * - * If the values are equal, an empty array is returned. - * - * ```js - * const { diff } = require('node:util'); - * - * // Comparing strings - * const actualString = '12345678'; - * const expectedString = '12!!5!7!'; - * console.log(diff(actualString, expectedString)); - * // [ - * // [0, '1'], - * // [0, '2'], - * // [1, '3'], - * // [1, '4'], - * // [-1, '!'], - * // [-1, '!'], - * // [0, '5'], - * // [1, '6'], - * // [-1, '!'], - * // [0, '7'], - * // [1, '8'], - * // [-1, '!'], - * // ] - * // Comparing arrays - * const actualArray = ['1', '2', '3']; - * const expectedArray = ['1', '3', '4']; - * console.log(diff(actualArray, expectedArray)); - * // [ - * // [0, '1'], - * // [1, '2'], - * // [0, '3'], - * // [-1, '4'], - * // ] - * // Equal values return empty array - * console.log(diff('same', 'same')); - * // [] - * ``` - * @since v22.15.0 - * @experimental - * @param actual The first value to compare - * @param expected The second value to compare - * @returns An array of difference entries. Each entry is an array with two elements: - * * Index 0: `number` Operation code: `-1` for delete, `0` for no-op/unchanged, `1` for insert - * * Index 1: `string` The value associated with the operation - */ - export function diff(actual: string | readonly string[], expected: string | readonly string[]): DiffEntry[]; - /** - * The `util.format()` method returns a formatted string using the first argument - * as a `printf`-like format string which can contain zero or more format - * specifiers. Each specifier is replaced with the converted value from the - * corresponding argument. Supported specifiers are: - * - * If a specifier does not have a corresponding argument, it is not replaced: - * - * ```js - * util.format('%s:%s', 'foo'); - * // Returns: 'foo:%s' - * ``` - * - * Values that are not part of the format string are formatted using `util.inspect()` if their type is not `string`. - * - * If there are more arguments passed to the `util.format()` method than the - * number of specifiers, the extra arguments are concatenated to the returned - * string, separated by spaces: - * - * ```js - * util.format('%s:%s', 'foo', 'bar', 'baz'); - * // Returns: 'foo:bar baz' - * ``` - * - * If the first argument does not contain a valid format specifier, `util.format()` returns a string that is the concatenation of all arguments separated by spaces: - * - * ```js - * util.format(1, 2, 3); - * // Returns: '1 2 3' - * ``` - * - * If only one argument is passed to `util.format()`, it is returned as it is - * without any formatting: - * - * ```js - * util.format('%% %s'); - * // Returns: '%% %s' - * ``` - * - * `util.format()` is a synchronous method that is intended as a debugging tool. - * Some input values can have a significant performance overhead that can block the - * event loop. Use this function with care and never in a hot code path. - * @since v0.5.3 - * @param format A `printf`-like format string. - */ - export function format(format?: any, ...param: any[]): string; - /** - * This function is identical to {@link format}, except in that it takes - * an `inspectOptions` argument which specifies options that are passed along to {@link inspect}. - * - * ```js - * util.formatWithOptions({ colors: true }, 'See object %O', { foo: 42 }); - * // Returns 'See object { foo: 42 }', where `42` is colored as a number - * // when printed to a terminal. - * ``` - * @since v10.0.0 - */ - export function formatWithOptions(inspectOptions: InspectOptions, format?: any, ...param: any[]): string; - export interface GetCallSitesOptions { - /** - * Reconstruct the original location in the stacktrace from the source-map. - * Enabled by default with the flag `--enable-source-maps`. - */ - sourceMap?: boolean | undefined; - } - /** - * Returns an array of call site objects containing the stack of - * the caller function. - * - * ```js - * import { getCallSites } from 'node:util'; - * - * function exampleFunction() { - * const callSites = getCallSites(); - * - * console.log('Call Sites:'); - * callSites.forEach((callSite, index) => { - * console.log(`CallSite ${index + 1}:`); - * console.log(`Function Name: ${callSite.functionName}`); - * console.log(`Script Name: ${callSite.scriptName}`); - * console.log(`Line Number: ${callSite.lineNumber}`); - * console.log(`Column Number: ${callSite.column}`); - * }); - * // CallSite 1: - * // Function Name: exampleFunction - * // Script Name: /home/example.js - * // Line Number: 5 - * // Column Number: 26 - * - * // CallSite 2: - * // Function Name: anotherFunction - * // Script Name: /home/example.js - * // Line Number: 22 - * // Column Number: 3 - * - * // ... - * } - * - * // A function to simulate another stack layer - * function anotherFunction() { - * exampleFunction(); - * } - * - * anotherFunction(); - * ``` - * - * It is possible to reconstruct the original locations by setting the option `sourceMap` to `true`. - * If the source map is not available, the original location will be the same as the current location. - * When the `--enable-source-maps` flag is enabled, for example when using `--experimental-transform-types`, - * `sourceMap` will be true by default. - * - * ```ts - * import { getCallSites } from 'node:util'; - * - * interface Foo { - * foo: string; - * } - * - * const callSites = getCallSites({ sourceMap: true }); - * - * // With sourceMap: - * // Function Name: '' - * // Script Name: example.js - * // Line Number: 7 - * // Column Number: 26 - * - * // Without sourceMap: - * // Function Name: '' - * // Script Name: example.js - * // Line Number: 2 - * // Column Number: 26 - * ``` - * @param frameCount Number of frames to capture as call site objects. - * **Default:** `10`. Allowable range is between 1 and 200. - * @return An array of call site objects - * @since v22.9.0 - */ - export function getCallSites(frameCount?: number, options?: GetCallSitesOptions): CallSiteObject[]; - export function getCallSites(options: GetCallSitesOptions): CallSiteObject[]; - /** - * Returns the string name for a numeric error code that comes from a Node.js API. - * The mapping between error codes and error names is platform-dependent. - * See `Common System Errors` for the names of common errors. - * - * ```js - * fs.access('file/that/does/not/exist', (err) => { - * const name = util.getSystemErrorName(err.errno); - * console.error(name); // ENOENT - * }); - * ``` - * @since v9.7.0 - */ - export function getSystemErrorName(err: number): string; - /** - * Enable or disable printing a stack trace on `SIGINT`. The API is only available on the main thread. - * @since 24.6.0 - */ - export function setTraceSigInt(enable: boolean): void; - /** - * Returns a Map of all system error codes available from the Node.js API. - * The mapping between error codes and error names is platform-dependent. - * See `Common System Errors` for the names of common errors. - * - * ```js - * fs.access('file/that/does/not/exist', (err) => { - * const errorMap = util.getSystemErrorMap(); - * const name = errorMap.get(err.errno); - * console.error(name); // ENOENT - * }); - * ``` - * @since v16.0.0, v14.17.0 - */ - export function getSystemErrorMap(): Map; - /** - * Returns the string message for a numeric error code that comes from a Node.js - * API. - * The mapping between error codes and string messages is platform-dependent. - * - * ```js - * fs.access('file/that/does/not/exist', (err) => { - * const message = util.getSystemErrorMessage(err.errno); - * console.error(message); // no such file or directory - * }); - * ``` - * @since v22.12.0 - */ - export function getSystemErrorMessage(err: number): string; - /** - * Returns the `string` after replacing any surrogate code points - * (or equivalently, any unpaired surrogate code units) with the - * Unicode "replacement character" U+FFFD. - * @since v16.8.0, v14.18.0 - */ - export function toUSVString(string: string): string; - /** - * Creates and returns an `AbortController` instance whose `AbortSignal` is marked - * as transferable and can be used with `structuredClone()` or `postMessage()`. - * @since v18.11.0 - * @returns A transferable AbortController - */ - export function transferableAbortController(): AbortController; - /** - * Marks the given `AbortSignal` as transferable so that it can be used with`structuredClone()` and `postMessage()`. - * - * ```js - * const signal = transferableAbortSignal(AbortSignal.timeout(100)); - * const channel = new MessageChannel(); - * channel.port2.postMessage(signal, [signal]); - * ``` - * @since v18.11.0 - * @param signal The AbortSignal - * @returns The same AbortSignal - */ - export function transferableAbortSignal(signal: AbortSignal): AbortSignal; - /** - * Listens to abort event on the provided `signal` and returns a promise that resolves when the `signal` is aborted. - * If `resource` is provided, it weakly references the operation's associated object, - * so if `resource` is garbage collected before the `signal` aborts, - * then returned promise shall remain pending. - * This prevents memory leaks in long-running or non-cancelable operations. - * - * ```js - * import { aborted } from 'node:util'; - * - * // Obtain an object with an abortable signal, like a custom resource or operation. - * const dependent = obtainSomethingAbortable(); - * - * // Pass `dependent` as the resource, indicating the promise should only resolve - * // if `dependent` is still in memory when the signal is aborted. - * aborted(dependent.signal, dependent).then(() => { - * // This code runs when `dependent` is aborted. - * console.log('Dependent resource was aborted.'); - * }); - * - * // Simulate an event that triggers the abort. - * dependent.on('event', () => { - * dependent.abort(); // This will cause the `aborted` promise to resolve. - * }); - * ``` - * @since v19.7.0 - * @param resource Any non-null object tied to the abortable operation and held weakly. - * If `resource` is garbage collected before the `signal` aborts, the promise remains pending, - * allowing Node.js to stop tracking it. - * This helps prevent memory leaks in long-running or non-cancelable operations. - */ - export function aborted(signal: AbortSignal, resource: any): Promise; - /** - * The `util.inspect()` method returns a string representation of `object` that is - * intended for debugging. The output of `util.inspect` may change at any time - * and should not be depended upon programmatically. Additional `options` may be - * passed that alter the result. - * `util.inspect()` will use the constructor's name and/or `Symbol.toStringTag` - * property to make an identifiable tag for an inspected value. - * - * ```js - * class Foo { - * get [Symbol.toStringTag]() { - * return 'bar'; - * } - * } - * - * class Bar {} - * - * const baz = Object.create(null, { [Symbol.toStringTag]: { value: 'foo' } }); - * - * util.inspect(new Foo()); // 'Foo [bar] {}' - * util.inspect(new Bar()); // 'Bar {}' - * util.inspect(baz); // '[foo] {}' - * ``` - * - * Circular references point to their anchor by using a reference index: - * - * ```js - * import { inspect } from 'node:util'; - * - * const obj = {}; - * obj.a = [obj]; - * obj.b = {}; - * obj.b.inner = obj.b; - * obj.b.obj = obj; - * - * console.log(inspect(obj)); - * // { - * // a: [ [Circular *1] ], - * // b: { inner: [Circular *2], obj: [Circular *1] } - * // } - * ``` - * - * The following example inspects all properties of the `util` object: - * - * ```js - * import util from 'node:util'; - * - * console.log(util.inspect(util, { showHidden: true, depth: null })); - * ``` - * - * The following example highlights the effect of the `compact` option: - * - * ```js - * import { inspect } from 'node:util'; - * - * const o = { - * a: [1, 2, [[ - * 'Lorem ipsum dolor sit amet,\nconsectetur adipiscing elit, sed do ' + - * 'eiusmod \ntempor incididunt ut labore et dolore magna aliqua.', - * 'test', - * 'foo']], 4], - * b: new Map([['za', 1], ['zb', 'test']]), - * }; - * console.log(inspect(o, { compact: true, depth: 5, breakLength: 80 })); - * - * // { a: - * // [ 1, - * // 2, - * // [ [ 'Lorem ipsum dolor sit amet,\nconsectetur [...]', // A long line - * // 'test', - * // 'foo' ] ], - * // 4 ], - * // b: Map(2) { 'za' => 1, 'zb' => 'test' } } - * - * // Setting `compact` to false or an integer creates more reader friendly output. - * console.log(inspect(o, { compact: false, depth: 5, breakLength: 80 })); - * - * // { - * // a: [ - * // 1, - * // 2, - * // [ - * // [ - * // 'Lorem ipsum dolor sit amet,\n' + - * // 'consectetur adipiscing elit, sed do eiusmod \n' + - * // 'tempor incididunt ut labore et dolore magna aliqua.', - * // 'test', - * // 'foo' - * // ] - * // ], - * // 4 - * // ], - * // b: Map(2) { - * // 'za' => 1, - * // 'zb' => 'test' - * // } - * // } - * - * // Setting `breakLength` to e.g. 150 will print the "Lorem ipsum" text in a - * // single line. - * ``` - * - * The `showHidden` option allows `WeakMap` and `WeakSet` entries to be - * inspected. If there are more entries than `maxArrayLength`, there is no - * guarantee which entries are displayed. That means retrieving the same - * `WeakSet` entries twice may result in different output. Furthermore, entries - * with no remaining strong references may be garbage collected at any time. - * - * ```js - * import { inspect } from 'node:util'; - * - * const obj = { a: 1 }; - * const obj2 = { b: 2 }; - * const weakSet = new WeakSet([obj, obj2]); - * - * console.log(inspect(weakSet, { showHidden: true })); - * // WeakSet { { a: 1 }, { b: 2 } } - * ``` - * - * The `sorted` option ensures that an object's property insertion order does not - * impact the result of `util.inspect()`. - * - * ```js - * import { inspect } from 'node:util'; - * import assert from 'node:assert'; - * - * const o1 = { - * b: [2, 3, 1], - * a: '`a` comes before `b`', - * c: new Set([2, 3, 1]), - * }; - * console.log(inspect(o1, { sorted: true })); - * // { a: '`a` comes before `b`', b: [ 2, 3, 1 ], c: Set(3) { 1, 2, 3 } } - * console.log(inspect(o1, { sorted: (a, b) => b.localeCompare(a) })); - * // { c: Set(3) { 3, 2, 1 }, b: [ 2, 3, 1 ], a: '`a` comes before `b`' } - * - * const o2 = { - * c: new Set([2, 1, 3]), - * a: '`a` comes before `b`', - * b: [2, 3, 1], - * }; - * assert.strict.equal( - * inspect(o1, { sorted: true }), - * inspect(o2, { sorted: true }), - * ); - * ``` - * - * The `numericSeparator` option adds an underscore every three digits to all - * numbers. - * - * ```js - * import { inspect } from 'node:util'; - * - * const thousand = 1000; - * const million = 1000000; - * const bigNumber = 123456789n; - * const bigDecimal = 1234.12345; - * - * console.log(inspect(thousand, { numericSeparator: true })); - * // 1_000 - * console.log(inspect(million, { numericSeparator: true })); - * // 1_000_000 - * console.log(inspect(bigNumber, { numericSeparator: true })); - * // 123_456_789n - * console.log(inspect(bigDecimal, { numericSeparator: true })); - * // 1_234.123_45 - * ``` - * - * `util.inspect()` is a synchronous method intended for debugging. Its maximum - * output length is approximately 128 MiB. Inputs that result in longer output will - * be truncated. - * @since v0.3.0 - * @param object Any JavaScript primitive or `Object`. - * @return The representation of `object`. - */ - export function inspect(object: any, showHidden?: boolean, depth?: number | null, color?: boolean): string; - export function inspect(object: any, options?: InspectOptions): string; - export namespace inspect { - const custom: unique symbol; - let colors: InspectColors; - let styles: InspectStyles; - let defaultOptions: InspectOptions; - let replDefaults: InspectOptions; - } - /** - * Alias for [`Array.isArray()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/isArray). - * - * Returns `true` if the given `object` is an `Array`. Otherwise, returns `false`. - * - * ```js - * import util from 'node:util'; - * - * util.isArray([]); - * // Returns: true - * util.isArray(new Array()); - * // Returns: true - * util.isArray({}); - * // Returns: false - * ``` - * @since v0.6.0 - * @deprecated Since v4.0.0 - Use `isArray` instead. - */ - export function isArray(object: unknown): object is unknown[]; - /** - * Usage of `util.inherits()` is discouraged. Please use the ES6 `class` and - * `extends` keywords to get language level inheritance support. Also note - * that the two styles are [semantically incompatible](https://github.com/nodejs/node/issues/4179). - * - * Inherit the prototype methods from one - * [constructor](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/constructor) into another. The - * prototype of `constructor` will be set to a new object created from - * `superConstructor`. - * - * This mainly adds some input validation on top of - * `Object.setPrototypeOf(constructor.prototype, superConstructor.prototype)`. - * As an additional convenience, `superConstructor` will be accessible - * through the `constructor.super_` property. - * - * ```js - * const util = require('node:util'); - * const EventEmitter = require('node:events'); - * - * function MyStream() { - * EventEmitter.call(this); - * } - * - * util.inherits(MyStream, EventEmitter); - * - * MyStream.prototype.write = function(data) { - * this.emit('data', data); - * }; - * - * const stream = new MyStream(); - * - * console.log(stream instanceof EventEmitter); // true - * console.log(MyStream.super_ === EventEmitter); // true - * - * stream.on('data', (data) => { - * console.log(`Received data: "${data}"`); - * }); - * stream.write('It works!'); // Received data: "It works!" - * ``` - * - * ES6 example using `class` and `extends`: - * - * ```js - * import EventEmitter from 'node:events'; - * - * class MyStream extends EventEmitter { - * write(data) { - * this.emit('data', data); - * } - * } - * - * const stream = new MyStream(); - * - * stream.on('data', (data) => { - * console.log(`Received data: "${data}"`); - * }); - * stream.write('With ES6'); - * ``` - * @since v0.3.0 - * @legacy Use ES2015 class syntax and `extends` keyword instead. - */ - export function inherits(constructor: unknown, superConstructor: unknown): void; - export type DebugLoggerFunction = (msg: string, ...param: unknown[]) => void; - export interface DebugLogger extends DebugLoggerFunction { - /** - * The `util.debuglog().enabled` getter is used to create a test that can be used - * in conditionals based on the existence of the `NODE_DEBUG` environment variable. - * If the `section` name appears within the value of that environment variable, - * then the returned value will be `true`. If not, then the returned value will be - * `false`. - * - * ```js - * import { debuglog } from 'node:util'; - * const enabled = debuglog('foo').enabled; - * if (enabled) { - * console.log('hello from foo [%d]', 123); - * } - * ``` - * - * If this program is run with `NODE_DEBUG=foo` in the environment, then it will - * output something like: - * - * ```console - * hello from foo [123] - * ``` - */ - enabled: boolean; - } - /** - * The `util.debuglog()` method is used to create a function that conditionally - * writes debug messages to `stderr` based on the existence of the `NODE_DEBUG` - * environment variable. If the `section` name appears within the value of that - * environment variable, then the returned function operates similar to - * `console.error()`. If not, then the returned function is a no-op. - * - * ```js - * import { debuglog } from 'node:util'; - * const log = debuglog('foo'); - * - * log('hello from foo [%d]', 123); - * ``` - * - * If this program is run with `NODE_DEBUG=foo` in the environment, then - * it will output something like: - * - * ```console - * FOO 3245: hello from foo [123] - * ``` - * - * where `3245` is the process id. If it is not run with that - * environment variable set, then it will not print anything. - * - * The `section` supports wildcard also: - * - * ```js - * import { debuglog } from 'node:util'; - * const log = debuglog('foo'); - * - * log('hi there, it\'s foo-bar [%d]', 2333); - * ``` - * - * if it is run with `NODE_DEBUG=foo*` in the environment, then it will output - * something like: - * - * ```console - * FOO-BAR 3257: hi there, it's foo-bar [2333] - * ``` - * - * Multiple comma-separated `section` names may be specified in the `NODE_DEBUG` - * environment variable: `NODE_DEBUG=fs,net,tls`. - * - * The optional `callback` argument can be used to replace the logging function - * with a different function that doesn't have any initialization or - * unnecessary wrapping. - * - * ```js - * import { debuglog } from 'node:util'; - * let log = debuglog('internals', (debug) => { - * // Replace with a logging function that optimizes out - * // testing if the section is enabled - * log = debug; - * }); - * ``` - * @since v0.11.3 - * @param section A string identifying the portion of the application for which the `debuglog` function is being created. - * @param callback A callback invoked the first time the logging function is called with a function argument that is a more optimized logging function. - * @return The logging function - */ - export function debuglog(section: string, callback?: (fn: DebugLoggerFunction) => void): DebugLogger; - export { debuglog as debug }; - /** - * The `util.deprecate()` method wraps `fn` (which may be a function or class) in - * such a way that it is marked as deprecated. - * - * ```js - * import { deprecate } from 'node:util'; - * - * export const obsoleteFunction = deprecate(() => { - * // Do something here. - * }, 'obsoleteFunction() is deprecated. Use newShinyFunction() instead.'); - * ``` - * - * When called, `util.deprecate()` will return a function that will emit a - * `DeprecationWarning` using the `'warning'` event. The warning will - * be emitted and printed to `stderr` the first time the returned function is - * called. After the warning is emitted, the wrapped function is called without - * emitting a warning. - * - * If the same optional `code` is supplied in multiple calls to `util.deprecate()`, - * the warning will be emitted only once for that `code`. - * - * ```js - * import { deprecate } from 'node:util'; - * - * const fn1 = deprecate( - * () => 'a value', - * 'deprecation message', - * 'DEP0001', - * ); - * const fn2 = deprecate( - * () => 'a different value', - * 'other dep message', - * 'DEP0001', - * ); - * fn1(); // Emits a deprecation warning with code DEP0001 - * fn2(); // Does not emit a deprecation warning because it has the same code - * ``` - * - * If either the `--no-deprecation` or `--no-warnings` command-line flags are - * used, or if the `process.noDeprecation` property is set to `true` _prior_ to - * the first deprecation warning, the `util.deprecate()` method does nothing. - * - * If the `--trace-deprecation` or `--trace-warnings` command-line flags are set, - * or the `process.traceDeprecation` property is set to `true`, a warning and a - * stack trace are printed to `stderr` the first time the deprecated function is - * called. - * - * If the `--throw-deprecation` command-line flag is set, or the - * `process.throwDeprecation` property is set to `true`, then an exception will be - * thrown when the deprecated function is called. - * - * The `--throw-deprecation` command-line flag and `process.throwDeprecation` - * property take precedence over `--trace-deprecation` and - * `process.traceDeprecation`. - * @since v0.8.0 - * @param fn The function that is being deprecated. - * @param msg A warning message to display when the deprecated function is invoked. - * @param code A deprecation code. See the `list of deprecated APIs` for a list of codes. - * @return The deprecated function wrapped to emit a warning. - */ - export function deprecate(fn: T, msg: string, code?: string): T; - export interface IsDeepStrictEqualOptions { - /** - * If `true`, prototype and constructor - * comparison is skipped during deep strict equality check. - * @since v24.9.0 - * @default false - */ - skipPrototype?: boolean | undefined; - } - /** - * Returns `true` if there is deep strict equality between `val1` and `val2`. - * Otherwise, returns `false`. - * - * See `assert.deepStrictEqual()` for more information about deep strict - * equality. - * @since v9.0.0 - */ - export function isDeepStrictEqual(val1: unknown, val2: unknown, options?: IsDeepStrictEqualOptions): boolean; - /** - * Returns `str` with any ANSI escape codes removed. - * - * ```js - * console.log(util.stripVTControlCharacters('\u001B[4mvalue\u001B[0m')); - * // Prints "value" - * ``` - * @since v16.11.0 - */ - export function stripVTControlCharacters(str: string): string; - /** - * Takes an `async` function (or a function that returns a `Promise`) and returns a - * function following the error-first callback style, i.e. taking - * an `(err, value) => ...` callback as the last argument. In the callback, the - * first argument will be the rejection reason (or `null` if the `Promise` - * resolved), and the second argument will be the resolved value. - * - * ```js - * import { callbackify } from 'node:util'; - * - * async function fn() { - * return 'hello world'; - * } - * const callbackFunction = callbackify(fn); - * - * callbackFunction((err, ret) => { - * if (err) throw err; - * console.log(ret); - * }); - * ``` - * - * Will print: - * - * ```text - * hello world - * ``` - * - * The callback is executed asynchronously, and will have a limited stack trace. - * If the callback throws, the process will emit an `'uncaughtException'` - * event, and if not handled will exit. - * - * Since `null` has a special meaning as the first argument to a callback, if a - * wrapped function rejects a `Promise` with a falsy value as a reason, the value - * is wrapped in an `Error` with the original value stored in a field named - * `reason`. - * - * ```js - * function fn() { - * return Promise.reject(null); - * } - * const callbackFunction = util.callbackify(fn); - * - * callbackFunction((err, ret) => { - * // When the Promise was rejected with `null` it is wrapped with an Error and - * // the original value is stored in `reason`. - * err && Object.hasOwn(err, 'reason') && err.reason === null; // true - * }); - * ``` - * @since v8.2.0 - * @param fn An `async` function - * @return a callback style function - */ - export function callbackify(fn: () => Promise): (callback: (err: NodeJS.ErrnoException) => void) => void; - export function callbackify( - fn: () => Promise, - ): (callback: (err: NodeJS.ErrnoException, result: TResult) => void) => void; - export function callbackify( - fn: (arg1: T1) => Promise, - ): (arg1: T1, callback: (err: NodeJS.ErrnoException) => void) => void; - export function callbackify( - fn: (arg1: T1) => Promise, - ): (arg1: T1, callback: (err: NodeJS.ErrnoException, result: TResult) => void) => void; - export function callbackify( - fn: (arg1: T1, arg2: T2) => Promise, - ): (arg1: T1, arg2: T2, callback: (err: NodeJS.ErrnoException) => void) => void; - export function callbackify( - fn: (arg1: T1, arg2: T2) => Promise, - ): (arg1: T1, arg2: T2, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void; - export function callbackify( - fn: (arg1: T1, arg2: T2, arg3: T3) => Promise, - ): (arg1: T1, arg2: T2, arg3: T3, callback: (err: NodeJS.ErrnoException) => void) => void; - export function callbackify( - fn: (arg1: T1, arg2: T2, arg3: T3) => Promise, - ): (arg1: T1, arg2: T2, arg3: T3, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void; - export function callbackify( - fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise, - ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err: NodeJS.ErrnoException) => void) => void; - export function callbackify( - fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise, - ): ( - arg1: T1, - arg2: T2, - arg3: T3, - arg4: T4, - callback: (err: NodeJS.ErrnoException | null, result: TResult) => void, - ) => void; - export function callbackify( - fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise, - ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err: NodeJS.ErrnoException) => void) => void; - export function callbackify( - fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise, - ): ( - arg1: T1, - arg2: T2, - arg3: T3, - arg4: T4, - arg5: T5, - callback: (err: NodeJS.ErrnoException | null, result: TResult) => void, - ) => void; - export function callbackify( - fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6) => Promise, - ): ( - arg1: T1, - arg2: T2, - arg3: T3, - arg4: T4, - arg5: T5, - arg6: T6, - callback: (err: NodeJS.ErrnoException) => void, - ) => void; - export function callbackify( - fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6) => Promise, - ): ( - arg1: T1, - arg2: T2, - arg3: T3, - arg4: T4, - arg5: T5, - arg6: T6, - callback: (err: NodeJS.ErrnoException | null, result: TResult) => void, - ) => void; - export interface CustomPromisifyLegacy extends Function { - __promisify__: TCustom; - } - export interface CustomPromisifySymbol extends Function { - [promisify.custom]: TCustom; - } - export type CustomPromisify = - | CustomPromisifySymbol - | CustomPromisifyLegacy; - /** - * Takes a function following the common error-first callback style, i.e. taking - * an `(err, value) => ...` callback as the last argument, and returns a version - * that returns promises. - * - * ```js - * import { promisify } from 'node:util'; - * import { stat } from 'node:fs'; - * - * const promisifiedStat = promisify(stat); - * promisifiedStat('.').then((stats) => { - * // Do something with `stats` - * }).catch((error) => { - * // Handle the error. - * }); - * ``` - * - * Or, equivalently using `async function`s: - * - * ```js - * import { promisify } from 'node:util'; - * import { stat } from 'node:fs'; - * - * const promisifiedStat = promisify(stat); - * - * async function callStat() { - * const stats = await promisifiedStat('.'); - * console.log(`This directory is owned by ${stats.uid}`); - * } - * - * callStat(); - * ``` - * - * If there is an `original[util.promisify.custom]` property present, `promisify` - * will return its value, see [Custom promisified functions](https://nodejs.org/docs/latest-v25.x/api/util.html#custom-promisified-functions). - * - * `promisify()` assumes that `original` is a function taking a callback as its - * final argument in all cases. If `original` is not a function, `promisify()` - * will throw an error. If `original` is a function but its last argument is not - * an error-first callback, it will still be passed an error-first - * callback as its last argument. - * - * Using `promisify()` on class methods or other methods that use `this` may not - * work as expected unless handled specially: - * - * ```js - * import { promisify } from 'node:util'; - * - * class Foo { - * constructor() { - * this.a = 42; - * } - * - * bar(callback) { - * callback(null, this.a); - * } - * } - * - * const foo = new Foo(); - * - * const naiveBar = promisify(foo.bar); - * // TypeError: Cannot read properties of undefined (reading 'a') - * // naiveBar().then(a => console.log(a)); - * - * naiveBar.call(foo).then((a) => console.log(a)); // '42' - * - * const bindBar = naiveBar.bind(foo); - * bindBar().then((a) => console.log(a)); // '42' - * ``` - * @since v8.0.0 - */ - export function promisify(fn: CustomPromisify): TCustom; - export function promisify( - fn: (callback: (err: any, result: TResult) => void) => void, - ): () => Promise; - export function promisify(fn: (callback: (err?: any) => void) => void): () => Promise; - export function promisify( - fn: (arg1: T1, callback: (err: any, result: TResult) => void) => void, - ): (arg1: T1) => Promise; - export function promisify(fn: (arg1: T1, callback: (err?: any) => void) => void): (arg1: T1) => Promise; - export function promisify( - fn: (arg1: T1, arg2: T2, callback: (err: any, result: TResult) => void) => void, - ): (arg1: T1, arg2: T2) => Promise; - export function promisify( - fn: (arg1: T1, arg2: T2, callback: (err?: any) => void) => void, - ): (arg1: T1, arg2: T2) => Promise; - export function promisify( - fn: (arg1: T1, arg2: T2, arg3: T3, callback: (err: any, result: TResult) => void) => void, - ): (arg1: T1, arg2: T2, arg3: T3) => Promise; - export function promisify( - fn: (arg1: T1, arg2: T2, arg3: T3, callback: (err?: any) => void) => void, - ): (arg1: T1, arg2: T2, arg3: T3) => Promise; - export function promisify( - fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err: any, result: TResult) => void) => void, - ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise; - export function promisify( - fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err?: any) => void) => void, - ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise; - export function promisify( - fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err: any, result: TResult) => void) => void, - ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise; - export function promisify( - fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err?: any) => void) => void, - ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise; - export function promisify(fn: Function): Function; - export namespace promisify { - /** - * That can be used to declare custom promisified variants of functions. - */ - const custom: unique symbol; - } - /** - * Stability: 1.1 - Active development - * Given an example `.env` file: - * - * ```js - * import { parseEnv } from 'node:util'; - * - * parseEnv('HELLO=world\nHELLO=oh my\n'); - * // Returns: { HELLO: 'oh my' } - * ``` - * @param content The raw contents of a `.env` file. - * @since v20.12.0 - */ - export function parseEnv(content: string): NodeJS.Dict; - export interface StyleTextOptions { - /** - * When true, `stream` is checked to see if it can handle colors. - * @default true - */ - validateStream?: boolean | undefined; - /** - * A stream that will be validated if it can be colored. - * @default process.stdout - */ - stream?: NodeJS.WritableStream | undefined; - } - /** - * This function returns a formatted text considering the `format` passed - * for printing in a terminal. It is aware of the terminal's capabilities - * and acts according to the configuration set via `NO_COLOR`, - * `NODE_DISABLE_COLORS` and `FORCE_COLOR` environment variables. - * - * ```js - * import { styleText } from 'node:util'; - * import { stderr } from 'node:process'; - * - * const successMessage = styleText('green', 'Success!'); - * console.log(successMessage); - * - * const errorMessage = styleText( - * 'red', - * 'Error! Error!', - * // Validate if process.stderr has TTY - * { stream: stderr }, - * ); - * console.error(errorMessage); - * ``` - * - * `util.inspect.colors` also provides text formats such as `italic`, and - * `underline` and you can combine both: - * - * ```js - * console.log( - * util.styleText(['underline', 'italic'], 'My italic underlined message'), - * ); - * ``` - * - * When passing an array of formats, the order of the format applied - * is left to right so the following style might overwrite the previous one. - * - * ```js - * console.log( - * util.styleText(['red', 'green'], 'text'), // green - * ); - * ``` - * - * The special format value `none` applies no additional styling to the text. - * - * The full list of formats can be found in [modifiers](https://nodejs.org/docs/latest-v25.x/api/util.html#modifiers). - * @param format A text format or an Array of text formats defined in `util.inspect.colors`. - * @param text The text to to be formatted. - * @since v20.12.0 - */ - export function styleText( - format: InspectColor | readonly InspectColor[], - text: string, - options?: StyleTextOptions, - ): string; - /** @deprecated This alias will be removed in a future version. Use the canonical `TextEncoderEncodeIntoResult` instead. */ - // TODO: remove in future major - export interface EncodeIntoResult extends TextEncoderEncodeIntoResult {} - //// parseArgs - /** - * Provides a higher level API for command-line argument parsing than interacting - * with `process.argv` directly. Takes a specification for the expected arguments - * and returns a structured object with the parsed options and positionals. - * - * ```js - * import { parseArgs } from 'node:util'; - * const args = ['-f', '--bar', 'b']; - * const options = { - * foo: { - * type: 'boolean', - * short: 'f', - * }, - * bar: { - * type: 'string', - * }, - * }; - * const { - * values, - * positionals, - * } = parseArgs({ args, options }); - * console.log(values, positionals); - * // Prints: [Object: null prototype] { foo: true, bar: 'b' } [] - * ``` - * @since v18.3.0, v16.17.0 - * @param config Used to provide arguments for parsing and to configure the parser. `config` supports the following properties: - * @return The parsed command line arguments: - */ - export function parseArgs(config?: T): ParsedResults; - /** - * Type of argument used in {@link parseArgs}. - */ - export type ParseArgsOptionsType = "boolean" | "string"; - export interface ParseArgsOptionDescriptor { - /** - * Type of argument. - */ - type: ParseArgsOptionsType; - /** - * Whether this option can be provided multiple times. - * If `true`, all values will be collected in an array. - * If `false`, values for the option are last-wins. - * @default false. - */ - multiple?: boolean | undefined; - /** - * A single character alias for the option. - */ - short?: string | undefined; - /** - * The value to assign to - * the option if it does not appear in the arguments to be parsed. The value - * must match the type specified by the `type` property. If `multiple` is - * `true`, it must be an array. No default value is applied when the option - * does appear in the arguments to be parsed, even if the provided value - * is falsy. - * @since v18.11.0 - */ - default?: string | boolean | string[] | boolean[] | undefined; - } - export interface ParseArgsOptionsConfig { - [longOption: string]: ParseArgsOptionDescriptor; - } - export interface ParseArgsConfig { - /** - * Array of argument strings. - */ - args?: readonly string[] | undefined; - /** - * Used to describe arguments known to the parser. - */ - options?: ParseArgsOptionsConfig | undefined; - /** - * Should an error be thrown when unknown arguments are encountered, - * or when arguments are passed that do not match the `type` configured in `options`. - * @default true - */ - strict?: boolean | undefined; - /** - * Whether this command accepts positional arguments. - */ - allowPositionals?: boolean | undefined; - /** - * If `true`, allows explicitly setting boolean options to `false` by prefixing the option name with `--no-`. - * @default false - * @since v22.4.0 - */ - allowNegative?: boolean | undefined; - /** - * Return the parsed tokens. This is useful for extending the built-in behavior, - * from adding additional checks through to reprocessing the tokens in different ways. - * @default false - */ - tokens?: boolean | undefined; - } - /* - IfDefaultsTrue and IfDefaultsFalse are helpers to handle default values for missing boolean properties. - TypeScript does not have exact types for objects: https://github.com/microsoft/TypeScript/issues/12936 - This means it is impossible to distinguish between "field X is definitely not present" and "field X may or may not be present". - But we expect users to generally provide their config inline or `as const`, which means TS will always know whether a given field is present. - So this helper treats "not definitely present" (i.e., not `extends boolean`) as being "definitely not present", i.e. it should have its default value. - This is technically incorrect but is a much nicer UX for the common case. - The IfDefaultsTrue version is for things which default to true; the IfDefaultsFalse version is for things which default to false. - */ - type IfDefaultsTrue = T extends true ? IfTrue - : T extends false ? IfFalse - : IfTrue; - // we put the `extends false` condition first here because `undefined` compares like `any` when `strictNullChecks: false` - type IfDefaultsFalse = T extends false ? IfFalse - : T extends true ? IfTrue - : IfFalse; - type ExtractOptionValue = IfDefaultsTrue< - T["strict"], - O["type"] extends "string" ? string : O["type"] extends "boolean" ? boolean : string | boolean, - string | boolean - >; - type ApplyOptionalModifiers> = ( - & { -readonly [LongOption in keyof O]?: V[LongOption] } - & { [LongOption in keyof O as O[LongOption]["default"] extends {} ? LongOption : never]: V[LongOption] } - ) extends infer P ? { [K in keyof P]: P[K] } : never; // resolve intersection to object - type ParsedValues = - & IfDefaultsTrue - & (T["options"] extends ParseArgsOptionsConfig ? ApplyOptionalModifiers< - T["options"], - { - [LongOption in keyof T["options"]]: IfDefaultsFalse< - T["options"][LongOption]["multiple"], - Array>, - ExtractOptionValue - >; - } - > - : {}); - type ParsedPositionals = IfDefaultsTrue< - T["strict"], - IfDefaultsFalse, - IfDefaultsTrue - >; - type PreciseTokenForOptions< - K extends string, - O extends ParseArgsOptionDescriptor, - > = O["type"] extends "string" ? { - kind: "option"; - index: number; - name: K; - rawName: string; - value: string; - inlineValue: boolean; - } - : O["type"] extends "boolean" ? { - kind: "option"; - index: number; - name: K; - rawName: string; - value: undefined; - inlineValue: undefined; - } - : OptionToken & { name: K }; - type TokenForOptions< - T extends ParseArgsConfig, - K extends keyof T["options"] = keyof T["options"], - > = K extends unknown - ? T["options"] extends ParseArgsOptionsConfig ? PreciseTokenForOptions - : OptionToken - : never; - type ParsedOptionToken = IfDefaultsTrue, OptionToken>; - type ParsedPositionalToken = IfDefaultsTrue< - T["strict"], - IfDefaultsFalse, - IfDefaultsTrue - >; - type ParsedTokens = Array< - ParsedOptionToken | ParsedPositionalToken | { kind: "option-terminator"; index: number } - >; - type PreciseParsedResults = IfDefaultsFalse< - T["tokens"], - { - values: ParsedValues; - positionals: ParsedPositionals; - tokens: ParsedTokens; - }, - { - values: ParsedValues; - positionals: ParsedPositionals; - } - >; - type OptionToken = - | { kind: "option"; index: number; name: string; rawName: string; value: string; inlineValue: boolean } - | { - kind: "option"; - index: number; - name: string; - rawName: string; - value: undefined; - inlineValue: undefined; - }; - type Token = - | OptionToken - | { kind: "positional"; index: number; value: string } - | { kind: "option-terminator"; index: number }; - // If ParseArgsConfig extends T, then the user passed config constructed elsewhere. - // So we can't rely on the `"not definitely present" implies "definitely not present"` assumption mentioned above. - type ParsedResults = ParseArgsConfig extends T ? { - values: { - [longOption: string]: undefined | string | boolean | Array; - }; - positionals: string[]; - tokens?: Token[]; - } - : PreciseParsedResults; - /** - * An implementation of [the MIMEType class](https://bmeck.github.io/node-proposal-mime-api/). - * - * In accordance with browser conventions, all properties of `MIMEType` objects - * are implemented as getters and setters on the class prototype, rather than as - * data properties on the object itself. - * - * A MIME string is a structured string containing multiple meaningful - * components. When parsed, a `MIMEType` object is returned containing - * properties for each of these components. - * @since v19.1.0, v18.13.0 - */ - export class MIMEType { - /** - * Creates a new MIMEType object by parsing the input. - * - * A `TypeError` will be thrown if the `input` is not a valid MIME. - * Note that an effort will be made to coerce the given values into strings. - * @param input The input MIME to parse. - */ - constructor(input: string | { toString: () => string }); - /** - * Gets and sets the type portion of the MIME. - * - * ```js - * import { MIMEType } from 'node:util'; - * - * const myMIME = new MIMEType('text/javascript'); - * console.log(myMIME.type); - * // Prints: text - * myMIME.type = 'application'; - * console.log(myMIME.type); - * // Prints: application - * console.log(String(myMIME)); - * // Prints: application/javascript - * ``` - */ - type: string; - /** - * Gets and sets the subtype portion of the MIME. - * - * ```js - * import { MIMEType } from 'node:util'; - * - * const myMIME = new MIMEType('text/ecmascript'); - * console.log(myMIME.subtype); - * // Prints: ecmascript - * myMIME.subtype = 'javascript'; - * console.log(myMIME.subtype); - * // Prints: javascript - * console.log(String(myMIME)); - * // Prints: text/javascript - * ``` - */ - subtype: string; - /** - * Gets the essence of the MIME. This property is read only. - * Use `mime.type` or `mime.subtype` to alter the MIME. - * - * ```js - * import { MIMEType } from 'node:util'; - * - * const myMIME = new MIMEType('text/javascript;key=value'); - * console.log(myMIME.essence); - * // Prints: text/javascript - * myMIME.type = 'application'; - * console.log(myMIME.essence); - * // Prints: application/javascript - * console.log(String(myMIME)); - * // Prints: application/javascript;key=value - * ``` - */ - readonly essence: string; - /** - * Gets the `MIMEParams` object representing the - * parameters of the MIME. This property is read-only. See `MIMEParams` documentation for details. - */ - readonly params: MIMEParams; - /** - * The `toString()` method on the `MIMEType` object returns the serialized MIME. - * - * Because of the need for standard compliance, this method does not allow users - * to customize the serialization process of the MIME. - */ - toString(): string; - } - /** - * The `MIMEParams` API provides read and write access to the parameters of a `MIMEType`. - * @since v19.1.0, v18.13.0 - */ - export class MIMEParams { - /** - * Remove all name-value pairs whose name is `name`. - */ - delete(name: string): void; - /** - * Returns an iterator over each of the name-value pairs in the parameters. - * Each item of the iterator is a JavaScript `Array`. The first item of the array - * is the `name`, the second item of the array is the `value`. - */ - entries(): NodeJS.Iterator<[name: string, value: string]>; - /** - * Returns the value of the first name-value pair whose name is `name`. If there - * are no such pairs, `null` is returned. - * @return or `null` if there is no name-value pair with the given `name`. - */ - get(name: string): string | null; - /** - * Returns `true` if there is at least one name-value pair whose name is `name`. - */ - has(name: string): boolean; - /** - * Returns an iterator over the names of each name-value pair. - * - * ```js - * import { MIMEType } from 'node:util'; - * - * const { params } = new MIMEType('text/plain;foo=0;bar=1'); - * for (const name of params.keys()) { - * console.log(name); - * } - * // Prints: - * // foo - * // bar - * ``` - */ - keys(): NodeJS.Iterator; - /** - * Sets the value in the `MIMEParams` object associated with `name` to `value`. If there are any pre-existing name-value pairs whose names are `name`, - * set the first such pair's value to `value`. - * - * ```js - * import { MIMEType } from 'node:util'; - * - * const { params } = new MIMEType('text/plain;foo=0;bar=1'); - * params.set('foo', 'def'); - * params.set('baz', 'xyz'); - * console.log(params.toString()); - * // Prints: foo=def;bar=1;baz=xyz - * ``` - */ - set(name: string, value: string): void; - /** - * Returns an iterator over the values of each name-value pair. - */ - values(): NodeJS.Iterator; - /** - * Returns an iterator over each of the name-value pairs in the parameters. - */ - [Symbol.iterator](): NodeJS.Iterator<[name: string, value: string]>; - } - // #region web types - export interface TextDecodeOptions { - stream?: boolean; - } - export interface TextDecoderCommon { - readonly encoding: string; - readonly fatal: boolean; - readonly ignoreBOM: boolean; - } - export interface TextDecoderOptions { - fatal?: boolean; - ignoreBOM?: boolean; - } - export interface TextEncoderCommon { - readonly encoding: string; - } - export interface TextEncoderEncodeIntoResult { - read: number; - written: number; - } - export interface TextDecoder extends TextDecoderCommon { - decode(input?: NodeJS.AllowSharedBufferSource, options?: TextDecodeOptions): string; - } - export var TextDecoder: { - prototype: TextDecoder; - new(label?: string, options?: TextDecoderOptions): TextDecoder; - }; - export interface TextEncoder extends TextEncoderCommon { - encode(input?: string): NodeJS.NonSharedUint8Array; - encodeInto(source: string, destination: Uint8Array): TextEncoderEncodeIntoResult; - } - export var TextEncoder: { - prototype: TextEncoder; - new(): TextEncoder; - }; - // #endregion -} -declare module "util" { - export * from "node:util"; -} diff --git a/PBandGraphScaffold/node_modules/@types/node/util/types.d.ts b/PBandGraphScaffold/node_modules/@types/node/util/types.d.ts deleted file mode 100644 index 818825b..0000000 --- a/PBandGraphScaffold/node_modules/@types/node/util/types.d.ts +++ /dev/null @@ -1,558 +0,0 @@ -declare module "node:util/types" { - import { KeyObject, webcrypto } from "node:crypto"; - /** - * Returns `true` if the value is a built-in [`ArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer) or - * [`SharedArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer) instance. - * - * See also `util.types.isArrayBuffer()` and `util.types.isSharedArrayBuffer()`. - * - * ```js - * util.types.isAnyArrayBuffer(new ArrayBuffer()); // Returns true - * util.types.isAnyArrayBuffer(new SharedArrayBuffer()); // Returns true - * ``` - * @since v10.0.0 - */ - function isAnyArrayBuffer(object: unknown): object is ArrayBufferLike; - /** - * Returns `true` if the value is an `arguments` object. - * - * ```js - * function foo() { - * util.types.isArgumentsObject(arguments); // Returns true - * } - * ``` - * @since v10.0.0 - */ - function isArgumentsObject(object: unknown): object is IArguments; - /** - * Returns `true` if the value is a built-in [`ArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer) instance. - * This does _not_ include [`SharedArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer) instances. Usually, it is - * desirable to test for both; See `util.types.isAnyArrayBuffer()` for that. - * - * ```js - * util.types.isArrayBuffer(new ArrayBuffer()); // Returns true - * util.types.isArrayBuffer(new SharedArrayBuffer()); // Returns false - * ``` - * @since v10.0.0 - */ - function isArrayBuffer(object: unknown): object is ArrayBuffer; - /** - * Returns `true` if the value is an instance of one of the [`ArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer) views, such as typed - * array objects or [`DataView`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView). Equivalent to - * [`ArrayBuffer.isView()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/isView). - * - * ```js - * util.types.isArrayBufferView(new Int8Array()); // true - * util.types.isArrayBufferView(Buffer.from('hello world')); // true - * util.types.isArrayBufferView(new DataView(new ArrayBuffer(16))); // true - * util.types.isArrayBufferView(new ArrayBuffer()); // false - * ``` - * @since v10.0.0 - */ - function isArrayBufferView(object: unknown): object is NodeJS.ArrayBufferView; - /** - * Returns `true` if the value is an [async function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function). - * This only reports back what the JavaScript engine is seeing; - * in particular, the return value may not match the original source code if - * a transpilation tool was used. - * - * ```js - * util.types.isAsyncFunction(function foo() {}); // Returns false - * util.types.isAsyncFunction(async function foo() {}); // Returns true - * ``` - * @since v10.0.0 - */ - function isAsyncFunction(object: unknown): boolean; - /** - * Returns `true` if the value is a `BigInt64Array` instance. - * - * ```js - * util.types.isBigInt64Array(new BigInt64Array()); // Returns true - * util.types.isBigInt64Array(new BigUint64Array()); // Returns false - * ``` - * @since v10.0.0 - */ - function isBigInt64Array(value: unknown): value is BigInt64Array; - /** - * Returns `true` if the value is a BigInt object, e.g. created - * by `Object(BigInt(123))`. - * - * ```js - * util.types.isBigIntObject(Object(BigInt(123))); // Returns true - * util.types.isBigIntObject(BigInt(123)); // Returns false - * util.types.isBigIntObject(123); // Returns false - * ``` - * @since v10.4.0 - */ - function isBigIntObject(object: unknown): object is BigInt; - /** - * Returns `true` if the value is a `BigUint64Array` instance. - * - * ```js - * util.types.isBigUint64Array(new BigInt64Array()); // Returns false - * util.types.isBigUint64Array(new BigUint64Array()); // Returns true - * ``` - * @since v10.0.0 - */ - function isBigUint64Array(value: unknown): value is BigUint64Array; - /** - * Returns `true` if the value is a boolean object, e.g. created - * by `new Boolean()`. - * - * ```js - * util.types.isBooleanObject(false); // Returns false - * util.types.isBooleanObject(true); // Returns false - * util.types.isBooleanObject(new Boolean(false)); // Returns true - * util.types.isBooleanObject(new Boolean(true)); // Returns true - * util.types.isBooleanObject(Boolean(false)); // Returns false - * util.types.isBooleanObject(Boolean(true)); // Returns false - * ``` - * @since v10.0.0 - */ - function isBooleanObject(object: unknown): object is Boolean; - /** - * Returns `true` if the value is any boxed primitive object, e.g. created - * by `new Boolean()`, `new String()` or `Object(Symbol())`. - * - * For example: - * - * ```js - * util.types.isBoxedPrimitive(false); // Returns false - * util.types.isBoxedPrimitive(new Boolean(false)); // Returns true - * util.types.isBoxedPrimitive(Symbol('foo')); // Returns false - * util.types.isBoxedPrimitive(Object(Symbol('foo'))); // Returns true - * util.types.isBoxedPrimitive(Object(BigInt(5))); // Returns true - * ``` - * @since v10.11.0 - */ - function isBoxedPrimitive(object: unknown): object is String | Number | BigInt | Boolean | Symbol; - /** - * Returns `true` if the value is a built-in [`DataView`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView) instance. - * - * ```js - * const ab = new ArrayBuffer(20); - * util.types.isDataView(new DataView(ab)); // Returns true - * util.types.isDataView(new Float64Array()); // Returns false - * ``` - * - * See also [`ArrayBuffer.isView()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/isView). - * @since v10.0.0 - */ - function isDataView(object: unknown): object is DataView; - /** - * Returns `true` if the value is a built-in [`Date`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) instance. - * - * ```js - * util.types.isDate(new Date()); // Returns true - * ``` - * @since v10.0.0 - */ - function isDate(object: unknown): object is Date; - /** - * Returns `true` if the value is a native `External` value. - * - * A native `External` value is a special type of object that contains a - * raw C++ pointer (`void*`) for access from native code, and has no other - * properties. Such objects are created either by Node.js internals or native - * addons. In JavaScript, they are - * [frozen](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/freeze) objects with a - * `null` prototype. - * - * ```c - * #include - * #include - * napi_value result; - * static napi_value MyNapi(napi_env env, napi_callback_info info) { - * int* raw = (int*) malloc(1024); - * napi_status status = napi_create_external(env, (void*) raw, NULL, NULL, &result); - * if (status != napi_ok) { - * napi_throw_error(env, NULL, "napi_create_external failed"); - * return NULL; - * } - * return result; - * } - * ... - * DECLARE_NAPI_PROPERTY("myNapi", MyNapi) - * ... - * ``` - * - * ```js - * import native from 'napi_addon.node'; - * import { types } from 'node:util'; - * - * const data = native.myNapi(); - * types.isExternal(data); // returns true - * types.isExternal(0); // returns false - * types.isExternal(new String('foo')); // returns false - * ``` - * - * For further information on `napi_create_external`, refer to - * [`napi_create_external()`](https://nodejs.org/docs/latest-v25.x/api/n-api.html#napi_create_external). - * @since v10.0.0 - */ - function isExternal(object: unknown): boolean; - /** - * Returns `true` if the value is a built-in [`Float16Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float16Array) instance. - * - * ```js - * util.types.isFloat16Array(new ArrayBuffer()); // Returns false - * util.types.isFloat16Array(new Float16Array()); // Returns true - * util.types.isFloat16Array(new Float32Array()); // Returns false - * ``` - * @since v24.0.0 - */ - function isFloat16Array(object: unknown): object is Float16Array; - /** - * Returns `true` if the value is a built-in [`Float32Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float32Array) instance. - * - * ```js - * util.types.isFloat32Array(new ArrayBuffer()); // Returns false - * util.types.isFloat32Array(new Float32Array()); // Returns true - * util.types.isFloat32Array(new Float64Array()); // Returns false - * ``` - * @since v10.0.0 - */ - function isFloat32Array(object: unknown): object is Float32Array; - /** - * Returns `true` if the value is a built-in [`Float64Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float64Array) instance. - * - * ```js - * util.types.isFloat64Array(new ArrayBuffer()); // Returns false - * util.types.isFloat64Array(new Uint8Array()); // Returns false - * util.types.isFloat64Array(new Float64Array()); // Returns true - * ``` - * @since v10.0.0 - */ - function isFloat64Array(object: unknown): object is Float64Array; - /** - * Returns `true` if the value is a generator function. - * This only reports back what the JavaScript engine is seeing; - * in particular, the return value may not match the original source code if - * a transpilation tool was used. - * - * ```js - * util.types.isGeneratorFunction(function foo() {}); // Returns false - * util.types.isGeneratorFunction(function* foo() {}); // Returns true - * ``` - * @since v10.0.0 - */ - function isGeneratorFunction(object: unknown): object is GeneratorFunction; - /** - * Returns `true` if the value is a generator object as returned from a - * built-in generator function. - * This only reports back what the JavaScript engine is seeing; - * in particular, the return value may not match the original source code if - * a transpilation tool was used. - * - * ```js - * function* foo() {} - * const generator = foo(); - * util.types.isGeneratorObject(generator); // Returns true - * ``` - * @since v10.0.0 - */ - function isGeneratorObject(object: unknown): object is Generator; - /** - * Returns `true` if the value is a built-in [`Int8Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int8Array) instance. - * - * ```js - * util.types.isInt8Array(new ArrayBuffer()); // Returns false - * util.types.isInt8Array(new Int8Array()); // Returns true - * util.types.isInt8Array(new Float64Array()); // Returns false - * ``` - * @since v10.0.0 - */ - function isInt8Array(object: unknown): object is Int8Array; - /** - * Returns `true` if the value is a built-in [`Int16Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int16Array) instance. - * - * ```js - * util.types.isInt16Array(new ArrayBuffer()); // Returns false - * util.types.isInt16Array(new Int16Array()); // Returns true - * util.types.isInt16Array(new Float64Array()); // Returns false - * ``` - * @since v10.0.0 - */ - function isInt16Array(object: unknown): object is Int16Array; - /** - * Returns `true` if the value is a built-in [`Int32Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int32Array) instance. - * - * ```js - * util.types.isInt32Array(new ArrayBuffer()); // Returns false - * util.types.isInt32Array(new Int32Array()); // Returns true - * util.types.isInt32Array(new Float64Array()); // Returns false - * ``` - * @since v10.0.0 - */ - function isInt32Array(object: unknown): object is Int32Array; - /** - * Returns `true` if the value is a built-in [`Map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map) instance. - * - * ```js - * util.types.isMap(new Map()); // Returns true - * ``` - * @since v10.0.0 - */ - function isMap( - object: T | {}, - ): object is T extends ReadonlyMap ? (unknown extends T ? never : ReadonlyMap) - : Map; - /** - * Returns `true` if the value is an iterator returned for a built-in [`Map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map) instance. - * - * ```js - * const map = new Map(); - * util.types.isMapIterator(map.keys()); // Returns true - * util.types.isMapIterator(map.values()); // Returns true - * util.types.isMapIterator(map.entries()); // Returns true - * util.types.isMapIterator(map[Symbol.iterator]()); // Returns true - * ``` - * @since v10.0.0 - */ - function isMapIterator(object: unknown): boolean; - /** - * Returns `true` if the value is an instance of a [Module Namespace Object](https://tc39.github.io/ecma262/#sec-module-namespace-exotic-objects). - * - * ```js - * import * as ns from './a.js'; - * - * util.types.isModuleNamespaceObject(ns); // Returns true - * ``` - * @since v10.0.0 - */ - function isModuleNamespaceObject(value: unknown): boolean; - /** - * Returns `true` if the value was returned by the constructor of a - * [built-in `Error` type](https://tc39.es/ecma262/#sec-error-objects). - * - * ```js - * console.log(util.types.isNativeError(new Error())); // true - * console.log(util.types.isNativeError(new TypeError())); // true - * console.log(util.types.isNativeError(new RangeError())); // true - * ``` - * - * Subclasses of the native error types are also native errors: - * - * ```js - * class MyError extends Error {} - * console.log(util.types.isNativeError(new MyError())); // true - * ``` - * - * A value being `instanceof` a native error class is not equivalent to `isNativeError()` - * returning `true` for that value. `isNativeError()` returns `true` for errors - * which come from a different [realm](https://tc39.es/ecma262/#realm) while `instanceof Error` returns `false` - * for these errors: - * - * ```js - * import { createContext, runInContext } from 'node:vm'; - * import { types } from 'node:util'; - * - * const context = createContext({}); - * const myError = runInContext('new Error()', context); - * console.log(types.isNativeError(myError)); // true - * console.log(myError instanceof Error); // false - * ``` - * - * Conversely, `isNativeError()` returns `false` for all objects which were not - * returned by the constructor of a native error. That includes values - * which are `instanceof` native errors: - * - * ```js - * const myError = { __proto__: Error.prototype }; - * console.log(util.types.isNativeError(myError)); // false - * console.log(myError instanceof Error); // true - * ``` - * @since v10.0.0 - * @deprecated The `util.types.isNativeError` API is deprecated. Please use `Error.isError` instead. - */ - function isNativeError(object: unknown): object is Error; - /** - * Returns `true` if the value is a number object, e.g. created - * by `new Number()`. - * - * ```js - * util.types.isNumberObject(0); // Returns false - * util.types.isNumberObject(new Number(0)); // Returns true - * ``` - * @since v10.0.0 - */ - function isNumberObject(object: unknown): object is Number; - /** - * Returns `true` if the value is a built-in [`Promise`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise). - * - * ```js - * util.types.isPromise(Promise.resolve(42)); // Returns true - * ``` - * @since v10.0.0 - */ - function isPromise(object: unknown): object is Promise; - /** - * Returns `true` if the value is a [`Proxy`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy) instance. - * - * ```js - * const target = {}; - * const proxy = new Proxy(target, {}); - * util.types.isProxy(target); // Returns false - * util.types.isProxy(proxy); // Returns true - * ``` - * @since v10.0.0 - */ - function isProxy(object: unknown): boolean; - /** - * Returns `true` if the value is a regular expression object. - * - * ```js - * util.types.isRegExp(/abc/); // Returns true - * util.types.isRegExp(new RegExp('abc')); // Returns true - * ``` - * @since v10.0.0 - */ - function isRegExp(object: unknown): object is RegExp; - /** - * Returns `true` if the value is a built-in [`Set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set) instance. - * - * ```js - * util.types.isSet(new Set()); // Returns true - * ``` - * @since v10.0.0 - */ - function isSet( - object: T | {}, - ): object is T extends ReadonlySet ? (unknown extends T ? never : ReadonlySet) : Set; - /** - * Returns `true` if the value is an iterator returned for a built-in [`Set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set) instance. - * - * ```js - * const set = new Set(); - * util.types.isSetIterator(set.keys()); // Returns true - * util.types.isSetIterator(set.values()); // Returns true - * util.types.isSetIterator(set.entries()); // Returns true - * util.types.isSetIterator(set[Symbol.iterator]()); // Returns true - * ``` - * @since v10.0.0 - */ - function isSetIterator(object: unknown): boolean; - /** - * Returns `true` if the value is a built-in [`SharedArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer) instance. - * This does _not_ include [`ArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer) instances. Usually, it is - * desirable to test for both; See `util.types.isAnyArrayBuffer()` for that. - * - * ```js - * util.types.isSharedArrayBuffer(new ArrayBuffer()); // Returns false - * util.types.isSharedArrayBuffer(new SharedArrayBuffer()); // Returns true - * ``` - * @since v10.0.0 - */ - function isSharedArrayBuffer(object: unknown): object is SharedArrayBuffer; - /** - * Returns `true` if the value is a string object, e.g. created - * by `new String()`. - * - * ```js - * util.types.isStringObject('foo'); // Returns false - * util.types.isStringObject(new String('foo')); // Returns true - * ``` - * @since v10.0.0 - */ - function isStringObject(object: unknown): object is String; - /** - * Returns `true` if the value is a symbol object, created - * by calling `Object()` on a `Symbol` primitive. - * - * ```js - * const symbol = Symbol('foo'); - * util.types.isSymbolObject(symbol); // Returns false - * util.types.isSymbolObject(Object(symbol)); // Returns true - * ``` - * @since v10.0.0 - */ - function isSymbolObject(object: unknown): object is Symbol; - /** - * Returns `true` if the value is a built-in [`TypedArray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray) instance. - * - * ```js - * util.types.isTypedArray(new ArrayBuffer()); // Returns false - * util.types.isTypedArray(new Uint8Array()); // Returns true - * util.types.isTypedArray(new Float64Array()); // Returns true - * ``` - * - * See also [`ArrayBuffer.isView()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/isView). - * @since v10.0.0 - */ - function isTypedArray(object: unknown): object is NodeJS.TypedArray; - /** - * Returns `true` if the value is a built-in [`Uint8Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) instance. - * - * ```js - * util.types.isUint8Array(new ArrayBuffer()); // Returns false - * util.types.isUint8Array(new Uint8Array()); // Returns true - * util.types.isUint8Array(new Float64Array()); // Returns false - * ``` - * @since v10.0.0 - */ - function isUint8Array(object: unknown): object is Uint8Array; - /** - * Returns `true` if the value is a built-in [`Uint8ClampedArray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8ClampedArray) instance. - * - * ```js - * util.types.isUint8ClampedArray(new ArrayBuffer()); // Returns false - * util.types.isUint8ClampedArray(new Uint8ClampedArray()); // Returns true - * util.types.isUint8ClampedArray(new Float64Array()); // Returns false - * ``` - * @since v10.0.0 - */ - function isUint8ClampedArray(object: unknown): object is Uint8ClampedArray; - /** - * Returns `true` if the value is a built-in [`Uint16Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint16Array) instance. - * - * ```js - * util.types.isUint16Array(new ArrayBuffer()); // Returns false - * util.types.isUint16Array(new Uint16Array()); // Returns true - * util.types.isUint16Array(new Float64Array()); // Returns false - * ``` - * @since v10.0.0 - */ - function isUint16Array(object: unknown): object is Uint16Array; - /** - * Returns `true` if the value is a built-in [`Uint32Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint32Array) instance. - * - * ```js - * util.types.isUint32Array(new ArrayBuffer()); // Returns false - * util.types.isUint32Array(new Uint32Array()); // Returns true - * util.types.isUint32Array(new Float64Array()); // Returns false - * ``` - * @since v10.0.0 - */ - function isUint32Array(object: unknown): object is Uint32Array; - /** - * Returns `true` if the value is a built-in [`WeakMap`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakMap) instance. - * - * ```js - * util.types.isWeakMap(new WeakMap()); // Returns true - * ``` - * @since v10.0.0 - */ - function isWeakMap(object: unknown): object is WeakMap; - /** - * Returns `true` if the value is a built-in [`WeakSet`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakSet) instance. - * - * ```js - * util.types.isWeakSet(new WeakSet()); // Returns true - * ``` - * @since v10.0.0 - */ - function isWeakSet(object: unknown): object is WeakSet; - /** - * Returns `true` if `value` is a `KeyObject`, `false` otherwise. - * @since v16.2.0 - */ - function isKeyObject(object: unknown): object is KeyObject; - /** - * Returns `true` if `value` is a `CryptoKey`, `false` otherwise. - * @since v16.2.0 - */ - function isCryptoKey(object: unknown): object is webcrypto.CryptoKey; -} -declare module "util/types" { - export * from "node:util/types"; -} diff --git a/PBandGraphScaffold/node_modules/@types/node/v8.d.ts b/PBandGraphScaffold/node_modules/@types/node/v8.d.ts deleted file mode 100644 index 9216587..0000000 --- a/PBandGraphScaffold/node_modules/@types/node/v8.d.ts +++ /dev/null @@ -1,979 +0,0 @@ -/** - * The `node:v8` module exposes APIs that are specific to the version of [V8](https://developers.google.com/v8/) built into the Node.js binary. It can be accessed using: - * - * ```js - * import v8 from 'node:v8'; - * ``` - * @see [source](https://github.com/nodejs/node/blob/v25.x/lib/v8.js) - */ -declare module "node:v8" { - import { NonSharedBuffer } from "node:buffer"; - import { Readable } from "node:stream"; - interface HeapSpaceInfo { - space_name: string; - space_size: number; - space_used_size: number; - space_available_size: number; - physical_space_size: number; - } - // ** Signifies if the --zap_code_space option is enabled or not. 1 == enabled, 0 == disabled. */ - type DoesZapCodeSpaceFlag = 0 | 1; - interface HeapInfo { - total_heap_size: number; - total_heap_size_executable: number; - total_physical_size: number; - total_available_size: number; - used_heap_size: number; - heap_size_limit: number; - malloced_memory: number; - peak_malloced_memory: number; - does_zap_garbage: DoesZapCodeSpaceFlag; - number_of_native_contexts: number; - number_of_detached_contexts: number; - total_global_handles_size: number; - used_global_handles_size: number; - external_memory: number; - } - interface HeapCodeStatistics { - code_and_metadata_size: number; - bytecode_and_metadata_size: number; - external_script_source_size: number; - } - interface HeapSnapshotOptions { - /** - * If true, expose internals in the heap snapshot. - * @default false - */ - exposeInternals?: boolean | undefined; - /** - * If true, expose numeric values in artificial fields. - * @default false - */ - exposeNumericValues?: boolean | undefined; - } - /** - * Returns an integer representing a version tag derived from the V8 version, - * command-line flags, and detected CPU features. This is useful for determining - * whether a `vm.Script` `cachedData` buffer is compatible with this instance - * of V8. - * - * ```js - * console.log(v8.cachedDataVersionTag()); // 3947234607 - * // The value returned by v8.cachedDataVersionTag() is derived from the V8 - * // version, command-line flags, and detected CPU features. Test that the value - * // does indeed update when flags are toggled. - * v8.setFlagsFromString('--allow_natives_syntax'); - * console.log(v8.cachedDataVersionTag()); // 183726201 - * ``` - * @since v8.0.0 - */ - function cachedDataVersionTag(): number; - /** - * Returns an object with the following properties: - * - * `does_zap_garbage` is a 0/1 boolean, which signifies whether the `--zap_code_space` option is enabled or not. This makes V8 overwrite heap - * garbage with a bit pattern. The RSS footprint (resident set size) gets bigger - * because it continuously touches all heap pages and that makes them less likely - * to get swapped out by the operating system. - * - * `number_of_native_contexts` The value of native\_context is the number of the - * top-level contexts currently active. Increase of this number over time indicates - * a memory leak. - * - * `number_of_detached_contexts` The value of detached\_context is the number - * of contexts that were detached and not yet garbage collected. This number - * being non-zero indicates a potential memory leak. - * - * `total_global_handles_size` The value of total\_global\_handles\_size is the - * total memory size of V8 global handles. - * - * `used_global_handles_size` The value of used\_global\_handles\_size is the - * used memory size of V8 global handles. - * - * `external_memory` The value of external\_memory is the memory size of array - * buffers and external strings. - * - * ```js - * { - * total_heap_size: 7326976, - * total_heap_size_executable: 4194304, - * total_physical_size: 7326976, - * total_available_size: 1152656, - * used_heap_size: 3476208, - * heap_size_limit: 1535115264, - * malloced_memory: 16384, - * peak_malloced_memory: 1127496, - * does_zap_garbage: 0, - * number_of_native_contexts: 1, - * number_of_detached_contexts: 0, - * total_global_handles_size: 8192, - * used_global_handles_size: 3296, - * external_memory: 318824 - * } - * ``` - * @since v1.0.0 - */ - function getHeapStatistics(): HeapInfo; - /** - * It returns an object with a structure similar to the - * [`cppgc::HeapStatistics`](https://v8docs.nodesource.com/node-22.4/d7/d51/heap-statistics_8h_source.html) - * object. See the [V8 documentation](https://v8docs.nodesource.com/node-22.4/df/d2f/structcppgc_1_1_heap_statistics.html) - * for more information about the properties of the object. - * - * ```js - * // Detailed - * ({ - * committed_size_bytes: 131072, - * resident_size_bytes: 131072, - * used_size_bytes: 152, - * space_statistics: [ - * { - * name: 'NormalPageSpace0', - * committed_size_bytes: 0, - * resident_size_bytes: 0, - * used_size_bytes: 0, - * page_stats: [{}], - * free_list_stats: {}, - * }, - * { - * name: 'NormalPageSpace1', - * committed_size_bytes: 131072, - * resident_size_bytes: 131072, - * used_size_bytes: 152, - * page_stats: [{}], - * free_list_stats: {}, - * }, - * { - * name: 'NormalPageSpace2', - * committed_size_bytes: 0, - * resident_size_bytes: 0, - * used_size_bytes: 0, - * page_stats: [{}], - * free_list_stats: {}, - * }, - * { - * name: 'NormalPageSpace3', - * committed_size_bytes: 0, - * resident_size_bytes: 0, - * used_size_bytes: 0, - * page_stats: [{}], - * free_list_stats: {}, - * }, - * { - * name: 'LargePageSpace', - * committed_size_bytes: 0, - * resident_size_bytes: 0, - * used_size_bytes: 0, - * page_stats: [{}], - * free_list_stats: {}, - * }, - * ], - * type_names: [], - * detail_level: 'detailed', - * }); - * ``` - * - * ```js - * // Brief - * ({ - * committed_size_bytes: 131072, - * resident_size_bytes: 131072, - * used_size_bytes: 128864, - * space_statistics: [], - * type_names: [], - * detail_level: 'brief', - * }); - * ``` - * @since v22.15.0 - * @param detailLevel **Default:** `'detailed'`. Specifies the level of detail in the returned statistics. - * Accepted values are: - * * `'brief'`: Brief statistics contain only the top-level - * allocated and used - * memory statistics for the entire heap. - * * `'detailed'`: Detailed statistics also contain a break - * down per space and page, as well as freelist statistics - * and object type histograms. - */ - function getCppHeapStatistics(detailLevel?: "brief" | "detailed"): object; - /** - * Returns statistics about the V8 heap spaces, i.e. the segments which make up - * the V8 heap. Neither the ordering of heap spaces, nor the availability of a - * heap space can be guaranteed as the statistics are provided via the - * V8 [`GetHeapSpaceStatistics`](https://v8docs.nodesource.com/node-13.2/d5/dda/classv8_1_1_isolate.html#ac673576f24fdc7a33378f8f57e1d13a4) function and may change from one V8 version to the - * next. - * - * The value returned is an array of objects containing the following properties: - * - * ```json - * [ - * { - * "space_name": "new_space", - * "space_size": 2063872, - * "space_used_size": 951112, - * "space_available_size": 80824, - * "physical_space_size": 2063872 - * }, - * { - * "space_name": "old_space", - * "space_size": 3090560, - * "space_used_size": 2493792, - * "space_available_size": 0, - * "physical_space_size": 3090560 - * }, - * { - * "space_name": "code_space", - * "space_size": 1260160, - * "space_used_size": 644256, - * "space_available_size": 960, - * "physical_space_size": 1260160 - * }, - * { - * "space_name": "map_space", - * "space_size": 1094160, - * "space_used_size": 201608, - * "space_available_size": 0, - * "physical_space_size": 1094160 - * }, - * { - * "space_name": "large_object_space", - * "space_size": 0, - * "space_used_size": 0, - * "space_available_size": 1490980608, - * "physical_space_size": 0 - * } - * ] - * ``` - * @since v6.0.0 - */ - function getHeapSpaceStatistics(): HeapSpaceInfo[]; - /** - * The `v8.setFlagsFromString()` method can be used to programmatically set - * V8 command-line flags. This method should be used with care. Changing settings - * after the VM has started may result in unpredictable behavior, including - * crashes and data loss; or it may simply do nothing. - * - * The V8 options available for a version of Node.js may be determined by running `node --v8-options`. - * - * Usage: - * - * ```js - * // Print GC events to stdout for one minute. - * import v8 from 'node:v8'; - * v8.setFlagsFromString('--trace_gc'); - * setTimeout(() => { v8.setFlagsFromString('--notrace_gc'); }, 60e3); - * ``` - * @since v1.0.0 - */ - function setFlagsFromString(flags: string): void; - /** - * This is similar to the [`queryObjects()` console API](https://developer.chrome.com/docs/devtools/console/utilities#queryObjects-function) - * provided by the Chromium DevTools console. It can be used to search for objects that have the matching constructor on its prototype chain - * in the heap after a full garbage collection, which can be useful for memory leak regression tests. To avoid surprising results, users should - * avoid using this API on constructors whose implementation they don't control, or on constructors that can be invoked by other parties in the - * application. - * - * To avoid accidental leaks, this API does not return raw references to the objects found. By default, it returns the count of the objects - * found. If `options.format` is `'summary'`, it returns an array containing brief string representations for each object. The visibility provided - * in this API is similar to what the heap snapshot provides, while users can save the cost of serialization and parsing and directly filter the - * target objects during the search. - * - * Only objects created in the current execution context are included in the results. - * - * ```js - * import { queryObjects } from 'node:v8'; - * class A { foo = 'bar'; } - * console.log(queryObjects(A)); // 0 - * const a = new A(); - * console.log(queryObjects(A)); // 1 - * // [ "A { foo: 'bar' }" ] - * console.log(queryObjects(A, { format: 'summary' })); - * - * class B extends A { bar = 'qux'; } - * const b = new B(); - * console.log(queryObjects(B)); // 1 - * // [ "B { foo: 'bar', bar: 'qux' }" ] - * console.log(queryObjects(B, { format: 'summary' })); - * - * // Note that, when there are child classes inheriting from a constructor, - * // the constructor also shows up in the prototype chain of the child - * // classes's prototoype, so the child classes's prototoype would also be - * // included in the result. - * console.log(queryObjects(A)); // 3 - * // [ "B { foo: 'bar', bar: 'qux' }", 'A {}', "A { foo: 'bar' }" ] - * console.log(queryObjects(A, { format: 'summary' })); - * ``` - * @param ctor The constructor that can be used to search on the prototype chain in order to filter target objects in the heap. - * @since v20.13.0 - * @experimental - */ - function queryObjects(ctor: Function): number | string[]; - function queryObjects(ctor: Function, options: { format: "count" }): number; - function queryObjects(ctor: Function, options: { format: "summary" }): string[]; - /** - * Generates a snapshot of the current V8 heap and returns a Readable - * Stream that may be used to read the JSON serialized representation. - * This JSON stream format is intended to be used with tools such as - * Chrome DevTools. The JSON schema is undocumented and specific to the - * V8 engine. Therefore, the schema may change from one version of V8 to the next. - * - * Creating a heap snapshot requires memory about twice the size of the heap at - * the time the snapshot is created. This results in the risk of OOM killers - * terminating the process. - * - * Generating a snapshot is a synchronous operation which blocks the event loop - * for a duration depending on the heap size. - * - * ```js - * // Print heap snapshot to the console - * import v8 from 'node:v8'; - * const stream = v8.getHeapSnapshot(); - * stream.pipe(process.stdout); - * ``` - * @since v11.13.0 - * @return A Readable containing the V8 heap snapshot. - */ - function getHeapSnapshot(options?: HeapSnapshotOptions): Readable; - /** - * Generates a snapshot of the current V8 heap and writes it to a JSON - * file. This file is intended to be used with tools such as Chrome - * DevTools. The JSON schema is undocumented and specific to the V8 - * engine, and may change from one version of V8 to the next. - * - * A heap snapshot is specific to a single V8 isolate. When using `worker threads`, a heap snapshot generated from the main thread will - * not contain any information about the workers, and vice versa. - * - * Creating a heap snapshot requires memory about twice the size of the heap at - * the time the snapshot is created. This results in the risk of OOM killers - * terminating the process. - * - * Generating a snapshot is a synchronous operation which blocks the event loop - * for a duration depending on the heap size. - * - * ```js - * import { writeHeapSnapshot } from 'node:v8'; - * import { - * Worker, - * isMainThread, - * parentPort, - * } from 'node:worker_threads'; - * - * if (isMainThread) { - * const worker = new Worker(__filename); - * - * worker.once('message', (filename) => { - * console.log(`worker heapdump: ${filename}`); - * // Now get a heapdump for the main thread. - * console.log(`main thread heapdump: ${writeHeapSnapshot()}`); - * }); - * - * // Tell the worker to create a heapdump. - * worker.postMessage('heapdump'); - * } else { - * parentPort.once('message', (message) => { - * if (message === 'heapdump') { - * // Generate a heapdump for the worker - * // and return the filename to the parent. - * parentPort.postMessage(writeHeapSnapshot()); - * } - * }); - * } - * ``` - * @since v11.13.0 - * @param filename The file path where the V8 heap snapshot is to be saved. If not specified, a file name with the pattern `'Heap-${yyyymmdd}-${hhmmss}-${pid}-${thread_id}.heapsnapshot'` will be - * generated, where `{pid}` will be the PID of the Node.js process, `{thread_id}` will be `0` when `writeHeapSnapshot()` is called from the main Node.js thread or the id of a - * worker thread. - * @return The filename where the snapshot was saved. - */ - function writeHeapSnapshot(filename?: string, options?: HeapSnapshotOptions): string; - /** - * Get statistics about code and its metadata in the heap, see - * V8 [`GetHeapCodeAndMetadataStatistics`](https://v8docs.nodesource.com/node-13.2/d5/dda/classv8_1_1_isolate.html#a6079122af17612ef54ef3348ce170866) API. Returns an object with the - * following properties: - * - * ```js - * { - * code_and_metadata_size: 212208, - * bytecode_and_metadata_size: 161368, - * external_script_source_size: 1410794, - * cpu_profiler_metadata_size: 0, - * } - * ``` - * @since v12.8.0 - */ - function getHeapCodeStatistics(): HeapCodeStatistics; - /** - * @since v25.0.0 - */ - interface SyncCPUProfileHandle { - /** - * Stopping collecting the profile and return the profile data. - * @since v25.0.0 - */ - stop(): string; - /** - * Stopping collecting the profile and the profile will be discarded. - * @since v25.0.0 - */ - [Symbol.dispose](): void; - } - /** - * @since v24.8.0 - */ - interface CPUProfileHandle { - /** - * Stopping collecting the profile, then return a Promise that fulfills with an error or the - * profile data. - * @since v24.8.0 - */ - stop(): Promise; - /** - * Stopping collecting the profile and the profile will be discarded. - * @since v24.8.0 - */ - [Symbol.asyncDispose](): Promise; - } - /** - * @since v24.9.0 - */ - interface HeapProfileHandle { - /** - * Stopping collecting the profile, then return a Promise that fulfills with an error or the - * profile data. - * @since v24.9.0 - */ - stop(): Promise; - /** - * Stopping collecting the profile and the profile will be discarded. - * @since v24.9.0 - */ - [Symbol.asyncDispose](): Promise; - } - /** - * Starting a CPU profile then return a `SyncCPUProfileHandle` object. - * This API supports `using` syntax. - * - * ```js - * const handle = v8.startCpuProfile(); - * const profile = handle.stop(); - * console.log(profile); - * ``` - * @since v25.0.0 - */ - function startCPUProfile(): SyncCPUProfileHandle; - /** - * V8 only supports `Latin-1/ISO-8859-1` and `UTF16` as the underlying representation of a string. - * If the `content` uses `Latin-1/ISO-8859-1` as the underlying representation, this function will return true; - * otherwise, it returns false. - * - * If this method returns false, that does not mean that the string contains some characters not in `Latin-1/ISO-8859-1`. - * Sometimes a `Latin-1` string may also be represented as `UTF16`. - * - * ```js - * const { isStringOneByteRepresentation } = require('node:v8'); - * - * const Encoding = { - * latin1: 1, - * utf16le: 2, - * }; - * const buffer = Buffer.alloc(100); - * function writeString(input) { - * if (isStringOneByteRepresentation(input)) { - * buffer.writeUint8(Encoding.latin1); - * buffer.writeUint32LE(input.length, 1); - * buffer.write(input, 5, 'latin1'); - * } else { - * buffer.writeUint8(Encoding.utf16le); - * buffer.writeUint32LE(input.length * 2, 1); - * buffer.write(input, 5, 'utf16le'); - * } - * } - * writeString('hello'); - * writeString('你好'); - * ``` - * @since v23.10.0, v22.15.0 - */ - function isStringOneByteRepresentation(content: string): boolean; - /** - * @since v8.0.0 - */ - class Serializer { - /** - * Writes out a header, which includes the serialization format version. - */ - writeHeader(): void; - /** - * Serializes a JavaScript value and adds the serialized representation to the - * internal buffer. - * - * This throws an error if `value` cannot be serialized. - */ - writeValue(val: any): boolean; - /** - * Returns the stored internal buffer. This serializer should not be used once - * the buffer is released. Calling this method results in undefined behavior - * if a previous write has failed. - */ - releaseBuffer(): NonSharedBuffer; - /** - * Marks an `ArrayBuffer` as having its contents transferred out of band. - * Pass the corresponding `ArrayBuffer` in the deserializing context to `deserializer.transferArrayBuffer()`. - * @param id A 32-bit unsigned integer. - * @param arrayBuffer An `ArrayBuffer` instance. - */ - transferArrayBuffer(id: number, arrayBuffer: ArrayBuffer): void; - /** - * Write a raw 32-bit unsigned integer. - * For use inside of a custom `serializer._writeHostObject()`. - */ - writeUint32(value: number): void; - /** - * Write a raw 64-bit unsigned integer, split into high and low 32-bit parts. - * For use inside of a custom `serializer._writeHostObject()`. - */ - writeUint64(hi: number, lo: number): void; - /** - * Write a JS `number` value. - * For use inside of a custom `serializer._writeHostObject()`. - */ - writeDouble(value: number): void; - /** - * Write raw bytes into the serializer's internal buffer. The deserializer - * will require a way to compute the length of the buffer. - * For use inside of a custom `serializer._writeHostObject()`. - */ - writeRawBytes(buffer: NodeJS.ArrayBufferView): void; - } - /** - * A subclass of `Serializer` that serializes `TypedArray`(in particular `Buffer`) and `DataView` objects as host objects, and only - * stores the part of their underlying `ArrayBuffer`s that they are referring to. - * @since v8.0.0 - */ - class DefaultSerializer extends Serializer {} - /** - * @since v8.0.0 - */ - class Deserializer { - constructor(data: NodeJS.TypedArray); - /** - * Reads and validates a header (including the format version). - * May, for example, reject an invalid or unsupported wire format. In that case, - * an `Error` is thrown. - */ - readHeader(): boolean; - /** - * Deserializes a JavaScript value from the buffer and returns it. - */ - readValue(): any; - /** - * Marks an `ArrayBuffer` as having its contents transferred out of band. - * Pass the corresponding `ArrayBuffer` in the serializing context to `serializer.transferArrayBuffer()` (or return the `id` from `serializer._getSharedArrayBufferId()` in the case of - * `SharedArrayBuffer`s). - * @param id A 32-bit unsigned integer. - * @param arrayBuffer An `ArrayBuffer` instance. - */ - transferArrayBuffer(id: number, arrayBuffer: ArrayBuffer): void; - /** - * Reads the underlying wire format version. Likely mostly to be useful to - * legacy code reading old wire format versions. May not be called before `.readHeader()`. - */ - getWireFormatVersion(): number; - /** - * Read a raw 32-bit unsigned integer and return it. - * For use inside of a custom `deserializer._readHostObject()`. - */ - readUint32(): number; - /** - * Read a raw 64-bit unsigned integer and return it as an array `[hi, lo]` with two 32-bit unsigned integer entries. - * For use inside of a custom `deserializer._readHostObject()`. - */ - readUint64(): [number, number]; - /** - * Read a JS `number` value. - * For use inside of a custom `deserializer._readHostObject()`. - */ - readDouble(): number; - /** - * Read raw bytes from the deserializer's internal buffer. The `length` parameter - * must correspond to the length of the buffer that was passed to `serializer.writeRawBytes()`. - * For use inside of a custom `deserializer._readHostObject()`. - */ - readRawBytes(length: number): Buffer; - } - /** - * A subclass of `Deserializer` corresponding to the format written by `DefaultSerializer`. - * @since v8.0.0 - */ - class DefaultDeserializer extends Deserializer {} - /** - * Uses a `DefaultSerializer` to serialize `value` into a buffer. - * - * `ERR_BUFFER_TOO_LARGE` will be thrown when trying to - * serialize a huge object which requires buffer - * larger than `buffer.constants.MAX_LENGTH`. - * @since v8.0.0 - */ - function serialize(value: any): NonSharedBuffer; - /** - * Uses a `DefaultDeserializer` with default options to read a JS value - * from a buffer. - * @since v8.0.0 - * @param buffer A buffer returned by {@link serialize}. - */ - function deserialize(buffer: NodeJS.ArrayBufferView): any; - /** - * The `v8.takeCoverage()` method allows the user to write the coverage started by `NODE_V8_COVERAGE` to disk on demand. This method can be invoked multiple - * times during the lifetime of the process. Each time the execution counter will - * be reset and a new coverage report will be written to the directory specified - * by `NODE_V8_COVERAGE`. - * - * When the process is about to exit, one last coverage will still be written to - * disk unless {@link stopCoverage} is invoked before the process exits. - * @since v15.1.0, v14.18.0, v12.22.0 - */ - function takeCoverage(): void; - /** - * The `v8.stopCoverage()` method allows the user to stop the coverage collection - * started by `NODE_V8_COVERAGE`, so that V8 can release the execution count - * records and optimize code. This can be used in conjunction with {@link takeCoverage} if the user wants to collect the coverage on demand. - * @since v15.1.0, v14.18.0, v12.22.0 - */ - function stopCoverage(): void; - /** - * The API is a no-op if `--heapsnapshot-near-heap-limit` is already set from the command line or the API is called more than once. - * `limit` must be a positive integer. See [`--heapsnapshot-near-heap-limit`](https://nodejs.org/docs/latest-v25.x/api/cli.html#--heapsnapshot-near-heap-limitmax_count) for more information. - * @since v18.10.0, v16.18.0 - */ - function setHeapSnapshotNearHeapLimit(limit: number): void; - /** - * This API collects GC data in current thread. - * @since v19.6.0, v18.15.0 - */ - class GCProfiler { - /** - * Start collecting GC data. - * @since v19.6.0, v18.15.0 - */ - start(): void; - /** - * Stop collecting GC data and return an object. The content of object - * is as follows. - * - * ```json - * { - * "version": 1, - * "startTime": 1674059033862, - * "statistics": [ - * { - * "gcType": "Scavenge", - * "beforeGC": { - * "heapStatistics": { - * "totalHeapSize": 5005312, - * "totalHeapSizeExecutable": 524288, - * "totalPhysicalSize": 5226496, - * "totalAvailableSize": 4341325216, - * "totalGlobalHandlesSize": 8192, - * "usedGlobalHandlesSize": 2112, - * "usedHeapSize": 4883840, - * "heapSizeLimit": 4345298944, - * "mallocedMemory": 254128, - * "externalMemory": 225138, - * "peakMallocedMemory": 181760 - * }, - * "heapSpaceStatistics": [ - * { - * "spaceName": "read_only_space", - * "spaceSize": 0, - * "spaceUsedSize": 0, - * "spaceAvailableSize": 0, - * "physicalSpaceSize": 0 - * } - * ] - * }, - * "cost": 1574.14, - * "afterGC": { - * "heapStatistics": { - * "totalHeapSize": 6053888, - * "totalHeapSizeExecutable": 524288, - * "totalPhysicalSize": 5500928, - * "totalAvailableSize": 4341101384, - * "totalGlobalHandlesSize": 8192, - * "usedGlobalHandlesSize": 2112, - * "usedHeapSize": 4059096, - * "heapSizeLimit": 4345298944, - * "mallocedMemory": 254128, - * "externalMemory": 225138, - * "peakMallocedMemory": 181760 - * }, - * "heapSpaceStatistics": [ - * { - * "spaceName": "read_only_space", - * "spaceSize": 0, - * "spaceUsedSize": 0, - * "spaceAvailableSize": 0, - * "physicalSpaceSize": 0 - * } - * ] - * } - * } - * ], - * "endTime": 1674059036865 - * } - * ``` - * - * Here's an example. - * - * ```js - * import { GCProfiler } from 'node:v8'; - * const profiler = new GCProfiler(); - * profiler.start(); - * setTimeout(() => { - * console.log(profiler.stop()); - * }, 1000); - * ``` - * @since v19.6.0, v18.15.0 - */ - stop(): GCProfilerResult; - } - interface GCProfilerResult { - version: number; - startTime: number; - endTime: number; - statistics: Array<{ - gcType: string; - cost: number; - beforeGC: { - heapStatistics: HeapStatistics; - heapSpaceStatistics: HeapSpaceStatistics[]; - }; - afterGC: { - heapStatistics: HeapStatistics; - heapSpaceStatistics: HeapSpaceStatistics[]; - }; - }>; - } - interface HeapStatistics { - totalHeapSize: number; - totalHeapSizeExecutable: number; - totalPhysicalSize: number; - totalAvailableSize: number; - totalGlobalHandlesSize: number; - usedGlobalHandlesSize: number; - usedHeapSize: number; - heapSizeLimit: number; - mallocedMemory: number; - externalMemory: number; - peakMallocedMemory: number; - } - interface HeapSpaceStatistics { - spaceName: string; - spaceSize: number; - spaceUsedSize: number; - spaceAvailableSize: number; - physicalSpaceSize: number; - } - /** - * Called when a promise is constructed. This does not mean that corresponding before/after events will occur, only that the possibility exists. This will - * happen if a promise is created without ever getting a continuation. - * @since v17.1.0, v16.14.0 - * @param promise The promise being created. - * @param parent The promise continued from, if applicable. - */ - interface Init { - (promise: Promise, parent: Promise): void; - } - /** - * Called before a promise continuation executes. This can be in the form of `then()`, `catch()`, or `finally()` handlers or an await resuming. - * - * The before callback will be called 0 to N times. The before callback will typically be called 0 times if no continuation was ever made for the promise. - * The before callback may be called many times in the case where many continuations have been made from the same promise. - * @since v17.1.0, v16.14.0 - */ - interface Before { - (promise: Promise): void; - } - /** - * Called immediately after a promise continuation executes. This may be after a `then()`, `catch()`, or `finally()` handler or before an await after another await. - * @since v17.1.0, v16.14.0 - */ - interface After { - (promise: Promise): void; - } - /** - * Called when the promise receives a resolution or rejection value. This may occur synchronously in the case of {@link Promise.resolve()} or - * {@link Promise.reject()}. - * @since v17.1.0, v16.14.0 - */ - interface Settled { - (promise: Promise): void; - } - /** - * Key events in the lifetime of a promise have been categorized into four areas: creation of a promise, before/after a continuation handler is called or - * around an await, and when the promise resolves or rejects. - * - * Because promises are asynchronous resources whose lifecycle is tracked via the promise hooks mechanism, the `init()`, `before()`, `after()`, and - * `settled()` callbacks must not be async functions as they create more promises which would produce an infinite loop. - * @since v17.1.0, v16.14.0 - */ - interface HookCallbacks { - init?: Init; - before?: Before; - after?: After; - settled?: Settled; - } - interface PromiseHooks { - /** - * The `init` hook must be a plain function. Providing an async function will throw as it would produce an infinite microtask loop. - * @since v17.1.0, v16.14.0 - * @param init The {@link Init | `init` callback} to call when a promise is created. - * @return Call to stop the hook. - */ - onInit: (init: Init) => Function; - /** - * The `settled` hook must be a plain function. Providing an async function will throw as it would produce an infinite microtask loop. - * @since v17.1.0, v16.14.0 - * @param settled The {@link Settled | `settled` callback} to call when a promise is created. - * @return Call to stop the hook. - */ - onSettled: (settled: Settled) => Function; - /** - * The `before` hook must be a plain function. Providing an async function will throw as it would produce an infinite microtask loop. - * @since v17.1.0, v16.14.0 - * @param before The {@link Before | `before` callback} to call before a promise continuation executes. - * @return Call to stop the hook. - */ - onBefore: (before: Before) => Function; - /** - * The `after` hook must be a plain function. Providing an async function will throw as it would produce an infinite microtask loop. - * @since v17.1.0, v16.14.0 - * @param after The {@link After | `after` callback} to call after a promise continuation executes. - * @return Call to stop the hook. - */ - onAfter: (after: After) => Function; - /** - * Registers functions to be called for different lifetime events of each promise. - * The callbacks `init()`/`before()`/`after()`/`settled()` are called for the respective events during a promise's lifetime. - * All callbacks are optional. For example, if only promise creation needs to be tracked, then only the init callback needs to be passed. - * The hook callbacks must be plain functions. Providing async functions will throw as it would produce an infinite microtask loop. - * @since v17.1.0, v16.14.0 - * @param callbacks The {@link HookCallbacks | Hook Callbacks} to register - * @return Used for disabling hooks - */ - createHook: (callbacks: HookCallbacks) => Function; - } - /** - * The `promiseHooks` interface can be used to track promise lifecycle events. - * @since v17.1.0, v16.14.0 - */ - const promiseHooks: PromiseHooks; - type StartupSnapshotCallbackFn = (args: any) => any; - /** - * The `v8.startupSnapshot` interface can be used to add serialization and deserialization hooks for custom startup snapshots. - * - * ```bash - * $ node --snapshot-blob snapshot.blob --build-snapshot entry.js - * # This launches a process with the snapshot - * $ node --snapshot-blob snapshot.blob - * ``` - * - * In the example above, `entry.js` can use methods from the `v8.startupSnapshot` interface to specify how to save information for custom objects - * in the snapshot during serialization and how the information can be used to synchronize these objects during deserialization of the snapshot. - * For example, if the `entry.js` contains the following script: - * - * ```js - * 'use strict'; - * - * import fs from 'node:fs'; - * import zlib from 'node:zlib'; - * import path from 'node:path'; - * import assert from 'node:assert'; - * - * import v8 from 'node:v8'; - * - * class BookShelf { - * storage = new Map(); - * - * // Reading a series of files from directory and store them into storage. - * constructor(directory, books) { - * for (const book of books) { - * this.storage.set(book, fs.readFileSync(path.join(directory, book))); - * } - * } - * - * static compressAll(shelf) { - * for (const [ book, content ] of shelf.storage) { - * shelf.storage.set(book, zlib.gzipSync(content)); - * } - * } - * - * static decompressAll(shelf) { - * for (const [ book, content ] of shelf.storage) { - * shelf.storage.set(book, zlib.gunzipSync(content)); - * } - * } - * } - * - * // __dirname here is where the snapshot script is placed - * // during snapshot building time. - * const shelf = new BookShelf(__dirname, [ - * 'book1.en_US.txt', - * 'book1.es_ES.txt', - * 'book2.zh_CN.txt', - * ]); - * - * assert(v8.startupSnapshot.isBuildingSnapshot()); - * // On snapshot serialization, compress the books to reduce size. - * v8.startupSnapshot.addSerializeCallback(BookShelf.compressAll, shelf); - * // On snapshot deserialization, decompress the books. - * v8.startupSnapshot.addDeserializeCallback(BookShelf.decompressAll, shelf); - * v8.startupSnapshot.setDeserializeMainFunction((shelf) => { - * // process.env and process.argv are refreshed during snapshot - * // deserialization. - * const lang = process.env.BOOK_LANG || 'en_US'; - * const book = process.argv[1]; - * const name = `${book}.${lang}.txt`; - * console.log(shelf.storage.get(name)); - * }, shelf); - * ``` - * - * The resulted binary will get print the data deserialized from the snapshot during start up, using the refreshed `process.env` and `process.argv` of the launched process: - * - * ```bash - * $ BOOK_LANG=es_ES node --snapshot-blob snapshot.blob book1 - * # Prints content of book1.es_ES.txt deserialized from the snapshot. - * ``` - * - * Currently the application deserialized from a user-land snapshot cannot be snapshotted again, so these APIs are only available to applications that are not deserialized from a user-land snapshot. - * - * @since v18.6.0, v16.17.0 - */ - namespace startupSnapshot { - /** - * Add a callback that will be called when the Node.js instance is about to get serialized into a snapshot and exit. - * This can be used to release resources that should not or cannot be serialized or to convert user data into a form more suitable for serialization. - * @since v18.6.0, v16.17.0 - */ - function addSerializeCallback(callback: StartupSnapshotCallbackFn, data?: any): void; - /** - * Add a callback that will be called when the Node.js instance is deserialized from a snapshot. - * The `callback` and the `data` (if provided) will be serialized into the snapshot, they can be used to re-initialize the state of the application or - * to re-acquire resources that the application needs when the application is restarted from the snapshot. - * @since v18.6.0, v16.17.0 - */ - function addDeserializeCallback(callback: StartupSnapshotCallbackFn, data?: any): void; - /** - * This sets the entry point of the Node.js application when it is deserialized from a snapshot. This can be called only once in the snapshot building script. - * If called, the deserialized application no longer needs an additional entry point script to start up and will simply invoke the callback along with the deserialized - * data (if provided), otherwise an entry point script still needs to be provided to the deserialized application. - * @since v18.6.0, v16.17.0 - */ - function setDeserializeMainFunction(callback: StartupSnapshotCallbackFn, data?: any): void; - /** - * Returns true if the Node.js instance is run to build a snapshot. - * @since v18.6.0, v16.17.0 - */ - function isBuildingSnapshot(): boolean; - } -} -declare module "v8" { - export * from "node:v8"; -} diff --git a/PBandGraphScaffold/node_modules/@types/node/vm.d.ts b/PBandGraphScaffold/node_modules/@types/node/vm.d.ts deleted file mode 100644 index b096c91..0000000 --- a/PBandGraphScaffold/node_modules/@types/node/vm.d.ts +++ /dev/null @@ -1,1180 +0,0 @@ -/** - * The `node:vm` module enables compiling and running code within V8 Virtual - * Machine contexts. - * - * **The `node:vm` module is not a security** - * **mechanism. Do not use it to run untrusted code.** - * - * JavaScript code can be compiled and run immediately or - * compiled, saved, and run later. - * - * A common use case is to run the code in a different V8 Context. This means - * invoked code has a different global object than the invoking code. - * - * One can provide the context by `contextifying` an - * object. The invoked code treats any property in the context like a - * global variable. Any changes to global variables caused by the invoked - * code are reflected in the context object. - * - * ```js - * import vm from 'node:vm'; - * - * const x = 1; - * - * const context = { x: 2 }; - * vm.createContext(context); // Contextify the object. - * - * const code = 'x += 40; var y = 17;'; - * // `x` and `y` are global variables in the context. - * // Initially, x has the value 2 because that is the value of context.x. - * vm.runInContext(code, context); - * - * console.log(context.x); // 42 - * console.log(context.y); // 17 - * - * console.log(x); // 1; y is not defined. - * ``` - * @see [source](https://github.com/nodejs/node/blob/v25.x/lib/vm.js) - */ -declare module "node:vm" { - import { NonSharedBuffer } from "node:buffer"; - import { ImportAttributes, ImportPhase } from "node:module"; - interface Context extends NodeJS.Dict {} - interface BaseOptions { - /** - * Specifies the filename used in stack traces produced by this script. - * @default '' - */ - filename?: string | undefined; - /** - * Specifies the line number offset that is displayed in stack traces produced by this script. - * @default 0 - */ - lineOffset?: number | undefined; - /** - * Specifies the column number offset that is displayed in stack traces produced by this script. - * @default 0 - */ - columnOffset?: number | undefined; - } - type DynamicModuleLoader = ( - specifier: string, - referrer: T, - importAttributes: ImportAttributes, - phase: ImportPhase, - ) => Module | Promise; - interface ScriptOptions extends BaseOptions { - /** - * Provides an optional data with V8's code cache data for the supplied source. - */ - cachedData?: NodeJS.ArrayBufferView | undefined; - /** @deprecated in favor of `script.createCachedData()` */ - produceCachedData?: boolean | undefined; - /** - * Used to specify how the modules should be loaded during the evaluation of this script when `import()` is called. This option is - * part of the experimental modules API. We do not recommend using it in a production environment. For detailed information, see - * [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-v25.x/api/vm.html#support-of-dynamic-import-in-compilation-apis). - * @experimental - */ - importModuleDynamically?: - | DynamicModuleLoader - - -``` - -With the following `frontend.tsx`: - -```tsx#frontend.tsx -import React from "react"; -import { createRoot } from "react-dom/client"; - -// import .css files directly and it works -import './index.css'; - -const root = createRoot(document.body); - -export default function Frontend() { - return

Hello, world!

; -} - -root.render(); -``` - -Then, run index.ts - -```sh -bun --hot ./index.ts -``` - -For more information, read the Bun API docs in `docs/**.mdx`. diff --git a/PBandGraphScaffold/node_modules/bun-types/README.md b/PBandGraphScaffold/node_modules/bun-types/README.md deleted file mode 100644 index cf798d2..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/README.md +++ /dev/null @@ -1,33 +0,0 @@ -# TypeScript types for Bun - -

- Logo -

- -These are the type definitions for Bun's JavaScript runtime APIs. - -# Installation - -Install the `@types/bun` npm package: - -```bash -# yarn/npm/pnpm work too -# @types/bun is an ordinary npm package -bun add -D @types/bun -``` - -That's it! VS Code and TypeScript automatically load `@types/*` packages into your project, so the `Bun` global and all `bun:*` modules should be available immediately. - -# Contributing - -The `@types/bun` package is a shim that loads `bun-types`. The `bun-types` package lives in the Bun repo under `packages/bun-types`. - -To add a new file, add it under `packages/bun-types`. Then add a [triple-slash directive](https://www.typescriptlang.org/docs/handbook/triple-slash-directives.html) pointing to it inside [./index.d.ts](./index.d.ts). - -```diff -+ /// -``` - -```bash -bun build -``` diff --git a/PBandGraphScaffold/node_modules/bun-types/bun.d.ts b/PBandGraphScaffold/node_modules/bun-types/bun.d.ts deleted file mode 100644 index b45e9db..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/bun.d.ts +++ /dev/null @@ -1,7032 +0,0 @@ -/** - * Bun.js runtime APIs - * - * @example - * - * ```js - * import {file} from 'bun'; - * - * // Log the file to the console - * const input = await file('/path/to/file.txt').text(); - * console.log(input); - * ``` - * - * This module aliases `globalThis.Bun`. - */ -declare module "bun" { - type PathLike = string | NodeJS.TypedArray | ArrayBufferLike | URL; - type ArrayBufferView = - | NodeJS.TypedArray - | DataView; - type BufferSource = NodeJS.TypedArray | DataView | ArrayBufferLike; - type StringOrBuffer = string | NodeJS.TypedArray | ArrayBufferLike; - type XMLHttpRequestBodyInit = Blob | BufferSource | FormData | URLSearchParams | string; - type ReadableStreamController = ReadableStreamDefaultController; - type ReadableStreamDefaultReadResult = - | ReadableStreamDefaultReadValueResult - | ReadableStreamDefaultReadDoneResult; - type ReadableStreamReader = ReadableStreamDefaultReader; - type Transferable = ArrayBuffer | MessagePort; - type MessageEventSource = Bun.__internal.UseLibDomIfAvailable<"MessageEventSource", undefined>; - type Encoding = "utf-8" | "windows-1252" | "utf-16"; - type UncaughtExceptionOrigin = "uncaughtException" | "unhandledRejection"; - type MultipleResolveType = "resolve" | "reject"; - type BeforeExitListener = (code: number) => void; - type DisconnectListener = () => void; - type ExitListener = (code: number) => void; - type RejectionHandledListener = (promise: Promise) => void; - type FormDataEntryValue = File | string; - type WarningListener = (warning: Error) => void; - type MessageListener = (message: unknown, sendHandle: unknown) => void; - type SignalsListener = (signal: NodeJS.Signals) => void; - type BlobPart = string | Blob | BufferSource; - type TimerHandler = (...args: any[]) => void; - type DOMHighResTimeStamp = number; - type EventListenerOrEventListenerObject = EventListener | EventListenerObject; - type BlobOrStringOrBuffer = string | NodeJS.TypedArray | ArrayBufferLike | Blob; - type MaybePromise = T | Promise; - - namespace __internal { - type LibDomIsLoaded = typeof globalThis extends { onabort: any } ? true : false; - - /** - * Helper type for avoiding conflicts in types. - * - * Uses the lib.dom.d.ts definition if it exists, otherwise defines it locally. - * - * This is to avoid type conflicts between lib.dom.d.ts and \@types/bun. - * - * Unfortunately some symbols cannot be defined when both Bun types and lib.dom.d.ts types are loaded, - * and since we can't redeclare the symbol in a way that satisfies both, we need to fallback - * to the type that lib.dom.d.ts provides. - */ - type UseLibDomIfAvailable = - // `onabort` is defined in lib.dom.d.ts, so we can check to see if lib dom is loaded by checking if `onabort` is defined - LibDomIsLoaded extends true - ? typeof globalThis extends { [K in GlobalThisKeyName]: infer T } // if it is loaded, infer it from `globalThis` and use that value - ? T - : Otherwise // Not defined in lib dom (or anywhere else), so no conflict. We can safely use our own definition - : Otherwise; // Lib dom not loaded anyway, so no conflict. We can safely use our own definition - - /** - * Like Omit, but correctly distributes over unions. Most useful for removing - * properties from union options objects, like {@link Bun.SQL.Options} - * - * @example - * ```ts - * type X = Bun.DistributedOmit<{type?: 'a', url?: string} | {type?: 'b', flag?: boolean}, "url"> - * // `{type?: 'a'} | {type?: 'b', flag?: boolean}` (Omit applied to each union item instead of entire type) - * - * type X = Omit<{type?: 'a', url?: string} | {type?: 'b', flag?: boolean}, "url">; - * // `{type?: "a" | "b" | undefined}` (Missing `flag` property and no longer a union) - * ``` - */ - type DistributedOmit = T extends T ? Omit : never; - - type KeysInBoth = Extract; - type MergeInner = Omit> & - Omit> & { - [Key in KeysInBoth]: A[Key] | B[Key]; - }; - type Merge = MergeInner & MergeInner; - type DistributedMerge = T extends T ? Merge> : never; - - type Without = A & { - [Key in Exclude]?: never; - }; - - type XOR = Without | Without; - } - - interface ErrorEventInit extends EventInit { - colno?: number; - error?: any; - filename?: string; - lineno?: number; - message?: string; - } - - interface CloseEventInit extends EventInit { - code?: number; - reason?: string; - wasClean?: boolean; - } - - interface MessageEventInit extends EventInit { - data?: T; - lastEventId?: string; - origin?: string; - source?: Bun.MessageEventSource | null; - } - - interface EventInit { - bubbles?: boolean; - cancelable?: boolean; - composed?: boolean; - } - - interface EventListenerOptions { - capture?: boolean; - } - - interface CustomEventInit extends Bun.EventInit { - detail?: T; - } - - /** A message received by a target object. */ - interface BunMessageEvent extends Event { - /** Returns the data of the message. */ - readonly data: T; - /** Returns the last event ID string, for server-sent events. */ - readonly lastEventId: string; - /** Returns the origin of the message, for server-sent events and cross-document messaging. */ - readonly origin: string; - /** Returns the MessagePort array sent with the message, for cross-document messaging and channel messaging. */ - readonly ports: readonly MessagePort[]; // ReadonlyArray; - readonly source: Bun.MessageEventSource | null; - } - - type MessageEvent = Bun.__internal.UseLibDomIfAvailable<"MessageEvent", BunMessageEvent>; - - interface ReadableStreamDefaultReadManyResult { - done: boolean; - /** Number of bytes */ - size: number; - value: T[]; - } - - interface EventSourceEventMap { - error: Event; - message: MessageEvent; - open: Event; - } - - interface AddEventListenerOptions extends EventListenerOptions { - /** When `true`, the listener is automatically removed when it is first invoked. Default: `false`. */ - once?: boolean; - /** When `true`, serves as a hint that the listener will not call the `Event` object's `preventDefault()` method. Default: false. */ - passive?: boolean; - signal?: AbortSignal; - } - - interface EventListener { - (evt: Event): void; - } - - interface EventListenerObject { - handleEvent(object: Event): void; - } - - interface FetchEvent extends Event { - readonly request: Request; - readonly url: string; - - waitUntil(promise: Promise): void; - respondWith(response: Response | Promise): void; - } - - interface EventMap { - fetch: FetchEvent; - message: MessageEvent; - messageerror: MessageEvent; - // exit: Event; - } - - interface StructuredSerializeOptions { - transfer?: Bun.Transferable[]; - } - - interface EventSource extends EventTarget { - new (url: string | URL, eventSourceInitDict?: EventSourceInit): EventSource; - - onerror: ((this: EventSource, ev: Event) => any) | null; - onmessage: ((this: EventSource, ev: MessageEvent) => any) | null; - onopen: ((this: EventSource, ev: Event) => any) | null; - /** Returns the state of this EventSource object's connection. It can have the values described below. */ - readonly readyState: number; - /** Returns the URL providing the event stream. */ - readonly url: string; - /** Returns true if the credentials mode for connection requests to the URL providing the event stream is set to "include", and false otherwise. - * - * Not supported in Bun - */ - readonly withCredentials: boolean; - /** Aborts any instances of the fetch algorithm started for this EventSource object, and sets the readyState attribute to CLOSED. */ - close(): void; - readonly CLOSED: 2; - readonly CONNECTING: 0; - readonly OPEN: 1; - addEventListener( - type: K, - listener: (this: EventSource, ev: EventSourceEventMap[K]) => any, - options?: boolean | AddEventListenerOptions, - ): void; - addEventListener( - type: string, - listener: (this: EventSource, event: MessageEvent) => any, - options?: boolean | AddEventListenerOptions, - ): void; - addEventListener( - type: string, - listener: EventListenerOrEventListenerObject, - options?: boolean | AddEventListenerOptions, - ): void; - removeEventListener( - type: K, - listener: (this: EventSource, ev: EventSourceEventMap[K]) => any, - options?: boolean | EventListenerOptions, - ): void; - removeEventListener( - type: string, - listener: (this: EventSource, event: MessageEvent) => any, - options?: boolean | EventListenerOptions, - ): void; - removeEventListener( - type: string, - listener: EventListenerOrEventListenerObject, - options?: boolean | EventListenerOptions, - ): void; - - /** - * Keep the event loop alive while connection is open or reconnecting - * - * Not available in browsers - */ - ref(): void; - - /** - * Do not keep the event loop alive while connection is open or reconnecting - * - * Not available in browsers - */ - unref(): void; - } - - interface TransformerFlushCallback { - (controller: TransformStreamDefaultController): void | PromiseLike; - } - - interface TransformerStartCallback { - (controller: TransformStreamDefaultController): any; - } - - interface TransformerTransformCallback { - (chunk: I, controller: TransformStreamDefaultController): void | PromiseLike; - } - - interface UnderlyingSinkAbortCallback { - (reason?: any): void | PromiseLike; - } - - interface UnderlyingSinkCloseCallback { - (): void | PromiseLike; - } - - interface UnderlyingSinkStartCallback { - (controller: WritableStreamDefaultController): any; - } - - interface UnderlyingSinkWriteCallback { - (chunk: W, controller: WritableStreamDefaultController): void | PromiseLike; - } - - interface UnderlyingSourceCancelCallback { - (reason?: any): void | PromiseLike; - } - - interface UnderlyingSink { - abort?: UnderlyingSinkAbortCallback; - close?: UnderlyingSinkCloseCallback; - start?: UnderlyingSinkStartCallback; - type?: undefined | "default" | "bytes"; - write?: UnderlyingSinkWriteCallback; - } - - interface UnderlyingSource { - cancel?: UnderlyingSourceCancelCallback; - pull?: UnderlyingSourcePullCallback; - start?: UnderlyingSourceStartCallback; - /** - * Mode "bytes" is not currently supported. - */ - type?: undefined; - } - - interface DirectUnderlyingSource { - cancel?: UnderlyingSourceCancelCallback; - pull: (controller: ReadableStreamDirectController) => void | PromiseLike; - type: "direct"; - } - - interface UnderlyingSourcePullCallback { - (controller: ReadableStreamController): void | PromiseLike; - } - - interface UnderlyingSourceStartCallback { - (controller: ReadableStreamController): any; - } - - interface GenericTransformStream { - readonly readable: ReadableStream; - readonly writable: WritableStream; - } - - interface AbstractWorkerEventMap { - error: ErrorEvent; - } - - interface WorkerEventMap extends AbstractWorkerEventMap { - message: MessageEvent; - messageerror: MessageEvent; - close: CloseEvent; - open: Event; - } - - type WorkerType = "classic" | "module"; - - interface AbstractWorker { - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorker/error_event) */ - onerror: ((this: AbstractWorker, ev: ErrorEvent) => any) | null; - addEventListener( - type: K, - listener: (this: AbstractWorker, ev: AbstractWorkerEventMap[K]) => any, - options?: boolean | AddEventListenerOptions, - ): void; - addEventListener( - type: string, - listener: EventListenerOrEventListenerObject, - options?: boolean | AddEventListenerOptions, - ): void; - removeEventListener( - type: K, - listener: (this: AbstractWorker, ev: AbstractWorkerEventMap[K]) => any, - options?: boolean | EventListenerOptions, - ): void; - removeEventListener( - type: string, - listener: EventListenerOrEventListenerObject, - options?: boolean | EventListenerOptions, - ): void; - } - - /** - * Bun's Web Worker constructor supports some extra options on top of the API browsers have. - */ - interface WorkerOptions { - /** - * A string specifying an identifying name for the DedicatedWorkerGlobalScope representing the scope of - * the worker, which is mainly useful for debugging purposes. - */ - name?: string; - - /** - * Use less memory, but make the worker slower. - * - * Internally, this sets the heap size configuration in JavaScriptCore to be - * the small heap instead of the large heap. - */ - smol?: boolean; - - /** - * When `true`, the worker will keep the parent thread alive until the worker is terminated or `unref`'d. - * When `false`, the worker will not keep the parent thread alive. - * - * By default, this is `false`. - */ - ref?: boolean; - - /** - * In Bun, this does nothing. - */ - type?: Bun.WorkerType | undefined; - - /** - * List of arguments which would be stringified and appended to - * `Bun.argv` / `process.argv` in the worker. This is mostly similar to the `data` - * but the values will be available on the global `Bun.argv` as if they - * were passed as CLI options to the script. - */ - argv?: any[] | undefined; - - /** If `true` and the first argument is a string, interpret the first argument to the constructor as a script that is executed once the worker is online. */ - // eval?: boolean | undefined; - - /** - * If set, specifies the initial value of process.env inside the Worker thread. As a special value, worker.SHARE_ENV may be used to specify that the parent thread and the child thread should share their environment variables; in that case, changes to one thread's process.env object affect the other thread as well. Default: process.env. - */ - env?: Record | (typeof import("node:worker_threads"))["SHARE_ENV"] | undefined; - - /** - * In Bun, this does nothing. - */ - credentials?: import("undici-types").RequestCredentials | undefined; - - /** - * @default true - */ - // trackUnmanagedFds?: boolean; - // resourceLimits?: import("worker_threads").ResourceLimits; - - /** - * An array of module specifiers to preload in the worker. - * - * These modules load before the worker's entry point is executed. - * - * Equivalent to passing the `--preload` CLI argument, but only for this Worker. - */ - preload?: string[] | string | undefined; - } - - interface Worker extends EventTarget, AbstractWorker { - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Worker/message_event) */ - onmessage: ((this: Worker, ev: MessageEvent) => any) | null; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Worker/messageerror_event) */ - onmessageerror: ((this: Worker, ev: MessageEvent) => any) | null; - /** - * Clones message and transmits it to worker's global environment. transfer can be passed as a list of objects that are to be transferred rather than cloned. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Worker/postMessage) - */ - postMessage(message: any, transfer: Transferable[]): void; - postMessage(message: any, options?: StructuredSerializeOptions): void; - /** - * Aborts worker's associated global environment. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Worker/terminate) - */ - terminate(): void; - addEventListener( - type: K, - listener: (this: Worker, ev: WorkerEventMap[K]) => any, - options?: boolean | AddEventListenerOptions, - ): void; - addEventListener( - type: string, - listener: EventListenerOrEventListenerObject, - options?: boolean | AddEventListenerOptions, - ): void; - removeEventListener( - type: K, - listener: (this: Worker, ev: WorkerEventMap[K]) => any, - options?: boolean | EventListenerOptions, - ): void; - removeEventListener( - type: string, - listener: EventListenerOrEventListenerObject, - options?: boolean | EventListenerOptions, - ): void; - - /** - * Opposite of `unref()`, calling `ref()` on a previously `unref()`ed worker does _not_ let the program exit if it's the only active handle left (the default - * behavior). If the worker is `ref()`ed, calling `ref()` again has - * no effect. - * @since v10.5.0 - */ - ref(): void; - - /** - * Calling `unref()` on a worker allows the thread to exit if this is the only - * active handle in the event system. If the worker is already `unref()`ed calling`unref()` again has no effect. - * @since v10.5.0 - */ - unref(): void; - - /** - * An integer identifier for the referenced thread. Inside the worker thread, - * it is available as `require('node:worker_threads').threadId`. - * This value is unique for each `Worker` instance inside a single process. - * @since v10.5.0 - */ - threadId: number; - } - - interface Env { - NODE_ENV?: string; - /** - * Can be used to change the default timezone at runtime - */ - TZ?: string; - } - - /** - * The environment variables of the process - * - * Defaults to `process.env` as it was when the current Bun process launched. - * - * Changes to `process.env` at runtime won't automatically be reflected in the default value. For that, you can pass `process.env` explicitly. - */ - const env: Env & NodeJS.ProcessEnv & ImportMetaEnv; - - /** - * The raw arguments passed to the process, including flags passed to Bun. If you want to easily read flags passed to your script, consider using `process.argv` instead. - */ - const argv: string[]; - - interface WhichOptions { - /** - * Overrides the PATH environment variable - */ - PATH?: string; - - /** - * When given a relative path, use this path to join it. - */ - cwd?: string; - } - - /** - * Find the path to an executable, similar to typing which in your terminal. Reads the `PATH` environment variable unless overridden with `options.PATH`. - * - * @category Utilities - * - * @param command The name of the executable or script to find - * @param options Options for the search - */ - function which(command: string, options?: WhichOptions): string | null; - - interface StringWidthOptions { - /** - * If `true`, count ANSI escape codes as part of the string width. If `false`, ANSI escape codes are ignored when calculating the string width. - * - * @default false - */ - countAnsiEscapeCodes?: boolean; - - /** - * When it's ambiugous and `true`, count emoji as 1 characters wide. If `false`, emoji are counted as 2 character wide. - * - * @default true - */ - ambiguousIsNarrow?: boolean; - } - - /** - * Get the column count of a string as it would be displayed in a terminal. - * Supports ANSI escape codes, emoji, and wide characters. - * - * This is useful for: - * - Aligning text in a terminal - * - Quickly checking if a string contains ANSI escape codes - * - Measuring the width of a string in a terminal - * - * This API is designed to match the popular "string-width" package, so that - * existing code can be easily ported to Bun and vice versa. - * - * @returns The width of the string in columns - * - * @example - * ```ts - * import { stringWidth } from "bun"; - * - * console.log(stringWidth("abc")); // 3 - * console.log(stringWidth("👩‍👩‍👧‍👦")); // 1 - * console.log(stringWidth("\u001b[31mhello\u001b[39m")); // 5 - * console.log(stringWidth("\u001b[31mhello\u001b[39m", { countAnsiEscapeCodes: false })); // 5 - * console.log(stringWidth("\u001b[31mhello\u001b[39m", { countAnsiEscapeCodes: true })); // 13 - * ``` - */ - function stringWidth( - /** - * The string to measure - */ - input: string, - options?: StringWidthOptions, - ): number; - - /** - * Remove ANSI escape codes from a string. - * - * @category Utilities - * - * @param input The string to remove ANSI escape codes from. - * @returns The string with ANSI escape codes removed. - * - * @example - * ```ts - * import { stripANSI } from "bun"; - * - * console.log(stripANSI("\u001b[31mhello\u001b[39m")); // "hello" - * ``` - */ - function stripANSI(input: string): string; - - /** - * TOML related APIs - */ - namespace TOML { - /** - * Parse a TOML string into a JavaScript object. - * - * @category Utilities - * - * @param input The TOML string to parse - * @returns A JavaScript object - */ - export function parse(input: string): object; - } - - /** - * YAML related APIs - */ - namespace YAML { - /** - * Parse a YAML string into a JavaScript value - * - * @category Utilities - * - * @param input The YAML string to parse - * @returns A JavaScript value - * - * @example - * ```ts - * import { YAML } from "bun"; - * - * console.log(YAML.parse("123")) // 123 - * console.log(YAML.parse("null")) // null - * console.log(YAML.parse("false")) // false - * console.log(YAML.parse("abc")) // "abc" - * console.log(YAML.parse("- abc")) // [ "abc" ] - * console.log(YAML.parse("abc: def")) // { "abc": "def" } - * ``` - */ - export function parse(input: string): unknown; - - /** - * Convert a JavaScript value into a YAML string. Strings are double quoted if they contain keywords, non-printable or - * escaped characters, or if a YAML parser would parse them as numbers. Anchors and aliases are inferred from objects, allowing cycles. - * - * @category Utilities - * - * @param input The JavaScript value to stringify. - * @param replacer Currently not supported. - * @param space A number for how many spaces each level of indentation gets, or a string used as indentation. - * Without this parameter, outputs flow-style (single-line) YAML. - * With this parameter, outputs block-style (multi-line) YAML. - * The number is clamped between 0 and 10, and the first 10 characters of the string are used. - * @returns A string containing the YAML document. - * - * @example - * ```ts - * import { YAML } from "bun"; - * - * const input = { - * abc: "def", - * num: 123 - * }; - * - * // Without space - flow style (single-line) - * console.log(YAML.stringify(input)); - * // {abc: def,num: 123} - * - * // With space - block style (multi-line) - * console.log(YAML.stringify(input, null, 2)); - * // abc: def - * // num: 123 - * - * const cycle = {}; - * cycle.obj = cycle; - * console.log(YAML.stringify(cycle, null, 2)); - * // &1 - * // obj: *1 - */ - export function stringify(input: unknown, replacer?: undefined | null, space?: string | number): string; - } - - /** - * Synchronously resolve a `moduleId` as though it were imported from `parent` - * - * On failure, throws a `ResolveMessage` - */ - function resolveSync(moduleId: string, parent: string): string; - - /** - * Resolve a `moduleId` as though it were imported from `parent` - * - * On failure, throws a `ResolveMessage` - * - * For now, use the sync version. There is zero performance benefit to using this async version. It exists for future-proofing. - */ - function resolve(moduleId: string, parent: string): Promise; - - /** - * Use the fastest syscalls available to copy from `input` into `destination`. - * - * If `destination` exists, it must be a regular file or symlink to a file. If `destination`'s directory does not exist, it will be created by default. - * - * @category File System - * - * @param destination The file or file path to write to - * @param input The data to copy into `destination`. - * @param options Options for the write - * - * @returns A promise that resolves with the number of bytes written. - */ - function write( - destination: BunFile | S3File | PathLike, - input: Blob | NodeJS.TypedArray | ArrayBufferLike | string | BlobPart[], - options?: { - /** - * If writing to a PathLike, set the permissions of the file. - */ - mode?: number; - /** - * If `true`, create the parent directory if it doesn't exist. By default, this is `true`. - * - * If `false`, this will throw an error if the directory doesn't exist. - * - * @default true - */ - createPath?: boolean; - }, - ): Promise; - - /** - * Persist a {@link Response} body to disk. - * - * @param destination The file to write to. If the file doesn't exist, - * it will be created and if the file does exist, it will be - * overwritten. If `input`'s size is less than `destination`'s size, - * `destination` will be truncated. - * @param input - `Response` object - * @param options Options for the write - * - * @returns A promise that resolves with the number of bytes written. - */ - function write( - destination: BunFile, - input: Response, - options?: { - /** - * If `true`, create the parent directory if it doesn't exist. By default, this is `true`. - * - * If `false`, this will throw an error if the directory doesn't exist. - * - * @default true - */ - createPath?: boolean; - }, - ): Promise; - - /** - * Persist a {@link Response} body to disk. - * - * @param destinationPath The file path to write to. If the file doesn't - * exist, it will be created and if the file does exist, it will be - * overwritten. If `input`'s size is less than `destination`'s size, - * `destination` will be truncated. - * @param input - `Response` object - * @returns A promise that resolves with the number of bytes written. - */ - function write( - destinationPath: PathLike, - input: Response, - options?: { - /** - * If `true`, create the parent directory if it doesn't exist. By default, this is `true`. - * - * If `false`, this will throw an error if the directory doesn't exist. - * - * @default true - */ - createPath?: boolean; - }, - ): Promise; - - /** - * Use the fastest syscalls available to copy from `input` into `destination`. - * - * If `destination` exists, it must be a regular file or symlink to a file. - * - * On Linux, this uses `copy_file_range`. - * - * On macOS, when the destination doesn't already exist, this uses - * [`clonefile()`](https://www.manpagez.com/man/2/clonefile/) and falls - * back to [`fcopyfile()`](https://www.manpagez.com/man/2/fcopyfile/) - * - * @param destination The file to write to. If the file doesn't exist, - * it will be created and if the file does exist, it will be - * overwritten. If `input`'s size is less than `destination`'s size, - * `destination` will be truncated. - * @param input The file to copy from. - * @returns A promise that resolves with the number of bytes written. - */ - - function write( - destination: BunFile, - input: BunFile, - options?: { - /** - * If `true`, create the parent directory if it doesn't exist. By default, this is `true`. - * - * If `false`, this will throw an error if the directory doesn't exist. - * - * @default true - */ - createPath?: boolean; - }, - ): Promise; - - /** - * Use the fastest syscalls available to copy from `input` into `destination`. - * - * If `destination` exists, it must be a regular file or symlink to a file. - * - * On Linux, this uses `copy_file_range`. - * - * On macOS, when the destination doesn't already exist, this uses - * [`clonefile()`](https://www.manpagez.com/man/2/clonefile/) and falls - * back to [`fcopyfile()`](https://www.manpagez.com/man/2/fcopyfile/) - * - * @param destinationPath The file path to write to. If the file doesn't - * exist, it will be created and if the file does exist, it will be - * overwritten. If `input`'s size is less than `destination`'s size, - * `destination` will be truncated. - * @param input The file to copy from. - * @returns A promise that resolves with the number of bytes written. - */ - function write( - destinationPath: PathLike, - input: BunFile, - options?: { - /** - * If `true`, create the parent directory if it doesn't exist. By default, this is `true`. - * - * If `false`, this will throw an error if the directory doesn't exist. - * - * @default true - */ - createPath?: boolean; - }, - ): Promise; - - interface SystemError extends Error { - errno?: number | undefined; - code?: string | undefined; - path?: string | undefined; - syscall?: string | undefined; - } - - /** - * Concatenate an array of typed arrays into a single `ArrayBuffer`. This is a fast path. - * - * You can do this manually if you'd like, but this function will generally - * be a little faster. - * - * If you want a `Uint8Array` instead, consider `Buffer.concat`. - * - * @param buffers An array of typed arrays to concatenate. - * @returns An `ArrayBuffer` with the data from all the buffers. - * - * Here is similar code to do it manually, except about 30% slower: - * ```js - * var chunks = [...]; - * var size = 0; - * for (const chunk of chunks) { - * size += chunk.byteLength; - * } - * var buffer = new ArrayBuffer(size); - * var view = new Uint8Array(buffer); - * var offset = 0; - * for (const chunk of chunks) { - * view.set(chunk, offset); - * offset += chunk.byteLength; - * } - * return buffer; - * ``` - * - * This function is faster because it uses uninitialized memory when copying. Since the entire - * length of the buffer is known, it is safe to use uninitialized memory. - */ - function concatArrayBuffers(buffers: Array, maxLength?: number): ArrayBuffer; - function concatArrayBuffers( - buffers: Array, - maxLength: number, - asUint8Array: false, - ): ArrayBuffer; - function concatArrayBuffers( - buffers: Array, - maxLength: number, - asUint8Array: true, - ): Uint8Array; - - /** - * Consume all data from a {@link ReadableStream} until it closes or errors. - * - * Concatenate the chunks into a single {@link ArrayBuffer}. - * - * Each chunk must be a TypedArray or an ArrayBuffer. If you need to support - * chunks of different types, consider {@link readableStreamToBlob} - * - * @param stream The stream to consume. - * @returns A promise that resolves with the concatenated chunks or the concatenated chunks as an `ArrayBuffer`. - */ - function readableStreamToArrayBuffer( - stream: ReadableStream, - ): Promise | ArrayBuffer; - - /** - * Consume all data from a {@link ReadableStream} until it closes or errors. - * - * Reads the multi-part or URL-encoded form data into a {@link FormData} object - * - * @param stream The stream to consume. - * @param multipartBoundaryExcludingDashes Optional boundary to use for multipart form data. If none is provided, assumes it is a URLEncoded form. - * @returns A promise that resolves with the data encoded into a {@link FormData} object. - * - * @example - * **Multipart form data example** - * ```ts - * // without dashes - * const boundary = "WebKitFormBoundary" + Math.random().toString(16).slice(2); - * - * const myStream = getStreamFromSomewhere() // ... - * const formData = await Bun.readableStreamToFormData(stream, boundary); - * formData.get("foo"); // "bar" - * ``` - * - * **URL-encoded form data example** - * ```ts - * const stream = new Response("hello=123").body; - * const formData = await Bun.readableStreamToFormData(stream); - * formData.get("hello"); // "123" - * ``` - */ - function readableStreamToFormData( - stream: ReadableStream, - multipartBoundaryExcludingDashes?: string | NodeJS.TypedArray | ArrayBufferView, - ): Promise; - - /** - * Consume all data from a {@link ReadableStream} until it closes or errors. - * - * @param stream The stream to consume - * @returns A promise that resolves with the chunks as an array - */ - function readableStreamToArray(stream: ReadableStream): Promise | T[]; - - /** - * Escape the following characters in a string: - * - * @category Security - * - * - `"` becomes `"""` - * - `&` becomes `"&"` - * - `'` becomes `"'"` - * - `<` becomes `"<"` - * - `>` becomes `">"` - * - * This function is optimized for large input. On an M1X, it processes 480 MB/s - - * 20 GB/s, depending on how much data is being escaped and whether there is non-ascii - * text. - * - * Non-string types will be converted to a string before escaping. - */ - function escapeHTML(input: string | object | number | boolean): string; - - /** - * Convert a filesystem path to a file:// URL. - * - * @param path The path to convert. - * @returns A {@link URL} with the file:// scheme. - * - * @category File System - * - * @example - * ```js - * const url = Bun.pathToFileURL("/foo/bar.txt"); - * console.log(url.href); // "file:///foo/bar.txt" - * ``` - * - * Internally, this function uses WebKit's URL API to - * convert the path to a file:// URL. - */ - function pathToFileURL(path: string): URL; - - /** - * Extract the value from the Promise in the same tick of the event loop - */ - function peek(promise: T | Promise): Promise | T; - namespace peek { - function status(promise: T | Promise): "pending" | "fulfilled" | "rejected"; - } - - /** - * Convert a {@link URL} to a filesystem path. - * - * @param url The URL to convert. - * @returns A filesystem path. - * @throws If the URL is not a URL. - * - * @category File System - * - * @example - * ```js - * const path = Bun.fileURLToPath(new URL("file:///foo/bar.txt")); - * console.log(path); // "/foo/bar.txt" - * ``` - */ - function fileURLToPath(url: URL | string): string; - - /** - * Fast incremental writer that becomes an {@link ArrayBuffer} on end(). - */ - class ArrayBufferSink { - start(options?: { - asUint8Array?: boolean; - /** - * Preallocate an internal buffer of this size - * This can significantly improve performance when the chunk size is small - */ - highWaterMark?: number; - /** - * On {@link ArrayBufferSink.flush}, return the written data as a `Uint8Array`. - * Writes will restart from the beginning of the buffer. - */ - stream?: boolean; - }): void; - - write(chunk: string | ArrayBufferView | ArrayBuffer | SharedArrayBuffer): number; - /** - * Flush the internal buffer - * - * If {@link ArrayBufferSink.start} was passed a `stream` option, this will return a `ArrayBuffer` - * If {@link ArrayBufferSink.start} was passed a `stream` option and `asUint8Array`, this will return a `Uint8Array` - * Otherwise, this will return the number of bytes written since the last flush - * - * This API might change later to separate Uint8ArraySink and ArrayBufferSink - */ - flush(): number | Uint8Array | ArrayBuffer; - end(): ArrayBuffer | Uint8Array; - } - - /** DNS Related APIs */ - namespace dns { - /** - * Lookup the IP address for a hostname - * - * Uses non-blocking APIs by default - * - * @param hostname The hostname to lookup - * @param options Options for the lookup - * - * @example - * ## Basic usage - * ```js - * const [{ address }] = await Bun.dns.lookup('example.com'); - * ``` - * - * ## Filter results to IPv4 - * ```js - * import { dns } from 'bun'; - * const [{ address }] = await dns.lookup('example.com', {family: 4}); - * console.log(address); // "123.122.22.126" - * ``` - * - * ## Filter results to IPv6 - * ```js - * import { dns } from 'bun'; - * const [{ address }] = await dns.lookup('example.com', {family: 6}); - * console.log(address); // "2001:db8::1" - * ``` - * - * ## DNS resolver client - * - * Bun supports three DNS resolvers: - * - `c-ares` - Uses the c-ares library to perform DNS resolution. This is the default on Linux. - * - `system` - Uses the system's non-blocking DNS resolver API if available, falls back to `getaddrinfo`. This is the default on macOS and the same as `getaddrinfo` on Linux. - * - `getaddrinfo` - Uses the posix standard `getaddrinfo` function. Will cause performance issues under concurrent loads. - * - * To customize the DNS resolver, pass a `backend` option to `dns.lookup`: - * ```js - * import { dns } from 'bun'; - * const [{ address }] = await dns.lookup('example.com', {backend: 'getaddrinfo'}); - * console.log(address); // "19.42.52.62" - * ``` - */ - function lookup( - hostname: string, - options?: { - /** - * Limit results to either IPv4, IPv6, or both - */ - family?: 4 | 6 | 0 | "IPv4" | "IPv6" | "any"; - /** - * Limit results to either UDP or TCP - */ - socketType?: "udp" | "tcp"; - flags?: number; - port?: number; - - /** - * The DNS resolver implementation to use - * - * Defaults to `"c-ares"` on Linux and `"system"` on macOS. This default - * may change in a future version of Bun if c-ares is not reliable - * enough. - * - * On macOS, `system` uses the builtin macOS [non-blocking DNS - * resolution - * API](https://opensource.apple.com/source/Libinfo/Libinfo-222.1/lookup.subproj/netdb_async.h.auto.html). - * - * On Linux, `system` is the same as `getaddrinfo`. - * - * `c-ares` is more performant on Linux in some high concurrency - * situations, but it lacks support support for mDNS (`*.local`, - * `*.localhost` domains) along with some other advanced features. If - * you run into issues using `c-ares`, you should try `system`. If the - * hostname ends with `.local` or `.localhost`, Bun will automatically - * use `system` instead of `c-ares`. - * - * [`getaddrinfo`](https://man7.org/linux/man-pages/man3/getaddrinfo.3.html) - * is the POSIX standard function for blocking DNS resolution. Bun runs - * it in Bun's thread pool, which is limited to `cpus / 2`. That means - * if you run a lot of concurrent DNS lookups, concurrent IO will - * potentially pause until the DNS lookups are done. - * - * On macOS, it shouldn't be necessary to use "`getaddrinfo`" because - * `"system"` uses the same API underneath (except non-blocking). - * - * On Windows, libuv's non-blocking DNS resolver is used by default, and - * when specifying backends "system", "libc", or "getaddrinfo". The c-ares - * backend isn't currently supported on Windows. - */ - backend?: "libc" | "c-ares" | "system" | "getaddrinfo"; - }, - ): Promise; - - /** - * - * **Experimental API** - * - * Prefetch a hostname. - * - * This will be used by fetch() and Bun.connect() to avoid DNS lookups. - * - * @param hostname The hostname to prefetch - * @param port The port to prefetch. Default is 443. Port helps distinguish between IPv6 vs IPv4-only connections. - * - * @example - * ```js - * import { dns } from 'bun'; - * dns.prefetch('example.com'); - * // ... something expensive - * await fetch('https://example.com'); - * ``` - */ - function prefetch(hostname: string, port?: number): void; - - /** - * **Experimental API** - */ - function getCacheStats(): { - /** - * The number of times a cached DNS entry that was already resolved was used. - */ - cacheHitsCompleted: number; - cacheHitsInflight: number; - cacheMisses: number; - size: number; - errors: number; - totalCount: number; - }; - - const ADDRCONFIG: number; - const ALL: number; - const V4MAPPED: number; - } - - interface DNSLookup { - /** - * The IP address of the host as a string in IPv4 or IPv6 format. - * - * @example "127.0.0.1" - * @example "192.168.0.1" - * @example "2001:4860:4860::8888" - */ - address: string; - family: 4 | 6; - - /** - * Time to live in seconds - * - * Only supported when using the `c-ares` DNS resolver via "backend" option - * to {@link dns.lookup}. Otherwise, it's 0. - */ - ttl: number; - } - - interface FileBlob extends BunFile {} - /** - * [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob) powered by the fastest system calls available for operating on files. - * - * This Blob is lazy. That means it won't do any work until you read from it. - * - * - `size` will not be valid until the contents of the file are read at least once. - * - `type` is auto-set based on the file extension when possible - * - * @category File System - * - * @example - * ```js - * const file = Bun.file("./hello.json"); - * console.log(file.type); // "application/json" - * console.log(await file.text()); // '{"hello":"world"}' - * ``` - * - * @example - * ```js - * await Bun.write( - * Bun.file("./hello.txt"), - * "Hello, world!" - * ); - * ``` - */ - interface BunFile extends Blob { - /** - * Offset any operation on the file starting at `begin` and ending at `end`. `end` is relative to 0 - * - * Similar to [`TypedArray.subarray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/subarray). Does not copy the file, open the file, or modify the file. - * - * If `begin` > 0, {@link Bun.write()} will be slower on macOS - * - * @param begin - start offset in bytes - * @param end - absolute offset in bytes (relative to 0) - * @param contentType - MIME type for the new BunFile - */ - slice(begin?: number, end?: number, contentType?: string): BunFile; - - /** - * Offset any operation on the file starting at `begin` - * - * Similar to [`TypedArray.subarray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/subarray). Does not copy the file, open the file, or modify the file. - * - * If `begin` > 0, {@link Bun.write}() will be slower on macOS - * - * @param begin - start offset in bytes - * @param contentType - MIME type for the new BunFile - */ - slice(begin?: number, contentType?: string): BunFile; - - /** - * Slice the file from the beginning to the end, optionally with a new MIME type. - * - * @param contentType - MIME type for the new BunFile - */ - slice(contentType?: string): BunFile; - - /** - * Incremental writer for files and pipes. - */ - writer(options?: { highWaterMark?: number }): FileSink; - - // TODO - // readonly readable: ReadableStream; - // readonly writable: WritableStream; - - /** - * A UNIX timestamp indicating when the file was last modified. - */ - lastModified: number; - /** - * The name or path of the file, as specified in the constructor. - */ - readonly name?: string; - - /** - * Does the file exist? - * - * This returns true for regular files and FIFOs. It returns false for - * directories. Note that a race condition can occur where the file is - * deleted or renamed after this is called but before you open it. - * - * This does a system call to check if the file exists, which can be - * slow. - * - * If using this in an HTTP server, it's faster to instead use `return new - * Response(Bun.file(path))` and then an `error` handler to handle - * exceptions. - * - * Instead of checking for a file's existence and then performing the - * operation, it is faster to just perform the operation and handle the - * error. - * - * For empty Blob, this always returns true. - */ - exists(): Promise; - - /** - * Write data to the file. This is equivalent to using {@link Bun.write} with a {@link BunFile}. - * @param data - The data to write. - * @param options - The options to use for the write. - */ - write( - data: string | ArrayBufferView | ArrayBuffer | SharedArrayBuffer | Request | Response | BunFile, - options?: { highWaterMark?: number }, - ): Promise; - - /** - * Deletes the file. - */ - unlink(): Promise; - - /** - * Deletes the file (same as unlink) - */ - delete(): Promise; - - /** - * Provides useful information about the file. - */ - stat(): Promise; - } - - type CSRFAlgorithm = "blake2b256" | "blake2b512" | "sha256" | "sha384" | "sha512" | "sha512-256"; - - interface CSRFGenerateOptions { - /** - * The number of milliseconds until the token expires. 0 means the token never expires. - * @default 24 * 60 * 60 * 1000 (24 hours) - */ - expiresIn?: number; - - /** - * The encoding of the token. - * @default "base64url" - */ - encoding?: "base64" | "base64url" | "hex"; - - /** - * The algorithm to use for the token. - * @default "sha256" - */ - algorithm?: CSRFAlgorithm; - } - - interface CSRFVerifyOptions { - /** - * The secret to use for the token. If not provided, a random default secret will be generated in memory and used. - */ - secret?: string; - - /** - * The encoding of the token. - * @default "base64url" - */ - encoding?: "base64" | "base64url" | "hex"; - - /** - * The algorithm to use for the token. - * @default "sha256" - */ - algorithm?: CSRFAlgorithm; - - /** - * The number of milliseconds until the token expires. 0 means the token never expires. - * @default 24 * 60 * 60 * 1000 (24 hours) - */ - maxAge?: number; - } - - /** - * Generate and verify CSRF tokens - * - * @category Security - */ - namespace CSRF { - /** - * Generate a CSRF token. - * @param secret The secret to use for the token. If not provided, a random default secret will be generated in memory and used. - * @param options The options for the token. - * @returns The generated token. - */ - function generate(secret?: string, options?: CSRFGenerateOptions): string; - - /** - * Verify a CSRF token. - * @param token The token to verify. - * @param options The options for the token. - * @returns True if the token is valid, false otherwise. - */ - function verify(token: string, options?: CSRFVerifyOptions): boolean; - } - - /** - * This lets you use macros as regular imports - * @example - * ``` - * { - * "react-relay": { - * "graphql": "bun-macro-relay/bun-macro-relay.tsx" - * } - * } - * ``` - */ - type MacroMap = Record>; - - /** - * Hash a string or array buffer using Wyhash - * - * This is not a cryptographic hash function. - * @param data The data to hash. - * @param seed The seed to use. - */ - const hash: (( - data: string | ArrayBufferView | ArrayBuffer | SharedArrayBuffer, - seed?: number | bigint, - ) => number | bigint) & - Hash; - - interface Hash { - wyhash: (data: string | ArrayBufferView | ArrayBuffer | SharedArrayBuffer, seed?: bigint) => bigint; - adler32: (data: string | ArrayBufferView | ArrayBuffer | SharedArrayBuffer) => number; - crc32: (data: string | ArrayBufferView | ArrayBuffer | SharedArrayBuffer) => number; - cityHash32: (data: string | ArrayBufferView | ArrayBuffer | SharedArrayBuffer) => number; - cityHash64: (data: string | ArrayBufferView | ArrayBuffer | SharedArrayBuffer, seed?: bigint) => bigint; - xxHash32: (data: string | ArrayBufferView | ArrayBuffer | SharedArrayBuffer, seed?: number) => number; - xxHash64: (data: string | ArrayBufferView | ArrayBuffer | SharedArrayBuffer, seed?: bigint) => bigint; - xxHash3: (data: string | ArrayBufferView | ArrayBuffer | SharedArrayBuffer, seed?: bigint) => bigint; - murmur32v3: (data: string | ArrayBufferView | ArrayBuffer | SharedArrayBuffer, seed?: number) => number; - murmur32v2: (data: string | ArrayBufferView | ArrayBuffer | SharedArrayBuffer, seed?: number) => number; - murmur64v2: (data: string | ArrayBufferView | ArrayBuffer | SharedArrayBuffer, seed?: bigint) => bigint; - rapidhash: (data: string | ArrayBufferView | ArrayBuffer | SharedArrayBuffer, seed?: bigint) => bigint; - } - - type JavaScriptLoader = "jsx" | "js" | "ts" | "tsx"; - - /** - * Fast deep-equality check two objects. - * - * This also powers expect().toEqual in `bun:test` - */ - function deepEquals( - a: any, - b: any, - /** @default false */ - strict?: boolean, - ): boolean; - - /** - * Returns true if all properties in the subset exist in the - * other and have equal values. - * - * This also powers expect().toMatchObject in `bun:test` - */ - function deepMatch(subset: unknown, a: unknown): boolean; - - /** - * tsconfig.json options supported by Bun - */ - interface TSConfig { - extends?: string; - compilerOptions?: { - paths?: Record; - baseUrl?: string; - /** "preserve" is not supported yet */ - jsx?: "preserve" | "react" | "react-jsx" | "react-jsxdev"; - jsxFactory?: string; - jsxFragmentFactory?: string; - jsxImportSource?: string; - useDefineForClassFields?: boolean; - importsNotUsedAsValues?: "remove" | "preserve" | "error"; - /** moduleSuffixes is not supported yet */ - moduleSuffixes?: any; - }; - } - - interface TranspilerOptions { - /** - * Replace key with value. Value must be a JSON string. - * @example - * ``` - * { "process.env.NODE_ENV": "\"production\"" } - * ``` - */ - define?: Record; - - /** What is the default loader used for this transpiler? */ - loader?: JavaScriptLoader; - - /** What platform are we targeting? This may affect how import and/or require is used */ - /** @example "browser" */ - target?: Target; - - /** - * TSConfig.json file as stringified JSON or an object - * Use this to set a custom JSX factory, fragment, or import source - * For example, if you want to use Preact instead of React. Or if you want to use Emotion. - */ - tsconfig?: string | TSConfig; - - /** - * Replace an import statement with a macro. - * - * This will remove the import statement from the final output - * and replace any function calls or template strings with the result returned by the macro - * - * @example - * ```json - * { - * "react-relay": { - * "graphql": "bun-macro-relay" - * } - * } - * ``` - * - * Code that calls `graphql` will be replaced with the result of the macro. - * - * ```js - * import {graphql} from "react-relay"; - * - * // Input: - * const query = graphql` - * query { - * ... on User { - * id - * } - * } - * }`; - * ``` - * - * Will be replaced with: - * - * ```js - * import UserQuery from "./UserQuery.graphql"; - * const query = UserQuery; - * ``` - */ - macro?: MacroMap; - - autoImportJSX?: boolean; - allowBunRuntime?: boolean; - exports?: { - eliminate?: string[]; - replace?: Record; - }; - treeShaking?: boolean; - trimUnusedImports?: boolean; - jsxOptimizationInline?: boolean; - - /** - * **Experimental** - * - * Minify whitespace and comments from the output. - */ - minifyWhitespace?: boolean; - /** - * **Experimental** - * - * Enabled by default, use this to disable dead code elimination. - * - * Some other transpiler options may still do some specific dead code elimination. - */ - deadCodeElimination?: boolean; - - /** - * This does two things (and possibly more in the future): - * 1. `const` declarations to primitive types (excluding Object/Array) at the top of a scope before any `let` or `var` declarations will be inlined into their usages. - * 2. `let` and `const` declarations only used once are inlined into their usages. - * - * JavaScript engines typically do these optimizations internally, however - * it might only happen much later in the compilation pipeline, after code - * has been executed many many times. - * - * This will typically shrink the output size of code, but it might increase - * it in some cases. Do your own benchmarks! - */ - inline?: boolean; - - /** - * @default "warn" - */ - logLevel?: "verbose" | "debug" | "info" | "warn" | "error"; - } - - /** - * Quickly transpile TypeScript, JSX, or JS to modern JavaScript. - * - * @example - * ```js - * const transpiler = new Bun.Transpiler(); - * transpiler.transformSync(` - * const App = () =>
Hello World
; - * export default App; - * `); - * // This outputs: - * const output = ` - * const App = () => jsx("div", { - * children: "Hello World" - * }, undefined, false, undefined, this); - * export default App; - * ` - * ``` - */ - - class Transpiler { - constructor(options?: TranspilerOptions); - - /** - * Transpile code from TypeScript or JSX into valid JavaScript. - * This function does not resolve imports. - * @param code The code to transpile - */ - transform(code: Bun.StringOrBuffer, loader?: JavaScriptLoader): Promise; - /** - * Transpile code from TypeScript or JSX into valid JavaScript. - * This function does not resolve imports. - * @param code The code to transpile - */ - transformSync(code: Bun.StringOrBuffer, loader: JavaScriptLoader, ctx: object): string; - /** - * Transpile code from TypeScript or JSX into valid JavaScript. - * This function does not resolve imports. - * @param code The code to transpile - * @param ctx An object to pass to macros - */ - transformSync(code: Bun.StringOrBuffer, ctx: object): string; - - /** - * Transpile code from TypeScript or JSX into valid JavaScript. - * This function does not resolve imports. - * @param code The code to transpile - */ - transformSync(code: Bun.StringOrBuffer, loader?: JavaScriptLoader): string; - - /** - * Get a list of import paths and paths from a TypeScript, JSX, TSX, or JavaScript file. - * @param code The code to scan - * @example - * ```js - * const {imports, exports} = transpiler.scan(` - * import {foo} from "baz"; - * export const hello = "hi!"; - * `); - * - * console.log(imports); // ["baz"] - * console.log(exports); // ["hello"] - * ``` - */ - scan(code: Bun.StringOrBuffer): { exports: string[]; imports: Import[] }; - - /** - * Get a list of import paths from a TypeScript, JSX, TSX, or JavaScript file. - * @param code The code to scan - * @example - * ```js - * const imports = transpiler.scanImports(` - * import {foo} from "baz"; - * import type {FooType} from "bar"; - * import type {DogeType} from "wolf"; - * `); - * - * console.log(imports); // ["baz"] - * ``` - * This is a fast path which performs less work than `scan`. - */ - scanImports(code: Bun.StringOrBuffer): Import[]; - } - - type ImportKind = - | "import-statement" - | "require-call" - | "require-resolve" - | "dynamic-import" - | "import-rule" - | "url-token" - | "internal" - | "entry-point-run" - | "entry-point-build"; - - interface Import { - path: string; - kind: ImportKind; - } - - namespace Build { - type Architecture = "x64" | "arm64"; - type Libc = "glibc" | "musl"; - type SIMD = "baseline" | "modern"; - type Target = - | `bun-darwin-${Architecture}` - | `bun-darwin-x64-${SIMD}` - | `bun-linux-${Architecture}` - | `bun-linux-${Architecture}-${Libc}` - | "bun-windows-x64" - | `bun-windows-x64-${SIMD}` - | `bun-linux-x64-${SIMD}-${Libc}`; - } - - /** - * @see [Bun.build API docs](https://bun.com/docs/bundler#api) - */ - interface BuildConfigBase { - /** - * List of entrypoints, usually file paths - */ - entrypoints: string[]; - - /** - * @default "browser" - */ - target?: Target; // default: "browser" - - /** - * Output module format. Top-level await is only supported for `"esm"`. - * - * Can be: - * - `"esm"` - * - `"cjs"` (**experimental**) - * - `"iife"` (**experimental**) - * - * @default "esm" - */ - format?: /** - * ECMAScript Module format - */ - | "esm" - /** - * CommonJS format - * **Experimental** - */ - | "cjs" - /** - * IIFE format - * **Experimental** - */ - | "iife"; - naming?: - | string - | { - chunk?: string; - entry?: string; - asset?: string; - }; // | string; - root?: string; // project root - plugins?: BunPlugin[]; - // manifest?: boolean; // whether to return manifest - external?: string[]; - packages?: "bundle" | "external"; - publicPath?: string; - define?: Record; - // origin?: string; // e.g. http://mydomain.com - loader?: { [k in string]: Loader }; - /** - * Specifies if and how to generate source maps. - * - * - `"none"` - No source maps are generated - * - `"linked"` - A separate `*.ext.map` file is generated alongside each - * `*.ext` file. A `//# sourceMappingURL` comment is added to the output - * file to link the two. Requires `outdir` to be set. - * - `"inline"` - an inline source map is appended to the output file. - * - `"external"` - Generate a separate source map file for each input file. - * No `//# sourceMappingURL` comment is added to the output file. - * - * `true` and `false` are aliases for `"inline"` and `"none"`, respectively. - * - * @default "none" - * - * @see {@link outdir} required for `"linked"` maps - * @see {@link publicPath} to customize the base url of linked source maps - */ - sourcemap?: "none" | "linked" | "inline" | "external" | boolean; - - /** - * package.json `exports` conditions used when resolving imports - * - * Equivalent to `--conditions` in `bun build` or `bun run`. - * - * https://nodejs.org/api/packages.html#exports - */ - conditions?: Array | string; - - /** - * Controls how environment variables are handled during bundling. - * - * Can be one of: - * - `"inline"`: Injects environment variables into the bundled output by converting `process.env.FOO` - * references to string literals containing the actual environment variable values - * - `"disable"`: Disables environment variable injection entirely - * - A string ending in `*`: Inlines environment variables that match the given prefix. - * For example, `"MY_PUBLIC_*"` will only include env vars starting with "MY_PUBLIC_" - * - * @example - * ```ts - * Bun.build({ - * env: "MY_PUBLIC_*", - * entrypoints: ["src/index.ts"], - * }) - * ``` - */ - env?: "inline" | "disable" | `${string}*`; - - /** - * Whether to enable minification. - * - * Use `true`/`false` to enable/disable all minification options. Alternatively, - * you can pass an object for granular control over certain minifications. - * - * @default false - */ - minify?: - | boolean - | { - whitespace?: boolean; - syntax?: boolean; - identifiers?: boolean; - keepNames?: boolean; - }; - - /** - * Ignore dead code elimination/tree-shaking annotations such as @__PURE__ and package.json - * "sideEffects" fields. This should only be used as a temporary workaround for incorrect - * annotations in libraries. - */ - ignoreDCEAnnotations?: boolean; - - /** - * Force emitting @__PURE__ annotations even if minify.whitespace is true. - */ - emitDCEAnnotations?: boolean; - - // treeshaking?: boolean; - - // jsx?: - // | "automatic" - // | "classic" - // | /* later: "preserve" */ { - // runtime?: "automatic" | "classic"; // later: "preserve" - // /** Only works when runtime=classic */ - // factory?: string; // default: "React.createElement" - // /** Only works when runtime=classic */ - // fragment?: string; // default: "React.Fragment" - // /** Only works when runtime=automatic */ - // importSource?: string; // default: "react" - // }; - - /** - * Generate bytecode for the output. This can dramatically improve cold - * start times, but will make the final output larger and slightly increase - * memory usage. - * - * Bytecode is currently only supported for CommonJS (`format: "cjs"`). - * - * Must be `target: "bun"` - * @default false - */ - bytecode?: boolean; - - /** - * Add a banner to the bundled code such as "use client"; - */ - banner?: string; - - /** - * Add a footer to the bundled code such as a comment block like - * - * `// made with bun!` - */ - footer?: string; - - /** - * Drop function calls to matching property accesses. - */ - drop?: string[]; - - /** - * Enable feature flags for dead-code elimination via `import { feature } from "bun:bundle"`. - * - * When `feature("FLAG_NAME")` is called, it returns `true` if FLAG_NAME is in this array, - * or `false` otherwise. This enables static dead-code elimination at bundle time. - * - * Equivalent to the CLI `--feature` flag. - * - * @example - * ```ts - * await Bun.build({ - * entrypoints: ['./src/index.ts'], - * features: ['FEATURE_A', 'FEATURE_B'], - * }); - * ``` - */ - features?: string[]; - - /** - * - When set to `true`, the returned promise rejects with an AggregateError when a build failure happens. - * - When set to `false`, returns a {@link BuildOutput} with `{success: false}` - * - * @default true - */ - throw?: boolean; - - /** - * Custom tsconfig.json file path to use for path resolution. - * Equivalent to `--tsconfig-override` in the CLI. - * @example - * ```ts - * await Bun.build({ - * entrypoints: ['./src/index.ts'], - * tsconfig: './custom-tsconfig.json' - * }); - * ``` - */ - tsconfig?: string; - - /** - * JSX configuration options - */ - jsx?: { - runtime?: "automatic" | "classic"; - importSource?: string; - factory?: string; - fragment?: string; - sideEffects?: boolean; - development?: boolean; - }; - - outdir?: string; - } - - interface CompileBuildOptions { - target?: Bun.Build.Target; - execArgv?: string[]; - executablePath?: string; - outfile?: string; - /** - * Whether to autoload .env files when the standalone executable runs - * - * Standalone-only: applies only when building/running the standalone executable. - * - * Equivalent CLI flags: `--compile-autoload-dotenv`, `--no-compile-autoload-dotenv` - * - * @default true - */ - autoloadDotenv?: boolean; - /** - * Whether to autoload bunfig.toml when the standalone executable runs - * - * Standalone-only: applies only when building/running the standalone executable. - * - * Equivalent CLI flags: `--compile-autoload-bunfig`, `--no-compile-autoload-bunfig` - * - * @default true - */ - autoloadBunfig?: boolean; - windows?: { - hideConsole?: boolean; - icon?: string; - title?: string; - publisher?: string; - version?: string; - description?: string; - copyright?: string; - }; - } - - // Compile build config - uses outfile for executable output - interface CompileBuildConfig extends BuildConfigBase { - /** - * Create a standalone executable - * - * When `true`, creates an executable for the current platform. - * When a target string, creates an executable for that platform. - * - * @example - * ```ts - * // Create executable for current platform - * await Bun.build({ - * entrypoints: ['./app.js'], - * compile: { - * target: 'linux-x64', - * }, - * outfile: './my-app' - * }); - * - * // Cross-compile for Linux x64 - * await Bun.build({ - * entrypoints: ['./app.js'], - * compile: 'linux-x64', - * outfile: './my-app' - * }); - * ``` - */ - compile: boolean | Bun.Build.Target | CompileBuildOptions; - - /** - * Splitting is not currently supported with `.compile` - */ - splitting?: never; - } - - interface NormalBuildConfig extends BuildConfigBase { - /** - * Enable code splitting - * - * This does not currently work with {@link CompileBuildConfig.compile `compile`} - * - * @default true - */ - splitting?: boolean; - } - - /** - * @see [Bun.build API docs](https://bun.com/docs/bundler#api) - */ - type BuildConfig = CompileBuildConfig | NormalBuildConfig; - - /** - * Hash and verify passwords using argon2 or bcrypt - * - * These are fast APIs that can run in a worker thread if used asynchronously. - * - * @see [Bun.password API docs](https://bun.com/guides/util/hash-a-password) - * - * @category Security - */ - namespace Password { - interface Argon2Algorithm { - algorithm: "argon2id" | "argon2d" | "argon2i"; - - /** - * Memory cost, which defines the memory usage, given in kibibytes. - */ - memoryCost?: number; - /** - * Defines the amount of computation realized and therefore the execution - * time, given in number of iterations. - */ - timeCost?: number; - } - - interface BCryptAlgorithm { - algorithm: "bcrypt"; - - /** - * A number between 4 and 31. The default is 10. - */ - cost?: number; - } - - type AlgorithmLabel = (BCryptAlgorithm | Argon2Algorithm)["algorithm"]; - } - - /** - * Hash and verify passwords using argon2 or bcrypt. The default is argon2. - * Password hashing functions are necessarily slow, and this object will - * automatically run in a worker thread. - * - * @see [Bun.password API docs](https://bun.com/guides/util/hash-a-password) - * - * The underlying implementation of these functions are provided by the Zig - * Standard Library. Thanks to \@jedisct1 and other Zig contributors for their - * work on this. - * - * @example - * **Example with argon2** - * ```ts - * import {password} from "bun"; - * - * const hash = await password.hash("hello world"); - * const verify = await password.verify("hello world", hash); - * console.log(verify); // true - * ``` - * - * **Example with bcrypt** - * ```ts - * import {password} from "bun"; - * - * const hash = await password.hash("hello world", "bcrypt"); - * // algorithm is optional, will be inferred from the hash if not specified - * const verify = await password.verify("hello world", hash, "bcrypt"); - * - * console.log(verify); // true - * ``` - * - * @category Security - */ - const password: { - /** - * Verify a password against a previously hashed password. - * - * @returns true if the password matches, false otherwise - * - * @example - * ```ts - * import {password} from "bun"; - * await password.verify("hey", "$argon2id$v=19$m=65536,t=2,p=1$ddbcyBcbAcagei7wSkZFiouX6TqnUQHmTyS5mxGCzeM$+3OIaFatZ3n6LtMhUlfWbgJyNp7h8/oIsLK+LzZO+WI"); - * // true - * ``` - * - * @throws If the algorithm is specified and does not match the hash - * @throws If the algorithm is invalid - * @throws if the hash is invalid - */ - verify( - /** - * The password to verify. - * - * If empty, always returns false - */ - password: Bun.StringOrBuffer, - /** - * Previously hashed password. - * If empty, always returns false - */ - hash: Bun.StringOrBuffer, - /** - * If not specified, the algorithm will be inferred from the hash. - * - * If specified and the algorithm does not match the hash, this function - * throws an error. - */ - algorithm?: Password.AlgorithmLabel, - ): Promise; - /** - * Asynchronously hash a password using argon2 or bcrypt. The default is argon2. - * - * @returns A promise that resolves to the hashed password - * - * @example - * **Example with argon2** - * ```ts - * import {password} from "bun"; - * const hash = await password.hash("hello world"); - * console.log(hash); // $argon2id$v=1... - * const verify = await password.verify("hello world", hash); - * ``` - * - * **Example with bcrypt** - * ```ts - * import {password} from "bun"; - * const hash = await password.hash("hello world", "bcrypt"); - * console.log(hash); // $2b$10$... - * const verify = await password.verify("hello world", hash); - * ``` - */ - hash( - /** - * The password to hash - * - * If empty, this function throws an error. It is usually a programming - * mistake to hash an empty password. - */ - password: Bun.StringOrBuffer, - /** - * When using bcrypt, passwords exceeding 72 characters will be SHA512'd before - * - * @default "argon2id" - */ - algorithm?: Password.AlgorithmLabel | Password.Argon2Algorithm | Password.BCryptAlgorithm, - ): Promise; - - /** - * Synchronously hash and verify passwords using argon2 or bcrypt. The default is argon2. - * Warning: password hashing is slow, consider using {@link Bun.password.verify} - * instead which runs in a worker thread. - * - * The underlying implementation of these functions are provided by the Zig - * Standard Library. Thanks to \@jedisct1 and other Zig contributors for their - * work on this. - * - * @example - * **Example with argon2** - * ```ts - * import {password} from "bun"; - * - * const hash = await password.hashSync("hello world"); - * const verify = await password.verifySync("hello world", hash); - * console.log(verify); // true - * ``` - * - * **Example with bcrypt** - * ```ts - * import {password} from "bun"; - * - * const hash = await password.hashSync("hello world", "bcrypt"); - * // algorithm is optional, will be inferred from the hash if not specified - * const verify = await password.verifySync("hello world", hash, "bcrypt"); - * - * console.log(verify); // true - * ``` - */ - verifySync( - /** - * The password to verify. - */ - password: Bun.StringOrBuffer, - /** - * The hash to verify against. - */ - hash: Bun.StringOrBuffer, - /** - * If not specified, the algorithm will be inferred from the hash. - */ - algorithm?: Password.AlgorithmLabel, - ): boolean; - - /** - * Synchronously hash and verify passwords using argon2 or bcrypt. The default is argon2. - * Warning: password hashing is slow, consider using {@link Bun.password.hash} - * instead which runs in a worker thread. - * - * The underlying implementation of these functions are provided by the Zig - * Standard Library. Thanks to \@jedisct1 and other Zig contributors for their - * work on this. - * - * @example - * **Example with argon2** - * ```ts - * import {password} from "bun"; - * - * const hash = await password.hashSync("hello world"); - * const verify = await password.verifySync("hello world", hash); - * console.log(verify); // true - * ``` - * - * **Example with bcrypt** - * ```ts - * import {password} from "bun"; - * - * const hash = await password.hashSync("hello world", "bcrypt"); - * // algorithm is optional, will be inferred from the hash if not specified - * const verify = await password.verifySync("hello world", hash, "bcrypt"); - * - * console.log(verify); // true - * ``` - */ - hashSync( - /** - * The password to hash - * - * If empty, this function throws an error. It is usually a programming - * mistake to hash an empty password. - */ - password: Bun.StringOrBuffer, - - /** - * When using bcrypt, passwords exceeding 72 characters will be SHA256'd before - * - * @default "argon2id" - */ - algorithm?: Password.AlgorithmLabel | Password.Argon2Algorithm | Password.BCryptAlgorithm, - ): string; - }; - - /** - * Securely store and retrieve sensitive credentials using the operating system's native credential storage. - * - * Uses platform-specific secure storage: - * - **macOS**: Keychain Services - * - **Linux**: libsecret (GNOME Keyring, KWallet, etc.) - * - **Windows**: Windows Credential Manager - * - * @category Security - * - * @example - * ```ts - * import { secrets } from "bun"; - * - * // Store a credential - * await secrets.set({ - * service: "my-cli-tool", - * name: "github-token", - * value: "ghp_xxxxxxxxxxxxxxxxxxxx" - * }); - * - * // Retrieve a credential - * const token = await secrets.get({ - * service: "my-cli-tool", - * name: "github-token" - * }); - * - * if (token) { - * console.log("Token found:", token); - * } else { - * console.log("Token not found"); - * } - * - * // Delete a credential - * const deleted = await secrets.delete({ - * service: "my-cli-tool", - * name: "github-token" - * }); - * console.log("Deleted:", deleted); // true if deleted, false if not found - * ``` - * - * @example - * ```ts - * // Replace plaintext config files - * import { secrets } from "bun"; - * - * // Instead of storing in ~/.npmrc - * await secrets.set({ - * service: "npm-registry", - * name: "https://registry.npmjs.org", - * value: "npm_xxxxxxxxxxxxxxxxxxxx" - * }); - * - * // Instead of storing in ~/.aws/credentials - * await secrets.set({ - * service: "aws-cli", - * name: "default", - * value: process.env.AWS_SECRET_ACCESS_KEY - * }); - * - * // Load at runtime with fallback - * const apiKey = await secrets.get({ - * service: "my-app", - * name: "api-key" - * }) || process.env.API_KEY; - * ``` - */ - const secrets: { - /** - * Retrieve a stored credential from the operating system's secure storage. - * - * @param options - The service and name identifying the credential - * @returns The stored credential value, or null if not found - * - * @example - * ```ts - * const password = await Bun.secrets.get({ - * service: "my-database", - * name: "admin" - * }); - * - * if (password) { - * await connectToDatabase(password); - * } - * ``` - * - * @example - * ```ts - * // Check multiple possible locations - * const token = - * await Bun.secrets.get({ service: "github", name: "token" }) || - * await Bun.secrets.get({ service: "gh-cli", name: "github.com" }) || - * process.env.GITHUB_TOKEN; - * ``` - */ - get(options: { - /** - * The service or application name. - * - * Use a unique identifier for your application to avoid conflicts. - * Consider using reverse domain notation for production apps (e.g., "com.example.myapp"). - */ - service: string; - - /** - * The account name, username, or resource identifier. - * - * This identifies the specific credential within the service. - * Common patterns include usernames, email addresses, or resource URLs. - */ - name: string; - }): Promise; - - /** - * Store or update a credential in the operating system's secure storage. - * - * If a credential already exists for the given service/name combination, it will be replaced. - * The credential is encrypted by the operating system and only accessible to the current user. - * - * @param options - The service and name identifying the credential - * @param value - The secret value to store (e.g., password, API key, token) - * - * @example - * ```ts - * // Store an API key - * await Bun.secrets.set({ - * service: "openai-api", - * name: "production", - * value: "sk-proj-xxxxxxxxxxxxxxxxxxxx" - * }); - * ``` - * - * @example - * ```ts - * // Update an existing credential - * const newPassword = generateSecurePassword(); - * await Bun.secrets.set({ - * service: "email-server", - * name: "admin@example.com", - * value: newPassword - * }); - * ``` - * - * @example - * ```ts - * // Store credentials from environment variables - * if (process.env.DATABASE_PASSWORD) { - * await Bun.secrets.set({ - * service: "postgres", - * name: "production", - * value: process.env.DATABASE_PASSWORD - * }); - * delete process.env.DATABASE_PASSWORD; // Remove from memory - * } - * ``` - * - * @example - * ```ts - * // Delete a credential using empty string (equivalent to delete()) - * await Bun.secrets.set({ - * service: "my-service", - * name: "api-key", - * value: "" // Empty string deletes the credential - * }); - * ``` - * - * @example - * ```ts - * // Store credential with unrestricted access for CI environments - * await Bun.secrets.set({ - * service: "github-actions", - * name: "deploy-token", - * value: process.env.DEPLOY_TOKEN, - * allowUnrestrictedAccess: true // Allows access without user interaction on macOS - * }); - * ``` - */ - set(options: { - /** - * The service or application name. - * - * Use a unique identifier for your application to avoid conflicts. - * Consider using reverse domain notation for production apps (e.g., "com.example.myapp"). - */ - service: string; - - /** - * The account name, username, or resource identifier. - * - * This identifies the specific credential within the service. - * Common patterns include usernames, email addresses, or resource URLs. - */ - name: string; - - /** - * The secret value to store. - * - * This should be a sensitive credential like a password, API key, or token. - * The value is encrypted by the operating system before storage. - * - * Note: To delete a credential, use the delete() method or pass an empty string. - * An empty string value will delete the credential if it exists. - */ - value: string; - - /** - * Allow unrestricted access to stored credentials on macOS. - * - * When true, allows all applications to access this keychain item without user interaction. - * This is useful for CI environments but reduces security. - * - * @default false - * @platform macOS - Only affects macOS keychain behavior. Ignored on other platforms. - */ - allowUnrestrictedAccess?: boolean; - }): Promise; - - /** - * Delete a stored credential from the operating system's secure storage. - * - * @param options - The service and name identifying the credential - * @returns true if a credential was deleted, false if not found - * - * @example - * ```ts - * // Delete a single credential - * const deleted = await Bun.secrets.delete({ - * service: "my-app", - * name: "api-key" - * }); - * - * if (deleted) { - * console.log("Credential removed successfully"); - * } else { - * console.log("Credential was not found"); - * } - * ``` - * - * @example - * ```ts - * // Clean up multiple credentials - * const services = ["github", "npm", "docker"]; - * for (const service of services) { - * await Bun.secrets.delete({ - * service, - * name: "token" - * }); - * } - * ``` - * - * @example - * ```ts - * // Clean up on uninstall - * if (process.argv.includes("--uninstall")) { - * const deleted = await Bun.secrets.delete({ - * service: "my-cli-tool", - * name: "config" - * }); - * process.exit(deleted ? 0 : 1); - * } - * ``` - */ - delete(options: { - /** - * The service or application name. - * - * Use a unique identifier for your application to avoid conflicts. - * Consider using reverse domain notation for production apps (e.g., "com.example.myapp"). - */ - service: string; - - /** - * The account name, username, or resource identifier. - * - * This identifies the specific credential within the service. - * Common patterns include usernames, email addresses, or resource URLs. - */ - name: string; - }): Promise; - }; - - /** - * A build artifact represents a file that was generated by the bundler @see {@link Bun.build} - * - * @category Bundler - */ - interface BuildArtifact extends Blob { - path: string; - loader: Loader; - hash: string | null; - kind: "entry-point" | "chunk" | "asset" | "sourcemap" | "bytecode"; - sourcemap: BuildArtifact | null; - } - - /** - * The output of a build - * - * @category Bundler - */ - interface BuildOutput { - outputs: BuildArtifact[]; - success: boolean; - logs: Array; - } - - /** - * Bundles JavaScript, TypeScript, CSS, HTML and other supported files into optimized outputs. - * - * @param config - Build configuration options - * @returns Promise that resolves to build output containing generated artifacts and build status - * @throws {AggregateError} When build fails and config.throw is true (default in Bun 1.2+) - * - * @category Bundler - * - * @example - * Basic usage - Bundle a single entrypoint and check results - *```ts - * const result = await Bun.build({ - * entrypoints: ['./src/index.tsx'], - * outdir: './dist' - * }); - * - * if (!result.success) { - * console.error('Build failed:', result.logs); - * process.exit(1); - * } - *``` - * - * @example - * Set up multiple entrypoints with code splitting enabled - *```ts - * await Bun.build({ - * entrypoints: ['./src/app.tsx', './src/admin.tsx'], - * outdir: './dist', - * splitting: true, - * sourcemap: "external" - * }); - *``` - * - * @example - * Configure minification and optimization settings - *```ts - * await Bun.build({ - * entrypoints: ['./src/index.tsx'], - * outdir: './dist', - * minify: { - * whitespace: true, - * identifiers: true, - * syntax: true - * }, - * drop: ['console', 'debugger'] - * }); - *``` - * - * @example - * Set up custom loaders and mark packages as external - *```ts - * await Bun.build({ - * entrypoints: ['./src/index.tsx'], - * outdir: './dist', - * loader: { - * '.png': 'dataurl', - * '.svg': 'file', - * '.txt': 'text', - * '.json': 'json' - * }, - * external: ['react', 'react-dom'] - * }); - *``` - * - * @example - * Configure environment variable handling with different modes - *```ts - * // Inline all environment variables - * await Bun.build({ - * entrypoints: ['./src/index.tsx'], - * outdir: './dist', - * env: 'inline' - * }); - * - * // Only include specific env vars - * await Bun.build({ - * entrypoints: ['./src/index.tsx'], - * outdir: './dist', - * env: 'PUBLIC_*' - * }); - *``` - * - * @example - * Set up custom naming patterns for all output types - *```ts - * await Bun.build({ - * entrypoints: ['./src/index.tsx'], - * outdir: './dist', - * naming: { - * entry: '[dir]/[name]-[hash].[ext]', - * chunk: 'chunks/[name]-[hash].[ext]', - * asset: 'assets/[name]-[hash].[ext]' - * } - * }); - *``` - * - * @example - * Work with build artifacts in different formats - *```ts - * const result = await Bun.build({ - * entrypoints: ['./src/index.tsx'] - * }); - * for (const artifact of result.outputs) { - * const text = await artifact.text(); - * const buffer = await artifact.arrayBuffer(); - * const bytes = await artifact.bytes(); - * new Response(artifact); - * await Bun.write(artifact.path, artifact); - * } - *``` - * - * @example - * Implement comprehensive error handling with position info - *```ts - * try { - * const result = await Bun.build({ - * entrypoints: ['./src/index.tsx'], - * }); - * } catch (e) { - * const error = e as AggregateError; - * console.error('Build failed:'); - * for (const msg of error.errors) { - * if ('position' in msg) { - * console.error( - * `${msg.message} at ${msg.position?.file}:${msg.position?.line}:${msg.position?.column}` - * ); - * } else { - * console.error(msg.message); - * } - * } - * } - *``` - * - * @example - * Set up Node.js target with specific configurations - *```ts - * await Bun.build({ - * entrypoints: ['./src/server.ts'], - * outdir: './dist', - * target: 'node', - * format: 'cjs', - * sourcemap: 'external', - * minify: false, - * packages: 'external' - * }); - *``` - * - * @example - * Configure experimental CSS bundling with multiple themes - *```ts - * await Bun.build({ - * entrypoints: [ - * './src/styles.css', - * './src/themes/dark.css', - * './src/themes/light.css' - * ], - * outdir: './dist/css', - * }); - *``` - * - * @example - * Define compile-time constants and version information - *```ts - * await Bun.build({ - * entrypoints: ['./src/index.tsx'], - * outdir: './dist', - * define: { - * 'process.env.NODE_ENV': JSON.stringify('production'), - * 'CONSTANTS.VERSION': JSON.stringify('1.0.0'), - * 'CONSTANTS.BUILD_TIME': JSON.stringify(new Date().toISOString()) - * } - * }); - *``` - * - * @example - * Create a custom plugin for handling special file types - *```ts - * await Bun.build({ - * entrypoints: ['./src/index.tsx'], - * outdir: './dist', - * plugins: [ - * { - * name: 'my-plugin', - * setup(build) { - * build.onLoad({ filter: /\.custom$/ }, async (args) => { - * const content = await Bun.file(args.path).text(); - * return { - * contents: `export default ${JSON.stringify(content)}`, - * loader: 'js' - * }; - * }); - * } - * } - * ] - * }); - *``` - * - * @example - * Enable bytecode generation for faster startup - *```ts - * await Bun.build({ - * entrypoints: ['./src/server.ts'], - * outdir: './dist', - * target: 'bun', - * format: 'cjs', - * bytecode: true - * }); - *``` - * - * @example - * Add custom banner and footer to output files - *```ts - * await Bun.build({ - * entrypoints: ['./src/index.tsx'], - * outdir: './dist', - * banner: '"use client";\n// Built with Bun', - * footer: '// Generated on ' + new Date().toISOString() - * }); - *``` - * - * @example - * Configure CDN public path for asset loading - *```ts - * await Bun.build({ - * entrypoints: ['./src/index.tsx'], - * outdir: './dist', - * publicPath: 'https://cdn.example.com/assets/', - * loader: { - * '.png': 'file', - * '.svg': 'file' - * } - * }); - *``` - * - * @example - * Set up package export conditions for different environments - *```ts - * await Bun.build({ - * entrypoints: ['./src/index.tsx'], - * outdir: './dist', - * conditions: ['production', 'browser', 'module'], - * packages: 'external' - * }); - *``` - */ - function build(config: BuildConfig): Promise; - - interface ErrorLike extends Error { - code?: string; - errno?: number; - syscall?: string; - } - - /** - * Options for TLS connections - */ - interface TLSOptions { - /** - * Passphrase for the TLS key - */ - passphrase?: string; - - /** - * File path to a .pem file custom Diffie Helman parameters - */ - dhParamsFile?: string; - - /** - * Explicitly set a server name - */ - serverName?: string; - - /** - * This sets `OPENSSL_RELEASE_BUFFERS` to 1. - * It reduces overall performance but saves some memory. - * @default false - */ - lowMemoryMode?: boolean; - - /** - * If set to `false`, any certificate is accepted. - * Default is `$NODE_TLS_REJECT_UNAUTHORIZED` environment variable, or `true` if it is not set. - */ - rejectUnauthorized?: boolean; - - /** - * If set to `true`, the server will request a client certificate. - * - * Default is `false`. - */ - requestCert?: boolean; - - /** - * Optionally override the trusted CA certificates. Default is to trust - * the well-known CAs curated by Mozilla. Mozilla's CAs are completely - * replaced when CAs are explicitly specified using this option. - */ - ca?: string | BufferSource | BunFile | Array | undefined; - /** - * Cert chains in PEM format. One cert chain should be provided per - * private key. Each cert chain should consist of the PEM formatted - * certificate for a provided private key, followed by the PEM - * formatted intermediate certificates (if any), in order, and not - * including the root CA (the root CA must be pre-known to the peer, - * see ca). When providing multiple cert chains, they do not have to - * be in the same order as their private keys in key. If the - * intermediate certificates are not provided, the peer will not be - * able to validate the certificate, and the handshake will fail. - */ - cert?: string | BufferSource | BunFile | Array | undefined; - /** - * Private keys in PEM format. PEM allows the option of private keys - * being encrypted. Encrypted keys will be decrypted with - * options.passphrase. Multiple keys using different algorithms can be - * provided either as an array of unencrypted key strings or buffers, - * or an array of objects in the form {pem: [, - * passphrase: ]}. The object form can only occur in an array. - * object.passphrase is optional. Encrypted keys will be decrypted with - * object.passphrase if provided, or options.passphrase if it is not. - */ - key?: string | BufferSource | BunFile | Array | undefined; - /** - * Optionally affect the OpenSSL protocol behavior, which is not - * usually necessary. This should be used carefully if at all! Value is - * a numeric bitmask of the SSL_OP_* options from OpenSSL Options - */ - secureOptions?: number | undefined; // Value is a numeric bitmask of the `SSL_OP_*` options - - ALPNProtocols?: string | BufferSource; - - ciphers?: string; - - clientRenegotiationLimit?: number; - - clientRenegotiationWindow?: number; - } - - interface SocketAddress { - /** - * The IP address of the client. - */ - address: string; - - /** - * The port of the client. - */ - port: number; - - /** - * The IP family ("IPv4" or "IPv6"). - */ - family: "IPv4" | "IPv6"; - } - - /** - * [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob) powered by the fastest system calls available for operating on files. - * - * This Blob is lazy. That means it won't do any work until you read from it. - * - * - `size` will not be valid until the contents of the file are read at least once. - * - `type` is auto-set based on the file extension when possible - * - * @example - * ```js - * const file = Bun.file("./hello.json"); - * console.log(file.type); // "application/json" - * console.log(await file.json()); // { hello: "world" } - * ``` - * - * @example - * ```js - * await Bun.write( - * Bun.file("./hello.txt"), - * "Hello, world!" - * ); - * ``` - * @param path The path to the file (lazily loaded) if the path starts with `s3://` it will behave like {@link S3File} - */ - function file(path: string | URL, options?: BlobPropertyBag): BunFile; - - /** - * A list of files embedded into the standalone executable. Lexigraphically sorted by name. - * - * If the process is not a standalone executable, this returns an empty array. - */ - const embeddedFiles: ReadonlyArray; - - /** - * `Blob` that leverages the fastest system calls available to operate on files. - * - * This Blob is lazy. It won't do any work until you read from it. Errors propagate as promise rejections. - * - * `Blob.size` will not be valid until the contents of the file are read at least once. - * `Blob.type` will have a default set based on the file extension - * - * @example - * ```js - * const file = Bun.file(new TextEncoder.encode("./hello.json")); - * console.log(file.type); // "application/json" - * ``` - * - * @param path The path to the file as a byte buffer (the buffer is copied) if the path starts with `s3://` it will behave like {@link S3File} - */ - function file(path: ArrayBufferLike | Uint8Array, options?: BlobPropertyBag): BunFile; - - /** - * [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob) powered by the fastest system calls available for operating on files. - * - * This Blob is lazy. That means it won't do any work until you read from it. - * - * - `size` will not be valid until the contents of the file are read at least once. - * - * @example - * ```js - * const file = Bun.file(fd); - * ``` - * - * @param fileDescriptor The file descriptor of the file - */ - function file(fileDescriptor: number, options?: BlobPropertyBag): BunFile; - - /** - * Allocate a new [`Uint8Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) without zeroing the bytes. - * - * This can be 3.5x faster than `new Uint8Array(size)`, but if you send uninitialized memory to your users (even unintentionally), it can potentially leak anything recently in memory. - */ - function allocUnsafe(size: number): Uint8Array; - - /** - * Options for `Bun.inspect` - */ - interface BunInspectOptions { - /** - * Whether to colorize the output - */ - colors?: boolean; - /** - * The depth of the inspection - */ - depth?: number; - /** - * Whether to sort the properties of the object - */ - sorted?: boolean; - /** - * Whether to compact the output - */ - compact?: boolean; - } - - type WebSocketOptionsProtocolsOrProtocol = - | { - /** - * Protocols to use for the WebSocket connection - */ - protocols?: string | string[]; - } - | { - /** - * Protocol to use for the WebSocket connection - */ - protocol?: string; - }; - - type WebSocketOptionsTLS = { - /** - * Options for the TLS connection - */ - tls?: { - /** - * Whether to reject the connection if the certificate is not valid - * - * @default true - */ - rejectUnauthorized?: boolean; - }; - }; - - type WebSocketOptionsHeaders = { - /** - * Headers to send to the server - */ - headers?: import("node:http").OutgoingHttpHeaders; - }; - - /** - * Constructor options for the `Bun.WebSocket` client - */ - type WebSocketOptions = WebSocketOptionsProtocolsOrProtocol & WebSocketOptionsTLS & WebSocketOptionsHeaders; - - interface WebSocketEventMap { - close: CloseEvent; - error: Event; - message: MessageEvent; - open: Event; - } - - /** - * A WebSocket client implementation - * - * @example - * ```ts - * const ws = new WebSocket("ws://localhost:8080", { - * headers: { - * "x-custom-header": "hello", - * }, - * }); - * - * ws.addEventListener("open", () => { - * console.log("Connected to server"); - * }); - * - * ws.addEventListener("message", (event) => { - * console.log("Received message:", event.data); - * }); - * - * ws.send("Hello, server!"); - * ws.terminate(); - * ``` - */ - interface WebSocket extends EventTarget { - /** - * The URL of the WebSocket connection - */ - readonly url: string; - - /** - * Legacy URL property (same as url) - * @deprecated Use url instead - */ - readonly URL: string; - - /** - * The current state of the connection - */ - readonly readyState: - | typeof WebSocket.CONNECTING - | typeof WebSocket.OPEN - | typeof WebSocket.CLOSING - | typeof WebSocket.CLOSED; - - /** - * The number of bytes of data that have been queued using send() but not yet transmitted to the network - */ - readonly bufferedAmount: number; - - /** - * The protocol selected by the server - */ - readonly protocol: string; - - /** - * The extensions selected by the server - */ - readonly extensions: string; - - /** - * The type of binary data being received. - */ - binaryType: "arraybuffer" | "nodebuffer"; - - /** - * Event handler for open event - */ - onopen: ((this: WebSocket, ev: Event) => any) | null; - - /** - * Event handler for message event - */ - onmessage: ((this: WebSocket, ev: MessageEvent) => any) | null; - - /** - * Event handler for error event - */ - onerror: ((this: WebSocket, ev: Event) => any) | null; - - /** - * Event handler for close event - */ - onclose: ((this: WebSocket, ev: CloseEvent) => any) | null; - - /** - * Transmits data to the server - * @param data The data to send to the server - */ - send(data: string | ArrayBufferLike | ArrayBufferView): void; - - /** - * Closes the WebSocket connection - * @param code A numeric value indicating the status code - * @param reason A human-readable string explaining why the connection is closing - */ - close(code?: number, reason?: string): void; - - /** - * Sends a ping frame to the server - * @param data Optional data to include in the ping frame - */ - ping(data?: string | ArrayBufferLike | ArrayBufferView): void; - - /** - * Sends a pong frame to the server - * @param data Optional data to include in the pong frame - */ - pong(data?: string | ArrayBufferLike | ArrayBufferView): void; - - /** - * Immediately terminates the connection - */ - terminate(): void; - - /** - * Registers an event handler of a specific event type on the WebSocket. - * @param type A case-sensitive string representing the event type to listen for - * @param listener The function to be called when the event occurs - * @param options An options object that specifies characteristics about the event listener - */ - addEventListener( - type: K, - listener: (this: WebSocket, ev: WebSocketEventMap[K]) => any, - options?: boolean | AddEventListenerOptions, - ): void; - addEventListener( - type: string, - listener: EventListenerOrEventListenerObject, - options?: boolean | AddEventListenerOptions, - ): void; - - /** - * Removes an event listener previously registered with addEventListener() - * @param type A case-sensitive string representing the event type to remove - * @param listener The function to remove from the event target - * @param options An options object that specifies characteristics about the event listener - */ - removeEventListener( - type: K, - listener: (this: WebSocket, ev: WebSocketEventMap[K]) => any, - options?: boolean | EventListenerOptions, - ): void; - removeEventListener( - type: string, - listener: EventListenerOrEventListenerObject, - options?: boolean | EventListenerOptions, - ): void; - - /** @deprecated Use instance property instead */ - readonly CONNECTING: 0; - /** @deprecated Use instance property instead */ - readonly OPEN: 1; - /** @deprecated Use instance property instead */ - readonly CLOSING: 2; - /** @deprecated Use instance property instead */ - readonly CLOSED: 3; - } - - /** - * Pretty-print an object the same as {@link console.log} to a `string` - * - * Supports JSX - * - * @param arg The value to inspect - * @param options Options for the inspection - */ - function inspect(arg: any, options?: BunInspectOptions): string; - namespace inspect { - /** - * That can be used to declare custom inspect functions. - */ - const custom: typeof import("util").inspect.custom; - - /** - * Pretty-print an object or array as a table - * - * Like {@link console.table}, except it returns a string - */ - function table(tabularData: object | unknown[], properties?: string[], options?: { colors?: boolean }): string; - function table(tabularData: object | unknown[], options?: { colors?: boolean }): string; - } - - interface MMapOptions { - /** - * Sets MAP_SYNC flag on Linux. Ignored on macOS due to lack of support. - */ - sync?: boolean; - /** - * Allow other processes to see results instantly? - * This enables MAP_SHARED. If false, it enables MAP_PRIVATE. - * @default true - */ - shared?: boolean; - } - /** - * Open a file as a live-updating `Uint8Array` without copying memory - * - Writing to the array writes to the file. - * - Reading from the array reads from the file. - * - * This uses the [`mmap()`](https://man7.org/linux/man-pages/man2/mmap.2.html) syscall under the hood. - * - * --- - * - * This API inherently has some rough edges: - * - It does not support empty files. It will throw a `SystemError` with `EINVAL` - * - Usage on shared/networked filesystems is discouraged. It will be very slow. - * - If you delete or truncate the file, that will crash bun. This is called a segmentation fault. - * - * --- - * - * To close the file, set the array to `null` and it will be garbage collected eventually. - */ - function mmap(path: PathLike, opts?: MMapOptions): Uint8Array; - - /** - * Write to stdout - */ - const stdout: BunFile; - - /** - * Write to stderr - */ - const stderr: BunFile; - - /** - * Read from stdin - * - * This is a read-only BunFile - */ - const stdin: BunFile; - - type StringLike = string | { toString(): string }; - - /** - * Valid inputs for {@link color} - * - * @category Utilities - */ - type ColorInput = - | { r: number; g: number; b: number; a?: number } - | [number, number, number] - | [number, number, number, number] - | Uint8Array - | Uint8ClampedArray - | Float32Array - | Float64Array - | string - | number - | { toString(): string }; - - /** - * Converts formats of colors - * - * @category Utilities - * - * @param input A value that could possibly be a color - * @param outputFormat An optional output format - */ - function color( - input: ColorInput, - outputFormat?: /** - * True color ANSI color string, for use in terminals - * @example \x1b[38;2;100;200;200m - */ - | "ansi" - | "ansi-16" - | "ansi-16m" - /** - * 256 color ANSI color string, for use in terminals which don't support true color - * - * Tries to match closest 24-bit color to 256 color palette - */ - | "ansi-256" - /** - * Picks the format that produces the shortest output - */ - | "css" - /** - * Lowercase hex color string without alpha - * @example #ff9800 - */ - | "hex" - /** - * Uppercase hex color string without alpha - * @example #FF9800 - */ - | "HEX" - /** - * @example hsl(35.764706, 1, 0.5) - */ - | "hsl" - /** - * @example lab(0.72732764, 33.938198, -25.311619) - */ - | "lab" - /** - * @example 16750592 - */ - | "number" - /** - * RGB color string without alpha - * @example rgb(255, 152, 0) - */ - | "rgb" - /** - * RGB color string with alpha - * @example rgba(255, 152, 0, 1) - */ - | "rgba", - ): string | null; - - /** - * Convert any color input to rgb - * @param input Any color input - * @param outputFormat Specify `[rgb]` to output as an array with `r`, `g`, and `b` properties - */ - function color(input: ColorInput, outputFormat: "[rgb]"): [number, number, number] | null; - /** - * Convert any color input to rgba - * @param input Any color input - * @param outputFormat Specify `[rgba]` to output as an array with `r`, `g`, `b`, and `a` properties - */ - function color(input: ColorInput, outputFormat: "[rgba]"): [number, number, number, number] | null; - /** - * Convert any color input to a number - * @param input Any color input - * @param outputFormat Specify `{rgb}` to output as an object with `r`, `g`, and `b` properties - */ - function color(input: ColorInput, outputFormat: "{rgb}"): { r: number; g: number; b: number } | null; - /** - * Convert any color input to rgba - * @param input Any color input - * @param outputFormat Specify {rgba} to output as an object with `r`, `g`, `b`, and `a` properties - */ - function color(input: ColorInput, outputFormat: "{rgba}"): { r: number; g: number; b: number; a: number } | null; - /** - * Convert any color input to a number - * @param input Any color input - * @param outputFormat Specify `number` to output as a number - */ - function color(input: ColorInput, outputFormat: "number"): number | null; - - /** - * Bun.semver provides a fast way to parse and compare version numbers. - */ - namespace semver { - /** - * Test if the version satisfies the range. Stringifies both arguments. Returns `true` or `false`. - */ - function satisfies(version: StringLike, range: StringLike): boolean; - - /** - * Returns 0 if the versions are equal, 1 if `v1` is greater, or -1 if `v2` is greater. - * Throws an error if either version is invalid. - */ - function order(v1: StringLike, v2: StringLike): -1 | 0 | 1; - } - - namespace unsafe { - /** - * Cast bytes to a `String` without copying. This is the fastest way to get a `String` from a `Uint8Array` or `ArrayBuffer`. - * - * **Only use this for ASCII strings**. If there are non-ascii characters, your application may crash and/or very confusing bugs will happen such as `"foo" !== "foo"`. - * - * **The input buffer must not be garbage collected**. That means you will need to hold on to it for the duration of the string's lifetime. - */ - function arrayBufferToString(buffer: Uint8Array | ArrayBufferLike): string; - - /** - * Cast bytes to a `String` without copying. This is the fastest way to get a `String` from a `Uint16Array` - * - * **The input must be a UTF-16 encoded string**. This API does no validation whatsoever. - * - * **The input buffer must not be garbage collected**. That means you will need to hold on to it for the duration of the string's lifetime. - */ - - function arrayBufferToString(buffer: Uint16Array): string; - - /** - * Force the garbage collector to run extremely often, - * especially inside `bun:test`. - * - * - `0`: default, disable - * - `1`: asynchronously call the garbage collector more often - * - `2`: synchronously call the garbage collector more often. - * - * This is a global setting. It's useful for debugging seemingly random crashes. - * - * `BUN_GARBAGE_COLLECTOR_LEVEL` environment variable is also supported. - * - * @param level - * @returns The previous level - */ - function gcAggressionLevel(level?: 0 | 1 | 2): 0 | 1 | 2; - - /** - * Dump the mimalloc heap to the console - */ - function mimallocDump(): void; - } - - type DigestEncoding = "utf8" | "ucs2" | "utf16le" | "latin1" | "ascii" | "base64" | "base64url" | "hex"; - - /** - * Are ANSI colors enabled for stdin and stdout? - * - * Used for {@link console.log} - */ - const enableANSIColors: boolean; - - /** - * What script launched Bun? - * - * Absolute file path - * - * @example "/never-gonna-give-you-up.js" - */ - const main: string; - - /** - * Manually trigger the garbage collector - * - * This does two things: - * 1. It tells JavaScriptCore to run the garbage collector - * 2. It tells [mimalloc](https://github.com/microsoft/mimalloc) to clean up fragmented memory. Mimalloc manages the heap not used in JavaScriptCore. - * - * @param force Synchronously run the garbage collector - */ - function gc(force?: boolean): void; - - /** - * JavaScriptCore engine's internal heap snapshot - * - * I don't know how to make this something Chrome or Safari can read. - * - * If you have any ideas, please file an issue https://github.com/oven-sh/bun - */ - interface HeapSnapshot { - /** 2 */ - version: number; - - /** "Inspector" */ - type: string; - - nodes: number[]; - - nodeClassNames: string[]; - edges: number[]; - edgeTypes: string[]; - edgeNames: string[]; - } - - /** - * Returns the number of nanoseconds since the process was started. - * - * This function uses a high-resolution monotonic system timer to provide precise time measurements. - * In JavaScript, numbers are represented as double-precision floating-point values (IEEE 754), - * which can safely represent integers up to 2^53 - 1 (Number.MAX_SAFE_INTEGER). - * - * Due to this limitation, while the internal counter may continue beyond this point, - * the precision of the returned value will degrade after 14.8 weeks of uptime (when the nanosecond - * count exceeds Number.MAX_SAFE_INTEGER). Beyond this point, the function will continue to count but - * with reduced precision, which might affect time calculations and comparisons in long-running applications. - * - * @returns {number} The number of nanoseconds since the process was started, with precise values up to - * Number.MAX_SAFE_INTEGER. - */ - function nanoseconds(): number; - - /** - * Show precise statistics about memory usage of your application - * - * Generate a heap snapshot in JavaScriptCore's format that can be viewed with `bun --inspect` or Safari's Web Inspector - */ - function generateHeapSnapshot(format?: "jsc"): HeapSnapshot; - - /** - * Show precise statistics about memory usage of your application - * - * Generate a V8 Heap Snapshot that can be used with Chrome DevTools & Visual Studio Code - * - * This is a JSON string that can be saved to a file. - * ```ts - * const snapshot = Bun.generateHeapSnapshot("v8"); - * await Bun.write("heap.heapsnapshot", snapshot); - * ``` - */ - function generateHeapSnapshot(format: "v8"): string; - - /** - * The next time JavaScriptCore is idle, clear unused memory and attempt to reduce the heap size. - * - * @deprecated - */ - function shrink(): void; - - /** - * Open a file in your local editor. Auto-detects via `$VISUAL` || `$EDITOR` - * - * @param path path to open - */ - function openInEditor(path: string, options?: EditorOptions): void; - - var fetch: typeof globalThis.fetch; - - interface EditorOptions { - editor?: "vscode" | "subl"; - line?: number; - column?: number; - } - - /** - * This class only exists in types - */ - abstract class CryptoHashInterface { - /** - * Update the hash with data - * - * @param data - */ - update(data: Bun.BlobOrStringOrBuffer): T; - - /** - * Finalize the hash - * - * @param encoding `DigestEncoding` to return the hash in. If none is provided, it will return a `Uint8Array`. - */ - digest(encoding: DigestEncoding): string; - - /** - * Finalize the hash - * - * @param hashInto `TypedArray` to write the hash into. Faster than creating a new one each time - */ - digest(hashInto?: NodeJS.TypedArray): NodeJS.TypedArray; - - /** - * Run the hash over the given data - * - * @param input `string`, `Uint8Array`, or `ArrayBuffer` to hash. `Uint8Array` or `ArrayBuffer` is faster. - * - * @param hashInto `TypedArray` to write the hash into. Faster than creating a new one each time - */ - static hash(input: Bun.BlobOrStringOrBuffer, hashInto?: NodeJS.TypedArray): NodeJS.TypedArray; - - /** - * Run the hash over the given data - * - * @param input `string`, `Uint8Array`, or `ArrayBuffer` to hash. `Uint8Array` or `ArrayBuffer` is faster. - * - * @param encoding `DigestEncoding` to return the hash in - */ - static hash(input: Bun.BlobOrStringOrBuffer, encoding: DigestEncoding): string; - } - - type SupportedCryptoAlgorithms = - | "blake2b256" - | "blake2b512" - | "blake2s256" - | "md4" - | "md5" - | "ripemd160" - | "sha1" - | "sha224" - | "sha256" - | "sha384" - | "sha512" - | "sha512-224" - | "sha512-256" - | "sha3-224" - | "sha3-256" - | "sha3-384" - | "sha3-512" - | "shake128" - | "shake256"; - - /** - * Hardware-accelerated cryptographic hash functions - * - * Used for `crypto.createHash()` - */ - class CryptoHasher { - /** - * The algorithm chosen to hash the data - */ - readonly algorithm: SupportedCryptoAlgorithms; - - /** - * The length of the output hash in bytes - */ - readonly byteLength: number; - - /** - * Create a new hasher - * - * @param algorithm The algorithm to use. See {@link algorithms} for a list of supported algorithms - * @param hmacKey Optional key for HMAC. Must be a string or `TypedArray`. If not provided, the hasher will be a non-HMAC hasher. - */ - constructor(algorithm: SupportedCryptoAlgorithms, hmacKey?: string | NodeJS.TypedArray); - - /** - * Update the hash with data - * - * @param input - */ - update(input: Bun.BlobOrStringOrBuffer, inputEncoding?: import("crypto").Encoding): CryptoHasher; - - /** - * Perform a deep copy of the hasher - */ - copy(): CryptoHasher; - - /** - * Finalize the hash. Resets the CryptoHasher so it can be reused. - * - * @param encoding `DigestEncoding` to return the hash in. If none is provided, it will return a `Uint8Array`. - */ - digest(encoding: DigestEncoding): string; - - /** - * Finalize the hash and return a `Buffer` - */ - digest(): Buffer; - - /** - * Finalize the hash - * - * @param hashInto `TypedArray` to write the hash into. Faster than creating a new one each time - */ - digest(hashInto: NodeJS.TypedArray): NodeJS.TypedArray; - - /** - * Run the hash over the given data - * - * @param input `string`, `Uint8Array`, or `ArrayBuffer` to hash. `Uint8Array` or `ArrayBuffer` is faster. - */ - static hash(algorithm: SupportedCryptoAlgorithms, input: Bun.BlobOrStringOrBuffer): Buffer; - - /** - * Run the hash over the given data - * - * @param input `string`, `Uint8Array`, or `ArrayBuffer` to hash. `Uint8Array` or `ArrayBuffer` is faster. - * - * @param hashInto `TypedArray` to write the hash into. Faster than creating a new one each time - */ - static hash( - algorithm: SupportedCryptoAlgorithms, - input: Bun.BlobOrStringOrBuffer, - hashInto: NodeJS.TypedArray, - ): NodeJS.TypedArray; - - /** - * Run the hash over the given data - * - * @param input `string`, `Uint8Array`, or `ArrayBuffer` to hash. `Uint8Array` or `ArrayBuffer` is faster. - * - * @param encoding `DigestEncoding` to return the hash in - */ - static hash( - algorithm: SupportedCryptoAlgorithms, - input: Bun.BlobOrStringOrBuffer, - encoding: DigestEncoding, - ): string; - - /** - * List of supported hash algorithms - * - * These are hardware accelerated with BoringSSL - */ - static readonly algorithms: SupportedCryptoAlgorithms[]; - } - - /** - * Resolve a `Promise` after milliseconds. This is like - * {@link setTimeout} except it returns a `Promise`. - * - * @category Utilities - * - * @param ms milliseconds to delay resolving the promise. This is a minimum - * number. It may take longer. If a {@link Date} is passed, it will sleep until the - * {@link Date} is reached. - * - * @example - * ## Sleep for 1 second - * ```ts - * import { sleep } from "bun"; - * - * await sleep(1000); - * ``` - * ## Sleep for 10 milliseconds - * ```ts - * await Bun.sleep(10); - * ``` - * ## Sleep until `Date` - * - * ```ts - * const target = new Date(); - * target.setSeconds(target.getSeconds() + 1); - * await Bun.sleep(target); - * ``` - * Internally, `Bun.sleep` is the equivalent of - * ```ts - * await new Promise((resolve) => setTimeout(resolve, ms)); - * ``` - * As always, you can use `Bun.sleep` or the imported `sleep` function interchangeably. - */ - function sleep(ms: number | Date): Promise; - - /** - * Sleep the thread for a given number of milliseconds - * - * This is a blocking function. - * - * Internally, it calls [nanosleep(2)](https://man7.org/linux/man-pages/man2/nanosleep.2.html) - */ - function sleepSync(ms: number): void; - - /** - * Hash `input` using [SHA-2 512/256](https://en.wikipedia.org/wiki/SHA-2#Comparison_of_SHA_functions) - * - * @category Utilities - * - * @param input `string`, `Uint8Array`, or `ArrayBuffer` to hash. `Uint8Array` or `ArrayBuffer` will be faster - * @param hashInto optional `Uint8Array` to write the hash to. 32 bytes minimum. - * - * This hashing function balances speed with cryptographic strength. This does not encrypt or decrypt data. - * - * The implementation uses [BoringSSL](https://boringssl.googlesource.com/boringssl) (used in Chromium & Go) - * - * The equivalent `openssl` command is: - * - * ```bash - * # You will need OpenSSL 3 or later - * openssl sha512-256 /path/to/file - * ``` - */ - function sha(input: Bun.StringOrBuffer, hashInto?: NodeJS.TypedArray): NodeJS.TypedArray; - - /** - * Hash `input` using [SHA-2 512/256](https://en.wikipedia.org/wiki/SHA-2#Comparison_of_SHA_functions) - * - * @category Utilities - * - * @param input `string`, `Uint8Array`, or `ArrayBuffer` to hash. `Uint8Array` or `ArrayBuffer` will be faster - * @param encoding `DigestEncoding` to return the hash in - * - * This hashing function balances speed with cryptographic strength. This does not encrypt or decrypt data. - * - * The implementation uses [BoringSSL](https://boringssl.googlesource.com/boringssl) (used in Chromium & Go) - * - * The equivalent `openssl` command is: - * - * ```bash - * # You will need OpenSSL 3 or later - * openssl sha512-256 /path/to/file - * ``` - */ - function sha(input: Bun.StringOrBuffer, encoding: DigestEncoding): string; - - /** - * This is not the default because it's not cryptographically secure and it's slower than {@link SHA512} - * - * Consider using the ugly-named {@link SHA512_256} instead - */ - class SHA1 extends CryptoHashInterface { - constructor(); - - /** - * The number of bytes the hash will produce - */ - static readonly byteLength: 20; - } - class MD5 extends CryptoHashInterface { - constructor(); - - /** - * The number of bytes the hash will produce - */ - static readonly byteLength: 16; - } - class MD4 extends CryptoHashInterface { - constructor(); - - /** - * The number of bytes the hash will produce - */ - static readonly byteLength: 16; - } - class SHA224 extends CryptoHashInterface { - constructor(); - - /** - * The number of bytes the hash will produce - */ - static readonly byteLength: 28; - } - class SHA512 extends CryptoHashInterface { - constructor(); - - /** - * The number of bytes the hash will produce - */ - static readonly byteLength: 64; - } - class SHA384 extends CryptoHashInterface { - constructor(); - - /** - * The number of bytes the hash will produce - */ - static readonly byteLength: 48; - } - class SHA256 extends CryptoHashInterface { - constructor(); - - /** - * The number of bytes the hash will produce - */ - static readonly byteLength: 32; - } - /** - * See also {@link sha} - */ - class SHA512_256 extends CryptoHashInterface { - constructor(); - - /** - * The number of bytes the hash will produce - */ - static readonly byteLength: 32; - } - - /** Extends the standard web formats with `brotli` and `zstd` support. */ - type CompressionFormat = "gzip" | "deflate" | "deflate-raw" | "brotli" | "zstd"; - - /** Compression options for `Bun.deflateSync` and `Bun.gzipSync` */ - interface ZlibCompressionOptions { - /** - * The compression level to use. Must be between `-1` and `9`. - * - A value of `-1` uses the default compression level (Currently `6`) - * - A value of `0` gives no compression - * - A value of `1` gives least compression, fastest speed - * - A value of `9` gives best compression, slowest speed - */ - level?: -1 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9; - /** - * How much memory should be allocated for the internal compression state. - * - * A value of `1` uses minimum memory but is slow and reduces compression ratio. - * - * A value of `9` uses maximum memory for optimal speed. The default is `8`. - */ - memLevel?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9; - /** - * The base 2 logarithm of the window size (the size of the history buffer). - * - * Larger values of this parameter result in better compression at the expense of memory usage. - * - * The following value ranges are supported: - * - `9..15`: The output will have a zlib header and footer (Deflate) - * - `-9..-15`: The output will **not** have a zlib header or footer (Raw Deflate) - * - `25..31` (16+`9..15`): The output will have a gzip header and footer (gzip) - * - * The gzip header will have no file name, no extra data, no comment, no modification time (set to zero) and no header CRC. - */ - windowBits?: - | -9 - | -10 - | -11 - | -12 - | -13 - | -14 - | -15 - | 9 - | 10 - | 11 - | 12 - | 13 - | 14 - | 15 - | 25 - | 26 - | 27 - | 28 - | 29 - | 30 - | 31; - /** - * Tunes the compression algorithm. - * - * - `Z_DEFAULT_STRATEGY`: For normal data **(Default)** - * - `Z_FILTERED`: For data produced by a filter or predictor - * - `Z_HUFFMAN_ONLY`: Force Huffman encoding only (no string match) - * - `Z_RLE`: Limit match distances to one (run-length encoding) - * - `Z_FIXED` prevents the use of dynamic Huffman codes - * - * `Z_RLE` is designed to be almost as fast as `Z_HUFFMAN_ONLY`, but give better compression for PNG image data. - * - * `Z_FILTERED` forces more Huffman coding and less string matching, it is - * somewhat intermediate between `Z_DEFAULT_STRATEGY` and `Z_HUFFMAN_ONLY`. - * Filtered data consists mostly of small values with a somewhat random distribution. - */ - strategy?: number; - - library?: "zlib"; - } - - interface LibdeflateCompressionOptions { - level?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12; - library?: "libdeflate"; - } - - /** - * Compresses a chunk of data with `zlib` DEFLATE algorithm. - * @param data The buffer of data to compress - * @param options Compression options to use - * @returns The output buffer with the compressed data - */ - function deflateSync( - data: Uint8Array | string | ArrayBuffer, - options?: ZlibCompressionOptions | LibdeflateCompressionOptions, - ): Uint8Array; - /** - * Compresses a chunk of data with `zlib` GZIP algorithm. - * @param data The buffer of data to compress - * @param options Compression options to use - * @returns The output buffer with the compressed data - */ - function gzipSync( - data: Uint8Array | string | ArrayBuffer, - options?: ZlibCompressionOptions | LibdeflateCompressionOptions, - ): Uint8Array; - /** - * Decompresses a chunk of data with `zlib` INFLATE algorithm. - * @param data The buffer of data to decompress - * @returns The output buffer with the decompressed data - */ - function inflateSync( - data: Uint8Array | string | ArrayBuffer, - options?: ZlibCompressionOptions | LibdeflateCompressionOptions, - ): Uint8Array; - /** - * Decompresses a chunk of data with `zlib` GUNZIP algorithm. - * @param data The buffer of data to decompress - * @returns The output buffer with the decompressed data - */ - function gunzipSync( - data: Uint8Array | string | ArrayBuffer, - options?: ZlibCompressionOptions | LibdeflateCompressionOptions, - ): Uint8Array; - - /** - * Compresses a chunk of data with the Zstandard (zstd) compression algorithm. - * @param data The buffer of data to compress - * @param options Compression options to use - * @returns The output buffer with the compressed data - */ - function zstdCompressSync( - data: NodeJS.TypedArray | Buffer | string | ArrayBuffer, - options?: { level?: number }, - ): Buffer; - - /** - * Compresses a chunk of data with the Zstandard (zstd) compression algorithm. - * @param data The buffer of data to compress - * @param options Compression options to use - * @returns A promise that resolves to the output buffer with the compressed data - */ - function zstdCompress( - data: NodeJS.TypedArray | Buffer | string | ArrayBuffer, - options?: { level?: number }, - ): Promise; - - /** - * Decompresses a chunk of data with the Zstandard (zstd) decompression algorithm. - * @param data The buffer of data to decompress - * @returns The output buffer with the decompressed data - */ - function zstdDecompressSync(data: NodeJS.TypedArray | Buffer | string | ArrayBuffer): Buffer; - - /** - * Decompresses a chunk of data with the Zstandard (zstd) decompression algorithm. - * @param data The buffer of data to decompress - * @returns A promise that resolves to the output buffer with the decompressed data - */ - function zstdDecompress(data: NodeJS.TypedArray | Buffer | string | ArrayBuffer): Promise; - - type Target = - /** - * For generating bundles that are intended to be run by the Bun runtime. In many cases, - * it isn't necessary to bundle server-side code; you can directly execute the source code - * without modification. However, bundling your server code can reduce startup times and - * improve running performance. - * - * All bundles generated with `target: "bun"` are marked with a special `// @bun` pragma, which - * indicates to the Bun runtime that there's no need to re-transpile the file before execution. - */ - | "bun" - /** - * The plugin will be applied to Node.js builds - */ - | "node" - /** - * The plugin will be applied to browser builds - */ - | "browser"; - - /** https://bun.com/docs/bundler/loaders */ - type Loader = - | "js" - | "jsx" - | "ts" - | "tsx" - | "json" - | "jsonc" - | "toml" - | "yaml" - | "file" - | "napi" - | "wasm" - | "text" - | "css" - | "html"; - - interface PluginConstraints { - /** - * Only apply the plugin when the import specifier matches this regular expression - * - * @example - * ```ts - * // Only apply the plugin when the import specifier matches the regex - * Bun.plugin({ - * setup(builder) { - * builder.onLoad({ filter: /node_modules\/underscore/ }, (args) => { - * return { contents: "throw new Error('Please use lodash instead of underscore.')" }; - * }); - * } - * }) - * ``` - */ - filter: RegExp; - - /** - * Only apply the plugin when the import specifier has a namespace matching - * this string - * - * Namespaces are prefixes in import specifiers. For example, `"bun:ffi"` - * has the namespace `"bun"`. - * - * The default namespace is `"file"` and it can be omitted from import - * specifiers. - */ - namespace?: string; - } - - interface OnLoadResultSourceCode { - /** - * The source code of the module - */ - contents: string | ArrayBufferView | ArrayBuffer | SharedArrayBuffer; - /** - * The loader to use for this file - * - * "css" will be added in a future version of Bun. - */ - loader?: Loader; - } - - interface OnLoadResultObject { - /** - * The object to use as the module - * @example - * ```ts - * // In your loader - * builder.onLoad({ filter: /^hello:world$/ }, (args) => { - * return { exports: { foo: "bar" }, loader: "object" }; - * }); - * - * // In your script - * import {foo} from "hello:world"; - * console.log(foo); // "bar" - * ``` - */ - exports: Record; - /** - * The loader to use for this file - */ - loader: "object"; - } - - interface OnLoadArgs { - /** - * The resolved import specifier of the module being loaded - * @example - * ```ts - * builder.onLoad({ filter: /^hello:world$/ }, (args) => { - * console.log(args.path); // "hello:world" - * return { exports: { foo: "bar" }, loader: "object" }; - * }); - * ``` - */ - path: string; - /** - * The namespace of the module being loaded - */ - namespace: string; - /** - * The default loader for this file extension - */ - loader: Loader; - /** - * Defer the execution of this callback until all other modules have been parsed. - * - * @returns Promise which will be resolved when all modules have been parsed - */ - defer: () => Promise; - } - - type OnLoadResult = OnLoadResultSourceCode | OnLoadResultObject | undefined | void; - type OnLoadCallback = (args: OnLoadArgs) => OnLoadResult | Promise; - type OnStartCallback = () => void | Promise; - type OnEndCallback = (result: BuildOutput) => void | Promise; - type OnBeforeParseCallback = { - napiModule: unknown; - symbol: string; - external?: unknown | undefined; - }; - - interface OnResolveArgs { - /** - * The import specifier of the module being loaded - */ - path: string; - /** - * The module that imported the module being resolved - */ - importer: string; - /** - * The namespace of the importer. - */ - namespace: string; - /** - * The directory to perform file-based resolutions in. - */ - resolveDir: string; - /** - * The kind of import this resolve is for. - */ - kind: ImportKind; - // resolveDir: string; - // pluginData: any; - } - - interface OnResolveResult { - /** - * The destination of the import - */ - path: string; - /** - * The namespace of the destination - * It will be concatenated with `path` to form the final import specifier - * @example - * ```ts - * "foo" // "foo:bar" - * ``` - */ - namespace?: string; - external?: boolean; - } - - type OnResolveCallback = ( - args: OnResolveArgs, - ) => OnResolveResult | Promise | undefined | null; - - type FFIFunctionCallable = Function & { - // Making a nominally typed function so that the user must get it from dlopen - readonly __ffi_function_callable: typeof import("bun:ffi").FFIFunctionCallableSymbol; - }; - - /** - * The builder object passed to `Bun.plugin` - * - * @category Bundler - */ - interface PluginBuilder { - /** - * Register a callback which will be invoked when bundling starts. When - * using hot module reloading, this is called at the start of each - * incremental rebuild. - * - * @example - * ```ts - * Bun.plugin({ - * setup(builder) { - * builder.onStart(() => { - * console.log("bundle just started!!") - * }); - * }, - * }); - * ``` - * - * @returns `this` for method chaining - */ - onStart(callback: OnStartCallback): this; - /** - * Register a callback which will be invoked when bundling ends. This is - * called after all modules have been bundled and the build is complete. - * - * @example - * ```ts - * const plugin: Bun.BunPlugin = { - * name: "my-plugin", - * setup(builder) { - * builder.onEnd((result) => { - * console.log("bundle just finished!!", result); - * }); - * }, - * }; - * ``` - * - * @returns `this` for method chaining - */ - onEnd(callback: OnEndCallback): this; - onBeforeParse(constraints: PluginConstraints, callback: OnBeforeParseCallback): this; - /** - * Register a callback to load imports with a specific import specifier - * @param constraints The constraints to apply the plugin to - * @param callback The callback to handle the import - * @example - * ```ts - * Bun.plugin({ - * setup(builder) { - * builder.onLoad({ filter: /^hello:world$/ }, (args) => { - * return { exports: { foo: "bar" }, loader: "object" }; - * }); - * }, - * }); - * ``` - * - * @returns `this` for method chaining - */ - onLoad(constraints: PluginConstraints, callback: OnLoadCallback): this; - /** - * Register a callback to resolve imports matching a filter and/or namespace - * @param constraints The constraints to apply the plugin to - * @param callback The callback to handle the import - * @example - * ```ts - * Bun.plugin({ - * setup(builder) { - * builder.onResolve({ filter: /^wat$/ }, (args) => { - * return { path: "/tmp/woah.js" }; - * }); - * }, - * }); - * ``` - * - * @returns `this` for method chaining - */ - onResolve(constraints: PluginConstraints, callback: OnResolveCallback): this; - /** - * The config object passed to `Bun.build` as is. Can be mutated. - */ - config: BuildConfig & { plugins: BunPlugin[] }; - - /** - * Create a lazy-loaded virtual module that can be `import`ed or `require`d from other modules - * - * @param specifier The module specifier to register the callback for - * @param callback The function to run when the module is imported or required - * - * @example - * ```ts - * Bun.plugin({ - * setup(builder) { - * builder.module("hello:world", () => { - * return { exports: { foo: "bar" }, loader: "object" }; - * }); - * }, - * }); - * - * // sometime later - * const { foo } = await import("hello:world"); - * console.log(foo); // "bar" - * - * // or - * const { foo } = require("hello:world"); - * console.log(foo); // "bar" - * ``` - * - * @returns `this` for method chaining - */ - module(specifier: string, callback: () => OnLoadResult | Promise): this; - } - - /** - * A Bun plugin. Used for extending Bun's behavior at runtime, or with {@link Bun.build} - * - * @category Bundler - */ - interface BunPlugin { - /** - * Human-readable name of the plugin - * - * In a future version of Bun, this will be used in error messages. - */ - name: string; - - /** - * The target JavaScript environment the plugin should be applied to. - * - `bun`: The default environment when using `bun run` or `bun` to load a script - * - `browser`: The plugin will be applied to browser builds - * - `node`: The plugin will be applied to Node.js builds - * - * If unspecified, it is assumed that the plugin is compatible with all targets. - * - * This field is not read by {@link Bun.plugin}, only {@link Bun.build} and `bun build` - */ - target?: Target; - - /** - * A function that will be called when the plugin is loaded. - * - * This function may be called in the same tick that it is registered, or it - * may be called later. It could potentially be called multiple times for - * different targets. - */ - setup( - /** - * A builder object that can be used to register plugin hooks - * @example - * ```ts - * builder.onLoad({ filter: /\.yaml$/ }, ({ path }) => ({ - * loader: "object", - * exports: require("js-yaml").load(fs.readFileSync(path, "utf8")), - * })); - * ``` - */ - build: PluginBuilder, - ): void | Promise; - } - - /** - * Extend Bun's module resolution and loading behavior - * - * Plugins are applied in the order they are defined. - * - * Today, there are two kinds of hooks: - * - `onLoad` lets you return source code or an object that will become the module's exports - * - `onResolve` lets you redirect a module specifier to another module specifier. It does not chain. - * - * Plugin hooks must define a `filter` RegExp and will only be matched if the - * import specifier contains a "." or a ":". - * - * ES Module resolution semantics mean that plugins may be initialized _after_ - * a module is resolved. You might need to load plugins at the very beginning - * of the application and then use a dynamic import to load the rest of the - * application. A future version of Bun may also support specifying plugins - * via `bunfig.toml`. - * - * @example - * A YAML loader plugin - * - * ```js - * Bun.plugin({ - * setup(builder) { - * builder.onLoad({ filter: /\.yaml$/ }, ({path}) => ({ - * loader: "object", - * exports: require("js-yaml").load(fs.readFileSync(path, "utf8")) - * })); - * }); - * - * // You can use require() - * const {foo} = require("./file.yaml"); - * - * // Or import - * await import("./file.yaml"); - * - * ``` - */ - interface BunRegisterPlugin { - (options: T): ReturnType; - - /** - * Deactivate all plugins - * - * This prevents registered plugins from being applied to future builds. - */ - clearAll(): void; - } - - const plugin: BunRegisterPlugin; - - /** - * Is the current global scope the main thread? - */ - const isMainThread: boolean; - - /** - * Used when importing an HTML file at runtime or at build time. - * - * @example - * - * ```ts - * import app from "./index.html"; - * ``` - * - */ - - interface HTMLBundle { - index: string; - - /** Array of generated output files with metadata. This only exists when built ahead of time with `Bun.build` or `bun build` */ - files?: Array<{ - /** Original source file path. */ - input?: string; - /** Generated output file path (with content hash, if included in naming) */ - path: string; - /** File type/loader used (js, css, html, file, etc.) */ - loader: Loader; - /** Whether this file is an entry point */ - isEntry: boolean; - /** HTTP headers including ETag and Content-Type */ - headers: { - /** ETag for caching */ - etag: string; - /** MIME type with charset */ - "content-type": string; - - /** - * Additional headers may be added in the future. - */ - [key: string]: string; - }; - }>; - } - - /** - * Represents a TCP or TLS socket connection used for network communication. - * This interface provides methods for reading, writing, managing the connection state, - * and handling TLS-specific features if applicable. - * - * Sockets are created using `Bun.connect()` or accepted by a `Bun.listen()` server. - * - * @category HTTP & Networking - */ - interface Socket extends Disposable { - /** - * Writes `data` to the socket. This method is unbuffered and non-blocking. This uses the `sendto(2)` syscall internally. - * - * For optimal performance with multiple small writes, consider batching multiple - * writes together into a single `socket.write()` call. - * - * @param data The data to write. Can be a string (encoded as UTF-8), `ArrayBuffer`, `TypedArray`, or `DataView`. - * @param byteOffset The offset in bytes within the buffer to start writing from. Defaults to 0. Ignored for strings. - * @param byteLength The number of bytes to write from the buffer. Defaults to the remaining length of the buffer from the offset. Ignored for strings. - * @returns The number of bytes written. Returns `-1` if the socket is closed or shutting down. Can return less than the input size if the socket's buffer is full (backpressure). - * @example - * ```ts - * // Send a string - * const bytesWritten = socket.write("Hello, world!\n"); - * - * // Send binary data - * const buffer = new Uint8Array([0x01, 0x02, 0x03]); - * socket.write(buffer); - * - * // Send part of a buffer - * const largeBuffer = new Uint8Array(1024); - * // ... fill largeBuffer ... - * socket.write(largeBuffer, 100, 50); // Write 50 bytes starting from index 100 - * ``` - */ - write(data: string | BufferSource, byteOffset?: number, byteLength?: number): number; - - /** - * The user-defined data associated with this socket instance. - * This can be set when the socket is created via `Bun.connect({ data: ... })`. - * It can be read or updated at any time. - * - * @example - * ```ts - * // In a socket handler - * function open(socket: Socket<{ userId: string }>) { - * console.log(`Socket opened for user: ${socket.data.userId}`); - * socket.data.lastActivity = Date.now(); // Update data - * } - * ``` - */ - data: Data; - - /** - * Sends the final data chunk and initiates a graceful shutdown of the socket's write side. - * After calling `end()`, no more data can be written using `write()` or `end()`. - * The socket remains readable until the remote end also closes its write side or the connection is terminated. - * This sends a TCP FIN packet after writing the data. - * - * @param data Optional final data to write before closing. Same types as `write()`. - * @param byteOffset Optional offset for buffer data. - * @param byteLength Optional length for buffer data. - * @returns The number of bytes written for the final chunk. Returns `-1` if the socket was already closed or shutting down. - * @example - * ```ts - * // send some data and close the write side - * socket.end("Goodbye!"); - * // or close write side without sending final data - * socket.end(); - * ``` - */ - end(data?: string | BufferSource, byteOffset?: number, byteLength?: number): number; - - /** - * Close the socket immediately - */ - end(): void; - - /** - * Keep Bun's process alive at least until this socket is closed - * - * After the socket has closed, the socket is unref'd, the process may exit, - * and this becomes a no-op - */ - ref(): void; - - /** - * Set a timeout until the socket automatically closes. - * - * To reset the timeout, call this function again. - * - * When a timeout happens, the `timeout` callback is called and the socket is closed. - */ - timeout(seconds: number): void; - - /** - * Forcefully closes the socket connection immediately. This is an abrupt termination, unlike the graceful shutdown initiated by `end()`. - * It uses `SO_LINGER` with `l_onoff=1` and `l_linger=0` before calling `close(2)`. - * Consider using {@link close close()} or {@link end end()} for graceful shutdowns. - * - * @example - * ```ts - * socket.terminate(); - * ``` - */ - terminate(): void; - - /** - * Shuts down the write-half or both halves of the connection. - * This allows the socket to enter a half-closed state where it can still receive data - * but can no longer send data (`halfClose = true`), or close both read and write - * (`halfClose = false`, similar to `end()` but potentially more immediate depending on OS). - * Calls `shutdown(2)` syscall internally. - * - * @param halfClose If `true`, only shuts down the write side (allows receiving). If `false` or omitted, shuts down both read and write. Defaults to `false`. - * @example - * ```ts - * // Stop sending data, but allow receiving - * socket.shutdown(true); - * - * // Shutdown both reading and writing - * socket.shutdown(); - * ``` - */ - shutdown(halfClose?: boolean): void; - - /** - * The ready state of the socket. - * - * You can assume that a positive value means the socket is open and usable - * - * - `-2` = Shutdown - * - `-1` = Detached - * - `0` = Closed - * - `1` = Established - * - `2` = Else - */ - readonly readyState: -2 | -1 | 0 | 1 | 2; - - /** - * Allow Bun's process to exit even if this socket is still open - * - * After the socket has closed, this function does nothing. - */ - unref(): void; - - /** - * Flush any buffered data to the socket - * This attempts to send the data immediately, but success depends on the network conditions - * and the receiving end. - * It might be necessary after several `write` calls if immediate sending is critical, - * though often the OS handles flushing efficiently. Note that `write` calls outside - * `open`/`data`/`drain` might benefit from manual `cork`/`flush`. - */ - flush(): void; - - /** - * Reset the socket's callbacks. This is useful with `bun --hot` to facilitate hot reloading. - * - * This will apply to all sockets from the same {@link Listener}. it is per socket only for {@link Bun.connect}. - */ - reload(handler: SocketHandler): void; - - /** - * Get the server that created this socket - * - * This will return undefined if the socket was created by {@link Bun.connect} or if the listener has already closed. - */ - readonly listener?: SocketListener; - - readonly remoteFamily: "IPv4" | "IPv6"; - - /** - * Remote IP address connected to the socket - * @example "192.168.1.100" | "2001:db8::1" - */ - readonly remoteAddress: string; - - /** - * Remote port connected to the socket - * @example 8080 - */ - readonly remotePort: number; - - /** - * IP protocol family used for the local endpoint of the socket - * @example "IPv4" | "IPv6" - */ - readonly localFamily: "IPv4" | "IPv6"; - - /** - * Local IP address connected to the socket - * @example "192.168.1.100" | "2001:db8::1" - */ - readonly localAddress: string; - - /** - * local port connected to the socket - * @example 8080 - */ - readonly localPort: number; - - /** - * This property is `true` if the peer certificate was signed by one of the CAs - * specified when creating the `Socket` instance, otherwise `false`. - */ - readonly authorized: boolean; - - /** - * String containing the selected ALPN protocol. - * Before a handshake has completed, this value is always null. - * When a handshake is completed but not ALPN protocol was selected, socket.alpnProtocol equals false. - */ - readonly alpnProtocol: string | false | null; - - /** - * Disables TLS renegotiation for this `Socket` instance. Once called, attempts - * to renegotiate will trigger an `error` handler on the `Socket`. - * - * There is no support for renegotiation as a server. (Attempts by clients will result in a fatal alert so that ClientHello messages cannot be used to flood a server and escape higher-level limits.) - */ - disableRenegotiation(): void; - - /** - * Keying material is used for validations to prevent different kind of attacks in - * network protocols, for example in the specifications of IEEE 802.1X. - * - * Example - * - * ```js - * const keyingMaterial = socket.exportKeyingMaterial( - * 128, - * 'client finished'); - * - * /* - * Example return value of keyingMaterial: - * - * - * ``` - * - * @param length number of bytes to retrieve from keying material - * @param label an application specific label, typically this will be a value from the [IANA Exporter Label - * Registry](https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml#exporter-labels). - * @param context Optionally provide a context. - * @return requested bytes of the keying material - */ - exportKeyingMaterial(length: number, label: string, context: Buffer): Buffer; - - /** - * Returns the reason why the peer's certificate was not been verified. This - * property is set only when `socket.authorized === false`. - */ - getAuthorizationError(): Error | null; - - /** - * Returns an object representing the local certificate. The returned object has - * some properties corresponding to the fields of the certificate. - * - * If there is no local certificate, an empty object will be returned. If the - * socket has been destroyed, `null` will be returned. - */ - getCertificate(): import("tls").PeerCertificate | object | null; - getX509Certificate(): import("node:crypto").X509Certificate | undefined; - - /** - * Returns an object containing information on the negotiated cipher suite. - * - * For example, a TLSv1.2 protocol with AES256-SHA cipher: - * - * ```json - * { - * "name": "AES256-SHA", - * "standardName": "TLS_RSA_WITH_AES_256_CBC_SHA", - * "version": "SSLv3" - * } - * ``` - * - */ - getCipher(): import("tls").CipherNameAndProtocol; - - /** - * Returns an object representing the type, name, and size of parameter of - * an ephemeral key exchange in `perfect forward secrecy` on a client - * connection. It returns an empty object when the key exchange is not - * ephemeral. As this is only supported on a client socket; `null` is returned - * if called on a server socket. The supported types are `'DH'` and `'ECDH'`. The`name` property is available only when type is `'ECDH'`. - * - * For example: `{ type: 'ECDH', name: 'prime256v1', size: 256 }`. - */ - getEphemeralKeyInfo(): import("tls").EphemeralKeyInfo | object | null; - - /** - * Returns an object representing the peer's certificate. If the peer does not - * provide a certificate, an empty object will be returned. If the socket has been - * destroyed, `null` will be returned. - * - * If the full certificate chain was requested, each certificate will include an`issuerCertificate` property containing an object representing its issuer's - * certificate. - * @return A certificate object. - */ - getPeerCertificate(): import("node:tls").PeerCertificate; - getPeerX509Certificate(): import("node:crypto").X509Certificate; - - /** - * See [SSL\_get\_shared\_sigalgs](https://www.openssl.org/docs/man1.1.1/man3/SSL_get_shared_sigalgs.html) for more information. - * @since v12.11.0 - * @return List of signature algorithms shared between the server and the client in the order of decreasing preference. - */ - getSharedSigalgs(): string[]; - - /** - * As the `Finished` messages are message digests of the complete handshake - * (with a total of 192 bits for TLS 1.0 and more for SSL 3.0), they can - * be used for external authentication procedures when the authentication - * provided by SSL/TLS is not desired or is not enough. - * - * @return The latest `Finished` message that has been sent to the socket as part of a SSL/TLS handshake, or `undefined` if no `Finished` message has been sent yet. - */ - getTLSFinishedMessage(): Buffer | undefined; - - /** - * As the `Finished` messages are message digests of the complete handshake - * (with a total of 192 bits for TLS 1.0 and more for SSL 3.0), they can - * be used for external authentication procedures when the authentication - * provided by SSL/TLS is not desired or is not enough. - * - * @return The latest `Finished` message that is expected or has actually been received from the socket as part of a SSL/TLS handshake, or `undefined` if there is no `Finished` message so - * far. - */ - getTLSPeerFinishedMessage(): Buffer | undefined; - - /** - * For a client, returns the TLS session ticket if one is available, or`undefined`. For a server, always returns `undefined`. - * - * It may be useful for debugging. - * - * See `Session Resumption` for more information. - */ - getTLSTicket(): Buffer | undefined; - - /** - * Returns a string containing the negotiated SSL/TLS protocol version of the - * current connection. The value `'unknown'` will be returned for connected - * sockets that have not completed the handshaking process. The value `null` will - * be returned for server sockets or disconnected client sockets. - * - * Protocol versions are: - * - * * `'SSLv3'` - * * `'TLSv1'` - * * `'TLSv1.1'` - * * `'TLSv1.2'` - * * `'TLSv1.3'` - * - */ - getTLSVersion(): string; - - /** - * See `Session Resumption` for more information. - * @return `true` if the session was reused, `false` otherwise. - * **TLS Only:** Checks if the current TLS session was resumed from a previous session. - * Returns `true` if the session was resumed, `false` otherwise. - */ - isSessionReused(): boolean; - - /** - * The `socket.setMaxSendFragment()` method sets the maximum TLS fragment size. - * Returns `true` if setting the limit succeeded; `false` otherwise. - * - * Smaller fragment sizes decrease the buffering latency on the client: larger - * fragments are buffered by the TLS layer until the entire fragment is received - * and its integrity is verified; large fragments can span multiple roundtrips - * and their processing can be delayed due to packet loss or reordering. However, - * smaller fragments add extra TLS framing bytes and CPU overhead, which may - * decrease overall server throughput. - * @param [size=16384] The maximum TLS fragment size. The maximum value is `16384`. - */ - setMaxSendFragment(size: number): boolean; - - /** - * Enable/disable the use of Nagle's algorithm. - * Only available for already connected sockets, will return false otherwise - * @param noDelay Default: `true` - * @returns true if is able to setNoDelay and false if it fails. - */ - setNoDelay(noDelay?: boolean): boolean; - - /** - * Enable/disable keep-alive functionality, and optionally set the initial delay before the first keepalive probe is sent on an idle socket. - * Set `initialDelay` (in milliseconds) to set the delay between the last data packet received and the first keepalive probe. - * Only available for already connected sockets, will return false otherwise. - * - * Enabling the keep-alive functionality will set the following socket options: - * SO_KEEPALIVE=1 - * TCP_KEEPIDLE=initialDelay - * TCP_KEEPCNT=10 - * TCP_KEEPINTVL=1 - * @param enable Default: `false` - * @param initialDelay Default: `0` - * @returns true if is able to setNoDelay and false if it fails. - */ - setKeepAlive(enable?: boolean, initialDelay?: number): boolean; - - /** - * The total number of bytes successfully written to the socket since it was established. - * This includes data currently buffered by the OS but not yet acknowledged by the remote peer. - */ - readonly bytesWritten: number; - - /** - * Alias for `socket.end()`. Allows the socket to be used with `using` declarations - * for automatic resource management. - * @example - * ```ts - * async function processSocket() { - * using socket = await Bun.connect({ ... }); - * socket.write("Data"); - * // socket.end() is called automatically when exiting the scope - * } - * ``` - */ - [Symbol.dispose](): void; - - resume(): void; - - pause(): void; - - /** - * If this is a TLS Socket - */ - renegotiate(): void; - - /** - * Sets the verify mode of the socket. - * - * @param requestCert Whether to request a certificate. - * @param rejectUnauthorized Whether to reject unauthorized certificates. - */ - setVerifyMode(requestCert: boolean, rejectUnauthorized: boolean): void; - - getSession(): void; - - /** - * Sets the session of the socket. - * - * @param session The session to set. - */ - setSession(session: string | Buffer | BufferSource): void; - - /** - * Exports the keying material of the socket. - * - * @param length The length of the keying material to export. - * @param label The label of the keying material to export. - * @param context The context of the keying material to export. - */ - exportKeyingMaterial(length: number, label: string, context?: string | BufferSource): void; - - /** - * Upgrades the socket to a TLS socket. - * - * @param options The options for the upgrade. - * @returns A tuple containing the raw socket and the TLS socket. - * @see {@link TLSUpgradeOptions} - */ - upgradeTLS(options: TLSUpgradeOptions): [raw: Socket, tls: Socket]; - - /** - * Closes the socket. - * - * This is a wrapper around `end()` and `shutdown()`. - * - * @see {@link end} - * @see {@link shutdown} - */ - close(): void; - - /** - * Returns the servername of the socket. - * - * @see {@link setServername} - */ - getServername(): string; - - /** - * Sets the servername of the socket. - * - * @see {@link getServername} - */ - setServername(name: string): void; - } - - interface TLSUpgradeOptions { - data?: Data; - tls: TLSOptions | boolean; - socket: SocketHandler; - } - - interface SocketListener extends Disposable { - stop(closeActiveConnections?: boolean): void; - ref(): void; - unref(): void; - reload(options: Pick, "socket">): void; - data: Data; - } - interface TCPSocketListener extends SocketListener { - readonly port: number; - readonly hostname: string; - } - interface UnixSocketListener extends SocketListener { - readonly unix: string; - } - - interface TCPSocket extends Socket {} - interface TLSSocket extends Socket {} - - interface BinaryTypeList { - arraybuffer: ArrayBuffer; - buffer: Buffer; - uint8array: Uint8Array; - // TODO: DataView - // dataview: DataView; - } - type BinaryType = keyof BinaryTypeList; - - interface SocketHandler { - /** - * Is called when the socket connects, or in case of TLS if no handshake is provided - * this will be called only after handshake - * @param socket - */ - open?(socket: Socket): void | Promise; - close?(socket: Socket, error?: Error): void | Promise; - error?(socket: Socket, error: Error): void | Promise; - data?(socket: Socket, data: BinaryTypeList[DataBinaryType]): void | Promise; - drain?(socket: Socket): void | Promise; - - /** - * When handshake is completed, this functions is called. - * @param socket - * @param success Indicates if the server authorized despite the authorizationError. - * @param authorizationError Certificate Authorization Error or null. - */ - handshake?(socket: Socket, success: boolean, authorizationError: Error | null): void; - - /** - * When the socket has been shutdown from the other end, this function is - * called. This is a TCP FIN packet. - */ - end?(socket: Socket): void | Promise; - - /** - * When the socket fails to be created, this function is called. - * - * The promise returned by `Bun.connect` rejects **after** this function is - * called. - * - * When `connectError` is specified, the rejected promise will not be - * added to the promise rejection queue (so it won't be reported as an - * unhandled promise rejection, since connectError handles it). - * - * When `connectError` is not specified, the rejected promise will be added - * to the promise rejection queue. - */ - connectError?(socket: Socket, error: Error): void | Promise; - - /** - * Called when a message times out. - */ - timeout?(socket: Socket): void | Promise; - /** - * Choose what `ArrayBufferView` is returned in the {@link SocketHandler.data} callback. - * - * @default "buffer" - * - * @remarks - * This lets you select the desired binary type for the `data` callback. - * It's a small performance optimization to let you avoid creating extra - * ArrayBufferView objects when possible. - * - * Bun originally defaulted to `Uint8Array` but when dealing with network - * data, it's more useful to be able to directly read from the bytes which - * `Buffer` allows. - */ - binaryType?: BinaryType; - } - - interface SocketOptions { - /** - * Handlers for socket events - */ - socket: SocketHandler; - /** - * The per-instance data context - */ - data?: Data; - /** - * Whether to allow half-open connections. - * - * A half-open connection occurs when one end of the connection has called `close()` - * or sent a FIN packet, while the other end remains open. When set to `true`: - * - * - The socket won't automatically send FIN when the remote side closes its end - * - The local side can continue sending data even after the remote side has closed - * - The application must explicitly call `end()` to fully close the connection - * - * When `false`, the socket automatically closes both ends of the connection when - * either side closes. - * - * @default false - */ - allowHalfOpen?: boolean; - } - - interface TCPSocketListenOptions extends SocketOptions { - /** - * The hostname to listen on - */ - hostname: string; - /** - * The port to listen on - */ - port: number; - /** - * The TLS configuration object with which to create the server - */ - tls?: TLSOptions | boolean; - /** - * Whether to use exclusive mode. - * - * When set to `true`, the socket binds exclusively to the specified address:port - * combination, preventing other processes from binding to the same port. - * - * When `false` (default), other sockets may be able to bind to the same port - * depending on the operating system's socket sharing capabilities and settings. - * - * Exclusive mode is useful in scenarios where you want to ensure only one - * instance of your server can bind to a specific port at a time. - * - * @default false - */ - exclusive?: boolean; - /** - * Whether to allow half-open connections. - * - * A half-open connection occurs when one end of the connection has called `close()` - * or sent a FIN packet, while the other end remains open. When set to `true`: - * - * - The socket won't automatically send FIN when the remote side closes its end - * - The local side can continue sending data even after the remote side has closed - * - The application must explicitly call `end()` to fully close the connection - * - * When `false` (default), the socket automatically closes both ends of the connection - * when either side closes. - * - * @default false - */ - allowHalfOpen?: boolean; - } - - interface TCPSocketConnectOptions extends SocketOptions { - /** - * The hostname to connect to - */ - hostname: string; - /** - * The port to connect to - */ - port: number; - /** - * TLS Configuration with which to create the socket - */ - tls?: TLSOptions | boolean; - /** - * Whether to use exclusive mode. - * - * When set to `true`, the socket binds exclusively to the specified address:port - * combination, preventing other processes from binding to the same port. - * - * When `false` (default), other sockets may be able to bind to the same port - * depending on the operating system's socket sharing capabilities and settings. - * - * Exclusive mode is useful in scenarios where you want to ensure only one - * instance of your server can bind to a specific port at a time. - * - * @default false - */ - exclusive?: boolean; - reusePort?: boolean; - ipv6Only?: boolean; - } - - interface UnixSocketOptions extends SocketOptions { - /** - * The unix socket to listen on or connect to - */ - unix: string; - - /** - * TLS Configuration with which to create the socket - */ - tls?: TLSOptions | boolean; - } - - interface FdSocketOptions extends SocketOptions { - /** - * TLS Configuration with which to create the socket - */ - tls?: TLSOptions | boolean; - /** - * The file descriptor to connect to - */ - fd: number; - } - - /** - * Create a TCP client that connects to a server via a TCP socket - * - * @category HTTP & Networking - */ - function connect(options: TCPSocketConnectOptions): Promise>; - /** - * Create a TCP client that connects to a server via a unix socket - * - * @category HTTP & Networking - */ - function connect(options: UnixSocketOptions): Promise>; - - /** - * Create a TCP server that listens on a port - * - * @category HTTP & Networking - */ - function listen(options: TCPSocketListenOptions): TCPSocketListener; - /** - * Create a TCP server that listens on a unix socket - * - * @category HTTP & Networking - */ - function listen(options: UnixSocketOptions): UnixSocketListener; - - /** - * @category HTTP & Networking - */ - namespace udp { - type Data = string | ArrayBufferView | ArrayBufferLike; - - export interface SocketHandler { - data?( - socket: Socket, - data: BinaryTypeList[DataBinaryType], - port: number, - address: string, - ): void | Promise; - drain?(socket: Socket): void | Promise; - error?(socket: Socket, error: Error): void | Promise; - } - - export interface ConnectedSocketHandler { - data?( - socket: ConnectedSocket, - data: BinaryTypeList[DataBinaryType], - port: number, - address: string, - ): void | Promise; - drain?(socket: ConnectedSocket): void | Promise; - error?(socket: ConnectedSocket, error: Error): void | Promise; - } - - export interface SocketOptions { - hostname?: string; - port?: number; - binaryType?: DataBinaryType; - socket?: SocketHandler; - } - - export interface ConnectSocketOptions { - hostname?: string; - port?: number; - binaryType?: DataBinaryType; - socket?: ConnectedSocketHandler; - connect: { - hostname: string; - port: number; - }; - } - - export interface BaseUDPSocket { - readonly hostname: string; - readonly port: number; - readonly address: SocketAddress; - readonly binaryType: BinaryType; - readonly closed: boolean; - ref(): void; - unref(): void; - close(): void; - } - - export interface ConnectedSocket extends BaseUDPSocket { - readonly remoteAddress: SocketAddress; - sendMany(packets: readonly Data[]): number; - send(data: Data): boolean; - reload(handler: ConnectedSocketHandler): void; - } - - export interface Socket extends BaseUDPSocket { - sendMany(packets: readonly (Data | string | number)[]): number; - send(data: Data, port: number, address: string): boolean; - reload(handler: SocketHandler): void; - } - } - - /** - * Create a UDP socket - * - * @param options The options to use when creating the server - * @param options.socket The socket handler to use - * @param options.hostname The hostname to listen on - * @param options.port The port to listen on - * @param options.binaryType The binary type to use for the socket - * @param options.connect The hostname and port to connect to - * - * @category HTTP & Networking - */ - export function udpSocket( - options: udp.SocketOptions, - ): Promise>; - export function udpSocket( - options: udp.ConnectSocketOptions, - ): Promise>; - - /** - * @deprecated use {@link Bun.Spawn} instead - */ - export import SpawnOptions = Spawn; - - namespace Spawn { - /** - * Option for stdout/stderr - */ - type Readable = - | "pipe" - | "inherit" - | "ignore" - | null // equivalent to "ignore" - | undefined // to use default - | BunFile - | ArrayBufferView - | number; - - /** - * Option for stdin - */ - type Writable = - | "pipe" - | "inherit" - | "ignore" - | null // equivalent to "ignore" - | undefined // to use default - | BunFile - | ArrayBufferView - | number - | ReadableStream - | Blob - | Response - | Request; - - /** - * @deprecated use BaseOptions or the specific options for the specific {@link spawn} or {@link spawnSync} usage - */ - type OptionsObject = BaseOptions; - - interface BaseOptions { - /** - * The current working directory of the process - * - * Defaults to `process.cwd()` - */ - cwd?: string; - - /** - * Run the child in a separate process group, detached from the parent. - * - * - POSIX: calls `setsid()` so the child starts a new session and becomes - * the process group leader. It can outlive the parent and receive - * signals independently of the parent’s terminal/process group. - * - Windows: sets `UV_PROCESS_DETACHED`, allowing the child to outlive - * the parent and receive signals independently. - * - * Note: stdio may keep the parent process alive. Pass `stdio: ["ignore", - * "ignore", "ignore"]` to the spawn constructor to prevent this. - * - * @default false - */ - detached?: boolean; - - /** - * The environment variables of the process - * - * Defaults to `process.env` as it was when the current Bun process launched. - * - * Changes to `process.env` at runtime won't automatically be reflected in the default value. For that, you can pass `process.env` explicitly. - */ - env?: Record; - - /** - * The standard file descriptors of the process, in the form [stdin, stdout, stderr]. - * This overrides the `stdin`, `stdout`, and `stderr` properties. - * - * For stdin you may pass: - * - * - `"ignore"`, `null`, `undefined`: The process will have no standard input (default) - * - `"pipe"`: The process will have a new {@link FileSink} for standard input - * - `"inherit"`: The process will inherit the standard input of the current process - * - `ArrayBufferView`, `Blob`, `Bun.file()`, `Response`, `Request`: The process will read from buffer/stream. - * - `number`: The process will read from the file descriptor - * - * For stdout and stdin you may pass: - * - * - `"pipe"`, `undefined`: The process will have a {@link ReadableStream} for standard output/error - * - `"ignore"`, `null`: The process will have no standard output/error - * - `"inherit"`: The process will inherit the standard output/error of the current process - * - `ArrayBufferView`: The process write to the preallocated buffer. Not implemented. - * - `number`: The process will write to the file descriptor - * - * @default ["ignore", "pipe", "inherit"] for `spawn` - * ["ignore", "pipe", "pipe"] for `spawnSync` - */ - stdio?: [In, Out, Err, ...Readable[]]; - - /** - * The file descriptor for the standard input. It may be: - * - * - `"ignore"`, `null`, `undefined`: The process will have no standard input - * - `"pipe"`: The process will have a new {@link FileSink} for standard input - * - `"inherit"`: The process will inherit the standard input of the current process - * - `ArrayBufferView`, `Blob`: The process will read from the buffer - * - `number`: The process will read from the file descriptor - * - * @default "ignore" - */ - stdin?: In; - /** - * The file descriptor for the standard output. It may be: - * - * - `"pipe"`, `undefined`: The process will have a {@link ReadableStream} for standard output/error - * - `"ignore"`, `null`: The process will have no standard output/error - * - `"inherit"`: The process will inherit the standard output/error of the current process - * - `ArrayBufferView`: The process write to the preallocated buffer. Not implemented. - * - `number`: The process will write to the file descriptor - * - * @default "pipe" - */ - stdout?: Out; - /** - * The file descriptor for the standard error. It may be: - * - * - `"pipe"`, `undefined`: The process will have a {@link ReadableStream} for standard output/error - * - `"ignore"`, `null`: The process will have no standard output/error - * - `"inherit"`: The process will inherit the standard output/error of the current process - * - `ArrayBufferView`: The process write to the preallocated buffer. Not implemented. - * - `number`: The process will write to the file descriptor - * - * @default "inherit" for `spawn` - * "pipe" for `spawnSync` - */ - stderr?: Err; - - /** - * Callback that runs when the {@link Subprocess} exits - * - * This is called even if the process exits with a non-zero exit code. - * - * Warning: this may run before the `Bun.spawn` function returns. - * - * A simple alternative is `await subprocess.exited`. - * - * @example - * - * ```ts - * const subprocess = spawn({ - * cmd: ["echo", "hello"], - * onExit: (subprocess, code) => { - * console.log(`Process exited with code ${code}`); - * }, - * }); - * ``` - */ - onExit?( - subprocess: Subprocess, - exitCode: number | null, - signalCode: number | null, - /** - * If an error occurred in the call to waitpid2, this will be the error. - */ - error?: ErrorLike, - ): void | Promise; - - /** - * Called exactly once when the IPC channel between the parent and this - * subprocess is closed. After this runs, no further IPC messages will be - * delivered. - * - * When it fires: - * - The child called `process.disconnect()` or the parent called - * `subprocess.disconnect()`. - * - The child exited for any reason (normal exit or due to a signal like - * `SIGILL`, `SIGKILL`, etc.). - * - The child replaced itself with a program that does not support Bun - * IPC. - * - * Notes: - * - This callback indicates that the pipe is closed; it is not an error - * by itself. Use {@link onExit} or {@link Subprocess.exited} to - * determine why the process ended. - * - It may occur before or after {@link onExit} depending on timing; do - * not rely on ordering. Typically, if you or the child call - * `disconnect()` first, this fires before {@link onExit}; if the - * process exits without an explicit disconnect, either may happen - * first. - * - Only runs when {@link ipc} is enabled and runs at most once per - * subprocess. - * - If the child becomes a zombie (exited but not yet reaped), the IPC is - * already closed, and this callback will fire (or may already have - * fired). - * - * @example - * - * ```ts - * const subprocess = spawn({ - * cmd: ["echo", "hello"], - * ipc: (message) => console.log(message), - * onDisconnect: () => { - * console.log("IPC channel disconnected"); - * }, - * }); - * ``` - */ - onDisconnect?(): void | Promise; - - /** - * When specified, Bun will open an IPC channel to the subprocess. The passed callback is called for - * incoming messages, and `subprocess.send` can send messages to the subprocess. Messages are serialized - * using the JSC serialize API, which allows for the same types that `postMessage`/`structuredClone` supports. - * - * The subprocess can send and receive messages by using `process.send` and `process.on("message")`, - * respectively. This is the same API as what Node.js exposes when `child_process.fork()` is used. - * - * Currently, this is only compatible with processes that are other `bun` instances. - */ - ipc?( - message: any, - /** - * The {@link Subprocess} that received the message - */ - subprocess: Subprocess, - handle?: unknown, - ): void; - - /** - * The serialization format to use for IPC messages. Defaults to `"advanced"`. - * - * To communicate with Node.js processes, use `"json"`. - * - * When `ipc` is not specified, this is ignored. - */ - serialization?: "json" | "advanced"; - - /** - * If true, the subprocess will have a hidden window. - */ - windowsHide?: boolean; - - /** - * If true, no quoting or escaping of arguments is done on Windows. - */ - windowsVerbatimArguments?: boolean; - - /** - * Path to the executable to run in the subprocess. This defaults to `cmds[0]`. - * - * One use-case for this is for applications which wrap other applications or to simulate a symlink. - * - * @default cmds[0] - */ - argv0?: string; - - /** - * An {@link AbortSignal} that can be used to abort the subprocess. - * - * This is useful for aborting a subprocess when some other part of the - * program is aborted, such as a `fetch` response. - * - * If the signal is aborted, the process will be killed with the signal - * specified by `killSignal` (defaults to SIGTERM). - * - * @example - * ```ts - * const controller = new AbortController(); - * const { signal } = controller; - * const start = performance.now(); - * const subprocess = Bun.spawn({ - * cmd: ["sleep", "100"], - * signal, - * }); - * await Bun.sleep(1); - * controller.abort(); - * await subprocess.exited; - * const end = performance.now(); - * console.log(end - start); // 1ms instead of 101ms - * ``` - */ - signal?: AbortSignal; - - /** - * The maximum amount of time the process is allowed to run in milliseconds. - * - * If the timeout is reached, the process will be killed with the signal - * specified by `killSignal` (defaults to SIGTERM). - * - * @example - * ```ts - * // Kill the process after 5 seconds - * const subprocess = Bun.spawn({ - * cmd: ["sleep", "10"], - * timeout: 5000, - * }); - * await subprocess.exited; // Will resolve after 5 seconds - * ``` - */ - timeout?: number; - - /** - * The signal to use when killing the process after a timeout, when the AbortSignal is aborted, - * or when the process goes over the `maxBuffer` limit. - * - * @default "SIGTERM" (signal 15) - * - * @example - * ```ts - * // Kill the process with SIGKILL after 5 seconds - * const subprocess = Bun.spawn({ - * cmd: ["sleep", "10"], - * timeout: 5000, - * killSignal: "SIGKILL", - * }); - * ``` - */ - killSignal?: string | number; - - /** - * The maximum number of bytes the process may output. If the process goes over this limit, - * it is killed with signal `killSignal` (defaults to SIGTERM). - * - * @default undefined (no limit) - */ - maxBuffer?: number; - } - - interface SpawnSyncOptions - extends BaseOptions {} - - interface SpawnOptions - extends BaseOptions { - /** - * If true, stdout and stderr pipes will not automatically start reading - * data. Reading will only begin when you access the `stdout` or `stderr` - * properties. - * - * This can improve performance when you don't need to read output - * immediately. - * - * @default false - * - * @example - * ```ts - * const subprocess = Bun.spawn({ - * cmd: ["echo", "hello"], - * lazy: true, // Don't start reading stdout until accessed - * }); - * // stdout reading hasn't started yet - * await subprocess.stdout.text(); // Now reading starts - * ``` - */ - lazy?: boolean; - - /** - * Spawn the subprocess with a pseudo-terminal (PTY) attached. - * - * When this option is provided: - * - `stdin`, `stdout`, and `stderr` are all connected to the terminal - * - The subprocess sees itself running in a real terminal (`isTTY = true`) - * - Access the terminal via `subprocess.terminal` - * - `subprocess.stdin`, `subprocess.stdout`, `subprocess.stderr` return `null` - * - * Only available on POSIX systems (Linux, macOS). - * - * @example - * ```ts - * const proc = Bun.spawn(["bash"], { - * terminal: { - * cols: 80, - * rows: 24, - * data: (term, data) => console.log(data.toString()), - * }, - * }); - * - * proc.terminal.write("echo hello\n"); - * await proc.exited; - * proc.terminal.close(); - * ``` - * - * You can also pass an existing `Terminal` object for reuse across multiple spawns: - * ```ts - * const terminal = new Bun.Terminal({ ... }); - * const proc1 = Bun.spawn(["echo", "first"], { terminal }); - * await proc1.exited; - * const proc2 = Bun.spawn(["echo", "second"], { terminal }); - * await proc2.exited; - * terminal.close(); - * ``` - */ - terminal?: TerminalOptions | Terminal; - } - - type ReadableToIO = X extends "pipe" | undefined - ? ReadableStream> - : X extends BunFile | ArrayBufferView | number - ? number - : undefined; - - type ReadableToSyncIO = X extends "pipe" | undefined ? Buffer : undefined; - - type WritableIO = FileSink | number | undefined; - - type WritableToIO = X extends "pipe" - ? FileSink - : X extends BunFile | ArrayBufferView | Blob | Request | Response | number - ? number - : undefined; - } - - interface ResourceUsage { - /** - * The number of voluntary and involuntary context switches that the process made. - */ - contextSwitches: { - /** - * Voluntary context switches (context switches that the process initiated). - */ - voluntary: number; - /** - * Involuntary context switches (context switches initiated by the system scheduler). - */ - involuntary: number; - }; - - /** - * The amount of CPU time used by the process, in microseconds. - */ - cpuTime: { - /** - * User CPU time used by the process, in microseconds. - */ - user: number; - /** - * System CPU time used by the process, in microseconds. - */ - system: number; - /** - * Total CPU time used by the process, in microseconds. - */ - total: number; - }; - /** - * The maximum amount of resident set size (in bytes) used by the process during its lifetime. - */ - maxRSS: number; - - /** - * IPC messages sent and received by the process. - */ - messages: { - /** - * The number of IPC messages sent. - */ - sent: number; - /** - * The number of IPC messages received. - */ - received: number; - }; - /** - * The number of IO operations done by the process. - */ - ops: { - /** - * The number of input operations via the file system. - */ - in: number; - /** - * The number of output operations via the file system. - */ - out: number; - }; - /** - * The amount of shared memory that the process used. - */ - shmSize: number; - /** - * The number of signals delivered to the process. - */ - signalCount: number; - /** - * The number of times the process was swapped out of main memory. - */ - swapCount: number; - } - - /** - * A process created by {@link Bun.spawn}. - * - * This type accepts 3 optional type parameters which correspond to the `stdio` array from the options object. Instead of specifying these, you should use one of the following utility types instead: - * - {@link ReadableSubprocess} (any, pipe, pipe) - * - {@link WritableSubprocess} (pipe, any, any) - * - {@link PipedSubprocess} (pipe, pipe, pipe) - * - {@link NullSubprocess} (ignore, ignore, ignore) - */ - interface Subprocess< - In extends SpawnOptions.Writable = SpawnOptions.Writable, - Out extends SpawnOptions.Readable = SpawnOptions.Readable, - Err extends SpawnOptions.Readable = SpawnOptions.Readable, - > extends AsyncDisposable { - readonly stdin: SpawnOptions.WritableToIO; - readonly stdout: SpawnOptions.ReadableToIO; - readonly stderr: SpawnOptions.ReadableToIO; - - /** - * The terminal attached to this subprocess, if spawned with the `terminal` option. - * Returns `undefined` if no terminal was attached. - * - * When a terminal is attached, `stdin`, `stdout`, and `stderr` return `null`. - * Use `terminal.write()` and the `data` callback instead. - * - * @example - * ```ts - * const proc = Bun.spawn(["bash"], { - * terminal: { data: (term, data) => console.log(data.toString()) }, - * }); - * - * proc.terminal?.write("echo hello\n"); - * ``` - */ - readonly terminal: Terminal | undefined; - - /** - * Access extra file descriptors passed to the `stdio` option in the options object. - */ - readonly stdio: [null, null, null, ...number[]]; - - /** - * This returns the same value as {@link Subprocess.stdout} - * - * It exists for compatibility with {@link ReadableStream.pipeThrough} - */ - readonly readable: SpawnOptions.ReadableToIO; - - /** - * The process ID of the child process - * @example - * ```ts - * const { pid } = Bun.spawn({ cmd: ["echo", "hello"] }); - * console.log(pid); // 1234 - * ``` - */ - readonly pid: number; - - /** - * The exit code of the process - * - * The promise will resolve when the process exits - */ - readonly exited: Promise; - - /** - * Synchronously get the exit code of the process - * - * If the process hasn't exited yet, this will return `null` - */ - readonly exitCode: number | null; - - /** - * Synchronously get the signal code of the process - * - * If the process never sent a signal code, this will return `null` - * - * To receive signal code changes, use the `onExit` callback. - * - * If the signal code is unknown, it will return the original signal code - * number, but that case should essentially never happen. - */ - readonly signalCode: NodeJS.Signals | null; - - /** - * Has the process exited? - */ - readonly killed: boolean; - - /** - * Kill the process - * @param exitCode The exitCode to send to the process - */ - kill(exitCode?: number | NodeJS.Signals): void; - - /** - * This method will tell Bun to wait for this process to exit after you already - * called `unref()`. - * - * Before shutting down, Bun will wait for all subprocesses to exit by default - */ - ref(): void; - - /** - * Before shutting down, Bun will wait for all subprocesses to exit by default - * - * This method will tell Bun to not wait for this process to exit before shutting down. - */ - unref(): void; - - /** - * Send a message to the subprocess. This is only supported if the subprocess - * was created with the `ipc` option, and is another instance of `bun`. - * - * Messages are serialized using the JSC serialize API, which allows for the same types that `postMessage`/`structuredClone` supports. - */ - send(message: any): void; - - /** - * Disconnect the IPC channel to the subprocess. This is only supported if the subprocess - * was created with the `ipc` option. - */ - disconnect(): void; - - /** - * Get the resource usage information of the process (max RSS, CPU time, etc) - * - * Only available after the process has exited - * - * If the process hasn't exited yet, this will return `undefined` - */ - resourceUsage(): ResourceUsage | undefined; - } - - /** - * A process created by {@link Bun.spawnSync}. - * - * This type accepts 2 optional type parameters which correspond to the `stdout` and `stderr` options. Instead of specifying these, you should use one of the following utility types instead: - * - {@link ReadableSyncSubprocess} (pipe, pipe) - * - {@link NullSyncSubprocess} (ignore, ignore) - */ - interface SyncSubprocess< - Out extends SpawnOptions.Readable = SpawnOptions.Readable, - Err extends SpawnOptions.Readable = SpawnOptions.Readable, - > { - stdout: SpawnOptions.ReadableToSyncIO; - stderr: SpawnOptions.ReadableToSyncIO; - exitCode: number; - success: boolean; - /** - * Get the resource usage information of the process (max RSS, CPU time, etc) - */ - resourceUsage: ResourceUsage; - - signalCode?: string; - exitedDueToTimeout?: boolean; - exitedDueToMaxBuffer?: boolean; - pid: number; - } - - /** - * Spawn a new process - * - * @category Process Management - * - * ```js - * const proc = Bun.spawn({ - * cmd: ["echo", "hello"], - * stdout: "pipe", - * }); - * const text = await proc.stdout.text(); - * console.log(text); // "hello\n" - * ``` - * - * Internally, this uses [posix_spawn(2)](https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man2/posix_spawn.2.html) - */ - function spawn< - const In extends SpawnOptions.Writable = "ignore", - const Out extends SpawnOptions.Readable = "pipe", - const Err extends SpawnOptions.Readable = "inherit", - >( - options: SpawnOptions.SpawnOptions & { - /** - * The command to run - * - * The first argument will be resolved to an absolute executable path. It must be a file, not a directory. - * - * If you explicitly set `PATH` in `env`, that `PATH` will be used to resolve the executable instead of the default `PATH`. - * - * To check if the command exists before running it, use `Bun.which(bin)`. - * - * @example - * ```ts - * const subprocess = Bun.spawn(["echo", "hello"]); - * ``` - */ - cmd: string[]; // to support dynamically constructed commands - }, - ): Subprocess; - - /** - * Spawn a new process - * - * ```js - * const proc = Bun.spawn(["echo", "hello"]); - * const text = await proc.stdout.text(); - * console.log(text); // "hello\n" - * ``` - * - * Internally, this uses [posix_spawn(2)](https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man2/posix_spawn.2.html) - */ - function spawn< - const In extends SpawnOptions.Writable = "ignore", - const Out extends SpawnOptions.Readable = "pipe", - const Err extends SpawnOptions.Readable = "inherit", - >( - /** - * The command to run - * - * The first argument will be resolved to an absolute executable path. It must be a file, not a directory. - * - * If you explicitly set `PATH` in `env`, that `PATH` will be used to resolve the executable instead of the default `PATH`. - * - * To check if the command exists before running it, use `Bun.which(bin)`. - * - * @example - * ```ts - * const subprocess = Bun.spawn(["echo", "hello"]); - * ``` - */ - cmds: string[], - options?: SpawnOptions.SpawnOptions, - ): Subprocess; - - /** - * Spawn a new process - * - * @category Process Management - * - * ```js - * const {stdout} = Bun.spawnSync({ - * cmd: ["echo", "hello"], - * }); - * console.log(stdout.toString()); // "hello\n" - * ``` - * - * Internally, this uses [posix_spawn(2)](https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man2/posix_spawn.2.html) - */ - function spawnSync< - const In extends SpawnOptions.Writable = "ignore", - const Out extends SpawnOptions.Readable = "pipe", - const Err extends SpawnOptions.Readable = "pipe", - >( - options: SpawnOptions.SpawnSyncOptions & { - /** - * The command to run - * - * The first argument will be resolved to an absolute executable path. It must be a file, not a directory. - * - * If you explicitly set `PATH` in `env`, that `PATH` will be used to resolve the executable instead of the default `PATH`. - * - * To check if the command exists before running it, use `Bun.which(bin)`. - * - * @example - * ```ts - * const subprocess = Bun.spawnSync({ cmd: ["echo", "hello"] }); - * ``` - */ - cmd: string[]; - - onExit?: never; - }, - ): SyncSubprocess; - - /** - * Synchronously spawn a new process - * - * ```js - * const {stdout} = Bun.spawnSync(["echo", "hello"]); - * console.log(stdout.toString()); // "hello\n" - * ``` - * - * Internally, this uses [posix_spawn(2)](https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man2/posix_spawn.2.html) - */ - function spawnSync< - const In extends SpawnOptions.Writable = "ignore", - const Out extends SpawnOptions.Readable = "pipe", - const Err extends SpawnOptions.Readable = "pipe", - >( - /** - * The command to run - * - * The first argument will be resolved to an absolute executable path. It must be a file, not a directory. - * - * If you explicitly set `PATH` in `env`, that `PATH` will be used to resolve the executable instead of the default `PATH`. - * - * To check if the command exists before running it, use `Bun.which(bin)`. - * - * @example - * ```ts - * const subprocess = Bun.spawnSync(["echo", "hello"]); - * ``` - */ - cmds: string[], - options?: SpawnOptions.SpawnSyncOptions, - ): SyncSubprocess; - - /** Utility type for any process from {@link Bun.spawn()} with both stdout and stderr set to `"pipe"` */ - type ReadableSubprocess = Subprocess; - /** Utility type for any process from {@link Bun.spawn()} with stdin set to `"pipe"` */ - type WritableSubprocess = Subprocess<"pipe", any, any>; - /** Utility type for any process from {@link Bun.spawn()} with stdin, stdout, stderr all set to `"pipe"`. A combination of {@link ReadableSubprocess} and {@link WritableSubprocess} */ - type PipedSubprocess = Subprocess<"pipe", "pipe", "pipe">; - /** Utility type for any process from {@link Bun.spawn()} with stdin, stdout, stderr all set to `null` or similar. */ - type NullSubprocess = Subprocess< - "ignore" | "inherit" | null | undefined, - "ignore" | "inherit" | null | undefined, - "ignore" | "inherit" | null | undefined - >; - /** Utility type for any process from {@link Bun.spawnSync()} with both stdout and stderr set to `"pipe"` */ - type ReadableSyncSubprocess = SyncSubprocess<"pipe", "pipe">; - /** Utility type for any process from {@link Bun.spawnSync()} with both stdout and stderr set to `null` or similar */ - type NullSyncSubprocess = SyncSubprocess< - "ignore" | "inherit" | null | undefined, - "ignore" | "inherit" | null | undefined - >; - - /** - * Options for creating a pseudo-terminal (PTY). - */ - interface TerminalOptions { - /** - * Number of columns for the terminal. - * @default 80 - */ - cols?: number; - /** - * Number of rows for the terminal. - * @default 24 - */ - rows?: number; - /** - * Terminal name (e.g., "xterm-256color"). - * @default "xterm-256color" - */ - name?: string; - /** - * Callback invoked when data is received from the terminal. - * @param terminal The terminal instance - * @param data The data received as a Uint8Array - */ - data?: (terminal: Terminal, data: Uint8Array) => void; - /** - * Callback invoked when the PTY stream closes (EOF or read error). - * Note: exitCode is a PTY lifecycle status (0=clean EOF, 1=error), NOT the subprocess exit code. - * Use Subprocess.exited or onExit callback for actual process exit information. - * @param terminal The terminal instance - * @param exitCode PTY lifecycle status (0 for EOF, 1 for error) - * @param signal Reserved for future signal reporting, currently null - */ - exit?: (terminal: Terminal, exitCode: number, signal: string | null) => void; - /** - * Callback invoked when the terminal is ready to receive more data. - * @param terminal The terminal instance - */ - drain?: (terminal: Terminal) => void; - } - - /** - * A pseudo-terminal (PTY) that can be used to spawn interactive terminal programs. - * - * @example - * ```ts - * await using terminal = new Bun.Terminal({ - * cols: 80, - * rows: 24, - * data(term, data) { - * console.log("Received:", new TextDecoder().decode(data)); - * }, - * }); - * - * // Spawn a shell connected to the PTY - * const proc = Bun.spawn(["bash"], { terminal }); - * - * // Write to the terminal - * terminal.write("echo hello\n"); - * - * // Wait for process to exit - * await proc.exited; - * - * // Terminal is closed automatically by `await using` - * ``` - */ - class Terminal implements AsyncDisposable { - constructor(options: TerminalOptions); - - /** - * Whether the terminal is closed. - */ - readonly closed: boolean; - - /** - * Write data to the terminal. - * @param data The data to write (string or BufferSource) - * @returns The number of bytes written - */ - write(data: string | BufferSource): number; - - /** - * Resize the terminal. - * @param cols New number of columns - * @param rows New number of rows - */ - resize(cols: number, rows: number): void; - - /** - * Set raw mode on the terminal. - * In raw mode, input is passed directly without processing. - * @param enabled Whether to enable raw mode - */ - setRawMode(enabled: boolean): void; - - /** - * Reference the terminal to keep the event loop alive. - */ - ref(): void; - - /** - * Unreference the terminal to allow the event loop to exit. - */ - unref(): void; - - /** - * Close the terminal. - */ - close(): void; - - /** - * Async dispose for use with `await using`. - */ - [Symbol.asyncDispose](): Promise; - - /** - * Terminal input flags (c_iflag from termios). - * Controls input processing behavior like ICRNL, IXON, etc. - * Returns 0 if terminal is closed. - * Setting returns true on success, false on failure. - */ - inputFlags: number; - - /** - * Terminal output flags (c_oflag from termios). - * Controls output processing behavior like OPOST, ONLCR, etc. - * Returns 0 if terminal is closed. - * Setting returns true on success, false on failure. - */ - outputFlags: number; - - /** - * Terminal local flags (c_lflag from termios). - * Controls local processing like ICANON, ECHO, ISIG, etc. - * Returns 0 if terminal is closed. - * Setting returns true on success, false on failure. - */ - localFlags: number; - - /** - * Terminal control flags (c_cflag from termios). - * Controls hardware characteristics like CSIZE, PARENB, etc. - * Returns 0 if terminal is closed. - * Setting returns true on success, false on failure. - */ - controlFlags: number; - } - - // Blocked on https://github.com/oven-sh/bun/issues/8329 - // /** - // * - // * Count the visible width of a string, as it would be displayed in a terminal. - // * - // * By default, strips ANSI escape codes before measuring the string. This is - // * because ANSI escape codes are not visible characters. If passed a non-string, - // * it will return 0. - // * - // * @param str The string to measure - // * @param options - // */ - // function stringWidth( - // str: string, - // options?: { - // /** - // * Whether to include ANSI escape codes in the width calculation - // * - // * Slightly faster if set to `false`, but less accurate if the string contains ANSI escape codes. - // * @default false - // */ - // countAnsiEscapeCodes?: boolean; - // }, - // ): number; - - class FileSystemRouter { - /** - * Create a new {@link FileSystemRouter}. - * - * @example - * ```ts - * const router = new FileSystemRouter({ - * dir: process.cwd() + "/pages", - * style: "nextjs", - * }); - * - * const {params} = router.match("/blog/2020/01/01/hello-world"); - * console.log(params); // {year: "2020", month: "01", day: "01", slug: "hello-world"} - * ``` - * @param options The options to use when creating the router - * @param options.dir The root directory containing the files to route - * @param options.style The style of router to use (only "nextjs" supported - * for now) - */ - constructor(options: { - /** - * The root directory containing the files to route - * - * There is no default value for this option. - * - * @example - * ```ts - * const router = new FileSystemRouter({ - * dir: - */ - dir: string; - style: "nextjs"; - - /** The base path to use when routing */ - assetPrefix?: string; - origin?: string; - /** Limit the pages to those with particular file extensions. */ - fileExtensions?: string[]; - }); - - // todo: URL - match(input: string | Request | Response): MatchedRoute | null; - - readonly assetPrefix: string; - readonly origin: string; - readonly style: string; - readonly routes: Record; - - reload(): void; - } - - interface MatchedRoute { - /** - * A map of the parameters from the route - * - * @example - * ```ts - * const router = new FileSystemRouter({ - * dir: "/path/to/files", - * style: "nextjs", - * }); - * const {params} = router.match("/blog/2020/01/01/hello-world"); - * console.log(params.year); // "2020" - * console.log(params.month); // "01" - * console.log(params.day); // "01" - * console.log(params.slug); // "hello-world" - * ``` - */ - readonly params: Record; - readonly filePath: string; - readonly pathname: string; - readonly query: Record; - readonly name: string; - readonly kind: "exact" | "catch-all" | "optional-catch-all" | "dynamic"; - readonly src: string; - } - - /** - * The current version of Bun - * @example - * "1.2.0" - */ - const version: string; - - /** - * The current version of Bun with the shortened commit sha of the build - * @example "v1.2.0 (a1b2c3d4)" - */ - const version_with_sha: string; - - /** - * The git sha at the time the currently-running version of Bun was compiled - * @example - * "a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2" - */ - const revision: string; - - /** - * Find the index of a newline character in potentially ill-formed UTF-8 text. - * - * This is sort of like readline() except without the IO. - */ - function indexOfLine(buffer: ArrayBufferView | ArrayBufferLike, offset?: number): number; - - interface GlobScanOptions { - /** - * The root directory to start matching from. Defaults to `process.cwd()` - */ - cwd?: string; - - /** - * Allow patterns to match entries that begin with a period (`.`). - * - * @default false - */ - dot?: boolean; - - /** - * Return the absolute path for entries. - * - * @default false - */ - absolute?: boolean; - - /** - * Indicates whether to traverse descendants of symbolic link directories. - * - * @default false - */ - followSymlinks?: boolean; - - /** - * Throw an error when symbolic link is broken - * - * @default false - */ - throwErrorOnBrokenSymlink?: boolean; - - /** - * Return only files. - * - * @default true - */ - onlyFiles?: boolean; - } - - /** - * Match files using [glob patterns](https://en.wikipedia.org/wiki/Glob_(programming)). - * - * The supported pattern syntax for is: - * - * - `?` - * Matches any single character. - * - `*` - * Matches zero or more characters, except for path separators ('/' or '\'). - * - `**` - * Matches zero or more characters, including path separators. - * Must match a complete path segment, i.e. followed by a path separator or - * at the end of the pattern. - * - `[ab]` - * Matches one of the characters contained in the brackets. - * Character ranges (e.g. "[a-z]") are also supported. - * Use "[!ab]" or "[^ab]" to match any character *except* those contained - * in the brackets. - * - `{a,b}` - * Match one of the patterns contained in the braces. - * Any of the wildcards listed above can be used in the sub patterns. - * Braces may be nested up to 10 levels deep. - * - `!` - * Negates the result when at the start of the pattern. - * Multiple "!" characters negate the pattern multiple times. - * - `\` - * Used to escape any of the special characters above. - * - * @example - * ```js - * const glob = new Glob("*.{ts,tsx}"); - * const scannedFiles = await Array.fromAsync(glob.scan({ cwd: './src' })) - * ``` - */ - export class Glob { - constructor(pattern: string); - - /** - * Scan a root directory recursively for files that match this glob pattern. Returns an async iterator. - * - * @throws {ENOTDIR} Given root cwd path must be a directory - * - * @example - * ```js - * const glob = new Glob("*.{ts,tsx}"); - * const scannedFiles = await Array.fromAsync(glob.scan({ cwd: './src' })) - * ``` - * - * @example - * ```js - * const glob = new Glob("*.{ts,tsx}"); - * for await (const path of glob.scan()) { - * // do something - * } - * ``` - */ - scan(optionsOrCwd?: string | GlobScanOptions): AsyncIterableIterator; - - /** - * Synchronously scan a root directory recursively for files that match this glob pattern. Returns an iterator. - * - * @throws {ENOTDIR} Given root cwd path must be a directory - * - * @example - * ```js - * const glob = new Glob("*.{ts,tsx}"); - * const scannedFiles = Array.from(glob.scan({ cwd: './src' })) - * ``` - * - * @example - * ```js - * const glob = new Glob("*.{ts,tsx}"); - * for (const path of glob.scan()) { - * // do something - * } - * ``` - */ - scanSync(optionsOrCwd?: string | GlobScanOptions): IterableIterator; - - /** - * Match the glob against a string - * - * @example - * ```js - * const glob = new Glob("*.{ts,tsx}"); - * expect(glob.match('foo.ts')).toBeTrue(); - * ``` - */ - match(str: string): boolean; - } - - /** - * Generate a UUIDv7, which is a sequential ID based on the current timestamp with a random component. - * - * When the same timestamp is used multiple times, a monotonically increasing - * counter is appended to allow sorting. The final 8 bytes are - * cryptographically random. When the timestamp changes, the counter resets to - * a psuedo-random integer. - * - * @param encoding "hex" | "base64" | "base64url" - * @param timestamp Unix timestamp in milliseconds, defaults to `Date.now()` - * - * @example - * ```js - * import { randomUUIDv7 } from "bun"; - * const array = [ - * randomUUIDv7(), - * randomUUIDv7(), - * randomUUIDv7(), - * ] - * [ - * "0192ce07-8c4f-7d66-afec-2482b5c9b03c", - * "0192ce07-8c4f-7d67-805f-0f71581b5622", - * "0192ce07-8c4f-7d68-8170-6816e4451a58" - * ] - * ``` - */ - function randomUUIDv7( - /** - * @default "hex" - */ - encoding?: "hex" | "base64" | "base64url", - /** - * @default Date.now() - */ - timestamp?: number | Date, - ): string; - - /** - * Generate a UUIDv7 as a Buffer - * - * @param encoding "buffer" - * @param timestamp Unix timestamp in milliseconds, defaults to `Date.now()` - */ - function randomUUIDv7( - encoding: "buffer", - /** - * @default Date.now() - */ - timestamp?: number | Date, - ): Buffer; - - /** - * Generate a UUIDv5, which is a name-based UUID based on the SHA-1 hash of a namespace UUID and a name. - * - * @param name The name to use for the UUID - * @param namespace The namespace to use for the UUID - * @param encoding The encoding to use for the UUID - * - * - * @example - * ```js - * import { randomUUIDv5 } from "bun"; - * const uuid = randomUUIDv5("www.example.com", "dns"); - * console.log(uuid); // "6ba7b810-9dad-11d1-80b4-00c04fd430c8" - * ``` - * - * ```js - * import { randomUUIDv5 } from "bun"; - * const uuid = randomUUIDv5("www.example.com", "url"); - * console.log(uuid); // "6ba7b811-9dad-11d1-80b4-00c04fd430c8" - * ``` - */ - function randomUUIDv5( - name: string | BufferSource, - namespace: string | BufferSource | "dns" | "url" | "oid" | "x500", - /** - * @default "hex" - */ - encoding?: "hex" | "base64" | "base64url", - ): string; - - /** - * Generate a UUIDv5 as a Buffer - * - * @param name The name to use for the UUID - * @param namespace The namespace to use for the UUID - * @param encoding The encoding to use for the UUID - * - * @example - * ```js - * import { randomUUIDv5 } from "bun"; - * const uuid = randomUUIDv5("www.example.com", "url", "buffer"); - * console.log(uuid); // - * ``` - */ - function randomUUIDv5( - name: string | BufferSource, - namespace: string | BufferSource | "dns" | "url" | "oid" | "x500", - encoding: "buffer", - ): Buffer; - - /** - * Types for `bun.lock` - */ - type BunLockFile = { - lockfileVersion: 0 | 1; - workspaces: { - [workspace: string]: BunLockFileWorkspacePackage; - }; - /** @see https://bun.com/docs/install/overrides */ - overrides?: Record; - /** @see https://bun.com/docs/install/patch */ - patchedDependencies?: Record; - /** @see https://bun.com/docs/install/lifecycle#trusteddependencies */ - trustedDependencies?: string[]; - /** @see https://bun.com/docs/install/catalogs */ - catalog?: Record; - /** @see https://bun.com/docs/install/catalogs */ - catalogs?: Record>; - - /** - * `0` / `undefined` for projects created before v1.3.2, `1` for projects created after. - * - * --- - * Right now this only changes the default [install linker strategy](https://bun.com/docs/pm/cli/install#isolated-installs): - * - With `0`, the linker is hoisted. - * - With `1`, the linker is isolated for workspaces and hoisted for single-package projects. - */ - configVersion?: 0 | 1; - - /** - * ``` - * INFO = { prod/dev/optional/peer dependencies, os, cpu, libc (TODO), bin, binDir } - * - * // first index is resolution for each type of package - * npm -> [ "name@version", registry (TODO: remove if default), INFO, integrity] - * symlink -> [ "name@link:path", INFO ] - * folder -> [ "name@file:path", INFO ] - * workspace -> [ "name@workspace:path" ] // workspace is only path - * tarball -> [ "name@tarball", INFO ] - * root -> [ "name@root:", { bin, binDir } ] - * git -> [ "name@git+repo", INFO, .bun-tag string (TODO: remove this) ] - * github -> [ "name@github:user/repo", INFO, .bun-tag string (TODO: remove this) ] - * ``` - * */ - packages: { - [pkg: string]: BunLockFilePackageArray; - }; - }; - - type BunLockFileBasePackageInfo = { - dependencies?: Record; - devDependencies?: Record; - optionalDependencies?: Record; - peerDependencies?: Record; - optionalPeers?: string[]; - bin?: string | Record; - binDir?: string; - }; - - type BunLockFileWorkspacePackage = BunLockFileBasePackageInfo & { - name?: string; - version?: string; - }; - - type BunLockFilePackageInfo = BunLockFileBasePackageInfo & { - os?: string | string[]; - cpu?: string | string[]; - bundled?: true; - }; - - /** @see {@link BunLockFile.packages} for more info */ - type BunLockFilePackageArray = - /** npm */ - | [pkg: string, registry: string, info: BunLockFilePackageInfo, integrity: string] - /** symlink, folder, tarball */ - | [pkg: string, info: BunLockFilePackageInfo] - /** workspace */ - | [pkg: string] - /** git, github */ - | [pkg: string, info: BunLockFilePackageInfo, bunTag: string] - /** root */ - | [pkg: string, info: Pick]; - - interface CookieInit { - name?: string; - value?: string; - domain?: string; - /** Defaults to '/'. To allow the browser to set the path, use an empty string. */ - path?: string; - expires?: number | Date | string; - secure?: boolean; - /** Defaults to `lax`. */ - sameSite?: CookieSameSite; - httpOnly?: boolean; - partitioned?: boolean; - maxAge?: number; - } - - interface CookieStoreDeleteOptions { - name: string; - domain?: string | null; - path?: string; - } - - interface CookieStoreGetOptions { - name?: string; - url?: string; - } - - type CookieSameSite = "strict" | "lax" | "none"; - - /** - * A class for working with a single cookie - * - * @example - * ```js - * const cookie = new Bun.Cookie("name", "value"); - * console.log(cookie.toString()); // "name=value; Path=/; SameSite=Lax" - * ``` - */ - class Cookie { - /** - * Create a new cookie - * @param name - The name of the cookie - * @param value - The value of the cookie - * @param options - Optional cookie attributes - */ - constructor(name: string, value: string, options?: CookieInit); - - /** - * Create a new cookie from a cookie string - * @param cookieString - The cookie string - */ - constructor(cookieString: string); - - /** - * Create a new cookie from a cookie object - * @param cookieObject - The cookie object - */ - constructor(cookieObject?: CookieInit); - - /** - * The name of the cookie - */ - readonly name: string; - - /** - * The value of the cookie - */ - value: string; - - /** - * The domain of the cookie - */ - domain?: string; - - /** - * The path of the cookie - */ - path: string; - - /** - * The expiration date of the cookie - */ - expires?: Date; - - /** - * Whether the cookie is secure - */ - secure: boolean; - - /** - * The same-site attribute of the cookie - */ - sameSite: CookieSameSite; - - /** - * Whether the cookie is partitioned - */ - partitioned: boolean; - - /** - * The maximum age of the cookie in seconds - */ - maxAge?: number; - - /** - * Whether the cookie is HTTP-only - */ - httpOnly: boolean; - - /** - * Whether the cookie is expired - */ - isExpired(): boolean; - - /** - * Serialize the cookie to a string - * - * @example - * ```ts - * const cookie = Bun.Cookie.from("session", "abc123", { - * domain: "example.com", - * path: "/", - * secure: true, - * httpOnly: true - * }).serialize(); // "session=abc123; Domain=example.com; Path=/; Secure; HttpOnly; SameSite=Lax" - * ``` - */ - serialize(): string; - - /** - * Serialize the cookie to a string - * - * Alias of {@link Cookie.serialize} - */ - toString(): string; - - /** - * Serialize the cookie to a JSON object - */ - toJSON(): CookieInit; - - /** - * Parse a cookie string into a Cookie object - * @param cookieString - The cookie string - */ - static parse(cookieString: string): Cookie; - - /** - * Create a new cookie from a name and value and optional options - */ - static from(name: string, value: string, options?: CookieInit): Cookie; - } - - /** - * A Map-like interface for working with collections of cookies. - * - * Implements the `Iterable` interface, allowing use with `for...of` loops. - */ - class CookieMap implements Iterable<[string, string]> { - /** - * Creates a new CookieMap instance. - * - * @param init - Optional initial data for the cookie map: - * - string: A cookie header string (e.g., "name=value; foo=bar") - * - string[][]: An array of name/value pairs (e.g., [["name", "value"], ["foo", "bar"]]) - * - Record: An object with cookie names as keys (e.g., { name: "value", foo: "bar" }) - */ - constructor(init?: string[][] | Record | string); - - /** - * Gets the value of a cookie with the specified name. - * - * @param name - The name of the cookie to retrieve - * @returns The cookie value as a string, or null if the cookie doesn't exist - */ - get(name: string): string | null; - - /** - * Gets an array of values for Set-Cookie headers in order to apply all changes to cookies. - * - * @returns An array of values for Set-Cookie headers - */ - toSetCookieHeaders(): string[]; - - /** - * Checks if a cookie with the given name exists. - * - * @param name - The name of the cookie to check - * @returns true if the cookie exists, false otherwise - */ - has(name: string): boolean; - - /** - * Adds or updates a cookie in the map. - * - * @param name - The name of the cookie - * @param value - The value of the cookie - * @param options - Optional cookie attributes - */ - set(name: string, value: string, options?: CookieInit): void; - - /** - * Adds or updates a cookie in the map using a cookie options object. - * - * @param options - Cookie options including name and value - */ - set(options: CookieInit): void; - - /** - * Removes a cookie from the map. - * - * @param name - The name of the cookie to delete - */ - delete(name: string): void; - - /** - * Removes a cookie from the map. - * - * @param options - The options for the cookie to delete - */ - delete(options: CookieStoreDeleteOptions): void; - - /** - * Removes a cookie from the map. - * - * @param name - The name of the cookie to delete - * @param options - The options for the cookie to delete - */ - delete(name: string, options: Omit): void; - - /** - * Converts the cookie map to a serializable format. - * - * @returns An array of name/value pairs - */ - toJSON(): Record; - - /** - * The number of cookies in the map. - */ - readonly size: number; - - /** - * Returns an iterator of [name, value] pairs for every cookie in the map. - * - * @returns An iterator for the entries in the map - */ - entries(): IterableIterator<[string, string]>; - - /** - * Returns an iterator of all cookie names in the map. - * - * @returns An iterator for the cookie names - */ - keys(): IterableIterator; - - /** - * Returns an iterator of all cookie values in the map. - * - * @returns An iterator for the cookie values - */ - values(): IterableIterator; - - /** - * Executes a provided function once for each cookie in the map. - * - * @param callback - Function to execute for each entry - */ - forEach(callback: (value: string, key: string, map: CookieMap) => void): void; - - /** - * Returns the default iterator for the CookieMap. - * Used by for...of loops to iterate over all entries. - * - * @returns An iterator for the entries in the map - */ - [Symbol.iterator](): IterableIterator<[string, string]>; - } -} diff --git a/PBandGraphScaffold/node_modules/bun-types/bun.ns.d.ts b/PBandGraphScaffold/node_modules/bun-types/bun.ns.d.ts deleted file mode 100644 index a6648b6..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/bun.ns.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import * as BunModule from "bun"; - -declare global { - export import Bun = BunModule; -} diff --git a/PBandGraphScaffold/node_modules/bun-types/bundle.d.ts b/PBandGraphScaffold/node_modules/bun-types/bundle.d.ts deleted file mode 100644 index 0a5ea91..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/bundle.d.ts +++ /dev/null @@ -1,74 +0,0 @@ -/** - * The `bun:bundle` module provides compile-time utilities for dead-code elimination. - * - * @example - * ```ts - * import { feature } from "bun:bundle"; - * - * if (feature("SUPER_SECRET")) { - * console.log("Secret feature enabled!"); - * } else { - * console.log("Normal mode"); - * } - * ``` - * - * Enable feature flags via CLI: - * ```bash - * # During build - * bun build --feature=SUPER_SECRET index.ts - * - * # At runtime - * bun run --feature=SUPER_SECRET index.ts - * - * # In tests - * bun test --feature=SUPER_SECRET - * ``` - * - * @module bun:bundle - */ -declare module "bun:bundle" { - /** - * Registry for type-safe feature flags. - * - * Augment this interface to get autocomplete and type checking for your feature flags: - * - * @example - * ```ts - * // env.d.ts - * declare module "bun:bundle" { - * interface Registry { - * features: "DEBUG" | "PREMIUM" | "BETA"; - * } - * } - * ``` - * - * Now `feature()` only accepts `"DEBUG"`, `"PREMIUM"`, or `"BETA"`: - * ```ts - * feature("DEBUG"); // OK - * feature("TYPO"); // Type error - * ``` - */ - interface Registry {} - - /** - * Check if a feature flag is enabled at compile time. - * - * This function is replaced with a boolean literal (`true` or `false`) at bundle time, - * enabling dead-code elimination. The bundler will remove unreachable branches. - * - * @param flag - The name of the feature flag to check - * @returns `true` if the flag was passed via `--feature=FLAG`, `false` otherwise - * - * @example - * ```ts - * import { feature } from "bun:bundle"; - * - * // With --feature=DEBUG, this becomes: if (true) { ... } - * // Without --feature=DEBUG, this becomes: if (false) { ... } - * if (feature("DEBUG")) { - * console.log("Debug mode enabled"); - * } - * ``` - */ - function feature(flag: Registry extends { features: infer Features extends string } ? Features : string): boolean; -} diff --git a/PBandGraphScaffold/node_modules/bun-types/deprecated.d.ts b/PBandGraphScaffold/node_modules/bun-types/deprecated.d.ts deleted file mode 100644 index 2d64a2a..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/deprecated.d.ts +++ /dev/null @@ -1,184 +0,0 @@ -declare module "bun" { - /** @deprecated This type is unused in Bun's types and might be removed in the near future */ - type Platform = - | "aix" - | "android" - | "darwin" - | "freebsd" - | "haiku" - | "linux" - | "openbsd" - | "sunos" - | "win32" - | "cygwin" - | "netbsd"; - - /** @deprecated This type is unused in Bun's types and might be removed in the near future */ - type Architecture = "arm" | "arm64" | "ia32" | "mips" | "mipsel" | "ppc" | "ppc64" | "s390" | "s390x" | "x64"; - - /** @deprecated This type is unused in Bun's types and might be removed in the near future */ - type UncaughtExceptionListener = (error: Error, origin: UncaughtExceptionOrigin) => void; - - /** - * Most of the time the unhandledRejection will be an Error, but this should not be relied upon - * as *anything* can be thrown/rejected, it is therefore unsafe to assume that the value is an Error. - * - * @deprecated This type is unused in Bun's types and might be removed in the near future - */ - type UnhandledRejectionListener = (reason: unknown, promise: Promise) => void; - - /** @deprecated This type is unused in Bun's types and might be removed in the near future */ - type MultipleResolveListener = (type: MultipleResolveType, promise: Promise, value: unknown) => void; - - /** - * Consume all data from a {@link ReadableStream} until it closes or errors. - * - * Concatenate the chunks into a single {@link ArrayBuffer}. - * - * Each chunk must be a TypedArray or an ArrayBuffer. If you need to support - * chunks of different types, consider {@link readableStreamToBlob} - * - * @param stream The stream to consume. - * @returns A promise that resolves with the concatenated chunks or the concatenated chunks as a {@link Uint8Array}. - * - * @deprecated Use {@link ReadableStream.bytes} - */ - function readableStreamToBytes( - stream: ReadableStream, - ): Promise> | Uint8Array; - - /** - * Consume all data from a {@link ReadableStream} until it closes or errors. - * - * Concatenate the chunks into a single {@link Blob}. - * - * @param stream The stream to consume. - * @returns A promise that resolves with the concatenated chunks as a {@link Blob}. - * - * @deprecated Use {@link ReadableStream.blob} - */ - function readableStreamToBlob(stream: ReadableStream): Promise; - - /** - * Consume all data from a {@link ReadableStream} until it closes or errors. - * - * Concatenate the chunks into a single string. Chunks must be a TypedArray or an ArrayBuffer. If you need to support chunks of different types, consider {@link readableStreamToBlob}. - * - * @param stream The stream to consume. - * @returns A promise that resolves with the concatenated chunks as a {@link String}. - * - * @deprecated Use {@link ReadableStream.text} - */ - function readableStreamToText(stream: ReadableStream): Promise; - - /** - * Consume all data from a {@link ReadableStream} until it closes or errors. - * - * Concatenate the chunks into a single string and parse as JSON. Chunks must be a TypedArray or an ArrayBuffer. If you need to support chunks of different types, consider {@link readableStreamToBlob}. - * - * @param stream The stream to consume. - * @returns A promise that resolves with the concatenated chunks as a {@link String}. - * - * @deprecated Use {@link ReadableStream.json} - */ - function readableStreamToJSON(stream: ReadableStream): Promise; - - interface BunMessageEvent { - /** - * @deprecated - */ - initMessageEvent( - type: string, - bubbles?: boolean, - cancelable?: boolean, - data?: any, - origin?: string, - lastEventId?: string, - source?: null, - ): void; - } - - /** - * @deprecated Use {@link Serve.Options Bun.Serve.Options} instead - */ - type ServeOptions = Serve.Options; - - /** @deprecated Use {@link SQL.Query Bun.SQL.Query} */ - type SQLQuery = SQL.Query; - - /** @deprecated Use {@link SQL.TransactionContextCallback Bun.SQL.TransactionContextCallback} */ - type SQLTransactionContextCallback = SQL.TransactionContextCallback; - - /** @deprecated Use {@link SQL.SavepointContextCallback Bun.SQL.SavepointContextCallback} */ - type SQLSavepointContextCallback = SQL.SavepointContextCallback; - - /** @deprecated Use {@link SQL.Options Bun.SQL.Options} */ - type SQLOptions = SQL.Options; - - /** - * @deprecated Renamed to `ErrorLike` - */ - type Errorlike = ErrorLike; - - /** @deprecated This is unused in Bun's types and may be removed in the future */ - type ShellFunction = (input: Uint8Array) => Uint8Array; - - interface TLSOptions { - /** - * File path to a TLS key - * - * To enable TLS, this option is required. - * - * @deprecated since v0.6.3 - Use `key: Bun.file(path)` instead. - */ - keyFile?: string; - - /** - * File path to a TLS certificate - * - * To enable TLS, this option is required. - * - * @deprecated since v0.6.3 - Use `cert: Bun.file(path)` instead. - */ - certFile?: string; - - /** - * File path to a .pem file for a custom root CA - * - * @deprecated since v0.6.3 - Use `ca: Bun.file(path)` instead. - */ - caFile?: string; - } - - /** @deprecated This type is unused in Bun's declarations and may be removed in the future */ - type ReadableIO = ReadableStream> | number | undefined; -} - -declare namespace NodeJS { - interface Process { - /** - * @deprecated This is deprecated; use the "node:assert" module instead. - */ - assert(value: unknown, message?: string | Error): asserts value; - } -} - -interface CustomEvent { - /** @deprecated */ - initCustomEvent(type: string, bubbles?: boolean, cancelable?: boolean, detail?: T): void; -} - -interface DOMException { - /** @deprecated */ - readonly code: number; -} - -/** - * @deprecated Renamed to `BuildMessage` - */ -declare var BuildError: typeof BuildMessage; - -/** - * @deprecated Renamed to `ResolveMessage` - */ -declare var ResolveError: typeof ResolveMessage; diff --git a/PBandGraphScaffold/node_modules/bun-types/devserver.d.ts b/PBandGraphScaffold/node_modules/bun-types/devserver.d.ts deleted file mode 100644 index c26c1c1..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/devserver.d.ts +++ /dev/null @@ -1,187 +0,0 @@ -declare module "bun" { - type HMREventNames = - | "beforeUpdate" - | "afterUpdate" - | "beforeFullReload" - | "beforePrune" - | "invalidate" - | "error" - | "ws:disconnect" - | "ws:connect"; - - /** - * The event names for the dev server - */ - type HMREvent = `bun:${HMREventNames}` | (string & {}); -} - -interface ImportMeta { - /** - * Hot module replacement APIs. This value is `undefined` in production and - * can be used in an `if` statement to check if HMR APIs are available - * - * ```ts - * if (import.meta.hot) { - * // HMR APIs are available - * } - * ``` - * - * However, this check is usually not needed as Bun will dead-code-eliminate - * calls to all of the HMR APIs in production builds. - * - * https://bun.com/docs/bundler/hmr - */ - hot: { - /** - * `import.meta.hot.data` maintains state between module instances during - * hot replacement, enabling data transfer from previous to new versions. - * When `import.meta.hot.data` is written to, Bun will mark this module as - * capable of self-accepting (equivalent of calling `accept()`). - * - * @example - * ```ts - * const root = import.meta.hot.data.root ??= createRoot(elem); - * root.render(); // re-use an existing root - * ``` - * - * In production, `data` is inlined to be `{}`. This is handy because Bun - * knows it can minify `{}.prop ??= value` into `value` in production. - */ - data: any; - - /** - * Indicate that this module can be replaced simply by re-evaluating the - * file. After a hot update, importers of this module will be - * automatically patched. - * - * When `import.meta.hot.accept` is not used, the page will reload when - * the file updates, and a console message shows which files were checked. - * - * @example - * ```ts - * import { getCount } from "./foo"; - * - * console.log("count is ", getCount()); - * - * import.meta.hot.accept(); - * ``` - */ - accept(): void; - - /** - * Indicate that this module can be replaced by evaluating the new module, - * and then calling the callback with the new module. In this mode, the - * importers do not get patched. This is to match Vite, which is unable - * to patch their import statements. Prefer using `import.meta.hot.accept()` - * without an argument as it usually makes your code easier to understand. - * - * When `import.meta.hot.accept` is not used, the page will reload when - * the file updates, and a console message shows which files were checked. - * - * @example - * ```ts - * export const count = 0; - * - * import.meta.hot.accept((newModule) => { - * if (newModule) { - * // newModule is undefined when SyntaxError happened - * console.log('updated: count is now ', newModule.count) - * } - * }); - * ``` - * - * In production, calls to this are dead-code-eliminated. - */ - accept(cb: (newModule: any | undefined) => void): void; - - /** - * Indicate that a dependency's module can be accepted. When the dependency - * is updated, the callback will be called with the new module. - * - * When `import.meta.hot.accept` is not used, the page will reload when - * the file updates, and a console message shows which files were checked. - * - * @example - * ```ts - * import.meta.hot.accept('./foo', (newModule) => { - * if (newModule) { - * // newModule is undefined when SyntaxError happened - * console.log('updated: count is now ', newModule.count) - * } - * }); - * ``` - */ - accept(specifier: string, callback: (newModule: any) => void): void; - - /** - * Indicate that a dependency's module can be accepted. This variant - * accepts an array of dependencies, where the callback will receive - * the one updated module, and `undefined` for the rest. - * - * When `import.meta.hot.accept` is not used, the page will reload when - * the file updates, and a console message shows which files were checked. - */ - accept(specifiers: string[], callback: (newModules: (any | undefined)[]) => void): void; - - /** - * Attach an on-dispose callback. This is called: - * - Just before the module is replaced with another copy (before the next is loaded) - * - After the module is detached (removing all imports to this module) - * - * This callback is not called on route navigation or when the browser tab closes. - * - * Returning a promise will delay module replacement until the module is - * disposed. All dispose callbacks are called in parallel. - */ - dispose(cb: (data: any) => void | Promise): void; - - /** - * No-op - * @deprecated - */ - decline(): void; - - // NOTE TO CONTRIBUTORS //////////////////////////////////////// - // Callback is currently never called for `.prune()` // - // so the types are commented out until we support it. // - //////////////////////////////////////////////////////////////// - // /** - // * Attach a callback that is called when the module is removed from the module graph. - // * - // * This can be used to clean up resources that were created when the module was loaded. - // * Unlike `import.meta.hot.dispose()`, this pairs much better with `accept` and `data` to manage stateful resources. - // * - // * @example - // * ```ts - // * export const ws = (import.meta.hot.data.ws ??= new WebSocket(location.origin)); - // * - // * import.meta.hot.prune(() => { - // * ws.close(); - // * }); - // * ``` - // */ - // prune(callback: () => void): void; - - /** - * Listen for an event from the dev server - * - * For compatibility with Vite, event names are also available via vite:* prefix instead of bun:*. - * - * https://bun.com/docs/bundler/hmr#import-meta-hot-on-and-off - * @param event The event to listen to - * @param callback The callback to call when the event is emitted - */ - on(event: Bun.HMREvent, callback: () => void): void; - - /** - * Stop listening for an event from the dev server - * - * For compatibility with Vite, event names are also available via vite:* prefix instead of bun:*. - * - * https://bun.com/docs/bundler/hmr#import-meta-hot-on-and-off - * @param event The event to stop listening to - * @param callback The callback to stop listening to - */ - off(event: Bun.HMREvent, callback: () => void): void; - }; -} diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/README.md b/PBandGraphScaffold/node_modules/bun-types/docs/README.md deleted file mode 100644 index 484dea1..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/README.md +++ /dev/null @@ -1,28 +0,0 @@ -

- - Logo - -

-

Bun Documentation

- -Official documentation for Bun: the fast, all-in-one JavaScript runtime. - -## Development - -Install the [Mintlify CLI](https://www.npmjs.com/package/mint) to preview the documentation locally: - -```bash -bun install -g mint -``` - -Run the development server: - -```bash -mint dev -``` - -The site will be available at `http://localhost:3000`. - -## Contributing - -Contributions are welcome! Please open an issue or submit a pull request. diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/bundler/bytecode.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/bundler/bytecode.mdx deleted file mode 100644 index 748d81e..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/bundler/bytecode.mdx +++ /dev/null @@ -1,465 +0,0 @@ ---- -title: Bytecode Caching -description: Speed up JavaScript execution with bytecode caching in Bun's bundler ---- - -Bytecode caching is a build-time optimization that dramatically improves application startup time by pre-compiling your JavaScript to bytecode. For example, when compiling TypeScript's `tsc` with bytecode enabled, startup time improves by **2x**. - -## Usage - -### Basic usage - -Enable bytecode caching with the `--bytecode` flag: - -```bash terminal icon="terminal" -bun build ./index.ts --target=bun --bytecode --outdir=./dist -``` - -This generates two files: - -- `dist/index.js` - Your bundled JavaScript -- `dist/index.jsc` - The bytecode cache file - -At runtime, Bun automatically detects and uses the `.jsc` file: - -```bash terminal icon="terminal" -bun ./dist/index.js # Automatically uses index.jsc -``` - -### With standalone executables - -When creating executables with `--compile`, bytecode is embedded into the binary: - -```bash terminal icon="terminal" -bun build ./cli.ts --compile --bytecode --outfile=mycli -``` - -The resulting executable contains both the code and bytecode, giving you maximum performance in a single file. - -### Combining with other optimizations - -Bytecode works great with minification and source maps: - -```bash terminal icon="terminal" -bun build --compile --bytecode --minify --sourcemap ./cli.ts --outfile=mycli -``` - -- `--minify` reduces code size before generating bytecode (less code -> less bytecode) -- `--sourcemap` preserves error reporting (errors still point to original source) -- `--bytecode` eliminates parsing overhead - -## Performance impact - -The performance improvement scales with your codebase size: - -| Application size | Typical startup improvement | -| ------------------------- | --------------------------- | -| Small CLI (< 100 KB) | 1.5-2x faster | -| Medium-large app (> 5 MB) | 2.5x-4x faster | - -Larger applications benefit more because they have more code to parse. - -## When to use bytecode - -### Great for: - -#### CLI tools - -- Invoked frequently (linters, formatters, git hooks) -- Startup time is the entire user experience -- Users notice the difference between 90ms and 45ms startup -- Example: TypeScript compiler, Prettier, ESLint - -#### Build tools and task runners - -- Run hundreds or thousands of times during development -- Milliseconds saved per run compound quickly -- Developer experience improvement -- Example: Build scripts, test runners, code generators - -#### Standalone executables - -- Distributed to users who care about snappy performance -- Single-file distribution is convenient -- File size less important than startup time -- Example: CLIs distributed via npm or as binaries - -### Skip it for: - -- ❌ **Small scripts** -- ❌ **Code that runs once** -- ❌ **Development builds** -- ❌ **Size-constrained environments** -- ❌ **Code with top-level await** (not supported) - -## Limitations - -### CommonJS only - -Bytecode caching currently works with CommonJS output format. Bun's bundler automatically converts most ESM code to CommonJS, but **top-level await** is the exception: - -```js -// This prevents bytecode caching -const data = await fetch("https://api.example.com"); -export default data; -``` - -**Why**: Top-level await requires async module evaluation, which can't be represented in CommonJS. The module graph becomes asynchronous, and the CommonJS wrapper function model breaks down. - -**Workaround**: Move async initialization into a function: - -```js -async function init() { - const data = await fetch("https://api.example.com"); - return data; -} - -export default init; -``` - -Now the module exports a function that the consumer can await when needed. - -### Version compatibility - -Bytecode is **not portable across Bun versions**. The bytecode format is tied to JavaScriptCore's internal representation, which changes between versions. - -When you update Bun, you must regenerate bytecode: - -```bash terminal icon="terminal" -# After updating Bun -bun build --bytecode ./index.ts --outdir=./dist -``` - -If bytecode doesn't match the current Bun version, it's automatically ignored and your code falls back to parsing the JavaScript source. Your app still runs - you just lose the performance optimization. - -**Best practice**: Generate bytecode as part of your CI/CD build process. Don't commit `.jsc` files to git. Regenerate them whenever you update Bun. - -### Source code still required - -- The `.js` file (your bundled source code) -- The `.jsc` file (the bytecode cache) - -At runtime: - -1. Bun loads the `.js` file, sees a `@bytecode` pragma, and checks the `.jsc` file -2. Bun loads the `.jsc` file -3. Bun validates the bytecode hash matches the source -4. If valid, Bun uses the bytecode -5. If invalid, Bun falls back to parsing the source - -### Bytecode is not obfuscation - -Bytecode **does not obscure your source code**. It's an optimization, not a security measure. - -## Production deployment - -### Docker - -Include bytecode generation in your Dockerfile: - -```dockerfile Dockerfile icon="docker" -FROM oven/bun:1 AS builder -WORKDIR /app -COPY package.json bun.lock ./ -RUN bun install --frozen-lockfile - -COPY . . -RUN bun build --bytecode --minify --sourcemap \ - --target=bun \ - --outdir=./dist \ - --compile \ - ./src/server.ts --outfile=./dist/server - -FROM oven/bun:1 AS runner -WORKDIR /app -COPY --from=builder /dist/server /app/server -CMD ["./server"] -``` - -The bytecode is architecture-independent. - -### CI/CD - -Generate bytecode during your build pipeline: - -```yaml workflow.yml icon="file-code" -# GitHub Actions -- name: Build with bytecode - run: | - bun install - bun build --bytecode --minify \ - --outdir=./dist \ - --target=bun \ - ./src/index.ts -``` - -## Debugging - -### Verify bytecode is being used - -Check that the `.jsc` file exists: - -```bash terminal icon="terminal" -ls -lh dist/ -``` - -```txt --rw-r--r-- 1 user staff 245K index.js --rw-r--r-- 1 user staff 1.1M index.jsc -``` - -The `.jsc` file should be 2-8x larger than the `.js` file. - -To log if bytecode is being used, set `BUN_JSC_verboseDiskCache=1` in your environment. - -On success, it will log something like: - -```txt -[Disk cache] cache hit for sourceCode -``` - -If you see a cache miss, it will log something like: - -```txt -[Disk cache] cache miss for sourceCode -``` - -It's normal for it it to log a cache miss multiple times since Bun doesn't currently bytecode cache JavaScript code used in builtin modules. - -### Common issues - -**Bytecode silently ignored**: Usually caused by a Bun version update. The cache version doesn't match, so bytecode is rejected. Regenerate to fix. - -**File size too large**: This is expected. Consider: - -- Using `--minify` to reduce code size before bytecode generation -- Compressing `.jsc` files for network transfer (gzip/brotli) -- Evaluating if the startup performance gain is worth the size increase - -**Top-level await**: Not supported. Refactor to use async initialization functions. - -## What is bytecode? - -When you run JavaScript, the JavaScript engine doesn't execute your source code directly. Instead, it goes through several steps: - -1. **Parsing**: The engine reads your JavaScript source code and converts it into an Abstract Syntax Tree (AST) -2. **Bytecode compilation**: The AST is compiled into bytecode - a lower-level representation that's faster to execute -3. **Execution**: The bytecode is executed by the engine's interpreter or JIT compiler - -Bytecode is an intermediate representation - it's lower-level than JavaScript source code, but higher-level than machine code. Think of it as assembly language for a virtual machine. Each bytecode instruction represents a single operation like "load this variable," "add two numbers," or "call this function." - -This happens **every single time** you run your code. If you have a CLI tool that runs 100 times a day, your code gets parsed 100 times. If you have a serverless function with frequent cold starts, parsing happens on every cold start. - -With bytecode caching, Bun moves steps 1 and 2 to the build step. At runtime, the engine loads the pre-compiled bytecode and jumps straight to execution. - -### Why lazy parsing makes this even better - -Modern JavaScript engines use a clever optimization called **lazy parsing**. They don't parse all your code upfront - instead, functions are only parsed when they're first called: - -```js -// Without bytecode caching: -function rarely_used() { - // This 500-line function is only parsed - // when it's actually called -} - -function main() { - console.log("Starting app"); - // rarely_used() is never called, so it's never parsed -} -``` - -This means parsing overhead isn't just a startup cost - it happens throughout your application's lifetime as different code paths execute. With bytecode caching, **all functions are pre-compiled**, even the ones that are lazily parsed. The parsing work happens once at build time instead of being distributed throughout your application's execution. - -## The bytecode format - -### Inside a .jsc file - -A `.jsc` file contains a serialized bytecode structure. Understanding what's inside helps explain both the performance benefits and the file size tradeoff. - -**Header section** (validated on every load): - -- **Cache version**: A hash tied to the JavaScriptCore framework version. This ensures bytecode generated with one version of Bun only runs with that exact version. -- **Code block type tag**: Identifies whether this is a Program, Module, Eval, or Function code block. - -**SourceCodeKey** (validates bytecode matches source): - -- **Source code hash**: A hash of the original JavaScript source code. Bun verifies this matches before using the bytecode. -- **Source code length**: The exact length of the source, for additional validation. -- **Compilation flags**: Critical compilation context like strict mode, whether it's a script vs module, eval context type, etc. The same source code compiled with different flags produces different bytecode. - -**Bytecode instructions**: - -- **Instruction stream**: The actual bytecode opcodes - the compiled representation of your JavaScript. This is a variable-length sequence of bytecode instructions. -- **Metadata table**: Each opcode has associated metadata - things like profiling counters, type hints, and execution counts (even if not yet populated). -- **Jump targets**: Pre-computed addresses for control flow (if/else, loops, switch statements). -- **Switch tables**: Optimized lookup tables for switch statements. - -**Constants and identifiers**: - -- **Constant pool**: All literal values in your code - numbers, strings, booleans, null, undefined. These are stored as actual JavaScript values (JSValues) so they don't need to be parsed from source at runtime. -- **Identifier table**: All variable and function names used in the code. Stored as deduplicated strings. -- **Source code representation markers**: Flags indicating how constants should be represented (as integers, doubles, big ints, etc.). - -**Function metadata** (for each function in your code): - -- **Register allocation**: How many registers (local variables) the function needs - `thisRegister`, `scopeRegister`, `numVars`, `numCalleeLocals`, `numParameters`. -- **Code features**: A bitmask of function characteristics: is it a constructor? an arrow function? does it use `super`? does it have tail calls? These affect how the function is executed. -- **Lexically scoped features**: Strict mode and other lexical context. -- **Parse mode**: The mode in which the function was parsed (normal, async, generator, async generator). - -**Nested structures**: - -- **Function declarations and expressions**: Each nested function gets its own bytecode block, recursively. A file with 100 functions has 100 separate bytecode blocks, all nested in the structure. -- **Exception handlers**: Try/catch/finally blocks with their boundaries and handler addresses pre-computed. -- **Expression info**: Maps bytecode positions back to source code locations for error reporting and debugging. - -### What bytecode does NOT contain - -Importantly, **bytecode does not embed your source code**. Instead: - -- The JavaScript source is stored separately (in the `.js` file) -- The bytecode only stores a hash and length of the source -- At load time, Bun validates the bytecode matches the current source code - -This is why you need to deploy both the `.js` and `.jsc` files. The `.jsc` file is useless without its corresponding `.js` file. - -## The tradeoff: file size - -Bytecode files are significantly larger than source code - typically 2-8x larger. - -### Why is bytecode so much larger? - -**Bytecode instructions are verbose**: -A single line of minified JavaScript might compile to dozens of bytecode instructions. For example: - -```js -const sum = arr.reduce((a, b) => a + b, 0); -``` - -Compiles to bytecode that: - -- Loads the `arr` variable -- Gets the `reduce` property -- Creates the arrow function (which itself has bytecode) -- Loads the initial value `0` -- Sets up the call with the right number of arguments -- Actually performs the call -- Stores the result in `sum` - -Each of these steps is a separate bytecode instruction with its own metadata. - -**Constant pools store everything**: -Every string literal, number, property name - everything gets stored in the constant pool. Even if your source code has `"hello"` a hundred times, the constant pool stores it once, but the identifier table and constant references add overhead. - -**Per-function metadata**: -Each function - even small one-line functions - gets its own complete metadata: - -- Register allocation info -- Code features bitmask -- Parse mode -- Exception handlers -- Expression info for debugging - -A file with 1,000 small functions has 1,000 sets of metadata. - -**Profiling data structures**: -Even though profiling data isn't populated yet, the _structures_ to hold profiling data are allocated. This includes: - -- Value profile slots (tracking what types flow through each operation) -- Array profile slots (tracking array access patterns) -- Binary arithmetic profile slots (tracking number types in math operations) -- Unary arithmetic profile slots - -These take up space even when empty. - -**Pre-computed control flow**: -Jump targets, switch tables, and exception handler boundaries are all pre-computed and stored. This makes execution faster but increases file size. - -### Mitigation strategies - -**Compression**: -Bytecode compresses extremely well with gzip/brotli (60-70% compression). The repetitive structure and metadata compress efficiently. - -**Minification first**: -Using `--minify` before bytecode generation helps: - -- Shorter identifiers → smaller identifier table -- Dead code elimination → less bytecode generated -- Constant folding → fewer constants in the pool - -**The tradeoff**: -You're trading 2-4x larger files for 2-4x faster startup. For CLIs, this is usually worth it. For long-running servers where a few megabytes of disk space don't matter, it's even less of an issue. - -## Versioning and portability - -### Cross-architecture portability: ✅ - -Bytecode is **architecture-independent**. You can: - -- Build on macOS ARM64, deploy to Linux x64 -- Build on Linux x64, deploy to AWS Lambda ARM64 -- Build on Windows x64, deploy to macOS ARM64 - -The bytecode contains abstract instructions that work on any architecture. Architecture-specific optimizations happen during JIT compilation at runtime, not in the cached bytecode. - -### Cross-version portability: ❌ - -Bytecode is **not stable across Bun versions**. Here's why: - -**Bytecode format changes**: -JavaScriptCore's bytecode format evolves. New opcodes get added, old ones get removed or changed, metadata structures change. Each version of JavaScriptCore has a different bytecode format. - -**Version validation**: -The cache version in the `.jsc` file header is a hash of the JavaScriptCore framework. When Bun loads bytecode: - -1. It extracts the cache version from the `.jsc` file -2. It computes the current JavaScriptCore version -3. If they don't match, the bytecode is **silently rejected** -4. Bun falls back to parsing the `.js` source code - -Your application still runs - you just lose the performance optimization. - -**Graceful degradation**: -This design means bytecode caching "fails open" - if anything goes wrong (version mismatch, corrupted file, missing file), your code still runs normally. You might see slower startup, but you won't see errors. - -## Unlinked vs. linked bytecode - -JavaScriptCore makes a crucial distinction between "unlinked" and "linked" bytecode. This separation is what makes bytecode caching possible: - -### Unlinked bytecode (what's cached) - -The bytecode saved in `.jsc` files is **unlinked bytecode**. It contains: - -- The compiled bytecode instructions -- Structural information about the code -- Constants and identifiers -- Control flow information - -But it **doesn't** contain: - -- Pointers to actual runtime objects -- JIT-compiled machine code -- Profiling data from previous runs -- Call link information (which functions call which) - -Unlinked bytecode is **immutable and shareable**. Multiple executions of the same code can all reference the same unlinked bytecode. - -### Linked bytecode (runtime execution) - -When Bun runs bytecode, it "links" it - creating a runtime wrapper that adds: - -- **Call link information**: As your code runs, the engine learns which functions call which and optimizes those call sites. -- **Profiling data**: The engine tracks how many times each instruction executes, what types of values flow through the code, array access patterns, etc. -- **JIT compilation state**: References to baseline JIT or optimizing JIT (DFG/FTL) compiled versions of hot code. -- **Runtime objects**: Pointers to actual JavaScript objects, prototypes, scopes, etc. - -This linked representation is created fresh every time you run your code. This allows: - -1. **Caching the expensive work** (parsing and compilation to unlinked bytecode) -2. **Still collecting runtime profiling data** to guide optimizations -3. **Still applying JIT optimizations** based on actual execution patterns - -Bytecode caching moves expensive work (parsing and compiling to bytecode) from runtime to build time. For applications that start frequently, this can halve your startup time at the cost of larger files on disk. - -For production CLIs and serverless deployments, the combination of `--bytecode --minify --sourcemap` gives you the best performance while maintaining debuggability. diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/bundler/css.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/bundler/css.mdx deleted file mode 100644 index 7a73280..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/bundler/css.mdx +++ /dev/null @@ -1,1024 +0,0 @@ ---- -title: CSS -description: Bun's bundler has built-in support for CSS with modern features ---- - -Bun's bundler has built-in support for CSS with the following features: - -- Transpiling modern/future features to work on all browsers (including vendor prefixing) -- Minification -- CSS Modules -- Tailwind (via a native bundler plugin) - -## Transpiling - -Bun's CSS bundler lets you use modern/future CSS features without having to worry about browser compatibility — all thanks to its transpiling and vendor prefixing features which are enabled by default. - -Bun's CSS parser and bundler is a direct Rust → Zig port of LightningCSS, with a bundling approach inspired by esbuild. The transpiler converts modern CSS syntax into backwards-compatible equivalents that work across browsers. - -A huge thanks goes to the amazing work from the authors of LightningCSS and esbuild. - -## Browser Compatibility - -By default, Bun's CSS bundler targets the following browsers: - -- ES2020 -- Edge 88+ -- Firefox 78+ -- Chrome 87+ -- Safari 14+ - -## Syntax Lowering - -### Nesting - -The CSS Nesting specification allows you to write more concise and intuitive stylesheets by nesting selectors inside one another. Instead of repeating parent selectors across your CSS file, you can write child styles directly within their parent blocks. - -```scss title="styles.css" icon="file-code" -/* With nesting */ -.card { - background: white; - border-radius: 4px; - - .title { - font-size: 1.2rem; - font-weight: bold; - } - - .content { - padding: 1rem; - } -} -``` - -Bun's CSS bundler automatically converts this nested syntax into traditional flat CSS that works in all browsers: - -```css title="styles.css" icon="file-code" -/* Compiled output */ -.card { - background: white; - border-radius: 4px; -} - -.card .title { - font-size: 1.2rem; - font-weight: bold; -} - -.card .content { - padding: 1rem; -} -``` - -You can also nest media queries and other at-rules inside selectors, eliminating the need to repeat selector patterns: - -```scss title="styles.css" icon="file-code" -.responsive-element { - display: block; - - @media (min-width: 768px) { - display: flex; - } -} -``` - -This compiles to: - -```css title="styles.css" icon="file-code" -.responsive-element { - display: block; -} - -@media (min-width: 768px) { - .responsive-element { - display: flex; - } -} -``` - -### Color mix - -The `color-mix()` function gives you an easy way to blend two colors together according to a specified ratio in a chosen color space. This powerful feature lets you create color variations without manually calculating the resulting values. - -```scss title="styles.css" icon="file-code" -.button { - /* Mix blue and red in the RGB color space with a 30/70 proportion */ - background-color: color-mix(in srgb, blue 30%, red); - - /* Create a lighter variant for hover state */ - &:hover { - background-color: color-mix(in srgb, blue 30%, red, white 20%); - } -} -``` - -Bun's CSS bundler evaluates these color mixes at build time when all color values are known (not CSS variables), generating static color values that work in all browsers: - -```css title="styles.css" icon="file-code" -.button { - /* Computed to the exact resulting color */ - background-color: #b31a1a; -} - -.button:hover { - background-color: #c54747; -} -``` - -This feature is particularly useful for creating color systems with programmatically derived shades, tints, and accents without needing preprocessors or custom tooling. - -### Relative colors - -CSS now allows you to modify individual components of a color using relative color syntax. This powerful feature lets you create color variations by adjusting specific attributes like lightness, saturation, or individual channels without having to recalculate the entire color. - -```css title="styles.css" icon="file-code" -.theme-color { - /* Start with a base color and increase lightness by 15% */ - --accent: lch(from purple calc(l + 15%) c h); - - /* Take our brand blue and make a desaturated version */ - --subtle-blue: oklch(from var(--brand-blue) l calc(c * 0.8) h); -} -``` - -Bun's CSS bundler computes these relative color modifications at build time (when not using CSS variables) and generates static color values for browser compatibility: - -```css -.theme-color { - --accent: lch(69.32% 58.34 328.37); - --subtle-blue: oklch(60.92% 0.112 240.01); -} -``` - -This approach is extremely useful for theme generation, creating accessible color variants, or building color scales based on mathematical relationships instead of hard-coding each value. - -### LAB colors - -Modern CSS supports perceptually uniform color spaces like LAB, LCH, OKLAB, and OKLCH that offer significant advantages over traditional RGB. These color spaces can represent colors outside the standard RGB gamut, resulting in more vibrant and visually consistent designs. - -```css title="styles.css" icon="file-code" -.vibrant-element { - /* A vibrant red that exceeds sRGB gamut boundaries */ - color: lab(55% 78 35); - - /* A smooth gradient using perceptual color space */ - background: linear-gradient(to right, oklch(65% 0.25 10deg), oklch(65% 0.25 250deg)); -} -``` - -Bun's CSS bundler automatically converts these advanced color formats to backwards-compatible alternatives for browsers that don't yet support them: - -```css title="styles.css" icon="file-code" -.vibrant-element { - /* Fallback to closest RGB approximation */ - color: #ff0f52; - /* P3 fallback for browsers with wider gamut support */ - color: color(display-p3 1 0.12 0.37); - /* Original value preserved for browsers that support it */ - color: lab(55% 78 35); - - background: linear-gradient(to right, #cd4e15, #3887ab); - background: linear-gradient(to right, oklch(65% 0.25 10deg), oklch(65% 0.25 250deg)); -} -``` - -This layered approach ensures optimal color rendering across all browsers while allowing you to use the latest color technologies in your designs. - -### Color function - -The `color()` function provides a standardized way to specify colors in various predefined color spaces, expanding your design options beyond the traditional RGB space. This allows you to access wider color gamuts and create more vibrant designs. - -```css title="styles.css" icon="file-code" -.vivid-element { - /* Using the Display P3 color space for wider gamut colors */ - color: color(display-p3 1 0.1 0.3); - - /* Using A98 RGB color space */ - background-color: color(a98-rgb 0.44 0.5 0.37); -} -``` - -For browsers that don't support these advanced color functions yet, Bun's CSS bundler provides appropriate RGB fallbacks: - -```css title="styles.css" icon="file-code" -.vivid-element { - /* RGB fallback first for maximum compatibility */ - color: #fa1a4c; - /* Keep original for browsers that support it */ - color: color(display-p3 1 0.1 0.3); - - background-color: #6a805d; - background-color: color(a98-rgb 0.44 0.5 0.37); -} -``` - -This functionality lets you use modern color spaces immediately while ensuring your designs remain functional across all browsers, with optimal colors displayed in supporting browsers and reasonable approximations elsewhere. - -### HWB colors - -The HWB (Hue, Whiteness, Blackness) color model provides an intuitive way to express colors based on how much white or black is mixed with a pure hue. Many designers find this approach more natural for creating color variations compared to manipulating RGB or HSL values. - -```css title="styles.css" icon="file-code" -.easy-theming { - /* Pure cyan with no white or black added */ - --primary: hwb(180 0% 0%); - - /* Same hue, but with 20% white added (tint) */ - --primary-light: hwb(180 20% 0%); - - /* Same hue, but with 30% black added (shade) */ - --primary-dark: hwb(180 0% 30%); - - /* Muted version with both white and black added */ - --primary-muted: hwb(180 30% 20%); -} -``` - -Bun's CSS bundler automatically converts HWB colors to RGB for compatibility with all browsers: - -```css title="styles.css" icon="file-code" -.easy-theming { - --primary: #00ffff; - --primary-light: #33ffff; - --primary-dark: #00b3b3; - --primary-muted: #339999; -} -``` - -The HWB model makes it particularly easy to create systematic color variations for design systems, providing a more intuitive approach to creating consistent tints and shades than working directly with RGB or HSL values. - -### Color notation - -Modern CSS has introduced more intuitive and concise ways to express colors. Space-separated color syntax eliminates the need for commas in RGB and HSL values, while hex colors with alpha channels provide a compact way to specify transparency. - -```css title="styles.css" icon="file-code" -.modern-styling { - /* Space-separated RGB notation (no commas) */ - color: rgb(50 100 200); - - /* Space-separated RGB with alpha */ - border-color: rgba(100 50 200 / 75%); - - /* Hex with alpha channel (8 digits) */ - background-color: #00aaff80; - - /* HSL with simplified notation */ - box-shadow: 0 5px 10px hsl(200 50% 30% / 40%); -} -``` - -Bun's CSS bundler automatically converts these modern color formats to ensure compatibility with older browsers: - -```css title="styles.css" icon="file-code" -.modern-styling { - /* Converted to comma format for older browsers */ - color: rgb(50, 100, 200); - - /* Alpha channels handled appropriately */ - border-color: rgba(100, 50, 200, 0.75); - - /* Hex+alpha converted to rgba when needed */ - background-color: rgba(0, 170, 255, 0.5); - - box-shadow: 0 5px 10px rgba(38, 115, 153, 0.4); -} -``` - -This conversion process lets you write cleaner, more modern CSS while ensuring your styles work correctly across all browsers. - -### light-dark() color function - -The `light-dark()` function provides an elegant solution for implementing color schemes that respect the user's system preference without requiring complex media queries. This function accepts two color values and automatically selects the appropriate one based on the current color scheme context. - -```css title="styles.css" icon="file-code" -:root { - /* Define color scheme support */ - color-scheme: light dark; -} - -.themed-component { - /* Automatically picks the right color based on system preference */ - background-color: light-dark(#ffffff, #121212); - color: light-dark(#333333, #eeeeee); - border-color: light-dark(#dddddd, #555555); -} - -/* Override system preference when needed */ -.light-theme { - color-scheme: light; -} - -.dark-theme { - color-scheme: dark; -} -``` - -For browsers that don't support this feature yet, Bun's CSS bundler converts it to use CSS variables with proper fallbacks: - -```css title="styles.css" icon="file-code" -:root { - --lightningcss-light: initial; - --lightningcss-dark: ; - color-scheme: light dark; -} - -@media (prefers-color-scheme: dark) { - :root { - --lightningcss-light: ; - --lightningcss-dark: initial; - } -} - -.light-theme { - --lightningcss-light: initial; - --lightningcss-dark: ; - color-scheme: light; -} - -.dark-theme { - --lightningcss-light: ; - --lightningcss-dark: initial; - color-scheme: dark; -} - -.themed-component { - background-color: var(--lightningcss-light, #ffffff) var(--lightningcss-dark, #121212); - color: var(--lightningcss-light, #333333) var(--lightningcss-dark, #eeeeee); - border-color: var(--lightningcss-light, #dddddd) var(--lightningcss-dark, #555555); -} -``` - -This approach gives you a clean way to handle light and dark themes without duplicating styles or writing complex media queries, while maintaining compatibility with browsers that don't yet support the feature natively. - -### Logical properties - -CSS logical properties let you define layout, spacing, and sizing relative to the document's writing mode and text direction rather than physical screen directions. This is crucial for creating truly international layouts that automatically adapt to different writing systems. - -```css title="styles.css" icon="file-code" -.multilingual-component { - /* Margin that adapts to writing direction */ - margin-inline-start: 1rem; - - /* Padding that makes sense regardless of text direction */ - padding-block: 1rem 2rem; - - /* Border radius for the starting corner at the top */ - border-start-start-radius: 4px; - - /* Size that respects the writing mode */ - inline-size: 80%; - block-size: auto; -} -``` - -For browsers that don't fully support logical properties, Bun's CSS bundler compiles them to physical properties with appropriate directional adjustments: - -```css title="styles.css" icon="file-code" -/* For left-to-right languages */ -.multilingual-component:dir(ltr) { - margin-left: 1rem; - padding-top: 1rem; - padding-bottom: 2rem; - border-top-left-radius: 4px; - width: 80%; - height: auto; -} - -/* For right-to-left languages */ -.multilingual-component:dir(rtl) { - margin-right: 1rem; - padding-top: 1rem; - padding-bottom: 2rem; - border-top-right-radius: 4px; - width: 80%; - height: auto; -} -``` - -If the `:dir()` selector isn't supported, additional fallbacks are automatically generated to ensure your layouts work properly across all browsers and writing systems. This makes creating internationalized designs much simpler while maintaining compatibility with older browsers. - -### :dir() selector - -The `:dir()` pseudo-class selector allows you to style elements based on their text direction (RTL or LTR), providing a powerful way to create direction-aware designs without JavaScript. This selector matches elements based on their directionality as determined by the document or explicit direction attributes. - -```css title="styles.css" icon="file-code" -/* Apply different styles based on text direction */ -.nav-arrow:dir(ltr) { - transform: rotate(0deg); -} - -.nav-arrow:dir(rtl) { - transform: rotate(180deg); -} - -/* Position elements based on text flow */ -.sidebar:dir(ltr) { - border-right: 1px solid #ddd; -} - -.sidebar:dir(rtl) { - border-left: 1px solid #ddd; -} -``` - -For browsers that don't support the `:dir()` selector yet, Bun's CSS bundler converts it to the more widely supported `:lang()` selector with appropriate language mappings: - -```css title="styles.css" icon="file-code" -/* Converted to use language-based selectors as fallback */ -.nav-arrow:lang(en, fr, de, es, it, pt, nl) { - transform: rotate(0deg); -} - -.nav-arrow:lang(ar, he, fa, ur) { - transform: rotate(180deg); -} - -.sidebar:lang(en, fr, de, es, it, pt, nl) { - border-right: 1px solid #ddd; -} - -.sidebar:lang(ar, he, fa, ur) { - border-left: 1px solid #ddd; -} -``` - -This conversion lets you write direction-aware CSS that works reliably across browsers, even those that don't yet support the `:dir()` selector natively. If multiple arguments to `:lang()` aren't supported, further fallbacks are automatically provided. - -### :lang() selector - -The `:lang()` pseudo-class selector allows you to target elements based on the language they're in, making it easy to apply language-specific styling. Modern CSS allows the `:lang()` selector to accept multiple language codes, letting you group language-specific rules more efficiently. - -```css title="styles.css" icon="file-code" -/* Typography adjustments for CJK languages */ -:lang(zh, ja, ko) { - line-height: 1.8; - font-size: 1.05em; -} - -/* Different quote styles by language group */ -blockquote:lang(fr, it, es, pt) { - font-style: italic; -} - -blockquote:lang(de, nl, da, sv) { - font-weight: 500; -} -``` - -For browsers that don't support multiple arguments in the `:lang()` selector, Bun's CSS bundler converts this syntax to use the `:is()` selector to maintain the same behavior: - -```css title="styles.css" icon="file-code" -/* Multiple languages grouped with :is() for better browser support */ -:is(:lang(zh), :lang(ja), :lang(ko)) { - line-height: 1.8; - font-size: 1.05em; -} - -blockquote:is(:lang(fr), :lang(it), :lang(es), :lang(pt)) { - font-style: italic; -} - -blockquote:is(:lang(de), :lang(nl), :lang(da), :lang(sv)) { - font-weight: 500; -} -``` - -If needed, Bun can provide additional fallbacks for `:is()` as well, ensuring your language-specific styles work across all browsers. This approach simplifies creating internationalized designs with distinct typographic and styling rules for different language groups. - -### :is() selector - -The `:is()` pseudo-class function (formerly `:matches()`) allows you to create more concise and readable selectors by grouping multiple selectors together. It accepts a selector list as its argument and matches if any of the selectors in that list match, significantly reducing repetition in your CSS. - -```css title="styles.css" icon="file-code" -/* Instead of writing these separately */ -/* -.article h1, -.article h2, -.article h3 { - margin-top: 1.5em; -} -*/ - -/* You can write this */ -.article :is(h1, h2, h3) { - margin-top: 1.5em; -} - -/* Complex example with multiple groups */ -:is(header, main, footer) :is(h1, h2, .title) { - font-family: "Heading Font", sans-serif; -} -``` - -For browsers that don't support `:is()`, Bun's CSS bundler provides fallbacks using vendor-prefixed alternatives: - -```css -/* Fallback using -webkit-any */ -.article :-webkit-any(h1, h2, h3) { - margin-top: 1.5em; -} - -/* Fallback using -moz-any */ -.article :-moz-any(h1, h2, h3) { - margin-top: 1.5em; -} - -/* Original preserved for modern browsers */ -.article :is(h1, h2, h3) { - margin-top: 1.5em; -} - -/* Complex example with fallbacks */ -:-webkit-any(header, main, footer) :-webkit-any(h1, h2, .title) { - font-family: "Heading Font", sans-serif; -} - -:-moz-any(header, main, footer) :-moz-any(h1, h2, .title) { - font-family: "Heading Font", sans-serif; -} - -:is(header, main, footer) :is(h1, h2, .title) { - font-family: "Heading Font", sans-serif; -} -``` - - - The vendor-prefixed versions have some limitations compared to the standardized `:is()` selector, particularly with - complex selectors. Bun handles these limitations intelligently, only using prefixed versions when they'll work - correctly. - - -### :not() selector - -The `:not()` pseudo-class allows you to exclude elements that match a specific selector. The modern version of this selector accepts multiple arguments, letting you exclude multiple patterns with a single, concise selector. - -```css title="styles.css" icon="file-code" -/* Select all buttons except primary and secondary variants */ -button:not(.primary, .secondary) { - background-color: #f5f5f5; - border: 1px solid #ddd; -} - -/* Apply styles to all headings except those inside sidebars or footers */ -h2:not(.sidebar *, footer *) { - margin-top: 2em; -} -``` - -For browsers that don't support multiple arguments in `:not()`, Bun's CSS bundler converts this syntax to a more compatible form while preserving the same behavior: - -```css title="styles.css" icon="file-code" -/* Converted to use :not with :is() for compatibility */ -button:not(:is(.primary, .secondary)) { - background-color: #f5f5f5; - border: 1px solid #ddd; -} - -h2:not(:is(.sidebar *, footer *)) { - margin-top: 2em; -} -``` - -And if `:is()` isn't supported, Bun can generate further fallbacks: - -```css title="styles.css" icon="file-code" -/* Even more fallbacks for maximum compatibility */ -button:not(:-webkit-any(.primary, .secondary)) { - background-color: #f5f5f5; - border: 1px solid #ddd; -} - -button:not(:-moz-any(.primary, .secondary)) { - background-color: #f5f5f5; - border: 1px solid #ddd; -} - -button:not(:is(.primary, .secondary)) { - background-color: #f5f5f5; - border: 1px solid #ddd; -} -``` - -This conversion ensures your negative selectors work correctly across all browsers while maintaining the correct specificity and behavior of the original selector. - -### Math functions - -CSS now includes a rich set of mathematical functions that let you perform complex calculations directly in your stylesheets. These include standard math functions (`round()`, `mod()`, `rem()`, `abs()`, `sign()`), trigonometric functions (`sin()`, `cos()`, `tan()`, `asin()`, `acos()`, `atan()`, `atan2()`), and exponential functions (`pow()`, `sqrt()`, `exp()`, `log()`, `hypot()`). - -```css title="styles.css" icon="file-code" -.dynamic-sizing { - /* Clamp a value between minimum and maximum */ - width: clamp(200px, 50%, 800px); - - /* Round to the nearest multiple */ - padding: round(14.8px, 5px); - - /* Trigonometry for animations or layouts */ - transform: rotate(calc(sin(45deg) * 50deg)); - - /* Complex math with multiple functions */ - --scale-factor: pow(1.25, 3); - font-size: calc(16px * var(--scale-factor)); -} -``` - -Bun's CSS bundler evaluates these mathematical expressions at build time when all values are known constants (not variables), resulting in optimized output: - -```css title="styles.css" icon="file-code" -.dynamic-sizing { - width: clamp(200px, 50%, 800px); - padding: 15px; - transform: rotate(35.36deg); - --scale-factor: 1.953125; - font-size: calc(16px * var(--scale-factor)); -} -``` - -This approach lets you write more expressive and maintainable CSS with meaningful mathematical relationships, which then gets compiled to optimized values for maximum browser compatibility and performance. - -### Media query ranges - -Modern CSS supports intuitive range syntax for media queries, allowing you to specify breakpoints using comparison operators like `<`, `>`, `<=`, and `>=` instead of the more verbose `min-` and `max-` prefixes. This syntax is more readable and matches how we normally think about values and ranges. - -```css title="styles.css" icon="file-code" -/* Modern syntax with comparison operators */ -@media (width >= 768px) { - .container { - max-width: 720px; - } -} - -/* Inclusive range using <= and >= */ -@media (768px <= width <= 1199px) { - .sidebar { - display: flex; - } -} - -/* Exclusive range using < and > */ -@media (width > 320px) and (width < 768px) { - .mobile-only { - display: block; - } -} -``` - -Bun's CSS bundler converts these modern range queries to traditional media query syntax for compatibility with all browsers: - -```css title="styles.css" icon="file-code" -/* Converted to traditional min/max syntax */ -@media (min-width: 768px) { - .container { - max-width: 720px; - } -} - -@media (min-width: 768px) and (max-width: 1199px) { - .sidebar { - display: flex; - } -} - -@media (min-width: 321px) and (max-width: 767px) { - .mobile-only { - display: block; - } -} -``` - -This lets you write more intuitive and mathematical media queries while ensuring your stylesheets work correctly across all browsers, including those that don't support the modern range syntax. - -### Shorthands - -CSS has introduced several modern shorthand properties that improve code readability and maintainability. Bun's CSS bundler ensures these convenient shorthands work on all browsers by converting them to their longhand equivalents when needed. - -```css title="styles.css" icon="file-code" -/* Alignment shorthands */ -.flex-container { - /* Shorthand for align-items and justify-items */ - place-items: center start; - - /* Shorthand for align-content and justify-content */ - place-content: space-between center; -} - -.grid-item { - /* Shorthand for align-self and justify-self */ - place-self: end center; -} - -/* Two-value overflow */ -.content-box { - /* First value for horizontal, second for vertical */ - overflow: hidden auto; -} - -/* Enhanced text-decoration */ -.fancy-link { - /* Combines multiple text decoration properties */ - text-decoration: underline dotted blue 2px; -} - -/* Two-value display syntax */ -.component { - /* Outer display type + inner display type */ - display: inline flex; -} -``` - -For browsers that don't support these modern shorthands, Bun converts them to their component longhand properties: - -```css title="styles.css" icon="file-code" -.flex-container { - /* Expanded alignment properties */ - align-items: center; - justify-items: start; - - align-content: space-between; - justify-content: center; -} - -.grid-item { - align-self: end; - justify-self: center; -} - -.content-box { - /* Separate overflow properties */ - overflow-x: hidden; - overflow-y: auto; -} - -.fancy-link { - /* Individual text decoration properties */ - text-decoration-line: underline; - text-decoration-style: dotted; - text-decoration-color: blue; - text-decoration-thickness: 2px; -} - -.component { - /* Single value display */ - display: inline-flex; -} -``` - -This conversion ensures your stylesheets remain clean and maintainable while providing the broadest possible browser compatibility. - -### Double position gradients - -The double position gradient syntax is a modern CSS feature that allows you to create hard color stops in gradients by specifying the same color at two adjacent positions. This creates a sharp transition rather than a smooth fade, which is useful for creating stripes, color bands, and other multi-color designs. - -```css title="styles.css" icon="file-code" -.striped-background { - /* Creates a sharp transition from green to red at 30%-40% */ - background: linear-gradient( - to right, - yellow 0%, - green 20%, - green 30%, - red 30%, - /* Double position creates hard stop */ red 70%, - blue 70%, - blue 100% - ); -} - -.progress-bar { - /* Creates distinct color sections */ - background: linear-gradient( - to right, - #4caf50 0% 25%, - /* Green from 0% to 25% */ #ffc107 25% 50%, - /* Yellow from 25% to 50% */ #2196f3 50% 75%, - /* Blue from 50% to 75% */ #9c27b0 75% 100% /* Purple from 75% to 100% */ - ); -} -``` - -For browsers that don't support this syntax, Bun's CSS bundler automatically converts it to the traditional format by duplicating color stops: - -```css title="styles.css" icon="file-code" -.striped-background { - background: linear-gradient( - to right, - yellow 0%, - green 20%, - green 30%, - red 30%, - /* Split into two color stops */ red 70%, - blue 70%, - blue 100% - ); -} - -.progress-bar { - background: linear-gradient( - to right, - #4caf50 0%, - #4caf50 25%, - /* Two stops for green section */ #ffc107 25%, - #ffc107 50%, - /* Two stops for yellow section */ #2196f3 50%, - #2196f3 75%, - /* Two stops for blue section */ #9c27b0 75%, - #9c27b0 100% /* Two stops for purple section */ - ); -} -``` - -This conversion lets you use the cleaner double position syntax in your source code while ensuring gradients display correctly in all browsers. - -### system-ui font - -The `system-ui` generic font family lets you use the device's native UI font, creating interfaces that feel more integrated with the operating system. This provides a more native look and feel without having to specify different font stacks for each platform. - -```css title="styles.css" icon="file-code" -.native-interface { - /* Use the system's default UI font */ - font-family: system-ui; -} - -.fallback-aware { - /* System UI font with explicit fallbacks */ - font-family: system-ui, sans-serif; -} -``` - -For browsers that don't support `system-ui`, Bun's CSS bundler automatically expands it to a comprehensive cross-platform font stack: - -```css title="styles.css" icon="file-code" -.native-interface { - /* Expanded to support all major platforms */ - font-family: - system-ui, - -apple-system, - BlinkMacSystemFont, - "Segoe UI", - Roboto, - "Noto Sans", - Ubuntu, - Cantarell, - "Helvetica Neue"; -} - -.fallback-aware { - /* Preserves the original fallback after the expanded stack */ - font-family: - system-ui, - -apple-system, - BlinkMacSystemFont, - "Segoe UI", - Roboto, - "Noto Sans", - Ubuntu, - Cantarell, - "Helvetica Neue", - sans-serif; -} -``` - -This approach gives you the simplicity of writing just `system-ui` in your source code while ensuring your interface adapts correctly to all operating systems and browsers. The expanded font stack includes appropriate system fonts for macOS/iOS, Windows, Android, Linux, and fallbacks for older browsers. - -## CSS Modules - -Bun's bundler also supports bundling CSS modules in addition to regular CSS with support for the following features: - -- Automatically detecting CSS module files (`.module.css`) with zero configuration -- Composition (`composes` property) -- Importing CSS modules into JSX/TSX -- Warnings/errors for invalid usages of CSS modules - -A CSS module is a CSS file (with the `.module.css` extension) where are all class names and animations are scoped to the file. This helps you avoid class name collisions as CSS declarations are globally scoped by default. - -Under the hood, Bun's bundler transforms locally scoped class names into unique identifiers. - -### Getting started - -Create a CSS file with the `.module.css` extension: - -```css title="styles.module.css" icon="file-code" -.button { - color: red; -} -``` - -```css title="other-styles.module.css" icon="file-code" -.button { - color: blue; -} -``` - -You can then import this file, for example into a TSX file: - -```tsx title="app.tsx" icon="/icons/typescript.svg" -import styles from "./styles.module.css"; -import otherStyles from "./other-styles.module.css"; - -export default function App() { - return ( - <> - - - - ); -} -``` - -The styles object from importing the CSS module file will be an object with all class names as keys and their unique identifiers as values: - -```ts title="app.tsx" icon="/icons/typescript.svg" -import styles from "./styles.module.css"; -import otherStyles from "./other-styles.module.css"; - -console.log(styles); -console.log(otherStyles); -``` - -This will output: - -```ts title="app.tsx" icon="/icons/typescript.svg" -{ - button: "button_123"; -} - -{ - button: "button_456"; -} -``` - -As you can see, the class names are unique to each file, avoiding any collisions! - -### Composition - -CSS modules allow you to compose class selectors together. This lets you reuse style rules across multiple classes. - -For example: - -```css title="styles.module.css" icon="file-code" -.button { - composes: background; - color: red; -} - -.background { - background-color: blue; -} -``` - -Would be the same as writing: - -```css title="styles.module.css" icon="file-code" -.button { - background-color: blue; - color: red; -} - -.background { - background-color: blue; -} -``` - -There are a couple rules to keep in mind when using `composes`: - - - **Composition Rules:** - A `composes` property must come before any regular CSS properties or declarations - You can - only use `composes` on a simple selector with a single class name - - -```css title="styles.module.css" icon="file-code" -#button { - /* Invalid! `#button` is not a class selector */ - composes: background; -} - -.button, -.button-secondary { - /* Invalid! `.button, .button-secondary` is not a simple selector */ - composes: background; -} -``` - -### Composing from a separate CSS module file - -You can also compose from a separate CSS module file: - -```css title="background.module.css" icon="file-code" -.background { - background-color: blue; -} -``` - -```css title="styles.module.css" icon="file-code" -.button { - composes: background from "./background.module.css"; - color: red; -} -``` - - -When composing classes from separate files, be sure that they do not contain the same properties. - -The CSS module spec says that composing classes from separate files with conflicting properties is undefined behavior, meaning that the output may differ and be unreliable. - - diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/bundler/esbuild.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/bundler/esbuild.mdx deleted file mode 100644 index a1724d5..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/bundler/esbuild.mdx +++ /dev/null @@ -1,298 +0,0 @@ ---- -title: esbuild -description: Migration guide from esbuild to Bun's bundler ---- - -Bun's bundler API is inspired heavily by esbuild. Migrating to Bun's bundler from esbuild should be relatively painless. This guide will briefly explain why you might consider migrating to Bun's bundler and provide a side-by-side API comparison reference for those who are already familiar with esbuild's API. - -There are a few behavioral differences to note. - - - **Bundling by default.** Unlike esbuild, Bun always bundles by default. This is why the `--bundle` flag isn't - necessary in the Bun example. To transpile each file individually, use `Bun.Transpiler`. - - - - **It's just a bundler.** Unlike esbuild, Bun's bundler does not include a built-in development server or file watcher. - It's just a bundler. The bundler is intended for use in conjunction with `Bun.serve` and other runtime APIs to achieve - the same effect. As such, all options relating to HTTP/file watching are not applicable. - - -## Performance - -With a performance-minded API coupled with the extensively optimized Zig-based JS/TS parser, Bun's bundler is 1.75x faster than esbuild on esbuild's three.js benchmark. - -Bundling 10 copies of three.js from scratch, with sourcemaps and minification - -## CLI API - -Bun and esbuild both provide a command-line interface. - -```bash terminal icon="terminal" -# esbuild -esbuild --outdir=out --bundle - -# bun -bun build --outdir=out -``` - -In Bun's CLI, simple boolean flags like `--minify` do not accept an argument. Other flags like `--outdir ` do accept an argument; these flags can be written as `--outdir out` or `--outdir=out`. Some flags like `--define` can be specified several times: `--define foo=bar --define bar=baz`. - -| esbuild | bun build | Notes | -| ---------------------- | -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `--bundle` | n/a | Bun always bundles, use `--no-bundle` to disable this behavior. | -| `--define:K=V` | `--define K=V` | Small syntax difference; no colon.
`esbuild --define:foo=bar`
`bun build --define foo=bar` | -| `--external:` | `--external ` | Small syntax difference; no colon.
`esbuild --external:react`
`bun build --external react` | -| `--format` | `--format` | Bun supports `"esm"` and `"cjs"` currently, but more module formats are planned. esbuild defaults to `"iife"`. | -| `--loader:.ext=loader` | `--loader .ext:loader` | Bun supports a different set of built-in loaders than esbuild; see Bundler > Loaders for a complete reference. The esbuild loaders `dataurl`, `binary`, `base64`, `copy`, and `empty` are not yet implemented.

The syntax for `--loader` is slightly different.
`esbuild app.ts --bundle --loader:.svg=text`
`bun build app.ts --loader .svg:text` | -| `--minify` | `--minify` | No differences | -| `--outdir` | `--outdir` | No differences | -| `--outfile` | `--outfile` | No differences | -| `--packages` | `--packages` | No differences | -| `--platform` | `--target` | Renamed to `--target` for consistency with tsconfig. Does not support `neutral`. | -| `--serve` | n/a | Not applicable | -| `--sourcemap` | `--sourcemap` | No differences | -| `--splitting` | `--splitting` | No differences | -| `--target` | n/a | Not supported. Bun's bundler performs no syntactic down-leveling at this time. | -| `--watch` | `--watch` | No differences | -| `--allow-overwrite` | n/a | Overwriting is never allowed | -| `--analyze` | n/a | Not supported | -| `--asset-names` | `--asset-naming` | Renamed for consistency with naming in JS API | -| `--banner` | `--banner` | Only applies to js bundles | -| `--footer` | `--footer` | Only applies to js bundles | -| `--certfile` | n/a | Not applicable | -| `--charset=utf8` | n/a | Not supported | -| `--chunk-names` | `--chunk-naming` | Renamed for consistency with naming in JS API | -| `--color` | n/a | Always enabled | -| `--drop` | `--drop` | | -| n/a | `--feature` | Bun-specific. Enable feature flags for compile-time dead-code elimination via `import { feature } from "bun:bundle"` | -| `--entry-names` | `--entry-naming` | Renamed for consistency with naming in JS API | -| `--global-name` | n/a | Not applicable, Bun does not support `iife` output at this time | -| `--ignore-annotations` | `--ignore-dce-annotations` | | -| `--inject` | n/a | Not supported | -| `--jsx` | `--jsx-runtime ` | Supports `"automatic"` (uses jsx transform) and `"classic"` (uses `React.createElement`) | -| `--jsx-dev` | n/a | Bun reads `compilerOptions.jsx` from `tsconfig.json` to determine a default. If `compilerOptions.jsx` is `"react-jsx"`, or if `NODE_ENV=production`, Bun will use the jsx transform. Otherwise, it uses `jsxDEV`. The bundler does not support `preserve`. | -| `--jsx-factory` | `--jsx-factory` | | -| `--jsx-fragment` | `--jsx-fragment` | | -| `--jsx-import-source` | `--jsx-import-source` | | -| `--jsx-side-effects` | n/a | JSX is always assumed to be side-effect-free | -| `--keep-names` | n/a | Not supported | -| `--keyfile` | n/a | Not applicable | -| `--legal-comments` | n/a | Not supported | -| `--log-level` | n/a | Not supported. This can be set in `bunfig.toml` as `logLevel`. | -| `--log-limit` | n/a | Not supported | -| `--log-override:X=Y` | n/a | Not supported | -| `--main-fields` | n/a | Not supported | -| `--mangle-cache` | n/a | Not supported | -| `--mangle-props` | n/a | Not supported | -| `--mangle-quoted` | n/a | Not supported | -| `--metafile` | n/a | Not supported | -| `--minify-whitespace` | `--minify-whitespace` | | -| `--minify-identifiers` | `--minify-identifiers` | | -| `--minify-syntax` | `--minify-syntax` | | -| `--out-extension` | n/a | Not supported | -| `--outbase` | `--root` | | -| `--preserve-symlinks` | n/a | Not supported | -| `--public-path` | `--public-path` | | -| `--pure` | n/a | Not supported | -| `--reserve-props` | n/a | Not supported | -| `--resolve-extensions` | n/a | Not supported | -| `--servedir` | n/a | Not applicable | -| `--source-root` | n/a | Not supported | -| `--sourcefile` | n/a | Not supported. Bun does not support stdin input yet. | -| `--sourcemap` | `--sourcemap` | No differences | -| `--sources-content` | n/a | Not supported | -| `--supported` | n/a | Not supported | -| `--tree-shaking` | n/a | Always true | -| `--tsconfig` | `--tsconfig-override` | | -| `--version` | n/a | Run `bun --version` to see the version of Bun. | - -## JavaScript API - -| esbuild.build() | Bun.build() | Notes | -| ------------------- | -------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `absWorkingDir` | n/a | Always set to `process.cwd()` | -| `alias` | n/a | Not supported | -| `allowOverwrite` | n/a | Always false | -| `assetNames` | `naming.asset` | Uses same templating syntax as esbuild, but `[ext]` must be included explicitly.

`ts
Bun.build({
entrypoints: ["./index.tsx"],
naming: {
asset: "[name].[ext]",
},
});
` | -| `banner` | n/a | Not supported | -| `bundle` | n/a | Always true. Use `Bun.Transpiler` to transpile without bundling. | -| `charset` | n/a | Not supported | -| `chunkNames` | `naming.chunk` | Uses same templating syntax as esbuild, but `[ext]` must be included explicitly.

`ts
Bun.build({
entrypoints: ["./index.tsx"],
naming: {
chunk: "[name].[ext]",
},
});
` | -| `color` | n/a | Bun returns logs in the `logs` property of the build result. | -| `conditions` | n/a | Not supported. Export conditions priority is determined by `target`. | -| `define` | `define` | | -| `drop` | n/a | Not supported | -| `entryNames` | `naming` or `naming.entry` | Bun supports a `naming` key that can either be a string or an object. Uses same templating syntax as esbuild, but `[ext]` must be included explicitly.

`ts
Bun.build({
entrypoints: ["./index.tsx"],
// when string, this is equivalent to entryNames
naming: "[name].[ext]",

// granular naming options
naming: {
entry: "[name].[ext]",
asset: "[name].[ext]",
chunk: "[name].[ext]",
},
});
` | -| `entryPoints` | `entrypoints` | Capitalization difference | -| `external` | `external` | No differences | -| `footer` | n/a | Not supported | -| `format` | `format` | Only supports `"esm"` currently. Support for `"cjs"` and `"iife"` is planned. | -| `globalName` | n/a | Not supported | -| `ignoreAnnotations` | n/a | Not supported | -| `inject` | n/a | Not supported | -| `jsx` | `jsx` | Not supported in JS API, configure in `tsconfig.json` | -| `jsxDev` | `jsxDev` | Not supported in JS API, configure in `tsconfig.json` | -| `jsxFactory` | `jsxFactory` | Not supported in JS API, configure in `tsconfig.json` | -| `jsxFragment` | `jsxFragment` | Not supported in JS API, configure in `tsconfig.json` | -| `jsxImportSource` | `jsxImportSource` | Not supported in JS API, configure in `tsconfig.json` | -| `jsxSideEffects` | `jsxSideEffects` | Not supported in JS API, configure in `tsconfig.json` | -| `keepNames` | n/a | Not supported | -| `legalComments` | n/a | Not supported | -| `loader` | `loader` | Bun supports a different set of built-in loaders than esbuild; see Bundler > Loaders for a complete reference. The esbuild loaders `dataurl`, `binary`, `base64`, `copy`, and `empty` are not yet implemented. | -| `logLevel` | n/a | Not supported | -| `logLimit` | n/a | Not supported | -| `logOverride` | n/a | Not supported | -| `mainFields` | n/a | Not supported | -| `mangleCache` | n/a | Not supported | -| `mangleProps` | n/a | Not supported | -| `mangleQuoted` | n/a | Not supported | -| `metafile` | n/a | Not supported | -| `minify` | `minify` | In Bun, `minify` can be a boolean or an object.

`ts
await Bun.build({
entrypoints: ['./index.tsx'],
// enable all minification
minify: true

// granular options
minify: {
identifiers: true,
syntax: true,
whitespace: true
}
})
` | -| `minifyIdentifiers` | `minify.identifiers` | See `minify` | -| `minifySyntax` | `minify.syntax` | See `minify` | -| `minifyWhitespace` | `minify.whitespace` | See `minify` | -| `nodePaths` | n/a | Not supported | -| `outExtension` | n/a | Not supported | -| `outbase` | `root` | Different name | -| `outdir` | `outdir` | No differences | -| `outfile` | `outfile` | No differences | -| `packages` | n/a | Not supported, use `external` | -| `platform` | `target` | Supports `"bun"`, `"node"` and `"browser"` (the default). Does not support `"neutral"`. | -| `plugins` | `plugins` | Bun's plugin API is a subset of esbuild's. Some esbuild plugins will work out of the box with Bun. | -| `preserveSymlinks` | n/a | Not supported | -| `publicPath` | `publicPath` | No differences | -| `pure` | n/a | Not supported | -| `reserveProps` | n/a | Not supported | -| `resolveExtensions` | n/a | Not supported | -| `sourceRoot` | n/a | Not supported | -| `sourcemap` | `sourcemap` | Supports `"inline"`, `"external"`, and `"none"` | -| `sourcesContent` | n/a | Not supported | -| `splitting` | `splitting` | No differences | -| `stdin` | n/a | Not supported | -| `supported` | n/a | Not supported | -| `target` | n/a | No support for syntax downleveling | -| `treeShaking` | n/a | Always true | -| `tsconfig` | n/a | Not supported | -| `write` | n/a | Set to true if `outdir`/`outfile` is set, otherwise false | - -## Plugin API - -Bun's plugin API is designed to be esbuild compatible. Bun doesn't support esbuild's entire plugin API surface, but the core functionality is implemented. Many third-party esbuild plugins will work out of the box with Bun. - - - Long term, we aim for feature parity with esbuild's API, so if something doesn't work please file an issue to help us - prioritize. - - -Plugins in Bun and esbuild are defined with a builder object. - -```ts title="myPlugin.ts" icon="/icons/typescript.svg" -import type { BunPlugin } from "bun"; - -const myPlugin: BunPlugin = { - name: "my-plugin", - setup(builder) { - // define plugin - }, -}; -``` - -The builder object provides some methods for hooking into parts of the bundling process. Bun implements `onResolve` and `onLoad`; it does not yet implement the esbuild hooks `onStart`, `onEnd`, and `onDispose`, and `resolve` utilities. `initialOptions` is partially implemented, being read-only and only having a subset of esbuild's options; use `config` (same thing but with Bun's `BuildConfig` format) instead. - -```ts title="myPlugin.ts" icon="/icons/typescript.svg" -import type { BunPlugin } from "bun"; -const myPlugin: BunPlugin = { - name: "my-plugin", - setup(builder) { - builder.onResolve( - { - /* onResolve.options */ - }, - args => { - return { - /* onResolve.results */ - }; - }, - ); - builder.onLoad( - { - /* onLoad.options */ - }, - args => { - return { - /* onLoad.results */ - }; - }, - ); - }, -}; -``` - -### onResolve - - - - - - 🟢 `filter` - - 🟢 `namespace` - - - - - - 🟢 `path` - - 🟢 `importer` - - 🔴 `namespace` - - 🔴 `resolveDir` - - 🔴 `kind` - - 🔴 `pluginData` - - - - - - 🟢 `namespace` - - 🟢 `path` - - 🔴 `errors` - - 🔴 `external` - - 🔴 `pluginData` - - 🔴 `pluginName` - - 🔴 `sideEffects` - - 🔴 `suffix` - - 🔴 `warnings` - - 🔴 `watchDirs` - - 🔴 `watchFiles` - - - - -### onLoad - - - - - - 🟢 `filter` - - 🟢 `namespace` - - - - - - 🟢 `path` - - 🔴 `namespace` - - 🔴 `suffix` - - 🔴 `pluginData` - - - - - - 🟢 `contents` - - 🟢 `loader` - - 🔴 `errors` - - 🔴 `pluginData` - - 🔴 `pluginName` - - 🔴 `resolveDir` - - 🔴 `warnings` - - 🔴 `watchDirs` - - 🔴 `watchFiles` - - - diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/bundler/executables.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/bundler/executables.mdx deleted file mode 100644 index 30446f2..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/bundler/executables.mdx +++ /dev/null @@ -1,1277 +0,0 @@ ---- -title: "Single-file executable" -description: "Generate standalone executables from TypeScript or JavaScript files with Bun" ---- - -Bun's bundler implements a `--compile` flag for generating a standalone binary from a TypeScript or JavaScript file. - - - - ```bash terminal icon="terminal" - bun build ./cli.ts --compile --outfile mycli - ``` - - - ```ts build.ts icon="/icons/typescript.svg" - await Bun.build({ - entrypoints: ["./cli.ts"], - compile: { - outfile: "./mycli", - }, - }); - ``` - - - -```ts cli.ts icon="/icons/typescript.svg" -console.log("Hello world!"); -``` - -This bundles `cli.ts` into an executable that can be executed directly: - -```bash terminal icon="terminal" -./mycli -``` - -```txt -Hello world! -``` - -All imported files and packages are bundled into the executable, along with a copy of the Bun runtime. All built-in Bun and Node.js APIs are supported. - ---- - -## Cross-compile to other platforms - -The `--target` flag lets you compile your standalone executable for a different operating system, architecture, or version of Bun than the machine you're running `bun build` on. - -To build for Linux x64 (most servers): - - - - ```bash icon="terminal" terminal - bun build --compile --target=bun-linux-x64 ./index.ts --outfile myapp - - # To support CPUs from before 2013, use the baseline version (nehalem) - bun build --compile --target=bun-linux-x64-baseline ./index.ts --outfile myapp - - # To explicitly only support CPUs from 2013 and later, use the modern version (haswell) - # modern is faster, but baseline is more compatible. - bun build --compile --target=bun-linux-x64-modern ./index.ts --outfile myapp - ``` - - - - ```ts build.ts icon="/icons/typescript.svg" - // Standard Linux x64 - await Bun.build({ - entrypoints: ["./index.ts"], - compile: { - target: "bun-linux-x64", - outfile: "./myapp", - }, - }); - - // Baseline (pre-2013 CPUs) - await Bun.build({ - entrypoints: ["./index.ts"], - compile: { - target: "bun-linux-x64-baseline", - outfile: "./myapp", - }, - }); - - // Modern (2013+ CPUs, faster) - await Bun.build({ - entrypoints: ["./index.ts"], - compile: { - target: "bun-linux-x64-modern", - outfile: "./myapp", - }, - }); - ``` - - - - -To build for Linux ARM64 (e.g. Graviton or Raspberry Pi): - - - - ```bash icon="terminal" terminal - # Note: the default architecture is x64 if no architecture is specified. - bun build --compile --target=bun-linux-arm64 ./index.ts --outfile myapp - ``` - - - ```ts build.ts icon="/icons/typescript.svg" - await Bun.build({ - entrypoints: ["./index.ts"], - compile: { - target: "bun-linux-arm64", - outfile: "./myapp", - }, - }); - ``` - - - -To build for Windows x64: - - - - ```bash icon="terminal" terminal - bun build --compile --target=bun-windows-x64 ./path/to/my/app.ts --outfile myapp - - # To support CPUs from before 2013, use the baseline version (nehalem) - bun build --compile --target=bun-windows-x64-baseline ./path/to/my/app.ts --outfile myapp - - # To explicitly only support CPUs from 2013 and later, use the modern version (haswell) - bun build --compile --target=bun-windows-x64-modern ./path/to/my/app.ts --outfile myapp - - # note: if no .exe extension is provided, Bun will automatically add it for Windows executables - ``` - - - - ```ts build.ts icon="/icons/typescript.svg" - // Standard Windows x64 - await Bun.build({ - entrypoints: ["./path/to/my/app.ts"], - compile: { - target: "bun-windows-x64", - outfile: "./myapp", // .exe added automatically - }, - }); - - // Baseline or modern variants - await Bun.build({ - entrypoints: ["./path/to/my/app.ts"], - compile: { - target: "bun-windows-x64-baseline", - outfile: "./myapp", - }, - }); - ``` - - - - -To build for macOS arm64: - - - - ```bash icon="terminal" terminal - bun build --compile --target=bun-darwin-arm64 ./path/to/my/app.ts --outfile myapp - ``` - - - ```ts build.ts icon="/icons/typescript.svg" - await Bun.build({ - entrypoints: ["./path/to/my/app.ts"], - compile: { - target: "bun-darwin-arm64", - outfile: "./myapp", - }, - }); - ``` - - - -To build for macOS x64: - - - - ```bash icon="terminal" terminal - bun build --compile --target=bun-darwin-x64 ./path/to/my/app.ts --outfile myapp - ``` - - - ```ts build.ts icon="/icons/typescript.svg" - await Bun.build({ - entrypoints: ["./path/to/my/app.ts"], - compile: { - target: "bun-darwin-x64", - outfile: "./myapp", - }, - }); - ``` - - - -### Supported targets - -The order of the `--target` flag does not matter, as long as they're delimited by a `-`. - -| --target | Operating System | Architecture | Modern | Baseline | Libc | -| --------------------- | ---------------- | ------------ | ------ | -------- | ----- | -| bun-linux-x64 | Linux | x64 | ✅ | ✅ | glibc | -| bun-linux-arm64 | Linux | arm64 | ✅ | N/A | glibc | -| bun-windows-x64 | Windows | x64 | ✅ | ✅ | - | -| ~~bun-windows-arm64~~ | ~~Windows~~ | ~~arm64~~ | ❌ | ❌ | - | -| bun-darwin-x64 | macOS | x64 | ✅ | ✅ | - | -| bun-darwin-arm64 | macOS | arm64 | ✅ | N/A | - | -| bun-linux-x64-musl | Linux | x64 | ✅ | ✅ | musl | -| bun-linux-arm64-musl | Linux | arm64 | ✅ | N/A | musl | - - - On x64 platforms, Bun uses SIMD optimizations which require a modern CPU supporting AVX2 instructions. The `-baseline` - build of Bun is for older CPUs that don't support these optimizations. Normally, when you install Bun we automatically - detect which version to use but this can be harder to do when cross-compiling since you might not know the target CPU. - You usually don't need to worry about it on Darwin x64, but it is relevant for Windows x64 and Linux x64. If you or - your users see `"Illegal instruction"` errors, you might need to use the baseline version. - - ---- - -## Build-time constants - -Use the `--define` flag to inject build-time constants into your executable, such as version numbers, build timestamps, or configuration values: - - - - ```bash icon="terminal" terminal - bun build --compile --define BUILD_VERSION='"1.2.3"' --define BUILD_TIME='"2024-01-15T10:30:00Z"' src/cli.ts --outfile mycli - ``` - - - ```ts build.ts icon="/icons/typescript.svg" - await Bun.build({ - entrypoints: ["./src/cli.ts"], - compile: { - outfile: "./mycli", - }, - define: { - BUILD_VERSION: JSON.stringify("1.2.3"), - BUILD_TIME: JSON.stringify("2024-01-15T10:30:00Z"), - }, - }); - ``` - - - -These constants are embedded directly into your compiled binary at build time, providing zero runtime overhead and enabling dead code elimination optimizations. - - - For comprehensive examples and advanced patterns, see the [Build-time constants - guide](/docs/guides/runtime/build-time-constants). - - ---- - -## Deploying to production - -Compiled executables reduce memory usage and improve Bun's start time. - -Normally, Bun reads and transpiles JavaScript and TypeScript files on `import` and `require`. This is part of what makes so much of Bun "just work", but it's not free. It costs time and memory to read files from disk, resolve file paths, parse, transpile, and print source code. - -With compiled executables, you can move that cost from runtime to build-time. - -When deploying to production, we recommend the following: - - - - ```bash icon="terminal" terminal - bun build --compile --minify --sourcemap ./path/to/my/app.ts --outfile myapp - ``` - - - ```ts build.ts icon="/icons/typescript.svg" - await Bun.build({ - entrypoints: ["./path/to/my/app.ts"], - compile: { - outfile: "./myapp", - }, - minify: true, - sourcemap: "linked", - }); - ``` - - - -### Bytecode compilation - -To improve startup time, enable bytecode compilation: - - - - ```bash icon="terminal" terminal - bun build --compile --minify --sourcemap --bytecode ./path/to/my/app.ts --outfile myapp - ``` - - - ```ts build.ts icon="/icons/typescript.svg" - await Bun.build({ - entrypoints: ["./path/to/my/app.ts"], - compile: { - outfile: "./myapp", - }, - minify: true, - sourcemap: "linked", - bytecode: true, - }); - ``` - - - -Using bytecode compilation, `tsc` starts 2x faster: - - - ![Bytecode performance comparison](https://github.com/user-attachments/assets/dc8913db-01d2-48f8-a8ef-ac4e984f9763) - - -Bytecode compilation moves parsing overhead for large input files from runtime to bundle time. Your app starts faster, in exchange for making the `bun build` command a little slower. It doesn't obscure source code. - - - **Experimental:** Bytecode compilation is an experimental feature. Only `cjs` format is supported (which means no - top-level-await). Let us know if you run into any issues! - - -### What do these flags do? - -The `--minify` argument optimizes the size of the transpiled output code. If you have a large application, this can save megabytes of space. For smaller applications, it might still improve start time a little. - -The `--sourcemap` argument embeds a sourcemap compressed with zstd, so that errors & stacktraces point to their original locations instead of the transpiled location. Bun will automatically decompress & resolve the sourcemap when an error occurs. - -The `--bytecode` argument enables bytecode compilation. Every time you run JavaScript code in Bun, JavaScriptCore (the engine) will compile your source code into bytecode. We can move this parsing work from runtime to bundle time, saving you startup time. - ---- - -## Embedding runtime arguments - -**`--compile-exec-argv="args"`** - Embed runtime arguments that are available via `process.execArgv`: - - - - ```bash icon="terminal" terminal - bun build --compile --compile-exec-argv="--smol --user-agent=MyBot" ./app.ts --outfile myapp - ``` - - - ```ts build.ts icon="/icons/typescript.svg" - await Bun.build({ - entrypoints: ["./app.ts"], - compile: { - execArgv: ["--smol", "--user-agent=MyBot"], - outfile: "./myapp", - }, - }); - ``` - - - -```ts app.ts icon="/icons/typescript.svg" -// In the compiled app -console.log(process.execArgv); // ["--smol", "--user-agent=MyBot"] -``` - ---- - -## Automatic config loading - -Standalone executables can automatically load configuration files from the directory where they are run. By default: - -- **`tsconfig.json`** and **`package.json`** loading is **disabled** — these are typically only needed at development time, and the bundler already uses them when compiling -- **`.env`** and **`bunfig.toml`** loading is **enabled** — these often contain runtime configuration that may vary per deployment - - - In a future version of Bun, `.env` and `bunfig.toml` may also be disabled by default for more deterministic behavior. - - -### Enabling config loading at runtime - -If your executable needs to read `tsconfig.json` or `package.json` at runtime, you can opt in with the new CLI flags: - -```bash icon="terminal" terminal -# Enable runtime loading of tsconfig.json -bun build --compile --compile-autoload-tsconfig ./app.ts --outfile myapp - -# Enable runtime loading of package.json -bun build --compile --compile-autoload-package-json ./app.ts --outfile myapp - -# Enable both -bun build --compile --compile-autoload-tsconfig --compile-autoload-package-json ./app.ts --outfile myapp -``` - -### Disabling config loading at runtime - -To disable `.env` or `bunfig.toml` loading for deterministic execution: - - - - ```bash icon="terminal" terminal - # Disable .env loading - bun build --compile --no-compile-autoload-dotenv ./app.ts --outfile myapp - - # Disable bunfig.toml loading - bun build --compile --no-compile-autoload-bunfig ./app.ts --outfile myapp - - # Disable all config loading - bun build --compile --no-compile-autoload-dotenv --no-compile-autoload-bunfig ./app.ts --outfile myapp - ``` - - - - ```ts build.ts icon="/icons/typescript.svg" - await Bun.build({ - entrypoints: ["./app.ts"], - compile: { - // tsconfig.json and package.json are disabled by default - autoloadTsconfig: true, // Enable tsconfig.json loading - autoloadPackageJson: true, // Enable package.json loading - - // .env and bunfig.toml are enabled by default - autoloadDotenv: false, // Disable .env loading - autoloadBunfig: false, // Disable bunfig.toml loading - outfile: "./myapp", - }, - }); - ``` - - - - ---- - -## Act as the Bun CLI - -New in Bun v1.2.16 - -You can run a standalone executable as if it were the `bun` CLI itself by setting the `BUN_BE_BUN=1` environment variable. When this variable is set, the executable will ignore its bundled entrypoint and instead expose all the features of Bun's CLI. - -For example, consider an executable compiled from a simple script: - -```bash icon="terminal" terminal -echo "console.log(\"you shouldn't see this\");" > such-bun.js -bun build --compile ./such-bun.js -``` - -```txt -[3ms] bundle 1 modules -[89ms] compile such-bun -``` - -Normally, running `./such-bun` with arguments would execute the script. - -```bash icon="terminal" terminal -# Executable runs its own entrypoint by default -./such-bun install -``` - -```txt -you shouldn't see this -``` - -However, with the `BUN_BE_BUN=1` environment variable, it acts just like the `bun` binary: - -```bash icon="terminal" terminal -# With the env var, the executable acts like the `bun` CLI -BUN_BE_BUN=1 ./such-bun install -``` - -```txt -bun install v1.2.16-canary.1 (1d1db811) -Checked 63 installs across 64 packages (no changes) [5.00ms] -``` - -This is useful for building CLI tools on top of Bun that may need to install packages, bundle dependencies, run different or local files and more without needing to download a separate binary or install bun. - ---- - -## Full-stack executables - -New in Bun v1.2.17 - -Bun's `--compile` flag can create standalone executables that contain both server and client code, making it ideal for full-stack applications. When you import an HTML file in your server code, Bun automatically bundles all frontend assets (JavaScript, CSS, etc.) and embeds them into the executable. When Bun sees the HTML import on the server, it kicks off a frontend build process to bundle JavaScript, CSS, and other assets. - - - -```ts server.ts icon="/icons/typescript.svg" -import { serve } from "bun"; -import index from "./index.html"; - -const server = serve({ - routes: { - "/": index, - "/api/hello": { GET: () => Response.json({ message: "Hello from API" }) }, - }, -}); - -console.log(`Server running at http://localhost:${server.port}`); -``` - -```html index.html icon="file-code" - - - - My App - - - -

Hello World

- - - -``` - -```ts app.ts icon="file-code" -console.log("Hello from the client!"); -``` - -```css styles.css icon="file-code" -body { - background-color: #f0f0f0; -} -``` - -
- -To build this into a single executable: - - - - ```bash terminal icon="terminal" - bun build --compile ./server.ts --outfile myapp - ``` - - - ```ts build.ts icon="/icons/typescript.svg" - await Bun.build({ - entrypoints: ["./server.ts"], - compile: { - outfile: "./myapp", - }, - }); - ``` - - - -This creates a self-contained binary that includes: - -- Your server code -- The Bun runtime -- All frontend assets (HTML, CSS, JavaScript) -- Any npm packages used by your server - -The result is a single file that can be deployed anywhere without needing Node.js, Bun, or any dependencies installed. Just run: - -```bash terminal icon="terminal" -./myapp -``` - -Bun automatically handles serving the frontend assets with proper MIME types and cache headers. The HTML import is replaced with a manifest object that `Bun.serve` uses to efficiently serve pre-bundled assets. - -For more details on building full-stack applications with Bun, see the [full-stack guide](/docs/bundler/fullstack). - ---- - -## Worker - -To use workers in a standalone executable, add the worker's entrypoint to the build: - - - - ```bash terminal icon="terminal" - bun build --compile ./index.ts ./my-worker.ts --outfile myapp - ``` - - - ```ts build.ts icon="/icons/typescript.svg" - await Bun.build({ - entrypoints: ["./index.ts", "./my-worker.ts"], - compile: { - outfile: "./myapp", - }, - }); - ``` - - - -Then, reference the worker in your code: - -```ts index.ts icon="/icons/typescript.svg" -console.log("Hello from Bun!"); - -// Any of these will work: -new Worker("./my-worker.ts"); -new Worker(new URL("./my-worker.ts", import.meta.url)); -new Worker(new URL("./my-worker.ts", import.meta.url).href); -``` - -When you add multiple entrypoints to a standalone executable, they will be bundled separately into the executable. - -In the future, we may automatically detect usages of statically-known paths in `new Worker(path)` and then bundle those into the executable, but for now, you'll need to add it to the shell command manually like the above example. - -If you use a relative path to a file not included in the standalone executable, it will attempt to load that path from disk relative to the current working directory of the process (and then error if it doesn't exist). - ---- - -## SQLite - -You can use `bun:sqlite` imports with `bun build --compile`. - -By default, the database is resolved relative to the current working directory of the process. - -```ts index.ts icon="/icons/typescript.svg" -import db from "./my.db" with { type: "sqlite" }; - -console.log(db.query("select * from users LIMIT 1").get()); -``` - -That means if the executable is located at `/usr/bin/hello`, the user's terminal is located at `/home/me/Desktop`, it will look for `/home/me/Desktop/my.db`. - -```bash terminal icon="terminal" -cd /home/me/Desktop -./hello -``` - ---- - -## Embed assets & files - -Standalone executables support embedding files directly into the binary. This lets you ship a single executable that contains images, JSON configs, templates, or any other assets your application needs. - -### How it works - -Use the `with { type: "file" }` [import attribute](https://github.com/tc39/proposal-import-attributes) to embed a file: - -```ts index.ts icon="/icons/typescript.svg" -import icon from "./icon.png" with { type: "file" }; - -console.log(icon); -// During development: "./icon.png" -// After compilation: "$bunfs/icon-a1b2c3d4.png" (internal path) -``` - -The import returns a **path string** that points to the embedded file. At build time, Bun: - -1. Reads the file contents -2. Embeds the data into the executable -3. Replaces the import with an internal path (prefixed with `$bunfs/`) - -You can then read this embedded file using `Bun.file()` or Node.js `fs` APIs. - -### Reading embedded files with Bun.file() - -`Bun.file()` is the recommended way to read embedded files: - -```ts index.ts icon="/icons/typescript.svg" -import icon from "./icon.png" with { type: "file" }; -import { file } from "bun"; - -// Get file contents as different types -const bytes = await file(icon).arrayBuffer(); // ArrayBuffer -const text = await file(icon).text(); // string (for text files) -const blob = file(icon); // Blob - -// Stream the file in a response -export default { - fetch(req) { - return new Response(file(icon), { - headers: { "Content-Type": "image/png" }, - }); - }, -}; -``` - -### Reading embedded files with Node.js fs - -Embedded files work seamlessly with Node.js file system APIs: - -```ts index.ts icon="/icons/typescript.svg" -import icon from "./icon.png" with { type: "file" }; -import config from "./config.json" with { type: "file" }; -import { readFileSync, promises as fs } from "node:fs"; - -// Synchronous read -const iconBuffer = readFileSync(icon); - -// Async read -const configData = await fs.readFile(config, "utf-8"); -const parsed = JSON.parse(configData); - -// Check file stats -const stats = await fs.stat(icon); -console.log(`Icon size: ${stats.size} bytes`); -``` - -### Practical examples - -#### Embedding a JSON config file - -```ts index.ts icon="/icons/typescript.svg" -import configPath from "./default-config.json" with { type: "file" }; -import { file } from "bun"; - -// Load the embedded default configuration -const defaultConfig = await file(configPath).json(); - -// Merge with user config if it exists -const userConfig = await file("./user-config.json") - .json() - .catch(() => ({})); -const config = { ...defaultConfig, ...userConfig }; -``` - -#### Serving static assets in an HTTP server - -Use `static` routes in `Bun.serve()` for efficient static file serving: - -```ts server.ts icon="/icons/typescript.svg" -import favicon from "./favicon.ico" with { type: "file" }; -import logo from "./logo.png" with { type: "file" }; -import styles from "./styles.css" with { type: "file" }; -import { file, serve } from "bun"; - -serve({ - static: { - "/favicon.ico": file(favicon), - "/logo.png": file(logo), - "/styles.css": file(styles), - }, - fetch(req) { - return new Response("Not found", { status: 404 }); - }, -}); -``` - -Bun automatically handles Content-Type headers and caching for static routes. - -#### Embedding templates - -```ts index.ts icon="/icons/typescript.svg" -import templatePath from "./email-template.html" with { type: "file" }; -import { file } from "bun"; - -async function sendWelcomeEmail(user: { name: string; email: string }) { - const template = await file(templatePath).text(); - const html = template.replace("{{name}}", user.name).replace("{{email}}", user.email); - - // Send email with the rendered template... -} -``` - -#### Embedding binary files - -```ts index.ts icon="/icons/typescript.svg" -import wasmPath from "./processor.wasm" with { type: "file" }; -import fontPath from "./font.ttf" with { type: "file" }; -import { file } from "bun"; - -// Load a WebAssembly module -const wasmBytes = await file(wasmPath).arrayBuffer(); -const wasmModule = await WebAssembly.instantiate(wasmBytes); - -// Read binary font data -const fontData = await file(fontPath).bytes(); -``` - -### Embed SQLite databases - -If your application wants to embed a SQLite database into the compiled executable, set `type: "sqlite"` in the import attribute and the `embed` attribute to `"true"`. - -The database file must already exist on disk. Then, import it in your code: - -```ts index.ts icon="/icons/typescript.svg" -import myEmbeddedDb from "./my.db" with { type: "sqlite", embed: "true" }; - -console.log(myEmbeddedDb.query("select * from users LIMIT 1").get()); -``` - -Finally, compile it into a standalone executable: - -```bash terminal icon="terminal" -bun build --compile ./index.ts --outfile mycli -``` - - - The database file must exist on disk when you run `bun build --compile`. The `embed: "true"` attribute tells the - bundler to include the database contents inside the compiled executable. When running normally with `bun run`, the - database file is loaded from disk just like a regular SQLite import. - - -In the compiled executable, the embedded database is read-write, but all changes are lost when the executable exits (since it's stored in memory). - -### Embed N-API Addons - -You can embed `.node` files into executables. - -```ts index.ts icon="/icons/typescript.svg" -const addon = require("./addon.node"); - -console.log(addon.hello()); -``` - -Unfortunately, if you're using `@mapbox/node-pre-gyp` or other similar tools, you'll need to make sure the `.node` file is directly required or it won't bundle correctly. - -### Embed directories - -To embed a directory with `bun build --compile`, include file patterns in your build: - - - - ```bash terminal icon="terminal" - bun build --compile ./index.ts ./public/**/*.png - ``` - - - ```ts build.ts icon="/icons/typescript.svg" - import { Glob } from "bun"; - - // Expand glob pattern to file list - const glob = new Glob("./public/**/*.png"); - const pngFiles = Array.from(glob.scanSync(".")); - - await Bun.build({ - entrypoints: ["./index.ts", ...pngFiles], - compile: { - outfile: "./myapp", - }, - }); - ``` - - - - -Then, you can reference the files in your code: - -```ts index.ts icon="/icons/typescript.svg" -import icon from "./public/assets/icon.png" with { type: "file" }; -import { file } from "bun"; - -export default { - fetch(req) { - // Embedded files can be streamed from Response objects - return new Response(file(icon)); - }, -}; -``` - -This is honestly a workaround, and we expect to improve this in the future with a more direct API. - -### Listing embedded files - -`Bun.embeddedFiles` gives you access to all embedded files as `Blob` objects: - -```ts index.ts icon="/icons/typescript.svg" -import "./icon.png" with { type: "file" }; -import "./data.json" with { type: "file" }; -import "./template.html" with { type: "file" }; -import { embeddedFiles } from "bun"; - -// List all embedded files -for (const blob of embeddedFiles) { - console.log(`${blob.name} - ${blob.size} bytes`); -} -// Output: -// icon-a1b2c3d4.png - 4096 bytes -// data-e5f6g7h8.json - 256 bytes -// template-i9j0k1l2.html - 1024 bytes -``` - -Each item in `Bun.embeddedFiles` is a `Blob` with a `name` property: - -```ts -embeddedFiles: ReadonlyArray; -``` - -This is useful for dynamically serving all embedded assets using `static` routes: - -```ts server.ts icon="/icons/typescript.svg" -import "./public/favicon.ico" with { type: "file" }; -import "./public/logo.png" with { type: "file" }; -import "./public/styles.css" with { type: "file" }; -import { embeddedFiles, serve } from "bun"; - -// Build static routes from all embedded files -const staticRoutes: Record = {}; -for (const blob of embeddedFiles) { - // Remove hash from filename: "icon-a1b2c3d4.png" -> "icon.png" - const name = blob.name.replace(/-[a-f0-9]+\./, "."); - staticRoutes[`/${name}`] = blob; -} - -serve({ - static: staticRoutes, - fetch(req) { - return new Response("Not found", { status: 404 }); - }, -}); -``` - - - `Bun.embeddedFiles` excludes bundled source code (`.ts`, `.js`, etc.) to help protect your application's source. - - -#### Content hash - -By default, embedded files have a content hash appended to their name. This is useful for situations where you want to serve the file from a URL or CDN and have fewer cache invalidation issues. But sometimes, this is unexpected and you might want the original name instead: - -To disable the content hash, configure asset naming: - - - - ```bash terminal icon="terminal" - bun build --compile --asset-naming="[name].[ext]" ./index.ts - ``` - - - ```ts build.ts icon="/icons/typescript.svg" - await Bun.build({ - entrypoints: ["./index.ts"], - compile: { - outfile: "./myapp", - }, - naming: { - asset: "[name].[ext]", - }, - }); - ``` - - - ---- - -## Minification - -To trim down the size of the executable, enable minification: - - - - ```bash terminal icon="terminal" - bun build --compile --minify ./index.ts --outfile myapp - ``` - - - ```ts build.ts icon="/icons/typescript.svg" - await Bun.build({ - entrypoints: ["./index.ts"], - compile: { - outfile: "./myapp", - }, - minify: true, // Enable all minification - }); - - // Or granular control: - await Bun.build({ - entrypoints: ["./index.ts"], - compile: { - outfile: "./myapp", - }, - minify: { - whitespace: true, - syntax: true, - identifiers: true, - }, - }); - ``` - - - - -This uses Bun's minifier to reduce the code size. Overall though, Bun's binary is still way too big and we need to make it smaller. - ---- - -## Windows-specific flags - -When compiling a standalone executable on Windows, there are platform-specific options to customize metadata on the generated `.exe` file: - - - - ```bash terminal icon="terminal" - # Custom icon - bun build --compile --windows-icon=path/to/icon.ico ./app.ts --outfile myapp - - # Hide console window (for GUI apps) - bun build --compile --windows-hide-console ./app.ts --outfile myapp - ``` - - - - ```ts build.ts icon="/icons/typescript.svg" - await Bun.build({ - entrypoints: ["./app.ts"], - compile: { - outfile: "./myapp", - windows: { - icon: "./path/to/icon.ico", - hideConsole: true, - // Additional Windows metadata: - title: "My Application", - publisher: "My Company", - version: "1.0.0", - description: "A standalone Windows application", - copyright: "Copyright 2024", - }, - }, - }); - ``` - - - -Available Windows options: - -- `icon` - Path to `.ico` file for the executable icon -- `hideConsole` - Disable the background terminal (for GUI apps) -- `title` - Application title in file properties -- `publisher` - Publisher name in file properties -- `version` - Version string in file properties -- `description` - Description in file properties -- `copyright` - Copyright notice in file properties - -These flags currently cannot be used when cross-compiling because they depend on Windows APIs. - ---- - -## Code signing on macOS - -To codesign a standalone executable on macOS (which fixes Gatekeeper warnings), use the `codesign` command. - -```bash terminal icon="terminal" -codesign --deep --force -vvvv --sign "XXXXXXXXXX" ./myapp -``` - -We recommend including an `entitlements.plist` file with JIT permissions. - -```xml icon="xml" title="info.plist" - - - - - com.apple.security.cs.allow-jit - - com.apple.security.cs.allow-unsigned-executable-memory - - com.apple.security.cs.disable-executable-page-protection - - com.apple.security.cs.allow-dyld-environment-variables - - com.apple.security.cs.disable-library-validation - - - -``` - -To codesign with JIT support, pass the `--entitlements` flag to `codesign`. - -```bash terminal icon="terminal" -codesign --deep --force -vvvv --sign "XXXXXXXXXX" --entitlements entitlements.plist ./myapp -``` - -After codesigning, verify the executable: - -```bash terminal icon="terminal" -codesign -vvv --verify ./myapp -./myapp: valid on disk -./myapp: satisfies its Designated Requirement -``` - -Codesign support requires Bun v1.2.4 or newer. - ---- - -## Code splitting - -Standalone executables support code splitting. Use `--compile` with `--splitting` to create an executable that loads code-split chunks at runtime. - - - - ```bash terminal icon="terminal" - bun build --compile --splitting ./src/entry.ts --outdir ./build - ``` - - - ```ts build.ts icon="/icons/typescript.svg" - await Bun.build({ - entrypoints: ["./src/entry.ts"], - compile: true, - splitting: true, - outdir: "./build", - }); - ``` - - - - - -```ts src/entry.ts icon="/icons/typescript.svg" -console.log("Entrypoint loaded"); -const lazy = await import("./lazy.ts"); -lazy.hello(); -``` - -```ts src/lazy.ts icon="/icons/typescript.svg" -export function hello() { - console.log("Lazy module loaded"); -} -``` - - - -```bash terminal icon="terminal" -./build/entry -``` - -```txt -Entrypoint loaded -Lazy module loaded -``` - ---- - -## Using plugins - -Plugins work with standalone executables, allowing you to transform files during the build process: - -```ts build.ts icon="/icons/typescript.svg" -import type { BunPlugin } from "bun"; - -const envPlugin: BunPlugin = { - name: "env-loader", - setup(build) { - build.onLoad({ filter: /\.env\.json$/ }, async args => { - // Transform .env.json files into validated config objects - const env = await Bun.file(args.path).json(); - - return { - contents: `export default ${JSON.stringify(env)};`, - loader: "js", - }; - }); - }, -}; - -await Bun.build({ - entrypoints: ["./cli.ts"], - compile: { - outfile: "./mycli", - }, - plugins: [envPlugin], -}); -``` - -Example use case - embedding environment config at build time: - -```ts cli.ts icon="/icons/typescript.svg" -import config from "./config.env.json"; - -console.log(`Running in ${config.environment} mode`); -console.log(`API endpoint: ${config.apiUrl}`); -``` - -Plugins can perform any transformation: compile YAML/TOML configs, inline SQL queries, generate type-safe API clients, or preprocess templates. Refer to the [plugin documentation](/docs/bundler/plugins) for more details. - ---- - -## Unsupported CLI arguments - -Currently, the `--compile` flag can only accept a single entrypoint at a time and does not support the following flags: - -- `--outdir` — use `outfile` instead (except when using with `--splitting`). -- `--public-path` -- `--target=node` or `--target=browser` -- `--no-bundle` - we always bundle everything into the executable. - ---- - -## API reference - -The `compile` option in `Bun.build()` accepts three forms: - -```ts title="types" icon="/icons/typescript.svg" -interface BuildConfig { - entrypoints: string[]; - compile: boolean | Bun.Build.Target | CompileBuildOptions; - // ... other BuildConfig options (minify, sourcemap, define, plugins, etc.) -} - -interface CompileBuildOptions { - target?: Bun.Build.Target; // Cross-compilation target - outfile?: string; // Output executable path - execArgv?: string[]; // Runtime arguments (process.execArgv) - autoloadTsconfig?: boolean; // Load tsconfig.json (default: false) - autoloadPackageJson?: boolean; // Load package.json (default: false) - autoloadDotenv?: boolean; // Load .env files (default: true) - autoloadBunfig?: boolean; // Load bunfig.toml (default: true) - windows?: { - icon?: string; // Path to .ico file - hideConsole?: boolean; // Hide console window - title?: string; // Application title - publisher?: string; // Publisher name - version?: string; // Version string - description?: string; // Description - copyright?: string; // Copyright notice - }; -} -``` - -Usage forms: - -```ts icon="/icons/typescript.svg" -// Simple boolean - compile for current platform (uses entrypoint name as output) -compile: true - -// Target string - cross-compile (uses entrypoint name as output) -compile: "bun-linux-x64" - -// Full options object - specify outfile and other options -compile: { - target: "bun-linux-x64", - outfile: "./myapp", -} -``` - -### Supported targets - -```ts title="Bun.Build.Target" icon="/icons/typescript.svg" -type Target = - | "bun-darwin-x64" - | "bun-darwin-x64-baseline" - | "bun-darwin-arm64" - | "bun-linux-x64" - | "bun-linux-x64-baseline" - | "bun-linux-x64-modern" - | "bun-linux-arm64" - | "bun-linux-x64-musl" - | "bun-linux-arm64-musl" - | "bun-windows-x64" - | "bun-windows-x64-baseline" - | "bun-windows-x64-modern"; -``` - -### Complete example - -```ts build.ts icon="/icons/typescript.svg" -import type { BunPlugin } from "bun"; - -const myPlugin: BunPlugin = { - name: "my-plugin", - setup(build) { - // Plugin implementation - }, -}; - -const result = await Bun.build({ - entrypoints: ["./src/cli.ts"], - compile: { - target: "bun-linux-x64", - outfile: "./dist/mycli", - execArgv: ["--smol"], - autoloadDotenv: false, - autoloadBunfig: false, - }, - minify: true, - sourcemap: "linked", - bytecode: true, - define: { - "process.env.NODE_ENV": JSON.stringify("production"), - VERSION: JSON.stringify("1.0.0"), - }, - plugins: [myPlugin], -}); - -if (result.success) { - console.log("Build successful:", result.outputs[0].path); -} -``` diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/bundler/fullstack.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/bundler/fullstack.mdx deleted file mode 100644 index 6a9a362..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/bundler/fullstack.mdx +++ /dev/null @@ -1,1086 +0,0 @@ ---- -title: "Fullstack dev server" -description: "Build fullstack applications with Bun's integrated dev server that bundles frontend assets and handles API routes" ---- - -To get started, import HTML files and pass them to the `routes` option in `Bun.serve()`. - -```ts title="app.ts" icon="/icons/typescript.svg" -import { serve } from "bun"; -import dashboard from "./dashboard.html"; -import homepage from "./index.html"; - -const server = serve({ - routes: { - // ** HTML imports ** - // Bundle & route index.html to "/". This uses HTMLRewriter to scan - // the HTML for ` - - - -``` - -Becomes something like this: - -```html title="index.html" icon="file-code" - - - - Home - - - -
- - - -``` - -## React Integration - -To use React in your client-side code, import `react-dom/client` and render your app. - - -```ts title="src/backend.ts" icon="/icons/typescript.svg" -import dashboard from "../public/dashboard.html"; -import { serve } from "bun"; - -serve({ -routes: { -"/": dashboard, -}, -async fetch(req) { -// ...api requests -return new Response("hello world"); -}, -}); - -```` - -```tsx title="src/frontend.tsx" icon="/icons/typescript.svg" -import { createRoot } from 'react-dom/client'; -import App from './app'; - -const container = document.getElementById('root'); -const root = createRoot(container!); -root.render(); -```` - -```html title="public/dashboard.html" icon="file-code" - - - - Dashboard - - - -
- - - -``` - -```tsx title="src/app.tsx" icon="/icons/typescript.svg" -import { useState } from "react"; - -export default function App() { - const [count, setCount] = useState(0); - - return ( -
-

Dashboard

- -
- ); -} -``` - -
- -## Development Mode - -When building locally, enable development mode by setting `development: true` in `Bun.serve()`. - -```ts title="src/backend.ts" icon="/icons/typescript.svg" -import homepage from "./index.html"; -import dashboard from "./dashboard.html"; - -Bun.serve({ - routes: { - "/": homepage, - "/dashboard": dashboard, - }, - - development: true, - - fetch(req) { - // ... api requests - }, -}); -``` - -### Development Mode Features - -When `development` is `true`, Bun will: - -- Include the SourceMap header in the response so that devtools can show the original source code -- Disable minification -- Re-bundle assets on each request to a `.html` file -- Enable hot module reloading (unless `hmr: false` is set) -- Echo console logs from browser to terminal - -### Advanced Development Configuration - -`Bun.serve()` supports echoing console logs from the browser to the terminal. - -To enable this, pass `console: true` in the development object in `Bun.serve()`. - -```ts title="src/backend.ts" icon="/icons/typescript.svg" -import homepage from "./index.html"; - -Bun.serve({ - // development can also be an object. - development: { - // Enable Hot Module Reloading - hmr: true, - - // Echo console logs from the browser to the terminal - console: true, - }, - - routes: { - "/": homepage, - }, -}); -``` - -When `console: true` is set, Bun will stream console logs from the browser to the terminal. This reuses the existing WebSocket connection from HMR to send the logs. - -### Development vs Production - -| Feature | Development | Production | -| ------------------- | --------------------- | ----------- | -| **Source maps** | ✅ Enabled | ❌ Disabled | -| **Minification** | ❌ Disabled | ✅ Enabled | -| **Hot reloading** | ✅ Enabled | ❌ Disabled | -| **Asset bundling** | 🔄 On each request | 💾 Cached | -| **Console logging** | 🖥️ Browser → Terminal | ❌ Disabled | -| **Error details** | 📝 Detailed | 🔒 Minimal | - -## Production Mode - -Hot reloading and `development: true` helps you iterate quickly, but in production, your server should be as fast as possible and have as few external dependencies as possible. - -### Ahead of Time Bundling (Recommended) - -As of Bun v1.2.17, you can use `Bun.build` or `bun build` to bundle your full-stack application ahead of time. - -```bash terminal icon="terminal" -bun build --target=bun --production --outdir=dist ./src/index.ts -``` - -When Bun's bundler sees an HTML import from server-side code, it will bundle the referenced JavaScript/TypeScript/TSX/JSX and CSS files into a manifest object that `Bun.serve()` can use to serve the assets. - -```ts title="src/backend.ts" icon="/icons/typescript.svg" -import { serve } from "bun"; -import index from "./index.html"; - -serve({ - routes: { "/": index }, -}); -``` - -### Runtime Bundling - -When adding a build step is too complicated, you can set `development: false` in `Bun.serve()`. - -This will: - -- Enable in-memory caching of bundled assets. Bun will bundle assets lazily on the first request to an `.html` file, and cache the result in memory until the server restarts. -- Enable `Cache-Control` headers and `ETag` headers -- Minify JavaScript/TypeScript/TSX/JSX files - -```ts title="src/backend.ts" icon="/icons/typescript.svg" -import { serve } from "bun"; -import homepage from "./index.html"; - -serve({ - routes: { - "/": homepage, - }, - - // Production mode - development: false, -}); -``` - -## API Routes - -### HTTP Method Handlers - -Define API endpoints with HTTP method handlers: - -```ts title="src/backend.ts" icon="/icons/typescript.svg" -import { serve } from "bun"; - -serve({ - routes: { - "/api/users": { - async GET(req) { - // Handle GET requests - const users = await getUsers(); - return Response.json(users); - }, - - async POST(req) { - // Handle POST requests - const userData = await req.json(); - const user = await createUser(userData); - return Response.json(user, { status: 201 }); - }, - - async PUT(req) { - // Handle PUT requests - const userData = await req.json(); - const user = await updateUser(userData); - return Response.json(user); - }, - - async DELETE(req) { - // Handle DELETE requests - await deleteUser(req.params.id); - return new Response(null, { status: 204 }); - }, - }, - }, -}); -``` - -### Dynamic Routes - -Use URL parameters in your routes: - -```ts title="src/backend.ts" icon="/icons/typescript.svg" -serve({ - routes: { - // Single parameter - "/api/users/:id": async req => { - const { id } = req.params; - const user = await getUserById(id); - return Response.json(user); - }, - - // Multiple parameters - "/api/users/:userId/posts/:postId": async req => { - const { userId, postId } = req.params; - const post = await getPostByUser(userId, postId); - return Response.json(post); - }, - - // Wildcard routes - "/api/files/*": async req => { - const filePath = req.params["*"]; - const file = await getFile(filePath); - return new Response(file); - }, - }, -}); -``` - -### Request Handling - -```ts title="src/backend.ts" icon="/icons/typescript.svg" -serve({ - routes: { - "/api/data": { - async POST(req) { - // Parse JSON body - const body = await req.json(); - - // Access headers - const auth = req.headers.get("Authorization"); - - // Access URL parameters - const { id } = req.params; - - // Access query parameters - const url = new URL(req.url); - const page = url.searchParams.get("page") || "1"; - - // Return response - return Response.json({ - message: "Data processed", - page: parseInt(page), - authenticated: !!auth, - }); - }, - }, - }, -}); -``` - -## Plugins - -Bun's bundler plugins are also supported when bundling static routes. - -To configure plugins for `Bun.serve`, add a `plugins` array in the `[serve.static]` section of your `bunfig.toml`. - -### TailwindCSS Plugin - -You can use TailwindCSS by installing and adding the `tailwindcss` package and `bun-plugin-tailwind` plugin. - -```bash terminal icon="terminal" -bun add tailwindcss bun-plugin-tailwind -``` - -```toml title="bunfig.toml" icon="settings" -[serve.static] -plugins = ["bun-plugin-tailwind"] -``` - -This will allow you to use TailwindCSS utility classes in your HTML and CSS files. All you need to do is import `tailwindcss` somewhere: - -```html title="index.html" icon="file-code" - - - - - - - - -``` - -Alternatively, you can import TailwindCSS in your CSS file: - -```css title="style.css" icon="file-code" -@import "tailwindcss"; - -.custom-class { - @apply bg-red-500 text-white; -} -``` - -```html index.html icon="file-code" - - - - - - - - -``` - -### Custom Plugins - -Any JS file or module which exports a valid bundler plugin object (essentially an object with a `name` and `setup` field) can be placed inside the plugins array: - -```toml title="bunfig.toml" icon="settings" -[serve.static] -plugins = ["./my-plugin-implementation.ts"] -``` - -```ts title="my-plugin-implementation.ts" icon="/icons/typescript.svg" -import type { BunPlugin } from "bun"; - -const myPlugin: BunPlugin = { - name: "my-custom-plugin", - setup(build) { - // Plugin implementation - build.onLoad({ filter: /\.custom$/ }, async args => { - const text = await Bun.file(args.path).text(); - return { - contents: `export default ${JSON.stringify(text)};`, - loader: "js", - }; - }); - }, -}; - -export default myPlugin; -``` - -Bun will lazily resolve and load each plugin and use them to bundle your routes. - - - This is currently in `bunfig.toml` to make it possible to know statically which plugins are in use when we eventually - integrate this with the `bun build` CLI. These plugins work in `Bun.build()`'s JS API, but are not yet supported in - the CLI. - - -## Inline Environment Variables - -Bun can replace `process.env.*` references in your frontend JavaScript and TypeScript with their actual values at build time. Configure the `env` option in your `bunfig.toml`: - -```toml title="bunfig.toml" icon="settings" -[serve.static] -env = "PUBLIC_*" # only inline env vars starting with PUBLIC_ (recommended) -# env = "inline" # inline all environment variables -# env = "disable" # disable env var replacement (default) -``` - - - This only works with literal `process.env.FOO` references, not `import.meta.env` or indirect access like `const env = - process.env; env.FOO`. - -If an environment variable is not set, you may see runtime errors like `ReferenceError: process - is not defined` in the browser. - - - -See the [HTML & static sites documentation](/docs/bundler/html-static#inline-environment-variables) for more details on build-time configuration and examples. - -## How It Works - -Bun uses `HTMLRewriter` to scan for ` -``` - - - -- Processes CSS imports and `` tags -- Concatenates CSS files -- Rewrites url and asset paths to include content-addressable hashes in URLs - -```html title="index.html" icon="file-code" - -``` - - - -- Links to assets are rewritten to include content-addressable hashes in URLs -- Small assets in CSS files are inlined into `data:` URLs, reducing the total number of HTTP requests sent over the wire - - -- Combines all ` - - -``` - -```tsx title="src/main.tsx" -import { createRoot } from "react-dom/client"; -import { App } from "./App"; - -const container = document.getElementById("root")!; -const root = createRoot(container); -root.render(); -``` - -```tsx title="src/App.tsx" -import { useState, useEffect } from "react"; - -interface User { - id: number; - name: string; - email: string; - created_at: string; -} - -export function App() { - const [users, setUsers] = useState([]); - const [name, setName] = useState(""); - const [email, setEmail] = useState(""); - const [loading, setLoading] = useState(false); - - const fetchUsers = async () => { - const response = await fetch("/api/users"); - const data = await response.json(); - setUsers(data); - }; - - const createUser = async (e: React.FormEvent) => { - e.preventDefault(); - setLoading(true); - - try { - const response = await fetch("/api/users", { - method: "POST", - headers: { "Content-Type": "application/json" }, - body: JSON.stringify({ name, email }), - }); - - if (response.ok) { - setName(""); - setEmail(""); - await fetchUsers(); - } else { - const error = await response.json(); - alert(error.error); - } - } catch (error) { - alert("Failed to create user"); - } finally { - setLoading(false); - } - }; - - const deleteUser = async (id: number) => { - if (!confirm("Are you sure?")) return; - - try { - const response = await fetch(`/api/users/${id}`, { - method: "DELETE", - }); - - if (response.ok) { - await fetchUsers(); - } - } catch (error) { - alert("Failed to delete user"); - } - }; - - useEffect(() => { - fetchUsers(); - }, []); - - return ( -
-

User Management

- -
- setName(e.target.value)} required /> - setEmail(e.target.value)} required /> - -
- -
-

Users ({users.length})

- {users.map(user => ( -
-
- {user.name} -
- {user.email} -
- -
- ))} -
-
- ); -} -``` - -```css title="src/styles.css" icon="file-code" -* { - margin: 0; - padding: 0; - box-sizing: border-box; -} - -body { - font-family: -apple-system, BlinkMacSystemFont, sans-serif; - background: #f5f5f5; - color: #333; -} - -.container { - max-width: 800px; - margin: 0 auto; - padding: 2rem; -} - -h1 { - color: #2563eb; - margin-bottom: 2rem; -} - -.form { - background: white; - padding: 1.5rem; - border-radius: 8px; - box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); - margin-bottom: 2rem; - display: flex; - gap: 1rem; - flex-wrap: wrap; -} - -.form input { - flex: 1; - min-width: 200px; - padding: 0.75rem; - border: 1px solid #ddd; - border-radius: 4px; -} - -.form button { - padding: 0.75rem 1.5rem; - background: #2563eb; - color: white; - border: none; - border-radius: 4px; - cursor: pointer; -} - -.form button:hover { - background: #1d4ed8; -} - -.form button:disabled { - opacity: 0.5; - cursor: not-allowed; -} - -.users { - background: white; - padding: 1.5rem; - border-radius: 8px; - box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); -} - -.user-card { - display: flex; - justify-content: space-between; - align-items: center; - padding: 1rem; - border-bottom: 1px solid #eee; -} - -.user-card:last-child { - border-bottom: none; -} - -.delete-btn { - padding: 0.5rem 1rem; - background: #dc2626; - color: white; - border: none; - border-radius: 4px; - cursor: pointer; -} - -.delete-btn:hover { - background: #b91c1c; -} -``` - -## Best Practices - -### Project Structure - -``` -my-app/ -├── src/ -│ ├── components/ -│ │ ├── Header.tsx -│ │ └── UserList.tsx -│ ├── styles/ -│ │ ├── globals.css -│ │ └── components.css -│ ├── utils/ -│ │ └── api.ts -│ ├── App.tsx -│ └── main.tsx -├── public/ -│ ├── index.html -│ ├── dashboard.html -│ └── favicon.ico -├── server/ -│ ├── routes/ -│ │ ├── users.ts -│ │ └── auth.ts -│ ├── db/ -│ │ └── schema.sql -│ └── index.ts -├── bunfig.toml -└── package.json -``` - -### Environment-Based Configuration - -```ts title="server/config.ts" icon="/icons/typescript.svg" -export const config = { - development: process.env.NODE_ENV !== "production", - port: process.env.PORT || 3000, - database: { - url: process.env.DATABASE_URL || "./dev.db", - }, - cors: { - origin: process.env.CORS_ORIGIN || "*", - }, -}; -``` - -### Error Handling - -```ts title="server/middleware.ts" icon="/icons/typescript.svg" -export function errorHandler(error: Error, req: Request) { - console.error("Server error:", error); - - if (process.env.NODE_ENV === "production") { - return Response.json({ error: "Internal server error" }, { status: 500 }); - } - - return Response.json( - { - error: error.message, - stack: error.stack, - }, - { status: 500 }, - ); -} -``` - -### API Response Helpers - -```ts title="server/utils.ts" icon="/icons/typescript.svg" -export function json(data: any, status = 200) { - return Response.json(data, { status }); -} - -export function error(message: string, status = 400) { - return Response.json({ error: message }, { status }); -} - -export function notFound(message = "Not found") { - return error(message, 404); -} - -export function unauthorized(message = "Unauthorized") { - return error(message, 401); -} -``` - -### Type Safety - -```ts title="types/api.ts" icon="/icons/typescript.svg" -export interface User { - id: number; - name: string; - email: string; - created_at: string; -} - -export interface CreateUserRequest { - name: string; - email: string; -} - -export interface ApiResponse { - data?: T; - error?: string; -} -``` - -## Deployment - -### Production Build - -```bash terminal icon="terminal" -# Build for production -bun build --target=bun --production --outdir=dist ./server/index.ts - -# Run production server -NODE_ENV=production bun dist/index.js -``` - -### Docker Deployment - -```dockerfile title="Dockerfile" icon="docker" -FROM oven/bun:1 as base -WORKDIR /usr/src/app - -# Install dependencies -COPY package.json bun.lockb ./ -RUN bun install --frozen-lockfile - -# Copy source code -COPY . . - -# Build application -RUN bun build --target=bun --production --outdir=dist ./server/index.ts - -# Production stage -FROM oven/bun:1-slim -WORKDIR /usr/src/app -COPY --from=base /usr/src/app/dist ./ -COPY --from=base /usr/src/app/public ./public - -EXPOSE 3000 -CMD ["bun", "index.js"] -``` - -### Environment Variables - -```ini title=".env.production" icon="file-code" -NODE_ENV=production -PORT=3000 -DATABASE_URL=postgresql://user:pass@localhost:5432/myapp -CORS_ORIGIN=https://myapp.com -``` - -## Migration from Other Frameworks - -### From Express + Webpack - -```ts title="server.ts" icon="/icons/typescript.svg" -// Before (Express + Webpack) -app.use(express.static("dist")); -app.get("/api/users", (req, res) => { - res.json(users); -}); - -// After (Bun fullstack) -serve({ - routes: { - "/": homepage, // Replaces express.static - "/api/users": { - GET() { - return Response.json(users); - }, - }, - }, -}); -``` - -### From Next.js API Routes - -```ts title="server.ts" icon="/icons/typescript.svg" -// Before (Next.js) -export default function handler(req, res) { - if (req.method === 'GET') { - res.json(users); - } -} - -// After (Bun) -"/api/users": { - GET() { return Response.json(users); } -} -``` - -## Limitations and Future Plans - -### Current Limitations - -- `bun build` CLI integration is not yet available for fullstack apps -- Auto-discovery of API routes is not implemented -- Server-side rendering (SSR) is not built-in - -### Planned Features - -- Integration with `bun build` CLI -- File-based routing for API endpoints -- Built-in SSR support -- Enhanced plugin ecosystem - -This is a work in progress. Features and APIs may change as Bun continues to evolve. diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/bundler/hot-reloading.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/bundler/hot-reloading.mdx deleted file mode 100644 index 0204191..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/bundler/hot-reloading.mdx +++ /dev/null @@ -1,229 +0,0 @@ ---- -title: Hot reloading -description: Hot Module Replacement (HMR) for Bun's development server ---- - -Hot Module Replacement (HMR) allows you to update modules in a running application without needing a full page reload. This preserves the application state and improves the development experience. - -HMR is enabled by default when using Bun's full-stack development server. - -## `import.meta.hot` API Reference - -Bun implements a client-side HMR API modeled after [Vite's `import.meta.hot` API](https://vite.dev/guide/api-hmr). It can be checked for with `if (import.meta.hot)`, tree-shaking it in production. - -```ts title="index.ts" icon="/icons/typescript.svg" -if (import.meta.hot) { - // HMR APIs are available. -} -``` - -However, this check is often not needed as Bun will dead-code-eliminate calls to all of the HMR APIs in production builds. - -```ts title="index.ts" icon="/icons/typescript.svg" -// This entire function call will be removed in production! -import.meta.hot.dispose(() => { - console.log("dispose"); -}); -``` - - -For this to work, Bun forces these APIs to be called without indirection. That means the following do not work: - -```ts title="index.ts" icon="/icons/typescript.svg" -// INVALID: Assigning `hot` to a variable -const hot = import.meta.hot; -hot.accept(); - -// INVALID: Assigning `import.meta` to a variable -const meta = import.meta; -meta.hot.accept(); -console.log(meta.hot.data); - -// INVALID: Passing to a function -doSomething(import.meta.hot.dispose); - -// OK: The full phrase "import.meta.hot." must be called directly: -import.meta.hot.accept(); - -// OK: `data` can be passed to functions: -doSomething(import.meta.hot.data); -``` - - - - -The HMR API is still a work in progress. Some features are missing. HMR can be disabled in `Bun.serve` by setting the development option to `{ hmr: false }`. - - -## API Methods - -| Method | Status | Notes | -| ------------------ | ------ | --------------------------------------------------------------------- | -| `hot.accept()` | ✅ | Indicate that a hot update can be replaced gracefully. | -| `hot.data` | ✅ | Persist data between module evaluations. | -| `hot.dispose()` | ✅ | Add a callback function to run when a module is about to be replaced. | -| `hot.invalidate()` | ❌ | | -| `hot.on()` | ✅ | Attach an event listener | -| `hot.off()` | ✅ | Remove an event listener from `on`. | -| `hot.send()` | ❌ | | -| `hot.prune()` | 🚧 | NOTE: Callback is currently never called. | -| `hot.decline()` | ✅ | No-op to match Vite's `import.meta.hot` | - -## import.meta.hot.accept() - -The `accept()` method indicates that a module can be hot-replaced. When called without arguments, it indicates that this module can be replaced simply by re-evaluating the file. After a hot update, importers of this module will be automatically patched. - -```ts title="index.ts" icon="/icons/typescript.svg" -// index.ts -import { getCount } from "./foo.ts"; - -console.log("count is ", getCount()); - -import.meta.hot.accept(); - -export function getNegativeCount() { - return -getCount(); -} -``` - -This creates a hot-reloading boundary for all of the files that `index.ts` imports. That means whenever `foo.ts` or any of its dependencies are saved, the update will bubble up to `index.ts` will re-evaluate. Files that import `index.ts` will then be patched to import the new version of `getNegativeCount()`. If only `index.ts` is updated, only the one file will be re-evaluated, and the counter in `foo.ts` is reused. - -This may be used in combination with `import.meta.hot.data` to transfer state from the previous module to the new one. - - - When no modules call `import.meta.hot.accept()` (and there isn't React Fast Refresh or a plugin calling it for you), - the page will reload when the file updates, and a console warning shows which files were invalidated. This warning is - safe to ignore if it makes more sense to rely on full page reloads. - - -### With callback - -When provided one callback, `import.meta.hot.accept` will function how it does in Vite. Instead of patching the importers of this module, it will call the callback with the new module. - -```ts title="index.ts" icon="/icons/typescript.svg" -export const count = 0; - -import.meta.hot.accept(newModule => { - if (newModule) { - // newModule is undefined when SyntaxError happened - console.log("updated: count is now ", newModule.count); - } -}); -``` - - - Prefer using `import.meta.hot.accept()` without an argument as it usually makes your code easier to understand. - - -### Accepting other modules - -```ts title="index.ts" icon="/icons/typescript.svg" -import { count } from "./foo"; - -import.meta.hot.accept("./foo", () => { - if (!newModule) return; - - console.log("updated: count is now ", count); -}); -``` - -Indicates that a dependency's module can be accepted. When the dependency is updated, the callback will be called with the new module. - -### With multiple dependencies - -```ts title="index.ts" icon="/icons/typescript.svg" -import.meta.hot.accept(["./foo", "./bar"], newModules => { - // newModules is an array where each item corresponds to the updated module - // or undefined if that module had a syntax error -}); -``` - -Indicates that multiple dependencies' modules can be accepted. This variant accepts an array of dependencies, where the callback will receive the updated modules, and `undefined` for any that had errors. - -## import.meta.hot.data - -`import.meta.hot.data` maintains state between module instances during hot replacement, enabling data transfer from previous to new versions. When `import.meta.hot.data` is written into, Bun will also mark this module as capable of self-accepting (equivalent of calling `import.meta.hot.accept()`). - -```tsx title="index.tsx" icon="/icons/typescript.svg" -import { createRoot } from "react-dom/client"; -import { App } from "./app"; - -const root = (import.meta.hot.data.root ??= createRoot(elem)); -root.render(); // re-use an existing root -``` - -In production, `data` is inlined to be `{}`, meaning it cannot be used as a state holder. - - - The above pattern is recommended for stateful modules because Bun knows it can minify `{}.prop ??= value` into `value` - in production. - - -## import.meta.hot.dispose() - -Attaches an on-dispose callback. This is called: - -- Just before the module is replaced with another copy (before the next is loaded) -- After the module is detached (removing all imports to this module, see `import.meta.hot.prune()`) - -```ts title="index.ts" icon="/icons/typescript.svg" -const sideEffect = setupSideEffect(); - -import.meta.hot.dispose(() => { - sideEffect.cleanup(); -}); -``` - -This callback is not called on route navigation or when the browser tab closes. - -Returning a promise will delay module replacement until the module is disposed. All dispose callbacks are called in parallel. - -## import.meta.hot.prune() - -Attaches an on-prune callback. This is called when all imports to this module are removed, but the module was previously loaded. - -This can be used to clean up resources that were created when the module was loaded. Unlike `import.meta.hot.dispose()`, this pairs much better with `accept` and `data` to manage stateful resources. A full example managing a WebSocket: - -```ts title="index.ts" icon="/icons/typescript.svg" -import { something } from "./something"; - -// Initialize or re-use a WebSocket connection -export const ws = (import.meta.hot.data.ws ??= new WebSocket(location.origin)); - -// If the module's import is removed, clean up the WebSocket connection. -import.meta.hot.prune(() => { - ws.close(); -}); -``` - - - If `dispose` was used instead, the WebSocket would close and re-open on every hot update. Both versions of the code - will prevent page reloads when imported files are updated. - - -## import.meta.hot.on() and off() - -`on()` and `off()` are used to listen for events from the HMR runtime. Event names are prefixed with a prefix so that plugins do not conflict with each other. - -```ts title="index.ts" icon="/icons/typescript.svg" -import.meta.hot.on("bun:beforeUpdate", () => { - console.log("before a hot update"); -}); -``` - -When a file is replaced, all of its event listeners are automatically removed. - -### Built-in events - -| Event | Emitted when | -| ---------------------- | ----------------------------------------------------------------------------------------------- | -| `bun:beforeUpdate` | before a hot update is applied. | -| `bun:afterUpdate` | after a hot update is applied. | -| `bun:beforeFullReload` | before a full page reload happens. | -| `bun:beforePrune` | before prune callbacks are called. | -| `bun:invalidate` | when a module is invalidated with `import.meta.hot.invalidate()` | -| `bun:error` | when a build or runtime error occurs | -| `bun:ws:disconnect` | when the HMR WebSocket connection is lost. This can indicate the development server is offline. | -| `bun:ws:connect` | when the HMR WebSocket connects or re-connects. | - -For compatibility with Vite, the above events are also available via `vite:*` prefix instead of `bun:*`. diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/bundler/html-static.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/bundler/html-static.mdx deleted file mode 100644 index 125e619..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/bundler/html-static.mdx +++ /dev/null @@ -1,488 +0,0 @@ ---- -title: HTML & static sites -description: Build static sites, landing pages, and web applications with Bun's bundler ---- - -Bun's bundler has first-class support for HTML. Build static sites, landing pages, and web applications with zero configuration. Just point Bun at your HTML file and it handles everything else. - -```html title="index.html" icon="file-code" - - - - - - - - - - -``` - -To get started, pass HTML files to `bun`. - -```bash terminal icon="terminal" -bun ./index.html -``` - -``` -Bun v1.3.3 -ready in 6.62ms -→ http://localhost:3000/ -Press h + Enter to show shortcuts -``` - -Bun's development server provides powerful features with zero configuration: - -- **Automatic Bundling** - Bundles and serves your HTML, JavaScript, and CSS -- **Multi-Entry Support** - Handles multiple HTML entry points and glob entry points -- **Modern JavaScript** - TypeScript & JSX support out of the box -- **Smart Configuration** - Reads `tsconfig.json` for paths, JSX options, experimental decorators, and more -- **Plugins** - Plugins for TailwindCSS and more -- **ESM & CommonJS** - Use ESM and CommonJS in your JavaScript, TypeScript, and JSX files -- **CSS Bundling & Minification** - Bundles CSS from `` tags and `@import` statements -- **Asset Management** - Automatic copying & hashing of images and assets; Rewrites asset paths in JavaScript, CSS, and HTML - -## Single Page Apps (SPA) - -When you pass a single `.html` file to Bun, Bun will use it as a fallback route for all paths. This makes it perfect for single page apps that use client-side routing: - -```bash terminal icon="terminal" -bun index.html -``` - -``` -Bun v1.3.3 -ready in 6.62ms -→ http://localhost:3000/ -Press h + Enter to show shortcuts -``` - -Your React or other SPA will work out of the box — no configuration needed. All routes like `/about`, `/users/123`, etc. will serve the same HTML file, letting your client-side router handle the navigation. - -```html title="index.html" icon="file-code" - - - - My SPA - - - -
- - -``` - -## Multi-page apps (MPA) - -Some projects have several separate routes or HTML files as entry points. To support multiple entry points, pass them all to `bun`: - -```bash terminal icon="terminal" -bun ./index.html ./about.html -``` - -```txt -Bun v1.3.3 -ready in 6.62ms -→ http://localhost:3000/ -Routes: - / ./index.html - /about ./about.html -Press h + Enter to show shortcuts -``` - -This will serve: - -- `index.html` at `/` -- `about.html` at `/about` - -### Glob patterns - -To specify multiple files, you can use glob patterns that end in `.html`: - -```bash terminal icon="terminal" -bun ./**/*.html -``` - -``` -Bun v1.3.3 -ready in 6.62ms -→ http://localhost:3000/ -Routes: - / ./index.html - /about ./about.html -Press h + Enter to show shortcuts -``` - -### Path normalization - -The base path is chosen from the longest common prefix among all the files. - -```bash terminal icon="terminal" -bun ./index.html ./about/index.html ./about/foo/index.html -``` - -``` -Bun v1.3.3 -ready in 6.62ms -→ http://localhost:3000/ -Routes: - / ./index.html - /about ./about/index.html - /about/foo ./about/foo/index.html -Press h + Enter to show shortcuts -``` - -## JavaScript, TypeScript, and JSX - -Bun's transpiler natively implements JavaScript, TypeScript, and JSX support. Learn more about loaders in Bun. - -Bun's transpiler is also used at runtime. - -### ES Modules & CommonJS - -You can use ESM and CJS in your JavaScript, TypeScript, and JSX files. Bun will handle the transpilation and bundling automatically. - -There is no pre-build or separate optimization step. It's all done at the same time. - -Learn more about module resolution in Bun. - -## CSS - -Bun's CSS parser is also natively implemented (clocking in around 58,000 lines of Zig). - -It's also a CSS bundler. You can use `@import` in your CSS files to import other CSS files. - -For example: - - - -```css styles.css icon="file-code" -@import "./abc.css"; - -.container { - background-color: blue; -} -``` - -```css abc.css icon="file-code" -body { - background-color: red; -} -``` - - - -This outputs: - -```css styles.css icon="file-code" -body { - background-color: red; -} - -.container { - background-color: blue; -} -``` - -### Referencing local assets in CSS - -You can reference local assets in your CSS files. - -```css styles.css icon="file-code" -body { - background-image: url("./logo.png"); -} -``` - -This will copy `./logo.png` to the output directory and rewrite the path in the CSS file to include a content hash. - -```css styles.css icon="file-code" -body { - background-image: url("./logo-[ABC123].png"); -} -``` - -### Importing CSS in JavaScript - -To associate a CSS file with a JavaScript file, you can import it in your JavaScript file. - -```ts app.ts icon="/icons/typescript.svg" -import "./styles.css"; -import "./more-styles.css"; -``` - -This generates `./app.css` and `./app.js` in the output directory. All CSS files imported from JavaScript will be bundled into a single CSS file per entry point. If you import the same CSS file from multiple JavaScript files, it will only be included once in the output CSS file. - -## Plugins - -The dev server supports plugins. - -### Tailwind CSS - -To use TailwindCSS, install the `bun-plugin-tailwind` plugin: - -```bash terminal icon="terminal" -# Or any npm client -bun install --dev bun-plugin-tailwind -``` - -Then, add the plugin to your `bunfig.toml`: - -```toml title="bunfig.toml" icon="settings" -[serve.static] -plugins = ["bun-plugin-tailwind"] -``` - -Then, reference TailwindCSS in your HTML via `` tag, `@import` in CSS, or import in JavaScript. - - - - - ```html title="index.html" icon="file-code" - - - ``` - - - - - ```css title="styles.css" icon="file-code" - @import "tailwindcss"; - ``` - - - - - ```ts title="app.ts" icon="/icons/typescript.svg" - import "tailwindcss"; - ``` - - - - -Only one of those are necessary, not all three. - -## Inline environment variables - -Bun can replace `process.env.*` references in your JavaScript and TypeScript with their actual values at build time. This is useful for injecting configuration like API URLs or feature flags into your frontend code. - -### Dev server (runtime) - -To inline environment variables when using `bun ./index.html`, configure the `env` option in your `bunfig.toml`: - -```toml title="bunfig.toml" icon="settings" -[serve.static] -env = "PUBLIC_*" # only inline env vars starting with PUBLIC_ (recommended) -# env = "inline" # inline all environment variables -# env = "disable" # disable env var replacement (default) -``` - - - This only works with literal `process.env.FOO` references, not `import.meta.env` or indirect access like `const env = - process.env; env.FOO`. - -If an environment variable is not set, you may see runtime errors like `ReferenceError: process - is not defined` in the browser. - - - -Then run the dev server: - -```bash terminal icon="terminal" -PUBLIC_API_URL=https://api.example.com bun ./index.html -``` - -### Build for production - -When building static HTML for production, use the `env` option to inline environment variables: - - - - ```bash terminal icon="terminal" - # Inline all environment variables - bun build ./index.html --outdir=dist --env=inline - - # Only inline env vars with a specific prefix (recommended) - bun build ./index.html --outdir=dist --env=PUBLIC_* - ``` - - - - ```ts title="build.ts" icon="/icons/typescript.svg" - // Inline all environment variables - await Bun.build({ - entrypoints: ["./index.html"], - outdir: "./dist", - env: "inline", // [!code highlight] - }); - - // Only inline env vars with a specific prefix (recommended) - await Bun.build({ - entrypoints: ["./index.html"], - outdir: "./dist", - env: "PUBLIC_*", // [!code highlight] - }); - ``` - - - - -### Example - -Given this source file: - -```ts title="app.ts" icon="/icons/typescript.svg" -const apiUrl = process.env.PUBLIC_API_URL; -console.log(`API URL: ${apiUrl}`); -``` - -And running with `PUBLIC_API_URL=https://api.example.com`: - -```bash terminal icon="terminal" -PUBLIC_API_URL=https://api.example.com bun build ./index.html --outdir=dist --env=PUBLIC_* -``` - -The bundled output will contain: - -```js title="dist/app.js" icon="/icons/javascript.svg" -const apiUrl = "https://api.example.com"; -console.log(`API URL: ${apiUrl}`); -``` - -## Echo console logs from browser to terminal - -Bun's dev server supports streaming console logs from the browser to the terminal. - -To enable, pass the `--console` CLI flag. - -```bash terminal icon="terminal" -bun ./index.html --console -``` - -``` -Bun v1.3.3 -ready in 6.62ms -→ http://localhost:3000/ -Press h + Enter to show shortcuts -``` - -Each call to `console.log` or `console.error` will be broadcast to the terminal that started the server. This is useful to see errors from the browser in the same place you run your server. This is also useful for AI agents that watch terminal output. - -Internally, this reuses the existing WebSocket connection from hot module reloading to send the logs. - -## Edit files in the browser - -Bun's frontend dev server has support for Automatic Workspace Folders in Chrome DevTools, which lets you save edits to files in the browser. - -## Keyboard Shortcuts - -While the server is running: - -- `o + Enter` - Open in browser -- `c + Enter` - Clear console -- `q + Enter` (or `Ctrl+C`) - Quit server - -## Build for Production - -When you're ready to deploy, use `bun build` to create optimized production bundles: - - - - ```bash terminal icon="terminal" - bun build ./index.html --minify --outdir=dist - ``` - - - ```ts title="build.ts" icon="/icons/typescript.svg" - await Bun.build({ - entrypoints: ["./index.html"], - outdir: "./dist", - minify: true, - }); - ``` - - - - - Currently, plugins are only supported through `Bun.build`'s API or through `bunfig.toml` with the frontend dev server - - not yet supported in `bun build`'s CLI. - - -### Watch Mode - -You can run `bun build --watch` to watch for changes and rebuild automatically. This works nicely for library development. - -You've never seen a watch mode this fast. - -## Plugin API - -Need more control? Configure the bundler through the JavaScript API and use Bun's builtin `HTMLRewriter` to preprocess HTML. - -```ts title="build.ts" icon="/icons/typescript.svg" -await Bun.build({ - entrypoints: ["./index.html"], - outdir: "./dist", - minify: true, - - plugins: [ - { - // A plugin that makes every HTML tag lowercase - name: "lowercase-html-plugin", - setup({ onLoad }) { - const rewriter = new HTMLRewriter().on("*", { - element(element) { - element.tagName = element.tagName.toLowerCase(); - }, - text(element) { - element.replace(element.text.toLowerCase()); - }, - }); - - onLoad({ filter: /\.html$/ }, async args => { - const html = await Bun.file(args.path).text(); - - return { - // Bun's bundler will scan the HTML for - - -``` - -It will output a new HTML file with the bundled assets: - -```html title="dist/index.html" icon="file-code" - - - - Local image - External image - - - -``` - -Under the hood, it uses [`lol-html`](https://github.com/cloudflare/lol-html) to extract script and link tags as entrypoints, and other assets as external. - - -Currently, the list of selectors is: - -- `audio[src]` -- `iframe[src]` -- `img[src]` -- `img[srcset]` -- `link:not([rel~='stylesheet']):not([rel~='modulepreload']):not([rel~='manifest']):not([rel~='icon']):not([rel~='apple-touch-icon'])[href]` -- `link[as='font'][href], link[type^='font/'][href]` -- `link[as='image'][href]` -- `link[as='style'][href]` -- `link[as='video'][href], link[as='audio'][href]` -- `link[as='worker'][href]` -- `link[rel='icon'][href], link[rel='apple-touch-icon'][href]` -- `link[rel='manifest'][href]` -- `link[rel='stylesheet'][href]` -- `script[src]` -- `source[src]` -- `source[srcset]` -- `video[poster]` -- `video[src]` - - - - - -**HTML Loader Behavior in Different Contexts** - -The `html` loader behaves differently depending on how it's used: - -- Static Build: When you run `bun build ./index.html`, Bun produces a static site with all assets bundled and hashed. -- Runtime: When you run `bun run server.ts` (where `server.ts` imports an HTML file), Bun bundles assets on-the-fly during development, enabling features like hot module replacement. -- Full-stack Build: When you run `bun build --target=bun server.ts` (where `server.ts` imports an HTML file), the import resolves to a manifest object that `Bun.serve` uses to efficiently serve pre-bundled assets in production. - - - ---- - -### `css` - -**CSS loader.** Default for `.css`. - -CSS files can be directly imported. The bundler will parse and bundle CSS files, handling `@import` statements and `url()` references. - -```js -import "./styles.css"; -``` - -During bundling, all imported CSS files are bundled together into a single `.css` file in the output directory. - -```css -.my-class { - background: url("./image.png"); -} -``` - ---- - -### `sh` - -**Bun Shell loader.** Default for `.sh` files. - -This loader is used to parse Bun Shell scripts. It's only supported when starting Bun itself, so it's not available in the bundler or in the runtime. - -```bash -bun run ./script.sh -``` - ---- - -### `file` - -**File loader.** Default for all unrecognized file types. - -The file loader resolves the import as a path/URL to the imported file. It's commonly used for referencing media or font assets. - -```js -// logo.ts -import logo from "./logo.svg"; -console.log(logo); -``` - -In the runtime, Bun checks that the `logo.svg` file exists and converts it to an absolute path to the location of `logo.svg` on disk. - -```bash -bun run logo.ts -# Output: /path/to/project/logo.svg -``` - -In the bundler, things are slightly different. The file is copied into `outdir` as-is, and the import is resolved as a relative path pointing to the copied file. - -```js -// Output -var logo = "./logo.svg"; -console.log(logo); -``` - -If a value is specified for `publicPath`, the import will use value as a prefix to construct an absolute path/URL. - -| Public path | Resolved import | -| ---------------------------- | ---------------------------------- | -| `""` (default) | `/logo.svg` | -| `"/assets"` | `/assets/logo.svg` | -| `"https://cdn.example.com/"` | `https://cdn.example.com/logo.svg` | - - -The location and file name of the copied file is determined by the value of `naming.asset`. - -This loader is copied into the `outdir` as-is. The name of the copied file is determined using the value of `naming.asset`. - - diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/bundler/macros.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/bundler/macros.mdx deleted file mode 100644 index 23dd41c..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/bundler/macros.mdx +++ /dev/null @@ -1,328 +0,0 @@ ---- -title: Macros -description: Run JavaScript functions at bundle-time with Bun macros ---- - -Macros are a mechanism for running JavaScript functions at bundle-time. The value returned from these functions are directly inlined into your bundle. - -As a toy example, consider this simple function that returns a random number. - -```ts title="random.ts" icon="/icons/typescript.svg" -export function random() { - return Math.random(); -} -``` - -This is just a regular function in a regular file, but we can use it as a macro like so: - -```tsx title="cli.tsx" icon="/icons/typescript.svg" -import { random } from "./random.ts" with { type: "macro" }; - -console.log(`Your random number is ${random()}`); -``` - - - Macros are indicated using import attribute syntax. If you haven't seen this syntax before, it's a Stage 3 TC39 - proposal that lets you attach additional metadata to import statements. - - -Now we'll bundle this file with `bun build`. The bundled file will be printed to stdout. - -```bash terminal icon="terminal" -bun build ./cli.tsx -``` - -```js -console.log(`Your random number is ${0.6805550949689833}`); -``` - -As you can see, the source code of the `random` function occurs nowhere in the bundle. Instead, it is executed during bundling and function call (`random()`) is replaced with the result of the function. Since the source code will never be included in the bundle, macros can safely perform privileged operations like reading from a database. - -## When to use macros - -If you have several build scripts for small things where you would otherwise have a one-off build script, bundle-time code execution can be easier to maintain. It lives with the rest of your code, it runs with the rest of the build, it is automatically parallelized, and if it fails, the build fails too. - -If you find yourself running a lot of code at bundle-time though, consider running a server instead. - -## Import attributes - -Bun Macros are import statements annotated using either: - -- `with { type: 'macro' }` — an import attribute, a Stage 3 ECMA Script proposal -- `assert { type: 'macro' }` — an import assertion, an earlier incarnation of import attributes that has now been abandoned (but is already supported by a number of browsers and runtimes) - -## Security considerations - -Macros must explicitly be imported with `{ type: "macro" }` in order to be executed at bundle-time. These imports have no effect if they are not called, unlike regular JavaScript imports which may have side effects. - -You can disable macros entirely by passing the `--no-macros` flag to Bun. It produces a build error like this: - -``` -error: Macros are disabled - -foo(); -^ -./hello.js:3:1 53 -``` - -To reduce the potential attack surface for malicious packages, macros cannot be invoked from inside `node_modules/**/*`. If a package attempts to invoke a macro, you'll see an error like this: - -``` -error: For security reasons, macros cannot be run from node_modules. - -beEvil(); -^ -node_modules/evil/index.js:3:1 50 -``` - -Your application code can still import macros from `node_modules` and invoke them. - -```ts title="cli.tsx" icon="/icons/typescript.svg" -import { macro } from "some-package" with { type: "macro" }; - -macro(); -``` - -## Export condition "macro" - -When shipping a library containing a macro to npm or another package registry, use the `"macro"` export condition to provide a special version of your package exclusively for the macro environment. - -```json title="package.json" icon="file-json" -{ - "name": "my-package", - "exports": { - "import": "./index.js", - "require": "./index.js", - "default": "./index.js", - "macro": "./index.macro.js" - } -} -``` - -With this configuration, users can consume your package at runtime or at bundle-time using the same import specifier: - -```ts title="index.ts" icon="/icons/typescript.svg" -import pkg from "my-package"; // runtime import -import { macro } from "my-package" with { type: "macro" }; // macro import -``` - -The first import will resolve to `./node_modules/my-package/index.js`, while the second will be resolved by Bun's bundler to `./node_modules/my-package/index.macro.js`. - -## Execution - -When Bun's transpiler sees a macro import, it calls the function inside the transpiler using Bun's JavaScript runtime and converts the return value from JavaScript into an AST node. These JavaScript functions are called at bundle-time, not runtime. - -Macros are executed synchronously in the transpiler during the visiting phase—before plugins and before the transpiler generates the AST. They are executed in the order they are imported. The transpiler will wait for the macro to finish executing before continuing. The transpiler will also await any Promise returned by a macro. - -Bun's bundler is multi-threaded. As such, macros execute in parallel inside of multiple spawned JavaScript "workers". - -## Dead code elimination - -The bundler performs dead code elimination after running and inlining macros. So given the following macro: - -```ts title="returnFalse.ts" icon="/icons/typescript.svg" -export function returnFalse() { - return false; -} -``` - -...then bundling the following file will produce an empty bundle, provided that the minify syntax option is enabled. - -```ts title="index.ts" icon="/icons/typescript.svg" -import { returnFalse } from "./returnFalse.ts" with { type: "macro" }; - -if (returnFalse()) { - console.log("This code is eliminated"); -} -``` - -## Serializability - -Bun's transpiler needs to be able to serialize the result of the macro so it can be inlined into the AST. All JSON-compatible data structures are supported: - -```ts title="macro.ts" icon="/icons/typescript.svg" -export function getObject() { - return { - foo: "bar", - baz: 123, - array: [1, 2, { nested: "value" }], - }; -} -``` - -Macros can be async, or return Promise instances. Bun's transpiler will automatically await the Promise and inline the result. - -```ts title="macro.ts" icon="/icons/typescript.svg" -export async function getText() { - return "async value"; -} -``` - -The transpiler implements special logic for serializing common data formats like `Response`, `Blob`, `TypedArray`. - -- **TypedArray**: Resolves to a base64-encoded string. -- **Response**: Bun will read the `Content-Type` and serialize accordingly; for instance, a Response with type `application/json` will be automatically parsed into an object and `text/plain` will be inlined as a string. Responses with an unrecognized or undefined type will be base-64 encoded. -- **Blob**: As with Response, the serialization depends on the `type` property. - -The result of `fetch` is `Promise`, so it can be directly returned. - -```ts title="macro.ts" icon="/icons/typescript.svg" -export function getObject() { - return fetch("https://bun.com"); -} -``` - -Functions and instances of most classes (except those mentioned above) are not serializable. - -```ts title="macro.ts" icon="/icons/typescript.svg" -export function getText(url: string) { - // this doesn't work! - return () => {}; -} -``` - -## Arguments - -Macros can accept inputs, but only in limited cases. The value must be statically known. For example, the following is not allowed: - -```ts title="index.ts" icon="/icons/typescript.svg" -import { getText } from "./getText.ts" with { type: "macro" }; - -export function howLong() { - // the value of `foo` cannot be statically known - const foo = Math.random() ? "foo" : "bar"; - - const text = getText(`https://example.com/${foo}`); - console.log("The page is ", text.length, " characters long"); -} -``` - -However, if the value of `foo` is known at bundle-time (say, if it's a constant or the result of another macro) then it's allowed: - -```ts title="index.ts" icon="/icons/typescript.svg" -import { getText } from "./getText.ts" with { type: "macro" }; -import { getFoo } from "./getFoo.ts" with { type: "macro" }; - -export function howLong() { - // this works because getFoo() is statically known - const foo = getFoo(); - const text = getText(`https://example.com/${foo}`); - console.log("The page is", text.length, "characters long"); -} -``` - -This outputs: - -```js -function howLong() { - console.log("The page is", 1322, "characters long"); -} -export { howLong }; -``` - -## Examples - -### Embed latest git commit hash - -```ts title="getGitCommitHash.ts" icon="/icons/typescript.svg" -export function getGitCommitHash() { - const { stdout } = Bun.spawnSync({ - cmd: ["git", "rev-parse", "HEAD"], - stdout: "pipe", - }); - - return stdout.toString(); -} -``` - -When we build it, the `getGitCommitHash` is replaced with the result of calling the function: - - - -```ts input -import { getGitCommitHash } from "./getGitCommitHash.ts" with { type: "macro" }; - -console.log(`The current Git commit hash is ${getGitCommitHash()}`); -``` - -```ts output -console.log(`The current Git commit hash is 3ee3259104e4507cf62c160f0ff5357ec4c7a7f8`); -``` - - - - - You're probably thinking "Why not just use `process.env.GIT_COMMIT_HASH`?" Well, you can do that too. But can you do - this with an environment variable? - - -### Make fetch() requests at bundle-time - -In this example, we make an outgoing HTTP request using `fetch()`, parse the HTML response using `HTMLRewriter`, and return an object containing the title and meta tags–all at bundle-time. - -```ts title="meta.ts" icon="/icons/typescript.svg" -export async function extractMetaTags(url: string) { - const response = await fetch(url); - const meta = { - title: "", - }; - new HTMLRewriter() - .on("title", { - text(element) { - meta.title += element.text; - }, - }) - .on("meta", { - element(element) { - const name = - element.getAttribute("name") || element.getAttribute("property") || element.getAttribute("itemprop"); - - if (name) meta[name] = element.getAttribute("content"); - }, - }) - .transform(response); - - return meta; -} -``` - -The `extractMetaTags` function is erased at bundle-time and replaced with the result of the function call. This means that the fetch request happens at bundle-time, and the result is embedded in the bundle. Also, the branch throwing the error is eliminated since it's unreachable. - - - -```jsx input -import { extractMetaTags } from "./meta.ts" with { type: "macro" }; - -export const Head = () => { - const headTags = extractMetaTags("https://example.com"); - - if (headTags.title !== "Example Domain") { - throw new Error("Expected title to be 'Example Domain'"); - } - - return ( - - {headTags.title} - - - ); -}; -``` - -```jsx output -export const Head = () => { - const headTags = { - title: "Example Domain", - viewport: "width=device-width, initial-scale=1", - }; - - return ( - - {headTags.title} - - - ); -}; -``` - - diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/bundler/minifier.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/bundler/minifier.mdx deleted file mode 100644 index 2cf4866..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/bundler/minifier.mdx +++ /dev/null @@ -1,1286 +0,0 @@ ---- -name: Minifier -description: Reduce bundle sizes with Bun's JavaScript and TypeScript minifier ---- - -Bun includes a fast JavaScript and TypeScript minifier that can reduce bundle sizes by 80% or more (depending on the codebase) and make output code run faster. The minifier performs dozens of optimizations including constant folding, dead code elimination, and syntax transformations. Unlike other minifiers, Bun's minifier makes `bun build` run faster since there's less code to print. - -## CLI Usage - -### Enable all minification - -Use the `--minify` flag to enable all minification modes: - -```bash -bun build ./index.ts --minify --outfile=out.js -``` - -The `--minify` flag automatically enables: - -- Whitespace minification -- Syntax minification -- Identifier minification - -### Production mode - -The `--production` flag automatically enables minification: - -```bash -bun build ./index.ts --production --outfile=out.js -``` - -The `--production` flag also: - -- Sets `process.env.NODE_ENV` to `production` -- Enables the production-mode JSX import & transform - -### Granular control - -You can enable specific minification modes individually: - -```bash -# Only remove whitespace -bun build ./index.ts --minify-whitespace --outfile=out.js - -# Only minify syntax -bun build ./index.ts --minify-syntax --outfile=out.js - -# Only minify identifiers -bun build ./index.ts --minify-identifiers --outfile=out.js - -# Combine specific modes -bun build ./index.ts --minify-whitespace --minify-syntax --outfile=out.js -``` - -## JavaScript API - -When using Bun's bundler programmatically, configure minification through the `minify` option: - -```ts -await Bun.build({ - entrypoints: ["./index.ts"], - outdir: "./out", - minify: true, // Enable all minification modes -}); -``` - -For granular control, pass an object: - -```ts -await Bun.build({ - entrypoints: ["./index.ts"], - outdir: "./out", - minify: { - whitespace: true, - syntax: true, - identifiers: true, - }, -}); -``` - -## Minification Modes - -Bun's minifier has three independent modes that can be enabled separately or combined. - -### Whitespace minification (`--minify-whitespace`) - -Removes all unnecessary whitespace, newlines, and formatting from the output. - -### Syntax minification (`--minify-syntax`) - -Rewrites JavaScript syntax to shorter equivalent forms and performs constant folding, dead code elimination, and other optimizations. - -### Identifier minification (`--minify-identifiers`) - -Renames local variables and function names to shorter identifiers using frequency-based optimization. - -## All Transformations - -### Boolean literal shortening - -**Mode:** `--minify-syntax` - -Converts boolean literals to shorter expressions. - -```ts Input -true -false -``` - -```js Output -!0 -!1 -``` - -### Boolean algebra optimizations - -**Mode:** `--minify-syntax` - -Simplifies boolean expressions using logical rules. - -```ts Input -!!x -x === true -x && true -x || false -!true -!false -``` - -```js Output -x -x -x -x -!1 -!0 -``` - -### Undefined shortening - -**Mode:** `--minify-syntax` - -Replaces `undefined` with shorter equivalent. - -```ts Input -undefined -let x = undefined; -``` - -```js Output -void 0 -let x=void 0; -``` - -### Undefined equality optimization - -**Mode:** `--minify-syntax` - -Optimizes loose equality checks with undefined. - -```ts Input -x == undefined -x != undefined -``` - -```js Output -x == null -x != null -``` - -### Infinity shortening - -**Mode:** `--minify-syntax` - -Converts Infinity to mathematical expressions. - -```ts Input -Infinity --Infinity -``` - -```js Output -1/0 --1/0 -``` - -### Typeof optimizations - -**Mode:** `--minify-syntax` - -Optimizes typeof comparisons and evaluates constant typeof expressions. - -```ts Input -typeof x === 'undefined' -typeof x !== 'undefined' -typeof require -typeof null -typeof true -typeof 123 -typeof "str" -typeof 123n -``` - -```js Output -typeof x>'u' -typeof x<'u' -"function" -"object" -"boolean" -"number" -"string" -"bigint" -``` - -### Number formatting - -**Mode:** `--minify-syntax` - -Formats numbers in the most compact representation. - -```ts Input -10000 -100000 -1000000 -1.0 --42.0 -``` - -```js Output -1e4 -1e5 -1e6 -1 --42 -``` - -### Arithmetic constant folding - -**Mode:** `--minify-syntax` - -Evaluates arithmetic operations at compile time. - -```ts Input -1 + 2 -10 - 5 -3 * 4 -10 / 2 -10 % 3 -2 ** 3 -``` - -```js Output -3 -5 -12 -5 -1 -8 -``` - -### Bitwise constant folding - -**Mode:** `--minify-syntax` - -Evaluates bitwise operations at compile time. - -```ts Input -5 & 3 -5 | 3 -5 ^ 3 -8 << 2 -32 >> 2 -~5 -``` - -```js Output -1 -7 -6 -32 -8 --6 -``` - -### String concatenation - -**Mode:** `--minify-syntax` - -Combines string literals at compile time. - -```ts Input -"a" + "b" -"x" + 123 -"foo" + "bar" + "baz" -``` - -```js Output -"ab" -"x123" -"foobarbaz" -``` - -### String indexing - -**Mode:** `--minify-syntax` - -Evaluates string character access at compile time. - -```ts Input -"foo"[2] -"hello"[0] -``` - -```js Output -"o" -"h" -``` - -### Template literal folding - -**Mode:** `--minify-syntax` - -Evaluates template literals with constant expressions. - -```ts Input -`a${123}b` -`result: ${5 + 10}` -``` - -```js Output -"a123b" -"result: 15" -``` - -### Template literal to string conversion - -**Mode:** `--minify-syntax` - -Converts simple template literals to regular strings. - -```ts Input -`Hello World` -`Line 1 -Line 2` -``` - -```js Output -"Hello World" -"Line 1\nLine 2" -``` - -### String quote optimization - -**Mode:** `--minify-syntax` - -Chooses the optimal quote character to minimize escapes. - -```ts Input -"It's a string" -'He said "hello"' -`Simple string` -``` - -```js Output -"It's a string" -'He said "hello"' -"Simple string" -``` - -### Array spread inlining - -**Mode:** `--minify-syntax` - -Inlines array spread operations with constant arrays. - -```ts Input -[1, ...[2, 3], 4] -[...[a, b]] -``` - -```js Output -[1,2,3,4] -[a,b] -``` - -### Array indexing - -**Mode:** `--minify-syntax` - -Evaluates constant array access at compile time. - -```ts Input -[x][0] -['a', 'b', 'c'][1] -['a', , 'c'][1] -``` - -```js Output -x -'b' -void 0 -``` - -### Property access optimization - -**Mode:** `--minify-syntax` - -Converts bracket notation to dot notation when possible. - -```ts Input -obj["property"] -obj["validName"] -obj["123"] -obj["invalid-name"] -``` - -```js Output -obj.property -obj.validName -obj["123"] -obj["invalid-name"] -``` - -### Comparison folding - -**Mode:** `--minify-syntax` - -Evaluates constant comparisons at compile time. - -```ts Input -3 < 5 -5 > 3 -3 <= 3 -5 >= 6 -"a" < "b" -``` - -```js Output -!0 -!0 -!0 -!1 -!0 -``` - -### Logical operation folding - -**Mode:** `--minify-syntax` - -Simplifies logical operations with constant values. - -```ts Input -true && x -false && x -true || x -false || x -``` - -```js Output -x -!1 -!0 -x -``` - -### Nullish coalescing folding - -**Mode:** `--minify-syntax` - -Evaluates nullish coalescing with known values. - -```ts Input -null ?? x -undefined ?? x -42 ?? x -``` - -```js Output -x -x -42 -``` - -### Comma expression simplification - -**Mode:** `--minify-syntax` - -Removes side-effect-free expressions from comma sequences. - -```ts Input -(0, x) -(123, "str", x) -``` - -```js Output -x -x -``` - -### Ternary conditional folding - -**Mode:** `--minify-syntax` - -Evaluates conditional expressions with constant conditions. - -```ts Input -true ? a : b -false ? a : b -x ? true : false -x ? false : true -``` - -```js Output -a -b -x ? !0 : !1 -x ? !1 : !0 -``` - -### Unary expression folding - -**Mode:** `--minify-syntax` - -Simplifies unary operations. - -```ts Input -+123 -+"123" --(-x) -~~x -!!x -``` - -```js Output -123 -123 -123 -123 -x -~~x -!!x -x -``` - -### Double negation removal - -**Mode:** `--minify-syntax` - -Removes unnecessary double negations. - -```ts Input -!!x -!!!x -``` - -```js Output -x -!x -``` - -### If statement optimization - -**Mode:** `--minify-syntax` - -Optimizes if statements with constant conditions. - -```ts Input -if (true) x; -if (false) x; -if (x) { a; } -if (x) {} else y; -``` - -```js Output -x; -// removed -if(x)a; -if(!x)y; -``` - -### Dead code elimination - -**Mode:** `--minify-syntax` - -Removes unreachable code and code without side effects. - -```ts Input -if (false) { - unreachable(); -} -function foo() { - return x; - deadCode(); -} -``` - -```js Output -function foo(){return x} -``` - -### Unreachable branch removal - -**Mode:** `--minify-syntax` - -Removes branches that can never execute. - -```ts Input -while (false) { - neverRuns(); -} -``` - -```js Output -// removed entirely -``` - -### Empty block removal - -**Mode:** `--minify-syntax` - -Removes empty blocks and unnecessary braces. - -```ts Input -{ } -if (x) { } -``` - -```js Output -; -// removed -``` - -### Single statement block unwrapping - -**Mode:** `--minify-syntax` - -Removes unnecessary braces around single statements. - -```ts Input -if (condition) { - doSomething(); -} -``` - -```js Output -if(condition)doSomething(); -``` - -### TypeScript enum inlining - -**Mode:** `--minify-syntax` - -Inlines TypeScript enum values at compile time. - -```ts Input -enum Color { Red, Green, Blue } -const x = Color.Red; -``` - -```js Output -const x=0; -``` - -### Pure annotation support - -**Mode:** Always active - -Respects `/*@__PURE__*/` annotations for tree shaking. - -```ts Input -const x = /*@__PURE__*/ expensive(); -// If x is unused... -``` - -```js Output -// removed entirely -``` - -### Identifier renaming - -**Mode:** `--minify-identifiers` - -Renames local variables to shorter names based on usage frequency. - -```ts Input -function calculateSum(firstNumber, secondNumber) { - const result = firstNumber + secondNumber; - return result; -} -``` - -```js Output -function a(b,c){const d=b+c;return d} -``` - -**Naming strategy:** - -- Most frequently used identifiers get the shortest names (a, b, c...) -- Single letters: a-z (26 names) -- Double letters: aa-zz (676 names) -- Triple letters and beyond as needed - -**Preserved identifiers:** - -- JavaScript keywords and reserved words -- Global identifiers -- Named exports (to maintain API) -- CommonJS names: `exports`, `module` - -### Whitespace removal - -**Mode:** `--minify-whitespace` - -Removes all unnecessary whitespace. - -```ts Input -function add(a, b) { - return a + b; -} -let x = 10; -``` - -```js Output -function add(a,b){return a+b;}let x=10; -``` - -### Semicolon optimization - -**Mode:** `--minify-whitespace` - -Inserts semicolons only when necessary. - -```ts Input -let a = 1; -let b = 2; -return a + b; -``` - -```js Output -let a=1;let b=2;return a+b -``` - -### Operator spacing removal - -**Mode:** `--minify-whitespace` - -Removes spaces around operators. - -```ts Input -a + b -x = y * z -foo && bar || baz -``` - -```js Output -a+b -x=y*z -foo&&bar||baz -``` - -### Comment removal - -**Mode:** `--minify-whitespace` - -Removes comments except important license comments. - -```ts Input -// This comment is removed -/* So is this */ -/*! But this license comment is kept */ -function test() { /* inline comment */ } -``` - -```js Output -/*! But this license comment is kept */ -function test(){} -``` - -### Object and array formatting - -**Mode:** `--minify-whitespace` - -Removes whitespace in object and array literals. - -```ts Input -const obj = { - name: "John", - age: 30 -}; -const arr = [1, 2, 3]; -``` - -```js Output -const obj={name:"John",age:30};const arr=[1,2,3]; -``` - -### Control flow formatting - -**Mode:** `--minify-whitespace` - -Removes whitespace in control structures. - -```ts Input -if (condition) { - doSomething(); -} -for (let i = 0; i < 10; i++) { - console.log(i); -} -``` - -```js Output -if(condition)doSomething();for(let i=0;i<10;i++)console.log(i); -``` - -### Function formatting - -**Mode:** `--minify-whitespace` - -Removes whitespace in function declarations. - -```ts Input -function myFunction(param1, param2) { - return param1 + param2; -} -const arrow = (a, b) => a + b; -``` - -```js Output -function myFunction(a,b){return a+b}const arrow=(a,b)=>a+b; -``` - -### Parentheses minimization - -**Mode:** Always active - -Only adds parentheses when necessary for operator precedence. - -```ts Input -(a + b) * c -a + (b * c) -((x)) -``` - -```js Output -(a+b)*c -a+b*c -x -``` - -### Property mangling - -**Mode:** `--minify-identifiers` (with configuration) - -Renames object properties to shorter names when configured. - -```ts Input -obj.longPropertyName -``` - -```js Output (with property mangling enabled) -obj.a -``` - -### Template literal value folding - -**Mode:** `--minify-syntax` - -Converts non-string interpolated values to strings and folds them into the template. - -```ts Input -`hello ${123}` -`value: ${true}` -`result: ${null}` -`status: ${undefined}` -`big: ${10n}` -``` - -```js Output -"hello 123" -"value: true" -"result: null" -"status: undefined" -"big: 10" -``` - -### String length constant folding - -**Mode:** `--minify-syntax` - -Evaluates `.length` property on string literals at compile time. - -```ts Input -"hello world".length -"test".length -``` - -```js Output -11 -4 -``` - -### Constructor call simplification - -**Mode:** `--minify-syntax` - -Simplifies constructor calls for built-in types. - -```ts Input -new Object() -new Object(null) -new Object({a: 1}) -new Array() -new Array(x, y) -``` - -```js Output -{} -{} -{a:1} -[] -[x,y] -``` - -### Single property object inlining - -**Mode:** `--minify-syntax` - -Inlines property access for objects with a single property. - -```ts Input -({fn: () => console.log('hi')}).fn() -``` - -```js Output -(() => console.log('hi'))() -``` - -### String charCodeAt constant folding - -**Mode:** Always active - -Evaluates `charCodeAt()` on string literals for ASCII characters. - -```ts Input -"hello".charCodeAt(1) -"A".charCodeAt(0) -``` - -```js Output -101 -65 -``` - -### Void 0 equality to null equality - -**Mode:** `--minify-syntax` - -Converts loose equality checks with `void 0` to `null` since they're equivalent. - -```ts Input -x == void 0 -x != void 0 -``` - -```js Output -x == null -x != null -``` - -### Negation operator optimization - -**Mode:** `--minify-syntax` - -Moves negation operator through comma expressions. - -```ts Input --(a, b) --(x, y, z) -``` - -```js Output -a,-b -x,y,-z -``` - -### Import.meta property inlining - -**Mode:** Bundle mode - -Inlines `import.meta` properties at build time when values are known. - -```ts Input -import.meta.dir -import.meta.file -import.meta.path -import.meta.url -``` - -```js Output -"/path/to/directory" -"filename.js" -"/full/path/to/file.js" -"file:///full/path/to/file.js" -``` - -### Variable declaration merging - -**Mode:** `--minify-syntax` - -Merges adjacent variable declarations of the same type. - -```ts Input -let a = 1; -let b = 2; -const c = 3; -const d = 4; -``` - -```js Output -let a=1,b=2; -const c=3,d=4; -``` - -### Expression statement merging - -**Mode:** `--minify-syntax` - -Merges adjacent expression statements using comma operator. - -```ts Input -console.log(1); -console.log(2); -console.log(3); -``` - -```js Output -console.log(1),console.log(2),console.log(3); -``` - -### Return statement merging - -**Mode:** `--minify-syntax` - -Merges expressions before return with comma operator. - -```ts Input -console.log(x); -return y; -``` - -```js Output -return console.log(x),y; -``` - -### Throw statement merging - -**Mode:** `--minify-syntax` - -Merges expressions before throw with comma operator. - -```ts Input -console.log(x); -throw new Error(); -``` - -```js Output -throw(console.log(x),new Error()); -``` - -### TypeScript enum cross-module inlining - -**Mode:** `--minify-syntax` (bundle mode) - -Inlines enum values across module boundaries. - -```ts Input -// lib.ts -export enum Color { Red, Green, Blue } - -// Input (main.ts) -import { Color } from './lib'; -const x = Color.Red; -``` - -```js Output -const x=0; -``` - -### Computed property enum inlining - -**Mode:** `--minify-syntax` - -Inlines enum values used as computed object properties. - -```ts Input -enum Keys { FOO = 'foo' } -const obj = { [Keys.FOO]: value } -``` - -```js Output -const obj={foo:value} -``` - -### String number to numeric index - -**Mode:** `--minify-syntax` - -Converts string numeric property access to numeric index. - -```ts Input -obj["0"] -arr["5"] -``` - -```js Output -obj[0] -arr[5] -``` - -### Arrow function body shortening - -**Mode:** Always active - -Uses expression body syntax when an arrow function only returns a value. - -```ts Input -() => { return x; } -(a) => { return a + 1; } -``` - -```js Output -() => x -a => a + 1 -``` - -### Object property shorthand - -**Mode:** Always active - -Uses shorthand syntax when property name and value identifier match. - -```ts Input -{ x: x, y: y } -{ name: name, age: age } -``` - -```js Output -{ x, y } -{ name, age } -``` - -### Method shorthand - -**Mode:** Always active - -Uses method shorthand syntax in object literals. - -```ts Input -{ - foo: function() {}, - bar: async function() {} -} -``` - -```js Output -{ - foo() {}, - async bar() {} -} -``` - -### Drop debugger statements - -**Mode:** `--drop=debugger` - -Removes `debugger` statements from code. - -```ts Input -function test() { - debugger; - return x; -} -``` - -```js Output -function test(){return x} -``` - -### Drop console calls - -**Mode:** `--drop=console` - -Removes all `console.*` method calls from code. - -```ts Input -console.log("debug"); -console.warn("warning"); -x = console.error("error"); -``` - -```js Output -void 0; -void 0; -x=void 0; -``` - -### Drop custom function calls - -**Mode:** `--drop=` - -Removes calls to specified global functions or methods. - -```ts Input -assert(condition); -obj.assert(test); -``` - -```js Output with --drop=assert -void 0; -void 0; -``` - -## Keep Names - -When minifying identifiers, you may want to preserve original function and class names for debugging purposes. Use the `--keep-names` flag: - -```bash -bun build ./index.ts --minify --keep-names --outfile=out.js -``` - -Or in the JavaScript API: - -```ts -await Bun.build({ - entrypoints: ["./index.ts"], - outdir: "./out", - minify: { - identifiers: true, - keepNames: true, - }, -}); -``` - -This preserves the `.name` property on functions and classes while still minifying the actual identifier names in the code. - -## Combined Example - -Using all three minification modes together: - -```ts input.ts (158 bytes) -const myVariable = 42; - -const myFunction = () => { - const isValid = true; - const result = undefined; - return isValid ? myVariable : result; -}; - -const output = myFunction(); -``` - -```js output.js -// Output with --minify (49 bytes, 69% reduction) -const a=42,b=()=>{const c=!0,d=void 0;return c?a:d},e=b(); -``` - -## When to Use Minification - -**Use `--minify` for:** - -- Production bundles -- Reducing CDN bandwidth costs -- Improving page load times - -**Use individual modes for:** - -- **`--minify-whitespace`:** Quick size reduction without semantic changes -- **`--minify-syntax`:** Smaller output while keeping readable identifiers for debugging -- **`--minify-identifiers`:** Maximum size reduction (combine with `--keep-names` for better stack traces) - -**Avoid minification for:** - -- Development builds (harder to debug) -- When you need readable error messages -- Libraries where consumers may read the source diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/bundler/plugins.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/bundler/plugins.mdx deleted file mode 100644 index 58908e3..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/bundler/plugins.mdx +++ /dev/null @@ -1,425 +0,0 @@ ---- -title: Plugins -description: Universal plugin API for extending Bun's runtime and bundler ---- - -Bun provides a universal plugin API that can be used to extend both the runtime and bundler. - -Plugins intercept imports and perform custom loading logic: reading files, transpiling code, etc. They can be used to add support for additional file types, like `.scss` or `.yaml`. In the context of Bun's bundler, plugins can be used to implement framework-level features like CSS extraction, macros, and client-server code co-location. - -## Lifecycle hooks - -Plugins can register callbacks to be run at various points in the lifecycle of a bundle: - -- `onStart()`: Run once the bundler has started a bundle -- `onResolve()`: Run before a module is resolved -- `onLoad()`: Run before a module is loaded -- `onBeforeParse()`: Run zero-copy native addons in the parser thread before a file is parsed - -## Reference - -A rough overview of the types (please refer to Bun's `bun.d.ts` for the full type definitions): - -```ts title="bun.d.ts" icon="/icons/typescript.svg" -type PluginBuilder = { - onStart(callback: () => void): void; - onResolve: ( - args: { filter: RegExp; namespace?: string }, - callback: (args: { path: string; importer: string }) => { - path: string; - namespace?: string; - } | void, - ) => void; - onLoad: ( - args: { filter: RegExp; namespace?: string }, - defer: () => Promise, - callback: (args: { path: string }) => { - loader?: Loader; - contents?: string; - exports?: Record; - }, - ) => void; - config: BuildConfig; -}; - -type Loader = - | "js" - | "jsx" - | "ts" - | "tsx" - | "json" - | "jsonc" - | "toml" - | "yaml" - | "file" - | "napi" - | "wasm" - | "text" - | "css" - | "html"; -``` - -## Usage - -A plugin is defined as simple JavaScript object containing a `name` property and a `setup` function. - -```ts title="myPlugin.ts" icon="/icons/typescript.svg" -import type { BunPlugin } from "bun"; - -const myPlugin: BunPlugin = { - name: "Custom loader", - setup(build) { - // implementation - }, -}; -``` - -This plugin can be passed into the `plugins` array when calling `Bun.build`. - -```ts title="index.ts" icon="/icons/typescript.svg" -await Bun.build({ - entrypoints: ["./app.ts"], - outdir: "./out", - plugins: [myPlugin], -}); -``` - -## Plugin lifecycle - -### Namespaces - -`onLoad` and `onResolve` accept an optional `namespace` string. What is a namespace? - -Every module has a namespace. Namespaces are used to prefix the import in transpiled code; for instance, a loader with a `filter: /\.yaml$/` and `namespace: "yaml:"` will transform an import from `./myfile.yaml` into `yaml:./myfile.yaml`. - -The default namespace is `"file"` and it is not necessary to specify it, for instance: `import myModule from "./my-module.ts"` is the same as `import myModule from "file:./my-module.ts"`. - -Other common namespaces are: - -- `"bun"`: for Bun-specific modules (e.g. `"bun:test"`, `"bun:sqlite"`) -- `"node"`: for Node.js modules (e.g. `"node:fs"`, `"node:path"`) - -### onStart - -```ts -onStart(callback: () => void): Promise | void; -``` - -Registers a callback to be run when the bundler starts a new bundle. - -```ts title="index.ts" icon="/icons/typescript.svg" -import { plugin } from "bun"; - -plugin({ - name: "onStart example", - - setup(build) { - build.onStart(() => { - console.log("Bundle started!"); - }); - }, -}); -``` - -The callback can return a Promise. After the bundle process has initialized, the bundler waits until all `onStart()` callbacks have completed before continuing. - -For example: - -```ts title="index.ts" icon="/icons/typescript.svg" -const result = await Bun.build({ - entrypoints: ["./app.ts"], - outdir: "./dist", - sourcemap: "external", - plugins: [ - { - name: "Sleep for 10 seconds", - setup(build) { - build.onStart(async () => { - await Bun.sleep(10_000); - }); - }, - }, - { - name: "Log bundle time to a file", - setup(build) { - build.onStart(async () => { - const now = Date.now(); - await Bun.$`echo ${now} > bundle-time.txt`; - }); - }, - }, - ], -}); -``` - -In the above example, Bun will wait until the first `onStart()` (sleeping for 10 seconds) has completed, as well as the second `onStart()` (writing the bundle time to a file). - - - `onStart()` callbacks (like every other lifecycle callback) do not have the ability to modify the `build.config` - object. If you want to mutate `build.config`, you must do so directly in the `setup()` function. - - -### onResolve - -```ts -onResolve( - args: { filter: RegExp; namespace?: string }, - callback: (args: { path: string; importer: string }) => { - path: string; - namespace?: string; - } | void, -): void; -``` - -To bundle your project, Bun walks down the dependency tree of all modules in your project. For each imported module, Bun actually has to find and read that module. The "finding" part is known as "resolving" a module. - -The `onResolve()` plugin lifecycle callback allows you to configure how a module is resolved. - -The first argument to `onResolve()` is an object with a `filter` and `namespace` property. The `filter` is a regular expression which is run on the import string. Effectively, these allow you to filter which modules your custom resolution logic will apply to. - -The second argument to `onResolve()` is a callback which is run for each module import Bun finds that matches the filter and namespace defined in the first argument. - -The callback receives as input the path to the matching module. The callback can return a new path for the module. Bun will read the contents of the new path and parse it as a module. - -For example, redirecting all imports to `images/` to `./public/images/`: - -```ts title="index.ts" icon="/icons/typescript.svg" -import { plugin } from "bun"; - -plugin({ - name: "onResolve example", - setup(build) { - build.onResolve({ filter: /.*/, namespace: "file" }, args => { - if (args.path.startsWith("images/")) { - return { - path: args.path.replace("images/", "./public/images/"), - }; - } - }); - }, -}); -``` - -### onLoad - -```ts -onLoad( - args: { filter: RegExp; namespace?: string }, - defer: () => Promise, - callback: (args: { path: string, importer: string, namespace: string, kind: ImportKind }) => { - loader?: Loader; - contents?: string; - exports?: Record; - }, -): void; -``` - -After Bun's bundler has resolved a module, it needs to read the contents of the module and parse it. - -The `onLoad()` plugin lifecycle callback allows you to modify the contents of a module before it is read and parsed by Bun. - -Like `onResolve()`, the first argument to `onLoad()` allows you to filter which modules this invocation of `onLoad()` will apply to. - -The second argument to `onLoad()` is a callback which is run for each matching module before Bun loads the contents of the module into memory. - -This callback receives as input the path to the matching module, the importer of the module (the module that imported the module), the namespace of the module, and the kind of the module. - -The callback can return a new `contents` string for the module as well as a new `loader`. - -For example: - -```ts title="index.ts" icon="/icons/typescript.svg" -import { plugin } from "bun"; - -const envPlugin: BunPlugin = { - name: "env plugin", - setup(build) { - build.onLoad({ filter: /env/, namespace: "file" }, args => { - return { - contents: `export default ${JSON.stringify(process.env)}`, - loader: "js", - }; - }); - }, -}); - -Bun.build({ - entrypoints: ["./app.ts"], - outdir: "./dist", - plugins: [envPlugin], -}); - -// import env from "env" -// env.FOO === "bar" -``` - -This plugin will transform all imports of the form `import env from "env"` into a JavaScript module that exports the current environment variables. - -#### .defer() - -One of the arguments passed to the `onLoad` callback is a `defer` function. This function returns a Promise that is resolved when all other modules have been loaded. - -This allows you to delay execution of the `onLoad` callback until all other modules have been loaded. - -This is useful for returning contents of a module that depends on other modules. - - - -```ts title="index.ts" icon="/icons/typescript.svg" -import { plugin } from "bun"; - -plugin({ - name: "track imports", - setup(build) { - const transpiler = new Bun.Transpiler(); - - let trackedImports: Record = {}; - - // Each module that goes through this onLoad callback - // will record its imports in `trackedImports` - build.onLoad({ filter: /\.ts/ }, async ({ path }) => { - const contents = await Bun.file(path).arrayBuffer(); - - const imports = transpiler.scanImports(contents); - - for (const i of imports) { - trackedImports[i.path] = (trackedImports[i.path] || 0) + 1; - } - - return undefined; - }); - - build.onLoad({ filter: /stats\.json/ }, async ({ defer }) => { - // Wait for all files to be loaded, ensuring - // that every file goes through the above `onLoad()` function - // and their imports tracked - await defer(); - - // Emit JSON containing the stats of each import - return { - contents: `export default ${JSON.stringify(trackedImports)}`, - loader: "json", - }; - }); - }, -}); -``` - - - - - The `.defer()` function currently has the limitation that it can only be called once per `onLoad` callback. - - -## Native plugins - -One of the reasons why Bun's bundler is so fast is that it is written in native code and leverages multi-threading to load and parse modules in parallel. - -However, one limitation of plugins written in JavaScript is that JavaScript itself is single-threaded. - -Native plugins are written as NAPI modules and can be run on multiple threads. This allows native plugins to run much faster than JavaScript plugins. - -In addition, native plugins can skip unnecessary work such as the UTF-8 -> UTF-16 conversion needed to pass strings to JavaScript. - -These are the following lifecycle hooks which are available to native plugins: - -- `onBeforeParse()`: Called on any thread before a file is parsed by Bun's bundler. - -Native plugins are NAPI modules which expose lifecycle hooks as C ABI functions. - -To create a native plugin, you must export a C ABI function which matches the signature of the native lifecycle hook you want to implement. - -### Creating a native plugin in Rust - -Native plugins are NAPI modules which expose lifecycle hooks as C ABI functions. - -To create a native plugin, you must export a C ABI function which matches the signature of the native lifecycle hook you want to implement. - -```bash terminal icon="terminal" -bun add -g @napi-rs/cli -napi new -``` - -Then install this crate: - -```bash terminal icon="terminal" -cargo add bun-native-plugin -``` - -Now, inside the `lib.rs` file, we'll use the `bun_native_plugin::bun` proc macro to define a function which will implement our native plugin. - -Here's an example implementing the `onBeforeParse` hook: - -```rust title="lib.rs" icon="/icons/rust.svg" -use bun_native_plugin::{define_bun_plugin, OnBeforeParse, bun, Result, anyhow, BunLoader}; -use napi_derive::napi; - -/// Define the plugin and its name -define_bun_plugin!("replace-foo-with-bar"); - -/// Here we'll implement `onBeforeParse` with code that replaces all occurrences of -/// `foo` with `bar`. -/// -/// We use the #[bun] macro to generate some of the boilerplate code. -/// -/// The argument of the function (`handle: &mut OnBeforeParse`) tells -/// the macro that this function implements the `onBeforeParse` hook. -#[bun] -pub fn replace_foo_with_bar(handle: &mut OnBeforeParse) -> Result<()> { - // Fetch the input source code. - let input_source_code = handle.input_source_code()?; - - // Get the Loader for the file - let loader = handle.output_loader(); - - let output_source_code = input_source_code.replace("foo", "bar"); - - handle.set_output_source_code(output_source_code, BunLoader::BUN_LOADER_JSX); - - Ok(()) -} -``` - -And to use it in `Bun.build()`: - -```ts title="index.ts" icon="/icons/typescript.svg" -import myNativeAddon from "./my-native-addon"; - -Bun.build({ - entrypoints: ["./app.tsx"], - plugins: [ - { - name: "my-plugin", - - setup(build) { - build.onBeforeParse( - { - namespace: "file", - filter: "**/*.tsx", - }, - { - napiModule: myNativeAddon, - symbol: "replace_foo_with_bar", - // external: myNativeAddon.getSharedState() - }, - ); - }, - }, - ], -}); -``` - -### onBeforeParse - -```ts -onBeforeParse( - args: { filter: RegExp; namespace?: string }, - callback: { napiModule: NapiModule; symbol: string; external?: unknown }, -): void; -``` - -This lifecycle callback is run immediately before a file is parsed by Bun's bundler. - -As input, it receives the file's contents and can optionally return new source code. - -This callback can be called from any thread and so the napi module implementation must be thread-safe. diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/feedback.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/feedback.mdx deleted file mode 100644 index fdb2f29..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/feedback.mdx +++ /dev/null @@ -1,75 +0,0 @@ ---- -title: Feedback -description: Share feedback, bug reports, and feature requests -mode: center ---- - -Whether you've found a bug, have a performance issue, or just want to suggest an improvement, here's how you can open a helpful issue: - -For general questions, please join our [Discord](https://bun.com/discord). - -## Reporting Issues - - - - Try upgrading Bun to the latest version with `bun upgrade`. This might fix your problem without having to open an issue. - - ```bash terminal icon="terminal" - bun upgrade - ``` - - You can also try the latest canary release, which includes the most recent changes and bug fixes that haven't been released in a stable version yet. - - ```bash terminal icon="terminal" - bun upgrade --canary - - # To revert back to the stable - bun upgrade --stable - ``` - - If the issue still persists after upgrading, continue to the next step. - - - First take a minute to check if the issue has already been reported. Don't open a new issue if it has already been reported, it saves time for everyone and helps us focus on fixing things faster. - - - 🔍 [**Search existing issues**](https://github.com/oven-sh/bun/issues) - - 💬 [**Check discussions**](https://github.com/oven-sh/bun/discussions) - - If you find a related issue, add a 👍 reaction or comment with extra details instead of opening a new one. - - - If no one has reported the issue, please open a new issue or suggest an improvement. - - - 🐞 [**Report a Bug**](https://github.com/oven-sh/bun/issues/new?template=2-bug-report.yml) - - ⚡ [**Suggest an Improvement**](https://github.com/oven-sh/bun/issues/new?template=4-feature-request.yml) - - Please provide as much detail as possible, including: - - A clear and concise title - - A code example or steps to reproduce the issue - - The version of Bun you are using (run `bun --version`) - - A detailed description of the issue (what happened, what you expected to happen, and what actually happened) - - The operating system and version you are using - - - For MacOS and Linux: copy the output of `uname -mprs` - - For Windows: copy the output of this command in the powershell console: - `"$([Environment]::OSVersion | ForEach-Object VersionString) $(if ([Environment]::Is64BitOperatingSystem) { "x64" } else { "x86" })"` - - - - - -The Bun team will review the issue and get back to you as soon as possible! - ---- - -## Use `bun feedback` - -Alternatively, you can use `bun feedback` to share feedback, bug reports, and feature requests directly with the Bun team. - -```bash terminal icon="terminal" -bun feedback "Love the new release!" -bun feedback report.txt details.log -echo "please document X" | bun feedback --email you@example.com -``` - -You can provide feedback as text arguments, file paths, or piped input. diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/guides/binary/arraybuffer-to-array.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/guides/binary/arraybuffer-to-array.mdx deleted file mode 100644 index 0367e7d..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/guides/binary/arraybuffer-to-array.mdx +++ /dev/null @@ -1,29 +0,0 @@ ---- -title: Convert an ArrayBuffer to an array of numbers -sidebarTitle: "ArrayBuffer to Array" -mode: center ---- - -To retrieve the contents of an `ArrayBuffer` as an array of numbers, create a [`Uint8Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) over of the buffer. and use the [`Array.from()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/from) method to convert it to an array. - -```ts -const buf = new ArrayBuffer(64); -const arr = new Uint8Array(buf); -arr.length; // 64 -arr[0]; // 0 (instantiated with all zeros) -``` - ---- - -The `Uint8Array` class supports array indexing and iteration. However if you wish to convert the instance to a regular `Array`, use `Array.from()`. (This will likely be slower than using the `Uint8Array` directly.) - -```ts -const buf = new ArrayBuffer(64); -const uintArr = new Uint8Array(buf); -const regularArr = Array.from(uintArr); -// number[] -``` - ---- - -See [Docs > API > Binary Data](/docs/runtime/binary-data#conversion) for complete documentation on manipulating binary data with Bun. diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/guides/binary/arraybuffer-to-blob.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/guides/binary/arraybuffer-to-blob.mdx deleted file mode 100644 index 4fe5ff3..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/guides/binary/arraybuffer-to-blob.mdx +++ /dev/null @@ -1,26 +0,0 @@ ---- -title: Convert an ArrayBuffer to a Blob -sidebarTitle: "ArrayBuffer to Blob" -mode: center ---- - -A [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob) can be constructed from an array of "chunks", where each chunk is a string, binary data structure, or another `Blob`. - -```ts -const buf = new ArrayBuffer(64); -const blob = new Blob([buf]); -``` - ---- - -By default the `type` of the resulting `Blob` will be unset. This can be set manually. - -```ts -const buf = new ArrayBuffer(64); -const blob = new Blob([buf], { type: "application/octet-stream" }); -blob.type; // => "application/octet-stream" -``` - ---- - -See [Docs > API > Binary Data](/docs/runtime/binary-data#conversion) for complete documentation on manipulating binary data with Bun. diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/guides/binary/arraybuffer-to-buffer.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/guides/binary/arraybuffer-to-buffer.mdx deleted file mode 100644 index 06571b0..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/guides/binary/arraybuffer-to-buffer.mdx +++ /dev/null @@ -1,27 +0,0 @@ ---- -title: Convert an ArrayBuffer to a Buffer -sidebarTitle: "ArrayBuffer to Buffer" -mode: center ---- - -The Node.js [`Buffer`](https://nodejs.org/api/buffer.html) API predates the introduction of `ArrayBuffer` into the JavaScript language. Bun implements both. - -Use the static `Buffer.from()` method to create a `Buffer` from an `ArrayBuffer`. - -```ts -const arrBuffer = new ArrayBuffer(64); -const nodeBuffer = Buffer.from(arrBuffer); -``` - ---- - -To create a `Buffer` that only views a portion of the underlying buffer, pass the offset and length to the constructor. - -```ts -const arrBuffer = new ArrayBuffer(64); -const nodeBuffer = Buffer.from(arrBuffer, 0, 16); // view first 16 bytes -``` - ---- - -See [Docs > API > Binary Data](/docs/runtime/binary-data#conversion) for complete documentation on manipulating binary data with Bun. diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/guides/binary/arraybuffer-to-string.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/guides/binary/arraybuffer-to-string.mdx deleted file mode 100644 index fb31ac9..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/guides/binary/arraybuffer-to-string.mdx +++ /dev/null @@ -1,17 +0,0 @@ ---- -title: Convert an ArrayBuffer to a string -sidebarTitle: "ArrayBuffer to string" -mode: center ---- - -Bun implements the Web-standard [`TextDecoder`](https://developer.mozilla.org/en-US/docs/Web/API/TextDecoder) class for converting between binary data types and strings. - -```ts -const buf = new ArrayBuffer(64); -const decoder = new TextDecoder(); -const str = decoder.decode(buf); -``` - ---- - -See [Docs > API > Binary Data](/docs/runtime/binary-data#conversion) for complete documentation on manipulating binary data with Bun. diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/guides/binary/arraybuffer-to-typedarray.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/guides/binary/arraybuffer-to-typedarray.mdx deleted file mode 100644 index 289aed5..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/guides/binary/arraybuffer-to-typedarray.mdx +++ /dev/null @@ -1,41 +0,0 @@ ---- -title: Convert an ArrayBuffer to a Uint8Array -sidebarTitle: "ArrayBuffer to Uint8Array" -mode: center ---- - -A `Uint8Array` is a _typed array_, meaning it is a mechanism for viewing the data in an underlying `ArrayBuffer`. - -```ts -const buffer = new ArrayBuffer(64); -const arr = new Uint8Array(buffer); -``` - ---- - -Instances of other typed arrays can be created similarly. - -```ts -const buffer = new ArrayBuffer(64); - -const arr1 = new Uint8Array(buffer); -const arr2 = new Uint16Array(buffer); -const arr3 = new Uint32Array(buffer); -const arr4 = new Float32Array(buffer); -const arr5 = new Float64Array(buffer); -const arr6 = new BigInt64Array(buffer); -const arr7 = new BigUint64Array(buffer); -``` - ---- - -To create a typed array that only views a portion of the underlying buffer, pass the offset and length to the constructor. - -```ts -const buffer = new ArrayBuffer(64); -const arr = new Uint8Array(buffer, 0, 16); // view first 16 bytes -``` - ---- - -See [Docs > API > Utils](/docs/runtime/utils) for more useful utilities. diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/guides/binary/blob-to-arraybuffer.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/guides/binary/blob-to-arraybuffer.mdx deleted file mode 100644 index 2830352..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/guides/binary/blob-to-arraybuffer.mdx +++ /dev/null @@ -1,16 +0,0 @@ ---- -title: Convert a Blob to an ArrayBuffer -sidebarTitle: "Blob to ArrayBuffer" -mode: center ---- - -The [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob) class provides a number of methods for consuming its contents in different formats, including `.arrayBuffer()`. - -```ts -const blob = new Blob(["hello world"]); -const buf = await blob.arrayBuffer(); -``` - ---- - -See [Docs > API > Binary Data](/docs/runtime/binary-data#conversion) for complete documentation on manipulating binary data with Bun. diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/guides/binary/blob-to-dataview.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/guides/binary/blob-to-dataview.mdx deleted file mode 100644 index fa37716..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/guides/binary/blob-to-dataview.mdx +++ /dev/null @@ -1,16 +0,0 @@ ---- -title: Convert a Blob to a DataView -sidebarTitle: "Blob to DataView" -mode: center ---- - -The [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob) class provides a number of methods for consuming its contents in different formats. This snippets reads the contents to an `ArrayBuffer`, then creates a `DataView` from the buffer. - -```ts -const blob = new Blob(["hello world"]); -const arr = new DataView(await blob.arrayBuffer()); -``` - ---- - -See [Docs > API > Binary Data](/docs/runtime/binary-data#conversion) for complete documentation on manipulating binary data with Bun. diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/guides/binary/blob-to-stream.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/guides/binary/blob-to-stream.mdx deleted file mode 100644 index 2f46411..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/guides/binary/blob-to-stream.mdx +++ /dev/null @@ -1,16 +0,0 @@ ---- -title: Convert a Blob to a ReadableStream -sidebarTitle: "Blob to ReadableStream" -mode: center ---- - -The [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob) class provides a number of methods for consuming its contents in different formats, including `.stream()`. This returns `Promise`. - -```ts -const blob = new Blob(["hello world"]); -const stream = await blob.stream(); -``` - ---- - -See [Docs > API > Binary Data](/docs/runtime/binary-data#conversion) for complete documentation on manipulating binary data with Bun. diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/guides/binary/blob-to-string.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/guides/binary/blob-to-string.mdx deleted file mode 100644 index 2bef234..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/guides/binary/blob-to-string.mdx +++ /dev/null @@ -1,17 +0,0 @@ ---- -title: Convert a Blob to a string -sidebarTitle: "Blob to string" -mode: center ---- - -The [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob) class provides a number of methods for consuming its contents in different formats, including `.text()`. - -```ts -const blob = new Blob(["hello world"]); -const str = await blob.text(); -// => "hello world" -``` - ---- - -See [Docs > API > Binary Data](/docs/runtime/binary-data#conversion) for complete documentation on manipulating binary data with Bun. diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/guides/binary/blob-to-typedarray.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/guides/binary/blob-to-typedarray.mdx deleted file mode 100644 index f041393..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/guides/binary/blob-to-typedarray.mdx +++ /dev/null @@ -1,16 +0,0 @@ ---- -title: Convert a Blob to a Uint8Array -sidebarTitle: "Blob to Uint8Array" -mode: center ---- - -The [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob) class provides a number of methods for consuming its contents in different formats. This snippets reads the contents to an `ArrayBuffer`, then creates a `Uint8Array` from the buffer. - -```ts -const blob = new Blob(["hello world"]); -const arr = new Uint8Array(await blob.arrayBuffer()); -``` - ---- - -See [Docs > API > Binary Data](/docs/runtime/binary-data#conversion) for complete documentation on manipulating binary data with Bun. diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/guides/binary/buffer-to-arraybuffer.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/guides/binary/buffer-to-arraybuffer.mdx deleted file mode 100644 index dccdeb4..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/guides/binary/buffer-to-arraybuffer.mdx +++ /dev/null @@ -1,16 +0,0 @@ ---- -title: Convert a Buffer to an ArrayBuffer -sidebarTitle: "Buffer to ArrayBuffer" -mode: center ---- - -The Node.js [`Buffer`](https://nodejs.org/api/buffer.html) class provides a way to view and manipulate data in an underlying `ArrayBuffer`, which is available via the `buffer` property. - -```ts -const nodeBuf = Buffer.alloc(64); -const arrBuf = nodeBuf.buffer; -``` - ---- - -See [Docs > API > Binary Data](/docs/runtime/binary-data#conversion) for complete documentation on manipulating binary data with Bun. diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/guides/binary/buffer-to-blob.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/guides/binary/buffer-to-blob.mdx deleted file mode 100644 index fdcdeaf..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/guides/binary/buffer-to-blob.mdx +++ /dev/null @@ -1,16 +0,0 @@ ---- -title: Convert a Buffer to a blob -sidebarTitle: "Buffer to Blob" -mode: center ---- - -A [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob) can be constructed from an array of "chunks", where each chunk is a string, binary data structure (including `Buffer`), or another `Blob`. - -```ts -const buf = Buffer.from("hello"); -const blob = new Blob([buf]); -``` - ---- - -See [Docs > API > Binary Data](/docs/runtime/binary-data#conversion) for complete documentation on manipulating binary data with Bun. diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/guides/binary/buffer-to-readablestream.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/guides/binary/buffer-to-readablestream.mdx deleted file mode 100644 index 5200648..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/guides/binary/buffer-to-readablestream.mdx +++ /dev/null @@ -1,43 +0,0 @@ ---- -title: Convert a Buffer to a ReadableStream -sidebarTitle: "Buffer to ReadableStream" -mode: center ---- - -The naive approach to creating a [`ReadableStream`](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream) from a [`Buffer`](https://nodejs.org/api/buffer.html) is to use the `ReadableStream` constructor and enqueue the entire array as a single chunk. For a large buffer, this may be undesirable as this approach does not "streaming" the data in smaller chunks. - -```ts -const buf = Buffer.from("hello world"); -const stream = new ReadableStream({ - start(controller) { - controller.enqueue(buf); - controller.close(); - }, -}); -``` - ---- - -To stream the data in smaller chunks, first create a `Blob` instance from the `Buffer`. Then use the [`Blob.stream()`](https://developer.mozilla.org/en-US/docs/Web/API/Blob/stream) method to create a `ReadableStream` that streams the data in chunks of a specified size. - -```ts -const buf = Buffer.from("hello world"); -const blob = new Blob([buf]); -const stream = blob.stream(); -``` - ---- - -The chunk size can be set by passing a number to the `.stream()` method. - -```ts -const buf = Buffer.from("hello world"); -const blob = new Blob([buf]); - -// set chunk size of 1024 bytes -const stream = blob.stream(1024); -``` - ---- - -See [Docs > API > Binary Data](/docs/runtime/binary-data#conversion) for complete documentation on manipulating binary data with Bun. diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/guides/binary/buffer-to-string.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/guides/binary/buffer-to-string.mdx deleted file mode 100644 index 4b192ee..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/guides/binary/buffer-to-string.mdx +++ /dev/null @@ -1,27 +0,0 @@ ---- -title: Convert a Buffer to a string -sidebarTitle: "Buffer to string" -mode: center ---- - -The [`Buffer`](https://nodejs.org/api/buffer.html) class provides a built-in `.toString()` method that converts a `Buffer` to a string. - -```ts -const buf = Buffer.from("hello"); -const str = buf.toString(); -// => "hello" -``` - ---- - -You can optionally specify an encoding and byte range. - -```ts -const buf = Buffer.from("hello world!"); -const str = buf.toString("utf8", 0, 5); -// => "hello" -``` - ---- - -See [Docs > API > Binary Data](/docs/runtime/binary-data#conversion) for complete documentation on manipulating binary data with Bun. diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/guides/binary/buffer-to-typedarray.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/guides/binary/buffer-to-typedarray.mdx deleted file mode 100644 index c46ff5a..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/guides/binary/buffer-to-typedarray.mdx +++ /dev/null @@ -1,16 +0,0 @@ ---- -title: Convert a Buffer to a Uint8Array -sidebarTitle: "Buffer to Uint8Array" -mode: center ---- - -The Node.js [`Buffer`](https://nodejs.org/api/buffer.html) class extends [`Uint8Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array), so no conversion is needed. All properties and methods on `Uint8Array` are available on `Buffer`. - -```ts -const buf = Buffer.alloc(64); -buf instanceof Uint8Array; // => true -``` - ---- - -See [Docs > API > Binary Data](/docs/runtime/binary-data#conversion) for complete documentation on manipulating binary data with Bun. diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/guides/binary/dataview-to-string.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/guides/binary/dataview-to-string.mdx deleted file mode 100644 index 3f4fcb0..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/guides/binary/dataview-to-string.mdx +++ /dev/null @@ -1,17 +0,0 @@ ---- -title: Convert a DataView to a string -sidebarTitle: "DataView to string" -mode: center ---- - -If a [`DataView`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView) contains ASCII-encoded text, you can convert it to a string using the [`TextDecoder`](https://developer.mozilla.org/en-US/docs/Web/API/TextDecoder) class. - -```ts -const dv: DataView = ...; -const decoder = new TextDecoder(); -const str = decoder.decode(dv); -``` - ---- - -See [Docs > API > Binary Data](/docs/runtime/binary-data#conversion) for complete documentation on manipulating binary data with Bun. diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/guides/binary/typedarray-to-arraybuffer.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/guides/binary/typedarray-to-arraybuffer.mdx deleted file mode 100644 index d80d7d8..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/guides/binary/typedarray-to-arraybuffer.mdx +++ /dev/null @@ -1,27 +0,0 @@ ---- -title: Convert a Uint8Array to an ArrayBuffer -sidebarTitle: "Uint8Array to ArrayBuffer" -mode: center ---- - -A [`Uint8Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) is a _typed array_ class, meaning it is a mechanism for viewing data in an underlying `ArrayBuffer`. The underlying `ArrayBuffer` is accessible via the `buffer` property. - -```ts -const arr = new Uint8Array(64); -arr.buffer; // => ArrayBuffer(64) -``` - ---- - -The `Uint8Array` may be a view over a _subset_ of the data in the underlying `ArrayBuffer`. In this case, the `buffer` property will return the entire buffer, and the `byteOffset` and `byteLength` properties will indicate the subset. - -```ts -const arr = new Uint8Array(64, 16, 32); -arr.buffer; // => ArrayBuffer(64) -arr.byteOffset; // => 16 -arr.byteLength; // => 32 -``` - ---- - -See [Docs > API > Binary Data](/docs/runtime/binary-data#conversion) for complete documentation on manipulating binary data with Bun. diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/guides/binary/typedarray-to-blob.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/guides/binary/typedarray-to-blob.mdx deleted file mode 100644 index 8c37af3..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/guides/binary/typedarray-to-blob.mdx +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: Convert a Uint8Array to a Blob -sidebarTitle: "Uint8Array to Blob" -mode: center ---- - -A [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob) can be constructed from an array of "chunks", where each chunk is a string, binary data structure (including `Uint8Array`), or another `Blob`. - -```ts -const arr = new Uint8Array([0x68, 0x65, 0x6c, 0x6c, 0x6f]); -const blob = new Blob([arr]); -console.log(await blob.text()); -// => "hello" -``` - ---- - -See [Docs > API > Binary Data](/docs/runtime/binary-data#conversion) for complete documentation on manipulating binary data with Bun. diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/guides/binary/typedarray-to-buffer.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/guides/binary/typedarray-to-buffer.mdx deleted file mode 100644 index 84e40b2..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/guides/binary/typedarray-to-buffer.mdx +++ /dev/null @@ -1,16 +0,0 @@ ---- -title: Convert a Uint8Array to a Buffer -sidebarTitle: "Uint8Array to Buffer" -mode: center ---- - -The [`Buffer`](https://nodejs.org/api/buffer.html) class extends [`Uint8Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) with a number of additional methods. Use `Buffer.from()` to create a `Buffer` instance from a `Uint8Array`. - -```ts -const arr: Uint8Array = ... -const buf = Buffer.from(arr); -``` - ---- - -See [Docs > API > Binary Data](/docs/runtime/binary-data#conversion) for complete documentation on manipulating binary data with Bun. diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/guides/binary/typedarray-to-dataview.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/guides/binary/typedarray-to-dataview.mdx deleted file mode 100644 index 622de74..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/guides/binary/typedarray-to-dataview.mdx +++ /dev/null @@ -1,16 +0,0 @@ ---- -title: Convert a Uint8Array to a DataView -sidebarTitle: "Uint8Array to DataView" -mode: center ---- - -A [`Uint8Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) is a _typed array_ class, meaning it is a mechanism for viewing data in an underlying `ArrayBuffer`. The following snippet creates a [`DataView`] instance over the same range of data as the `Uint8Array`. - -```ts -const arr: Uint8Array = ... -const dv = new DataView(arr.buffer, arr.byteOffset, arr.byteLength); -``` - ---- - -See [Docs > API > Binary Data](/docs/runtime/binary-data#conversion) for complete documentation on manipulating binary data with Bun. diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/guides/binary/typedarray-to-readablestream.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/guides/binary/typedarray-to-readablestream.mdx deleted file mode 100644 index 599293b..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/guides/binary/typedarray-to-readablestream.mdx +++ /dev/null @@ -1,43 +0,0 @@ ---- -title: Convert a Uint8Array to a ReadableStream -sidebarTitle: "Uint8Array to ReadableStream" -mode: center ---- - -The naive approach to creating a [`ReadableStream`](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream) from a [`Uint8Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) is to use the [`ReadableStream`](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream) constructor and enqueue the entire array as a single chunk. For larger chunks, this may be undesirable as it isn't actually "streaming" the data. - -```ts -const arr = new Uint8Array(64); -const stream = new ReadableStream({ - start(controller) { - controller.enqueue(arr); - controller.close(); - }, -}); -``` - ---- - -To stream the data in smaller chunks, first create a `Blob` instance from the `Uint8Array`. Then use the [`Blob.stream()`](https://developer.mozilla.org/en-US/docs/Web/API/Blob/stream) method to create a `ReadableStream` that streams the data in chunks of a specified size. - -```ts -const arr = new Uint8Array(64); -const blob = new Blob([arr]); -const stream = blob.stream(); -``` - ---- - -The chunk size can be set by passing a number to the `.stream()` method. - -```ts -const arr = new Uint8Array(64); -const blob = new Blob([arr]); - -// set chunk size of 1024 bytes -const stream = blob.stream(1024); -``` - ---- - -See [Docs > API > Binary Data](/docs/runtime/binary-data#conversion) for complete documentation on manipulating binary data with Bun. diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/guides/binary/typedarray-to-string.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/guides/binary/typedarray-to-string.mdx deleted file mode 100644 index d5b9d77..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/guides/binary/typedarray-to-string.mdx +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: Convert a Uint8Array to a string -sidebarTitle: "Uint8Array to string" -mode: center ---- - -Bun implements the Web-standard [`TextDecoder`](https://developer.mozilla.org/en-US/docs/Web/API/TextDecoder) class for converting from binary data types like `Uint8Array` and strings. - -```ts -const arr = new Uint8Array([104, 101, 108, 108, 111]); -const decoder = new TextDecoder(); -const str = decoder.decode(arr); -// => "hello" -``` - ---- - -See [Docs > API > Binary Data](/docs/runtime/binary-data#conversion) for complete documentation on manipulating binary data with Bun. diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/guides/deployment/aws-lambda.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/guides/deployment/aws-lambda.mdx deleted file mode 100644 index e87f12e..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/guides/deployment/aws-lambda.mdx +++ /dev/null @@ -1,204 +0,0 @@ ---- -title: Deploy a Bun application on AWS Lambda -sidebarTitle: Deploy on AWS Lambda -mode: center ---- - -[AWS Lambda](https://aws.amazon.com/lambda/) is a serverless compute service that lets you run code without provisioning or managing servers. - -In this guide, we will deploy a Bun HTTP server to AWS Lambda using a `Dockerfile`. - - - Before continuing, make sure you have: - - - A Bun application ready for deployment - - An [AWS account](https://aws.amazon.com/) - - [AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html) installed and configured - - [Docker](https://docs.docker.com/get-started/get-docker/) installed and added to your `PATH` - - - ---- - - - - Make sure you're in the directory containing your project, then create a new `Dockerfile` in the root of your project. This file contains the instructions to initialize the container, copy your local project files into it, install dependencies, and start the application. - - ```docker Dockerfile icon="docker" - # Use the official AWS Lambda adapter image to handle the Lambda runtime - FROM public.ecr.aws/awsguru/aws-lambda-adapter:0.9.0 AS aws-lambda-adapter - - # Use the official Bun image to run the application - FROM oven/bun:debian AS bun_latest - - # Copy the Lambda adapter into the container - COPY --from=aws-lambda-adapter /lambda-adapter /opt/extensions/lambda-adapter - - # Set the port to 8080. This is required for the AWS Lambda adapter. - ENV PORT=8080 - - # Set the work directory to `/var/task`. This is the default work directory for Lambda. - WORKDIR "/var/task" - - # Copy the package.json and bun.lock into the container - COPY package.json bun.lock ./ - - # Install the dependencies - RUN bun install --production --frozen-lockfile - - # Copy the rest of the application into the container - COPY . /var/task - - # Run the application. - CMD ["bun", "index.ts"] - ``` - - - Make sure that the start command corresponds to your application's entry point. This can also be `CMD ["bun", "run", "start"]` if you have a start script in your `package.json`. - - This image installs dependencies and runs your app with Bun inside a container. If your app doesn't have dependencies, you can omit the `RUN bun install --production --frozen-lockfile` line. - - - Create a new `.dockerignore` file in the root of your project. This file contains the files and directories that should be _excluded_ from the container image, such as `node_modules`. This makes your builds faster and smaller: - - ```docker .dockerignore icon="Docker" - node_modules - Dockerfile* - .dockerignore - .git - .gitignore - README.md - LICENSE - .vscode - .env - # Any other files or directories you want to exclude - ``` - - - Make sure you're in the directory containing your `Dockerfile`, then build the Docker image. In this case, we'll call the image `bun-lambda-demo` and tag it as `latest`. - - ```bash terminal icon="terminal" - # cd /path/to/your/app - docker build --provenance=false --platform linux/amd64 -t bun-lambda-demo:latest . - ``` - - - To push the image to AWS Lambda, we first need to create an [ECR repository](https://aws.amazon.com/ecr/) to push the image to. - - By running the following command, we: - - Create an ECR repository named `bun-lambda-demo` in the `us-east-1` region - - Get the repository URI, and export the repository URI as an environment variable. This is optional, but make the next steps easier. - - ```bash terminal icon="terminal" - export ECR_URI=$(aws ecr create-repository --repository-name bun-lambda-demo --region us-east-1 --query 'repository.repositoryUri' --output text) - echo $ECR_URI - ``` - ```txt - [id].dkr.ecr.us-east-1.amazonaws.com/bun-lambda-demo - ``` - - - If you're using IAM Identity Center (SSO) or have configured AWS CLI with profiles, you'll need to add the `--profile` flag to your AWS CLI commands. - - For example, if your profile is named `my-sso-app`, use `--profile my-sso-app`. Check your AWS CLI configuration with `aws configure list-profiles` to see available profiles. - - ```bash terminal icon="terminal" - export ECR_URI=$(aws ecr create-repository --repository-name bun-lambda-demo --region us-east-1 --profile my-sso-app --query 'repository.repositoryUri' --output text) - echo $ECR_URI - ``` - - - - - Log in to the ECR repository: - - ```bash terminal icon="terminal" - aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin $ECR_URI - ``` - ```txt - Login Succeeded - ``` - - - If using a profile, use the `--profile` flag: - - ```bash terminal icon="terminal" - aws ecr get-login-password --region us-east-1 --profile my-sso-app | docker login --username AWS --password-stdin $ECR_URI - ``` - - - - - - Make sure you're in the directory containing your `Dockerfile`, then tag the docker image with the ECR repository URI. - - ```bash terminal icon="terminal" - docker tag bun-lambda-demo:latest ${ECR_URI}:latest - ``` - - Then, push the image to the ECR repository. - - ```bash terminal icon="terminal" - docker push ${ECR_URI}:latest - ``` - - - Go to **AWS Console** > **Lambda** > [**Create Function**](https://us-east-1.console.aws.amazon.com/lambda/home?region=us-east-1#/create/function?intent=authorFromImage) > Select **Container image** - - Make sure you've selected the right region, this URL defaults to `us-east-1`. - - - ![Create Function](https://bun.com/images/guides/lambda1.png) - - - Give the function a name, like `my-bun-function`. - - - Then, go to the **Container image URI** section, click on **Browse images**. Select the image we just pushed to the ECR repository. - - - ![Select Container Repository](https://bun.com/images/guides/lambda2.png) - - - Then, select the `latest` image, and click on **Select image**. - - - ![Select Container Image](https://bun.com/images/guides/lambda3.png) - - - - To get a public URL for the function, we need to go to **Additional configurations** > **Networking** > **Function URL**. - - Set this to **Enable**, with Auth Type **NONE**. - - - ![Set the Function URL](https://bun.com/images/guides/lambda4.png) - - - - Click on **Create function** at the bottom of the page, this will create the function. - - - ![Create Function](https://bun.com/images/guides/lambda6.png) - - - - - Once the function has been created you'll be redirected to the function's page, where you can see the function URL in the **"Function URL"** section. - - - ![Function URL](https://bun.com/images/guides/lambda5.png) - - - - 🥳 Your app is now live! To test the function, you can either go to the **Test** tab, or call the function URL directly. - - ```bash terminal icon="terminal" - curl -X GET https://[your-function-id].lambda-url.us-east-1.on.aws/ - ``` - ```txt - Hello from Bun on Lambda! - ``` - - - diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/guides/deployment/digital-ocean.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/guides/deployment/digital-ocean.mdx deleted file mode 100644 index 0c09df3..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/guides/deployment/digital-ocean.mdx +++ /dev/null @@ -1,161 +0,0 @@ ---- -title: Deploy a Bun application on DigitalOcean -sidebarTitle: Deploy on DigitalOcean -mode: center ---- - -[DigitalOcean](https://www.digitalocean.com/) is a cloud platform that provides a range of services for building and deploying applications. - -In this guide, we will deploy a Bun HTTP server to DigitalOcean using a `Dockerfile`. - - - Before continuing, make sure you have: - - - A Bun application ready for deployment - - A [DigitalOcean account](https://www.digitalocean.com/) - - [DigitalOcean CLI](https://docs.digitalocean.com/reference/doctl/how-to/install/#step-1-install-doctl) installed and configured - - [Docker](https://docs.docker.com/get-started/get-docker/) installed and added to your `PATH` - - - ---- - - - - Create a new Container Registry to store the Docker image. - - - - In the DigitalOcean dashboard, go to [**Container Registry**](https://cloud.digitalocean.com/registry), and enter the details for the new registry. - - - ![DigitalOcean registry dashboard](https://bun.com/images/guides/digitalocean-7.png) - - - Make sure the details are correct, then click **Create Registry**. - - - - ```bash terminal icon="terminal" - doctl registry create bun-digitalocean-demo - ``` - ```txt - Name Endpoint Region slug - bun-digitalocean-demo registry.digitalocean.com/bun-digitalocean-demo sfo2 - ``` - - - - - You should see the new registry in the [**DigitalOcean registry dashboard**](https://cloud.digitalocean.com/registry): - - - ![DigitalOcean registry dashboard](https://bun.com/images/guides/digitalocean-1.png) - - - - Make sure you're in the directory containing your project, then create a new `Dockerfile` in the root of your project. This file contains the instructions to initialize the container, copy your local project files into it, install dependencies, and start the application. - - ```docker Dockerfile icon="docker" - # Use the official Bun image to run the application - FROM oven/bun:debian - - # Set the work directory to `/app` - WORKDIR /app - - # Copy the package.json and bun.lock into the container - COPY package.json bun.lock ./ - - # Install the dependencies - RUN bun install --production --frozen-lockfile - - # Copy the rest of the application into the container - COPY . . - - # Expose the port (DigitalOcean will set PORT env var) - EXPOSE 8080 - - # Run the application - CMD ["bun", "index.ts"] - ``` - - - Make sure that the start command corresponds to your application's entry point. This can also be `CMD ["bun", "run", "start"]` if you have a start script in your `package.json`. - - This image installs dependencies and runs your app with Bun inside a container. If your app doesn't have dependencies, you can omit the `RUN bun install --production --frozen-lockfile` line. - - - Create a new `.dockerignore` file in the root of your project. This file contains the files and directories that should be _excluded_ from the container image, such as `node_modules`. This makes your builds faster and smaller: - - ```docker .dockerignore icon="Docker" - node_modules - Dockerfile* - .dockerignore - .git - .gitignore - README.md - LICENSE - .vscode - .env - # Any other files or directories you want to exclude - ``` - - - Before building and pushing the Docker image, authenticate Docker with the DigitalOcean Container Registry: - - ```bash terminal icon="terminal" - doctl registry login - ``` - ```txt - Successfully authenticated with registry.digitalocean.com - ``` - - - This command authenticates Docker with DigitalOcean's registry using your DigitalOcean credentials. Without this step, the build and push command will fail with a 401 authentication error. - - - - Make sure you're in the directory containing your `Dockerfile`, then build and push the Docker image to the DigitalOcean registry in one command: - - ```bash terminal icon="terminal" - docker buildx build --platform=linux/amd64 -t registry.digitalocean.com/bun-digitalocean-demo/bun-digitalocean-demo:latest --push . - ``` - - - If you're building on an ARM Mac (M1/M2), you must use `docker buildx` with `--platform=linux/amd64` to ensure compatibility with DigitalOcean's infrastructure. Using `docker build` without the platform flag will create an ARM64 image that won't run on DigitalOcean. - - - Once the image is pushed, you should see it in the [**DigitalOcean registry dashboard**](https://cloud.digitalocean.com/registry): - - - ![DigitalOcean registry dashboard](https://bun.com/images/guides/digitalocean-2.png) - - - - In the DigitalOcean dashboard, go to [**App Platform**](https://cloud.digitalocean.com/apps) > **Create App**. We can create a project directly from the container image. - - - ![DigitalOcean App Platform project dashboard](https://bun.com/images/guides/digitalocean-3.png) - - - Make sure the details are correct, then click **Next**. - - - ![DigitalOcean App Platform service dashboard](https://bun.com/images/guides/digitalocean-4.png) - - - Review and configure resource settings, then click **Create app**. - - - ![DigitalOcean App Platform service dashboard](https://bun.com/images/guides/digitalocean-6.png) - - - - 🥳 Your app is now live! Once the app is created, you should see it in the App Platform dashboard with the public URL. - - - ![DigitalOcean App Platform app dashboard](https://bun.com/images/guides/digitalocean-5.png) - - - - diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/guides/deployment/google-cloud-run.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/guides/deployment/google-cloud-run.mdx deleted file mode 100644 index 4e6aac5..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/guides/deployment/google-cloud-run.mdx +++ /dev/null @@ -1,194 +0,0 @@ ---- -title: Deploy a Bun application on Google Cloud Run -sidebarTitle: Deploy on Google Cloud Run -mode: center ---- - -[Google Cloud Run](https://cloud.google.com/run) is a managed platform for deploying and scaling serverless applications. Google handles the infrastructure for you. - -In this guide, we will deploy a Bun HTTP server to Google Cloud Run using a `Dockerfile`. - - - Before continuing, make sure you have: - - - A Bun application ready for deployment - - A [Google Cloud account](https://cloud.google.com/) with billing enabled - - [Google Cloud CLI](https://cloud.google.com/sdk/docs/install) installed and configured - - - ---- - - -Initialize gcloud by select/creating a project}> - -Make sure that you've initialized the Google Cloud CLI. This command logs you in, and prompts you to either select an existing project or create a new one. - -For more help with the Google Cloud CLI, see the [official documentation](https://docs.cloud.google.com/sdk/gcloud/reference/init). - -```bash terminal icon="terminal" -gcloud init -``` - -```txt -Welcome! This command will take you through the configuration of gcloud. - -You must sign in to continue. Would you like to sign in (Y/n)? Y -You are signed in as [email@example.com]. - -Pick cloud project to use: - [1] existing-bun-app-1234 - [2] Enter a project ID - [3] Create a new project -Please enter numeric choice or text value (must exactly match list item): 3 - -Enter a Project ID. my-bun-app -Your current project has been set to: [my-bun-app] - -The Google Cloud CLI is configured and ready to use! -``` - - - -Set variables for your project ID and number so they're easier to reuse in the following steps. - -```bash terminal icon="terminal" -PROJECT_ID=$(gcloud projects list --format='value(projectId)' --filter='name="my bun app"') -PROJECT_NUMBER=$(gcloud projects list --format='value(projectNumber)' --filter='name="my bun app"') - -echo $PROJECT_ID $PROJECT_NUMBER -``` - -```txt -my-bun-app-... [PROJECT_NUMBER] -``` - - - -List your available billing accounts and link one to your project: - -```bash terminal icon="terminal" -gcloud billing accounts list -``` - -```txt -ACCOUNT_ID NAME OPEN MASTER_ACCOUNT_ID -[BILLING_ACCOUNT_ID] My Billing Account True -``` - -Link your billing account to your project. Replace `[BILLING_ACCOUNT_ID]` with the ID of your billing account. - -```bash terminal icon="terminal" -gcloud billing projects link $PROJECT_ID --billing-account=[BILLING_ACCOUNT_ID] -``` - -```txt -billingAccountName: billingAccounts/[BILLING_ACCOUNT_ID] -billingEnabled: true -name: projects/my-bun-app-.../billingInfo -projectId: my-bun-app-... -``` - - - -Activate the necessary services and grant Cloud Build permissions: - -```bash terminal icon="terminal" -gcloud services enable run.googleapis.com cloudbuild.googleapis.com -gcloud projects add-iam-policy-binding $PROJECT_ID \ - --member=serviceAccount:$PROJECT_NUMBER-compute@developer.gserviceaccount.com \ - --role=roles/run.builder -``` - - -These commands enable Cloud Run (`run.googleapis.com`) and Cloud Build (`cloudbuild.googleapis.com`), which are required for deploying from source. Cloud Run runs your containerized app, while Cloud Build handles building and packaging it. - -The IAM binding grants the Compute Engine service account (`$PROJECT_NUMBER-compute@developer.gserviceaccount.com`) permission to build and deploy images on your behalf. - - - - - -Create a new `Dockerfile` in the root of your project. This file contains the instructions to initialize the container, copy your local project files into it, install dependencies, and start the application. - -```docker Dockerfile icon="docker" -# Use the official Bun image to run the application -FROM oven/bun:latest - -# Copy the package.json and bun.lock into the container -COPY package.json bun.lock ./ - -# Install the dependencies -# Install the dependencies -RUN bun install --production --frozen-lockfile - -# Copy the rest of the application into the container -COPY . . - -# Run the application -CMD ["bun", "index.ts"] -``` - - - Make sure that the start command corresponds to your application's entry point. This can also be `CMD ["bun", "run", "start"]` if you have a start script in your `package.json`. - -This image installs dependencies and runs your app with Bun inside a container. If your app doesn't have dependencies, you can omit the `RUN bun install --production --frozen-lockfile` line. - - - -Create a new `.dockerignore` file in the root of your project. This file contains the files and directories that should be _excluded_ from the container image, such as `node_modules`. This makes your builds faster and smaller: - -```docker .dockerignore icon="Docker" -node_modules -Dockerfile* -.dockerignore -.git -.gitignore -README.md -LICENSE -.vscode -.env -# Any other files or directories you want to exclude -``` - - - -Make sure you're in the directory containing your `Dockerfile`, then deploy directly from your local source: - - - Update the `--region` flag to your preferred region. You can also omit this flag to get an interactive prompt to - select a region. - - -```bash terminal icon="terminal" -gcloud run deploy my-bun-app --source . --region=us-west1 --allow-unauthenticated -``` - -```txt -Deploying from source requires an Artifact Registry Docker repository to store built containers. A repository named -[cloud-run-source-deploy] in region [us-west1] will be created. - -Do you want to continue (Y/n)? Y - -Building using Dockerfile and deploying container to Cloud Run service [my-bun-app] in project [my-bun-app-...] region [us-west1] -✓ Building and deploying... Done. - ✓ Validating Service... - ✓ Uploading sources... - ✓ Building Container... Logs are available at [https://console.cloud.google.com/cloud-build/builds...]. - ✓ Creating Revision... - ✓ Routing traffic... - ✓ Setting IAM Policy... -Done. -Service [my-bun-app] revision [my-bun-app-...] has been deployed and is serving 100 percent of traffic. -Service URL: https://my-bun-app-....us-west1.run.app -``` - - - - -🎉 Your Bun application is now live! - -Visit the Service URL (`https://my-bun-app-....us-west1.run.app`) to confirm everything works as expected. - - - diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/guides/deployment/railway.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/guides/deployment/railway.mdx deleted file mode 100644 index c095c76..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/guides/deployment/railway.mdx +++ /dev/null @@ -1,145 +0,0 @@ ---- -title: Deploy a Bun application on Railway -description: Deploy Bun applications to Railway with this step-by-step guide covering CLI and dashboard methods, optional PostgreSQL setup, and automatic SSL configuration. -sidebarTitle: Deploy on Railway -mode: center ---- - -Railway is an infrastructure platform where you can provision infrastructure, develop with that infrastructure locally, and then deploy to the cloud. It enables instant deployments from GitHub with zero configuration, automatic SSL, and built-in database provisioning. - -This guide walks through deploying a Bun application with a PostgreSQL database (optional), which is exactly what the template below provides. - -You can either follow this guide step-by-step or simply deploy the pre-configured template with one click: - - - Deploy on Railway - - ---- - -**Prerequisites**: - -- A Bun application ready for deployment -- A [Railway account](https://railway.app/) -- Railway CLI (for CLI deployment method) -- A GitHub account (for Dashboard deployment method) - ---- - -## Method 1: Deploy via CLI - - - -Ensure sure you have the Railway CLI installed. - -```bash terminal icon="terminal" -bun install -g @railway/cli -``` - - - -Log into your Railway account. - -```bash terminal icon="terminal" -railway login -``` - - - -After successfully authenticating, initialize a new project. - -```bash terminal icon="terminal" -railway init -``` - - - -After initializing the project, add a new database and service. - -Step 4 is only necessary if your application uses a database. If you don't need PostgreSQL, skip to Step 5. - -```bash terminal icon="terminal" -# Add PostgreSQL database. Make sure to add this first! -railway add --database postgres - -# Add your application service. -railway add --service bun-react-db --variables DATABASE_URL=\${{Postgres.DATABASE_URL}} -``` - - - -After the services have been created and connected, deploy the application to Railway. By default, services are only accessible within Railway's private network. To make your app publicly accessible, you need to generate a public domain. - -```bash terminal icon="terminal" -# Deploy your application -railway up - -# Generate public domain -railway domain -``` - - - - -Your app is now live! Railway auto-deploys on every GitHub push. - ---- - -## Method 2: Deploy via Dashboard - - - -Create a new project - -1. Go to [Railway Dashboard](http://railway.com/dashboard?utm_medium=integration&utm_source=docs&utm_campaign=bun) -2. Click **"+ New"** → **"GitHub repo"** -3. Choose your repository - - - -Add a PostgreSQL database, and connect this database to the service - -Step 2 is only necessary if your application uses a database. If you don't need PostgreSQL, skip to Step 3. - -1. Click **"+ New"** → **"Database"** → **"Add PostgreSQL"** -2. After the database has been created, select your service (not the database) -3. Go to **"Variables"** tab -4. Click **"+ New Variable"** → **"Add Reference"** -5. Select `DATABASE_URL` from postgres - - - -Generate a public domain - -1. Select your service -2. Go to **"Settings"** tab -3. Under **"Networking"**, click **"Generate Domain"** - - - - -Your app is now live! Railway auto-deploys on every GitHub push. - ---- - -## Configuration (Optional) - -By default, Railway uses [Nixpacks](https://docs.railway.com/guides/build-configuration#nixpacks-options) to automatically detect and build your Bun application with zero configuration. - -However, using the [Railpack](https://docs.railway.com/guides/build-configuration#railpack) application builder provides better Bun support, and will always support the latest version of Bun. The pre-configured templates use Railpack by default. - -To enable Railpack in a custom project, add the following to your `railway.json`: - -```json railway.json icon="file-json" -{ - "$schema": "https://railway.com/railway.schema.json", - "build": { - "builder": "RAILPACK" - } -} -``` - -For more build configuration settings, check out the [Railway documentation](https://docs.railway.com/guides/build-configuration). diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/guides/deployment/render.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/guides/deployment/render.mdx deleted file mode 100644 index a652bf6..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/guides/deployment/render.mdx +++ /dev/null @@ -1,82 +0,0 @@ ---- -title: Deploy a Bun application on Render -sidebarTitle: Deploy on Render -mode: center ---- - -[Render](https://render.com/) is a cloud platform that lets you flexibly build, deploy, and scale your apps. - -It offers features like auto deploys from GitHub, a global CDN, private networks, automatic HTTPS setup, and managed PostgreSQL and Redis. - -Render supports Bun natively. You can deploy Bun apps as web services, background workers, cron jobs, and more. - ---- - -As an example, let's deploy a simple Express HTTP server to Render. - - - - Create a new GitHub repo named `myapp`. Git clone it locally. - - ```sh - git clone git@github.com:my-github-username/myapp.git - cd myapp - ``` - - - Add the Express library. - - ```sh - bun add express - ``` - - - - - Define a simple server with Express: - - ```ts app.ts icon="/icons/typescript.svg" - import express from "express"; - - const app = express(); - const port = process.env.PORT || 3001; - - app.get("/", (req, res) => { - res.send("Hello World!"); - }); - - app.listen(port, () => { - console.log(`Listening on port ${port}...`); - }); - ``` - - - - Commit your changes and push to GitHub. - - ```sh terminal icon="terminal" - git add app.ts bun.lock package.json - git commit -m "Create simple Express app" - git push origin main - ``` - - - In your [Render Dashboard](https://dashboard.render.com/), click `New` > `Web Service` and connect your `myapp` repo. - - - - In the Render UI, provide the following values during web service creation: - - | | | - | ----------------- | ------------- | - | **Runtime** | `Node` | - | **Build Command** | `bun install` | - | **Start Command** | `bun app.ts` | - - - - - -That's it! Your web service will be live at its assigned `onrender.com` URL as soon as the build finishes. - -You can view the [deploy logs](https://docs.render.com/logging#logs-for-an-individual-deploy-or-job) for details. Refer to [Render's documentation](https://docs.render.com/deploys) for a complete overview of deploying on Render. diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/guides/deployment/vercel.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/guides/deployment/vercel.mdx deleted file mode 100644 index cb5693a..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/guides/deployment/vercel.mdx +++ /dev/null @@ -1,97 +0,0 @@ ---- -title: Deploy a Bun application on Vercel -sidebarTitle: Deploy on Vercel -mode: center ---- - -[Vercel](https://vercel.com/) is a cloud platform that lets you build, deploy, and scale your apps. - - - The Bun runtime is in Beta; certain features (e.g., automatic source maps, byte-code caching, metrics on - `node:http/https`) are not yet supported. - - - - `Bun.serve` is currently not supported on Vercel Functions. Use Bun with frameworks supported by Vercel, like Next.js, - Express, Hono, or Nitro. - - ---- - - - - To enable the Bun runtime for your Functions, add a `bunVersion` field in your `vercel.json` file: - - ```json vercel.json icon="file-json" - { - "bunVersion": "1.x" // [!code ++] - } - ``` - - Vercel automatically detects this configuration and runs your application on Bun. The value has to be `"1.x"`, Vercel handles the minor version internally. - - For best results, match your local Bun version with the version used by Vercel. - - - - If you’re deploying a **Next.js** project (including ISR), update your `package.json` scripts to use the Bun runtime: - - ```json package.json icon="file-json" - { - "scripts": { - "dev": "bun --bun next dev", // [!code ++] - "build": "bun --bun next build" // [!code ++] - } - } - ``` - - - The `--bun` flag runs the Next.js CLI under Bun. Bundling (via Turbopack or Webpack) remains unchanged, but all commands execute within the Bun runtime. - - - This ensures both local development and builds use Bun. - - - - Connect your repository to Vercel, or deploy from the CLI: - - ```bash terminal icon="terminal" - # Using bunx (no global install) - bunx vercel login - bunx vercel deploy - ``` - - Or install the Vercel CLI globally: - - ```bash terminal icon="terminal" - bun i -g vercel - vercel login - vercel deploy - ``` - - [Learn more in the Vercel Deploy CLI documentation →](https://vercel.com/docs/cli/deploy) - - - - To confirm your deployment uses Bun, log the Bun version: - - ```ts index.ts icon="/icons/typescript.svg" - console.log("runtime", process.versions.bun); - ``` - ```txt - runtime 1.3.3 - ``` - - [See the Vercel Bun Runtime documentation for feature support →](https://vercel.com/docs/functions/runtimes/bun#feature-support) - - - - ---- - -- [Fluid compute](https://vercel.com/docs/fluid-compute): Both Bun and Node.js runtimes run on Fluid compute and support the same core Vercel Functions features. -- [Middleware](https://vercel.com/docs/routing-middleware): To run Routing Middleware with Bun, set the runtime to `nodejs`: - -```ts middleware.ts icon="/icons/typescript.svg" -export const config = { runtime: "nodejs" }; // [!code ++] -``` diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/guides/ecosystem/astro.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/guides/ecosystem/astro.mdx deleted file mode 100644 index 6609b1a..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/guides/ecosystem/astro.mdx +++ /dev/null @@ -1,82 +0,0 @@ ---- -title: Build an app with Astro and Bun -sidebarTitle: "Astro with Bun" -mode: center ---- - -Initialize a fresh Astro app with `bun create astro`. The `create-astro` package detects when you are using `bunx` and will automatically install dependencies using `bun`. - -```sh terminal icon="terminal" -bun create astro -``` - -```txt -╭─────╮ Houston: -│ ◠ ◡ ◠ We're glad to have you on board. -╰─────╯ - - astro v3.1.4 Launch sequence initiated. - - dir Where should we create your new project? - ./fumbling-field - - tmpl How would you like to start your new project? - Use blog template - ✔ Template copied - - deps Install dependencies? - Yes - ✔ Dependencies installed - - ts Do you plan to write TypeScript? - Yes - - use How strict should TypeScript be? - Strict - ✔ TypeScript customized - - git Initialize a new git repository? - Yes - ✔ Git initialized - - next Liftoff confirmed. Explore your project! - - Enter your project directory using cd ./fumbling-field - Run `bun run dev` to start the dev server. CTRL+C to stop. - Add frameworks like react or tailwind using astro add. - - Stuck? Join us at https://astro.build/chat - -╭─────╮ Houston: -│ ◠ ◡ ◠ Good luck out there, astronaut! 🚀 -╰─────╯ -``` - ---- - -Start the dev server with `bunx`. - -By default, Bun will run the dev server with Node.js. To use the Bun runtime instead, use the `--bun` flag. - -```sh terminal icon="terminal" -bunx --bun astro dev -``` - -```txt - 🚀 astro v3.1.4 started in 200ms - - ┃ Local http://localhost:4321/ - ┃ Network use --host to expose -``` - ---- - -Open [http://localhost:4321](http://localhost:4321) with your browser to see the result. Astro will hot-reload your app as you edit your source files. - - - - - ---- - -Refer to the [Astro docs](https://docs.astro.build/en/getting-started/) for complete documentation. diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/guides/ecosystem/discordjs.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/guides/ecosystem/discordjs.mdx deleted file mode 100644 index 9e5869f..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/guides/ecosystem/discordjs.mdx +++ /dev/null @@ -1,80 +0,0 @@ ---- -title: Create a Discord bot -sidebarTitle: "Discord.js with Bun" -mode: center ---- - -Discord.js works out of the box with Bun. Let's write a simple bot. First create a directory and initialize it with `bun init`. - -```sh terminal icon="terminal" -mkdir my-bot -cd my-bot -bun init -``` - ---- - -Now install Discord.js. - -```sh terminal icon="terminal" -bun add discord.js -``` - ---- - -Before we go further, we need to go to the [Discord developer portal](https://discord.com/developers/applications), login/signup, create a new _Application_, then create a new _Bot_ within that application. Follow the [official guide](https://discordjs.guide/legacy/preparations/app-setup#creating-your-bot) for step-by-step instructions. - ---- - -Once complete, you'll be presented with your bot's _private key_. Let's add this to a file called `.env.local`. Bun automatically reads this file and loads it into `process.env`. - -This is an example token that has already been invalidated. - -```ini .env.local icon="settings" -DISCORD_TOKEN=NzkyNzE1NDU0MTk2MDg4ODQy.X-hvzA.Ovy4MCQywSkoMRRclStW4xAYK7I -``` - ---- - -Be sure to add `.env.local` to your `.gitignore`! It is dangerous to check your bot's private key into version control. - -```txt .gitignore icon="file-code" -node_modules -.env.local -``` - ---- - -Now let's actually write our bot in a new file called `bot.ts`. - -```ts bot.ts icon="/icons/typescript.svg" -// import discord.js -import { Client, Events, GatewayIntentBits } from "discord.js"; - -// create a new Client instance -const client = new Client({ intents: [GatewayIntentBits.Guilds] }); - -// listen for the client to be ready -client.once(Events.ClientReady, c => { - console.log(`Ready! Logged in as ${c.user.tag}`); -}); - -// login with the token from .env.local -client.login(process.env.DISCORD_TOKEN); -``` - ---- - -Now we can run our bot with `bun run`. It may take a several seconds for the client to initialize the first time you run the file. - -```sh terminal icon="terminal" -bun run bot.ts -``` - -```txt -Ready! Logged in as my-bot#1234 -``` - ---- - -You're up and running with a bare-bones Discord.js bot! This is a basic guide to setting up your bot with Bun; we recommend the [official discord.js docs](https://discordjs.guide/) for complete information on the `discord.js` API. diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/guides/ecosystem/docker.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/guides/ecosystem/docker.mdx deleted file mode 100644 index 4c50202..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/guides/ecosystem/docker.mdx +++ /dev/null @@ -1,151 +0,0 @@ ---- -title: Containerize a Bun application with Docker -sidebarTitle: Docker with Bun -mode: center ---- - - - This guide assumes you already have [Docker Desktop](https://www.docker.com/products/docker-desktop/) installed. - - -[Docker](https://www.docker.com) is a platform for packaging and running an application as a lightweight, portable _container_ that encapsulates all the necessary dependencies. - ---- - -To _containerize_ our application, we define a `Dockerfile`. This file contains a list of instructions to initialize the container, copy our local project files into it, install dependencies, and starts the application. - -```docker Dockerfile icon="docker" -# use the official Bun image -# see all versions at https://hub.docker.com/r/oven/bun/tags -FROM oven/bun:1 AS base -WORKDIR /usr/src/app - -# install dependencies into temp directory -# this will cache them and speed up future builds -FROM base AS install -RUN mkdir -p /temp/dev -COPY package.json bun.lock /temp/dev/ -RUN cd /temp/dev && bun install --frozen-lockfile - -# install with --production (exclude devDependencies) -RUN mkdir -p /temp/prod -COPY package.json bun.lock /temp/prod/ -RUN cd /temp/prod && bun install --frozen-lockfile --production - -# copy node_modules from temp directory -# then copy all (non-ignored) project files into the image -FROM base AS prerelease -COPY --from=install /temp/dev/node_modules node_modules -COPY . . - -# [optional] tests & build -ENV NODE_ENV=production -RUN bun test -RUN bun run build - -# copy production dependencies and source code into final image -FROM base AS release -COPY --from=install /temp/prod/node_modules node_modules -COPY --from=prerelease /usr/src/app/index.ts . -COPY --from=prerelease /usr/src/app/package.json . - -# run the app -USER bun -EXPOSE 3000/tcp -ENTRYPOINT [ "bun", "run", "index.ts" ] -``` - ---- - -Now that you have your docker image, let's look at `.dockerignore` which has the same syntax as `.gitignore`, here you need to specify the files/directories that must not go in any stage of the docker build. An example for a ignore file is - -```txt .dockerignore icon="docker" -node_modules -Dockerfile* -docker-compose* -.dockerignore -.git -.gitignore -README.md -LICENSE -.vscode -Makefile -helm-charts -.env -.editorconfig -.idea -coverage* -``` - ---- - -We'll now use `docker build` to convert this `Dockerfile` into a _Docker image_, a self-contained template containing all the dependencies and configuration required to run the application. - -The `-t` flag lets us specify a name for the image, and `--pull` tells Docker to automatically download the latest version of the base image (`oven/bun`). The initial build will take longer, as Docker will download all the base images and dependencies. - -```bash terminal icon="terminal" -docker build --pull -t bun-hello-world . -``` - -```txt -[+] Building 0.9s (21/21) FINISHED - => [internal] load build definition from Dockerfile 0.0s - => => transferring dockerfile: 37B 0.0s - => [internal] load .dockerignore 0.0s - => => transferring context: 35B 0.0s - => [internal] load metadata for docker.io/oven/bun:1 0.8s - => [auth] oven/bun:pull token for registry-1.docker.io 0.0s - => [base 1/2] FROM docker.io/oven/bun:1@sha256:373265748d3cd3624cb3f3ee6004f45b1fc3edbd07a622aeeec17566d2756997 0.0s - => [internal] load build context 0.0s - => => transferring context: 155B 0.0s - # ...lots of commands... - => exporting to image 0.0s - => => exporting layers 0.0s - => => writing image sha256:360663f7fdcd6f11e8e94761d5592e2e4dfc8d167f034f15cd5a863d5dc093c4 0.0s - => => naming to docker.io/library/bun-hello-world 0.0s -``` - ---- - -We've built a new _Docker image_. Now let's use that image to spin up an actual, running _container_. - -We'll use `docker run` to start a new container using the `bun-hello-world` image. It will be run in _detached_ mode (`-d`) and we'll map the container's port 3000 to our local machine's port 3000 (`-p 3000:3000`). - -The `run` command prints a string representing the _container ID_. - -```sh terminal icon="terminal" -docker run -d -p 3000:3000 bun-hello-world -``` - -```txt -7f03e212a15ede8644379bce11a13589f563d3909a9640446c5bbefce993678d -``` - ---- - -The container is now running in the background. Visit [localhost:3000](http://localhost:3000). You should see a `Hello, World!` message. - ---- - -To stop the container, we'll use `docker stop `. - -```sh terminal icon="terminal" -docker stop 7f03e212a15ede8644379bce11a13589f563d3909a9640446c5bbefce993678d -``` - ---- - -If you can't find the container ID, you can use `docker ps` to list all running containers. - -```sh terminal icon="terminal" -docker ps -``` - -```txt -CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES -7f03e212a15e bun-hello-world "bun run index.ts" 2 minutes ago Up 2 minutes 0.0.0.0:3000->3000/tcp flamboyant_cerf -``` - ---- - -That's it! Refer to the [Docker documentation](https://docs.docker.com/) for more advanced usage. diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/guides/ecosystem/drizzle.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/guides/ecosystem/drizzle.mdx deleted file mode 100644 index 58b6e90..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/guides/ecosystem/drizzle.mdx +++ /dev/null @@ -1,195 +0,0 @@ ---- -title: Use Drizzle ORM with Bun -sidebarTitle: Drizzle with Bun -mode: center ---- - -Drizzle is an ORM that supports both a SQL-like "query builder" API and an ORM-like [Queries API](https://orm.drizzle.team/docs/rqb). It supports the `bun:sqlite` built-in module. - ---- - -Let's get started by creating a fresh project with `bun init` and installing Drizzle. - -```sh terminal icon="terminal" -bun init -y -bun add drizzle-orm -bun add -D drizzle-kit -``` - ---- - -Then we'll connect to a SQLite database using the `bun:sqlite` module and create the Drizzle database instance. - -```ts db.ts icon="/icons/typescript.svg" -import { drizzle } from "drizzle-orm/bun-sqlite"; -import { Database } from "bun:sqlite"; - -const sqlite = new Database("sqlite.db"); -export const db = drizzle(sqlite); -``` - ---- - -To see the database in action, add these lines to `index.ts`. - -```ts index.ts icon="/icons/typescript.svg" -import { db } from "./db"; -import { sql } from "drizzle-orm"; - -const query = sql`select "hello world" as text`; -const result = db.get<{ text: string }>(query); -console.log(result); -``` - ---- - -Then run `index.ts` with Bun. Bun will automatically create `sqlite.db` and execute the query. - -```sh terminal icon="terminal" -bun run index.ts -``` - -```txt -{ - text: "hello world" -} -``` - ---- - -Lets give our database a proper schema. Create a `schema.ts` file and define a `movies` table. - -```ts schema.ts icon="/icons/typescript.svg" -import { sqliteTable, text, integer } from "drizzle-orm/sqlite-core"; - -export const movies = sqliteTable("movies", { - id: integer("id").primaryKey(), - title: text("name"), - releaseYear: integer("release_year"), -}); -``` - ---- - -We can use the `drizzle-kit` CLI to generate an initial SQL migration. - -```sh terminal icon="terminal" -bunx drizzle-kit generate --dialect sqlite --schema ./schema.ts -``` - ---- - -This creates a new `drizzle` directory containing a `.sql` migration file and `meta` directory. - -```txt File Tree icon="folder-tree" -drizzle -├── 0000_ordinary_beyonder.sql -└── meta - ├── 0000_snapshot.json - └── _journal.json -``` - ---- - -We can execute these migrations with a simple `migrate.ts` script. - -This script creates a new connection to a SQLite database that writes to `sqlite.db`, then executes all unexecuted migrations in the `drizzle` directory. - -```ts migrate.ts icon="/icons/typescript.svg" -import { migrate } from "drizzle-orm/bun-sqlite/migrator"; - -import { drizzle } from "drizzle-orm/bun-sqlite"; -import { Database } from "bun:sqlite"; - -const sqlite = new Database("sqlite.db"); -const db = drizzle(sqlite); -migrate(db, { migrationsFolder: "./drizzle" }); -``` - ---- - -We can run this script with `bun` to execute the migration. - -```sh terminal icon="terminal" -bun run migrate.ts -``` - ---- - -Now that we have a database, let's add some data to it. Create a `seed.ts` file with the following contents. - -```ts seed.ts icon="/icons/typescript.svg" -import { db } from "./db"; -import * as schema from "./schema"; - -await db.insert(schema.movies).values([ - { - title: "The Matrix", - releaseYear: 1999, - }, - { - title: "The Matrix Reloaded", - releaseYear: 2003, - }, - { - title: "The Matrix Revolutions", - releaseYear: 2003, - }, -]); - -console.log(`Seeding complete.`); -``` - ---- - -Then run this file. - -```sh terminal icon="terminal" -bun run seed.ts -``` - -```txt -Seeding complete. -``` - ---- - -We finally have a database with a schema and some sample data. Let's use Drizzle to query it. Replace the contents of `index.ts` with the following. - -```ts index.ts icon="/icons/typescript.svg" -import * as schema from "./schema"; -import { db } from "./db"; - -const result = await db.select().from(schema.movies); -console.log(result); -``` - ---- - -Then run the file. You should see the three movies we inserted. - -```sh terminal icon="terminal" -bun run index.ts -``` - -```txt -[ - { - id: 1, - title: "The Matrix", - releaseYear: 1999 - }, { - id: 2, - title: "The Matrix Reloaded", - releaseYear: 2003 - }, { - id: 3, - title: "The Matrix Revolutions", - releaseYear: 2003 - } -] -``` - ---- - -Refer to the [Drizzle website](https://orm.drizzle.team/docs/overview) for complete documentation. diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/guides/ecosystem/elysia.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/guides/ecosystem/elysia.mdx deleted file mode 100644 index e28fb1b..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/guides/ecosystem/elysia.mdx +++ /dev/null @@ -1,31 +0,0 @@ ---- -title: Build an HTTP server using Elysia and Bun -sidebarTitle: Elysia with Bun -mode: center ---- - -[Elysia](https://elysiajs.com) is a Bun-first performance focused web framework that takes full advantage of Bun's HTTP, file system, and hot reloading APIs. Get started with `bun create`. - -```bash terminal icon="terminal" -bun create elysia myapp -cd myapp -bun run dev -``` - ---- - -To define a simple HTTP route and start a server with Elysia: - -```ts server.ts icon="/icons/typescript.svg" -import { Elysia } from "elysia"; - -const app = new Elysia().get("/", () => "Hello Elysia").listen(8080); - -console.log(`🦊 Elysia is running at on port ${app.server?.port}...`); -``` - ---- - -Elysia is a full-featured server framework with Express-like syntax, type inference, middleware, file uploads, and plugins for JWT authentication, tRPC, and more. It's also is one of the [fastest Bun web frameworks](https://github.com/SaltyAom/bun-http-framework-benchmark). - -Refer to the Elysia [documentation](https://elysiajs.com/quick-start.html) for more information. diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/guides/ecosystem/express.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/guides/ecosystem/express.mdx deleted file mode 100644 index 4871c0c..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/guides/ecosystem/express.mdx +++ /dev/null @@ -1,43 +0,0 @@ ---- -title: Build an HTTP server using Express and Bun -sidebarTitle: Express with Bun -mode: center ---- - -Express and other major Node.js HTTP libraries should work out of the box. Bun implements the [`node:http`](https://nodejs.org/api/http.html) and [`node:https`](https://nodejs.org/api/https.html) modules that these libraries rely on. - - - Refer to the [Runtime > Node.js APIs](/docs/runtime/nodejs-compat#node-http) page for more detailed compatibility - information. - - -```sh terminal icon="terminal" -bun add express -``` - ---- - -To define a simple HTTP route and start a server with Express: - -```ts server.ts icon="/icons/typescript.svg" -import express from "express"; - -const app = express(); -const port = 8080; - -app.get("/", (req, res) => { - res.send("Hello World!"); -}); - -app.listen(port, () => { - console.log(`Listening on port ${port}...`); -}); -``` - ---- - -To start the server on `localhost`: - -```sh terminal icon="terminal" -bun server.ts -``` diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/guides/ecosystem/gel.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/guides/ecosystem/gel.mdx deleted file mode 100644 index c26a6bf..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/guides/ecosystem/gel.mdx +++ /dev/null @@ -1,261 +0,0 @@ ---- -title: Use Gel with Bun -sidebarTitle: Gel with Bun -mode: center ---- - -Gel (formerly EdgeDB) is a graph-relational database powered by Postgres under the hood. It provides a declarative schema language, migrations system, and object-oriented query language, in addition to supporting raw SQL queries. It solves the object-relational mapping problem at the database layer, eliminating the need for an ORM library in your application code. - ---- - -First, [install Gel](https://docs.geldata.com/learn/installation) if you haven't already. - - - -```sh Linux/macOS terminal icon="terminal" -curl https://www.geldata.com/sh --proto "=https" -sSf1 | sh -``` - -```sh Windows terminal icon="windows" -irm https://www.geldata.com/ps1 | iex -``` - -```sh Homebrew terminal icon="terminal" -brew install geldata/tap/gel-cli -``` - - - ---- - -Use `bun init` to create a fresh project. - -```sh terminal icon="terminal" -mkdir my-edgedb-app -cd my-edgedb-app -bun init -y -``` - ---- - -We'll use the Gel CLI to initialize a Gel instance for our project. This creates a `gel.toml` file in our project root. - -```sh terminal icon="terminal" -gel project init -``` - -```txt -No `gel.toml` found in `/Users/colinmcd94/Documents/bun/fun/examples/my-gel-app` or above -Do you want to initialize a new project? [Y/n] -> Y -Specify the name of Gel instance to use with this project [default: my_gel_app]: -> my_gel_app -Checking Gel versions... -Specify the version of Gel to use with this project [default: x.y]: -> x.y -┌─────────────────────┬──────────────────────────────────────────────────────────────────┐ -│ Project directory │ /Users/colinmcd94/Documents/bun/fun/examples/my-gel-app │ -│ Project config │ /Users/colinmcd94/Documents/bun/fun/examples/my-gel-app/gel.toml│ -│ Schema dir (empty) │ /Users/colinmcd94/Documents/bun/fun/examples/my-gel-app/dbschema│ -│ Installation method │ portable package │ -│ Version │ x.y+6d5921b │ -│ Instance name │ my_gel_app │ -└─────────────────────┴──────────────────────────────────────────────────────────────────┘ -Version x.y+6d5921b is already downloaded -Initializing Gel instance... -Applying migrations... -Everything is up to date. Revision initial -Project initialized. -To connect to my_gel_app, run `gel` -``` - ---- - -To see if the database is running, let's open a REPL and run a simple query. - -```sh terminal icon="terminal" -gel -gel> select 1 + 1; -``` - -```txt -2 -``` - -Then run `\quit` to exit the REPL. - -```sh terminal icon="terminal" -gel> \quit -``` - ---- - -With the project initialized, we can define a schema. The `gel project init` command already created a `dbschema/default.esdl` file to contain our schema. - -```txt File Tree icon="folder-tree" -dbschema -├── default.esdl -└── migrations -``` - ---- - -Open that file and paste the following contents. - -```ts default.esdl icon="file-code" -module default { - type Movie { - required title: str; - releaseYear: int64; - } -}; -``` - ---- - -Then generate and apply an initial migration. - -```sh terminal icon="terminal" -gel migration create -``` - -```txt -Created /Users/colinmcd94/Documents/bun/fun/examples/my-gel-app/dbschema/migrations/00001.edgeql, id: m1uwekrn4ni4qs7ul7hfar4xemm5kkxlpswolcoyqj3xdhweomwjrq -``` - -```sh terminal icon="terminal" -gel migrate -``` - -```txt -Applied m1uwekrn4ni4qs7ul7hfar4xemm5kkxlpswolcoyqj3xdhweomwjrq (00001.edgeql) -``` - ---- - -With our schema applied, let's execute some queries using Gel's JavaScript client library. We'll install the client library and Gel's codegen CLI, and create a `seed.ts`.file. - -```sh terminal icon="terminal" -bun add gel -bun add -D @gel/generate -touch seed.ts -``` - ---- - -Paste the following code into `seed.ts`. - -The client auto-connects to the database. We insert a couple movies using the `.execute()` method. We will use EdgeQL's `for` expression to turn this bulk insert into a single optimized query. - -```ts seed.ts icon="/icons/typescript.svg" -import { createClient } from "gel"; - -const client = createClient(); - -const INSERT_MOVIE = ` - with movies := >>$movies - for movie in array_unpack(movies) union ( - insert Movie { - title := movie.title, - releaseYear := movie.year, - } - ) -`; - -const movies = [ - { title: "The Matrix", year: 1999 }, - { title: "The Matrix Reloaded", year: 2003 }, - { title: "The Matrix Revolutions", year: 2003 }, -]; - -await client.execute(INSERT_MOVIE, { movies }); - -console.log(`Seeding complete.`); -process.exit(); -``` - ---- - -Then run this file with Bun. - -```sh terminal icon="terminal" -bun run seed.ts -``` - -```txt -Seeding complete. -``` - ---- - -Gel implements a number of code generation tools for TypeScript. To query our newly seeded database in a typesafe way, we'll use `@gel/generate` to code-generate the EdgeQL query builder. - -```sh terminal icon="terminal" -bunx @gel/generate edgeql-js -``` - -```txt -Generating query builder... -Detected tsconfig.json, generating TypeScript files. - To override this, use the --target flag. - Run `npx @edgedb/generate --help` for full options. -Introspecting database schema... -Writing files to ./dbschema/edgeql-js -Generation complete! 🤘 -Checking the generated query builder into version control -is not recommended. Would you like to update .gitignore to ignore -the query builder directory? The following line will be added: - - dbschema/edgeql-js - -[y/n] (leave blank for "y") -> y -``` - ---- - -In `index.ts`, we can import the generated query builder from `./dbschema/edgeql-js` and write a simple select query. - -```ts index.ts icon="/icons/typescript.svg" -import { createClient } from "gel"; -import e from "./dbschema/edgeql-js"; - -const client = createClient(); - -const query = e.select(e.Movie, () => ({ - title: true, - releaseYear: true, -})); - -const results = await query.run(client); -console.log(results); - -results; // { title: string, releaseYear: number | null }[] -``` - ---- - -Running the file with Bun, we can see the list of movies we inserted. - -```sh terminal icon="terminal" -bun run index.ts -``` - -```txt -[ - { - title: "The Matrix", - releaseYear: 1999 - }, { - title: "The Matrix Reloaded", - releaseYear: 2003 - }, { - title: "The Matrix Revolutions", - releaseYear: 2003 - } -] -``` - ---- - -For complete documentation, refer to the [Gel docs](https://docs.geldata.com/). diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/guides/ecosystem/hono.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/guides/ecosystem/hono.mdx deleted file mode 100644 index a5a5cdc..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/guides/ecosystem/hono.mdx +++ /dev/null @@ -1,47 +0,0 @@ ---- -title: Build an HTTP server using Hono and Bun -sidebarTitle: Hono with Bun -mode: center ---- - -[Hono](https://github.com/honojs/hono) is a lightweight ultrafast web framework designed for the edge. - -```ts server.ts icon="/icons/typescript.svg" -import { Hono } from "hono"; -const app = new Hono(); - -app.get("/", c => c.text("Hono!")); - -export default app; -``` - ---- - -Use `create-hono` to get started with one of Hono's project templates. Select `bun` when prompted for a template. - -```sh terminal icon="terminal" -bun create hono myapp -``` - -```txt -✔ Which template do you want to use? › bun -cloned honojs/starter#main to /path/to/myapp -✔ Copied project files -``` - -```sh terminal icon="terminal" -cd myapp -bun install -``` - ---- - -Then start the dev server and visit [localhost:3000](http://localhost:3000). - -```sh terminal icon="terminal" -bun run dev -``` - ---- - -Refer to Hono's guide on [getting started with Bun](https://hono.dev/getting-started/bun) for more information. diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/guides/ecosystem/mongoose.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/guides/ecosystem/mongoose.mdx deleted file mode 100644 index 01d3d2f..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/guides/ecosystem/mongoose.mdx +++ /dev/null @@ -1,92 +0,0 @@ ---- -title: Read and write data to MongoDB using Mongoose and Bun -sidebarTitle: Mongoose with Bun -mode: center ---- - -MongoDB and Mongoose work out of the box with Bun. This guide assumes you've already installed MongoDB and are running it as background process/service on your development machine. Follow [this guide](https://www.mongodb.com/docs/manual/installation/) for details. - ---- - -Once MongoDB is running, create a directory and initialize it with `bun init`. - -```sh terminal icon="terminal" -mkdir mongoose-app -cd mongoose-app -bun init -``` - ---- - -Then add Mongoose as a dependency. - -```sh terminal icon="terminal" -bun add mongoose -``` - ---- - -In `schema.ts` we'll declare and export a simple `Animal` model. - -```ts schema.ts icon="/icons/typescript.svg" -import * as mongoose from "mongoose"; - -const animalSchema = new mongoose.Schema( - { - title: { type: String, required: true }, - sound: { type: String, required: true }, - }, - { - methods: { - speak() { - console.log(`${this.sound}!`); - }, - }, - }, -); - -export type Animal = mongoose.InferSchemaType; -export const Animal = mongoose.model("Animal", animalSchema); -``` - ---- - -Now from `index.ts` we can import `Animal`, connect to MongoDB, and add some data to our database. - -```ts index.ts icon="/icons/typescript.svg" -import * as mongoose from "mongoose"; -import { Animal } from "./schema"; - -// connect to database -await mongoose.connect("mongodb://127.0.0.1:27017/mongoose-app"); - -// create new Animal -const cow = new Animal({ - title: "Cow", - sound: "Moo", -}); -await cow.save(); // saves to the database - -// read all Animals -const animals = await Animal.find(); -animals[0].speak(); // logs "Moo!" - -// disconnect -await mongoose.disconnect(); -``` - ---- - -Let's run this with `bun run`. - -```bash terminal icon="terminal" -bun run index.ts -``` - -```txt -Moo! -``` - ---- - -This is a simple introduction to using Mongoose with TypeScript and Bun. As you build your application, refer to the official [MongoDB](https://www.mongodb.com/docs) and [Mongoose](https://mongoosejs.com/docs/) sites for complete documentation. diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/guides/ecosystem/neon-drizzle.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/guides/ecosystem/neon-drizzle.mdx deleted file mode 100644 index f33f7d3..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/guides/ecosystem/neon-drizzle.mdx +++ /dev/null @@ -1,234 +0,0 @@ ---- -title: Use Neon Postgres through Drizzle ORM -sidebarTitle: Neon Drizzle with Bun -mode: center ---- - -[Neon](https://neon.tech/) is a fully managed serverless Postgres, separating compute and storage to offer features like autoscaling, branching and bottomless storage. Neon can be used from Bun directly using the `@neondatabase/serverless` driver or through an ORM like `Drizzle`. - -Drizzle ORM supports both a SQL-like "query builder" API and an ORM-like [Queries API](https://orm.drizzle.team/docs/rqb). Get started by creating a project directory, initializing the directory using `bun init`, and installing Drizzle and the [Neon serverless driver](https://github.com/neondatabase/serverless/). - -```sh terminal icon="terminal" -mkdir bun-drizzle-neon -cd bun-drizzle-neon -bun init -y -bun add drizzle-orm @neondatabase/serverless -bun add -D drizzle-kit -``` - ---- - -Create a `.env.local` file and add your [Neon Postgres connection string](https://neon.tech/docs/connect/connect-from-any-app) to it. - -```ini .env.local icon="settings" -DATABASE_URL=postgresql://usertitle:password@ep-adj-noun-guid.us-east-1.aws.neon.tech/neondb?sslmode=require -``` - ---- - -We will connect to the Neon database using the Neon serverless driver, wrapped in a Drizzle database instance. - -```ts db.ts icon="/icons/typescript.svg" -import { neon } from "@neondatabase/serverless"; -import { drizzle } from "drizzle-orm/neon-http"; - -// Bun automatically loads the DATABASE_URL from .env.local -// Refer to: https://bun.com/docs/runtime/environment-variables for more information -const sql = neon(process.env.DATABASE_URL!); - -export const db = drizzle(sql); -``` - ---- - -To see the database in action, add these lines to `index.ts`. - -```ts index.ts icon="/icons/typescript.svg" -import { db } from "./db"; -import { sql } from "drizzle-orm"; - -const query = sql`select 'hello world' as text`; -const result = await db.execute(query); -console.log(result.rows); -``` - ---- - -Then run `index.ts` with Bun. - -```sh terminal icon="terminal" -bun run index.ts -``` - -```txt -[ - { - text: "hello world", - } -] -``` - ---- - -We can define a schema for our database using Drizzle ORM primitives. Create a `schema.ts` file and add this code. - -```ts schema.ts icon="/icons/typescript.svg" -import { pgTable, integer, serial, text, timestamp } from "drizzle-orm/pg-core"; - -export const authors = pgTable("authors", { - id: serial("id").primaryKey(), - title: text("name").notNull(), - bio: text("bio"), - createdAt: timestamp("created_at").notNull().defaultNow(), -}); -``` - ---- - -We then use the `drizzle-kit` CLI to generate an initial SQL migration. - -```sh -bunx drizzle-kit generate --dialect postgresql --schema ./schema.ts --out ./drizzle -``` - ---- - -This creates a new `drizzle` directory containing a `.sql` migration file and `meta` directory. - -```txt File Tree icon="folder-tree" -drizzle -├── 0000_aspiring_post.sql -└── meta - ├── 0000_snapshot.json - └── _journal.json -``` - ---- - -We can execute these migrations with a simple `migrate.ts` script. This script creates a new connection to the Neon database and executes all unexecuted migrations in the `drizzle` directory. - -```ts migrate.ts -import { db } from "./db"; -import { migrate } from "drizzle-orm/neon-http/migrator"; - -const main = async () => { - try { - await migrate(db, { migrationsFolder: "drizzle" }); - console.log("Migration completed"); - } catch (error) { - console.error("Error during migration:", error); - process.exit(1); - } -}; - -main(); -``` - ---- - -We can run this script with `bun` to execute the migration. - -```sh terminal icon="terminal" -bun run migrate.ts -``` - -```txt -Migration completed -``` - ---- - -We can now add some data to our database. Create a `seed.ts` file with the following contents. - -```ts seed.ts icon="/icons/typescript.svg" -import { db } from "./db"; -import * as schema from "./schema"; - -async function seed() { - await db.insert(schema.authors).values([ - { - title: "J.R.R. Tolkien", - bio: "The creator of Middle-earth and author of The Lord of the Rings.", - }, - { - title: "George R.R. Martin", - bio: "The author of the epic fantasy series A Song of Ice and Fire.", - }, - { - title: "J.K. Rowling", - bio: "The creator of the Harry Potter series.", - }, - ]); -} - -async function main() { - try { - await seed(); - console.log("Seeding completed"); - } catch (error) { - console.error("Error during seeding:", error); - process.exit(1); - } -} - -main(); -``` - ---- - -Then run this file. - -```sh terminal icon="terminal" -bun run seed.ts -``` - -```txt -Seeding completed -``` - ---- - -We now have a database with a schema and sample data. We can use Drizzle to query it. Replace the contents of `index.ts` with the following. - -```ts index.ts icon="/icons/typescript.svg" -import * as schema from "./schema"; -import { db } from "./db"; - -const result = await db.select().from(schema.authors); -console.log(result); -``` - ---- - -Then run the file. You should see the three authors we inserted. - -```sh terminal icon="terminal" -bun run index.ts -``` - -```txt -[ - { - id: 1, - title: "J.R.R. Tolkien", - bio: "The creator of Middle-earth and author of The Lord of the Rings.", - createdAt: 2024-05-11T10:28:46.029Z, - }, { - id: 2, - title: "George R.R. Martin", - bio: "The author of the epic fantasy series A Song of Ice and Fire.", - createdAt: 2024-05-11T10:28:46.029Z, - }, { - id: 3, - title: "J.K. Rowling", - bio: "The creator of the Harry Potter series.", - createdAt: 2024-05-11T10:28:46.029Z, - } -] -``` - ---- - -This example used the Neon serverless driver's SQL-over-HTTP functionality. Neon's serverless driver also exposes `Client` and `Pool` constructors to enable sessions, interactive transactions, and node-postgres compatibility. Refer to [Neon's documentation](https://neon.tech/docs/serverless/serverless-driver) for a complete overview. - -Refer to the [Drizzle website](https://orm.drizzle.team/docs/overview) for more documentation on using the Drizzle ORM. diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/guides/ecosystem/neon-serverless-postgres.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/guides/ecosystem/neon-serverless-postgres.mdx deleted file mode 100644 index a081f37..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/guides/ecosystem/neon-serverless-postgres.mdx +++ /dev/null @@ -1,60 +0,0 @@ ---- -title: Use Neon's Serverless Postgres with Bun -sidebarTitle: Neon Serverless Postgres with Bun -mode: center ---- - -[Neon](https://neon.tech/) is a fully managed serverless Postgres. Neon separates compute and storage to offer modern developer features such as autoscaling, branching, bottomless storage, and more. - ---- - -Get started by creating a project directory, initializing the directory using `bun init`, and adding the [Neon serverless driver](https://github.com/neondatabase/serverless/) as a project dependency. - -```sh terminal icon="terminal" -mkdir bun-neon-postgres -cd bun-neon-postgres -bun init -y -bun add @neondatabase/serverless -``` - ---- - -Create a `.env.local` file and add your [Neon Postgres connection string](https://neon.tech/docs/connect/connect-from-any-app) to it. - -```ini .env.local icon="settings" -DATABASE_URL=postgresql://usertitle:password@ep-adj-noun-guid.us-east-1.aws.neon.tech/neondb?sslmode=require -``` - ---- - -Paste the following code into your project's `index.ts` file. - -```ts index.ts icon="/icons/typescript.svg" -import { neon } from "@neondatabase/serverless"; - -// Bun automatically loads the DATABASE_URL from .env.local -// Refer to: https://bun.com/docs/runtime/environment-variables for more information -const sql = neon(process.env.DATABASE_URL); - -const rows = await sql`SELECT version()`; - -console.log(rows[0].version); -``` - ---- - -Start the program using `bun ./index.ts`. The Postgres version should be printed to the console. - -```sh terminal icon="terminal" -bun ./index.ts -``` - -```txt -PostgreSQL 16.2 on x86_64-pc-linux-gnu, compiled by gcc (Debian 10.2.1-6) 10.2.1 20210110, 64-bit -``` - ---- - -This example used the Neon serverless driver's SQL-over-HTTP functionality. Neon's serverless driver also exposes `Client` and `Pool` constructors to enable sessions, interactive transactions, and node-postgres compatibility. - -Refer to [Neon's documentation](https://neon.tech/docs/serverless/serverless-driver) for a complete overview of the serverless driver. diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/guides/ecosystem/nextjs.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/guides/ecosystem/nextjs.mdx deleted file mode 100644 index 0cd9ccd..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/guides/ecosystem/nextjs.mdx +++ /dev/null @@ -1,103 +0,0 @@ ---- -title: Build an app with Next.js and Bun -sidebarTitle: Next.js with Bun -mode: center ---- - -[Next.js](https://nextjs.org/) is a React framework for building full-stack web applications. It supports server-side rendering, static site generation, API routes, and more. Bun provides fast package installation and can run Next.js development and production servers. - ---- - - - - Use the interactive CLI to create a new Next.js app. This will scaffold a new Next.js project and automatically install dependencies. - - ```sh terminal icon="terminal" - bun create next-app@latest my-bun-app - ``` - - - - Change to the project directory and run the dev server with Bun. - - ```sh terminal icon="terminal" - cd my-bun-app - bun --bun run dev - ``` - - This starts the Next.js dev server with Bun's runtime. - - Open [`http://localhost:3000`](http://localhost:3000) with your browser to see the result. Any changes you make to `app/page.tsx` will be hot-reloaded in the browser. - - - - Modify the scripts field in your `package.json` by prefixing the Next.js CLI commands with `bun --bun`. This ensures that Bun executes the Next.js CLI for common tasks like `dev`, `build`, and `start`. - - ```json package.json icon="file-json" - { - "scripts": { - "dev": "bun --bun next dev", // [!code ++] - "build": "bun --bun next build", // [!code ++] - "start": "bun --bun next start", // [!code ++] - } - } - ``` - - - - ---- - -## Hosting - -Next.js applications on Bun can be deployed to various platforms. - - - - Deploy on Vercel - - - Deploy on Railway - - - Deploy on DigitalOcean - - - Deploy on AWS Lambda - - - Deploy on Google Cloud Run - - - Deploy on Render - - - ---- - -## Templates - - - - A simple App Router starter with Bun, Next.js, and Tailwind CSS. - - - A full-stack todo application built with Bun, Next.js, and PostgreSQL. - - - ---- - -[→ See Next.js's official documentation](https://nextjs.org/docs) for more information on building and deploying Next.js applications. diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/guides/ecosystem/nuxt.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/guides/ecosystem/nuxt.mdx deleted file mode 100644 index 2588026..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/guides/ecosystem/nuxt.mdx +++ /dev/null @@ -1,96 +0,0 @@ ---- -title: Build an app with Nuxt and Bun -sidebarTitle: Nuxt with Bun -mode: center ---- - -Bun supports [Nuxt](https://nuxt.com) out of the box. Initialize a Nuxt app with official `nuxi` CLI. - -```sh terminal icon="terminal" -bunx nuxi init my-nuxt-app -``` - -```txt -✔ Which package manager would you like to use? -bun -◐ Installing dependencies... -bun install v1.3.3 (16b4bf34) - + @nuxt/devtools@0.8.2 - + nuxt@3.7.0 - 785 packages installed [2.67s] -✔ Installation completed. -✔ Types generated in .nuxt -✨ Nuxt project has been created with the v3 template. Next steps: - › cd my-nuxt-app - › Start development server with bun run dev -``` - ---- - -To start the dev server, run `bun --bun run dev` from the project root. This will execute the `nuxt dev` command (as defined in the `"dev"` script in `package.json`). - - - The `nuxt` CLI uses Node.js by default; passing the `--bun` flag forces the dev server to use the Bun runtime instead. - - -```sh terminal icon="terminal" -cd my-nuxt-app -bun --bun run dev -``` - -```txt -nuxt dev -Nuxi 3.6.5 -Nuxt 3.6.5 with Nitro 2.5.2 - > Local: http://localhost:3000/ - > Network: http://192.168.0.21:3000/ - > Network: http://[fd8a:d31d:481c:4883:1c64:3d90:9f83:d8a2]:3000/ - -✔ Nuxt DevTools is enabled v0.8.0 (experimental) -ℹ Vite client warmed up in 547ms -✔ Nitro built in 244 ms -``` - ---- - -Once the dev server spins up, open [http://localhost:3000](http://localhost:3000) to see the app. The app will render Nuxt's built-in `NuxtWelcome` template component. - -To start developing your app, replace `` in `app.vue` with your own UI. - - - ![Demo Nuxt app running on - localhost](https://github.com/oven-sh/bun/assets/3084745/2c683ecc-3298-4bb0-b8c0-cf4cfaea1daa) - - ---- - -For production build, while the default preset is already compatible with Bun, you can also use [Bun preset](https://nitro.build/deploy/runtimes/bun) to generate better optimized builds. - -```ts nuxt.config.ts icon="/icons/typescript.svg" -export default defineNuxtConfig({ - nitro: { - preset: "bun", // [!code ++] - }, -}); -``` - -Alternatively, you can set the preset via environment variable: - -```sh terminal icon="terminal" -NITRO_PRESET=bun bun run build -``` - - - Some packages provide Bun-specific exports that Nitro will not bundle correctly using the default preset. In this - case, you need to use Bun preset so that the packages will work correctly in production builds. - - -After building with bun, run: - -```sh terminal icon="terminal" -bun run ./.output/server/index.mjs -``` - ---- - -Refer to the [Nuxt website](https://nuxt.com/docs) for complete documentation. diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/guides/ecosystem/pm2.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/guides/ecosystem/pm2.mdx deleted file mode 100644 index 70d4242..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/guides/ecosystem/pm2.mdx +++ /dev/null @@ -1,55 +0,0 @@ ---- -title: Run Bun as a daemon with PM2 -sidebarTitle: PM2 with Bun -mode: center ---- - -[PM2](https://pm2.keymetrics.io/) is a popular process manager that manages and runs your applications as daemons (background processes). - -It offers features like process monitoring, automatic restarts, and easy scaling. Using a process manager is common when deploying a Bun application on a cloud-hosted virtual private server (VPS), as it: - -- Keeps your Node.js application running continuously. -- Ensure high availability and reliability of your application. -- Monitor and manage multiple processes with ease. -- Simplify the deployment process. - ---- - -You can use PM2 with Bun in two ways: as a CLI option or in a configuration file. - -### With `--interpreter` - -To start your application with PM2 and Bun as the interpreter, open your terminal and run the following command: - -```bash terminal icon="terminal" -pm2 start --interpreter ~/.bun/bin/bun index.ts -``` - ---- - -### With a configuration file - -Alternatively, you can create a PM2 configuration file. Create a file named `pm2.config.js` in your project directory and add the following content. - -```js pm2.config.js icon="file-code" -module.exports = { - title: "app", // Name of your application - script: "index.ts", // Entry point of your application - interpreter: "bun", // Bun interpreter - env: { - PATH: `${process.env.HOME}/.bun/bin:${process.env.PATH}`, // Add "~/.bun/bin/bun" to PATH - }, -}; -``` - ---- - -After saving the file, you can start your application with PM2 - -```bash terminal icon="terminal" -pm2 start pm2.config.js -``` - ---- - -That’s it! Your JavaScript/TypeScript web server is now running as a daemon with PM2 using Bun as the interpreter. diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/guides/ecosystem/prisma-postgres.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/guides/ecosystem/prisma-postgres.mdx deleted file mode 100644 index fb0133e..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/guides/ecosystem/prisma-postgres.mdx +++ /dev/null @@ -1,169 +0,0 @@ ---- -title: Use Prisma Postgres with Bun -sidebarTitle: Prisma Postgres with Bun -mode: center ---- - - - **Note** — At the moment Prisma needs Node.js to be installed to run certain generation code. Make sure Node.js is - installed in the environment where you're running `bunx prisma` commands. - - - - - First, create a directory and initialize it with `bun init`. - - ```bash terminal icon="terminal" - mkdir prisma-postgres-app - cd prisma-postgres-app - bun init - ``` - - - - Then install the Prisma CLI (`prisma`), Prisma Client (`@prisma/client`), and the accelerate extension as dependencies. - - ```bash terminal icon="terminal" - bun add -d prisma - bun add @prisma/client @prisma/extension-accelerate - ``` - - - - We'll use the Prisma CLI with `bunx` to initialize our schema and migration directory. We'll be using PostgreSQL as our database. - - ```bash terminal icon="terminal" - bunx --bun prisma init --db - ``` - - This creates a basic schema. We need to update it to use the new Rust-free client with Bun optimization. Open `prisma/schema.prisma` and modify the generator block, then add a simple `User` model. - - ```prisma prisma/schema.prisma icon="/icons/ecosystem/prisma.svg" - generator client { - provider = "prisma-client" - output = "./generated" // [!code ++] - engineType = "client" // [!code ++] - runtime = "bun" // [!code ++] - } - - datasource db { - provider = "postgresql" - url = env("DATABASE_URL") - } - - model User { // [!code ++] - id Int @id @default(autoincrement()) // [!code ++] - email String @unique // [!code ++] - name String? // [!code ++] - } // [!code ++] - ``` - - - - Set up your Postgres database URL in the `.env` file. - - ```ini .env icon="settings" - DATABASE_URL="postgresql://username:password@localhost:5432/mydb?schema=public" - ``` - - - - Then generate and run initial migration. - - This will generate a `.sql` migration file in `prisma/migrations`, and execute the migration against your Postgres database. - - ```bash terminal icon="terminal" - bunx --bun prisma migrate dev --name init - ``` - - ```txt - Environment variables loaded from .env - Prisma schema loaded from prisma/schema.prisma - Datasource "db": PostgreSQL database "mydb", schema "public" at "localhost:5432" - - Applying migration `20250114141233_init` - - The following migration(s) have been created and applied from new schema changes: - - prisma/migrations/ - └─ 20250114141233_init/ - └─ migration.sql - - Your database is now in sync with your schema. - - ✔ Generated Prisma Client (6.17.1) to ./generated in 18ms - ``` - - - - As indicated in the output, Prisma re-generates our _Prisma client_ whenever we execute a new migration. The client provides a fully typed API for reading and writing from our database. You can manually re-generate the client with the Prisma CLI. - - ```sh terminal icon="terminal" - bunx --bun prisma generate - ``` - - - - Now we need to create a Prisma client instance. Create a new file `prisma/db.ts` to initialize the PrismaClient with the Postgres adapter. - - ```ts prisma/db.ts icon="/icons/typescript.svg" - import { PrismaClient } from "./generated/client"; - import { withAccelerate } from '@prisma/extension-accelerate' - - export const prisma = new PrismaClient().$extends(withAccelerate()) - ``` - - - - Let's write a simple script to create a new user, then count the number of users in the database. - - ```ts index.ts icon="/icons/typescript.svg" - import { prisma } from "./prisma/db"; - - // create a new user - await prisma.user.create({ - data: { - name: "John Dough", - email: `john-${Math.random()}@example.com`, - }, - }); - - // count the number of users - const count = await prisma.user.count(); - console.log(`There are ${count} users in the database.`); - ``` - - - - Let's run this script with `bun run`. Each time we run it, a new user is created. - - ```bash terminal icon="terminal" - bun run index.ts - ``` - - ```txt - There are 1 users in the database. - ``` - - ```bash terminal icon="terminal" - bun run index.ts - ``` - - ```txt - There are 2 users in the database. - ``` - - ```bash terminal icon="terminal" - bun run index.ts - ``` - - ```txt - There are 3 users in the database. - ``` - - - - ---- - -That's it! Now that you've set up Prisma Postgres using Bun, we recommend referring to the [official Prisma Postgres docs](https://www.prisma.io/docs/postgres) as you continue to develop your application. diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/guides/ecosystem/prisma.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/guides/ecosystem/prisma.mdx deleted file mode 100644 index f586b65..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/guides/ecosystem/prisma.mdx +++ /dev/null @@ -1,164 +0,0 @@ ---- -title: Use Prisma with Bun -sidebarTitle: Prisma ORM with Bun -mode: center ---- - - - **Note** — Prisma's dynamic subcommand loading system currently requires npm to be installed alongside Bun. This - affects certain CLI commands like `prisma init`, `prisma migrate`, etc. Generated code works perfectly with Bun using - the new `prisma-client` generator. - - - - - Prisma works out of the box with Bun. First, create a directory and initialize it with `bun init`. - - ```bash terminal icon="terminal" - mkdir prisma-app - cd prisma-app - bun init - ``` - - - - Then install the Prisma CLI (`prisma`), Prisma Client (`@prisma/client`), and the LibSQL adapter as dependencies. - - ```bash terminal icon="terminal" - bun add -d prisma - bun add @prisma/client @prisma/adapter-libsql - ``` - - - - We'll use the Prisma CLI with `bunx` to initialize our schema and migration directory. For simplicity we'll be using an in-memory SQLite database. - - ```bash terminal icon="terminal" - bunx --bun prisma init --datasource-provider sqlite - ``` - - This creates a basic schema. We need to update it to use the new Rust-free client with Bun optimization. Open `prisma/schema.prisma` and modify the generator block, then add a simple `User` model. - - ```prisma prisma/schema.prisma icon="/icons/ecosystem/prisma.svg" - generator client { - provider = "prisma-client" // [!code ++] - output = "./generated" // [!code ++] - engineType = "client" // [!code ++] - runtime = "bun" // [!code ++] - } - - datasource db { - provider = "sqlite" - url = env("DATABASE_URL") - } - - model User { // [!code ++] - id Int @id @default(autoincrement()) // [!code ++] - email String @unique // [!code ++] - name String? // [!code ++] - } // [!code ++] - ``` - - - - Then generate and run initial migration. - - This will generate a `.sql` migration file in `prisma/migrations`, create a new SQLite instance, and execute the migration against the new instance. - - ```bash terminal icon="terminal" - bunx --bun prisma migrate dev --name init - ``` - ```txt - Environment variables loaded from .env - Prisma schema loaded from prisma/schema.prisma - Datasource "db": SQLite database "dev.db" at "file:./dev.db" - - SQLite database dev.db created at file:./dev.db - - Applying migration `20251014141233_init` - - The following migration(s) have been created and applied from new schema changes: - - prisma/migrations/ - └─ 20251014141233_init/ - └─ migration.sql - - Your database is now in sync with your schema. - - ✔ Generated Prisma Client (6.17.1) to ./generated in 18ms - ``` - - - - As indicated in the output, Prisma re-generates our _Prisma client_ whenever we execute a new migration. The client provides a fully typed API for reading and writing from our database. You can manually re-generate the client with the Prisma CLI. - - ```sh terminal icon="terminal" - bunx --bun prisma generate - ``` - - - - Now we need to create a Prisma client instance. Create a new file `prisma/db.ts` to initialize the PrismaClient with the LibSQL adapter. - - ```ts prisma/db.ts icon="/icons/typescript.svg" - import { PrismaClient } from "./generated/client"; - import { PrismaLibSQL } from "@prisma/adapter-libsql"; - - const adapter = new PrismaLibSQL({ url: process.env.DATABASE_URL || "" }); - export const prisma = new PrismaClient({ adapter }); - ``` - - - - Let's write a simple script to create a new user, then count the number of users in the database. - - ```ts index.ts icon="/icons/typescript.svg" - import { prisma } from "./prisma/db"; - - // create a new user - await prisma.user.create({ - data: { - name: "John Dough", - email: `john-${Math.random()}@example.com`, - }, - }); - - // count the number of users - const count = await prisma.user.count(); - console.log(`There are ${count} users in the database.`); - ``` - - - - Let's run this script with `bun run`. Each time we run it, a new user is created. - - ```bash terminal icon="terminal" - bun run index.ts - ``` - ```txg - Created john-0.12802932895402364@example.com - There are 1 users in the database. - ``` - - ```bash terminal icon="terminal" - bun run index.ts - ``` - ```txt - Created john-0.8671308799782803@example.com - There are 2 users in the database. - ``` - - ```bash terminal icon="terminal" - bun run index.ts - ``` - ```txt - Created john-0.4465968383115295@example.com - There are 3 users in the database. - ``` - - - - ---- - -That's it! Now that you've set up Prisma using Bun, we recommend referring to the [official Prisma docs](https://www.prisma.io/docs/orm/prisma-client) as you continue to develop your application. diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/guides/ecosystem/qwik.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/guides/ecosystem/qwik.mdx deleted file mode 100644 index 1c3cdd8..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/guides/ecosystem/qwik.mdx +++ /dev/null @@ -1,114 +0,0 @@ ---- -title: Build an app with Qwik and Bun -sidebarTitle: Qwik with Bun -mode: center ---- - -Initialize a new Qwik app with `bunx create-qwik`. - -The `create-qwik` package detects when you are using `bunx` and will automatically install dependencies using `bun`. - -```sh terminal icon="terminal" -bun create qwik -``` - -```txts - ............ - .::: :--------:. - .:::: .:-------:. - .:::::. .:-------. - ::::::. .:------. - ::::::. :-----: - ::::::. .:-----. - :::::::. .-----. - ::::::::.. ---:. - .:::::::::. :-:. - ..:::::::::::: - ...:::: - - -┌ Let's create a Qwik App ✨ (v1.2.10) -│ -◇ Where would you like to create your new project? (Use '.' or './' for current directory) -│ ./my-app -│ -● Creating new project in /path/to/my-app ... 🐇 -│ -◇ Select a starter -│ Basic App -│ -◇ Would you like to install bun dependencies? -│ Yes -│ -◇ Initialize a new git repository? -│ No -│ -◇ Finishing the install. Wanna hear a joke? -│ Yes -│ -○ ────────────────────────────────────────────────────────╮ -│ │ -│ How do you know if there’s an elephant under your bed? │ -│ Your head hits the ceiling! │ -│ │ -├──────────────────────────────────────────────────────────╯ -│ -◇ App Created 🐰 -│ -◇ Installed bun dependencies 📋 -│ -○ Result ─────────────────────────────────────────────╮ -│ │ -│ Success! Project created in my-app directory │ -│ │ -│ Integrations? Add Netlify, Cloudflare, Tailwind... │ -│ bun qwik add │ -│ │ -│ Relevant docs: │ -│ https://qwik.dev/docs/getting-started/ │ -│ │ -│ Questions? Start the conversation at: │ -│ https://qwik.dev/chat │ -│ https://twitter.com/QwikDev │ -│ │ -│ Presentations, Podcasts and Videos: │ -│ https://qwik.dev/media/ │ -│ │ -│ Next steps: │ -│ cd my-app │ -│ bun start │ -│ │ -│ │ -├──────────────────────────────────────────────────────╯ -│ -└ Happy coding! 🎉 - -``` - ---- - -Run `bun run dev` to start the development server. - -```sh terminal icon="terminal" -bun run dev -``` - -```txt -$ vite--mode ssr - -VITE v4.4.7 ready in 1190 ms - -➜ Local: http://localhost:5173/ -➜ Network: use --host to expose -➜ press h to show help -``` - ---- - -Open [http://localhost:5173](http://localhost:5173) with your browser to see the result. Qwik will hot-reload your app as you edit your source files. - -![Qwik screenshot](https://github.com/oven-sh/bun/assets/3084745/ec35f2f7-03dd-4c90-851e-fb4ad150bb28) - ---- - -Refer to the [Qwik docs](https://qwik.dev/docs/getting-started/) for complete documentation. diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/guides/ecosystem/react.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/guides/ecosystem/react.mdx deleted file mode 100644 index d27d674..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/guides/ecosystem/react.mdx +++ /dev/null @@ -1,52 +0,0 @@ ---- -title: Build a React app with Bun -sidebarTitle: React with Bun -mode: center ---- - -Bun supports `.jsx` and `.tsx` files out of the box. React just works with Bun. - -Create a new React app with `bun init --react`. This gives you a template with a simple React app and a simple API server together in one full-stack app. - -```bash terminal icon="terminal" -# Create a new React app -bun init --react - -# Run the app in development mode -bun dev - -# Build as a static site for production -bun run build - -# Run the server in production -bun start -``` - ---- - -### Hot Reloading - -Run `bun dev` to start the app in development mode. This will start the API server and the React app with hot reloading. - -### Full-Stack App - -Run `bun start` to start the API server and frontend together in one process. - -### Static Site - -Run `bun run build` to build the app as a static site. This will create a `dist` directory with the built app and all the assets. - -```txt File Tree icon="folder-tree" -├── src/ -│ ├── index.tsx # Server entry point with API routes -│ ├── frontend.tsx # React app entry point with HMR -│ ├── App.tsx # Main React component -│ ├── APITester.tsx # Component for testing API endpoints -│ ├── index.html # HTML template -│ ├── index.css # Styles -│ └── *.svg # Static assets -├── package.json # Dependencies and scripts -├── tsconfig.json # TypeScript configuration -├── bunfig.toml # Bun configuration -└── bun.lock # Lock file -``` diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/guides/ecosystem/remix.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/guides/ecosystem/remix.mdx deleted file mode 100644 index 8dc405f..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/guides/ecosystem/remix.mdx +++ /dev/null @@ -1,97 +0,0 @@ ---- -title: Build an app with Remix and Bun -sidebarTitle: Remix with Bun -mode: center ---- - - - Currently the Remix development server (`remix dev`) relies on Node.js APIs that Bun does not yet implement. The guide - below uses Bun to initialize a project and install dependencies, but it uses Node.js to run the dev server. - - ---- - -Initialize a Remix app with `create-remix`. - -```sh terminal icon="terminal" -bun create remix -``` - -```txt - remix v1.19.3 💿 Let's build a better website... - - dir Where should we create your new project? - ./my-app - - ◼ Using basic template See https://remix.run/docs/en/main/guides/templates#templates for more - ✔ Template copied - - git Initialize a new git repository? - Yes - - deps Install dependencies with bun? - Yes - - ✔ Dependencies installed - ✔ Git initialized - - done That's it! - Enter your project directory using cd ./my-app - Check out README.md for development and deploy instructions. -``` - ---- - -To start the dev server, run `bun run dev` from the project root. This will start the dev server using the `remix dev` command. Note that Node.js will be used to run the dev server. - -```sh terminal icon="terminal" -cd my-app -bun run dev -``` - -```txt -$ remix dev - -💿 remix dev - -info building... -info built (263ms) -Remix App Server started at http://localhost:3000 (http://172.20.0.143:3000) -``` - ---- - -Open [http://localhost:3000](http://localhost:3000) to see the app. Any changes you make to `app/routes/_index.tsx` will be hot-reloaded in the browser. - - - ![Remix app running on localhost](https://github.com/oven-sh/bun/assets/3084745/c26f1059-a5d4-4c0b-9a88-d9902472fd77) - - ---- - -To build and start your app, run `bun run build` - -```sh terminal icon="terminal" -bun run build -``` - -```txt -$ remix build -info building... (NODE_ENV=production) -info built (158ms) -``` - -Then `bun run start` from the project root. - -```sh terminal icon="terminal" -bun start -``` - -```txt -$ remix-serve ./build/index.js -[remix-serve] http://localhost:3000 (http://192.168.86.237:3000) -``` - ---- - -Read the [Remix docs](https://remix.run/) for more information on how to build apps with Remix. diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/guides/ecosystem/sentry.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/guides/ecosystem/sentry.mdx deleted file mode 100644 index 8f515b9..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/guides/ecosystem/sentry.mdx +++ /dev/null @@ -1,54 +0,0 @@ ---- -title: Add Sentry to a Bun app -sidebarTitle: Sentry with Bun -mode: center ---- - -[Sentry](https://sentry.io) is a developer-first error tracking and performance monitoring platform. Sentry has a first-class SDK for Bun, `@sentry/bun`, that instruments your Bun application to automatically collect error and performance data. - -Don't already have an account and Sentry project established? Head over to [sentry.io](https://sentry.io/signup/), then return to this page. - ---- - -To start using Sentry with Bun, first install the Sentry Bun SDK. - -```sh terminal icon="terminal" -bun add @sentry/bun -``` - ---- - -Then, initialize the Sentry SDK with your Sentry DSN in your app's entry file. You can find your DSN in your Sentry project settings. - -```ts sentry.ts icon="/icons/typescript.svg" -import * as Sentry from "@sentry/bun"; - -// Ensure to call this before importing any other modules! -Sentry.init({ - dsn: "__SENTRY_DSN__", - - // Add Performance Monitoring by setting tracesSampleRate - // We recommend adjusting this value in production - tracesSampleRate: 1.0, -}); -``` - ---- - -You can verify that Sentry is working by capturing a test error: - -```ts sentry.ts icon="/icons/typescript.svg" -setTimeout(() => { - try { - foo(); - } catch (e) { - Sentry.captureException(e); - } -}, 99); -``` - -To view and resolve the recorded error, log into [sentry.io](https://sentry.io/) and open your project. Clicking on the error's title will open a page where you can see detailed information and mark it as resolved. - ---- - -To learn more about Sentry and using the Sentry Bun SDK, view the [Sentry documentation](https://docs.sentry.io/platforms/javascript/guides/bun). diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/guides/ecosystem/solidstart.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/guides/ecosystem/solidstart.mdx deleted file mode 100644 index 3f74238..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/guides/ecosystem/solidstart.mdx +++ /dev/null @@ -1,62 +0,0 @@ ---- -title: Build an app with SolidStart and Bun -sidebarTitle: "SolidStart with Bun" -mode: center ---- - -Initialize a SolidStart app with `create-solid`. You can specify the `--solidstart` flag to create a SolidStart project, and `--ts` for TypeScript support. When prompted for a template, select `basic` for a minimal starter app. - -```sh terminal icon="terminal" -bun create solid my-app --solidstart --ts -``` - -```txt -┌ - Create-Solid v0.6.11 -│ -◇ Project Name -│ my-app -│ -◇ Which template would you like to use? -│ basic -│ -◇ Project created 🎉 -│ -◇ To get started, run: ─╮ -│ │ -│ cd my-app │ -│ bun install │ -│ bun dev │ -│ │ -├────────────────────────╯ -``` - ---- - -As instructed by the `create-solid` CLI, install the dependencies. - -```sh terminal icon="terminal" -cd my-app -bun install -``` - -Then run the development server with `bun dev`. - -```sh terminal icon="terminal" -bun dev -``` - -```txt -$ vinxi dev -vinxi v0.5.8 -vinxi starting dev server - - ➜ Local: http://localhost:3000/ - ➜ Network: use --host to expose -``` - -Open [localhost:3000](http://localhost:3000). Any changes you make to `src/routes/index.tsx` will be hot-reloaded automatically. - ---- - -Refer to the [SolidStart website](https://docs.solidjs.com/solid-start) for complete framework documentation. diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/guides/ecosystem/ssr-react.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/guides/ecosystem/ssr-react.mdx deleted file mode 100644 index 1a5b46c..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/guides/ecosystem/ssr-react.mdx +++ /dev/null @@ -1,49 +0,0 @@ ---- -title: Server-side render (SSR) a React component -sidebarTitle: "SSR React with Bun" -mode: center ---- - -To get started, install `react` & `react-dom`: - -```sh terminal icon="terminal" -# Any package manager can be used -bun add react react-dom -``` - ---- - -To render a React component to an HTML stream server-side (SSR): - -```tsx ssr-react.tsx icon="file-code" -import { renderToReadableStream } from "react-dom/server"; - -function Component(props: { message: string }) { - return ( - -

{props.message}

- - ); -} - -const stream = await renderToReadableStream(); -``` - ---- - -Combining this with `Bun.serve()`, we get a simple SSR HTTP server: - -```tsx server.ts icon="/icons/typescript.svg" -Bun.serve({ - async fetch() { - const stream = await renderToReadableStream(); - return new Response(stream, { - headers: { "Content-Type": "text/html" }, - }); - }, -}); -``` - ---- - -React `19` and later includes an [SSR optimization](https://github.com/facebook/react/pull/25597) that takes advantage of Bun's "direct" `ReadableStream` implementation. If you run into an error like `export named 'renderToReadableStream' not found`, please make sure to install version `19` of `react` & `react-dom`, or import from `react-dom/server.browser` instead of `react-dom/server`. See [facebook/react#28941](https://github.com/facebook/react/issues/28941) for more information. diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/guides/ecosystem/stric.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/guides/ecosystem/stric.mdx deleted file mode 100644 index 359b52a..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/guides/ecosystem/stric.mdx +++ /dev/null @@ -1,54 +0,0 @@ ---- -title: Build an HTTP server using StricJS and Bun -sidebarTitle: "StricJS with Bun" -mode: center ---- - -[StricJS](https://github.com/bunsvr) is a Bun framework for building high-performance web applications and APIs. - -- **Fast** — Stric is one of the fastest Bun frameworks. See [benchmark](https://github.com/bunsvr/benchmark) for more details. -- **Minimal** — The basic components like `@stricjs/router` and `@stricjs/utils` are under 50kB and require no external dependencies. -- **Extensible** — Stric includes with a plugin system, dependency injection, and optional optimizations for handling requests. - ---- - -Use `bun init` to create an empty project. - -```bash terminal icon="terminal" -mkdir myapp -cd myapp -bun init -bun add @stricjs/router @stricjs/utils -``` - ---- - -To implement a simple HTTP server with StricJS: - -```ts index.ts icon="file-code" -import { Router } from "@stricjs/router"; - -export default new Router().get("/", () => new Response("Hi")); -``` - ---- - -To serve static files from `/public`: - -```ts index.ts icon="file-code" -import { dir } from "@stricjs/utils"; - -export default new Router().get("/", () => new Response("Hi")).get("/*", dir("./public")); -``` - ---- - -Run the file in watch mode to start the development server. - -```bash terminal icon="terminal" -bun --watch run index.ts -``` - ---- - -For more info, see Stric's [documentation](https://stricjs.netlify.app). diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/guides/ecosystem/sveltekit.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/guides/ecosystem/sveltekit.mdx deleted file mode 100644 index f886e33..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/guides/ecosystem/sveltekit.mdx +++ /dev/null @@ -1,138 +0,0 @@ ---- -title: Build an app with SvelteKit and Bun -sidebarTitle: "SvelteKit with Bun" -mode: center ---- - -Use `sv create my-app` to create a SvelteKit project with SvelteKit CLI. Answer the prompts to select a template and set up your development environment. - -```sh terminal icon="terminal" -bunx sv create my-app -``` - -```txt -┌ Welcome to the Svelte CLI! (v0.5.7) -│ -◇ Which template would you like? -│ SvelteKit demo -│ -◇ Add type checking with Typescript? -│ Yes, using Typescript syntax -│ -◆ Project created -│ -◇ What would you like to add to your project? -│ none -│ -◇ Which package manager do you want to install dependencies with? -│ bun -│ -◇ Successfully installed dependencies -│ -◇ Project next steps ─────────────────────────────────────────────────────╮ -│ │ -│ 1: cd my-app │ -│ 2: git init && git add -A && git commit -m "Initial commit" (optional) │ -│ 3: bun run dev -- --open │ -│ │ -│ To close the dev server, hit Ctrl-C │ -│ │ -│ Stuck? Visit us at https://svelte.dev/chat │ -│ │ -├──────────────────────────────────────────────────────────────────────────╯ -│ -└ You're all set! -``` - ---- - -Once the project is initialized, `cd` into the new project. You don't need to run 'bun install' since the dependencies are already installed. - -Then start the development server with `bun --bun run dev`. - -To run the dev server with Node.js instead of Bun, you can omit the `--bun` flag. - -```sh terminal icon="terminal" -cd my-app -bun --bun run dev -``` - -```txt - $ vite dev - Forced re-optimization of dependencies - - VITE v5.4.10 ready in 424 ms - - ➜ Local: http://localhost:5173/ - ➜ Network: use --host to expose - ➜ press h + enter to show help -``` - ---- - -Visit [http://localhost:5173](http://localhost:5173/) in a browser to see the template app. - - - ![SvelteKit app running](https://github.com/oven-sh/bun/assets/3084745/7c76eae8-78f9-44fa-9f15-1bd3ca1a47c0) - - ---- - -If you edit and save `src/routes/+page.svelte`, you should see your changes hot-reloaded in the browser. - ---- - -To build for production, you'll need to add the right SvelteKit adapter. Currently we recommend the - -`bun add -D svelte-adapter-bun`. - -Now, make the following changes to your `svelte.config.js`. - -```js svelte.config.js icon="file-code" -import adapter from "@sveltejs/adapter-auto"; // [!code --] -import adapter from "svelte-adapter-bun"; // [!code ++] -import { vitePreprocess } from "@sveltejs/vite-plugin-svelte"; - -/** @type {import('@sveltejs/kit').Config} */ -const config = { - // Consult https://svelte.dev/docs/kit/integrations#preprocessors - // for more information about preprocessors - preprocess: vitePreprocess(), - - kit: { - // adapter-auto only supports some environments, see https://svelte.dev/docs/kit/adapter-auto for a list. - // If your environment is not supported, or you settled on a specific environment, switch out the adapter. - // See https://svelte.dev/docs/kit/adapters for more information about adapters. - adapter: adapter(), - }, -}; - -export default config; -``` - ---- - -To build a production bundle: - -```sh terminal icon="terminal" -bun --bun run build -``` - -```txt - $ vite build - vite v5.4.10 building SSR bundle for production... - "confetti" is imported from external module "@neoconfetti/svelte" but never used in "src/routes/sverdle/+page.svelte". - ✓ 130 modules transformed. - vite v5.4.10 building for production... - ✓ 148 modules transformed. - ... - ✓ built in 231ms - ... - ✓ built in 899ms - - Run npm run preview to preview your production build locally. - - > Using svelte-adapter-bun - ✔ Start server with: bun ./build/index.js - ✔ done -``` diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/guides/ecosystem/systemd.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/guides/ecosystem/systemd.mdx deleted file mode 100644 index 17a599d..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/guides/ecosystem/systemd.mdx +++ /dev/null @@ -1,114 +0,0 @@ ---- -title: Run Bun as a daemon with systemd -sidebarTitle: "systemd with Bun" -mode: center ---- - -[systemd](https://systemd.io) is an init system and service manager for Linux operating systems that manages the startup and control of system processes and services. - ---- - -To run a Bun application as a daemon using **systemd** you'll need to create a _service file_ in `/lib/systemd/system/`. - -```sh terminal icon="terminal" -cd /lib/systemd/system -touch my-app.service -``` - ---- - -Here is a typical service file that runs an application on system start. You can use this as a template for your own service. Replace `YOUR_USER` with the name of the user you want to run the application as. To run as `root`, replace `YOUR_USER` with `root`, though this is generally not recommended for security reasons. - -Refer to the [systemd documentation](https://www.freedesktop.org/software/systemd/man/systemd.service.html) for more information on each setting. - -```ini my-app.service icon="file-code" -[Unit] -# describe the app -Description=My App -# start the app after the network is available -After=network.target - -[Service] -# usually you'll use 'simple' -# one of https://www.freedesktop.org/software/systemd/man/systemd.service.html#Type= -Type=simple -# which user to use when starting the app -User=YOUR_USER -# path to your application's root directory -WorkingDirectory=/home/YOUR_USER/path/to/my-app -# the command to start the app -# requires absolute paths -ExecStart=/home/YOUR_USER/.bun/bin/bun run index.ts -# restart policy -# one of {no|on-success|on-failure|on-abnormal|on-watchdog|on-abort|always} -Restart=always - -[Install] -# start the app automatically -WantedBy=multi-user.target -``` - ---- - -If your application starts a webserver, note that non-`root` users are not able to listen on ports 80 or 443 by default. To permanently allow Bun to listen on these ports when executed by a non-`root` user, use the following command. This step isn't necessary when running as `root`. - -```bash terminal icon="terminal" -setcap CAP_NET_BIND_SERVICE=+eip ~/.bun/bin/bun -``` - ---- - -With the service file configured, you can now _enable_ the service. Once enabled, it will start automatically on reboot. This requires `sudo` permissions. - -```bash terminal icon="terminal" -systemctl enable my-app -``` - ---- - -To start the service without rebooting, you can manually _start_ it. - -```bash terminal icon="terminal" -systemctl start my-app -``` - ---- - -Check the status of your application with `systemctl status`. If you've started your app successfully, you should see something like this: - -```bash terminal icon="terminal" -systemctl status my-app -``` - -```txt -● my-app.service - My App - Loaded: loaded (/lib/systemd/system/my-app.service; enabled; preset: enabled) - Active: active (running) since Thu 2023-10-12 11:34:08 UTC; 1h 8min ago - Main PID: 309641 (bun) - Tasks: 3 (limit: 503) - Memory: 40.9M - CPU: 1.093s - CGroup: /system.slice/my-app.service - └─309641 /home/YOUR_USER/.bun/bin/bun run /home/YOUR_USER/application/index.ts -``` - ---- - -To update the service, edit the contents of the service file, then reload the daemon. - -```bash terminal icon="terminal" -systemctl daemon-reload -``` - ---- - -For a complete guide on the service unit configuration, you can check [this page](https://www.freedesktop.org/software/systemd/man/systemd.service.html). Or refer to this cheatsheet of common commands: - -```bash terminal icon="terminal" -systemctl daemon-reload # tell systemd that some files got changed -systemctl enable my-app # enable the app (to allow auto-start) -systemctl disable my-app # disable the app (turns off auto-start) -systemctl start my-app # start the app if is stopped -systemctl stop my-app # stop the app -systemctl restart my-app # restart the app -``` diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/guides/ecosystem/tanstack-start.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/guides/ecosystem/tanstack-start.mdx deleted file mode 100644 index a84a385..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/guides/ecosystem/tanstack-start.mdx +++ /dev/null @@ -1,791 +0,0 @@ ---- -title: Use TanStack Start with Bun -sidebarTitle: TanStack Start with Bun -mode: center ---- - -[TanStack Start](https://tanstack.com/start/latest) is a full-stack framework powered by TanStack Router. It supports full-document SSR, streaming, server functions, bundling and more, powered by TanStack Router and [Vite](https://vite.dev/). - ---- - - - - Use the interactive CLI to create a new TanStack Start app. - - ```sh terminal icon="terminal" - bun create @tanstack/start@latest my-tanstack-app - ``` - - - - Change to the project directory and run the dev server with Bun. - - ```sh terminal icon="terminal" - cd my-tanstack-app - bun --bun run dev - ``` - - This starts the Vite dev server with Bun. - - - - Modify the scripts field in your `package.json` by prefixing the Vite CLI commands with `bun --bun`. This ensures that Bun executes the Vite CLI for common tasks like `dev`, `build`, and `preview`. - - ```json package.json icon="file-json" - { - "scripts": { - "dev": "bun --bun vite dev", // [!code ++] - "build": "bun --bun vite build", // [!code ++] - "serve": "bun --bun vite preview" // [!code ++] - } - } - ``` - - - - ---- - -## Hosting - -To host your TanStack Start app, you can use [Nitro](https://nitro.build/) or a custom Bun server for production deployments. - - - - - - Add [Nitro](https://nitro.build/) to your project. This tool allows you to deploy your TanStack Start app to different platforms. - - ```sh terminal icon="terminal" - bun add nitro - ``` - - - Update your vite.config.ts file}> - Update your `vite.config.ts` file to include the necessary plugins for TanStack Start with Bun. - - ```ts vite.config.ts icon="/icons/typescript.svg" - // other imports... - import { nitro } from "nitro/vite"; // [!code ++] - - const config = defineConfig({ - plugins: [ - tanstackStart(), - nitro({ preset: "bun" }), // [!code ++] - // other plugins... - ], - }); - - export default config; - ``` - - - The `bun` preset is optional, but it configures the build output specifically for Bun's runtime. - - - - - Make sure `build` and `start` scripts are present in your `package.json` file: - - ```json package.json icon="file-json" - { - "scripts": { - "build": "bun --bun vite build", // [!code ++] - // The .output files are created by Nitro when you run `bun run build`. - // Not necessary when deploying to Vercel. - "start": "bun run .output/server/index.mjs" // [!code ++] - } - } - ``` - - - You do **not** need the custom `start` script when deploying to Vercel. - - - - - Check out one of our guides to deploy your app to a hosting provider. - - - When deploying to Vercel, you can either add the `"bunVersion": "1.x"` to your `vercel.json` file, or add it to the `nitro` config in your `vite.config.ts` file: - - - Do **not** use the `bun` Nitro preset when deploying to Vercel. - - - ```ts vite.config.ts icon="/icons/typescript.svg" - export default defineConfig({ - plugins: [ - tanstackStart(), - nitro({ - preset: "bun", // [!code --] - vercel: { // [!code ++] - functions: { // [!code ++] - runtime: "bun1.x", // [!code ++] - }, // [!code ++] - }, // [!code ++] - }), - ], - }); - ``` - - - - - - - - This custom server implementation is based on [TanStack's Bun template](https://github.com/TanStack/router/blob/main/examples/react/start-bun/server.ts). It provides fine-grained control over static asset serving, including configurable memory management that preloads small files into memory for fast serving while serving larger files on-demand. This approach is useful when you need precise control over resource usage and asset loading behavior in production deployments. - - - - - Create a `server.ts` file in your project root with the following custom server implementation: - - ```ts server.ts icon="/icons/typescript.svg" expandable - /** - * TanStack Start Production Server with Bun - * - * A high-performance production server for TanStack Start applications that - * implements intelligent static asset loading with configurable memory management. - * - * Features: - * - Hybrid loading strategy (preload small files, serve large files on-demand) - * - Configurable file filtering with include/exclude patterns - * - Memory-efficient response generation - * - Production-ready caching headers - * - * Environment Variables: - * - * PORT (number) - * - Server port number - * - Default: 3000 - * - * ASSET_PRELOAD_MAX_SIZE (number) - * - Maximum file size in bytes to preload into memory - * - Files larger than this will be served on-demand from disk - * - Default: 5242880 (5MB) - * - Example: ASSET_PRELOAD_MAX_SIZE=5242880 (5MB) - * - * ASSET_PRELOAD_INCLUDE_PATTERNS (string) - * - Comma-separated list of glob patterns for files to include - * - If specified, only matching files are eligible for preloading - * - Patterns are matched against filenames only, not full paths - * - Example: ASSET_PRELOAD_INCLUDE_PATTERNS="*.js,*.css,*.woff2" - * - * ASSET_PRELOAD_EXCLUDE_PATTERNS (string) - * - Comma-separated list of glob patterns for files to exclude - * - Applied after include patterns - * - Patterns are matched against filenames only, not full paths - * - Example: ASSET_PRELOAD_EXCLUDE_PATTERNS="*.map,*.txt" - * - * ASSET_PRELOAD_VERBOSE_LOGGING (boolean) - * - Enable detailed logging of loaded and skipped files - * - Default: false - * - Set to "true" to enable verbose output - * - * ASSET_PRELOAD_ENABLE_ETAG (boolean) - * - Enable ETag generation for preloaded assets - * - Default: true - * - Set to "false" to disable ETag support - * - * ASSET_PRELOAD_ENABLE_GZIP (boolean) - * - Enable Gzip compression for eligible assets - * - Default: true - * - Set to "false" to disable Gzip compression - * - * ASSET_PRELOAD_GZIP_MIN_SIZE (number) - * - Minimum file size in bytes required for Gzip compression - * - Files smaller than this will not be compressed - * - Default: 1024 (1KB) - * - * ASSET_PRELOAD_GZIP_MIME_TYPES (string) - * - Comma-separated list of MIME types eligible for Gzip compression - * - Supports partial matching for types ending with "/" - * - Default: text/,application/javascript,application/json,application/xml,image/svg+xml - * - * Usage: - * bun run server.ts - */ - - import path from 'node:path' - - // Configuration - const SERVER_PORT = Number(process.env.PORT ?? 3000) - const CLIENT_DIRECTORY = './dist/client' - const SERVER_ENTRY_POINT = './dist/server/server.js' - - // Logging utilities for professional output - const log = { - info: (message: string) => { - console.log(`[INFO] ${message}`) - }, - success: (message: string) => { - console.log(`[SUCCESS] ${message}`) - }, - warning: (message: string) => { - console.log(`[WARNING] ${message}`) - }, - error: (message: string) => { - console.log(`[ERROR] ${message}`) - }, - header: (message: string) => { - console.log(`\n${message}\n`) - }, - } - - // Preloading configuration from environment variables - const MAX_PRELOAD_BYTES = Number( - process.env.ASSET_PRELOAD_MAX_SIZE ?? 5 * 1024 * 1024, // 5MB default - ) - - // Parse comma-separated include patterns (no defaults) - const INCLUDE_PATTERNS = (process.env.ASSET_PRELOAD_INCLUDE_PATTERNS ?? '') - .split(',') - .map((s) => s.trim()) - .filter(Boolean) - .map((pattern: string) => convertGlobToRegExp(pattern)) - - // Parse comma-separated exclude patterns (no defaults) - const EXCLUDE_PATTERNS = (process.env.ASSET_PRELOAD_EXCLUDE_PATTERNS ?? '') - .split(',') - .map((s) => s.trim()) - .filter(Boolean) - .map((pattern: string) => convertGlobToRegExp(pattern)) - - // Verbose logging flag - const VERBOSE = process.env.ASSET_PRELOAD_VERBOSE_LOGGING === 'true' - - // Optional ETag feature - const ENABLE_ETAG = (process.env.ASSET_PRELOAD_ENABLE_ETAG ?? 'true') === 'true' - - // Optional Gzip feature - const ENABLE_GZIP = (process.env.ASSET_PRELOAD_ENABLE_GZIP ?? 'true') === 'true' - const GZIP_MIN_BYTES = Number(process.env.ASSET_PRELOAD_GZIP_MIN_SIZE ?? 1024) // 1KB - const GZIP_TYPES = ( - process.env.ASSET_PRELOAD_GZIP_MIME_TYPES ?? - 'text/,application/javascript,application/json,application/xml,image/svg+xml' - ) - .split(',') - .map((v) => v.trim()) - .filter(Boolean) - - /** - * Convert a simple glob pattern to a regular expression - * Supports * wildcard for matching any characters - */ - function convertGlobToRegExp(globPattern: string): RegExp { - // Escape regex special chars except *, then replace * with .* - const escapedPattern = globPattern - .replace(/[-/\\^$+?.()|[\]{}]/g, '\\$&') - .replace(/\*/g, '.*') - return new RegExp(`^${escapedPattern}$`, 'i') - } - - /** - * Compute ETag for a given data buffer - */ - function computeEtag(data: Uint8Array): string { - const hash = Bun.hash(data) - return `W/"${hash.toString(16)}-${data.byteLength.toString()}"` - } - - /** - * Metadata for preloaded static assets - */ - interface AssetMetadata { - route: string - size: number - type: string - } - - /** - * In-memory asset with ETag and Gzip support - */ - interface InMemoryAsset { - raw: Uint8Array - gz?: Uint8Array - etag?: string - type: string - immutable: boolean - size: number - } - - /** - * Result of static asset preloading process - */ - interface PreloadResult { - routes: Record Response | Promise> - loaded: AssetMetadata[] - skipped: AssetMetadata[] - } - - /** - * Check if a file is eligible for preloading based on configured patterns - */ - function isFileEligibleForPreloading(relativePath: string): boolean { - const fileName = relativePath.split(/[/\\]/).pop() ?? relativePath - - // If include patterns are specified, file must match at least one - if (INCLUDE_PATTERNS.length > 0) { - if (!INCLUDE_PATTERNS.some((pattern) => pattern.test(fileName))) { - return false - } - } - - // If exclude patterns are specified, file must not match any - if (EXCLUDE_PATTERNS.some((pattern) => pattern.test(fileName))) { - return false - } - - return true - } - - /** - * Check if a MIME type is compressible - */ - function isMimeTypeCompressible(mimeType: string): boolean { - return GZIP_TYPES.some((type) => - type.endsWith('/') ? mimeType.startsWith(type) : mimeType === type, - ) - } - - /** - * Conditionally compress data based on size and MIME type - */ - function compressDataIfAppropriate( - data: Uint8Array, - mimeType: string, - ): Uint8Array | undefined { - if (!ENABLE_GZIP) return undefined - if (data.byteLength < GZIP_MIN_BYTES) return undefined - if (!isMimeTypeCompressible(mimeType)) return undefined - try { - return Bun.gzipSync(data.buffer as ArrayBuffer) - } catch { - return undefined - } - } - - /** - * Create response handler function with ETag and Gzip support - */ - function createResponseHandler( - asset: InMemoryAsset, - ): (req: Request) => Response { - return (req: Request) => { - const headers: Record = { - 'Content-Type': asset.type, - 'Cache-Control': asset.immutable - ? 'public, max-age=31536000, immutable' - : 'public, max-age=3600', - } - - if (ENABLE_ETAG && asset.etag) { - const ifNone = req.headers.get('if-none-match') - if (ifNone && ifNone === asset.etag) { - return new Response(null, { - status: 304, - headers: { ETag: asset.etag }, - }) - } - headers.ETag = asset.etag - } - - if ( - ENABLE_GZIP && - asset.gz && - req.headers.get('accept-encoding')?.includes('gzip') - ) { - headers['Content-Encoding'] = 'gzip' - headers['Content-Length'] = String(asset.gz.byteLength) - const gzCopy = new Uint8Array(asset.gz) - return new Response(gzCopy, { status: 200, headers }) - } - - headers['Content-Length'] = String(asset.raw.byteLength) - const rawCopy = new Uint8Array(asset.raw) - return new Response(rawCopy, { status: 200, headers }) - } - } - - /** - * Create composite glob pattern from include patterns - */ - function createCompositeGlobPattern(): Bun.Glob { - const raw = (process.env.ASSET_PRELOAD_INCLUDE_PATTERNS ?? '') - .split(',') - .map((s) => s.trim()) - .filter(Boolean) - if (raw.length === 0) return new Bun.Glob('**/*') - if (raw.length === 1) return new Bun.Glob(raw[0]) - return new Bun.Glob(`{${raw.join(',')}}`) - } - - /** - * Initialize static routes with intelligent preloading strategy - * Small files are loaded into memory, large files are served on-demand - */ - async function initializeStaticRoutes( - clientDirectory: string, - ): Promise { - const routes: Record Response | Promise> = - {} - const loaded: AssetMetadata[] = [] - const skipped: AssetMetadata[] = [] - - log.info(`Loading static assets from ${clientDirectory}...`) - if (VERBOSE) { - console.log( - `Max preload size: ${(MAX_PRELOAD_BYTES / 1024 / 1024).toFixed(2)} MB`, - ) - if (INCLUDE_PATTERNS.length > 0) { - console.log( - `Include patterns: ${process.env.ASSET_PRELOAD_INCLUDE_PATTERNS ?? ''}`, - ) - } - if (EXCLUDE_PATTERNS.length > 0) { - console.log( - `Exclude patterns: ${process.env.ASSET_PRELOAD_EXCLUDE_PATTERNS ?? ''}`, - ) - } - } - - let totalPreloadedBytes = 0 - - try { - const glob = createCompositeGlobPattern() - for await (const relativePath of glob.scan({ cwd: clientDirectory })) { - const filepath = path.join(clientDirectory, relativePath) - const route = `/${relativePath.split(path.sep).join(path.posix.sep)}` - - try { - // Get file metadata - const file = Bun.file(filepath) - - // Skip if file doesn't exist or is empty - if (!(await file.exists()) || file.size === 0) { - continue - } - - const metadata: AssetMetadata = { - route, - size: file.size, - type: file.type || 'application/octet-stream', - } - - // Determine if file should be preloaded - const matchesPattern = isFileEligibleForPreloading(relativePath) - const withinSizeLimit = file.size <= MAX_PRELOAD_BYTES - - if (matchesPattern && withinSizeLimit) { - // Preload small files into memory with ETag and Gzip support - const bytes = new Uint8Array(await file.arrayBuffer()) - const gz = compressDataIfAppropriate(bytes, metadata.type) - const etag = ENABLE_ETAG ? computeEtag(bytes) : undefined - const asset: InMemoryAsset = { - raw: bytes, - gz, - etag, - type: metadata.type, - immutable: true, - size: bytes.byteLength, - } - routes[route] = createResponseHandler(asset) - - loaded.push({ ...metadata, size: bytes.byteLength }) - totalPreloadedBytes += bytes.byteLength - } else { - // Serve large or filtered files on-demand - routes[route] = () => { - const fileOnDemand = Bun.file(filepath) - return new Response(fileOnDemand, { - headers: { - 'Content-Type': metadata.type, - 'Cache-Control': 'public, max-age=3600', - }, - }) - } - - skipped.push(metadata) - } - } catch (error: unknown) { - if (error instanceof Error && error.name !== 'EISDIR') { - log.error(`Failed to load ${filepath}: ${error.message}`) - } - } - } - - // Show detailed file overview only when verbose mode is enabled - if (VERBOSE && (loaded.length > 0 || skipped.length > 0)) { - const allFiles = [...loaded, ...skipped].sort((a, b) => - a.route.localeCompare(b.route), - ) - - // Calculate max path length for alignment - const maxPathLength = Math.min( - Math.max(...allFiles.map((f) => f.route.length)), - 60, - ) - - // Format file size with KB and actual gzip size - const formatFileSize = (bytes: number, gzBytes?: number) => { - const kb = bytes / 1024 - const sizeStr = kb < 100 ? kb.toFixed(2) : kb.toFixed(1) - - if (gzBytes !== undefined) { - const gzKb = gzBytes / 1024 - const gzStr = gzKb < 100 ? gzKb.toFixed(2) : gzKb.toFixed(1) - return { - size: sizeStr, - gzip: gzStr, - } - } - - // Rough gzip estimation (typically 30-70% compression) if no actual gzip data - const gzipKb = kb * 0.35 - return { - size: sizeStr, - gzip: gzipKb < 100 ? gzipKb.toFixed(2) : gzipKb.toFixed(1), - } - } - - if (loaded.length > 0) { - console.log('\n📁 Preloaded into memory:') - console.log( - 'Path │ Size │ Gzip Size', - ) - loaded - .sort((a, b) => a.route.localeCompare(b.route)) - .forEach((file) => { - const { size, gzip } = formatFileSize(file.size) - const paddedPath = file.route.padEnd(maxPathLength) - const sizeStr = `${size.padStart(7)} kB` - const gzipStr = `${gzip.padStart(7)} kB` - console.log(`${paddedPath} │ ${sizeStr} │ ${gzipStr}`) - }) - } - - if (skipped.length > 0) { - console.log('\n💾 Served on-demand:') - console.log( - 'Path │ Size │ Gzip Size', - ) - skipped - .sort((a, b) => a.route.localeCompare(b.route)) - .forEach((file) => { - const { size, gzip } = formatFileSize(file.size) - const paddedPath = file.route.padEnd(maxPathLength) - const sizeStr = `${size.padStart(7)} kB` - const gzipStr = `${gzip.padStart(7)} kB` - console.log(`${paddedPath} │ ${sizeStr} │ ${gzipStr}`) - }) - } - } - - // Show detailed verbose info if enabled - if (VERBOSE) { - if (loaded.length > 0 || skipped.length > 0) { - const allFiles = [...loaded, ...skipped].sort((a, b) => - a.route.localeCompare(b.route), - ) - console.log('\n📊 Detailed file information:') - console.log( - 'Status │ Path │ MIME Type │ Reason', - ) - allFiles.forEach((file) => { - const isPreloaded = loaded.includes(file) - const status = isPreloaded ? 'MEMORY' : 'ON-DEMAND' - const reason = - !isPreloaded && file.size > MAX_PRELOAD_BYTES - ? 'too large' - : !isPreloaded - ? 'filtered' - : 'preloaded' - const route = - file.route.length > 30 - ? file.route.substring(0, 27) + '...' - : file.route - console.log( - `${status.padEnd(12)} │ ${route.padEnd(30)} │ ${file.type.padEnd(28)} │ ${reason.padEnd(10)}`, - ) - }) - } else { - console.log('\n📊 No files found to display') - } - } - - // Log summary after the file list - console.log() // Empty line for separation - if (loaded.length > 0) { - log.success( - `Preloaded ${String(loaded.length)} files (${(totalPreloadedBytes / 1024 / 1024).toFixed(2)} MB) into memory`, - ) - } else { - log.info('No files preloaded into memory') - } - - if (skipped.length > 0) { - const tooLarge = skipped.filter((f) => f.size > MAX_PRELOAD_BYTES).length - const filtered = skipped.length - tooLarge - log.info( - `${String(skipped.length)} files will be served on-demand (${String(tooLarge)} too large, ${String(filtered)} filtered)`, - ) - } - } catch (error) { - log.error( - `Failed to load static files from ${clientDirectory}: ${String(error)}`, - ) - } - - return { routes, loaded, skipped } - } - - /** - * Initialize the server - */ - async function initializeServer() { - log.header('Starting Production Server') - - // Load TanStack Start server handler - let handler: { fetch: (request: Request) => Response | Promise } - try { - const serverModule = (await import(SERVER_ENTRY_POINT)) as { - default: { fetch: (request: Request) => Response | Promise } - } - handler = serverModule.default - log.success('TanStack Start application handler initialized') - } catch (error) { - log.error(`Failed to load server handler: ${String(error)}`) - process.exit(1) - } - - // Build static routes with intelligent preloading - const { routes } = await initializeStaticRoutes(CLIENT_DIRECTORY) - - // Create Bun server - const server = Bun.serve({ - port: SERVER_PORT, - - routes: { - // Serve static assets (preloaded or on-demand) - ...routes, - - // Fallback to TanStack Start handler for all other routes - '/*': (req: Request) => { - try { - return handler.fetch(req) - } catch (error) { - log.error(`Server handler error: ${String(error)}`) - return new Response('Internal Server Error', { status: 500 }) - } - }, - }, - - // Global error handler - error(error) { - log.error( - `Uncaught server error: ${error instanceof Error ? error.message : String(error)}`, - ) - return new Response('Internal Server Error', { status: 500 }) - }, - }) - - log.success(`Server listening on http://localhost:${String(server.port)}`) - } - - // Initialize the server - initializeServer().catch((error: unknown) => { - log.error(`Failed to start server: ${String(error)}`) - process.exit(1) - }) - ``` - - - - Add a `start` script to run the custom server: - - ```json package.json icon="file-json" - { - "scripts": { - "build": "bun --bun vite build", - "start": "bun run server.ts" // [!code ++] - } - } - ``` - - - - Build your application and start the server: - - ```sh terminal icon="terminal" - bun run build - bun run start - ``` - - The server will start on port 3000 by default (configurable via `PORT` environment variable). - - - - - - - - - - Deploy on Vercel - - - Deploy on Render - - - Deploy on Railway - - - Deploy on DigitalOcean - - - Deploy on AWS Lambda - - - Deploy on Google Cloud Run - - - ---- - -## Templates - - - - A Todo application built with Bun, TanStack Start, and PostgreSQL. - - - A TanStack Start template using Bun with SSR and file-based routing. - - - The basic TanStack starter using the Bun runtime and Bun's file APIs. - - - ---- - -[→ See TanStack Start's official documentation](https://tanstack.com/start/latest/docs/framework/react/guide/hosting) for more information on hosting. diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/guides/ecosystem/upstash.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/guides/ecosystem/upstash.mdx deleted file mode 100644 index ea1f8bb..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/guides/ecosystem/upstash.mdx +++ /dev/null @@ -1,87 +0,0 @@ ---- -title: Bun Redis with Upstash -sidebarTitle: Upstash with Bun -mode: center ---- - -[Upstash](https://upstash.com/) is a fully managed Redis database as a service. Upstash works with the Redis® API, which means you can use Bun's native Redis client to connect to your Upstash database. - -TLS is enabled by default for all Upstash Redis databases. - ---- - - - - Create a new project by running `bun init`: - - ```sh terminal icon="terminal" - bun init bun-upstash-redis - cd bun-upstash-redis - ``` - - - Go to the [Upstash dashboard](https://console.upstash.com/) and create a new Redis database. After completing the [getting started guide](https://upstash.com/docs/redis/overall/getstarted), you'll see your database page with connection information. - - The database page displays two connection methods; HTTP and TLS. For Bun's Redis client, you need the **TLS** connection details. This URL starts with `rediss://`. - - - ![Upstash Redis database page](https://bun.com/images/guides/upstash-1.png) - - - - - You can connect to Upstash by setting environment variables with Bun's default `redis` client. - - Set the `REDIS_URL` environment variable in your `.env` file using the Redis endpoint (not the REST URL): - - ```ini .env icon="settings" - REDIS_URL=rediss://********@********.upstash.io:6379 - ``` - - Bun's Redis client reads connection information from `REDIS_URL` by default: - - ```ts index.ts icon="/icons/typescript.svg" - import { redis } from "bun"; - - // Reads from process.env.REDIS_URL automatically - await redis.set("counter", "0"); // [!code ++] - ``` - - Alternatively, you can create a custom client using `RedisClient`: - - ```ts index.ts icon="/icons/typescript.svg" - import { RedisClient } from "bun"; - - const redis = new RedisClient(process.env.REDIS_URL); // [!code ++] - ``` - - - - You can now use the Redis client to interact with your Upstash Redis database: - - ```ts index.ts icon="/icons/typescript.svg" - import { redis } from "bun"; - - // Get a value - let counter = await redis.get("counter"); - - // Set a value if it doesn't exist - if (!counter) { - await redis.set("counter", "0"); - } - - // Increment the counter - await redis.incr("counter"); - - // Get the updated value - counter = await redis.get("counter"); - console.log(counter); - ``` - ```txt - 1 - ``` - - The Redis client automatically handles connections in the background. No need to manually connect or disconnect for basic operations. - - - diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/guides/ecosystem/vite.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/guides/ecosystem/vite.mdx deleted file mode 100644 index 1916f45..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/guides/ecosystem/vite.mdx +++ /dev/null @@ -1,77 +0,0 @@ ---- -title: Build a frontend using Vite and Bun -sidebarTitle: "Vite with Bun" -mode: center ---- - - - You can use Vite with Bun, but many projects get faster builds & drop hundreds of dependencies by switching to [HTML - imports](/docs/bundler/html-static). - - ---- - -Vite works out of the box with Bun. Get started with one of Vite's templates. - -```bash terminal icon="terminal" -bun create vite my-app -``` - -```txt -✔ Select a framework: › React -✔ Select a variant: › TypeScript + SWC -Scaffolding project in /path/to/my-app... -``` - ---- - -Then `cd` into the project directory and install dependencies. - -```bash terminal icon="terminal" -cd my-app -bun install -``` - ---- - -Start the development server with the `vite` CLI using `bunx`. - -The `--bun` flag tells Bun to run Vite's CLI using `bun` instead of `node`; by default Bun respects Vite's `#!/usr/bin/env node` [shebang line](). - -```bash terminal icon="terminal" -bunx --bun vite -``` - ---- - -To simplify this command, update the `"dev"` script in `package.json` to the following. - -```json package.json icon="file-json" - "scripts": { - "dev": "vite", // [!code --] - "dev": "bunx --bun vite", // [!code ++] - "build": "vite build", - "serve": "vite preview" - }, - // ... -``` - ---- - -Now you can start the development server with `bun run dev`. - -```bash terminal icon="terminal" -bun run dev -``` - ---- - -The following command will build your app for production. - -```sh terminal icon="terminal" -bunx --bun vite build -``` - ---- - -This is a stripped down guide to get you started with Vite + Bun. For more information, see the [Vite documentation](https://vite.dev/guide/). diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/guides/html-rewriter/extract-links.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/guides/html-rewriter/extract-links.mdx deleted file mode 100644 index 903372d..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/guides/html-rewriter/extract-links.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -title: Extract links from a webpage using HTMLRewriter -sidebarTitle: Extract links using HTMLRewriter -mode: center ---- - -## Extract links from a webpage - -Bun's [HTMLRewriter](/docs/runtime/html-rewriter) API can be used to efficiently extract links from HTML content. It works by chaining together CSS selectors to match the elements, text, and attributes you want to process. This is a simple example of how to extract links from a webpage. You can pass `.transform` a `Response`, `Blob`, or `string`. - -```ts extract-links.ts icon="/icons/typescript.svg" -async function extractLinks(url: string) { - const links = new Set(); - const response = await fetch(url); - - const rewriter = new HTMLRewriter().on("a[href]", { - element(el) { - const href = el.getAttribute("href"); - if (href) { - links.add(href); - } - }, - }); - - // Wait for the response to be processed - await rewriter.transform(response).blob(); - console.log([...links]); // ["https://bun.com", "/docs", ...] -} - -// Extract all links from the Bun website -await extractLinks("https://bun.com"); -``` - ---- - -## Convert relative URLs to absolute - -When scraping websites, you often want to convert relative URLs (like `/docs`) to absolute URLs. Here's how to handle URL resolution: - -{/* prettier-ignore */} -```ts extract-links.ts icon="/icons/typescript.svg" -async function extractLinksFromURL(url: string) { - const response = await fetch(url); - const links = new Set(); - - const rewriter = new HTMLRewriter().on("a[href]", { - element(el) { - const href = el.getAttribute("href"); - if (href) { - // Convert relative URLs to absolute // [!code ++] - try { // [!code ++] - const absoluteURL = new URL(href, url).href; // [!code ++] - links.add(absoluteURL); - } catch { // [!code ++] - links.add(href); // [!code ++] - } // [!code ++] - } - }, - }); - - // Wait for the response to be processed - await rewriter.transform(response).blob(); - return [...links]; -} - -const websiteLinks = await extractLinksFromURL("https://example.com"); -``` - ---- - -See [Docs > API > HTMLRewriter](/docs/runtime/html-rewriter) for complete documentation on HTML transformation with Bun. diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/guides/html-rewriter/extract-social-meta.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/guides/html-rewriter/extract-social-meta.mdx deleted file mode 100644 index 9a56cf6..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/guides/html-rewriter/extract-social-meta.mdx +++ /dev/null @@ -1,97 +0,0 @@ ---- -title: Extract social share images and Open Graph tags -sidebarTitle: OpenGraph tags -mode: center ---- - -## Extract social share images and Open Graph tags - -Bun's [HTMLRewriter](/docs/runtime/html-rewriter) API can be used to efficiently extract social share images and Open Graph metadata from HTML content. This is particularly useful for building link preview features, social media cards, or web scrapers. We can use HTMLRewriter to match CSS selectors to HTML elements, text, and attributes we want to process. - -```ts extract-social-meta.ts icon="/icons/typescript.svg" -interface SocialMetadata { - title?: string; - description?: string; - image?: string; - url?: string; - siteName?: string; - type?: string; -} - -async function extractSocialMetadata(url: string): Promise { - const metadata: SocialMetadata = {}; - const response = await fetch(url); - - const rewriter = new HTMLRewriter() - // Extract Open Graph meta tags - .on('meta[property^="og:"]', { - element(el) { - const property = el.getAttribute("property"); - const content = el.getAttribute("content"); - if (property && content) { - // Convert "og:image" to "image" etc. - const key = property.replace("og:", "") as keyof SocialMetadata; - metadata[key] = content; - } - }, - }) - // Extract Twitter Card meta tags as fallback - .on('meta[name^="twitter:"]', { - element(el) { - const name = el.getAttribute("name"); - const content = el.getAttribute("content"); - if (name && content) { - const key = name.replace("twitter:", "") as keyof SocialMetadata; - // Only use Twitter Card data if we don't have OG data - if (!metadata[key]) { - metadata[key] = content; - } - } - }, - }) - // Fallback to regular meta tags - .on('meta[name="description"]', { - element(el) { - const content = el.getAttribute("content"); - if (content && !metadata.description) { - metadata.description = content; - } - }, - }) - // Fallback to title tag - .on("title", { - text(text) { - if (!metadata.title) { - metadata.title = text.text; - } - }, - }); - - // Process the response - await rewriter.transform(response).blob(); - - // Convert relative image URLs to absolute - if (metadata.image && !metadata.image.startsWith("http")) { - try { - metadata.image = new URL(metadata.image, url).href; - } catch { - // Keep the original URL if parsing fails - } - } - - return metadata; -} -``` - -```ts Example Usage icon="/icons/typescript.svg" -// Example usage -const metadata = await extractSocialMetadata("https://bun.com"); -console.log(metadata); -// { -// title: "Bun — A fast all-in-one JavaScript runtime", -// description: "Bundle, transpile, install and run JavaScript & TypeScript projects — all in Bun. Bun is a fast all-in-one JavaScript runtime & toolkit designed for speed, complete with a bundler, test runner, and Node.js-compatible package manager.", -// image: "https://bun.com/share.jpg", -// type: "website", -// ... -// } -``` diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/guides/http/cluster.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/guides/http/cluster.mdx deleted file mode 100644 index 5fbde83..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/guides/http/cluster.mdx +++ /dev/null @@ -1,69 +0,0 @@ ---- -title: Start a cluster of HTTP servers -description: Run multiple HTTP servers concurrently via the "reusePort" option to share the same port across multiple processes -sidebarTitle: Start a cluster of HTTP servers -mode: center ---- - -To run multiple HTTP servers concurrently, use the `reusePort` option in `Bun.serve()` which shares the same port across multiple processes. - -This automatically load balances incoming requests across multiple instances of Bun. - -```ts server.ts icon="/icons/typescript.svg" -import { serve } from "bun"; - -const id = Math.random().toString(36).slice(2); - -serve({ - port: process.env.PORT || 8080, - development: false, - - // Share the same port across multiple processes - // This is the important part! - reusePort: true, - - async fetch(request) { - return new Response("Hello from Bun #" + id + "!\n"); - }, -}); -``` - ---- - - - **Linux only** — Windows and macOS ignore the `reusePort` option. This is an operating system limitation with - `SO_REUSEPORT`, unfortunately. - - -After saving the file, start your servers on the same port. - -Under the hood, this uses the Linux `SO_REUSEPORT` and `SO_REUSEADDR` socket options to ensure fair load balancing across multiple processes. [Learn more about `SO_REUSEPORT` and `SO_REUSEADDR`](https://lwn.net/Articles/542629/) - -```ts cluster.ts icon="/icons/typescript.svg" -import { spawn } from "bun"; - -const cpus = navigator.hardwareConcurrency; // Number of CPU cores -const buns = new Array(cpus); - -for (let i = 0; i < cpus; i++) { - buns[i] = spawn({ - cmd: ["bun", "./server.ts"], - stdout: "inherit", - stderr: "inherit", - stdin: "inherit", - }); -} - -function kill() { - for (const bun of buns) { - bun.kill(); - } -} - -process.on("SIGINT", kill); -process.on("exit", kill); -``` - ---- - -Bun has also implemented the `node:cluster` module, but this is a faster, simple, and limited alternative. diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/guides/http/fetch-unix.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/guides/http/fetch-unix.mdx deleted file mode 100644 index c48e39b..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/guides/http/fetch-unix.mdx +++ /dev/null @@ -1,35 +0,0 @@ ---- -title: fetch with unix domain sockets in Bun -sidebarTitle: Fetch with unix domain sockets -mode: center ---- - -In Bun, the `unix` option in `fetch()` lets you send HTTP requests over a [unix domain socket](https://en.wikipedia.org/wiki/Unix_domain_socket). - -```ts fetch-unix.ts icon="/icons/typescript.svg" -const unix = "/var/run/docker.sock"; - -const response = await fetch("http://localhost/info", { unix }); - -const body = await response.json(); -console.log(body); // { ... } -``` - ---- - -The `unix` option is a string that specifies the local file path to a unix domain socket. The `fetch()` function will use the socket to send the request to the server instead of using a TCP network connection. `https` is also supported by using the `https://` protocol in the URL instead of `http://`. - -To send a `POST` request to an API endpoint over a unix domain socket: - -```ts fetch-unix.ts icon="/icons/typescript.svg" -const response = await fetch("https://hostname/a/path", { - unix: "/var/run/path/to/unix.sock", - method: "POST", - body: JSON.stringify({ message: "Hello from Bun!" }), - headers: { - "Content-Type": "application/json", - }, -}); - -const body = await response.json(); -``` diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/guides/http/fetch.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/guides/http/fetch.mdx deleted file mode 100644 index f5c2e0e..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/guides/http/fetch.mdx +++ /dev/null @@ -1,26 +0,0 @@ ---- -title: Send an HTTP request using fetch -sidebarTitle: Fetch with Bun -mode: center ---- - -Bun implements the Web-standard [`fetch`](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) API for sending HTTP requests. To send a simple `GET` request to a URL: - -```ts fetch.ts icon="/icons/typescript.svg" -const response = await fetch("https://bun.com"); -const html = await response.text(); // HTML string -``` - ---- - -To send a `POST` request to an API endpoint. - -```ts fetch.ts icon="/icons/typescript.svg" -const response = await fetch("https://bun.com/api", { - method: "POST", - body: JSON.stringify({ message: "Hello from Bun!" }), - headers: { "Content-Type": "application/json" }, -}); - -const body = await response.json(); -``` diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/guides/http/file-uploads.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/guides/http/file-uploads.mdx deleted file mode 100644 index 68a9b1b..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/guides/http/file-uploads.mdx +++ /dev/null @@ -1,97 +0,0 @@ ---- -title: Upload files via HTTP using FormData -sidebarTitle: Upload files via HTTP using FormData -mode: center ---- - -To upload files via HTTP with Bun, use the [`FormData`](https://developer.mozilla.org/en-US/docs/Web/API/FormData) API. Let's start with a HTTP server that serves a simple HTML web form. - -```ts index.ts icon="/icons/typescript.svg" -const server = Bun.serve({ - port: 4000, - async fetch(req) { - const url = new URL(req.url); - - // return index.html for root path - if (url.pathname === "/") - return new Response(Bun.file("index.html"), { - headers: { - "Content-Type": "text/html", - }, - }); - - return new Response("Not Found", { status: 404 }); - }, -}); - -console.log(`Listening on http://localhost:${server.port}`); -``` - ---- - -We can define our HTML form in another file, `index.html`. - -```html index.html icon="file-code" - - - - - Form - - -
- - - -
- - -``` - ---- - -At this point, we can run the server and visit [`localhost:4000`](http://localhost:4000) to see our form. - -```bash -bun run index.ts -Listening on http://localhost:4000 -``` - ---- - -Our form will send a `POST` request to the `/action` endpoint with the form data. Let's handle that request in our server. - -First we use the [`.formData()`](https://developer.mozilla.org/en-US/docs/Web/API/Request/formData) method on the incoming `Request` to asynchronously parse its contents to a `FormData` instance. Then we can use the [`.get()`](https://developer.mozilla.org/en-US/docs/Web/API/FormData/get) method to extract the value of the `name` and `profilePicture` fields. Here `name` corresponds to a `string` and `profilePicture` is a `Blob`. - -Finally, we write the `Blob` to disk using [`Bun.write()`](/docs/runtime/file-io#writing-files-bun-write). - -{/* prettier-ignore */} -```ts index.ts icon="/icons/typescript.svg" -const server = Bun.serve({ - port: 4000, - async fetch(req) { - const url = new URL(req.url); - - // return index.html for root path - if (url.pathname === "/") - return new Response(Bun.file("index.html"), { - headers: { - "Content-Type": "text/html", - }, - }); - - // parse formdata at /action // [!code ++] - if (url.pathname === "/action") { // [!code ++] - const formdata = await req.formData(); // [!code ++] - const name = formdata.get("name"); // [!code ++] - const profilePicture = formdata.get("profilePicture"); // [!code ++] - if (!profilePicture) throw new Error("Must upload a profile picture."); // [!code ++] - // write profilePicture to disk // [!code ++] - await Bun.write("profilePicture.png", profilePicture); // [!code ++] - return new Response("Success"); // [!code ++] - } // [!code ++] - - return new Response("Not Found", { status: 404 }); - }, -}); -``` diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/guides/http/hot.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/guides/http/hot.mdx deleted file mode 100644 index b7fdd9f..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/guides/http/hot.mdx +++ /dev/null @@ -1,28 +0,0 @@ ---- -title: Hot reload an HTTP server -sidebarTitle: Hot reload an HTTP server -mode: center ---- - -Bun supports the [`--hot`](/docs/runtime/watch-mode#hot-mode) flag to run a file with hot reloading enabled. When any module or file changes, Bun re-runs the file. - -```sh terminal icon="terminal" -bun --hot run index.ts -``` - ---- - -Bun detects when you are running an HTTP server with `Bun.serve()`. It reloads your fetch handler when source files change, _without_ restarting the `bun` process. This makes hot reloads nearly instantaneous. - - -Note that this doesn't reload the page on your browser. - - -```ts index.ts icon="/icons/typescript.svg" -Bun.serve({ - port: 3000, - fetch(req) { - return new Response("Hello world"); - }, -}); -``` diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/guides/http/proxy.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/guides/http/proxy.mdx deleted file mode 100644 index 49268b7..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/guides/http/proxy.mdx +++ /dev/null @@ -1,50 +0,0 @@ ---- -title: Proxy HTTP requests using fetch() -sidebarTitle: Proxy HTTP requests using fetch() -mode: center ---- - -In Bun, `fetch` supports sending requests through an HTTP or HTTPS proxy. This is useful on corporate networks or when you need to ensure a request is sent through a specific IP address. - -```ts proxy.ts icon="/icons/typescript.svg" -await fetch("https://example.com", { - // The URL of the proxy server - proxy: "https://username:password@proxy.example.com:8080", -}); -``` - ---- - -The `proxy` option can be a URL string or an object with `url` and optional `headers`. The URL can include the username and password if the proxy requires authentication. It can be `http://` or `https://`. - ---- - -## Custom proxy headers - -To send custom headers to the proxy server (useful for proxy authentication tokens, custom routing, etc.), use the object format: - -```ts proxy-headers.ts icon="/icons/typescript.svg" -await fetch("https://example.com", { - proxy: { - url: "https://proxy.example.com:8080", - headers: { - "Proxy-Authorization": "Bearer my-token", - "X-Proxy-Region": "us-east-1", - }, - }, -}); -``` - -The `headers` property accepts a plain object or a `Headers` instance. These headers are sent directly to the proxy server in `CONNECT` requests (for HTTPS targets) or in the proxy request (for HTTP targets). - -If you provide a `Proxy-Authorization` header, it will override any credentials specified in the proxy URL. - ---- - -## Environment variables - -You can also set the `$HTTP_PROXY` or `$HTTPS_PROXY` environment variable to the proxy URL. This is useful when you want to use the same proxy for all requests. - -```sh terminal icon="terminal" -HTTPS_PROXY=https://username:password@proxy.example.com:8080 bun run index.ts -``` diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/guides/http/server.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/guides/http/server.mdx deleted file mode 100644 index 618c1ab..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/guides/http/server.mdx +++ /dev/null @@ -1,48 +0,0 @@ ---- -title: Common HTTP server usage -sidebarTitle: HTTP Server with Bun -mode: center ---- - -This starts an HTTP server listening on port `3000`. It demonstrates basic routing with a number of common responses and also handles POST data from standard forms or as JSON. - -See [`Bun.serve`](/docs/runtime/http/server) for details. - -```ts server.ts icon="/icons/typescript.svg" -const server = Bun.serve({ - async fetch(req) { - const path = new URL(req.url).pathname; - - // respond with text/html - if (path === "/") return new Response("Welcome to Bun!"); - - // redirect - if (path === "/abc") return Response.redirect("/source", 301); - - // send back a file (in this case, *this* file) - if (path === "/source") return new Response(Bun.file(import.meta.path)); - - // respond with JSON - if (path === "/api") return Response.json({ some: "buns", for: "you" }); - - // receive JSON data to a POST request - if (req.method === "POST" && path === "/api/post") { - const data = await req.json(); - console.log("Received JSON:", data); - return Response.json({ success: true, data }); - } - - // receive POST data from a form - if (req.method === "POST" && path === "/form") { - const data = await req.formData(); - console.log(data.get("someField")); - return new Response("Success"); - } - - // 404s - return new Response("Page not found", { status: 404 }); - }, -}); - -console.log(`Listening on ${server.url}`); -``` diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/guides/http/simple.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/guides/http/simple.mdx deleted file mode 100644 index b50b7ad..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/guides/http/simple.mdx +++ /dev/null @@ -1,20 +0,0 @@ ---- -title: Write a simple HTTP server -sidebarTitle: Simple HTTP Server with Bun -mode: center ---- - -This starts an HTTP server listening on port `3000`. It responds to all requests with a `Response` with status `200` and body `"Welcome to Bun!"`. - -See [`Bun.serve`](/docs/runtime/http/server) for details. - -```ts server.ts icon="/icons/typescript.svg" -const server = Bun.serve({ - port: 3000, - fetch(request) { - return new Response("Welcome to Bun!"); - }, -}); - -console.log(`Listening on ${server.url}`); -``` diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/guides/http/stream-file.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/guides/http/stream-file.mdx deleted file mode 100644 index 369a966..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/guides/http/stream-file.mdx +++ /dev/null @@ -1,50 +0,0 @@ ---- -title: Stream a file as an HTTP Response -sidebarTitle: Stream file response -mode: center ---- - -This snippet reads a file from disk using [`Bun.file()`](/docs/runtime/file-io#reading-files-bun-file). This returns a `BunFile` instance, which can be passed directly into the `new Response` constructor. - -```ts server.ts icon="/icons/typescript.svg" -const path = "/path/to/file.txt"; -const file = Bun.file(path); -const resp = new Response(file); -``` - ---- - -The `Content-Type` is read from the file and automatically set on the `Response`. - -```ts server.ts icon="/icons/typescript.svg" -new Response(Bun.file("./package.json")).headers.get("Content-Type"); -// => application/json;charset=utf-8 - -new Response(Bun.file("./test.txt")).headers.get("Content-Type"); -// => text/plain;charset=utf-8 - -new Response(Bun.file("./index.tsx")).headers.get("Content-Type"); -// => text/javascript;charset=utf-8 - -new Response(Bun.file("./img.png")).headers.get("Content-Type"); -// => image/png -``` - ---- - -Putting it all together with [`Bun.serve()`](/docs/runtime/http/server). - -```ts server.ts icon="/icons/typescript.svg" -// static file server -Bun.serve({ - async fetch(req) { - const path = new URL(req.url).pathname; - const file = Bun.file(path); - return new Response(file); - }, -}); -``` - ---- - -See [Docs > API > File I/O](/docs/runtime/file-io#writing-files-bun-write) for complete documentation of `Bun.write()`. diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/guides/http/stream-iterator.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/guides/http/stream-iterator.mdx deleted file mode 100644 index 37d04d7..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/guides/http/stream-iterator.mdx +++ /dev/null @@ -1,49 +0,0 @@ ---- -title: Streaming HTTP Server with Async Iterators -sidebarTitle: Stream with iterators -mode: center ---- - -In Bun, [`Response`](https://developer.mozilla.org/en-US/docs/Web/API/Response) objects can accept an async generator function as their body. This allows you to stream data to the client as it becomes available, rather than waiting for the entire response to be ready. - -```ts stream-iterator.ts icon="/icons/typescript.svg" -Bun.serve({ - port: 3000, - fetch(req) { - return new Response( - // An async generator function - async function* () { - yield "Hello, "; - await Bun.sleep(100); - yield "world!"; - - // you can also yield a TypedArray or Buffer - yield new Uint8Array(["\n".charCodeAt(0)]); - }, - { headers: { "Content-Type": "text/plain" } }, - ); - }, -}); -``` - ---- - -You can pass any async iterable directly to `Response`: - -```ts stream-iterator.ts icon="/icons/typescript.svg" -Bun.serve({ - port: 3000, - fetch(req) { - return new Response( - { - [Symbol.asyncIterator]: async function* () { - yield "Hello, "; - await Bun.sleep(100); - yield "world!"; - }, - }, - { headers: { "Content-Type": "text/plain" } }, - ); - }, -}); -``` diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/guides/http/stream-node-streams-in-bun.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/guides/http/stream-node-streams-in-bun.mdx deleted file mode 100644 index b32f326..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/guides/http/stream-node-streams-in-bun.mdx +++ /dev/null @@ -1,22 +0,0 @@ ---- -title: Streaming HTTP Server with Node.js Streams -sidebarTitle: Stream with Node.js -mode: center ---- - -In Bun, [`Response`](https://developer.mozilla.org/en-US/docs/Web/API/Response) objects can accept a Node.js [`Readable`](https://nodejs.org/api/stream.html#stream_readable_streams). - -This works because Bun's `Response` object allows any async iterable as its body. Node.js streams are async iterables, so you can pass them directly to `Response`. - -```ts server.ts icon="/icons/typescript.svg" -import { Readable } from "stream"; -import { serve } from "bun"; -serve({ - port: 3000, - fetch(req) { - return new Response(Readable.from(["Hello, ", "world!"]), { - headers: { "Content-Type": "text/plain" }, - }); - }, -}); -``` diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/guides/http/tls.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/guides/http/tls.mdx deleted file mode 100644 index e1d5e26..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/guides/http/tls.mdx +++ /dev/null @@ -1,32 +0,0 @@ ---- -title: Configure TLS on an HTTP server -sidebarTitle: Configure TLS -mode: center ---- - -Set the `tls` key to configure TLS. Both `key` and `cert` are required. The `key` should be the contents of your private key; `cert` should be the contents of your issued certificate. Use [`Bun.file()`](/docs/runtime/file-io#reading-files-bun-file) to read the contents. - -```ts server.ts icon="/icons/typescript.svg" -const server = Bun.serve({ - fetch: request => new Response("Welcome to Bun!"), - tls: { - cert: Bun.file("cert.pem"), - key: Bun.file("key.pem"), - }, -}); -``` - ---- - -By default Bun trusts the default Mozilla-curated list of well-known root CAs. To override this list, pass an array of certificates as `ca`. - -```ts server.ts icon="/icons/typescript.svg" -const server = Bun.serve({ - fetch: request => new Response("Welcome to Bun!"), - tls: { - cert: Bun.file("cert.pem"), - key: Bun.file("key.pem"), - ca: [Bun.file("ca1.pem"), Bun.file("ca2.pem")], - }, -}); -``` diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/guides/index.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/guides/index.mdx deleted file mode 100644 index 107c894..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/guides/index.mdx +++ /dev/null @@ -1,10 +0,0 @@ ---- -title: Guides -description: A collection of code samples and walkthroughs for performing common tasks with Bun. -contextual: false -mode: center ---- - -import { GuidesList } from "/snippets/guides.jsx"; - - diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/guides/install/add-dev.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/guides/install/add-dev.mdx deleted file mode 100644 index 09a5ef7..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/guides/install/add-dev.mdx +++ /dev/null @@ -1,28 +0,0 @@ ---- -title: Add a development dependency -sidebarTitle: Add a dev dependency -mode: center ---- - -To add an npm package as a development dependency, use `bun add --development`. - -```sh terminal icon="terminal" -bun add zod --dev -bun add zod -d # shorthand -``` - ---- - -This will add the package to `devDependencies` in `package.json`. - -```json -{ - "devDependencies": { - "zod": "^3.0.0" // [!code ++] - } -} -``` - ---- - -See [Docs > Package manager](/docs/pm/cli/install) for complete documentation of Bun's package manager. diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/guides/install/add-git.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/guides/install/add-git.mdx deleted file mode 100644 index 99b4147..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/guides/install/add-git.mdx +++ /dev/null @@ -1,40 +0,0 @@ ---- -title: Add a Git dependency -sidebarTitle: Add a Git dependency -mode: center ---- - -Bun supports directly adding GitHub repositories as dependencies of your project. - -```sh terminal icon="terminal" -bun add github:lodash/lodash -``` - ---- - -This will add the following line to your `package.json`: - -```json package.json icon="file-json" -{ - "dependencies": { - "lodash": "github:lodash/lodash" - } -} -``` - ---- - -Bun supports a number of protocols for specifying Git dependencies. - -```sh terminal icon="terminal" -bun add git+https://github.com/lodash/lodash.git -bun add git+ssh://github.com/lodash/lodash.git#4.17.21 -bun add git@github.com:lodash/lodash.git -bun add github:colinhacks/zod -``` - -**Note:** GitHub dependencies download via HTTP tarball when possible for faster installation. - ---- - -See [Docs > Package manager](/docs/pm/cli/install) for complete documentation of Bun's package manager. diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/guides/install/add-optional.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/guides/install/add-optional.mdx deleted file mode 100644 index 0d6aa75..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/guides/install/add-optional.mdx +++ /dev/null @@ -1,27 +0,0 @@ ---- -title: Add an optional dependency -sidebarTitle: Add an optional dependency -mode: center ---- - -To add an npm package as an optional dependency, use the `--optional` flag. - -```sh terminal icon="terminal" -bun add zod --optional -``` - ---- - -This will add the package to `optionalDependencies` in `package.json`. - -```json package.json icon="file-json" -{ - "optionalDependencies": { - "zod": "^3.0.0" // [!code ++] - } -} -``` - ---- - -See [Docs > Package manager](/docs/pm/cli/install) for complete documentation of Bun's package manager. diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/guides/install/add-peer.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/guides/install/add-peer.mdx deleted file mode 100644 index 9aea16e..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/guides/install/add-peer.mdx +++ /dev/null @@ -1,45 +0,0 @@ ---- -title: Add a peer dependency -sidebarTitle: Add a peer dependency -mode: center ---- - -To add an npm package as a peer dependency, use the `--peer` flag. - -```sh terminal icon="terminal" -bun add @types/bun --peer -``` - ---- - -This will add the package to `peerDependencies` in `package.json`. - -```json package.json icon="file-json" -{ - "peerDependencies": { - "@types/bun": "^1.3.3" // [!code ++] - } -} -``` - ---- - -Running `bun install` will install peer dependencies by default, unless marked optional in `peerDependenciesMeta`. - -{/* prettier-ignore */} -```json package.json icon="file-json" -{ - "peerDependencies": { - "@types/bun": "^1.3.3" - }, - "peerDependenciesMeta": { - "@types/bun": { // [!code ++] - "optional": true // [!code ++] - } // [!code ++] - } -} -``` - ---- - -See [Docs > Package manager](/docs/pm/cli/install) for complete documentation of Bun's package manager. diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/guides/install/add-tarball.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/guides/install/add-tarball.mdx deleted file mode 100644 index c5e177d..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/guides/install/add-tarball.mdx +++ /dev/null @@ -1,35 +0,0 @@ ---- -title: Add a tarball dependency -sidebarTitle: Add a tarball dependency -mode: center ---- - -Bun's package manager can install any publicly available tarball URL as a dependency of your project. - -```sh terminal icon="terminal" -bun add zod@https://registry.npmjs.org/zod/-/zod-3.21.4.tgz -``` - ---- - -Running this command will download, extract, and install the tarball to your project's `node_modules` directory. It will also add the following line to your `package.json`: - -```json package.json icon="file-json" -{ - "dependencies": { - "zod": "https://registry.npmjs.org/zod/-/zod-3.21.4.tgz" // [!code ++] - } -} -``` - ---- - -The package `"zod"` can now be imported as usual. - -```ts -import { z } from "zod"; -``` - ---- - -See [Docs > Package manager](/docs/pm/cli/install) for complete documentation of Bun's package manager. diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/guides/install/add.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/guides/install/add.mdx deleted file mode 100644 index d69884f..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/guides/install/add.mdx +++ /dev/null @@ -1,44 +0,0 @@ ---- -title: Add a dependency -sidebarTitle: Add a dependency -mode: center ---- - -To add an npm package as a dependency, use `bun add`. - -```sh terminal icon="terminal" -bun add zod -``` - ---- - -This will add the package to `dependencies` in `package.json`. By default, the `^` range specifier will be used, to indicate that any future minor or patch versions are acceptable. - -```json package.json icon="file-json" -{ - "dependencies": { - "zod": "^3.0.0" // [!code ++] - } -} -``` - ---- - -To "pin" to an exact version of the package, use `--exact`. This will add the package to `dependencies` without the `^`, pinning your project to the exact version you installed. - -```sh terminal icon="terminal" -bun add zod --exact -``` - ---- - -To specify an exact version or a tag: - -```sh terminal icon="terminal" -bun add zod@3.0.0 -bun add zod@next -``` - ---- - -See [Docs > Package manager](/docs/pm/cli/install) for complete documentation of Bun's package manager. diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/guides/install/azure-artifacts.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/guides/install/azure-artifacts.mdx deleted file mode 100644 index 8e355d6..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/guides/install/azure-artifacts.mdx +++ /dev/null @@ -1,76 +0,0 @@ ---- -title: Using bun install with an Azure Artifacts npm registry -sidebarTitle: Azure Artifacts with Bun -mode: center ---- - - - In [Azure - Artifact's](https://learn.microsoft.com/en-us/azure/devops/artifacts/npm/npmrc?view=azure-devops&tabs=windows%2Cclassic) - instructions for `.npmrc`, they say to base64 encode the password. Do not do this for `bun install`. Bun will - automatically base64 encode the password for you if needed. - - -[Azure Artifacts](https://azure.microsoft.com/en-us/products/devops/artifacts) is a package management system for Azure DevOps. It allows you to host your own private npm registry, npm packages, and other types of packages as well. - ---- - -### Configure with bunfig.toml - ---- - -To use it with `bun install`, add a `bunfig.toml` file to your project with the following contents. Make sure to replace `my-azure-artifacts-user` with your Azure Artifacts username, such as `jarred1234`. - -```toml bunfig.toml icon="settings" -[install.registry] -url = "https://pkgs.dev.azure.com/my-azure-artifacts-user/_packaging/my-azure-artifacts-user/npm/registry" -username = "my-azure-artifacts-user" -# You can use an environment variable here -password = "$NPM_PASSWORD" -``` - ---- - -Then assign your Azure Personal Access Token to the `NPM_PASSWORD` environment variable. Bun [automatically reads](/docs/runtime/environment-variables) `.env` files, so create a file called `.env` in your project root. There is no need to base-64 encode this token! Bun will do this for you. - -```ini .env icon="settings" -NPM_PASSWORD= -``` - ---- - -### Configure with environment variables - ---- - -To configure Azure Artifacts without `bunfig.toml`, you can set the `NPM_CONFIG_REGISTRY` environment variable. The URL should include `:username` and `:_password` as query parameters. Replace `` and `` with the appropriate values. - -```bash terminal icon="terminal" -NPM_CONFIG_REGISTRY=https://pkgs.dev.azure.com/my-azure-artifacts-user/_packaging/my-azure-artifacts-user/npm/registry/:username=:_password= -``` - ---- - -### Don't base64 encode the password - ---- - -In [Azure Artifact's](https://learn.microsoft.com/en-us/azure/devops/artifacts/npm/npmrc?view=azure-devops&tabs=windows%2Cclassic) instructions for `.npmrc`, they say to base64 encode the password. Do not do this for `bun install`. Bun will automatically base64 encode the password for you if needed. - -**Tip** — If it ends with `==`, it probably is base64 encoded. - ---- - -To decode a base64-encoded password, open your browser console and run: - -```js browser icon="computer" -atob(""); -``` - ---- - -Alternatively, use the `base64` command line tool, but doing so means it may be saved in your terminal history which is not recommended: - -```bash terminal icon="terminal" -echo "base64-encoded-password" | base64 --decode -``` diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/guides/install/cicd.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/guides/install/cicd.mdx deleted file mode 100644 index 8dd0947..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/guides/install/cicd.mdx +++ /dev/null @@ -1,43 +0,0 @@ ---- -title: Install dependencies with Bun in GitHub Actions -sidebarTitle: Install Bun in GitHub Actions -mode: center ---- - -Use the official [`setup-bun`](https://github.com/oven-sh/setup-bun) GitHub Action to install `bun` in your GitHub Actions runner. - -```yaml workflow.yml icon="file-code" -title: my-workflow -jobs: - my-job: - title: my-job - runs-on: ubuntu-latest - steps: - # ... - - uses: actions/checkout@v4 - - uses: oven-sh/setup-bun@v2 // [!code ++] - - # run any `bun` or `bunx` command - - run: bun install // [!code ++] -``` - ---- - -To specify a version of Bun to install: - -```yaml workflow.yml icon="file-code" -title: my-workflow -jobs: - my-job: - title: my-job - runs-on: ubuntu-latest - steps: - # ... - - uses: oven-sh/setup-bun@v2 - with: # [!code ++] - version: "latest" # or "canary" # [!code ++] -``` - ---- - -Refer to the [README.md](https://github.com/oven-sh/setup-bun) for complete documentation of the `setup-bun` GitHub Action. diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/guides/install/custom-registry.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/guides/install/custom-registry.mdx deleted file mode 100644 index 32b95a5..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/guides/install/custom-registry.mdx +++ /dev/null @@ -1,32 +0,0 @@ ---- -title: Override the default npm registry for bun install -sidebarTitle: Override the default npm registry -mode: center ---- - -The default registry is `registry.npmjs.org`. This can be globally configured in `bunfig.toml`. - -```toml bunfig.toml icon="settings" -[install] -# set default registry as a string -registry = "https://registry.npmjs.org" - -# if needed, set a token -registry = { url = "https://registry.npmjs.org", token = "123456" } - -# if needed, set a username/password -registry = "https://usertitle:password@registry.npmjs.org" -``` - ---- - -Your `bunfig.toml` can reference environment variables. Bun automatically loads environment variables from `.env.local`, `.env.[NODE_ENV]`, and `.env`. See [Docs > Environment variables](/docs/runtime/environment-variables) for more information. - -```toml bunfig.toml icon="settings" -[install] -registry = { url = "https://registry.npmjs.org", token = "$npm_token" } -``` - ---- - -See [Docs > Package manager](/docs/pm/cli/install) for complete documentation of Bun's package manager. diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/guides/install/from-npm-install-to-bun-install.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/guides/install/from-npm-install-to-bun-install.mdx deleted file mode 100644 index a0e47a0..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/guides/install/from-npm-install-to-bun-install.mdx +++ /dev/null @@ -1,230 +0,0 @@ ---- -title: Migrate from npm install to bun install -sidebarTitle: Migrate from npm to bun -mode: center ---- - -`bun install` is a Node.js compatible npm client designed to be an incredibly fast successor to npm. - -We've put a lot of work into making sure that the migration path from `npm install` to `bun install` is as easy as running `bun install` instead of `npm install`. - -- **Designed for Node.js & Bun**: `bun install` installs a Node.js compatible `node_modules` folder. You can use it in place of `npm install` for Node.js projects without any code changes and without using Bun's runtime. -- **Automatically converts `package-lock.json`** to bun's `bun.lock` lockfile format, preserving your existing resolved dependency versions without any manual work on your part. You can secretly use `bun install` in place of `npm install` at work without anyone noticing. -- **`.npmrc` compatible**: bun install reads npm registry configuration from npm's `.npmrc`, so you can use the same configuration for both npm and Bun. -- **Hardlinks**: On Windows and Linux, `bun install` uses hardlinks to conserve disk space and install times. - -```bash terminal icon="terminal" -# It only takes one command to migrate -bun i - -# To add dependencies: -bun i @types/bun - -# To add devDependencies: -bun i -d @types/bun - -# To remove a dependency: -bun rm @types/bun -``` - ---- - -## Run package.json scripts faster - -Run scripts from package.json, executables from `node_modules/.bin` (sort of like `npx`), and JavaScript/TypeScript files (just like `node`) - all from a single simple command. - -| NPM | Bun | -| ------------------ | ---------------- | -| `npm run - - -``` - ---- - -Now you can `import` or `require` `*.svelte` files in your tests, and it will load the Svelte component as a JavaScript module. - -```ts hello-svelte.test.ts icon="/icons/typescript.svg" -import { test, expect } from "bun:test"; -import { render, fireEvent } from "@testing-library/svelte"; -import Counter from "./Counter.svelte"; - -test("Counter increments when clicked", async () => { - const { getByText, component } = render(Counter); - const button = getByText("+1"); - - // Initial state - expect(component.$$.ctx[0]).toBe(0); // initialCount is the first prop - - // Click the increment button - await fireEvent.click(button); - - // Check the new state - expect(component.$$.ctx[0]).toBe(1); -}); -``` - ---- - -Use `bun test` to run your tests. - -```bash terminal icon="terminal" -bun test -``` diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/guides/test/testing-library.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/guides/test/testing-library.mdx deleted file mode 100644 index 97b04f8..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/guides/test/testing-library.mdx +++ /dev/null @@ -1,93 +0,0 @@ ---- -title: Using Testing Library with Bun -sidebarTitle: Testing Library -mode: center ---- - -You can use [Testing Library](https://testing-library.com/) with Bun's test runner. - ---- - -As a prerequisite to using Testing Library you will need to install [Happy Dom](https://github.com/capricorn86/happy-dom). ([see Bun's Happy DOM guide for more information](/docs/guides/test/happy-dom)). - -```sh terminal icon="terminal" -bun add -D @happy-dom/global-registrator -``` - ---- - -Next you should install the Testing Library packages you are planning on using. For example, if you are setting up testing for React your installs may look like this. You will also need to install `@testing-library/jest-dom` to get matchers working later. - -```sh terminal icon="terminal" -bun add -D @testing-library/react @testing-library/dom @testing-library/jest-dom -``` - ---- - -Next you will need to create a preload script for Happy DOM and for Testing Library. For more details about the Happy DOM setup script see [Bun's Happy DOM guide](/docs/guides/test/happy-dom). - -```ts happydom.ts icon="/icons/typescript.svg" -import { GlobalRegistrator } from "@happy-dom/global-registrator"; - -GlobalRegistrator.register(); -``` - ---- - -For Testing Library, you will want to extend Bun's `expect` function with Testing Library's matchers. Optionally, to better match the behavior of test-runners like Jest, you may want to run cleanup after each test. - -```ts testing-library.ts icon="/icons/typescript.svg" -import { afterEach, expect } from "bun:test"; -import { cleanup } from "@testing-library/react"; -import * as matchers from "@testing-library/jest-dom/matchers"; - -expect.extend(matchers); - -// Optional: cleans up `render` after each test -afterEach(() => { - cleanup(); -}); -``` - ---- - -Next, add these preload scripts to your `bunfig.toml` (you can also have everything in a single `preload.ts` script if you prefer). - -```toml bunfig.toml icon="settings" -[test] -preload = ["./happydom.ts", "./testing-library.ts"] -``` - ---- - -If you are using TypeScript you will also need to make use of declaration merging in order to get the new matcher types to show up in your editor. To do this, create a type declaration file that extends `Matchers` like this. - -```ts matchers.d.ts icon="/icons/typescript.svg" -import { TestingLibraryMatchers } from "@testing-library/jest-dom/matchers"; -import { Matchers, AsymmetricMatchers } from "bun:test"; - -declare module "bun:test" { - interface Matchers extends TestingLibraryMatchers {} - interface AsymmetricMatchers extends TestingLibraryMatchers {} -} -``` - ---- - -You should now be able to use Testing Library in your tests - -```tsx myComponent.test.tsx icon="/icons/typescript.svg" -import { test, expect } from "bun:test"; -import { screen, render } from "@testing-library/react"; -import { MyComponent } from "./myComponent"; - -test("Can use Testing Library", () => { - render(MyComponent); - const myComponent = screen.getByTestId("my-component"); - expect(myComponent).toBeInTheDocument(); -}); -``` - ---- - -Refer to the [Testing Library docs](https://testing-library.com/), [Happy DOM repo](https://github.com/capricorn86/happy-dom) and [Docs > Test runner > DOM](/docs/test/dom) for complete documentation on writing browser tests with Bun. diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/guides/test/timeout.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/guides/test/timeout.mdx deleted file mode 100644 index 635c6c7..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/guides/test/timeout.mdx +++ /dev/null @@ -1,17 +0,0 @@ ---- -title: Set a per-test timeout with the Bun test runner -sidebarTitle: Test timeout -mode: center ---- - -Use the `--timeout` flag to set a timeout for each test in milliseconds. If any test exceeds this timeout, it will be marked as failed. - -The default timeout is `5000` (5 seconds). - -```sh terminal icon="terminal" -bun test --timeout 3000 # 3 seconds -``` - ---- - -See [Docs > Test runner](/docs/test) for complete documentation of `bun test`. diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/guides/test/todo-tests.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/guides/test/todo-tests.mdx deleted file mode 100644 index d6f4048..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/guides/test/todo-tests.mdx +++ /dev/null @@ -1,74 +0,0 @@ ---- -title: Mark a test as a "todo" with the Bun test runner -sidebarTitle: Todo tests -mode: center ---- - -To remind yourself to write a test later, use the `test.todo` function. There's no need to provide a test implementation. - -```ts test.ts icon="/icons/typescript.svg" -import { test, expect } from "bun:test"; - -// write this later -test.todo("unimplemented feature"); -``` - ---- - -The output of `bun test` indicates how many `todo` tests were encountered. - -```sh terminal icon="terminal" -bun test -``` - -```txt -test.test.ts: -✓ add [0.03ms] -✓ multiply [0.02ms] -✎ unimplemented feature - - 2 pass - 1 todo - 0 fail - 2 expect() calls -Ran 3 tests across 1 files. [74.00ms] -``` - ---- - -Optionally, you can provide a test implementation. - -```ts -import { test, expect } from "bun:test"; - -test.todo("unimplemented feature", () => { - expect(Bun.isAwesome()).toBe(true); -}); -``` - ---- - -If an implementation is provided, it will not be run unless the `--todo` flag is passed. If the `--todo` flag is passed, the test will be executed and _expected to fail_ by test runner! If a todo test passes, the `bun test` run will return a non-zero exit code to signal the failure. - -```sh terminal icon="terminal" -bun test --todo -``` - -```txt -my.test.ts: -✗ unimplemented feature - ^ this test is marked as todo but passes. Remove `.todo` or check that test is correct. - - 0 pass - 1 fail - 1 expect() calls -$ echo $? -1 # this is the exit code of the previous command -``` - ---- - -See also: - -- [Skip a test](/docs/guides/test/skip-tests) -- [Docs > Test runner > Writing tests](/docs/test/writing-tests) diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/guides/test/update-snapshots.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/guides/test/update-snapshots.mdx deleted file mode 100644 index 98926a9..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/guides/test/update-snapshots.mdx +++ /dev/null @@ -1,49 +0,0 @@ ---- -title: Update snapshots in `bun test` -sidebarTitle: Update snapshots -mode: center ---- - -Bun's test runner supports Jest-style snapshot testing via `.toMatchSnapshot()`. - -```ts snap.test.ts icon="/icons/typescript.svg" -import { test, expect } from "bun:test"; - -test("snapshot", () => { - expect({ foo: "bar" }).toMatchSnapshot(); -}); -``` - ---- - -The first time this test is executed, Bun will write a snapshot file to disk in a directory called `__snapshots__` that lives alongside the test file. - -```txt File Tree icon="folder-tree" -test -├── __snapshots__ -│   └── snap.test.ts.snap -└── snap.test.ts -``` - ---- - -To regenerate snapshots, use the `--update-snapshots` flag. - -```sh terminal icon="terminal" -bun test --update-snapshots -``` - -```txt -test/snap.test.ts: -✓ snapshot [0.86ms] - - 1 pass - 0 fail - snapshots: +1 added # the snapshot was regenerated - 1 expect() calls -Ran 1 tests across 1 files. [102.00ms] -``` - ---- - -See [Docs > Test Runner > Snapshots](/docs/test/snapshots) for complete documentation on snapshots with the Bun test runner. diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/guides/test/watch-mode.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/guides/test/watch-mode.mdx deleted file mode 100644 index 55e05ee..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/guides/test/watch-mode.mdx +++ /dev/null @@ -1,24 +0,0 @@ ---- -title: Run tests in watch mode with Bun -sidebarTitle: Watch mode -mode: center ---- - -Use the `--watch` flag to run your tests in watch mode. - -```sh terminal icon="terminal" -bun test --watch -``` - ---- - -This will restart the running Bun process whenever a file change is detected. It's fast. In this example, the editor is configured to save the file on every keystroke. - - - ![Running tests in watch mode in - Bun](https://github.com/oven-sh/bun/assets/3084745/dc49a36e-ba82-416f-b960-1c883a924248) - - ---- - -See [Docs > Test Runner](/docs/test) for complete documentation on the test runner. diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/guides/util/base64.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/guides/util/base64.mdx deleted file mode 100644 index 6f19837..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/guides/util/base64.mdx +++ /dev/null @@ -1,17 +0,0 @@ ---- -title: Encode and decode base64 strings -sidebarTitle: Base64 encoding -mode: center ---- - -Bun implements the Web-standard [`atob`](https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/atob) and [`btoa`](https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/btoa) functions for encoding and decoding base64 strings. - -```ts -const data = "hello world"; -const encoded = btoa(data); // => "aGVsbG8gd29ybGQ=" -const decoded = atob(encoded); // => "hello world" -``` - ---- - -See [Docs > Web APIs](/docs/runtime/web-apis) for a complete breakdown of the Web APIs implemented in Bun. diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/guides/util/deep-equals.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/guides/util/deep-equals.mdx deleted file mode 100644 index 6da9346..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/guides/util/deep-equals.mdx +++ /dev/null @@ -1,41 +0,0 @@ ---- -title: Check if two objects are deeply equal -sidebarTitle: Deep equality -mode: center ---- - -Check if two objects are deeply equal. This is used internally by `expect().toEqual()` in Bun's [test runner](/docs/test/writing-tests). - -```ts index.ts icon="/icons/typescript.svg" -const a = { a: 1, b: 2, c: { d: 3 } }; -const b = { a: 1, b: 2, c: { d: 3 } }; - -Bun.deepEquals(a, b); // true -``` - ---- - -Pass `true` as a third argument to enable strict mode. This is used internally by `expect().toStrictEqual()` in Bun's [test runner](/docs/test/writing-tests). - -The following examples would return `true` in non-strict mode but `false` in strict mode. - -```ts index.ts icon="/icons/typescript.svg" -// undefined values -Bun.deepEquals({}, { a: undefined }, true); // false - -// undefined in arrays -Bun.deepEquals(["asdf"], ["asdf", undefined], true); // false - -// sparse arrays -Bun.deepEquals([, 1], [undefined, 1], true); // false - -// object literals vs instances w/ same properties -class Foo { - a = 1; -} -Bun.deepEquals(new Foo(), { a: 1 }, true); // false -``` - ---- - -See [Docs > API > Utils](/docs/runtime/utils) for more useful utilities. diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/guides/util/deflate.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/guides/util/deflate.mdx deleted file mode 100644 index ddef713..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/guides/util/deflate.mdx +++ /dev/null @@ -1,20 +0,0 @@ ---- -title: Compress and decompress data with DEFLATE -sidebarTitle: DEFLATE compression -mode: center ---- - -Use `Bun.deflateSync()` to compress a `Uint8Array` with DEFLATE. - -```ts -const data = Buffer.from("Hello, world!"); -const compressed = Bun.deflateSync("Hello, world!"); -// => Uint8Array - -const decompressed = Bun.inflateSync(compressed); -// => Uint8Array -``` - ---- - -See [Docs > API > Utils](/docs/runtime/utils) for more useful utilities. diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/guides/util/detect-bun.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/guides/util/detect-bun.mdx deleted file mode 100644 index 730249c..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/guides/util/detect-bun.mdx +++ /dev/null @@ -1,28 +0,0 @@ ---- -title: Detect when code is executed with Bun -sidebarTitle: Detect Bun -mode: center ---- - -The recommended way to detect when code is being executed with Bun is to check `process.versions.bun`. This works in both JavaScript and TypeScript without requiring any additional type definitions. - -```ts -if (process.versions.bun) { - // this code will only run when the file is run with Bun -} -``` - ---- - -Alternatively, you can check for the existence of the `Bun` global. This is similar to how you'd check for the existence of the `window` variable to detect when code is being executed in a browser. - - - This approach will result in a type error in TypeScript unless `@types/bun` is installed. You can install it with `bun - add -d @types/bun`. - - -```ts -if (typeof Bun !== "undefined") { - // this code will only run when the file is run with Bun -} -``` diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/guides/util/entrypoint.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/guides/util/entrypoint.mdx deleted file mode 100644 index a2eb0ad..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/guides/util/entrypoint.mdx +++ /dev/null @@ -1,19 +0,0 @@ ---- -title: Check if the current file is the entrypoint -sidebarTitle: Check entrypoint -mode: center ---- - -Bun provides a handful of module-specific utilities on the [`import.meta`](/docs/runtime/module-resolution#import-meta) object. Use `import.meta.main` to check if the current file is the entrypoint of the current process. - -```ts index.ts icon="/icons/typescript.svg" -if (import.meta.main) { - // this file is directly executed with `bun run` -} else { - // this file is being imported by another file -} -``` - ---- - -See [Docs > API > import.meta](/docs/runtime/module-resolution#import-meta) for complete documentation. diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/guides/util/escape-html.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/guides/util/escape-html.mdx deleted file mode 100644 index 7ae3614..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/guides/util/escape-html.mdx +++ /dev/null @@ -1,24 +0,0 @@ ---- -title: Escape an HTML string -sidebarTitle: Escape HTML -mode: center ---- - -The `Bun.escapeHTML()` utility can be used to escape HTML characters in a string. The following replacements are made. - -- `"` becomes `"""` -- `&` becomes `"&"` -- `'` becomes `"'"` -- `<` becomes `"<"` -- `>` becomes `">"` - -This function is optimized for large input. Non-string types will be converted to a string before escaping. - -```ts -Bun.escapeHTML(""); -// <script>alert('Hello World!')</script> -``` - ---- - -See [Docs > API > Utils](/docs/runtime/utils) for more useful utilities. diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/guides/util/file-url-to-path.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/guides/util/file-url-to-path.mdx deleted file mode 100644 index 2485f29..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/guides/util/file-url-to-path.mdx +++ /dev/null @@ -1,16 +0,0 @@ ---- -title: Convert a file URL to an absolute path -sidebarTitle: File URL to path -mode: center ---- - -Use `Bun.fileURLToPath()` to convert a `file://` URL to an absolute path. - -```ts -Bun.fileURLToPath("file:///path/to/file.txt"); -// => "/path/to/file.txt" -``` - ---- - -See [Docs > API > Utils](/docs/runtime/utils) for more useful utilities. diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/guides/util/gzip.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/guides/util/gzip.mdx deleted file mode 100644 index 1ebccea..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/guides/util/gzip.mdx +++ /dev/null @@ -1,20 +0,0 @@ ---- -title: Compress and decompress data with gzip -sidebarTitle: Gzip compression -mode: center ---- - -Use `Bun.gzipSync()` to compress a `Uint8Array` with gzip. - -```ts -const data = Buffer.from("Hello, world!"); -const compressed = Bun.gzipSync(data); -// => Uint8Array - -const decompressed = Bun.gunzipSync(compressed); -// => Uint8Array -``` - ---- - -See [Docs > API > Utils](/docs/runtime/utils) for more useful utilities. diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/guides/util/hash-a-password.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/guides/util/hash-a-password.mdx deleted file mode 100644 index 101dcb0..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/guides/util/hash-a-password.mdx +++ /dev/null @@ -1,56 +0,0 @@ ---- -title: Hash a password -sidebarTitle: Hash password -mode: center ---- - -The `Bun.password.hash()` function provides a fast, built-in mechanism for securely hashing passwords in Bun. No third-party dependencies are required. - -```ts -const password = "super-secure-pa$$word"; - -const hash = await Bun.password.hash(password); -// => $argon2id$v=19$m=65536,t=2,p=1$tFq+9AVr1bfPxQdh6E8DQRhEXg/M/... -``` - ---- - -By default, this uses the [Argon2id](https://en.wikipedia.org/wiki/Argon2) algorithm. Pass a second argument to `Bun.password.hash()` to use a different algorithm or configure the hashing parameters. - -```ts -const password = "super-secure-pa$$word"; - -// use argon2 (default) -const argonHash = await Bun.password.hash(password, { - memoryCost: 4, // memory usage in kibibytes - timeCost: 3, // the number of iterations -}); -``` - ---- - -Bun also implements the [bcrypt](https://en.wikipedia.org/wiki/Bcrypt) algorithm. Specify `algorithm: "bcrypt"` to use it. - -```ts -// use bcrypt -const bcryptHash = await Bun.password.hash(password, { - algorithm: "bcrypt", - cost: 4, // number between 4-31 -}); -``` - ---- - -Use `Bun.password.verify()` to verify a password. The algorithm and its parameters are stored in the hash itself, so re-specifying configuration is unnecessary. - -```ts -const password = "super-secure-pa$$word"; -const hash = await Bun.password.hash(password); - -const isMatch = await Bun.password.verify(password, hash); -// => true -``` - ---- - -See [Docs > API > Hashing](/docs/runtime/hashing#bun-password) for complete documentation. diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/guides/util/import-meta-dir.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/guides/util/import-meta-dir.mdx deleted file mode 100644 index 83fa92f..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/guides/util/import-meta-dir.mdx +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: Get the directory of the current file -sidebarTitle: import.meta.dir -mode: center ---- - -Bun provides a handful of module-specific utilities on the [`import.meta`](/docs/runtime/module-resolution#import-meta) object. - -```ts /a/b/c.ts icon="/icons/typescript.svg" -import.meta.dir; // => "/a/b" -``` - ---- - -See [Docs > API > import.meta](/docs/runtime/module-resolution#import-meta) for complete documentation. diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/guides/util/import-meta-file.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/guides/util/import-meta-file.mdx deleted file mode 100644 index 399e28a..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/guides/util/import-meta-file.mdx +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: Get the file name of the current file -sidebarTitle: import.meta.file -mode: center ---- - -Bun provides a handful of module-specific utilities on the [`import.meta`](/docs/runtime/module-resolution#import-meta) object. Use `import.meta.file` to retrieve the name of the current file. - -```ts /a/b/c.ts icon="/icons/typescript.svg" -import.meta.file; // => "c.ts" -``` - ---- - -See [Docs > API > import.meta](/docs/runtime/module-resolution#import-meta) for complete documentation. diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/guides/util/import-meta-path.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/guides/util/import-meta-path.mdx deleted file mode 100644 index dad321a..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/guides/util/import-meta-path.mdx +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: Get the absolute path of the current file -sidebarTitle: import.meta.path -mode: center ---- - -Bun provides a handful of module-specific utilities on the [`import.meta`](/docs/runtime/module-resolution#import-meta) object. Use `import.meta.path` to retrieve the absolute path of the current file. - -```ts /a/b/c.ts icon="/icons/typescript.svg" -import.meta.path; // => "/a/b/c.ts" -``` - ---- - -See [Docs > API > import.meta](/docs/runtime/module-resolution#import-meta) for complete documentation. diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/guides/util/javascript-uuid.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/guides/util/javascript-uuid.mdx deleted file mode 100644 index c730d7f..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/guides/util/javascript-uuid.mdx +++ /dev/null @@ -1,25 +0,0 @@ ---- -title: Generate a UUID -sidebarTitle: Generate UUID -mode: center ---- - -Use `crypto.randomUUID()` to generate a UUID v4. This API works in Bun, Node.js, and browsers. It requires no dependencies. - -```ts -crypto.randomUUID(); -// => "123e4567-e89b-42d3-a456-426614174000" -``` - ---- - -In Bun, you can also use `Bun.randomUUIDv7()` to generate a [UUID v7](https://www.ietf.org/archive/id/draft-peabody-dispatch-new-uuid-format-01.html). - -```ts -Bun.randomUUIDv7(); -// => "0196a000-bb12-7000-905e-8039f5d5b206" -``` - ---- - -See [Docs > API > Utils](/docs/runtime/utils) for more useful utilities. diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/guides/util/main.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/guides/util/main.mdx deleted file mode 100644 index 6873df6..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/guides/util/main.mdx +++ /dev/null @@ -1,43 +0,0 @@ ---- -title: Get the absolute path to the current entrypoint -sidebarTitle: Get entrypoint path -mode: center ---- - -The `Bun.main` property contains the absolute path to the current entrypoint. - - - -```ts foo.ts icon="/icons/typescript.svg" -console.log(Bun.main); -``` - -```ts index.ts icon="/icons/typescript.svg" -import "./foo.ts"; -``` - - - ---- - -The printed path corresponds to the file that is executed with `bun run`. - -```sh terminal icon="terminal" -bun run index.ts -``` - -```txt -/path/to/index.ts -``` - -```sh terminal icon="terminal" -bun run foo.ts -``` - -```txt -/path/to/foo.ts -``` - ---- - -See [Docs > API > Utils](/docs/runtime/utils) for more useful utilities. diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/guides/util/path-to-file-url.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/guides/util/path-to-file-url.mdx deleted file mode 100644 index 71195a4..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/guides/util/path-to-file-url.mdx +++ /dev/null @@ -1,16 +0,0 @@ ---- -title: Convert an absolute path to a file URL -sidebarTitle: Path to file URL -mode: center ---- - -Use `Bun.pathToFileURL()` to convert an absolute path to a `file://` URL. - -```ts -Bun.pathToFileURL("/path/to/file.txt"); -// => "file:///path/to/file.txt" -``` - ---- - -See [Docs > API > Utils](/docs/runtime/utils) for more useful utilities. diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/guides/util/sleep.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/guides/util/sleep.mdx deleted file mode 100644 index 3f1bc82..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/guides/util/sleep.mdx +++ /dev/null @@ -1,24 +0,0 @@ ---- -title: Sleep for a fixed number of milliseconds -sidebarTitle: Sleep -mode: center ---- - -The `Bun.sleep` method provides a convenient way to create a void `Promise` that resolves in a fixed number of milliseconds. - -```ts -// sleep for 1 second -await Bun.sleep(1000); -``` - ---- - -Internally, this is equivalent to the following snippet that uses [`setTimeout`](https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/setTimeout). - -```ts -await new Promise(resolve => setTimeout(resolve, ms)); -``` - ---- - -See [Docs > API > Utils](/docs/runtime/utils) for more useful utilities. diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/guides/util/upgrade.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/guides/util/upgrade.mdx deleted file mode 100644 index 65bd458..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/guides/util/upgrade.mdx +++ /dev/null @@ -1,93 +0,0 @@ ---- -title: Upgrade Bun to the latest version -sidebarTitle: Upgrade Bun -mode: center ---- - -Bun can upgrade itself using the built-in `bun upgrade` command. This is the fastest way to get the latest features and bug fixes. - -```bash terminal icon="terminal" -bun upgrade -``` - -This downloads and installs the latest stable version of Bun, replacing the currently installed version. - -To see the current version of Bun, run `bun --version`. - ---- - -## Verify the upgrade - -After upgrading, verify the new version: - -```bash terminal icon="terminal" -bun --version -# Output: 1.x.y - -# See the exact commit of the Bun binary -bun --revision -# Output: 1.x.y+abc123def -``` - ---- - -## Upgrade to canary builds - -Canary builds are automatically released on every commit to the `main` branch. These are untested but useful for trying new features or verifying bug fixes before they're released. - -```bash terminal icon="terminal" -bun upgrade --canary -``` - -Canary builds are not recommended for production use. They may contain bugs or breaking changes. - ---- - -## Switch back to stable - -If you're on a canary build and want to return to the latest stable release: - -```bash terminal icon="terminal" -bun upgrade --stable -``` - ---- - -## Install a specific version - -To install a specific version of Bun, use the install script with a version tag: - - - - ```bash terminal icon="terminal" - curl -fsSL https://bun.sh/install | bash -s "bun-v1.3.3" - ``` - - - ```powershell PowerShell icon="windows" - iex "& {$(irm https://bun.sh/install.ps1)} -Version 1.3.3" - ``` - - - ---- - -## Package manager users - -If you installed Bun via a package manager, use that package manager to upgrade instead of `bun upgrade` to avoid conflicts. - - -**Homebrew users**
-To avoid conflicts with Homebrew, use `brew upgrade bun` instead. - -**Scoop users**
-To avoid conflicts with Scoop, use `scoop update bun` instead. - -
- ---- - -## See also - -- [Installation](/docs/installation) — Install Bun for the first time -- [Update packages](/docs/pm/cli/update) — Update dependencies to latest versions diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/guides/util/version.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/guides/util/version.mdx deleted file mode 100644 index 0ad5413..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/guides/util/version.mdx +++ /dev/null @@ -1,23 +0,0 @@ ---- -title: Get the current Bun version -sidebarTitle: Get Bun version -mode: center ---- - -Get the current version of Bun in a semver format. - -```ts index.ts icon="/icons/typescript.svg" -Bun.version; // => "1.3.3" -``` - ---- - -Get the exact `git` commit of [`oven-sh/bun`](https://github.com/oven-sh/bun) that was compiled to produce this Bun binary. - -```ts index.ts icon="/icons/typescript.svg" -Bun.revision; // => "49231b2cb9aa48497ab966fc0bb6b742dacc4994" -``` - ---- - -See [Docs > API > Utils](/docs/runtime/utils) for more useful utilities. diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/guides/util/which-path-to-executable-bin.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/guides/util/which-path-to-executable-bin.mdx deleted file mode 100644 index db94768..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/guides/util/which-path-to-executable-bin.mdx +++ /dev/null @@ -1,17 +0,0 @@ ---- -title: Get the path to an executable bin file -sidebarTitle: Find executable path -mode: center ---- - -`Bun.which` is a utility function to find the absolute path of an executable file. It is similar to the `which` command in Unix-like systems. - -```ts foo.ts icon="/icons/typescript.svg" -Bun.which("sh"); // => "/bin/sh" -Bun.which("notfound"); // => null -Bun.which("bun"); // => "/home/user/.bun/bin/bun" -``` - ---- - -See [Docs > API > Utils](/docs/runtime/utils#bun-which) for complete documentation. diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/guides/websocket/compression.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/guides/websocket/compression.mdx deleted file mode 100644 index ef1075b..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/guides/websocket/compression.mdx +++ /dev/null @@ -1,33 +0,0 @@ ---- -title: Enable compression for WebSocket messages -sidebarTitle: Enable compression -mode: center ---- - -Per-message compression can be enabled with the `perMessageDeflate` parameter. When set, all messages will be compressed using the [permessage-deflate](https://tools.ietf.org/html/rfc7692) WebSocket extension. - -```ts server.ts icon="/icons/typescript.svg" -Bun.serve({ - // ... - websocket: { - // enable compression - perMessageDeflate: true, - }, -}); -``` - ---- - -To enable compression for individual messages, pass `true` as the second parameter to `ws.send()`. - -```ts server.ts icon="/icons/typescript.svg" -Bun.serve({ - // ... - websocket: { - async message(ws, message) { - // send a compressed message - ws.send(message, true); - }, - }, -}); -``` diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/guides/websocket/context.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/guides/websocket/context.mdx deleted file mode 100644 index f1d1002..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/guides/websocket/context.mdx +++ /dev/null @@ -1,79 +0,0 @@ ---- -title: Set per-socket contextual data on a WebSocket -sidebarTitle: Contextual data -mode: center ---- - -When building a WebSocket server, it's typically necessary to store some identifying information or context associated with each connected client. - -With [Bun.serve()](/docs/runtime/http/websockets#contextual-data), this "contextual data" is set when the connection is initially upgraded by passing a `data` parameter in the `server.upgrade()` call. - -```ts server.ts icon="/icons/typescript.svg" -Bun.serve({ - fetch(req, server) { - const success = server.upgrade(req, { - data: { - socketId: Math.random(), - }, - }); - if (success) return undefined; - - // handle HTTP request normally - // ... - }, - websocket: { - // TypeScript: specify the type of ws.data like this - data: {} as { socketId: number }, - - // define websocket handlers - async message(ws, message) { - // the contextual data is available as the `data` property - // on the WebSocket instance - console.log(`Received ${message} from ${ws.data.socketId}}`); - }, - }, -}); -``` - ---- - -It's common to read cookies/headers from the incoming request to identify the connecting client. - -```ts server.ts icon="/icons/typescript.svg" -type WebSocketData = { - createdAt: number; - token: string; - userId: string; -}; - -Bun.serve({ - async fetch(req, server) { - // use a library to parse cookies - const cookies = parseCookies(req.headers.get("Cookie")); - const token = cookies["X-Token"]; - const user = await getUserFromToken(token); - - const upgraded = server.upgrade(req, { - data: { - createdAt: Date.now(), - token: cookies["X-Token"], - userId: user.id, - }, - }); - - if (upgraded) return undefined; - }, - websocket: { - // TypeScript: specify the type of ws.data like this - data: {} as WebSocketData, - - async message(ws, message) { - // save the message to a database - await saveMessageToDatabase({ - message: String(message), - userId: ws.data.userId, - }); - }, - }, -}); -``` diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/guides/websocket/pubsub.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/guides/websocket/pubsub.mdx deleted file mode 100644 index 056d37b..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/guides/websocket/pubsub.mdx +++ /dev/null @@ -1,43 +0,0 @@ ---- -title: Build a publish-subscribe WebSocket server -sidebarTitle: Pub-sub server -mode: center ---- - -Bun's server-side `WebSocket` API provides a native pub-sub API. Sockets can be subscribed to a set of named channels using `socket.subscribe()`; messages can be published to a channel using `socket.publish(, )`. - -This code snippet implements a simple single-channel chat server. - -```ts server.ts icon="/icons/typescript.svg" -const server = Bun.serve({ - fetch(req, server) { - const cookies = req.headers.get("cookie"); - const username = getUsernameFromCookies(cookies); - const success = server.upgrade(req, { data: { username } }); - if (success) return undefined; - - return new Response("Hello world"); - }, - websocket: { - // TypeScript: specify the type of ws.data like this - data: {} as { username: string }, - - open(ws) { - const msg = `${ws.data.username} has entered the chat`; - ws.subscribe("the-group-chat"); - server.publish("the-group-chat", msg); - }, - message(ws, message) { - // the server re-broadcasts incoming messages to everyone - server.publish("the-group-chat", `${ws.data.username}: ${message}`); - }, - close(ws) { - const msg = `${ws.data.username} has left the chat`; - server.publish("the-group-chat", msg); - ws.unsubscribe("the-group-chat"); - }, - }, -}); - -console.log(`Listening on ${server.hostname}:${server.port}`); -``` diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/guides/websocket/simple.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/guides/websocket/simple.mdx deleted file mode 100644 index dd1a720..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/guides/websocket/simple.mdx +++ /dev/null @@ -1,38 +0,0 @@ ---- -title: Build a simple WebSocket server -sidebarTitle: Simple server -mode: center ---- - -Start a simple WebSocket server using [`Bun.serve`](/docs/runtime/http/server). - -Inside `fetch`, we attempt to upgrade incoming `ws:` or `wss:` requests to WebSocket connections. - -```ts server.ts icon="/icons/typescript.svg" -const server = Bun.serve({ - fetch(req, server) { - const success = server.upgrade(req); - if (success) { - // Bun automatically returns a 101 Switching Protocols - // if the upgrade succeeds - return undefined; - } - - // handle HTTP request normally - return new Response("Hello world!"); - }, - websocket: { - // TypeScript: specify the type of ws.data like this - data: {} as { authToken: string }, - - // this is called when a message is received - async message(ws, message) { - console.log(`Received ${message}`); - // send back a message - ws.send(`You said: ${message}`); - }, - }, -}); - -console.log(`Listening on ${server.hostname}:${server.port}`); -``` diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/guides/write-file/append.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/guides/write-file/append.mdx deleted file mode 100644 index 44104e1..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/guides/write-file/append.mdx +++ /dev/null @@ -1,54 +0,0 @@ ---- -title: Append content to a file -sidebarTitle: Append to file -mode: center ---- - -Bun implements the `node:fs` module, which includes the `fs.appendFile` and `fs.appendFileSync` functions for appending content to files. - ---- - -You can use `fs.appendFile` to asynchronously append data to a file, creating the file if it does not yet exist. The content can be a string or a `Buffer`. - -```ts -import { appendFile } from "node:fs/promises"; - -await appendFile("message.txt", "data to append"); -``` - ---- - -To use the non-`Promise` API: - -```ts -import { appendFile } from "node:fs"; - -appendFile("message.txt", "data to append", err => { - if (err) throw err; - console.log('The "data to append" was appended to file!'); -}); -``` - ---- - -To specify the encoding of the content: - -```js -import { appendFile } from "node:fs"; - -appendFile("message.txt", "data to append", "utf8", callback); -``` - ---- - -To append the data synchronously, use `fs.appendFileSync`: - -```ts -import { appendFileSync } from "node:fs"; - -appendFileSync("message.txt", "data to append", "utf8"); -``` - ---- - -See the [Node.js documentation](https://nodejs.org/api/fs.html#fspromisesappendfilepath-data-options) for more information. diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/guides/write-file/basic.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/guides/write-file/basic.mdx deleted file mode 100644 index d0c8d14..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/guides/write-file/basic.mdx +++ /dev/null @@ -1,46 +0,0 @@ ---- -title: Write a string to a file -sidebarTitle: Write string to file -mode: center ---- - -This code snippet writes a string to disk at a particular _absolute path_. - -It uses the fast [`Bun.write()`](/docs/runtime/file-io#writing-files-bun-write) API to efficiently write data to disk. The first argument is a _destination_; the second is the _data_ to write. - -```ts -const path = "/path/to/file.txt"; -await Bun.write(path, "Lorem ipsum"); -``` - ---- - -Any relative paths will be resolved relative to the project root (the nearest directory containing a `package.json` file). - -```ts -const path = "./file.txt"; -await Bun.write(path, "Lorem ipsum"); -``` - ---- - -You can pass a `BunFile` as the destination. `Bun.write()` will write the data to its associated path. - -```ts -const path = Bun.file("./file.txt"); -await Bun.write(path, "Lorem ipsum"); -``` - ---- - -`Bun.write()` returns the number of bytes written to disk. - -```ts -const path = "./file.txt"; -const bytes = await Bun.write(path, "Lorem ipsum"); -// => 11 -``` - ---- - -See [Docs > API > File I/O](/docs/runtime/file-io#writing-files-bun-write) for complete documentation of `Bun.write()`. diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/guides/write-file/blob.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/guides/write-file/blob.mdx deleted file mode 100644 index 6409ef3..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/guides/write-file/blob.mdx +++ /dev/null @@ -1,30 +0,0 @@ ---- -title: Write a Blob to a file -sidebarTitle: Write Blob -mode: center ---- - -This code snippet writes a `Blob` to disk at a particular path. - -It uses the fast [`Bun.write()`](/docs/runtime/file-io#writing-files-bun-write) API to efficiently write data to disk. The first argument is a _destination_, like an absolute path or `BunFile` instance. The second argument is the _data_ to write. - -```ts -const path = "/path/to/file.txt"; -await Bun.write(path, "Lorem ipsum"); -``` - ---- - -The `BunFile` class extends `Blob`, so you can pass a `BunFile` directly into `Bun.write()` as well. - -```ts -const path = "./out.txt"; -const data = Bun.file("./in.txt"); - -// write the contents of ./in.txt to ./out.txt -await Bun.write(path, data); -``` - ---- - -See [Docs > API > File I/O](/docs/runtime/file-io#writing-files-bun-write) for complete documentation of `Bun.write()`. diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/guides/write-file/cat.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/guides/write-file/cat.mdx deleted file mode 100644 index 871beda..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/guides/write-file/cat.mdx +++ /dev/null @@ -1,19 +0,0 @@ ---- -title: Write a file to stdout -sidebarTitle: Write file to stdout -mode: center ---- - -Bun exposes `stdout` as a `BunFile` with the `Bun.stdout` property. This can be used as a destination for [`Bun.write()`](/docs/runtime/file-io#writing-files-bun-write). - -This code writes a file to `stdout` similar to the `cat` command in Unix. - -```ts cat.ts icon="/icons/typescript.svg" -const path = "/path/to/file.txt"; -const file = Bun.file(path); -await Bun.write(Bun.stdout, file); -``` - ---- - -See [Docs > API > File I/O](/docs/runtime/file-io#writing-files-bun-write) for complete documentation of `Bun.write()`. diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/guides/write-file/file-cp.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/guides/write-file/file-cp.mdx deleted file mode 100644 index 0c9d7bc..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/guides/write-file/file-cp.mdx +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: Copy a file to another location -sidebarTitle: Copy file -mode: center ---- - -This code snippet copies a file to another location on disk. - -It uses the fast [`Bun.write()`](/docs/runtime/file-io#writing-files-bun-write) API to efficiently write data to disk. The first argument is a _destination_, like an absolute path or `BunFile` instance. The second argument is the _data_ to write. - -```ts -const file = Bun.file("/path/to/original.txt"); -await Bun.write("/path/to/copy.txt", file); -``` - ---- - -See [Docs > API > File I/O](/docs/runtime/file-io#writing-files-bun-write) for complete documentation of `Bun.write()`. diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/guides/write-file/filesink.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/guides/write-file/filesink.mdx deleted file mode 100644 index 55b84fd..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/guides/write-file/filesink.mdx +++ /dev/null @@ -1,54 +0,0 @@ ---- -title: Write a file incrementally -sidebarTitle: Incremental write -mode: center ---- - -Bun provides an API for incrementally writing to a file. This is useful for writing large files, or for writing to a file over a long period of time. - -Call `.writer()` on a `BunFile` to retrieve a `FileSink` instance. This instance can be used to efficiently buffer data and periodically "flush" it to disk. You can write & flush many times. - -```ts -const file = Bun.file("/path/to/file.txt"); -const writer = file.writer(); - -writer.write("lorem"); -writer.write("ipsum"); -writer.write("dolor"); - -writer.flush(); - -// continue writing & flushing -``` - ---- - -The `.write()` method can accept strings or binary data. - -```ts -w.write("hello"); -w.write(Buffer.from("there")); -w.write(new Uint8Array([0, 255, 128])); -writer.flush(); -``` - ---- - -The `FileSink` will also auto-flush when its internal buffer is full. You can configure the buffer size with the `highWaterMark` option. - -```ts -const file = Bun.file("/path/to/file.txt"); -const writer = file.writer({ highWaterMark: 1024 * 1024 }); // 1MB -``` - ---- - -When you're done writing to the file, call `.end()` to auto-flush the buffer and close the file. - -```ts -writer.end(); -``` - ---- - -Full documentation: [FileSink](/docs/runtime/file-io#incremental-writing-with-filesink). diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/guides/write-file/response.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/guides/write-file/response.mdx deleted file mode 100644 index 33503e8..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/guides/write-file/response.mdx +++ /dev/null @@ -1,19 +0,0 @@ ---- -title: Write a Response to a file -sidebarTitle: Write Response -mode: center ---- - -This code snippet writes a `Response` to disk at a particular path. Bun will consume the `Response` body according to its `Content-Type` header. - -It uses the fast [`Bun.write()`](/docs/runtime/file-io#writing-files-bun-write) API to efficiently write data to disk. The first argument is a _destination_, like an absolute path or `BunFile` instance. The second argument is the _data_ to write. - -```ts -const result = await fetch("https://bun.com"); -const path = "./file.txt"; -await Bun.write(path, result); -``` - ---- - -See [Docs > API > File I/O](/docs/runtime/file-io#writing-files-bun-write) for complete documentation of `Bun.write()`. diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/guides/write-file/stdout.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/guides/write-file/stdout.mdx deleted file mode 100644 index f45c7eb..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/guides/write-file/stdout.mdx +++ /dev/null @@ -1,23 +0,0 @@ ---- -title: Write to stdout -sidebarTitle: Write to stdout -mode: center ---- - -The `console.log` function writes to `stdout`. It will automatically append a line break at the end of the printed data. - -```ts -console.log("Lorem ipsum"); -``` - ---- - -For more advanced use cases, Bun exposes `stdout` as a `BunFile` via the `Bun.stdout` property. This can be used as a destination for [`Bun.write()`](/docs/runtime/file-io#writing-files-bun-write). - -```ts -await Bun.write(Bun.stdout, "Lorem ipsum"); -``` - ---- - -See [Docs > API > File I/O](/docs/runtime/file-io#writing-files-bun-write) for complete documentation of `Bun.write()`. diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/guides/write-file/stream.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/guides/write-file/stream.mdx deleted file mode 100644 index 564af5c..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/guides/write-file/stream.mdx +++ /dev/null @@ -1,19 +0,0 @@ ---- -title: Write a ReadableStream to a file -sidebarTitle: Write stream -mode: center ---- - -To write a `ReadableStream` to disk, first create a `Response` instance from the stream. This `Response` can then be written to disk using [`Bun.write()`](/docs/runtime/file-io#writing-files-bun-write). - -```ts -const stream: ReadableStream = ...; -const path = "./file.txt"; -const response = new Response(stream); - -await Bun.write(path, response); -``` - ---- - -See [Docs > API > File I/O](/docs/runtime/file-io#writing-files-bun-write) for complete documentation of `Bun.write()`. diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/guides/write-file/unlink.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/guides/write-file/unlink.mdx deleted file mode 100644 index 839b1d4..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/guides/write-file/unlink.mdx +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: Delete a file -sidebarTitle: Delete file -mode: center ---- - -The `Bun.file()` function accepts a path and returns a `BunFile` instance. Use the `.delete()` method to delete the file. - -```ts -const path = "/path/to/file.txt"; -const file = Bun.file(path); - -await file.delete(); -``` - ---- - -See [Docs > API > File I/O](/docs/runtime/file-io#reading-files-bun-file) for complete documentation of `Bun.file()`. diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/index.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/index.mdx deleted file mode 100644 index 585709f..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/index.mdx +++ /dev/null @@ -1,133 +0,0 @@ ---- -title: Welcome to Bun -description: Bun is an all-in-one toolkit for developing modern JavaScript/TypeScript applications. -mode: center ---- - - - - Get started with bun run - - } - > - A fast JavaScript runtime designed as a drop-in replacement for Node.js - - - Get started with bun install - - } - > - Install packages up to 30x faster than npm with a global cache and workspaces - - - Get started with bun test - - } - > - Jest-compatible, TypeScript-first tests with snapshots, DOM, and watch mode - - - Get started with bun build - - } - > - Bundle TypeScript, JSX, React & CSS for both browsers and servers - - - ---- - -## Get Started - -Bun ships as a single, dependency-free binary and includes a runtime, package manager, test runner, and bundler. New to Bun? - - - - Supported platforms and all install methods. - - - Hello world in minutes with Bun.serve. - - - ---- - -## What's Inside - -- Runtime: Execute JavaScript/TypeScript files and package scripts with near-zero overhead. -- Package Manager: Fast installs, workspaces, overrides, and audits with `bun install`. -- Test Runner: Jest-compatible, TypeScript-first tests with snapshots, DOM, and watch mode. -- Bundler: Native bundling for JS/TS/JSX with splitting, plugins, and HTML imports. - -Explore each area using the cards above. Each section is structured with an overview, quick examples, reference, and best practices for fast scanning and deep dives. - ---- - -## What is Bun? - -Bun is an all-in-one toolkit for JavaScript and TypeScript apps. It ships as a single executable called `bun`. - -At its core is the _Bun runtime_, a fast JavaScript runtime designed as **a drop-in replacement for Node.js**. It's written in Zig and powered by JavaScriptCore under the hood, dramatically reducing startup times and memory usage. - -```bash terminal icon="terminal" -bun run index.tsx # TS and JSX supported out of the box -``` - -The `bun` command-line tool also implements a test runner, script runner, and Node.js-compatible package manager, all significantly faster than existing tools and usable in existing Node.js projects with little to no changes necessary. - -```bash terminal icon="terminal" -bun run start # run the `start` script -bun install # install a package -bun build ./index.tsx # bundle a project for browsers -bun test # run tests -bunx cowsay 'Hello, world!' # execute a package -``` - -## What is a runtime? - -JavaScript (or, more formally, ECMAScript) is just a _specification_ for a programming language. Anyone can write a JavaScript _engine_ that ingests a valid JavaScript program and executes it. The two most popular engines in use today are V8 (developed by Google) -and JavaScriptCore (developed by Apple). Both are open source. - -But most JavaScript programs don't run in a vacuum. They need a way to access the outside world to perform useful tasks. This is where _runtimes_ come in. They implement additional APIs that are then made available to the JavaScript programs they execute. - -### Browsers - -Notably, browsers ship with JavaScript runtimes that implement a set of Web-specific APIs that are exposed via the global `window` object. Any JavaScript code executed by the browser can use these APIs to implement interactive or dynamic behavior in the context of the current webpage. - -### Node.js - -Similarly, Node.js is a JavaScript runtime that can be used in non-browser environments, like servers. JavaScript programs executed by Node.js have access to a set of Node.js-specific [globals](https://nodejs.org/api/globals.html) like `Buffer`, `process`, and `__dirname` in addition to built-in modules for performing OS-level tasks like reading/writing files (`node:fs`) and networking (`node:net`, `node:http`). Node.js also implements a CommonJS-based module system and resolution algorithm that pre-dates JavaScript's native module system. - -Bun is designed as a faster, leaner, more modern replacement for Node.js. - -## Design goals - -Bun is designed from the ground-up with today's JavaScript ecosystem in mind. - -- **Speed**. Bun processes start [4x faster than Node.js](https://twitter.com/jarredsumner/status/1499225725492076544) currently (try it yourself!) -- **TypeScript & JSX support**. You can directly execute `.jsx`, `.ts`, and `.tsx` files; Bun's transpiler converts these to vanilla JavaScript before execution. -- **ESM & CommonJS compatibility**. The world is moving towards ES modules (ESM), but millions of packages on npm still require CommonJS. Bun recommends ES modules, but supports CommonJS. -- **Web-standard APIs**. Bun implements standard Web APIs like `fetch`, `WebSocket`, and `ReadableStream`. Bun is powered by the JavaScriptCore engine, which is developed by Apple for Safari, so some APIs like [`Headers`](https://developer.mozilla.org/en-US/docs/Web/API/Headers) and [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) directly use [Safari's implementation](https://github.com/oven-sh/bun/blob/HEAD/src/bun.js/bindings/webcore/JSFetchHeaders.cpp). -- **Node.js compatibility**. In addition to supporting Node-style module resolution, Bun aims for full compatibility with built-in Node.js globals (`process`, `Buffer`) and modules (`path`, `fs`, `http`, etc.) _This is an ongoing effort that is not complete._ Refer to the [compatibility page](/docs/runtime/nodejs-compat) for the current status. - -Bun is more than a runtime. The long-term goal is to be a cohesive, infrastructural toolkit for building apps with JavaScript/TypeScript, including a package manager, transpiler, bundler, script runner, test runner, and more. diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/installation.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/installation.mdx deleted file mode 100644 index 99f117b..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/installation.mdx +++ /dev/null @@ -1,365 +0,0 @@ ---- -title: Installation -description: Install Bun with npm, Homebrew, Docker, or the official script. ---- - -## Overview - -Bun ships as a single, dependency-free executable. You can install it via script, package manager, or Docker across macOS, Linux, and Windows. - -After installation, verify with `bun --version` and `bun --revision`. - -## Installation - - - - - - ```bash curl icon="globe" - curl -fsSL https://bun.com/install | bash - ``` - - - - **Linux users**  The `unzip` package is required to install Bun. Use `sudo apt install unzip` to install the unzip package. Kernel version 5.6 or higher is strongly recommended, but the minimum is 5.1. Use `uname -r` to check Kernel version. - - - - - - - ```powershell PowerShell icon="terminal" - powershell -c "irm bun.sh/install.ps1|iex" - ``` - - - - Bun requires Windows 10 version 1809 or later. - - - - For support and discussion, please join the **#windows** channel on our [Discord](https://bun.com/discord). - - - - - - - ```bash npm icon="npm" - npm install -g bun # the last `npm` command you'll ever need - ``` - - ```bash Homebrew icon="/icons/homebrew.svg" - brew install oven-sh/bun/bun - ``` - - ```bash Scoop icon="terminal" - scoop install bun - ``` - - - - - - - Bun provides a Docker image that supports both Linux x64 and arm64. - - ```bash Docker icon="docker" - docker pull oven/bun - docker run --rm --init --ulimit memlock=-1:-1 oven/bun - ``` - - ### Image Variants - - There are also image variants for different operating systems: - - ```bash Docker icon="docker" - docker pull oven/bun:debian - docker pull oven/bun:slim - docker pull oven/bun:distroless - docker pull oven/bun:alpine - ``` - - - - -To check that Bun was installed successfully, open a new terminal window and run: - -```bash terminal icon="terminal" -bun --version -# Output: 1.x.y - -# See the precise commit of `oven-sh/bun` that you're using -bun --revision -# Output: 1.x.y+b7982ac13189 -``` - - - If you've installed Bun but are seeing a `command not found` error, you may have to manually add the installation - directory (`~/.bun/bin`) to your `PATH`. - - - - - - - - ```bash terminal icon="terminal" - echo $SHELL - # /bin/zsh or /bin/bash or /bin/fish - ``` - - - - For bash: `~/.bashrc` - - For zsh: `~/.zshrc` - - For fish: `~/.config/fish/config.fish` - - - - Add this line to your configuration file: - ```bash terminal icon="terminal" - export BUN_INSTALL="$HOME/.bun" - export PATH="$BUN_INSTALL/bin:$PATH" - ``` - - - - ```bash terminal icon="terminal" - source ~/.bashrc # or ~/.zshrc - ``` - - - - - - - ```bash terminal icon="terminal" - & "$env:USERPROFILE\.bun\bin\bun" --version - ``` - - If the command runs successfully but `bun --version` is not recognized, it means that bun is not in your system's PATH. To fix this, open a Powershell terminal and run the following command: - - ```bash terminal icon="terminal" - [System.Environment]::SetEnvironmentVariable( - "Path", - [System.Environment]::GetEnvironmentVariable("Path", "User") + ";$env:USERPROFILE\.bun\bin", - [System.EnvironmentVariableTarget]::User - ) - ``` - - - - After running the command, restart your terminal and test with `bun --version` - - ```bash terminal icon="terminal" - bun --version - ``` - - - - - - - ---- - -## Upgrading - -Once installed, the binary can upgrade itself: - -```bash terminal icon="terminal" -bun upgrade -``` - - -**Homebrew users**
-To avoid conflicts with Homebrew, use `brew upgrade bun` instead. - -**Scoop users**
-To avoid conflicts with Scoop, use `scoop update bun` instead. - -
- ---- - -## Canary Builds - -[-> View canary build](https://github.com/oven-sh/bun/releases/tag/canary) - -Bun automatically releases an (untested) canary build on every commit to main. To upgrade to the latest canary build: - -```bash terminal icon="terminal" -# Upgrade to latest canary -bun upgrade --canary - -# Switch back to stable -bun upgrade --stable -``` - -The canary build is useful for testing new features and bug fixes before they're released in a stable build. To help the Bun team fix bugs faster, canary builds automatically upload crash reports to Bun's team. - ---- - -## Installing Older Versions - -Since Bun is a single binary, you can install older versions by re-running the installer script with a specific version. - - - - To install a specific version, pass the git tag to the install script: - - ```bash terminal icon="terminal" - curl -fsSL https://bun.com/install | bash -s "bun-v1.3.3" - ``` - - - - On Windows, pass the version number to the PowerShell install script: - - ```powershell PowerShell icon="windows" - iex "& {$(irm https://bun.com/install.ps1)} -Version 1.3.3" - ``` - - - - ---- - -## Direct Downloads - -To download Bun binaries directly, visit the [releases page on GitHub](https://github.com/oven-sh/bun/releases). - -### Latest Version Downloads - - - - Standard Linux x64 binary - - - For older CPUs without AVX2 - - - Standard Windows binary - - - For older CPUs without AVX2 - - - Apple Silicon (M1/M2/M3) - - - Intel Macs - - - ARM64 Linux systems - - - -### Musl Binaries - -For distributions without `glibc` (Alpine Linux, Void Linux): - -- [Linux x64 musl](https://github.com/oven-sh/bun/releases/latest/download/bun-linux-x64-musl.zip) -- [Linux x64 musl baseline](https://github.com/oven-sh/bun/releases/latest/download/bun-linux-x64-musl-baseline.zip) -- [Linux ARM64 musl](https://github.com/oven-sh/bun/releases/latest/download/bun-linux-aarch64-musl.zip) - - - If you encounter an error like `bun: /lib/x86_64-linux-gnu/libm.so.6: version GLIBC_2.29 not found`, try using the - musl binary. Bun's install script automatically chooses the correct binary for your system. - - ---- - -## CPU Requirements - -Bun has specific CPU requirements based on the binary you're using: - - - - **x64 binaries** target the Haswell CPU architecture (AVX and AVX2 instructions required) - | Platform | Intel Requirement | AMD Requirement | - |----------|-------------------|-----------------| - | x64 | Haswell (4th gen Core) or newer | Excavator or newer | - - - - **x64-baseline binaries** target the Nehalem architecture for older CPUs - | Platform | Intel Requirement | AMD Requirement | - |----------|-------------------|-----------------| - | x64-baseline | Nehalem (1st gen Core) or newer | Bulldozer or newer | - - - Baseline builds are slower than regular builds. Use them only if you encounter an "Illegal - Instruction" error. - - - - - - - Bun does not support CPUs older than the baseline target, which mandates the SSE4.2 extension. macOS requires version - 13.0 or later. - - ---- - -## Uninstall - -To remove Bun from your system: - - - - ```bash terminal icon="terminal" - rm -rf ~/.bun - ``` - - - - ```powershell PowerShell icon="windows" - powershell -c ~\.bun\uninstall.ps1 - ``` - - - - - ```bash npm icon="npm" - npm uninstall -g bun - ``` - ```bash Homebrew icon="/icons/homebrew.svg" - brew uninstall bun - ``` - ```bash Scoop icon="terminal" - scoop uninstall bun - ``` - - - - diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/pm/bunx.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/pm/bunx.mdx deleted file mode 100644 index b92ef33..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/pm/bunx.mdx +++ /dev/null @@ -1,91 +0,0 @@ ---- -title: "bunx" -description: "Run packages from npm" ---- - -import Bunx from "/snippets/cli/bunx.mdx"; - -`bunx` is an alias for `bun x`. The `bunx` CLI will be auto-installed when you install `bun`. - -Use `bunx` to auto-install and run packages from `npm`. It's Bun's equivalent of `npx` or `yarn dlx`. - -```bash terminal icon="terminal" -bunx cowsay "Hello world!" -``` - - - ⚡️ **Speed** — With Bun's fast startup times, `bunx` is [roughly 100x - faster](https://twitter.com/jarredsumner/status/1606163655527059458) than `npx` for locally installed packages. - - -Packages can declare executables in the `"bin"` field of their `package.json`. These are known as _package executables_ or _package binaries_. - -```json package.json icon="file-json" -{ - // ... other fields - "name": "my-cli", - "bin": { - "my-cli": "dist/index.js" - } -} -``` - -These executables are commonly plain JavaScript files marked with a [shebang line]() to indicate which program should be used to execute them. The following file indicates that it should be executed with `node`. - -```js dist/index.js icon="/icons/javascript.svg" -#!/usr/bin/env node - -console.log("Hello world!"); -``` - -These executables can be run with `bunx`, - -```bash terminal icon="terminal" -bunx my-cli -``` - -As with `npx`, `bunx` will check for a locally installed package first, then fall back to auto-installing the package from `npm`. Installed packages will be stored in Bun's global cache for future use. - -## Arguments and flags - -To pass additional command-line flags and arguments through to the executable, place them after the executable name. - -```bash terminal icon="terminal" -bunx my-cli --foo bar -``` - ---- - -## Shebangs - -By default, Bun respects shebangs. If an executable is marked with `#!/usr/bin/env node`, Bun will spin up a `node` process to execute the file. However, in some cases it may be desirable to run executables using Bun's runtime, even if the executable indicates otherwise. To do so, include the `--bun` flag. - -```bash terminal icon="terminal" -bunx --bun my-cli -``` - -The `--bun` flag must occur _before_ the executable name. Flags that appear _after_ the name are passed through to the executable. - -```bash terminal icon="terminal" -bunx --bun my-cli # good -bunx my-cli --bun # bad -``` - -## Package flag - -**`--package ` or `-p `** - Run binary from specific package. Useful when binary name differs from package name: - -```bash terminal icon="terminal" -bunx -p renovate renovate-config-validator -bunx --package @angular/cli ng -``` - -To force bun to always be used with a script, use a shebang. - -```js dist/index.js icon="/icons/javascript.svg" -#!/usr/bin/env bun -``` - ---- - - diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/pm/catalogs.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/pm/catalogs.mdx deleted file mode 100644 index cf1237f..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/pm/catalogs.mdx +++ /dev/null @@ -1,292 +0,0 @@ ---- -title: "Catalogs" -description: "Share common dependency versions across multiple packages in a monorepo" ---- - -Catalogs in Bun provide a straightforward way to share common dependency versions across multiple packages in a monorepo. Rather than specifying the same versions repeatedly in each workspace package, you define them once in the root package.json and reference them consistently throughout your project. - -## Overview - -Unlike traditional dependency management where each workspace package needs to independently specify versions, catalogs let you: - -1. Define version catalogs in the root package.json -2. Reference these versions with a simple `catalog:` protocol -3. Update all packages simultaneously by changing the version in just one place - -This is especially useful in large monorepos where dozens of packages need to use the same version of key dependencies. - -## How to Use Catalogs - -### Directory Structure Example - -Consider a monorepo with the following structure: - -``` -my-monorepo/ -├── package.json -├── bun.lock -└── packages/ - ├── app/ - │ └── package.json - ├── ui/ - │ └── package.json - └── utils/ - └── package.json -``` - -### 1. Define Catalogs in Root package.json - -In your root-level `package.json`, add a `catalog` or `catalogs` field within the `workspaces` object: - -```json package.json icon="file-json" -{ - "name": "my-monorepo", - "workspaces": { - "packages": ["packages/*"], - "catalog": { - "react": "^19.0.0", - "react-dom": "^19.0.0" - }, - "catalogs": { - "testing": { - "jest": "30.0.0", - "testing-library": "14.0.0" - } - } - } -} -``` - -If you put `catalog` or `catalogs` at the top level of the `package.json` file, that will work too. - -### 2. Reference Catalog Versions in Workspace Packages - -In your workspace packages, use the `catalog:` protocol to reference versions: - -```json packages/app/package.json icon="file-json" -{ - "name": "app", - "dependencies": { - "react": "catalog:", - "react-dom": "catalog:", - "jest": "catalog:testing" - } -} -``` - -```json packages/ui/package.json icon="file-json" -{ - "name": "ui", - "dependencies": { - "react": "catalog:", - "react-dom": "catalog:" - }, - "devDependencies": { - "jest": "catalog:testing", - "testing-library": "catalog:testing" - } -} -``` - -### 3. Run Bun Install - -Run `bun install` to install all dependencies according to the catalog versions. - -## Catalog vs Catalogs - -Bun supports two ways to define catalogs: - -1. **`catalog`** (singular): A single default catalog for commonly used dependencies - - ```json package.json icon="file-json" - "catalog": { - "react": "^19.0.0", - "react-dom": "^19.0.0" - } - ``` - - Reference with simply `catalog:`: - - ```json packages/app/package.json icon="file-json" - "dependencies": { - "react": "catalog:" - } - ``` - -2. **`catalogs`** (plural): Multiple named catalogs for grouping dependencies - - ```json package.json icon="file-json" - "catalogs": { - "testing": { - "jest": "30.0.0" - }, - "ui": { - "tailwind": "4.0.0" - } - } - ``` - - Reference with `catalog:`: - - ```json packages/app/package.json icon="file-json" - "dependencies": { - "jest": "catalog:testing", - "tailwind": "catalog:ui" - } - ``` - -## Benefits of Using Catalogs - -- **Consistency**: Ensures all packages use the same version of critical dependencies -- **Maintenance**: Update a dependency version in one place instead of across multiple package.json files -- **Clarity**: Makes it obvious which dependencies are standardized across your monorepo -- **Simplicity**: No need for complex version resolution strategies or external tools - -## Real-World Example - -Here's a more comprehensive example for a React application: - -**Root package.json** - -```json package.json icon="file-json" -{ - "name": "react-monorepo", - "workspaces": { - "packages": ["packages/*"], - "catalog": { - "react": "^19.0.0", - "react-dom": "^19.0.0", - "react-router-dom": "^6.15.0" - }, - "catalogs": { - "build": { - "webpack": "5.88.2", - "babel": "7.22.10" - }, - "testing": { - "jest": "29.6.2", - "react-testing-library": "14.0.0" - } - } - }, - "devDependencies": { - "typescript": "5.1.6" - } -} -``` - -```json packages/app/package.json icon="file-json" -{ - "name": "app", - "dependencies": { - "react": "catalog:", - "react-dom": "catalog:", - "react-router-dom": "catalog:", - "@monorepo/ui": "workspace:*", - "@monorepo/utils": "workspace:*" - }, - "devDependencies": { - "webpack": "catalog:build", - "babel": "catalog:build", - "jest": "catalog:testing", - "react-testing-library": "catalog:testing" - } -} -``` - -```json packages/ui/package.json icon="file-json" -{ - "name": "@monorepo/ui", - "dependencies": { - "react": "catalog:", - "react-dom": "catalog:" - }, - "devDependencies": { - "jest": "catalog:testing", - "react-testing-library": "catalog:testing" - } -} -``` - -```json packages/utils/package.json icon="file-json" -{ - "name": "@monorepo/utils", - "dependencies": { - "react": "catalog:" - }, - "devDependencies": { - "jest": "catalog:testing" - } -} -``` - -## Updating Versions - -To update versions across all packages, simply change the version in the root package.json: - -```json package.json icon="file-json" -"catalog": { - "react": "^19.1.0", // Updated from ^19.0.0 - "react-dom": "^19.1.0" // Updated from ^19.0.0 -} -``` - -Then run `bun install` to update all packages. - -## Lockfile Integration - -Bun's lockfile tracks catalog versions, making it easy to ensure consistent installations across different environments. The lockfile includes: - -- The catalog definitions from your package.json -- The resolution of each cataloged dependency - -```json bun.lock(excerpt) icon="file-json" -{ - "lockfileVersion": 1, - "workspaces": { - "": { - "name": "react-monorepo", - }, - "packages/app": { - "name": "app", - "dependencies": { - "react": "catalog:", - "react-dom": "catalog:", - ... - }, - }, - ... - }, - "catalog": { - "react": "^19.0.0", - "react-dom": "^19.0.0", - ... - }, - "catalogs": { - "build": { - "webpack": "5.88.2", - ... - }, - ... - }, - "packages": { - ... - } -} -``` - -## Limitations and Edge Cases - -- Catalog references must match a dependency defined in either `catalog` or one of the named `catalogs` -- Empty strings and whitespace in catalog names are ignored (treated as default catalog) -- Invalid dependency versions in catalogs will fail to resolve during `bun install` -- Catalogs are only available within workspaces; they cannot be used outside the monorepo - -Bun's catalog system provides a powerful yet simple way to maintain consistency across your monorepo without introducing additional complexity to your workflow. - -## Publishing - -When you run `bun publish` or `bun pm pack`, Bun automatically replaces -`catalog:` references in your `package.json` with the resolved version numbers. -The published package includes regular semver strings and no longer depends on -your catalog definitions. diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/pm/cli/add.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/pm/cli/add.mdx deleted file mode 100644 index f699951..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/pm/cli/add.mdx +++ /dev/null @@ -1,179 +0,0 @@ ---- -title: "bun add" -description: "Add packages to your project with Bun's fast package manager" ---- - -import Add from "/snippets/cli/add.mdx"; - -To add a particular package: - -```bash terminal icon="terminal" -bun add preact -``` - -To specify a version, version range, or tag: - -```bash terminal icon="terminal" -bun add zod@3.20.0 -bun add zod@^3.0.0 -bun add zod@latest -``` - -## `--dev` - -**Alias** — `--development`, `-d`, `-D` - -To add a package as a dev dependency (`"devDependencies"`): - -```bash terminal icon="terminal" -bun add --dev @types/react -bun add -d @types/react -``` - -## `--optional` - -To add a package as an optional dependency (`"optionalDependencies"`): - -```bash terminal icon="terminal" -bun add --optional lodash -``` - -## `--peer` - -To add a package as a peer dependency (`"peerDependencies"`): - -```bash terminal icon="terminal" -bun add --peer @types/bun -``` - -## `--exact` - -**Alias** — `-E` - -To add a package and pin to the resolved version, use `--exact`. This will resolve the version of the package and add it to your `package.json` with an exact version number instead of a version range. - -```bash terminal icon="terminal" -bun add react --exact -bun add react -E -``` - -This will add the following to your `package.json`: - -```json package.json icon="file-json" -{ - "dependencies": { - // without --exact - "react": "^18.2.0", // this matches >= 18.2.0 < 19.0.0 - - // with --exact - "react": "18.2.0" // this matches only 18.2.0 exactly - } -} -``` - -To view a complete list of options for this command: - -```bash terminal icon="terminal" -bun add --help -``` - -## `--global` - - - **Note** — This would not modify package.json of your current project folder. **Alias** - `bun add --global`, `bun add - -g`, `bun install --global` and `bun install -g` - - -To install a package globally, use the `-g`/`--global` flag. This will not modify the `package.json` of your current project. Typically this is used for installing command-line tools. - -```bash terminal icon="terminal" -bun add --global cowsay # or `bun add -g cowsay` -cowsay "Bun!" -``` - -```txt - ______ -< Bun! > - ------ - \ ^__^ - \ (oo)\_______ - (__)\ )\/\ - ||----w | - || || -``` - - - -```toml bunfig.toml icon="settings" -[install] -# where `bun add --global` installs packages -globalDir = "~/.bun/install/global" - -# where globally-installed package bins are linked -globalBinDir = "~/.bun/bin" -``` - - - -## Trusted dependencies - -Unlike other npm clients, Bun does not execute arbitrary lifecycle scripts for installed dependencies, such as `postinstall`. These scripts represent a potential security risk, as they can execute arbitrary code on your machine. - -To tell Bun to allow lifecycle scripts for a particular package, add the package to `trustedDependencies` in your package.json. - -```json package.json icon="file-json" -{ - "name": "my-app", - "version": "1.0.0", - "trustedDependencies": ["my-trusted-package"] // [!code ++] -} -``` - -Bun reads this field and will run lifecycle scripts for `my-trusted-package`. - -## Git dependencies - -To add a dependency from a public or private git repository: - -```bash terminal icon="terminal" -bun add git@github.com:moment/moment.git -``` - - - To install private repositories, your system needs the appropriate SSH credentials to access the repository. - - -Bun supports a variety of protocols, including [`github`](https://docs.npmjs.com/cli/v9/configuring-npm/package-json#github-urls), [`git`](https://docs.npmjs.com/cli/v9/configuring-npm/package-json#git-urls-as-dependencies), `git+ssh`, `git+https`, and many more. - -```json package.json icon="file-json" -{ - "dependencies": { - "dayjs": "git+https://github.com/iamkun/dayjs.git", - "lodash": "git+ssh://github.com/lodash/lodash.git#4.17.21", - "moment": "git@github.com:moment/moment.git", - "zod": "github:colinhacks/zod" - } -} -``` - -## Tarball dependencies - -A package name can correspond to a publicly hosted `.tgz` file. During installation, Bun will download and install the package from the specified tarball URL, rather than from the package registry. - -```sh terminal icon="terminal" -bun add zod@https://registry.npmjs.org/zod/-/zod-3.21.4.tgz -``` - -This will add the following line to your `package.json`: - -```json package.json icon="file-json" -{ - "dependencies": { - "zod": "https://registry.npmjs.org/zod/-/zod-3.21.4.tgz" - } -} -``` - ---- - - diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/pm/cli/audit.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/pm/cli/audit.mdx deleted file mode 100644 index ce387d9..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/pm/cli/audit.mdx +++ /dev/null @@ -1,60 +0,0 @@ ---- -title: "bun audit" -description: "Check your installed packages for known security vulnerabilities" ---- - -Run the command in a project with a `bun.lock` file: - -```bash terminal icon="terminal" -bun audit -``` - -Bun sends the list of installed packages and versions to NPM, and prints a report of any vulnerabilities that were found. Packages installed from registries other than the default registry are skipped. - -If no vulnerabilities are found, the command prints: - -``` -No vulnerabilities found -``` - -When vulnerabilities are detected, each affected package is listed along with the severity, a short description and a link to the advisory. At the end of the report Bun prints a summary and hints for updating: - -``` -3 vulnerabilities (1 high, 2 moderate) -To update all dependencies to the latest compatible versions: - bun update -To update all dependencies to the latest versions (including breaking changes): - bun update --latest -``` - -### Filtering options - -**`--audit-level=`** - Only show vulnerabilities at this severity level or higher: - -```bash terminal icon="terminal" -bun audit --audit-level=high -``` - -**`--prod`** - Audit only production dependencies (excludes devDependencies): - -```bash terminal icon="terminal" -bun audit --prod -``` - -**`--ignore `** - Ignore specific CVEs (can be used multiple times): - -```bash terminal icon="terminal" -bun audit --ignore CVE-2022-25883 --ignore CVE-2023-26136 -``` - -### `--json` - -Use the `--json` flag to print the raw JSON response from the registry instead of the formatted report: - -```bash terminal icon="terminal" -bun audit --json -``` - -### Exit code - -`bun audit` will exit with code `0` if no vulnerabilities are found and `1` if the report lists any vulnerabilities. This will still happen even if `--json` is passed. diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/pm/cli/info.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/pm/cli/info.mdx deleted file mode 100644 index 9e4feb1..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/pm/cli/info.mdx +++ /dev/null @@ -1,70 +0,0 @@ ---- -title: "bun info" -description: "Display package metadata from the npm registry" ---- - -`bun info` displays package metadata from the npm registry. - -## Usage - -```bash terminal icon="terminal" -bun info react -``` - -This will display information about the `react` package, including its latest version, description, homepage, dependencies, and more. - -## Viewing specific versions - -To view information about a specific version: - -```bash terminal icon="terminal" -bun info react@18.0.0 -``` - -## Viewing specific properties - -You can also query specific properties from the package metadata: - -```bash terminal icon="terminal" -bun info react version -bun info react dependencies -bun info react repository.url -``` - -## JSON output - -To get the output in JSON format, use the `--json` flag: - -```bash terminal icon="terminal" -bun info react --json -``` - -## Alias - -`bun pm view` is an alias for `bun info`: - -```bash terminal icon="terminal" -bun pm view react # equivalent to: bun info react -``` - -## Examples - -```bash terminal icon="terminal" -# View basic package information -bun info is-number - -# View a specific version -bun info is-number@7.0.0 - -# View all available versions -bun info is-number versions - -# View package dependencies -bun info express dependencies - -# View package homepage -bun info lodash homepage - -# Get JSON output -bun info react --json -``` diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/pm/cli/install.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/pm/cli/install.mdx deleted file mode 100644 index bd0bccc..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/pm/cli/install.mdx +++ /dev/null @@ -1,606 +0,0 @@ ---- -title: "bun install" -description: "Install packages with Bun's fast package manager" ---- - -import Install from "/snippets/cli/install.mdx"; - -## Basic Usage - -```bash terminal icon="terminal" -bun install react -bun install react@19.1.1 # specific version -bun install react@latest # specific tag -``` - -The `bun` CLI contains a Node.js-compatible package manager designed to be a dramatically faster replacement for `npm`, `yarn`, and `pnpm`. It's a standalone tool that will work in pre-existing Node.js projects; if your project has a `package.json`, `bun install` can help you speed up your workflow. - - - -**⚡️ 25x faster** — Switch from `npm install` to `bun install` in any Node.js project to make your installations up to 25x faster. - - - ![Bun installation speed - comparison](https://user-images.githubusercontent.com/709451/147004342-571b6123-17a9-49a2-8bfd-dcfc5204047e.png) - - - - - -The recommended minimum Linux Kernel version is 5.6. If you're on Linux kernel 5.1 - 5.5, `bun install` will work, but HTTP requests will be slow due to a lack of support for io_uring's `connect()` operation. - -If you're using Ubuntu 20.04, here's how to install a [newer kernel](https://wiki.ubuntu.com/Kernel/LTSEnablementStack): - -```bash terminal icon="terminal" -# If this returns a version >= 5.6, you don't need to do anything -uname -r - -# Install the official Ubuntu hardware enablement kernel -sudo apt install --install-recommends linux-generic-hwe-20.04 -``` - - - -To install all dependencies of a project: - -```bash terminal icon="terminal" -bun install -``` - -Running `bun install` will: - -- **Install** all `dependencies`, `devDependencies`, and `optionalDependencies`. Bun will install `peerDependencies` by default. -- **Run** your project's `{pre|post}install` and `{pre|post}prepare` scripts at the appropriate time. For security reasons Bun _does not execute_ lifecycle scripts of installed dependencies. -- **Write** a `bun.lock` lockfile to the project root. - ---- - -## Logging - -To modify logging verbosity: - -```bash terminal icon="terminal" -bun install --verbose # debug logging -bun install --silent # no logging -``` - ---- - -## Lifecycle scripts - -Unlike other npm clients, Bun does not execute arbitrary lifecycle scripts like `postinstall` for installed dependencies. Executing arbitrary scripts represents a potential security risk. - -To tell Bun to allow lifecycle scripts for a particular package, add the package to `trustedDependencies` in your package.json. - -```json package.json icon="file-json" -{ - "name": "my-app", - "version": "1.0.0", - "trustedDependencies": ["my-trusted-package"] // [!code ++] -} -``` - -Then re-install the package. Bun will read this field and run lifecycle scripts for `my-trusted-package`. - -Lifecycle scripts will run in parallel during installation. To adjust the maximum number of concurrent scripts, use the `--concurrent-scripts` flag. The default is two times the reported cpu count or GOMAXPROCS. - -```bash terminal icon="terminal" -bun install --concurrent-scripts 5 -``` - -Bun automatically optimizes postinstall scripts for popular packages (like `esbuild`, `sharp`, etc.) by determining which scripts need to run. To disable these optimizations: - -```bash terminal icon="terminal" -BUN_FEATURE_FLAG_DISABLE_NATIVE_DEPENDENCY_LINKER=1 bun install -BUN_FEATURE_FLAG_DISABLE_IGNORE_SCRIPTS=1 bun install -``` - ---- - -## Workspaces - -Bun supports `"workspaces"` in package.json. For complete documentation refer to [Package manager > Workspaces](/docs/pm/workspaces). - -```json package.json icon="file-json" -{ - "name": "my-app", - "version": "1.0.0", - "workspaces": ["packages/*"], // [!code ++] - "dependencies": { - "preact": "^10.5.13" - } -} -``` - ---- - -## Installing dependencies for specific packages - -In a monorepo, you can install the dependencies for a subset of packages using the `--filter` flag. - -```bash terminal icon="terminal" -# Install dependencies for all workspaces except `pkg-c` -bun install --filter '!pkg-c' - -# Install dependencies for only `pkg-a` in `./packages/pkg-a` -bun install --filter './packages/pkg-a' -``` - -For more information on filtering with `bun install`, refer to [Package Manager > Filtering](/docs/pm/filter#bun-install-and-bun-outdated) - ---- - -## Overrides and resolutions - -Bun supports npm's `"overrides"` and Yarn's `"resolutions"` in `package.json`. These are mechanisms for specifying a version range for _metadependencies_—the dependencies of your dependencies. Refer to [Package manager > Overrides and resolutions](/docs/pm/overrides) for complete documentation. - -{/* prettier-ignore */} -```json package.json icon="file-json" -{ - "name": "my-app", - "dependencies": { - "foo": "^2.0.0" - }, - "overrides": { // [!code ++] - "bar": "~4.4.0" // [!code ++] - } // [!code ++] -} -``` - ---- - -## Global packages - -To install a package globally, use the `-g`/`--global` flag. Typically this is used for installing command-line tools. - -```bash terminal icon="terminal" -bun install --global cowsay # or `bun install -g cowsay` -cowsay "Bun!" -``` - -```txt - ______ -< Bun! > - ------ - \ ^__^ - \ (oo)\_______ - (__)\ )\/\ - ||----w | - || || -``` - ---- - -## Production mode - -To install in production mode (i.e. without `devDependencies` or `optionalDependencies`): - -```bash terminal icon="terminal" -bun install --production -``` - -For reproducible installs, use `--frozen-lockfile`. This will install the exact versions of each package specified in the lockfile. If your `package.json` disagrees with `bun.lock`, Bun will exit with an error. The lockfile will not be updated. - -```bash terminal icon="terminal" -bun install --frozen-lockfile -``` - -For more information on Bun's lockfile `bun.lock`, refer to [Package manager > Lockfile](/docs/pm/lockfile). - ---- - -## Omitting dependencies - -To omit dev, peer, or optional dependencies use the `--omit` flag. - -```bash terminal icon="terminal" -# Exclude "devDependencies" from the installation. This will apply to the -# root package and workspaces if they exist. Transitive dependencies will -# not have "devDependencies". -bun install --omit dev - -# Install only dependencies from "dependencies" -bun install --omit=dev --omit=peer --omit=optional -``` - ---- - -## Dry run - -To perform a dry run (i.e. don't actually install anything): - -```bash terminal icon="terminal" -bun install --dry-run -``` - ---- - -## Non-npm dependencies - -Bun supports installing dependencies from Git, GitHub, and local or remotely-hosted tarballs. For complete documentation refer to [Package manager > Git, GitHub, and tarball dependencies](/docs/pm/cli/add). - -```json package.json icon="file-json" -{ - "dependencies": { - "dayjs": "git+https://github.com/iamkun/dayjs.git", - "lodash": "git+ssh://github.com/lodash/lodash.git#4.17.21", - "moment": "git@github.com:moment/moment.git", - "zod": "github:colinhacks/zod", - "react": "https://registry.npmjs.org/react/-/react-18.2.0.tgz", - "bun-types": "npm:@types/bun" - } -} -``` - ---- - -## Installation strategies - -Bun supports two package installation strategies that determine how dependencies are organized in `node_modules`: - -### Hoisted installs - -The traditional npm/Yarn approach that flattens dependencies into a shared `node_modules` directory: - -```bash terminal icon="terminal" -bun install --linker hoisted -``` - -### Isolated installs - -A pnpm-like approach that creates strict dependency isolation to prevent phantom dependencies: - -```bash terminal icon="terminal" -bun install --linker isolated -``` - -Isolated installs create a central package store in `node_modules/.bun/` with symlinks in the top-level `node_modules`. This ensures packages can only access their declared dependencies. - -### Default strategy - -The default linker strategy depends on whether you're starting fresh or have an existing project: - -- **New workspaces/monorepos**: `isolated` (prevents phantom dependencies) -- **New single-package projects**: `hoisted` (traditional npm behavior) -- **Existing projects (made pre-v1.3.2)**: `hoisted` (preserves backward compatibility) - -The default is controlled by a `configVersion` field in your lockfile. For a detailed explanation, see [Package manager > Isolated installs](/docs/pm/isolated-installs). - ---- - -## Minimum release age - -To protect against supply chain attacks where malicious packages are quickly published, you can configure a minimum age requirement for npm packages. Package versions published more recently than the specified threshold (in seconds) will be filtered out during installation. - -```bash terminal icon="terminal" -# Only install package versions published at least 3 days ago -bun add @types/bun --minimum-release-age 259200 # seconds -``` - -You can also configure this in `bunfig.toml`: - -```toml bunfig.toml icon="settings" -[install] -# Only install package versions published at least 3 days ago -minimumReleaseAge = 259200 # seconds - -# Exclude trusted packages from the age gate -minimumReleaseAgeExcludes = ["@types/node", "typescript"] -``` - -When the minimum age filter is active: - -- Only affects new package resolution - existing packages in `bun.lock` remain unchanged -- All dependencies (direct and transitive) are filtered to meet the age requirement when being resolved -- When versions are blocked by the age gate, a stability check detects rapid bugfix patterns - - If multiple versions were published close together just outside your age gate, it extends the filter to skip those potentially unstable versions and selects an older, more mature version - - Searches up to 7 days after the age gate, however if still finding rapid releases it ignores stability check - - Exact version requests (like `package@1.1.1`) still respect the age gate but bypass the stability check -- Versions without a `time` field are treated as passing the age check (npm registry should always provide timestamps) - -For more advanced security scanning, including integration with services & custom filtering, see [Package manager > Security Scanner API](/docs/pm/security-scanner-api). - ---- - -## Configuration - -### Configuring `bun install` with `bunfig.toml` - -`bunfig.toml` is searched for in the following paths on `bun install`, `bun remove`, and `bun add`: - -1. `$XDG_CONFIG_HOME/.bunfig.toml` or `$HOME/.bunfig.toml` -2. `./bunfig.toml` - -If both are found, the results are merged together. - -Configuring with `bunfig.toml` is optional. Bun tries to be zero configuration in general, but that's not always possible. The default behavior of `bun install` can be configured in `bunfig.toml`. The default values are shown below. - -```toml bunfig.toml icon="settings" -[install] - -# whether to install optionalDependencies -optional = true - -# whether to install devDependencies -dev = true - -# whether to install peerDependencies -peer = true - -# equivalent to `--production` flag -production = false - -# equivalent to `--save-text-lockfile` flag -saveTextLockfile = false - -# equivalent to `--frozen-lockfile` flag -frozenLockfile = false - -# equivalent to `--dry-run` flag -dryRun = false - -# equivalent to `--concurrent-scripts` flag -concurrentScripts = 16 # (cpu count or GOMAXPROCS) x2 - -# installation strategy: "hoisted" or "isolated" -# default depends on lockfile configVersion and workspaces: -# - configVersion = 1: "isolated" if using workspaces, otherwise "hoisted" -# - configVersion = 0: "hoisted" -linker = "hoisted" - - -# minimum age config -minimumReleaseAge = 259200 # seconds -minimumReleaseAgeExcludes = ["@types/node", "typescript"] -``` - -### Configuring with environment variables - -Environment variables have a higher priority than `bunfig.toml`. - -| Name | Description | -| ---------------------------------- | ------------------------------------------------------------- | -| `BUN_CONFIG_REGISTRY` | Set an npm registry (default: https://registry.npmjs.org) | -| `BUN_CONFIG_TOKEN` | Set an auth token (currently does nothing) | -| `BUN_CONFIG_YARN_LOCKFILE` | Save a Yarn v1-style yarn.lock | -| `BUN_CONFIG_LINK_NATIVE_BINS` | Point `bin` in package.json to a platform-specific dependency | -| `BUN_CONFIG_SKIP_SAVE_LOCKFILE` | Don’t save a lockfile | -| `BUN_CONFIG_SKIP_LOAD_LOCKFILE` | Don’t load a lockfile | -| `BUN_CONFIG_SKIP_INSTALL_PACKAGES` | Don’t install any packages | - -Bun always tries to use the fastest available installation method for the target platform. On macOS, that’s `clonefile` and on Linux, that’s `hardlink`. You can change which installation method is used with the `--backend` flag. When unavailable or on error, `clonefile` and `hardlink` fallsback to a platform-specific implementation of copying files. - -Bun stores installed packages from npm in `~/.bun/install/cache/${name}@${version}`. Note that if the semver version has a `build` or a `pre` tag, it is replaced with a hash of that value instead. This is to reduce the chances of errors from long file paths, but unfortunately complicates figuring out where a package was installed on disk. - -When the `node_modules` folder exists, before installing, Bun checks if the `"name"` and `"version"` in `package/package.json` in the expected node_modules folder matches the expected `name` and `version`. This is how it determines whether it should install. It uses a custom JSON parser which stops parsing as soon as it finds `"name"` and `"version"`. - -When a `bun.lock` doesn’t exist or `package.json` has changed dependencies, tarballs are downloaded & extracted eagerly while resolving. - -When a `bun.lock` exists and `package.json` hasn’t changed, Bun downloads missing dependencies lazily. If the package with a matching `name` & `version` already exists in the expected location within `node_modules`, Bun won’t attempt to download the tarball. - -## CI/CD - -Use the official [`oven-sh/setup-bun`](https://github.com/oven-sh/setup-bun) action to install `bun` in a GitHub Actions pipeline: - -```yaml .github/workflows/release.yml icon="file-code" -name: bun-types -jobs: - build: - name: build-app - runs-on: ubuntu-latest - steps: - - name: Checkout repo - uses: actions/checkout@v4 - - name: Install bun - uses: oven-sh/setup-bun@v2 - - name: Install dependencies - run: bun install - - name: Build app - run: bun run build -``` - -For CI/CD environments that want to enforce reproducible builds, use `bun ci` to fail the build if the package.json is out of sync with the lockfile: - -```bash terminal icon="terminal" -bun ci -``` - -This is equivalent to `bun install --frozen-lockfile`. It installs exact versions from `bun.lock` and fails if `package.json` doesn't match the lockfile. To use `bun ci` or `bun install --frozen-lockfile`, you must commit `bun.lock` to version control. - -And instead of running `bun install`, run `bun ci`. - -```yaml .github/workflows/release.yml icon="file-code" -name: bun-types -jobs: - build: - name: build-app - runs-on: ubuntu-latest - steps: - - name: Checkout repo - uses: actions/checkout@v4 - - name: Install bun - uses: oven-sh/setup-bun@v2 - - name: Install dependencies - run: bun ci - - name: Build app - run: bun run build -``` - -## Platform-specific dependencies? - -bun stores normalized `cpu` and `os` values from npm in the lockfile, along with the resolved packages. It skips downloading, extracting, and installing packages disabled for the current target at runtime. This means the lockfile won't change between platforms/architectures even if the packages ultimately installed do change. - -### `--cpu` and `--os` flags - -You can override the target platform for package selection: - -```bash -bun install --cpu=x64 --os=linux -``` - -This installs packages for the specified platform instead of the current system. Useful for cross-platform builds or when preparing deployments for different environments. - -**Accepted values for `--cpu`**: `arm64`, `x64`, `ia32`, `ppc64`, `s390x` - -**Accepted values for `--os`**: `linux`, `darwin`, `win32`, `freebsd`, `openbsd`, `sunos`, `aix` - -## Peer dependencies? - -Peer dependencies are handled similarly to yarn. `bun install` will automatically install peer dependencies. If the dependency is marked optional in `peerDependenciesMeta`, an existing dependency will be chosen if possible. - -## Lockfile - -`bun.lock` is Bun’s lockfile format. See [our blogpost about the text lockfile](https://bun.com/blog/bun-lock-text-lockfile). - -Prior to Bun 1.2, the lockfile was binary and called `bun.lockb`. Old lockfiles can be upgraded to the new format by running `bun install --save-text-lockfile --frozen-lockfile --lockfile-only`, and then deleting `bun.lockb`. - -## Cache - -To delete the cache: - -```bash -bun pm cache rm -# or -rm -rf ~/.bun/install/cache -``` - -## Platform-specific backends - -`bun install` uses different system calls to install dependencies depending on the platform. This is a performance optimization. You can force a specific backend with the `--backend` flag. - -**`hardlink`** is the default backend on Linux. Benchmarking showed it to be the fastest on Linux. - -```bash -rm -rf node_modules -bun install --backend hardlink -``` - -**`clonefile`** is the default backend on macOS. Benchmarking showed it to be the fastest on macOS. It is only available on macOS. - -```bash -rm -rf node_modules -bun install --backend clonefile -``` - -**`clonefile_each_dir`** is similar to `clonefile`, except it clones each file individually per directory. It is only available on macOS and tends to perform slower than `clonefile`. Unlike `clonefile`, this does not recursively clone subdirectories in one system call. - -```bash -rm -rf node_modules -bun install --backend clonefile_each_dir -``` - -**`copyfile`** is the fallback used when any of the above fail, and is the slowest. on macOS, it uses `fcopyfile()` and on linux it uses `copy_file_range()`. - -```bash -rm -rf node_modules -bun install --backend copyfile -``` - -**`symlink`** is typically only used for `file:` dependencies (and eventually `link:`) internally. To prevent infinite loops, it skips symlinking the `node_modules` folder. - -If you install with `--backend=symlink`, Node.js won't resolve node_modules of dependencies unless each dependency has its own node_modules folder or you pass `--preserve-symlinks` to `node` or `bun`. See [Node.js documentation on `--preserve-symlinks`](https://nodejs.org/api/cli.html#--preserve-symlinks). - -```bash -rm -rf node_modules -bun install --backend symlink -bun --preserve-symlinks ./my-file.js -node --preserve-symlinks ./my-file.js # https://nodejs.org/api/cli.html#--preserve-symlinks -``` - -## npm registry metadata - -Bun uses a binary format for caching NPM registry responses. This loads much faster than JSON and tends to be smaller on disk. -You will see these files in `~/.bun/install/cache/*.npm`. The filename pattern is `${hash(packageName)}.npm`. It’s a hash so that extra directories don’t need to be created for scoped packages. - -Bun's usage of `Cache-Control` ignores `Age`. This improves performance, but means bun may be about 5 minutes out of date to receive the latest package version metadata from npm. - -## pnpm migration - -Bun automatically migrates projects from pnpm to bun. When a `pnpm-lock.yaml` file is detected and no `bun.lock` file exists, Bun will automatically migrate the lockfile to `bun.lock` during installation. The original `pnpm-lock.yaml` file remains unmodified. - -```bash terminal icon="terminal" -bun install -``` - -**Note**: Migration only runs when `bun.lock` is absent. There is currently no opt-out flag for pnpm migration. - -The migration process handles: - -### Lockfile Migration - -- Converts `pnpm-lock.yaml` to `bun.lock` format -- Preserves package versions and resolution information -- Maintains dependency relationships and peer dependencies -- Handles patched dependencies with integrity hashes - -### Workspace Configuration - -When a `pnpm-workspace.yaml` file exists, Bun migrates workspace settings to your root `package.json`: - -```yaml pnpm-workspace.yaml icon="file-code" -packages: - - "apps/*" - - "packages/*" - -catalog: - react: ^18.0.0 - typescript: ^5.0.0 - -catalogs: - build: - webpack: ^5.0.0 - babel: ^7.0.0 -``` - -The workspace packages list and catalogs are moved to the `workspaces` field in `package.json`: - -```json package.json icon="file-json" -{ - "workspaces": { - "packages": ["apps/*", "packages/*"], - "catalog": { - "react": "^18.0.0", - "typescript": "^5.0.0" - }, - "catalogs": { - "build": { - "webpack": "^5.0.0", - "babel": "^7.0.0" - } - } - } -} -``` - -### Catalog Dependencies - -Dependencies using pnpm's `catalog:` protocol are preserved: - -```json package.json icon="file-json" -{ - "dependencies": { - "react": "catalog:", - "webpack": "catalog:build" - } -} -``` - -### Configuration Migration - -The following pnpm configuration is migrated from both `pnpm-lock.yaml` and `pnpm-workspace.yaml`: - -- **Overrides**: Moved from `pnpm.overrides` to root-level `overrides` in `package.json` -- **Patched Dependencies**: Moved from `pnpm.patchedDependencies` to root-level `patchedDependencies` in `package.json` -- **Workspace Overrides**: Applied from `pnpm-workspace.yaml` to root `package.json` - -### Requirements - -- Requires pnpm lockfile version 7 or higher -- Workspace packages must have a `name` field in their `package.json` -- All catalog entries referenced by dependencies must exist in the catalogs definition - -After migration, you can safely remove `pnpm-lock.yaml` and `pnpm-workspace.yaml` files. - ---- - - diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/pm/cli/link.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/pm/cli/link.mdx deleted file mode 100644 index b0b4631..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/pm/cli/link.mdx +++ /dev/null @@ -1,61 +0,0 @@ ---- -title: "bun link" -description: "Link local packages for development" ---- - -import Link from "/snippets/cli/link.mdx"; - -Use `bun link` in a local directory to register the current package as a "linkable" package. - -```bash terminal icon="terminal" -cd /path/to/cool-pkg -cat package.json -bun link -``` - -```txt -bun link v1.3.3 (7416672e) -Success! Registered "cool-pkg" - -To use cool-pkg in a project, run: - bun link cool-pkg - -Or add it in dependencies in your package.json file: - "cool-pkg": "link:cool-pkg" -``` - -This package can now be "linked" into other projects using `bun link cool-pkg`. This will create a symlink in the `node_modules` directory of the target project, pointing to the local directory. - -```bash terminal icon="terminal" -cd /path/to/my-app -bun link cool-pkg -``` - -In addition, the `--save` flag can be used to add `cool-pkg` to the `dependencies` field of your app's package.json with a special version specifier that tells Bun to load from the registered local directory instead of installing from `npm`: - -```json package.json icon="file-json" -{ - "name": "my-app", - "version": "1.0.0", - "dependencies": { - "cool-pkg": "link:cool-pkg" // [!code ++] - } -} -``` - -## Unlinking - -Use `bun unlink` in the root directory to unregister a local package. - -```bash terminal icon="terminal" -cd /path/to/cool-pkg -bun unlink -``` - -```txt -bun unlink v1.3.3 (7416672e) -``` - ---- - - diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/pm/cli/outdated.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/pm/cli/outdated.mdx deleted file mode 100644 index bf62b03..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/pm/cli/outdated.mdx +++ /dev/null @@ -1,197 +0,0 @@ ---- -title: "bun outdated" -description: "Check for outdated dependencies" ---- - -import Outdated from "/snippets/cli/outdated.mdx"; - -Use `bun outdated` to check for outdated dependencies in your project. This command displays a table of dependencies that have newer versions available. - -```sh terminal icon="terminal" -bun outdated -``` - -```txt -| Package | Current | Update | Latest | -| ------------------------------ | ------- | --------- | ---------- | -| @sinclair/typebox | 0.34.15 | 0.34.16 | 0.34.16 | -| @types/bun (dev) | 1.3.0 | 1.3.3 | 1.3.3 | -| eslint (dev) | 8.57.1 | 8.57.1 | 9.20.0 | -| eslint-plugin-security (dev) | 2.1.1 | 2.1.1 | 3.0.1 | -| eslint-plugin-sonarjs (dev) | 0.23.0 | 0.23.0 | 3.0.1 | -| expect-type (dev) | 0.16.0 | 0.16.0 | 1.1.0 | -| prettier (dev) | 3.4.2 | 3.5.0 | 3.5.0 | -| tsup (dev) | 8.3.5 | 8.3.6 | 8.3.6 | -| typescript (dev) | 5.7.2 | 5.7.3 | 5.7.3 | - -``` - -## Version Information - -The output table shows three version columns: - -- **Current**: The version currently installed -- **Update**: The latest version that satisfies your package.json version range -- **Latest**: The latest version published to the registry - -### Dependency Filters - -`bun outdated` supports searching for outdated dependencies by package names and glob patterns. - -To check if specific dependencies are outdated, pass the package names as positional arguments: - -```sh terminal icon="terminal" -bun outdated eslint-plugin-security eslint-plugin-sonarjs -``` - -```txt -| Package | Current | Update | Latest | -| ------------------------------ | ------- | ------ | --------- | -| eslint-plugin-security (dev) | 2.1.1 | 2.1.1 | 3.0.1 | -| eslint-plugin-sonarjs (dev) | 0.23.0 | 0.23.0 | 3.0.1 | - -``` - -You can also pass glob patterns to check for outdated packages: - -```sh terminal icon="terminal" -bun outdated 'eslint*' -``` - -```txt -| Package | Current | Update | Latest | -| ------------------------------ | ------- | ------ | ---------- | -| eslint (dev) | 8.57.1 | 8.57.1 | 9.20.0 | -| eslint-plugin-security (dev) | 2.1.1 | 2.1.1 | 3.0.1 | -| eslint-plugin-sonarjs (dev) | 0.23.0 | 0.23.0 | 3.0.1 | -``` - -For example, to check for outdated `@types/*` packages: - -```sh terminal icon="terminal" -bun outdated '@types/*' -``` - -```txt -| Package | Current | Update | Latest | -| ------------------ | ------- | ------ | ------ | -| @types/bun (dev) | 1.3.0 | 1.3.3 | 1.3.3 | -``` - -Or to exclude all `@types/*` packages: - -```sh terminal icon="terminal" -bun outdated '!@types/*' -``` - -```txt -| Package | Current | Update | Latest | -| ------------------------------ | ------- | --------- | ---------- | -| @sinclair/typebox | 0.34.15 | 0.34.16 | 0.34.16 | -| eslint (dev) | 8.57.1 | 8.57.1 | 9.20.0 | -| eslint-plugin-security (dev) | 2.1.1 | 2.1.1 | 3.0.1 | -| eslint-plugin-sonarjs (dev) | 0.23.0 | 0.23.0 | 3.0.1 | -| expect-type (dev) | 0.16.0 | 0.16.0 | 1.1.0 | -| prettier (dev) | 3.4.2 | 3.5.0 | 3.5.0 | -| tsup (dev) | 8.3.5 | 8.3.6 | 8.3.6 | -| typescript (dev) | 5.7.2 | 5.7.3 | 5.7.3 | -``` - -### Workspace Filters - -Use the `--filter` flag to check for outdated dependencies in a different workspace package: - -```sh terminal icon="terminal" -bun outdated --filter='@monorepo/types' -``` - -```txt -| Package | Current | Update | Latest | -| ------------------ | ------- | ------ | ------ | -| tsup (dev) | 8.3.5 | 8.3.6 | 8.3.6 | -| typescript (dev) | 5.7.2 | 5.7.3 | 5.7.3 | -``` - -You can pass multiple `--filter` flags to check multiple workspaces: - -```sh terminal icon="terminal" -bun outdated --filter @monorepo/types --filter @monorepo/cli -``` - -```txt -| Package | Current | Update | Latest | -| ------------------------------ | ------- | ------ | ---------- | -| eslint (dev) | 8.57.1 | 8.57.1 | 9.20.0 | -| eslint-plugin-security (dev) | 2.1.1 | 2.1.1 | 3.0.1 | -| eslint-plugin-sonarjs (dev) | 0.23.0 | 0.23.0 | 3.0.1 | -| expect-type (dev) | 0.16.0 | 0.16.0 | 1.1.0 | -| tsup (dev) | 8.3.5 | 8.3.6 | 8.3.6 | -| typescript (dev) | 5.7.2 | 5.7.3 | 5.7.3 | -``` - -You can also pass glob patterns to filter by workspace names: - -```sh terminal icon="terminal" -bun outdated --filter='@monorepo/{types,cli}' -``` - -```txt -| Package | Current | Update | Latest | -| ------------------------------ | ------- | ------ | ---------- | -| eslint (dev) | 8.57.1 | 8.57.1 | 9.20.0 | -| eslint-plugin-security (dev) | 2.1.1 | 2.1.1 | 3.0.1 | -| eslint-plugin-sonarjs (dev) | 0.23.0 | 0.23.0 | 3.0.1 | -| expect-type (dev) | 0.16.0 | 0.16.0 | 1.1.0 | -| tsup (dev) | 8.3.5 | 8.3.6 | 8.3.6 | -| typescript (dev) | 5.7.2 | 5.7.3 | 5.7.3 | -``` - -### Catalog Dependencies - -`bun outdated` supports checking catalog dependencies defined in`package.json`: - -```sh terminal icon="terminal" -bun outdated -r -``` - -```txt -┌────────────────────┬─────────┬─────────┬─────────┬────────────────────────────────┐ -│ Package │ Current │ Update │ Latest │ Workspace │ -├────────────────────┼─────────┼─────────┼─────────┼────────────────────────────────┤ -│ body-parser │ 1.19.0 │ 1.19.0 │ 2.2.0 │ @test/shared │ -├────────────────────┼─────────┼─────────┼─────────┼────────────────────────────────┤ -│ cors │ 2.8.0 │ 2.8.0 │ 2.8.5 │ @test/shared │ -├────────────────────┼─────────┼─────────┼─────────┼────────────────────────────────┤ -│ chalk │ 4.0.0 │ 4.0.0 │ 5.6.2 │ @test/utils │ -├────────────────────┼─────────┼─────────┼─────────┼────────────────────────────────┤ -│ uuid │ 8.0.0 │ 8.0.0 │ 13.0.0 │ @test/utils │ -├────────────────────┼─────────┼─────────┼─────────┼────────────────────────────────┤ -│ axios │ 0.21.0 │ 0.21.0 │ 1.12.2 │ catalog (@test/app) │ -├────────────────────┼─────────┼─────────┼─────────┼────────────────────────────────┤ -│ lodash │ 4.17.15 │ 4.17.15 │ 4.17.21 │ catalog (@test/app, @test/app) │ -├────────────────────┼─────────┼─────────┼─────────┼────────────────────────────────┤ -│ react │ 17.0.0 │ 17.0.0 │ 19.1.1 │ catalog (@test/app) │ -├────────────────────┼─────────┼─────────┼─────────┼────────────────────────────────┤ -│ react-dom │ 17.0.0 │ 17.0.0 │ 19.1.1 │ catalog (@test/app) │ -├────────────────────┼─────────┼─────────┼─────────┼────────────────────────────────┤ -│ express │ 4.17.0 │ 4.17.0 │ 5.1.0 │ catalog (@test/shared) │ -├────────────────────┼─────────┼─────────┼─────────┼────────────────────────────────┤ -│ moment │ 2.24.0 │ 2.24.0 │ 2.30.1 │ catalog (@test/utils) │ -├────────────────────┼─────────┼─────────┼─────────┼────────────────────────────────┤ -│ @types/node (dev) │ 14.0.0 │ 14.0.0 │ 24.5.2 │ @test/shared │ -├────────────────────┼─────────┼─────────┼─────────┼────────────────────────────────┤ -│ @types/react (dev) │ 17.0.0 │ 17.0.0 │ 19.1.15 │ catalog:testing (@test/app) │ -├────────────────────┼─────────┼─────────┼─────────┼────────────────────────────────┤ -│ eslint (dev) │ 7.0.0 │ 7.0.0 │ 9.36.0 │ catalog:testing (@test/app) │ -├────────────────────┼─────────┼─────────┼─────────┼────────────────────────────────┤ -│ typescript (dev) │ 4.9.5 │ 4.9.5 │ 5.9.2 │ catalog:build (@test/app) │ -├────────────────────┼─────────┼─────────┼─────────┼────────────────────────────────┤ -│ jest (dev) │ 26.0.0 │ 26.0.0 │ 30.2.0 │ catalog:testing (@test/shared) │ -├────────────────────┼─────────┼─────────┼─────────┼────────────────────────────────┤ -│ prettier (dev) │ 2.0.0 │ 2.0.0 │ 3.6.2 │ catalog:build (@test/utils) │ -└────────────────────┴─────────┴─────────┴─────────┴────────────────────────────────┘ -``` - ---- - - diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/pm/cli/patch.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/pm/cli/patch.mdx deleted file mode 100644 index c3fa8d3..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/pm/cli/patch.mdx +++ /dev/null @@ -1,69 +0,0 @@ ---- -title: "bun patch" -description: "Persistently patch node_modules packages in a git-friendly way" ---- - -import Patch from "/snippets/cli/patch.mdx"; - -`bun patch` lets you persistently patch node_modules in a maintainable, git-friendly way. - -Sometimes, you need to make a small change to a package in `node_modules/` to fix a bug or add a feature. `bun patch` makes it easy to do this without vendoring the entire package and reuse the patch across multiple installs, multiple projects, and multiple machines. - -Features: - -- Generates `.patch` files applied to dependencies in `node_modules` on install -- `.patch` files can be committed to your repository, reused across multiple installs, projects, and machines -- `"patchedDependencies"` in `package.json` keeps track of patched packages -- `bun patch` lets you patch packages in `node_modules/` while preserving the integrity of Bun's [Global Cache](/docs/pm/global-cache) -- Test your changes locally before committing them with `bun patch --commit ` -- To preserve disk space and keep `bun install` fast, patched packages are committed to the Global Cache and shared across projects where possible - -#### Step 1. Prepare the package for patching - -To get started, use `bun patch ` to prepare the package for patching: - -```bash terminal icon="terminal" -# you can supply the package name -bun patch react - -# ...and a precise version in case multiple versions are installed -bun patch react@17.0.2 - -# or the path to the package -bun patch node_modules/react -``` - - -Don't forget to call `bun patch `! This ensures the package folder in `node_modules/` contains a fresh copy of the package with no symlinks/hardlinks to Bun's cache. - -If you forget to do this, you might end up editing the package globally in the cache! - - - -#### Step 2. Test your changes locally - -`bun patch ` makes it safe to edit the `` in `node_modules/` directly, while preserving the integrity of Bun's [Global Cache](/docs/pm/global-cache). This works by re-creating an unlinked clone of the package in `node_modules/` and diffing it against the original package in the Global Cache. - -#### Step 3. Commit your changes - -Once you're happy with your changes, run `bun patch --commit `. - -Bun will generate a patch file in `patches/`, update your `package.json` and lockfile, and Bun will start using the patched package: - -```bash terminal icon="terminal" -# you can supply the path to the patched package -bun patch --commit node_modules/react - -# ... or the package name and optionally the version -bun patch --commit react@17.0.2 - -# choose the directory to store the patch files -bun patch --commit react --patches-dir=mypatches - -# `patch-commit` is available for compatibility with pnpm -bun patch-commit react -``` - ---- - - diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/pm/cli/pm.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/pm/cli/pm.mdx deleted file mode 100644 index 01b41eb..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/pm/cli/pm.mdx +++ /dev/null @@ -1,323 +0,0 @@ ---- -title: "bun pm" -description: "Package manager utilities" ---- - -The `bun pm` command group provides a set of utilities for working with Bun's package manager. - -## pack - -To create a tarball of the current workspace: - -```bash terminal icon="terminal" -bun pm pack -``` - -This command creates a `.tgz` file containing all files that would be published to npm, following the same rules as `npm pack`. - -## Examples - -Basic usage: - -```bash terminal icon="terminal" -bun pm pack -# Creates my-package-1.0.0.tgz in current directory -``` - -Quiet mode for scripting: - -```bash terminal icon="terminal" -TARBALL=$(bun pm pack --quiet) -echo "Created: $TARBALL" -``` - -```txt -Created: my-package-1.0.0.tgz -``` - -Custom destination: - -```bash terminal icon="terminal" -bun pm pack --destination ./dist -# Saves tarball in ./dist/ directory -``` - -## Options - -- `--dry-run`: Perform all tasks except writing the tarball to disk. Shows what would be included. -- `--destination `: Specify the directory where the tarball will be saved. -- `--filename `: Specify an exact file name for the tarball to be saved at. -- `--ignore-scripts`: Skip running pre/postpack and prepare scripts. -- `--gzip-level <0-9>`: Set a custom compression level for gzip, ranging from 0 to 9 (default is 9). -- `--quiet`: Only output the tarball filename, suppressing verbose output. Ideal for scripts and automation. - -> **Note:** `--filename` and `--destination` cannot be used at the same time. - -## Output Modes - -**Default output:** - -```bash terminal icon="terminal" -bun pm pack -``` - -```txt -bun pack v1.2.19 - -packed 131B package.json -packed 40B index.js - -my-package-1.0.0.tgz - -Total files: 2 -Shasum: f2451d6eb1e818f500a791d9aace80b394258a90 -Unpacked size: 171B -Packed size: 249B -``` - -**Quiet output:** - -```bash terminal icon="terminal" -bun pm pack --quiet -``` - -```txt -my-package-1.0.0.tgz -``` - -The `--quiet` flag is particularly useful for automation workflows where you need to capture the generated tarball filename for further processing. - -## bin - -To print the path to the `bin` directory for the local project: - -```bash terminal icon="terminal" -bun pm bin -``` - -```txt -/path/to/current/project/node_modules/.bin -``` - -To print the path to the global `bin` directory: - -```bash terminal icon="terminal" -bun pm bin -g -``` - -```txt -<$HOME>/.bun/bin -``` - -## ls - -To print a list of installed dependencies in the current project and their resolved versions, excluding their dependencies. - -```bash terminal icon="terminal" -bun pm ls -# or -bun list -``` - -```txt -/path/to/project node_modules (135) -├── eslint@8.38.0 -├── react@18.2.0 -├── react-dom@18.2.0 -├── typescript@5.0.4 -└── zod@3.21.4 -``` - -To print all installed dependencies, including nth-order dependencies. - -```bash terminal icon="terminal" -bun pm ls --all -# or -bun list --all -``` - -```txt -/path/to/project node_modules (135) -├── @eslint-community/eslint-utils@4.4.0 -├── @eslint-community/regexpp@4.5.0 -├── @eslint/eslintrc@2.0.2 -├── @eslint/js@8.38.0 -├── @nodelib/fs.scandir@2.1.5 -├── @nodelib/fs.stat@2.0.5 -├── @nodelib/fs.walk@1.2.8 -├── acorn@8.8.2 -├── acorn-jsx@5.3.2 -├── ajv@6.12.6 -├── ansi-regex@5.0.1 -├── ... -``` - -## whoami - -Print your npm username. Requires you to be logged in (`bunx npm login`) with credentials in either `bunfig.toml` or `.npmrc`: - -```bash terminal icon="terminal" -bun pm whoami -``` - -## hash - -To generate and print the hash of the current lockfile: - -```bash terminal icon="terminal" -bun pm hash -``` - -To print the string used to hash the lockfile: - -```bash terminal icon="terminal" -bun pm hash-string -``` - -To print the hash stored in the current lockfile: - -```bash terminal icon="terminal" -bun pm hash-print -``` - -## cache - -To print the path to Bun's global module cache: - -```bash terminal icon="terminal" -bun pm cache -``` - -To clear Bun's global module cache: - -```bash terminal icon="terminal" -bun pm cache rm -``` - -## migrate - -To migrate another package manager's lockfile without installing anything: - -```bash terminal icon="terminal" -bun pm migrate -``` - -## untrusted - -To print current untrusted dependencies with scripts: - -```bash terminal icon="terminal" -bun pm untrusted -``` - -```txt -./node_modules/@biomejs/biome @1.8.3 - » [postinstall]: node scripts/postinstall.js - -These dependencies had their lifecycle scripts blocked during install. -``` - -## trust - -To run scripts for untrusted dependencies and add to `trustedDependencies`: - -```bash terminal icon="terminal" -bun pm trust -``` - -Options for the `trust` command: - -- `--all`: Trust all untrusted dependencies. - -## default-trusted - -To print the default trusted dependencies list: - -```bash terminal icon="terminal" -bun pm default-trusted -``` - -see the current list on GitHub [here](https://github.com/oven-sh/bun/blob/main/src/install/default-trusted-dependencies.txt) - -## version - -To display current package version and help: - -```bash terminal icon="terminal" -bun pm version -``` - -```txt -bun pm version v1.3.3 (ca7428e9) -Current package version: v1.0.0 - -Increment: - patch 1.0.0 → 1.0.1 - minor 1.0.0 → 1.1.0 - major 1.0.0 → 2.0.0 - prerelease 1.0.0 → 1.0.1-0 - prepatch 1.0.0 → 1.0.1-0 - preminor 1.0.0 → 1.1.0-0 - premajor 1.0.0 → 2.0.0-0 - from-git Use version from latest git tag - 1.2.3 Set specific version - -Options: - --no-git-tag-version Skip git operations - --allow-same-version Prevents throwing error if version is the same - --message=, -m Custom commit message, use %s for version substitution - --preid= Prerelease identifier (i.e beta → 1.0.1-beta.0) - --force, -f Bypass dirty git history check - -Examples: - bun pm version patch - bun pm version 1.2.3 --no-git-tag-version - bun pm version prerelease --preid beta --message "Release beta: %s" -``` - -To bump the version in `package.json`: - -```bash terminal icon="terminal" -bun pm version patch -``` - -```txt -v1.0.1 -``` - -Supports `patch`, `minor`, `major`, `premajor`, `preminor`, `prepatch`, `prerelease`, `from-git`, or specific versions like `1.2.3`. By default creates git commit and tag unless `--no-git-tag-version` was used to skip. - -## pkg - -Manage `package.json` data with get, set, delete, and fix operations. - -All commands support dot and bracket notation: - -```bash terminal icon="terminal" -scripts.build # dot notation -contributors[0] # array access -workspaces.0 # dot with numeric index -scripts[test:watch] # bracket for special chars -``` - -Examples: - -```bash terminal icon="terminal" -# get -bun pm pkg get name # single property -bun pm pkg get name version # multiple properties -bun pm pkg get # entire package.json -bun pm pkg get scripts.build # nested property - -# set -bun pm pkg set name="my-package" # simple property -bun pm pkg set scripts.test="jest" version=2.0.0 # multiple properties -bun pm pkg set {"private":"true"} --json # JSON values with --json flag - -# delete -bun pm pkg delete description # single property -bun pm pkg delete scripts.test contributors[0] # multiple/nested - -# fix -bun pm pkg fix # auto-fix common issues -``` diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/pm/cli/publish.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/pm/cli/publish.mdx deleted file mode 100644 index c316b22..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/pm/cli/publish.mdx +++ /dev/null @@ -1,131 +0,0 @@ ---- -title: "bun publish" -description: Use `bun publish` to publish a package to the npm registry ---- - -import Publish from "/snippets/cli/publish.mdx"; - -`bun publish` will automatically pack your package into a tarball, strip catalog and workspace protocols from the `package.json` (resolving versions if necessary), and publish to the registry specified in your configuration files. Both `bunfig.toml` and `.npmrc` files are supported. - -```sh terminal icon="terminal" -## Publishing the package from the current working directory -bun publish -``` - -```txt -bun publish v1.3.3 (ca7428e9) - -packed 203B package.json -packed 224B README.md -packed 30B index.ts -packed 0.64KB tsconfig.json - -Total files: 4 -Shasum: 79e2b4377b63f4de38dc7ea6e5e9dbee08311a69 -Integrity: sha512-6QSNlDdSwyG/+[...]X6wXHriDWr6fA== -Unpacked size: 1.1KB -Packed size: 0.76KB -Tag: latest -Access: default -Registry: http://localhost:4873/ - - + publish-1@1.0.0 -``` - -Alternatively, you can pack and publish your package separately by using `bun pm pack` followed by `bun publish` with the path to the output tarball. - -```sh terminal icon="terminal" -bun pm pack -... -bun publish ./package.tgz -``` - - - `bun publish` will not run lifecycle scripts (`prepublishOnly/prepack/prepare/postpack/publish/postpublish`) if a - tarball path is provided. Scripts will only be run if the package is packed by `bun publish`. - - -### `--access` - -The `--access` flag can be used to set the access level of the package being published. The access level can be one of `public` or `restricted`. Unscoped packages are always public, and attempting to publish an unscoped package with `--access restricted` will result in an error. - -```sh terminal icon="terminal" -bun publish --access public -``` - -`--access` can also be set in the `publishConfig` field of your `package.json`. - -```json package.json icon="file-json" -{ - "publishConfig": { - "access": "restricted" - } -} -``` - -### `--tag` - -Set the tag of the package version being published. By default, the tag is `latest`. The initial version of a package is always given the `latest` tag in addition to the specified tag. - -```sh terminal icon="terminal" -bun publish --tag alpha -``` - -`--tag` can also be set in the `publishConfig` field of your `package.json`. - -```json package.json icon="file-json" -{ - "publishConfig": { - "tag": "next" - } -} -``` - -### `--dry-run` - -The `--dry-run` flag can be used to simulate the publish process without actually publishing the package. This is useful for verifying the contents of the published package without actually publishing the package. - -```sh terminal icon="terminal" -bun publish --dry-run -``` - -### `--tolerate-republish` - -Exit with code 0 instead of 1 if the package version already exists. Useful in CI/CD where jobs may be re-run. - -```sh terminal icon="terminal" -bun publish --tolerate-republish -``` - -### `--gzip-level` - -Specify the level of gzip compression to use when packing the package. Only applies to `bun publish` without a tarball path argument. Values range from `0` to `9` (default is `9`). - -### `--auth-type` - -If you have 2FA enabled for your npm account, `bun publish` will prompt you for a one-time password. This can be done through a browser or the CLI. The `--auth-type` flag can be used to tell the npm registry which method you prefer. The possible values are `web` and `legacy`, with `web` being the default. - -```sh terminal icon="terminal" -bun publish --auth-type legacy -... -This operation requires a one-time password. -Enter OTP: 123456 -... -``` - -### `--otp` - -Provide a one-time password directly to the CLI. If the password is valid, this will skip the extra prompt for a one-time password before publishing. Example usage: - -```sh terminal icon="terminal" -bun publish --otp 123456 -``` - - - `bun publish` respects the `NPM_CONFIG_TOKEN` environment variable which can be used when publishing in github actions - or automated workflows. - - ---- - - diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/pm/cli/remove.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/pm/cli/remove.mdx deleted file mode 100644 index 9df4d76..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/pm/cli/remove.mdx +++ /dev/null @@ -1,16 +0,0 @@ ---- -title: "bun remove" -description: "Remove dependencies from your project" ---- - -import Remove from "/snippets/cli/remove.mdx"; - -## Basic Usage - -```bash terminal icon="terminal" -bun remove ts-node -``` - ---- - - diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/pm/cli/update.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/pm/cli/update.mdx deleted file mode 100644 index edc8120..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/pm/cli/update.mdx +++ /dev/null @@ -1,140 +0,0 @@ ---- -title: "bun update" -description: "Update dependencies to latest versions" ---- - -import Update from "/snippets/cli/update.mdx"; - -To upgrade your Bun CLI version, see [`bun upgrade`](/installation#upgrading). - -To update all dependencies to the latest version: - -```sh terminal icon="terminal" -bun update -``` - -To update a specific dependency to the latest version: - -```sh terminal icon="terminal" -bun update [package] -``` - -## `--interactive` - -For a more controlled update experience, use the `--interactive` flag to select which packages to update: - -```sh terminal icon="terminal" -bun update --interactive -bun update -i -``` - -This launches an interactive terminal interface that shows all outdated packages with their current and target versions. You can then select which packages to update. - -### Interactive Interface - -The interface displays packages grouped by dependency type: - -```txt -? Select packages to update - Space to toggle, Enter to confirm, a to select all, n to select none, i to invert, l to toggle latest - - dependencies Current Target Latest - □ react 17.0.2 18.2.0 18.3.1 - □ lodash 4.17.20 4.17.21 4.17.21 - - devDependencies Current Target Latest - □ typescript 4.8.0 5.0.0 5.3.3 - □ @types/node 16.11.7 18.0.0 20.11.5 - - optionalDependencies Current Target Latest - □ some-optional-package 1.0.0 1.1.0 1.2.0 -``` - -**Sections:** - -- Packages are grouped under section headers: `dependencies`, `devDependencies`, `peerDependencies`, `optionalDependencies` -- Each section shows column headers aligned with the package data - -**Columns:** - -- **Package**: Package name (may have suffix like ` dev`, ` peer`, ` optional` for clarity) -- **Current**: Currently installed version -- **Target**: Version that would be installed (respects semver constraints) -- **Latest**: Latest available version - -### Keyboard Controls - -**Selection:** - -- **Space**: Toggle package selection -- **Enter**: Confirm selections and update -- **a/A**: Select all packages -- **n/N**: Select none -- **i/I**: Invert selection - -**Navigation:** - -- **↑/↓ Arrow keys** or **j/k**: Move cursor -- **l/L**: Toggle between target and latest version for current package - -**Exit:** - -- **Ctrl+C** or **Ctrl+D**: Cancel without updating - -### Visual Indicators - -- **☑** Selected packages (will be updated) -- **□** Unselected packages -- **>** Current cursor position -- **Colors**: Red (major), yellow (minor), green (patch) version changes -- **Underlined**: Currently selected update target - -### Package Grouping - -Packages are organized in sections by dependency type: - -- **dependencies** - Regular runtime dependencies -- **devDependencies** - Development dependencies -- **peerDependencies** - Peer dependencies -- **optionalDependencies** - Optional dependencies - -Within each section, individual packages may have additional suffixes (` dev`, ` peer`, ` optional`) for extra clarity. - -## `--recursive` - -Use the `--recursive` flag with `--interactive` to update dependencies across all workspaces in a monorepo: - -```sh terminal icon="terminal" -bun update --interactive --recursive -bun update -i -r -``` - -This displays an additional "Workspace" column showing which workspace each dependency belongs to. - -## `--latest` - -By default, `bun update` will update to the latest version of a dependency that satisfies the version range specified in your `package.json`. - -To update to the latest version, regardless of if it's compatible with the current version range, use the `--latest` flag: - -```sh terminal icon="terminal" -bun update --latest -``` - -In interactive mode, you can toggle individual packages between their target version (respecting semver) and latest version using the **l** key. - -For example, with the following `package.json`: - -```json package.json icon="file-json" -{ - "dependencies": { - "react": "^17.0.2" - } -} -``` - -- `bun update` would update to a version that matches `17.x`. -- `bun update --latest` would update to a version that matches `18.x` or later. - ---- - - diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/pm/cli/why.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/pm/cli/why.mdx deleted file mode 100644 index 5c835a0..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/pm/cli/why.mdx +++ /dev/null @@ -1,84 +0,0 @@ ---- -title: "bun why" -description: "Explain why a package is installed" ---- - -The `bun why` command explains why a package is installed in your project by showing the dependency chain that led to its installation. - -## Usage - -```bash terminal icon="terminal" -bun why -``` - -## Arguments - -- ``: The name of the package to explain. Supports glob patterns like `@org/*` or `*-lodash`. - -## Options - -- `--top`: Show only the top-level dependencies instead of the complete dependency tree. -- `--depth `: Maximum depth of the dependency tree to display. - -## Examples - -Check why a specific package is installed: - -```bash terminal icon="terminal" -bun why react -``` - -```txt -react@18.2.0 - └─ my-app@1.0.0 (requires ^18.0.0) -``` - -Check why all packages with a specific pattern are installed: - -```bash terminal icon="terminal" -bun why "@types/*" -``` - -```txt -@types/react@18.2.15 - └─ dev my-app@1.0.0 (requires ^18.0.0) - -@types/react-dom@18.2.7 - └─ dev my-app@1.0.0 (requires ^18.0.0) -``` - -Show only top-level dependencies: - -```bash terminal icon="terminal" -bun why express --top -``` - -```txt -express@4.18.2 - └─ my-app@1.0.0 (requires ^4.18.2) -``` - -Limit the dependency tree depth: - -```bash terminal icon="terminal" -bun why express --depth 2 -``` - -```txt -express@4.18.2 - └─ express-pollyfill@1.20.1 (requires ^4.18.2) - └─ body-parser@1.20.1 (requires ^1.20.1) - └─ accepts@1.3.8 (requires ^1.3.8) - └─ (deeper dependencies hidden) -``` - -## Understanding the Output - -The output shows: - -- The package name and version being queried -- The dependency chain that led to its installation -- The type of dependency (dev, peer, optional, or production) -- The version requirement specified in each package's dependencies - -For nested dependencies, the command shows the complete dependency tree by default, with indentation indicating the relationship hierarchy. diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/pm/filter.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/pm/filter.mdx deleted file mode 100644 index f630259..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/pm/filter.mdx +++ /dev/null @@ -1,102 +0,0 @@ ---- -title: "bun --filter" -description: "Select packages by pattern in a monorepo using the --filter flag" ---- - -The `--filter` (or `-F`) flag is used for selecting packages by pattern in a monorepo. Patterns can be used to match package names or package paths, with full glob syntax support. - -Currently `--filter` is supported by `bun install` and `bun outdated`, and can also be used to run scripts for multiple packages at once. - ---- - -## Matching - -### Package Name `--filter ` - -Name patterns select packages based on the package name, as specified in `package.json`. For example, if you have packages `pkg-a`, `pkg-b` and `other`, you can match all packages with `*`, only `pkg-a` and `pkg-b` with `pkg*`, and a specific package by providing the full name of the package. - -### Package Path `--filter ./` - -Path patterns are specified by starting the pattern with `./`, and will select all packages in directories that match the pattern. For example, to match all packages in subdirectories of `packages`, you can use `--filter './packages/**'`. To match a package located in `packages/foo`, use `--filter ./packages/foo`. - ---- - -## `bun install` and `bun outdated` - -Both `bun install` and `bun outdated` support the `--filter` flag. - -`bun install` by default will install dependencies for all packages in the monorepo. To install dependencies for specific packages, use `--filter`. - -Given a monorepo with workspaces `pkg-a`, `pkg-b`, and `pkg-c` under `./packages`: - -```bash terminal icon="terminal" -# Install dependencies for all workspaces except `pkg-c` -bun install --filter '!pkg-c' - -# Install dependencies for packages in `./packages` (`pkg-a`, `pkg-b`, `pkg-c`) -bun install --filter './packages/*' - -# Save as above, but exclude the root package.json -bun install --filter '!./' --filter './packages/*' -``` - -Similarly, `bun outdated` will display outdated dependencies for all packages in the monorepo, and `--filter` can be used to restrict the command to a subset of the packages: - -```bash terminal icon="terminal" -# Display outdated dependencies for workspaces starting with `pkg-` -bun outdated --filter 'pkg-*' - -# Display outdated dependencies for only the root package.json -bun outdated --filter './' -``` - -For more information on both these commands, see [`bun install`](/docs/pm/cli/install) and [`bun outdated`](/docs/pm/cli/outdated). - ---- - -## Running scripts with `--filter` - -Use the `--filter` flag to execute scripts in multiple packages at once: - -```bash terminal icon="terminal" -bun --filter - - -``` - - - -It will output a new HTML file with the bundled assets: - - - -```html dist/output.html - - - - Local image - External image - - - -``` - - - -Under the hood, it uses [`lol-html`](https://github.com/cloudflare/lol-html) to extract script and link tags as entrypoints, and other assets as external. - -Currently, the list of selectors is: - -- `audio[src]` -- `iframe[src]` -- `img[src]` -- `img[srcset]` -- `link:not([rel~='stylesheet']):not([rel~='modulepreload']):not([rel~='manifest']):not([rel~='icon']):not([rel~='apple-touch-icon'])[href]` -- `link[as='font'][href], link[type^='font/'][href]` -- `link[as='image'][href]` -- `link[as='style'][href]` -- `link[as='video'][href], link[as='audio'][href]` -- `link[as='worker'][href]` -- `link[rel='icon'][href], link[rel='apple-touch-icon'][href]` -- `link[rel='manifest'][href]` -- `link[rel='stylesheet'][href]` -- `script[src]` -- `source[src]` -- `source[srcset]` -- `video[poster]` -- `video[src]` - - - -**HTML Loader Behavior in Different Contexts** - -The `html` loader behaves differently depending on how it's used: - -1. **Static Build:** When you run `bun build ./index.html`, Bun produces a static site with all assets bundled and hashed. - -2. **Runtime:** When you run `bun run server.ts` (where `server.ts` imports an HTML file), Bun bundles assets on-the-fly during development, enabling features like hot module replacement. - -3. **Full-stack Build:** When you run `bun build --target=bun server.ts` (where `server.ts` imports an HTML file), the import resolves to a manifest object that `Bun.serve` uses to efficiently serve pre-bundled assets in production. - - - -### `css` - -**CSS loader**. Default for `.css`. - -CSS files can be directly imported. This is primarily useful for [full-stack applications](/docs/bundler/html-static) where CSS is bundled alongside HTML. - -```ts -import "./styles.css"; -``` - -There isn't any value returned from the import, it's only used for side effects. - -### `sh` loader - -**Bun Shell loader**. Default for `.sh` files - -This loader is used to parse [Bun Shell](/docs/runtime/shell) scripts. It's only supported when starting Bun itself, so it's not available in the bundler or in the runtime. - -```sh -bun run ./script.sh -``` - -### `file` - -**File loader**. Default for all unrecognized file types. - -The file loader resolves the import as a _path/URL_ to the imported file. It's commonly used for referencing media or font assets. - -```ts logo.ts -import logo from "./logo.svg"; -console.log(logo); -``` - -_In the runtime_, Bun checks that the `logo.svg` file exists and converts it to an absolute path to the location of `logo.svg` on disk. - -```bash -bun run logo.ts -/path/to/project/logo.svg -``` - -_In the bundler_, things are slightly different. The file is copied into `outdir` as-is, and the import is resolved as a relative path pointing to the copied file. - -```ts Output -var logo = "./logo.svg"; -console.log(logo); -``` - -If a value is specified for `publicPath`, the import will use value as a prefix to construct an absolute path/URL. - -| Public path | Resolved import | -| ---------------------------- | ---------------------------------- | -| `""` (default) | `/logo.svg` | -| `"/assets"` | `/assets/logo.svg` | -| `"https://cdn.example.com/"` | `https://cdn.example.com/logo.svg` | - - - The location and file name of the copied file is determined by the value of [`naming.asset`](/bundler#naming). - -This loader is copied into the `outdir` as-is. The name of the copied file is determined using the value of -`naming.asset`. - - -If you're using TypeScript, you may get an error like this: - -```ts -// TypeScript error -// Cannot find module './logo.svg' or its corresponding type declarations. -``` - -This can be fixed by creating `*.d.ts` file anywhere in your project (any name will work) with the following contents: - -```ts -declare module "*.svg" { - const content: string; - export default content; -} -``` - -This tells TypeScript that any default imports from `.svg` should be treated as a string. - - diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/runtime/glob.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/runtime/glob.mdx deleted file mode 100644 index bb04ab1..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/runtime/glob.mdx +++ /dev/null @@ -1,181 +0,0 @@ ---- -title: Glob -description: Use Bun's fast native implementation of file globbing ---- - -## Quickstart - -**Scan a directory for files matching `*.ts`**: - -```ts -import { Glob } from "bun"; - -const glob = new Glob("**/*.ts"); - -// Scans the current working directory and each of its sub-directories recursively -for await (const file of glob.scan(".")) { - console.log(file); // => "index.ts" -} -``` - -**Match a string against a glob pattern**: - -```ts -import { Glob } from "bun"; - -const glob = new Glob("*.ts"); - -glob.match("index.ts"); // => true -glob.match("index.js"); // => false -``` - -`Glob` is a class which implements the following interface: - -```ts -class Glob { - scan(root: string | ScanOptions): AsyncIterable; - scanSync(root: string | ScanOptions): Iterable; - - match(path: string): boolean; -} - -interface ScanOptions { - /** - * The root directory to start matching from. Defaults to `process.cwd()` - */ - cwd?: string; - - /** - * Allow patterns to match entries that begin with a period (`.`). - * - * @default false - */ - dot?: boolean; - - /** - * Return the absolute path for entries. - * - * @default false - */ - absolute?: boolean; - - /** - * Indicates whether to traverse descendants of symbolic link directories. - * - * @default false - */ - followSymlinks?: boolean; - - /** - * Throw an error when symbolic link is broken - * - * @default false - */ - throwErrorOnBrokenSymlink?: boolean; - - /** - * Return only files. - * - * @default true - */ - onlyFiles?: boolean; -} -``` - -## Supported Glob Patterns - -Bun supports the following glob patterns: - -### `?` - Match any single character - -```ts -const glob = new Glob("???.ts"); -glob.match("foo.ts"); // => true -glob.match("foobar.ts"); // => false -``` - -### `*` - Matches zero or more characters, except for path separators (`/` or `\`) - -```ts -const glob = new Glob("*.ts"); -glob.match("index.ts"); // => true -glob.match("src/index.ts"); // => false -``` - -### `**` - Match any number of characters including `/` - -```ts -const glob = new Glob("**/*.ts"); -glob.match("index.ts"); // => true -glob.match("src/index.ts"); // => true -glob.match("src/index.js"); // => false -``` - -### `[ab]` - Matches one of the characters contained in the brackets, as well as character ranges - -```ts -const glob = new Glob("ba[rz].ts"); -glob.match("bar.ts"); // => true -glob.match("baz.ts"); // => true -glob.match("bat.ts"); // => false -``` - -You can use character ranges (e.g `[0-9]`, `[a-z]`) as well as the negation operators `^` or `!` to match anything _except_ the characters contained within the braces (e.g `[^ab]`, `[!a-z]`) - -```ts -const glob = new Glob("ba[a-z][0-9][^4-9].ts"); -glob.match("bar01.ts"); // => true -glob.match("baz83.ts"); // => true -glob.match("bat22.ts"); // => true -glob.match("bat24.ts"); // => false -glob.match("ba0a8.ts"); // => false -``` - -### `{a,b,c}` - Match any of the given patterns - -```ts -const glob = new Glob("{a,b,c}.ts"); -glob.match("a.ts"); // => true -glob.match("b.ts"); // => true -glob.match("c.ts"); // => true -glob.match("d.ts"); // => false -``` - -These match patterns can be deeply nested (up to 10 levels), and contain any of the wildcards from above. - -### `!` - Negates the result at the start of a pattern - -```ts -const glob = new Glob("!index.ts"); -glob.match("index.ts"); // => false -glob.match("foo.ts"); // => true -``` - -### `\` - Escapes any of the special characters above - -```ts -const glob = new Glob("\\!index.ts"); -glob.match("!index.ts"); // => true -glob.match("index.ts"); // => false -``` - -## Node.js `fs.glob()` compatibility - -Bun also implements Node.js's `fs.glob()` functions with additional features: - -```ts -import { glob, globSync, promises } from "node:fs"; - -// Array of patterns -const files = await promises.glob(["**/*.ts", "**/*.js"]); - -// Exclude patterns -const filtered = await promises.glob("**/*", { - exclude: ["node_modules/**", "*.test.*"], -}); -``` - -All three functions (`fs.glob()`, `fs.globSync()`, `fs.promises.glob()`) support: - -- Array of patterns as the first argument -- `exclude` option to filter results diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/runtime/globals.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/runtime/globals.mdx deleted file mode 100644 index bc412ea..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/runtime/globals.mdx +++ /dev/null @@ -1,72 +0,0 @@ ---- -title: Globals -description: Use Bun's global objects ---- - -Bun implements the following globals. - -| Global | Source | Notes | -| ----------------------------------------------------------------------------------------------------------------------- | -------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController) | Web | | -| [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) | Web | | -| [`alert`](https://developer.mozilla.org/en-US/docs/Web/API/Window/alert) | Web | Intended for command-line tools | -| [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob) | Web | | -| [`Buffer`](https://nodejs.org/api/buffer.html#class-buffer) | Node.js | See [Node.js > `Buffer`](/docs/runtime/nodejs-compat#node-buffer) | -| `Bun` | Bun | Subject to change as additional APIs are added | -| [`ByteLengthQueuingStrategy`](https://developer.mozilla.org/en-US/docs/Web/API/ByteLengthQueuingStrategy) | Web | | -| [`confirm`](https://developer.mozilla.org/en-US/docs/Web/API/Window/confirm) | Web | Intended for command-line tools | -| [`__dirname`](https://nodejs.org/api/globals.html#__dirname) | Node.js | | -| [`__filename`](https://nodejs.org/api/globals.html#__filename) | Node.js | | -| [`atob()`](https://developer.mozilla.org/en-US/docs/Web/API/atob) | Web | | -| [`btoa()`](https://developer.mozilla.org/en-US/docs/Web/API/btoa) | Web | | -| `BuildMessage` | Bun | | -| [`clearImmediate()`](https://developer.mozilla.org/en-US/docs/Web/API/Window/clearImmediate) | Web | | -| [`clearInterval()`](https://developer.mozilla.org/en-US/docs/Web/API/Window/clearInterval) | Web | | -| [`clearTimeout()`](https://developer.mozilla.org/en-US/docs/Web/API/Window/clearTimeout) | Web | | -| [`console`](https://developer.mozilla.org/en-US/docs/Web/API/console) | Web | | -| [`CountQueuingStrategy`](https://developer.mozilla.org/en-US/docs/Web/API/CountQueuingStrategy) | Web | | -| [`Crypto`](https://developer.mozilla.org/en-US/docs/Web/API/Crypto) | Web | | -| [`crypto`](https://developer.mozilla.org/en-US/docs/Web/API/crypto) | Web | | -| [`CryptoKey`](https://developer.mozilla.org/en-US/docs/Web/API/CryptoKey) | Web | | -| [`CustomEvent`](https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent) | Web | | -| [`Event`](https://developer.mozilla.org/en-US/docs/Web/API/Event) | Web | Also [`ErrorEvent`](https://developer.mozilla.org/en-US/docs/Web/API/ErrorEvent) [`CloseEvent`](https://developer.mozilla.org/en-US/docs/Web/API/CloseEvent) [`MessageEvent`](https://developer.mozilla.org/en-US/docs/Web/API/MessageEvent). | -| [`EventTarget`](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget) | Web | | -| [`exports`](https://nodejs.org/api/globals.html#exports) | Node.js | | -| [`fetch`](https://developer.mozilla.org/en-US/docs/Web/API/fetch) | Web | | -| [`FormData`](https://developer.mozilla.org/en-US/docs/Web/API/FormData) | Web | | -| [`global`](https://nodejs.org/api/globals.html#global) | Node.js | See [Node.js > `global`](/docs/runtime/nodejs-compat#global). | -| [`globalThis`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/globalThis) | Cross-platform | Aliases to `global` | -| [`Headers`](https://developer.mozilla.org/en-US/docs/Web/API/Headers) | Web | | -| [`HTMLRewriter`](/docs/runtime/html-rewriter) | Cloudflare | | -| [`JSON`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON) | Web | | -| [`MessageEvent`](https://developer.mozilla.org/en-US/docs/Web/API/MessageEvent) | Web | | -| [`module`](https://nodejs.org/api/globals.html#module) | Node.js | | -| [`performance`](https://developer.mozilla.org/en-US/docs/Web/API/performance) | Web | | -| [`process`](https://nodejs.org/api/process.html) | Node.js | See [Node.js > `process`](/docs/runtime/nodejs-compat#node-process) | -| [`prompt`](https://developer.mozilla.org/en-US/docs/Web/API/Window/prompt) | Web | Intended for command-line tools | -| [`queueMicrotask()`](https://developer.mozilla.org/en-US/docs/Web/API/queueMicrotask) | Web | | -| [`ReadableByteStreamController`](https://developer.mozilla.org/en-US/docs/Web/API/ReadableByteStreamController) | Web | | -| [`ReadableStream`](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream) | Web | | -| [`ReadableStreamDefaultController`](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStreamDefaultController) | Web | | -| [`ReadableStreamDefaultReader`](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStreamDefaultReader) | Web | | -| [`reportError`](https://developer.mozilla.org/en-US/docs/Web/API/reportError) | Web | | -| [`require()`](https://nodejs.org/api/globals.html#require) | Node.js | | -| `ResolveMessage` | Bun | | -| [`Response`](https://developer.mozilla.org/en-US/docs/Web/API/Response) | Web | | -| [`Request`](https://developer.mozilla.org/en-US/docs/Web/API/Request) | Web | | -| [`setImmediate()`](https://developer.mozilla.org/en-US/docs/Web/API/Window/setImmediate) | Web | | -| [`setInterval()`](https://developer.mozilla.org/en-US/docs/Web/API/Window/setInterval) | Web | | -| [`setTimeout()`](https://developer.mozilla.org/en-US/docs/Web/API/Window/setTimeout) | Web | | -| [`ShadowRealm`](https://github.com/tc39/proposal-shadowrealm) | Web | Stage 3 proposal | -| [`SubtleCrypto`](https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto) | Web | | -| [`DOMException`](https://developer.mozilla.org/en-US/docs/Web/API/DOMException) | Web | | -| [`TextDecoder`](https://developer.mozilla.org/en-US/docs/Web/API/TextDecoder) | Web | | -| [`TextEncoder`](https://developer.mozilla.org/en-US/docs/Web/API/TextEncoder) | Web | | -| [`TransformStream`](https://developer.mozilla.org/en-US/docs/Web/API/TransformStream) | Web | | -| [`TransformStreamDefaultController`](https://developer.mozilla.org/en-US/docs/Web/API/TransformStreamDefaultController) | Web | | -| [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) | Web | | -| [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) | Web | | -| [`WebAssembly`](https://nodejs.org/api/globals.html#webassembly) | Web | | -| [`WritableStream`](https://developer.mozilla.org/en-US/docs/Web/API/WritableStream) | Web | | -| [`WritableStreamDefaultController`](https://developer.mozilla.org/en-US/docs/Web/API/WritableStreamDefaultController) | Web | | -| [`WritableStreamDefaultWriter`](https://developer.mozilla.org/en-US/docs/Web/API/WritableStreamDefaultWriter) | Web | | diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/runtime/hashing.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/runtime/hashing.mdx deleted file mode 100644 index 4b9f119..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/runtime/hashing.mdx +++ /dev/null @@ -1,315 +0,0 @@ ---- -title: Hashing -description: Bun provides a set of utility functions for hashing and verifying passwords with various cryptographically secure algorithms ---- - - - Bun implements the `createHash` and `createHmac` functions from [`node:crypto`](https://nodejs.org/api/crypto.html) in - addition to the Bun-native APIs documented below. - - ---- - -## `Bun.password` - -`Bun.password` is a collection of utility functions for hashing and verifying passwords with various cryptographically secure algorithms. - -```ts -const password = "super-secure-pa$$word"; - -const hash = await Bun.password.hash(password); -// => $argon2id$v=19$m=65536,t=2,p=1$tFq+9AVr1bfPxQdh6E8DQRhEXg/M/SqYCNu6gVdRRNs$GzJ8PuBi+K+BVojzPfS5mjnC8OpLGtv8KJqF99eP6a4 - -const isMatch = await Bun.password.verify(password, hash); -// => true -``` - -The second argument to `Bun.password.hash` accepts a params object that lets you pick and configure the hashing algorithm. - -```ts -const password = "super-secure-pa$$word"; - -// use argon2 (default) -const argonHash = await Bun.password.hash(password, { - algorithm: "argon2id", // "argon2id" | "argon2i" | "argon2d" - memoryCost: 4, // memory usage in kibibytes - timeCost: 3, // the number of iterations -}); - -// use bcrypt -const bcryptHash = await Bun.password.hash(password, { - algorithm: "bcrypt", - cost: 4, // number between 4-31 -}); -``` - -The algorithm used to create the hash is stored in the hash itself. When using `bcrypt`, the returned hash is encoded in [Modular Crypt Format](https://passlib.readthedocs.io/en/stable/modular_crypt_format.html) for compatibility with most existing `bcrypt` implementations; with `argon2` the result is encoded in the newer [PHC format](https://github.com/P-H-C/phc-string-format/blob/master/phc-sf-spec.md). - -The `verify` function automatically detects the algorithm based on the input hash and use the correct verification method. It can correctly infer the algorithm from both PHC- or MCF-encoded hashes. - -```ts -const password = "super-secure-pa$$word"; - -const hash = await Bun.password.hash(password, { - /* config */ -}); - -const isMatch = await Bun.password.verify(password, hash); -// => true -``` - -Synchronous versions of all functions are also available. Keep in mind that these functions are computationally expensive, so using a blocking API may degrade application performance. - -```ts -const password = "super-secure-pa$$word"; - -const hash = Bun.password.hashSync(password, { - /* config */ -}); - -const isMatch = Bun.password.verifySync(password, hash); -// => true -``` - -### Salt - -When you use `Bun.password.hash`, a salt is automatically generated and included in the hash. - -### bcrypt - Modular Crypt Format - -In the following [Modular Crypt Format](https://passlib.readthedocs.io/en/stable/modular_crypt_format.html) hash (used by `bcrypt`): - -Input: - -```ts -await Bun.password.hash("hello", { - algorithm: "bcrypt", -}); -``` - -Output: - -```sh -$2b$10$Lyj9kHYZtiyfxh2G60TEfeqs7xkkGiEFFDi3iJGc50ZG/XJ1sxIFi; -``` - -The format is composed of: - -- `bcrypt`: `$2b` -- `rounds`: `$10` - rounds (log10 of the actual number of rounds) -- `salt`: `$Lyj9kHYZtiyfxh2G60TEfeqs7xkkGiEFFDi3iJGc50ZG/XJ1sxIFi` -- `hash`: `$GzJ8PuBi+K+BVojzPfS5mjnC8OpLGtv8KJqF99eP6a4` - -By default, the bcrypt library truncates passwords longer than 72 bytes. In Bun, if you pass `Bun.password.hash` a password longer than 72 bytes and use the `bcrypt` algorithm, the password will be hashed via SHA-512 before being passed to bcrypt. - -```ts -await Bun.password.hash("hello".repeat(100), { - algorithm: "bcrypt", -}); -``` - -So instead of sending bcrypt a 500-byte password silently truncated to 72 bytes, Bun will hash the password using SHA-512 and send the hashed password to bcrypt (only if it exceeds 72 bytes). This is a more secure default behavior. - -### argon2 - PHC format - -In the following [PHC format](https://github.com/P-H-C/phc-string-format/blob/master/phc-sf-spec.md) hash (used by `argon2`): - -Input: - -```ts -await Bun.password.hash("hello", { - algorithm: "argon2id", -}); -``` - -Output: - -```sh -$argon2id$v=19$m=65536,t=2,p=1$xXnlSvPh4ym5KYmxKAuuHVlDvy2QGHBNuI6bJJrRDOs$2YY6M48XmHn+s5NoBaL+ficzXajq2Yj8wut3r0vnrwI -``` - -The format is composed of: - -- `algorithm`: `$argon2id` -- `version`: `$v=19` -- `memory cost`: `65536` -- `iterations`: `t=2` -- `parallelism`: `p=1` -- `salt`: `$xXnlSvPh4ym5KYmxKAuuHVlDvy2QGHBNuI6bJJrRDOs` -- `hash`: `$2YY6M48XmHn+s5NoBaL+ficzXajq2Yj8wut3r0vnrwI` - ---- - -## `Bun.hash` - -`Bun.hash` is a collection of utilities for _non-cryptographic_ hashing. Non-cryptographic hashing algorithms are optimized for speed of computation over collision-resistance or security. - -The standard `Bun.hash` functions uses [Wyhash](https://github.com/wangyi-fudan/wyhash) to generate a 64-bit hash from an input of arbitrary size. - -```ts -Bun.hash("some data here"); -// 11562320457524636935n -``` - -The input can be a string, `TypedArray`, `DataView`, `ArrayBuffer`, or `SharedArrayBuffer`. - -```ts -const arr = new Uint8Array([1, 2, 3, 4]); - -Bun.hash("some data here"); -Bun.hash(arr); -Bun.hash(arr.buffer); -Bun.hash(new DataView(arr.buffer)); -``` - -Optionally, an integer seed can be specified as the second parameter. For 64-bit hashes seeds above `Number.MAX_SAFE_INTEGER` should be given as BigInt to avoid loss of precision. - -```ts -Bun.hash("some data here", 1234); -// 15724820720172937558n -``` - -Additional hashing algorithms are available as properties on `Bun.hash`. The API is the same for each, only changing the return type from number for 32-bit hashes to bigint for 64-bit hashes. - -```ts -Bun.hash.wyhash("data", 1234); // equivalent to Bun.hash() -Bun.hash.crc32("data", 1234); -Bun.hash.adler32("data", 1234); -Bun.hash.cityHash32("data", 1234); -Bun.hash.cityHash64("data", 1234); -Bun.hash.xxHash32("data", 1234); -Bun.hash.xxHash64("data", 1234); -Bun.hash.xxHash3("data", 1234); -Bun.hash.murmur32v3("data", 1234); -Bun.hash.murmur32v2("data", 1234); -Bun.hash.murmur64v2("data", 1234); -Bun.hash.rapidhash("data", 1234); -``` - ---- - -## `Bun.CryptoHasher` - -`Bun.CryptoHasher` is a general-purpose utility class that lets you incrementally compute a hash of string or binary data using a range of cryptographic hash algorithms. The following algorithms are supported: - -- `"blake2b256"` -- `"blake2b512"` -- `"md4"` -- `"md5"` -- `"ripemd160"` -- `"sha1"` -- `"sha224"` -- `"sha256"` -- `"sha384"` -- `"sha512"` -- `"sha512-224"` -- `"sha512-256"` -- `"sha3-224"` -- `"sha3-256"` -- `"sha3-384"` -- `"sha3-512"` -- `"shake128"` -- `"shake256"` - -```ts -const hasher = new Bun.CryptoHasher("sha256"); -hasher.update("hello world"); -hasher.digest(); -// Uint8Array(32) [ , , ... ] -``` - -Once initialized, data can be incrementally fed to to the hasher using `.update()`. This method accepts `string`, `TypedArray`, and `ArrayBuffer`. - -```ts -const hasher = new Bun.CryptoHasher("sha256"); - -hasher.update("hello world"); -hasher.update(new Uint8Array([1, 2, 3])); -hasher.update(new ArrayBuffer(10)); -``` - -If a `string` is passed, an optional second parameter can be used to specify the encoding (default `'utf-8'`). The following encodings are supported: - -| Category | Encodings | -| -------------------------- | ------------------------------------------- | -| Binary encodings | `"base64"` `"base64url"` `"hex"` `"binary"` | -| Character encodings | `"utf8"` `"utf-8"` `"utf16le"` `"latin1"` | -| Legacy character encodings | `"ascii"` `"binary"` `"ucs2"` `"ucs-2"` | - -```ts -hasher.update("hello world"); // defaults to utf8 -hasher.update("hello world", "hex"); -hasher.update("hello world", "base64"); -hasher.update("hello world", "latin1"); -``` - -After the data has been feed into the hasher, a final hash can be computed using `.digest()`. By default, this method returns a `Uint8Array` containing the hash. - -```ts -const hasher = new Bun.CryptoHasher("sha256"); -hasher.update("hello world"); - -hasher.digest(); -// => Uint8Array(32) [ 185, 77, 39, 185, 147, ... ] -``` - -The `.digest()` method can optionally return the hash as a string. To do so, specify an encoding: - -```ts -hasher.digest("base64"); -// => "uU0nuZNNPgilLlLX2n2r+sSE7+N6U4DukIj3rOLvzek=" - -hasher.digest("hex"); -// => "b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9" -``` - -Alternatively, the method can write the hash into a pre-existing `TypedArray` instance. This may be desirable in some performance-sensitive applications. - -```ts -const arr = new Uint8Array(32); - -hasher.digest(arr); - -console.log(arr); -// => Uint8Array(32) [ 185, 77, 39, 185, 147, ... ] -``` - -### HMAC in `Bun.CryptoHasher` - -`Bun.CryptoHasher` can be used to compute HMAC digests. To do so, pass the key to the constructor. - -```ts -const hasher = new Bun.CryptoHasher("sha256", "secret-key"); -hasher.update("hello world"); -console.log(hasher.digest("hex")); -// => "095d5a21fe6d0646db223fdf3de6436bb8dfb2fab0b51677ecf6441fcf5f2a67" -``` - -When using HMAC, a more limited set of algorithms are supported: - -- `"blake2b512"` -- `"md5"` -- `"sha1"` -- `"sha224"` -- `"sha256"` -- `"sha384"` -- `"sha512-224"` -- `"sha512-256"` -- `"sha512"` - -Unlike the non-HMAC `Bun.CryptoHasher`, the HMAC `Bun.CryptoHasher` instance is not reset after `.digest()` is called, and attempting to use the same instance again will throw an error. - -Other methods like `.copy()` and `.update()` are supported (as long as it's before `.digest()`), but methods like `.digest()` that finalize the hasher are not. - -```ts -const hasher = new Bun.CryptoHasher("sha256", "secret-key"); -hasher.update("hello world"); - -const copy = hasher.copy(); -copy.update("!"); -console.log(copy.digest("hex")); -// => "3840176c3d8923f59ac402b7550404b28ab11cb0ef1fa199130a5c37864b5497" - -console.log(hasher.digest("hex")); -// => "095d5a21fe6d0646db223fdf3de6436bb8dfb2fab0b51677ecf6441fcf5f2a67" -``` diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/runtime/html-rewriter.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/runtime/html-rewriter.mdx deleted file mode 100644 index 5e05ee0..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/runtime/html-rewriter.mdx +++ /dev/null @@ -1,333 +0,0 @@ ---- -title: HTMLRewriter -description: Use Bun's HTMLRewriter to transform HTML documents with CSS selectors ---- - -HTMLRewriter lets you use CSS selectors to transform HTML documents. It works with `Request`, `Response`, as well as `string`. Bun's implementation is based on Cloudflare's [lol-html](https://github.com/cloudflare/lol-html). - ---- - -## Usage - -A common usecase is rewriting URLs in HTML content. Here's an example that rewrites image sources and link URLs to use a CDN domain: - -```ts -// Replace all images with a rickroll -const rewriter = new HTMLRewriter().on("img", { - element(img) { - // Famous rickroll video thumbnail - img.setAttribute("src", "https://img.youtube.com/vi/dQw4w9WgXcQ/maxresdefault.jpg"); - - // Wrap the image in a link to the video - img.before('', { - html: true, - }); - img.after("", { html: true }); - - // Add some fun alt text - img.setAttribute("alt", "Definitely not a rickroll"); - }, -}); - -// An example HTML document -const html = ` - - - - - - - -`; - -const result = rewriter.transform(html); -console.log(result); -``` - -This replaces all images with a thumbnail of Rick Astley and wraps each `` in a link, producing a diff like this: - -{/* prettier-ignore */} -```html - - - - - - - Definitely not a rickroll - - - Definitely not a rickroll - - - Definitely not a rickroll - - - -``` - -Now every image on the page will be replaced with a thumbnail of Rick Astley, and clicking any image will lead to [a very famous video](https://www.youtube.com/watch?v=dQw4w9WgXcQ). - -### Input types - -HTMLRewriter can transform HTML from various sources. The input is automatically handled based on its type: - -```ts -// From Response -rewriter.transform(new Response("
content
")); - -// From string -rewriter.transform("
content
"); - -// From ArrayBuffer -rewriter.transform(new TextEncoder().encode("
content
").buffer); - -// From Blob -rewriter.transform(new Blob(["
content
"])); - -// From File -rewriter.transform(Bun.file("index.html")); -``` - -Note that Cloudflare Workers implementation of HTMLRewriter only supports `Response` objects. - -### Element Handlers - -The `on(selector, handlers)` method allows you to register handlers for HTML elements that match a CSS selector. The handlers are called for each matching element during parsing: - -```ts -rewriter.on("div.content", { - // Handle elements - element(element) { - element.setAttribute("class", "new-content"); - element.append("

New content

", { html: true }); - }, - // Handle text nodes - text(text) { - text.replace("new text"); - }, - // Handle comments - comments(comment) { - comment.remove(); - }, -}); -``` - -The handlers can be asynchronous and return a Promise. Note that async operations will block the transformation until they complete: - -```ts -rewriter.on("div", { - async element(element) { - await Bun.sleep(1000); - element.setInnerContent("replace", { html: true }); - }, -}); -``` - -### CSS Selector Support - -The `on()` method supports a wide range of CSS selectors: - -```ts -// Tag selectors -rewriter.on("p", handler); - -// Class selectors -rewriter.on("p.red", handler); - -// ID selectors -rewriter.on("h1#header", handler); - -// Attribute selectors -rewriter.on("p[data-test]", handler); // Has attribute -rewriter.on('p[data-test="one"]', handler); // Exact match -rewriter.on('p[data-test="one" i]', handler); // Case-insensitive -rewriter.on('p[data-test="one" s]', handler); // Case-sensitive -rewriter.on('p[data-test~="two"]', handler); // Word match -rewriter.on('p[data-test^="a"]', handler); // Starts with -rewriter.on('p[data-test$="1"]', handler); // Ends with -rewriter.on('p[data-test*="b"]', handler); // Contains -rewriter.on('p[data-test|="a"]', handler); // Dash-separated - -// Combinators -rewriter.on("div span", handler); // Descendant -rewriter.on("div > span", handler); // Direct child - -// Pseudo-classes -rewriter.on("p:nth-child(2)", handler); -rewriter.on("p:first-child", handler); -rewriter.on("p:nth-of-type(2)", handler); -rewriter.on("p:first-of-type", handler); -rewriter.on("p:not(:first-child)", handler); - -// Universal selector -rewriter.on("*", handler); -``` - -### Element Operations - -Elements provide various methods for manipulation. All modification methods return the element instance for chaining: - -```ts -rewriter.on("div", { - element(el) { - // Attributes - el.setAttribute("class", "new-class").setAttribute("data-id", "123"); - - const classAttr = el.getAttribute("class"); // "new-class" - const hasId = el.hasAttribute("id"); // boolean - el.removeAttribute("class"); - - // Content manipulation - el.setInnerContent("New content"); // Escapes HTML by default - el.setInnerContent("

HTML content

", { html: true }); // Parses HTML - el.setInnerContent(""); // Clear content - - // Position manipulation - el.before("Content before").after("Content after").prepend("First child").append("Last child"); - - // HTML content insertion - el.before("before", { html: true }) - .after("after", { html: true }) - .prepend("first", { html: true }) - .append("last", { html: true }); - - // Removal - el.remove(); // Remove element and contents - el.removeAndKeepContent(); // Remove only the element tags - - // Properties - console.log(el.tagName); // Lowercase tag name - console.log(el.namespaceURI); // Element's namespace URI - console.log(el.selfClosing); // Whether element is self-closing (e.g.
) - console.log(el.canHaveContent); // Whether element can contain content (false for void elements like
) - console.log(el.removed); // Whether element was removed - - // Attributes iteration - for (const [name, value] of el.attributes) { - console.log(name, value); - } - - // End tag handling - el.onEndTag(endTag => { - endTag.before("Before end tag"); - endTag.after("After end tag"); - endTag.remove(); // Remove the end tag - console.log(endTag.name); // Tag name in lowercase - }); - }, -}); -``` - -### Text Operations - -Text handlers provide methods for text manipulation. Text chunks represent portions of text content and provide information about their position in the text node: - -```ts -rewriter.on("p", { - text(text) { - // Content - console.log(text.text); // Text content - console.log(text.lastInTextNode); // Whether this is the last chunk - console.log(text.removed); // Whether text was removed - - // Manipulation - text.before("Before text").after("After text").replace("New text").remove(); - - // HTML content insertion - text - .before("before", { html: true }) - .after("after", { html: true }) - .replace("replace", { html: true }); - }, -}); -``` - -### Comment Operations - -Comment handlers allow comment manipulation with similar methods to text nodes: - -```ts -rewriter.on("*", { - comments(comment) { - // Content - console.log(comment.text); // Comment text - comment.text = "New comment text"; // Set comment text - console.log(comment.removed); // Whether comment was removed - - // Manipulation - comment.before("Before comment").after("After comment").replace("New comment").remove(); - - // HTML content insertion - comment - .before("before", { html: true }) - .after("after", { html: true }) - .replace("replace", { html: true }); - }, -}); -``` - -### Document Handlers - -The `onDocument(handlers)` method allows you to handle document-level events. These handlers are called for events that occur at the document level rather than within specific elements: - -```ts -rewriter.onDocument({ - // Handle doctype - doctype(doctype) { - console.log(doctype.name); // "html" - console.log(doctype.publicId); // public identifier if present - console.log(doctype.systemId); // system identifier if present - }, - // Handle text nodes - text(text) { - console.log(text.text); - }, - // Handle comments - comments(comment) { - console.log(comment.text); - }, - // Handle document end - end(end) { - end.append("", { html: true }); - }, -}); -``` - -### Response Handling - -When transforming a Response: - -- The status code, headers, and other response properties are preserved -- The body is transformed while maintaining streaming capabilities -- Content-encoding (like gzip) is handled automatically -- The original response body is marked as used after transformation -- Headers are cloned to the new response - -## Error Handling - -HTMLRewriter operations can throw errors in several cases: - -- Invalid selector syntax in `on()` method -- Invalid HTML content in transformation methods -- Stream errors when processing Response bodies -- Memory allocation failures -- Invalid input types (e.g., passing Symbol) -- Body already used errors - -Errors should be caught and handled appropriately: - -```ts -try { - const result = rewriter.transform(input); - // Process result -} catch (error) { - console.error("HTMLRewriter error:", error); -} -``` - ---- - -## See also - -You can also read the [Cloudflare documentation](https://developers.cloudflare.com/workers/runtime-apis/html-rewriter/), which this API is intended to be compatible with. diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/runtime/http/cookies.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/runtime/http/cookies.mdx deleted file mode 100644 index 7eb3a32..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/runtime/http/cookies.mdx +++ /dev/null @@ -1,79 +0,0 @@ ---- -title: Cookies -description: Work with cookies in HTTP requests and responses using Bun's built-in Cookie API. ---- - -Bun provides a built-in API for working with cookies in HTTP requests and responses. The `BunRequest` object includes a `cookies` property that provides a `CookieMap` for easily accessing and manipulating cookies. When using `routes`, `Bun.serve()` automatically tracks `request.cookies.set` and applies them to the response. - -## Reading cookies - -Read cookies from incoming requests using the `cookies` property on the `BunRequest` object: - -```ts -Bun.serve({ - routes: { - "/profile": req => { - // Access cookies from the request - const userId = req.cookies.get("user_id"); - const theme = req.cookies.get("theme") || "light"; - - return Response.json({ - userId, - theme, - message: "Profile page", - }); - }, - }, -}); -``` - -## Setting cookies - -To set cookies, use the `set` method on the `CookieMap` from the `BunRequest` object. - -```ts -Bun.serve({ - routes: { - "/login": req => { - const cookies = req.cookies; - - // Set a cookie with various options - cookies.set("user_id", "12345", { - maxAge: 60 * 60 * 24 * 7, // 1 week - httpOnly: true, - secure: true, - path: "/", - }); - - // Add a theme preference cookie - cookies.set("theme", "dark"); - - // Modified cookies from the request are automatically applied to the response - return new Response("Login successful"); - }, - }, -}); -``` - -`Bun.serve()` automatically tracks modified cookies from the request and applies them to the response. - -## Deleting cookies - -To delete a cookie, use the `delete` method on the `request.cookies` (`CookieMap`) object: - -```ts -Bun.serve({ - routes: { - "/logout": req => { - // Delete the user_id cookie - req.cookies.delete("user_id", { - path: "/", - }); - - return new Response("Logged out successfully"); - }, - }, -}); -``` - -Deleted cookies become a `Set-Cookie` header on the response with the `maxAge` set to `0` and an empty `value`. diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/runtime/http/error-handling.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/runtime/http/error-handling.mdx deleted file mode 100644 index 7644f58..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/runtime/http/error-handling.mdx +++ /dev/null @@ -1,40 +0,0 @@ ---- -title: Error Handling -description: Learn how to handle errors in Bun's development server ---- - -To activate development mode, set `development: true`. - -```ts title="server.ts" icon="/icons/typescript.svg" -Bun.serve({ - development: true, // [!code ++] - fetch(req) { - throw new Error("woops!"); - }, -}); -``` - -In development mode, Bun will surface errors in-browser with a built-in error page. - -![Bun's built-in 500 page](https://bun.com/images/exception_page.png) - -### `error` callback - -To handle server-side errors, implement an `error` handler. This function should return a `Response` to serve to the client when an error occurs. This response will supersede Bun's default error page in `development` mode. - -```ts -Bun.serve({ - fetch(req) { - throw new Error("woops!"); - }, - error(error) { - return new Response(`
${error}\n${error.stack}
`, { - headers: { - "Content-Type": "text/html", - }, - }); - }, -}); -``` - -[Learn more about debugging in Bun](/docs/runtime/debugger) diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/runtime/http/metrics.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/runtime/http/metrics.mdx deleted file mode 100644 index a43a8f9..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/runtime/http/metrics.mdx +++ /dev/null @@ -1,36 +0,0 @@ ---- -title: Metrics -description: Monitor server activity with built-in metrics ---- - -### `server.pendingRequests` and `server.pendingWebSockets` - -Monitor server activity with built-in counters: - -```ts -const server = Bun.serve({ - fetch(req, server) { - return new Response( - `Active requests: ${server.pendingRequests}\n` + `Active WebSockets: ${server.pendingWebSockets}`, - ); - }, -}); -``` - -### `server.subscriberCount(topic)` - -Get count of subscribers for a WebSocket topic: - -```ts -const server = Bun.serve({ - fetch(req, server) { - const chatUsers = server.subscriberCount("chat"); - return new Response(`${chatUsers} users in chat`); - }, - websocket: { - message(ws) { - ws.subscribe("chat"); - }, - }, -}); -``` diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/runtime/http/routing.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/runtime/http/routing.mdx deleted file mode 100644 index 418e421..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/runtime/http/routing.mdx +++ /dev/null @@ -1,289 +0,0 @@ ---- -title: Routing -description: Define routes in `Bun.serve` using static paths, parameters, and wildcards ---- - -You can add routes to `Bun.serve()` by using the `routes` property (for static paths, parameters, and wildcards) or by handling unmatched requests with the [`fetch`](#fetch) method. - -`Bun.serve()`'s router builds on top uWebSocket's [tree-based approach](https://github.com/oven-sh/bun/blob/0d1a00fa0f7830f8ecd99c027fce8096c9d459b6/packages/bun-uws/src/HttpRouter.h#L57-L64) to add [SIMD-accelerated route parameter decoding](https://github.com/oven-sh/bun/blob/main/src/bun.js/bindings/decodeURIComponentSIMD.cpp#L21-L271) and [JavaScriptCore structure caching](https://github.com/oven-sh/bun/blob/main/src/bun.js/bindings/ServerRouteList.cpp#L100-L101) to push the performance limits of what modern hardware allows. - -## Basic Setup - -```ts title="server.ts" icon="/icons/typescript.svg" -Bun.serve({ - routes: { - "/": () => new Response("Home"), - "/api": () => Response.json({ success: true }), - "/users": async () => Response.json({ users: [] }), - }, - fetch() { - return new Response("Unmatched route"); - }, -}); -``` - -Routes in `Bun.serve()` receive a `BunRequest` (which extends [`Request`](https://developer.mozilla.org/en-US/docs/Web/API/Request)) and return a [`Response`](https://developer.mozilla.org/en-US/docs/Web/API/Response) or `Promise`. This makes it easier to use the same code for both sending & receiving HTTP requests. - -```ts -// Simplified for brevity -interface BunRequest extends Request { - params: Record; - readonly cookies: CookieMap; -} -``` - -## Asynchronous Routes - -### Async/await - -You can use async/await in route handlers to return a `Promise`. - -```ts -import { sql, serve } from "bun"; - -serve({ - port: 3001, - routes: { - "/api/version": async () => { - const [version] = await sql`SELECT version()`; - return Response.json(version); - }, - }, -}); -``` - -### Promise - -You can also return a `Promise` from a route handler. - -```ts -import { sql, serve } from "bun"; - -serve({ - routes: { - "/api/version": () => { - return new Promise(resolve => { - setTimeout(async () => { - const [version] = await sql`SELECT version()`; - resolve(Response.json(version)); - }, 100); - }); - }, - }, -}); -``` - ---- - -## Route precedence - -Routes are matched in order of specificity: - -1. Exact routes (`/users/all`) -2. Parameter routes (`/users/:id`) -3. Wildcard routes (`/users/*`) -4. Global catch-all (`/*`) - -```ts -Bun.serve({ - routes: { - // Most specific first - "/api/users/me": () => new Response("Current user"), - "/api/users/:id": req => new Response(`User ${req.params.id}`), - "/api/*": () => new Response("API catch-all"), - "/*": () => new Response("Global catch-all"), - }, -}); -``` - ---- - -## Type-safe route parameters - -TypeScript parses route parameters when passed as a string literal, so that your editor will show autocomplete when accessing `request.params`. - -```ts title="index.ts" icon="/icons/typescript.svg" -import type { BunRequest } from "bun"; - -Bun.serve({ - routes: { - // TypeScript knows the shape of params when passed as a string literal - "/orgs/:orgId/repos/:repoId": req => { - const { orgId, repoId } = req.params; - return Response.json({ orgId, repoId }); - }, - - "/orgs/:orgId/repos/:repoId/settings": ( - // optional: you can explicitly pass a type to BunRequest: - req: BunRequest<"/orgs/:orgId/repos/:repoId/settings">, - ) => { - const { orgId, repoId } = req.params; - return Response.json({ orgId, repoId }); - }, - }, -}); -``` - -Percent-encoded route parameter values are automatically decoded. Unicode characters are supported. Invalid unicode is replaced with the unicode replacement character `&0xFFFD;`. - -### Static responses - -Routes can also be `Response` objects (without the handler function). Bun.serve() optimizes it for zero-allocation dispatch - perfect for health checks, redirects, and fixed content: - -```ts -Bun.serve({ - routes: { - // Health checks - "/health": new Response("OK"), - "/ready": new Response("Ready", { - headers: { - // Pass custom headers - "X-Ready": "1", - }, - }), - - // Redirects - "/blog": Response.redirect("https://bun.com/blog"), - - // API responses - "/api/config": Response.json({ - version: "1.0.0", - env: "production", - }), - }, -}); -``` - -Static responses do not allocate additional memory after initialization. You can generally expect at least a 15% performance improvement over manually returning a `Response` object. - -Static route responses are cached for the lifetime of the server object. To reload static routes, call `server.reload(options)`. - -### File Responses vs Static Responses - -When serving files in routes, there are two distinct behaviors depending on whether you buffer the file content or serve it directly: - -```ts -Bun.serve({ - routes: { - // Static route - content is buffered in memory at startup - "/logo.png": new Response(await Bun.file("./logo.png").bytes()), - - // File route - content is read from filesystem on each request - "/download.zip": new Response(Bun.file("./download.zip")), - }, -}); -``` - -**Static routes** (`new Response(await file.bytes())`) buffer content in memory at startup: - -- **Zero filesystem I/O** during requests - content served entirely from memory -- **ETag support** - Automatically generates and validates ETags for caching -- **If-None-Match** - Returns `304 Not Modified` when client ETag matches -- **No 404 handling** - Missing files cause startup errors, not runtime 404s -- **Memory usage** - Full file content stored in RAM -- **Best for**: Small static assets, API responses, frequently accessed files - -**File routes** (`new Response(Bun.file(path))`) read from filesystem per request: - -- **Filesystem reads** on each request - checks file existence and reads content -- **Built-in 404 handling** - Returns `404 Not Found` if file doesn't exist or becomes inaccessible -- **Last-Modified support** - Uses file modification time for `If-Modified-Since` headers -- **If-Modified-Since** - Returns `304 Not Modified` when file hasn't changed since client's cached version -- **Range request support** - Automatically handles partial content requests with `Content-Range` headers -- **Streaming transfers** - Uses buffered reader with backpressure handling for efficient memory usage -- **Memory efficient** - Only buffers small chunks during transfer, not entire file -- **Best for**: Large files, dynamic content, user uploads, files that change frequently - ---- - -## Streaming files - -To stream a file, return a `Response` object with a `BunFile` object as the body. - -```ts -Bun.serve({ - fetch(req) { - return new Response(Bun.file("./hello.txt")); - }, -}); -``` - - - ⚡️ **Speed** — Bun automatically uses the [`sendfile(2)`](https://man7.org/linux/man-pages/man2/sendfile.2.html) - system call when possible, enabling zero-copy file transfers in the kernel—the fastest way to send files. - - -You can send part of a file using the [`slice(start, end)`](https://developer.mozilla.org/en-US/docs/Web/API/Blob/slice) method on the `Bun.file` object. This automatically sets the `Content-Range` and `Content-Length` headers on the `Response` object. - -```ts -Bun.serve({ - fetch(req) { - // parse `Range` header - const [start = 0, end = Infinity] = req.headers - .get("Range") // Range: bytes=0-100 - .split("=") // ["Range: bytes", "0-100"] - .at(-1) // "0-100" - .split("-") // ["0", "100"] - .map(Number); // [0, 100] - - // return a slice of the file - const bigFile = Bun.file("./big-video.mp4"); - return new Response(bigFile.slice(start, end)); - }, -}); -``` - ---- - -## `fetch` request handler - -The `fetch` handler handles incoming requests that weren't matched by any route. It receives a [`Request`](https://developer.mozilla.org/en-US/docs/Web/API/Request) object and returns a [`Response`](https://developer.mozilla.org/en-US/docs/Web/API/Response) or [`Promise`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise). - -```ts -Bun.serve({ - fetch(req) { - const url = new URL(req.url); - if (url.pathname === "/") return new Response("Home page!"); - if (url.pathname === "/blog") return new Response("Blog!"); - return new Response("404!"); - }, -}); -``` - -The `fetch` handler supports async/await: - -```ts -import { sleep, serve } from "bun"; - -serve({ - async fetch(req) { - const start = performance.now(); - await sleep(10); - const end = performance.now(); - return new Response(`Slept for ${end - start}ms`); - }, -}); -``` - -Promise-based responses are also supported: - -```ts -Bun.serve({ - fetch(req) { - // Forward the request to another server. - return fetch("https://example.com"); - }, -}); -``` - -You can also access the `Server` object from the `fetch` handler. It's the second argument passed to the `fetch` function. - -```ts -// `server` is passed in as the second argument to `fetch`. -const server = Bun.serve({ - fetch(req, server) { - const ip = server.requestIP(req); - return new Response(`Your IP is ${ip.address}`); - }, -}); -``` diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/runtime/http/server.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/runtime/http/server.mdx deleted file mode 100644 index ec49f7a..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/runtime/http/server.mdx +++ /dev/null @@ -1,645 +0,0 @@ ---- -title: Server -description: Use `Bun.serve` to start a high-performance HTTP server in Bun ---- - -## Basic Setup - -```ts title="index.ts" icon="/icons/typescript.svg" -const server = Bun.serve({ - // `routes` requires Bun v1.2.3+ - routes: { - // Static routes - "/api/status": new Response("OK"), - - // Dynamic routes - "/users/:id": req => { - return new Response(`Hello User ${req.params.id}!`); - }, - - // Per-HTTP method handlers - "/api/posts": { - GET: () => new Response("List posts"), - POST: async req => { - const body = await req.json(); - return Response.json({ created: true, ...body }); - }, - }, - - // Wildcard route for all routes that start with "/api/" and aren't otherwise matched - "/api/*": Response.json({ message: "Not found" }, { status: 404 }), - - // Redirect from /blog/hello to /blog/hello/world - "/blog/hello": Response.redirect("/blog/hello/world"), - - // Serve a file by lazily loading it into memory - "/favicon.ico": Bun.file("./favicon.ico"), - }, - - // (optional) fallback for unmatched routes: - // Required if Bun's version < 1.2.3 - fetch(req) { - return new Response("Not Found", { status: 404 }); - }, -}); - -console.log(`Server running at ${server.url}`); -``` - ---- - -## HTML imports - -Bun supports importing HTML files directly into your server code, enabling full-stack applications with both server-side and client-side code. HTML imports work in two modes: - -**Development (`bun --hot`):** Assets are bundled on-demand at runtime, enabling hot module replacement (HMR) for a fast, iterative development experience. When you change your frontend code, the browser automatically updates without a full page reload. - -**Production (`bun build`):** When building with `bun build --target=bun`, the `import index from "./index.html"` statement resolves to a pre-built manifest object containing all bundled client assets. `Bun.serve` consumes this manifest to serve optimized assets with zero runtime bundling overhead. This is ideal for deploying to production. - -```ts -import myReactSinglePageApp from "./index.html"; - -Bun.serve({ - routes: { - "/": myReactSinglePageApp, - }, -}); -``` - -HTML imports don't just serve HTML — it's a full-featured frontend bundler, transpiler, and toolkit built using Bun's [bundler](/docs/bundler), JavaScript transpiler and CSS parser. You can use this to build full-featured frontends with React, TypeScript, Tailwind CSS, and more. - -For a complete guide on building full-stack applications with HTML imports, including detailed examples and best practices, see [/docs/bundler/fullstack](/docs/bundler/fullstack). - ---- - -## Configuration - -### Changing the `port` and `hostname` - -To configure which port and hostname the server will listen on, set `port` and `hostname` in the options object. - -```ts -Bun.serve({ - port: 8080, // defaults to $BUN_PORT, $PORT, $NODE_PORT otherwise 3000 // [!code ++] - hostname: "mydomain.com", // defaults to "0.0.0.0" // [!code ++] - fetch(req) { - return new Response("404!"); - }, -}); -``` - -To randomly select an available port, set `port` to `0`. - -```ts -const server = Bun.serve({ - port: 0, // random port // [!code ++] - fetch(req) { - return new Response("404!"); - }, -}); - -// server.port is the randomly selected port -console.log(server.port); -``` - -You can view the chosen port by accessing the `port` property on the server object, or by accessing the `url` property. - -```ts -console.log(server.port); // 3000 -console.log(server.url); // http://localhost:3000 -``` - -### Configuring a default port - -Bun supports several options and environment variables to configure the default port. The default port is used when the `port` option is not set. - -- `--port` CLI flag - -```sh -bun --port=4002 server.ts -``` - -- `BUN_PORT` environment variable - -```sh -BUN_PORT=4002 bun server.ts -``` - -- `PORT` environment variable - -```sh terminal icon="terminal" -PORT=4002 bun server.ts -``` - -- `NODE_PORT` environment variable - -```sh terminal icon="terminal" -NODE_PORT=4002 bun server.ts -``` - ---- - -## Unix domain sockets - -To listen on a [unix domain socket](https://en.wikipedia.org/wiki/Unix_domain_socket), pass the `unix` option with the path to the socket. - -```ts -Bun.serve({ - unix: "/tmp/my-socket.sock", // path to socket - fetch(req) { - return new Response(`404!`); - }, -}); -``` - -### Abstract namespace sockets - -Bun supports Linux abstract namespace sockets. To use an abstract namespace socket, prefix the `unix` path with a null byte. - -```ts -Bun.serve({ - unix: "\0my-abstract-socket", // abstract namespace socket - fetch(req) { - return new Response(`404!`); - }, -}); -``` - -Unlike unix domain sockets, abstract namespace sockets are not bound to the filesystem and are automatically removed when the last reference to the socket is closed. - ---- - -## idleTimeout - -To configure the idle timeout, set the `idleTimeout` field in Bun.serve. - -```ts -Bun.serve({ - // 10 seconds: - idleTimeout: 10, - - fetch(req) { - return new Response("Bun!"); - }, -}); -``` - -This is the maximum amount of time a connection is allowed to be idle before the server closes it. A connection is idling if there is no data sent or received. - ---- - -## export default syntax - -Thus far, the examples on this page have used the explicit `Bun.serve` API. Bun also supports an alternate syntax. - -```ts server.ts -import type { Serve } from "bun"; - -export default { - fetch(req) { - return new Response("Bun!"); - }, -} satisfies Serve.Options; -``` - -The type parameter `` represents WebSocket data — if you add a `websocket` handler with custom data attached via `server.upgrade(req, { data: ... })`, replace `undefined` with your data type. - -Instead of passing the server options into `Bun.serve`, `export default` it. This file can be executed as-is; when Bun sees a file with a `default` export containing a `fetch` handler, it passes it into `Bun.serve` under the hood. - ---- - -## Hot Route Reloading - -Update routes without server restarts using `server.reload()`: - -```ts -const server = Bun.serve({ - routes: { - "/api/version": () => Response.json({ version: "1.0.0" }), - }, -}); - -// Deploy new routes without downtime -server.reload({ - routes: { - "/api/version": () => Response.json({ version: "2.0.0" }), - }, -}); -``` - ---- - -## Server Lifecycle Methods - -### `server.stop()` - -To stop the server from accepting new connections: - -```ts -const server = Bun.serve({ - fetch(req) { - return new Response("Hello!"); - }, -}); - -// Gracefully stop the server (waits for in-flight requests) -await server.stop(); - -// Force stop and close all active connections -await server.stop(true); -``` - -By default, `stop()` allows in-flight requests and WebSocket connections to complete. Pass `true` to immediately terminate all connections. - -### `server.ref()` and `server.unref()` - -Control whether the server keeps the Bun process alive: - -```ts -// Don't keep process alive if server is the only thing running -server.unref(); - -// Restore default behavior - keep process alive -server.ref(); -``` - -### `server.reload()` - -Update the server's handlers without restarting: - -```ts -const server = Bun.serve({ - routes: { - "/api/version": Response.json({ version: "v1" }), - }, - fetch(req) { - return new Response("v1"); - }, -}); - -// Update to new handler -server.reload({ - routes: { - "/api/version": Response.json({ version: "v2" }), - }, - fetch(req) { - return new Response("v2"); - }, -}); -``` - -This is useful for development and hot reloading. Only `fetch`, `error`, and `routes` can be updated. - ---- - -## Per-Request Controls - -### `server.timeout(Request, seconds)` - -Set a custom idle timeout for individual requests: - -```ts -const server = Bun.serve({ - async fetch(req, server) { - // Set 60 second timeout for this request - server.timeout(req, 60); - - // If they take longer than 60 seconds to send the body, the request will be aborted - await req.text(); - - return new Response("Done!"); - }, -}); -``` - -Pass `0` to disable the timeout for a request. - -### `server.requestIP(Request)` - -Get client IP and port information: - -```ts -const server = Bun.serve({ - fetch(req, server) { - const address = server.requestIP(req); - if (address) { - return new Response(`Client IP: ${address.address}, Port: ${address.port}`); - } - return new Response("Unknown client"); - }, -}); -``` - -Returns `null` for closed requests or Unix domain sockets. - ---- - -## Server Metrics - -### `server.pendingRequests` and `server.pendingWebSockets` - -Monitor server activity with built-in counters: - -```ts -const server = Bun.serve({ - fetch(req, server) { - return new Response( - `Active requests: ${server.pendingRequests}\n` + `Active WebSockets: ${server.pendingWebSockets}`, - ); - }, -}); -``` - -### `server.subscriberCount(topic)` - -Get count of subscribers for a WebSocket topic: - -```ts -const server = Bun.serve({ - fetch(req, server) { - const chatUsers = server.subscriberCount("chat"); - return new Response(`${chatUsers} users in chat`); - }, - websocket: { - message(ws) { - ws.subscribe("chat"); - }, - }, -}); -``` - ---- - -## Benchmarks - -Below are Bun and Node.js implementations of a simple HTTP server that responds `Bun!` to each incoming `Request`. - -```ts Bun -Bun.serve({ - fetch(req: Request) { - return new Response("Bun!"); - }, - port: 3000, -}); -``` - -```ts -require("http") - .createServer((req, res) => res.end("Bun!")) - .listen(8080); -``` - -The `Bun.serve` server can handle roughly 2.5x more requests per second than Node.js on Linux. - -| Runtime | Requests per second | -| ------- | ------------------- | -| Node 16 | ~64,000 | -| Bun | ~160,000 | - - - ![image](https://user-images.githubusercontent.com/709451/162389032-fc302444-9d03-46be-ba87-c12bd8ce89a0.png) - - ---- - -## Practical example: REST API - -Here's a basic database-backed REST API using Bun's router with zero dependencies: - - - -```ts server.ts expandable icon="file-code" -import type { Post } from "./types.ts"; -import { Database } from "bun:sqlite"; - -const db = new Database("posts.db"); -db.exec(` - CREATE TABLE IF NOT EXISTS posts ( - id TEXT PRIMARY KEY, - title TEXT NOT NULL, - content TEXT NOT NULL, - created_at TEXT NOT NULL - ) -`); - -Bun.serve({ - routes: { - // List posts - "/api/posts": { - GET: () => { - const posts = db.query("SELECT * FROM posts").all(); - return Response.json(posts); - }, - - // Create post - POST: async req => { - const post: Omit = await req.json(); - const id = crypto.randomUUID(); - - db.query( - `INSERT INTO posts (id, title, content, created_at) - VALUES (?, ?, ?, ?)`, - ).run(id, post.title, post.content, new Date().toISOString()); - - return Response.json({ id, ...post }, { status: 201 }); - }, - }, - - // Get post by ID - "/api/posts/:id": req => { - const post = db.query("SELECT * FROM posts WHERE id = ?").get(req.params.id); - - if (!post) { - return new Response("Not Found", { status: 404 }); - } - - return Response.json(post); - }, - }, - - error(error) { - console.error(error); - return new Response("Internal Server Error", { status: 500 }); - }, -}); -``` - -```ts types.ts icon="/icons/typescript.svg" -export interface Post { - id: string; - title: string; - content: string; - created_at: string; -} -``` - - - ---- - -## Reference - -```ts expandable See TypeScript Definitions -interface Server extends Disposable { - /** - * Stop the server from accepting new connections. - * @param closeActiveConnections If true, immediately terminates all connections - * @returns Promise that resolves when the server has stopped - */ - stop(closeActiveConnections?: boolean): Promise; - - /** - * Update handlers without restarting the server. - * Only fetch and error handlers can be updated. - */ - reload(options: Serve): void; - - /** - * Make a request to the running server. - * Useful for testing or internal routing. - */ - fetch(request: Request | string): Response | Promise; - - /** - * Upgrade an HTTP request to a WebSocket connection. - * @returns true if upgrade successful, false if failed - */ - upgrade( - request: Request, - options?: { - headers?: Bun.HeadersInit; - data?: T; - }, - ): boolean; - - /** - * Publish a message to all WebSocket clients subscribed to a topic. - * @returns Bytes sent, 0 if dropped, -1 if backpressure applied - */ - publish( - topic: string, - data: string | ArrayBufferView | ArrayBuffer | SharedArrayBuffer, - compress?: boolean, - ): ServerWebSocketSendStatus; - - /** - * Get count of WebSocket clients subscribed to a topic. - */ - subscriberCount(topic: string): number; - - /** - * Get client IP address and port. - * @returns null for closed requests or Unix sockets - */ - requestIP(request: Request): SocketAddress | null; - - /** - * Set custom idle timeout for a request. - * @param seconds Timeout in seconds, 0 to disable - */ - timeout(request: Request, seconds: number): void; - - /** - * Keep process alive while server is running. - */ - ref(): void; - - /** - * Allow process to exit if server is only thing running. - */ - unref(): void; - - /** Number of in-flight HTTP requests */ - readonly pendingRequests: number; - - /** Number of active WebSocket connections */ - readonly pendingWebSockets: number; - - /** Server URL including protocol, hostname and port */ - readonly url: URL; - - /** Port server is listening on */ - readonly port: number; - - /** Hostname server is bound to */ - readonly hostname: string; - - /** Whether server is in development mode */ - readonly development: boolean; - - /** Server instance identifier */ - readonly id: string; -} - -interface WebSocketHandler { - /** Maximum WebSocket message size in bytes */ - maxPayloadLength?: number; - - /** Bytes of queued messages before applying backpressure */ - backpressureLimit?: number; - - /** Whether to close connection when backpressure limit hit */ - closeOnBackpressureLimit?: boolean; - - /** Called when backpressure is relieved */ - drain?(ws: ServerWebSocket): void | Promise; - - /** Seconds before idle timeout */ - idleTimeout?: number; - - /** Enable per-message deflate compression */ - perMessageDeflate?: - | boolean - | { - compress?: WebSocketCompressor | boolean; - decompress?: WebSocketCompressor | boolean; - }; - - /** Send ping frames to keep connection alive */ - sendPings?: boolean; - - /** Whether server receives its own published messages */ - publishToSelf?: boolean; - - /** Called when connection opened */ - open?(ws: ServerWebSocket): void | Promise; - - /** Called when message received */ - message(ws: ServerWebSocket, message: string | Buffer): void | Promise; - - /** Called when connection closed */ - close?(ws: ServerWebSocket, code: number, reason: string): void | Promise; - - /** Called when ping frame received */ - ping?(ws: ServerWebSocket, data: Buffer): void | Promise; - - /** Called when pong frame received */ - pong?(ws: ServerWebSocket, data: Buffer): void | Promise; -} - -interface TLSOptions { - /** Certificate authority chain */ - ca?: string | Buffer | BunFile | Array; - - /** Server certificate */ - cert?: string | Buffer | BunFile | Array; - - /** Path to DH parameters file */ - dhParamsFile?: string; - - /** Private key */ - key?: string | Buffer | BunFile | Array; - - /** Reduce TLS memory usage */ - lowMemoryMode?: boolean; - - /** Private key passphrase */ - passphrase?: string; - - /** OpenSSL options flags */ - secureOptions?: number; - - /** Server name for SNI */ - serverName?: string; -} -``` diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/runtime/http/tls.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/runtime/http/tls.mdx deleted file mode 100644 index 55872d5..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/runtime/http/tls.mdx +++ /dev/null @@ -1,101 +0,0 @@ ---- -title: TLS -description: Enable TLS in Bun.serve ---- - -Bun supports TLS out of the box, powered by [BoringSSL](https://boringssl.googlesource.com/boringssl). Enable TLS by passing in a value for `key` and `cert`; both are required to enable TLS. - -```ts -Bun.serve({ - tls: { - key: Bun.file("./key.pem"), // [!code ++] - cert: Bun.file("./cert.pem"), // [!code ++] - }, -}); -``` - -The `key` and `cert` fields expect the _contents_ of your TLS key and certificate, _not a path to it_. This can be a string, `BunFile`, `TypedArray`, or `Buffer`. - -```ts -Bun.serve({ - tls: { - key: Bun.file("./key.pem"), // BunFile - key: fs.readFileSync("./key.pem"), // Buffer - key: fs.readFileSync("./key.pem", "utf8"), // string - key: [Bun.file("./key1.pem"), Bun.file("./key2.pem")], // array of above - }, -}); -``` - -### Passphrase - -If your private key is encrypted with a passphrase, provide a value for `passphrase` to decrypt it. - -```ts -Bun.serve({ - tls: { - key: Bun.file("./key.pem"), - cert: Bun.file("./cert.pem"), - passphrase: "my-secret-passphrase", // [!code ++] - }, -}); -``` - -### CA Certificates - -Optionally, you can override the trusted CA certificates by passing a value for `ca`. By default, the server will trust the list of well-known CAs curated by Mozilla. When `ca` is specified, the Mozilla list is overwritten. - -```ts -Bun.serve({ - tls: { - key: Bun.file("./key.pem"), // path to TLS key - cert: Bun.file("./cert.pem"), // path to TLS cert - ca: Bun.file("./ca.pem"), // path to root CA certificate // [!code ++] - }, -}); -``` - -### Diffie-Hellman - -To override Diffie-Hellman parameters: - -```ts -Bun.serve({ - tls: { - dhParamsFile: "/path/to/dhparams.pem", // path to Diffie Hellman parameters // [!code ++] - }, -}); -``` - ---- - -## Server name indication (SNI) - -To configure the server name indication (SNI) for the server, set the `serverName` field in the `tls` object. - -```ts -Bun.serve({ - tls: { - serverName: "my-server.com", // SNI // [!code ++] - }, -}); -``` - -To allow multiple server names, pass an array of objects to `tls`, each with a `serverName` field. - -```ts -Bun.serve({ - tls: [ - { - key: Bun.file("./key1.pem"), - cert: Bun.file("./cert1.pem"), - serverName: "my-server1.com", // [!code ++] - }, - { - key: Bun.file("./key2.pem"), - cert: Bun.file("./cert2.pem"), - serverName: "my-server2.com", // [!code ++] - }, - ], -}); -``` diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/runtime/http/websockets.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/runtime/http/websockets.mdx deleted file mode 100644 index 657da9f..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/runtime/http/websockets.mdx +++ /dev/null @@ -1,414 +0,0 @@ ---- -title: WebSockets -description: Server-side WebSockets in Bun ---- - -`Bun.serve()` supports server-side WebSockets, with on-the-fly compression, TLS support, and a Bun-native publish-subscribe API. - - - -**⚡️ 7x more throughput** - -Bun's WebSockets are fast. For a [simple chatroom](https://github.com/oven-sh/bun/tree/main/bench/websocket-server/README.md) on Linux x64, Bun can handle 7x more requests per second than Node.js + [`"ws"`](https://github.com/websockets/ws). - -| **Messages sent per second** | **Runtime** | **Clients** | -| ---------------------------- | ------------------------------ | ----------- | -| ~700,000 | (`Bun.serve`) Bun v0.2.1 (x64) | 16 | -| ~100,000 | (`ws`) Node v18.10.0 (x64) | 16 | - -Internally Bun's WebSocket implementation is built on [uWebSockets](https://github.com/uNetworking/uWebSockets). - - - ---- - -## Start a WebSocket server - -Below is a simple WebSocket server built with `Bun.serve`, in which all incoming requests are [upgraded](https://developer.mozilla.org/en-US/docs/Web/HTTP/Protocol_upgrade_mechanism) to WebSocket connections in the `fetch` handler. The socket handlers are declared in the `websocket` parameter. - -```ts server.ts icon="/icons/typescript.svg" -Bun.serve({ - fetch(req, server) { - // upgrade the request to a WebSocket - if (server.upgrade(req)) { - return; // do not return a Response - } - return new Response("Upgrade failed", { status: 500 }); - }, - websocket: {}, // handlers -}); -``` - -The following WebSocket event handlers are supported: - -```ts server.ts icon="/icons/typescript.svg" -Bun.serve({ - fetch(req, server) {}, // upgrade logic - websocket: { - message(ws, message) {}, // a message is received - open(ws) {}, // a socket is opened - close(ws, code, message) {}, // a socket is closed - drain(ws) {}, // the socket is ready to receive more data - }, -}); -``` - - - -In Bun, handlers are declared once per server, instead of per socket. - -`ServerWebSocket` expects you to pass a `WebSocketHandler` object to the `Bun.serve()` method which has methods for `open`, `message`, `close`, `drain`, and `error`. This is different than the client-side `WebSocket` class which extends `EventTarget` (onmessage, onopen, onclose), - -Clients tend to not have many socket connections open so an event-based API makes sense. - -But servers tend to have **many** socket connections open, which means: - -- Time spent adding/removing event listeners for each connection adds up -- Extra memory spent on storing references to callbacks function for each connection -- Usually, people create new functions for each connection, which also means more memory - -So, instead of using an event-based API, `ServerWebSocket` expects you to pass a single object with methods for each event in `Bun.serve()` and it is reused for each connection. - -This leads to less memory usage and less time spent adding/removing event listeners. - - - -The first argument to each handler is the instance of `ServerWebSocket` handling the event. The `ServerWebSocket` class is a fast, Bun-native implementation of [`WebSocket`](https://developer.mozilla.org/en-US/docs/Web/API/WebSocket) with some additional features. - -```ts server.ts icon="/icons/typescript.svg" -Bun.serve({ - fetch(req, server) {}, // upgrade logic - websocket: { - message(ws, message) { - ws.send(message); // echo back the message - }, - }, -}); -``` - -### Sending messages - -Each `ServerWebSocket` instance has a `.send()` method for sending messages to the client. It supports a range of input types. - -```ts server.ts icon="/icons/typescript.svg" focus={4-6} -Bun.serve({ - fetch(req, server) {}, // upgrade logic - websocket: { - message(ws, message) { - ws.send("Hello world"); // string - ws.send(response.arrayBuffer()); // ArrayBuffer - ws.send(new Uint8Array([1, 2, 3])); // TypedArray | DataView - }, - }, -}); -``` - -### Headers - -Once the upgrade succeeds, Bun will send a `101 Switching Protocols` response per the [spec](https://developer.mozilla.org/en-US/docs/Web/HTTP/Protocol_upgrade_mechanism). Additional `headers` can be attached to this `Response` in the call to `server.upgrade()`. - -{/* prettier-ignore */} -```ts server.ts icon="/icons/typescript.svg" -Bun.serve({ - fetch(req, server) { - const sessionId = await generateSessionId(); - server.upgrade(req, { - headers: { // [!code ++] - "Set-Cookie": `SessionId=${sessionId}`, // [!code ++] - }, // [!code ++] - }); - }, - websocket: {}, // handlers -}); -``` - -### Contextual data - -Contextual `data` can be attached to a new WebSocket in the `.upgrade()` call. This data is made available on the `ws.data` property inside the WebSocket handlers. - -To strongly type `ws.data`, add a `data` property to the `websocket` handler object. This types `ws.data` across all lifecycle hooks. - -```ts server.ts icon="/icons/typescript.svg" -type WebSocketData = { - createdAt: number; - channelId: string; - authToken: string; -}; - -Bun.serve({ - fetch(req, server) { - const cookies = new Bun.CookieMap(req.headers.get("cookie")!); - - server.upgrade(req, { - // this object must conform to WebSocketData - data: { - createdAt: Date.now(), - channelId: new URL(req.url).searchParams.get("channelId"), - authToken: cookies.get("X-Token"), - }, - }); - - return undefined; - }, - websocket: { - // TypeScript: specify the type of ws.data like this - data: {} as WebSocketData, - // handler called when a message is received - async message(ws, message) { - // ws.data is now properly typed as WebSocketData - const user = getUserFromToken(ws.data.authToken); - - await saveMessageToDatabase({ - channel: ws.data.channelId, - message: String(message), - userId: user.id, - }); - }, - }, -}); -``` - - -**Note:** Previously, you could specify the type of `ws.data` using a type parameter on `Bun.serve`, like `Bun.serve({...})`. This pattern was removed due to [a limitation in TypeScript](https://github.com/microsoft/TypeScript/issues/26242) in favor of the `data` property shown above. - - -To connect to this server from the browser, create a new `WebSocket`. - -```js browser.js icon="file-code" -const socket = new WebSocket("ws://localhost:3000/chat"); - -socket.addEventListener("message", event => { - console.log(event.data); -}); -``` - - -**Identifying users** - -The cookies that are currently set on the page will be sent with the WebSocket upgrade request and available on `req.headers` in the `fetch` handler. Parse these cookies to determine the identity of the connecting user and set the value of `data` accordingly. - - - -### Pub/Sub - -Bun's `ServerWebSocket` implementation implements a native publish-subscribe API for topic-based broadcasting. Individual sockets can `.subscribe()` to a topic (specified with a string identifier) and `.publish()` messages to all other subscribers to that topic (excluding itself). This topic-based broadcast API is similar to [MQTT](https://en.wikipedia.org/wiki/MQTT) and [Redis Pub/Sub](https://redis.io/topics/pubsub). - -```ts server.ts icon="/icons/typescript.svg" -const server = Bun.serve({ - fetch(req, server) { - const url = new URL(req.url); - if (url.pathname === "/chat") { - console.log(`upgrade!`); - const username = getUsernameFromReq(req); - const success = server.upgrade(req, { data: { username } }); - return success ? undefined : new Response("WebSocket upgrade error", { status: 400 }); - } - - return new Response("Hello world"); - }, - websocket: { - // TypeScript: specify the type of ws.data like this - data: {} as { username: string }, - open(ws) { - const msg = `${ws.data.username} has entered the chat`; - ws.subscribe("the-group-chat"); - server.publish("the-group-chat", msg); - }, - message(ws, message) { - // this is a group chat - // so the server re-broadcasts incoming message to everyone - server.publish("the-group-chat", `${ws.data.username}: ${message}`); - - // inspect current subscriptions - console.log(ws.subscriptions); // ["the-group-chat"] - }, - close(ws) { - const msg = `${ws.data.username} has left the chat`; - ws.unsubscribe("the-group-chat"); - server.publish("the-group-chat", msg); - }, - }, -}); - -console.log(`Listening on ${server.hostname}:${server.port}`); -``` - -Calling `.publish(data)` will send the message to all subscribers of a topic _except_ the socket that called `.publish()`. To send a message to all subscribers of a topic, use the `.publish()` method on the `Server` instance. - -```ts -const server = Bun.serve({ - websocket: { - // ... - }, -}); - -// listen for some external event -server.publish("the-group-chat", "Hello world"); -``` - -### Compression - -Per-message [compression](https://websockets.readthedocs.io/en/stable/topics/compression.html) can be enabled with the `perMessageDeflate` parameter. - -```ts server.ts icon="/icons/typescript.svg" -Bun.serve({ - websocket: { - perMessageDeflate: true, // [!code ++] - }, -}); -``` - -Compression can be enabled for individual messages by passing a `boolean` as the second argument to `.send()`. - -```ts -ws.send("Hello world", true); -``` - -For fine-grained control over compression characteristics, refer to the [Reference](#reference). - -### Backpressure - -The `.send(message)` method of `ServerWebSocket` returns a `number` indicating the result of the operation. - -- `-1` — The message was enqueued but there is backpressure -- `0` — The message was dropped due to a connection issue -- `1+` — The number of bytes sent - -This gives you better control over backpressure in your server. - -### Timeouts and limits - -By default, Bun will close a WebSocket connection if it is idle for 120 seconds. This can be configured with the `idleTimeout` parameter. - -```ts -Bun.serve({ - fetch(req, server) {}, // upgrade logic - websocket: { - idleTimeout: 60, // 60 seconds // [!code ++] - }, -}); -``` - -Bun will also close a WebSocket connection if it receives a message that is larger than 16 MB. This can be configured with the `maxPayloadLength` parameter. - -```ts -Bun.serve({ - fetch(req, server) {}, // upgrade logic - websocket: { - maxPayloadLength: 1024 * 1024, // 1 MB // [!code ++] - }, -}); -``` - ---- - -## Connect to a `Websocket` server - -Bun implements the `WebSocket` class. To create a WebSocket client that connects to a `ws://` or `wss://` server, create an instance of `WebSocket`, as you would in the browser. - -```ts -const socket = new WebSocket("ws://localhost:3000"); - -// With subprotocol negotiation -const socket2 = new WebSocket("ws://localhost:3000", ["soap", "wamp"]); -``` - -In browsers, the cookies that are currently set on the page will be sent with the WebSocket upgrade request. This is a standard feature of the `WebSocket` API. - -For convenience, Bun lets you setting custom headers directly in the constructor. This is a Bun-specific extension of the `WebSocket` standard. _This will not work in browsers._ - -```ts -const socket = new WebSocket("ws://localhost:3000", { - headers: { - /* custom headers */ - }, // [!code ++] -}); -``` - -To add event listeners to the socket: - -```ts -// message is received -socket.addEventListener("message", event => {}); - -// socket opened -socket.addEventListener("open", event => {}); - -// socket closed -socket.addEventListener("close", event => {}); - -// error handler -socket.addEventListener("error", event => {}); -``` - ---- - -## Reference - -```ts See Typescript Definitions expandable -namespace Bun { - export function serve(params: { - fetch: (req: Request, server: Server) => Response | Promise; - websocket?: { - message: (ws: ServerWebSocket, message: string | ArrayBuffer | Uint8Array) => void; - open?: (ws: ServerWebSocket) => void; - close?: (ws: ServerWebSocket, code: number, reason: string) => void; - error?: (ws: ServerWebSocket, error: Error) => void; - drain?: (ws: ServerWebSocket) => void; - - maxPayloadLength?: number; // default: 16 * 1024 * 1024 = 16 MB - idleTimeout?: number; // default: 120 (seconds) - backpressureLimit?: number; // default: 1024 * 1024 = 1 MB - closeOnBackpressureLimit?: boolean; // default: false - sendPings?: boolean; // default: true - publishToSelf?: boolean; // default: false - - perMessageDeflate?: - | boolean - | { - compress?: boolean | Compressor; - decompress?: boolean | Compressor; - }; - }; - }): Server; -} - -type Compressor = - | `"disable"` - | `"shared"` - | `"dedicated"` - | `"3KB"` - | `"4KB"` - | `"8KB"` - | `"16KB"` - | `"32KB"` - | `"64KB"` - | `"128KB"` - | `"256KB"`; - -interface Server { - pendingWebSockets: number; - publish(topic: string, data: string | ArrayBufferView | ArrayBuffer, compress?: boolean): number; - upgrade( - req: Request, - options?: { - headers?: HeadersInit; - data?: any; - }, - ): boolean; -} - -interface ServerWebSocket { - readonly data: any; - readonly readyState: number; - readonly remoteAddress: string; - readonly subscriptions: string[]; - send(message: string | ArrayBuffer | Uint8Array, compress?: boolean): number; - close(code?: number, reason?: string): void; - subscribe(topic: string): void; - unsubscribe(topic: string): void; - publish(topic: string, message: string | ArrayBuffer | Uint8Array): void; - isSubscribed(topic: string): boolean; - cork(cb: (ws: ServerWebSocket) => void): void; -} -``` diff --git a/PBandGraphScaffold/node_modules/bun-types/docs/runtime/index.mdx b/PBandGraphScaffold/node_modules/bun-types/docs/runtime/index.mdx deleted file mode 100644 index c3c323b..0000000 --- a/PBandGraphScaffold/node_modules/bun-types/docs/runtime/index.mdx +++ /dev/null @@ -1,223 +0,0 @@ ---- -title: Bun Runtime -description: Execute JavaScript/TypeScript files, package.json scripts, and executable packages with Bun's fast runtime. ---- - -import Run from "/snippets/cli/run.mdx"; - -The Bun Runtime is designed to start fast and run fast. - -Under the hood, Bun uses the [JavaScriptCore engine](https://developer.apple.com/documentation/javascriptcore), which is developed by Apple for Safari. In most cases, the startup and running performance is faster than V8, the engine used by Node.js and Chromium-based browsers. Its transpiler and runtime are written in Zig, a modern, high-performance language. On Linux, this translates into startup times [4x faster](https://twitter.com/jarredsumner/status/1499225725492076544) than Node.js. - -| Command | Time | -| --------------- | -------- | -| `bun hello.js` | `5.2ms` | -| `node hello.js` | `25.1ms` | - -This benchmark is based on running a simple Hello World script on Linux - -## Run a file - -Use `bun run` to execute a source file. - -```bash terminal icon="terminal" -bun run index.js -``` - -Bun supports TypeScript and JSX out of the box. Every file is transpiled on the fly by Bun's fast native transpiler before being executed. - -```bash terminal icon="terminal" -bun run index.js -bun run index.jsx -bun run index.ts -bun run index.tsx -``` - -Alternatively, you can omit the `run` keyword and use the "naked" command; it behaves identically. - -```bash terminal icon="terminal" -bun index.tsx -bun index.js -``` - -### `--watch` - -To run a file in watch mode, use the `--watch` flag. - -```bash terminal icon="terminal" -bun --watch run index.tsx -``` - - -When using `bun run`, put Bun flags like `--watch` immediately after `bun`. - -```bash -bun --watch run dev # ✔️ do this -bun run dev --watch # ❌ don't do this -``` - -Flags that occur at the end of the command will be ignored and passed through to the `"dev"` script itself. - - - -## Run a `package.json` script - - -Compare to `npm run `; - if (buffer) { - buffer[0] = `${appendStyleScript}${buffer[0]}`; - return; - } - return Promise.resolve(appendStyleScript); - }; - const addClassNameToContext = ({ context }) => { - if (!contextMap.has(context)) { - contextMap.set(context, [{}, {}]); - } - const [toAdd, added] = contextMap.get(context); - let allAdded = true; - if (!added[cssClassName[import_common.SELECTOR]]) { - allAdded = false; - toAdd[cssClassName[import_common.SELECTOR]] = cssClassName[import_common.STYLE_STRING]; - } - cssClassName[import_common.SELECTORS].forEach( - ({ [import_common.CLASS_NAME]: className2, [import_common.STYLE_STRING]: styleString }) => { - if (!added[className2]) { - allAdded = false; - toAdd[className2] = styleString; - } - } - ); - if (allAdded) { - return; - } - return Promise.resolve((0, import_html.raw)("", [appendStyle])); - }; - const className = new String(cssClassName[import_common.CLASS_NAME]); - Object.assign(className, cssClassName); - className.isEscaped = true; - className.callbacks = [addClassNameToContext]; - const promise = Promise.resolve(className); - Object.assign(promise, cssClassName); - promise.toString = cssJsxDomObject.toString; - return promise; - }; - const css2 = (strings, ...values) => { - return newCssClassNameObject((0, import_common.cssCommon)(strings, values)); - }; - const cx2 = (...args) => { - args = (0, import_common.cxCommon)(args); - return css2(Array(args.length).fill(""), ...args); - }; - const keyframes2 = import_common.keyframesCommon; - const viewTransition2 = ((strings, ...values) => { - return newCssClassNameObject((0, import_common.viewTransitionCommon)(strings, values)); - }); - const Style2 = ({ children, nonce } = {}) => (0, import_html.raw)( - ``, - [ - ({ context }) => { - nonceMap.set(context, nonce); - return void 0; - } - ] - ); - Style2[import_constants.DOM_RENDERER] = StyleRenderToDom; - return { - css: css2, - cx: cx2, - keyframes: keyframes2, - viewTransition: viewTransition2, - Style: Style2 - }; -}; -const defaultContext = createCssContext({ - id: import_common.DEFAULT_STYLE_ID -}); -const css = defaultContext.css; -const cx = defaultContext.cx; -const keyframes = defaultContext.keyframes; -const viewTransition = defaultContext.viewTransition; -const Style = defaultContext.Style; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - Style, - createCssContext, - css, - cx, - keyframes, - rawCssString, - viewTransition -}); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/helper/dev/index.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/helper/dev/index.js deleted file mode 100644 index 4e22ded..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/helper/dev/index.js +++ /dev/null @@ -1,80 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var dev_exports = {}; -__export(dev_exports, { - getRouterName: () => getRouterName, - inspectRoutes: () => inspectRoutes, - showRoutes: () => showRoutes -}); -module.exports = __toCommonJS(dev_exports); -var import_color = require("../../utils/color"); -var import_handler = require("../../utils/handler"); -const handlerName = (handler) => { - return handler.name || ((0, import_handler.isMiddleware)(handler) ? "[middleware]" : "[handler]"); -}; -const inspectRoutes = (hono) => { - return hono.routes.map(({ path, method, handler }) => { - const targetHandler = (0, import_handler.findTargetHandler)(handler); - return { - path, - method, - name: handlerName(targetHandler), - isMiddleware: (0, import_handler.isMiddleware)(targetHandler) - }; - }); -}; -const showRoutes = (hono, opts) => { - const colorEnabled = opts?.colorize ?? (0, import_color.getColorEnabled)(); - const routeData = {}; - let maxMethodLength = 0; - let maxPathLength = 0; - inspectRoutes(hono).filter(({ isMiddleware: isMiddleware2 }) => opts?.verbose || !isMiddleware2).map((route) => { - const key = `${route.method}-${route.path}`; - (routeData[key] ||= []).push(route); - if (routeData[key].length > 1) { - return; - } - maxMethodLength = Math.max(maxMethodLength, route.method.length); - maxPathLength = Math.max(maxPathLength, route.path.length); - return { method: route.method, path: route.path, routes: routeData[key] }; - }).forEach((data) => { - if (!data) { - return; - } - const { method, path, routes } = data; - const methodStr = colorEnabled ? `\x1B[32m${method}\x1B[0m` : method; - console.log(`${methodStr} ${" ".repeat(maxMethodLength - method.length)} ${path}`); - if (!opts?.verbose) { - return; - } - routes.forEach(({ name }) => { - console.log(`${" ".repeat(maxMethodLength + 3)} ${name}`); - }); - }); -}; -const getRouterName = (app) => { - app.router.match("GET", "/"); - return app.router.name; -}; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - getRouterName, - inspectRoutes, - showRoutes -}); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/helper/factory/index.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/helper/factory/index.js deleted file mode 100644 index 0e14635..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/helper/factory/index.js +++ /dev/null @@ -1,55 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var factory_exports = {}; -__export(factory_exports, { - Factory: () => Factory, - createFactory: () => createFactory, - createMiddleware: () => createMiddleware -}); -module.exports = __toCommonJS(factory_exports); -var import_hono = require("../../hono"); -class Factory { - initApp; - #defaultAppOptions; - constructor(init) { - this.initApp = init?.initApp; - this.#defaultAppOptions = init?.defaultAppOptions; - } - createApp = (options) => { - const app = new import_hono.Hono( - options && this.#defaultAppOptions ? { ...this.#defaultAppOptions, ...options } : options ?? this.#defaultAppOptions - ); - if (this.initApp) { - this.initApp(app); - } - return app; - }; - createMiddleware = (middleware) => middleware; - createHandlers = (...handlers) => { - return handlers.filter((handler) => handler !== void 0); - }; -} -const createFactory = (init) => new Factory(init); -const createMiddleware = (middleware) => middleware; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - Factory, - createFactory, - createMiddleware -}); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/helper/html/index.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/helper/html/index.js deleted file mode 100644 index faa3baa..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/helper/html/index.js +++ /dev/null @@ -1,65 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var html_exports = {}; -__export(html_exports, { - html: () => html, - raw: () => import_html.raw -}); -module.exports = __toCommonJS(html_exports); -var import_html = require("../../utils/html"); -const html = (strings, ...values) => { - const buffer = [""]; - for (let i = 0, len = strings.length - 1; i < len; i++) { - buffer[0] += strings[i]; - const children = Array.isArray(values[i]) ? values[i].flat(Infinity) : [values[i]]; - for (let i2 = 0, len2 = children.length; i2 < len2; i2++) { - const child = children[i2]; - if (typeof child === "string") { - (0, import_html.escapeToBuffer)(child, buffer); - } else if (typeof child === "number") { - ; - buffer[0] += child; - } else if (typeof child === "boolean" || child === null || child === void 0) { - continue; - } else if (typeof child === "object" && child.isEscaped) { - if (child.callbacks) { - buffer.unshift("", child); - } else { - const tmp = child.toString(); - if (tmp instanceof Promise) { - buffer.unshift("", tmp); - } else { - buffer[0] += tmp; - } - } - } else if (child instanceof Promise) { - buffer.unshift("", child); - } else { - (0, import_html.escapeToBuffer)(child.toString(), buffer); - } - } - } - buffer[0] += strings.at(-1); - return buffer.length === 1 ? "callbacks" in buffer ? (0, import_html.raw)((0, import_html.resolveCallbackSync)((0, import_html.raw)(buffer[0], buffer.callbacks))) : (0, import_html.raw)(buffer[0]) : (0, import_html.stringBufferToString)(buffer, buffer.callbacks); -}; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - html, - raw -}); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/helper/proxy/index.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/helper/proxy/index.js deleted file mode 100644 index 2c74f17..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/helper/proxy/index.js +++ /dev/null @@ -1,112 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var proxy_exports = {}; -__export(proxy_exports, { - proxy: () => proxy -}); -module.exports = __toCommonJS(proxy_exports); -var import_http_exception = require("../../http-exception"); -const hopByHopHeaders = [ - "connection", - "keep-alive", - "proxy-authenticate", - "proxy-authorization", - "te", - "trailer", - "transfer-encoding", - "upgrade" -]; -const ALLOWED_TOKEN_PATTERN = /^[!#$%&'*+\-.0-9A-Z^_`a-z|~]+$/; -const buildRequestInitFromRequest = (request, strictConnectionProcessing) => { - if (!request) { - return {}; - } - const headers = new Headers(request.headers); - if (strictConnectionProcessing) { - const connectionValue = headers.get("connection"); - if (connectionValue) { - const headerNames = connectionValue.split(",").map((h) => h.trim()); - const invalidHeaders = headerNames.filter((h) => !ALLOWED_TOKEN_PATTERN.test(h)); - if (invalidHeaders.length > 0) { - throw new import_http_exception.HTTPException(400, { - message: `Invalid Connection header value: ${invalidHeaders.join(", ")}` - }); - } - headerNames.forEach((headerName) => { - headers.delete(headerName); - }); - } - } - hopByHopHeaders.forEach((header) => { - headers.delete(header); - }); - return { - method: request.method, - body: request.body, - duplex: request.body ? "half" : void 0, - headers, - signal: request.signal - }; -}; -const preprocessRequestInit = (requestInit) => { - if (!requestInit.headers || Array.isArray(requestInit.headers) || requestInit.headers instanceof Headers) { - return requestInit; - } - const headers = new Headers(); - for (const [key, value] of Object.entries(requestInit.headers)) { - if (value == null) { - headers.delete(key); - } else { - headers.set(key, value); - } - } - requestInit.headers = headers; - return requestInit; -}; -const proxy = async (input, proxyInit) => { - const { - raw, - customFetch, - strictConnectionProcessing = false, - ...requestInit - } = proxyInit instanceof Request ? { raw: proxyInit } : proxyInit ?? {}; - const req = new Request(input, { - ...buildRequestInitFromRequest(raw, strictConnectionProcessing), - ...preprocessRequestInit(requestInit) - }); - req.headers.delete("accept-encoding"); - const res = await (customFetch || fetch)(req); - const resHeaders = new Headers(res.headers); - hopByHopHeaders.forEach((header) => { - resHeaders.delete(header); - }); - if (resHeaders.has("content-encoding")) { - resHeaders.delete("content-encoding"); - resHeaders.delete("content-length"); - } - return new Response(res.body, { - status: res.status, - statusText: res.statusText, - headers: resHeaders - }); -}; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - proxy -}); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/helper/route/index.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/helper/route/index.js deleted file mode 100644 index 95769db..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/helper/route/index.js +++ /dev/null @@ -1,72 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var route_exports = {}; -__export(route_exports, { - basePath: () => basePath, - baseRoutePath: () => baseRoutePath, - matchedRoutes: () => matchedRoutes, - routePath: () => routePath -}); -module.exports = __toCommonJS(route_exports); -var import_constants = require("../../request/constants"); -var import_url = require("../../utils/url"); -const matchedRoutes = (c) => ( - // @ts-expect-error c.req[GET_MATCH_RESULT] is not typed - c.req[import_constants.GET_MATCH_RESULT][0].map(([[, route]]) => route) -); -const routePath = (c, index) => matchedRoutes(c).at(index ?? c.req.routeIndex)?.path ?? ""; -const baseRoutePath = (c, index) => matchedRoutes(c).at(index ?? c.req.routeIndex)?.basePath ?? ""; -const basePathCacheMap = /* @__PURE__ */ new WeakMap(); -const basePath = (c, index) => { - index ??= c.req.routeIndex; - const cache = basePathCacheMap.get(c) || []; - if (typeof cache[index] === "string") { - return cache[index]; - } - let result; - const rp = baseRoutePath(c, index); - if (!/[:*]/.test(rp)) { - result = rp; - } else { - const paths = (0, import_url.splitRoutingPath)(rp); - const reqPath = c.req.path; - let basePathLength = 0; - for (let i = 0, len = paths.length; i < len; i++) { - const pattern = (0, import_url.getPattern)(paths[i], paths[i + 1]); - if (pattern) { - const re = pattern[2] === true || pattern === "*" ? /[^\/]+/ : pattern[2]; - basePathLength += reqPath.substring(basePathLength + 1).match(re)?.[0].length || 0; - } else { - basePathLength += paths[i].length; - } - basePathLength += 1; - } - result = reqPath.substring(0, basePathLength); - } - cache[index] = result; - basePathCacheMap.set(c, cache); - return result; -}; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - basePath, - baseRoutePath, - matchedRoutes, - routePath -}); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/helper/ssg/index.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/helper/ssg/index.js deleted file mode 100644 index 4969d06..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/helper/ssg/index.js +++ /dev/null @@ -1,39 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default")); -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var ssg_exports = {}; -__export(ssg_exports, { - X_HONO_DISABLE_SSG_HEADER_KEY: () => import_middleware.X_HONO_DISABLE_SSG_HEADER_KEY, - disableSSG: () => import_middleware.disableSSG, - isSSGContext: () => import_middleware.isSSGContext, - onlySSG: () => import_middleware.onlySSG, - ssgParams: () => import_middleware.ssgParams -}); -module.exports = __toCommonJS(ssg_exports); -__reExport(ssg_exports, require("./ssg"), module.exports); -var import_middleware = require("./middleware"); -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - X_HONO_DISABLE_SSG_HEADER_KEY, - disableSSG, - isSSGContext, - onlySSG, - ssgParams, - ...require("./ssg") -}); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/helper/ssg/middleware.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/helper/ssg/middleware.js deleted file mode 100644 index fcab031..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/helper/ssg/middleware.js +++ /dev/null @@ -1,74 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var middleware_exports = {}; -__export(middleware_exports, { - SSG_CONTEXT: () => SSG_CONTEXT, - SSG_DISABLED_RESPONSE: () => SSG_DISABLED_RESPONSE, - X_HONO_DISABLE_SSG_HEADER_KEY: () => X_HONO_DISABLE_SSG_HEADER_KEY, - disableSSG: () => disableSSG, - isSSGContext: () => isSSGContext, - onlySSG: () => onlySSG, - ssgParams: () => ssgParams -}); -module.exports = __toCommonJS(middleware_exports); -var import_utils = require("./utils"); -const SSG_CONTEXT = "HONO_SSG_CONTEXT"; -const X_HONO_DISABLE_SSG_HEADER_KEY = "x-hono-disable-ssg"; -const SSG_DISABLED_RESPONSE = (() => { - try { - return new Response("SSG is disabled", { - status: 404, - headers: { [X_HONO_DISABLE_SSG_HEADER_KEY]: "true" } - }); - } catch { - return null; - } -})(); -const ssgParams = (params) => async (c, next) => { - if ((0, import_utils.isDynamicRoute)(c.req.path)) { - ; - c.req.raw.ssgParams = Array.isArray(params) ? params : await params(c); - return c.notFound(); - } - await next(); -}; -const isSSGContext = (c) => !!c.env?.[SSG_CONTEXT]; -const disableSSG = () => async function disableSSG2(c, next) { - if (isSSGContext(c)) { - c.header(X_HONO_DISABLE_SSG_HEADER_KEY, "true"); - return c.notFound(); - } - await next(); -}; -const onlySSG = () => async function onlySSG2(c, next) { - if (!isSSGContext(c)) { - return c.notFound(); - } - await next(); -}; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - SSG_CONTEXT, - SSG_DISABLED_RESPONSE, - X_HONO_DISABLE_SSG_HEADER_KEY, - disableSSG, - isSSGContext, - onlySSG, - ssgParams -}); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/helper/ssg/ssg.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/helper/ssg/ssg.js deleted file mode 100644 index 0a4493a..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/helper/ssg/ssg.js +++ /dev/null @@ -1,326 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var ssg_exports = {}; -__export(ssg_exports, { - DEFAULT_OUTPUT_DIR: () => DEFAULT_OUTPUT_DIR, - combineAfterGenerateHooks: () => combineAfterGenerateHooks, - combineAfterResponseHooks: () => combineAfterResponseHooks, - combineBeforeRequestHooks: () => combineBeforeRequestHooks, - defaultExtensionMap: () => defaultExtensionMap, - defaultPlugin: () => defaultPlugin, - fetchRoutesContent: () => fetchRoutesContent, - saveContentToFile: () => saveContentToFile, - toSSG: () => toSSG -}); -module.exports = __toCommonJS(ssg_exports); -var import_utils = require("../../client/utils"); -var import_concurrent = require("../../utils/concurrent"); -var import_mime = require("../../utils/mime"); -var import_middleware = require("./middleware"); -var import_utils2 = require("./utils"); -const DEFAULT_CONCURRENCY = 2; -const DEFAULT_CONTENT_TYPE = "text/plain"; -const DEFAULT_OUTPUT_DIR = "./static"; -const generateFilePath = (routePath, outDir, mimeType, extensionMap) => { - const extension = determineExtension(mimeType, extensionMap); - if (routePath.endsWith(`.${extension}`)) { - return (0, import_utils2.joinPaths)(outDir, routePath); - } - if (routePath === "/") { - return (0, import_utils2.joinPaths)(outDir, `index.${extension}`); - } - if (routePath.endsWith("/")) { - return (0, import_utils2.joinPaths)(outDir, routePath, `index.${extension}`); - } - return (0, import_utils2.joinPaths)(outDir, `${routePath}.${extension}`); -}; -const parseResponseContent = async (response) => { - const contentType = response.headers.get("Content-Type"); - try { - if (contentType?.includes("text") || contentType?.includes("json")) { - return await response.text(); - } else { - return await response.arrayBuffer(); - } - } catch (error) { - throw new Error( - `Error processing response: ${error instanceof Error ? error.message : "Unknown error"}` - ); - } -}; -const defaultExtensionMap = { - "text/html": "html", - "text/xml": "xml", - "application/xml": "xml", - "application/yaml": "yaml" -}; -const determineExtension = (mimeType, userExtensionMap) => { - const extensionMap = userExtensionMap || defaultExtensionMap; - if (mimeType in extensionMap) { - return extensionMap[mimeType]; - } - return (0, import_mime.getExtension)(mimeType) || "html"; -}; -const combineBeforeRequestHooks = (hooks) => { - if (!Array.isArray(hooks)) { - return hooks; - } - return async (req) => { - let currentReq = req; - for (const hook of hooks) { - const result = await hook(currentReq); - if (result === false) { - return false; - } - if (result instanceof Request) { - currentReq = result; - } - } - return currentReq; - }; -}; -const combineAfterResponseHooks = (hooks) => { - if (!Array.isArray(hooks)) { - return hooks; - } - return async (res) => { - let currentRes = res; - for (const hook of hooks) { - const result = await hook(currentRes); - if (result === false) { - return false; - } - if (result instanceof Response) { - currentRes = result; - } - } - return currentRes; - }; -}; -const combineAfterGenerateHooks = (hooks, fsModule, options) => { - if (!Array.isArray(hooks)) { - return hooks; - } - return async (result) => { - for (const hook of hooks) { - await hook(result, fsModule, options); - } - }; -}; -const fetchRoutesContent = function* (app, beforeRequestHook, afterResponseHook, concurrency) { - const baseURL = "http://localhost"; - const pool = (0, import_concurrent.createPool)({ concurrency }); - for (const route of (0, import_utils2.filterStaticGenerateRoutes)(app)) { - const thisRouteBaseURL = new URL(route.path, baseURL).toString(); - let forGetInfoURLRequest = new Request(thisRouteBaseURL); - yield new Promise(async (resolveGetInfo, rejectGetInfo) => { - try { - if (beforeRequestHook) { - const maybeRequest = await beforeRequestHook(forGetInfoURLRequest); - if (!maybeRequest) { - resolveGetInfo(void 0); - return; - } - forGetInfoURLRequest = maybeRequest; - } - await pool.run(() => app.fetch(forGetInfoURLRequest)); - if (!forGetInfoURLRequest.ssgParams) { - if ((0, import_utils2.isDynamicRoute)(route.path)) { - resolveGetInfo(void 0); - return; - } - forGetInfoURLRequest.ssgParams = [{}]; - } - const requestInit = { - method: forGetInfoURLRequest.method, - headers: forGetInfoURLRequest.headers - }; - resolveGetInfo( - (function* () { - for (const param of forGetInfoURLRequest.ssgParams) { - yield new Promise(async (resolveReq, rejectReq) => { - try { - const replacedUrlParam = (0, import_utils.replaceUrlParam)(route.path, param); - let response = await pool.run( - () => app.request(replacedUrlParam, requestInit, { - [import_middleware.SSG_CONTEXT]: true - }) - ); - if (response.headers.get(import_middleware.X_HONO_DISABLE_SSG_HEADER_KEY)) { - resolveReq(void 0); - return; - } - if (afterResponseHook) { - const maybeResponse = await afterResponseHook(response); - if (!maybeResponse) { - resolveReq(void 0); - return; - } - response = maybeResponse; - } - const mimeType = response.headers.get("Content-Type")?.split(";")[0] || DEFAULT_CONTENT_TYPE; - const content = await parseResponseContent(response); - resolveReq({ - routePath: replacedUrlParam, - mimeType, - content - }); - } catch (error) { - rejectReq(error); - } - }); - } - })() - ); - } catch (error) { - rejectGetInfo(error); - } - }); - } -}; -const createdDirs = /* @__PURE__ */ new Set(); -const saveContentToFile = async (data, fsModule, outDir, extensionMap) => { - const awaitedData = await data; - if (!awaitedData) { - return; - } - const { routePath, content, mimeType } = awaitedData; - const filePath = generateFilePath(routePath, outDir, mimeType, extensionMap); - const dirPath = (0, import_utils2.dirname)(filePath); - if (!createdDirs.has(dirPath)) { - await fsModule.mkdir(dirPath, { recursive: true }); - createdDirs.add(dirPath); - } - if (typeof content === "string") { - await fsModule.writeFile(filePath, content); - } else if (content instanceof ArrayBuffer) { - await fsModule.writeFile(filePath, new Uint8Array(content)); - } - return filePath; -}; -const defaultPlugin = { - afterResponseHook: (res) => { - if (res.status !== 200) { - return false; - } - return res; - } -}; -const toSSG = async (app, fs, options) => { - let result; - const getInfoPromises = []; - const savePromises = []; - const plugins = options?.plugins || [defaultPlugin]; - const beforeRequestHooks = []; - const afterResponseHooks = []; - const afterGenerateHooks = []; - if (options?.beforeRequestHook) { - beforeRequestHooks.push( - ...Array.isArray(options.beforeRequestHook) ? options.beforeRequestHook : [options.beforeRequestHook] - ); - } - if (options?.afterResponseHook) { - afterResponseHooks.push( - ...Array.isArray(options.afterResponseHook) ? options.afterResponseHook : [options.afterResponseHook] - ); - } - if (options?.afterGenerateHook) { - afterGenerateHooks.push( - ...Array.isArray(options.afterGenerateHook) ? options.afterGenerateHook : [options.afterGenerateHook] - ); - } - for (const plugin of plugins) { - if (plugin.beforeRequestHook) { - beforeRequestHooks.push( - ...Array.isArray(plugin.beforeRequestHook) ? plugin.beforeRequestHook : [plugin.beforeRequestHook] - ); - } - if (plugin.afterResponseHook) { - afterResponseHooks.push( - ...Array.isArray(plugin.afterResponseHook) ? plugin.afterResponseHook : [plugin.afterResponseHook] - ); - } - if (plugin.afterGenerateHook) { - afterGenerateHooks.push( - ...Array.isArray(plugin.afterGenerateHook) ? plugin.afterGenerateHook : [plugin.afterGenerateHook] - ); - } - } - try { - const outputDir = options?.dir ?? DEFAULT_OUTPUT_DIR; - const concurrency = options?.concurrency ?? DEFAULT_CONCURRENCY; - const combinedBeforeRequestHook = combineBeforeRequestHooks( - beforeRequestHooks.length > 0 ? beforeRequestHooks : [(req) => req] - ); - const combinedAfterResponseHook = combineAfterResponseHooks( - afterResponseHooks.length > 0 ? afterResponseHooks : [(req) => req] - ); - const getInfoGen = fetchRoutesContent( - app, - combinedBeforeRequestHook, - combinedAfterResponseHook, - concurrency - ); - for (const getInfo of getInfoGen) { - getInfoPromises.push( - getInfo.then((getContentGen) => { - if (!getContentGen) { - return; - } - for (const content of getContentGen) { - savePromises.push( - saveContentToFile(content, fs, outputDir, options?.extensionMap).catch((e) => e) - ); - } - }) - ); - } - await Promise.all(getInfoPromises); - const files = []; - for (const savePromise of savePromises) { - const fileOrError = await savePromise; - if (typeof fileOrError === "string") { - files.push(fileOrError); - } else if (fileOrError) { - throw fileOrError; - } - } - result = { success: true, files }; - } catch (error) { - const errorObj = error instanceof Error ? error : new Error(String(error)); - result = { success: false, files: [], error: errorObj }; - } - if (afterGenerateHooks.length > 0) { - const combinedAfterGenerateHooks = combineAfterGenerateHooks(afterGenerateHooks, fs, options); - await combinedAfterGenerateHooks(result, fs, options); - } - return result; -}; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - DEFAULT_OUTPUT_DIR, - combineAfterGenerateHooks, - combineAfterResponseHooks, - combineBeforeRequestHooks, - defaultExtensionMap, - defaultPlugin, - fetchRoutesContent, - saveContentToFile, - toSSG -}); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/helper/ssg/utils.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/helper/ssg/utils.js deleted file mode 100644 index 8cb13af..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/helper/ssg/utils.js +++ /dev/null @@ -1,85 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var utils_exports = {}; -__export(utils_exports, { - dirname: () => dirname, - filterStaticGenerateRoutes: () => filterStaticGenerateRoutes, - isDynamicRoute: () => isDynamicRoute, - joinPaths: () => joinPaths -}); -module.exports = __toCommonJS(utils_exports); -var import_router = require("../../router"); -var import_handler = require("../../utils/handler"); -const dirname = (path) => { - const separatedPath = path.split(/[\/\\]/); - return separatedPath.slice(0, -1).join("/"); -}; -const normalizePath = (path) => { - return path.replace(/(\\)/g, "/").replace(/\/$/g, ""); -}; -const handleParent = (resultPaths, beforeParentFlag) => { - if (resultPaths.length === 0 || beforeParentFlag) { - resultPaths.push(".."); - } else { - resultPaths.pop(); - } -}; -const handleNonDot = (path, resultPaths) => { - path = path.replace(/^\.(?!.)/, ""); - if (path !== "") { - resultPaths.push(path); - } -}; -const handleSegments = (paths, resultPaths) => { - let beforeParentFlag = false; - for (const path of paths) { - if (path === "..") { - handleParent(resultPaths, beforeParentFlag); - beforeParentFlag = true; - } else { - handleNonDot(path, resultPaths); - beforeParentFlag = false; - } - } -}; -const joinPaths = (...paths) => { - paths = paths.map(normalizePath); - const resultPaths = []; - handleSegments(paths.join("/").split("/"), resultPaths); - return (paths[0][0] === "/" ? "/" : "") + resultPaths.join("/"); -}; -const filterStaticGenerateRoutes = (hono) => { - return hono.routes.reduce((acc, { method, handler, path }) => { - const targetHandler = (0, import_handler.findTargetHandler)(handler); - if (["GET", import_router.METHOD_NAME_ALL].includes(method) && !(0, import_handler.isMiddleware)(targetHandler)) { - acc.push({ path }); - } - return acc; - }, []); -}; -const isDynamicRoute = (path) => { - return path.split("/").some((segment) => segment.startsWith(":") || segment.includes("*")); -}; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - dirname, - filterStaticGenerateRoutes, - isDynamicRoute, - joinPaths -}); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/helper/streaming/index.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/helper/streaming/index.js deleted file mode 100644 index b343d99..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/helper/streaming/index.js +++ /dev/null @@ -1,36 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var streaming_exports = {}; -__export(streaming_exports, { - SSEStreamingApi: () => import_sse.SSEStreamingApi, - stream: () => import_stream.stream, - streamSSE: () => import_sse.streamSSE, - streamText: () => import_text.streamText -}); -module.exports = __toCommonJS(streaming_exports); -var import_stream = require("./stream"); -var import_sse = require("./sse"); -var import_text = require("./text"); -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - SSEStreamingApi, - stream, - streamSSE, - streamText -}); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/helper/streaming/sse.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/helper/streaming/sse.js deleted file mode 100644 index 95a7806..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/helper/streaming/sse.js +++ /dev/null @@ -1,86 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var sse_exports = {}; -__export(sse_exports, { - SSEStreamingApi: () => SSEStreamingApi, - streamSSE: () => streamSSE -}); -module.exports = __toCommonJS(sse_exports); -var import_html = require("../../utils/html"); -var import_stream = require("../../utils/stream"); -var import_utils = require("./utils"); -class SSEStreamingApi extends import_stream.StreamingApi { - constructor(writable, readable) { - super(writable, readable); - } - async writeSSE(message) { - const data = await (0, import_html.resolveCallback)(message.data, import_html.HtmlEscapedCallbackPhase.Stringify, false, {}); - const dataLines = data.split("\n").map((line) => { - return `data: ${line}`; - }).join("\n"); - const sseData = [ - message.event && `event: ${message.event}`, - dataLines, - message.id && `id: ${message.id}`, - message.retry && `retry: ${message.retry}` - ].filter(Boolean).join("\n") + "\n\n"; - await this.write(sseData); - } -} -const run = async (stream, cb, onError) => { - try { - await cb(stream); - } catch (e) { - if (e instanceof Error && onError) { - await onError(e, stream); - await stream.writeSSE({ - event: "error", - data: e.message - }); - } else { - console.error(e); - } - } finally { - stream.close(); - } -}; -const contextStash = /* @__PURE__ */ new WeakMap(); -const streamSSE = (c, cb, onError) => { - const { readable, writable } = new TransformStream(); - const stream = new SSEStreamingApi(writable, readable); - if ((0, import_utils.isOldBunVersion)()) { - c.req.raw.signal.addEventListener("abort", () => { - if (!stream.closed) { - stream.abort(); - } - }); - } - contextStash.set(stream.responseReadable, c); - c.header("Transfer-Encoding", "chunked"); - c.header("Content-Type", "text/event-stream"); - c.header("Cache-Control", "no-cache"); - c.header("Connection", "keep-alive"); - run(stream, cb, onError); - return c.newResponse(stream.responseReadable); -}; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - SSEStreamingApi, - streamSSE -}); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/helper/streaming/stream.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/helper/streaming/stream.js deleted file mode 100644 index 29d3dd8..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/helper/streaming/stream.js +++ /dev/null @@ -1,57 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var stream_exports = {}; -__export(stream_exports, { - stream: () => stream -}); -module.exports = __toCommonJS(stream_exports); -var import_stream = require("../../utils/stream"); -var import_utils = require("./utils"); -const contextStash = /* @__PURE__ */ new WeakMap(); -const stream = (c, cb, onError) => { - const { readable, writable } = new TransformStream(); - const stream2 = new import_stream.StreamingApi(writable, readable); - if ((0, import_utils.isOldBunVersion)()) { - c.req.raw.signal.addEventListener("abort", () => { - if (!stream2.closed) { - stream2.abort(); - } - }); - } - contextStash.set(stream2.responseReadable, c); - (async () => { - try { - await cb(stream2); - } catch (e) { - if (e === void 0) { - } else if (e instanceof Error && onError) { - await onError(e, stream2); - } else { - console.error(e); - } - } finally { - stream2.close(); - } - })(); - return c.newResponse(stream2.responseReadable); -}; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - stream -}); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/helper/streaming/text.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/helper/streaming/text.js deleted file mode 100644 index c4fba1d..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/helper/streaming/text.js +++ /dev/null @@ -1,35 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var text_exports = {}; -__export(text_exports, { - streamText: () => streamText -}); -module.exports = __toCommonJS(text_exports); -var import_context = require("../../context"); -var import__ = require("./"); -const streamText = (c, cb, onError) => { - c.header("Content-Type", import_context.TEXT_PLAIN); - c.header("X-Content-Type-Options", "nosniff"); - c.header("Transfer-Encoding", "chunked"); - return (0, import__.stream)(c, cb, onError); -}; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - streamText -}); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/helper/streaming/utils.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/helper/streaming/utils.js deleted file mode 100644 index ff818c1..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/helper/streaming/utils.js +++ /dev/null @@ -1,36 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var utils_exports = {}; -__export(utils_exports, { - isOldBunVersion: () => isOldBunVersion -}); -module.exports = __toCommonJS(utils_exports); -let isOldBunVersion = () => { - const version = typeof Bun !== "undefined" ? Bun.version : void 0; - if (version === void 0) { - return false; - } - const result = version.startsWith("1.1") || version.startsWith("1.0") || version.startsWith("0."); - isOldBunVersion = () => result; - return result; -}; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - isOldBunVersion -}); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/helper/testing/index.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/helper/testing/index.js deleted file mode 100644 index 6e9e432..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/helper/testing/index.js +++ /dev/null @@ -1,34 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var testing_exports = {}; -__export(testing_exports, { - testClient: () => testClient -}); -module.exports = __toCommonJS(testing_exports); -var import_client = require("../../client"); -const testClient = (app, Env, executionCtx, options) => { - const customFetch = (input, init) => { - return app.request(input, init, Env, executionCtx); - }; - return (0, import_client.hc)("http://localhost", { ...options, fetch: customFetch }); -}; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - testClient -}); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/helper/websocket/index.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/helper/websocket/index.js deleted file mode 100644 index ee33b65..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/helper/websocket/index.js +++ /dev/null @@ -1,82 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var websocket_exports = {}; -__export(websocket_exports, { - WSContext: () => WSContext, - createWSMessageEvent: () => createWSMessageEvent, - defineWebSocketHelper: () => defineWebSocketHelper -}); -module.exports = __toCommonJS(websocket_exports); -class WSContext { - #init; - constructor(init) { - this.#init = init; - this.raw = init.raw; - this.url = init.url ? new URL(init.url) : null; - this.protocol = init.protocol ?? null; - } - send(source, options) { - this.#init.send(source, options ?? {}); - } - raw; - binaryType = "arraybuffer"; - get readyState() { - return this.#init.readyState; - } - url; - protocol; - close(code, reason) { - this.#init.close(code, reason); - } -} -const createWSMessageEvent = (source) => { - return new MessageEvent("message", { - data: source - }); -}; -const defineWebSocketHelper = (handler) => { - return ((...args) => { - if (typeof args[0] === "function") { - const [createEvents, options] = args; - return async function upgradeWebSocket(c, next) { - const events = await createEvents(c); - const result = await handler(c, events, options); - if (result) { - return result; - } - await next(); - }; - } else { - const [c, events, options] = args; - return (async () => { - const upgraded = await handler(c, events, options); - if (!upgraded) { - throw new Error("Failed to upgrade WebSocket"); - } - return upgraded; - })(); - } - }); -}; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - WSContext, - createWSMessageEvent, - defineWebSocketHelper -}); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/hono-base.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/hono-base.js deleted file mode 100644 index 63eebce..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/hono-base.js +++ /dev/null @@ -1,401 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var hono_base_exports = {}; -__export(hono_base_exports, { - HonoBase: () => Hono -}); -module.exports = __toCommonJS(hono_base_exports); -var import_compose = require("./compose"); -var import_context = require("./context"); -var import_router = require("./router"); -var import_constants = require("./utils/constants"); -var import_url = require("./utils/url"); -const notFoundHandler = (c) => { - return c.text("404 Not Found", 404); -}; -const errorHandler = (err, c) => { - if ("getResponse" in err) { - const res = err.getResponse(); - return c.newResponse(res.body, res); - } - console.error(err); - return c.text("Internal Server Error", 500); -}; -class Hono { - get; - post; - put; - delete; - options; - patch; - all; - on; - use; - /* - This class is like an abstract class and does not have a router. - To use it, inherit the class and implement router in the constructor. - */ - router; - getPath; - // Cannot use `#` because it requires visibility at JavaScript runtime. - _basePath = "/"; - #path = "/"; - routes = []; - constructor(options = {}) { - const allMethods = [...import_router.METHODS, import_router.METHOD_NAME_ALL_LOWERCASE]; - allMethods.forEach((method) => { - this[method] = (args1, ...args) => { - if (typeof args1 === "string") { - this.#path = args1; - } else { - this.#addRoute(method, this.#path, args1); - } - args.forEach((handler) => { - this.#addRoute(method, this.#path, handler); - }); - return this; - }; - }); - this.on = (method, path, ...handlers) => { - for (const p of [path].flat()) { - this.#path = p; - for (const m of [method].flat()) { - handlers.map((handler) => { - this.#addRoute(m.toUpperCase(), this.#path, handler); - }); - } - } - return this; - }; - this.use = (arg1, ...handlers) => { - if (typeof arg1 === "string") { - this.#path = arg1; - } else { - this.#path = "*"; - handlers.unshift(arg1); - } - handlers.forEach((handler) => { - this.#addRoute(import_router.METHOD_NAME_ALL, this.#path, handler); - }); - return this; - }; - const { strict, ...optionsWithoutStrict } = options; - Object.assign(this, optionsWithoutStrict); - this.getPath = strict ?? true ? options.getPath ?? import_url.getPath : import_url.getPathNoStrict; - } - #clone() { - const clone = new Hono({ - router: this.router, - getPath: this.getPath - }); - clone.errorHandler = this.errorHandler; - clone.#notFoundHandler = this.#notFoundHandler; - clone.routes = this.routes; - return clone; - } - #notFoundHandler = notFoundHandler; - // Cannot use `#` because it requires visibility at JavaScript runtime. - errorHandler = errorHandler; - /** - * `.route()` allows grouping other Hono instance in routes. - * - * @see {@link https://hono.dev/docs/api/routing#grouping} - * - * @param {string} path - base Path - * @param {Hono} app - other Hono instance - * @returns {Hono} routed Hono instance - * - * @example - * ```ts - * const app = new Hono() - * const app2 = new Hono() - * - * app2.get("/user", (c) => c.text("user")) - * app.route("/api", app2) // GET /api/user - * ``` - */ - route(path, app) { - const subApp = this.basePath(path); - app.routes.map((r) => { - let handler; - if (app.errorHandler === errorHandler) { - handler = r.handler; - } else { - handler = async (c, next) => (await (0, import_compose.compose)([], app.errorHandler)(c, () => r.handler(c, next))).res; - handler[import_constants.COMPOSED_HANDLER] = r.handler; - } - subApp.#addRoute(r.method, r.path, handler); - }); - return this; - } - /** - * `.basePath()` allows base paths to be specified. - * - * @see {@link https://hono.dev/docs/api/routing#base-path} - * - * @param {string} path - base Path - * @returns {Hono} changed Hono instance - * - * @example - * ```ts - * const api = new Hono().basePath('/api') - * ``` - */ - basePath(path) { - const subApp = this.#clone(); - subApp._basePath = (0, import_url.mergePath)(this._basePath, path); - return subApp; - } - /** - * `.onError()` handles an error and returns a customized Response. - * - * @see {@link https://hono.dev/docs/api/hono#error-handling} - * - * @param {ErrorHandler} handler - request Handler for error - * @returns {Hono} changed Hono instance - * - * @example - * ```ts - * app.onError((err, c) => { - * console.error(`${err}`) - * return c.text('Custom Error Message', 500) - * }) - * ``` - */ - onError = (handler) => { - this.errorHandler = handler; - return this; - }; - /** - * `.notFound()` allows you to customize a Not Found Response. - * - * @see {@link https://hono.dev/docs/api/hono#not-found} - * - * @param {NotFoundHandler} handler - request handler for not-found - * @returns {Hono} changed Hono instance - * - * @example - * ```ts - * app.notFound((c) => { - * return c.text('Custom 404 Message', 404) - * }) - * ``` - */ - notFound = (handler) => { - this.#notFoundHandler = handler; - return this; - }; - /** - * `.mount()` allows you to mount applications built with other frameworks into your Hono application. - * - * @see {@link https://hono.dev/docs/api/hono#mount} - * - * @param {string} path - base Path - * @param {Function} applicationHandler - other Request Handler - * @param {MountOptions} [options] - options of `.mount()` - * @returns {Hono} mounted Hono instance - * - * @example - * ```ts - * import { Router as IttyRouter } from 'itty-router' - * import { Hono } from 'hono' - * // Create itty-router application - * const ittyRouter = IttyRouter() - * // GET /itty-router/hello - * ittyRouter.get('/hello', () => new Response('Hello from itty-router')) - * - * const app = new Hono() - * app.mount('/itty-router', ittyRouter.handle) - * ``` - * - * @example - * ```ts - * const app = new Hono() - * // Send the request to another application without modification. - * app.mount('/app', anotherApp, { - * replaceRequest: (req) => req, - * }) - * ``` - */ - mount(path, applicationHandler, options) { - let replaceRequest; - let optionHandler; - if (options) { - if (typeof options === "function") { - optionHandler = options; - } else { - optionHandler = options.optionHandler; - if (options.replaceRequest === false) { - replaceRequest = (request) => request; - } else { - replaceRequest = options.replaceRequest; - } - } - } - const getOptions = optionHandler ? (c) => { - const options2 = optionHandler(c); - return Array.isArray(options2) ? options2 : [options2]; - } : (c) => { - let executionContext = void 0; - try { - executionContext = c.executionCtx; - } catch { - } - return [c.env, executionContext]; - }; - replaceRequest ||= (() => { - const mergedPath = (0, import_url.mergePath)(this._basePath, path); - const pathPrefixLength = mergedPath === "/" ? 0 : mergedPath.length; - return (request) => { - const url = new URL(request.url); - url.pathname = url.pathname.slice(pathPrefixLength) || "/"; - return new Request(url, request); - }; - })(); - const handler = async (c, next) => { - const res = await applicationHandler(replaceRequest(c.req.raw), ...getOptions(c)); - if (res) { - return res; - } - await next(); - }; - this.#addRoute(import_router.METHOD_NAME_ALL, (0, import_url.mergePath)(path, "*"), handler); - return this; - } - #addRoute(method, path, handler) { - method = method.toUpperCase(); - path = (0, import_url.mergePath)(this._basePath, path); - const r = { basePath: this._basePath, path, method, handler }; - this.router.add(method, path, [handler, r]); - this.routes.push(r); - } - #handleError(err, c) { - if (err instanceof Error) { - return this.errorHandler(err, c); - } - throw err; - } - #dispatch(request, executionCtx, env, method) { - if (method === "HEAD") { - return (async () => new Response(null, await this.#dispatch(request, executionCtx, env, "GET")))(); - } - const path = this.getPath(request, { env }); - const matchResult = this.router.match(method, path); - const c = new import_context.Context(request, { - path, - matchResult, - env, - executionCtx, - notFoundHandler: this.#notFoundHandler - }); - if (matchResult[0].length === 1) { - let res; - try { - res = matchResult[0][0][0][0](c, async () => { - c.res = await this.#notFoundHandler(c); - }); - } catch (err) { - return this.#handleError(err, c); - } - return res instanceof Promise ? res.then( - (resolved) => resolved || (c.finalized ? c.res : this.#notFoundHandler(c)) - ).catch((err) => this.#handleError(err, c)) : res ?? this.#notFoundHandler(c); - } - const composed = (0, import_compose.compose)(matchResult[0], this.errorHandler, this.#notFoundHandler); - return (async () => { - try { - const context = await composed(c); - if (!context.finalized) { - throw new Error( - "Context is not finalized. Did you forget to return a Response object or `await next()`?" - ); - } - return context.res; - } catch (err) { - return this.#handleError(err, c); - } - })(); - } - /** - * `.fetch()` will be entry point of your app. - * - * @see {@link https://hono.dev/docs/api/hono#fetch} - * - * @param {Request} request - request Object of request - * @param {Env} Env - env Object - * @param {ExecutionContext} - context of execution - * @returns {Response | Promise} response of request - * - */ - fetch = (request, ...rest) => { - return this.#dispatch(request, rest[1], rest[0], request.method); - }; - /** - * `.request()` is a useful method for testing. - * You can pass a URL or pathname to send a GET request. - * app will return a Response object. - * ```ts - * test('GET /hello is ok', async () => { - * const res = await app.request('/hello') - * expect(res.status).toBe(200) - * }) - * ``` - * @see https://hono.dev/docs/api/hono#request - */ - request = (input, requestInit, Env, executionCtx) => { - if (input instanceof Request) { - return this.fetch(requestInit ? new Request(input, requestInit) : input, Env, executionCtx); - } - input = input.toString(); - return this.fetch( - new Request( - /^https?:\/\//.test(input) ? input : `http://localhost${(0, import_url.mergePath)("/", input)}`, - requestInit - ), - Env, - executionCtx - ); - }; - /** - * `.fire()` automatically adds a global fetch event listener. - * This can be useful for environments that adhere to the Service Worker API, such as non-ES module Cloudflare Workers. - * @deprecated - * Use `fire` from `hono/service-worker` instead. - * ```ts - * import { Hono } from 'hono' - * import { fire } from 'hono/service-worker' - * - * const app = new Hono() - * // ... - * fire(app) - * ``` - * @see https://hono.dev/docs/api/hono#fire - * @see https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API - * @see https://developers.cloudflare.com/workers/reference/migrate-to-module-workers/ - */ - fire = () => { - addEventListener("fetch", (event) => { - event.respondWith(this.#dispatch(event.request, event, void 0, event.request.method)); - }); - }; -} -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - HonoBase -}); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/hono.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/hono.js deleted file mode 100644 index 06d59a2..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/hono.js +++ /dev/null @@ -1,44 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var hono_exports = {}; -__export(hono_exports, { - Hono: () => Hono -}); -module.exports = __toCommonJS(hono_exports); -var import_hono_base = require("./hono-base"); -var import_reg_exp_router = require("./router/reg-exp-router"); -var import_smart_router = require("./router/smart-router"); -var import_trie_router = require("./router/trie-router"); -class Hono extends import_hono_base.HonoBase { - /** - * Creates an instance of the Hono class. - * - * @param options - Optional configuration options for the Hono instance. - */ - constructor(options = {}) { - super(options); - this.router = options.router ?? new import_smart_router.SmartRouter({ - routers: [new import_reg_exp_router.RegExpRouter(), new import_trie_router.TrieRouter()] - }); - } -} -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - Hono -}); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/http-exception.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/http-exception.js deleted file mode 100644 index 3ad00c5..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/http-exception.js +++ /dev/null @@ -1,58 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var http_exception_exports = {}; -__export(http_exception_exports, { - HTTPException: () => HTTPException -}); -module.exports = __toCommonJS(http_exception_exports); -class HTTPException extends Error { - res; - status; - /** - * Creates an instance of `HTTPException`. - * @param status - HTTP status code for the exception. Defaults to 500. - * @param options - Additional options for the exception. - */ - constructor(status = 500, options) { - super(options?.message, { cause: options?.cause }); - this.res = options?.res; - this.status = status; - } - /** - * Returns the response object associated with the exception. - * If a response object is not provided, a new response is created with the error message and status code. - * @returns The response object. - */ - getResponse() { - if (this.res) { - const newResponse = new Response(this.res.body, { - status: this.status, - headers: this.res.headers - }); - return newResponse; - } - return new Response(this.message, { - status: this.status - }); - } -} -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - HTTPException -}); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/index.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/index.js deleted file mode 100644 index 256c738..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/index.js +++ /dev/null @@ -1,28 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var index_exports = {}; -__export(index_exports, { - Hono: () => import_hono.Hono -}); -module.exports = __toCommonJS(index_exports); -var import_hono = require("./hono"); -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - Hono -}); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/jsx/base.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/jsx/base.js deleted file mode 100644 index 48578a1..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/jsx/base.js +++ /dev/null @@ -1,375 +0,0 @@ -"use strict"; -var __create = Object.create; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __getProtoOf = Object.getPrototypeOf; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( - // If the importer is in node compatibility mode or this is not an ESM - // file that has been converted to a CommonJS file using a Babel- - // compatible transform (i.e. "__esModule" has not been set), then set - // "default" to the CommonJS "module.exports" for node compatibility. - isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, - mod -)); -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var base_exports = {}; -__export(base_exports, { - Fragment: () => Fragment, - JSXFragmentNode: () => JSXFragmentNode, - JSXNode: () => JSXNode, - booleanAttributes: () => booleanAttributes, - cloneElement: () => cloneElement, - getNameSpaceContext: () => getNameSpaceContext, - isValidElement: () => isValidElement, - jsx: () => jsx, - jsxFn: () => jsxFn, - memo: () => memo, - reactAPICompatVersion: () => reactAPICompatVersion, - shallowEqual: () => shallowEqual -}); -module.exports = __toCommonJS(base_exports); -var import_html = require("../helper/html"); -var import_html2 = require("../utils/html"); -var import_constants = require("./constants"); -var import_context = require("./context"); -var import_common = require("./intrinsic-element/common"); -var intrinsicElementTags = __toESM(require("./intrinsic-element/components"), 1); -var import_utils = require("./utils"); -let nameSpaceContext = void 0; -const getNameSpaceContext = () => nameSpaceContext; -const toSVGAttributeName = (key) => /[A-Z]/.test(key) && // Presentation attributes are findable in style object. "clip-path", "font-size", "stroke-width", etc. -// Or other un-deprecated kebab-case attributes. "overline-position", "paint-order", "strikethrough-position", etc. -key.match( - /^(?:al|basel|clip(?:Path|Rule)$|co|do|fill|fl|fo|gl|let|lig|i|marker[EMS]|o|pai|pointe|sh|st[or]|text[^L]|tr|u|ve|w)/ -) ? key.replace(/([A-Z])/g, "-$1").toLowerCase() : key; -const emptyTags = [ - "area", - "base", - "br", - "col", - "embed", - "hr", - "img", - "input", - "keygen", - "link", - "meta", - "param", - "source", - "track", - "wbr" -]; -const booleanAttributes = [ - "allowfullscreen", - "async", - "autofocus", - "autoplay", - "checked", - "controls", - "default", - "defer", - "disabled", - "download", - "formnovalidate", - "hidden", - "inert", - "ismap", - "itemscope", - "loop", - "multiple", - "muted", - "nomodule", - "novalidate", - "open", - "playsinline", - "readonly", - "required", - "reversed", - "selected" -]; -const childrenToStringToBuffer = (children, buffer) => { - for (let i = 0, len = children.length; i < len; i++) { - const child = children[i]; - if (typeof child === "string") { - (0, import_html2.escapeToBuffer)(child, buffer); - } else if (typeof child === "boolean" || child === null || child === void 0) { - continue; - } else if (child instanceof JSXNode) { - child.toStringToBuffer(buffer); - } else if (typeof child === "number" || child.isEscaped) { - ; - buffer[0] += child; - } else if (child instanceof Promise) { - buffer.unshift("", child); - } else { - childrenToStringToBuffer(child, buffer); - } - } -}; -class JSXNode { - tag; - props; - key; - children; - isEscaped = true; - localContexts; - constructor(tag, props, children) { - this.tag = tag; - this.props = props; - this.children = children; - } - get type() { - return this.tag; - } - // Added for compatibility with libraries that rely on React's internal structure - // eslint-disable-next-line @typescript-eslint/no-explicit-any - get ref() { - return this.props.ref || null; - } - toString() { - const buffer = [""]; - this.localContexts?.forEach(([context, value]) => { - context.values.push(value); - }); - try { - this.toStringToBuffer(buffer); - } finally { - this.localContexts?.forEach(([context]) => { - context.values.pop(); - }); - } - return buffer.length === 1 ? "callbacks" in buffer ? (0, import_html2.resolveCallbackSync)((0, import_html.raw)(buffer[0], buffer.callbacks)).toString() : buffer[0] : (0, import_html2.stringBufferToString)(buffer, buffer.callbacks); - } - toStringToBuffer(buffer) { - const tag = this.tag; - const props = this.props; - let { children } = this; - buffer[0] += `<${tag}`; - const normalizeKey = nameSpaceContext && (0, import_context.useContext)(nameSpaceContext) === "svg" ? (key) => toSVGAttributeName((0, import_utils.normalizeIntrinsicElementKey)(key)) : (key) => (0, import_utils.normalizeIntrinsicElementKey)(key); - for (let [key, v] of Object.entries(props)) { - key = normalizeKey(key); - if (key === "children") { - } else if (key === "style" && typeof v === "object") { - let styleStr = ""; - (0, import_utils.styleObjectForEach)(v, (property, value) => { - if (value != null) { - styleStr += `${styleStr ? ";" : ""}${property}:${value}`; - } - }); - buffer[0] += ' style="'; - (0, import_html2.escapeToBuffer)(styleStr, buffer); - buffer[0] += '"'; - } else if (typeof v === "string") { - buffer[0] += ` ${key}="`; - (0, import_html2.escapeToBuffer)(v, buffer); - buffer[0] += '"'; - } else if (v === null || v === void 0) { - } else if (typeof v === "number" || v.isEscaped) { - buffer[0] += ` ${key}="${v}"`; - } else if (typeof v === "boolean" && booleanAttributes.includes(key)) { - if (v) { - buffer[0] += ` ${key}=""`; - } - } else if (key === "dangerouslySetInnerHTML") { - if (children.length > 0) { - throw new Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`."); - } - children = [(0, import_html.raw)(v.__html)]; - } else if (v instanceof Promise) { - buffer[0] += ` ${key}="`; - buffer.unshift('"', v); - } else if (typeof v === "function") { - if (!key.startsWith("on") && key !== "ref") { - throw new Error(`Invalid prop '${key}' of type 'function' supplied to '${tag}'.`); - } - } else { - buffer[0] += ` ${key}="`; - (0, import_html2.escapeToBuffer)(v.toString(), buffer); - buffer[0] += '"'; - } - } - if (emptyTags.includes(tag) && children.length === 0) { - buffer[0] += "/>"; - return; - } - buffer[0] += ">"; - childrenToStringToBuffer(children, buffer); - buffer[0] += ``; - } -} -class JSXFunctionNode extends JSXNode { - toStringToBuffer(buffer) { - const { children } = this; - const props = { ...this.props }; - if (children.length) { - props.children = children.length === 1 ? children[0] : children; - } - const res = this.tag.call(null, props); - if (typeof res === "boolean" || res == null) { - return; - } else if (res instanceof Promise) { - if (import_context.globalContexts.length === 0) { - buffer.unshift("", res); - } else { - const currentContexts = import_context.globalContexts.map((c) => [c, c.values.at(-1)]); - buffer.unshift( - "", - res.then((childRes) => { - if (childRes instanceof JSXNode) { - childRes.localContexts = currentContexts; - } - return childRes; - }) - ); - } - } else if (res instanceof JSXNode) { - res.toStringToBuffer(buffer); - } else if (typeof res === "number" || res.isEscaped) { - buffer[0] += res; - if (res.callbacks) { - buffer.callbacks ||= []; - buffer.callbacks.push(...res.callbacks); - } - } else { - (0, import_html2.escapeToBuffer)(res, buffer); - } - } -} -class JSXFragmentNode extends JSXNode { - toStringToBuffer(buffer) { - childrenToStringToBuffer(this.children, buffer); - } -} -const jsx = (tag, props, ...children) => { - props ??= {}; - if (children.length) { - props.children = children.length === 1 ? children[0] : children; - } - const key = props.key; - delete props["key"]; - const node = jsxFn(tag, props, children); - node.key = key; - return node; -}; -let initDomRenderer = false; -const jsxFn = (tag, props, children) => { - if (!initDomRenderer) { - for (const k in import_common.domRenderers) { - ; - intrinsicElementTags[k][import_constants.DOM_RENDERER] = import_common.domRenderers[k]; - } - initDomRenderer = true; - } - if (typeof tag === "function") { - return new JSXFunctionNode(tag, props, children); - } else if (intrinsicElementTags[tag]) { - return new JSXFunctionNode( - intrinsicElementTags[tag], - props, - children - ); - } else if (tag === "svg" || tag === "head") { - nameSpaceContext ||= (0, import_context.createContext)(""); - return new JSXNode(tag, props, [ - new JSXFunctionNode( - nameSpaceContext, - { - value: tag - }, - children - ) - ]); - } else { - return new JSXNode(tag, props, children); - } -}; -const shallowEqual = (a, b) => { - if (a === b) { - return true; - } - const aKeys = Object.keys(a).sort(); - const bKeys = Object.keys(b).sort(); - if (aKeys.length !== bKeys.length) { - return false; - } - for (let i = 0, len = aKeys.length; i < len; i++) { - if (aKeys[i] === "children" && bKeys[i] === "children" && !a.children?.length && !b.children?.length) { - continue; - } else if (a[aKeys[i]] !== b[aKeys[i]]) { - return false; - } - } - return true; -}; -const memo = (component, propsAreEqual = shallowEqual) => { - let computed = null; - let prevProps = void 0; - const wrapper = ((props) => { - if (prevProps && !propsAreEqual(prevProps, props)) { - computed = null; - } - prevProps = props; - return computed ||= component(props); - }); - wrapper[import_constants.DOM_MEMO] = propsAreEqual; - wrapper[import_constants.DOM_RENDERER] = component; - return wrapper; -}; -const Fragment = ({ - children -}) => { - return new JSXFragmentNode( - "", - { - children - }, - Array.isArray(children) ? children : children ? [children] : [] - ); -}; -const isValidElement = (element) => { - return !!(element && typeof element === "object" && "tag" in element && "props" in element); -}; -const cloneElement = (element, props, ...children) => { - let childrenToClone; - if (children.length > 0) { - childrenToClone = children; - } else { - const c = element.props.children; - childrenToClone = Array.isArray(c) ? c : [c]; - } - return jsx( - element.tag, - { ...element.props, ...props }, - ...childrenToClone - ); -}; -const reactAPICompatVersion = "19.0.0-hono-jsx"; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - Fragment, - JSXFragmentNode, - JSXNode, - booleanAttributes, - cloneElement, - getNameSpaceContext, - isValidElement, - jsx, - jsxFn, - memo, - reactAPICompatVersion, - shallowEqual -}); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/jsx/children.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/jsx/children.js deleted file mode 100644 index 0820d84..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/jsx/children.js +++ /dev/null @@ -1,45 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var children_exports = {}; -__export(children_exports, { - Children: () => Children, - toArray: () => toArray -}); -module.exports = __toCommonJS(children_exports); -const toArray = (children) => Array.isArray(children) ? children : [children]; -const Children = { - map: (children, fn) => toArray(children).map(fn), - forEach: (children, fn) => { - toArray(children).forEach(fn); - }, - count: (children) => toArray(children).length, - only: (_children) => { - const children = toArray(_children); - if (children.length !== 1) { - throw new Error("Children.only() expects only one child"); - } - return children[0]; - }, - toArray -}; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - Children, - toArray -}); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/jsx/components.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/jsx/components.js deleted file mode 100644 index 9102aa8..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/jsx/components.js +++ /dev/null @@ -1,176 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var components_exports = {}; -__export(components_exports, { - ErrorBoundary: () => ErrorBoundary, - childrenToString: () => childrenToString -}); -module.exports = __toCommonJS(components_exports); -var import_html = require("../helper/html"); -var import_html2 = require("../utils/html"); -var import_constants = require("./constants"); -var import_context = require("./context"); -var import_components = require("./dom/components"); -var import_streaming = require("./streaming"); -let errorBoundaryCounter = 0; -const childrenToString = async (children) => { - try { - return children.flat().map((c) => c == null || typeof c === "boolean" ? "" : c.toString()); - } catch (e) { - if (e instanceof Promise) { - await e; - return childrenToString(children); - } else { - throw e; - } - } -}; -const ErrorBoundary = async ({ children, fallback, fallbackRender, onError }) => { - if (!children) { - return (0, import_html.raw)(""); - } - if (!Array.isArray(children)) { - children = [children]; - } - const nonce = (0, import_context.useContext)(import_streaming.StreamingContext)?.scriptNonce; - let fallbackStr; - const fallbackRes = (error) => { - onError?.(error); - return (fallbackStr || fallbackRender?.(error) || "").toString(); - }; - let resArray = []; - try { - resArray = children.map( - (c) => c == null || typeof c === "boolean" ? "" : c.toString() - ); - } catch (e) { - fallbackStr = await fallback?.toString(); - if (e instanceof Promise) { - resArray = [ - e.then(() => childrenToString(children)).catch((e2) => fallbackRes(e2)) - ]; - } else { - resArray = [fallbackRes(e)]; - } - } - if (resArray.some((res) => res instanceof Promise)) { - fallbackStr ||= await fallback?.toString(); - const index = errorBoundaryCounter++; - const replaceRe = RegExp(`(.*?)(.*?)()`); - const caught = false; - const catchCallback = ({ error: error2, buffer }) => { - if (caught) { - return ""; - } - const fallbackResString = fallbackRes(error2); - if (buffer) { - buffer[0] = buffer[0].replace(replaceRe, fallbackResString); - } - return buffer ? "" : ``; - }; - let error; - const promiseAll = Promise.all(resArray).catch((e) => error = e); - return (0, import_html.raw)(``, [ - ({ phase, buffer, context }) => { - if (phase === import_html2.HtmlEscapedCallbackPhase.BeforeStream) { - return; - } - return promiseAll.then(async (htmlArray) => { - if (error) { - throw error; - } - htmlArray = htmlArray.flat(); - const content = htmlArray.join(""); - let html = buffer ? "" : ` -((d,c) => { -c=d.currentScript.previousSibling -d=d.getElementById('E:${index}') -if(!d)return -d.parentElement.insertBefore(c.content,d.nextSibling) -})(document) -`; - if (htmlArray.every((html2) => !html2.callbacks?.length)) { - if (buffer) { - buffer[0] = buffer[0].replace(replaceRe, content); - } - return html; - } - if (buffer) { - buffer[0] = buffer[0].replace( - replaceRe, - (_all, pre, _, post) => `${pre}${content}${post}` - ); - } - const callbacks = htmlArray.map((html2) => html2.callbacks || []).flat(); - if (phase === import_html2.HtmlEscapedCallbackPhase.Stream) { - html = await (0, import_html2.resolveCallback)( - html, - import_html2.HtmlEscapedCallbackPhase.BeforeStream, - true, - context - ); - } - let resolvedCount = 0; - const promises = callbacks.map( - (c) => (...args) => c(...args)?.then((content2) => { - resolvedCount++; - if (buffer) { - if (resolvedCount === callbacks.length) { - buffer[0] = buffer[0].replace(replaceRe, (_all, _pre, content3) => content3); - } - buffer[0] += content2; - return (0, import_html.raw)("", content2.callbacks); - } - return (0, import_html.raw)( - content2 + (resolvedCount !== callbacks.length ? "" : ``), - content2.callbacks - ); - }).catch((error2) => catchCallback({ error: error2, buffer })) - ); - return (0, import_html.raw)(html, promises); - }).catch((error2) => catchCallback({ error: error2, buffer })); - } - ]); - } else { - return (0, import_html.raw)(resArray.join("")); - } -}; -ErrorBoundary[import_constants.DOM_RENDERER] = import_components.ErrorBoundary; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - ErrorBoundary, - childrenToString -}); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/jsx/constants.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/jsx/constants.js deleted file mode 100644 index 35e4eae..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/jsx/constants.js +++ /dev/null @@ -1,43 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var constants_exports = {}; -__export(constants_exports, { - DOM_ERROR_HANDLER: () => DOM_ERROR_HANDLER, - DOM_INTERNAL_TAG: () => DOM_INTERNAL_TAG, - DOM_MEMO: () => DOM_MEMO, - DOM_RENDERER: () => DOM_RENDERER, - DOM_STASH: () => DOM_STASH, - PERMALINK: () => PERMALINK -}); -module.exports = __toCommonJS(constants_exports); -const DOM_RENDERER = /* @__PURE__ */ Symbol("RENDERER"); -const DOM_ERROR_HANDLER = /* @__PURE__ */ Symbol("ERROR_HANDLER"); -const DOM_STASH = /* @__PURE__ */ Symbol("STASH"); -const DOM_INTERNAL_TAG = /* @__PURE__ */ Symbol("INTERNAL"); -const DOM_MEMO = /* @__PURE__ */ Symbol("MEMO"); -const PERMALINK = /* @__PURE__ */ Symbol("PERMALINK"); -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - DOM_ERROR_HANDLER, - DOM_INTERNAL_TAG, - DOM_MEMO, - DOM_RENDERER, - DOM_STASH, - PERMALINK -}); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/jsx/context.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/jsx/context.js deleted file mode 100644 index 5204e4d..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/jsx/context.js +++ /dev/null @@ -1,61 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var context_exports = {}; -__export(context_exports, { - createContext: () => createContext, - globalContexts: () => globalContexts, - useContext: () => useContext -}); -module.exports = __toCommonJS(context_exports); -var import_html = require("../helper/html"); -var import_base = require("./base"); -var import_constants = require("./constants"); -var import_context = require("./dom/context"); -const globalContexts = []; -const createContext = (defaultValue) => { - const values = [defaultValue]; - const context = ((props) => { - values.push(props.value); - let string; - try { - string = props.children ? (Array.isArray(props.children) ? new import_base.JSXFragmentNode("", {}, props.children) : props.children).toString() : ""; - } finally { - values.pop(); - } - if (string instanceof Promise) { - return string.then((resString) => (0, import_html.raw)(resString, resString.callbacks)); - } else { - return (0, import_html.raw)(string); - } - }); - context.values = values; - context.Provider = context; - context[import_constants.DOM_RENDERER] = (0, import_context.createContextProviderFunction)(values); - globalContexts.push(context); - return context; -}; -const useContext = (context) => { - return context.values.at(-1); -}; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - createContext, - globalContexts, - useContext -}); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/jsx/dom/client.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/jsx/dom/client.js deleted file mode 100644 index d48651d..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/jsx/dom/client.js +++ /dev/null @@ -1,77 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var client_exports = {}; -__export(client_exports, { - createRoot: () => createRoot, - default: () => client_default, - hydrateRoot: () => hydrateRoot -}); -module.exports = __toCommonJS(client_exports); -var import_hooks = require("../hooks"); -var import_render = require("./render"); -const createRoot = (element, options = {}) => { - let setJsxNode = ( - // unmounted - void 0 - ); - if (Object.keys(options).length > 0) { - console.warn("createRoot options are not supported yet"); - } - return { - render(jsxNode) { - if (setJsxNode === null) { - throw new Error("Cannot update an unmounted root"); - } - if (setJsxNode) { - setJsxNode(jsxNode); - } else { - (0, import_render.renderNode)( - (0, import_render.buildNode)({ - tag: () => { - const [_jsxNode, _setJsxNode] = (0, import_hooks.useState)(jsxNode); - setJsxNode = _setJsxNode; - return _jsxNode; - }, - props: {} - // eslint-disable-next-line @typescript-eslint/no-explicit-any - }), - element - ); - } - }, - unmount() { - setJsxNode?.(null); - setJsxNode = null; - } - }; -}; -const hydrateRoot = (element, reactNode, options = {}) => { - const root = createRoot(element, options); - root.render(reactNode); - return root; -}; -var client_default = { - createRoot, - hydrateRoot -}; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - createRoot, - hydrateRoot -}); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/jsx/dom/components.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/jsx/dom/components.js deleted file mode 100644 index e5afb7f..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/jsx/dom/components.js +++ /dev/null @@ -1,56 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var components_exports = {}; -__export(components_exports, { - ErrorBoundary: () => ErrorBoundary, - Suspense: () => Suspense -}); -module.exports = __toCommonJS(components_exports); -var import_constants = require("../constants"); -var import_jsx_runtime = require("./jsx-runtime"); -const ErrorBoundary = (({ children, fallback, fallbackRender, onError }) => { - const res = (0, import_jsx_runtime.Fragment)({ children }); - res[import_constants.DOM_ERROR_HANDLER] = (err) => { - if (err instanceof Promise) { - throw err; - } - onError?.(err); - return fallbackRender?.(err) || fallback; - }; - return res; -}); -const Suspense = (({ - children, - fallback -}) => { - const res = (0, import_jsx_runtime.Fragment)({ children }); - res[import_constants.DOM_ERROR_HANDLER] = (err, retry) => { - if (!(err instanceof Promise)) { - throw err; - } - err.finally(retry); - return fallback; - }; - return res; -}); -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - ErrorBoundary, - Suspense -}); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/jsx/dom/context.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/jsx/dom/context.js deleted file mode 100644 index 547f033..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/jsx/dom/context.js +++ /dev/null @@ -1,72 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var context_exports = {}; -__export(context_exports, { - createContext: () => createContext, - createContextProviderFunction: () => createContextProviderFunction -}); -module.exports = __toCommonJS(context_exports); -var import_constants = require("../constants"); -var import_context = require("../context"); -var import_utils = require("./utils"); -const createContextProviderFunction = (values) => ({ value, children }) => { - if (!children) { - return void 0; - } - const props = { - children: [ - { - tag: (0, import_utils.setInternalTagFlag)(() => { - values.push(value); - }), - props: {} - } - ] - }; - if (Array.isArray(children)) { - props.children.push(...children.flat()); - } else { - props.children.push(children); - } - props.children.push({ - tag: (0, import_utils.setInternalTagFlag)(() => { - values.pop(); - }), - props: {} - }); - const res = { tag: "", props, type: "" }; - res[import_constants.DOM_ERROR_HANDLER] = (err) => { - values.pop(); - throw err; - }; - return res; -}; -const createContext = (defaultValue) => { - const values = [defaultValue]; - const context = createContextProviderFunction(values); - context.values = values; - context.Provider = context; - import_context.globalContexts.push(context); - return context; -}; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - createContext, - createContextProviderFunction -}); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/jsx/dom/css.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/jsx/dom/css.js deleted file mode 100644 index f004291..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/jsx/dom/css.js +++ /dev/null @@ -1,162 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var css_exports = {}; -__export(css_exports, { - Style: () => Style, - createCssContext: () => createCssContext, - createCssJsxDomObjects: () => createCssJsxDomObjects, - css: () => css, - cx: () => cx, - keyframes: () => keyframes, - rawCssString: () => import_common2.rawCssString, - viewTransition: () => viewTransition -}); -module.exports = __toCommonJS(css_exports); -var import_common = require("../../helper/css/common"); -var import_common2 = require("../../helper/css/common"); -const splitRule = (rule) => { - const result = []; - let startPos = 0; - let depth = 0; - for (let i = 0, len = rule.length; i < len; i++) { - const char = rule[i]; - if (char === "'" || char === '"') { - const quote = char; - i++; - for (; i < len; i++) { - if (rule[i] === "\\") { - i++; - continue; - } - if (rule[i] === quote) { - break; - } - } - continue; - } - if (char === "{") { - depth++; - continue; - } - if (char === "}") { - depth--; - if (depth === 0) { - result.push(rule.slice(startPos, i + 1)); - startPos = i + 1; - } - continue; - } - } - return result; -}; -const createCssJsxDomObjects = ({ id }) => { - let styleSheet = void 0; - const findStyleSheet = () => { - if (!styleSheet) { - styleSheet = document.querySelector(`style#${id}`)?.sheet; - if (styleSheet) { - ; - styleSheet.addedStyles = /* @__PURE__ */ new Set(); - } - } - return styleSheet ? [styleSheet, styleSheet.addedStyles] : []; - }; - const insertRule = (className, styleString) => { - const [sheet, addedStyles] = findStyleSheet(); - if (!sheet || !addedStyles) { - Promise.resolve().then(() => { - if (!findStyleSheet()[0]) { - throw new Error("style sheet not found"); - } - insertRule(className, styleString); - }); - return; - } - if (!addedStyles.has(className)) { - addedStyles.add(className); - (className.startsWith(import_common.PSEUDO_GLOBAL_SELECTOR) ? splitRule(styleString) : [`${className[0] === "@" ? "" : "."}${className}{${styleString}}`]).forEach((rule) => { - sheet.insertRule(rule, sheet.cssRules.length); - }); - } - }; - const cssObject = { - toString() { - const selector = this[import_common.SELECTOR]; - insertRule(selector, this[import_common.STYLE_STRING]); - this[import_common.SELECTORS].forEach(({ [import_common.CLASS_NAME]: className, [import_common.STYLE_STRING]: styleString }) => { - insertRule(className, styleString); - }); - return this[import_common.CLASS_NAME]; - } - }; - const Style2 = ({ children, nonce }) => ({ - tag: "style", - props: { - id, - nonce, - children: children && (Array.isArray(children) ? children : [children]).map( - (c) => c[import_common.STYLE_STRING] - ) - } - // eslint-disable-next-line @typescript-eslint/no-explicit-any - }); - return [cssObject, Style2]; -}; -const createCssContext = ({ id }) => { - const [cssObject, Style2] = createCssJsxDomObjects({ id }); - const newCssClassNameObject = (cssClassName) => { - cssClassName.toString = cssObject.toString; - return cssClassName; - }; - const css2 = (strings, ...values) => { - return newCssClassNameObject((0, import_common.cssCommon)(strings, values)); - }; - const cx2 = (...args) => { - args = (0, import_common.cxCommon)(args); - return css2(Array(args.length).fill(""), ...args); - }; - const keyframes2 = import_common.keyframesCommon; - const viewTransition2 = ((strings, ...values) => { - return newCssClassNameObject((0, import_common.viewTransitionCommon)(strings, values)); - }); - return { - css: css2, - cx: cx2, - keyframes: keyframes2, - viewTransition: viewTransition2, - Style: Style2 - }; -}; -const defaultContext = createCssContext({ id: import_common.DEFAULT_STYLE_ID }); -const css = defaultContext.css; -const cx = defaultContext.cx; -const keyframes = defaultContext.keyframes; -const viewTransition = defaultContext.viewTransition; -const Style = defaultContext.Style; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - Style, - createCssContext, - createCssJsxDomObjects, - css, - cx, - keyframes, - rawCssString, - viewTransition -}); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/jsx/dom/hooks/index.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/jsx/dom/hooks/index.js deleted file mode 100644 index 1ce3b77..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/jsx/dom/hooks/index.js +++ /dev/null @@ -1,75 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var hooks_exports = {}; -__export(hooks_exports, { - FormContext: () => FormContext, - registerAction: () => registerAction, - useActionState: () => useActionState, - useFormStatus: () => useFormStatus, - useOptimistic: () => useOptimistic -}); -module.exports = __toCommonJS(hooks_exports); -var import_constants = require("../../constants"); -var import_context = require("../../context"); -var import_hooks = require("../../hooks"); -var import_context2 = require("../context"); -const FormContext = (0, import_context2.createContext)({ - pending: false, - data: null, - method: null, - action: null -}); -const actions = /* @__PURE__ */ new Set(); -const registerAction = (action) => { - actions.add(action); - action.finally(() => actions.delete(action)); -}; -const useFormStatus = () => { - return (0, import_context.useContext)(FormContext); -}; -const useOptimistic = (state, updateState) => { - const [optimisticState, setOptimisticState] = (0, import_hooks.useState)(state); - if (actions.size > 0) { - Promise.all(actions).finally(() => { - setOptimisticState(state); - }); - } else { - setOptimisticState(state); - } - const cb = (0, import_hooks.useCallback)((newData) => { - setOptimisticState((currentState) => updateState(currentState, newData)); - }, []); - return [optimisticState, cb]; -}; -const useActionState = (fn, initialState, permalink) => { - const [state, setState] = (0, import_hooks.useState)(initialState); - const actionState = async (data) => { - setState(await fn(state, data)); - }; - actionState[import_constants.PERMALINK] = permalink; - return [state, actionState]; -}; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - FormContext, - registerAction, - useActionState, - useFormStatus, - useOptimistic -}); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/jsx/dom/index.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/jsx/dom/index.js deleted file mode 100644 index d01dd10..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/jsx/dom/index.js +++ /dev/null @@ -1,182 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var dom_exports = {}; -__export(dom_exports, { - Children: () => import_children.Children, - ErrorBoundary: () => import_components.ErrorBoundary, - Fragment: () => import_jsx_runtime.Fragment, - StrictMode: () => import_jsx_runtime.Fragment, - Suspense: () => import_components.Suspense, - cloneElement: () => cloneElement, - createContext: () => import_context2.createContext, - createElement: () => createElement, - createPortal: () => import_render.createPortal, - createRef: () => import_hooks.createRef, - default: () => dom_default, - flushSync: () => import_render.flushSync, - forwardRef: () => import_hooks.forwardRef, - isValidElement: () => import_base.isValidElement, - jsx: () => createElement, - memo: () => memo, - render: () => import_render2.render, - startTransition: () => import_hooks.startTransition, - startViewTransition: () => import_hooks.startViewTransition, - use: () => import_hooks.use, - useActionState: () => import_hooks2.useActionState, - useCallback: () => import_hooks.useCallback, - useContext: () => import_context.useContext, - useDebugValue: () => import_hooks.useDebugValue, - useDeferredValue: () => import_hooks.useDeferredValue, - useEffect: () => import_hooks.useEffect, - useFormStatus: () => import_hooks2.useFormStatus, - useId: () => import_hooks.useId, - useImperativeHandle: () => import_hooks.useImperativeHandle, - useInsertionEffect: () => import_hooks.useInsertionEffect, - useLayoutEffect: () => import_hooks.useLayoutEffect, - useMemo: () => import_hooks.useMemo, - useOptimistic: () => import_hooks2.useOptimistic, - useReducer: () => import_hooks.useReducer, - useRef: () => import_hooks.useRef, - useState: () => import_hooks.useState, - useSyncExternalStore: () => import_hooks.useSyncExternalStore, - useTransition: () => import_hooks.useTransition, - useViewTransition: () => import_hooks.useViewTransition, - version: () => import_base.reactAPICompatVersion -}); -module.exports = __toCommonJS(dom_exports); -var import_base = require("../base"); -var import_children = require("../children"); -var import_constants = require("../constants"); -var import_context = require("../context"); -var import_hooks = require("../hooks"); -var import_components = require("./components"); -var import_context2 = require("./context"); -var import_hooks2 = require("./hooks"); -var import_jsx_runtime = require("./jsx-runtime"); -var import_render = require("./render"); -var import_render2 = require("./render"); -const createElement = (tag, props, ...children) => { - const jsxProps = props ? { ...props } : {}; - if (children.length) { - jsxProps.children = children.length === 1 ? children[0] : children; - } - let key = void 0; - if ("key" in jsxProps) { - key = jsxProps.key; - delete jsxProps.key; - } - return (0, import_jsx_runtime.jsx)(tag, jsxProps, key); -}; -const cloneElement = (element, props, ...children) => { - return (0, import_jsx_runtime.jsx)( - element.tag, - { - ...element.props, - ...props, - children: children.length ? children : element.props.children - }, - element.key - ); -}; -const memo = (component, propsAreEqual = import_base.shallowEqual) => { - const wrapper = ((props) => component(props)); - wrapper[import_constants.DOM_MEMO] = propsAreEqual; - return wrapper; -}; -var dom_default = { - version: import_base.reactAPICompatVersion, - useState: import_hooks.useState, - useEffect: import_hooks.useEffect, - useRef: import_hooks.useRef, - useCallback: import_hooks.useCallback, - use: import_hooks.use, - startTransition: import_hooks.startTransition, - useTransition: import_hooks.useTransition, - useDeferredValue: import_hooks.useDeferredValue, - startViewTransition: import_hooks.startViewTransition, - useViewTransition: import_hooks.useViewTransition, - useMemo: import_hooks.useMemo, - useLayoutEffect: import_hooks.useLayoutEffect, - useInsertionEffect: import_hooks.useInsertionEffect, - useReducer: import_hooks.useReducer, - useId: import_hooks.useId, - useDebugValue: import_hooks.useDebugValue, - createRef: import_hooks.createRef, - forwardRef: import_hooks.forwardRef, - useImperativeHandle: import_hooks.useImperativeHandle, - useSyncExternalStore: import_hooks.useSyncExternalStore, - useFormStatus: import_hooks2.useFormStatus, - useActionState: import_hooks2.useActionState, - useOptimistic: import_hooks2.useOptimistic, - Suspense: import_components.Suspense, - ErrorBoundary: import_components.ErrorBoundary, - createContext: import_context2.createContext, - useContext: import_context.useContext, - memo, - isValidElement: import_base.isValidElement, - createElement, - cloneElement, - Children: import_children.Children, - Fragment: import_jsx_runtime.Fragment, - StrictMode: import_jsx_runtime.Fragment, - flushSync: import_render.flushSync, - createPortal: import_render.createPortal -}; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - Children, - ErrorBoundary, - Fragment, - StrictMode, - Suspense, - cloneElement, - createContext, - createElement, - createPortal, - createRef, - flushSync, - forwardRef, - isValidElement, - jsx, - memo, - render, - startTransition, - startViewTransition, - use, - useActionState, - useCallback, - useContext, - useDebugValue, - useDeferredValue, - useEffect, - useFormStatus, - useId, - useImperativeHandle, - useInsertionEffect, - useLayoutEffect, - useMemo, - useOptimistic, - useReducer, - useRef, - useState, - useSyncExternalStore, - useTransition, - useViewTransition, - version -}); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/jsx/dom/intrinsic-element/components.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/jsx/dom/intrinsic-element/components.js deleted file mode 100644 index d355395..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/jsx/dom/intrinsic-element/components.js +++ /dev/null @@ -1,369 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var components_exports = {}; -__export(components_exports, { - button: () => button, - clearCache: () => clearCache, - composeRef: () => composeRef, - form: () => form, - input: () => input, - link: () => link, - meta: () => meta, - script: () => script, - style: () => style, - title: () => title -}); -module.exports = __toCommonJS(components_exports); -var import_context = require("../../context"); -var import_hooks = require("../../hooks"); -var import_common = require("../../intrinsic-element/common"); -var import_hooks2 = require("../hooks"); -var import_render = require("../render"); -const clearCache = () => { - blockingPromiseMap = /* @__PURE__ */ Object.create(null); - createdElements = /* @__PURE__ */ Object.create(null); -}; -const composeRef = (ref, cb) => { - return (0, import_hooks.useMemo)( - () => (e) => { - let refCleanup; - if (ref) { - if (typeof ref === "function") { - refCleanup = ref(e) || (() => { - ref(null); - }); - } else if (ref && "current" in ref) { - ref.current = e; - refCleanup = () => { - ref.current = null; - }; - } - } - const cbCleanup = cb(e); - return () => { - cbCleanup?.(); - refCleanup?.(); - }; - }, - [ref] - ); -}; -let blockingPromiseMap = /* @__PURE__ */ Object.create(null); -let createdElements = /* @__PURE__ */ Object.create(null); -const documentMetadataTag = (tag, props, preserveNodeType, supportSort, supportBlocking) => { - if (props?.itemProp) { - return { - tag, - props, - type: tag, - ref: props.ref - }; - } - const head = document.head; - let { onLoad, onError, precedence, blocking, ...restProps } = props; - let element = null; - let created = false; - const deDupeKeys = import_common.deDupeKeyMap[tag]; - let existingElements = void 0; - if (deDupeKeys.length > 0) { - const tags = head.querySelectorAll(tag); - LOOP: for (const e of tags) { - for (const key of import_common.deDupeKeyMap[tag]) { - if (e.getAttribute(key) === props[key]) { - element = e; - break LOOP; - } - } - } - if (!element) { - const cacheKey = deDupeKeys.reduce( - (acc, key) => props[key] === void 0 ? acc : `${acc}-${key}-${props[key]}`, - tag - ); - created = !createdElements[cacheKey]; - element = createdElements[cacheKey] ||= (() => { - const e = document.createElement(tag); - for (const key of deDupeKeys) { - if (props[key] !== void 0) { - e.setAttribute(key, props[key]); - } - if (props.rel) { - e.setAttribute("rel", props.rel); - } - } - return e; - })(); - } - } else { - existingElements = head.querySelectorAll(tag); - } - precedence = supportSort ? precedence ?? "" : void 0; - if (supportSort) { - restProps[import_common.dataPrecedenceAttr] = precedence; - } - const insert = (0, import_hooks.useCallback)( - (e) => { - if (deDupeKeys.length > 0) { - let found = false; - for (const existingElement of head.querySelectorAll(tag)) { - if (found && existingElement.getAttribute(import_common.dataPrecedenceAttr) !== precedence) { - head.insertBefore(e, existingElement); - return; - } - if (existingElement.getAttribute(import_common.dataPrecedenceAttr) === precedence) { - found = true; - } - } - head.appendChild(e); - } else if (existingElements) { - let found = false; - for (const existingElement of existingElements) { - if (existingElement === e) { - found = true; - break; - } - } - if (!found) { - head.insertBefore( - e, - head.contains(existingElements[0]) ? existingElements[0] : head.querySelector(tag) - ); - } - existingElements = void 0; - } - }, - [precedence] - ); - const ref = composeRef(props.ref, (e) => { - const key = deDupeKeys[0]; - if (preserveNodeType === 2) { - e.innerHTML = ""; - } - if (created || existingElements) { - insert(e); - } - if (!onError && !onLoad) { - return; - } - let promise = blockingPromiseMap[e.getAttribute(key)] ||= new Promise( - (resolve, reject) => { - e.addEventListener("load", resolve); - e.addEventListener("error", reject); - } - ); - if (onLoad) { - promise = promise.then(onLoad); - } - if (onError) { - promise = promise.catch(onError); - } - promise.catch(() => { - }); - }); - if (supportBlocking && blocking === "render") { - const key = import_common.deDupeKeyMap[tag][0]; - if (props[key]) { - const value = props[key]; - const promise = blockingPromiseMap[value] ||= new Promise((resolve, reject) => { - insert(element); - element.addEventListener("load", resolve); - element.addEventListener("error", reject); - }); - (0, import_hooks.use)(promise); - } - } - const jsxNode = { - tag, - type: tag, - props: { - ...restProps, - ref - }, - ref - }; - jsxNode.p = preserveNodeType; - if (element) { - jsxNode.e = element; - } - return (0, import_render.createPortal)( - jsxNode, - head - // eslint-disable-next-line @typescript-eslint/no-explicit-any - ); -}; -const title = (props) => { - const nameSpaceContext = (0, import_render.getNameSpaceContext)(); - const ns = nameSpaceContext && (0, import_context.useContext)(nameSpaceContext); - if (ns?.endsWith("svg")) { - return { - tag: "title", - props, - type: "title", - // eslint-disable-next-line @typescript-eslint/no-explicit-any - ref: props.ref - }; - } - return documentMetadataTag("title", props, void 0, false, false); -}; -const script = (props) => { - if (!props || ["src", "async"].some((k) => !props[k])) { - return { - tag: "script", - props, - type: "script", - ref: props.ref - }; - } - return documentMetadataTag("script", props, 1, false, true); -}; -const style = (props) => { - if (!props || !["href", "precedence"].every((k) => k in props)) { - return { - tag: "style", - props, - type: "style", - ref: props.ref - }; - } - props["data-href"] = props.href; - delete props.href; - return documentMetadataTag("style", props, 2, true, true); -}; -const link = (props) => { - if (!props || ["onLoad", "onError"].some((k) => k in props) || props.rel === "stylesheet" && (!("precedence" in props) || "disabled" in props)) { - return { - tag: "link", - props, - type: "link", - ref: props.ref - }; - } - return documentMetadataTag("link", props, 1, "precedence" in props, true); -}; -const meta = (props) => { - return documentMetadataTag("meta", props, void 0, false, false); -}; -const customEventFormAction = /* @__PURE__ */ Symbol(); -const form = (props) => { - const { action, ...restProps } = props; - if (typeof action !== "function") { - ; - restProps.action = action; - } - const [state, setState] = (0, import_hooks.useState)([null, false]); - const onSubmit = (0, import_hooks.useCallback)( - async (ev) => { - const currentAction = ev.isTrusted ? action : ev.detail[customEventFormAction]; - if (typeof currentAction !== "function") { - return; - } - ev.preventDefault(); - const formData = new FormData(ev.target); - setState([formData, true]); - const actionRes = currentAction(formData); - if (actionRes instanceof Promise) { - (0, import_hooks2.registerAction)(actionRes); - await actionRes; - } - setState([null, true]); - }, - [] - ); - const ref = composeRef(props.ref, (el) => { - el.addEventListener("submit", onSubmit); - return () => { - el.removeEventListener("submit", onSubmit); - }; - }); - const [data, isDirty] = state; - state[1] = false; - return { - tag: import_hooks2.FormContext, - props: { - value: { - pending: data !== null, - data, - method: data ? "post" : null, - action: data ? action : null - }, - children: { - tag: "form", - props: { - ...restProps, - ref - }, - type: "form", - ref - } - }, - f: isDirty - // eslint-disable-next-line @typescript-eslint/no-explicit-any - }; -}; -const formActionableElement = (tag, { - formAction, - ...props -}) => { - if (typeof formAction === "function") { - const onClick = (0, import_hooks.useCallback)((ev) => { - ev.preventDefault(); - ev.currentTarget.form.dispatchEvent( - new CustomEvent("submit", { detail: { [customEventFormAction]: formAction } }) - ); - }, []); - props.ref = composeRef(props.ref, (el) => { - el.addEventListener("click", onClick); - return () => { - el.removeEventListener("click", onClick); - }; - }); - } - return { - tag, - props, - type: tag, - ref: props.ref - // eslint-disable-next-line @typescript-eslint/no-explicit-any - }; -}; -const input = (props) => formActionableElement("input", props); -const button = (props) => formActionableElement("button", props); -Object.assign(import_common.domRenderers, { - title, - script, - style, - link, - meta, - form, - input, - button -}); -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - button, - clearCache, - composeRef, - form, - input, - link, - meta, - script, - style, - title -}); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/jsx/dom/jsx-dev-runtime.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/jsx/dom/jsx-dev-runtime.js deleted file mode 100644 index 24faf6c..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/jsx/dom/jsx-dev-runtime.js +++ /dev/null @@ -1,53 +0,0 @@ -"use strict"; -var __create = Object.create; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __getProtoOf = Object.getPrototypeOf; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( - // If the importer is in node compatibility mode or this is not an ESM - // file that has been converted to a CommonJS file using a Babel- - // compatible transform (i.e. "__esModule" has not been set), then set - // "default" to the CommonJS "module.exports" for node compatibility. - isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, - mod -)); -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var jsx_dev_runtime_exports = {}; -__export(jsx_dev_runtime_exports, { - Fragment: () => Fragment, - jsxDEV: () => jsxDEV -}); -module.exports = __toCommonJS(jsx_dev_runtime_exports); -var intrinsicElementTags = __toESM(require("./intrinsic-element/components"), 1); -const jsxDEV = (tag, props, key) => { - if (typeof tag === "string" && intrinsicElementTags[tag]) { - tag = intrinsicElementTags[tag]; - } - return { - tag, - type: tag, - props, - key, - ref: props.ref - }; -}; -const Fragment = (props) => jsxDEV("", props, void 0); -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - Fragment, - jsxDEV -}); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/jsx/dom/jsx-runtime.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/jsx/dom/jsx-runtime.js deleted file mode 100644 index be6fe82..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/jsx/dom/jsx-runtime.js +++ /dev/null @@ -1,33 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var jsx_runtime_exports = {}; -__export(jsx_runtime_exports, { - Fragment: () => import_jsx_dev_runtime.Fragment, - jsx: () => import_jsx_dev_runtime.jsxDEV, - jsxs: () => import_jsx_dev_runtime2.jsxDEV -}); -module.exports = __toCommonJS(jsx_runtime_exports); -var import_jsx_dev_runtime = require("./jsx-dev-runtime"); -var import_jsx_dev_runtime2 = require("./jsx-dev-runtime"); -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - Fragment, - jsx, - jsxs -}); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/jsx/dom/render.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/jsx/dom/render.js deleted file mode 100644 index 45291c4..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/jsx/dom/render.js +++ /dev/null @@ -1,622 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var render_exports = {}; -__export(render_exports, { - build: () => build, - buildDataStack: () => buildDataStack, - buildNode: () => buildNode, - createPortal: () => createPortal, - flushSync: () => flushSync, - getNameSpaceContext: () => getNameSpaceContext, - render: () => render, - renderNode: () => renderNode, - update: () => update -}); -module.exports = __toCommonJS(render_exports); -var import_children = require("../children"); -var import_constants = require("../constants"); -var import_context = require("../context"); -var import_hooks = require("../hooks"); -var import_utils = require("../utils"); -var import_context2 = require("./context"); -const HONO_PORTAL_ELEMENT = "_hp"; -const eventAliasMap = { - Change: "Input", - DoubleClick: "DblClick" -}; -const nameSpaceMap = { - svg: "2000/svg", - math: "1998/Math/MathML" -}; -const buildDataStack = []; -const refCleanupMap = /* @__PURE__ */ new WeakMap(); -let nameSpaceContext = void 0; -const getNameSpaceContext = () => nameSpaceContext; -const isNodeString = (node) => "t" in node; -const eventCache = { - // pre-define events that are used very frequently - onClick: ["click", false] -}; -const getEventSpec = (key) => { - if (!key.startsWith("on")) { - return void 0; - } - if (eventCache[key]) { - return eventCache[key]; - } - const match = key.match(/^on([A-Z][a-zA-Z]+?(?:PointerCapture)?)(Capture)?$/); - if (match) { - const [, eventName, capture] = match; - return eventCache[key] = [(eventAliasMap[eventName] || eventName).toLowerCase(), !!capture]; - } - return void 0; -}; -const toAttributeName = (element, key) => nameSpaceContext && element instanceof SVGElement && /[A-Z]/.test(key) && (key in element.style || // Presentation attributes are findable in style object. "clip-path", "font-size", "stroke-width", etc. -key.match(/^(?:o|pai|str|u|ve)/)) ? key.replace(/([A-Z])/g, "-$1").toLowerCase() : key; -const applyProps = (container, attributes, oldAttributes) => { - attributes ||= {}; - for (let key in attributes) { - const value = attributes[key]; - if (key !== "children" && (!oldAttributes || oldAttributes[key] !== value)) { - key = (0, import_utils.normalizeIntrinsicElementKey)(key); - const eventSpec = getEventSpec(key); - if (eventSpec) { - if (oldAttributes?.[key] !== value) { - if (oldAttributes) { - container.removeEventListener(eventSpec[0], oldAttributes[key], eventSpec[1]); - } - if (value != null) { - if (typeof value !== "function") { - throw new Error(`Event handler for "${key}" is not a function`); - } - container.addEventListener(eventSpec[0], value, eventSpec[1]); - } - } - } else if (key === "dangerouslySetInnerHTML" && value) { - container.innerHTML = value.__html; - } else if (key === "ref") { - let cleanup; - if (typeof value === "function") { - cleanup = value(container) || (() => value(null)); - } else if (value && "current" in value) { - value.current = container; - cleanup = () => value.current = null; - } - refCleanupMap.set(container, cleanup); - } else if (key === "style") { - const style = container.style; - if (typeof value === "string") { - style.cssText = value; - } else { - style.cssText = ""; - if (value != null) { - (0, import_utils.styleObjectForEach)(value, style.setProperty.bind(style)); - } - } - } else { - if (key === "value") { - const nodeName = container.nodeName; - if (nodeName === "INPUT" || nodeName === "TEXTAREA" || nodeName === "SELECT") { - ; - container.value = value === null || value === void 0 || value === false ? null : value; - if (nodeName === "TEXTAREA") { - container.textContent = value; - continue; - } else if (nodeName === "SELECT") { - if (container.selectedIndex === -1) { - ; - container.selectedIndex = 0; - } - continue; - } - } - } else if (key === "checked" && container.nodeName === "INPUT" || key === "selected" && container.nodeName === "OPTION") { - ; - container[key] = value; - } - const k = toAttributeName(container, key); - if (value === null || value === void 0 || value === false) { - container.removeAttribute(k); - } else if (value === true) { - container.setAttribute(k, ""); - } else if (typeof value === "string" || typeof value === "number") { - container.setAttribute(k, value); - } else { - container.setAttribute(k, value.toString()); - } - } - } - } - if (oldAttributes) { - for (let key in oldAttributes) { - const value = oldAttributes[key]; - if (key !== "children" && !(key in attributes)) { - key = (0, import_utils.normalizeIntrinsicElementKey)(key); - const eventSpec = getEventSpec(key); - if (eventSpec) { - container.removeEventListener(eventSpec[0], value, eventSpec[1]); - } else if (key === "ref") { - refCleanupMap.get(container)?.(); - } else { - container.removeAttribute(toAttributeName(container, key)); - } - } - } - } -}; -const invokeTag = (context, node) => { - node[import_constants.DOM_STASH][0] = 0; - buildDataStack.push([context, node]); - const func = node.tag[import_constants.DOM_RENDERER] || node.tag; - const props = func.defaultProps ? { - // eslint-disable-next-line @typescript-eslint/no-explicit-any - ...func.defaultProps, - ...node.props - } : node.props; - try { - return [func.call(null, props)]; - } finally { - buildDataStack.pop(); - } -}; -const getNextChildren = (node, container, nextChildren, childrenToRemove, callbacks) => { - if (node.vR?.length) { - childrenToRemove.push(...node.vR); - delete node.vR; - } - if (typeof node.tag === "function") { - node[import_constants.DOM_STASH][1][import_hooks.STASH_EFFECT]?.forEach((data) => callbacks.push(data)); - } - node.vC.forEach((child) => { - if (isNodeString(child)) { - nextChildren.push(child); - } else { - if (typeof child.tag === "function" || child.tag === "") { - child.c = container; - const currentNextChildrenIndex = nextChildren.length; - getNextChildren(child, container, nextChildren, childrenToRemove, callbacks); - if (child.s) { - for (let i = currentNextChildrenIndex; i < nextChildren.length; i++) { - nextChildren[i].s = true; - } - child.s = false; - } - } else { - nextChildren.push(child); - if (child.vR?.length) { - childrenToRemove.push(...child.vR); - delete child.vR; - } - } - } - }); -}; -const findInsertBefore = (node) => { - for (; ; node = node.tag === HONO_PORTAL_ELEMENT || !node.vC || !node.pP ? node.nN : node.vC[0]) { - if (!node) { - return null; - } - if (node.tag !== HONO_PORTAL_ELEMENT && node.e) { - return node.e; - } - } -}; -const removeNode = (node) => { - if (!isNodeString(node)) { - node[import_constants.DOM_STASH]?.[1][import_hooks.STASH_EFFECT]?.forEach((data) => data[2]?.()); - refCleanupMap.get(node.e)?.(); - if (node.p === 2) { - node.vC?.forEach((n) => n.p = 2); - } - node.vC?.forEach(removeNode); - } - if (!node.p) { - node.e?.remove(); - delete node.e; - } - if (typeof node.tag === "function") { - updateMap.delete(node); - fallbackUpdateFnArrayMap.delete(node); - delete node[import_constants.DOM_STASH][3]; - node.a = true; - } -}; -const apply = (node, container, isNew) => { - node.c = container; - applyNodeObject(node, container, isNew); -}; -const findChildNodeIndex = (childNodes, child) => { - if (!child) { - return; - } - for (let i = 0, len = childNodes.length; i < len; i++) { - if (childNodes[i] === child) { - return i; - } - } - return; -}; -const cancelBuild = /* @__PURE__ */ Symbol(); -const applyNodeObject = (node, container, isNew) => { - const next = []; - const remove = []; - const callbacks = []; - getNextChildren(node, container, next, remove, callbacks); - remove.forEach(removeNode); - const childNodes = isNew ? void 0 : container.childNodes; - let offset; - let insertBeforeNode = null; - if (isNew) { - offset = -1; - } else if (!childNodes.length) { - offset = 0; - } else { - const offsetByNextNode = findChildNodeIndex(childNodes, findInsertBefore(node.nN)); - if (offsetByNextNode !== void 0) { - insertBeforeNode = childNodes[offsetByNextNode]; - offset = offsetByNextNode; - } else { - offset = findChildNodeIndex(childNodes, next.find((n) => n.tag !== HONO_PORTAL_ELEMENT && n.e)?.e) ?? -1; - } - if (offset === -1) { - isNew = true; - } - } - for (let i = 0, len = next.length; i < len; i++, offset++) { - const child = next[i]; - let el; - if (child.s && child.e) { - el = child.e; - child.s = false; - } else { - const isNewLocal = isNew || !child.e; - if (isNodeString(child)) { - if (child.e && child.d) { - child.e.textContent = child.t; - } - child.d = false; - el = child.e ||= document.createTextNode(child.t); - } else { - el = child.e ||= child.n ? document.createElementNS(child.n, child.tag) : document.createElement(child.tag); - applyProps(el, child.props, child.pP); - applyNodeObject(child, el, isNewLocal); - } - } - if (child.tag === HONO_PORTAL_ELEMENT) { - offset--; - } else if (isNew) { - if (!el.parentNode) { - container.appendChild(el); - } - } else if (childNodes[offset] !== el && childNodes[offset - 1] !== el) { - if (childNodes[offset + 1] === el) { - container.appendChild(childNodes[offset]); - } else { - container.insertBefore(el, insertBeforeNode || childNodes[offset] || null); - } - } - } - if (node.pP) { - delete node.pP; - } - if (callbacks.length) { - const useLayoutEffectCbs = []; - const useEffectCbs = []; - callbacks.forEach(([, useLayoutEffectCb, , useEffectCb, useInsertionEffectCb]) => { - if (useLayoutEffectCb) { - useLayoutEffectCbs.push(useLayoutEffectCb); - } - if (useEffectCb) { - useEffectCbs.push(useEffectCb); - } - useInsertionEffectCb?.(); - }); - useLayoutEffectCbs.forEach((cb) => cb()); - if (useEffectCbs.length) { - requestAnimationFrame(() => { - useEffectCbs.forEach((cb) => cb()); - }); - } - } -}; -const isSameContext = (oldContexts, newContexts) => !!(oldContexts && oldContexts.length === newContexts.length && oldContexts.every((ctx, i) => ctx[1] === newContexts[i][1])); -const fallbackUpdateFnArrayMap = /* @__PURE__ */ new WeakMap(); -const build = (context, node, children) => { - const buildWithPreviousChildren = !children && node.pC; - if (children) { - node.pC ||= node.vC; - } - let foundErrorHandler; - try { - children ||= typeof node.tag == "function" ? invokeTag(context, node) : (0, import_children.toArray)(node.props.children); - if (children[0]?.tag === "" && children[0][import_constants.DOM_ERROR_HANDLER]) { - foundErrorHandler = children[0][import_constants.DOM_ERROR_HANDLER]; - context[5].push([context, foundErrorHandler, node]); - } - const oldVChildren = buildWithPreviousChildren ? [...node.pC] : node.vC ? [...node.vC] : void 0; - const vChildren = []; - let prevNode; - for (let i = 0; i < children.length; i++) { - if (Array.isArray(children[i])) { - children.splice(i, 1, ...children[i].flat()); - } - let child = buildNode(children[i]); - if (child) { - if (typeof child.tag === "function" && // eslint-disable-next-line @typescript-eslint/no-explicit-any - !child.tag[import_constants.DOM_INTERNAL_TAG]) { - if (import_context.globalContexts.length > 0) { - child[import_constants.DOM_STASH][2] = import_context.globalContexts.map((c) => [c, c.values.at(-1)]); - } - if (context[5]?.length) { - child[import_constants.DOM_STASH][3] = context[5].at(-1); - } - } - let oldChild; - if (oldVChildren && oldVChildren.length) { - const i2 = oldVChildren.findIndex( - isNodeString(child) ? (c) => isNodeString(c) : child.key !== void 0 ? (c) => c.key === child.key && c.tag === child.tag : (c) => c.tag === child.tag - ); - if (i2 !== -1) { - oldChild = oldVChildren[i2]; - oldVChildren.splice(i2, 1); - } - } - if (oldChild) { - if (isNodeString(child)) { - if (oldChild.t !== child.t) { - ; - oldChild.t = child.t; - oldChild.d = true; - } - child = oldChild; - } else { - const pP = oldChild.pP = oldChild.props; - oldChild.props = child.props; - oldChild.f ||= child.f || node.f; - if (typeof child.tag === "function") { - const oldContexts = oldChild[import_constants.DOM_STASH][2]; - oldChild[import_constants.DOM_STASH][2] = child[import_constants.DOM_STASH][2] || []; - oldChild[import_constants.DOM_STASH][3] = child[import_constants.DOM_STASH][3]; - if (!oldChild.f && ((oldChild.o || oldChild) === child.o || // The code generated by the react compiler is memoized under this condition. - oldChild.tag[import_constants.DOM_MEMO]?.(pP, oldChild.props)) && // The `memo` function is memoized under this condition. - isSameContext(oldContexts, oldChild[import_constants.DOM_STASH][2])) { - oldChild.s = true; - } - } - child = oldChild; - } - } else if (!isNodeString(child) && nameSpaceContext) { - const ns = (0, import_context.useContext)(nameSpaceContext); - if (ns) { - child.n = ns; - } - } - if (!isNodeString(child) && !child.s) { - build(context, child); - delete child.f; - } - vChildren.push(child); - if (prevNode && !prevNode.s && !child.s) { - for (let p = prevNode; p && !isNodeString(p); p = p.vC?.at(-1)) { - p.nN = child; - } - } - prevNode = child; - } - } - node.vR = buildWithPreviousChildren ? [...node.vC, ...oldVChildren || []] : oldVChildren || []; - node.vC = vChildren; - if (buildWithPreviousChildren) { - delete node.pC; - } - } catch (e) { - node.f = true; - if (e === cancelBuild) { - if (foundErrorHandler) { - return; - } else { - throw e; - } - } - const [errorHandlerContext, errorHandler, errorHandlerNode] = node[import_constants.DOM_STASH]?.[3] || []; - if (errorHandler) { - const fallbackUpdateFn = () => update([0, false, context[2]], errorHandlerNode); - const fallbackUpdateFnArray = fallbackUpdateFnArrayMap.get(errorHandlerNode) || []; - fallbackUpdateFnArray.push(fallbackUpdateFn); - fallbackUpdateFnArrayMap.set(errorHandlerNode, fallbackUpdateFnArray); - const fallback = errorHandler(e, () => { - const fnArray = fallbackUpdateFnArrayMap.get(errorHandlerNode); - if (fnArray) { - const i = fnArray.indexOf(fallbackUpdateFn); - if (i !== -1) { - fnArray.splice(i, 1); - return fallbackUpdateFn(); - } - } - }); - if (fallback) { - if (context[0] === 1) { - context[1] = true; - } else { - build(context, errorHandlerNode, [fallback]); - if ((errorHandler.length === 1 || context !== errorHandlerContext) && errorHandlerNode.c) { - apply(errorHandlerNode, errorHandlerNode.c, false); - return; - } - } - throw cancelBuild; - } - } - throw e; - } finally { - if (foundErrorHandler) { - context[5].pop(); - } - } -}; -const buildNode = (node) => { - if (node === void 0 || node === null || typeof node === "boolean") { - return void 0; - } else if (typeof node === "string" || typeof node === "number") { - return { t: node.toString(), d: true }; - } else { - if ("vR" in node) { - node = { - tag: node.tag, - props: node.props, - key: node.key, - f: node.f, - type: node.tag, - ref: node.props.ref, - o: node.o || node - // eslint-disable-next-line @typescript-eslint/no-explicit-any - }; - } - if (typeof node.tag === "function") { - ; - node[import_constants.DOM_STASH] = [0, []]; - } else { - const ns = nameSpaceMap[node.tag]; - if (ns) { - nameSpaceContext ||= (0, import_context2.createContext)(""); - node.props.children = [ - { - tag: nameSpaceContext, - props: { - value: node.n = `http://www.w3.org/${ns}`, - children: node.props.children - } - } - ]; - } - } - return node; - } -}; -const replaceContainer = (node, from, to) => { - if (node.c === from) { - node.c = to; - node.vC.forEach((child) => replaceContainer(child, from, to)); - } -}; -const updateSync = (context, node) => { - node[import_constants.DOM_STASH][2]?.forEach(([c, v]) => { - c.values.push(v); - }); - try { - build(context, node, void 0); - } catch { - return; - } - if (node.a) { - delete node.a; - return; - } - node[import_constants.DOM_STASH][2]?.forEach(([c]) => { - c.values.pop(); - }); - if (context[0] !== 1 || !context[1]) { - apply(node, node.c, false); - } -}; -const updateMap = /* @__PURE__ */ new WeakMap(); -const currentUpdateSets = []; -const update = async (context, node) => { - context[5] ||= []; - const existing = updateMap.get(node); - if (existing) { - existing[0](void 0); - } - let resolve; - const promise = new Promise((r) => resolve = r); - updateMap.set(node, [ - resolve, - () => { - if (context[2]) { - context[2](context, node, (context2) => { - updateSync(context2, node); - }).then(() => resolve(node)); - } else { - updateSync(context, node); - resolve(node); - } - } - ]); - if (currentUpdateSets.length) { - ; - currentUpdateSets.at(-1).add(node); - } else { - await Promise.resolve(); - const latest = updateMap.get(node); - if (latest) { - updateMap.delete(node); - latest[1](); - } - } - return promise; -}; -const renderNode = (node, container) => { - const context = []; - context[5] = []; - context[4] = true; - build(context, node, void 0); - context[4] = false; - const fragment = document.createDocumentFragment(); - apply(node, fragment, true); - replaceContainer(node, fragment, container); - container.replaceChildren(fragment); -}; -const render = (jsxNode, container) => { - renderNode(buildNode({ tag: "", props: { children: jsxNode } }), container); -}; -const flushSync = (callback) => { - const set = /* @__PURE__ */ new Set(); - currentUpdateSets.push(set); - callback(); - set.forEach((node) => { - const latest = updateMap.get(node); - if (latest) { - updateMap.delete(node); - latest[1](); - } - }); - currentUpdateSets.pop(); -}; -const createPortal = (children, container, key) => ({ - tag: HONO_PORTAL_ELEMENT, - props: { - children - }, - key, - e: container, - p: 1 - // eslint-disable-next-line @typescript-eslint/no-explicit-any -}); -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - build, - buildDataStack, - buildNode, - createPortal, - flushSync, - getNameSpaceContext, - render, - renderNode, - update -}); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/jsx/dom/server.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/jsx/dom/server.js deleted file mode 100644 index 58f12ed..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/jsx/dom/server.js +++ /dev/null @@ -1,68 +0,0 @@ -"use strict"; -var __create = Object.create; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __getProtoOf = Object.getPrototypeOf; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( - // If the importer is in node compatibility mode or this is not an ESM - // file that has been converted to a CommonJS file using a Babel- - // compatible transform (i.e. "__esModule" has not been set), then set - // "default" to the CommonJS "module.exports" for node compatibility. - isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, - mod -)); -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var server_exports = {}; -__export(server_exports, { - default: () => server_default, - renderToReadableStream: () => renderToReadableStream, - renderToString: () => renderToString, - version: () => import__.default -}); -module.exports = __toCommonJS(server_exports); -var import_streaming = require("../streaming"); -var import__ = __toESM(require("./"), 1); -const renderToString = (element, options = {}) => { - if (Object.keys(options).length > 0) { - console.warn("options are not supported yet"); - } - const res = element?.toString() ?? ""; - if (typeof res !== "string") { - throw new Error("Async component is not supported in renderToString"); - } - return res; -}; -const renderToReadableStream = async (element, options = {}) => { - if (Object.keys(options).some((key) => key !== "onError")) { - console.warn("options are not supported yet, except onError"); - } - if (!element || typeof element !== "object") { - element = element?.toString() ?? ""; - } - return (0, import_streaming.renderToReadableStream)(element, options.onError); -}; -var server_default = { - renderToString, - renderToReadableStream, - version: import__.default -}; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - renderToReadableStream, - renderToString, - version -}); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/jsx/dom/utils.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/jsx/dom/utils.js deleted file mode 100644 index 47d6fb6..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/jsx/dom/utils.js +++ /dev/null @@ -1,33 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var utils_exports = {}; -__export(utils_exports, { - setInternalTagFlag: () => setInternalTagFlag -}); -module.exports = __toCommonJS(utils_exports); -var import_constants = require("../constants"); -const setInternalTagFlag = (fn) => { - ; - fn[import_constants.DOM_INTERNAL_TAG] = true; - return fn; -}; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - setInternalTagFlag -}); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/jsx/hooks/index.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/jsx/hooks/index.js deleted file mode 100644 index 948bd75..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/jsx/hooks/index.js +++ /dev/null @@ -1,371 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var hooks_exports = {}; -__export(hooks_exports, { - STASH_EFFECT: () => STASH_EFFECT, - createRef: () => createRef, - forwardRef: () => forwardRef, - startTransition: () => startTransition, - startViewTransition: () => startViewTransition, - use: () => use, - useCallback: () => useCallback, - useDebugValue: () => useDebugValue, - useDeferredValue: () => useDeferredValue, - useEffect: () => useEffect, - useId: () => useId, - useImperativeHandle: () => useImperativeHandle, - useInsertionEffect: () => useInsertionEffect, - useLayoutEffect: () => useLayoutEffect, - useMemo: () => useMemo, - useReducer: () => useReducer, - useRef: () => useRef, - useState: () => useState, - useSyncExternalStore: () => useSyncExternalStore, - useTransition: () => useTransition, - useViewTransition: () => useViewTransition -}); -module.exports = __toCommonJS(hooks_exports); -var import_constants = require("../constants"); -var import_render = require("../dom/render"); -const STASH_SATE = 0; -const STASH_EFFECT = 1; -const STASH_CALLBACK = 2; -const STASH_MEMO = 3; -const STASH_REF = 4; -const resolvedPromiseValueMap = /* @__PURE__ */ new WeakMap(); -const isDepsChanged = (prevDeps, deps) => !prevDeps || !deps || prevDeps.length !== deps.length || deps.some((dep, i) => dep !== prevDeps[i]); -let viewTransitionState = void 0; -const documentStartViewTransition = (cb) => { - if (document?.startViewTransition) { - return document.startViewTransition(cb); - } else { - cb(); - return { finished: Promise.resolve() }; - } -}; -let updateHook = void 0; -const viewTransitionHook = (context, node, cb) => { - const state = [true, false]; - let lastVC = node.vC; - return documentStartViewTransition(() => { - if (lastVC === node.vC) { - viewTransitionState = state; - cb(context); - viewTransitionState = void 0; - lastVC = node.vC; - } - }).finished.then(() => { - if (state[1] && lastVC === node.vC) { - state[0] = false; - viewTransitionState = state; - cb(context); - viewTransitionState = void 0; - } - }); -}; -const startViewTransition = (callback) => { - updateHook = viewTransitionHook; - try { - callback(); - } finally { - updateHook = void 0; - } -}; -const useViewTransition = () => { - const buildData = import_render.buildDataStack.at(-1); - if (!buildData) { - return [false, () => { - }]; - } - if (viewTransitionState) { - viewTransitionState[1] = true; - } - return [!!viewTransitionState?.[0], startViewTransition]; -}; -const pendingStack = []; -const runCallback = (type, callback) => { - let resolve; - const promise = new Promise((r) => resolve = r); - pendingStack.push([type, promise]); - try { - const res = callback(); - if (res instanceof Promise) { - res.then(resolve, resolve); - } else { - resolve(); - } - } finally { - pendingStack.pop(); - } -}; -const startTransition = (callback) => { - runCallback(1, callback); -}; -const startTransitionHook = (callback) => { - runCallback(2, callback); -}; -const useTransition = () => { - const buildData = import_render.buildDataStack.at(-1); - if (!buildData) { - return [false, () => { - }]; - } - const [error, setError] = useState(); - const [state, updateState] = useState(); - if (error) { - throw error[0]; - } - const startTransitionLocalHook = useCallback( - (callback) => { - startTransitionHook(() => { - updateState((state2) => !state2); - let res = callback(); - if (res instanceof Promise) { - res = res.catch((e) => { - setError([e]); - }); - } - return res; - }); - }, - [state] - ); - const [context] = buildData; - return [context[0] === 2, startTransitionLocalHook]; -}; -const useDeferredValue = (value, ...rest) => { - const [values, setValues] = useState( - rest.length ? [rest[0], rest[0]] : [value, value] - ); - if (Object.is(values[1], value)) { - return values[1]; - } - pendingStack.push([3, Promise.resolve()]); - updateHook = async (context, _, cb) => { - cb(context); - values[0] = value; - }; - setValues([values[0], value]); - updateHook = void 0; - pendingStack.pop(); - return values[0]; -}; -const useState = (initialState) => { - const resolveInitialState = () => typeof initialState === "function" ? initialState() : initialState; - const buildData = import_render.buildDataStack.at(-1); - if (!buildData) { - return [resolveInitialState(), () => { - }]; - } - const [, node] = buildData; - const stateArray = node[import_constants.DOM_STASH][1][STASH_SATE] ||= []; - const hookIndex = node[import_constants.DOM_STASH][0]++; - return stateArray[hookIndex] ||= [ - resolveInitialState(), - (newState) => { - const localUpdateHook = updateHook; - const stateData = stateArray[hookIndex]; - if (typeof newState === "function") { - newState = newState(stateData[0]); - } - if (!Object.is(newState, stateData[0])) { - stateData[0] = newState; - if (pendingStack.length) { - const [pendingType, pendingPromise] = pendingStack.at(-1); - Promise.all([ - pendingType === 3 ? node : (0, import_render.update)([pendingType, false, localUpdateHook], node), - pendingPromise - ]).then(([node2]) => { - if (!node2 || !(pendingType === 2 || pendingType === 3)) { - return; - } - const lastVC = node2.vC; - const addUpdateTask = () => { - setTimeout(() => { - if (lastVC !== node2.vC) { - return; - } - (0, import_render.update)([pendingType === 3 ? 1 : 0, false, localUpdateHook], node2); - }); - }; - requestAnimationFrame(addUpdateTask); - }); - } else { - (0, import_render.update)([0, false, localUpdateHook], node); - } - } - } - ]; -}; -const useReducer = (reducer, initialArg, init) => { - const handler = useCallback( - (action) => { - setState((state2) => reducer(state2, action)); - }, - [reducer] - ); - const [state, setState] = useState(() => init ? init(initialArg) : initialArg); - return [state, handler]; -}; -const useEffectCommon = (index, effect, deps) => { - const buildData = import_render.buildDataStack.at(-1); - if (!buildData) { - return; - } - const [, node] = buildData; - const effectDepsArray = node[import_constants.DOM_STASH][1][STASH_EFFECT] ||= []; - const hookIndex = node[import_constants.DOM_STASH][0]++; - const [prevDeps, , prevCleanup] = effectDepsArray[hookIndex] ||= []; - if (isDepsChanged(prevDeps, deps)) { - if (prevCleanup) { - prevCleanup(); - } - const runner = () => { - data[index] = void 0; - data[2] = effect(); - }; - const data = [deps, void 0, void 0, void 0, void 0]; - data[index] = runner; - effectDepsArray[hookIndex] = data; - } -}; -const useEffect = (effect, deps) => useEffectCommon(3, effect, deps); -const useLayoutEffect = (effect, deps) => useEffectCommon(1, effect, deps); -const useInsertionEffect = (effect, deps) => useEffectCommon(4, effect, deps); -const useCallback = (callback, deps) => { - const buildData = import_render.buildDataStack.at(-1); - if (!buildData) { - return callback; - } - const [, node] = buildData; - const callbackArray = node[import_constants.DOM_STASH][1][STASH_CALLBACK] ||= []; - const hookIndex = node[import_constants.DOM_STASH][0]++; - const prevDeps = callbackArray[hookIndex]; - if (isDepsChanged(prevDeps?.[1], deps)) { - callbackArray[hookIndex] = [callback, deps]; - } else { - callback = callbackArray[hookIndex][0]; - } - return callback; -}; -const useRef = (initialValue) => { - const buildData = import_render.buildDataStack.at(-1); - if (!buildData) { - return { current: initialValue }; - } - const [, node] = buildData; - const refArray = node[import_constants.DOM_STASH][1][STASH_REF] ||= []; - const hookIndex = node[import_constants.DOM_STASH][0]++; - return refArray[hookIndex] ||= { current: initialValue }; -}; -const use = (promise) => { - const cachedRes = resolvedPromiseValueMap.get(promise); - if (cachedRes) { - if (cachedRes.length === 2) { - throw cachedRes[1]; - } - return cachedRes[0]; - } - promise.then( - (res) => resolvedPromiseValueMap.set(promise, [res]), - (e) => resolvedPromiseValueMap.set(promise, [void 0, e]) - ); - throw promise; -}; -const useMemo = (factory, deps) => { - const buildData = import_render.buildDataStack.at(-1); - if (!buildData) { - return factory(); - } - const [, node] = buildData; - const memoArray = node[import_constants.DOM_STASH][1][STASH_MEMO] ||= []; - const hookIndex = node[import_constants.DOM_STASH][0]++; - const prevDeps = memoArray[hookIndex]; - if (isDepsChanged(prevDeps?.[1], deps)) { - memoArray[hookIndex] = [factory(), deps]; - } - return memoArray[hookIndex][0]; -}; -let idCounter = 0; -const useId = () => useMemo(() => `:r${(idCounter++).toString(32)}:`, []); -const useDebugValue = (_value, _formatter) => { -}; -const createRef = () => { - return { current: null }; -}; -const forwardRef = (Component) => { - return (props) => { - const { ref, ...rest } = props; - return Component(rest, ref); - }; -}; -const useImperativeHandle = (ref, createHandle, deps) => { - useEffect(() => { - ref.current = createHandle(); - return () => { - ref.current = null; - }; - }, deps); -}; -const useSyncExternalStore = (subscribe, getSnapshot, getServerSnapshot) => { - const buildData = import_render.buildDataStack.at(-1); - if (!buildData) { - if (!getServerSnapshot) { - throw new Error("getServerSnapshot is required for server side rendering"); - } - return getServerSnapshot(); - } - const [serverSnapshotIsUsed] = useState(!!(buildData[0][4] && getServerSnapshot)); - const [state, setState] = useState( - () => serverSnapshotIsUsed ? getServerSnapshot() : getSnapshot() - ); - useEffect(() => { - if (serverSnapshotIsUsed) { - setState(getSnapshot()); - } - return subscribe(() => { - setState(getSnapshot()); - }); - }, []); - return state; -}; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - STASH_EFFECT, - createRef, - forwardRef, - startTransition, - startViewTransition, - use, - useCallback, - useDebugValue, - useDeferredValue, - useEffect, - useId, - useImperativeHandle, - useInsertionEffect, - useLayoutEffect, - useMemo, - useReducer, - useRef, - useState, - useSyncExternalStore, - useTransition, - useViewTransition -}); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/jsx/index.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/jsx/index.js deleted file mode 100644 index d750bb0..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/jsx/index.js +++ /dev/null @@ -1,139 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var jsx_exports = {}; -__export(jsx_exports, { - Children: () => import_children.Children, - ErrorBoundary: () => import_components.ErrorBoundary, - Fragment: () => import_base.Fragment, - StrictMode: () => import_base.Fragment, - Suspense: () => import_streaming.Suspense, - cloneElement: () => import_base.cloneElement, - createContext: () => import_context.createContext, - createElement: () => import_base.jsx, - createRef: () => import_hooks2.createRef, - default: () => jsx_default, - forwardRef: () => import_hooks2.forwardRef, - isValidElement: () => import_base.isValidElement, - jsx: () => import_base.jsx, - memo: () => import_base.memo, - startTransition: () => import_hooks2.startTransition, - startViewTransition: () => import_hooks2.startViewTransition, - use: () => import_hooks2.use, - useActionState: () => import_hooks.useActionState, - useCallback: () => import_hooks2.useCallback, - useContext: () => import_context.useContext, - useDebugValue: () => import_hooks2.useDebugValue, - useDeferredValue: () => import_hooks2.useDeferredValue, - useEffect: () => import_hooks2.useEffect, - useId: () => import_hooks2.useId, - useImperativeHandle: () => import_hooks2.useImperativeHandle, - useInsertionEffect: () => import_hooks2.useInsertionEffect, - useLayoutEffect: () => import_hooks2.useLayoutEffect, - useMemo: () => import_hooks2.useMemo, - useOptimistic: () => import_hooks.useOptimistic, - useReducer: () => import_hooks2.useReducer, - useRef: () => import_hooks2.useRef, - useState: () => import_hooks2.useState, - useSyncExternalStore: () => import_hooks2.useSyncExternalStore, - useTransition: () => import_hooks2.useTransition, - useViewTransition: () => import_hooks2.useViewTransition, - version: () => import_base.reactAPICompatVersion -}); -module.exports = __toCommonJS(jsx_exports); -var import_base = require("./base"); -var import_children = require("./children"); -var import_components = require("./components"); -var import_context = require("./context"); -var import_hooks = require("./dom/hooks"); -var import_hooks2 = require("./hooks"); -var import_streaming = require("./streaming"); -var jsx_default = { - version: import_base.reactAPICompatVersion, - memo: import_base.memo, - Fragment: import_base.Fragment, - StrictMode: import_base.Fragment, - isValidElement: import_base.isValidElement, - createElement: import_base.jsx, - cloneElement: import_base.cloneElement, - ErrorBoundary: import_components.ErrorBoundary, - createContext: import_context.createContext, - useContext: import_context.useContext, - useState: import_hooks2.useState, - useEffect: import_hooks2.useEffect, - useRef: import_hooks2.useRef, - useCallback: import_hooks2.useCallback, - useReducer: import_hooks2.useReducer, - useId: import_hooks2.useId, - useDebugValue: import_hooks2.useDebugValue, - use: import_hooks2.use, - startTransition: import_hooks2.startTransition, - useTransition: import_hooks2.useTransition, - useDeferredValue: import_hooks2.useDeferredValue, - startViewTransition: import_hooks2.startViewTransition, - useViewTransition: import_hooks2.useViewTransition, - useMemo: import_hooks2.useMemo, - useLayoutEffect: import_hooks2.useLayoutEffect, - useInsertionEffect: import_hooks2.useInsertionEffect, - createRef: import_hooks2.createRef, - forwardRef: import_hooks2.forwardRef, - useImperativeHandle: import_hooks2.useImperativeHandle, - useSyncExternalStore: import_hooks2.useSyncExternalStore, - useActionState: import_hooks.useActionState, - useOptimistic: import_hooks.useOptimistic, - Suspense: import_streaming.Suspense, - Children: import_children.Children -}; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - Children, - ErrorBoundary, - Fragment, - StrictMode, - Suspense, - cloneElement, - createContext, - createElement, - createRef, - forwardRef, - isValidElement, - jsx, - memo, - startTransition, - startViewTransition, - use, - useActionState, - useCallback, - useContext, - useDebugValue, - useDeferredValue, - useEffect, - useId, - useImperativeHandle, - useInsertionEffect, - useLayoutEffect, - useMemo, - useOptimistic, - useReducer, - useRef, - useState, - useSyncExternalStore, - useTransition, - useViewTransition, - version -}); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/jsx/intrinsic-element/common.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/jsx/intrinsic-element/common.js deleted file mode 100644 index c01838f..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/jsx/intrinsic-element/common.js +++ /dev/null @@ -1,40 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var common_exports = {}; -__export(common_exports, { - dataPrecedenceAttr: () => dataPrecedenceAttr, - deDupeKeyMap: () => deDupeKeyMap, - domRenderers: () => domRenderers -}); -module.exports = __toCommonJS(common_exports); -const deDupeKeyMap = { - title: [], - script: ["src"], - style: ["data-href"], - link: ["href"], - meta: ["name", "httpEquiv", "charset", "itemProp"] -}; -const domRenderers = {}; -const dataPrecedenceAttr = "data-precedence"; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - dataPrecedenceAttr, - deDupeKeyMap, - domRenderers -}); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/jsx/intrinsic-element/components.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/jsx/intrinsic-element/components.js deleted file mode 100644 index a945c46..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/jsx/intrinsic-element/components.js +++ /dev/null @@ -1,183 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var components_exports = {}; -__export(components_exports, { - button: () => button, - form: () => form, - input: () => input, - link: () => link, - meta: () => meta, - script: () => script, - style: () => style, - title: () => title -}); -module.exports = __toCommonJS(components_exports); -var import_html = require("../../helper/html"); -var import_base = require("../base"); -var import_children = require("../children"); -var import_constants = require("../constants"); -var import_context = require("../context"); -var import_common = require("./common"); -const metaTagMap = /* @__PURE__ */ new WeakMap(); -const insertIntoHead = (tagName, tag, props, precedence) => ({ buffer, context }) => { - if (!buffer) { - return; - } - const map = metaTagMap.get(context) || {}; - metaTagMap.set(context, map); - const tags = map[tagName] ||= []; - let duped = false; - const deDupeKeys = import_common.deDupeKeyMap[tagName]; - if (deDupeKeys.length > 0) { - LOOP: for (const [, tagProps] of tags) { - for (const key of deDupeKeys) { - if ((tagProps?.[key] ?? null) === props?.[key]) { - duped = true; - break LOOP; - } - } - } - } - if (duped) { - buffer[0] = buffer[0].replaceAll(tag, ""); - } else if (deDupeKeys.length > 0) { - tags.push([tag, props, precedence]); - } else { - tags.unshift([tag, props, precedence]); - } - if (buffer[0].indexOf("") !== -1) { - let insertTags; - if (precedence === void 0) { - insertTags = tags.map(([tag2]) => tag2); - } else { - const precedences = []; - insertTags = tags.map(([tag2, , precedence2]) => { - let order = precedences.indexOf(precedence2); - if (order === -1) { - precedences.push(precedence2); - order = precedences.length - 1; - } - return [tag2, order]; - }).sort((a, b) => a[1] - b[1]).map(([tag2]) => tag2); - } - insertTags.forEach((tag2) => { - buffer[0] = buffer[0].replaceAll(tag2, ""); - }); - buffer[0] = buffer[0].replace(/(?=<\/head>)/, insertTags.join("")); - } -}; -const returnWithoutSpecialBehavior = (tag, children, props) => (0, import_html.raw)(new import_base.JSXNode(tag, props, (0, import_children.toArray)(children ?? [])).toString()); -const documentMetadataTag = (tag, children, props, sort) => { - if ("itemProp" in props) { - return returnWithoutSpecialBehavior(tag, children, props); - } - let { precedence, blocking, ...restProps } = props; - precedence = sort ? precedence ?? "" : void 0; - if (sort) { - restProps[import_common.dataPrecedenceAttr] = precedence; - } - const string = new import_base.JSXNode(tag, restProps, (0, import_children.toArray)(children || [])).toString(); - if (string instanceof Promise) { - return string.then( - (resString) => (0, import_html.raw)(string, [ - ...resString.callbacks || [], - insertIntoHead(tag, resString, restProps, precedence) - ]) - ); - } else { - return (0, import_html.raw)(string, [insertIntoHead(tag, string, restProps, precedence)]); - } -}; -const title = ({ children, ...props }) => { - const nameSpaceContext = (0, import_base.getNameSpaceContext)(); - if (nameSpaceContext) { - const context = (0, import_context.useContext)(nameSpaceContext); - if (context === "svg" || context === "head") { - return new import_base.JSXNode( - "title", - props, - (0, import_children.toArray)(children ?? []) - ); - } - } - return documentMetadataTag("title", children, props, false); -}; -const script = ({ - children, - ...props -}) => { - const nameSpaceContext = (0, import_base.getNameSpaceContext)(); - if (["src", "async"].some((k) => !props[k]) || nameSpaceContext && (0, import_context.useContext)(nameSpaceContext) === "head") { - return returnWithoutSpecialBehavior("script", children, props); - } - return documentMetadataTag("script", children, props, false); -}; -const style = ({ - children, - ...props -}) => { - if (!["href", "precedence"].every((k) => k in props)) { - return returnWithoutSpecialBehavior("style", children, props); - } - props["data-href"] = props.href; - delete props.href; - return documentMetadataTag("style", children, props, true); -}; -const link = ({ children, ...props }) => { - if (["onLoad", "onError"].some((k) => k in props) || props.rel === "stylesheet" && (!("precedence" in props) || "disabled" in props)) { - return returnWithoutSpecialBehavior("link", children, props); - } - return documentMetadataTag("link", children, props, "precedence" in props); -}; -const meta = ({ children, ...props }) => { - const nameSpaceContext = (0, import_base.getNameSpaceContext)(); - if (nameSpaceContext && (0, import_context.useContext)(nameSpaceContext) === "head") { - return returnWithoutSpecialBehavior("meta", children, props); - } - return documentMetadataTag("meta", children, props, false); -}; -const newJSXNode = (tag, { children, ...props }) => ( - // eslint-disable-next-line @typescript-eslint/no-explicit-any - new import_base.JSXNode(tag, props, (0, import_children.toArray)(children ?? [])) -); -const form = (props) => { - if (typeof props.action === "function") { - props.action = import_constants.PERMALINK in props.action ? props.action[import_constants.PERMALINK] : void 0; - } - return newJSXNode("form", props); -}; -const formActionableElement = (tag, props) => { - if (typeof props.formAction === "function") { - props.formAction = import_constants.PERMALINK in props.formAction ? props.formAction[import_constants.PERMALINK] : void 0; - } - return newJSXNode(tag, props); -}; -const input = (props) => formActionableElement("input", props); -const button = (props) => formActionableElement("button", props); -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - button, - form, - input, - link, - meta, - script, - style, - title -}); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/jsx/intrinsic-elements.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/jsx/intrinsic-elements.js deleted file mode 100644 index c0053b0..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/jsx/intrinsic-elements.js +++ /dev/null @@ -1,16 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var intrinsic_elements_exports = {}; -module.exports = __toCommonJS(intrinsic_elements_exports); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/jsx/jsx-dev-runtime.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/jsx/jsx-dev-runtime.js deleted file mode 100644 index a5ee5ef..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/jsx/jsx-dev-runtime.js +++ /dev/null @@ -1,42 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var jsx_dev_runtime_exports = {}; -__export(jsx_dev_runtime_exports, { - Fragment: () => import_base2.Fragment, - jsxDEV: () => jsxDEV -}); -module.exports = __toCommonJS(jsx_dev_runtime_exports); -var import_base = require("./base"); -var import_base2 = require("./base"); -function jsxDEV(tag, props, key) { - let node; - if (!props || !("children" in props)) { - node = (0, import_base.jsxFn)(tag, props, []); - } else { - const children = props.children; - node = Array.isArray(children) ? (0, import_base.jsxFn)(tag, props, children) : (0, import_base.jsxFn)(tag, props, [children]); - } - node.key = key; - return node; -} -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - Fragment, - jsxDEV -}); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/jsx/jsx-runtime.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/jsx/jsx-runtime.js deleted file mode 100644 index c1f4306..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/jsx/jsx-runtime.js +++ /dev/null @@ -1,69 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var jsx_runtime_exports = {}; -__export(jsx_runtime_exports, { - Fragment: () => import_jsx_dev_runtime.Fragment, - jsx: () => import_jsx_dev_runtime.jsxDEV, - jsxAttr: () => jsxAttr, - jsxEscape: () => jsxEscape, - jsxTemplate: () => import_html.html, - jsxs: () => import_jsx_dev_runtime2.jsxDEV -}); -module.exports = __toCommonJS(jsx_runtime_exports); -var import_jsx_dev_runtime = require("./jsx-dev-runtime"); -var import_jsx_dev_runtime2 = require("./jsx-dev-runtime"); -var import_html = require("../helper/html"); -var import_html2 = require("../utils/html"); -var import_utils = require("./utils"); -const jsxAttr = (key, v) => { - const buffer = [`${key}="`]; - if (key === "style" && typeof v === "object") { - let styleStr = ""; - (0, import_utils.styleObjectForEach)(v, (property, value) => { - if (value != null) { - styleStr += `${styleStr ? ";" : ""}${property}:${value}`; - } - }); - (0, import_html2.escapeToBuffer)(styleStr, buffer); - buffer[0] += '"'; - } else if (typeof v === "string") { - (0, import_html2.escapeToBuffer)(v, buffer); - buffer[0] += '"'; - } else if (v === null || v === void 0) { - return (0, import_html.raw)(""); - } else if (typeof v === "number" || v.isEscaped) { - buffer[0] += `${v}"`; - } else if (v instanceof Promise) { - buffer.unshift('"', v); - } else { - (0, import_html2.escapeToBuffer)(v.toString(), buffer); - buffer[0] += '"'; - } - return buffer.length === 1 ? (0, import_html.raw)(buffer[0]) : (0, import_html2.stringBufferToString)(buffer, void 0); -}; -const jsxEscape = (value) => value; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - Fragment, - jsx, - jsxAttr, - jsxEscape, - jsxTemplate, - jsxs -}); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/jsx/streaming.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/jsx/streaming.js deleted file mode 100644 index fe1ecaf..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/jsx/streaming.js +++ /dev/null @@ -1,168 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var streaming_exports = {}; -__export(streaming_exports, { - StreamingContext: () => StreamingContext, - Suspense: () => Suspense, - renderToReadableStream: () => renderToReadableStream -}); -module.exports = __toCommonJS(streaming_exports); -var import_html = require("../helper/html"); -var import_html2 = require("../utils/html"); -var import_base = require("./base"); -var import_components = require("./components"); -var import_constants = require("./constants"); -var import_context = require("./context"); -var import_components2 = require("./dom/components"); -var import_render = require("./dom/render"); -const StreamingContext = (0, import_context.createContext)(null); -let suspenseCounter = 0; -const Suspense = async ({ - children, - fallback -}) => { - if (!Array.isArray(children)) { - children = [children]; - } - const nonce = (0, import_context.useContext)(StreamingContext)?.scriptNonce; - let resArray = []; - const stackNode = { [import_constants.DOM_STASH]: [0, []] }; - const popNodeStack = (value) => { - import_render.buildDataStack.pop(); - return value; - }; - try { - stackNode[import_constants.DOM_STASH][0] = 0; - import_render.buildDataStack.push([[], stackNode]); - resArray = children.map( - (c) => c == null || typeof c === "boolean" ? "" : c.toString() - ); - } catch (e) { - if (e instanceof Promise) { - resArray = [ - e.then(() => { - stackNode[import_constants.DOM_STASH][0] = 0; - import_render.buildDataStack.push([[], stackNode]); - return (0, import_components.childrenToString)(children).then(popNodeStack); - }) - ]; - } else { - throw e; - } - } finally { - popNodeStack(); - } - if (resArray.some((res) => res instanceof Promise)) { - const index = suspenseCounter++; - const fallbackStr = await fallback.toString(); - return (0, import_html.raw)(`${fallbackStr}`, [ - ...fallbackStr.callbacks || [], - ({ phase, buffer, context }) => { - if (phase === import_html2.HtmlEscapedCallbackPhase.BeforeStream) { - return; - } - return Promise.all(resArray).then(async (htmlArray) => { - htmlArray = htmlArray.flat(); - const content = htmlArray.join(""); - if (buffer) { - buffer[0] = buffer[0].replace( - new RegExp(`.*?`), - content - ); - } - let html = buffer ? "" : ` -((d,c,n) => { -c=d.currentScript.previousSibling -d=d.getElementById('H:${index}') -if(!d)return -do{n=d.nextSibling;n.remove()}while(n.nodeType!=8||n.nodeValue!='/$') -d.replaceWith(c.content) -})(document) -`; - const callbacks = htmlArray.map((html2) => html2.callbacks || []).flat(); - if (!callbacks.length) { - return html; - } - if (phase === import_html2.HtmlEscapedCallbackPhase.Stream) { - html = await (0, import_html2.resolveCallback)(html, import_html2.HtmlEscapedCallbackPhase.BeforeStream, true, context); - } - return (0, import_html.raw)(html, callbacks); - }); - } - ]); - } else { - return (0, import_html.raw)(resArray.join("")); - } -}; -Suspense[import_constants.DOM_RENDERER] = import_components2.Suspense; -const textEncoder = new TextEncoder(); -const renderToReadableStream = (content, onError = console.trace) => { - const reader = new ReadableStream({ - async start(controller) { - try { - if (content instanceof import_base.JSXNode) { - content = content.toString(); - } - const context = typeof content === "object" ? content : {}; - const resolved = await (0, import_html2.resolveCallback)( - content, - import_html2.HtmlEscapedCallbackPhase.BeforeStream, - true, - context - ); - controller.enqueue(textEncoder.encode(resolved)); - let resolvedCount = 0; - const callbacks = []; - const then = (promise) => { - callbacks.push( - promise.catch((err) => { - console.log(err); - onError(err); - return ""; - }).then(async (res) => { - res = await (0, import_html2.resolveCallback)( - res, - import_html2.HtmlEscapedCallbackPhase.BeforeStream, - true, - context - ); - res.callbacks?.map((c) => c({ phase: import_html2.HtmlEscapedCallbackPhase.Stream, context })).filter(Boolean).forEach(then); - resolvedCount++; - controller.enqueue(textEncoder.encode(res)); - }) - ); - }; - resolved.callbacks?.map((c) => c({ phase: import_html2.HtmlEscapedCallbackPhase.Stream, context })).filter(Boolean).forEach(then); - while (resolvedCount !== callbacks.length) { - await Promise.all(callbacks); - } - } catch (e) { - onError(e); - } - controller.close(); - } - }); - return reader; -}; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - StreamingContext, - Suspense, - renderToReadableStream -}); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/jsx/types.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/jsx/types.js deleted file mode 100644 index 43ae536..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/jsx/types.js +++ /dev/null @@ -1,16 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var types_exports = {}; -module.exports = __toCommonJS(types_exports); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/jsx/utils.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/jsx/utils.js deleted file mode 100644 index 7dcfe0d..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/jsx/utils.js +++ /dev/null @@ -1,51 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var utils_exports = {}; -__export(utils_exports, { - normalizeIntrinsicElementKey: () => normalizeIntrinsicElementKey, - styleObjectForEach: () => styleObjectForEach -}); -module.exports = __toCommonJS(utils_exports); -const normalizeElementKeyMap = /* @__PURE__ */ new Map([ - ["className", "class"], - ["htmlFor", "for"], - ["crossOrigin", "crossorigin"], - ["httpEquiv", "http-equiv"], - ["itemProp", "itemprop"], - ["fetchPriority", "fetchpriority"], - ["noModule", "nomodule"], - ["formAction", "formaction"] -]); -const normalizeIntrinsicElementKey = (key) => normalizeElementKeyMap.get(key) || key; -const styleObjectForEach = (style, fn) => { - for (const [k, v] of Object.entries(style)) { - const key = k[0] === "-" || !/[A-Z]/.test(k) ? k : k.replace(/[A-Z]/g, (m) => `-${m.toLowerCase()}`); - fn( - key, - v == null ? null : typeof v === "number" ? !key.match( - /^(?:a|border-im|column(?:-c|s)|flex(?:$|-[^b])|grid-(?:ar|[^a])|font-w|li|or|sca|st|ta|wido|z)|ty$/ - ) ? `${v}px` : `${v}` : v - ); - } -}; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - normalizeIntrinsicElementKey, - styleObjectForEach -}); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/middleware/basic-auth/index.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/middleware/basic-auth/index.js deleted file mode 100644 index 8560493..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/middleware/basic-auth/index.js +++ /dev/null @@ -1,83 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var basic_auth_exports = {}; -__export(basic_auth_exports, { - basicAuth: () => basicAuth -}); -module.exports = __toCommonJS(basic_auth_exports); -var import_http_exception = require("../../http-exception"); -var import_basic_auth = require("../../utils/basic-auth"); -var import_buffer = require("../../utils/buffer"); -const basicAuth = (options, ...users) => { - const usernamePasswordInOptions = "username" in options && "password" in options; - const verifyUserInOptions = "verifyUser" in options; - if (!(usernamePasswordInOptions || verifyUserInOptions)) { - throw new Error( - 'basic auth middleware requires options for "username and password" or "verifyUser"' - ); - } - if (!options.realm) { - options.realm = "Secure Area"; - } - if (!options.invalidUserMessage) { - options.invalidUserMessage = "Unauthorized"; - } - if (usernamePasswordInOptions) { - users.unshift({ username: options.username, password: options.password }); - } - return async function basicAuth2(ctx, next) { - const requestUser = (0, import_basic_auth.auth)(ctx.req.raw); - if (requestUser) { - if (verifyUserInOptions) { - if (await options.verifyUser(requestUser.username, requestUser.password, ctx)) { - await next(); - return; - } - } else { - for (const user of users) { - const [usernameEqual, passwordEqual] = await Promise.all([ - (0, import_buffer.timingSafeEqual)(user.username, requestUser.username, options.hashFunction), - (0, import_buffer.timingSafeEqual)(user.password, requestUser.password, options.hashFunction) - ]); - if (usernameEqual && passwordEqual) { - await next(); - return; - } - } - } - } - const status = 401; - const headers = { - "WWW-Authenticate": 'Basic realm="' + options.realm?.replace(/"/g, '\\"') + '"' - }; - const responseMessage = typeof options.invalidUserMessage === "function" ? await options.invalidUserMessage(ctx) : options.invalidUserMessage; - const res = typeof responseMessage === "string" ? new Response(responseMessage, { status, headers }) : new Response(JSON.stringify(responseMessage), { - status, - headers: { - ...headers, - "content-type": "application/json" - } - }); - throw new import_http_exception.HTTPException(status, { res }); - }; -}; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - basicAuth -}); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/middleware/bearer-auth/index.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/middleware/bearer-auth/index.js deleted file mode 100644 index 58d0c2b..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/middleware/bearer-auth/index.js +++ /dev/null @@ -1,106 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var bearer_auth_exports = {}; -__export(bearer_auth_exports, { - bearerAuth: () => bearerAuth -}); -module.exports = __toCommonJS(bearer_auth_exports); -var import_http_exception = require("../../http-exception"); -var import_buffer = require("../../utils/buffer"); -const TOKEN_STRINGS = "[A-Za-z0-9._~+/-]+=*"; -const PREFIX = "Bearer"; -const HEADER = "Authorization"; -const bearerAuth = (options) => { - if (!("token" in options || "verifyToken" in options)) { - throw new Error('bearer auth middleware requires options for "token"'); - } - if (!options.realm) { - options.realm = ""; - } - if (options.prefix === void 0) { - options.prefix = PREFIX; - } - const realm = options.realm?.replace(/"/g, '\\"'); - const prefixRegexStr = options.prefix === "" ? "" : `${options.prefix} +`; - const regexp = new RegExp(`^${prefixRegexStr}(${TOKEN_STRINGS}) *$`); - const wwwAuthenticatePrefix = options.prefix === "" ? "" : `${options.prefix} `; - const throwHTTPException = async (c, status, wwwAuthenticateHeader, messageOption) => { - const wwwAuthenticateHeaderValue = typeof wwwAuthenticateHeader === "function" ? await wwwAuthenticateHeader(c) : wwwAuthenticateHeader; - const headers = { - "WWW-Authenticate": typeof wwwAuthenticateHeaderValue === "string" ? wwwAuthenticateHeaderValue : `${wwwAuthenticatePrefix}${Object.entries(wwwAuthenticateHeaderValue).map(([key, value]) => `${key}="${value}"`).join(",")}` - }; - const responseMessage = typeof messageOption === "function" ? await messageOption(c) : messageOption; - const res = typeof responseMessage === "string" ? new Response(responseMessage, { status, headers }) : new Response(JSON.stringify(responseMessage), { - status, - headers: { - ...headers, - "content-type": "application/json" - } - }); - throw new import_http_exception.HTTPException(status, { res }); - }; - return async function bearerAuth2(c, next) { - const headerToken = c.req.header(options.headerName || HEADER); - if (!headerToken) { - await throwHTTPException( - c, - 401, - options.noAuthenticationHeader?.wwwAuthenticateHeader || `${wwwAuthenticatePrefix}realm="${realm}"`, - options.noAuthenticationHeader?.message || options.noAuthenticationHeaderMessage || "Unauthorized" - ); - } else { - const match = regexp.exec(headerToken); - if (!match) { - await throwHTTPException( - c, - 400, - options.invalidAuthenticationHeader?.wwwAuthenticateHeader || `${wwwAuthenticatePrefix}error="invalid_request"`, - options.invalidAuthenticationHeader?.message || options.invalidAuthenticationHeaderMessage || "Bad Request" - ); - } else { - let equal = false; - if ("verifyToken" in options) { - equal = await options.verifyToken(match[1], c); - } else if (typeof options.token === "string") { - equal = await (0, import_buffer.timingSafeEqual)(options.token, match[1], options.hashFunction); - } else if (Array.isArray(options.token) && options.token.length > 0) { - for (const token of options.token) { - if (await (0, import_buffer.timingSafeEqual)(token, match[1], options.hashFunction)) { - equal = true; - break; - } - } - } - if (!equal) { - await throwHTTPException( - c, - 401, - options.invalidToken?.wwwAuthenticateHeader || `${wwwAuthenticatePrefix}error="invalid_token"`, - options.invalidToken?.message || options.invalidTokenMessage || "Unauthorized" - ); - } - } - } - await next(); - }; -}; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - bearerAuth -}); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/middleware/body-limit/index.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/middleware/body-limit/index.js deleted file mode 100644 index 6d65ab6..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/middleware/body-limit/index.js +++ /dev/null @@ -1,85 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var body_limit_exports = {}; -__export(body_limit_exports, { - bodyLimit: () => bodyLimit -}); -module.exports = __toCommonJS(body_limit_exports); -var import_http_exception = require("../../http-exception"); -const ERROR_MESSAGE = "Payload Too Large"; -class BodyLimitError extends Error { - constructor(message) { - super(message); - this.name = "BodyLimitError"; - } -} -const bodyLimit = (options) => { - const onError = options.onError || (() => { - const res = new Response(ERROR_MESSAGE, { - status: 413 - }); - throw new import_http_exception.HTTPException(413, { res }); - }); - const maxSize = options.maxSize; - return async function bodyLimit2(c, next) { - if (!c.req.raw.body) { - return next(); - } - const hasTransferEncoding = c.req.raw.headers.has("transfer-encoding"); - const hasContentLength = c.req.raw.headers.has("content-length"); - if (hasTransferEncoding && hasContentLength) { - } - if (hasContentLength && !hasTransferEncoding) { - const contentLength = parseInt(c.req.raw.headers.get("content-length") || "0", 10); - return contentLength > maxSize ? onError(c) : next(); - } - let size = 0; - const rawReader = c.req.raw.body.getReader(); - const reader = new ReadableStream({ - async start(controller) { - try { - for (; ; ) { - const { done, value } = await rawReader.read(); - if (done) { - break; - } - size += value.length; - if (size > maxSize) { - controller.error(new BodyLimitError(ERROR_MESSAGE)); - break; - } - controller.enqueue(value); - } - } finally { - controller.close(); - } - } - }); - const requestInit = { body: reader, duplex: "half" }; - c.req.raw = new Request(c.req.raw, requestInit); - await next(); - if (c.error instanceof BodyLimitError) { - c.res = await onError(c); - } - }; -}; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - bodyLimit -}); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/middleware/cache/index.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/middleware/cache/index.js deleted file mode 100644 index 1aba622..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/middleware/cache/index.js +++ /dev/null @@ -1,102 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var cache_exports = {}; -__export(cache_exports, { - cache: () => cache -}); -module.exports = __toCommonJS(cache_exports); -const defaultCacheableStatusCodes = [200]; -const shouldSkipCache = (res) => { - const vary = res.headers.get("Vary"); - return vary && vary.includes("*"); -}; -const cache = (options) => { - if (!globalThis.caches) { - console.log("Cache Middleware is not enabled because caches is not defined."); - return async (_c, next) => await next(); - } - if (options.wait === void 0) { - options.wait = false; - } - const cacheControlDirectives = options.cacheControl?.split(",").map((directive) => directive.toLowerCase()); - const varyDirectives = Array.isArray(options.vary) ? options.vary : options.vary?.split(",").map((directive) => directive.trim()); - if (options.vary?.includes("*")) { - throw new Error( - 'Middleware vary configuration cannot include "*", as it disallows effective caching.' - ); - } - const cacheableStatusCodes = new Set( - options.cacheableStatusCodes ?? defaultCacheableStatusCodes - ); - const addHeader = (c) => { - if (cacheControlDirectives) { - const existingDirectives = c.res.headers.get("Cache-Control")?.split(",").map((d) => d.trim().split("=", 1)[0]) ?? []; - for (const directive of cacheControlDirectives) { - let [name, value] = directive.trim().split("=", 2); - name = name.toLowerCase(); - if (!existingDirectives.includes(name)) { - c.header("Cache-Control", `${name}${value ? `=${value}` : ""}`, { append: true }); - } - } - } - if (varyDirectives) { - const existingDirectives = c.res.headers.get("Vary")?.split(",").map((d) => d.trim()) ?? []; - const vary = Array.from( - new Set( - [...existingDirectives, ...varyDirectives].map((directive) => directive.toLowerCase()) - ) - ).sort(); - if (vary.includes("*")) { - c.header("Vary", "*"); - } else { - c.header("Vary", vary.join(", ")); - } - } - }; - return async function cache2(c, next) { - let key = c.req.url; - if (options.keyGenerator) { - key = await options.keyGenerator(c); - } - const cacheName = typeof options.cacheName === "function" ? await options.cacheName(c) : options.cacheName; - const cache3 = await caches.open(cacheName); - const response = await cache3.match(key); - if (response) { - return new Response(response.body, response); - } - await next(); - if (!cacheableStatusCodes.has(c.res.status)) { - return; - } - addHeader(c); - if (shouldSkipCache(c.res)) { - return; - } - const res = c.res.clone(); - if (options.wait) { - await cache3.put(key, res); - } else { - c.executionCtx.waitUntil(cache3.put(key, res)); - } - }; -}; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - cache -}); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/middleware/combine/index.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/middleware/combine/index.js deleted file mode 100644 index 2889137..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/middleware/combine/index.js +++ /dev/null @@ -1,102 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except2, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except2) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var combine_exports = {}; -__export(combine_exports, { - every: () => every, - except: () => except, - some: () => some -}); -module.exports = __toCommonJS(combine_exports); -var import_compose = require("../../compose"); -var import_router = require("../../router"); -var import_trie_router = require("../../router/trie-router"); -const some = (...middleware) => { - return async function some2(c, next) { - let isNextCalled = false; - const wrappedNext = () => { - isNextCalled = true; - return next(); - }; - let lastError; - for (const handler of middleware) { - try { - const result = await handler(c, wrappedNext); - if (result === true && !c.finalized) { - await wrappedNext(); - } else if (result === false) { - lastError = new Error("No successful middleware found"); - continue; - } - lastError = void 0; - break; - } catch (error) { - lastError = error; - if (isNextCalled) { - break; - } - } - } - if (lastError) { - throw lastError; - } - }; -}; -const every = (...middleware) => { - return async function every2(c, next) { - const currentRouteIndex = c.req.routeIndex; - await (0, import_compose.compose)( - middleware.map((m) => [ - [ - async (c2, next2) => { - c2.req.routeIndex = currentRouteIndex; - const res = await m(c2, next2); - if (res === false) { - throw new Error("Unmet condition"); - } - return res; - } - ] - ]) - )(c, next); - }; -}; -const except = (condition, ...middleware) => { - let router = void 0; - const conditions = (Array.isArray(condition) ? condition : [condition]).map((condition2) => { - if (typeof condition2 === "string") { - router ||= new import_trie_router.TrieRouter(); - router.add(import_router.METHOD_NAME_ALL, condition2, true); - } else { - return condition2; - } - }).filter(Boolean); - if (router) { - conditions.unshift((c) => !!router?.match(import_router.METHOD_NAME_ALL, c.req.path)?.[0]?.[0]?.[0]); - } - const handler = some((c) => conditions.some((cond) => cond(c)), every(...middleware)); - return async function except2(c, next) { - await handler(c, next); - }; -}; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - every, - except, - some -}); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/middleware/compress/index.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/middleware/compress/index.js deleted file mode 100644 index 3a29b46..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/middleware/compress/index.js +++ /dev/null @@ -1,62 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var compress_exports = {}; -__export(compress_exports, { - compress: () => compress -}); -module.exports = __toCommonJS(compress_exports); -var import_compress = require("../../utils/compress"); -const ENCODING_TYPES = ["gzip", "deflate"]; -const cacheControlNoTransformRegExp = /(?:^|,)\s*?no-transform\s*?(?:,|$)/i; -const compress = (options) => { - const threshold = options?.threshold ?? 1024; - return async function compress2(ctx, next) { - await next(); - const contentLength = ctx.res.headers.get("Content-Length"); - if (ctx.res.headers.has("Content-Encoding") || // already encoded - ctx.res.headers.has("Transfer-Encoding") || // already encoded or chunked - ctx.req.method === "HEAD" || // HEAD request - contentLength && Number(contentLength) < threshold || // content-length below threshold - !shouldCompress(ctx.res) || // not compressible type - !shouldTransform(ctx.res)) { - return; - } - const accepted = ctx.req.header("Accept-Encoding"); - const encoding = options?.encoding ?? ENCODING_TYPES.find((encoding2) => accepted?.includes(encoding2)); - if (!encoding || !ctx.res.body) { - return; - } - const stream = new CompressionStream(encoding); - ctx.res = new Response(ctx.res.body.pipeThrough(stream), ctx.res); - ctx.res.headers.delete("Content-Length"); - ctx.res.headers.set("Content-Encoding", encoding); - }; -}; -const shouldCompress = (res) => { - const type = res.headers.get("Content-Type"); - return type && import_compress.COMPRESSIBLE_CONTENT_TYPE_REGEX.test(type); -}; -const shouldTransform = (res) => { - const cacheControl = res.headers.get("Cache-Control"); - return !cacheControl || !cacheControlNoTransformRegExp.test(cacheControl); -}; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - compress -}); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/middleware/context-storage/index.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/middleware/context-storage/index.js deleted file mode 100644 index d1370ef..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/middleware/context-storage/index.js +++ /dev/null @@ -1,48 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var context_storage_exports = {}; -__export(context_storage_exports, { - contextStorage: () => contextStorage, - getContext: () => getContext, - tryGetContext: () => tryGetContext -}); -module.exports = __toCommonJS(context_storage_exports); -var import_node_async_hooks = require("node:async_hooks"); -const asyncLocalStorage = new import_node_async_hooks.AsyncLocalStorage(); -const contextStorage = () => { - return async function contextStorage2(c, next) { - await asyncLocalStorage.run(c, next); - }; -}; -const tryGetContext = () => { - return asyncLocalStorage.getStore(); -}; -const getContext = () => { - const context = tryGetContext(); - if (!context) { - throw new Error("Context is not available"); - } - return context; -}; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - contextStorage, - getContext, - tryGetContext -}); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/middleware/cors/index.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/middleware/cors/index.js deleted file mode 100644 index db07713..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/middleware/cors/index.js +++ /dev/null @@ -1,110 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var cors_exports = {}; -__export(cors_exports, { - cors: () => cors -}); -module.exports = __toCommonJS(cors_exports); -const cors = (options) => { - const defaults = { - origin: "*", - allowMethods: ["GET", "HEAD", "PUT", "POST", "DELETE", "PATCH"], - allowHeaders: [], - exposeHeaders: [] - }; - const opts = { - ...defaults, - ...options - }; - const findAllowOrigin = ((optsOrigin) => { - if (typeof optsOrigin === "string") { - if (optsOrigin === "*") { - return () => optsOrigin; - } else { - return (origin) => optsOrigin === origin ? origin : null; - } - } else if (typeof optsOrigin === "function") { - return optsOrigin; - } else { - return (origin) => optsOrigin.includes(origin) ? origin : null; - } - })(opts.origin); - const findAllowMethods = ((optsAllowMethods) => { - if (typeof optsAllowMethods === "function") { - return optsAllowMethods; - } else if (Array.isArray(optsAllowMethods)) { - return () => optsAllowMethods; - } else { - return () => []; - } - })(opts.allowMethods); - return async function cors2(c, next) { - function set(key, value) { - c.res.headers.set(key, value); - } - const allowOrigin = await findAllowOrigin(c.req.header("origin") || "", c); - if (allowOrigin) { - set("Access-Control-Allow-Origin", allowOrigin); - } - if (opts.credentials) { - set("Access-Control-Allow-Credentials", "true"); - } - if (opts.exposeHeaders?.length) { - set("Access-Control-Expose-Headers", opts.exposeHeaders.join(",")); - } - if (c.req.method === "OPTIONS") { - if (opts.origin !== "*") { - set("Vary", "Origin"); - } - if (opts.maxAge != null) { - set("Access-Control-Max-Age", opts.maxAge.toString()); - } - const allowMethods = await findAllowMethods(c.req.header("origin") || "", c); - if (allowMethods.length) { - set("Access-Control-Allow-Methods", allowMethods.join(",")); - } - let headers = opts.allowHeaders; - if (!headers?.length) { - const requestHeaders = c.req.header("Access-Control-Request-Headers"); - if (requestHeaders) { - headers = requestHeaders.split(/\s*,\s*/); - } - } - if (headers?.length) { - set("Access-Control-Allow-Headers", headers.join(",")); - c.res.headers.append("Vary", "Access-Control-Request-Headers"); - } - c.res.headers.delete("Content-Length"); - c.res.headers.delete("Content-Type"); - return new Response(null, { - headers: c.res.headers, - status: 204, - statusText: "No Content" - }); - } - await next(); - if (opts.origin !== "*") { - c.header("Vary", "Origin", { append: true }); - } - }; -}; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - cors -}); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/middleware/csrf/index.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/middleware/csrf/index.js deleted file mode 100644 index 9434a5f..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/middleware/csrf/index.js +++ /dev/null @@ -1,78 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var csrf_exports = {}; -__export(csrf_exports, { - csrf: () => csrf -}); -module.exports = __toCommonJS(csrf_exports); -var import_http_exception = require("../../http-exception"); -const secFetchSiteValues = ["same-origin", "same-site", "none", "cross-site"]; -const isSecFetchSite = (value) => secFetchSiteValues.includes(value); -const isSafeMethodRe = /^(GET|HEAD)$/; -const isRequestedByFormElementRe = /^\b(application\/x-www-form-urlencoded|multipart\/form-data|text\/plain)\b/i; -const csrf = (options) => { - const originHandler = ((optsOrigin) => { - if (!optsOrigin) { - return (origin, c) => origin === new URL(c.req.url).origin; - } else if (typeof optsOrigin === "string") { - return (origin) => origin === optsOrigin; - } else if (typeof optsOrigin === "function") { - return optsOrigin; - } else { - return (origin) => optsOrigin.includes(origin); - } - })(options?.origin); - const isAllowedOrigin = async (origin, c) => { - if (origin === void 0) { - return false; - } - return await originHandler(origin, c); - }; - const secFetchSiteHandler = ((optsSecFetchSite) => { - if (!optsSecFetchSite) { - return (secFetchSite) => secFetchSite === "same-origin"; - } else if (typeof optsSecFetchSite === "string") { - return (secFetchSite) => secFetchSite === optsSecFetchSite; - } else if (typeof optsSecFetchSite === "function") { - return optsSecFetchSite; - } else { - return (secFetchSite) => optsSecFetchSite.includes(secFetchSite); - } - })(options?.secFetchSite); - const isAllowedSecFetchSite = async (secFetchSite, c) => { - if (secFetchSite === void 0) { - return false; - } - if (!isSecFetchSite(secFetchSite)) { - return false; - } - return await secFetchSiteHandler(secFetchSite, c); - }; - return async function csrf2(c, next) { - if (!isSafeMethodRe.test(c.req.method) && isRequestedByFormElementRe.test(c.req.header("content-type") || "text/plain") && !await isAllowedSecFetchSite(c.req.header("sec-fetch-site"), c) && !await isAllowedOrigin(c.req.header("origin"), c)) { - const res = new Response("Forbidden", { status: 403 }); - throw new import_http_exception.HTTPException(403, { res }); - } - await next(); - }; -}; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - csrf -}); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/middleware/etag/digest.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/middleware/etag/digest.js deleted file mode 100644 index cbfde28..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/middleware/etag/digest.js +++ /dev/null @@ -1,56 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var digest_exports = {}; -__export(digest_exports, { - generateDigest: () => generateDigest -}); -module.exports = __toCommonJS(digest_exports); -const mergeBuffers = (buffer1, buffer2) => { - if (!buffer1) { - return buffer2; - } - const merged = new Uint8Array( - new ArrayBuffer(buffer1.byteLength + buffer2.byteLength) - ); - merged.set(new Uint8Array(buffer1), 0); - merged.set(buffer2, buffer1.byteLength); - return merged; -}; -const generateDigest = async (stream, generator) => { - if (!stream) { - return null; - } - let result = void 0; - const reader = stream.getReader(); - for (; ; ) { - const { value, done } = await reader.read(); - if (done) { - break; - } - result = await generator(mergeBuffers(result, value)); - } - if (!result) { - return null; - } - return Array.prototype.map.call(new Uint8Array(result), (x) => x.toString(16).padStart(2, "0")).join(""); -}; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - generateDigest -}); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/middleware/etag/index.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/middleware/etag/index.js deleted file mode 100644 index e65652b..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/middleware/etag/index.js +++ /dev/null @@ -1,96 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var etag_exports = {}; -__export(etag_exports, { - RETAINED_304_HEADERS: () => RETAINED_304_HEADERS, - etag: () => etag -}); -module.exports = __toCommonJS(etag_exports); -var import_digest = require("./digest"); -const RETAINED_304_HEADERS = [ - "cache-control", - "content-location", - "date", - "etag", - "expires", - "vary" -]; -const stripWeak = (tag) => tag.replace(/^W\//, ""); -function etagMatches(etag2, ifNoneMatch) { - return ifNoneMatch != null && ifNoneMatch.split(/,\s*/).some((t) => stripWeak(t) === stripWeak(etag2)); -} -function initializeGenerator(generator) { - if (!generator) { - if (crypto && crypto.subtle) { - generator = (body) => crypto.subtle.digest( - { - name: "SHA-1" - }, - body - ); - } - } - return generator; -} -const etag = (options) => { - const retainedHeaders = options?.retainedHeaders ?? RETAINED_304_HEADERS; - const weak = options?.weak ?? false; - const generator = initializeGenerator(options?.generateDigest); - return async function etag2(c, next) { - const ifNoneMatch = c.req.header("If-None-Match") ?? null; - await next(); - const res = c.res; - let etag3 = res.headers.get("ETag"); - if (!etag3) { - if (!generator) { - return; - } - const hash = await (0, import_digest.generateDigest)( - // This type casing avoids the type error for `deno publish` - res.clone().body, - generator - ); - if (hash === null) { - return; - } - etag3 = weak ? `W/"${hash}"` : `"${hash}"`; - } - if (etagMatches(etag3, ifNoneMatch)) { - c.res = new Response(null, { - status: 304, - statusText: "Not Modified", - headers: { - ETag: etag3 - } - }); - c.res.headers.forEach((_, key) => { - if (retainedHeaders.indexOf(key.toLowerCase()) === -1) { - c.res.headers.delete(key); - } - }); - } else { - c.res.headers.set("ETag", etag3); - } - }; -}; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - RETAINED_304_HEADERS, - etag -}); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/middleware/ip-restriction/index.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/middleware/ip-restriction/index.js deleted file mode 100644 index 29738a0..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/middleware/ip-restriction/index.js +++ /dev/null @@ -1,125 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var ip_restriction_exports = {}; -__export(ip_restriction_exports, { - ipRestriction: () => ipRestriction -}); -module.exports = __toCommonJS(ip_restriction_exports); -var import_http_exception = require("../../http-exception"); -var import_ipaddr = require("../../utils/ipaddr"); -const IS_CIDR_NOTATION_REGEX = /\/[0-9]{0,3}$/; -const buildMatcher = (rules) => { - const functionRules = []; - const staticRules = /* @__PURE__ */ new Set(); - const cidrRules = []; - for (let rule of rules) { - if (rule === "*") { - return () => true; - } else if (typeof rule === "function") { - functionRules.push(rule); - } else { - if (IS_CIDR_NOTATION_REGEX.test(rule)) { - const separatedRule = rule.split("/"); - const addrStr = separatedRule[0]; - const type2 = (0, import_ipaddr.distinctRemoteAddr)(addrStr); - if (type2 === void 0) { - throw new TypeError(`Invalid rule: ${rule}`); - } - const isIPv4 = type2 === "IPv4"; - const prefix = parseInt(separatedRule[1]); - if (isIPv4 ? prefix === 32 : prefix === 128) { - rule = addrStr; - } else { - const addr = (isIPv4 ? import_ipaddr.convertIPv4ToBinary : import_ipaddr.convertIPv6ToBinary)(addrStr); - const mask = (1n << BigInt(prefix)) - 1n << BigInt((isIPv4 ? 32 : 128) - prefix); - cidrRules.push([isIPv4, addr & mask, mask]); - continue; - } - } - const type = (0, import_ipaddr.distinctRemoteAddr)(rule); - if (type === void 0) { - throw new TypeError(`Invalid rule: ${rule}`); - } - staticRules.add( - type === "IPv4" ? rule : (0, import_ipaddr.convertIPv6BinaryToString)((0, import_ipaddr.convertIPv6ToBinary)(rule)) - // normalize IPv6 address (e.g. 0000:0000:0000:0000:0000:0000:0000:0001 => ::1) - ); - } - } - return (remote) => { - if (staticRules.has(remote.addr)) { - return true; - } - for (const [isIPv4, addr, mask] of cidrRules) { - if (isIPv4 !== remote.isIPv4) { - continue; - } - const remoteAddr = remote.binaryAddr ||= (isIPv4 ? import_ipaddr.convertIPv4ToBinary : import_ipaddr.convertIPv6ToBinary)(remote.addr); - if ((remoteAddr & mask) === addr) { - return true; - } - } - for (const rule of functionRules) { - if (rule({ addr: remote.addr, type: remote.type })) { - return true; - } - } - return false; - }; -}; -const ipRestriction = (getIP, { denyList = [], allowList = [] }, onError) => { - const allowLength = allowList.length; - const denyMatcher = buildMatcher(denyList); - const allowMatcher = buildMatcher(allowList); - const blockError = (c) => new import_http_exception.HTTPException(403, { - res: c.text("Forbidden", { - status: 403 - }) - }); - return async function ipRestriction2(c, next) { - const connInfo = getIP(c); - const addr = typeof connInfo === "string" ? connInfo : connInfo.remote.address; - if (!addr) { - throw blockError(c); - } - const type = typeof connInfo !== "string" && connInfo.remote.addressType || (0, import_ipaddr.distinctRemoteAddr)(addr); - const remoteData = { addr, type, isIPv4: type === "IPv4" }; - if (denyMatcher(remoteData)) { - if (onError) { - return onError({ addr, type }, c); - } - throw blockError(c); - } - if (allowMatcher(remoteData)) { - return await next(); - } - if (allowLength === 0) { - return await next(); - } else { - if (onError) { - return await onError({ addr, type }, c); - } - throw blockError(c); - } - }; -}; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - ipRestriction -}); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/middleware/jsx-renderer/index.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/middleware/jsx-renderer/index.js deleted file mode 100644 index 3d7c32d..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/middleware/jsx-renderer/index.js +++ /dev/null @@ -1,82 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var jsx_renderer_exports = {}; -__export(jsx_renderer_exports, { - RequestContext: () => RequestContext, - jsxRenderer: () => jsxRenderer, - useRequestContext: () => useRequestContext -}); -module.exports = __toCommonJS(jsx_renderer_exports); -var import_html = require("../../helper/html"); -var import_jsx = require("../../jsx"); -var import_streaming = require("../../jsx/streaming"); -const RequestContext = (0, import_jsx.createContext)(null); -const createRenderer = (c, Layout, component, options) => (children, props) => { - const docType = typeof options?.docType === "string" ? options.docType : options?.docType === false ? "" : ""; - const currentLayout = component ? (0, import_jsx.jsx)( - (props2) => component(props2, c), - { - Layout, - ...props - }, - children - ) : children; - const body = import_html.html`${(0, import_html.raw)(docType)}${(0, import_jsx.jsx)( - RequestContext.Provider, - { value: c }, - currentLayout - )}`; - if (options?.stream) { - if (options.stream === true) { - c.header("Transfer-Encoding", "chunked"); - c.header("Content-Type", "text/html; charset=UTF-8"); - c.header("Content-Encoding", "Identity"); - } else { - for (const [key, value] of Object.entries(options.stream)) { - c.header(key, value); - } - } - return c.body((0, import_streaming.renderToReadableStream)(body)); - } else { - return c.html(body); - } -}; -const jsxRenderer = (component, options) => function jsxRenderer2(c, next) { - const Layout = c.getLayout() ?? import_jsx.Fragment; - if (component) { - c.setLayout((props) => { - return component({ ...props, Layout }, c); - }); - } - c.setRenderer(createRenderer(c, Layout, component, options)); - return next(); -}; -const useRequestContext = () => { - const c = (0, import_jsx.useContext)(RequestContext); - if (!c) { - throw new Error("RequestContext is not provided."); - } - return c; -}; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - RequestContext, - jsxRenderer, - useRequestContext -}); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/middleware/jwk/index.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/middleware/jwk/index.js deleted file mode 100644 index 1c22463..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/middleware/jwk/index.js +++ /dev/null @@ -1,28 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var jwk_exports = {}; -__export(jwk_exports, { - jwk: () => import_jwk.jwk -}); -module.exports = __toCommonJS(jwk_exports); -var import_jwk = require("./jwk"); -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - jwk -}); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/middleware/jwk/jwk.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/middleware/jwk/jwk.js deleted file mode 100644 index 7554466..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/middleware/jwk/jwk.js +++ /dev/null @@ -1,131 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var jwk_exports = {}; -__export(jwk_exports, { - jwk: () => jwk -}); -module.exports = __toCommonJS(jwk_exports); -var import_cookie = require("../../helper/cookie"); -var import_http_exception = require("../../http-exception"); -var import_jwt = require("../../utils/jwt"); -var import_context = require("../../context"); -const jwk = (options, init) => { - const verifyOpts = options.verification || {}; - if (!options || !(options.keys || options.jwks_uri)) { - throw new Error('JWK auth middleware requires options for either "keys" or "jwks_uri" or both'); - } - if (!crypto.subtle || !crypto.subtle.importKey) { - throw new Error("`crypto.subtle.importKey` is undefined. JWK auth middleware requires it."); - } - return async function jwk2(ctx, next) { - const headerName = options.headerName || "Authorization"; - const credentials = ctx.req.raw.headers.get(headerName); - let token; - if (credentials) { - const parts = credentials.split(/\s+/); - if (parts.length !== 2) { - const errDescription = "invalid credentials structure"; - throw new import_http_exception.HTTPException(401, { - message: errDescription, - res: unauthorizedResponse({ - ctx, - error: "invalid_request", - errDescription - }) - }); - } else { - token = parts[1]; - } - } else if (options.cookie) { - if (typeof options.cookie == "string") { - token = (0, import_cookie.getCookie)(ctx, options.cookie); - } else if (options.cookie.secret) { - if (options.cookie.prefixOptions) { - token = await (0, import_cookie.getSignedCookie)( - ctx, - options.cookie.secret, - options.cookie.key, - options.cookie.prefixOptions - ); - } else { - token = await (0, import_cookie.getSignedCookie)(ctx, options.cookie.secret, options.cookie.key); - } - } else { - if (options.cookie.prefixOptions) { - token = (0, import_cookie.getCookie)(ctx, options.cookie.key, options.cookie.prefixOptions); - } else { - token = (0, import_cookie.getCookie)(ctx, options.cookie.key); - } - } - } - if (!token) { - if (options.allow_anon) { - return next(); - } - const errDescription = "no authorization included in request"; - throw new import_http_exception.HTTPException(401, { - message: errDescription, - res: unauthorizedResponse({ - ctx, - error: "invalid_request", - errDescription - }) - }); - } - let payload; - let cause; - try { - const keys = typeof options.keys === "function" ? await options.keys(ctx) : options.keys; - const jwks_uri = typeof options.jwks_uri === "function" ? await options.jwks_uri(ctx) : options.jwks_uri; - payload = await import_jwt.Jwt.verifyWithJwks(token, { keys, jwks_uri, verification: verifyOpts }, init); - } catch (e) { - cause = e; - } - if (!payload) { - if (cause instanceof Error && cause.constructor === Error) { - throw cause; - } - throw new import_http_exception.HTTPException(401, { - message: "Unauthorized", - res: unauthorizedResponse({ - ctx, - error: "invalid_token", - statusText: "Unauthorized", - errDescription: "token verification failure" - }), - cause - }); - } - ctx.set("jwtPayload", payload); - await next(); - }; -}; -function unauthorizedResponse(opts) { - return new Response("Unauthorized", { - status: 401, - statusText: opts.statusText, - headers: { - "WWW-Authenticate": `Bearer realm="${opts.ctx.req.url}",error="${opts.error}",error_description="${opts.errDescription}"` - } - }); -} -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - jwk -}); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/middleware/jwt/index.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/middleware/jwt/index.js deleted file mode 100644 index 4af8bbe..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/middleware/jwt/index.js +++ /dev/null @@ -1,36 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var jwt_exports = {}; -__export(jwt_exports, { - decode: () => import_jwt.decode, - jwt: () => import_jwt.jwt, - sign: () => import_jwt.sign, - verify: () => import_jwt.verify, - verifyWithJwks: () => import_jwt.verifyWithJwks -}); -module.exports = __toCommonJS(jwt_exports); -var import_jwt = require("./jwt"); -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - decode, - jwt, - sign, - verify, - verifyWithJwks -}); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/middleware/jwt/jwt.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/middleware/jwt/jwt.js deleted file mode 100644 index f1755ce..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/middleware/jwt/jwt.js +++ /dev/null @@ -1,138 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var jwt_exports = {}; -__export(jwt_exports, { - decode: () => decode, - jwt: () => jwt, - sign: () => sign, - verify: () => verify, - verifyWithJwks: () => verifyWithJwks -}); -module.exports = __toCommonJS(jwt_exports); -var import_cookie = require("../../helper/cookie"); -var import_http_exception = require("../../http-exception"); -var import_jwt = require("../../utils/jwt"); -var import_context = require("../../context"); -const jwt = (options) => { - const verifyOpts = options.verification || {}; - if (!options || !options.secret) { - throw new Error('JWT auth middleware requires options for "secret"'); - } - if (!crypto.subtle || !crypto.subtle.importKey) { - throw new Error("`crypto.subtle.importKey` is undefined. JWT auth middleware requires it."); - } - return async function jwt2(ctx, next) { - const headerName = options.headerName || "Authorization"; - const credentials = ctx.req.raw.headers.get(headerName); - let token; - if (credentials) { - const parts = credentials.split(/\s+/); - if (parts.length !== 2) { - const errDescription = "invalid credentials structure"; - throw new import_http_exception.HTTPException(401, { - message: errDescription, - res: unauthorizedResponse({ - ctx, - error: "invalid_request", - errDescription - }) - }); - } else { - token = parts[1]; - } - } else if (options.cookie) { - if (typeof options.cookie == "string") { - token = (0, import_cookie.getCookie)(ctx, options.cookie); - } else if (options.cookie.secret) { - if (options.cookie.prefixOptions) { - token = await (0, import_cookie.getSignedCookie)( - ctx, - options.cookie.secret, - options.cookie.key, - options.cookie.prefixOptions - ); - } else { - token = await (0, import_cookie.getSignedCookie)(ctx, options.cookie.secret, options.cookie.key); - } - } else { - if (options.cookie.prefixOptions) { - token = (0, import_cookie.getCookie)(ctx, options.cookie.key, options.cookie.prefixOptions); - } else { - token = (0, import_cookie.getCookie)(ctx, options.cookie.key); - } - } - } - if (!token) { - const errDescription = "no authorization included in request"; - throw new import_http_exception.HTTPException(401, { - message: errDescription, - res: unauthorizedResponse({ - ctx, - error: "invalid_request", - errDescription - }) - }); - } - let payload; - let cause; - try { - payload = await import_jwt.Jwt.verify(token, options.secret, { - alg: options.alg, - ...verifyOpts - }); - } catch (e) { - cause = e; - } - if (!payload) { - throw new import_http_exception.HTTPException(401, { - message: "Unauthorized", - res: unauthorizedResponse({ - ctx, - error: "invalid_token", - statusText: "Unauthorized", - errDescription: "token verification failure" - }), - cause - }); - } - ctx.set("jwtPayload", payload); - await next(); - }; -}; -function unauthorizedResponse(opts) { - return new Response("Unauthorized", { - status: 401, - statusText: opts.statusText, - headers: { - "WWW-Authenticate": `Bearer realm="${opts.ctx.req.url}",error="${opts.error}",error_description="${opts.errDescription}"` - } - }); -} -const verifyWithJwks = import_jwt.Jwt.verifyWithJwks; -const verify = import_jwt.Jwt.verify; -const decode = import_jwt.Jwt.decode; -const sign = import_jwt.Jwt.sign; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - decode, - jwt, - sign, - verify, - verifyWithJwks -}); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/middleware/language/index.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/middleware/language/index.js deleted file mode 100644 index 133886f..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/middleware/language/index.js +++ /dev/null @@ -1,36 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var language_exports = {}; -__export(language_exports, { - detectFromCookie: () => import_language.detectFromCookie, - detectFromHeader: () => import_language.detectFromHeader, - detectFromPath: () => import_language.detectFromPath, - detectFromQuery: () => import_language.detectFromQuery, - languageDetector: () => import_language.languageDetector -}); -module.exports = __toCommonJS(language_exports); -var import_language = require("./language"); -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - detectFromCookie, - detectFromHeader, - detectFromPath, - detectFromQuery, - languageDetector -}); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/middleware/language/language.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/middleware/language/language.js deleted file mode 100644 index ed6433d..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/middleware/language/language.js +++ /dev/null @@ -1,211 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var language_exports = {}; -__export(language_exports, { - DEFAULT_OPTIONS: () => DEFAULT_OPTIONS, - detectFromCookie: () => detectFromCookie, - detectFromHeader: () => detectFromHeader, - detectFromPath: () => detectFromPath, - detectFromQuery: () => detectFromQuery, - detectors: () => detectors, - languageDetector: () => languageDetector, - normalizeLanguage: () => normalizeLanguage, - parseAcceptLanguage: () => parseAcceptLanguage, - validateOptions: () => validateOptions -}); -module.exports = __toCommonJS(language_exports); -var import_cookie = require("../../helper/cookie"); -var import_accept = require("../../utils/accept"); -const DEFAULT_OPTIONS = { - order: ["querystring", "cookie", "header"], - lookupQueryString: "lang", - lookupCookie: "language", - lookupFromHeaderKey: "accept-language", - lookupFromPathIndex: 0, - caches: ["cookie"], - ignoreCase: true, - fallbackLanguage: "en", - supportedLanguages: ["en"], - cookieOptions: { - sameSite: "Strict", - secure: true, - maxAge: 365 * 24 * 60 * 60, - httpOnly: true - }, - debug: false -}; -function parseAcceptLanguage(header) { - return (0, import_accept.parseAccept)(header).map(({ type, q }) => ({ lang: type, q })); -} -const normalizeLanguage = (lang, options) => { - if (!lang) { - return void 0; - } - try { - let normalizedLang = lang.trim(); - if (options.convertDetectedLanguage) { - normalizedLang = options.convertDetectedLanguage(normalizedLang); - } - const compLang = options.ignoreCase ? normalizedLang.toLowerCase() : normalizedLang; - const compSupported = options.supportedLanguages.map( - (l) => options.ignoreCase ? l.toLowerCase() : l - ); - const matchedLang = compSupported.find((l) => l === compLang); - return matchedLang ? options.supportedLanguages[compSupported.indexOf(matchedLang)] : void 0; - } catch { - return void 0; - } -}; -const detectFromQuery = (c, options) => { - try { - const query = c.req.query(options.lookupQueryString); - return normalizeLanguage(query, options); - } catch { - return void 0; - } -}; -const detectFromCookie = (c, options) => { - try { - const cookie = (0, import_cookie.getCookie)(c, options.lookupCookie); - return normalizeLanguage(cookie, options); - } catch { - return void 0; - } -}; -function detectFromHeader(c, options) { - try { - const acceptLanguage = c.req.header(options.lookupFromHeaderKey); - if (!acceptLanguage) { - return void 0; - } - const languages = parseAcceptLanguage(acceptLanguage); - for (const { lang } of languages) { - const normalizedLang = normalizeLanguage(lang, options); - if (normalizedLang) { - return normalizedLang; - } - } - return void 0; - } catch { - return void 0; - } -} -function detectFromPath(c, options) { - try { - const url = new URL(c.req.url); - const pathSegments = url.pathname.split("/").filter(Boolean); - const langSegment = pathSegments[options.lookupFromPathIndex]; - return normalizeLanguage(langSegment, options); - } catch { - return void 0; - } -} -const detectors = { - querystring: detectFromQuery, - cookie: detectFromCookie, - header: detectFromHeader, - path: detectFromPath -}; -function validateOptions(options) { - if (!options.supportedLanguages.includes(options.fallbackLanguage)) { - throw new Error("Fallback language must be included in supported languages"); - } - if (options.lookupFromPathIndex < 0) { - throw new Error("Path index must be non-negative"); - } - if (!options.order.every((detector) => Object.keys(detectors).includes(detector))) { - throw new Error("Invalid detector type in order array"); - } -} -function cacheLanguage(c, language, options) { - if (!Array.isArray(options.caches) || !options.caches.includes("cookie")) { - return; - } - try { - (0, import_cookie.setCookie)(c, options.lookupCookie, language, options.cookieOptions); - } catch (error) { - if (options.debug) { - console.error("Failed to cache language:", error); - } - } -} -const detectLanguage = (c, options) => { - let detectedLang; - for (const detectorName of options.order) { - const detector = detectors[detectorName]; - if (!detector) { - continue; - } - try { - detectedLang = detector(c, options); - if (detectedLang) { - if (options.debug) { - console.log(`Language detected from ${detectorName}: ${detectedLang}`); - } - break; - } - } catch (error) { - if (options.debug) { - console.error(`Error in ${detectorName} detector:`, error); - } - continue; - } - } - const finalLang = detectedLang || options.fallbackLanguage; - if (detectedLang && options.caches) { - cacheLanguage(c, finalLang, options); - } - return finalLang; -}; -const languageDetector = (userOptions) => { - const options = { - ...DEFAULT_OPTIONS, - ...userOptions, - cookieOptions: { - ...DEFAULT_OPTIONS.cookieOptions, - ...userOptions.cookieOptions - } - }; - validateOptions(options); - return async function languageDetector2(ctx, next) { - try { - const lang = detectLanguage(ctx, options); - ctx.set("language", lang); - } catch (error) { - if (options.debug) { - console.error("Language detection failed:", error); - } - ctx.set("language", options.fallbackLanguage); - } - await next(); - }; -}; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - DEFAULT_OPTIONS, - detectFromCookie, - detectFromHeader, - detectFromPath, - detectFromQuery, - detectors, - languageDetector, - normalizeLanguage, - parseAcceptLanguage, - validateOptions -}); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/middleware/logger/index.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/middleware/logger/index.js deleted file mode 100644 index ee709cf..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/middleware/logger/index.js +++ /dev/null @@ -1,73 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var logger_exports = {}; -__export(logger_exports, { - logger: () => logger -}); -module.exports = __toCommonJS(logger_exports); -var import_color = require("../../utils/color"); -var LogPrefix = /* @__PURE__ */ ((LogPrefix2) => { - LogPrefix2["Outgoing"] = "-->"; - LogPrefix2["Incoming"] = "<--"; - LogPrefix2["Error"] = "xxx"; - return LogPrefix2; -})(LogPrefix || {}); -const humanize = (times) => { - const [delimiter, separator] = [",", "."]; - const orderTimes = times.map((v) => v.replace(/(\d)(?=(\d\d\d)+(?!\d))/g, "$1" + delimiter)); - return orderTimes.join(separator); -}; -const time = (start) => { - const delta = Date.now() - start; - return humanize([delta < 1e3 ? delta + "ms" : Math.round(delta / 1e3) + "s"]); -}; -const colorStatus = async (status) => { - const colorEnabled = await (0, import_color.getColorEnabledAsync)(); - if (colorEnabled) { - switch (status / 100 | 0) { - case 5: - return `\x1B[31m${status}\x1B[0m`; - case 4: - return `\x1B[33m${status}\x1B[0m`; - case 3: - return `\x1B[36m${status}\x1B[0m`; - case 2: - return `\x1B[32m${status}\x1B[0m`; - } - } - return `${status}`; -}; -async function log(fn, prefix, method, path, status = 0, elapsed) { - const out = prefix === "<--" /* Incoming */ ? `${prefix} ${method} ${path}` : `${prefix} ${method} ${path} ${await colorStatus(status)} ${elapsed}`; - fn(out); -} -const logger = (fn = console.log) => { - return async function logger2(c, next) { - const { method, url } = c.req; - const path = url.slice(url.indexOf("/", 8)); - await log(fn, "<--" /* Incoming */, method, path); - const start = Date.now(); - await next(); - await log(fn, "-->" /* Outgoing */, method, path, c.res.status, time(start)); - }; -}; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - logger -}); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/middleware/method-override/index.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/middleware/method-override/index.js deleted file mode 100644 index dfbd952..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/middleware/method-override/index.js +++ /dev/null @@ -1,105 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var method_override_exports = {}; -__export(method_override_exports, { - methodOverride: () => methodOverride -}); -module.exports = __toCommonJS(method_override_exports); -var import_body = require("../../utils/body"); -const DEFAULT_METHOD_FORM_NAME = "_method"; -const methodOverride = (options) => async function methodOverride2(c, next) { - if (c.req.method === "GET") { - return await next(); - } - const app = options.app; - if (!(options.header || options.query)) { - const contentType = c.req.header("content-type"); - const methodFormName = options.form || DEFAULT_METHOD_FORM_NAME; - const clonedRequest = c.req.raw.clone(); - const newRequest = clonedRequest.clone(); - if (contentType?.startsWith("multipart/form-data")) { - const form = await clonedRequest.formData(); - const method = form.get(methodFormName); - if (method) { - const newForm = await newRequest.formData(); - newForm.delete(methodFormName); - const newHeaders = new Headers(clonedRequest.headers); - newHeaders.delete("content-type"); - newHeaders.delete("content-length"); - const request = new Request(c.req.url, { - body: newForm, - headers: newHeaders, - method - }); - return app.fetch(request, c.env, getExecutionCtx(c)); - } - } - if (contentType === "application/x-www-form-urlencoded") { - const params = await (0, import_body.parseBody)(clonedRequest); - const method = params[methodFormName]; - if (method) { - delete params[methodFormName]; - const newParams = new URLSearchParams(params); - const request = new Request(newRequest, { - body: newParams, - method - }); - return app.fetch(request, c.env, getExecutionCtx(c)); - } - } - } else if (options.header) { - const headerName = options.header; - const method = c.req.header(headerName); - if (method) { - const newHeaders = new Headers(c.req.raw.headers); - newHeaders.delete(headerName); - const request = new Request(c.req.raw, { - headers: newHeaders, - method - }); - return app.fetch(request, c.env, getExecutionCtx(c)); - } - } else if (options.query) { - const queryName = options.query; - const method = c.req.query(queryName); - if (method) { - const url = new URL(c.req.url); - url.searchParams.delete(queryName); - const request = new Request(url.toString(), { - body: c.req.raw.body, - headers: c.req.raw.headers, - method - }); - return app.fetch(request, c.env, getExecutionCtx(c)); - } - } - await next(); -}; -const getExecutionCtx = (c) => { - let executionCtx; - try { - executionCtx = c.executionCtx; - } catch { - } - return executionCtx; -}; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - methodOverride -}); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/middleware/powered-by/index.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/middleware/powered-by/index.js deleted file mode 100644 index 5580b93..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/middleware/powered-by/index.js +++ /dev/null @@ -1,33 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var powered_by_exports = {}; -__export(powered_by_exports, { - poweredBy: () => poweredBy -}); -module.exports = __toCommonJS(powered_by_exports); -const poweredBy = (options) => { - return async function poweredBy2(c, next) { - await next(); - c.res.headers.set("X-Powered-By", options?.serverName ?? "Hono"); - }; -}; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - poweredBy -}); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/middleware/pretty-json/index.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/middleware/pretty-json/index.js deleted file mode 100644 index 0ca7c39..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/middleware/pretty-json/index.js +++ /dev/null @@ -1,38 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var pretty_json_exports = {}; -__export(pretty_json_exports, { - prettyJSON: () => prettyJSON -}); -module.exports = __toCommonJS(pretty_json_exports); -const prettyJSON = (options) => { - const targetQuery = options?.query ?? "pretty"; - return async function prettyJSON2(c, next) { - const pretty = options?.force || c.req.query(targetQuery) || c.req.query(targetQuery) === ""; - await next(); - if (pretty && c.res.headers.get("Content-Type")?.startsWith("application/json")) { - const obj = await c.res.json(); - c.res = new Response(JSON.stringify(obj, null, options?.space ?? 2), c.res); - } - }; -}; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - prettyJSON -}); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/middleware/request-id/index.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/middleware/request-id/index.js deleted file mode 100644 index ec5ac3d..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/middleware/request-id/index.js +++ /dev/null @@ -1,28 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var request_id_exports = {}; -__export(request_id_exports, { - requestId: () => import_request_id.requestId -}); -module.exports = __toCommonJS(request_id_exports); -var import_request_id = require("./request-id"); -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - requestId -}); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/middleware/request-id/request-id.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/middleware/request-id/request-id.js deleted file mode 100644 index 48e7ced..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/middleware/request-id/request-id.js +++ /dev/null @@ -1,44 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var request_id_exports = {}; -__export(request_id_exports, { - requestId: () => requestId -}); -module.exports = __toCommonJS(request_id_exports); -const requestId = ({ - limitLength = 255, - headerName = "X-Request-Id", - generator = () => crypto.randomUUID() -} = {}) => { - return async function requestId2(c, next) { - let reqId = headerName ? c.req.header(headerName) : void 0; - if (!reqId || reqId.length > limitLength || /[^\w\-=]/.test(reqId)) { - reqId = generator(c); - } - c.set("requestId", reqId); - if (headerName) { - c.header(headerName, reqId); - } - await next(); - }; -}; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - requestId -}); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/middleware/secure-headers/index.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/middleware/secure-headers/index.js deleted file mode 100644 index de33ce9..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/middleware/secure-headers/index.js +++ /dev/null @@ -1,30 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var secure_headers_exports = {}; -__export(secure_headers_exports, { - NONCE: () => import_secure_headers.NONCE, - secureHeaders: () => import_secure_headers.secureHeaders -}); -module.exports = __toCommonJS(secure_headers_exports); -var import_secure_headers = require("./secure-headers"); -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - NONCE, - secureHeaders -}); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/middleware/secure-headers/permissions-policy.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/middleware/secure-headers/permissions-policy.js deleted file mode 100644 index 468148d..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/middleware/secure-headers/permissions-policy.js +++ /dev/null @@ -1,16 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var permissions_policy_exports = {}; -module.exports = __toCommonJS(permissions_policy_exports); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/middleware/secure-headers/secure-headers.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/middleware/secure-headers/secure-headers.js deleted file mode 100644 index b8c9bf4..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/middleware/secure-headers/secure-headers.js +++ /dev/null @@ -1,190 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var secure_headers_exports = {}; -__export(secure_headers_exports, { - NONCE: () => NONCE, - secureHeaders: () => secureHeaders -}); -module.exports = __toCommonJS(secure_headers_exports); -var import_encode = require("../../utils/encode"); -const HEADERS_MAP = { - crossOriginEmbedderPolicy: ["Cross-Origin-Embedder-Policy", "require-corp"], - crossOriginResourcePolicy: ["Cross-Origin-Resource-Policy", "same-origin"], - crossOriginOpenerPolicy: ["Cross-Origin-Opener-Policy", "same-origin"], - originAgentCluster: ["Origin-Agent-Cluster", "?1"], - referrerPolicy: ["Referrer-Policy", "no-referrer"], - strictTransportSecurity: ["Strict-Transport-Security", "max-age=15552000; includeSubDomains"], - xContentTypeOptions: ["X-Content-Type-Options", "nosniff"], - xDnsPrefetchControl: ["X-DNS-Prefetch-Control", "off"], - xDownloadOptions: ["X-Download-Options", "noopen"], - xFrameOptions: ["X-Frame-Options", "SAMEORIGIN"], - xPermittedCrossDomainPolicies: ["X-Permitted-Cross-Domain-Policies", "none"], - xXssProtection: ["X-XSS-Protection", "0"] -}; -const DEFAULT_OPTIONS = { - crossOriginEmbedderPolicy: false, - crossOriginResourcePolicy: true, - crossOriginOpenerPolicy: true, - originAgentCluster: true, - referrerPolicy: true, - strictTransportSecurity: true, - xContentTypeOptions: true, - xDnsPrefetchControl: true, - xDownloadOptions: true, - xFrameOptions: true, - xPermittedCrossDomainPolicies: true, - xXssProtection: true, - removePoweredBy: true, - permissionsPolicy: {} -}; -const generateNonce = () => { - const arrayBuffer = new Uint8Array(16); - crypto.getRandomValues(arrayBuffer); - return (0, import_encode.encodeBase64)(arrayBuffer.buffer); -}; -const NONCE = (ctx) => { - const key = "secureHeadersNonce"; - const init = ctx.get(key); - const nonce = init || generateNonce(); - if (init == null) { - ctx.set(key, nonce); - } - return `'nonce-${nonce}'`; -}; -const secureHeaders = (customOptions) => { - const options = { ...DEFAULT_OPTIONS, ...customOptions }; - const headersToSet = getFilteredHeaders(options); - const callbacks = []; - if (options.contentSecurityPolicy) { - const [callback, value] = getCSPDirectives(options.contentSecurityPolicy); - if (callback) { - callbacks.push(callback); - } - headersToSet.push(["Content-Security-Policy", value]); - } - if (options.contentSecurityPolicyReportOnly) { - const [callback, value] = getCSPDirectives(options.contentSecurityPolicyReportOnly); - if (callback) { - callbacks.push(callback); - } - headersToSet.push(["Content-Security-Policy-Report-Only", value]); - } - if (options.permissionsPolicy && Object.keys(options.permissionsPolicy).length > 0) { - headersToSet.push([ - "Permissions-Policy", - getPermissionsPolicyDirectives(options.permissionsPolicy) - ]); - } - if (options.reportingEndpoints) { - headersToSet.push(["Reporting-Endpoints", getReportingEndpoints(options.reportingEndpoints)]); - } - if (options.reportTo) { - headersToSet.push(["Report-To", getReportToOptions(options.reportTo)]); - } - return async function secureHeaders2(ctx, next) { - const headersToSetForReq = callbacks.length === 0 ? headersToSet : callbacks.reduce((acc, cb) => cb(ctx, acc), headersToSet); - await next(); - setHeaders(ctx, headersToSetForReq); - if (options?.removePoweredBy) { - ctx.res.headers.delete("X-Powered-By"); - } - }; -}; -function getFilteredHeaders(options) { - return Object.entries(HEADERS_MAP).filter(([key]) => options[key]).map(([key, defaultValue]) => { - const overrideValue = options[key]; - return typeof overrideValue === "string" ? [defaultValue[0], overrideValue] : defaultValue; - }); -} -function getCSPDirectives(contentSecurityPolicy) { - const callbacks = []; - const resultValues = []; - for (const [directive, value] of Object.entries(contentSecurityPolicy)) { - const valueArray = Array.isArray(value) ? value : [value]; - valueArray.forEach((value2, i) => { - if (typeof value2 === "function") { - const index = i * 2 + 2 + resultValues.length; - callbacks.push((ctx, values) => { - values[index] = value2(ctx, directive); - }); - } - }); - resultValues.push( - directive.replace( - /[A-Z]+(?![a-z])|[A-Z]/g, - (match, offset) => offset ? "-" + match.toLowerCase() : match.toLowerCase() - ), - ...valueArray.flatMap((value2) => [" ", value2]), - "; " - ); - } - resultValues.pop(); - return callbacks.length === 0 ? [void 0, resultValues.join("")] : [ - (ctx, headersToSet) => headersToSet.map((values) => { - if (values[0] === "Content-Security-Policy" || values[0] === "Content-Security-Policy-Report-Only") { - const clone = values[1].slice(); - callbacks.forEach((cb) => { - cb(ctx, clone); - }); - return [values[0], clone.join("")]; - } else { - return values; - } - }), - resultValues - ]; -} -function getPermissionsPolicyDirectives(policy) { - return Object.entries(policy).map(([directive, value]) => { - const kebabDirective = camelToKebab(directive); - if (typeof value === "boolean") { - return `${kebabDirective}=${value ? "*" : "none"}`; - } - if (Array.isArray(value)) { - if (value.length === 0) { - return `${kebabDirective}=()`; - } - if (value.length === 1 && (value[0] === "*" || value[0] === "none")) { - return `${kebabDirective}=${value[0]}`; - } - const allowlist = value.map((item) => ["self", "src"].includes(item) ? item : `"${item}"`); - return `${kebabDirective}=(${allowlist.join(" ")})`; - } - return ""; - }).filter(Boolean).join(", "); -} -function camelToKebab(str) { - return str.replace(/([a-z\d])([A-Z])/g, "$1-$2").toLowerCase(); -} -function getReportingEndpoints(reportingEndpoints = []) { - return reportingEndpoints.map((endpoint) => `${endpoint.name}="${endpoint.url}"`).join(", "); -} -function getReportToOptions(reportTo = []) { - return reportTo.map((option) => JSON.stringify(option)).join(", "); -} -function setHeaders(ctx, headersToSet) { - headersToSet.forEach(([header, value]) => { - ctx.res.headers.set(header, value); - }); -} -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - NONCE, - secureHeaders -}); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/middleware/serve-static/index.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/middleware/serve-static/index.js deleted file mode 100644 index ffd483d..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/middleware/serve-static/index.js +++ /dev/null @@ -1,99 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var serve_static_exports = {}; -__export(serve_static_exports, { - serveStatic: () => serveStatic -}); -module.exports = __toCommonJS(serve_static_exports); -var import_compress = require("../../utils/compress"); -var import_mime = require("../../utils/mime"); -var import_path = require("./path"); -const ENCODINGS = { - br: ".br", - zstd: ".zst", - gzip: ".gz" -}; -const ENCODINGS_ORDERED_KEYS = Object.keys(ENCODINGS); -const DEFAULT_DOCUMENT = "index.html"; -const serveStatic = (options) => { - const root = options.root ?? "./"; - const optionPath = options.path; - const join = options.join ?? import_path.defaultJoin; - return async (c, next) => { - if (c.finalized) { - return next(); - } - let filename; - if (options.path) { - filename = options.path; - } else { - try { - filename = decodeURIComponent(c.req.path); - if (/(?:^|[\/\\])\.\.(?:$|[\/\\])/.test(filename)) { - throw new Error(); - } - } catch { - await options.onNotFound?.(c.req.path, c); - return next(); - } - } - let path = join( - root, - !optionPath && options.rewriteRequestPath ? options.rewriteRequestPath(filename) : filename - ); - if (options.isDir && await options.isDir(path)) { - path = join(path, DEFAULT_DOCUMENT); - } - const getContent = options.getContent; - let content = await getContent(path, c); - if (content instanceof Response) { - return c.newResponse(content.body, content); - } - if (content) { - const mimeType = options.mimes && (0, import_mime.getMimeType)(path, options.mimes) || (0, import_mime.getMimeType)(path); - c.header("Content-Type", mimeType || "application/octet-stream"); - if (options.precompressed && (!mimeType || import_compress.COMPRESSIBLE_CONTENT_TYPE_REGEX.test(mimeType))) { - const acceptEncodingSet = new Set( - c.req.header("Accept-Encoding")?.split(",").map((encoding) => encoding.trim()) - ); - for (const encoding of ENCODINGS_ORDERED_KEYS) { - if (!acceptEncodingSet.has(encoding)) { - continue; - } - const compressedContent = await getContent(path + ENCODINGS[encoding], c); - if (compressedContent) { - content = compressedContent; - c.header("Content-Encoding", encoding); - c.header("Vary", "Accept-Encoding", { append: true }); - break; - } - } - } - await options.onFound?.(path, c); - return c.body(content); - } - await options.onNotFound?.(path, c); - await next(); - return; - }; -}; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - serveStatic -}); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/middleware/serve-static/path.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/middleware/serve-static/path.js deleted file mode 100644 index ff620aa..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/middleware/serve-static/path.js +++ /dev/null @@ -1,41 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var path_exports = {}; -__export(path_exports, { - defaultJoin: () => defaultJoin -}); -module.exports = __toCommonJS(path_exports); -const defaultJoin = (...paths) => { - let result = paths.filter((p) => p !== "").join("/"); - result = result.replace(/(?<=\/)\/+/g, ""); - const segments = result.split("/"); - const resolved = []; - for (const segment of segments) { - if (segment === ".." && resolved.length > 0 && resolved.at(-1) !== "..") { - resolved.pop(); - } else if (segment !== ".") { - resolved.push(segment); - } - } - return resolved.join("/") || "."; -}; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - defaultJoin -}); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/middleware/timeout/index.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/middleware/timeout/index.js deleted file mode 100644 index 1df7d76..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/middleware/timeout/index.js +++ /dev/null @@ -1,48 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var timeout_exports = {}; -__export(timeout_exports, { - timeout: () => timeout -}); -module.exports = __toCommonJS(timeout_exports); -var import_http_exception = require("../../http-exception"); -const defaultTimeoutException = new import_http_exception.HTTPException(504, { - message: "Gateway Timeout" -}); -const timeout = (duration, exception = defaultTimeoutException) => { - return async function timeout2(context, next) { - let timer; - const timeoutPromise = new Promise((_, reject) => { - timer = setTimeout(() => { - reject(typeof exception === "function" ? exception(context) : exception); - }, duration); - }); - try { - await Promise.race([next(), timeoutPromise]); - } finally { - if (timer !== void 0) { - clearTimeout(timer); - } - } - }; -}; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - timeout -}); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/middleware/timing/index.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/middleware/timing/index.js deleted file mode 100644 index 2775406..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/middleware/timing/index.js +++ /dev/null @@ -1,36 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var timing_exports = {}; -__export(timing_exports, { - endTime: () => import_timing.endTime, - setMetric: () => import_timing.setMetric, - startTime: () => import_timing.startTime, - timing: () => import_timing.timing, - wrapTime: () => import_timing.wrapTime -}); -module.exports = __toCommonJS(timing_exports); -var import_timing = require("./timing"); -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - endTime, - setMetric, - startTime, - timing, - wrapTime -}); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/middleware/timing/timing.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/middleware/timing/timing.js deleted file mode 100644 index 7c25a94..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/middleware/timing/timing.js +++ /dev/null @@ -1,129 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var timing_exports = {}; -__export(timing_exports, { - endTime: () => endTime, - setMetric: () => setMetric, - startTime: () => startTime, - timing: () => timing, - wrapTime: () => wrapTime -}); -module.exports = __toCommonJS(timing_exports); -var import_context = require("../../context"); -const getTime = () => { - try { - return performance.now(); - } catch { - } - return Date.now(); -}; -const timing = (config) => { - const options = { - total: true, - enabled: true, - totalDescription: "Total Response Time", - autoEnd: true, - crossOrigin: false, - ...config - }; - return async function timing2(c, next) { - const headers = []; - const timers = /* @__PURE__ */ new Map(); - if (c.get("metric")) { - return await next(); - } - c.set("metric", { headers, timers }); - if (options.total) { - startTime(c, "total", options.totalDescription); - } - await next(); - if (options.total) { - endTime(c, "total"); - } - if (options.autoEnd) { - timers.forEach((_, key) => endTime(c, key)); - } - const enabled = typeof options.enabled === "function" ? options.enabled(c) : options.enabled; - if (enabled) { - c.res.headers.append("Server-Timing", headers.join(",")); - const crossOrigin = typeof options.crossOrigin === "function" ? options.crossOrigin(c) : options.crossOrigin; - if (crossOrigin) { - c.res.headers.append( - "Timing-Allow-Origin", - typeof crossOrigin === "string" ? crossOrigin : "*" - ); - } - } - }; -}; -const setMetric = (c, name, valueDescription, description, precision) => { - const metrics = c.get("metric"); - if (!metrics) { - console.warn("Metrics not initialized! Please add the `timing()` middleware to this route!"); - return; - } - if (typeof valueDescription === "number") { - const dur = valueDescription.toFixed(precision || 1); - const metric = description ? `${name};dur=${dur};desc="${description}"` : `${name};dur=${dur}`; - metrics.headers.push(metric); - } else { - const metric = valueDescription ? `${name};desc="${valueDescription}"` : `${name}`; - metrics.headers.push(metric); - } -}; -const startTime = (c, name, description) => { - const metrics = c.get("metric"); - if (!metrics) { - console.warn("Metrics not initialized! Please add the `timing()` middleware to this route!"); - return; - } - metrics.timers.set(name, { description, start: getTime() }); -}; -const endTime = (c, name, precision) => { - const metrics = c.get("metric"); - if (!metrics) { - console.warn("Metrics not initialized! Please add the `timing()` middleware to this route!"); - return; - } - const timer = metrics.timers.get(name); - if (!timer) { - console.warn(`Timer "${name}" does not exist!`); - return; - } - const { description, start } = timer; - const duration = getTime() - start; - setMetric(c, name, duration, description, precision); - metrics.timers.delete(name); -}; -async function wrapTime(c, name, callable, description, precision) { - startTime(c, name, description); - try { - return await callable; - } finally { - endTime(c, name, precision); - } -} -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - endTime, - setMetric, - startTime, - timing, - wrapTime -}); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/middleware/trailing-slash/index.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/middleware/trailing-slash/index.js deleted file mode 100644 index 085f34c..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/middleware/trailing-slash/index.js +++ /dev/null @@ -1,49 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var trailing_slash_exports = {}; -__export(trailing_slash_exports, { - appendTrailingSlash: () => appendTrailingSlash, - trimTrailingSlash: () => trimTrailingSlash -}); -module.exports = __toCommonJS(trailing_slash_exports); -const trimTrailingSlash = () => { - return async function trimTrailingSlash2(c, next) { - await next(); - if (c.res.status === 404 && (c.req.method === "GET" || c.req.method === "HEAD") && c.req.path !== "/" && c.req.path.at(-1) === "/") { - const url = new URL(c.req.url); - url.pathname = url.pathname.substring(0, url.pathname.length - 1); - c.res = c.redirect(url.toString(), 301); - } - }; -}; -const appendTrailingSlash = () => { - return async function appendTrailingSlash2(c, next) { - await next(); - if (c.res.status === 404 && (c.req.method === "GET" || c.req.method === "HEAD") && c.req.path.at(-1) !== "/") { - const url = new URL(c.req.url); - url.pathname += "/"; - c.res = c.redirect(url.toString(), 301); - } - }; -}; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - appendTrailingSlash, - trimTrailingSlash -}); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/package.json b/PBandGraphScaffold/node_modules/hono/dist/cjs/package.json deleted file mode 100644 index 5bbefff..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/package.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "type": "commonjs" -} diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/preset/quick.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/preset/quick.js deleted file mode 100644 index 793f3d8..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/preset/quick.js +++ /dev/null @@ -1,39 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var quick_exports = {}; -__export(quick_exports, { - Hono: () => Hono -}); -module.exports = __toCommonJS(quick_exports); -var import_hono_base = require("../hono-base"); -var import_linear_router = require("../router/linear-router"); -var import_smart_router = require("../router/smart-router"); -var import_trie_router = require("../router/trie-router"); -class Hono extends import_hono_base.HonoBase { - constructor(options = {}) { - super(options); - this.router = new import_smart_router.SmartRouter({ - routers: [new import_linear_router.LinearRouter(), new import_trie_router.TrieRouter()] - }); - } -} -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - Hono -}); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/preset/tiny.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/preset/tiny.js deleted file mode 100644 index 1fd5478..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/preset/tiny.js +++ /dev/null @@ -1,35 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var tiny_exports = {}; -__export(tiny_exports, { - Hono: () => Hono -}); -module.exports = __toCommonJS(tiny_exports); -var import_hono_base = require("../hono-base"); -var import_pattern_router = require("../router/pattern-router"); -class Hono extends import_hono_base.HonoBase { - constructor(options = {}) { - super(options); - this.router = new import_pattern_router.PatternRouter(); - } -} -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - Hono -}); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/request.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/request.js deleted file mode 100644 index 51c192f..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/request.js +++ /dev/null @@ -1,325 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var request_exports = {}; -__export(request_exports, { - HonoRequest: () => HonoRequest, - cloneRawRequest: () => cloneRawRequest -}); -module.exports = __toCommonJS(request_exports); -var import_http_exception = require("./http-exception"); -var import_constants = require("./request/constants"); -var import_body = require("./utils/body"); -var import_url = require("./utils/url"); -const tryDecodeURIComponent = (str) => (0, import_url.tryDecode)(str, import_url.decodeURIComponent_); -class HonoRequest { - /** - * `.raw` can get the raw Request object. - * - * @see {@link https://hono.dev/docs/api/request#raw} - * - * @example - * ```ts - * // For Cloudflare Workers - * app.post('/', async (c) => { - * const metadata = c.req.raw.cf?.hostMetadata? - * ... - * }) - * ``` - */ - raw; - #validatedData; - // Short name of validatedData - #matchResult; - routeIndex = 0; - /** - * `.path` can get the pathname of the request. - * - * @see {@link https://hono.dev/docs/api/request#path} - * - * @example - * ```ts - * app.get('/about/me', (c) => { - * const pathname = c.req.path // `/about/me` - * }) - * ``` - */ - path; - bodyCache = {}; - constructor(request, path = "/", matchResult = [[]]) { - this.raw = request; - this.path = path; - this.#matchResult = matchResult; - this.#validatedData = {}; - } - param(key) { - return key ? this.#getDecodedParam(key) : this.#getAllDecodedParams(); - } - #getDecodedParam(key) { - const paramKey = this.#matchResult[0][this.routeIndex][1][key]; - const param = this.#getParamValue(paramKey); - return param && /\%/.test(param) ? tryDecodeURIComponent(param) : param; - } - #getAllDecodedParams() { - const decoded = {}; - const keys = Object.keys(this.#matchResult[0][this.routeIndex][1]); - for (const key of keys) { - const value = this.#getParamValue(this.#matchResult[0][this.routeIndex][1][key]); - if (value !== void 0) { - decoded[key] = /\%/.test(value) ? tryDecodeURIComponent(value) : value; - } - } - return decoded; - } - #getParamValue(paramKey) { - return this.#matchResult[1] ? this.#matchResult[1][paramKey] : paramKey; - } - query(key) { - return (0, import_url.getQueryParam)(this.url, key); - } - queries(key) { - return (0, import_url.getQueryParams)(this.url, key); - } - header(name) { - if (name) { - return this.raw.headers.get(name) ?? void 0; - } - const headerData = {}; - this.raw.headers.forEach((value, key) => { - headerData[key] = value; - }); - return headerData; - } - async parseBody(options) { - return this.bodyCache.parsedBody ??= await (0, import_body.parseBody)(this, options); - } - #cachedBody = (key) => { - const { bodyCache, raw } = this; - const cachedBody = bodyCache[key]; - if (cachedBody) { - return cachedBody; - } - const anyCachedKey = Object.keys(bodyCache)[0]; - if (anyCachedKey) { - return bodyCache[anyCachedKey].then((body) => { - if (anyCachedKey === "json") { - body = JSON.stringify(body); - } - return new Response(body)[key](); - }); - } - return bodyCache[key] = raw[key](); - }; - /** - * `.json()` can parse Request body of type `application/json` - * - * @see {@link https://hono.dev/docs/api/request#json} - * - * @example - * ```ts - * app.post('/entry', async (c) => { - * const body = await c.req.json() - * }) - * ``` - */ - json() { - return this.#cachedBody("text").then((text) => JSON.parse(text)); - } - /** - * `.text()` can parse Request body of type `text/plain` - * - * @see {@link https://hono.dev/docs/api/request#text} - * - * @example - * ```ts - * app.post('/entry', async (c) => { - * const body = await c.req.text() - * }) - * ``` - */ - text() { - return this.#cachedBody("text"); - } - /** - * `.arrayBuffer()` parse Request body as an `ArrayBuffer` - * - * @see {@link https://hono.dev/docs/api/request#arraybuffer} - * - * @example - * ```ts - * app.post('/entry', async (c) => { - * const body = await c.req.arrayBuffer() - * }) - * ``` - */ - arrayBuffer() { - return this.#cachedBody("arrayBuffer"); - } - /** - * Parses the request body as a `Blob`. - * @example - * ```ts - * app.post('/entry', async (c) => { - * const body = await c.req.blob(); - * }); - * ``` - * @see https://hono.dev/docs/api/request#blob - */ - blob() { - return this.#cachedBody("blob"); - } - /** - * Parses the request body as `FormData`. - * @example - * ```ts - * app.post('/entry', async (c) => { - * const body = await c.req.formData(); - * }); - * ``` - * @see https://hono.dev/docs/api/request#formdata - */ - formData() { - return this.#cachedBody("formData"); - } - /** - * Adds validated data to the request. - * - * @param target - The target of the validation. - * @param data - The validated data to add. - */ - addValidatedData(target, data) { - this.#validatedData[target] = data; - } - valid(target) { - return this.#validatedData[target]; - } - /** - * `.url()` can get the request url strings. - * - * @see {@link https://hono.dev/docs/api/request#url} - * - * @example - * ```ts - * app.get('/about/me', (c) => { - * const url = c.req.url // `http://localhost:8787/about/me` - * ... - * }) - * ``` - */ - get url() { - return this.raw.url; - } - /** - * `.method()` can get the method name of the request. - * - * @see {@link https://hono.dev/docs/api/request#method} - * - * @example - * ```ts - * app.get('/about/me', (c) => { - * const method = c.req.method // `GET` - * }) - * ``` - */ - get method() { - return this.raw.method; - } - get [import_constants.GET_MATCH_RESULT]() { - return this.#matchResult; - } - /** - * `.matchedRoutes()` can return a matched route in the handler - * - * @deprecated - * - * Use matchedRoutes helper defined in "hono/route" instead. - * - * @see {@link https://hono.dev/docs/api/request#matchedroutes} - * - * @example - * ```ts - * app.use('*', async function logger(c, next) { - * await next() - * c.req.matchedRoutes.forEach(({ handler, method, path }, i) => { - * const name = handler.name || (handler.length < 2 ? '[handler]' : '[middleware]') - * console.log( - * method, - * ' ', - * path, - * ' '.repeat(Math.max(10 - path.length, 0)), - * name, - * i === c.req.routeIndex ? '<- respond from here' : '' - * ) - * }) - * }) - * ``` - */ - get matchedRoutes() { - return this.#matchResult[0].map(([[, route]]) => route); - } - /** - * `routePath()` can retrieve the path registered within the handler - * - * @deprecated - * - * Use routePath helper defined in "hono/route" instead. - * - * @see {@link https://hono.dev/docs/api/request#routepath} - * - * @example - * ```ts - * app.get('/posts/:id', (c) => { - * return c.json({ path: c.req.routePath }) - * }) - * ``` - */ - get routePath() { - return this.#matchResult[0].map(([[, route]]) => route)[this.routeIndex].path; - } -} -const cloneRawRequest = async (req) => { - if (!req.raw.bodyUsed) { - return req.raw.clone(); - } - const cacheKey = Object.keys(req.bodyCache)[0]; - if (!cacheKey) { - throw new import_http_exception.HTTPException(500, { - message: "Cannot clone request: body was already consumed and not cached. Please use HonoRequest methods (e.g., req.json(), req.text()) instead of consuming req.raw directly." - }); - } - const requestInit = { - body: await req[cacheKey](), - cache: req.raw.cache, - credentials: req.raw.credentials, - headers: req.header(), - integrity: req.raw.integrity, - keepalive: req.raw.keepalive, - method: req.method, - mode: req.raw.mode, - redirect: req.raw.redirect, - referrer: req.raw.referrer, - referrerPolicy: req.raw.referrerPolicy, - signal: req.raw.signal - }; - return new Request(req.url, requestInit); -}; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - HonoRequest, - cloneRawRequest -}); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/request/constants.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/request/constants.js deleted file mode 100644 index 322f24d..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/request/constants.js +++ /dev/null @@ -1,28 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var constants_exports = {}; -__export(constants_exports, { - GET_MATCH_RESULT: () => GET_MATCH_RESULT -}); -module.exports = __toCommonJS(constants_exports); -const GET_MATCH_RESULT = /* @__PURE__ */ Symbol(); -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - GET_MATCH_RESULT -}); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/router.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/router.js deleted file mode 100644 index b05b67f..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/router.js +++ /dev/null @@ -1,41 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var router_exports = {}; -__export(router_exports, { - MESSAGE_MATCHER_IS_ALREADY_BUILT: () => MESSAGE_MATCHER_IS_ALREADY_BUILT, - METHODS: () => METHODS, - METHOD_NAME_ALL: () => METHOD_NAME_ALL, - METHOD_NAME_ALL_LOWERCASE: () => METHOD_NAME_ALL_LOWERCASE, - UnsupportedPathError: () => UnsupportedPathError -}); -module.exports = __toCommonJS(router_exports); -const METHOD_NAME_ALL = "ALL"; -const METHOD_NAME_ALL_LOWERCASE = "all"; -const METHODS = ["get", "post", "put", "delete", "options", "patch"]; -const MESSAGE_MATCHER_IS_ALREADY_BUILT = "Can not add a route since the matcher is already built."; -class UnsupportedPathError extends Error { -} -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - MESSAGE_MATCHER_IS_ALREADY_BUILT, - METHODS, - METHOD_NAME_ALL, - METHOD_NAME_ALL_LOWERCASE, - UnsupportedPathError -}); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/router/linear-router/index.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/router/linear-router/index.js deleted file mode 100644 index 10ed2b2..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/router/linear-router/index.js +++ /dev/null @@ -1,28 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var linear_router_exports = {}; -__export(linear_router_exports, { - LinearRouter: () => import_router.LinearRouter -}); -module.exports = __toCommonJS(linear_router_exports); -var import_router = require("./router"); -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - LinearRouter -}); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/router/linear-router/router.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/router/linear-router/router.js deleted file mode 100644 index c72e7ca..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/router/linear-router/router.js +++ /dev/null @@ -1,141 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var router_exports = {}; -__export(router_exports, { - LinearRouter: () => LinearRouter -}); -module.exports = __toCommonJS(router_exports); -var import_router = require("../../router"); -var import_url = require("../../utils/url"); -const emptyParams = /* @__PURE__ */ Object.create(null); -const splitPathRe = /\/(:\w+(?:{(?:(?:{[\d,]+})|[^}])+})?)|\/[^\/\?]+|(\?)/g; -const splitByStarRe = /\*/; -class LinearRouter { - name = "LinearRouter"; - #routes = []; - add(method, path, handler) { - for (let i = 0, paths = (0, import_url.checkOptionalParameter)(path) || [path], len = paths.length; i < len; i++) { - this.#routes.push([method, paths[i], handler]); - } - } - match(method, path) { - const handlers = []; - ROUTES_LOOP: for (let i = 0, len = this.#routes.length; i < len; i++) { - const [routeMethod, routePath, handler] = this.#routes[i]; - if (routeMethod === method || routeMethod === import_router.METHOD_NAME_ALL) { - if (routePath === "*" || routePath === "/*") { - handlers.push([handler, emptyParams]); - continue; - } - const hasStar = routePath.indexOf("*") !== -1; - const hasLabel = routePath.indexOf(":") !== -1; - if (!hasStar && !hasLabel) { - if (routePath === path || routePath + "/" === path) { - handlers.push([handler, emptyParams]); - } - } else if (hasStar && !hasLabel) { - const endsWithStar = routePath.charCodeAt(routePath.length - 1) === 42; - const parts = (endsWithStar ? routePath.slice(0, -2) : routePath).split(splitByStarRe); - const lastIndex = parts.length - 1; - for (let j = 0, pos = 0, len2 = parts.length; j < len2; j++) { - const part = parts[j]; - const index = path.indexOf(part, pos); - if (index !== pos) { - continue ROUTES_LOOP; - } - pos += part.length; - if (j === lastIndex) { - if (!endsWithStar && pos !== path.length && !(pos === path.length - 1 && path.charCodeAt(pos) === 47)) { - continue ROUTES_LOOP; - } - } else { - const index2 = path.indexOf("/", pos); - if (index2 === -1) { - continue ROUTES_LOOP; - } - pos = index2; - } - } - handlers.push([handler, emptyParams]); - } else if (hasLabel && !hasStar) { - const params = /* @__PURE__ */ Object.create(null); - const parts = routePath.match(splitPathRe); - const lastIndex = parts.length - 1; - for (let j = 0, pos = 0, len2 = parts.length; j < len2; j++) { - if (pos === -1 || pos >= path.length) { - continue ROUTES_LOOP; - } - const part = parts[j]; - if (part.charCodeAt(1) === 58) { - if (path.charCodeAt(pos) !== 47) { - continue ROUTES_LOOP; - } - let name = part.slice(2); - let value; - if (name.charCodeAt(name.length - 1) === 125) { - const openBracePos = name.indexOf("{"); - const next = parts[j + 1]; - const lookahead = next && next[1] !== ":" && next[1] !== "*" ? `(?=${next})` : ""; - const pattern = name.slice(openBracePos + 1, -1) + lookahead; - const restPath = path.slice(pos + 1); - const match = new RegExp(pattern, "d").exec(restPath); - if (!match || match.indices[0][0] !== 0 || match.indices[0][1] === 0) { - continue ROUTES_LOOP; - } - name = name.slice(0, openBracePos); - value = restPath.slice(...match.indices[0]); - pos += match.indices[0][1] + 1; - } else { - let endValuePos = path.indexOf("/", pos + 1); - if (endValuePos === -1) { - if (pos + 1 === path.length) { - continue ROUTES_LOOP; - } - endValuePos = path.length; - } - value = path.slice(pos + 1, endValuePos); - pos = endValuePos; - } - params[name] ||= value; - } else { - const index = path.indexOf(part, pos); - if (index !== pos) { - continue ROUTES_LOOP; - } - pos += part.length; - } - if (j === lastIndex) { - if (pos !== path.length && !(pos === path.length - 1 && path.charCodeAt(pos) === 47)) { - continue ROUTES_LOOP; - } - } - } - handlers.push([handler, params]); - } else if (hasLabel && hasStar) { - throw new import_router.UnsupportedPathError(); - } - } - } - return [handlers]; - } -} -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - LinearRouter -}); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/router/pattern-router/index.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/router/pattern-router/index.js deleted file mode 100644 index 54e9757..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/router/pattern-router/index.js +++ /dev/null @@ -1,28 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var pattern_router_exports = {}; -__export(pattern_router_exports, { - PatternRouter: () => import_router.PatternRouter -}); -module.exports = __toCommonJS(pattern_router_exports); -var import_router = require("./router"); -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - PatternRouter -}); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/router/pattern-router/router.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/router/pattern-router/router.js deleted file mode 100644 index a9592d9..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/router/pattern-router/router.js +++ /dev/null @@ -1,71 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var router_exports = {}; -__export(router_exports, { - PatternRouter: () => PatternRouter -}); -module.exports = __toCommonJS(router_exports); -var import_router = require("../../router"); -const emptyParams = /* @__PURE__ */ Object.create(null); -class PatternRouter { - name = "PatternRouter"; - #routes = []; - add(method, path, handler) { - const endsWithWildcard = path.at(-1) === "*"; - if (endsWithWildcard) { - path = path.slice(0, -2); - } - if (path.at(-1) === "?") { - path = path.slice(0, -1); - this.add(method, path.replace(/\/[^/]+$/, ""), handler); - } - const parts = (path.match(/\/?(:\w+(?:{(?:(?:{[\d,]+})|[^}])+})?)|\/?[^\/\?]+/g) || []).map( - (part) => { - const match = part.match(/^\/:([^{]+)(?:{(.*)})?/); - return match ? `/(?<${match[1]}>${match[2] || "[^/]+"})` : part === "/*" ? "/[^/]+" : part.replace(/[.\\+*[^\]$()]/g, "\\$&"); - } - ); - try { - this.#routes.push([ - new RegExp(`^${parts.join("")}${endsWithWildcard ? "" : "/?$"}`), - method, - handler - ]); - } catch { - throw new import_router.UnsupportedPathError(); - } - } - match(method, path) { - const handlers = []; - for (let i = 0, len = this.#routes.length; i < len; i++) { - const [pattern, routeMethod, handler] = this.#routes[i]; - if (routeMethod === method || routeMethod === import_router.METHOD_NAME_ALL) { - const match = pattern.exec(path); - if (match) { - handlers.push([handler, match.groups || emptyParams]); - } - } - } - return [handlers]; - } -} -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - PatternRouter -}); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/router/reg-exp-router/index.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/router/reg-exp-router/index.js deleted file mode 100644 index 46ad451..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/router/reg-exp-router/index.js +++ /dev/null @@ -1,35 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var reg_exp_router_exports = {}; -__export(reg_exp_router_exports, { - PreparedRegExpRouter: () => import_prepared_router.PreparedRegExpRouter, - RegExpRouter: () => import_router.RegExpRouter, - buildInitParams: () => import_prepared_router.buildInitParams, - serializeInitParams: () => import_prepared_router.serializeInitParams -}); -module.exports = __toCommonJS(reg_exp_router_exports); -var import_router = require("./router"); -var import_prepared_router = require("./prepared-router"); -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - PreparedRegExpRouter, - RegExpRouter, - buildInitParams, - serializeInitParams -}); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/router/reg-exp-router/matcher.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/router/reg-exp-router/matcher.js deleted file mode 100644 index cacc336..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/router/reg-exp-router/matcher.js +++ /dev/null @@ -1,49 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var matcher_exports = {}; -__export(matcher_exports, { - emptyParam: () => emptyParam, - match: () => match -}); -module.exports = __toCommonJS(matcher_exports); -var import_router = require("../../router"); -const emptyParam = []; -function match(method, path) { - const matchers = this.buildAllMatchers(); - const match2 = ((method2, path2) => { - const matcher = matchers[method2] || matchers[import_router.METHOD_NAME_ALL]; - const staticMatch = matcher[2][path2]; - if (staticMatch) { - return staticMatch; - } - const match3 = path2.match(matcher[0]); - if (!match3) { - return [[], emptyParam]; - } - const index = match3.indexOf("", 1); - return [matcher[1][index], match3]; - }); - this.match = match2; - return match2(method, path); -} -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - emptyParam, - match -}); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/router/reg-exp-router/node.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/router/reg-exp-router/node.js deleted file mode 100644 index c5486a9..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/router/reg-exp-router/node.js +++ /dev/null @@ -1,135 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var node_exports = {}; -__export(node_exports, { - Node: () => Node, - PATH_ERROR: () => PATH_ERROR -}); -module.exports = __toCommonJS(node_exports); -const LABEL_REG_EXP_STR = "[^/]+"; -const ONLY_WILDCARD_REG_EXP_STR = ".*"; -const TAIL_WILDCARD_REG_EXP_STR = "(?:|/.*)"; -const PATH_ERROR = /* @__PURE__ */ Symbol(); -const regExpMetaChars = new Set(".\\+*[^]$()"); -function compareKey(a, b) { - if (a.length === 1) { - return b.length === 1 ? a < b ? -1 : 1 : -1; - } - if (b.length === 1) { - return 1; - } - if (a === ONLY_WILDCARD_REG_EXP_STR || a === TAIL_WILDCARD_REG_EXP_STR) { - return 1; - } else if (b === ONLY_WILDCARD_REG_EXP_STR || b === TAIL_WILDCARD_REG_EXP_STR) { - return -1; - } - if (a === LABEL_REG_EXP_STR) { - return 1; - } else if (b === LABEL_REG_EXP_STR) { - return -1; - } - return a.length === b.length ? a < b ? -1 : 1 : b.length - a.length; -} -class Node { - #index; - #varIndex; - #children = /* @__PURE__ */ Object.create(null); - insert(tokens, index, paramMap, context, pathErrorCheckOnly) { - if (tokens.length === 0) { - if (this.#index !== void 0) { - throw PATH_ERROR; - } - if (pathErrorCheckOnly) { - return; - } - this.#index = index; - return; - } - const [token, ...restTokens] = tokens; - const pattern = token === "*" ? restTokens.length === 0 ? ["", "", ONLY_WILDCARD_REG_EXP_STR] : ["", "", LABEL_REG_EXP_STR] : token === "/*" ? ["", "", TAIL_WILDCARD_REG_EXP_STR] : token.match(/^\:([^\{\}]+)(?:\{(.+)\})?$/); - let node; - if (pattern) { - const name = pattern[1]; - let regexpStr = pattern[2] || LABEL_REG_EXP_STR; - if (name && pattern[2]) { - if (regexpStr === ".*") { - throw PATH_ERROR; - } - regexpStr = regexpStr.replace(/^\((?!\?:)(?=[^)]+\)$)/, "(?:"); - if (/\((?!\?:)/.test(regexpStr)) { - throw PATH_ERROR; - } - } - node = this.#children[regexpStr]; - if (!node) { - if (Object.keys(this.#children).some( - (k) => k !== ONLY_WILDCARD_REG_EXP_STR && k !== TAIL_WILDCARD_REG_EXP_STR - )) { - throw PATH_ERROR; - } - if (pathErrorCheckOnly) { - return; - } - node = this.#children[regexpStr] = new Node(); - if (name !== "") { - node.#varIndex = context.varIndex++; - } - } - if (!pathErrorCheckOnly && name !== "") { - paramMap.push([name, node.#varIndex]); - } - } else { - node = this.#children[token]; - if (!node) { - if (Object.keys(this.#children).some( - (k) => k.length > 1 && k !== ONLY_WILDCARD_REG_EXP_STR && k !== TAIL_WILDCARD_REG_EXP_STR - )) { - throw PATH_ERROR; - } - if (pathErrorCheckOnly) { - return; - } - node = this.#children[token] = new Node(); - } - } - node.insert(restTokens, index, paramMap, context, pathErrorCheckOnly); - } - buildRegExpStr() { - const childKeys = Object.keys(this.#children).sort(compareKey); - const strList = childKeys.map((k) => { - const c = this.#children[k]; - return (typeof c.#varIndex === "number" ? `(${k})@${c.#varIndex}` : regExpMetaChars.has(k) ? `\\${k}` : k) + c.buildRegExpStr(); - }); - if (typeof this.#index === "number") { - strList.unshift(`#${this.#index}`); - } - if (strList.length === 0) { - return ""; - } - if (strList.length === 1) { - return strList[0]; - } - return "(?:" + strList.join("|") + ")"; - } -} -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - Node, - PATH_ERROR -}); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/router/reg-exp-router/prepared-router.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/router/reg-exp-router/prepared-router.js deleted file mode 100644 index 6785515..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/router/reg-exp-router/prepared-router.js +++ /dev/null @@ -1,167 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var prepared_router_exports = {}; -__export(prepared_router_exports, { - PreparedRegExpRouter: () => PreparedRegExpRouter, - buildInitParams: () => buildInitParams, - serializeInitParams: () => serializeInitParams -}); -module.exports = __toCommonJS(prepared_router_exports); -var import_router = require("../../router"); -var import_matcher = require("./matcher"); -var import_router2 = require("./router"); -class PreparedRegExpRouter { - name = "PreparedRegExpRouter"; - #matchers; - #relocateMap; - constructor(matchers, relocateMap) { - this.#matchers = matchers; - this.#relocateMap = relocateMap; - } - #addWildcard(method, handlerData) { - const matcher = this.#matchers[method]; - matcher[1].forEach((list) => list && list.push(handlerData)); - Object.values(matcher[2]).forEach((list) => list[0].push(handlerData)); - } - #addPath(method, path, handler, indexes, map) { - const matcher = this.#matchers[method]; - if (!map) { - matcher[2][path][0].push([handler, {}]); - } else { - indexes.forEach((index) => { - if (typeof index === "number") { - matcher[1][index].push([handler, map]); - } else { - ; - matcher[2][index || path][0].push([handler, map]); - } - }); - } - } - add(method, path, handler) { - if (!this.#matchers[method]) { - const all = this.#matchers[import_router.METHOD_NAME_ALL]; - const staticMap = {}; - for (const key in all[2]) { - staticMap[key] = [all[2][key][0].slice(), import_matcher.emptyParam]; - } - this.#matchers[method] = [ - all[0], - all[1].map((list) => Array.isArray(list) ? list.slice() : 0), - staticMap - ]; - } - if (path === "/*" || path === "*") { - const handlerData = [handler, {}]; - if (method === import_router.METHOD_NAME_ALL) { - for (const m in this.#matchers) { - this.#addWildcard(m, handlerData); - } - } else { - this.#addWildcard(method, handlerData); - } - return; - } - const data = this.#relocateMap[path]; - if (!data) { - throw new Error(`Path ${path} is not registered`); - } - for (const [indexes, map] of data) { - if (method === import_router.METHOD_NAME_ALL) { - for (const m in this.#matchers) { - this.#addPath(m, path, handler, indexes, map); - } - } else { - this.#addPath(method, path, handler, indexes, map); - } - } - } - buildAllMatchers() { - return this.#matchers; - } - match = import_matcher.match; -} -const buildInitParams = ({ paths }) => { - const RegExpRouterWithMatcherExport = class extends import_router2.RegExpRouter { - buildAndExportAllMatchers() { - return this.buildAllMatchers(); - } - }; - const router = new RegExpRouterWithMatcherExport(); - for (const path of paths) { - router.add(import_router.METHOD_NAME_ALL, path, path); - } - const matchers = router.buildAndExportAllMatchers(); - const all = matchers[import_router.METHOD_NAME_ALL]; - const relocateMap = {}; - for (const path of paths) { - if (path === "/*" || path === "*") { - continue; - } - all[1].forEach((list, i) => { - list.forEach(([p, map]) => { - if (p === path) { - if (relocateMap[path]) { - relocateMap[path][0][1] = { - ...relocateMap[path][0][1], - ...map - }; - } else { - relocateMap[path] = [[[], map]]; - } - if (relocateMap[path][0][0].findIndex((j) => j === i) === -1) { - relocateMap[path][0][0].push(i); - } - } - }); - }); - for (const path2 in all[2]) { - all[2][path2][0].forEach(([p]) => { - if (p === path) { - relocateMap[path] ||= [[[]]]; - const value = path2 === path ? "" : path2; - if (relocateMap[path][0][0].findIndex((v) => v === value) === -1) { - relocateMap[path][0][0].push(value); - } - } - }); - } - } - for (let i = 0, len = all[1].length; i < len; i++) { - all[1][i] = all[1][i] ? [] : 0; - } - for (const path in all[2]) { - all[2][path][0] = []; - } - return [matchers, relocateMap]; -}; -const serializeInitParams = ([matchers, relocateMap]) => { - const matchersStr = JSON.stringify( - matchers, - (_, value) => value instanceof RegExp ? `##${value.toString()}##` : value - ).replace(/"##(.+?)##"/g, (_, str) => str.replace(/\\\\/g, "\\")); - const relocateMapStr = JSON.stringify(relocateMap); - return `[${matchersStr},${relocateMapStr}]`; -}; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - PreparedRegExpRouter, - buildInitParams, - serializeInitParams -}); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/router/reg-exp-router/router.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/router/reg-exp-router/router.js deleted file mode 100644 index 0b66be9..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/router/reg-exp-router/router.js +++ /dev/null @@ -1,209 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var router_exports = {}; -__export(router_exports, { - RegExpRouter: () => RegExpRouter -}); -module.exports = __toCommonJS(router_exports); -var import_router = require("../../router"); -var import_url = require("../../utils/url"); -var import_matcher = require("./matcher"); -var import_node = require("./node"); -var import_trie = require("./trie"); -const nullMatcher = [/^$/, [], /* @__PURE__ */ Object.create(null)]; -let wildcardRegExpCache = /* @__PURE__ */ Object.create(null); -function buildWildcardRegExp(path) { - return wildcardRegExpCache[path] ??= new RegExp( - path === "*" ? "" : `^${path.replace( - /\/\*$|([.\\+*[^\]$()])/g, - (_, metaChar) => metaChar ? `\\${metaChar}` : "(?:|/.*)" - )}$` - ); -} -function clearWildcardRegExpCache() { - wildcardRegExpCache = /* @__PURE__ */ Object.create(null); -} -function buildMatcherFromPreprocessedRoutes(routes) { - const trie = new import_trie.Trie(); - const handlerData = []; - if (routes.length === 0) { - return nullMatcher; - } - const routesWithStaticPathFlag = routes.map( - (route) => [!/\*|\/:/.test(route[0]), ...route] - ).sort( - ([isStaticA, pathA], [isStaticB, pathB]) => isStaticA ? 1 : isStaticB ? -1 : pathA.length - pathB.length - ); - const staticMap = /* @__PURE__ */ Object.create(null); - for (let i = 0, j = -1, len = routesWithStaticPathFlag.length; i < len; i++) { - const [pathErrorCheckOnly, path, handlers] = routesWithStaticPathFlag[i]; - if (pathErrorCheckOnly) { - staticMap[path] = [handlers.map(([h]) => [h, /* @__PURE__ */ Object.create(null)]), import_matcher.emptyParam]; - } else { - j++; - } - let paramAssoc; - try { - paramAssoc = trie.insert(path, j, pathErrorCheckOnly); - } catch (e) { - throw e === import_node.PATH_ERROR ? new import_router.UnsupportedPathError(path) : e; - } - if (pathErrorCheckOnly) { - continue; - } - handlerData[j] = handlers.map(([h, paramCount]) => { - const paramIndexMap = /* @__PURE__ */ Object.create(null); - paramCount -= 1; - for (; paramCount >= 0; paramCount--) { - const [key, value] = paramAssoc[paramCount]; - paramIndexMap[key] = value; - } - return [h, paramIndexMap]; - }); - } - const [regexp, indexReplacementMap, paramReplacementMap] = trie.buildRegExp(); - for (let i = 0, len = handlerData.length; i < len; i++) { - for (let j = 0, len2 = handlerData[i].length; j < len2; j++) { - const map = handlerData[i][j]?.[1]; - if (!map) { - continue; - } - const keys = Object.keys(map); - for (let k = 0, len3 = keys.length; k < len3; k++) { - map[keys[k]] = paramReplacementMap[map[keys[k]]]; - } - } - } - const handlerMap = []; - for (const i in indexReplacementMap) { - handlerMap[i] = handlerData[indexReplacementMap[i]]; - } - return [regexp, handlerMap, staticMap]; -} -function findMiddleware(middleware, path) { - if (!middleware) { - return void 0; - } - for (const k of Object.keys(middleware).sort((a, b) => b.length - a.length)) { - if (buildWildcardRegExp(k).test(path)) { - return [...middleware[k]]; - } - } - return void 0; -} -class RegExpRouter { - name = "RegExpRouter"; - #middleware; - #routes; - constructor() { - this.#middleware = { [import_router.METHOD_NAME_ALL]: /* @__PURE__ */ Object.create(null) }; - this.#routes = { [import_router.METHOD_NAME_ALL]: /* @__PURE__ */ Object.create(null) }; - } - add(method, path, handler) { - const middleware = this.#middleware; - const routes = this.#routes; - if (!middleware || !routes) { - throw new Error(import_router.MESSAGE_MATCHER_IS_ALREADY_BUILT); - } - if (!middleware[method]) { - ; - [middleware, routes].forEach((handlerMap) => { - handlerMap[method] = /* @__PURE__ */ Object.create(null); - Object.keys(handlerMap[import_router.METHOD_NAME_ALL]).forEach((p) => { - handlerMap[method][p] = [...handlerMap[import_router.METHOD_NAME_ALL][p]]; - }); - }); - } - if (path === "/*") { - path = "*"; - } - const paramCount = (path.match(/\/:/g) || []).length; - if (/\*$/.test(path)) { - const re = buildWildcardRegExp(path); - if (method === import_router.METHOD_NAME_ALL) { - Object.keys(middleware).forEach((m) => { - middleware[m][path] ||= findMiddleware(middleware[m], path) || findMiddleware(middleware[import_router.METHOD_NAME_ALL], path) || []; - }); - } else { - middleware[method][path] ||= findMiddleware(middleware[method], path) || findMiddleware(middleware[import_router.METHOD_NAME_ALL], path) || []; - } - Object.keys(middleware).forEach((m) => { - if (method === import_router.METHOD_NAME_ALL || method === m) { - Object.keys(middleware[m]).forEach((p) => { - re.test(p) && middleware[m][p].push([handler, paramCount]); - }); - } - }); - Object.keys(routes).forEach((m) => { - if (method === import_router.METHOD_NAME_ALL || method === m) { - Object.keys(routes[m]).forEach( - (p) => re.test(p) && routes[m][p].push([handler, paramCount]) - ); - } - }); - return; - } - const paths = (0, import_url.checkOptionalParameter)(path) || [path]; - for (let i = 0, len = paths.length; i < len; i++) { - const path2 = paths[i]; - Object.keys(routes).forEach((m) => { - if (method === import_router.METHOD_NAME_ALL || method === m) { - routes[m][path2] ||= [ - ...findMiddleware(middleware[m], path2) || findMiddleware(middleware[import_router.METHOD_NAME_ALL], path2) || [] - ]; - routes[m][path2].push([handler, paramCount - len + i + 1]); - } - }); - } - } - match = import_matcher.match; - buildAllMatchers() { - const matchers = /* @__PURE__ */ Object.create(null); - Object.keys(this.#routes).concat(Object.keys(this.#middleware)).forEach((method) => { - matchers[method] ||= this.#buildMatcher(method); - }); - this.#middleware = this.#routes = void 0; - clearWildcardRegExpCache(); - return matchers; - } - #buildMatcher(method) { - const routes = []; - let hasOwnRoute = method === import_router.METHOD_NAME_ALL; - [this.#middleware, this.#routes].forEach((r) => { - const ownRoute = r[method] ? Object.keys(r[method]).map((path) => [path, r[method][path]]) : []; - if (ownRoute.length !== 0) { - hasOwnRoute ||= true; - routes.push(...ownRoute); - } else if (method !== import_router.METHOD_NAME_ALL) { - routes.push( - ...Object.keys(r[import_router.METHOD_NAME_ALL]).map((path) => [path, r[import_router.METHOD_NAME_ALL][path]]) - ); - } - }); - if (!hasOwnRoute) { - return null; - } else { - return buildMatcherFromPreprocessedRoutes(routes); - } - } -} -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - RegExpRouter -}); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/router/reg-exp-router/trie.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/router/reg-exp-router/trie.js deleted file mode 100644 index 70754e1..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/router/reg-exp-router/trie.js +++ /dev/null @@ -1,82 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var trie_exports = {}; -__export(trie_exports, { - Trie: () => Trie -}); -module.exports = __toCommonJS(trie_exports); -var import_node = require("./node"); -class Trie { - #context = { varIndex: 0 }; - #root = new import_node.Node(); - insert(path, index, pathErrorCheckOnly) { - const paramAssoc = []; - const groups = []; - for (let i = 0; ; ) { - let replaced = false; - path = path.replace(/\{[^}]+\}/g, (m) => { - const mark = `@\\${i}`; - groups[i] = [mark, m]; - i++; - replaced = true; - return mark; - }); - if (!replaced) { - break; - } - } - const tokens = path.match(/(?::[^\/]+)|(?:\/\*$)|./g) || []; - for (let i = groups.length - 1; i >= 0; i--) { - const [mark] = groups[i]; - for (let j = tokens.length - 1; j >= 0; j--) { - if (tokens[j].indexOf(mark) !== -1) { - tokens[j] = tokens[j].replace(mark, groups[i][1]); - break; - } - } - } - this.#root.insert(tokens, index, paramAssoc, this.#context, pathErrorCheckOnly); - return paramAssoc; - } - buildRegExp() { - let regexp = this.#root.buildRegExpStr(); - if (regexp === "") { - return [/^$/, [], []]; - } - let captureIndex = 0; - const indexReplacementMap = []; - const paramReplacementMap = []; - regexp = regexp.replace(/#(\d+)|@(\d+)|\.\*\$/g, (_, handlerIndex, paramIndex) => { - if (handlerIndex !== void 0) { - indexReplacementMap[++captureIndex] = Number(handlerIndex); - return "$()"; - } - if (paramIndex !== void 0) { - paramReplacementMap[Number(paramIndex)] = ++captureIndex; - return ""; - } - return ""; - }); - return [new RegExp(`^${regexp}`), indexReplacementMap, paramReplacementMap]; - } -} -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - Trie -}); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/router/smart-router/index.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/router/smart-router/index.js deleted file mode 100644 index 1d31883..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/router/smart-router/index.js +++ /dev/null @@ -1,28 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var smart_router_exports = {}; -__export(smart_router_exports, { - SmartRouter: () => import_router.SmartRouter -}); -module.exports = __toCommonJS(smart_router_exports); -var import_router = require("./router"); -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - SmartRouter -}); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/router/smart-router/router.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/router/smart-router/router.js deleted file mode 100644 index 2e43178..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/router/smart-router/router.js +++ /dev/null @@ -1,81 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var router_exports = {}; -__export(router_exports, { - SmartRouter: () => SmartRouter -}); -module.exports = __toCommonJS(router_exports); -var import_router = require("../../router"); -class SmartRouter { - name = "SmartRouter"; - #routers = []; - #routes = []; - constructor(init) { - this.#routers = init.routers; - } - add(method, path, handler) { - if (!this.#routes) { - throw new Error(import_router.MESSAGE_MATCHER_IS_ALREADY_BUILT); - } - this.#routes.push([method, path, handler]); - } - match(method, path) { - if (!this.#routes) { - throw new Error("Fatal error"); - } - const routers = this.#routers; - const routes = this.#routes; - const len = routers.length; - let i = 0; - let res; - for (; i < len; i++) { - const router = routers[i]; - try { - for (let i2 = 0, len2 = routes.length; i2 < len2; i2++) { - router.add(...routes[i2]); - } - res = router.match(method, path); - } catch (e) { - if (e instanceof import_router.UnsupportedPathError) { - continue; - } - throw e; - } - this.match = router.match.bind(router); - this.#routers = [router]; - this.#routes = void 0; - break; - } - if (i === len) { - throw new Error("Fatal error"); - } - this.name = `SmartRouter + ${this.activeRouter.name}`; - return res; - } - get activeRouter() { - if (this.#routes || this.#routers.length !== 1) { - throw new Error("No active router has been determined yet."); - } - return this.#routers[0]; - } -} -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - SmartRouter -}); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/router/trie-router/index.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/router/trie-router/index.js deleted file mode 100644 index feaeadb..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/router/trie-router/index.js +++ /dev/null @@ -1,28 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var trie_router_exports = {}; -__export(trie_router_exports, { - TrieRouter: () => import_router.TrieRouter -}); -module.exports = __toCommonJS(trie_router_exports); -var import_router = require("./router"); -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - TrieRouter -}); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/router/trie-router/node.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/router/trie-router/node.js deleted file mode 100644 index e41f3d0..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/router/trie-router/node.js +++ /dev/null @@ -1,185 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var node_exports = {}; -__export(node_exports, { - Node: () => Node -}); -module.exports = __toCommonJS(node_exports); -var import_router = require("../../router"); -var import_url = require("../../utils/url"); -const emptyParams = /* @__PURE__ */ Object.create(null); -class Node { - #methods; - #children; - #patterns; - #order = 0; - #params = emptyParams; - constructor(method, handler, children) { - this.#children = children || /* @__PURE__ */ Object.create(null); - this.#methods = []; - if (method && handler) { - const m = /* @__PURE__ */ Object.create(null); - m[method] = { handler, possibleKeys: [], score: 0 }; - this.#methods = [m]; - } - this.#patterns = []; - } - insert(method, path, handler) { - this.#order = ++this.#order; - let curNode = this; - const parts = (0, import_url.splitRoutingPath)(path); - const possibleKeys = []; - for (let i = 0, len = parts.length; i < len; i++) { - const p = parts[i]; - const nextP = parts[i + 1]; - const pattern = (0, import_url.getPattern)(p, nextP); - const key = Array.isArray(pattern) ? pattern[0] : p; - if (key in curNode.#children) { - curNode = curNode.#children[key]; - if (pattern) { - possibleKeys.push(pattern[1]); - } - continue; - } - curNode.#children[key] = new Node(); - if (pattern) { - curNode.#patterns.push(pattern); - possibleKeys.push(pattern[1]); - } - curNode = curNode.#children[key]; - } - curNode.#methods.push({ - [method]: { - handler, - possibleKeys: possibleKeys.filter((v, i, a) => a.indexOf(v) === i), - score: this.#order - } - }); - return curNode; - } - #getHandlerSets(node, method, nodeParams, params) { - const handlerSets = []; - for (let i = 0, len = node.#methods.length; i < len; i++) { - const m = node.#methods[i]; - const handlerSet = m[method] || m[import_router.METHOD_NAME_ALL]; - const processedSet = {}; - if (handlerSet !== void 0) { - handlerSet.params = /* @__PURE__ */ Object.create(null); - handlerSets.push(handlerSet); - if (nodeParams !== emptyParams || params && params !== emptyParams) { - for (let i2 = 0, len2 = handlerSet.possibleKeys.length; i2 < len2; i2++) { - const key = handlerSet.possibleKeys[i2]; - const processed = processedSet[handlerSet.score]; - handlerSet.params[key] = params?.[key] && !processed ? params[key] : nodeParams[key] ?? params?.[key]; - processedSet[handlerSet.score] = true; - } - } - } - } - return handlerSets; - } - search(method, path) { - const handlerSets = []; - this.#params = emptyParams; - const curNode = this; - let curNodes = [curNode]; - const parts = (0, import_url.splitPath)(path); - const curNodesQueue = []; - for (let i = 0, len = parts.length; i < len; i++) { - const part = parts[i]; - const isLast = i === len - 1; - const tempNodes = []; - for (let j = 0, len2 = curNodes.length; j < len2; j++) { - const node = curNodes[j]; - const nextNode = node.#children[part]; - if (nextNode) { - nextNode.#params = node.#params; - if (isLast) { - if (nextNode.#children["*"]) { - handlerSets.push( - ...this.#getHandlerSets(nextNode.#children["*"], method, node.#params) - ); - } - handlerSets.push(...this.#getHandlerSets(nextNode, method, node.#params)); - } else { - tempNodes.push(nextNode); - } - } - for (let k = 0, len3 = node.#patterns.length; k < len3; k++) { - const pattern = node.#patterns[k]; - const params = node.#params === emptyParams ? {} : { ...node.#params }; - if (pattern === "*") { - const astNode = node.#children["*"]; - if (astNode) { - handlerSets.push(...this.#getHandlerSets(astNode, method, node.#params)); - astNode.#params = params; - tempNodes.push(astNode); - } - continue; - } - const [key, name, matcher] = pattern; - if (!part && !(matcher instanceof RegExp)) { - continue; - } - const child = node.#children[key]; - const restPathString = parts.slice(i).join("/"); - if (matcher instanceof RegExp) { - const m = matcher.exec(restPathString); - if (m) { - params[name] = m[0]; - handlerSets.push(...this.#getHandlerSets(child, method, node.#params, params)); - if (Object.keys(child.#children).length) { - child.#params = params; - const componentCount = m[0].match(/\//)?.length ?? 0; - const targetCurNodes = curNodesQueue[componentCount] ||= []; - targetCurNodes.push(child); - } - continue; - } - } - if (matcher === true || matcher.test(part)) { - params[name] = part; - if (isLast) { - handlerSets.push(...this.#getHandlerSets(child, method, params, node.#params)); - if (child.#children["*"]) { - handlerSets.push( - ...this.#getHandlerSets(child.#children["*"], method, params, node.#params) - ); - } - } else { - child.#params = params; - tempNodes.push(child); - } - } - } - } - curNodes = tempNodes.concat(curNodesQueue.shift() ?? []); - } - if (handlerSets.length > 1) { - handlerSets.sort((a, b) => { - return a.score - b.score; - }); - } - return [handlerSets.map(({ handler, params }) => [handler, params])]; - } -} -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - Node -}); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/router/trie-router/router.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/router/trie-router/router.js deleted file mode 100644 index 9c2133f..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/router/trie-router/router.js +++ /dev/null @@ -1,49 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var router_exports = {}; -__export(router_exports, { - TrieRouter: () => TrieRouter -}); -module.exports = __toCommonJS(router_exports); -var import_url = require("../../utils/url"); -var import_node = require("./node"); -class TrieRouter { - name = "TrieRouter"; - #node; - constructor() { - this.#node = new import_node.Node(); - } - add(method, path, handler) { - const results = (0, import_url.checkOptionalParameter)(path); - if (results) { - for (let i = 0, len = results.length; i < len; i++) { - this.#node.insert(method, results[i], handler); - } - return; - } - this.#node.insert(method, path, handler); - } - match(method, path) { - return this.#node.search(method, path); - } -} -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - TrieRouter -}); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/types.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/types.js deleted file mode 100644 index 2daf730..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/types.js +++ /dev/null @@ -1,29 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var types_exports = {}; -__export(types_exports, { - FetchEventLike: () => FetchEventLike -}); -module.exports = __toCommonJS(types_exports); -class FetchEventLike { -} -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - FetchEventLike -}); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/utils/accept.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/utils/accept.js deleted file mode 100644 index d717757..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/utils/accept.js +++ /dev/null @@ -1,86 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var accept_exports = {}; -__export(accept_exports, { - parseAccept: () => parseAccept -}); -module.exports = __toCommonJS(accept_exports); -const parseAccept = (acceptHeader) => { - if (!acceptHeader) { - return []; - } - const acceptValues = acceptHeader.split(",").map((value, index) => ({ value, index })); - return acceptValues.map(parseAcceptValue).filter((item) => Boolean(item)).sort(sortByQualityAndIndex).map(({ type, params, q }) => ({ type, params, q })); -}; -const parseAcceptValueRegex = /;(?=(?:(?:[^"]*"){2})*[^"]*$)/; -const parseAcceptValue = ({ value, index }) => { - const parts = value.trim().split(parseAcceptValueRegex).map((s) => s.trim()); - const type = parts[0]; - if (!type) { - return null; - } - const params = parseParams(parts.slice(1)); - const q = parseQuality(params.q); - return { type, params, q, index }; -}; -const parseParams = (paramParts) => { - return paramParts.reduce((acc, param) => { - const [key, val] = param.split("=").map((s) => s.trim()); - if (key && val) { - acc[key] = val; - } - return acc; - }, {}); -}; -const parseQuality = (qVal) => { - if (qVal === void 0) { - return 1; - } - if (qVal === "") { - return 1; - } - if (qVal === "NaN") { - return 0; - } - const num = Number(qVal); - if (num === Infinity) { - return 1; - } - if (num === -Infinity) { - return 0; - } - if (Number.isNaN(num)) { - return 1; - } - if (num < 0 || num > 1) { - return 1; - } - return num; -}; -const sortByQualityAndIndex = (a, b) => { - const qDiff = b.q - a.q; - if (qDiff !== 0) { - return qDiff; - } - return a.index - b.index; -}; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - parseAccept -}); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/utils/basic-auth.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/utils/basic-auth.js deleted file mode 100644 index a8d4719..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/utils/basic-auth.js +++ /dev/null @@ -1,46 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var basic_auth_exports = {}; -__export(basic_auth_exports, { - auth: () => auth -}); -module.exports = __toCommonJS(basic_auth_exports); -var import_encode = require("./encode"); -const CREDENTIALS_REGEXP = /^ *(?:[Bb][Aa][Ss][Ii][Cc]) +([A-Za-z0-9._~+/-]+=*) *$/; -const USER_PASS_REGEXP = /^([^:]*):(.*)$/; -const utf8Decoder = new TextDecoder(); -const auth = (req) => { - const match = CREDENTIALS_REGEXP.exec(req.headers.get("Authorization") || ""); - if (!match) { - return void 0; - } - let userPass = void 0; - try { - userPass = USER_PASS_REGEXP.exec(utf8Decoder.decode((0, import_encode.decodeBase64)(match[1]))); - } catch { - } - if (!userPass) { - return void 0; - } - return { username: userPass[1], password: userPass[2] }; -}; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - auth -}); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/utils/body.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/utils/body.js deleted file mode 100644 index cbcb761..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/utils/body.js +++ /dev/null @@ -1,95 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var body_exports = {}; -__export(body_exports, { - parseBody: () => parseBody -}); -module.exports = __toCommonJS(body_exports); -var import_request = require("../request"); -const parseBody = async (request, options = /* @__PURE__ */ Object.create(null)) => { - const { all = false, dot = false } = options; - const headers = request instanceof import_request.HonoRequest ? request.raw.headers : request.headers; - const contentType = headers.get("Content-Type"); - if (contentType?.startsWith("multipart/form-data") || contentType?.startsWith("application/x-www-form-urlencoded")) { - return parseFormData(request, { all, dot }); - } - return {}; -}; -async function parseFormData(request, options) { - const formData = await request.formData(); - if (formData) { - return convertFormDataToBodyData(formData, options); - } - return {}; -} -function convertFormDataToBodyData(formData, options) { - const form = /* @__PURE__ */ Object.create(null); - formData.forEach((value, key) => { - const shouldParseAllValues = options.all || key.endsWith("[]"); - if (!shouldParseAllValues) { - form[key] = value; - } else { - handleParsingAllValues(form, key, value); - } - }); - if (options.dot) { - Object.entries(form).forEach(([key, value]) => { - const shouldParseDotValues = key.includes("."); - if (shouldParseDotValues) { - handleParsingNestedValues(form, key, value); - delete form[key]; - } - }); - } - return form; -} -const handleParsingAllValues = (form, key, value) => { - if (form[key] !== void 0) { - if (Array.isArray(form[key])) { - ; - form[key].push(value); - } else { - form[key] = [form[key], value]; - } - } else { - if (!key.endsWith("[]")) { - form[key] = value; - } else { - form[key] = [value]; - } - } -}; -const handleParsingNestedValues = (form, key, value) => { - let nestedForm = form; - const keys = key.split("."); - keys.forEach((key2, index) => { - if (index === keys.length - 1) { - nestedForm[key2] = value; - } else { - if (!nestedForm[key2] || typeof nestedForm[key2] !== "object" || Array.isArray(nestedForm[key2]) || nestedForm[key2] instanceof File) { - nestedForm[key2] = /* @__PURE__ */ Object.create(null); - } - nestedForm = nestedForm[key2]; - } - }); -}; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - parseBody -}); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/utils/buffer.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/utils/buffer.js deleted file mode 100644 index fbd826f..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/utils/buffer.js +++ /dev/null @@ -1,76 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var buffer_exports = {}; -__export(buffer_exports, { - bufferToFormData: () => bufferToFormData, - bufferToString: () => bufferToString, - equal: () => equal, - timingSafeEqual: () => timingSafeEqual -}); -module.exports = __toCommonJS(buffer_exports); -var import_crypto = require("./crypto"); -const equal = (a, b) => { - if (a === b) { - return true; - } - if (a.byteLength !== b.byteLength) { - return false; - } - const va = new DataView(a); - const vb = new DataView(b); - let i = va.byteLength; - while (i--) { - if (va.getUint8(i) !== vb.getUint8(i)) { - return false; - } - } - return true; -}; -const timingSafeEqual = async (a, b, hashFunction) => { - if (!hashFunction) { - hashFunction = import_crypto.sha256; - } - const [sa, sb] = await Promise.all([hashFunction(a), hashFunction(b)]); - if (!sa || !sb) { - return false; - } - return sa === sb && a === b; -}; -const bufferToString = (buffer) => { - if (buffer instanceof ArrayBuffer) { - const enc = new TextDecoder("utf-8"); - return enc.decode(buffer); - } - return buffer; -}; -const bufferToFormData = (arrayBuffer, contentType) => { - const response = new Response(arrayBuffer, { - headers: { - "Content-Type": contentType - } - }); - return response.formData(); -}; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - bufferToFormData, - bufferToString, - equal, - timingSafeEqual -}); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/utils/color.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/utils/color.js deleted file mode 100644 index 9383515..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/utils/color.js +++ /dev/null @@ -1,49 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var color_exports = {}; -__export(color_exports, { - getColorEnabled: () => getColorEnabled, - getColorEnabledAsync: () => getColorEnabledAsync -}); -module.exports = __toCommonJS(color_exports); -function getColorEnabled() { - const { process, Deno } = globalThis; - const isNoColor = typeof Deno?.noColor === "boolean" ? Deno.noColor : process !== void 0 ? ( - // eslint-disable-next-line no-unsafe-optional-chaining - "NO_COLOR" in process?.env - ) : false; - return !isNoColor; -} -async function getColorEnabledAsync() { - const { navigator } = globalThis; - const cfWorkers = "cloudflare:workers"; - const isNoColor = navigator !== void 0 && navigator.userAgent === "Cloudflare-Workers" ? await (async () => { - try { - return "NO_COLOR" in ((await import(cfWorkers)).env ?? {}); - } catch { - return false; - } - })() : !getColorEnabled(); - return !isNoColor; -} -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - getColorEnabled, - getColorEnabledAsync -}); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/utils/compress.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/utils/compress.js deleted file mode 100644 index a7c2098..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/utils/compress.js +++ /dev/null @@ -1,28 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var compress_exports = {}; -__export(compress_exports, { - COMPRESSIBLE_CONTENT_TYPE_REGEX: () => COMPRESSIBLE_CONTENT_TYPE_REGEX -}); -module.exports = __toCommonJS(compress_exports); -const COMPRESSIBLE_CONTENT_TYPE_REGEX = /^\s*(?:text\/(?!event-stream(?:[;\s]|$))[^;\s]+|application\/(?:javascript|json|xml|xml-dtd|ecmascript|dart|postscript|rtf|tar|toml|vnd\.dart|vnd\.ms-fontobject|vnd\.ms-opentype|wasm|x-httpd-php|x-javascript|x-ns-proxy-autoconfig|x-sh|x-tar|x-virtualbox-hdd|x-virtualbox-ova|x-virtualbox-ovf|x-virtualbox-vbox|x-virtualbox-vdi|x-virtualbox-vhd|x-virtualbox-vmdk|x-www-form-urlencoded)|font\/(?:otf|ttf)|image\/(?:bmp|vnd\.adobe\.photoshop|vnd\.microsoft\.icon|vnd\.ms-dds|x-icon|x-ms-bmp)|message\/rfc822|model\/gltf-binary|x-shader\/x-fragment|x-shader\/x-vertex|[^;\s]+?\+(?:json|text|xml|yaml))(?:[;\s]|$)/i; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - COMPRESSIBLE_CONTENT_TYPE_REGEX -}); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/utils/concurrent.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/utils/concurrent.js deleted file mode 100644 index 56fa28d..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/utils/concurrent.js +++ /dev/null @@ -1,62 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var concurrent_exports = {}; -__export(concurrent_exports, { - createPool: () => createPool -}); -module.exports = __toCommonJS(concurrent_exports); -const DEFAULT_CONCURRENCY = 1024; -const createPool = ({ - concurrency, - interval -} = {}) => { - concurrency ||= DEFAULT_CONCURRENCY; - if (concurrency === Infinity) { - return { - run: async (fn) => fn() - }; - } - const pool = /* @__PURE__ */ new Set(); - const run = async (fn, promise, resolve) => { - if (pool.size >= concurrency) { - promise ||= new Promise((r) => resolve = r); - setTimeout(() => run(fn, promise, resolve)); - return promise; - } - const marker = {}; - pool.add(marker); - const result = await fn(); - if (interval) { - setTimeout(() => pool.delete(marker), interval); - } else { - pool.delete(marker); - } - if (resolve) { - resolve(result); - return promise; - } else { - return result; - } - }; - return { run }; -}; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - createPool -}); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/utils/constants.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/utils/constants.js deleted file mode 100644 index 08c127f..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/utils/constants.js +++ /dev/null @@ -1,28 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var constants_exports = {}; -__export(constants_exports, { - COMPOSED_HANDLER: () => COMPOSED_HANDLER -}); -module.exports = __toCommonJS(constants_exports); -const COMPOSED_HANDLER = "__COMPOSED_HANDLER"; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - COMPOSED_HANDLER -}); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/utils/cookie.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/utils/cookie.js deleted file mode 100644 index e8f1134..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/utils/cookie.js +++ /dev/null @@ -1,173 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var cookie_exports = {}; -__export(cookie_exports, { - parse: () => parse, - parseSigned: () => parseSigned, - serialize: () => serialize, - serializeSigned: () => serializeSigned -}); -module.exports = __toCommonJS(cookie_exports); -var import_url = require("./url"); -const algorithm = { name: "HMAC", hash: "SHA-256" }; -const getCryptoKey = async (secret) => { - const secretBuf = typeof secret === "string" ? new TextEncoder().encode(secret) : secret; - return await crypto.subtle.importKey("raw", secretBuf, algorithm, false, ["sign", "verify"]); -}; -const makeSignature = async (value, secret) => { - const key = await getCryptoKey(secret); - const signature = await crypto.subtle.sign(algorithm.name, key, new TextEncoder().encode(value)); - return btoa(String.fromCharCode(...new Uint8Array(signature))); -}; -const verifySignature = async (base64Signature, value, secret) => { - try { - const signatureBinStr = atob(base64Signature); - const signature = new Uint8Array(signatureBinStr.length); - for (let i = 0, len = signatureBinStr.length; i < len; i++) { - signature[i] = signatureBinStr.charCodeAt(i); - } - return await crypto.subtle.verify(algorithm, secret, signature, new TextEncoder().encode(value)); - } catch { - return false; - } -}; -const validCookieNameRegEx = /^[\w!#$%&'*.^`|~+-]+$/; -const validCookieValueRegEx = /^[ !#-:<-[\]-~]*$/; -const parse = (cookie, name) => { - if (name && cookie.indexOf(name) === -1) { - return {}; - } - const pairs = cookie.trim().split(";"); - const parsedCookie = {}; - for (let pairStr of pairs) { - pairStr = pairStr.trim(); - const valueStartPos = pairStr.indexOf("="); - if (valueStartPos === -1) { - continue; - } - const cookieName = pairStr.substring(0, valueStartPos).trim(); - if (name && name !== cookieName || !validCookieNameRegEx.test(cookieName)) { - continue; - } - let cookieValue = pairStr.substring(valueStartPos + 1).trim(); - if (cookieValue.startsWith('"') && cookieValue.endsWith('"')) { - cookieValue = cookieValue.slice(1, -1); - } - if (validCookieValueRegEx.test(cookieValue)) { - parsedCookie[cookieName] = cookieValue.indexOf("%") !== -1 ? (0, import_url.tryDecode)(cookieValue, import_url.decodeURIComponent_) : cookieValue; - if (name) { - break; - } - } - } - return parsedCookie; -}; -const parseSigned = async (cookie, secret, name) => { - const parsedCookie = {}; - const secretKey = await getCryptoKey(secret); - for (const [key, value] of Object.entries(parse(cookie, name))) { - const signatureStartPos = value.lastIndexOf("."); - if (signatureStartPos < 1) { - continue; - } - const signedValue = value.substring(0, signatureStartPos); - const signature = value.substring(signatureStartPos + 1); - if (signature.length !== 44 || !signature.endsWith("=")) { - continue; - } - const isVerified = await verifySignature(signature, signedValue, secretKey); - parsedCookie[key] = isVerified ? signedValue : false; - } - return parsedCookie; -}; -const _serialize = (name, value, opt = {}) => { - let cookie = `${name}=${value}`; - if (name.startsWith("__Secure-") && !opt.secure) { - throw new Error("__Secure- Cookie must have Secure attributes"); - } - if (name.startsWith("__Host-")) { - if (!opt.secure) { - throw new Error("__Host- Cookie must have Secure attributes"); - } - if (opt.path !== "/") { - throw new Error('__Host- Cookie must have Path attributes with "/"'); - } - if (opt.domain) { - throw new Error("__Host- Cookie must not have Domain attributes"); - } - } - if (opt && typeof opt.maxAge === "number" && opt.maxAge >= 0) { - if (opt.maxAge > 3456e4) { - throw new Error( - "Cookies Max-Age SHOULD NOT be greater than 400 days (34560000 seconds) in duration." - ); - } - cookie += `; Max-Age=${opt.maxAge | 0}`; - } - if (opt.domain && opt.prefix !== "host") { - cookie += `; Domain=${opt.domain}`; - } - if (opt.path) { - cookie += `; Path=${opt.path}`; - } - if (opt.expires) { - if (opt.expires.getTime() - Date.now() > 3456e7) { - throw new Error( - "Cookies Expires SHOULD NOT be greater than 400 days (34560000 seconds) in the future." - ); - } - cookie += `; Expires=${opt.expires.toUTCString()}`; - } - if (opt.httpOnly) { - cookie += "; HttpOnly"; - } - if (opt.secure) { - cookie += "; Secure"; - } - if (opt.sameSite) { - cookie += `; SameSite=${opt.sameSite.charAt(0).toUpperCase() + opt.sameSite.slice(1)}`; - } - if (opt.priority) { - cookie += `; Priority=${opt.priority.charAt(0).toUpperCase() + opt.priority.slice(1)}`; - } - if (opt.partitioned) { - if (!opt.secure) { - throw new Error("Partitioned Cookie must have Secure attributes"); - } - cookie += "; Partitioned"; - } - return cookie; -}; -const serialize = (name, value, opt) => { - value = encodeURIComponent(value); - return _serialize(name, value, opt); -}; -const serializeSigned = async (name, value, secret, opt = {}) => { - const signature = await makeSignature(value, secret); - value = `${value}.${signature}`; - value = encodeURIComponent(value); - return _serialize(name, value, opt); -}; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - parse, - parseSigned, - serialize, - serializeSigned -}); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/utils/crypto.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/utils/crypto.js deleted file mode 100644 index 90e3757..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/utils/crypto.js +++ /dev/null @@ -1,70 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var crypto_exports = {}; -__export(crypto_exports, { - createHash: () => createHash, - md5: () => md5, - sha1: () => sha1, - sha256: () => sha256 -}); -module.exports = __toCommonJS(crypto_exports); -const sha256 = async (data) => { - const algorithm = { name: "SHA-256", alias: "sha256" }; - const hash = await createHash(data, algorithm); - return hash; -}; -const sha1 = async (data) => { - const algorithm = { name: "SHA-1", alias: "sha1" }; - const hash = await createHash(data, algorithm); - return hash; -}; -const md5 = async (data) => { - const algorithm = { name: "MD5", alias: "md5" }; - const hash = await createHash(data, algorithm); - return hash; -}; -const createHash = async (data, algorithm) => { - let sourceBuffer; - if (ArrayBuffer.isView(data) || data instanceof ArrayBuffer) { - sourceBuffer = data; - } else { - if (typeof data === "object") { - data = JSON.stringify(data); - } - sourceBuffer = new TextEncoder().encode(String(data)); - } - if (crypto && crypto.subtle) { - const buffer = await crypto.subtle.digest( - { - name: algorithm.name - }, - sourceBuffer - ); - const hash = Array.prototype.map.call(new Uint8Array(buffer), (x) => ("00" + x.toString(16)).slice(-2)).join(""); - return hash; - } - return null; -}; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - createHash, - md5, - sha1, - sha256 -}); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/utils/encode.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/utils/encode.js deleted file mode 100644 index dcb6469..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/utils/encode.js +++ /dev/null @@ -1,55 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var encode_exports = {}; -__export(encode_exports, { - decodeBase64: () => decodeBase64, - decodeBase64Url: () => decodeBase64Url, - encodeBase64: () => encodeBase64, - encodeBase64Url: () => encodeBase64Url -}); -module.exports = __toCommonJS(encode_exports); -const decodeBase64Url = (str) => { - return decodeBase64(str.replace(/_|-/g, (m) => ({ _: "/", "-": "+" })[m] ?? m)); -}; -const encodeBase64Url = (buf) => encodeBase64(buf).replace(/\/|\+/g, (m) => ({ "/": "_", "+": "-" })[m] ?? m); -const encodeBase64 = (buf) => { - let binary = ""; - const bytes = new Uint8Array(buf); - for (let i = 0, len = bytes.length; i < len; i++) { - binary += String.fromCharCode(bytes[i]); - } - return btoa(binary); -}; -const decodeBase64 = (str) => { - const binary = atob(str); - const bytes = new Uint8Array(new ArrayBuffer(binary.length)); - const half = binary.length / 2; - for (let i = 0, j = binary.length - 1; i <= half; i++, j--) { - bytes[i] = binary.charCodeAt(i); - bytes[j] = binary.charCodeAt(j); - } - return bytes; -}; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - decodeBase64, - decodeBase64Url, - encodeBase64, - encodeBase64Url -}); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/utils/filepath.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/utils/filepath.js deleted file mode 100644 index 59b6ff6..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/utils/filepath.js +++ /dev/null @@ -1,59 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var filepath_exports = {}; -__export(filepath_exports, { - getFilePath: () => getFilePath, - getFilePathWithoutDefaultDocument: () => getFilePathWithoutDefaultDocument -}); -module.exports = __toCommonJS(filepath_exports); -const getFilePath = (options) => { - let filename = options.filename; - const defaultDocument = options.defaultDocument || "index.html"; - if (filename.endsWith("/")) { - filename = filename.concat(defaultDocument); - } else if (!filename.match(/\.[a-zA-Z0-9_-]+$/)) { - filename = filename.concat("/" + defaultDocument); - } - const path = getFilePathWithoutDefaultDocument({ - root: options.root, - filename - }); - return path; -}; -const getFilePathWithoutDefaultDocument = (options) => { - let root = options.root || ""; - let filename = options.filename; - if (/(?:^|[\/\\])\.\.(?:$|[\/\\])/.test(filename)) { - return; - } - filename = filename.replace(/^\.?[\/\\]/, ""); - filename = filename.replace(/\\/, "/"); - root = root.replace(/\/$/, ""); - let path = root ? root + "/" + filename : filename; - path = path.replace(/^\.?\//, ""); - if (root[0] !== "/" && path[0] === "/") { - return; - } - return path; -}; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - getFilePath, - getFilePathWithoutDefaultDocument -}); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/utils/handler.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/utils/handler.js deleted file mode 100644 index c3d51da..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/utils/handler.js +++ /dev/null @@ -1,37 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var handler_exports = {}; -__export(handler_exports, { - findTargetHandler: () => findTargetHandler, - isMiddleware: () => isMiddleware -}); -module.exports = __toCommonJS(handler_exports); -var import_constants = require("./constants"); -const isMiddleware = (handler) => handler.length > 1; -const findTargetHandler = (handler) => { - return handler[import_constants.COMPOSED_HANDLER] ? ( - // eslint-disable-next-line @typescript-eslint/no-explicit-any - findTargetHandler(handler[import_constants.COMPOSED_HANDLER]) - ) : handler; -}; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - findTargetHandler, - isMiddleware -}); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/utils/headers.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/utils/headers.js deleted file mode 100644 index e58ee38..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/utils/headers.js +++ /dev/null @@ -1,16 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var headers_exports = {}; -module.exports = __toCommonJS(headers_exports); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/utils/html.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/utils/html.js deleted file mode 100644 index 508c4be..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/utils/html.js +++ /dev/null @@ -1,151 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var html_exports = {}; -__export(html_exports, { - HtmlEscapedCallbackPhase: () => HtmlEscapedCallbackPhase, - escapeToBuffer: () => escapeToBuffer, - raw: () => raw, - resolveCallback: () => resolveCallback, - resolveCallbackSync: () => resolveCallbackSync, - stringBufferToString: () => stringBufferToString -}); -module.exports = __toCommonJS(html_exports); -const HtmlEscapedCallbackPhase = { - Stringify: 1, - BeforeStream: 2, - Stream: 3 -}; -const raw = (value, callbacks) => { - const escapedString = new String(value); - escapedString.isEscaped = true; - escapedString.callbacks = callbacks; - return escapedString; -}; -const escapeRe = /[&<>'"]/; -const stringBufferToString = async (buffer, callbacks) => { - let str = ""; - callbacks ||= []; - const resolvedBuffer = await Promise.all(buffer); - for (let i = resolvedBuffer.length - 1; ; i--) { - str += resolvedBuffer[i]; - i--; - if (i < 0) { - break; - } - let r = resolvedBuffer[i]; - if (typeof r === "object") { - callbacks.push(...r.callbacks || []); - } - const isEscaped = r.isEscaped; - r = await (typeof r === "object" ? r.toString() : r); - if (typeof r === "object") { - callbacks.push(...r.callbacks || []); - } - if (r.isEscaped ?? isEscaped) { - str += r; - } else { - const buf = [str]; - escapeToBuffer(r, buf); - str = buf[0]; - } - } - return raw(str, callbacks); -}; -const escapeToBuffer = (str, buffer) => { - const match = str.search(escapeRe); - if (match === -1) { - buffer[0] += str; - return; - } - let escape; - let index; - let lastIndex = 0; - for (index = match; index < str.length; index++) { - switch (str.charCodeAt(index)) { - case 34: - escape = """; - break; - case 39: - escape = "'"; - break; - case 38: - escape = "&"; - break; - case 60: - escape = "<"; - break; - case 62: - escape = ">"; - break; - default: - continue; - } - buffer[0] += str.substring(lastIndex, index) + escape; - lastIndex = index + 1; - } - buffer[0] += str.substring(lastIndex, index); -}; -const resolveCallbackSync = (str) => { - const callbacks = str.callbacks; - if (!callbacks?.length) { - return str; - } - const buffer = [str]; - const context = {}; - callbacks.forEach((c) => c({ phase: HtmlEscapedCallbackPhase.Stringify, buffer, context })); - return buffer[0]; -}; -const resolveCallback = async (str, phase, preserveCallbacks, context, buffer) => { - if (typeof str === "object" && !(str instanceof String)) { - if (!(str instanceof Promise)) { - str = str.toString(); - } - if (str instanceof Promise) { - str = await str; - } - } - const callbacks = str.callbacks; - if (!callbacks?.length) { - return Promise.resolve(str); - } - if (buffer) { - buffer[0] += str; - } else { - buffer = [str]; - } - const resStr = Promise.all(callbacks.map((c) => c({ phase, buffer, context }))).then( - (res) => Promise.all( - res.filter(Boolean).map((str2) => resolveCallback(str2, phase, false, context, buffer)) - ).then(() => buffer[0]) - ); - if (preserveCallbacks) { - return raw(await resStr, callbacks); - } else { - return resStr; - } -}; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - HtmlEscapedCallbackPhase, - escapeToBuffer, - raw, - resolveCallback, - resolveCallbackSync, - stringBufferToString -}); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/utils/http-status.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/utils/http-status.js deleted file mode 100644 index cbc154b..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/utils/http-status.js +++ /dev/null @@ -1,16 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var http_status_exports = {}; -module.exports = __toCommonJS(http_status_exports); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/utils/ipaddr.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/utils/ipaddr.js deleted file mode 100644 index 29d67b2..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/utils/ipaddr.js +++ /dev/null @@ -1,129 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var ipaddr_exports = {}; -__export(ipaddr_exports, { - convertIPv4BinaryToString: () => convertIPv4BinaryToString, - convertIPv4ToBinary: () => convertIPv4ToBinary, - convertIPv6BinaryToString: () => convertIPv6BinaryToString, - convertIPv6ToBinary: () => convertIPv6ToBinary, - distinctRemoteAddr: () => distinctRemoteAddr, - expandIPv6: () => expandIPv6 -}); -module.exports = __toCommonJS(ipaddr_exports); -const expandIPv6 = (ipV6) => { - const sections = ipV6.split(":"); - if (IPV4_REGEX.test(sections.at(-1))) { - sections.splice( - -1, - 1, - ...convertIPv6BinaryToString(convertIPv4ToBinary(sections.at(-1))).substring(2).split(":") - // => ['7f00', '0001'] - ); - } - for (let i = 0; i < sections.length; i++) { - const node = sections[i]; - if (node !== "") { - sections[i] = node.padStart(4, "0"); - } else { - sections[i + 1] === "" && sections.splice(i + 1, 1); - sections[i] = new Array(8 - sections.length + 1).fill("0000").join(":"); - } - } - return sections.join(":"); -}; -const IPV4_REGEX = /^[0-9]{0,3}\.[0-9]{0,3}\.[0-9]{0,3}\.[0-9]{0,3}$/; -const distinctRemoteAddr = (remoteAddr) => { - if (IPV4_REGEX.test(remoteAddr)) { - return "IPv4"; - } - if (remoteAddr.includes(":")) { - return "IPv6"; - } -}; -const convertIPv4ToBinary = (ipv4) => { - const parts = ipv4.split("."); - let result = 0n; - for (let i = 0; i < 4; i++) { - result <<= 8n; - result += BigInt(parts[i]); - } - return result; -}; -const convertIPv6ToBinary = (ipv6) => { - const sections = expandIPv6(ipv6).split(":"); - let result = 0n; - for (let i = 0; i < 8; i++) { - result <<= 16n; - result += BigInt(parseInt(sections[i], 16)); - } - return result; -}; -const convertIPv4BinaryToString = (ipV4) => { - const sections = []; - for (let i = 0; i < 4; i++) { - sections.push(ipV4 >> BigInt(8 * (3 - i)) & 0xffn); - } - return sections.join("."); -}; -const convertIPv6BinaryToString = (ipV6) => { - if (ipV6 >> 32n === 0xffffn) { - return `::ffff:${convertIPv4BinaryToString(ipV6 & 0xffffffffn)}`; - } - const sections = []; - for (let i = 0; i < 8; i++) { - sections.push((ipV6 >> BigInt(16 * (7 - i)) & 0xffffn).toString(16)); - } - let currentZeroStart = -1; - let maxZeroStart = -1; - let maxZeroEnd = -1; - for (let i = 0; i < 8; i++) { - if (sections[i] === "0") { - if (currentZeroStart === -1) { - currentZeroStart = i; - } - } else { - if (currentZeroStart > -1) { - if (i - currentZeroStart > maxZeroEnd - maxZeroStart) { - maxZeroStart = currentZeroStart; - maxZeroEnd = i; - } - currentZeroStart = -1; - } - } - } - if (currentZeroStart > -1) { - if (8 - currentZeroStart > maxZeroEnd - maxZeroStart) { - maxZeroStart = currentZeroStart; - maxZeroEnd = 8; - } - } - if (maxZeroStart !== -1) { - sections.splice(maxZeroStart, maxZeroEnd - maxZeroStart, ":"); - } - return sections.join(":").replace(/:{2,}/g, "::"); -}; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - convertIPv4BinaryToString, - convertIPv4ToBinary, - convertIPv6BinaryToString, - convertIPv6ToBinary, - distinctRemoteAddr, - expandIPv6 -}); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/utils/jwt/index.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/utils/jwt/index.js deleted file mode 100644 index eade561..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/utils/jwt/index.js +++ /dev/null @@ -1,29 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var jwt_exports = {}; -__export(jwt_exports, { - Jwt: () => Jwt -}); -module.exports = __toCommonJS(jwt_exports); -var import_jwt = require("./jwt"); -const Jwt = { sign: import_jwt.sign, verify: import_jwt.verify, decode: import_jwt.decode, verifyWithJwks: import_jwt.verifyWithJwks }; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - Jwt -}); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/utils/jwt/jwa.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/utils/jwt/jwa.js deleted file mode 100644 index 5094b50..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/utils/jwt/jwa.js +++ /dev/null @@ -1,43 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var jwa_exports = {}; -__export(jwa_exports, { - AlgorithmTypes: () => AlgorithmTypes -}); -module.exports = __toCommonJS(jwa_exports); -var AlgorithmTypes = /* @__PURE__ */ ((AlgorithmTypes2) => { - AlgorithmTypes2["HS256"] = "HS256"; - AlgorithmTypes2["HS384"] = "HS384"; - AlgorithmTypes2["HS512"] = "HS512"; - AlgorithmTypes2["RS256"] = "RS256"; - AlgorithmTypes2["RS384"] = "RS384"; - AlgorithmTypes2["RS512"] = "RS512"; - AlgorithmTypes2["PS256"] = "PS256"; - AlgorithmTypes2["PS384"] = "PS384"; - AlgorithmTypes2["PS512"] = "PS512"; - AlgorithmTypes2["ES256"] = "ES256"; - AlgorithmTypes2["ES384"] = "ES384"; - AlgorithmTypes2["ES512"] = "ES512"; - AlgorithmTypes2["EdDSA"] = "EdDSA"; - return AlgorithmTypes2; -})(AlgorithmTypes || {}); -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - AlgorithmTypes -}); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/utils/jwt/jws.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/utils/jwt/jws.js deleted file mode 100644 index 0f0c88e..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/utils/jwt/jws.js +++ /dev/null @@ -1,216 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var jws_exports = {}; -__export(jws_exports, { - signing: () => signing, - verifying: () => verifying -}); -module.exports = __toCommonJS(jws_exports); -var import_adapter = require("../../helper/adapter"); -var import_encode = require("../encode"); -var import_types = require("./types"); -var import_utf8 = require("./utf8"); -async function signing(privateKey, alg, data) { - const algorithm = getKeyAlgorithm(alg); - const cryptoKey = await importPrivateKey(privateKey, algorithm); - return await crypto.subtle.sign(algorithm, cryptoKey, data); -} -async function verifying(publicKey, alg, signature, data) { - const algorithm = getKeyAlgorithm(alg); - const cryptoKey = await importPublicKey(publicKey, algorithm); - return await crypto.subtle.verify(algorithm, cryptoKey, signature, data); -} -function pemToBinary(pem) { - return (0, import_encode.decodeBase64)(pem.replace(/-+(BEGIN|END).*/g, "").replace(/\s/g, "")); -} -async function importPrivateKey(key, alg) { - if (!crypto.subtle || !crypto.subtle.importKey) { - throw new Error("`crypto.subtle.importKey` is undefined. JWT auth middleware requires it."); - } - if (isCryptoKey(key)) { - if (key.type !== "private" && key.type !== "secret") { - throw new Error( - `unexpected key type: CryptoKey.type is ${key.type}, expected private or secret` - ); - } - return key; - } - const usages = [import_types.CryptoKeyUsage.Sign]; - if (typeof key === "object") { - return await crypto.subtle.importKey("jwk", key, alg, false, usages); - } - if (key.includes("PRIVATE")) { - return await crypto.subtle.importKey("pkcs8", pemToBinary(key), alg, false, usages); - } - return await crypto.subtle.importKey("raw", import_utf8.utf8Encoder.encode(key), alg, false, usages); -} -async function importPublicKey(key, alg) { - if (!crypto.subtle || !crypto.subtle.importKey) { - throw new Error("`crypto.subtle.importKey` is undefined. JWT auth middleware requires it."); - } - if (isCryptoKey(key)) { - if (key.type === "public" || key.type === "secret") { - return key; - } - key = await exportPublicJwkFrom(key); - } - if (typeof key === "string" && key.includes("PRIVATE")) { - const privateKey = await crypto.subtle.importKey("pkcs8", pemToBinary(key), alg, true, [ - import_types.CryptoKeyUsage.Sign - ]); - key = await exportPublicJwkFrom(privateKey); - } - const usages = [import_types.CryptoKeyUsage.Verify]; - if (typeof key === "object") { - return await crypto.subtle.importKey("jwk", key, alg, false, usages); - } - if (key.includes("PUBLIC")) { - return await crypto.subtle.importKey("spki", pemToBinary(key), alg, false, usages); - } - return await crypto.subtle.importKey("raw", import_utf8.utf8Encoder.encode(key), alg, false, usages); -} -async function exportPublicJwkFrom(privateKey) { - if (privateKey.type !== "private") { - throw new Error(`unexpected key type: ${privateKey.type}`); - } - if (!privateKey.extractable) { - throw new Error("unexpected private key is unextractable"); - } - const jwk = await crypto.subtle.exportKey("jwk", privateKey); - const { kty } = jwk; - const { alg, e, n } = jwk; - const { crv, x, y } = jwk; - return { kty, alg, e, n, crv, x, y, key_ops: [import_types.CryptoKeyUsage.Verify] }; -} -function getKeyAlgorithm(name) { - switch (name) { - case "HS256": - return { - name: "HMAC", - hash: { - name: "SHA-256" - } - }; - case "HS384": - return { - name: "HMAC", - hash: { - name: "SHA-384" - } - }; - case "HS512": - return { - name: "HMAC", - hash: { - name: "SHA-512" - } - }; - case "RS256": - return { - name: "RSASSA-PKCS1-v1_5", - hash: { - name: "SHA-256" - } - }; - case "RS384": - return { - name: "RSASSA-PKCS1-v1_5", - hash: { - name: "SHA-384" - } - }; - case "RS512": - return { - name: "RSASSA-PKCS1-v1_5", - hash: { - name: "SHA-512" - } - }; - case "PS256": - return { - name: "RSA-PSS", - hash: { - name: "SHA-256" - }, - saltLength: 32 - // 256 >> 3 - }; - case "PS384": - return { - name: "RSA-PSS", - hash: { - name: "SHA-384" - }, - saltLength: 48 - // 384 >> 3 - }; - case "PS512": - return { - name: "RSA-PSS", - hash: { - name: "SHA-512" - }, - saltLength: 64 - // 512 >> 3, - }; - case "ES256": - return { - name: "ECDSA", - hash: { - name: "SHA-256" - }, - namedCurve: "P-256" - }; - case "ES384": - return { - name: "ECDSA", - hash: { - name: "SHA-384" - }, - namedCurve: "P-384" - }; - case "ES512": - return { - name: "ECDSA", - hash: { - name: "SHA-512" - }, - namedCurve: "P-521" - }; - case "EdDSA": - return { - name: "Ed25519", - namedCurve: "Ed25519" - }; - default: - throw new import_types.JwtAlgorithmNotImplemented(name); - } -} -function isCryptoKey(key) { - const runtime = (0, import_adapter.getRuntimeKey)(); - if (runtime === "node" && !!crypto.webcrypto) { - return key instanceof crypto.webcrypto.CryptoKey; - } - return key instanceof CryptoKey; -} -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - signing, - verifying -}); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/utils/jwt/jwt.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/utils/jwt/jwt.js deleted file mode 100644 index 4cb6e2d..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/utils/jwt/jwt.js +++ /dev/null @@ -1,187 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var jwt_exports = {}; -__export(jwt_exports, { - decode: () => decode, - decodeHeader: () => decodeHeader, - isTokenHeader: () => isTokenHeader, - sign: () => sign, - verify: () => verify, - verifyWithJwks: () => verifyWithJwks -}); -module.exports = __toCommonJS(jwt_exports); -var import_encode = require("../../utils/encode"); -var import_jwa = require("./jwa"); -var import_jws = require("./jws"); -var import_types = require("./types"); -var import_utf8 = require("./utf8"); -const encodeJwtPart = (part) => (0, import_encode.encodeBase64Url)(import_utf8.utf8Encoder.encode(JSON.stringify(part)).buffer).replace(/=/g, ""); -const encodeSignaturePart = (buf) => (0, import_encode.encodeBase64Url)(buf).replace(/=/g, ""); -const decodeJwtPart = (part) => JSON.parse(import_utf8.utf8Decoder.decode((0, import_encode.decodeBase64Url)(part))); -function isTokenHeader(obj) { - if (typeof obj === "object" && obj !== null) { - const objWithAlg = obj; - return "alg" in objWithAlg && Object.values(import_jwa.AlgorithmTypes).includes(objWithAlg.alg) && (!("typ" in objWithAlg) || objWithAlg.typ === "JWT"); - } - return false; -} -const sign = async (payload, privateKey, alg = "HS256") => { - const encodedPayload = encodeJwtPart(payload); - let encodedHeader; - if (typeof privateKey === "object" && "alg" in privateKey) { - alg = privateKey.alg; - encodedHeader = encodeJwtPart({ alg, typ: "JWT", kid: privateKey.kid }); - } else { - encodedHeader = encodeJwtPart({ alg, typ: "JWT" }); - } - const partialToken = `${encodedHeader}.${encodedPayload}`; - const signaturePart = await (0, import_jws.signing)(privateKey, alg, import_utf8.utf8Encoder.encode(partialToken)); - const signature = encodeSignaturePart(signaturePart); - return `${partialToken}.${signature}`; -}; -const verify = async (token, publicKey, algOrOptions) => { - const { - alg = "HS256", - iss, - nbf = true, - exp = true, - iat = true, - aud - } = typeof algOrOptions === "string" ? { alg: algOrOptions } : algOrOptions || {}; - const tokenParts = token.split("."); - if (tokenParts.length !== 3) { - throw new import_types.JwtTokenInvalid(token); - } - const { header, payload } = decode(token); - if (!isTokenHeader(header)) { - throw new import_types.JwtHeaderInvalid(header); - } - const now = Date.now() / 1e3 | 0; - if (nbf && payload.nbf && payload.nbf > now) { - throw new import_types.JwtTokenNotBefore(token); - } - if (exp && payload.exp && payload.exp <= now) { - throw new import_types.JwtTokenExpired(token); - } - if (iat && payload.iat && now < payload.iat) { - throw new import_types.JwtTokenIssuedAt(now, payload.iat); - } - if (iss) { - if (!payload.iss) { - throw new import_types.JwtTokenIssuer(iss, null); - } - if (typeof iss === "string" && payload.iss !== iss) { - throw new import_types.JwtTokenIssuer(iss, payload.iss); - } - if (iss instanceof RegExp && !iss.test(payload.iss)) { - throw new import_types.JwtTokenIssuer(iss, payload.iss); - } - } - if (aud) { - if (!payload.aud) { - throw new import_types.JwtPayloadRequiresAud(payload); - } - const audiences = Array.isArray(payload.aud) ? payload.aud : [payload.aud]; - const matched = audiences.some( - (payloadAud) => aud instanceof RegExp ? aud.test(payloadAud) : typeof aud === "string" ? payloadAud === aud : Array.isArray(aud) && aud.includes(payloadAud) - ); - if (!matched) { - throw new import_types.JwtTokenAudience(aud, payload.aud); - } - } - const headerPayload = token.substring(0, token.lastIndexOf(".")); - const verified = await (0, import_jws.verifying)( - publicKey, - alg, - (0, import_encode.decodeBase64Url)(tokenParts[2]), - import_utf8.utf8Encoder.encode(headerPayload) - ); - if (!verified) { - throw new import_types.JwtTokenSignatureMismatched(token); - } - return payload; -}; -const verifyWithJwks = async (token, options, init) => { - const verifyOpts = options.verification || {}; - const header = decodeHeader(token); - if (!isTokenHeader(header)) { - throw new import_types.JwtHeaderInvalid(header); - } - if (!header.kid) { - throw new import_types.JwtHeaderRequiresKid(header); - } - if (options.jwks_uri) { - const response = await fetch(options.jwks_uri, init); - if (!response.ok) { - throw new Error(`failed to fetch JWKS from ${options.jwks_uri}`); - } - const data = await response.json(); - if (!data.keys) { - throw new Error('invalid JWKS response. "keys" field is missing'); - } - if (!Array.isArray(data.keys)) { - throw new Error('invalid JWKS response. "keys" field is not an array'); - } - if (options.keys) { - options.keys.push(...data.keys); - } else { - options.keys = data.keys; - } - } else if (!options.keys) { - throw new Error('verifyWithJwks requires options for either "keys" or "jwks_uri" or both'); - } - const matchingKey = options.keys.find((key) => key.kid === header.kid); - if (!matchingKey) { - throw new import_types.JwtTokenInvalid(token); - } - return await verify(token, matchingKey, { - alg: matchingKey.alg || header.alg, - ...verifyOpts - }); -}; -const decode = (token) => { - try { - const [h, p] = token.split("."); - const header = decodeJwtPart(h); - const payload = decodeJwtPart(p); - return { - header, - payload - }; - } catch { - throw new import_types.JwtTokenInvalid(token); - } -}; -const decodeHeader = (token) => { - try { - const [h] = token.split("."); - return decodeJwtPart(h); - } catch { - throw new import_types.JwtTokenInvalid(token); - } -}; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - decode, - decodeHeader, - isTokenHeader, - sign, - verify, - verifyWithJwks -}); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/utils/jwt/types.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/utils/jwt/types.js deleted file mode 100644 index 48a88ec..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/utils/jwt/types.js +++ /dev/null @@ -1,130 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var types_exports = {}; -__export(types_exports, { - CryptoKeyUsage: () => CryptoKeyUsage, - JwtAlgorithmNotImplemented: () => JwtAlgorithmNotImplemented, - JwtHeaderInvalid: () => JwtHeaderInvalid, - JwtHeaderRequiresKid: () => JwtHeaderRequiresKid, - JwtPayloadRequiresAud: () => JwtPayloadRequiresAud, - JwtTokenAudience: () => JwtTokenAudience, - JwtTokenExpired: () => JwtTokenExpired, - JwtTokenInvalid: () => JwtTokenInvalid, - JwtTokenIssuedAt: () => JwtTokenIssuedAt, - JwtTokenIssuer: () => JwtTokenIssuer, - JwtTokenNotBefore: () => JwtTokenNotBefore, - JwtTokenSignatureMismatched: () => JwtTokenSignatureMismatched -}); -module.exports = __toCommonJS(types_exports); -class JwtAlgorithmNotImplemented extends Error { - constructor(alg) { - super(`${alg} is not an implemented algorithm`); - this.name = "JwtAlgorithmNotImplemented"; - } -} -class JwtTokenInvalid extends Error { - constructor(token) { - super(`invalid JWT token: ${token}`); - this.name = "JwtTokenInvalid"; - } -} -class JwtTokenNotBefore extends Error { - constructor(token) { - super(`token (${token}) is being used before it's valid`); - this.name = "JwtTokenNotBefore"; - } -} -class JwtTokenExpired extends Error { - constructor(token) { - super(`token (${token}) expired`); - this.name = "JwtTokenExpired"; - } -} -class JwtTokenIssuedAt extends Error { - constructor(currentTimestamp, iat) { - super( - `Invalid "iat" claim, must be a valid number lower than "${currentTimestamp}" (iat: "${iat}")` - ); - this.name = "JwtTokenIssuedAt"; - } -} -class JwtTokenIssuer extends Error { - constructor(expected, iss) { - super(`expected issuer "${expected}", got ${iss ? `"${iss}"` : "none"} `); - this.name = "JwtTokenIssuer"; - } -} -class JwtHeaderInvalid extends Error { - constructor(header) { - super(`jwt header is invalid: ${JSON.stringify(header)}`); - this.name = "JwtHeaderInvalid"; - } -} -class JwtHeaderRequiresKid extends Error { - constructor(header) { - super(`required "kid" in jwt header: ${JSON.stringify(header)}`); - this.name = "JwtHeaderRequiresKid"; - } -} -class JwtTokenSignatureMismatched extends Error { - constructor(token) { - super(`token(${token}) signature mismatched`); - this.name = "JwtTokenSignatureMismatched"; - } -} -class JwtPayloadRequiresAud extends Error { - constructor(payload) { - super(`required "aud" in jwt payload: ${JSON.stringify(payload)}`); - this.name = "JwtPayloadRequiresAud"; - } -} -class JwtTokenAudience extends Error { - constructor(expected, aud) { - super( - `expected audience "${Array.isArray(expected) ? expected.join(", ") : expected}", got "${aud}"` - ); - this.name = "JwtTokenAudience"; - } -} -var CryptoKeyUsage = /* @__PURE__ */ ((CryptoKeyUsage2) => { - CryptoKeyUsage2["Encrypt"] = "encrypt"; - CryptoKeyUsage2["Decrypt"] = "decrypt"; - CryptoKeyUsage2["Sign"] = "sign"; - CryptoKeyUsage2["Verify"] = "verify"; - CryptoKeyUsage2["DeriveKey"] = "deriveKey"; - CryptoKeyUsage2["DeriveBits"] = "deriveBits"; - CryptoKeyUsage2["WrapKey"] = "wrapKey"; - CryptoKeyUsage2["UnwrapKey"] = "unwrapKey"; - return CryptoKeyUsage2; -})(CryptoKeyUsage || {}); -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - CryptoKeyUsage, - JwtAlgorithmNotImplemented, - JwtHeaderInvalid, - JwtHeaderRequiresKid, - JwtPayloadRequiresAud, - JwtTokenAudience, - JwtTokenExpired, - JwtTokenInvalid, - JwtTokenIssuedAt, - JwtTokenIssuer, - JwtTokenNotBefore, - JwtTokenSignatureMismatched -}); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/utils/jwt/utf8.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/utils/jwt/utf8.js deleted file mode 100644 index 9afa123..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/utils/jwt/utf8.js +++ /dev/null @@ -1,31 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var utf8_exports = {}; -__export(utf8_exports, { - utf8Decoder: () => utf8Decoder, - utf8Encoder: () => utf8Encoder -}); -module.exports = __toCommonJS(utf8_exports); -const utf8Encoder = new TextEncoder(); -const utf8Decoder = new TextDecoder(); -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - utf8Decoder, - utf8Encoder -}); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/utils/mime.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/utils/mime.js deleted file mode 100644 index f3b1b82..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/utils/mime.js +++ /dev/null @@ -1,109 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var mime_exports = {}; -__export(mime_exports, { - getExtension: () => getExtension, - getMimeType: () => getMimeType, - mimes: () => baseMimes -}); -module.exports = __toCommonJS(mime_exports); -const getMimeType = (filename, mimes = baseMimes) => { - const regexp = /\.([a-zA-Z0-9]+?)$/; - const match = filename.match(regexp); - if (!match) { - return; - } - let mimeType = mimes[match[1]]; - if (mimeType && mimeType.startsWith("text")) { - mimeType += "; charset=utf-8"; - } - return mimeType; -}; -const getExtension = (mimeType) => { - for (const ext in baseMimes) { - if (baseMimes[ext] === mimeType) { - return ext; - } - } -}; -const _baseMimes = { - aac: "audio/aac", - avi: "video/x-msvideo", - avif: "image/avif", - av1: "video/av1", - bin: "application/octet-stream", - bmp: "image/bmp", - css: "text/css", - csv: "text/csv", - eot: "application/vnd.ms-fontobject", - epub: "application/epub+zip", - gif: "image/gif", - gz: "application/gzip", - htm: "text/html", - html: "text/html", - ico: "image/x-icon", - ics: "text/calendar", - jpeg: "image/jpeg", - jpg: "image/jpeg", - js: "text/javascript", - json: "application/json", - jsonld: "application/ld+json", - map: "application/json", - mid: "audio/x-midi", - midi: "audio/x-midi", - mjs: "text/javascript", - mp3: "audio/mpeg", - mp4: "video/mp4", - mpeg: "video/mpeg", - oga: "audio/ogg", - ogv: "video/ogg", - ogx: "application/ogg", - opus: "audio/opus", - otf: "font/otf", - pdf: "application/pdf", - png: "image/png", - rtf: "application/rtf", - svg: "image/svg+xml", - tif: "image/tiff", - tiff: "image/tiff", - ts: "video/mp2t", - ttf: "font/ttf", - txt: "text/plain", - wasm: "application/wasm", - webm: "video/webm", - weba: "audio/webm", - webmanifest: "application/manifest+json", - webp: "image/webp", - woff: "font/woff", - woff2: "font/woff2", - xhtml: "application/xhtml+xml", - xml: "application/xml", - zip: "application/zip", - "3gp": "video/3gpp", - "3g2": "video/3gpp2", - gltf: "model/gltf+json", - glb: "model/gltf-binary" -}; -const baseMimes = _baseMimes; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - getExtension, - getMimeType, - mimes -}); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/utils/stream.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/utils/stream.js deleted file mode 100644 index bbcdc01..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/utils/stream.js +++ /dev/null @@ -1,102 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var stream_exports = {}; -__export(stream_exports, { - StreamingApi: () => StreamingApi -}); -module.exports = __toCommonJS(stream_exports); -class StreamingApi { - writer; - encoder; - writable; - abortSubscribers = []; - responseReadable; - /** - * Whether the stream has been aborted. - */ - aborted = false; - /** - * Whether the stream has been closed normally. - */ - closed = false; - constructor(writable, _readable) { - this.writable = writable; - this.writer = writable.getWriter(); - this.encoder = new TextEncoder(); - const reader = _readable.getReader(); - this.abortSubscribers.push(async () => { - await reader.cancel(); - }); - this.responseReadable = new ReadableStream({ - async pull(controller) { - const { done, value } = await reader.read(); - done ? controller.close() : controller.enqueue(value); - }, - cancel: () => { - this.abort(); - } - }); - } - async write(input) { - try { - if (typeof input === "string") { - input = this.encoder.encode(input); - } - await this.writer.write(input); - } catch { - } - return this; - } - async writeln(input) { - await this.write(input + "\n"); - return this; - } - sleep(ms) { - return new Promise((res) => setTimeout(res, ms)); - } - async close() { - try { - await this.writer.close(); - } catch { - } - this.closed = true; - } - async pipe(body) { - this.writer.releaseLock(); - await body.pipeTo(this.writable, { preventClose: true }); - this.writer = this.writable.getWriter(); - } - onAbort(listener) { - this.abortSubscribers.push(listener); - } - /** - * Abort the stream. - * You can call this method when stream is aborted by external event. - */ - abort() { - if (!this.aborted) { - this.aborted = true; - this.abortSubscribers.forEach((subscriber) => subscriber()); - } - } -} -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - StreamingApi -}); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/utils/types.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/utils/types.js deleted file mode 100644 index 43ae536..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/utils/types.js +++ /dev/null @@ -1,16 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var types_exports = {}; -module.exports = __toCommonJS(types_exports); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/utils/url.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/utils/url.js deleted file mode 100644 index 21ddfab..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/utils/url.js +++ /dev/null @@ -1,253 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var url_exports = {}; -__export(url_exports, { - checkOptionalParameter: () => checkOptionalParameter, - decodeURIComponent_: () => decodeURIComponent_, - getPath: () => getPath, - getPathNoStrict: () => getPathNoStrict, - getPattern: () => getPattern, - getQueryParam: () => getQueryParam, - getQueryParams: () => getQueryParams, - getQueryStrings: () => getQueryStrings, - mergePath: () => mergePath, - splitPath: () => splitPath, - splitRoutingPath: () => splitRoutingPath, - tryDecode: () => tryDecode -}); -module.exports = __toCommonJS(url_exports); -const splitPath = (path) => { - const paths = path.split("/"); - if (paths[0] === "") { - paths.shift(); - } - return paths; -}; -const splitRoutingPath = (routePath) => { - const { groups, path } = extractGroupsFromPath(routePath); - const paths = splitPath(path); - return replaceGroupMarks(paths, groups); -}; -const extractGroupsFromPath = (path) => { - const groups = []; - path = path.replace(/\{[^}]+\}/g, (match, index) => { - const mark = `@${index}`; - groups.push([mark, match]); - return mark; - }); - return { groups, path }; -}; -const replaceGroupMarks = (paths, groups) => { - for (let i = groups.length - 1; i >= 0; i--) { - const [mark] = groups[i]; - for (let j = paths.length - 1; j >= 0; j--) { - if (paths[j].includes(mark)) { - paths[j] = paths[j].replace(mark, groups[i][1]); - break; - } - } - } - return paths; -}; -const patternCache = {}; -const getPattern = (label, next) => { - if (label === "*") { - return "*"; - } - const match = label.match(/^\:([^\{\}]+)(?:\{(.+)\})?$/); - if (match) { - const cacheKey = `${label}#${next}`; - if (!patternCache[cacheKey]) { - if (match[2]) { - patternCache[cacheKey] = next && next[0] !== ":" && next[0] !== "*" ? [cacheKey, match[1], new RegExp(`^${match[2]}(?=/${next})`)] : [label, match[1], new RegExp(`^${match[2]}$`)]; - } else { - patternCache[cacheKey] = [label, match[1], true]; - } - } - return patternCache[cacheKey]; - } - return null; -}; -const tryDecode = (str, decoder) => { - try { - return decoder(str); - } catch { - return str.replace(/(?:%[0-9A-Fa-f]{2})+/g, (match) => { - try { - return decoder(match); - } catch { - return match; - } - }); - } -}; -const tryDecodeURI = (str) => tryDecode(str, decodeURI); -const getPath = (request) => { - const url = request.url; - const start = url.indexOf("/", url.indexOf(":") + 4); - let i = start; - for (; i < url.length; i++) { - const charCode = url.charCodeAt(i); - if (charCode === 37) { - const queryIndex = url.indexOf("?", i); - const path = url.slice(start, queryIndex === -1 ? void 0 : queryIndex); - return tryDecodeURI(path.includes("%25") ? path.replace(/%25/g, "%2525") : path); - } else if (charCode === 63) { - break; - } - } - return url.slice(start, i); -}; -const getQueryStrings = (url) => { - const queryIndex = url.indexOf("?", 8); - return queryIndex === -1 ? "" : "?" + url.slice(queryIndex + 1); -}; -const getPathNoStrict = (request) => { - const result = getPath(request); - return result.length > 1 && result.at(-1) === "/" ? result.slice(0, -1) : result; -}; -const mergePath = (base, sub, ...rest) => { - if (rest.length) { - sub = mergePath(sub, ...rest); - } - return `${base?.[0] === "/" ? "" : "/"}${base}${sub === "/" ? "" : `${base?.at(-1) === "/" ? "" : "/"}${sub?.[0] === "/" ? sub.slice(1) : sub}`}`; -}; -const checkOptionalParameter = (path) => { - if (path.charCodeAt(path.length - 1) !== 63 || !path.includes(":")) { - return null; - } - const segments = path.split("/"); - const results = []; - let basePath = ""; - segments.forEach((segment) => { - if (segment !== "" && !/\:/.test(segment)) { - basePath += "/" + segment; - } else if (/\:/.test(segment)) { - if (/\?/.test(segment)) { - if (results.length === 0 && basePath === "") { - results.push("/"); - } else { - results.push(basePath); - } - const optionalSegment = segment.replace("?", ""); - basePath += "/" + optionalSegment; - results.push(basePath); - } else { - basePath += "/" + segment; - } - } - }); - return results.filter((v, i, a) => a.indexOf(v) === i); -}; -const _decodeURI = (value) => { - if (!/[%+]/.test(value)) { - return value; - } - if (value.indexOf("+") !== -1) { - value = value.replace(/\+/g, " "); - } - return value.indexOf("%") !== -1 ? tryDecode(value, decodeURIComponent_) : value; -}; -const _getQueryParam = (url, key, multiple) => { - let encoded; - if (!multiple && key && !/[%+]/.test(key)) { - let keyIndex2 = url.indexOf("?", 8); - if (keyIndex2 === -1) { - return void 0; - } - if (!url.startsWith(key, keyIndex2 + 1)) { - keyIndex2 = url.indexOf(`&${key}`, keyIndex2 + 1); - } - while (keyIndex2 !== -1) { - const trailingKeyCode = url.charCodeAt(keyIndex2 + key.length + 1); - if (trailingKeyCode === 61) { - const valueIndex = keyIndex2 + key.length + 2; - const endIndex = url.indexOf("&", valueIndex); - return _decodeURI(url.slice(valueIndex, endIndex === -1 ? void 0 : endIndex)); - } else if (trailingKeyCode == 38 || isNaN(trailingKeyCode)) { - return ""; - } - keyIndex2 = url.indexOf(`&${key}`, keyIndex2 + 1); - } - encoded = /[%+]/.test(url); - if (!encoded) { - return void 0; - } - } - const results = {}; - encoded ??= /[%+]/.test(url); - let keyIndex = url.indexOf("?", 8); - while (keyIndex !== -1) { - const nextKeyIndex = url.indexOf("&", keyIndex + 1); - let valueIndex = url.indexOf("=", keyIndex); - if (valueIndex > nextKeyIndex && nextKeyIndex !== -1) { - valueIndex = -1; - } - let name = url.slice( - keyIndex + 1, - valueIndex === -1 ? nextKeyIndex === -1 ? void 0 : nextKeyIndex : valueIndex - ); - if (encoded) { - name = _decodeURI(name); - } - keyIndex = nextKeyIndex; - if (name === "") { - continue; - } - let value; - if (valueIndex === -1) { - value = ""; - } else { - value = url.slice(valueIndex + 1, nextKeyIndex === -1 ? void 0 : nextKeyIndex); - if (encoded) { - value = _decodeURI(value); - } - } - if (multiple) { - if (!(results[name] && Array.isArray(results[name]))) { - results[name] = []; - } - ; - results[name].push(value); - } else { - results[name] ??= value; - } - } - return key ? results[key] : results; -}; -const getQueryParam = _getQueryParam; -const getQueryParams = (url, key) => { - return _getQueryParam(url, key, true); -}; -const decodeURIComponent_ = decodeURIComponent; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - checkOptionalParameter, - decodeURIComponent_, - getPath, - getPathNoStrict, - getPattern, - getQueryParam, - getQueryParams, - getQueryStrings, - mergePath, - splitPath, - splitRoutingPath, - tryDecode -}); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/validator/index.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/validator/index.js deleted file mode 100644 index cbaa47f..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/validator/index.js +++ /dev/null @@ -1,28 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var validator_exports = {}; -__export(validator_exports, { - validator: () => import_validator.validator -}); -module.exports = __toCommonJS(validator_exports); -var import_validator = require("./validator"); -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - validator -}); diff --git a/PBandGraphScaffold/node_modules/hono/dist/cjs/validator/validator.js b/PBandGraphScaffold/node_modules/hono/dist/cjs/validator/validator.js deleted file mode 100644 index 552cd60..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/cjs/validator/validator.js +++ /dev/null @@ -1,109 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var validator_exports = {}; -__export(validator_exports, { - validator: () => validator -}); -module.exports = __toCommonJS(validator_exports); -var import_cookie = require("../helper/cookie"); -var import_http_exception = require("../http-exception"); -var import_buffer = require("../utils/buffer"); -const jsonRegex = /^application\/([a-z-\.]+\+)?json(;\s*[a-zA-Z0-9\-]+\=([^;]+))*$/; -const multipartRegex = /^multipart\/form-data(;\s?boundary=[a-zA-Z0-9'"()+_,\-./:=?]+)?$/; -const urlencodedRegex = /^application\/x-www-form-urlencoded(;\s*[a-zA-Z0-9\-]+\=([^;]+))*$/; -const validator = (target, validationFunc) => { - return async (c, next) => { - let value = {}; - const contentType = c.req.header("Content-Type"); - switch (target) { - case "json": - if (!contentType || !jsonRegex.test(contentType)) { - break; - } - try { - value = await c.req.json(); - } catch { - const message = "Malformed JSON in request body"; - throw new import_http_exception.HTTPException(400, { message }); - } - break; - case "form": { - if (!contentType || !(multipartRegex.test(contentType) || urlencodedRegex.test(contentType))) { - break; - } - let formData; - if (c.req.bodyCache.formData) { - formData = await c.req.bodyCache.formData; - } else { - try { - const arrayBuffer = await c.req.arrayBuffer(); - formData = await (0, import_buffer.bufferToFormData)(arrayBuffer, contentType); - c.req.bodyCache.formData = formData; - } catch (e) { - let message = "Malformed FormData request."; - message += e instanceof Error ? ` ${e.message}` : ` ${String(e)}`; - throw new import_http_exception.HTTPException(400, { message }); - } - } - const form = {}; - formData.forEach((value2, key) => { - if (key.endsWith("[]")) { - ; - (form[key] ??= []).push(value2); - } else if (Array.isArray(form[key])) { - ; - form[key].push(value2); - } else if (key in form) { - form[key] = [form[key], value2]; - } else { - form[key] = value2; - } - }); - value = form; - break; - } - case "query": - value = Object.fromEntries( - Object.entries(c.req.queries()).map(([k, v]) => { - return v.length === 1 ? [k, v[0]] : [k, v]; - }) - ); - break; - case "param": - value = c.req.param(); - break; - case "header": - value = c.req.header(); - break; - case "cookie": - value = (0, import_cookie.getCookie)(c); - break; - } - const res = await validationFunc(value, c); - if (res instanceof Response) { - return res; - } - c.req.addValidatedData(target, res); - return await next(); - }; -}; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - validator -}); diff --git a/PBandGraphScaffold/node_modules/hono/dist/client/client.js b/PBandGraphScaffold/node_modules/hono/dist/client/client.js deleted file mode 100644 index 6b9ef67..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/client/client.js +++ /dev/null @@ -1,174 +0,0 @@ -// src/client/client.ts -import { serialize } from "../utils/cookie.js"; -import { - buildSearchParams, - deepMerge, - mergePath, - removeIndexString, - replaceUrlParam, - replaceUrlProtocol -} from "./utils.js"; -var createProxy = (callback, path) => { - const proxy = new Proxy(() => { - }, { - get(_obj, key) { - if (typeof key !== "string" || key === "then") { - return void 0; - } - return createProxy(callback, [...path, key]); - }, - apply(_1, _2, args) { - return callback({ - path, - args - }); - } - }); - return proxy; -}; -var ClientRequestImpl = class { - url; - method; - buildSearchParams; - queryParams = void 0; - pathParams = {}; - rBody; - cType = void 0; - constructor(url, method, options) { - this.url = url; - this.method = method; - this.buildSearchParams = options.buildSearchParams; - } - fetch = async (args, opt) => { - if (args) { - if (args.query) { - this.queryParams = this.buildSearchParams(args.query); - } - if (args.form) { - const form = new FormData(); - for (const [k, v] of Object.entries(args.form)) { - if (Array.isArray(v)) { - for (const v2 of v) { - form.append(k, v2); - } - } else { - form.append(k, v); - } - } - this.rBody = form; - } - if (args.json) { - this.rBody = JSON.stringify(args.json); - this.cType = "application/json"; - } - if (args.param) { - this.pathParams = args.param; - } - } - let methodUpperCase = this.method.toUpperCase(); - const headerValues = { - ...args?.header, - ...typeof opt?.headers === "function" ? await opt.headers() : opt?.headers - }; - if (args?.cookie) { - const cookies = []; - for (const [key, value] of Object.entries(args.cookie)) { - cookies.push(serialize(key, value, { path: "/" })); - } - headerValues["Cookie"] = cookies.join(","); - } - if (this.cType) { - headerValues["Content-Type"] = this.cType; - } - const headers = new Headers(headerValues ?? void 0); - let url = this.url; - url = removeIndexString(url); - url = replaceUrlParam(url, this.pathParams); - if (this.queryParams) { - url = url + "?" + this.queryParams.toString(); - } - methodUpperCase = this.method.toUpperCase(); - const setBody = !(methodUpperCase === "GET" || methodUpperCase === "HEAD"); - return (opt?.fetch || fetch)(url, { - body: setBody ? this.rBody : void 0, - method: methodUpperCase, - headers, - ...opt?.init - }); - }; -}; -var hc = (baseUrl, options) => createProxy(function proxyCallback(opts) { - const buildSearchParamsOption = options?.buildSearchParams ?? buildSearchParams; - const parts = [...opts.path]; - const lastParts = parts.slice(-3).reverse(); - if (lastParts[0] === "toString") { - if (lastParts[1] === "name") { - return lastParts[2] || ""; - } - return proxyCallback.toString(); - } - if (lastParts[0] === "valueOf") { - if (lastParts[1] === "name") { - return lastParts[2] || ""; - } - return proxyCallback; - } - let method = ""; - if (/^\$/.test(lastParts[0])) { - const last = parts.pop(); - if (last) { - method = last.replace(/^\$/, ""); - } - } - const path = parts.join("/"); - const url = mergePath(baseUrl, path); - if (method === "url") { - let result = url; - if (opts.args[0]) { - if (opts.args[0].param) { - result = replaceUrlParam(url, opts.args[0].param); - } - if (opts.args[0].query) { - result = result + "?" + buildSearchParamsOption(opts.args[0].query).toString(); - } - } - result = removeIndexString(result); - return new URL(result); - } - if (method === "ws") { - const webSocketUrl = replaceUrlProtocol( - opts.args[0] && opts.args[0].param ? replaceUrlParam(url, opts.args[0].param) : url, - "ws" - ); - const targetUrl = new URL(webSocketUrl); - const queryParams = opts.args[0]?.query; - if (queryParams) { - Object.entries(queryParams).forEach(([key, value]) => { - if (Array.isArray(value)) { - value.forEach((item) => targetUrl.searchParams.append(key, item)); - } else { - targetUrl.searchParams.set(key, value); - } - }); - } - const establishWebSocket = (...args) => { - if (options?.webSocket !== void 0 && typeof options.webSocket === "function") { - return options.webSocket(...args); - } - return new WebSocket(...args); - }; - return establishWebSocket(targetUrl.toString()); - } - const req = new ClientRequestImpl(url, method, { - buildSearchParams: buildSearchParamsOption - }); - if (method) { - options ??= {}; - const args = deepMerge(options, { ...opts.args[1] }); - return req.fetch(opts.args[0], args); - } - return req; -}, []); -export { - hc -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/client/fetch-result-please.js b/PBandGraphScaffold/node_modules/hono/dist/client/fetch-result-please.js deleted file mode 100644 index 9f7a813..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/client/fetch-result-please.js +++ /dev/null @@ -1,62 +0,0 @@ -// src/client/fetch-result-please.ts -var nullBodyResponses = /* @__PURE__ */ new Set([101, 204, 205, 304]); -async function fetchRP(fetchRes) { - const _fetchRes = await fetchRes; - const hasBody = (_fetchRes.body || _fetchRes._bodyInit) && !nullBodyResponses.has(_fetchRes.status); - if (hasBody) { - const responseType = detectResponseType(_fetchRes); - _fetchRes._data = await _fetchRes[responseType](); - } - if (!_fetchRes.ok) { - throw new DetailedError(`${_fetchRes.status} ${_fetchRes.statusText}`, { - statusCode: _fetchRes?.status, - detail: { - data: _fetchRes?._data, - statusText: _fetchRes?.statusText - } - }); - } - return _fetchRes._data; -} -var DetailedError = class extends Error { - /** - * Additional `message` that will be logged AND returned to client - */ - detail; - /** - * Additional `code` that will be logged AND returned to client - */ - code; - /** - * Additional value that will be logged AND NOT returned to client - */ - log; - /** - * Optionally set the status code to return, in a web server context - */ - statusCode; - constructor(message, options = {}) { - super(message); - this.name = "DetailedError"; - this.log = options.log; - this.detail = options.detail; - this.code = options.code; - this.statusCode = options.statusCode; - } -}; -var jsonRegex = /^application\/(?:[\w!#$%&*.^`~-]*\+)?json(?:;.+)?$/i; -function detectResponseType(response) { - const _contentType = response.headers.get("content-type"); - if (!_contentType) { - return "text"; - } - const contentType = _contentType.split(";").shift(); - if (jsonRegex.test(contentType)) { - return "json"; - } - return "text"; -} -export { - DetailedError, - fetchRP -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/client/index.js b/PBandGraphScaffold/node_modules/hono/dist/client/index.js deleted file mode 100644 index e133afa..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/client/index.js +++ /dev/null @@ -1,8 +0,0 @@ -// src/client/index.ts -import { hc } from "./client.js"; -import { parseResponse, DetailedError } from "./utils.js"; -export { - DetailedError, - hc, - parseResponse -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/client/types.js b/PBandGraphScaffold/node_modules/hono/dist/client/types.js deleted file mode 100644 index e69de29..0000000 diff --git a/PBandGraphScaffold/node_modules/hono/dist/client/utils.js b/PBandGraphScaffold/node_modules/hono/dist/client/utils.js deleted file mode 100644 index 1842ff8..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/client/utils.js +++ /dev/null @@ -1,76 +0,0 @@ -// src/client/utils.ts -import { fetchRP, DetailedError } from "./fetch-result-please.js"; -var mergePath = (base, path) => { - base = base.replace(/\/+$/, ""); - base = base + "/"; - path = path.replace(/^\/+/, ""); - return base + path; -}; -var replaceUrlParam = (urlString, params) => { - for (const [k, v] of Object.entries(params)) { - const reg = new RegExp("/:" + k + "(?:{[^/]+})?\\??"); - urlString = urlString.replace(reg, v ? `/${v}` : ""); - } - return urlString; -}; -var buildSearchParams = (query) => { - const searchParams = new URLSearchParams(); - for (const [k, v] of Object.entries(query)) { - if (v === void 0) { - continue; - } - if (Array.isArray(v)) { - for (const v2 of v) { - searchParams.append(k, v2); - } - } else { - searchParams.set(k, v); - } - } - return searchParams; -}; -var replaceUrlProtocol = (urlString, protocol) => { - switch (protocol) { - case "ws": - return urlString.replace(/^http/, "ws"); - case "http": - return urlString.replace(/^ws/, "http"); - } -}; -var removeIndexString = (urlString) => { - if (/^https?:\/\/[^\/]+?\/index(?=\?|$)/.test(urlString)) { - return urlString.replace(/\/index(?=\?|$)/, "/"); - } - return urlString.replace(/\/index(?=\?|$)/, ""); -}; -function isObject(item) { - return typeof item === "object" && item !== null && !Array.isArray(item); -} -function deepMerge(target, source) { - if (!isObject(target) && !isObject(source)) { - return source; - } - const merged = { ...target }; - for (const key in source) { - const value = source[key]; - if (isObject(merged[key]) && isObject(value)) { - merged[key] = deepMerge(merged[key], value); - } else { - merged[key] = value; - } - } - return merged; -} -async function parseResponse(fetchRes) { - return fetchRP(fetchRes); -} -export { - DetailedError, - buildSearchParams, - deepMerge, - mergePath, - parseResponse, - removeIndexString, - replaceUrlParam, - replaceUrlProtocol -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/compose.js b/PBandGraphScaffold/node_modules/hono/dist/compose.js deleted file mode 100644 index 8e1326f..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/compose.js +++ /dev/null @@ -1,46 +0,0 @@ -// src/compose.ts -var compose = (middleware, onError, onNotFound) => { - return (context, next) => { - let index = -1; - return dispatch(0); - async function dispatch(i) { - if (i <= index) { - throw new Error("next() called multiple times"); - } - index = i; - let res; - let isError = false; - let handler; - if (middleware[i]) { - handler = middleware[i][0][0]; - context.req.routeIndex = i; - } else { - handler = i === middleware.length && next || void 0; - } - if (handler) { - try { - res = await handler(context, () => dispatch(i + 1)); - } catch (err) { - if (err instanceof Error && onError) { - context.error = err; - res = await onError(err, context); - isError = true; - } else { - throw err; - } - } - } else { - if (context.finalized === false && onNotFound) { - res = await onNotFound(context); - } - } - if (res && (context.finalized === false || isError)) { - context.res = res; - } - return context; - } - }; -}; -export { - compose -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/context.js b/PBandGraphScaffold/node_modules/hono/dist/context.js deleted file mode 100644 index 3d8a9c6..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/context.js +++ /dev/null @@ -1,411 +0,0 @@ -// src/context.ts -import { HonoRequest } from "./request.js"; -import { HtmlEscapedCallbackPhase, resolveCallback } from "./utils/html.js"; -var TEXT_PLAIN = "text/plain; charset=UTF-8"; -var setDefaultContentType = (contentType, headers) => { - return { - "Content-Type": contentType, - ...headers - }; -}; -var Context = class { - #rawRequest; - #req; - /** - * `.env` can get bindings (environment variables, secrets, KV namespaces, D1 database, R2 bucket etc.) in Cloudflare Workers. - * - * @see {@link https://hono.dev/docs/api/context#env} - * - * @example - * ```ts - * // Environment object for Cloudflare Workers - * app.get('*', async c => { - * const counter = c.env.COUNTER - * }) - * ``` - */ - env = {}; - #var; - finalized = false; - /** - * `.error` can get the error object from the middleware if the Handler throws an error. - * - * @see {@link https://hono.dev/docs/api/context#error} - * - * @example - * ```ts - * app.use('*', async (c, next) => { - * await next() - * if (c.error) { - * // do something... - * } - * }) - * ``` - */ - error; - #status; - #executionCtx; - #res; - #layout; - #renderer; - #notFoundHandler; - #preparedHeaders; - #matchResult; - #path; - /** - * Creates an instance of the Context class. - * - * @param req - The Request object. - * @param options - Optional configuration options for the context. - */ - constructor(req, options) { - this.#rawRequest = req; - if (options) { - this.#executionCtx = options.executionCtx; - this.env = options.env; - this.#notFoundHandler = options.notFoundHandler; - this.#path = options.path; - this.#matchResult = options.matchResult; - } - } - /** - * `.req` is the instance of {@link HonoRequest}. - */ - get req() { - this.#req ??= new HonoRequest(this.#rawRequest, this.#path, this.#matchResult); - return this.#req; - } - /** - * @see {@link https://hono.dev/docs/api/context#event} - * The FetchEvent associated with the current request. - * - * @throws Will throw an error if the context does not have a FetchEvent. - */ - get event() { - if (this.#executionCtx && "respondWith" in this.#executionCtx) { - return this.#executionCtx; - } else { - throw Error("This context has no FetchEvent"); - } - } - /** - * @see {@link https://hono.dev/docs/api/context#executionctx} - * The ExecutionContext associated with the current request. - * - * @throws Will throw an error if the context does not have an ExecutionContext. - */ - get executionCtx() { - if (this.#executionCtx) { - return this.#executionCtx; - } else { - throw Error("This context has no ExecutionContext"); - } - } - /** - * @see {@link https://hono.dev/docs/api/context#res} - * The Response object for the current request. - */ - get res() { - return this.#res ||= new Response(null, { - headers: this.#preparedHeaders ??= new Headers() - }); - } - /** - * Sets the Response object for the current request. - * - * @param _res - The Response object to set. - */ - set res(_res) { - if (this.#res && _res) { - _res = new Response(_res.body, _res); - for (const [k, v] of this.#res.headers.entries()) { - if (k === "content-type") { - continue; - } - if (k === "set-cookie") { - const cookies = this.#res.headers.getSetCookie(); - _res.headers.delete("set-cookie"); - for (const cookie of cookies) { - _res.headers.append("set-cookie", cookie); - } - } else { - _res.headers.set(k, v); - } - } - } - this.#res = _res; - this.finalized = true; - } - /** - * `.render()` can create a response within a layout. - * - * @see {@link https://hono.dev/docs/api/context#render-setrenderer} - * - * @example - * ```ts - * app.get('/', (c) => { - * return c.render('Hello!') - * }) - * ``` - */ - render = (...args) => { - this.#renderer ??= (content) => this.html(content); - return this.#renderer(...args); - }; - /** - * Sets the layout for the response. - * - * @param layout - The layout to set. - * @returns The layout function. - */ - setLayout = (layout) => this.#layout = layout; - /** - * Gets the current layout for the response. - * - * @returns The current layout function. - */ - getLayout = () => this.#layout; - /** - * `.setRenderer()` can set the layout in the custom middleware. - * - * @see {@link https://hono.dev/docs/api/context#render-setrenderer} - * - * @example - * ```tsx - * app.use('*', async (c, next) => { - * c.setRenderer((content) => { - * return c.html( - * - * - *

{content}

- * - * - * ) - * }) - * await next() - * }) - * ``` - */ - setRenderer = (renderer) => { - this.#renderer = renderer; - }; - /** - * `.header()` can set headers. - * - * @see {@link https://hono.dev/docs/api/context#header} - * - * @example - * ```ts - * app.get('/welcome', (c) => { - * // Set headers - * c.header('X-Message', 'Hello!') - * c.header('Content-Type', 'text/plain') - * - * return c.body('Thank you for coming') - * }) - * ``` - */ - header = (name, value, options) => { - if (this.finalized) { - this.#res = new Response(this.#res.body, this.#res); - } - const headers = this.#res ? this.#res.headers : this.#preparedHeaders ??= new Headers(); - if (value === void 0) { - headers.delete(name); - } else if (options?.append) { - headers.append(name, value); - } else { - headers.set(name, value); - } - }; - status = (status) => { - this.#status = status; - }; - /** - * `.set()` can set the value specified by the key. - * - * @see {@link https://hono.dev/docs/api/context#set-get} - * - * @example - * ```ts - * app.use('*', async (c, next) => { - * c.set('message', 'Hono is hot!!') - * await next() - * }) - * ``` - */ - set = (key, value) => { - this.#var ??= /* @__PURE__ */ new Map(); - this.#var.set(key, value); - }; - /** - * `.get()` can use the value specified by the key. - * - * @see {@link https://hono.dev/docs/api/context#set-get} - * - * @example - * ```ts - * app.get('/', (c) => { - * const message = c.get('message') - * return c.text(`The message is "${message}"`) - * }) - * ``` - */ - get = (key) => { - return this.#var ? this.#var.get(key) : void 0; - }; - /** - * `.var` can access the value of a variable. - * - * @see {@link https://hono.dev/docs/api/context#var} - * - * @example - * ```ts - * const result = c.var.client.oneMethod() - * ``` - */ - // c.var.propName is a read-only - get var() { - if (!this.#var) { - return {}; - } - return Object.fromEntries(this.#var); - } - #newResponse(data, arg, headers) { - const responseHeaders = this.#res ? new Headers(this.#res.headers) : this.#preparedHeaders ?? new Headers(); - if (typeof arg === "object" && "headers" in arg) { - const argHeaders = arg.headers instanceof Headers ? arg.headers : new Headers(arg.headers); - for (const [key, value] of argHeaders) { - if (key.toLowerCase() === "set-cookie") { - responseHeaders.append(key, value); - } else { - responseHeaders.set(key, value); - } - } - } - if (headers) { - for (const [k, v] of Object.entries(headers)) { - if (typeof v === "string") { - responseHeaders.set(k, v); - } else { - responseHeaders.delete(k); - for (const v2 of v) { - responseHeaders.append(k, v2); - } - } - } - } - const status = typeof arg === "number" ? arg : arg?.status ?? this.#status; - return new Response(data, { status, headers: responseHeaders }); - } - newResponse = (...args) => this.#newResponse(...args); - /** - * `.body()` can return the HTTP response. - * You can set headers with `.header()` and set HTTP status code with `.status`. - * This can also be set in `.text()`, `.json()` and so on. - * - * @see {@link https://hono.dev/docs/api/context#body} - * - * @example - * ```ts - * app.get('/welcome', (c) => { - * // Set headers - * c.header('X-Message', 'Hello!') - * c.header('Content-Type', 'text/plain') - * // Set HTTP status code - * c.status(201) - * - * // Return the response body - * return c.body('Thank you for coming') - * }) - * ``` - */ - body = (data, arg, headers) => this.#newResponse(data, arg, headers); - /** - * `.text()` can render text as `Content-Type:text/plain`. - * - * @see {@link https://hono.dev/docs/api/context#text} - * - * @example - * ```ts - * app.get('/say', (c) => { - * return c.text('Hello!') - * }) - * ``` - */ - text = (text, arg, headers) => { - return !this.#preparedHeaders && !this.#status && !arg && !headers && !this.finalized ? new Response(text) : this.#newResponse( - text, - arg, - setDefaultContentType(TEXT_PLAIN, headers) - ); - }; - /** - * `.json()` can render JSON as `Content-Type:application/json`. - * - * @see {@link https://hono.dev/docs/api/context#json} - * - * @example - * ```ts - * app.get('/api', (c) => { - * return c.json({ message: 'Hello!' }) - * }) - * ``` - */ - json = (object, arg, headers) => { - return this.#newResponse( - JSON.stringify(object), - arg, - setDefaultContentType("application/json", headers) - ); - }; - html = (html, arg, headers) => { - const res = (html2) => this.#newResponse(html2, arg, setDefaultContentType("text/html; charset=UTF-8", headers)); - return typeof html === "object" ? resolveCallback(html, HtmlEscapedCallbackPhase.Stringify, false, {}).then(res) : res(html); - }; - /** - * `.redirect()` can Redirect, default status code is 302. - * - * @see {@link https://hono.dev/docs/api/context#redirect} - * - * @example - * ```ts - * app.get('/redirect', (c) => { - * return c.redirect('/') - * }) - * app.get('/redirect-permanently', (c) => { - * return c.redirect('/', 301) - * }) - * ``` - */ - redirect = (location, status) => { - const locationString = String(location); - this.header( - "Location", - // Multibyes should be encoded - // eslint-disable-next-line no-control-regex - !/[^\x00-\xFF]/.test(locationString) ? locationString : encodeURI(locationString) - ); - return this.newResponse(null, status ?? 302); - }; - /** - * `.notFound()` can return the Not Found Response. - * - * @see {@link https://hono.dev/docs/api/context#notfound} - * - * @example - * ```ts - * app.get('/notfound', (c) => { - * return c.notFound() - * }) - * ``` - */ - notFound = () => { - this.#notFoundHandler ??= () => new Response(); - return this.#notFoundHandler(this); - }; -}; -export { - Context, - TEXT_PLAIN -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/helper/accepts/accepts.js b/PBandGraphScaffold/node_modules/hono/dist/helper/accepts/accepts.js deleted file mode 100644 index fd87c4c..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/helper/accepts/accepts.js +++ /dev/null @@ -1,20 +0,0 @@ -// src/helper/accepts/accepts.ts -import { parseAccept } from "../../utils/accept.js"; -var defaultMatch = (accepts2, config) => { - const { supports, default: defaultSupport } = config; - const accept = accepts2.sort((a, b) => b.q - a.q).find((accept2) => supports.includes(accept2.type)); - return accept ? accept.type : defaultSupport; -}; -var accepts = (c, options) => { - const acceptHeader = c.req.header(options.header); - if (!acceptHeader) { - return options.default; - } - const accepts2 = parseAccept(acceptHeader); - const match = options.match || defaultMatch; - return match(accepts2, options); -}; -export { - accepts, - defaultMatch -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/helper/accepts/index.js b/PBandGraphScaffold/node_modules/hono/dist/helper/accepts/index.js deleted file mode 100644 index f80f3c8..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/helper/accepts/index.js +++ /dev/null @@ -1,5 +0,0 @@ -// src/helper/accepts/index.ts -import { accepts } from "./accepts.js"; -export { - accepts -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/helper/adapter/index.js b/PBandGraphScaffold/node_modules/hono/dist/helper/adapter/index.js deleted file mode 100644 index 7eb7803..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/helper/adapter/index.js +++ /dev/null @@ -1,56 +0,0 @@ -// src/helper/adapter/index.ts -var env = (c, runtime) => { - const global = globalThis; - const globalEnv = global?.process?.env; - runtime ??= getRuntimeKey(); - const runtimeEnvHandlers = { - bun: () => globalEnv, - node: () => globalEnv, - "edge-light": () => globalEnv, - deno: () => { - return Deno.env.toObject(); - }, - workerd: () => c.env, - // On Fastly Compute, you can use the ConfigStore to manage user-defined data. - fastly: () => ({}), - other: () => ({}) - }; - return runtimeEnvHandlers[runtime](); -}; -var knownUserAgents = { - deno: "Deno", - bun: "Bun", - workerd: "Cloudflare-Workers", - node: "Node.js" -}; -var getRuntimeKey = () => { - const global = globalThis; - const userAgentSupported = typeof navigator !== "undefined" && typeof navigator.userAgent === "string"; - if (userAgentSupported) { - for (const [runtimeKey, userAgent] of Object.entries(knownUserAgents)) { - if (checkUserAgentEquals(userAgent)) { - return runtimeKey; - } - } - } - if (typeof global?.EdgeRuntime === "string") { - return "edge-light"; - } - if (global?.fastly !== void 0) { - return "fastly"; - } - if (global?.process?.release?.name === "node") { - return "node"; - } - return "other"; -}; -var checkUserAgentEquals = (platform) => { - const userAgent = navigator.userAgent; - return userAgent.startsWith(platform); -}; -export { - checkUserAgentEquals, - env, - getRuntimeKey, - knownUserAgents -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/helper/conninfo/index.js b/PBandGraphScaffold/node_modules/hono/dist/helper/conninfo/index.js deleted file mode 100644 index e69de29..0000000 diff --git a/PBandGraphScaffold/node_modules/hono/dist/helper/conninfo/types.js b/PBandGraphScaffold/node_modules/hono/dist/helper/conninfo/types.js deleted file mode 100644 index e69de29..0000000 diff --git a/PBandGraphScaffold/node_modules/hono/dist/helper/cookie/index.js b/PBandGraphScaffold/node_modules/hono/dist/helper/cookie/index.js deleted file mode 100644 index 59f9968..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/helper/cookie/index.js +++ /dev/null @@ -1,102 +0,0 @@ -// src/helper/cookie/index.ts -import { parse, parseSigned, serialize, serializeSigned } from "../../utils/cookie.js"; -var getCookie = (c, key, prefix) => { - const cookie = c.req.raw.headers.get("Cookie"); - if (typeof key === "string") { - if (!cookie) { - return void 0; - } - let finalKey = key; - if (prefix === "secure") { - finalKey = "__Secure-" + key; - } else if (prefix === "host") { - finalKey = "__Host-" + key; - } - const obj2 = parse(cookie, finalKey); - return obj2[finalKey]; - } - if (!cookie) { - return {}; - } - const obj = parse(cookie); - return obj; -}; -var getSignedCookie = async (c, secret, key, prefix) => { - const cookie = c.req.raw.headers.get("Cookie"); - if (typeof key === "string") { - if (!cookie) { - return void 0; - } - let finalKey = key; - if (prefix === "secure") { - finalKey = "__Secure-" + key; - } else if (prefix === "host") { - finalKey = "__Host-" + key; - } - const obj2 = await parseSigned(cookie, secret, finalKey); - return obj2[finalKey]; - } - if (!cookie) { - return {}; - } - const obj = await parseSigned(cookie, secret); - return obj; -}; -var generateCookie = (name, value, opt) => { - let cookie; - if (opt?.prefix === "secure") { - cookie = serialize("__Secure-" + name, value, { path: "/", ...opt, secure: true }); - } else if (opt?.prefix === "host") { - cookie = serialize("__Host-" + name, value, { - ...opt, - path: "/", - secure: true, - domain: void 0 - }); - } else { - cookie = serialize(name, value, { path: "/", ...opt }); - } - return cookie; -}; -var setCookie = (c, name, value, opt) => { - const cookie = generateCookie(name, value, opt); - c.header("Set-Cookie", cookie, { append: true }); -}; -var generateSignedCookie = async (name, value, secret, opt) => { - let cookie; - if (opt?.prefix === "secure") { - cookie = await serializeSigned("__Secure-" + name, value, secret, { - path: "/", - ...opt, - secure: true - }); - } else if (opt?.prefix === "host") { - cookie = await serializeSigned("__Host-" + name, value, secret, { - ...opt, - path: "/", - secure: true, - domain: void 0 - }); - } else { - cookie = await serializeSigned(name, value, secret, { path: "/", ...opt }); - } - return cookie; -}; -var setSignedCookie = async (c, name, value, secret, opt) => { - const cookie = await generateSignedCookie(name, value, secret, opt); - c.header("set-cookie", cookie, { append: true }); -}; -var deleteCookie = (c, name, opt) => { - const deletedCookie = getCookie(c, name, opt?.prefix); - setCookie(c, name, "", { ...opt, maxAge: 0 }); - return deletedCookie; -}; -export { - deleteCookie, - generateCookie, - generateSignedCookie, - getCookie, - getSignedCookie, - setCookie, - setSignedCookie -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/helper/css/common.js b/PBandGraphScaffold/node_modules/hono/dist/helper/css/common.js deleted file mode 100644 index a48d437..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/helper/css/common.js +++ /dev/null @@ -1,185 +0,0 @@ -// src/helper/css/common.ts -var PSEUDO_GLOBAL_SELECTOR = ":-hono-global"; -var isPseudoGlobalSelectorRe = new RegExp(`^${PSEUDO_GLOBAL_SELECTOR}{(.*)}$`); -var DEFAULT_STYLE_ID = "hono-css"; -var SELECTOR = /* @__PURE__ */ Symbol(); -var CLASS_NAME = /* @__PURE__ */ Symbol(); -var STYLE_STRING = /* @__PURE__ */ Symbol(); -var SELECTORS = /* @__PURE__ */ Symbol(); -var EXTERNAL_CLASS_NAMES = /* @__PURE__ */ Symbol(); -var CSS_ESCAPED = /* @__PURE__ */ Symbol(); -var IS_CSS_ESCAPED = /* @__PURE__ */ Symbol(); -var rawCssString = (value) => { - return { - [CSS_ESCAPED]: value - }; -}; -var toHash = (str) => { - let i = 0, out = 11; - while (i < str.length) { - out = 101 * out + str.charCodeAt(i++) >>> 0; - } - return "css-" + out; -}; -var cssStringReStr = [ - '"(?:(?:\\\\[\\s\\S]|[^"\\\\])*)"', - // double quoted string - "'(?:(?:\\\\[\\s\\S]|[^'\\\\])*)'" - // single quoted string -].join("|"); -var minifyCssRe = new RegExp( - [ - "(" + cssStringReStr + ")", - // $1: quoted string - "(?:" + [ - "^\\s+", - // head whitespace - "\\/\\*.*?\\*\\/\\s*", - // multi-line comment - "\\/\\/.*\\n\\s*", - // single-line comment - "\\s+$" - // tail whitespace - ].join("|") + ")", - "\\s*;\\s*(}|$)\\s*", - // $2: trailing semicolon - "\\s*([{};:,])\\s*", - // $3: whitespace around { } : , ; - "(\\s)\\s+" - // $4: 2+ spaces - ].join("|"), - "g" -); -var minify = (css) => { - return css.replace(minifyCssRe, (_, $1, $2, $3, $4) => $1 || $2 || $3 || $4 || ""); -}; -var buildStyleString = (strings, values) => { - const selectors = []; - const externalClassNames = []; - const label = strings[0].match(/^\s*\/\*(.*?)\*\//)?.[1] || ""; - let styleString = ""; - for (let i = 0, len = strings.length; i < len; i++) { - styleString += strings[i]; - let vArray = values[i]; - if (typeof vArray === "boolean" || vArray === null || vArray === void 0) { - continue; - } - if (!Array.isArray(vArray)) { - vArray = [vArray]; - } - for (let j = 0, len2 = vArray.length; j < len2; j++) { - let value = vArray[j]; - if (typeof value === "boolean" || value === null || value === void 0) { - continue; - } - if (typeof value === "string") { - if (/([\\"'\/])/.test(value)) { - styleString += value.replace(/([\\"']|(?<=<)\/)/g, "\\$1"); - } else { - styleString += value; - } - } else if (typeof value === "number") { - styleString += value; - } else if (value[CSS_ESCAPED]) { - styleString += value[CSS_ESCAPED]; - } else if (value[CLASS_NAME].startsWith("@keyframes ")) { - selectors.push(value); - styleString += ` ${value[CLASS_NAME].substring(11)} `; - } else { - if (strings[i + 1]?.match(/^\s*{/)) { - selectors.push(value); - value = `.${value[CLASS_NAME]}`; - } else { - selectors.push(...value[SELECTORS]); - externalClassNames.push(...value[EXTERNAL_CLASS_NAMES]); - value = value[STYLE_STRING]; - const valueLen = value.length; - if (valueLen > 0) { - const lastChar = value[valueLen - 1]; - if (lastChar !== ";" && lastChar !== "}") { - value += ";"; - } - } - } - styleString += `${value || ""}`; - } - } - } - return [label, minify(styleString), selectors, externalClassNames]; -}; -var cssCommon = (strings, values) => { - let [label, thisStyleString, selectors, externalClassNames] = buildStyleString(strings, values); - const isPseudoGlobal = isPseudoGlobalSelectorRe.exec(thisStyleString); - if (isPseudoGlobal) { - thisStyleString = isPseudoGlobal[1]; - } - const selector = (isPseudoGlobal ? PSEUDO_GLOBAL_SELECTOR : "") + toHash(label + thisStyleString); - const className = (isPseudoGlobal ? selectors.map((s) => s[CLASS_NAME]) : [selector, ...externalClassNames]).join(" "); - return { - [SELECTOR]: selector, - [CLASS_NAME]: className, - [STYLE_STRING]: thisStyleString, - [SELECTORS]: selectors, - [EXTERNAL_CLASS_NAMES]: externalClassNames - }; -}; -var cxCommon = (args) => { - for (let i = 0, len = args.length; i < len; i++) { - const arg = args[i]; - if (typeof arg === "string") { - args[i] = { - [SELECTOR]: "", - [CLASS_NAME]: "", - [STYLE_STRING]: "", - [SELECTORS]: [], - [EXTERNAL_CLASS_NAMES]: [arg] - }; - } - } - return args; -}; -var keyframesCommon = (strings, ...values) => { - const [label, styleString] = buildStyleString(strings, values); - return { - [SELECTOR]: "", - [CLASS_NAME]: `@keyframes ${toHash(label + styleString)}`, - [STYLE_STRING]: styleString, - [SELECTORS]: [], - [EXTERNAL_CLASS_NAMES]: [] - }; -}; -var viewTransitionNameIndex = 0; -var viewTransitionCommon = ((strings, values) => { - if (!strings) { - strings = [`/* h-v-t ${viewTransitionNameIndex++} */`]; - } - const content = Array.isArray(strings) ? cssCommon(strings, values) : strings; - const transitionName = content[CLASS_NAME]; - const res = cssCommon(["view-transition-name:", ""], [transitionName]); - content[CLASS_NAME] = PSEUDO_GLOBAL_SELECTOR + content[CLASS_NAME]; - content[STYLE_STRING] = content[STYLE_STRING].replace( - /(?<=::view-transition(?:[a-z-]*)\()(?=\))/g, - transitionName - ); - res[CLASS_NAME] = res[SELECTOR] = transitionName; - res[SELECTORS] = [...content[SELECTORS], content]; - return res; -}); -export { - CLASS_NAME, - DEFAULT_STYLE_ID, - EXTERNAL_CLASS_NAMES, - IS_CSS_ESCAPED, - PSEUDO_GLOBAL_SELECTOR, - SELECTOR, - SELECTORS, - STYLE_STRING, - buildStyleString, - cssCommon, - cxCommon, - isPseudoGlobalSelectorRe, - keyframesCommon, - minify, - rawCssString, - viewTransitionCommon -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/helper/css/index.js b/PBandGraphScaffold/node_modules/hono/dist/helper/css/index.js deleted file mode 100644 index b60a2c7..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/helper/css/index.js +++ /dev/null @@ -1,125 +0,0 @@ -// src/helper/css/index.ts -import { raw } from "../../helper/html/index.js"; -import { DOM_RENDERER } from "../../jsx/constants.js"; -import { createCssJsxDomObjects } from "../../jsx/dom/css.js"; -import { - CLASS_NAME, - DEFAULT_STYLE_ID, - PSEUDO_GLOBAL_SELECTOR, - SELECTOR, - SELECTORS, - STYLE_STRING, - cssCommon, - cxCommon, - keyframesCommon, - viewTransitionCommon -} from "./common.js"; -import { rawCssString } from "./common.js"; -var createCssContext = ({ id }) => { - const [cssJsxDomObject, StyleRenderToDom] = createCssJsxDomObjects({ id }); - const contextMap = /* @__PURE__ */ new WeakMap(); - const nonceMap = /* @__PURE__ */ new WeakMap(); - const replaceStyleRe = new RegExp(`()`); - const newCssClassNameObject = (cssClassName) => { - const appendStyle = ({ buffer, context }) => { - const [toAdd, added] = contextMap.get(context); - const names = Object.keys(toAdd); - if (!names.length) { - return; - } - let stylesStr = ""; - names.forEach((className2) => { - added[className2] = true; - stylesStr += className2.startsWith(PSEUDO_GLOBAL_SELECTOR) ? toAdd[className2] : `${className2[0] === "@" ? "" : "."}${className2}{${toAdd[className2]}}`; - }); - contextMap.set(context, [{}, added]); - if (buffer && replaceStyleRe.test(buffer[0])) { - buffer[0] = buffer[0].replace(replaceStyleRe, (_, pre, post) => `${pre}${stylesStr}${post}`); - return; - } - const nonce = nonceMap.get(context); - const appendStyleScript = `document.querySelector('#${id}').textContent+=${JSON.stringify(stylesStr)}`; - if (buffer) { - buffer[0] = `${appendStyleScript}${buffer[0]}`; - return; - } - return Promise.resolve(appendStyleScript); - }; - const addClassNameToContext = ({ context }) => { - if (!contextMap.has(context)) { - contextMap.set(context, [{}, {}]); - } - const [toAdd, added] = contextMap.get(context); - let allAdded = true; - if (!added[cssClassName[SELECTOR]]) { - allAdded = false; - toAdd[cssClassName[SELECTOR]] = cssClassName[STYLE_STRING]; - } - cssClassName[SELECTORS].forEach( - ({ [CLASS_NAME]: className2, [STYLE_STRING]: styleString }) => { - if (!added[className2]) { - allAdded = false; - toAdd[className2] = styleString; - } - } - ); - if (allAdded) { - return; - } - return Promise.resolve(raw("", [appendStyle])); - }; - const className = new String(cssClassName[CLASS_NAME]); - Object.assign(className, cssClassName); - className.isEscaped = true; - className.callbacks = [addClassNameToContext]; - const promise = Promise.resolve(className); - Object.assign(promise, cssClassName); - promise.toString = cssJsxDomObject.toString; - return promise; - }; - const css2 = (strings, ...values) => { - return newCssClassNameObject(cssCommon(strings, values)); - }; - const cx2 = (...args) => { - args = cxCommon(args); - return css2(Array(args.length).fill(""), ...args); - }; - const keyframes2 = keyframesCommon; - const viewTransition2 = ((strings, ...values) => { - return newCssClassNameObject(viewTransitionCommon(strings, values)); - }); - const Style2 = ({ children, nonce } = {}) => raw( - ``, - [ - ({ context }) => { - nonceMap.set(context, nonce); - return void 0; - } - ] - ); - Style2[DOM_RENDERER] = StyleRenderToDom; - return { - css: css2, - cx: cx2, - keyframes: keyframes2, - viewTransition: viewTransition2, - Style: Style2 - }; -}; -var defaultContext = createCssContext({ - id: DEFAULT_STYLE_ID -}); -var css = defaultContext.css; -var cx = defaultContext.cx; -var keyframes = defaultContext.keyframes; -var viewTransition = defaultContext.viewTransition; -var Style = defaultContext.Style; -export { - Style, - createCssContext, - css, - cx, - keyframes, - rawCssString, - viewTransition -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/helper/dev/index.js b/PBandGraphScaffold/node_modules/hono/dist/helper/dev/index.js deleted file mode 100644 index 98244ef..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/helper/dev/index.js +++ /dev/null @@ -1,55 +0,0 @@ -// src/helper/dev/index.ts -import { getColorEnabled } from "../../utils/color.js"; -import { findTargetHandler, isMiddleware } from "../../utils/handler.js"; -var handlerName = (handler) => { - return handler.name || (isMiddleware(handler) ? "[middleware]" : "[handler]"); -}; -var inspectRoutes = (hono) => { - return hono.routes.map(({ path, method, handler }) => { - const targetHandler = findTargetHandler(handler); - return { - path, - method, - name: handlerName(targetHandler), - isMiddleware: isMiddleware(targetHandler) - }; - }); -}; -var showRoutes = (hono, opts) => { - const colorEnabled = opts?.colorize ?? getColorEnabled(); - const routeData = {}; - let maxMethodLength = 0; - let maxPathLength = 0; - inspectRoutes(hono).filter(({ isMiddleware: isMiddleware2 }) => opts?.verbose || !isMiddleware2).map((route) => { - const key = `${route.method}-${route.path}`; - (routeData[key] ||= []).push(route); - if (routeData[key].length > 1) { - return; - } - maxMethodLength = Math.max(maxMethodLength, route.method.length); - maxPathLength = Math.max(maxPathLength, route.path.length); - return { method: route.method, path: route.path, routes: routeData[key] }; - }).forEach((data) => { - if (!data) { - return; - } - const { method, path, routes } = data; - const methodStr = colorEnabled ? `\x1B[32m${method}\x1B[0m` : method; - console.log(`${methodStr} ${" ".repeat(maxMethodLength - method.length)} ${path}`); - if (!opts?.verbose) { - return; - } - routes.forEach(({ name }) => { - console.log(`${" ".repeat(maxMethodLength + 3)} ${name}`); - }); - }); -}; -var getRouterName = (app) => { - app.router.match("GET", "/"); - return app.router.name; -}; -export { - getRouterName, - inspectRoutes, - showRoutes -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/helper/factory/index.js b/PBandGraphScaffold/node_modules/hono/dist/helper/factory/index.js deleted file mode 100644 index 6b48e91..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/helper/factory/index.js +++ /dev/null @@ -1,30 +0,0 @@ -// src/helper/factory/index.ts -import { Hono } from "../../hono.js"; -var Factory = class { - initApp; - #defaultAppOptions; - constructor(init) { - this.initApp = init?.initApp; - this.#defaultAppOptions = init?.defaultAppOptions; - } - createApp = (options) => { - const app = new Hono( - options && this.#defaultAppOptions ? { ...this.#defaultAppOptions, ...options } : options ?? this.#defaultAppOptions - ); - if (this.initApp) { - this.initApp(app); - } - return app; - }; - createMiddleware = (middleware) => middleware; - createHandlers = (...handlers) => { - return handlers.filter((handler) => handler !== void 0); - }; -}; -var createFactory = (init) => new Factory(init); -var createMiddleware = (middleware) => middleware; -export { - Factory, - createFactory, - createMiddleware -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/helper/html/index.js b/PBandGraphScaffold/node_modules/hono/dist/helper/html/index.js deleted file mode 100644 index d5726ca..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/helper/html/index.js +++ /dev/null @@ -1,41 +0,0 @@ -// src/helper/html/index.ts -import { escapeToBuffer, raw, resolveCallbackSync, stringBufferToString } from "../../utils/html.js"; -var html = (strings, ...values) => { - const buffer = [""]; - for (let i = 0, len = strings.length - 1; i < len; i++) { - buffer[0] += strings[i]; - const children = Array.isArray(values[i]) ? values[i].flat(Infinity) : [values[i]]; - for (let i2 = 0, len2 = children.length; i2 < len2; i2++) { - const child = children[i2]; - if (typeof child === "string") { - escapeToBuffer(child, buffer); - } else if (typeof child === "number") { - ; - buffer[0] += child; - } else if (typeof child === "boolean" || child === null || child === void 0) { - continue; - } else if (typeof child === "object" && child.isEscaped) { - if (child.callbacks) { - buffer.unshift("", child); - } else { - const tmp = child.toString(); - if (tmp instanceof Promise) { - buffer.unshift("", tmp); - } else { - buffer[0] += tmp; - } - } - } else if (child instanceof Promise) { - buffer.unshift("", child); - } else { - escapeToBuffer(child.toString(), buffer); - } - } - } - buffer[0] += strings.at(-1); - return buffer.length === 1 ? "callbacks" in buffer ? raw(resolveCallbackSync(raw(buffer[0], buffer.callbacks))) : raw(buffer[0]) : stringBufferToString(buffer, buffer.callbacks); -}; -export { - html, - raw -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/helper/proxy/index.js b/PBandGraphScaffold/node_modules/hono/dist/helper/proxy/index.js deleted file mode 100644 index e666f7a..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/helper/proxy/index.js +++ /dev/null @@ -1,89 +0,0 @@ -// src/helper/proxy/index.ts -import { HTTPException } from "../../http-exception.js"; -var hopByHopHeaders = [ - "connection", - "keep-alive", - "proxy-authenticate", - "proxy-authorization", - "te", - "trailer", - "transfer-encoding", - "upgrade" -]; -var ALLOWED_TOKEN_PATTERN = /^[!#$%&'*+\-.0-9A-Z^_`a-z|~]+$/; -var buildRequestInitFromRequest = (request, strictConnectionProcessing) => { - if (!request) { - return {}; - } - const headers = new Headers(request.headers); - if (strictConnectionProcessing) { - const connectionValue = headers.get("connection"); - if (connectionValue) { - const headerNames = connectionValue.split(",").map((h) => h.trim()); - const invalidHeaders = headerNames.filter((h) => !ALLOWED_TOKEN_PATTERN.test(h)); - if (invalidHeaders.length > 0) { - throw new HTTPException(400, { - message: `Invalid Connection header value: ${invalidHeaders.join(", ")}` - }); - } - headerNames.forEach((headerName) => { - headers.delete(headerName); - }); - } - } - hopByHopHeaders.forEach((header) => { - headers.delete(header); - }); - return { - method: request.method, - body: request.body, - duplex: request.body ? "half" : void 0, - headers, - signal: request.signal - }; -}; -var preprocessRequestInit = (requestInit) => { - if (!requestInit.headers || Array.isArray(requestInit.headers) || requestInit.headers instanceof Headers) { - return requestInit; - } - const headers = new Headers(); - for (const [key, value] of Object.entries(requestInit.headers)) { - if (value == null) { - headers.delete(key); - } else { - headers.set(key, value); - } - } - requestInit.headers = headers; - return requestInit; -}; -var proxy = async (input, proxyInit) => { - const { - raw, - customFetch, - strictConnectionProcessing = false, - ...requestInit - } = proxyInit instanceof Request ? { raw: proxyInit } : proxyInit ?? {}; - const req = new Request(input, { - ...buildRequestInitFromRequest(raw, strictConnectionProcessing), - ...preprocessRequestInit(requestInit) - }); - req.headers.delete("accept-encoding"); - const res = await (customFetch || fetch)(req); - const resHeaders = new Headers(res.headers); - hopByHopHeaders.forEach((header) => { - resHeaders.delete(header); - }); - if (resHeaders.has("content-encoding")) { - resHeaders.delete("content-encoding"); - resHeaders.delete("content-length"); - } - return new Response(res.body, { - status: res.status, - statusText: res.statusText, - headers: resHeaders - }); -}; -export { - proxy -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/helper/route/index.js b/PBandGraphScaffold/node_modules/hono/dist/helper/route/index.js deleted file mode 100644 index 457d362..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/helper/route/index.js +++ /dev/null @@ -1,46 +0,0 @@ -// src/helper/route/index.ts -import { GET_MATCH_RESULT } from "../../request/constants.js"; -import { getPattern, splitRoutingPath } from "../../utils/url.js"; -var matchedRoutes = (c) => ( - // @ts-expect-error c.req[GET_MATCH_RESULT] is not typed - c.req[GET_MATCH_RESULT][0].map(([[, route]]) => route) -); -var routePath = (c, index) => matchedRoutes(c).at(index ?? c.req.routeIndex)?.path ?? ""; -var baseRoutePath = (c, index) => matchedRoutes(c).at(index ?? c.req.routeIndex)?.basePath ?? ""; -var basePathCacheMap = /* @__PURE__ */ new WeakMap(); -var basePath = (c, index) => { - index ??= c.req.routeIndex; - const cache = basePathCacheMap.get(c) || []; - if (typeof cache[index] === "string") { - return cache[index]; - } - let result; - const rp = baseRoutePath(c, index); - if (!/[:*]/.test(rp)) { - result = rp; - } else { - const paths = splitRoutingPath(rp); - const reqPath = c.req.path; - let basePathLength = 0; - for (let i = 0, len = paths.length; i < len; i++) { - const pattern = getPattern(paths[i], paths[i + 1]); - if (pattern) { - const re = pattern[2] === true || pattern === "*" ? /[^\/]+/ : pattern[2]; - basePathLength += reqPath.substring(basePathLength + 1).match(re)?.[0].length || 0; - } else { - basePathLength += paths[i].length; - } - basePathLength += 1; - } - result = reqPath.substring(0, basePathLength); - } - cache[index] = result; - basePathCacheMap.set(c, cache); - return result; -}; -export { - basePath, - baseRoutePath, - matchedRoutes, - routePath -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/helper/ssg/index.js b/PBandGraphScaffold/node_modules/hono/dist/helper/ssg/index.js deleted file mode 100644 index 68bcb8e..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/helper/ssg/index.js +++ /dev/null @@ -1,16 +0,0 @@ -// src/helper/ssg/index.ts -export * from "./ssg.js"; -import { - X_HONO_DISABLE_SSG_HEADER_KEY, - ssgParams, - isSSGContext, - disableSSG, - onlySSG -} from "./middleware.js"; -export { - X_HONO_DISABLE_SSG_HEADER_KEY, - disableSSG, - isSSGContext, - onlySSG, - ssgParams -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/helper/ssg/middleware.js b/PBandGraphScaffold/node_modules/hono/dist/helper/ssg/middleware.js deleted file mode 100644 index ddb59bd..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/helper/ssg/middleware.js +++ /dev/null @@ -1,45 +0,0 @@ -// src/helper/ssg/middleware.ts -import { isDynamicRoute } from "./utils.js"; -var SSG_CONTEXT = "HONO_SSG_CONTEXT"; -var X_HONO_DISABLE_SSG_HEADER_KEY = "x-hono-disable-ssg"; -var SSG_DISABLED_RESPONSE = (() => { - try { - return new Response("SSG is disabled", { - status: 404, - headers: { [X_HONO_DISABLE_SSG_HEADER_KEY]: "true" } - }); - } catch { - return null; - } -})(); -var ssgParams = (params) => async (c, next) => { - if (isDynamicRoute(c.req.path)) { - ; - c.req.raw.ssgParams = Array.isArray(params) ? params : await params(c); - return c.notFound(); - } - await next(); -}; -var isSSGContext = (c) => !!c.env?.[SSG_CONTEXT]; -var disableSSG = () => async function disableSSG2(c, next) { - if (isSSGContext(c)) { - c.header(X_HONO_DISABLE_SSG_HEADER_KEY, "true"); - return c.notFound(); - } - await next(); -}; -var onlySSG = () => async function onlySSG2(c, next) { - if (!isSSGContext(c)) { - return c.notFound(); - } - await next(); -}; -export { - SSG_CONTEXT, - SSG_DISABLED_RESPONSE, - X_HONO_DISABLE_SSG_HEADER_KEY, - disableSSG, - isSSGContext, - onlySSG, - ssgParams -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/helper/ssg/ssg.js b/PBandGraphScaffold/node_modules/hono/dist/helper/ssg/ssg.js deleted file mode 100644 index d51f07d..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/helper/ssg/ssg.js +++ /dev/null @@ -1,295 +0,0 @@ -// src/helper/ssg/ssg.ts -import { replaceUrlParam } from "../../client/utils.js"; -import { createPool } from "../../utils/concurrent.js"; -import { getExtension } from "../../utils/mime.js"; -import { SSG_CONTEXT, X_HONO_DISABLE_SSG_HEADER_KEY } from "./middleware.js"; -import { dirname, filterStaticGenerateRoutes, isDynamicRoute, joinPaths } from "./utils.js"; -var DEFAULT_CONCURRENCY = 2; -var DEFAULT_CONTENT_TYPE = "text/plain"; -var DEFAULT_OUTPUT_DIR = "./static"; -var generateFilePath = (routePath, outDir, mimeType, extensionMap) => { - const extension = determineExtension(mimeType, extensionMap); - if (routePath.endsWith(`.${extension}`)) { - return joinPaths(outDir, routePath); - } - if (routePath === "/") { - return joinPaths(outDir, `index.${extension}`); - } - if (routePath.endsWith("/")) { - return joinPaths(outDir, routePath, `index.${extension}`); - } - return joinPaths(outDir, `${routePath}.${extension}`); -}; -var parseResponseContent = async (response) => { - const contentType = response.headers.get("Content-Type"); - try { - if (contentType?.includes("text") || contentType?.includes("json")) { - return await response.text(); - } else { - return await response.arrayBuffer(); - } - } catch (error) { - throw new Error( - `Error processing response: ${error instanceof Error ? error.message : "Unknown error"}` - ); - } -}; -var defaultExtensionMap = { - "text/html": "html", - "text/xml": "xml", - "application/xml": "xml", - "application/yaml": "yaml" -}; -var determineExtension = (mimeType, userExtensionMap) => { - const extensionMap = userExtensionMap || defaultExtensionMap; - if (mimeType in extensionMap) { - return extensionMap[mimeType]; - } - return getExtension(mimeType) || "html"; -}; -var combineBeforeRequestHooks = (hooks) => { - if (!Array.isArray(hooks)) { - return hooks; - } - return async (req) => { - let currentReq = req; - for (const hook of hooks) { - const result = await hook(currentReq); - if (result === false) { - return false; - } - if (result instanceof Request) { - currentReq = result; - } - } - return currentReq; - }; -}; -var combineAfterResponseHooks = (hooks) => { - if (!Array.isArray(hooks)) { - return hooks; - } - return async (res) => { - let currentRes = res; - for (const hook of hooks) { - const result = await hook(currentRes); - if (result === false) { - return false; - } - if (result instanceof Response) { - currentRes = result; - } - } - return currentRes; - }; -}; -var combineAfterGenerateHooks = (hooks, fsModule, options) => { - if (!Array.isArray(hooks)) { - return hooks; - } - return async (result) => { - for (const hook of hooks) { - await hook(result, fsModule, options); - } - }; -}; -var fetchRoutesContent = function* (app, beforeRequestHook, afterResponseHook, concurrency) { - const baseURL = "http://localhost"; - const pool = createPool({ concurrency }); - for (const route of filterStaticGenerateRoutes(app)) { - const thisRouteBaseURL = new URL(route.path, baseURL).toString(); - let forGetInfoURLRequest = new Request(thisRouteBaseURL); - yield new Promise(async (resolveGetInfo, rejectGetInfo) => { - try { - if (beforeRequestHook) { - const maybeRequest = await beforeRequestHook(forGetInfoURLRequest); - if (!maybeRequest) { - resolveGetInfo(void 0); - return; - } - forGetInfoURLRequest = maybeRequest; - } - await pool.run(() => app.fetch(forGetInfoURLRequest)); - if (!forGetInfoURLRequest.ssgParams) { - if (isDynamicRoute(route.path)) { - resolveGetInfo(void 0); - return; - } - forGetInfoURLRequest.ssgParams = [{}]; - } - const requestInit = { - method: forGetInfoURLRequest.method, - headers: forGetInfoURLRequest.headers - }; - resolveGetInfo( - (function* () { - for (const param of forGetInfoURLRequest.ssgParams) { - yield new Promise(async (resolveReq, rejectReq) => { - try { - const replacedUrlParam = replaceUrlParam(route.path, param); - let response = await pool.run( - () => app.request(replacedUrlParam, requestInit, { - [SSG_CONTEXT]: true - }) - ); - if (response.headers.get(X_HONO_DISABLE_SSG_HEADER_KEY)) { - resolveReq(void 0); - return; - } - if (afterResponseHook) { - const maybeResponse = await afterResponseHook(response); - if (!maybeResponse) { - resolveReq(void 0); - return; - } - response = maybeResponse; - } - const mimeType = response.headers.get("Content-Type")?.split(";")[0] || DEFAULT_CONTENT_TYPE; - const content = await parseResponseContent(response); - resolveReq({ - routePath: replacedUrlParam, - mimeType, - content - }); - } catch (error) { - rejectReq(error); - } - }); - } - })() - ); - } catch (error) { - rejectGetInfo(error); - } - }); - } -}; -var createdDirs = /* @__PURE__ */ new Set(); -var saveContentToFile = async (data, fsModule, outDir, extensionMap) => { - const awaitedData = await data; - if (!awaitedData) { - return; - } - const { routePath, content, mimeType } = awaitedData; - const filePath = generateFilePath(routePath, outDir, mimeType, extensionMap); - const dirPath = dirname(filePath); - if (!createdDirs.has(dirPath)) { - await fsModule.mkdir(dirPath, { recursive: true }); - createdDirs.add(dirPath); - } - if (typeof content === "string") { - await fsModule.writeFile(filePath, content); - } else if (content instanceof ArrayBuffer) { - await fsModule.writeFile(filePath, new Uint8Array(content)); - } - return filePath; -}; -var defaultPlugin = { - afterResponseHook: (res) => { - if (res.status !== 200) { - return false; - } - return res; - } -}; -var toSSG = async (app, fs, options) => { - let result; - const getInfoPromises = []; - const savePromises = []; - const plugins = options?.plugins || [defaultPlugin]; - const beforeRequestHooks = []; - const afterResponseHooks = []; - const afterGenerateHooks = []; - if (options?.beforeRequestHook) { - beforeRequestHooks.push( - ...Array.isArray(options.beforeRequestHook) ? options.beforeRequestHook : [options.beforeRequestHook] - ); - } - if (options?.afterResponseHook) { - afterResponseHooks.push( - ...Array.isArray(options.afterResponseHook) ? options.afterResponseHook : [options.afterResponseHook] - ); - } - if (options?.afterGenerateHook) { - afterGenerateHooks.push( - ...Array.isArray(options.afterGenerateHook) ? options.afterGenerateHook : [options.afterGenerateHook] - ); - } - for (const plugin of plugins) { - if (plugin.beforeRequestHook) { - beforeRequestHooks.push( - ...Array.isArray(plugin.beforeRequestHook) ? plugin.beforeRequestHook : [plugin.beforeRequestHook] - ); - } - if (plugin.afterResponseHook) { - afterResponseHooks.push( - ...Array.isArray(plugin.afterResponseHook) ? plugin.afterResponseHook : [plugin.afterResponseHook] - ); - } - if (plugin.afterGenerateHook) { - afterGenerateHooks.push( - ...Array.isArray(plugin.afterGenerateHook) ? plugin.afterGenerateHook : [plugin.afterGenerateHook] - ); - } - } - try { - const outputDir = options?.dir ?? DEFAULT_OUTPUT_DIR; - const concurrency = options?.concurrency ?? DEFAULT_CONCURRENCY; - const combinedBeforeRequestHook = combineBeforeRequestHooks( - beforeRequestHooks.length > 0 ? beforeRequestHooks : [(req) => req] - ); - const combinedAfterResponseHook = combineAfterResponseHooks( - afterResponseHooks.length > 0 ? afterResponseHooks : [(req) => req] - ); - const getInfoGen = fetchRoutesContent( - app, - combinedBeforeRequestHook, - combinedAfterResponseHook, - concurrency - ); - for (const getInfo of getInfoGen) { - getInfoPromises.push( - getInfo.then((getContentGen) => { - if (!getContentGen) { - return; - } - for (const content of getContentGen) { - savePromises.push( - saveContentToFile(content, fs, outputDir, options?.extensionMap).catch((e) => e) - ); - } - }) - ); - } - await Promise.all(getInfoPromises); - const files = []; - for (const savePromise of savePromises) { - const fileOrError = await savePromise; - if (typeof fileOrError === "string") { - files.push(fileOrError); - } else if (fileOrError) { - throw fileOrError; - } - } - result = { success: true, files }; - } catch (error) { - const errorObj = error instanceof Error ? error : new Error(String(error)); - result = { success: false, files: [], error: errorObj }; - } - if (afterGenerateHooks.length > 0) { - const combinedAfterGenerateHooks = combineAfterGenerateHooks(afterGenerateHooks, fs, options); - await combinedAfterGenerateHooks(result, fs, options); - } - return result; -}; -export { - DEFAULT_OUTPUT_DIR, - combineAfterGenerateHooks, - combineAfterResponseHooks, - combineBeforeRequestHooks, - defaultExtensionMap, - defaultPlugin, - fetchRoutesContent, - saveContentToFile, - toSSG -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/helper/ssg/utils.js b/PBandGraphScaffold/node_modules/hono/dist/helper/ssg/utils.js deleted file mode 100644 index 793b5dc..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/helper/ssg/utils.js +++ /dev/null @@ -1,59 +0,0 @@ -// src/helper/ssg/utils.ts -import { METHOD_NAME_ALL } from "../../router.js"; -import { findTargetHandler, isMiddleware } from "../../utils/handler.js"; -var dirname = (path) => { - const separatedPath = path.split(/[\/\\]/); - return separatedPath.slice(0, -1).join("/"); -}; -var normalizePath = (path) => { - return path.replace(/(\\)/g, "/").replace(/\/$/g, ""); -}; -var handleParent = (resultPaths, beforeParentFlag) => { - if (resultPaths.length === 0 || beforeParentFlag) { - resultPaths.push(".."); - } else { - resultPaths.pop(); - } -}; -var handleNonDot = (path, resultPaths) => { - path = path.replace(/^\.(?!.)/, ""); - if (path !== "") { - resultPaths.push(path); - } -}; -var handleSegments = (paths, resultPaths) => { - let beforeParentFlag = false; - for (const path of paths) { - if (path === "..") { - handleParent(resultPaths, beforeParentFlag); - beforeParentFlag = true; - } else { - handleNonDot(path, resultPaths); - beforeParentFlag = false; - } - } -}; -var joinPaths = (...paths) => { - paths = paths.map(normalizePath); - const resultPaths = []; - handleSegments(paths.join("/").split("/"), resultPaths); - return (paths[0][0] === "/" ? "/" : "") + resultPaths.join("/"); -}; -var filterStaticGenerateRoutes = (hono) => { - return hono.routes.reduce((acc, { method, handler, path }) => { - const targetHandler = findTargetHandler(handler); - if (["GET", METHOD_NAME_ALL].includes(method) && !isMiddleware(targetHandler)) { - acc.push({ path }); - } - return acc; - }, []); -}; -var isDynamicRoute = (path) => { - return path.split("/").some((segment) => segment.startsWith(":") || segment.includes("*")); -}; -export { - dirname, - filterStaticGenerateRoutes, - isDynamicRoute, - joinPaths -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/helper/streaming/index.js b/PBandGraphScaffold/node_modules/hono/dist/helper/streaming/index.js deleted file mode 100644 index c59a2d0..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/helper/streaming/index.js +++ /dev/null @@ -1,10 +0,0 @@ -// src/helper/streaming/index.ts -import { stream } from "./stream.js"; -import { streamSSE, SSEStreamingApi } from "./sse.js"; -import { streamText } from "./text.js"; -export { - SSEStreamingApi, - stream, - streamSSE, - streamText -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/helper/streaming/sse.js b/PBandGraphScaffold/node_modules/hono/dist/helper/streaming/sse.js deleted file mode 100644 index cc8b51d..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/helper/streaming/sse.js +++ /dev/null @@ -1,62 +0,0 @@ -// src/helper/streaming/sse.ts -import { HtmlEscapedCallbackPhase, resolveCallback } from "../../utils/html.js"; -import { StreamingApi } from "../../utils/stream.js"; -import { isOldBunVersion } from "./utils.js"; -var SSEStreamingApi = class extends StreamingApi { - constructor(writable, readable) { - super(writable, readable); - } - async writeSSE(message) { - const data = await resolveCallback(message.data, HtmlEscapedCallbackPhase.Stringify, false, {}); - const dataLines = data.split("\n").map((line) => { - return `data: ${line}`; - }).join("\n"); - const sseData = [ - message.event && `event: ${message.event}`, - dataLines, - message.id && `id: ${message.id}`, - message.retry && `retry: ${message.retry}` - ].filter(Boolean).join("\n") + "\n\n"; - await this.write(sseData); - } -}; -var run = async (stream, cb, onError) => { - try { - await cb(stream); - } catch (e) { - if (e instanceof Error && onError) { - await onError(e, stream); - await stream.writeSSE({ - event: "error", - data: e.message - }); - } else { - console.error(e); - } - } finally { - stream.close(); - } -}; -var contextStash = /* @__PURE__ */ new WeakMap(); -var streamSSE = (c, cb, onError) => { - const { readable, writable } = new TransformStream(); - const stream = new SSEStreamingApi(writable, readable); - if (isOldBunVersion()) { - c.req.raw.signal.addEventListener("abort", () => { - if (!stream.closed) { - stream.abort(); - } - }); - } - contextStash.set(stream.responseReadable, c); - c.header("Transfer-Encoding", "chunked"); - c.header("Content-Type", "text/event-stream"); - c.header("Cache-Control", "no-cache"); - c.header("Connection", "keep-alive"); - run(stream, cb, onError); - return c.newResponse(stream.responseReadable); -}; -export { - SSEStreamingApi, - streamSSE -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/helper/streaming/stream.js b/PBandGraphScaffold/node_modules/hono/dist/helper/streaming/stream.js deleted file mode 100644 index 8a3feb4..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/helper/streaming/stream.js +++ /dev/null @@ -1,34 +0,0 @@ -// src/helper/streaming/stream.ts -import { StreamingApi } from "../../utils/stream.js"; -import { isOldBunVersion } from "./utils.js"; -var contextStash = /* @__PURE__ */ new WeakMap(); -var stream = (c, cb, onError) => { - const { readable, writable } = new TransformStream(); - const stream2 = new StreamingApi(writable, readable); - if (isOldBunVersion()) { - c.req.raw.signal.addEventListener("abort", () => { - if (!stream2.closed) { - stream2.abort(); - } - }); - } - contextStash.set(stream2.responseReadable, c); - (async () => { - try { - await cb(stream2); - } catch (e) { - if (e === void 0) { - } else if (e instanceof Error && onError) { - await onError(e, stream2); - } else { - console.error(e); - } - } finally { - stream2.close(); - } - })(); - return c.newResponse(stream2.responseReadable); -}; -export { - stream -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/helper/streaming/text.js b/PBandGraphScaffold/node_modules/hono/dist/helper/streaming/text.js deleted file mode 100644 index 9e93cab..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/helper/streaming/text.js +++ /dev/null @@ -1,12 +0,0 @@ -// src/helper/streaming/text.ts -import { TEXT_PLAIN } from "../../context.js"; -import { stream } from "./index.js"; -var streamText = (c, cb, onError) => { - c.header("Content-Type", TEXT_PLAIN); - c.header("X-Content-Type-Options", "nosniff"); - c.header("Transfer-Encoding", "chunked"); - return stream(c, cb, onError); -}; -export { - streamText -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/helper/streaming/utils.js b/PBandGraphScaffold/node_modules/hono/dist/helper/streaming/utils.js deleted file mode 100644 index 671f441..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/helper/streaming/utils.js +++ /dev/null @@ -1,13 +0,0 @@ -// src/helper/streaming/utils.ts -var isOldBunVersion = () => { - const version = typeof Bun !== "undefined" ? Bun.version : void 0; - if (version === void 0) { - return false; - } - const result = version.startsWith("1.1") || version.startsWith("1.0") || version.startsWith("0."); - isOldBunVersion = () => result; - return result; -}; -export { - isOldBunVersion -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/helper/testing/index.js b/PBandGraphScaffold/node_modules/hono/dist/helper/testing/index.js deleted file mode 100644 index 7ba1034..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/helper/testing/index.js +++ /dev/null @@ -1,11 +0,0 @@ -// src/helper/testing/index.ts -import { hc } from "../../client/index.js"; -var testClient = (app, Env, executionCtx, options) => { - const customFetch = (input, init) => { - return app.request(input, init, Env, executionCtx); - }; - return hc("http://localhost", { ...options, fetch: customFetch }); -}; -export { - testClient -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/helper/websocket/index.js b/PBandGraphScaffold/node_modules/hono/dist/helper/websocket/index.js deleted file mode 100644 index 1225415..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/helper/websocket/index.js +++ /dev/null @@ -1,57 +0,0 @@ -// src/helper/websocket/index.ts -var WSContext = class { - #init; - constructor(init) { - this.#init = init; - this.raw = init.raw; - this.url = init.url ? new URL(init.url) : null; - this.protocol = init.protocol ?? null; - } - send(source, options) { - this.#init.send(source, options ?? {}); - } - raw; - binaryType = "arraybuffer"; - get readyState() { - return this.#init.readyState; - } - url; - protocol; - close(code, reason) { - this.#init.close(code, reason); - } -}; -var createWSMessageEvent = (source) => { - return new MessageEvent("message", { - data: source - }); -}; -var defineWebSocketHelper = (handler) => { - return ((...args) => { - if (typeof args[0] === "function") { - const [createEvents, options] = args; - return async function upgradeWebSocket(c, next) { - const events = await createEvents(c); - const result = await handler(c, events, options); - if (result) { - return result; - } - await next(); - }; - } else { - const [c, events, options] = args; - return (async () => { - const upgraded = await handler(c, events, options); - if (!upgraded) { - throw new Error("Failed to upgrade WebSocket"); - } - return upgraded; - })(); - } - }); -}; -export { - WSContext, - createWSMessageEvent, - defineWebSocketHelper -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/hono-base.js b/PBandGraphScaffold/node_modules/hono/dist/hono-base.js deleted file mode 100644 index 61003a8..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/hono-base.js +++ /dev/null @@ -1,378 +0,0 @@ -// src/hono-base.ts -import { compose } from "./compose.js"; -import { Context } from "./context.js"; -import { METHODS, METHOD_NAME_ALL, METHOD_NAME_ALL_LOWERCASE } from "./router.js"; -import { COMPOSED_HANDLER } from "./utils/constants.js"; -import { getPath, getPathNoStrict, mergePath } from "./utils/url.js"; -var notFoundHandler = (c) => { - return c.text("404 Not Found", 404); -}; -var errorHandler = (err, c) => { - if ("getResponse" in err) { - const res = err.getResponse(); - return c.newResponse(res.body, res); - } - console.error(err); - return c.text("Internal Server Error", 500); -}; -var Hono = class _Hono { - get; - post; - put; - delete; - options; - patch; - all; - on; - use; - /* - This class is like an abstract class and does not have a router. - To use it, inherit the class and implement router in the constructor. - */ - router; - getPath; - // Cannot use `#` because it requires visibility at JavaScript runtime. - _basePath = "/"; - #path = "/"; - routes = []; - constructor(options = {}) { - const allMethods = [...METHODS, METHOD_NAME_ALL_LOWERCASE]; - allMethods.forEach((method) => { - this[method] = (args1, ...args) => { - if (typeof args1 === "string") { - this.#path = args1; - } else { - this.#addRoute(method, this.#path, args1); - } - args.forEach((handler) => { - this.#addRoute(method, this.#path, handler); - }); - return this; - }; - }); - this.on = (method, path, ...handlers) => { - for (const p of [path].flat()) { - this.#path = p; - for (const m of [method].flat()) { - handlers.map((handler) => { - this.#addRoute(m.toUpperCase(), this.#path, handler); - }); - } - } - return this; - }; - this.use = (arg1, ...handlers) => { - if (typeof arg1 === "string") { - this.#path = arg1; - } else { - this.#path = "*"; - handlers.unshift(arg1); - } - handlers.forEach((handler) => { - this.#addRoute(METHOD_NAME_ALL, this.#path, handler); - }); - return this; - }; - const { strict, ...optionsWithoutStrict } = options; - Object.assign(this, optionsWithoutStrict); - this.getPath = strict ?? true ? options.getPath ?? getPath : getPathNoStrict; - } - #clone() { - const clone = new _Hono({ - router: this.router, - getPath: this.getPath - }); - clone.errorHandler = this.errorHandler; - clone.#notFoundHandler = this.#notFoundHandler; - clone.routes = this.routes; - return clone; - } - #notFoundHandler = notFoundHandler; - // Cannot use `#` because it requires visibility at JavaScript runtime. - errorHandler = errorHandler; - /** - * `.route()` allows grouping other Hono instance in routes. - * - * @see {@link https://hono.dev/docs/api/routing#grouping} - * - * @param {string} path - base Path - * @param {Hono} app - other Hono instance - * @returns {Hono} routed Hono instance - * - * @example - * ```ts - * const app = new Hono() - * const app2 = new Hono() - * - * app2.get("/user", (c) => c.text("user")) - * app.route("/api", app2) // GET /api/user - * ``` - */ - route(path, app) { - const subApp = this.basePath(path); - app.routes.map((r) => { - let handler; - if (app.errorHandler === errorHandler) { - handler = r.handler; - } else { - handler = async (c, next) => (await compose([], app.errorHandler)(c, () => r.handler(c, next))).res; - handler[COMPOSED_HANDLER] = r.handler; - } - subApp.#addRoute(r.method, r.path, handler); - }); - return this; - } - /** - * `.basePath()` allows base paths to be specified. - * - * @see {@link https://hono.dev/docs/api/routing#base-path} - * - * @param {string} path - base Path - * @returns {Hono} changed Hono instance - * - * @example - * ```ts - * const api = new Hono().basePath('/api') - * ``` - */ - basePath(path) { - const subApp = this.#clone(); - subApp._basePath = mergePath(this._basePath, path); - return subApp; - } - /** - * `.onError()` handles an error and returns a customized Response. - * - * @see {@link https://hono.dev/docs/api/hono#error-handling} - * - * @param {ErrorHandler} handler - request Handler for error - * @returns {Hono} changed Hono instance - * - * @example - * ```ts - * app.onError((err, c) => { - * console.error(`${err}`) - * return c.text('Custom Error Message', 500) - * }) - * ``` - */ - onError = (handler) => { - this.errorHandler = handler; - return this; - }; - /** - * `.notFound()` allows you to customize a Not Found Response. - * - * @see {@link https://hono.dev/docs/api/hono#not-found} - * - * @param {NotFoundHandler} handler - request handler for not-found - * @returns {Hono} changed Hono instance - * - * @example - * ```ts - * app.notFound((c) => { - * return c.text('Custom 404 Message', 404) - * }) - * ``` - */ - notFound = (handler) => { - this.#notFoundHandler = handler; - return this; - }; - /** - * `.mount()` allows you to mount applications built with other frameworks into your Hono application. - * - * @see {@link https://hono.dev/docs/api/hono#mount} - * - * @param {string} path - base Path - * @param {Function} applicationHandler - other Request Handler - * @param {MountOptions} [options] - options of `.mount()` - * @returns {Hono} mounted Hono instance - * - * @example - * ```ts - * import { Router as IttyRouter } from 'itty-router' - * import { Hono } from 'hono' - * // Create itty-router application - * const ittyRouter = IttyRouter() - * // GET /itty-router/hello - * ittyRouter.get('/hello', () => new Response('Hello from itty-router')) - * - * const app = new Hono() - * app.mount('/itty-router', ittyRouter.handle) - * ``` - * - * @example - * ```ts - * const app = new Hono() - * // Send the request to another application without modification. - * app.mount('/app', anotherApp, { - * replaceRequest: (req) => req, - * }) - * ``` - */ - mount(path, applicationHandler, options) { - let replaceRequest; - let optionHandler; - if (options) { - if (typeof options === "function") { - optionHandler = options; - } else { - optionHandler = options.optionHandler; - if (options.replaceRequest === false) { - replaceRequest = (request) => request; - } else { - replaceRequest = options.replaceRequest; - } - } - } - const getOptions = optionHandler ? (c) => { - const options2 = optionHandler(c); - return Array.isArray(options2) ? options2 : [options2]; - } : (c) => { - let executionContext = void 0; - try { - executionContext = c.executionCtx; - } catch { - } - return [c.env, executionContext]; - }; - replaceRequest ||= (() => { - const mergedPath = mergePath(this._basePath, path); - const pathPrefixLength = mergedPath === "/" ? 0 : mergedPath.length; - return (request) => { - const url = new URL(request.url); - url.pathname = url.pathname.slice(pathPrefixLength) || "/"; - return new Request(url, request); - }; - })(); - const handler = async (c, next) => { - const res = await applicationHandler(replaceRequest(c.req.raw), ...getOptions(c)); - if (res) { - return res; - } - await next(); - }; - this.#addRoute(METHOD_NAME_ALL, mergePath(path, "*"), handler); - return this; - } - #addRoute(method, path, handler) { - method = method.toUpperCase(); - path = mergePath(this._basePath, path); - const r = { basePath: this._basePath, path, method, handler }; - this.router.add(method, path, [handler, r]); - this.routes.push(r); - } - #handleError(err, c) { - if (err instanceof Error) { - return this.errorHandler(err, c); - } - throw err; - } - #dispatch(request, executionCtx, env, method) { - if (method === "HEAD") { - return (async () => new Response(null, await this.#dispatch(request, executionCtx, env, "GET")))(); - } - const path = this.getPath(request, { env }); - const matchResult = this.router.match(method, path); - const c = new Context(request, { - path, - matchResult, - env, - executionCtx, - notFoundHandler: this.#notFoundHandler - }); - if (matchResult[0].length === 1) { - let res; - try { - res = matchResult[0][0][0][0](c, async () => { - c.res = await this.#notFoundHandler(c); - }); - } catch (err) { - return this.#handleError(err, c); - } - return res instanceof Promise ? res.then( - (resolved) => resolved || (c.finalized ? c.res : this.#notFoundHandler(c)) - ).catch((err) => this.#handleError(err, c)) : res ?? this.#notFoundHandler(c); - } - const composed = compose(matchResult[0], this.errorHandler, this.#notFoundHandler); - return (async () => { - try { - const context = await composed(c); - if (!context.finalized) { - throw new Error( - "Context is not finalized. Did you forget to return a Response object or `await next()`?" - ); - } - return context.res; - } catch (err) { - return this.#handleError(err, c); - } - })(); - } - /** - * `.fetch()` will be entry point of your app. - * - * @see {@link https://hono.dev/docs/api/hono#fetch} - * - * @param {Request} request - request Object of request - * @param {Env} Env - env Object - * @param {ExecutionContext} - context of execution - * @returns {Response | Promise} response of request - * - */ - fetch = (request, ...rest) => { - return this.#dispatch(request, rest[1], rest[0], request.method); - }; - /** - * `.request()` is a useful method for testing. - * You can pass a URL or pathname to send a GET request. - * app will return a Response object. - * ```ts - * test('GET /hello is ok', async () => { - * const res = await app.request('/hello') - * expect(res.status).toBe(200) - * }) - * ``` - * @see https://hono.dev/docs/api/hono#request - */ - request = (input, requestInit, Env, executionCtx) => { - if (input instanceof Request) { - return this.fetch(requestInit ? new Request(input, requestInit) : input, Env, executionCtx); - } - input = input.toString(); - return this.fetch( - new Request( - /^https?:\/\//.test(input) ? input : `http://localhost${mergePath("/", input)}`, - requestInit - ), - Env, - executionCtx - ); - }; - /** - * `.fire()` automatically adds a global fetch event listener. - * This can be useful for environments that adhere to the Service Worker API, such as non-ES module Cloudflare Workers. - * @deprecated - * Use `fire` from `hono/service-worker` instead. - * ```ts - * import { Hono } from 'hono' - * import { fire } from 'hono/service-worker' - * - * const app = new Hono() - * // ... - * fire(app) - * ``` - * @see https://hono.dev/docs/api/hono#fire - * @see https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API - * @see https://developers.cloudflare.com/workers/reference/migrate-to-module-workers/ - */ - fire = () => { - addEventListener("fetch", (event) => { - event.respondWith(this.#dispatch(event.request, event, void 0, event.request.method)); - }); - }; -}; -export { - Hono as HonoBase -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/hono.js b/PBandGraphScaffold/node_modules/hono/dist/hono.js deleted file mode 100644 index ff63386..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/hono.js +++ /dev/null @@ -1,21 +0,0 @@ -// src/hono.ts -import { HonoBase } from "./hono-base.js"; -import { RegExpRouter } from "./router/reg-exp-router/index.js"; -import { SmartRouter } from "./router/smart-router/index.js"; -import { TrieRouter } from "./router/trie-router/index.js"; -var Hono = class extends HonoBase { - /** - * Creates an instance of the Hono class. - * - * @param options - Optional configuration options for the Hono instance. - */ - constructor(options = {}) { - super(options); - this.router = options.router ?? new SmartRouter({ - routers: [new RegExpRouter(), new TrieRouter()] - }); - } -}; -export { - Hono -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/http-exception.js b/PBandGraphScaffold/node_modules/hono/dist/http-exception.js deleted file mode 100644 index 070a51f..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/http-exception.js +++ /dev/null @@ -1,35 +0,0 @@ -// src/http-exception.ts -var HTTPException = class extends Error { - res; - status; - /** - * Creates an instance of `HTTPException`. - * @param status - HTTP status code for the exception. Defaults to 500. - * @param options - Additional options for the exception. - */ - constructor(status = 500, options) { - super(options?.message, { cause: options?.cause }); - this.res = options?.res; - this.status = status; - } - /** - * Returns the response object associated with the exception. - * If a response object is not provided, a new response is created with the error message and status code. - * @returns The response object. - */ - getResponse() { - if (this.res) { - const newResponse = new Response(this.res.body, { - status: this.status, - headers: this.res.headers - }); - return newResponse; - } - return new Response(this.message, { - status: this.status - }); - } -}; -export { - HTTPException -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/index.js b/PBandGraphScaffold/node_modules/hono/dist/index.js deleted file mode 100644 index 7f45bb9..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/index.js +++ /dev/null @@ -1,5 +0,0 @@ -// src/index.ts -import { Hono } from "./hono.js"; -export { - Hono -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/jsx/base.js b/PBandGraphScaffold/node_modules/hono/dist/jsx/base.js deleted file mode 100644 index 105e25c..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/jsx/base.js +++ /dev/null @@ -1,331 +0,0 @@ -// src/jsx/base.ts -import { raw } from "../helper/html/index.js"; -import { escapeToBuffer, resolveCallbackSync, stringBufferToString } from "../utils/html.js"; -import { DOM_RENDERER, DOM_MEMO } from "./constants.js"; -import { createContext, globalContexts, useContext } from "./context.js"; -import { domRenderers } from "./intrinsic-element/common.js"; -import * as intrinsicElementTags from "./intrinsic-element/components.js"; -import { normalizeIntrinsicElementKey, styleObjectForEach } from "./utils.js"; -var nameSpaceContext = void 0; -var getNameSpaceContext = () => nameSpaceContext; -var toSVGAttributeName = (key) => /[A-Z]/.test(key) && // Presentation attributes are findable in style object. "clip-path", "font-size", "stroke-width", etc. -// Or other un-deprecated kebab-case attributes. "overline-position", "paint-order", "strikethrough-position", etc. -key.match( - /^(?:al|basel|clip(?:Path|Rule)$|co|do|fill|fl|fo|gl|let|lig|i|marker[EMS]|o|pai|pointe|sh|st[or]|text[^L]|tr|u|ve|w)/ -) ? key.replace(/([A-Z])/g, "-$1").toLowerCase() : key; -var emptyTags = [ - "area", - "base", - "br", - "col", - "embed", - "hr", - "img", - "input", - "keygen", - "link", - "meta", - "param", - "source", - "track", - "wbr" -]; -var booleanAttributes = [ - "allowfullscreen", - "async", - "autofocus", - "autoplay", - "checked", - "controls", - "default", - "defer", - "disabled", - "download", - "formnovalidate", - "hidden", - "inert", - "ismap", - "itemscope", - "loop", - "multiple", - "muted", - "nomodule", - "novalidate", - "open", - "playsinline", - "readonly", - "required", - "reversed", - "selected" -]; -var childrenToStringToBuffer = (children, buffer) => { - for (let i = 0, len = children.length; i < len; i++) { - const child = children[i]; - if (typeof child === "string") { - escapeToBuffer(child, buffer); - } else if (typeof child === "boolean" || child === null || child === void 0) { - continue; - } else if (child instanceof JSXNode) { - child.toStringToBuffer(buffer); - } else if (typeof child === "number" || child.isEscaped) { - ; - buffer[0] += child; - } else if (child instanceof Promise) { - buffer.unshift("", child); - } else { - childrenToStringToBuffer(child, buffer); - } - } -}; -var JSXNode = class { - tag; - props; - key; - children; - isEscaped = true; - localContexts; - constructor(tag, props, children) { - this.tag = tag; - this.props = props; - this.children = children; - } - get type() { - return this.tag; - } - // Added for compatibility with libraries that rely on React's internal structure - // eslint-disable-next-line @typescript-eslint/no-explicit-any - get ref() { - return this.props.ref || null; - } - toString() { - const buffer = [""]; - this.localContexts?.forEach(([context, value]) => { - context.values.push(value); - }); - try { - this.toStringToBuffer(buffer); - } finally { - this.localContexts?.forEach(([context]) => { - context.values.pop(); - }); - } - return buffer.length === 1 ? "callbacks" in buffer ? resolveCallbackSync(raw(buffer[0], buffer.callbacks)).toString() : buffer[0] : stringBufferToString(buffer, buffer.callbacks); - } - toStringToBuffer(buffer) { - const tag = this.tag; - const props = this.props; - let { children } = this; - buffer[0] += `<${tag}`; - const normalizeKey = nameSpaceContext && useContext(nameSpaceContext) === "svg" ? (key) => toSVGAttributeName(normalizeIntrinsicElementKey(key)) : (key) => normalizeIntrinsicElementKey(key); - for (let [key, v] of Object.entries(props)) { - key = normalizeKey(key); - if (key === "children") { - } else if (key === "style" && typeof v === "object") { - let styleStr = ""; - styleObjectForEach(v, (property, value) => { - if (value != null) { - styleStr += `${styleStr ? ";" : ""}${property}:${value}`; - } - }); - buffer[0] += ' style="'; - escapeToBuffer(styleStr, buffer); - buffer[0] += '"'; - } else if (typeof v === "string") { - buffer[0] += ` ${key}="`; - escapeToBuffer(v, buffer); - buffer[0] += '"'; - } else if (v === null || v === void 0) { - } else if (typeof v === "number" || v.isEscaped) { - buffer[0] += ` ${key}="${v}"`; - } else if (typeof v === "boolean" && booleanAttributes.includes(key)) { - if (v) { - buffer[0] += ` ${key}=""`; - } - } else if (key === "dangerouslySetInnerHTML") { - if (children.length > 0) { - throw new Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`."); - } - children = [raw(v.__html)]; - } else if (v instanceof Promise) { - buffer[0] += ` ${key}="`; - buffer.unshift('"', v); - } else if (typeof v === "function") { - if (!key.startsWith("on") && key !== "ref") { - throw new Error(`Invalid prop '${key}' of type 'function' supplied to '${tag}'.`); - } - } else { - buffer[0] += ` ${key}="`; - escapeToBuffer(v.toString(), buffer); - buffer[0] += '"'; - } - } - if (emptyTags.includes(tag) && children.length === 0) { - buffer[0] += "/>"; - return; - } - buffer[0] += ">"; - childrenToStringToBuffer(children, buffer); - buffer[0] += ``; - } -}; -var JSXFunctionNode = class extends JSXNode { - toStringToBuffer(buffer) { - const { children } = this; - const props = { ...this.props }; - if (children.length) { - props.children = children.length === 1 ? children[0] : children; - } - const res = this.tag.call(null, props); - if (typeof res === "boolean" || res == null) { - return; - } else if (res instanceof Promise) { - if (globalContexts.length === 0) { - buffer.unshift("", res); - } else { - const currentContexts = globalContexts.map((c) => [c, c.values.at(-1)]); - buffer.unshift( - "", - res.then((childRes) => { - if (childRes instanceof JSXNode) { - childRes.localContexts = currentContexts; - } - return childRes; - }) - ); - } - } else if (res instanceof JSXNode) { - res.toStringToBuffer(buffer); - } else if (typeof res === "number" || res.isEscaped) { - buffer[0] += res; - if (res.callbacks) { - buffer.callbacks ||= []; - buffer.callbacks.push(...res.callbacks); - } - } else { - escapeToBuffer(res, buffer); - } - } -}; -var JSXFragmentNode = class extends JSXNode { - toStringToBuffer(buffer) { - childrenToStringToBuffer(this.children, buffer); - } -}; -var jsx = (tag, props, ...children) => { - props ??= {}; - if (children.length) { - props.children = children.length === 1 ? children[0] : children; - } - const key = props.key; - delete props["key"]; - const node = jsxFn(tag, props, children); - node.key = key; - return node; -}; -var initDomRenderer = false; -var jsxFn = (tag, props, children) => { - if (!initDomRenderer) { - for (const k in domRenderers) { - ; - intrinsicElementTags[k][DOM_RENDERER] = domRenderers[k]; - } - initDomRenderer = true; - } - if (typeof tag === "function") { - return new JSXFunctionNode(tag, props, children); - } else if (intrinsicElementTags[tag]) { - return new JSXFunctionNode( - intrinsicElementTags[tag], - props, - children - ); - } else if (tag === "svg" || tag === "head") { - nameSpaceContext ||= createContext(""); - return new JSXNode(tag, props, [ - new JSXFunctionNode( - nameSpaceContext, - { - value: tag - }, - children - ) - ]); - } else { - return new JSXNode(tag, props, children); - } -}; -var shallowEqual = (a, b) => { - if (a === b) { - return true; - } - const aKeys = Object.keys(a).sort(); - const bKeys = Object.keys(b).sort(); - if (aKeys.length !== bKeys.length) { - return false; - } - for (let i = 0, len = aKeys.length; i < len; i++) { - if (aKeys[i] === "children" && bKeys[i] === "children" && !a.children?.length && !b.children?.length) { - continue; - } else if (a[aKeys[i]] !== b[aKeys[i]]) { - return false; - } - } - return true; -}; -var memo = (component, propsAreEqual = shallowEqual) => { - let computed = null; - let prevProps = void 0; - const wrapper = ((props) => { - if (prevProps && !propsAreEqual(prevProps, props)) { - computed = null; - } - prevProps = props; - return computed ||= component(props); - }); - wrapper[DOM_MEMO] = propsAreEqual; - wrapper[DOM_RENDERER] = component; - return wrapper; -}; -var Fragment = ({ - children -}) => { - return new JSXFragmentNode( - "", - { - children - }, - Array.isArray(children) ? children : children ? [children] : [] - ); -}; -var isValidElement = (element) => { - return !!(element && typeof element === "object" && "tag" in element && "props" in element); -}; -var cloneElement = (element, props, ...children) => { - let childrenToClone; - if (children.length > 0) { - childrenToClone = children; - } else { - const c = element.props.children; - childrenToClone = Array.isArray(c) ? c : [c]; - } - return jsx( - element.tag, - { ...element.props, ...props }, - ...childrenToClone - ); -}; -var reactAPICompatVersion = "19.0.0-hono-jsx"; -export { - Fragment, - JSXFragmentNode, - JSXNode, - booleanAttributes, - cloneElement, - getNameSpaceContext, - isValidElement, - jsx, - jsxFn, - memo, - reactAPICompatVersion, - shallowEqual -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/jsx/children.js b/PBandGraphScaffold/node_modules/hono/dist/jsx/children.js deleted file mode 100644 index 12ad951..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/jsx/children.js +++ /dev/null @@ -1,21 +0,0 @@ -// src/jsx/children.ts -var toArray = (children) => Array.isArray(children) ? children : [children]; -var Children = { - map: (children, fn) => toArray(children).map(fn), - forEach: (children, fn) => { - toArray(children).forEach(fn); - }, - count: (children) => toArray(children).length, - only: (_children) => { - const children = toArray(_children); - if (children.length !== 1) { - throw new Error("Children.only() expects only one child"); - } - return children[0]; - }, - toArray -}; -export { - Children, - toArray -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/jsx/components.js b/PBandGraphScaffold/node_modules/hono/dist/jsx/components.js deleted file mode 100644 index c8052d5..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/jsx/components.js +++ /dev/null @@ -1,152 +0,0 @@ -// src/jsx/components.ts -import { raw } from "../helper/html/index.js"; -import { HtmlEscapedCallbackPhase, resolveCallback } from "../utils/html.js"; -import { DOM_RENDERER } from "./constants.js"; -import { useContext } from "./context.js"; -import { ErrorBoundary as ErrorBoundaryDomRenderer } from "./dom/components.js"; -import { StreamingContext } from "./streaming.js"; -var errorBoundaryCounter = 0; -var childrenToString = async (children) => { - try { - return children.flat().map((c) => c == null || typeof c === "boolean" ? "" : c.toString()); - } catch (e) { - if (e instanceof Promise) { - await e; - return childrenToString(children); - } else { - throw e; - } - } -}; -var ErrorBoundary = async ({ children, fallback, fallbackRender, onError }) => { - if (!children) { - return raw(""); - } - if (!Array.isArray(children)) { - children = [children]; - } - const nonce = useContext(StreamingContext)?.scriptNonce; - let fallbackStr; - const fallbackRes = (error) => { - onError?.(error); - return (fallbackStr || fallbackRender?.(error) || "").toString(); - }; - let resArray = []; - try { - resArray = children.map( - (c) => c == null || typeof c === "boolean" ? "" : c.toString() - ); - } catch (e) { - fallbackStr = await fallback?.toString(); - if (e instanceof Promise) { - resArray = [ - e.then(() => childrenToString(children)).catch((e2) => fallbackRes(e2)) - ]; - } else { - resArray = [fallbackRes(e)]; - } - } - if (resArray.some((res) => res instanceof Promise)) { - fallbackStr ||= await fallback?.toString(); - const index = errorBoundaryCounter++; - const replaceRe = RegExp(`(.*?)(.*?)()`); - const caught = false; - const catchCallback = ({ error: error2, buffer }) => { - if (caught) { - return ""; - } - const fallbackResString = fallbackRes(error2); - if (buffer) { - buffer[0] = buffer[0].replace(replaceRe, fallbackResString); - } - return buffer ? "" : ``; - }; - let error; - const promiseAll = Promise.all(resArray).catch((e) => error = e); - return raw(``, [ - ({ phase, buffer, context }) => { - if (phase === HtmlEscapedCallbackPhase.BeforeStream) { - return; - } - return promiseAll.then(async (htmlArray) => { - if (error) { - throw error; - } - htmlArray = htmlArray.flat(); - const content = htmlArray.join(""); - let html = buffer ? "" : ` -((d,c) => { -c=d.currentScript.previousSibling -d=d.getElementById('E:${index}') -if(!d)return -d.parentElement.insertBefore(c.content,d.nextSibling) -})(document) -`; - if (htmlArray.every((html2) => !html2.callbacks?.length)) { - if (buffer) { - buffer[0] = buffer[0].replace(replaceRe, content); - } - return html; - } - if (buffer) { - buffer[0] = buffer[0].replace( - replaceRe, - (_all, pre, _, post) => `${pre}${content}${post}` - ); - } - const callbacks = htmlArray.map((html2) => html2.callbacks || []).flat(); - if (phase === HtmlEscapedCallbackPhase.Stream) { - html = await resolveCallback( - html, - HtmlEscapedCallbackPhase.BeforeStream, - true, - context - ); - } - let resolvedCount = 0; - const promises = callbacks.map( - (c) => (...args) => c(...args)?.then((content2) => { - resolvedCount++; - if (buffer) { - if (resolvedCount === callbacks.length) { - buffer[0] = buffer[0].replace(replaceRe, (_all, _pre, content3) => content3); - } - buffer[0] += content2; - return raw("", content2.callbacks); - } - return raw( - content2 + (resolvedCount !== callbacks.length ? "" : ``), - content2.callbacks - ); - }).catch((error2) => catchCallback({ error: error2, buffer })) - ); - return raw(html, promises); - }).catch((error2) => catchCallback({ error: error2, buffer })); - } - ]); - } else { - return raw(resArray.join("")); - } -}; -ErrorBoundary[DOM_RENDERER] = ErrorBoundaryDomRenderer; -export { - ErrorBoundary, - childrenToString -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/jsx/constants.js b/PBandGraphScaffold/node_modules/hono/dist/jsx/constants.js deleted file mode 100644 index 872b4bb..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/jsx/constants.js +++ /dev/null @@ -1,15 +0,0 @@ -// src/jsx/constants.ts -var DOM_RENDERER = /* @__PURE__ */ Symbol("RENDERER"); -var DOM_ERROR_HANDLER = /* @__PURE__ */ Symbol("ERROR_HANDLER"); -var DOM_STASH = /* @__PURE__ */ Symbol("STASH"); -var DOM_INTERNAL_TAG = /* @__PURE__ */ Symbol("INTERNAL"); -var DOM_MEMO = /* @__PURE__ */ Symbol("MEMO"); -var PERMALINK = /* @__PURE__ */ Symbol("PERMALINK"); -export { - DOM_ERROR_HANDLER, - DOM_INTERNAL_TAG, - DOM_MEMO, - DOM_RENDERER, - DOM_STASH, - PERMALINK -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/jsx/context.js b/PBandGraphScaffold/node_modules/hono/dist/jsx/context.js deleted file mode 100644 index c60896a..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/jsx/context.js +++ /dev/null @@ -1,36 +0,0 @@ -// src/jsx/context.ts -import { raw } from "../helper/html/index.js"; -import { JSXFragmentNode } from "./base.js"; -import { DOM_RENDERER } from "./constants.js"; -import { createContextProviderFunction } from "./dom/context.js"; -var globalContexts = []; -var createContext = (defaultValue) => { - const values = [defaultValue]; - const context = ((props) => { - values.push(props.value); - let string; - try { - string = props.children ? (Array.isArray(props.children) ? new JSXFragmentNode("", {}, props.children) : props.children).toString() : ""; - } finally { - values.pop(); - } - if (string instanceof Promise) { - return string.then((resString) => raw(resString, resString.callbacks)); - } else { - return raw(string); - } - }); - context.values = values; - context.Provider = context; - context[DOM_RENDERER] = createContextProviderFunction(values); - globalContexts.push(context); - return context; -}; -var useContext = (context) => { - return context.values.at(-1); -}; -export { - createContext, - globalContexts, - useContext -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/jsx/dom/client.js b/PBandGraphScaffold/node_modules/hono/dist/jsx/dom/client.js deleted file mode 100644 index 4338249..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/jsx/dom/client.js +++ /dev/null @@ -1,53 +0,0 @@ -// src/jsx/dom/client.ts -import { useState } from "../hooks/index.js"; -import { buildNode, renderNode } from "./render.js"; -var createRoot = (element, options = {}) => { - let setJsxNode = ( - // unmounted - void 0 - ); - if (Object.keys(options).length > 0) { - console.warn("createRoot options are not supported yet"); - } - return { - render(jsxNode) { - if (setJsxNode === null) { - throw new Error("Cannot update an unmounted root"); - } - if (setJsxNode) { - setJsxNode(jsxNode); - } else { - renderNode( - buildNode({ - tag: () => { - const [_jsxNode, _setJsxNode] = useState(jsxNode); - setJsxNode = _setJsxNode; - return _jsxNode; - }, - props: {} - // eslint-disable-next-line @typescript-eslint/no-explicit-any - }), - element - ); - } - }, - unmount() { - setJsxNode?.(null); - setJsxNode = null; - } - }; -}; -var hydrateRoot = (element, reactNode, options = {}) => { - const root = createRoot(element, options); - root.render(reactNode); - return root; -}; -var client_default = { - createRoot, - hydrateRoot -}; -export { - createRoot, - client_default as default, - hydrateRoot -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/jsx/dom/components.js b/PBandGraphScaffold/node_modules/hono/dist/jsx/dom/components.js deleted file mode 100644 index ad120be..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/jsx/dom/components.js +++ /dev/null @@ -1,32 +0,0 @@ -// src/jsx/dom/components.ts -import { DOM_ERROR_HANDLER } from "../constants.js"; -import { Fragment } from "./jsx-runtime.js"; -var ErrorBoundary = (({ children, fallback, fallbackRender, onError }) => { - const res = Fragment({ children }); - res[DOM_ERROR_HANDLER] = (err) => { - if (err instanceof Promise) { - throw err; - } - onError?.(err); - return fallbackRender?.(err) || fallback; - }; - return res; -}); -var Suspense = (({ - children, - fallback -}) => { - const res = Fragment({ children }); - res[DOM_ERROR_HANDLER] = (err, retry) => { - if (!(err instanceof Promise)) { - throw err; - } - err.finally(retry); - return fallback; - }; - return res; -}); -export { - ErrorBoundary, - Suspense -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/jsx/dom/context.js b/PBandGraphScaffold/node_modules/hono/dist/jsx/dom/context.js deleted file mode 100644 index 5bc71a7..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/jsx/dom/context.js +++ /dev/null @@ -1,48 +0,0 @@ -// src/jsx/dom/context.ts -import { DOM_ERROR_HANDLER } from "../constants.js"; -import { globalContexts } from "../context.js"; -import { setInternalTagFlag } from "./utils.js"; -var createContextProviderFunction = (values) => ({ value, children }) => { - if (!children) { - return void 0; - } - const props = { - children: [ - { - tag: setInternalTagFlag(() => { - values.push(value); - }), - props: {} - } - ] - }; - if (Array.isArray(children)) { - props.children.push(...children.flat()); - } else { - props.children.push(children); - } - props.children.push({ - tag: setInternalTagFlag(() => { - values.pop(); - }), - props: {} - }); - const res = { tag: "", props, type: "" }; - res[DOM_ERROR_HANDLER] = (err) => { - values.pop(); - throw err; - }; - return res; -}; -var createContext = (defaultValue) => { - const values = [defaultValue]; - const context = createContextProviderFunction(values); - context.values = values; - context.Provider = context; - globalContexts.push(context); - return context; -}; -export { - createContext, - createContextProviderFunction -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/jsx/dom/css.js b/PBandGraphScaffold/node_modules/hono/dist/jsx/dom/css.js deleted file mode 100644 index f5bc6de..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/jsx/dom/css.js +++ /dev/null @@ -1,143 +0,0 @@ -// src/jsx/dom/css.ts -import { - CLASS_NAME, - DEFAULT_STYLE_ID, - PSEUDO_GLOBAL_SELECTOR, - SELECTOR, - SELECTORS, - STYLE_STRING, - cssCommon, - cxCommon, - keyframesCommon, - viewTransitionCommon -} from "../../helper/css/common.js"; -import { rawCssString } from "../../helper/css/common.js"; -var splitRule = (rule) => { - const result = []; - let startPos = 0; - let depth = 0; - for (let i = 0, len = rule.length; i < len; i++) { - const char = rule[i]; - if (char === "'" || char === '"') { - const quote = char; - i++; - for (; i < len; i++) { - if (rule[i] === "\\") { - i++; - continue; - } - if (rule[i] === quote) { - break; - } - } - continue; - } - if (char === "{") { - depth++; - continue; - } - if (char === "}") { - depth--; - if (depth === 0) { - result.push(rule.slice(startPos, i + 1)); - startPos = i + 1; - } - continue; - } - } - return result; -}; -var createCssJsxDomObjects = ({ id }) => { - let styleSheet = void 0; - const findStyleSheet = () => { - if (!styleSheet) { - styleSheet = document.querySelector(`style#${id}`)?.sheet; - if (styleSheet) { - ; - styleSheet.addedStyles = /* @__PURE__ */ new Set(); - } - } - return styleSheet ? [styleSheet, styleSheet.addedStyles] : []; - }; - const insertRule = (className, styleString) => { - const [sheet, addedStyles] = findStyleSheet(); - if (!sheet || !addedStyles) { - Promise.resolve().then(() => { - if (!findStyleSheet()[0]) { - throw new Error("style sheet not found"); - } - insertRule(className, styleString); - }); - return; - } - if (!addedStyles.has(className)) { - addedStyles.add(className); - (className.startsWith(PSEUDO_GLOBAL_SELECTOR) ? splitRule(styleString) : [`${className[0] === "@" ? "" : "."}${className}{${styleString}}`]).forEach((rule) => { - sheet.insertRule(rule, sheet.cssRules.length); - }); - } - }; - const cssObject = { - toString() { - const selector = this[SELECTOR]; - insertRule(selector, this[STYLE_STRING]); - this[SELECTORS].forEach(({ [CLASS_NAME]: className, [STYLE_STRING]: styleString }) => { - insertRule(className, styleString); - }); - return this[CLASS_NAME]; - } - }; - const Style2 = ({ children, nonce }) => ({ - tag: "style", - props: { - id, - nonce, - children: children && (Array.isArray(children) ? children : [children]).map( - (c) => c[STYLE_STRING] - ) - } - // eslint-disable-next-line @typescript-eslint/no-explicit-any - }); - return [cssObject, Style2]; -}; -var createCssContext = ({ id }) => { - const [cssObject, Style2] = createCssJsxDomObjects({ id }); - const newCssClassNameObject = (cssClassName) => { - cssClassName.toString = cssObject.toString; - return cssClassName; - }; - const css2 = (strings, ...values) => { - return newCssClassNameObject(cssCommon(strings, values)); - }; - const cx2 = (...args) => { - args = cxCommon(args); - return css2(Array(args.length).fill(""), ...args); - }; - const keyframes2 = keyframesCommon; - const viewTransition2 = ((strings, ...values) => { - return newCssClassNameObject(viewTransitionCommon(strings, values)); - }); - return { - css: css2, - cx: cx2, - keyframes: keyframes2, - viewTransition: viewTransition2, - Style: Style2 - }; -}; -var defaultContext = createCssContext({ id: DEFAULT_STYLE_ID }); -var css = defaultContext.css; -var cx = defaultContext.cx; -var keyframes = defaultContext.keyframes; -var viewTransition = defaultContext.viewTransition; -var Style = defaultContext.Style; -export { - Style, - createCssContext, - createCssJsxDomObjects, - css, - cx, - keyframes, - rawCssString, - viewTransition -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/jsx/dom/hooks/index.js b/PBandGraphScaffold/node_modules/hono/dist/jsx/dom/hooks/index.js deleted file mode 100644 index 5eed982..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/jsx/dom/hooks/index.js +++ /dev/null @@ -1,48 +0,0 @@ -// src/jsx/dom/hooks/index.ts -import { PERMALINK } from "../../constants.js"; -import { useContext } from "../../context.js"; -import { useCallback, useState } from "../../hooks/index.js"; -import { createContext } from "../context.js"; -var FormContext = createContext({ - pending: false, - data: null, - method: null, - action: null -}); -var actions = /* @__PURE__ */ new Set(); -var registerAction = (action) => { - actions.add(action); - action.finally(() => actions.delete(action)); -}; -var useFormStatus = () => { - return useContext(FormContext); -}; -var useOptimistic = (state, updateState) => { - const [optimisticState, setOptimisticState] = useState(state); - if (actions.size > 0) { - Promise.all(actions).finally(() => { - setOptimisticState(state); - }); - } else { - setOptimisticState(state); - } - const cb = useCallback((newData) => { - setOptimisticState((currentState) => updateState(currentState, newData)); - }, []); - return [optimisticState, cb]; -}; -var useActionState = (fn, initialState, permalink) => { - const [state, setState] = useState(initialState); - const actionState = async (data) => { - setState(await fn(state, data)); - }; - actionState[PERMALINK] = permalink; - return [state, actionState]; -}; -export { - FormContext, - registerAction, - useActionState, - useFormStatus, - useOptimistic -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/jsx/dom/index.js b/PBandGraphScaffold/node_modules/hono/dist/jsx/dom/index.js deleted file mode 100644 index 4e5fbd3..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/jsx/dom/index.js +++ /dev/null @@ -1,142 +0,0 @@ -// src/jsx/dom/index.ts -import { isValidElement, reactAPICompatVersion, shallowEqual } from "../base.js"; -import { Children } from "../children.js"; -import { DOM_MEMO } from "../constants.js"; -import { useContext } from "../context.js"; -import { - createRef, - forwardRef, - startTransition, - startViewTransition, - use, - useCallback, - useDebugValue, - useDeferredValue, - useEffect, - useId, - useImperativeHandle, - useInsertionEffect, - useLayoutEffect, - useMemo, - useReducer, - useRef, - useState, - useSyncExternalStore, - useTransition, - useViewTransition -} from "../hooks/index.js"; -import { ErrorBoundary, Suspense } from "./components.js"; -import { createContext } from "./context.js"; -import { useActionState, useFormStatus, useOptimistic } from "./hooks/index.js"; -import { Fragment, jsx } from "./jsx-runtime.js"; -import { createPortal, flushSync } from "./render.js"; -import { render } from "./render.js"; -var createElement = (tag, props, ...children) => { - const jsxProps = props ? { ...props } : {}; - if (children.length) { - jsxProps.children = children.length === 1 ? children[0] : children; - } - let key = void 0; - if ("key" in jsxProps) { - key = jsxProps.key; - delete jsxProps.key; - } - return jsx(tag, jsxProps, key); -}; -var cloneElement = (element, props, ...children) => { - return jsx( - element.tag, - { - ...element.props, - ...props, - children: children.length ? children : element.props.children - }, - element.key - ); -}; -var memo = (component, propsAreEqual = shallowEqual) => { - const wrapper = ((props) => component(props)); - wrapper[DOM_MEMO] = propsAreEqual; - return wrapper; -}; -var dom_default = { - version: reactAPICompatVersion, - useState, - useEffect, - useRef, - useCallback, - use, - startTransition, - useTransition, - useDeferredValue, - startViewTransition, - useViewTransition, - useMemo, - useLayoutEffect, - useInsertionEffect, - useReducer, - useId, - useDebugValue, - createRef, - forwardRef, - useImperativeHandle, - useSyncExternalStore, - useFormStatus, - useActionState, - useOptimistic, - Suspense, - ErrorBoundary, - createContext, - useContext, - memo, - isValidElement, - createElement, - cloneElement, - Children, - Fragment, - StrictMode: Fragment, - flushSync, - createPortal -}; -export { - Children, - ErrorBoundary, - Fragment, - Fragment as StrictMode, - Suspense, - cloneElement, - createContext, - createElement, - createPortal, - createRef, - dom_default as default, - flushSync, - forwardRef, - isValidElement, - createElement as jsx, - memo, - render, - startTransition, - startViewTransition, - use, - useActionState, - useCallback, - useContext, - useDebugValue, - useDeferredValue, - useEffect, - useFormStatus, - useId, - useImperativeHandle, - useInsertionEffect, - useLayoutEffect, - useMemo, - useOptimistic, - useReducer, - useRef, - useState, - useSyncExternalStore, - useTransition, - useViewTransition, - reactAPICompatVersion as version -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/jsx/dom/intrinsic-element/components.js b/PBandGraphScaffold/node_modules/hono/dist/jsx/dom/intrinsic-element/components.js deleted file mode 100644 index 995b789..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/jsx/dom/intrinsic-element/components.js +++ /dev/null @@ -1,337 +0,0 @@ -// src/jsx/dom/intrinsic-element/components.ts -import { useContext } from "../../context.js"; -import { use, useCallback, useMemo, useState } from "../../hooks/index.js"; -import { dataPrecedenceAttr, deDupeKeyMap, domRenderers } from "../../intrinsic-element/common.js"; -import { FormContext, registerAction } from "../hooks/index.js"; -import { createPortal, getNameSpaceContext } from "../render.js"; -var clearCache = () => { - blockingPromiseMap = /* @__PURE__ */ Object.create(null); - createdElements = /* @__PURE__ */ Object.create(null); -}; -var composeRef = (ref, cb) => { - return useMemo( - () => (e) => { - let refCleanup; - if (ref) { - if (typeof ref === "function") { - refCleanup = ref(e) || (() => { - ref(null); - }); - } else if (ref && "current" in ref) { - ref.current = e; - refCleanup = () => { - ref.current = null; - }; - } - } - const cbCleanup = cb(e); - return () => { - cbCleanup?.(); - refCleanup?.(); - }; - }, - [ref] - ); -}; -var blockingPromiseMap = /* @__PURE__ */ Object.create(null); -var createdElements = /* @__PURE__ */ Object.create(null); -var documentMetadataTag = (tag, props, preserveNodeType, supportSort, supportBlocking) => { - if (props?.itemProp) { - return { - tag, - props, - type: tag, - ref: props.ref - }; - } - const head = document.head; - let { onLoad, onError, precedence, blocking, ...restProps } = props; - let element = null; - let created = false; - const deDupeKeys = deDupeKeyMap[tag]; - let existingElements = void 0; - if (deDupeKeys.length > 0) { - const tags = head.querySelectorAll(tag); - LOOP: for (const e of tags) { - for (const key of deDupeKeyMap[tag]) { - if (e.getAttribute(key) === props[key]) { - element = e; - break LOOP; - } - } - } - if (!element) { - const cacheKey = deDupeKeys.reduce( - (acc, key) => props[key] === void 0 ? acc : `${acc}-${key}-${props[key]}`, - tag - ); - created = !createdElements[cacheKey]; - element = createdElements[cacheKey] ||= (() => { - const e = document.createElement(tag); - for (const key of deDupeKeys) { - if (props[key] !== void 0) { - e.setAttribute(key, props[key]); - } - if (props.rel) { - e.setAttribute("rel", props.rel); - } - } - return e; - })(); - } - } else { - existingElements = head.querySelectorAll(tag); - } - precedence = supportSort ? precedence ?? "" : void 0; - if (supportSort) { - restProps[dataPrecedenceAttr] = precedence; - } - const insert = useCallback( - (e) => { - if (deDupeKeys.length > 0) { - let found = false; - for (const existingElement of head.querySelectorAll(tag)) { - if (found && existingElement.getAttribute(dataPrecedenceAttr) !== precedence) { - head.insertBefore(e, existingElement); - return; - } - if (existingElement.getAttribute(dataPrecedenceAttr) === precedence) { - found = true; - } - } - head.appendChild(e); - } else if (existingElements) { - let found = false; - for (const existingElement of existingElements) { - if (existingElement === e) { - found = true; - break; - } - } - if (!found) { - head.insertBefore( - e, - head.contains(existingElements[0]) ? existingElements[0] : head.querySelector(tag) - ); - } - existingElements = void 0; - } - }, - [precedence] - ); - const ref = composeRef(props.ref, (e) => { - const key = deDupeKeys[0]; - if (preserveNodeType === 2) { - e.innerHTML = ""; - } - if (created || existingElements) { - insert(e); - } - if (!onError && !onLoad) { - return; - } - let promise = blockingPromiseMap[e.getAttribute(key)] ||= new Promise( - (resolve, reject) => { - e.addEventListener("load", resolve); - e.addEventListener("error", reject); - } - ); - if (onLoad) { - promise = promise.then(onLoad); - } - if (onError) { - promise = promise.catch(onError); - } - promise.catch(() => { - }); - }); - if (supportBlocking && blocking === "render") { - const key = deDupeKeyMap[tag][0]; - if (props[key]) { - const value = props[key]; - const promise = blockingPromiseMap[value] ||= new Promise((resolve, reject) => { - insert(element); - element.addEventListener("load", resolve); - element.addEventListener("error", reject); - }); - use(promise); - } - } - const jsxNode = { - tag, - type: tag, - props: { - ...restProps, - ref - }, - ref - }; - jsxNode.p = preserveNodeType; - if (element) { - jsxNode.e = element; - } - return createPortal( - jsxNode, - head - // eslint-disable-next-line @typescript-eslint/no-explicit-any - ); -}; -var title = (props) => { - const nameSpaceContext = getNameSpaceContext(); - const ns = nameSpaceContext && useContext(nameSpaceContext); - if (ns?.endsWith("svg")) { - return { - tag: "title", - props, - type: "title", - // eslint-disable-next-line @typescript-eslint/no-explicit-any - ref: props.ref - }; - } - return documentMetadataTag("title", props, void 0, false, false); -}; -var script = (props) => { - if (!props || ["src", "async"].some((k) => !props[k])) { - return { - tag: "script", - props, - type: "script", - ref: props.ref - }; - } - return documentMetadataTag("script", props, 1, false, true); -}; -var style = (props) => { - if (!props || !["href", "precedence"].every((k) => k in props)) { - return { - tag: "style", - props, - type: "style", - ref: props.ref - }; - } - props["data-href"] = props.href; - delete props.href; - return documentMetadataTag("style", props, 2, true, true); -}; -var link = (props) => { - if (!props || ["onLoad", "onError"].some((k) => k in props) || props.rel === "stylesheet" && (!("precedence" in props) || "disabled" in props)) { - return { - tag: "link", - props, - type: "link", - ref: props.ref - }; - } - return documentMetadataTag("link", props, 1, "precedence" in props, true); -}; -var meta = (props) => { - return documentMetadataTag("meta", props, void 0, false, false); -}; -var customEventFormAction = /* @__PURE__ */ Symbol(); -var form = (props) => { - const { action, ...restProps } = props; - if (typeof action !== "function") { - ; - restProps.action = action; - } - const [state, setState] = useState([null, false]); - const onSubmit = useCallback( - async (ev) => { - const currentAction = ev.isTrusted ? action : ev.detail[customEventFormAction]; - if (typeof currentAction !== "function") { - return; - } - ev.preventDefault(); - const formData = new FormData(ev.target); - setState([formData, true]); - const actionRes = currentAction(formData); - if (actionRes instanceof Promise) { - registerAction(actionRes); - await actionRes; - } - setState([null, true]); - }, - [] - ); - const ref = composeRef(props.ref, (el) => { - el.addEventListener("submit", onSubmit); - return () => { - el.removeEventListener("submit", onSubmit); - }; - }); - const [data, isDirty] = state; - state[1] = false; - return { - tag: FormContext, - props: { - value: { - pending: data !== null, - data, - method: data ? "post" : null, - action: data ? action : null - }, - children: { - tag: "form", - props: { - ...restProps, - ref - }, - type: "form", - ref - } - }, - f: isDirty - // eslint-disable-next-line @typescript-eslint/no-explicit-any - }; -}; -var formActionableElement = (tag, { - formAction, - ...props -}) => { - if (typeof formAction === "function") { - const onClick = useCallback((ev) => { - ev.preventDefault(); - ev.currentTarget.form.dispatchEvent( - new CustomEvent("submit", { detail: { [customEventFormAction]: formAction } }) - ); - }, []); - props.ref = composeRef(props.ref, (el) => { - el.addEventListener("click", onClick); - return () => { - el.removeEventListener("click", onClick); - }; - }); - } - return { - tag, - props, - type: tag, - ref: props.ref - // eslint-disable-next-line @typescript-eslint/no-explicit-any - }; -}; -var input = (props) => formActionableElement("input", props); -var button = (props) => formActionableElement("button", props); -Object.assign(domRenderers, { - title, - script, - style, - link, - meta, - form, - input, - button -}); -export { - button, - clearCache, - composeRef, - form, - input, - link, - meta, - script, - style, - title -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/jsx/dom/jsx-dev-runtime.js b/PBandGraphScaffold/node_modules/hono/dist/jsx/dom/jsx-dev-runtime.js deleted file mode 100644 index 688a642..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/jsx/dom/jsx-dev-runtime.js +++ /dev/null @@ -1,19 +0,0 @@ -// src/jsx/dom/jsx-dev-runtime.ts -import * as intrinsicElementTags from "./intrinsic-element/components.js"; -var jsxDEV = (tag, props, key) => { - if (typeof tag === "string" && intrinsicElementTags[tag]) { - tag = intrinsicElementTags[tag]; - } - return { - tag, - type: tag, - props, - key, - ref: props.ref - }; -}; -var Fragment = (props) => jsxDEV("", props, void 0); -export { - Fragment, - jsxDEV -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/jsx/dom/jsx-runtime.js b/PBandGraphScaffold/node_modules/hono/dist/jsx/dom/jsx-runtime.js deleted file mode 100644 index 925d6df..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/jsx/dom/jsx-runtime.js +++ /dev/null @@ -1,8 +0,0 @@ -// src/jsx/dom/jsx-runtime.ts -import { jsxDEV, Fragment } from "./jsx-dev-runtime.js"; -import { jsxDEV as jsxDEV2 } from "./jsx-dev-runtime.js"; -export { - Fragment, - jsxDEV as jsx, - jsxDEV2 as jsxs -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/jsx/dom/render.js b/PBandGraphScaffold/node_modules/hono/dist/jsx/dom/render.js deleted file mode 100644 index 78730d6..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/jsx/dom/render.js +++ /dev/null @@ -1,597 +0,0 @@ -// src/jsx/dom/render.ts -import { toArray } from "../children.js"; -import { - DOM_ERROR_HANDLER, - DOM_INTERNAL_TAG, - DOM_MEMO, - DOM_RENDERER, - DOM_STASH -} from "../constants.js"; -import { globalContexts as globalJSXContexts, useContext } from "../context.js"; -import { STASH_EFFECT } from "../hooks/index.js"; -import { normalizeIntrinsicElementKey, styleObjectForEach } from "../utils.js"; -import { createContext } from "./context.js"; -var HONO_PORTAL_ELEMENT = "_hp"; -var eventAliasMap = { - Change: "Input", - DoubleClick: "DblClick" -}; -var nameSpaceMap = { - svg: "2000/svg", - math: "1998/Math/MathML" -}; -var buildDataStack = []; -var refCleanupMap = /* @__PURE__ */ new WeakMap(); -var nameSpaceContext = void 0; -var getNameSpaceContext = () => nameSpaceContext; -var isNodeString = (node) => "t" in node; -var eventCache = { - // pre-define events that are used very frequently - onClick: ["click", false] -}; -var getEventSpec = (key) => { - if (!key.startsWith("on")) { - return void 0; - } - if (eventCache[key]) { - return eventCache[key]; - } - const match = key.match(/^on([A-Z][a-zA-Z]+?(?:PointerCapture)?)(Capture)?$/); - if (match) { - const [, eventName, capture] = match; - return eventCache[key] = [(eventAliasMap[eventName] || eventName).toLowerCase(), !!capture]; - } - return void 0; -}; -var toAttributeName = (element, key) => nameSpaceContext && element instanceof SVGElement && /[A-Z]/.test(key) && (key in element.style || // Presentation attributes are findable in style object. "clip-path", "font-size", "stroke-width", etc. -key.match(/^(?:o|pai|str|u|ve)/)) ? key.replace(/([A-Z])/g, "-$1").toLowerCase() : key; -var applyProps = (container, attributes, oldAttributes) => { - attributes ||= {}; - for (let key in attributes) { - const value = attributes[key]; - if (key !== "children" && (!oldAttributes || oldAttributes[key] !== value)) { - key = normalizeIntrinsicElementKey(key); - const eventSpec = getEventSpec(key); - if (eventSpec) { - if (oldAttributes?.[key] !== value) { - if (oldAttributes) { - container.removeEventListener(eventSpec[0], oldAttributes[key], eventSpec[1]); - } - if (value != null) { - if (typeof value !== "function") { - throw new Error(`Event handler for "${key}" is not a function`); - } - container.addEventListener(eventSpec[0], value, eventSpec[1]); - } - } - } else if (key === "dangerouslySetInnerHTML" && value) { - container.innerHTML = value.__html; - } else if (key === "ref") { - let cleanup; - if (typeof value === "function") { - cleanup = value(container) || (() => value(null)); - } else if (value && "current" in value) { - value.current = container; - cleanup = () => value.current = null; - } - refCleanupMap.set(container, cleanup); - } else if (key === "style") { - const style = container.style; - if (typeof value === "string") { - style.cssText = value; - } else { - style.cssText = ""; - if (value != null) { - styleObjectForEach(value, style.setProperty.bind(style)); - } - } - } else { - if (key === "value") { - const nodeName = container.nodeName; - if (nodeName === "INPUT" || nodeName === "TEXTAREA" || nodeName === "SELECT") { - ; - container.value = value === null || value === void 0 || value === false ? null : value; - if (nodeName === "TEXTAREA") { - container.textContent = value; - continue; - } else if (nodeName === "SELECT") { - if (container.selectedIndex === -1) { - ; - container.selectedIndex = 0; - } - continue; - } - } - } else if (key === "checked" && container.nodeName === "INPUT" || key === "selected" && container.nodeName === "OPTION") { - ; - container[key] = value; - } - const k = toAttributeName(container, key); - if (value === null || value === void 0 || value === false) { - container.removeAttribute(k); - } else if (value === true) { - container.setAttribute(k, ""); - } else if (typeof value === "string" || typeof value === "number") { - container.setAttribute(k, value); - } else { - container.setAttribute(k, value.toString()); - } - } - } - } - if (oldAttributes) { - for (let key in oldAttributes) { - const value = oldAttributes[key]; - if (key !== "children" && !(key in attributes)) { - key = normalizeIntrinsicElementKey(key); - const eventSpec = getEventSpec(key); - if (eventSpec) { - container.removeEventListener(eventSpec[0], value, eventSpec[1]); - } else if (key === "ref") { - refCleanupMap.get(container)?.(); - } else { - container.removeAttribute(toAttributeName(container, key)); - } - } - } - } -}; -var invokeTag = (context, node) => { - node[DOM_STASH][0] = 0; - buildDataStack.push([context, node]); - const func = node.tag[DOM_RENDERER] || node.tag; - const props = func.defaultProps ? { - // eslint-disable-next-line @typescript-eslint/no-explicit-any - ...func.defaultProps, - ...node.props - } : node.props; - try { - return [func.call(null, props)]; - } finally { - buildDataStack.pop(); - } -}; -var getNextChildren = (node, container, nextChildren, childrenToRemove, callbacks) => { - if (node.vR?.length) { - childrenToRemove.push(...node.vR); - delete node.vR; - } - if (typeof node.tag === "function") { - node[DOM_STASH][1][STASH_EFFECT]?.forEach((data) => callbacks.push(data)); - } - node.vC.forEach((child) => { - if (isNodeString(child)) { - nextChildren.push(child); - } else { - if (typeof child.tag === "function" || child.tag === "") { - child.c = container; - const currentNextChildrenIndex = nextChildren.length; - getNextChildren(child, container, nextChildren, childrenToRemove, callbacks); - if (child.s) { - for (let i = currentNextChildrenIndex; i < nextChildren.length; i++) { - nextChildren[i].s = true; - } - child.s = false; - } - } else { - nextChildren.push(child); - if (child.vR?.length) { - childrenToRemove.push(...child.vR); - delete child.vR; - } - } - } - }); -}; -var findInsertBefore = (node) => { - for (; ; node = node.tag === HONO_PORTAL_ELEMENT || !node.vC || !node.pP ? node.nN : node.vC[0]) { - if (!node) { - return null; - } - if (node.tag !== HONO_PORTAL_ELEMENT && node.e) { - return node.e; - } - } -}; -var removeNode = (node) => { - if (!isNodeString(node)) { - node[DOM_STASH]?.[1][STASH_EFFECT]?.forEach((data) => data[2]?.()); - refCleanupMap.get(node.e)?.(); - if (node.p === 2) { - node.vC?.forEach((n) => n.p = 2); - } - node.vC?.forEach(removeNode); - } - if (!node.p) { - node.e?.remove(); - delete node.e; - } - if (typeof node.tag === "function") { - updateMap.delete(node); - fallbackUpdateFnArrayMap.delete(node); - delete node[DOM_STASH][3]; - node.a = true; - } -}; -var apply = (node, container, isNew) => { - node.c = container; - applyNodeObject(node, container, isNew); -}; -var findChildNodeIndex = (childNodes, child) => { - if (!child) { - return; - } - for (let i = 0, len = childNodes.length; i < len; i++) { - if (childNodes[i] === child) { - return i; - } - } - return; -}; -var cancelBuild = /* @__PURE__ */ Symbol(); -var applyNodeObject = (node, container, isNew) => { - const next = []; - const remove = []; - const callbacks = []; - getNextChildren(node, container, next, remove, callbacks); - remove.forEach(removeNode); - const childNodes = isNew ? void 0 : container.childNodes; - let offset; - let insertBeforeNode = null; - if (isNew) { - offset = -1; - } else if (!childNodes.length) { - offset = 0; - } else { - const offsetByNextNode = findChildNodeIndex(childNodes, findInsertBefore(node.nN)); - if (offsetByNextNode !== void 0) { - insertBeforeNode = childNodes[offsetByNextNode]; - offset = offsetByNextNode; - } else { - offset = findChildNodeIndex(childNodes, next.find((n) => n.tag !== HONO_PORTAL_ELEMENT && n.e)?.e) ?? -1; - } - if (offset === -1) { - isNew = true; - } - } - for (let i = 0, len = next.length; i < len; i++, offset++) { - const child = next[i]; - let el; - if (child.s && child.e) { - el = child.e; - child.s = false; - } else { - const isNewLocal = isNew || !child.e; - if (isNodeString(child)) { - if (child.e && child.d) { - child.e.textContent = child.t; - } - child.d = false; - el = child.e ||= document.createTextNode(child.t); - } else { - el = child.e ||= child.n ? document.createElementNS(child.n, child.tag) : document.createElement(child.tag); - applyProps(el, child.props, child.pP); - applyNodeObject(child, el, isNewLocal); - } - } - if (child.tag === HONO_PORTAL_ELEMENT) { - offset--; - } else if (isNew) { - if (!el.parentNode) { - container.appendChild(el); - } - } else if (childNodes[offset] !== el && childNodes[offset - 1] !== el) { - if (childNodes[offset + 1] === el) { - container.appendChild(childNodes[offset]); - } else { - container.insertBefore(el, insertBeforeNode || childNodes[offset] || null); - } - } - } - if (node.pP) { - delete node.pP; - } - if (callbacks.length) { - const useLayoutEffectCbs = []; - const useEffectCbs = []; - callbacks.forEach(([, useLayoutEffectCb, , useEffectCb, useInsertionEffectCb]) => { - if (useLayoutEffectCb) { - useLayoutEffectCbs.push(useLayoutEffectCb); - } - if (useEffectCb) { - useEffectCbs.push(useEffectCb); - } - useInsertionEffectCb?.(); - }); - useLayoutEffectCbs.forEach((cb) => cb()); - if (useEffectCbs.length) { - requestAnimationFrame(() => { - useEffectCbs.forEach((cb) => cb()); - }); - } - } -}; -var isSameContext = (oldContexts, newContexts) => !!(oldContexts && oldContexts.length === newContexts.length && oldContexts.every((ctx, i) => ctx[1] === newContexts[i][1])); -var fallbackUpdateFnArrayMap = /* @__PURE__ */ new WeakMap(); -var build = (context, node, children) => { - const buildWithPreviousChildren = !children && node.pC; - if (children) { - node.pC ||= node.vC; - } - let foundErrorHandler; - try { - children ||= typeof node.tag == "function" ? invokeTag(context, node) : toArray(node.props.children); - if (children[0]?.tag === "" && children[0][DOM_ERROR_HANDLER]) { - foundErrorHandler = children[0][DOM_ERROR_HANDLER]; - context[5].push([context, foundErrorHandler, node]); - } - const oldVChildren = buildWithPreviousChildren ? [...node.pC] : node.vC ? [...node.vC] : void 0; - const vChildren = []; - let prevNode; - for (let i = 0; i < children.length; i++) { - if (Array.isArray(children[i])) { - children.splice(i, 1, ...children[i].flat()); - } - let child = buildNode(children[i]); - if (child) { - if (typeof child.tag === "function" && // eslint-disable-next-line @typescript-eslint/no-explicit-any - !child.tag[DOM_INTERNAL_TAG]) { - if (globalJSXContexts.length > 0) { - child[DOM_STASH][2] = globalJSXContexts.map((c) => [c, c.values.at(-1)]); - } - if (context[5]?.length) { - child[DOM_STASH][3] = context[5].at(-1); - } - } - let oldChild; - if (oldVChildren && oldVChildren.length) { - const i2 = oldVChildren.findIndex( - isNodeString(child) ? (c) => isNodeString(c) : child.key !== void 0 ? (c) => c.key === child.key && c.tag === child.tag : (c) => c.tag === child.tag - ); - if (i2 !== -1) { - oldChild = oldVChildren[i2]; - oldVChildren.splice(i2, 1); - } - } - if (oldChild) { - if (isNodeString(child)) { - if (oldChild.t !== child.t) { - ; - oldChild.t = child.t; - oldChild.d = true; - } - child = oldChild; - } else { - const pP = oldChild.pP = oldChild.props; - oldChild.props = child.props; - oldChild.f ||= child.f || node.f; - if (typeof child.tag === "function") { - const oldContexts = oldChild[DOM_STASH][2]; - oldChild[DOM_STASH][2] = child[DOM_STASH][2] || []; - oldChild[DOM_STASH][3] = child[DOM_STASH][3]; - if (!oldChild.f && ((oldChild.o || oldChild) === child.o || // The code generated by the react compiler is memoized under this condition. - oldChild.tag[DOM_MEMO]?.(pP, oldChild.props)) && // The `memo` function is memoized under this condition. - isSameContext(oldContexts, oldChild[DOM_STASH][2])) { - oldChild.s = true; - } - } - child = oldChild; - } - } else if (!isNodeString(child) && nameSpaceContext) { - const ns = useContext(nameSpaceContext); - if (ns) { - child.n = ns; - } - } - if (!isNodeString(child) && !child.s) { - build(context, child); - delete child.f; - } - vChildren.push(child); - if (prevNode && !prevNode.s && !child.s) { - for (let p = prevNode; p && !isNodeString(p); p = p.vC?.at(-1)) { - p.nN = child; - } - } - prevNode = child; - } - } - node.vR = buildWithPreviousChildren ? [...node.vC, ...oldVChildren || []] : oldVChildren || []; - node.vC = vChildren; - if (buildWithPreviousChildren) { - delete node.pC; - } - } catch (e) { - node.f = true; - if (e === cancelBuild) { - if (foundErrorHandler) { - return; - } else { - throw e; - } - } - const [errorHandlerContext, errorHandler, errorHandlerNode] = node[DOM_STASH]?.[3] || []; - if (errorHandler) { - const fallbackUpdateFn = () => update([0, false, context[2]], errorHandlerNode); - const fallbackUpdateFnArray = fallbackUpdateFnArrayMap.get(errorHandlerNode) || []; - fallbackUpdateFnArray.push(fallbackUpdateFn); - fallbackUpdateFnArrayMap.set(errorHandlerNode, fallbackUpdateFnArray); - const fallback = errorHandler(e, () => { - const fnArray = fallbackUpdateFnArrayMap.get(errorHandlerNode); - if (fnArray) { - const i = fnArray.indexOf(fallbackUpdateFn); - if (i !== -1) { - fnArray.splice(i, 1); - return fallbackUpdateFn(); - } - } - }); - if (fallback) { - if (context[0] === 1) { - context[1] = true; - } else { - build(context, errorHandlerNode, [fallback]); - if ((errorHandler.length === 1 || context !== errorHandlerContext) && errorHandlerNode.c) { - apply(errorHandlerNode, errorHandlerNode.c, false); - return; - } - } - throw cancelBuild; - } - } - throw e; - } finally { - if (foundErrorHandler) { - context[5].pop(); - } - } -}; -var buildNode = (node) => { - if (node === void 0 || node === null || typeof node === "boolean") { - return void 0; - } else if (typeof node === "string" || typeof node === "number") { - return { t: node.toString(), d: true }; - } else { - if ("vR" in node) { - node = { - tag: node.tag, - props: node.props, - key: node.key, - f: node.f, - type: node.tag, - ref: node.props.ref, - o: node.o || node - // eslint-disable-next-line @typescript-eslint/no-explicit-any - }; - } - if (typeof node.tag === "function") { - ; - node[DOM_STASH] = [0, []]; - } else { - const ns = nameSpaceMap[node.tag]; - if (ns) { - nameSpaceContext ||= createContext(""); - node.props.children = [ - { - tag: nameSpaceContext, - props: { - value: node.n = `http://www.w3.org/${ns}`, - children: node.props.children - } - } - ]; - } - } - return node; - } -}; -var replaceContainer = (node, from, to) => { - if (node.c === from) { - node.c = to; - node.vC.forEach((child) => replaceContainer(child, from, to)); - } -}; -var updateSync = (context, node) => { - node[DOM_STASH][2]?.forEach(([c, v]) => { - c.values.push(v); - }); - try { - build(context, node, void 0); - } catch { - return; - } - if (node.a) { - delete node.a; - return; - } - node[DOM_STASH][2]?.forEach(([c]) => { - c.values.pop(); - }); - if (context[0] !== 1 || !context[1]) { - apply(node, node.c, false); - } -}; -var updateMap = /* @__PURE__ */ new WeakMap(); -var currentUpdateSets = []; -var update = async (context, node) => { - context[5] ||= []; - const existing = updateMap.get(node); - if (existing) { - existing[0](void 0); - } - let resolve; - const promise = new Promise((r) => resolve = r); - updateMap.set(node, [ - resolve, - () => { - if (context[2]) { - context[2](context, node, (context2) => { - updateSync(context2, node); - }).then(() => resolve(node)); - } else { - updateSync(context, node); - resolve(node); - } - } - ]); - if (currentUpdateSets.length) { - ; - currentUpdateSets.at(-1).add(node); - } else { - await Promise.resolve(); - const latest = updateMap.get(node); - if (latest) { - updateMap.delete(node); - latest[1](); - } - } - return promise; -}; -var renderNode = (node, container) => { - const context = []; - context[5] = []; - context[4] = true; - build(context, node, void 0); - context[4] = false; - const fragment = document.createDocumentFragment(); - apply(node, fragment, true); - replaceContainer(node, fragment, container); - container.replaceChildren(fragment); -}; -var render = (jsxNode, container) => { - renderNode(buildNode({ tag: "", props: { children: jsxNode } }), container); -}; -var flushSync = (callback) => { - const set = /* @__PURE__ */ new Set(); - currentUpdateSets.push(set); - callback(); - set.forEach((node) => { - const latest = updateMap.get(node); - if (latest) { - updateMap.delete(node); - latest[1](); - } - }); - currentUpdateSets.pop(); -}; -var createPortal = (children, container, key) => ({ - tag: HONO_PORTAL_ELEMENT, - props: { - children - }, - key, - e: container, - p: 1 - // eslint-disable-next-line @typescript-eslint/no-explicit-any -}); -export { - build, - buildDataStack, - buildNode, - createPortal, - flushSync, - getNameSpaceContext, - render, - renderNode, - update -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/jsx/dom/server.js b/PBandGraphScaffold/node_modules/hono/dist/jsx/dom/server.js deleted file mode 100644 index a1110dd..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/jsx/dom/server.js +++ /dev/null @@ -1,33 +0,0 @@ -// src/jsx/dom/server.ts -import { renderToReadableStream as renderToReadableStreamHono } from "../streaming.js"; -import version from "./index.js"; -var renderToString = (element, options = {}) => { - if (Object.keys(options).length > 0) { - console.warn("options are not supported yet"); - } - const res = element?.toString() ?? ""; - if (typeof res !== "string") { - throw new Error("Async component is not supported in renderToString"); - } - return res; -}; -var renderToReadableStream = async (element, options = {}) => { - if (Object.keys(options).some((key) => key !== "onError")) { - console.warn("options are not supported yet, except onError"); - } - if (!element || typeof element !== "object") { - element = element?.toString() ?? ""; - } - return renderToReadableStreamHono(element, options.onError); -}; -var server_default = { - renderToString, - renderToReadableStream, - version -}; -export { - server_default as default, - renderToReadableStream, - renderToString, - version -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/jsx/dom/utils.js b/PBandGraphScaffold/node_modules/hono/dist/jsx/dom/utils.js deleted file mode 100644 index b8efa98..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/jsx/dom/utils.js +++ /dev/null @@ -1,10 +0,0 @@ -// src/jsx/dom/utils.ts -import { DOM_INTERNAL_TAG } from "../constants.js"; -var setInternalTagFlag = (fn) => { - ; - fn[DOM_INTERNAL_TAG] = true; - return fn; -}; -export { - setInternalTagFlag -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/jsx/hooks/index.js b/PBandGraphScaffold/node_modules/hono/dist/jsx/hooks/index.js deleted file mode 100644 index ec842c7..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/jsx/hooks/index.js +++ /dev/null @@ -1,328 +0,0 @@ -// src/jsx/hooks/index.ts -import { DOM_STASH } from "../constants.js"; -import { buildDataStack, update } from "../dom/render.js"; -var STASH_SATE = 0; -var STASH_EFFECT = 1; -var STASH_CALLBACK = 2; -var STASH_MEMO = 3; -var STASH_REF = 4; -var resolvedPromiseValueMap = /* @__PURE__ */ new WeakMap(); -var isDepsChanged = (prevDeps, deps) => !prevDeps || !deps || prevDeps.length !== deps.length || deps.some((dep, i) => dep !== prevDeps[i]); -var viewTransitionState = void 0; -var documentStartViewTransition = (cb) => { - if (document?.startViewTransition) { - return document.startViewTransition(cb); - } else { - cb(); - return { finished: Promise.resolve() }; - } -}; -var updateHook = void 0; -var viewTransitionHook = (context, node, cb) => { - const state = [true, false]; - let lastVC = node.vC; - return documentStartViewTransition(() => { - if (lastVC === node.vC) { - viewTransitionState = state; - cb(context); - viewTransitionState = void 0; - lastVC = node.vC; - } - }).finished.then(() => { - if (state[1] && lastVC === node.vC) { - state[0] = false; - viewTransitionState = state; - cb(context); - viewTransitionState = void 0; - } - }); -}; -var startViewTransition = (callback) => { - updateHook = viewTransitionHook; - try { - callback(); - } finally { - updateHook = void 0; - } -}; -var useViewTransition = () => { - const buildData = buildDataStack.at(-1); - if (!buildData) { - return [false, () => { - }]; - } - if (viewTransitionState) { - viewTransitionState[1] = true; - } - return [!!viewTransitionState?.[0], startViewTransition]; -}; -var pendingStack = []; -var runCallback = (type, callback) => { - let resolve; - const promise = new Promise((r) => resolve = r); - pendingStack.push([type, promise]); - try { - const res = callback(); - if (res instanceof Promise) { - res.then(resolve, resolve); - } else { - resolve(); - } - } finally { - pendingStack.pop(); - } -}; -var startTransition = (callback) => { - runCallback(1, callback); -}; -var startTransitionHook = (callback) => { - runCallback(2, callback); -}; -var useTransition = () => { - const buildData = buildDataStack.at(-1); - if (!buildData) { - return [false, () => { - }]; - } - const [error, setError] = useState(); - const [state, updateState] = useState(); - if (error) { - throw error[0]; - } - const startTransitionLocalHook = useCallback( - (callback) => { - startTransitionHook(() => { - updateState((state2) => !state2); - let res = callback(); - if (res instanceof Promise) { - res = res.catch((e) => { - setError([e]); - }); - } - return res; - }); - }, - [state] - ); - const [context] = buildData; - return [context[0] === 2, startTransitionLocalHook]; -}; -var useDeferredValue = (value, ...rest) => { - const [values, setValues] = useState( - rest.length ? [rest[0], rest[0]] : [value, value] - ); - if (Object.is(values[1], value)) { - return values[1]; - } - pendingStack.push([3, Promise.resolve()]); - updateHook = async (context, _, cb) => { - cb(context); - values[0] = value; - }; - setValues([values[0], value]); - updateHook = void 0; - pendingStack.pop(); - return values[0]; -}; -var useState = (initialState) => { - const resolveInitialState = () => typeof initialState === "function" ? initialState() : initialState; - const buildData = buildDataStack.at(-1); - if (!buildData) { - return [resolveInitialState(), () => { - }]; - } - const [, node] = buildData; - const stateArray = node[DOM_STASH][1][STASH_SATE] ||= []; - const hookIndex = node[DOM_STASH][0]++; - return stateArray[hookIndex] ||= [ - resolveInitialState(), - (newState) => { - const localUpdateHook = updateHook; - const stateData = stateArray[hookIndex]; - if (typeof newState === "function") { - newState = newState(stateData[0]); - } - if (!Object.is(newState, stateData[0])) { - stateData[0] = newState; - if (pendingStack.length) { - const [pendingType, pendingPromise] = pendingStack.at(-1); - Promise.all([ - pendingType === 3 ? node : update([pendingType, false, localUpdateHook], node), - pendingPromise - ]).then(([node2]) => { - if (!node2 || !(pendingType === 2 || pendingType === 3)) { - return; - } - const lastVC = node2.vC; - const addUpdateTask = () => { - setTimeout(() => { - if (lastVC !== node2.vC) { - return; - } - update([pendingType === 3 ? 1 : 0, false, localUpdateHook], node2); - }); - }; - requestAnimationFrame(addUpdateTask); - }); - } else { - update([0, false, localUpdateHook], node); - } - } - } - ]; -}; -var useReducer = (reducer, initialArg, init) => { - const handler = useCallback( - (action) => { - setState((state2) => reducer(state2, action)); - }, - [reducer] - ); - const [state, setState] = useState(() => init ? init(initialArg) : initialArg); - return [state, handler]; -}; -var useEffectCommon = (index, effect, deps) => { - const buildData = buildDataStack.at(-1); - if (!buildData) { - return; - } - const [, node] = buildData; - const effectDepsArray = node[DOM_STASH][1][STASH_EFFECT] ||= []; - const hookIndex = node[DOM_STASH][0]++; - const [prevDeps, , prevCleanup] = effectDepsArray[hookIndex] ||= []; - if (isDepsChanged(prevDeps, deps)) { - if (prevCleanup) { - prevCleanup(); - } - const runner = () => { - data[index] = void 0; - data[2] = effect(); - }; - const data = [deps, void 0, void 0, void 0, void 0]; - data[index] = runner; - effectDepsArray[hookIndex] = data; - } -}; -var useEffect = (effect, deps) => useEffectCommon(3, effect, deps); -var useLayoutEffect = (effect, deps) => useEffectCommon(1, effect, deps); -var useInsertionEffect = (effect, deps) => useEffectCommon(4, effect, deps); -var useCallback = (callback, deps) => { - const buildData = buildDataStack.at(-1); - if (!buildData) { - return callback; - } - const [, node] = buildData; - const callbackArray = node[DOM_STASH][1][STASH_CALLBACK] ||= []; - const hookIndex = node[DOM_STASH][0]++; - const prevDeps = callbackArray[hookIndex]; - if (isDepsChanged(prevDeps?.[1], deps)) { - callbackArray[hookIndex] = [callback, deps]; - } else { - callback = callbackArray[hookIndex][0]; - } - return callback; -}; -var useRef = (initialValue) => { - const buildData = buildDataStack.at(-1); - if (!buildData) { - return { current: initialValue }; - } - const [, node] = buildData; - const refArray = node[DOM_STASH][1][STASH_REF] ||= []; - const hookIndex = node[DOM_STASH][0]++; - return refArray[hookIndex] ||= { current: initialValue }; -}; -var use = (promise) => { - const cachedRes = resolvedPromiseValueMap.get(promise); - if (cachedRes) { - if (cachedRes.length === 2) { - throw cachedRes[1]; - } - return cachedRes[0]; - } - promise.then( - (res) => resolvedPromiseValueMap.set(promise, [res]), - (e) => resolvedPromiseValueMap.set(promise, [void 0, e]) - ); - throw promise; -}; -var useMemo = (factory, deps) => { - const buildData = buildDataStack.at(-1); - if (!buildData) { - return factory(); - } - const [, node] = buildData; - const memoArray = node[DOM_STASH][1][STASH_MEMO] ||= []; - const hookIndex = node[DOM_STASH][0]++; - const prevDeps = memoArray[hookIndex]; - if (isDepsChanged(prevDeps?.[1], deps)) { - memoArray[hookIndex] = [factory(), deps]; - } - return memoArray[hookIndex][0]; -}; -var idCounter = 0; -var useId = () => useMemo(() => `:r${(idCounter++).toString(32)}:`, []); -var useDebugValue = (_value, _formatter) => { -}; -var createRef = () => { - return { current: null }; -}; -var forwardRef = (Component) => { - return (props) => { - const { ref, ...rest } = props; - return Component(rest, ref); - }; -}; -var useImperativeHandle = (ref, createHandle, deps) => { - useEffect(() => { - ref.current = createHandle(); - return () => { - ref.current = null; - }; - }, deps); -}; -var useSyncExternalStore = (subscribe, getSnapshot, getServerSnapshot) => { - const buildData = buildDataStack.at(-1); - if (!buildData) { - if (!getServerSnapshot) { - throw new Error("getServerSnapshot is required for server side rendering"); - } - return getServerSnapshot(); - } - const [serverSnapshotIsUsed] = useState(!!(buildData[0][4] && getServerSnapshot)); - const [state, setState] = useState( - () => serverSnapshotIsUsed ? getServerSnapshot() : getSnapshot() - ); - useEffect(() => { - if (serverSnapshotIsUsed) { - setState(getSnapshot()); - } - return subscribe(() => { - setState(getSnapshot()); - }); - }, []); - return state; -}; -export { - STASH_EFFECT, - createRef, - forwardRef, - startTransition, - startViewTransition, - use, - useCallback, - useDebugValue, - useDeferredValue, - useEffect, - useId, - useImperativeHandle, - useInsertionEffect, - useLayoutEffect, - useMemo, - useReducer, - useRef, - useState, - useSyncExternalStore, - useTransition, - useViewTransition -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/jsx/index.js b/PBandGraphScaffold/node_modules/hono/dist/jsx/index.js deleted file mode 100644 index 49b2df9..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/jsx/index.js +++ /dev/null @@ -1,103 +0,0 @@ -// src/jsx/index.ts -import { Fragment, cloneElement, isValidElement, jsx, memo, reactAPICompatVersion } from "./base.js"; -import { Children } from "./children.js"; -import { ErrorBoundary } from "./components.js"; -import { createContext, useContext } from "./context.js"; -import { useActionState, useOptimistic } from "./dom/hooks/index.js"; -import { - createRef, - forwardRef, - startTransition, - startViewTransition, - use, - useCallback, - useDebugValue, - useDeferredValue, - useEffect, - useId, - useImperativeHandle, - useInsertionEffect, - useLayoutEffect, - useMemo, - useReducer, - useRef, - useState, - useSyncExternalStore, - useTransition, - useViewTransition -} from "./hooks/index.js"; -import { Suspense } from "./streaming.js"; -var jsx_default = { - version: reactAPICompatVersion, - memo, - Fragment, - StrictMode: Fragment, - isValidElement, - createElement: jsx, - cloneElement, - ErrorBoundary, - createContext, - useContext, - useState, - useEffect, - useRef, - useCallback, - useReducer, - useId, - useDebugValue, - use, - startTransition, - useTransition, - useDeferredValue, - startViewTransition, - useViewTransition, - useMemo, - useLayoutEffect, - useInsertionEffect, - createRef, - forwardRef, - useImperativeHandle, - useSyncExternalStore, - useActionState, - useOptimistic, - Suspense, - Children -}; -export { - Children, - ErrorBoundary, - Fragment, - Fragment as StrictMode, - Suspense, - cloneElement, - createContext, - jsx as createElement, - createRef, - jsx_default as default, - forwardRef, - isValidElement, - jsx, - memo, - startTransition, - startViewTransition, - use, - useActionState, - useCallback, - useContext, - useDebugValue, - useDeferredValue, - useEffect, - useId, - useImperativeHandle, - useInsertionEffect, - useLayoutEffect, - useMemo, - useOptimistic, - useReducer, - useRef, - useState, - useSyncExternalStore, - useTransition, - useViewTransition, - reactAPICompatVersion as version -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/jsx/intrinsic-element/common.js b/PBandGraphScaffold/node_modules/hono/dist/jsx/intrinsic-element/common.js deleted file mode 100644 index b287db7..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/jsx/intrinsic-element/common.js +++ /dev/null @@ -1,15 +0,0 @@ -// src/jsx/intrinsic-element/common.ts -var deDupeKeyMap = { - title: [], - script: ["src"], - style: ["data-href"], - link: ["href"], - meta: ["name", "httpEquiv", "charset", "itemProp"] -}; -var domRenderers = {}; -var dataPrecedenceAttr = "data-precedence"; -export { - dataPrecedenceAttr, - deDupeKeyMap, - domRenderers -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/jsx/intrinsic-element/components.js b/PBandGraphScaffold/node_modules/hono/dist/jsx/intrinsic-element/components.js deleted file mode 100644 index 116565f..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/jsx/intrinsic-element/components.js +++ /dev/null @@ -1,153 +0,0 @@ -// src/jsx/intrinsic-element/components.ts -import { raw } from "../../helper/html/index.js"; -import { JSXNode, getNameSpaceContext } from "../base.js"; -import { toArray } from "../children.js"; -import { PERMALINK } from "../constants.js"; -import { useContext } from "../context.js"; -import { dataPrecedenceAttr, deDupeKeyMap } from "./common.js"; -var metaTagMap = /* @__PURE__ */ new WeakMap(); -var insertIntoHead = (tagName, tag, props, precedence) => ({ buffer, context }) => { - if (!buffer) { - return; - } - const map = metaTagMap.get(context) || {}; - metaTagMap.set(context, map); - const tags = map[tagName] ||= []; - let duped = false; - const deDupeKeys = deDupeKeyMap[tagName]; - if (deDupeKeys.length > 0) { - LOOP: for (const [, tagProps] of tags) { - for (const key of deDupeKeys) { - if ((tagProps?.[key] ?? null) === props?.[key]) { - duped = true; - break LOOP; - } - } - } - } - if (duped) { - buffer[0] = buffer[0].replaceAll(tag, ""); - } else if (deDupeKeys.length > 0) { - tags.push([tag, props, precedence]); - } else { - tags.unshift([tag, props, precedence]); - } - if (buffer[0].indexOf("") !== -1) { - let insertTags; - if (precedence === void 0) { - insertTags = tags.map(([tag2]) => tag2); - } else { - const precedences = []; - insertTags = tags.map(([tag2, , precedence2]) => { - let order = precedences.indexOf(precedence2); - if (order === -1) { - precedences.push(precedence2); - order = precedences.length - 1; - } - return [tag2, order]; - }).sort((a, b) => a[1] - b[1]).map(([tag2]) => tag2); - } - insertTags.forEach((tag2) => { - buffer[0] = buffer[0].replaceAll(tag2, ""); - }); - buffer[0] = buffer[0].replace(/(?=<\/head>)/, insertTags.join("")); - } -}; -var returnWithoutSpecialBehavior = (tag, children, props) => raw(new JSXNode(tag, props, toArray(children ?? [])).toString()); -var documentMetadataTag = (tag, children, props, sort) => { - if ("itemProp" in props) { - return returnWithoutSpecialBehavior(tag, children, props); - } - let { precedence, blocking, ...restProps } = props; - precedence = sort ? precedence ?? "" : void 0; - if (sort) { - restProps[dataPrecedenceAttr] = precedence; - } - const string = new JSXNode(tag, restProps, toArray(children || [])).toString(); - if (string instanceof Promise) { - return string.then( - (resString) => raw(string, [ - ...resString.callbacks || [], - insertIntoHead(tag, resString, restProps, precedence) - ]) - ); - } else { - return raw(string, [insertIntoHead(tag, string, restProps, precedence)]); - } -}; -var title = ({ children, ...props }) => { - const nameSpaceContext = getNameSpaceContext(); - if (nameSpaceContext) { - const context = useContext(nameSpaceContext); - if (context === "svg" || context === "head") { - return new JSXNode( - "title", - props, - toArray(children ?? []) - ); - } - } - return documentMetadataTag("title", children, props, false); -}; -var script = ({ - children, - ...props -}) => { - const nameSpaceContext = getNameSpaceContext(); - if (["src", "async"].some((k) => !props[k]) || nameSpaceContext && useContext(nameSpaceContext) === "head") { - return returnWithoutSpecialBehavior("script", children, props); - } - return documentMetadataTag("script", children, props, false); -}; -var style = ({ - children, - ...props -}) => { - if (!["href", "precedence"].every((k) => k in props)) { - return returnWithoutSpecialBehavior("style", children, props); - } - props["data-href"] = props.href; - delete props.href; - return documentMetadataTag("style", children, props, true); -}; -var link = ({ children, ...props }) => { - if (["onLoad", "onError"].some((k) => k in props) || props.rel === "stylesheet" && (!("precedence" in props) || "disabled" in props)) { - return returnWithoutSpecialBehavior("link", children, props); - } - return documentMetadataTag("link", children, props, "precedence" in props); -}; -var meta = ({ children, ...props }) => { - const nameSpaceContext = getNameSpaceContext(); - if (nameSpaceContext && useContext(nameSpaceContext) === "head") { - return returnWithoutSpecialBehavior("meta", children, props); - } - return documentMetadataTag("meta", children, props, false); -}; -var newJSXNode = (tag, { children, ...props }) => ( - // eslint-disable-next-line @typescript-eslint/no-explicit-any - new JSXNode(tag, props, toArray(children ?? [])) -); -var form = (props) => { - if (typeof props.action === "function") { - props.action = PERMALINK in props.action ? props.action[PERMALINK] : void 0; - } - return newJSXNode("form", props); -}; -var formActionableElement = (tag, props) => { - if (typeof props.formAction === "function") { - props.formAction = PERMALINK in props.formAction ? props.formAction[PERMALINK] : void 0; - } - return newJSXNode(tag, props); -}; -var input = (props) => formActionableElement("input", props); -var button = (props) => formActionableElement("button", props); -export { - button, - form, - input, - link, - meta, - script, - style, - title -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/jsx/intrinsic-elements.js b/PBandGraphScaffold/node_modules/hono/dist/jsx/intrinsic-elements.js deleted file mode 100644 index e69de29..0000000 diff --git a/PBandGraphScaffold/node_modules/hono/dist/jsx/jsx-dev-runtime.js b/PBandGraphScaffold/node_modules/hono/dist/jsx/jsx-dev-runtime.js deleted file mode 100644 index 2a68920..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/jsx/jsx-dev-runtime.js +++ /dev/null @@ -1,18 +0,0 @@ -// src/jsx/jsx-dev-runtime.ts -import { jsxFn } from "./base.js"; -import { Fragment } from "./base.js"; -function jsxDEV(tag, props, key) { - let node; - if (!props || !("children" in props)) { - node = jsxFn(tag, props, []); - } else { - const children = props.children; - node = Array.isArray(children) ? jsxFn(tag, props, children) : jsxFn(tag, props, [children]); - } - node.key = key; - return node; -} -export { - Fragment, - jsxDEV -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/jsx/jsx-runtime.js b/PBandGraphScaffold/node_modules/hono/dist/jsx/jsx-runtime.js deleted file mode 100644 index 7ad5df3..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/jsx/jsx-runtime.js +++ /dev/null @@ -1,41 +0,0 @@ -// src/jsx/jsx-runtime.ts -import { jsxDEV, Fragment } from "./jsx-dev-runtime.js"; -import { jsxDEV as jsxDEV2 } from "./jsx-dev-runtime.js"; -import { html, raw } from "../helper/html/index.js"; -import { escapeToBuffer, stringBufferToString } from "../utils/html.js"; -import { styleObjectForEach } from "./utils.js"; -var jsxAttr = (key, v) => { - const buffer = [`${key}="`]; - if (key === "style" && typeof v === "object") { - let styleStr = ""; - styleObjectForEach(v, (property, value) => { - if (value != null) { - styleStr += `${styleStr ? ";" : ""}${property}:${value}`; - } - }); - escapeToBuffer(styleStr, buffer); - buffer[0] += '"'; - } else if (typeof v === "string") { - escapeToBuffer(v, buffer); - buffer[0] += '"'; - } else if (v === null || v === void 0) { - return raw(""); - } else if (typeof v === "number" || v.isEscaped) { - buffer[0] += `${v}"`; - } else if (v instanceof Promise) { - buffer.unshift('"', v); - } else { - escapeToBuffer(v.toString(), buffer); - buffer[0] += '"'; - } - return buffer.length === 1 ? raw(buffer[0]) : stringBufferToString(buffer, void 0); -}; -var jsxEscape = (value) => value; -export { - Fragment, - jsxDEV as jsx, - jsxAttr, - jsxEscape, - html as jsxTemplate, - jsxDEV2 as jsxs -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/jsx/streaming.js b/PBandGraphScaffold/node_modules/hono/dist/jsx/streaming.js deleted file mode 100644 index ea64dc0..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/jsx/streaming.js +++ /dev/null @@ -1,143 +0,0 @@ -// src/jsx/streaming.ts -import { raw } from "../helper/html/index.js"; -import { HtmlEscapedCallbackPhase, resolveCallback } from "../utils/html.js"; -import { JSXNode } from "./base.js"; -import { childrenToString } from "./components.js"; -import { DOM_RENDERER, DOM_STASH } from "./constants.js"; -import { createContext, useContext } from "./context.js"; -import { Suspense as SuspenseDomRenderer } from "./dom/components.js"; -import { buildDataStack } from "./dom/render.js"; -var StreamingContext = createContext(null); -var suspenseCounter = 0; -var Suspense = async ({ - children, - fallback -}) => { - if (!Array.isArray(children)) { - children = [children]; - } - const nonce = useContext(StreamingContext)?.scriptNonce; - let resArray = []; - const stackNode = { [DOM_STASH]: [0, []] }; - const popNodeStack = (value) => { - buildDataStack.pop(); - return value; - }; - try { - stackNode[DOM_STASH][0] = 0; - buildDataStack.push([[], stackNode]); - resArray = children.map( - (c) => c == null || typeof c === "boolean" ? "" : c.toString() - ); - } catch (e) { - if (e instanceof Promise) { - resArray = [ - e.then(() => { - stackNode[DOM_STASH][0] = 0; - buildDataStack.push([[], stackNode]); - return childrenToString(children).then(popNodeStack); - }) - ]; - } else { - throw e; - } - } finally { - popNodeStack(); - } - if (resArray.some((res) => res instanceof Promise)) { - const index = suspenseCounter++; - const fallbackStr = await fallback.toString(); - return raw(`${fallbackStr}`, [ - ...fallbackStr.callbacks || [], - ({ phase, buffer, context }) => { - if (phase === HtmlEscapedCallbackPhase.BeforeStream) { - return; - } - return Promise.all(resArray).then(async (htmlArray) => { - htmlArray = htmlArray.flat(); - const content = htmlArray.join(""); - if (buffer) { - buffer[0] = buffer[0].replace( - new RegExp(`.*?`), - content - ); - } - let html = buffer ? "" : ` -((d,c,n) => { -c=d.currentScript.previousSibling -d=d.getElementById('H:${index}') -if(!d)return -do{n=d.nextSibling;n.remove()}while(n.nodeType!=8||n.nodeValue!='/$') -d.replaceWith(c.content) -})(document) -`; - const callbacks = htmlArray.map((html2) => html2.callbacks || []).flat(); - if (!callbacks.length) { - return html; - } - if (phase === HtmlEscapedCallbackPhase.Stream) { - html = await resolveCallback(html, HtmlEscapedCallbackPhase.BeforeStream, true, context); - } - return raw(html, callbacks); - }); - } - ]); - } else { - return raw(resArray.join("")); - } -}; -Suspense[DOM_RENDERER] = SuspenseDomRenderer; -var textEncoder = new TextEncoder(); -var renderToReadableStream = (content, onError = console.trace) => { - const reader = new ReadableStream({ - async start(controller) { - try { - if (content instanceof JSXNode) { - content = content.toString(); - } - const context = typeof content === "object" ? content : {}; - const resolved = await resolveCallback( - content, - HtmlEscapedCallbackPhase.BeforeStream, - true, - context - ); - controller.enqueue(textEncoder.encode(resolved)); - let resolvedCount = 0; - const callbacks = []; - const then = (promise) => { - callbacks.push( - promise.catch((err) => { - console.log(err); - onError(err); - return ""; - }).then(async (res) => { - res = await resolveCallback( - res, - HtmlEscapedCallbackPhase.BeforeStream, - true, - context - ); - res.callbacks?.map((c) => c({ phase: HtmlEscapedCallbackPhase.Stream, context })).filter(Boolean).forEach(then); - resolvedCount++; - controller.enqueue(textEncoder.encode(res)); - }) - ); - }; - resolved.callbacks?.map((c) => c({ phase: HtmlEscapedCallbackPhase.Stream, context })).filter(Boolean).forEach(then); - while (resolvedCount !== callbacks.length) { - await Promise.all(callbacks); - } - } catch (e) { - onError(e); - } - controller.close(); - } - }); - return reader; -}; -export { - StreamingContext, - Suspense, - renderToReadableStream -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/jsx/types.js b/PBandGraphScaffold/node_modules/hono/dist/jsx/types.js deleted file mode 100644 index e69de29..0000000 diff --git a/PBandGraphScaffold/node_modules/hono/dist/jsx/utils.js b/PBandGraphScaffold/node_modules/hono/dist/jsx/utils.js deleted file mode 100644 index 7f3a219..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/jsx/utils.js +++ /dev/null @@ -1,27 +0,0 @@ -// src/jsx/utils.ts -var normalizeElementKeyMap = /* @__PURE__ */ new Map([ - ["className", "class"], - ["htmlFor", "for"], - ["crossOrigin", "crossorigin"], - ["httpEquiv", "http-equiv"], - ["itemProp", "itemprop"], - ["fetchPriority", "fetchpriority"], - ["noModule", "nomodule"], - ["formAction", "formaction"] -]); -var normalizeIntrinsicElementKey = (key) => normalizeElementKeyMap.get(key) || key; -var styleObjectForEach = (style, fn) => { - for (const [k, v] of Object.entries(style)) { - const key = k[0] === "-" || !/[A-Z]/.test(k) ? k : k.replace(/[A-Z]/g, (m) => `-${m.toLowerCase()}`); - fn( - key, - v == null ? null : typeof v === "number" ? !key.match( - /^(?:a|border-im|column(?:-c|s)|flex(?:$|-[^b])|grid-(?:ar|[^a])|font-w|li|or|sca|st|ta|wido|z)|ty$/ - ) ? `${v}px` : `${v}` : v - ); - } -}; -export { - normalizeIntrinsicElementKey, - styleObjectForEach -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/middleware/basic-auth/index.js b/PBandGraphScaffold/node_modules/hono/dist/middleware/basic-auth/index.js deleted file mode 100644 index fc54a53..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/middleware/basic-auth/index.js +++ /dev/null @@ -1,60 +0,0 @@ -// src/middleware/basic-auth/index.ts -import { HTTPException } from "../../http-exception.js"; -import { auth } from "../../utils/basic-auth.js"; -import { timingSafeEqual } from "../../utils/buffer.js"; -var basicAuth = (options, ...users) => { - const usernamePasswordInOptions = "username" in options && "password" in options; - const verifyUserInOptions = "verifyUser" in options; - if (!(usernamePasswordInOptions || verifyUserInOptions)) { - throw new Error( - 'basic auth middleware requires options for "username and password" or "verifyUser"' - ); - } - if (!options.realm) { - options.realm = "Secure Area"; - } - if (!options.invalidUserMessage) { - options.invalidUserMessage = "Unauthorized"; - } - if (usernamePasswordInOptions) { - users.unshift({ username: options.username, password: options.password }); - } - return async function basicAuth2(ctx, next) { - const requestUser = auth(ctx.req.raw); - if (requestUser) { - if (verifyUserInOptions) { - if (await options.verifyUser(requestUser.username, requestUser.password, ctx)) { - await next(); - return; - } - } else { - for (const user of users) { - const [usernameEqual, passwordEqual] = await Promise.all([ - timingSafeEqual(user.username, requestUser.username, options.hashFunction), - timingSafeEqual(user.password, requestUser.password, options.hashFunction) - ]); - if (usernameEqual && passwordEqual) { - await next(); - return; - } - } - } - } - const status = 401; - const headers = { - "WWW-Authenticate": 'Basic realm="' + options.realm?.replace(/"/g, '\\"') + '"' - }; - const responseMessage = typeof options.invalidUserMessage === "function" ? await options.invalidUserMessage(ctx) : options.invalidUserMessage; - const res = typeof responseMessage === "string" ? new Response(responseMessage, { status, headers }) : new Response(JSON.stringify(responseMessage), { - status, - headers: { - ...headers, - "content-type": "application/json" - } - }); - throw new HTTPException(status, { res }); - }; -}; -export { - basicAuth -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/middleware/bearer-auth/index.js b/PBandGraphScaffold/node_modules/hono/dist/middleware/bearer-auth/index.js deleted file mode 100644 index f082899..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/middleware/bearer-auth/index.js +++ /dev/null @@ -1,83 +0,0 @@ -// src/middleware/bearer-auth/index.ts -import { HTTPException } from "../../http-exception.js"; -import { timingSafeEqual } from "../../utils/buffer.js"; -var TOKEN_STRINGS = "[A-Za-z0-9._~+/-]+=*"; -var PREFIX = "Bearer"; -var HEADER = "Authorization"; -var bearerAuth = (options) => { - if (!("token" in options || "verifyToken" in options)) { - throw new Error('bearer auth middleware requires options for "token"'); - } - if (!options.realm) { - options.realm = ""; - } - if (options.prefix === void 0) { - options.prefix = PREFIX; - } - const realm = options.realm?.replace(/"/g, '\\"'); - const prefixRegexStr = options.prefix === "" ? "" : `${options.prefix} +`; - const regexp = new RegExp(`^${prefixRegexStr}(${TOKEN_STRINGS}) *$`); - const wwwAuthenticatePrefix = options.prefix === "" ? "" : `${options.prefix} `; - const throwHTTPException = async (c, status, wwwAuthenticateHeader, messageOption) => { - const wwwAuthenticateHeaderValue = typeof wwwAuthenticateHeader === "function" ? await wwwAuthenticateHeader(c) : wwwAuthenticateHeader; - const headers = { - "WWW-Authenticate": typeof wwwAuthenticateHeaderValue === "string" ? wwwAuthenticateHeaderValue : `${wwwAuthenticatePrefix}${Object.entries(wwwAuthenticateHeaderValue).map(([key, value]) => `${key}="${value}"`).join(",")}` - }; - const responseMessage = typeof messageOption === "function" ? await messageOption(c) : messageOption; - const res = typeof responseMessage === "string" ? new Response(responseMessage, { status, headers }) : new Response(JSON.stringify(responseMessage), { - status, - headers: { - ...headers, - "content-type": "application/json" - } - }); - throw new HTTPException(status, { res }); - }; - return async function bearerAuth2(c, next) { - const headerToken = c.req.header(options.headerName || HEADER); - if (!headerToken) { - await throwHTTPException( - c, - 401, - options.noAuthenticationHeader?.wwwAuthenticateHeader || `${wwwAuthenticatePrefix}realm="${realm}"`, - options.noAuthenticationHeader?.message || options.noAuthenticationHeaderMessage || "Unauthorized" - ); - } else { - const match = regexp.exec(headerToken); - if (!match) { - await throwHTTPException( - c, - 400, - options.invalidAuthenticationHeader?.wwwAuthenticateHeader || `${wwwAuthenticatePrefix}error="invalid_request"`, - options.invalidAuthenticationHeader?.message || options.invalidAuthenticationHeaderMessage || "Bad Request" - ); - } else { - let equal = false; - if ("verifyToken" in options) { - equal = await options.verifyToken(match[1], c); - } else if (typeof options.token === "string") { - equal = await timingSafeEqual(options.token, match[1], options.hashFunction); - } else if (Array.isArray(options.token) && options.token.length > 0) { - for (const token of options.token) { - if (await timingSafeEqual(token, match[1], options.hashFunction)) { - equal = true; - break; - } - } - } - if (!equal) { - await throwHTTPException( - c, - 401, - options.invalidToken?.wwwAuthenticateHeader || `${wwwAuthenticatePrefix}error="invalid_token"`, - options.invalidToken?.message || options.invalidTokenMessage || "Unauthorized" - ); - } - } - } - await next(); - }; -}; -export { - bearerAuth -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/middleware/body-limit/index.js b/PBandGraphScaffold/node_modules/hono/dist/middleware/body-limit/index.js deleted file mode 100644 index 01de755..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/middleware/body-limit/index.js +++ /dev/null @@ -1,62 +0,0 @@ -// src/middleware/body-limit/index.ts -import { HTTPException } from "../../http-exception.js"; -var ERROR_MESSAGE = "Payload Too Large"; -var BodyLimitError = class extends Error { - constructor(message) { - super(message); - this.name = "BodyLimitError"; - } -}; -var bodyLimit = (options) => { - const onError = options.onError || (() => { - const res = new Response(ERROR_MESSAGE, { - status: 413 - }); - throw new HTTPException(413, { res }); - }); - const maxSize = options.maxSize; - return async function bodyLimit2(c, next) { - if (!c.req.raw.body) { - return next(); - } - const hasTransferEncoding = c.req.raw.headers.has("transfer-encoding"); - const hasContentLength = c.req.raw.headers.has("content-length"); - if (hasTransferEncoding && hasContentLength) { - } - if (hasContentLength && !hasTransferEncoding) { - const contentLength = parseInt(c.req.raw.headers.get("content-length") || "0", 10); - return contentLength > maxSize ? onError(c) : next(); - } - let size = 0; - const rawReader = c.req.raw.body.getReader(); - const reader = new ReadableStream({ - async start(controller) { - try { - for (; ; ) { - const { done, value } = await rawReader.read(); - if (done) { - break; - } - size += value.length; - if (size > maxSize) { - controller.error(new BodyLimitError(ERROR_MESSAGE)); - break; - } - controller.enqueue(value); - } - } finally { - controller.close(); - } - } - }); - const requestInit = { body: reader, duplex: "half" }; - c.req.raw = new Request(c.req.raw, requestInit); - await next(); - if (c.error instanceof BodyLimitError) { - c.res = await onError(c); - } - }; -}; -export { - bodyLimit -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/middleware/cache/index.js b/PBandGraphScaffold/node_modules/hono/dist/middleware/cache/index.js deleted file mode 100644 index 3bb7bee..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/middleware/cache/index.js +++ /dev/null @@ -1,79 +0,0 @@ -// src/middleware/cache/index.ts -var defaultCacheableStatusCodes = [200]; -var shouldSkipCache = (res) => { - const vary = res.headers.get("Vary"); - return vary && vary.includes("*"); -}; -var cache = (options) => { - if (!globalThis.caches) { - console.log("Cache Middleware is not enabled because caches is not defined."); - return async (_c, next) => await next(); - } - if (options.wait === void 0) { - options.wait = false; - } - const cacheControlDirectives = options.cacheControl?.split(",").map((directive) => directive.toLowerCase()); - const varyDirectives = Array.isArray(options.vary) ? options.vary : options.vary?.split(",").map((directive) => directive.trim()); - if (options.vary?.includes("*")) { - throw new Error( - 'Middleware vary configuration cannot include "*", as it disallows effective caching.' - ); - } - const cacheableStatusCodes = new Set( - options.cacheableStatusCodes ?? defaultCacheableStatusCodes - ); - const addHeader = (c) => { - if (cacheControlDirectives) { - const existingDirectives = c.res.headers.get("Cache-Control")?.split(",").map((d) => d.trim().split("=", 1)[0]) ?? []; - for (const directive of cacheControlDirectives) { - let [name, value] = directive.trim().split("=", 2); - name = name.toLowerCase(); - if (!existingDirectives.includes(name)) { - c.header("Cache-Control", `${name}${value ? `=${value}` : ""}`, { append: true }); - } - } - } - if (varyDirectives) { - const existingDirectives = c.res.headers.get("Vary")?.split(",").map((d) => d.trim()) ?? []; - const vary = Array.from( - new Set( - [...existingDirectives, ...varyDirectives].map((directive) => directive.toLowerCase()) - ) - ).sort(); - if (vary.includes("*")) { - c.header("Vary", "*"); - } else { - c.header("Vary", vary.join(", ")); - } - } - }; - return async function cache2(c, next) { - let key = c.req.url; - if (options.keyGenerator) { - key = await options.keyGenerator(c); - } - const cacheName = typeof options.cacheName === "function" ? await options.cacheName(c) : options.cacheName; - const cache3 = await caches.open(cacheName); - const response = await cache3.match(key); - if (response) { - return new Response(response.body, response); - } - await next(); - if (!cacheableStatusCodes.has(c.res.status)) { - return; - } - addHeader(c); - if (shouldSkipCache(c.res)) { - return; - } - const res = c.res.clone(); - if (options.wait) { - await cache3.put(key, res); - } else { - c.executionCtx.waitUntil(cache3.put(key, res)); - } - }; -}; -export { - cache -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/middleware/combine/index.js b/PBandGraphScaffold/node_modules/hono/dist/middleware/combine/index.js deleted file mode 100644 index c16d91f..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/middleware/combine/index.js +++ /dev/null @@ -1,77 +0,0 @@ -// src/middleware/combine/index.ts -import { compose } from "../../compose.js"; -import { METHOD_NAME_ALL } from "../../router.js"; -import { TrieRouter } from "../../router/trie-router/index.js"; -var some = (...middleware) => { - return async function some2(c, next) { - let isNextCalled = false; - const wrappedNext = () => { - isNextCalled = true; - return next(); - }; - let lastError; - for (const handler of middleware) { - try { - const result = await handler(c, wrappedNext); - if (result === true && !c.finalized) { - await wrappedNext(); - } else if (result === false) { - lastError = new Error("No successful middleware found"); - continue; - } - lastError = void 0; - break; - } catch (error) { - lastError = error; - if (isNextCalled) { - break; - } - } - } - if (lastError) { - throw lastError; - } - }; -}; -var every = (...middleware) => { - return async function every2(c, next) { - const currentRouteIndex = c.req.routeIndex; - await compose( - middleware.map((m) => [ - [ - async (c2, next2) => { - c2.req.routeIndex = currentRouteIndex; - const res = await m(c2, next2); - if (res === false) { - throw new Error("Unmet condition"); - } - return res; - } - ] - ]) - )(c, next); - }; -}; -var except = (condition, ...middleware) => { - let router = void 0; - const conditions = (Array.isArray(condition) ? condition : [condition]).map((condition2) => { - if (typeof condition2 === "string") { - router ||= new TrieRouter(); - router.add(METHOD_NAME_ALL, condition2, true); - } else { - return condition2; - } - }).filter(Boolean); - if (router) { - conditions.unshift((c) => !!router?.match(METHOD_NAME_ALL, c.req.path)?.[0]?.[0]?.[0]); - } - const handler = some((c) => conditions.some((cond) => cond(c)), every(...middleware)); - return async function except2(c, next) { - await handler(c, next); - }; -}; -export { - every, - except, - some -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/middleware/compress/index.js b/PBandGraphScaffold/node_modules/hono/dist/middleware/compress/index.js deleted file mode 100644 index fcc3ae6..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/middleware/compress/index.js +++ /dev/null @@ -1,39 +0,0 @@ -// src/middleware/compress/index.ts -import { COMPRESSIBLE_CONTENT_TYPE_REGEX } from "../../utils/compress.js"; -var ENCODING_TYPES = ["gzip", "deflate"]; -var cacheControlNoTransformRegExp = /(?:^|,)\s*?no-transform\s*?(?:,|$)/i; -var compress = (options) => { - const threshold = options?.threshold ?? 1024; - return async function compress2(ctx, next) { - await next(); - const contentLength = ctx.res.headers.get("Content-Length"); - if (ctx.res.headers.has("Content-Encoding") || // already encoded - ctx.res.headers.has("Transfer-Encoding") || // already encoded or chunked - ctx.req.method === "HEAD" || // HEAD request - contentLength && Number(contentLength) < threshold || // content-length below threshold - !shouldCompress(ctx.res) || // not compressible type - !shouldTransform(ctx.res)) { - return; - } - const accepted = ctx.req.header("Accept-Encoding"); - const encoding = options?.encoding ?? ENCODING_TYPES.find((encoding2) => accepted?.includes(encoding2)); - if (!encoding || !ctx.res.body) { - return; - } - const stream = new CompressionStream(encoding); - ctx.res = new Response(ctx.res.body.pipeThrough(stream), ctx.res); - ctx.res.headers.delete("Content-Length"); - ctx.res.headers.set("Content-Encoding", encoding); - }; -}; -var shouldCompress = (res) => { - const type = res.headers.get("Content-Type"); - return type && COMPRESSIBLE_CONTENT_TYPE_REGEX.test(type); -}; -var shouldTransform = (res) => { - const cacheControl = res.headers.get("Cache-Control"); - return !cacheControl || !cacheControlNoTransformRegExp.test(cacheControl); -}; -export { - compress -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/middleware/context-storage/index.js b/PBandGraphScaffold/node_modules/hono/dist/middleware/context-storage/index.js deleted file mode 100644 index a1bd4c6..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/middleware/context-storage/index.js +++ /dev/null @@ -1,23 +0,0 @@ -// src/middleware/context-storage/index.ts -import { AsyncLocalStorage } from "node:async_hooks"; -var asyncLocalStorage = new AsyncLocalStorage(); -var contextStorage = () => { - return async function contextStorage2(c, next) { - await asyncLocalStorage.run(c, next); - }; -}; -var tryGetContext = () => { - return asyncLocalStorage.getStore(); -}; -var getContext = () => { - const context = tryGetContext(); - if (!context) { - throw new Error("Context is not available"); - } - return context; -}; -export { - contextStorage, - getContext, - tryGetContext -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/middleware/cors/index.js b/PBandGraphScaffold/node_modules/hono/dist/middleware/cors/index.js deleted file mode 100644 index 9169e5a..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/middleware/cors/index.js +++ /dev/null @@ -1,87 +0,0 @@ -// src/middleware/cors/index.ts -var cors = (options) => { - const defaults = { - origin: "*", - allowMethods: ["GET", "HEAD", "PUT", "POST", "DELETE", "PATCH"], - allowHeaders: [], - exposeHeaders: [] - }; - const opts = { - ...defaults, - ...options - }; - const findAllowOrigin = ((optsOrigin) => { - if (typeof optsOrigin === "string") { - if (optsOrigin === "*") { - return () => optsOrigin; - } else { - return (origin) => optsOrigin === origin ? origin : null; - } - } else if (typeof optsOrigin === "function") { - return optsOrigin; - } else { - return (origin) => optsOrigin.includes(origin) ? origin : null; - } - })(opts.origin); - const findAllowMethods = ((optsAllowMethods) => { - if (typeof optsAllowMethods === "function") { - return optsAllowMethods; - } else if (Array.isArray(optsAllowMethods)) { - return () => optsAllowMethods; - } else { - return () => []; - } - })(opts.allowMethods); - return async function cors2(c, next) { - function set(key, value) { - c.res.headers.set(key, value); - } - const allowOrigin = await findAllowOrigin(c.req.header("origin") || "", c); - if (allowOrigin) { - set("Access-Control-Allow-Origin", allowOrigin); - } - if (opts.credentials) { - set("Access-Control-Allow-Credentials", "true"); - } - if (opts.exposeHeaders?.length) { - set("Access-Control-Expose-Headers", opts.exposeHeaders.join(",")); - } - if (c.req.method === "OPTIONS") { - if (opts.origin !== "*") { - set("Vary", "Origin"); - } - if (opts.maxAge != null) { - set("Access-Control-Max-Age", opts.maxAge.toString()); - } - const allowMethods = await findAllowMethods(c.req.header("origin") || "", c); - if (allowMethods.length) { - set("Access-Control-Allow-Methods", allowMethods.join(",")); - } - let headers = opts.allowHeaders; - if (!headers?.length) { - const requestHeaders = c.req.header("Access-Control-Request-Headers"); - if (requestHeaders) { - headers = requestHeaders.split(/\s*,\s*/); - } - } - if (headers?.length) { - set("Access-Control-Allow-Headers", headers.join(",")); - c.res.headers.append("Vary", "Access-Control-Request-Headers"); - } - c.res.headers.delete("Content-Length"); - c.res.headers.delete("Content-Type"); - return new Response(null, { - headers: c.res.headers, - status: 204, - statusText: "No Content" - }); - } - await next(); - if (opts.origin !== "*") { - c.header("Vary", "Origin", { append: true }); - } - }; -}; -export { - cors -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/middleware/csrf/index.js b/PBandGraphScaffold/node_modules/hono/dist/middleware/csrf/index.js deleted file mode 100644 index 3df5b4e..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/middleware/csrf/index.js +++ /dev/null @@ -1,55 +0,0 @@ -// src/middleware/csrf/index.ts -import { HTTPException } from "../../http-exception.js"; -var secFetchSiteValues = ["same-origin", "same-site", "none", "cross-site"]; -var isSecFetchSite = (value) => secFetchSiteValues.includes(value); -var isSafeMethodRe = /^(GET|HEAD)$/; -var isRequestedByFormElementRe = /^\b(application\/x-www-form-urlencoded|multipart\/form-data|text\/plain)\b/i; -var csrf = (options) => { - const originHandler = ((optsOrigin) => { - if (!optsOrigin) { - return (origin, c) => origin === new URL(c.req.url).origin; - } else if (typeof optsOrigin === "string") { - return (origin) => origin === optsOrigin; - } else if (typeof optsOrigin === "function") { - return optsOrigin; - } else { - return (origin) => optsOrigin.includes(origin); - } - })(options?.origin); - const isAllowedOrigin = async (origin, c) => { - if (origin === void 0) { - return false; - } - return await originHandler(origin, c); - }; - const secFetchSiteHandler = ((optsSecFetchSite) => { - if (!optsSecFetchSite) { - return (secFetchSite) => secFetchSite === "same-origin"; - } else if (typeof optsSecFetchSite === "string") { - return (secFetchSite) => secFetchSite === optsSecFetchSite; - } else if (typeof optsSecFetchSite === "function") { - return optsSecFetchSite; - } else { - return (secFetchSite) => optsSecFetchSite.includes(secFetchSite); - } - })(options?.secFetchSite); - const isAllowedSecFetchSite = async (secFetchSite, c) => { - if (secFetchSite === void 0) { - return false; - } - if (!isSecFetchSite(secFetchSite)) { - return false; - } - return await secFetchSiteHandler(secFetchSite, c); - }; - return async function csrf2(c, next) { - if (!isSafeMethodRe.test(c.req.method) && isRequestedByFormElementRe.test(c.req.header("content-type") || "text/plain") && !await isAllowedSecFetchSite(c.req.header("sec-fetch-site"), c) && !await isAllowedOrigin(c.req.header("origin"), c)) { - const res = new Response("Forbidden", { status: 403 }); - throw new HTTPException(403, { res }); - } - await next(); - }; -}; -export { - csrf -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/middleware/etag/digest.js b/PBandGraphScaffold/node_modules/hono/dist/middleware/etag/digest.js deleted file mode 100644 index 31f78bf..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/middleware/etag/digest.js +++ /dev/null @@ -1,33 +0,0 @@ -// src/middleware/etag/digest.ts -var mergeBuffers = (buffer1, buffer2) => { - if (!buffer1) { - return buffer2; - } - const merged = new Uint8Array( - new ArrayBuffer(buffer1.byteLength + buffer2.byteLength) - ); - merged.set(new Uint8Array(buffer1), 0); - merged.set(buffer2, buffer1.byteLength); - return merged; -}; -var generateDigest = async (stream, generator) => { - if (!stream) { - return null; - } - let result = void 0; - const reader = stream.getReader(); - for (; ; ) { - const { value, done } = await reader.read(); - if (done) { - break; - } - result = await generator(mergeBuffers(result, value)); - } - if (!result) { - return null; - } - return Array.prototype.map.call(new Uint8Array(result), (x) => x.toString(16).padStart(2, "0")).join(""); -}; -export { - generateDigest -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/middleware/etag/index.js b/PBandGraphScaffold/node_modules/hono/dist/middleware/etag/index.js deleted file mode 100644 index 2ad0110..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/middleware/etag/index.js +++ /dev/null @@ -1,72 +0,0 @@ -// src/middleware/etag/index.ts -import { generateDigest } from "./digest.js"; -var RETAINED_304_HEADERS = [ - "cache-control", - "content-location", - "date", - "etag", - "expires", - "vary" -]; -var stripWeak = (tag) => tag.replace(/^W\//, ""); -function etagMatches(etag2, ifNoneMatch) { - return ifNoneMatch != null && ifNoneMatch.split(/,\s*/).some((t) => stripWeak(t) === stripWeak(etag2)); -} -function initializeGenerator(generator) { - if (!generator) { - if (crypto && crypto.subtle) { - generator = (body) => crypto.subtle.digest( - { - name: "SHA-1" - }, - body - ); - } - } - return generator; -} -var etag = (options) => { - const retainedHeaders = options?.retainedHeaders ?? RETAINED_304_HEADERS; - const weak = options?.weak ?? false; - const generator = initializeGenerator(options?.generateDigest); - return async function etag2(c, next) { - const ifNoneMatch = c.req.header("If-None-Match") ?? null; - await next(); - const res = c.res; - let etag3 = res.headers.get("ETag"); - if (!etag3) { - if (!generator) { - return; - } - const hash = await generateDigest( - // This type casing avoids the type error for `deno publish` - res.clone().body, - generator - ); - if (hash === null) { - return; - } - etag3 = weak ? `W/"${hash}"` : `"${hash}"`; - } - if (etagMatches(etag3, ifNoneMatch)) { - c.res = new Response(null, { - status: 304, - statusText: "Not Modified", - headers: { - ETag: etag3 - } - }); - c.res.headers.forEach((_, key) => { - if (retainedHeaders.indexOf(key.toLowerCase()) === -1) { - c.res.headers.delete(key); - } - }); - } else { - c.res.headers.set("ETag", etag3); - } - }; -}; -export { - RETAINED_304_HEADERS, - etag -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/middleware/ip-restriction/index.js b/PBandGraphScaffold/node_modules/hono/dist/middleware/ip-restriction/index.js deleted file mode 100644 index b4b390e..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/middleware/ip-restriction/index.js +++ /dev/null @@ -1,107 +0,0 @@ -// src/middleware/ip-restriction/index.ts -import { HTTPException } from "../../http-exception.js"; -import { - convertIPv4ToBinary, - convertIPv6BinaryToString, - convertIPv6ToBinary, - distinctRemoteAddr -} from "../../utils/ipaddr.js"; -var IS_CIDR_NOTATION_REGEX = /\/[0-9]{0,3}$/; -var buildMatcher = (rules) => { - const functionRules = []; - const staticRules = /* @__PURE__ */ new Set(); - const cidrRules = []; - for (let rule of rules) { - if (rule === "*") { - return () => true; - } else if (typeof rule === "function") { - functionRules.push(rule); - } else { - if (IS_CIDR_NOTATION_REGEX.test(rule)) { - const separatedRule = rule.split("/"); - const addrStr = separatedRule[0]; - const type2 = distinctRemoteAddr(addrStr); - if (type2 === void 0) { - throw new TypeError(`Invalid rule: ${rule}`); - } - const isIPv4 = type2 === "IPv4"; - const prefix = parseInt(separatedRule[1]); - if (isIPv4 ? prefix === 32 : prefix === 128) { - rule = addrStr; - } else { - const addr = (isIPv4 ? convertIPv4ToBinary : convertIPv6ToBinary)(addrStr); - const mask = (1n << BigInt(prefix)) - 1n << BigInt((isIPv4 ? 32 : 128) - prefix); - cidrRules.push([isIPv4, addr & mask, mask]); - continue; - } - } - const type = distinctRemoteAddr(rule); - if (type === void 0) { - throw new TypeError(`Invalid rule: ${rule}`); - } - staticRules.add( - type === "IPv4" ? rule : convertIPv6BinaryToString(convertIPv6ToBinary(rule)) - // normalize IPv6 address (e.g. 0000:0000:0000:0000:0000:0000:0000:0001 => ::1) - ); - } - } - return (remote) => { - if (staticRules.has(remote.addr)) { - return true; - } - for (const [isIPv4, addr, mask] of cidrRules) { - if (isIPv4 !== remote.isIPv4) { - continue; - } - const remoteAddr = remote.binaryAddr ||= (isIPv4 ? convertIPv4ToBinary : convertIPv6ToBinary)(remote.addr); - if ((remoteAddr & mask) === addr) { - return true; - } - } - for (const rule of functionRules) { - if (rule({ addr: remote.addr, type: remote.type })) { - return true; - } - } - return false; - }; -}; -var ipRestriction = (getIP, { denyList = [], allowList = [] }, onError) => { - const allowLength = allowList.length; - const denyMatcher = buildMatcher(denyList); - const allowMatcher = buildMatcher(allowList); - const blockError = (c) => new HTTPException(403, { - res: c.text("Forbidden", { - status: 403 - }) - }); - return async function ipRestriction2(c, next) { - const connInfo = getIP(c); - const addr = typeof connInfo === "string" ? connInfo : connInfo.remote.address; - if (!addr) { - throw blockError(c); - } - const type = typeof connInfo !== "string" && connInfo.remote.addressType || distinctRemoteAddr(addr); - const remoteData = { addr, type, isIPv4: type === "IPv4" }; - if (denyMatcher(remoteData)) { - if (onError) { - return onError({ addr, type }, c); - } - throw blockError(c); - } - if (allowMatcher(remoteData)) { - return await next(); - } - if (allowLength === 0) { - return await next(); - } else { - if (onError) { - return await onError({ addr, type }, c); - } - throw blockError(c); - } - }; -}; -export { - ipRestriction -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/middleware/jsx-renderer/index.js b/PBandGraphScaffold/node_modules/hono/dist/middleware/jsx-renderer/index.js deleted file mode 100644 index d43b2a7..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/middleware/jsx-renderer/index.js +++ /dev/null @@ -1,57 +0,0 @@ -// src/middleware/jsx-renderer/index.ts -import { html, raw } from "../../helper/html/index.js"; -import { Fragment, createContext, jsx, useContext } from "../../jsx/index.js"; -import { renderToReadableStream } from "../../jsx/streaming.js"; -var RequestContext = createContext(null); -var createRenderer = (c, Layout, component, options) => (children, props) => { - const docType = typeof options?.docType === "string" ? options.docType : options?.docType === false ? "" : ""; - const currentLayout = component ? jsx( - (props2) => component(props2, c), - { - Layout, - ...props - }, - children - ) : children; - const body = html`${raw(docType)}${jsx( - RequestContext.Provider, - { value: c }, - currentLayout - )}`; - if (options?.stream) { - if (options.stream === true) { - c.header("Transfer-Encoding", "chunked"); - c.header("Content-Type", "text/html; charset=UTF-8"); - c.header("Content-Encoding", "Identity"); - } else { - for (const [key, value] of Object.entries(options.stream)) { - c.header(key, value); - } - } - return c.body(renderToReadableStream(body)); - } else { - return c.html(body); - } -}; -var jsxRenderer = (component, options) => function jsxRenderer2(c, next) { - const Layout = c.getLayout() ?? Fragment; - if (component) { - c.setLayout((props) => { - return component({ ...props, Layout }, c); - }); - } - c.setRenderer(createRenderer(c, Layout, component, options)); - return next(); -}; -var useRequestContext = () => { - const c = useContext(RequestContext); - if (!c) { - throw new Error("RequestContext is not provided."); - } - return c; -}; -export { - RequestContext, - jsxRenderer, - useRequestContext -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/middleware/jwk/index.js b/PBandGraphScaffold/node_modules/hono/dist/middleware/jwk/index.js deleted file mode 100644 index 310baa6..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/middleware/jwk/index.js +++ /dev/null @@ -1,5 +0,0 @@ -// src/middleware/jwk/index.ts -import { jwk } from "./jwk.js"; -export { - jwk -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/middleware/jwk/jwk.js b/PBandGraphScaffold/node_modules/hono/dist/middleware/jwk/jwk.js deleted file mode 100644 index aa87b06..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/middleware/jwk/jwk.js +++ /dev/null @@ -1,108 +0,0 @@ -// src/middleware/jwk/jwk.ts -import { getCookie, getSignedCookie } from "../../helper/cookie/index.js"; -import { HTTPException } from "../../http-exception.js"; -import { Jwt } from "../../utils/jwt/index.js"; -import "../../context.js"; -var jwk = (options, init) => { - const verifyOpts = options.verification || {}; - if (!options || !(options.keys || options.jwks_uri)) { - throw new Error('JWK auth middleware requires options for either "keys" or "jwks_uri" or both'); - } - if (!crypto.subtle || !crypto.subtle.importKey) { - throw new Error("`crypto.subtle.importKey` is undefined. JWK auth middleware requires it."); - } - return async function jwk2(ctx, next) { - const headerName = options.headerName || "Authorization"; - const credentials = ctx.req.raw.headers.get(headerName); - let token; - if (credentials) { - const parts = credentials.split(/\s+/); - if (parts.length !== 2) { - const errDescription = "invalid credentials structure"; - throw new HTTPException(401, { - message: errDescription, - res: unauthorizedResponse({ - ctx, - error: "invalid_request", - errDescription - }) - }); - } else { - token = parts[1]; - } - } else if (options.cookie) { - if (typeof options.cookie == "string") { - token = getCookie(ctx, options.cookie); - } else if (options.cookie.secret) { - if (options.cookie.prefixOptions) { - token = await getSignedCookie( - ctx, - options.cookie.secret, - options.cookie.key, - options.cookie.prefixOptions - ); - } else { - token = await getSignedCookie(ctx, options.cookie.secret, options.cookie.key); - } - } else { - if (options.cookie.prefixOptions) { - token = getCookie(ctx, options.cookie.key, options.cookie.prefixOptions); - } else { - token = getCookie(ctx, options.cookie.key); - } - } - } - if (!token) { - if (options.allow_anon) { - return next(); - } - const errDescription = "no authorization included in request"; - throw new HTTPException(401, { - message: errDescription, - res: unauthorizedResponse({ - ctx, - error: "invalid_request", - errDescription - }) - }); - } - let payload; - let cause; - try { - const keys = typeof options.keys === "function" ? await options.keys(ctx) : options.keys; - const jwks_uri = typeof options.jwks_uri === "function" ? await options.jwks_uri(ctx) : options.jwks_uri; - payload = await Jwt.verifyWithJwks(token, { keys, jwks_uri, verification: verifyOpts }, init); - } catch (e) { - cause = e; - } - if (!payload) { - if (cause instanceof Error && cause.constructor === Error) { - throw cause; - } - throw new HTTPException(401, { - message: "Unauthorized", - res: unauthorizedResponse({ - ctx, - error: "invalid_token", - statusText: "Unauthorized", - errDescription: "token verification failure" - }), - cause - }); - } - ctx.set("jwtPayload", payload); - await next(); - }; -}; -function unauthorizedResponse(opts) { - return new Response("Unauthorized", { - status: 401, - statusText: opts.statusText, - headers: { - "WWW-Authenticate": `Bearer realm="${opts.ctx.req.url}",error="${opts.error}",error_description="${opts.errDescription}"` - } - }); -} -export { - jwk -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/middleware/jwt/index.js b/PBandGraphScaffold/node_modules/hono/dist/middleware/jwt/index.js deleted file mode 100644 index 1a3b240..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/middleware/jwt/index.js +++ /dev/null @@ -1,9 +0,0 @@ -// src/middleware/jwt/index.ts -import { jwt, verifyWithJwks, verify, decode, sign } from "./jwt.js"; -export { - decode, - jwt, - sign, - verify, - verifyWithJwks -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/middleware/jwt/jwt.js b/PBandGraphScaffold/node_modules/hono/dist/middleware/jwt/jwt.js deleted file mode 100644 index b60a33c..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/middleware/jwt/jwt.js +++ /dev/null @@ -1,111 +0,0 @@ -// src/middleware/jwt/jwt.ts -import { getCookie, getSignedCookie } from "../../helper/cookie/index.js"; -import { HTTPException } from "../../http-exception.js"; -import { Jwt } from "../../utils/jwt/index.js"; -import "../../context.js"; -var jwt = (options) => { - const verifyOpts = options.verification || {}; - if (!options || !options.secret) { - throw new Error('JWT auth middleware requires options for "secret"'); - } - if (!crypto.subtle || !crypto.subtle.importKey) { - throw new Error("`crypto.subtle.importKey` is undefined. JWT auth middleware requires it."); - } - return async function jwt2(ctx, next) { - const headerName = options.headerName || "Authorization"; - const credentials = ctx.req.raw.headers.get(headerName); - let token; - if (credentials) { - const parts = credentials.split(/\s+/); - if (parts.length !== 2) { - const errDescription = "invalid credentials structure"; - throw new HTTPException(401, { - message: errDescription, - res: unauthorizedResponse({ - ctx, - error: "invalid_request", - errDescription - }) - }); - } else { - token = parts[1]; - } - } else if (options.cookie) { - if (typeof options.cookie == "string") { - token = getCookie(ctx, options.cookie); - } else if (options.cookie.secret) { - if (options.cookie.prefixOptions) { - token = await getSignedCookie( - ctx, - options.cookie.secret, - options.cookie.key, - options.cookie.prefixOptions - ); - } else { - token = await getSignedCookie(ctx, options.cookie.secret, options.cookie.key); - } - } else { - if (options.cookie.prefixOptions) { - token = getCookie(ctx, options.cookie.key, options.cookie.prefixOptions); - } else { - token = getCookie(ctx, options.cookie.key); - } - } - } - if (!token) { - const errDescription = "no authorization included in request"; - throw new HTTPException(401, { - message: errDescription, - res: unauthorizedResponse({ - ctx, - error: "invalid_request", - errDescription - }) - }); - } - let payload; - let cause; - try { - payload = await Jwt.verify(token, options.secret, { - alg: options.alg, - ...verifyOpts - }); - } catch (e) { - cause = e; - } - if (!payload) { - throw new HTTPException(401, { - message: "Unauthorized", - res: unauthorizedResponse({ - ctx, - error: "invalid_token", - statusText: "Unauthorized", - errDescription: "token verification failure" - }), - cause - }); - } - ctx.set("jwtPayload", payload); - await next(); - }; -}; -function unauthorizedResponse(opts) { - return new Response("Unauthorized", { - status: 401, - statusText: opts.statusText, - headers: { - "WWW-Authenticate": `Bearer realm="${opts.ctx.req.url}",error="${opts.error}",error_description="${opts.errDescription}"` - } - }); -} -var verifyWithJwks = Jwt.verifyWithJwks; -var verify = Jwt.verify; -var decode = Jwt.decode; -var sign = Jwt.sign; -export { - decode, - jwt, - sign, - verify, - verifyWithJwks -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/middleware/language/index.js b/PBandGraphScaffold/node_modules/hono/dist/middleware/language/index.js deleted file mode 100644 index 9455c61..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/middleware/language/index.js +++ /dev/null @@ -1,15 +0,0 @@ -// src/middleware/language/index.ts -import { - languageDetector, - detectFromCookie, - detectFromHeader, - detectFromPath, - detectFromQuery -} from "./language.js"; -export { - detectFromCookie, - detectFromHeader, - detectFromPath, - detectFromQuery, - languageDetector -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/middleware/language/language.js b/PBandGraphScaffold/node_modules/hono/dist/middleware/language/language.js deleted file mode 100644 index fe4316e..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/middleware/language/language.js +++ /dev/null @@ -1,179 +0,0 @@ -// src/middleware/language/language.ts -import { setCookie, getCookie } from "../../helper/cookie/index.js"; -import { parseAccept } from "../../utils/accept.js"; -var DEFAULT_OPTIONS = { - order: ["querystring", "cookie", "header"], - lookupQueryString: "lang", - lookupCookie: "language", - lookupFromHeaderKey: "accept-language", - lookupFromPathIndex: 0, - caches: ["cookie"], - ignoreCase: true, - fallbackLanguage: "en", - supportedLanguages: ["en"], - cookieOptions: { - sameSite: "Strict", - secure: true, - maxAge: 365 * 24 * 60 * 60, - httpOnly: true - }, - debug: false -}; -function parseAcceptLanguage(header) { - return parseAccept(header).map(({ type, q }) => ({ lang: type, q })); -} -var normalizeLanguage = (lang, options) => { - if (!lang) { - return void 0; - } - try { - let normalizedLang = lang.trim(); - if (options.convertDetectedLanguage) { - normalizedLang = options.convertDetectedLanguage(normalizedLang); - } - const compLang = options.ignoreCase ? normalizedLang.toLowerCase() : normalizedLang; - const compSupported = options.supportedLanguages.map( - (l) => options.ignoreCase ? l.toLowerCase() : l - ); - const matchedLang = compSupported.find((l) => l === compLang); - return matchedLang ? options.supportedLanguages[compSupported.indexOf(matchedLang)] : void 0; - } catch { - return void 0; - } -}; -var detectFromQuery = (c, options) => { - try { - const query = c.req.query(options.lookupQueryString); - return normalizeLanguage(query, options); - } catch { - return void 0; - } -}; -var detectFromCookie = (c, options) => { - try { - const cookie = getCookie(c, options.lookupCookie); - return normalizeLanguage(cookie, options); - } catch { - return void 0; - } -}; -function detectFromHeader(c, options) { - try { - const acceptLanguage = c.req.header(options.lookupFromHeaderKey); - if (!acceptLanguage) { - return void 0; - } - const languages = parseAcceptLanguage(acceptLanguage); - for (const { lang } of languages) { - const normalizedLang = normalizeLanguage(lang, options); - if (normalizedLang) { - return normalizedLang; - } - } - return void 0; - } catch { - return void 0; - } -} -function detectFromPath(c, options) { - try { - const url = new URL(c.req.url); - const pathSegments = url.pathname.split("/").filter(Boolean); - const langSegment = pathSegments[options.lookupFromPathIndex]; - return normalizeLanguage(langSegment, options); - } catch { - return void 0; - } -} -var detectors = { - querystring: detectFromQuery, - cookie: detectFromCookie, - header: detectFromHeader, - path: detectFromPath -}; -function validateOptions(options) { - if (!options.supportedLanguages.includes(options.fallbackLanguage)) { - throw new Error("Fallback language must be included in supported languages"); - } - if (options.lookupFromPathIndex < 0) { - throw new Error("Path index must be non-negative"); - } - if (!options.order.every((detector) => Object.keys(detectors).includes(detector))) { - throw new Error("Invalid detector type in order array"); - } -} -function cacheLanguage(c, language, options) { - if (!Array.isArray(options.caches) || !options.caches.includes("cookie")) { - return; - } - try { - setCookie(c, options.lookupCookie, language, options.cookieOptions); - } catch (error) { - if (options.debug) { - console.error("Failed to cache language:", error); - } - } -} -var detectLanguage = (c, options) => { - let detectedLang; - for (const detectorName of options.order) { - const detector = detectors[detectorName]; - if (!detector) { - continue; - } - try { - detectedLang = detector(c, options); - if (detectedLang) { - if (options.debug) { - console.log(`Language detected from ${detectorName}: ${detectedLang}`); - } - break; - } - } catch (error) { - if (options.debug) { - console.error(`Error in ${detectorName} detector:`, error); - } - continue; - } - } - const finalLang = detectedLang || options.fallbackLanguage; - if (detectedLang && options.caches) { - cacheLanguage(c, finalLang, options); - } - return finalLang; -}; -var languageDetector = (userOptions) => { - const options = { - ...DEFAULT_OPTIONS, - ...userOptions, - cookieOptions: { - ...DEFAULT_OPTIONS.cookieOptions, - ...userOptions.cookieOptions - } - }; - validateOptions(options); - return async function languageDetector2(ctx, next) { - try { - const lang = detectLanguage(ctx, options); - ctx.set("language", lang); - } catch (error) { - if (options.debug) { - console.error("Language detection failed:", error); - } - ctx.set("language", options.fallbackLanguage); - } - await next(); - }; -}; -export { - DEFAULT_OPTIONS, - detectFromCookie, - detectFromHeader, - detectFromPath, - detectFromQuery, - detectors, - languageDetector, - normalizeLanguage, - parseAcceptLanguage, - validateOptions -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/middleware/logger/index.js b/PBandGraphScaffold/node_modules/hono/dist/middleware/logger/index.js deleted file mode 100644 index 2a727b6..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/middleware/logger/index.js +++ /dev/null @@ -1,44 +0,0 @@ -// src/middleware/logger/index.ts -import { getColorEnabledAsync } from "../../utils/color.js"; -var humanize = (times) => { - const [delimiter, separator] = [",", "."]; - const orderTimes = times.map((v) => v.replace(/(\d)(?=(\d\d\d)+(?!\d))/g, "$1" + delimiter)); - return orderTimes.join(separator); -}; -var time = (start) => { - const delta = Date.now() - start; - return humanize([delta < 1e3 ? delta + "ms" : Math.round(delta / 1e3) + "s"]); -}; -var colorStatus = async (status) => { - const colorEnabled = await getColorEnabledAsync(); - if (colorEnabled) { - switch (status / 100 | 0) { - case 5: - return `\x1B[31m${status}\x1B[0m`; - case 4: - return `\x1B[33m${status}\x1B[0m`; - case 3: - return `\x1B[36m${status}\x1B[0m`; - case 2: - return `\x1B[32m${status}\x1B[0m`; - } - } - return `${status}`; -}; -async function log(fn, prefix, method, path, status = 0, elapsed) { - const out = prefix === "<--" /* Incoming */ ? `${prefix} ${method} ${path}` : `${prefix} ${method} ${path} ${await colorStatus(status)} ${elapsed}`; - fn(out); -} -var logger = (fn = console.log) => { - return async function logger2(c, next) { - const { method, url } = c.req; - const path = url.slice(url.indexOf("/", 8)); - await log(fn, "<--" /* Incoming */, method, path); - const start = Date.now(); - await next(); - await log(fn, "-->" /* Outgoing */, method, path, c.res.status, time(start)); - }; -}; -export { - logger -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/middleware/method-override/index.js b/PBandGraphScaffold/node_modules/hono/dist/middleware/method-override/index.js deleted file mode 100644 index e7daefe..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/middleware/method-override/index.js +++ /dev/null @@ -1,82 +0,0 @@ -// src/middleware/method-override/index.ts -import { parseBody } from "../../utils/body.js"; -var DEFAULT_METHOD_FORM_NAME = "_method"; -var methodOverride = (options) => async function methodOverride2(c, next) { - if (c.req.method === "GET") { - return await next(); - } - const app = options.app; - if (!(options.header || options.query)) { - const contentType = c.req.header("content-type"); - const methodFormName = options.form || DEFAULT_METHOD_FORM_NAME; - const clonedRequest = c.req.raw.clone(); - const newRequest = clonedRequest.clone(); - if (contentType?.startsWith("multipart/form-data")) { - const form = await clonedRequest.formData(); - const method = form.get(methodFormName); - if (method) { - const newForm = await newRequest.formData(); - newForm.delete(methodFormName); - const newHeaders = new Headers(clonedRequest.headers); - newHeaders.delete("content-type"); - newHeaders.delete("content-length"); - const request = new Request(c.req.url, { - body: newForm, - headers: newHeaders, - method - }); - return app.fetch(request, c.env, getExecutionCtx(c)); - } - } - if (contentType === "application/x-www-form-urlencoded") { - const params = await parseBody(clonedRequest); - const method = params[methodFormName]; - if (method) { - delete params[methodFormName]; - const newParams = new URLSearchParams(params); - const request = new Request(newRequest, { - body: newParams, - method - }); - return app.fetch(request, c.env, getExecutionCtx(c)); - } - } - } else if (options.header) { - const headerName = options.header; - const method = c.req.header(headerName); - if (method) { - const newHeaders = new Headers(c.req.raw.headers); - newHeaders.delete(headerName); - const request = new Request(c.req.raw, { - headers: newHeaders, - method - }); - return app.fetch(request, c.env, getExecutionCtx(c)); - } - } else if (options.query) { - const queryName = options.query; - const method = c.req.query(queryName); - if (method) { - const url = new URL(c.req.url); - url.searchParams.delete(queryName); - const request = new Request(url.toString(), { - body: c.req.raw.body, - headers: c.req.raw.headers, - method - }); - return app.fetch(request, c.env, getExecutionCtx(c)); - } - } - await next(); -}; -var getExecutionCtx = (c) => { - let executionCtx; - try { - executionCtx = c.executionCtx; - } catch { - } - return executionCtx; -}; -export { - methodOverride -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/middleware/powered-by/index.js b/PBandGraphScaffold/node_modules/hono/dist/middleware/powered-by/index.js deleted file mode 100644 index 827f65f..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/middleware/powered-by/index.js +++ /dev/null @@ -1,10 +0,0 @@ -// src/middleware/powered-by/index.ts -var poweredBy = (options) => { - return async function poweredBy2(c, next) { - await next(); - c.res.headers.set("X-Powered-By", options?.serverName ?? "Hono"); - }; -}; -export { - poweredBy -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/middleware/pretty-json/index.js b/PBandGraphScaffold/node_modules/hono/dist/middleware/pretty-json/index.js deleted file mode 100644 index 5bb7163..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/middleware/pretty-json/index.js +++ /dev/null @@ -1,15 +0,0 @@ -// src/middleware/pretty-json/index.ts -var prettyJSON = (options) => { - const targetQuery = options?.query ?? "pretty"; - return async function prettyJSON2(c, next) { - const pretty = options?.force || c.req.query(targetQuery) || c.req.query(targetQuery) === ""; - await next(); - if (pretty && c.res.headers.get("Content-Type")?.startsWith("application/json")) { - const obj = await c.res.json(); - c.res = new Response(JSON.stringify(obj, null, options?.space ?? 2), c.res); - } - }; -}; -export { - prettyJSON -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/middleware/request-id/index.js b/PBandGraphScaffold/node_modules/hono/dist/middleware/request-id/index.js deleted file mode 100644 index 3f6a077..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/middleware/request-id/index.js +++ /dev/null @@ -1,5 +0,0 @@ -// src/middleware/request-id/index.ts -import { requestId } from "./request-id.js"; -export { - requestId -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/middleware/request-id/request-id.js b/PBandGraphScaffold/node_modules/hono/dist/middleware/request-id/request-id.js deleted file mode 100644 index 0c22de6..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/middleware/request-id/request-id.js +++ /dev/null @@ -1,21 +0,0 @@ -// src/middleware/request-id/request-id.ts -var requestId = ({ - limitLength = 255, - headerName = "X-Request-Id", - generator = () => crypto.randomUUID() -} = {}) => { - return async function requestId2(c, next) { - let reqId = headerName ? c.req.header(headerName) : void 0; - if (!reqId || reqId.length > limitLength || /[^\w\-=]/.test(reqId)) { - reqId = generator(c); - } - c.set("requestId", reqId); - if (headerName) { - c.header(headerName, reqId); - } - await next(); - }; -}; -export { - requestId -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/middleware/secure-headers/index.js b/PBandGraphScaffold/node_modules/hono/dist/middleware/secure-headers/index.js deleted file mode 100644 index 7983a6f..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/middleware/secure-headers/index.js +++ /dev/null @@ -1,6 +0,0 @@ -// src/middleware/secure-headers/index.ts -import { NONCE, secureHeaders } from "./secure-headers.js"; -export { - NONCE, - secureHeaders -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/middleware/secure-headers/permissions-policy.js b/PBandGraphScaffold/node_modules/hono/dist/middleware/secure-headers/permissions-policy.js deleted file mode 100644 index e69de29..0000000 diff --git a/PBandGraphScaffold/node_modules/hono/dist/middleware/secure-headers/secure-headers.js b/PBandGraphScaffold/node_modules/hono/dist/middleware/secure-headers/secure-headers.js deleted file mode 100644 index 7124599..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/middleware/secure-headers/secure-headers.js +++ /dev/null @@ -1,166 +0,0 @@ -// src/middleware/secure-headers/secure-headers.ts -import { encodeBase64 } from "../../utils/encode.js"; -var HEADERS_MAP = { - crossOriginEmbedderPolicy: ["Cross-Origin-Embedder-Policy", "require-corp"], - crossOriginResourcePolicy: ["Cross-Origin-Resource-Policy", "same-origin"], - crossOriginOpenerPolicy: ["Cross-Origin-Opener-Policy", "same-origin"], - originAgentCluster: ["Origin-Agent-Cluster", "?1"], - referrerPolicy: ["Referrer-Policy", "no-referrer"], - strictTransportSecurity: ["Strict-Transport-Security", "max-age=15552000; includeSubDomains"], - xContentTypeOptions: ["X-Content-Type-Options", "nosniff"], - xDnsPrefetchControl: ["X-DNS-Prefetch-Control", "off"], - xDownloadOptions: ["X-Download-Options", "noopen"], - xFrameOptions: ["X-Frame-Options", "SAMEORIGIN"], - xPermittedCrossDomainPolicies: ["X-Permitted-Cross-Domain-Policies", "none"], - xXssProtection: ["X-XSS-Protection", "0"] -}; -var DEFAULT_OPTIONS = { - crossOriginEmbedderPolicy: false, - crossOriginResourcePolicy: true, - crossOriginOpenerPolicy: true, - originAgentCluster: true, - referrerPolicy: true, - strictTransportSecurity: true, - xContentTypeOptions: true, - xDnsPrefetchControl: true, - xDownloadOptions: true, - xFrameOptions: true, - xPermittedCrossDomainPolicies: true, - xXssProtection: true, - removePoweredBy: true, - permissionsPolicy: {} -}; -var generateNonce = () => { - const arrayBuffer = new Uint8Array(16); - crypto.getRandomValues(arrayBuffer); - return encodeBase64(arrayBuffer.buffer); -}; -var NONCE = (ctx) => { - const key = "secureHeadersNonce"; - const init = ctx.get(key); - const nonce = init || generateNonce(); - if (init == null) { - ctx.set(key, nonce); - } - return `'nonce-${nonce}'`; -}; -var secureHeaders = (customOptions) => { - const options = { ...DEFAULT_OPTIONS, ...customOptions }; - const headersToSet = getFilteredHeaders(options); - const callbacks = []; - if (options.contentSecurityPolicy) { - const [callback, value] = getCSPDirectives(options.contentSecurityPolicy); - if (callback) { - callbacks.push(callback); - } - headersToSet.push(["Content-Security-Policy", value]); - } - if (options.contentSecurityPolicyReportOnly) { - const [callback, value] = getCSPDirectives(options.contentSecurityPolicyReportOnly); - if (callback) { - callbacks.push(callback); - } - headersToSet.push(["Content-Security-Policy-Report-Only", value]); - } - if (options.permissionsPolicy && Object.keys(options.permissionsPolicy).length > 0) { - headersToSet.push([ - "Permissions-Policy", - getPermissionsPolicyDirectives(options.permissionsPolicy) - ]); - } - if (options.reportingEndpoints) { - headersToSet.push(["Reporting-Endpoints", getReportingEndpoints(options.reportingEndpoints)]); - } - if (options.reportTo) { - headersToSet.push(["Report-To", getReportToOptions(options.reportTo)]); - } - return async function secureHeaders2(ctx, next) { - const headersToSetForReq = callbacks.length === 0 ? headersToSet : callbacks.reduce((acc, cb) => cb(ctx, acc), headersToSet); - await next(); - setHeaders(ctx, headersToSetForReq); - if (options?.removePoweredBy) { - ctx.res.headers.delete("X-Powered-By"); - } - }; -}; -function getFilteredHeaders(options) { - return Object.entries(HEADERS_MAP).filter(([key]) => options[key]).map(([key, defaultValue]) => { - const overrideValue = options[key]; - return typeof overrideValue === "string" ? [defaultValue[0], overrideValue] : defaultValue; - }); -} -function getCSPDirectives(contentSecurityPolicy) { - const callbacks = []; - const resultValues = []; - for (const [directive, value] of Object.entries(contentSecurityPolicy)) { - const valueArray = Array.isArray(value) ? value : [value]; - valueArray.forEach((value2, i) => { - if (typeof value2 === "function") { - const index = i * 2 + 2 + resultValues.length; - callbacks.push((ctx, values) => { - values[index] = value2(ctx, directive); - }); - } - }); - resultValues.push( - directive.replace( - /[A-Z]+(?![a-z])|[A-Z]/g, - (match, offset) => offset ? "-" + match.toLowerCase() : match.toLowerCase() - ), - ...valueArray.flatMap((value2) => [" ", value2]), - "; " - ); - } - resultValues.pop(); - return callbacks.length === 0 ? [void 0, resultValues.join("")] : [ - (ctx, headersToSet) => headersToSet.map((values) => { - if (values[0] === "Content-Security-Policy" || values[0] === "Content-Security-Policy-Report-Only") { - const clone = values[1].slice(); - callbacks.forEach((cb) => { - cb(ctx, clone); - }); - return [values[0], clone.join("")]; - } else { - return values; - } - }), - resultValues - ]; -} -function getPermissionsPolicyDirectives(policy) { - return Object.entries(policy).map(([directive, value]) => { - const kebabDirective = camelToKebab(directive); - if (typeof value === "boolean") { - return `${kebabDirective}=${value ? "*" : "none"}`; - } - if (Array.isArray(value)) { - if (value.length === 0) { - return `${kebabDirective}=()`; - } - if (value.length === 1 && (value[0] === "*" || value[0] === "none")) { - return `${kebabDirective}=${value[0]}`; - } - const allowlist = value.map((item) => ["self", "src"].includes(item) ? item : `"${item}"`); - return `${kebabDirective}=(${allowlist.join(" ")})`; - } - return ""; - }).filter(Boolean).join(", "); -} -function camelToKebab(str) { - return str.replace(/([a-z\d])([A-Z])/g, "$1-$2").toLowerCase(); -} -function getReportingEndpoints(reportingEndpoints = []) { - return reportingEndpoints.map((endpoint) => `${endpoint.name}="${endpoint.url}"`).join(", "); -} -function getReportToOptions(reportTo = []) { - return reportTo.map((option) => JSON.stringify(option)).join(", "); -} -function setHeaders(ctx, headersToSet) { - headersToSet.forEach(([header, value]) => { - ctx.res.headers.set(header, value); - }); -} -export { - NONCE, - secureHeaders -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/middleware/serve-static/index.js b/PBandGraphScaffold/node_modules/hono/dist/middleware/serve-static/index.js deleted file mode 100644 index 7ed3d9a..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/middleware/serve-static/index.js +++ /dev/null @@ -1,76 +0,0 @@ -// src/middleware/serve-static/index.ts -import { COMPRESSIBLE_CONTENT_TYPE_REGEX } from "../../utils/compress.js"; -import { getMimeType } from "../../utils/mime.js"; -import { defaultJoin } from "./path.js"; -var ENCODINGS = { - br: ".br", - zstd: ".zst", - gzip: ".gz" -}; -var ENCODINGS_ORDERED_KEYS = Object.keys(ENCODINGS); -var DEFAULT_DOCUMENT = "index.html"; -var serveStatic = (options) => { - const root = options.root ?? "./"; - const optionPath = options.path; - const join = options.join ?? defaultJoin; - return async (c, next) => { - if (c.finalized) { - return next(); - } - let filename; - if (options.path) { - filename = options.path; - } else { - try { - filename = decodeURIComponent(c.req.path); - if (/(?:^|[\/\\])\.\.(?:$|[\/\\])/.test(filename)) { - throw new Error(); - } - } catch { - await options.onNotFound?.(c.req.path, c); - return next(); - } - } - let path = join( - root, - !optionPath && options.rewriteRequestPath ? options.rewriteRequestPath(filename) : filename - ); - if (options.isDir && await options.isDir(path)) { - path = join(path, DEFAULT_DOCUMENT); - } - const getContent = options.getContent; - let content = await getContent(path, c); - if (content instanceof Response) { - return c.newResponse(content.body, content); - } - if (content) { - const mimeType = options.mimes && getMimeType(path, options.mimes) || getMimeType(path); - c.header("Content-Type", mimeType || "application/octet-stream"); - if (options.precompressed && (!mimeType || COMPRESSIBLE_CONTENT_TYPE_REGEX.test(mimeType))) { - const acceptEncodingSet = new Set( - c.req.header("Accept-Encoding")?.split(",").map((encoding) => encoding.trim()) - ); - for (const encoding of ENCODINGS_ORDERED_KEYS) { - if (!acceptEncodingSet.has(encoding)) { - continue; - } - const compressedContent = await getContent(path + ENCODINGS[encoding], c); - if (compressedContent) { - content = compressedContent; - c.header("Content-Encoding", encoding); - c.header("Vary", "Accept-Encoding", { append: true }); - break; - } - } - } - await options.onFound?.(path, c); - return c.body(content); - } - await options.onNotFound?.(path, c); - await next(); - return; - }; -}; -export { - serveStatic -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/middleware/serve-static/path.js b/PBandGraphScaffold/node_modules/hono/dist/middleware/serve-static/path.js deleted file mode 100644 index ab7f823..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/middleware/serve-static/path.js +++ /dev/null @@ -1,18 +0,0 @@ -// src/middleware/serve-static/path.ts -var defaultJoin = (...paths) => { - let result = paths.filter((p) => p !== "").join("/"); - result = result.replace(/(?<=\/)\/+/g, ""); - const segments = result.split("/"); - const resolved = []; - for (const segment of segments) { - if (segment === ".." && resolved.length > 0 && resolved.at(-1) !== "..") { - resolved.pop(); - } else if (segment !== ".") { - resolved.push(segment); - } - } - return resolved.join("/") || "."; -}; -export { - defaultJoin -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/middleware/timeout/index.js b/PBandGraphScaffold/node_modules/hono/dist/middleware/timeout/index.js deleted file mode 100644 index 9fac713..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/middleware/timeout/index.js +++ /dev/null @@ -1,25 +0,0 @@ -// src/middleware/timeout/index.ts -import { HTTPException } from "../../http-exception.js"; -var defaultTimeoutException = new HTTPException(504, { - message: "Gateway Timeout" -}); -var timeout = (duration, exception = defaultTimeoutException) => { - return async function timeout2(context, next) { - let timer; - const timeoutPromise = new Promise((_, reject) => { - timer = setTimeout(() => { - reject(typeof exception === "function" ? exception(context) : exception); - }, duration); - }); - try { - await Promise.race([next(), timeoutPromise]); - } finally { - if (timer !== void 0) { - clearTimeout(timer); - } - } - }; -}; -export { - timeout -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/middleware/timing/index.js b/PBandGraphScaffold/node_modules/hono/dist/middleware/timing/index.js deleted file mode 100644 index 4c0836b..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/middleware/timing/index.js +++ /dev/null @@ -1,9 +0,0 @@ -// src/middleware/timing/index.ts -import { timing, setMetric, startTime, endTime, wrapTime } from "./timing.js"; -export { - endTime, - setMetric, - startTime, - timing, - wrapTime -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/middleware/timing/timing.js b/PBandGraphScaffold/node_modules/hono/dist/middleware/timing/timing.js deleted file mode 100644 index df3014c..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/middleware/timing/timing.js +++ /dev/null @@ -1,102 +0,0 @@ -// src/middleware/timing/timing.ts -import "../../context.js"; -var getTime = () => { - try { - return performance.now(); - } catch { - } - return Date.now(); -}; -var timing = (config) => { - const options = { - total: true, - enabled: true, - totalDescription: "Total Response Time", - autoEnd: true, - crossOrigin: false, - ...config - }; - return async function timing2(c, next) { - const headers = []; - const timers = /* @__PURE__ */ new Map(); - if (c.get("metric")) { - return await next(); - } - c.set("metric", { headers, timers }); - if (options.total) { - startTime(c, "total", options.totalDescription); - } - await next(); - if (options.total) { - endTime(c, "total"); - } - if (options.autoEnd) { - timers.forEach((_, key) => endTime(c, key)); - } - const enabled = typeof options.enabled === "function" ? options.enabled(c) : options.enabled; - if (enabled) { - c.res.headers.append("Server-Timing", headers.join(",")); - const crossOrigin = typeof options.crossOrigin === "function" ? options.crossOrigin(c) : options.crossOrigin; - if (crossOrigin) { - c.res.headers.append( - "Timing-Allow-Origin", - typeof crossOrigin === "string" ? crossOrigin : "*" - ); - } - } - }; -}; -var setMetric = (c, name, valueDescription, description, precision) => { - const metrics = c.get("metric"); - if (!metrics) { - console.warn("Metrics not initialized! Please add the `timing()` middleware to this route!"); - return; - } - if (typeof valueDescription === "number") { - const dur = valueDescription.toFixed(precision || 1); - const metric = description ? `${name};dur=${dur};desc="${description}"` : `${name};dur=${dur}`; - metrics.headers.push(metric); - } else { - const metric = valueDescription ? `${name};desc="${valueDescription}"` : `${name}`; - metrics.headers.push(metric); - } -}; -var startTime = (c, name, description) => { - const metrics = c.get("metric"); - if (!metrics) { - console.warn("Metrics not initialized! Please add the `timing()` middleware to this route!"); - return; - } - metrics.timers.set(name, { description, start: getTime() }); -}; -var endTime = (c, name, precision) => { - const metrics = c.get("metric"); - if (!metrics) { - console.warn("Metrics not initialized! Please add the `timing()` middleware to this route!"); - return; - } - const timer = metrics.timers.get(name); - if (!timer) { - console.warn(`Timer "${name}" does not exist!`); - return; - } - const { description, start } = timer; - const duration = getTime() - start; - setMetric(c, name, duration, description, precision); - metrics.timers.delete(name); -}; -async function wrapTime(c, name, callable, description, precision) { - startTime(c, name, description); - try { - return await callable; - } finally { - endTime(c, name, precision); - } -} -export { - endTime, - setMetric, - startTime, - timing, - wrapTime -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/middleware/trailing-slash/index.js b/PBandGraphScaffold/node_modules/hono/dist/middleware/trailing-slash/index.js deleted file mode 100644 index c769749..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/middleware/trailing-slash/index.js +++ /dev/null @@ -1,25 +0,0 @@ -// src/middleware/trailing-slash/index.ts -var trimTrailingSlash = () => { - return async function trimTrailingSlash2(c, next) { - await next(); - if (c.res.status === 404 && (c.req.method === "GET" || c.req.method === "HEAD") && c.req.path !== "/" && c.req.path.at(-1) === "/") { - const url = new URL(c.req.url); - url.pathname = url.pathname.substring(0, url.pathname.length - 1); - c.res = c.redirect(url.toString(), 301); - } - }; -}; -var appendTrailingSlash = () => { - return async function appendTrailingSlash2(c, next) { - await next(); - if (c.res.status === 404 && (c.req.method === "GET" || c.req.method === "HEAD") && c.req.path.at(-1) !== "/") { - const url = new URL(c.req.url); - url.pathname += "/"; - c.res = c.redirect(url.toString(), 301); - } - }; -}; -export { - appendTrailingSlash, - trimTrailingSlash -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/preset/quick.js b/PBandGraphScaffold/node_modules/hono/dist/preset/quick.js deleted file mode 100644 index b8eca97..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/preset/quick.js +++ /dev/null @@ -1,16 +0,0 @@ -// src/preset/quick.ts -import { HonoBase } from "../hono-base.js"; -import { LinearRouter } from "../router/linear-router/index.js"; -import { SmartRouter } from "../router/smart-router/index.js"; -import { TrieRouter } from "../router/trie-router/index.js"; -var Hono = class extends HonoBase { - constructor(options = {}) { - super(options); - this.router = new SmartRouter({ - routers: [new LinearRouter(), new TrieRouter()] - }); - } -}; -export { - Hono -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/preset/tiny.js b/PBandGraphScaffold/node_modules/hono/dist/preset/tiny.js deleted file mode 100644 index 377e3b0..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/preset/tiny.js +++ /dev/null @@ -1,12 +0,0 @@ -// src/preset/tiny.ts -import { HonoBase } from "../hono-base.js"; -import { PatternRouter } from "../router/pattern-router/index.js"; -var Hono = class extends HonoBase { - constructor(options = {}) { - super(options); - this.router = new PatternRouter(); - } -}; -export { - Hono -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/request.js b/PBandGraphScaffold/node_modules/hono/dist/request.js deleted file mode 100644 index 06a2bf9..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/request.js +++ /dev/null @@ -1,301 +0,0 @@ -// src/request.ts -import { HTTPException } from "./http-exception.js"; -import { GET_MATCH_RESULT } from "./request/constants.js"; -import { parseBody } from "./utils/body.js"; -import { decodeURIComponent_, getQueryParam, getQueryParams, tryDecode } from "./utils/url.js"; -var tryDecodeURIComponent = (str) => tryDecode(str, decodeURIComponent_); -var HonoRequest = class { - /** - * `.raw` can get the raw Request object. - * - * @see {@link https://hono.dev/docs/api/request#raw} - * - * @example - * ```ts - * // For Cloudflare Workers - * app.post('/', async (c) => { - * const metadata = c.req.raw.cf?.hostMetadata? - * ... - * }) - * ``` - */ - raw; - #validatedData; - // Short name of validatedData - #matchResult; - routeIndex = 0; - /** - * `.path` can get the pathname of the request. - * - * @see {@link https://hono.dev/docs/api/request#path} - * - * @example - * ```ts - * app.get('/about/me', (c) => { - * const pathname = c.req.path // `/about/me` - * }) - * ``` - */ - path; - bodyCache = {}; - constructor(request, path = "/", matchResult = [[]]) { - this.raw = request; - this.path = path; - this.#matchResult = matchResult; - this.#validatedData = {}; - } - param(key) { - return key ? this.#getDecodedParam(key) : this.#getAllDecodedParams(); - } - #getDecodedParam(key) { - const paramKey = this.#matchResult[0][this.routeIndex][1][key]; - const param = this.#getParamValue(paramKey); - return param && /\%/.test(param) ? tryDecodeURIComponent(param) : param; - } - #getAllDecodedParams() { - const decoded = {}; - const keys = Object.keys(this.#matchResult[0][this.routeIndex][1]); - for (const key of keys) { - const value = this.#getParamValue(this.#matchResult[0][this.routeIndex][1][key]); - if (value !== void 0) { - decoded[key] = /\%/.test(value) ? tryDecodeURIComponent(value) : value; - } - } - return decoded; - } - #getParamValue(paramKey) { - return this.#matchResult[1] ? this.#matchResult[1][paramKey] : paramKey; - } - query(key) { - return getQueryParam(this.url, key); - } - queries(key) { - return getQueryParams(this.url, key); - } - header(name) { - if (name) { - return this.raw.headers.get(name) ?? void 0; - } - const headerData = {}; - this.raw.headers.forEach((value, key) => { - headerData[key] = value; - }); - return headerData; - } - async parseBody(options) { - return this.bodyCache.parsedBody ??= await parseBody(this, options); - } - #cachedBody = (key) => { - const { bodyCache, raw } = this; - const cachedBody = bodyCache[key]; - if (cachedBody) { - return cachedBody; - } - const anyCachedKey = Object.keys(bodyCache)[0]; - if (anyCachedKey) { - return bodyCache[anyCachedKey].then((body) => { - if (anyCachedKey === "json") { - body = JSON.stringify(body); - } - return new Response(body)[key](); - }); - } - return bodyCache[key] = raw[key](); - }; - /** - * `.json()` can parse Request body of type `application/json` - * - * @see {@link https://hono.dev/docs/api/request#json} - * - * @example - * ```ts - * app.post('/entry', async (c) => { - * const body = await c.req.json() - * }) - * ``` - */ - json() { - return this.#cachedBody("text").then((text) => JSON.parse(text)); - } - /** - * `.text()` can parse Request body of type `text/plain` - * - * @see {@link https://hono.dev/docs/api/request#text} - * - * @example - * ```ts - * app.post('/entry', async (c) => { - * const body = await c.req.text() - * }) - * ``` - */ - text() { - return this.#cachedBody("text"); - } - /** - * `.arrayBuffer()` parse Request body as an `ArrayBuffer` - * - * @see {@link https://hono.dev/docs/api/request#arraybuffer} - * - * @example - * ```ts - * app.post('/entry', async (c) => { - * const body = await c.req.arrayBuffer() - * }) - * ``` - */ - arrayBuffer() { - return this.#cachedBody("arrayBuffer"); - } - /** - * Parses the request body as a `Blob`. - * @example - * ```ts - * app.post('/entry', async (c) => { - * const body = await c.req.blob(); - * }); - * ``` - * @see https://hono.dev/docs/api/request#blob - */ - blob() { - return this.#cachedBody("blob"); - } - /** - * Parses the request body as `FormData`. - * @example - * ```ts - * app.post('/entry', async (c) => { - * const body = await c.req.formData(); - * }); - * ``` - * @see https://hono.dev/docs/api/request#formdata - */ - formData() { - return this.#cachedBody("formData"); - } - /** - * Adds validated data to the request. - * - * @param target - The target of the validation. - * @param data - The validated data to add. - */ - addValidatedData(target, data) { - this.#validatedData[target] = data; - } - valid(target) { - return this.#validatedData[target]; - } - /** - * `.url()` can get the request url strings. - * - * @see {@link https://hono.dev/docs/api/request#url} - * - * @example - * ```ts - * app.get('/about/me', (c) => { - * const url = c.req.url // `http://localhost:8787/about/me` - * ... - * }) - * ``` - */ - get url() { - return this.raw.url; - } - /** - * `.method()` can get the method name of the request. - * - * @see {@link https://hono.dev/docs/api/request#method} - * - * @example - * ```ts - * app.get('/about/me', (c) => { - * const method = c.req.method // `GET` - * }) - * ``` - */ - get method() { - return this.raw.method; - } - get [GET_MATCH_RESULT]() { - return this.#matchResult; - } - /** - * `.matchedRoutes()` can return a matched route in the handler - * - * @deprecated - * - * Use matchedRoutes helper defined in "hono/route" instead. - * - * @see {@link https://hono.dev/docs/api/request#matchedroutes} - * - * @example - * ```ts - * app.use('*', async function logger(c, next) { - * await next() - * c.req.matchedRoutes.forEach(({ handler, method, path }, i) => { - * const name = handler.name || (handler.length < 2 ? '[handler]' : '[middleware]') - * console.log( - * method, - * ' ', - * path, - * ' '.repeat(Math.max(10 - path.length, 0)), - * name, - * i === c.req.routeIndex ? '<- respond from here' : '' - * ) - * }) - * }) - * ``` - */ - get matchedRoutes() { - return this.#matchResult[0].map(([[, route]]) => route); - } - /** - * `routePath()` can retrieve the path registered within the handler - * - * @deprecated - * - * Use routePath helper defined in "hono/route" instead. - * - * @see {@link https://hono.dev/docs/api/request#routepath} - * - * @example - * ```ts - * app.get('/posts/:id', (c) => { - * return c.json({ path: c.req.routePath }) - * }) - * ``` - */ - get routePath() { - return this.#matchResult[0].map(([[, route]]) => route)[this.routeIndex].path; - } -}; -var cloneRawRequest = async (req) => { - if (!req.raw.bodyUsed) { - return req.raw.clone(); - } - const cacheKey = Object.keys(req.bodyCache)[0]; - if (!cacheKey) { - throw new HTTPException(500, { - message: "Cannot clone request: body was already consumed and not cached. Please use HonoRequest methods (e.g., req.json(), req.text()) instead of consuming req.raw directly." - }); - } - const requestInit = { - body: await req[cacheKey](), - cache: req.raw.cache, - credentials: req.raw.credentials, - headers: req.header(), - integrity: req.raw.integrity, - keepalive: req.raw.keepalive, - method: req.method, - mode: req.raw.mode, - redirect: req.raw.redirect, - referrer: req.raw.referrer, - referrerPolicy: req.raw.referrerPolicy, - signal: req.raw.signal - }; - return new Request(req.url, requestInit); -}; -export { - HonoRequest, - cloneRawRequest -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/request/constants.js b/PBandGraphScaffold/node_modules/hono/dist/request/constants.js deleted file mode 100644 index 0dd1f54..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/request/constants.js +++ /dev/null @@ -1,5 +0,0 @@ -// src/request/constants.ts -var GET_MATCH_RESULT = /* @__PURE__ */ Symbol(); -export { - GET_MATCH_RESULT -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/router.js b/PBandGraphScaffold/node_modules/hono/dist/router.js deleted file mode 100644 index 7e3111e..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/router.js +++ /dev/null @@ -1,14 +0,0 @@ -// src/router.ts -var METHOD_NAME_ALL = "ALL"; -var METHOD_NAME_ALL_LOWERCASE = "all"; -var METHODS = ["get", "post", "put", "delete", "options", "patch"]; -var MESSAGE_MATCHER_IS_ALREADY_BUILT = "Can not add a route since the matcher is already built."; -var UnsupportedPathError = class extends Error { -}; -export { - MESSAGE_MATCHER_IS_ALREADY_BUILT, - METHODS, - METHOD_NAME_ALL, - METHOD_NAME_ALL_LOWERCASE, - UnsupportedPathError -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/router/linear-router/index.js b/PBandGraphScaffold/node_modules/hono/dist/router/linear-router/index.js deleted file mode 100644 index ed50711..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/router/linear-router/index.js +++ /dev/null @@ -1,5 +0,0 @@ -// src/router/linear-router/index.ts -import { LinearRouter } from "./router.js"; -export { - LinearRouter -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/router/linear-router/router.js b/PBandGraphScaffold/node_modules/hono/dist/router/linear-router/router.js deleted file mode 100644 index ca0a0c1..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/router/linear-router/router.js +++ /dev/null @@ -1,118 +0,0 @@ -// src/router/linear-router/router.ts -import { METHOD_NAME_ALL, UnsupportedPathError } from "../../router.js"; -import { checkOptionalParameter } from "../../utils/url.js"; -var emptyParams = /* @__PURE__ */ Object.create(null); -var splitPathRe = /\/(:\w+(?:{(?:(?:{[\d,]+})|[^}])+})?)|\/[^\/\?]+|(\?)/g; -var splitByStarRe = /\*/; -var LinearRouter = class { - name = "LinearRouter"; - #routes = []; - add(method, path, handler) { - for (let i = 0, paths = checkOptionalParameter(path) || [path], len = paths.length; i < len; i++) { - this.#routes.push([method, paths[i], handler]); - } - } - match(method, path) { - const handlers = []; - ROUTES_LOOP: for (let i = 0, len = this.#routes.length; i < len; i++) { - const [routeMethod, routePath, handler] = this.#routes[i]; - if (routeMethod === method || routeMethod === METHOD_NAME_ALL) { - if (routePath === "*" || routePath === "/*") { - handlers.push([handler, emptyParams]); - continue; - } - const hasStar = routePath.indexOf("*") !== -1; - const hasLabel = routePath.indexOf(":") !== -1; - if (!hasStar && !hasLabel) { - if (routePath === path || routePath + "/" === path) { - handlers.push([handler, emptyParams]); - } - } else if (hasStar && !hasLabel) { - const endsWithStar = routePath.charCodeAt(routePath.length - 1) === 42; - const parts = (endsWithStar ? routePath.slice(0, -2) : routePath).split(splitByStarRe); - const lastIndex = parts.length - 1; - for (let j = 0, pos = 0, len2 = parts.length; j < len2; j++) { - const part = parts[j]; - const index = path.indexOf(part, pos); - if (index !== pos) { - continue ROUTES_LOOP; - } - pos += part.length; - if (j === lastIndex) { - if (!endsWithStar && pos !== path.length && !(pos === path.length - 1 && path.charCodeAt(pos) === 47)) { - continue ROUTES_LOOP; - } - } else { - const index2 = path.indexOf("/", pos); - if (index2 === -1) { - continue ROUTES_LOOP; - } - pos = index2; - } - } - handlers.push([handler, emptyParams]); - } else if (hasLabel && !hasStar) { - const params = /* @__PURE__ */ Object.create(null); - const parts = routePath.match(splitPathRe); - const lastIndex = parts.length - 1; - for (let j = 0, pos = 0, len2 = parts.length; j < len2; j++) { - if (pos === -1 || pos >= path.length) { - continue ROUTES_LOOP; - } - const part = parts[j]; - if (part.charCodeAt(1) === 58) { - if (path.charCodeAt(pos) !== 47) { - continue ROUTES_LOOP; - } - let name = part.slice(2); - let value; - if (name.charCodeAt(name.length - 1) === 125) { - const openBracePos = name.indexOf("{"); - const next = parts[j + 1]; - const lookahead = next && next[1] !== ":" && next[1] !== "*" ? `(?=${next})` : ""; - const pattern = name.slice(openBracePos + 1, -1) + lookahead; - const restPath = path.slice(pos + 1); - const match = new RegExp(pattern, "d").exec(restPath); - if (!match || match.indices[0][0] !== 0 || match.indices[0][1] === 0) { - continue ROUTES_LOOP; - } - name = name.slice(0, openBracePos); - value = restPath.slice(...match.indices[0]); - pos += match.indices[0][1] + 1; - } else { - let endValuePos = path.indexOf("/", pos + 1); - if (endValuePos === -1) { - if (pos + 1 === path.length) { - continue ROUTES_LOOP; - } - endValuePos = path.length; - } - value = path.slice(pos + 1, endValuePos); - pos = endValuePos; - } - params[name] ||= value; - } else { - const index = path.indexOf(part, pos); - if (index !== pos) { - continue ROUTES_LOOP; - } - pos += part.length; - } - if (j === lastIndex) { - if (pos !== path.length && !(pos === path.length - 1 && path.charCodeAt(pos) === 47)) { - continue ROUTES_LOOP; - } - } - } - handlers.push([handler, params]); - } else if (hasLabel && hasStar) { - throw new UnsupportedPathError(); - } - } - } - return [handlers]; - } -}; -export { - LinearRouter -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/router/pattern-router/index.js b/PBandGraphScaffold/node_modules/hono/dist/router/pattern-router/index.js deleted file mode 100644 index b4e9ab4..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/router/pattern-router/index.js +++ /dev/null @@ -1,5 +0,0 @@ -// src/router/pattern-router/index.ts -import { PatternRouter } from "./router.js"; -export { - PatternRouter -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/router/pattern-router/router.js b/PBandGraphScaffold/node_modules/hono/dist/router/pattern-router/router.js deleted file mode 100644 index 96eb0b8..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/router/pattern-router/router.js +++ /dev/null @@ -1,48 +0,0 @@ -// src/router/pattern-router/router.ts -import { METHOD_NAME_ALL, UnsupportedPathError } from "../../router.js"; -var emptyParams = /* @__PURE__ */ Object.create(null); -var PatternRouter = class { - name = "PatternRouter"; - #routes = []; - add(method, path, handler) { - const endsWithWildcard = path.at(-1) === "*"; - if (endsWithWildcard) { - path = path.slice(0, -2); - } - if (path.at(-1) === "?") { - path = path.slice(0, -1); - this.add(method, path.replace(/\/[^/]+$/, ""), handler); - } - const parts = (path.match(/\/?(:\w+(?:{(?:(?:{[\d,]+})|[^}])+})?)|\/?[^\/\?]+/g) || []).map( - (part) => { - const match = part.match(/^\/:([^{]+)(?:{(.*)})?/); - return match ? `/(?<${match[1]}>${match[2] || "[^/]+"})` : part === "/*" ? "/[^/]+" : part.replace(/[.\\+*[^\]$()]/g, "\\$&"); - } - ); - try { - this.#routes.push([ - new RegExp(`^${parts.join("")}${endsWithWildcard ? "" : "/?$"}`), - method, - handler - ]); - } catch { - throw new UnsupportedPathError(); - } - } - match(method, path) { - const handlers = []; - for (let i = 0, len = this.#routes.length; i < len; i++) { - const [pattern, routeMethod, handler] = this.#routes[i]; - if (routeMethod === method || routeMethod === METHOD_NAME_ALL) { - const match = pattern.exec(path); - if (match) { - handlers.push([handler, match.groups || emptyParams]); - } - } - } - return [handlers]; - } -}; -export { - PatternRouter -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/router/reg-exp-router/index.js b/PBandGraphScaffold/node_modules/hono/dist/router/reg-exp-router/index.js deleted file mode 100644 index dc94aeb..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/router/reg-exp-router/index.js +++ /dev/null @@ -1,9 +0,0 @@ -// src/router/reg-exp-router/index.ts -import { RegExpRouter } from "./router.js"; -import { PreparedRegExpRouter, buildInitParams, serializeInitParams } from "./prepared-router.js"; -export { - PreparedRegExpRouter, - RegExpRouter, - buildInitParams, - serializeInitParams -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/router/reg-exp-router/matcher.js b/PBandGraphScaffold/node_modules/hono/dist/router/reg-exp-router/matcher.js deleted file mode 100644 index 3691559..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/router/reg-exp-router/matcher.js +++ /dev/null @@ -1,25 +0,0 @@ -// src/router/reg-exp-router/matcher.ts -import { METHOD_NAME_ALL } from "../../router.js"; -var emptyParam = []; -function match(method, path) { - const matchers = this.buildAllMatchers(); - const match2 = ((method2, path2) => { - const matcher = matchers[method2] || matchers[METHOD_NAME_ALL]; - const staticMatch = matcher[2][path2]; - if (staticMatch) { - return staticMatch; - } - const match3 = path2.match(matcher[0]); - if (!match3) { - return [[], emptyParam]; - } - const index = match3.indexOf("", 1); - return [matcher[1][index], match3]; - }); - this.match = match2; - return match2(method, path); -} -export { - emptyParam, - match -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/router/reg-exp-router/node.js b/PBandGraphScaffold/node_modules/hono/dist/router/reg-exp-router/node.js deleted file mode 100644 index fc4b292..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/router/reg-exp-router/node.js +++ /dev/null @@ -1,111 +0,0 @@ -// src/router/reg-exp-router/node.ts -var LABEL_REG_EXP_STR = "[^/]+"; -var ONLY_WILDCARD_REG_EXP_STR = ".*"; -var TAIL_WILDCARD_REG_EXP_STR = "(?:|/.*)"; -var PATH_ERROR = /* @__PURE__ */ Symbol(); -var regExpMetaChars = new Set(".\\+*[^]$()"); -function compareKey(a, b) { - if (a.length === 1) { - return b.length === 1 ? a < b ? -1 : 1 : -1; - } - if (b.length === 1) { - return 1; - } - if (a === ONLY_WILDCARD_REG_EXP_STR || a === TAIL_WILDCARD_REG_EXP_STR) { - return 1; - } else if (b === ONLY_WILDCARD_REG_EXP_STR || b === TAIL_WILDCARD_REG_EXP_STR) { - return -1; - } - if (a === LABEL_REG_EXP_STR) { - return 1; - } else if (b === LABEL_REG_EXP_STR) { - return -1; - } - return a.length === b.length ? a < b ? -1 : 1 : b.length - a.length; -} -var Node = class _Node { - #index; - #varIndex; - #children = /* @__PURE__ */ Object.create(null); - insert(tokens, index, paramMap, context, pathErrorCheckOnly) { - if (tokens.length === 0) { - if (this.#index !== void 0) { - throw PATH_ERROR; - } - if (pathErrorCheckOnly) { - return; - } - this.#index = index; - return; - } - const [token, ...restTokens] = tokens; - const pattern = token === "*" ? restTokens.length === 0 ? ["", "", ONLY_WILDCARD_REG_EXP_STR] : ["", "", LABEL_REG_EXP_STR] : token === "/*" ? ["", "", TAIL_WILDCARD_REG_EXP_STR] : token.match(/^\:([^\{\}]+)(?:\{(.+)\})?$/); - let node; - if (pattern) { - const name = pattern[1]; - let regexpStr = pattern[2] || LABEL_REG_EXP_STR; - if (name && pattern[2]) { - if (regexpStr === ".*") { - throw PATH_ERROR; - } - regexpStr = regexpStr.replace(/^\((?!\?:)(?=[^)]+\)$)/, "(?:"); - if (/\((?!\?:)/.test(regexpStr)) { - throw PATH_ERROR; - } - } - node = this.#children[regexpStr]; - if (!node) { - if (Object.keys(this.#children).some( - (k) => k !== ONLY_WILDCARD_REG_EXP_STR && k !== TAIL_WILDCARD_REG_EXP_STR - )) { - throw PATH_ERROR; - } - if (pathErrorCheckOnly) { - return; - } - node = this.#children[regexpStr] = new _Node(); - if (name !== "") { - node.#varIndex = context.varIndex++; - } - } - if (!pathErrorCheckOnly && name !== "") { - paramMap.push([name, node.#varIndex]); - } - } else { - node = this.#children[token]; - if (!node) { - if (Object.keys(this.#children).some( - (k) => k.length > 1 && k !== ONLY_WILDCARD_REG_EXP_STR && k !== TAIL_WILDCARD_REG_EXP_STR - )) { - throw PATH_ERROR; - } - if (pathErrorCheckOnly) { - return; - } - node = this.#children[token] = new _Node(); - } - } - node.insert(restTokens, index, paramMap, context, pathErrorCheckOnly); - } - buildRegExpStr() { - const childKeys = Object.keys(this.#children).sort(compareKey); - const strList = childKeys.map((k) => { - const c = this.#children[k]; - return (typeof c.#varIndex === "number" ? `(${k})@${c.#varIndex}` : regExpMetaChars.has(k) ? `\\${k}` : k) + c.buildRegExpStr(); - }); - if (typeof this.#index === "number") { - strList.unshift(`#${this.#index}`); - } - if (strList.length === 0) { - return ""; - } - if (strList.length === 1) { - return strList[0]; - } - return "(?:" + strList.join("|") + ")"; - } -}; -export { - Node, - PATH_ERROR -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/router/reg-exp-router/prepared-router.js b/PBandGraphScaffold/node_modules/hono/dist/router/reg-exp-router/prepared-router.js deleted file mode 100644 index d329d76..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/router/reg-exp-router/prepared-router.js +++ /dev/null @@ -1,142 +0,0 @@ -// src/router/reg-exp-router/prepared-router.ts -import { METHOD_NAME_ALL } from "../../router.js"; -import { match, emptyParam } from "./matcher.js"; -import { RegExpRouter } from "./router.js"; -var PreparedRegExpRouter = class { - name = "PreparedRegExpRouter"; - #matchers; - #relocateMap; - constructor(matchers, relocateMap) { - this.#matchers = matchers; - this.#relocateMap = relocateMap; - } - #addWildcard(method, handlerData) { - const matcher = this.#matchers[method]; - matcher[1].forEach((list) => list && list.push(handlerData)); - Object.values(matcher[2]).forEach((list) => list[0].push(handlerData)); - } - #addPath(method, path, handler, indexes, map) { - const matcher = this.#matchers[method]; - if (!map) { - matcher[2][path][0].push([handler, {}]); - } else { - indexes.forEach((index) => { - if (typeof index === "number") { - matcher[1][index].push([handler, map]); - } else { - ; - matcher[2][index || path][0].push([handler, map]); - } - }); - } - } - add(method, path, handler) { - if (!this.#matchers[method]) { - const all = this.#matchers[METHOD_NAME_ALL]; - const staticMap = {}; - for (const key in all[2]) { - staticMap[key] = [all[2][key][0].slice(), emptyParam]; - } - this.#matchers[method] = [ - all[0], - all[1].map((list) => Array.isArray(list) ? list.slice() : 0), - staticMap - ]; - } - if (path === "/*" || path === "*") { - const handlerData = [handler, {}]; - if (method === METHOD_NAME_ALL) { - for (const m in this.#matchers) { - this.#addWildcard(m, handlerData); - } - } else { - this.#addWildcard(method, handlerData); - } - return; - } - const data = this.#relocateMap[path]; - if (!data) { - throw new Error(`Path ${path} is not registered`); - } - for (const [indexes, map] of data) { - if (method === METHOD_NAME_ALL) { - for (const m in this.#matchers) { - this.#addPath(m, path, handler, indexes, map); - } - } else { - this.#addPath(method, path, handler, indexes, map); - } - } - } - buildAllMatchers() { - return this.#matchers; - } - match = match; -}; -var buildInitParams = ({ paths }) => { - const RegExpRouterWithMatcherExport = class extends RegExpRouter { - buildAndExportAllMatchers() { - return this.buildAllMatchers(); - } - }; - const router = new RegExpRouterWithMatcherExport(); - for (const path of paths) { - router.add(METHOD_NAME_ALL, path, path); - } - const matchers = router.buildAndExportAllMatchers(); - const all = matchers[METHOD_NAME_ALL]; - const relocateMap = {}; - for (const path of paths) { - if (path === "/*" || path === "*") { - continue; - } - all[1].forEach((list, i) => { - list.forEach(([p, map]) => { - if (p === path) { - if (relocateMap[path]) { - relocateMap[path][0][1] = { - ...relocateMap[path][0][1], - ...map - }; - } else { - relocateMap[path] = [[[], map]]; - } - if (relocateMap[path][0][0].findIndex((j) => j === i) === -1) { - relocateMap[path][0][0].push(i); - } - } - }); - }); - for (const path2 in all[2]) { - all[2][path2][0].forEach(([p]) => { - if (p === path) { - relocateMap[path] ||= [[[]]]; - const value = path2 === path ? "" : path2; - if (relocateMap[path][0][0].findIndex((v) => v === value) === -1) { - relocateMap[path][0][0].push(value); - } - } - }); - } - } - for (let i = 0, len = all[1].length; i < len; i++) { - all[1][i] = all[1][i] ? [] : 0; - } - for (const path in all[2]) { - all[2][path][0] = []; - } - return [matchers, relocateMap]; -}; -var serializeInitParams = ([matchers, relocateMap]) => { - const matchersStr = JSON.stringify( - matchers, - (_, value) => value instanceof RegExp ? `##${value.toString()}##` : value - ).replace(/"##(.+?)##"/g, (_, str) => str.replace(/\\\\/g, "\\")); - const relocateMapStr = JSON.stringify(relocateMap); - return `[${matchersStr},${relocateMapStr}]`; -}; -export { - PreparedRegExpRouter, - buildInitParams, - serializeInitParams -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/router/reg-exp-router/router.js b/PBandGraphScaffold/node_modules/hono/dist/router/reg-exp-router/router.js deleted file mode 100644 index c8abb70..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/router/reg-exp-router/router.js +++ /dev/null @@ -1,190 +0,0 @@ -// src/router/reg-exp-router/router.ts -import { - MESSAGE_MATCHER_IS_ALREADY_BUILT, - METHOD_NAME_ALL, - UnsupportedPathError -} from "../../router.js"; -import { checkOptionalParameter } from "../../utils/url.js"; -import { match, emptyParam } from "./matcher.js"; -import { PATH_ERROR } from "./node.js"; -import { Trie } from "./trie.js"; -var nullMatcher = [/^$/, [], /* @__PURE__ */ Object.create(null)]; -var wildcardRegExpCache = /* @__PURE__ */ Object.create(null); -function buildWildcardRegExp(path) { - return wildcardRegExpCache[path] ??= new RegExp( - path === "*" ? "" : `^${path.replace( - /\/\*$|([.\\+*[^\]$()])/g, - (_, metaChar) => metaChar ? `\\${metaChar}` : "(?:|/.*)" - )}$` - ); -} -function clearWildcardRegExpCache() { - wildcardRegExpCache = /* @__PURE__ */ Object.create(null); -} -function buildMatcherFromPreprocessedRoutes(routes) { - const trie = new Trie(); - const handlerData = []; - if (routes.length === 0) { - return nullMatcher; - } - const routesWithStaticPathFlag = routes.map( - (route) => [!/\*|\/:/.test(route[0]), ...route] - ).sort( - ([isStaticA, pathA], [isStaticB, pathB]) => isStaticA ? 1 : isStaticB ? -1 : pathA.length - pathB.length - ); - const staticMap = /* @__PURE__ */ Object.create(null); - for (let i = 0, j = -1, len = routesWithStaticPathFlag.length; i < len; i++) { - const [pathErrorCheckOnly, path, handlers] = routesWithStaticPathFlag[i]; - if (pathErrorCheckOnly) { - staticMap[path] = [handlers.map(([h]) => [h, /* @__PURE__ */ Object.create(null)]), emptyParam]; - } else { - j++; - } - let paramAssoc; - try { - paramAssoc = trie.insert(path, j, pathErrorCheckOnly); - } catch (e) { - throw e === PATH_ERROR ? new UnsupportedPathError(path) : e; - } - if (pathErrorCheckOnly) { - continue; - } - handlerData[j] = handlers.map(([h, paramCount]) => { - const paramIndexMap = /* @__PURE__ */ Object.create(null); - paramCount -= 1; - for (; paramCount >= 0; paramCount--) { - const [key, value] = paramAssoc[paramCount]; - paramIndexMap[key] = value; - } - return [h, paramIndexMap]; - }); - } - const [regexp, indexReplacementMap, paramReplacementMap] = trie.buildRegExp(); - for (let i = 0, len = handlerData.length; i < len; i++) { - for (let j = 0, len2 = handlerData[i].length; j < len2; j++) { - const map = handlerData[i][j]?.[1]; - if (!map) { - continue; - } - const keys = Object.keys(map); - for (let k = 0, len3 = keys.length; k < len3; k++) { - map[keys[k]] = paramReplacementMap[map[keys[k]]]; - } - } - } - const handlerMap = []; - for (const i in indexReplacementMap) { - handlerMap[i] = handlerData[indexReplacementMap[i]]; - } - return [regexp, handlerMap, staticMap]; -} -function findMiddleware(middleware, path) { - if (!middleware) { - return void 0; - } - for (const k of Object.keys(middleware).sort((a, b) => b.length - a.length)) { - if (buildWildcardRegExp(k).test(path)) { - return [...middleware[k]]; - } - } - return void 0; -} -var RegExpRouter = class { - name = "RegExpRouter"; - #middleware; - #routes; - constructor() { - this.#middleware = { [METHOD_NAME_ALL]: /* @__PURE__ */ Object.create(null) }; - this.#routes = { [METHOD_NAME_ALL]: /* @__PURE__ */ Object.create(null) }; - } - add(method, path, handler) { - const middleware = this.#middleware; - const routes = this.#routes; - if (!middleware || !routes) { - throw new Error(MESSAGE_MATCHER_IS_ALREADY_BUILT); - } - if (!middleware[method]) { - ; - [middleware, routes].forEach((handlerMap) => { - handlerMap[method] = /* @__PURE__ */ Object.create(null); - Object.keys(handlerMap[METHOD_NAME_ALL]).forEach((p) => { - handlerMap[method][p] = [...handlerMap[METHOD_NAME_ALL][p]]; - }); - }); - } - if (path === "/*") { - path = "*"; - } - const paramCount = (path.match(/\/:/g) || []).length; - if (/\*$/.test(path)) { - const re = buildWildcardRegExp(path); - if (method === METHOD_NAME_ALL) { - Object.keys(middleware).forEach((m) => { - middleware[m][path] ||= findMiddleware(middleware[m], path) || findMiddleware(middleware[METHOD_NAME_ALL], path) || []; - }); - } else { - middleware[method][path] ||= findMiddleware(middleware[method], path) || findMiddleware(middleware[METHOD_NAME_ALL], path) || []; - } - Object.keys(middleware).forEach((m) => { - if (method === METHOD_NAME_ALL || method === m) { - Object.keys(middleware[m]).forEach((p) => { - re.test(p) && middleware[m][p].push([handler, paramCount]); - }); - } - }); - Object.keys(routes).forEach((m) => { - if (method === METHOD_NAME_ALL || method === m) { - Object.keys(routes[m]).forEach( - (p) => re.test(p) && routes[m][p].push([handler, paramCount]) - ); - } - }); - return; - } - const paths = checkOptionalParameter(path) || [path]; - for (let i = 0, len = paths.length; i < len; i++) { - const path2 = paths[i]; - Object.keys(routes).forEach((m) => { - if (method === METHOD_NAME_ALL || method === m) { - routes[m][path2] ||= [ - ...findMiddleware(middleware[m], path2) || findMiddleware(middleware[METHOD_NAME_ALL], path2) || [] - ]; - routes[m][path2].push([handler, paramCount - len + i + 1]); - } - }); - } - } - match = match; - buildAllMatchers() { - const matchers = /* @__PURE__ */ Object.create(null); - Object.keys(this.#routes).concat(Object.keys(this.#middleware)).forEach((method) => { - matchers[method] ||= this.#buildMatcher(method); - }); - this.#middleware = this.#routes = void 0; - clearWildcardRegExpCache(); - return matchers; - } - #buildMatcher(method) { - const routes = []; - let hasOwnRoute = method === METHOD_NAME_ALL; - [this.#middleware, this.#routes].forEach((r) => { - const ownRoute = r[method] ? Object.keys(r[method]).map((path) => [path, r[method][path]]) : []; - if (ownRoute.length !== 0) { - hasOwnRoute ||= true; - routes.push(...ownRoute); - } else if (method !== METHOD_NAME_ALL) { - routes.push( - ...Object.keys(r[METHOD_NAME_ALL]).map((path) => [path, r[METHOD_NAME_ALL][path]]) - ); - } - }); - if (!hasOwnRoute) { - return null; - } else { - return buildMatcherFromPreprocessedRoutes(routes); - } - } -}; -export { - RegExpRouter -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/router/reg-exp-router/trie.js b/PBandGraphScaffold/node_modules/hono/dist/router/reg-exp-router/trie.js deleted file mode 100644 index 7de861e..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/router/reg-exp-router/trie.js +++ /dev/null @@ -1,59 +0,0 @@ -// src/router/reg-exp-router/trie.ts -import { Node } from "./node.js"; -var Trie = class { - #context = { varIndex: 0 }; - #root = new Node(); - insert(path, index, pathErrorCheckOnly) { - const paramAssoc = []; - const groups = []; - for (let i = 0; ; ) { - let replaced = false; - path = path.replace(/\{[^}]+\}/g, (m) => { - const mark = `@\\${i}`; - groups[i] = [mark, m]; - i++; - replaced = true; - return mark; - }); - if (!replaced) { - break; - } - } - const tokens = path.match(/(?::[^\/]+)|(?:\/\*$)|./g) || []; - for (let i = groups.length - 1; i >= 0; i--) { - const [mark] = groups[i]; - for (let j = tokens.length - 1; j >= 0; j--) { - if (tokens[j].indexOf(mark) !== -1) { - tokens[j] = tokens[j].replace(mark, groups[i][1]); - break; - } - } - } - this.#root.insert(tokens, index, paramAssoc, this.#context, pathErrorCheckOnly); - return paramAssoc; - } - buildRegExp() { - let regexp = this.#root.buildRegExpStr(); - if (regexp === "") { - return [/^$/, [], []]; - } - let captureIndex = 0; - const indexReplacementMap = []; - const paramReplacementMap = []; - regexp = regexp.replace(/#(\d+)|@(\d+)|\.\*\$/g, (_, handlerIndex, paramIndex) => { - if (handlerIndex !== void 0) { - indexReplacementMap[++captureIndex] = Number(handlerIndex); - return "$()"; - } - if (paramIndex !== void 0) { - paramReplacementMap[Number(paramIndex)] = ++captureIndex; - return ""; - } - return ""; - }); - return [new RegExp(`^${regexp}`), indexReplacementMap, paramReplacementMap]; - } -}; -export { - Trie -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/router/smart-router/index.js b/PBandGraphScaffold/node_modules/hono/dist/router/smart-router/index.js deleted file mode 100644 index 2e68377..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/router/smart-router/index.js +++ /dev/null @@ -1,5 +0,0 @@ -// src/router/smart-router/index.ts -import { SmartRouter } from "./router.js"; -export { - SmartRouter -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/router/smart-router/router.js b/PBandGraphScaffold/node_modules/hono/dist/router/smart-router/router.js deleted file mode 100644 index 1b19adb..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/router/smart-router/router.js +++ /dev/null @@ -1,58 +0,0 @@ -// src/router/smart-router/router.ts -import { MESSAGE_MATCHER_IS_ALREADY_BUILT, UnsupportedPathError } from "../../router.js"; -var SmartRouter = class { - name = "SmartRouter"; - #routers = []; - #routes = []; - constructor(init) { - this.#routers = init.routers; - } - add(method, path, handler) { - if (!this.#routes) { - throw new Error(MESSAGE_MATCHER_IS_ALREADY_BUILT); - } - this.#routes.push([method, path, handler]); - } - match(method, path) { - if (!this.#routes) { - throw new Error("Fatal error"); - } - const routers = this.#routers; - const routes = this.#routes; - const len = routers.length; - let i = 0; - let res; - for (; i < len; i++) { - const router = routers[i]; - try { - for (let i2 = 0, len2 = routes.length; i2 < len2; i2++) { - router.add(...routes[i2]); - } - res = router.match(method, path); - } catch (e) { - if (e instanceof UnsupportedPathError) { - continue; - } - throw e; - } - this.match = router.match.bind(router); - this.#routers = [router]; - this.#routes = void 0; - break; - } - if (i === len) { - throw new Error("Fatal error"); - } - this.name = `SmartRouter + ${this.activeRouter.name}`; - return res; - } - get activeRouter() { - if (this.#routes || this.#routers.length !== 1) { - throw new Error("No active router has been determined yet."); - } - return this.#routers[0]; - } -}; -export { - SmartRouter -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/router/trie-router/index.js b/PBandGraphScaffold/node_modules/hono/dist/router/trie-router/index.js deleted file mode 100644 index c680d10..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/router/trie-router/index.js +++ /dev/null @@ -1,5 +0,0 @@ -// src/router/trie-router/index.ts -import { TrieRouter } from "./router.js"; -export { - TrieRouter -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/router/trie-router/node.js b/PBandGraphScaffold/node_modules/hono/dist/router/trie-router/node.js deleted file mode 100644 index a34c96d..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/router/trie-router/node.js +++ /dev/null @@ -1,162 +0,0 @@ -// src/router/trie-router/node.ts -import { METHOD_NAME_ALL } from "../../router.js"; -import { getPattern, splitPath, splitRoutingPath } from "../../utils/url.js"; -var emptyParams = /* @__PURE__ */ Object.create(null); -var Node = class _Node { - #methods; - #children; - #patterns; - #order = 0; - #params = emptyParams; - constructor(method, handler, children) { - this.#children = children || /* @__PURE__ */ Object.create(null); - this.#methods = []; - if (method && handler) { - const m = /* @__PURE__ */ Object.create(null); - m[method] = { handler, possibleKeys: [], score: 0 }; - this.#methods = [m]; - } - this.#patterns = []; - } - insert(method, path, handler) { - this.#order = ++this.#order; - let curNode = this; - const parts = splitRoutingPath(path); - const possibleKeys = []; - for (let i = 0, len = parts.length; i < len; i++) { - const p = parts[i]; - const nextP = parts[i + 1]; - const pattern = getPattern(p, nextP); - const key = Array.isArray(pattern) ? pattern[0] : p; - if (key in curNode.#children) { - curNode = curNode.#children[key]; - if (pattern) { - possibleKeys.push(pattern[1]); - } - continue; - } - curNode.#children[key] = new _Node(); - if (pattern) { - curNode.#patterns.push(pattern); - possibleKeys.push(pattern[1]); - } - curNode = curNode.#children[key]; - } - curNode.#methods.push({ - [method]: { - handler, - possibleKeys: possibleKeys.filter((v, i, a) => a.indexOf(v) === i), - score: this.#order - } - }); - return curNode; - } - #getHandlerSets(node, method, nodeParams, params) { - const handlerSets = []; - for (let i = 0, len = node.#methods.length; i < len; i++) { - const m = node.#methods[i]; - const handlerSet = m[method] || m[METHOD_NAME_ALL]; - const processedSet = {}; - if (handlerSet !== void 0) { - handlerSet.params = /* @__PURE__ */ Object.create(null); - handlerSets.push(handlerSet); - if (nodeParams !== emptyParams || params && params !== emptyParams) { - for (let i2 = 0, len2 = handlerSet.possibleKeys.length; i2 < len2; i2++) { - const key = handlerSet.possibleKeys[i2]; - const processed = processedSet[handlerSet.score]; - handlerSet.params[key] = params?.[key] && !processed ? params[key] : nodeParams[key] ?? params?.[key]; - processedSet[handlerSet.score] = true; - } - } - } - } - return handlerSets; - } - search(method, path) { - const handlerSets = []; - this.#params = emptyParams; - const curNode = this; - let curNodes = [curNode]; - const parts = splitPath(path); - const curNodesQueue = []; - for (let i = 0, len = parts.length; i < len; i++) { - const part = parts[i]; - const isLast = i === len - 1; - const tempNodes = []; - for (let j = 0, len2 = curNodes.length; j < len2; j++) { - const node = curNodes[j]; - const nextNode = node.#children[part]; - if (nextNode) { - nextNode.#params = node.#params; - if (isLast) { - if (nextNode.#children["*"]) { - handlerSets.push( - ...this.#getHandlerSets(nextNode.#children["*"], method, node.#params) - ); - } - handlerSets.push(...this.#getHandlerSets(nextNode, method, node.#params)); - } else { - tempNodes.push(nextNode); - } - } - for (let k = 0, len3 = node.#patterns.length; k < len3; k++) { - const pattern = node.#patterns[k]; - const params = node.#params === emptyParams ? {} : { ...node.#params }; - if (pattern === "*") { - const astNode = node.#children["*"]; - if (astNode) { - handlerSets.push(...this.#getHandlerSets(astNode, method, node.#params)); - astNode.#params = params; - tempNodes.push(astNode); - } - continue; - } - const [key, name, matcher] = pattern; - if (!part && !(matcher instanceof RegExp)) { - continue; - } - const child = node.#children[key]; - const restPathString = parts.slice(i).join("/"); - if (matcher instanceof RegExp) { - const m = matcher.exec(restPathString); - if (m) { - params[name] = m[0]; - handlerSets.push(...this.#getHandlerSets(child, method, node.#params, params)); - if (Object.keys(child.#children).length) { - child.#params = params; - const componentCount = m[0].match(/\//)?.length ?? 0; - const targetCurNodes = curNodesQueue[componentCount] ||= []; - targetCurNodes.push(child); - } - continue; - } - } - if (matcher === true || matcher.test(part)) { - params[name] = part; - if (isLast) { - handlerSets.push(...this.#getHandlerSets(child, method, params, node.#params)); - if (child.#children["*"]) { - handlerSets.push( - ...this.#getHandlerSets(child.#children["*"], method, params, node.#params) - ); - } - } else { - child.#params = params; - tempNodes.push(child); - } - } - } - } - curNodes = tempNodes.concat(curNodesQueue.shift() ?? []); - } - if (handlerSets.length > 1) { - handlerSets.sort((a, b) => { - return a.score - b.score; - }); - } - return [handlerSets.map(({ handler, params }) => [handler, params])]; - } -}; -export { - Node -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/router/trie-router/router.js b/PBandGraphScaffold/node_modules/hono/dist/router/trie-router/router.js deleted file mode 100644 index 40fd29d..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/router/trie-router/router.js +++ /dev/null @@ -1,26 +0,0 @@ -// src/router/trie-router/router.ts -import { checkOptionalParameter } from "../../utils/url.js"; -import { Node } from "./node.js"; -var TrieRouter = class { - name = "TrieRouter"; - #node; - constructor() { - this.#node = new Node(); - } - add(method, path, handler) { - const results = checkOptionalParameter(path); - if (results) { - for (let i = 0, len = results.length; i < len; i++) { - this.#node.insert(method, results[i], handler); - } - return; - } - this.#node.insert(method, path, handler); - } - match(method, path) { - return this.#node.search(method, path); - } -}; -export { - TrieRouter -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types.js b/PBandGraphScaffold/node_modules/hono/dist/types.js deleted file mode 100644 index 863d104..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types.js +++ /dev/null @@ -1,6 +0,0 @@ -// src/types.ts -var FetchEventLike = class { -}; -export { - FetchEventLike -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/adapter/aws-lambda/handler.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/adapter/aws-lambda/handler.d.ts deleted file mode 100644 index 2adfa9b..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/adapter/aws-lambda/handler.d.ts +++ /dev/null @@ -1,184 +0,0 @@ -import type { Hono } from '../../hono'; -import type { Env, Schema } from '../../types'; -import type { ALBRequestContext, ApiGatewayRequestContext, ApiGatewayRequestContextV2, Handler, LambdaContext, LatticeRequestContextV2 } from './types'; -export type LambdaEvent = APIGatewayProxyEvent | APIGatewayProxyEventV2 | ALBProxyEvent | LatticeProxyEventV2; -export interface LatticeProxyEventV2 { - version: string; - path: string; - method: string; - headers: Record; - queryStringParameters: Record; - body: string | null; - isBase64Encoded: boolean; - requestContext: LatticeRequestContextV2; -} -export interface APIGatewayProxyEventV2 { - version: string; - routeKey: string; - headers: Record; - multiValueHeaders?: undefined; - cookies?: string[]; - rawPath: string; - rawQueryString: string; - body: string | null; - isBase64Encoded: boolean; - requestContext: ApiGatewayRequestContextV2; - queryStringParameters?: { - [name: string]: string | undefined; - }; - pathParameters?: { - [name: string]: string | undefined; - }; - stageVariables?: { - [name: string]: string | undefined; - }; -} -export interface APIGatewayProxyEvent { - version: string; - httpMethod: string; - headers: Record; - multiValueHeaders?: { - [headerKey: string]: string[]; - }; - path: string; - body: string | null; - isBase64Encoded: boolean; - queryStringParameters?: Record; - requestContext: ApiGatewayRequestContext; - resource: string; - multiValueQueryStringParameters?: { - [parameterKey: string]: string[]; - }; - pathParameters?: Record; - stageVariables?: Record; -} -export interface ALBProxyEvent { - httpMethod: string; - headers?: Record; - multiValueHeaders?: Record; - path: string; - body: string | null; - isBase64Encoded: boolean; - queryStringParameters?: Record; - multiValueQueryStringParameters?: { - [parameterKey: string]: string[]; - }; - requestContext: ALBRequestContext; -} -type WithHeaders = { - headers: Record; - multiValueHeaders?: undefined; -}; -type WithMultiValueHeaders = { - headers?: undefined; - multiValueHeaders: Record; -}; -export type APIGatewayProxyResult = { - statusCode: number; - statusDescription?: string; - body: string; - cookies?: string[]; - isBase64Encoded: boolean; -} & (WithHeaders | WithMultiValueHeaders); -export declare const streamHandle: (app: Hono) => Handler; -type HandleOptions = { - isContentTypeBinary: ((contentType: string) => boolean) | undefined; -}; -/** - * Converts a Hono application to an AWS Lambda handler. - * - * Accepts events from API Gateway (v1 and v2), Application Load Balancer (ALB), - * and Lambda Function URLs. - * - * @param app - The Hono application instance - * @param options - Optional configuration - * @param options.isContentTypeBinary - A function to determine if the content type is binary. - * If not provided, the default function will be used. - * @returns Lambda handler function - * - * @example - * ```js - * import { Hono } from 'hono' - * import { handle } from 'hono/aws-lambda' - * - * const app = new Hono() - * - * app.get('/', (c) => c.text('Hello from Lambda')) - * app.get('/json', (c) => c.json({ message: 'Hello JSON' })) - * - * export const handler = handle(app) - * ``` - * - * @example - * ```js - * // With custom binary content type detection - * import { handle, defaultIsContentTypeBinary } from 'hono/aws-lambda' - * export const handler = handle(app, { - * isContentTypeBinary: (contentType) => { - * if (defaultIsContentTypeBinary(contentType)) { - * // default logic same as prior to v4.8.4 - * return true - * } - * return contentType.startsWith('image/') || contentType === 'application/pdf' - * } - * }) - * ``` - */ -export declare const handle: (app: Hono, { isContentTypeBinary }?: HandleOptions) => ((event: L, lambdaContext?: LambdaContext) => Promise; -} ? WithMultiValueHeaders : WithHeaders)>); -export declare abstract class EventProcessor { - protected abstract getPath(event: E): string; - protected abstract getMethod(event: E): string; - protected abstract getQueryString(event: E): string; - protected abstract getHeaders(event: E): Headers; - protected abstract getCookies(event: E, headers: Headers): void; - protected abstract setCookiesToResult(result: APIGatewayProxyResult, cookies: string[]): void; - protected getHeaderValue(headers: E['headers'], key: string): string | undefined; - protected getDomainName(event: E): string | undefined; - createRequest(event: E): Request; - createResult(event: E, res: Response, options: Pick): Promise; - setCookies(event: E, res: Response, result: APIGatewayProxyResult): void; -} -export declare class EventV2Processor extends EventProcessor { - protected getPath(event: APIGatewayProxyEventV2): string; - protected getMethod(event: APIGatewayProxyEventV2): string; - protected getQueryString(event: APIGatewayProxyEventV2): string; - protected getCookies(event: APIGatewayProxyEventV2, headers: Headers): void; - protected setCookiesToResult(result: APIGatewayProxyResult, cookies: string[]): void; - protected getHeaders(event: APIGatewayProxyEventV2): Headers; -} -export declare class EventV1Processor extends EventProcessor { - protected getPath(event: APIGatewayProxyEvent): string; - protected getMethod(event: APIGatewayProxyEvent): string; - protected getQueryString(event: APIGatewayProxyEvent): string; - protected getCookies(event: APIGatewayProxyEvent, headers: Headers): void; - protected getHeaders(event: APIGatewayProxyEvent): Headers; - protected setCookiesToResult(result: APIGatewayProxyResult, cookies: string[]): void; -} -export declare class ALBProcessor extends EventProcessor { - protected getHeaders(event: ALBProxyEvent): Headers; - protected getPath(event: ALBProxyEvent): string; - protected getMethod(event: ALBProxyEvent): string; - protected getQueryString(event: ALBProxyEvent): string; - protected getCookies(event: ALBProxyEvent, headers: Headers): void; - protected setCookiesToResult(result: APIGatewayProxyResult, cookies: string[]): void; -} -export declare class LatticeV2Processor extends EventProcessor { - protected getPath(event: LatticeProxyEventV2): string; - protected getMethod(event: LatticeProxyEventV2): string; - protected getQueryString(): string; - protected getHeaders(event: LatticeProxyEventV2): Headers; - protected getCookies(): void; - protected setCookiesToResult(result: APIGatewayProxyResult, cookies: string[]): void; -} -export declare const getProcessor: (event: LambdaEvent) => EventProcessor; -/** - * Check if the given content type is binary. - * This is a default function and may be overwritten by the user via `isContentTypeBinary` option in handler(). - * @param contentType The content type to check. - * @returns True if the content type is binary, false otherwise. - */ -export declare const defaultIsContentTypeBinary: (contentType: string) => boolean; -export declare const isContentEncodingBinary: (contentEncoding: string | null) => boolean; -export {}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/adapter/aws-lambda/index.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/adapter/aws-lambda/index.d.ts deleted file mode 100644 index 5a43c2c..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/adapter/aws-lambda/index.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -/** - * @module - * AWS Lambda Adapter for Hono. - */ -export { handle, streamHandle, defaultIsContentTypeBinary } from './handler'; -export type { APIGatewayProxyResult, LambdaEvent } from './handler'; -export type { ApiGatewayRequestContext, ApiGatewayRequestContextV2, ALBRequestContext, LambdaContext, } from './types'; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/adapter/aws-lambda/types.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/adapter/aws-lambda/types.d.ts deleted file mode 100644 index 22bb1c1..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/adapter/aws-lambda/types.d.ts +++ /dev/null @@ -1,144 +0,0 @@ -export interface CognitoIdentity { - cognitoIdentityId: string; - cognitoIdentityPoolId: string; -} -export interface ClientContext { - client: ClientContextClient; - Custom?: any; - env: ClientContextEnv; -} -export interface ClientContextClient { - installationId: string; - appTitle: string; - appVersionName: string; - appVersionCode: string; - appPackageName: string; -} -export interface ClientContextEnv { - platformVersion: string; - platform: string; - make: string; - model: string; - locale: string; -} -/** - * {@link Handler} context parameter. - * See {@link https://docs.aws.amazon.com/lambda/latest/dg/nodejs-prog-model-context.html AWS documentation}. - */ -export interface LambdaContext { - callbackWaitsForEmptyEventLoop: boolean; - functionName: string; - functionVersion: string; - invokedFunctionArn: string; - memoryLimitInMB: string; - awsRequestId: string; - logGroupName: string; - logStreamName: string; - identity?: CognitoIdentity | undefined; - clientContext?: ClientContext | undefined; - getRemainingTimeInMillis(): number; -} -type Callback = (error?: Error | string | null, result?: TResult) => void; -export type Handler = (event: TEvent, context: LambdaContext, callback: Callback) => void | Promise; -interface ClientCert { - clientCertPem: string; - subjectDN: string; - issuerDN: string; - serialNumber: string; - validity: { - notBefore: string; - notAfter: string; - }; -} -interface Identity { - accessKey?: string; - accountId?: string; - caller?: string; - cognitoAuthenticationProvider?: string; - cognitoAuthenticationType?: string; - cognitoIdentityId?: string; - cognitoIdentityPoolId?: string; - principalOrgId?: string; - sourceIp: string; - user?: string; - userAgent: string; - userArn?: string; - clientCert?: ClientCert; -} -export interface ApiGatewayRequestContext { - accountId: string; - apiId: string; - authorizer: { - claims?: unknown; - scopes?: unknown; - }; - domainName: string; - domainPrefix: string; - extendedRequestId: string; - httpMethod: string; - identity: Identity; - path: string; - protocol: string; - requestId: string; - requestTime: string; - requestTimeEpoch: number; - resourceId?: string; - resourcePath: string; - stage: string; -} -interface Authorizer { - iam?: { - accessKey: string; - accountId: string; - callerId: string; - cognitoIdentity: null; - principalOrgId: null; - userArn: string; - userId: string; - }; -} -export interface ApiGatewayRequestContextV2 { - accountId: string; - apiId: string; - authentication: null; - authorizer: Authorizer; - domainName: string; - domainPrefix: string; - http: { - method: string; - path: string; - protocol: string; - sourceIp: string; - userAgent: string; - }; - requestId: string; - routeKey: string; - stage: string; - time: string; - timeEpoch: number; -} -export interface ALBRequestContext { - elb: { - targetGroupArn: string; - }; -} -export interface LatticeRequestContextV2 { - serviceNetworkArn: string; - serviceArn: string; - targetGroupArn: string; - region: string; - timeEpoch: string; - identity: { - sourceVpcArn?: string; - type?: string; - principal?: string; - principalOrgID?: string; - sessionName?: string; - x509IssuerOu?: string; - x509SanDns?: string; - x509SanNameCn?: string; - x509SanUri?: string; - x509SubjectCn?: string; - }; -} -export {}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/adapter/bun/conninfo.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/adapter/bun/conninfo.d.ts deleted file mode 100644 index 1a7cf11..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/adapter/bun/conninfo.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import type { GetConnInfo } from '../../helper/conninfo'; -/** - * Get ConnInfo with Bun - * @param c Context - * @returns ConnInfo - */ -export declare const getConnInfo: GetConnInfo; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/adapter/bun/index.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/adapter/bun/index.d.ts deleted file mode 100644 index 39cd249..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/adapter/bun/index.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -/** - * @module - * Bun Adapter for Hono. - */ -export { serveStatic } from './serve-static'; -export { bunFileSystemModule, toSSG } from './ssg'; -export { createBunWebSocket, upgradeWebSocket, websocket } from './websocket'; -export type { BunWebSocketData, BunWebSocketHandler } from './websocket'; -export { getConnInfo } from './conninfo'; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/adapter/bun/serve-static.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/adapter/bun/serve-static.d.ts deleted file mode 100644 index e79742d..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/adapter/bun/serve-static.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import type { ServeStaticOptions } from '../../middleware/serve-static'; -import type { Env, MiddlewareHandler } from '../../types'; -export declare const serveStatic: (options: ServeStaticOptions) => MiddlewareHandler; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/adapter/bun/server.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/adapter/bun/server.d.ts deleted file mode 100644 index a6f7f0b..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/adapter/bun/server.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -/** - * Getting Bun Server Object for Bun adapters - * @module - */ -import type { Context } from '../../context'; -/** - * Bun Server Object - */ -export interface BunServer { - requestIP?: (req: Request) => { - address: string; - family: string; - port: number; - } | null; - upgrade(req: Request, options?: { - data: T; - }): boolean; -} -/** - * Get Bun Server Object from Context - * @param c Context - * @returns Bun Server - */ -export declare const getBunServer: (c: Context) => BunServer | undefined; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/adapter/bun/ssg.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/adapter/bun/ssg.d.ts deleted file mode 100644 index 8db4e65..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/adapter/bun/ssg.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import type { FileSystemModule, ToSSGAdaptorInterface } from '../../helper/ssg'; -/** - * @experimental - * `bunFileSystemModule` is an experimental feature. - * The API might be changed. - */ -export declare const bunFileSystemModule: FileSystemModule; -/** - * @experimental - * `toSSG` is an experimental feature. - * The API might be changed. - */ -export declare const toSSG: ToSSGAdaptorInterface; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/adapter/bun/websocket.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/adapter/bun/websocket.d.ts deleted file mode 100644 index 2fff433..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/adapter/bun/websocket.d.ts +++ /dev/null @@ -1,39 +0,0 @@ -import type { UpgradeWebSocket, WSEvents } from '../../helper/websocket'; -import { WSContext } from '../../helper/websocket'; -/** - * @internal - */ -export interface BunServerWebSocket { - send(data: string | ArrayBuffer | Uint8Array, compress?: boolean): void; - close(code?: number, reason?: string): void; - data: T; - readyState: 0 | 1 | 2 | 3; -} -export interface BunWebSocketHandler { - open(ws: BunServerWebSocket): void; - close(ws: BunServerWebSocket, code?: number, reason?: string): void; - message(ws: BunServerWebSocket, message: string | { - buffer: ArrayBufferLike; - }): void; -} -interface CreateWebSocket { - upgradeWebSocket: UpgradeWebSocket; - websocket: BunWebSocketHandler; -} -export interface BunWebSocketData { - events: WSEvents; - url: URL; - protocol: string; -} -/** - * @internal - */ -export declare const createWSContext: (ws: BunServerWebSocket) => WSContext; -export declare const upgradeWebSocket: UpgradeWebSocket; -export declare const websocket: BunWebSocketHandler; -/** - * @deprecated Import `createWebSocket` and `websocket` directly from `hono/bun` instead. - * @returns A function to create a Bun WebSocket handler. - */ -export declare const createBunWebSocket: () => CreateWebSocket; -export {}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/adapter/cloudflare-pages/handler.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/adapter/cloudflare-pages/handler.d.ts deleted file mode 100644 index c78b00e..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/adapter/cloudflare-pages/handler.d.ts +++ /dev/null @@ -1,33 +0,0 @@ -import type { Hono } from '../../hono'; -import type { BlankSchema, Env, Input, MiddlewareHandler, Schema } from '../../types'; -type Params

= Record; -export type EventContext> = { - request: Request; - functionPath: string; - waitUntil: (promise: Promise) => void; - passThroughOnException: () => void; - props: any; - next: (input?: Request | string, init?: RequestInit) => Promise; - env: Env & { - ASSETS: { - fetch: typeof fetch; - }; - }; - params: Params

; - data: Data; -}; -declare type PagesFunction = Record> = (context: EventContext) => Response | Promise; -export declare const handle: (app: Hono) => PagesFunction; -export declare function handleMiddleware(middleware: MiddlewareHandler): PagesFunction; -/** - * - * @description `serveStatic()` is for advanced mode: - * https://developers.cloudflare.com/pages/platform/functions/advanced-mode/#set-up-a-function - * - */ -export declare const serveStatic: () => MiddlewareHandler; -export {}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/adapter/cloudflare-pages/index.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/adapter/cloudflare-pages/index.d.ts deleted file mode 100644 index 4a7ff17..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/adapter/cloudflare-pages/index.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -/** - * @module - * Cloudflare Pages Adapter for Hono. - */ -export { handle, handleMiddleware, serveStatic } from './handler'; -export type { EventContext } from './handler'; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/adapter/cloudflare-workers/conninfo.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/adapter/cloudflare-workers/conninfo.d.ts deleted file mode 100644 index da71f88..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/adapter/cloudflare-workers/conninfo.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import type { GetConnInfo } from '../../helper/conninfo'; -export declare const getConnInfo: GetConnInfo; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/adapter/cloudflare-workers/index.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/adapter/cloudflare-workers/index.d.ts deleted file mode 100644 index c2ca01b..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/adapter/cloudflare-workers/index.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -/** - * @module - * Cloudflare Workers Adapter for Hono. - */ -export { serveStatic } from './serve-static-module'; -export { upgradeWebSocket } from './websocket'; -export { getConnInfo } from './conninfo'; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/adapter/cloudflare-workers/serve-static-module.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/adapter/cloudflare-workers/serve-static-module.d.ts deleted file mode 100644 index 59fbd2a..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/adapter/cloudflare-workers/serve-static-module.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import type { Env, MiddlewareHandler } from '../../types'; -import type { ServeStaticOptions } from './serve-static'; -declare const module: (options: Omit, "namespace">) => MiddlewareHandler; -export { module as serveStatic }; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/adapter/cloudflare-workers/serve-static.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/adapter/cloudflare-workers/serve-static.d.ts deleted file mode 100644 index a8d166d..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/adapter/cloudflare-workers/serve-static.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -import type { ServeStaticOptions as BaseServeStaticOptions } from '../../middleware/serve-static'; -import type { Env, MiddlewareHandler } from '../../types'; -export type ServeStaticOptions = BaseServeStaticOptions & { - namespace?: unknown; - manifest: object | string; -}; -/** - * @deprecated - * `serveStatic` in the Cloudflare Workers adapter is deprecated. - * You can serve static files directly using Cloudflare Static Assets. - * @see https://developers.cloudflare.com/workers/static-assets/ - * Cloudflare Static Assets is currently in open beta. If this doesn't work for you, - * please consider using Cloudflare Pages. You can start to create the Cloudflare Pages - * application with the `npm create hono@latest` command. - */ -export declare const serveStatic: (options: ServeStaticOptions) => MiddlewareHandler; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/adapter/cloudflare-workers/utils.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/adapter/cloudflare-workers/utils.d.ts deleted file mode 100644 index d406c18..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/adapter/cloudflare-workers/utils.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export type KVAssetOptions = { - manifest?: object | string; - namespace?: unknown; -}; -export declare const getContentFromKVAsset: (path: string, options?: KVAssetOptions) => Promise; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/adapter/cloudflare-workers/websocket.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/adapter/cloudflare-workers/websocket.d.ts deleted file mode 100644 index be35674..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/adapter/cloudflare-workers/websocket.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import type { UpgradeWebSocket, WSEvents } from '../../helper/websocket'; -export declare const upgradeWebSocket: UpgradeWebSocket, 'onOpen'>>; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/adapter/deno/conninfo.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/adapter/deno/conninfo.d.ts deleted file mode 100644 index d274def..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/adapter/deno/conninfo.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import type { GetConnInfo } from '../../helper/conninfo'; -/** - * Get conninfo with Deno - * @param c Context - * @returns ConnInfo - */ -export declare const getConnInfo: GetConnInfo; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/adapter/deno/index.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/adapter/deno/index.d.ts deleted file mode 100644 index d360f6d..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/adapter/deno/index.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -/** - * @module - * Deno Adapter for Hono. - */ -export { serveStatic } from './serve-static'; -export { toSSG, denoFileSystemModule } from './ssg'; -export { upgradeWebSocket } from './websocket'; -export { getConnInfo } from './conninfo'; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/adapter/deno/serve-static.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/adapter/deno/serve-static.d.ts deleted file mode 100644 index e79742d..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/adapter/deno/serve-static.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import type { ServeStaticOptions } from '../../middleware/serve-static'; -import type { Env, MiddlewareHandler } from '../../types'; -export declare const serveStatic: (options: ServeStaticOptions) => MiddlewareHandler; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/adapter/deno/ssg.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/adapter/deno/ssg.d.ts deleted file mode 100644 index 293e1f9..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/adapter/deno/ssg.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import type { FileSystemModule, ToSSGAdaptorInterface } from '../../helper/ssg/index'; -/** - * @experimental - * `denoFileSystemModule` is an experimental feature. - * The API might be changed. - */ -export declare const denoFileSystemModule: FileSystemModule; -/** - * @experimental - * `toSSG` is an experimental feature. - * The API might be changed. - */ -export declare const toSSG: ToSSGAdaptorInterface; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/adapter/deno/websocket.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/adapter/deno/websocket.d.ts deleted file mode 100644 index f391ccb..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/adapter/deno/websocket.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import type { UpgradeWebSocket } from '../../helper/websocket'; -export declare const upgradeWebSocket: UpgradeWebSocket; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/adapter/lambda-edge/conninfo.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/adapter/lambda-edge/conninfo.d.ts deleted file mode 100644 index da71f88..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/adapter/lambda-edge/conninfo.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import type { GetConnInfo } from '../../helper/conninfo'; -export declare const getConnInfo: GetConnInfo; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/adapter/lambda-edge/handler.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/adapter/lambda-edge/handler.d.ts deleted file mode 100644 index 67800f8..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/adapter/lambda-edge/handler.d.ts +++ /dev/null @@ -1,87 +0,0 @@ -import type { Hono } from '../../hono'; -interface CloudFrontHeader { - key: string; - value: string; -} -interface CloudFrontHeaders { - [name: string]: CloudFrontHeader[]; -} -interface CloudFrontCustomOrigin { - customHeaders: CloudFrontHeaders; - domainName: string; - keepaliveTimeout: number; - path: string; - port: number; - protocol: string; - readTimeout: number; - sslProtocols: string[]; -} -interface CloudFrontS3Origin { - authMethod: 'origin-access-identity' | 'none'; - customHeaders: CloudFrontHeaders; - domainName: string; - path: string; - region: string; -} -type CloudFrontOrigin = { - s3: CloudFrontS3Origin; - custom?: never; -} | { - custom: CloudFrontCustomOrigin; - s3?: never; -}; -export interface CloudFrontRequest { - clientIp: string; - headers: CloudFrontHeaders; - method: string; - querystring: string; - uri: string; - body?: { - inputTruncated: boolean; - action: string; - encoding: string; - data: string; - }; - origin?: CloudFrontOrigin; -} -export interface CloudFrontResponse { - headers: CloudFrontHeaders; - status: string; - statusDescription?: string; -} -export interface CloudFrontConfig { - distributionDomainName: string; - distributionId: string; - eventType: string; - requestId: string; -} -interface CloudFrontEvent { - cf: { - config: CloudFrontConfig; - request: CloudFrontRequest; - response?: CloudFrontResponse; - }; -} -export interface CloudFrontEdgeEvent { - Records: CloudFrontEvent[]; -} -type CloudFrontContext = {}; -export interface Callback { - (err: Error | null, result?: CloudFrontRequest | CloudFrontResult): void; -} -interface CloudFrontResult { - status: string; - statusDescription?: string; - headers?: { - [header: string]: { - key: string; - value: string; - }[]; - }; - body?: string; - bodyEncoding?: 'text' | 'base64'; -} -export declare const handle: (app: Hono) => ((event: CloudFrontEdgeEvent, context?: CloudFrontContext, callback?: Callback) => Promise); -export declare const createBody: (method: string, requestBody: CloudFrontRequest["body"]) => string | Uint8Array | undefined; -export declare const isContentTypeBinary: (contentType: string) => boolean; -export {}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/adapter/lambda-edge/index.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/adapter/lambda-edge/index.d.ts deleted file mode 100644 index 8889c41..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/adapter/lambda-edge/index.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -/** - * @module - * Lambda@Edge Adapter for Hono. - */ -export { handle } from './handler'; -export { getConnInfo } from './conninfo'; -export type { Callback, CloudFrontConfig, CloudFrontRequest, CloudFrontResponse, CloudFrontEdgeEvent, } from './handler'; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/adapter/netlify/handler.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/adapter/netlify/handler.d.ts deleted file mode 100644 index 6f49216..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/adapter/netlify/handler.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import type { Hono } from '../../hono'; -export declare const handle: (app: Hono) => ((req: Request, context: any) => Response | Promise); diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/adapter/netlify/index.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/adapter/netlify/index.d.ts deleted file mode 100644 index cd2b35c..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/adapter/netlify/index.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -/** - * @module - * Netlify Adapter for Hono. - */ -export * from './mod'; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/adapter/netlify/mod.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/adapter/netlify/mod.d.ts deleted file mode 100644 index a7583a3..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/adapter/netlify/mod.d.ts +++ /dev/null @@ -1 +0,0 @@ -export { handle } from './handler'; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/adapter/service-worker/handler.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/adapter/service-worker/handler.d.ts deleted file mode 100644 index b2c1c4f..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/adapter/service-worker/handler.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * Handler for Service Worker - * @module - */ -import type { Hono } from '../../hono'; -import type { Env, Schema } from '../../types'; -import type { FetchEvent } from './types'; -type Handler = (evt: FetchEvent) => void; -export type HandleOptions = { - fetch?: typeof fetch; -}; -/** - * Adapter for Service Worker - */ -export declare const handle: (app: Hono, opts?: HandleOptions) => Handler; -export {}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/adapter/service-worker/index.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/adapter/service-worker/index.d.ts deleted file mode 100644 index a89b3c7..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/adapter/service-worker/index.d.ts +++ /dev/null @@ -1,28 +0,0 @@ -/** - * Service Worker Adapter for Hono. - * @module - */ -import type { Hono } from '../../hono'; -import type { Env, Schema } from '../../types'; -import { handle } from './handler'; -import type { HandleOptions } from './handler'; -/** - * Registers a Hono app to handle fetch events in a service worker. - * This sets up `addEventListener('fetch', handle(app, options))` for the provided app. - * - * @param app - The Hono application instance - * @param options - Options for handling requests (fetch defaults to undefined) - * @example - * ```ts - * import { Hono } from 'hono' - * import { fire } from 'hono/service-worker' - * - * const app = new Hono() - * - * app.get('/', (c) => c.text('Hi')) - * - * fire(app) - * ``` - */ -declare const fire: (app: Hono, options?: HandleOptions) => void; -export { handle, fire }; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/adapter/service-worker/types.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/adapter/service-worker/types.d.ts deleted file mode 100644 index 66298f4..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/adapter/service-worker/types.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -interface ExtendableEvent extends Event { - waitUntil(f: Promise): void; -} -export interface FetchEvent extends ExtendableEvent { - readonly clientId: string; - readonly handled: Promise; - readonly preloadResponse: Promise; - readonly request: Request; - readonly resultingClientId: string; - respondWith(r: Response | PromiseLike): void; -} -export {}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/adapter/vercel/conninfo.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/adapter/vercel/conninfo.d.ts deleted file mode 100644 index da71f88..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/adapter/vercel/conninfo.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import type { GetConnInfo } from '../../helper/conninfo'; -export declare const getConnInfo: GetConnInfo; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/adapter/vercel/handler.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/adapter/vercel/handler.d.ts deleted file mode 100644 index 73bb38d..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/adapter/vercel/handler.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import type { Hono } from '../../hono'; -export declare const handle: (app: Hono) => (req: Request) => Response | Promise; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/adapter/vercel/index.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/adapter/vercel/index.d.ts deleted file mode 100644 index 8645b76..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/adapter/vercel/index.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -/** - * @module - * Vercel Adapter for Hono. - */ -export { handle } from './handler'; -export { getConnInfo } from './conninfo'; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/client/client.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/client/client.d.ts deleted file mode 100644 index 9a161b6..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/client/client.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import type { Hono } from '../hono'; -import type { UnionToIntersection } from '../utils/types'; -import type { Client, ClientRequestOptions } from './types'; -export declare const hc: , Prefix extends string = string>(baseUrl: Prefix, options?: ClientRequestOptions) => UnionToIntersection>; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/client/fetch-result-please.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/client/fetch-result-please.d.ts deleted file mode 100644 index f9558e0..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/client/fetch-result-please.d.ts +++ /dev/null @@ -1,35 +0,0 @@ -/** - * @description This file is a modified version of `fetch-result-please` (`ofetch`), minimalized and adapted to Hono's custom needs. - * - * @link https://www.npmjs.com/package/fetch-result-please - */ -/** - * Smartly parses and return the consumable result from a fetch `Response`. - * - * Throwing a structured error if the response is not `ok`. ({@link DetailedError}) - */ -export declare function fetchRP(fetchRes: Response | Promise): Promise; -export declare class DetailedError extends Error { - /** - * Additional `message` that will be logged AND returned to client - */ - detail?: any; - /** - * Additional `code` that will be logged AND returned to client - */ - code?: any; - /** - * Additional value that will be logged AND NOT returned to client - */ - log?: any; - /** - * Optionally set the status code to return, in a web server context - */ - statusCode?: any; - constructor(message: string, options?: { - detail?: any; - code?: any; - statusCode?: number; - log?: any; - }); -} diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/client/index.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/client/index.d.ts deleted file mode 100644 index 7530b6c..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/client/index.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -/** - * @module - * The HTTP Client for Hono. - */ -export { hc } from './client'; -export { parseResponse, DetailedError } from './utils'; -export type { InferResponseType, InferRequestType, Fetch, ClientRequestOptions, ClientRequest, ClientResponse, } from './types'; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/client/types.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/client/types.d.ts deleted file mode 100644 index 7c0e9f9..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/client/types.d.ts +++ /dev/null @@ -1,155 +0,0 @@ -import type { Hono } from '../hono'; -import type { HonoBase } from '../hono-base'; -import type { Endpoint, ResponseFormat, Schema } from '../types'; -import type { StatusCode, SuccessStatusCode } from '../utils/http-status'; -import type { HasRequiredKeys } from '../utils/types'; -type HonoRequest = (typeof Hono.prototype)['request']; -export type BuildSearchParamsFn = (query: Record) => URLSearchParams; -export type ClientRequestOptions = { - fetch?: typeof fetch | HonoRequest; - webSocket?: (...args: ConstructorParameters) => WebSocket; - /** - * Standard `RequestInit`, caution that this take highest priority - * and could be used to overwrite things that Hono sets for you, like `body | method | headers`. - * - * If you want to add some headers, use in `headers` instead of `init` - */ - init?: RequestInit; - /** - * Custom function to serialize query parameters into URLSearchParams. - * By default, arrays are serialized as multiple parameters with the same key (e.g., `key=a&key=b`). - * You can provide a custom function to change this behavior, for example to use bracket notation (e.g., `key[]=a&key[]=b`). - * - * @example - * ```ts - * const client = hc('http://localhost', { - * buildSearchParams: (query) => { - * return new URLSearchParams(qs.stringify(query)) - * } - * }) - * ``` - */ - buildSearchParams?: BuildSearchParamsFn; -} & (keyof T extends never ? { - headers?: Record | (() => Record | Promise>); -} : { - headers: T | (() => T | Promise); -}); -export type ClientRequest = { - [M in keyof S]: S[M] extends Endpoint & { - input: infer R; - } ? R extends object ? HasRequiredKeys extends true ? (args: R, options?: ClientRequestOptions) => Promise> : (args?: R, options?: ClientRequestOptions) => Promise> : never : never; -} & { - $url: (arg?: Arg) => HonoURL; -} & (S['$get'] extends { - outputFormat: 'ws'; -} ? S['$get'] extends { - input: infer I; -} ? { - $ws: (args?: I) => WebSocket; -} : {} : {}); -type ClientResponseOfEndpoint = T extends { - output: infer O; - outputFormat: infer F; - status: infer S; -} ? ClientResponse : never; -export interface ClientResponse extends globalThis.Response { - readonly body: ReadableStream | null; - readonly bodyUsed: boolean; - ok: U extends SuccessStatusCode ? true : U extends Exclude ? false : boolean; - status: U; - statusText: string; - headers: Headers; - url: string; - redirect(url: string, status: number): Response; - clone(): Response; - json(): F extends 'text' ? Promise : F extends 'json' ? Promise : Promise; - text(): F extends 'text' ? (T extends string ? Promise : Promise) : Promise; - blob(): Promise; - formData(): Promise; - arrayBuffer(): Promise; -} -type HonoURL = IsLiteral extends true ? TrimEndSlash extends `${infer Protocol}://${infer Rest}` ? Rest extends `${infer Hostname}/${infer P}` ? ParseHostName extends [infer Host extends string, infer Port extends string] ? Arg extends { - param: infer Param; -} ? Arg extends { - query: infer Query; -} ? IsEmptyObject extends true ? TypedURL<`${Protocol}:`, Host, Port, `${ApplyParam, Param>}`, ''> : TypedURL<`${Protocol}:`, Host, Port, `${ApplyParam, Param>}`, `?${string}`> : TypedURL<`${Protocol}:`, Host, Port, `${ApplyParam, Param>}`, ''> : Arg extends { - query: infer Query; -} ? IsEmptyObject extends true ? TypedURL<`${Protocol}:`, Host, Port, `/${TrimStartSlash

}`, ''> : TypedURL<`${Protocol}:`, Host, Port, `/${TrimStartSlash

}`, `?${string}`> : TypedURL<`${Protocol}:`, Host, Port, `/${TrimStartSlash

}`, ''> : never : ParseHostName extends [infer Host extends string, infer Port extends string] ? Arg extends { - param: infer Param; -} ? Arg extends { - query: infer Query; -} ? IsEmptyObject extends true ? TypedURL<`${Protocol}:`, Host, Port, `${ApplyParam, Param>}`, ''> : TypedURL<`${Protocol}:`, Host, Port, `${ApplyParam, Param>}`, `?${string}`> : TypedURL<`${Protocol}:`, Host, Port, `${ApplyParam, Param>}`, ''> : Arg extends { - query: infer Query; -} ? IsEmptyObject extends true ? TypedURL<`${Protocol}:`, Host, Port, `/${TrimStartSlash}`, ''> : TypedURL<`${Protocol}:`, Host, Port, `/${TrimStartSlash}`, `?${string}`> : TypedURL<`${Protocol}:`, Host, Port, `/${TrimStartSlash}`, ''> : never : URL : URL; -type ParseHostName = T extends `${infer Host}:${infer Port}` ? [Host, Port] : [T, '']; -type TrimStartSlash = T extends `/${infer R}` ? TrimStartSlash : T; -type TrimEndSlash = T extends `${infer R}/` ? TrimEndSlash : T; -type IsLiteral = [T] extends [never] ? false : string extends T ? false : true; -type ApplyParam = Path extends `${infer Head}/${infer Rest}` ? Head extends `:${infer Param}` ? P extends Record ? IsLiteral extends true ? ApplyParam : ApplyParam : ApplyParam : ApplyParam : Path extends `:${infer Param}` ? P extends Record ? IsLiteral extends true ? `${Result}/${Value & string}` : `${Result}/${Path}` : `${Result}/${Path}` : `${Result}/${Path}`; -type IsEmptyObject = keyof T extends never ? true : false; -export interface TypedURL extends URL { - protocol: Protocol; - hostname: Hostname; - port: Port; - host: Port extends '' ? Hostname : `${Hostname}:${Port}`; - origin: `${Protocol}//${Hostname}${Port extends '' ? '' : `:${Port}`}`; - pathname: Pathname; - search: Search; - href: `${Protocol}//${Hostname}${Port extends '' ? '' : `:${Port}`}${Pathname}${Search}`; -} -export interface Response extends ClientResponse { -} -export type Fetch = (args?: InferRequestType, opt?: ClientRequestOptions) => Promise>>; -type InferEndpointType = T extends (args: infer R, options: any | undefined) => Promise ? U extends ClientResponse ? { - input: NonNullable; - output: O; - outputFormat: F; - status: S; -} extends Endpoint ? { - input: NonNullable; - output: O; - outputFormat: F; - status: S; -} : never : never : never; -export type InferResponseType = InferResponseTypeFromEndpoint, U>; -type InferResponseTypeFromEndpoint = T extends { - output: infer O; - status: infer S; -} ? S extends U ? O : never : never; -export type InferRequestType = T extends (args: infer R, options: any | undefined) => Promise> ? NonNullable : never; -export type InferRequestOptionsType = T extends (args: any, options: infer R) => Promise> ? NonNullable : never; -/** - * Filter a ClientResponse type so it only includes responses of specific status codes. - */ -export type FilterClientResponseByStatusCode, U extends number = StatusCode> = T extends ClientResponse ? RC extends U ? ClientResponse : never : never; -type PathToChain = Path extends `/${infer P}` ? PathToChain : Path extends `${infer P}/${infer R}` ? { - [K in P]: PathToChain; -} : { - [K in Path extends '' ? 'index' : Path]: ClientRequest ? E[Original] : never>; -}; -export type Client = T extends HonoBase ? S extends Record ? K extends string ? PathToChain : never : never : never; -export type Callback = (opts: CallbackOptions) => unknown; -interface CallbackOptions { - path: string[]; - args: any[]; -} -export type ObjectType = { - [key: string]: T; -}; -export {}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/client/utils.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/client/utils.d.ts deleted file mode 100644 index 496020b..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/client/utils.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import type { ClientErrorStatusCode, ContentfulStatusCode, ServerErrorStatusCode } from '../utils/http-status'; -import { DetailedError } from './fetch-result-please'; -import type { ClientResponse, FilterClientResponseByStatusCode } from './types'; -export { DetailedError }; -export declare const mergePath: (base: string, path: string) => string; -export declare const replaceUrlParam: (urlString: string, params: Record) => string; -export declare const buildSearchParams: (query: Record) => URLSearchParams; -export declare const replaceUrlProtocol: (urlString: string, protocol: "ws" | "http") => string; -export declare const removeIndexString: (urlString: string) => string; -export declare function deepMerge(target: T, source: Record): T; -/** - * Shortcut to get a consumable response from `hc`'s fetch calls (Response), with types inference. - * - * Smartly parse the response data, throwing a structured error if the response is not `ok`. ({@link DetailedError}) - * - * @example const result = await parseResponse(client.posts.$get()) - */ -export declare function parseResponse>(fetchRes: T | Promise): Promise> extends never ? undefined : FilterClientResponseByStatusCode> extends ClientResponse ? RF extends 'json' ? RT : RT extends string ? RT : string : undefined>; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/compose.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/compose.d.ts deleted file mode 100644 index 937905e..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/compose.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import type { Context } from './context'; -import type { Env, ErrorHandler, Next, NotFoundHandler } from './types'; -/** - * Compose middleware functions into a single function based on `koa-compose` package. - * - * @template E - The environment type. - * - * @param {[[Function, unknown], unknown][] | [[Function]][]} middleware - An array of middleware functions and their corresponding parameters. - * @param {ErrorHandler} [onError] - An optional error handler function. - * @param {NotFoundHandler} [onNotFound] - An optional not-found handler function. - * - * @returns {(context: Context, next?: Next) => Promise} - A composed middleware function. - */ -export declare const compose: (middleware: [[Function, unknown], unknown][] | [[Function]][], onError?: ErrorHandler, onNotFound?: NotFoundHandler) => ((context: Context, next?: Next) => Promise); diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/context.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/context.d.ts deleted file mode 100644 index 6ad1223..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/context.d.ts +++ /dev/null @@ -1,451 +0,0 @@ -import { HonoRequest } from './request'; -import type { Result } from './router'; -import type { Env, FetchEventLike, H, Input, NotFoundHandler, RouterRoute, TypedResponse } from './types'; -import type { ResponseHeader } from './utils/headers'; -import type { ContentfulStatusCode, RedirectStatusCode, StatusCode } from './utils/http-status'; -import type { BaseMime } from './utils/mime'; -import type { InvalidJSONValue, IsAny, JSONParsed, JSONValue } from './utils/types'; -type HeaderRecord = Record<'Content-Type', BaseMime> | Record | Record; -/** - * Data type can be a string, ArrayBuffer, Uint8Array (buffer), or ReadableStream. - */ -export type Data = string | ArrayBuffer | ReadableStream | Uint8Array; -/** - * Interface for the execution context in a web worker or similar environment. - */ -export interface ExecutionContext { - /** - * Extends the lifetime of the event callback until the promise is settled. - * - * @param promise - A promise to wait for. - */ - waitUntil(promise: Promise): void; - /** - * Allows the event to be passed through to subsequent event listeners. - */ - passThroughOnException(): void; - /** - * For compatibility with Wrangler 4.x. - */ - props: any; -} -/** - * Interface for context variable mapping. - */ -export interface ContextVariableMap { -} -/** - * Interface for context renderer. - */ -export interface ContextRenderer { -} -/** - * Interface representing a renderer for content. - * - * @interface DefaultRenderer - * @param {string | Promise} content - The content to be rendered, which can be either a string or a Promise resolving to a string. - * @returns {Response | Promise} - The response after rendering the content, which can be either a Response or a Promise resolving to a Response. - */ -interface DefaultRenderer { - (content: string | Promise): Response | Promise; -} -/** - * Renderer type which can either be a ContextRenderer or DefaultRenderer. - */ -export type Renderer = ContextRenderer extends Function ? ContextRenderer : DefaultRenderer; -/** - * Extracts the props for the renderer. - */ -export type PropsForRenderer = [...Required>] extends [unknown, infer Props] ? Props : unknown; -export type Layout> = (props: T) => any; -/** - * Interface for getting context variables. - * - * @template E - Environment type. - */ -interface Get { - (key: Key): E['Variables'][Key]; - (key: Key): ContextVariableMap[Key]; -} -/** - * Interface for setting context variables. - * - * @template E - Environment type. - */ -interface Set { - (key: Key, value: E['Variables'][Key]): void; - (key: Key, value: ContextVariableMap[Key]): void; -} -/** - * Interface for creating a new response. - */ -interface NewResponse { - (data: Data | null, status?: StatusCode, headers?: HeaderRecord): Response; - (data: Data | null, init?: ResponseOrInit): Response; -} -/** - * Interface for responding with a body. - */ -interface BodyRespond { - (data: T, status?: U, headers?: HeaderRecord): Response & TypedResponse; - (data: T, init?: ResponseOrInit): Response & TypedResponse; - (data: T, status?: U, headers?: HeaderRecord): Response & TypedResponse; - (data: T, init?: ResponseOrInit): Response & TypedResponse; -} -/** - * Interface for responding with text. - * - * @interface TextRespond - * @template T - The type of the text content. - * @template U - The type of the status code. - * - * @param {T} text - The text content to be included in the response. - * @param {U} [status] - An optional status code for the response. - * @param {HeaderRecord} [headers] - An optional record of headers to include in the response. - * - * @returns {Response & TypedResponse} - The response after rendering the text content, typed with the provided text and status code types. - */ -interface TextRespond { - (text: T, status?: U, headers?: HeaderRecord): Response & TypedResponse; - (text: T, init?: ResponseOrInit): Response & TypedResponse; -} -/** - * Interface for responding with JSON. - * - * @interface JSONRespond - * @template T - The type of the JSON value or simplified unknown type. - * @template U - The type of the status code. - * - * @param {T} object - The JSON object to be included in the response. - * @param {U} [status] - An optional status code for the response. - * @param {HeaderRecord} [headers] - An optional record of headers to include in the response. - * - * @returns {JSONRespondReturn} - The response after rendering the JSON object, typed with the provided object and status code types. - */ -interface JSONRespond { - (object: T, status?: U, headers?: HeaderRecord): JSONRespondReturn; - (object: T, init?: ResponseOrInit): JSONRespondReturn; -} -/** - * @template T - The type of the JSON value or simplified unknown type. - * @template U - The type of the status code. - * - * @returns {Response & TypedResponse, U, 'json'>} - The response after rendering the JSON object, typed with the provided object and status code types. - */ -type JSONRespondReturn = Response & TypedResponse, U, 'json'>; -/** - * Interface representing a function that responds with HTML content. - * - * @param html - The HTML content to respond with, which can be a string or a Promise that resolves to a string. - * @param status - (Optional) The HTTP status code for the response. - * @param headers - (Optional) A record of headers to include in the response. - * @param init - (Optional) The response initialization object. - * - * @returns A Response object or a Promise that resolves to a Response object. - */ -interface HTMLRespond { - >(html: T, status?: ContentfulStatusCode, headers?: HeaderRecord): T extends string ? Response : Promise; - >(html: T, init?: ResponseOrInit): T extends string ? Response : Promise; -} -/** - * Options for configuring the context. - * - * @template E - Environment type. - */ -type ContextOptions = { - /** - * Bindings for the environment. - */ - env: E['Bindings']; - /** - * Execution context for the request. - */ - executionCtx?: FetchEventLike | ExecutionContext | undefined; - /** - * Handler for not found responses. - */ - notFoundHandler?: NotFoundHandler; - matchResult?: Result<[H, RouterRoute]>; - path?: string; -}; -interface SetHeadersOptions { - append?: boolean; -} -interface SetHeaders { - (name: 'Content-Type', value?: BaseMime, options?: SetHeadersOptions): void; - (name: ResponseHeader, value?: string, options?: SetHeadersOptions): void; - (name: string, value?: string, options?: SetHeadersOptions): void; -} -type ResponseHeadersInit = [string, string][] | Record<'Content-Type', BaseMime> | Record | Record | Headers; -interface ResponseInit { - headers?: ResponseHeadersInit; - status?: T; - statusText?: string; -} -type ResponseOrInit = ResponseInit | Response; -export declare const TEXT_PLAIN = "text/plain; charset=UTF-8"; -export declare class Context { - - /** - * `.env` can get bindings (environment variables, secrets, KV namespaces, D1 database, R2 bucket etc.) in Cloudflare Workers. - * - * @see {@link https://hono.dev/docs/api/context#env} - * - * @example - * ```ts - * // Environment object for Cloudflare Workers - * app.get('*', async c => { - * const counter = c.env.COUNTER - * }) - * ``` - */ - env: E['Bindings']; - finalized: boolean; - /** - * `.error` can get the error object from the middleware if the Handler throws an error. - * - * @see {@link https://hono.dev/docs/api/context#error} - * - * @example - * ```ts - * app.use('*', async (c, next) => { - * await next() - * if (c.error) { - * // do something... - * } - * }) - * ``` - */ - error: Error | undefined; - /** - * Creates an instance of the Context class. - * - * @param req - The Request object. - * @param options - Optional configuration options for the context. - */ - constructor(req: Request, options?: ContextOptions); - /** - * `.req` is the instance of {@link HonoRequest}. - */ - get req(): HonoRequest; - /** - * @see {@link https://hono.dev/docs/api/context#event} - * The FetchEvent associated with the current request. - * - * @throws Will throw an error if the context does not have a FetchEvent. - */ - get event(): FetchEventLike; - /** - * @see {@link https://hono.dev/docs/api/context#executionctx} - * The ExecutionContext associated with the current request. - * - * @throws Will throw an error if the context does not have an ExecutionContext. - */ - get executionCtx(): ExecutionContext; - /** - * @see {@link https://hono.dev/docs/api/context#res} - * The Response object for the current request. - */ - get res(): Response; - /** - * Sets the Response object for the current request. - * - * @param _res - The Response object to set. - */ - set res(_res: Response | undefined); - /** - * `.render()` can create a response within a layout. - * - * @see {@link https://hono.dev/docs/api/context#render-setrenderer} - * - * @example - * ```ts - * app.get('/', (c) => { - * return c.render('Hello!') - * }) - * ``` - */ - render: Renderer; - /** - * Sets the layout for the response. - * - * @param layout - The layout to set. - * @returns The layout function. - */ - setLayout: (layout: Layout) => Layout; - /** - * Gets the current layout for the response. - * - * @returns The current layout function. - */ - getLayout: () => Layout | undefined; - /** - * `.setRenderer()` can set the layout in the custom middleware. - * - * @see {@link https://hono.dev/docs/api/context#render-setrenderer} - * - * @example - * ```tsx - * app.use('*', async (c, next) => { - * c.setRenderer((content) => { - * return c.html( - * - * - *

{content}

- * - * - * ) - * }) - * await next() - * }) - * ``` - */ - setRenderer: (renderer: Renderer) => void; - /** - * `.header()` can set headers. - * - * @see {@link https://hono.dev/docs/api/context#header} - * - * @example - * ```ts - * app.get('/welcome', (c) => { - * // Set headers - * c.header('X-Message', 'Hello!') - * c.header('Content-Type', 'text/plain') - * - * return c.body('Thank you for coming') - * }) - * ``` - */ - header: SetHeaders; - status: (status: StatusCode) => void; - /** - * `.set()` can set the value specified by the key. - * - * @see {@link https://hono.dev/docs/api/context#set-get} - * - * @example - * ```ts - * app.use('*', async (c, next) => { - * c.set('message', 'Hono is hot!!') - * await next() - * }) - * ``` - */ - set: Set extends true ? { - Variables: ContextVariableMap & Record; - } : E>; - /** - * `.get()` can use the value specified by the key. - * - * @see {@link https://hono.dev/docs/api/context#set-get} - * - * @example - * ```ts - * app.get('/', (c) => { - * const message = c.get('message') - * return c.text(`The message is "${message}"`) - * }) - * ``` - */ - get: Get extends true ? { - Variables: ContextVariableMap & Record; - } : E>; - /** - * `.var` can access the value of a variable. - * - * @see {@link https://hono.dev/docs/api/context#var} - * - * @example - * ```ts - * const result = c.var.client.oneMethod() - * ``` - */ - get var(): Readonly extends true ? Record : E['Variables'])>; - newResponse: NewResponse; - /** - * `.body()` can return the HTTP response. - * You can set headers with `.header()` and set HTTP status code with `.status`. - * This can also be set in `.text()`, `.json()` and so on. - * - * @see {@link https://hono.dev/docs/api/context#body} - * - * @example - * ```ts - * app.get('/welcome', (c) => { - * // Set headers - * c.header('X-Message', 'Hello!') - * c.header('Content-Type', 'text/plain') - * // Set HTTP status code - * c.status(201) - * - * // Return the response body - * return c.body('Thank you for coming') - * }) - * ``` - */ - body: BodyRespond; - /** - * `.text()` can render text as `Content-Type:text/plain`. - * - * @see {@link https://hono.dev/docs/api/context#text} - * - * @example - * ```ts - * app.get('/say', (c) => { - * return c.text('Hello!') - * }) - * ``` - */ - text: TextRespond; - /** - * `.json()` can render JSON as `Content-Type:application/json`. - * - * @see {@link https://hono.dev/docs/api/context#json} - * - * @example - * ```ts - * app.get('/api', (c) => { - * return c.json({ message: 'Hello!' }) - * }) - * ``` - */ - json: JSONRespond; - html: HTMLRespond; - /** - * `.redirect()` can Redirect, default status code is 302. - * - * @see {@link https://hono.dev/docs/api/context#redirect} - * - * @example - * ```ts - * app.get('/redirect', (c) => { - * return c.redirect('/') - * }) - * app.get('/redirect-permanently', (c) => { - * return c.redirect('/', 301) - * }) - * ``` - */ - redirect: (location: string | URL, status?: T) => Response & TypedResponse; - /** - * `.notFound()` can return the Not Found Response. - * - * @see {@link https://hono.dev/docs/api/context#notfound} - * - * @example - * ```ts - * app.get('/notfound', (c) => { - * return c.notFound() - * }) - * ``` - */ - notFound: () => ReturnType; -} -export {}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/helper/accepts/accepts.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/helper/accepts/accepts.d.ts deleted file mode 100644 index 55cbee1..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/helper/accepts/accepts.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -import type { Context } from '../../context'; -import type { AcceptHeader } from '../../utils/headers'; -export interface Accept { - type: string; - params: Record; - q: number; -} -export interface acceptsConfig { - header: AcceptHeader; - supports: string[]; - default: string; -} -export interface acceptsOptions extends acceptsConfig { - match?: (accepts: Accept[], config: acceptsConfig) => string; -} -export declare const defaultMatch: (accepts: Accept[], config: acceptsConfig) => string; -/** - * Match the accept header with the given options. - * @example - * ```ts - * app.get('/users', (c) => { - * const lang = accepts(c, { - * header: 'Accept-Language', - * supports: ['en', 'zh'], - * default: 'en', - * }) - * }) - * ``` - */ -export declare const accepts: (c: Context, options: acceptsOptions) => string; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/helper/accepts/index.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/helper/accepts/index.d.ts deleted file mode 100644 index 946d23e..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/helper/accepts/index.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -/** - * @module - * Accepts Helper for Hono. - */ -export { accepts } from './accepts'; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/helper/adapter/index.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/helper/adapter/index.d.ts deleted file mode 100644 index 838391a..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/helper/adapter/index.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -/** - * @module - * Adapter Helper for Hono. - */ -import type { Context } from '../../context'; -export type Runtime = 'node' | 'deno' | 'bun' | 'workerd' | 'fastly' | 'edge-light' | 'other'; -export declare const env: , C extends Context = Context<{ - Bindings: T; -}>>(c: T extends Record ? Context : C, runtime?: Runtime) => T & C["env"]; -export declare const knownUserAgents: Partial>; -export declare const getRuntimeKey: () => Runtime; -export declare const checkUserAgentEquals: (platform: string) => boolean; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/helper/conninfo/index.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/helper/conninfo/index.d.ts deleted file mode 100644 index 876fb1d..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/helper/conninfo/index.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -/** - * @module - * ConnInfo Helper for Hono. - */ -export type { AddressType, NetAddrInfo, ConnInfo, GetConnInfo } from './types'; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/helper/conninfo/types.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/helper/conninfo/types.d.ts deleted file mode 100644 index 466af76..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/helper/conninfo/types.d.ts +++ /dev/null @@ -1,36 +0,0 @@ -import type { Context } from '../../context'; -export type AddressType = 'IPv6' | 'IPv4' | undefined; -export type NetAddrInfo = { - /** - * Transport protocol type - */ - transport?: 'tcp' | 'udp'; - /** - * Transport port number - */ - port?: number; - address?: string; - addressType?: AddressType; -} & ({ - /** - * Host name such as IP Addr - */ - address: string; - /** - * Host name type - */ - addressType: AddressType; -} | {}); -/** - * HTTP Connection information - */ -export interface ConnInfo { - /** - * Remote information - */ - remote: NetAddrInfo; -} -/** - * Helper type - */ -export type GetConnInfo = (c: Context) => ConnInfo; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/helper/cookie/index.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/helper/cookie/index.d.ts deleted file mode 100644 index cc421b9..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/helper/cookie/index.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -/** - * @module - * Cookie Helper for Hono. - */ -import type { Context } from '../../context'; -import type { Cookie, CookieOptions, CookiePrefixOptions, SignedCookie } from '../../utils/cookie'; -interface GetCookie { - (c: Context, key: string): string | undefined; - (c: Context): Cookie; - (c: Context, key: string, prefixOptions?: CookiePrefixOptions): string | undefined; -} -interface GetSignedCookie { - (c: Context, secret: string | BufferSource, key: string): Promise; - (c: Context, secret: string | BufferSource): Promise; - (c: Context, secret: string | BufferSource, key: string, prefixOptions?: CookiePrefixOptions): Promise; -} -export declare const getCookie: GetCookie; -export declare const getSignedCookie: GetSignedCookie; -export declare const generateCookie: (name: string, value: string, opt?: CookieOptions) => string; -export declare const setCookie: (c: Context, name: string, value: string, opt?: CookieOptions) => void; -export declare const generateSignedCookie: (name: string, value: string, secret: string | BufferSource, opt?: CookieOptions) => Promise; -export declare const setSignedCookie: (c: Context, name: string, value: string, secret: string | BufferSource, opt?: CookieOptions) => Promise; -export declare const deleteCookie: (c: Context, name: string, opt?: CookieOptions) => string | undefined; -export {}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/helper/css/common.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/helper/css/common.d.ts deleted file mode 100644 index a71ff80..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/helper/css/common.d.ts +++ /dev/null @@ -1,42 +0,0 @@ -export declare const PSEUDO_GLOBAL_SELECTOR = ":-hono-global"; -export declare const isPseudoGlobalSelectorRe: RegExp; -export declare const DEFAULT_STYLE_ID = "hono-css"; -export declare const SELECTOR: unique symbol; -export declare const CLASS_NAME: unique symbol; -export declare const STYLE_STRING: unique symbol; -export declare const SELECTORS: unique symbol; -export declare const EXTERNAL_CLASS_NAMES: unique symbol; -declare const CSS_ESCAPED: unique symbol; -export interface CssClassName { - [SELECTOR]: string; - [CLASS_NAME]: string; - [STYLE_STRING]: string; - [SELECTORS]: CssClassName[]; - [EXTERNAL_CLASS_NAMES]: string[]; -} -export declare const IS_CSS_ESCAPED: unique symbol; -interface CssEscapedString { - [CSS_ESCAPED]: string; -} -/** - * @experimental - * `rawCssString` is an experimental feature. - * The API might be changed. - */ -export declare const rawCssString: (value: string) => CssEscapedString; -export declare const minify: (css: string) => string; -type CssVariableBasicType = CssClassName | CssEscapedString | string | number | boolean | null | undefined; -type CssVariableAsyncType = Promise; -type CssVariableArrayType = (CssVariableBasicType | CssVariableAsyncType)[]; -export type CssVariableType = CssVariableBasicType | CssVariableAsyncType | CssVariableArrayType; -export declare const buildStyleString: (strings: TemplateStringsArray, values: CssVariableType[]) => [string, string, CssClassName[], string[]]; -export declare const cssCommon: (strings: TemplateStringsArray, values: CssVariableType[]) => CssClassName; -export declare const cxCommon: (args: (string | boolean | null | undefined | CssClassName)[]) => (string | boolean | null | undefined | CssClassName)[]; -export declare const keyframesCommon: (strings: TemplateStringsArray, ...values: CssVariableType[]) => CssClassName; -type ViewTransitionType = { - (strings: TemplateStringsArray, values: CssVariableType[]): CssClassName; - (content: CssClassName): CssClassName; - (): CssClassName; -}; -export declare const viewTransitionCommon: ViewTransitionType; -export {}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/helper/css/index.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/helper/css/index.d.ts deleted file mode 100644 index 9a74aae..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/helper/css/index.d.ts +++ /dev/null @@ -1,73 +0,0 @@ -/** - * @module - * css Helper for Hono. - */ -import type { HtmlEscapedString } from '../../utils/html'; -import type { CssClassName as CssClassNameCommon, CssVariableType } from './common'; -export { rawCssString } from './common'; -type CssClassName = HtmlEscapedString & CssClassNameCommon; -interface CssType { - (strings: TemplateStringsArray, ...values: CssVariableType[]): Promise; -} -interface CxType { - (...args: (CssClassName | Promise | string | boolean | null | undefined)[]): Promise; -} -interface KeyframesType { - (strings: TemplateStringsArray, ...values: CssVariableType[]): CssClassNameCommon; -} -interface ViewTransitionType { - (strings: TemplateStringsArray, ...values: CssVariableType[]): Promise; - (content: Promise): Promise; - (): Promise; -} -interface StyleType { - (args?: { - children?: Promise; - nonce?: string; - }): HtmlEscapedString; -} -/** - * @experimental - * `createCssContext` is an experimental feature. - * The API might be changed. - */ -export declare const createCssContext: ({ id }: { - id: Readonly; -}) => DefaultContextType; -interface DefaultContextType { - css: CssType; - cx: CxType; - keyframes: KeyframesType; - viewTransition: ViewTransitionType; - Style: StyleType; -} -/** - * @experimental - * `css` is an experimental feature. - * The API might be changed. - */ -export declare const css: CssType; -/** - * @experimental - * `cx` is an experimental feature. - * The API might be changed. - */ -export declare const cx: CxType; -/** - * @experimental - * `keyframes` is an experimental feature. - * The API might be changed. - */ -export declare const keyframes: KeyframesType; -/** - * @experimental - * `viewTransition` is an experimental feature. - * The API might be changed. - */ -export declare const viewTransition: ViewTransitionType; -/** - * @experimental - * `Style` is an experimental feature. - * The API might be changed. - */ -export declare const Style: StyleType; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/helper/dev/index.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/helper/dev/index.d.ts deleted file mode 100644 index 28eb408..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/helper/dev/index.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * @module - * Dev Helper for Hono. - */ -import type { Hono } from '../../hono'; -import type { Env } from '../../types'; -interface ShowRoutesOptions { - verbose?: boolean; - colorize?: boolean; -} -interface RouteData { - path: string; - method: string; - name: string; - isMiddleware: boolean; -} -export declare const inspectRoutes: (hono: Hono) => RouteData[]; -export declare const showRoutes: (hono: Hono, opts?: ShowRoutesOptions) => void; -export declare const getRouterName: (app: Hono) => string; -export {}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/helper/factory/index.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/helper/factory/index.d.ts deleted file mode 100644 index f14b48a..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/helper/factory/index.d.ts +++ /dev/null @@ -1,82 +0,0 @@ -/** - * @module - * Factory Helper for Hono. - */ -import { Hono } from '../../hono'; -import type { HonoOptions } from '../../hono-base'; -import type { Env, H, HandlerResponse, Input, IntersectNonAnyTypes, MiddlewareHandler } from '../../types'; -type InitApp = (app: Hono) => void; -export interface CreateHandlersInterface { - = any, E2 extends Env = E>(handler1: H): [H]; - = any, R2 extends HandlerResponse = any, E2 extends Env = E, E3 extends Env = IntersectNonAnyTypes<[E, E2]>>(handler1: H, handler2: H): [H, H]; - = any, R2 extends HandlerResponse = any, R3 extends HandlerResponse = any, E2 extends Env = E, E3 extends Env = IntersectNonAnyTypes<[E, E2]>, E4 extends Env = IntersectNonAnyTypes<[E, E2, E3]>>(handler1: H, handler2: H, handler3: H): [H, H, H]; - = any, R2 extends HandlerResponse = any, R3 extends HandlerResponse = any, R4 extends HandlerResponse = any, E2 extends Env = E, E3 extends Env = IntersectNonAnyTypes<[E, E2]>, E4 extends Env = IntersectNonAnyTypes<[E, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4]>>(handler1: H, handler2: H, handler3: H, handler4: H): [H, H, H, H]; - = any, R2 extends HandlerResponse = any, R3 extends HandlerResponse = any, R4 extends HandlerResponse = any, R5 extends HandlerResponse = any, E2 extends Env = E, E3 extends Env = IntersectNonAnyTypes<[E, E2]>, E4 extends Env = IntersectNonAnyTypes<[E, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4]>, E6 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5]>>(handler1: H, handler2: H, handler3: H, handler4: H, handler5: H): [H, H, H, H, H]; - = any, R2 extends HandlerResponse = any, R3 extends HandlerResponse = any, R4 extends HandlerResponse = any, R5 extends HandlerResponse = any, R6 extends HandlerResponse = any, E2 extends Env = E, E3 extends Env = IntersectNonAnyTypes<[E, E2]>, E4 extends Env = IntersectNonAnyTypes<[E, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4]>, E6 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5]>, E7 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6]>>(handler1: H, handler2: H, handler3: H, handler4: H, handler5: H, handler6: H): [ - H, - H, - H, - H, - H, - H - ]; - = any, R2 extends HandlerResponse = any, R3 extends HandlerResponse = any, R4 extends HandlerResponse = any, R5 extends HandlerResponse = any, R6 extends HandlerResponse = any, R7 extends HandlerResponse = any, E2 extends Env = E, E3 extends Env = IntersectNonAnyTypes<[E, E2]>, E4 extends Env = IntersectNonAnyTypes<[E, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4]>, E6 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5]>, E7 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6]>, E8 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7]>>(handler1: H, handler2: H, handler3: H, handler4: H, handler5: H, handler6: H, handler7: H): [ - H, - H, - H, - H, - H, - H, - H - ]; - = any, R2 extends HandlerResponse = any, R3 extends HandlerResponse = any, R4 extends HandlerResponse = any, R5 extends HandlerResponse = any, R6 extends HandlerResponse = any, R7 extends HandlerResponse = any, R8 extends HandlerResponse = any, E2 extends Env = E, E3 extends Env = IntersectNonAnyTypes<[E, E2]>, E4 extends Env = IntersectNonAnyTypes<[E, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4]>, E6 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5]>, E7 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6]>, E8 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7]>, E9 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7, E8]>>(handler1: H, handler2: H, handler3: H, handler4: H, handler5: H, handler6: H, handler7: H, handler8: H): [ - H, - H, - H, - H, - H, - H, - H, - H - ]; - = any, R2 extends HandlerResponse = any, R3 extends HandlerResponse = any, R4 extends HandlerResponse = any, R5 extends HandlerResponse = any, R6 extends HandlerResponse = any, R7 extends HandlerResponse = any, R8 extends HandlerResponse = any, R9 extends HandlerResponse = any, E2 extends Env = E, E3 extends Env = IntersectNonAnyTypes<[E, E2]>, E4 extends Env = IntersectNonAnyTypes<[E, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4]>, E6 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5]>, E7 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6]>, E8 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7]>, E9 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7, E8]>, E10 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7, E8, E9]>>(handler1: H, handler2: H, handler3: H, handler4: H, handler5: H, handler6: H, handler7: H, handler8: H, handler9: H): [ - H, - H, - H, - H, - H, - H, - H, - H, - H - ]; - = any, R2 extends HandlerResponse = any, R3 extends HandlerResponse = any, R4 extends HandlerResponse = any, R5 extends HandlerResponse = any, R6 extends HandlerResponse = any, R7 extends HandlerResponse = any, R8 extends HandlerResponse = any, R9 extends HandlerResponse = any, R10 extends HandlerResponse = any, E2 extends Env = E, E3 extends Env = IntersectNonAnyTypes<[E, E2]>, E4 extends Env = IntersectNonAnyTypes<[E, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4]>, E6 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5]>, E7 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6]>, E8 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7]>, E9 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7, E8]>, E10 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7, E8, E9]>, E11 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7, E8, E9, E10]>>(handler1: H, handler2: H, handler3: H, handler4: H, handler5: H, handler6: H, handler7: H, handler8: H, handler9: H, handler10: H): [ - H, - H, - H, - H, - H, - H, - H, - H, - H, - H - ]; -} -export declare class Factory { - - private initApp?; - constructor(init?: { - initApp?: InitApp; - defaultAppOptions?: HonoOptions; - }); - createApp: (options?: HonoOptions) => Hono; - createMiddleware: | void = void>(middleware: MiddlewareHandler) => MiddlewareHandler; - createHandlers: CreateHandlersInterface; -} -export declare const createFactory: (init?: { - initApp?: InitApp; - defaultAppOptions?: HonoOptions; -}) => Factory; -export declare const createMiddleware: | void = void>(middleware: MiddlewareHandler) => MiddlewareHandler; -export {}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/helper/html/index.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/helper/html/index.d.ts deleted file mode 100644 index ce17eac..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/helper/html/index.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -/** - * @module - * html Helper for Hono. - */ -import { raw } from '../../utils/html'; -import type { HtmlEscapedString } from '../../utils/html'; -export { raw }; -export declare const html: (strings: TemplateStringsArray, ...values: unknown[]) => HtmlEscapedString | Promise; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/helper/proxy/index.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/helper/proxy/index.d.ts deleted file mode 100644 index 4a5b334..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/helper/proxy/index.d.ts +++ /dev/null @@ -1,72 +0,0 @@ -/** - * @module - * Proxy Helper for Hono. - */ -import type { RequestHeader } from '../../utils/headers'; -interface ProxyRequestInit extends Omit { - raw?: Request; - headers?: HeadersInit | [string, string][] | Record | Record; - customFetch?: (request: Request) => Promise; - /** - * Enable strict RFC 9110 compliance for Connection header processing. - * - * - `false` (default): Ignores Connection header to prevent potential - * Hop-by-Hop Header Injection attacks. Recommended for untrusted clients. - * - `true`: Processes Connection header per RFC 9110 and removes listed headers. - * Only use in trusted environments. - * - * @default false - * @see https://datatracker.ietf.org/doc/html/rfc9110#section-7.6.1 - */ - strictConnectionProcessing?: boolean; -} -interface ProxyFetch { - (input: string | URL | Request, init?: ProxyRequestInit): Promise; -} -/** - * Fetch API wrapper for proxy. - * The parameters and return value are the same as for `fetch` (except for the proxy-specific options). - * - * The “Accept-Encoding” header is replaced with an encoding that the current runtime can handle. - * Unnecessary response headers are deleted and a Response object is returned that can be returned - * as is as a response from the handler. - * - * @example - * ```ts - * app.get('/proxy/:path', (c) => { - * return proxy(`http://${originServer}/${c.req.param('path')}`, { - * headers: { - * ...c.req.header(), // optional, specify only when forwarding all the request data (including credentials) is necessary. - * 'X-Forwarded-For': '127.0.0.1', - * 'X-Forwarded-Host': c.req.header('host'), - * Authorization: undefined, // do not propagate request headers contained in c.req.header('Authorization') - * }, - * }).then((res) => { - * res.headers.delete('Set-Cookie') - * return res - * }) - * }) - * - * app.all('/proxy/:path', (c) => { - * return proxy(`http://${originServer}/${c.req.param('path')}`, { - * ...c.req, // optional, specify only when forwarding all the request data (including credentials) is necessary. - * headers: { - * ...c.req.header(), - * 'X-Forwarded-For': '127.0.0.1', - * 'X-Forwarded-Host': c.req.header('host'), - * Authorization: undefined, // do not propagate request headers contained in c.req.header('Authorization') - * }, - * }) - * }) - * - * // Strict RFC compliance mode (use only in trusted environments) - * app.get('/internal-proxy/:path', (c) => { - * return proxy(`http://${internalServer}/${c.req.param('path')}`, { - * ...c.req, - * strictConnectionProcessing: true, - * }) - * }) - * ``` - */ -export declare const proxy: ProxyFetch; -export {}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/helper/route/index.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/helper/route/index.d.ts deleted file mode 100644 index f5af1e6..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/helper/route/index.d.ts +++ /dev/null @@ -1,75 +0,0 @@ -import type { Context } from '../../context'; -import type { RouterRoute } from '../../types'; -/** - * Get matched routes in the handler - * - * @param {Context} c - The context object - * @returns An array of matched routes - * - * @example - * ```ts - * import { matchedRoutes } from 'hono/route' - * - * app.use('*', async function logger(c, next) { - * await next() - * matchedRoutes(c).forEach(({ handler, method, path }, i) => { - * const name = handler.name || (handler.length < 2 ? '[handler]' : '[middleware]') - * console.log( - * method, - * ' ', - * path, - * ' '.repeat(Math.max(10 - path.length, 0)), - * name, - * i === c.req.routeIndex ? '<- respond from here' : '' - * ) - * }) - * }) - * ``` - */ -export declare const matchedRoutes: (c: Context) => RouterRoute[]; -/** - * Get the route path registered within the handler - * - * @param {Context} c - The context object - * @param {number} index - The index of the root from which to retrieve the path, similar to Array.prototype.at(), where a negative number is the index counted from the end of the matching root. Defaults to the current root index. - * @returns The route path registered within the handler - * - * @example - * ```ts - * import { routePath } from 'hono/route' - * - * app.use('*', (c, next) => { - * console.log(routePath(c)) // '*' - * console.log(routePath(c, -1)) // '/posts/:id' - * return next() - * }) - * - * app.get('/posts/:id', (c) => { - * return c.text(routePath(c)) // '/posts/:id' - * }) - * ``` - */ -export declare const routePath: (c: Context, index?: number) => string; -/** - * Get the basePath of the as-is route specified by routing. - * - * @param {Context} c - The context object - * @param {number} index - The index of the root from which to retrieve the path, similar to Array.prototype.at(), where a negative number is the index counted from the end of the matching root. Defaults to the current root index. - * @returns The basePath of the as-is route specified by routing. - * - * @example - * ```ts - * import { baseRoutePath } from 'hono/route' - * - * const app = new Hono() - * - * const subApp = new Hono() - * subApp.get('/posts/:id', (c) => { - * return c.text(baseRoutePath(c)) // '/:sub' - * }) - * - * app.route('/:sub', subApp) - * ``` - */ -export declare const baseRoutePath: (c: Context, index?: number) => string; -export declare const basePath: (c: Context, index?: number) => string; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/helper/ssg/index.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/helper/ssg/index.d.ts deleted file mode 100644 index 4e12417..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/helper/ssg/index.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -/** - * @module - * SSG Helper for Hono. - */ -export * from './ssg'; -export { X_HONO_DISABLE_SSG_HEADER_KEY, ssgParams, isSSGContext, disableSSG, onlySSG, } from './middleware'; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/helper/ssg/middleware.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/helper/ssg/middleware.d.ts deleted file mode 100644 index 791ee40..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/helper/ssg/middleware.d.ts +++ /dev/null @@ -1,44 +0,0 @@ -import type { Context } from '../../context'; -import type { Env, MiddlewareHandler } from '../../types'; -export declare const SSG_CONTEXT = "HONO_SSG_CONTEXT"; -export declare const X_HONO_DISABLE_SSG_HEADER_KEY = "x-hono-disable-ssg"; -/** - * @deprecated - * Use `X_HONO_DISABLE_SSG_HEADER_KEY` instead. - * This constant will be removed in the next minor version. - */ -export declare const SSG_DISABLED_RESPONSE: Response; -interface SSGParam { - [key: string]: string; -} -export type SSGParams = SSGParam[]; -interface SSGParamsMiddleware { - (generateParams: (c: Context) => SSGParams | Promise): MiddlewareHandler; - (params: SSGParams): MiddlewareHandler; -} -export type AddedSSGDataRequest = Request & { - ssgParams?: SSGParams; -}; -/** - * Define SSG Route - */ -export declare const ssgParams: SSGParamsMiddleware; -/** - * @experimental - * `isSSGContext` is an experimental feature. - * The API might be changed. - */ -export declare const isSSGContext: (c: Context) => boolean; -/** - * @experimental - * `disableSSG` is an experimental feature. - * The API might be changed. - */ -export declare const disableSSG: () => MiddlewareHandler; -/** - * @experimental - * `onlySSG` is an experimental feature. - * The API might be changed. - */ -export declare const onlySSG: () => MiddlewareHandler; -export {}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/helper/ssg/ssg.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/helper/ssg/ssg.d.ts deleted file mode 100644 index 026cde2..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/helper/ssg/ssg.d.ts +++ /dev/null @@ -1,99 +0,0 @@ -import type { Hono } from '../../hono'; -import type { Env, Schema } from '../../types'; -export declare const DEFAULT_OUTPUT_DIR = "./static"; -/** - * @experimental - * `FileSystemModule` is an experimental feature. - * The API might be changed. - */ -export interface FileSystemModule { - writeFile(path: string, data: string | Uint8Array): Promise; - mkdir(path: string, options: { - recursive: boolean; - }): Promise; -} -/** - * @experimental - * `ToSSGResult` is an experimental feature. - * The API might be changed. - */ -export interface ToSSGResult { - success: boolean; - files: string[]; - error?: Error; -} -export declare const defaultExtensionMap: Record; -export type BeforeRequestHook = (req: Request) => Request | false | Promise; -export type AfterResponseHook = (res: Response) => Response | false | Promise; -export type AfterGenerateHook = (result: ToSSGResult, fsModule: FileSystemModule, options?: ToSSGOptions) => void | Promise; -export declare const combineBeforeRequestHooks: (hooks: BeforeRequestHook | BeforeRequestHook[]) => BeforeRequestHook; -export declare const combineAfterResponseHooks: (hooks: AfterResponseHook | AfterResponseHook[]) => AfterResponseHook; -export declare const combineAfterGenerateHooks: (hooks: AfterGenerateHook | AfterGenerateHook[], fsModule: FileSystemModule, options?: ToSSGOptions) => AfterGenerateHook; -export interface SSGPlugin { - beforeRequestHook?: BeforeRequestHook | BeforeRequestHook[]; - afterResponseHook?: AfterResponseHook | AfterResponseHook[]; - afterGenerateHook?: AfterGenerateHook | AfterGenerateHook[]; -} -export interface ToSSGOptions { - dir?: string; - /** - * @deprecated Use plugins[].beforeRequestHook instead. - */ - beforeRequestHook?: BeforeRequestHook | BeforeRequestHook[]; - /** - * @deprecated Use plugins[].afterResponseHook instead. - */ - afterResponseHook?: AfterResponseHook | AfterResponseHook[]; - /** - * @deprecated Use plugins[].afterGenerateHook instead. - */ - afterGenerateHook?: AfterGenerateHook | AfterGenerateHook[]; - concurrency?: number; - extensionMap?: Record; - plugins?: SSGPlugin[]; -} -/** - * @experimental - * `fetchRoutesContent` is an experimental feature. - * The API might be changed. - */ -export declare const fetchRoutesContent: (app: Hono, beforeRequestHook?: BeforeRequestHook, afterResponseHook?: AfterResponseHook, concurrency?: number) => Generator> | undefined>>; -export declare const saveContentToFile: (data: Promise<{ - routePath: string; - content: string | ArrayBuffer; - mimeType: string; -} | undefined>, fsModule: FileSystemModule, outDir: string, extensionMap?: Record) => Promise; -/** - * @experimental - * `ToSSGInterface` is an experimental feature. - * The API might be changed. - */ -export interface ToSSGInterface { - (app: Hono, fsModule: FileSystemModule, options?: ToSSGOptions): Promise; -} -/** - * @experimental - * `ToSSGAdaptorInterface` is an experimental feature. - * The API might be changed. - */ -export interface ToSSGAdaptorInterface { - (app: Hono, options?: ToSSGOptions): Promise; -} -/** - * The default plugin that defines the recommended behavior. - * - * @experimental - * `defaultPlugin` is an experimental feature. - * The API might be changed. - */ -export declare const defaultPlugin: SSGPlugin; -/** - * @experimental - * `toSSG` is an experimental feature. - * The API might be changed. - */ -export declare const toSSG: ToSSGInterface; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/helper/ssg/utils.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/helper/ssg/utils.d.ts deleted file mode 100644 index 9553bf4..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/helper/ssg/utils.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import type { Hono } from '../../hono'; -import type { Env } from '../../types'; -/** - * Get dirname - * @param path File Path - * @returns Parent dir path - */ -export declare const dirname: (path: string) => string; -export declare const joinPaths: (...paths: string[]) => string; -interface FilterStaticGenerateRouteData { - path: string; -} -export declare const filterStaticGenerateRoutes: (hono: Hono) => FilterStaticGenerateRouteData[]; -export declare const isDynamicRoute: (path: string) => boolean; -export {}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/helper/streaming/index.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/helper/streaming/index.d.ts deleted file mode 100644 index c89d67e..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/helper/streaming/index.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -/** - * @module - * Streaming Helper for Hono. - */ -export { stream } from './stream'; -export type { SSEMessage } from './sse'; -export { streamSSE, SSEStreamingApi } from './sse'; -export { streamText } from './text'; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/helper/streaming/sse.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/helper/streaming/sse.d.ts deleted file mode 100644 index c4cf659..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/helper/streaming/sse.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import type { Context } from '../../context'; -import { StreamingApi } from '../../utils/stream'; -export interface SSEMessage { - data: string | Promise; - event?: string; - id?: string; - retry?: number; -} -export declare class SSEStreamingApi extends StreamingApi { - constructor(writable: WritableStream, readable: ReadableStream); - writeSSE(message: SSEMessage): Promise; -} -export declare const streamSSE: (c: Context, cb: (stream: SSEStreamingApi) => Promise, onError?: (e: Error, stream: SSEStreamingApi) => Promise) => Response; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/helper/streaming/stream.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/helper/streaming/stream.d.ts deleted file mode 100644 index 2c34ef8..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/helper/streaming/stream.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import type { Context } from '../../context'; -import { StreamingApi } from '../../utils/stream'; -export declare const stream: (c: Context, cb: (stream: StreamingApi) => Promise, onError?: (e: Error, stream: StreamingApi) => Promise) => Response; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/helper/streaming/text.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/helper/streaming/text.d.ts deleted file mode 100644 index 39934dc..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/helper/streaming/text.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import type { Context } from '../../context'; -import type { StreamingApi } from '../../utils/stream'; -export declare const streamText: (c: Context, cb: (stream: StreamingApi) => Promise, onError?: (e: Error, stream: StreamingApi) => Promise) => Response; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/helper/streaming/utils.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/helper/streaming/utils.d.ts deleted file mode 100644 index 8ae4c76..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/helper/streaming/utils.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare let isOldBunVersion: () => boolean; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/helper/testing/index.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/helper/testing/index.d.ts deleted file mode 100644 index 208d310..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/helper/testing/index.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -/** - * @module - * Testing Helper for Hono. - */ -import type { Client, ClientRequestOptions } from '../../client/types'; -import type { ExecutionContext } from '../../context'; -import type { Hono } from '../../hono'; -import type { Schema } from '../../types'; -import type { UnionToIntersection } from '../../utils/types'; -type ExtractEnv = T extends Hono ? E : never; -export declare const testClient: >(app: T, Env?: ExtractEnv["Bindings"] | {}, executionCtx?: ExecutionContext, options?: Omit) => UnionToIntersection>; -export {}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/helper/websocket/index.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/helper/websocket/index.d.ts deleted file mode 100644 index 0d7ebbb..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/helper/websocket/index.d.ts +++ /dev/null @@ -1,69 +0,0 @@ -/** - * @module - * WebSocket Helper for Hono. - */ -import type { Context } from '../../context'; -import type { MiddlewareHandler, TypedResponse } from '../../types'; -import type { StatusCode } from '../../utils/http-status'; -/** - * WebSocket Event Listeners type - */ -export interface WSEvents { - onOpen?: (evt: Event, ws: WSContext) => void; - onMessage?: (evt: MessageEvent, ws: WSContext) => void; - onClose?: (evt: CloseEvent, ws: WSContext) => void; - onError?: (evt: Event, ws: WSContext) => void; -} -/** - * Upgrade WebSocket Type - */ -export interface UpgradeWebSocket> { - (createEvents: (c: Context) => _WSEvents | Promise<_WSEvents>, options?: U): MiddlewareHandler; - (c: Context, events: _WSEvents, options?: U): Promise>; -} -/** - * ReadyState for WebSocket - */ -export type WSReadyState = 0 | 1 | 2 | 3; -/** - * An argument for WSContext class - */ -export interface WSContextInit { - send(data: string | ArrayBuffer | Uint8Array, options: SendOptions): void; - close(code?: number, reason?: string): void; - raw?: T; - readyState: WSReadyState; - url?: string | URL | null; - protocol?: string | null; -} -/** - * Options for sending message - */ -export interface SendOptions { - compress?: boolean; -} -/** - * A context for controlling WebSockets - */ -export declare class WSContext { - - constructor(init: WSContextInit); - send(source: string | ArrayBuffer | Uint8Array, options?: SendOptions): void; - raw?: T; - binaryType: BinaryType; - get readyState(): WSReadyState; - url: URL | null; - protocol: string | null; - close(code?: number, reason?: string): void; -} -export type WSMessageReceive = string | Blob | ArrayBufferLike; -export declare const createWSMessageEvent: (source: WSMessageReceive) => MessageEvent; -export interface WebSocketHelperDefineContext { -} -export type WebSocketHelperDefineHandler = (c: Context, events: WSEvents, options?: U) => Promise | Response | void; -/** - * Create a WebSocket adapter/helper - */ -export declare const defineWebSocketHelper: (handler: WebSocketHelperDefineHandler) => UpgradeWebSocket; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/hono-base.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/hono-base.d.ts deleted file mode 100644 index 1f01271..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/hono-base.d.ts +++ /dev/null @@ -1,220 +0,0 @@ -/** - * @module - * This module is the base module for the Hono object. - */ -import { Context } from './context'; -import type { ExecutionContext } from './context'; -import type { Router } from './router'; -import type { Env, ErrorHandler, H, HandlerInterface, MergePath, MergeSchemaPath, MiddlewareHandlerInterface, NotFoundHandler, OnHandlerInterface, RouterRoute, Schema } from './types'; -type GetPath = (request: Request, options?: { - env?: E['Bindings']; -}) => string; -export type HonoOptions = { - /** - * `strict` option specifies whether to distinguish whether the last path is a directory or not. - * - * @see {@link https://hono.dev/docs/api/hono#strict-mode} - * - * @default true - */ - strict?: boolean; - /** - * `router` option specifies which router to use. - * - * @see {@link https://hono.dev/docs/api/hono#router-option} - * - * @example - * ```ts - * const app = new Hono({ router: new RegExpRouter() }) - * ``` - */ - router?: Router<[H, RouterRoute]>; - /** - * `getPath` can handle the host header value. - * - * @see {@link https://hono.dev/docs/api/routing#routing-with-host-header-value} - * - * @example - * ```ts - * const app = new Hono({ - * getPath: (req) => - * '/' + req.headers.get('host') + req.url.replace(/^https?:\/\/[^/]+(\/[^?]*)/, '$1'), - * }) - * - * app.get('/www1.example.com/hello', () => c.text('hello www1')) - * - * // A following request will match the route: - * // new Request('http://www1.example.com/hello', { - * // headers: { host: 'www1.example.com' }, - * // }) - * ``` - */ - getPath?: GetPath; -}; -type MountOptionHandler = (c: Context) => unknown; -type MountReplaceRequest = (originalRequest: Request) => Request; -type MountOptions = MountOptionHandler | { - optionHandler?: MountOptionHandler; - replaceRequest?: MountReplaceRequest | false; -}; -declare class Hono { - - get: HandlerInterface; - post: HandlerInterface; - put: HandlerInterface; - delete: HandlerInterface; - options: HandlerInterface; - patch: HandlerInterface; - all: HandlerInterface; - on: OnHandlerInterface; - use: MiddlewareHandlerInterface; - router: Router<[H, RouterRoute]>; - readonly getPath: GetPath; - private _basePath; - routes: RouterRoute[]; - constructor(options?: HonoOptions); - private errorHandler; - /** - * `.route()` allows grouping other Hono instance in routes. - * - * @see {@link https://hono.dev/docs/api/routing#grouping} - * - * @param {string} path - base Path - * @param {Hono} app - other Hono instance - * @returns {Hono} routed Hono instance - * - * @example - * ```ts - * const app = new Hono() - * const app2 = new Hono() - * - * app2.get("/user", (c) => c.text("user")) - * app.route("/api", app2) // GET /api/user - * ``` - */ - route(path: SubPath, app: Hono): Hono> | S, BasePath, CurrentPath>; - /** - * `.basePath()` allows base paths to be specified. - * - * @see {@link https://hono.dev/docs/api/routing#base-path} - * - * @param {string} path - base Path - * @returns {Hono} changed Hono instance - * - * @example - * ```ts - * const api = new Hono().basePath('/api') - * ``` - */ - basePath(path: SubPath): Hono, MergePath>; - /** - * `.onError()` handles an error and returns a customized Response. - * - * @see {@link https://hono.dev/docs/api/hono#error-handling} - * - * @param {ErrorHandler} handler - request Handler for error - * @returns {Hono} changed Hono instance - * - * @example - * ```ts - * app.onError((err, c) => { - * console.error(`${err}`) - * return c.text('Custom Error Message', 500) - * }) - * ``` - */ - onError: (handler: ErrorHandler) => Hono; - /** - * `.notFound()` allows you to customize a Not Found Response. - * - * @see {@link https://hono.dev/docs/api/hono#not-found} - * - * @param {NotFoundHandler} handler - request handler for not-found - * @returns {Hono} changed Hono instance - * - * @example - * ```ts - * app.notFound((c) => { - * return c.text('Custom 404 Message', 404) - * }) - * ``` - */ - notFound: (handler: NotFoundHandler) => Hono; - /** - * `.mount()` allows you to mount applications built with other frameworks into your Hono application. - * - * @see {@link https://hono.dev/docs/api/hono#mount} - * - * @param {string} path - base Path - * @param {Function} applicationHandler - other Request Handler - * @param {MountOptions} [options] - options of `.mount()` - * @returns {Hono} mounted Hono instance - * - * @example - * ```ts - * import { Router as IttyRouter } from 'itty-router' - * import { Hono } from 'hono' - * // Create itty-router application - * const ittyRouter = IttyRouter() - * // GET /itty-router/hello - * ittyRouter.get('/hello', () => new Response('Hello from itty-router')) - * - * const app = new Hono() - * app.mount('/itty-router', ittyRouter.handle) - * ``` - * - * @example - * ```ts - * const app = new Hono() - * // Send the request to another application without modification. - * app.mount('/app', anotherApp, { - * replaceRequest: (req) => req, - * }) - * ``` - */ - mount(path: string, applicationHandler: (request: Request, ...args: any) => Response | Promise, options?: MountOptions): Hono; - /** - * `.fetch()` will be entry point of your app. - * - * @see {@link https://hono.dev/docs/api/hono#fetch} - * - * @param {Request} request - request Object of request - * @param {Env} Env - env Object - * @param {ExecutionContext} - context of execution - * @returns {Response | Promise} response of request - * - */ - fetch: (request: Request, Env?: E['Bindings'] | {}, executionCtx?: ExecutionContext) => Response | Promise; - /** - * `.request()` is a useful method for testing. - * You can pass a URL or pathname to send a GET request. - * app will return a Response object. - * ```ts - * test('GET /hello is ok', async () => { - * const res = await app.request('/hello') - * expect(res.status).toBe(200) - * }) - * ``` - * @see https://hono.dev/docs/api/hono#request - */ - request: (input: RequestInfo | URL, requestInit?: RequestInit, Env?: E["Bindings"] | {}, executionCtx?: ExecutionContext) => Response | Promise; - /** - * `.fire()` automatically adds a global fetch event listener. - * This can be useful for environments that adhere to the Service Worker API, such as non-ES module Cloudflare Workers. - * @deprecated - * Use `fire` from `hono/service-worker` instead. - * ```ts - * import { Hono } from 'hono' - * import { fire } from 'hono/service-worker' - * - * const app = new Hono() - * // ... - * fire(app) - * ``` - * @see https://hono.dev/docs/api/hono#fire - * @see https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API - * @see https://developers.cloudflare.com/workers/reference/migrate-to-module-workers/ - */ - fire: () => void; -} -export { Hono as HonoBase }; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/hono.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/hono.d.ts deleted file mode 100644 index caeb4dc..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/hono.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { HonoBase } from './hono-base'; -import type { HonoOptions } from './hono-base'; -import type { BlankEnv, BlankSchema, Env, Schema } from './types'; -/** - * The Hono class extends the functionality of the HonoBase class. - * It sets up routing and allows for custom options to be passed. - * - * @template E - The environment type. - * @template S - The schema type. - * @template BasePath - The base path type. - */ -export declare class Hono extends HonoBase { - /** - * Creates an instance of the Hono class. - * - * @param options - Optional configuration options for the Hono instance. - */ - constructor(options?: HonoOptions); -} diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/http-exception.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/http-exception.d.ts deleted file mode 100644 index 8b90cca..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/http-exception.d.ts +++ /dev/null @@ -1,59 +0,0 @@ -/** - * @module - * This module provides the `HTTPException` class. - */ -import type { ContentfulStatusCode } from './utils/http-status'; -/** - * Options for creating an `HTTPException`. - * @property res - Optional response object to use. - * @property message - Optional custom error message. - * @property cause - Optional cause of the error. - */ -type HTTPExceptionOptions = { - res?: Response; - message?: string; - cause?: unknown; -}; -/** - * `HTTPException` must be used when a fatal error such as authentication failure occurs. - * - * @see {@link https://hono.dev/docs/api/exception} - * - * @param {StatusCode} status - status code of HTTPException - * @param {HTTPExceptionOptions} options - options of HTTPException - * @param {HTTPExceptionOptions["res"]} options.res - response of options of HTTPException - * @param {HTTPExceptionOptions["message"]} options.message - message of options of HTTPException - * @param {HTTPExceptionOptions["cause"]} options.cause - cause of options of HTTPException - * - * @example - * ```ts - * import { HTTPException } from 'hono/http-exception' - * - * // ... - * - * app.post('/auth', async (c, next) => { - * // authentication - * if (authorized === false) { - * throw new HTTPException(401, { message: 'Custom error message' }) - * } - * await next() - * }) - * ``` - */ -export declare class HTTPException extends Error { - readonly res?: Response; - readonly status: ContentfulStatusCode; - /** - * Creates an instance of `HTTPException`. - * @param status - HTTP status code for the exception. Defaults to 500. - * @param options - Additional options for the exception. - */ - constructor(status?: ContentfulStatusCode, options?: HTTPExceptionOptions); - /** - * Returns the response object associated with the exception. - * If a response object is not provided, a new response is created with the error message and status code. - * @returns The response object. - */ - getResponse(): Response; -} -export {}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/index.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/index.d.ts deleted file mode 100644 index 2e861bf..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/index.d.ts +++ /dev/null @@ -1,36 +0,0 @@ -/** - * @module - * - * Hono - Web Framework built on Web Standards - * - * @example - * ```ts - * import { Hono } from 'hono' - * const app = new Hono() - * - * app.get('/', (c) => c.text('Hono!')) - * - * export default app - * ``` - */ -import { Hono } from './hono'; -/** - * Types for environment variables, error handlers, handlers, middleware handlers, and more. - */ -export type { Env, ErrorHandler, Handler, MiddlewareHandler, Next, NotFoundResponse, NotFoundHandler, ValidationTargets, Input, Schema, ToSchema, TypedResponse, } from './types'; -/** - * Types for context, context variable map, context renderer, and execution context. - */ -export type { Context, ContextVariableMap, ContextRenderer, ExecutionContext } from './context'; -/** - * Type for HonoRequest. - */ -export type { HonoRequest } from './request'; -/** - * Types for inferring request and response types and client request options. - */ -export type { InferRequestType, InferResponseType, ClientRequestOptions } from './client'; -/** - * Hono framework for building web applications. - */ -export { Hono }; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/jsx/base.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/jsx/base.d.ts deleted file mode 100644 index 488d5c4..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/jsx/base.d.ts +++ /dev/null @@ -1,58 +0,0 @@ -import type { HtmlEscaped, HtmlEscapedString, StringBufferWithCallbacks } from '../utils/html'; -import { DOM_MEMO } from './constants'; -import type { Context } from './context'; -import type { JSX as HonoJSX, IntrinsicElements as IntrinsicElementsDefined } from './intrinsic-elements'; -export type Props = Record; -export type FC

= { - (props: P): HtmlEscapedString | Promise | null; - defaultProps?: Partial

| undefined; - displayName?: string | undefined; -}; -export type DOMAttributes = HonoJSX.HTMLAttributes; -export declare namespace JSX { - type Element = HtmlEscapedString | Promise; - interface ElementChildrenAttribute { - children: Child; - } - interface IntrinsicElements extends IntrinsicElementsDefined { - [tagName: string]: Props; - } - interface IntrinsicAttributes { - key?: string | number | bigint | null | undefined; - } -} -export declare const getNameSpaceContext: () => Context | undefined; -export declare const booleanAttributes: string[]; -type LocalContexts = [Context, unknown][]; -export type Child = string | Promise | number | JSXNode | null | undefined | boolean | Child[]; -export declare class JSXNode implements HtmlEscaped { - tag: string | Function; - props: Props; - key?: string; - children: Child[]; - isEscaped: true; - localContexts?: LocalContexts; - constructor(tag: string | Function, props: Props, children: Child[]); - get type(): string | Function; - get ref(): any; - toString(): string | Promise; - toStringToBuffer(buffer: StringBufferWithCallbacks): void; -} -export declare class JSXFragmentNode extends JSXNode { - toStringToBuffer(buffer: StringBufferWithCallbacks): void; -} -export declare const jsx: (tag: string | Function, props: Props | null, ...children: (string | number | HtmlEscapedString)[]) => JSXNode; -export declare const jsxFn: (tag: string | Function, props: Props, children: (string | number | HtmlEscapedString)[]) => JSXNode; -export declare const shallowEqual: (a: Props, b: Props) => boolean; -export type MemorableFC = FC & { - [DOM_MEMO]: (prevProps: Readonly, nextProps: Readonly) => boolean; -}; -export declare const memo: (component: FC, propsAreEqual?: (prevProps: Readonly, nextProps: Readonly) => boolean) => FC; -export declare const Fragment: ({ children, }: { - key?: string; - children?: Child | HtmlEscapedString; -}) => HtmlEscapedString; -export declare const isValidElement: (element: unknown) => element is JSXNode; -export declare const cloneElement: (element: T, props: Partial, ...children: Child[]) => T; -export declare const reactAPICompatVersion = "19.0.0-hono-jsx"; -export {}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/jsx/children.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/jsx/children.d.ts deleted file mode 100644 index 7e13b27..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/jsx/children.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import type { Child } from './base'; -export declare const toArray: (children: Child) => Child[]; -export declare const Children: { - map: (children: Child[], fn: (child: Child, index: number) => Child) => Child[]; - forEach: (children: Child[], fn: (child: Child, index: number) => void) => void; - count: (children: Child[]) => number; - only: (_children: Child[]) => Child; - toArray: (children: Child) => Child[]; -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/jsx/components.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/jsx/components.d.ts deleted file mode 100644 index ede9201..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/jsx/components.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import type { HtmlEscapedString } from '../utils/html'; -import type { Child, FC, PropsWithChildren } from './'; -export declare const childrenToString: (children: Child[]) => Promise; -export type ErrorHandler = (error: Error) => void; -export type FallbackRender = (error: Error) => Child; -/** - * @experimental - * `ErrorBoundary` is an experimental feature. - * The API might be changed. - */ -export declare const ErrorBoundary: FC>; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/jsx/constants.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/jsx/constants.d.ts deleted file mode 100644 index 27b9606..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/jsx/constants.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -export declare const DOM_RENDERER: unique symbol; -export declare const DOM_ERROR_HANDLER: unique symbol; -export declare const DOM_STASH: unique symbol; -export declare const DOM_INTERNAL_TAG: unique symbol; -export declare const DOM_MEMO: unique symbol; -export declare const PERMALINK: unique symbol; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/jsx/context.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/jsx/context.d.ts deleted file mode 100644 index 64ac66c..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/jsx/context.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import type { FC, PropsWithChildren } from './'; -export interface Context extends FC> { - values: T[]; - Provider: FC>; -} -export declare const globalContexts: Context[]; -export declare const createContext: (defaultValue: T) => Context; -export declare const useContext: (context: Context) => T; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/jsx/dom/client.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/jsx/dom/client.d.ts deleted file mode 100644 index a30e3e4..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/jsx/dom/client.d.ts +++ /dev/null @@ -1,31 +0,0 @@ -/** - * @module - * This module provides APIs for `hono/jsx/dom/client`, which is compatible with `react-dom/client`. - */ -import type { Child } from '../base'; -export interface Root { - render(children: Child): void; - unmount(): void; -} -export type RootOptions = Record; -/** - * Create a root object for rendering - * @param element Render target - * @param options Options for createRoot (not supported yet) - * @returns Root object has `render` and `unmount` methods - */ -export declare const createRoot: (element: HTMLElement | DocumentFragment, options?: RootOptions) => Root; -/** - * Create a root object and hydrate app to the target element. - * In hono/jsx/dom, hydrate is equivalent to render. - * @param element Render target - * @param reactNode A JSXNode to render - * @param options Options for createRoot (not supported yet) - * @returns Root object has `render` and `unmount` methods - */ -export declare const hydrateRoot: (element: HTMLElement | DocumentFragment, reactNode: Child, options?: RootOptions) => Root; -declare const _default: { - createRoot: (element: HTMLElement | DocumentFragment, options?: RootOptions) => Root; - hydrateRoot: (element: HTMLElement | DocumentFragment, reactNode: Child, options?: RootOptions) => Root; -}; -export default _default; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/jsx/dom/components.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/jsx/dom/components.d.ts deleted file mode 100644 index 54beaef..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/jsx/dom/components.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import type { Child, FC, PropsWithChildren } from '../'; -import type { ErrorHandler, FallbackRender } from '../components'; -export declare const ErrorBoundary: FC>; -export declare const Suspense: FC>; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/jsx/dom/context.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/jsx/dom/context.d.ts deleted file mode 100644 index ba9b54b..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/jsx/dom/context.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import type { Context } from '../context'; -export declare const createContextProviderFunction: (values: T[]) => Function; -export declare const createContext: (defaultValue: T) => Context; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/jsx/dom/css.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/jsx/dom/css.d.ts deleted file mode 100644 index cf6ea22..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/jsx/dom/css.d.ts +++ /dev/null @@ -1,77 +0,0 @@ -/** - * @module - * This module provides APIs that enable `hono/jsx/dom` to support. - */ -import type { FC, PropsWithChildren } from '../'; -import type { CssClassName, CssVariableType } from '../../helper/css/common'; -export { rawCssString } from '../../helper/css/common'; -interface CreateCssJsxDomObjectsType { - (args: { - id: Readonly; - }): readonly [ - { - toString(this: CssClassName): string; - }, - FC> - ]; -} -export declare const createCssJsxDomObjects: CreateCssJsxDomObjectsType; -interface CssType { - (strings: TemplateStringsArray, ...values: CssVariableType[]): string; -} -interface CxType { - (...args: (string | boolean | null | undefined)[]): string; -} -interface KeyframesType { - (strings: TemplateStringsArray, ...values: CssVariableType[]): CssClassName; -} -interface ViewTransitionType { - (strings: TemplateStringsArray, ...values: CssVariableType[]): string; - (content: string): string; - (): string; -} -interface DefaultContextType { - css: CssType; - cx: CxType; - keyframes: KeyframesType; - viewTransition: ViewTransitionType; - Style: FC>; -} -/** - * @experimental - * `createCssContext` is an experimental feature. - * The API might be changed. - */ -export declare const createCssContext: ({ id }: { - id: Readonly; -}) => DefaultContextType; -/** - * @experimental - * `css` is an experimental feature. - * The API might be changed. - */ -export declare const css: CssType; -/** - * @experimental - * `cx` is an experimental feature. - * The API might be changed. - */ -export declare const cx: CxType; -/** - * @experimental - * `keyframes` is an experimental feature. - * The API might be changed. - */ -export declare const keyframes: KeyframesType; -/** - * @experimental - * `viewTransition` is an experimental feature. - * The API might be changed. - */ -export declare const viewTransition: ViewTransitionType; -/** - * @experimental - * `Style` is an experimental feature. - * The API might be changed. - */ -export declare const Style: FC>; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/jsx/dom/hooks/index.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/jsx/dom/hooks/index.d.ts deleted file mode 100644 index eca26ae..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/jsx/dom/hooks/index.d.ts +++ /dev/null @@ -1,39 +0,0 @@ -/** - * Provide hooks used only in jsx/dom - */ -import type { Context } from '../../context'; -type FormStatus = { - pending: false; - data: null; - method: null; - action: null; -} | { - pending: true; - data: FormData; - method: 'get' | 'post'; - action: string | ((formData: FormData) => void | Promise); -}; -export declare const FormContext: Context; -export declare const registerAction: (action: Promise) => void; -/** - * This hook returns the current form status - * @returns FormStatus - */ -export declare const useFormStatus: () => FormStatus; -/** - * This hook returns the current state and a function to update the state optimistically - * The current state is updated optimistically and then reverted to the original state when all actions are resolved - * @param state - * @param updateState - * @returns [T, (action: N) => void] - */ -export declare const useOptimistic: (state: T, updateState: (currentState: T, action: N) => T) => [T, (action: N) => void]; -/** - * This hook returns the current state and a function to update the state by form action - * @param fn - * @param initialState - * @param permalink - * @returns [T, (data: FormData) => void] - */ -export declare const useActionState: (fn: Function, initialState: T, permalink?: string) => [T, Function]; -export {}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/jsx/dom/index.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/jsx/dom/index.d.ts deleted file mode 100644 index a3cfe59..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/jsx/dom/index.d.ts +++ /dev/null @@ -1,88 +0,0 @@ -/** - * @module - * This module provides APIs for `hono/jsx/dom`. - */ -import { isValidElement, reactAPICompatVersion } from '../base'; -import type { Child, DOMAttributes, JSX, JSXNode, Props, FC } from '../base'; -import { Children } from '../children'; -import { useContext } from '../context'; -import { createRef, forwardRef, startTransition, startViewTransition, use, useCallback, useDebugValue, useDeferredValue, useEffect, useId, useImperativeHandle, useInsertionEffect, useLayoutEffect, useMemo, useReducer, useRef, useState, useSyncExternalStore, useTransition, useViewTransition } from '../hooks'; -import { ErrorBoundary, Suspense } from './components'; -import { createContext } from './context'; -import { useActionState, useFormStatus, useOptimistic } from './hooks'; -import { Fragment } from './jsx-runtime'; -import { createPortal, flushSync } from './render'; -export { render } from './render'; -declare const createElement: (tag: string | ((props: Props) => JSXNode), props: Props | null, ...children: Child[]) => JSXNode; -declare const cloneElement: (element: T, props: Props, ...children: Child[]) => T; -declare const memo: (component: FC, propsAreEqual?: (prevProps: Readonly, nextProps: Readonly) => boolean) => FC; -export { reactAPICompatVersion as version, createElement as jsx, useState, useEffect, useRef, useCallback, use, startTransition, useTransition, useDeferredValue, startViewTransition, useViewTransition, useMemo, useLayoutEffect, useInsertionEffect, useReducer, useId, useDebugValue, createRef, forwardRef, useImperativeHandle, useSyncExternalStore, useFormStatus, useActionState, useOptimistic, Suspense, ErrorBoundary, createContext, useContext, memo, isValidElement, createElement, cloneElement, Children, Fragment, Fragment as StrictMode, DOMAttributes, flushSync, createPortal, }; -declare const _default: { - version: string; - useState: { - (initialState: T | (() => T)): [T, (newState: T | ((currentState: T) => T)) => void]; - (): [T | undefined, (newState: T | ((currentState: T | undefined) => T | undefined) | undefined) => void]; - }; - useEffect: (effect: () => void | (() => void), deps?: readonly unknown[]) => void; - useRef: (initialValue: T | null) => import("..").RefObject; - useCallback: (callback: T, deps: readonly unknown[]) => T; - use: (promise: Promise) => T; - startTransition: (callback: () => void) => void; - useTransition: () => [boolean, (callback: () => void | Promise) => void]; - useDeferredValue: (value: T, initialValue?: T) => T; - startViewTransition: (callback: () => void) => void; - useViewTransition: () => [boolean, (callback: () => void) => void]; - useMemo: (factory: () => T, deps: readonly unknown[]) => T; - useLayoutEffect: (effect: () => void | (() => void), deps?: readonly unknown[]) => void; - useInsertionEffect: (effect: () => void | (() => void), deps?: readonly unknown[]) => void; - useReducer: (reducer: (state: T, action: A) => T, initialArg: T, init?: (initialState: T) => T) => [T, (action: A) => void]; - useId: () => string; - useDebugValue: (_value: unknown, _formatter?: (value: unknown) => string) => void; - createRef: () => import("..").RefObject; - forwardRef: (Component: (props: P, ref?: import("..").RefObject) => JSX.Element) => ((props: P & { - ref?: import("..").RefObject; - }) => JSX.Element); - useImperativeHandle: (ref: import("..").RefObject, createHandle: () => T, deps: readonly unknown[]) => void; - useSyncExternalStore: (subscribe: (callback: () => void) => () => void, getSnapshot: () => T, getServerSnapshot?: () => T) => T; - useFormStatus: () => { - pending: false; - data: null; - method: null; - action: null; - } | { - pending: true; - data: FormData; - method: "get" | "post"; - action: string | ((formData: FormData) => void | Promise); - }; - useActionState: (fn: Function, initialState: T, permalink?: string) => [T, Function]; - useOptimistic: (state: T, updateState: (currentState: T, action: N) => T) => [T, (action: N) => void]; - Suspense: FC>; - ErrorBoundary: FC>; - createContext: (defaultValue: T) => import("..").Context; - useContext: (context: import("..").Context) => T; - memo: (component: FC, propsAreEqual?: (prevProps: Readonly, nextProps: Readonly) => boolean) => FC; - isValidElement: (element: unknown) => element is JSXNode; - createElement: (tag: string | ((props: Props) => JSXNode), props: Props | null, ...children: Child[]) => JSXNode; - cloneElement: (element: T, props: Props, ...children: Child[]) => T; - Children: { - map: (children: Child[], fn: (child: Child, index: number) => Child) => Child[]; - forEach: (children: Child[], fn: (child: Child, index: number) => void) => void; - count: (children: Child[]) => number; - only: (_children: Child[]) => Child; - toArray: (children: Child) => Child[]; - }; - Fragment: (props: Record) => JSXNode; - StrictMode: (props: Record) => JSXNode; - flushSync: (callback: () => void) => void; - createPortal: (children: Child, container: HTMLElement, key?: string) => Child; -}; -export default _default; -export type { Context } from '../context'; -export type * from '../types'; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/jsx/dom/intrinsic-element/components.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/jsx/dom/intrinsic-element/components.d.ts deleted file mode 100644 index 53f879a..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/jsx/dom/intrinsic-element/components.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -import type { IntrinsicElements } from '../../intrinsic-elements'; -import type { FC, PropsWithChildren, RefObject } from '../../types'; -export declare const clearCache: () => void; -export declare const composeRef: (ref: RefObject | Function | undefined, cb: (e: T) => void | (() => void)) => ((e: T) => () => void); -export declare const title: FC; -export declare const script: FC>; -export declare const style: FC>; -export declare const link: FC>; -export declare const meta: FC; -export declare const form: FC | ((e: HTMLFormElement | null) => void | (() => void)); -}>>; -export declare const input: FC>; -export declare const button: FC>; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/jsx/dom/jsx-dev-runtime.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/jsx/dom/jsx-dev-runtime.d.ts deleted file mode 100644 index 2316d31..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/jsx/dom/jsx-dev-runtime.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -/** - * @module - * This module provides the `hono/jsx/dom` dev runtime. - */ -import type { JSXNode, Props } from '../base'; -export type { JSX } from '../base'; -export declare const jsxDEV: (tag: string | Function, props: Props, key?: string) => JSXNode; -export declare const Fragment: (props: Record) => JSXNode; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/jsx/dom/jsx-runtime.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/jsx/dom/jsx-runtime.d.ts deleted file mode 100644 index 884ccb9..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/jsx/dom/jsx-runtime.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -/** - * @module - * This module provides the `hono/jsx/dom` runtime. - */ -export { jsxDEV as jsx, Fragment } from './jsx-dev-runtime'; -export { jsxDEV as jsxs } from './jsx-dev-runtime'; -export type { JSX } from './jsx-dev-runtime'; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/jsx/dom/render.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/jsx/dom/render.d.ts deleted file mode 100644 index 5b12d55..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/jsx/dom/render.d.ts +++ /dev/null @@ -1,73 +0,0 @@ -import type { Child, FC, JSXNode, Props } from '../base'; -import { DOM_RENDERER, DOM_STASH } from '../constants'; -import type { Context as JSXContext } from '../context'; -export type HasRenderToDom = FC & { - [DOM_RENDERER]: FC; -}; -export type ErrorHandler = (error: any, retry: () => void) => Child | undefined; -type Container = HTMLElement | DocumentFragment; -type LocalJSXContexts = [JSXContext, unknown][] | undefined; -type SupportedElement = HTMLElement | SVGElement | MathMLElement; -export type PreserveNodeType = 1 | 2; -export type NodeObject = { - pP: Props | undefined; - nN: Node | undefined; - vC: Node[]; - pC?: Node[]; - vR: Node[]; - n?: string; - f?: boolean; - s?: boolean; - c: Container | undefined; - e: SupportedElement | Text | undefined; - p?: PreserveNodeType; - a?: boolean; - o?: NodeObject; - [DOM_STASH]: [ - number, - any[][], - LocalJSXContexts, - [ - Context, - Function, - NodeObject - ] - ] | [number, any[][]]; -} & JSXNode; -type NodeString = { - t: string; - d: boolean; - s?: boolean; -} & { - e?: Text; - vC: undefined; - nN: undefined; - p?: true; - key: undefined; - tag: undefined; -}; -export type Node = NodeString | NodeObject; -export type PendingType = 0 | 1 | 2; -export type UpdateHook = (context: Context, node: Node, cb: (context: Context) => void) => Promise; -export type Context = [ - PendingType, - boolean, - UpdateHook, - boolean, - boolean, - [ - Context, - Function, - NodeObject - ][] -] | [PendingType, boolean, UpdateHook, boolean] | [PendingType, boolean, UpdateHook] | [PendingType, boolean] | [PendingType] | []; -export declare const buildDataStack: [Context, Node][]; -export declare const getNameSpaceContext: () => JSXContext | undefined; -export declare const build: (context: Context, node: NodeObject, children?: Child[]) => void; -export declare const buildNode: (node: Child) => Node | undefined; -export declare const update: (context: Context, node: NodeObject) => Promise; -export declare const renderNode: (node: NodeObject, container: Container) => void; -export declare const render: (jsxNode: Child, container: Container) => void; -export declare const flushSync: (callback: () => void) => void; -export declare const createPortal: (children: Child, container: HTMLElement, key?: string) => Child; -export {}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/jsx/dom/server.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/jsx/dom/server.d.ts deleted file mode 100644 index 7de82cc..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/jsx/dom/server.d.ts +++ /dev/null @@ -1,106 +0,0 @@ -/** - * @module - * This module provides APIs for `hono/jsx/server`, which is compatible with `react-dom/server`. - */ -import type { Child } from '../base'; -import version from './'; -export interface RenderToStringOptions { - identifierPrefix?: string; -} -/** - * Render JSX element to string. - * @param element JSX element to render. - * @param options Options for rendering. - * @returns Rendered string. - */ -declare const renderToString: (element: Child, options?: RenderToStringOptions) => string; -export interface RenderToReadableStreamOptions { - identifierPrefix?: string; - namespaceURI?: string; - nonce?: string; - bootstrapScriptContent?: string; - bootstrapScripts?: string[]; - bootstrapModules?: string[]; - progressiveChunkSize?: number; - signal?: AbortSignal; - onError?: (error: unknown) => string | void; -} -/** - * Render JSX element to readable stream. - * @param element JSX element to render. - * @param options Options for rendering. - * @returns Rendered readable stream. - */ -declare const renderToReadableStream: (element: Child, options?: RenderToReadableStreamOptions) => Promise>; -export { renderToString, renderToReadableStream, version }; -declare const _default: { - renderToString: (element: Child, options?: RenderToStringOptions) => string; - renderToReadableStream: (element: Child, options?: RenderToReadableStreamOptions) => Promise>; - version: { - version: string; - useState: { - (initialState: T | (() => T)): [T, (newState: T | ((currentState: T) => T)) => void]; - (): [T | undefined, (newState: T | ((currentState: T | undefined) => T | undefined) | undefined) => void]; - }; - useEffect: (effect: () => void | (() => void), deps?: readonly unknown[]) => void; - useRef: (initialValue: T | null) => import("..").RefObject; - useCallback: (callback: T, deps: readonly unknown[]) => T; - use: (promise: Promise) => T; - startTransition: (callback: () => void) => void; - useTransition: () => [boolean, (callback: () => void | Promise) => void]; - useDeferredValue: (value: T, initialValue?: T) => T; - startViewTransition: (callback: () => void) => void; - useViewTransition: () => [boolean, (callback: () => void) => void]; - useMemo: (factory: () => T, deps: readonly unknown[]) => T; - useLayoutEffect: (effect: () => void | (() => void), deps?: readonly unknown[]) => void; - useInsertionEffect: (effect: () => void | (() => void), deps?: readonly unknown[]) => void; - useReducer: (reducer: (state: T, action: A) => T, initialArg: T, init?: (initialState: T) => T) => [T, (action: A) => void]; - useId: () => string; - useDebugValue: (_value: unknown, _formatter?: (value: unknown) => string) => void; - createRef: () => import("..").RefObject; - forwardRef: (Component: (props: P, ref?: import("..").RefObject) => import("./jsx-dev-runtime").JSX.Element) => ((props: P & { - ref?: import("..").RefObject; - }) => import("./jsx-dev-runtime").JSX.Element); - useImperativeHandle: (ref: import("..").RefObject, createHandle: () => T, deps: readonly unknown[]) => void; - useSyncExternalStore: (subscribe: (callback: () => void) => () => void, getSnapshot: () => T, getServerSnapshot?: () => T) => T; - useFormStatus: () => { - pending: false; - data: null; - method: null; - action: null; - } | { - pending: true; - data: FormData; - method: "get" | "post"; - action: string | ((formData: FormData) => void | Promise); - }; - useActionState: (fn: Function, initialState: T, permalink?: string) => [T, Function]; - useOptimistic: (state: T, updateState: (currentState: T, action: N) => T) => [T, (action: N) => void]; - Suspense: import("..").FC>; - ErrorBoundary: import("..").FC>; - createContext: (defaultValue: T) => import("..").Context; - useContext: (context: import("..").Context) => T; - memo: (component: import("..").FC, propsAreEqual?: (prevProps: Readonly, nextProps: Readonly) => boolean) => import("..").FC; - isValidElement: (element: unknown) => element is import("..").JSXNode; - createElement: (tag: string | ((props: import("../base").Props) => import("..").JSXNode), props: import("../base").Props | null, ...children: Child[]) => import("..").JSXNode; - cloneElement: (element: T, props: import("../base").Props, ...children: Child[]) => T; - Children: { - map: (children: Child[], fn: (child: Child, index: number) => Child) => Child[]; - forEach: (children: Child[], fn: (child: Child, index: number) => void) => void; - count: (children: Child[]) => number; - only: (_children: Child[]) => Child; - toArray: (children: Child) => Child[]; - }; - Fragment: (props: Record) => import("..").JSXNode; - StrictMode: (props: Record) => import("..").JSXNode; - flushSync: (callback: () => void) => void; - createPortal: (children: Child, container: HTMLElement, key?: string) => Child; - }; -}; -export default _default; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/jsx/dom/utils.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/jsx/dom/utils.d.ts deleted file mode 100644 index b1d29f6..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/jsx/dom/utils.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const setInternalTagFlag: (fn: Function) => Function; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/jsx/hooks/index.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/jsx/hooks/index.d.ts deleted file mode 100644 index 929e315..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/jsx/hooks/index.d.ts +++ /dev/null @@ -1,45 +0,0 @@ -import type { JSX } from '../base'; -type UpdateStateFunction = (newState: T | ((currentState: T) => T)) => void; -export declare const STASH_EFFECT = 1; -export type EffectData = [ - readonly unknown[] | undefined, - // deps - (() => void | (() => void)) | undefined, - // layout effect - (() => void) | undefined, - // cleanup - (() => void) | undefined, - // effect - (() => void) | undefined -]; -export declare const startViewTransition: (callback: () => void) => void; -export declare const useViewTransition: () => [boolean, (callback: () => void) => void]; -export declare const startTransition: (callback: () => void) => void; -export declare const useTransition: () => [boolean, (callback: () => void | Promise) => void]; -type UseDeferredValue = (value: T, initialValue?: T) => T; -export declare const useDeferredValue: UseDeferredValue; -type UseStateType = { - (initialState: T | (() => T)): [T, UpdateStateFunction]; - (): [T | undefined, UpdateStateFunction]; -}; -export declare const useState: UseStateType; -export declare const useReducer: (reducer: (state: T, action: A) => T, initialArg: T, init?: (initialState: T) => T) => [T, (action: A) => void]; -export declare const useEffect: (effect: () => void | (() => void), deps?: readonly unknown[]) => void; -export declare const useLayoutEffect: (effect: () => void | (() => void), deps?: readonly unknown[]) => void; -export declare const useInsertionEffect: (effect: () => void | (() => void), deps?: readonly unknown[]) => void; -export declare const useCallback: (callback: T, deps: readonly unknown[]) => T; -export type RefObject = { - current: T | null; -}; -export declare const useRef: (initialValue: T | null) => RefObject; -export declare const use: (promise: Promise) => T; -export declare const useMemo: (factory: () => T, deps: readonly unknown[]) => T; -export declare const useId: () => string; -export declare const useDebugValue: (_value: unknown, _formatter?: (value: unknown) => string) => void; -export declare const createRef: () => RefObject; -export declare const forwardRef: (Component: (props: P, ref?: RefObject) => JSX.Element) => ((props: P & { - ref?: RefObject; -}) => JSX.Element); -export declare const useImperativeHandle: (ref: RefObject, createHandle: () => T, deps: readonly unknown[]) => void; -export declare const useSyncExternalStore: (subscribe: (callback: () => void) => () => void, getSnapshot: () => T, getServerSnapshot?: () => T) => T; -export {}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/jsx/index.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/jsx/index.d.ts deleted file mode 100644 index 63d20b6..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/jsx/index.d.ts +++ /dev/null @@ -1,75 +0,0 @@ -/** - * @module - * JSX for Hono. - */ -import { Fragment, cloneElement, isValidElement, jsx, memo, reactAPICompatVersion } from './base'; -import type { DOMAttributes } from './base'; -import { Children } from './children'; -import { ErrorBoundary } from './components'; -import { createContext, useContext } from './context'; -import { useActionState, useOptimistic } from './dom/hooks'; -import { createRef, forwardRef, startTransition, startViewTransition, use, useCallback, useDebugValue, useDeferredValue, useEffect, useId, useImperativeHandle, useInsertionEffect, useLayoutEffect, useMemo, useReducer, useRef, useState, useSyncExternalStore, useTransition, useViewTransition } from './hooks'; -import { Suspense } from './streaming'; -export { reactAPICompatVersion as version, jsx, memo, Fragment, Fragment as StrictMode, isValidElement, jsx as createElement, cloneElement, ErrorBoundary, createContext, useContext, useState, useEffect, useRef, useCallback, useReducer, useId, useDebugValue, use, startTransition, useTransition, useDeferredValue, startViewTransition, useViewTransition, useMemo, useLayoutEffect, useInsertionEffect, createRef, forwardRef, useImperativeHandle, useSyncExternalStore, useActionState, useOptimistic, Suspense, Children, DOMAttributes, }; -declare const _default: { - version: string; - memo: (component: import("./base").FC, propsAreEqual?: (prevProps: Readonly, nextProps: Readonly) => boolean) => import("./base").FC; - Fragment: ({ children, }: { - key?: string; - children?: import("./base").Child | import("../utils/html").HtmlEscapedString; - }) => import("../utils/html").HtmlEscapedString; - StrictMode: ({ children, }: { - key?: string; - children?: import("./base").Child | import("../utils/html").HtmlEscapedString; - }) => import("../utils/html").HtmlEscapedString; - isValidElement: (element: unknown) => element is import("./base").JSXNode; - createElement: (tag: string | Function, props: import("./base").Props | null, ...children: (string | number | import("../utils/html").HtmlEscapedString)[]) => import("./base").JSXNode; - cloneElement: (element: T, props: Partial, ...children: import("./base").Child[]) => T; - ErrorBoundary: import("./base").FC>; - createContext: (defaultValue: T) => import("./context").Context; - useContext: (context: import("./context").Context) => T; - useState: { - (initialState: T | (() => T)): [T, (newState: T | ((currentState: T) => T)) => void]; - (): [T | undefined, (newState: T | ((currentState: T | undefined) => T | undefined) | undefined) => void]; - }; - useEffect: (effect: () => void | (() => void), deps?: readonly unknown[]) => void; - useRef: (initialValue: T | null) => import("./hooks").RefObject; - useCallback: (callback: T, deps: readonly unknown[]) => T; - useReducer: (reducer: (state: T, action: A) => T, initialArg: T, init?: (initialState: T) => T) => [T, (action: A) => void]; - useId: () => string; - useDebugValue: (_value: unknown, _formatter?: (value: unknown) => string) => void; - use: (promise: Promise) => T; - startTransition: (callback: () => void) => void; - useTransition: () => [boolean, (callback: () => void | Promise) => void]; - useDeferredValue: (value: T, initialValue?: T) => T; - startViewTransition: (callback: () => void) => void; - useViewTransition: () => [boolean, (callback: () => void) => void]; - useMemo: (factory: () => T, deps: readonly unknown[]) => T; - useLayoutEffect: (effect: () => void | (() => void), deps?: readonly unknown[]) => void; - useInsertionEffect: (effect: () => void | (() => void), deps?: readonly unknown[]) => void; - createRef: () => import("./hooks").RefObject; - forwardRef: (Component: (props: P, ref?: import("./hooks").RefObject) => import("./base").JSX.Element) => ((props: P & { - ref?: import("./hooks").RefObject; - }) => import("./base").JSX.Element); - useImperativeHandle: (ref: import("./hooks").RefObject, createHandle: () => T, deps: readonly unknown[]) => void; - useSyncExternalStore: (subscribe: (callback: () => void) => () => void, getSnapshot: () => T, getServerSnapshot?: () => T) => T; - useActionState: (fn: Function, initialState: T, permalink?: string) => [T, Function]; - useOptimistic: (state: T, updateState: (currentState: T, action: N) => T) => [T, (action: N) => void]; - Suspense: import("./base").FC>; - Children: { - map: (children: import("./base").Child[], fn: (child: import("./base").Child, index: number) => import("./base").Child) => import("./base").Child[]; - forEach: (children: import("./base").Child[], fn: (child: import("./base").Child, index: number) => void) => void; - count: (children: import("./base").Child[]) => number; - only: (_children: import("./base").Child[]) => import("./base").Child; - toArray: (children: import("./base").Child) => import("./base").Child[]; - }; -}; -export default _default; -export type * from './types'; -export type { JSX } from './intrinsic-elements'; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/jsx/intrinsic-element/common.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/jsx/intrinsic-element/common.d.ts deleted file mode 100644 index b095aa6..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/jsx/intrinsic-element/common.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export declare const deDupeKeyMap: Record; -export declare const domRenderers: Record; -export declare const dataPrecedenceAttr = "data-precedence"; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/jsx/intrinsic-element/components.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/jsx/intrinsic-element/components.d.ts deleted file mode 100644 index 77d0849..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/jsx/intrinsic-element/components.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import type { IntrinsicElements } from '../intrinsic-elements'; -import type { FC, PropsWithChildren } from '../types'; -export declare const title: FC; -export declare const script: FC>; -export declare const style: FC>; -export declare const link: FC>; -export declare const meta: FC; -export declare const form: FC>; -export declare const input: (props: PropsWithChildren) => unknown; -export declare const button: (props: PropsWithChildren) => unknown; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/jsx/intrinsic-elements.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/jsx/intrinsic-elements.d.ts deleted file mode 100644 index f35b34f..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/jsx/intrinsic-elements.d.ts +++ /dev/null @@ -1,722 +0,0 @@ -import type { BaseMime } from '../utils/mime'; -import type { StringLiteralUnion } from '../utils/types'; -/** - * This code is based on React. - * https://github.com/facebook/react - * MIT License - * Copyright (c) Meta Platforms, Inc. and affiliates. - */ -export declare namespace JSX { - export type CrossOrigin = 'anonymous' | 'use-credentials' | '' | undefined; - export interface CSSProperties { - [propertyKey: string]: unknown; - } - type AnyAttributes = { - [attributeName: string]: any; - }; - interface JSXAttributes { - dangerouslySetInnerHTML?: { - __html: string; - }; - } - interface EventAttributes { - onScroll?: (event: Event) => void; - onScrollCapture?: (event: Event) => void; - onScrollEnd?: (event: Event) => void; - onScrollEndCapture?: (event: Event) => void; - onWheel?: (event: WheelEvent) => void; - onWheelCapture?: (event: WheelEvent) => void; - onAnimationCancel?: (event: AnimationEvent) => void; - onAnimationCancelCapture?: (event: AnimationEvent) => void; - onAnimationEnd?: (event: AnimationEvent) => void; - onAnimationEndCapture?: (event: AnimationEvent) => void; - onAnimationIteration?: (event: AnimationEvent) => void; - onAnimationIterationCapture?: (event: AnimationEvent) => void; - onAnimationStart?: (event: AnimationEvent) => void; - onAnimationStartCapture?: (event: AnimationEvent) => void; - onCopy?: (event: ClipboardEvent) => void; - onCopyCapture?: (event: ClipboardEvent) => void; - onCut?: (event: ClipboardEvent) => void; - onCutCapture?: (event: ClipboardEvent) => void; - onPaste?: (event: ClipboardEvent) => void; - onPasteCapture?: (event: ClipboardEvent) => void; - onCompositionEnd?: (event: CompositionEvent) => void; - onCompositionEndCapture?: (event: CompositionEvent) => void; - onCompositionStart?: (event: CompositionEvent) => void; - onCompositionStartCapture?: (event: CompositionEvent) => void; - onCompositionUpdate?: (event: CompositionEvent) => void; - onCompositionUpdateCapture?: (event: CompositionEvent) => void; - onBlur?: (event: FocusEvent) => void; - onBlurCapture?: (event: FocusEvent) => void; - onFocus?: (event: FocusEvent) => void; - onFocusCapture?: (event: FocusEvent) => void; - onFocusIn?: (event: FocusEvent) => void; - onFocusInCapture?: (event: FocusEvent) => void; - onFocusOut?: (event: FocusEvent) => void; - onFocusOutCapture?: (event: FocusEvent) => void; - onFullscreenChange?: (event: Event) => void; - onFullscreenChangeCapture?: (event: Event) => void; - onFullscreenError?: (event: Event) => void; - onFullscreenErrorCapture?: (event: Event) => void; - onKeyDown?: (event: KeyboardEvent) => void; - onKeyDownCapture?: (event: KeyboardEvent) => void; - onKeyPress?: (event: KeyboardEvent) => void; - onKeyPressCapture?: (event: KeyboardEvent) => void; - onKeyUp?: (event: KeyboardEvent) => void; - onKeyUpCapture?: (event: KeyboardEvent) => void; - onAuxClick?: (event: MouseEvent) => void; - onAuxClickCapture?: (event: MouseEvent) => void; - onClick?: (event: MouseEvent) => void; - onClickCapture?: (event: MouseEvent) => void; - onContextMenu?: (event: MouseEvent) => void; - onContextMenuCapture?: (event: MouseEvent) => void; - onDoubleClick?: (event: MouseEvent) => void; - onDoubleClickCapture?: (event: MouseEvent) => void; - onMouseDown?: (event: MouseEvent) => void; - onMouseDownCapture?: (event: MouseEvent) => void; - onMouseEnter?: (event: MouseEvent) => void; - onMouseEnterCapture?: (event: MouseEvent) => void; - onMouseLeave?: (event: MouseEvent) => void; - onMouseLeaveCapture?: (event: MouseEvent) => void; - onMouseMove?: (event: MouseEvent) => void; - onMouseMoveCapture?: (event: MouseEvent) => void; - onMouseOut?: (event: MouseEvent) => void; - onMouseOutCapture?: (event: MouseEvent) => void; - onMouseOver?: (event: MouseEvent) => void; - onMouseOverCapture?: (event: MouseEvent) => void; - onMouseUp?: (event: MouseEvent) => void; - onMouseUpCapture?: (event: MouseEvent) => void; - onMouseWheel?: (event: WheelEvent) => void; - onMouseWheelCapture?: (event: WheelEvent) => void; - onGotPointerCapture?: (event: PointerEvent) => void; - onGotPointerCaptureCapture?: (event: PointerEvent) => void; - onLostPointerCapture?: (event: PointerEvent) => void; - onLostPointerCaptureCapture?: (event: PointerEvent) => void; - onPointerCancel?: (event: PointerEvent) => void; - onPointerCancelCapture?: (event: PointerEvent) => void; - onPointerDown?: (event: PointerEvent) => void; - onPointerDownCapture?: (event: PointerEvent) => void; - onPointerEnter?: (event: PointerEvent) => void; - onPointerEnterCapture?: (event: PointerEvent) => void; - onPointerLeave?: (event: PointerEvent) => void; - onPointerLeaveCapture?: (event: PointerEvent) => void; - onPointerMove?: (event: PointerEvent) => void; - onPointerMoveCapture?: (event: PointerEvent) => void; - onPointerOut?: (event: PointerEvent) => void; - onPointerOutCapture?: (event: PointerEvent) => void; - onPointerOver?: (event: PointerEvent) => void; - onPointerOverCapture?: (event: PointerEvent) => void; - onPointerUp?: (event: PointerEvent) => void; - onPointerUpCapture?: (event: PointerEvent) => void; - onTouchCancel?: (event: TouchEvent) => void; - onTouchCancelCapture?: (event: TouchEvent) => void; - onTouchEnd?: (event: TouchEvent) => void; - onTouchEndCapture?: (event: TouchEvent) => void; - onTouchMove?: (event: TouchEvent) => void; - onTouchMoveCapture?: (event: TouchEvent) => void; - onTouchStart?: (event: TouchEvent) => void; - onTouchStartCapture?: (event: TouchEvent) => void; - onTransitionCancel?: (event: TransitionEvent) => void; - onTransitionCancelCapture?: (event: TransitionEvent) => void; - onTransitionEnd?: (event: TransitionEvent) => void; - onTransitionEndCapture?: (event: TransitionEvent) => void; - onTransitionRun?: (event: TransitionEvent) => void; - onTransitionRunCapture?: (event: TransitionEvent) => void; - onTransitionStart?: (event: TransitionEvent) => void; - onTransitionStartCapture?: (event: TransitionEvent) => void; - onFormData?: (event: FormDataEvent) => void; - onFormDataCapture?: (event: FormDataEvent) => void; - onReset?: (event: Event) => void; - onResetCapture?: (event: Event) => void; - onSubmit?: (event: Event) => void; - onSubmitCapture?: (event: Event) => void; - onInvalid?: (event: Event) => void; - onInvalidCapture?: (event: Event) => void; - onSelect?: (event: Event) => void; - onSelectCapture?: (event: Event) => void; - onSelectChange?: (event: Event) => void; - onSelectChangeCapture?: (event: Event) => void; - onInput?: (event: InputEvent) => void; - onInputCapture?: (event: InputEvent) => void; - onBeforeInput?: (event: InputEvent) => void; - onBeforeInputCapture?: (event: InputEvent) => void; - onChange?: (event: Event) => void; - onChangeCapture?: (event: Event) => void; - } - export interface HTMLAttributes extends JSXAttributes, EventAttributes, AnyAttributes { - accesskey?: string | undefined; - autocapitalize?: 'off' | 'none' | 'on' | 'sentences' | 'words' | 'characters' | undefined; - autofocus?: boolean | undefined; - class?: string | Promise | undefined; - contenteditable?: boolean | 'inherit' | 'plaintext-only' | undefined; - contextmenu?: string | undefined; - dir?: string | undefined; - draggable?: 'true' | 'false' | boolean | undefined; - enterkeyhint?: 'enter' | 'done' | 'go' | 'next' | 'previous' | 'search' | 'send' | undefined; - hidden?: boolean | undefined; - id?: string | undefined; - inert?: boolean | undefined; - inputmode?: 'none' | 'text' | 'tel' | 'url' | 'email' | 'numeric' | 'decimal' | 'search' | undefined; - is?: string | undefined; - itemid?: string | undefined; - itemprop?: string | undefined; - itemref?: string | undefined; - itemscope?: boolean | undefined; - itemtype?: string | undefined; - lang?: string | undefined; - nonce?: string | undefined; - placeholder?: string | undefined; - /** @see https://developer.mozilla.org/en-US/docs/Web/API/Popover_API */ - popover?: boolean | 'auto' | 'manual' | undefined; - slot?: string | undefined; - spellcheck?: boolean | undefined; - style?: CSSProperties | string | undefined; - tabindex?: number | undefined; - title?: string | undefined; - translate?: 'yes' | 'no' | undefined; - itemProp?: string | undefined; - } - type HTMLAttributeReferrerPolicy = '' | 'no-referrer' | 'no-referrer-when-downgrade' | 'origin' | 'origin-when-cross-origin' | 'same-origin' | 'strict-origin' | 'strict-origin-when-cross-origin' | 'unsafe-url'; - type HTMLAttributeAnchorTarget = StringLiteralUnion<'_self' | '_blank' | '_parent' | '_top'>; - interface AnchorHTMLAttributes extends HTMLAttributes { - download?: string | boolean | undefined; - href?: string | undefined; - hreflang?: string | undefined; - media?: string | undefined; - ping?: string | undefined; - target?: HTMLAttributeAnchorTarget | undefined; - type?: StringLiteralUnion | undefined; - referrerpolicy?: HTMLAttributeReferrerPolicy | undefined; - } - interface AudioHTMLAttributes extends MediaHTMLAttributes { - } - interface AreaHTMLAttributes extends HTMLAttributes { - alt?: string | undefined; - coords?: string | undefined; - download?: string | boolean | undefined; - href?: string | undefined; - hreflang?: string | undefined; - media?: string | undefined; - referrerpolicy?: HTMLAttributeReferrerPolicy | undefined; - shape?: string | undefined; - target?: HTMLAttributeAnchorTarget | undefined; - } - interface BaseHTMLAttributes extends HTMLAttributes { - href?: string | undefined; - target?: HTMLAttributeAnchorTarget | undefined; - } - interface BlockquoteHTMLAttributes extends HTMLAttributes { - cite?: string | undefined; - } - /** @see https://developer.mozilla.org/en-US/docs/Web/API/Popover_API */ - type HTMLAttributePopoverTargetAction = 'show' | 'hide' | 'toggle'; - interface ButtonHTMLAttributes extends HTMLAttributes { - disabled?: boolean | undefined; - form?: string | undefined; - formenctype?: HTMLAttributeFormEnctype | undefined; - formmethod?: HTMLAttributeFormMethod | undefined; - formnovalidate?: boolean | undefined; - formtarget?: HTMLAttributeAnchorTarget | undefined; - name?: string | undefined; - type?: 'submit' | 'reset' | 'button' | undefined; - value?: string | ReadonlyArray | number | undefined; - popovertarget?: string | undefined; - popovertargetaction?: HTMLAttributePopoverTargetAction | undefined; - formAction?: string | Function | undefined; - } - interface CanvasHTMLAttributes extends HTMLAttributes { - height?: number | string | undefined; - width?: number | string | undefined; - } - interface ColHTMLAttributes extends HTMLAttributes { - span?: number | undefined; - width?: number | string | undefined; - } - interface ColgroupHTMLAttributes extends HTMLAttributes { - span?: number | undefined; - } - interface DataHTMLAttributes extends HTMLAttributes { - value?: string | ReadonlyArray | number | undefined; - } - interface DetailsHTMLAttributes extends HTMLAttributes { - open?: boolean | undefined; - } - interface DelHTMLAttributes extends HTMLAttributes { - cite?: string | undefined; - dateTime?: string | undefined; - } - interface DialogHTMLAttributes extends HTMLAttributes { - open?: boolean | undefined; - } - interface EmbedHTMLAttributes extends HTMLAttributes { - height?: number | string | undefined; - src?: string | undefined; - type?: StringLiteralUnion | undefined; - width?: number | string | undefined; - } - interface FieldsetHTMLAttributes extends HTMLAttributes { - disabled?: boolean | undefined; - form?: string | undefined; - name?: string | undefined; - } - /** @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form#method */ - type HTMLAttributeFormMethod = 'get' | 'post' | 'dialog'; - /** @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form#enctype */ - type HTMLAttributeFormEnctype = 'application/x-www-form-urlencoded' | 'multipart/form-data' | 'text/plain'; - /** @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form#autocomplete */ - type HTMLAttributeFormAutocomplete = 'on' | 'off'; - interface FormHTMLAttributes extends HTMLAttributes { - 'accept-charset'?: StringLiteralUnion<'utf-8'> | undefined; - autocomplete?: HTMLAttributeFormAutocomplete | undefined; - enctype?: HTMLAttributeFormEnctype | undefined; - method?: HTMLAttributeFormMethod | undefined; - name?: string | undefined; - novalidate?: boolean | undefined; - target?: HTMLAttributeAnchorTarget | undefined; - action?: string | Function | undefined; - } - interface HtmlHTMLAttributes extends HTMLAttributes { - manifest?: string | undefined; - } - interface IframeHTMLAttributes extends HTMLAttributes { - allow?: string | undefined; - allowfullscreen?: boolean | undefined; - height?: number | string | undefined; - loading?: 'eager' | 'lazy' | undefined; - name?: string | undefined; - referrerpolicy?: HTMLAttributeReferrerPolicy | undefined; - sandbox?: string | undefined; - seamless?: boolean | undefined; - src?: string | undefined; - srcdoc?: string | undefined; - width?: number | string | undefined; - } - interface ImgHTMLAttributes extends HTMLAttributes { - alt?: string | undefined; - crossorigin?: CrossOrigin; - decoding?: 'async' | 'auto' | 'sync' | undefined; - height?: number | string | undefined; - loading?: 'eager' | 'lazy' | undefined; - referrerpolicy?: HTMLAttributeReferrerPolicy | undefined; - sizes?: string | undefined; - src?: string | undefined; - srcset?: string | undefined; - usemap?: string | undefined; - width?: number | string | undefined; - } - interface InsHTMLAttributes extends HTMLAttributes { - cite?: string | undefined; - datetime?: string | undefined; - } - type HTMLInputTypeAttribute = StringLiteralUnion<'button' | 'checkbox' | 'color' | 'date' | 'datetime-local' | 'email' | 'file' | 'hidden' | 'image' | 'month' | 'number' | 'password' | 'radio' | 'range' | 'reset' | 'search' | 'submit' | 'tel' | 'text' | 'time' | 'url' | 'week'>; - type AutoFillAddressKind = 'billing' | 'shipping'; - type AutoFillBase = '' | 'off' | 'on'; - type AutoFillContactField = 'email' | 'tel' | 'tel-area-code' | 'tel-country-code' | 'tel-extension' | 'tel-local' | 'tel-local-prefix' | 'tel-local-suffix' | 'tel-national'; - type AutoFillContactKind = 'home' | 'mobile' | 'work'; - type AutoFillCredentialField = 'webauthn'; - type AutoFillNormalField = 'additional-name' | 'address-level1' | 'address-level2' | 'address-level3' | 'address-level4' | 'address-line1' | 'address-line2' | 'address-line3' | 'bday-day' | 'bday-month' | 'bday-year' | 'cc-csc' | 'cc-exp' | 'cc-exp-month' | 'cc-exp-year' | 'cc-family-name' | 'cc-given-name' | 'cc-name' | 'cc-number' | 'cc-type' | 'country' | 'country-name' | 'current-password' | 'family-name' | 'given-name' | 'honorific-prefix' | 'honorific-suffix' | 'name' | 'new-password' | 'one-time-code' | 'organization' | 'postal-code' | 'street-address' | 'transaction-amount' | 'transaction-currency' | 'username'; - type OptionalPrefixToken = `${T} ` | ''; - type OptionalPostfixToken = ` ${T}` | ''; - type AutoFillField = AutoFillNormalField | `${OptionalPrefixToken}${AutoFillContactField}`; - type AutoFillSection = `section-${string}`; - type AutoFill = AutoFillBase | `${OptionalPrefixToken}${OptionalPrefixToken}${AutoFillField}${OptionalPostfixToken}`; - interface InputHTMLAttributes extends HTMLAttributes { - accept?: string | undefined; - alt?: string | undefined; - autocomplete?: StringLiteralUnion | undefined; - capture?: boolean | 'user' | 'environment' | undefined; - checked?: boolean | undefined; - disabled?: boolean | undefined; - form?: string | undefined; - formenctype?: HTMLAttributeFormEnctype | undefined; - formmethod?: HTMLAttributeFormMethod | undefined; - formnovalidate?: boolean | undefined; - formtarget?: HTMLAttributeAnchorTarget | undefined; - height?: number | string | undefined; - list?: string | undefined; - max?: number | string | undefined; - maxlength?: number | undefined; - min?: number | string | undefined; - minlength?: number | undefined; - multiple?: boolean | undefined; - name?: string | undefined; - pattern?: string | undefined; - placeholder?: string | undefined; - readonly?: boolean | undefined; - required?: boolean | undefined; - size?: number | undefined; - src?: string | undefined; - step?: number | string | undefined; - type?: HTMLInputTypeAttribute | undefined; - value?: string | ReadonlyArray | number | undefined; - width?: number | string | undefined; - popovertarget?: string | undefined; - popovertargetaction?: HTMLAttributePopoverTargetAction | undefined; - formAction?: string | Function | undefined; - } - interface KeygenHTMLAttributes extends HTMLAttributes { - challenge?: string | undefined; - disabled?: boolean | undefined; - form?: string | undefined; - keytype?: string | undefined; - name?: string | undefined; - } - interface LabelHTMLAttributes extends HTMLAttributes { - form?: string | undefined; - for?: string | undefined; - } - interface LiHTMLAttributes extends HTMLAttributes { - value?: string | ReadonlyArray | number | undefined; - } - interface LinkHTMLAttributes extends HTMLAttributes { - as?: string | undefined; - crossorigin?: CrossOrigin; - href?: string | undefined; - hreflang?: string | undefined; - integrity?: string | undefined; - media?: string | undefined; - imagesrcset?: string | undefined; - imagesizes?: string | undefined; - referrerpolicy?: HTMLAttributeReferrerPolicy | undefined; - sizes?: string | undefined; - type?: StringLiteralUnion | undefined; - charSet?: string | undefined; - rel?: string | undefined; - precedence?: string | undefined; - title?: string | undefined; - disabled?: boolean | undefined; - onError?: ((event: Event) => void) | undefined; - onLoad?: ((event: Event) => void) | undefined; - blocking?: 'render' | undefined; - } - interface MapHTMLAttributes extends HTMLAttributes { - name?: string | undefined; - } - interface MenuHTMLAttributes extends HTMLAttributes { - type?: string | undefined; - } - interface MediaHTMLAttributes extends HTMLAttributes { - autoplay?: boolean | undefined; - controls?: boolean | undefined; - controlslist?: string | undefined; - crossorigin?: CrossOrigin; - loop?: boolean | undefined; - mediagroup?: string | undefined; - muted?: boolean | undefined; - playsinline?: boolean | undefined; - preload?: string | undefined; - src?: string | undefined; - } - /** - * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta#http-equiv - */ - type MetaHttpEquiv = 'content-security-policy' | 'content-type' | 'default-style' | 'x-ua-compatible' | 'refresh'; - /** - * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta/name - */ - type MetaName = 'application-name' | 'author' | 'description' | 'generator' | 'keywords' | 'referrer' | 'theme-color' | 'color-scheme' | 'viewport' | 'creator' | 'googlebot' | 'publisher' | 'robots'; - /** - * @see https://ogp.me/ - */ - type MetaProperty = 'og:title' | 'og:type' | 'og:image' | 'og:url' | 'og:audio' | 'og:description' | 'og:determiner' | 'og:locale' | 'og:locale:alternate' | 'og:site_name' | 'og:video' | 'og:image:url' | 'og:image:secure_url' | 'og:image:type' | 'og:image:width' | 'og:image:height' | 'og:image:alt'; - interface MetaHTMLAttributes extends HTMLAttributes { - charset?: StringLiteralUnion<'utf-8'> | undefined; - 'http-equiv'?: StringLiteralUnion | undefined; - name?: StringLiteralUnion | undefined; - media?: string | undefined; - content?: string | undefined; - property?: StringLiteralUnion | undefined; - httpEquiv?: StringLiteralUnion | undefined; - } - interface MeterHTMLAttributes extends HTMLAttributes { - form?: string | undefined; - high?: number | undefined; - low?: number | undefined; - max?: number | string | undefined; - min?: number | string | undefined; - optimum?: number | undefined; - value?: string | ReadonlyArray | number | undefined; - } - interface QuoteHTMLAttributes extends HTMLAttributes { - cite?: string | undefined; - } - interface ObjectHTMLAttributes extends HTMLAttributes { - data?: string | undefined; - form?: string | undefined; - height?: number | string | undefined; - name?: string | undefined; - type?: StringLiteralUnion | undefined; - usemap?: string | undefined; - width?: number | string | undefined; - } - interface OlHTMLAttributes extends HTMLAttributes { - reversed?: boolean | undefined; - start?: number | undefined; - type?: '1' | 'a' | 'A' | 'i' | 'I' | undefined; - } - interface OptgroupHTMLAttributes extends HTMLAttributes { - disabled?: boolean | undefined; - label?: string | undefined; - } - interface OptionHTMLAttributes extends HTMLAttributes { - disabled?: boolean | undefined; - label?: string | undefined; - selected?: boolean | undefined; - value?: string | ReadonlyArray | number | undefined; - } - interface OutputHTMLAttributes extends HTMLAttributes { - form?: string | undefined; - for?: string | undefined; - name?: string | undefined; - } - interface ParamHTMLAttributes extends HTMLAttributes { - name?: string | undefined; - value?: string | ReadonlyArray | number | undefined; - } - interface ProgressHTMLAttributes extends HTMLAttributes { - max?: number | string | undefined; - value?: string | ReadonlyArray | number | undefined; - } - interface SlotHTMLAttributes extends HTMLAttributes { - name?: string | undefined; - } - interface ScriptHTMLAttributes extends HTMLAttributes { - async?: boolean | undefined; - crossorigin?: CrossOrigin; - defer?: boolean | undefined; - integrity?: string | undefined; - nomodule?: boolean | undefined; - referrerpolicy?: HTMLAttributeReferrerPolicy | undefined; - src?: string | undefined; - /** - * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script/type - */ - type?: StringLiteralUnion<'' | 'text/javascript' | 'importmap' | 'module'> | undefined; - crossOrigin?: CrossOrigin; - fetchPriority?: string | undefined; - noModule?: boolean | undefined; - referrer?: HTMLAttributeReferrerPolicy | undefined; - onError?: ((event: Event) => void) | undefined; - onLoad?: ((event: Event) => void) | undefined; - blocking?: 'render' | undefined; - } - interface SelectHTMLAttributes extends HTMLAttributes { - autocomplete?: string | undefined; - disabled?: boolean | undefined; - form?: string | undefined; - multiple?: boolean | undefined; - name?: string | undefined; - required?: boolean | undefined; - size?: number | undefined; - value?: string | ReadonlyArray | number | undefined; - } - type MediaMime = BaseMime & (`image/${string}` | `audio/${string}` | `video/${string}`); - interface SourceHTMLAttributes extends HTMLAttributes { - height?: number | string | undefined; - media?: string | undefined; - sizes?: string | undefined; - src?: string | undefined; - srcset?: string | undefined; - type?: StringLiteralUnion | undefined; - width?: number | string | undefined; - } - interface StyleHTMLAttributes extends HTMLAttributes { - media?: string | undefined; - scoped?: boolean | undefined; - /** - * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/style#type - */ - type?: '' | 'text/css' | undefined; - href?: string | undefined; - precedence?: string | undefined; - title?: string | undefined; - disabled?: boolean | undefined; - blocking?: 'render' | undefined; - } - interface TableHTMLAttributes extends HTMLAttributes { - align?: 'left' | 'center' | 'right' | undefined; - bgcolor?: string | undefined; - border?: number | undefined; - cellpadding?: number | string | undefined; - cellspacing?: number | string | undefined; - frame?: boolean | undefined; - rules?: 'none' | 'groups' | 'rows' | 'columns' | 'all' | undefined; - summary?: string | undefined; - width?: number | string | undefined; - } - interface TextareaHTMLAttributes extends HTMLAttributes { - autocomplete?: string | undefined; - cols?: number | undefined; - dirname?: string | undefined; - disabled?: boolean | undefined; - form?: string | undefined; - maxlength?: number | undefined; - minlength?: number | undefined; - name?: string | undefined; - placeholder?: string | undefined; - readonly?: boolean | undefined; - required?: boolean | undefined; - rows?: number | undefined; - value?: string | ReadonlyArray | number | undefined; - wrap?: string | undefined; - } - interface TdHTMLAttributes extends HTMLAttributes { - align?: 'left' | 'center' | 'right' | 'justify' | 'char' | undefined; - colspan?: number | undefined; - headers?: string | undefined; - rowspan?: number | undefined; - scope?: string | undefined; - abbr?: string | undefined; - height?: number | string | undefined; - width?: number | string | undefined; - valign?: 'top' | 'middle' | 'bottom' | 'baseline' | undefined; - } - interface ThHTMLAttributes extends HTMLAttributes { - align?: 'left' | 'center' | 'right' | 'justify' | 'char' | undefined; - colspan?: number | undefined; - headers?: string | undefined; - rowspan?: number | undefined; - scope?: 'row' | 'col' | 'rowgroup' | 'colgroup' | string | undefined; - abbr?: string | undefined; - } - interface TimeHTMLAttributes extends HTMLAttributes { - datetime?: string | undefined; - } - interface TrackHTMLAttributes extends HTMLAttributes { - default?: boolean | undefined; - kind?: string | undefined; - label?: string | undefined; - src?: string | undefined; - srclang?: string | undefined; - } - interface VideoHTMLAttributes extends MediaHTMLAttributes { - height?: number | string | undefined; - playsinline?: boolean | undefined; - poster?: string | undefined; - width?: number | string | undefined; - disablePictureInPicture?: boolean | undefined; - disableRemotePlayback?: boolean | undefined; - } - export interface IntrinsicElements { - a: AnchorHTMLAttributes; - abbr: HTMLAttributes; - address: HTMLAttributes; - area: AreaHTMLAttributes; - article: HTMLAttributes; - aside: HTMLAttributes; - audio: AudioHTMLAttributes; - b: HTMLAttributes; - base: BaseHTMLAttributes; - bdi: HTMLAttributes; - bdo: HTMLAttributes; - big: HTMLAttributes; - blockquote: BlockquoteHTMLAttributes; - body: HTMLAttributes; - br: HTMLAttributes; - button: ButtonHTMLAttributes; - canvas: CanvasHTMLAttributes; - caption: HTMLAttributes; - center: HTMLAttributes; - cite: HTMLAttributes; - code: HTMLAttributes; - col: ColHTMLAttributes; - colgroup: ColgroupHTMLAttributes; - data: DataHTMLAttributes; - datalist: HTMLAttributes; - dd: HTMLAttributes; - del: DelHTMLAttributes; - details: DetailsHTMLAttributes; - dfn: HTMLAttributes; - dialog: DialogHTMLAttributes; - div: HTMLAttributes; - dl: HTMLAttributes; - dt: HTMLAttributes; - em: HTMLAttributes; - embed: EmbedHTMLAttributes; - fieldset: FieldsetHTMLAttributes; - figcaption: HTMLAttributes; - figure: HTMLAttributes; - footer: HTMLAttributes; - form: FormHTMLAttributes; - h1: HTMLAttributes; - h2: HTMLAttributes; - h3: HTMLAttributes; - h4: HTMLAttributes; - h5: HTMLAttributes; - h6: HTMLAttributes; - head: HTMLAttributes; - header: HTMLAttributes; - hgroup: HTMLAttributes; - hr: HTMLAttributes; - html: HtmlHTMLAttributes; - i: HTMLAttributes; - iframe: IframeHTMLAttributes; - img: ImgHTMLAttributes; - input: InputHTMLAttributes; - ins: InsHTMLAttributes; - kbd: HTMLAttributes; - keygen: KeygenHTMLAttributes; - label: LabelHTMLAttributes; - legend: HTMLAttributes; - li: LiHTMLAttributes; - link: LinkHTMLAttributes; - main: HTMLAttributes; - map: MapHTMLAttributes; - mark: HTMLAttributes; - menu: MenuHTMLAttributes; - menuitem: HTMLAttributes; - meta: MetaHTMLAttributes; - meter: MeterHTMLAttributes; - nav: HTMLAttributes; - noscript: HTMLAttributes; - object: ObjectHTMLAttributes; - ol: OlHTMLAttributes; - optgroup: OptgroupHTMLAttributes; - option: OptionHTMLAttributes; - output: OutputHTMLAttributes; - p: HTMLAttributes; - param: ParamHTMLAttributes; - picture: HTMLAttributes; - pre: HTMLAttributes; - progress: ProgressHTMLAttributes; - q: QuoteHTMLAttributes; - rp: HTMLAttributes; - rt: HTMLAttributes; - ruby: HTMLAttributes; - s: HTMLAttributes; - samp: HTMLAttributes; - search: HTMLAttributes; - slot: SlotHTMLAttributes; - script: ScriptHTMLAttributes; - section: HTMLAttributes; - select: SelectHTMLAttributes; - small: HTMLAttributes; - source: SourceHTMLAttributes; - span: HTMLAttributes; - strong: HTMLAttributes; - style: StyleHTMLAttributes; - sub: HTMLAttributes; - summary: HTMLAttributes; - sup: HTMLAttributes; - table: TableHTMLAttributes; - template: HTMLAttributes; - tbody: HTMLAttributes; - td: TdHTMLAttributes; - textarea: TextareaHTMLAttributes; - tfoot: HTMLAttributes; - th: ThHTMLAttributes; - thead: HTMLAttributes; - time: TimeHTMLAttributes; - title: HTMLAttributes; - tr: HTMLAttributes; - track: TrackHTMLAttributes; - u: HTMLAttributes; - ul: HTMLAttributes; - var: HTMLAttributes; - video: VideoHTMLAttributes; - wbr: HTMLAttributes; - } - export {}; -} -export interface IntrinsicElements extends JSX.IntrinsicElements { -} diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/jsx/jsx-dev-runtime.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/jsx/jsx-dev-runtime.d.ts deleted file mode 100644 index aa11518..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/jsx/jsx-dev-runtime.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -/** - * @module - * This module provides Hono's JSX dev runtime. - */ -import type { JSXNode } from './base'; -export { Fragment } from './base'; -export type { JSX } from './base'; -export declare function jsxDEV(tag: string | Function, props: Record, key?: string): JSXNode; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/jsx/jsx-runtime.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/jsx/jsx-runtime.d.ts deleted file mode 100644 index 41ab669..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/jsx/jsx-runtime.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -/** - * @module - * This module provides Hono's JSX runtime. - */ -export { jsxDEV as jsx, Fragment } from './jsx-dev-runtime'; -export { jsxDEV as jsxs } from './jsx-dev-runtime'; -export type { JSX } from './jsx-dev-runtime'; -import { html } from '../helper/html'; -import type { HtmlEscapedString } from '../utils/html'; -export { html as jsxTemplate }; -export declare const jsxAttr: (key: string, v: string | Promise | Record) => HtmlEscapedString | Promise; -export declare const jsxEscape: (value: string) => string; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/jsx/streaming.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/jsx/streaming.d.ts deleted file mode 100644 index 6c85bae..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/jsx/streaming.d.ts +++ /dev/null @@ -1,36 +0,0 @@ -/** - * @module - * This module enables JSX to supports streaming Response. - */ -import type { HtmlEscapedString } from '../utils/html'; -import { JSXNode } from './base'; -import type { FC, PropsWithChildren, Context as JSXContext } from './'; -/** - * Used to specify nonce for scripts generated by `Suspense` and `ErrorBoundary`. - * - * @example - * ```tsx - * - * Loading...

}> - * - * - * - * ``` - */ -export declare const StreamingContext: JSXContext<{ - scriptNonce: string; -} | null>; -/** - * @experimental - * `Suspense` is an experimental feature. - * The API might be changed. - */ -export declare const Suspense: FC>; -/** - * @experimental - * `renderToReadableStream()` is an experimental feature. - * The API might be changed. - */ -export declare const renderToReadableStream: (content: HtmlEscapedString | JSXNode | Promise, onError?: (e: unknown) => string | void) => ReadableStream; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/jsx/types.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/jsx/types.d.ts deleted file mode 100644 index 2251ba7..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/jsx/types.d.ts +++ /dev/null @@ -1,35 +0,0 @@ -/** - * All types exported from "hono/jsx" are in this file. - */ -import type { Child, JSXNode } from './base'; -import type { JSX } from './intrinsic-elements'; -export type { Child, JSXNode, FC } from './base'; -export type { RefObject } from './hooks'; -export type { Context } from './context'; -export type PropsWithChildren

= P & { - children?: Child | undefined; -}; -export type CSSProperties = JSX.CSSProperties; -/** - * React types - */ -type ReactElement

= JSXNode & { - type: T; - props: P; - key: string | null; -}; -type ReactNode = ReactElement | string | number | boolean | null | undefined; -type ComponentClass

= unknown; -export type { ReactElement, ReactNode, ComponentClass }; -export type Event = globalThis.Event; -export type MouseEvent = globalThis.MouseEvent; -export type KeyboardEvent = globalThis.KeyboardEvent; -export type FocusEvent = globalThis.FocusEvent; -export type ClipboardEvent = globalThis.ClipboardEvent; -export type InputEvent = globalThis.InputEvent; -export type PointerEvent = globalThis.PointerEvent; -export type TouchEvent = globalThis.TouchEvent; -export type WheelEvent = globalThis.WheelEvent; -export type AnimationEvent = globalThis.AnimationEvent; -export type TransitionEvent = globalThis.TransitionEvent; -export type DragEvent = globalThis.DragEvent; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/jsx/utils.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/jsx/utils.d.ts deleted file mode 100644 index 8dd469a..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/jsx/utils.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export declare const normalizeIntrinsicElementKey: (key: string) => string; -export declare const styleObjectForEach: (style: Record, fn: (key: string, value: string | null) => void) => void; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/middleware/basic-auth/index.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/middleware/basic-auth/index.d.ts deleted file mode 100644 index 80cb793..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/middleware/basic-auth/index.d.ts +++ /dev/null @@ -1,56 +0,0 @@ -/** - * @module - * Basic Auth Middleware for Hono. - */ -import type { Context } from '../../context'; -import type { MiddlewareHandler } from '../../types'; -type MessageFunction = (c: Context) => string | object | Promise; -type BasicAuthOptions = { - username: string; - password: string; - realm?: string; - hashFunction?: Function; - invalidUserMessage?: string | object | MessageFunction; -} | { - verifyUser: (username: string, password: string, c: Context) => boolean | Promise; - realm?: string; - hashFunction?: Function; - invalidUserMessage?: string | object | MessageFunction; -}; -/** - * Basic Auth Middleware for Hono. - * - * @see {@link https://hono.dev/docs/middleware/builtin/basic-auth} - * - * @param {BasicAuthOptions} options - The options for the basic authentication middleware. - * @param {string} options.username - The username for authentication. - * @param {string} options.password - The password for authentication. - * @param {string} [options.realm="Secure Area"] - The realm attribute for the WWW-Authenticate header. - * @param {Function} [options.hashFunction] - The hash function used for secure comparison. - * @param {Function} [options.verifyUser] - The function to verify user credentials. - * @param {string | object | MessageFunction} [options.invalidUserMessage="Unauthorized"] - The invalid user message. - * @returns {MiddlewareHandler} The middleware handler function. - * @throws {HTTPException} If neither "username and password" nor "verifyUser" options are provided. - * - * @example - * ```ts - * const app = new Hono() - * - * app.use( - * '/auth/*', - * basicAuth({ - * username: 'hono', - * password: 'ahotproject', - * }) - * ) - * - * app.get('/auth/page', (c) => { - * return c.text('You are authorized') - * }) - * ``` - */ -export declare const basicAuth: (options: BasicAuthOptions, ...users: { - username: string; - password: string; -}[]) => MiddlewareHandler; -export {}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/middleware/bearer-auth/index.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/middleware/bearer-auth/index.d.ts deleted file mode 100644 index 6164585..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/middleware/bearer-auth/index.d.ts +++ /dev/null @@ -1,91 +0,0 @@ -/** - * @module - * Bearer Auth Middleware for Hono. - */ -import type { Context } from '../../context'; -import type { MiddlewareHandler } from '../../types'; -type MessageFunction = (c: Context) => string | object | Promise; -type CustomizedErrorResponseOptions = { - wwwAuthenticateHeader?: string | object | MessageFunction; - message?: string | object | MessageFunction; -}; -type BearerAuthOptions = { - token: string | string[]; - realm?: string; - prefix?: string; - headerName?: string; - hashFunction?: Function; - /** - * @deprecated Use noAuthenticationHeader.message instead - */ - noAuthenticationHeaderMessage?: string | object | MessageFunction; - noAuthenticationHeader?: CustomizedErrorResponseOptions; - /** - * @deprecated Use invalidAuthenticationHeader.message instead - */ - invalidAuthenticationHeaderMessage?: string | object | MessageFunction; - invalidAuthenticationHeader?: CustomizedErrorResponseOptions; - /** - * @deprecated Use invalidToken.message instead - */ - invalidTokenMessage?: string | object | MessageFunction; - invalidToken?: CustomizedErrorResponseOptions; -} | { - realm?: string; - prefix?: string; - headerName?: string; - verifyToken: (token: string, c: Context) => boolean | Promise; - hashFunction?: Function; - /** - * @deprecated Use noAuthenticationHeader.message instead - */ - noAuthenticationHeaderMessage?: string | object | MessageFunction; - noAuthenticationHeader?: CustomizedErrorResponseOptions; - /** - * @deprecated Use invalidAuthenticationHeader.message instead - */ - invalidAuthenticationHeaderMessage?: string | object | MessageFunction; - invalidAuthenticationHeader?: CustomizedErrorResponseOptions; - /** - * @deprecated Use invalidToken.message instead - */ - invalidTokenMessage?: string | object | MessageFunction; - invalidToken?: CustomizedErrorResponseOptions; -}; -/** - * Bearer Auth Middleware for Hono. - * - * @see {@link https://hono.dev/docs/middleware/builtin/bearer-auth} - * - * @param {BearerAuthOptions} options - The options for the bearer authentication middleware. - * @param {string | string[]} [options.token] - The string or array of strings to validate the incoming bearer token against. - * @param {Function} [options.verifyToken] - The function to verify the token. - * @param {string} [options.realm=""] - The domain name of the realm, as part of the returned WWW-Authenticate challenge header. - * @param {string} [options.prefix="Bearer"] - The prefix (or known as `schema`) for the Authorization header value. If set to the empty string, no prefix is expected. - * @param {string} [options.headerName=Authorization] - The header name. - * @param {Function} [options.hashFunction] - A function to handle hashing for safe comparison of authentication tokens. - * @param {string | object | MessageFunction} [options.noAuthenticationHeader.message="Unauthorized"] - The no authentication header message. - * @param {string | object | MessageFunction} [options.noAuthenticationHeader.wwwAuthenticateHeader="Bearer realm=\"\""] - The response header value for the WWW-Authenticate header when no authentication header is provided. - * @param {string | object | MessageFunction} [options.invalidAuthenticationHeader.message="Bad Request"] - The invalid authentication header message. - * @param {string | object | MessageFunction} [options.invalidAuthenticationHeader.wwwAuthenticateHeader="Bearer error=\"invalid_request\""] - The response header value for the WWW-Authenticate header when authentication header is invalid. - * @param {string | object | MessageFunction} [options.invalidToken.message="Unauthorized"] - The invalid token message. - * @param {string | object | MessageFunction} [options.invalidToken.wwwAuthenticateHeader="Bearer error=\"invalid_token\""] - The response header value for the WWW-Authenticate header when token is invalid. - * @returns {MiddlewareHandler} The middleware handler function. - * @throws {Error} If neither "token" nor "verifyToken" options are provided. - * @throws {HTTPException} If authentication fails, with 401 status code for missing or invalid token, or 400 status code for invalid request. - * - * @example - * ```ts - * const app = new Hono() - * - * const token = 'honoishot' - * - * app.use('/api/*', bearerAuth({ token })) - * - * app.get('/api/page', (c) => { - * return c.json({ message: 'You are authorized' }) - * }) - * ``` - */ -export declare const bearerAuth: (options: BearerAuthOptions) => MiddlewareHandler; -export {}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/middleware/body-limit/index.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/middleware/body-limit/index.d.ts deleted file mode 100644 index 754e9ec..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/middleware/body-limit/index.d.ts +++ /dev/null @@ -1,45 +0,0 @@ -/** - * @module - * Body Limit Middleware for Hono. - */ -import type { Context } from '../../context'; -import type { MiddlewareHandler } from '../../types'; -type OnError = (c: Context) => Response | Promise; -type BodyLimitOptions = { - maxSize: number; - onError?: OnError; -}; -/** - * Body Limit Middleware for Hono. - * - * @see {@link https://hono.dev/docs/middleware/builtin/body-limit} - * - * @param {BodyLimitOptions} options - The options for the body limit middleware. - * @param {number} options.maxSize - The maximum body size allowed. - * @param {OnError} [options.onError] - The error handler to be invoked if the specified body size is exceeded. - * @returns {MiddlewareHandler} The middleware handler function. - * - * @example - * ```ts - * const app = new Hono() - * - * app.post( - * '/upload', - * bodyLimit({ - * maxSize: 50 * 1024, // 50kb - * onError: (c) => { - * return c.text('overflow :(', 413) - * }, - * }), - * async (c) => { - * const body = await c.req.parseBody() - * if (body['file'] instanceof File) { - * console.log(`Got file sized: ${body['file'].size}`) - * } - * return c.text('pass :)') - * } - * ) - * ``` - */ -export declare const bodyLimit: (options: BodyLimitOptions) => MiddlewareHandler; -export {}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/middleware/cache/index.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/middleware/cache/index.d.ts deleted file mode 100644 index 5d03727..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/middleware/cache/index.d.ts +++ /dev/null @@ -1,41 +0,0 @@ -/** - * @module - * Cache Middleware for Hono. - */ -import type { Context } from '../../context'; -import type { MiddlewareHandler } from '../../types'; -import type { StatusCode } from '../../utils/http-status'; -/** - * Cache Middleware for Hono. - * - * @see {@link https://hono.dev/docs/middleware/builtin/cache} - * - * @param {Object} options - The options for the cache middleware. - * @param {string | Function} options.cacheName - The name of the cache. Can be used to store multiple caches with different identifiers. - * @param {boolean} [options.wait=false] - A boolean indicating if Hono should wait for the Promise of the `cache.put` function to resolve before continuing with the request. Required to be true for the Deno environment. - * @param {string} [options.cacheControl] - A string of directives for the `Cache-Control` header. - * @param {string | string[]} [options.vary] - Sets the `Vary` header in the response. If the original response header already contains a `Vary` header, the values are merged, removing any duplicates. - * @param {Function} [options.keyGenerator] - Generates keys for every request in the `cacheName` store. This can be used to cache data based on request parameters or context parameters. - * @param {number[]} [options.cacheableStatusCodes=[200]] - An array of status codes that can be cached. - * @returns {MiddlewareHandler} The middleware handler function. - * @throws {Error} If the `vary` option includes "*". - * - * @example - * ```ts - * app.get( - * '*', - * cache({ - * cacheName: 'my-app', - * cacheControl: 'max-age=3600', - * }) - * ) - * ``` - */ -export declare const cache: (options: { - cacheName: string | ((c: Context) => Promise | string); - wait?: boolean; - cacheControl?: string; - vary?: string | string[]; - keyGenerator?: (c: Context) => Promise | string; - cacheableStatusCodes?: StatusCode[]; -}) => MiddlewareHandler; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/middleware/combine/index.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/middleware/combine/index.d.ts deleted file mode 100644 index 57e53dc..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/middleware/combine/index.d.ts +++ /dev/null @@ -1,85 +0,0 @@ -/** - * @module - * Combine Middleware for Hono. - */ -import type { Context } from '../../context'; -import type { MiddlewareHandler } from '../../types'; -type Condition = (c: Context) => boolean; -/** - * Create a composed middleware that runs the first middleware that returns true. - * - * @param middleware - An array of MiddlewareHandler or Condition functions. - * Middleware is applied in the order it is passed, and if any middleware exits without returning - * an exception first, subsequent middleware will not be executed. - * You can also pass a condition function that returns a boolean value. If returns true - * the evaluation will be halted, and rest of the middleware will not be executed. - * @returns A composed middleware. - * - * @example - * ```ts - * import { some } from 'hono/combine' - * import { bearerAuth } from 'hono/bearer-auth' - * import { myRateLimit } from '@/rate-limit' - * - * // If client has a valid token, then skip rate limiting. - * // Otherwise, apply rate limiting. - * app.use('/api/*', some( - * bearerAuth({ token }), - * myRateLimit({ limit: 100 }), - * )); - * ``` - */ -export declare const some: (...middleware: (MiddlewareHandler | Condition)[]) => MiddlewareHandler; -/** - * Create a composed middleware that runs all middleware and throws an error if any of them fail. - * - * @param middleware - An array of MiddlewareHandler or Condition functions. - * Middleware is applied in the order it is passed, and if any middleware throws an error, - * subsequent middleware will not be executed. - * You can also pass a condition function that returns a boolean value. If returns false - * the evaluation will be halted, and rest of the middleware will not be executed. - * @returns A composed middleware. - * - * @example - * ```ts - * import { some, every } from 'hono/combine' - * import { bearerAuth } from 'hono/bearer-auth' - * import { myCheckLocalNetwork } from '@/check-local-network' - * import { myRateLimit } from '@/rate-limit' - * - * // If client is in local network, then skip authentication and rate limiting. - * // Otherwise, apply authentication and rate limiting. - * app.use('/api/*', some( - * myCheckLocalNetwork(), - * every( - * bearerAuth({ token }), - * myRateLimit({ limit: 100 }), - * ), - * )); - * ``` - */ -export declare const every: (...middleware: (MiddlewareHandler | Condition)[]) => MiddlewareHandler; -/** - * Create a composed middleware that runs all middleware except when the condition is met. - * - * @param condition - A string or Condition function. - * If there are multiple targets to match any of them, they can be passed as an array. - * If a string is passed, it will be treated as a path pattern to match. - * If a Condition function is passed, it will be evaluated against the request context. - * @param middleware - A composed middleware - * - * @example - * ```ts - * import { except } from 'hono/combine' - * import { bearerAuth } from 'hono/bearer-auth - * - * // If client is accessing public API, then skip authentication. - * // Otherwise, require a valid token. - * app.use('/api/*', except( - * '/api/public/*', - * bearerAuth({ token }), - * )); - * ``` - */ -export declare const except: (condition: string | Condition | (string | Condition)[], ...middleware: MiddlewareHandler[]) => MiddlewareHandler; -export {}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/middleware/compress/index.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/middleware/compress/index.d.ts deleted file mode 100644 index aa8f937..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/middleware/compress/index.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -/** - * @module - * Compress Middleware for Hono. - */ -import type { MiddlewareHandler } from '../../types'; -declare const ENCODING_TYPES: readonly ["gzip", "deflate"]; -interface CompressionOptions { - encoding?: (typeof ENCODING_TYPES)[number]; - threshold?: number; -} -/** - * Compress Middleware for Hono. - * - * @see {@link https://hono.dev/docs/middleware/builtin/compress} - * - * @param {CompressionOptions} [options] - The options for the compress middleware. - * @param {'gzip' | 'deflate'} [options.encoding] - The compression scheme to allow for response compression. Either 'gzip' or 'deflate'. If not defined, both are allowed and will be used based on the Accept-Encoding header. 'gzip' is prioritized if this option is not provided and the client provides both in the Accept-Encoding header. - * @param {number} [options.threshold=1024] - The minimum size in bytes to compress. Defaults to 1024 bytes. - * @returns {MiddlewareHandler} The middleware handler function. - * - * @example - * ```ts - * const app = new Hono() - * - * app.use(compress()) - * ``` - */ -export declare const compress: (options?: CompressionOptions) => MiddlewareHandler; -export {}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/middleware/context-storage/index.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/middleware/context-storage/index.d.ts deleted file mode 100644 index 6e6301b..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/middleware/context-storage/index.d.ts +++ /dev/null @@ -1,40 +0,0 @@ -/** - * @module - * Context Storage Middleware for Hono. - */ -import type { Context } from '../../context'; -import type { Env, MiddlewareHandler } from '../../types'; -/** - * Context Storage Middleware for Hono. - * - * @see {@link https://hono.dev/docs/middleware/builtin/context-storage} - * - * @returns {MiddlewareHandler} The middleware handler function. - * - * @example - * ```ts - * type Env = { - * Variables: { - * message: string - * } - * } - * - * const app = new Hono() - * - * app.use(contextStorage()) - * - * app.use(async (c, next) => { - * c.set('message', 'Hono is hot!!) - * await next() - * }) - * - * app.get('/', async (c) => { c.text(getMessage()) }) - * - * const getMessage = () => { - * return getContext().var.message - * } - * ``` - */ -export declare const contextStorage: () => MiddlewareHandler; -export declare const tryGetContext: () => Context | undefined; -export declare const getContext: () => Context; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/middleware/cors/index.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/middleware/cors/index.d.ts deleted file mode 100644 index c23fb3e..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/middleware/cors/index.d.ts +++ /dev/null @@ -1,55 +0,0 @@ -/** - * @module - * CORS Middleware for Hono. - */ -import type { Context } from '../../context'; -import type { MiddlewareHandler } from '../../types'; -type CORSOptions = { - origin: string | string[] | ((origin: string, c: Context) => Promise | string | undefined | null); - allowMethods?: string[] | ((origin: string, c: Context) => Promise | string[]); - allowHeaders?: string[]; - maxAge?: number; - credentials?: boolean; - exposeHeaders?: string[]; -}; -/** - * CORS Middleware for Hono. - * - * @see {@link https://hono.dev/docs/middleware/builtin/cors} - * - * @param {CORSOptions} [options] - The options for the CORS middleware. - * @param {string | string[] | ((origin: string, c: Context) => Promise | string | undefined | null)} [options.origin='*'] - The value of "Access-Control-Allow-Origin" CORS header. - * @param {string[] | ((origin: string, c: Context) => Promise | string[])} [options.allowMethods=['GET', 'HEAD', 'PUT', 'POST', 'DELETE', 'PATCH']] - The value of "Access-Control-Allow-Methods" CORS header. - * @param {string[]} [options.allowHeaders=[]] - The value of "Access-Control-Allow-Headers" CORS header. - * @param {number} [options.maxAge] - The value of "Access-Control-Max-Age" CORS header. - * @param {boolean} [options.credentials] - The value of "Access-Control-Allow-Credentials" CORS header. - * @param {string[]} [options.exposeHeaders=[]] - The value of "Access-Control-Expose-Headers" CORS header. - * @returns {MiddlewareHandler} The middleware handler function. - * - * @example - * ```ts - * const app = new Hono() - * - * app.use('/api/*', cors()) - * app.use( - * '/api2/*', - * cors({ - * origin: 'http://example.com', - * allowHeaders: ['X-Custom-Header', 'Upgrade-Insecure-Requests'], - * allowMethods: ['POST', 'GET', 'OPTIONS'], - * exposeHeaders: ['Content-Length', 'X-Kuma-Revision'], - * maxAge: 600, - * credentials: true, - * }) - * ) - * - * app.all('/api/abc', (c) => { - * return c.json({ success: true }) - * }) - * app.all('/api2/abc', (c) => { - * return c.json({ success: true }) - * }) - * ``` - */ -export declare const cors: (options?: CORSOptions) => MiddlewareHandler; -export {}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/middleware/csrf/index.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/middleware/csrf/index.d.ts deleted file mode 100644 index fc47854..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/middleware/csrf/index.d.ts +++ /dev/null @@ -1,78 +0,0 @@ -/** - * @module - * CSRF Protection Middleware for Hono. - */ -import type { Context } from '../../context'; -import type { MiddlewareHandler } from '../../types'; -type IsAllowedOriginHandler = (origin: string, context: Context) => boolean | Promise; -declare const secFetchSiteValues: readonly ["same-origin", "same-site", "none", "cross-site"]; -type SecFetchSite = (typeof secFetchSiteValues)[number]; -type IsAllowedSecFetchSiteHandler = (secFetchSite: SecFetchSite, context: Context) => boolean | Promise; -interface CSRFOptions { - origin?: string | string[] | IsAllowedOriginHandler; - secFetchSite?: SecFetchSite | SecFetchSite[] | IsAllowedSecFetchSiteHandler; -} -/** - * CSRF Protection Middleware for Hono. - * - * Protects against Cross-Site Request Forgery attacks by validating request origins - * and sec-fetch-site headers. The request is allowed if either validation passes. - * - * @see {@link https://hono.dev/docs/middleware/builtin/csrf} - * - * @param {CSRFOptions} [options] - The options for the CSRF protection middleware. - * @param {string|string[]|(origin: string, context: Context) => boolean} [options.origin] - - * Allowed origins for requests. - * - string: Single allowed origin (e.g., 'https://example.com') - * - string[]: Multiple allowed origins - * - function: Custom validation logic - * - Default: Only same origin as the request URL - * @param {string|string[]|(secFetchSite: string, context: Context) => boolean} [options.secFetchSite] - - * Sec-Fetch-Site header validation. Standard values include 'same-origin', 'same-site', 'cross-site', 'none'. - * - string: Single allowed value (e.g., 'same-origin') - * - string[]: Multiple allowed values (e.g., ['same-origin', 'same-site']) - * - function: Custom validation with access to context - * - Default: Only allows 'same-origin' - * @returns {MiddlewareHandler} The middleware handler function. - * - * @example - * ```ts - * const app = new Hono() - * - * // Default: both origin and sec-fetch-site validation - * app.use('*', csrf()) - * - * // Allow specific origins - * app.use('*', csrf({ origin: 'https://example.com' })) - * app.use('*', csrf({ origin: ['https://app.com', 'https://api.com'] })) - * - * // Allow specific sec-fetch-site values - * app.use('*', csrf({ secFetchSite: 'same-origin' })) - * app.use('*', csrf({ secFetchSite: ['same-origin', 'same-site'] })) - * - * // Dynamic sec-fetch-site validation - * app.use('*', csrf({ - * secFetchSite: (secFetchSite, c) => { - * // Always allow same-origin - * if (secFetchSite === 'same-origin') return true - * // Allow cross-site for webhook endpoints - * if (secFetchSite === 'cross-site' && c.req.path.startsWith('/webhook/')) { - * return true - * } - * return false - * } - * })) - * - * // Dynamic origin validation - * app.use('*', csrf({ - * origin: (origin, c) => { - * // Allow same origin - * if (origin === new URL(c.req.url).origin) return true - * // Allow specific trusted domains - * return ['https://app.example.com', 'https://admin.example.com'].includes(origin) - * } - * })) - * ``` - */ -export declare const csrf: (options?: CSRFOptions) => MiddlewareHandler; -export {}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/middleware/etag/digest.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/middleware/etag/digest.d.ts deleted file mode 100644 index dcc773a..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/middleware/etag/digest.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const generateDigest: (stream: ReadableStream> | null, generator: (body: Uint8Array) => ArrayBuffer | Promise) => Promise; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/middleware/etag/index.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/middleware/etag/index.d.ts deleted file mode 100644 index 415d028..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/middleware/etag/index.d.ts +++ /dev/null @@ -1,42 +0,0 @@ -/** - * @module - * ETag Middleware for Hono. - */ -import type { MiddlewareHandler } from '../../types'; -type ETagOptions = { - retainedHeaders?: string[]; - weak?: boolean; - generateDigest?: (body: Uint8Array) => ArrayBuffer | Promise; -}; -/** - * Default headers to pass through on 304 responses. From the spec: - * > The response must not contain a body and must include the headers that - * > would have been sent in an equivalent 200 OK response: Cache-Control, - * > Content-Location, Date, ETag, Expires, and Vary. - */ -export declare const RETAINED_304_HEADERS: string[]; -/** - * ETag Middleware for Hono. - * - * @see {@link https://hono.dev/docs/middleware/builtin/etag} - * - * @param {ETagOptions} [options] - The options for the ETag middleware. - * @param {boolean} [options.weak=false] - Define using or not using a weak validation. If true is set, then `W/` is added to the prefix of the value. - * @param {string[]} [options.retainedHeaders=RETAINED_304_HEADERS] - The headers that you want to retain in the 304 Response. - * @param {function(Uint8Array): ArrayBuffer | Promise} [options.generateDigest] - - * A custom digest generation function. By default, it uses 'SHA-1' - * This function is called with the response body as a `Uint8Array` and should return a hash as an `ArrayBuffer` or a Promise of one. - * @returns {MiddlewareHandler} The middleware handler function. - * - * @example - * ```ts - * const app = new Hono() - * - * app.use('/etag/*', etag()) - * app.get('/etag/abc', (c) => { - * return c.text('Hono is hot') - * }) - * ``` - */ -export declare const etag: (options?: ETagOptions) => MiddlewareHandler; -export {}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/middleware/ip-restriction/index.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/middleware/ip-restriction/index.d.ts deleted file mode 100644 index a21aa0b..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/middleware/ip-restriction/index.d.ts +++ /dev/null @@ -1,31 +0,0 @@ -/** - * IP Restriction Middleware for Hono - * @module - */ -import type { Context, MiddlewareHandler } from '../..'; -import type { AddressType, GetConnInfo } from '../../helper/conninfo'; -/** - * Function to get IP Address - */ -type GetIPAddr = GetConnInfo | ((c: Context) => string); -export type IPRestrictionRule = string | ((addr: { - addr: string; - type: AddressType; -}) => boolean); -/** - * Rules for IP Restriction Middleware - */ -export interface IPRestrictionRules { - denyList?: IPRestrictionRule[]; - allowList?: IPRestrictionRule[]; -} -/** - * IP Restriction Middleware - * - * @param getIP function to get IP Address - */ -export declare const ipRestriction: (getIP: GetIPAddr, { denyList, allowList }: IPRestrictionRules, onError?: (remote: { - addr: string; - type: AddressType; -}, c: Context) => Response | Promise) => MiddlewareHandler; -export {}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/middleware/jsx-renderer/index.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/middleware/jsx-renderer/index.d.ts deleted file mode 100644 index f5bfc57..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/middleware/jsx-renderer/index.d.ts +++ /dev/null @@ -1,77 +0,0 @@ -/** - * @module - * JSX Renderer Middleware for Hono. - */ -import type { Context, PropsForRenderer } from '../../context'; -import type { FC, Context as JSXContext, PropsWithChildren } from '../../jsx'; -import type { Env, Input, MiddlewareHandler } from '../../types'; -import type { HtmlEscapedString } from '../../utils/html'; -export declare const RequestContext: JSXContext | null>; -type RendererOptions = { - docType?: boolean | string; - stream?: boolean | Record; -}; -type ComponentWithChildren = (props: PropsWithChildren, c: Context) => HtmlEscapedString | Promise; -/** - * JSX Renderer Middleware for hono. - * - * @see {@link https://hono.dev/docs/middleware/builtin/jsx-renderer} - * - * @param {ComponentWithChildren} [component] - The component to render, which can accept children and props. - * @param {RendererOptions} [options] - The options for the JSX renderer middleware. - * @param {boolean | string} [options.docType=true] - The DOCTYPE to be added at the beginning of the HTML. If set to false, no DOCTYPE will be added. - * @param {boolean | Record} [options.stream=false] - If set to true, enables streaming response with default headers. If a record is provided, custom headers will be used. - * @returns {MiddlewareHandler} The middleware handler function. - * - * @example - * ```ts - * const app = new Hono() - * - * app.get( - * '/page/*', - * jsxRenderer(({ children }) => { - * return ( - * - * - *

Menu
- *
{children}
- * - * - * ) - * }) - * ) - * - * app.get('/page/about', (c) => { - * return c.render(

About me!

) - * }) - * ``` - */ -export declare const jsxRenderer: (component?: ComponentWithChildren, options?: RendererOptions) => MiddlewareHandler; -/** - * useRequestContext for Hono. - * - * @template E - The environment type. - * @template P - The parameter type. - * @template I - The input type. - * @returns {Context} An instance of Context. - * - * @example - * ```ts - * const RequestUrlBadge: FC = () => { - * const c = useRequestContext() - * return {c.req.url} - * } - * - * app.get('/page/info', (c) => { - * return c.render( - *
- * You are accessing: - *
- * ) - * }) - * ``` - */ -export declare const useRequestContext: () => Context; -export {}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/middleware/jwk/index.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/middleware/jwk/index.d.ts deleted file mode 100644 index ff7158d..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/middleware/jwk/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export { jwk } from './jwk'; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/middleware/jwk/jwk.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/middleware/jwk/jwk.d.ts deleted file mode 100644 index e8f1997..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/middleware/jwk/jwk.d.ts +++ /dev/null @@ -1,51 +0,0 @@ -/** - * @module - * JWK Auth Middleware for Hono. - */ -import type { Context } from '../../context'; -import type { MiddlewareHandler } from '../../types'; -import type { CookiePrefixOptions } from '../../utils/cookie'; -import '../../context'; -import type { HonoJsonWebKey } from '../../utils/jwt/jws'; -import type { VerifyOptions } from '../../utils/jwt/jwt'; -/** - * JWK Auth Middleware for Hono. - * - * @see {@link https://hono.dev/docs/middleware/builtin/jwk} - * - * @param {object} options - The options for the JWK middleware. - * @param {HonoJsonWebKey[] | ((ctx: Context) => Promise | HonoJsonWebKey[])} [options.keys] - The public keys used for JWK verification, or a function that returns them. - * @param {string | ((ctx: Context) => Promise | string)} [options.jwks_uri] - If set to a URI string or a function that returns a URI string, attempt to fetch JWKs from it. The response must be a JSON object containing a `keys` array, which will be merged with the `keys` option. - * @param {boolean} [options.allow_anon] - If set to `true`, the middleware allows requests without a token to proceed without authentication. - * @param {string} [options.cookie] - If set, the middleware attempts to retrieve the token from a cookie with these options (optionally signed) only if no token is found in the header. - * @param {string} [options.headerName='Authorization'] - The name of the header to look for the JWT token. Default is 'Authorization'. - * @param {RequestInit} [init] - Optional init options for the `fetch` request when retrieving JWKS from a URI. - * @param {VerifyOptions} [options.verification] - Additional options for JWK payload verification. - * @returns {MiddlewareHandler} The middleware handler function. - * - * @example - * ```ts - * const app = new Hono() - * - * app.use("/auth/*", jwk({ - * jwks_uri: (c) => `https://${c.env.authServer}/.well-known/jwks.json`, - * headerName: 'x-custom-auth-header', // Optional, default is 'Authorization' - * })) - * - * app.get('/auth/page', (c) => { - * return c.text('You are authorized') - * }) - * ``` - */ -export declare const jwk: (options: { - keys?: HonoJsonWebKey[] | ((ctx: Context) => Promise | HonoJsonWebKey[]); - jwks_uri?: string | ((ctx: Context) => Promise | string); - allow_anon?: boolean; - cookie?: string | { - key: string; - secret?: string | BufferSource; - prefixOptions?: CookiePrefixOptions; - }; - headerName?: string; - verification?: VerifyOptions; -}, init?: RequestInit) => MiddlewareHandler; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/middleware/jwt/index.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/middleware/jwt/index.d.ts deleted file mode 100644 index 4370088..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/middleware/jwt/index.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import type { JwtVariables } from './jwt'; -export type { JwtVariables }; -export { jwt, verifyWithJwks, verify, decode, sign } from './jwt'; -declare module '../..' { - interface ContextVariableMap extends JwtVariables { - } -} diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/middleware/jwt/jwt.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/middleware/jwt/jwt.d.ts deleted file mode 100644 index 04b2b16..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/middleware/jwt/jwt.d.ts +++ /dev/null @@ -1,65 +0,0 @@ -/** - * @module - * JWT Auth Middleware for Hono. - */ -import type { MiddlewareHandler } from '../../types'; -import type { CookiePrefixOptions } from '../../utils/cookie'; -import '../../context'; -import type { SignatureAlgorithm } from '../../utils/jwt/jwa'; -import type { SignatureKey } from '../../utils/jwt/jws'; -import type { VerifyOptions } from '../../utils/jwt/jwt'; -export type JwtVariables = { - jwtPayload: T; -}; -/** - * JWT Auth Middleware for Hono. - * - * @see {@link https://hono.dev/docs/middleware/builtin/jwt} - * - * @param {object} options - The options for the JWT middleware. - * @param {SignatureKey} [options.secret] - A value of your secret key. - * @param {string} [options.cookie] - If this value is set, then the value is retrieved from the cookie header using that value as a key, which is then validated as a token. - * @param {SignatureAlgorithm} [options.alg=HS256] - An algorithm type that is used for verifying. Available types are `HS256` | `HS384` | `HS512` | `RS256` | `RS384` | `RS512` | `PS256` | `PS384` | `PS512` | `ES256` | `ES384` | `ES512` | `EdDSA`. - * @param {string} [options.headerName='Authorization'] - The name of the header to look for the JWT token. Default is 'Authorization'. - * @param {VerifyOptions} [options.verification] - Additional options for JWT payload verification. - * @returns {MiddlewareHandler} The middleware handler function. - * - * @example - * ```ts - * const app = new Hono() - * - * app.use( - * '/auth/*', - * jwt({ - * secret: 'it-is-very-secret', - * headerName: 'x-custom-auth-header', // Optional, default is 'Authorization' - * }) - * ) - * - * app.get('/auth/page', (c) => { - * return c.text('You are authorized') - * }) - * ``` - */ -export declare const jwt: (options: { - secret: SignatureKey; - cookie?: string | { - key: string; - secret?: string | BufferSource; - prefixOptions?: CookiePrefixOptions; - }; - alg?: SignatureAlgorithm; - headerName?: string; - verification?: VerifyOptions; -}) => MiddlewareHandler; -export declare const verifyWithJwks: (token: string, options: { - keys?: import("../../utils/jwt/jws").HonoJsonWebKey[]; - jwks_uri?: string; - verification?: VerifyOptions; -}, init?: RequestInit) => Promise; -export declare const verify: (token: string, publicKey: SignatureKey, algOrOptions?: SignatureAlgorithm | import("../../utils/jwt/jwt").VerifyOptionsWithAlg) => Promise; -export declare const decode: (token: string) => { - header: import("../../utils/jwt/jwt").TokenHeader; - payload: import("../../utils/jwt/types").JWTPayload; -}; -export declare const sign: (payload: import("../../utils/jwt/types").JWTPayload, privateKey: SignatureKey, alg?: SignatureAlgorithm) => Promise; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/middleware/language/index.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/middleware/language/index.d.ts deleted file mode 100644 index 51cc2ee..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/middleware/language/index.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import type { LanguageVariables, DetectorOptions, DetectorType, CacheType } from './language'; -export type { LanguageVariables, DetectorOptions, DetectorType, CacheType }; -export { languageDetector, detectFromCookie, detectFromHeader, detectFromPath, detectFromQuery, } from './language'; -declare module '../..' { - interface ContextVariableMap extends LanguageVariables { - } -} diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/middleware/language/language.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/middleware/language/language.d.ts deleted file mode 100644 index d4be43b..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/middleware/language/language.d.ts +++ /dev/null @@ -1,102 +0,0 @@ -/** - * @module - * Language module for Hono. - */ -import type { Context } from '../../context'; -import type { MiddlewareHandler } from '../../types'; -export type DetectorType = 'path' | 'querystring' | 'cookie' | 'header'; -export type CacheType = 'cookie'; -export interface DetectorOptions { - /** Order of language detection strategies */ - order: DetectorType[]; - /** Query parameter name for language */ - lookupQueryString: string; - /** Cookie name for language */ - lookupCookie: string; - /** Index in URL path where language code appears */ - lookupFromPathIndex: number; - /** Header key for language detection */ - lookupFromHeaderKey: string; - /** Caching strategies */ - caches: CacheType[] | false; - /** Cookie configuration options */ - cookieOptions?: { - domain?: string; - path?: string; - sameSite?: 'Strict' | 'Lax' | 'None'; - secure?: boolean; - maxAge?: number; - httpOnly?: boolean; - }; - /** Whether to ignore case in language codes */ - ignoreCase: boolean; - /** Default language if none detected */ - fallbackLanguage: string; - /** List of supported language codes */ - supportedLanguages: string[]; - /** Optional function to transform detected language codes */ - convertDetectedLanguage?: (lang: string) => string; - /** Enable debug logging */ - debug?: boolean; -} -export interface LanguageVariables { - language: string; -} -export declare const DEFAULT_OPTIONS: DetectorOptions; -/** - * Parse Accept-Language header values with quality scores - * @param header Accept-Language header string - * @returns Array of parsed languages with quality scores - */ -export declare function parseAcceptLanguage(header: string): Array<{ - lang: string; - q: number; -}>; -/** - * Validate and normalize language codes - * @param lang Language code to normalize - * @param options Detector options - * @returns Normalized language code or undefined - */ -export declare const normalizeLanguage: (lang: string | null | undefined, options: DetectorOptions) => string | undefined; -/** - * Detects language from query parameter - */ -export declare const detectFromQuery: (c: Context, options: DetectorOptions) => string | undefined; -/** - * Detects language from cookie - */ -export declare const detectFromCookie: (c: Context, options: DetectorOptions) => string | undefined; -/** - * Detects language from Accept-Language header - */ -export declare function detectFromHeader(c: Context, options: DetectorOptions): string | undefined; -/** - * Detects language from URL path - */ -export declare function detectFromPath(c: Context, options: DetectorOptions): string | undefined; -/** - * Collection of all language detection strategies - */ -export declare const detectors: { - readonly querystring: (c: Context, options: DetectorOptions) => string | undefined; - readonly cookie: (c: Context, options: DetectorOptions) => string | undefined; - readonly header: typeof detectFromHeader; - readonly path: typeof detectFromPath; -}; -/** Type for detector functions */ -export type DetectorFunction = (c: Context, options: DetectorOptions) => string | undefined; -/** Type-safe detector map */ -export type Detectors = Record; -/** - * Validate detector options - * @param options Detector options to validate - * @throws Error if options are invalid - */ -export declare function validateOptions(options: DetectorOptions): void; -/** - * Language detector middleware factory - * @param userOptions Configuration options for the language detector - * @returns Hono middleware function - */ -export declare const languageDetector: (userOptions: Partial) => MiddlewareHandler; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/middleware/logger/index.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/middleware/logger/index.d.ts deleted file mode 100644 index a36100e..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/middleware/logger/index.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -/** - * @module - * Logger Middleware for Hono. - */ -import type { MiddlewareHandler } from '../../types'; -type PrintFunc = (str: string, ...rest: string[]) => void; -/** - * Logger Middleware for Hono. - * - * @see {@link https://hono.dev/docs/middleware/builtin/logger} - * - * @param {PrintFunc} [fn=console.log] - Optional function for customized logging behavior. - * @returns {MiddlewareHandler} The middleware handler function. - * - * @example - * ```ts - * const app = new Hono() - * - * app.use(logger()) - * app.get('/', (c) => c.text('Hello Hono!')) - * ``` - */ -export declare const logger: (fn?: PrintFunc) => MiddlewareHandler; -export {}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/middleware/method-override/index.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/middleware/method-override/index.d.ts deleted file mode 100644 index 0217975..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/middleware/method-override/index.d.ts +++ /dev/null @@ -1,48 +0,0 @@ -/** - * @module - * Method Override Middleware for Hono. - */ -import type { Hono } from '../../hono'; -import type { MiddlewareHandler } from '../../types'; -type MethodOverrideOptions = { - app: Hono; -} & ({ - form?: string; - header?: never; - query?: never; -} | { - form?: never; - header: string; - query?: never; -} | { - form?: never; - header?: never; - query: string; -}); -/** - * Method Override Middleware for Hono. - * - * @see {@link https://hono.dev/docs/middleware/builtin/method-override} - * - * @param {MethodOverrideOptions} options - The options for the method override middleware. - * @param {Hono} options.app - The instance of Hono is used in your application. - * @param {string} [options.form=_method] - Form key with a value containing the method name. - * @param {string} [options.header] - Header name with a value containing the method name. - * @param {string} [options.query] - Query parameter key with a value containing the method name. - * @returns {MiddlewareHandler} The middleware handler function. - * - * @example - * ```ts - * const app = new Hono() - * - * // If no options are specified, the value of `_method` in the form, - * // e.g. DELETE, is used as the method. - * app.use('/posts', methodOverride({ app })) - * - * app.delete('/posts', (c) => { - * // .... - * }) - * ``` - */ -export declare const methodOverride: (options: MethodOverrideOptions) => MiddlewareHandler; -export {}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/middleware/powered-by/index.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/middleware/powered-by/index.d.ts deleted file mode 100644 index 9091970..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/middleware/powered-by/index.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -/** - * @module - * Powered By Middleware for Hono. - */ -import type { MiddlewareHandler } from '../../types'; -type PoweredByOptions = { - /** - * The value for X-Powered-By header. - * @default Hono - */ - serverName?: string; -}; -/** - * Powered By Middleware for Hono. - * - * @param options - The options for the Powered By Middleware. - * @returns {MiddlewareHandler} The middleware handler function. - * - * @example - * ```ts - * import { poweredBy } from 'hono/powered-by' - * - * const app = new Hono() - * - * app.use(poweredBy()) // With options: poweredBy({ serverName: "My Server" }) - * ``` - */ -export declare const poweredBy: (options?: PoweredByOptions) => MiddlewareHandler; -export {}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/middleware/pretty-json/index.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/middleware/pretty-json/index.d.ts deleted file mode 100644 index 256d4ce..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/middleware/pretty-json/index.d.ts +++ /dev/null @@ -1,42 +0,0 @@ -/** - * @module - * Pretty JSON Middleware for Hono. - */ -import type { MiddlewareHandler } from '../../types'; -interface PrettyOptions { - /** - * Number of spaces for indentation. - * @default 2 - */ - space?: number; - /** - * Query conditions for when to Pretty. - * @default 'pretty' - */ - query?: string; - /** - * Force prettification of JSON responses regardless of query parameters. - * @default false - */ - force?: boolean; -} -/** - * Pretty JSON Middleware for Hono. - * - * @see {@link https://hono.dev/docs/middleware/builtin/pretty-json} - * - * @param options - The options for the pretty JSON middleware. - * @returns {MiddlewareHandler} The middleware handler function. - * - * @example - * ```ts - * const app = new Hono() - * - * app.use(prettyJSON()) // With options: prettyJSON({ space: 4 }) - * app.get('/', (c) => { - * return c.json({ message: 'Hono!' }) - * }) - * ``` - */ -export declare const prettyJSON: (options?: PrettyOptions) => MiddlewareHandler; -export {}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/middleware/request-id/index.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/middleware/request-id/index.d.ts deleted file mode 100644 index dc895b9..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/middleware/request-id/index.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import type { RequestIdVariables } from './request-id'; -export type { RequestIdVariables }; -export { requestId } from './request-id'; -declare module '../..' { - interface ContextVariableMap extends RequestIdVariables { - } -} diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/middleware/request-id/request-id.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/middleware/request-id/request-id.d.ts deleted file mode 100644 index dd1fdea..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/middleware/request-id/request-id.d.ts +++ /dev/null @@ -1,37 +0,0 @@ -/** - * @module - * Request ID Middleware for Hono. - */ -import type { Context } from '../../context'; -import type { MiddlewareHandler } from '../../types'; -export type RequestIdVariables = { - requestId: string; -}; -export type RequestIdOptions = { - limitLength?: number; - headerName?: string; - generator?: (c: Context) => string; -}; -/** - * Request ID Middleware for Hono. - * - * @param {object} options - Options for Request ID middleware. - * @param {number} [options.limitLength=255] - The maximum length of request id. - * @param {string} [options.headerName=X-Request-Id] - The header name used in request id. - * @param {generator} [options.generator=() => crypto.randomUUID()] - The request id generation function. - * - * @returns {MiddlewareHandler} The middleware handler function. - * - * @example - * ```ts - * type Variables = RequestIdVariables - * const app = new Hono<{Variables: Variables}>() - * - * app.use(requestId()) - * app.get('/', (c) => { - * console.log(c.get('requestId')) // Debug - * return c.text('Hello World!') - * }) - * ``` - */ -export declare const requestId: ({ limitLength, headerName, generator, }?: RequestIdOptions) => MiddlewareHandler; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/middleware/secure-headers/index.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/middleware/secure-headers/index.d.ts deleted file mode 100644 index 6e351a8..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/middleware/secure-headers/index.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -export type { ContentSecurityPolicyOptionHandler } from './secure-headers'; -export { NONCE, secureHeaders } from './secure-headers'; -import type { SecureHeadersVariables } from './secure-headers'; -export type { SecureHeadersVariables }; -declare module '../..' { - interface ContextVariableMap extends SecureHeadersVariables { - } -} diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/middleware/secure-headers/permissions-policy.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/middleware/secure-headers/permissions-policy.d.ts deleted file mode 100644 index 1a4c40e..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/middleware/secure-headers/permissions-policy.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -export type PermissionsPolicyDirective = StandardizedFeatures | ProposedFeatures | ExperimentalFeatures; -/** - * These features have been declared in a published version of the respective specification. - */ -type StandardizedFeatures = 'accelerometer' | 'ambientLightSensor' | 'attributionReporting' | 'autoplay' | 'battery' | 'bluetooth' | 'camera' | 'chUa' | 'chUaArch' | 'chUaBitness' | 'chUaFullVersion' | 'chUaFullVersionList' | 'chUaMobile' | 'chUaModel' | 'chUaPlatform' | 'chUaPlatformVersion' | 'chUaWow64' | 'computePressure' | 'crossOriginIsolated' | 'directSockets' | 'displayCapture' | 'encryptedMedia' | 'executionWhileNotRendered' | 'executionWhileOutOfViewport' | 'fullscreen' | 'geolocation' | 'gyroscope' | 'hid' | 'identityCredentialsGet' | 'idleDetection' | 'keyboardMap' | 'magnetometer' | 'microphone' | 'midi' | 'navigationOverride' | 'payment' | 'pictureInPicture' | 'publickeyCredentialsGet' | 'screenWakeLock' | 'serial' | 'storageAccess' | 'syncXhr' | 'usb' | 'webShare' | 'windowManagement' | 'xrSpatialTracking'; -/** - * These features have been proposed, but the definitions have not yet been integrated into their respective specs. - */ -type ProposedFeatures = 'clipboardRead' | 'clipboardWrite' | 'gamepad' | 'sharedAutofill' | 'speakerSelection'; -/** - * These features generally have an explainer only, but may be available for experimentation by web developers. - */ -type ExperimentalFeatures = 'allScreensCapture' | 'browsingTopics' | 'capturedSurfaceControl' | 'conversionMeasurement' | 'digitalCredentialsGet' | 'focusWithoutUserActivation' | 'joinAdInterestGroup' | 'localFonts' | 'runAdAuction' | 'smartCard' | 'syncScript' | 'trustTokenRedemption' | 'unload' | 'verticalScroll'; -export {}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/middleware/secure-headers/secure-headers.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/middleware/secure-headers/secure-headers.d.ts deleted file mode 100644 index a632b52..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/middleware/secure-headers/secure-headers.d.ts +++ /dev/null @@ -1,109 +0,0 @@ -/** - * @module - * Secure Headers Middleware for Hono. - */ -import type { Context } from '../../context'; -import type { MiddlewareHandler } from '../../types'; -import type { PermissionsPolicyDirective } from './permissions-policy'; -export type SecureHeadersVariables = { - secureHeadersNonce?: string; -}; -export type ContentSecurityPolicyOptionHandler = (ctx: Context, directive: string) => string; -type ContentSecurityPolicyOptionValue = (string | ContentSecurityPolicyOptionHandler)[]; -interface ContentSecurityPolicyOptions { - defaultSrc?: ContentSecurityPolicyOptionValue; - baseUri?: ContentSecurityPolicyOptionValue; - childSrc?: ContentSecurityPolicyOptionValue; - connectSrc?: ContentSecurityPolicyOptionValue; - fontSrc?: ContentSecurityPolicyOptionValue; - formAction?: ContentSecurityPolicyOptionValue; - frameAncestors?: ContentSecurityPolicyOptionValue; - frameSrc?: ContentSecurityPolicyOptionValue; - imgSrc?: ContentSecurityPolicyOptionValue; - manifestSrc?: ContentSecurityPolicyOptionValue; - mediaSrc?: ContentSecurityPolicyOptionValue; - objectSrc?: ContentSecurityPolicyOptionValue; - reportTo?: string; - reportUri?: string | string[]; - sandbox?: ContentSecurityPolicyOptionValue; - scriptSrc?: ContentSecurityPolicyOptionValue; - scriptSrcAttr?: ContentSecurityPolicyOptionValue; - scriptSrcElem?: ContentSecurityPolicyOptionValue; - styleSrc?: ContentSecurityPolicyOptionValue; - styleSrcAttr?: ContentSecurityPolicyOptionValue; - styleSrcElem?: ContentSecurityPolicyOptionValue; - upgradeInsecureRequests?: ContentSecurityPolicyOptionValue; - workerSrc?: ContentSecurityPolicyOptionValue; - requireTrustedTypesFor?: ContentSecurityPolicyOptionValue; - trustedTypes?: ContentSecurityPolicyOptionValue; -} -interface ReportToOptions { - group: string; - max_age: number; - endpoints: ReportToEndpoint[]; -} -interface ReportToEndpoint { - url: string; -} -interface ReportingEndpointOptions { - name: string; - url: string; -} -type PermissionsPolicyValue = '*' | 'self' | 'src' | 'none' | string; -type PermissionsPolicyOptions = Partial>; -type overridableHeader = boolean | string; -interface SecureHeadersOptions { - contentSecurityPolicy?: ContentSecurityPolicyOptions; - contentSecurityPolicyReportOnly?: ContentSecurityPolicyOptions; - crossOriginEmbedderPolicy?: overridableHeader; - crossOriginResourcePolicy?: overridableHeader; - crossOriginOpenerPolicy?: overridableHeader; - originAgentCluster?: overridableHeader; - referrerPolicy?: overridableHeader; - reportingEndpoints?: ReportingEndpointOptions[]; - reportTo?: ReportToOptions[]; - strictTransportSecurity?: overridableHeader; - xContentTypeOptions?: overridableHeader; - xDnsPrefetchControl?: overridableHeader; - xDownloadOptions?: overridableHeader; - xFrameOptions?: overridableHeader; - xPermittedCrossDomainPolicies?: overridableHeader; - xXssProtection?: overridableHeader; - removePoweredBy?: boolean; - permissionsPolicy?: PermissionsPolicyOptions; -} -export declare const NONCE: ContentSecurityPolicyOptionHandler; -/** - * Secure Headers Middleware for Hono. - * - * @see {@link https://hono.dev/docs/middleware/builtin/secure-headers} - * - * @param {Partial} [customOptions] - The options for the secure headers middleware. - * @param {ContentSecurityPolicyOptions} [customOptions.contentSecurityPolicy] - Settings for the Content-Security-Policy header. - * @param {ContentSecurityPolicyOptions} [customOptions.contentSecurityPolicyReportOnly] - Settings for the Content-Security-Policy-Report-Only header. - * @param {overridableHeader} [customOptions.crossOriginEmbedderPolicy=false] - Settings for the Cross-Origin-Embedder-Policy header. - * @param {overridableHeader} [customOptions.crossOriginResourcePolicy=true] - Settings for the Cross-Origin-Resource-Policy header. - * @param {overridableHeader} [customOptions.crossOriginOpenerPolicy=true] - Settings for the Cross-Origin-Opener-Policy header. - * @param {overridableHeader} [customOptions.originAgentCluster=true] - Settings for the Origin-Agent-Cluster header. - * @param {overridableHeader} [customOptions.referrerPolicy=true] - Settings for the Referrer-Policy header. - * @param {ReportingEndpointOptions[]} [customOptions.reportingEndpoints] - Settings for the Reporting-Endpoints header. - * @param {ReportToOptions[]} [customOptions.reportTo] - Settings for the Report-To header. - * @param {overridableHeader} [customOptions.strictTransportSecurity=true] - Settings for the Strict-Transport-Security header. - * @param {overridableHeader} [customOptions.xContentTypeOptions=true] - Settings for the X-Content-Type-Options header. - * @param {overridableHeader} [customOptions.xDnsPrefetchControl=true] - Settings for the X-DNS-Prefetch-Control header. - * @param {overridableHeader} [customOptions.xDownloadOptions=true] - Settings for the X-Download-Options header. - * @param {overridableHeader} [customOptions.xFrameOptions=true] - Settings for the X-Frame-Options header. - * @param {overridableHeader} [customOptions.xPermittedCrossDomainPolicies=true] - Settings for the X-Permitted-Cross-Domain-Policies header. - * @param {overridableHeader} [customOptions.xXssProtection=true] - Settings for the X-XSS-Protection header. - * @param {boolean} [customOptions.removePoweredBy=true] - Settings for remove X-Powered-By header. - * @param {PermissionsPolicyOptions} [customOptions.permissionsPolicy] - Settings for the Permissions-Policy header. - * @returns {MiddlewareHandler} The middleware handler function. - * - * @example - * ```ts - * const app = new Hono() - * app.use(secureHeaders()) - * ``` - */ -export declare const secureHeaders: (customOptions?: SecureHeadersOptions) => MiddlewareHandler; -export {}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/middleware/serve-static/index.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/middleware/serve-static/index.d.ts deleted file mode 100644 index f8fd606..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/middleware/serve-static/index.d.ts +++ /dev/null @@ -1,31 +0,0 @@ -/** - * @module - * Serve Static Middleware for Hono. - */ -import type { Context, Data } from '../../context'; -import type { Env, MiddlewareHandler } from '../../types'; -export type ServeStaticOptions = { - root?: string; - path?: string; - precompressed?: boolean; - mimes?: Record; - rewriteRequestPath?: (path: string) => string; - onFound?: (path: string, c: Context) => void | Promise; - onNotFound?: (path: string, c: Context) => void | Promise; -}; -/** - * This middleware is not directly used by the user. Create a wrapper specifying `getContent()` by the environment such as Deno or Bun. - */ -export declare const serveStatic: (options: ServeStaticOptions & { - getContent: (path: string, c: Context) => Promise; - /** - * - * `join` option according to the runtime. Example `import { join } from 'node:path`. If not specified, it will fall back to the default join function.` - */ - join?: (...paths: string[]) => string; - /** - * @deprecated Currently, `pathResolve` is no longer used. - */ - pathResolve?: (path: string) => string; - isDir?: (path: string) => boolean | undefined | Promise; -}) => MiddlewareHandler; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/middleware/serve-static/path.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/middleware/serve-static/path.d.ts deleted file mode 100644 index 4d2e95e..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/middleware/serve-static/path.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -/** - * `defaultJoin` does not support Windows paths and always uses `/` separators. - * If you need Windows path support, please use `join` exported from `node:path` etc. instead. - */ -export declare const defaultJoin: (...paths: string[]) => string; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/middleware/timeout/index.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/middleware/timeout/index.d.ts deleted file mode 100644 index 28d533f..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/middleware/timeout/index.d.ts +++ /dev/null @@ -1,31 +0,0 @@ -/** - * @module - * Timeout Middleware for Hono. - */ -import type { Context } from '../../context'; -import { HTTPException } from '../../http-exception'; -import type { MiddlewareHandler } from '../../types'; -export type HTTPExceptionFunction = (context: Context) => HTTPException; -/** - * Timeout Middleware for Hono. - * - * @param {number} duration - The timeout duration in milliseconds. - * @param {HTTPExceptionFunction | HTTPException} [exception=defaultTimeoutException] - The exception to throw when the timeout occurs. Can be a function that returns an HTTPException or an HTTPException object. - * @returns {MiddlewareHandler} The middleware handler function. - * - * @example - * ```ts - * const app = new Hono() - * - * app.use( - * '/long-request', - * timeout(5000) // Set timeout to 5 seconds - * ) - * - * app.get('/long-request', async (c) => { - * await someLongRunningFunction() - * return c.text('Completed within time limit') - * }) - * ``` - */ -export declare const timeout: (duration: number, exception?: HTTPExceptionFunction | HTTPException) => MiddlewareHandler; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/middleware/timing/index.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/middleware/timing/index.d.ts deleted file mode 100644 index a627bc6..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/middleware/timing/index.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import type { TimingVariables } from './timing'; -export { TimingVariables }; -export { timing, setMetric, startTime, endTime, wrapTime } from './timing'; -declare module '../..' { - interface ContextVariableMap extends TimingVariables { - } -} diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/middleware/timing/timing.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/middleware/timing/timing.d.ts deleted file mode 100644 index b4d2170..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/middleware/timing/timing.d.ts +++ /dev/null @@ -1,129 +0,0 @@ -/** - * @module - * Server-Timing Middleware for Hono. - */ -import type { Context } from '../../context'; -import type { MiddlewareHandler } from '../../types'; -import '../../context'; -export type TimingVariables = { - metric?: { - headers: string[]; - timers: Map; - }; -}; -interface Timer { - description?: string; - start: number; -} -interface TimingOptions { - total?: boolean; - enabled?: boolean | ((c: Context) => boolean); - totalDescription?: string; - autoEnd?: boolean; - crossOrigin?: boolean | string | ((c: Context) => boolean | string); -} -/** - * Server-Timing Middleware for Hono. - * - * @see {@link https://hono.dev/docs/middleware/builtin/timing} - * - * @param {TimingOptions} [config] - The options for the timing middleware. - * @param {boolean} [config.total=true] - Show the total response time. - * @param {boolean | ((c: Context) => boolean)} [config.enabled=true] - Whether timings should be added to the headers or not. - * @param {string} [config.totalDescription=Total Response Time] - Description for the total response time. - * @param {boolean} [config.autoEnd=true] - If `startTime()` should end automatically at the end of the request. - * @param {boolean | string | ((c: Context) => boolean | string)} [config.crossOrigin=false] - The origin this timings header should be readable. - * @returns {MiddlewareHandler} The middleware handler function. - * - * @example - * ```ts - * const app = new Hono() - * - * // add the middleware to your router - * app.use(timing()); - * - * app.get('/', async (c) => { - * // add custom metrics - * setMetric(c, 'region', 'europe-west3') - * - * // add custom metrics with timing, must be in milliseconds - * setMetric(c, 'custom', 23.8, 'My custom Metric') - * - * // start a new timer - * startTime(c, 'db'); - * - * const data = await db.findMany(...); - * - * // end the timer - * endTime(c, 'db'); - * - * return c.json({ response: data }); - * }); - * ``` - */ -export declare const timing: (config?: TimingOptions) => MiddlewareHandler; -interface SetMetric { - (c: Context, name: string, value: number, description?: string, precision?: number): void; - (c: Context, name: string, description?: string): void; -} -/** - * Set a metric for the timing middleware. - * - * @param {Context} c - The context of the request. - * @param {string} name - The name of the metric. - * @param {number | string} [valueDescription] - The value or description of the metric. - * @param {string} [description] - The description of the metric. - * @param {number} [precision] - The precision of the metric value. - * - * @example - * ```ts - * setMetric(c, 'region', 'europe-west3') - * setMetric(c, 'custom', 23.8, 'My custom Metric') - * ``` - */ -export declare const setMetric: SetMetric; -/** - * Start a timer for the timing middleware. - * - * @param {Context} c - The context of the request. - * @param {string} name - The name of the timer. - * @param {string} [description] - The description of the timer. - * - * @example - * ```ts - * startTime(c, 'db') - * ``` - */ -export declare const startTime: (c: Context, name: string, description?: string) => void; -/** - * End a timer for the timing middleware. - * - * @param {Context} c - The context of the request. - * @param {string} name - The name of the timer. - * @param {number} [precision] - The precision of the timer value. - * - * @example - * ```ts - * endTime(c, 'db') - * ``` - */ -export declare const endTime: (c: Context, name: string, precision?: number) => void; -/** - * Wrap a Promise to capture its duration. - * @param {Context} c - The context of the request. - * @param {string} name - The name of the timer. - * @param {Promise} callable - The Promise to time. - * @param {string} [description] - The description of the timer. - * @param {number} [precision] - The precision of the timer value. - * - * @example - * ```ts - * // Instead of this: - * const data = await db.findMany(...); - * - * // do this: - * const data = await wrapTime(c, 'query', db.findMany(...)); - * ``` - * */ -export declare function wrapTime(c: Context, name: string, callable: Promise, description?: string, precision?: number): Promise; -export {}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/middleware/trailing-slash/index.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/middleware/trailing-slash/index.d.ts deleted file mode 100644 index 9b1d12d..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/middleware/trailing-slash/index.d.ts +++ /dev/null @@ -1,37 +0,0 @@ -/** - * @module - * Trailing Slash Middleware for Hono. - */ -import type { MiddlewareHandler } from '../../types'; -/** - * Trailing Slash Middleware for Hono. - * - * @see {@link https://hono.dev/docs/middleware/builtin/trailing-slash} - * - * @returns {MiddlewareHandler} The middleware handler function. - * - * @example - * ```ts - * const app = new Hono() - * - * app.use(trimTrailingSlash()) - * app.get('/about/me/', (c) => c.text('With Trailing Slash')) - * ``` - */ -export declare const trimTrailingSlash: () => MiddlewareHandler; -/** - * Append trailing slash middleware for Hono. - * Append a trailing slash to the URL if it doesn't have one. For example, `/path/to/page` will be redirected to `/path/to/page/`. - * - * @see {@link https://hono.dev/docs/middleware/builtin/trailing-slash} - * - * @returns {MiddlewareHandler} The middleware handler function. - * - * @example - * ```ts - * const app = new Hono() - * - * app.use(appendTrailingSlash()) - * ``` - */ -export declare const appendTrailingSlash: () => MiddlewareHandler; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/package.json b/PBandGraphScaffold/node_modules/hono/dist/types/package.json deleted file mode 100644 index 5bbefff..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/package.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "type": "commonjs" -} diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/preset/quick.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/preset/quick.d.ts deleted file mode 100644 index d53dea3..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/preset/quick.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * @module - * The preset that uses `LinearRouter`. - */ -import { HonoBase } from '../hono-base'; -import type { HonoOptions } from '../hono-base'; -import type { BlankEnv, BlankSchema, Env, Schema } from '../types'; -export declare class Hono extends HonoBase { - constructor(options?: HonoOptions); -} diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/preset/tiny.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/preset/tiny.d.ts deleted file mode 100644 index 4f75f72..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/preset/tiny.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * @module - * The preset that uses `PatternRouter`. - */ -import { HonoBase } from '../hono-base'; -import type { HonoOptions } from '../hono-base'; -import type { BlankEnv, BlankSchema, Env, Schema } from '../types'; -export declare class Hono extends HonoBase { - constructor(options?: HonoOptions); -} diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/request.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/request.d.ts deleted file mode 100644 index fa13425..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/request.d.ts +++ /dev/null @@ -1,313 +0,0 @@ -import { GET_MATCH_RESULT } from './request/constants'; -import type { Result } from './router'; -import type { Input, InputToDataByTarget, ParamKeyToRecord, ParamKeys, RemoveQuestion, RouterRoute, ValidationTargets } from './types'; -import type { BodyData, ParseBodyOptions } from './utils/body'; -import type { CustomHeader, RequestHeader } from './utils/headers'; -import type { Simplify, UnionToIntersection } from './utils/types'; -type Body = { - json: any; - text: string; - arrayBuffer: ArrayBuffer; - blob: Blob; - formData: FormData; -}; -type BodyCache = Partial; -export declare class HonoRequest

{ - - [GET_MATCH_RESULT]: Result<[unknown, RouterRoute]>; - /** - * `.raw` can get the raw Request object. - * - * @see {@link https://hono.dev/docs/api/request#raw} - * - * @example - * ```ts - * // For Cloudflare Workers - * app.post('/', async (c) => { - * const metadata = c.req.raw.cf?.hostMetadata? - * ... - * }) - * ``` - */ - raw: Request; - routeIndex: number; - /** - * `.path` can get the pathname of the request. - * - * @see {@link https://hono.dev/docs/api/request#path} - * - * @example - * ```ts - * app.get('/about/me', (c) => { - * const pathname = c.req.path // `/about/me` - * }) - * ``` - */ - path: string; - bodyCache: BodyCache; - constructor(request: Request, path?: string, matchResult?: Result<[unknown, RouterRoute]>); - /** - * `.req.param()` gets the path parameters. - * - * @see {@link https://hono.dev/docs/api/routing#path-parameter} - * - * @example - * ```ts - * const name = c.req.param('name') - * // or all parameters at once - * const { id, comment_id } = c.req.param() - * ``` - */ - param = ParamKeys

>(key: P2 extends `${infer _}?` ? never : P2): string; - param> = RemoveQuestion>>(key: P2): string | undefined; - param(key: string): string | undefined; - param(): Simplify>>>; - /** - * `.query()` can get querystring parameters. - * - * @see {@link https://hono.dev/docs/api/request#query} - * - * @example - * ```ts - * // Query params - * app.get('/search', (c) => { - * const query = c.req.query('q') - * }) - * - * // Get all params at once - * app.get('/search', (c) => { - * const { q, limit, offset } = c.req.query() - * }) - * ``` - */ - query(key: string): string | undefined; - query(): Record; - /** - * `.queries()` can get multiple querystring parameter values, e.g. /search?tags=A&tags=B - * - * @see {@link https://hono.dev/docs/api/request#queries} - * - * @example - * ```ts - * app.get('/search', (c) => { - * // tags will be string[] - * const tags = c.req.queries('tags') - * }) - * ``` - */ - queries(key: string): string[] | undefined; - queries(): Record; - /** - * `.header()` can get the request header value. - * - * @see {@link https://hono.dev/docs/api/request#header} - * - * @example - * ```ts - * app.get('/', (c) => { - * const userAgent = c.req.header('User-Agent') - * }) - * ``` - */ - header(name: RequestHeader): string | undefined; - header(name: string): string | undefined; - header(): Record; - /** - * `.parseBody()` can parse Request body of type `multipart/form-data` or `application/x-www-form-urlencoded` - * - * @see {@link https://hono.dev/docs/api/request#parsebody} - * - * @example - * ```ts - * app.post('/entry', async (c) => { - * const body = await c.req.parseBody() - * }) - * ``` - */ - parseBody, T extends BodyData>(options?: Options): Promise; - parseBody(options?: Partial): Promise; - /** - * `.json()` can parse Request body of type `application/json` - * - * @see {@link https://hono.dev/docs/api/request#json} - * - * @example - * ```ts - * app.post('/entry', async (c) => { - * const body = await c.req.json() - * }) - * ``` - */ - json(): Promise; - /** - * `.text()` can parse Request body of type `text/plain` - * - * @see {@link https://hono.dev/docs/api/request#text} - * - * @example - * ```ts - * app.post('/entry', async (c) => { - * const body = await c.req.text() - * }) - * ``` - */ - text(): Promise; - /** - * `.arrayBuffer()` parse Request body as an `ArrayBuffer` - * - * @see {@link https://hono.dev/docs/api/request#arraybuffer} - * - * @example - * ```ts - * app.post('/entry', async (c) => { - * const body = await c.req.arrayBuffer() - * }) - * ``` - */ - arrayBuffer(): Promise; - /** - * Parses the request body as a `Blob`. - * @example - * ```ts - * app.post('/entry', async (c) => { - * const body = await c.req.blob(); - * }); - * ``` - * @see https://hono.dev/docs/api/request#blob - */ - blob(): Promise; - /** - * Parses the request body as `FormData`. - * @example - * ```ts - * app.post('/entry', async (c) => { - * const body = await c.req.formData(); - * }); - * ``` - * @see https://hono.dev/docs/api/request#formdata - */ - formData(): Promise; - /** - * Adds validated data to the request. - * - * @param target - The target of the validation. - * @param data - The validated data to add. - */ - addValidatedData(target: keyof ValidationTargets, data: {}): void; - /** - * Gets validated data from the request. - * - * @param target - The target of the validation. - * @returns The validated data. - * - * @see https://hono.dev/docs/api/request#valid - */ - valid(target: T): InputToDataByTarget; - /** - * `.url()` can get the request url strings. - * - * @see {@link https://hono.dev/docs/api/request#url} - * - * @example - * ```ts - * app.get('/about/me', (c) => { - * const url = c.req.url // `http://localhost:8787/about/me` - * ... - * }) - * ``` - */ - get url(): string; - /** - * `.method()` can get the method name of the request. - * - * @see {@link https://hono.dev/docs/api/request#method} - * - * @example - * ```ts - * app.get('/about/me', (c) => { - * const method = c.req.method // `GET` - * }) - * ``` - */ - get method(): string; - /** - * `.matchedRoutes()` can return a matched route in the handler - * - * @deprecated - * - * Use matchedRoutes helper defined in "hono/route" instead. - * - * @see {@link https://hono.dev/docs/api/request#matchedroutes} - * - * @example - * ```ts - * app.use('*', async function logger(c, next) { - * await next() - * c.req.matchedRoutes.forEach(({ handler, method, path }, i) => { - * const name = handler.name || (handler.length < 2 ? '[handler]' : '[middleware]') - * console.log( - * method, - * ' ', - * path, - * ' '.repeat(Math.max(10 - path.length, 0)), - * name, - * i === c.req.routeIndex ? '<- respond from here' : '' - * ) - * }) - * }) - * ``` - */ - get matchedRoutes(): RouterRoute[]; - /** - * `routePath()` can retrieve the path registered within the handler - * - * @deprecated - * - * Use routePath helper defined in "hono/route" instead. - * - * @see {@link https://hono.dev/docs/api/request#routepath} - * - * @example - * ```ts - * app.get('/posts/:id', (c) => { - * return c.json({ path: c.req.routePath }) - * }) - * ``` - */ - get routePath(): string; -} -/** - * Clones a HonoRequest's underlying raw Request object. - * - * This utility handles both consumed and unconsumed request bodies: - * - If the request body hasn't been consumed, it uses the native `clone()` method - * - If the request body has been consumed, it reconstructs a new Request using cached body data - * - * This is particularly useful when you need to: - * - Process the same request body multiple times - * - Pass requests to external services after validation - * - * @param req - The HonoRequest object to clone - * @returns A Promise that resolves to a new Request object with the same properties - * @throws {HTTPException} If the request body was consumed directly via `req.raw` - * without using HonoRequest methods (e.g., `req.json()`, `req.text()`), making it - * impossible to reconstruct the body from cache - * - * @example - * ```ts - * // Clone after consuming the body (e.g., after validation) - * app.post('/forward', - * validator('json', (data) => data), - * async (c) => { - * const validated = c.req.valid('json') - * // Body has been consumed, but cloneRawRequest still works - * const clonedReq = await cloneRawRequest(c.req) - * return fetch('http://backend-service.com', clonedReq) - * } - * ) - * ``` - */ -export declare const cloneRawRequest: (req: HonoRequest) => Promise; -export {}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/request/constants.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/request/constants.d.ts deleted file mode 100644 index 3d95e12..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/request/constants.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const GET_MATCH_RESULT: symbol; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/router.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/router.d.ts deleted file mode 100644 index abe9f03..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/router.d.ts +++ /dev/null @@ -1,97 +0,0 @@ -/** - * @module - * This module provides types definitions and variables for the routers. - */ -/** - * Constant representing all HTTP methods in uppercase. - */ -export declare const METHOD_NAME_ALL: "ALL"; -/** - * Constant representing all HTTP methods in lowercase. - */ -export declare const METHOD_NAME_ALL_LOWERCASE: "all"; -/** - * Array of supported HTTP methods. - */ -export declare const METHODS: readonly ["get", "post", "put", "delete", "options", "patch"]; -/** - * Error message indicating that a route cannot be added because the matcher is already built. - */ -export declare const MESSAGE_MATCHER_IS_ALREADY_BUILT = "Can not add a route since the matcher is already built."; -/** - * Interface representing a router. - * - * @template T - The type of the handler. - */ -export interface Router { - /** - * The name of the router. - */ - name: string; - /** - * Adds a route to the router. - * - * @param method - The HTTP method (e.g., 'get', 'post'). - * @param path - The path for the route. - * @param handler - The handler for the route. - */ - add(method: string, path: string, handler: T): void; - /** - * Matches a route based on the given method and path. - * - * @param method - The HTTP method (e.g., 'get', 'post'). - * @param path - The path to match. - * @returns The result of the match. - */ - match(method: string, path: string): Result; -} -/** - * Type representing a map of parameter indices. - */ -export type ParamIndexMap = Record; -/** - * Type representing a stash of parameters. - */ -export type ParamStash = string[]; -/** - * Type representing a map of parameters. - */ -export type Params = Record; -/** - * Type representing the result of a route match. - * - * The result can be in one of two formats: - * 1. An array of handlers with their corresponding parameter index maps, followed by a parameter stash. - * 2. An array of handlers with their corresponding parameter maps. - * - * Example: - * - * [[handler, paramIndexMap][], paramArray] - * ```typescript - * [ - * [ - * [middlewareA, {}], // '*' - * [funcA, {'id': 0}], // '/user/:id/*' - * [funcB, {'id': 0, 'action': 1}], // '/user/:id/:action' - * ], - * ['123', 'abc'] - * ] - * ``` - * - * [[handler, params][]] - * ```typescript - * [ - * [ - * [middlewareA, {}], // '*' - * [funcA, {'id': '123'}], // '/user/:id/*' - * [funcB, {'id': '123', 'action': 'abc'}], // '/user/:id/:action' - * ] - * ] - * ``` - */ -export type Result = [[T, ParamIndexMap][], ParamStash] | [[T, Params][]]; -/** - * Error class representing an unsupported path error. - */ -export declare class UnsupportedPathError extends Error { -} diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/router/linear-router/index.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/router/linear-router/index.d.ts deleted file mode 100644 index 899f66e..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/router/linear-router/index.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -/** - * @module - * LinearRouter for Hono. - */ -export { LinearRouter } from './router'; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/router/linear-router/router.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/router/linear-router/router.d.ts deleted file mode 100644 index 45d563a..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/router/linear-router/router.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import type { Result, Router } from '../../router'; -export declare class LinearRouter implements Router { - - name: string; - add(method: string, path: string, handler: T): void; - match(method: string, path: string): Result; -} diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/router/pattern-router/index.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/router/pattern-router/index.d.ts deleted file mode 100644 index 26f9f23..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/router/pattern-router/index.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -/** - * @module - * PatternRouter for Hono. - */ -export { PatternRouter } from './router'; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/router/pattern-router/router.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/router/pattern-router/router.d.ts deleted file mode 100644 index 299811d..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/router/pattern-router/router.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import type { Result, Router } from '../../router'; -export declare class PatternRouter implements Router { - - name: string; - add(method: string, path: string, handler: T): void; - match(method: string, path: string): Result; -} diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/router/reg-exp-router/index.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/router/reg-exp-router/index.d.ts deleted file mode 100644 index 25c2363..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/router/reg-exp-router/index.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -/** - * @module - * RegExpRouter for Hono. - */ -export { RegExpRouter } from './router'; -export { PreparedRegExpRouter, buildInitParams, serializeInitParams } from './prepared-router'; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/router/reg-exp-router/matcher.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/router/reg-exp-router/matcher.d.ts deleted file mode 100644 index 721ec4b..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/router/reg-exp-router/matcher.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import type { ParamIndexMap, Result, Router } from '../../router'; -export type HandlerData = [T, ParamIndexMap][]; -export type StaticMap = Record>; -export type Matcher = [RegExp, HandlerData[], StaticMap]; -export type MatcherMap = Record | null>; -export declare const emptyParam: string[]; -export declare function match, T>(this: R, method: string, path: string): Result; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/router/reg-exp-router/node.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/router/reg-exp-router/node.d.ts deleted file mode 100644 index 76f1c53..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/router/reg-exp-router/node.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -export declare const PATH_ERROR: unique symbol; -export type ParamAssocArray = [string, number][]; -export interface Context { - varIndex: number; -} -export declare class Node { - - insert(tokens: readonly string[], index: number, paramMap: ParamAssocArray, context: Context, pathErrorCheckOnly: boolean): void; - buildRegExpStr(): string; -} diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/router/reg-exp-router/prepared-router.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/router/reg-exp-router/prepared-router.d.ts deleted file mode 100644 index de9f39e..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/router/reg-exp-router/prepared-router.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -import type { ParamIndexMap, Router } from '../../router'; -import type { MatcherMap } from './matcher'; -import { match } from './matcher'; -type RelocateMap = Record; -export declare class PreparedRegExpRouter implements Router { - - name: string; - constructor(matchers: MatcherMap, relocateMap: RelocateMap); - add(method: string, path: string, handler: T): void; - protected buildAllMatchers(): MatcherMap; - match: typeof match, T>; -} -export declare const buildInitParams: (params: { - paths: string[]; -}) => ConstructorParameters; -export declare const serializeInitParams: (params: ConstructorParameters) => string; -export {}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/router/reg-exp-router/router.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/router/reg-exp-router/router.d.ts deleted file mode 100644 index fda1ebb..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/router/reg-exp-router/router.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import type { Router } from '../../router'; -import type { MatcherMap } from './matcher'; -import { match } from './matcher'; -export declare class RegExpRouter implements Router { - - name: string; - constructor(); - add(method: string, path: string, handler: T): void; - match: typeof match, T>; - protected buildAllMatchers(): MatcherMap; -} diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/router/reg-exp-router/trie.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/router/reg-exp-router/trie.d.ts deleted file mode 100644 index a1f1a80..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/router/reg-exp-router/trie.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import type { ParamAssocArray } from './node'; -export type ReplacementMap = number[]; -export declare class Trie { - - insert(path: string, index: number, pathErrorCheckOnly: boolean): ParamAssocArray; - buildRegExp(): [RegExp, ReplacementMap, ReplacementMap]; -} diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/router/smart-router/index.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/router/smart-router/index.d.ts deleted file mode 100644 index e7801b8..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/router/smart-router/index.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -/** - * @module - * SmartRouter for Hono. - */ -export { SmartRouter } from './router'; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/router/smart-router/router.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/router/smart-router/router.d.ts deleted file mode 100644 index 94a4de3..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/router/smart-router/router.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import type { Result, Router } from '../../router'; -export declare class SmartRouter implements Router { - - name: string; - constructor(init: { - routers: Router[]; - }); - add(method: string, path: string, handler: T): void; - match(method: string, path: string): Result; - get activeRouter(): Router; -} diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/router/trie-router/index.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/router/trie-router/index.d.ts deleted file mode 100644 index 44ace76..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/router/trie-router/index.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -/** - * @module - * TrieRouter for Hono. - */ -export { TrieRouter } from './router'; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/router/trie-router/node.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/router/trie-router/node.d.ts deleted file mode 100644 index 81b9cc5..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/router/trie-router/node.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import type { Params } from '../../router'; -export declare class Node { - - constructor(method?: string, handler?: T, children?: Record>); - insert(method: string, path: string, handler: T): Node; - search(method: string, path: string): [[T, Params][]]; -} diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/router/trie-router/router.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/router/trie-router/router.d.ts deleted file mode 100644 index 50990db..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/router/trie-router/router.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import type { Result, Router } from '../../router'; -export declare class TrieRouter implements Router { - - name: string; - constructor(); - add(method: string, path: string, handler: T): void; - match(method: string, path: string): Result; -} diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/types.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/types.d.ts deleted file mode 100644 index 7cf9c8d..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/types.d.ts +++ /dev/null @@ -1,573 +0,0 @@ -/** - * @module - * This module contains some type definitions for the Hono modules. - */ -import type { Context } from './context'; -import type { HonoBase } from './hono-base'; -import type { CustomHeader, RequestHeader } from './utils/headers'; -import type { StatusCode } from './utils/http-status'; -import type { IfAnyThenEmptyObject, IsAny, JSONValue, RemoveBlankRecord, Simplify, UnionToIntersection } from './utils/types'; -export type Bindings = object; -export type Variables = object; -export type BlankEnv = {}; -export type Env = { - Bindings?: Bindings; - Variables?: Variables; -}; -export type Next = () => Promise; -export type ExtractInput = I extends Input ? unknown extends I['in'] ? {} : I['in'] : I; -export type Input = { - in?: {}; - out?: {}; - outputFormat?: ResponseFormat; -}; -export type BlankSchema = {}; -export type BlankInput = {}; -export interface RouterRoute { - basePath: string; - path: string; - method: string; - handler: H; -} -export type HandlerResponse = Response | TypedResponse | Promise> | Promise; -export type Handler = any> = (c: Context, next: Next) => R; -export type MiddlewareHandler = Response> = (c: Context, next: Next) => Promise; -export type H = any> = Handler | MiddlewareHandler; -/** - * You can extend this interface to define a custom `c.notFound()` Response type. - * - * @example - * declare module 'hono' { - * interface NotFoundResponse extends Response, TypedResponse {} - * } - */ -export interface NotFoundResponse { -} -export type NotFoundHandler = (c: Context) => NotFoundResponse extends Response ? NotFoundResponse | Promise : Response | Promise; -export interface HTTPResponseError extends Error { - getResponse: () => Response; -} -export type ErrorHandler = (err: Error | HTTPResponseError, c: Context) => Response | Promise; -export interface HandlerInterface { -

= any, E2 extends Env = E>(handler: H): HonoBase, S & ToSchema>, BasePath, CurrentPath>; -

= any, E2 extends Env = E, E3 extends Env = IntersectNonAnyTypes<[E, E2]>, M1 extends H = H>(...handlers: [H & M1, H]): HonoBase, S & ToSchema | MergeMiddlewareResponse>, BasePath, CurrentPath>; -

, R extends HandlerResponse = any, I extends Input = BlankInput, E2 extends Env = E>(path: P, handler: H): HonoBase, S, M, P, I, BasePath>, BasePath, MergePath>; -

= any, I extends Input = BlankInput, I2 extends Input = I, I3 extends Input = I & I2, E2 extends Env = E, E3 extends Env = IntersectNonAnyTypes<[E, E2]>, E4 extends Env = IntersectNonAnyTypes<[E, E2, E3]>, M1 extends H = H, M2 extends H = H>(...handlers: [H & M1, H & M2, H]): HonoBase, S & ToSchema | MergeMiddlewareResponse | MergeMiddlewareResponse>, BasePath, CurrentPath>; -

, R extends HandlerResponse = any, I extends Input = BlankInput, I2 extends Input = I, E2 extends Env = E, E3 extends Env = IntersectNonAnyTypes<[E, E2]>, M1 extends H = H>(path: P, ...handlers: [H & M1, H]): HonoBase | MergeMiddlewareResponse, S, M, P, I2, BasePath>, BasePath, MergePath>; -

= any, I extends Input = BlankInput, I2 extends Input = I, I3 extends Input = I & I2, I4 extends Input = I & I2 & I3, E2 extends Env = E, E3 extends Env = IntersectNonAnyTypes<[E, E2]>, E4 extends Env = IntersectNonAnyTypes<[E, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4]>, M1 extends H = H, M2 extends H = H, M3 extends H = H>(...handlers: [H & M1, H & M2, H & M3, H]): HonoBase, S & ToSchema | MergeMiddlewareResponse | MergeMiddlewareResponse | MergeMiddlewareResponse>, BasePath, CurrentPath>; -

, R extends HandlerResponse = any, I extends Input = BlankInput, I2 extends Input = I, I3 extends Input = I & I2, E2 extends Env = E, E3 extends Env = IntersectNonAnyTypes<[E, E2]>, E4 extends Env = IntersectNonAnyTypes<[E, E2, E3]>, M1 extends H = H, M2 extends H = H>(path: P, ...handlers: [H & M1, H & M2, H]): HonoBase | MergeMiddlewareResponse | MergeMiddlewareResponse, S, M, P, I3, BasePath>, BasePath, MergePath>; -

= any, I extends Input = BlankInput, I2 extends Input = I, I3 extends Input = I & I2, I4 extends Input = I & I2 & I3, I5 extends Input = I & I2 & I3 & I4, E2 extends Env = E, E3 extends Env = IntersectNonAnyTypes<[E, E2]>, E4 extends Env = IntersectNonAnyTypes<[E, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4]>, E6 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5]>, M1 extends H = H, M2 extends H = H, M3 extends H = H, M4 extends H = H>(...handlers: [ - H & M1, - H & M2, - H & M3, - H & M4, - H - ]): HonoBase, S & ToSchema | MergeMiddlewareResponse | MergeMiddlewareResponse | MergeMiddlewareResponse | MergeMiddlewareResponse>, BasePath, CurrentPath>; -

, R extends HandlerResponse = any, I extends Input = BlankInput, I2 extends Input = I, I3 extends Input = I & I2, I4 extends Input = I & I2 & I3, E2 extends Env = E, E3 extends Env = IntersectNonAnyTypes<[E, E2]>, E4 extends Env = IntersectNonAnyTypes<[E, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4]>, M1 extends H = H, M2 extends H = H, M3 extends H = H>(path: P, ...handlers: [ - H & M1, - H & M2, - H & M3, - H - ]): HonoBase | MergeMiddlewareResponse | MergeMiddlewareResponse | MergeMiddlewareResponse, S, M, P, I4, BasePath>, BasePath, MergePath>; -

= any, I extends Input = BlankInput, I2 extends Input = I, I3 extends Input = I & I2, I4 extends Input = I & I2 & I3, I5 extends Input = I & I2 & I3 & I4, I6 extends Input = I & I2 & I3 & I4 & I5, E2 extends Env = E, E3 extends Env = IntersectNonAnyTypes<[E, E2]>, E4 extends Env = IntersectNonAnyTypes<[E, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4]>, E6 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5]>, E7 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6]>, M1 extends H = H, M2 extends H = H, M3 extends H = H, M4 extends H = H, M5 extends H = H>(...handlers: [ - H & M1, - H & M2, - H & M3, - H & M4, - H & M5, - H - ]): HonoBase, S & ToSchema | MergeMiddlewareResponse | MergeMiddlewareResponse | MergeMiddlewareResponse | MergeMiddlewareResponse | MergeMiddlewareResponse>, BasePath, CurrentPath>; -

, R extends HandlerResponse = any, I extends Input = BlankInput, I2 extends Input = I, I3 extends Input = I & I2, I4 extends Input = I & I2 & I3, I5 extends Input = I & I2 & I3 & I4, E2 extends Env = E, E3 extends Env = IntersectNonAnyTypes<[E, E2]>, E4 extends Env = IntersectNonAnyTypes<[E, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4]>, E6 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5]>, M1 extends H = H, M2 extends H = H, M3 extends H = H, M4 extends H = H>(path: P, ...handlers: [ - H & M1, - H & M2, - H & M3, - H & M4, - H - ]): HonoBase | MergeMiddlewareResponse | MergeMiddlewareResponse | MergeMiddlewareResponse | MergeMiddlewareResponse, S, M, P, I5, BasePath>, BasePath, MergePath>; -

= any, I extends Input = BlankInput, I2 extends Input = I, I3 extends Input = I & I2, I4 extends Input = I & I2 & I3, I5 extends Input = I & I2 & I3 & I4, I6 extends Input = I & I2 & I3 & I4 & I5, I7 extends Input = I & I2 & I3 & I4 & I5 & I6, E2 extends Env = E, E3 extends Env = IntersectNonAnyTypes<[E, E2]>, E4 extends Env = IntersectNonAnyTypes<[E, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4]>, E6 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5]>, E7 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6]>, E8 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7]>, M1 extends H = H, M2 extends H = H, M3 extends H = H, M4 extends H = H, M5 extends H = H, M6 extends H = H>(...handlers: [ - H & M1, - H & M2, - H & M3, - H & M4, - H & M5, - H & M6, - H - ]): HonoBase, S & ToSchema | MergeMiddlewareResponse | MergeMiddlewareResponse | MergeMiddlewareResponse | MergeMiddlewareResponse | MergeMiddlewareResponse | MergeMiddlewareResponse>, BasePath, CurrentPath>; -

, R extends HandlerResponse = any, I extends Input = BlankInput, I2 extends Input = I, I3 extends Input = I & I2, I4 extends Input = I & I2 & I3, I5 extends Input = I & I2 & I3 & I4, I6 extends Input = I & I2 & I3 & I4 & I5, E2 extends Env = E, E3 extends Env = IntersectNonAnyTypes<[E, E2]>, E4 extends Env = IntersectNonAnyTypes<[E, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4]>, E6 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5]>, E7 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6]>, M1 extends H = H, M2 extends H = H, M3 extends H = H, M4 extends H = H, M5 extends H = H>(path: P, ...handlers: [ - H & M1, - H & M2, - H & M3, - H & M4, - H & M5, - H - ]): HonoBase | MergeMiddlewareResponse | MergeMiddlewareResponse | MergeMiddlewareResponse | MergeMiddlewareResponse | MergeMiddlewareResponse, S, M, P, I6, BasePath>, BasePath, MergePath>; -

= any, I extends Input = BlankInput, I2 extends Input = I, I3 extends Input = I & I2, I4 extends Input = I & I2 & I3, I5 extends Input = I & I2 & I3 & I4, I6 extends Input = I & I2 & I3 & I4 & I5, I7 extends Input = I & I2 & I3 & I4 & I5 & I6, I8 extends Input = I & I2 & I3 & I4 & I5 & I6 & I7, E2 extends Env = E, E3 extends Env = IntersectNonAnyTypes<[E, E2]>, E4 extends Env = IntersectNonAnyTypes<[E, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4]>, E6 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5]>, E7 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6]>, E8 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7]>, E9 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7, E8]>, M1 extends H = H, M2 extends H = H, M3 extends H = H, M4 extends H = H, M5 extends H = H, M6 extends H = H, M7 extends H = H>(...handlers: [ - H & M1, - H & M2, - H & M3, - H & M4, - H & M5, - H & M6, - H & M7, - H - ]): HonoBase, S & ToSchema | MergeMiddlewareResponse | MergeMiddlewareResponse | MergeMiddlewareResponse | MergeMiddlewareResponse | MergeMiddlewareResponse | MergeMiddlewareResponse | MergeMiddlewareResponse>, BasePath, CurrentPath>; -

, R extends HandlerResponse = any, I extends Input = BlankInput, I2 extends Input = I, I3 extends Input = I & I2, I4 extends Input = I & I2 & I3, I5 extends Input = I & I2 & I3 & I4, I6 extends Input = I & I2 & I3 & I4 & I5, I7 extends Input = I & I2 & I3 & I4 & I5 & I6, E2 extends Env = E, E3 extends Env = IntersectNonAnyTypes<[E, E2]>, E4 extends Env = IntersectNonAnyTypes<[E, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4]>, E6 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5]>, E7 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6]>, E8 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7]>, M1 extends H = H, M2 extends H = H, M3 extends H = H, M4 extends H = H, M5 extends H = H, M6 extends H = H>(path: P, ...handlers: [ - H & M1, - H & M2, - H & M3, - H & M4, - H & M5, - H & M6, - H - ]): HonoBase | MergeMiddlewareResponse | MergeMiddlewareResponse | MergeMiddlewareResponse | MergeMiddlewareResponse | MergeMiddlewareResponse | MergeMiddlewareResponse, S, M, P, I7, BasePath>, BasePath, MergePath>; -

= any, I extends Input = BlankInput, I2 extends Input = I, I3 extends Input = I & I2, I4 extends Input = I & I2 & I3, I5 extends Input = I & I2 & I3 & I4, I6 extends Input = I & I2 & I3 & I4 & I5, I7 extends Input = I & I2 & I3 & I4 & I5 & I6, I8 extends Input = I & I2 & I3 & I4 & I5 & I6 & I7, I9 extends Input = I & I2 & I3 & I4 & I5 & I6 & I7 & I8, E2 extends Env = E, E3 extends Env = IntersectNonAnyTypes<[E, E2]>, E4 extends Env = IntersectNonAnyTypes<[E, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4]>, E6 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5]>, E7 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6]>, E8 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7]>, E9 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7, E8]>, E10 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7, E8, E9]>, M1 extends H = H, M2 extends H = H, M3 extends H = H, M4 extends H = H, M5 extends H = H, M6 extends H = H, M7 extends H = H, M8 extends H = H>(...handlers: [ - H & M1, - H & M2, - H & M3, - H & M4, - H & M5, - H & M6, - H & M7, - H & M8, - H - ]): HonoBase, S & ToSchema | MergeMiddlewareResponse | MergeMiddlewareResponse | MergeMiddlewareResponse | MergeMiddlewareResponse | MergeMiddlewareResponse | MergeMiddlewareResponse | MergeMiddlewareResponse | MergeMiddlewareResponse>, BasePath, CurrentPath>; -

, R extends HandlerResponse = any, I extends Input = BlankInput, I2 extends Input = I, I3 extends Input = I & I2, I4 extends Input = I & I2 & I3, I5 extends Input = I & I2 & I3 & I4, I6 extends Input = I & I2 & I3 & I4 & I5, I7 extends Input = I & I2 & I3 & I4 & I5 & I6, I8 extends Input = I & I2 & I3 & I4 & I5 & I6 & I7, E2 extends Env = E, E3 extends Env = IntersectNonAnyTypes<[E, E2]>, E4 extends Env = IntersectNonAnyTypes<[E, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4]>, E6 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5]>, E7 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6]>, E8 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7]>, E9 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7, E8]>, M1 extends H = H, M2 extends H = H, M3 extends H = H, M4 extends H = H, M5 extends H = H, M6 extends H = H, M7 extends H = H>(path: P, ...handlers: [ - H & M1, - H & M2, - H & M3, - H & M4, - H & M5, - H & M6, - H & M7, - H - ]): HonoBase | MergeMiddlewareResponse | MergeMiddlewareResponse | MergeMiddlewareResponse | MergeMiddlewareResponse | MergeMiddlewareResponse | MergeMiddlewareResponse | MergeMiddlewareResponse, S, M, P, I8, BasePath>, BasePath, MergePath>; -

= any, I extends Input = BlankInput, I2 extends Input = I, I3 extends Input = I & I2, I4 extends Input = I & I2 & I3, I5 extends Input = I & I2 & I3 & I4, I6 extends Input = I & I2 & I3 & I4 & I5, I7 extends Input = I & I2 & I3 & I4 & I5 & I6, I8 extends Input = I & I2 & I3 & I4 & I5 & I6 & I7, I9 extends Input = I & I2 & I3 & I4 & I5 & I6 & I7 & I8, I10 extends Input = I & I2 & I3 & I4 & I5 & I6 & I7 & I8 & I9, E2 extends Env = E, E3 extends Env = IntersectNonAnyTypes<[E, E2]>, E4 extends Env = IntersectNonAnyTypes<[E, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4]>, E6 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5]>, E7 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6]>, E8 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7]>, E9 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7, E8]>, E10 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7, E8, E9]>, E11 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7, E8, E9, E10]>, M1 extends H = H, M2 extends H = H, M3 extends H = H, M4 extends H = H, M5 extends H = H, M6 extends H = H, M7 extends H = H, M8 extends H = H, M9 extends H = H>(...handlers: [ - H & M1, - H & M2, - H & M3, - H & M4, - H & M5, - H & M6, - H & M7, - H & M8, - H & M9, - H - ]): HonoBase, S & ToSchema | MergeMiddlewareResponse | MergeMiddlewareResponse | MergeMiddlewareResponse | MergeMiddlewareResponse | MergeMiddlewareResponse | MergeMiddlewareResponse | MergeMiddlewareResponse | MergeMiddlewareResponse | MergeMiddlewareResponse>, BasePath, CurrentPath>; -

, R extends HandlerResponse = any, I extends Input = BlankInput, I2 extends Input = I, I3 extends Input = I & I2, I4 extends Input = I & I2 & I3, I5 extends Input = I & I2 & I3 & I4, I6 extends Input = I & I2 & I3 & I4 & I5, I7 extends Input = I & I2 & I3 & I4 & I5 & I6, I8 extends Input = I & I2 & I3 & I4 & I5 & I6 & I7, I9 extends Input = I & I2 & I3 & I4 & I5 & I6 & I7 & I8, E2 extends Env = E, E3 extends Env = IntersectNonAnyTypes<[E, E2]>, E4 extends Env = IntersectNonAnyTypes<[E, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4]>, E6 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5]>, E7 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6]>, E8 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7]>, E9 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7, E8]>, E10 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7, E8, E9]>, M1 extends H = H, M2 extends H = H, M3 extends H = H, M4 extends H = H, M5 extends H = H, M6 extends H = H, M7 extends H = H, M8 extends H = H>(path: P, ...handlers: [ - H & M1, - H & M2, - H & M3, - H & M4, - H & M5, - H & M6, - H & M7, - H & M8, - H - ]): HonoBase | MergeMiddlewareResponse | MergeMiddlewareResponse | MergeMiddlewareResponse | MergeMiddlewareResponse | MergeMiddlewareResponse | MergeMiddlewareResponse | MergeMiddlewareResponse | MergeMiddlewareResponse, S, M, P, I9, BasePath>, BasePath, MergePath>; -

, R extends HandlerResponse = any, I extends Input = BlankInput, I2 extends Input = I, I3 extends Input = I & I2, I4 extends Input = I & I2 & I3, I5 extends Input = I & I2 & I3 & I4, I6 extends Input = I & I2 & I3 & I4 & I5, I7 extends Input = I & I2 & I3 & I4 & I5 & I6, I8 extends Input = I & I2 & I3 & I4 & I5 & I6 & I7, I9 extends Input = I & I2 & I3 & I4 & I5 & I6 & I7 & I8, I10 extends Input = I & I2 & I3 & I4 & I5 & I6 & I7 & I8 & I9, E2 extends Env = E, E3 extends Env = IntersectNonAnyTypes<[E, E2]>, E4 extends Env = IntersectNonAnyTypes<[E, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4]>, E6 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5]>, E7 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6]>, E8 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7]>, E9 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7, E8]>, E10 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7, E8, E9]>, E11 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7, E8, E9, E10]>, M1 extends H = H, M2 extends H = H, M3 extends H = H, M4 extends H = H, M5 extends H = H, M6 extends H = H, M7 extends H = H, M8 extends H = H, M9 extends H = H>(path: P, ...handlers: [ - H & M1, - H & M2, - H & M3, - H & M4, - H & M5, - H & M6, - H & M7, - H & M8, - H & M9, - H - ]): HonoBase | MergeMiddlewareResponse | MergeMiddlewareResponse | MergeMiddlewareResponse | MergeMiddlewareResponse | MergeMiddlewareResponse | MergeMiddlewareResponse | MergeMiddlewareResponse | MergeMiddlewareResponse | MergeMiddlewareResponse, S, M, P, I10, BasePath>, BasePath, MergePath>; -

= any>(...handlers: H[]): HonoBase>, BasePath, CurrentPath>; -

= any>(path: P, ...handlers: [H, I, R>, ...H, I, R>[]]): HonoBase, I, MergeTypedResponse>, BasePath, MergePath>; -

= any, I extends Input = BlankInput>(path: P): HonoBase, I, MergeTypedResponse>, BasePath, MergePath>; -} -export interface MiddlewareHandlerInterface { - (...handlers: MiddlewareHandler>[]): HonoBase, S, BasePath, MergePath>; - (handler: MiddlewareHandler>): HonoBase, S, BasePath, MergePath>; - , P extends string = MergePath>(...handlers: [MiddlewareHandler, MiddlewareHandler]): HonoBase, S, BasePath, P>; -

, E2 extends Env = E>(path: P, handler: MiddlewareHandler): HonoBase, S, BasePath, MergedPath>; - , E4 extends Env = IntersectNonAnyTypes<[E, E2, E3]>, P extends string = MergePath>(...handlers: [ - MiddlewareHandler, - MiddlewareHandler, - MiddlewareHandler - ]): HonoBase, S, BasePath, P>; -

, E2 extends Env = E, E3 extends Env = IntersectNonAnyTypes<[E, E2]>>(path: P, ...handlers: [MiddlewareHandler, MiddlewareHandler]): HonoBase, S, BasePath, MergedPath>; - , E4 extends Env = IntersectNonAnyTypes<[E, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4]>, P extends string = MergePath>(...handlers: [ - MiddlewareHandler, - MiddlewareHandler, - MiddlewareHandler, - MiddlewareHandler - ]): HonoBase, S, BasePath, P>; -

, E2 extends Env = E, E3 extends Env = IntersectNonAnyTypes<[E, E2]>, E4 extends Env = IntersectNonAnyTypes<[E, E2, E3]>>(path: P, ...handlers: [MiddlewareHandler, MiddlewareHandler, MiddlewareHandler]): HonoBase, S, BasePath, MergedPath>; - , E4 extends Env = IntersectNonAnyTypes<[E, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4]>, E6 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5]>, P extends string = MergePath>(...handlers: [ - MiddlewareHandler, - MiddlewareHandler, - MiddlewareHandler, - MiddlewareHandler, - MiddlewareHandler - ]): HonoBase, S, BasePath, P>; -

, E2 extends Env = E, E3 extends Env = IntersectNonAnyTypes<[E, E2]>, E4 extends Env = IntersectNonAnyTypes<[E, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4]>>(path: P, ...handlers: [ - MiddlewareHandler, - MiddlewareHandler, - MiddlewareHandler, - MiddlewareHandler - ]): HonoBase, S, BasePath, MergedPath>; - , E4 extends Env = IntersectNonAnyTypes<[E, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4]>, E6 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5]>, E7 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6]>, P extends string = MergePath>(...handlers: [ - MiddlewareHandler, - MiddlewareHandler, - MiddlewareHandler, - MiddlewareHandler, - MiddlewareHandler, - MiddlewareHandler - ]): HonoBase, S, BasePath, P>; -

, E2 extends Env = E, E3 extends Env = IntersectNonAnyTypes<[E, E2]>, E4 extends Env = IntersectNonAnyTypes<[E, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4]>, E6 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5]>>(path: P, ...handlers: [ - MiddlewareHandler, - MiddlewareHandler, - MiddlewareHandler, - MiddlewareHandler, - MiddlewareHandler - ]): HonoBase, S, BasePath, MergedPath>; - , E4 extends Env = IntersectNonAnyTypes<[E, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4]>, E6 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5]>, E7 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6]>, E8 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7]>, P extends string = MergePath>(...handlers: [ - MiddlewareHandler, - MiddlewareHandler, - MiddlewareHandler, - MiddlewareHandler, - MiddlewareHandler, - MiddlewareHandler, - MiddlewareHandler - ]): HonoBase, S, BasePath, P>; -

, E2 extends Env = E, E3 extends Env = IntersectNonAnyTypes<[E, E2]>, E4 extends Env = IntersectNonAnyTypes<[E, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4]>, E6 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5]>, E7 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6]>>(path: P, ...handlers: [ - MiddlewareHandler, - MiddlewareHandler, - MiddlewareHandler, - MiddlewareHandler, - MiddlewareHandler, - MiddlewareHandler - ]): HonoBase, S, BasePath, MergedPath>; - , E4 extends Env = IntersectNonAnyTypes<[E, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4]>, E6 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5]>, E7 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6]>, E8 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7]>, E9 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7, E8]>, P extends string = MergePath>(...handlers: [ - MiddlewareHandler, - MiddlewareHandler, - MiddlewareHandler, - MiddlewareHandler, - MiddlewareHandler, - MiddlewareHandler, - MiddlewareHandler, - MiddlewareHandler - ]): HonoBase, S, BasePath, P>; -

, E2 extends Env = E, E3 extends Env = IntersectNonAnyTypes<[E, E2]>, E4 extends Env = IntersectNonAnyTypes<[E, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4]>, E6 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5]>, E7 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6]>, E8 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7]>>(path: P, ...handlers: [ - MiddlewareHandler, - MiddlewareHandler, - MiddlewareHandler, - MiddlewareHandler, - MiddlewareHandler, - MiddlewareHandler, - MiddlewareHandler - ]): HonoBase, S, BasePath, MergedPath>; - , E4 extends Env = IntersectNonAnyTypes<[E, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4]>, E6 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5]>, E7 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6]>, E8 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7]>, E9 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7, E8]>, E10 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7, E8, E9]>, P extends string = MergePath>(...handlers: [ - MiddlewareHandler, - MiddlewareHandler, - MiddlewareHandler, - MiddlewareHandler, - MiddlewareHandler, - MiddlewareHandler, - MiddlewareHandler, - MiddlewareHandler, - MiddlewareHandler - ]): HonoBase, S, BasePath, P>; -

, E2 extends Env = E, E3 extends Env = IntersectNonAnyTypes<[E, E2]>, E4 extends Env = IntersectNonAnyTypes<[E, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4]>, E6 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5]>, E7 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6]>, E8 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7]>, E9 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7, E8]>>(path: P, ...handlers: [ - MiddlewareHandler, - MiddlewareHandler, - MiddlewareHandler, - MiddlewareHandler, - MiddlewareHandler, - MiddlewareHandler, - MiddlewareHandler, - MiddlewareHandler - ]): HonoBase, S, BasePath, MergedPath>; - , E4 extends Env = IntersectNonAnyTypes<[E, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4]>, E6 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5]>, E7 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6]>, E8 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7]>, E9 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7, E8]>, E10 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7, E8, E9]>, E11 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7, E8, E9, E10]>, P extends string = MergePath>(...handlers: [ - MiddlewareHandler, - MiddlewareHandler, - MiddlewareHandler, - MiddlewareHandler, - MiddlewareHandler, - MiddlewareHandler, - MiddlewareHandler, - MiddlewareHandler, - MiddlewareHandler, - MiddlewareHandler - ]): HonoBase, S, BasePath, P>; -

, E2 extends Env = E, E3 extends Env = IntersectNonAnyTypes<[E, E2]>, E4 extends Env = IntersectNonAnyTypes<[E, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4]>, E6 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5]>, E7 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6]>, E8 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7]>, E9 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7, E8]>, E10 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7, E8, E9]>>(path: P, ...handlers: [ - MiddlewareHandler, - MiddlewareHandler, - MiddlewareHandler, - MiddlewareHandler, - MiddlewareHandler, - MiddlewareHandler, - MiddlewareHandler, - MiddlewareHandler, - MiddlewareHandler - ]): HonoBase, S, BasePath, MergedPath>; -

(path: P, ...handlers: MiddlewareHandler>[]): HonoBase>; -} -export interface OnHandlerInterface { - , R extends HandlerResponse = any, I extends Input = BlankInput, E2 extends Env = E>(method: M, path: P, handler: H): HonoBase, S & ToSchema, I, MergeTypedResponse>, BasePath, MergePath>; - , R extends HandlerResponse = any, I extends Input = BlankInput, I2 extends Input = I, E2 extends Env = E, E3 extends Env = IntersectNonAnyTypes<[E, E2]>>(method: M, path: P, ...handlers: [H, H]): HonoBase, S & ToSchema, I2, MergeTypedResponse>, BasePath, MergePath>; - , R extends HandlerResponse = any, I extends Input = BlankInput, I2 extends Input = I, I3 extends Input = I & I2, E2 extends Env = E, E3 extends Env = IntersectNonAnyTypes<[E, E2]>, E4 extends Env = IntersectNonAnyTypes<[E, E2, E3]>>(method: M, path: P, ...handlers: [H, H, H]): HonoBase, S & ToSchema, I3, MergeTypedResponse>, BasePath, MergePath>; - , R extends HandlerResponse = any, I extends Input = BlankInput, I2 extends Input = I, I3 extends Input = I & I2, I4 extends Input = I & I2 & I3, E2 extends Env = E, E3 extends Env = IntersectNonAnyTypes<[E, E2]>, E4 extends Env = IntersectNonAnyTypes<[E, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4]>>(method: M, path: P, ...handlers: [ - H, - H, - H, - H - ]): HonoBase, S & ToSchema, I4, MergeTypedResponse>, BasePath, MergePath>; - , R extends HandlerResponse = any, I extends Input = BlankInput, I2 extends Input = I, I3 extends Input = I & I2, I4 extends Input = I & I2 & I3, I5 extends Input = I & I2 & I3 & I4, E2 extends Env = E, E3 extends Env = IntersectNonAnyTypes<[E, E2]>, E4 extends Env = IntersectNonAnyTypes<[E, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4]>, E6 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5]>>(method: M, path: P, ...handlers: [ - H, - H, - H, - H, - H - ]): HonoBase, S & ToSchema, I5, MergeTypedResponse>, BasePath, MergePath>; - , R extends HandlerResponse = any, I extends Input = BlankInput, I2 extends Input = I, I3 extends Input = I & I2, I4 extends Input = I & I2 & I3, I5 extends Input = I & I2 & I3 & I4, I6 extends Input = I & I2 & I3 & I4 & I5, E2 extends Env = E, E3 extends Env = IntersectNonAnyTypes<[E, E2]>, E4 extends Env = IntersectNonAnyTypes<[E, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4]>, E6 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5]>, E7 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6]>>(method: M, path: P, ...handlers: [ - H, - H, - H, - H, - H, - H - ]): HonoBase, S & ToSchema, I6, MergeTypedResponse>, BasePath, MergePath>; - , R extends HandlerResponse = any, I extends Input = BlankInput, I2 extends Input = I, I3 extends Input = I & I2, I4 extends Input = I & I2 & I3, I5 extends Input = I & I2 & I3 & I4, I6 extends Input = I & I2 & I3 & I4 & I5, I7 extends Input = I & I2 & I3 & I4 & I5 & I6, E2 extends Env = E, E3 extends Env = IntersectNonAnyTypes<[E, E2]>, E4 extends Env = IntersectNonAnyTypes<[E, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4]>, E6 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5]>, E7 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6]>, E8 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7]>>(method: M, path: P, ...handlers: [ - H, - H, - H, - H, - H, - H, - H - ]): HonoBase, S & ToSchema, I7, MergeTypedResponse>, BasePath, MergePath>; - , R extends HandlerResponse = any, I extends Input = BlankInput, I2 extends Input = I, I3 extends Input = I & I2, I4 extends Input = I & I2 & I3, I5 extends Input = I & I2 & I3 & I4, I6 extends Input = I & I2 & I3 & I4 & I5, I7 extends Input = I & I2 & I3 & I4 & I5 & I6, I8 extends Input = I & I2 & I3 & I4 & I5 & I6 & I7, E2 extends Env = E, E3 extends Env = IntersectNonAnyTypes<[E, E2]>, E4 extends Env = IntersectNonAnyTypes<[E, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4]>, E6 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5]>, E7 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6]>, E8 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7]>, E9 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7, E8]>>(method: M, path: P, ...handlers: [ - H, - H, - H, - H, - H, - H, - H, - H - ]): HonoBase, S & ToSchema, I8, MergeTypedResponse>, BasePath, MergePath>; - , R extends HandlerResponse = any, I extends Input = BlankInput, I2 extends Input = I, I3 extends Input = I & I2, I4 extends Input = I & I2 & I3, I5 extends Input = I & I2 & I3 & I4, I6 extends Input = I & I2 & I3 & I4 & I5, I7 extends Input = I & I2 & I3 & I4 & I5 & I6, I8 extends Input = I & I2 & I3 & I4 & I5 & I6 & I7, I9 extends Input = I & I2 & I3 & I4 & I5 & I6 & I7 & I8, E2 extends Env = E, E3 extends Env = IntersectNonAnyTypes<[E, E2]>, E4 extends Env = IntersectNonAnyTypes<[E, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4]>, E6 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5]>, E7 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6]>, E8 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7]>, E9 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7, E8]>, E10 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7, E8, E9]>>(method: M, path: P, ...handlers: [ - H, - H, - H, - H, - H, - H, - H, - H, - H - ]): HonoBase, S & ToSchema, I9, MergeTypedResponse>, BasePath, MergePath>; - , R extends HandlerResponse = any, I extends Input = BlankInput, I2 extends Input = I, I3 extends Input = I & I2, I4 extends Input = I & I2 & I3, I5 extends Input = I & I2 & I3 & I4, I6 extends Input = I & I2 & I3 & I4 & I5, I7 extends Input = I & I2 & I3 & I4 & I5 & I6, I8 extends Input = I & I2 & I3 & I4 & I5 & I6 & I7, I9 extends Input = I & I2 & I3 & I4 & I5 & I6 & I7 & I8, I10 extends Input = I & I2 & I3 & I4 & I5 & I6 & I7 & I8 & I9, E2 extends Env = E, E3 extends Env = IntersectNonAnyTypes<[E, E2]>, E4 extends Env = IntersectNonAnyTypes<[E, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4]>, E6 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5]>, E7 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6]>, E8 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7]>, E9 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7, E8]>, E10 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7, E8, E9]>, E11 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7, E8, E9, E10]>>(method: M, path: P, ...handlers: [ - H, - H, - H, - H, - H, - H, - H, - H, - H, - H - ]): HonoBase, S & ToSchema, I10, MergeTypedResponse>>, BasePath, MergePath>; - = any, I extends Input = BlankInput>(method: M, path: P, ...handlers: [H, I, R>, ...H, I, R>[]]): HonoBase, I, MergeTypedResponse>, BasePath, MergePath>; - , R extends HandlerResponse = any, I extends Input = BlankInput, E2 extends Env = E>(methods: M[], path: P, handler: H): HonoBase, S & ToSchema, I, MergeTypedResponse>, BasePath, MergePath>; - , R extends HandlerResponse = any, I extends Input = BlankInput, I2 extends Input = I, E2 extends Env = E, E3 extends Env = IntersectNonAnyTypes<[E, E2]>>(methods: M[], path: P, ...handlers: [H, H]): HonoBase, S & ToSchema, I2, MergeTypedResponse>, BasePath, MergePath>; - , R extends HandlerResponse = any, I extends Input = BlankInput, I2 extends Input = I, I3 extends Input = I & I2, E2 extends Env = E, E3 extends Env = IntersectNonAnyTypes<[E, E2]>, E4 extends Env = IntersectNonAnyTypes<[E, E2, E3]>>(methods: M[], path: P, ...handlers: [H, H, H]): HonoBase, S & ToSchema, I3, MergeTypedResponse>, BasePath, MergePath>; - , R extends HandlerResponse = any, I extends Input = BlankInput, I2 extends Input = I, I3 extends Input = I & I2, I4 extends Input = I & I2 & I3, E2 extends Env = E, E3 extends Env = IntersectNonAnyTypes<[E, E2]>, E4 extends Env = IntersectNonAnyTypes<[E, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4]>>(methods: M[], path: P, ...handlers: [ - H, - H, - H, - H - ]): HonoBase, S & ToSchema, I4, MergeTypedResponse>, BasePath, MergePath>; - , R extends HandlerResponse = any, I extends Input = BlankInput, I2 extends Input = I, I3 extends Input = I & I2, I4 extends Input = I & I2 & I3, I5 extends Input = I & I2 & I3 & I4, E2 extends Env = E, E3 extends Env = IntersectNonAnyTypes<[E, E2]>, E4 extends Env = IntersectNonAnyTypes<[E, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4]>, E6 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5]>>(methods: M[], path: P, ...handlers: [ - H, - H, - H, - H, - H - ]): HonoBase, S & ToSchema, I5, MergeTypedResponse>, BasePath, MergePath>; - , R extends HandlerResponse = any, I extends Input = BlankInput, I2 extends Input = I, I3 extends Input = I & I2, I4 extends Input = I & I2 & I3, I5 extends Input = I & I2 & I3 & I4, I6 extends Input = I & I2 & I3 & I4 & I5, E2 extends Env = E, E3 extends Env = IntersectNonAnyTypes<[E, E2]>, E4 extends Env = IntersectNonAnyTypes<[E, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4]>, E6 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5]>, E7 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6]>>(methods: M[], path: P, ...handlers: [ - H, - H, - H, - H, - H, - H - ]): HonoBase, S & ToSchema, I6, MergeTypedResponse>, BasePath, MergePath>; - , R extends HandlerResponse = any, I extends Input = BlankInput, I2 extends Input = I, I3 extends Input = I & I2, I4 extends Input = I & I2 & I3, I5 extends Input = I & I2 & I3 & I4, I6 extends Input = I & I2 & I3 & I4 & I5, I7 extends Input = I & I2 & I3 & I4 & I5 & I6, E2 extends Env = E, E3 extends Env = IntersectNonAnyTypes<[E, E2]>, E4 extends Env = IntersectNonAnyTypes<[E, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4]>, E6 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5]>, E7 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6]>, E8 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7]>>(methods: M[], path: P, ...handlers: [ - H, - H, - H, - H, - H, - H, - H - ]): HonoBase, S & ToSchema, I7, MergeTypedResponse>, BasePath, MergePath>; - , R extends HandlerResponse = any, I extends Input = BlankInput, I2 extends Input = I, I3 extends Input = I & I2, I4 extends Input = I & I2 & I3, I5 extends Input = I & I2 & I3 & I4, I6 extends Input = I & I2 & I3 & I4 & I5, I7 extends Input = I & I2 & I3 & I4 & I5 & I6, I8 extends Input = I & I2 & I3 & I4 & I5 & I6 & I7, E2 extends Env = E, E3 extends Env = IntersectNonAnyTypes<[E, E2]>, E4 extends Env = IntersectNonAnyTypes<[E, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4]>, E6 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5]>, E7 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6]>, E8 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7]>, E9 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7, E8]>>(methods: M[], path: P, ...handlers: [ - H, - H, - H, - H, - H, - H, - H, - H - ]): HonoBase, S & ToSchema, I8, MergeTypedResponse>, BasePath, MergePath>; - , R extends HandlerResponse = any, I extends Input = BlankInput, I2 extends Input = I, I3 extends Input = I & I2, I4 extends Input = I & I2 & I3, I5 extends Input = I & I2 & I3 & I4, I6 extends Input = I & I2 & I3 & I4 & I5, I7 extends Input = I & I2 & I3 & I4 & I5 & I6, I8 extends Input = I & I2 & I3 & I4 & I5 & I6 & I7, I9 extends Input = I & I2 & I3 & I4 & I5 & I6 & I7 & I8, E2 extends Env = E, E3 extends Env = IntersectNonAnyTypes<[E, E2]>, E4 extends Env = IntersectNonAnyTypes<[E, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4]>, E6 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5]>, E7 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6]>, E8 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7]>, E9 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7, E8]>, E10 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7, E8, E9]>>(methods: M[], path: P, ...handlers: [ - H, - H, - H, - H, - H, - H, - H, - H, - H - ]): HonoBase, S & ToSchema, I9, MergeTypedResponse>>, BasePath, MergePath>; - , R extends HandlerResponse = any, I extends Input = BlankInput, I2 extends Input = I, I3 extends Input = I & I2, I4 extends Input = I & I2 & I3, I5 extends Input = I & I2 & I3 & I4, I6 extends Input = I & I2 & I3 & I4 & I5, I7 extends Input = I & I2 & I3 & I4 & I5 & I6, I8 extends Input = I & I2 & I3 & I4 & I5 & I6 & I7, I9 extends Input = I & I2 & I3 & I4 & I5 & I6 & I7 & I8, I10 extends Input = I & I2 & I3 & I4 & I5 & I6 & I7 & I8 & I9, E2 extends Env = E, E3 extends Env = IntersectNonAnyTypes<[E, E2]>, E4 extends Env = IntersectNonAnyTypes<[E, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4]>, E6 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5]>, E7 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6]>, E8 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7]>, E9 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7, E8]>, E10 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7, E8, E9]>, E11 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7, E8, E9, E10]>>(methods: M[], path: P, ...handlers: [ - H, - H, - H, - H, - H, - H, - H, - H, - H, - H - ]): HonoBase, S & ToSchema, I10, MergeTypedResponse>>, BasePath, MergePath>; - = any, I extends Input = BlankInput>(methods: M[], path: P, ...handlers: [H, I, R>, ...H, I, R>[]]): HonoBase, I, MergeTypedResponse>, BasePath, MergePath>; - = any, E2 extends Env = E>(methods: M | M[], paths: Ps, ...handlers: H, I, R>[]): HonoBase, I, MergeTypedResponse>, BasePath, Ps extends [...string[], infer LastPath extends string] ? MergePath : never>; -} -export type ToSchema = IsAny extends true ? Simplify<{ - [K in P]: { - [K2 in M as AddDollar]: Simplify<{ - input: AddParam, P>; - } & { - output: {}; - outputFormat: ResponseFormat; - status: StatusCode; - }>; - }; -}> : [RorO] extends [never] ? {} : [RorO] extends [Promise] ? {} : Simplify<{ - [K in P]: { - [K2 in M as AddDollar]: Simplify<{ - input: AddParam, P>; - } & (RorO extends TypedResponse ? { - output: unknown extends T ? {} : T; - outputFormat: I extends { - outputFormat: string; - } ? I['outputFormat'] : F; - status: U; - } : { - output: unknown extends RorO ? {} : RorO; - outputFormat: unknown extends RorO ? 'json' : I extends { - outputFormat: string; - } ? I['outputFormat'] : 'json'; - status: StatusCode; - })>; - }; -}>; -export type Schema = { - [Path: string]: { - [Method: `$${Lowercase}`]: Endpoint; - }; -}; -type AddSchemaIfHasResponse = [Merged] extends [Promise] ? S : S & ToSchema, I, Merged>; -export type Endpoint = { - input: any; - output: any; - outputFormat: ResponseFormat; - status: StatusCode; -}; -type ExtractParams = string extends Path ? Record : Path extends `${infer _Start}:${infer Param}/${infer Rest}` ? { - [K in Param | keyof ExtractParams<`/${Rest}`>]: string; -} : Path extends `${infer _Start}:${infer Param}` ? { - [K in Param]: string; -} : never; -type FlattenIfIntersect = T extends infer O ? { - [K in keyof O]: O[K]; -} : never; -export type MergeSchemaPath = { - [P in keyof OrigSchema as MergePath]: [OrigSchema[P]] extends [ - Record - ] ? { - [M in keyof OrigSchema[P]]: MergeEndpointParamsWithPath; - } : never; -}; -type MergeEndpointParamsWithPath = T extends unknown ? { - input: T['input'] extends { - param: infer _; - } ? ExtractParams extends never ? T['input'] : FlattenIfIntersect as K extends `${infer Prefix}{${infer _}}` ? Prefix : K]: string; - }; - }> : RemoveBlankRecord> extends never ? T['input'] : T['input'] & { - param: { - [K in keyof ExtractParams as K extends `${infer Prefix}{${infer _}}` ? Prefix : K]: string; - }; - }; - output: T['output']; - outputFormat: T['outputFormat']; - status: T['status']; -} : never; -export type AddParam = ParamKeys

extends never ? I : I extends { - param: infer _; -} ? I : I & { - param: UnionToIntersection>>; -}; -type AddDollar = `$${Lowercase}`; -export type MergePath = B extends '' ? MergePath : A extends '' ? B : A extends '/' ? B : A extends `${infer P}/` ? B extends `/${infer Q}` ? `${P}/${Q}` : `${P}/${B}` : B extends `/${infer Q}` ? Q extends '' ? A : `${A}/${Q}` : `${A}/${B}`; -export type KnownResponseFormat = 'json' | 'text' | 'redirect'; -export type ResponseFormat = KnownResponseFormat | string; -export type TypedResponse = { - _data: T; - _status: U; - _format: F; -}; -type MergeTypedResponse = T extends Promise ? T : T extends Promise ? T2 extends TypedResponse ? T2 : TypedResponse : T extends TypedResponse ? T : TypedResponse; -type MergeTypedResponseStrict = T extends Promise ? T2 extends TypedResponse ? T2 : never : T extends TypedResponse ? T : never; -type MergeMiddlewareResponse = MergeTypedResponseStrict>; -export type FormValue = string | Blob; -export type ParsedFormValue = string | File; -export type ValidationTargets = { - json: any; - form: Record; - query: Record; - param: Record; - header: Record; - cookie: Record; -}; -type ParamKey = Component extends `:${infer NameWithPattern}` ? NameWithPattern extends `${infer Name}{${infer Rest}` ? Rest extends `${infer _Pattern}?` ? `${Name}?` : Name : NameWithPattern : never; -export type ParamKeys = Path extends `${infer Component}/${infer Rest}` ? ParamKey | ParamKeys : ParamKey; -export type ParamKeyToRecord = T extends `${infer R}?` ? Record : { - [K in T]: string; -}; -export type InputToDataByTarget = T extends { - [K in Target]: infer R; -} ? R : never; -export type RemoveQuestion = T extends `${infer R}?` ? R : T; -export type ExtractSchema = UnionToIntersection ? S : never>; -export type ExtractSchemaForStatusCode = { - [Path in keyof ExtractSchema]: { - [Method in keyof ExtractSchema[Path]]: Extract[Path][Method], { - status: Status; - }>; - }; -}; -export type ExtractHandlerResponse = T extends (c: any, next: any) => Promise ? Exclude extends never ? never : Exclude extends Response | TypedResponse ? Exclude : never : T extends (c: any, next: any) => infer R ? R extends Response | TypedResponse ? R : never : never; -type ProcessHead = IfAnyThenEmptyObject; -export type IntersectNonAnyTypes = T extends [infer Head, ...infer Rest] ? ProcessHead & IntersectNonAnyTypes : {}; -export declare abstract class FetchEventLike { - abstract readonly request: Request; - abstract respondWith(promise: Response | Promise): void; - abstract passThroughOnException(): void; - abstract waitUntil(promise: Promise): void; -} -export {}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/utils/accept.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/utils/accept.d.ts deleted file mode 100644 index 75c37e8..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/utils/accept.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -export interface Accept { - type: string; - params: Record; - q: number; -} -/** - * Parse an Accept header into an array of objects with type, parameters, and quality score. - * @param acceptHeader The Accept header string - * @returns An array of parsed Accept values - */ -export declare const parseAccept: (acceptHeader: string) => Accept[]; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/utils/basic-auth.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/utils/basic-auth.d.ts deleted file mode 100644 index 4741a4e..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/utils/basic-auth.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export type Auth = (req: Request) => { - username: string; - password: string; -} | undefined; -export declare const auth: Auth; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/utils/body.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/utils/body.d.ts deleted file mode 100644 index 5c37a1f..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/utils/body.d.ts +++ /dev/null @@ -1,79 +0,0 @@ -/** - * @module - * Body utility. - */ -import { HonoRequest } from '../request'; -type BodyDataValueDot = { - [x: string]: string | File | BodyDataValueDot; -}; -type BodyDataValueDotAll = { - [x: string]: string | File | (string | File)[] | BodyDataValueDotAll; -}; -type SimplifyBodyData = { - [K in keyof T]: string | File | (string | File)[] | BodyDataValueDotAll extends T[K] ? string | File | (string | File)[] | BodyDataValueDotAll : string | File | BodyDataValueDot extends T[K] ? string | File | BodyDataValueDot : string | File | (string | File)[] extends T[K] ? string | File | (string | File)[] : string | File; -} & {}; -type BodyDataValueComponent = string | File | (T extends { - all: false; -} ? never : T extends { - all: true; -} | { - all: boolean; -} ? (string | File)[] : never); -type BodyDataValueObject = { - [key: string]: BodyDataValueComponent | BodyDataValueObject; -}; -type BodyDataValue = BodyDataValueComponent | (T extends { - dot: false; -} ? never : T extends { - dot: true; -} | { - dot: boolean; -} ? BodyDataValueObject : never); -export type BodyData = {}> = SimplifyBodyData>>; -export type ParseBodyOptions = { - /** - * Determines whether all fields with multiple values should be parsed as arrays. - * @default false - * @example - * const data = new FormData() - * data.append('file', 'aaa') - * data.append('file', 'bbb') - * data.append('message', 'hello') - * - * If all is false: - * parseBody should return { file: 'bbb', message: 'hello' } - * - * If all is true: - * parseBody should return { file: ['aaa', 'bbb'], message: 'hello' } - */ - all: boolean; - /** - * Determines whether all fields with dot notation should be parsed as nested objects. - * @default false - * @example - * const data = new FormData() - * data.append('obj.key1', 'value1') - * data.append('obj.key2', 'value2') - * - * If dot is false: - * parseBody should return { 'obj.key1': 'value1', 'obj.key2': 'value2' } - * - * If dot is true: - * parseBody should return { obj: { key1: 'value1', key2: 'value2' } } - */ - dot: boolean; -}; -/** - * Parses the body of a request based on the provided options. - * - * @template T - The type of the parsed body data. - * @param {HonoRequest | Request} request - The request object to parse. - * @param {Partial} [options] - Options for parsing the body. - * @returns {Promise} The parsed body data. - */ -interface ParseBody { - , T extends BodyData>(request: HonoRequest | Request, options?: Options): Promise; - (request: HonoRequest | Request, options?: Partial): Promise; -} -export declare const parseBody: ParseBody; -export {}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/utils/buffer.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/utils/buffer.d.ts deleted file mode 100644 index 71396bc..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/utils/buffer.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -/** - * @module - * Buffer utility. - */ -export declare const equal: (a: ArrayBuffer, b: ArrayBuffer) => boolean; -export declare const timingSafeEqual: (a: string | object | boolean, b: string | object | boolean, hashFunction?: Function) => Promise; -export declare const bufferToString: (buffer: ArrayBuffer) => string; -export declare const bufferToFormData: (arrayBuffer: ArrayBuffer, contentType: string) => Promise; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/utils/color.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/utils/color.d.ts deleted file mode 100644 index f57d739..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/utils/color.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * @module - * Color utility. - */ -/** - * Get whether color change on terminal is enabled or disabled. - * If `NO_COLOR` environment variable is set, this function returns `false`. - * Unlike getColorEnabledAsync(), this cannot check Cloudflare environment variables. - * @see {@link https://no-color.org/} - * - * @returns {boolean} - */ -export declare function getColorEnabled(): boolean; -/** - * Get whether color change on terminal is enabled or disabled. - * If `NO_COLOR` environment variable is set, this function returns `false`. - * @see {@link https://no-color.org/} - * - * @returns {boolean} - */ -export declare function getColorEnabledAsync(): Promise; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/utils/compress.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/utils/compress.d.ts deleted file mode 100644 index 01666b8..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/utils/compress.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -/** - * @module - * Constants for compression. - */ -/** - * Match for compressible content type. - */ -export declare const COMPRESSIBLE_CONTENT_TYPE_REGEX: RegExp; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/utils/concurrent.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/utils/concurrent.d.ts deleted file mode 100644 index 24abe69..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/utils/concurrent.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -/** - * @module - * Concurrent utility. - */ -export interface Pool { - run(fn: () => T): Promise; -} -export declare const createPool: ({ concurrency, interval, }?: { - concurrency?: number; - interval?: number; -}) => Pool; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/utils/constants.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/utils/constants.d.ts deleted file mode 100644 index 733c0ef..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/utils/constants.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -/** - * Constant used to mark a composed handler. - */ -export declare const COMPOSED_HANDLER = "__COMPOSED_HANDLER"; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/utils/cookie.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/utils/cookie.d.ts deleted file mode 100644 index d6f75f9..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/utils/cookie.d.ts +++ /dev/null @@ -1,40 +0,0 @@ -/** - * @module - * Cookie utility. - */ -export type Cookie = Record; -export type SignedCookie = Record; -type PartitionedCookieConstraint = { - partitioned: true; - secure: true; -} | { - partitioned?: boolean; - secure?: boolean; -}; -type SecureCookieConstraint = { - secure: true; -}; -type HostCookieConstraint = { - secure: true; - path: '/'; - domain?: undefined; -}; -export type CookieOptions = { - domain?: string; - expires?: Date; - httpOnly?: boolean; - maxAge?: number; - path?: string; - secure?: boolean; - sameSite?: 'Strict' | 'Lax' | 'None' | 'strict' | 'lax' | 'none'; - partitioned?: boolean; - priority?: 'Low' | 'Medium' | 'High' | 'low' | 'medium' | 'high'; - prefix?: CookiePrefixOptions; -} & PartitionedCookieConstraint; -export type CookiePrefixOptions = 'host' | 'secure'; -export type CookieConstraint = Name extends `__Secure-${string}` ? CookieOptions & SecureCookieConstraint : Name extends `__Host-${string}` ? CookieOptions & HostCookieConstraint : CookieOptions; -export declare const parse: (cookie: string, name?: string) => Cookie; -export declare const parseSigned: (cookie: string, secret: string | BufferSource, name?: string) => Promise; -export declare const serialize: (name: Name, value: string, opt?: CookieConstraint) => string; -export declare const serializeSigned: (name: string, value: string, secret: string | BufferSource, opt?: CookieOptions) => Promise; -export {}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/utils/crypto.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/utils/crypto.d.ts deleted file mode 100644 index 5974286..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/utils/crypto.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -/** - * @module - * Crypto utility. - */ -import type { JSONValue } from './types'; -type Algorithm = { - name: string; - alias: string; -}; -type Data = string | boolean | number | JSONValue | ArrayBufferView | ArrayBuffer; -export declare const sha256: (data: Data) => Promise; -export declare const sha1: (data: Data) => Promise; -export declare const md5: (data: Data) => Promise; -export declare const createHash: (data: Data, algorithm: Algorithm) => Promise; -export {}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/utils/encode.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/utils/encode.d.ts deleted file mode 100644 index c60d6e7..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/utils/encode.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -/** - * @module - * Encode utility. - */ -export declare const decodeBase64Url: (str: string) => Uint8Array; -export declare const encodeBase64Url: (buf: ArrayBufferLike) => string; -export declare const encodeBase64: (buf: ArrayBufferLike) => string; -export declare const decodeBase64: (str: string) => Uint8Array; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/utils/filepath.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/utils/filepath.d.ts deleted file mode 100644 index b266925..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/utils/filepath.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -/** - * @module - * FilePath utility. - */ -type FilePathOptions = { - filename: string; - root?: string; - defaultDocument?: string; -}; -export declare const getFilePath: (options: FilePathOptions) => string | undefined; -export declare const getFilePathWithoutDefaultDocument: (options: Omit) => string | undefined; -export {}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/utils/handler.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/utils/handler.d.ts deleted file mode 100644 index 6b593c5..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/utils/handler.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -/** - * @module - * Handler utility. - */ -export declare const isMiddleware: (handler: Function) => boolean; -export declare const findTargetHandler: (handler: Function) => Function; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/utils/headers.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/utils/headers.d.ts deleted file mode 100644 index 0c1bc9c..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/utils/headers.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -/** - * @module - * HTTP Headers utility. - */ -export type RequestHeader = 'A-IM' | 'Accept' | 'Accept-Additions' | 'Accept-CH' | 'Accept-Charset' | 'Accept-Datetime' | 'Accept-Encoding' | 'Accept-Features' | 'Accept-Language' | 'Accept-Patch' | 'Accept-Post' | 'Accept-Ranges' | 'Accept-Signature' | 'Access-Control' | 'Access-Control-Allow-Credentials' | 'Access-Control-Allow-Headers' | 'Access-Control-Allow-Methods' | 'Access-Control-Allow-Origin' | 'Access-Control-Expose-Headers' | 'Access-Control-Max-Age' | 'Access-Control-Request-Headers' | 'Access-Control-Request-Method' | 'Age' | 'Allow' | 'ALPN' | 'Alt-Svc' | 'Alt-Used' | 'Alternates' | 'AMP-Cache-Transform' | 'Apply-To-Redirect-Ref' | 'Authentication-Control' | 'Authentication-Info' | 'Authorization' | 'Available-Dictionary' | 'C-Ext' | 'C-Man' | 'C-Opt' | 'C-PEP' | 'C-PEP-Info' | 'Cache-Control' | 'Cache-Status' | 'Cal-Managed-ID' | 'CalDAV-Timezones' | 'Capsule-Protocol' | 'CDN-Cache-Control' | 'CDN-Loop' | 'Cert-Not-After' | 'Cert-Not-Before' | 'Clear-Site-Data' | 'Client-Cert' | 'Client-Cert-Chain' | 'Close' | 'CMCD-Object' | 'CMCD-Request' | 'CMCD-Session' | 'CMCD-Status' | 'CMSD-Dynamic' | 'CMSD-Static' | 'Concealed-Auth-Export' | 'Configuration-Context' | 'Connection' | 'Content-Base' | 'Content-Digest' | 'Content-Disposition' | 'Content-Encoding' | 'Content-ID' | 'Content-Language' | 'Content-Length' | 'Content-Location' | 'Content-MD5' | 'Content-Range' | 'Content-Script-Type' | 'Content-Security-Policy' | 'Content-Security-Policy-Report-Only' | 'Content-Style-Type' | 'Content-Type' | 'Content-Version' | 'Cookie' | 'Cookie2' | 'Cross-Origin-Embedder-Policy' | 'Cross-Origin-Embedder-Policy-Report-Only' | 'Cross-Origin-Opener-Policy' | 'Cross-Origin-Opener-Policy-Report-Only' | 'Cross-Origin-Resource-Policy' | 'CTA-Common-Access-Token' | 'DASL' | 'Date' | 'DAV' | 'Default-Style' | 'Delta-Base' | 'Deprecation' | 'Depth' | 'Derived-From' | 'Destination' | 'Differential-ID' | 'Dictionary-ID' | 'Digest' | 'DPoP' | 'DPoP-Nonce' | 'Early-Data' | 'EDIINT-Features' | 'ETag' | 'Expect' | 'Expect-CT' | 'Expires' | 'Ext' | 'Forwarded' | 'From' | 'GetProfile' | 'Hobareg' | 'Host' | 'HTTP2-Settings' | 'If' | 'If-Match' | 'If-Modified-Since' | 'If-None-Match' | 'If-Range' | 'If-Schedule-Tag-Match' | 'If-Unmodified-Since' | 'IM' | 'Include-Referred-Token-Binding-ID' | 'Isolation' | 'Keep-Alive' | 'Label' | 'Last-Event-ID' | 'Last-Modified' | 'Link' | 'Link-Template' | 'Location' | 'Lock-Token' | 'Man' | 'Max-Forwards' | 'Memento-Datetime' | 'Meter' | 'Method-Check' | 'Method-Check-Expires' | 'MIME-Version' | 'Negotiate' | 'NEL' | 'OData-EntityId' | 'OData-Isolation' | 'OData-MaxVersion' | 'OData-Version' | 'Opt' | 'Optional-WWW-Authenticate' | 'Ordering-Type' | 'Origin' | 'Origin-Agent-Cluster' | 'OSCORE' | 'OSLC-Core-Version' | 'Overwrite' | 'P3P' | 'PEP' | 'PEP-Info' | 'Permissions-Policy' | 'PICS-Label' | 'Ping-From' | 'Ping-To' | 'Position' | 'Pragma' | 'Prefer' | 'Preference-Applied' | 'Priority' | 'ProfileObject' | 'Protocol' | 'Protocol-Info' | 'Protocol-Query' | 'Protocol-Request' | 'Proxy-Authenticate' | 'Proxy-Authentication-Info' | 'Proxy-Authorization' | 'Proxy-Features' | 'Proxy-Instruction' | 'Proxy-Status' | 'Public' | 'Public-Key-Pins' | 'Public-Key-Pins-Report-Only' | 'Range' | 'Redirect-Ref' | 'Referer' | 'Referer-Root' | 'Referrer-Policy' | 'Refresh' | 'Repeatability-Client-ID' | 'Repeatability-First-Sent' | 'Repeatability-Request-ID' | 'Repeatability-Result' | 'Replay-Nonce' | 'Reporting-Endpoints' | 'Repr-Digest' | 'Retry-After' | 'Safe' | 'Schedule-Reply' | 'Schedule-Tag' | 'Sec-GPC' | 'Sec-Purpose' | 'Sec-Token-Binding' | 'Sec-WebSocket-Accept' | 'Sec-WebSocket-Extensions' | 'Sec-WebSocket-Key' | 'Sec-WebSocket-Protocol' | 'Sec-WebSocket-Version' | 'Security-Scheme' | 'Server' | 'Server-Timing' | 'Set-Cookie' | 'Set-Cookie2' | 'SetProfile' | 'Signature' | 'Signature-Input' | 'SLUG' | 'SoapAction' | 'Status-URI' | 'Strict-Transport-Security' | 'Sunset' | 'Surrogate-Capability' | 'Surrogate-Control' | 'TCN' | 'TE' | 'Timeout' | 'Timing-Allow-Origin' | 'Topic' | 'Traceparent' | 'Tracestate' | 'Trailer' | 'Transfer-Encoding' | 'TTL' | 'Upgrade' | 'Urgency' | 'URI' | 'Use-As-Dictionary' | 'User-Agent' | 'Variant-Vary' | 'Vary' | 'Via' | 'Want-Content-Digest' | 'Want-Digest' | 'Want-Repr-Digest' | 'Warning' | 'WWW-Authenticate' | 'X-Content-Type-Options' | 'X-Frame-Options'; -export type ResponseHeader = 'Access-Control-Allow-Credentials' | 'Access-Control-Allow-Headers' | 'Access-Control-Allow-Methods' | 'Access-Control-Allow-Origin' | 'Access-Control-Expose-Headers' | 'Access-Control-Max-Age' | 'Age' | 'Allow' | 'Cache-Control' | 'Clear-Site-Data' | 'Content-Disposition' | 'Content-Encoding' | 'Content-Language' | 'Content-Length' | 'Content-Location' | 'Content-Range' | 'Content-Security-Policy' | 'Content-Security-Policy-Report-Only' | 'Content-Type' | 'Cookie' | 'Cross-Origin-Embedder-Policy' | 'Cross-Origin-Opener-Policy' | 'Cross-Origin-Resource-Policy' | 'Date' | 'ETag' | 'Expires' | 'Last-Modified' | 'Location' | 'Permissions-Policy' | 'Pragma' | 'Retry-After' | 'Save-Data' | 'Sec-CH-Prefers-Color-Scheme' | 'Sec-CH-Prefers-Reduced-Motion' | 'Sec-CH-UA' | 'Sec-CH-UA-Arch' | 'Sec-CH-UA-Bitness' | 'Sec-CH-UA-Form-Factor' | 'Sec-CH-UA-Full-Version' | 'Sec-CH-UA-Full-Version-List' | 'Sec-CH-UA-Mobile' | 'Sec-CH-UA-Model' | 'Sec-CH-UA-Platform' | 'Sec-CH-UA-Platform-Version' | 'Sec-CH-UA-WoW64' | 'Sec-Fetch-Dest' | 'Sec-Fetch-Mode' | 'Sec-Fetch-Site' | 'Sec-Fetch-User' | 'Sec-GPC' | 'Server' | 'Server-Timing' | 'Service-Worker-Navigation-Preload' | 'Set-Cookie' | 'Strict-Transport-Security' | 'Timing-Allow-Origin' | 'Trailer' | 'Transfer-Encoding' | 'Upgrade' | 'Vary' | 'WWW-Authenticate' | 'Warning' | 'X-Content-Type-Options' | 'X-DNS-Prefetch-Control' | 'X-Frame-Options' | 'X-Permitted-Cross-Domain-Policies' | 'X-Powered-By' | 'X-Robots-Tag' | 'X-XSS-Protection'; -export type AcceptHeader = 'Accept' | 'Accept-Charset' | 'Accept-Encoding' | 'Accept-Language' | 'Accept-Patch' | 'Accept-Post' | 'Accept-Ranges'; -export type CustomHeader = string & {}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/utils/html.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/utils/html.d.ts deleted file mode 100644 index 35475cb..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/utils/html.d.ts +++ /dev/null @@ -1,44 +0,0 @@ -/** - * @module - * HTML utility. - */ -export declare const HtmlEscapedCallbackPhase: { - readonly Stringify: 1; - readonly BeforeStream: 2; - readonly Stream: 3; -}; -type HtmlEscapedCallbackOpts = { - buffer?: [string]; - phase: (typeof HtmlEscapedCallbackPhase)[keyof typeof HtmlEscapedCallbackPhase]; - context: Readonly; -}; -export type HtmlEscapedCallback = (opts: HtmlEscapedCallbackOpts) => Promise | undefined; -export type HtmlEscaped = { - isEscaped: true; - callbacks?: HtmlEscapedCallback[]; -}; -export type HtmlEscapedString = string & HtmlEscaped; -/** - * StringBuffer contains string and Promise alternately - * The length of the array will be odd, the odd numbered element will be a string, - * and the even numbered element will be a Promise. - * When concatenating into a single string, it must be processed from the tail. - * @example - * [ - * 'framework.', - * Promise.resolve('ultra fast'), - * 'a ', - * Promise.resolve('is '), - * 'Hono', - * ] - */ -export type StringBuffer = (string | Promise)[]; -export type StringBufferWithCallbacks = StringBuffer & { - callbacks: HtmlEscapedCallback[]; -}; -export declare const raw: (value: unknown, callbacks?: HtmlEscapedCallback[]) => HtmlEscapedString; -export declare const stringBufferToString: (buffer: StringBuffer, callbacks: HtmlEscapedCallback[] | undefined) => Promise; -export declare const escapeToBuffer: (str: string, buffer: StringBuffer) => void; -export declare const resolveCallbackSync: (str: string | HtmlEscapedString) => string; -export declare const resolveCallback: (str: string | HtmlEscapedString | Promise, phase: (typeof HtmlEscapedCallbackPhase)[keyof typeof HtmlEscapedCallbackPhase], preserveCallbacks: boolean, context: object, buffer?: [string]) => Promise; -export {}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/utils/http-status.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/utils/http-status.d.ts deleted file mode 100644 index f0cb67c..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/utils/http-status.d.ts +++ /dev/null @@ -1,32 +0,0 @@ -/** - * @module - * HTTP Status utility. - */ -export type InfoStatusCode = 100 | 101 | 102 | 103; -export type SuccessStatusCode = 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 226; -export type DeprecatedStatusCode = 305 | 306; -export type RedirectStatusCode = 300 | 301 | 302 | 303 | 304 | DeprecatedStatusCode | 307 | 308; -export type ClientErrorStatusCode = 400 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 421 | 422 | 423 | 424 | 425 | 426 | 428 | 429 | 431 | 451; -export type ServerErrorStatusCode = 500 | 501 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 510 | 511; -/** - * `UnofficialStatusCode` can be used to specify an unofficial status code. - * @example - * - * ```ts - * app.get('/unknown', (c) => { - * return c.text("Unknown Error", 520 as UnofficialStatusCode) - * }) - * ``` - */ -export type UnofficialStatusCode = -1; -/** - * @deprecated - * Use `UnofficialStatusCode` instead. - */ -export type UnOfficalStatusCode = UnofficialStatusCode; -/** - * If you want to use an unofficial status, use `UnofficialStatusCode`. - */ -export type StatusCode = InfoStatusCode | SuccessStatusCode | RedirectStatusCode | ClientErrorStatusCode | ServerErrorStatusCode | UnofficialStatusCode; -export type ContentlessStatusCode = 101 | 204 | 205 | 304; -export type ContentfulStatusCode = Exclude; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/utils/ipaddr.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/utils/ipaddr.d.ts deleted file mode 100644 index ae97e71..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/utils/ipaddr.d.ts +++ /dev/null @@ -1,40 +0,0 @@ -/** - * Utils for IP Addresses - * @module - */ -import type { AddressType } from '../helper/conninfo'; -/** - * Expand IPv6 Address - * @param ipV6 Shorten IPv6 Address - * @return expanded IPv6 Address - */ -export declare const expandIPv6: (ipV6: string) => string; -/** - * Distinct Remote Addr - * @param remoteAddr Remote Addr - */ -export declare const distinctRemoteAddr: (remoteAddr: string) => AddressType; -/** - * Convert IPv4 to Uint8Array - * @param ipv4 IPv4 Address - * @returns BigInt - */ -export declare const convertIPv4ToBinary: (ipv4: string) => bigint; -/** - * Convert IPv6 to Uint8Array - * @param ipv6 IPv6 Address - * @returns BigInt - */ -export declare const convertIPv6ToBinary: (ipv6: string) => bigint; -/** - * Convert a binary representation of an IPv4 address to a string. - * @param ipV4 binary IPv4 Address - * @return IPv4 Address in string - */ -export declare const convertIPv4BinaryToString: (ipV4: bigint) => string; -/** - * Convert a binary representation of an IPv6 address to a string. - * @param ipV6 binary IPv6 Address - * @return normalized IPv6 Address in string - */ -export declare const convertIPv6BinaryToString: (ipV6: bigint) => string; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/utils/jwt/index.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/utils/jwt/index.d.ts deleted file mode 100644 index e9e7290..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/utils/jwt/index.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * @module - * JWT utility. - */ -export declare const Jwt: { - sign: (payload: import("./types").JWTPayload, privateKey: import("./jws").SignatureKey, alg?: import("./jwa").SignatureAlgorithm) => Promise; - verify: (token: string, publicKey: import("./jws").SignatureKey, algOrOptions?: import("./jwa").SignatureAlgorithm | import("./jwt").VerifyOptionsWithAlg) => Promise; - decode: (token: string) => { - header: import("./jwt").TokenHeader; - payload: import("./types").JWTPayload; - }; - verifyWithJwks: (token: string, options: { - keys?: import("./jws").HonoJsonWebKey[]; - jwks_uri?: string; - verification?: import("./jwt").VerifyOptions; - }, init?: RequestInit) => Promise; -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/utils/jwt/jwa.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/utils/jwt/jwa.d.ts deleted file mode 100644 index a170e64..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/utils/jwt/jwa.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * @module - * JSON Web Algorithms (JWA) - * https://datatracker.ietf.org/doc/html/rfc7518 - */ -export declare enum AlgorithmTypes { - HS256 = "HS256", - HS384 = "HS384", - HS512 = "HS512", - RS256 = "RS256", - RS384 = "RS384", - RS512 = "RS512", - PS256 = "PS256", - PS384 = "PS384", - PS512 = "PS512", - ES256 = "ES256", - ES384 = "ES384", - ES512 = "ES512", - EdDSA = "EdDSA" -} -export type SignatureAlgorithm = keyof typeof AlgorithmTypes; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/utils/jwt/jws.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/utils/jwt/jws.d.ts deleted file mode 100644 index 63605f6..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/utils/jwt/jws.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -/** - * @module - * JSON Web Signature (JWS) - * https://datatracker.ietf.org/doc/html/rfc7515 - */ -import type { SignatureAlgorithm } from './jwa'; -export interface HonoJsonWebKey extends JsonWebKey { - kid?: string; -} -export type SignatureKey = string | HonoJsonWebKey | CryptoKey; -export declare function signing(privateKey: SignatureKey, alg: SignatureAlgorithm, data: BufferSource): Promise; -export declare function verifying(publicKey: SignatureKey, alg: SignatureAlgorithm, signature: BufferSource, data: BufferSource): Promise; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/utils/jwt/jwt.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/utils/jwt/jwt.d.ts deleted file mode 100644 index 50c97e4..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/utils/jwt/jwt.d.ts +++ /dev/null @@ -1,42 +0,0 @@ -/** - * @module - * JSON Web Token (JWT) - * https://datatracker.ietf.org/doc/html/rfc7519 - */ -import type { SignatureAlgorithm } from './jwa'; -import type { HonoJsonWebKey, SignatureKey } from './jws'; -import type { JWTPayload } from './types'; -export interface TokenHeader { - alg: SignatureAlgorithm; - typ?: 'JWT'; - kid?: string; -} -export declare function isTokenHeader(obj: unknown): obj is TokenHeader; -export declare const sign: (payload: JWTPayload, privateKey: SignatureKey, alg?: SignatureAlgorithm) => Promise; -export type VerifyOptions = { - /** The expected issuer used for verifying the token */ - iss?: string | RegExp; - /** Verify the `nbf` claim (default: `true`) */ - nbf?: boolean; - /** Verify the `exp` claim (default: `true`) */ - exp?: boolean; - /** Verify the `iat` claim (default: `true`) */ - iat?: boolean; - /** Acceptable audience(s) for the token */ - aud?: string | string[] | RegExp; -}; -export type VerifyOptionsWithAlg = { - /** The algorithm used for decoding the token */ - alg?: SignatureAlgorithm; -} & VerifyOptions; -export declare const verify: (token: string, publicKey: SignatureKey, algOrOptions?: SignatureAlgorithm | VerifyOptionsWithAlg) => Promise; -export declare const verifyWithJwks: (token: string, options: { - keys?: HonoJsonWebKey[]; - jwks_uri?: string; - verification?: VerifyOptions; -}, init?: RequestInit) => Promise; -export declare const decode: (token: string) => { - header: TokenHeader; - payload: JWTPayload; -}; -export declare const decodeHeader: (token: string) => TokenHeader; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/utils/jwt/types.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/utils/jwt/types.d.ts deleted file mode 100644 index 9923f74..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/utils/jwt/types.d.ts +++ /dev/null @@ -1,74 +0,0 @@ -/** - * @module - * Type definitions for JWT utilities. - */ -export declare class JwtAlgorithmNotImplemented extends Error { - constructor(alg: string); -} -export declare class JwtTokenInvalid extends Error { - constructor(token: string); -} -export declare class JwtTokenNotBefore extends Error { - constructor(token: string); -} -export declare class JwtTokenExpired extends Error { - constructor(token: string); -} -export declare class JwtTokenIssuedAt extends Error { - constructor(currentTimestamp: number, iat: number); -} -export declare class JwtTokenIssuer extends Error { - constructor(expected: string | RegExp, iss: string | null); -} -export declare class JwtHeaderInvalid extends Error { - constructor(header: object); -} -export declare class JwtHeaderRequiresKid extends Error { - constructor(header: object); -} -export declare class JwtTokenSignatureMismatched extends Error { - constructor(token: string); -} -export declare class JwtPayloadRequiresAud extends Error { - constructor(payload: object); -} -export declare class JwtTokenAudience extends Error { - constructor(expected: string | string[] | RegExp, aud: string | string[]); -} -export declare enum CryptoKeyUsage { - Encrypt = "encrypt", - Decrypt = "decrypt", - Sign = "sign", - Verify = "verify", - DeriveKey = "deriveKey", - DeriveBits = "deriveBits", - WrapKey = "wrapKey", - UnwrapKey = "unwrapKey" -} -/** - * JWT Payload - */ -export type JWTPayload = { - [key: string]: unknown; - /** - * The token is checked to ensure it has not expired. - */ - exp?: number; - /** - * The token is checked to ensure it is not being used before a specified time. - */ - nbf?: number; - /** - * The token is checked to ensure it is not issued in the future. - */ - iat?: number; - /** - * The token is checked to ensure it has been issued by a trusted issuer. - */ - iss?: string; - /** - * The token is checked to ensure it is intended for a specific audience. - */ - aud?: string | string[]; -}; -export type { HonoJsonWebKey } from './jws'; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/utils/jwt/utf8.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/utils/jwt/utf8.d.ts deleted file mode 100644 index ff9fc1c..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/utils/jwt/utf8.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -/** - * @module - * Functions for encoding/decoding UTF8. - */ -export declare const utf8Encoder: TextEncoder; -export declare const utf8Decoder: TextDecoder; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/utils/mime.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/utils/mime.d.ts deleted file mode 100644 index b83bcec..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/utils/mime.d.ts +++ /dev/null @@ -1,70 +0,0 @@ -/** - * @module - * MIME utility. - */ -export declare const getMimeType: (filename: string, mimes?: Record) => string | undefined; -export declare const getExtension: (mimeType: string) => string | undefined; -export { baseMimes as mimes }; -/** - * Union types for BaseMime - */ -export type BaseMime = (typeof _baseMimes)[keyof typeof _baseMimes]; -declare const _baseMimes: { - readonly aac: "audio/aac"; - readonly avi: "video/x-msvideo"; - readonly avif: "image/avif"; - readonly av1: "video/av1"; - readonly bin: "application/octet-stream"; - readonly bmp: "image/bmp"; - readonly css: "text/css"; - readonly csv: "text/csv"; - readonly eot: "application/vnd.ms-fontobject"; - readonly epub: "application/epub+zip"; - readonly gif: "image/gif"; - readonly gz: "application/gzip"; - readonly htm: "text/html"; - readonly html: "text/html"; - readonly ico: "image/x-icon"; - readonly ics: "text/calendar"; - readonly jpeg: "image/jpeg"; - readonly jpg: "image/jpeg"; - readonly js: "text/javascript"; - readonly json: "application/json"; - readonly jsonld: "application/ld+json"; - readonly map: "application/json"; - readonly mid: "audio/x-midi"; - readonly midi: "audio/x-midi"; - readonly mjs: "text/javascript"; - readonly mp3: "audio/mpeg"; - readonly mp4: "video/mp4"; - readonly mpeg: "video/mpeg"; - readonly oga: "audio/ogg"; - readonly ogv: "video/ogg"; - readonly ogx: "application/ogg"; - readonly opus: "audio/opus"; - readonly otf: "font/otf"; - readonly pdf: "application/pdf"; - readonly png: "image/png"; - readonly rtf: "application/rtf"; - readonly svg: "image/svg+xml"; - readonly tif: "image/tiff"; - readonly tiff: "image/tiff"; - readonly ts: "video/mp2t"; - readonly ttf: "font/ttf"; - readonly txt: "text/plain"; - readonly wasm: "application/wasm"; - readonly webm: "video/webm"; - readonly weba: "audio/webm"; - readonly webmanifest: "application/manifest+json"; - readonly webp: "image/webp"; - readonly woff: "font/woff"; - readonly woff2: "font/woff2"; - readonly xhtml: "application/xhtml+xml"; - readonly xml: "application/xml"; - readonly zip: "application/zip"; - readonly '3gp': "video/3gpp"; - readonly '3g2': "video/3gpp2"; - readonly gltf: "model/gltf+json"; - readonly glb: "model/gltf-binary"; -}; -declare const baseMimes: Record; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/utils/stream.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/utils/stream.d.ts deleted file mode 100644 index 51c46e6..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/utils/stream.d.ts +++ /dev/null @@ -1,31 +0,0 @@ -/** - * @module - * Stream utility. - */ -export declare class StreamingApi { - private writer; - private encoder; - private writable; - private abortSubscribers; - responseReadable: ReadableStream; - /** - * Whether the stream has been aborted. - */ - aborted: boolean; - /** - * Whether the stream has been closed normally. - */ - closed: boolean; - constructor(writable: WritableStream, _readable: ReadableStream); - write(input: Uint8Array | string): Promise; - writeln(input: string): Promise; - sleep(ms: number): Promise; - close(): Promise; - pipe(body: ReadableStream): Promise; - onAbort(listener: () => void | Promise): void; - /** - * Abort the stream. - * You can call this method when stream is aborted by external event. - */ - abort(): void; -} diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/utils/types.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/utils/types.d.ts deleted file mode 100644 index 8dce20d..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/utils/types.d.ts +++ /dev/null @@ -1,74 +0,0 @@ -/** - * @module - * Types utility. - */ -export type Expect = T; -export type Equal = (() => T extends X ? 1 : 2) extends () => T extends Y ? 1 : 2 ? true : false; -export type NotEqual = true extends Equal ? false : true; -export type UnionToIntersection = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never; -export type RemoveBlankRecord = T extends Record ? (K extends string ? T : never) : never; -export type IfAnyThenEmptyObject = 0 extends 1 & T ? {} : T; -export type JSONPrimitive = string | boolean | number | null; -export type JSONArray = (JSONPrimitive | JSONObject | JSONArray)[]; -export type JSONObject = { - [key: string]: JSONPrimitive | JSONArray | JSONObject | object | InvalidJSONValue; -}; -export type InvalidJSONValue = undefined | symbol | ((...args: unknown[]) => unknown); -type InvalidToNull = T extends InvalidJSONValue ? null : T; -type IsInvalid = T extends InvalidJSONValue ? true : false; -/** - * symbol keys are omitted through `JSON.stringify` - */ -type OmitSymbolKeys = { - [K in keyof T as K extends symbol ? never : K]: T[K]; -}; -export type JSONValue = JSONObject | JSONArray | JSONPrimitive; -/** - * Convert a type to a JSON-compatible type. - * - * Non-JSON values such as `Date` implement `.toJSON()`, - * so they can be transformed to a value assignable to `JSONObject` - * - * `JSON.stringify()` throws a `TypeError` when it encounters a `bigint` value, - * unless a custom `replacer` function or `.toJSON()` method is provided. - * - * This behaviour can be controlled by the `TError` generic type parameter, - * which defaults to `bigint | ReadonlyArray`. - * You can set it to `never` to disable this check. - */ -export type JSONParsed> = T extends { - toJSON(): infer J; -} ? (() => J) extends () => JSONPrimitive ? J : (() => J) extends () => { - toJSON(): unknown; -} ? {} : JSONParsed : T extends JSONPrimitive ? T : T extends InvalidJSONValue ? never : T extends ReadonlyArray ? { - [K in keyof T]: JSONParsed, TError>; -} : T extends Set | Map | Record ? {} : T extends object ? T[keyof T] extends TError ? never : { - [K in keyof OmitSymbolKeys as IsInvalid extends true ? never : K]: boolean extends IsInvalid ? JSONParsed | undefined : JSONParsed; -} : T extends unknown ? T extends TError ? never : JSONValue : never; -/** - * Useful to flatten the type output to improve type hints shown in editors. And also to transform an interface into a type to aide with assignability. - * @copyright from sindresorhus/type-fest - */ -export type Simplify = { - [KeyType in keyof T]: T[KeyType]; -} & {}; -/** - * A simple extension of Simplify that will deeply traverse array elements. - */ -export type SimplifyDeepArray = T extends any[] ? { - [E in keyof T]: SimplifyDeepArray; -} : Simplify; -export type InterfaceToType = T extends Function ? T : { - [K in keyof T]: InterfaceToType; -}; -export type RequiredKeysOf = Exclude<{ - [Key in keyof BaseType]: BaseType extends Record ? Key : never; -}[keyof BaseType], undefined>; -export type HasRequiredKeys = RequiredKeysOf extends never ? false : true; -export type IsAny = boolean extends (T extends never ? true : false) ? true : false; -/** - * String literal types with auto-completion - * @see https://github.com/Microsoft/TypeScript/issues/29729 - */ -export type StringLiteralUnion = T | (string & Record); -export {}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/utils/url.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/utils/url.d.ts deleted file mode 100644 index dc94f1e..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/utils/url.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -/** - * @module - * URL utility. - */ -export type Pattern = readonly [string, string, RegExp | true] | '*'; -export declare const splitPath: (path: string) => string[]; -export declare const splitRoutingPath: (routePath: string) => string[]; -export declare const getPattern: (label: string, next?: string) => Pattern | null; -type Decoder = (str: string) => string; -export declare const tryDecode: (str: string, decoder: Decoder) => string; -export declare const getPath: (request: Request) => string; -export declare const getQueryStrings: (url: string) => string; -export declare const getPathNoStrict: (request: Request) => string; -/** - * Merge paths. - * @param {string[]} ...paths - The paths to merge. - * @returns {string} The merged path. - * @example - * mergePath('/api', '/users') // '/api/users' - * mergePath('/api/', '/users') // '/api/users' - * mergePath('/api', '/') // '/api' - * mergePath('/api/', '/') // '/api/' - */ -export declare const mergePath: (...paths: string[]) => string; -export declare const checkOptionalParameter: (path: string) => string[] | null; -export declare const getQueryParam: (url: string, key?: string) => string | undefined | Record; -export declare const getQueryParams: (url: string, key?: string) => string[] | undefined | Record; -export declare const decodeURIComponent_: typeof decodeURIComponent; -export {}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/validator/index.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/validator/index.d.ts deleted file mode 100644 index 7c9f902..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/validator/index.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -/** - * @module - * Validator for Hono. - */ -export { validator } from './validator'; -export type { ValidationFunction } from './validator'; diff --git a/PBandGraphScaffold/node_modules/hono/dist/types/validator/validator.d.ts b/PBandGraphScaffold/node_modules/hono/dist/types/validator/validator.d.ts deleted file mode 100644 index 0d242a4..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/types/validator/validator.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import type { Context } from '../context'; -import type { Env, MiddlewareHandler, TypedResponse, ValidationTargets, FormValue } from '../types'; -type ValidationTargetKeysWithBody = 'form' | 'json'; -type ValidationTargetByMethod = M extends 'get' | 'head' ? Exclude : keyof ValidationTargets; -export type ValidationFunction = (value: InputType, c: Context) => OutputType | TypedResponse | Promise | Promise; -export type ExtractValidationResponse = VF extends (value: any, c: any) => infer R ? R extends Promise ? PR extends TypedResponse ? TypedResponse : PR extends Response ? PR : PR extends undefined ? never : never : R extends TypedResponse ? TypedResponse : R extends Response ? R : R extends undefined ? never : never : never; -export declare const validator: , P2 extends string = P, VF extends (value: unknown extends InputType ? ValidationTargets[U] : InputType, c: Context) => any = (value: unknown extends InputType ? ValidationTargets[U] : InputType, c: Context) => any, V extends { - in: { [K in U]: K extends "json" ? unknown extends InputType ? ExtractValidatorOutput : InputType : { [K2 in keyof ExtractValidatorOutput]: ValidationTargets[K][K2]; }; }; - out: { [K in U]: ExtractValidatorOutput; }; -} = { - in: { [K in U]: K extends "json" ? unknown extends InputType ? ExtractValidatorOutput : InputType : { [K2 in keyof ExtractValidatorOutput]: ValidationTargets[K][K2]; }; }; - out: { [K in U]: ExtractValidatorOutput; }; -}, E extends Env = any>(target: U, validationFunc: VF) => MiddlewareHandler>; -export type ExtractValidatorOutput = VF extends (value: any, c: any) => infer R ? R extends Promise ? PR extends Response | TypedResponse ? never : PR : R extends Response | TypedResponse ? never : R : never; -export {}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/utils/accept.js b/PBandGraphScaffold/node_modules/hono/dist/utils/accept.js deleted file mode 100644 index 2d72f1f..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/utils/accept.js +++ /dev/null @@ -1,63 +0,0 @@ -// src/utils/accept.ts -var parseAccept = (acceptHeader) => { - if (!acceptHeader) { - return []; - } - const acceptValues = acceptHeader.split(",").map((value, index) => ({ value, index })); - return acceptValues.map(parseAcceptValue).filter((item) => Boolean(item)).sort(sortByQualityAndIndex).map(({ type, params, q }) => ({ type, params, q })); -}; -var parseAcceptValueRegex = /;(?=(?:(?:[^"]*"){2})*[^"]*$)/; -var parseAcceptValue = ({ value, index }) => { - const parts = value.trim().split(parseAcceptValueRegex).map((s) => s.trim()); - const type = parts[0]; - if (!type) { - return null; - } - const params = parseParams(parts.slice(1)); - const q = parseQuality(params.q); - return { type, params, q, index }; -}; -var parseParams = (paramParts) => { - return paramParts.reduce((acc, param) => { - const [key, val] = param.split("=").map((s) => s.trim()); - if (key && val) { - acc[key] = val; - } - return acc; - }, {}); -}; -var parseQuality = (qVal) => { - if (qVal === void 0) { - return 1; - } - if (qVal === "") { - return 1; - } - if (qVal === "NaN") { - return 0; - } - const num = Number(qVal); - if (num === Infinity) { - return 1; - } - if (num === -Infinity) { - return 0; - } - if (Number.isNaN(num)) { - return 1; - } - if (num < 0 || num > 1) { - return 1; - } - return num; -}; -var sortByQualityAndIndex = (a, b) => { - const qDiff = b.q - a.q; - if (qDiff !== 0) { - return qDiff; - } - return a.index - b.index; -}; -export { - parseAccept -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/utils/basic-auth.js b/PBandGraphScaffold/node_modules/hono/dist/utils/basic-auth.js deleted file mode 100644 index 579a665..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/utils/basic-auth.js +++ /dev/null @@ -1,23 +0,0 @@ -// src/utils/basic-auth.ts -import { decodeBase64 } from "./encode.js"; -var CREDENTIALS_REGEXP = /^ *(?:[Bb][Aa][Ss][Ii][Cc]) +([A-Za-z0-9._~+/-]+=*) *$/; -var USER_PASS_REGEXP = /^([^:]*):(.*)$/; -var utf8Decoder = new TextDecoder(); -var auth = (req) => { - const match = CREDENTIALS_REGEXP.exec(req.headers.get("Authorization") || ""); - if (!match) { - return void 0; - } - let userPass = void 0; - try { - userPass = USER_PASS_REGEXP.exec(utf8Decoder.decode(decodeBase64(match[1]))); - } catch { - } - if (!userPass) { - return void 0; - } - return { username: userPass[1], password: userPass[2] }; -}; -export { - auth -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/utils/body.js b/PBandGraphScaffold/node_modules/hono/dist/utils/body.js deleted file mode 100644 index d636562..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/utils/body.js +++ /dev/null @@ -1,72 +0,0 @@ -// src/utils/body.ts -import { HonoRequest } from "../request.js"; -var parseBody = async (request, options = /* @__PURE__ */ Object.create(null)) => { - const { all = false, dot = false } = options; - const headers = request instanceof HonoRequest ? request.raw.headers : request.headers; - const contentType = headers.get("Content-Type"); - if (contentType?.startsWith("multipart/form-data") || contentType?.startsWith("application/x-www-form-urlencoded")) { - return parseFormData(request, { all, dot }); - } - return {}; -}; -async function parseFormData(request, options) { - const formData = await request.formData(); - if (formData) { - return convertFormDataToBodyData(formData, options); - } - return {}; -} -function convertFormDataToBodyData(formData, options) { - const form = /* @__PURE__ */ Object.create(null); - formData.forEach((value, key) => { - const shouldParseAllValues = options.all || key.endsWith("[]"); - if (!shouldParseAllValues) { - form[key] = value; - } else { - handleParsingAllValues(form, key, value); - } - }); - if (options.dot) { - Object.entries(form).forEach(([key, value]) => { - const shouldParseDotValues = key.includes("."); - if (shouldParseDotValues) { - handleParsingNestedValues(form, key, value); - delete form[key]; - } - }); - } - return form; -} -var handleParsingAllValues = (form, key, value) => { - if (form[key] !== void 0) { - if (Array.isArray(form[key])) { - ; - form[key].push(value); - } else { - form[key] = [form[key], value]; - } - } else { - if (!key.endsWith("[]")) { - form[key] = value; - } else { - form[key] = [value]; - } - } -}; -var handleParsingNestedValues = (form, key, value) => { - let nestedForm = form; - const keys = key.split("."); - keys.forEach((key2, index) => { - if (index === keys.length - 1) { - nestedForm[key2] = value; - } else { - if (!nestedForm[key2] || typeof nestedForm[key2] !== "object" || Array.isArray(nestedForm[key2]) || nestedForm[key2] instanceof File) { - nestedForm[key2] = /* @__PURE__ */ Object.create(null); - } - nestedForm = nestedForm[key2]; - } - }); -}; -export { - parseBody -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/utils/buffer.js b/PBandGraphScaffold/node_modules/hono/dist/utils/buffer.js deleted file mode 100644 index 241b9c1..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/utils/buffer.js +++ /dev/null @@ -1,50 +0,0 @@ -// src/utils/buffer.ts -import { sha256 } from "./crypto.js"; -var equal = (a, b) => { - if (a === b) { - return true; - } - if (a.byteLength !== b.byteLength) { - return false; - } - const va = new DataView(a); - const vb = new DataView(b); - let i = va.byteLength; - while (i--) { - if (va.getUint8(i) !== vb.getUint8(i)) { - return false; - } - } - return true; -}; -var timingSafeEqual = async (a, b, hashFunction) => { - if (!hashFunction) { - hashFunction = sha256; - } - const [sa, sb] = await Promise.all([hashFunction(a), hashFunction(b)]); - if (!sa || !sb) { - return false; - } - return sa === sb && a === b; -}; -var bufferToString = (buffer) => { - if (buffer instanceof ArrayBuffer) { - const enc = new TextDecoder("utf-8"); - return enc.decode(buffer); - } - return buffer; -}; -var bufferToFormData = (arrayBuffer, contentType) => { - const response = new Response(arrayBuffer, { - headers: { - "Content-Type": contentType - } - }); - return response.formData(); -}; -export { - bufferToFormData, - bufferToString, - equal, - timingSafeEqual -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/utils/color.js b/PBandGraphScaffold/node_modules/hono/dist/utils/color.js deleted file mode 100644 index e867195..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/utils/color.js +++ /dev/null @@ -1,25 +0,0 @@ -// src/utils/color.ts -function getColorEnabled() { - const { process, Deno } = globalThis; - const isNoColor = typeof Deno?.noColor === "boolean" ? Deno.noColor : process !== void 0 ? ( - // eslint-disable-next-line no-unsafe-optional-chaining - "NO_COLOR" in process?.env - ) : false; - return !isNoColor; -} -async function getColorEnabledAsync() { - const { navigator } = globalThis; - const cfWorkers = "cloudflare:workers"; - const isNoColor = navigator !== void 0 && navigator.userAgent === "Cloudflare-Workers" ? await (async () => { - try { - return "NO_COLOR" in ((await import(cfWorkers)).env ?? {}); - } catch { - return false; - } - })() : !getColorEnabled(); - return !isNoColor; -} -export { - getColorEnabled, - getColorEnabledAsync -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/utils/compress.js b/PBandGraphScaffold/node_modules/hono/dist/utils/compress.js deleted file mode 100644 index 52b39b4..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/utils/compress.js +++ /dev/null @@ -1,5 +0,0 @@ -// src/utils/compress.ts -var COMPRESSIBLE_CONTENT_TYPE_REGEX = /^\s*(?:text\/(?!event-stream(?:[;\s]|$))[^;\s]+|application\/(?:javascript|json|xml|xml-dtd|ecmascript|dart|postscript|rtf|tar|toml|vnd\.dart|vnd\.ms-fontobject|vnd\.ms-opentype|wasm|x-httpd-php|x-javascript|x-ns-proxy-autoconfig|x-sh|x-tar|x-virtualbox-hdd|x-virtualbox-ova|x-virtualbox-ovf|x-virtualbox-vbox|x-virtualbox-vdi|x-virtualbox-vhd|x-virtualbox-vmdk|x-www-form-urlencoded)|font\/(?:otf|ttf)|image\/(?:bmp|vnd\.adobe\.photoshop|vnd\.microsoft\.icon|vnd\.ms-dds|x-icon|x-ms-bmp)|message\/rfc822|model\/gltf-binary|x-shader\/x-fragment|x-shader\/x-vertex|[^;\s]+?\+(?:json|text|xml|yaml))(?:[;\s]|$)/i; -export { - COMPRESSIBLE_CONTENT_TYPE_REGEX -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/utils/concurrent.js b/PBandGraphScaffold/node_modules/hono/dist/utils/concurrent.js deleted file mode 100644 index a9d4b6c..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/utils/concurrent.js +++ /dev/null @@ -1,39 +0,0 @@ -// src/utils/concurrent.ts -var DEFAULT_CONCURRENCY = 1024; -var createPool = ({ - concurrency, - interval -} = {}) => { - concurrency ||= DEFAULT_CONCURRENCY; - if (concurrency === Infinity) { - return { - run: async (fn) => fn() - }; - } - const pool = /* @__PURE__ */ new Set(); - const run = async (fn, promise, resolve) => { - if (pool.size >= concurrency) { - promise ||= new Promise((r) => resolve = r); - setTimeout(() => run(fn, promise, resolve)); - return promise; - } - const marker = {}; - pool.add(marker); - const result = await fn(); - if (interval) { - setTimeout(() => pool.delete(marker), interval); - } else { - pool.delete(marker); - } - if (resolve) { - resolve(result); - return promise; - } else { - return result; - } - }; - return { run }; -}; -export { - createPool -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/utils/constants.js b/PBandGraphScaffold/node_modules/hono/dist/utils/constants.js deleted file mode 100644 index 1c63165..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/utils/constants.js +++ /dev/null @@ -1,5 +0,0 @@ -// src/utils/constants.ts -var COMPOSED_HANDLER = "__COMPOSED_HANDLER"; -export { - COMPOSED_HANDLER -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/utils/cookie.js b/PBandGraphScaffold/node_modules/hono/dist/utils/cookie.js deleted file mode 100644 index c1281f4..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/utils/cookie.js +++ /dev/null @@ -1,147 +0,0 @@ -// src/utils/cookie.ts -import { decodeURIComponent_, tryDecode } from "./url.js"; -var algorithm = { name: "HMAC", hash: "SHA-256" }; -var getCryptoKey = async (secret) => { - const secretBuf = typeof secret === "string" ? new TextEncoder().encode(secret) : secret; - return await crypto.subtle.importKey("raw", secretBuf, algorithm, false, ["sign", "verify"]); -}; -var makeSignature = async (value, secret) => { - const key = await getCryptoKey(secret); - const signature = await crypto.subtle.sign(algorithm.name, key, new TextEncoder().encode(value)); - return btoa(String.fromCharCode(...new Uint8Array(signature))); -}; -var verifySignature = async (base64Signature, value, secret) => { - try { - const signatureBinStr = atob(base64Signature); - const signature = new Uint8Array(signatureBinStr.length); - for (let i = 0, len = signatureBinStr.length; i < len; i++) { - signature[i] = signatureBinStr.charCodeAt(i); - } - return await crypto.subtle.verify(algorithm, secret, signature, new TextEncoder().encode(value)); - } catch { - return false; - } -}; -var validCookieNameRegEx = /^[\w!#$%&'*.^`|~+-]+$/; -var validCookieValueRegEx = /^[ !#-:<-[\]-~]*$/; -var parse = (cookie, name) => { - if (name && cookie.indexOf(name) === -1) { - return {}; - } - const pairs = cookie.trim().split(";"); - const parsedCookie = {}; - for (let pairStr of pairs) { - pairStr = pairStr.trim(); - const valueStartPos = pairStr.indexOf("="); - if (valueStartPos === -1) { - continue; - } - const cookieName = pairStr.substring(0, valueStartPos).trim(); - if (name && name !== cookieName || !validCookieNameRegEx.test(cookieName)) { - continue; - } - let cookieValue = pairStr.substring(valueStartPos + 1).trim(); - if (cookieValue.startsWith('"') && cookieValue.endsWith('"')) { - cookieValue = cookieValue.slice(1, -1); - } - if (validCookieValueRegEx.test(cookieValue)) { - parsedCookie[cookieName] = cookieValue.indexOf("%") !== -1 ? tryDecode(cookieValue, decodeURIComponent_) : cookieValue; - if (name) { - break; - } - } - } - return parsedCookie; -}; -var parseSigned = async (cookie, secret, name) => { - const parsedCookie = {}; - const secretKey = await getCryptoKey(secret); - for (const [key, value] of Object.entries(parse(cookie, name))) { - const signatureStartPos = value.lastIndexOf("."); - if (signatureStartPos < 1) { - continue; - } - const signedValue = value.substring(0, signatureStartPos); - const signature = value.substring(signatureStartPos + 1); - if (signature.length !== 44 || !signature.endsWith("=")) { - continue; - } - const isVerified = await verifySignature(signature, signedValue, secretKey); - parsedCookie[key] = isVerified ? signedValue : false; - } - return parsedCookie; -}; -var _serialize = (name, value, opt = {}) => { - let cookie = `${name}=${value}`; - if (name.startsWith("__Secure-") && !opt.secure) { - throw new Error("__Secure- Cookie must have Secure attributes"); - } - if (name.startsWith("__Host-")) { - if (!opt.secure) { - throw new Error("__Host- Cookie must have Secure attributes"); - } - if (opt.path !== "/") { - throw new Error('__Host- Cookie must have Path attributes with "/"'); - } - if (opt.domain) { - throw new Error("__Host- Cookie must not have Domain attributes"); - } - } - if (opt && typeof opt.maxAge === "number" && opt.maxAge >= 0) { - if (opt.maxAge > 3456e4) { - throw new Error( - "Cookies Max-Age SHOULD NOT be greater than 400 days (34560000 seconds) in duration." - ); - } - cookie += `; Max-Age=${opt.maxAge | 0}`; - } - if (opt.domain && opt.prefix !== "host") { - cookie += `; Domain=${opt.domain}`; - } - if (opt.path) { - cookie += `; Path=${opt.path}`; - } - if (opt.expires) { - if (opt.expires.getTime() - Date.now() > 3456e7) { - throw new Error( - "Cookies Expires SHOULD NOT be greater than 400 days (34560000 seconds) in the future." - ); - } - cookie += `; Expires=${opt.expires.toUTCString()}`; - } - if (opt.httpOnly) { - cookie += "; HttpOnly"; - } - if (opt.secure) { - cookie += "; Secure"; - } - if (opt.sameSite) { - cookie += `; SameSite=${opt.sameSite.charAt(0).toUpperCase() + opt.sameSite.slice(1)}`; - } - if (opt.priority) { - cookie += `; Priority=${opt.priority.charAt(0).toUpperCase() + opt.priority.slice(1)}`; - } - if (opt.partitioned) { - if (!opt.secure) { - throw new Error("Partitioned Cookie must have Secure attributes"); - } - cookie += "; Partitioned"; - } - return cookie; -}; -var serialize = (name, value, opt) => { - value = encodeURIComponent(value); - return _serialize(name, value, opt); -}; -var serializeSigned = async (name, value, secret, opt = {}) => { - const signature = await makeSignature(value, secret); - value = `${value}.${signature}`; - value = encodeURIComponent(value); - return _serialize(name, value, opt); -}; -export { - parse, - parseSigned, - serialize, - serializeSigned -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/utils/crypto.js b/PBandGraphScaffold/node_modules/hono/dist/utils/crypto.js deleted file mode 100644 index 36772c4..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/utils/crypto.js +++ /dev/null @@ -1,44 +0,0 @@ -// src/utils/crypto.ts -var sha256 = async (data) => { - const algorithm = { name: "SHA-256", alias: "sha256" }; - const hash = await createHash(data, algorithm); - return hash; -}; -var sha1 = async (data) => { - const algorithm = { name: "SHA-1", alias: "sha1" }; - const hash = await createHash(data, algorithm); - return hash; -}; -var md5 = async (data) => { - const algorithm = { name: "MD5", alias: "md5" }; - const hash = await createHash(data, algorithm); - return hash; -}; -var createHash = async (data, algorithm) => { - let sourceBuffer; - if (ArrayBuffer.isView(data) || data instanceof ArrayBuffer) { - sourceBuffer = data; - } else { - if (typeof data === "object") { - data = JSON.stringify(data); - } - sourceBuffer = new TextEncoder().encode(String(data)); - } - if (crypto && crypto.subtle) { - const buffer = await crypto.subtle.digest( - { - name: algorithm.name - }, - sourceBuffer - ); - const hash = Array.prototype.map.call(new Uint8Array(buffer), (x) => ("00" + x.toString(16)).slice(-2)).join(""); - return hash; - } - return null; -}; -export { - createHash, - md5, - sha1, - sha256 -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/utils/encode.js b/PBandGraphScaffold/node_modules/hono/dist/utils/encode.js deleted file mode 100644 index d4ce6a7..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/utils/encode.js +++ /dev/null @@ -1,29 +0,0 @@ -// src/utils/encode.ts -var decodeBase64Url = (str) => { - return decodeBase64(str.replace(/_|-/g, (m) => ({ _: "/", "-": "+" })[m] ?? m)); -}; -var encodeBase64Url = (buf) => encodeBase64(buf).replace(/\/|\+/g, (m) => ({ "/": "_", "+": "-" })[m] ?? m); -var encodeBase64 = (buf) => { - let binary = ""; - const bytes = new Uint8Array(buf); - for (let i = 0, len = bytes.length; i < len; i++) { - binary += String.fromCharCode(bytes[i]); - } - return btoa(binary); -}; -var decodeBase64 = (str) => { - const binary = atob(str); - const bytes = new Uint8Array(new ArrayBuffer(binary.length)); - const half = binary.length / 2; - for (let i = 0, j = binary.length - 1; i <= half; i++, j--) { - bytes[i] = binary.charCodeAt(i); - bytes[j] = binary.charCodeAt(j); - } - return bytes; -}; -export { - decodeBase64, - decodeBase64Url, - encodeBase64, - encodeBase64Url -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/utils/filepath.js b/PBandGraphScaffold/node_modules/hono/dist/utils/filepath.js deleted file mode 100644 index 7807be5..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/utils/filepath.js +++ /dev/null @@ -1,35 +0,0 @@ -// src/utils/filepath.ts -var getFilePath = (options) => { - let filename = options.filename; - const defaultDocument = options.defaultDocument || "index.html"; - if (filename.endsWith("/")) { - filename = filename.concat(defaultDocument); - } else if (!filename.match(/\.[a-zA-Z0-9_-]+$/)) { - filename = filename.concat("/" + defaultDocument); - } - const path = getFilePathWithoutDefaultDocument({ - root: options.root, - filename - }); - return path; -}; -var getFilePathWithoutDefaultDocument = (options) => { - let root = options.root || ""; - let filename = options.filename; - if (/(?:^|[\/\\])\.\.(?:$|[\/\\])/.test(filename)) { - return; - } - filename = filename.replace(/^\.?[\/\\]/, ""); - filename = filename.replace(/\\/, "/"); - root = root.replace(/\/$/, ""); - let path = root ? root + "/" + filename : filename; - path = path.replace(/^\.?\//, ""); - if (root[0] !== "/" && path[0] === "/") { - return; - } - return path; -}; -export { - getFilePath, - getFilePathWithoutDefaultDocument -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/utils/handler.js b/PBandGraphScaffold/node_modules/hono/dist/utils/handler.js deleted file mode 100644 index 317ae65..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/utils/handler.js +++ /dev/null @@ -1,13 +0,0 @@ -// src/utils/handler.ts -import { COMPOSED_HANDLER } from "./constants.js"; -var isMiddleware = (handler) => handler.length > 1; -var findTargetHandler = (handler) => { - return handler[COMPOSED_HANDLER] ? ( - // eslint-disable-next-line @typescript-eslint/no-explicit-any - findTargetHandler(handler[COMPOSED_HANDLER]) - ) : handler; -}; -export { - findTargetHandler, - isMiddleware -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/utils/headers.js b/PBandGraphScaffold/node_modules/hono/dist/utils/headers.js deleted file mode 100644 index e69de29..0000000 diff --git a/PBandGraphScaffold/node_modules/hono/dist/utils/html.js b/PBandGraphScaffold/node_modules/hono/dist/utils/html.js deleted file mode 100644 index 79f7772..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/utils/html.js +++ /dev/null @@ -1,123 +0,0 @@ -// src/utils/html.ts -var HtmlEscapedCallbackPhase = { - Stringify: 1, - BeforeStream: 2, - Stream: 3 -}; -var raw = (value, callbacks) => { - const escapedString = new String(value); - escapedString.isEscaped = true; - escapedString.callbacks = callbacks; - return escapedString; -}; -var escapeRe = /[&<>'"]/; -var stringBufferToString = async (buffer, callbacks) => { - let str = ""; - callbacks ||= []; - const resolvedBuffer = await Promise.all(buffer); - for (let i = resolvedBuffer.length - 1; ; i--) { - str += resolvedBuffer[i]; - i--; - if (i < 0) { - break; - } - let r = resolvedBuffer[i]; - if (typeof r === "object") { - callbacks.push(...r.callbacks || []); - } - const isEscaped = r.isEscaped; - r = await (typeof r === "object" ? r.toString() : r); - if (typeof r === "object") { - callbacks.push(...r.callbacks || []); - } - if (r.isEscaped ?? isEscaped) { - str += r; - } else { - const buf = [str]; - escapeToBuffer(r, buf); - str = buf[0]; - } - } - return raw(str, callbacks); -}; -var escapeToBuffer = (str, buffer) => { - const match = str.search(escapeRe); - if (match === -1) { - buffer[0] += str; - return; - } - let escape; - let index; - let lastIndex = 0; - for (index = match; index < str.length; index++) { - switch (str.charCodeAt(index)) { - case 34: - escape = """; - break; - case 39: - escape = "'"; - break; - case 38: - escape = "&"; - break; - case 60: - escape = "<"; - break; - case 62: - escape = ">"; - break; - default: - continue; - } - buffer[0] += str.substring(lastIndex, index) + escape; - lastIndex = index + 1; - } - buffer[0] += str.substring(lastIndex, index); -}; -var resolveCallbackSync = (str) => { - const callbacks = str.callbacks; - if (!callbacks?.length) { - return str; - } - const buffer = [str]; - const context = {}; - callbacks.forEach((c) => c({ phase: HtmlEscapedCallbackPhase.Stringify, buffer, context })); - return buffer[0]; -}; -var resolveCallback = async (str, phase, preserveCallbacks, context, buffer) => { - if (typeof str === "object" && !(str instanceof String)) { - if (!(str instanceof Promise)) { - str = str.toString(); - } - if (str instanceof Promise) { - str = await str; - } - } - const callbacks = str.callbacks; - if (!callbacks?.length) { - return Promise.resolve(str); - } - if (buffer) { - buffer[0] += str; - } else { - buffer = [str]; - } - const resStr = Promise.all(callbacks.map((c) => c({ phase, buffer, context }))).then( - (res) => Promise.all( - res.filter(Boolean).map((str2) => resolveCallback(str2, phase, false, context, buffer)) - ).then(() => buffer[0]) - ); - if (preserveCallbacks) { - return raw(await resStr, callbacks); - } else { - return resStr; - } -}; -export { - HtmlEscapedCallbackPhase, - escapeToBuffer, - raw, - resolveCallback, - resolveCallbackSync, - stringBufferToString -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/utils/http-status.js b/PBandGraphScaffold/node_modules/hono/dist/utils/http-status.js deleted file mode 100644 index e69de29..0000000 diff --git a/PBandGraphScaffold/node_modules/hono/dist/utils/ipaddr.js b/PBandGraphScaffold/node_modules/hono/dist/utils/ipaddr.js deleted file mode 100644 index c10df08..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/utils/ipaddr.js +++ /dev/null @@ -1,101 +0,0 @@ -// src/utils/ipaddr.ts -var expandIPv6 = (ipV6) => { - const sections = ipV6.split(":"); - if (IPV4_REGEX.test(sections.at(-1))) { - sections.splice( - -1, - 1, - ...convertIPv6BinaryToString(convertIPv4ToBinary(sections.at(-1))).substring(2).split(":") - // => ['7f00', '0001'] - ); - } - for (let i = 0; i < sections.length; i++) { - const node = sections[i]; - if (node !== "") { - sections[i] = node.padStart(4, "0"); - } else { - sections[i + 1] === "" && sections.splice(i + 1, 1); - sections[i] = new Array(8 - sections.length + 1).fill("0000").join(":"); - } - } - return sections.join(":"); -}; -var IPV4_REGEX = /^[0-9]{0,3}\.[0-9]{0,3}\.[0-9]{0,3}\.[0-9]{0,3}$/; -var distinctRemoteAddr = (remoteAddr) => { - if (IPV4_REGEX.test(remoteAddr)) { - return "IPv4"; - } - if (remoteAddr.includes(":")) { - return "IPv6"; - } -}; -var convertIPv4ToBinary = (ipv4) => { - const parts = ipv4.split("."); - let result = 0n; - for (let i = 0; i < 4; i++) { - result <<= 8n; - result += BigInt(parts[i]); - } - return result; -}; -var convertIPv6ToBinary = (ipv6) => { - const sections = expandIPv6(ipv6).split(":"); - let result = 0n; - for (let i = 0; i < 8; i++) { - result <<= 16n; - result += BigInt(parseInt(sections[i], 16)); - } - return result; -}; -var convertIPv4BinaryToString = (ipV4) => { - const sections = []; - for (let i = 0; i < 4; i++) { - sections.push(ipV4 >> BigInt(8 * (3 - i)) & 0xffn); - } - return sections.join("."); -}; -var convertIPv6BinaryToString = (ipV6) => { - if (ipV6 >> 32n === 0xffffn) { - return `::ffff:${convertIPv4BinaryToString(ipV6 & 0xffffffffn)}`; - } - const sections = []; - for (let i = 0; i < 8; i++) { - sections.push((ipV6 >> BigInt(16 * (7 - i)) & 0xffffn).toString(16)); - } - let currentZeroStart = -1; - let maxZeroStart = -1; - let maxZeroEnd = -1; - for (let i = 0; i < 8; i++) { - if (sections[i] === "0") { - if (currentZeroStart === -1) { - currentZeroStart = i; - } - } else { - if (currentZeroStart > -1) { - if (i - currentZeroStart > maxZeroEnd - maxZeroStart) { - maxZeroStart = currentZeroStart; - maxZeroEnd = i; - } - currentZeroStart = -1; - } - } - } - if (currentZeroStart > -1) { - if (8 - currentZeroStart > maxZeroEnd - maxZeroStart) { - maxZeroStart = currentZeroStart; - maxZeroEnd = 8; - } - } - if (maxZeroStart !== -1) { - sections.splice(maxZeroStart, maxZeroEnd - maxZeroStart, ":"); - } - return sections.join(":").replace(/:{2,}/g, "::"); -}; -export { - convertIPv4BinaryToString, - convertIPv4ToBinary, - convertIPv6BinaryToString, - convertIPv6ToBinary, - distinctRemoteAddr, - expandIPv6 -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/utils/jwt/index.js b/PBandGraphScaffold/node_modules/hono/dist/utils/jwt/index.js deleted file mode 100644 index 25467d1..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/utils/jwt/index.js +++ /dev/null @@ -1,6 +0,0 @@ -// src/utils/jwt/index.ts -import { decode, sign, verify, verifyWithJwks } from "./jwt.js"; -var Jwt = { sign, verify, decode, verifyWithJwks }; -export { - Jwt -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/utils/jwt/jwa.js b/PBandGraphScaffold/node_modules/hono/dist/utils/jwt/jwa.js deleted file mode 100644 index 6331192..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/utils/jwt/jwa.js +++ /dev/null @@ -1,20 +0,0 @@ -// src/utils/jwt/jwa.ts -var AlgorithmTypes = /* @__PURE__ */ ((AlgorithmTypes2) => { - AlgorithmTypes2["HS256"] = "HS256"; - AlgorithmTypes2["HS384"] = "HS384"; - AlgorithmTypes2["HS512"] = "HS512"; - AlgorithmTypes2["RS256"] = "RS256"; - AlgorithmTypes2["RS384"] = "RS384"; - AlgorithmTypes2["RS512"] = "RS512"; - AlgorithmTypes2["PS256"] = "PS256"; - AlgorithmTypes2["PS384"] = "PS384"; - AlgorithmTypes2["PS512"] = "PS512"; - AlgorithmTypes2["ES256"] = "ES256"; - AlgorithmTypes2["ES384"] = "ES384"; - AlgorithmTypes2["ES512"] = "ES512"; - AlgorithmTypes2["EdDSA"] = "EdDSA"; - return AlgorithmTypes2; -})(AlgorithmTypes || {}); -export { - AlgorithmTypes -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/utils/jwt/jws.js b/PBandGraphScaffold/node_modules/hono/dist/utils/jwt/jws.js deleted file mode 100644 index 2832b9c..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/utils/jwt/jws.js +++ /dev/null @@ -1,192 +0,0 @@ -// src/utils/jwt/jws.ts -import { getRuntimeKey } from "../../helper/adapter/index.js"; -import { decodeBase64 } from "../encode.js"; -import { CryptoKeyUsage, JwtAlgorithmNotImplemented } from "./types.js"; -import { utf8Encoder } from "./utf8.js"; -async function signing(privateKey, alg, data) { - const algorithm = getKeyAlgorithm(alg); - const cryptoKey = await importPrivateKey(privateKey, algorithm); - return await crypto.subtle.sign(algorithm, cryptoKey, data); -} -async function verifying(publicKey, alg, signature, data) { - const algorithm = getKeyAlgorithm(alg); - const cryptoKey = await importPublicKey(publicKey, algorithm); - return await crypto.subtle.verify(algorithm, cryptoKey, signature, data); -} -function pemToBinary(pem) { - return decodeBase64(pem.replace(/-+(BEGIN|END).*/g, "").replace(/\s/g, "")); -} -async function importPrivateKey(key, alg) { - if (!crypto.subtle || !crypto.subtle.importKey) { - throw new Error("`crypto.subtle.importKey` is undefined. JWT auth middleware requires it."); - } - if (isCryptoKey(key)) { - if (key.type !== "private" && key.type !== "secret") { - throw new Error( - `unexpected key type: CryptoKey.type is ${key.type}, expected private or secret` - ); - } - return key; - } - const usages = [CryptoKeyUsage.Sign]; - if (typeof key === "object") { - return await crypto.subtle.importKey("jwk", key, alg, false, usages); - } - if (key.includes("PRIVATE")) { - return await crypto.subtle.importKey("pkcs8", pemToBinary(key), alg, false, usages); - } - return await crypto.subtle.importKey("raw", utf8Encoder.encode(key), alg, false, usages); -} -async function importPublicKey(key, alg) { - if (!crypto.subtle || !crypto.subtle.importKey) { - throw new Error("`crypto.subtle.importKey` is undefined. JWT auth middleware requires it."); - } - if (isCryptoKey(key)) { - if (key.type === "public" || key.type === "secret") { - return key; - } - key = await exportPublicJwkFrom(key); - } - if (typeof key === "string" && key.includes("PRIVATE")) { - const privateKey = await crypto.subtle.importKey("pkcs8", pemToBinary(key), alg, true, [ - CryptoKeyUsage.Sign - ]); - key = await exportPublicJwkFrom(privateKey); - } - const usages = [CryptoKeyUsage.Verify]; - if (typeof key === "object") { - return await crypto.subtle.importKey("jwk", key, alg, false, usages); - } - if (key.includes("PUBLIC")) { - return await crypto.subtle.importKey("spki", pemToBinary(key), alg, false, usages); - } - return await crypto.subtle.importKey("raw", utf8Encoder.encode(key), alg, false, usages); -} -async function exportPublicJwkFrom(privateKey) { - if (privateKey.type !== "private") { - throw new Error(`unexpected key type: ${privateKey.type}`); - } - if (!privateKey.extractable) { - throw new Error("unexpected private key is unextractable"); - } - const jwk = await crypto.subtle.exportKey("jwk", privateKey); - const { kty } = jwk; - const { alg, e, n } = jwk; - const { crv, x, y } = jwk; - return { kty, alg, e, n, crv, x, y, key_ops: [CryptoKeyUsage.Verify] }; -} -function getKeyAlgorithm(name) { - switch (name) { - case "HS256": - return { - name: "HMAC", - hash: { - name: "SHA-256" - } - }; - case "HS384": - return { - name: "HMAC", - hash: { - name: "SHA-384" - } - }; - case "HS512": - return { - name: "HMAC", - hash: { - name: "SHA-512" - } - }; - case "RS256": - return { - name: "RSASSA-PKCS1-v1_5", - hash: { - name: "SHA-256" - } - }; - case "RS384": - return { - name: "RSASSA-PKCS1-v1_5", - hash: { - name: "SHA-384" - } - }; - case "RS512": - return { - name: "RSASSA-PKCS1-v1_5", - hash: { - name: "SHA-512" - } - }; - case "PS256": - return { - name: "RSA-PSS", - hash: { - name: "SHA-256" - }, - saltLength: 32 - // 256 >> 3 - }; - case "PS384": - return { - name: "RSA-PSS", - hash: { - name: "SHA-384" - }, - saltLength: 48 - // 384 >> 3 - }; - case "PS512": - return { - name: "RSA-PSS", - hash: { - name: "SHA-512" - }, - saltLength: 64 - // 512 >> 3, - }; - case "ES256": - return { - name: "ECDSA", - hash: { - name: "SHA-256" - }, - namedCurve: "P-256" - }; - case "ES384": - return { - name: "ECDSA", - hash: { - name: "SHA-384" - }, - namedCurve: "P-384" - }; - case "ES512": - return { - name: "ECDSA", - hash: { - name: "SHA-512" - }, - namedCurve: "P-521" - }; - case "EdDSA": - return { - name: "Ed25519", - namedCurve: "Ed25519" - }; - default: - throw new JwtAlgorithmNotImplemented(name); - } -} -function isCryptoKey(key) { - const runtime = getRuntimeKey(); - if (runtime === "node" && !!crypto.webcrypto) { - return key instanceof crypto.webcrypto.CryptoKey; - } - return key instanceof CryptoKey; -} -export { - signing, - verifying -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/utils/jwt/jwt.js b/PBandGraphScaffold/node_modules/hono/dist/utils/jwt/jwt.js deleted file mode 100644 index 50658f7..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/utils/jwt/jwt.js +++ /dev/null @@ -1,170 +0,0 @@ -// src/utils/jwt/jwt.ts -import { decodeBase64Url, encodeBase64Url } from "../../utils/encode.js"; -import { AlgorithmTypes } from "./jwa.js"; -import { signing, verifying } from "./jws.js"; -import { - JwtHeaderInvalid, - JwtHeaderRequiresKid, - JwtPayloadRequiresAud, - JwtTokenAudience, - JwtTokenExpired, - JwtTokenInvalid, - JwtTokenIssuedAt, - JwtTokenIssuer, - JwtTokenNotBefore, - JwtTokenSignatureMismatched -} from "./types.js"; -import { utf8Decoder, utf8Encoder } from "./utf8.js"; -var encodeJwtPart = (part) => encodeBase64Url(utf8Encoder.encode(JSON.stringify(part)).buffer).replace(/=/g, ""); -var encodeSignaturePart = (buf) => encodeBase64Url(buf).replace(/=/g, ""); -var decodeJwtPart = (part) => JSON.parse(utf8Decoder.decode(decodeBase64Url(part))); -function isTokenHeader(obj) { - if (typeof obj === "object" && obj !== null) { - const objWithAlg = obj; - return "alg" in objWithAlg && Object.values(AlgorithmTypes).includes(objWithAlg.alg) && (!("typ" in objWithAlg) || objWithAlg.typ === "JWT"); - } - return false; -} -var sign = async (payload, privateKey, alg = "HS256") => { - const encodedPayload = encodeJwtPart(payload); - let encodedHeader; - if (typeof privateKey === "object" && "alg" in privateKey) { - alg = privateKey.alg; - encodedHeader = encodeJwtPart({ alg, typ: "JWT", kid: privateKey.kid }); - } else { - encodedHeader = encodeJwtPart({ alg, typ: "JWT" }); - } - const partialToken = `${encodedHeader}.${encodedPayload}`; - const signaturePart = await signing(privateKey, alg, utf8Encoder.encode(partialToken)); - const signature = encodeSignaturePart(signaturePart); - return `${partialToken}.${signature}`; -}; -var verify = async (token, publicKey, algOrOptions) => { - const { - alg = "HS256", - iss, - nbf = true, - exp = true, - iat = true, - aud - } = typeof algOrOptions === "string" ? { alg: algOrOptions } : algOrOptions || {}; - const tokenParts = token.split("."); - if (tokenParts.length !== 3) { - throw new JwtTokenInvalid(token); - } - const { header, payload } = decode(token); - if (!isTokenHeader(header)) { - throw new JwtHeaderInvalid(header); - } - const now = Date.now() / 1e3 | 0; - if (nbf && payload.nbf && payload.nbf > now) { - throw new JwtTokenNotBefore(token); - } - if (exp && payload.exp && payload.exp <= now) { - throw new JwtTokenExpired(token); - } - if (iat && payload.iat && now < payload.iat) { - throw new JwtTokenIssuedAt(now, payload.iat); - } - if (iss) { - if (!payload.iss) { - throw new JwtTokenIssuer(iss, null); - } - if (typeof iss === "string" && payload.iss !== iss) { - throw new JwtTokenIssuer(iss, payload.iss); - } - if (iss instanceof RegExp && !iss.test(payload.iss)) { - throw new JwtTokenIssuer(iss, payload.iss); - } - } - if (aud) { - if (!payload.aud) { - throw new JwtPayloadRequiresAud(payload); - } - const audiences = Array.isArray(payload.aud) ? payload.aud : [payload.aud]; - const matched = audiences.some( - (payloadAud) => aud instanceof RegExp ? aud.test(payloadAud) : typeof aud === "string" ? payloadAud === aud : Array.isArray(aud) && aud.includes(payloadAud) - ); - if (!matched) { - throw new JwtTokenAudience(aud, payload.aud); - } - } - const headerPayload = token.substring(0, token.lastIndexOf(".")); - const verified = await verifying( - publicKey, - alg, - decodeBase64Url(tokenParts[2]), - utf8Encoder.encode(headerPayload) - ); - if (!verified) { - throw new JwtTokenSignatureMismatched(token); - } - return payload; -}; -var verifyWithJwks = async (token, options, init) => { - const verifyOpts = options.verification || {}; - const header = decodeHeader(token); - if (!isTokenHeader(header)) { - throw new JwtHeaderInvalid(header); - } - if (!header.kid) { - throw new JwtHeaderRequiresKid(header); - } - if (options.jwks_uri) { - const response = await fetch(options.jwks_uri, init); - if (!response.ok) { - throw new Error(`failed to fetch JWKS from ${options.jwks_uri}`); - } - const data = await response.json(); - if (!data.keys) { - throw new Error('invalid JWKS response. "keys" field is missing'); - } - if (!Array.isArray(data.keys)) { - throw new Error('invalid JWKS response. "keys" field is not an array'); - } - if (options.keys) { - options.keys.push(...data.keys); - } else { - options.keys = data.keys; - } - } else if (!options.keys) { - throw new Error('verifyWithJwks requires options for either "keys" or "jwks_uri" or both'); - } - const matchingKey = options.keys.find((key) => key.kid === header.kid); - if (!matchingKey) { - throw new JwtTokenInvalid(token); - } - return await verify(token, matchingKey, { - alg: matchingKey.alg || header.alg, - ...verifyOpts - }); -}; -var decode = (token) => { - try { - const [h, p] = token.split("."); - const header = decodeJwtPart(h); - const payload = decodeJwtPart(p); - return { - header, - payload - }; - } catch { - throw new JwtTokenInvalid(token); - } -}; -var decodeHeader = (token) => { - try { - const [h] = token.split("."); - return decodeJwtPart(h); - } catch { - throw new JwtTokenInvalid(token); - } -}; -export { - decode, - decodeHeader, - isTokenHeader, - sign, - verify, - verifyWithJwks -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/utils/jwt/types.js b/PBandGraphScaffold/node_modules/hono/dist/utils/jwt/types.js deleted file mode 100644 index 4d64d4f..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/utils/jwt/types.js +++ /dev/null @@ -1,96 +0,0 @@ -// src/utils/jwt/types.ts -var JwtAlgorithmNotImplemented = class extends Error { - constructor(alg) { - super(`${alg} is not an implemented algorithm`); - this.name = "JwtAlgorithmNotImplemented"; - } -}; -var JwtTokenInvalid = class extends Error { - constructor(token) { - super(`invalid JWT token: ${token}`); - this.name = "JwtTokenInvalid"; - } -}; -var JwtTokenNotBefore = class extends Error { - constructor(token) { - super(`token (${token}) is being used before it's valid`); - this.name = "JwtTokenNotBefore"; - } -}; -var JwtTokenExpired = class extends Error { - constructor(token) { - super(`token (${token}) expired`); - this.name = "JwtTokenExpired"; - } -}; -var JwtTokenIssuedAt = class extends Error { - constructor(currentTimestamp, iat) { - super( - `Invalid "iat" claim, must be a valid number lower than "${currentTimestamp}" (iat: "${iat}")` - ); - this.name = "JwtTokenIssuedAt"; - } -}; -var JwtTokenIssuer = class extends Error { - constructor(expected, iss) { - super(`expected issuer "${expected}", got ${iss ? `"${iss}"` : "none"} `); - this.name = "JwtTokenIssuer"; - } -}; -var JwtHeaderInvalid = class extends Error { - constructor(header) { - super(`jwt header is invalid: ${JSON.stringify(header)}`); - this.name = "JwtHeaderInvalid"; - } -}; -var JwtHeaderRequiresKid = class extends Error { - constructor(header) { - super(`required "kid" in jwt header: ${JSON.stringify(header)}`); - this.name = "JwtHeaderRequiresKid"; - } -}; -var JwtTokenSignatureMismatched = class extends Error { - constructor(token) { - super(`token(${token}) signature mismatched`); - this.name = "JwtTokenSignatureMismatched"; - } -}; -var JwtPayloadRequiresAud = class extends Error { - constructor(payload) { - super(`required "aud" in jwt payload: ${JSON.stringify(payload)}`); - this.name = "JwtPayloadRequiresAud"; - } -}; -var JwtTokenAudience = class extends Error { - constructor(expected, aud) { - super( - `expected audience "${Array.isArray(expected) ? expected.join(", ") : expected}", got "${aud}"` - ); - this.name = "JwtTokenAudience"; - } -}; -var CryptoKeyUsage = /* @__PURE__ */ ((CryptoKeyUsage2) => { - CryptoKeyUsage2["Encrypt"] = "encrypt"; - CryptoKeyUsage2["Decrypt"] = "decrypt"; - CryptoKeyUsage2["Sign"] = "sign"; - CryptoKeyUsage2["Verify"] = "verify"; - CryptoKeyUsage2["DeriveKey"] = "deriveKey"; - CryptoKeyUsage2["DeriveBits"] = "deriveBits"; - CryptoKeyUsage2["WrapKey"] = "wrapKey"; - CryptoKeyUsage2["UnwrapKey"] = "unwrapKey"; - return CryptoKeyUsage2; -})(CryptoKeyUsage || {}); -export { - CryptoKeyUsage, - JwtAlgorithmNotImplemented, - JwtHeaderInvalid, - JwtHeaderRequiresKid, - JwtPayloadRequiresAud, - JwtTokenAudience, - JwtTokenExpired, - JwtTokenInvalid, - JwtTokenIssuedAt, - JwtTokenIssuer, - JwtTokenNotBefore, - JwtTokenSignatureMismatched -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/utils/jwt/utf8.js b/PBandGraphScaffold/node_modules/hono/dist/utils/jwt/utf8.js deleted file mode 100644 index 3cd9f0e..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/utils/jwt/utf8.js +++ /dev/null @@ -1,7 +0,0 @@ -// src/utils/jwt/utf8.ts -var utf8Encoder = new TextEncoder(); -var utf8Decoder = new TextDecoder(); -export { - utf8Decoder, - utf8Encoder -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/utils/mime.js b/PBandGraphScaffold/node_modules/hono/dist/utils/mime.js deleted file mode 100644 index 8d9985e..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/utils/mime.js +++ /dev/null @@ -1,84 +0,0 @@ -// src/utils/mime.ts -var getMimeType = (filename, mimes = baseMimes) => { - const regexp = /\.([a-zA-Z0-9]+?)$/; - const match = filename.match(regexp); - if (!match) { - return; - } - let mimeType = mimes[match[1]]; - if (mimeType && mimeType.startsWith("text")) { - mimeType += "; charset=utf-8"; - } - return mimeType; -}; -var getExtension = (mimeType) => { - for (const ext in baseMimes) { - if (baseMimes[ext] === mimeType) { - return ext; - } - } -}; -var _baseMimes = { - aac: "audio/aac", - avi: "video/x-msvideo", - avif: "image/avif", - av1: "video/av1", - bin: "application/octet-stream", - bmp: "image/bmp", - css: "text/css", - csv: "text/csv", - eot: "application/vnd.ms-fontobject", - epub: "application/epub+zip", - gif: "image/gif", - gz: "application/gzip", - htm: "text/html", - html: "text/html", - ico: "image/x-icon", - ics: "text/calendar", - jpeg: "image/jpeg", - jpg: "image/jpeg", - js: "text/javascript", - json: "application/json", - jsonld: "application/ld+json", - map: "application/json", - mid: "audio/x-midi", - midi: "audio/x-midi", - mjs: "text/javascript", - mp3: "audio/mpeg", - mp4: "video/mp4", - mpeg: "video/mpeg", - oga: "audio/ogg", - ogv: "video/ogg", - ogx: "application/ogg", - opus: "audio/opus", - otf: "font/otf", - pdf: "application/pdf", - png: "image/png", - rtf: "application/rtf", - svg: "image/svg+xml", - tif: "image/tiff", - tiff: "image/tiff", - ts: "video/mp2t", - ttf: "font/ttf", - txt: "text/plain", - wasm: "application/wasm", - webm: "video/webm", - weba: "audio/webm", - webmanifest: "application/manifest+json", - webp: "image/webp", - woff: "font/woff", - woff2: "font/woff2", - xhtml: "application/xhtml+xml", - xml: "application/xml", - zip: "application/zip", - "3gp": "video/3gpp", - "3g2": "video/3gpp2", - gltf: "model/gltf+json", - glb: "model/gltf-binary" -}; -var baseMimes = _baseMimes; -export { - getExtension, - getMimeType, - baseMimes as mimes -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/utils/stream.js b/PBandGraphScaffold/node_modules/hono/dist/utils/stream.js deleted file mode 100644 index 9fb6191..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/utils/stream.js +++ /dev/null @@ -1,79 +0,0 @@ -// src/utils/stream.ts -var StreamingApi = class { - writer; - encoder; - writable; - abortSubscribers = []; - responseReadable; - /** - * Whether the stream has been aborted. - */ - aborted = false; - /** - * Whether the stream has been closed normally. - */ - closed = false; - constructor(writable, _readable) { - this.writable = writable; - this.writer = writable.getWriter(); - this.encoder = new TextEncoder(); - const reader = _readable.getReader(); - this.abortSubscribers.push(async () => { - await reader.cancel(); - }); - this.responseReadable = new ReadableStream({ - async pull(controller) { - const { done, value } = await reader.read(); - done ? controller.close() : controller.enqueue(value); - }, - cancel: () => { - this.abort(); - } - }); - } - async write(input) { - try { - if (typeof input === "string") { - input = this.encoder.encode(input); - } - await this.writer.write(input); - } catch { - } - return this; - } - async writeln(input) { - await this.write(input + "\n"); - return this; - } - sleep(ms) { - return new Promise((res) => setTimeout(res, ms)); - } - async close() { - try { - await this.writer.close(); - } catch { - } - this.closed = true; - } - async pipe(body) { - this.writer.releaseLock(); - await body.pipeTo(this.writable, { preventClose: true }); - this.writer = this.writable.getWriter(); - } - onAbort(listener) { - this.abortSubscribers.push(listener); - } - /** - * Abort the stream. - * You can call this method when stream is aborted by external event. - */ - abort() { - if (!this.aborted) { - this.aborted = true; - this.abortSubscribers.forEach((subscriber) => subscriber()); - } - } -}; -export { - StreamingApi -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/utils/types.js b/PBandGraphScaffold/node_modules/hono/dist/utils/types.js deleted file mode 100644 index e69de29..0000000 diff --git a/PBandGraphScaffold/node_modules/hono/dist/utils/url.js b/PBandGraphScaffold/node_modules/hono/dist/utils/url.js deleted file mode 100644 index 5a77e2a..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/utils/url.js +++ /dev/null @@ -1,219 +0,0 @@ -// src/utils/url.ts -var splitPath = (path) => { - const paths = path.split("/"); - if (paths[0] === "") { - paths.shift(); - } - return paths; -}; -var splitRoutingPath = (routePath) => { - const { groups, path } = extractGroupsFromPath(routePath); - const paths = splitPath(path); - return replaceGroupMarks(paths, groups); -}; -var extractGroupsFromPath = (path) => { - const groups = []; - path = path.replace(/\{[^}]+\}/g, (match, index) => { - const mark = `@${index}`; - groups.push([mark, match]); - return mark; - }); - return { groups, path }; -}; -var replaceGroupMarks = (paths, groups) => { - for (let i = groups.length - 1; i >= 0; i--) { - const [mark] = groups[i]; - for (let j = paths.length - 1; j >= 0; j--) { - if (paths[j].includes(mark)) { - paths[j] = paths[j].replace(mark, groups[i][1]); - break; - } - } - } - return paths; -}; -var patternCache = {}; -var getPattern = (label, next) => { - if (label === "*") { - return "*"; - } - const match = label.match(/^\:([^\{\}]+)(?:\{(.+)\})?$/); - if (match) { - const cacheKey = `${label}#${next}`; - if (!patternCache[cacheKey]) { - if (match[2]) { - patternCache[cacheKey] = next && next[0] !== ":" && next[0] !== "*" ? [cacheKey, match[1], new RegExp(`^${match[2]}(?=/${next})`)] : [label, match[1], new RegExp(`^${match[2]}$`)]; - } else { - patternCache[cacheKey] = [label, match[1], true]; - } - } - return patternCache[cacheKey]; - } - return null; -}; -var tryDecode = (str, decoder) => { - try { - return decoder(str); - } catch { - return str.replace(/(?:%[0-9A-Fa-f]{2})+/g, (match) => { - try { - return decoder(match); - } catch { - return match; - } - }); - } -}; -var tryDecodeURI = (str) => tryDecode(str, decodeURI); -var getPath = (request) => { - const url = request.url; - const start = url.indexOf("/", url.indexOf(":") + 4); - let i = start; - for (; i < url.length; i++) { - const charCode = url.charCodeAt(i); - if (charCode === 37) { - const queryIndex = url.indexOf("?", i); - const path = url.slice(start, queryIndex === -1 ? void 0 : queryIndex); - return tryDecodeURI(path.includes("%25") ? path.replace(/%25/g, "%2525") : path); - } else if (charCode === 63) { - break; - } - } - return url.slice(start, i); -}; -var getQueryStrings = (url) => { - const queryIndex = url.indexOf("?", 8); - return queryIndex === -1 ? "" : "?" + url.slice(queryIndex + 1); -}; -var getPathNoStrict = (request) => { - const result = getPath(request); - return result.length > 1 && result.at(-1) === "/" ? result.slice(0, -1) : result; -}; -var mergePath = (base, sub, ...rest) => { - if (rest.length) { - sub = mergePath(sub, ...rest); - } - return `${base?.[0] === "/" ? "" : "/"}${base}${sub === "/" ? "" : `${base?.at(-1) === "/" ? "" : "/"}${sub?.[0] === "/" ? sub.slice(1) : sub}`}`; -}; -var checkOptionalParameter = (path) => { - if (path.charCodeAt(path.length - 1) !== 63 || !path.includes(":")) { - return null; - } - const segments = path.split("/"); - const results = []; - let basePath = ""; - segments.forEach((segment) => { - if (segment !== "" && !/\:/.test(segment)) { - basePath += "/" + segment; - } else if (/\:/.test(segment)) { - if (/\?/.test(segment)) { - if (results.length === 0 && basePath === "") { - results.push("/"); - } else { - results.push(basePath); - } - const optionalSegment = segment.replace("?", ""); - basePath += "/" + optionalSegment; - results.push(basePath); - } else { - basePath += "/" + segment; - } - } - }); - return results.filter((v, i, a) => a.indexOf(v) === i); -}; -var _decodeURI = (value) => { - if (!/[%+]/.test(value)) { - return value; - } - if (value.indexOf("+") !== -1) { - value = value.replace(/\+/g, " "); - } - return value.indexOf("%") !== -1 ? tryDecode(value, decodeURIComponent_) : value; -}; -var _getQueryParam = (url, key, multiple) => { - let encoded; - if (!multiple && key && !/[%+]/.test(key)) { - let keyIndex2 = url.indexOf("?", 8); - if (keyIndex2 === -1) { - return void 0; - } - if (!url.startsWith(key, keyIndex2 + 1)) { - keyIndex2 = url.indexOf(`&${key}`, keyIndex2 + 1); - } - while (keyIndex2 !== -1) { - const trailingKeyCode = url.charCodeAt(keyIndex2 + key.length + 1); - if (trailingKeyCode === 61) { - const valueIndex = keyIndex2 + key.length + 2; - const endIndex = url.indexOf("&", valueIndex); - return _decodeURI(url.slice(valueIndex, endIndex === -1 ? void 0 : endIndex)); - } else if (trailingKeyCode == 38 || isNaN(trailingKeyCode)) { - return ""; - } - keyIndex2 = url.indexOf(`&${key}`, keyIndex2 + 1); - } - encoded = /[%+]/.test(url); - if (!encoded) { - return void 0; - } - } - const results = {}; - encoded ??= /[%+]/.test(url); - let keyIndex = url.indexOf("?", 8); - while (keyIndex !== -1) { - const nextKeyIndex = url.indexOf("&", keyIndex + 1); - let valueIndex = url.indexOf("=", keyIndex); - if (valueIndex > nextKeyIndex && nextKeyIndex !== -1) { - valueIndex = -1; - } - let name = url.slice( - keyIndex + 1, - valueIndex === -1 ? nextKeyIndex === -1 ? void 0 : nextKeyIndex : valueIndex - ); - if (encoded) { - name = _decodeURI(name); - } - keyIndex = nextKeyIndex; - if (name === "") { - continue; - } - let value; - if (valueIndex === -1) { - value = ""; - } else { - value = url.slice(valueIndex + 1, nextKeyIndex === -1 ? void 0 : nextKeyIndex); - if (encoded) { - value = _decodeURI(value); - } - } - if (multiple) { - if (!(results[name] && Array.isArray(results[name]))) { - results[name] = []; - } - ; - results[name].push(value); - } else { - results[name] ??= value; - } - } - return key ? results[key] : results; -}; -var getQueryParam = _getQueryParam; -var getQueryParams = (url, key) => { - return _getQueryParam(url, key, true); -}; -var decodeURIComponent_ = decodeURIComponent; -export { - checkOptionalParameter, - decodeURIComponent_, - getPath, - getPathNoStrict, - getPattern, - getQueryParam, - getQueryParams, - getQueryStrings, - mergePath, - splitPath, - splitRoutingPath, - tryDecode -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/validator/index.js b/PBandGraphScaffold/node_modules/hono/dist/validator/index.js deleted file mode 100644 index a8f176b..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/validator/index.js +++ /dev/null @@ -1,5 +0,0 @@ -// src/validator/index.ts -import { validator } from "./validator.js"; -export { - validator -}; diff --git a/PBandGraphScaffold/node_modules/hono/dist/validator/validator.js b/PBandGraphScaffold/node_modules/hono/dist/validator/validator.js deleted file mode 100644 index 6b3689a..0000000 --- a/PBandGraphScaffold/node_modules/hono/dist/validator/validator.js +++ /dev/null @@ -1,86 +0,0 @@ -// src/validator/validator.ts -import { getCookie } from "../helper/cookie/index.js"; -import { HTTPException } from "../http-exception.js"; -import { bufferToFormData } from "../utils/buffer.js"; -var jsonRegex = /^application\/([a-z-\.]+\+)?json(;\s*[a-zA-Z0-9\-]+\=([^;]+))*$/; -var multipartRegex = /^multipart\/form-data(;\s?boundary=[a-zA-Z0-9'"()+_,\-./:=?]+)?$/; -var urlencodedRegex = /^application\/x-www-form-urlencoded(;\s*[a-zA-Z0-9\-]+\=([^;]+))*$/; -var validator = (target, validationFunc) => { - return async (c, next) => { - let value = {}; - const contentType = c.req.header("Content-Type"); - switch (target) { - case "json": - if (!contentType || !jsonRegex.test(contentType)) { - break; - } - try { - value = await c.req.json(); - } catch { - const message = "Malformed JSON in request body"; - throw new HTTPException(400, { message }); - } - break; - case "form": { - if (!contentType || !(multipartRegex.test(contentType) || urlencodedRegex.test(contentType))) { - break; - } - let formData; - if (c.req.bodyCache.formData) { - formData = await c.req.bodyCache.formData; - } else { - try { - const arrayBuffer = await c.req.arrayBuffer(); - formData = await bufferToFormData(arrayBuffer, contentType); - c.req.bodyCache.formData = formData; - } catch (e) { - let message = "Malformed FormData request."; - message += e instanceof Error ? ` ${e.message}` : ` ${String(e)}`; - throw new HTTPException(400, { message }); - } - } - const form = {}; - formData.forEach((value2, key) => { - if (key.endsWith("[]")) { - ; - (form[key] ??= []).push(value2); - } else if (Array.isArray(form[key])) { - ; - form[key].push(value2); - } else if (key in form) { - form[key] = [form[key], value2]; - } else { - form[key] = value2; - } - }); - value = form; - break; - } - case "query": - value = Object.fromEntries( - Object.entries(c.req.queries()).map(([k, v]) => { - return v.length === 1 ? [k, v[0]] : [k, v]; - }) - ); - break; - case "param": - value = c.req.param(); - break; - case "header": - value = c.req.header(); - break; - case "cookie": - value = getCookie(c); - break; - } - const res = await validationFunc(value, c); - if (res instanceof Response) { - return res; - } - c.req.addValidatedData(target, res); - return await next(); - }; -}; -export { - validator -}; diff --git a/PBandGraphScaffold/node_modules/hono/package.json b/PBandGraphScaffold/node_modules/hono/package.json deleted file mode 100644 index 9b6c4d6..0000000 --- a/PBandGraphScaffold/node_modules/hono/package.json +++ /dev/null @@ -1,691 +0,0 @@ -{ - "name": "hono", - "version": "4.11.1", - "description": "Web framework built on Web Standards", - "main": "dist/cjs/index.js", - "type": "module", - "module": "dist/index.js", - "types": "dist/types/index.d.ts", - "files": [ - "dist" - ], - "scripts": { - "test": "tsc --noEmit && vitest --run", - "test:watch": "vitest --watch", - "test:deno": "deno test --allow-read --allow-env --allow-write --allow-net -c runtime-tests/deno/deno.json runtime-tests/deno && deno test --no-lock -c runtime-tests/deno-jsx/deno.precompile.json runtime-tests/deno-jsx && deno test --no-lock -c runtime-tests/deno-jsx/deno.react-jsx.json runtime-tests/deno-jsx", - "test:bun": "bun test --jsx-import-source ../../src/jsx runtime-tests/bun/*", - "test:fastly": "vitest --run --project fastly", - "test:node": "vitest --run --project node", - "test:workerd": "vitest --run --project workerd", - "test:lambda": "vitest --run --project lambda", - "test:lambda-edge": "vitest --run --project lambda-edge", - "test:all": "bun run test && bun test:deno && bun test:bun", - "lint": "eslint src runtime-tests build perf-measures benchmarks", - "lint:fix": "eslint src runtime-tests build perf-measures benchmarks --fix", - "format": "prettier --check --cache \"src/**/*.{js,ts,tsx}\" \"runtime-tests/**/*.{js,ts,tsx}\" \"build/**/*.{js,ts,tsx}\" \"perf-measures/**/*.{js,ts,tsx}\" \"benchmarks/**/*.{js,ts,tsx}\"", - "format:fix": "prettier --write --cache --cache-strategy metadata \"src/**/*.{js,ts,tsx}\" \"runtime-tests/**/*.{js,ts,tsx}\" \"build/**/*.{js,ts,tsx}\" \"perf-measures/**/*.{js,ts,tsx}\" \"benchmarks/**/*.{js,ts,tsx}\"", - "editorconfig-checker": "editorconfig-checker", - "copy:package.cjs.json": "cp ./package.cjs.json ./dist/cjs/package.json && cp ./package.cjs.json ./dist/types/package.json", - "build": "bun run --shell bun remove-dist && bun ./build/build.ts && bun run copy:package.cjs.json", - "postbuild": "publint", - "watch": "bun run --shell bun remove-dist && bun ./build/build.ts --watch && bun run copy:package.cjs.json", - "coverage": "vitest --run --coverage", - "prerelease": "bun test:deno && bun run build", - "release": "np", - "remove-dist": "rm -rf dist" - }, - "exports": { - ".": { - "types": "./dist/types/index.d.ts", - "import": "./dist/index.js", - "require": "./dist/cjs/index.js" - }, - "./request": { - "types": "./dist/types/request.d.ts", - "import": "./dist/request.js", - "require": "./dist/cjs/request.js" - }, - "./types": { - "types": "./dist/types/types.d.ts", - "import": "./dist/types.js", - "require": "./dist/cjs/types.js" - }, - "./hono-base": { - "types": "./dist/types/hono-base.d.ts", - "import": "./dist/hono-base.js", - "require": "./dist/cjs/hono-base.js" - }, - "./tiny": { - "types": "./dist/types/preset/tiny.d.ts", - "import": "./dist/preset/tiny.js", - "require": "./dist/cjs/preset/tiny.js" - }, - "./quick": { - "types": "./dist/types/preset/quick.d.ts", - "import": "./dist/preset/quick.js", - "require": "./dist/cjs/preset/quick.js" - }, - "./http-exception": { - "types": "./dist/types/http-exception.d.ts", - "import": "./dist/http-exception.js", - "require": "./dist/cjs/http-exception.js" - }, - "./basic-auth": { - "types": "./dist/types/middleware/basic-auth/index.d.ts", - "import": "./dist/middleware/basic-auth/index.js", - "require": "./dist/cjs/middleware/basic-auth/index.js" - }, - "./bearer-auth": { - "types": "./dist/types/middleware/bearer-auth/index.d.ts", - "import": "./dist/middleware/bearer-auth/index.js", - "require": "./dist/cjs/middleware/bearer-auth/index.js" - }, - "./body-limit": { - "types": "./dist/types/middleware/body-limit/index.d.ts", - "import": "./dist/middleware/body-limit/index.js", - "require": "./dist/cjs/middleware/body-limit/index.js" - }, - "./ip-restriction": { - "types": "./dist/types/middleware/ip-restriction/index.d.ts", - "import": "./dist/middleware/ip-restriction/index.js", - "require": "./dist/cjs/middleware/ip-restriction/index.js" - }, - "./cache": { - "types": "./dist/types/middleware/cache/index.d.ts", - "import": "./dist/middleware/cache/index.js", - "require": "./dist/cjs/middleware/cache/index.js" - }, - "./route": { - "types": "./dist/types/helper/route/index.d.ts", - "import": "./dist/helper/route/index.js", - "require": "./dist/cjs/helper/route/index.js" - }, - "./cookie": { - "types": "./dist/types/helper/cookie/index.d.ts", - "import": "./dist/helper/cookie/index.js", - "require": "./dist/cjs/helper/cookie/index.js" - }, - "./accepts": { - "types": "./dist/types/helper/accepts/index.d.ts", - "import": "./dist/helper/accepts/index.js", - "require": "./dist/cjs/helper/accepts/index.js" - }, - "./compress": { - "types": "./dist/types/middleware/compress/index.d.ts", - "import": "./dist/middleware/compress/index.js", - "require": "./dist/cjs/middleware/compress/index.js" - }, - "./context-storage": { - "types": "./dist/types/middleware/context-storage/index.d.ts", - "import": "./dist/middleware/context-storage/index.js", - "require": "./dist/cjs/middleware/context-storage/index.js" - }, - "./cors": { - "types": "./dist/types/middleware/cors/index.d.ts", - "import": "./dist/middleware/cors/index.js", - "require": "./dist/cjs/middleware/cors/index.js" - }, - "./csrf": { - "types": "./dist/types/middleware/csrf/index.d.ts", - "import": "./dist/middleware/csrf/index.js", - "require": "./dist/cjs/middleware/csrf/index.js" - }, - "./etag": { - "types": "./dist/types/middleware/etag/index.d.ts", - "import": "./dist/middleware/etag/index.js", - "require": "./dist/cjs/middleware/etag/index.js" - }, - "./trailing-slash": { - "types": "./dist/types/middleware/trailing-slash/index.d.ts", - "import": "./dist/middleware/trailing-slash/index.js", - "require": "./dist/cjs/middleware/trailing-slash/index.js" - }, - "./html": { - "types": "./dist/types/helper/html/index.d.ts", - "import": "./dist/helper/html/index.js", - "require": "./dist/cjs/helper/html/index.js" - }, - "./css": { - "types": "./dist/types/helper/css/index.d.ts", - "import": "./dist/helper/css/index.js", - "require": "./dist/cjs/helper/css/index.js" - }, - "./jsx": { - "types": "./dist/types/jsx/index.d.ts", - "import": "./dist/jsx/index.js", - "require": "./dist/cjs/jsx/index.js" - }, - "./jsx/jsx-dev-runtime": { - "types": "./dist/types/jsx/jsx-dev-runtime.d.ts", - "import": "./dist/jsx/jsx-dev-runtime.js", - "require": "./dist/cjs/jsx/jsx-dev-runtime.js" - }, - "./jsx/jsx-runtime": { - "types": "./dist/types/jsx/jsx-runtime.d.ts", - "import": "./dist/jsx/jsx-runtime.js", - "require": "./dist/cjs/jsx/jsx-runtime.js" - }, - "./jsx/streaming": { - "types": "./dist/types/jsx/streaming.d.ts", - "import": "./dist/jsx/streaming.js", - "require": "./dist/cjs/jsx/streaming.js" - }, - "./jsx-renderer": { - "types": "./dist/types/middleware/jsx-renderer/index.d.ts", - "import": "./dist/middleware/jsx-renderer/index.js", - "require": "./dist/cjs/middleware/jsx-renderer/index.js" - }, - "./jsx/dom": { - "types": "./dist/types/jsx/dom/index.d.ts", - "import": "./dist/jsx/dom/index.js", - "require": "./dist/cjs/jsx/dom/index.js" - }, - "./jsx/dom/jsx-dev-runtime": { - "types": "./dist/types/jsx/dom/jsx-dev-runtime.d.ts", - "import": "./dist/jsx/dom/jsx-dev-runtime.js", - "require": "./dist/cjs/jsx/dom/jsx-dev-runtime.js" - }, - "./jsx/dom/jsx-runtime": { - "types": "./dist/types/jsx/dom/jsx-runtime.d.ts", - "import": "./dist/jsx/dom/jsx-runtime.js", - "require": "./dist/cjs/jsx/dom/jsx-runtime.js" - }, - "./jsx/dom/client": { - "types": "./dist/types/jsx/dom/client.d.ts", - "import": "./dist/jsx/dom/client.js", - "require": "./dist/cjs/jsx/dom/client.js" - }, - "./jsx/dom/css": { - "types": "./dist/types/jsx/dom/css.d.ts", - "import": "./dist/jsx/dom/css.js", - "require": "./dist/cjs/jsx/dom/css.js" - }, - "./jsx/dom/server": { - "types": "./dist/types/jsx/dom/server.d.ts", - "import": "./dist/jsx/dom/server.js", - "require": "./dist/cjs/jsx/dom/server.js" - }, - "./jwt": { - "types": "./dist/types/middleware/jwt/index.d.ts", - "import": "./dist/middleware/jwt/index.js", - "require": "./dist/cjs/middleware/jwt/index.js" - }, - "./jwk": { - "types": "./dist/types/middleware/jwk/index.d.ts", - "import": "./dist/middleware/jwk/index.js", - "require": "./dist/cjs/middleware/jwk/index.js" - }, - "./timeout": { - "types": "./dist/types/middleware/timeout/index.d.ts", - "import": "./dist/middleware/timeout/index.js", - "require": "./dist/cjs/middleware/timeout/index.js" - }, - "./timing": { - "types": "./dist/types/middleware/timing/index.d.ts", - "import": "./dist/middleware/timing/index.js", - "require": "./dist/cjs/middleware/timing/index.js" - }, - "./logger": { - "types": "./dist/types/middleware/logger/index.d.ts", - "import": "./dist/middleware/logger/index.js", - "require": "./dist/cjs/middleware/logger/index.js" - }, - "./method-override": { - "types": "./dist/types/middleware/method-override/index.d.ts", - "import": "./dist/middleware/method-override/index.js", - "require": "./dist/cjs/middleware/method-override/index.js" - }, - "./powered-by": { - "types": "./dist/types/middleware/powered-by/index.d.ts", - "import": "./dist/middleware/powered-by/index.js", - "require": "./dist/cjs/middleware/powered-by/index.js" - }, - "./pretty-json": { - "types": "./dist/types/middleware/pretty-json/index.d.ts", - "import": "./dist/middleware/pretty-json/index.js", - "require": "./dist/cjs/middleware/pretty-json/index.js" - }, - "./request-id": { - "types": "./dist/types/middleware/request-id/index.d.ts", - "import": "./dist/middleware/request-id/index.js", - "require": "./dist/cjs/middleware/request-id/index.js" - }, - "./language": { - "types": "./dist/types/middleware/language/index.d.ts", - "import": "./dist/middleware/language/index.js", - "require": "./dist/cjs/middleware/language/index.js" - }, - "./secure-headers": { - "types": "./dist/types/middleware/secure-headers/index.d.ts", - "import": "./dist/middleware/secure-headers/index.js", - "require": "./dist/cjs/middleware/secure-headers/index.js" - }, - "./combine": { - "types": "./dist/types/middleware/combine/index.d.ts", - "import": "./dist/middleware/combine/index.js", - "require": "./dist/cjs/middleware/combine/index.js" - }, - "./ssg": { - "types": "./dist/types/helper/ssg/index.d.ts", - "import": "./dist/helper/ssg/index.js", - "require": "./dist/cjs/helper/ssg/index.js" - }, - "./streaming": { - "types": "./dist/types/helper/streaming/index.d.ts", - "import": "./dist/helper/streaming/index.js", - "require": "./dist/cjs/helper/streaming/index.js" - }, - "./validator": { - "types": "./dist/types/validator/index.d.ts", - "import": "./dist/validator/index.js", - "require": "./dist/cjs/validator/index.js" - }, - "./router": { - "types": "./dist/types/router.d.ts", - "import": "./dist/router.js", - "require": "./dist/cjs/router.js" - }, - "./router/reg-exp-router": { - "types": "./dist/types/router/reg-exp-router/index.d.ts", - "import": "./dist/router/reg-exp-router/index.js", - "require": "./dist/cjs/router/reg-exp-router/index.js" - }, - "./router/smart-router": { - "types": "./dist/types/router/smart-router/index.d.ts", - "import": "./dist/router/smart-router/index.js", - "require": "./dist/cjs/router/smart-router/index.js" - }, - "./router/trie-router": { - "types": "./dist/types/router/trie-router/index.d.ts", - "import": "./dist/router/trie-router/index.js", - "require": "./dist/cjs/router/trie-router/index.js" - }, - "./router/pattern-router": { - "types": "./dist/types/router/pattern-router/index.d.ts", - "import": "./dist/router/pattern-router/index.js", - "require": "./dist/cjs/router/pattern-router/index.js" - }, - "./router/linear-router": { - "types": "./dist/types/router/linear-router/index.d.ts", - "import": "./dist/router/linear-router/index.js", - "require": "./dist/cjs/router/linear-router/index.js" - }, - "./utils/jwt": { - "types": "./dist/types/utils/jwt/index.d.ts", - "import": "./dist/utils/jwt/index.js", - "require": "./dist/cjs/utils/jwt/index.js" - }, - "./utils/*": { - "types": "./dist/types/utils/*.d.ts", - "import": "./dist/utils/*.js", - "require": "./dist/cjs/utils/*.js" - }, - "./client": { - "types": "./dist/types/client/index.d.ts", - "import": "./dist/client/index.js", - "require": "./dist/cjs/client/index.js" - }, - "./adapter": { - "types": "./dist/types/helper/adapter/index.d.ts", - "import": "./dist/helper/adapter/index.js", - "require": "./dist/cjs/helper/adapter/index.js" - }, - "./factory": { - "types": "./dist/types/helper/factory/index.d.ts", - "import": "./dist/helper/factory/index.js", - "require": "./dist/cjs/helper/factory/index.js" - }, - "./serve-static": { - "types": "./dist/types/middleware/serve-static/index.d.ts", - "import": "./dist/middleware/serve-static/index.js", - "require": "./dist/cjs/middleware/serve-static/index.js" - }, - "./cloudflare-workers": { - "types": "./dist/types/adapter/cloudflare-workers/index.d.ts", - "import": "./dist/adapter/cloudflare-workers/index.js", - "require": "./dist/cjs/adapter/cloudflare-workers/index.js" - }, - "./cloudflare-pages": { - "types": "./dist/types/adapter/cloudflare-pages/index.d.ts", - "import": "./dist/adapter/cloudflare-pages/index.js", - "require": "./dist/cjs/adapter/cloudflare-pages/index.js" - }, - "./deno": { - "types": "./dist/types/adapter/deno/index.d.ts", - "import": "./dist/adapter/deno/index.js", - "require": "./dist/cjs/adapter/deno/index.js" - }, - "./bun": { - "types": "./dist/types/adapter/bun/index.d.ts", - "import": "./dist/adapter/bun/index.js", - "require": "./dist/cjs/adapter/bun/index.js" - }, - "./aws-lambda": { - "types": "./dist/types/adapter/aws-lambda/index.d.ts", - "import": "./dist/adapter/aws-lambda/index.js", - "require": "./dist/cjs/adapter/aws-lambda/index.js" - }, - "./vercel": { - "types": "./dist/types/adapter/vercel/index.d.ts", - "import": "./dist/adapter/vercel/index.js", - "require": "./dist/cjs/adapter/vercel/index.js" - }, - "./netlify": { - "types": "./dist/types/adapter/netlify/index.d.ts", - "import": "./dist/adapter/netlify/index.js", - "require": "./dist/cjs/adapter/netlify/index.js" - }, - "./lambda-edge": { - "types": "./dist/types/adapter/lambda-edge/index.d.ts", - "import": "./dist/adapter/lambda-edge/index.js", - "require": "./dist/cjs/adapter/lambda-edge/index.js" - }, - "./service-worker": { - "types": "./dist/types/adapter/service-worker/index.d.ts", - "import": "./dist/adapter/service-worker/index.js", - "require": "./dist/cjs/adapter/service-worker/index.js" - }, - "./testing": { - "types": "./dist/types/helper/testing/index.d.ts", - "import": "./dist/helper/testing/index.js", - "require": "./dist/cjs/helper/testing/index.js" - }, - "./dev": { - "types": "./dist/types/helper/dev/index.d.ts", - "import": "./dist/helper/dev/index.js", - "require": "./dist/cjs/helper/dev/index.js" - }, - "./ws": { - "types": "./dist/types/helper/websocket/index.d.ts", - "import": "./dist/helper/websocket/index.js", - "require": "./dist/cjs/helper/websocket/index.js" - }, - "./conninfo": { - "types": "./dist/types/helper/conninfo/index.d.ts", - "import": "./dist/helper/conninfo/index.js", - "require": "./dist/cjs/helper/conninfo/index.js" - }, - "./proxy": { - "types": "./dist/types/helper/proxy/index.d.ts", - "import": "./dist/helper/proxy/index.js", - "require": "./dist/cjs/helper/proxy/index.js" - } - }, - "typesVersions": { - "*": { - "request": [ - "./dist/types/request" - ], - "types": [ - "./dist/types/types" - ], - "hono-base": [ - "./dist/types/hono-base" - ], - "tiny": [ - "./dist/types/preset/tiny" - ], - "quick": [ - "./dist/types/preset/quick" - ], - "http-exception": [ - "./dist/types/http-exception" - ], - "basic-auth": [ - "./dist/types/middleware/basic-auth" - ], - "bearer-auth": [ - "./dist/types/middleware/bearer-auth" - ], - "body-limit": [ - "./dist/types/middleware/body-limit" - ], - "ip-restriction": [ - "./dist/types/middleware/ip-restriction" - ], - "cache": [ - "./dist/types/middleware/cache" - ], - "route": [ - "./dist/types/helper/route" - ], - "cookie": [ - "./dist/types/helper/cookie" - ], - "accepts": [ - "./dist/types/helper/accepts" - ], - "compress": [ - "./dist/types/middleware/compress" - ], - "context-storage": [ - "./dist/types/middleware/context-storage" - ], - "cors": [ - "./dist/types/middleware/cors" - ], - "csrf": [ - "./dist/types/middleware/csrf" - ], - "etag": [ - "./dist/types/middleware/etag" - ], - "trailing-slash": [ - "./dist/types/middleware/trailing-slash" - ], - "html": [ - "./dist/types/helper/html" - ], - "css": [ - "./dist/types/helper/css" - ], - "jsx": [ - "./dist/types/jsx" - ], - "jsx/jsx-runtime": [ - "./dist/types/jsx/jsx-runtime.d.ts" - ], - "jsx/jsx-dev-runtime": [ - "./dist/types/jsx/jsx-dev-runtime.d.ts" - ], - "jsx/streaming": [ - "./dist/types/jsx/streaming.d.ts" - ], - "jsx-renderer": [ - "./dist/types/middleware/jsx-renderer" - ], - "jsx/dom": [ - "./dist/types/jsx/dom" - ], - "jsx/dom/client": [ - "./dist/types/jsx/dom/client.d.ts" - ], - "jsx/dom/css": [ - "./dist/types/jsx/dom/css.d.ts" - ], - "jsx/dom/server": [ - "./dist/types/jsx/dom/server.d.ts" - ], - "jwt": [ - "./dist/types/middleware/jwt" - ], - "timeout": [ - "./dist/types/middleware/timeout" - ], - "timing": [ - "./dist/types/middleware/timing" - ], - "logger": [ - "./dist/types/middleware/logger" - ], - "method-override": [ - "./dist/types/middleware/method-override" - ], - "powered-by": [ - "./dist/types/middleware/powered-by" - ], - "pretty-json": [ - "./dist/types/middleware/pretty-json" - ], - "request-id": [ - "./dist/types/middleware/request-id" - ], - "language": [ - "./dist/types/middleware/language" - ], - "streaming": [ - "./dist/types/helper/streaming" - ], - "ssg": [ - "./dist/types/helper/ssg" - ], - "secure-headers": [ - "./dist/types/middleware/secure-headers" - ], - "combine": [ - "./dist/types/middleware/combine" - ], - "validator": [ - "./dist/types/validator/index.d.ts" - ], - "router": [ - "./dist/types/router.d.ts" - ], - "router/reg-exp-router": [ - "./dist/types/router/reg-exp-router/router.d.ts" - ], - "router/smart-router": [ - "./dist/types/router/smart-router/router.d.ts" - ], - "router/trie-router": [ - "./dist/types/router/trie-router/router.d.ts" - ], - "router/pattern-router": [ - "./dist/types/router/pattern-router/router.d.ts" - ], - "router/linear-router": [ - "./dist/types/router/linear-router/router.d.ts" - ], - "utils/jwt": [ - "./dist/types/utils/jwt/index.d.ts" - ], - "utils/*": [ - "./dist/types/utils/*" - ], - "client": [ - "./dist/types/client/index.d.ts" - ], - "adapter": [ - "./dist/types/helper/adapter/index.d.ts" - ], - "factory": [ - "./dist/types/helper/factory/index.d.ts" - ], - "serve-static": [ - "./dist/types/middleware/serve-static" - ], - "cloudflare-workers": [ - "./dist/types/adapter/cloudflare-workers" - ], - "cloudflare-pages": [ - "./dist/types/adapter/cloudflare-pages" - ], - "deno": [ - "./dist/types/adapter/deno" - ], - "bun": [ - "./dist/types/adapter/bun" - ], - "nextjs": [ - "./dist/types/adapter/nextjs" - ], - "aws-lambda": [ - "./dist/types/adapter/aws-lambda" - ], - "vercel": [ - "./dist/types/adapter/vercel" - ], - "lambda-edge": [ - "./dist/types/adapter/lambda-edge" - ], - "service-worker": [ - "./dist/types/adapter/service-worker" - ], - "testing": [ - "./dist/types/helper/testing" - ], - "dev": [ - "./dist/types/helper/dev" - ], - "ws": [ - "./dist/types/helper/websocket" - ], - "conninfo": [ - "./dist/types/helper/conninfo" - ], - "proxy": [ - "./dist/types/helper/proxy" - ] - } - }, - "author": "Yusuke Wada (https://github.com/yusukebe)", - "license": "MIT", - "repository": { - "type": "git", - "url": "git+https://github.com/honojs/hono.git" - }, - "publishConfig": { - "registry": "https://registry.npmjs.org" - }, - "homepage": "https://hono.dev", - "keywords": [ - "hono", - "web", - "app", - "http", - "application", - "framework", - "router", - "cloudflare", - "workers", - "fastly", - "compute", - "deno", - "bun", - "lambda", - "nodejs" - ], - "devDependencies": { - "@hono/eslint-config": "^2.0.3", - "@hono/node-server": "^1.13.5", - "@types/glob": "^9.0.0", - "@types/jsdom": "^21.1.7", - "@types/node": "^24.3.0", - "@typescript/native-preview": "7.0.0-dev.20250523.1", - "@vitest/coverage-v8": "^3.2.4", - "arg": "^5.0.2", - "bun-types": "^1.2.20", - "editorconfig-checker": "6.1.1", - "esbuild": "^0.27.1", - "eslint": "9.39.1", - "glob": "^11.0.0", - "jsdom": "22.1.0", - "msw": "^2.6.0", - "np": "10.2.0", - "oxc-parser": "^0.96.0", - "pkg-pr-new": "^0.0.53", - "prettier": "3.7.4", - "publint": "0.3.15", - "typescript": "^5.9.2", - "undici": "^6.21.3", - "vite-plugin-fastly-js-compute": "^0.4.2", - "vitest": "^3.2.4", - "wrangler": "4.12.0", - "ws": "^8.18.0", - "zod": "^3.23.8" - }, - "packageManager": "bun@1.2.20", - "engines": { - "node": ">=16.9.0" - } -} diff --git a/PBandGraphScaffold/node_modules/jsonwebtoken/LICENSE b/PBandGraphScaffold/node_modules/jsonwebtoken/LICENSE deleted file mode 100644 index bcd1854..0000000 --- a/PBandGraphScaffold/node_modules/jsonwebtoken/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Auth0, Inc. (http://auth0.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/PBandGraphScaffold/node_modules/jsonwebtoken/README.md b/PBandGraphScaffold/node_modules/jsonwebtoken/README.md deleted file mode 100644 index 4e20dd9..0000000 --- a/PBandGraphScaffold/node_modules/jsonwebtoken/README.md +++ /dev/null @@ -1,396 +0,0 @@ -# jsonwebtoken - -| **Build** | **Dependency** | -|-----------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------| -| [![Build Status](https://secure.travis-ci.org/auth0/node-jsonwebtoken.svg?branch=master)](http://travis-ci.org/auth0/node-jsonwebtoken) | [![Dependency Status](https://david-dm.org/auth0/node-jsonwebtoken.svg)](https://david-dm.org/auth0/node-jsonwebtoken) | - - -An implementation of [JSON Web Tokens](https://tools.ietf.org/html/rfc7519). - -This was developed against `draft-ietf-oauth-json-web-token-08`. It makes use of [node-jws](https://github.com/brianloveswords/node-jws) - -# Install - -```bash -$ npm install jsonwebtoken -``` - -# Migration notes - -* [From v8 to v9](https://github.com/auth0/node-jsonwebtoken/wiki/Migration-Notes:-v8-to-v9) -* [From v7 to v8](https://github.com/auth0/node-jsonwebtoken/wiki/Migration-Notes:-v7-to-v8) - -# Usage - -### jwt.sign(payload, secretOrPrivateKey, [options, callback]) - -(Asynchronous) If a callback is supplied, the callback is called with the `err` or the JWT. - -(Synchronous) Returns the JsonWebToken as string - -`payload` could be an object literal, buffer or string representing valid JSON. -> **Please _note_ that** `exp` or any other claim is only set if the payload is an object literal. Buffer or string payloads are not checked for JSON validity. - -> If `payload` is not a buffer or a string, it will be coerced into a string using `JSON.stringify`. - -`secretOrPrivateKey` is a string (utf-8 encoded), buffer, object, or KeyObject containing either the secret for HMAC algorithms or the PEM -encoded private key for RSA and ECDSA. In case of a private key with passphrase an object `{ key, passphrase }` can be used (based on [crypto documentation](https://nodejs.org/api/crypto.html#crypto_sign_sign_private_key_output_format)), in this case be sure you pass the `algorithm` option. -When signing with RSA algorithms the minimum modulus length is 2048 except when the allowInsecureKeySizes option is set to true. Private keys below this size will be rejected with an error. - -`options`: - -* `algorithm` (default: `HS256`) -* `expiresIn`: expressed in seconds or a string describing a time span [vercel/ms](https://github.com/vercel/ms). - > Eg: `60`, `"2 days"`, `"10h"`, `"7d"`. A numeric value is interpreted as a seconds count. If you use a string be sure you provide the time units (days, hours, etc), otherwise milliseconds unit is used by default (`"120"` is equal to `"120ms"`). -* `notBefore`: expressed in seconds or a string describing a time span [vercel/ms](https://github.com/vercel/ms). - > Eg: `60`, `"2 days"`, `"10h"`, `"7d"`. A numeric value is interpreted as a seconds count. If you use a string be sure you provide the time units (days, hours, etc), otherwise milliseconds unit is used by default (`"120"` is equal to `"120ms"`). -* `audience` -* `issuer` -* `jwtid` -* `subject` -* `noTimestamp` -* `header` -* `keyid` -* `mutatePayload`: if true, the sign function will modify the payload object directly. This is useful if you need a raw reference to the payload after claims have been applied to it but before it has been encoded into a token. -* `allowInsecureKeySizes`: if true allows private keys with a modulus below 2048 to be used for RSA -* `allowInvalidAsymmetricKeyTypes`: if true, allows asymmetric keys which do not match the specified algorithm. This option is intended only for backwards compatability and should be avoided. - - - -> There are no default values for `expiresIn`, `notBefore`, `audience`, `subject`, `issuer`. These claims can also be provided in the payload directly with `exp`, `nbf`, `aud`, `sub` and `iss` respectively, but you **_can't_** include in both places. - -Remember that `exp`, `nbf` and `iat` are **NumericDate**, see related [Token Expiration (exp claim)](#token-expiration-exp-claim) - - -The header can be customized via the `options.header` object. - -Generated jwts will include an `iat` (issued at) claim by default unless `noTimestamp` is specified. If `iat` is inserted in the payload, it will be used instead of the real timestamp for calculating other things like `exp` given a timespan in `options.expiresIn`. - -Synchronous Sign with default (HMAC SHA256) - -```js -var jwt = require('jsonwebtoken'); -var token = jwt.sign({ foo: 'bar' }, 'shhhhh'); -``` - -Synchronous Sign with RSA SHA256 -```js -// sign with RSA SHA256 -var privateKey = fs.readFileSync('private.key'); -var token = jwt.sign({ foo: 'bar' }, privateKey, { algorithm: 'RS256' }); -``` - -Sign asynchronously -```js -jwt.sign({ foo: 'bar' }, privateKey, { algorithm: 'RS256' }, function(err, token) { - console.log(token); -}); -``` - -Backdate a jwt 30 seconds -```js -var older_token = jwt.sign({ foo: 'bar', iat: Math.floor(Date.now() / 1000) - 30 }, 'shhhhh'); -``` - -#### Token Expiration (exp claim) - -The standard for JWT defines an `exp` claim for expiration. The expiration is represented as a **NumericDate**: - -> A JSON numeric value representing the number of seconds from 1970-01-01T00:00:00Z UTC until the specified UTC date/time, ignoring leap seconds. This is equivalent to the IEEE Std 1003.1, 2013 Edition [POSIX.1] definition "Seconds Since the Epoch", in which each day is accounted for by exactly 86400 seconds, other than that non-integer values can be represented. See RFC 3339 [RFC3339] for details regarding date/times in general and UTC in particular. - -This means that the `exp` field should contain the number of seconds since the epoch. - -Signing a token with 1 hour of expiration: - -```javascript -jwt.sign({ - exp: Math.floor(Date.now() / 1000) + (60 * 60), - data: 'foobar' -}, 'secret'); -``` - -Another way to generate a token like this with this library is: - -```javascript -jwt.sign({ - data: 'foobar' -}, 'secret', { expiresIn: 60 * 60 }); - -//or even better: - -jwt.sign({ - data: 'foobar' -}, 'secret', { expiresIn: '1h' }); -``` - -### jwt.verify(token, secretOrPublicKey, [options, callback]) - -(Asynchronous) If a callback is supplied, function acts asynchronously. The callback is called with the decoded payload if the signature is valid and optional expiration, audience, or issuer are valid. If not, it will be called with the error. - -(Synchronous) If a callback is not supplied, function acts synchronously. Returns the payload decoded if the signature is valid and optional expiration, audience, or issuer are valid. If not, it will throw the error. - -> __Warning:__ When the token comes from an untrusted source (e.g. user input or external requests), the returned decoded payload should be treated like any other user input; please make sure to sanitize and only work with properties that are expected - -`token` is the JsonWebToken string - -`secretOrPublicKey` is a string (utf-8 encoded), buffer, or KeyObject containing either the secret for HMAC algorithms, or the PEM -encoded public key for RSA and ECDSA. -If `jwt.verify` is called asynchronous, `secretOrPublicKey` can be a function that should fetch the secret or public key. See below for a detailed example - -As mentioned in [this comment](https://github.com/auth0/node-jsonwebtoken/issues/208#issuecomment-231861138), there are other libraries that expect base64 encoded secrets (random bytes encoded using base64), if that is your case you can pass `Buffer.from(secret, 'base64')`, by doing this the secret will be decoded using base64 and the token verification will use the original random bytes. - -`options` - -* `algorithms`: List of strings with the names of the allowed algorithms. For instance, `["HS256", "HS384"]`. - > If not specified a defaults will be used based on the type of key provided - > * secret - ['HS256', 'HS384', 'HS512'] - > * rsa - ['RS256', 'RS384', 'RS512'] - > * ec - ['ES256', 'ES384', 'ES512'] - > * default - ['RS256', 'RS384', 'RS512'] -* `audience`: if you want to check audience (`aud`), provide a value here. The audience can be checked against a string, a regular expression or a list of strings and/or regular expressions. - > Eg: `"urn:foo"`, `/urn:f[o]{2}/`, `[/urn:f[o]{2}/, "urn:bar"]` -* `complete`: return an object with the decoded `{ payload, header, signature }` instead of only the usual content of the payload. -* `issuer` (optional): string or array of strings of valid values for the `iss` field. -* `jwtid` (optional): if you want to check JWT ID (`jti`), provide a string value here. -* `ignoreExpiration`: if `true` do not validate the expiration of the token. -* `ignoreNotBefore`... -* `subject`: if you want to check subject (`sub`), provide a value here -* `clockTolerance`: number of seconds to tolerate when checking the `nbf` and `exp` claims, to deal with small clock differences among different servers -* `maxAge`: the maximum allowed age for tokens to still be valid. It is expressed in seconds or a string describing a time span [vercel/ms](https://github.com/vercel/ms). - > Eg: `1000`, `"2 days"`, `"10h"`, `"7d"`. A numeric value is interpreted as a seconds count. If you use a string be sure you provide the time units (days, hours, etc), otherwise milliseconds unit is used by default (`"120"` is equal to `"120ms"`). -* `clockTimestamp`: the time in seconds that should be used as the current time for all necessary comparisons. -* `nonce`: if you want to check `nonce` claim, provide a string value here. It is used on Open ID for the ID Tokens. ([Open ID implementation notes](https://openid.net/specs/openid-connect-core-1_0.html#NonceNotes)) -* `allowInvalidAsymmetricKeyTypes`: if true, allows asymmetric keys which do not match the specified algorithm. This option is intended only for backwards compatability and should be avoided. - -```js -// verify a token symmetric - synchronous -var decoded = jwt.verify(token, 'shhhhh'); -console.log(decoded.foo) // bar - -// verify a token symmetric -jwt.verify(token, 'shhhhh', function(err, decoded) { - console.log(decoded.foo) // bar -}); - -// invalid token - synchronous -try { - var decoded = jwt.verify(token, 'wrong-secret'); -} catch(err) { - // err -} - -// invalid token -jwt.verify(token, 'wrong-secret', function(err, decoded) { - // err - // decoded undefined -}); - -// verify a token asymmetric -var cert = fs.readFileSync('public.pem'); // get public key -jwt.verify(token, cert, function(err, decoded) { - console.log(decoded.foo) // bar -}); - -// verify audience -var cert = fs.readFileSync('public.pem'); // get public key -jwt.verify(token, cert, { audience: 'urn:foo' }, function(err, decoded) { - // if audience mismatch, err == invalid audience -}); - -// verify issuer -var cert = fs.readFileSync('public.pem'); // get public key -jwt.verify(token, cert, { audience: 'urn:foo', issuer: 'urn:issuer' }, function(err, decoded) { - // if issuer mismatch, err == invalid issuer -}); - -// verify jwt id -var cert = fs.readFileSync('public.pem'); // get public key -jwt.verify(token, cert, { audience: 'urn:foo', issuer: 'urn:issuer', jwtid: 'jwtid' }, function(err, decoded) { - // if jwt id mismatch, err == invalid jwt id -}); - -// verify subject -var cert = fs.readFileSync('public.pem'); // get public key -jwt.verify(token, cert, { audience: 'urn:foo', issuer: 'urn:issuer', jwtid: 'jwtid', subject: 'subject' }, function(err, decoded) { - // if subject mismatch, err == invalid subject -}); - -// alg mismatch -var cert = fs.readFileSync('public.pem'); // get public key -jwt.verify(token, cert, { algorithms: ['RS256'] }, function (err, payload) { - // if token alg != RS256, err == invalid signature -}); - -// Verify using getKey callback -// Example uses https://github.com/auth0/node-jwks-rsa as a way to fetch the keys. -var jwksClient = require('jwks-rsa'); -var client = jwksClient({ - jwksUri: 'https://sandrino.auth0.com/.well-known/jwks.json' -}); -function getKey(header, callback){ - client.getSigningKey(header.kid, function(err, key) { - var signingKey = key.publicKey || key.rsaPublicKey; - callback(null, signingKey); - }); -} - -jwt.verify(token, getKey, options, function(err, decoded) { - console.log(decoded.foo) // bar -}); - -``` - -
-Need to peek into a JWT without verifying it? (Click to expand) - -### jwt.decode(token [, options]) - -(Synchronous) Returns the decoded payload without verifying if the signature is valid. - -> __Warning:__ This will __not__ verify whether the signature is valid. You should __not__ use this for untrusted messages. You most likely want to use `jwt.verify` instead. - -> __Warning:__ When the token comes from an untrusted source (e.g. user input or external request), the returned decoded payload should be treated like any other user input; please make sure to sanitize and only work with properties that are expected - - -`token` is the JsonWebToken string - -`options`: - -* `json`: force JSON.parse on the payload even if the header doesn't contain `"typ":"JWT"`. -* `complete`: return an object with the decoded payload and header. - -Example - -```js -// get the decoded payload ignoring signature, no secretOrPrivateKey needed -var decoded = jwt.decode(token); - -// get the decoded payload and header -var decoded = jwt.decode(token, {complete: true}); -console.log(decoded.header); -console.log(decoded.payload) -``` - -
- -## Errors & Codes -Possible thrown errors during verification. -Error is the first argument of the verification callback. - -### TokenExpiredError - -Thrown error if the token is expired. - -Error object: - -* name: 'TokenExpiredError' -* message: 'jwt expired' -* expiredAt: [ExpDate] - -```js -jwt.verify(token, 'shhhhh', function(err, decoded) { - if (err) { - /* - err = { - name: 'TokenExpiredError', - message: 'jwt expired', - expiredAt: 1408621000 - } - */ - } -}); -``` - -### JsonWebTokenError -Error object: - -* name: 'JsonWebTokenError' -* message: - * 'invalid token' - the header or payload could not be parsed - * 'jwt malformed' - the token does not have three components (delimited by a `.`) - * 'jwt signature is required' - * 'invalid signature' - * 'jwt audience invalid. expected: [OPTIONS AUDIENCE]' - * 'jwt issuer invalid. expected: [OPTIONS ISSUER]' - * 'jwt id invalid. expected: [OPTIONS JWT ID]' - * 'jwt subject invalid. expected: [OPTIONS SUBJECT]' - -```js -jwt.verify(token, 'shhhhh', function(err, decoded) { - if (err) { - /* - err = { - name: 'JsonWebTokenError', - message: 'jwt malformed' - } - */ - } -}); -``` - -### NotBeforeError -Thrown if current time is before the nbf claim. - -Error object: - -* name: 'NotBeforeError' -* message: 'jwt not active' -* date: 2018-10-04T16:10:44.000Z - -```js -jwt.verify(token, 'shhhhh', function(err, decoded) { - if (err) { - /* - err = { - name: 'NotBeforeError', - message: 'jwt not active', - date: 2018-10-04T16:10:44.000Z - } - */ - } -}); -``` - - -## Algorithms supported - -Array of supported algorithms. The following algorithms are currently supported. - -| alg Parameter Value | Digital Signature or MAC Algorithm | -|---------------------|------------------------------------------------------------------------| -| HS256 | HMAC using SHA-256 hash algorithm | -| HS384 | HMAC using SHA-384 hash algorithm | -| HS512 | HMAC using SHA-512 hash algorithm | -| RS256 | RSASSA-PKCS1-v1_5 using SHA-256 hash algorithm | -| RS384 | RSASSA-PKCS1-v1_5 using SHA-384 hash algorithm | -| RS512 | RSASSA-PKCS1-v1_5 using SHA-512 hash algorithm | -| PS256 | RSASSA-PSS using SHA-256 hash algorithm (only node ^6.12.0 OR >=8.0.0) | -| PS384 | RSASSA-PSS using SHA-384 hash algorithm (only node ^6.12.0 OR >=8.0.0) | -| PS512 | RSASSA-PSS using SHA-512 hash algorithm (only node ^6.12.0 OR >=8.0.0) | -| ES256 | ECDSA using P-256 curve and SHA-256 hash algorithm | -| ES384 | ECDSA using P-384 curve and SHA-384 hash algorithm | -| ES512 | ECDSA using P-521 curve and SHA-512 hash algorithm | -| none | No digital signature or MAC value included | - -## Refreshing JWTs - -First of all, we recommend you to think carefully if auto-refreshing a JWT will not introduce any vulnerability in your system. - -We are not comfortable including this as part of the library, however, you can take a look at [this example](https://gist.github.com/ziluvatar/a3feb505c4c0ec37059054537b38fc48) to show how this could be accomplished. -Apart from that example there are [an issue](https://github.com/auth0/node-jsonwebtoken/issues/122) and [a pull request](https://github.com/auth0/node-jsonwebtoken/pull/172) to get more knowledge about this topic. - -# TODO - -* X.509 certificate chain is not checked - -## Issue Reporting - -If you have found a bug or if you have a feature request, please report them at this repository issues section. Please do not report security vulnerabilities on the public GitHub issue tracker. The [Responsible Disclosure Program](https://auth0.com/whitehat) details the procedure for disclosing security issues. - -## Author - -[Auth0](https://auth0.com) - -## License - -This project is licensed under the MIT license. See the [LICENSE](LICENSE) file for more info. diff --git a/PBandGraphScaffold/node_modules/jsonwebtoken/decode.js b/PBandGraphScaffold/node_modules/jsonwebtoken/decode.js deleted file mode 100644 index 8fe1adc..0000000 --- a/PBandGraphScaffold/node_modules/jsonwebtoken/decode.js +++ /dev/null @@ -1,30 +0,0 @@ -var jws = require('jws'); - -module.exports = function (jwt, options) { - options = options || {}; - var decoded = jws.decode(jwt, options); - if (!decoded) { return null; } - var payload = decoded.payload; - - //try parse the payload - if(typeof payload === 'string') { - try { - var obj = JSON.parse(payload); - if(obj !== null && typeof obj === 'object') { - payload = obj; - } - } catch (e) { } - } - - //return header if `complete` option is enabled. header includes claims - //such as `kid` and `alg` used to select the key within a JWKS needed to - //verify the signature - if (options.complete === true) { - return { - header: decoded.header, - payload: payload, - signature: decoded.signature - }; - } - return payload; -}; diff --git a/PBandGraphScaffold/node_modules/jsonwebtoken/index.js b/PBandGraphScaffold/node_modules/jsonwebtoken/index.js deleted file mode 100644 index 161eb2d..0000000 --- a/PBandGraphScaffold/node_modules/jsonwebtoken/index.js +++ /dev/null @@ -1,8 +0,0 @@ -module.exports = { - decode: require('./decode'), - verify: require('./verify'), - sign: require('./sign'), - JsonWebTokenError: require('./lib/JsonWebTokenError'), - NotBeforeError: require('./lib/NotBeforeError'), - TokenExpiredError: require('./lib/TokenExpiredError'), -}; diff --git a/PBandGraphScaffold/node_modules/jsonwebtoken/lib/JsonWebTokenError.js b/PBandGraphScaffold/node_modules/jsonwebtoken/lib/JsonWebTokenError.js deleted file mode 100644 index e068222..0000000 --- a/PBandGraphScaffold/node_modules/jsonwebtoken/lib/JsonWebTokenError.js +++ /dev/null @@ -1,14 +0,0 @@ -var JsonWebTokenError = function (message, error) { - Error.call(this, message); - if(Error.captureStackTrace) { - Error.captureStackTrace(this, this.constructor); - } - this.name = 'JsonWebTokenError'; - this.message = message; - if (error) this.inner = error; -}; - -JsonWebTokenError.prototype = Object.create(Error.prototype); -JsonWebTokenError.prototype.constructor = JsonWebTokenError; - -module.exports = JsonWebTokenError; diff --git a/PBandGraphScaffold/node_modules/jsonwebtoken/lib/NotBeforeError.js b/PBandGraphScaffold/node_modules/jsonwebtoken/lib/NotBeforeError.js deleted file mode 100644 index 7b30084..0000000 --- a/PBandGraphScaffold/node_modules/jsonwebtoken/lib/NotBeforeError.js +++ /dev/null @@ -1,13 +0,0 @@ -var JsonWebTokenError = require('./JsonWebTokenError'); - -var NotBeforeError = function (message, date) { - JsonWebTokenError.call(this, message); - this.name = 'NotBeforeError'; - this.date = date; -}; - -NotBeforeError.prototype = Object.create(JsonWebTokenError.prototype); - -NotBeforeError.prototype.constructor = NotBeforeError; - -module.exports = NotBeforeError; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/jsonwebtoken/lib/TokenExpiredError.js b/PBandGraphScaffold/node_modules/jsonwebtoken/lib/TokenExpiredError.js deleted file mode 100644 index abb704f..0000000 --- a/PBandGraphScaffold/node_modules/jsonwebtoken/lib/TokenExpiredError.js +++ /dev/null @@ -1,13 +0,0 @@ -var JsonWebTokenError = require('./JsonWebTokenError'); - -var TokenExpiredError = function (message, expiredAt) { - JsonWebTokenError.call(this, message); - this.name = 'TokenExpiredError'; - this.expiredAt = expiredAt; -}; - -TokenExpiredError.prototype = Object.create(JsonWebTokenError.prototype); - -TokenExpiredError.prototype.constructor = TokenExpiredError; - -module.exports = TokenExpiredError; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/jsonwebtoken/lib/asymmetricKeyDetailsSupported.js b/PBandGraphScaffold/node_modules/jsonwebtoken/lib/asymmetricKeyDetailsSupported.js deleted file mode 100644 index a6ede56..0000000 --- a/PBandGraphScaffold/node_modules/jsonwebtoken/lib/asymmetricKeyDetailsSupported.js +++ /dev/null @@ -1,3 +0,0 @@ -const semver = require('semver'); - -module.exports = semver.satisfies(process.version, '>=15.7.0'); diff --git a/PBandGraphScaffold/node_modules/jsonwebtoken/lib/psSupported.js b/PBandGraphScaffold/node_modules/jsonwebtoken/lib/psSupported.js deleted file mode 100644 index 8c04144..0000000 --- a/PBandGraphScaffold/node_modules/jsonwebtoken/lib/psSupported.js +++ /dev/null @@ -1,3 +0,0 @@ -var semver = require('semver'); - -module.exports = semver.satisfies(process.version, '^6.12.0 || >=8.0.0'); diff --git a/PBandGraphScaffold/node_modules/jsonwebtoken/lib/rsaPssKeyDetailsSupported.js b/PBandGraphScaffold/node_modules/jsonwebtoken/lib/rsaPssKeyDetailsSupported.js deleted file mode 100644 index 7fcf368..0000000 --- a/PBandGraphScaffold/node_modules/jsonwebtoken/lib/rsaPssKeyDetailsSupported.js +++ /dev/null @@ -1,3 +0,0 @@ -const semver = require('semver'); - -module.exports = semver.satisfies(process.version, '>=16.9.0'); diff --git a/PBandGraphScaffold/node_modules/jsonwebtoken/lib/timespan.js b/PBandGraphScaffold/node_modules/jsonwebtoken/lib/timespan.js deleted file mode 100644 index e509869..0000000 --- a/PBandGraphScaffold/node_modules/jsonwebtoken/lib/timespan.js +++ /dev/null @@ -1,18 +0,0 @@ -var ms = require('ms'); - -module.exports = function (time, iat) { - var timestamp = iat || Math.floor(Date.now() / 1000); - - if (typeof time === 'string') { - var milliseconds = ms(time); - if (typeof milliseconds === 'undefined') { - return; - } - return Math.floor(timestamp + milliseconds / 1000); - } else if (typeof time === 'number') { - return timestamp + time; - } else { - return; - } - -}; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/jsonwebtoken/lib/validateAsymmetricKey.js b/PBandGraphScaffold/node_modules/jsonwebtoken/lib/validateAsymmetricKey.js deleted file mode 100644 index c10340b..0000000 --- a/PBandGraphScaffold/node_modules/jsonwebtoken/lib/validateAsymmetricKey.js +++ /dev/null @@ -1,66 +0,0 @@ -const ASYMMETRIC_KEY_DETAILS_SUPPORTED = require('./asymmetricKeyDetailsSupported'); -const RSA_PSS_KEY_DETAILS_SUPPORTED = require('./rsaPssKeyDetailsSupported'); - -const allowedAlgorithmsForKeys = { - 'ec': ['ES256', 'ES384', 'ES512'], - 'rsa': ['RS256', 'PS256', 'RS384', 'PS384', 'RS512', 'PS512'], - 'rsa-pss': ['PS256', 'PS384', 'PS512'] -}; - -const allowedCurves = { - ES256: 'prime256v1', - ES384: 'secp384r1', - ES512: 'secp521r1', -}; - -module.exports = function(algorithm, key) { - if (!algorithm || !key) return; - - const keyType = key.asymmetricKeyType; - if (!keyType) return; - - const allowedAlgorithms = allowedAlgorithmsForKeys[keyType]; - - if (!allowedAlgorithms) { - throw new Error(`Unknown key type "${keyType}".`); - } - - if (!allowedAlgorithms.includes(algorithm)) { - throw new Error(`"alg" parameter for "${keyType}" key type must be one of: ${allowedAlgorithms.join(', ')}.`) - } - - /* - * Ignore the next block from test coverage because it gets executed - * conditionally depending on the Node version. Not ignoring it would - * prevent us from reaching the target % of coverage for versions of - * Node under 15.7.0. - */ - /* istanbul ignore next */ - if (ASYMMETRIC_KEY_DETAILS_SUPPORTED) { - switch (keyType) { - case 'ec': - const keyCurve = key.asymmetricKeyDetails.namedCurve; - const allowedCurve = allowedCurves[algorithm]; - - if (keyCurve !== allowedCurve) { - throw new Error(`"alg" parameter "${algorithm}" requires curve "${allowedCurve}".`); - } - break; - - case 'rsa-pss': - if (RSA_PSS_KEY_DETAILS_SUPPORTED) { - const length = parseInt(algorithm.slice(-3), 10); - const { hashAlgorithm, mgf1HashAlgorithm, saltLength } = key.asymmetricKeyDetails; - - if (hashAlgorithm !== `sha${length}` || mgf1HashAlgorithm !== hashAlgorithm) { - throw new Error(`Invalid key for this operation, its RSA-PSS parameters do not meet the requirements of "alg" ${algorithm}.`); - } - - if (saltLength !== undefined && saltLength > length >> 3) { - throw new Error(`Invalid key for this operation, its RSA-PSS parameter saltLength does not meet the requirements of "alg" ${algorithm}.`) - } - } - break; - } - } -} diff --git a/PBandGraphScaffold/node_modules/jsonwebtoken/package.json b/PBandGraphScaffold/node_modules/jsonwebtoken/package.json deleted file mode 100644 index eab30c0..0000000 --- a/PBandGraphScaffold/node_modules/jsonwebtoken/package.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "name": "jsonwebtoken", - "version": "9.0.3", - "description": "JSON Web Token implementation (symmetric and asymmetric)", - "main": "index.js", - "nyc": { - "check-coverage": true, - "lines": 95, - "statements": 95, - "functions": 100, - "branches": 95, - "exclude": [ - "./test/**" - ], - "reporter": [ - "json", - "lcov", - "text-summary" - ] - }, - "scripts": { - "lint": "eslint .", - "coverage": "nyc mocha --use_strict", - "test": "mocha" - }, - "repository": { - "type": "git", - "url": "https://github.com/auth0/node-jsonwebtoken" - }, - "keywords": [ - "jwt" - ], - "author": "auth0", - "license": "MIT", - "bugs": { - "url": "https://github.com/auth0/node-jsonwebtoken/issues" - }, - "dependencies": { - "jws": "^4.0.1", - "lodash.includes": "^4.3.0", - "lodash.isboolean": "^3.0.3", - "lodash.isinteger": "^4.0.4", - "lodash.isnumber": "^3.0.3", - "lodash.isplainobject": "^4.0.6", - "lodash.isstring": "^4.0.1", - "lodash.once": "^4.0.0", - "ms": "^2.1.1", - "semver": "^7.5.4" - }, - "devDependencies": { - "atob": "^2.1.2", - "chai": "^4.1.2", - "conventional-changelog": "~1.1.0", - "eslint": "^4.19.1", - "mocha": "^5.2.0", - "nsp": "^2.6.2", - "nyc": "^11.9.0", - "sinon": "^6.0.0" - }, - "engines": { - "npm": ">=6", - "node": ">=12" - }, - "files": [ - "lib", - "decode.js", - "sign.js", - "verify.js" - ] -} diff --git a/PBandGraphScaffold/node_modules/jsonwebtoken/sign.js b/PBandGraphScaffold/node_modules/jsonwebtoken/sign.js deleted file mode 100644 index 82bf526..0000000 --- a/PBandGraphScaffold/node_modules/jsonwebtoken/sign.js +++ /dev/null @@ -1,253 +0,0 @@ -const timespan = require('./lib/timespan'); -const PS_SUPPORTED = require('./lib/psSupported'); -const validateAsymmetricKey = require('./lib/validateAsymmetricKey'); -const jws = require('jws'); -const includes = require('lodash.includes'); -const isBoolean = require('lodash.isboolean'); -const isInteger = require('lodash.isinteger'); -const isNumber = require('lodash.isnumber'); -const isPlainObject = require('lodash.isplainobject'); -const isString = require('lodash.isstring'); -const once = require('lodash.once'); -const { KeyObject, createSecretKey, createPrivateKey } = require('crypto') - -const SUPPORTED_ALGS = ['RS256', 'RS384', 'RS512', 'ES256', 'ES384', 'ES512', 'HS256', 'HS384', 'HS512', 'none']; -if (PS_SUPPORTED) { - SUPPORTED_ALGS.splice(3, 0, 'PS256', 'PS384', 'PS512'); -} - -const sign_options_schema = { - expiresIn: { isValid: function(value) { return isInteger(value) || (isString(value) && value); }, message: '"expiresIn" should be a number of seconds or string representing a timespan' }, - notBefore: { isValid: function(value) { return isInteger(value) || (isString(value) && value); }, message: '"notBefore" should be a number of seconds or string representing a timespan' }, - audience: { isValid: function(value) { return isString(value) || Array.isArray(value); }, message: '"audience" must be a string or array' }, - algorithm: { isValid: includes.bind(null, SUPPORTED_ALGS), message: '"algorithm" must be a valid string enum value' }, - header: { isValid: isPlainObject, message: '"header" must be an object' }, - encoding: { isValid: isString, message: '"encoding" must be a string' }, - issuer: { isValid: isString, message: '"issuer" must be a string' }, - subject: { isValid: isString, message: '"subject" must be a string' }, - jwtid: { isValid: isString, message: '"jwtid" must be a string' }, - noTimestamp: { isValid: isBoolean, message: '"noTimestamp" must be a boolean' }, - keyid: { isValid: isString, message: '"keyid" must be a string' }, - mutatePayload: { isValid: isBoolean, message: '"mutatePayload" must be a boolean' }, - allowInsecureKeySizes: { isValid: isBoolean, message: '"allowInsecureKeySizes" must be a boolean'}, - allowInvalidAsymmetricKeyTypes: { isValid: isBoolean, message: '"allowInvalidAsymmetricKeyTypes" must be a boolean'} -}; - -const registered_claims_schema = { - iat: { isValid: isNumber, message: '"iat" should be a number of seconds' }, - exp: { isValid: isNumber, message: '"exp" should be a number of seconds' }, - nbf: { isValid: isNumber, message: '"nbf" should be a number of seconds' } -}; - -function validate(schema, allowUnknown, object, parameterName) { - if (!isPlainObject(object)) { - throw new Error('Expected "' + parameterName + '" to be a plain object.'); - } - Object.keys(object) - .forEach(function(key) { - const validator = schema[key]; - if (!validator) { - if (!allowUnknown) { - throw new Error('"' + key + '" is not allowed in "' + parameterName + '"'); - } - return; - } - if (!validator.isValid(object[key])) { - throw new Error(validator.message); - } - }); -} - -function validateOptions(options) { - return validate(sign_options_schema, false, options, 'options'); -} - -function validatePayload(payload) { - return validate(registered_claims_schema, true, payload, 'payload'); -} - -const options_to_payload = { - 'audience': 'aud', - 'issuer': 'iss', - 'subject': 'sub', - 'jwtid': 'jti' -}; - -const options_for_objects = [ - 'expiresIn', - 'notBefore', - 'noTimestamp', - 'audience', - 'issuer', - 'subject', - 'jwtid', -]; - -module.exports = function (payload, secretOrPrivateKey, options, callback) { - if (typeof options === 'function') { - callback = options; - options = {}; - } else { - options = options || {}; - } - - const isObjectPayload = typeof payload === 'object' && - !Buffer.isBuffer(payload); - - const header = Object.assign({ - alg: options.algorithm || 'HS256', - typ: isObjectPayload ? 'JWT' : undefined, - kid: options.keyid - }, options.header); - - function failure(err) { - if (callback) { - return callback(err); - } - throw err; - } - - if (!secretOrPrivateKey && options.algorithm !== 'none') { - return failure(new Error('secretOrPrivateKey must have a value')); - } - - if (secretOrPrivateKey != null && !(secretOrPrivateKey instanceof KeyObject)) { - try { - secretOrPrivateKey = createPrivateKey(secretOrPrivateKey) - } catch (_) { - try { - secretOrPrivateKey = createSecretKey(typeof secretOrPrivateKey === 'string' ? Buffer.from(secretOrPrivateKey) : secretOrPrivateKey) - } catch (_) { - return failure(new Error('secretOrPrivateKey is not valid key material')); - } - } - } - - if (header.alg.startsWith('HS') && secretOrPrivateKey.type !== 'secret') { - return failure(new Error((`secretOrPrivateKey must be a symmetric key when using ${header.alg}`))) - } else if (/^(?:RS|PS|ES)/.test(header.alg)) { - if (secretOrPrivateKey.type !== 'private') { - return failure(new Error((`secretOrPrivateKey must be an asymmetric key when using ${header.alg}`))) - } - if (!options.allowInsecureKeySizes && - !header.alg.startsWith('ES') && - secretOrPrivateKey.asymmetricKeyDetails !== undefined && //KeyObject.asymmetricKeyDetails is supported in Node 15+ - secretOrPrivateKey.asymmetricKeyDetails.modulusLength < 2048) { - return failure(new Error(`secretOrPrivateKey has a minimum key size of 2048 bits for ${header.alg}`)); - } - } - - if (typeof payload === 'undefined') { - return failure(new Error('payload is required')); - } else if (isObjectPayload) { - try { - validatePayload(payload); - } - catch (error) { - return failure(error); - } - if (!options.mutatePayload) { - payload = Object.assign({},payload); - } - } else { - const invalid_options = options_for_objects.filter(function (opt) { - return typeof options[opt] !== 'undefined'; - }); - - if (invalid_options.length > 0) { - return failure(new Error('invalid ' + invalid_options.join(',') + ' option for ' + (typeof payload ) + ' payload')); - } - } - - if (typeof payload.exp !== 'undefined' && typeof options.expiresIn !== 'undefined') { - return failure(new Error('Bad "options.expiresIn" option the payload already has an "exp" property.')); - } - - if (typeof payload.nbf !== 'undefined' && typeof options.notBefore !== 'undefined') { - return failure(new Error('Bad "options.notBefore" option the payload already has an "nbf" property.')); - } - - try { - validateOptions(options); - } - catch (error) { - return failure(error); - } - - if (!options.allowInvalidAsymmetricKeyTypes) { - try { - validateAsymmetricKey(header.alg, secretOrPrivateKey); - } catch (error) { - return failure(error); - } - } - - const timestamp = payload.iat || Math.floor(Date.now() / 1000); - - if (options.noTimestamp) { - delete payload.iat; - } else if (isObjectPayload) { - payload.iat = timestamp; - } - - if (typeof options.notBefore !== 'undefined') { - try { - payload.nbf = timespan(options.notBefore, timestamp); - } - catch (err) { - return failure(err); - } - if (typeof payload.nbf === 'undefined') { - return failure(new Error('"notBefore" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60')); - } - } - - if (typeof options.expiresIn !== 'undefined' && typeof payload === 'object') { - try { - payload.exp = timespan(options.expiresIn, timestamp); - } - catch (err) { - return failure(err); - } - if (typeof payload.exp === 'undefined') { - return failure(new Error('"expiresIn" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60')); - } - } - - Object.keys(options_to_payload).forEach(function (key) { - const claim = options_to_payload[key]; - if (typeof options[key] !== 'undefined') { - if (typeof payload[claim] !== 'undefined') { - return failure(new Error('Bad "options.' + key + '" option. The payload already has an "' + claim + '" property.')); - } - payload[claim] = options[key]; - } - }); - - const encoding = options.encoding || 'utf8'; - - if (typeof callback === 'function') { - callback = callback && once(callback); - - jws.createSign({ - header: header, - privateKey: secretOrPrivateKey, - payload: payload, - encoding: encoding - }).once('error', callback) - .once('done', function (signature) { - // TODO: Remove in favor of the modulus length check before signing once node 15+ is the minimum supported version - if(!options.allowInsecureKeySizes && /^(?:RS|PS)/.test(header.alg) && signature.length < 256) { - return callback(new Error(`secretOrPrivateKey has a minimum key size of 2048 bits for ${header.alg}`)) - } - callback(null, signature); - }); - } else { - let signature = jws.sign({header: header, payload: payload, secret: secretOrPrivateKey, encoding: encoding}); - // TODO: Remove in favor of the modulus length check before signing once node 15+ is the minimum supported version - if(!options.allowInsecureKeySizes && /^(?:RS|PS)/.test(header.alg) && signature.length < 256) { - throw new Error(`secretOrPrivateKey has a minimum key size of 2048 bits for ${header.alg}`) - } - return signature - } -}; diff --git a/PBandGraphScaffold/node_modules/jsonwebtoken/verify.js b/PBandGraphScaffold/node_modules/jsonwebtoken/verify.js deleted file mode 100644 index cdbfdc4..0000000 --- a/PBandGraphScaffold/node_modules/jsonwebtoken/verify.js +++ /dev/null @@ -1,263 +0,0 @@ -const JsonWebTokenError = require('./lib/JsonWebTokenError'); -const NotBeforeError = require('./lib/NotBeforeError'); -const TokenExpiredError = require('./lib/TokenExpiredError'); -const decode = require('./decode'); -const timespan = require('./lib/timespan'); -const validateAsymmetricKey = require('./lib/validateAsymmetricKey'); -const PS_SUPPORTED = require('./lib/psSupported'); -const jws = require('jws'); -const {KeyObject, createSecretKey, createPublicKey} = require("crypto"); - -const PUB_KEY_ALGS = ['RS256', 'RS384', 'RS512']; -const EC_KEY_ALGS = ['ES256', 'ES384', 'ES512']; -const RSA_KEY_ALGS = ['RS256', 'RS384', 'RS512']; -const HS_ALGS = ['HS256', 'HS384', 'HS512']; - -if (PS_SUPPORTED) { - PUB_KEY_ALGS.splice(PUB_KEY_ALGS.length, 0, 'PS256', 'PS384', 'PS512'); - RSA_KEY_ALGS.splice(RSA_KEY_ALGS.length, 0, 'PS256', 'PS384', 'PS512'); -} - -module.exports = function (jwtString, secretOrPublicKey, options, callback) { - if ((typeof options === 'function') && !callback) { - callback = options; - options = {}; - } - - if (!options) { - options = {}; - } - - //clone this object since we are going to mutate it. - options = Object.assign({}, options); - - let done; - - if (callback) { - done = callback; - } else { - done = function(err, data) { - if (err) throw err; - return data; - }; - } - - if (options.clockTimestamp && typeof options.clockTimestamp !== 'number') { - return done(new JsonWebTokenError('clockTimestamp must be a number')); - } - - if (options.nonce !== undefined && (typeof options.nonce !== 'string' || options.nonce.trim() === '')) { - return done(new JsonWebTokenError('nonce must be a non-empty string')); - } - - if (options.allowInvalidAsymmetricKeyTypes !== undefined && typeof options.allowInvalidAsymmetricKeyTypes !== 'boolean') { - return done(new JsonWebTokenError('allowInvalidAsymmetricKeyTypes must be a boolean')); - } - - const clockTimestamp = options.clockTimestamp || Math.floor(Date.now() / 1000); - - if (!jwtString){ - return done(new JsonWebTokenError('jwt must be provided')); - } - - if (typeof jwtString !== 'string') { - return done(new JsonWebTokenError('jwt must be a string')); - } - - const parts = jwtString.split('.'); - - if (parts.length !== 3){ - return done(new JsonWebTokenError('jwt malformed')); - } - - let decodedToken; - - try { - decodedToken = decode(jwtString, { complete: true }); - } catch(err) { - return done(err); - } - - if (!decodedToken) { - return done(new JsonWebTokenError('invalid token')); - } - - const header = decodedToken.header; - let getSecret; - - if(typeof secretOrPublicKey === 'function') { - if(!callback) { - return done(new JsonWebTokenError('verify must be called asynchronous if secret or public key is provided as a callback')); - } - - getSecret = secretOrPublicKey; - } - else { - getSecret = function(header, secretCallback) { - return secretCallback(null, secretOrPublicKey); - }; - } - - return getSecret(header, function(err, secretOrPublicKey) { - if(err) { - return done(new JsonWebTokenError('error in secret or public key callback: ' + err.message)); - } - - const hasSignature = parts[2].trim() !== ''; - - if (!hasSignature && secretOrPublicKey){ - return done(new JsonWebTokenError('jwt signature is required')); - } - - if (hasSignature && !secretOrPublicKey) { - return done(new JsonWebTokenError('secret or public key must be provided')); - } - - if (!hasSignature && !options.algorithms) { - return done(new JsonWebTokenError('please specify "none" in "algorithms" to verify unsigned tokens')); - } - - if (secretOrPublicKey != null && !(secretOrPublicKey instanceof KeyObject)) { - try { - secretOrPublicKey = createPublicKey(secretOrPublicKey); - } catch (_) { - try { - secretOrPublicKey = createSecretKey(typeof secretOrPublicKey === 'string' ? Buffer.from(secretOrPublicKey) : secretOrPublicKey); - } catch (_) { - return done(new JsonWebTokenError('secretOrPublicKey is not valid key material')) - } - } - } - - if (!options.algorithms) { - if (secretOrPublicKey.type === 'secret') { - options.algorithms = HS_ALGS; - } else if (['rsa', 'rsa-pss'].includes(secretOrPublicKey.asymmetricKeyType)) { - options.algorithms = RSA_KEY_ALGS - } else if (secretOrPublicKey.asymmetricKeyType === 'ec') { - options.algorithms = EC_KEY_ALGS - } else { - options.algorithms = PUB_KEY_ALGS - } - } - - if (options.algorithms.indexOf(decodedToken.header.alg) === -1) { - return done(new JsonWebTokenError('invalid algorithm')); - } - - if (header.alg.startsWith('HS') && secretOrPublicKey.type !== 'secret') { - return done(new JsonWebTokenError((`secretOrPublicKey must be a symmetric key when using ${header.alg}`))) - } else if (/^(?:RS|PS|ES)/.test(header.alg) && secretOrPublicKey.type !== 'public') { - return done(new JsonWebTokenError((`secretOrPublicKey must be an asymmetric key when using ${header.alg}`))) - } - - if (!options.allowInvalidAsymmetricKeyTypes) { - try { - validateAsymmetricKey(header.alg, secretOrPublicKey); - } catch (e) { - return done(e); - } - } - - let valid; - - try { - valid = jws.verify(jwtString, decodedToken.header.alg, secretOrPublicKey); - } catch (e) { - return done(e); - } - - if (!valid) { - return done(new JsonWebTokenError('invalid signature')); - } - - const payload = decodedToken.payload; - - if (typeof payload.nbf !== 'undefined' && !options.ignoreNotBefore) { - if (typeof payload.nbf !== 'number') { - return done(new JsonWebTokenError('invalid nbf value')); - } - if (payload.nbf > clockTimestamp + (options.clockTolerance || 0)) { - return done(new NotBeforeError('jwt not active', new Date(payload.nbf * 1000))); - } - } - - if (typeof payload.exp !== 'undefined' && !options.ignoreExpiration) { - if (typeof payload.exp !== 'number') { - return done(new JsonWebTokenError('invalid exp value')); - } - if (clockTimestamp >= payload.exp + (options.clockTolerance || 0)) { - return done(new TokenExpiredError('jwt expired', new Date(payload.exp * 1000))); - } - } - - if (options.audience) { - const audiences = Array.isArray(options.audience) ? options.audience : [options.audience]; - const target = Array.isArray(payload.aud) ? payload.aud : [payload.aud]; - - const match = target.some(function (targetAudience) { - return audiences.some(function (audience) { - return audience instanceof RegExp ? audience.test(targetAudience) : audience === targetAudience; - }); - }); - - if (!match) { - return done(new JsonWebTokenError('jwt audience invalid. expected: ' + audiences.join(' or '))); - } - } - - if (options.issuer) { - const invalid_issuer = - (typeof options.issuer === 'string' && payload.iss !== options.issuer) || - (Array.isArray(options.issuer) && options.issuer.indexOf(payload.iss) === -1); - - if (invalid_issuer) { - return done(new JsonWebTokenError('jwt issuer invalid. expected: ' + options.issuer)); - } - } - - if (options.subject) { - if (payload.sub !== options.subject) { - return done(new JsonWebTokenError('jwt subject invalid. expected: ' + options.subject)); - } - } - - if (options.jwtid) { - if (payload.jti !== options.jwtid) { - return done(new JsonWebTokenError('jwt jwtid invalid. expected: ' + options.jwtid)); - } - } - - if (options.nonce) { - if (payload.nonce !== options.nonce) { - return done(new JsonWebTokenError('jwt nonce invalid. expected: ' + options.nonce)); - } - } - - if (options.maxAge) { - if (typeof payload.iat !== 'number') { - return done(new JsonWebTokenError('iat required when maxAge is specified')); - } - - const maxAgeTimestamp = timespan(options.maxAge, payload.iat); - if (typeof maxAgeTimestamp === 'undefined') { - return done(new JsonWebTokenError('"maxAge" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60')); - } - if (clockTimestamp >= maxAgeTimestamp + (options.clockTolerance || 0)) { - return done(new TokenExpiredError('maxAge exceeded', new Date(maxAgeTimestamp * 1000))); - } - } - - if (options.complete === true) { - const signature = decodedToken.signature; - - return done(null, { - header: header, - payload: payload, - signature: signature - }); - } - - return done(null, payload); - }); -}; diff --git a/PBandGraphScaffold/node_modules/jwa/LICENSE b/PBandGraphScaffold/node_modules/jwa/LICENSE deleted file mode 100644 index caeb849..0000000 --- a/PBandGraphScaffold/node_modules/jwa/LICENSE +++ /dev/null @@ -1,17 +0,0 @@ -Copyright (c) 2013 Brian J. Brennan - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the -Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, -INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR -PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE -FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/PBandGraphScaffold/node_modules/jwa/README.md b/PBandGraphScaffold/node_modules/jwa/README.md deleted file mode 100644 index 09e9648..0000000 --- a/PBandGraphScaffold/node_modules/jwa/README.md +++ /dev/null @@ -1,150 +0,0 @@ -# node-jwa [![Build Status](https://travis-ci.org/brianloveswords/node-jwa.svg?branch=master)](https://travis-ci.org/brianloveswords/node-jwa) - -A -[JSON Web Algorithms](http://tools.ietf.org/id/draft-ietf-jose-json-web-algorithms-08.html) -implementation focusing (exclusively, at this point) on the algorithms necessary for -[JSON Web Signatures](http://self-issued.info/docs/draft-ietf-jose-json-web-signature.html). - -This library supports all of the required, recommended and optional cryptographic algorithms for JWS: - -alg Parameter Value | Digital Signature or MAC Algorithm -----------------|---------------------------- -HS256 | HMAC using SHA-256 hash algorithm -HS384 | HMAC using SHA-384 hash algorithm -HS512 | HMAC using SHA-512 hash algorithm -RS256 | RSASSA using SHA-256 hash algorithm -RS384 | RSASSA using SHA-384 hash algorithm -RS512 | RSASSA using SHA-512 hash algorithm -PS256 | RSASSA-PSS using SHA-256 hash algorithm -PS384 | RSASSA-PSS using SHA-384 hash algorithm -PS512 | RSASSA-PSS using SHA-512 hash algorithm -ES256 | ECDSA using P-256 curve and SHA-256 hash algorithm -ES384 | ECDSA using P-384 curve and SHA-384 hash algorithm -ES512 | ECDSA using P-521 curve and SHA-512 hash algorithm -none | No digital signature or MAC value included - -Please note that PS* only works on Node 6.12+ (excluding 7.x). - -# Requirements - -In order to run the tests, a recent version of OpenSSL is -required. **The version that comes with OS X (OpenSSL 0.9.8r 8 Feb -2011) is not recent enough**, as it does not fully support ECDSA -keys. You'll need to use a version > 1.0.0; I tested with OpenSSL 1.0.1c 10 May 2012. - -# Testing - -To run the tests, do - -```bash -$ npm test -``` - -This will generate a bunch of keypairs to use in testing. If you want to -generate new keypairs, do `make clean` before running `npm test` again. - -## Methodology - -I spawn `openssl dgst -sign` to test OpenSSL sign → JS verify and -`openssl dgst -verify` to test JS sign → OpenSSL verify for each of the -RSA and ECDSA algorithms. - -# Usage - -## jwa(algorithm) - -Creates a new `jwa` object with `sign` and `verify` methods for the -algorithm. Valid values for algorithm can be found in the table above -(`'HS256'`, `'HS384'`, etc) and are case-sensitive. Passing an invalid -algorithm value will throw a `TypeError`. - - -## jwa#sign(input, secretOrPrivateKey) - -Sign some input with either a secret for HMAC algorithms, or a private -key for RSA and ECDSA algorithms. - -If input is not already a string or buffer, `JSON.stringify` will be -called on it to attempt to coerce it. - -For the HMAC algorithm, `secretOrPrivateKey` should be a string or a -buffer. For ECDSA and RSA, the value should be a string representing a -PEM encoded **private** key. - -Output [base64url](http://en.wikipedia.org/wiki/Base64#URL_applications) -formatted. This is for convenience as JWS expects the signature in this -format. If your application needs the output in a different format, -[please open an issue](https://github.com/brianloveswords/node-jwa/issues). In -the meantime, you can use -[brianloveswords/base64url](https://github.com/brianloveswords/base64url) -to decode the signature. - -As of nodejs *v0.11.8*, SPKAC support was introduce. If your nodeJs -version satisfies, then you can pass an object `{ key: '..', passphrase: '...' }` - - -## jwa#verify(input, signature, secretOrPublicKey) - -Verify a signature. Returns `true` or `false`. - -`signature` should be a base64url encoded string. - -For the HMAC algorithm, `secretOrPublicKey` should be a string or a -buffer. For ECDSA and RSA, the value should be a string represented a -PEM encoded **public** key. - - -# Example - -HMAC -```js -const jwa = require('jwa'); - -const hmac = jwa('HS256'); -const input = 'super important stuff'; -const secret = 'shhhhhh'; - -const signature = hmac.sign(input, secret); -hmac.verify(input, signature, secret) // === true -hmac.verify(input, signature, 'trickery!') // === false -``` - -With keys -```js -const fs = require('fs'); -const jwa = require('jwa'); -const privateKey = fs.readFileSync(__dirname + '/ecdsa-p521-private.pem'); -const publicKey = fs.readFileSync(__dirname + '/ecdsa-p521-public.pem'); - -const ecdsa = jwa('ES512'); -const input = 'very important stuff'; - -const signature = ecdsa.sign(input, privateKey); -ecdsa.verify(input, signature, publicKey) // === true -``` -## License - -MIT - -``` -Copyright (c) 2013 Brian J. Brennan - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -``` diff --git a/PBandGraphScaffold/node_modules/jwa/index.js b/PBandGraphScaffold/node_modules/jwa/index.js deleted file mode 100644 index 5072c34..0000000 --- a/PBandGraphScaffold/node_modules/jwa/index.js +++ /dev/null @@ -1,266 +0,0 @@ -var Buffer = require('safe-buffer').Buffer; -var crypto = require('crypto'); -var formatEcdsa = require('ecdsa-sig-formatter'); -var util = require('util'); - -var MSG_INVALID_ALGORITHM = '"%s" is not a valid algorithm.\n Supported algorithms are:\n "HS256", "HS384", "HS512", "RS256", "RS384", "RS512", "PS256", "PS384", "PS512", "ES256", "ES384", "ES512" and "none".' -var MSG_INVALID_SECRET = 'secret must be a string or buffer'; -var MSG_INVALID_VERIFIER_KEY = 'key must be a string or a buffer'; -var MSG_INVALID_SIGNER_KEY = 'key must be a string, a buffer or an object'; - -var supportsKeyObjects = typeof crypto.createPublicKey === 'function'; -if (supportsKeyObjects) { - MSG_INVALID_VERIFIER_KEY += ' or a KeyObject'; - MSG_INVALID_SECRET += 'or a KeyObject'; -} - -function checkIsPublicKey(key) { - if (Buffer.isBuffer(key)) { - return; - } - - if (typeof key === 'string') { - return; - } - - if (!supportsKeyObjects) { - throw typeError(MSG_INVALID_VERIFIER_KEY); - } - - if (typeof key !== 'object') { - throw typeError(MSG_INVALID_VERIFIER_KEY); - } - - if (typeof key.type !== 'string') { - throw typeError(MSG_INVALID_VERIFIER_KEY); - } - - if (typeof key.asymmetricKeyType !== 'string') { - throw typeError(MSG_INVALID_VERIFIER_KEY); - } - - if (typeof key.export !== 'function') { - throw typeError(MSG_INVALID_VERIFIER_KEY); - } -}; - -function checkIsPrivateKey(key) { - if (Buffer.isBuffer(key)) { - return; - } - - if (typeof key === 'string') { - return; - } - - if (typeof key === 'object') { - return; - } - - throw typeError(MSG_INVALID_SIGNER_KEY); -}; - -function checkIsSecretKey(key) { - if (Buffer.isBuffer(key)) { - return; - } - - if (typeof key === 'string') { - return key; - } - - if (!supportsKeyObjects) { - throw typeError(MSG_INVALID_SECRET); - } - - if (typeof key !== 'object') { - throw typeError(MSG_INVALID_SECRET); - } - - if (key.type !== 'secret') { - throw typeError(MSG_INVALID_SECRET); - } - - if (typeof key.export !== 'function') { - throw typeError(MSG_INVALID_SECRET); - } -} - -function fromBase64(base64) { - return base64 - .replace(/=/g, '') - .replace(/\+/g, '-') - .replace(/\//g, '_'); -} - -function toBase64(base64url) { - base64url = base64url.toString(); - - var padding = 4 - base64url.length % 4; - if (padding !== 4) { - for (var i = 0; i < padding; ++i) { - base64url += '='; - } - } - - return base64url - .replace(/\-/g, '+') - .replace(/_/g, '/'); -} - -function typeError(template) { - var args = [].slice.call(arguments, 1); - var errMsg = util.format.bind(util, template).apply(null, args); - return new TypeError(errMsg); -} - -function bufferOrString(obj) { - return Buffer.isBuffer(obj) || typeof obj === 'string'; -} - -function normalizeInput(thing) { - if (!bufferOrString(thing)) - thing = JSON.stringify(thing); - return thing; -} - -function createHmacSigner(bits) { - return function sign(thing, secret) { - checkIsSecretKey(secret); - thing = normalizeInput(thing); - var hmac = crypto.createHmac('sha' + bits, secret); - var sig = (hmac.update(thing), hmac.digest('base64')) - return fromBase64(sig); - } -} - -var bufferEqual; -var timingSafeEqual = 'timingSafeEqual' in crypto ? function timingSafeEqual(a, b) { - if (a.byteLength !== b.byteLength) { - return false; - } - - return crypto.timingSafeEqual(a, b) -} : function timingSafeEqual(a, b) { - if (!bufferEqual) { - bufferEqual = require('buffer-equal-constant-time'); - } - - return bufferEqual(a, b) -} - -function createHmacVerifier(bits) { - return function verify(thing, signature, secret) { - var computedSig = createHmacSigner(bits)(thing, secret); - return timingSafeEqual(Buffer.from(signature), Buffer.from(computedSig)); - } -} - -function createKeySigner(bits) { - return function sign(thing, privateKey) { - checkIsPrivateKey(privateKey); - thing = normalizeInput(thing); - // Even though we are specifying "RSA" here, this works with ECDSA - // keys as well. - var signer = crypto.createSign('RSA-SHA' + bits); - var sig = (signer.update(thing), signer.sign(privateKey, 'base64')); - return fromBase64(sig); - } -} - -function createKeyVerifier(bits) { - return function verify(thing, signature, publicKey) { - checkIsPublicKey(publicKey); - thing = normalizeInput(thing); - signature = toBase64(signature); - var verifier = crypto.createVerify('RSA-SHA' + bits); - verifier.update(thing); - return verifier.verify(publicKey, signature, 'base64'); - } -} - -function createPSSKeySigner(bits) { - return function sign(thing, privateKey) { - checkIsPrivateKey(privateKey); - thing = normalizeInput(thing); - var signer = crypto.createSign('RSA-SHA' + bits); - var sig = (signer.update(thing), signer.sign({ - key: privateKey, - padding: crypto.constants.RSA_PKCS1_PSS_PADDING, - saltLength: crypto.constants.RSA_PSS_SALTLEN_DIGEST - }, 'base64')); - return fromBase64(sig); - } -} - -function createPSSKeyVerifier(bits) { - return function verify(thing, signature, publicKey) { - checkIsPublicKey(publicKey); - thing = normalizeInput(thing); - signature = toBase64(signature); - var verifier = crypto.createVerify('RSA-SHA' + bits); - verifier.update(thing); - return verifier.verify({ - key: publicKey, - padding: crypto.constants.RSA_PKCS1_PSS_PADDING, - saltLength: crypto.constants.RSA_PSS_SALTLEN_DIGEST - }, signature, 'base64'); - } -} - -function createECDSASigner(bits) { - var inner = createKeySigner(bits); - return function sign() { - var signature = inner.apply(null, arguments); - signature = formatEcdsa.derToJose(signature, 'ES' + bits); - return signature; - }; -} - -function createECDSAVerifer(bits) { - var inner = createKeyVerifier(bits); - return function verify(thing, signature, publicKey) { - signature = formatEcdsa.joseToDer(signature, 'ES' + bits).toString('base64'); - var result = inner(thing, signature, publicKey); - return result; - }; -} - -function createNoneSigner() { - return function sign() { - return ''; - } -} - -function createNoneVerifier() { - return function verify(thing, signature) { - return signature === ''; - } -} - -module.exports = function jwa(algorithm) { - var signerFactories = { - hs: createHmacSigner, - rs: createKeySigner, - ps: createPSSKeySigner, - es: createECDSASigner, - none: createNoneSigner, - } - var verifierFactories = { - hs: createHmacVerifier, - rs: createKeyVerifier, - ps: createPSSKeyVerifier, - es: createECDSAVerifer, - none: createNoneVerifier, - } - var match = algorithm.match(/^(RS|PS|ES|HS)(256|384|512)$|^(none)$/); - if (!match) - throw typeError(MSG_INVALID_ALGORITHM, algorithm); - var algo = (match[1] || match[3]).toLowerCase(); - var bits = match[2]; - - return { - sign: signerFactories[algo](bits), - verify: verifierFactories[algo](bits), - } -}; diff --git a/PBandGraphScaffold/node_modules/jwa/opslevel.yml b/PBandGraphScaffold/node_modules/jwa/opslevel.yml deleted file mode 100644 index aeeeea7..0000000 --- a/PBandGraphScaffold/node_modules/jwa/opslevel.yml +++ /dev/null @@ -1,6 +0,0 @@ ---- -version: 1 -repository: - owner: iam_protocols - tier: - tags: diff --git a/PBandGraphScaffold/node_modules/jwa/package.json b/PBandGraphScaffold/node_modules/jwa/package.json deleted file mode 100644 index fd5824a..0000000 --- a/PBandGraphScaffold/node_modules/jwa/package.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "name": "jwa", - "version": "2.0.1", - "description": "JWA implementation (supports all JWS algorithms)", - "main": "index.js", - "directories": { - "test": "test" - }, - "dependencies": { - "buffer-equal-constant-time": "^1.0.1", - "ecdsa-sig-formatter": "1.0.11", - "safe-buffer": "^5.0.1" - }, - "devDependencies": { - "base64url": "^2.0.0", - "jwk-to-pem": "^2.0.1", - "semver": "4.3.6", - "tap": "6.2.0" - }, - "scripts": { - "test": "make test" - }, - "repository": { - "type": "git", - "url": "git://github.com/brianloveswords/node-jwa.git" - }, - "keywords": [ - "jwa", - "jws", - "jwt", - "rsa", - "ecdsa", - "hmac" - ], - "author": "Brian J. Brennan ", - "license": "MIT" -} diff --git a/PBandGraphScaffold/node_modules/jws/CHANGELOG.md b/PBandGraphScaffold/node_modules/jws/CHANGELOG.md deleted file mode 100644 index 18078df..0000000 --- a/PBandGraphScaffold/node_modules/jws/CHANGELOG.md +++ /dev/null @@ -1,56 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. - -## [4.0.1] - -### Changed - -- Fix advisory GHSA-869p-cjfg-cm3x: createSign and createVerify now require - that a non empty secret is provided (via opts.secret, opts.privateKey or opts.key) - when using HMAC algorithms. -- Upgrading JWA version to 2.0.1, adressing a compatibility issue for Node >= 25. - -## [3.2.3] - -### Changed - -- Fix advisory GHSA-869p-cjfg-cm3x: createSign and createVerify now require - that a non empty secret is provided (via opts.secret, opts.privateKey or opts.key) - when using HMAC algorithms. -- Upgrading JWA version to 1.4.2, adressing a compatibility issue for Node >= 25. - -## [3.0.0] - -### Changed - -- **BREAKING**: `jwt.verify` now requires an `algorithm` parameter, and - `jws.createVerify` requires an `algorithm` option. The `"alg"` field - signature headers is ignored. This mitigates a critical security flaw - in the library which would allow an attacker to generate signatures with - arbitrary contents that would be accepted by `jwt.verify`. See - https://auth0.com/blog/2015/03/31/critical-vulnerabilities-in-json-web-token-libraries/ - for details. - -## [2.0.0] - 2015-01-30 - -### Changed - -- **BREAKING**: Default payload encoding changed from `binary` to - `utf8`. `utf8` is a is a more sensible default than `binary` because - many payloads, as far as I can tell, will contain user-facing - strings that could be in any language. ([6b6de48]) - -- Code reorganization, thanks [@fearphage]! ([7880050]) - -### Added - -- Option in all relevant methods for `encoding`. For those few users - that might be depending on a `binary` encoding of the messages, this - is for them. ([6b6de48]) - -[unreleased]: https://github.com/brianloveswords/node-jws/compare/v2.0.0...HEAD -[2.0.0]: https://github.com/brianloveswords/node-jws/compare/v1.0.1...v2.0.0 -[7880050]: https://github.com/brianloveswords/node-jws/commit/7880050 -[6b6de48]: https://github.com/brianloveswords/node-jws/commit/6b6de48 -[@fearphage]: https://github.com/fearphage diff --git a/PBandGraphScaffold/node_modules/jws/LICENSE b/PBandGraphScaffold/node_modules/jws/LICENSE deleted file mode 100644 index caeb849..0000000 --- a/PBandGraphScaffold/node_modules/jws/LICENSE +++ /dev/null @@ -1,17 +0,0 @@ -Copyright (c) 2013 Brian J. Brennan - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the -Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, -INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR -PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE -FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/PBandGraphScaffold/node_modules/jws/index.js b/PBandGraphScaffold/node_modules/jws/index.js deleted file mode 100644 index 8c8da93..0000000 --- a/PBandGraphScaffold/node_modules/jws/index.js +++ /dev/null @@ -1,22 +0,0 @@ -/*global exports*/ -var SignStream = require('./lib/sign-stream'); -var VerifyStream = require('./lib/verify-stream'); - -var ALGORITHMS = [ - 'HS256', 'HS384', 'HS512', - 'RS256', 'RS384', 'RS512', - 'PS256', 'PS384', 'PS512', - 'ES256', 'ES384', 'ES512' -]; - -exports.ALGORITHMS = ALGORITHMS; -exports.sign = SignStream.sign; -exports.verify = VerifyStream.verify; -exports.decode = VerifyStream.decode; -exports.isValid = VerifyStream.isValid; -exports.createSign = function createSign(opts) { - return new SignStream(opts); -}; -exports.createVerify = function createVerify(opts) { - return new VerifyStream(opts); -}; diff --git a/PBandGraphScaffold/node_modules/jws/lib/data-stream.js b/PBandGraphScaffold/node_modules/jws/lib/data-stream.js deleted file mode 100644 index 3535d31..0000000 --- a/PBandGraphScaffold/node_modules/jws/lib/data-stream.js +++ /dev/null @@ -1,55 +0,0 @@ -/*global module, process*/ -var Buffer = require('safe-buffer').Buffer; -var Stream = require('stream'); -var util = require('util'); - -function DataStream(data) { - this.buffer = null; - this.writable = true; - this.readable = true; - - // No input - if (!data) { - this.buffer = Buffer.alloc(0); - return this; - } - - // Stream - if (typeof data.pipe === 'function') { - this.buffer = Buffer.alloc(0); - data.pipe(this); - return this; - } - - // Buffer or String - // or Object (assumedly a passworded key) - if (data.length || typeof data === 'object') { - this.buffer = data; - this.writable = false; - process.nextTick(function () { - this.emit('end', data); - this.readable = false; - this.emit('close'); - }.bind(this)); - return this; - } - - throw new TypeError('Unexpected data type ('+ typeof data + ')'); -} -util.inherits(DataStream, Stream); - -DataStream.prototype.write = function write(data) { - this.buffer = Buffer.concat([this.buffer, Buffer.from(data)]); - this.emit('data', data); -}; - -DataStream.prototype.end = function end(data) { - if (data) - this.write(data); - this.emit('end', data); - this.emit('close'); - this.writable = false; - this.readable = false; -}; - -module.exports = DataStream; diff --git a/PBandGraphScaffold/node_modules/jws/lib/sign-stream.js b/PBandGraphScaffold/node_modules/jws/lib/sign-stream.js deleted file mode 100644 index 4a7b288..0000000 --- a/PBandGraphScaffold/node_modules/jws/lib/sign-stream.js +++ /dev/null @@ -1,83 +0,0 @@ -/*global module*/ -var Buffer = require('safe-buffer').Buffer; -var DataStream = require('./data-stream'); -var jwa = require('jwa'); -var Stream = require('stream'); -var toString = require('./tostring'); -var util = require('util'); - -function base64url(string, encoding) { - return Buffer - .from(string, encoding) - .toString('base64') - .replace(/=/g, '') - .replace(/\+/g, '-') - .replace(/\//g, '_'); -} - -function jwsSecuredInput(header, payload, encoding) { - encoding = encoding || 'utf8'; - var encodedHeader = base64url(toString(header), 'binary'); - var encodedPayload = base64url(toString(payload), encoding); - return util.format('%s.%s', encodedHeader, encodedPayload); -} - -function jwsSign(opts) { - var header = opts.header; - var payload = opts.payload; - var secretOrKey = opts.secret || opts.privateKey; - var encoding = opts.encoding; - var algo = jwa(header.alg); - var securedInput = jwsSecuredInput(header, payload, encoding); - var signature = algo.sign(securedInput, secretOrKey); - return util.format('%s.%s', securedInput, signature); -} - -function SignStream(opts) { - var secret = opts.secret; - secret = secret == null ? opts.privateKey : secret; - secret = secret == null ? opts.key : secret; - if (/^hs/i.test(opts.header.alg) === true && secret == null) { - throw new TypeError('secret must be a string or buffer or a KeyObject') - } - var secretStream = new DataStream(secret); - this.readable = true; - this.header = opts.header; - this.encoding = opts.encoding; - this.secret = this.privateKey = this.key = secretStream; - this.payload = new DataStream(opts.payload); - this.secret.once('close', function () { - if (!this.payload.writable && this.readable) - this.sign(); - }.bind(this)); - - this.payload.once('close', function () { - if (!this.secret.writable && this.readable) - this.sign(); - }.bind(this)); -} -util.inherits(SignStream, Stream); - -SignStream.prototype.sign = function sign() { - try { - var signature = jwsSign({ - header: this.header, - payload: this.payload.buffer, - secret: this.secret.buffer, - encoding: this.encoding - }); - this.emit('done', signature); - this.emit('data', signature); - this.emit('end'); - this.readable = false; - return signature; - } catch (e) { - this.readable = false; - this.emit('error', e); - this.emit('close'); - } -}; - -SignStream.sign = jwsSign; - -module.exports = SignStream; diff --git a/PBandGraphScaffold/node_modules/jws/lib/tostring.js b/PBandGraphScaffold/node_modules/jws/lib/tostring.js deleted file mode 100644 index f5a49a3..0000000 --- a/PBandGraphScaffold/node_modules/jws/lib/tostring.js +++ /dev/null @@ -1,10 +0,0 @@ -/*global module*/ -var Buffer = require('buffer').Buffer; - -module.exports = function toString(obj) { - if (typeof obj === 'string') - return obj; - if (typeof obj === 'number' || Buffer.isBuffer(obj)) - return obj.toString(); - return JSON.stringify(obj); -}; diff --git a/PBandGraphScaffold/node_modules/jws/lib/verify-stream.js b/PBandGraphScaffold/node_modules/jws/lib/verify-stream.js deleted file mode 100644 index bb1cb00..0000000 --- a/PBandGraphScaffold/node_modules/jws/lib/verify-stream.js +++ /dev/null @@ -1,125 +0,0 @@ -/*global module*/ -var Buffer = require('safe-buffer').Buffer; -var DataStream = require('./data-stream'); -var jwa = require('jwa'); -var Stream = require('stream'); -var toString = require('./tostring'); -var util = require('util'); -var JWS_REGEX = /^[a-zA-Z0-9\-_]+?\.[a-zA-Z0-9\-_]+?\.([a-zA-Z0-9\-_]+)?$/; - -function isObject(thing) { - return Object.prototype.toString.call(thing) === '[object Object]'; -} - -function safeJsonParse(thing) { - if (isObject(thing)) - return thing; - try { return JSON.parse(thing); } - catch (e) { return undefined; } -} - -function headerFromJWS(jwsSig) { - var encodedHeader = jwsSig.split('.', 1)[0]; - return safeJsonParse(Buffer.from(encodedHeader, 'base64').toString('binary')); -} - -function securedInputFromJWS(jwsSig) { - return jwsSig.split('.', 2).join('.'); -} - -function signatureFromJWS(jwsSig) { - return jwsSig.split('.')[2]; -} - -function payloadFromJWS(jwsSig, encoding) { - encoding = encoding || 'utf8'; - var payload = jwsSig.split('.')[1]; - return Buffer.from(payload, 'base64').toString(encoding); -} - -function isValidJws(string) { - return JWS_REGEX.test(string) && !!headerFromJWS(string); -} - -function jwsVerify(jwsSig, algorithm, secretOrKey) { - if (!algorithm) { - var err = new Error("Missing algorithm parameter for jws.verify"); - err.code = "MISSING_ALGORITHM"; - throw err; - } - jwsSig = toString(jwsSig); - var signature = signatureFromJWS(jwsSig); - var securedInput = securedInputFromJWS(jwsSig); - var algo = jwa(algorithm); - return algo.verify(securedInput, signature, secretOrKey); -} - -function jwsDecode(jwsSig, opts) { - opts = opts || {}; - jwsSig = toString(jwsSig); - - if (!isValidJws(jwsSig)) - return null; - - var header = headerFromJWS(jwsSig); - - if (!header) - return null; - - var payload = payloadFromJWS(jwsSig); - if (header.typ === 'JWT' || opts.json) - payload = JSON.parse(payload, opts.encoding); - - return { - header: header, - payload: payload, - signature: signatureFromJWS(jwsSig) - }; -} - -function VerifyStream(opts) { - opts = opts || {}; - var secretOrKey = opts.secret; - secretOrKey = secretOrKey == null ? opts.publicKey : secretOrKey; - secretOrKey = secretOrKey == null ? opts.key : secretOrKey; - if (/^hs/i.test(opts.algorithm) === true && secretOrKey == null) { - throw new TypeError('secret must be a string or buffer or a KeyObject') - } - var secretStream = new DataStream(secretOrKey); - this.readable = true; - this.algorithm = opts.algorithm; - this.encoding = opts.encoding; - this.secret = this.publicKey = this.key = secretStream; - this.signature = new DataStream(opts.signature); - this.secret.once('close', function () { - if (!this.signature.writable && this.readable) - this.verify(); - }.bind(this)); - - this.signature.once('close', function () { - if (!this.secret.writable && this.readable) - this.verify(); - }.bind(this)); -} -util.inherits(VerifyStream, Stream); -VerifyStream.prototype.verify = function verify() { - try { - var valid = jwsVerify(this.signature.buffer, this.algorithm, this.key.buffer); - var obj = jwsDecode(this.signature.buffer, this.encoding); - this.emit('done', valid, obj); - this.emit('data', valid); - this.emit('end'); - this.readable = false; - return valid; - } catch (e) { - this.readable = false; - this.emit('error', e); - this.emit('close'); - } -}; - -VerifyStream.decode = jwsDecode; -VerifyStream.isValid = isValidJws; -VerifyStream.verify = jwsVerify; - -module.exports = VerifyStream; diff --git a/PBandGraphScaffold/node_modules/jws/opslevel.yml b/PBandGraphScaffold/node_modules/jws/opslevel.yml deleted file mode 100644 index aeeeea7..0000000 --- a/PBandGraphScaffold/node_modules/jws/opslevel.yml +++ /dev/null @@ -1,6 +0,0 @@ ---- -version: 1 -repository: - owner: iam_protocols - tier: - tags: diff --git a/PBandGraphScaffold/node_modules/jws/package.json b/PBandGraphScaffold/node_modules/jws/package.json deleted file mode 100644 index 464d72b..0000000 --- a/PBandGraphScaffold/node_modules/jws/package.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "name": "jws", - "version": "4.0.1", - "description": "Implementation of JSON Web Signatures", - "main": "index.js", - "directories": { - "test": "test" - }, - "scripts": { - "test": "make test" - }, - "repository": { - "type": "git", - "url": "git://github.com/brianloveswords/node-jws.git" - }, - "keywords": [ - "jws", - "json", - "web", - "signatures" - ], - "author": "Brian J Brennan", - "license": "MIT", - "readmeFilename": "readme.md", - "gitHead": "c0f6b27bcea5a2ad2e304d91c2e842e4076a6b03", - "dependencies": { - "jwa": "^2.0.1", - "safe-buffer": "^5.0.1" - }, - "devDependencies": { - "semver": "^5.1.0", - "tape": "~2.14.0" - } -} diff --git a/PBandGraphScaffold/node_modules/jws/readme.md b/PBandGraphScaffold/node_modules/jws/readme.md deleted file mode 100644 index 2f32dca..0000000 --- a/PBandGraphScaffold/node_modules/jws/readme.md +++ /dev/null @@ -1,255 +0,0 @@ -# node-jws [![Build Status](https://secure.travis-ci.org/brianloveswords/node-jws.svg)](http://travis-ci.org/brianloveswords/node-jws) - -An implementation of [JSON Web Signatures](http://self-issued.info/docs/draft-ietf-jose-json-web-signature.html). - -This was developed against `draft-ietf-jose-json-web-signature-08` and -implements the entire spec **except** X.509 Certificate Chain -signing/verifying (patches welcome). - -There are both synchronous (`jws.sign`, `jws.verify`) and streaming -(`jws.createSign`, `jws.createVerify`) APIs. - -# Install - -```bash -$ npm install jws -``` - -# Usage - -## jws.ALGORITHMS - -Array of supported algorithms. The following algorithms are currently supported. - -alg Parameter Value | Digital Signature or MAC Algorithm -----------------|---------------------------- -HS256 | HMAC using SHA-256 hash algorithm -HS384 | HMAC using SHA-384 hash algorithm -HS512 | HMAC using SHA-512 hash algorithm -RS256 | RSASSA using SHA-256 hash algorithm -RS384 | RSASSA using SHA-384 hash algorithm -RS512 | RSASSA using SHA-512 hash algorithm -PS256 | RSASSA-PSS using SHA-256 hash algorithm -PS384 | RSASSA-PSS using SHA-384 hash algorithm -PS512 | RSASSA-PSS using SHA-512 hash algorithm -ES256 | ECDSA using P-256 curve and SHA-256 hash algorithm -ES384 | ECDSA using P-384 curve and SHA-384 hash algorithm -ES512 | ECDSA using P-521 curve and SHA-512 hash algorithm -none | No digital signature or MAC value included - -## jws.sign(options) - -(Synchronous) Return a JSON Web Signature for a header and a payload. - -Options: - -* `header` -* `payload` -* `secret` or `privateKey` -* `encoding` (Optional, defaults to 'utf8') - -`header` must be an object with an `alg` property. `header.alg` must be -one a value found in `jws.ALGORITHMS`. See above for a table of -supported algorithms. - -If `payload` is not a buffer or a string, it will be coerced into a string -using `JSON.stringify`. - -Example - -```js -const signature = jws.sign({ - header: { alg: 'HS256' }, - payload: 'h. jon benjamin', - secret: 'has a van', -}); -``` - -## jws.verify(signature, algorithm, secretOrKey) - -(Synchronous) Returns `true` or `false` for whether a signature matches a -secret or key. - -`signature` is a JWS Signature. `header.alg` must be a value found in `jws.ALGORITHMS`. -See above for a table of supported algorithms. `secretOrKey` is a string or -buffer containing either the secret for HMAC algorithms, or the PEM -encoded public key for RSA and ECDSA. - -Note that the `"alg"` value from the signature header is ignored. - - -## jws.decode(signature) - -(Synchronous) Returns the decoded header, decoded payload, and signature -parts of the JWS Signature. - -Returns an object with three properties, e.g. -```js -{ header: { alg: 'HS256' }, - payload: 'h. jon benjamin', - signature: 'YOWPewyGHKu4Y_0M_vtlEnNlqmFOclqp4Hy6hVHfFT4' -} -``` - -## jws.createSign(options) - -Returns a new SignStream object. - -Options: - -* `header` (required) -* `payload` -* `key` || `privateKey` || `secret` -* `encoding` (Optional, defaults to 'utf8') - -Other than `header`, all options expect a string or a buffer when the -value is known ahead of time, or a stream for convenience. -`key`/`privateKey`/`secret` may also be an object when using an encrypted -private key, see the [crypto documentation][encrypted-key-docs]. - -Example: - -```js - -// This... -jws.createSign({ - header: { alg: 'RS256' }, - privateKey: privateKeyStream, - payload: payloadStream, -}).on('done', function(signature) { - // ... -}); - -// is equivalent to this: -const signer = jws.createSign({ - header: { alg: 'RS256' }, -}); -privateKeyStream.pipe(signer.privateKey); -payloadStream.pipe(signer.payload); -signer.on('done', function(signature) { - // ... -}); -``` - -## jws.createVerify(options) - -Returns a new VerifyStream object. - -Options: - -* `signature` -* `algorithm` -* `key` || `publicKey` || `secret` -* `encoding` (Optional, defaults to 'utf8') - -All options expect a string or a buffer when the value is known ahead of -time, or a stream for convenience. - -Example: - -```js - -// This... -jws.createVerify({ - publicKey: pubKeyStream, - signature: sigStream, -}).on('done', function(verified, obj) { - // ... -}); - -// is equivilant to this: -const verifier = jws.createVerify(); -pubKeyStream.pipe(verifier.publicKey); -sigStream.pipe(verifier.signature); -verifier.on('done', function(verified, obj) { - // ... -}); -``` - -## Class: SignStream - -A `Readable Stream` that emits a single data event (the calculated -signature) when done. - -### Event: 'done' -`function (signature) { }` - -### signer.payload - -A `Writable Stream` that expects the JWS payload. Do *not* use if you -passed a `payload` option to the constructor. - -Example: - -```js -payloadStream.pipe(signer.payload); -``` - -### signer.secret
signer.key
signer.privateKey - -A `Writable Stream`. Expects the JWS secret for HMAC, or the privateKey -for ECDSA and RSA. Do *not* use if you passed a `secret` or `key` option -to the constructor. - -Example: - -```js -privateKeyStream.pipe(signer.privateKey); -``` - -## Class: VerifyStream - -This is a `Readable Stream` that emits a single data event, the result -of whether or not that signature was valid. - -### Event: 'done' -`function (valid, obj) { }` - -`valid` is a boolean for whether or not the signature is valid. - -### verifier.signature - -A `Writable Stream` that expects a JWS Signature. Do *not* use if you -passed a `signature` option to the constructor. - -### verifier.secret
verifier.key
verifier.publicKey - -A `Writable Stream` that expects a public key or secret. Do *not* use if you -passed a `key` or `secret` option to the constructor. - -# TODO - -* It feels like there should be some convenience options/APIs for - defining the algorithm rather than having to define a header object - with `{ alg: 'ES512' }` or whatever every time. - -* X.509 support, ugh - -# License - -MIT - -``` -Copyright (c) 2013-2015 Brian J. Brennan - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -``` - -[encrypted-key-docs]: https://nodejs.org/api/crypto.html#crypto_sign_sign_private_key_output_format diff --git a/PBandGraphScaffold/node_modules/lodash.includes/LICENSE b/PBandGraphScaffold/node_modules/lodash.includes/LICENSE deleted file mode 100644 index e0c69d5..0000000 --- a/PBandGraphScaffold/node_modules/lodash.includes/LICENSE +++ /dev/null @@ -1,47 +0,0 @@ -Copyright jQuery Foundation and other contributors - -Based on Underscore.js, copyright Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -This software consists of voluntary contributions made by many -individuals. For exact contribution history, see the revision history -available at https://github.com/lodash/lodash - -The following license applies to all parts of this software except as -documented below: - -==== - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -==== - -Copyright and related rights for sample code are waived via CC0. Sample -code is defined as all source code displayed within the prose of the -documentation. - -CC0: http://creativecommons.org/publicdomain/zero/1.0/ - -==== - -Files located in the node_modules and vendor directories are externally -maintained libraries used by this software which have their own -licenses; we recommend you read them, as their terms may differ from the -terms above. diff --git a/PBandGraphScaffold/node_modules/lodash.includes/README.md b/PBandGraphScaffold/node_modules/lodash.includes/README.md deleted file mode 100644 index 26e9377..0000000 --- a/PBandGraphScaffold/node_modules/lodash.includes/README.md +++ /dev/null @@ -1,18 +0,0 @@ -# lodash.includes v4.3.0 - -The [lodash](https://lodash.com/) method `_.includes` exported as a [Node.js](https://nodejs.org/) module. - -## Installation - -Using npm: -```bash -$ {sudo -H} npm i -g npm -$ npm i --save lodash.includes -``` - -In Node.js: -```js -var includes = require('lodash.includes'); -``` - -See the [documentation](https://lodash.com/docs#includes) or [package source](https://github.com/lodash/lodash/blob/4.3.0-npm-packages/lodash.includes) for more details. diff --git a/PBandGraphScaffold/node_modules/lodash.includes/index.js b/PBandGraphScaffold/node_modules/lodash.includes/index.js deleted file mode 100644 index e88d533..0000000 --- a/PBandGraphScaffold/node_modules/lodash.includes/index.js +++ /dev/null @@ -1,745 +0,0 @@ -/** - * lodash (Custom Build) - * Build: `lodash modularize exports="npm" -o ./` - * Copyright jQuery Foundation and other contributors - * Released under MIT license - * Based on Underscore.js 1.8.3 - * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */ - -/** Used as references for various `Number` constants. */ -var INFINITY = 1 / 0, - MAX_SAFE_INTEGER = 9007199254740991, - MAX_INTEGER = 1.7976931348623157e+308, - NAN = 0 / 0; - -/** `Object#toString` result references. */ -var argsTag = '[object Arguments]', - funcTag = '[object Function]', - genTag = '[object GeneratorFunction]', - stringTag = '[object String]', - symbolTag = '[object Symbol]'; - -/** Used to match leading and trailing whitespace. */ -var reTrim = /^\s+|\s+$/g; - -/** Used to detect bad signed hexadecimal string values. */ -var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; - -/** Used to detect binary string values. */ -var reIsBinary = /^0b[01]+$/i; - -/** Used to detect octal string values. */ -var reIsOctal = /^0o[0-7]+$/i; - -/** Used to detect unsigned integer values. */ -var reIsUint = /^(?:0|[1-9]\d*)$/; - -/** Built-in method references without a dependency on `root`. */ -var freeParseInt = parseInt; - -/** - * A specialized version of `_.map` for arrays without support for iteratee - * shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns the new mapped array. - */ -function arrayMap(array, iteratee) { - var index = -1, - length = array ? array.length : 0, - result = Array(length); - - while (++index < length) { - result[index] = iteratee(array[index], index, array); - } - return result; -} - -/** - * The base implementation of `_.findIndex` and `_.findLastIndex` without - * support for iteratee shorthands. - * - * @private - * @param {Array} array The array to inspect. - * @param {Function} predicate The function invoked per iteration. - * @param {number} fromIndex The index to search from. - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {number} Returns the index of the matched value, else `-1`. - */ -function baseFindIndex(array, predicate, fromIndex, fromRight) { - var length = array.length, - index = fromIndex + (fromRight ? 1 : -1); - - while ((fromRight ? index-- : ++index < length)) { - if (predicate(array[index], index, array)) { - return index; - } - } - return -1; -} - -/** - * The base implementation of `_.indexOf` without `fromIndex` bounds checks. - * - * @private - * @param {Array} array The array to inspect. - * @param {*} value The value to search for. - * @param {number} fromIndex The index to search from. - * @returns {number} Returns the index of the matched value, else `-1`. - */ -function baseIndexOf(array, value, fromIndex) { - if (value !== value) { - return baseFindIndex(array, baseIsNaN, fromIndex); - } - var index = fromIndex - 1, - length = array.length; - - while (++index < length) { - if (array[index] === value) { - return index; - } - } - return -1; -} - -/** - * The base implementation of `_.isNaN` without support for number objects. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. - */ -function baseIsNaN(value) { - return value !== value; -} - -/** - * The base implementation of `_.times` without support for iteratee shorthands - * or max array length checks. - * - * @private - * @param {number} n The number of times to invoke `iteratee`. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns the array of results. - */ -function baseTimes(n, iteratee) { - var index = -1, - result = Array(n); - - while (++index < n) { - result[index] = iteratee(index); - } - return result; -} - -/** - * The base implementation of `_.values` and `_.valuesIn` which creates an - * array of `object` property values corresponding to the property names - * of `props`. - * - * @private - * @param {Object} object The object to query. - * @param {Array} props The property names to get values for. - * @returns {Object} Returns the array of property values. - */ -function baseValues(object, props) { - return arrayMap(props, function(key) { - return object[key]; - }); -} - -/** - * Creates a unary function that invokes `func` with its argument transformed. - * - * @private - * @param {Function} func The function to wrap. - * @param {Function} transform The argument transform. - * @returns {Function} Returns the new function. - */ -function overArg(func, transform) { - return function(arg) { - return func(transform(arg)); - }; -} - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) - * of values. - */ -var objectToString = objectProto.toString; - -/** Built-in value references. */ -var propertyIsEnumerable = objectProto.propertyIsEnumerable; - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeKeys = overArg(Object.keys, Object), - nativeMax = Math.max; - -/** - * Creates an array of the enumerable property names of the array-like `value`. - * - * @private - * @param {*} value The value to query. - * @param {boolean} inherited Specify returning inherited property names. - * @returns {Array} Returns the array of property names. - */ -function arrayLikeKeys(value, inherited) { - // Safari 8.1 makes `arguments.callee` enumerable in strict mode. - // Safari 9 makes `arguments.length` enumerable in strict mode. - var result = (isArray(value) || isArguments(value)) - ? baseTimes(value.length, String) - : []; - - var length = result.length, - skipIndexes = !!length; - - for (var key in value) { - if ((inherited || hasOwnProperty.call(value, key)) && - !(skipIndexes && (key == 'length' || isIndex(key, length)))) { - result.push(key); - } - } - return result; -} - -/** - * The base implementation of `_.keys` which doesn't treat sparse arrays as dense. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - */ -function baseKeys(object) { - if (!isPrototype(object)) { - return nativeKeys(object); - } - var result = []; - for (var key in Object(object)) { - if (hasOwnProperty.call(object, key) && key != 'constructor') { - result.push(key); - } - } - return result; -} - -/** - * Checks if `value` is a valid array-like index. - * - * @private - * @param {*} value The value to check. - * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. - * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. - */ -function isIndex(value, length) { - length = length == null ? MAX_SAFE_INTEGER : length; - return !!length && - (typeof value == 'number' || reIsUint.test(value)) && - (value > -1 && value % 1 == 0 && value < length); -} - -/** - * Checks if `value` is likely a prototype object. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. - */ -function isPrototype(value) { - var Ctor = value && value.constructor, - proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto; - - return value === proto; -} - -/** - * Checks if `value` is in `collection`. If `collection` is a string, it's - * checked for a substring of `value`, otherwise - * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * is used for equality comparisons. If `fromIndex` is negative, it's used as - * the offset from the end of `collection`. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object|string} collection The collection to inspect. - * @param {*} value The value to search for. - * @param {number} [fromIndex=0] The index to search from. - * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`. - * @returns {boolean} Returns `true` if `value` is found, else `false`. - * @example - * - * _.includes([1, 2, 3], 1); - * // => true - * - * _.includes([1, 2, 3], 1, 2); - * // => false - * - * _.includes({ 'a': 1, 'b': 2 }, 1); - * // => true - * - * _.includes('abcd', 'bc'); - * // => true - */ -function includes(collection, value, fromIndex, guard) { - collection = isArrayLike(collection) ? collection : values(collection); - fromIndex = (fromIndex && !guard) ? toInteger(fromIndex) : 0; - - var length = collection.length; - if (fromIndex < 0) { - fromIndex = nativeMax(length + fromIndex, 0); - } - return isString(collection) - ? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1) - : (!!length && baseIndexOf(collection, value, fromIndex) > -1); -} - -/** - * Checks if `value` is likely an `arguments` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an `arguments` object, - * else `false`. - * @example - * - * _.isArguments(function() { return arguments; }()); - * // => true - * - * _.isArguments([1, 2, 3]); - * // => false - */ -function isArguments(value) { - // Safari 8.1 makes `arguments.callee` enumerable in strict mode. - return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') && - (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag); -} - -/** - * Checks if `value` is classified as an `Array` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an array, else `false`. - * @example - * - * _.isArray([1, 2, 3]); - * // => true - * - * _.isArray(document.body.children); - * // => false - * - * _.isArray('abc'); - * // => false - * - * _.isArray(_.noop); - * // => false - */ -var isArray = Array.isArray; - -/** - * Checks if `value` is array-like. A value is considered array-like if it's - * not a function and has a `value.length` that's an integer greater than or - * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is array-like, else `false`. - * @example - * - * _.isArrayLike([1, 2, 3]); - * // => true - * - * _.isArrayLike(document.body.children); - * // => true - * - * _.isArrayLike('abc'); - * // => true - * - * _.isArrayLike(_.noop); - * // => false - */ -function isArrayLike(value) { - return value != null && isLength(value.length) && !isFunction(value); -} - -/** - * This method is like `_.isArrayLike` except that it also checks if `value` - * is an object. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an array-like object, - * else `false`. - * @example - * - * _.isArrayLikeObject([1, 2, 3]); - * // => true - * - * _.isArrayLikeObject(document.body.children); - * // => true - * - * _.isArrayLikeObject('abc'); - * // => false - * - * _.isArrayLikeObject(_.noop); - * // => false - */ -function isArrayLikeObject(value) { - return isObjectLike(value) && isArrayLike(value); -} - -/** - * Checks if `value` is classified as a `Function` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a function, else `false`. - * @example - * - * _.isFunction(_); - * // => true - * - * _.isFunction(/abc/); - * // => false - */ -function isFunction(value) { - // The use of `Object#toString` avoids issues with the `typeof` operator - // in Safari 8-9 which returns 'object' for typed array and other constructors. - var tag = isObject(value) ? objectToString.call(value) : ''; - return tag == funcTag || tag == genTag; -} - -/** - * Checks if `value` is a valid array-like length. - * - * **Note:** This method is loosely based on - * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. - * @example - * - * _.isLength(3); - * // => true - * - * _.isLength(Number.MIN_VALUE); - * // => false - * - * _.isLength(Infinity); - * // => false - * - * _.isLength('3'); - * // => false - */ -function isLength(value) { - return typeof value == 'number' && - value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; -} - -/** - * Checks if `value` is the - * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) - * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an object, else `false`. - * @example - * - * _.isObject({}); - * // => true - * - * _.isObject([1, 2, 3]); - * // => true - * - * _.isObject(_.noop); - * // => true - * - * _.isObject(null); - * // => false - */ -function isObject(value) { - var type = typeof value; - return !!value && (type == 'object' || type == 'function'); -} - -/** - * Checks if `value` is object-like. A value is object-like if it's not `null` - * and has a `typeof` result of "object". - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is object-like, else `false`. - * @example - * - * _.isObjectLike({}); - * // => true - * - * _.isObjectLike([1, 2, 3]); - * // => true - * - * _.isObjectLike(_.noop); - * // => false - * - * _.isObjectLike(null); - * // => false - */ -function isObjectLike(value) { - return !!value && typeof value == 'object'; -} - -/** - * Checks if `value` is classified as a `String` primitive or object. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a string, else `false`. - * @example - * - * _.isString('abc'); - * // => true - * - * _.isString(1); - * // => false - */ -function isString(value) { - return typeof value == 'string' || - (!isArray(value) && isObjectLike(value) && objectToString.call(value) == stringTag); -} - -/** - * Checks if `value` is classified as a `Symbol` primitive or object. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. - * @example - * - * _.isSymbol(Symbol.iterator); - * // => true - * - * _.isSymbol('abc'); - * // => false - */ -function isSymbol(value) { - return typeof value == 'symbol' || - (isObjectLike(value) && objectToString.call(value) == symbolTag); -} - -/** - * Converts `value` to a finite number. - * - * @static - * @memberOf _ - * @since 4.12.0 - * @category Lang - * @param {*} value The value to convert. - * @returns {number} Returns the converted number. - * @example - * - * _.toFinite(3.2); - * // => 3.2 - * - * _.toFinite(Number.MIN_VALUE); - * // => 5e-324 - * - * _.toFinite(Infinity); - * // => 1.7976931348623157e+308 - * - * _.toFinite('3.2'); - * // => 3.2 - */ -function toFinite(value) { - if (!value) { - return value === 0 ? value : 0; - } - value = toNumber(value); - if (value === INFINITY || value === -INFINITY) { - var sign = (value < 0 ? -1 : 1); - return sign * MAX_INTEGER; - } - return value === value ? value : 0; -} - -/** - * Converts `value` to an integer. - * - * **Note:** This method is loosely based on - * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to convert. - * @returns {number} Returns the converted integer. - * @example - * - * _.toInteger(3.2); - * // => 3 - * - * _.toInteger(Number.MIN_VALUE); - * // => 0 - * - * _.toInteger(Infinity); - * // => 1.7976931348623157e+308 - * - * _.toInteger('3.2'); - * // => 3 - */ -function toInteger(value) { - var result = toFinite(value), - remainder = result % 1; - - return result === result ? (remainder ? result - remainder : result) : 0; -} - -/** - * Converts `value` to a number. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to process. - * @returns {number} Returns the number. - * @example - * - * _.toNumber(3.2); - * // => 3.2 - * - * _.toNumber(Number.MIN_VALUE); - * // => 5e-324 - * - * _.toNumber(Infinity); - * // => Infinity - * - * _.toNumber('3.2'); - * // => 3.2 - */ -function toNumber(value) { - if (typeof value == 'number') { - return value; - } - if (isSymbol(value)) { - return NAN; - } - if (isObject(value)) { - var other = typeof value.valueOf == 'function' ? value.valueOf() : value; - value = isObject(other) ? (other + '') : other; - } - if (typeof value != 'string') { - return value === 0 ? value : +value; - } - value = value.replace(reTrim, ''); - var isBinary = reIsBinary.test(value); - return (isBinary || reIsOctal.test(value)) - ? freeParseInt(value.slice(2), isBinary ? 2 : 8) - : (reIsBadHex.test(value) ? NAN : +value); -} - -/** - * Creates an array of the own enumerable property names of `object`. - * - * **Note:** Non-object values are coerced to objects. See the - * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) - * for more details. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.keys(new Foo); - * // => ['a', 'b'] (iteration order is not guaranteed) - * - * _.keys('hi'); - * // => ['0', '1'] - */ -function keys(object) { - return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object); -} - -/** - * Creates an array of the own enumerable string keyed property values of `object`. - * - * **Note:** Non-object values are coerced to objects. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property values. - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.values(new Foo); - * // => [1, 2] (iteration order is not guaranteed) - * - * _.values('hi'); - * // => ['h', 'i'] - */ -function values(object) { - return object ? baseValues(object, keys(object)) : []; -} - -module.exports = includes; diff --git a/PBandGraphScaffold/node_modules/lodash.includes/package.json b/PBandGraphScaffold/node_modules/lodash.includes/package.json deleted file mode 100644 index a02e645..0000000 --- a/PBandGraphScaffold/node_modules/lodash.includes/package.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "name": "lodash.includes", - "version": "4.3.0", - "description": "The lodash method `_.includes` exported as a module.", - "homepage": "https://lodash.com/", - "icon": "https://lodash.com/icon.svg", - "license": "MIT", - "keywords": "lodash-modularized, includes", - "author": "John-David Dalton (http://allyoucanleet.com/)", - "contributors": [ - "John-David Dalton (http://allyoucanleet.com/)", - "Blaine Bublitz (https://github.com/phated)", - "Mathias Bynens (https://mathiasbynens.be/)" - ], - "repository": "lodash/lodash", - "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" } -} diff --git a/PBandGraphScaffold/node_modules/lodash.isboolean/LICENSE b/PBandGraphScaffold/node_modules/lodash.isboolean/LICENSE deleted file mode 100644 index b054ca5..0000000 --- a/PBandGraphScaffold/node_modules/lodash.isboolean/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2016 The Dojo Foundation -Based on Underscore.js, copyright 2009-2016 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/PBandGraphScaffold/node_modules/lodash.isboolean/README.md b/PBandGraphScaffold/node_modules/lodash.isboolean/README.md deleted file mode 100644 index b3c476b..0000000 --- a/PBandGraphScaffold/node_modules/lodash.isboolean/README.md +++ /dev/null @@ -1,18 +0,0 @@ -# lodash.isboolean v3.0.3 - -The [lodash](https://lodash.com/) method `_.isBoolean` exported as a [Node.js](https://nodejs.org/) module. - -## Installation - -Using npm: -```bash -$ {sudo -H} npm i -g npm -$ npm i --save lodash.isboolean -``` - -In Node.js: -```js -var isBoolean = require('lodash.isboolean'); -``` - -See the [documentation](https://lodash.com/docs#isBoolean) or [package source](https://github.com/lodash/lodash/blob/3.0.3-npm-packages/lodash.isboolean) for more details. diff --git a/PBandGraphScaffold/node_modules/lodash.isboolean/index.js b/PBandGraphScaffold/node_modules/lodash.isboolean/index.js deleted file mode 100644 index 23bbabd..0000000 --- a/PBandGraphScaffold/node_modules/lodash.isboolean/index.js +++ /dev/null @@ -1,70 +0,0 @@ -/** - * lodash 3.0.3 (Custom Build) - * Build: `lodash modularize exports="npm" -o ./` - * Copyright 2012-2016 The Dojo Foundation - * Based on Underscore.js 1.8.3 - * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ - -/** `Object#toString` result references. */ -var boolTag = '[object Boolean]'; - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** - * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) - * of values. - */ -var objectToString = objectProto.toString; - -/** - * Checks if `value` is classified as a boolean primitive or object. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. - * @example - * - * _.isBoolean(false); - * // => true - * - * _.isBoolean(null); - * // => false - */ -function isBoolean(value) { - return value === true || value === false || - (isObjectLike(value) && objectToString.call(value) == boolTag); -} - -/** - * Checks if `value` is object-like. A value is object-like if it's not `null` - * and has a `typeof` result of "object". - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is object-like, else `false`. - * @example - * - * _.isObjectLike({}); - * // => true - * - * _.isObjectLike([1, 2, 3]); - * // => true - * - * _.isObjectLike(_.noop); - * // => false - * - * _.isObjectLike(null); - * // => false - */ -function isObjectLike(value) { - return !!value && typeof value == 'object'; -} - -module.exports = isBoolean; diff --git a/PBandGraphScaffold/node_modules/lodash.isboolean/package.json b/PBandGraphScaffold/node_modules/lodash.isboolean/package.json deleted file mode 100644 index 01d6e8b..0000000 --- a/PBandGraphScaffold/node_modules/lodash.isboolean/package.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "name": "lodash.isboolean", - "version": "3.0.3", - "description": "The lodash method `_.isBoolean` exported as a module.", - "homepage": "https://lodash.com/", - "icon": "https://lodash.com/icon.svg", - "license": "MIT", - "keywords": "lodash-modularized, isboolean", - "author": "John-David Dalton (http://allyoucanleet.com/)", - "contributors": [ - "John-David Dalton (http://allyoucanleet.com/)", - "Blaine Bublitz (https://github.com/phated)", - "Mathias Bynens (https://mathiasbynens.be/)" - ], - "repository": "lodash/lodash", - "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" } -} diff --git a/PBandGraphScaffold/node_modules/lodash.isinteger/LICENSE b/PBandGraphScaffold/node_modules/lodash.isinteger/LICENSE deleted file mode 100644 index e0c69d5..0000000 --- a/PBandGraphScaffold/node_modules/lodash.isinteger/LICENSE +++ /dev/null @@ -1,47 +0,0 @@ -Copyright jQuery Foundation and other contributors - -Based on Underscore.js, copyright Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -This software consists of voluntary contributions made by many -individuals. For exact contribution history, see the revision history -available at https://github.com/lodash/lodash - -The following license applies to all parts of this software except as -documented below: - -==== - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -==== - -Copyright and related rights for sample code are waived via CC0. Sample -code is defined as all source code displayed within the prose of the -documentation. - -CC0: http://creativecommons.org/publicdomain/zero/1.0/ - -==== - -Files located in the node_modules and vendor directories are externally -maintained libraries used by this software which have their own -licenses; we recommend you read them, as their terms may differ from the -terms above. diff --git a/PBandGraphScaffold/node_modules/lodash.isinteger/README.md b/PBandGraphScaffold/node_modules/lodash.isinteger/README.md deleted file mode 100644 index 3a78567..0000000 --- a/PBandGraphScaffold/node_modules/lodash.isinteger/README.md +++ /dev/null @@ -1,18 +0,0 @@ -# lodash.isinteger v4.0.4 - -The [lodash](https://lodash.com/) method `_.isInteger` exported as a [Node.js](https://nodejs.org/) module. - -## Installation - -Using npm: -```bash -$ {sudo -H} npm i -g npm -$ npm i --save lodash.isinteger -``` - -In Node.js: -```js -var isInteger = require('lodash.isinteger'); -``` - -See the [documentation](https://lodash.com/docs#isInteger) or [package source](https://github.com/lodash/lodash/blob/4.0.4-npm-packages/lodash.isinteger) for more details. diff --git a/PBandGraphScaffold/node_modules/lodash.isinteger/index.js b/PBandGraphScaffold/node_modules/lodash.isinteger/index.js deleted file mode 100644 index 3bf06f0..0000000 --- a/PBandGraphScaffold/node_modules/lodash.isinteger/index.js +++ /dev/null @@ -1,265 +0,0 @@ -/** - * lodash (Custom Build) - * Build: `lodash modularize exports="npm" -o ./` - * Copyright jQuery Foundation and other contributors - * Released under MIT license - * Based on Underscore.js 1.8.3 - * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */ - -/** Used as references for various `Number` constants. */ -var INFINITY = 1 / 0, - MAX_INTEGER = 1.7976931348623157e+308, - NAN = 0 / 0; - -/** `Object#toString` result references. */ -var symbolTag = '[object Symbol]'; - -/** Used to match leading and trailing whitespace. */ -var reTrim = /^\s+|\s+$/g; - -/** Used to detect bad signed hexadecimal string values. */ -var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; - -/** Used to detect binary string values. */ -var reIsBinary = /^0b[01]+$/i; - -/** Used to detect octal string values. */ -var reIsOctal = /^0o[0-7]+$/i; - -/** Built-in method references without a dependency on `root`. */ -var freeParseInt = parseInt; - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** - * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) - * of values. - */ -var objectToString = objectProto.toString; - -/** - * Checks if `value` is an integer. - * - * **Note:** This method is based on - * [`Number.isInteger`](https://mdn.io/Number/isInteger). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an integer, else `false`. - * @example - * - * _.isInteger(3); - * // => true - * - * _.isInteger(Number.MIN_VALUE); - * // => false - * - * _.isInteger(Infinity); - * // => false - * - * _.isInteger('3'); - * // => false - */ -function isInteger(value) { - return typeof value == 'number' && value == toInteger(value); -} - -/** - * Checks if `value` is the - * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) - * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an object, else `false`. - * @example - * - * _.isObject({}); - * // => true - * - * _.isObject([1, 2, 3]); - * // => true - * - * _.isObject(_.noop); - * // => true - * - * _.isObject(null); - * // => false - */ -function isObject(value) { - var type = typeof value; - return !!value && (type == 'object' || type == 'function'); -} - -/** - * Checks if `value` is object-like. A value is object-like if it's not `null` - * and has a `typeof` result of "object". - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is object-like, else `false`. - * @example - * - * _.isObjectLike({}); - * // => true - * - * _.isObjectLike([1, 2, 3]); - * // => true - * - * _.isObjectLike(_.noop); - * // => false - * - * _.isObjectLike(null); - * // => false - */ -function isObjectLike(value) { - return !!value && typeof value == 'object'; -} - -/** - * Checks if `value` is classified as a `Symbol` primitive or object. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. - * @example - * - * _.isSymbol(Symbol.iterator); - * // => true - * - * _.isSymbol('abc'); - * // => false - */ -function isSymbol(value) { - return typeof value == 'symbol' || - (isObjectLike(value) && objectToString.call(value) == symbolTag); -} - -/** - * Converts `value` to a finite number. - * - * @static - * @memberOf _ - * @since 4.12.0 - * @category Lang - * @param {*} value The value to convert. - * @returns {number} Returns the converted number. - * @example - * - * _.toFinite(3.2); - * // => 3.2 - * - * _.toFinite(Number.MIN_VALUE); - * // => 5e-324 - * - * _.toFinite(Infinity); - * // => 1.7976931348623157e+308 - * - * _.toFinite('3.2'); - * // => 3.2 - */ -function toFinite(value) { - if (!value) { - return value === 0 ? value : 0; - } - value = toNumber(value); - if (value === INFINITY || value === -INFINITY) { - var sign = (value < 0 ? -1 : 1); - return sign * MAX_INTEGER; - } - return value === value ? value : 0; -} - -/** - * Converts `value` to an integer. - * - * **Note:** This method is loosely based on - * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to convert. - * @returns {number} Returns the converted integer. - * @example - * - * _.toInteger(3.2); - * // => 3 - * - * _.toInteger(Number.MIN_VALUE); - * // => 0 - * - * _.toInteger(Infinity); - * // => 1.7976931348623157e+308 - * - * _.toInteger('3.2'); - * // => 3 - */ -function toInteger(value) { - var result = toFinite(value), - remainder = result % 1; - - return result === result ? (remainder ? result - remainder : result) : 0; -} - -/** - * Converts `value` to a number. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to process. - * @returns {number} Returns the number. - * @example - * - * _.toNumber(3.2); - * // => 3.2 - * - * _.toNumber(Number.MIN_VALUE); - * // => 5e-324 - * - * _.toNumber(Infinity); - * // => Infinity - * - * _.toNumber('3.2'); - * // => 3.2 - */ -function toNumber(value) { - if (typeof value == 'number') { - return value; - } - if (isSymbol(value)) { - return NAN; - } - if (isObject(value)) { - var other = typeof value.valueOf == 'function' ? value.valueOf() : value; - value = isObject(other) ? (other + '') : other; - } - if (typeof value != 'string') { - return value === 0 ? value : +value; - } - value = value.replace(reTrim, ''); - var isBinary = reIsBinary.test(value); - return (isBinary || reIsOctal.test(value)) - ? freeParseInt(value.slice(2), isBinary ? 2 : 8) - : (reIsBadHex.test(value) ? NAN : +value); -} - -module.exports = isInteger; diff --git a/PBandGraphScaffold/node_modules/lodash.isinteger/package.json b/PBandGraphScaffold/node_modules/lodash.isinteger/package.json deleted file mode 100644 index 92db256..0000000 --- a/PBandGraphScaffold/node_modules/lodash.isinteger/package.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "name": "lodash.isinteger", - "version": "4.0.4", - "description": "The lodash method `_.isInteger` exported as a module.", - "homepage": "https://lodash.com/", - "icon": "https://lodash.com/icon.svg", - "license": "MIT", - "keywords": "lodash-modularized, isinteger", - "author": "John-David Dalton (http://allyoucanleet.com/)", - "contributors": [ - "John-David Dalton (http://allyoucanleet.com/)", - "Blaine Bublitz (https://github.com/phated)", - "Mathias Bynens (https://mathiasbynens.be/)" - ], - "repository": "lodash/lodash", - "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" } -} diff --git a/PBandGraphScaffold/node_modules/lodash.isnumber/LICENSE b/PBandGraphScaffold/node_modules/lodash.isnumber/LICENSE deleted file mode 100644 index b054ca5..0000000 --- a/PBandGraphScaffold/node_modules/lodash.isnumber/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2016 The Dojo Foundation -Based on Underscore.js, copyright 2009-2016 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/PBandGraphScaffold/node_modules/lodash.isnumber/README.md b/PBandGraphScaffold/node_modules/lodash.isnumber/README.md deleted file mode 100644 index a1d434d..0000000 --- a/PBandGraphScaffold/node_modules/lodash.isnumber/README.md +++ /dev/null @@ -1,18 +0,0 @@ -# lodash.isnumber v3.0.3 - -The [lodash](https://lodash.com/) method `_.isNumber` exported as a [Node.js](https://nodejs.org/) module. - -## Installation - -Using npm: -```bash -$ {sudo -H} npm i -g npm -$ npm i --save lodash.isnumber -``` - -In Node.js: -```js -var isNumber = require('lodash.isnumber'); -``` - -See the [documentation](https://lodash.com/docs#isNumber) or [package source](https://github.com/lodash/lodash/blob/3.0.3-npm-packages/lodash.isnumber) for more details. diff --git a/PBandGraphScaffold/node_modules/lodash.isnumber/index.js b/PBandGraphScaffold/node_modules/lodash.isnumber/index.js deleted file mode 100644 index 35a8573..0000000 --- a/PBandGraphScaffold/node_modules/lodash.isnumber/index.js +++ /dev/null @@ -1,79 +0,0 @@ -/** - * lodash 3.0.3 (Custom Build) - * Build: `lodash modularize exports="npm" -o ./` - * Copyright 2012-2016 The Dojo Foundation - * Based on Underscore.js 1.8.3 - * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ - -/** `Object#toString` result references. */ -var numberTag = '[object Number]'; - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** - * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) - * of values. - */ -var objectToString = objectProto.toString; - -/** - * Checks if `value` is object-like. A value is object-like if it's not `null` - * and has a `typeof` result of "object". - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is object-like, else `false`. - * @example - * - * _.isObjectLike({}); - * // => true - * - * _.isObjectLike([1, 2, 3]); - * // => true - * - * _.isObjectLike(_.noop); - * // => false - * - * _.isObjectLike(null); - * // => false - */ -function isObjectLike(value) { - return !!value && typeof value == 'object'; -} - -/** - * Checks if `value` is classified as a `Number` primitive or object. - * - * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are classified - * as numbers, use the `_.isFinite` method. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. - * @example - * - * _.isNumber(3); - * // => true - * - * _.isNumber(Number.MIN_VALUE); - * // => true - * - * _.isNumber(Infinity); - * // => true - * - * _.isNumber('3'); - * // => false - */ -function isNumber(value) { - return typeof value == 'number' || - (isObjectLike(value) && objectToString.call(value) == numberTag); -} - -module.exports = isNumber; diff --git a/PBandGraphScaffold/node_modules/lodash.isnumber/package.json b/PBandGraphScaffold/node_modules/lodash.isnumber/package.json deleted file mode 100644 index 4c33c2a..0000000 --- a/PBandGraphScaffold/node_modules/lodash.isnumber/package.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "name": "lodash.isnumber", - "version": "3.0.3", - "description": "The lodash method `_.isNumber` exported as a module.", - "homepage": "https://lodash.com/", - "icon": "https://lodash.com/icon.svg", - "license": "MIT", - "keywords": "lodash-modularized, isnumber", - "author": "John-David Dalton (http://allyoucanleet.com/)", - "contributors": [ - "John-David Dalton (http://allyoucanleet.com/)", - "Blaine Bublitz (https://github.com/phated)", - "Mathias Bynens (https://mathiasbynens.be/)" - ], - "repository": "lodash/lodash", - "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" } -} diff --git a/PBandGraphScaffold/node_modules/lodash.isplainobject/LICENSE b/PBandGraphScaffold/node_modules/lodash.isplainobject/LICENSE deleted file mode 100644 index e0c69d5..0000000 --- a/PBandGraphScaffold/node_modules/lodash.isplainobject/LICENSE +++ /dev/null @@ -1,47 +0,0 @@ -Copyright jQuery Foundation and other contributors - -Based on Underscore.js, copyright Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -This software consists of voluntary contributions made by many -individuals. For exact contribution history, see the revision history -available at https://github.com/lodash/lodash - -The following license applies to all parts of this software except as -documented below: - -==== - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -==== - -Copyright and related rights for sample code are waived via CC0. Sample -code is defined as all source code displayed within the prose of the -documentation. - -CC0: http://creativecommons.org/publicdomain/zero/1.0/ - -==== - -Files located in the node_modules and vendor directories are externally -maintained libraries used by this software which have their own -licenses; we recommend you read them, as their terms may differ from the -terms above. diff --git a/PBandGraphScaffold/node_modules/lodash.isplainobject/README.md b/PBandGraphScaffold/node_modules/lodash.isplainobject/README.md deleted file mode 100644 index aeefd74..0000000 --- a/PBandGraphScaffold/node_modules/lodash.isplainobject/README.md +++ /dev/null @@ -1,18 +0,0 @@ -# lodash.isplainobject v4.0.6 - -The [lodash](https://lodash.com/) method `_.isPlainObject` exported as a [Node.js](https://nodejs.org/) module. - -## Installation - -Using npm: -```bash -$ {sudo -H} npm i -g npm -$ npm i --save lodash.isplainobject -``` - -In Node.js: -```js -var isPlainObject = require('lodash.isplainobject'); -``` - -See the [documentation](https://lodash.com/docs#isPlainObject) or [package source](https://github.com/lodash/lodash/blob/4.0.6-npm-packages/lodash.isplainobject) for more details. diff --git a/PBandGraphScaffold/node_modules/lodash.isplainobject/index.js b/PBandGraphScaffold/node_modules/lodash.isplainobject/index.js deleted file mode 100644 index 0f820ee..0000000 --- a/PBandGraphScaffold/node_modules/lodash.isplainobject/index.js +++ /dev/null @@ -1,139 +0,0 @@ -/** - * lodash (Custom Build) - * Build: `lodash modularize exports="npm" -o ./` - * Copyright jQuery Foundation and other contributors - * Released under MIT license - * Based on Underscore.js 1.8.3 - * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */ - -/** `Object#toString` result references. */ -var objectTag = '[object Object]'; - -/** - * Checks if `value` is a host object in IE < 9. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a host object, else `false`. - */ -function isHostObject(value) { - // Many host objects are `Object` objects that can coerce to strings - // despite having improperly defined `toString` methods. - var result = false; - if (value != null && typeof value.toString != 'function') { - try { - result = !!(value + ''); - } catch (e) {} - } - return result; -} - -/** - * Creates a unary function that invokes `func` with its argument transformed. - * - * @private - * @param {Function} func The function to wrap. - * @param {Function} transform The argument transform. - * @returns {Function} Returns the new function. - */ -function overArg(func, transform) { - return function(arg) { - return func(transform(arg)); - }; -} - -/** Used for built-in method references. */ -var funcProto = Function.prototype, - objectProto = Object.prototype; - -/** Used to resolve the decompiled source of functions. */ -var funcToString = funcProto.toString; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** Used to infer the `Object` constructor. */ -var objectCtorString = funcToString.call(Object); - -/** - * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) - * of values. - */ -var objectToString = objectProto.toString; - -/** Built-in value references. */ -var getPrototype = overArg(Object.getPrototypeOf, Object); - -/** - * Checks if `value` is object-like. A value is object-like if it's not `null` - * and has a `typeof` result of "object". - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is object-like, else `false`. - * @example - * - * _.isObjectLike({}); - * // => true - * - * _.isObjectLike([1, 2, 3]); - * // => true - * - * _.isObjectLike(_.noop); - * // => false - * - * _.isObjectLike(null); - * // => false - */ -function isObjectLike(value) { - return !!value && typeof value == 'object'; -} - -/** - * Checks if `value` is a plain object, that is, an object created by the - * `Object` constructor or one with a `[[Prototype]]` of `null`. - * - * @static - * @memberOf _ - * @since 0.8.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. - * @example - * - * function Foo() { - * this.a = 1; - * } - * - * _.isPlainObject(new Foo); - * // => false - * - * _.isPlainObject([1, 2, 3]); - * // => false - * - * _.isPlainObject({ 'x': 0, 'y': 0 }); - * // => true - * - * _.isPlainObject(Object.create(null)); - * // => true - */ -function isPlainObject(value) { - if (!isObjectLike(value) || - objectToString.call(value) != objectTag || isHostObject(value)) { - return false; - } - var proto = getPrototype(value); - if (proto === null) { - return true; - } - var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor; - return (typeof Ctor == 'function' && - Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString); -} - -module.exports = isPlainObject; diff --git a/PBandGraphScaffold/node_modules/lodash.isplainobject/package.json b/PBandGraphScaffold/node_modules/lodash.isplainobject/package.json deleted file mode 100644 index 86f6a07..0000000 --- a/PBandGraphScaffold/node_modules/lodash.isplainobject/package.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "name": "lodash.isplainobject", - "version": "4.0.6", - "description": "The lodash method `_.isPlainObject` exported as a module.", - "homepage": "https://lodash.com/", - "icon": "https://lodash.com/icon.svg", - "license": "MIT", - "keywords": "lodash-modularized, isplainobject", - "author": "John-David Dalton (http://allyoucanleet.com/)", - "contributors": [ - "John-David Dalton (http://allyoucanleet.com/)", - "Blaine Bublitz (https://github.com/phated)", - "Mathias Bynens (https://mathiasbynens.be/)" - ], - "repository": "lodash/lodash", - "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" } -} diff --git a/PBandGraphScaffold/node_modules/lodash.isstring/LICENSE b/PBandGraphScaffold/node_modules/lodash.isstring/LICENSE deleted file mode 100644 index b054ca5..0000000 --- a/PBandGraphScaffold/node_modules/lodash.isstring/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2016 The Dojo Foundation -Based on Underscore.js, copyright 2009-2016 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/PBandGraphScaffold/node_modules/lodash.isstring/README.md b/PBandGraphScaffold/node_modules/lodash.isstring/README.md deleted file mode 100644 index f184029..0000000 --- a/PBandGraphScaffold/node_modules/lodash.isstring/README.md +++ /dev/null @@ -1,18 +0,0 @@ -# lodash.isstring v4.0.1 - -The [lodash](https://lodash.com/) method `_.isString` exported as a [Node.js](https://nodejs.org/) module. - -## Installation - -Using npm: -```bash -$ {sudo -H} npm i -g npm -$ npm i --save lodash.isstring -``` - -In Node.js: -```js -var isString = require('lodash.isstring'); -``` - -See the [documentation](https://lodash.com/docs#isString) or [package source](https://github.com/lodash/lodash/blob/4.0.1-npm-packages/lodash.isstring) for more details. diff --git a/PBandGraphScaffold/node_modules/lodash.isstring/index.js b/PBandGraphScaffold/node_modules/lodash.isstring/index.js deleted file mode 100644 index 408225c..0000000 --- a/PBandGraphScaffold/node_modules/lodash.isstring/index.js +++ /dev/null @@ -1,95 +0,0 @@ -/** - * lodash 4.0.1 (Custom Build) - * Build: `lodash modularize exports="npm" -o ./` - * Copyright 2012-2016 The Dojo Foundation - * Based on Underscore.js 1.8.3 - * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ - -/** `Object#toString` result references. */ -var stringTag = '[object String]'; - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** - * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) - * of values. - */ -var objectToString = objectProto.toString; - -/** - * Checks if `value` is classified as an `Array` object. - * - * @static - * @memberOf _ - * @type Function - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. - * @example - * - * _.isArray([1, 2, 3]); - * // => true - * - * _.isArray(document.body.children); - * // => false - * - * _.isArray('abc'); - * // => false - * - * _.isArray(_.noop); - * // => false - */ -var isArray = Array.isArray; - -/** - * Checks if `value` is object-like. A value is object-like if it's not `null` - * and has a `typeof` result of "object". - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is object-like, else `false`. - * @example - * - * _.isObjectLike({}); - * // => true - * - * _.isObjectLike([1, 2, 3]); - * // => true - * - * _.isObjectLike(_.noop); - * // => false - * - * _.isObjectLike(null); - * // => false - */ -function isObjectLike(value) { - return !!value && typeof value == 'object'; -} - -/** - * Checks if `value` is classified as a `String` primitive or object. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. - * @example - * - * _.isString('abc'); - * // => true - * - * _.isString(1); - * // => false - */ -function isString(value) { - return typeof value == 'string' || - (!isArray(value) && isObjectLike(value) && objectToString.call(value) == stringTag); -} - -module.exports = isString; diff --git a/PBandGraphScaffold/node_modules/lodash.isstring/package.json b/PBandGraphScaffold/node_modules/lodash.isstring/package.json deleted file mode 100644 index 1331535..0000000 --- a/PBandGraphScaffold/node_modules/lodash.isstring/package.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "name": "lodash.isstring", - "version": "4.0.1", - "description": "The lodash method `_.isString` exported as a module.", - "homepage": "https://lodash.com/", - "icon": "https://lodash.com/icon.svg", - "license": "MIT", - "keywords": "lodash-modularized, isstring", - "author": "John-David Dalton (http://allyoucanleet.com/)", - "contributors": [ - "John-David Dalton (http://allyoucanleet.com/)", - "Blaine Bublitz (https://github.com/phated)", - "Mathias Bynens (https://mathiasbynens.be/)" - ], - "repository": "lodash/lodash", - "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" } -} diff --git a/PBandGraphScaffold/node_modules/lodash.once/LICENSE b/PBandGraphScaffold/node_modules/lodash.once/LICENSE deleted file mode 100644 index e0c69d5..0000000 --- a/PBandGraphScaffold/node_modules/lodash.once/LICENSE +++ /dev/null @@ -1,47 +0,0 @@ -Copyright jQuery Foundation and other contributors - -Based on Underscore.js, copyright Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -This software consists of voluntary contributions made by many -individuals. For exact contribution history, see the revision history -available at https://github.com/lodash/lodash - -The following license applies to all parts of this software except as -documented below: - -==== - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -==== - -Copyright and related rights for sample code are waived via CC0. Sample -code is defined as all source code displayed within the prose of the -documentation. - -CC0: http://creativecommons.org/publicdomain/zero/1.0/ - -==== - -Files located in the node_modules and vendor directories are externally -maintained libraries used by this software which have their own -licenses; we recommend you read them, as their terms may differ from the -terms above. diff --git a/PBandGraphScaffold/node_modules/lodash.once/README.md b/PBandGraphScaffold/node_modules/lodash.once/README.md deleted file mode 100644 index c4a2f16..0000000 --- a/PBandGraphScaffold/node_modules/lodash.once/README.md +++ /dev/null @@ -1,18 +0,0 @@ -# lodash.once v4.1.1 - -The [lodash](https://lodash.com/) method `_.once` exported as a [Node.js](https://nodejs.org/) module. - -## Installation - -Using npm: -```bash -$ {sudo -H} npm i -g npm -$ npm i --save lodash.once -``` - -In Node.js: -```js -var once = require('lodash.once'); -``` - -See the [documentation](https://lodash.com/docs#once) or [package source](https://github.com/lodash/lodash/blob/4.1.1-npm-packages/lodash.once) for more details. diff --git a/PBandGraphScaffold/node_modules/lodash.once/index.js b/PBandGraphScaffold/node_modules/lodash.once/index.js deleted file mode 100644 index 414ceb3..0000000 --- a/PBandGraphScaffold/node_modules/lodash.once/index.js +++ /dev/null @@ -1,294 +0,0 @@ -/** - * lodash (Custom Build) - * Build: `lodash modularize exports="npm" -o ./` - * Copyright jQuery Foundation and other contributors - * Released under MIT license - * Based on Underscore.js 1.8.3 - * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */ - -/** Used as the `TypeError` message for "Functions" methods. */ -var FUNC_ERROR_TEXT = 'Expected a function'; - -/** Used as references for various `Number` constants. */ -var INFINITY = 1 / 0, - MAX_INTEGER = 1.7976931348623157e+308, - NAN = 0 / 0; - -/** `Object#toString` result references. */ -var symbolTag = '[object Symbol]'; - -/** Used to match leading and trailing whitespace. */ -var reTrim = /^\s+|\s+$/g; - -/** Used to detect bad signed hexadecimal string values. */ -var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; - -/** Used to detect binary string values. */ -var reIsBinary = /^0b[01]+$/i; - -/** Used to detect octal string values. */ -var reIsOctal = /^0o[0-7]+$/i; - -/** Built-in method references without a dependency on `root`. */ -var freeParseInt = parseInt; - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** - * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) - * of values. - */ -var objectToString = objectProto.toString; - -/** - * Creates a function that invokes `func`, with the `this` binding and arguments - * of the created function, while it's called less than `n` times. Subsequent - * calls to the created function return the result of the last `func` invocation. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Function - * @param {number} n The number of calls at which `func` is no longer invoked. - * @param {Function} func The function to restrict. - * @returns {Function} Returns the new restricted function. - * @example - * - * jQuery(element).on('click', _.before(5, addContactToList)); - * // => Allows adding up to 4 contacts to the list. - */ -function before(n, func) { - var result; - if (typeof func != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); - } - n = toInteger(n); - return function() { - if (--n > 0) { - result = func.apply(this, arguments); - } - if (n <= 1) { - func = undefined; - } - return result; - }; -} - -/** - * Creates a function that is restricted to invoking `func` once. Repeat calls - * to the function return the value of the first invocation. The `func` is - * invoked with the `this` binding and arguments of the created function. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Function - * @param {Function} func The function to restrict. - * @returns {Function} Returns the new restricted function. - * @example - * - * var initialize = _.once(createApplication); - * initialize(); - * initialize(); - * // => `createApplication` is invoked once - */ -function once(func) { - return before(2, func); -} - -/** - * Checks if `value` is the - * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) - * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an object, else `false`. - * @example - * - * _.isObject({}); - * // => true - * - * _.isObject([1, 2, 3]); - * // => true - * - * _.isObject(_.noop); - * // => true - * - * _.isObject(null); - * // => false - */ -function isObject(value) { - var type = typeof value; - return !!value && (type == 'object' || type == 'function'); -} - -/** - * Checks if `value` is object-like. A value is object-like if it's not `null` - * and has a `typeof` result of "object". - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is object-like, else `false`. - * @example - * - * _.isObjectLike({}); - * // => true - * - * _.isObjectLike([1, 2, 3]); - * // => true - * - * _.isObjectLike(_.noop); - * // => false - * - * _.isObjectLike(null); - * // => false - */ -function isObjectLike(value) { - return !!value && typeof value == 'object'; -} - -/** - * Checks if `value` is classified as a `Symbol` primitive or object. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. - * @example - * - * _.isSymbol(Symbol.iterator); - * // => true - * - * _.isSymbol('abc'); - * // => false - */ -function isSymbol(value) { - return typeof value == 'symbol' || - (isObjectLike(value) && objectToString.call(value) == symbolTag); -} - -/** - * Converts `value` to a finite number. - * - * @static - * @memberOf _ - * @since 4.12.0 - * @category Lang - * @param {*} value The value to convert. - * @returns {number} Returns the converted number. - * @example - * - * _.toFinite(3.2); - * // => 3.2 - * - * _.toFinite(Number.MIN_VALUE); - * // => 5e-324 - * - * _.toFinite(Infinity); - * // => 1.7976931348623157e+308 - * - * _.toFinite('3.2'); - * // => 3.2 - */ -function toFinite(value) { - if (!value) { - return value === 0 ? value : 0; - } - value = toNumber(value); - if (value === INFINITY || value === -INFINITY) { - var sign = (value < 0 ? -1 : 1); - return sign * MAX_INTEGER; - } - return value === value ? value : 0; -} - -/** - * Converts `value` to an integer. - * - * **Note:** This method is loosely based on - * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to convert. - * @returns {number} Returns the converted integer. - * @example - * - * _.toInteger(3.2); - * // => 3 - * - * _.toInteger(Number.MIN_VALUE); - * // => 0 - * - * _.toInteger(Infinity); - * // => 1.7976931348623157e+308 - * - * _.toInteger('3.2'); - * // => 3 - */ -function toInteger(value) { - var result = toFinite(value), - remainder = result % 1; - - return result === result ? (remainder ? result - remainder : result) : 0; -} - -/** - * Converts `value` to a number. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to process. - * @returns {number} Returns the number. - * @example - * - * _.toNumber(3.2); - * // => 3.2 - * - * _.toNumber(Number.MIN_VALUE); - * // => 5e-324 - * - * _.toNumber(Infinity); - * // => Infinity - * - * _.toNumber('3.2'); - * // => 3.2 - */ -function toNumber(value) { - if (typeof value == 'number') { - return value; - } - if (isSymbol(value)) { - return NAN; - } - if (isObject(value)) { - var other = typeof value.valueOf == 'function' ? value.valueOf() : value; - value = isObject(other) ? (other + '') : other; - } - if (typeof value != 'string') { - return value === 0 ? value : +value; - } - value = value.replace(reTrim, ''); - var isBinary = reIsBinary.test(value); - return (isBinary || reIsOctal.test(value)) - ? freeParseInt(value.slice(2), isBinary ? 2 : 8) - : (reIsBadHex.test(value) ? NAN : +value); -} - -module.exports = once; diff --git a/PBandGraphScaffold/node_modules/lodash.once/package.json b/PBandGraphScaffold/node_modules/lodash.once/package.json deleted file mode 100644 index fae782c..0000000 --- a/PBandGraphScaffold/node_modules/lodash.once/package.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "name": "lodash.once", - "version": "4.1.1", - "description": "The lodash method `_.once` exported as a module.", - "homepage": "https://lodash.com/", - "icon": "https://lodash.com/icon.svg", - "license": "MIT", - "keywords": "lodash-modularized, once", - "author": "John-David Dalton (http://allyoucanleet.com/)", - "contributors": [ - "John-David Dalton (http://allyoucanleet.com/)", - "Blaine Bublitz (https://github.com/phated)", - "Mathias Bynens (https://mathiasbynens.be/)" - ], - "repository": "lodash/lodash", - "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" } -} diff --git a/PBandGraphScaffold/node_modules/ms/index.js b/PBandGraphScaffold/node_modules/ms/index.js deleted file mode 100644 index ea734fb..0000000 --- a/PBandGraphScaffold/node_modules/ms/index.js +++ /dev/null @@ -1,162 +0,0 @@ -/** - * Helpers. - */ - -var s = 1000; -var m = s * 60; -var h = m * 60; -var d = h * 24; -var w = d * 7; -var y = d * 365.25; - -/** - * Parse or format the given `val`. - * - * Options: - * - * - `long` verbose formatting [false] - * - * @param {String|Number} val - * @param {Object} [options] - * @throws {Error} throw an error if val is not a non-empty string or a number - * @return {String|Number} - * @api public - */ - -module.exports = function (val, options) { - options = options || {}; - var type = typeof val; - if (type === 'string' && val.length > 0) { - return parse(val); - } else if (type === 'number' && isFinite(val)) { - return options.long ? fmtLong(val) : fmtShort(val); - } - throw new Error( - 'val is not a non-empty string or a valid number. val=' + - JSON.stringify(val) - ); -}; - -/** - * Parse the given `str` and return milliseconds. - * - * @param {String} str - * @return {Number} - * @api private - */ - -function parse(str) { - str = String(str); - if (str.length > 100) { - return; - } - var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec( - str - ); - if (!match) { - return; - } - var n = parseFloat(match[1]); - var type = (match[2] || 'ms').toLowerCase(); - switch (type) { - case 'years': - case 'year': - case 'yrs': - case 'yr': - case 'y': - return n * y; - case 'weeks': - case 'week': - case 'w': - return n * w; - case 'days': - case 'day': - case 'd': - return n * d; - case 'hours': - case 'hour': - case 'hrs': - case 'hr': - case 'h': - return n * h; - case 'minutes': - case 'minute': - case 'mins': - case 'min': - case 'm': - return n * m; - case 'seconds': - case 'second': - case 'secs': - case 'sec': - case 's': - return n * s; - case 'milliseconds': - case 'millisecond': - case 'msecs': - case 'msec': - case 'ms': - return n; - default: - return undefined; - } -} - -/** - * Short format for `ms`. - * - * @param {Number} ms - * @return {String} - * @api private - */ - -function fmtShort(ms) { - var msAbs = Math.abs(ms); - if (msAbs >= d) { - return Math.round(ms / d) + 'd'; - } - if (msAbs >= h) { - return Math.round(ms / h) + 'h'; - } - if (msAbs >= m) { - return Math.round(ms / m) + 'm'; - } - if (msAbs >= s) { - return Math.round(ms / s) + 's'; - } - return ms + 'ms'; -} - -/** - * Long format for `ms`. - * - * @param {Number} ms - * @return {String} - * @api private - */ - -function fmtLong(ms) { - var msAbs = Math.abs(ms); - if (msAbs >= d) { - return plural(ms, msAbs, d, 'day'); - } - if (msAbs >= h) { - return plural(ms, msAbs, h, 'hour'); - } - if (msAbs >= m) { - return plural(ms, msAbs, m, 'minute'); - } - if (msAbs >= s) { - return plural(ms, msAbs, s, 'second'); - } - return ms + ' ms'; -} - -/** - * Pluralization helper. - */ - -function plural(ms, msAbs, n, name) { - var isPlural = msAbs >= n * 1.5; - return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : ''); -} diff --git a/PBandGraphScaffold/node_modules/ms/license.md b/PBandGraphScaffold/node_modules/ms/license.md deleted file mode 100644 index fa5d39b..0000000 --- a/PBandGraphScaffold/node_modules/ms/license.md +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2020 Vercel, Inc. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/PBandGraphScaffold/node_modules/ms/package.json b/PBandGraphScaffold/node_modules/ms/package.json deleted file mode 100644 index 4997189..0000000 --- a/PBandGraphScaffold/node_modules/ms/package.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "name": "ms", - "version": "2.1.3", - "description": "Tiny millisecond conversion utility", - "repository": "vercel/ms", - "main": "./index", - "files": [ - "index.js" - ], - "scripts": { - "precommit": "lint-staged", - "lint": "eslint lib/* bin/*", - "test": "mocha tests.js" - }, - "eslintConfig": { - "extends": "eslint:recommended", - "env": { - "node": true, - "es6": true - } - }, - "lint-staged": { - "*.js": [ - "npm run lint", - "prettier --single-quote --write", - "git add" - ] - }, - "license": "MIT", - "devDependencies": { - "eslint": "4.18.2", - "expect.js": "0.3.1", - "husky": "0.14.3", - "lint-staged": "5.0.0", - "mocha": "4.0.1", - "prettier": "2.0.5" - } -} diff --git a/PBandGraphScaffold/node_modules/ms/readme.md b/PBandGraphScaffold/node_modules/ms/readme.md deleted file mode 100644 index 0fc1abb..0000000 --- a/PBandGraphScaffold/node_modules/ms/readme.md +++ /dev/null @@ -1,59 +0,0 @@ -# ms - -![CI](https://github.com/vercel/ms/workflows/CI/badge.svg) - -Use this package to easily convert various time formats to milliseconds. - -## Examples - -```js -ms('2 days') // 172800000 -ms('1d') // 86400000 -ms('10h') // 36000000 -ms('2.5 hrs') // 9000000 -ms('2h') // 7200000 -ms('1m') // 60000 -ms('5s') // 5000 -ms('1y') // 31557600000 -ms('100') // 100 -ms('-3 days') // -259200000 -ms('-1h') // -3600000 -ms('-200') // -200 -``` - -### Convert from Milliseconds - -```js -ms(60000) // "1m" -ms(2 * 60000) // "2m" -ms(-3 * 60000) // "-3m" -ms(ms('10 hours')) // "10h" -``` - -### Time Format Written-Out - -```js -ms(60000, { long: true }) // "1 minute" -ms(2 * 60000, { long: true }) // "2 minutes" -ms(-3 * 60000, { long: true }) // "-3 minutes" -ms(ms('10 hours'), { long: true }) // "10 hours" -``` - -## Features - -- Works both in [Node.js](https://nodejs.org) and in the browser -- If a number is supplied to `ms`, a string with a unit is returned -- If a string that contains the number is supplied, it returns it as a number (e.g.: it returns `100` for `'100'`) -- If you pass a string with a number and a valid unit, the number of equivalent milliseconds is returned - -## Related Packages - -- [ms.macro](https://github.com/knpwrs/ms.macro) - Run `ms` as a macro at build-time. - -## Caught a Bug? - -1. [Fork](https://help.github.com/articles/fork-a-repo/) this repository to your own GitHub account and then [clone](https://help.github.com/articles/cloning-a-repository/) it to your local device -2. Link the package to the global module directory: `npm link` -3. Within the module you want to test your local development instance of ms, just link it to the dependencies: `npm link ms`. Instead of the default one from npm, Node.js will now use your clone of ms! - -As always, you can run the tests using: `npm test` diff --git a/PBandGraphScaffold/node_modules/pocketbase/CHANGELOG.md b/PBandGraphScaffold/node_modules/pocketbase/CHANGELOG.md deleted file mode 100644 index edc4a8a..0000000 --- a/PBandGraphScaffold/node_modules/pocketbase/CHANGELOG.md +++ /dev/null @@ -1,838 +0,0 @@ -## 0.26.5 - -- Fixed abort request error detection on Safari introduced with the previous release because it seems to throw `DOMException.SyntaxError` on `response.json()` failure ([#pocketbase/pocketbase#7369](https://github.com/pocketbase/pocketbase/issues/7369)). - - -## 0.26.4 - -- Catch aborted request error during `response.json()` failure _(e.g. in case of tcp connection reset)_ and rethrow it as normalized `ClientResponseError.isAbort=true` error. - - -## 0.26.3 - -- Fixed outdated `OAuth2Provider` TS fields ([pocketbase/site#110](https://github.com/pocketbase/site/pull/110)). - - -## 0.26.2 - -- Allow body object without constructor ([#352](https://github.com/pocketbase/js-sdk/issues/352)). - - -## 0.26.1 - -- Set the `cause` property of `ClientResponseError` to the original thrown error/data for easier debugging ([#349](https://github.com/pocketbase/js-sdk/pull/349); thanks @shish). - - -## 0.26.0 - -- Ignore `undefined` properties when submitting an object that has `Blob`/`File` fields (_which is under the hood converted to `FormData`_) -for consistency with how `JSON.stringify` works (see [pocketbase#6731](https://github.com/pocketbase/pocketbase/issues/6731#issuecomment-2812382827)). - - -## 0.25.2 - -- Removed unnecessary checks in `serializeQueryParams` and added automated tests. - - -## 0.25.1 - -- Ignore query parameters with `undefined` value ([#330](https://github.com/pocketbase/js-sdk/issues/330)). - - -## 0.25.0 - -- Added `pb.crons` service to interact with the cron Web APIs. - - -## 0.24.0 - -- Added support for assigning `FormData` as body to individual batch requests ([pocketbase#6145](https://github.com/pocketbase/pocketbase/discussions/6145)). - - -## 0.23.0 - -- Added optional `pb.realtime.onDisconnect` hook function. - _Note that the realtime client autoreconnect on its own and this hook is useful only for the cases where you want to apply a special behavior on server error or after closing the realtime connection._ - - -## 0.22.1 - -- Fixed old `pb.authStore.isAdmin`/`pb.authStore.isAuthRecord` and marked them as deprecated in favour of `pb.authStore.isSuperuser` ([#323](https://github.com/pocketbase/js-sdk/issues/323)). - _Note that with PocketBase v0.23.0 superusers are converted to a system auth collection so you can always simply check the value of `pb.authStore.record?.collectionName`._ - - -## 0.22.0 - -**⚠️ This release introduces some breaking changes and works only with PocketBase v0.23.0+.** - -- Added support for sending batch/transactional create/updated/delete/**upsert** requests with the new batch Web APIs. - ```js - const batch = pb.createBatch(); - - batch.collection("example1").create({ ... }); - batch.collection("example2").update("RECORD_ID", { ... }); - batch.collection("example3").delete("RECORD_ID"); - batch.collection("example4").upsert({ ... }); - - const result = await batch.send(); - ``` - -- Added support for authenticating with OTP (email code): - ```js - const result = await pb.collection("users").requestOTP("test@example.com"); - - // ... show a modal for users to check their email and to enter the received code ... - - await pb.collection("users").authWithOTP(result.otpId, "EMAIL_CODE"); - ``` - - Note that PocketBase v0.23.0 comes also with Multi-factor authentication (MFA) support. - When enabled from the dashboard, the first auth attempt will result in 401 response and a `mfaId` response, - that will have to be submitted with the second auth request. For example: - ```js - try { - await pb.collection("users").authWithPassword("test@example.com", "1234567890"); - } catch (err) { - const mfaId = err.response?.mfaId; - if (!mfaId) { - throw err; // not mfa -> rethrow - } - - // the user needs to authenticate again with another auth method, for example OTP - const result = await pb.collection("users").requestOTP("test@example.com"); - // ... show a modal for users to check their email and to enter the received code ... - await pb.collection("users").authWithOTP(result.otpId, "EMAIL_CODE", { "mfaId": mfaId }); - } - ``` - -- Added new `pb.collection("users").impersonate("RECORD_ID")` method for superusers. - It authenticates with the specified record id and returns a new client with the impersonated auth state loaded in a memory store. - ```js - // authenticate as superusers (with v0.23.0 admins is converted to a special system auth collection "_superusers"): - await pb.collection("_superusers").authWithPassword("test@example.com", "1234567890"); - - // impersonate - const impersonateClient = pb.collection("users").impersonate("USER_RECORD_ID", 3600 /* optional token duration in seconds */) - - // log the impersonate token and user data - console.log(impersonateClient.authStore.token); - console.log(impersonateClient.authStore.record); - - // send requests as the impersonated user - impersonateClient.collection("example").getFullList(); - ``` - -- Added new `pb.collections.getScaffolds()` method to retrieve a type indexed map with the collection models (base, auth, view) loaded with their defaults. - -- Added new `pb.collections.truncate(idOrName)` to delete all records associated with the specified collection. - -- Added the submitted fetch options as 3rd last argument in the `pb.afterSend` hook. - -- Instead of replacing the entire `pb.authStore.record`, on auth record update we now only replace the available returned response record data ([pocketbase#5638](https://github.com/pocketbase/pocketbase/issues/5638)). - -- ⚠️ Admins are converted to `_superusers` auth collection and there is no longer `AdminService` and `AdminModel` types. - `pb.admins` is soft-deprecated and aliased to `pb.collection("_superusers")`. - ```js - // before -> after - pb.admins.* -> pb.collection("_superusers").* - ``` - -- ⚠️ `pb.authStore.model` is soft-deprecated and superseded by `pb.authStore.record`. - -- ⚠️ Soft-deprecated the OAuth2 success auth `meta.avatarUrl` response field in favour of `meta.avatarURL` for consistency with the Go conventions. - -- ⚠️ Changed `AuthMethodsList` inerface fields to accomodate the new auth methods and `listAuthMethods()` response. - ``` - { - "mfa": { - "duration": 100, - "enabled": true - }, - "otp": { - "duration": 0, - "enabled": false - }, - "password": { - "enabled": true, - "identityFields": ["email", "username"] - }, - "oauth2": { - "enabled": true, - "providers": [{"name": "gitlab", ...}, {"name": "google", ...}] - } - } - ``` - -- ⚠️ Require specifying collection id or name when sending test email because the email templates can be changed per collection. - ```js - // old - pb.settings.testEmail(email, "verification") - - // new - pb.settings.testEmail("users", email, "verification") - ``` - -- ⚠️ Soft-deprecated and aliased `*Url()` -> `*URL()` methods for consistency with other similar native JS APIs and the accepted Go conventions. - _The old methods still works but you may get a console warning to replace them because they will be removed in the future._ - ```js - pb.baseUrl -> pb.baseURL - pb.buildUrl() -> pb.buildURL() - pb.files.getUrl() -> pb.files.getURL() - pb.backups.getDownloadUrl() -> pb.backups.getDownloadURL() - ``` - -- ⚠️ Renamed `CollectionModel.schema` to `CollectionModel.fields`. - -- ⚠️ Renamed type `SchemaField` to `CollectionField`. - - -## 0.21.5 - -- Shallow copy the realtime subscribe `options` argument for consistency with the other methods ([#308](https://github.com/pocketbase/js-sdk/issues/308)). - - -## 0.21.4 - -- Fixed the `requestKey` handling in `authWithOAuth2({...})` to allow manually cancelling the entire OAuth2 pending request flow using `pb.cancelRequest(requestKey)`. - _Due to the [`window.close` caveats](https://developer.mozilla.org/en-US/docs/Web/API/Window/close) note that the OAuth2 popup window may still remain open depending on which stage of the OAuth2 flow the cancellation has been invoked._ - - -## 0.21.3 - -- Enforce temporary the `atob` polyfill for ReactNative until [Expo 51+ and React Native v0.74+ `atob` fix get released](https://github.com/reactwg/react-native-releases/issues/287). - - -## 0.21.2 - -- Exported `HealthService` types ([#289](https://github.com/pocketbase/js-sdk/issues/289)). - - -## 0.21.1 - -- Manually update the verified state of the current matching `AuthStore` model on successful "confirm-verification" call. - -- Manually clear the current matching `AuthStore` on "confirm-email-change" call because previous tokens are always invalidated. - -- Updated the `fetch` mock tests to check also the sent body params. - -- Formatted the source and tests with prettier. - - -## 0.21.0 - -**⚠️ This release works only with PocketBase v0.21.0+ due to changes of how the `multipart/form-data` body is handled.** - -- Properly sent json body with `multipart/form-data` requests. - _This should fix the edge cases mentioned in the v0.20.3 release._ - -- Gracefully handle OAuth2 redirect error with the `authWithOAuth2()` call. - - -## 0.20.3 - -- Partial and temporary workaround for the auto `application/json` -> `multipart/form-data` request serialization of a `json` field when a `Blob`/`File` is found in the request body ([#274](https://github.com/pocketbase/js-sdk/issues/274)). - - The "fix" is partial because there are still 2 edge cases that are not handled - when a `json` field value is empty array (eg. `[]`) or array of strings (eg. `["a","b"]`). - The reason for this is because the SDK doesn't have information about the field types and doesn't know which field is a `json` or an arrayable `select`, `file` or `relation`, so it can't serialize it properly on its own as `FormData` string value. - - If you are having troubles with persisting `json` values as part of a `multipart/form-data` request the easiest fix for now is to manually stringify the `json` field value: - ```js - await pb.collection("example").create({ - // having a Blob/File as object value will convert the request to multipart/form-data - "someFileField": new Blob([123]), - "someJsonField": JSON.stringify(["a","b","c"]), - }) - ``` - - A proper fix for this will be implemented with PocketBase v0.21.0 where we'll have support for a special `@jsonPayload` multipart body key, which will allow us to submit mixed `multipart/form-data` content (_kindof similar to the `multipart/mixed` MIME_). - - -## 0.20.2 - -- Throw 404 error for `getOne("")` when invoked with empty id ([#271](https://github.com/pocketbase/js-sdk/issues/271)). - -- Added `@throw {ClientResponseError}` jsdoc annotation to the regular request methods ([#262](https://github.com/pocketbase/js-sdk/issues/262)). - - -## 0.20.1 - -- Propagate the `PB_CONNECT` event to allow listening to the realtime connect/reconnect events. - ```js - pb.realtime.subscribe("PB_CONNECT", (e) => { - console.log(e.clientId); - }) - ``` - -## 0.20.0 - -- Added `expand`, `filter`, `fields`, custom query and headers parameters support for the realtime subscriptions. - ```js - pb.collection("example").subscribe("*", (e) => { - ... - }, { filter: "someField > 10" }); - ``` - _This works only with PocketBase v0.20.0+._ - -- Changes to the logs service methods in relation to the logs generalization in PocketBase v0.20.0+: - ```js - pb.logs.getRequestsList(...) -> pb.logs.getList(...) - pb.logs.getRequest(...) -> pb.logs.getOne(...) - pb.logs.getRequestsStats(...) -> pb.logs.getStats(...) - ``` - -- Added missing `SchemaField.presentable` field. - -- Added new `AuthProviderInfo.displayName` string field. - -- Added new `AuthMethodsList.onlyVerified` bool field. - - -## 0.19.0 - -- Added `pb.filter(rawExpr, params?)` helper to construct a filter string with placeholder parameters populated from an object. - - ```js - const record = await pb.collection("example").getList(1, 20, { - // the same as: "title ~ 'te\\'st' && (totalA = 123 || totalB = 123)" - filter: pb.filter("title ~ {:title} && (totalA = {:num} || totalB = {:num})", { title: "te'st", num: 123 }) - }) - ``` - - The supported placeholder parameter values are: - - - `string` (_single quotes will be autoescaped_) - - `number` - - `boolean` - - `Date` object (_will be stringified into the format expected by PocketBase_) - - `null` - - anything else is converted to a string using `JSON.stringify()` - - -## 0.18.3 - -- Added optional generic support for the `RecordService` ([#251](https://github.com/pocketbase/js-sdk/issues/251)). - This should allow specifying a single TypeScript definition for the client, eg. using type assertion: - ```ts - interface Task { - id: string; - name: string; - } - - interface Post { - id: string; - title: string; - active: boolean; - } - - interface TypedPocketBase extends PocketBase { - collection(idOrName: string): RecordService // default fallback for any other collection - collection(idOrName: 'tasks'): RecordService - collection(idOrName: 'posts'): RecordService - } - - ... - - const pb = new PocketBase("http://127.0.0.1:8090") as TypedPocketBase; - - // the same as pb.collection('tasks').getOne("RECORD_ID") - await pb.collection('tasks').getOne("RECORD_ID") // -> results in Task - - // the same as pb.collection('posts').getOne("RECORD_ID") - await pb.collection('posts').getOne("RECORD_ID") // -> results in Post - ``` - - -## 0.18.2 - -- Added support for assigning a `Promise` as `AsyncAuthStore` initial value ([#249](https://github.com/pocketbase/js-sdk/issues/249)). - - -## 0.18.1 - -- Fixed realtime subscriptions auto cancellation to use the proper `requestKey` param. - - -## 0.18.0 - -- Added `pb.backups.upload(data)` action (_available with PocketBase v0.18.0_). - -- Added _experimental_ `autoRefreshThreshold` option to auto refresh (or reauthenticate) the AuthStore when authenticated as admin. - _This could be used as an alternative to fixed Admin API keys._ - ```js - await pb.admins.authWithPassword("test@example.com", "1234567890", { - // This will trigger auto refresh or auto reauthentication in case - // the token has expired or is going to expire in the next 30 minutes. - autoRefreshThreshold: 30 * 60 - }) - ``` - - -## 0.17.3 - -- Loosen the type check when calling `pb.files.getUrl(user, filename)` to allow passing the `pb.authStore.model` without type assertion. - - -## 0.17.2 - -- Fixed mulitple File/Blob array values not transformed properly to their FormData equivalent when an object syntax is used. - - -## 0.17.1 - -- Fixed typo in the deprecation console.warn messages ([#235](https://github.com/pocketbase/js-sdk/pull/235); thanks @heloineto). - - -## 0.17.0 - -- To simplify file uploads, we now allow sending the `multipart/form-data` request body also as plain object if at least one of the object props has `File` or `Blob` value. - ```js - // the standard way to create multipart/form-data body - const data = new FormData(); - data.set("title", "lorem ipsum...") - data.set("document", new File(...)) - - // this is the same as above - // (it will be converted behind the scenes to FormData) - const data = { - "title": "lorem ipsum...", - "document": new File(...), - }; - - await pb.collection("example").create(data); - ``` - -- Added new `pb.authStore.isAdmin` and `pb.authStore.isAuthRecord` helpers to check the type of the current auth state. - -- The default `LocalAuthStore` now listen to the browser [storage event](https://developer.mozilla.org/en-US/docs/Web/API/Window/storage_event), - so that we can sync automatically the `pb.authStore` state between multiple tabs. - -- Added new helper `AsyncAuthStore` class that can be used to integrate with any 3rd party async storage implementation (_usually this is needed when working with React Native_): - ```js - import AsyncStorage from "@react-native-async-storage/async-storage"; - import PocketBase, { AsyncAuthStore } from "pocketbase"; - - const store = new AsyncAuthStore({ - save: async (serialized) => AsyncStorage.setItem("pb_auth", serialized), - initial: AsyncStorage.getItem("pb_auth"), - }); - - const pb = new PocketBase("https://example.com", store) - ``` - -- `pb.files.getUrl()` now returns empty string in case an empty filename is passed. - -- ⚠️ All API actions now return plain object (POJO) as response, aka. the custom class wrapping was removed and you no longer need to manually call `structuredClone(response)` when using with SSR frameworks. - - This could be a breaking change if you use the below classes (_and respectively their helper methods like `$isNew`, `$load()`, etc._) since they were replaced with plain TS interfaces: - ```ts - class BaseModel -> interface BaseModel - class Admin -> interface AdminModel - class Record -> interface RecordModel - class LogRequest -> interface LogRequestModel - class ExternalAuth -> interface ExternalAuthModel - class Collection -> interface CollectionModel - class SchemaField -> interface SchemaField - class ListResult -> interface ListResult - ``` - - _Side-note:_ If you use somewhere in your code the `Record` and `Admin` classes to determine the type of your `pb.authStore.model`, - you can safely replace it with the new `pb.authStore.isAdmin` and `pb.authStore.isAuthRecord` getters. - -- ⚠️ Added support for per-request `fetch` options, including also specifying completely custom `fetch` implementation. - - In addition to the default [`fetch` options](https://developer.mozilla.org/en-US/docs/Web/API/fetch#options), the following configurable fields are supported: - - ```ts - interface SendOptions extends RequestInit { - // any other custom key will be merged with the query parameters - // for backward compatibility and to minimize the verbosity - [key: string]: any; - - // optional custom fetch function to use for sending the request - fetch?: (url: RequestInfo | URL, config?: RequestInit) => Promise; - - // custom headers to send with the requests - headers?: { [key: string]: string }; - - // the body of the request (serialized automatically for json requests) - body?: any; - - // query params that will be appended to the request url - query?: { [key: string]: any }; - - // the request identifier that can be used to cancel pending requests - requestKey?: string|null; - - // @deprecated use `requestKey:string` instead - $cancelKey?: string; - - // @deprecated use `requestKey:null` instead - $autoCancel?: boolean; - } - ``` - - For most users the above will not be a breaking change since there are available function overloads (_when possible_) to preserve the old behavior, but you can get a warning message in the console to update to the new format. - For example: - ```js - // OLD (should still work but with a warning in the console) - await pb.collection("example").authRefresh({}, { - "expand": "someRelField", - }) - - // NEW - await pb.collection("example").authRefresh({ - "expand": "someRelField", - // send some additional header - "headers": { - "X-Custom-Header": "123", - }, - "cache": "no-store" // also usually used by frameworks like Next.js - }) - ``` - -- Eagerly open the default OAuth2 signin popup in case no custom `urlCallback` is provided as a workaround for Safari. - -- Internal refactoring (updated dev dependencies, refactored the tests to use Vitest instead of Mocha, etc.). - - -## 0.16.0 - -- Added `skipTotal=1` query parameter by default for the `getFirstListItem()` and `getFullList()` requests. - _Note that this have performance boost only with PocketBase v0.17+._ - -- Added optional `download=1` query parameter to force file urls with `Content-Disposition: attachment` (_supported with PocketBase v0.17+_). - - -## 0.15.3 - -- Automatically resolve pending realtime connect `Promise`s in case `unsubscribe` is called before - `subscribe` is being able to complete ([pocketbase#2897](https://github.com/pocketbase/pocketbase/discussions/2897#discussioncomment-6423818)). - - -## 0.15.2 - -- Replaced `new URL(...)` with manual url parsing as it is not fully supported in React Native ([pocketbase#2484](https://github.com/pocketbase/pocketbase/discussions/2484#discussioncomment-6114540)). - -- Fixed nested `ClientResponseError.originalError` wrapping and added `ClientResponseError` constructor tests. - - -## 0.15.1 - -- Cancel any pending subscriptions submit requests on realtime disconnect ([#204](https://github.com/pocketbase/js-sdk/issues/204)). - - -## 0.15.0 - -- Added `fields` to the optional query parameters for limiting the returned API fields (_available with PocketBase v0.16.0_). - -- Added `pb.backups` service for the new PocketBase backup and restore APIs (_available with PocketBase v0.16.0_). - -- Updated `pb.settings.testS3(filesystem)` to allow specifying a filesystem to test - `storage` or `backups` (_available with PocketBase v0.16.0_). - - -## 0.14.4 - -- Removed the legacy aliased `BaseModel.isNew` getter since it conflicts with similarly named record fields ([pocketbase#2385](https://github.com/pocketbase/pocketbase/discussions/2385)). - _This helper is mainly used in the Admin UI, but if you are also using it in your code you can replace it with the `$` prefixed version, aka. `BaseModel.$isNew`._ - - -## 0.14.3 - -- Added `OAuth2AuthConfig.query` prop to send optional query parameters with the `authWithOAuth2(config)` call. - - -## 0.14.2 - -- Use `location.origin + location.pathname` instead of full `location.href` when constructing the browser absolute url to ignore any extra hash or query parameter passed to the base url. - _This is a small addition to the earlier change from v0.14.1._ - - -## 0.14.1 - -- Use an absolute url when the SDK is initialized with a relative base path in a browser env to ensure that the generated OAuth2 redirect and file urls are absolute. - - -## 0.14.0 - -- Added simplified `authWithOAuth2()` version without having to implement custom redirect, deeplink or even page reload: - ```js - const authData = await pb.collection('users').authWithOAuth2({ - provider: 'google' - }) - ``` - - Works with PocketBase v0.15.0+. - - This method initializes a one-off realtime subscription and will - open a popup window with the OAuth2 vendor page to authenticate. - Once the external OAuth2 sign-in/sign-up flow is completed, the popup - window will be automatically closed and the OAuth2 data sent back - to the user through the previously established realtime connection. - - _Site-note_: when creating the OAuth2 app in the provider dashboard - you have to configure `https://yourdomain.com/api/oauth2-redirect` - as redirect URL. - - _The "manual" code exchange flow is still supported as `authWithOAuth2Code(provider, code, codeVerifier, redirectUrl)`._ - - _For backward compatibility it is also available as soft-deprecated function overload of `authWithOAuth2(provider, code, codeVerifier, redirectUrl)`._ - -- Added new `pb.files` service: - ```js - // Builds and returns an absolute record file url for the provided filename. - 🔓 pb.files.getUrl(record, filename, queryParams = {}); - - // Requests a new private file access token for the current auth model (admin or record). - 🔐 pb.files.getToken(queryParams = {}); - ``` - _`pb.getFileUrl()` is soft-deprecated and acts as alias calling `pb.files.getUrl()` under the hood._ - - Works with PocketBase v0.15.0+. - - -## 0.13.1 - -- Added option to specify a generic `send()` return type and defined `SendOptions` type ([#171](https://github.com/pocketbase/js-sdk/pull/171); thanks @iamelevich). - -- Deprecated `SchemaField.unique` prop since its function is replaced by `Collection.indexes` in the upcoming PocketBase v0.14.0 release. - - -## 0.13.0 - -- Aliased all `BaseModel` helpers with `$` equivalent to avoid conflicts with the dynamic record props ([#169](https://github.com/pocketbase/js-sdk/issues/169)). - ```js - isNew -> $isNew - load(data) -> $load(data) - clone() -> $clone() - export() -> $export() - // ... - ``` - _For backward compatibility, the old helpers will still continue to work if the record doesn't have a conflicting field name._ - -- Updated `pb.beforeSend` and `pb.afterSend` signatures to allow returning and awaiting an optional `Promise` ([#166](https://github.com/pocketbase/js-sdk/pull/166); thanks @Bobby-McBobface). - -- Added `Collection.indexes` field for the new collection indexes support in the upcoming PocketBase v0.14.0. - -- Added `pb.settings.generateAppleClientSecret()` for sending a request to generate Apple OAuth2 client secret in the upcoming PocketBase v0.14.0. - - -## 0.12.1 - -- Fixed request `multipart/form-data` body check to allow the React Native Android and iOS custom `FormData` implementation as valid `fetch` body ([#2002](https://github.com/pocketbase/pocketbase/discussions/2002)). - - -## 0.12.0 - -- Changed the return type of `pb.beforeSend` hook to allow modifying the request url ([#1930](https://github.com/pocketbase/pocketbase/discussions/1930)). - ```js - // old - pb.beforeSend = function (url, options) { - ... - return options; - } - - // new - pb.beforeSend = function (url, options) { - ... - return { url, options }; - } - ``` - The old return format is soft-deprecated and will still work, but you'll get a `console.warn` message to replace it. - - -## 0.11.1 - -- Exported the services class definitions to allow being used as argument types ([#153](https://github.com/pocketbase/js-sdk/issues/153)). - ```js - CrudService - AdminService - CollectionService - LogService - RealtimeService - RecordService - SettingsService - ``` - -## 0.11.0 - -- Aliased/soft-deprecated `ClientResponseError.data` in favor of `ClientResponseError.response` to avoid the stuttering when accessing the inner error response `data` key (aka. `err.data.data` now is `err.response.data`). - The `ClientResponseError.data` will still work but it is recommend for new code to use the `response` key. - -- Added `getFullList(queryParams = {})` overload since the default batch size in most cases doesn't need to change (it can be defined as query parameter). - The old form `getFullList(batch = 200, queryParams = {})` will still work, but it is recommend for new code to use the shorter form. - - -## 0.10.2 - -- Updated `getFileUrl()` to accept custom types as record argument. - - -## 0.10.1 - -- Added check for the collection name before auto updating the `pb.authStore` state on auth record update/delete. - - -## 0.10.0 - -- Added more helpful message for the `ECONNREFUSED ::1` localhost error (related to [#21](https://github.com/pocketbase/js-sdk/issues/21)). - -- Preserved the "original" function and class names in the minified output for those who rely on `*.prototype.name`. - -- Allowed sending the existing valid auth token with the `authWithPassword()` calls. - -- Updated the Nuxt3 SSR examples to use the built-in `useCookie()` helper. - - -## 0.9.1 - -- Normalized nested `expand` items to `Record|Array` instances. - - -## 0.9.0 - -- Added `pb.health.check()` that checks the health status of the API service (_available in PocketBase v0.10.0_) - - -## 0.8.4 - -- Added type declarations for the action query parameters ([#102](https://github.com/pocketbase/js-sdk/pull/102); thanks @sewera). - ```js - BaseQueryParams - ListQueryParams - RecordQueryParams - RecordListQueryParams - LogStatsQueryParams - FileQueryParams - ``` - - -## 0.8.3 - -- Renamed the declaration file extension from `.d.ts` to `.d.mts` to prevent type resolution issues ([#92](https://github.com/pocketbase/js-sdk/issues/92)). - - -## 0.8.2 - -- Allowed catching the initial realtime connect error as part of the `subscribe()` Promise resolution. - -- Reimplemented the default `EventSource` retry mechanism for better control and more consistent behavior across different browsers. - - -## 0.8.1 - -This release contains only documentation fixes: - -- Fixed code comment typos. - -- Added note about loadFromCookie that you may need to call authRefresh to validate the loaded cookie state server-side. - -- Updated the SSR examples to show the authRefresh call. _For the examples the authRefresh call is not required but it is there to remind users that it needs to be called if you want to do permission checks in a node env (eg. SSR) and rely on the `pb.authStore.isValid`._ - - -## 0.8.0 - -> ⚠️ Please note that this release works only with the new PocketBase v0.8+ API! -> -> See the breaking changes below for what has changed since v0.7.x. - -#### Non breaking changes - -- Added support for optional custom `Record` types using TypeScript generics, eg. - `pb.collection('example').getList()`. - -- Added new `pb.autoCancellation(bool)` method to globally enable or disable auto cancellation (`true` by default). - -- Added new crud method `getFirstListItem(filter)` to fetch a single item by a list filter. - -- You can now set additional account `createData` when authenticating with OAuth2. - -- Added `AuthMethodsList.usernamePassword` return field (we now support combined username/email authentication; see below `authWithPassword`). - -#### Breaking changes - -- Changed the contstructor from `PocketBase(url, lang?, store?)` to `PocketBase(url, store?, lang?)` (aka. the `lang` option is now last). - -- For easier and more conventional parsing, all DateTime strings now have `Z` as suffix, so that you can do directly `new Date('2022-01-01 01:02:03.456Z')`. - -- Moved `pb.records.getFileUrl()` to `pb.getFileUrl()`. - -- Moved all `pb.records.*` handlers under `pb.collection().*`: - ``` - pb.records.getFullList('example'); => pb.collection('example').getFullList(); - pb.records.getList('example'); => pb.collection('example').getList(); - pb.records.getOne('example', 'RECORD_ID'); => pb.collection('example').getOne('RECORD_ID'); - (no old equivalent) => pb.collection('example').getFirstListItem(filter); - pb.records.create('example', {...}); => pb.collection('example').create({...}); - pb.records.update('example', 'RECORD_ID', {...}); => pb.collection('example').update('RECORD_ID', {...}); - pb.records.delete('example', 'RECORD_ID'); => pb.collection('example').delete('RECORD_ID'); - ``` - -- The `pb.realtime` service has now a more general callback form so that it can be used with custom realtime handlers. - Dedicated records specific subscribtions could be found under `pb.collection().*`: - ``` - pb.realtime.subscribe('example', callback) => pb.collection('example').subscribe("*", callback) - pb.realtime.subscribe('example/RECORD_ID', callback) => pb.collection('example').subscribe('RECORD_ID', callback) - pb.realtime.unsubscribe('example') => pb.collection('example').unsubscribe("*") - pb.realtime.unsubscribe('example/RECORD_ID') => pb.collection('example').unsubscribe('RECORD_ID') - (no old equivalent) => pb.collection('example').unsubscribe() - ``` - Additionally, `subscribe()` now return `UnsubscribeFunc` that could be used to unsubscribe only from a single subscription listener. - -- Moved all `pb.users.*` handlers under `pb.collection().*`: - ``` - pb.users.listAuthMethods() => pb.collection('users').listAuthMethods() - pb.users.authViaEmail(email, password) => pb.collection('users').authWithPassword(usernameOrEmail, password) - pb.users.authViaOAuth2(provider, code, codeVerifier, redirectUrl) => pb.collection('users').authWithOAuth2(provider, code, codeVerifier, redirectUrl, createData = {}) - pb.users.refresh() => pb.collection('users').authRefresh() - pb.users.requestPasswordReset(email) => pb.collection('users').requestPasswordReset(email) - pb.users.confirmPasswordReset(resetToken, newPassword, newPasswordConfirm) => pb.collection('users').confirmPasswordReset(resetToken, newPassword, newPasswordConfirm) - pb.users.requestVerification(email) => pb.collection('users').requestVerification(email) - pb.users.confirmVerification(verificationToken) => pb.collection('users').confirmVerification(verificationToken) - pb.users.requestEmailChange(newEmail) => pb.collection('users').requestEmailChange(newEmail) - pb.users.confirmEmailChange(emailChangeToken, password) => pb.collection('users').confirmEmailChange(emailChangeToken, password) - pb.users.listExternalAuths(recordId) => pb.collection('users').listExternalAuths(recordId) - pb.users.unlinkExternalAuth(recordId, provider) => pb.collection('users').unlinkExternalAuth(recordId, provider) - ``` - -- Changes in `pb.admins` for consistency with the new auth handlers in `pb.collection().*`: - ``` - pb.admins.authViaEmail(email, password); => pb.admins.authWithPassword(email, password); - pb.admins.refresh(); => pb.admins.authRefresh(); - ``` - -- To prevent confusion with the auth method responses, the following methods now returns 204 with empty body (previously 200 with token and auth model): - ```js - pb.admins.confirmPasswordReset(...): Promise - pb.collection("users").confirmPasswordReset(...): Promise - pb.collection("users").confirmVerification(...): Promise - pb.collection("users").confirmEmailChange(...): Promise - ``` - -- Removed the `User` model because users are now regular records (aka. `Record`). - **The old user fields `lastResetSentAt`, `lastVerificationSentAt` and `profile` are no longer available** - (the `profile` fields are available under the `Record.*` property like any other fields). - -- Renamed the special `Record` props: - ``` - @collectionId => collectionId - @collectionName => collectionName - @expand => expand - ``` - -- Since there is no longer `User` model, `pb.authStore.model` can now be of type `Record`, `Admin` or `null`. - -- Removed `lastResetSentAt` from the `Admin` model. - -- Replaced `ExternalAuth.userId` with 2 new `recordId` and `collectionId` props. - -- Removed the deprecated uppercase service aliases: - ``` - client.Users => client.collection(*) - client.Records => client.collection(*) - client.AuthStore => client.authStore - client.Realtime => client.realtime - client.Admins => client.admins - client.Collections => client.collections - client.Logs => client.logs - client.Settings => client.settings - ``` diff --git a/PBandGraphScaffold/node_modules/pocketbase/LICENSE.md b/PBandGraphScaffold/node_modules/pocketbase/LICENSE.md deleted file mode 100644 index e3b8465..0000000 --- a/PBandGraphScaffold/node_modules/pocketbase/LICENSE.md +++ /dev/null @@ -1,17 +0,0 @@ -The MIT License (MIT) -Copyright (c) 2022 - present, Gani Georgiev - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software -and associated documentation files (the "Software"), to deal in the Software without restriction, -including without limitation the rights to use, copy, modify, merge, publish, distribute, -sublicense, and/or sell copies of the Software, and to permit persons to whom the Software -is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or -substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING -BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/PBandGraphScaffold/node_modules/pocketbase/README.md b/PBandGraphScaffold/node_modules/pocketbase/README.md deleted file mode 100644 index 4f49ebd..0000000 --- a/PBandGraphScaffold/node_modules/pocketbase/README.md +++ /dev/null @@ -1,1091 +0,0 @@ -PocketBase JavaScript SDK -====================================================================== - -Official JavaScript SDK (browser and node) for interacting with the [PocketBase API](https://pocketbase.io/docs). - -- [Installation](#installation) -- [Usage](#usage) -- [Caveats](#caveats) - - [Binding filter parameters](#binding-filter-parameters) - - [File upload](#file-upload) - - [Error handling](#error-handling) - - [Auth store](#auth-store) - - [LocalAuthStore (default)](#localauthstore-default) - - [AsyncAuthStore (_usually used with React Native_)](#asyncauthstore) - - [Custom auth store](#custom-auth-store) - - [Common auth store fields and methods](#common-auth-store-fields-and-methods) - - [Auto cancellation](#auto-cancellation) - - [Specify TypeScript definitions](#specify-typescript-definitions) - - [Custom request options](#custom-request-options) - - [Send hooks](#send-hooks) - - [SSR integration](#ssr-integration) - - [Security](#security) -- [Definitions](#definitions) -- [Development](#development) - - -## Installation - -### Browser (manually via script tag) - -```html - - -``` - -_OR if you are using ES modules:_ -```html - -``` - -### Node.js (via npm) - -```sh -npm install pocketbase --save -``` - -```js -// Using ES modules (default) -import PocketBase from 'pocketbase' - -// OR if you are using CommonJS modules -const PocketBase = require('pocketbase/cjs') -``` - -> 🔧 For **Node < 17** you'll need to load a `fetch()` polyfill. -> I recommend [lquixada/cross-fetch](https://github.com/lquixada/cross-fetch): -> ```js -> // npm install cross-fetch --save -> import 'cross-fetch/polyfill'; -> ``` ---- -> 🔧 Node doesn't have native `EventSource` implementation, so in order to use the realtime subscriptions you'll need to load a `EventSource` polyfill. -> ```js -> // for server: npm install eventsource --save -> import { EventSource } from "eventsource"; -> -> // for React Native: npm install react-native-sse --save -> import EventSource from "react-native-sse"; -> -> global.EventSource = EventSource; -> ``` - - -## Usage - -```js -import PocketBase from 'pocketbase'; - -const pb = new PocketBase('http://127.0.0.1:8090'); - -... - -// authenticate as auth collection record -const userData = await pb.collection('users').authWithPassword('test@example.com', '123456'); - -// list and filter "example" collection records -const result = await pb.collection('example').getList(1, 20, { - filter: 'status = true && created > "2022-08-01 10:00:00"' -}); - -// and much more... -``` -> More detailed API docs and copy-paste examples could be found in the [API documentation for each service](https://pocketbase.io/docs/api-records/). - - -## Caveats - -### Binding filter parameters - -The SDK comes with a helper `pb.filter(expr, params)` method to generate a filter string with placeholder parameters (`{:paramName}`) populated from an object. - -**This method is also recommended when using the SDK in Node/Deno/Bun server-side list queries and accepting untrusted user input as `filter` string arguments, because it will take care to properly escape the generated string expression, avoiding eventual string injection attacks** (_on the client-side this is not much of an issue_). - -```js -const records = await pb.collection("example").getList(1, 20, { - // the same as: "title ~ 'te\\'st' && (totalA = 123 || totalB = 123)" - filter: pb.filter("title ~ {:title} && (totalA = {:num} || totalB = {:num})", { title: "te'st", num: 123 }) -}) -``` - -The supported placeholder parameter values are: - -- `string` (_single quotes are autoescaped_) -- `number` -- `boolean` -- `Date` object (_will be stringified into the format expected by PocketBase_) -- `null` -- everything else is converted to a string using `JSON.stringify()` - - -### File upload - -PocketBase Web API supports file upload via `multipart/form-data` requests, -which means that to upload a file it is enough to provide either a [`FormData`](https://developer.mozilla.org/en-US/docs/Web/API/FormData) instance OR plain object with `File`/`Blob` prop values. - -- Using plain object as body _(this is the same as above and it will be converted to `FormData` behind the scenes)_: - ```js - const data = { - 'title': 'lorem ipsum...', - 'document': new File(...), - }; - - await pb.collection('example').create(data); - ``` - -- Using `FormData` as body: - ```js - // the standard way to create multipart/form-data body - const data = new FormData(); - data.set('title', 'lorem ipsum...') - data.set('document', new File(...)) - - await pb.collection('example').create(data); - ``` - -### Error handling - -All services return a standard [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)-based response, so the error handling is straightforward: -```js -pb.collection('example').getList(1, 50).then((result) => { - // success... - console.log('Result:', result); -}).catch((error) => { - // error... - console.log('Error:', error); -}); - -// OR if you are using the async/await syntax: -try { - const result = await pb.collection('example').getList(1, 50); - console.log('Result:', result); -} catch (error) { - console.log('Error:', error); -} -``` - -The response error is normalized and always returned as `ClientResponseError` object with the following public fields that you could use: -```js -ClientResponseError { - url: string, // requested url - status: number, // response status code - response: { ... }, // the API JSON error response - isAbort: boolean, // is abort/cancellation error - originalError: Error|null, // the original non-normalized error -} -``` - -### Auth store - -The SDK keeps track of the authenticated token and auth model for you via the `pb.authStore` instance. - -##### LocalAuthStore (default) - -The default [`LocalAuthStore`](https://github.com/pocketbase/js-sdk/blob/master/src/stores/LocalAuthStore.ts) uses the browser's `LocalStorage` if available, otherwise - will fallback to runtime/memory (aka. on page refresh or service restart you'll have to authenticate again). - -Conveniently, the default store also takes care to automatically sync the auth store state between multiple tabs. - -> _**NB!** Deno also supports `LocalStorage` but keep in mind that, unlike in browsers where the client is the only user, by default Deno `LocalStorage` will be shared by all clients making requests to your server!_ - -##### AsyncAuthStore - -The SDK comes also with a helper [`AsyncAuthStore`](https://github.com/pocketbase/js-sdk/blob/master/src/stores/AsyncAuthStore.ts) that you can use to integrate with any 3rd party async storage implementation (_usually this is needed when working with React Native_): -```js -import AsyncStorage from '@react-native-async-storage/async-storage'; -import PocketBase, { AsyncAuthStore } from 'pocketbase'; - -const store = new AsyncAuthStore({ - save: async (serialized) => AsyncStorage.setItem('pb_auth', serialized), - initial: AsyncStorage.getItem('pb_auth'), -}); - -const pb = new PocketBase('http://127.0.0.1:8090', store) -``` - -##### Custom auth store - -In some situations it could be easier to create your own custom auth store. For this you can extend [`BaseAuthStore`](https://github.com/pocketbase/js-sdk/blob/master/src/stores/BaseAuthStore.ts) and pass the new custom instance as constructor argument to the client: - -```js -import PocketBase, { BaseAuthStore } from 'pocketbase'; - -class CustomAuthStore extends BaseAuthStore { - save(token, model) { - super.save(token, model); - - // your custom business logic... - } -} - -const pb = new PocketBase('http://127.0.0.1:8090', new CustomAuthStore()); -``` - -##### Common auth store fields and methods - -The default `pb.authStore` extends [`BaseAuthStore`](https://github.com/pocketbase/js-sdk/blob/master/src/stores/BaseAuthStore.ts) and has the following public members that you can use: - -```js -BaseAuthStore { - // base fields - record: RecordModel|null // the authenticated auth record - token: string // the authenticated token - isValid: boolean // checks if the store has existing and unexpired token - isSuperuser: boolean // checks if the store state is for superuser - - // main methods - clear() // "logout" the authenticated record - save(token, record) // update the store with the new auth data - onChange(callback, fireImmediately = false) // register a callback that will be called on store change - - // cookie parse and serialize helpers - loadFromCookie(cookieHeader, key = 'pb_auth') - exportToCookie(options = {}, key = 'pb_auth') -} -``` - -To _"logout"_ the authenticated record you can call `pb.authStore.clear()`. - -To _"listen"_ for changes in the auth store, you can register a new listener via `pb.authStore.onChange`, eg: -```js -// triggered everytime on store change -const removeListener1 = pb.authStore.onChange((token, record) => { - console.log('New store data 1:', token, record) -}); - -// triggered once right after registration and everytime on store change -const removeListener2 = pb.authStore.onChange((token, record) => { - console.log('New store data 2:', token, record) -}, true); - -// (optional) removes the attached listeners -removeListener1(); -removeListener2(); -``` - - -### Auto cancellation - -The SDK client will auto cancel duplicated pending requests for you. -For example, if you have the following 3 duplicated endpoint calls, only the last one will be executed, while the first 2 will be cancelled with `ClientResponseError` error: - -```js -pb.collection('example').getList(1, 20) // cancelled -pb.collection('example').getList(2, 20) // cancelled -pb.collection('example').getList(3, 20) // executed -``` - -To change this behavior per request basis, you can adjust the `requestKey: null|string` special query parameter. -Set it to `null` to unset the default request identifier and to disable auto cancellation for the specific request. -Or set it to a unique string that will be used as request identifier and based on which pending requests will be matched (default to `HTTP_METHOD + path`, eg. "GET /api/users") - -Example: - -```js -pb.collection('example').getList(1, 20); // cancelled -pb.collection('example').getList(1, 20); // executed -pb.collection('example').getList(1, 20, { requestKey: "test" }) // cancelled -pb.collection('example').getList(1, 20, { requestKey: "test" }) // executed -pb.collection('example').getList(1, 20, { requestKey: null }) // executed -pb.collection('example').getList(1, 20, { requestKey: null }) // executed - -// globally disable auto cancellation -pb.autoCancellation(false); - -pb.collection('example').getList(1, 20); // executed -pb.collection('example').getList(1, 20); // executed -pb.collection('example').getList(1, 20); // executed -``` - -**If you want to globally disable the auto cancellation behavior, you could set `pb.autoCancellation(false)`.** - -To manually cancel pending requests, you could use `pb.cancelAllRequests()` or `pb.cancelRequest(requestKey)`. - - -### Specify TypeScript definitions - -You could specify custom TypeScript definitions for your Record models using generics: - -```ts -interface Task { - // type the collection fields you want to use... - id: string; - name: string; -} - -pb.collection('tasks').getList(1, 20) // -> results in Promise> -pb.collection('tasks').getOne("RECORD_ID") // -> results in Promise -``` - -Alternatively, if you don't want to type the generic argument every time you can define a global PocketBase type using type assertion: - -```ts -interface Task { - id: string; - name: string; -} - -interface Post { - id: string; - title: string; - active: boolean; -} - -interface TypedPocketBase extends PocketBase { - collection(idOrName: string): RecordService // default fallback for any other collection - collection(idOrName: 'tasks'): RecordService - collection(idOrName: 'posts'): RecordService -} - -... - -const pb = new PocketBase("http://127.0.0.1:8090") as TypedPocketBase; - -pb.collection('tasks').getOne("RECORD_ID") // -> results in Promise -pb.collection('posts').getOne("RECORD_ID") // -> results in Promise -``` - - -### Custom request options - -All API services accept an optional `options` argument (usually the last one and of type [`SendOptions`](https://github.com/pocketbase/js-sdk/blob/master/src/tools/options.ts)), that can be used to provide: - -- custom headers for a single request -- custom fetch options -- or even your own `fetch` implementation - -For example: - -```js -pb.collection('example').getList(1, 20, { - expand: 'someRel', - otherQueryParam: '123', - - // custom headers - headers: { - 'X-Custom-Header': 'example', - }, - - // custom fetch options - keepalive: false, - cache: 'no-store', - - // or custom fetch implementation - fetch: async (url, config) => { ... }, -}) -``` - -_Note that for backward compatability and to minimize the verbosity, any "unknown" top-level field will be treated as query parameter._ - - -### Send hooks - -Sometimes you may want to modify the request data globally or to customize the response. - -To accomplish this, the SDK provides 2 function hooks: - -- `beforeSend` - triggered right before sending the `fetch` request, allowing you to inspect/modify the request config. - ```js - const pb = new PocketBase('http://127.0.0.1:8090'); - - pb.beforeSend = function (url, options) { - // For list of the possible request options properties check - // https://developer.mozilla.org/en-US/docs/Web/API/fetch#options - options.headers = Object.assign({}, options.headers, { - 'X-Custom-Header': 'example', - }); - - return { url, options }; - }; - - // use the created client as usual... - ``` - -- `afterSend` - triggered after successfully sending the `fetch` request, allowing you to inspect/modify the response object and its parsed data. - ```js - const pb = new PocketBase('http://127.0.0.1:8090'); - - pb.afterSend = function (response, data) { - // do something with the response state - console.log(response.status); - - return Object.assign(data, { - // extend the data... - "additionalField": 123, - }); - }; - - // use the created client as usual... - ``` - -### SSR integration - -Unfortunately, **there is no "one size fits all" solution** because each framework handle SSR differently (_and even in a single framework there is more than one way of doing things_). - -But in general, the idea is to use a cookie based flow: - -1. Create a new `PocketBase` instance for each server-side request -2. "Load/Feed" your `pb.authStore` with data from the request cookie -3. Perform your application server-side actions -4. Before returning the response to the client, update the cookie with the latest `pb.authStore` state - -All [`BaseAuthStore`](https://github.com/pocketbase/js-sdk/blob/master/src/stores/BaseAuthStore.ts) instances have 2 helper methods that -should make working with cookies a little bit easier: - -```js -// update the store with the parsed data from the cookie string -pb.authStore.loadFromCookie('pb_auth=...'); - -// exports the store data as cookie, with option to extend the default SameSite, Secure, HttpOnly, Path and Expires attributes -pb.authStore.exportToCookie({ httpOnly: false }); // Output: 'pb_auth=...' -``` - -Below you could find several examples: - -
- SvelteKit - -One way to integrate with SvelteKit SSR could be to create the PocketBase client in a [hook handle](https://kit.svelte.dev/docs/hooks#handle) -and pass it to the other server-side actions using the `event.locals`. - -```js -// src/hooks.server.js -import PocketBase from 'pocketbase'; - -/** @type {import('@sveltejs/kit').Handle} */ -export async function handle({ event, resolve }) { - event.locals.pb = new PocketBase('http://127.0.0.1:8090'); - - // load the store data from the request cookie string - event.locals.pb.authStore.loadFromCookie(event.request.headers.get('cookie') || ''); - - try { - // get an up-to-date auth store state by verifying and refreshing the loaded auth model (if any) - event.locals.pb.authStore.isValid && await event.locals.pb.collection('users').authRefresh(); - } catch (_) { - // clear the auth store on failed refresh - event.locals.pb.authStore.clear(); - } - - const response = await resolve(event); - - // send back the default 'pb_auth' cookie to the client with the latest store state - response.headers.append('set-cookie', event.locals.pb.authStore.exportToCookie()); - - return response; -} -``` - -And then, in some of your server-side actions, you could directly access the previously created `event.locals.pb` instance: - -```js -// src/routes/login/+server.js -/** - * Creates a `POST /login` server-side endpoint - * - * @type {import('./$types').RequestHandler} - */ -export async function POST({ request, locals }) { - const { email, password } = await request.json(); - - const { token, record } = await locals.pb.collection('users').authWithPassword(email, password); - - return new Response('Success...'); -} -``` - -For proper `locals.pb` type detection, you can also add `PocketBase` in your your global types definition: - -```ts -// src/app.d.ts -import PocketBase from 'pocketbase'; - -declare global { - declare namespace App { - interface Locals { - pb: PocketBase - } - } -} -``` -
- -
- Astro - -To integrate with Astro SSR, you could create the PocketBase client in the [Middleware](https://docs.astro.build/en/guides/middleware) and pass it to the Astro components using the `Astro.locals`. - -```ts -// src/middleware/index.ts -import PocketBase from 'pocketbase'; - -import { defineMiddleware } from 'astro/middleware'; - -export const onRequest = defineMiddleware(async ({ locals, request }: any, next: () => any) => { - locals.pb = new PocketBase('http://127.0.0.1:8090'); - - // load the store data from the request cookie string - locals.pb.authStore.loadFromCookie(request.headers.get('cookie') || ''); - - try { - // get an up-to-date auth store state by verifying and refreshing the loaded auth record (if any) - locals.pb.authStore.isValid && await locals.pb.collection('users').authRefresh(); - } catch (_) { - // clear the auth store on failed refresh - locals.pb.authStore.clear(); - } - - const response = await next(); - - // send back the default 'pb_auth' cookie to the client with the latest store state - response.headers.append('set-cookie', locals.pb.authStore.exportToCookie()); - - return response; -}); -``` - -And then, in your Astro file's component script, you could directly access the previously created `locals.pb` instance: - -```ts -// src/pages/index.astro ---- -const locals = Astro.locals; - -const userAuth = async () => { - const { token, record } = await locals.pb.collection('users').authWithPassword('test@example.com', '123456'); - - return new Response('Success...'); -}; ---- -``` - -Although middleware functionality is available in both `SSG` and `SSR` projects, you would likely want to handle any sensitive data on the server side. Update your `output` configuration to `'server'`: - -```mjs -// astro.config.mjs -import { defineConfig } from 'astro/config'; - -export default defineConfig({ - output: 'server' -}); -``` -
- -
- Nuxt 3 - -One way to integrate with Nuxt 3 SSR could be to create the PocketBase client in a [nuxt plugin](https://v3.nuxtjs.org/guide/directory-structure/plugins) -and provide it as a helper to the `nuxtApp` instance: - -```js -// plugins/pocketbase.js -import PocketBase from 'pocketbase'; - -export default defineNuxtPlugin(async () => { - const pb = new PocketBase('http://127.0.0.1:8090'); - - const cookie = useCookie('pb_auth', { - path: '/', - secure: true, - sameSite: 'strict', - httpOnly: false, // change to "true" if you want only server-side access - maxAge: 604800, - }) - - // load the store data from the cookie value - pb.authStore.save(cookie.value?.token, cookie.value?.record); - - // send back the default 'pb_auth' cookie to the client with the latest store state - pb.authStore.onChange(() => { - cookie.value = { - token: pb.authStore.token, - record: pb.authStore.record, - }; - }); - - try { - // get an up-to-date auth store state by verifying and refreshing the loaded auth model (if any) - pb.authStore.isValid && await pb.collection('users').authRefresh(); - } catch (_) { - // clear the auth store on failed refresh - pb.authStore.clear(); - } - - return { - provide: { pb } - } -}); -``` - -And then in your component you could access it like this: - -```html - - - -``` -
- -
- Nuxt 2 - -One way to integrate with Nuxt 2 SSR could be to create the PocketBase client in a [nuxt plugin](https://nuxtjs.org/docs/directory-structure/plugins#plugins-directory) and provide it as a helper to the `$root` context: - -```js -// plugins/pocketbase.js -import PocketBase from 'pocketbase'; - -export default async (ctx, inject) => { - const pb = new PocketBase('http://127.0.0.1:8090'); - - // load the store data from the request cookie string - pb.authStore.loadFromCookie(ctx.req?.headers?.cookie || ''); - - // send back the default 'pb_auth' cookie to the client with the latest store state - pb.authStore.onChange(() => { - ctx.res?.setHeader('set-cookie', pb.authStore.exportToCookie()); - }); - - try { - // get an up-to-date auth store state by verifying and refreshing the loaded auth record (if any) - pb.authStore.isValid && await pb.collection('users').authRefresh(); - } catch (_) { - // clear the auth store on failed refresh - pb.authStore.clear(); - } - - inject('pocketbase', pb); -}; -``` - -And then in your component you could access it like this: - -```html - - - -``` -
- -
- Next.js - -Next.js doesn't seem to have a central place where you can read/modify the server request and response. -[There is support for middlewares](https://nextjs.org/docs/advanced-features/middleware), -but they are very limited and, at the time of writing, you can't pass data from a middleware to the `getServerSideProps` functions (https://github.com/vercel/next.js/discussions/31792). - -One way to integrate with Next.js SSR could be to create a custom `PocketBase` instance in each of your `getServerSideProps`: - -```jsx -import PocketBase from 'pocketbase'; - -// you can place this helper in a separate file so that it can be reused -async function initPocketBase(req, res) { - const pb = new PocketBase('http://127.0.0.1:8090'); - - // load the store data from the request cookie string - pb.authStore.loadFromCookie(req?.headers?.cookie || ''); - - // send back the default 'pb_auth' cookie to the client with the latest store state - pb.authStore.onChange(() => { - res?.setHeader('set-cookie', pb.authStore.exportToCookie()); - }); - - try { - // get an up-to-date auth store state by verifying and refreshing the loaded auth record (if any) - pb.authStore.isValid && await pb.collection('users').authRefresh(); - } catch (_) { - // clear the auth store on failed refresh - pb.authStore.clear(); - } - - return pb -} - -export async function getServerSideProps({ req, res }) { - const pb = await initPocketBase(req, res) - - // fetch example records... - const result = await pb.collection('example').getList(1, 30); - - return { - props: { - // ... - }, - } -} - -export default function Home() { - return ( -
Hello world!
- ) -} -``` -
- -### Security - -The most common frontend related vulnerability is XSS (and CSRF when dealing with cookies). -Fortunately, modern browsers can detect and mitigate most of this type of attacks if [Content Security Policy (CSP)](https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP) is provided. - -**To prevent a malicious user or 3rd party script to steal your PocketBase auth token, it is recommended to configure a basic CSP for your application (either as `meta` tag or HTTP header).** - -This is out of the scope of the SDK, but you could find more resources about CSP at: - -- https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP -- https://content-security-policy.com - - -**Depending on how and where you use the JS SDK, it is also recommended to use the helper `pb.filter(expr, params)` when constructing filter strings with untrusted user input to avoid eventual string injection attacks (see [Binding filter parameters](#binding-filter-parameters)).** - - -## Definitions - -### Creating new client instance - -```js -const pb = new PocketBase(baseURL = '/', authStore = LocalAuthStore); -``` - -### Instance methods - -> Each instance method returns the `PocketBase` instance allowing chaining. - -| Method | Description | -|:----------------------------------|:------------------------------------------------------------------------------| -| `pb.send(path, sendOptions = {})` | Sends an api http request. | -| `pb.autoCancellation(enable)` | Globally enable or disable auto cancellation for pending duplicated requests. | -| `pb.cancelAllRequests()` | Cancels all pending requests. | -| `pb.cancelRequest(cancelKey)` | Cancels single request by its cancellation token key. | -| `pb.buildURL(path)` | Builds a full client url by safely concatenating the provided path. | - - -### Services - -> Each service call returns a `Promise` object with the API response. - -##### RecordService - -###### _Crud handlers_ - -```js -// Returns a paginated records list. -🔓 pb.collection(collectionIdOrName).getList(page = 1, perPage = 30, options = {}); - -// Returns a list with all records batch fetched at once -// (by default 200 items per request; to change it set the `batch` param). -🔓 pb.collection(collectionIdOrName).getFullList(options = {}); - -// Returns the first found record matching the specified filter. -🔓 pb.collection(collectionIdOrName).getFirstListItem(filter, options = {}); - -// Returns a single record by its id. -🔓 pb.collection(collectionIdOrName).getOne(recordId, options = {}); - -// Creates (aka. register) a new record. -🔓 pb.collection(collectionIdOrName).create(bodyParams = {}, options = {}); - -// Updates an existing record by its id. -🔓 pb.collection(collectionIdOrName).update(recordId, bodyParams = {}, options = {}); - -// Deletes a single record by its id. -🔓 pb.collection(collectionIdOrName).delete(recordId, options = {}); - -``` - -###### _Realtime handlers_ - -```js -// Subscribe to realtime changes to the specified topic ("*" or recordId). -// -// It is safe to subscribe multiple times to the same topic. -// -// You can use the returned UnsubscribeFunc to remove a single registered subscription. -// If you want to remove all subscriptions related to the topic use unsubscribe(topic). -🔓 pb.collection(collectionIdOrName).subscribe(topic, callback, options = {}); - -// Unsubscribe from all registered subscriptions to the specified topic ("*" or recordId). -// If topic is not set, then it will remove all registered collection subscriptions. -🔓 pb.collection(collectionIdOrName).unsubscribe([topic]); -``` - -###### _Auth handlers_ - -> Available only for "auth" type collections. - -```js -// Returns all available application auth methods. -🔓 pb.collection(collectionIdOrName).listAuthMethods(options = {}); - -// Authenticates a record with their username/email and password. -🔓 pb.collection(collectionIdOrName).authWithPassword(usernameOrEmail, password, options = {}); - -// Authenticates a record with an OTP. -🔓 pb.collection(collectionIdOrName).authWithOTP(otpId, password, options = {}); - -// Authenticates a record with OAuth2 provider without custom redirects, deeplinks or even page reload. -🔓 pb.collection(collectionIdOrName).authWithOAuth2(authConfig); - -// Authenticates a record with OAuth2 code. -🔓 pb.collection(collectionIdOrName).authWithOAuth2Code(provider, code, codeVerifier, redirectUrl, createData = {}, options = {}); - -// Refreshes the current authenticated record and auth token. -🔐 pb.collection(collectionIdOrName).authRefresh(options = {}); - -// Sends a record OTP email request. -🔓 pb.collection(collectionIdOrName).requestOTP(email, options = {}); - -// Sends a record password reset email. -🔓 pb.collection(collectionIdOrName).requestPasswordReset(email, options = {}); - -// Confirms a record password reset request. -🔓 pb.collection(collectionIdOrName).confirmPasswordReset(resetToken, newPassword, newPasswordConfirm, options = {}); - -// Sends a record verification email request. -🔓 pb.collection(collectionIdOrName).requestVerification(email, options = {}); - -// Confirms a record email verification request. -🔓 pb.collection(collectionIdOrName).confirmVerification(verificationToken, options = {}); - -// Sends a record email change request to the provider email. -🔐 pb.collection(collectionIdOrName).requestEmailChange(newEmail, options = {}); - -// Confirms record new email address. -🔓 pb.collection(collectionIdOrName).confirmEmailChange(emailChangeToken, userPassword, options = {}); - -// Lists all linked external auth providers for the specified record. -🔐 pb.collection(collectionIdOrName).listExternalAuths(recordId, options = {}); - -// Unlinks a single external auth provider relation from the specified record. -🔐 pb.collection(collectionIdOrName).unlinkExternalAuth(recordId, provider, options = {}); - -// Impersonate authenticates with the specified recordId and returns a new client with the received auth token in a memory store. -🔐 pb.collection(collectionIdOrName).impersonate(recordId, duration, options = {}); -``` - ---- - -#### BatchService - -```js -// create a new batch instance -const batch = pb.createBatch(); - -// register create/update/delete/upsert requests to the created batch -batch.collection('example1').create({ ... }); -batch.collection('example2').update('RECORD_ID', { ... }); -batch.collection('example3').delete('RECORD_ID'); -batch.collection('example4').upsert({ ... }); - -// send the batch request -const result = await batch.send() -``` - ---- - -##### FileService - -```js -// Builds and returns an absolute record file url for the provided filename. -🔓 pb.files.getURL(record, filename, options = {}); - -// Requests a new private file access token for the current authenticated record. -🔐 pb.files.getToken(options = {}); -``` - ---- - -##### CollectionService - -```js -// Returns a paginated collections list. -🔐 pb.collections.getList(page = 1, perPage = 30, options = {}); - -// Returns a list with all collections batch fetched at once -// (by default 200 items per request; to change it set the `batch` query param). -🔐 pb.collections.getFullList(options = {}); - -// Returns the first found collection matching the specified filter. -🔐 pb.collections.getFirstListItem(filter, options = {}); - -// Returns a single collection by its id or name. -🔐 pb.collections.getOne(idOrName, options = {}); - -// Creates (aka. register) a new collection. -🔐 pb.collections.create(bodyParams = {}, options = {}); - -// Updates an existing collection by its id or name. -🔐 pb.collections.update(idOrName, bodyParams = {}, options = {}); - -// Deletes a single collection by its id or name. -🔐 pb.collections.delete(idOrName, options = {}); - -// Deletes all records associated with the specified collection. -🔐 pb.collections.truncate(idOrName, options = {}); - -// Imports the provided collections. -🔐 pb.collections.import(collections, deleteMissing = false, options = {}); - -// Returns type indexed map with scaffolded collection models populated with their default field values. -🔐 pb.collections.getScaffolds(options = {}); -``` - ---- - -##### LogService - -```js -// Returns a paginated logs list. -🔐 pb.logs.getList(page = 1, perPage = 30, options = {}); - -// Returns a single log by its id. -🔐 pb.logs.getOne(id, options = {}); - -// Returns logs statistics. -🔐 pb.logs.getStats(options = {}); -``` - ---- - -##### SettingsService - -```js -// Returns a map with all available app settings. -🔐 pb.settings.getAll(options = {}); - -// Bulk updates app settings. -🔐 pb.settings.update(bodyParams = {}, options = {}); - -// Performs a S3 storage connection test. -🔐 pb.settings.testS3(filesystem = "storage", options = {}); - -// Sends a test email (verification, password-reset, email-change). -🔐 pb.settings.testEmail(collectionIdOrName, toEmail, template, options = {}); - -// Generates a new Apple OAuth2 client secret. -🔐 pb.settings.generateAppleClientSecret(clientId, teamId, keyId, privateKey, duration, options = {}); -``` - ---- - -##### RealtimeService - -> This service is usually used with custom realtime actions. -> For records realtime subscriptions you can use the subscribe/unsubscribe -> methods available in the `pb.collection()` RecordService. - -```js -// Initialize the realtime connection (if not already) and register the subscription listener. -// -// You can subscribe to the `PB_CONNECT` event if you want to listen to the realtime connection connect/reconnect events. -🔓 pb.realtime.subscribe(topic, callback, options = {}); - -// Unsubscribe from all subscription listeners with the specified topic. -🔓 pb.realtime.unsubscribe(topic?); - -// Unsubscribe from all subscription listeners starting with the specified topic prefix. -🔓 pb.realtime.unsubscribeByPrefix(topicPrefix); - -// Unsubscribe from all subscriptions matching the specified topic and listener function. -🔓 pb.realtime.unsubscribeByTopicAndListener(topic, callback); - -// Getter that checks whether the realtime connection has been established. -pb.realtime.isConnected - -// An optional hook that is invoked when the realtime client disconnects -// either when unsubscribing from all subscriptions or when the connection -// was interrupted or closed by the server. -// -// Note that the realtime client autoreconnect on its own and this hook is -// useful only for the cases where you want to apply a special behavior on -// server error or after closing the realtime connection. -pb.realtime.onDisconnect = function(activeSubscriptions) -``` - ---- - -##### BackupService - -```js -// Returns list with all available backup files. -🔐 pb.backups.getFullList(options = {}); - -// Initializes a new backup. -🔐 pb.backups.create(basename = "", options = {}); - -// Upload an existing app data backup. -🔐 pb.backups.upload({ file: File/Blob }, options = {}); - -// Deletes a single backup by its name. -🔐 pb.backups.delete(key, options = {}); - -// Initializes an app data restore from an existing backup. -🔐 pb.backups.restore(key, options = {}); - -// Builds a download url for a single existing backup using a -// superuser file token and the backup file key. -🔐 pb.backups.getDownloadURL(token, key); -``` - -##### CronService - -```js -// Returns list with all available cron jobs. -🔐 pb.crons.getFullList(options = {}); - -// Runs the specified cron job. -🔐 pb.crons.run(jobId, options = {}); -``` - ---- - -##### HealthService - -```js -// Checks the health status of the api. -🔓 pb.health.check(options = {}); -``` - - -## Development -```sh -# run unit tests -npm test - -# run prettier -npm run format - -# build and minify for production -npm run build -``` diff --git a/PBandGraphScaffold/node_modules/pocketbase/dist/pocketbase.cjs.d.ts b/PBandGraphScaffold/node_modules/pocketbase/dist/pocketbase.cjs.d.ts deleted file mode 100644 index 3cd2c02..0000000 --- a/PBandGraphScaffold/node_modules/pocketbase/dist/pocketbase.cjs.d.ts +++ /dev/null @@ -1,1468 +0,0 @@ -interface SerializeOptions { - encode?: (val: string | number | boolean) => string; - maxAge?: number; - domain?: string; - path?: string; - expires?: Date; - httpOnly?: boolean; - secure?: boolean; - priority?: string; - sameSite?: boolean | string; -} -interface ListResult { - page: number; - perPage: number; - totalItems: number; - totalPages: number; - items: Array; -} -interface BaseModel { - [key: string]: any; - id: string; -} -interface LogModel extends BaseModel { - level: string; - message: string; - created: string; - updated: string; - data: { - [key: string]: any; - }; -} -interface RecordModel extends BaseModel { - collectionId: string; - collectionName: string; - expand?: { - [key: string]: any; - }; -} -// ------------------------------------------------------------------- -// Collection types -// ------------------------------------------------------------------- -interface CollectionField { - [key: string]: any; - id: string; - name: string; - type: string; - system: boolean; - hidden: boolean; - presentable: boolean; -} -interface TokenConfig { - duration: number; - secret?: string; -} -interface AuthAlertConfig { - enabled: boolean; - emailTemplate: EmailTemplate; -} -interface OTPConfig { - enabled: boolean; - duration: number; - length: number; - emailTemplate: EmailTemplate; -} -interface MFAConfig { - enabled: boolean; - duration: number; - rule: string; -} -interface PasswordAuthConfig { - enabled: boolean; - identityFields: Array; -} -interface OAuth2Provider { - pkce?: boolean; - clientId: string; - name: string; - clientSecret: string; - authURL: string; - tokenURL: string; - userInfoURL: string; - displayName: string; - extra?: { - [key: string]: any; - }; -} -interface OAuth2Config { - enabled: boolean; - mappedFields: { - [key: string]: string; - }; - providers: Array; -} -interface EmailTemplate { - subject: string; - body: string; -} -interface collection extends BaseModel { - name: string; - fields: Array; - indexes: Array; - system: boolean; - listRule?: string; - viewRule?: string; - createRule?: string; - updateRule?: string; - deleteRule?: string; -} -interface BaseCollectionModel extends collection { - type: "base"; -} -interface ViewCollectionModel extends collection { - type: "view"; - viewQuery: string; -} -interface AuthCollectionModel extends collection { - type: "auth"; - authRule?: string; - manageRule?: string; - authAlert: AuthAlertConfig; - oauth2: OAuth2Config; - passwordAuth: PasswordAuthConfig; - mfa: MFAConfig; - otp: OTPConfig; - authToken: TokenConfig; - passwordResetToken: TokenConfig; - emailChangeToken: TokenConfig; - verificationToken: TokenConfig; - fileToken: TokenConfig; - verificationTemplate: EmailTemplate; - resetPasswordTemplate: EmailTemplate; - confirmEmailChangeTemplate: EmailTemplate; -} -type CollectionModel = BaseCollectionModel | ViewCollectionModel | AuthCollectionModel; -type AuthRecord = RecordModel | null; -// for backward compatibility -type OnStoreChangeFunc = (token: string, record: AuthRecord) => void; -/** - * Base AuthStore class that stores the auth state in runtime memory (aka. only for the duration of the store instane). - * - * Usually you wouldn't use it directly and instead use the builtin LocalAuthStore, AsyncAuthStore - * or extend it with your own custom implementation. - */ -declare class BaseAuthStore { - protected baseToken: string; - protected baseModel: AuthRecord; - private _onChangeCallbacks; - /** - * Retrieves the stored token (if any). - */ - get token(): string; - /** - * Retrieves the stored model data (if any). - */ - get record(): AuthRecord; - /** - * @deprecated use `record` instead. - */ - get model(): AuthRecord; - /** - * Loosely checks if the store has valid token (aka. existing and unexpired exp claim). - */ - get isValid(): boolean; - /** - * Loosely checks whether the currently loaded store state is for superuser. - * - * Alternatively you can also compare directly `pb.authStore.record?.collectionName`. - */ - get isSuperuser(): boolean; - /** - * @deprecated use `isSuperuser` instead or simply check the record.collectionName property. - */ - get isAdmin(): boolean; - /** - * @deprecated use `!isSuperuser` instead or simply check the record.collectionName property. - */ - get isAuthRecord(): boolean; - /** - * Saves the provided new token and model data in the auth store. - */ - save(token: string, record?: AuthRecord): void; - /** - * Removes the stored token and model data form the auth store. - */ - clear(): void; - /** - * Parses the provided cookie string and updates the store state - * with the cookie's token and model data. - * - * NB! This function doesn't validate the token or its data. - * Usually this isn't a concern if you are interacting only with the - * PocketBase API because it has the proper server-side security checks in place, - * but if you are using the store `isValid` state for permission controls - * in a node server (eg. SSR), then it is recommended to call `authRefresh()` - * after loading the cookie to ensure an up-to-date token and model state. - * For example: - * - * ```js - * pb.authStore.loadFromCookie("cookie string..."); - * - * try { - * // get an up-to-date auth store state by veryfing and refreshing the loaded auth model (if any) - * pb.authStore.isValid && await pb.collection('users').authRefresh(); - * } catch (_) { - * // clear the auth store on failed refresh - * pb.authStore.clear(); - * } - * ``` - */ - loadFromCookie(cookie: string, key?: string): void; - /** - * Exports the current store state as cookie string. - * - * By default the following optional attributes are added: - * - Secure - * - HttpOnly - * - SameSite=Strict - * - Path=/ - * - Expires={the token expiration date} - * - * NB! If the generated cookie exceeds 4096 bytes, this method will - * strip the model data to the bare minimum to try to fit within the - * recommended size in https://www.rfc-editor.org/rfc/rfc6265#section-6.1. - */ - exportToCookie(options?: SerializeOptions, key?: string): string; - /** - * Register a callback function that will be called on store change. - * - * You can set the `fireImmediately` argument to true in order to invoke - * the provided callback right after registration. - * - * Returns a removal function that you could call to "unsubscribe" from the changes. - */ - onChange(callback: OnStoreChangeFunc, fireImmediately?: boolean): () => void; - protected triggerChange(): void; -} -/** - * BaseService class that should be inherited from all API services. - */ -declare abstract class BaseService { - readonly client: Client; - constructor(client: Client); -} -interface SendOptions extends RequestInit { - // for backward compatibility and to minimize the verbosity, - // any top-level field that doesn't exist in RequestInit or the - // fields below will be treated as query parameter. - [key: string]: any; - /** - * Optional custom fetch function to use for sending the request. - */ - fetch?: (url: RequestInfo | URL, config?: RequestInit) => Promise; - /** - * Custom headers to send with the requests. - */ - headers?: { - [key: string]: string; - }; - /** - * The body of the request (serialized automatically for json requests). - */ - body?: any; - /** - * Query parameters that will be appended to the request url. - */ - query?: { - [key: string]: any; - }; - /** - * @deprecated use `query` instead - * - * for backward-compatibility `params` values are merged with `query`, - * but this option may get removed in the final v1 release - */ - params?: { - [key: string]: any; - }; - /** - * The request identifier that can be used to cancel pending requests. - */ - requestKey?: string | null; - /** - * @deprecated use `requestKey:string` instead - */ - $cancelKey?: string; - /** - * @deprecated use `requestKey:null` instead - */ - $autoCancel?: boolean; -} -interface CommonOptions extends SendOptions { - fields?: string; -} -interface ListOptions extends CommonOptions { - page?: number; - perPage?: number; - sort?: string; - filter?: string; - skipTotal?: boolean; -} -interface FullListOptions extends ListOptions { - batch?: number; -} -interface RecordOptions extends CommonOptions { - expand?: string; -} -interface RecordListOptions extends ListOptions, RecordOptions { -} -interface RecordFullListOptions extends FullListOptions, RecordOptions { -} -interface RecordSubscribeOptions extends SendOptions { - fields?: string; - filter?: string; - expand?: string; -} -interface LogStatsOptions extends CommonOptions { - filter?: string; -} -interface FileOptions extends CommonOptions { - thumb?: string; - download?: boolean; -} -interface appleClientSecret { - secret: string; -} -declare class SettingsService extends BaseService { - /** - * Fetch all available app settings. - * - * @throws {ClientResponseError} - */ - getAll(options?: CommonOptions): Promise<{ - [key: string]: any; - }>; - /** - * Bulk updates app settings. - * - * @throws {ClientResponseError} - */ - update(bodyParams?: { - [key: string]: any; - } | FormData, options?: CommonOptions): Promise<{ - [key: string]: any; - }>; - /** - * Performs a S3 filesystem connection test. - * - * The currently supported `filesystem` are "storage" and "backups". - * - * @throws {ClientResponseError} - */ - testS3(filesystem?: string, options?: CommonOptions): Promise; - /** - * Sends a test email. - * - * The possible `emailTemplate` values are: - * - verification - * - password-reset - * - email-change - * - * @throws {ClientResponseError} - */ - testEmail(collectionIdOrName: string, toEmail: string, emailTemplate: string, options?: CommonOptions): Promise; - /** - * Generates a new Apple OAuth2 client secret. - * - * @throws {ClientResponseError} - */ - generateAppleClientSecret(clientId: string, teamId: string, keyId: string, privateKey: string, duration: number, options?: CommonOptions): Promise; -} -type UnsubscribeFunc = () => Promise; -declare class RealtimeService extends BaseService { - clientId: string; - private eventSource; - private subscriptions; - private lastSentSubscriptions; - private connectTimeoutId; - private maxConnectTimeout; - private reconnectTimeoutId; - private reconnectAttempts; - private maxReconnectAttempts; - private predefinedReconnectIntervals; - private pendingConnects; - /** - * Returns whether the realtime connection has been established. - */ - get isConnected(): boolean; - /** - * An optional hook that is invoked when the realtime client disconnects - * either when unsubscribing from all subscriptions or when the - * connection was interrupted or closed by the server. - * - * The received argument could be used to determine whether the disconnect - * is a result from unsubscribing (`activeSubscriptions.length == 0`) - * or because of network/server error (`activeSubscriptions.length > 0`). - * - * If you want to listen for the opposite, aka. when the client connection is established, - * subscribe to the `PB_CONNECT` event. - */ - onDisconnect?: (activeSubscriptions: Array) => void; - /** - * Register the subscription listener. - * - * You can subscribe multiple times to the same topic. - * - * If the SSE connection is not started yet, - * this method will also initialize it. - */ - subscribe(topic: string, callback: (data: any) => void, options?: SendOptions): Promise; - /** - * Unsubscribe from all subscription listeners with the specified topic. - * - * If `topic` is not provided, then this method will unsubscribe - * from all active subscriptions. - * - * This method is no-op if there are no active subscriptions. - * - * The related sse connection will be autoclosed if after the - * unsubscribe operation there are no active subscriptions left. - */ - unsubscribe(topic?: string): Promise; - /** - * Unsubscribe from all subscription listeners starting with the specified topic prefix. - * - * This method is no-op if there are no active subscriptions with the specified topic prefix. - * - * The related sse connection will be autoclosed if after the - * unsubscribe operation there are no active subscriptions left. - */ - unsubscribeByPrefix(keyPrefix: string): Promise; - /** - * Unsubscribe from all subscriptions matching the specified topic and listener function. - * - * This method is no-op if there are no active subscription with - * the specified topic and listener. - * - * The related sse connection will be autoclosed if after the - * unsubscribe operation there are no active subscriptions left. - */ - unsubscribeByTopicAndListener(topic: string, listener: EventListener): Promise; - private hasSubscriptionListeners; - private submitSubscriptions; - private getSubscriptionsCancelKey; - private getSubscriptionsByTopic; - private getNonEmptySubscriptionKeys; - private addAllSubscriptionListeners; - private removeAllSubscriptionListeners; - private connect; - private initConnect; - private hasUnsentSubscriptions; - private connectErrorHandler; - private disconnect; -} -declare abstract class CrudService extends BaseService { - /** - * Base path for the crud actions (without trailing slash, eg. '/admins'). - */ - abstract get baseCrudPath(): string; - /** - * Response data decoder. - */ - decode(data: { - [key: string]: any; - }): T; - /** - * Returns a promise with all list items batch fetched at once - * (by default 500 items per request; to change it set the `batch` query param). - * - * You can use the generic T to supply a wrapper type of the crud model. - * - * @throws {ClientResponseError} - */ - getFullList(options?: FullListOptions): Promise>; - /** - * Legacy version of getFullList with explicitly specified batch size. - */ - getFullList(batch?: number, options?: ListOptions): Promise>; - /** - * Returns paginated items list. - * - * You can use the generic T to supply a wrapper type of the crud model. - * - * @throws {ClientResponseError} - */ - getList(page?: number, perPage?: number, options?: ListOptions): Promise>; - /** - * Returns the first found item by the specified filter. - * - * Internally it calls `getList(1, 1, { filter, skipTotal })` and - * returns the first found item. - * - * You can use the generic T to supply a wrapper type of the crud model. - * - * For consistency with `getOne`, this method will throw a 404 - * ClientResponseError if no item was found. - * - * @throws {ClientResponseError} - */ - getFirstListItem(filter: string, options?: CommonOptions): Promise; - /** - * Returns single item by its id. - * - * You can use the generic T to supply a wrapper type of the crud model. - * - * If `id` is empty it will throw a 404 error. - * - * @throws {ClientResponseError} - */ - getOne(id: string, options?: CommonOptions): Promise; - /** - * Creates a new item. - * - * You can use the generic T to supply a wrapper type of the crud model. - * - * @throws {ClientResponseError} - */ - create(bodyParams?: { - [key: string]: any; - } | FormData, options?: CommonOptions): Promise; - /** - * Updates an existing item by its id. - * - * You can use the generic T to supply a wrapper type of the crud model. - * - * @throws {ClientResponseError} - */ - update(id: string, bodyParams?: { - [key: string]: any; - } | FormData, options?: CommonOptions): Promise; - /** - * Deletes an existing item by its id. - * - * @throws {ClientResponseError} - */ - delete(id: string, options?: CommonOptions): Promise; - /** - * Returns a promise with all list items batch fetched at once. - */ - protected _getFullList(batchSize?: number, options?: ListOptions): Promise>; -} -interface RecordAuthResponse { - /** - * The signed PocketBase auth record. - */ - record: T; - /** - * The PocketBase record auth token. - * - * If you are looking for the OAuth2 access and refresh tokens - * they are available under the `meta.accessToken` and `meta.refreshToken` props. - */ - token: string; - /** - * Auth meta data usually filled when OAuth2 is used. - */ - meta?: { - [key: string]: any; - }; -} -interface AuthProviderInfo { - name: string; - displayName: string; - state: string; - authURL: string; - codeVerifier: string; - codeChallenge: string; - codeChallengeMethod: string; -} -interface AuthMethodsList { - mfa: { - enabled: boolean; - duration: number; - }; - otp: { - enabled: boolean; - duration: number; - }; - password: { - enabled: boolean; - identityFields: Array; - }; - oauth2: { - enabled: boolean; - providers: Array; - }; -} -interface RecordSubscription { - action: string; // eg. create, update, delete - record: T; -} -type OAuth2UrlCallback = (url: string) => void | Promise; -interface OAuth2AuthConfig extends SendOptions { - // the name of the OAuth2 provider (eg. "google") - provider: string; - // custom scopes to overwrite the default ones - scopes?: Array; - // optional record create data - createData?: { - [key: string]: any; - }; - // optional callback that is triggered after the OAuth2 sign-in/sign-up url generation - urlCallback?: OAuth2UrlCallback; - // optional query params to send with the PocketBase auth request (eg. fields, expand, etc.) - query?: RecordOptions; -} -interface OTPResponse { - otpId: string; -} -declare class RecordService extends CrudService { - readonly collectionIdOrName: string; - constructor(client: Client, collectionIdOrName: string); - /** - * @inheritdoc - */ - get baseCrudPath(): string; - /** - * Returns the current collection service base path. - */ - get baseCollectionPath(): string; - /** - * Returns whether the current service collection is superusers. - */ - get isSuperusers(): boolean; - // --------------------------------------------------------------- - // Realtime handlers - // --------------------------------------------------------------- - /** - * Subscribe to realtime changes to the specified topic ("*" or record id). - * - * If `topic` is the wildcard "*", then this method will subscribe to - * any record changes in the collection. - * - * If `topic` is a record id, then this method will subscribe only - * to changes of the specified record id. - * - * It's OK to subscribe multiple times to the same topic. - * You can use the returned `UnsubscribeFunc` to remove only a single subscription. - * Or use `unsubscribe(topic)` if you want to remove all subscriptions attached to the topic. - */ - subscribe(topic: string, callback: (data: RecordSubscription) => void, options?: RecordSubscribeOptions): Promise; - /** - * Unsubscribe from all subscriptions of the specified topic - * ("*" or record id). - * - * If `topic` is not set, then this method will unsubscribe from - * all subscriptions associated to the current collection. - */ - unsubscribe(topic?: string): Promise; - // --------------------------------------------------------------- - // Crud handers - // --------------------------------------------------------------- - /** - * @inheritdoc - */ - getFullList(options?: RecordFullListOptions): Promise>; - /** - * @inheritdoc - */ - getFullList(batch?: number, options?: RecordListOptions): Promise>; - /** - * @inheritdoc - */ - getList(page?: number, perPage?: number, options?: RecordListOptions): Promise>; - /** - * @inheritdoc - */ - getFirstListItem(filter: string, options?: RecordListOptions): Promise; - /** - * @inheritdoc - */ - getOne(id: string, options?: RecordOptions): Promise; - /** - * @inheritdoc - */ - create(bodyParams?: { - [key: string]: any; - } | FormData, options?: RecordOptions): Promise; - /** - * @inheritdoc - * - * If the current `client.authStore.record` matches with the updated id, then - * on success the `client.authStore.record` will be updated with the new response record fields. - */ - update(id: string, bodyParams?: { - [key: string]: any; - } | FormData, options?: RecordOptions): Promise; - /** - * @inheritdoc - * - * If the current `client.authStore.record` matches with the deleted id, - * then on success the `client.authStore` will be cleared. - */ - delete(id: string, options?: CommonOptions): Promise; - // --------------------------------------------------------------- - // Auth handlers - // --------------------------------------------------------------- - /** - * Prepare successful collection authorization response. - */ - protected authResponse(responseData: any): RecordAuthResponse; - /** - * Returns all available collection auth methods. - * - * @throws {ClientResponseError} - */ - listAuthMethods(options?: CommonOptions): Promise; - /** - * Authenticate a single auth collection record via its username/email and password. - * - * On success, this method also automatically updates - * the client's AuthStore data and returns: - * - the authentication token - * - the authenticated record model - * - * @throws {ClientResponseError} - */ - authWithPassword(usernameOrEmail: string, password: string, options?: RecordOptions): Promise>; - /** - * Authenticate a single auth collection record with OAuth2 code. - * - * If you don't have an OAuth2 code you may also want to check `authWithOAuth2` method. - * - * On success, this method also automatically updates - * the client's AuthStore data and returns: - * - the authentication token - * - the authenticated record model - * - the OAuth2 account data (eg. name, email, avatar, etc.) - * - * @throws {ClientResponseError} - */ - authWithOAuth2Code(provider: string, code: string, codeVerifier: string, redirectURL: string, createData?: { - [key: string]: any; - }, options?: RecordOptions): Promise>; - /** - * @deprecated - * Consider using authWithOAuth2Code(provider, code, codeVerifier, redirectURL, createdData, options?). - */ - authWithOAuth2Code(provider: string, code: string, codeVerifier: string, redirectURL: string, createData?: { - [key: string]: any; - }, body?: any, query?: any): Promise>; - /** - * @deprecated This form of authWithOAuth2 is deprecated. - * - * Please use `authWithOAuth2Code()` OR its simplified realtime version - * as shown in https://pocketbase.io/docs/authentication/#oauth2-integration. - */ - authWithOAuth2(provider: string, code: string, codeVerifier: string, redirectURL: string, createData?: { - [key: string]: any; - }, bodyParams?: { - [key: string]: any; - }, queryParams?: RecordOptions): Promise>; - /** - * Authenticate a single auth collection record with OAuth2 - * **without custom redirects, deeplinks or even page reload**. - * - * This method initializes a one-off realtime subscription and will - * open a popup window with the OAuth2 vendor page to authenticate. - * Once the external OAuth2 sign-in/sign-up flow is completed, the popup - * window will be automatically closed and the OAuth2 data sent back - * to the user through the previously established realtime connection. - * - * You can specify an optional `urlCallback` prop to customize - * the default url `window.open` behavior. - * - * On success, this method also automatically updates - * the client's AuthStore data and returns: - * - the authentication token - * - the authenticated record model - * - the OAuth2 account data (eg. name, email, avatar, etc.) - * - * Example: - * - * ```js - * const authData = await pb.collection("users").authWithOAuth2({ - * provider: "google", - * }) - * ``` - * - * Note1: When creating the OAuth2 app in the provider dashboard - * you have to configure `https://yourdomain.com/api/oauth2-redirect` - * as redirect URL. - * - * Note2: Safari may block the default `urlCallback` popup because - * it doesn't allow `window.open` calls as part of an `async` click functions. - * To workaround this you can either change your click handler to not be marked as `async` - * OR manually call `window.open` before your `async` function and use the - * window reference in your own custom `urlCallback` (see https://github.com/pocketbase/pocketbase/discussions/2429#discussioncomment-5943061). - * For example: - * ```js - * - * ... - * document.getElementById("btn").addEventListener("click", () => { - * pb.collection("users").authWithOAuth2({ - * provider: "gitlab", - * }).then((authData) => { - * console.log(authData) - * }).catch((err) => { - * console.log(err, err.originalError); - * }); - * }) - * ``` - * - * @throws {ClientResponseError} - */ - authWithOAuth2(options: OAuth2AuthConfig): Promise>; - /** - * Refreshes the current authenticated record instance and - * returns a new token and record data. - * - * On success this method also automatically updates the client's AuthStore. - * - * @throws {ClientResponseError} - */ - authRefresh(options?: RecordOptions): Promise>; - /** - * @deprecated - * Consider using authRefresh(options?). - */ - authRefresh(body?: any, query?: any): Promise>; - /** - * Sends auth record password reset request. - * - * @throws {ClientResponseError} - */ - requestPasswordReset(email: string, options?: CommonOptions): Promise; - /** - * @deprecated - * Consider using requestPasswordReset(email, options?). - */ - requestPasswordReset(email: string, body?: any, query?: any): Promise; - /** - * Confirms auth record password reset request. - * - * @throws {ClientResponseError} - */ - confirmPasswordReset(passwordResetToken: string, password: string, passwordConfirm: string, options?: CommonOptions): Promise; - /** - * @deprecated - * Consider using confirmPasswordReset(passwordResetToken, password, passwordConfirm, options?). - */ - confirmPasswordReset(passwordResetToken: string, password: string, passwordConfirm: string, body?: any, query?: any): Promise; - /** - * Sends auth record verification email request. - * - * @throws {ClientResponseError} - */ - requestVerification(email: string, options?: CommonOptions): Promise; - /** - * @deprecated - * Consider using requestVerification(email, options?). - */ - requestVerification(email: string, body?: any, query?: any): Promise; - /** - * Confirms auth record email verification request. - * - * If the current `client.authStore.record` matches with the auth record from the token, - * then on success the `client.authStore.record.verified` will be updated to `true`. - * - * @throws {ClientResponseError} - */ - confirmVerification(verificationToken: string, options?: CommonOptions): Promise; - /** - * @deprecated - * Consider using confirmVerification(verificationToken, options?). - */ - confirmVerification(verificationToken: string, body?: any, query?: any): Promise; - /** - * Sends an email change request to the authenticated record model. - * - * @throws {ClientResponseError} - */ - requestEmailChange(newEmail: string, options?: CommonOptions): Promise; - /** - * @deprecated - * Consider using requestEmailChange(newEmail, options?). - */ - requestEmailChange(newEmail: string, body?: any, query?: any): Promise; - /** - * Confirms auth record's new email address. - * - * If the current `client.authStore.record` matches with the auth record from the token, - * then on success the `client.authStore` will be cleared. - * - * @throws {ClientResponseError} - */ - confirmEmailChange(emailChangeToken: string, password: string, options?: CommonOptions): Promise; - /** - * @deprecated - * Consider using confirmEmailChange(emailChangeToken, password, options?). - */ - confirmEmailChange(emailChangeToken: string, password: string, body?: any, query?: any): Promise; - /** - * @deprecated use collection("_externalAuths").* - * - * Lists all linked external auth providers for the specified auth record. - * - * @throws {ClientResponseError} - */ - listExternalAuths(recordId: string, options?: CommonOptions): Promise>; - /** - * @deprecated use collection("_externalAuths").* - * - * Unlink a single external auth provider from the specified auth record. - * - * @throws {ClientResponseError} - */ - unlinkExternalAuth(recordId: string, provider: string, options?: CommonOptions): Promise; - /** - * Sends auth record OTP to the provided email. - * - * @throws {ClientResponseError} - */ - requestOTP(email: string, options?: CommonOptions): Promise; - /** - * Authenticate a single auth collection record via OTP. - * - * On success, this method also automatically updates - * the client's AuthStore data and returns: - * - the authentication token - * - the authenticated record model - * - * @throws {ClientResponseError} - */ - authWithOTP(otpId: string, password: string, options?: CommonOptions): Promise>; - /** - * Impersonate authenticates with the specified recordId and - * returns a new client with the received auth token in a memory store. - * - * If `duration` is 0 the generated auth token will fallback - * to the default collection auth token duration. - * - * This action currently requires superusers privileges. - * - * @throws {ClientResponseError} - */ - impersonate(recordId: string, duration: number, options?: CommonOptions): Promise; - // --------------------------------------------------------------- - // very rudimentary url query params replacement because at the moment - // URL (and URLSearchParams) doesn't seem to be fully supported in React Native - // - // note: for details behind some of the decode/encode parsing check https://unixpapa.com/js/querystring.html - private _replaceQueryParams; -} -declare class CollectionService extends CrudService { - /** - * @inheritdoc - */ - get baseCrudPath(): string; - /** - * Imports the provided collections. - * - * If `deleteMissing` is `true`, all local collections and their fields, - * that are not present in the imported configuration, WILL BE DELETED - * (including their related records data)! - * - * @throws {ClientResponseError} - */ - import(collections: Array, deleteMissing?: boolean, options?: CommonOptions): Promise; - /** - * Returns type indexed map with scaffolded collection models - * populated with their default field values. - * - * @throws {ClientResponseError} - */ - getScaffolds(options?: CommonOptions): Promise<{ - [key: string]: CollectionModel; - }>; - /** - * Deletes all records associated with the specified collection. - * - * @throws {ClientResponseError} - */ - truncate(collectionIdOrName: string, options?: CommonOptions): Promise; -} -interface HourlyStats { - total: number; - date: string; -} -declare class LogService extends BaseService { - /** - * Returns paginated logs list. - * - * @throws {ClientResponseError} - */ - getList(page?: number, perPage?: number, options?: ListOptions): Promise>; - /** - * Returns a single log by its id. - * - * If `id` is empty it will throw a 404 error. - * - * @throws {ClientResponseError} - */ - getOne(id: string, options?: CommonOptions): Promise; - /** - * Returns logs statistics. - * - * @throws {ClientResponseError} - */ - getStats(options?: LogStatsOptions): Promise>; -} -interface HealthCheckResponse { - code: number; - message: string; - data: { - [key: string]: any; - }; -} -declare class HealthService extends BaseService { - /** - * Checks the health status of the api. - * - * @throws {ClientResponseError} - */ - check(options?: CommonOptions): Promise; -} -declare class FileService extends BaseService { - /** - * @deprecated Please replace with `pb.files.getURL()`. - */ - getUrl(record: { - [key: string]: any; - }, filename: string, queryParams?: FileOptions): string; - /** - * Builds and returns an absolute record file url for the provided filename. - */ - getURL(record: { - [key: string]: any; - }, filename: string, queryParams?: FileOptions): string; - /** - * Requests a new private file access token for the current auth model. - * - * @throws {ClientResponseError} - */ - getToken(options?: CommonOptions): Promise; -} -interface BackupFileInfo { - key: string; - size: number; - modified: string; -} -declare class BackupService extends BaseService { - /** - * Returns list with all available backup files. - * - * @throws {ClientResponseError} - */ - getFullList(options?: CommonOptions): Promise>; - /** - * Initializes a new backup. - * - * @throws {ClientResponseError} - */ - create(basename: string, options?: CommonOptions): Promise; - /** - * Uploads an existing backup file. - * - * Example: - * - * ```js - * await pb.backups.upload({ - * file: new Blob([...]), - * }); - * ``` - * - * @throws {ClientResponseError} - */ - upload(bodyParams: { - [key: string]: any; - } | FormData, options?: CommonOptions): Promise; - /** - * Deletes a single backup file. - * - * @throws {ClientResponseError} - */ - delete(key: string, options?: CommonOptions): Promise; - /** - * Initializes an app data restore from an existing backup. - * - * @throws {ClientResponseError} - */ - restore(key: string, options?: CommonOptions): Promise; - /** - * @deprecated Please use `getDownloadURL()`. - */ - getDownloadUrl(token: string, key: string): string; - /** - * Builds a download url for a single existing backup using a - * superuser file token and the backup file key. - * - * The file token can be generated via `pb.files.getToken()`. - */ - getDownloadURL(token: string, key: string): string; -} -interface CronJob { - id: string; - expression: string; -} -declare class CronService extends BaseService { - /** - * Returns list with all registered cron jobs. - * - * @throws {ClientResponseError} - */ - getFullList(options?: CommonOptions): Promise>; - /** - * Runs the specified cron job. - * - * @throws {ClientResponseError} - */ - run(jobId: string, options?: CommonOptions): Promise; -} -interface BatchRequest { - method: string; - url: string; - json?: { - [key: string]: any; - }; - files?: { - [key: string]: Array; - }; - headers?: { - [key: string]: string; - }; -} -interface BatchRequestResult { - status: number; - body: any; -} -declare class BatchService extends BaseService { - private requests; - private subs; - /** - * Starts constructing a batch request entry for the specified collection. - */ - collection(collectionIdOrName: string): SubBatchService; - /** - * Sends the batch requests. - * - * @throws {ClientResponseError} - */ - send(options?: SendOptions): Promise>; -} -declare class SubBatchService { - private requests; - private readonly collectionIdOrName; - constructor(requests: Array, collectionIdOrName: string); - /** - * Registers a record upsert request into the current batch queue. - * - * The request will be executed as update if `bodyParams` have a valid existing record `id` value, otherwise - create. - */ - upsert(bodyParams?: { - [key: string]: any; - } | FormData, options?: RecordOptions): void; - /** - * Registers a record create request into the current batch queue. - */ - create(bodyParams?: { - [key: string]: any; - } | FormData, options?: RecordOptions): void; - /** - * Registers a record update request into the current batch queue. - */ - update(id: string, bodyParams?: { - [key: string]: any; - } | FormData, options?: RecordOptions): void; - /** - * Registers a record delete request into the current batch queue. - */ - delete(id: string, options?: SendOptions): void; - private prepareRequest; -} -interface BeforeSendResult { - [key: string]: any; - url?: string; - options?: { - [key: string]: any; - }; -} -/** - * PocketBase JS Client. - */ -declare class Client { - /** - * The base PocketBase backend url address (eg. 'http://127.0.0.1.8090'). - */ - baseURL: string; - /** - * Legacy getter alias for baseURL. - * @deprecated Please replace with baseURL. - */ - get baseUrl(): string; - /** - * Legacy setter alias for baseURL. - * @deprecated Please replace with baseURL. - */ - set baseUrl(v: string); - /** - * Hook that get triggered right before sending the fetch request, - * allowing you to inspect and modify the url and request options. - * - * For list of the possible options check https://developer.mozilla.org/en-US/docs/Web/API/fetch#options - * - * You can return a non-empty result object `{ url, options }` to replace the url and request options entirely. - * - * Example: - * ```js - * const pb = new PocketBase("https://example.com") - * - * pb.beforeSend = function (url, options) { - * options.headers = Object.assign({}, options.headers, { - * 'X-Custom-Header': 'example', - * }) - * - * return { url, options } - * } - * - * // use the created client as usual... - * ``` - */ - beforeSend?: (url: string, options: SendOptions) => BeforeSendResult | Promise; - /** - * Hook that get triggered after successfully sending the fetch request, - * allowing you to inspect/modify the response object and its parsed data. - * - * Returns the new Promise resolved `data` that will be returned to the client. - * - * Example: - * ```js - * const pb = new PocketBase("https://example.com") - * - * pb.afterSend = function (response, data, options) { - * if (response.status != 200) { - * throw new ClientResponseError({ - * url: response.url, - * status: response.status, - * response: { ... }, - * }) - * } - * - * return data; - * } - * - * // use the created client as usual... - * ``` - */ - afterSend?: ((response: Response, data: any) => any) & ((response: Response, data: any, options: SendOptions) => any); - /** - * Optional language code (default to `en-US`) that will be sent - * with the requests to the server as `Accept-Language` header. - */ - lang: string; - /** - * A replaceable instance of the local auth store service. - */ - authStore: BaseAuthStore; - /** - * An instance of the service that handles the **Settings APIs**. - */ - readonly settings: SettingsService; - /** - * An instance of the service that handles the **Collection APIs**. - */ - readonly collections: CollectionService; - /** - * An instance of the service that handles the **File APIs**. - */ - readonly files: FileService; - /** - * An instance of the service that handles the **Log APIs**. - */ - readonly logs: LogService; - /** - * An instance of the service that handles the **Realtime APIs**. - */ - readonly realtime: RealtimeService; - /** - * An instance of the service that handles the **Health APIs**. - */ - readonly health: HealthService; - /** - * An instance of the service that handles the **Backup APIs**. - */ - readonly backups: BackupService; - /** - * An instance of the service that handles the **Cron APIs**. - */ - readonly crons: CronService; - private cancelControllers; - private recordServices; - private enableAutoCancellation; - constructor(baseURL?: string, authStore?: BaseAuthStore | null, lang?: string); - /** - * @deprecated - * With PocketBase v0.23.0 admins are converted to a regular auth - * collection named "_superusers", aka. you can use directly collection("_superusers"). - */ - get admins(): RecordService; - /** - * Creates a new batch handler for sending multiple transactional - * create/update/upsert/delete collection requests in one network call. - * - * Example: - * ```js - * const batch = pb.createBatch(); - * - * batch.collection("example1").create({ ... }) - * batch.collection("example2").update("RECORD_ID", { ... }) - * batch.collection("example3").delete("RECORD_ID") - * batch.collection("example4").upsert({ ... }) - * - * await batch.send() - * ``` - */ - /** - * Creates a new batch handler for sending multiple transactional - * create/update/upsert/delete collection requests in one network call. - * - * Example: - * ```js - * const batch = pb.createBatch(); - * - * batch.collection("example1").create({ ... }) - * batch.collection("example2").update("RECORD_ID", { ... }) - * batch.collection("example3").delete("RECORD_ID") - * batch.collection("example4").upsert({ ... }) - * - * await batch.send() - * ``` - */ - createBatch(): BatchService; - /** - * Returns the RecordService associated to the specified collection. - */ - /** - * Returns the RecordService associated to the specified collection. - */ - collection(idOrName: string): RecordService; - /** - * Globally enable or disable auto cancellation for pending duplicated requests. - */ - /** - * Globally enable or disable auto cancellation for pending duplicated requests. - */ - autoCancellation(enable: boolean): Client; - /** - * Cancels single request by its cancellation key. - */ - /** - * Cancels single request by its cancellation key. - */ - cancelRequest(requestKey: string): Client; - /** - * Cancels all pending requests. - */ - /** - * Cancels all pending requests. - */ - cancelAllRequests(): Client; - /** - * Constructs a filter expression with placeholders populated from a parameters object. - * - * Placeholder parameters are defined with the `{:paramName}` notation. - * - * The following parameter values are supported: - * - * - `string` (_single quotes are autoescaped_) - * - `number` - * - `boolean` - * - `Date` object (_stringified into the PocketBase datetime format_) - * - `null` - * - everything else is converted to a string using `JSON.stringify()` - * - * Example: - * - * ```js - * pb.collection("example").getFirstListItem(pb.filter( - * 'title ~ {:title} && created >= {:created}', - * { title: "example", created: new Date()} - * )) - * ``` - */ - /** - * Constructs a filter expression with placeholders populated from a parameters object. - * - * Placeholder parameters are defined with the `{:paramName}` notation. - * - * The following parameter values are supported: - * - * - `string` (_single quotes are autoescaped_) - * - `number` - * - `boolean` - * - `Date` object (_stringified into the PocketBase datetime format_) - * - `null` - * - everything else is converted to a string using `JSON.stringify()` - * - * Example: - * - * ```js - * pb.collection("example").getFirstListItem(pb.filter( - * 'title ~ {:title} && created >= {:created}', - * { title: "example", created: new Date()} - * )) - * ``` - */ - filter(raw: string, params?: { - [key: string]: any; - }): string; - /** - * @deprecated Please use `pb.files.getURL()`. - */ - /** - * @deprecated Please use `pb.files.getURL()`. - */ - getFileUrl(record: { - [key: string]: any; - }, filename: string, queryParams?: FileOptions): string; - /** - * @deprecated Please use `pb.buildURL()`. - */ - /** - * @deprecated Please use `pb.buildURL()`. - */ - buildUrl(path: string): string; - /** - * Builds a full client url by safely concatenating the provided path. - */ - /** - * Builds a full client url by safely concatenating the provided path. - */ - buildURL(path: string): string; - /** - * Sends an api http request. - * - * @throws {ClientResponseError} - */ - /** - * Sends an api http request. - * - * @throws {ClientResponseError} - */ - send(path: string, options: SendOptions): Promise; - /** - * Shallow copy the provided object and takes care to initialize - * any options required to preserve the backward compatability. - * - * @param {SendOptions} options - * @return {SendOptions} - */ - /** - * Shallow copy the provided object and takes care to initialize - * any options required to preserve the backward compatability. - * - * @param {SendOptions} options - * @return {SendOptions} - */ - private initSendOptions; - /** - * Extracts the header with the provided name in case-insensitive manner. - * Returns `null` if no header matching the name is found. - */ - /** - * Extracts the header with the provided name in case-insensitive manner. - * Returns `null` if no header matching the name is found. - */ - private getHeader; -} -export { BeforeSendResult, Client as default }; diff --git a/PBandGraphScaffold/node_modules/pocketbase/dist/pocketbase.cjs.js b/PBandGraphScaffold/node_modules/pocketbase/dist/pocketbase.cjs.js deleted file mode 100644 index 94e40f8..0000000 --- a/PBandGraphScaffold/node_modules/pocketbase/dist/pocketbase.cjs.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict";class ClientResponseError extends Error{constructor(e){super("ClientResponseError"),this.url="",this.status=0,this.response={},this.isAbort=!1,this.originalError=null,Object.setPrototypeOf(this,ClientResponseError.prototype),null!==e&&"object"==typeof e&&(this.url="string"==typeof e.url?e.url:"",this.status="number"==typeof e.status?e.status:0,this.isAbort=!!e.isAbort,this.originalError=e.originalError,null!==e.response&&"object"==typeof e.response?this.response=e.response:null!==e.data&&"object"==typeof e.data?this.response=e.data:this.response={}),this.originalError||e instanceof ClientResponseError||(this.originalError=e),"undefined"!=typeof DOMException&&e instanceof DOMException&&("AbortError"==e.name||20==e.code)&&(this.isAbort=!0),this.name="ClientResponseError "+this.status,this.message=this.response?.message,this.message||(this.isAbort?this.message="The request was autocancelled. You can find more info in https://github.com/pocketbase/js-sdk#auto-cancellation.":this.originalError?.cause?.message?.includes("ECONNREFUSED ::1")?this.message="Failed to connect to the PocketBase server. Try changing the SDK URL from localhost to 127.0.0.1 (https://github.com/pocketbase/js-sdk/issues/21).":this.message="Something went wrong."),this.cause=this.originalError}get data(){return this.response}toJSON(){return{...this}}}const e=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function cookieSerialize(t,s,i){const n=Object.assign({},i||{}),r=n.encode||defaultEncode;if(!e.test(t))throw new TypeError("argument name is invalid");const o=r(s);if(o&&!e.test(o))throw new TypeError("argument val is invalid");let a=t+"="+o;if(null!=n.maxAge){const e=n.maxAge-0;if(isNaN(e)||!isFinite(e))throw new TypeError("option maxAge is invalid");a+="; Max-Age="+Math.floor(e)}if(n.domain){if(!e.test(n.domain))throw new TypeError("option domain is invalid");a+="; Domain="+n.domain}if(n.path){if(!e.test(n.path))throw new TypeError("option path is invalid");a+="; Path="+n.path}if(n.expires){if(!function isDate(e){return"[object Date]"===Object.prototype.toString.call(e)||e instanceof Date}(n.expires)||isNaN(n.expires.valueOf()))throw new TypeError("option expires is invalid");a+="; Expires="+n.expires.toUTCString()}if(n.httpOnly&&(a+="; HttpOnly"),n.secure&&(a+="; Secure"),n.priority){switch("string"==typeof n.priority?n.priority.toLowerCase():n.priority){case"low":a+="; Priority=Low";break;case"medium":a+="; Priority=Medium";break;case"high":a+="; Priority=High";break;default:throw new TypeError("option priority is invalid")}}if(n.sameSite){switch("string"==typeof n.sameSite?n.sameSite.toLowerCase():n.sameSite){case!0:a+="; SameSite=Strict";break;case"lax":a+="; SameSite=Lax";break;case"strict":a+="; SameSite=Strict";break;case"none":a+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return a}function defaultDecode(e){return-1!==e.indexOf("%")?decodeURIComponent(e):e}function defaultEncode(e){return encodeURIComponent(e)}const t="undefined"!=typeof navigator&&"ReactNative"===navigator.product||"undefined"!=typeof global&&global.HermesInternal;let s;function getTokenPayload(e){if(e)try{const t=decodeURIComponent(s(e.split(".")[1]).split("").map((function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)})).join(""));return JSON.parse(t)||{}}catch(e){}return{}}function isTokenExpired(e,t=0){let s=getTokenPayload(e);return!(Object.keys(s).length>0&&(!s.exp||s.exp-t>Date.now()/1e3))}s="function"!=typeof atob||t?e=>{let t=String(e).replace(/=+$/,"");if(t.length%4==1)throw new Error("'atob' failed: The string to be decoded is not correctly encoded.");for(var s,i,n=0,r=0,o="";i=t.charAt(r++);~i&&(s=n%4?64*s+i:i,n++%4)?o+=String.fromCharCode(255&s>>(-2*n&6)):0)i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(i);return o}:atob;const i="pb_auth";class BaseAuthStore{constructor(){this.baseToken="",this.baseModel=null,this._onChangeCallbacks=[]}get token(){return this.baseToken}get record(){return this.baseModel}get model(){return this.baseModel}get isValid(){return!isTokenExpired(this.token)}get isSuperuser(){let e=getTokenPayload(this.token);return"auth"==e.type&&("_superusers"==this.record?.collectionName||!this.record?.collectionName&&"pbc_3142635823"==e.collectionId)}get isAdmin(){return console.warn("Please replace pb.authStore.isAdmin with pb.authStore.isSuperuser OR simply check the value of pb.authStore.record?.collectionName"),this.isSuperuser}get isAuthRecord(){return console.warn("Please replace pb.authStore.isAuthRecord with !pb.authStore.isSuperuser OR simply check the value of pb.authStore.record?.collectionName"),"auth"==getTokenPayload(this.token).type&&!this.isSuperuser}save(e,t){this.baseToken=e||"",this.baseModel=t||null,this.triggerChange()}clear(){this.baseToken="",this.baseModel=null,this.triggerChange()}loadFromCookie(e,t=i){const s=function cookieParse(e,t){const s={};if("string"!=typeof e)return s;const i=Object.assign({},{}).decode||defaultDecode;let n=0;for(;n4096){r.record={id:r.record?.id,email:r.record?.email};const s=["collectionId","collectionName","verified"];for(const e in this.record)s.includes(e)&&(r.record[e]=this.record[e]);o=cookieSerialize(t,JSON.stringify(r),e)}return o}onChange(e,t=!1){return this._onChangeCallbacks.push(e),t&&e(this.token,this.record),()=>{for(let t=this._onChangeCallbacks.length-1;t>=0;t--)if(this._onChangeCallbacks[t]==e)return delete this._onChangeCallbacks[t],void this._onChangeCallbacks.splice(t,1)}}triggerChange(){for(const e of this._onChangeCallbacks)e&&e(this.token,this.record)}}class LocalAuthStore extends BaseAuthStore{constructor(e="pocketbase_auth"){super(),this.storageFallback={},this.storageKey=e,this._bindStorageEvent()}get token(){return(this._storageGet(this.storageKey)||{}).token||""}get record(){const e=this._storageGet(this.storageKey)||{};return e.record||e.model||null}get model(){return this.record}save(e,t){this._storageSet(this.storageKey,{token:e,record:t}),super.save(e,t)}clear(){this._storageRemove(this.storageKey),super.clear()}_storageGet(e){if("undefined"!=typeof window&&window?.localStorage){const t=window.localStorage.getItem(e)||"";try{return JSON.parse(t)}catch(e){return t}}return this.storageFallback[e]}_storageSet(e,t){if("undefined"!=typeof window&&window?.localStorage){let s=t;"string"!=typeof t&&(s=JSON.stringify(t)),window.localStorage.setItem(e,s)}else this.storageFallback[e]=t}_storageRemove(e){"undefined"!=typeof window&&window?.localStorage&&window.localStorage?.removeItem(e),delete this.storageFallback[e]}_bindStorageEvent(){"undefined"!=typeof window&&window?.localStorage&&window.addEventListener&&window.addEventListener("storage",(e=>{if(e.key!=this.storageKey)return;const t=this._storageGet(this.storageKey)||{};super.save(t.token||"",t.record||t.model||null)}))}}class BaseService{constructor(e){this.client=e}}class SettingsService extends BaseService{async getAll(e){return e=Object.assign({method:"GET"},e),this.client.send("/api/settings",e)}async update(e,t){return t=Object.assign({method:"PATCH",body:e},t),this.client.send("/api/settings",t)}async testS3(e="storage",t){return t=Object.assign({method:"POST",body:{filesystem:e}},t),this.client.send("/api/settings/test/s3",t).then((()=>!0))}async testEmail(e,t,s,i){return i=Object.assign({method:"POST",body:{email:t,template:s,collection:e}},i),this.client.send("/api/settings/test/email",i).then((()=>!0))}async generateAppleClientSecret(e,t,s,i,n,r){return r=Object.assign({method:"POST",body:{clientId:e,teamId:t,keyId:s,privateKey:i,duration:n}},r),this.client.send("/api/settings/apple/generate-client-secret",r)}}const n=["requestKey","$cancelKey","$autoCancel","fetch","headers","body","query","params","cache","credentials","headers","integrity","keepalive","method","mode","redirect","referrer","referrerPolicy","signal","window"];function normalizeUnknownQueryParams(e){if(e){e.query=e.query||{};for(let t in e)n.includes(t)||(e.query[t]=e[t],delete e[t])}}function serializeQueryParams(e){const t=[];for(const s in e){const i=encodeURIComponent(s),n=Array.isArray(e[s])?e[s]:[e[s]];for(let e of n)e=prepareQueryParamValue(e),null!==e&&t.push(i+"="+e)}return t.join("&")}function prepareQueryParamValue(e){return null==e?null:e instanceof Date?encodeURIComponent(e.toISOString().replace("T"," ")):"object"==typeof e?encodeURIComponent(JSON.stringify(e)):encodeURIComponent(e)}class RealtimeService extends BaseService{constructor(){super(...arguments),this.clientId="",this.eventSource=null,this.subscriptions={},this.lastSentSubscriptions=[],this.maxConnectTimeout=15e3,this.reconnectAttempts=0,this.maxReconnectAttempts=1/0,this.predefinedReconnectIntervals=[200,300,500,1e3,1200,1500,2e3],this.pendingConnects=[]}get isConnected(){return!!this.eventSource&&!!this.clientId&&!this.pendingConnects.length}async subscribe(e,t,s){if(!e)throw new Error("topic must be set.");let i=e;if(s){normalizeUnknownQueryParams(s=Object.assign({},s));const e="options="+encodeURIComponent(JSON.stringify({query:s.query,headers:s.headers}));i+=(i.includes("?")?"&":"?")+e}const listener=function(e){const s=e;let i;try{i=JSON.parse(s?.data)}catch{}t(i||{})};return this.subscriptions[i]||(this.subscriptions[i]=[]),this.subscriptions[i].push(listener),this.isConnected?1===this.subscriptions[i].length?await this.submitSubscriptions():this.eventSource?.addEventListener(i,listener):await this.connect(),async()=>this.unsubscribeByTopicAndListener(e,listener)}async unsubscribe(e){let t=!1;if(e){const s=this.getSubscriptionsByTopic(e);for(let e in s)if(this.hasSubscriptionListeners(e)){for(let t of this.subscriptions[e])this.eventSource?.removeEventListener(e,t);delete this.subscriptions[e],t||(t=!0)}}else this.subscriptions={};this.hasSubscriptionListeners()?t&&await this.submitSubscriptions():this.disconnect()}async unsubscribeByPrefix(e){let t=!1;for(let s in this.subscriptions)if((s+"?").startsWith(e)){t=!0;for(let e of this.subscriptions[s])this.eventSource?.removeEventListener(s,e);delete this.subscriptions[s]}t&&(this.hasSubscriptionListeners()?await this.submitSubscriptions():this.disconnect())}async unsubscribeByTopicAndListener(e,t){let s=!1;const i=this.getSubscriptionsByTopic(e);for(let e in i){if(!Array.isArray(this.subscriptions[e])||!this.subscriptions[e].length)continue;let i=!1;for(let s=this.subscriptions[e].length-1;s>=0;s--)this.subscriptions[e][s]===t&&(i=!0,delete this.subscriptions[e][s],this.subscriptions[e].splice(s,1),this.eventSource?.removeEventListener(e,t));i&&(this.subscriptions[e].length||delete this.subscriptions[e],s||this.hasSubscriptionListeners(e)||(s=!0))}this.hasSubscriptionListeners()?s&&await this.submitSubscriptions():this.disconnect()}hasSubscriptionListeners(e){if(this.subscriptions=this.subscriptions||{},e)return!!this.subscriptions[e]?.length;for(let e in this.subscriptions)if(this.subscriptions[e]?.length)return!0;return!1}async submitSubscriptions(){if(this.clientId)return this.addAllSubscriptionListeners(),this.lastSentSubscriptions=this.getNonEmptySubscriptionKeys(),this.client.send("/api/realtime",{method:"POST",body:{clientId:this.clientId,subscriptions:this.lastSentSubscriptions},requestKey:this.getSubscriptionsCancelKey()}).catch((e=>{if(!e?.isAbort)throw e}))}getSubscriptionsCancelKey(){return"realtime_"+this.clientId}getSubscriptionsByTopic(e){const t={};e=e.includes("?")?e:e+"?";for(let s in this.subscriptions)(s+"?").startsWith(e)&&(t[s]=this.subscriptions[s]);return t}getNonEmptySubscriptionKeys(){const e=[];for(let t in this.subscriptions)this.subscriptions[t].length&&e.push(t);return e}addAllSubscriptionListeners(){if(this.eventSource){this.removeAllSubscriptionListeners();for(let e in this.subscriptions)for(let t of this.subscriptions[e])this.eventSource.addEventListener(e,t)}}removeAllSubscriptionListeners(){if(this.eventSource)for(let e in this.subscriptions)for(let t of this.subscriptions[e])this.eventSource.removeEventListener(e,t)}async connect(){if(!(this.reconnectAttempts>0))return new Promise(((e,t)=>{this.pendingConnects.push({resolve:e,reject:t}),this.pendingConnects.length>1||this.initConnect()}))}initConnect(){this.disconnect(!0),clearTimeout(this.connectTimeoutId),this.connectTimeoutId=setTimeout((()=>{this.connectErrorHandler(new Error("EventSource connect took too long."))}),this.maxConnectTimeout),this.eventSource=new EventSource(this.client.buildURL("/api/realtime")),this.eventSource.onerror=e=>{this.connectErrorHandler(new Error("Failed to establish realtime connection."))},this.eventSource.addEventListener("PB_CONNECT",(e=>{const t=e;this.clientId=t?.lastEventId,this.submitSubscriptions().then((async()=>{let e=3;for(;this.hasUnsentSubscriptions()&&e>0;)e--,await this.submitSubscriptions()})).then((()=>{for(let e of this.pendingConnects)e.resolve();this.pendingConnects=[],this.reconnectAttempts=0,clearTimeout(this.reconnectTimeoutId),clearTimeout(this.connectTimeoutId);const t=this.getSubscriptionsByTopic("PB_CONNECT");for(let s in t)for(let i of t[s])i(e)})).catch((e=>{this.clientId="",this.connectErrorHandler(e)}))}))}hasUnsentSubscriptions(){const e=this.getNonEmptySubscriptionKeys();if(e.length!=this.lastSentSubscriptions.length)return!0;for(const t of e)if(!this.lastSentSubscriptions.includes(t))return!0;return!1}connectErrorHandler(e){if(clearTimeout(this.connectTimeoutId),clearTimeout(this.reconnectTimeoutId),!this.clientId&&!this.reconnectAttempts||this.reconnectAttempts>this.maxReconnectAttempts){for(let t of this.pendingConnects)t.reject(new ClientResponseError(e));return this.pendingConnects=[],void this.disconnect()}this.disconnect(!0);const t=this.predefinedReconnectIntervals[this.reconnectAttempts]||this.predefinedReconnectIntervals[this.predefinedReconnectIntervals.length-1];this.reconnectAttempts++,this.reconnectTimeoutId=setTimeout((()=>{this.initConnect()}),t)}disconnect(e=!1){if(this.clientId&&this.onDisconnect&&this.onDisconnect(Object.keys(this.subscriptions)),clearTimeout(this.connectTimeoutId),clearTimeout(this.reconnectTimeoutId),this.removeAllSubscriptionListeners(),this.client.cancelRequest(this.getSubscriptionsCancelKey()),this.eventSource?.close(),this.eventSource=null,this.clientId="",!e){this.reconnectAttempts=0;for(let e of this.pendingConnects)e.resolve();this.pendingConnects=[]}}}class CrudService extends BaseService{decode(e){return e}async getFullList(e,t){if("number"==typeof e)return this._getFullList(e,t);let s=500;return(t=Object.assign({},e,t)).batch&&(s=t.batch,delete t.batch),this._getFullList(s,t)}async getList(e=1,t=30,s){return(s=Object.assign({method:"GET"},s)).query=Object.assign({page:e,perPage:t},s.query),this.client.send(this.baseCrudPath,s).then((e=>(e.items=e.items?.map((e=>this.decode(e)))||[],e)))}async getFirstListItem(e,t){return(t=Object.assign({requestKey:"one_by_filter_"+this.baseCrudPath+"_"+e},t)).query=Object.assign({filter:e,skipTotal:1},t.query),this.getList(1,1,t).then((e=>{if(!e?.items?.length)throw new ClientResponseError({status:404,response:{code:404,message:"The requested resource wasn't found.",data:{}}});return e.items[0]}))}async getOne(e,t){if(!e)throw new ClientResponseError({url:this.client.buildURL(this.baseCrudPath+"/"),status:404,response:{code:404,message:"Missing required record id.",data:{}}});return t=Object.assign({method:"GET"},t),this.client.send(this.baseCrudPath+"/"+encodeURIComponent(e),t).then((e=>this.decode(e)))}async create(e,t){return t=Object.assign({method:"POST",body:e},t),this.client.send(this.baseCrudPath,t).then((e=>this.decode(e)))}async update(e,t,s){return s=Object.assign({method:"PATCH",body:t},s),this.client.send(this.baseCrudPath+"/"+encodeURIComponent(e),s).then((e=>this.decode(e)))}async delete(e,t){return t=Object.assign({method:"DELETE"},t),this.client.send(this.baseCrudPath+"/"+encodeURIComponent(e),t).then((()=>!0))}_getFullList(e=500,t){(t=t||{}).query=Object.assign({skipTotal:1},t.query);let s=[],request=async i=>this.getList(i,e||500,t).then((e=>{const t=e.items;return s=s.concat(t),t.length==e.perPage?request(i+1):s}));return request(1)}}function normalizeLegacyOptionsArgs(e,t,s,i){const n=void 0!==i;return n||void 0!==s?n?(console.warn(e),t.body=Object.assign({},t.body,s),t.query=Object.assign({},t.query,i),t):Object.assign(t,s):t}function resetAutoRefresh(e){e._resetAutoRefresh?.()}class RecordService extends CrudService{constructor(e,t){super(e),this.collectionIdOrName=t}get baseCrudPath(){return this.baseCollectionPath+"/records"}get baseCollectionPath(){return"/api/collections/"+encodeURIComponent(this.collectionIdOrName)}get isSuperusers(){return"_superusers"==this.collectionIdOrName||"_pbc_2773867675"==this.collectionIdOrName}async subscribe(e,t,s){if(!e)throw new Error("Missing topic.");if(!t)throw new Error("Missing subscription callback.");return this.client.realtime.subscribe(this.collectionIdOrName+"/"+e,t,s)}async unsubscribe(e){return e?this.client.realtime.unsubscribe(this.collectionIdOrName+"/"+e):this.client.realtime.unsubscribeByPrefix(this.collectionIdOrName)}async getFullList(e,t){if("number"==typeof e)return super.getFullList(e,t);const s=Object.assign({},e,t);return super.getFullList(s)}async getList(e=1,t=30,s){return super.getList(e,t,s)}async getFirstListItem(e,t){return super.getFirstListItem(e,t)}async getOne(e,t){return super.getOne(e,t)}async create(e,t){return super.create(e,t)}async update(e,t,s){return super.update(e,t,s).then((e=>{if(this.client.authStore.record?.id===e?.id&&(this.client.authStore.record?.collectionId===this.collectionIdOrName||this.client.authStore.record?.collectionName===this.collectionIdOrName)){let t=Object.assign({},this.client.authStore.record.expand),s=Object.assign({},this.client.authStore.record,e);t&&(s.expand=Object.assign(t,e.expand)),this.client.authStore.save(this.client.authStore.token,s)}return e}))}async delete(e,t){return super.delete(e,t).then((t=>(!t||this.client.authStore.record?.id!==e||this.client.authStore.record?.collectionId!==this.collectionIdOrName&&this.client.authStore.record?.collectionName!==this.collectionIdOrName||this.client.authStore.clear(),t)))}authResponse(e){const t=this.decode(e?.record||{});return this.client.authStore.save(e?.token,t),Object.assign({},e,{token:e?.token||"",record:t})}async listAuthMethods(e){return e=Object.assign({method:"GET",fields:"mfa,otp,password,oauth2"},e),this.client.send(this.baseCollectionPath+"/auth-methods",e)}async authWithPassword(e,t,s){let i;s=Object.assign({method:"POST",body:{identity:e,password:t}},s),this.isSuperusers&&(i=s.autoRefreshThreshold,delete s.autoRefreshThreshold,s.autoRefresh||resetAutoRefresh(this.client));let n=await this.client.send(this.baseCollectionPath+"/auth-with-password",s);return n=this.authResponse(n),i&&this.isSuperusers&&function registerAutoRefresh(e,t,s,i){resetAutoRefresh(e);const n=e.beforeSend,r=e.authStore.record,o=e.authStore.onChange(((t,s)=>{(!t||s?.id!=r?.id||(s?.collectionId||r?.collectionId)&&s?.collectionId!=r?.collectionId)&&resetAutoRefresh(e)}));e._resetAutoRefresh=function(){o(),e.beforeSend=n,delete e._resetAutoRefresh},e.beforeSend=async(r,o)=>{const a=e.authStore.token;if(o.query?.autoRefresh)return n?n(r,o):{url:r,sendOptions:o};let c=e.authStore.isValid;if(c&&isTokenExpired(e.authStore.token,t))try{await s()}catch(e){c=!1}c||await i();const l=o.headers||{};for(let t in l)if("authorization"==t.toLowerCase()&&a==l[t]&&e.authStore.token){l[t]=e.authStore.token;break}return o.headers=l,n?n(r,o):{url:r,sendOptions:o}}}(this.client,i,(()=>this.authRefresh({autoRefresh:!0})),(()=>this.authWithPassword(e,t,Object.assign({autoRefresh:!0},s)))),n}async authWithOAuth2Code(e,t,s,i,n,r,o){let a={method:"POST",body:{provider:e,code:t,codeVerifier:s,redirectURL:i,createData:n}};return a=normalizeLegacyOptionsArgs("This form of authWithOAuth2Code(provider, code, codeVerifier, redirectURL, createData?, body?, query?) is deprecated. Consider replacing it with authWithOAuth2Code(provider, code, codeVerifier, redirectURL, createData?, options?).",a,r,o),this.client.send(this.baseCollectionPath+"/auth-with-oauth2",a).then((e=>this.authResponse(e)))}authWithOAuth2(...e){if(e.length>1||"string"==typeof e?.[0])return console.warn("PocketBase: This form of authWithOAuth2() is deprecated and may get removed in the future. Please replace with authWithOAuth2Code() OR use the authWithOAuth2() realtime form as shown in https://pocketbase.io/docs/authentication/#oauth2-integration."),this.authWithOAuth2Code(e?.[0]||"",e?.[1]||"",e?.[2]||"",e?.[3]||"",e?.[4]||{},e?.[5]||{},e?.[6]||{});const t=e?.[0]||{};let s=null;t.urlCallback||(s=openBrowserPopup(void 0));const i=new RealtimeService(this.client);function cleanup(){s?.close(),i.unsubscribe()}const n={},r=t.requestKey;return r&&(n.requestKey=r),this.listAuthMethods(n).then((e=>{const n=e.oauth2.providers.find((e=>e.name===t.provider));if(!n)throw new ClientResponseError(new Error(`Missing or invalid provider "${t.provider}".`));const o=this.client.buildURL("/api/oauth2-redirect"),a=r?this.client.cancelControllers?.[r]:void 0;return a&&(a.signal.onabort=()=>{cleanup()}),new Promise((async(e,r)=>{try{await i.subscribe("@oauth2",(async s=>{const c=i.clientId;try{if(!s.state||c!==s.state)throw new Error("State parameters don't match.");if(s.error||!s.code)throw new Error("OAuth2 redirect error or missing code: "+s.error);const i=Object.assign({},t);delete i.provider,delete i.scopes,delete i.createData,delete i.urlCallback,a?.signal?.onabort&&(a.signal.onabort=null);const r=await this.authWithOAuth2Code(n.name,s.code,n.codeVerifier,o,t.createData,i);e(r)}catch(e){r(new ClientResponseError(e))}cleanup()}));const c={state:i.clientId};t.scopes?.length&&(c.scope=t.scopes.join(" "));const l=this._replaceQueryParams(n.authURL+o,c);let h=t.urlCallback||function(e){s?s.location.href=e:s=openBrowserPopup(e)};await h(l)}catch(e){cleanup(),r(new ClientResponseError(e))}}))})).catch((e=>{throw cleanup(),e}))}async authRefresh(e,t){let s={method:"POST"};return s=normalizeLegacyOptionsArgs("This form of authRefresh(body?, query?) is deprecated. Consider replacing it with authRefresh(options?).",s,e,t),this.client.send(this.baseCollectionPath+"/auth-refresh",s).then((e=>this.authResponse(e)))}async requestPasswordReset(e,t,s){let i={method:"POST",body:{email:e}};return i=normalizeLegacyOptionsArgs("This form of requestPasswordReset(email, body?, query?) is deprecated. Consider replacing it with requestPasswordReset(email, options?).",i,t,s),this.client.send(this.baseCollectionPath+"/request-password-reset",i).then((()=>!0))}async confirmPasswordReset(e,t,s,i,n){let r={method:"POST",body:{token:e,password:t,passwordConfirm:s}};return r=normalizeLegacyOptionsArgs("This form of confirmPasswordReset(token, password, passwordConfirm, body?, query?) is deprecated. Consider replacing it with confirmPasswordReset(token, password, passwordConfirm, options?).",r,i,n),this.client.send(this.baseCollectionPath+"/confirm-password-reset",r).then((()=>!0))}async requestVerification(e,t,s){let i={method:"POST",body:{email:e}};return i=normalizeLegacyOptionsArgs("This form of requestVerification(email, body?, query?) is deprecated. Consider replacing it with requestVerification(email, options?).",i,t,s),this.client.send(this.baseCollectionPath+"/request-verification",i).then((()=>!0))}async confirmVerification(e,t,s){let i={method:"POST",body:{token:e}};return i=normalizeLegacyOptionsArgs("This form of confirmVerification(token, body?, query?) is deprecated. Consider replacing it with confirmVerification(token, options?).",i,t,s),this.client.send(this.baseCollectionPath+"/confirm-verification",i).then((()=>{const t=getTokenPayload(e),s=this.client.authStore.record;return s&&!s.verified&&s.id===t.id&&s.collectionId===t.collectionId&&(s.verified=!0,this.client.authStore.save(this.client.authStore.token,s)),!0}))}async requestEmailChange(e,t,s){let i={method:"POST",body:{newEmail:e}};return i=normalizeLegacyOptionsArgs("This form of requestEmailChange(newEmail, body?, query?) is deprecated. Consider replacing it with requestEmailChange(newEmail, options?).",i,t,s),this.client.send(this.baseCollectionPath+"/request-email-change",i).then((()=>!0))}async confirmEmailChange(e,t,s,i){let n={method:"POST",body:{token:e,password:t}};return n=normalizeLegacyOptionsArgs("This form of confirmEmailChange(token, password, body?, query?) is deprecated. Consider replacing it with confirmEmailChange(token, password, options?).",n,s,i),this.client.send(this.baseCollectionPath+"/confirm-email-change",n).then((()=>{const t=getTokenPayload(e),s=this.client.authStore.record;return s&&s.id===t.id&&s.collectionId===t.collectionId&&this.client.authStore.clear(),!0}))}async listExternalAuths(e,t){return this.client.collection("_externalAuths").getFullList(Object.assign({},t,{filter:this.client.filter("recordRef = {:id}",{id:e})}))}async unlinkExternalAuth(e,t,s){const i=await this.client.collection("_externalAuths").getFirstListItem(this.client.filter("recordRef = {:recordId} && provider = {:provider}",{recordId:e,provider:t}));return this.client.collection("_externalAuths").delete(i.id,s).then((()=>!0))}async requestOTP(e,t){return t=Object.assign({method:"POST",body:{email:e}},t),this.client.send(this.baseCollectionPath+"/request-otp",t)}async authWithOTP(e,t,s){return s=Object.assign({method:"POST",body:{otpId:e,password:t}},s),this.client.send(this.baseCollectionPath+"/auth-with-otp",s).then((e=>this.authResponse(e)))}async impersonate(e,t,s){(s=Object.assign({method:"POST",body:{duration:t}},s)).headers=s.headers||{},s.headers.Authorization||(s.headers.Authorization=this.client.authStore.token);const i=new Client(this.client.baseURL,new BaseAuthStore,this.client.lang),n=await i.send(this.baseCollectionPath+"/impersonate/"+encodeURIComponent(e),s);return i.authStore.save(n?.token,this.decode(n?.record||{})),i}_replaceQueryParams(e,t={}){let s=e,i="";e.indexOf("?")>=0&&(s=e.substring(0,e.indexOf("?")),i=e.substring(e.indexOf("?")+1));const n={},r=i.split("&");for(const e of r){if(""==e)continue;const t=e.split("=");n[decodeURIComponent(t[0].replace(/\+/g," "))]=decodeURIComponent((t[1]||"").replace(/\+/g," "))}for(let e in t)t.hasOwnProperty(e)&&(null==t[e]?delete n[e]:n[e]=t[e]);i="";for(let e in n)n.hasOwnProperty(e)&&(""!=i&&(i+="&"),i+=encodeURIComponent(e.replace(/%20/g,"+"))+"="+encodeURIComponent(n[e].replace(/%20/g,"+")));return""!=i?s+"?"+i:s}}function openBrowserPopup(e){if("undefined"==typeof window||!window?.open)throw new ClientResponseError(new Error("Not in a browser context - please pass a custom urlCallback function."));let t=1024,s=768,i=window.innerWidth,n=window.innerHeight;t=t>i?i:t,s=s>n?n:s;let r=i/2-t/2,o=n/2-s/2;return window.open(e,"popup_window","width="+t+",height="+s+",top="+o+",left="+r+",resizable,menubar=no")}class CollectionService extends CrudService{get baseCrudPath(){return"/api/collections"}async import(e,t=!1,s){return s=Object.assign({method:"PUT",body:{collections:e,deleteMissing:t}},s),this.client.send(this.baseCrudPath+"/import",s).then((()=>!0))}async getScaffolds(e){return e=Object.assign({method:"GET"},e),this.client.send(this.baseCrudPath+"/meta/scaffolds",e)}async truncate(e,t){return t=Object.assign({method:"DELETE"},t),this.client.send(this.baseCrudPath+"/"+encodeURIComponent(e)+"/truncate",t).then((()=>!0))}}class LogService extends BaseService{async getList(e=1,t=30,s){return(s=Object.assign({method:"GET"},s)).query=Object.assign({page:e,perPage:t},s.query),this.client.send("/api/logs",s)}async getOne(e,t){if(!e)throw new ClientResponseError({url:this.client.buildURL("/api/logs/"),status:404,response:{code:404,message:"Missing required log id.",data:{}}});return t=Object.assign({method:"GET"},t),this.client.send("/api/logs/"+encodeURIComponent(e),t)}async getStats(e){return e=Object.assign({method:"GET"},e),this.client.send("/api/logs/stats",e)}}class HealthService extends BaseService{async check(e){return e=Object.assign({method:"GET"},e),this.client.send("/api/health",e)}}class FileService extends BaseService{getUrl(e,t,s={}){return console.warn("Please replace pb.files.getUrl() with pb.files.getURL()"),this.getURL(e,t,s)}getURL(e,t,s={}){if(!t||!e?.id||!e?.collectionId&&!e?.collectionName)return"";const i=[];i.push("api"),i.push("files"),i.push(encodeURIComponent(e.collectionId||e.collectionName)),i.push(encodeURIComponent(e.id)),i.push(encodeURIComponent(t));let n=this.client.buildURL(i.join("/"));if(Object.keys(s).length){!1===s.download&&delete s.download;const e=new URLSearchParams(s);n+=(n.includes("?")?"&":"?")+e}return n}async getToken(e){return e=Object.assign({method:"POST"},e),this.client.send("/api/files/token",e).then((e=>e?.token||""))}}class BackupService extends BaseService{async getFullList(e){return e=Object.assign({method:"GET"},e),this.client.send("/api/backups",e)}async create(e,t){return t=Object.assign({method:"POST",body:{name:e}},t),this.client.send("/api/backups",t).then((()=>!0))}async upload(e,t){return t=Object.assign({method:"POST",body:e},t),this.client.send("/api/backups/upload",t).then((()=>!0))}async delete(e,t){return t=Object.assign({method:"DELETE"},t),this.client.send(`/api/backups/${encodeURIComponent(e)}`,t).then((()=>!0))}async restore(e,t){return t=Object.assign({method:"POST"},t),this.client.send(`/api/backups/${encodeURIComponent(e)}/restore`,t).then((()=>!0))}getDownloadUrl(e,t){return console.warn("Please replace pb.backups.getDownloadUrl() with pb.backups.getDownloadURL()"),this.getDownloadURL(e,t)}getDownloadURL(e,t){return this.client.buildURL(`/api/backups/${encodeURIComponent(t)}?token=${encodeURIComponent(e)}`)}}class CronService extends BaseService{async getFullList(e){return e=Object.assign({method:"GET"},e),this.client.send("/api/crons",e)}async run(e,t){return t=Object.assign({method:"POST"},t),this.client.send(`/api/crons/${encodeURIComponent(e)}`,t).then((()=>!0))}}function isFile(e){return"undefined"!=typeof Blob&&e instanceof Blob||"undefined"!=typeof File&&e instanceof File||null!==e&&"object"==typeof e&&e.uri&&("undefined"!=typeof navigator&&"ReactNative"===navigator.product||"undefined"!=typeof global&&global.HermesInternal)}function isFormData(e){return e&&("FormData"===e.constructor?.name||"undefined"!=typeof FormData&&e instanceof FormData)}function hasFileField(e){for(const t in e){const s=Array.isArray(e[t])?e[t]:[e[t]];for(const e of s)if(isFile(e))return!0}return!1}const r=/^[\-\.\d]+$/;function inferFormDataValue(e){if("string"!=typeof e)return e;if("true"==e)return!0;if("false"==e)return!1;if(("-"===e[0]||e[0]>="0"&&e[0]<="9")&&r.test(e)){let t=+e;if(""+t===e)return t}return e}class BatchService extends BaseService{constructor(){super(...arguments),this.requests=[],this.subs={}}collection(e){return this.subs[e]||(this.subs[e]=new SubBatchService(this.requests,e)),this.subs[e]}async send(e){const t=new FormData,s=[];for(let e=0;e{if("@jsonPayload"===s&&"string"==typeof e)try{let s=JSON.parse(e);Object.assign(t,s)}catch(e){console.warn("@jsonPayload error:",e)}else void 0!==t[s]?(Array.isArray(t[s])||(t[s]=[t[s]]),t[s].push(inferFormDataValue(e))):t[s]=inferFormDataValue(e)})),t}(s));for(const t in s){const i=s[t];if(isFile(i))e.files[t]=e.files[t]||[],e.files[t].push(i);else if(Array.isArray(i)){const s=[],n=[];for(const e of i)isFile(e)?s.push(e):n.push(e);if(s.length>0&&s.length==i.length){e.files[t]=e.files[t]||[];for(let i of s)e.files[t].push(i)}else if(e.json[t]=n,s.length>0){let i=t;t.startsWith("+")||t.endsWith("+")||(i+="+"),e.files[i]=e.files[i]||[];for(let t of s)e.files[i].push(t)}}else e.json[t]=i}}}class Client{get baseUrl(){return this.baseURL}set baseUrl(e){this.baseURL=e}constructor(e="/",t,s="en-US"){this.cancelControllers={},this.recordServices={},this.enableAutoCancellation=!0,this.baseURL=e,this.lang=s,t?this.authStore=t:"undefined"!=typeof window&&window.Deno?this.authStore=new BaseAuthStore:this.authStore=new LocalAuthStore,this.collections=new CollectionService(this),this.files=new FileService(this),this.logs=new LogService(this),this.settings=new SettingsService(this),this.realtime=new RealtimeService(this),this.health=new HealthService(this),this.backups=new BackupService(this),this.crons=new CronService(this)}get admins(){return this.collection("_superusers")}createBatch(){return new BatchService(this)}collection(e){return this.recordServices[e]||(this.recordServices[e]=new RecordService(this,e)),this.recordServices[e]}autoCancellation(e){return this.enableAutoCancellation=!!e,this}cancelRequest(e){return this.cancelControllers[e]&&(this.cancelControllers[e].abort(),delete this.cancelControllers[e]),this}cancelAllRequests(){for(let e in this.cancelControllers)this.cancelControllers[e].abort();return this.cancelControllers={},this}filter(e,t){if(!t)return e;for(let s in t){let i=t[s];switch(typeof i){case"boolean":case"number":i=""+i;break;case"string":i="'"+i.replace(/'/g,"\\'")+"'";break;default:i=null===i?"null":i instanceof Date?"'"+i.toISOString().replace("T"," ")+"'":"'"+JSON.stringify(i).replace(/'/g,"\\'")+"'"}e=e.replaceAll("{:"+s+"}",i)}return e}getFileUrl(e,t,s={}){return console.warn("Please replace pb.getFileUrl() with pb.files.getURL()"),this.files.getURL(e,t,s)}buildUrl(e){return console.warn("Please replace pb.buildUrl() with pb.buildURL()"),this.buildURL(e)}buildURL(e){let t=this.baseURL;return"undefined"==typeof window||!window.location||t.startsWith("https://")||t.startsWith("http://")||(t=window.location.origin?.endsWith("/")?window.location.origin.substring(0,window.location.origin.length-1):window.location.origin||"",this.baseURL.startsWith("/")||(t+=window.location.pathname||"/",t+=t.endsWith("/")?"":"/"),t+=this.baseURL),e&&(t+=t.endsWith("/")?"":"/",t+=e.startsWith("/")?e.substring(1):e),t}async send(e,t){t=this.initSendOptions(e,t);let s=this.buildURL(e);if(this.beforeSend){const e=Object.assign({},await this.beforeSend(s,t));void 0!==e.url||void 0!==e.options?(s=e.url||s,t=e.options||t):Object.keys(e).length&&(t=e,console?.warn&&console.warn("Deprecated format of beforeSend return: please use `return { url, options }`, instead of `return options`."))}if(void 0!==t.query){const e=serializeQueryParams(t.query);e&&(s+=(s.includes("?")?"&":"?")+e),delete t.query}"application/json"==this.getHeader(t.headers,"Content-Type")&&t.body&&"string"!=typeof t.body&&(t.body=JSON.stringify(t.body));return(t.fetch||fetch)(s,t).then((async e=>{let s={};try{s=await e.json()}catch(e){if(t.signal?.aborted||"undefined"!=typeof DOMException&&e instanceof DOMException&&("AbortError"==e.name||20==e.code))throw e}if(this.afterSend&&(s=await this.afterSend(e,s,t)),e.status>=400)throw new ClientResponseError({url:e.url,status:e.status,data:s});return s})).catch((e=>{throw new ClientResponseError(e)}))}initSendOptions(e,t){if((t=Object.assign({method:"GET"},t)).body=function convertToFormDataIfNeeded(e){if("undefined"==typeof FormData||void 0===e||"object"!=typeof e||null===e||isFormData(e)||!hasFileField(e))return e;const t=new FormData;for(const s in e){const i=e[s];if(void 0!==i)if("object"!=typeof i||hasFileField({data:i})){const e=Array.isArray(i)?i:[i];for(let i of e)t.append(s,i)}else{let e={};e[s]=i,t.append("@jsonPayload",JSON.stringify(e))}}return t}(t.body),normalizeUnknownQueryParams(t),t.query=Object.assign({},t.params,t.query),void 0===t.requestKey&&(!1===t.$autoCancel||!1===t.query.$autoCancel?t.requestKey=null:(t.$cancelKey||t.query.$cancelKey)&&(t.requestKey=t.$cancelKey||t.query.$cancelKey)),delete t.$autoCancel,delete t.query.$autoCancel,delete t.$cancelKey,delete t.query.$cancelKey,null!==this.getHeader(t.headers,"Content-Type")||isFormData(t.body)||(t.headers=Object.assign({},t.headers,{"Content-Type":"application/json"})),null===this.getHeader(t.headers,"Accept-Language")&&(t.headers=Object.assign({},t.headers,{"Accept-Language":this.lang})),this.authStore.token&&null===this.getHeader(t.headers,"Authorization")&&(t.headers=Object.assign({},t.headers,{Authorization:this.authStore.token})),this.enableAutoCancellation&&null!==t.requestKey){const s=t.requestKey||(t.method||"GET")+e;delete t.requestKey,this.cancelRequest(s);const i=new AbortController;this.cancelControllers[s]=i,t.signal=i.signal}return t}getHeader(e,t){e=e||{},t=t.toLowerCase();for(let s in e)if(s.toLowerCase()==t)return e[s];return null}}module.exports=Client; -//# sourceMappingURL=pocketbase.cjs.js.map diff --git a/PBandGraphScaffold/node_modules/pocketbase/dist/pocketbase.cjs.js.map b/PBandGraphScaffold/node_modules/pocketbase/dist/pocketbase.cjs.js.map deleted file mode 100644 index 34e342c..0000000 --- a/PBandGraphScaffold/node_modules/pocketbase/dist/pocketbase.cjs.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"pocketbase.cjs.js","sources":["../src/ClientResponseError.ts","../src/tools/cookie.ts","../src/tools/jwt.ts","../src/stores/BaseAuthStore.ts","../src/stores/LocalAuthStore.ts","../src/services/BaseService.ts","../src/services/SettingsService.ts","../src/tools/options.ts","../src/services/RealtimeService.ts","../src/services/CrudService.ts","../src/tools/legacy.ts","../src/tools/refresh.ts","../src/services/RecordService.ts","../src/services/CollectionService.ts","../src/services/LogService.ts","../src/services/HealthService.ts","../src/services/FileService.ts","../src/services/BackupService.ts","../src/services/CronService.ts","../src/tools/formdata.ts","../src/services/BatchService.ts","../src/Client.ts"],"sourcesContent":["/**\n * ClientResponseError is a custom Error class that is intended to wrap\n * and normalize any error thrown by `Client.send()`.\n */\nexport class ClientResponseError extends Error {\n url: string = \"\";\n status: number = 0;\n response: { [key: string]: any } = {};\n isAbort: boolean = false;\n originalError: any = null;\n\n constructor(errData?: any) {\n super(\"ClientResponseError\");\n\n // Set the prototype explicitly.\n // https://github.com/Microsoft/TypeScript-wiki/blob/main/Breaking-Changes.md#extending-built-ins-like-error-array-and-map-may-no-longer-work\n Object.setPrototypeOf(this, ClientResponseError.prototype);\n\n if (errData !== null && typeof errData === \"object\") {\n this.url = typeof errData.url === \"string\" ? errData.url : \"\";\n this.status = typeof errData.status === \"number\" ? errData.status : 0;\n this.isAbort = !!errData.isAbort;\n this.originalError = errData.originalError;\n\n if (errData.response !== null && typeof errData.response === \"object\") {\n this.response = errData.response;\n } else if (errData.data !== null && typeof errData.data === \"object\") {\n this.response = errData.data;\n } else {\n this.response = {};\n }\n }\n\n if (!this.originalError && !(errData instanceof ClientResponseError)) {\n this.originalError = errData;\n }\n\n if (\n typeof DOMException !== \"undefined\" &&\n errData instanceof DOMException &&\n // https://developer.mozilla.org/en-US/docs/Web/API/DOMException#aborterror\n (errData.name == \"AbortError\" || errData.code == 20)\n ) {\n this.isAbort = true;\n }\n\n this.name = \"ClientResponseError \" + this.status;\n this.message = this.response?.message;\n if (!this.message) {\n if (this.isAbort) {\n this.message =\n \"The request was autocancelled. You can find more info in https://github.com/pocketbase/js-sdk#auto-cancellation.\";\n } else if (this.originalError?.cause?.message?.includes(\"ECONNREFUSED ::1\")) {\n this.message =\n \"Failed to connect to the PocketBase server. Try changing the SDK URL from localhost to 127.0.0.1 (https://github.com/pocketbase/js-sdk/issues/21).\";\n } else {\n this.message = \"Something went wrong.\";\n }\n }\n\n // set this.cause so that JS debugging tools can automatically connect\n // the dots between the original error and the wrapped one\n this.cause = this.originalError;\n }\n\n /**\n * Alias for `this.response` for backward compatibility.\n */\n get data() {\n return this.response;\n }\n\n /**\n * Make a POJO's copy of the current error class instance.\n * @see https://github.com/vuex-orm/vuex-orm/issues/255\n */\n toJSON() {\n return { ...this };\n }\n}\n","/**\n * -------------------------------------------------------------------\n * Simple cookie parse and serialize utilities mostly based on the\n * node module https://github.com/jshttp/cookie.\n * -------------------------------------------------------------------\n */\n\n/**\n * RegExp to match field-content in RFC 7230 sec 3.2\n *\n * field-content = field-vchar [ 1*( SP / HTAB ) field-vchar ]\n * field-vchar = VCHAR / obs-text\n * obs-text = %x80-FF\n */\nconst fieldContentRegExp = /^[\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+$/;\n\nexport interface ParseOptions {\n decode?: (val: string) => string;\n}\n\n/**\n * Parses the given cookie header string into an object\n * The object has the various cookies as keys(names) => values\n */\nexport function cookieParse(str: string, options?: ParseOptions): { [key: string]: any } {\n const result: { [key: string]: any } = {};\n\n if (typeof str !== \"string\") {\n return result;\n }\n\n const opt = Object.assign({}, options || {});\n const decode = opt.decode || defaultDecode;\n\n let index = 0;\n while (index < str.length) {\n const eqIdx = str.indexOf(\"=\", index);\n\n // no more cookie pairs\n if (eqIdx === -1) {\n break;\n }\n\n let endIdx = str.indexOf(\";\", index);\n\n if (endIdx === -1) {\n endIdx = str.length;\n } else if (endIdx < eqIdx) {\n // backtrack on prior semicolon\n index = str.lastIndexOf(\";\", eqIdx - 1) + 1;\n continue;\n }\n\n const key = str.slice(index, eqIdx).trim();\n\n // only assign once\n if (undefined === result[key]) {\n let val = str.slice(eqIdx + 1, endIdx).trim();\n\n // quoted values\n if (val.charCodeAt(0) === 0x22) {\n val = val.slice(1, -1);\n }\n\n try {\n result[key] = decode(val);\n } catch (_) {\n result[key] = val; // no decoding\n }\n }\n\n index = endIdx + 1;\n }\n\n return result;\n}\n\nexport interface SerializeOptions {\n encode?: (val: string | number | boolean) => string;\n maxAge?: number;\n domain?: string;\n path?: string;\n expires?: Date;\n httpOnly?: boolean;\n secure?: boolean;\n priority?: string;\n sameSite?: boolean | string;\n}\n\n/**\n * Serialize data into a cookie header.\n *\n * Serialize the a name value pair into a cookie string suitable for\n * http headers. An optional options object specified cookie parameters.\n *\n * ```js\n * cookieSerialize('foo', 'bar', { httpOnly: true }) // \"foo=bar; httpOnly\"\n * ```\n */\nexport function cookieSerialize(\n name: string,\n val: string,\n options?: SerializeOptions,\n): string {\n const opt = Object.assign({}, options || {});\n const encode = opt.encode || defaultEncode;\n\n if (!fieldContentRegExp.test(name)) {\n throw new TypeError(\"argument name is invalid\");\n }\n\n const value = encode(val);\n\n if (value && !fieldContentRegExp.test(value)) {\n throw new TypeError(\"argument val is invalid\");\n }\n\n let result = name + \"=\" + value;\n\n if (opt.maxAge != null) {\n const maxAge = opt.maxAge - 0;\n\n if (isNaN(maxAge) || !isFinite(maxAge)) {\n throw new TypeError(\"option maxAge is invalid\");\n }\n\n result += \"; Max-Age=\" + Math.floor(maxAge);\n }\n\n if (opt.domain) {\n if (!fieldContentRegExp.test(opt.domain)) {\n throw new TypeError(\"option domain is invalid\");\n }\n\n result += \"; Domain=\" + opt.domain;\n }\n\n if (opt.path) {\n if (!fieldContentRegExp.test(opt.path)) {\n throw new TypeError(\"option path is invalid\");\n }\n\n result += \"; Path=\" + opt.path;\n }\n\n if (opt.expires) {\n if (!isDate(opt.expires) || isNaN(opt.expires.valueOf())) {\n throw new TypeError(\"option expires is invalid\");\n }\n\n result += \"; Expires=\" + opt.expires.toUTCString();\n }\n\n if (opt.httpOnly) {\n result += \"; HttpOnly\";\n }\n\n if (opt.secure) {\n result += \"; Secure\";\n }\n\n if (opt.priority) {\n const priority =\n typeof opt.priority === \"string\" ? opt.priority.toLowerCase() : opt.priority;\n\n switch (priority) {\n case \"low\":\n result += \"; Priority=Low\";\n break;\n case \"medium\":\n result += \"; Priority=Medium\";\n break;\n case \"high\":\n result += \"; Priority=High\";\n break;\n default:\n throw new TypeError(\"option priority is invalid\");\n }\n }\n\n if (opt.sameSite) {\n const sameSite =\n typeof opt.sameSite === \"string\" ? opt.sameSite.toLowerCase() : opt.sameSite;\n\n switch (sameSite) {\n case true:\n result += \"; SameSite=Strict\";\n break;\n case \"lax\":\n result += \"; SameSite=Lax\";\n break;\n case \"strict\":\n result += \"; SameSite=Strict\";\n break;\n case \"none\":\n result += \"; SameSite=None\";\n break;\n default:\n throw new TypeError(\"option sameSite is invalid\");\n }\n }\n\n return result;\n}\n\n/**\n * Default URL-decode string value function.\n * Optimized to skip native call when no `%`.\n */\nfunction defaultDecode(val: string): string {\n return val.indexOf(\"%\") !== -1 ? decodeURIComponent(val) : val;\n}\n\n/**\n * Default URL-encode value function.\n */\nfunction defaultEncode(val: string | number | boolean): string {\n return encodeURIComponent(val);\n}\n\n/**\n * Determines if value is a Date.\n */\nfunction isDate(val: any): boolean {\n return Object.prototype.toString.call(val) === \"[object Date]\" || val instanceof Date;\n}\n","// @todo remove after https://github.com/reactwg/react-native-releases/issues/287\nconst isReactNative =\n (typeof navigator !== \"undefined\" && navigator.product === \"ReactNative\") ||\n (typeof global !== \"undefined\" && (global as any).HermesInternal);\n\nlet atobPolyfill: Function;\nif (typeof atob === \"function\" && !isReactNative) {\n atobPolyfill = atob;\n} else {\n /**\n * The code was extracted from:\n * https://github.com/davidchambers/Base64.js\n */\n atobPolyfill = (input: any) => {\n const chars = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\";\n\n let str = String(input).replace(/=+$/, \"\");\n if (str.length % 4 == 1) {\n throw new Error(\n \"'atob' failed: The string to be decoded is not correctly encoded.\",\n );\n }\n\n for (\n // initialize result and counters\n var bc = 0, bs, buffer, idx = 0, output = \"\";\n // get next character\n (buffer = str.charAt(idx++));\n // character found in table? initialize bit storage and add its ascii value;\n ~buffer &&\n ((bs = bc % 4 ? (bs as any) * 64 + buffer : buffer),\n // and if not first of each 4 characters,\n // convert the first 8 bits to one ascii character\n bc++ % 4)\n ? (output += String.fromCharCode(255 & (bs >> ((-2 * bc) & 6))))\n : 0\n ) {\n // try to find character in table (0-63, not found => -1)\n buffer = chars.indexOf(buffer);\n }\n\n return output;\n };\n}\n\n/**\n * Returns JWT token's payload data.\n */\nexport function getTokenPayload(token: string): { [key: string]: any } {\n if (token) {\n try {\n const encodedPayload = decodeURIComponent(\n atobPolyfill(token.split(\".\")[1])\n .split(\"\")\n .map(function (c: string) {\n return \"%\" + (\"00\" + c.charCodeAt(0).toString(16)).slice(-2);\n })\n .join(\"\"),\n );\n\n return JSON.parse(encodedPayload) || {};\n } catch (e) {}\n }\n\n return {};\n}\n\n/**\n * Checks whether a JWT token is expired or not.\n * Tokens without `exp` payload key are considered valid.\n * Tokens with empty payload (eg. invalid token strings) are considered expired.\n *\n * @param token The token to check.\n * @param [expirationThreshold] Time in seconds that will be subtracted from the token `exp` property.\n */\nexport function isTokenExpired(token: string, expirationThreshold = 0): boolean {\n let payload = getTokenPayload(token);\n\n if (\n Object.keys(payload).length > 0 &&\n (!payload.exp || payload.exp - expirationThreshold > Date.now() / 1000)\n ) {\n return false;\n }\n\n return true;\n}\n","import { cookieParse, cookieSerialize, SerializeOptions } from \"@/tools/cookie\";\nimport { isTokenExpired, getTokenPayload } from \"@/tools/jwt\";\nimport { RecordModel } from \"@/tools/dtos\";\n\nexport type AuthRecord = RecordModel | null;\n\nexport type AuthModel = AuthRecord; // for backward compatibility\n\nexport type OnStoreChangeFunc = (token: string, record: AuthRecord) => void;\n\nconst defaultCookieKey = \"pb_auth\";\n\n/**\n * Base AuthStore class that stores the auth state in runtime memory (aka. only for the duration of the store instane).\n *\n * Usually you wouldn't use it directly and instead use the builtin LocalAuthStore, AsyncAuthStore\n * or extend it with your own custom implementation.\n */\nexport class BaseAuthStore {\n protected baseToken: string = \"\";\n protected baseModel: AuthRecord = null;\n\n private _onChangeCallbacks: Array = [];\n\n /**\n * Retrieves the stored token (if any).\n */\n get token(): string {\n return this.baseToken;\n }\n\n /**\n * Retrieves the stored model data (if any).\n */\n get record(): AuthRecord {\n return this.baseModel;\n }\n\n /**\n * @deprecated use `record` instead.\n */\n get model(): AuthRecord {\n return this.baseModel;\n }\n\n /**\n * Loosely checks if the store has valid token (aka. existing and unexpired exp claim).\n */\n get isValid(): boolean {\n return !isTokenExpired(this.token);\n }\n\n /**\n * Loosely checks whether the currently loaded store state is for superuser.\n *\n * Alternatively you can also compare directly `pb.authStore.record?.collectionName`.\n */\n get isSuperuser(): boolean {\n let payload = getTokenPayload(this.token);\n\n return (\n payload.type == \"auth\" &&\n (this.record?.collectionName == \"_superusers\" ||\n // fallback in case the record field is not populated and assuming\n // that the collection crc32 checksum id wasn't manually changed\n (!this.record?.collectionName &&\n payload.collectionId == \"pbc_3142635823\"))\n );\n }\n\n /**\n * @deprecated use `isSuperuser` instead or simply check the record.collectionName property.\n */\n get isAdmin(): boolean {\n console.warn(\n \"Please replace pb.authStore.isAdmin with pb.authStore.isSuperuser OR simply check the value of pb.authStore.record?.collectionName\",\n );\n return this.isSuperuser;\n }\n\n /**\n * @deprecated use `!isSuperuser` instead or simply check the record.collectionName property.\n */\n get isAuthRecord(): boolean {\n console.warn(\n \"Please replace pb.authStore.isAuthRecord with !pb.authStore.isSuperuser OR simply check the value of pb.authStore.record?.collectionName\",\n );\n return getTokenPayload(this.token).type == \"auth\" && !this.isSuperuser;\n }\n\n /**\n * Saves the provided new token and model data in the auth store.\n */\n save(token: string, record?: AuthRecord): void {\n this.baseToken = token || \"\";\n this.baseModel = record || null;\n\n this.triggerChange();\n }\n\n /**\n * Removes the stored token and model data form the auth store.\n */\n clear(): void {\n this.baseToken = \"\";\n this.baseModel = null;\n this.triggerChange();\n }\n\n /**\n * Parses the provided cookie string and updates the store state\n * with the cookie's token and model data.\n *\n * NB! This function doesn't validate the token or its data.\n * Usually this isn't a concern if you are interacting only with the\n * PocketBase API because it has the proper server-side security checks in place,\n * but if you are using the store `isValid` state for permission controls\n * in a node server (eg. SSR), then it is recommended to call `authRefresh()`\n * after loading the cookie to ensure an up-to-date token and model state.\n * For example:\n *\n * ```js\n * pb.authStore.loadFromCookie(\"cookie string...\");\n *\n * try {\n * // get an up-to-date auth store state by veryfing and refreshing the loaded auth model (if any)\n * pb.authStore.isValid && await pb.collection('users').authRefresh();\n * } catch (_) {\n * // clear the auth store on failed refresh\n * pb.authStore.clear();\n * }\n * ```\n */\n loadFromCookie(cookie: string, key = defaultCookieKey): void {\n const rawData = cookieParse(cookie || \"\")[key] || \"\";\n\n let data: { [key: string]: any } = {};\n try {\n data = JSON.parse(rawData);\n // normalize\n if (typeof data === null || typeof data !== \"object\" || Array.isArray(data)) {\n data = {};\n }\n } catch (_) {}\n\n this.save(data.token || \"\", data.record || data.model || null);\n }\n\n /**\n * Exports the current store state as cookie string.\n *\n * By default the following optional attributes are added:\n * - Secure\n * - HttpOnly\n * - SameSite=Strict\n * - Path=/\n * - Expires={the token expiration date}\n *\n * NB! If the generated cookie exceeds 4096 bytes, this method will\n * strip the model data to the bare minimum to try to fit within the\n * recommended size in https://www.rfc-editor.org/rfc/rfc6265#section-6.1.\n */\n exportToCookie(options?: SerializeOptions, key = defaultCookieKey): string {\n const defaultOptions: SerializeOptions = {\n secure: true,\n sameSite: true,\n httpOnly: true,\n path: \"/\",\n };\n\n // extract the token expiration date\n const payload = getTokenPayload(this.token);\n if (payload?.exp) {\n defaultOptions.expires = new Date(payload.exp * 1000);\n } else {\n defaultOptions.expires = new Date(\"1970-01-01\");\n }\n\n // merge with the user defined options\n options = Object.assign({}, defaultOptions, options);\n\n const rawData = {\n token: this.token,\n record: this.record ? JSON.parse(JSON.stringify(this.record)) : null,\n };\n\n let result = cookieSerialize(key, JSON.stringify(rawData), options);\n\n const resultLength =\n typeof Blob !== \"undefined\" ? new Blob([result]).size : result.length;\n\n // strip down the model data to the bare minimum\n if (rawData.record && resultLength > 4096) {\n rawData.record = { id: rawData.record?.id, email: rawData.record?.email };\n const extraProps = [\"collectionId\", \"collectionName\", \"verified\"];\n for (const prop in this.record) {\n if (extraProps.includes(prop)) {\n rawData.record[prop] = this.record[prop];\n }\n }\n result = cookieSerialize(key, JSON.stringify(rawData), options);\n }\n\n return result;\n }\n\n /**\n * Register a callback function that will be called on store change.\n *\n * You can set the `fireImmediately` argument to true in order to invoke\n * the provided callback right after registration.\n *\n * Returns a removal function that you could call to \"unsubscribe\" from the changes.\n */\n onChange(callback: OnStoreChangeFunc, fireImmediately = false): () => void {\n this._onChangeCallbacks.push(callback);\n\n if (fireImmediately) {\n callback(this.token, this.record);\n }\n\n return () => {\n for (let i = this._onChangeCallbacks.length - 1; i >= 0; i--) {\n if (this._onChangeCallbacks[i] == callback) {\n delete this._onChangeCallbacks[i]; // removes the function reference\n this._onChangeCallbacks.splice(i, 1); // reindex the array\n return;\n }\n }\n };\n }\n\n protected triggerChange(): void {\n for (const callback of this._onChangeCallbacks) {\n callback && callback(this.token, this.record);\n }\n }\n}\n","import { BaseAuthStore, AuthRecord } from \"@/stores/BaseAuthStore\";\n\n/**\n * The default token store for browsers with auto fallback\n * to runtime/memory if local storage is undefined (e.g. in node env).\n */\nexport class LocalAuthStore extends BaseAuthStore {\n private storageFallback: { [key: string]: any } = {};\n private storageKey: string;\n\n constructor(storageKey = \"pocketbase_auth\") {\n super();\n\n this.storageKey = storageKey;\n\n this._bindStorageEvent();\n }\n\n /**\n * @inheritdoc\n */\n get token(): string {\n const data = this._storageGet(this.storageKey) || {};\n\n return data.token || \"\";\n }\n\n /**\n * @inheritdoc\n */\n get record(): AuthRecord {\n const data = this._storageGet(this.storageKey) || {};\n\n return data.record || data.model || null;\n }\n\n /**\n * @deprecated use `record` instead.\n */\n get model(): AuthRecord {\n return this.record;\n }\n\n /**\n * @inheritdoc\n */\n save(token: string, record?: AuthRecord) {\n this._storageSet(this.storageKey, {\n token: token,\n record: record,\n });\n\n super.save(token, record);\n }\n\n /**\n * @inheritdoc\n */\n clear() {\n this._storageRemove(this.storageKey);\n\n super.clear();\n }\n\n // ---------------------------------------------------------------\n // Internal helpers:\n // ---------------------------------------------------------------\n\n /**\n * Retrieves `key` from the browser's local storage\n * (or runtime/memory if local storage is undefined).\n */\n private _storageGet(key: string): any {\n if (typeof window !== \"undefined\" && window?.localStorage) {\n const rawValue = window.localStorage.getItem(key) || \"\";\n try {\n return JSON.parse(rawValue);\n } catch (e) {\n // not a json\n return rawValue;\n }\n }\n\n // fallback\n return this.storageFallback[key];\n }\n\n /**\n * Stores a new data in the browser's local storage\n * (or runtime/memory if local storage is undefined).\n */\n private _storageSet(key: string, value: any) {\n if (typeof window !== \"undefined\" && window?.localStorage) {\n // store in local storage\n let normalizedVal = value;\n if (typeof value !== \"string\") {\n normalizedVal = JSON.stringify(value);\n }\n window.localStorage.setItem(key, normalizedVal);\n } else {\n // store in fallback\n this.storageFallback[key] = value;\n }\n }\n\n /**\n * Removes `key` from the browser's local storage and the runtime/memory.\n */\n private _storageRemove(key: string) {\n // delete from local storage\n if (typeof window !== \"undefined\" && window?.localStorage) {\n window.localStorage?.removeItem(key);\n }\n\n // delete from fallback\n delete this.storageFallback[key];\n }\n\n /**\n * Updates the current store state on localStorage change.\n */\n private _bindStorageEvent() {\n if (\n typeof window === \"undefined\" ||\n !window?.localStorage ||\n !window.addEventListener\n ) {\n return;\n }\n\n window.addEventListener(\"storage\", (e) => {\n if (e.key != this.storageKey) {\n return;\n }\n\n const data = this._storageGet(this.storageKey) || {};\n\n super.save(data.token || \"\", data.record || data.model || null);\n });\n }\n}\n","import Client from \"@/Client\";\n\n/**\n * BaseService class that should be inherited from all API services.\n */\nexport abstract class BaseService {\n readonly client: Client;\n\n constructor(client: Client) {\n this.client = client;\n }\n}\n","import { BaseService } from \"@/services/BaseService\";\nimport { CommonOptions } from \"@/tools/options\";\n\ninterface appleClientSecret {\n secret: string;\n}\n\nexport class SettingsService extends BaseService {\n /**\n * Fetch all available app settings.\n *\n * @throws {ClientResponseError}\n */\n async getAll(options?: CommonOptions): Promise<{ [key: string]: any }> {\n options = Object.assign(\n {\n method: \"GET\",\n },\n options,\n );\n\n return this.client.send(\"/api/settings\", options);\n }\n\n /**\n * Bulk updates app settings.\n *\n * @throws {ClientResponseError}\n */\n async update(\n bodyParams?: { [key: string]: any } | FormData,\n options?: CommonOptions,\n ): Promise<{ [key: string]: any }> {\n options = Object.assign(\n {\n method: \"PATCH\",\n body: bodyParams,\n },\n options,\n );\n\n return this.client.send(\"/api/settings\", options);\n }\n\n /**\n * Performs a S3 filesystem connection test.\n *\n * The currently supported `filesystem` are \"storage\" and \"backups\".\n *\n * @throws {ClientResponseError}\n */\n async testS3(\n filesystem: string = \"storage\",\n options?: CommonOptions,\n ): Promise {\n options = Object.assign(\n {\n method: \"POST\",\n body: {\n filesystem: filesystem,\n },\n },\n options,\n );\n\n return this.client.send(\"/api/settings/test/s3\", options).then(() => true);\n }\n\n /**\n * Sends a test email.\n *\n * The possible `emailTemplate` values are:\n * - verification\n * - password-reset\n * - email-change\n *\n * @throws {ClientResponseError}\n */\n async testEmail(\n collectionIdOrName: string,\n toEmail: string,\n emailTemplate: string,\n options?: CommonOptions,\n ): Promise {\n options = Object.assign(\n {\n method: \"POST\",\n body: {\n email: toEmail,\n template: emailTemplate,\n collection: collectionIdOrName,\n },\n },\n options,\n );\n\n return this.client.send(\"/api/settings/test/email\", options).then(() => true);\n }\n\n /**\n * Generates a new Apple OAuth2 client secret.\n *\n * @throws {ClientResponseError}\n */\n async generateAppleClientSecret(\n clientId: string,\n teamId: string,\n keyId: string,\n privateKey: string,\n duration: number,\n options?: CommonOptions,\n ): Promise {\n options = Object.assign(\n {\n method: \"POST\",\n body: {\n clientId,\n teamId,\n keyId,\n privateKey,\n duration,\n },\n },\n options,\n );\n\n return this.client.send(\"/api/settings/apple/generate-client-secret\", options);\n }\n}\n","export interface SendOptions extends RequestInit {\n // for backward compatibility and to minimize the verbosity,\n // any top-level field that doesn't exist in RequestInit or the\n // fields below will be treated as query parameter.\n [key: string]: any;\n\n /**\n * Optional custom fetch function to use for sending the request.\n */\n fetch?: (url: RequestInfo | URL, config?: RequestInit) => Promise;\n\n /**\n * Custom headers to send with the requests.\n */\n headers?: { [key: string]: string };\n\n /**\n * The body of the request (serialized automatically for json requests).\n */\n body?: any;\n\n /**\n * Query parameters that will be appended to the request url.\n */\n query?: { [key: string]: any };\n\n /**\n * @deprecated use `query` instead\n *\n * for backward-compatibility `params` values are merged with `query`,\n * but this option may get removed in the final v1 release\n */\n params?: { [key: string]: any };\n\n /**\n * The request identifier that can be used to cancel pending requests.\n */\n requestKey?: string | null;\n\n /**\n * @deprecated use `requestKey:string` instead\n */\n $cancelKey?: string;\n\n /**\n * @deprecated use `requestKey:null` instead\n */\n $autoCancel?: boolean;\n}\n\nexport interface CommonOptions extends SendOptions {\n fields?: string;\n}\n\nexport interface ListOptions extends CommonOptions {\n page?: number;\n perPage?: number;\n sort?: string;\n filter?: string;\n skipTotal?: boolean;\n}\n\nexport interface FullListOptions extends ListOptions {\n batch?: number;\n}\n\nexport interface RecordOptions extends CommonOptions {\n expand?: string;\n}\n\nexport interface RecordListOptions extends ListOptions, RecordOptions {}\n\nexport interface RecordFullListOptions extends FullListOptions, RecordOptions {}\n\nexport interface RecordSubscribeOptions extends SendOptions {\n fields?: string;\n filter?: string;\n expand?: string;\n}\n\nexport interface LogStatsOptions extends CommonOptions {\n filter?: string;\n}\n\nexport interface FileOptions extends CommonOptions {\n thumb?: string;\n download?: boolean;\n}\n\nexport interface AuthOptions extends CommonOptions {\n /**\n * If autoRefreshThreshold is set it will take care to auto refresh\n * when necessary the auth data before each request to ensure that\n * the auth state is always valid.\n *\n * The value must be in seconds, aka. the amount of seconds\n * that will be subtracted from the current token `exp` claim in order\n * to determine whether it is going to expire within the specified time threshold.\n *\n * For example, if you want to auto refresh the token if it is\n * going to expire in the next 30mins (or already has expired),\n * it can be set to `1800`\n */\n autoRefreshThreshold?: number;\n}\n\n// -------------------------------------------------------------------\n\n// list of known SendOptions keys (everything else is treated as query param)\nconst knownSendOptionsKeys = [\n \"requestKey\",\n \"$cancelKey\",\n \"$autoCancel\",\n \"fetch\",\n \"headers\",\n \"body\",\n \"query\",\n \"params\",\n // ---,\n \"cache\",\n \"credentials\",\n \"headers\",\n \"integrity\",\n \"keepalive\",\n \"method\",\n \"mode\",\n \"redirect\",\n \"referrer\",\n \"referrerPolicy\",\n \"signal\",\n \"window\",\n];\n\n// modifies in place the provided options by moving unknown send options as query parameters.\nexport function normalizeUnknownQueryParams(options?: SendOptions): void {\n if (!options) {\n return;\n }\n\n options.query = options.query || {};\n for (let key in options) {\n if (knownSendOptionsKeys.includes(key)) {\n continue;\n }\n\n options.query[key] = options[key];\n delete options[key];\n }\n}\n\nexport function serializeQueryParams(params: { [key: string]: any }): string {\n const result: Array = [];\n\n for (const key in params) {\n const encodedKey = encodeURIComponent(key);\n const arrValue = Array.isArray(params[key]) ? params[key] : [params[key]];\n\n for (let v of arrValue) {\n v = prepareQueryParamValue(v);\n if (v === null) {\n continue;\n }\n result.push(encodedKey + \"=\" + v);\n }\n }\n\n return result.join(\"&\");\n}\n\n// encodes and normalizes the provided query param value.\nfunction prepareQueryParamValue(value: any): null | string {\n if (value === null || typeof value === \"undefined\") {\n return null;\n }\n\n if (value instanceof Date) {\n return encodeURIComponent(value.toISOString().replace(\"T\", \" \"));\n }\n\n if (typeof value === \"object\") {\n return encodeURIComponent(JSON.stringify(value));\n }\n\n return encodeURIComponent(value);\n}\n","import { ClientResponseError } from \"@/ClientResponseError\";\nimport { BaseService } from \"@/services/BaseService\";\nimport { SendOptions, normalizeUnknownQueryParams } from \"@/tools/options\";\n\ninterface promiseCallbacks {\n resolve: Function;\n reject: Function;\n}\n\ntype Subscriptions = { [key: string]: Array };\n\nexport type UnsubscribeFunc = () => Promise;\n\nexport class RealtimeService extends BaseService {\n clientId: string = \"\";\n\n private eventSource: EventSource | null = null;\n private subscriptions: Subscriptions = {};\n private lastSentSubscriptions: Array = [];\n private connectTimeoutId: any;\n private maxConnectTimeout: number = 15000;\n private reconnectTimeoutId: any;\n private reconnectAttempts: number = 0;\n private maxReconnectAttempts: number = Infinity;\n private predefinedReconnectIntervals: Array = [\n 200, 300, 500, 1000, 1200, 1500, 2000,\n ];\n private pendingConnects: Array = [];\n\n /**\n * Returns whether the realtime connection has been established.\n */\n get isConnected(): boolean {\n return !!this.eventSource && !!this.clientId && !this.pendingConnects.length;\n }\n\n /**\n * An optional hook that is invoked when the realtime client disconnects\n * either when unsubscribing from all subscriptions or when the\n * connection was interrupted or closed by the server.\n *\n * The received argument could be used to determine whether the disconnect\n * is a result from unsubscribing (`activeSubscriptions.length == 0`)\n * or because of network/server error (`activeSubscriptions.length > 0`).\n *\n * If you want to listen for the opposite, aka. when the client connection is established,\n * subscribe to the `PB_CONNECT` event.\n */\n onDisconnect?: (activeSubscriptions: Array) => void;\n\n /**\n * Register the subscription listener.\n *\n * You can subscribe multiple times to the same topic.\n *\n * If the SSE connection is not started yet,\n * this method will also initialize it.\n */\n async subscribe(\n topic: string,\n callback: (data: any) => void,\n options?: SendOptions,\n ): Promise {\n if (!topic) {\n throw new Error(\"topic must be set.\");\n }\n\n let key = topic;\n\n // serialize and append the topic options (if any)\n if (options) {\n options = Object.assign({}, options); // shallow copy\n normalizeUnknownQueryParams(options);\n const serialized =\n \"options=\" +\n encodeURIComponent(\n JSON.stringify({ query: options.query, headers: options.headers }),\n );\n key += (key.includes(\"?\") ? \"&\" : \"?\") + serialized;\n }\n\n const listener = function (e: Event) {\n const msgEvent = e as MessageEvent;\n\n let data;\n try {\n data = JSON.parse(msgEvent?.data);\n } catch {}\n\n callback(data || {});\n };\n\n // store the listener\n if (!this.subscriptions[key]) {\n this.subscriptions[key] = [];\n }\n this.subscriptions[key].push(listener);\n\n if (!this.isConnected) {\n // initialize sse connection\n await this.connect();\n } else if (this.subscriptions[key].length === 1) {\n // send the updated subscriptions (if it is the first for the key)\n await this.submitSubscriptions();\n } else {\n // only register the listener\n this.eventSource?.addEventListener(key, listener);\n }\n\n return async (): Promise => {\n return this.unsubscribeByTopicAndListener(topic, listener);\n };\n }\n\n /**\n * Unsubscribe from all subscription listeners with the specified topic.\n *\n * If `topic` is not provided, then this method will unsubscribe\n * from all active subscriptions.\n *\n * This method is no-op if there are no active subscriptions.\n *\n * The related sse connection will be autoclosed if after the\n * unsubscribe operation there are no active subscriptions left.\n */\n async unsubscribe(topic?: string): Promise {\n let needToSubmit = false;\n\n if (!topic) {\n // remove all subscriptions\n this.subscriptions = {};\n } else {\n // remove all listeners related to the topic\n const subs = this.getSubscriptionsByTopic(topic);\n for (let key in subs) {\n if (!this.hasSubscriptionListeners(key)) {\n continue; // already unsubscribed\n }\n\n for (let listener of this.subscriptions[key]) {\n this.eventSource?.removeEventListener(key, listener);\n }\n delete this.subscriptions[key];\n\n // mark for subscriptions change submit if there are no other listeners\n if (!needToSubmit) {\n needToSubmit = true;\n }\n }\n }\n\n if (!this.hasSubscriptionListeners()) {\n // no other active subscriptions -> close the sse connection\n this.disconnect();\n } else if (needToSubmit) {\n await this.submitSubscriptions();\n }\n }\n\n /**\n * Unsubscribe from all subscription listeners starting with the specified topic prefix.\n *\n * This method is no-op if there are no active subscriptions with the specified topic prefix.\n *\n * The related sse connection will be autoclosed if after the\n * unsubscribe operation there are no active subscriptions left.\n */\n async unsubscribeByPrefix(keyPrefix: string): Promise {\n let hasAtleastOneTopic = false;\n for (let key in this.subscriptions) {\n // \"?\" so that it can be used as end delimiter for the prefix\n if (!(key + \"?\").startsWith(keyPrefix)) {\n continue;\n }\n\n hasAtleastOneTopic = true;\n for (let listener of this.subscriptions[key]) {\n this.eventSource?.removeEventListener(key, listener);\n }\n delete this.subscriptions[key];\n }\n\n if (!hasAtleastOneTopic) {\n return; // nothing to unsubscribe from\n }\n\n if (this.hasSubscriptionListeners()) {\n // submit the deleted subscriptions\n await this.submitSubscriptions();\n } else {\n // no other active subscriptions -> close the sse connection\n this.disconnect();\n }\n }\n\n /**\n * Unsubscribe from all subscriptions matching the specified topic and listener function.\n *\n * This method is no-op if there are no active subscription with\n * the specified topic and listener.\n *\n * The related sse connection will be autoclosed if after the\n * unsubscribe operation there are no active subscriptions left.\n */\n async unsubscribeByTopicAndListener(\n topic: string,\n listener: EventListener,\n ): Promise {\n let needToSubmit = false;\n\n const subs = this.getSubscriptionsByTopic(topic);\n for (let key in subs) {\n if (\n !Array.isArray(this.subscriptions[key]) ||\n !this.subscriptions[key].length\n ) {\n continue; // already unsubscribed\n }\n\n let exist = false;\n for (let i = this.subscriptions[key].length - 1; i >= 0; i--) {\n if (this.subscriptions[key][i] !== listener) {\n continue;\n }\n\n exist = true; // has at least one matching listener\n delete this.subscriptions[key][i]; // removes the function reference\n this.subscriptions[key].splice(i, 1); // reindex the array\n this.eventSource?.removeEventListener(key, listener);\n }\n if (!exist) {\n continue;\n }\n\n // remove the key from the subscriptions list if there are no other listeners\n if (!this.subscriptions[key].length) {\n delete this.subscriptions[key];\n }\n\n // mark for subscriptions change submit if there are no other listeners\n if (!needToSubmit && !this.hasSubscriptionListeners(key)) {\n needToSubmit = true;\n }\n }\n\n if (!this.hasSubscriptionListeners()) {\n // no other active subscriptions -> close the sse connection\n this.disconnect();\n } else if (needToSubmit) {\n await this.submitSubscriptions();\n }\n }\n\n private hasSubscriptionListeners(keyToCheck?: string): boolean {\n this.subscriptions = this.subscriptions || {};\n\n // check the specified key\n if (keyToCheck) {\n return !!this.subscriptions[keyToCheck]?.length;\n }\n\n // check for at least one non-empty subscription\n for (let key in this.subscriptions) {\n if (!!this.subscriptions[key]?.length) {\n return true;\n }\n }\n\n return false;\n }\n\n private async submitSubscriptions(): Promise {\n if (!this.clientId) {\n return; // no client/subscriber\n }\n\n // optimistic update\n this.addAllSubscriptionListeners();\n\n this.lastSentSubscriptions = this.getNonEmptySubscriptionKeys();\n\n return this.client\n .send(\"/api/realtime\", {\n method: \"POST\",\n body: {\n clientId: this.clientId,\n subscriptions: this.lastSentSubscriptions,\n },\n requestKey: this.getSubscriptionsCancelKey(),\n })\n .catch((err) => {\n if (err?.isAbort) {\n return; // silently ignore aborted pending requests\n }\n throw err;\n });\n }\n\n private getSubscriptionsCancelKey(): string {\n return \"realtime_\" + this.clientId;\n }\n\n private getSubscriptionsByTopic(topic: string): Subscriptions {\n const result: Subscriptions = {};\n\n // \"?\" so that it can be used as end delimiter for the topic\n topic = topic.includes(\"?\") ? topic : topic + \"?\";\n\n for (let key in this.subscriptions) {\n if ((key + \"?\").startsWith(topic)) {\n result[key] = this.subscriptions[key];\n }\n }\n\n return result;\n }\n\n private getNonEmptySubscriptionKeys(): Array {\n const result: Array = [];\n\n for (let key in this.subscriptions) {\n if (this.subscriptions[key].length) {\n result.push(key);\n }\n }\n\n return result;\n }\n\n private addAllSubscriptionListeners(): void {\n if (!this.eventSource) {\n return;\n }\n\n this.removeAllSubscriptionListeners();\n\n for (let key in this.subscriptions) {\n for (let listener of this.subscriptions[key]) {\n this.eventSource.addEventListener(key, listener);\n }\n }\n }\n\n private removeAllSubscriptionListeners(): void {\n if (!this.eventSource) {\n return;\n }\n\n for (let key in this.subscriptions) {\n for (let listener of this.subscriptions[key]) {\n this.eventSource.removeEventListener(key, listener);\n }\n }\n }\n\n private async connect(): Promise {\n if (this.reconnectAttempts > 0) {\n // immediately resolve the promise to avoid indefinitely\n // blocking the client during reconnection\n return;\n }\n\n return new Promise((resolve, reject) => {\n this.pendingConnects.push({ resolve, reject });\n\n if (this.pendingConnects.length > 1) {\n // all promises will be resolved once the connection is established\n return;\n }\n\n this.initConnect();\n });\n }\n\n private initConnect() {\n this.disconnect(true);\n\n // wait up to 15s for connect\n clearTimeout(this.connectTimeoutId);\n this.connectTimeoutId = setTimeout(() => {\n this.connectErrorHandler(new Error(\"EventSource connect took too long.\"));\n }, this.maxConnectTimeout);\n\n this.eventSource = new EventSource(this.client.buildURL(\"/api/realtime\"));\n\n this.eventSource.onerror = (_) => {\n this.connectErrorHandler(\n new Error(\"Failed to establish realtime connection.\"),\n );\n };\n\n this.eventSource.addEventListener(\"PB_CONNECT\", (e) => {\n const msgEvent = e as MessageEvent;\n this.clientId = msgEvent?.lastEventId;\n\n this.submitSubscriptions()\n .then(async () => {\n let retries = 3;\n while (this.hasUnsentSubscriptions() && retries > 0) {\n retries--;\n // resubscribe to ensure that the latest topics are submitted\n //\n // This is needed because missed topics could happen on reconnect\n // if after the pending sent `submitSubscriptions()` call another `subscribe()`\n // was made before the submit was able to complete.\n await this.submitSubscriptions();\n }\n })\n .then(() => {\n for (let p of this.pendingConnects) {\n p.resolve();\n }\n\n // reset connect meta\n this.pendingConnects = [];\n this.reconnectAttempts = 0;\n clearTimeout(this.reconnectTimeoutId);\n clearTimeout(this.connectTimeoutId);\n\n // propagate the PB_CONNECT event\n const connectSubs = this.getSubscriptionsByTopic(\"PB_CONNECT\");\n for (let key in connectSubs) {\n for (let listener of connectSubs[key]) {\n listener(e);\n }\n }\n })\n .catch((err) => {\n this.clientId = \"\";\n this.connectErrorHandler(err);\n });\n });\n }\n\n private hasUnsentSubscriptions(): boolean {\n const latestTopics = this.getNonEmptySubscriptionKeys();\n if (latestTopics.length != this.lastSentSubscriptions.length) {\n return true;\n }\n\n for (const t of latestTopics) {\n if (!this.lastSentSubscriptions.includes(t)) {\n return true;\n }\n }\n\n return false;\n }\n\n private connectErrorHandler(err: any) {\n clearTimeout(this.connectTimeoutId);\n clearTimeout(this.reconnectTimeoutId);\n\n if (\n // wasn't previously connected -> direct reject\n (!this.clientId && !this.reconnectAttempts) ||\n // was previously connected but the max reconnection limit has been reached\n this.reconnectAttempts > this.maxReconnectAttempts\n ) {\n for (let p of this.pendingConnects) {\n p.reject(new ClientResponseError(err));\n }\n this.pendingConnects = [];\n this.disconnect();\n return;\n }\n\n // otherwise -> reconnect in the background\n this.disconnect(true);\n const timeout =\n this.predefinedReconnectIntervals[this.reconnectAttempts] ||\n this.predefinedReconnectIntervals[\n this.predefinedReconnectIntervals.length - 1\n ];\n this.reconnectAttempts++;\n this.reconnectTimeoutId = setTimeout(() => {\n this.initConnect();\n }, timeout);\n }\n\n private disconnect(fromReconnect = false): void {\n if (this.clientId && this.onDisconnect) {\n this.onDisconnect(Object.keys(this.subscriptions));\n }\n\n clearTimeout(this.connectTimeoutId);\n clearTimeout(this.reconnectTimeoutId);\n this.removeAllSubscriptionListeners();\n this.client.cancelRequest(this.getSubscriptionsCancelKey());\n this.eventSource?.close();\n this.eventSource = null;\n this.clientId = \"\";\n\n if (!fromReconnect) {\n this.reconnectAttempts = 0;\n\n // resolve any remaining connect promises\n //\n // this is done to avoid unnecessary throwing errors in case\n // unsubscribe is called before the pending connect promises complete\n // (see https://github.com/pocketbase/pocketbase/discussions/2897#discussioncomment-6423818)\n for (let p of this.pendingConnects) {\n p.resolve();\n }\n this.pendingConnects = [];\n }\n }\n}\n","import { BaseService } from \"@/services/BaseService\";\nimport { ClientResponseError } from \"@/ClientResponseError\";\nimport { ListResult } from \"@/tools/dtos\";\nimport { CommonOptions, ListOptions, FullListOptions } from \"@/tools/options\";\n\nexport abstract class CrudService extends BaseService {\n /**\n * Base path for the crud actions (without trailing slash, eg. '/admins').\n */\n abstract get baseCrudPath(): string;\n\n /**\n * Response data decoder.\n */\n decode(data: { [key: string]: any }): T {\n return data as T;\n }\n\n /**\n * Returns a promise with all list items batch fetched at once\n * (by default 500 items per request; to change it set the `batch` query param).\n *\n * You can use the generic T to supply a wrapper type of the crud model.\n *\n * @throws {ClientResponseError}\n */\n async getFullList(options?: FullListOptions): Promise>;\n\n /**\n * Legacy version of getFullList with explicitly specified batch size.\n */\n async getFullList(batch?: number, options?: ListOptions): Promise>;\n\n async getFullList(\n batchOrqueryParams?: number | FullListOptions,\n options?: ListOptions,\n ): Promise> {\n if (typeof batchOrqueryParams == \"number\") {\n return this._getFullList(batchOrqueryParams, options);\n }\n\n options = Object.assign({}, batchOrqueryParams, options);\n\n let batch = 500;\n if (options.batch) {\n batch = options.batch;\n delete options.batch;\n }\n\n return this._getFullList(batch, options);\n }\n\n /**\n * Returns paginated items list.\n *\n * You can use the generic T to supply a wrapper type of the crud model.\n *\n * @throws {ClientResponseError}\n */\n async getList(\n page = 1,\n perPage = 30,\n options?: ListOptions,\n ): Promise> {\n options = Object.assign(\n {\n method: \"GET\",\n },\n options,\n );\n\n options.query = Object.assign(\n {\n page: page,\n perPage: perPage,\n },\n options.query,\n );\n\n return this.client.send(this.baseCrudPath, options).then((responseData: any) => {\n responseData.items =\n responseData.items?.map((item: any) => {\n return this.decode(item);\n }) || [];\n\n return responseData;\n });\n }\n\n /**\n * Returns the first found item by the specified filter.\n *\n * Internally it calls `getList(1, 1, { filter, skipTotal })` and\n * returns the first found item.\n *\n * You can use the generic T to supply a wrapper type of the crud model.\n *\n * For consistency with `getOne`, this method will throw a 404\n * ClientResponseError if no item was found.\n *\n * @throws {ClientResponseError}\n */\n async getFirstListItem(filter: string, options?: CommonOptions): Promise {\n options = Object.assign(\n {\n requestKey: \"one_by_filter_\" + this.baseCrudPath + \"_\" + filter,\n },\n options,\n );\n\n options.query = Object.assign(\n {\n filter: filter,\n skipTotal: 1,\n },\n options.query,\n );\n\n return this.getList(1, 1, options).then((result) => {\n if (!result?.items?.length) {\n throw new ClientResponseError({\n status: 404,\n response: {\n code: 404,\n message: \"The requested resource wasn't found.\",\n data: {},\n },\n });\n }\n\n return result.items[0];\n });\n }\n\n /**\n * Returns single item by its id.\n *\n * You can use the generic T to supply a wrapper type of the crud model.\n *\n * If `id` is empty it will throw a 404 error.\n *\n * @throws {ClientResponseError}\n */\n async getOne(id: string, options?: CommonOptions): Promise {\n if (!id) {\n throw new ClientResponseError({\n url: this.client.buildURL(this.baseCrudPath + \"/\"),\n status: 404,\n response: {\n code: 404,\n message: \"Missing required record id.\",\n data: {},\n },\n });\n }\n\n options = Object.assign(\n {\n method: \"GET\",\n },\n options,\n );\n\n return this.client\n .send(this.baseCrudPath + \"/\" + encodeURIComponent(id), options)\n .then((responseData: any) => this.decode(responseData));\n }\n\n /**\n * Creates a new item.\n *\n * You can use the generic T to supply a wrapper type of the crud model.\n *\n * @throws {ClientResponseError}\n */\n async create(\n bodyParams?: { [key: string]: any } | FormData,\n options?: CommonOptions,\n ): Promise {\n options = Object.assign(\n {\n method: \"POST\",\n body: bodyParams,\n },\n options,\n );\n\n return this.client\n .send(this.baseCrudPath, options)\n .then((responseData: any) => this.decode(responseData));\n }\n\n /**\n * Updates an existing item by its id.\n *\n * You can use the generic T to supply a wrapper type of the crud model.\n *\n * @throws {ClientResponseError}\n */\n async update(\n id: string,\n bodyParams?: { [key: string]: any } | FormData,\n options?: CommonOptions,\n ): Promise {\n options = Object.assign(\n {\n method: \"PATCH\",\n body: bodyParams,\n },\n options,\n );\n\n return this.client\n .send(this.baseCrudPath + \"/\" + encodeURIComponent(id), options)\n .then((responseData: any) => this.decode(responseData));\n }\n\n /**\n * Deletes an existing item by its id.\n *\n * @throws {ClientResponseError}\n */\n async delete(id: string, options?: CommonOptions): Promise {\n options = Object.assign(\n {\n method: \"DELETE\",\n },\n options,\n );\n\n return this.client\n .send(this.baseCrudPath + \"/\" + encodeURIComponent(id), options)\n .then(() => true);\n }\n\n /**\n * Returns a promise with all list items batch fetched at once.\n */\n protected _getFullList(\n batchSize = 500,\n options?: ListOptions,\n ): Promise> {\n options = options || {};\n options.query = Object.assign(\n {\n skipTotal: 1,\n },\n options.query,\n );\n\n let result: Array = [];\n\n let request = async (page: number): Promise> => {\n return this.getList(page, batchSize || 500, options).then((list) => {\n const castedList = list as any as ListResult;\n const items = castedList.items;\n\n result = result.concat(items);\n\n if (items.length == list.perPage) {\n return request(page + 1);\n }\n\n return result;\n });\n };\n\n return request(1);\n }\n}\n","import { SendOptions } from \"@/tools/options\";\n\nexport function normalizeLegacyOptionsArgs(\n legacyWarn: string,\n baseOptions: SendOptions,\n bodyOrOptions?: any,\n query?: any,\n): SendOptions {\n const hasBodyOrOptions = typeof bodyOrOptions !== \"undefined\";\n const hasQuery = typeof query !== \"undefined\";\n\n if (!hasQuery && !hasBodyOrOptions) {\n return baseOptions;\n }\n\n if (hasQuery) {\n console.warn(legacyWarn);\n baseOptions.body = Object.assign({}, baseOptions.body, bodyOrOptions);\n baseOptions.query = Object.assign({}, baseOptions.query, query);\n\n return baseOptions;\n }\n\n return Object.assign(baseOptions, bodyOrOptions);\n}\n","import Client from \"@/Client\";\nimport { isTokenExpired } from \"@/tools/jwt\";\n\n// reset previous auto refresh registrations\nexport function resetAutoRefresh(client: Client) {\n (client as any)._resetAutoRefresh?.();\n}\n\nexport function registerAutoRefresh(\n client: Client,\n threshold: number,\n refreshFunc: () => Promise,\n reauthenticateFunc: () => Promise,\n) {\n resetAutoRefresh(client);\n\n const oldBeforeSend = client.beforeSend;\n const oldModel = client.authStore.record;\n\n // unset the auto refresh in case the auth store was cleared\n // OR a new model was authenticated\n const unsubStoreChange = client.authStore.onChange((newToken, model) => {\n if (\n !newToken ||\n model?.id != oldModel?.id ||\n ((model?.collectionId || oldModel?.collectionId) &&\n model?.collectionId != oldModel?.collectionId)\n ) {\n resetAutoRefresh(client);\n }\n });\n\n // initialize a reset function and attach it dynamically to the client\n (client as any)._resetAutoRefresh = function () {\n unsubStoreChange();\n client.beforeSend = oldBeforeSend;\n delete (client as any)._resetAutoRefresh;\n };\n\n client.beforeSend = async (url, sendOptions) => {\n const oldToken = client.authStore.token;\n\n if (sendOptions.query?.autoRefresh) {\n return oldBeforeSend ? oldBeforeSend(url, sendOptions) : { url, sendOptions };\n }\n\n let isValid = client.authStore.isValid;\n if (\n // is loosely valid\n isValid &&\n // but it is going to expire in the next \"threshold\" seconds\n isTokenExpired(client.authStore.token, threshold)\n ) {\n try {\n await refreshFunc();\n } catch (_) {\n isValid = false;\n }\n }\n\n // still invalid -> reauthenticate\n if (!isValid) {\n await reauthenticateFunc();\n }\n\n // the request wasn't sent with a custom token\n const headers = sendOptions.headers || {};\n for (let key in headers) {\n if (\n key.toLowerCase() == \"authorization\" &&\n // the request wasn't sent with a custom token\n oldToken == headers[key] &&\n client.authStore.token\n ) {\n // set the latest store token\n headers[key] = client.authStore.token;\n break;\n }\n }\n sendOptions.headers = headers;\n\n return oldBeforeSend ? oldBeforeSend(url, sendOptions) : { url, sendOptions };\n };\n}\n","import Client from \"@/Client\";\nimport { ClientResponseError } from \"@/ClientResponseError\";\nimport { RealtimeService, UnsubscribeFunc } from \"@/services/RealtimeService\";\nimport { BaseAuthStore } from \"@/stores/BaseAuthStore\";\nimport { CrudService } from \"@/services/CrudService\";\nimport { ListResult, RecordModel } from \"@/tools/dtos\";\nimport { normalizeLegacyOptionsArgs } from \"@/tools/legacy\";\nimport {\n CommonOptions,\n RecordFullListOptions,\n RecordListOptions,\n RecordOptions,\n SendOptions,\n RecordSubscribeOptions,\n} from \"@/tools/options\";\nimport { getTokenPayload } from \"@/tools/jwt\";\nimport { registerAutoRefresh, resetAutoRefresh } from \"@/tools/refresh\";\n\nexport interface RecordAuthResponse {\n /**\n * The signed PocketBase auth record.\n */\n record: T;\n\n /**\n * The PocketBase record auth token.\n *\n * If you are looking for the OAuth2 access and refresh tokens\n * they are available under the `meta.accessToken` and `meta.refreshToken` props.\n */\n token: string;\n\n /**\n * Auth meta data usually filled when OAuth2 is used.\n */\n meta?: { [key: string]: any };\n}\n\nexport interface AuthProviderInfo {\n name: string;\n displayName: string;\n state: string;\n authURL: string;\n codeVerifier: string;\n codeChallenge: string;\n codeChallengeMethod: string;\n}\n\nexport interface AuthMethodsList {\n mfa: {\n enabled: boolean;\n duration: number;\n };\n otp: {\n enabled: boolean;\n duration: number;\n };\n password: {\n enabled: boolean;\n identityFields: Array;\n };\n oauth2: {\n enabled: boolean;\n providers: Array;\n };\n}\n\nexport interface RecordSubscription {\n action: string; // eg. create, update, delete\n record: T;\n}\n\nexport type OAuth2UrlCallback = (url: string) => void | Promise;\n\nexport interface OAuth2AuthConfig extends SendOptions {\n // the name of the OAuth2 provider (eg. \"google\")\n provider: string;\n\n // custom scopes to overwrite the default ones\n scopes?: Array;\n\n // optional record create data\n createData?: { [key: string]: any };\n\n // optional callback that is triggered after the OAuth2 sign-in/sign-up url generation\n urlCallback?: OAuth2UrlCallback;\n\n // optional query params to send with the PocketBase auth request (eg. fields, expand, etc.)\n query?: RecordOptions;\n}\n\nexport interface OTPResponse {\n otpId: string;\n}\n\nexport class RecordService extends CrudService {\n readonly collectionIdOrName: string;\n\n constructor(client: Client, collectionIdOrName: string) {\n super(client);\n\n this.collectionIdOrName = collectionIdOrName;\n }\n\n /**\n * @inheritdoc\n */\n get baseCrudPath(): string {\n return this.baseCollectionPath + \"/records\";\n }\n\n /**\n * Returns the current collection service base path.\n */\n get baseCollectionPath(): string {\n return \"/api/collections/\" + encodeURIComponent(this.collectionIdOrName);\n }\n\n /**\n * Returns whether the current service collection is superusers.\n */\n get isSuperusers(): boolean {\n return (\n this.collectionIdOrName == \"_superusers\" ||\n this.collectionIdOrName == \"_pbc_2773867675\"\n );\n }\n\n // ---------------------------------------------------------------\n // Realtime handlers\n // ---------------------------------------------------------------\n\n /**\n * Subscribe to realtime changes to the specified topic (\"*\" or record id).\n *\n * If `topic` is the wildcard \"*\", then this method will subscribe to\n * any record changes in the collection.\n *\n * If `topic` is a record id, then this method will subscribe only\n * to changes of the specified record id.\n *\n * It's OK to subscribe multiple times to the same topic.\n * You can use the returned `UnsubscribeFunc` to remove only a single subscription.\n * Or use `unsubscribe(topic)` if you want to remove all subscriptions attached to the topic.\n */\n async subscribe(\n topic: string,\n callback: (data: RecordSubscription) => void,\n options?: RecordSubscribeOptions,\n ): Promise {\n if (!topic) {\n throw new Error(\"Missing topic.\");\n }\n\n if (!callback) {\n throw new Error(\"Missing subscription callback.\");\n }\n\n return this.client.realtime.subscribe(\n this.collectionIdOrName + \"/\" + topic,\n callback,\n options,\n );\n }\n\n /**\n * Unsubscribe from all subscriptions of the specified topic\n * (\"*\" or record id).\n *\n * If `topic` is not set, then this method will unsubscribe from\n * all subscriptions associated to the current collection.\n */\n async unsubscribe(topic?: string): Promise {\n // unsubscribe from the specified topic\n if (topic) {\n return this.client.realtime.unsubscribe(\n this.collectionIdOrName + \"/\" + topic,\n );\n }\n\n // unsubscribe from everything related to the collection\n return this.client.realtime.unsubscribeByPrefix(this.collectionIdOrName);\n }\n\n // ---------------------------------------------------------------\n // Crud handers\n // ---------------------------------------------------------------\n /**\n * @inheritdoc\n */\n async getFullList(options?: RecordFullListOptions): Promise>;\n\n /**\n * @inheritdoc\n */\n async getFullList(\n batch?: number,\n options?: RecordListOptions,\n ): Promise>;\n\n /**\n * @inheritdoc\n */\n async getFullList(\n batchOrOptions?: number | RecordFullListOptions,\n options?: RecordListOptions,\n ): Promise> {\n if (typeof batchOrOptions == \"number\") {\n return super.getFullList(batchOrOptions, options);\n }\n\n const params = Object.assign({}, batchOrOptions, options);\n\n return super.getFullList(params);\n }\n\n /**\n * @inheritdoc\n */\n async getList(\n page = 1,\n perPage = 30,\n options?: RecordListOptions,\n ): Promise> {\n return super.getList(page, perPage, options);\n }\n\n /**\n * @inheritdoc\n */\n async getFirstListItem(\n filter: string,\n options?: RecordListOptions,\n ): Promise {\n return super.getFirstListItem(filter, options);\n }\n\n /**\n * @inheritdoc\n */\n async getOne(id: string, options?: RecordOptions): Promise {\n return super.getOne(id, options);\n }\n\n /**\n * @inheritdoc\n */\n async create(\n bodyParams?: { [key: string]: any } | FormData,\n options?: RecordOptions,\n ): Promise {\n return super.create(bodyParams, options);\n }\n\n /**\n * @inheritdoc\n *\n * If the current `client.authStore.record` matches with the updated id, then\n * on success the `client.authStore.record` will be updated with the new response record fields.\n */\n async update(\n id: string,\n bodyParams?: { [key: string]: any } | FormData,\n options?: RecordOptions,\n ): Promise {\n return super.update(id, bodyParams, options).then((item) => {\n if (\n // is record auth\n this.client.authStore.record?.id === item?.id &&\n (this.client.authStore.record?.collectionId === this.collectionIdOrName ||\n this.client.authStore.record?.collectionName ===\n this.collectionIdOrName)\n ) {\n let authExpand = Object.assign({}, this.client.authStore.record.expand);\n let authRecord = Object.assign({}, this.client.authStore.record, item);\n if (authExpand) {\n // for now \"merge\" only top-level expand\n authRecord.expand = Object.assign(authExpand, item.expand);\n }\n\n this.client.authStore.save(this.client.authStore.token, authRecord);\n }\n\n return item as any as T;\n });\n }\n\n /**\n * @inheritdoc\n *\n * If the current `client.authStore.record` matches with the deleted id,\n * then on success the `client.authStore` will be cleared.\n */\n async delete(id: string, options?: CommonOptions): Promise {\n return super.delete(id, options).then((success) => {\n if (\n success &&\n // is record auth\n this.client.authStore.record?.id === id &&\n (this.client.authStore.record?.collectionId === this.collectionIdOrName ||\n this.client.authStore.record?.collectionName ===\n this.collectionIdOrName)\n ) {\n this.client.authStore.clear();\n }\n\n return success;\n });\n }\n\n // ---------------------------------------------------------------\n // Auth handlers\n // ---------------------------------------------------------------\n\n /**\n * Prepare successful collection authorization response.\n */\n protected authResponse(responseData: any): RecordAuthResponse {\n const record = this.decode(responseData?.record || {});\n\n this.client.authStore.save(responseData?.token, record as any);\n\n return Object.assign({}, responseData, {\n // normalize common fields\n token: responseData?.token || \"\",\n record: record as any as T,\n });\n }\n\n /**\n * Returns all available collection auth methods.\n *\n * @throws {ClientResponseError}\n */\n async listAuthMethods(options?: CommonOptions): Promise {\n options = Object.assign(\n {\n method: \"GET\",\n // @todo remove after deleting the pre v0.23 API response fields\n fields: \"mfa,otp,password,oauth2\",\n },\n options,\n );\n\n return this.client.send(this.baseCollectionPath + \"/auth-methods\", options);\n }\n\n /**\n * Authenticate a single auth collection record via its username/email and password.\n *\n * On success, this method also automatically updates\n * the client's AuthStore data and returns:\n * - the authentication token\n * - the authenticated record model\n *\n * @throws {ClientResponseError}\n */\n async authWithPassword(\n usernameOrEmail: string,\n password: string,\n options?: RecordOptions,\n ): Promise> {\n options = Object.assign(\n {\n method: \"POST\",\n body: {\n identity: usernameOrEmail,\n password: password,\n },\n },\n options,\n );\n\n // note: consider to deprecate\n let autoRefreshThreshold;\n if (this.isSuperusers) {\n autoRefreshThreshold = options.autoRefreshThreshold;\n delete options.autoRefreshThreshold;\n if (!options.autoRefresh) {\n resetAutoRefresh(this.client);\n }\n }\n\n let authData = await this.client.send(\n this.baseCollectionPath + \"/auth-with-password\",\n options,\n );\n\n authData = this.authResponse(authData);\n\n if (autoRefreshThreshold && this.isSuperusers) {\n registerAutoRefresh(\n this.client,\n autoRefreshThreshold,\n () => this.authRefresh({ autoRefresh: true }),\n () =>\n this.authWithPassword(\n usernameOrEmail,\n password,\n Object.assign({ autoRefresh: true }, options),\n ),\n );\n }\n\n return authData;\n }\n\n /**\n * Authenticate a single auth collection record with OAuth2 code.\n *\n * If you don't have an OAuth2 code you may also want to check `authWithOAuth2` method.\n *\n * On success, this method also automatically updates\n * the client's AuthStore data and returns:\n * - the authentication token\n * - the authenticated record model\n * - the OAuth2 account data (eg. name, email, avatar, etc.)\n *\n * @throws {ClientResponseError}\n */\n async authWithOAuth2Code(\n provider: string,\n code: string,\n codeVerifier: string,\n redirectURL: string,\n createData?: { [key: string]: any },\n options?: RecordOptions,\n ): Promise>;\n\n /**\n * @deprecated\n * Consider using authWithOAuth2Code(provider, code, codeVerifier, redirectURL, createdData, options?).\n */\n async authWithOAuth2Code(\n provider: string,\n code: string,\n codeVerifier: string,\n redirectURL: string,\n createData?: { [key: string]: any },\n body?: any,\n query?: any,\n ): Promise>;\n\n async authWithOAuth2Code(\n provider: string,\n code: string,\n codeVerifier: string,\n redirectURL: string,\n createData?: { [key: string]: any },\n bodyOrOptions?: any,\n query?: any,\n ): Promise> {\n let options: any = {\n method: \"POST\",\n body: {\n provider: provider,\n code: code,\n codeVerifier: codeVerifier,\n redirectURL: redirectURL,\n createData: createData,\n },\n };\n\n options = normalizeLegacyOptionsArgs(\n \"This form of authWithOAuth2Code(provider, code, codeVerifier, redirectURL, createData?, body?, query?) is deprecated. Consider replacing it with authWithOAuth2Code(provider, code, codeVerifier, redirectURL, createData?, options?).\",\n options,\n bodyOrOptions,\n query,\n );\n\n return this.client\n .send(this.baseCollectionPath + \"/auth-with-oauth2\", options)\n .then((data) => this.authResponse(data));\n }\n\n /**\n * @deprecated This form of authWithOAuth2 is deprecated.\n *\n * Please use `authWithOAuth2Code()` OR its simplified realtime version\n * as shown in https://pocketbase.io/docs/authentication/#oauth2-integration.\n */\n async authWithOAuth2(\n provider: string,\n code: string,\n codeVerifier: string,\n redirectURL: string,\n createData?: { [key: string]: any },\n bodyParams?: { [key: string]: any },\n queryParams?: RecordOptions,\n ): Promise>;\n\n /**\n * Authenticate a single auth collection record with OAuth2\n * **without custom redirects, deeplinks or even page reload**.\n *\n * This method initializes a one-off realtime subscription and will\n * open a popup window with the OAuth2 vendor page to authenticate.\n * Once the external OAuth2 sign-in/sign-up flow is completed, the popup\n * window will be automatically closed and the OAuth2 data sent back\n * to the user through the previously established realtime connection.\n *\n * You can specify an optional `urlCallback` prop to customize\n * the default url `window.open` behavior.\n *\n * On success, this method also automatically updates\n * the client's AuthStore data and returns:\n * - the authentication token\n * - the authenticated record model\n * - the OAuth2 account data (eg. name, email, avatar, etc.)\n *\n * Example:\n *\n * ```js\n * const authData = await pb.collection(\"users\").authWithOAuth2({\n * provider: \"google\",\n * })\n * ```\n *\n * Note1: When creating the OAuth2 app in the provider dashboard\n * you have to configure `https://yourdomain.com/api/oauth2-redirect`\n * as redirect URL.\n *\n * Note2: Safari may block the default `urlCallback` popup because\n * it doesn't allow `window.open` calls as part of an `async` click functions.\n * To workaround this you can either change your click handler to not be marked as `async`\n * OR manually call `window.open` before your `async` function and use the\n * window reference in your own custom `urlCallback` (see https://github.com/pocketbase/pocketbase/discussions/2429#discussioncomment-5943061).\n * For example:\n * ```js\n * \n * ...\n * document.getElementById(\"btn\").addEventListener(\"click\", () => {\n * pb.collection(\"users\").authWithOAuth2({\n * provider: \"gitlab\",\n * }).then((authData) => {\n * console.log(authData)\n * }).catch((err) => {\n * console.log(err, err.originalError);\n * });\n * })\n * ```\n *\n * @throws {ClientResponseError}\n */\n async authWithOAuth2(\n options: OAuth2AuthConfig,\n ): Promise>;\n\n authWithOAuth2(...args: any): Promise> {\n // fallback to legacy format\n if (args.length > 1 || typeof args?.[0] === \"string\") {\n console.warn(\n \"PocketBase: This form of authWithOAuth2() is deprecated and may get removed in the future. Please replace with authWithOAuth2Code() OR use the authWithOAuth2() realtime form as shown in https://pocketbase.io/docs/authentication/#oauth2-integration.\",\n );\n return this.authWithOAuth2Code(\n args?.[0] || \"\",\n args?.[1] || \"\",\n args?.[2] || \"\",\n args?.[3] || \"\",\n args?.[4] || {},\n args?.[5] || {},\n args?.[6] || {},\n );\n }\n\n const config = args?.[0] || {};\n\n // open a new popup window in case config.urlCallback is not set\n //\n // note: it is opened before any async calls due to Safari restrictions\n // (see https://github.com/pocketbase/pocketbase/discussions/2429#discussioncomment-5943061)\n let eagerDefaultPopup: Window | null = null;\n if (!config.urlCallback) {\n eagerDefaultPopup = openBrowserPopup(undefined);\n }\n\n // initialize a one-off realtime service\n const realtime = new RealtimeService(this.client);\n\n function cleanup() {\n eagerDefaultPopup?.close();\n realtime.unsubscribe();\n }\n\n const requestKeyOptions: SendOptions = {};\n const requestKey = config.requestKey;\n if (requestKey) {\n requestKeyOptions.requestKey = requestKey;\n }\n\n return this.listAuthMethods(requestKeyOptions)\n .then((authMethods) => {\n const provider = authMethods.oauth2.providers.find(\n (p) => p.name === config.provider,\n );\n if (!provider) {\n throw new ClientResponseError(\n new Error(`Missing or invalid provider \"${config.provider}\".`),\n );\n }\n\n const redirectURL = this.client.buildURL(\"/api/oauth2-redirect\");\n\n // find the AbortController associated with the current request key (if any)\n const cancelController = requestKey\n ? this.client[\"cancelControllers\"]?.[requestKey]\n : undefined;\n if (cancelController) {\n cancelController.signal.onabort = () => {\n cleanup();\n };\n }\n\n return new Promise(async (resolve, reject) => {\n try {\n await realtime.subscribe(\"@oauth2\", async (e) => {\n const oldState = realtime.clientId;\n\n try {\n if (!e.state || oldState !== e.state) {\n throw new Error(\"State parameters don't match.\");\n }\n\n if (e.error || !e.code) {\n throw new Error(\n \"OAuth2 redirect error or missing code: \" +\n e.error,\n );\n }\n\n // clear the non SendOptions props\n const options = Object.assign({}, config);\n delete options.provider;\n delete options.scopes;\n delete options.createData;\n delete options.urlCallback;\n\n // reset the cancelController listener as it will be triggered by the next api call\n if (cancelController?.signal?.onabort) {\n cancelController.signal.onabort = null;\n }\n\n const authData = await this.authWithOAuth2Code(\n provider.name,\n e.code,\n provider.codeVerifier,\n redirectURL,\n config.createData,\n options,\n );\n\n resolve(authData);\n } catch (err) {\n reject(new ClientResponseError(err));\n }\n\n cleanup();\n });\n\n const replacements: { [key: string]: any } = {\n state: realtime.clientId,\n };\n if (config.scopes?.length) {\n replacements[\"scope\"] = config.scopes.join(\" \");\n }\n\n const url = this._replaceQueryParams(\n provider.authURL + redirectURL,\n replacements,\n );\n\n let urlCallback =\n config.urlCallback ||\n function (url: string) {\n if (eagerDefaultPopup) {\n eagerDefaultPopup.location.href = url;\n } else {\n // it could have been blocked due to its empty initial url,\n // try again...\n eagerDefaultPopup = openBrowserPopup(url);\n }\n };\n\n await urlCallback(url);\n } catch (err) {\n cleanup();\n reject(new ClientResponseError(err));\n }\n });\n })\n .catch((err) => {\n cleanup();\n throw err; // rethrow\n }) as Promise>;\n }\n\n /**\n * Refreshes the current authenticated record instance and\n * returns a new token and record data.\n *\n * On success this method also automatically updates the client's AuthStore.\n *\n * @throws {ClientResponseError}\n */\n async authRefresh(options?: RecordOptions): Promise>;\n\n /**\n * @deprecated\n * Consider using authRefresh(options?).\n */\n async authRefresh(body?: any, query?: any): Promise>;\n\n async authRefresh(\n bodyOrOptions?: any,\n query?: any,\n ): Promise> {\n let options: any = {\n method: \"POST\",\n };\n\n options = normalizeLegacyOptionsArgs(\n \"This form of authRefresh(body?, query?) is deprecated. Consider replacing it with authRefresh(options?).\",\n options,\n bodyOrOptions,\n query,\n );\n\n return this.client\n .send(this.baseCollectionPath + \"/auth-refresh\", options)\n .then((data) => this.authResponse(data));\n }\n\n /**\n * Sends auth record password reset request.\n *\n * @throws {ClientResponseError}\n */\n async requestPasswordReset(email: string, options?: CommonOptions): Promise;\n\n /**\n * @deprecated\n * Consider using requestPasswordReset(email, options?).\n */\n async requestPasswordReset(email: string, body?: any, query?: any): Promise;\n\n async requestPasswordReset(\n email: string,\n bodyOrOptions?: any,\n query?: any,\n ): Promise {\n let options: any = {\n method: \"POST\",\n body: {\n email: email,\n },\n };\n\n options = normalizeLegacyOptionsArgs(\n \"This form of requestPasswordReset(email, body?, query?) is deprecated. Consider replacing it with requestPasswordReset(email, options?).\",\n options,\n bodyOrOptions,\n query,\n );\n\n return this.client\n .send(this.baseCollectionPath + \"/request-password-reset\", options)\n .then(() => true);\n }\n\n /**\n * Confirms auth record password reset request.\n *\n * @throws {ClientResponseError}\n */\n async confirmPasswordReset(\n passwordResetToken: string,\n password: string,\n passwordConfirm: string,\n options?: CommonOptions,\n ): Promise;\n\n /**\n * @deprecated\n * Consider using confirmPasswordReset(passwordResetToken, password, passwordConfirm, options?).\n */\n async confirmPasswordReset(\n passwordResetToken: string,\n password: string,\n passwordConfirm: string,\n body?: any,\n query?: any,\n ): Promise;\n\n async confirmPasswordReset(\n passwordResetToken: string,\n password: string,\n passwordConfirm: string,\n bodyOrOptions?: any,\n query?: any,\n ): Promise {\n let options: any = {\n method: \"POST\",\n body: {\n token: passwordResetToken,\n password: password,\n passwordConfirm: passwordConfirm,\n },\n };\n\n options = normalizeLegacyOptionsArgs(\n \"This form of confirmPasswordReset(token, password, passwordConfirm, body?, query?) is deprecated. Consider replacing it with confirmPasswordReset(token, password, passwordConfirm, options?).\",\n options,\n bodyOrOptions,\n query,\n );\n\n return this.client\n .send(this.baseCollectionPath + \"/confirm-password-reset\", options)\n .then(() => true);\n }\n\n /**\n * Sends auth record verification email request.\n *\n * @throws {ClientResponseError}\n */\n async requestVerification(email: string, options?: CommonOptions): Promise;\n\n /**\n * @deprecated\n * Consider using requestVerification(email, options?).\n */\n async requestVerification(email: string, body?: any, query?: any): Promise;\n\n async requestVerification(\n email: string,\n bodyOrOptions?: any,\n query?: any,\n ): Promise {\n let options: any = {\n method: \"POST\",\n body: {\n email: email,\n },\n };\n\n options = normalizeLegacyOptionsArgs(\n \"This form of requestVerification(email, body?, query?) is deprecated. Consider replacing it with requestVerification(email, options?).\",\n options,\n bodyOrOptions,\n query,\n );\n\n return this.client\n .send(this.baseCollectionPath + \"/request-verification\", options)\n .then(() => true);\n }\n\n /**\n * Confirms auth record email verification request.\n *\n * If the current `client.authStore.record` matches with the auth record from the token,\n * then on success the `client.authStore.record.verified` will be updated to `true`.\n *\n * @throws {ClientResponseError}\n */\n async confirmVerification(\n verificationToken: string,\n options?: CommonOptions,\n ): Promise;\n\n /**\n * @deprecated\n * Consider using confirmVerification(verificationToken, options?).\n */\n async confirmVerification(\n verificationToken: string,\n body?: any,\n query?: any,\n ): Promise;\n\n async confirmVerification(\n verificationToken: string,\n bodyOrOptions?: any,\n query?: any,\n ): Promise {\n let options: any = {\n method: \"POST\",\n body: {\n token: verificationToken,\n },\n };\n\n options = normalizeLegacyOptionsArgs(\n \"This form of confirmVerification(token, body?, query?) is deprecated. Consider replacing it with confirmVerification(token, options?).\",\n options,\n bodyOrOptions,\n query,\n );\n\n return this.client\n .send(this.baseCollectionPath + \"/confirm-verification\", options)\n .then(() => {\n // on success manually update the current auth record verified state\n const payload = getTokenPayload(verificationToken);\n const model = this.client.authStore.record;\n if (\n model &&\n !model.verified &&\n model.id === payload.id &&\n model.collectionId === payload.collectionId\n ) {\n model.verified = true;\n this.client.authStore.save(this.client.authStore.token, model);\n }\n\n return true;\n });\n }\n\n /**\n * Sends an email change request to the authenticated record model.\n *\n * @throws {ClientResponseError}\n */\n async requestEmailChange(newEmail: string, options?: CommonOptions): Promise;\n\n /**\n * @deprecated\n * Consider using requestEmailChange(newEmail, options?).\n */\n async requestEmailChange(newEmail: string, body?: any, query?: any): Promise;\n\n async requestEmailChange(\n newEmail: string,\n bodyOrOptions?: any,\n query?: any,\n ): Promise {\n let options: any = {\n method: \"POST\",\n body: {\n newEmail: newEmail,\n },\n };\n\n options = normalizeLegacyOptionsArgs(\n \"This form of requestEmailChange(newEmail, body?, query?) is deprecated. Consider replacing it with requestEmailChange(newEmail, options?).\",\n options,\n bodyOrOptions,\n query,\n );\n\n return this.client\n .send(this.baseCollectionPath + \"/request-email-change\", options)\n .then(() => true);\n }\n\n /**\n * Confirms auth record's new email address.\n *\n * If the current `client.authStore.record` matches with the auth record from the token,\n * then on success the `client.authStore` will be cleared.\n *\n * @throws {ClientResponseError}\n */\n async confirmEmailChange(\n emailChangeToken: string,\n password: string,\n options?: CommonOptions,\n ): Promise;\n\n /**\n * @deprecated\n * Consider using confirmEmailChange(emailChangeToken, password, options?).\n */\n async confirmEmailChange(\n emailChangeToken: string,\n password: string,\n body?: any,\n query?: any,\n ): Promise;\n\n async confirmEmailChange(\n emailChangeToken: string,\n password: string,\n bodyOrOptions?: any,\n query?: any,\n ): Promise {\n let options: any = {\n method: \"POST\",\n body: {\n token: emailChangeToken,\n password: password,\n },\n };\n\n options = normalizeLegacyOptionsArgs(\n \"This form of confirmEmailChange(token, password, body?, query?) is deprecated. Consider replacing it with confirmEmailChange(token, password, options?).\",\n options,\n bodyOrOptions,\n query,\n );\n\n return this.client\n .send(this.baseCollectionPath + \"/confirm-email-change\", options)\n .then(() => {\n const payload = getTokenPayload(emailChangeToken);\n const model = this.client.authStore.record;\n if (\n model &&\n model.id === payload.id &&\n model.collectionId === payload.collectionId\n ) {\n this.client.authStore.clear();\n }\n\n return true;\n });\n }\n\n /**\n * @deprecated use collection(\"_externalAuths\").*\n *\n * Lists all linked external auth providers for the specified auth record.\n *\n * @throws {ClientResponseError}\n */\n async listExternalAuths(\n recordId: string,\n options?: CommonOptions,\n ): Promise> {\n return this.client.collection(\"_externalAuths\").getFullList(\n Object.assign({}, options, {\n filter: this.client.filter(\"recordRef = {:id}\", { id: recordId }),\n }),\n );\n }\n\n /**\n * @deprecated use collection(\"_externalAuths\").*\n *\n * Unlink a single external auth provider from the specified auth record.\n *\n * @throws {ClientResponseError}\n */\n async unlinkExternalAuth(\n recordId: string,\n provider: string,\n options?: CommonOptions,\n ): Promise {\n const ea = await this.client.collection(\"_externalAuths\").getFirstListItem(\n this.client.filter(\"recordRef = {:recordId} && provider = {:provider}\", {\n recordId,\n provider,\n }),\n );\n\n return this.client\n .collection(\"_externalAuths\")\n .delete(ea.id, options)\n .then(() => true);\n }\n\n /**\n * Sends auth record OTP to the provided email.\n *\n * @throws {ClientResponseError}\n */\n async requestOTP(email: string, options?: CommonOptions): Promise {\n options = Object.assign(\n {\n method: \"POST\",\n body: { email: email },\n },\n options,\n );\n\n return this.client.send(this.baseCollectionPath + \"/request-otp\", options);\n }\n\n /**\n * Authenticate a single auth collection record via OTP.\n *\n * On success, this method also automatically updates\n * the client's AuthStore data and returns:\n * - the authentication token\n * - the authenticated record model\n *\n * @throws {ClientResponseError}\n */\n async authWithOTP(\n otpId: string,\n password: string,\n options?: CommonOptions,\n ): Promise> {\n options = Object.assign(\n {\n method: \"POST\",\n body: { otpId, password },\n },\n options,\n );\n\n return this.client\n .send(this.baseCollectionPath + \"/auth-with-otp\", options)\n .then((data) => this.authResponse(data));\n }\n\n /**\n * Impersonate authenticates with the specified recordId and\n * returns a new client with the received auth token in a memory store.\n *\n * If `duration` is 0 the generated auth token will fallback\n * to the default collection auth token duration.\n *\n * This action currently requires superusers privileges.\n *\n * @throws {ClientResponseError}\n */\n async impersonate(\n recordId: string,\n duration: number,\n options?: CommonOptions,\n ): Promise {\n options = Object.assign(\n {\n method: \"POST\",\n body: { duration: duration },\n },\n options,\n );\n options.headers = options.headers || {};\n if (!options.headers.Authorization) {\n options.headers.Authorization = this.client.authStore.token;\n }\n\n // create a new client loaded with the impersonated auth state\n // ---\n const client = new Client(\n this.client.baseURL,\n new BaseAuthStore(),\n this.client.lang,\n );\n\n const authData = await client.send(\n this.baseCollectionPath + \"/impersonate/\" + encodeURIComponent(recordId),\n options,\n );\n\n client.authStore.save(authData?.token, this.decode(authData?.record || {}));\n // ---\n\n return client;\n }\n\n // ---------------------------------------------------------------\n\n // very rudimentary url query params replacement because at the moment\n // URL (and URLSearchParams) doesn't seem to be fully supported in React Native\n //\n // note: for details behind some of the decode/encode parsing check https://unixpapa.com/js/querystring.html\n private _replaceQueryParams(\n url: string,\n replacements: { [key: string]: any } = {},\n ): string {\n let urlPath = url;\n let query = \"\";\n\n const queryIndex = url.indexOf(\"?\");\n if (queryIndex >= 0) {\n urlPath = url.substring(0, url.indexOf(\"?\"));\n query = url.substring(url.indexOf(\"?\") + 1);\n }\n\n const parsedParams: { [key: string]: string } = {};\n\n // parse the query parameters\n const rawParams = query.split(\"&\");\n for (const param of rawParams) {\n if (param == \"\") {\n continue;\n }\n\n const pair = param.split(\"=\");\n parsedParams[decodeURIComponent(pair[0].replace(/\\+/g, \" \"))] =\n decodeURIComponent((pair[1] || \"\").replace(/\\+/g, \" \"));\n }\n\n // apply the replacements\n for (let key in replacements) {\n if (!replacements.hasOwnProperty(key)) {\n continue;\n }\n\n if (replacements[key] == null) {\n delete parsedParams[key];\n } else {\n parsedParams[key] = replacements[key];\n }\n }\n\n // construct back the full query string\n query = \"\";\n for (let key in parsedParams) {\n if (!parsedParams.hasOwnProperty(key)) {\n continue;\n }\n\n if (query != \"\") {\n query += \"&\";\n }\n\n query +=\n encodeURIComponent(key.replace(/%20/g, \"+\")) +\n \"=\" +\n encodeURIComponent(parsedParams[key].replace(/%20/g, \"+\"));\n }\n\n return query != \"\" ? urlPath + \"?\" + query : urlPath;\n }\n}\n\nfunction openBrowserPopup(url?: string): Window | null {\n if (typeof window === \"undefined\" || !window?.open) {\n throw new ClientResponseError(\n new Error(\n `Not in a browser context - please pass a custom urlCallback function.`,\n ),\n );\n }\n\n let width = 1024;\n let height = 768;\n\n let windowWidth = window.innerWidth;\n let windowHeight = window.innerHeight;\n\n // normalize window size\n width = width > windowWidth ? windowWidth : width;\n height = height > windowHeight ? windowHeight : height;\n\n let left = windowWidth / 2 - width / 2;\n let top = windowHeight / 2 - height / 2;\n\n // note: we don't use the noopener and noreferrer attributes since\n // for some reason browser blocks such windows then url is undefined/blank\n return window.open(\n url,\n \"popup_window\",\n \"width=\" +\n width +\n \",height=\" +\n height +\n \",top=\" +\n top +\n \",left=\" +\n left +\n \",resizable,menubar=no\",\n );\n}\n","import { CrudService } from \"@/services/CrudService\";\nimport { CollectionModel } from \"@/tools/dtos\";\nimport { CommonOptions } from \"@/tools/options\";\n\nexport class CollectionService extends CrudService {\n /**\n * @inheritdoc\n */\n get baseCrudPath(): string {\n return \"/api/collections\";\n }\n\n /**\n * Imports the provided collections.\n *\n * If `deleteMissing` is `true`, all local collections and their fields,\n * that are not present in the imported configuration, WILL BE DELETED\n * (including their related records data)!\n *\n * @throws {ClientResponseError}\n */\n async import(\n collections: Array,\n deleteMissing: boolean = false,\n options?: CommonOptions,\n ): Promise {\n options = Object.assign(\n {\n method: \"PUT\",\n body: {\n collections: collections,\n deleteMissing: deleteMissing,\n },\n },\n options,\n );\n\n return this.client.send(this.baseCrudPath + \"/import\", options).then(() => true);\n }\n\n /**\n * Returns type indexed map with scaffolded collection models\n * populated with their default field values.\n *\n * @throws {ClientResponseError}\n */\n async getScaffolds(\n options?: CommonOptions,\n ): Promise<{ [key: string]: CollectionModel }> {\n options = Object.assign(\n {\n method: \"GET\",\n },\n options,\n );\n\n return this.client.send(this.baseCrudPath + \"/meta/scaffolds\", options);\n }\n\n /**\n * Deletes all records associated with the specified collection.\n *\n * @throws {ClientResponseError}\n */\n async truncate(collectionIdOrName: string, options?: CommonOptions): Promise {\n options = Object.assign(\n {\n method: \"DELETE\",\n },\n options,\n );\n\n return this.client\n .send(\n this.baseCrudPath +\n \"/\" +\n encodeURIComponent(collectionIdOrName) +\n \"/truncate\",\n options,\n )\n .then(() => true);\n }\n}\n","import { ClientResponseError } from \"@/ClientResponseError\";\nimport { BaseService } from \"@/services/BaseService\";\nimport { ListResult, LogModel } from \"@/tools/dtos\";\nimport { CommonOptions, ListOptions, LogStatsOptions } from \"@/tools/options\";\n\nexport interface HourlyStats {\n total: number;\n date: string;\n}\n\nexport class LogService extends BaseService {\n /**\n * Returns paginated logs list.\n *\n * @throws {ClientResponseError}\n */\n async getList(\n page = 1,\n perPage = 30,\n options?: ListOptions,\n ): Promise> {\n options = Object.assign({ method: \"GET\" }, options);\n\n options.query = Object.assign(\n {\n page: page,\n perPage: perPage,\n },\n options.query,\n );\n\n return this.client.send(\"/api/logs\", options);\n }\n\n /**\n * Returns a single log by its id.\n *\n * If `id` is empty it will throw a 404 error.\n *\n * @throws {ClientResponseError}\n */\n async getOne(id: string, options?: CommonOptions): Promise {\n if (!id) {\n throw new ClientResponseError({\n url: this.client.buildURL(\"/api/logs/\"),\n status: 404,\n response: {\n code: 404,\n message: \"Missing required log id.\",\n data: {},\n },\n });\n }\n\n options = Object.assign(\n {\n method: \"GET\",\n },\n options,\n );\n\n return this.client.send(\"/api/logs/\" + encodeURIComponent(id), options);\n }\n\n /**\n * Returns logs statistics.\n *\n * @throws {ClientResponseError}\n */\n async getStats(options?: LogStatsOptions): Promise> {\n options = Object.assign(\n {\n method: \"GET\",\n },\n options,\n );\n\n return this.client.send(\"/api/logs/stats\", options);\n }\n}\n","import { BaseService } from \"@/services/BaseService\";\nimport { CommonOptions } from \"@/tools/options\";\n\nexport interface HealthCheckResponse {\n code: number;\n message: string;\n data: { [key: string]: any };\n}\n\nexport class HealthService extends BaseService {\n /**\n * Checks the health status of the api.\n *\n * @throws {ClientResponseError}\n */\n async check(options?: CommonOptions): Promise {\n options = Object.assign(\n {\n method: \"GET\",\n },\n options,\n );\n\n return this.client.send(\"/api/health\", options);\n }\n}\n","import { BaseService } from \"@/services/BaseService\";\nimport { CommonOptions, FileOptions } from \"@/tools/options\";\n\nexport class FileService extends BaseService {\n /**\n * @deprecated Please replace with `pb.files.getURL()`.\n */\n getUrl(\n record: { [key: string]: any },\n filename: string,\n queryParams: FileOptions = {},\n ): string {\n console.warn(\"Please replace pb.files.getUrl() with pb.files.getURL()\");\n return this.getURL(record, filename, queryParams);\n }\n\n /**\n * Builds and returns an absolute record file url for the provided filename.\n */\n getURL(\n record: { [key: string]: any },\n filename: string,\n queryParams: FileOptions = {},\n ): string {\n if (\n !filename ||\n !record?.id ||\n !(record?.collectionId || record?.collectionName)\n ) {\n return \"\";\n }\n\n const parts = [];\n parts.push(\"api\");\n parts.push(\"files\");\n parts.push(encodeURIComponent(record.collectionId || record.collectionName));\n parts.push(encodeURIComponent(record.id));\n parts.push(encodeURIComponent(filename));\n\n let result = this.client.buildURL(parts.join(\"/\"));\n\n if (Object.keys(queryParams).length) {\n // normalize the download query param for consistency with the Dart sdk\n if (queryParams.download === false) {\n delete queryParams.download;\n }\n\n const params = new URLSearchParams(queryParams);\n\n result += (result.includes(\"?\") ? \"&\" : \"?\") + params;\n }\n\n return result;\n }\n\n /**\n * Requests a new private file access token for the current auth model.\n *\n * @throws {ClientResponseError}\n */\n async getToken(options?: CommonOptions): Promise {\n options = Object.assign(\n {\n method: \"POST\",\n },\n options,\n );\n\n return this.client\n .send(\"/api/files/token\", options)\n .then((data) => data?.token || \"\");\n }\n}\n","import { BaseService } from \"@/services/BaseService\";\nimport { CommonOptions } from \"@/tools/options\";\n\nexport interface BackupFileInfo {\n key: string;\n size: number;\n modified: string;\n}\n\nexport class BackupService extends BaseService {\n /**\n * Returns list with all available backup files.\n *\n * @throws {ClientResponseError}\n */\n async getFullList(options?: CommonOptions): Promise> {\n options = Object.assign(\n {\n method: \"GET\",\n },\n options,\n );\n\n return this.client.send(\"/api/backups\", options);\n }\n\n /**\n * Initializes a new backup.\n *\n * @throws {ClientResponseError}\n */\n async create(basename: string, options?: CommonOptions): Promise {\n options = Object.assign(\n {\n method: \"POST\",\n body: {\n name: basename,\n },\n },\n options,\n );\n\n return this.client.send(\"/api/backups\", options).then(() => true);\n }\n\n /**\n * Uploads an existing backup file.\n *\n * Example:\n *\n * ```js\n * await pb.backups.upload({\n * file: new Blob([...]),\n * });\n * ```\n *\n * @throws {ClientResponseError}\n */\n async upload(\n bodyParams: { [key: string]: any } | FormData,\n options?: CommonOptions,\n ): Promise {\n options = Object.assign(\n {\n method: \"POST\",\n body: bodyParams,\n },\n options,\n );\n\n return this.client.send(\"/api/backups/upload\", options).then(() => true);\n }\n\n /**\n * Deletes a single backup file.\n *\n * @throws {ClientResponseError}\n */\n async delete(key: string, options?: CommonOptions): Promise {\n options = Object.assign(\n {\n method: \"DELETE\",\n },\n options,\n );\n\n return this.client\n .send(`/api/backups/${encodeURIComponent(key)}`, options)\n .then(() => true);\n }\n\n /**\n * Initializes an app data restore from an existing backup.\n *\n * @throws {ClientResponseError}\n */\n async restore(key: string, options?: CommonOptions): Promise {\n options = Object.assign(\n {\n method: \"POST\",\n },\n options,\n );\n\n return this.client\n .send(`/api/backups/${encodeURIComponent(key)}/restore`, options)\n .then(() => true);\n }\n\n /**\n * @deprecated Please use `getDownloadURL()`.\n */\n getDownloadUrl(token: string, key: string): string {\n console.warn(\n \"Please replace pb.backups.getDownloadUrl() with pb.backups.getDownloadURL()\",\n );\n return this.getDownloadURL(token, key);\n }\n\n /**\n * Builds a download url for a single existing backup using a\n * superuser file token and the backup file key.\n *\n * The file token can be generated via `pb.files.getToken()`.\n */\n getDownloadURL(token: string, key: string): string {\n return this.client.buildURL(\n `/api/backups/${encodeURIComponent(key)}?token=${encodeURIComponent(token)}`,\n );\n }\n}\n","import { BaseService } from \"@/services/BaseService\";\nimport { CommonOptions } from \"@/tools/options\";\n\nexport interface CronJob {\n id: string;\n expression: string;\n}\n\nexport class CronService extends BaseService {\n /**\n * Returns list with all registered cron jobs.\n *\n * @throws {ClientResponseError}\n */\n async getFullList(options?: CommonOptions): Promise> {\n options = Object.assign(\n {\n method: \"GET\",\n },\n options,\n );\n\n return this.client.send(\"/api/crons\", options);\n }\n\n /**\n * Runs the specified cron job.\n *\n * @throws {ClientResponseError}\n */\n async run(jobId: string, options?: CommonOptions): Promise {\n options = Object.assign(\n {\n method: \"POST\",\n },\n options,\n );\n\n return this.client\n .send(`/api/crons/${encodeURIComponent(jobId)}`, options)\n .then(() => true);\n }\n}\n","/**\n * Checks if the specified value is a file (aka. File, Blob, RN file object).\n */\nexport function isFile(val: any): boolean {\n return (\n (typeof Blob !== \"undefined\" && val instanceof Blob) ||\n (typeof File !== \"undefined\" && val instanceof File) ||\n // check for React Native file object format\n // (see https://github.com/pocketbase/pocketbase/discussions/2002#discussioncomment-5254168)\n (val !== null &&\n typeof val === \"object\" &&\n val.uri &&\n ((typeof navigator !== \"undefined\" && navigator.product === \"ReactNative\") ||\n (typeof global !== \"undefined\" && (global as any).HermesInternal)))\n );\n}\n\n/**\n * Loosely checks if the specified body is a FormData instance.\n */\nexport function isFormData(body: any): boolean {\n return (\n body &&\n // we are checking the constructor name because FormData\n // is not available natively in some environments and the\n // polyfill(s) may not be globally accessible\n (body.constructor?.name === \"FormData\" ||\n // fallback to global FormData instance check\n // note: this is needed because the constructor.name could be different in case of\n // custom global FormData implementation, eg. React Native on Android/iOS\n (typeof FormData !== \"undefined\" && body instanceof FormData))\n );\n}\n\n/**\n * Checks if the submitted body object has at least one Blob/File field value.\n */\nexport function hasFileField(body: { [key: string]: any }): boolean {\n for (const key in body) {\n const values = Array.isArray(body[key]) ? body[key] : [body[key]];\n for (const v of values) {\n if (isFile(v)) {\n return true;\n }\n }\n }\n\n return false;\n}\n\n/**\n * Converts analyzes the provided body and converts it to FormData\n * in case a plain object with File/Blob values is used.\n */\nexport function convertToFormDataIfNeeded(body: any): any {\n if (\n typeof FormData === \"undefined\" ||\n typeof body === \"undefined\" ||\n typeof body !== \"object\" ||\n body === null ||\n isFormData(body) ||\n !hasFileField(body)\n ) {\n return body;\n }\n\n const form = new FormData();\n\n for (const key in body) {\n const val = body[key];\n\n // skip undefined values for consistency with JSON.stringify\n // (see https://github.com/pocketbase/pocketbase/issues/6731#issuecomment-2812382827)\n if (typeof val === \"undefined\") {\n continue;\n }\n\n if (typeof val === \"object\" && !hasFileField({ data: val })) {\n // send json-like values as jsonPayload to avoid the implicit string value normalization\n let payload: { [key: string]: any } = {};\n payload[key] = val;\n form.append(\"@jsonPayload\", JSON.stringify(payload));\n } else {\n // in case of mixed string and file/blob\n const normalizedVal = Array.isArray(val) ? val : [val];\n for (let v of normalizedVal) {\n form.append(key, v);\n }\n }\n }\n\n return form;\n}\n\n/**\n * Converts the provided FormData instance into a plain object.\n *\n * For consistency with the server multipart/form-data inferring,\n * the following normalization rules are applied for plain multipart string values:\n * - \"true\" is converted to the json \"true\"\n * - \"false\" is converted to the json \"false\"\n * - numeric strings are converted to json number ONLY if the resulted\n * minimal number string representation is the same as the provided raw string\n * (aka. scientific notations, \"Infinity\", \"0.0\", \"0001\", etc. are kept as string)\n * - any other string (empty string too) is left as it is\n */\nexport function convertFormDataToObject(formData: FormData): { [key: string]: any } {\n let result: { [key: string]: any } = {};\n\n formData.forEach((v, k) => {\n if (k === \"@jsonPayload\" && typeof v == \"string\") {\n try {\n let parsed = JSON.parse(v);\n Object.assign(result, parsed);\n } catch (err) {\n console.warn(\"@jsonPayload error:\", err);\n }\n } else {\n if (typeof result[k] !== \"undefined\") {\n if (!Array.isArray(result[k])) {\n result[k] = [result[k]];\n }\n result[k].push(inferFormDataValue(v));\n } else {\n result[k] = inferFormDataValue(v);\n }\n }\n });\n\n return result;\n}\n\nconst inferNumberCharsRegex = /^[\\-\\.\\d]+$/;\n\nfunction inferFormDataValue(value: any): any {\n if (typeof value != \"string\") {\n return value;\n }\n\n if (value == \"true\") {\n return true;\n }\n\n if (value == \"false\") {\n return false;\n }\n\n // note: expects the provided raw string to match exactly with the minimal string representation of the parsed number\n if (\n (value[0] === \"-\" || (value[0] >= \"0\" && value[0] <= \"9\")) &&\n inferNumberCharsRegex.test(value)\n ) {\n let num = +value;\n if (\"\" + num === value) {\n return num;\n }\n }\n\n return value;\n}\n","import { BaseService } from \"@/services/BaseService\";\nimport { isFile, isFormData, convertFormDataToObject } from \"@/tools/formdata\";\nimport {\n SendOptions,\n RecordOptions,\n normalizeUnknownQueryParams,\n serializeQueryParams,\n} from \"@/tools/options\";\n\nexport interface BatchRequest {\n method: string;\n url: string;\n json?: { [key: string]: any };\n files?: { [key: string]: Array };\n headers?: { [key: string]: string };\n}\n\nexport interface BatchRequestResult {\n status: number;\n body: any;\n}\n\nexport class BatchService extends BaseService {\n private requests: Array = [];\n private subs: { [key: string]: SubBatchService } = {};\n\n /**\n * Starts constructing a batch request entry for the specified collection.\n */\n collection(collectionIdOrName: string): SubBatchService {\n if (!this.subs[collectionIdOrName]) {\n this.subs[collectionIdOrName] = new SubBatchService(\n this.requests,\n collectionIdOrName,\n );\n }\n\n return this.subs[collectionIdOrName];\n }\n\n /**\n * Sends the batch requests.\n *\n * @throws {ClientResponseError}\n */\n async send(options?: SendOptions): Promise> {\n const formData = new FormData();\n\n const jsonData = [];\n\n for (let i = 0; i < this.requests.length; i++) {\n const req = this.requests[i];\n\n jsonData.push({\n method: req.method,\n url: req.url,\n headers: req.headers,\n body: req.json,\n });\n\n if (req.files) {\n for (let key in req.files) {\n const files = req.files[key] || [];\n for (let file of files) {\n formData.append(\"requests.\" + i + \".\" + key, file);\n }\n }\n }\n }\n\n formData.append(\"@jsonPayload\", JSON.stringify({ requests: jsonData }));\n\n options = Object.assign(\n {\n method: \"POST\",\n body: formData,\n },\n options,\n );\n\n return this.client.send(\"/api/batch\", options);\n }\n}\n\nexport class SubBatchService {\n private requests: Array = [];\n private readonly collectionIdOrName: string;\n\n constructor(requests: Array, collectionIdOrName: string) {\n this.requests = requests;\n this.collectionIdOrName = collectionIdOrName;\n }\n\n /**\n * Registers a record upsert request into the current batch queue.\n *\n * The request will be executed as update if `bodyParams` have a valid existing record `id` value, otherwise - create.\n */\n upsert(\n bodyParams?: { [key: string]: any } | FormData,\n options?: RecordOptions,\n ): void {\n options = Object.assign(\n {\n body: bodyParams || {},\n },\n options,\n );\n\n const request: BatchRequest = {\n method: \"PUT\",\n url:\n \"/api/collections/\" +\n encodeURIComponent(this.collectionIdOrName) +\n \"/records\",\n };\n\n this.prepareRequest(request, options);\n\n this.requests.push(request);\n }\n\n /**\n * Registers a record create request into the current batch queue.\n */\n create(\n bodyParams?: { [key: string]: any } | FormData,\n options?: RecordOptions,\n ): void {\n options = Object.assign(\n {\n body: bodyParams || {},\n },\n options,\n );\n\n const request: BatchRequest = {\n method: \"POST\",\n url:\n \"/api/collections/\" +\n encodeURIComponent(this.collectionIdOrName) +\n \"/records\",\n };\n\n this.prepareRequest(request, options);\n\n this.requests.push(request);\n }\n\n /**\n * Registers a record update request into the current batch queue.\n */\n update(\n id: string,\n bodyParams?: { [key: string]: any } | FormData,\n options?: RecordOptions,\n ): void {\n options = Object.assign(\n {\n body: bodyParams || {},\n },\n options,\n );\n\n const request: BatchRequest = {\n method: \"PATCH\",\n url:\n \"/api/collections/\" +\n encodeURIComponent(this.collectionIdOrName) +\n \"/records/\" +\n encodeURIComponent(id),\n };\n\n this.prepareRequest(request, options);\n\n this.requests.push(request);\n }\n\n /**\n * Registers a record delete request into the current batch queue.\n */\n delete(id: string, options?: SendOptions): void {\n options = Object.assign({}, options);\n\n const request: BatchRequest = {\n method: \"DELETE\",\n url:\n \"/api/collections/\" +\n encodeURIComponent(this.collectionIdOrName) +\n \"/records/\" +\n encodeURIComponent(id),\n };\n\n this.prepareRequest(request, options);\n\n this.requests.push(request);\n }\n\n private prepareRequest(request: BatchRequest, options: SendOptions) {\n normalizeUnknownQueryParams(options);\n\n request.headers = options.headers;\n request.json = {};\n request.files = {};\n\n // serialize query parameters\n // -----------------------------------------------------------\n if (typeof options.query !== \"undefined\") {\n const query = serializeQueryParams(options.query);\n if (query) {\n request.url += (request.url.includes(\"?\") ? \"&\" : \"?\") + query;\n }\n }\n\n // extract json and files body data\n // -----------------------------------------------------------\n let body = options.body;\n if (isFormData(body)) {\n body = convertFormDataToObject(body);\n }\n\n for (const key in body) {\n const val = body[key];\n\n if (isFile(val)) {\n request.files[key] = request.files[key] || [];\n request.files[key].push(val);\n } else if (Array.isArray(val)) {\n const foundFiles = [];\n const foundRegular = [];\n for (const v of val) {\n if (isFile(v)) {\n foundFiles.push(v);\n } else {\n foundRegular.push(v);\n }\n }\n\n if (foundFiles.length > 0 && foundFiles.length == val.length) {\n // only files\n // ---\n request.files[key] = request.files[key] || [];\n for (let file of foundFiles) {\n request.files[key].push(file);\n }\n } else {\n // empty or mixed array (both regular and File/Blob values)\n // ---\n request.json[key] = foundRegular;\n\n if (foundFiles.length > 0) {\n // add \"+\" to append if not already since otherwise\n // the existing regular files will be deleted\n // (the mixed values order is preserved only within their corresponding groups)\n let fileKey = key;\n if (!key.startsWith(\"+\") && !key.endsWith(\"+\")) {\n fileKey += \"+\";\n }\n\n request.files[fileKey] = request.files[fileKey] || [];\n for (let file of foundFiles) {\n request.files[fileKey].push(file);\n }\n }\n }\n } else {\n request.json[key] = val;\n }\n }\n }\n}\n","import { ClientResponseError } from \"@/ClientResponseError\";\nimport { BaseAuthStore } from \"@/stores/BaseAuthStore\";\nimport { LocalAuthStore } from \"@/stores/LocalAuthStore\";\nimport { SettingsService } from \"@/services/SettingsService\";\nimport { RecordService } from \"@/services/RecordService\";\nimport { CollectionService } from \"@/services/CollectionService\";\nimport { LogService } from \"@/services/LogService\";\nimport { RealtimeService } from \"@/services/RealtimeService\";\nimport { HealthService } from \"@/services/HealthService\";\nimport { FileService } from \"@/services/FileService\";\nimport { BackupService } from \"@/services/BackupService\";\nimport { CronService } from \"@/services/CronService\";\nimport { BatchService } from \"@/services/BatchService\";\nimport { RecordModel } from \"@/tools/dtos\";\nimport {\n SendOptions,\n FileOptions,\n normalizeUnknownQueryParams,\n serializeQueryParams,\n} from \"@/tools/options\";\nimport { isFormData, convertToFormDataIfNeeded } from \"@/tools/formdata\";\n\nexport interface BeforeSendResult {\n [key: string]: any; // for backward compatibility\n url?: string;\n options?: { [key: string]: any };\n}\n\n/**\n * PocketBase JS Client.\n */\nexport default class Client {\n /**\n * The base PocketBase backend url address (eg. 'http://127.0.0.1.8090').\n */\n baseURL: string;\n\n /**\n * Legacy getter alias for baseURL.\n * @deprecated Please replace with baseURL.\n */\n get baseUrl(): string {\n return this.baseURL;\n }\n\n /**\n * Legacy setter alias for baseURL.\n * @deprecated Please replace with baseURL.\n */\n set baseUrl(v: string) {\n this.baseURL = v;\n }\n\n /**\n * Hook that get triggered right before sending the fetch request,\n * allowing you to inspect and modify the url and request options.\n *\n * For list of the possible options check https://developer.mozilla.org/en-US/docs/Web/API/fetch#options\n *\n * You can return a non-empty result object `{ url, options }` to replace the url and request options entirely.\n *\n * Example:\n * ```js\n * const pb = new PocketBase(\"https://example.com\")\n *\n * pb.beforeSend = function (url, options) {\n * options.headers = Object.assign({}, options.headers, {\n * 'X-Custom-Header': 'example',\n * })\n *\n * return { url, options }\n * }\n *\n * // use the created client as usual...\n * ```\n */\n beforeSend?: (\n url: string,\n options: SendOptions,\n ) => BeforeSendResult | Promise;\n\n /**\n * Hook that get triggered after successfully sending the fetch request,\n * allowing you to inspect/modify the response object and its parsed data.\n *\n * Returns the new Promise resolved `data` that will be returned to the client.\n *\n * Example:\n * ```js\n * const pb = new PocketBase(\"https://example.com\")\n *\n * pb.afterSend = function (response, data, options) {\n * if (response.status != 200) {\n * throw new ClientResponseError({\n * url: response.url,\n * status: response.status,\n * response: { ... },\n * })\n * }\n *\n * return data;\n * }\n *\n * // use the created client as usual...\n * ```\n */\n afterSend?: ((response: Response, data: any) => any) &\n ((response: Response, data: any, options: SendOptions) => any);\n\n /**\n * Optional language code (default to `en-US`) that will be sent\n * with the requests to the server as `Accept-Language` header.\n */\n lang: string;\n\n /**\n * A replaceable instance of the local auth store service.\n */\n authStore: BaseAuthStore;\n\n /**\n * An instance of the service that handles the **Settings APIs**.\n */\n readonly settings: SettingsService;\n\n /**\n * An instance of the service that handles the **Collection APIs**.\n */\n readonly collections: CollectionService;\n\n /**\n * An instance of the service that handles the **File APIs**.\n */\n readonly files: FileService;\n\n /**\n * An instance of the service that handles the **Log APIs**.\n */\n readonly logs: LogService;\n\n /**\n * An instance of the service that handles the **Realtime APIs**.\n */\n readonly realtime: RealtimeService;\n\n /**\n * An instance of the service that handles the **Health APIs**.\n */\n readonly health: HealthService;\n\n /**\n * An instance of the service that handles the **Backup APIs**.\n */\n readonly backups: BackupService;\n\n /**\n * An instance of the service that handles the **Cron APIs**.\n */\n readonly crons: CronService;\n\n private cancelControllers: { [key: string]: AbortController } = {};\n private recordServices: { [key: string]: RecordService } = {};\n private enableAutoCancellation: boolean = true;\n\n constructor(baseURL = \"/\", authStore?: BaseAuthStore | null, lang = \"en-US\") {\n this.baseURL = baseURL;\n this.lang = lang;\n\n if (authStore) {\n this.authStore = authStore;\n } else if (typeof window != \"undefined\" && !!(window as any).Deno) {\n // note: to avoid common security issues we fallback to runtime/memory store in case the code is running in Deno env\n this.authStore = new BaseAuthStore();\n } else {\n this.authStore = new LocalAuthStore();\n }\n\n // common services\n this.collections = new CollectionService(this);\n this.files = new FileService(this);\n this.logs = new LogService(this);\n this.settings = new SettingsService(this);\n this.realtime = new RealtimeService(this);\n this.health = new HealthService(this);\n this.backups = new BackupService(this);\n this.crons = new CronService(this);\n }\n\n /**\n * @deprecated\n * With PocketBase v0.23.0 admins are converted to a regular auth\n * collection named \"_superusers\", aka. you can use directly collection(\"_superusers\").\n */\n get admins(): RecordService {\n return this.collection(\"_superusers\");\n }\n\n /**\n * Creates a new batch handler for sending multiple transactional\n * create/update/upsert/delete collection requests in one network call.\n *\n * Example:\n * ```js\n * const batch = pb.createBatch();\n *\n * batch.collection(\"example1\").create({ ... })\n * batch.collection(\"example2\").update(\"RECORD_ID\", { ... })\n * batch.collection(\"example3\").delete(\"RECORD_ID\")\n * batch.collection(\"example4\").upsert({ ... })\n *\n * await batch.send()\n * ```\n */\n createBatch(): BatchService {\n return new BatchService(this);\n }\n\n /**\n * Returns the RecordService associated to the specified collection.\n */\n collection(idOrName: string): RecordService {\n if (!this.recordServices[idOrName]) {\n this.recordServices[idOrName] = new RecordService(this, idOrName);\n }\n\n return this.recordServices[idOrName];\n }\n\n /**\n * Globally enable or disable auto cancellation for pending duplicated requests.\n */\n autoCancellation(enable: boolean): Client {\n this.enableAutoCancellation = !!enable;\n\n return this;\n }\n\n /**\n * Cancels single request by its cancellation key.\n */\n cancelRequest(requestKey: string): Client {\n if (this.cancelControllers[requestKey]) {\n this.cancelControllers[requestKey].abort();\n delete this.cancelControllers[requestKey];\n }\n\n return this;\n }\n\n /**\n * Cancels all pending requests.\n */\n cancelAllRequests(): Client {\n for (let k in this.cancelControllers) {\n this.cancelControllers[k].abort();\n }\n\n this.cancelControllers = {};\n\n return this;\n }\n\n /**\n * Constructs a filter expression with placeholders populated from a parameters object.\n *\n * Placeholder parameters are defined with the `{:paramName}` notation.\n *\n * The following parameter values are supported:\n *\n * - `string` (_single quotes are autoescaped_)\n * - `number`\n * - `boolean`\n * - `Date` object (_stringified into the PocketBase datetime format_)\n * - `null`\n * - everything else is converted to a string using `JSON.stringify()`\n *\n * Example:\n *\n * ```js\n * pb.collection(\"example\").getFirstListItem(pb.filter(\n * 'title ~ {:title} && created >= {:created}',\n * { title: \"example\", created: new Date()}\n * ))\n * ```\n */\n filter(raw: string, params?: { [key: string]: any }): string {\n if (!params) {\n return raw;\n }\n\n for (let key in params) {\n let val = params[key];\n switch (typeof val) {\n case \"boolean\":\n case \"number\":\n val = \"\" + val;\n break;\n case \"string\":\n val = \"'\" + val.replace(/'/g, \"\\\\'\") + \"'\";\n break;\n default:\n if (val === null) {\n val = \"null\";\n } else if (val instanceof Date) {\n val = \"'\" + val.toISOString().replace(\"T\", \" \") + \"'\";\n } else {\n val = \"'\" + JSON.stringify(val).replace(/'/g, \"\\\\'\") + \"'\";\n }\n }\n raw = raw.replaceAll(\"{:\" + key + \"}\", val);\n }\n\n return raw;\n }\n\n /**\n * @deprecated Please use `pb.files.getURL()`.\n */\n getFileUrl(\n record: { [key: string]: any },\n filename: string,\n queryParams: FileOptions = {},\n ): string {\n console.warn(\"Please replace pb.getFileUrl() with pb.files.getURL()\");\n return this.files.getURL(record, filename, queryParams);\n }\n\n /**\n * @deprecated Please use `pb.buildURL()`.\n */\n buildUrl(path: string): string {\n console.warn(\"Please replace pb.buildUrl() with pb.buildURL()\");\n return this.buildURL(path);\n }\n\n /**\n * Builds a full client url by safely concatenating the provided path.\n */\n buildURL(path: string): string {\n let url = this.baseURL;\n\n // construct an absolute base url if in a browser environment\n if (\n typeof window !== \"undefined\" &&\n !!window.location &&\n !url.startsWith(\"https://\") &&\n !url.startsWith(\"http://\")\n ) {\n url = window.location.origin?.endsWith(\"/\")\n ? window.location.origin.substring(0, window.location.origin.length - 1)\n : window.location.origin || \"\";\n\n if (!this.baseURL.startsWith(\"/\")) {\n url += window.location.pathname || \"/\";\n url += url.endsWith(\"/\") ? \"\" : \"/\";\n }\n\n url += this.baseURL;\n }\n\n // concatenate the path\n if (path) {\n url += url.endsWith(\"/\") ? \"\" : \"/\"; // append trailing slash if missing\n url += path.startsWith(\"/\") ? path.substring(1) : path;\n }\n\n return url;\n }\n\n /**\n * Sends an api http request.\n *\n * @throws {ClientResponseError}\n */\n async send(path: string, options: SendOptions): Promise {\n options = this.initSendOptions(path, options);\n\n // build url + path\n let url = this.buildURL(path);\n\n if (this.beforeSend) {\n const result = Object.assign({}, await this.beforeSend(url, options));\n if (\n typeof result.url !== \"undefined\" ||\n typeof result.options !== \"undefined\"\n ) {\n url = result.url || url;\n options = result.options || options;\n } else if (Object.keys(result).length) {\n // legacy behavior\n options = result as SendOptions;\n console?.warn &&\n console.warn(\n \"Deprecated format of beforeSend return: please use `return { url, options }`, instead of `return options`.\",\n );\n }\n }\n\n // serialize the query parameters\n if (typeof options.query !== \"undefined\") {\n const query = serializeQueryParams(options.query);\n if (query) {\n url += (url.includes(\"?\") ? \"&\" : \"?\") + query;\n }\n delete options.query;\n }\n\n // ensures that the json body is serialized\n if (\n this.getHeader(options.headers, \"Content-Type\") == \"application/json\" &&\n options.body &&\n typeof options.body !== \"string\"\n ) {\n options.body = JSON.stringify(options.body);\n }\n\n // early throw an abort error in case the request was already cancelled\n const fetchFunc = options.fetch || fetch;\n\n // send the request\n return fetchFunc(url, options)\n .then(async (response) => {\n let data: any = {};\n\n try {\n data = await response.json();\n } catch (err) {\n // @todo map against the response content type\n // all api responses are expected to return json\n // with exception of the realtime events and 204\n if (\n options.signal?.aborted ||\n (\n typeof DOMException !== \"undefined\" && err instanceof DOMException &&\n // https://developer.mozilla.org/en-US/docs/Web/API/DOMException#aborterror\n (err.name == \"AbortError\" || err.code == 20)\n )\n ) {\n throw err;\n }\n }\n\n if (this.afterSend) {\n data = await this.afterSend(response, data, options);\n }\n\n if (response.status >= 400) {\n throw new ClientResponseError({\n url: response.url,\n status: response.status,\n data: data,\n });\n }\n\n return data as T;\n })\n .catch((err) => {\n // wrap to normalize all errors\n throw new ClientResponseError(err);\n });\n }\n\n /**\n * Shallow copy the provided object and takes care to initialize\n * any options required to preserve the backward compatability.\n *\n * @param {SendOptions} options\n * @return {SendOptions}\n */\n private initSendOptions(path: string, options: SendOptions): SendOptions {\n options = Object.assign({ method: \"GET\" } as SendOptions, options);\n\n // auto convert the body to FormData, if needed\n options.body = convertToFormDataIfNeeded(options.body);\n\n // move unknown send options as query parameters\n normalizeUnknownQueryParams(options);\n\n // requestKey normalizations for backward-compatibility\n // ---\n options.query = Object.assign({}, options.params, options.query);\n if (typeof options.requestKey === \"undefined\") {\n if (options.$autoCancel === false || options.query.$autoCancel === false) {\n options.requestKey = null;\n } else if (options.$cancelKey || options.query.$cancelKey) {\n options.requestKey = options.$cancelKey || options.query.$cancelKey;\n }\n }\n // remove the deprecated special cancellation params from the other query params\n delete options.$autoCancel;\n delete options.query.$autoCancel;\n delete options.$cancelKey;\n delete options.query.$cancelKey;\n // ---\n\n // add the json header, if not explicitly set\n // (for FormData body the Content-Type header should be skipped since the boundary is autogenerated)\n if (\n this.getHeader(options.headers, \"Content-Type\") === null &&\n !isFormData(options.body)\n ) {\n options.headers = Object.assign({}, options.headers, {\n \"Content-Type\": \"application/json\",\n });\n }\n\n // add Accept-Language header, if not explicitly set\n if (this.getHeader(options.headers, \"Accept-Language\") === null) {\n options.headers = Object.assign({}, options.headers, {\n \"Accept-Language\": this.lang,\n });\n }\n\n // check if Authorization header can be added\n if (\n // has valid token\n this.authStore.token &&\n // auth header is not explicitly set\n this.getHeader(options.headers, \"Authorization\") === null\n ) {\n options.headers = Object.assign({}, options.headers, {\n Authorization: this.authStore.token,\n });\n }\n\n // handle auto cancelation for duplicated pending request\n if (this.enableAutoCancellation && options.requestKey !== null) {\n const requestKey = options.requestKey || (options.method || \"GET\") + path;\n\n delete options.requestKey;\n\n // cancel previous pending requests\n this.cancelRequest(requestKey);\n\n const controller = new AbortController();\n this.cancelControllers[requestKey] = controller;\n options.signal = controller.signal;\n }\n\n return options;\n }\n\n /**\n * Extracts the header with the provided name in case-insensitive manner.\n * Returns `null` if no header matching the name is found.\n */\n private getHeader(\n headers: { [key: string]: string } | undefined,\n name: string,\n ): string | null {\n headers = headers || {};\n name = name.toLowerCase();\n\n for (let key in headers) {\n if (key.toLowerCase() == name) {\n return headers[key];\n }\n }\n\n return null;\n }\n}\n"],"names":["ClientResponseError","Error","constructor","errData","super","this","url","status","response","isAbort","originalError","Object","setPrototypeOf","prototype","data","DOMException","name","code","message","cause","includes","toJSON","fieldContentRegExp","cookieSerialize","val","options","opt","assign","encode","defaultEncode","test","TypeError","value","result","maxAge","isNaN","isFinite","Math","floor","domain","path","expires","isDate","toString","call","Date","valueOf","toUTCString","httpOnly","secure","priority","toLowerCase","sameSite","defaultDecode","indexOf","decodeURIComponent","encodeURIComponent","isReactNative","navigator","product","global","HermesInternal","atobPolyfill","getTokenPayload","token","encodedPayload","split","map","c","charCodeAt","slice","join","JSON","parse","e","isTokenExpired","expirationThreshold","payload","keys","length","exp","now","atob","input","str","String","replace","bs","buffer","bc","idx","output","charAt","fromCharCode","defaultCookieKey","BaseAuthStore","baseToken","baseModel","_onChangeCallbacks","record","model","isValid","isSuperuser","type","collectionName","collectionId","isAdmin","console","warn","isAuthRecord","save","triggerChange","clear","loadFromCookie","cookie","key","rawData","cookieParse","decode","index","eqIdx","endIdx","lastIndexOf","trim","undefined","_","Array","isArray","exportToCookie","defaultOptions","stringify","resultLength","Blob","size","id","email","extraProps","prop","onChange","callback","fireImmediately","push","i","splice","LocalAuthStore","storageKey","storageFallback","_bindStorageEvent","_storageGet","_storageSet","_storageRemove","window","localStorage","rawValue","getItem","normalizedVal","setItem","removeItem","addEventListener","BaseService","client","SettingsService","getAll","method","send","update","bodyParams","body","testS3","filesystem","then","testEmail","collectionIdOrName","toEmail","emailTemplate","template","collection","generateAppleClientSecret","clientId","teamId","keyId","privateKey","duration","knownSendOptionsKeys","normalizeUnknownQueryParams","query","serializeQueryParams","params","encodedKey","arrValue","v","prepareQueryParamValue","toISOString","RealtimeService","eventSource","subscriptions","lastSentSubscriptions","maxConnectTimeout","reconnectAttempts","maxReconnectAttempts","Infinity","predefinedReconnectIntervals","pendingConnects","isConnected","subscribe","topic","serialized","headers","listener","msgEvent","submitSubscriptions","connect","async","unsubscribeByTopicAndListener","unsubscribe","needToSubmit","subs","getSubscriptionsByTopic","hasSubscriptionListeners","removeEventListener","disconnect","unsubscribeByPrefix","keyPrefix","hasAtleastOneTopic","startsWith","exist","keyToCheck","addAllSubscriptionListeners","getNonEmptySubscriptionKeys","requestKey","getSubscriptionsCancelKey","catch","err","removeAllSubscriptionListeners","Promise","resolve","reject","initConnect","clearTimeout","connectTimeoutId","setTimeout","connectErrorHandler","EventSource","buildURL","onerror","lastEventId","retries","hasUnsentSubscriptions","p","reconnectTimeoutId","connectSubs","latestTopics","t","timeout","fromReconnect","onDisconnect","cancelRequest","close","CrudService","getFullList","batchOrqueryParams","_getFullList","batch","getList","page","perPage","baseCrudPath","responseData","items","item","getFirstListItem","filter","skipTotal","getOne","create","batchSize","request","list","concat","normalizeLegacyOptionsArgs","legacyWarn","baseOptions","bodyOrOptions","hasQuery","resetAutoRefresh","_resetAutoRefresh","RecordService","baseCollectionPath","isSuperusers","realtime","batchOrOptions","authStore","authExpand","expand","authRecord","delete","success","authResponse","listAuthMethods","fields","authWithPassword","usernameOrEmail","password","autoRefreshThreshold","identity","autoRefresh","authData","registerAutoRefresh","threshold","refreshFunc","reauthenticateFunc","oldBeforeSend","beforeSend","oldModel","unsubStoreChange","newToken","sendOptions","oldToken","authRefresh","authWithOAuth2Code","provider","codeVerifier","redirectURL","createData","authWithOAuth2","args","config","eagerDefaultPopup","urlCallback","openBrowserPopup","cleanup","requestKeyOptions","authMethods","oauth2","providers","find","cancelController","signal","onabort","oldState","state","error","scopes","replacements","_replaceQueryParams","authURL","location","href","requestPasswordReset","confirmPasswordReset","passwordResetToken","passwordConfirm","requestVerification","confirmVerification","verificationToken","verified","requestEmailChange","newEmail","confirmEmailChange","emailChangeToken","listExternalAuths","recordId","unlinkExternalAuth","ea","requestOTP","authWithOTP","otpId","impersonate","Authorization","Client","baseURL","lang","urlPath","substring","parsedParams","rawParams","param","pair","hasOwnProperty","open","width","height","windowWidth","innerWidth","windowHeight","innerHeight","left","top","CollectionService","import","collections","deleteMissing","getScaffolds","truncate","LogService","getStats","HealthService","check","FileService","getUrl","filename","queryParams","getURL","parts","download","URLSearchParams","getToken","BackupService","basename","upload","restore","getDownloadUrl","getDownloadURL","CronService","run","jobId","isFile","File","uri","isFormData","FormData","hasFileField","values","inferNumberCharsRegex","inferFormDataValue","num","BatchService","requests","SubBatchService","formData","jsonData","req","json","files","file","append","upsert","prepareRequest","convertFormDataToObject","forEach","k","parsed","foundFiles","foundRegular","fileKey","endsWith","baseUrl","cancelControllers","recordServices","enableAutoCancellation","Deno","logs","settings","health","backups","crons","admins","createBatch","idOrName","autoCancellation","enable","abort","cancelAllRequests","raw","replaceAll","getFileUrl","buildUrl","origin","pathname","initSendOptions","getHeader","fetch","aborted","afterSend","convertToFormDataIfNeeded","form","$autoCancel","$cancelKey","controller","AbortController"],"mappings":"aAIM,MAAOA,4BAA4BC,MAOrC,WAAAC,CAAYC,GACRC,MAAM,uBAPVC,KAAGC,IAAW,GACdD,KAAME,OAAW,EACjBF,KAAQG,SAA2B,GACnCH,KAAOI,SAAY,EACnBJ,KAAaK,cAAQ,KAOjBC,OAAOC,eAAeP,KAAML,oBAAoBa,WAEhC,OAAZV,GAAuC,iBAAZA,IAC3BE,KAAKC,IAA6B,iBAAhBH,EAAQG,IAAmBH,EAAQG,IAAM,GAC3DD,KAAKE,OAAmC,iBAAnBJ,EAAQI,OAAsBJ,EAAQI,OAAS,EACpEF,KAAKI,UAAYN,EAAQM,QACzBJ,KAAKK,cAAgBP,EAAQO,cAEJ,OAArBP,EAAQK,UAAiD,iBAArBL,EAAQK,SAC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AQsL,QAAS,CACjDiK,cAAe3W,KAAK8R,UAAUnO,SAKlC3D,KAAK4b,wBAAiD,OAAvBxa,EAAQ4M,WAAqB,CAC5D,MAAMA,EAAa5M,EAAQ4M,aAAe5M,EAAQ0I,QAAU,OAAS3H,SAE9Df,EAAQ4M,WAGfhO,KAAK2P,cAAc3B,GAEnB,MAAMyP,EAAa,IAAIC,gBACvB1d,KAAK0b,kBAAkB1N,GAAcyP,EACrCrc,EAAQwT,OAAS6I,EAAW7I,MAC/B,CAED,OAAOxT,CACV,CAMO,SAAA6b,CACJvQ,EACA/L,GAEA+L,EAAUA,GAAW,GACrB/L,EAAOA,EAAKmC,cAEZ,IAAK,IAAIgE,KAAO4F,EACZ,GAAI5F,EAAIhE,eAAiBnC,EACrB,OAAO+L,EAAQ5F,GAIvB,OAAO,IACV"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/pocketbase/dist/pocketbase.es.d.mts b/PBandGraphScaffold/node_modules/pocketbase/dist/pocketbase.es.d.mts deleted file mode 100644 index df8e682..0000000 --- a/PBandGraphScaffold/node_modules/pocketbase/dist/pocketbase.es.d.mts +++ /dev/null @@ -1,1583 +0,0 @@ -interface ParseOptions { - decode?: (val: string) => string; -} -/** - * Parses the given cookie header string into an object - * The object has the various cookies as keys(names) => values - */ -declare function cookieParse(str: string, options?: ParseOptions): { - [key: string]: any; -}; -interface SerializeOptions { - encode?: (val: string | number | boolean) => string; - maxAge?: number; - domain?: string; - path?: string; - expires?: Date; - httpOnly?: boolean; - secure?: boolean; - priority?: string; - sameSite?: boolean | string; -} -/** - * Serialize data into a cookie header. - * - * Serialize the a name value pair into a cookie string suitable for - * http headers. An optional options object specified cookie parameters. - * - * ```js - * cookieSerialize('foo', 'bar', { httpOnly: true }) // "foo=bar; httpOnly" - * ``` - */ -declare function cookieSerialize(name: string, val: string, options?: SerializeOptions): string; -interface ListResult { - page: number; - perPage: number; - totalItems: number; - totalPages: number; - items: Array; -} -interface BaseModel { - [key: string]: any; - id: string; -} -interface LogModel extends BaseModel { - level: string; - message: string; - created: string; - updated: string; - data: { - [key: string]: any; - }; -} -interface RecordModel extends BaseModel { - collectionId: string; - collectionName: string; - expand?: { - [key: string]: any; - }; -} -// ------------------------------------------------------------------- -// Collection types -// ------------------------------------------------------------------- -interface CollectionField { - [key: string]: any; - id: string; - name: string; - type: string; - system: boolean; - hidden: boolean; - presentable: boolean; -} -interface TokenConfig { - duration: number; - secret?: string; -} -interface AuthAlertConfig { - enabled: boolean; - emailTemplate: EmailTemplate; -} -interface OTPConfig { - enabled: boolean; - duration: number; - length: number; - emailTemplate: EmailTemplate; -} -interface MFAConfig { - enabled: boolean; - duration: number; - rule: string; -} -interface PasswordAuthConfig { - enabled: boolean; - identityFields: Array; -} -interface OAuth2Provider { - pkce?: boolean; - clientId: string; - name: string; - clientSecret: string; - authURL: string; - tokenURL: string; - userInfoURL: string; - displayName: string; - extra?: { - [key: string]: any; - }; -} -interface OAuth2Config { - enabled: boolean; - mappedFields: { - [key: string]: string; - }; - providers: Array; -} -interface EmailTemplate { - subject: string; - body: string; -} -interface collection extends BaseModel { - name: string; - fields: Array; - indexes: Array; - system: boolean; - listRule?: string; - viewRule?: string; - createRule?: string; - updateRule?: string; - deleteRule?: string; -} -interface BaseCollectionModel extends collection { - type: "base"; -} -interface ViewCollectionModel extends collection { - type: "view"; - viewQuery: string; -} -interface AuthCollectionModel extends collection { - type: "auth"; - authRule?: string; - manageRule?: string; - authAlert: AuthAlertConfig; - oauth2: OAuth2Config; - passwordAuth: PasswordAuthConfig; - mfa: MFAConfig; - otp: OTPConfig; - authToken: TokenConfig; - passwordResetToken: TokenConfig; - emailChangeToken: TokenConfig; - verificationToken: TokenConfig; - fileToken: TokenConfig; - verificationTemplate: EmailTemplate; - resetPasswordTemplate: EmailTemplate; - confirmEmailChangeTemplate: EmailTemplate; -} -type CollectionModel = BaseCollectionModel | ViewCollectionModel | AuthCollectionModel; -type AuthRecord = RecordModel | null; -type AuthModel = AuthRecord; // for backward compatibility -// for backward compatibility -type OnStoreChangeFunc = (token: string, record: AuthRecord) => void; -/** - * Base AuthStore class that stores the auth state in runtime memory (aka. only for the duration of the store instane). - * - * Usually you wouldn't use it directly and instead use the builtin LocalAuthStore, AsyncAuthStore - * or extend it with your own custom implementation. - */ -declare class BaseAuthStore { - protected baseToken: string; - protected baseModel: AuthRecord; - private _onChangeCallbacks; - /** - * Retrieves the stored token (if any). - */ - get token(): string; - /** - * Retrieves the stored model data (if any). - */ - get record(): AuthRecord; - /** - * @deprecated use `record` instead. - */ - get model(): AuthRecord; - /** - * Loosely checks if the store has valid token (aka. existing and unexpired exp claim). - */ - get isValid(): boolean; - /** - * Loosely checks whether the currently loaded store state is for superuser. - * - * Alternatively you can also compare directly `pb.authStore.record?.collectionName`. - */ - get isSuperuser(): boolean; - /** - * @deprecated use `isSuperuser` instead or simply check the record.collectionName property. - */ - get isAdmin(): boolean; - /** - * @deprecated use `!isSuperuser` instead or simply check the record.collectionName property. - */ - get isAuthRecord(): boolean; - /** - * Saves the provided new token and model data in the auth store. - */ - save(token: string, record?: AuthRecord): void; - /** - * Removes the stored token and model data form the auth store. - */ - clear(): void; - /** - * Parses the provided cookie string and updates the store state - * with the cookie's token and model data. - * - * NB! This function doesn't validate the token or its data. - * Usually this isn't a concern if you are interacting only with the - * PocketBase API because it has the proper server-side security checks in place, - * but if you are using the store `isValid` state for permission controls - * in a node server (eg. SSR), then it is recommended to call `authRefresh()` - * after loading the cookie to ensure an up-to-date token and model state. - * For example: - * - * ```js - * pb.authStore.loadFromCookie("cookie string..."); - * - * try { - * // get an up-to-date auth store state by veryfing and refreshing the loaded auth model (if any) - * pb.authStore.isValid && await pb.collection('users').authRefresh(); - * } catch (_) { - * // clear the auth store on failed refresh - * pb.authStore.clear(); - * } - * ``` - */ - loadFromCookie(cookie: string, key?: string): void; - /** - * Exports the current store state as cookie string. - * - * By default the following optional attributes are added: - * - Secure - * - HttpOnly - * - SameSite=Strict - * - Path=/ - * - Expires={the token expiration date} - * - * NB! If the generated cookie exceeds 4096 bytes, this method will - * strip the model data to the bare minimum to try to fit within the - * recommended size in https://www.rfc-editor.org/rfc/rfc6265#section-6.1. - */ - exportToCookie(options?: SerializeOptions, key?: string): string; - /** - * Register a callback function that will be called on store change. - * - * You can set the `fireImmediately` argument to true in order to invoke - * the provided callback right after registration. - * - * Returns a removal function that you could call to "unsubscribe" from the changes. - */ - onChange(callback: OnStoreChangeFunc, fireImmediately?: boolean): () => void; - protected triggerChange(): void; -} -/** - * BaseService class that should be inherited from all API services. - */ -declare abstract class BaseService { - readonly client: Client; - constructor(client: Client); -} -interface SendOptions extends RequestInit { - // for backward compatibility and to minimize the verbosity, - // any top-level field that doesn't exist in RequestInit or the - // fields below will be treated as query parameter. - [key: string]: any; - /** - * Optional custom fetch function to use for sending the request. - */ - fetch?: (url: RequestInfo | URL, config?: RequestInit) => Promise; - /** - * Custom headers to send with the requests. - */ - headers?: { - [key: string]: string; - }; - /** - * The body of the request (serialized automatically for json requests). - */ - body?: any; - /** - * Query parameters that will be appended to the request url. - */ - query?: { - [key: string]: any; - }; - /** - * @deprecated use `query` instead - * - * for backward-compatibility `params` values are merged with `query`, - * but this option may get removed in the final v1 release - */ - params?: { - [key: string]: any; - }; - /** - * The request identifier that can be used to cancel pending requests. - */ - requestKey?: string | null; - /** - * @deprecated use `requestKey:string` instead - */ - $cancelKey?: string; - /** - * @deprecated use `requestKey:null` instead - */ - $autoCancel?: boolean; -} -interface CommonOptions extends SendOptions { - fields?: string; -} -interface ListOptions extends CommonOptions { - page?: number; - perPage?: number; - sort?: string; - filter?: string; - skipTotal?: boolean; -} -interface FullListOptions extends ListOptions { - batch?: number; -} -interface RecordOptions extends CommonOptions { - expand?: string; -} -interface RecordListOptions extends ListOptions, RecordOptions { -} -interface RecordFullListOptions extends FullListOptions, RecordOptions { -} -interface RecordSubscribeOptions extends SendOptions { - fields?: string; - filter?: string; - expand?: string; -} -interface LogStatsOptions extends CommonOptions { - filter?: string; -} -interface FileOptions extends CommonOptions { - thumb?: string; - download?: boolean; -} -interface AuthOptions extends CommonOptions { - /** - * If autoRefreshThreshold is set it will take care to auto refresh - * when necessary the auth data before each request to ensure that - * the auth state is always valid. - * - * The value must be in seconds, aka. the amount of seconds - * that will be subtracted from the current token `exp` claim in order - * to determine whether it is going to expire within the specified time threshold. - * - * For example, if you want to auto refresh the token if it is - * going to expire in the next 30mins (or already has expired), - * it can be set to `1800` - */ - autoRefreshThreshold?: number; -} -// modifies in place the provided options by moving unknown send options as query parameters. -declare function normalizeUnknownQueryParams(options?: SendOptions): void; -declare function serializeQueryParams(params: { - [key: string]: any; -}): string; -interface appleClientSecret { - secret: string; -} -declare class SettingsService extends BaseService { - /** - * Fetch all available app settings. - * - * @throws {ClientResponseError} - */ - getAll(options?: CommonOptions): Promise<{ - [key: string]: any; - }>; - /** - * Bulk updates app settings. - * - * @throws {ClientResponseError} - */ - update(bodyParams?: { - [key: string]: any; - } | FormData, options?: CommonOptions): Promise<{ - [key: string]: any; - }>; - /** - * Performs a S3 filesystem connection test. - * - * The currently supported `filesystem` are "storage" and "backups". - * - * @throws {ClientResponseError} - */ - testS3(filesystem?: string, options?: CommonOptions): Promise; - /** - * Sends a test email. - * - * The possible `emailTemplate` values are: - * - verification - * - password-reset - * - email-change - * - * @throws {ClientResponseError} - */ - testEmail(collectionIdOrName: string, toEmail: string, emailTemplate: string, options?: CommonOptions): Promise; - /** - * Generates a new Apple OAuth2 client secret. - * - * @throws {ClientResponseError} - */ - generateAppleClientSecret(clientId: string, teamId: string, keyId: string, privateKey: string, duration: number, options?: CommonOptions): Promise; -} -type UnsubscribeFunc = () => Promise; -declare class RealtimeService extends BaseService { - clientId: string; - private eventSource; - private subscriptions; - private lastSentSubscriptions; - private connectTimeoutId; - private maxConnectTimeout; - private reconnectTimeoutId; - private reconnectAttempts; - private maxReconnectAttempts; - private predefinedReconnectIntervals; - private pendingConnects; - /** - * Returns whether the realtime connection has been established. - */ - get isConnected(): boolean; - /** - * An optional hook that is invoked when the realtime client disconnects - * either when unsubscribing from all subscriptions or when the - * connection was interrupted or closed by the server. - * - * The received argument could be used to determine whether the disconnect - * is a result from unsubscribing (`activeSubscriptions.length == 0`) - * or because of network/server error (`activeSubscriptions.length > 0`). - * - * If you want to listen for the opposite, aka. when the client connection is established, - * subscribe to the `PB_CONNECT` event. - */ - onDisconnect?: (activeSubscriptions: Array) => void; - /** - * Register the subscription listener. - * - * You can subscribe multiple times to the same topic. - * - * If the SSE connection is not started yet, - * this method will also initialize it. - */ - subscribe(topic: string, callback: (data: any) => void, options?: SendOptions): Promise; - /** - * Unsubscribe from all subscription listeners with the specified topic. - * - * If `topic` is not provided, then this method will unsubscribe - * from all active subscriptions. - * - * This method is no-op if there are no active subscriptions. - * - * The related sse connection will be autoclosed if after the - * unsubscribe operation there are no active subscriptions left. - */ - unsubscribe(topic?: string): Promise; - /** - * Unsubscribe from all subscription listeners starting with the specified topic prefix. - * - * This method is no-op if there are no active subscriptions with the specified topic prefix. - * - * The related sse connection will be autoclosed if after the - * unsubscribe operation there are no active subscriptions left. - */ - unsubscribeByPrefix(keyPrefix: string): Promise; - /** - * Unsubscribe from all subscriptions matching the specified topic and listener function. - * - * This method is no-op if there are no active subscription with - * the specified topic and listener. - * - * The related sse connection will be autoclosed if after the - * unsubscribe operation there are no active subscriptions left. - */ - unsubscribeByTopicAndListener(topic: string, listener: EventListener): Promise; - private hasSubscriptionListeners; - private submitSubscriptions; - private getSubscriptionsCancelKey; - private getSubscriptionsByTopic; - private getNonEmptySubscriptionKeys; - private addAllSubscriptionListeners; - private removeAllSubscriptionListeners; - private connect; - private initConnect; - private hasUnsentSubscriptions; - private connectErrorHandler; - private disconnect; -} -declare abstract class CrudService extends BaseService { - /** - * Base path for the crud actions (without trailing slash, eg. '/admins'). - */ - abstract get baseCrudPath(): string; - /** - * Response data decoder. - */ - decode(data: { - [key: string]: any; - }): T; - /** - * Returns a promise with all list items batch fetched at once - * (by default 500 items per request; to change it set the `batch` query param). - * - * You can use the generic T to supply a wrapper type of the crud model. - * - * @throws {ClientResponseError} - */ - getFullList(options?: FullListOptions): Promise>; - /** - * Legacy version of getFullList with explicitly specified batch size. - */ - getFullList(batch?: number, options?: ListOptions): Promise>; - /** - * Returns paginated items list. - * - * You can use the generic T to supply a wrapper type of the crud model. - * - * @throws {ClientResponseError} - */ - getList(page?: number, perPage?: number, options?: ListOptions): Promise>; - /** - * Returns the first found item by the specified filter. - * - * Internally it calls `getList(1, 1, { filter, skipTotal })` and - * returns the first found item. - * - * You can use the generic T to supply a wrapper type of the crud model. - * - * For consistency with `getOne`, this method will throw a 404 - * ClientResponseError if no item was found. - * - * @throws {ClientResponseError} - */ - getFirstListItem(filter: string, options?: CommonOptions): Promise; - /** - * Returns single item by its id. - * - * You can use the generic T to supply a wrapper type of the crud model. - * - * If `id` is empty it will throw a 404 error. - * - * @throws {ClientResponseError} - */ - getOne(id: string, options?: CommonOptions): Promise; - /** - * Creates a new item. - * - * You can use the generic T to supply a wrapper type of the crud model. - * - * @throws {ClientResponseError} - */ - create(bodyParams?: { - [key: string]: any; - } | FormData, options?: CommonOptions): Promise; - /** - * Updates an existing item by its id. - * - * You can use the generic T to supply a wrapper type of the crud model. - * - * @throws {ClientResponseError} - */ - update(id: string, bodyParams?: { - [key: string]: any; - } | FormData, options?: CommonOptions): Promise; - /** - * Deletes an existing item by its id. - * - * @throws {ClientResponseError} - */ - delete(id: string, options?: CommonOptions): Promise; - /** - * Returns a promise with all list items batch fetched at once. - */ - protected _getFullList(batchSize?: number, options?: ListOptions): Promise>; -} -interface RecordAuthResponse { - /** - * The signed PocketBase auth record. - */ - record: T; - /** - * The PocketBase record auth token. - * - * If you are looking for the OAuth2 access and refresh tokens - * they are available under the `meta.accessToken` and `meta.refreshToken` props. - */ - token: string; - /** - * Auth meta data usually filled when OAuth2 is used. - */ - meta?: { - [key: string]: any; - }; -} -interface AuthProviderInfo { - name: string; - displayName: string; - state: string; - authURL: string; - codeVerifier: string; - codeChallenge: string; - codeChallengeMethod: string; -} -interface AuthMethodsList { - mfa: { - enabled: boolean; - duration: number; - }; - otp: { - enabled: boolean; - duration: number; - }; - password: { - enabled: boolean; - identityFields: Array; - }; - oauth2: { - enabled: boolean; - providers: Array; - }; -} -interface RecordSubscription { - action: string; // eg. create, update, delete - record: T; -} -type OAuth2UrlCallback = (url: string) => void | Promise; -interface OAuth2AuthConfig extends SendOptions { - // the name of the OAuth2 provider (eg. "google") - provider: string; - // custom scopes to overwrite the default ones - scopes?: Array; - // optional record create data - createData?: { - [key: string]: any; - }; - // optional callback that is triggered after the OAuth2 sign-in/sign-up url generation - urlCallback?: OAuth2UrlCallback; - // optional query params to send with the PocketBase auth request (eg. fields, expand, etc.) - query?: RecordOptions; -} -interface OTPResponse { - otpId: string; -} -declare class RecordService extends CrudService { - readonly collectionIdOrName: string; - constructor(client: Client, collectionIdOrName: string); - /** - * @inheritdoc - */ - get baseCrudPath(): string; - /** - * Returns the current collection service base path. - */ - get baseCollectionPath(): string; - /** - * Returns whether the current service collection is superusers. - */ - get isSuperusers(): boolean; - // --------------------------------------------------------------- - // Realtime handlers - // --------------------------------------------------------------- - /** - * Subscribe to realtime changes to the specified topic ("*" or record id). - * - * If `topic` is the wildcard "*", then this method will subscribe to - * any record changes in the collection. - * - * If `topic` is a record id, then this method will subscribe only - * to changes of the specified record id. - * - * It's OK to subscribe multiple times to the same topic. - * You can use the returned `UnsubscribeFunc` to remove only a single subscription. - * Or use `unsubscribe(topic)` if you want to remove all subscriptions attached to the topic. - */ - subscribe(topic: string, callback: (data: RecordSubscription) => void, options?: RecordSubscribeOptions): Promise; - /** - * Unsubscribe from all subscriptions of the specified topic - * ("*" or record id). - * - * If `topic` is not set, then this method will unsubscribe from - * all subscriptions associated to the current collection. - */ - unsubscribe(topic?: string): Promise; - // --------------------------------------------------------------- - // Crud handers - // --------------------------------------------------------------- - /** - * @inheritdoc - */ - getFullList(options?: RecordFullListOptions): Promise>; - /** - * @inheritdoc - */ - getFullList(batch?: number, options?: RecordListOptions): Promise>; - /** - * @inheritdoc - */ - getList(page?: number, perPage?: number, options?: RecordListOptions): Promise>; - /** - * @inheritdoc - */ - getFirstListItem(filter: string, options?: RecordListOptions): Promise; - /** - * @inheritdoc - */ - getOne(id: string, options?: RecordOptions): Promise; - /** - * @inheritdoc - */ - create(bodyParams?: { - [key: string]: any; - } | FormData, options?: RecordOptions): Promise; - /** - * @inheritdoc - * - * If the current `client.authStore.record` matches with the updated id, then - * on success the `client.authStore.record` will be updated with the new response record fields. - */ - update(id: string, bodyParams?: { - [key: string]: any; - } | FormData, options?: RecordOptions): Promise; - /** - * @inheritdoc - * - * If the current `client.authStore.record` matches with the deleted id, - * then on success the `client.authStore` will be cleared. - */ - delete(id: string, options?: CommonOptions): Promise; - // --------------------------------------------------------------- - // Auth handlers - // --------------------------------------------------------------- - /** - * Prepare successful collection authorization response. - */ - protected authResponse(responseData: any): RecordAuthResponse; - /** - * Returns all available collection auth methods. - * - * @throws {ClientResponseError} - */ - listAuthMethods(options?: CommonOptions): Promise; - /** - * Authenticate a single auth collection record via its username/email and password. - * - * On success, this method also automatically updates - * the client's AuthStore data and returns: - * - the authentication token - * - the authenticated record model - * - * @throws {ClientResponseError} - */ - authWithPassword(usernameOrEmail: string, password: string, options?: RecordOptions): Promise>; - /** - * Authenticate a single auth collection record with OAuth2 code. - * - * If you don't have an OAuth2 code you may also want to check `authWithOAuth2` method. - * - * On success, this method also automatically updates - * the client's AuthStore data and returns: - * - the authentication token - * - the authenticated record model - * - the OAuth2 account data (eg. name, email, avatar, etc.) - * - * @throws {ClientResponseError} - */ - authWithOAuth2Code(provider: string, code: string, codeVerifier: string, redirectURL: string, createData?: { - [key: string]: any; - }, options?: RecordOptions): Promise>; - /** - * @deprecated - * Consider using authWithOAuth2Code(provider, code, codeVerifier, redirectURL, createdData, options?). - */ - authWithOAuth2Code(provider: string, code: string, codeVerifier: string, redirectURL: string, createData?: { - [key: string]: any; - }, body?: any, query?: any): Promise>; - /** - * @deprecated This form of authWithOAuth2 is deprecated. - * - * Please use `authWithOAuth2Code()` OR its simplified realtime version - * as shown in https://pocketbase.io/docs/authentication/#oauth2-integration. - */ - authWithOAuth2(provider: string, code: string, codeVerifier: string, redirectURL: string, createData?: { - [key: string]: any; - }, bodyParams?: { - [key: string]: any; - }, queryParams?: RecordOptions): Promise>; - /** - * Authenticate a single auth collection record with OAuth2 - * **without custom redirects, deeplinks or even page reload**. - * - * This method initializes a one-off realtime subscription and will - * open a popup window with the OAuth2 vendor page to authenticate. - * Once the external OAuth2 sign-in/sign-up flow is completed, the popup - * window will be automatically closed and the OAuth2 data sent back - * to the user through the previously established realtime connection. - * - * You can specify an optional `urlCallback` prop to customize - * the default url `window.open` behavior. - * - * On success, this method also automatically updates - * the client's AuthStore data and returns: - * - the authentication token - * - the authenticated record model - * - the OAuth2 account data (eg. name, email, avatar, etc.) - * - * Example: - * - * ```js - * const authData = await pb.collection("users").authWithOAuth2({ - * provider: "google", - * }) - * ``` - * - * Note1: When creating the OAuth2 app in the provider dashboard - * you have to configure `https://yourdomain.com/api/oauth2-redirect` - * as redirect URL. - * - * Note2: Safari may block the default `urlCallback` popup because - * it doesn't allow `window.open` calls as part of an `async` click functions. - * To workaround this you can either change your click handler to not be marked as `async` - * OR manually call `window.open` before your `async` function and use the - * window reference in your own custom `urlCallback` (see https://github.com/pocketbase/pocketbase/discussions/2429#discussioncomment-5943061). - * For example: - * ```js - * - * ... - * document.getElementById("btn").addEventListener("click", () => { - * pb.collection("users").authWithOAuth2({ - * provider: "gitlab", - * }).then((authData) => { - * console.log(authData) - * }).catch((err) => { - * console.log(err, err.originalError); - * }); - * }) - * ``` - * - * @throws {ClientResponseError} - */ - authWithOAuth2(options: OAuth2AuthConfig): Promise>; - /** - * Refreshes the current authenticated record instance and - * returns a new token and record data. - * - * On success this method also automatically updates the client's AuthStore. - * - * @throws {ClientResponseError} - */ - authRefresh(options?: RecordOptions): Promise>; - /** - * @deprecated - * Consider using authRefresh(options?). - */ - authRefresh(body?: any, query?: any): Promise>; - /** - * Sends auth record password reset request. - * - * @throws {ClientResponseError} - */ - requestPasswordReset(email: string, options?: CommonOptions): Promise; - /** - * @deprecated - * Consider using requestPasswordReset(email, options?). - */ - requestPasswordReset(email: string, body?: any, query?: any): Promise; - /** - * Confirms auth record password reset request. - * - * @throws {ClientResponseError} - */ - confirmPasswordReset(passwordResetToken: string, password: string, passwordConfirm: string, options?: CommonOptions): Promise; - /** - * @deprecated - * Consider using confirmPasswordReset(passwordResetToken, password, passwordConfirm, options?). - */ - confirmPasswordReset(passwordResetToken: string, password: string, passwordConfirm: string, body?: any, query?: any): Promise; - /** - * Sends auth record verification email request. - * - * @throws {ClientResponseError} - */ - requestVerification(email: string, options?: CommonOptions): Promise; - /** - * @deprecated - * Consider using requestVerification(email, options?). - */ - requestVerification(email: string, body?: any, query?: any): Promise; - /** - * Confirms auth record email verification request. - * - * If the current `client.authStore.record` matches with the auth record from the token, - * then on success the `client.authStore.record.verified` will be updated to `true`. - * - * @throws {ClientResponseError} - */ - confirmVerification(verificationToken: string, options?: CommonOptions): Promise; - /** - * @deprecated - * Consider using confirmVerification(verificationToken, options?). - */ - confirmVerification(verificationToken: string, body?: any, query?: any): Promise; - /** - * Sends an email change request to the authenticated record model. - * - * @throws {ClientResponseError} - */ - requestEmailChange(newEmail: string, options?: CommonOptions): Promise; - /** - * @deprecated - * Consider using requestEmailChange(newEmail, options?). - */ - requestEmailChange(newEmail: string, body?: any, query?: any): Promise; - /** - * Confirms auth record's new email address. - * - * If the current `client.authStore.record` matches with the auth record from the token, - * then on success the `client.authStore` will be cleared. - * - * @throws {ClientResponseError} - */ - confirmEmailChange(emailChangeToken: string, password: string, options?: CommonOptions): Promise; - /** - * @deprecated - * Consider using confirmEmailChange(emailChangeToken, password, options?). - */ - confirmEmailChange(emailChangeToken: string, password: string, body?: any, query?: any): Promise; - /** - * @deprecated use collection("_externalAuths").* - * - * Lists all linked external auth providers for the specified auth record. - * - * @throws {ClientResponseError} - */ - listExternalAuths(recordId: string, options?: CommonOptions): Promise>; - /** - * @deprecated use collection("_externalAuths").* - * - * Unlink a single external auth provider from the specified auth record. - * - * @throws {ClientResponseError} - */ - unlinkExternalAuth(recordId: string, provider: string, options?: CommonOptions): Promise; - /** - * Sends auth record OTP to the provided email. - * - * @throws {ClientResponseError} - */ - requestOTP(email: string, options?: CommonOptions): Promise; - /** - * Authenticate a single auth collection record via OTP. - * - * On success, this method also automatically updates - * the client's AuthStore data and returns: - * - the authentication token - * - the authenticated record model - * - * @throws {ClientResponseError} - */ - authWithOTP(otpId: string, password: string, options?: CommonOptions): Promise>; - /** - * Impersonate authenticates with the specified recordId and - * returns a new client with the received auth token in a memory store. - * - * If `duration` is 0 the generated auth token will fallback - * to the default collection auth token duration. - * - * This action currently requires superusers privileges. - * - * @throws {ClientResponseError} - */ - impersonate(recordId: string, duration: number, options?: CommonOptions): Promise; - // --------------------------------------------------------------- - // very rudimentary url query params replacement because at the moment - // URL (and URLSearchParams) doesn't seem to be fully supported in React Native - // - // note: for details behind some of the decode/encode parsing check https://unixpapa.com/js/querystring.html - private _replaceQueryParams; -} -declare class CollectionService extends CrudService { - /** - * @inheritdoc - */ - get baseCrudPath(): string; - /** - * Imports the provided collections. - * - * If `deleteMissing` is `true`, all local collections and their fields, - * that are not present in the imported configuration, WILL BE DELETED - * (including their related records data)! - * - * @throws {ClientResponseError} - */ - import(collections: Array, deleteMissing?: boolean, options?: CommonOptions): Promise; - /** - * Returns type indexed map with scaffolded collection models - * populated with their default field values. - * - * @throws {ClientResponseError} - */ - getScaffolds(options?: CommonOptions): Promise<{ - [key: string]: CollectionModel; - }>; - /** - * Deletes all records associated with the specified collection. - * - * @throws {ClientResponseError} - */ - truncate(collectionIdOrName: string, options?: CommonOptions): Promise; -} -interface HourlyStats { - total: number; - date: string; -} -declare class LogService extends BaseService { - /** - * Returns paginated logs list. - * - * @throws {ClientResponseError} - */ - getList(page?: number, perPage?: number, options?: ListOptions): Promise>; - /** - * Returns a single log by its id. - * - * If `id` is empty it will throw a 404 error. - * - * @throws {ClientResponseError} - */ - getOne(id: string, options?: CommonOptions): Promise; - /** - * Returns logs statistics. - * - * @throws {ClientResponseError} - */ - getStats(options?: LogStatsOptions): Promise>; -} -interface HealthCheckResponse { - code: number; - message: string; - data: { - [key: string]: any; - }; -} -declare class HealthService extends BaseService { - /** - * Checks the health status of the api. - * - * @throws {ClientResponseError} - */ - check(options?: CommonOptions): Promise; -} -declare class FileService extends BaseService { - /** - * @deprecated Please replace with `pb.files.getURL()`. - */ - getUrl(record: { - [key: string]: any; - }, filename: string, queryParams?: FileOptions): string; - /** - * Builds and returns an absolute record file url for the provided filename. - */ - getURL(record: { - [key: string]: any; - }, filename: string, queryParams?: FileOptions): string; - /** - * Requests a new private file access token for the current auth model. - * - * @throws {ClientResponseError} - */ - getToken(options?: CommonOptions): Promise; -} -interface BackupFileInfo { - key: string; - size: number; - modified: string; -} -declare class BackupService extends BaseService { - /** - * Returns list with all available backup files. - * - * @throws {ClientResponseError} - */ - getFullList(options?: CommonOptions): Promise>; - /** - * Initializes a new backup. - * - * @throws {ClientResponseError} - */ - create(basename: string, options?: CommonOptions): Promise; - /** - * Uploads an existing backup file. - * - * Example: - * - * ```js - * await pb.backups.upload({ - * file: new Blob([...]), - * }); - * ``` - * - * @throws {ClientResponseError} - */ - upload(bodyParams: { - [key: string]: any; - } | FormData, options?: CommonOptions): Promise; - /** - * Deletes a single backup file. - * - * @throws {ClientResponseError} - */ - delete(key: string, options?: CommonOptions): Promise; - /** - * Initializes an app data restore from an existing backup. - * - * @throws {ClientResponseError} - */ - restore(key: string, options?: CommonOptions): Promise; - /** - * @deprecated Please use `getDownloadURL()`. - */ - getDownloadUrl(token: string, key: string): string; - /** - * Builds a download url for a single existing backup using a - * superuser file token and the backup file key. - * - * The file token can be generated via `pb.files.getToken()`. - */ - getDownloadURL(token: string, key: string): string; -} -interface CronJob { - id: string; - expression: string; -} -declare class CronService extends BaseService { - /** - * Returns list with all registered cron jobs. - * - * @throws {ClientResponseError} - */ - getFullList(options?: CommonOptions): Promise>; - /** - * Runs the specified cron job. - * - * @throws {ClientResponseError} - */ - run(jobId: string, options?: CommonOptions): Promise; -} -interface BatchRequest { - method: string; - url: string; - json?: { - [key: string]: any; - }; - files?: { - [key: string]: Array; - }; - headers?: { - [key: string]: string; - }; -} -interface BatchRequestResult { - status: number; - body: any; -} -declare class BatchService extends BaseService { - private requests; - private subs; - /** - * Starts constructing a batch request entry for the specified collection. - */ - collection(collectionIdOrName: string): SubBatchService; - /** - * Sends the batch requests. - * - * @throws {ClientResponseError} - */ - send(options?: SendOptions): Promise>; -} -declare class SubBatchService { - private requests; - private readonly collectionIdOrName; - constructor(requests: Array, collectionIdOrName: string); - /** - * Registers a record upsert request into the current batch queue. - * - * The request will be executed as update if `bodyParams` have a valid existing record `id` value, otherwise - create. - */ - upsert(bodyParams?: { - [key: string]: any; - } | FormData, options?: RecordOptions): void; - /** - * Registers a record create request into the current batch queue. - */ - create(bodyParams?: { - [key: string]: any; - } | FormData, options?: RecordOptions): void; - /** - * Registers a record update request into the current batch queue. - */ - update(id: string, bodyParams?: { - [key: string]: any; - } | FormData, options?: RecordOptions): void; - /** - * Registers a record delete request into the current batch queue. - */ - delete(id: string, options?: SendOptions): void; - private prepareRequest; -} -interface BeforeSendResult { - [key: string]: any; // for backward compatibility - url?: string; - options?: { - [key: string]: any; - }; -} -/** - * PocketBase JS Client. - */ -declare class Client { - /** - * The base PocketBase backend url address (eg. 'http://127.0.0.1.8090'). - */ - baseURL: string; - /** - * Legacy getter alias for baseURL. - * @deprecated Please replace with baseURL. - */ - get baseUrl(): string; - /** - * Legacy setter alias for baseURL. - * @deprecated Please replace with baseURL. - */ - set baseUrl(v: string); - /** - * Hook that get triggered right before sending the fetch request, - * allowing you to inspect and modify the url and request options. - * - * For list of the possible options check https://developer.mozilla.org/en-US/docs/Web/API/fetch#options - * - * You can return a non-empty result object `{ url, options }` to replace the url and request options entirely. - * - * Example: - * ```js - * const pb = new PocketBase("https://example.com") - * - * pb.beforeSend = function (url, options) { - * options.headers = Object.assign({}, options.headers, { - * 'X-Custom-Header': 'example', - * }) - * - * return { url, options } - * } - * - * // use the created client as usual... - * ``` - */ - beforeSend?: (url: string, options: SendOptions) => BeforeSendResult | Promise; - /** - * Hook that get triggered after successfully sending the fetch request, - * allowing you to inspect/modify the response object and its parsed data. - * - * Returns the new Promise resolved `data` that will be returned to the client. - * - * Example: - * ```js - * const pb = new PocketBase("https://example.com") - * - * pb.afterSend = function (response, data, options) { - * if (response.status != 200) { - * throw new ClientResponseError({ - * url: response.url, - * status: response.status, - * response: { ... }, - * }) - * } - * - * return data; - * } - * - * // use the created client as usual... - * ``` - */ - afterSend?: ((response: Response, data: any) => any) & ((response: Response, data: any, options: SendOptions) => any); - /** - * Optional language code (default to `en-US`) that will be sent - * with the requests to the server as `Accept-Language` header. - */ - lang: string; - /** - * A replaceable instance of the local auth store service. - */ - authStore: BaseAuthStore; - /** - * An instance of the service that handles the **Settings APIs**. - */ - readonly settings: SettingsService; - /** - * An instance of the service that handles the **Collection APIs**. - */ - readonly collections: CollectionService; - /** - * An instance of the service that handles the **File APIs**. - */ - readonly files: FileService; - /** - * An instance of the service that handles the **Log APIs**. - */ - readonly logs: LogService; - /** - * An instance of the service that handles the **Realtime APIs**. - */ - readonly realtime: RealtimeService; - /** - * An instance of the service that handles the **Health APIs**. - */ - readonly health: HealthService; - /** - * An instance of the service that handles the **Backup APIs**. - */ - readonly backups: BackupService; - /** - * An instance of the service that handles the **Cron APIs**. - */ - readonly crons: CronService; - private cancelControllers; - private recordServices; - private enableAutoCancellation; - constructor(baseURL?: string, authStore?: BaseAuthStore | null, lang?: string); - /** - * @deprecated - * With PocketBase v0.23.0 admins are converted to a regular auth - * collection named "_superusers", aka. you can use directly collection("_superusers"). - */ - get admins(): RecordService; - /** - * Creates a new batch handler for sending multiple transactional - * create/update/upsert/delete collection requests in one network call. - * - * Example: - * ```js - * const batch = pb.createBatch(); - * - * batch.collection("example1").create({ ... }) - * batch.collection("example2").update("RECORD_ID", { ... }) - * batch.collection("example3").delete("RECORD_ID") - * batch.collection("example4").upsert({ ... }) - * - * await batch.send() - * ``` - */ - createBatch(): BatchService; - /** - * Returns the RecordService associated to the specified collection. - */ - collection(idOrName: string): RecordService; - /** - * Globally enable or disable auto cancellation for pending duplicated requests. - */ - autoCancellation(enable: boolean): Client; - /** - * Cancels single request by its cancellation key. - */ - cancelRequest(requestKey: string): Client; - /** - * Cancels all pending requests. - */ - cancelAllRequests(): Client; - /** - * Constructs a filter expression with placeholders populated from a parameters object. - * - * Placeholder parameters are defined with the `{:paramName}` notation. - * - * The following parameter values are supported: - * - * - `string` (_single quotes are autoescaped_) - * - `number` - * - `boolean` - * - `Date` object (_stringified into the PocketBase datetime format_) - * - `null` - * - everything else is converted to a string using `JSON.stringify()` - * - * Example: - * - * ```js - * pb.collection("example").getFirstListItem(pb.filter( - * 'title ~ {:title} && created >= {:created}', - * { title: "example", created: new Date()} - * )) - * ``` - */ - filter(raw: string, params?: { - [key: string]: any; - }): string; - /** - * @deprecated Please use `pb.files.getURL()`. - */ - getFileUrl(record: { - [key: string]: any; - }, filename: string, queryParams?: FileOptions): string; - /** - * @deprecated Please use `pb.buildURL()`. - */ - buildUrl(path: string): string; - /** - * Builds a full client url by safely concatenating the provided path. - */ - buildURL(path: string): string; - /** - * Sends an api http request. - * - * @throws {ClientResponseError} - */ - send(path: string, options: SendOptions): Promise; - /** - * Shallow copy the provided object and takes care to initialize - * any options required to preserve the backward compatability. - * - * @param {SendOptions} options - * @return {SendOptions} - */ - private initSendOptions; - /** - * Extracts the header with the provided name in case-insensitive manner. - * Returns `null` if no header matching the name is found. - */ - private getHeader; -} -/** - * ClientResponseError is a custom Error class that is intended to wrap - * and normalize any error thrown by `Client.send()`. - */ -declare class ClientResponseError extends Error { - url: string; - status: number; - response: { - [key: string]: any; - }; - isAbort: boolean; - originalError: any; - constructor(errData?: any); - /** - * Alias for `this.response` for backward compatibility. - */ - get data(): { - [key: string]: any; - }; - /** - * Make a POJO's copy of the current error class instance. - * @see https://github.com/vuex-orm/vuex-orm/issues/255 - */ - toJSON(): this; -} -type AsyncSaveFunc = (serializedPayload: string) => Promise; -type AsyncClearFunc = () => Promise; -/** - * AsyncAuthStore is a helper auth store implementation - * that could be used with any external async persistent layer - * (key-value db, local file, etc.). - * - * Here is an example with the React Native AsyncStorage package: - * - * ``` - * import AsyncStorage from "@react-native-async-storage/async-storage"; - * import PocketBase, { AsyncAuthStore } from "pocketbase"; - * - * const store = new AsyncAuthStore({ - * save: async (serialized) => AsyncStorage.setItem("pb_auth", serialized), - * initial: AsyncStorage.getItem("pb_auth"), - * }); - * - * const pb = new PocketBase("https://example.com", store) - * ``` - */ -declare class AsyncAuthStore extends BaseAuthStore { - private saveFunc; - private clearFunc?; - private queue; - constructor(config: { - // The async function that is called every time - // when the auth store state needs to be persisted. - save: AsyncSaveFunc; - /// An *optional* async function that is called every time - /// when the auth store needs to be cleared. - /// - /// If not explicitly set, `saveFunc` with empty data will be used. - clear?: AsyncClearFunc; - // An *optional* initial data to load into the store. - initial?: string | Promise; - }); - /** - * @inheritdoc - */ - save(token: string, record?: AuthRecord): void; - /** - * @inheritdoc - */ - clear(): void; - /** - * Initializes the auth store state. - */ - private _loadInitial; - /** - * Appends an async function to the queue. - */ - private _enqueue; - /** - * Starts the queue processing. - */ - private _dequeue; -} -/** - * The default token store for browsers with auto fallback - * to runtime/memory if local storage is undefined (e.g. in node env). - */ -declare class LocalAuthStore extends BaseAuthStore { - private storageFallback; - private storageKey; - constructor(storageKey?: string); - /** - * @inheritdoc - */ - get token(): string; - /** - * @inheritdoc - */ - get record(): AuthRecord; - /** - * @deprecated use `record` instead. - */ - get model(): AuthRecord; - /** - * @inheritdoc - */ - save(token: string, record?: AuthRecord): void; - /** - * @inheritdoc - */ - clear(): void; - // --------------------------------------------------------------- - // Internal helpers: - // --------------------------------------------------------------- - /** - * Retrieves `key` from the browser's local storage - * (or runtime/memory if local storage is undefined). - */ - private _storageGet; - /** - * Stores a new data in the browser's local storage - * (or runtime/memory if local storage is undefined). - */ - private _storageSet; - /** - * Removes `key` from the browser's local storage and the runtime/memory. - */ - private _storageRemove; - /** - * Updates the current store state on localStorage change. - */ - private _bindStorageEvent; -} -/** - * Returns JWT token's payload data. - */ -declare function getTokenPayload(token: string): { - [key: string]: any; -}; -/** - * Checks whether a JWT token is expired or not. - * Tokens without `exp` payload key are considered valid. - * Tokens with empty payload (eg. invalid token strings) are considered expired. - * - * @param token The token to check. - * @param [expirationThreshold] Time in seconds that will be subtracted from the token `exp` property. - */ -declare function isTokenExpired(token: string, expirationThreshold?: number): boolean; -export { Client as default, BeforeSendResult, ClientResponseError, CollectionService, HealthCheckResponse, HealthService, HourlyStats, LogService, UnsubscribeFunc, RealtimeService, RecordAuthResponse, AuthProviderInfo, AuthMethodsList, RecordSubscription, OAuth2UrlCallback, OAuth2AuthConfig, OTPResponse, RecordService, CrudService, BatchRequest, BatchRequestResult, BatchService, SubBatchService, AsyncSaveFunc, AsyncClearFunc, AsyncAuthStore, AuthRecord, AuthModel, OnStoreChangeFunc, BaseAuthStore, LocalAuthStore, ListResult, BaseModel, LogModel, RecordModel, CollectionField, TokenConfig, AuthAlertConfig, OTPConfig, MFAConfig, PasswordAuthConfig, OAuth2Provider, OAuth2Config, EmailTemplate, BaseCollectionModel, ViewCollectionModel, AuthCollectionModel, CollectionModel, SendOptions, CommonOptions, ListOptions, FullListOptions, RecordOptions, RecordListOptions, RecordFullListOptions, RecordSubscribeOptions, LogStatsOptions, FileOptions, AuthOptions, normalizeUnknownQueryParams, serializeQueryParams, ParseOptions, cookieParse, SerializeOptions, cookieSerialize, getTokenPayload, isTokenExpired }; diff --git a/PBandGraphScaffold/node_modules/pocketbase/dist/pocketbase.es.d.ts b/PBandGraphScaffold/node_modules/pocketbase/dist/pocketbase.es.d.ts deleted file mode 100644 index df8e682..0000000 --- a/PBandGraphScaffold/node_modules/pocketbase/dist/pocketbase.es.d.ts +++ /dev/null @@ -1,1583 +0,0 @@ -interface ParseOptions { - decode?: (val: string) => string; -} -/** - * Parses the given cookie header string into an object - * The object has the various cookies as keys(names) => values - */ -declare function cookieParse(str: string, options?: ParseOptions): { - [key: string]: any; -}; -interface SerializeOptions { - encode?: (val: string | number | boolean) => string; - maxAge?: number; - domain?: string; - path?: string; - expires?: Date; - httpOnly?: boolean; - secure?: boolean; - priority?: string; - sameSite?: boolean | string; -} -/** - * Serialize data into a cookie header. - * - * Serialize the a name value pair into a cookie string suitable for - * http headers. An optional options object specified cookie parameters. - * - * ```js - * cookieSerialize('foo', 'bar', { httpOnly: true }) // "foo=bar; httpOnly" - * ``` - */ -declare function cookieSerialize(name: string, val: string, options?: SerializeOptions): string; -interface ListResult { - page: number; - perPage: number; - totalItems: number; - totalPages: number; - items: Array; -} -interface BaseModel { - [key: string]: any; - id: string; -} -interface LogModel extends BaseModel { - level: string; - message: string; - created: string; - updated: string; - data: { - [key: string]: any; - }; -} -interface RecordModel extends BaseModel { - collectionId: string; - collectionName: string; - expand?: { - [key: string]: any; - }; -} -// ------------------------------------------------------------------- -// Collection types -// ------------------------------------------------------------------- -interface CollectionField { - [key: string]: any; - id: string; - name: string; - type: string; - system: boolean; - hidden: boolean; - presentable: boolean; -} -interface TokenConfig { - duration: number; - secret?: string; -} -interface AuthAlertConfig { - enabled: boolean; - emailTemplate: EmailTemplate; -} -interface OTPConfig { - enabled: boolean; - duration: number; - length: number; - emailTemplate: EmailTemplate; -} -interface MFAConfig { - enabled: boolean; - duration: number; - rule: string; -} -interface PasswordAuthConfig { - enabled: boolean; - identityFields: Array; -} -interface OAuth2Provider { - pkce?: boolean; - clientId: string; - name: string; - clientSecret: string; - authURL: string; - tokenURL: string; - userInfoURL: string; - displayName: string; - extra?: { - [key: string]: any; - }; -} -interface OAuth2Config { - enabled: boolean; - mappedFields: { - [key: string]: string; - }; - providers: Array; -} -interface EmailTemplate { - subject: string; - body: string; -} -interface collection extends BaseModel { - name: string; - fields: Array; - indexes: Array; - system: boolean; - listRule?: string; - viewRule?: string; - createRule?: string; - updateRule?: string; - deleteRule?: string; -} -interface BaseCollectionModel extends collection { - type: "base"; -} -interface ViewCollectionModel extends collection { - type: "view"; - viewQuery: string; -} -interface AuthCollectionModel extends collection { - type: "auth"; - authRule?: string; - manageRule?: string; - authAlert: AuthAlertConfig; - oauth2: OAuth2Config; - passwordAuth: PasswordAuthConfig; - mfa: MFAConfig; - otp: OTPConfig; - authToken: TokenConfig; - passwordResetToken: TokenConfig; - emailChangeToken: TokenConfig; - verificationToken: TokenConfig; - fileToken: TokenConfig; - verificationTemplate: EmailTemplate; - resetPasswordTemplate: EmailTemplate; - confirmEmailChangeTemplate: EmailTemplate; -} -type CollectionModel = BaseCollectionModel | ViewCollectionModel | AuthCollectionModel; -type AuthRecord = RecordModel | null; -type AuthModel = AuthRecord; // for backward compatibility -// for backward compatibility -type OnStoreChangeFunc = (token: string, record: AuthRecord) => void; -/** - * Base AuthStore class that stores the auth state in runtime memory (aka. only for the duration of the store instane). - * - * Usually you wouldn't use it directly and instead use the builtin LocalAuthStore, AsyncAuthStore - * or extend it with your own custom implementation. - */ -declare class BaseAuthStore { - protected baseToken: string; - protected baseModel: AuthRecord; - private _onChangeCallbacks; - /** - * Retrieves the stored token (if any). - */ - get token(): string; - /** - * Retrieves the stored model data (if any). - */ - get record(): AuthRecord; - /** - * @deprecated use `record` instead. - */ - get model(): AuthRecord; - /** - * Loosely checks if the store has valid token (aka. existing and unexpired exp claim). - */ - get isValid(): boolean; - /** - * Loosely checks whether the currently loaded store state is for superuser. - * - * Alternatively you can also compare directly `pb.authStore.record?.collectionName`. - */ - get isSuperuser(): boolean; - /** - * @deprecated use `isSuperuser` instead or simply check the record.collectionName property. - */ - get isAdmin(): boolean; - /** - * @deprecated use `!isSuperuser` instead or simply check the record.collectionName property. - */ - get isAuthRecord(): boolean; - /** - * Saves the provided new token and model data in the auth store. - */ - save(token: string, record?: AuthRecord): void; - /** - * Removes the stored token and model data form the auth store. - */ - clear(): void; - /** - * Parses the provided cookie string and updates the store state - * with the cookie's token and model data. - * - * NB! This function doesn't validate the token or its data. - * Usually this isn't a concern if you are interacting only with the - * PocketBase API because it has the proper server-side security checks in place, - * but if you are using the store `isValid` state for permission controls - * in a node server (eg. SSR), then it is recommended to call `authRefresh()` - * after loading the cookie to ensure an up-to-date token and model state. - * For example: - * - * ```js - * pb.authStore.loadFromCookie("cookie string..."); - * - * try { - * // get an up-to-date auth store state by veryfing and refreshing the loaded auth model (if any) - * pb.authStore.isValid && await pb.collection('users').authRefresh(); - * } catch (_) { - * // clear the auth store on failed refresh - * pb.authStore.clear(); - * } - * ``` - */ - loadFromCookie(cookie: string, key?: string): void; - /** - * Exports the current store state as cookie string. - * - * By default the following optional attributes are added: - * - Secure - * - HttpOnly - * - SameSite=Strict - * - Path=/ - * - Expires={the token expiration date} - * - * NB! If the generated cookie exceeds 4096 bytes, this method will - * strip the model data to the bare minimum to try to fit within the - * recommended size in https://www.rfc-editor.org/rfc/rfc6265#section-6.1. - */ - exportToCookie(options?: SerializeOptions, key?: string): string; - /** - * Register a callback function that will be called on store change. - * - * You can set the `fireImmediately` argument to true in order to invoke - * the provided callback right after registration. - * - * Returns a removal function that you could call to "unsubscribe" from the changes. - */ - onChange(callback: OnStoreChangeFunc, fireImmediately?: boolean): () => void; - protected triggerChange(): void; -} -/** - * BaseService class that should be inherited from all API services. - */ -declare abstract class BaseService { - readonly client: Client; - constructor(client: Client); -} -interface SendOptions extends RequestInit { - // for backward compatibility and to minimize the verbosity, - // any top-level field that doesn't exist in RequestInit or the - // fields below will be treated as query parameter. - [key: string]: any; - /** - * Optional custom fetch function to use for sending the request. - */ - fetch?: (url: RequestInfo | URL, config?: RequestInit) => Promise; - /** - * Custom headers to send with the requests. - */ - headers?: { - [key: string]: string; - }; - /** - * The body of the request (serialized automatically for json requests). - */ - body?: any; - /** - * Query parameters that will be appended to the request url. - */ - query?: { - [key: string]: any; - }; - /** - * @deprecated use `query` instead - * - * for backward-compatibility `params` values are merged with `query`, - * but this option may get removed in the final v1 release - */ - params?: { - [key: string]: any; - }; - /** - * The request identifier that can be used to cancel pending requests. - */ - requestKey?: string | null; - /** - * @deprecated use `requestKey:string` instead - */ - $cancelKey?: string; - /** - * @deprecated use `requestKey:null` instead - */ - $autoCancel?: boolean; -} -interface CommonOptions extends SendOptions { - fields?: string; -} -interface ListOptions extends CommonOptions { - page?: number; - perPage?: number; - sort?: string; - filter?: string; - skipTotal?: boolean; -} -interface FullListOptions extends ListOptions { - batch?: number; -} -interface RecordOptions extends CommonOptions { - expand?: string; -} -interface RecordListOptions extends ListOptions, RecordOptions { -} -interface RecordFullListOptions extends FullListOptions, RecordOptions { -} -interface RecordSubscribeOptions extends SendOptions { - fields?: string; - filter?: string; - expand?: string; -} -interface LogStatsOptions extends CommonOptions { - filter?: string; -} -interface FileOptions extends CommonOptions { - thumb?: string; - download?: boolean; -} -interface AuthOptions extends CommonOptions { - /** - * If autoRefreshThreshold is set it will take care to auto refresh - * when necessary the auth data before each request to ensure that - * the auth state is always valid. - * - * The value must be in seconds, aka. the amount of seconds - * that will be subtracted from the current token `exp` claim in order - * to determine whether it is going to expire within the specified time threshold. - * - * For example, if you want to auto refresh the token if it is - * going to expire in the next 30mins (or already has expired), - * it can be set to `1800` - */ - autoRefreshThreshold?: number; -} -// modifies in place the provided options by moving unknown send options as query parameters. -declare function normalizeUnknownQueryParams(options?: SendOptions): void; -declare function serializeQueryParams(params: { - [key: string]: any; -}): string; -interface appleClientSecret { - secret: string; -} -declare class SettingsService extends BaseService { - /** - * Fetch all available app settings. - * - * @throws {ClientResponseError} - */ - getAll(options?: CommonOptions): Promise<{ - [key: string]: any; - }>; - /** - * Bulk updates app settings. - * - * @throws {ClientResponseError} - */ - update(bodyParams?: { - [key: string]: any; - } | FormData, options?: CommonOptions): Promise<{ - [key: string]: any; - }>; - /** - * Performs a S3 filesystem connection test. - * - * The currently supported `filesystem` are "storage" and "backups". - * - * @throws {ClientResponseError} - */ - testS3(filesystem?: string, options?: CommonOptions): Promise; - /** - * Sends a test email. - * - * The possible `emailTemplate` values are: - * - verification - * - password-reset - * - email-change - * - * @throws {ClientResponseError} - */ - testEmail(collectionIdOrName: string, toEmail: string, emailTemplate: string, options?: CommonOptions): Promise; - /** - * Generates a new Apple OAuth2 client secret. - * - * @throws {ClientResponseError} - */ - generateAppleClientSecret(clientId: string, teamId: string, keyId: string, privateKey: string, duration: number, options?: CommonOptions): Promise; -} -type UnsubscribeFunc = () => Promise; -declare class RealtimeService extends BaseService { - clientId: string; - private eventSource; - private subscriptions; - private lastSentSubscriptions; - private connectTimeoutId; - private maxConnectTimeout; - private reconnectTimeoutId; - private reconnectAttempts; - private maxReconnectAttempts; - private predefinedReconnectIntervals; - private pendingConnects; - /** - * Returns whether the realtime connection has been established. - */ - get isConnected(): boolean; - /** - * An optional hook that is invoked when the realtime client disconnects - * either when unsubscribing from all subscriptions or when the - * connection was interrupted or closed by the server. - * - * The received argument could be used to determine whether the disconnect - * is a result from unsubscribing (`activeSubscriptions.length == 0`) - * or because of network/server error (`activeSubscriptions.length > 0`). - * - * If you want to listen for the opposite, aka. when the client connection is established, - * subscribe to the `PB_CONNECT` event. - */ - onDisconnect?: (activeSubscriptions: Array) => void; - /** - * Register the subscription listener. - * - * You can subscribe multiple times to the same topic. - * - * If the SSE connection is not started yet, - * this method will also initialize it. - */ - subscribe(topic: string, callback: (data: any) => void, options?: SendOptions): Promise; - /** - * Unsubscribe from all subscription listeners with the specified topic. - * - * If `topic` is not provided, then this method will unsubscribe - * from all active subscriptions. - * - * This method is no-op if there are no active subscriptions. - * - * The related sse connection will be autoclosed if after the - * unsubscribe operation there are no active subscriptions left. - */ - unsubscribe(topic?: string): Promise; - /** - * Unsubscribe from all subscription listeners starting with the specified topic prefix. - * - * This method is no-op if there are no active subscriptions with the specified topic prefix. - * - * The related sse connection will be autoclosed if after the - * unsubscribe operation there are no active subscriptions left. - */ - unsubscribeByPrefix(keyPrefix: string): Promise; - /** - * Unsubscribe from all subscriptions matching the specified topic and listener function. - * - * This method is no-op if there are no active subscription with - * the specified topic and listener. - * - * The related sse connection will be autoclosed if after the - * unsubscribe operation there are no active subscriptions left. - */ - unsubscribeByTopicAndListener(topic: string, listener: EventListener): Promise; - private hasSubscriptionListeners; - private submitSubscriptions; - private getSubscriptionsCancelKey; - private getSubscriptionsByTopic; - private getNonEmptySubscriptionKeys; - private addAllSubscriptionListeners; - private removeAllSubscriptionListeners; - private connect; - private initConnect; - private hasUnsentSubscriptions; - private connectErrorHandler; - private disconnect; -} -declare abstract class CrudService extends BaseService { - /** - * Base path for the crud actions (without trailing slash, eg. '/admins'). - */ - abstract get baseCrudPath(): string; - /** - * Response data decoder. - */ - decode(data: { - [key: string]: any; - }): T; - /** - * Returns a promise with all list items batch fetched at once - * (by default 500 items per request; to change it set the `batch` query param). - * - * You can use the generic T to supply a wrapper type of the crud model. - * - * @throws {ClientResponseError} - */ - getFullList(options?: FullListOptions): Promise>; - /** - * Legacy version of getFullList with explicitly specified batch size. - */ - getFullList(batch?: number, options?: ListOptions): Promise>; - /** - * Returns paginated items list. - * - * You can use the generic T to supply a wrapper type of the crud model. - * - * @throws {ClientResponseError} - */ - getList(page?: number, perPage?: number, options?: ListOptions): Promise>; - /** - * Returns the first found item by the specified filter. - * - * Internally it calls `getList(1, 1, { filter, skipTotal })` and - * returns the first found item. - * - * You can use the generic T to supply a wrapper type of the crud model. - * - * For consistency with `getOne`, this method will throw a 404 - * ClientResponseError if no item was found. - * - * @throws {ClientResponseError} - */ - getFirstListItem(filter: string, options?: CommonOptions): Promise; - /** - * Returns single item by its id. - * - * You can use the generic T to supply a wrapper type of the crud model. - * - * If `id` is empty it will throw a 404 error. - * - * @throws {ClientResponseError} - */ - getOne(id: string, options?: CommonOptions): Promise; - /** - * Creates a new item. - * - * You can use the generic T to supply a wrapper type of the crud model. - * - * @throws {ClientResponseError} - */ - create(bodyParams?: { - [key: string]: any; - } | FormData, options?: CommonOptions): Promise; - /** - * Updates an existing item by its id. - * - * You can use the generic T to supply a wrapper type of the crud model. - * - * @throws {ClientResponseError} - */ - update(id: string, bodyParams?: { - [key: string]: any; - } | FormData, options?: CommonOptions): Promise; - /** - * Deletes an existing item by its id. - * - * @throws {ClientResponseError} - */ - delete(id: string, options?: CommonOptions): Promise; - /** - * Returns a promise with all list items batch fetched at once. - */ - protected _getFullList(batchSize?: number, options?: ListOptions): Promise>; -} -interface RecordAuthResponse { - /** - * The signed PocketBase auth record. - */ - record: T; - /** - * The PocketBase record auth token. - * - * If you are looking for the OAuth2 access and refresh tokens - * they are available under the `meta.accessToken` and `meta.refreshToken` props. - */ - token: string; - /** - * Auth meta data usually filled when OAuth2 is used. - */ - meta?: { - [key: string]: any; - }; -} -interface AuthProviderInfo { - name: string; - displayName: string; - state: string; - authURL: string; - codeVerifier: string; - codeChallenge: string; - codeChallengeMethod: string; -} -interface AuthMethodsList { - mfa: { - enabled: boolean; - duration: number; - }; - otp: { - enabled: boolean; - duration: number; - }; - password: { - enabled: boolean; - identityFields: Array; - }; - oauth2: { - enabled: boolean; - providers: Array; - }; -} -interface RecordSubscription { - action: string; // eg. create, update, delete - record: T; -} -type OAuth2UrlCallback = (url: string) => void | Promise; -interface OAuth2AuthConfig extends SendOptions { - // the name of the OAuth2 provider (eg. "google") - provider: string; - // custom scopes to overwrite the default ones - scopes?: Array; - // optional record create data - createData?: { - [key: string]: any; - }; - // optional callback that is triggered after the OAuth2 sign-in/sign-up url generation - urlCallback?: OAuth2UrlCallback; - // optional query params to send with the PocketBase auth request (eg. fields, expand, etc.) - query?: RecordOptions; -} -interface OTPResponse { - otpId: string; -} -declare class RecordService extends CrudService { - readonly collectionIdOrName: string; - constructor(client: Client, collectionIdOrName: string); - /** - * @inheritdoc - */ - get baseCrudPath(): string; - /** - * Returns the current collection service base path. - */ - get baseCollectionPath(): string; - /** - * Returns whether the current service collection is superusers. - */ - get isSuperusers(): boolean; - // --------------------------------------------------------------- - // Realtime handlers - // --------------------------------------------------------------- - /** - * Subscribe to realtime changes to the specified topic ("*" or record id). - * - * If `topic` is the wildcard "*", then this method will subscribe to - * any record changes in the collection. - * - * If `topic` is a record id, then this method will subscribe only - * to changes of the specified record id. - * - * It's OK to subscribe multiple times to the same topic. - * You can use the returned `UnsubscribeFunc` to remove only a single subscription. - * Or use `unsubscribe(topic)` if you want to remove all subscriptions attached to the topic. - */ - subscribe(topic: string, callback: (data: RecordSubscription) => void, options?: RecordSubscribeOptions): Promise; - /** - * Unsubscribe from all subscriptions of the specified topic - * ("*" or record id). - * - * If `topic` is not set, then this method will unsubscribe from - * all subscriptions associated to the current collection. - */ - unsubscribe(topic?: string): Promise; - // --------------------------------------------------------------- - // Crud handers - // --------------------------------------------------------------- - /** - * @inheritdoc - */ - getFullList(options?: RecordFullListOptions): Promise>; - /** - * @inheritdoc - */ - getFullList(batch?: number, options?: RecordListOptions): Promise>; - /** - * @inheritdoc - */ - getList(page?: number, perPage?: number, options?: RecordListOptions): Promise>; - /** - * @inheritdoc - */ - getFirstListItem(filter: string, options?: RecordListOptions): Promise; - /** - * @inheritdoc - */ - getOne(id: string, options?: RecordOptions): Promise; - /** - * @inheritdoc - */ - create(bodyParams?: { - [key: string]: any; - } | FormData, options?: RecordOptions): Promise; - /** - * @inheritdoc - * - * If the current `client.authStore.record` matches with the updated id, then - * on success the `client.authStore.record` will be updated with the new response record fields. - */ - update(id: string, bodyParams?: { - [key: string]: any; - } | FormData, options?: RecordOptions): Promise; - /** - * @inheritdoc - * - * If the current `client.authStore.record` matches with the deleted id, - * then on success the `client.authStore` will be cleared. - */ - delete(id: string, options?: CommonOptions): Promise; - // --------------------------------------------------------------- - // Auth handlers - // --------------------------------------------------------------- - /** - * Prepare successful collection authorization response. - */ - protected authResponse(responseData: any): RecordAuthResponse; - /** - * Returns all available collection auth methods. - * - * @throws {ClientResponseError} - */ - listAuthMethods(options?: CommonOptions): Promise; - /** - * Authenticate a single auth collection record via its username/email and password. - * - * On success, this method also automatically updates - * the client's AuthStore data and returns: - * - the authentication token - * - the authenticated record model - * - * @throws {ClientResponseError} - */ - authWithPassword(usernameOrEmail: string, password: string, options?: RecordOptions): Promise>; - /** - * Authenticate a single auth collection record with OAuth2 code. - * - * If you don't have an OAuth2 code you may also want to check `authWithOAuth2` method. - * - * On success, this method also automatically updates - * the client's AuthStore data and returns: - * - the authentication token - * - the authenticated record model - * - the OAuth2 account data (eg. name, email, avatar, etc.) - * - * @throws {ClientResponseError} - */ - authWithOAuth2Code(provider: string, code: string, codeVerifier: string, redirectURL: string, createData?: { - [key: string]: any; - }, options?: RecordOptions): Promise>; - /** - * @deprecated - * Consider using authWithOAuth2Code(provider, code, codeVerifier, redirectURL, createdData, options?). - */ - authWithOAuth2Code(provider: string, code: string, codeVerifier: string, redirectURL: string, createData?: { - [key: string]: any; - }, body?: any, query?: any): Promise>; - /** - * @deprecated This form of authWithOAuth2 is deprecated. - * - * Please use `authWithOAuth2Code()` OR its simplified realtime version - * as shown in https://pocketbase.io/docs/authentication/#oauth2-integration. - */ - authWithOAuth2(provider: string, code: string, codeVerifier: string, redirectURL: string, createData?: { - [key: string]: any; - }, bodyParams?: { - [key: string]: any; - }, queryParams?: RecordOptions): Promise>; - /** - * Authenticate a single auth collection record with OAuth2 - * **without custom redirects, deeplinks or even page reload**. - * - * This method initializes a one-off realtime subscription and will - * open a popup window with the OAuth2 vendor page to authenticate. - * Once the external OAuth2 sign-in/sign-up flow is completed, the popup - * window will be automatically closed and the OAuth2 data sent back - * to the user through the previously established realtime connection. - * - * You can specify an optional `urlCallback` prop to customize - * the default url `window.open` behavior. - * - * On success, this method also automatically updates - * the client's AuthStore data and returns: - * - the authentication token - * - the authenticated record model - * - the OAuth2 account data (eg. name, email, avatar, etc.) - * - * Example: - * - * ```js - * const authData = await pb.collection("users").authWithOAuth2({ - * provider: "google", - * }) - * ``` - * - * Note1: When creating the OAuth2 app in the provider dashboard - * you have to configure `https://yourdomain.com/api/oauth2-redirect` - * as redirect URL. - * - * Note2: Safari may block the default `urlCallback` popup because - * it doesn't allow `window.open` calls as part of an `async` click functions. - * To workaround this you can either change your click handler to not be marked as `async` - * OR manually call `window.open` before your `async` function and use the - * window reference in your own custom `urlCallback` (see https://github.com/pocketbase/pocketbase/discussions/2429#discussioncomment-5943061). - * For example: - * ```js - * - * ... - * document.getElementById("btn").addEventListener("click", () => { - * pb.collection("users").authWithOAuth2({ - * provider: "gitlab", - * }).then((authData) => { - * console.log(authData) - * }).catch((err) => { - * console.log(err, err.originalError); - * }); - * }) - * ``` - * - * @throws {ClientResponseError} - */ - authWithOAuth2(options: OAuth2AuthConfig): Promise>; - /** - * Refreshes the current authenticated record instance and - * returns a new token and record data. - * - * On success this method also automatically updates the client's AuthStore. - * - * @throws {ClientResponseError} - */ - authRefresh(options?: RecordOptions): Promise>; - /** - * @deprecated - * Consider using authRefresh(options?). - */ - authRefresh(body?: any, query?: any): Promise>; - /** - * Sends auth record password reset request. - * - * @throws {ClientResponseError} - */ - requestPasswordReset(email: string, options?: CommonOptions): Promise; - /** - * @deprecated - * Consider using requestPasswordReset(email, options?). - */ - requestPasswordReset(email: string, body?: any, query?: any): Promise; - /** - * Confirms auth record password reset request. - * - * @throws {ClientResponseError} - */ - confirmPasswordReset(passwordResetToken: string, password: string, passwordConfirm: string, options?: CommonOptions): Promise; - /** - * @deprecated - * Consider using confirmPasswordReset(passwordResetToken, password, passwordConfirm, options?). - */ - confirmPasswordReset(passwordResetToken: string, password: string, passwordConfirm: string, body?: any, query?: any): Promise; - /** - * Sends auth record verification email request. - * - * @throws {ClientResponseError} - */ - requestVerification(email: string, options?: CommonOptions): Promise; - /** - * @deprecated - * Consider using requestVerification(email, options?). - */ - requestVerification(email: string, body?: any, query?: any): Promise; - /** - * Confirms auth record email verification request. - * - * If the current `client.authStore.record` matches with the auth record from the token, - * then on success the `client.authStore.record.verified` will be updated to `true`. - * - * @throws {ClientResponseError} - */ - confirmVerification(verificationToken: string, options?: CommonOptions): Promise; - /** - * @deprecated - * Consider using confirmVerification(verificationToken, options?). - */ - confirmVerification(verificationToken: string, body?: any, query?: any): Promise; - /** - * Sends an email change request to the authenticated record model. - * - * @throws {ClientResponseError} - */ - requestEmailChange(newEmail: string, options?: CommonOptions): Promise; - /** - * @deprecated - * Consider using requestEmailChange(newEmail, options?). - */ - requestEmailChange(newEmail: string, body?: any, query?: any): Promise; - /** - * Confirms auth record's new email address. - * - * If the current `client.authStore.record` matches with the auth record from the token, - * then on success the `client.authStore` will be cleared. - * - * @throws {ClientResponseError} - */ - confirmEmailChange(emailChangeToken: string, password: string, options?: CommonOptions): Promise; - /** - * @deprecated - * Consider using confirmEmailChange(emailChangeToken, password, options?). - */ - confirmEmailChange(emailChangeToken: string, password: string, body?: any, query?: any): Promise; - /** - * @deprecated use collection("_externalAuths").* - * - * Lists all linked external auth providers for the specified auth record. - * - * @throws {ClientResponseError} - */ - listExternalAuths(recordId: string, options?: CommonOptions): Promise>; - /** - * @deprecated use collection("_externalAuths").* - * - * Unlink a single external auth provider from the specified auth record. - * - * @throws {ClientResponseError} - */ - unlinkExternalAuth(recordId: string, provider: string, options?: CommonOptions): Promise; - /** - * Sends auth record OTP to the provided email. - * - * @throws {ClientResponseError} - */ - requestOTP(email: string, options?: CommonOptions): Promise; - /** - * Authenticate a single auth collection record via OTP. - * - * On success, this method also automatically updates - * the client's AuthStore data and returns: - * - the authentication token - * - the authenticated record model - * - * @throws {ClientResponseError} - */ - authWithOTP(otpId: string, password: string, options?: CommonOptions): Promise>; - /** - * Impersonate authenticates with the specified recordId and - * returns a new client with the received auth token in a memory store. - * - * If `duration` is 0 the generated auth token will fallback - * to the default collection auth token duration. - * - * This action currently requires superusers privileges. - * - * @throws {ClientResponseError} - */ - impersonate(recordId: string, duration: number, options?: CommonOptions): Promise; - // --------------------------------------------------------------- - // very rudimentary url query params replacement because at the moment - // URL (and URLSearchParams) doesn't seem to be fully supported in React Native - // - // note: for details behind some of the decode/encode parsing check https://unixpapa.com/js/querystring.html - private _replaceQueryParams; -} -declare class CollectionService extends CrudService { - /** - * @inheritdoc - */ - get baseCrudPath(): string; - /** - * Imports the provided collections. - * - * If `deleteMissing` is `true`, all local collections and their fields, - * that are not present in the imported configuration, WILL BE DELETED - * (including their related records data)! - * - * @throws {ClientResponseError} - */ - import(collections: Array, deleteMissing?: boolean, options?: CommonOptions): Promise; - /** - * Returns type indexed map with scaffolded collection models - * populated with their default field values. - * - * @throws {ClientResponseError} - */ - getScaffolds(options?: CommonOptions): Promise<{ - [key: string]: CollectionModel; - }>; - /** - * Deletes all records associated with the specified collection. - * - * @throws {ClientResponseError} - */ - truncate(collectionIdOrName: string, options?: CommonOptions): Promise; -} -interface HourlyStats { - total: number; - date: string; -} -declare class LogService extends BaseService { - /** - * Returns paginated logs list. - * - * @throws {ClientResponseError} - */ - getList(page?: number, perPage?: number, options?: ListOptions): Promise>; - /** - * Returns a single log by its id. - * - * If `id` is empty it will throw a 404 error. - * - * @throws {ClientResponseError} - */ - getOne(id: string, options?: CommonOptions): Promise; - /** - * Returns logs statistics. - * - * @throws {ClientResponseError} - */ - getStats(options?: LogStatsOptions): Promise>; -} -interface HealthCheckResponse { - code: number; - message: string; - data: { - [key: string]: any; - }; -} -declare class HealthService extends BaseService { - /** - * Checks the health status of the api. - * - * @throws {ClientResponseError} - */ - check(options?: CommonOptions): Promise; -} -declare class FileService extends BaseService { - /** - * @deprecated Please replace with `pb.files.getURL()`. - */ - getUrl(record: { - [key: string]: any; - }, filename: string, queryParams?: FileOptions): string; - /** - * Builds and returns an absolute record file url for the provided filename. - */ - getURL(record: { - [key: string]: any; - }, filename: string, queryParams?: FileOptions): string; - /** - * Requests a new private file access token for the current auth model. - * - * @throws {ClientResponseError} - */ - getToken(options?: CommonOptions): Promise; -} -interface BackupFileInfo { - key: string; - size: number; - modified: string; -} -declare class BackupService extends BaseService { - /** - * Returns list with all available backup files. - * - * @throws {ClientResponseError} - */ - getFullList(options?: CommonOptions): Promise>; - /** - * Initializes a new backup. - * - * @throws {ClientResponseError} - */ - create(basename: string, options?: CommonOptions): Promise; - /** - * Uploads an existing backup file. - * - * Example: - * - * ```js - * await pb.backups.upload({ - * file: new Blob([...]), - * }); - * ``` - * - * @throws {ClientResponseError} - */ - upload(bodyParams: { - [key: string]: any; - } | FormData, options?: CommonOptions): Promise; - /** - * Deletes a single backup file. - * - * @throws {ClientResponseError} - */ - delete(key: string, options?: CommonOptions): Promise; - /** - * Initializes an app data restore from an existing backup. - * - * @throws {ClientResponseError} - */ - restore(key: string, options?: CommonOptions): Promise; - /** - * @deprecated Please use `getDownloadURL()`. - */ - getDownloadUrl(token: string, key: string): string; - /** - * Builds a download url for a single existing backup using a - * superuser file token and the backup file key. - * - * The file token can be generated via `pb.files.getToken()`. - */ - getDownloadURL(token: string, key: string): string; -} -interface CronJob { - id: string; - expression: string; -} -declare class CronService extends BaseService { - /** - * Returns list with all registered cron jobs. - * - * @throws {ClientResponseError} - */ - getFullList(options?: CommonOptions): Promise>; - /** - * Runs the specified cron job. - * - * @throws {ClientResponseError} - */ - run(jobId: string, options?: CommonOptions): Promise; -} -interface BatchRequest { - method: string; - url: string; - json?: { - [key: string]: any; - }; - files?: { - [key: string]: Array; - }; - headers?: { - [key: string]: string; - }; -} -interface BatchRequestResult { - status: number; - body: any; -} -declare class BatchService extends BaseService { - private requests; - private subs; - /** - * Starts constructing a batch request entry for the specified collection. - */ - collection(collectionIdOrName: string): SubBatchService; - /** - * Sends the batch requests. - * - * @throws {ClientResponseError} - */ - send(options?: SendOptions): Promise>; -} -declare class SubBatchService { - private requests; - private readonly collectionIdOrName; - constructor(requests: Array, collectionIdOrName: string); - /** - * Registers a record upsert request into the current batch queue. - * - * The request will be executed as update if `bodyParams` have a valid existing record `id` value, otherwise - create. - */ - upsert(bodyParams?: { - [key: string]: any; - } | FormData, options?: RecordOptions): void; - /** - * Registers a record create request into the current batch queue. - */ - create(bodyParams?: { - [key: string]: any; - } | FormData, options?: RecordOptions): void; - /** - * Registers a record update request into the current batch queue. - */ - update(id: string, bodyParams?: { - [key: string]: any; - } | FormData, options?: RecordOptions): void; - /** - * Registers a record delete request into the current batch queue. - */ - delete(id: string, options?: SendOptions): void; - private prepareRequest; -} -interface BeforeSendResult { - [key: string]: any; // for backward compatibility - url?: string; - options?: { - [key: string]: any; - }; -} -/** - * PocketBase JS Client. - */ -declare class Client { - /** - * The base PocketBase backend url address (eg. 'http://127.0.0.1.8090'). - */ - baseURL: string; - /** - * Legacy getter alias for baseURL. - * @deprecated Please replace with baseURL. - */ - get baseUrl(): string; - /** - * Legacy setter alias for baseURL. - * @deprecated Please replace with baseURL. - */ - set baseUrl(v: string); - /** - * Hook that get triggered right before sending the fetch request, - * allowing you to inspect and modify the url and request options. - * - * For list of the possible options check https://developer.mozilla.org/en-US/docs/Web/API/fetch#options - * - * You can return a non-empty result object `{ url, options }` to replace the url and request options entirely. - * - * Example: - * ```js - * const pb = new PocketBase("https://example.com") - * - * pb.beforeSend = function (url, options) { - * options.headers = Object.assign({}, options.headers, { - * 'X-Custom-Header': 'example', - * }) - * - * return { url, options } - * } - * - * // use the created client as usual... - * ``` - */ - beforeSend?: (url: string, options: SendOptions) => BeforeSendResult | Promise; - /** - * Hook that get triggered after successfully sending the fetch request, - * allowing you to inspect/modify the response object and its parsed data. - * - * Returns the new Promise resolved `data` that will be returned to the client. - * - * Example: - * ```js - * const pb = new PocketBase("https://example.com") - * - * pb.afterSend = function (response, data, options) { - * if (response.status != 200) { - * throw new ClientResponseError({ - * url: response.url, - * status: response.status, - * response: { ... }, - * }) - * } - * - * return data; - * } - * - * // use the created client as usual... - * ``` - */ - afterSend?: ((response: Response, data: any) => any) & ((response: Response, data: any, options: SendOptions) => any); - /** - * Optional language code (default to `en-US`) that will be sent - * with the requests to the server as `Accept-Language` header. - */ - lang: string; - /** - * A replaceable instance of the local auth store service. - */ - authStore: BaseAuthStore; - /** - * An instance of the service that handles the **Settings APIs**. - */ - readonly settings: SettingsService; - /** - * An instance of the service that handles the **Collection APIs**. - */ - readonly collections: CollectionService; - /** - * An instance of the service that handles the **File APIs**. - */ - readonly files: FileService; - /** - * An instance of the service that handles the **Log APIs**. - */ - readonly logs: LogService; - /** - * An instance of the service that handles the **Realtime APIs**. - */ - readonly realtime: RealtimeService; - /** - * An instance of the service that handles the **Health APIs**. - */ - readonly health: HealthService; - /** - * An instance of the service that handles the **Backup APIs**. - */ - readonly backups: BackupService; - /** - * An instance of the service that handles the **Cron APIs**. - */ - readonly crons: CronService; - private cancelControllers; - private recordServices; - private enableAutoCancellation; - constructor(baseURL?: string, authStore?: BaseAuthStore | null, lang?: string); - /** - * @deprecated - * With PocketBase v0.23.0 admins are converted to a regular auth - * collection named "_superusers", aka. you can use directly collection("_superusers"). - */ - get admins(): RecordService; - /** - * Creates a new batch handler for sending multiple transactional - * create/update/upsert/delete collection requests in one network call. - * - * Example: - * ```js - * const batch = pb.createBatch(); - * - * batch.collection("example1").create({ ... }) - * batch.collection("example2").update("RECORD_ID", { ... }) - * batch.collection("example3").delete("RECORD_ID") - * batch.collection("example4").upsert({ ... }) - * - * await batch.send() - * ``` - */ - createBatch(): BatchService; - /** - * Returns the RecordService associated to the specified collection. - */ - collection(idOrName: string): RecordService; - /** - * Globally enable or disable auto cancellation for pending duplicated requests. - */ - autoCancellation(enable: boolean): Client; - /** - * Cancels single request by its cancellation key. - */ - cancelRequest(requestKey: string): Client; - /** - * Cancels all pending requests. - */ - cancelAllRequests(): Client; - /** - * Constructs a filter expression with placeholders populated from a parameters object. - * - * Placeholder parameters are defined with the `{:paramName}` notation. - * - * The following parameter values are supported: - * - * - `string` (_single quotes are autoescaped_) - * - `number` - * - `boolean` - * - `Date` object (_stringified into the PocketBase datetime format_) - * - `null` - * - everything else is converted to a string using `JSON.stringify()` - * - * Example: - * - * ```js - * pb.collection("example").getFirstListItem(pb.filter( - * 'title ~ {:title} && created >= {:created}', - * { title: "example", created: new Date()} - * )) - * ``` - */ - filter(raw: string, params?: { - [key: string]: any; - }): string; - /** - * @deprecated Please use `pb.files.getURL()`. - */ - getFileUrl(record: { - [key: string]: any; - }, filename: string, queryParams?: FileOptions): string; - /** - * @deprecated Please use `pb.buildURL()`. - */ - buildUrl(path: string): string; - /** - * Builds a full client url by safely concatenating the provided path. - */ - buildURL(path: string): string; - /** - * Sends an api http request. - * - * @throws {ClientResponseError} - */ - send(path: string, options: SendOptions): Promise; - /** - * Shallow copy the provided object and takes care to initialize - * any options required to preserve the backward compatability. - * - * @param {SendOptions} options - * @return {SendOptions} - */ - private initSendOptions; - /** - * Extracts the header with the provided name in case-insensitive manner. - * Returns `null` if no header matching the name is found. - */ - private getHeader; -} -/** - * ClientResponseError is a custom Error class that is intended to wrap - * and normalize any error thrown by `Client.send()`. - */ -declare class ClientResponseError extends Error { - url: string; - status: number; - response: { - [key: string]: any; - }; - isAbort: boolean; - originalError: any; - constructor(errData?: any); - /** - * Alias for `this.response` for backward compatibility. - */ - get data(): { - [key: string]: any; - }; - /** - * Make a POJO's copy of the current error class instance. - * @see https://github.com/vuex-orm/vuex-orm/issues/255 - */ - toJSON(): this; -} -type AsyncSaveFunc = (serializedPayload: string) => Promise; -type AsyncClearFunc = () => Promise; -/** - * AsyncAuthStore is a helper auth store implementation - * that could be used with any external async persistent layer - * (key-value db, local file, etc.). - * - * Here is an example with the React Native AsyncStorage package: - * - * ``` - * import AsyncStorage from "@react-native-async-storage/async-storage"; - * import PocketBase, { AsyncAuthStore } from "pocketbase"; - * - * const store = new AsyncAuthStore({ - * save: async (serialized) => AsyncStorage.setItem("pb_auth", serialized), - * initial: AsyncStorage.getItem("pb_auth"), - * }); - * - * const pb = new PocketBase("https://example.com", store) - * ``` - */ -declare class AsyncAuthStore extends BaseAuthStore { - private saveFunc; - private clearFunc?; - private queue; - constructor(config: { - // The async function that is called every time - // when the auth store state needs to be persisted. - save: AsyncSaveFunc; - /// An *optional* async function that is called every time - /// when the auth store needs to be cleared. - /// - /// If not explicitly set, `saveFunc` with empty data will be used. - clear?: AsyncClearFunc; - // An *optional* initial data to load into the store. - initial?: string | Promise; - }); - /** - * @inheritdoc - */ - save(token: string, record?: AuthRecord): void; - /** - * @inheritdoc - */ - clear(): void; - /** - * Initializes the auth store state. - */ - private _loadInitial; - /** - * Appends an async function to the queue. - */ - private _enqueue; - /** - * Starts the queue processing. - */ - private _dequeue; -} -/** - * The default token store for browsers with auto fallback - * to runtime/memory if local storage is undefined (e.g. in node env). - */ -declare class LocalAuthStore extends BaseAuthStore { - private storageFallback; - private storageKey; - constructor(storageKey?: string); - /** - * @inheritdoc - */ - get token(): string; - /** - * @inheritdoc - */ - get record(): AuthRecord; - /** - * @deprecated use `record` instead. - */ - get model(): AuthRecord; - /** - * @inheritdoc - */ - save(token: string, record?: AuthRecord): void; - /** - * @inheritdoc - */ - clear(): void; - // --------------------------------------------------------------- - // Internal helpers: - // --------------------------------------------------------------- - /** - * Retrieves `key` from the browser's local storage - * (or runtime/memory if local storage is undefined). - */ - private _storageGet; - /** - * Stores a new data in the browser's local storage - * (or runtime/memory if local storage is undefined). - */ - private _storageSet; - /** - * Removes `key` from the browser's local storage and the runtime/memory. - */ - private _storageRemove; - /** - * Updates the current store state on localStorage change. - */ - private _bindStorageEvent; -} -/** - * Returns JWT token's payload data. - */ -declare function getTokenPayload(token: string): { - [key: string]: any; -}; -/** - * Checks whether a JWT token is expired or not. - * Tokens without `exp` payload key are considered valid. - * Tokens with empty payload (eg. invalid token strings) are considered expired. - * - * @param token The token to check. - * @param [expirationThreshold] Time in seconds that will be subtracted from the token `exp` property. - */ -declare function isTokenExpired(token: string, expirationThreshold?: number): boolean; -export { Client as default, BeforeSendResult, ClientResponseError, CollectionService, HealthCheckResponse, HealthService, HourlyStats, LogService, UnsubscribeFunc, RealtimeService, RecordAuthResponse, AuthProviderInfo, AuthMethodsList, RecordSubscription, OAuth2UrlCallback, OAuth2AuthConfig, OTPResponse, RecordService, CrudService, BatchRequest, BatchRequestResult, BatchService, SubBatchService, AsyncSaveFunc, AsyncClearFunc, AsyncAuthStore, AuthRecord, AuthModel, OnStoreChangeFunc, BaseAuthStore, LocalAuthStore, ListResult, BaseModel, LogModel, RecordModel, CollectionField, TokenConfig, AuthAlertConfig, OTPConfig, MFAConfig, PasswordAuthConfig, OAuth2Provider, OAuth2Config, EmailTemplate, BaseCollectionModel, ViewCollectionModel, AuthCollectionModel, CollectionModel, SendOptions, CommonOptions, ListOptions, FullListOptions, RecordOptions, RecordListOptions, RecordFullListOptions, RecordSubscribeOptions, LogStatsOptions, FileOptions, AuthOptions, normalizeUnknownQueryParams, serializeQueryParams, ParseOptions, cookieParse, SerializeOptions, cookieSerialize, getTokenPayload, isTokenExpired }; diff --git a/PBandGraphScaffold/node_modules/pocketbase/dist/pocketbase.es.js b/PBandGraphScaffold/node_modules/pocketbase/dist/pocketbase.es.js deleted file mode 100644 index b56e631..0000000 --- a/PBandGraphScaffold/node_modules/pocketbase/dist/pocketbase.es.js +++ /dev/null @@ -1,2 +0,0 @@ -class ClientResponseError extends Error{constructor(e){super("ClientResponseError"),this.url="",this.status=0,this.response={},this.isAbort=!1,this.originalError=null,Object.setPrototypeOf(this,ClientResponseError.prototype),null!==e&&"object"==typeof e&&(this.url="string"==typeof e.url?e.url:"",this.status="number"==typeof e.status?e.status:0,this.isAbort=!!e.isAbort,this.originalError=e.originalError,null!==e.response&&"object"==typeof e.response?this.response=e.response:null!==e.data&&"object"==typeof e.data?this.response=e.data:this.response={}),this.originalError||e instanceof ClientResponseError||(this.originalError=e),"undefined"!=typeof DOMException&&e instanceof DOMException&&("AbortError"==e.name||20==e.code)&&(this.isAbort=!0),this.name="ClientResponseError "+this.status,this.message=this.response?.message,this.message||(this.isAbort?this.message="The request was autocancelled. You can find more info in https://github.com/pocketbase/js-sdk#auto-cancellation.":this.originalError?.cause?.message?.includes("ECONNREFUSED ::1")?this.message="Failed to connect to the PocketBase server. Try changing the SDK URL from localhost to 127.0.0.1 (https://github.com/pocketbase/js-sdk/issues/21).":this.message="Something went wrong."),this.cause=this.originalError}get data(){return this.response}toJSON(){return{...this}}}const e=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function cookieParse(e,t){const s={};if("string"!=typeof e)return s;const i=Object.assign({},t||{}).decode||defaultDecode;let n=0;for(;n0&&(!s.exp||s.exp-t>Date.now()/1e3))}s="function"!=typeof atob||t?e=>{let t=String(e).replace(/=+$/,"");if(t.length%4==1)throw new Error("'atob' failed: The string to be decoded is not correctly encoded.");for(var s,i,n=0,r=0,o="";i=t.charAt(r++);~i&&(s=n%4?64*s+i:i,n++%4)?o+=String.fromCharCode(255&s>>(-2*n&6)):0)i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(i);return o}:atob;const i="pb_auth";class BaseAuthStore{constructor(){this.baseToken="",this.baseModel=null,this._onChangeCallbacks=[]}get token(){return this.baseToken}get record(){return this.baseModel}get model(){return this.baseModel}get isValid(){return!isTokenExpired(this.token)}get isSuperuser(){let e=getTokenPayload(this.token);return"auth"==e.type&&("_superusers"==this.record?.collectionName||!this.record?.collectionName&&"pbc_3142635823"==e.collectionId)}get isAdmin(){return console.warn("Please replace pb.authStore.isAdmin with pb.authStore.isSuperuser OR simply check the value of pb.authStore.record?.collectionName"),this.isSuperuser}get isAuthRecord(){return console.warn("Please replace pb.authStore.isAuthRecord with !pb.authStore.isSuperuser OR simply check the value of pb.authStore.record?.collectionName"),"auth"==getTokenPayload(this.token).type&&!this.isSuperuser}save(e,t){this.baseToken=e||"",this.baseModel=t||null,this.triggerChange()}clear(){this.baseToken="",this.baseModel=null,this.triggerChange()}loadFromCookie(e,t=i){const s=cookieParse(e||"")[t]||"";let n={};try{n=JSON.parse(s),(null===typeof n||"object"!=typeof n||Array.isArray(n))&&(n={})}catch(e){}this.save(n.token||"",n.record||n.model||null)}exportToCookie(e,t=i){const s={secure:!0,sameSite:!0,httpOnly:!0,path:"/"},n=getTokenPayload(this.token);s.expires=n?.exp?new Date(1e3*n.exp):new Date("1970-01-01"),e=Object.assign({},s,e);const r={token:this.token,record:this.record?JSON.parse(JSON.stringify(this.record)):null};let o=cookieSerialize(t,JSON.stringify(r),e);const a="undefined"!=typeof Blob?new Blob([o]).size:o.length;if(r.record&&a>4096){r.record={id:r.record?.id,email:r.record?.email};const s=["collectionId","collectionName","verified"];for(const e in this.record)s.includes(e)&&(r.record[e]=this.record[e]);o=cookieSerialize(t,JSON.stringify(r),e)}return o}onChange(e,t=!1){return this._onChangeCallbacks.push(e),t&&e(this.token,this.record),()=>{for(let t=this._onChangeCallbacks.length-1;t>=0;t--)if(this._onChangeCallbacks[t]==e)return delete this._onChangeCallbacks[t],void this._onChangeCallbacks.splice(t,1)}}triggerChange(){for(const e of this._onChangeCallbacks)e&&e(this.token,this.record)}}class LocalAuthStore extends BaseAuthStore{constructor(e="pocketbase_auth"){super(),this.storageFallback={},this.storageKey=e,this._bindStorageEvent()}get token(){return(this._storageGet(this.storageKey)||{}).token||""}get record(){const e=this._storageGet(this.storageKey)||{};return e.record||e.model||null}get model(){return this.record}save(e,t){this._storageSet(this.storageKey,{token:e,record:t}),super.save(e,t)}clear(){this._storageRemove(this.storageKey),super.clear()}_storageGet(e){if("undefined"!=typeof window&&window?.localStorage){const t=window.localStorage.getItem(e)||"";try{return JSON.parse(t)}catch(e){return t}}return this.storageFallback[e]}_storageSet(e,t){if("undefined"!=typeof window&&window?.localStorage){let s=t;"string"!=typeof t&&(s=JSON.stringify(t)),window.localStorage.setItem(e,s)}else this.storageFallback[e]=t}_storageRemove(e){"undefined"!=typeof window&&window?.localStorage&&window.localStorage?.removeItem(e),delete this.storageFallback[e]}_bindStorageEvent(){"undefined"!=typeof window&&window?.localStorage&&window.addEventListener&&window.addEventListener("storage",(e=>{if(e.key!=this.storageKey)return;const t=this._storageGet(this.storageKey)||{};super.save(t.token||"",t.record||t.model||null)}))}}class BaseService{constructor(e){this.client=e}}class SettingsService extends BaseService{async getAll(e){return e=Object.assign({method:"GET"},e),this.client.send("/api/settings",e)}async update(e,t){return t=Object.assign({method:"PATCH",body:e},t),this.client.send("/api/settings",t)}async testS3(e="storage",t){return t=Object.assign({method:"POST",body:{filesystem:e}},t),this.client.send("/api/settings/test/s3",t).then((()=>!0))}async testEmail(e,t,s,i){return i=Object.assign({method:"POST",body:{email:t,template:s,collection:e}},i),this.client.send("/api/settings/test/email",i).then((()=>!0))}async generateAppleClientSecret(e,t,s,i,n,r){return r=Object.assign({method:"POST",body:{clientId:e,teamId:t,keyId:s,privateKey:i,duration:n}},r),this.client.send("/api/settings/apple/generate-client-secret",r)}}const n=["requestKey","$cancelKey","$autoCancel","fetch","headers","body","query","params","cache","credentials","headers","integrity","keepalive","method","mode","redirect","referrer","referrerPolicy","signal","window"];function normalizeUnknownQueryParams(e){if(e){e.query=e.query||{};for(let t in e)n.includes(t)||(e.query[t]=e[t],delete e[t])}}function serializeQueryParams(e){const t=[];for(const s in e){const i=encodeURIComponent(s),n=Array.isArray(e[s])?e[s]:[e[s]];for(let e of n)e=prepareQueryParamValue(e),null!==e&&t.push(i+"="+e)}return t.join("&")}function prepareQueryParamValue(e){return null==e?null:e instanceof Date?encodeURIComponent(e.toISOString().replace("T"," ")):"object"==typeof e?encodeURIComponent(JSON.stringify(e)):encodeURIComponent(e)}class RealtimeService extends BaseService{constructor(){super(...arguments),this.clientId="",this.eventSource=null,this.subscriptions={},this.lastSentSubscriptions=[],this.maxConnectTimeout=15e3,this.reconnectAttempts=0,this.maxReconnectAttempts=1/0,this.predefinedReconnectIntervals=[200,300,500,1e3,1200,1500,2e3],this.pendingConnects=[]}get isConnected(){return!!this.eventSource&&!!this.clientId&&!this.pendingConnects.length}async subscribe(e,t,s){if(!e)throw new Error("topic must be set.");let i=e;if(s){normalizeUnknownQueryParams(s=Object.assign({},s));const e="options="+encodeURIComponent(JSON.stringify({query:s.query,headers:s.headers}));i+=(i.includes("?")?"&":"?")+e}const listener=function(e){const s=e;let i;try{i=JSON.parse(s?.data)}catch{}t(i||{})};return this.subscriptions[i]||(this.subscriptions[i]=[]),this.subscriptions[i].push(listener),this.isConnected?1===this.subscriptions[i].length?await this.submitSubscriptions():this.eventSource?.addEventListener(i,listener):await this.connect(),async()=>this.unsubscribeByTopicAndListener(e,listener)}async unsubscribe(e){let t=!1;if(e){const s=this.getSubscriptionsByTopic(e);for(let e in s)if(this.hasSubscriptionListeners(e)){for(let t of this.subscriptions[e])this.eventSource?.removeEventListener(e,t);delete this.subscriptions[e],t||(t=!0)}}else this.subscriptions={};this.hasSubscriptionListeners()?t&&await this.submitSubscriptions():this.disconnect()}async unsubscribeByPrefix(e){let t=!1;for(let s in this.subscriptions)if((s+"?").startsWith(e)){t=!0;for(let e of this.subscriptions[s])this.eventSource?.removeEventListener(s,e);delete this.subscriptions[s]}t&&(this.hasSubscriptionListeners()?await this.submitSubscriptions():this.disconnect())}async unsubscribeByTopicAndListener(e,t){let s=!1;const i=this.getSubscriptionsByTopic(e);for(let e in i){if(!Array.isArray(this.subscriptions[e])||!this.subscriptions[e].length)continue;let i=!1;for(let s=this.subscriptions[e].length-1;s>=0;s--)this.subscriptions[e][s]===t&&(i=!0,delete this.subscriptions[e][s],this.subscriptions[e].splice(s,1),this.eventSource?.removeEventListener(e,t));i&&(this.subscriptions[e].length||delete this.subscriptions[e],s||this.hasSubscriptionListeners(e)||(s=!0))}this.hasSubscriptionListeners()?s&&await this.submitSubscriptions():this.disconnect()}hasSubscriptionListeners(e){if(this.subscriptions=this.subscriptions||{},e)return!!this.subscriptions[e]?.length;for(let e in this.subscriptions)if(this.subscriptions[e]?.length)return!0;return!1}async submitSubscriptions(){if(this.clientId)return this.addAllSubscriptionListeners(),this.lastSentSubscriptions=this.getNonEmptySubscriptionKeys(),this.client.send("/api/realtime",{method:"POST",body:{clientId:this.clientId,subscriptions:this.lastSentSubscriptions},requestKey:this.getSubscriptionsCancelKey()}).catch((e=>{if(!e?.isAbort)throw e}))}getSubscriptionsCancelKey(){return"realtime_"+this.clientId}getSubscriptionsByTopic(e){const t={};e=e.includes("?")?e:e+"?";for(let s in this.subscriptions)(s+"?").startsWith(e)&&(t[s]=this.subscriptions[s]);return t}getNonEmptySubscriptionKeys(){const e=[];for(let t in this.subscriptions)this.subscriptions[t].length&&e.push(t);return e}addAllSubscriptionListeners(){if(this.eventSource){this.removeAllSubscriptionListeners();for(let e in this.subscriptions)for(let t of this.subscriptions[e])this.eventSource.addEventListener(e,t)}}removeAllSubscriptionListeners(){if(this.eventSource)for(let e in this.subscriptions)for(let t of this.subscriptions[e])this.eventSource.removeEventListener(e,t)}async connect(){if(!(this.reconnectAttempts>0))return new Promise(((e,t)=>{this.pendingConnects.push({resolve:e,reject:t}),this.pendingConnects.length>1||this.initConnect()}))}initConnect(){this.disconnect(!0),clearTimeout(this.connectTimeoutId),this.connectTimeoutId=setTimeout((()=>{this.connectErrorHandler(new Error("EventSource connect took too long."))}),this.maxConnectTimeout),this.eventSource=new EventSource(this.client.buildURL("/api/realtime")),this.eventSource.onerror=e=>{this.connectErrorHandler(new Error("Failed to establish realtime connection."))},this.eventSource.addEventListener("PB_CONNECT",(e=>{const t=e;this.clientId=t?.lastEventId,this.submitSubscriptions().then((async()=>{let e=3;for(;this.hasUnsentSubscriptions()&&e>0;)e--,await this.submitSubscriptions()})).then((()=>{for(let e of this.pendingConnects)e.resolve();this.pendingConnects=[],this.reconnectAttempts=0,clearTimeout(this.reconnectTimeoutId),clearTimeout(this.connectTimeoutId);const t=this.getSubscriptionsByTopic("PB_CONNECT");for(let s in t)for(let i of t[s])i(e)})).catch((e=>{this.clientId="",this.connectErrorHandler(e)}))}))}hasUnsentSubscriptions(){const e=this.getNonEmptySubscriptionKeys();if(e.length!=this.lastSentSubscriptions.length)return!0;for(const t of e)if(!this.lastSentSubscriptions.includes(t))return!0;return!1}connectErrorHandler(e){if(clearTimeout(this.connectTimeoutId),clearTimeout(this.reconnectTimeoutId),!this.clientId&&!this.reconnectAttempts||this.reconnectAttempts>this.maxReconnectAttempts){for(let t of this.pendingConnects)t.reject(new ClientResponseError(e));return this.pendingConnects=[],void this.disconnect()}this.disconnect(!0);const t=this.predefinedReconnectIntervals[this.reconnectAttempts]||this.predefinedReconnectIntervals[this.predefinedReconnectIntervals.length-1];this.reconnectAttempts++,this.reconnectTimeoutId=setTimeout((()=>{this.initConnect()}),t)}disconnect(e=!1){if(this.clientId&&this.onDisconnect&&this.onDisconnect(Object.keys(this.subscriptions)),clearTimeout(this.connectTimeoutId),clearTimeout(this.reconnectTimeoutId),this.removeAllSubscriptionListeners(),this.client.cancelRequest(this.getSubscriptionsCancelKey()),this.eventSource?.close(),this.eventSource=null,this.clientId="",!e){this.reconnectAttempts=0;for(let e of this.pendingConnects)e.resolve();this.pendingConnects=[]}}}class CrudService extends BaseService{decode(e){return e}async getFullList(e,t){if("number"==typeof e)return this._getFullList(e,t);let s=500;return(t=Object.assign({},e,t)).batch&&(s=t.batch,delete t.batch),this._getFullList(s,t)}async getList(e=1,t=30,s){return(s=Object.assign({method:"GET"},s)).query=Object.assign({page:e,perPage:t},s.query),this.client.send(this.baseCrudPath,s).then((e=>(e.items=e.items?.map((e=>this.decode(e)))||[],e)))}async getFirstListItem(e,t){return(t=Object.assign({requestKey:"one_by_filter_"+this.baseCrudPath+"_"+e},t)).query=Object.assign({filter:e,skipTotal:1},t.query),this.getList(1,1,t).then((e=>{if(!e?.items?.length)throw new ClientResponseError({status:404,response:{code:404,message:"The requested resource wasn't found.",data:{}}});return e.items[0]}))}async getOne(e,t){if(!e)throw new ClientResponseError({url:this.client.buildURL(this.baseCrudPath+"/"),status:404,response:{code:404,message:"Missing required record id.",data:{}}});return t=Object.assign({method:"GET"},t),this.client.send(this.baseCrudPath+"/"+encodeURIComponent(e),t).then((e=>this.decode(e)))}async create(e,t){return t=Object.assign({method:"POST",body:e},t),this.client.send(this.baseCrudPath,t).then((e=>this.decode(e)))}async update(e,t,s){return s=Object.assign({method:"PATCH",body:t},s),this.client.send(this.baseCrudPath+"/"+encodeURIComponent(e),s).then((e=>this.decode(e)))}async delete(e,t){return t=Object.assign({method:"DELETE"},t),this.client.send(this.baseCrudPath+"/"+encodeURIComponent(e),t).then((()=>!0))}_getFullList(e=500,t){(t=t||{}).query=Object.assign({skipTotal:1},t.query);let s=[],request=async i=>this.getList(i,e||500,t).then((e=>{const t=e.items;return s=s.concat(t),t.length==e.perPage?request(i+1):s}));return request(1)}}function normalizeLegacyOptionsArgs(e,t,s,i){const n=void 0!==i;return n||void 0!==s?n?(console.warn(e),t.body=Object.assign({},t.body,s),t.query=Object.assign({},t.query,i),t):Object.assign(t,s):t}function resetAutoRefresh(e){e._resetAutoRefresh?.()}class RecordService extends CrudService{constructor(e,t){super(e),this.collectionIdOrName=t}get baseCrudPath(){return this.baseCollectionPath+"/records"}get baseCollectionPath(){return"/api/collections/"+encodeURIComponent(this.collectionIdOrName)}get isSuperusers(){return"_superusers"==this.collectionIdOrName||"_pbc_2773867675"==this.collectionIdOrName}async subscribe(e,t,s){if(!e)throw new Error("Missing topic.");if(!t)throw new Error("Missing subscription callback.");return this.client.realtime.subscribe(this.collectionIdOrName+"/"+e,t,s)}async unsubscribe(e){return e?this.client.realtime.unsubscribe(this.collectionIdOrName+"/"+e):this.client.realtime.unsubscribeByPrefix(this.collectionIdOrName)}async getFullList(e,t){if("number"==typeof e)return super.getFullList(e,t);const s=Object.assign({},e,t);return super.getFullList(s)}async getList(e=1,t=30,s){return super.getList(e,t,s)}async getFirstListItem(e,t){return super.getFirstListItem(e,t)}async getOne(e,t){return super.getOne(e,t)}async create(e,t){return super.create(e,t)}async update(e,t,s){return super.update(e,t,s).then((e=>{if(this.client.authStore.record?.id===e?.id&&(this.client.authStore.record?.collectionId===this.collectionIdOrName||this.client.authStore.record?.collectionName===this.collectionIdOrName)){let t=Object.assign({},this.client.authStore.record.expand),s=Object.assign({},this.client.authStore.record,e);t&&(s.expand=Object.assign(t,e.expand)),this.client.authStore.save(this.client.authStore.token,s)}return e}))}async delete(e,t){return super.delete(e,t).then((t=>(!t||this.client.authStore.record?.id!==e||this.client.authStore.record?.collectionId!==this.collectionIdOrName&&this.client.authStore.record?.collectionName!==this.collectionIdOrName||this.client.authStore.clear(),t)))}authResponse(e){const t=this.decode(e?.record||{});return this.client.authStore.save(e?.token,t),Object.assign({},e,{token:e?.token||"",record:t})}async listAuthMethods(e){return e=Object.assign({method:"GET",fields:"mfa,otp,password,oauth2"},e),this.client.send(this.baseCollectionPath+"/auth-methods",e)}async authWithPassword(e,t,s){let i;s=Object.assign({method:"POST",body:{identity:e,password:t}},s),this.isSuperusers&&(i=s.autoRefreshThreshold,delete s.autoRefreshThreshold,s.autoRefresh||resetAutoRefresh(this.client));let n=await this.client.send(this.baseCollectionPath+"/auth-with-password",s);return n=this.authResponse(n),i&&this.isSuperusers&&function registerAutoRefresh(e,t,s,i){resetAutoRefresh(e);const n=e.beforeSend,r=e.authStore.record,o=e.authStore.onChange(((t,s)=>{(!t||s?.id!=r?.id||(s?.collectionId||r?.collectionId)&&s?.collectionId!=r?.collectionId)&&resetAutoRefresh(e)}));e._resetAutoRefresh=function(){o(),e.beforeSend=n,delete e._resetAutoRefresh},e.beforeSend=async(r,o)=>{const a=e.authStore.token;if(o.query?.autoRefresh)return n?n(r,o):{url:r,sendOptions:o};let c=e.authStore.isValid;if(c&&isTokenExpired(e.authStore.token,t))try{await s()}catch(e){c=!1}c||await i();const l=o.headers||{};for(let t in l)if("authorization"==t.toLowerCase()&&a==l[t]&&e.authStore.token){l[t]=e.authStore.token;break}return o.headers=l,n?n(r,o):{url:r,sendOptions:o}}}(this.client,i,(()=>this.authRefresh({autoRefresh:!0})),(()=>this.authWithPassword(e,t,Object.assign({autoRefresh:!0},s)))),n}async authWithOAuth2Code(e,t,s,i,n,r,o){let a={method:"POST",body:{provider:e,code:t,codeVerifier:s,redirectURL:i,createData:n}};return a=normalizeLegacyOptionsArgs("This form of authWithOAuth2Code(provider, code, codeVerifier, redirectURL, createData?, body?, query?) is deprecated. Consider replacing it with authWithOAuth2Code(provider, code, codeVerifier, redirectURL, createData?, options?).",a,r,o),this.client.send(this.baseCollectionPath+"/auth-with-oauth2",a).then((e=>this.authResponse(e)))}authWithOAuth2(...e){if(e.length>1||"string"==typeof e?.[0])return console.warn("PocketBase: This form of authWithOAuth2() is deprecated and may get removed in the future. Please replace with authWithOAuth2Code() OR use the authWithOAuth2() realtime form as shown in https://pocketbase.io/docs/authentication/#oauth2-integration."),this.authWithOAuth2Code(e?.[0]||"",e?.[1]||"",e?.[2]||"",e?.[3]||"",e?.[4]||{},e?.[5]||{},e?.[6]||{});const t=e?.[0]||{};let s=null;t.urlCallback||(s=openBrowserPopup(void 0));const i=new RealtimeService(this.client);function cleanup(){s?.close(),i.unsubscribe()}const n={},r=t.requestKey;return r&&(n.requestKey=r),this.listAuthMethods(n).then((e=>{const n=e.oauth2.providers.find((e=>e.name===t.provider));if(!n)throw new ClientResponseError(new Error(`Missing or invalid provider "${t.provider}".`));const o=this.client.buildURL("/api/oauth2-redirect"),a=r?this.client.cancelControllers?.[r]:void 0;return a&&(a.signal.onabort=()=>{cleanup()}),new Promise((async(e,r)=>{try{await i.subscribe("@oauth2",(async s=>{const c=i.clientId;try{if(!s.state||c!==s.state)throw new Error("State parameters don't match.");if(s.error||!s.code)throw new Error("OAuth2 redirect error or missing code: "+s.error);const i=Object.assign({},t);delete i.provider,delete i.scopes,delete i.createData,delete i.urlCallback,a?.signal?.onabort&&(a.signal.onabort=null);const r=await this.authWithOAuth2Code(n.name,s.code,n.codeVerifier,o,t.createData,i);e(r)}catch(e){r(new ClientResponseError(e))}cleanup()}));const c={state:i.clientId};t.scopes?.length&&(c.scope=t.scopes.join(" "));const l=this._replaceQueryParams(n.authURL+o,c);let h=t.urlCallback||function(e){s?s.location.href=e:s=openBrowserPopup(e)};await h(l)}catch(e){cleanup(),r(new ClientResponseError(e))}}))})).catch((e=>{throw cleanup(),e}))}async authRefresh(e,t){let s={method:"POST"};return s=normalizeLegacyOptionsArgs("This form of authRefresh(body?, query?) is deprecated. Consider replacing it with authRefresh(options?).",s,e,t),this.client.send(this.baseCollectionPath+"/auth-refresh",s).then((e=>this.authResponse(e)))}async requestPasswordReset(e,t,s){let i={method:"POST",body:{email:e}};return i=normalizeLegacyOptionsArgs("This form of requestPasswordReset(email, body?, query?) is deprecated. Consider replacing it with requestPasswordReset(email, options?).",i,t,s),this.client.send(this.baseCollectionPath+"/request-password-reset",i).then((()=>!0))}async confirmPasswordReset(e,t,s,i,n){let r={method:"POST",body:{token:e,password:t,passwordConfirm:s}};return r=normalizeLegacyOptionsArgs("This form of confirmPasswordReset(token, password, passwordConfirm, body?, query?) is deprecated. Consider replacing it with confirmPasswordReset(token, password, passwordConfirm, options?).",r,i,n),this.client.send(this.baseCollectionPath+"/confirm-password-reset",r).then((()=>!0))}async requestVerification(e,t,s){let i={method:"POST",body:{email:e}};return i=normalizeLegacyOptionsArgs("This form of requestVerification(email, body?, query?) is deprecated. Consider replacing it with requestVerification(email, options?).",i,t,s),this.client.send(this.baseCollectionPath+"/request-verification",i).then((()=>!0))}async confirmVerification(e,t,s){let i={method:"POST",body:{token:e}};return i=normalizeLegacyOptionsArgs("This form of confirmVerification(token, body?, query?) is deprecated. Consider replacing it with confirmVerification(token, options?).",i,t,s),this.client.send(this.baseCollectionPath+"/confirm-verification",i).then((()=>{const t=getTokenPayload(e),s=this.client.authStore.record;return s&&!s.verified&&s.id===t.id&&s.collectionId===t.collectionId&&(s.verified=!0,this.client.authStore.save(this.client.authStore.token,s)),!0}))}async requestEmailChange(e,t,s){let i={method:"POST",body:{newEmail:e}};return i=normalizeLegacyOptionsArgs("This form of requestEmailChange(newEmail, body?, query?) is deprecated. Consider replacing it with requestEmailChange(newEmail, options?).",i,t,s),this.client.send(this.baseCollectionPath+"/request-email-change",i).then((()=>!0))}async confirmEmailChange(e,t,s,i){let n={method:"POST",body:{token:e,password:t}};return n=normalizeLegacyOptionsArgs("This form of confirmEmailChange(token, password, body?, query?) is deprecated. Consider replacing it with confirmEmailChange(token, password, options?).",n,s,i),this.client.send(this.baseCollectionPath+"/confirm-email-change",n).then((()=>{const t=getTokenPayload(e),s=this.client.authStore.record;return s&&s.id===t.id&&s.collectionId===t.collectionId&&this.client.authStore.clear(),!0}))}async listExternalAuths(e,t){return this.client.collection("_externalAuths").getFullList(Object.assign({},t,{filter:this.client.filter("recordRef = {:id}",{id:e})}))}async unlinkExternalAuth(e,t,s){const i=await this.client.collection("_externalAuths").getFirstListItem(this.client.filter("recordRef = {:recordId} && provider = {:provider}",{recordId:e,provider:t}));return this.client.collection("_externalAuths").delete(i.id,s).then((()=>!0))}async requestOTP(e,t){return t=Object.assign({method:"POST",body:{email:e}},t),this.client.send(this.baseCollectionPath+"/request-otp",t)}async authWithOTP(e,t,s){return s=Object.assign({method:"POST",body:{otpId:e,password:t}},s),this.client.send(this.baseCollectionPath+"/auth-with-otp",s).then((e=>this.authResponse(e)))}async impersonate(e,t,s){(s=Object.assign({method:"POST",body:{duration:t}},s)).headers=s.headers||{},s.headers.Authorization||(s.headers.Authorization=this.client.authStore.token);const i=new Client(this.client.baseURL,new BaseAuthStore,this.client.lang),n=await i.send(this.baseCollectionPath+"/impersonate/"+encodeURIComponent(e),s);return i.authStore.save(n?.token,this.decode(n?.record||{})),i}_replaceQueryParams(e,t={}){let s=e,i="";e.indexOf("?")>=0&&(s=e.substring(0,e.indexOf("?")),i=e.substring(e.indexOf("?")+1));const n={},r=i.split("&");for(const e of r){if(""==e)continue;const t=e.split("=");n[decodeURIComponent(t[0].replace(/\+/g," "))]=decodeURIComponent((t[1]||"").replace(/\+/g," "))}for(let e in t)t.hasOwnProperty(e)&&(null==t[e]?delete n[e]:n[e]=t[e]);i="";for(let e in n)n.hasOwnProperty(e)&&(""!=i&&(i+="&"),i+=encodeURIComponent(e.replace(/%20/g,"+"))+"="+encodeURIComponent(n[e].replace(/%20/g,"+")));return""!=i?s+"?"+i:s}}function openBrowserPopup(e){if("undefined"==typeof window||!window?.open)throw new ClientResponseError(new Error("Not in a browser context - please pass a custom urlCallback function."));let t=1024,s=768,i=window.innerWidth,n=window.innerHeight;t=t>i?i:t,s=s>n?n:s;let r=i/2-t/2,o=n/2-s/2;return window.open(e,"popup_window","width="+t+",height="+s+",top="+o+",left="+r+",resizable,menubar=no")}class CollectionService extends CrudService{get baseCrudPath(){return"/api/collections"}async import(e,t=!1,s){return s=Object.assign({method:"PUT",body:{collections:e,deleteMissing:t}},s),this.client.send(this.baseCrudPath+"/import",s).then((()=>!0))}async getScaffolds(e){return e=Object.assign({method:"GET"},e),this.client.send(this.baseCrudPath+"/meta/scaffolds",e)}async truncate(e,t){return t=Object.assign({method:"DELETE"},t),this.client.send(this.baseCrudPath+"/"+encodeURIComponent(e)+"/truncate",t).then((()=>!0))}}class LogService extends BaseService{async getList(e=1,t=30,s){return(s=Object.assign({method:"GET"},s)).query=Object.assign({page:e,perPage:t},s.query),this.client.send("/api/logs",s)}async getOne(e,t){if(!e)throw new ClientResponseError({url:this.client.buildURL("/api/logs/"),status:404,response:{code:404,message:"Missing required log id.",data:{}}});return t=Object.assign({method:"GET"},t),this.client.send("/api/logs/"+encodeURIComponent(e),t)}async getStats(e){return e=Object.assign({method:"GET"},e),this.client.send("/api/logs/stats",e)}}class HealthService extends BaseService{async check(e){return e=Object.assign({method:"GET"},e),this.client.send("/api/health",e)}}class FileService extends BaseService{getUrl(e,t,s={}){return console.warn("Please replace pb.files.getUrl() with pb.files.getURL()"),this.getURL(e,t,s)}getURL(e,t,s={}){if(!t||!e?.id||!e?.collectionId&&!e?.collectionName)return"";const i=[];i.push("api"),i.push("files"),i.push(encodeURIComponent(e.collectionId||e.collectionName)),i.push(encodeURIComponent(e.id)),i.push(encodeURIComponent(t));let n=this.client.buildURL(i.join("/"));if(Object.keys(s).length){!1===s.download&&delete s.download;const e=new URLSearchParams(s);n+=(n.includes("?")?"&":"?")+e}return n}async getToken(e){return e=Object.assign({method:"POST"},e),this.client.send("/api/files/token",e).then((e=>e?.token||""))}}class BackupService extends BaseService{async getFullList(e){return e=Object.assign({method:"GET"},e),this.client.send("/api/backups",e)}async create(e,t){return t=Object.assign({method:"POST",body:{name:e}},t),this.client.send("/api/backups",t).then((()=>!0))}async upload(e,t){return t=Object.assign({method:"POST",body:e},t),this.client.send("/api/backups/upload",t).then((()=>!0))}async delete(e,t){return t=Object.assign({method:"DELETE"},t),this.client.send(`/api/backups/${encodeURIComponent(e)}`,t).then((()=>!0))}async restore(e,t){return t=Object.assign({method:"POST"},t),this.client.send(`/api/backups/${encodeURIComponent(e)}/restore`,t).then((()=>!0))}getDownloadUrl(e,t){return console.warn("Please replace pb.backups.getDownloadUrl() with pb.backups.getDownloadURL()"),this.getDownloadURL(e,t)}getDownloadURL(e,t){return this.client.buildURL(`/api/backups/${encodeURIComponent(t)}?token=${encodeURIComponent(e)}`)}}class CronService extends BaseService{async getFullList(e){return e=Object.assign({method:"GET"},e),this.client.send("/api/crons",e)}async run(e,t){return t=Object.assign({method:"POST"},t),this.client.send(`/api/crons/${encodeURIComponent(e)}`,t).then((()=>!0))}}function isFile(e){return"undefined"!=typeof Blob&&e instanceof Blob||"undefined"!=typeof File&&e instanceof File||null!==e&&"object"==typeof e&&e.uri&&("undefined"!=typeof navigator&&"ReactNative"===navigator.product||"undefined"!=typeof global&&global.HermesInternal)}function isFormData(e){return e&&("FormData"===e.constructor?.name||"undefined"!=typeof FormData&&e instanceof FormData)}function hasFileField(e){for(const t in e){const s=Array.isArray(e[t])?e[t]:[e[t]];for(const e of s)if(isFile(e))return!0}return!1}const r=/^[\-\.\d]+$/;function inferFormDataValue(e){if("string"!=typeof e)return e;if("true"==e)return!0;if("false"==e)return!1;if(("-"===e[0]||e[0]>="0"&&e[0]<="9")&&r.test(e)){let t=+e;if(""+t===e)return t}return e}class BatchService extends BaseService{constructor(){super(...arguments),this.requests=[],this.subs={}}collection(e){return this.subs[e]||(this.subs[e]=new SubBatchService(this.requests,e)),this.subs[e]}async send(e){const t=new FormData,s=[];for(let e=0;e{if("@jsonPayload"===s&&"string"==typeof e)try{let s=JSON.parse(e);Object.assign(t,s)}catch(e){console.warn("@jsonPayload error:",e)}else void 0!==t[s]?(Array.isArray(t[s])||(t[s]=[t[s]]),t[s].push(inferFormDataValue(e))):t[s]=inferFormDataValue(e)})),t}(s));for(const t in s){const i=s[t];if(isFile(i))e.files[t]=e.files[t]||[],e.files[t].push(i);else if(Array.isArray(i)){const s=[],n=[];for(const e of i)isFile(e)?s.push(e):n.push(e);if(s.length>0&&s.length==i.length){e.files[t]=e.files[t]||[];for(let i of s)e.files[t].push(i)}else if(e.json[t]=n,s.length>0){let i=t;t.startsWith("+")||t.endsWith("+")||(i+="+"),e.files[i]=e.files[i]||[];for(let t of s)e.files[i].push(t)}}else e.json[t]=i}}}class Client{get baseUrl(){return this.baseURL}set baseUrl(e){this.baseURL=e}constructor(e="/",t,s="en-US"){this.cancelControllers={},this.recordServices={},this.enableAutoCancellation=!0,this.baseURL=e,this.lang=s,t?this.authStore=t:"undefined"!=typeof window&&window.Deno?this.authStore=new BaseAuthStore:this.authStore=new LocalAuthStore,this.collections=new CollectionService(this),this.files=new FileService(this),this.logs=new LogService(this),this.settings=new SettingsService(this),this.realtime=new RealtimeService(this),this.health=new HealthService(this),this.backups=new BackupService(this),this.crons=new CronService(this)}get admins(){return this.collection("_superusers")}createBatch(){return new BatchService(this)}collection(e){return this.recordServices[e]||(this.recordServices[e]=new RecordService(this,e)),this.recordServices[e]}autoCancellation(e){return this.enableAutoCancellation=!!e,this}cancelRequest(e){return this.cancelControllers[e]&&(this.cancelControllers[e].abort(),delete this.cancelControllers[e]),this}cancelAllRequests(){for(let e in this.cancelControllers)this.cancelControllers[e].abort();return this.cancelControllers={},this}filter(e,t){if(!t)return e;for(let s in t){let i=t[s];switch(typeof i){case"boolean":case"number":i=""+i;break;case"string":i="'"+i.replace(/'/g,"\\'")+"'";break;default:i=null===i?"null":i instanceof Date?"'"+i.toISOString().replace("T"," ")+"'":"'"+JSON.stringify(i).replace(/'/g,"\\'")+"'"}e=e.replaceAll("{:"+s+"}",i)}return e}getFileUrl(e,t,s={}){return console.warn("Please replace pb.getFileUrl() with pb.files.getURL()"),this.files.getURL(e,t,s)}buildUrl(e){return console.warn("Please replace pb.buildUrl() with pb.buildURL()"),this.buildURL(e)}buildURL(e){let t=this.baseURL;return"undefined"==typeof window||!window.location||t.startsWith("https://")||t.startsWith("http://")||(t=window.location.origin?.endsWith("/")?window.location.origin.substring(0,window.location.origin.length-1):window.location.origin||"",this.baseURL.startsWith("/")||(t+=window.location.pathname||"/",t+=t.endsWith("/")?"":"/"),t+=this.baseURL),e&&(t+=t.endsWith("/")?"":"/",t+=e.startsWith("/")?e.substring(1):e),t}async send(e,t){t=this.initSendOptions(e,t);let s=this.buildURL(e);if(this.beforeSend){const e=Object.assign({},await this.beforeSend(s,t));void 0!==e.url||void 0!==e.options?(s=e.url||s,t=e.options||t):Object.keys(e).length&&(t=e,console?.warn&&console.warn("Deprecated format of beforeSend return: please use `return { url, options }`, instead of `return options`."))}if(void 0!==t.query){const e=serializeQueryParams(t.query);e&&(s+=(s.includes("?")?"&":"?")+e),delete t.query}"application/json"==this.getHeader(t.headers,"Content-Type")&&t.body&&"string"!=typeof t.body&&(t.body=JSON.stringify(t.body));return(t.fetch||fetch)(s,t).then((async e=>{let s={};try{s=await e.json()}catch(e){if(t.signal?.aborted||"undefined"!=typeof DOMException&&e instanceof DOMException&&("AbortError"==e.name||20==e.code))throw e}if(this.afterSend&&(s=await this.afterSend(e,s,t)),e.status>=400)throw new ClientResponseError({url:e.url,status:e.status,data:s});return s})).catch((e=>{throw new ClientResponseError(e)}))}initSendOptions(e,t){if((t=Object.assign({method:"GET"},t)).body=function convertToFormDataIfNeeded(e){if("undefined"==typeof FormData||void 0===e||"object"!=typeof e||null===e||isFormData(e)||!hasFileField(e))return e;const t=new FormData;for(const s in e){const i=e[s];if(void 0!==i)if("object"!=typeof i||hasFileField({data:i})){const e=Array.isArray(i)?i:[i];for(let i of e)t.append(s,i)}else{let e={};e[s]=i,t.append("@jsonPayload",JSON.stringify(e))}}return t}(t.body),normalizeUnknownQueryParams(t),t.query=Object.assign({},t.params,t.query),void 0===t.requestKey&&(!1===t.$autoCancel||!1===t.query.$autoCancel?t.requestKey=null:(t.$cancelKey||t.query.$cancelKey)&&(t.requestKey=t.$cancelKey||t.query.$cancelKey)),delete t.$autoCancel,delete t.query.$autoCancel,delete t.$cancelKey,delete t.query.$cancelKey,null!==this.getHeader(t.headers,"Content-Type")||isFormData(t.body)||(t.headers=Object.assign({},t.headers,{"Content-Type":"application/json"})),null===this.getHeader(t.headers,"Accept-Language")&&(t.headers=Object.assign({},t.headers,{"Accept-Language":this.lang})),this.authStore.token&&null===this.getHeader(t.headers,"Authorization")&&(t.headers=Object.assign({},t.headers,{Authorization:this.authStore.token})),this.enableAutoCancellation&&null!==t.requestKey){const s=t.requestKey||(t.method||"GET")+e;delete t.requestKey,this.cancelRequest(s);const i=new AbortController;this.cancelControllers[s]=i,t.signal=i.signal}return t}getHeader(e,t){e=e||{},t=t.toLowerCase();for(let s in e)if(s.toLowerCase()==t)return e[s];return null}}class AsyncAuthStore extends BaseAuthStore{constructor(e){super(),this.queue=[],this.saveFunc=e.save,this.clearFunc=e.clear,this._enqueue((()=>this._loadInitial(e.initial)))}save(e,t){super.save(e,t);let s="";try{s=JSON.stringify({token:e,record:t})}catch(e){console.warn("AsyncAuthStore: failed to stringify the new state")}this._enqueue((()=>this.saveFunc(s)))}clear(){super.clear(),this.clearFunc?this._enqueue((()=>this.clearFunc())):this._enqueue((()=>this.saveFunc("")))}async _loadInitial(e){try{if(e=await e){let t;"string"==typeof e?t=JSON.parse(e)||{}:"object"==typeof e&&(t=e),this.save(t.token||"",t.record||t.model||null)}}catch(e){}}_enqueue(e){this.queue.push(e),1==this.queue.length&&this._dequeue()}_dequeue(){this.queue.length&&this.queue[0]().finally((()=>{this.queue.shift(),this.queue.length&&this._dequeue()}))}}export{AsyncAuthStore,BaseAuthStore,BatchService,ClientResponseError,CollectionService,CrudService,HealthService,LocalAuthStore,LogService,RealtimeService,RecordService,SubBatchService,cookieParse,cookieSerialize,Client as default,getTokenPayload,isTokenExpired,normalizeUnknownQueryParams,serializeQueryParams}; -//# sourceMappingURL=pocketbase.es.js.map diff --git a/PBandGraphScaffold/node_modules/pocketbase/dist/pocketbase.es.js.map b/PBandGraphScaffold/node_modules/pocketbase/dist/pocketbase.es.js.map deleted file mode 100644 index 2230d3a..0000000 --- a/PBandGraphScaffold/node_modules/pocketbase/dist/pocketbase.es.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"pocketbase.es.js","sources":["../src/ClientResponseError.ts","../src/tools/cookie.ts","../src/tools/jwt.ts","../src/stores/BaseAuthStore.ts","../src/stores/LocalAuthStore.ts","../src/services/BaseService.ts","../src/services/SettingsService.ts","../src/tools/options.ts","../src/services/RealtimeService.ts","../src/services/CrudService.ts","../src/tools/legacy.ts","../src/tools/refresh.ts","../src/services/RecordService.ts","../src/services/CollectionService.ts","../src/services/LogService.ts","../src/services/HealthService.ts","../src/services/FileService.ts","../src/services/BackupService.ts","../src/services/CronService.ts","../src/tools/formdata.ts","../src/services/BatchService.ts","../src/Client.ts","../src/stores/AsyncAuthStore.ts"],"sourcesContent":["/**\n * ClientResponseError is a custom Error class that is intended to wrap\n * and normalize any error thrown by `Client.send()`.\n */\nexport class ClientResponseError extends Error {\n url: string = \"\";\n status: number = 0;\n response: { [key: string]: any } = {};\n isAbort: boolean = false;\n originalError: any = null;\n\n constructor(errData?: any) {\n super(\"ClientResponseError\");\n\n // Set the prototype explicitly.\n // https://github.com/Microsoft/TypeScript-wiki/blob/main/Breaking-Changes.md#extending-built-ins-like-error-array-and-map-may-no-longer-work\n Object.setPrototypeOf(this, ClientResponseError.prototype);\n\n if (errData !== null && typeof errData === \"object\") {\n this.url = typeof errData.url === \"string\" ? errData.url : \"\";\n this.status = typeof errData.status === \"number\" ? errData.status : 0;\n this.isAbort = !!errData.isAbort;\n this.originalError = errData.originalError;\n\n if (errData.response !== null && typeof errData.response === \"object\") {\n this.response = errData.response;\n } else if (errData.data !== null && typeof errData.data === \"object\") {\n this.response = errData.data;\n } else {\n this.response = {};\n }\n }\n\n if (!this.originalError && !(errData instanceof ClientResponseError)) {\n this.originalError = errData;\n }\n\n if (\n typeof DOMException !== \"undefined\" &&\n errData instanceof DOMException &&\n // https://developer.mozilla.org/en-US/docs/Web/API/DOMException#aborterror\n (errData.name == \"AbortError\" || errData.code == 20)\n ) {\n this.isAbort = true;\n }\n\n this.name = \"ClientResponseError \" + this.status;\n this.message = this.response?.message;\n if (!this.message) {\n if (this.isAbort) {\n this.message =\n \"The request was autocancelled. You can find more info in https://github.com/pocketbase/js-sdk#auto-cancellation.\";\n } else if (this.originalError?.cause?.message?.includes(\"ECONNREFUSED ::1\")) {\n this.message =\n \"Failed to connect to the PocketBase server. Try changing the SDK URL from localhost to 127.0.0.1 (https://github.com/pocketbase/js-sdk/issues/21).\";\n } else {\n this.message = \"Something went wrong.\";\n }\n }\n\n // set this.cause so that JS debugging tools can automatically connect\n // the dots between the original error and the wrapped one\n this.cause = this.originalError;\n }\n\n /**\n * Alias for `this.response` for backward compatibility.\n */\n get data() {\n return this.response;\n }\n\n /**\n * Make a POJO's copy of the current error class instance.\n * @see https://github.com/vuex-orm/vuex-orm/issues/255\n */\n toJSON() {\n return { ...this };\n }\n}\n","/**\n * -------------------------------------------------------------------\n * Simple cookie parse and serialize utilities mostly based on the\n * node module https://github.com/jshttp/cookie.\n * -------------------------------------------------------------------\n */\n\n/**\n * RegExp to match field-content in RFC 7230 sec 3.2\n *\n * field-content = field-vchar [ 1*( SP / HTAB ) field-vchar ]\n * field-vchar = VCHAR / obs-text\n * obs-text = %x80-FF\n */\nconst fieldContentRegExp = /^[\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+$/;\n\nexport interface ParseOptions {\n decode?: (val: string) => string;\n}\n\n/**\n * Parses the given cookie header string into an object\n * The object has the various cookies as keys(names) => values\n */\nexport function cookieParse(str: string, options?: ParseOptions): { [key: string]: any } {\n const result: { [key: string]: any } = {};\n\n if (typeof str !== \"string\") {\n return result;\n }\n\n const opt = Object.assign({}, options || {});\n const decode = opt.decode || defaultDecode;\n\n let index = 0;\n while (index < str.length) {\n const eqIdx = str.indexOf(\"=\", index);\n\n // no more cookie pairs\n if (eqIdx === -1) {\n break;\n }\n\n let endIdx = str.indexOf(\";\", index);\n\n if (endIdx === -1) {\n endIdx = str.length;\n } else if (endIdx < eqIdx) {\n // backtrack on prior semicolon\n index = str.lastIndexOf(\";\", eqIdx - 1) + 1;\n continue;\n }\n\n const key = str.slice(index, eqIdx).trim();\n\n // only assign once\n if (undefined === result[key]) {\n let val = str.slice(eqIdx + 1, endIdx).trim();\n\n // quoted values\n if (val.charCodeAt(0) === 0x22) {\n val = val.slice(1, -1);\n }\n\n try {\n result[key] = decode(val);\n } catch (_) {\n result[key] = val; // no decoding\n }\n }\n\n index = endIdx + 1;\n }\n\n return result;\n}\n\nexport interface SerializeOptions {\n encode?: (val: string | number | boolean) => string;\n maxAge?: number;\n domain?: string;\n path?: string;\n expires?: Date;\n httpOnly?: boolean;\n secure?: boolean;\n priority?: string;\n sameSite?: boolean | string;\n}\n\n/**\n * Serialize data into a cookie header.\n *\n * Serialize the a name value pair into a cookie string suitable for\n * http headers. An optional options object specified cookie parameters.\n *\n * ```js\n * cookieSerialize('foo', 'bar', { httpOnly: true }) // \"foo=bar; httpOnly\"\n * ```\n */\nexport function cookieSerialize(\n name: string,\n val: string,\n options?: SerializeOptions,\n): string {\n const opt = Object.assign({}, options || {});\n const encode = opt.encode || defaultEncode;\n\n if (!fieldContentRegExp.test(name)) {\n throw new TypeError(\"argument name is invalid\");\n }\n\n const value = encode(val);\n\n if (value && !fieldContentRegExp.test(value)) {\n throw new TypeError(\"argument val is invalid\");\n }\n\n let result = name + \"=\" + value;\n\n if (opt.maxAge != null) {\n const maxAge = opt.maxAge - 0;\n\n if (isNaN(maxAge) || !isFinite(maxAge)) {\n throw new TypeError(\"option maxAge is invalid\");\n }\n\n result += \"; Max-Age=\" + Math.floor(maxAge);\n }\n\n if (opt.domain) {\n if (!fieldContentRegExp.test(opt.domain)) {\n throw new TypeError(\"option domain is invalid\");\n }\n\n result += \"; Domain=\" + opt.domain;\n }\n\n if (opt.path) {\n if (!fieldContentRegExp.test(opt.path)) {\n throw new TypeError(\"option path is invalid\");\n }\n\n result += \"; Path=\" + opt.path;\n }\n\n if (opt.expires) {\n if (!isDate(opt.expires) || isNaN(opt.expires.valueOf())) {\n throw new TypeError(\"option expires is invalid\");\n }\n\n result += \"; Expires=\" + opt.expires.toUTCString();\n }\n\n if (opt.httpOnly) {\n result += \"; HttpOnly\";\n }\n\n if (opt.secure) {\n result += \"; Secure\";\n }\n\n if (opt.priority) {\n const priority =\n typeof opt.priority === \"string\" ? opt.priority.toLowerCase() : opt.priority;\n\n switch (priority) {\n case \"low\":\n result += \"; Priority=Low\";\n break;\n case \"medium\":\n result += \"; Priority=Medium\";\n break;\n case \"high\":\n result += \"; Priority=High\";\n break;\n default:\n throw new TypeError(\"option priority is invalid\");\n }\n }\n\n if (opt.sameSite) {\n const sameSite =\n typeof opt.sameSite === \"string\" ? opt.sameSite.toLowerCase() : opt.sameSite;\n\n switch (sameSite) {\n case true:\n result += \"; SameSite=Strict\";\n break;\n case \"lax\":\n result += \"; SameSite=Lax\";\n break;\n case \"strict\":\n result += \"; SameSite=Strict\";\n break;\n case \"none\":\n result += \"; SameSite=None\";\n break;\n default:\n throw new TypeError(\"option sameSite is invalid\");\n }\n }\n\n return result;\n}\n\n/**\n * Default URL-decode string value function.\n * Optimized to skip native call when no `%`.\n */\nfunction defaultDecode(val: string): string {\n return val.indexOf(\"%\") !== -1 ? decodeURIComponent(val) : val;\n}\n\n/**\n * Default URL-encode value function.\n */\nfunction defaultEncode(val: string | number | boolean): string {\n return encodeURIComponent(val);\n}\n\n/**\n * Determines if value is a Date.\n */\nfunction isDate(val: any): boolean {\n return Object.prototype.toString.call(val) === \"[object Date]\" || val instanceof Date;\n}\n","// @todo remove after https://github.com/reactwg/react-native-releases/issues/287\nconst isReactNative =\n (typeof navigator !== \"undefined\" && navigator.product === \"ReactNative\") ||\n (typeof global !== \"undefined\" && (global as any).HermesInternal);\n\nlet atobPolyfill: Function;\nif (typeof atob === \"function\" && !isReactNative) {\n atobPolyfill = atob;\n} else {\n /**\n * The code was extracted from:\n * https://github.com/davidchambers/Base64.js\n */\n atobPolyfill = (input: any) => {\n const chars = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\";\n\n let str = String(input).replace(/=+$/, \"\");\n if (str.length % 4 == 1) {\n throw new Error(\n \"'atob' failed: The string to be decoded is not correctly encoded.\",\n );\n }\n\n for (\n // initialize result and counters\n var bc = 0, bs, buffer, idx = 0, output = \"\";\n // get next character\n (buffer = str.charAt(idx++));\n // character found in table? initialize bit storage and add its ascii value;\n ~buffer &&\n ((bs = bc % 4 ? (bs as any) * 64 + buffer : buffer),\n // and if not first of each 4 characters,\n // convert the first 8 bits to one ascii character\n bc++ % 4)\n ? (output += String.fromCharCode(255 & (bs >> ((-2 * bc) & 6))))\n : 0\n ) {\n // try to find character in table (0-63, not found => -1)\n buffer = chars.indexOf(buffer);\n }\n\n return output;\n };\n}\n\n/**\n * Returns JWT token's payload data.\n */\nexport function getTokenPayload(token: string): { [key: string]: any } {\n if (token) {\n try {\n const encodedPayload = decodeURIComponent(\n atobPolyfill(token.split(\".\")[1])\n .split(\"\")\n .map(function (c: string) {\n return \"%\" + (\"00\" + c.charCodeAt(0).toString(16)).slice(-2);\n })\n .join(\"\"),\n );\n\n return JSON.parse(encodedPayload) || {};\n } catch (e) {}\n }\n\n return {};\n}\n\n/**\n * Checks whether a JWT token is expired or not.\n * Tokens without `exp` payload key are considered valid.\n * Tokens with empty payload (eg. invalid token strings) are considered expired.\n *\n * @param token The token to check.\n * @param [expirationThreshold] Time in seconds that will be subtracted from the token `exp` property.\n */\nexport function isTokenExpired(token: string, expirationThreshold = 0): boolean {\n let payload = getTokenPayload(token);\n\n if (\n Object.keys(payload).length > 0 &&\n (!payload.exp || payload.exp - expirationThreshold > Date.now() / 1000)\n ) {\n return false;\n }\n\n return true;\n}\n","import { cookieParse, cookieSerialize, SerializeOptions } from \"@/tools/cookie\";\nimport { isTokenExpired, getTokenPayload } from \"@/tools/jwt\";\nimport { RecordModel } from \"@/tools/dtos\";\n\nexport type AuthRecord = RecordModel | null;\n\nexport type AuthModel = AuthRecord; // for backward compatibility\n\nexport type OnStoreChangeFunc = (token: string, record: AuthRecord) => void;\n\nconst defaultCookieKey = \"pb_auth\";\n\n/**\n * Base AuthStore class that stores the auth state in runtime memory (aka. only for the duration of the store instane).\n *\n * Usually you wouldn't use it directly and instead use the builtin LocalAuthStore, AsyncAuthStore\n * or extend it with your own custom implementation.\n */\nexport class BaseAuthStore {\n protected baseToken: string = \"\";\n protected baseModel: AuthRecord = null;\n\n private _onChangeCallbacks: Array = [];\n\n /**\n * Retrieves the stored token (if any).\n */\n get token(): string {\n return this.baseToken;\n }\n\n /**\n * Retrieves the stored model data (if any).\n */\n get record(): AuthRecord {\n return this.baseModel;\n }\n\n /**\n * @deprecated use `record` instead.\n */\n get model(): AuthRecord {\n return this.baseModel;\n }\n\n /**\n * Loosely checks if the store has valid token (aka. existing and unexpired exp claim).\n */\n get isValid(): boolean {\n return !isTokenExpired(this.token);\n }\n\n /**\n * Loosely checks whether the currently loaded store state is for superuser.\n *\n * Alternatively you can also compare directly `pb.authStore.record?.collectionName`.\n */\n get isSuperuser(): boolean {\n let payload = getTokenPayload(this.token);\n\n return (\n payload.type == \"auth\" &&\n (this.record?.collectionName == \"_superusers\" ||\n // fallback in case the record field is not populated and assuming\n // that the collection crc32 checksum id wasn't manually changed\n (!this.record?.collectionName &&\n payload.collectionId == \"pbc_3142635823\"))\n );\n }\n\n /**\n * @deprecated use `isSuperuser` instead or simply check the record.collectionName property.\n */\n get isAdmin(): boolean {\n console.warn(\n \"Please replace pb.authStore.isAdmin with pb.authStore.isSuperuser OR simply check the value of pb.authStore.record?.collectionName\",\n );\n return this.isSuperuser;\n }\n\n /**\n * @deprecated use `!isSuperuser` instead or simply check the record.collectionName property.\n */\n get isAuthRecord(): boolean {\n console.warn(\n \"Please replace pb.authStore.isAuthRecord with !pb.authStore.isSuperuser OR simply check the value of pb.authStore.record?.collectionName\",\n );\n return getTokenPayload(this.token).type == \"auth\" && !this.isSuperuser;\n }\n\n /**\n * Saves the provided new token and model data in the auth store.\n */\n save(token: string, record?: AuthRecord): void {\n this.baseToken = token || \"\";\n this.baseModel = record || null;\n\n this.triggerChange();\n }\n\n /**\n * Removes the stored token and model data form the auth store.\n */\n clear(): void {\n this.baseToken = \"\";\n this.baseModel = null;\n this.triggerChange();\n }\n\n /**\n * Parses the provided cookie string and updates the store state\n * with the cookie's token and model data.\n *\n * NB! This function doesn't validate the token or its data.\n * Usually this isn't a concern if you are interacting only with the\n * PocketBase API because it has the proper server-side security checks in place,\n * but if you are using the store `isValid` state for permission controls\n * in a node server (eg. SSR), then it is recommended to call `authRefresh()`\n * after loading the cookie to ensure an up-to-date token and model state.\n * For example:\n *\n * ```js\n * pb.authStore.loadFromCookie(\"cookie string...\");\n *\n * try {\n * // get an up-to-date auth store state by veryfing and refreshing the loaded auth model (if any)\n * pb.authStore.isValid && await pb.collection('users').authRefresh();\n * } catch (_) {\n * // clear the auth store on failed refresh\n * pb.authStore.clear();\n * }\n * ```\n */\n loadFromCookie(cookie: string, key = defaultCookieKey): void {\n const rawData = cookieParse(cookie || \"\")[key] || \"\";\n\n let data: { [key: string]: any } = {};\n try {\n data = JSON.parse(rawData);\n // normalize\n if (typeof data === null || typeof data !== \"object\" || Array.isArray(data)) {\n data = {};\n }\n } catch (_) {}\n\n this.save(data.token || \"\", data.record || data.model || null);\n }\n\n /**\n * Exports the current store state as cookie string.\n *\n * By default the following optional attributes are added:\n * - Secure\n * - HttpOnly\n * - SameSite=Strict\n * - Path=/\n * - Expires={the token expiration date}\n *\n * NB! If the generated cookie exceeds 4096 bytes, this method will\n * strip the model data to the bare minimum to try to fit within the\n * recommended size in https://www.rfc-editor.org/rfc/rfc6265#section-6.1.\n */\n exportToCookie(options?: SerializeOptions, key = defaultCookieKey): string {\n const defaultOptions: SerializeOptions = {\n secure: true,\n sameSite: true,\n httpOnly: true,\n path: \"/\",\n };\n\n // extract the token expiration date\n const payload = getTokenPayload(this.token);\n if (payload?.exp) {\n defaultOptions.expires = new Date(payload.exp * 1000);\n } else {\n defaultOptions.expires = new Date(\"1970-01-01\");\n }\n\n // merge with the user defined options\n options = Object.assign({}, defaultOptions, options);\n\n const rawData = {\n token: this.token,\n record: this.record ? JSON.parse(JSON.stringify(this.record)) : null,\n };\n\n let result = cookieSerialize(key, JSON.stringify(rawData), options);\n\n const resultLength =\n typeof Blob !== \"undefined\" ? new Blob([result]).size : result.length;\n\n // strip down the model data to the bare minimum\n if (rawData.record && resultLength > 4096) {\n rawData.record = { id: rawData.record?.id, email: rawData.record?.email };\n const extraProps = [\"collectionId\", \"collectionName\", \"verified\"];\n for (const prop in this.record) {\n if (extraProps.includes(prop)) {\n rawData.record[prop] = this.record[prop];\n }\n }\n result = cookieSerialize(key, JSON.stringify(rawData), options);\n }\n\n return result;\n }\n\n /**\n * Register a callback function that will be called on store change.\n *\n * You can set the `fireImmediately` argument to true in order to invoke\n * the provided callback right after registration.\n *\n * Returns a removal function that you could call to \"unsubscribe\" from the changes.\n */\n onChange(callback: OnStoreChangeFunc, fireImmediately = false): () => void {\n this._onChangeCallbacks.push(callback);\n\n if (fireImmediately) {\n callback(this.token, this.record);\n }\n\n return () => {\n for (let i = this._onChangeCallbacks.length - 1; i >= 0; i--) {\n if (this._onChangeCallbacks[i] == callback) {\n delete this._onChangeCallbacks[i]; // removes the function reference\n this._onChangeCallbacks.splice(i, 1); // reindex the array\n return;\n }\n }\n };\n }\n\n protected triggerChange(): void {\n for (const callback of this._onChangeCallbacks) {\n callback && callback(this.token, this.record);\n }\n }\n}\n","import { BaseAuthStore, AuthRecord } from \"@/stores/BaseAuthStore\";\n\n/**\n * The default token store for browsers with auto fallback\n * to runtime/memory if local storage is undefined (e.g. in node env).\n */\nexport class LocalAuthStore extends BaseAuthStore {\n private storageFallback: { [key: string]: any } = {};\n private storageKey: string;\n\n constructor(storageKey = \"pocketbase_auth\") {\n super();\n\n this.storageKey = storageKey;\n\n this._bindStorageEvent();\n }\n\n /**\n * @inheritdoc\n */\n get token(): string {\n const data = this._storageGet(this.storageKey) || {};\n\n return data.token || \"\";\n }\n\n /**\n * @inheritdoc\n */\n get record(): AuthRecord {\n const data = this._storageGet(this.storageKey) || {};\n\n return data.record || data.model || null;\n }\n\n /**\n * @deprecated use `record` instead.\n */\n get model(): AuthRecord {\n return this.record;\n }\n\n /**\n * @inheritdoc\n */\n save(token: string, record?: AuthRecord) {\n this._storageSet(this.storageKey, {\n token: token,\n record: record,\n });\n\n super.save(token, record);\n }\n\n /**\n * @inheritdoc\n */\n clear() {\n this._storageRemove(this.storageKey);\n\n super.clear();\n }\n\n // ---------------------------------------------------------------\n // Internal helpers:\n // ---------------------------------------------------------------\n\n /**\n * Retrieves `key` from the browser's local storage\n * (or runtime/memory if local storage is undefined).\n */\n private _storageGet(key: string): any {\n if (typeof window !== \"undefined\" && window?.localStorage) {\n const rawValue = window.localStorage.getItem(key) || \"\";\n try {\n return JSON.parse(rawValue);\n } catch (e) {\n // not a json\n return rawValue;\n }\n }\n\n // fallback\n return this.storageFallback[key];\n }\n\n /**\n * Stores a new data in the browser's local storage\n * (or runtime/memory if local storage is undefined).\n */\n private _storageSet(key: string, value: any) {\n if (typeof window !== \"undefined\" && window?.localStorage) {\n // store in local storage\n let normalizedVal = value;\n if (typeof value !== \"string\") {\n normalizedVal = JSON.stringify(value);\n }\n window.localStorage.setItem(key, normalizedVal);\n } else {\n // store in fallback\n this.storageFallback[key] = value;\n }\n }\n\n /**\n * Removes `key` from the browser's local storage and the runtime/memory.\n */\n private _storageRemove(key: string) {\n // delete from local storage\n if (typeof window !== \"undefined\" && window?.localStorage) {\n window.localStorage?.removeItem(key);\n }\n\n // delete from fallback\n delete this.storageFallback[key];\n }\n\n /**\n * Updates the current store state on localStorage change.\n */\n private _bindStorageEvent() {\n if (\n typeof window === \"undefined\" ||\n !window?.localStorage ||\n !window.addEventListener\n ) {\n return;\n }\n\n window.addEventListener(\"storage\", (e) => {\n if (e.key != this.storageKey) {\n return;\n }\n\n const data = this._storageGet(this.storageKey) || {};\n\n super.save(data.token || \"\", data.record || data.model || null);\n });\n }\n}\n","import Client from \"@/Client\";\n\n/**\n * BaseService class that should be inherited from all API services.\n */\nexport abstract class BaseService {\n readonly client: Client;\n\n constructor(client: Client) {\n this.client = client;\n }\n}\n","import { BaseService } from \"@/services/BaseService\";\nimport { CommonOptions } from \"@/tools/options\";\n\ninterface appleClientSecret {\n secret: string;\n}\n\nexport class SettingsService extends BaseService {\n /**\n * Fetch all available app settings.\n *\n * @throws {ClientResponseError}\n */\n async getAll(options?: CommonOptions): Promise<{ [key: string]: any }> {\n options = Object.assign(\n {\n method: \"GET\",\n },\n options,\n );\n\n return this.client.send(\"/api/settings\", options);\n }\n\n /**\n * Bulk updates app settings.\n *\n * @throws {ClientResponseError}\n */\n async update(\n bodyParams?: { [key: string]: any } | FormData,\n options?: CommonOptions,\n ): Promise<{ [key: string]: any }> {\n options = Object.assign(\n {\n method: \"PATCH\",\n body: bodyParams,\n },\n options,\n );\n\n return this.client.send(\"/api/settings\", options);\n }\n\n /**\n * Performs a S3 filesystem connection test.\n *\n * The currently supported `filesystem` are \"storage\" and \"backups\".\n *\n * @throws {ClientResponseError}\n */\n async testS3(\n filesystem: string = \"storage\",\n options?: CommonOptions,\n ): Promise {\n options = Object.assign(\n {\n method: \"POST\",\n body: {\n filesystem: filesystem,\n },\n },\n options,\n );\n\n return this.client.send(\"/api/settings/test/s3\", options).then(() => true);\n }\n\n /**\n * Sends a test email.\n *\n * The possible `emailTemplate` values are:\n * - verification\n * - password-reset\n * - email-change\n *\n * @throws {ClientResponseError}\n */\n async testEmail(\n collectionIdOrName: string,\n toEmail: string,\n emailTemplate: string,\n options?: CommonOptions,\n ): Promise {\n options = Object.assign(\n {\n method: \"POST\",\n body: {\n email: toEmail,\n template: emailTemplate,\n collection: collectionIdOrName,\n },\n },\n options,\n );\n\n return this.client.send(\"/api/settings/test/email\", options).then(() => true);\n }\n\n /**\n * Generates a new Apple OAuth2 client secret.\n *\n * @throws {ClientResponseError}\n */\n async generateAppleClientSecret(\n clientId: string,\n teamId: string,\n keyId: string,\n privateKey: string,\n duration: number,\n options?: CommonOptions,\n ): Promise {\n options = Object.assign(\n {\n method: \"POST\",\n body: {\n clientId,\n teamId,\n keyId,\n privateKey,\n duration,\n },\n },\n options,\n );\n\n return this.client.send(\"/api/settings/apple/generate-client-secret\", options);\n }\n}\n","export interface SendOptions extends RequestInit {\n // for backward compatibility and to minimize the verbosity,\n // any top-level field that doesn't exist in RequestInit or the\n // fields below will be treated as query parameter.\n [key: string]: any;\n\n /**\n * Optional custom fetch function to use for sending the request.\n */\n fetch?: (url: RequestInfo | URL, config?: RequestInit) => Promise;\n\n /**\n * Custom headers to send with the requests.\n */\n headers?: { [key: string]: string };\n\n /**\n * The body of the request (serialized automatically for json requests).\n */\n body?: any;\n\n /**\n * Query parameters that will be appended to the request url.\n */\n query?: { [key: string]: any };\n\n /**\n * @deprecated use `query` instead\n *\n * for backward-compatibility `params` values are merged with `query`,\n * but this option may get removed in the final v1 release\n */\n params?: { [key: string]: any };\n\n /**\n * The request identifier that can be used to cancel pending requests.\n */\n requestKey?: string | null;\n\n /**\n * @deprecated use `requestKey:string` instead\n */\n $cancelKey?: string;\n\n /**\n * @deprecated use `requestKey:null` instead\n */\n $autoCancel?: boolean;\n}\n\nexport interface CommonOptions extends SendOptions {\n fields?: string;\n}\n\nexport interface ListOptions extends CommonOptions {\n page?: number;\n perPage?: number;\n sort?: string;\n filter?: string;\n skipTotal?: boolean;\n}\n\nexport interface FullListOptions extends ListOptions {\n batch?: number;\n}\n\nexport interface RecordOptions extends CommonOptions {\n expand?: string;\n}\n\nexport interface RecordListOptions extends ListOptions, RecordOptions {}\n\nexport interface RecordFullListOptions extends FullListOptions, RecordOptions {}\n\nexport interface RecordSubscribeOptions extends SendOptions {\n fields?: string;\n filter?: string;\n expand?: string;\n}\n\nexport interface LogStatsOptions extends CommonOptions {\n filter?: string;\n}\n\nexport interface FileOptions extends CommonOptions {\n thumb?: string;\n download?: boolean;\n}\n\nexport interface AuthOptions extends CommonOptions {\n /**\n * If autoRefreshThreshold is set it will take care to auto refresh\n * when necessary the auth data before each request to ensure that\n * the auth state is always valid.\n *\n * The value must be in seconds, aka. the amount of seconds\n * that will be subtracted from the current token `exp` claim in order\n * to determine whether it is going to expire within the specified time threshold.\n *\n * For example, if you want to auto refresh the token if it is\n * going to expire in the next 30mins (or already has expired),\n * it can be set to `1800`\n */\n autoRefreshThreshold?: number;\n}\n\n// -------------------------------------------------------------------\n\n// list of known SendOptions keys (everything else is treated as query param)\nconst knownSendOptionsKeys = [\n \"requestKey\",\n \"$cancelKey\",\n \"$autoCancel\",\n \"fetch\",\n \"headers\",\n \"body\",\n \"query\",\n \"params\",\n // ---,\n \"cache\",\n \"credentials\",\n \"headers\",\n \"integrity\",\n \"keepalive\",\n \"method\",\n \"mode\",\n \"redirect\",\n \"referrer\",\n \"referrerPolicy\",\n \"signal\",\n \"window\",\n];\n\n// modifies in place the provided options by moving unknown send options as query parameters.\nexport function normalizeUnknownQueryParams(options?: SendOptions): void {\n if (!options) {\n return;\n }\n\n options.query = options.query || {};\n for (let key in options) {\n if (knownSendOptionsKeys.includes(key)) {\n continue;\n }\n\n options.query[key] = options[key];\n delete options[key];\n }\n}\n\nexport function serializeQueryParams(params: { [key: string]: any }): string {\n const result: Array = [];\n\n for (const key in params) {\n const encodedKey = encodeURIComponent(key);\n const arrValue = Array.isArray(params[key]) ? params[key] : [params[key]];\n\n for (let v of arrValue) {\n v = prepareQueryParamValue(v);\n if (v === null) {\n continue;\n }\n result.push(encodedKey + \"=\" + v);\n }\n }\n\n return result.join(\"&\");\n}\n\n// encodes and normalizes the provided query param value.\nfunction prepareQueryParamValue(value: any): null | string {\n if (value === null || typeof value === \"undefined\") {\n return null;\n }\n\n if (value instanceof Date) {\n return encodeURIComponent(value.toISOString().replace(\"T\", \" \"));\n }\n\n if (typeof value === \"object\") {\n return encodeURIComponent(JSON.stringify(value));\n }\n\n return encodeURIComponent(value);\n}\n","import { ClientResponseError } from \"@/ClientResponseError\";\nimport { BaseService } from \"@/services/BaseService\";\nimport { SendOptions, normalizeUnknownQueryParams } from \"@/tools/options\";\n\ninterface promiseCallbacks {\n resolve: Function;\n reject: Function;\n}\n\ntype Subscriptions = { [key: string]: Array };\n\nexport type UnsubscribeFunc = () => Promise;\n\nexport class RealtimeService extends BaseService {\n clientId: string = \"\";\n\n private eventSource: EventSource | null = null;\n private subscriptions: Subscriptions = {};\n private lastSentSubscriptions: Array = [];\n private connectTimeoutId: any;\n private maxConnectTimeout: number = 15000;\n private reconnectTimeoutId: any;\n private reconnectAttempts: number = 0;\n private maxReconnectAttempts: number = Infinity;\n private predefinedReconnectIntervals: Array = [\n 200, 300, 500, 1000, 1200, 1500, 2000,\n ];\n private pendingConnects: Array = [];\n\n /**\n * Returns whether the realtime connection has been established.\n */\n get isConnected(): boolean {\n return !!this.eventSource && !!this.clientId && !this.pendingConnects.length;\n }\n\n /**\n * An optional hook that is invoked when the realtime client disconnects\n * either when unsubscribing from all subscriptions or when the\n * connection was interrupted or closed by the server.\n *\n * The received argument could be used to determine whether the disconnect\n * is a result from unsubscribing (`activeSubscriptions.length == 0`)\n * or because of network/server error (`activeSubscriptions.length > 0`).\n *\n * If you want to listen for the opposite, aka. when the client connection is established,\n * subscribe to the `PB_CONNECT` event.\n */\n onDisconnect?: (activeSubscriptions: Array) => void;\n\n /**\n * Register the subscription listener.\n *\n * You can subscribe multiple times to the same topic.\n *\n * If the SSE connection is not started yet,\n * this method will also initialize it.\n */\n async subscribe(\n topic: string,\n callback: (data: any) => void,\n options?: SendOptions,\n ): Promise {\n if (!topic) {\n throw new Error(\"topic must be set.\");\n }\n\n let key = topic;\n\n // serialize and append the topic options (if any)\n if (options) {\n options = Object.assign({}, options); // shallow copy\n normalizeUnknownQueryParams(options);\n const serialized =\n \"options=\" +\n encodeURIComponent(\n JSON.stringify({ query: options.query, headers: options.headers }),\n );\n key += (key.includes(\"?\") ? \"&\" : \"?\") + serialized;\n }\n\n const listener = function (e: Event) {\n const msgEvent = e as MessageEvent;\n\n let data;\n try {\n data = JSON.parse(msgEvent?.data);\n } catch {}\n\n callback(data || {});\n };\n\n // store the listener\n if (!this.subscriptions[key]) {\n this.subscriptions[key] = [];\n }\n this.subscriptions[key].push(listener);\n\n if (!this.isConnected) {\n // initialize sse connection\n await this.connect();\n } else if (this.subscriptions[key].length === 1) {\n // send the updated subscriptions (if it is the first for the key)\n await this.submitSubscriptions();\n } else {\n // only register the listener\n this.eventSource?.addEventListener(key, listener);\n }\n\n return async (): Promise => {\n return this.unsubscribeByTopicAndListener(topic, listener);\n };\n }\n\n /**\n * Unsubscribe from all subscription listeners with the specified topic.\n *\n * If `topic` is not provided, then this method will unsubscribe\n * from all active subscriptions.\n *\n * This method is no-op if there are no active subscriptions.\n *\n * The related sse connection will be autoclosed if after the\n * unsubscribe operation there are no active subscriptions left.\n */\n async unsubscribe(topic?: string): Promise {\n let needToSubmit = false;\n\n if (!topic) {\n // remove all subscriptions\n this.subscriptions = {};\n } else {\n // remove all listeners related to the topic\n const subs = this.getSubscriptionsByTopic(topic);\n for (let key in subs) {\n if (!this.hasSubscriptionListeners(key)) {\n continue; // already unsubscribed\n }\n\n for (let listener of this.subscriptions[key]) {\n this.eventSource?.removeEventListener(key, listener);\n }\n delete this.subscriptions[key];\n\n // mark for subscriptions change submit if there are no other listeners\n if (!needToSubmit) {\n needToSubmit = true;\n }\n }\n }\n\n if (!this.hasSubscriptionListeners()) {\n // no other active subscriptions -> close the sse connection\n this.disconnect();\n } else if (needToSubmit) {\n await this.submitSubscriptions();\n }\n }\n\n /**\n * Unsubscribe from all subscription listeners starting with the specified topic prefix.\n *\n * This method is no-op if there are no active subscriptions with the specified topic prefix.\n *\n * The related sse connection will be autoclosed if after the\n * unsubscribe operation there are no active subscriptions left.\n */\n async unsubscribeByPrefix(keyPrefix: string): Promise {\n let hasAtleastOneTopic = false;\n for (let key in this.subscriptions) {\n // \"?\" so that it can be used as end delimiter for the prefix\n if (!(key + \"?\").startsWith(keyPrefix)) {\n continue;\n }\n\n hasAtleastOneTopic = true;\n for (let listener of this.subscriptions[key]) {\n this.eventSource?.removeEventListener(key, listener);\n }\n delete this.subscriptions[key];\n }\n\n if (!hasAtleastOneTopic) {\n return; // nothing to unsubscribe from\n }\n\n if (this.hasSubscriptionListeners()) {\n // submit the deleted subscriptions\n await this.submitSubscriptions();\n } else {\n // no other active subscriptions -> close the sse connection\n this.disconnect();\n }\n }\n\n /**\n * Unsubscribe from all subscriptions matching the specified topic and listener function.\n *\n * This method is no-op if there are no active subscription with\n * the specified topic and listener.\n *\n * The related sse connection will be autoclosed if after the\n * unsubscribe operation there are no active subscriptions left.\n */\n async unsubscribeByTopicAndListener(\n topic: string,\n listener: EventListener,\n ): Promise {\n let needToSubmit = false;\n\n const subs = this.getSubscriptionsByTopic(topic);\n for (let key in subs) {\n if (\n !Array.isArray(this.subscriptions[key]) ||\n !this.subscriptions[key].length\n ) {\n continue; // already unsubscribed\n }\n\n let exist = false;\n for (let i = this.subscriptions[key].length - 1; i >= 0; i--) {\n if (this.subscriptions[key][i] !== listener) {\n continue;\n }\n\n exist = true; // has at least one matching listener\n delete this.subscriptions[key][i]; // removes the function reference\n this.subscriptions[key].splice(i, 1); // reindex the array\n this.eventSource?.removeEventListener(key, listener);\n }\n if (!exist) {\n continue;\n }\n\n // remove the key from the subscriptions list if there are no other listeners\n if (!this.subscriptions[key].length) {\n delete this.subscriptions[key];\n }\n\n // mark for subscriptions change submit if there are no other listeners\n if (!needToSubmit && !this.hasSubscriptionListeners(key)) {\n needToSubmit = true;\n }\n }\n\n if (!this.hasSubscriptionListeners()) {\n // no other active subscriptions -> close the sse connection\n this.disconnect();\n } else if (needToSubmit) {\n await this.submitSubscriptions();\n }\n }\n\n private hasSubscriptionListeners(keyToCheck?: string): boolean {\n this.subscriptions = this.subscriptions || {};\n\n // check the specified key\n if (keyToCheck) {\n return !!this.subscriptions[keyToCheck]?.length;\n }\n\n // check for at least one non-empty subscription\n for (let key in this.subscriptions) {\n if (!!this.subscriptions[key]?.length) {\n return true;\n }\n }\n\n return false;\n }\n\n private async submitSubscriptions(): Promise {\n if (!this.clientId) {\n return; // no client/subscriber\n }\n\n // optimistic update\n this.addAllSubscriptionListeners();\n\n this.lastSentSubscriptions = this.getNonEmptySubscriptionKeys();\n\n return this.client\n .send(\"/api/realtime\", {\n method: \"POST\",\n body: {\n clientId: this.clientId,\n subscriptions: this.lastSentSubscriptions,\n },\n requestKey: this.getSubscriptionsCancelKey(),\n })\n .catch((err) => {\n if (err?.isAbort) {\n return; // silently ignore aborted pending requests\n }\n throw err;\n });\n }\n\n private getSubscriptionsCancelKey(): string {\n return \"realtime_\" + this.clientId;\n }\n\n private getSubscriptionsByTopic(topic: string): Subscriptions {\n const result: Subscriptions = {};\n\n // \"?\" so that it can be used as end delimiter for the topic\n topic = topic.includes(\"?\") ? topic : topic + \"?\";\n\n for (let key in this.subscriptions) {\n if ((key + \"?\").startsWith(topic)) {\n result[key] = this.subscriptions[key];\n }\n }\n\n return result;\n }\n\n private getNonEmptySubscriptionKeys(): Array {\n const result: Array = [];\n\n for (let key in this.subscriptions) {\n if (this.subscriptions[key].length) {\n result.push(key);\n }\n }\n\n return result;\n }\n\n private addAllSubscriptionListeners(): void {\n if (!this.eventSource) {\n return;\n }\n\n this.removeAllSubscriptionListeners();\n\n for (let key in this.subscriptions) {\n for (let listener of this.subscriptions[key]) {\n this.eventSource.addEventListener(key, listener);\n }\n }\n }\n\n private removeAllSubscriptionListeners(): void {\n if (!this.eventSource) {\n return;\n }\n\n for (let key in this.subscriptions) {\n for (let listener of this.subscriptions[key]) {\n this.eventSource.removeEventListener(key, listener);\n }\n }\n }\n\n private async connect(): Promise {\n if (this.reconnectAttempts > 0) {\n // immediately resolve the promise to avoid indefinitely\n // blocking the client during reconnection\n return;\n }\n\n return new Promise((resolve, reject) => {\n this.pendingConnects.push({ resolve, reject });\n\n if (this.pendingConnects.length > 1) {\n // all promises will be resolved once the connection is established\n return;\n }\n\n this.initConnect();\n });\n }\n\n private initConnect() {\n this.disconnect(true);\n\n // wait up to 15s for connect\n clearTimeout(this.connectTimeoutId);\n this.connectTimeoutId = setTimeout(() => {\n this.connectErrorHandler(new Error(\"EventSource connect took too long.\"));\n }, this.maxConnectTimeout);\n\n this.eventSource = new EventSource(this.client.buildURL(\"/api/realtime\"));\n\n this.eventSource.onerror = (_) => {\n this.connectErrorHandler(\n new Error(\"Failed to establish realtime connection.\"),\n );\n };\n\n this.eventSource.addEventListener(\"PB_CONNECT\", (e) => {\n const msgEvent = e as MessageEvent;\n this.clientId = msgEvent?.lastEventId;\n\n this.submitSubscriptions()\n .then(async () => {\n let retries = 3;\n while (this.hasUnsentSubscriptions() && retries > 0) {\n retries--;\n // resubscribe to ensure that the latest topics are submitted\n //\n // This is needed because missed topics could happen on reconnect\n // if after the pending sent `submitSubscriptions()` call another `subscribe()`\n // was made before the submit was able to complete.\n await this.submitSubscriptions();\n }\n })\n .then(() => {\n for (let p of this.pendingConnects) {\n p.resolve();\n }\n\n // reset connect meta\n this.pendingConnects = [];\n this.reconnectAttempts = 0;\n clearTimeout(this.reconnectTimeoutId);\n clearTimeout(this.connectTimeoutId);\n\n // propagate the PB_CONNECT event\n const connectSubs = this.getSubscriptionsByTopic(\"PB_CONNECT\");\n for (let key in connectSubs) {\n for (let listener of connectSubs[key]) {\n listener(e);\n }\n }\n })\n .catch((err) => {\n this.clientId = \"\";\n this.connectErrorHandler(err);\n });\n });\n }\n\n private hasUnsentSubscriptions(): boolean {\n const latestTopics = this.getNonEmptySubscriptionKeys();\n if (latestTopics.length != this.lastSentSubscriptions.length) {\n return true;\n }\n\n for (const t of latestTopics) {\n if (!this.lastSentSubscriptions.includes(t)) {\n return true;\n }\n }\n\n return false;\n }\n\n private connectErrorHandler(err: any) {\n clearTimeout(this.connectTimeoutId);\n clearTimeout(this.reconnectTimeoutId);\n\n if (\n // wasn't previously connected -> direct reject\n (!this.clientId && !this.reconnectAttempts) ||\n // was previously connected but the max reconnection limit has been reached\n this.reconnectAttempts > this.maxReconnectAttempts\n ) {\n for (let p of this.pendingConnects) {\n p.reject(new ClientResponseError(err));\n }\n this.pendingConnects = [];\n this.disconnect();\n return;\n }\n\n // otherwise -> reconnect in the background\n this.disconnect(true);\n const timeout =\n this.predefinedReconnectIntervals[this.reconnectAttempts] ||\n this.predefinedReconnectIntervals[\n this.predefinedReconnectIntervals.length - 1\n ];\n this.reconnectAttempts++;\n this.reconnectTimeoutId = setTimeout(() => {\n this.initConnect();\n }, timeout);\n }\n\n private disconnect(fromReconnect = false): void {\n if (this.clientId && this.onDisconnect) {\n this.onDisconnect(Object.keys(this.subscriptions));\n }\n\n clearTimeout(this.connectTimeoutId);\n clearTimeout(this.reconnectTimeoutId);\n this.removeAllSubscriptionListeners();\n this.client.cancelRequest(this.getSubscriptionsCancelKey());\n this.eventSource?.close();\n this.eventSource = null;\n this.clientId = \"\";\n\n if (!fromReconnect) {\n this.reconnectAttempts = 0;\n\n // resolve any remaining connect promises\n //\n // this is done to avoid unnecessary throwing errors in case\n // unsubscribe is called before the pending connect promises complete\n // (see https://github.com/pocketbase/pocketbase/discussions/2897#discussioncomment-6423818)\n for (let p of this.pendingConnects) {\n p.resolve();\n }\n this.pendingConnects = [];\n }\n }\n}\n","import { BaseService } from \"@/services/BaseService\";\nimport { ClientResponseError } from \"@/ClientResponseError\";\nimport { ListResult } from \"@/tools/dtos\";\nimport { CommonOptions, ListOptions, FullListOptions } from \"@/tools/options\";\n\nexport abstract class CrudService extends BaseService {\n /**\n * Base path for the crud actions (without trailing slash, eg. '/admins').\n */\n abstract get baseCrudPath(): string;\n\n /**\n * Response data decoder.\n */\n decode(data: { [key: string]: any }): T {\n return data as T;\n }\n\n /**\n * Returns a promise with all list items batch fetched at once\n * (by default 500 items per request; to change it set the `batch` query param).\n *\n * You can use the generic T to supply a wrapper type of the crud model.\n *\n * @throws {ClientResponseError}\n */\n async getFullList(options?: FullListOptions): Promise>;\n\n /**\n * Legacy version of getFullList with explicitly specified batch size.\n */\n async getFullList(batch?: number, options?: ListOptions): Promise>;\n\n async getFullList(\n batchOrqueryParams?: number | FullListOptions,\n options?: ListOptions,\n ): Promise> {\n if (typeof batchOrqueryParams == \"number\") {\n return this._getFullList(batchOrqueryParams, options);\n }\n\n options = Object.assign({}, batchOrqueryParams, options);\n\n let batch = 500;\n if (options.batch) {\n batch = options.batch;\n delete options.batch;\n }\n\n return this._getFullList(batch, options);\n }\n\n /**\n * Returns paginated items list.\n *\n * You can use the generic T to supply a wrapper type of the crud model.\n *\n * @throws {ClientResponseError}\n */\n async getList(\n page = 1,\n perPage = 30,\n options?: ListOptions,\n ): Promise> {\n options = Object.assign(\n {\n method: \"GET\",\n },\n options,\n );\n\n options.query = Object.assign(\n {\n page: page,\n perPage: perPage,\n },\n options.query,\n );\n\n return this.client.send(this.baseCrudPath, options).then((responseData: any) => {\n responseData.items =\n responseData.items?.map((item: any) => {\n return this.decode(item);\n }) || [];\n\n return responseData;\n });\n }\n\n /**\n * Returns the first found item by the specified filter.\n *\n * Internally it calls `getList(1, 1, { filter, skipTotal })` and\n * returns the first found item.\n *\n * You can use the generic T to supply a wrapper type of the crud model.\n *\n * For consistency with `getOne`, this method will throw a 404\n * ClientResponseError if no item was found.\n *\n * @throws {ClientResponseError}\n */\n async getFirstListItem(filter: string, options?: CommonOptions): Promise {\n options = Object.assign(\n {\n requestKey: \"one_by_filter_\" + this.baseCrudPath + \"_\" + filter,\n },\n options,\n );\n\n options.query = Object.assign(\n {\n filter: filter,\n skipTotal: 1,\n },\n options.query,\n );\n\n return this.getList(1, 1, options).then((result) => {\n if (!result?.items?.length) {\n throw new ClientResponseError({\n status: 404,\n response: {\n code: 404,\n message: \"The requested resource wasn't found.\",\n data: {},\n },\n });\n }\n\n return result.items[0];\n });\n }\n\n /**\n * Returns single item by its id.\n *\n * You can use the generic T to supply a wrapper type of the crud model.\n *\n * If `id` is empty it will throw a 404 error.\n *\n * @throws {ClientResponseError}\n */\n async getOne(id: string, options?: CommonOptions): Promise {\n if (!id) {\n throw new ClientResponseError({\n url: this.client.buildURL(this.baseCrudPath + \"/\"),\n status: 404,\n response: {\n code: 404,\n message: \"Missing required record id.\",\n data: {},\n },\n });\n }\n\n options = Object.assign(\n {\n method: \"GET\",\n },\n options,\n );\n\n return this.client\n .send(this.baseCrudPath + \"/\" + encodeURIComponent(id), options)\n .then((responseData: any) => this.decode(responseData));\n }\n\n /**\n * Creates a new item.\n *\n * You can use the generic T to supply a wrapper type of the crud model.\n *\n * @throws {ClientResponseError}\n */\n async create(\n bodyParams?: { [key: string]: any } | FormData,\n options?: CommonOptions,\n ): Promise {\n options = Object.assign(\n {\n method: \"POST\",\n body: bodyParams,\n },\n options,\n );\n\n return this.client\n .send(this.baseCrudPath, options)\n .then((responseData: any) => this.decode(responseData));\n }\n\n /**\n * Updates an existing item by its id.\n *\n * You can use the generic T to supply a wrapper type of the crud model.\n *\n * @throws {ClientResponseError}\n */\n async update(\n id: string,\n bodyParams?: { [key: string]: any } | FormData,\n options?: CommonOptions,\n ): Promise {\n options = Object.assign(\n {\n method: \"PATCH\",\n body: bodyParams,\n },\n options,\n );\n\n return this.client\n .send(this.baseCrudPath + \"/\" + encodeURIComponent(id), options)\n .then((responseData: any) => this.decode(responseData));\n }\n\n /**\n * Deletes an existing item by its id.\n *\n * @throws {ClientResponseError}\n */\n async delete(id: string, options?: CommonOptions): Promise {\n options = Object.assign(\n {\n method: \"DELETE\",\n },\n options,\n );\n\n return this.client\n .send(this.baseCrudPath + \"/\" + encodeURIComponent(id), options)\n .then(() => true);\n }\n\n /**\n * Returns a promise with all list items batch fetched at once.\n */\n protected _getFullList(\n batchSize = 500,\n options?: ListOptions,\n ): Promise> {\n options = options || {};\n options.query = Object.assign(\n {\n skipTotal: 1,\n },\n options.query,\n );\n\n let result: Array = [];\n\n let request = async (page: number): Promise> => {\n return this.getList(page, batchSize || 500, options).then((list) => {\n const castedList = list as any as ListResult;\n const items = castedList.items;\n\n result = result.concat(items);\n\n if (items.length == list.perPage) {\n return request(page + 1);\n }\n\n return result;\n });\n };\n\n return request(1);\n }\n}\n","import { SendOptions } from \"@/tools/options\";\n\nexport function normalizeLegacyOptionsArgs(\n legacyWarn: string,\n baseOptions: SendOptions,\n bodyOrOptions?: any,\n query?: any,\n): SendOptions {\n const hasBodyOrOptions = typeof bodyOrOptions !== \"undefined\";\n const hasQuery = typeof query !== \"undefined\";\n\n if (!hasQuery && !hasBodyOrOptions) {\n return baseOptions;\n }\n\n if (hasQuery) {\n console.warn(legacyWarn);\n baseOptions.body = Object.assign({}, baseOptions.body, bodyOrOptions);\n baseOptions.query = Object.assign({}, baseOptions.query, query);\n\n return baseOptions;\n }\n\n return Object.assign(baseOptions, bodyOrOptions);\n}\n","import Client from \"@/Client\";\nimport { isTokenExpired } from \"@/tools/jwt\";\n\n// reset previous auto refresh registrations\nexport function resetAutoRefresh(client: Client) {\n (client as any)._resetAutoRefresh?.();\n}\n\nexport function registerAutoRefresh(\n client: Client,\n threshold: number,\n refreshFunc: () => Promise,\n reauthenticateFunc: () => Promise,\n) {\n resetAutoRefresh(client);\n\n const oldBeforeSend = client.beforeSend;\n const oldModel = client.authStore.record;\n\n // unset the auto refresh in case the auth store was cleared\n // OR a new model was authenticated\n const unsubStoreChange = client.authStore.onChange((newToken, model) => {\n if (\n !newToken ||\n model?.id != oldModel?.id ||\n ((model?.collectionId || oldModel?.collectionId) &&\n model?.collectionId != oldModel?.collectionId)\n ) {\n resetAutoRefresh(client);\n }\n });\n\n // initialize a reset function and attach it dynamically to the client\n (client as any)._resetAutoRefresh = function () {\n unsubStoreChange();\n client.beforeSend = oldBeforeSend;\n delete (client as any)._resetAutoRefresh;\n };\n\n client.beforeSend = async (url, sendOptions) => {\n const oldToken = client.authStore.token;\n\n if (sendOptions.query?.autoRefresh) {\n return oldBeforeSend ? oldBeforeSend(url, sendOptions) : { url, sendOptions };\n }\n\n let isValid = client.authStore.isValid;\n if (\n // is loosely valid\n isValid &&\n // but it is going to expire in the next \"threshold\" seconds\n isTokenExpired(client.authStore.token, threshold)\n ) {\n try {\n await refreshFunc();\n } catch (_) {\n isValid = false;\n }\n }\n\n // still invalid -> reauthenticate\n if (!isValid) {\n await reauthenticateFunc();\n }\n\n // the request wasn't sent with a custom token\n const headers = sendOptions.headers || {};\n for (let key in headers) {\n if (\n key.toLowerCase() == \"authorization\" &&\n // the request wasn't sent with a custom token\n oldToken == headers[key] &&\n client.authStore.token\n ) {\n // set the latest store token\n headers[key] = client.authStore.token;\n break;\n }\n }\n sendOptions.headers = headers;\n\n return oldBeforeSend ? oldBeforeSend(url, sendOptions) : { url, sendOptions };\n };\n}\n","import Client from \"@/Client\";\nimport { ClientResponseError } from \"@/ClientResponseError\";\nimport { RealtimeService, UnsubscribeFunc } from \"@/services/RealtimeService\";\nimport { BaseAuthStore } from \"@/stores/BaseAuthStore\";\nimport { CrudService } from \"@/services/CrudService\";\nimport { ListResult, RecordModel } from \"@/tools/dtos\";\nimport { normalizeLegacyOptionsArgs } from \"@/tools/legacy\";\nimport {\n CommonOptions,\n RecordFullListOptions,\n RecordListOptions,\n RecordOptions,\n SendOptions,\n RecordSubscribeOptions,\n} from \"@/tools/options\";\nimport { getTokenPayload } from \"@/tools/jwt\";\nimport { registerAutoRefresh, resetAutoRefresh } from \"@/tools/refresh\";\n\nexport interface RecordAuthResponse {\n /**\n * The signed PocketBase auth record.\n */\n record: T;\n\n /**\n * The PocketBase record auth token.\n *\n * If you are looking for the OAuth2 access and refresh tokens\n * they are available under the `meta.accessToken` and `meta.refreshToken` props.\n */\n token: string;\n\n /**\n * Auth meta data usually filled when OAuth2 is used.\n */\n meta?: { [key: string]: any };\n}\n\nexport interface AuthProviderInfo {\n name: string;\n displayName: string;\n state: string;\n authURL: string;\n codeVerifier: string;\n codeChallenge: string;\n codeChallengeMethod: string;\n}\n\nexport interface AuthMethodsList {\n mfa: {\n enabled: boolean;\n duration: number;\n };\n otp: {\n enabled: boolean;\n duration: number;\n };\n password: {\n enabled: boolean;\n identityFields: Array;\n };\n oauth2: {\n enabled: boolean;\n providers: Array;\n };\n}\n\nexport interface RecordSubscription {\n action: string; // eg. create, update, delete\n record: T;\n}\n\nexport type OAuth2UrlCallback = (url: string) => void | Promise;\n\nexport interface OAuth2AuthConfig extends SendOptions {\n // the name of the OAuth2 provider (eg. \"google\")\n provider: string;\n\n // custom scopes to overwrite the default ones\n scopes?: Array;\n\n // optional record create data\n createData?: { [key: string]: any };\n\n // optional callback that is triggered after the OAuth2 sign-in/sign-up url generation\n urlCallback?: OAuth2UrlCallback;\n\n // optional query params to send with the PocketBase auth request (eg. fields, expand, etc.)\n query?: RecordOptions;\n}\n\nexport interface OTPResponse {\n otpId: string;\n}\n\nexport class RecordService extends CrudService {\n readonly collectionIdOrName: string;\n\n constructor(client: Client, collectionIdOrName: string) {\n super(client);\n\n this.collectionIdOrName = collectionIdOrName;\n }\n\n /**\n * @inheritdoc\n */\n get baseCrudPath(): string {\n return this.baseCollectionPath + \"/records\";\n }\n\n /**\n * Returns the current collection service base path.\n */\n get baseCollectionPath(): string {\n return \"/api/collections/\" + encodeURIComponent(this.collectionIdOrName);\n }\n\n /**\n * Returns whether the current service collection is superusers.\n */\n get isSuperusers(): boolean {\n return (\n this.collectionIdOrName == \"_superusers\" ||\n this.collectionIdOrName == \"_pbc_2773867675\"\n );\n }\n\n // ---------------------------------------------------------------\n // Realtime handlers\n // ---------------------------------------------------------------\n\n /**\n * Subscribe to realtime changes to the specified topic (\"*\" or record id).\n *\n * If `topic` is the wildcard \"*\", then this method will subscribe to\n * any record changes in the collection.\n *\n * If `topic` is a record id, then this method will subscribe only\n * to changes of the specified record id.\n *\n * It's OK to subscribe multiple times to the same topic.\n * You can use the returned `UnsubscribeFunc` to remove only a single subscription.\n * Or use `unsubscribe(topic)` if you want to remove all subscriptions attached to the topic.\n */\n async subscribe(\n topic: string,\n callback: (data: RecordSubscription) => void,\n options?: RecordSubscribeOptions,\n ): Promise {\n if (!topic) {\n throw new Error(\"Missing topic.\");\n }\n\n if (!callback) {\n throw new Error(\"Missing subscription callback.\");\n }\n\n return this.client.realtime.subscribe(\n this.collectionIdOrName + \"/\" + topic,\n callback,\n options,\n );\n }\n\n /**\n * Unsubscribe from all subscriptions of the specified topic\n * (\"*\" or record id).\n *\n * If `topic` is not set, then this method will unsubscribe from\n * all subscriptions associated to the current collection.\n */\n async unsubscribe(topic?: string): Promise {\n // unsubscribe from the specified topic\n if (topic) {\n return this.client.realtime.unsubscribe(\n this.collectionIdOrName + \"/\" + topic,\n );\n }\n\n // unsubscribe from everything related to the collection\n return this.client.realtime.unsubscribeByPrefix(this.collectionIdOrName);\n }\n\n // ---------------------------------------------------------------\n // Crud handers\n // ---------------------------------------------------------------\n /**\n * @inheritdoc\n */\n async getFullList(options?: RecordFullListOptions): Promise>;\n\n /**\n * @inheritdoc\n */\n async getFullList(\n batch?: number,\n options?: RecordListOptions,\n ): Promise>;\n\n /**\n * @inheritdoc\n */\n async getFullList(\n batchOrOptions?: number | RecordFullListOptions,\n options?: RecordListOptions,\n ): Promise> {\n if (typeof batchOrOptions == \"number\") {\n return super.getFullList(batchOrOptions, options);\n }\n\n const params = Object.assign({}, batchOrOptions, options);\n\n return super.getFullList(params);\n }\n\n /**\n * @inheritdoc\n */\n async getList(\n page = 1,\n perPage = 30,\n options?: RecordListOptions,\n ): Promise> {\n return super.getList(page, perPage, options);\n }\n\n /**\n * @inheritdoc\n */\n async getFirstListItem(\n filter: string,\n options?: RecordListOptions,\n ): Promise {\n return super.getFirstListItem(filter, options);\n }\n\n /**\n * @inheritdoc\n */\n async getOne(id: string, options?: RecordOptions): Promise {\n return super.getOne(id, options);\n }\n\n /**\n * @inheritdoc\n */\n async create(\n bodyParams?: { [key: string]: any } | FormData,\n options?: RecordOptions,\n ): Promise {\n return super.create(bodyParams, options);\n }\n\n /**\n * @inheritdoc\n *\n * If the current `client.authStore.record` matches with the updated id, then\n * on success the `client.authStore.record` will be updated with the new response record fields.\n */\n async update(\n id: string,\n bodyParams?: { [key: string]: any } | FormData,\n options?: RecordOptions,\n ): Promise {\n return super.update(id, bodyParams, options).then((item) => {\n if (\n // is record auth\n this.client.authStore.record?.id === item?.id &&\n (this.client.authStore.record?.collectionId === this.collectionIdOrName ||\n this.client.authStore.record?.collectionName ===\n this.collectionIdOrName)\n ) {\n let authExpand = Object.assign({}, this.client.authStore.record.expand);\n let authRecord = Object.assign({}, this.client.authStore.record, item);\n if (authExpand) {\n // for now \"merge\" only top-level expand\n authRecord.expand = Object.assign(authExpand, item.expand);\n }\n\n this.client.authStore.save(this.client.authStore.token, authRecord);\n }\n\n return item as any as T;\n });\n }\n\n /**\n * @inheritdoc\n *\n * If the current `client.authStore.record` matches with the deleted id,\n * then on success the `client.authStore` will be cleared.\n */\n async delete(id: string, options?: CommonOptions): Promise {\n return super.delete(id, options).then((success) => {\n if (\n success &&\n // is record auth\n this.client.authStore.record?.id === id &&\n (this.client.authStore.record?.collectionId === this.collectionIdOrName ||\n this.client.authStore.record?.collectionName ===\n this.collectionIdOrName)\n ) {\n this.client.authStore.clear();\n }\n\n return success;\n });\n }\n\n // ---------------------------------------------------------------\n // Auth handlers\n // ---------------------------------------------------------------\n\n /**\n * Prepare successful collection authorization response.\n */\n protected authResponse(responseData: any): RecordAuthResponse {\n const record = this.decode(responseData?.record || {});\n\n this.client.authStore.save(responseData?.token, record as any);\n\n return Object.assign({}, responseData, {\n // normalize common fields\n token: responseData?.token || \"\",\n record: record as any as T,\n });\n }\n\n /**\n * Returns all available collection auth methods.\n *\n * @throws {ClientResponseError}\n */\n async listAuthMethods(options?: CommonOptions): Promise {\n options = Object.assign(\n {\n method: \"GET\",\n // @todo remove after deleting the pre v0.23 API response fields\n fields: \"mfa,otp,password,oauth2\",\n },\n options,\n );\n\n return this.client.send(this.baseCollectionPath + \"/auth-methods\", options);\n }\n\n /**\n * Authenticate a single auth collection record via its username/email and password.\n *\n * On success, this method also automatically updates\n * the client's AuthStore data and returns:\n * - the authentication token\n * - the authenticated record model\n *\n * @throws {ClientResponseError}\n */\n async authWithPassword(\n usernameOrEmail: string,\n password: string,\n options?: RecordOptions,\n ): Promise> {\n options = Object.assign(\n {\n method: \"POST\",\n body: {\n identity: usernameOrEmail,\n password: password,\n },\n },\n options,\n );\n\n // note: consider to deprecate\n let autoRefreshThreshold;\n if (this.isSuperusers) {\n autoRefreshThreshold = options.autoRefreshThreshold;\n delete options.autoRefreshThreshold;\n if (!options.autoRefresh) {\n resetAutoRefresh(this.client);\n }\n }\n\n let authData = await this.client.send(\n this.baseCollectionPath + \"/auth-with-password\",\n options,\n );\n\n authData = this.authResponse(authData);\n\n if (autoRefreshThreshold && this.isSuperusers) {\n registerAutoRefresh(\n this.client,\n autoRefreshThreshold,\n () => this.authRefresh({ autoRefresh: true }),\n () =>\n this.authWithPassword(\n usernameOrEmail,\n password,\n Object.assign({ autoRefresh: true }, options),\n ),\n );\n }\n\n return authData;\n }\n\n /**\n * Authenticate a single auth collection record with OAuth2 code.\n *\n * If you don't have an OAuth2 code you may also want to check `authWithOAuth2` method.\n *\n * On success, this method also automatically updates\n * the client's AuthStore data and returns:\n * - the authentication token\n * - the authenticated record model\n * - the OAuth2 account data (eg. name, email, avatar, etc.)\n *\n * @throws {ClientResponseError}\n */\n async authWithOAuth2Code(\n provider: string,\n code: string,\n codeVerifier: string,\n redirectURL: string,\n createData?: { [key: string]: any },\n options?: RecordOptions,\n ): Promise>;\n\n /**\n * @deprecated\n * Consider using authWithOAuth2Code(provider, code, codeVerifier, redirectURL, createdData, options?).\n */\n async authWithOAuth2Code(\n provider: string,\n code: string,\n codeVerifier: string,\n redirectURL: string,\n createData?: { [key: string]: any },\n body?: any,\n query?: any,\n ): Promise>;\n\n async authWithOAuth2Code(\n provider: string,\n code: string,\n codeVerifier: string,\n redirectURL: string,\n createData?: { [key: string]: any },\n bodyOrOptions?: any,\n query?: any,\n ): Promise> {\n let options: any = {\n method: \"POST\",\n body: {\n provider: provider,\n code: code,\n codeVerifier: codeVerifier,\n redirectURL: redirectURL,\n createData: createData,\n },\n };\n\n options = normalizeLegacyOptionsArgs(\n \"This form of authWithOAuth2Code(provider, code, codeVerifier, redirectURL, createData?, body?, query?) is deprecated. Consider replacing it with authWithOAuth2Code(provider, code, codeVerifier, redirectURL, createData?, options?).\",\n options,\n bodyOrOptions,\n query,\n );\n\n return this.client\n .send(this.baseCollectionPath + \"/auth-with-oauth2\", options)\n .then((data) => this.authResponse(data));\n }\n\n /**\n * @deprecated This form of authWithOAuth2 is deprecated.\n *\n * Please use `authWithOAuth2Code()` OR its simplified realtime version\n * as shown in https://pocketbase.io/docs/authentication/#oauth2-integration.\n */\n async authWithOAuth2(\n provider: string,\n code: string,\n codeVerifier: string,\n redirectURL: string,\n createData?: { [key: string]: any },\n bodyParams?: { [key: string]: any },\n queryParams?: RecordOptions,\n ): Promise>;\n\n /**\n * Authenticate a single auth collection record with OAuth2\n * **without custom redirects, deeplinks or even page reload**.\n *\n * This method initializes a one-off realtime subscription and will\n * open a popup window with the OAuth2 vendor page to authenticate.\n * Once the external OAuth2 sign-in/sign-up flow is completed, the popup\n * window will be automatically closed and the OAuth2 data sent back\n * to the user through the previously established realtime connection.\n *\n * You can specify an optional `urlCallback` prop to customize\n * the default url `window.open` behavior.\n *\n * On success, this method also automatically updates\n * the client's AuthStore data and returns:\n * - the authentication token\n * - the authenticated record model\n * - the OAuth2 account data (eg. name, email, avatar, etc.)\n *\n * Example:\n *\n * ```js\n * const authData = await pb.collection(\"users\").authWithOAuth2({\n * provider: \"google\",\n * })\n * ```\n *\n * Note1: When creating the OAuth2 app in the provider dashboard\n * you have to configure `https://yourdomain.com/api/oauth2-redirect`\n * as redirect URL.\n *\n * Note2: Safari may block the default `urlCallback` popup because\n * it doesn't allow `window.open` calls as part of an `async` click functions.\n * To workaround this you can either change your click handler to not be marked as `async`\n * OR manually call `window.open` before your `async` function and use the\n * window reference in your own custom `urlCallback` (see https://github.com/pocketbase/pocketbase/discussions/2429#discussioncomment-5943061).\n * For example:\n * ```js\n * \n * ...\n * document.getElementById(\"btn\").addEventListener(\"click\", () => {\n * pb.collection(\"users\").authWithOAuth2({\n * provider: \"gitlab\",\n * }).then((authData) => {\n * console.log(authData)\n * }).catch((err) => {\n * console.log(err, err.originalError);\n * });\n * })\n * ```\n *\n * @throws {ClientResponseError}\n */\n async authWithOAuth2(\n options: OAuth2AuthConfig,\n ): Promise>;\n\n authWithOAuth2(...args: any): Promise> {\n // fallback to legacy format\n if (args.length > 1 || typeof args?.[0] === \"string\") {\n console.warn(\n \"PocketBase: This form of authWithOAuth2() is deprecated and may get removed in the future. Please replace with authWithOAuth2Code() OR use the authWithOAuth2() realtime form as shown in https://pocketbase.io/docs/authentication/#oauth2-integration.\",\n );\n return this.authWithOAuth2Code(\n args?.[0] || \"\",\n args?.[1] || \"\",\n args?.[2] || \"\",\n args?.[3] || \"\",\n args?.[4] || {},\n args?.[5] || {},\n args?.[6] || {},\n );\n }\n\n const config = args?.[0] || {};\n\n // open a new popup window in case config.urlCallback is not set\n //\n // note: it is opened before any async calls due to Safari restrictions\n // (see https://github.com/pocketbase/pocketbase/discussions/2429#discussioncomment-5943061)\n let eagerDefaultPopup: Window | null = null;\n if (!config.urlCallback) {\n eagerDefaultPopup = openBrowserPopup(undefined);\n }\n\n // initialize a one-off realtime service\n const realtime = new RealtimeService(this.client);\n\n function cleanup() {\n eagerDefaultPopup?.close();\n realtime.unsubscribe();\n }\n\n const requestKeyOptions: SendOptions = {};\n const requestKey = config.requestKey;\n if (requestKey) {\n requestKeyOptions.requestKey = requestKey;\n }\n\n return this.listAuthMethods(requestKeyOptions)\n .then((authMethods) => {\n const provider = authMethods.oauth2.providers.find(\n (p) => p.name === config.provider,\n );\n if (!provider) {\n throw new ClientResponseError(\n new Error(`Missing or invalid provider \"${config.provider}\".`),\n );\n }\n\n const redirectURL = this.client.buildURL(\"/api/oauth2-redirect\");\n\n // find the AbortController associated with the current request key (if any)\n const cancelController = requestKey\n ? this.client[\"cancelControllers\"]?.[requestKey]\n : undefined;\n if (cancelController) {\n cancelController.signal.onabort = () => {\n cleanup();\n };\n }\n\n return new Promise(async (resolve, reject) => {\n try {\n await realtime.subscribe(\"@oauth2\", async (e) => {\n const oldState = realtime.clientId;\n\n try {\n if (!e.state || oldState !== e.state) {\n throw new Error(\"State parameters don't match.\");\n }\n\n if (e.error || !e.code) {\n throw new Error(\n \"OAuth2 redirect error or missing code: \" +\n e.error,\n );\n }\n\n // clear the non SendOptions props\n const options = Object.assign({}, config);\n delete options.provider;\n delete options.scopes;\n delete options.createData;\n delete options.urlCallback;\n\n // reset the cancelController listener as it will be triggered by the next api call\n if (cancelController?.signal?.onabort) {\n cancelController.signal.onabort = null;\n }\n\n const authData = await this.authWithOAuth2Code(\n provider.name,\n e.code,\n provider.codeVerifier,\n redirectURL,\n config.createData,\n options,\n );\n\n resolve(authData);\n } catch (err) {\n reject(new ClientResponseError(err));\n }\n\n cleanup();\n });\n\n const replacements: { [key: string]: any } = {\n state: realtime.clientId,\n };\n if (config.scopes?.length) {\n replacements[\"scope\"] = config.scopes.join(\" \");\n }\n\n const url = this._replaceQueryParams(\n provider.authURL + redirectURL,\n replacements,\n );\n\n let urlCallback =\n config.urlCallback ||\n function (url: string) {\n if (eagerDefaultPopup) {\n eagerDefaultPopup.location.href = url;\n } else {\n // it could have been blocked due to its empty initial url,\n // try again...\n eagerDefaultPopup = openBrowserPopup(url);\n }\n };\n\n await urlCallback(url);\n } catch (err) {\n cleanup();\n reject(new ClientResponseError(err));\n }\n });\n })\n .catch((err) => {\n cleanup();\n throw err; // rethrow\n }) as Promise>;\n }\n\n /**\n * Refreshes the current authenticated record instance and\n * returns a new token and record data.\n *\n * On success this method also automatically updates the client's AuthStore.\n *\n * @throws {ClientResponseError}\n */\n async authRefresh(options?: RecordOptions): Promise>;\n\n /**\n * @deprecated\n * Consider using authRefresh(options?).\n */\n async authRefresh(body?: any, query?: any): Promise>;\n\n async authRefresh(\n bodyOrOptions?: any,\n query?: any,\n ): Promise> {\n let options: any = {\n method: \"POST\",\n };\n\n options = normalizeLegacyOptionsArgs(\n \"This form of authRefresh(body?, query?) is deprecated. Consider replacing it with authRefresh(options?).\",\n options,\n bodyOrOptions,\n query,\n );\n\n return this.client\n .send(this.baseCollectionPath + \"/auth-refresh\", options)\n .then((data) => this.authResponse(data));\n }\n\n /**\n * Sends auth record password reset request.\n *\n * @throws {ClientResponseError}\n */\n async requestPasswordReset(email: string, options?: CommonOptions): Promise;\n\n /**\n * @deprecated\n * Consider using requestPasswordReset(email, options?).\n */\n async requestPasswordReset(email: string, body?: any, query?: any): Promise;\n\n async requestPasswordReset(\n email: string,\n bodyOrOptions?: any,\n query?: any,\n ): Promise {\n let options: any = {\n method: \"POST\",\n body: {\n email: email,\n },\n };\n\n options = normalizeLegacyOptionsArgs(\n \"This form of requestPasswordReset(email, body?, query?) is deprecated. Consider replacing it with requestPasswordReset(email, options?).\",\n options,\n bodyOrOptions,\n query,\n );\n\n return this.client\n .send(this.baseCollectionPath + \"/request-password-reset\", options)\n .then(() => true);\n }\n\n /**\n * Confirms auth record password reset request.\n *\n * @throws {ClientResponseError}\n */\n async confirmPasswordReset(\n passwordResetToken: string,\n password: string,\n passwordConfirm: string,\n options?: CommonOptions,\n ): Promise;\n\n /**\n * @deprecated\n * Consider using confirmPasswordReset(passwordResetToken, password, passwordConfirm, options?).\n */\n async confirmPasswordReset(\n passwordResetToken: string,\n password: string,\n passwordConfirm: string,\n body?: any,\n query?: any,\n ): Promise;\n\n async confirmPasswordReset(\n passwordResetToken: string,\n password: string,\n passwordConfirm: string,\n bodyOrOptions?: any,\n query?: any,\n ): Promise {\n let options: any = {\n method: \"POST\",\n body: {\n token: passwordResetToken,\n password: password,\n passwordConfirm: passwordConfirm,\n },\n };\n\n options = normalizeLegacyOptionsArgs(\n \"This form of confirmPasswordReset(token, password, passwordConfirm, body?, query?) is deprecated. Consider replacing it with confirmPasswordReset(token, password, passwordConfirm, options?).\",\n options,\n bodyOrOptions,\n query,\n );\n\n return this.client\n .send(this.baseCollectionPath + \"/confirm-password-reset\", options)\n .then(() => true);\n }\n\n /**\n * Sends auth record verification email request.\n *\n * @throws {ClientResponseError}\n */\n async requestVerification(email: string, options?: CommonOptions): Promise;\n\n /**\n * @deprecated\n * Consider using requestVerification(email, options?).\n */\n async requestVerification(email: string, body?: any, query?: any): Promise;\n\n async requestVerification(\n email: string,\n bodyOrOptions?: any,\n query?: any,\n ): Promise {\n let options: any = {\n method: \"POST\",\n body: {\n email: email,\n },\n };\n\n options = normalizeLegacyOptionsArgs(\n \"This form of requestVerification(email, body?, query?) is deprecated. Consider replacing it with requestVerification(email, options?).\",\n options,\n bodyOrOptions,\n query,\n );\n\n return this.client\n .send(this.baseCollectionPath + \"/request-verification\", options)\n .then(() => true);\n }\n\n /**\n * Confirms auth record email verification request.\n *\n * If the current `client.authStore.record` matches with the auth record from the token,\n * then on success the `client.authStore.record.verified` will be updated to `true`.\n *\n * @throws {ClientResponseError}\n */\n async confirmVerification(\n verificationToken: string,\n options?: CommonOptions,\n ): Promise;\n\n /**\n * @deprecated\n * Consider using confirmVerification(verificationToken, options?).\n */\n async confirmVerification(\n verificationToken: string,\n body?: any,\n query?: any,\n ): Promise;\n\n async confirmVerification(\n verificationToken: string,\n bodyOrOptions?: any,\n query?: any,\n ): Promise {\n let options: any = {\n method: \"POST\",\n body: {\n token: verificationToken,\n },\n };\n\n options = normalizeLegacyOptionsArgs(\n \"This form of confirmVerification(token, body?, query?) is deprecated. Consider replacing it with confirmVerification(token, options?).\",\n options,\n bodyOrOptions,\n query,\n );\n\n return this.client\n .send(this.baseCollectionPath + \"/confirm-verification\", options)\n .then(() => {\n // on success manually update the current auth record verified state\n const payload = getTokenPayload(verificationToken);\n const model = this.client.authStore.record;\n if (\n model &&\n !model.verified &&\n model.id === payload.id &&\n model.collectionId === payload.collectionId\n ) {\n model.verified = true;\n this.client.authStore.save(this.client.authStore.token, model);\n }\n\n return true;\n });\n }\n\n /**\n * Sends an email change request to the authenticated record model.\n *\n * @throws {ClientResponseError}\n */\n async requestEmailChange(newEmail: string, options?: CommonOptions): Promise;\n\n /**\n * @deprecated\n * Consider using requestEmailChange(newEmail, options?).\n */\n async requestEmailChange(newEmail: string, body?: any, query?: any): Promise;\n\n async requestEmailChange(\n newEmail: string,\n bodyOrOptions?: any,\n query?: any,\n ): Promise {\n let options: any = {\n method: \"POST\",\n body: {\n newEmail: newEmail,\n },\n };\n\n options = normalizeLegacyOptionsArgs(\n \"This form of requestEmailChange(newEmail, body?, query?) is deprecated. Consider replacing it with requestEmailChange(newEmail, options?).\",\n options,\n bodyOrOptions,\n query,\n );\n\n return this.client\n .send(this.baseCollectionPath + \"/request-email-change\", options)\n .then(() => true);\n }\n\n /**\n * Confirms auth record's new email address.\n *\n * If the current `client.authStore.record` matches with the auth record from the token,\n * then on success the `client.authStore` will be cleared.\n *\n * @throws {ClientResponseError}\n */\n async confirmEmailChange(\n emailChangeToken: string,\n password: string,\n options?: CommonOptions,\n ): Promise;\n\n /**\n * @deprecated\n * Consider using confirmEmailChange(emailChangeToken, password, options?).\n */\n async confirmEmailChange(\n emailChangeToken: string,\n password: string,\n body?: any,\n query?: any,\n ): Promise;\n\n async confirmEmailChange(\n emailChangeToken: string,\n password: string,\n bodyOrOptions?: any,\n query?: any,\n ): Promise {\n let options: any = {\n method: \"POST\",\n body: {\n token: emailChangeToken,\n password: password,\n },\n };\n\n options = normalizeLegacyOptionsArgs(\n \"This form of confirmEmailChange(token, password, body?, query?) is deprecated. Consider replacing it with confirmEmailChange(token, password, options?).\",\n options,\n bodyOrOptions,\n query,\n );\n\n return this.client\n .send(this.baseCollectionPath + \"/confirm-email-change\", options)\n .then(() => {\n const payload = getTokenPayload(emailChangeToken);\n const model = this.client.authStore.record;\n if (\n model &&\n model.id === payload.id &&\n model.collectionId === payload.collectionId\n ) {\n this.client.authStore.clear();\n }\n\n return true;\n });\n }\n\n /**\n * @deprecated use collection(\"_externalAuths\").*\n *\n * Lists all linked external auth providers for the specified auth record.\n *\n * @throws {ClientResponseError}\n */\n async listExternalAuths(\n recordId: string,\n options?: CommonOptions,\n ): Promise> {\n return this.client.collection(\"_externalAuths\").getFullList(\n Object.assign({}, options, {\n filter: this.client.filter(\"recordRef = {:id}\", { id: recordId }),\n }),\n );\n }\n\n /**\n * @deprecated use collection(\"_externalAuths\").*\n *\n * Unlink a single external auth provider from the specified auth record.\n *\n * @throws {ClientResponseError}\n */\n async unlinkExternalAuth(\n recordId: string,\n provider: string,\n options?: CommonOptions,\n ): Promise {\n const ea = await this.client.collection(\"_externalAuths\").getFirstListItem(\n this.client.filter(\"recordRef = {:recordId} && provider = {:provider}\", {\n recordId,\n provider,\n }),\n );\n\n return this.client\n .collection(\"_externalAuths\")\n .delete(ea.id, options)\n .then(() => true);\n }\n\n /**\n * Sends auth record OTP to the provided email.\n *\n * @throws {ClientResponseError}\n */\n async requestOTP(email: string, options?: CommonOptions): Promise {\n options = Object.assign(\n {\n method: \"POST\",\n body: { email: email },\n },\n options,\n );\n\n return this.client.send(this.baseCollectionPath + \"/request-otp\", options);\n }\n\n /**\n * Authenticate a single auth collection record via OTP.\n *\n * On success, this method also automatically updates\n * the client's AuthStore data and returns:\n * - the authentication token\n * - the authenticated record model\n *\n * @throws {ClientResponseError}\n */\n async authWithOTP(\n otpId: string,\n password: string,\n options?: CommonOptions,\n ): Promise> {\n options = Object.assign(\n {\n method: \"POST\",\n body: { otpId, password },\n },\n options,\n );\n\n return this.client\n .send(this.baseCollectionPath + \"/auth-with-otp\", options)\n .then((data) => this.authResponse(data));\n }\n\n /**\n * Impersonate authenticates with the specified recordId and\n * returns a new client with the received auth token in a memory store.\n *\n * If `duration` is 0 the generated auth token will fallback\n * to the default collection auth token duration.\n *\n * This action currently requires superusers privileges.\n *\n * @throws {ClientResponseError}\n */\n async impersonate(\n recordId: string,\n duration: number,\n options?: CommonOptions,\n ): Promise {\n options = Object.assign(\n {\n method: \"POST\",\n body: { duration: duration },\n },\n options,\n );\n options.headers = options.headers || {};\n if (!options.headers.Authorization) {\n options.headers.Authorization = this.client.authStore.token;\n }\n\n // create a new client loaded with the impersonated auth state\n // ---\n const client = new Client(\n this.client.baseURL,\n new BaseAuthStore(),\n this.client.lang,\n );\n\n const authData = await client.send(\n this.baseCollectionPath + \"/impersonate/\" + encodeURIComponent(recordId),\n options,\n );\n\n client.authStore.save(authData?.token, this.decode(authData?.record || {}));\n // ---\n\n return client;\n }\n\n // ---------------------------------------------------------------\n\n // very rudimentary url query params replacement because at the moment\n // URL (and URLSearchParams) doesn't seem to be fully supported in React Native\n //\n // note: for details behind some of the decode/encode parsing check https://unixpapa.com/js/querystring.html\n private _replaceQueryParams(\n url: string,\n replacements: { [key: string]: any } = {},\n ): string {\n let urlPath = url;\n let query = \"\";\n\n const queryIndex = url.indexOf(\"?\");\n if (queryIndex >= 0) {\n urlPath = url.substring(0, url.indexOf(\"?\"));\n query = url.substring(url.indexOf(\"?\") + 1);\n }\n\n const parsedParams: { [key: string]: string } = {};\n\n // parse the query parameters\n const rawParams = query.split(\"&\");\n for (const param of rawParams) {\n if (param == \"\") {\n continue;\n }\n\n const pair = param.split(\"=\");\n parsedParams[decodeURIComponent(pair[0].replace(/\\+/g, \" \"))] =\n decodeURIComponent((pair[1] || \"\").replace(/\\+/g, \" \"));\n }\n\n // apply the replacements\n for (let key in replacements) {\n if (!replacements.hasOwnProperty(key)) {\n continue;\n }\n\n if (replacements[key] == null) {\n delete parsedParams[key];\n } else {\n parsedParams[key] = replacements[key];\n }\n }\n\n // construct back the full query string\n query = \"\";\n for (let key in parsedParams) {\n if (!parsedParams.hasOwnProperty(key)) {\n continue;\n }\n\n if (query != \"\") {\n query += \"&\";\n }\n\n query +=\n encodeURIComponent(key.replace(/%20/g, \"+\")) +\n \"=\" +\n encodeURIComponent(parsedParams[key].replace(/%20/g, \"+\"));\n }\n\n return query != \"\" ? urlPath + \"?\" + query : urlPath;\n }\n}\n\nfunction openBrowserPopup(url?: string): Window | null {\n if (typeof window === \"undefined\" || !window?.open) {\n throw new ClientResponseError(\n new Error(\n `Not in a browser context - please pass a custom urlCallback function.`,\n ),\n );\n }\n\n let width = 1024;\n let height = 768;\n\n let windowWidth = window.innerWidth;\n let windowHeight = window.innerHeight;\n\n // normalize window size\n width = width > windowWidth ? windowWidth : width;\n height = height > windowHeight ? windowHeight : height;\n\n let left = windowWidth / 2 - width / 2;\n let top = windowHeight / 2 - height / 2;\n\n // note: we don't use the noopener and noreferrer attributes since\n // for some reason browser blocks such windows then url is undefined/blank\n return window.open(\n url,\n \"popup_window\",\n \"width=\" +\n width +\n \",height=\" +\n height +\n \",top=\" +\n top +\n \",left=\" +\n left +\n \",resizable,menubar=no\",\n );\n}\n","import { CrudService } from \"@/services/CrudService\";\nimport { CollectionModel } from \"@/tools/dtos\";\nimport { CommonOptions } from \"@/tools/options\";\n\nexport class CollectionService extends CrudService {\n /**\n * @inheritdoc\n */\n get baseCrudPath(): string {\n return \"/api/collections\";\n }\n\n /**\n * Imports the provided collections.\n *\n * If `deleteMissing` is `true`, all local collections and their fields,\n * that are not present in the imported configuration, WILL BE DELETED\n * (including their related records data)!\n *\n * @throws {ClientResponseError}\n */\n async import(\n collections: Array,\n deleteMissing: boolean = false,\n options?: CommonOptions,\n ): Promise {\n options = Object.assign(\n {\n method: \"PUT\",\n body: {\n collections: collections,\n deleteMissing: deleteMissing,\n },\n },\n options,\n );\n\n return this.client.send(this.baseCrudPath + \"/import\", options).then(() => true);\n }\n\n /**\n * Returns type indexed map with scaffolded collection models\n * populated with their default field values.\n *\n * @throws {ClientResponseError}\n */\n async getScaffolds(\n options?: CommonOptions,\n ): Promise<{ [key: string]: CollectionModel }> {\n options = Object.assign(\n {\n method: \"GET\",\n },\n options,\n );\n\n return this.client.send(this.baseCrudPath + \"/meta/scaffolds\", options);\n }\n\n /**\n * Deletes all records associated with the specified collection.\n *\n * @throws {ClientResponseError}\n */\n async truncate(collectionIdOrName: string, options?: CommonOptions): Promise {\n options = Object.assign(\n {\n method: \"DELETE\",\n },\n options,\n );\n\n return this.client\n .send(\n this.baseCrudPath +\n \"/\" +\n encodeURIComponent(collectionIdOrName) +\n \"/truncate\",\n options,\n )\n .then(() => true);\n }\n}\n","import { ClientResponseError } from \"@/ClientResponseError\";\nimport { BaseService } from \"@/services/BaseService\";\nimport { ListResult, LogModel } from \"@/tools/dtos\";\nimport { CommonOptions, ListOptions, LogStatsOptions } from \"@/tools/options\";\n\nexport interface HourlyStats {\n total: number;\n date: string;\n}\n\nexport class LogService extends BaseService {\n /**\n * Returns paginated logs list.\n *\n * @throws {ClientResponseError}\n */\n async getList(\n page = 1,\n perPage = 30,\n options?: ListOptions,\n ): Promise> {\n options = Object.assign({ method: \"GET\" }, options);\n\n options.query = Object.assign(\n {\n page: page,\n perPage: perPage,\n },\n options.query,\n );\n\n return this.client.send(\"/api/logs\", options);\n }\n\n /**\n * Returns a single log by its id.\n *\n * If `id` is empty it will throw a 404 error.\n *\n * @throws {ClientResponseError}\n */\n async getOne(id: string, options?: CommonOptions): Promise {\n if (!id) {\n throw new ClientResponseError({\n url: this.client.buildURL(\"/api/logs/\"),\n status: 404,\n response: {\n code: 404,\n message: \"Missing required log id.\",\n data: {},\n },\n });\n }\n\n options = Object.assign(\n {\n method: \"GET\",\n },\n options,\n );\n\n return this.client.send(\"/api/logs/\" + encodeURIComponent(id), options);\n }\n\n /**\n * Returns logs statistics.\n *\n * @throws {ClientResponseError}\n */\n async getStats(options?: LogStatsOptions): Promise> {\n options = Object.assign(\n {\n method: \"GET\",\n },\n options,\n );\n\n return this.client.send(\"/api/logs/stats\", options);\n }\n}\n","import { BaseService } from \"@/services/BaseService\";\nimport { CommonOptions } from \"@/tools/options\";\n\nexport interface HealthCheckResponse {\n code: number;\n message: string;\n data: { [key: string]: any };\n}\n\nexport class HealthService extends BaseService {\n /**\n * Checks the health status of the api.\n *\n * @throws {ClientResponseError}\n */\n async check(options?: CommonOptions): Promise {\n options = Object.assign(\n {\n method: \"GET\",\n },\n options,\n );\n\n return this.client.send(\"/api/health\", options);\n }\n}\n","import { BaseService } from \"@/services/BaseService\";\nimport { CommonOptions, FileOptions } from \"@/tools/options\";\n\nexport class FileService extends BaseService {\n /**\n * @deprecated Please replace with `pb.files.getURL()`.\n */\n getUrl(\n record: { [key: string]: any },\n filename: string,\n queryParams: FileOptions = {},\n ): string {\n console.warn(\"Please replace pb.files.getUrl() with pb.files.getURL()\");\n return this.getURL(record, filename, queryParams);\n }\n\n /**\n * Builds and returns an absolute record file url for the provided filename.\n */\n getURL(\n record: { [key: string]: any },\n filename: string,\n queryParams: FileOptions = {},\n ): string {\n if (\n !filename ||\n !record?.id ||\n !(record?.collectionId || record?.collectionName)\n ) {\n return \"\";\n }\n\n const parts = [];\n parts.push(\"api\");\n parts.push(\"files\");\n parts.push(encodeURIComponent(record.collectionId || record.collectionName));\n parts.push(encodeURIComponent(record.id));\n parts.push(encodeURIComponent(filename));\n\n let result = this.client.buildURL(parts.join(\"/\"));\n\n if (Object.keys(queryParams).length) {\n // normalize the download query param for consistency with the Dart sdk\n if (queryParams.download === false) {\n delete queryParams.download;\n }\n\n const params = new URLSearchParams(queryParams);\n\n result += (result.includes(\"?\") ? \"&\" : \"?\") + params;\n }\n\n return result;\n }\n\n /**\n * Requests a new private file access token for the current auth model.\n *\n * @throws {ClientResponseError}\n */\n async getToken(options?: CommonOptions): Promise {\n options = Object.assign(\n {\n method: \"POST\",\n },\n options,\n );\n\n return this.client\n .send(\"/api/files/token\", options)\n .then((data) => data?.token || \"\");\n }\n}\n","import { BaseService } from \"@/services/BaseService\";\nimport { CommonOptions } from \"@/tools/options\";\n\nexport interface BackupFileInfo {\n key: string;\n size: number;\n modified: string;\n}\n\nexport class BackupService extends BaseService {\n /**\n * Returns list with all available backup files.\n *\n * @throws {ClientResponseError}\n */\n async getFullList(options?: CommonOptions): Promise> {\n options = Object.assign(\n {\n method: \"GET\",\n },\n options,\n );\n\n return this.client.send(\"/api/backups\", options);\n }\n\n /**\n * Initializes a new backup.\n *\n * @throws {ClientResponseError}\n */\n async create(basename: string, options?: CommonOptions): Promise {\n options = Object.assign(\n {\n method: \"POST\",\n body: {\n name: basename,\n },\n },\n options,\n );\n\n return this.client.send(\"/api/backups\", options).then(() => true);\n }\n\n /**\n * Uploads an existing backup file.\n *\n * Example:\n *\n * ```js\n * await pb.backups.upload({\n * file: new Blob([...]),\n * });\n * ```\n *\n * @throws {ClientResponseError}\n */\n async upload(\n bodyParams: { [key: string]: any } | FormData,\n options?: CommonOptions,\n ): Promise {\n options = Object.assign(\n {\n method: \"POST\",\n body: bodyParams,\n },\n options,\n );\n\n return this.client.send(\"/api/backups/upload\", options).then(() => true);\n }\n\n /**\n * Deletes a single backup file.\n *\n * @throws {ClientResponseError}\n */\n async delete(key: string, options?: CommonOptions): Promise {\n options = Object.assign(\n {\n method: \"DELETE\",\n },\n options,\n );\n\n return this.client\n .send(`/api/backups/${encodeURIComponent(key)}`, options)\n .then(() => true);\n }\n\n /**\n * Initializes an app data restore from an existing backup.\n *\n * @throws {ClientResponseError}\n */\n async restore(key: string, options?: CommonOptions): Promise {\n options = Object.assign(\n {\n method: \"POST\",\n },\n options,\n );\n\n return this.client\n .send(`/api/backups/${encodeURIComponent(key)}/restore`, options)\n .then(() => true);\n }\n\n /**\n * @deprecated Please use `getDownloadURL()`.\n */\n getDownloadUrl(token: string, key: string): string {\n console.warn(\n \"Please replace pb.backups.getDownloadUrl() with pb.backups.getDownloadURL()\",\n );\n return this.getDownloadURL(token, key);\n }\n\n /**\n * Builds a download url for a single existing backup using a\n * superuser file token and the backup file key.\n *\n * The file token can be generated via `pb.files.getToken()`.\n */\n getDownloadURL(token: string, key: string): string {\n return this.client.buildURL(\n `/api/backups/${encodeURIComponent(key)}?token=${encodeURIComponent(token)}`,\n );\n }\n}\n","import { BaseService } from \"@/services/BaseService\";\nimport { CommonOptions } from \"@/tools/options\";\n\nexport interface CronJob {\n id: string;\n expression: string;\n}\n\nexport class CronService extends BaseService {\n /**\n * Returns list with all registered cron jobs.\n *\n * @throws {ClientResponseError}\n */\n async getFullList(options?: CommonOptions): Promise> {\n options = Object.assign(\n {\n method: \"GET\",\n },\n options,\n );\n\n return this.client.send(\"/api/crons\", options);\n }\n\n /**\n * Runs the specified cron job.\n *\n * @throws {ClientResponseError}\n */\n async run(jobId: string, options?: CommonOptions): Promise {\n options = Object.assign(\n {\n method: \"POST\",\n },\n options,\n );\n\n return this.client\n .send(`/api/crons/${encodeURIComponent(jobId)}`, options)\n .then(() => true);\n }\n}\n","/**\n * Checks if the specified value is a file (aka. File, Blob, RN file object).\n */\nexport function isFile(val: any): boolean {\n return (\n (typeof Blob !== \"undefined\" && val instanceof Blob) ||\n (typeof File !== \"undefined\" && val instanceof File) ||\n // check for React Native file object format\n // (see https://github.com/pocketbase/pocketbase/discussions/2002#discussioncomment-5254168)\n (val !== null &&\n typeof val === \"object\" &&\n val.uri &&\n ((typeof navigator !== \"undefined\" && navigator.product === \"ReactNative\") ||\n (typeof global !== \"undefined\" && (global as any).HermesInternal)))\n );\n}\n\n/**\n * Loosely checks if the specified body is a FormData instance.\n */\nexport function isFormData(body: any): boolean {\n return (\n body &&\n // we are checking the constructor name because FormData\n // is not available natively in some environments and the\n // polyfill(s) may not be globally accessible\n (body.constructor?.name === \"FormData\" ||\n // fallback to global FormData instance check\n // note: this is needed because the constructor.name could be different in case of\n // custom global FormData implementation, eg. React Native on Android/iOS\n (typeof FormData !== \"undefined\" && body instanceof FormData))\n );\n}\n\n/**\n * Checks if the submitted body object has at least one Blob/File field value.\n */\nexport function hasFileField(body: { [key: string]: any }): boolean {\n for (const key in body) {\n const values = Array.isArray(body[key]) ? body[key] : [body[key]];\n for (const v of values) {\n if (isFile(v)) {\n return true;\n }\n }\n }\n\n return false;\n}\n\n/**\n * Converts analyzes the provided body and converts it to FormData\n * in case a plain object with File/Blob values is used.\n */\nexport function convertToFormDataIfNeeded(body: any): any {\n if (\n typeof FormData === \"undefined\" ||\n typeof body === \"undefined\" ||\n typeof body !== \"object\" ||\n body === null ||\n isFormData(body) ||\n !hasFileField(body)\n ) {\n return body;\n }\n\n const form = new FormData();\n\n for (const key in body) {\n const val = body[key];\n\n // skip undefined values for consistency with JSON.stringify\n // (see https://github.com/pocketbase/pocketbase/issues/6731#issuecomment-2812382827)\n if (typeof val === \"undefined\") {\n continue;\n }\n\n if (typeof val === \"object\" && !hasFileField({ data: val })) {\n // send json-like values as jsonPayload to avoid the implicit string value normalization\n let payload: { [key: string]: any } = {};\n payload[key] = val;\n form.append(\"@jsonPayload\", JSON.stringify(payload));\n } else {\n // in case of mixed string and file/blob\n const normalizedVal = Array.isArray(val) ? val : [val];\n for (let v of normalizedVal) {\n form.append(key, v);\n }\n }\n }\n\n return form;\n}\n\n/**\n * Converts the provided FormData instance into a plain object.\n *\n * For consistency with the server multipart/form-data inferring,\n * the following normalization rules are applied for plain multipart string values:\n * - \"true\" is converted to the json \"true\"\n * - \"false\" is converted to the json \"false\"\n * - numeric strings are converted to json number ONLY if the resulted\n * minimal number string representation is the same as the provided raw string\n * (aka. scientific notations, \"Infinity\", \"0.0\", \"0001\", etc. are kept as string)\n * - any other string (empty string too) is left as it is\n */\nexport function convertFormDataToObject(formData: FormData): { [key: string]: any } {\n let result: { [key: string]: any } = {};\n\n formData.forEach((v, k) => {\n if (k === \"@jsonPayload\" && typeof v == \"string\") {\n try {\n let parsed = JSON.parse(v);\n Object.assign(result, parsed);\n } catch (err) {\n console.warn(\"@jsonPayload error:\", err);\n }\n } else {\n if (typeof result[k] !== \"undefined\") {\n if (!Array.isArray(result[k])) {\n result[k] = [result[k]];\n }\n result[k].push(inferFormDataValue(v));\n } else {\n result[k] = inferFormDataValue(v);\n }\n }\n });\n\n return result;\n}\n\nconst inferNumberCharsRegex = /^[\\-\\.\\d]+$/;\n\nfunction inferFormDataValue(value: any): any {\n if (typeof value != \"string\") {\n return value;\n }\n\n if (value == \"true\") {\n return true;\n }\n\n if (value == \"false\") {\n return false;\n }\n\n // note: expects the provided raw string to match exactly with the minimal string representation of the parsed number\n if (\n (value[0] === \"-\" || (value[0] >= \"0\" && value[0] <= \"9\")) &&\n inferNumberCharsRegex.test(value)\n ) {\n let num = +value;\n if (\"\" + num === value) {\n return num;\n }\n }\n\n return value;\n}\n","import { BaseService } from \"@/services/BaseService\";\nimport { isFile, isFormData, convertFormDataToObject } from \"@/tools/formdata\";\nimport {\n SendOptions,\n RecordOptions,\n normalizeUnknownQueryParams,\n serializeQueryParams,\n} from \"@/tools/options\";\n\nexport interface BatchRequest {\n method: string;\n url: string;\n json?: { [key: string]: any };\n files?: { [key: string]: Array };\n headers?: { [key: string]: string };\n}\n\nexport interface BatchRequestResult {\n status: number;\n body: any;\n}\n\nexport class BatchService extends BaseService {\n private requests: Array = [];\n private subs: { [key: string]: SubBatchService } = {};\n\n /**\n * Starts constructing a batch request entry for the specified collection.\n */\n collection(collectionIdOrName: string): SubBatchService {\n if (!this.subs[collectionIdOrName]) {\n this.subs[collectionIdOrName] = new SubBatchService(\n this.requests,\n collectionIdOrName,\n );\n }\n\n return this.subs[collectionIdOrName];\n }\n\n /**\n * Sends the batch requests.\n *\n * @throws {ClientResponseError}\n */\n async send(options?: SendOptions): Promise> {\n const formData = new FormData();\n\n const jsonData = [];\n\n for (let i = 0; i < this.requests.length; i++) {\n const req = this.requests[i];\n\n jsonData.push({\n method: req.method,\n url: req.url,\n headers: req.headers,\n body: req.json,\n });\n\n if (req.files) {\n for (let key in req.files) {\n const files = req.files[key] || [];\n for (let file of files) {\n formData.append(\"requests.\" + i + \".\" + key, file);\n }\n }\n }\n }\n\n formData.append(\"@jsonPayload\", JSON.stringify({ requests: jsonData }));\n\n options = Object.assign(\n {\n method: \"POST\",\n body: formData,\n },\n options,\n );\n\n return this.client.send(\"/api/batch\", options);\n }\n}\n\nexport class SubBatchService {\n private requests: Array = [];\n private readonly collectionIdOrName: string;\n\n constructor(requests: Array, collectionIdOrName: string) {\n this.requests = requests;\n this.collectionIdOrName = collectionIdOrName;\n }\n\n /**\n * Registers a record upsert request into the current batch queue.\n *\n * The request will be executed as update if `bodyParams` have a valid existing record `id` value, otherwise - create.\n */\n upsert(\n bodyParams?: { [key: string]: any } | FormData,\n options?: RecordOptions,\n ): void {\n options = Object.assign(\n {\n body: bodyParams || {},\n },\n options,\n );\n\n const request: BatchRequest = {\n method: \"PUT\",\n url:\n \"/api/collections/\" +\n encodeURIComponent(this.collectionIdOrName) +\n \"/records\",\n };\n\n this.prepareRequest(request, options);\n\n this.requests.push(request);\n }\n\n /**\n * Registers a record create request into the current batch queue.\n */\n create(\n bodyParams?: { [key: string]: any } | FormData,\n options?: RecordOptions,\n ): void {\n options = Object.assign(\n {\n body: bodyParams || {},\n },\n options,\n );\n\n const request: BatchRequest = {\n method: \"POST\",\n url:\n \"/api/collections/\" +\n encodeURIComponent(this.collectionIdOrName) +\n \"/records\",\n };\n\n this.prepareRequest(request, options);\n\n this.requests.push(request);\n }\n\n /**\n * Registers a record update request into the current batch queue.\n */\n update(\n id: string,\n bodyParams?: { [key: string]: any } | FormData,\n options?: RecordOptions,\n ): void {\n options = Object.assign(\n {\n body: bodyParams || {},\n },\n options,\n );\n\n const request: BatchRequest = {\n method: \"PATCH\",\n url:\n \"/api/collections/\" +\n encodeURIComponent(this.collectionIdOrName) +\n \"/records/\" +\n encodeURIComponent(id),\n };\n\n this.prepareRequest(request, options);\n\n this.requests.push(request);\n }\n\n /**\n * Registers a record delete request into the current batch queue.\n */\n delete(id: string, options?: SendOptions): void {\n options = Object.assign({}, options);\n\n const request: BatchRequest = {\n method: \"DELETE\",\n url:\n \"/api/collections/\" +\n encodeURIComponent(this.collectionIdOrName) +\n \"/records/\" +\n encodeURIComponent(id),\n };\n\n this.prepareRequest(request, options);\n\n this.requests.push(request);\n }\n\n private prepareRequest(request: BatchRequest, options: SendOptions) {\n normalizeUnknownQueryParams(options);\n\n request.headers = options.headers;\n request.json = {};\n request.files = {};\n\n // serialize query parameters\n // -----------------------------------------------------------\n if (typeof options.query !== \"undefined\") {\n const query = serializeQueryParams(options.query);\n if (query) {\n request.url += (request.url.includes(\"?\") ? \"&\" : \"?\") + query;\n }\n }\n\n // extract json and files body data\n // -----------------------------------------------------------\n let body = options.body;\n if (isFormData(body)) {\n body = convertFormDataToObject(body);\n }\n\n for (const key in body) {\n const val = body[key];\n\n if (isFile(val)) {\n request.files[key] = request.files[key] || [];\n request.files[key].push(val);\n } else if (Array.isArray(val)) {\n const foundFiles = [];\n const foundRegular = [];\n for (const v of val) {\n if (isFile(v)) {\n foundFiles.push(v);\n } else {\n foundRegular.push(v);\n }\n }\n\n if (foundFiles.length > 0 && foundFiles.length == val.length) {\n // only files\n // ---\n request.files[key] = request.files[key] || [];\n for (let file of foundFiles) {\n request.files[key].push(file);\n }\n } else {\n // empty or mixed array (both regular and File/Blob values)\n // ---\n request.json[key] = foundRegular;\n\n if (foundFiles.length > 0) {\n // add \"+\" to append if not already since otherwise\n // the existing regular files will be deleted\n // (the mixed values order is preserved only within their corresponding groups)\n let fileKey = key;\n if (!key.startsWith(\"+\") && !key.endsWith(\"+\")) {\n fileKey += \"+\";\n }\n\n request.files[fileKey] = request.files[fileKey] || [];\n for (let file of foundFiles) {\n request.files[fileKey].push(file);\n }\n }\n }\n } else {\n request.json[key] = val;\n }\n }\n }\n}\n","import { ClientResponseError } from \"@/ClientResponseError\";\nimport { BaseAuthStore } from \"@/stores/BaseAuthStore\";\nimport { LocalAuthStore } from \"@/stores/LocalAuthStore\";\nimport { SettingsService } from \"@/services/SettingsService\";\nimport { RecordService } from \"@/services/RecordService\";\nimport { CollectionService } from \"@/services/CollectionService\";\nimport { LogService } from \"@/services/LogService\";\nimport { RealtimeService } from \"@/services/RealtimeService\";\nimport { HealthService } from \"@/services/HealthService\";\nimport { FileService } from \"@/services/FileService\";\nimport { BackupService } from \"@/services/BackupService\";\nimport { CronService } from \"@/services/CronService\";\nimport { BatchService } from \"@/services/BatchService\";\nimport { RecordModel } from \"@/tools/dtos\";\nimport {\n SendOptions,\n FileOptions,\n normalizeUnknownQueryParams,\n serializeQueryParams,\n} from \"@/tools/options\";\nimport { isFormData, convertToFormDataIfNeeded } from \"@/tools/formdata\";\n\nexport interface BeforeSendResult {\n [key: string]: any; // for backward compatibility\n url?: string;\n options?: { [key: string]: any };\n}\n\n/**\n * PocketBase JS Client.\n */\nexport default class Client {\n /**\n * The base PocketBase backend url address (eg. 'http://127.0.0.1.8090').\n */\n baseURL: string;\n\n /**\n * Legacy getter alias for baseURL.\n * @deprecated Please replace with baseURL.\n */\n get baseUrl(): string {\n return this.baseURL;\n }\n\n /**\n * Legacy setter alias for baseURL.\n * @deprecated Please replace with baseURL.\n */\n set baseUrl(v: string) {\n this.baseURL = v;\n }\n\n /**\n * Hook that get triggered right before sending the fetch request,\n * allowing you to inspect and modify the url and request options.\n *\n * For list of the possible options check https://developer.mozilla.org/en-US/docs/Web/API/fetch#options\n *\n * You can return a non-empty result object `{ url, options }` to replace the url and request options entirely.\n *\n * Example:\n * ```js\n * const pb = new PocketBase(\"https://example.com\")\n *\n * pb.beforeSend = function (url, options) {\n * options.headers = Object.assign({}, options.headers, {\n * 'X-Custom-Header': 'example',\n * })\n *\n * return { url, options }\n * }\n *\n * // use the created client as usual...\n * ```\n */\n beforeSend?: (\n url: string,\n options: SendOptions,\n ) => BeforeSendResult | Promise;\n\n /**\n * Hook that get triggered after successfully sending the fetch request,\n * allowing you to inspect/modify the response object and its parsed data.\n *\n * Returns the new Promise resolved `data` that will be returned to the client.\n *\n * Example:\n * ```js\n * const pb = new PocketBase(\"https://example.com\")\n *\n * pb.afterSend = function (response, data, options) {\n * if (response.status != 200) {\n * throw new ClientResponseError({\n * url: response.url,\n * status: response.status,\n * response: { ... },\n * })\n * }\n *\n * return data;\n * }\n *\n * // use the created client as usual...\n * ```\n */\n afterSend?: ((response: Response, data: any) => any) &\n ((response: Response, data: any, options: SendOptions) => any);\n\n /**\n * Optional language code (default to `en-US`) that will be sent\n * with the requests to the server as `Accept-Language` header.\n */\n lang: string;\n\n /**\n * A replaceable instance of the local auth store service.\n */\n authStore: BaseAuthStore;\n\n /**\n * An instance of the service that handles the **Settings APIs**.\n */\n readonly settings: SettingsService;\n\n /**\n * An instance of the service that handles the **Collection APIs**.\n */\n readonly collections: CollectionService;\n\n /**\n * An instance of the service that handles the **File APIs**.\n */\n readonly files: FileService;\n\n /**\n * An instance of the service that handles the **Log APIs**.\n */\n readonly logs: LogService;\n\n /**\n * An instance of the service that handles the **Realtime APIs**.\n */\n readonly realtime: RealtimeService;\n\n /**\n * An instance of the service that handles the **Health APIs**.\n */\n readonly health: HealthService;\n\n /**\n * An instance of the service that handles the **Backup APIs**.\n */\n readonly backups: BackupService;\n\n /**\n * An instance of the service that handles the **Cron APIs**.\n */\n readonly crons: CronService;\n\n private cancelControllers: { [key: string]: AbortController } = {};\n private recordServices: { [key: string]: RecordService } = {};\n private enableAutoCancellation: boolean = true;\n\n constructor(baseURL = \"/\", authStore?: BaseAuthStore | null, lang = \"en-US\") {\n this.baseURL = baseURL;\n this.lang = lang;\n\n if (authStore) {\n this.authStore = authStore;\n } else if (typeof window != \"undefined\" && !!(window as any).Deno) {\n // note: to avoid common security issues we fallback to runtime/memory store in case the code is running in Deno env\n this.authStore = new BaseAuthStore();\n } else {\n this.authStore = new LocalAuthStore();\n }\n\n // common services\n this.collections = new CollectionService(this);\n this.files = new FileService(this);\n this.logs = new LogService(this);\n this.settings = new SettingsService(this);\n this.realtime = new RealtimeService(this);\n this.health = new HealthService(this);\n this.backups = new BackupService(this);\n this.crons = new CronService(this);\n }\n\n /**\n * @deprecated\n * With PocketBase v0.23.0 admins are converted to a regular auth\n * collection named \"_superusers\", aka. you can use directly collection(\"_superusers\").\n */\n get admins(): RecordService {\n return this.collection(\"_superusers\");\n }\n\n /**\n * Creates a new batch handler for sending multiple transactional\n * create/update/upsert/delete collection requests in one network call.\n *\n * Example:\n * ```js\n * const batch = pb.createBatch();\n *\n * batch.collection(\"example1\").create({ ... })\n * batch.collection(\"example2\").update(\"RECORD_ID\", { ... })\n * batch.collection(\"example3\").delete(\"RECORD_ID\")\n * batch.collection(\"example4\").upsert({ ... })\n *\n * await batch.send()\n * ```\n */\n createBatch(): BatchService {\n return new BatchService(this);\n }\n\n /**\n * Returns the RecordService associated to the specified collection.\n */\n collection(idOrName: string): RecordService {\n if (!this.recordServices[idOrName]) {\n this.recordServices[idOrName] = new RecordService(this, idOrName);\n }\n\n return this.recordServices[idOrName];\n }\n\n /**\n * Globally enable or disable auto cancellation for pending duplicated requests.\n */\n autoCancellation(enable: boolean): Client {\n this.enableAutoCancellation = !!enable;\n\n return this;\n }\n\n /**\n * Cancels single request by its cancellation key.\n */\n cancelRequest(requestKey: string): Client {\n if (this.cancelControllers[requestKey]) {\n this.cancelControllers[requestKey].abort();\n delete this.cancelControllers[requestKey];\n }\n\n return this;\n }\n\n /**\n * Cancels all pending requests.\n */\n cancelAllRequests(): Client {\n for (let k in this.cancelControllers) {\n this.cancelControllers[k].abort();\n }\n\n this.cancelControllers = {};\n\n return this;\n }\n\n /**\n * Constructs a filter expression with placeholders populated from a parameters object.\n *\n * Placeholder parameters are defined with the `{:paramName}` notation.\n *\n * The following parameter values are supported:\n *\n * - `string` (_single quotes are autoescaped_)\n * - `number`\n * - `boolean`\n * - `Date` object (_stringified into the PocketBase datetime format_)\n * - `null`\n * - everything else is converted to a string using `JSON.stringify()`\n *\n * Example:\n *\n * ```js\n * pb.collection(\"example\").getFirstListItem(pb.filter(\n * 'title ~ {:title} && created >= {:created}',\n * { title: \"example\", created: new Date()}\n * ))\n * ```\n */\n filter(raw: string, params?: { [key: string]: any }): string {\n if (!params) {\n return raw;\n }\n\n for (let key in params) {\n let val = params[key];\n switch (typeof val) {\n case \"boolean\":\n case \"number\":\n val = \"\" + val;\n break;\n case \"string\":\n val = \"'\" + val.replace(/'/g, \"\\\\'\") + \"'\";\n break;\n default:\n if (val === null) {\n val = \"null\";\n } else if (val instanceof Date) {\n val = \"'\" + val.toISOString().replace(\"T\", \" \") + \"'\";\n } else {\n val = \"'\" + JSON.stringify(val).replace(/'/g, \"\\\\'\") + \"'\";\n }\n }\n raw = raw.replaceAll(\"{:\" + key + \"}\", val);\n }\n\n return raw;\n }\n\n /**\n * @deprecated Please use `pb.files.getURL()`.\n */\n getFileUrl(\n record: { [key: string]: any },\n filename: string,\n queryParams: FileOptions = {},\n ): string {\n console.warn(\"Please replace pb.getFileUrl() with pb.files.getURL()\");\n return this.files.getURL(record, filename, queryParams);\n }\n\n /**\n * @deprecated Please use `pb.buildURL()`.\n */\n buildUrl(path: string): string {\n console.warn(\"Please replace pb.buildUrl() with pb.buildURL()\");\n return this.buildURL(path);\n }\n\n /**\n * Builds a full client url by safely concatenating the provided path.\n */\n buildURL(path: string): string {\n let url = this.baseURL;\n\n // construct an absolute base url if in a browser environment\n if (\n typeof window !== \"undefined\" &&\n !!window.location &&\n !url.startsWith(\"https://\") &&\n !url.startsWith(\"http://\")\n ) {\n url = window.location.origin?.endsWith(\"/\")\n ? window.location.origin.substring(0, window.location.origin.length - 1)\n : window.location.origin || \"\";\n\n if (!this.baseURL.startsWith(\"/\")) {\n url += window.location.pathname || \"/\";\n url += url.endsWith(\"/\") ? \"\" : \"/\";\n }\n\n url += this.baseURL;\n }\n\n // concatenate the path\n if (path) {\n url += url.endsWith(\"/\") ? \"\" : \"/\"; // append trailing slash if missing\n url += path.startsWith(\"/\") ? path.substring(1) : path;\n }\n\n return url;\n }\n\n /**\n * Sends an api http request.\n *\n * @throws {ClientResponseError}\n */\n async send(path: string, options: SendOptions): Promise {\n options = this.initSendOptions(path, options);\n\n // build url + path\n let url = this.buildURL(path);\n\n if (this.beforeSend) {\n const result = Object.assign({}, await this.beforeSend(url, options));\n if (\n typeof result.url !== \"undefined\" ||\n typeof result.options !== \"undefined\"\n ) {\n url = result.url || url;\n options = result.options || options;\n } else if (Object.keys(result).length) {\n // legacy behavior\n options = result as SendOptions;\n console?.warn &&\n console.warn(\n \"Deprecated format of beforeSend return: please use `return { url, options }`, instead of `return options`.\",\n );\n }\n }\n\n // serialize the query parameters\n if (typeof options.query !== \"undefined\") {\n const query = serializeQueryParams(options.query);\n if (query) {\n url += (url.includes(\"?\") ? \"&\" : \"?\") + query;\n }\n delete options.query;\n }\n\n // ensures that the json body is serialized\n if (\n this.getHeader(options.headers, \"Content-Type\") == \"application/json\" &&\n options.body &&\n typeof options.body !== \"string\"\n ) {\n options.body = JSON.stringify(options.body);\n }\n\n // early throw an abort error in case the request was already cancelled\n const fetchFunc = options.fetch || fetch;\n\n // send the request\n return fetchFunc(url, options)\n .then(async (response) => {\n let data: any = {};\n\n try {\n data = await response.json();\n } catch (err) {\n // @todo map against the response content type\n // all api responses are expected to return json\n // with exception of the realtime events and 204\n if (\n options.signal?.aborted ||\n (\n typeof DOMException !== \"undefined\" && err instanceof DOMException &&\n // https://developer.mozilla.org/en-US/docs/Web/API/DOMException#aborterror\n (err.name == \"AbortError\" || err.code == 20)\n )\n ) {\n throw err;\n }\n }\n\n if (this.afterSend) {\n data = await this.afterSend(response, data, options);\n }\n\n if (response.status >= 400) {\n throw new ClientResponseError({\n url: response.url,\n status: response.status,\n data: data,\n });\n }\n\n return data as T;\n })\n .catch((err) => {\n // wrap to normalize all errors\n throw new ClientResponseError(err);\n });\n }\n\n /**\n * Shallow copy the provided object and takes care to initialize\n * any options required to preserve the backward compatability.\n *\n * @param {SendOptions} options\n * @return {SendOptions}\n */\n private initSendOptions(path: string, options: SendOptions): SendOptions {\n options = Object.assign({ method: \"GET\" } as SendOptions, options);\n\n // auto convert the body to FormData, if needed\n options.body = convertToFormDataIfNeeded(options.body);\n\n // move unknown send options as query parameters\n normalizeUnknownQueryParams(options);\n\n // requestKey normalizations for backward-compatibility\n // ---\n options.query = Object.assign({}, options.params, options.query);\n if (typeof options.requestKey === \"undefined\") {\n if (options.$autoCancel === false || options.query.$autoCancel === false) {\n options.requestKey = null;\n } else if (options.$cancelKey || options.query.$cancelKey) {\n options.requestKey = options.$cancelKey || options.query.$cancelKey;\n }\n }\n // remove the deprecated special cancellation params from the other query params\n delete options.$autoCancel;\n delete options.query.$autoCancel;\n delete options.$cancelKey;\n delete options.query.$cancelKey;\n // ---\n\n // add the json header, if not explicitly set\n // (for FormData body the Content-Type header should be skipped since the boundary is autogenerated)\n if (\n this.getHeader(options.headers, \"Content-Type\") === null &&\n !isFormData(options.body)\n ) {\n options.headers = Object.assign({}, options.headers, {\n \"Content-Type\": \"application/json\",\n });\n }\n\n // add Accept-Language header, if not explicitly set\n if (this.getHeader(options.headers, \"Accept-Language\") === null) {\n options.headers = Object.assign({}, options.headers, {\n \"Accept-Language\": this.lang,\n });\n }\n\n // check if Authorization header can be added\n if (\n // has valid token\n this.authStore.token &&\n // auth header is not explicitly set\n this.getHeader(options.headers, \"Authorization\") === null\n ) {\n options.headers = Object.assign({}, options.headers, {\n Authorization: this.authStore.token,\n });\n }\n\n // handle auto cancelation for duplicated pending request\n if (this.enableAutoCancellation && options.requestKey !== null) {\n const requestKey = options.requestKey || (options.method || \"GET\") + path;\n\n delete options.requestKey;\n\n // cancel previous pending requests\n this.cancelRequest(requestKey);\n\n const controller = new AbortController();\n this.cancelControllers[requestKey] = controller;\n options.signal = controller.signal;\n }\n\n return options;\n }\n\n /**\n * Extracts the header with the provided name in case-insensitive manner.\n * Returns `null` if no header matching the name is found.\n */\n private getHeader(\n headers: { [key: string]: string } | undefined,\n name: string,\n ): string | null {\n headers = headers || {};\n name = name.toLowerCase();\n\n for (let key in headers) {\n if (key.toLowerCase() == name) {\n return headers[key];\n }\n }\n\n return null;\n }\n}\n","import { BaseAuthStore, AuthRecord } from \"@/stores/BaseAuthStore\";\n\nexport type AsyncSaveFunc = (serializedPayload: string) => Promise;\n\nexport type AsyncClearFunc = () => Promise;\n\ntype queueFunc = () => Promise;\n\n/**\n * AsyncAuthStore is a helper auth store implementation\n * that could be used with any external async persistent layer\n * (key-value db, local file, etc.).\n *\n * Here is an example with the React Native AsyncStorage package:\n *\n * ```\n * import AsyncStorage from \"@react-native-async-storage/async-storage\";\n * import PocketBase, { AsyncAuthStore } from \"pocketbase\";\n *\n * const store = new AsyncAuthStore({\n * save: async (serialized) => AsyncStorage.setItem(\"pb_auth\", serialized),\n * initial: AsyncStorage.getItem(\"pb_auth\"),\n * });\n *\n * const pb = new PocketBase(\"https://example.com\", store)\n * ```\n */\nexport class AsyncAuthStore extends BaseAuthStore {\n private saveFunc: AsyncSaveFunc;\n private clearFunc?: AsyncClearFunc;\n private queue: Array = [];\n\n constructor(config: {\n // The async function that is called every time\n // when the auth store state needs to be persisted.\n save: AsyncSaveFunc;\n\n /// An *optional* async function that is called every time\n /// when the auth store needs to be cleared.\n ///\n /// If not explicitly set, `saveFunc` with empty data will be used.\n clear?: AsyncClearFunc;\n\n // An *optional* initial data to load into the store.\n initial?: string | Promise;\n }) {\n super();\n\n this.saveFunc = config.save;\n this.clearFunc = config.clear;\n\n this._enqueue(() => this._loadInitial(config.initial));\n }\n\n /**\n * @inheritdoc\n */\n save(token: string, record?: AuthRecord): void {\n super.save(token, record);\n\n let value = \"\";\n try {\n value = JSON.stringify({ token, record });\n } catch (err) {\n console.warn(\"AsyncAuthStore: failed to stringify the new state\");\n }\n\n this._enqueue(() => this.saveFunc(value));\n }\n\n /**\n * @inheritdoc\n */\n clear(): void {\n super.clear();\n\n if (this.clearFunc) {\n this._enqueue(() => this.clearFunc!());\n } else {\n this._enqueue(() => this.saveFunc(\"\"));\n }\n }\n\n /**\n * Initializes the auth store state.\n */\n private async _loadInitial(payload?: string | Promise) {\n try {\n payload = await payload;\n\n if (payload) {\n let parsed;\n if (typeof payload === \"string\") {\n parsed = JSON.parse(payload) || {};\n } else if (typeof payload === \"object\") {\n parsed = payload;\n }\n\n this.save(parsed.token || \"\", parsed.record || parsed.model || null);\n }\n } catch (_) {}\n }\n\n /**\n * Appends an async function to the queue.\n */\n private _enqueue(asyncCallback: () => Promise) {\n this.queue.push(asyncCallback);\n\n if (this.queue.length == 1) {\n this._dequeue();\n }\n }\n\n /**\n * Starts the queue processing.\n */\n private _dequeue() {\n if (!this.queue.length) {\n return;\n }\n\n this.queue[0]().finally(() => {\n this.queue.shift();\n\n if (!this.queue.length) {\n return;\n }\n\n this._dequeue();\n });\n }\n}\n"],"names":["ClientResponseError","Error","constructor","errData","super","this","url","status","response","isAbort","originalError","Object","setPrototypeOf","prototype","data","DOMException","name","code","message","cause","includes","toJSON","fieldContentRegExp","cookieParse","str","options","result","decode","assign","defaultDecode","index","length","eqIdx","indexOf","endIdx","lastIndexOf","key","slice","trim","undefined","val","charCodeAt","_","cookieSerialize","opt","encode","defaultEncode","test","TypeError","value","maxAge","isNaN","isFinite","Math","floor","domain","path","expires","isDate","toString","call","Date","valueOf","toUTCString","httpOnly","secure","priority","toLowerCase","sameSite","decodeURIComponent","encodeURIComponent","isReactNative","navigator","product","global","HermesInternal","atobPolyfill","getTokenPayload","token","encodedPayload","split","map","c","join","JSON","parse","e","isTokenExpired","expirationThreshold","payload","keys","exp","now","atob","input","String","replace","bs","buffer","bc","idx","output","charAt","fromCharCode","defaultCookieKey","BaseAuthStore","baseToken","baseModel","_onChangeCallbacks","record","model","isValid","isSuperuser","type","collectionName","collectionId","isAdmin","console","warn","isAuthRecord","save","triggerChange","clear","loadFromCookie","cookie","rawData","Array","isArray","exportToCookie","defaultOptions","stringify","resultLength","Blob","size","id","email","extraProps","prop","onChange","callback","fireImmediately","push","i","splice","LocalAuthStore","storageKey","storageFallback","_bindStorageEvent","_storageGet","_storageSet","_storageRemove","window","localStorage","rawValue","getItem","normalizedVal","setItem","removeItem","addEventListener","BaseService","client","SettingsService","getAll","method","send","update","bodyParams","body","testS3","filesystem","then","testEmail","collectionIdOrName","toEmail","emailTemplate","template","collection","generateAppleClientSecret","clientId","teamId","keyId","privateKey","duration","knownSendOptionsKeys","normalizeUnknownQueryParams","query","serializeQueryParams","params","encodedKey","arrValue","v","prepareQueryParamValue","toISOString","RealtimeService","eventSource","subscriptions","lastSentSubscriptions","maxConnectTimeout","reconnectAttempts","maxReconnectAttempts","Infinity","predefinedReconnectIntervals","pendingConnects","isConnected","subscribe","topic","serialized","headers","listener","msgEvent","submitSubscriptions","connect","async","unsubscribeByTopicAndListener","unsubscribe","needToSubmit","subs","getSubscriptionsByTopic","hasSubscriptionListeners","removeEventListener","disconnect","unsubscribeByPrefix","keyPrefix","hasAtleastOneTopic","startsWith","exist","keyToCheck","addAllSubscriptionListeners","getNonEmptySubscriptionKeys","requestKey","getSubscriptionsCancelKey","catch","err","removeAllSubscriptionListeners","Promise","resolve","reject","initConnect","clearTimeout","connectTimeoutId","setTimeout","connectErrorHandler","EventSource","buildURL","onerror","lastEventId","retries","hasUnsentSubscriptions","p","reconnectTimeoutId","connectSubs","latestTopics","t","timeout","fromReconnect","onDisconnect","cancelRequest","close","CrudService","getFullList","batchOrqueryParams","_getFullList","batch","getList","page","perPage","baseCrudPath","responseData","items","item","getFirstListItem","filter","skipTotal","getOne","create","batchSize","request","list","concat","normalizeLegacyOptionsArgs","legacyWarn","baseOptions","bodyOrOptions","hasQuery","resetAutoRefresh","_resetAutoRefresh","RecordService","baseCollectionPath","isSuperusers","realtime","batchOrOptions","authStore","authExpand","expand","authRecord","delete","success","authResponse","listAuthMethods","fields","authWithPassword","usernameOrEmail","password","autoRefreshThreshold","identity","autoRefresh","authData","registerAutoRefresh","threshold","refreshFunc","reauthenticateFunc","oldBeforeSend","beforeSend","oldModel","unsubStoreChange","newToken","sendOptions","oldToken","authRefresh","authWithOAuth2Code","provider","codeVerifier","redirectURL","createData","authWithOAuth2","args","config","eagerDefaultPopup","urlCallback","openBrowserPopup","cleanup","requestKeyOptions","authMethods","oauth2","providers","find","cancelController","signal","onabort","oldState","state","error","scopes","replacements","_replaceQueryParams","authURL","location","href","requestPasswordReset","confirmPasswordReset","passwordResetToken","passwordConfirm","requestVerification","confirmVerification","verificationToken","verified","requestEmailChange","newEmail","confirmEmailChange","emailChangeToken","listExternalAuths","recordId","unlinkExternalAuth","ea","requestOTP","authWithOTP","otpId","impersonate","Authorization","Client","baseURL","lang","urlPath","substring","parsedParams","rawParams","param","pair","hasOwnProperty","open","width","height","windowWidth","innerWidth","windowHeight","innerHeight","left","top","CollectionService","import","collections","deleteMissing","getScaffolds","truncate","LogService","getStats","HealthService","check","FileService","getUrl","filename","queryParams","getURL","parts","download","URLSearchParams","getToken","BackupService","basename","upload","restore","getDownloadUrl","getDownloadURL","CronService","run","jobId","isFile","File","uri","isFormData","FormData","hasFileField","values","inferNumberCharsRegex","inferFormDataValue","num","BatchService","requests","SubBatchService","formData","jsonData","req","json","files","file","append","upsert","prepareRequest","convertFormDataToObject","forEach","k","parsed","foundFiles","foundRegular","fileKey","endsWith","baseUrl","cancelControllers","recordServices","enableAutoCancellation","Deno","logs","settings","health","backups","crons","admins","createBatch","idOrName","autoCancellation","enable","abort","cancelAllRequests","raw","replaceAll","getFileUrl","buildUrl","origin","pathname","initSendOptions","getHeader","fetch","aborted","afterSend","convertToFormDataIfNeeded","form","$autoCancel","$cancelKey","controller","AbortController","AsyncAuthStore","queue","saveFunc","clearFunc","_enqueue","_loadInitial","initial","asyncCallback","_dequeue","finally","shift"],"mappings":"AAIM,MAAOA,4BAA4BC,MAOrC,WAAAC,CAAYC,GACRC,MAAM,uBAPVC,KAAGC,IAAW,GACdD,KAAME,OAAW,EACjBF,KAAQG,SAA2B,GACnCH,KAAOI,SAAY,EACnBJ,KAAaK,cAAQ,KAOjBC,OAAOC,eAAeP,KAAML,oBAAoBa,WAEhC,OAAZV,GAAuC,iBAAZA,IAC3BE,KAAKC,IAA6B,iBAAhBH,EAAQG,IAAmBH,EAAQG,IAAM,GAC3DD,KAAKE,OAAmC,iBAAnBJ,EAAQI,OAAsBJ,EAAQI,OAAS,EACpEF,KAAKI,UAAYN,EAAQM,QACzBJ,KAAKK,cAAgBP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W,EAASrW,KAAKC,MAAMI,IAAY,CAAA,EACN,iBAAZA,IACdgW,EAAShW,GAGbpF,KAAKmH,KAAKiU,EAAO3W,OAAS,GAAI2W,EAAO5U,QAAU4U,EAAO3U,OAAS,KAClE,CACJ,CAAC,MAAOpE,GAAK,CACjB,CAKO,QAAA0b,CAASG,GACble,KAAK4d,MAAMpV,KAAK0V,GAES,GAArBle,KAAK4d,MAAMlc,QACX1B,KAAKme,UAEZ,CAKO,QAAAA,GACCne,KAAK4d,MAAMlc,QAIhB1B,KAAK4d,MAAM,KAAKQ,SAAQ,KACpBpe,KAAK4d,MAAMS,QAENre,KAAK4d,MAAMlc,QAIhB1B,KAAKme,UAAU,GAEtB"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/pocketbase/dist/pocketbase.es.mjs b/PBandGraphScaffold/node_modules/pocketbase/dist/pocketbase.es.mjs deleted file mode 100644 index 83d2475..0000000 --- a/PBandGraphScaffold/node_modules/pocketbase/dist/pocketbase.es.mjs +++ /dev/null @@ -1,2 +0,0 @@ -class ClientResponseError extends Error{constructor(e){super("ClientResponseError"),this.url="",this.status=0,this.response={},this.isAbort=!1,this.originalError=null,Object.setPrototypeOf(this,ClientResponseError.prototype),null!==e&&"object"==typeof e&&(this.url="string"==typeof e.url?e.url:"",this.status="number"==typeof e.status?e.status:0,this.isAbort=!!e.isAbort,this.originalError=e.originalError,null!==e.response&&"object"==typeof e.response?this.response=e.response:null!==e.data&&"object"==typeof e.data?this.response=e.data:this.response={}),this.originalError||e instanceof ClientResponseError||(this.originalError=e),"undefined"!=typeof DOMException&&e instanceof DOMException&&("AbortError"==e.name||20==e.code)&&(this.isAbort=!0),this.name="ClientResponseError "+this.status,this.message=this.response?.message,this.message||(this.isAbort?this.message="The request was autocancelled. You can find more info in https://github.com/pocketbase/js-sdk#auto-cancellation.":this.originalError?.cause?.message?.includes("ECONNREFUSED ::1")?this.message="Failed to connect to the PocketBase server. Try changing the SDK URL from localhost to 127.0.0.1 (https://github.com/pocketbase/js-sdk/issues/21).":this.message="Something went wrong."),this.cause=this.originalError}get data(){return this.response}toJSON(){return{...this}}}const e=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function cookieParse(e,t){const s={};if("string"!=typeof e)return s;const i=Object.assign({},t||{}).decode||defaultDecode;let n=0;for(;n0&&(!s.exp||s.exp-t>Date.now()/1e3))}s="function"!=typeof atob||t?e=>{let t=String(e).replace(/=+$/,"");if(t.length%4==1)throw new Error("'atob' failed: The string to be decoded is not correctly encoded.");for(var s,i,n=0,r=0,o="";i=t.charAt(r++);~i&&(s=n%4?64*s+i:i,n++%4)?o+=String.fromCharCode(255&s>>(-2*n&6)):0)i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(i);return o}:atob;const i="pb_auth";class BaseAuthStore{constructor(){this.baseToken="",this.baseModel=null,this._onChangeCallbacks=[]}get token(){return this.baseToken}get record(){return this.baseModel}get model(){return this.baseModel}get isValid(){return!isTokenExpired(this.token)}get isSuperuser(){let e=getTokenPayload(this.token);return"auth"==e.type&&("_superusers"==this.record?.collectionName||!this.record?.collectionName&&"pbc_3142635823"==e.collectionId)}get isAdmin(){return console.warn("Please replace pb.authStore.isAdmin with pb.authStore.isSuperuser OR simply check the value of pb.authStore.record?.collectionName"),this.isSuperuser}get isAuthRecord(){return console.warn("Please replace pb.authStore.isAuthRecord with !pb.authStore.isSuperuser OR simply check the value of pb.authStore.record?.collectionName"),"auth"==getTokenPayload(this.token).type&&!this.isSuperuser}save(e,t){this.baseToken=e||"",this.baseModel=t||null,this.triggerChange()}clear(){this.baseToken="",this.baseModel=null,this.triggerChange()}loadFromCookie(e,t=i){const s=cookieParse(e||"")[t]||"";let n={};try{n=JSON.parse(s),(null===typeof n||"object"!=typeof n||Array.isArray(n))&&(n={})}catch(e){}this.save(n.token||"",n.record||n.model||null)}exportToCookie(e,t=i){const s={secure:!0,sameSite:!0,httpOnly:!0,path:"/"},n=getTokenPayload(this.token);s.expires=n?.exp?new Date(1e3*n.exp):new Date("1970-01-01"),e=Object.assign({},s,e);const r={token:this.token,record:this.record?JSON.parse(JSON.stringify(this.record)):null};let o=cookieSerialize(t,JSON.stringify(r),e);const a="undefined"!=typeof Blob?new Blob([o]).size:o.length;if(r.record&&a>4096){r.record={id:r.record?.id,email:r.record?.email};const s=["collectionId","collectionName","verified"];for(const e in this.record)s.includes(e)&&(r.record[e]=this.record[e]);o=cookieSerialize(t,JSON.stringify(r),e)}return o}onChange(e,t=!1){return this._onChangeCallbacks.push(e),t&&e(this.token,this.record),()=>{for(let t=this._onChangeCallbacks.length-1;t>=0;t--)if(this._onChangeCallbacks[t]==e)return delete this._onChangeCallbacks[t],void this._onChangeCallbacks.splice(t,1)}}triggerChange(){for(const e of this._onChangeCallbacks)e&&e(this.token,this.record)}}class LocalAuthStore extends BaseAuthStore{constructor(e="pocketbase_auth"){super(),this.storageFallback={},this.storageKey=e,this._bindStorageEvent()}get token(){return(this._storageGet(this.storageKey)||{}).token||""}get record(){const e=this._storageGet(this.storageKey)||{};return e.record||e.model||null}get model(){return this.record}save(e,t){this._storageSet(this.storageKey,{token:e,record:t}),super.save(e,t)}clear(){this._storageRemove(this.storageKey),super.clear()}_storageGet(e){if("undefined"!=typeof window&&window?.localStorage){const t=window.localStorage.getItem(e)||"";try{return JSON.parse(t)}catch(e){return t}}return this.storageFallback[e]}_storageSet(e,t){if("undefined"!=typeof window&&window?.localStorage){let s=t;"string"!=typeof t&&(s=JSON.stringify(t)),window.localStorage.setItem(e,s)}else this.storageFallback[e]=t}_storageRemove(e){"undefined"!=typeof window&&window?.localStorage&&window.localStorage?.removeItem(e),delete this.storageFallback[e]}_bindStorageEvent(){"undefined"!=typeof window&&window?.localStorage&&window.addEventListener&&window.addEventListener("storage",(e=>{if(e.key!=this.storageKey)return;const t=this._storageGet(this.storageKey)||{};super.save(t.token||"",t.record||t.model||null)}))}}class BaseService{constructor(e){this.client=e}}class SettingsService extends BaseService{async getAll(e){return e=Object.assign({method:"GET"},e),this.client.send("/api/settings",e)}async update(e,t){return t=Object.assign({method:"PATCH",body:e},t),this.client.send("/api/settings",t)}async testS3(e="storage",t){return t=Object.assign({method:"POST",body:{filesystem:e}},t),this.client.send("/api/settings/test/s3",t).then((()=>!0))}async testEmail(e,t,s,i){return i=Object.assign({method:"POST",body:{email:t,template:s,collection:e}},i),this.client.send("/api/settings/test/email",i).then((()=>!0))}async generateAppleClientSecret(e,t,s,i,n,r){return r=Object.assign({method:"POST",body:{clientId:e,teamId:t,keyId:s,privateKey:i,duration:n}},r),this.client.send("/api/settings/apple/generate-client-secret",r)}}const n=["requestKey","$cancelKey","$autoCancel","fetch","headers","body","query","params","cache","credentials","headers","integrity","keepalive","method","mode","redirect","referrer","referrerPolicy","signal","window"];function normalizeUnknownQueryParams(e){if(e){e.query=e.query||{};for(let t in e)n.includes(t)||(e.query[t]=e[t],delete e[t])}}function serializeQueryParams(e){const t=[];for(const s in e){const i=encodeURIComponent(s),n=Array.isArray(e[s])?e[s]:[e[s]];for(let e of n)e=prepareQueryParamValue(e),null!==e&&t.push(i+"="+e)}return t.join("&")}function prepareQueryParamValue(e){return null==e?null:e instanceof Date?encodeURIComponent(e.toISOString().replace("T"," ")):"object"==typeof e?encodeURIComponent(JSON.stringify(e)):encodeURIComponent(e)}class RealtimeService extends BaseService{constructor(){super(...arguments),this.clientId="",this.eventSource=null,this.subscriptions={},this.lastSentSubscriptions=[],this.maxConnectTimeout=15e3,this.reconnectAttempts=0,this.maxReconnectAttempts=1/0,this.predefinedReconnectIntervals=[200,300,500,1e3,1200,1500,2e3],this.pendingConnects=[]}get isConnected(){return!!this.eventSource&&!!this.clientId&&!this.pendingConnects.length}async subscribe(e,t,s){if(!e)throw new Error("topic must be set.");let i=e;if(s){normalizeUnknownQueryParams(s=Object.assign({},s));const e="options="+encodeURIComponent(JSON.stringify({query:s.query,headers:s.headers}));i+=(i.includes("?")?"&":"?")+e}const listener=function(e){const s=e;let i;try{i=JSON.parse(s?.data)}catch{}t(i||{})};return this.subscriptions[i]||(this.subscriptions[i]=[]),this.subscriptions[i].push(listener),this.isConnected?1===this.subscriptions[i].length?await this.submitSubscriptions():this.eventSource?.addEventListener(i,listener):await this.connect(),async()=>this.unsubscribeByTopicAndListener(e,listener)}async unsubscribe(e){let t=!1;if(e){const s=this.getSubscriptionsByTopic(e);for(let e in s)if(this.hasSubscriptionListeners(e)){for(let t of this.subscriptions[e])this.eventSource?.removeEventListener(e,t);delete this.subscriptions[e],t||(t=!0)}}else this.subscriptions={};this.hasSubscriptionListeners()?t&&await this.submitSubscriptions():this.disconnect()}async unsubscribeByPrefix(e){let t=!1;for(let s in this.subscriptions)if((s+"?").startsWith(e)){t=!0;for(let e of this.subscriptions[s])this.eventSource?.removeEventListener(s,e);delete this.subscriptions[s]}t&&(this.hasSubscriptionListeners()?await this.submitSubscriptions():this.disconnect())}async unsubscribeByTopicAndListener(e,t){let s=!1;const i=this.getSubscriptionsByTopic(e);for(let e in i){if(!Array.isArray(this.subscriptions[e])||!this.subscriptions[e].length)continue;let i=!1;for(let s=this.subscriptions[e].length-1;s>=0;s--)this.subscriptions[e][s]===t&&(i=!0,delete this.subscriptions[e][s],this.subscriptions[e].splice(s,1),this.eventSource?.removeEventListener(e,t));i&&(this.subscriptions[e].length||delete this.subscriptions[e],s||this.hasSubscriptionListeners(e)||(s=!0))}this.hasSubscriptionListeners()?s&&await this.submitSubscriptions():this.disconnect()}hasSubscriptionListeners(e){if(this.subscriptions=this.subscriptions||{},e)return!!this.subscriptions[e]?.length;for(let e in this.subscriptions)if(this.subscriptions[e]?.length)return!0;return!1}async submitSubscriptions(){if(this.clientId)return this.addAllSubscriptionListeners(),this.lastSentSubscriptions=this.getNonEmptySubscriptionKeys(),this.client.send("/api/realtime",{method:"POST",body:{clientId:this.clientId,subscriptions:this.lastSentSubscriptions},requestKey:this.getSubscriptionsCancelKey()}).catch((e=>{if(!e?.isAbort)throw e}))}getSubscriptionsCancelKey(){return"realtime_"+this.clientId}getSubscriptionsByTopic(e){const t={};e=e.includes("?")?e:e+"?";for(let s in this.subscriptions)(s+"?").startsWith(e)&&(t[s]=this.subscriptions[s]);return t}getNonEmptySubscriptionKeys(){const e=[];for(let t in this.subscriptions)this.subscriptions[t].length&&e.push(t);return e}addAllSubscriptionListeners(){if(this.eventSource){this.removeAllSubscriptionListeners();for(let e in this.subscriptions)for(let t of this.subscriptions[e])this.eventSource.addEventListener(e,t)}}removeAllSubscriptionListeners(){if(this.eventSource)for(let e in this.subscriptions)for(let t of this.subscriptions[e])this.eventSource.removeEventListener(e,t)}async connect(){if(!(this.reconnectAttempts>0))return new Promise(((e,t)=>{this.pendingConnects.push({resolve:e,reject:t}),this.pendingConnects.length>1||this.initConnect()}))}initConnect(){this.disconnect(!0),clearTimeout(this.connectTimeoutId),this.connectTimeoutId=setTimeout((()=>{this.connectErrorHandler(new Error("EventSource connect took too long."))}),this.maxConnectTimeout),this.eventSource=new EventSource(this.client.buildURL("/api/realtime")),this.eventSource.onerror=e=>{this.connectErrorHandler(new Error("Failed to establish realtime connection."))},this.eventSource.addEventListener("PB_CONNECT",(e=>{const t=e;this.clientId=t?.lastEventId,this.submitSubscriptions().then((async()=>{let e=3;for(;this.hasUnsentSubscriptions()&&e>0;)e--,await this.submitSubscriptions()})).then((()=>{for(let e of this.pendingConnects)e.resolve();this.pendingConnects=[],this.reconnectAttempts=0,clearTimeout(this.reconnectTimeoutId),clearTimeout(this.connectTimeoutId);const t=this.getSubscriptionsByTopic("PB_CONNECT");for(let s in t)for(let i of t[s])i(e)})).catch((e=>{this.clientId="",this.connectErrorHandler(e)}))}))}hasUnsentSubscriptions(){const e=this.getNonEmptySubscriptionKeys();if(e.length!=this.lastSentSubscriptions.length)return!0;for(const t of e)if(!this.lastSentSubscriptions.includes(t))return!0;return!1}connectErrorHandler(e){if(clearTimeout(this.connectTimeoutId),clearTimeout(this.reconnectTimeoutId),!this.clientId&&!this.reconnectAttempts||this.reconnectAttempts>this.maxReconnectAttempts){for(let t of this.pendingConnects)t.reject(new ClientResponseError(e));return this.pendingConnects=[],void this.disconnect()}this.disconnect(!0);const t=this.predefinedReconnectIntervals[this.reconnectAttempts]||this.predefinedReconnectIntervals[this.predefinedReconnectIntervals.length-1];this.reconnectAttempts++,this.reconnectTimeoutId=setTimeout((()=>{this.initConnect()}),t)}disconnect(e=!1){if(this.clientId&&this.onDisconnect&&this.onDisconnect(Object.keys(this.subscriptions)),clearTimeout(this.connectTimeoutId),clearTimeout(this.reconnectTimeoutId),this.removeAllSubscriptionListeners(),this.client.cancelRequest(this.getSubscriptionsCancelKey()),this.eventSource?.close(),this.eventSource=null,this.clientId="",!e){this.reconnectAttempts=0;for(let e of this.pendingConnects)e.resolve();this.pendingConnects=[]}}}class CrudService extends BaseService{decode(e){return e}async getFullList(e,t){if("number"==typeof e)return this._getFullList(e,t);let s=500;return(t=Object.assign({},e,t)).batch&&(s=t.batch,delete t.batch),this._getFullList(s,t)}async getList(e=1,t=30,s){return(s=Object.assign({method:"GET"},s)).query=Object.assign({page:e,perPage:t},s.query),this.client.send(this.baseCrudPath,s).then((e=>(e.items=e.items?.map((e=>this.decode(e)))||[],e)))}async getFirstListItem(e,t){return(t=Object.assign({requestKey:"one_by_filter_"+this.baseCrudPath+"_"+e},t)).query=Object.assign({filter:e,skipTotal:1},t.query),this.getList(1,1,t).then((e=>{if(!e?.items?.length)throw new ClientResponseError({status:404,response:{code:404,message:"The requested resource wasn't found.",data:{}}});return e.items[0]}))}async getOne(e,t){if(!e)throw new ClientResponseError({url:this.client.buildURL(this.baseCrudPath+"/"),status:404,response:{code:404,message:"Missing required record id.",data:{}}});return t=Object.assign({method:"GET"},t),this.client.send(this.baseCrudPath+"/"+encodeURIComponent(e),t).then((e=>this.decode(e)))}async create(e,t){return t=Object.assign({method:"POST",body:e},t),this.client.send(this.baseCrudPath,t).then((e=>this.decode(e)))}async update(e,t,s){return s=Object.assign({method:"PATCH",body:t},s),this.client.send(this.baseCrudPath+"/"+encodeURIComponent(e),s).then((e=>this.decode(e)))}async delete(e,t){return t=Object.assign({method:"DELETE"},t),this.client.send(this.baseCrudPath+"/"+encodeURIComponent(e),t).then((()=>!0))}_getFullList(e=500,t){(t=t||{}).query=Object.assign({skipTotal:1},t.query);let s=[],request=async i=>this.getList(i,e||500,t).then((e=>{const t=e.items;return s=s.concat(t),t.length==e.perPage?request(i+1):s}));return request(1)}}function normalizeLegacyOptionsArgs(e,t,s,i){const n=void 0!==i;return n||void 0!==s?n?(console.warn(e),t.body=Object.assign({},t.body,s),t.query=Object.assign({},t.query,i),t):Object.assign(t,s):t}function resetAutoRefresh(e){e._resetAutoRefresh?.()}class RecordService extends CrudService{constructor(e,t){super(e),this.collectionIdOrName=t}get baseCrudPath(){return this.baseCollectionPath+"/records"}get baseCollectionPath(){return"/api/collections/"+encodeURIComponent(this.collectionIdOrName)}get isSuperusers(){return"_superusers"==this.collectionIdOrName||"_pbc_2773867675"==this.collectionIdOrName}async subscribe(e,t,s){if(!e)throw new Error("Missing topic.");if(!t)throw new Error("Missing subscription callback.");return this.client.realtime.subscribe(this.collectionIdOrName+"/"+e,t,s)}async unsubscribe(e){return e?this.client.realtime.unsubscribe(this.collectionIdOrName+"/"+e):this.client.realtime.unsubscribeByPrefix(this.collectionIdOrName)}async getFullList(e,t){if("number"==typeof e)return super.getFullList(e,t);const s=Object.assign({},e,t);return super.getFullList(s)}async getList(e=1,t=30,s){return super.getList(e,t,s)}async getFirstListItem(e,t){return super.getFirstListItem(e,t)}async getOne(e,t){return super.getOne(e,t)}async create(e,t){return super.create(e,t)}async update(e,t,s){return super.update(e,t,s).then((e=>{if(this.client.authStore.record?.id===e?.id&&(this.client.authStore.record?.collectionId===this.collectionIdOrName||this.client.authStore.record?.collectionName===this.collectionIdOrName)){let t=Object.assign({},this.client.authStore.record.expand),s=Object.assign({},this.client.authStore.record,e);t&&(s.expand=Object.assign(t,e.expand)),this.client.authStore.save(this.client.authStore.token,s)}return e}))}async delete(e,t){return super.delete(e,t).then((t=>(!t||this.client.authStore.record?.id!==e||this.client.authStore.record?.collectionId!==this.collectionIdOrName&&this.client.authStore.record?.collectionName!==this.collectionIdOrName||this.client.authStore.clear(),t)))}authResponse(e){const t=this.decode(e?.record||{});return this.client.authStore.save(e?.token,t),Object.assign({},e,{token:e?.token||"",record:t})}async listAuthMethods(e){return e=Object.assign({method:"GET",fields:"mfa,otp,password,oauth2"},e),this.client.send(this.baseCollectionPath+"/auth-methods",e)}async authWithPassword(e,t,s){let i;s=Object.assign({method:"POST",body:{identity:e,password:t}},s),this.isSuperusers&&(i=s.autoRefreshThreshold,delete s.autoRefreshThreshold,s.autoRefresh||resetAutoRefresh(this.client));let n=await this.client.send(this.baseCollectionPath+"/auth-with-password",s);return n=this.authResponse(n),i&&this.isSuperusers&&function registerAutoRefresh(e,t,s,i){resetAutoRefresh(e);const n=e.beforeSend,r=e.authStore.record,o=e.authStore.onChange(((t,s)=>{(!t||s?.id!=r?.id||(s?.collectionId||r?.collectionId)&&s?.collectionId!=r?.collectionId)&&resetAutoRefresh(e)}));e._resetAutoRefresh=function(){o(),e.beforeSend=n,delete e._resetAutoRefresh},e.beforeSend=async(r,o)=>{const a=e.authStore.token;if(o.query?.autoRefresh)return n?n(r,o):{url:r,sendOptions:o};let c=e.authStore.isValid;if(c&&isTokenExpired(e.authStore.token,t))try{await s()}catch(e){c=!1}c||await i();const l=o.headers||{};for(let t in l)if("authorization"==t.toLowerCase()&&a==l[t]&&e.authStore.token){l[t]=e.authStore.token;break}return o.headers=l,n?n(r,o):{url:r,sendOptions:o}}}(this.client,i,(()=>this.authRefresh({autoRefresh:!0})),(()=>this.authWithPassword(e,t,Object.assign({autoRefresh:!0},s)))),n}async authWithOAuth2Code(e,t,s,i,n,r,o){let a={method:"POST",body:{provider:e,code:t,codeVerifier:s,redirectURL:i,createData:n}};return a=normalizeLegacyOptionsArgs("This form of authWithOAuth2Code(provider, code, codeVerifier, redirectURL, createData?, body?, query?) is deprecated. Consider replacing it with authWithOAuth2Code(provider, code, codeVerifier, redirectURL, createData?, options?).",a,r,o),this.client.send(this.baseCollectionPath+"/auth-with-oauth2",a).then((e=>this.authResponse(e)))}authWithOAuth2(...e){if(e.length>1||"string"==typeof e?.[0])return console.warn("PocketBase: This form of authWithOAuth2() is deprecated and may get removed in the future. Please replace with authWithOAuth2Code() OR use the authWithOAuth2() realtime form as shown in https://pocketbase.io/docs/authentication/#oauth2-integration."),this.authWithOAuth2Code(e?.[0]||"",e?.[1]||"",e?.[2]||"",e?.[3]||"",e?.[4]||{},e?.[5]||{},e?.[6]||{});const t=e?.[0]||{};let s=null;t.urlCallback||(s=openBrowserPopup(void 0));const i=new RealtimeService(this.client);function cleanup(){s?.close(),i.unsubscribe()}const n={},r=t.requestKey;return r&&(n.requestKey=r),this.listAuthMethods(n).then((e=>{const n=e.oauth2.providers.find((e=>e.name===t.provider));if(!n)throw new ClientResponseError(new Error(`Missing or invalid provider "${t.provider}".`));const o=this.client.buildURL("/api/oauth2-redirect"),a=r?this.client.cancelControllers?.[r]:void 0;return a&&(a.signal.onabort=()=>{cleanup()}),new Promise((async(e,r)=>{try{await i.subscribe("@oauth2",(async s=>{const c=i.clientId;try{if(!s.state||c!==s.state)throw new Error("State parameters don't match.");if(s.error||!s.code)throw new Error("OAuth2 redirect error or missing code: "+s.error);const i=Object.assign({},t);delete i.provider,delete i.scopes,delete i.createData,delete i.urlCallback,a?.signal?.onabort&&(a.signal.onabort=null);const r=await this.authWithOAuth2Code(n.name,s.code,n.codeVerifier,o,t.createData,i);e(r)}catch(e){r(new ClientResponseError(e))}cleanup()}));const c={state:i.clientId};t.scopes?.length&&(c.scope=t.scopes.join(" "));const l=this._replaceQueryParams(n.authURL+o,c);let h=t.urlCallback||function(e){s?s.location.href=e:s=openBrowserPopup(e)};await h(l)}catch(e){cleanup(),r(new ClientResponseError(e))}}))})).catch((e=>{throw cleanup(),e}))}async authRefresh(e,t){let s={method:"POST"};return s=normalizeLegacyOptionsArgs("This form of authRefresh(body?, query?) is deprecated. Consider replacing it with authRefresh(options?).",s,e,t),this.client.send(this.baseCollectionPath+"/auth-refresh",s).then((e=>this.authResponse(e)))}async requestPasswordReset(e,t,s){let i={method:"POST",body:{email:e}};return i=normalizeLegacyOptionsArgs("This form of requestPasswordReset(email, body?, query?) is deprecated. Consider replacing it with requestPasswordReset(email, options?).",i,t,s),this.client.send(this.baseCollectionPath+"/request-password-reset",i).then((()=>!0))}async confirmPasswordReset(e,t,s,i,n){let r={method:"POST",body:{token:e,password:t,passwordConfirm:s}};return r=normalizeLegacyOptionsArgs("This form of confirmPasswordReset(token, password, passwordConfirm, body?, query?) is deprecated. Consider replacing it with confirmPasswordReset(token, password, passwordConfirm, options?).",r,i,n),this.client.send(this.baseCollectionPath+"/confirm-password-reset",r).then((()=>!0))}async requestVerification(e,t,s){let i={method:"POST",body:{email:e}};return i=normalizeLegacyOptionsArgs("This form of requestVerification(email, body?, query?) is deprecated. Consider replacing it with requestVerification(email, options?).",i,t,s),this.client.send(this.baseCollectionPath+"/request-verification",i).then((()=>!0))}async confirmVerification(e,t,s){let i={method:"POST",body:{token:e}};return i=normalizeLegacyOptionsArgs("This form of confirmVerification(token, body?, query?) is deprecated. Consider replacing it with confirmVerification(token, options?).",i,t,s),this.client.send(this.baseCollectionPath+"/confirm-verification",i).then((()=>{const t=getTokenPayload(e),s=this.client.authStore.record;return s&&!s.verified&&s.id===t.id&&s.collectionId===t.collectionId&&(s.verified=!0,this.client.authStore.save(this.client.authStore.token,s)),!0}))}async requestEmailChange(e,t,s){let i={method:"POST",body:{newEmail:e}};return i=normalizeLegacyOptionsArgs("This form of requestEmailChange(newEmail, body?, query?) is deprecated. Consider replacing it with requestEmailChange(newEmail, options?).",i,t,s),this.client.send(this.baseCollectionPath+"/request-email-change",i).then((()=>!0))}async confirmEmailChange(e,t,s,i){let n={method:"POST",body:{token:e,password:t}};return n=normalizeLegacyOptionsArgs("This form of confirmEmailChange(token, password, body?, query?) is deprecated. Consider replacing it with confirmEmailChange(token, password, options?).",n,s,i),this.client.send(this.baseCollectionPath+"/confirm-email-change",n).then((()=>{const t=getTokenPayload(e),s=this.client.authStore.record;return s&&s.id===t.id&&s.collectionId===t.collectionId&&this.client.authStore.clear(),!0}))}async listExternalAuths(e,t){return this.client.collection("_externalAuths").getFullList(Object.assign({},t,{filter:this.client.filter("recordRef = {:id}",{id:e})}))}async unlinkExternalAuth(e,t,s){const i=await this.client.collection("_externalAuths").getFirstListItem(this.client.filter("recordRef = {:recordId} && provider = {:provider}",{recordId:e,provider:t}));return this.client.collection("_externalAuths").delete(i.id,s).then((()=>!0))}async requestOTP(e,t){return t=Object.assign({method:"POST",body:{email:e}},t),this.client.send(this.baseCollectionPath+"/request-otp",t)}async authWithOTP(e,t,s){return s=Object.assign({method:"POST",body:{otpId:e,password:t}},s),this.client.send(this.baseCollectionPath+"/auth-with-otp",s).then((e=>this.authResponse(e)))}async impersonate(e,t,s){(s=Object.assign({method:"POST",body:{duration:t}},s)).headers=s.headers||{},s.headers.Authorization||(s.headers.Authorization=this.client.authStore.token);const i=new Client(this.client.baseURL,new BaseAuthStore,this.client.lang),n=await i.send(this.baseCollectionPath+"/impersonate/"+encodeURIComponent(e),s);return i.authStore.save(n?.token,this.decode(n?.record||{})),i}_replaceQueryParams(e,t={}){let s=e,i="";e.indexOf("?")>=0&&(s=e.substring(0,e.indexOf("?")),i=e.substring(e.indexOf("?")+1));const n={},r=i.split("&");for(const e of r){if(""==e)continue;const t=e.split("=");n[decodeURIComponent(t[0].replace(/\+/g," "))]=decodeURIComponent((t[1]||"").replace(/\+/g," "))}for(let e in t)t.hasOwnProperty(e)&&(null==t[e]?delete n[e]:n[e]=t[e]);i="";for(let e in n)n.hasOwnProperty(e)&&(""!=i&&(i+="&"),i+=encodeURIComponent(e.replace(/%20/g,"+"))+"="+encodeURIComponent(n[e].replace(/%20/g,"+")));return""!=i?s+"?"+i:s}}function openBrowserPopup(e){if("undefined"==typeof window||!window?.open)throw new ClientResponseError(new Error("Not in a browser context - please pass a custom urlCallback function."));let t=1024,s=768,i=window.innerWidth,n=window.innerHeight;t=t>i?i:t,s=s>n?n:s;let r=i/2-t/2,o=n/2-s/2;return window.open(e,"popup_window","width="+t+",height="+s+",top="+o+",left="+r+",resizable,menubar=no")}class CollectionService extends CrudService{get baseCrudPath(){return"/api/collections"}async import(e,t=!1,s){return s=Object.assign({method:"PUT",body:{collections:e,deleteMissing:t}},s),this.client.send(this.baseCrudPath+"/import",s).then((()=>!0))}async getScaffolds(e){return e=Object.assign({method:"GET"},e),this.client.send(this.baseCrudPath+"/meta/scaffolds",e)}async truncate(e,t){return t=Object.assign({method:"DELETE"},t),this.client.send(this.baseCrudPath+"/"+encodeURIComponent(e)+"/truncate",t).then((()=>!0))}}class LogService extends BaseService{async getList(e=1,t=30,s){return(s=Object.assign({method:"GET"},s)).query=Object.assign({page:e,perPage:t},s.query),this.client.send("/api/logs",s)}async getOne(e,t){if(!e)throw new ClientResponseError({url:this.client.buildURL("/api/logs/"),status:404,response:{code:404,message:"Missing required log id.",data:{}}});return t=Object.assign({method:"GET"},t),this.client.send("/api/logs/"+encodeURIComponent(e),t)}async getStats(e){return e=Object.assign({method:"GET"},e),this.client.send("/api/logs/stats",e)}}class HealthService extends BaseService{async check(e){return e=Object.assign({method:"GET"},e),this.client.send("/api/health",e)}}class FileService extends BaseService{getUrl(e,t,s={}){return console.warn("Please replace pb.files.getUrl() with pb.files.getURL()"),this.getURL(e,t,s)}getURL(e,t,s={}){if(!t||!e?.id||!e?.collectionId&&!e?.collectionName)return"";const i=[];i.push("api"),i.push("files"),i.push(encodeURIComponent(e.collectionId||e.collectionName)),i.push(encodeURIComponent(e.id)),i.push(encodeURIComponent(t));let n=this.client.buildURL(i.join("/"));if(Object.keys(s).length){!1===s.download&&delete s.download;const e=new URLSearchParams(s);n+=(n.includes("?")?"&":"?")+e}return n}async getToken(e){return e=Object.assign({method:"POST"},e),this.client.send("/api/files/token",e).then((e=>e?.token||""))}}class BackupService extends BaseService{async getFullList(e){return e=Object.assign({method:"GET"},e),this.client.send("/api/backups",e)}async create(e,t){return t=Object.assign({method:"POST",body:{name:e}},t),this.client.send("/api/backups",t).then((()=>!0))}async upload(e,t){return t=Object.assign({method:"POST",body:e},t),this.client.send("/api/backups/upload",t).then((()=>!0))}async delete(e,t){return t=Object.assign({method:"DELETE"},t),this.client.send(`/api/backups/${encodeURIComponent(e)}`,t).then((()=>!0))}async restore(e,t){return t=Object.assign({method:"POST"},t),this.client.send(`/api/backups/${encodeURIComponent(e)}/restore`,t).then((()=>!0))}getDownloadUrl(e,t){return console.warn("Please replace pb.backups.getDownloadUrl() with pb.backups.getDownloadURL()"),this.getDownloadURL(e,t)}getDownloadURL(e,t){return this.client.buildURL(`/api/backups/${encodeURIComponent(t)}?token=${encodeURIComponent(e)}`)}}class CronService extends BaseService{async getFullList(e){return e=Object.assign({method:"GET"},e),this.client.send("/api/crons",e)}async run(e,t){return t=Object.assign({method:"POST"},t),this.client.send(`/api/crons/${encodeURIComponent(e)}`,t).then((()=>!0))}}function isFile(e){return"undefined"!=typeof Blob&&e instanceof Blob||"undefined"!=typeof File&&e instanceof File||null!==e&&"object"==typeof e&&e.uri&&("undefined"!=typeof navigator&&"ReactNative"===navigator.product||"undefined"!=typeof global&&global.HermesInternal)}function isFormData(e){return e&&("FormData"===e.constructor?.name||"undefined"!=typeof FormData&&e instanceof FormData)}function hasFileField(e){for(const t in e){const s=Array.isArray(e[t])?e[t]:[e[t]];for(const e of s)if(isFile(e))return!0}return!1}const r=/^[\-\.\d]+$/;function inferFormDataValue(e){if("string"!=typeof e)return e;if("true"==e)return!0;if("false"==e)return!1;if(("-"===e[0]||e[0]>="0"&&e[0]<="9")&&r.test(e)){let t=+e;if(""+t===e)return t}return e}class BatchService extends BaseService{constructor(){super(...arguments),this.requests=[],this.subs={}}collection(e){return this.subs[e]||(this.subs[e]=new SubBatchService(this.requests,e)),this.subs[e]}async send(e){const t=new FormData,s=[];for(let e=0;e{if("@jsonPayload"===s&&"string"==typeof e)try{let s=JSON.parse(e);Object.assign(t,s)}catch(e){console.warn("@jsonPayload error:",e)}else void 0!==t[s]?(Array.isArray(t[s])||(t[s]=[t[s]]),t[s].push(inferFormDataValue(e))):t[s]=inferFormDataValue(e)})),t}(s));for(const t in s){const i=s[t];if(isFile(i))e.files[t]=e.files[t]||[],e.files[t].push(i);else if(Array.isArray(i)){const s=[],n=[];for(const e of i)isFile(e)?s.push(e):n.push(e);if(s.length>0&&s.length==i.length){e.files[t]=e.files[t]||[];for(let i of s)e.files[t].push(i)}else if(e.json[t]=n,s.length>0){let i=t;t.startsWith("+")||t.endsWith("+")||(i+="+"),e.files[i]=e.files[i]||[];for(let t of s)e.files[i].push(t)}}else e.json[t]=i}}}class Client{get baseUrl(){return this.baseURL}set baseUrl(e){this.baseURL=e}constructor(e="/",t,s="en-US"){this.cancelControllers={},this.recordServices={},this.enableAutoCancellation=!0,this.baseURL=e,this.lang=s,t?this.authStore=t:"undefined"!=typeof window&&window.Deno?this.authStore=new BaseAuthStore:this.authStore=new LocalAuthStore,this.collections=new CollectionService(this),this.files=new FileService(this),this.logs=new LogService(this),this.settings=new SettingsService(this),this.realtime=new RealtimeService(this),this.health=new HealthService(this),this.backups=new BackupService(this),this.crons=new CronService(this)}get admins(){return this.collection("_superusers")}createBatch(){return new BatchService(this)}collection(e){return this.recordServices[e]||(this.recordServices[e]=new RecordService(this,e)),this.recordServices[e]}autoCancellation(e){return this.enableAutoCancellation=!!e,this}cancelRequest(e){return this.cancelControllers[e]&&(this.cancelControllers[e].abort(),delete this.cancelControllers[e]),this}cancelAllRequests(){for(let e in this.cancelControllers)this.cancelControllers[e].abort();return this.cancelControllers={},this}filter(e,t){if(!t)return e;for(let s in t){let i=t[s];switch(typeof i){case"boolean":case"number":i=""+i;break;case"string":i="'"+i.replace(/'/g,"\\'")+"'";break;default:i=null===i?"null":i instanceof Date?"'"+i.toISOString().replace("T"," ")+"'":"'"+JSON.stringify(i).replace(/'/g,"\\'")+"'"}e=e.replaceAll("{:"+s+"}",i)}return e}getFileUrl(e,t,s={}){return console.warn("Please replace pb.getFileUrl() with pb.files.getURL()"),this.files.getURL(e,t,s)}buildUrl(e){return console.warn("Please replace pb.buildUrl() with pb.buildURL()"),this.buildURL(e)}buildURL(e){let t=this.baseURL;return"undefined"==typeof window||!window.location||t.startsWith("https://")||t.startsWith("http://")||(t=window.location.origin?.endsWith("/")?window.location.origin.substring(0,window.location.origin.length-1):window.location.origin||"",this.baseURL.startsWith("/")||(t+=window.location.pathname||"/",t+=t.endsWith("/")?"":"/"),t+=this.baseURL),e&&(t+=t.endsWith("/")?"":"/",t+=e.startsWith("/")?e.substring(1):e),t}async send(e,t){t=this.initSendOptions(e,t);let s=this.buildURL(e);if(this.beforeSend){const e=Object.assign({},await this.beforeSend(s,t));void 0!==e.url||void 0!==e.options?(s=e.url||s,t=e.options||t):Object.keys(e).length&&(t=e,console?.warn&&console.warn("Deprecated format of beforeSend return: please use `return { url, options }`, instead of `return options`."))}if(void 0!==t.query){const e=serializeQueryParams(t.query);e&&(s+=(s.includes("?")?"&":"?")+e),delete t.query}"application/json"==this.getHeader(t.headers,"Content-Type")&&t.body&&"string"!=typeof t.body&&(t.body=JSON.stringify(t.body));return(t.fetch||fetch)(s,t).then((async e=>{let s={};try{s=await e.json()}catch(e){if(t.signal?.aborted||"undefined"!=typeof DOMException&&e instanceof DOMException&&("AbortError"==e.name||20==e.code))throw e}if(this.afterSend&&(s=await this.afterSend(e,s,t)),e.status>=400)throw new ClientResponseError({url:e.url,status:e.status,data:s});return s})).catch((e=>{throw new ClientResponseError(e)}))}initSendOptions(e,t){if((t=Object.assign({method:"GET"},t)).body=function convertToFormDataIfNeeded(e){if("undefined"==typeof FormData||void 0===e||"object"!=typeof e||null===e||isFormData(e)||!hasFileField(e))return e;const t=new FormData;for(const s in e){const i=e[s];if(void 0!==i)if("object"!=typeof i||hasFileField({data:i})){const e=Array.isArray(i)?i:[i];for(let i of e)t.append(s,i)}else{let e={};e[s]=i,t.append("@jsonPayload",JSON.stringify(e))}}return t}(t.body),normalizeUnknownQueryParams(t),t.query=Object.assign({},t.params,t.query),void 0===t.requestKey&&(!1===t.$autoCancel||!1===t.query.$autoCancel?t.requestKey=null:(t.$cancelKey||t.query.$cancelKey)&&(t.requestKey=t.$cancelKey||t.query.$cancelKey)),delete t.$autoCancel,delete t.query.$autoCancel,delete t.$cancelKey,delete t.query.$cancelKey,null!==this.getHeader(t.headers,"Content-Type")||isFormData(t.body)||(t.headers=Object.assign({},t.headers,{"Content-Type":"application/json"})),null===this.getHeader(t.headers,"Accept-Language")&&(t.headers=Object.assign({},t.headers,{"Accept-Language":this.lang})),this.authStore.token&&null===this.getHeader(t.headers,"Authorization")&&(t.headers=Object.assign({},t.headers,{Authorization:this.authStore.token})),this.enableAutoCancellation&&null!==t.requestKey){const s=t.requestKey||(t.method||"GET")+e;delete t.requestKey,this.cancelRequest(s);const i=new AbortController;this.cancelControllers[s]=i,t.signal=i.signal}return t}getHeader(e,t){e=e||{},t=t.toLowerCase();for(let s in e)if(s.toLowerCase()==t)return e[s];return null}}class AsyncAuthStore extends BaseAuthStore{constructor(e){super(),this.queue=[],this.saveFunc=e.save,this.clearFunc=e.clear,this._enqueue((()=>this._loadInitial(e.initial)))}save(e,t){super.save(e,t);let s="";try{s=JSON.stringify({token:e,record:t})}catch(e){console.warn("AsyncAuthStore: failed to stringify the new state")}this._enqueue((()=>this.saveFunc(s)))}clear(){super.clear(),this.clearFunc?this._enqueue((()=>this.clearFunc())):this._enqueue((()=>this.saveFunc("")))}async _loadInitial(e){try{if(e=await e){let t;"string"==typeof e?t=JSON.parse(e)||{}:"object"==typeof e&&(t=e),this.save(t.token||"",t.record||t.model||null)}}catch(e){}}_enqueue(e){this.queue.push(e),1==this.queue.length&&this._dequeue()}_dequeue(){this.queue.length&&this.queue[0]().finally((()=>{this.queue.shift(),this.queue.length&&this._dequeue()}))}}export{AsyncAuthStore,BaseAuthStore,BatchService,ClientResponseError,CollectionService,CrudService,HealthService,LocalAuthStore,LogService,RealtimeService,RecordService,SubBatchService,cookieParse,cookieSerialize,Client as default,getTokenPayload,isTokenExpired,normalizeUnknownQueryParams,serializeQueryParams}; -//# sourceMappingURL=pocketbase.es.mjs.map diff --git a/PBandGraphScaffold/node_modules/pocketbase/dist/pocketbase.es.mjs.map b/PBandGraphScaffold/node_modules/pocketbase/dist/pocketbase.es.mjs.map deleted file mode 100644 index 7c937bd..0000000 --- a/PBandGraphScaffold/node_modules/pocketbase/dist/pocketbase.es.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"pocketbase.es.mjs","sources":["../src/ClientResponseError.ts","../src/tools/cookie.ts","../src/tools/jwt.ts","../src/stores/BaseAuthStore.ts","../src/stores/LocalAuthStore.ts","../src/services/BaseService.ts","../src/services/SettingsService.ts","../src/tools/options.ts","../src/services/RealtimeService.ts","../src/services/CrudService.ts","../src/tools/legacy.ts","../src/tools/refresh.ts","../src/services/RecordService.ts","../src/services/CollectionService.ts","../src/services/LogService.ts","../src/services/HealthService.ts","../src/services/FileService.ts","../src/services/BackupService.ts","../src/services/CronService.ts","../src/tools/formdata.ts","../src/services/BatchService.ts","../src/Client.ts","../src/stores/AsyncAuthStore.ts"],"sourcesContent":["/**\n * ClientResponseError is a custom Error class that is intended to wrap\n * and normalize any error thrown by `Client.send()`.\n */\nexport class ClientResponseError extends Error {\n url: string = \"\";\n status: number = 0;\n response: { [key: string]: any } = {};\n isAbort: boolean = false;\n originalError: any = null;\n\n constructor(errData?: any) {\n super(\"ClientResponseError\");\n\n // Set the prototype explicitly.\n // https://github.com/Microsoft/TypeScript-wiki/blob/main/Breaking-Changes.md#extending-built-ins-like-error-array-and-map-may-no-longer-work\n Object.setPrototypeOf(this, ClientResponseError.prototype);\n\n if (errData !== null && typeof errData === \"object\") {\n this.url = typeof errData.url === \"string\" ? errData.url : \"\";\n this.status = typeof errData.status === \"number\" ? errData.status : 0;\n this.isAbort = !!errData.isAbort;\n this.originalError = errData.originalError;\n\n if (errData.response !== null && typeof errData.response === \"object\") {\n this.response = errData.response;\n } else if (errData.data !== null && typeof errData.data === \"object\") {\n this.response = errData.data;\n } else {\n this.response = {};\n }\n }\n\n if (!this.originalError && !(errData instanceof ClientResponseError)) {\n this.originalError = errData;\n }\n\n if (\n typeof DOMException !== \"undefined\" &&\n errData instanceof DOMException &&\n // https://developer.mozilla.org/en-US/docs/Web/API/DOMException#aborterror\n (errData.name == \"AbortError\" || errData.code == 20)\n ) {\n this.isAbort = true;\n }\n\n this.name = \"ClientResponseError \" + this.status;\n this.message = this.response?.message;\n if (!this.message) {\n if (this.isAbort) {\n this.message =\n \"The request was autocancelled. You can find more info in https://github.com/pocketbase/js-sdk#auto-cancellation.\";\n } else if (this.originalError?.cause?.message?.includes(\"ECONNREFUSED ::1\")) {\n this.message =\n \"Failed to connect to the PocketBase server. Try changing the SDK URL from localhost to 127.0.0.1 (https://github.com/pocketbase/js-sdk/issues/21).\";\n } else {\n this.message = \"Something went wrong.\";\n }\n }\n\n // set this.cause so that JS debugging tools can automatically connect\n // the dots between the original error and the wrapped one\n this.cause = this.originalError;\n }\n\n /**\n * Alias for `this.response` for backward compatibility.\n */\n get data() {\n return this.response;\n }\n\n /**\n * Make a POJO's copy of the current error class instance.\n * @see https://github.com/vuex-orm/vuex-orm/issues/255\n */\n toJSON() {\n return { ...this };\n }\n}\n","/**\n * -------------------------------------------------------------------\n * Simple cookie parse and serialize utilities mostly based on the\n * node module https://github.com/jshttp/cookie.\n * -------------------------------------------------------------------\n */\n\n/**\n * RegExp to match field-content in RFC 7230 sec 3.2\n *\n * field-content = field-vchar [ 1*( SP / HTAB ) field-vchar ]\n * field-vchar = VCHAR / obs-text\n * obs-text = %x80-FF\n */\nconst fieldContentRegExp = /^[\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+$/;\n\nexport interface ParseOptions {\n decode?: (val: string) => string;\n}\n\n/**\n * Parses the given cookie header string into an object\n * The object has the various cookies as keys(names) => values\n */\nexport function cookieParse(str: string, options?: ParseOptions): { [key: string]: any } {\n const result: { [key: string]: any } = {};\n\n if (typeof str !== \"string\") {\n return result;\n }\n\n const opt = Object.assign({}, options || {});\n const decode = opt.decode || defaultDecode;\n\n let index = 0;\n while (index < str.length) {\n const eqIdx = str.indexOf(\"=\", index);\n\n // no more cookie pairs\n if (eqIdx === -1) {\n break;\n }\n\n let endIdx = str.indexOf(\";\", index);\n\n if (endIdx === -1) {\n endIdx = str.length;\n } else if (endIdx < eqIdx) {\n // backtrack on prior semicolon\n index = str.lastIndexOf(\";\", eqIdx - 1) + 1;\n continue;\n }\n\n const key = str.slice(index, eqIdx).trim();\n\n // only assign once\n if (undefined === result[key]) {\n let val = str.slice(eqIdx + 1, endIdx).trim();\n\n // quoted values\n if (val.charCodeAt(0) === 0x22) {\n val = val.slice(1, -1);\n }\n\n try {\n result[key] = decode(val);\n } catch (_) {\n result[key] = val; // no decoding\n }\n }\n\n index = endIdx + 1;\n }\n\n return result;\n}\n\nexport interface SerializeOptions {\n encode?: (val: string | number | boolean) => string;\n maxAge?: number;\n domain?: string;\n path?: string;\n expires?: Date;\n httpOnly?: boolean;\n secure?: boolean;\n priority?: string;\n sameSite?: boolean | string;\n}\n\n/**\n * Serialize data into a cookie header.\n *\n * Serialize the a name value pair into a cookie string suitable for\n * http headers. An optional options object specified cookie parameters.\n *\n * ```js\n * cookieSerialize('foo', 'bar', { httpOnly: true }) // \"foo=bar; httpOnly\"\n * ```\n */\nexport function cookieSerialize(\n name: string,\n val: string,\n options?: SerializeOptions,\n): string {\n const opt = Object.assign({}, options || {});\n const encode = opt.encode || defaultEncode;\n\n if (!fieldContentRegExp.test(name)) {\n throw new TypeError(\"argument name is invalid\");\n }\n\n const value = encode(val);\n\n if (value && !fieldContentRegExp.test(value)) {\n throw new TypeError(\"argument val is invalid\");\n }\n\n let result = name + \"=\" + value;\n\n if (opt.maxAge != null) {\n const maxAge = opt.maxAge - 0;\n\n if (isNaN(maxAge) || !isFinite(maxAge)) {\n throw new TypeError(\"option maxAge is invalid\");\n }\n\n result += \"; Max-Age=\" + Math.floor(maxAge);\n }\n\n if (opt.domain) {\n if (!fieldContentRegExp.test(opt.domain)) {\n throw new TypeError(\"option domain is invalid\");\n }\n\n result += \"; Domain=\" + opt.domain;\n }\n\n if (opt.path) {\n if (!fieldContentRegExp.test(opt.path)) {\n throw new TypeError(\"option path is invalid\");\n }\n\n result += \"; Path=\" + opt.path;\n }\n\n if (opt.expires) {\n if (!isDate(opt.expires) || isNaN(opt.expires.valueOf())) {\n throw new TypeError(\"option expires is invalid\");\n }\n\n result += \"; Expires=\" + opt.expires.toUTCString();\n }\n\n if (opt.httpOnly) {\n result += \"; HttpOnly\";\n }\n\n if (opt.secure) {\n result += \"; Secure\";\n }\n\n if (opt.priority) {\n const priority =\n typeof opt.priority === \"string\" ? opt.priority.toLowerCase() : opt.priority;\n\n switch (priority) {\n case \"low\":\n result += \"; Priority=Low\";\n break;\n case \"medium\":\n result += \"; Priority=Medium\";\n break;\n case \"high\":\n result += \"; Priority=High\";\n break;\n default:\n throw new TypeError(\"option priority is invalid\");\n }\n }\n\n if (opt.sameSite) {\n const sameSite =\n typeof opt.sameSite === \"string\" ? opt.sameSite.toLowerCase() : opt.sameSite;\n\n switch (sameSite) {\n case true:\n result += \"; SameSite=Strict\";\n break;\n case \"lax\":\n result += \"; SameSite=Lax\";\n break;\n case \"strict\":\n result += \"; SameSite=Strict\";\n break;\n case \"none\":\n result += \"; SameSite=None\";\n break;\n default:\n throw new TypeError(\"option sameSite is invalid\");\n }\n }\n\n return result;\n}\n\n/**\n * Default URL-decode string value function.\n * Optimized to skip native call when no `%`.\n */\nfunction defaultDecode(val: string): string {\n return val.indexOf(\"%\") !== -1 ? decodeURIComponent(val) : val;\n}\n\n/**\n * Default URL-encode value function.\n */\nfunction defaultEncode(val: string | number | boolean): string {\n return encodeURIComponent(val);\n}\n\n/**\n * Determines if value is a Date.\n */\nfunction isDate(val: any): boolean {\n return Object.prototype.toString.call(val) === \"[object Date]\" || val instanceof Date;\n}\n","// @todo remove after https://github.com/reactwg/react-native-releases/issues/287\nconst isReactNative =\n (typeof navigator !== \"undefined\" && navigator.product === \"ReactNative\") ||\n (typeof global !== \"undefined\" && (global as any).HermesInternal);\n\nlet atobPolyfill: Function;\nif (typeof atob === \"function\" && !isReactNative) {\n atobPolyfill = atob;\n} else {\n /**\n * The code was extracted from:\n * https://github.com/davidchambers/Base64.js\n */\n atobPolyfill = (input: any) => {\n const chars = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\";\n\n let str = String(input).replace(/=+$/, \"\");\n if (str.length % 4 == 1) {\n throw new Error(\n \"'atob' failed: The string to be decoded is not correctly encoded.\",\n );\n }\n\n for (\n // initialize result and counters\n var bc = 0, bs, buffer, idx = 0, output = \"\";\n // get next character\n (buffer = str.charAt(idx++));\n // character found in table? initialize bit storage and add its ascii value;\n ~buffer &&\n ((bs = bc % 4 ? (bs as any) * 64 + buffer : buffer),\n // and if not first of each 4 characters,\n // convert the first 8 bits to one ascii character\n bc++ % 4)\n ? (output += String.fromCharCode(255 & (bs >> ((-2 * bc) & 6))))\n : 0\n ) {\n // try to find character in table (0-63, not found => -1)\n buffer = chars.indexOf(buffer);\n }\n\n return output;\n };\n}\n\n/**\n * Returns JWT token's payload data.\n */\nexport function getTokenPayload(token: string): { [key: string]: any } {\n if (token) {\n try {\n const encodedPayload = decodeURIComponent(\n atobPolyfill(token.split(\".\")[1])\n .split(\"\")\n .map(function (c: string) {\n return \"%\" + (\"00\" + c.charCodeAt(0).toString(16)).slice(-2);\n })\n .join(\"\"),\n );\n\n return JSON.parse(encodedPayload) || {};\n } catch (e) {}\n }\n\n return {};\n}\n\n/**\n * Checks whether a JWT token is expired or not.\n * Tokens without `exp` payload key are considered valid.\n * Tokens with empty payload (eg. invalid token strings) are considered expired.\n *\n * @param token The token to check.\n * @param [expirationThreshold] Time in seconds that will be subtracted from the token `exp` property.\n */\nexport function isTokenExpired(token: string, expirationThreshold = 0): boolean {\n let payload = getTokenPayload(token);\n\n if (\n Object.keys(payload).length > 0 &&\n (!payload.exp || payload.exp - expirationThreshold > Date.now() / 1000)\n ) {\n return false;\n }\n\n return true;\n}\n","import { cookieParse, cookieSerialize, SerializeOptions } from \"@/tools/cookie\";\nimport { isTokenExpired, getTokenPayload } from \"@/tools/jwt\";\nimport { RecordModel } from \"@/tools/dtos\";\n\nexport type AuthRecord = RecordModel | null;\n\nexport type AuthModel = AuthRecord; // for backward compatibility\n\nexport type OnStoreChangeFunc = (token: string, record: AuthRecord) => void;\n\nconst defaultCookieKey = \"pb_auth\";\n\n/**\n * Base AuthStore class that stores the auth state in runtime memory (aka. only for the duration of the store instane).\n *\n * Usually you wouldn't use it directly and instead use the builtin LocalAuthStore, AsyncAuthStore\n * or extend it with your own custom implementation.\n */\nexport class BaseAuthStore {\n protected baseToken: string = \"\";\n protected baseModel: AuthRecord = null;\n\n private _onChangeCallbacks: Array = [];\n\n /**\n * Retrieves the stored token (if any).\n */\n get token(): string {\n return this.baseToken;\n }\n\n /**\n * Retrieves the stored model data (if any).\n */\n get record(): AuthRecord {\n return this.baseModel;\n }\n\n /**\n * @deprecated use `record` instead.\n */\n get model(): AuthRecord {\n return this.baseModel;\n }\n\n /**\n * Loosely checks if the store has valid token (aka. existing and unexpired exp claim).\n */\n get isValid(): boolean {\n return !isTokenExpired(this.token);\n }\n\n /**\n * Loosely checks whether the currently loaded store state is for superuser.\n *\n * Alternatively you can also compare directly `pb.authStore.record?.collectionName`.\n */\n get isSuperuser(): boolean {\n let payload = getTokenPayload(this.token);\n\n return (\n payload.type == \"auth\" &&\n (this.record?.collectionName == \"_superusers\" ||\n // fallback in case the record field is not populated and assuming\n // that the collection crc32 checksum id wasn't manually changed\n (!this.record?.collectionName &&\n payload.collectionId == \"pbc_3142635823\"))\n );\n }\n\n /**\n * @deprecated use `isSuperuser` instead or simply check the record.collectionName property.\n */\n get isAdmin(): boolean {\n console.warn(\n \"Please replace pb.authStore.isAdmin with pb.authStore.isSuperuser OR simply check the value of pb.authStore.record?.collectionName\",\n );\n return this.isSuperuser;\n }\n\n /**\n * @deprecated use `!isSuperuser` instead or simply check the record.collectionName property.\n */\n get isAuthRecord(): boolean {\n console.warn(\n \"Please replace pb.authStore.isAuthRecord with !pb.authStore.isSuperuser OR simply check the value of pb.authStore.record?.collectionName\",\n );\n return getTokenPayload(this.token).type == \"auth\" && !this.isSuperuser;\n }\n\n /**\n * Saves the provided new token and model data in the auth store.\n */\n save(token: string, record?: AuthRecord): void {\n this.baseToken = token || \"\";\n this.baseModel = record || null;\n\n this.triggerChange();\n }\n\n /**\n * Removes the stored token and model data form the auth store.\n */\n clear(): void {\n this.baseToken = \"\";\n this.baseModel = null;\n this.triggerChange();\n }\n\n /**\n * Parses the provided cookie string and updates the store state\n * with the cookie's token and model data.\n *\n * NB! This function doesn't validate the token or its data.\n * Usually this isn't a concern if you are interacting only with the\n * PocketBase API because it has the proper server-side security checks in place,\n * but if you are using the store `isValid` state for permission controls\n * in a node server (eg. SSR), then it is recommended to call `authRefresh()`\n * after loading the cookie to ensure an up-to-date token and model state.\n * For example:\n *\n * ```js\n * pb.authStore.loadFromCookie(\"cookie string...\");\n *\n * try {\n * // get an up-to-date auth store state by veryfing and refreshing the loaded auth model (if any)\n * pb.authStore.isValid && await pb.collection('users').authRefresh();\n * } catch (_) {\n * // clear the auth store on failed refresh\n * pb.authStore.clear();\n * }\n * ```\n */\n loadFromCookie(cookie: string, key = defaultCookieKey): void {\n const rawData = cookieParse(cookie || \"\")[key] || \"\";\n\n let data: { [key: string]: any } = {};\n try {\n data = JSON.parse(rawData);\n // normalize\n if (typeof data === null || typeof data !== \"object\" || Array.isArray(data)) {\n data = {};\n }\n } catch (_) {}\n\n this.save(data.token || \"\", data.record || data.model || null);\n }\n\n /**\n * Exports the current store state as cookie string.\n *\n * By default the following optional attributes are added:\n * - Secure\n * - HttpOnly\n * - SameSite=Strict\n * - Path=/\n * - Expires={the token expiration date}\n *\n * NB! If the generated cookie exceeds 4096 bytes, this method will\n * strip the model data to the bare minimum to try to fit within the\n * recommended size in https://www.rfc-editor.org/rfc/rfc6265#section-6.1.\n */\n exportToCookie(options?: SerializeOptions, key = defaultCookieKey): string {\n const defaultOptions: SerializeOptions = {\n secure: true,\n sameSite: true,\n httpOnly: true,\n path: \"/\",\n };\n\n // extract the token expiration date\n const payload = getTokenPayload(this.token);\n if (payload?.exp) {\n defaultOptions.expires = new Date(payload.exp * 1000);\n } else {\n defaultOptions.expires = new Date(\"1970-01-01\");\n }\n\n // merge with the user defined options\n options = Object.assign({}, defaultOptions, options);\n\n const rawData = {\n token: this.token,\n record: this.record ? JSON.parse(JSON.stringify(this.record)) : null,\n };\n\n let result = cookieSerialize(key, JSON.stringify(rawData), options);\n\n const resultLength =\n typeof Blob !== \"undefined\" ? new Blob([result]).size : result.length;\n\n // strip down the model data to the bare minimum\n if (rawData.record && resultLength > 4096) {\n rawData.record = { id: rawData.record?.id, email: rawData.record?.email };\n const extraProps = [\"collectionId\", \"collectionName\", \"verified\"];\n for (const prop in this.record) {\n if (extraProps.includes(prop)) {\n rawData.record[prop] = this.record[prop];\n }\n }\n result = cookieSerialize(key, JSON.stringify(rawData), options);\n }\n\n return result;\n }\n\n /**\n * Register a callback function that will be called on store change.\n *\n * You can set the `fireImmediately` argument to true in order to invoke\n * the provided callback right after registration.\n *\n * Returns a removal function that you could call to \"unsubscribe\" from the changes.\n */\n onChange(callback: OnStoreChangeFunc, fireImmediately = false): () => void {\n this._onChangeCallbacks.push(callback);\n\n if (fireImmediately) {\n callback(this.token, this.record);\n }\n\n return () => {\n for (let i = this._onChangeCallbacks.length - 1; i >= 0; i--) {\n if (this._onChangeCallbacks[i] == callback) {\n delete this._onChangeCallbacks[i]; // removes the function reference\n this._onChangeCallbacks.splice(i, 1); // reindex the array\n return;\n }\n }\n };\n }\n\n protected triggerChange(): void {\n for (const callback of this._onChangeCallbacks) {\n callback && callback(this.token, this.record);\n }\n }\n}\n","import { BaseAuthStore, AuthRecord } from \"@/stores/BaseAuthStore\";\n\n/**\n * The default token store for browsers with auto fallback\n * to runtime/memory if local storage is undefined (e.g. in node env).\n */\nexport class LocalAuthStore extends BaseAuthStore {\n private storageFallback: { [key: string]: any } = {};\n private storageKey: string;\n\n constructor(storageKey = \"pocketbase_auth\") {\n super();\n\n this.storageKey = storageKey;\n\n this._bindStorageEvent();\n }\n\n /**\n * @inheritdoc\n */\n get token(): string {\n const data = this._storageGet(this.storageKey) || {};\n\n return data.token || \"\";\n }\n\n /**\n * @inheritdoc\n */\n get record(): AuthRecord {\n const data = this._storageGet(this.storageKey) || {};\n\n return data.record || data.model || null;\n }\n\n /**\n * @deprecated use `record` instead.\n */\n get model(): AuthRecord {\n return this.record;\n }\n\n /**\n * @inheritdoc\n */\n save(token: string, record?: AuthRecord) {\n this._storageSet(this.storageKey, {\n token: token,\n record: record,\n });\n\n super.save(token, record);\n }\n\n /**\n * @inheritdoc\n */\n clear() {\n this._storageRemove(this.storageKey);\n\n super.clear();\n }\n\n // ---------------------------------------------------------------\n // Internal helpers:\n // ---------------------------------------------------------------\n\n /**\n * Retrieves `key` from the browser's local storage\n * (or runtime/memory if local storage is undefined).\n */\n private _storageGet(key: string): any {\n if (typeof window !== \"undefined\" && window?.localStorage) {\n const rawValue = window.localStorage.getItem(key) || \"\";\n try {\n return JSON.parse(rawValue);\n } catch (e) {\n // not a json\n return rawValue;\n }\n }\n\n // fallback\n return this.storageFallback[key];\n }\n\n /**\n * Stores a new data in the browser's local storage\n * (or runtime/memory if local storage is undefined).\n */\n private _storageSet(key: string, value: any) {\n if (typeof window !== \"undefined\" && window?.localStorage) {\n // store in local storage\n let normalizedVal = value;\n if (typeof value !== \"string\") {\n normalizedVal = JSON.stringify(value);\n }\n window.localStorage.setItem(key, normalizedVal);\n } else {\n // store in fallback\n this.storageFallback[key] = value;\n }\n }\n\n /**\n * Removes `key` from the browser's local storage and the runtime/memory.\n */\n private _storageRemove(key: string) {\n // delete from local storage\n if (typeof window !== \"undefined\" && window?.localStorage) {\n window.localStorage?.removeItem(key);\n }\n\n // delete from fallback\n delete this.storageFallback[key];\n }\n\n /**\n * Updates the current store state on localStorage change.\n */\n private _bindStorageEvent() {\n if (\n typeof window === \"undefined\" ||\n !window?.localStorage ||\n !window.addEventListener\n ) {\n return;\n }\n\n window.addEventListener(\"storage\", (e) => {\n if (e.key != this.storageKey) {\n return;\n }\n\n const data = this._storageGet(this.storageKey) || {};\n\n super.save(data.token || \"\", data.record || data.model || null);\n });\n }\n}\n","import Client from \"@/Client\";\n\n/**\n * BaseService class that should be inherited from all API services.\n */\nexport abstract class BaseService {\n readonly client: Client;\n\n constructor(client: Client) {\n this.client = client;\n }\n}\n","import { BaseService } from \"@/services/BaseService\";\nimport { CommonOptions } from \"@/tools/options\";\n\ninterface appleClientSecret {\n secret: string;\n}\n\nexport class SettingsService extends BaseService {\n /**\n * Fetch all available app settings.\n *\n * @throws {ClientResponseError}\n */\n async getAll(options?: CommonOptions): Promise<{ [key: string]: any }> {\n options = Object.assign(\n {\n method: \"GET\",\n },\n options,\n );\n\n return this.client.send(\"/api/settings\", options);\n }\n\n /**\n * Bulk updates app settings.\n *\n * @throws {ClientResponseError}\n */\n async update(\n bodyParams?: { [key: string]: any } | FormData,\n options?: CommonOptions,\n ): Promise<{ [key: string]: any }> {\n options = Object.assign(\n {\n method: \"PATCH\",\n body: bodyParams,\n },\n options,\n );\n\n return this.client.send(\"/api/settings\", options);\n }\n\n /**\n * Performs a S3 filesystem connection test.\n *\n * The currently supported `filesystem` are \"storage\" and \"backups\".\n *\n * @throws {ClientResponseError}\n */\n async testS3(\n filesystem: string = \"storage\",\n options?: CommonOptions,\n ): Promise {\n options = Object.assign(\n {\n method: \"POST\",\n body: {\n filesystem: filesystem,\n },\n },\n options,\n );\n\n return this.client.send(\"/api/settings/test/s3\", options).then(() => true);\n }\n\n /**\n * Sends a test email.\n *\n * The possible `emailTemplate` values are:\n * - verification\n * - password-reset\n * - email-change\n *\n * @throws {ClientResponseError}\n */\n async testEmail(\n collectionIdOrName: string,\n toEmail: string,\n emailTemplate: string,\n options?: CommonOptions,\n ): Promise {\n options = Object.assign(\n {\n method: \"POST\",\n body: {\n email: toEmail,\n template: emailTemplate,\n collection: collectionIdOrName,\n },\n },\n options,\n );\n\n return this.client.send(\"/api/settings/test/email\", options).then(() => true);\n }\n\n /**\n * Generates a new Apple OAuth2 client secret.\n *\n * @throws {ClientResponseError}\n */\n async generateAppleClientSecret(\n clientId: string,\n teamId: string,\n keyId: string,\n privateKey: string,\n duration: number,\n options?: CommonOptions,\n ): Promise {\n options = Object.assign(\n {\n method: \"POST\",\n body: {\n clientId,\n teamId,\n keyId,\n privateKey,\n duration,\n },\n },\n options,\n );\n\n return this.client.send(\"/api/settings/apple/generate-client-secret\", options);\n }\n}\n","export interface SendOptions extends RequestInit {\n // for backward compatibility and to minimize the verbosity,\n // any top-level field that doesn't exist in RequestInit or the\n // fields below will be treated as query parameter.\n [key: string]: any;\n\n /**\n * Optional custom fetch function to use for sending the request.\n */\n fetch?: (url: RequestInfo | URL, config?: RequestInit) => Promise;\n\n /**\n * Custom headers to send with the requests.\n */\n headers?: { [key: string]: string };\n\n /**\n * The body of the request (serialized automatically for json requests).\n */\n body?: any;\n\n /**\n * Query parameters that will be appended to the request url.\n */\n query?: { [key: string]: any };\n\n /**\n * @deprecated use `query` instead\n *\n * for backward-compatibility `params` values are merged with `query`,\n * but this option may get removed in the final v1 release\n */\n params?: { [key: string]: any };\n\n /**\n * The request identifier that can be used to cancel pending requests.\n */\n requestKey?: string | null;\n\n /**\n * @deprecated use `requestKey:string` instead\n */\n $cancelKey?: string;\n\n /**\n * @deprecated use `requestKey:null` instead\n */\n $autoCancel?: boolean;\n}\n\nexport interface CommonOptions extends SendOptions {\n fields?: string;\n}\n\nexport interface ListOptions extends CommonOptions {\n page?: number;\n perPage?: number;\n sort?: string;\n filter?: string;\n skipTotal?: boolean;\n}\n\nexport interface FullListOptions extends ListOptions {\n batch?: number;\n}\n\nexport interface RecordOptions extends CommonOptions {\n expand?: string;\n}\n\nexport interface RecordListOptions extends ListOptions, RecordOptions {}\n\nexport interface RecordFullListOptions extends FullListOptions, RecordOptions {}\n\nexport interface RecordSubscribeOptions extends SendOptions {\n fields?: string;\n filter?: string;\n expand?: string;\n}\n\nexport interface LogStatsOptions extends CommonOptions {\n filter?: string;\n}\n\nexport interface FileOptions extends CommonOptions {\n thumb?: string;\n download?: boolean;\n}\n\nexport interface AuthOptions extends CommonOptions {\n /**\n * If autoRefreshThreshold is set it will take care to auto refresh\n * when necessary the auth data before each request to ensure that\n * the auth state is always valid.\n *\n * The value must be in seconds, aka. the amount of seconds\n * that will be subtracted from the current token `exp` claim in order\n * to determine whether it is going to expire within the specified time threshold.\n *\n * For example, if you want to auto refresh the token if it is\n * going to expire in the next 30mins (or already has expired),\n * it can be set to `1800`\n */\n autoRefreshThreshold?: number;\n}\n\n// -------------------------------------------------------------------\n\n// list of known SendOptions keys (everything else is treated as query param)\nconst knownSendOptionsKeys = [\n \"requestKey\",\n \"$cancelKey\",\n \"$autoCancel\",\n \"fetch\",\n \"headers\",\n \"body\",\n \"query\",\n \"params\",\n // ---,\n \"cache\",\n \"credentials\",\n \"headers\",\n \"integrity\",\n \"keepalive\",\n \"method\",\n \"mode\",\n \"redirect\",\n \"referrer\",\n \"referrerPolicy\",\n \"signal\",\n \"window\",\n];\n\n// modifies in place the provided options by moving unknown send options as query parameters.\nexport function normalizeUnknownQueryParams(options?: SendOptions): void {\n if (!options) {\n return;\n }\n\n options.query = options.query || {};\n for (let key in options) {\n if (knownSendOptionsKeys.includes(key)) {\n continue;\n }\n\n options.query[key] = options[key];\n delete options[key];\n }\n}\n\nexport function serializeQueryParams(params: { [key: string]: any }): string {\n const result: Array = [];\n\n for (const key in params) {\n const encodedKey = encodeURIComponent(key);\n const arrValue = Array.isArray(params[key]) ? params[key] : [params[key]];\n\n for (let v of arrValue) {\n v = prepareQueryParamValue(v);\n if (v === null) {\n continue;\n }\n result.push(encodedKey + \"=\" + v);\n }\n }\n\n return result.join(\"&\");\n}\n\n// encodes and normalizes the provided query param value.\nfunction prepareQueryParamValue(value: any): null | string {\n if (value === null || typeof value === \"undefined\") {\n return null;\n }\n\n if (value instanceof Date) {\n return encodeURIComponent(value.toISOString().replace(\"T\", \" \"));\n }\n\n if (typeof value === \"object\") {\n return encodeURIComponent(JSON.stringify(value));\n }\n\n return encodeURIComponent(value);\n}\n","import { ClientResponseError } from \"@/ClientResponseError\";\nimport { BaseService } from \"@/services/BaseService\";\nimport { SendOptions, normalizeUnknownQueryParams } from \"@/tools/options\";\n\ninterface promiseCallbacks {\n resolve: Function;\n reject: Function;\n}\n\ntype Subscriptions = { [key: string]: Array };\n\nexport type UnsubscribeFunc = () => Promise;\n\nexport class RealtimeService extends BaseService {\n clientId: string = \"\";\n\n private eventSource: EventSource | null = null;\n private subscriptions: Subscriptions = {};\n private lastSentSubscriptions: Array = [];\n private connectTimeoutId: any;\n private maxConnectTimeout: number = 15000;\n private reconnectTimeoutId: any;\n private reconnectAttempts: number = 0;\n private maxReconnectAttempts: number = Infinity;\n private predefinedReconnectIntervals: Array = [\n 200, 300, 500, 1000, 1200, 1500, 2000,\n ];\n private pendingConnects: Array = [];\n\n /**\n * Returns whether the realtime connection has been established.\n */\n get isConnected(): boolean {\n return !!this.eventSource && !!this.clientId && !this.pendingConnects.length;\n }\n\n /**\n * An optional hook that is invoked when the realtime client disconnects\n * either when unsubscribing from all subscriptions or when the\n * connection was interrupted or closed by the server.\n *\n * The received argument could be used to determine whether the disconnect\n * is a result from unsubscribing (`activeSubscriptions.length == 0`)\n * or because of network/server error (`activeSubscriptions.length > 0`).\n *\n * If you want to listen for the opposite, aka. when the client connection is established,\n * subscribe to the `PB_CONNECT` event.\n */\n onDisconnect?: (activeSubscriptions: Array) => void;\n\n /**\n * Register the subscription listener.\n *\n * You can subscribe multiple times to the same topic.\n *\n * If the SSE connection is not started yet,\n * this method will also initialize it.\n */\n async subscribe(\n topic: string,\n callback: (data: any) => void,\n options?: SendOptions,\n ): Promise {\n if (!topic) {\n throw new Error(\"topic must be set.\");\n }\n\n let key = topic;\n\n // serialize and append the topic options (if any)\n if (options) {\n options = Object.assign({}, options); // shallow copy\n normalizeUnknownQueryParams(options);\n const serialized =\n \"options=\" +\n encodeURIComponent(\n JSON.stringify({ query: options.query, headers: options.headers }),\n );\n key += (key.includes(\"?\") ? \"&\" : \"?\") + serialized;\n }\n\n const listener = function (e: Event) {\n const msgEvent = e as MessageEvent;\n\n let data;\n try {\n data = JSON.parse(msgEvent?.data);\n } catch {}\n\n callback(data || {});\n };\n\n // store the listener\n if (!this.subscriptions[key]) {\n this.subscriptions[key] = [];\n }\n this.subscriptions[key].push(listener);\n\n if (!this.isConnected) {\n // initialize sse connection\n await this.connect();\n } else if (this.subscriptions[key].length === 1) {\n // send the updated subscriptions (if it is the first for the key)\n await this.submitSubscriptions();\n } else {\n // only register the listener\n this.eventSource?.addEventListener(key, listener);\n }\n\n return async (): Promise => {\n return this.unsubscribeByTopicAndListener(topic, listener);\n };\n }\n\n /**\n * Unsubscribe from all subscription listeners with the specified topic.\n *\n * If `topic` is not provided, then this method will unsubscribe\n * from all active subscriptions.\n *\n * This method is no-op if there are no active subscriptions.\n *\n * The related sse connection will be autoclosed if after the\n * unsubscribe operation there are no active subscriptions left.\n */\n async unsubscribe(topic?: string): Promise {\n let needToSubmit = false;\n\n if (!topic) {\n // remove all subscriptions\n this.subscriptions = {};\n } else {\n // remove all listeners related to the topic\n const subs = this.getSubscriptionsByTopic(topic);\n for (let key in subs) {\n if (!this.hasSubscriptionListeners(key)) {\n continue; // already unsubscribed\n }\n\n for (let listener of this.subscriptions[key]) {\n this.eventSource?.removeEventListener(key, listener);\n }\n delete this.subscriptions[key];\n\n // mark for subscriptions change submit if there are no other listeners\n if (!needToSubmit) {\n needToSubmit = true;\n }\n }\n }\n\n if (!this.hasSubscriptionListeners()) {\n // no other active subscriptions -> close the sse connection\n this.disconnect();\n } else if (needToSubmit) {\n await this.submitSubscriptions();\n }\n }\n\n /**\n * Unsubscribe from all subscription listeners starting with the specified topic prefix.\n *\n * This method is no-op if there are no active subscriptions with the specified topic prefix.\n *\n * The related sse connection will be autoclosed if after the\n * unsubscribe operation there are no active subscriptions left.\n */\n async unsubscribeByPrefix(keyPrefix: string): Promise {\n let hasAtleastOneTopic = false;\n for (let key in this.subscriptions) {\n // \"?\" so that it can be used as end delimiter for the prefix\n if (!(key + \"?\").startsWith(keyPrefix)) {\n continue;\n }\n\n hasAtleastOneTopic = true;\n for (let listener of this.subscriptions[key]) {\n this.eventSource?.removeEventListener(key, listener);\n }\n delete this.subscriptions[key];\n }\n\n if (!hasAtleastOneTopic) {\n return; // nothing to unsubscribe from\n }\n\n if (this.hasSubscriptionListeners()) {\n // submit the deleted subscriptions\n await this.submitSubscriptions();\n } else {\n // no other active subscriptions -> close the sse connection\n this.disconnect();\n }\n }\n\n /**\n * Unsubscribe from all subscriptions matching the specified topic and listener function.\n *\n * This method is no-op if there are no active subscription with\n * the specified topic and listener.\n *\n * The related sse connection will be autoclosed if after the\n * unsubscribe operation there are no active subscriptions left.\n */\n async unsubscribeByTopicAndListener(\n topic: string,\n listener: EventListener,\n ): Promise {\n let needToSubmit = false;\n\n const subs = this.getSubscriptionsByTopic(topic);\n for (let key in subs) {\n if (\n !Array.isArray(this.subscriptions[key]) ||\n !this.subscriptions[key].length\n ) {\n continue; // already unsubscribed\n }\n\n let exist = false;\n for (let i = this.subscriptions[key].length - 1; i >= 0; i--) {\n if (this.subscriptions[key][i] !== listener) {\n continue;\n }\n\n exist = true; // has at least one matching listener\n delete this.subscriptions[key][i]; // removes the function reference\n this.subscriptions[key].splice(i, 1); // reindex the array\n this.eventSource?.removeEventListener(key, listener);\n }\n if (!exist) {\n continue;\n }\n\n // remove the key from the subscriptions list if there are no other listeners\n if (!this.subscriptions[key].length) {\n delete this.subscriptions[key];\n }\n\n // mark for subscriptions change submit if there are no other listeners\n if (!needToSubmit && !this.hasSubscriptionListeners(key)) {\n needToSubmit = true;\n }\n }\n\n if (!this.hasSubscriptionListeners()) {\n // no other active subscriptions -> close the sse connection\n this.disconnect();\n } else if (needToSubmit) {\n await this.submitSubscriptions();\n }\n }\n\n private hasSubscriptionListeners(keyToCheck?: string): boolean {\n this.subscriptions = this.subscriptions || {};\n\n // check the specified key\n if (keyToCheck) {\n return !!this.subscriptions[keyToCheck]?.length;\n }\n\n // check for at least one non-empty subscription\n for (let key in this.subscriptions) {\n if (!!this.subscriptions[key]?.length) {\n return true;\n }\n }\n\n return false;\n }\n\n private async submitSubscriptions(): Promise {\n if (!this.clientId) {\n return; // no client/subscriber\n }\n\n // optimistic update\n this.addAllSubscriptionListeners();\n\n this.lastSentSubscriptions = this.getNonEmptySubscriptionKeys();\n\n return this.client\n .send(\"/api/realtime\", {\n method: \"POST\",\n body: {\n clientId: this.clientId,\n subscriptions: this.lastSentSubscriptions,\n },\n requestKey: this.getSubscriptionsCancelKey(),\n })\n .catch((err) => {\n if (err?.isAbort) {\n return; // silently ignore aborted pending requests\n }\n throw err;\n });\n }\n\n private getSubscriptionsCancelKey(): string {\n return \"realtime_\" + this.clientId;\n }\n\n private getSubscriptionsByTopic(topic: string): Subscriptions {\n const result: Subscriptions = {};\n\n // \"?\" so that it can be used as end delimiter for the topic\n topic = topic.includes(\"?\") ? topic : topic + \"?\";\n\n for (let key in this.subscriptions) {\n if ((key + \"?\").startsWith(topic)) {\n result[key] = this.subscriptions[key];\n }\n }\n\n return result;\n }\n\n private getNonEmptySubscriptionKeys(): Array {\n const result: Array = [];\n\n for (let key in this.subscriptions) {\n if (this.subscriptions[key].length) {\n result.push(key);\n }\n }\n\n return result;\n }\n\n private addAllSubscriptionListeners(): void {\n if (!this.eventSource) {\n return;\n }\n\n this.removeAllSubscriptionListeners();\n\n for (let key in this.subscriptions) {\n for (let listener of this.subscriptions[key]) {\n this.eventSource.addEventListener(key, listener);\n }\n }\n }\n\n private removeAllSubscriptionListeners(): void {\n if (!this.eventSource) {\n return;\n }\n\n for (let key in this.subscriptions) {\n for (let listener of this.subscriptions[key]) {\n this.eventSource.removeEventListener(key, listener);\n }\n }\n }\n\n private async connect(): Promise {\n if (this.reconnectAttempts > 0) {\n // immediately resolve the promise to avoid indefinitely\n // blocking the client during reconnection\n return;\n }\n\n return new Promise((resolve, reject) => {\n this.pendingConnects.push({ resolve, reject });\n\n if (this.pendingConnects.length > 1) {\n // all promises will be resolved once the connection is established\n return;\n }\n\n this.initConnect();\n });\n }\n\n private initConnect() {\n this.disconnect(true);\n\n // wait up to 15s for connect\n clearTimeout(this.connectTimeoutId);\n this.connectTimeoutId = setTimeout(() => {\n this.connectErrorHandler(new Error(\"EventSource connect took too long.\"));\n }, this.maxConnectTimeout);\n\n this.eventSource = new EventSource(this.client.buildURL(\"/api/realtime\"));\n\n this.eventSource.onerror = (_) => {\n this.connectErrorHandler(\n new Error(\"Failed to establish realtime connection.\"),\n );\n };\n\n this.eventSource.addEventListener(\"PB_CONNECT\", (e) => {\n const msgEvent = e as MessageEvent;\n this.clientId = msgEvent?.lastEventId;\n\n this.submitSubscriptions()\n .then(async () => {\n let retries = 3;\n while (this.hasUnsentSubscriptions() && retries > 0) {\n retries--;\n // resubscribe to ensure that the latest topics are submitted\n //\n // This is needed because missed topics could happen on reconnect\n // if after the pending sent `submitSubscriptions()` call another `subscribe()`\n // was made before the submit was able to complete.\n await this.submitSubscriptions();\n }\n })\n .then(() => {\n for (let p of this.pendingConnects) {\n p.resolve();\n }\n\n // reset connect meta\n this.pendingConnects = [];\n this.reconnectAttempts = 0;\n clearTimeout(this.reconnectTimeoutId);\n clearTimeout(this.connectTimeoutId);\n\n // propagate the PB_CONNECT event\n const connectSubs = this.getSubscriptionsByTopic(\"PB_CONNECT\");\n for (let key in connectSubs) {\n for (let listener of connectSubs[key]) {\n listener(e);\n }\n }\n })\n .catch((err) => {\n this.clientId = \"\";\n this.connectErrorHandler(err);\n });\n });\n }\n\n private hasUnsentSubscriptions(): boolean {\n const latestTopics = this.getNonEmptySubscriptionKeys();\n if (latestTopics.length != this.lastSentSubscriptions.length) {\n return true;\n }\n\n for (const t of latestTopics) {\n if (!this.lastSentSubscriptions.includes(t)) {\n return true;\n }\n }\n\n return false;\n }\n\n private connectErrorHandler(err: any) {\n clearTimeout(this.connectTimeoutId);\n clearTimeout(this.reconnectTimeoutId);\n\n if (\n // wasn't previously connected -> direct reject\n (!this.clientId && !this.reconnectAttempts) ||\n // was previously connected but the max reconnection limit has been reached\n this.reconnectAttempts > this.maxReconnectAttempts\n ) {\n for (let p of this.pendingConnects) {\n p.reject(new ClientResponseError(err));\n }\n this.pendingConnects = [];\n this.disconnect();\n return;\n }\n\n // otherwise -> reconnect in the background\n this.disconnect(true);\n const timeout =\n this.predefinedReconnectIntervals[this.reconnectAttempts] ||\n this.predefinedReconnectIntervals[\n this.predefinedReconnectIntervals.length - 1\n ];\n this.reconnectAttempts++;\n this.reconnectTimeoutId = setTimeout(() => {\n this.initConnect();\n }, timeout);\n }\n\n private disconnect(fromReconnect = false): void {\n if (this.clientId && this.onDisconnect) {\n this.onDisconnect(Object.keys(this.subscriptions));\n }\n\n clearTimeout(this.connectTimeoutId);\n clearTimeout(this.reconnectTimeoutId);\n this.removeAllSubscriptionListeners();\n this.client.cancelRequest(this.getSubscriptionsCancelKey());\n this.eventSource?.close();\n this.eventSource = null;\n this.clientId = \"\";\n\n if (!fromReconnect) {\n this.reconnectAttempts = 0;\n\n // resolve any remaining connect promises\n //\n // this is done to avoid unnecessary throwing errors in case\n // unsubscribe is called before the pending connect promises complete\n // (see https://github.com/pocketbase/pocketbase/discussions/2897#discussioncomment-6423818)\n for (let p of this.pendingConnects) {\n p.resolve();\n }\n this.pendingConnects = [];\n }\n }\n}\n","import { BaseService } from \"@/services/BaseService\";\nimport { ClientResponseError } from \"@/ClientResponseError\";\nimport { ListResult } from \"@/tools/dtos\";\nimport { CommonOptions, ListOptions, FullListOptions } from \"@/tools/options\";\n\nexport abstract class CrudService extends BaseService {\n /**\n * Base path for the crud actions (without trailing slash, eg. '/admins').\n */\n abstract get baseCrudPath(): string;\n\n /**\n * Response data decoder.\n */\n decode(data: { [key: string]: any }): T {\n return data as T;\n }\n\n /**\n * Returns a promise with all list items batch fetched at once\n * (by default 500 items per request; to change it set the `batch` query param).\n *\n * You can use the generic T to supply a wrapper type of the crud model.\n *\n * @throws {ClientResponseError}\n */\n async getFullList(options?: FullListOptions): Promise>;\n\n /**\n * Legacy version of getFullList with explicitly specified batch size.\n */\n async getFullList(batch?: number, options?: ListOptions): Promise>;\n\n async getFullList(\n batchOrqueryParams?: number | FullListOptions,\n options?: ListOptions,\n ): Promise> {\n if (typeof batchOrqueryParams == \"number\") {\n return this._getFullList(batchOrqueryParams, options);\n }\n\n options = Object.assign({}, batchOrqueryParams, options);\n\n let batch = 500;\n if (options.batch) {\n batch = options.batch;\n delete options.batch;\n }\n\n return this._getFullList(batch, options);\n }\n\n /**\n * Returns paginated items list.\n *\n * You can use the generic T to supply a wrapper type of the crud model.\n *\n * @throws {ClientResponseError}\n */\n async getList(\n page = 1,\n perPage = 30,\n options?: ListOptions,\n ): Promise> {\n options = Object.assign(\n {\n method: \"GET\",\n },\n options,\n );\n\n options.query = Object.assign(\n {\n page: page,\n perPage: perPage,\n },\n options.query,\n );\n\n return this.client.send(this.baseCrudPath, options).then((responseData: any) => {\n responseData.items =\n responseData.items?.map((item: any) => {\n return this.decode(item);\n }) || [];\n\n return responseData;\n });\n }\n\n /**\n * Returns the first found item by the specified filter.\n *\n * Internally it calls `getList(1, 1, { filter, skipTotal })` and\n * returns the first found item.\n *\n * You can use the generic T to supply a wrapper type of the crud model.\n *\n * For consistency with `getOne`, this method will throw a 404\n * ClientResponseError if no item was found.\n *\n * @throws {ClientResponseError}\n */\n async getFirstListItem(filter: string, options?: CommonOptions): Promise {\n options = Object.assign(\n {\n requestKey: \"one_by_filter_\" + this.baseCrudPath + \"_\" + filter,\n },\n options,\n );\n\n options.query = Object.assign(\n {\n filter: filter,\n skipTotal: 1,\n },\n options.query,\n );\n\n return this.getList(1, 1, options).then((result) => {\n if (!result?.items?.length) {\n throw new ClientResponseError({\n status: 404,\n response: {\n code: 404,\n message: \"The requested resource wasn't found.\",\n data: {},\n },\n });\n }\n\n return result.items[0];\n });\n }\n\n /**\n * Returns single item by its id.\n *\n * You can use the generic T to supply a wrapper type of the crud model.\n *\n * If `id` is empty it will throw a 404 error.\n *\n * @throws {ClientResponseError}\n */\n async getOne(id: string, options?: CommonOptions): Promise {\n if (!id) {\n throw new ClientResponseError({\n url: this.client.buildURL(this.baseCrudPath + \"/\"),\n status: 404,\n response: {\n code: 404,\n message: \"Missing required record id.\",\n data: {},\n },\n });\n }\n\n options = Object.assign(\n {\n method: \"GET\",\n },\n options,\n );\n\n return this.client\n .send(this.baseCrudPath + \"/\" + encodeURIComponent(id), options)\n .then((responseData: any) => this.decode(responseData));\n }\n\n /**\n * Creates a new item.\n *\n * You can use the generic T to supply a wrapper type of the crud model.\n *\n * @throws {ClientResponseError}\n */\n async create(\n bodyParams?: { [key: string]: any } | FormData,\n options?: CommonOptions,\n ): Promise {\n options = Object.assign(\n {\n method: \"POST\",\n body: bodyParams,\n },\n options,\n );\n\n return this.client\n .send(this.baseCrudPath, options)\n .then((responseData: any) => this.decode(responseData));\n }\n\n /**\n * Updates an existing item by its id.\n *\n * You can use the generic T to supply a wrapper type of the crud model.\n *\n * @throws {ClientResponseError}\n */\n async update(\n id: string,\n bodyParams?: { [key: string]: any } | FormData,\n options?: CommonOptions,\n ): Promise {\n options = Object.assign(\n {\n method: \"PATCH\",\n body: bodyParams,\n },\n options,\n );\n\n return this.client\n .send(this.baseCrudPath + \"/\" + encodeURIComponent(id), options)\n .then((responseData: any) => this.decode(responseData));\n }\n\n /**\n * Deletes an existing item by its id.\n *\n * @throws {ClientResponseError}\n */\n async delete(id: string, options?: CommonOptions): Promise {\n options = Object.assign(\n {\n method: \"DELETE\",\n },\n options,\n );\n\n return this.client\n .send(this.baseCrudPath + \"/\" + encodeURIComponent(id), options)\n .then(() => true);\n }\n\n /**\n * Returns a promise with all list items batch fetched at once.\n */\n protected _getFullList(\n batchSize = 500,\n options?: ListOptions,\n ): Promise> {\n options = options || {};\n options.query = Object.assign(\n {\n skipTotal: 1,\n },\n options.query,\n );\n\n let result: Array = [];\n\n let request = async (page: number): Promise> => {\n return this.getList(page, batchSize || 500, options).then((list) => {\n const castedList = list as any as ListResult;\n const items = castedList.items;\n\n result = result.concat(items);\n\n if (items.length == list.perPage) {\n return request(page + 1);\n }\n\n return result;\n });\n };\n\n return request(1);\n }\n}\n","import { SendOptions } from \"@/tools/options\";\n\nexport function normalizeLegacyOptionsArgs(\n legacyWarn: string,\n baseOptions: SendOptions,\n bodyOrOptions?: any,\n query?: any,\n): SendOptions {\n const hasBodyOrOptions = typeof bodyOrOptions !== \"undefined\";\n const hasQuery = typeof query !== \"undefined\";\n\n if (!hasQuery && !hasBodyOrOptions) {\n return baseOptions;\n }\n\n if (hasQuery) {\n console.warn(legacyWarn);\n baseOptions.body = Object.assign({}, baseOptions.body, bodyOrOptions);\n baseOptions.query = Object.assign({}, baseOptions.query, query);\n\n return baseOptions;\n }\n\n return Object.assign(baseOptions, bodyOrOptions);\n}\n","import Client from \"@/Client\";\nimport { isTokenExpired } from \"@/tools/jwt\";\n\n// reset previous auto refresh registrations\nexport function resetAutoRefresh(client: Client) {\n (client as any)._resetAutoRefresh?.();\n}\n\nexport function registerAutoRefresh(\n client: Client,\n threshold: number,\n refreshFunc: () => Promise,\n reauthenticateFunc: () => Promise,\n) {\n resetAutoRefresh(client);\n\n const oldBeforeSend = client.beforeSend;\n const oldModel = client.authStore.record;\n\n // unset the auto refresh in case the auth store was cleared\n // OR a new model was authenticated\n const unsubStoreChange = client.authStore.onChange((newToken, model) => {\n if (\n !newToken ||\n model?.id != oldModel?.id ||\n ((model?.collectionId || oldModel?.collectionId) &&\n model?.collectionId != oldModel?.collectionId)\n ) {\n resetAutoRefresh(client);\n }\n });\n\n // initialize a reset function and attach it dynamically to the client\n (client as any)._resetAutoRefresh = function () {\n unsubStoreChange();\n client.beforeSend = oldBeforeSend;\n delete (client as any)._resetAutoRefresh;\n };\n\n client.beforeSend = async (url, sendOptions) => {\n const oldToken = client.authStore.token;\n\n if (sendOptions.query?.autoRefresh) {\n return oldBeforeSend ? oldBeforeSend(url, sendOptions) : { url, sendOptions };\n }\n\n let isValid = client.authStore.isValid;\n if (\n // is loosely valid\n isValid &&\n // but it is going to expire in the next \"threshold\" seconds\n isTokenExpired(client.authStore.token, threshold)\n ) {\n try {\n await refreshFunc();\n } catch (_) {\n isValid = false;\n }\n }\n\n // still invalid -> reauthenticate\n if (!isValid) {\n await reauthenticateFunc();\n }\n\n // the request wasn't sent with a custom token\n const headers = sendOptions.headers || {};\n for (let key in headers) {\n if (\n key.toLowerCase() == \"authorization\" &&\n // the request wasn't sent with a custom token\n oldToken == headers[key] &&\n client.authStore.token\n ) {\n // set the latest store token\n headers[key] = client.authStore.token;\n break;\n }\n }\n sendOptions.headers = headers;\n\n return oldBeforeSend ? oldBeforeSend(url, sendOptions) : { url, sendOptions };\n };\n}\n","import Client from \"@/Client\";\nimport { ClientResponseError } from \"@/ClientResponseError\";\nimport { RealtimeService, UnsubscribeFunc } from \"@/services/RealtimeService\";\nimport { BaseAuthStore } from \"@/stores/BaseAuthStore\";\nimport { CrudService } from \"@/services/CrudService\";\nimport { ListResult, RecordModel } from \"@/tools/dtos\";\nimport { normalizeLegacyOptionsArgs } from \"@/tools/legacy\";\nimport {\n CommonOptions,\n RecordFullListOptions,\n RecordListOptions,\n RecordOptions,\n SendOptions,\n RecordSubscribeOptions,\n} from \"@/tools/options\";\nimport { getTokenPayload } from \"@/tools/jwt\";\nimport { registerAutoRefresh, resetAutoRefresh } from \"@/tools/refresh\";\n\nexport interface RecordAuthResponse {\n /**\n * The signed PocketBase auth record.\n */\n record: T;\n\n /**\n * The PocketBase record auth token.\n *\n * If you are looking for the OAuth2 access and refresh tokens\n * they are available under the `meta.accessToken` and `meta.refreshToken` props.\n */\n token: string;\n\n /**\n * Auth meta data usually filled when OAuth2 is used.\n */\n meta?: { [key: string]: any };\n}\n\nexport interface AuthProviderInfo {\n name: string;\n displayName: string;\n state: string;\n authURL: string;\n codeVerifier: string;\n codeChallenge: string;\n codeChallengeMethod: string;\n}\n\nexport interface AuthMethodsList {\n mfa: {\n enabled: boolean;\n duration: number;\n };\n otp: {\n enabled: boolean;\n duration: number;\n };\n password: {\n enabled: boolean;\n identityFields: Array;\n };\n oauth2: {\n enabled: boolean;\n providers: Array;\n };\n}\n\nexport interface RecordSubscription {\n action: string; // eg. create, update, delete\n record: T;\n}\n\nexport type OAuth2UrlCallback = (url: string) => void | Promise;\n\nexport interface OAuth2AuthConfig extends SendOptions {\n // the name of the OAuth2 provider (eg. \"google\")\n provider: string;\n\n // custom scopes to overwrite the default ones\n scopes?: Array;\n\n // optional record create data\n createData?: { [key: string]: any };\n\n // optional callback that is triggered after the OAuth2 sign-in/sign-up url generation\n urlCallback?: OAuth2UrlCallback;\n\n // optional query params to send with the PocketBase auth request (eg. fields, expand, etc.)\n query?: RecordOptions;\n}\n\nexport interface OTPResponse {\n otpId: string;\n}\n\nexport class RecordService extends CrudService {\n readonly collectionIdOrName: string;\n\n constructor(client: Client, collectionIdOrName: string) {\n super(client);\n\n this.collectionIdOrName = collectionIdOrName;\n }\n\n /**\n * @inheritdoc\n */\n get baseCrudPath(): string {\n return this.baseCollectionPath + \"/records\";\n }\n\n /**\n * Returns the current collection service base path.\n */\n get baseCollectionPath(): string {\n return \"/api/collections/\" + encodeURIComponent(this.collectionIdOrName);\n }\n\n /**\n * Returns whether the current service collection is superusers.\n */\n get isSuperusers(): boolean {\n return (\n this.collectionIdOrName == \"_superusers\" ||\n this.collectionIdOrName == \"_pbc_2773867675\"\n );\n }\n\n // ---------------------------------------------------------------\n // Realtime handlers\n // ---------------------------------------------------------------\n\n /**\n * Subscribe to realtime changes to the specified topic (\"*\" or record id).\n *\n * If `topic` is the wildcard \"*\", then this method will subscribe to\n * any record changes in the collection.\n *\n * If `topic` is a record id, then this method will subscribe only\n * to changes of the specified record id.\n *\n * It's OK to subscribe multiple times to the same topic.\n * You can use the returned `UnsubscribeFunc` to remove only a single subscription.\n * Or use `unsubscribe(topic)` if you want to remove all subscriptions attached to the topic.\n */\n async subscribe(\n topic: string,\n callback: (data: RecordSubscription) => void,\n options?: RecordSubscribeOptions,\n ): Promise {\n if (!topic) {\n throw new Error(\"Missing topic.\");\n }\n\n if (!callback) {\n throw new Error(\"Missing subscription callback.\");\n }\n\n return this.client.realtime.subscribe(\n this.collectionIdOrName + \"/\" + topic,\n callback,\n options,\n );\n }\n\n /**\n * Unsubscribe from all subscriptions of the specified topic\n * (\"*\" or record id).\n *\n * If `topic` is not set, then this method will unsubscribe from\n * all subscriptions associated to the current collection.\n */\n async unsubscribe(topic?: string): Promise {\n // unsubscribe from the specified topic\n if (topic) {\n return this.client.realtime.unsubscribe(\n this.collectionIdOrName + \"/\" + topic,\n );\n }\n\n // unsubscribe from everything related to the collection\n return this.client.realtime.unsubscribeByPrefix(this.collectionIdOrName);\n }\n\n // ---------------------------------------------------------------\n // Crud handers\n // ---------------------------------------------------------------\n /**\n * @inheritdoc\n */\n async getFullList(options?: RecordFullListOptions): Promise>;\n\n /**\n * @inheritdoc\n */\n async getFullList(\n batch?: number,\n options?: RecordListOptions,\n ): Promise>;\n\n /**\n * @inheritdoc\n */\n async getFullList(\n batchOrOptions?: number | RecordFullListOptions,\n options?: RecordListOptions,\n ): Promise> {\n if (typeof batchOrOptions == \"number\") {\n return super.getFullList(batchOrOptions, options);\n }\n\n const params = Object.assign({}, batchOrOptions, options);\n\n return super.getFullList(params);\n }\n\n /**\n * @inheritdoc\n */\n async getList(\n page = 1,\n perPage = 30,\n options?: RecordListOptions,\n ): Promise> {\n return super.getList(page, perPage, options);\n }\n\n /**\n * @inheritdoc\n */\n async getFirstListItem(\n filter: string,\n options?: RecordListOptions,\n ): Promise {\n return super.getFirstListItem(filter, options);\n }\n\n /**\n * @inheritdoc\n */\n async getOne(id: string, options?: RecordOptions): Promise {\n return super.getOne(id, options);\n }\n\n /**\n * @inheritdoc\n */\n async create(\n bodyParams?: { [key: string]: any } | FormData,\n options?: RecordOptions,\n ): Promise {\n return super.create(bodyParams, options);\n }\n\n /**\n * @inheritdoc\n *\n * If the current `client.authStore.record` matches with the updated id, then\n * on success the `client.authStore.record` will be updated with the new response record fields.\n */\n async update(\n id: string,\n bodyParams?: { [key: string]: any } | FormData,\n options?: RecordOptions,\n ): Promise {\n return super.update(id, bodyParams, options).then((item) => {\n if (\n // is record auth\n this.client.authStore.record?.id === item?.id &&\n (this.client.authStore.record?.collectionId === this.collectionIdOrName ||\n this.client.authStore.record?.collectionName ===\n this.collectionIdOrName)\n ) {\n let authExpand = Object.assign({}, this.client.authStore.record.expand);\n let authRecord = Object.assign({}, this.client.authStore.record, item);\n if (authExpand) {\n // for now \"merge\" only top-level expand\n authRecord.expand = Object.assign(authExpand, item.expand);\n }\n\n this.client.authStore.save(this.client.authStore.token, authRecord);\n }\n\n return item as any as T;\n });\n }\n\n /**\n * @inheritdoc\n *\n * If the current `client.authStore.record` matches with the deleted id,\n * then on success the `client.authStore` will be cleared.\n */\n async delete(id: string, options?: CommonOptions): Promise {\n return super.delete(id, options).then((success) => {\n if (\n success &&\n // is record auth\n this.client.authStore.record?.id === id &&\n (this.client.authStore.record?.collectionId === this.collectionIdOrName ||\n this.client.authStore.record?.collectionName ===\n this.collectionIdOrName)\n ) {\n this.client.authStore.clear();\n }\n\n return success;\n });\n }\n\n // ---------------------------------------------------------------\n // Auth handlers\n // ---------------------------------------------------------------\n\n /**\n * Prepare successful collection authorization response.\n */\n protected authResponse(responseData: any): RecordAuthResponse {\n const record = this.decode(responseData?.record || {});\n\n this.client.authStore.save(responseData?.token, record as any);\n\n return Object.assign({}, responseData, {\n // normalize common fields\n token: responseData?.token || \"\",\n record: record as any as T,\n });\n }\n\n /**\n * Returns all available collection auth methods.\n *\n * @throws {ClientResponseError}\n */\n async listAuthMethods(options?: CommonOptions): Promise {\n options = Object.assign(\n {\n method: \"GET\",\n // @todo remove after deleting the pre v0.23 API response fields\n fields: \"mfa,otp,password,oauth2\",\n },\n options,\n );\n\n return this.client.send(this.baseCollectionPath + \"/auth-methods\", options);\n }\n\n /**\n * Authenticate a single auth collection record via its username/email and password.\n *\n * On success, this method also automatically updates\n * the client's AuthStore data and returns:\n * - the authentication token\n * - the authenticated record model\n *\n * @throws {ClientResponseError}\n */\n async authWithPassword(\n usernameOrEmail: string,\n password: string,\n options?: RecordOptions,\n ): Promise> {\n options = Object.assign(\n {\n method: \"POST\",\n body: {\n identity: usernameOrEmail,\n password: password,\n },\n },\n options,\n );\n\n // note: consider to deprecate\n let autoRefreshThreshold;\n if (this.isSuperusers) {\n autoRefreshThreshold = options.autoRefreshThreshold;\n delete options.autoRefreshThreshold;\n if (!options.autoRefresh) {\n resetAutoRefresh(this.client);\n }\n }\n\n let authData = await this.client.send(\n this.baseCollectionPath + \"/auth-with-password\",\n options,\n );\n\n authData = this.authResponse(authData);\n\n if (autoRefreshThreshold && this.isSuperusers) {\n registerAutoRefresh(\n this.client,\n autoRefreshThreshold,\n () => this.authRefresh({ autoRefresh: true }),\n () =>\n this.authWithPassword(\n usernameOrEmail,\n password,\n Object.assign({ autoRefresh: true }, options),\n ),\n );\n }\n\n return authData;\n }\n\n /**\n * Authenticate a single auth collection record with OAuth2 code.\n *\n * If you don't have an OAuth2 code you may also want to check `authWithOAuth2` method.\n *\n * On success, this method also automatically updates\n * the client's AuthStore data and returns:\n * - the authentication token\n * - the authenticated record model\n * - the OAuth2 account data (eg. name, email, avatar, etc.)\n *\n * @throws {ClientResponseError}\n */\n async authWithOAuth2Code(\n provider: string,\n code: string,\n codeVerifier: string,\n redirectURL: string,\n createData?: { [key: string]: any },\n options?: RecordOptions,\n ): Promise>;\n\n /**\n * @deprecated\n * Consider using authWithOAuth2Code(provider, code, codeVerifier, redirectURL, createdData, options?).\n */\n async authWithOAuth2Code(\n provider: string,\n code: string,\n codeVerifier: string,\n redirectURL: string,\n createData?: { [key: string]: any },\n body?: any,\n query?: any,\n ): Promise>;\n\n async authWithOAuth2Code(\n provider: string,\n code: string,\n codeVerifier: string,\n redirectURL: string,\n createData?: { [key: string]: any },\n bodyOrOptions?: any,\n query?: any,\n ): Promise> {\n let options: any = {\n method: \"POST\",\n body: {\n provider: provider,\n code: code,\n codeVerifier: codeVerifier,\n redirectURL: redirectURL,\n createData: createData,\n },\n };\n\n options = normalizeLegacyOptionsArgs(\n \"This form of authWithOAuth2Code(provider, code, codeVerifier, redirectURL, createData?, body?, query?) is deprecated. Consider replacing it with authWithOAuth2Code(provider, code, codeVerifier, redirectURL, createData?, options?).\",\n options,\n bodyOrOptions,\n query,\n );\n\n return this.client\n .send(this.baseCollectionPath + \"/auth-with-oauth2\", options)\n .then((data) => this.authResponse(data));\n }\n\n /**\n * @deprecated This form of authWithOAuth2 is deprecated.\n *\n * Please use `authWithOAuth2Code()` OR its simplified realtime version\n * as shown in https://pocketbase.io/docs/authentication/#oauth2-integration.\n */\n async authWithOAuth2(\n provider: string,\n code: string,\n codeVerifier: string,\n redirectURL: string,\n createData?: { [key: string]: any },\n bodyParams?: { [key: string]: any },\n queryParams?: RecordOptions,\n ): Promise>;\n\n /**\n * Authenticate a single auth collection record with OAuth2\n * **without custom redirects, deeplinks or even page reload**.\n *\n * This method initializes a one-off realtime subscription and will\n * open a popup window with the OAuth2 vendor page to authenticate.\n * Once the external OAuth2 sign-in/sign-up flow is completed, the popup\n * window will be automatically closed and the OAuth2 data sent back\n * to the user through the previously established realtime connection.\n *\n * You can specify an optional `urlCallback` prop to customize\n * the default url `window.open` behavior.\n *\n * On success, this method also automatically updates\n * the client's AuthStore data and returns:\n * - the authentication token\n * - the authenticated record model\n * - the OAuth2 account data (eg. name, email, avatar, etc.)\n *\n * Example:\n *\n * ```js\n * const authData = await pb.collection(\"users\").authWithOAuth2({\n * provider: \"google\",\n * })\n * ```\n *\n * Note1: When creating the OAuth2 app in the provider dashboard\n * you have to configure `https://yourdomain.com/api/oauth2-redirect`\n * as redirect URL.\n *\n * Note2: Safari may block the default `urlCallback` popup because\n * it doesn't allow `window.open` calls as part of an `async` click functions.\n * To workaround this you can either change your click handler to not be marked as `async`\n * OR manually call `window.open` before your `async` function and use the\n * window reference in your own custom `urlCallback` (see https://github.com/pocketbase/pocketbase/discussions/2429#discussioncomment-5943061).\n * For example:\n * ```js\n * \n * ...\n * document.getElementById(\"btn\").addEventListener(\"click\", () => {\n * pb.collection(\"users\").authWithOAuth2({\n * provider: \"gitlab\",\n * }).then((authData) => {\n * console.log(authData)\n * }).catch((err) => {\n * console.log(err, err.originalError);\n * });\n * })\n * ```\n *\n * @throws {ClientResponseError}\n */\n async authWithOAuth2(\n options: OAuth2AuthConfig,\n ): Promise>;\n\n authWithOAuth2(...args: any): Promise> {\n // fallback to legacy format\n if (args.length > 1 || typeof args?.[0] === \"string\") {\n console.warn(\n \"PocketBase: This form of authWithOAuth2() is deprecated and may get removed in the future. Please replace with authWithOAuth2Code() OR use the authWithOAuth2() realtime form as shown in https://pocketbase.io/docs/authentication/#oauth2-integration.\",\n );\n return this.authWithOAuth2Code(\n args?.[0] || \"\",\n args?.[1] || \"\",\n args?.[2] || \"\",\n args?.[3] || \"\",\n args?.[4] || {},\n args?.[5] || {},\n args?.[6] || {},\n );\n }\n\n const config = args?.[0] || {};\n\n // open a new popup window in case config.urlCallback is not set\n //\n // note: it is opened before any async calls due to Safari restrictions\n // (see https://github.com/pocketbase/pocketbase/discussions/2429#discussioncomment-5943061)\n let eagerDefaultPopup: Window | null = null;\n if (!config.urlCallback) {\n eagerDefaultPopup = openBrowserPopup(undefined);\n }\n\n // initialize a one-off realtime service\n const realtime = new RealtimeService(this.client);\n\n function cleanup() {\n eagerDefaultPopup?.close();\n realtime.unsubscribe();\n }\n\n const requestKeyOptions: SendOptions = {};\n const requestKey = config.requestKey;\n if (requestKey) {\n requestKeyOptions.requestKey = requestKey;\n }\n\n return this.listAuthMethods(requestKeyOptions)\n .then((authMethods) => {\n const provider = authMethods.oauth2.providers.find(\n (p) => p.name === config.provider,\n );\n if (!provider) {\n throw new ClientResponseError(\n new Error(`Missing or invalid provider \"${config.provider}\".`),\n );\n }\n\n const redirectURL = this.client.buildURL(\"/api/oauth2-redirect\");\n\n // find the AbortController associated with the current request key (if any)\n const cancelController = requestKey\n ? this.client[\"cancelControllers\"]?.[requestKey]\n : undefined;\n if (cancelController) {\n cancelController.signal.onabort = () => {\n cleanup();\n };\n }\n\n return new Promise(async (resolve, reject) => {\n try {\n await realtime.subscribe(\"@oauth2\", async (e) => {\n const oldState = realtime.clientId;\n\n try {\n if (!e.state || oldState !== e.state) {\n throw new Error(\"State parameters don't match.\");\n }\n\n if (e.error || !e.code) {\n throw new Error(\n \"OAuth2 redirect error or missing code: \" +\n e.error,\n );\n }\n\n // clear the non SendOptions props\n const options = Object.assign({}, config);\n delete options.provider;\n delete options.scopes;\n delete options.createData;\n delete options.urlCallback;\n\n // reset the cancelController listener as it will be triggered by the next api call\n if (cancelController?.signal?.onabort) {\n cancelController.signal.onabort = null;\n }\n\n const authData = await this.authWithOAuth2Code(\n provider.name,\n e.code,\n provider.codeVerifier,\n redirectURL,\n config.createData,\n options,\n );\n\n resolve(authData);\n } catch (err) {\n reject(new ClientResponseError(err));\n }\n\n cleanup();\n });\n\n const replacements: { [key: string]: any } = {\n state: realtime.clientId,\n };\n if (config.scopes?.length) {\n replacements[\"scope\"] = config.scopes.join(\" \");\n }\n\n const url = this._replaceQueryParams(\n provider.authURL + redirectURL,\n replacements,\n );\n\n let urlCallback =\n config.urlCallback ||\n function (url: string) {\n if (eagerDefaultPopup) {\n eagerDefaultPopup.location.href = url;\n } else {\n // it could have been blocked due to its empty initial url,\n // try again...\n eagerDefaultPopup = openBrowserPopup(url);\n }\n };\n\n await urlCallback(url);\n } catch (err) {\n cleanup();\n reject(new ClientResponseError(err));\n }\n });\n })\n .catch((err) => {\n cleanup();\n throw err; // rethrow\n }) as Promise>;\n }\n\n /**\n * Refreshes the current authenticated record instance and\n * returns a new token and record data.\n *\n * On success this method also automatically updates the client's AuthStore.\n *\n * @throws {ClientResponseError}\n */\n async authRefresh(options?: RecordOptions): Promise>;\n\n /**\n * @deprecated\n * Consider using authRefresh(options?).\n */\n async authRefresh(body?: any, query?: any): Promise>;\n\n async authRefresh(\n bodyOrOptions?: any,\n query?: any,\n ): Promise> {\n let options: any = {\n method: \"POST\",\n };\n\n options = normalizeLegacyOptionsArgs(\n \"This form of authRefresh(body?, query?) is deprecated. Consider replacing it with authRefresh(options?).\",\n options,\n bodyOrOptions,\n query,\n );\n\n return this.client\n .send(this.baseCollectionPath + \"/auth-refresh\", options)\n .then((data) => this.authResponse(data));\n }\n\n /**\n * Sends auth record password reset request.\n *\n * @throws {ClientResponseError}\n */\n async requestPasswordReset(email: string, options?: CommonOptions): Promise;\n\n /**\n * @deprecated\n * Consider using requestPasswordReset(email, options?).\n */\n async requestPasswordReset(email: string, body?: any, query?: any): Promise;\n\n async requestPasswordReset(\n email: string,\n bodyOrOptions?: any,\n query?: any,\n ): Promise {\n let options: any = {\n method: \"POST\",\n body: {\n email: email,\n },\n };\n\n options = normalizeLegacyOptionsArgs(\n \"This form of requestPasswordReset(email, body?, query?) is deprecated. Consider replacing it with requestPasswordReset(email, options?).\",\n options,\n bodyOrOptions,\n query,\n );\n\n return this.client\n .send(this.baseCollectionPath + \"/request-password-reset\", options)\n .then(() => true);\n }\n\n /**\n * Confirms auth record password reset request.\n *\n * @throws {ClientResponseError}\n */\n async confirmPasswordReset(\n passwordResetToken: string,\n password: string,\n passwordConfirm: string,\n options?: CommonOptions,\n ): Promise;\n\n /**\n * @deprecated\n * Consider using confirmPasswordReset(passwordResetToken, password, passwordConfirm, options?).\n */\n async confirmPasswordReset(\n passwordResetToken: string,\n password: string,\n passwordConfirm: string,\n body?: any,\n query?: any,\n ): Promise;\n\n async confirmPasswordReset(\n passwordResetToken: string,\n password: string,\n passwordConfirm: string,\n bodyOrOptions?: any,\n query?: any,\n ): Promise {\n let options: any = {\n method: \"POST\",\n body: {\n token: passwordResetToken,\n password: password,\n passwordConfirm: passwordConfirm,\n },\n };\n\n options = normalizeLegacyOptionsArgs(\n \"This form of confirmPasswordReset(token, password, passwordConfirm, body?, query?) is deprecated. Consider replacing it with confirmPasswordReset(token, password, passwordConfirm, options?).\",\n options,\n bodyOrOptions,\n query,\n );\n\n return this.client\n .send(this.baseCollectionPath + \"/confirm-password-reset\", options)\n .then(() => true);\n }\n\n /**\n * Sends auth record verification email request.\n *\n * @throws {ClientResponseError}\n */\n async requestVerification(email: string, options?: CommonOptions): Promise;\n\n /**\n * @deprecated\n * Consider using requestVerification(email, options?).\n */\n async requestVerification(email: string, body?: any, query?: any): Promise;\n\n async requestVerification(\n email: string,\n bodyOrOptions?: any,\n query?: any,\n ): Promise {\n let options: any = {\n method: \"POST\",\n body: {\n email: email,\n },\n };\n\n options = normalizeLegacyOptionsArgs(\n \"This form of requestVerification(email, body?, query?) is deprecated. Consider replacing it with requestVerification(email, options?).\",\n options,\n bodyOrOptions,\n query,\n );\n\n return this.client\n .send(this.baseCollectionPath + \"/request-verification\", options)\n .then(() => true);\n }\n\n /**\n * Confirms auth record email verification request.\n *\n * If the current `client.authStore.record` matches with the auth record from the token,\n * then on success the `client.authStore.record.verified` will be updated to `true`.\n *\n * @throws {ClientResponseError}\n */\n async confirmVerification(\n verificationToken: string,\n options?: CommonOptions,\n ): Promise;\n\n /**\n * @deprecated\n * Consider using confirmVerification(verificationToken, options?).\n */\n async confirmVerification(\n verificationToken: string,\n body?: any,\n query?: any,\n ): Promise;\n\n async confirmVerification(\n verificationToken: string,\n bodyOrOptions?: any,\n query?: any,\n ): Promise {\n let options: any = {\n method: \"POST\",\n body: {\n token: verificationToken,\n },\n };\n\n options = normalizeLegacyOptionsArgs(\n \"This form of confirmVerification(token, body?, query?) is deprecated. Consider replacing it with confirmVerification(token, options?).\",\n options,\n bodyOrOptions,\n query,\n );\n\n return this.client\n .send(this.baseCollectionPath + \"/confirm-verification\", options)\n .then(() => {\n // on success manually update the current auth record verified state\n const payload = getTokenPayload(verificationToken);\n const model = this.client.authStore.record;\n if (\n model &&\n !model.verified &&\n model.id === payload.id &&\n model.collectionId === payload.collectionId\n ) {\n model.verified = true;\n this.client.authStore.save(this.client.authStore.token, model);\n }\n\n return true;\n });\n }\n\n /**\n * Sends an email change request to the authenticated record model.\n *\n * @throws {ClientResponseError}\n */\n async requestEmailChange(newEmail: string, options?: CommonOptions): Promise;\n\n /**\n * @deprecated\n * Consider using requestEmailChange(newEmail, options?).\n */\n async requestEmailChange(newEmail: string, body?: any, query?: any): Promise;\n\n async requestEmailChange(\n newEmail: string,\n bodyOrOptions?: any,\n query?: any,\n ): Promise {\n let options: any = {\n method: \"POST\",\n body: {\n newEmail: newEmail,\n },\n };\n\n options = normalizeLegacyOptionsArgs(\n \"This form of requestEmailChange(newEmail, body?, query?) is deprecated. Consider replacing it with requestEmailChange(newEmail, options?).\",\n options,\n bodyOrOptions,\n query,\n );\n\n return this.client\n .send(this.baseCollectionPath + \"/request-email-change\", options)\n .then(() => true);\n }\n\n /**\n * Confirms auth record's new email address.\n *\n * If the current `client.authStore.record` matches with the auth record from the token,\n * then on success the `client.authStore` will be cleared.\n *\n * @throws {ClientResponseError}\n */\n async confirmEmailChange(\n emailChangeToken: string,\n password: string,\n options?: CommonOptions,\n ): Promise;\n\n /**\n * @deprecated\n * Consider using confirmEmailChange(emailChangeToken, password, options?).\n */\n async confirmEmailChange(\n emailChangeToken: string,\n password: string,\n body?: any,\n query?: any,\n ): Promise;\n\n async confirmEmailChange(\n emailChangeToken: string,\n password: string,\n bodyOrOptions?: any,\n query?: any,\n ): Promise {\n let options: any = {\n method: \"POST\",\n body: {\n token: emailChangeToken,\n password: password,\n },\n };\n\n options = normalizeLegacyOptionsArgs(\n \"This form of confirmEmailChange(token, password, body?, query?) is deprecated. Consider replacing it with confirmEmailChange(token, password, options?).\",\n options,\n bodyOrOptions,\n query,\n );\n\n return this.client\n .send(this.baseCollectionPath + \"/confirm-email-change\", options)\n .then(() => {\n const payload = getTokenPayload(emailChangeToken);\n const model = this.client.authStore.record;\n if (\n model &&\n model.id === payload.id &&\n model.collectionId === payload.collectionId\n ) {\n this.client.authStore.clear();\n }\n\n return true;\n });\n }\n\n /**\n * @deprecated use collection(\"_externalAuths\").*\n *\n * Lists all linked external auth providers for the specified auth record.\n *\n * @throws {ClientResponseError}\n */\n async listExternalAuths(\n recordId: string,\n options?: CommonOptions,\n ): Promise> {\n return this.client.collection(\"_externalAuths\").getFullList(\n Object.assign({}, options, {\n filter: this.client.filter(\"recordRef = {:id}\", { id: recordId }),\n }),\n );\n }\n\n /**\n * @deprecated use collection(\"_externalAuths\").*\n *\n * Unlink a single external auth provider from the specified auth record.\n *\n * @throws {ClientResponseError}\n */\n async unlinkExternalAuth(\n recordId: string,\n provider: string,\n options?: CommonOptions,\n ): Promise {\n const ea = await this.client.collection(\"_externalAuths\").getFirstListItem(\n this.client.filter(\"recordRef = {:recordId} && provider = {:provider}\", {\n recordId,\n provider,\n }),\n );\n\n return this.client\n .collection(\"_externalAuths\")\n .delete(ea.id, options)\n .then(() => true);\n }\n\n /**\n * Sends auth record OTP to the provided email.\n *\n * @throws {ClientResponseError}\n */\n async requestOTP(email: string, options?: CommonOptions): Promise {\n options = Object.assign(\n {\n method: \"POST\",\n body: { email: email },\n },\n options,\n );\n\n return this.client.send(this.baseCollectionPath + \"/request-otp\", options);\n }\n\n /**\n * Authenticate a single auth collection record via OTP.\n *\n * On success, this method also automatically updates\n * the client's AuthStore data and returns:\n * - the authentication token\n * - the authenticated record model\n *\n * @throws {ClientResponseError}\n */\n async authWithOTP(\n otpId: string,\n password: string,\n options?: CommonOptions,\n ): Promise> {\n options = Object.assign(\n {\n method: \"POST\",\n body: { otpId, password },\n },\n options,\n );\n\n return this.client\n .send(this.baseCollectionPath + \"/auth-with-otp\", options)\n .then((data) => this.authResponse(data));\n }\n\n /**\n * Impersonate authenticates with the specified recordId and\n * returns a new client with the received auth token in a memory store.\n *\n * If `duration` is 0 the generated auth token will fallback\n * to the default collection auth token duration.\n *\n * This action currently requires superusers privileges.\n *\n * @throws {ClientResponseError}\n */\n async impersonate(\n recordId: string,\n duration: number,\n options?: CommonOptions,\n ): Promise {\n options = Object.assign(\n {\n method: \"POST\",\n body: { duration: duration },\n },\n options,\n );\n options.headers = options.headers || {};\n if (!options.headers.Authorization) {\n options.headers.Authorization = this.client.authStore.token;\n }\n\n // create a new client loaded with the impersonated auth state\n // ---\n const client = new Client(\n this.client.baseURL,\n new BaseAuthStore(),\n this.client.lang,\n );\n\n const authData = await client.send(\n this.baseCollectionPath + \"/impersonate/\" + encodeURIComponent(recordId),\n options,\n );\n\n client.authStore.save(authData?.token, this.decode(authData?.record || {}));\n // ---\n\n return client;\n }\n\n // ---------------------------------------------------------------\n\n // very rudimentary url query params replacement because at the moment\n // URL (and URLSearchParams) doesn't seem to be fully supported in React Native\n //\n // note: for details behind some of the decode/encode parsing check https://unixpapa.com/js/querystring.html\n private _replaceQueryParams(\n url: string,\n replacements: { [key: string]: any } = {},\n ): string {\n let urlPath = url;\n let query = \"\";\n\n const queryIndex = url.indexOf(\"?\");\n if (queryIndex >= 0) {\n urlPath = url.substring(0, url.indexOf(\"?\"));\n query = url.substring(url.indexOf(\"?\") + 1);\n }\n\n const parsedParams: { [key: string]: string } = {};\n\n // parse the query parameters\n const rawParams = query.split(\"&\");\n for (const param of rawParams) {\n if (param == \"\") {\n continue;\n }\n\n const pair = param.split(\"=\");\n parsedParams[decodeURIComponent(pair[0].replace(/\\+/g, \" \"))] =\n decodeURIComponent((pair[1] || \"\").replace(/\\+/g, \" \"));\n }\n\n // apply the replacements\n for (let key in replacements) {\n if (!replacements.hasOwnProperty(key)) {\n continue;\n }\n\n if (replacements[key] == null) {\n delete parsedParams[key];\n } else {\n parsedParams[key] = replacements[key];\n }\n }\n\n // construct back the full query string\n query = \"\";\n for (let key in parsedParams) {\n if (!parsedParams.hasOwnProperty(key)) {\n continue;\n }\n\n if (query != \"\") {\n query += \"&\";\n }\n\n query +=\n encodeURIComponent(key.replace(/%20/g, \"+\")) +\n \"=\" +\n encodeURIComponent(parsedParams[key].replace(/%20/g, \"+\"));\n }\n\n return query != \"\" ? urlPath + \"?\" + query : urlPath;\n }\n}\n\nfunction openBrowserPopup(url?: string): Window | null {\n if (typeof window === \"undefined\" || !window?.open) {\n throw new ClientResponseError(\n new Error(\n `Not in a browser context - please pass a custom urlCallback function.`,\n ),\n );\n }\n\n let width = 1024;\n let height = 768;\n\n let windowWidth = window.innerWidth;\n let windowHeight = window.innerHeight;\n\n // normalize window size\n width = width > windowWidth ? windowWidth : width;\n height = height > windowHeight ? windowHeight : height;\n\n let left = windowWidth / 2 - width / 2;\n let top = windowHeight / 2 - height / 2;\n\n // note: we don't use the noopener and noreferrer attributes since\n // for some reason browser blocks such windows then url is undefined/blank\n return window.open(\n url,\n \"popup_window\",\n \"width=\" +\n width +\n \",height=\" +\n height +\n \",top=\" +\n top +\n \",left=\" +\n left +\n \",resizable,menubar=no\",\n );\n}\n","import { CrudService } from \"@/services/CrudService\";\nimport { CollectionModel } from \"@/tools/dtos\";\nimport { CommonOptions } from \"@/tools/options\";\n\nexport class CollectionService extends CrudService {\n /**\n * @inheritdoc\n */\n get baseCrudPath(): string {\n return \"/api/collections\";\n }\n\n /**\n * Imports the provided collections.\n *\n * If `deleteMissing` is `true`, all local collections and their fields,\n * that are not present in the imported configuration, WILL BE DELETED\n * (including their related records data)!\n *\n * @throws {ClientResponseError}\n */\n async import(\n collections: Array,\n deleteMissing: boolean = false,\n options?: CommonOptions,\n ): Promise {\n options = Object.assign(\n {\n method: \"PUT\",\n body: {\n collections: collections,\n deleteMissing: deleteMissing,\n },\n },\n options,\n );\n\n return this.client.send(this.baseCrudPath + \"/import\", options).then(() => true);\n }\n\n /**\n * Returns type indexed map with scaffolded collection models\n * populated with their default field values.\n *\n * @throws {ClientResponseError}\n */\n async getScaffolds(\n options?: CommonOptions,\n ): Promise<{ [key: string]: CollectionModel }> {\n options = Object.assign(\n {\n method: \"GET\",\n },\n options,\n );\n\n return this.client.send(this.baseCrudPath + \"/meta/scaffolds\", options);\n }\n\n /**\n * Deletes all records associated with the specified collection.\n *\n * @throws {ClientResponseError}\n */\n async truncate(collectionIdOrName: string, options?: CommonOptions): Promise {\n options = Object.assign(\n {\n method: \"DELETE\",\n },\n options,\n );\n\n return this.client\n .send(\n this.baseCrudPath +\n \"/\" +\n encodeURIComponent(collectionIdOrName) +\n \"/truncate\",\n options,\n )\n .then(() => true);\n }\n}\n","import { ClientResponseError } from \"@/ClientResponseError\";\nimport { BaseService } from \"@/services/BaseService\";\nimport { ListResult, LogModel } from \"@/tools/dtos\";\nimport { CommonOptions, ListOptions, LogStatsOptions } from \"@/tools/options\";\n\nexport interface HourlyStats {\n total: number;\n date: string;\n}\n\nexport class LogService extends BaseService {\n /**\n * Returns paginated logs list.\n *\n * @throws {ClientResponseError}\n */\n async getList(\n page = 1,\n perPage = 30,\n options?: ListOptions,\n ): Promise> {\n options = Object.assign({ method: \"GET\" }, options);\n\n options.query = Object.assign(\n {\n page: page,\n perPage: perPage,\n },\n options.query,\n );\n\n return this.client.send(\"/api/logs\", options);\n }\n\n /**\n * Returns a single log by its id.\n *\n * If `id` is empty it will throw a 404 error.\n *\n * @throws {ClientResponseError}\n */\n async getOne(id: string, options?: CommonOptions): Promise {\n if (!id) {\n throw new ClientResponseError({\n url: this.client.buildURL(\"/api/logs/\"),\n status: 404,\n response: {\n code: 404,\n message: \"Missing required log id.\",\n data: {},\n },\n });\n }\n\n options = Object.assign(\n {\n method: \"GET\",\n },\n options,\n );\n\n return this.client.send(\"/api/logs/\" + encodeURIComponent(id), options);\n }\n\n /**\n * Returns logs statistics.\n *\n * @throws {ClientResponseError}\n */\n async getStats(options?: LogStatsOptions): Promise> {\n options = Object.assign(\n {\n method: \"GET\",\n },\n options,\n );\n\n return this.client.send(\"/api/logs/stats\", options);\n }\n}\n","import { BaseService } from \"@/services/BaseService\";\nimport { CommonOptions } from \"@/tools/options\";\n\nexport interface HealthCheckResponse {\n code: number;\n message: string;\n data: { [key: string]: any };\n}\n\nexport class HealthService extends BaseService {\n /**\n * Checks the health status of the api.\n *\n * @throws {ClientResponseError}\n */\n async check(options?: CommonOptions): Promise {\n options = Object.assign(\n {\n method: \"GET\",\n },\n options,\n );\n\n return this.client.send(\"/api/health\", options);\n }\n}\n","import { BaseService } from \"@/services/BaseService\";\nimport { CommonOptions, FileOptions } from \"@/tools/options\";\n\nexport class FileService extends BaseService {\n /**\n * @deprecated Please replace with `pb.files.getURL()`.\n */\n getUrl(\n record: { [key: string]: any },\n filename: string,\n queryParams: FileOptions = {},\n ): string {\n console.warn(\"Please replace pb.files.getUrl() with pb.files.getURL()\");\n return this.getURL(record, filename, queryParams);\n }\n\n /**\n * Builds and returns an absolute record file url for the provided filename.\n */\n getURL(\n record: { [key: string]: any },\n filename: string,\n queryParams: FileOptions = {},\n ): string {\n if (\n !filename ||\n !record?.id ||\n !(record?.collectionId || record?.collectionName)\n ) {\n return \"\";\n }\n\n const parts = [];\n parts.push(\"api\");\n parts.push(\"files\");\n parts.push(encodeURIComponent(record.collectionId || record.collectionName));\n parts.push(encodeURIComponent(record.id));\n parts.push(encodeURIComponent(filename));\n\n let result = this.client.buildURL(parts.join(\"/\"));\n\n if (Object.keys(queryParams).length) {\n // normalize the download query param for consistency with the Dart sdk\n if (queryParams.download === false) {\n delete queryParams.download;\n }\n\n const params = new URLSearchParams(queryParams);\n\n result += (result.includes(\"?\") ? \"&\" : \"?\") + params;\n }\n\n return result;\n }\n\n /**\n * Requests a new private file access token for the current auth model.\n *\n * @throws {ClientResponseError}\n */\n async getToken(options?: CommonOptions): Promise {\n options = Object.assign(\n {\n method: \"POST\",\n },\n options,\n );\n\n return this.client\n .send(\"/api/files/token\", options)\n .then((data) => data?.token || \"\");\n }\n}\n","import { BaseService } from \"@/services/BaseService\";\nimport { CommonOptions } from \"@/tools/options\";\n\nexport interface BackupFileInfo {\n key: string;\n size: number;\n modified: string;\n}\n\nexport class BackupService extends BaseService {\n /**\n * Returns list with all available backup files.\n *\n * @throws {ClientResponseError}\n */\n async getFullList(options?: CommonOptions): Promise> {\n options = Object.assign(\n {\n method: \"GET\",\n },\n options,\n );\n\n return this.client.send(\"/api/backups\", options);\n }\n\n /**\n * Initializes a new backup.\n *\n * @throws {ClientResponseError}\n */\n async create(basename: string, options?: CommonOptions): Promise {\n options = Object.assign(\n {\n method: \"POST\",\n body: {\n name: basename,\n },\n },\n options,\n );\n\n return this.client.send(\"/api/backups\", options).then(() => true);\n }\n\n /**\n * Uploads an existing backup file.\n *\n * Example:\n *\n * ```js\n * await pb.backups.upload({\n * file: new Blob([...]),\n * });\n * ```\n *\n * @throws {ClientResponseError}\n */\n async upload(\n bodyParams: { [key: string]: any } | FormData,\n options?: CommonOptions,\n ): Promise {\n options = Object.assign(\n {\n method: \"POST\",\n body: bodyParams,\n },\n options,\n );\n\n return this.client.send(\"/api/backups/upload\", options).then(() => true);\n }\n\n /**\n * Deletes a single backup file.\n *\n * @throws {ClientResponseError}\n */\n async delete(key: string, options?: CommonOptions): Promise {\n options = Object.assign(\n {\n method: \"DELETE\",\n },\n options,\n );\n\n return this.client\n .send(`/api/backups/${encodeURIComponent(key)}`, options)\n .then(() => true);\n }\n\n /**\n * Initializes an app data restore from an existing backup.\n *\n * @throws {ClientResponseError}\n */\n async restore(key: string, options?: CommonOptions): Promise {\n options = Object.assign(\n {\n method: \"POST\",\n },\n options,\n );\n\n return this.client\n .send(`/api/backups/${encodeURIComponent(key)}/restore`, options)\n .then(() => true);\n }\n\n /**\n * @deprecated Please use `getDownloadURL()`.\n */\n getDownloadUrl(token: string, key: string): string {\n console.warn(\n \"Please replace pb.backups.getDownloadUrl() with pb.backups.getDownloadURL()\",\n );\n return this.getDownloadURL(token, key);\n }\n\n /**\n * Builds a download url for a single existing backup using a\n * superuser file token and the backup file key.\n *\n * The file token can be generated via `pb.files.getToken()`.\n */\n getDownloadURL(token: string, key: string): string {\n return this.client.buildURL(\n `/api/backups/${encodeURIComponent(key)}?token=${encodeURIComponent(token)}`,\n );\n }\n}\n","import { BaseService } from \"@/services/BaseService\";\nimport { CommonOptions } from \"@/tools/options\";\n\nexport interface CronJob {\n id: string;\n expression: string;\n}\n\nexport class CronService extends BaseService {\n /**\n * Returns list with all registered cron jobs.\n *\n * @throws {ClientResponseError}\n */\n async getFullList(options?: CommonOptions): Promise> {\n options = Object.assign(\n {\n method: \"GET\",\n },\n options,\n );\n\n return this.client.send(\"/api/crons\", options);\n }\n\n /**\n * Runs the specified cron job.\n *\n * @throws {ClientResponseError}\n */\n async run(jobId: string, options?: CommonOptions): Promise {\n options = Object.assign(\n {\n method: \"POST\",\n },\n options,\n );\n\n return this.client\n .send(`/api/crons/${encodeURIComponent(jobId)}`, options)\n .then(() => true);\n }\n}\n","/**\n * Checks if the specified value is a file (aka. File, Blob, RN file object).\n */\nexport function isFile(val: any): boolean {\n return (\n (typeof Blob !== \"undefined\" && val instanceof Blob) ||\n (typeof File !== \"undefined\" && val instanceof File) ||\n // check for React Native file object format\n // (see https://github.com/pocketbase/pocketbase/discussions/2002#discussioncomment-5254168)\n (val !== null &&\n typeof val === \"object\" &&\n val.uri &&\n ((typeof navigator !== \"undefined\" && navigator.product === \"ReactNative\") ||\n (typeof global !== \"undefined\" && (global as any).HermesInternal)))\n );\n}\n\n/**\n * Loosely checks if the specified body is a FormData instance.\n */\nexport function isFormData(body: any): boolean {\n return (\n body &&\n // we are checking the constructor name because FormData\n // is not available natively in some environments and the\n // polyfill(s) may not be globally accessible\n (body.constructor?.name === \"FormData\" ||\n // fallback to global FormData instance check\n // note: this is needed because the constructor.name could be different in case of\n // custom global FormData implementation, eg. React Native on Android/iOS\n (typeof FormData !== \"undefined\" && body instanceof FormData))\n );\n}\n\n/**\n * Checks if the submitted body object has at least one Blob/File field value.\n */\nexport function hasFileField(body: { [key: string]: any }): boolean {\n for (const key in body) {\n const values = Array.isArray(body[key]) ? body[key] : [body[key]];\n for (const v of values) {\n if (isFile(v)) {\n return true;\n }\n }\n }\n\n return false;\n}\n\n/**\n * Converts analyzes the provided body and converts it to FormData\n * in case a plain object with File/Blob values is used.\n */\nexport function convertToFormDataIfNeeded(body: any): any {\n if (\n typeof FormData === \"undefined\" ||\n typeof body === \"undefined\" ||\n typeof body !== \"object\" ||\n body === null ||\n isFormData(body) ||\n !hasFileField(body)\n ) {\n return body;\n }\n\n const form = new FormData();\n\n for (const key in body) {\n const val = body[key];\n\n // skip undefined values for consistency with JSON.stringify\n // (see https://github.com/pocketbase/pocketbase/issues/6731#issuecomment-2812382827)\n if (typeof val === \"undefined\") {\n continue;\n }\n\n if (typeof val === \"object\" && !hasFileField({ data: val })) {\n // send json-like values as jsonPayload to avoid the implicit string value normalization\n let payload: { [key: string]: any } = {};\n payload[key] = val;\n form.append(\"@jsonPayload\", JSON.stringify(payload));\n } else {\n // in case of mixed string and file/blob\n const normalizedVal = Array.isArray(val) ? val : [val];\n for (let v of normalizedVal) {\n form.append(key, v);\n }\n }\n }\n\n return form;\n}\n\n/**\n * Converts the provided FormData instance into a plain object.\n *\n * For consistency with the server multipart/form-data inferring,\n * the following normalization rules are applied for plain multipart string values:\n * - \"true\" is converted to the json \"true\"\n * - \"false\" is converted to the json \"false\"\n * - numeric strings are converted to json number ONLY if the resulted\n * minimal number string representation is the same as the provided raw string\n * (aka. scientific notations, \"Infinity\", \"0.0\", \"0001\", etc. are kept as string)\n * - any other string (empty string too) is left as it is\n */\nexport function convertFormDataToObject(formData: FormData): { [key: string]: any } {\n let result: { [key: string]: any } = {};\n\n formData.forEach((v, k) => {\n if (k === \"@jsonPayload\" && typeof v == \"string\") {\n try {\n let parsed = JSON.parse(v);\n Object.assign(result, parsed);\n } catch (err) {\n console.warn(\"@jsonPayload error:\", err);\n }\n } else {\n if (typeof result[k] !== \"undefined\") {\n if (!Array.isArray(result[k])) {\n result[k] = [result[k]];\n }\n result[k].push(inferFormDataValue(v));\n } else {\n result[k] = inferFormDataValue(v);\n }\n }\n });\n\n return result;\n}\n\nconst inferNumberCharsRegex = /^[\\-\\.\\d]+$/;\n\nfunction inferFormDataValue(value: any): any {\n if (typeof value != \"string\") {\n return value;\n }\n\n if (value == \"true\") {\n return true;\n }\n\n if (value == \"false\") {\n return false;\n }\n\n // note: expects the provided raw string to match exactly with the minimal string representation of the parsed number\n if (\n (value[0] === \"-\" || (value[0] >= \"0\" && value[0] <= \"9\")) &&\n inferNumberCharsRegex.test(value)\n ) {\n let num = +value;\n if (\"\" + num === value) {\n return num;\n }\n }\n\n return value;\n}\n","import { BaseService } from \"@/services/BaseService\";\nimport { isFile, isFormData, convertFormDataToObject } from \"@/tools/formdata\";\nimport {\n SendOptions,\n RecordOptions,\n normalizeUnknownQueryParams,\n serializeQueryParams,\n} from \"@/tools/options\";\n\nexport interface BatchRequest {\n method: string;\n url: string;\n json?: { [key: string]: any };\n files?: { [key: string]: Array };\n headers?: { [key: string]: string };\n}\n\nexport interface BatchRequestResult {\n status: number;\n body: any;\n}\n\nexport class BatchService extends BaseService {\n private requests: Array = [];\n private subs: { [key: string]: SubBatchService } = {};\n\n /**\n * Starts constructing a batch request entry for the specified collection.\n */\n collection(collectionIdOrName: string): SubBatchService {\n if (!this.subs[collectionIdOrName]) {\n this.subs[collectionIdOrName] = new SubBatchService(\n this.requests,\n collectionIdOrName,\n );\n }\n\n return this.subs[collectionIdOrName];\n }\n\n /**\n * Sends the batch requests.\n *\n * @throws {ClientResponseError}\n */\n async send(options?: SendOptions): Promise> {\n const formData = new FormData();\n\n const jsonData = [];\n\n for (let i = 0; i < this.requests.length; i++) {\n const req = this.requests[i];\n\n jsonData.push({\n method: req.method,\n url: req.url,\n headers: req.headers,\n body: req.json,\n });\n\n if (req.files) {\n for (let key in req.files) {\n const files = req.files[key] || [];\n for (let file of files) {\n formData.append(\"requests.\" + i + \".\" + key, file);\n }\n }\n }\n }\n\n formData.append(\"@jsonPayload\", JSON.stringify({ requests: jsonData }));\n\n options = Object.assign(\n {\n method: \"POST\",\n body: formData,\n },\n options,\n );\n\n return this.client.send(\"/api/batch\", options);\n }\n}\n\nexport class SubBatchService {\n private requests: Array = [];\n private readonly collectionIdOrName: string;\n\n constructor(requests: Array, collectionIdOrName: string) {\n this.requests = requests;\n this.collectionIdOrName = collectionIdOrName;\n }\n\n /**\n * Registers a record upsert request into the current batch queue.\n *\n * The request will be executed as update if `bodyParams` have a valid existing record `id` value, otherwise - create.\n */\n upsert(\n bodyParams?: { [key: string]: any } | FormData,\n options?: RecordOptions,\n ): void {\n options = Object.assign(\n {\n body: bodyParams || {},\n },\n options,\n );\n\n const request: BatchRequest = {\n method: \"PUT\",\n url:\n \"/api/collections/\" +\n encodeURIComponent(this.collectionIdOrName) +\n \"/records\",\n };\n\n this.prepareRequest(request, options);\n\n this.requests.push(request);\n }\n\n /**\n * Registers a record create request into the current batch queue.\n */\n create(\n bodyParams?: { [key: string]: any } | FormData,\n options?: RecordOptions,\n ): void {\n options = Object.assign(\n {\n body: bodyParams || {},\n },\n options,\n );\n\n const request: BatchRequest = {\n method: \"POST\",\n url:\n \"/api/collections/\" +\n encodeURIComponent(this.collectionIdOrName) +\n \"/records\",\n };\n\n this.prepareRequest(request, options);\n\n this.requests.push(request);\n }\n\n /**\n * Registers a record update request into the current batch queue.\n */\n update(\n id: string,\n bodyParams?: { [key: string]: any } | FormData,\n options?: RecordOptions,\n ): void {\n options = Object.assign(\n {\n body: bodyParams || {},\n },\n options,\n );\n\n const request: BatchRequest = {\n method: \"PATCH\",\n url:\n \"/api/collections/\" +\n encodeURIComponent(this.collectionIdOrName) +\n \"/records/\" +\n encodeURIComponent(id),\n };\n\n this.prepareRequest(request, options);\n\n this.requests.push(request);\n }\n\n /**\n * Registers a record delete request into the current batch queue.\n */\n delete(id: string, options?: SendOptions): void {\n options = Object.assign({}, options);\n\n const request: BatchRequest = {\n method: \"DELETE\",\n url:\n \"/api/collections/\" +\n encodeURIComponent(this.collectionIdOrName) +\n \"/records/\" +\n encodeURIComponent(id),\n };\n\n this.prepareRequest(request, options);\n\n this.requests.push(request);\n }\n\n private prepareRequest(request: BatchRequest, options: SendOptions) {\n normalizeUnknownQueryParams(options);\n\n request.headers = options.headers;\n request.json = {};\n request.files = {};\n\n // serialize query parameters\n // -----------------------------------------------------------\n if (typeof options.query !== \"undefined\") {\n const query = serializeQueryParams(options.query);\n if (query) {\n request.url += (request.url.includes(\"?\") ? \"&\" : \"?\") + query;\n }\n }\n\n // extract json and files body data\n // -----------------------------------------------------------\n let body = options.body;\n if (isFormData(body)) {\n body = convertFormDataToObject(body);\n }\n\n for (const key in body) {\n const val = body[key];\n\n if (isFile(val)) {\n request.files[key] = request.files[key] || [];\n request.files[key].push(val);\n } else if (Array.isArray(val)) {\n const foundFiles = [];\n const foundRegular = [];\n for (const v of val) {\n if (isFile(v)) {\n foundFiles.push(v);\n } else {\n foundRegular.push(v);\n }\n }\n\n if (foundFiles.length > 0 && foundFiles.length == val.length) {\n // only files\n // ---\n request.files[key] = request.files[key] || [];\n for (let file of foundFiles) {\n request.files[key].push(file);\n }\n } else {\n // empty or mixed array (both regular and File/Blob values)\n // ---\n request.json[key] = foundRegular;\n\n if (foundFiles.length > 0) {\n // add \"+\" to append if not already since otherwise\n // the existing regular files will be deleted\n // (the mixed values order is preserved only within their corresponding groups)\n let fileKey = key;\n if (!key.startsWith(\"+\") && !key.endsWith(\"+\")) {\n fileKey += \"+\";\n }\n\n request.files[fileKey] = request.files[fileKey] || [];\n for (let file of foundFiles) {\n request.files[fileKey].push(file);\n }\n }\n }\n } else {\n request.json[key] = val;\n }\n }\n }\n}\n","import { ClientResponseError } from \"@/ClientResponseError\";\nimport { BaseAuthStore } from \"@/stores/BaseAuthStore\";\nimport { LocalAuthStore } from \"@/stores/LocalAuthStore\";\nimport { SettingsService } from \"@/services/SettingsService\";\nimport { RecordService } from \"@/services/RecordService\";\nimport { CollectionService } from \"@/services/CollectionService\";\nimport { LogService } from \"@/services/LogService\";\nimport { RealtimeService } from \"@/services/RealtimeService\";\nimport { HealthService } from \"@/services/HealthService\";\nimport { FileService } from \"@/services/FileService\";\nimport { BackupService } from \"@/services/BackupService\";\nimport { CronService } from \"@/services/CronService\";\nimport { BatchService } from \"@/services/BatchService\";\nimport { RecordModel } from \"@/tools/dtos\";\nimport {\n SendOptions,\n FileOptions,\n normalizeUnknownQueryParams,\n serializeQueryParams,\n} from \"@/tools/options\";\nimport { isFormData, convertToFormDataIfNeeded } from \"@/tools/formdata\";\n\nexport interface BeforeSendResult {\n [key: string]: any; // for backward compatibility\n url?: string;\n options?: { [key: string]: any };\n}\n\n/**\n * PocketBase JS Client.\n */\nexport default class Client {\n /**\n * The base PocketBase backend url address (eg. 'http://127.0.0.1.8090').\n */\n baseURL: string;\n\n /**\n * Legacy getter alias for baseURL.\n * @deprecated Please replace with baseURL.\n */\n get baseUrl(): string {\n return this.baseURL;\n }\n\n /**\n * Legacy setter alias for baseURL.\n * @deprecated Please replace with baseURL.\n */\n set baseUrl(v: string) {\n this.baseURL = v;\n }\n\n /**\n * Hook that get triggered right before sending the fetch request,\n * allowing you to inspect and modify the url and request options.\n *\n * For list of the possible options check https://developer.mozilla.org/en-US/docs/Web/API/fetch#options\n *\n * You can return a non-empty result object `{ url, options }` to replace the url and request options entirely.\n *\n * Example:\n * ```js\n * const pb = new PocketBase(\"https://example.com\")\n *\n * pb.beforeSend = function (url, options) {\n * options.headers = Object.assign({}, options.headers, {\n * 'X-Custom-Header': 'example',\n * })\n *\n * return { url, options }\n * }\n *\n * // use the created client as usual...\n * ```\n */\n beforeSend?: (\n url: string,\n options: SendOptions,\n ) => BeforeSendResult | Promise;\n\n /**\n * Hook that get triggered after successfully sending the fetch request,\n * allowing you to inspect/modify the response object and its parsed data.\n *\n * Returns the new Promise resolved `data` that will be returned to the client.\n *\n * Example:\n * ```js\n * const pb = new PocketBase(\"https://example.com\")\n *\n * pb.afterSend = function (response, data, options) {\n * if (response.status != 200) {\n * throw new ClientResponseError({\n * url: response.url,\n * status: response.status,\n * response: { ... },\n * })\n * }\n *\n * return data;\n * }\n *\n * // use the created client as usual...\n * ```\n */\n afterSend?: ((response: Response, data: any) => any) &\n ((response: Response, data: any, options: SendOptions) => any);\n\n /**\n * Optional language code (default to `en-US`) that will be sent\n * with the requests to the server as `Accept-Language` header.\n */\n lang: string;\n\n /**\n * A replaceable instance of the local auth store service.\n */\n authStore: BaseAuthStore;\n\n /**\n * An instance of the service that handles the **Settings APIs**.\n */\n readonly settings: SettingsService;\n\n /**\n * An instance of the service that handles the **Collection APIs**.\n */\n readonly collections: CollectionService;\n\n /**\n * An instance of the service that handles the **File APIs**.\n */\n readonly files: FileService;\n\n /**\n * An instance of the service that handles the **Log APIs**.\n */\n readonly logs: LogService;\n\n /**\n * An instance of the service that handles the **Realtime APIs**.\n */\n readonly realtime: RealtimeService;\n\n /**\n * An instance of the service that handles the **Health APIs**.\n */\n readonly health: HealthService;\n\n /**\n * An instance of the service that handles the **Backup APIs**.\n */\n readonly backups: BackupService;\n\n /**\n * An instance of the service that handles the **Cron APIs**.\n */\n readonly crons: CronService;\n\n private cancelControllers: { [key: string]: AbortController } = {};\n private recordServices: { [key: string]: RecordService } = {};\n private enableAutoCancellation: boolean = true;\n\n constructor(baseURL = \"/\", authStore?: BaseAuthStore | null, lang = \"en-US\") {\n this.baseURL = baseURL;\n this.lang = lang;\n\n if (authStore) {\n this.authStore = authStore;\n } else if (typeof window != \"undefined\" && !!(window as any).Deno) {\n // note: to avoid common security issues we fallback to runtime/memory store in case the code is running in Deno env\n this.authStore = new BaseAuthStore();\n } else {\n this.authStore = new LocalAuthStore();\n }\n\n // common services\n this.collections = new CollectionService(this);\n this.files = new FileService(this);\n this.logs = new LogService(this);\n this.settings = new SettingsService(this);\n this.realtime = new RealtimeService(this);\n this.health = new HealthService(this);\n this.backups = new BackupService(this);\n this.crons = new CronService(this);\n }\n\n /**\n * @deprecated\n * With PocketBase v0.23.0 admins are converted to a regular auth\n * collection named \"_superusers\", aka. you can use directly collection(\"_superusers\").\n */\n get admins(): RecordService {\n return this.collection(\"_superusers\");\n }\n\n /**\n * Creates a new batch handler for sending multiple transactional\n * create/update/upsert/delete collection requests in one network call.\n *\n * Example:\n * ```js\n * const batch = pb.createBatch();\n *\n * batch.collection(\"example1\").create({ ... })\n * batch.collection(\"example2\").update(\"RECORD_ID\", { ... })\n * batch.collection(\"example3\").delete(\"RECORD_ID\")\n * batch.collection(\"example4\").upsert({ ... })\n *\n * await batch.send()\n * ```\n */\n createBatch(): BatchService {\n return new BatchService(this);\n }\n\n /**\n * Returns the RecordService associated to the specified collection.\n */\n collection(idOrName: string): RecordService {\n if (!this.recordServices[idOrName]) {\n this.recordServices[idOrName] = new RecordService(this, idOrName);\n }\n\n return this.recordServices[idOrName];\n }\n\n /**\n * Globally enable or disable auto cancellation for pending duplicated requests.\n */\n autoCancellation(enable: boolean): Client {\n this.enableAutoCancellation = !!enable;\n\n return this;\n }\n\n /**\n * Cancels single request by its cancellation key.\n */\n cancelRequest(requestKey: string): Client {\n if (this.cancelControllers[requestKey]) {\n this.cancelControllers[requestKey].abort();\n delete this.cancelControllers[requestKey];\n }\n\n return this;\n }\n\n /**\n * Cancels all pending requests.\n */\n cancelAllRequests(): Client {\n for (let k in this.cancelControllers) {\n this.cancelControllers[k].abort();\n }\n\n this.cancelControllers = {};\n\n return this;\n }\n\n /**\n * Constructs a filter expression with placeholders populated from a parameters object.\n *\n * Placeholder parameters are defined with the `{:paramName}` notation.\n *\n * The following parameter values are supported:\n *\n * - `string` (_single quotes are autoescaped_)\n * - `number`\n * - `boolean`\n * - `Date` object (_stringified into the PocketBase datetime format_)\n * - `null`\n * - everything else is converted to a string using `JSON.stringify()`\n *\n * Example:\n *\n * ```js\n * pb.collection(\"example\").getFirstListItem(pb.filter(\n * 'title ~ {:title} && created >= {:created}',\n * { title: \"example\", created: new Date()}\n * ))\n * ```\n */\n filter(raw: string, params?: { [key: string]: any }): string {\n if (!params) {\n return raw;\n }\n\n for (let key in params) {\n let val = params[key];\n switch (typeof val) {\n case \"boolean\":\n case \"number\":\n val = \"\" + val;\n break;\n case \"string\":\n val = \"'\" + val.replace(/'/g, \"\\\\'\") + \"'\";\n break;\n default:\n if (val === null) {\n val = \"null\";\n } else if (val instanceof Date) {\n val = \"'\" + val.toISOString().replace(\"T\", \" \") + \"'\";\n } else {\n val = \"'\" + JSON.stringify(val).replace(/'/g, \"\\\\'\") + \"'\";\n }\n }\n raw = raw.replaceAll(\"{:\" + key + \"}\", val);\n }\n\n return raw;\n }\n\n /**\n * @deprecated Please use `pb.files.getURL()`.\n */\n getFileUrl(\n record: { [key: string]: any },\n filename: string,\n queryParams: FileOptions = {},\n ): string {\n console.warn(\"Please replace pb.getFileUrl() with pb.files.getURL()\");\n return this.files.getURL(record, filename, queryParams);\n }\n\n /**\n * @deprecated Please use `pb.buildURL()`.\n */\n buildUrl(path: string): string {\n console.warn(\"Please replace pb.buildUrl() with pb.buildURL()\");\n return this.buildURL(path);\n }\n\n /**\n * Builds a full client url by safely concatenating the provided path.\n */\n buildURL(path: string): string {\n let url = this.baseURL;\n\n // construct an absolute base url if in a browser environment\n if (\n typeof window !== \"undefined\" &&\n !!window.location &&\n !url.startsWith(\"https://\") &&\n !url.startsWith(\"http://\")\n ) {\n url = window.location.origin?.endsWith(\"/\")\n ? window.location.origin.substring(0, window.location.origin.length - 1)\n : window.location.origin || \"\";\n\n if (!this.baseURL.startsWith(\"/\")) {\n url += window.location.pathname || \"/\";\n url += url.endsWith(\"/\") ? \"\" : \"/\";\n }\n\n url += this.baseURL;\n }\n\n // concatenate the path\n if (path) {\n url += url.endsWith(\"/\") ? \"\" : \"/\"; // append trailing slash if missing\n url += path.startsWith(\"/\") ? path.substring(1) : path;\n }\n\n return url;\n }\n\n /**\n * Sends an api http request.\n *\n * @throws {ClientResponseError}\n */\n async send(path: string, options: SendOptions): Promise {\n options = this.initSendOptions(path, options);\n\n // build url + path\n let url = this.buildURL(path);\n\n if (this.beforeSend) {\n const result = Object.assign({}, await this.beforeSend(url, options));\n if (\n typeof result.url !== \"undefined\" ||\n typeof result.options !== \"undefined\"\n ) {\n url = result.url || url;\n options = result.options || options;\n } else if (Object.keys(result).length) {\n // legacy behavior\n options = result as SendOptions;\n console?.warn &&\n console.warn(\n \"Deprecated format of beforeSend return: please use `return { url, options }`, instead of `return options`.\",\n );\n }\n }\n\n // serialize the query parameters\n if (typeof options.query !== \"undefined\") {\n const query = serializeQueryParams(options.query);\n if (query) {\n url += (url.includes(\"?\") ? \"&\" : \"?\") + query;\n }\n delete options.query;\n }\n\n // ensures that the json body is serialized\n if (\n this.getHeader(options.headers, \"Content-Type\") == \"application/json\" &&\n options.body &&\n typeof options.body !== \"string\"\n ) {\n options.body = JSON.stringify(options.body);\n }\n\n // early throw an abort error in case the request was already cancelled\n const fetchFunc = options.fetch || fetch;\n\n // send the request\n return fetchFunc(url, options)\n .then(async (response) => {\n let data: any = {};\n\n try {\n data = await response.json();\n } catch (err) {\n // @todo map against the response content type\n // all api responses are expected to return json\n // with exception of the realtime events and 204\n if (\n options.signal?.aborted ||\n (\n typeof DOMException !== \"undefined\" && err instanceof DOMException &&\n // https://developer.mozilla.org/en-US/docs/Web/API/DOMException#aborterror\n (err.name == \"AbortError\" || err.code == 20)\n )\n ) {\n throw err;\n }\n }\n\n if (this.afterSend) {\n data = await this.afterSend(response, data, options);\n }\n\n if (response.status >= 400) {\n throw new ClientResponseError({\n url: response.url,\n status: response.status,\n data: data,\n });\n }\n\n return data as T;\n })\n .catch((err) => {\n // wrap to normalize all errors\n throw new ClientResponseError(err);\n });\n }\n\n /**\n * Shallow copy the provided object and takes care to initialize\n * any options required to preserve the backward compatability.\n *\n * @param {SendOptions} options\n * @return {SendOptions}\n */\n private initSendOptions(path: string, options: SendOptions): SendOptions {\n options = Object.assign({ method: \"GET\" } as SendOptions, options);\n\n // auto convert the body to FormData, if needed\n options.body = convertToFormDataIfNeeded(options.body);\n\n // move unknown send options as query parameters\n normalizeUnknownQueryParams(options);\n\n // requestKey normalizations for backward-compatibility\n // ---\n options.query = Object.assign({}, options.params, options.query);\n if (typeof options.requestKey === \"undefined\") {\n if (options.$autoCancel === false || options.query.$autoCancel === false) {\n options.requestKey = null;\n } else if (options.$cancelKey || options.query.$cancelKey) {\n options.requestKey = options.$cancelKey || options.query.$cancelKey;\n }\n }\n // remove the deprecated special cancellation params from the other query params\n delete options.$autoCancel;\n delete options.query.$autoCancel;\n delete options.$cancelKey;\n delete options.query.$cancelKey;\n // ---\n\n // add the json header, if not explicitly set\n // (for FormData body the Content-Type header should be skipped since the boundary is autogenerated)\n if (\n this.getHeader(options.headers, \"Content-Type\") === null &&\n !isFormData(options.body)\n ) {\n options.headers = Object.assign({}, options.headers, {\n \"Content-Type\": \"application/json\",\n });\n }\n\n // add Accept-Language header, if not explicitly set\n if (this.getHeader(options.headers, \"Accept-Language\") === null) {\n options.headers = Object.assign({}, options.headers, {\n \"Accept-Language\": this.lang,\n });\n }\n\n // check if Authorization header can be added\n if (\n // has valid token\n this.authStore.token &&\n // auth header is not explicitly set\n this.getHeader(options.headers, \"Authorization\") === null\n ) {\n options.headers = Object.assign({}, options.headers, {\n Authorization: this.authStore.token,\n });\n }\n\n // handle auto cancelation for duplicated pending request\n if (this.enableAutoCancellation && options.requestKey !== null) {\n const requestKey = options.requestKey || (options.method || \"GET\") + path;\n\n delete options.requestKey;\n\n // cancel previous pending requests\n this.cancelRequest(requestKey);\n\n const controller = new AbortController();\n this.cancelControllers[requestKey] = controller;\n options.signal = controller.signal;\n }\n\n return options;\n }\n\n /**\n * Extracts the header with the provided name in case-insensitive manner.\n * Returns `null` if no header matching the name is found.\n */\n private getHeader(\n headers: { [key: string]: string } | undefined,\n name: string,\n ): string | null {\n headers = headers || {};\n name = name.toLowerCase();\n\n for (let key in headers) {\n if (key.toLowerCase() == name) {\n return headers[key];\n }\n }\n\n return null;\n }\n}\n","import { BaseAuthStore, AuthRecord } from \"@/stores/BaseAuthStore\";\n\nexport type AsyncSaveFunc = (serializedPayload: string) => Promise;\n\nexport type AsyncClearFunc = () => Promise;\n\ntype queueFunc = () => Promise;\n\n/**\n * AsyncAuthStore is a helper auth store implementation\n * that could be used with any external async persistent layer\n * (key-value db, local file, etc.).\n *\n * Here is an example with the React Native AsyncStorage package:\n *\n * ```\n * import AsyncStorage from \"@react-native-async-storage/async-storage\";\n * import PocketBase, { AsyncAuthStore } from \"pocketbase\";\n *\n * const store = new AsyncAuthStore({\n * save: async (serialized) => AsyncStorage.setItem(\"pb_auth\", serialized),\n * initial: AsyncStorage.getItem(\"pb_auth\"),\n * });\n *\n * const pb = new PocketBase(\"https://example.com\", store)\n * ```\n */\nexport class AsyncAuthStore extends BaseAuthStore {\n private saveFunc: AsyncSaveFunc;\n private clearFunc?: AsyncClearFunc;\n private queue: Array = [];\n\n constructor(config: {\n // The async function that is called every time\n // when the auth store state needs to be persisted.\n save: AsyncSaveFunc;\n\n /// An *optional* async function that is called every time\n /// when the auth store needs to be cleared.\n ///\n /// If not explicitly set, `saveFunc` with empty data will be used.\n clear?: AsyncClearFunc;\n\n // An *optional* initial data to load into the store.\n initial?: string | Promise;\n }) {\n super();\n\n this.saveFunc = config.save;\n this.clearFunc = config.clear;\n\n this._enqueue(() => this._loadInitial(config.initial));\n }\n\n /**\n * @inheritdoc\n */\n save(token: string, record?: AuthRecord): void {\n super.save(token, record);\n\n let value = \"\";\n try {\n value = JSON.stringify({ token, record });\n } catch (err) {\n console.warn(\"AsyncAuthStore: failed to stringify the new state\");\n }\n\n this._enqueue(() => this.saveFunc(value));\n }\n\n /**\n * @inheritdoc\n */\n clear(): void {\n super.clear();\n\n if (this.clearFunc) {\n this._enqueue(() => this.clearFunc!());\n } else {\n this._enqueue(() => this.saveFunc(\"\"));\n }\n }\n\n /**\n * Initializes the auth store state.\n */\n private async _loadInitial(payload?: string | Promise) {\n try {\n payload = await payload;\n\n if (payload) {\n let parsed;\n if (typeof payload === \"string\") {\n parsed = JSON.parse(payload) || {};\n } else if (typeof payload === \"object\") {\n parsed = payload;\n }\n\n this.save(parsed.token || \"\", parsed.record || parsed.model || null);\n }\n } catch (_) {}\n }\n\n /**\n * Appends an async function to the queue.\n */\n private _enqueue(asyncCallback: () => Promise) {\n this.queue.push(asyncCallback);\n\n if (this.queue.length == 1) {\n this._dequeue();\n }\n }\n\n /**\n * Starts the queue processing.\n */\n private _dequeue() {\n if (!this.queue.length) {\n return;\n }\n\n this.queue[0]().finally(() => {\n this.queue.shift();\n\n if (!this.queue.length) {\n return;\n }\n\n this._dequeue();\n });\n }\n}\n"],"names":["ClientResponseError","Error","constructor","errData","super","this","url","status","response","isAbort","originalError","Object","setPrototypeOf","prototype","data","DOMException","name","code","message","cause","includes","toJSON","fieldContentRegExp","cookieParse","str","options","result","decode","assign","defaultDecode","index","length","eqIdx","indexOf","endIdx","lastIndexOf","key","slice","trim","undefined","val","charCodeAt","_","cookieSerialize","opt","encode","defaultEncode","test","TypeError","value","maxAge","isNaN","isFinite","Math","floor","domain","path","expires","isDate","toString","call","Date","valueOf","toUTCString","httpOnly","secure","priority","toLowerCase","sameSite","decodeURIComponent","encodeURIComponent","isReactNative","navigator","product","global","HermesInternal","atobPolyfill","getTokenPayload","token","encodedPayload","split","map","c","join","JSON","parse","e","isTokenExpired","expirationThreshold","payload","keys","exp","now","atob","input","String","replace","bs","buffer","bc","idx","output","charAt","fromCharCode","defaultCookieKey","BaseAuthStore","baseToken","baseModel","_onChangeCallbacks","record","model","isValid","isSuperuser","type","collectionName","collectionId","isAdmin","console","warn","isAuthRecord","save","triggerChange","clear","loadFromCookie","cookie","rawData","Array","isArray","exportToCookie","defaultOptions","stringify","resultLength","Blob","size","id","email","extraProps","prop","onChange","callback","fireImmediately","push","i","splice","LocalAuthStore","storageKey","storageFallback","_bindStorageEvent","_storageGet","_storageSet","_storageRemove","window","localStorage","rawValue","getItem","normalizedVal","setItem","removeItem","addEventListener","BaseService","client","SettingsService","getAll","method","send","update","bodyParams","body","testS3","filesystem","then","testEmail","collectionIdOrName","toEmail","emailTemplate","template","collection","generateAppleClientSecret","clientId","teamId","keyId","privateKey","duration","knownSendOptionsKeys","normalizeUnknownQueryParams","query","serializeQueryParams","params","encodedKey","arrValue","v","prepareQueryParamValue","toISOString","RealtimeService","eventSource","subscriptions","lastSentSubscriptions","maxConnectTimeout","reconnectAttempts","maxReconnectAttempts","Infinity","predefinedReconnectIntervals","pendingConnects","isConnected","subscribe","topic","serialized","headers","listener","msgEvent","submitSubscriptions","connect","async","unsubscribeByTopicAndListener","unsubscribe","needToSubmit","subs","getSubscriptionsByTopic","hasSubscriptionListeners","removeEventListener","disconnect","unsubscribeByPrefix","keyPrefix","hasAtleastOneTopic","startsWith","exist","keyToCheck","addAllSubscriptionListeners","getNonEmptySubscriptionKeys","requestKey","getSubscriptionsCancelKey","catch","err","removeAllSubscriptionListeners","Promise","resolve","reject","initConnect","clearTimeout","connectTimeoutId","setTimeout","connectErrorHandler","EventSource","buildURL","onerror","lastEventId","retries","hasUnsentSubscriptions","p","reconnectTimeoutId","connectSubs","latestTopics","t","timeout","fromReconnect","onDisconnect","cancelRequest","close","CrudService","getFullList","batchOrqueryParams","_getFullList","batch","getList","page","perPage","baseCrudPath","responseData","items","item","getFirstListItem","filter","skipTotal","getOne","create","batchSize","request","list","concat","normalizeLegacyOptionsArgs","legacyWarn","baseOptions","bodyOrOptions","hasQuery","resetAutoRefresh","_resetAutoRefresh","RecordService","baseCollectionPath","isSuperusers","realtime","batchOrOptions","authStore","authExpand","expand","authRecord","delete","success","authResponse","listAuthMethods","fields","authWithPassword","usernameOrEmail","password","autoRefreshThreshold","identity","autoRefresh","authData","registerAutoRefresh","threshold","refreshFunc","reauthenticateFunc","oldBeforeSend","beforeSend","oldModel","unsubStoreChange","newToken","sendOptions","oldToken","authRefresh","authWithOAuth2Code","provider","codeVerifier","redirectURL","createData","authWithOAuth2","args","config","eagerDefaultPopup","urlCallback","openBrowserPopup","cleanup","requestKeyOptions","authMethods","oauth2","providers","find","cancelController","signal","onabort","oldState","state","error","scopes","replacements","_replaceQueryParams","authURL","location","href","requestPasswordReset","confirmPasswordReset","passwordResetToken","passwordConfirm","requestVerification","confirmVerification","verificationToken","verified","requestEmailChange","newEmail","confirmEmailChange","emailChangeToken","listExternalAuths","recordId","unlinkExternalAuth","ea","requestOTP","authWithOTP","otpId","impersonate","Authorization","Client","baseURL","lang","urlPath","substring","parsedParams","rawParams","param","pair","hasOwnProperty","open","width","height","windowWidth","innerWidth","windowHeight","innerHeight","left","top","CollectionService","import","collections","deleteMissing","getScaffolds","truncate","LogService","getStats","HealthService","check","FileService","getUrl","filename","queryParams","getURL","parts","download","URLSearchParams","getToken","BackupService","basename","upload","restore","getDownloadUrl","getDownloadURL","CronService","run","jobId","isFile","File","uri","isFormData","FormData","hasFileField","values","inferNumberCharsRegex","inferFormDataValue","num","BatchService","requests","SubBatchService","formData","jsonData","req","json","files","file","append","upsert","prepareRequest","convertFormDataToObject","forEach","k","parsed","foundFiles","foundRegular","fileKey","endsWith","baseUrl","cancelControllers","recordServices","enableAutoCancellation","Deno","logs","settings","health","backups","crons","admins","createBatch","idOrName","autoCancellation","enable","abort","cancelAllRequests","raw","replaceAll","getFileUrl","buildUrl","origin","pathname","initSendOptions","getHeader","fetch","aborted","afterSend","convertToFormDataIfNeeded","form","$autoCancel","$cancelKey","controller","AbortController","AsyncAuthStore","queue","saveFunc","clearFunc","_enqueue","_loadInitial","initial","asyncCallback","_dequeue","finally","shift"],"mappings":"AAIM,MAAOA,4BAA4BC,MAOrC,WAAAC,CAAYC,GACRC,MAAM,uBAPVC,KAAGC,IAAW,GACdD,KAAME,OAAW,EACjBF,KAAQG,SAA2B,GACnCH,KAAOI,SAAY,EACnBJ,KAAaK,cAAQ,KAOjBC,OAAOC,eAAeP,KAAML,oBAAoBa,WAEhC,OAAZV,GAAuC,iBAAZA,IAC3BE,KAAKC,IAA6B,iBAAhBH,EAAQG,IAAmBH,EAAQG,IAAM,GAC3DD,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d,SAAS,KAEzC,CAKO,kBAAMG,CAAa5Y,GACvB,IAGI,GAFAA,QAAgBA,EAEH,CACT,IAAIgW,EACmB,iBAAZhW,EACPgW,EAASrW,KAAKC,MAAMI,IAAY,CAAA,EACN,iBAAZA,IACdgW,EAAShW,GAGbpF,KAAKmH,KAAKiU,EAAO3W,OAAS,GAAI2W,EAAO5U,QAAU4U,EAAO3U,OAAS,KAClE,CACJ,CAAC,MAAOpE,GAAK,CACjB,CAKO,QAAA0b,CAASG,GACble,KAAK4d,MAAMpV,KAAK0V,GAES,GAArBle,KAAK4d,MAAMlc,QACX1B,KAAKme,UAEZ,CAKO,QAAAA,GACCne,KAAK4d,MAAMlc,QAIhB1B,KAAK4d,MAAM,KAAKQ,SAAQ,KACpBpe,KAAK4d,MAAMS,QAENre,KAAK4d,MAAMlc,QAIhB1B,KAAKme,UAAU,GAEtB"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/pocketbase/dist/pocketbase.iife.d.ts b/PBandGraphScaffold/node_modules/pocketbase/dist/pocketbase.iife.d.ts deleted file mode 100644 index 3cd2c02..0000000 --- a/PBandGraphScaffold/node_modules/pocketbase/dist/pocketbase.iife.d.ts +++ /dev/null @@ -1,1468 +0,0 @@ -interface SerializeOptions { - encode?: (val: string | number | boolean) => string; - maxAge?: number; - domain?: string; - path?: string; - expires?: Date; - httpOnly?: boolean; - secure?: boolean; - priority?: string; - sameSite?: boolean | string; -} -interface ListResult { - page: number; - perPage: number; - totalItems: number; - totalPages: number; - items: Array; -} -interface BaseModel { - [key: string]: any; - id: string; -} -interface LogModel extends BaseModel { - level: string; - message: string; - created: string; - updated: string; - data: { - [key: string]: any; - }; -} -interface RecordModel extends BaseModel { - collectionId: string; - collectionName: string; - expand?: { - [key: string]: any; - }; -} -// ------------------------------------------------------------------- -// Collection types -// ------------------------------------------------------------------- -interface CollectionField { - [key: string]: any; - id: string; - name: string; - type: string; - system: boolean; - hidden: boolean; - presentable: boolean; -} -interface TokenConfig { - duration: number; - secret?: string; -} -interface AuthAlertConfig { - enabled: boolean; - emailTemplate: EmailTemplate; -} -interface OTPConfig { - enabled: boolean; - duration: number; - length: number; - emailTemplate: EmailTemplate; -} -interface MFAConfig { - enabled: boolean; - duration: number; - rule: string; -} -interface PasswordAuthConfig { - enabled: boolean; - identityFields: Array; -} -interface OAuth2Provider { - pkce?: boolean; - clientId: string; - name: string; - clientSecret: string; - authURL: string; - tokenURL: string; - userInfoURL: string; - displayName: string; - extra?: { - [key: string]: any; - }; -} -interface OAuth2Config { - enabled: boolean; - mappedFields: { - [key: string]: string; - }; - providers: Array; -} -interface EmailTemplate { - subject: string; - body: string; -} -interface collection extends BaseModel { - name: string; - fields: Array; - indexes: Array; - system: boolean; - listRule?: string; - viewRule?: string; - createRule?: string; - updateRule?: string; - deleteRule?: string; -} -interface BaseCollectionModel extends collection { - type: "base"; -} -interface ViewCollectionModel extends collection { - type: "view"; - viewQuery: string; -} -interface AuthCollectionModel extends collection { - type: "auth"; - authRule?: string; - manageRule?: string; - authAlert: AuthAlertConfig; - oauth2: OAuth2Config; - passwordAuth: PasswordAuthConfig; - mfa: MFAConfig; - otp: OTPConfig; - authToken: TokenConfig; - passwordResetToken: TokenConfig; - emailChangeToken: TokenConfig; - verificationToken: TokenConfig; - fileToken: TokenConfig; - verificationTemplate: EmailTemplate; - resetPasswordTemplate: EmailTemplate; - confirmEmailChangeTemplate: EmailTemplate; -} -type CollectionModel = BaseCollectionModel | ViewCollectionModel | AuthCollectionModel; -type AuthRecord = RecordModel | null; -// for backward compatibility -type OnStoreChangeFunc = (token: string, record: AuthRecord) => void; -/** - * Base AuthStore class that stores the auth state in runtime memory (aka. only for the duration of the store instane). - * - * Usually you wouldn't use it directly and instead use the builtin LocalAuthStore, AsyncAuthStore - * or extend it with your own custom implementation. - */ -declare class BaseAuthStore { - protected baseToken: string; - protected baseModel: AuthRecord; - private _onChangeCallbacks; - /** - * Retrieves the stored token (if any). - */ - get token(): string; - /** - * Retrieves the stored model data (if any). - */ - get record(): AuthRecord; - /** - * @deprecated use `record` instead. - */ - get model(): AuthRecord; - /** - * Loosely checks if the store has valid token (aka. existing and unexpired exp claim). - */ - get isValid(): boolean; - /** - * Loosely checks whether the currently loaded store state is for superuser. - * - * Alternatively you can also compare directly `pb.authStore.record?.collectionName`. - */ - get isSuperuser(): boolean; - /** - * @deprecated use `isSuperuser` instead or simply check the record.collectionName property. - */ - get isAdmin(): boolean; - /** - * @deprecated use `!isSuperuser` instead or simply check the record.collectionName property. - */ - get isAuthRecord(): boolean; - /** - * Saves the provided new token and model data in the auth store. - */ - save(token: string, record?: AuthRecord): void; - /** - * Removes the stored token and model data form the auth store. - */ - clear(): void; - /** - * Parses the provided cookie string and updates the store state - * with the cookie's token and model data. - * - * NB! This function doesn't validate the token or its data. - * Usually this isn't a concern if you are interacting only with the - * PocketBase API because it has the proper server-side security checks in place, - * but if you are using the store `isValid` state for permission controls - * in a node server (eg. SSR), then it is recommended to call `authRefresh()` - * after loading the cookie to ensure an up-to-date token and model state. - * For example: - * - * ```js - * pb.authStore.loadFromCookie("cookie string..."); - * - * try { - * // get an up-to-date auth store state by veryfing and refreshing the loaded auth model (if any) - * pb.authStore.isValid && await pb.collection('users').authRefresh(); - * } catch (_) { - * // clear the auth store on failed refresh - * pb.authStore.clear(); - * } - * ``` - */ - loadFromCookie(cookie: string, key?: string): void; - /** - * Exports the current store state as cookie string. - * - * By default the following optional attributes are added: - * - Secure - * - HttpOnly - * - SameSite=Strict - * - Path=/ - * - Expires={the token expiration date} - * - * NB! If the generated cookie exceeds 4096 bytes, this method will - * strip the model data to the bare minimum to try to fit within the - * recommended size in https://www.rfc-editor.org/rfc/rfc6265#section-6.1. - */ - exportToCookie(options?: SerializeOptions, key?: string): string; - /** - * Register a callback function that will be called on store change. - * - * You can set the `fireImmediately` argument to true in order to invoke - * the provided callback right after registration. - * - * Returns a removal function that you could call to "unsubscribe" from the changes. - */ - onChange(callback: OnStoreChangeFunc, fireImmediately?: boolean): () => void; - protected triggerChange(): void; -} -/** - * BaseService class that should be inherited from all API services. - */ -declare abstract class BaseService { - readonly client: Client; - constructor(client: Client); -} -interface SendOptions extends RequestInit { - // for backward compatibility and to minimize the verbosity, - // any top-level field that doesn't exist in RequestInit or the - // fields below will be treated as query parameter. - [key: string]: any; - /** - * Optional custom fetch function to use for sending the request. - */ - fetch?: (url: RequestInfo | URL, config?: RequestInit) => Promise; - /** - * Custom headers to send with the requests. - */ - headers?: { - [key: string]: string; - }; - /** - * The body of the request (serialized automatically for json requests). - */ - body?: any; - /** - * Query parameters that will be appended to the request url. - */ - query?: { - [key: string]: any; - }; - /** - * @deprecated use `query` instead - * - * for backward-compatibility `params` values are merged with `query`, - * but this option may get removed in the final v1 release - */ - params?: { - [key: string]: any; - }; - /** - * The request identifier that can be used to cancel pending requests. - */ - requestKey?: string | null; - /** - * @deprecated use `requestKey:string` instead - */ - $cancelKey?: string; - /** - * @deprecated use `requestKey:null` instead - */ - $autoCancel?: boolean; -} -interface CommonOptions extends SendOptions { - fields?: string; -} -interface ListOptions extends CommonOptions { - page?: number; - perPage?: number; - sort?: string; - filter?: string; - skipTotal?: boolean; -} -interface FullListOptions extends ListOptions { - batch?: number; -} -interface RecordOptions extends CommonOptions { - expand?: string; -} -interface RecordListOptions extends ListOptions, RecordOptions { -} -interface RecordFullListOptions extends FullListOptions, RecordOptions { -} -interface RecordSubscribeOptions extends SendOptions { - fields?: string; - filter?: string; - expand?: string; -} -interface LogStatsOptions extends CommonOptions { - filter?: string; -} -interface FileOptions extends CommonOptions { - thumb?: string; - download?: boolean; -} -interface appleClientSecret { - secret: string; -} -declare class SettingsService extends BaseService { - /** - * Fetch all available app settings. - * - * @throws {ClientResponseError} - */ - getAll(options?: CommonOptions): Promise<{ - [key: string]: any; - }>; - /** - * Bulk updates app settings. - * - * @throws {ClientResponseError} - */ - update(bodyParams?: { - [key: string]: any; - } | FormData, options?: CommonOptions): Promise<{ - [key: string]: any; - }>; - /** - * Performs a S3 filesystem connection test. - * - * The currently supported `filesystem` are "storage" and "backups". - * - * @throws {ClientResponseError} - */ - testS3(filesystem?: string, options?: CommonOptions): Promise; - /** - * Sends a test email. - * - * The possible `emailTemplate` values are: - * - verification - * - password-reset - * - email-change - * - * @throws {ClientResponseError} - */ - testEmail(collectionIdOrName: string, toEmail: string, emailTemplate: string, options?: CommonOptions): Promise; - /** - * Generates a new Apple OAuth2 client secret. - * - * @throws {ClientResponseError} - */ - generateAppleClientSecret(clientId: string, teamId: string, keyId: string, privateKey: string, duration: number, options?: CommonOptions): Promise; -} -type UnsubscribeFunc = () => Promise; -declare class RealtimeService extends BaseService { - clientId: string; - private eventSource; - private subscriptions; - private lastSentSubscriptions; - private connectTimeoutId; - private maxConnectTimeout; - private reconnectTimeoutId; - private reconnectAttempts; - private maxReconnectAttempts; - private predefinedReconnectIntervals; - private pendingConnects; - /** - * Returns whether the realtime connection has been established. - */ - get isConnected(): boolean; - /** - * An optional hook that is invoked when the realtime client disconnects - * either when unsubscribing from all subscriptions or when the - * connection was interrupted or closed by the server. - * - * The received argument could be used to determine whether the disconnect - * is a result from unsubscribing (`activeSubscriptions.length == 0`) - * or because of network/server error (`activeSubscriptions.length > 0`). - * - * If you want to listen for the opposite, aka. when the client connection is established, - * subscribe to the `PB_CONNECT` event. - */ - onDisconnect?: (activeSubscriptions: Array) => void; - /** - * Register the subscription listener. - * - * You can subscribe multiple times to the same topic. - * - * If the SSE connection is not started yet, - * this method will also initialize it. - */ - subscribe(topic: string, callback: (data: any) => void, options?: SendOptions): Promise; - /** - * Unsubscribe from all subscription listeners with the specified topic. - * - * If `topic` is not provided, then this method will unsubscribe - * from all active subscriptions. - * - * This method is no-op if there are no active subscriptions. - * - * The related sse connection will be autoclosed if after the - * unsubscribe operation there are no active subscriptions left. - */ - unsubscribe(topic?: string): Promise; - /** - * Unsubscribe from all subscription listeners starting with the specified topic prefix. - * - * This method is no-op if there are no active subscriptions with the specified topic prefix. - * - * The related sse connection will be autoclosed if after the - * unsubscribe operation there are no active subscriptions left. - */ - unsubscribeByPrefix(keyPrefix: string): Promise; - /** - * Unsubscribe from all subscriptions matching the specified topic and listener function. - * - * This method is no-op if there are no active subscription with - * the specified topic and listener. - * - * The related sse connection will be autoclosed if after the - * unsubscribe operation there are no active subscriptions left. - */ - unsubscribeByTopicAndListener(topic: string, listener: EventListener): Promise; - private hasSubscriptionListeners; - private submitSubscriptions; - private getSubscriptionsCancelKey; - private getSubscriptionsByTopic; - private getNonEmptySubscriptionKeys; - private addAllSubscriptionListeners; - private removeAllSubscriptionListeners; - private connect; - private initConnect; - private hasUnsentSubscriptions; - private connectErrorHandler; - private disconnect; -} -declare abstract class CrudService extends BaseService { - /** - * Base path for the crud actions (without trailing slash, eg. '/admins'). - */ - abstract get baseCrudPath(): string; - /** - * Response data decoder. - */ - decode(data: { - [key: string]: any; - }): T; - /** - * Returns a promise with all list items batch fetched at once - * (by default 500 items per request; to change it set the `batch` query param). - * - * You can use the generic T to supply a wrapper type of the crud model. - * - * @throws {ClientResponseError} - */ - getFullList(options?: FullListOptions): Promise>; - /** - * Legacy version of getFullList with explicitly specified batch size. - */ - getFullList(batch?: number, options?: ListOptions): Promise>; - /** - * Returns paginated items list. - * - * You can use the generic T to supply a wrapper type of the crud model. - * - * @throws {ClientResponseError} - */ - getList(page?: number, perPage?: number, options?: ListOptions): Promise>; - /** - * Returns the first found item by the specified filter. - * - * Internally it calls `getList(1, 1, { filter, skipTotal })` and - * returns the first found item. - * - * You can use the generic T to supply a wrapper type of the crud model. - * - * For consistency with `getOne`, this method will throw a 404 - * ClientResponseError if no item was found. - * - * @throws {ClientResponseError} - */ - getFirstListItem(filter: string, options?: CommonOptions): Promise; - /** - * Returns single item by its id. - * - * You can use the generic T to supply a wrapper type of the crud model. - * - * If `id` is empty it will throw a 404 error. - * - * @throws {ClientResponseError} - */ - getOne(id: string, options?: CommonOptions): Promise; - /** - * Creates a new item. - * - * You can use the generic T to supply a wrapper type of the crud model. - * - * @throws {ClientResponseError} - */ - create(bodyParams?: { - [key: string]: any; - } | FormData, options?: CommonOptions): Promise; - /** - * Updates an existing item by its id. - * - * You can use the generic T to supply a wrapper type of the crud model. - * - * @throws {ClientResponseError} - */ - update(id: string, bodyParams?: { - [key: string]: any; - } | FormData, options?: CommonOptions): Promise; - /** - * Deletes an existing item by its id. - * - * @throws {ClientResponseError} - */ - delete(id: string, options?: CommonOptions): Promise; - /** - * Returns a promise with all list items batch fetched at once. - */ - protected _getFullList(batchSize?: number, options?: ListOptions): Promise>; -} -interface RecordAuthResponse { - /** - * The signed PocketBase auth record. - */ - record: T; - /** - * The PocketBase record auth token. - * - * If you are looking for the OAuth2 access and refresh tokens - * they are available under the `meta.accessToken` and `meta.refreshToken` props. - */ - token: string; - /** - * Auth meta data usually filled when OAuth2 is used. - */ - meta?: { - [key: string]: any; - }; -} -interface AuthProviderInfo { - name: string; - displayName: string; - state: string; - authURL: string; - codeVerifier: string; - codeChallenge: string; - codeChallengeMethod: string; -} -interface AuthMethodsList { - mfa: { - enabled: boolean; - duration: number; - }; - otp: { - enabled: boolean; - duration: number; - }; - password: { - enabled: boolean; - identityFields: Array; - }; - oauth2: { - enabled: boolean; - providers: Array; - }; -} -interface RecordSubscription { - action: string; // eg. create, update, delete - record: T; -} -type OAuth2UrlCallback = (url: string) => void | Promise; -interface OAuth2AuthConfig extends SendOptions { - // the name of the OAuth2 provider (eg. "google") - provider: string; - // custom scopes to overwrite the default ones - scopes?: Array; - // optional record create data - createData?: { - [key: string]: any; - }; - // optional callback that is triggered after the OAuth2 sign-in/sign-up url generation - urlCallback?: OAuth2UrlCallback; - // optional query params to send with the PocketBase auth request (eg. fields, expand, etc.) - query?: RecordOptions; -} -interface OTPResponse { - otpId: string; -} -declare class RecordService extends CrudService { - readonly collectionIdOrName: string; - constructor(client: Client, collectionIdOrName: string); - /** - * @inheritdoc - */ - get baseCrudPath(): string; - /** - * Returns the current collection service base path. - */ - get baseCollectionPath(): string; - /** - * Returns whether the current service collection is superusers. - */ - get isSuperusers(): boolean; - // --------------------------------------------------------------- - // Realtime handlers - // --------------------------------------------------------------- - /** - * Subscribe to realtime changes to the specified topic ("*" or record id). - * - * If `topic` is the wildcard "*", then this method will subscribe to - * any record changes in the collection. - * - * If `topic` is a record id, then this method will subscribe only - * to changes of the specified record id. - * - * It's OK to subscribe multiple times to the same topic. - * You can use the returned `UnsubscribeFunc` to remove only a single subscription. - * Or use `unsubscribe(topic)` if you want to remove all subscriptions attached to the topic. - */ - subscribe(topic: string, callback: (data: RecordSubscription) => void, options?: RecordSubscribeOptions): Promise; - /** - * Unsubscribe from all subscriptions of the specified topic - * ("*" or record id). - * - * If `topic` is not set, then this method will unsubscribe from - * all subscriptions associated to the current collection. - */ - unsubscribe(topic?: string): Promise; - // --------------------------------------------------------------- - // Crud handers - // --------------------------------------------------------------- - /** - * @inheritdoc - */ - getFullList(options?: RecordFullListOptions): Promise>; - /** - * @inheritdoc - */ - getFullList(batch?: number, options?: RecordListOptions): Promise>; - /** - * @inheritdoc - */ - getList(page?: number, perPage?: number, options?: RecordListOptions): Promise>; - /** - * @inheritdoc - */ - getFirstListItem(filter: string, options?: RecordListOptions): Promise; - /** - * @inheritdoc - */ - getOne(id: string, options?: RecordOptions): Promise; - /** - * @inheritdoc - */ - create(bodyParams?: { - [key: string]: any; - } | FormData, options?: RecordOptions): Promise; - /** - * @inheritdoc - * - * If the current `client.authStore.record` matches with the updated id, then - * on success the `client.authStore.record` will be updated with the new response record fields. - */ - update(id: string, bodyParams?: { - [key: string]: any; - } | FormData, options?: RecordOptions): Promise; - /** - * @inheritdoc - * - * If the current `client.authStore.record` matches with the deleted id, - * then on success the `client.authStore` will be cleared. - */ - delete(id: string, options?: CommonOptions): Promise; - // --------------------------------------------------------------- - // Auth handlers - // --------------------------------------------------------------- - /** - * Prepare successful collection authorization response. - */ - protected authResponse(responseData: any): RecordAuthResponse; - /** - * Returns all available collection auth methods. - * - * @throws {ClientResponseError} - */ - listAuthMethods(options?: CommonOptions): Promise; - /** - * Authenticate a single auth collection record via its username/email and password. - * - * On success, this method also automatically updates - * the client's AuthStore data and returns: - * - the authentication token - * - the authenticated record model - * - * @throws {ClientResponseError} - */ - authWithPassword(usernameOrEmail: string, password: string, options?: RecordOptions): Promise>; - /** - * Authenticate a single auth collection record with OAuth2 code. - * - * If you don't have an OAuth2 code you may also want to check `authWithOAuth2` method. - * - * On success, this method also automatically updates - * the client's AuthStore data and returns: - * - the authentication token - * - the authenticated record model - * - the OAuth2 account data (eg. name, email, avatar, etc.) - * - * @throws {ClientResponseError} - */ - authWithOAuth2Code(provider: string, code: string, codeVerifier: string, redirectURL: string, createData?: { - [key: string]: any; - }, options?: RecordOptions): Promise>; - /** - * @deprecated - * Consider using authWithOAuth2Code(provider, code, codeVerifier, redirectURL, createdData, options?). - */ - authWithOAuth2Code(provider: string, code: string, codeVerifier: string, redirectURL: string, createData?: { - [key: string]: any; - }, body?: any, query?: any): Promise>; - /** - * @deprecated This form of authWithOAuth2 is deprecated. - * - * Please use `authWithOAuth2Code()` OR its simplified realtime version - * as shown in https://pocketbase.io/docs/authentication/#oauth2-integration. - */ - authWithOAuth2(provider: string, code: string, codeVerifier: string, redirectURL: string, createData?: { - [key: string]: any; - }, bodyParams?: { - [key: string]: any; - }, queryParams?: RecordOptions): Promise>; - /** - * Authenticate a single auth collection record with OAuth2 - * **without custom redirects, deeplinks or even page reload**. - * - * This method initializes a one-off realtime subscription and will - * open a popup window with the OAuth2 vendor page to authenticate. - * Once the external OAuth2 sign-in/sign-up flow is completed, the popup - * window will be automatically closed and the OAuth2 data sent back - * to the user through the previously established realtime connection. - * - * You can specify an optional `urlCallback` prop to customize - * the default url `window.open` behavior. - * - * On success, this method also automatically updates - * the client's AuthStore data and returns: - * - the authentication token - * - the authenticated record model - * - the OAuth2 account data (eg. name, email, avatar, etc.) - * - * Example: - * - * ```js - * const authData = await pb.collection("users").authWithOAuth2({ - * provider: "google", - * }) - * ``` - * - * Note1: When creating the OAuth2 app in the provider dashboard - * you have to configure `https://yourdomain.com/api/oauth2-redirect` - * as redirect URL. - * - * Note2: Safari may block the default `urlCallback` popup because - * it doesn't allow `window.open` calls as part of an `async` click functions. - * To workaround this you can either change your click handler to not be marked as `async` - * OR manually call `window.open` before your `async` function and use the - * window reference in your own custom `urlCallback` (see https://github.com/pocketbase/pocketbase/discussions/2429#discussioncomment-5943061). - * For example: - * ```js - * - * ... - * document.getElementById("btn").addEventListener("click", () => { - * pb.collection("users").authWithOAuth2({ - * provider: "gitlab", - * }).then((authData) => { - * console.log(authData) - * }).catch((err) => { - * console.log(err, err.originalError); - * }); - * }) - * ``` - * - * @throws {ClientResponseError} - */ - authWithOAuth2(options: OAuth2AuthConfig): Promise>; - /** - * Refreshes the current authenticated record instance and - * returns a new token and record data. - * - * On success this method also automatically updates the client's AuthStore. - * - * @throws {ClientResponseError} - */ - authRefresh(options?: RecordOptions): Promise>; - /** - * @deprecated - * Consider using authRefresh(options?). - */ - authRefresh(body?: any, query?: any): Promise>; - /** - * Sends auth record password reset request. - * - * @throws {ClientResponseError} - */ - requestPasswordReset(email: string, options?: CommonOptions): Promise; - /** - * @deprecated - * Consider using requestPasswordReset(email, options?). - */ - requestPasswordReset(email: string, body?: any, query?: any): Promise; - /** - * Confirms auth record password reset request. - * - * @throws {ClientResponseError} - */ - confirmPasswordReset(passwordResetToken: string, password: string, passwordConfirm: string, options?: CommonOptions): Promise; - /** - * @deprecated - * Consider using confirmPasswordReset(passwordResetToken, password, passwordConfirm, options?). - */ - confirmPasswordReset(passwordResetToken: string, password: string, passwordConfirm: string, body?: any, query?: any): Promise; - /** - * Sends auth record verification email request. - * - * @throws {ClientResponseError} - */ - requestVerification(email: string, options?: CommonOptions): Promise; - /** - * @deprecated - * Consider using requestVerification(email, options?). - */ - requestVerification(email: string, body?: any, query?: any): Promise; - /** - * Confirms auth record email verification request. - * - * If the current `client.authStore.record` matches with the auth record from the token, - * then on success the `client.authStore.record.verified` will be updated to `true`. - * - * @throws {ClientResponseError} - */ - confirmVerification(verificationToken: string, options?: CommonOptions): Promise; - /** - * @deprecated - * Consider using confirmVerification(verificationToken, options?). - */ - confirmVerification(verificationToken: string, body?: any, query?: any): Promise; - /** - * Sends an email change request to the authenticated record model. - * - * @throws {ClientResponseError} - */ - requestEmailChange(newEmail: string, options?: CommonOptions): Promise; - /** - * @deprecated - * Consider using requestEmailChange(newEmail, options?). - */ - requestEmailChange(newEmail: string, body?: any, query?: any): Promise; - /** - * Confirms auth record's new email address. - * - * If the current `client.authStore.record` matches with the auth record from the token, - * then on success the `client.authStore` will be cleared. - * - * @throws {ClientResponseError} - */ - confirmEmailChange(emailChangeToken: string, password: string, options?: CommonOptions): Promise; - /** - * @deprecated - * Consider using confirmEmailChange(emailChangeToken, password, options?). - */ - confirmEmailChange(emailChangeToken: string, password: string, body?: any, query?: any): Promise; - /** - * @deprecated use collection("_externalAuths").* - * - * Lists all linked external auth providers for the specified auth record. - * - * @throws {ClientResponseError} - */ - listExternalAuths(recordId: string, options?: CommonOptions): Promise>; - /** - * @deprecated use collection("_externalAuths").* - * - * Unlink a single external auth provider from the specified auth record. - * - * @throws {ClientResponseError} - */ - unlinkExternalAuth(recordId: string, provider: string, options?: CommonOptions): Promise; - /** - * Sends auth record OTP to the provided email. - * - * @throws {ClientResponseError} - */ - requestOTP(email: string, options?: CommonOptions): Promise; - /** - * Authenticate a single auth collection record via OTP. - * - * On success, this method also automatically updates - * the client's AuthStore data and returns: - * - the authentication token - * - the authenticated record model - * - * @throws {ClientResponseError} - */ - authWithOTP(otpId: string, password: string, options?: CommonOptions): Promise>; - /** - * Impersonate authenticates with the specified recordId and - * returns a new client with the received auth token in a memory store. - * - * If `duration` is 0 the generated auth token will fallback - * to the default collection auth token duration. - * - * This action currently requires superusers privileges. - * - * @throws {ClientResponseError} - */ - impersonate(recordId: string, duration: number, options?: CommonOptions): Promise; - // --------------------------------------------------------------- - // very rudimentary url query params replacement because at the moment - // URL (and URLSearchParams) doesn't seem to be fully supported in React Native - // - // note: for details behind some of the decode/encode parsing check https://unixpapa.com/js/querystring.html - private _replaceQueryParams; -} -declare class CollectionService extends CrudService { - /** - * @inheritdoc - */ - get baseCrudPath(): string; - /** - * Imports the provided collections. - * - * If `deleteMissing` is `true`, all local collections and their fields, - * that are not present in the imported configuration, WILL BE DELETED - * (including their related records data)! - * - * @throws {ClientResponseError} - */ - import(collections: Array, deleteMissing?: boolean, options?: CommonOptions): Promise; - /** - * Returns type indexed map with scaffolded collection models - * populated with their default field values. - * - * @throws {ClientResponseError} - */ - getScaffolds(options?: CommonOptions): Promise<{ - [key: string]: CollectionModel; - }>; - /** - * Deletes all records associated with the specified collection. - * - * @throws {ClientResponseError} - */ - truncate(collectionIdOrName: string, options?: CommonOptions): Promise; -} -interface HourlyStats { - total: number; - date: string; -} -declare class LogService extends BaseService { - /** - * Returns paginated logs list. - * - * @throws {ClientResponseError} - */ - getList(page?: number, perPage?: number, options?: ListOptions): Promise>; - /** - * Returns a single log by its id. - * - * If `id` is empty it will throw a 404 error. - * - * @throws {ClientResponseError} - */ - getOne(id: string, options?: CommonOptions): Promise; - /** - * Returns logs statistics. - * - * @throws {ClientResponseError} - */ - getStats(options?: LogStatsOptions): Promise>; -} -interface HealthCheckResponse { - code: number; - message: string; - data: { - [key: string]: any; - }; -} -declare class HealthService extends BaseService { - /** - * Checks the health status of the api. - * - * @throws {ClientResponseError} - */ - check(options?: CommonOptions): Promise; -} -declare class FileService extends BaseService { - /** - * @deprecated Please replace with `pb.files.getURL()`. - */ - getUrl(record: { - [key: string]: any; - }, filename: string, queryParams?: FileOptions): string; - /** - * Builds and returns an absolute record file url for the provided filename. - */ - getURL(record: { - [key: string]: any; - }, filename: string, queryParams?: FileOptions): string; - /** - * Requests a new private file access token for the current auth model. - * - * @throws {ClientResponseError} - */ - getToken(options?: CommonOptions): Promise; -} -interface BackupFileInfo { - key: string; - size: number; - modified: string; -} -declare class BackupService extends BaseService { - /** - * Returns list with all available backup files. - * - * @throws {ClientResponseError} - */ - getFullList(options?: CommonOptions): Promise>; - /** - * Initializes a new backup. - * - * @throws {ClientResponseError} - */ - create(basename: string, options?: CommonOptions): Promise; - /** - * Uploads an existing backup file. - * - * Example: - * - * ```js - * await pb.backups.upload({ - * file: new Blob([...]), - * }); - * ``` - * - * @throws {ClientResponseError} - */ - upload(bodyParams: { - [key: string]: any; - } | FormData, options?: CommonOptions): Promise; - /** - * Deletes a single backup file. - * - * @throws {ClientResponseError} - */ - delete(key: string, options?: CommonOptions): Promise; - /** - * Initializes an app data restore from an existing backup. - * - * @throws {ClientResponseError} - */ - restore(key: string, options?: CommonOptions): Promise; - /** - * @deprecated Please use `getDownloadURL()`. - */ - getDownloadUrl(token: string, key: string): string; - /** - * Builds a download url for a single existing backup using a - * superuser file token and the backup file key. - * - * The file token can be generated via `pb.files.getToken()`. - */ - getDownloadURL(token: string, key: string): string; -} -interface CronJob { - id: string; - expression: string; -} -declare class CronService extends BaseService { - /** - * Returns list with all registered cron jobs. - * - * @throws {ClientResponseError} - */ - getFullList(options?: CommonOptions): Promise>; - /** - * Runs the specified cron job. - * - * @throws {ClientResponseError} - */ - run(jobId: string, options?: CommonOptions): Promise; -} -interface BatchRequest { - method: string; - url: string; - json?: { - [key: string]: any; - }; - files?: { - [key: string]: Array; - }; - headers?: { - [key: string]: string; - }; -} -interface BatchRequestResult { - status: number; - body: any; -} -declare class BatchService extends BaseService { - private requests; - private subs; - /** - * Starts constructing a batch request entry for the specified collection. - */ - collection(collectionIdOrName: string): SubBatchService; - /** - * Sends the batch requests. - * - * @throws {ClientResponseError} - */ - send(options?: SendOptions): Promise>; -} -declare class SubBatchService { - private requests; - private readonly collectionIdOrName; - constructor(requests: Array, collectionIdOrName: string); - /** - * Registers a record upsert request into the current batch queue. - * - * The request will be executed as update if `bodyParams` have a valid existing record `id` value, otherwise - create. - */ - upsert(bodyParams?: { - [key: string]: any; - } | FormData, options?: RecordOptions): void; - /** - * Registers a record create request into the current batch queue. - */ - create(bodyParams?: { - [key: string]: any; - } | FormData, options?: RecordOptions): void; - /** - * Registers a record update request into the current batch queue. - */ - update(id: string, bodyParams?: { - [key: string]: any; - } | FormData, options?: RecordOptions): void; - /** - * Registers a record delete request into the current batch queue. - */ - delete(id: string, options?: SendOptions): void; - private prepareRequest; -} -interface BeforeSendResult { - [key: string]: any; - url?: string; - options?: { - [key: string]: any; - }; -} -/** - * PocketBase JS Client. - */ -declare class Client { - /** - * The base PocketBase backend url address (eg. 'http://127.0.0.1.8090'). - */ - baseURL: string; - /** - * Legacy getter alias for baseURL. - * @deprecated Please replace with baseURL. - */ - get baseUrl(): string; - /** - * Legacy setter alias for baseURL. - * @deprecated Please replace with baseURL. - */ - set baseUrl(v: string); - /** - * Hook that get triggered right before sending the fetch request, - * allowing you to inspect and modify the url and request options. - * - * For list of the possible options check https://developer.mozilla.org/en-US/docs/Web/API/fetch#options - * - * You can return a non-empty result object `{ url, options }` to replace the url and request options entirely. - * - * Example: - * ```js - * const pb = new PocketBase("https://example.com") - * - * pb.beforeSend = function (url, options) { - * options.headers = Object.assign({}, options.headers, { - * 'X-Custom-Header': 'example', - * }) - * - * return { url, options } - * } - * - * // use the created client as usual... - * ``` - */ - beforeSend?: (url: string, options: SendOptions) => BeforeSendResult | Promise; - /** - * Hook that get triggered after successfully sending the fetch request, - * allowing you to inspect/modify the response object and its parsed data. - * - * Returns the new Promise resolved `data` that will be returned to the client. - * - * Example: - * ```js - * const pb = new PocketBase("https://example.com") - * - * pb.afterSend = function (response, data, options) { - * if (response.status != 200) { - * throw new ClientResponseError({ - * url: response.url, - * status: response.status, - * response: { ... }, - * }) - * } - * - * return data; - * } - * - * // use the created client as usual... - * ``` - */ - afterSend?: ((response: Response, data: any) => any) & ((response: Response, data: any, options: SendOptions) => any); - /** - * Optional language code (default to `en-US`) that will be sent - * with the requests to the server as `Accept-Language` header. - */ - lang: string; - /** - * A replaceable instance of the local auth store service. - */ - authStore: BaseAuthStore; - /** - * An instance of the service that handles the **Settings APIs**. - */ - readonly settings: SettingsService; - /** - * An instance of the service that handles the **Collection APIs**. - */ - readonly collections: CollectionService; - /** - * An instance of the service that handles the **File APIs**. - */ - readonly files: FileService; - /** - * An instance of the service that handles the **Log APIs**. - */ - readonly logs: LogService; - /** - * An instance of the service that handles the **Realtime APIs**. - */ - readonly realtime: RealtimeService; - /** - * An instance of the service that handles the **Health APIs**. - */ - readonly health: HealthService; - /** - * An instance of the service that handles the **Backup APIs**. - */ - readonly backups: BackupService; - /** - * An instance of the service that handles the **Cron APIs**. - */ - readonly crons: CronService; - private cancelControllers; - private recordServices; - private enableAutoCancellation; - constructor(baseURL?: string, authStore?: BaseAuthStore | null, lang?: string); - /** - * @deprecated - * With PocketBase v0.23.0 admins are converted to a regular auth - * collection named "_superusers", aka. you can use directly collection("_superusers"). - */ - get admins(): RecordService; - /** - * Creates a new batch handler for sending multiple transactional - * create/update/upsert/delete collection requests in one network call. - * - * Example: - * ```js - * const batch = pb.createBatch(); - * - * batch.collection("example1").create({ ... }) - * batch.collection("example2").update("RECORD_ID", { ... }) - * batch.collection("example3").delete("RECORD_ID") - * batch.collection("example4").upsert({ ... }) - * - * await batch.send() - * ``` - */ - /** - * Creates a new batch handler for sending multiple transactional - * create/update/upsert/delete collection requests in one network call. - * - * Example: - * ```js - * const batch = pb.createBatch(); - * - * batch.collection("example1").create({ ... }) - * batch.collection("example2").update("RECORD_ID", { ... }) - * batch.collection("example3").delete("RECORD_ID") - * batch.collection("example4").upsert({ ... }) - * - * await batch.send() - * ``` - */ - createBatch(): BatchService; - /** - * Returns the RecordService associated to the specified collection. - */ - /** - * Returns the RecordService associated to the specified collection. - */ - collection(idOrName: string): RecordService; - /** - * Globally enable or disable auto cancellation for pending duplicated requests. - */ - /** - * Globally enable or disable auto cancellation for pending duplicated requests. - */ - autoCancellation(enable: boolean): Client; - /** - * Cancels single request by its cancellation key. - */ - /** - * Cancels single request by its cancellation key. - */ - cancelRequest(requestKey: string): Client; - /** - * Cancels all pending requests. - */ - /** - * Cancels all pending requests. - */ - cancelAllRequests(): Client; - /** - * Constructs a filter expression with placeholders populated from a parameters object. - * - * Placeholder parameters are defined with the `{:paramName}` notation. - * - * The following parameter values are supported: - * - * - `string` (_single quotes are autoescaped_) - * - `number` - * - `boolean` - * - `Date` object (_stringified into the PocketBase datetime format_) - * - `null` - * - everything else is converted to a string using `JSON.stringify()` - * - * Example: - * - * ```js - * pb.collection("example").getFirstListItem(pb.filter( - * 'title ~ {:title} && created >= {:created}', - * { title: "example", created: new Date()} - * )) - * ``` - */ - /** - * Constructs a filter expression with placeholders populated from a parameters object. - * - * Placeholder parameters are defined with the `{:paramName}` notation. - * - * The following parameter values are supported: - * - * - `string` (_single quotes are autoescaped_) - * - `number` - * - `boolean` - * - `Date` object (_stringified into the PocketBase datetime format_) - * - `null` - * - everything else is converted to a string using `JSON.stringify()` - * - * Example: - * - * ```js - * pb.collection("example").getFirstListItem(pb.filter( - * 'title ~ {:title} && created >= {:created}', - * { title: "example", created: new Date()} - * )) - * ``` - */ - filter(raw: string, params?: { - [key: string]: any; - }): string; - /** - * @deprecated Please use `pb.files.getURL()`. - */ - /** - * @deprecated Please use `pb.files.getURL()`. - */ - getFileUrl(record: { - [key: string]: any; - }, filename: string, queryParams?: FileOptions): string; - /** - * @deprecated Please use `pb.buildURL()`. - */ - /** - * @deprecated Please use `pb.buildURL()`. - */ - buildUrl(path: string): string; - /** - * Builds a full client url by safely concatenating the provided path. - */ - /** - * Builds a full client url by safely concatenating the provided path. - */ - buildURL(path: string): string; - /** - * Sends an api http request. - * - * @throws {ClientResponseError} - */ - /** - * Sends an api http request. - * - * @throws {ClientResponseError} - */ - send(path: string, options: SendOptions): Promise; - /** - * Shallow copy the provided object and takes care to initialize - * any options required to preserve the backward compatability. - * - * @param {SendOptions} options - * @return {SendOptions} - */ - /** - * Shallow copy the provided object and takes care to initialize - * any options required to preserve the backward compatability. - * - * @param {SendOptions} options - * @return {SendOptions} - */ - private initSendOptions; - /** - * Extracts the header with the provided name in case-insensitive manner. - * Returns `null` if no header matching the name is found. - */ - /** - * Extracts the header with the provided name in case-insensitive manner. - * Returns `null` if no header matching the name is found. - */ - private getHeader; -} -export { BeforeSendResult, Client as default }; diff --git a/PBandGraphScaffold/node_modules/pocketbase/dist/pocketbase.iife.js b/PBandGraphScaffold/node_modules/pocketbase/dist/pocketbase.iife.js deleted file mode 100644 index 8ffff6e..0000000 --- a/PBandGraphScaffold/node_modules/pocketbase/dist/pocketbase.iife.js +++ /dev/null @@ -1,2 +0,0 @@ -var PocketBase=function(){"use strict";class ClientResponseError extends Error{constructor(e){super("ClientResponseError"),this.url="",this.status=0,this.response={},this.isAbort=!1,this.originalError=null,Object.setPrototypeOf(this,ClientResponseError.prototype),null!==e&&"object"==typeof e&&(this.url="string"==typeof e.url?e.url:"",this.status="number"==typeof e.status?e.status:0,this.isAbort=!!e.isAbort,this.originalError=e.originalError,null!==e.response&&"object"==typeof e.response?this.response=e.response:null!==e.data&&"object"==typeof e.data?this.response=e.data:this.response={}),this.originalError||e instanceof ClientResponseError||(this.originalError=e),"undefined"!=typeof DOMException&&e instanceof DOMException&&("AbortError"==e.name||20==e.code)&&(this.isAbort=!0),this.name="ClientResponseError "+this.status,this.message=this.response?.message,this.message||(this.isAbort?this.message="The request was autocancelled. You can find more info in https://github.com/pocketbase/js-sdk#auto-cancellation.":this.originalError?.cause?.message?.includes("ECONNREFUSED ::1")?this.message="Failed to connect to the PocketBase server. Try changing the SDK URL from localhost to 127.0.0.1 (https://github.com/pocketbase/js-sdk/issues/21).":this.message="Something went wrong."),this.cause=this.originalError}get data(){return this.response}toJSON(){return{...this}}}const e=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function cookieSerialize(t,s,i){const n=Object.assign({},i||{}),r=n.encode||defaultEncode;if(!e.test(t))throw new TypeError("argument name is invalid");const o=r(s);if(o&&!e.test(o))throw new TypeError("argument val is invalid");let a=t+"="+o;if(null!=n.maxAge){const e=n.maxAge-0;if(isNaN(e)||!isFinite(e))throw new TypeError("option maxAge is invalid");a+="; Max-Age="+Math.floor(e)}if(n.domain){if(!e.test(n.domain))throw new TypeError("option domain is invalid");a+="; Domain="+n.domain}if(n.path){if(!e.test(n.path))throw new TypeError("option path is invalid");a+="; Path="+n.path}if(n.expires){if(!function isDate(e){return"[object Date]"===Object.prototype.toString.call(e)||e instanceof Date}(n.expires)||isNaN(n.expires.valueOf()))throw new TypeError("option expires is invalid");a+="; Expires="+n.expires.toUTCString()}if(n.httpOnly&&(a+="; HttpOnly"),n.secure&&(a+="; Secure"),n.priority){switch("string"==typeof n.priority?n.priority.toLowerCase():n.priority){case"low":a+="; Priority=Low";break;case"medium":a+="; Priority=Medium";break;case"high":a+="; Priority=High";break;default:throw new TypeError("option priority is invalid")}}if(n.sameSite){switch("string"==typeof n.sameSite?n.sameSite.toLowerCase():n.sameSite){case!0:a+="; SameSite=Strict";break;case"lax":a+="; SameSite=Lax";break;case"strict":a+="; SameSite=Strict";break;case"none":a+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return a}function defaultDecode(e){return-1!==e.indexOf("%")?decodeURIComponent(e):e}function defaultEncode(e){return encodeURIComponent(e)}const t="undefined"!=typeof navigator&&"ReactNative"===navigator.product||"undefined"!=typeof global&&global.HermesInternal;let s;function getTokenPayload(e){if(e)try{const t=decodeURIComponent(s(e.split(".")[1]).split("").map((function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)})).join(""));return JSON.parse(t)||{}}catch(e){}return{}}function isTokenExpired(e,t=0){let s=getTokenPayload(e);return!(Object.keys(s).length>0&&(!s.exp||s.exp-t>Date.now()/1e3))}s="function"!=typeof atob||t?e=>{let t=String(e).replace(/=+$/,"");if(t.length%4==1)throw new Error("'atob' failed: The string to be decoded is not correctly encoded.");for(var s,i,n=0,r=0,o="";i=t.charAt(r++);~i&&(s=n%4?64*s+i:i,n++%4)?o+=String.fromCharCode(255&s>>(-2*n&6)):0)i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(i);return o}:atob;const i="pb_auth";class BaseAuthStore{constructor(){this.baseToken="",this.baseModel=null,this._onChangeCallbacks=[]}get token(){return this.baseToken}get record(){return this.baseModel}get model(){return this.baseModel}get isValid(){return!isTokenExpired(this.token)}get isSuperuser(){let e=getTokenPayload(this.token);return"auth"==e.type&&("_superusers"==this.record?.collectionName||!this.record?.collectionName&&"pbc_3142635823"==e.collectionId)}get isAdmin(){return console.warn("Please replace pb.authStore.isAdmin with pb.authStore.isSuperuser OR simply check the value of pb.authStore.record?.collectionName"),this.isSuperuser}get isAuthRecord(){return console.warn("Please replace pb.authStore.isAuthRecord with !pb.authStore.isSuperuser OR simply check the value of pb.authStore.record?.collectionName"),"auth"==getTokenPayload(this.token).type&&!this.isSuperuser}save(e,t){this.baseToken=e||"",this.baseModel=t||null,this.triggerChange()}clear(){this.baseToken="",this.baseModel=null,this.triggerChange()}loadFromCookie(e,t=i){const s=function cookieParse(e,t){const s={};if("string"!=typeof e)return s;const i=Object.assign({},{}).decode||defaultDecode;let n=0;for(;n4096){r.record={id:r.record?.id,email:r.record?.email};const s=["collectionId","collectionName","verified"];for(const e in this.record)s.includes(e)&&(r.record[e]=this.record[e]);o=cookieSerialize(t,JSON.stringify(r),e)}return o}onChange(e,t=!1){return this._onChangeCallbacks.push(e),t&&e(this.token,this.record),()=>{for(let t=this._onChangeCallbacks.length-1;t>=0;t--)if(this._onChangeCallbacks[t]==e)return delete this._onChangeCallbacks[t],void this._onChangeCallbacks.splice(t,1)}}triggerChange(){for(const e of this._onChangeCallbacks)e&&e(this.token,this.record)}}class LocalAuthStore extends BaseAuthStore{constructor(e="pocketbase_auth"){super(),this.storageFallback={},this.storageKey=e,this._bindStorageEvent()}get token(){return(this._storageGet(this.storageKey)||{}).token||""}get record(){const e=this._storageGet(this.storageKey)||{};return e.record||e.model||null}get model(){return this.record}save(e,t){this._storageSet(this.storageKey,{token:e,record:t}),super.save(e,t)}clear(){this._storageRemove(this.storageKey),super.clear()}_storageGet(e){if("undefined"!=typeof window&&window?.localStorage){const t=window.localStorage.getItem(e)||"";try{return JSON.parse(t)}catch(e){return t}}return this.storageFallback[e]}_storageSet(e,t){if("undefined"!=typeof window&&window?.localStorage){let s=t;"string"!=typeof t&&(s=JSON.stringify(t)),window.localStorage.setItem(e,s)}else this.storageFallback[e]=t}_storageRemove(e){"undefined"!=typeof window&&window?.localStorage&&window.localStorage?.removeItem(e),delete this.storageFallback[e]}_bindStorageEvent(){"undefined"!=typeof window&&window?.localStorage&&window.addEventListener&&window.addEventListener("storage",(e=>{if(e.key!=this.storageKey)return;const t=this._storageGet(this.storageKey)||{};super.save(t.token||"",t.record||t.model||null)}))}}class BaseService{constructor(e){this.client=e}}class SettingsService extends BaseService{async getAll(e){return e=Object.assign({method:"GET"},e),this.client.send("/api/settings",e)}async update(e,t){return t=Object.assign({method:"PATCH",body:e},t),this.client.send("/api/settings",t)}async testS3(e="storage",t){return t=Object.assign({method:"POST",body:{filesystem:e}},t),this.client.send("/api/settings/test/s3",t).then((()=>!0))}async testEmail(e,t,s,i){return i=Object.assign({method:"POST",body:{email:t,template:s,collection:e}},i),this.client.send("/api/settings/test/email",i).then((()=>!0))}async generateAppleClientSecret(e,t,s,i,n,r){return r=Object.assign({method:"POST",body:{clientId:e,teamId:t,keyId:s,privateKey:i,duration:n}},r),this.client.send("/api/settings/apple/generate-client-secret",r)}}const n=["requestKey","$cancelKey","$autoCancel","fetch","headers","body","query","params","cache","credentials","headers","integrity","keepalive","method","mode","redirect","referrer","referrerPolicy","signal","window"];function normalizeUnknownQueryParams(e){if(e){e.query=e.query||{};for(let t in e)n.includes(t)||(e.query[t]=e[t],delete e[t])}}function serializeQueryParams(e){const t=[];for(const s in e){const i=encodeURIComponent(s),n=Array.isArray(e[s])?e[s]:[e[s]];for(let e of n)e=prepareQueryParamValue(e),null!==e&&t.push(i+"="+e)}return t.join("&")}function prepareQueryParamValue(e){return null==e?null:e instanceof Date?encodeURIComponent(e.toISOString().replace("T"," ")):"object"==typeof e?encodeURIComponent(JSON.stringify(e)):encodeURIComponent(e)}class RealtimeService extends BaseService{constructor(){super(...arguments),this.clientId="",this.eventSource=null,this.subscriptions={},this.lastSentSubscriptions=[],this.maxConnectTimeout=15e3,this.reconnectAttempts=0,this.maxReconnectAttempts=1/0,this.predefinedReconnectIntervals=[200,300,500,1e3,1200,1500,2e3],this.pendingConnects=[]}get isConnected(){return!!this.eventSource&&!!this.clientId&&!this.pendingConnects.length}async subscribe(e,t,s){if(!e)throw new Error("topic must be set.");let i=e;if(s){normalizeUnknownQueryParams(s=Object.assign({},s));const e="options="+encodeURIComponent(JSON.stringify({query:s.query,headers:s.headers}));i+=(i.includes("?")?"&":"?")+e}const listener=function(e){const s=e;let i;try{i=JSON.parse(s?.data)}catch{}t(i||{})};return this.subscriptions[i]||(this.subscriptions[i]=[]),this.subscriptions[i].push(listener),this.isConnected?1===this.subscriptions[i].length?await this.submitSubscriptions():this.eventSource?.addEventListener(i,listener):await this.connect(),async()=>this.unsubscribeByTopicAndListener(e,listener)}async unsubscribe(e){let t=!1;if(e){const s=this.getSubscriptionsByTopic(e);for(let e in s)if(this.hasSubscriptionListeners(e)){for(let t of this.subscriptions[e])this.eventSource?.removeEventListener(e,t);delete this.subscriptions[e],t||(t=!0)}}else this.subscriptions={};this.hasSubscriptionListeners()?t&&await this.submitSubscriptions():this.disconnect()}async unsubscribeByPrefix(e){let t=!1;for(let s in this.subscriptions)if((s+"?").startsWith(e)){t=!0;for(let e of this.subscriptions[s])this.eventSource?.removeEventListener(s,e);delete this.subscriptions[s]}t&&(this.hasSubscriptionListeners()?await this.submitSubscriptions():this.disconnect())}async unsubscribeByTopicAndListener(e,t){let s=!1;const i=this.getSubscriptionsByTopic(e);for(let e in i){if(!Array.isArray(this.subscriptions[e])||!this.subscriptions[e].length)continue;let i=!1;for(let s=this.subscriptions[e].length-1;s>=0;s--)this.subscriptions[e][s]===t&&(i=!0,delete this.subscriptions[e][s],this.subscriptions[e].splice(s,1),this.eventSource?.removeEventListener(e,t));i&&(this.subscriptions[e].length||delete this.subscriptions[e],s||this.hasSubscriptionListeners(e)||(s=!0))}this.hasSubscriptionListeners()?s&&await this.submitSubscriptions():this.disconnect()}hasSubscriptionListeners(e){if(this.subscriptions=this.subscriptions||{},e)return!!this.subscriptions[e]?.length;for(let e in this.subscriptions)if(this.subscriptions[e]?.length)return!0;return!1}async submitSubscriptions(){if(this.clientId)return this.addAllSubscriptionListeners(),this.lastSentSubscriptions=this.getNonEmptySubscriptionKeys(),this.client.send("/api/realtime",{method:"POST",body:{clientId:this.clientId,subscriptions:this.lastSentSubscriptions},requestKey:this.getSubscriptionsCancelKey()}).catch((e=>{if(!e?.isAbort)throw e}))}getSubscriptionsCancelKey(){return"realtime_"+this.clientId}getSubscriptionsByTopic(e){const t={};e=e.includes("?")?e:e+"?";for(let s in this.subscriptions)(s+"?").startsWith(e)&&(t[s]=this.subscriptions[s]);return t}getNonEmptySubscriptionKeys(){const e=[];for(let t in this.subscriptions)this.subscriptions[t].length&&e.push(t);return e}addAllSubscriptionListeners(){if(this.eventSource){this.removeAllSubscriptionListeners();for(let e in this.subscriptions)for(let t of this.subscriptions[e])this.eventSource.addEventListener(e,t)}}removeAllSubscriptionListeners(){if(this.eventSource)for(let e in this.subscriptions)for(let t of this.subscriptions[e])this.eventSource.removeEventListener(e,t)}async connect(){if(!(this.reconnectAttempts>0))return new Promise(((e,t)=>{this.pendingConnects.push({resolve:e,reject:t}),this.pendingConnects.length>1||this.initConnect()}))}initConnect(){this.disconnect(!0),clearTimeout(this.connectTimeoutId),this.connectTimeoutId=setTimeout((()=>{this.connectErrorHandler(new Error("EventSource connect took too long."))}),this.maxConnectTimeout),this.eventSource=new EventSource(this.client.buildURL("/api/realtime")),this.eventSource.onerror=e=>{this.connectErrorHandler(new Error("Failed to establish realtime connection."))},this.eventSource.addEventListener("PB_CONNECT",(e=>{const t=e;this.clientId=t?.lastEventId,this.submitSubscriptions().then((async()=>{let e=3;for(;this.hasUnsentSubscriptions()&&e>0;)e--,await this.submitSubscriptions()})).then((()=>{for(let e of this.pendingConnects)e.resolve();this.pendingConnects=[],this.reconnectAttempts=0,clearTimeout(this.reconnectTimeoutId),clearTimeout(this.connectTimeoutId);const t=this.getSubscriptionsByTopic("PB_CONNECT");for(let s in t)for(let i of t[s])i(e)})).catch((e=>{this.clientId="",this.connectErrorHandler(e)}))}))}hasUnsentSubscriptions(){const e=this.getNonEmptySubscriptionKeys();if(e.length!=this.lastSentSubscriptions.length)return!0;for(const t of e)if(!this.lastSentSubscriptions.includes(t))return!0;return!1}connectErrorHandler(e){if(clearTimeout(this.connectTimeoutId),clearTimeout(this.reconnectTimeoutId),!this.clientId&&!this.reconnectAttempts||this.reconnectAttempts>this.maxReconnectAttempts){for(let t of this.pendingConnects)t.reject(new ClientResponseError(e));return this.pendingConnects=[],void this.disconnect()}this.disconnect(!0);const t=this.predefinedReconnectIntervals[this.reconnectAttempts]||this.predefinedReconnectIntervals[this.predefinedReconnectIntervals.length-1];this.reconnectAttempts++,this.reconnectTimeoutId=setTimeout((()=>{this.initConnect()}),t)}disconnect(e=!1){if(this.clientId&&this.onDisconnect&&this.onDisconnect(Object.keys(this.subscriptions)),clearTimeout(this.connectTimeoutId),clearTimeout(this.reconnectTimeoutId),this.removeAllSubscriptionListeners(),this.client.cancelRequest(this.getSubscriptionsCancelKey()),this.eventSource?.close(),this.eventSource=null,this.clientId="",!e){this.reconnectAttempts=0;for(let e of this.pendingConnects)e.resolve();this.pendingConnects=[]}}}class CrudService extends BaseService{decode(e){return e}async getFullList(e,t){if("number"==typeof e)return this._getFullList(e,t);let s=500;return(t=Object.assign({},e,t)).batch&&(s=t.batch,delete t.batch),this._getFullList(s,t)}async getList(e=1,t=30,s){return(s=Object.assign({method:"GET"},s)).query=Object.assign({page:e,perPage:t},s.query),this.client.send(this.baseCrudPath,s).then((e=>(e.items=e.items?.map((e=>this.decode(e)))||[],e)))}async getFirstListItem(e,t){return(t=Object.assign({requestKey:"one_by_filter_"+this.baseCrudPath+"_"+e},t)).query=Object.assign({filter:e,skipTotal:1},t.query),this.getList(1,1,t).then((e=>{if(!e?.items?.length)throw new ClientResponseError({status:404,response:{code:404,message:"The requested resource wasn't found.",data:{}}});return e.items[0]}))}async getOne(e,t){if(!e)throw new ClientResponseError({url:this.client.buildURL(this.baseCrudPath+"/"),status:404,response:{code:404,message:"Missing required record id.",data:{}}});return t=Object.assign({method:"GET"},t),this.client.send(this.baseCrudPath+"/"+encodeURIComponent(e),t).then((e=>this.decode(e)))}async create(e,t){return t=Object.assign({method:"POST",body:e},t),this.client.send(this.baseCrudPath,t).then((e=>this.decode(e)))}async update(e,t,s){return s=Object.assign({method:"PATCH",body:t},s),this.client.send(this.baseCrudPath+"/"+encodeURIComponent(e),s).then((e=>this.decode(e)))}async delete(e,t){return t=Object.assign({method:"DELETE"},t),this.client.send(this.baseCrudPath+"/"+encodeURIComponent(e),t).then((()=>!0))}_getFullList(e=500,t){(t=t||{}).query=Object.assign({skipTotal:1},t.query);let s=[],request=async i=>this.getList(i,e||500,t).then((e=>{const t=e.items;return s=s.concat(t),t.length==e.perPage?request(i+1):s}));return request(1)}}function normalizeLegacyOptionsArgs(e,t,s,i){const n=void 0!==i;return n||void 0!==s?n?(console.warn(e),t.body=Object.assign({},t.body,s),t.query=Object.assign({},t.query,i),t):Object.assign(t,s):t}function resetAutoRefresh(e){e._resetAutoRefresh?.()}class RecordService extends CrudService{constructor(e,t){super(e),this.collectionIdOrName=t}get baseCrudPath(){return this.baseCollectionPath+"/records"}get baseCollectionPath(){return"/api/collections/"+encodeURIComponent(this.collectionIdOrName)}get isSuperusers(){return"_superusers"==this.collectionIdOrName||"_pbc_2773867675"==this.collectionIdOrName}async subscribe(e,t,s){if(!e)throw new Error("Missing topic.");if(!t)throw new Error("Missing subscription callback.");return this.client.realtime.subscribe(this.collectionIdOrName+"/"+e,t,s)}async unsubscribe(e){return e?this.client.realtime.unsubscribe(this.collectionIdOrName+"/"+e):this.client.realtime.unsubscribeByPrefix(this.collectionIdOrName)}async getFullList(e,t){if("number"==typeof e)return super.getFullList(e,t);const s=Object.assign({},e,t);return super.getFullList(s)}async getList(e=1,t=30,s){return super.getList(e,t,s)}async getFirstListItem(e,t){return super.getFirstListItem(e,t)}async getOne(e,t){return super.getOne(e,t)}async create(e,t){return super.create(e,t)}async update(e,t,s){return super.update(e,t,s).then((e=>{if(this.client.authStore.record?.id===e?.id&&(this.client.authStore.record?.collectionId===this.collectionIdOrName||this.client.authStore.record?.collectionName===this.collectionIdOrName)){let t=Object.assign({},this.client.authStore.record.expand),s=Object.assign({},this.client.authStore.record,e);t&&(s.expand=Object.assign(t,e.expand)),this.client.authStore.save(this.client.authStore.token,s)}return e}))}async delete(e,t){return super.delete(e,t).then((t=>(!t||this.client.authStore.record?.id!==e||this.client.authStore.record?.collectionId!==this.collectionIdOrName&&this.client.authStore.record?.collectionName!==this.collectionIdOrName||this.client.authStore.clear(),t)))}authResponse(e){const t=this.decode(e?.record||{});return this.client.authStore.save(e?.token,t),Object.assign({},e,{token:e?.token||"",record:t})}async listAuthMethods(e){return e=Object.assign({method:"GET",fields:"mfa,otp,password,oauth2"},e),this.client.send(this.baseCollectionPath+"/auth-methods",e)}async authWithPassword(e,t,s){let i;s=Object.assign({method:"POST",body:{identity:e,password:t}},s),this.isSuperusers&&(i=s.autoRefreshThreshold,delete s.autoRefreshThreshold,s.autoRefresh||resetAutoRefresh(this.client));let n=await this.client.send(this.baseCollectionPath+"/auth-with-password",s);return n=this.authResponse(n),i&&this.isSuperusers&&function registerAutoRefresh(e,t,s,i){resetAutoRefresh(e);const n=e.beforeSend,r=e.authStore.record,o=e.authStore.onChange(((t,s)=>{(!t||s?.id!=r?.id||(s?.collectionId||r?.collectionId)&&s?.collectionId!=r?.collectionId)&&resetAutoRefresh(e)}));e._resetAutoRefresh=function(){o(),e.beforeSend=n,delete e._resetAutoRefresh},e.beforeSend=async(r,o)=>{const a=e.authStore.token;if(o.query?.autoRefresh)return n?n(r,o):{url:r,sendOptions:o};let c=e.authStore.isValid;if(c&&isTokenExpired(e.authStore.token,t))try{await s()}catch(e){c=!1}c||await i();const l=o.headers||{};for(let t in l)if("authorization"==t.toLowerCase()&&a==l[t]&&e.authStore.token){l[t]=e.authStore.token;break}return o.headers=l,n?n(r,o):{url:r,sendOptions:o}}}(this.client,i,(()=>this.authRefresh({autoRefresh:!0})),(()=>this.authWithPassword(e,t,Object.assign({autoRefresh:!0},s)))),n}async authWithOAuth2Code(e,t,s,i,n,r,o){let a={method:"POST",body:{provider:e,code:t,codeVerifier:s,redirectURL:i,createData:n}};return a=normalizeLegacyOptionsArgs("This form of authWithOAuth2Code(provider, code, codeVerifier, redirectURL, createData?, body?, query?) is deprecated. Consider replacing it with authWithOAuth2Code(provider, code, codeVerifier, redirectURL, createData?, options?).",a,r,o),this.client.send(this.baseCollectionPath+"/auth-with-oauth2",a).then((e=>this.authResponse(e)))}authWithOAuth2(...e){if(e.length>1||"string"==typeof e?.[0])return console.warn("PocketBase: This form of authWithOAuth2() is deprecated and may get removed in the future. Please replace with authWithOAuth2Code() OR use the authWithOAuth2() realtime form as shown in https://pocketbase.io/docs/authentication/#oauth2-integration."),this.authWithOAuth2Code(e?.[0]||"",e?.[1]||"",e?.[2]||"",e?.[3]||"",e?.[4]||{},e?.[5]||{},e?.[6]||{});const t=e?.[0]||{};let s=null;t.urlCallback||(s=openBrowserPopup(void 0));const i=new RealtimeService(this.client);function cleanup(){s?.close(),i.unsubscribe()}const n={},r=t.requestKey;return r&&(n.requestKey=r),this.listAuthMethods(n).then((e=>{const n=e.oauth2.providers.find((e=>e.name===t.provider));if(!n)throw new ClientResponseError(new Error(`Missing or invalid provider "${t.provider}".`));const o=this.client.buildURL("/api/oauth2-redirect"),a=r?this.client.cancelControllers?.[r]:void 0;return a&&(a.signal.onabort=()=>{cleanup()}),new Promise((async(e,r)=>{try{await i.subscribe("@oauth2",(async s=>{const c=i.clientId;try{if(!s.state||c!==s.state)throw new Error("State parameters don't match.");if(s.error||!s.code)throw new Error("OAuth2 redirect error or missing code: "+s.error);const i=Object.assign({},t);delete i.provider,delete i.scopes,delete i.createData,delete i.urlCallback,a?.signal?.onabort&&(a.signal.onabort=null);const r=await this.authWithOAuth2Code(n.name,s.code,n.codeVerifier,o,t.createData,i);e(r)}catch(e){r(new ClientResponseError(e))}cleanup()}));const c={state:i.clientId};t.scopes?.length&&(c.scope=t.scopes.join(" "));const l=this._replaceQueryParams(n.authURL+o,c);let h=t.urlCallback||function(e){s?s.location.href=e:s=openBrowserPopup(e)};await h(l)}catch(e){cleanup(),r(new ClientResponseError(e))}}))})).catch((e=>{throw cleanup(),e}))}async authRefresh(e,t){let s={method:"POST"};return s=normalizeLegacyOptionsArgs("This form of authRefresh(body?, query?) is deprecated. Consider replacing it with authRefresh(options?).",s,e,t),this.client.send(this.baseCollectionPath+"/auth-refresh",s).then((e=>this.authResponse(e)))}async requestPasswordReset(e,t,s){let i={method:"POST",body:{email:e}};return i=normalizeLegacyOptionsArgs("This form of requestPasswordReset(email, body?, query?) is deprecated. Consider replacing it with requestPasswordReset(email, options?).",i,t,s),this.client.send(this.baseCollectionPath+"/request-password-reset",i).then((()=>!0))}async confirmPasswordReset(e,t,s,i,n){let r={method:"POST",body:{token:e,password:t,passwordConfirm:s}};return r=normalizeLegacyOptionsArgs("This form of confirmPasswordReset(token, password, passwordConfirm, body?, query?) is deprecated. Consider replacing it with confirmPasswordReset(token, password, passwordConfirm, options?).",r,i,n),this.client.send(this.baseCollectionPath+"/confirm-password-reset",r).then((()=>!0))}async requestVerification(e,t,s){let i={method:"POST",body:{email:e}};return i=normalizeLegacyOptionsArgs("This form of requestVerification(email, body?, query?) is deprecated. Consider replacing it with requestVerification(email, options?).",i,t,s),this.client.send(this.baseCollectionPath+"/request-verification",i).then((()=>!0))}async confirmVerification(e,t,s){let i={method:"POST",body:{token:e}};return i=normalizeLegacyOptionsArgs("This form of confirmVerification(token, body?, query?) is deprecated. Consider replacing it with confirmVerification(token, options?).",i,t,s),this.client.send(this.baseCollectionPath+"/confirm-verification",i).then((()=>{const t=getTokenPayload(e),s=this.client.authStore.record;return s&&!s.verified&&s.id===t.id&&s.collectionId===t.collectionId&&(s.verified=!0,this.client.authStore.save(this.client.authStore.token,s)),!0}))}async requestEmailChange(e,t,s){let i={method:"POST",body:{newEmail:e}};return i=normalizeLegacyOptionsArgs("This form of requestEmailChange(newEmail, body?, query?) is deprecated. Consider replacing it with requestEmailChange(newEmail, options?).",i,t,s),this.client.send(this.baseCollectionPath+"/request-email-change",i).then((()=>!0))}async confirmEmailChange(e,t,s,i){let n={method:"POST",body:{token:e,password:t}};return n=normalizeLegacyOptionsArgs("This form of confirmEmailChange(token, password, body?, query?) is deprecated. Consider replacing it with confirmEmailChange(token, password, options?).",n,s,i),this.client.send(this.baseCollectionPath+"/confirm-email-change",n).then((()=>{const t=getTokenPayload(e),s=this.client.authStore.record;return s&&s.id===t.id&&s.collectionId===t.collectionId&&this.client.authStore.clear(),!0}))}async listExternalAuths(e,t){return this.client.collection("_externalAuths").getFullList(Object.assign({},t,{filter:this.client.filter("recordRef = {:id}",{id:e})}))}async unlinkExternalAuth(e,t,s){const i=await this.client.collection("_externalAuths").getFirstListItem(this.client.filter("recordRef = {:recordId} && provider = {:provider}",{recordId:e,provider:t}));return this.client.collection("_externalAuths").delete(i.id,s).then((()=>!0))}async requestOTP(e,t){return t=Object.assign({method:"POST",body:{email:e}},t),this.client.send(this.baseCollectionPath+"/request-otp",t)}async authWithOTP(e,t,s){return s=Object.assign({method:"POST",body:{otpId:e,password:t}},s),this.client.send(this.baseCollectionPath+"/auth-with-otp",s).then((e=>this.authResponse(e)))}async impersonate(e,t,s){(s=Object.assign({method:"POST",body:{duration:t}},s)).headers=s.headers||{},s.headers.Authorization||(s.headers.Authorization=this.client.authStore.token);const i=new Client(this.client.baseURL,new BaseAuthStore,this.client.lang),n=await i.send(this.baseCollectionPath+"/impersonate/"+encodeURIComponent(e),s);return i.authStore.save(n?.token,this.decode(n?.record||{})),i}_replaceQueryParams(e,t={}){let s=e,i="";e.indexOf("?")>=0&&(s=e.substring(0,e.indexOf("?")),i=e.substring(e.indexOf("?")+1));const n={},r=i.split("&");for(const e of r){if(""==e)continue;const t=e.split("=");n[decodeURIComponent(t[0].replace(/\+/g," "))]=decodeURIComponent((t[1]||"").replace(/\+/g," "))}for(let e in t)t.hasOwnProperty(e)&&(null==t[e]?delete n[e]:n[e]=t[e]);i="";for(let e in n)n.hasOwnProperty(e)&&(""!=i&&(i+="&"),i+=encodeURIComponent(e.replace(/%20/g,"+"))+"="+encodeURIComponent(n[e].replace(/%20/g,"+")));return""!=i?s+"?"+i:s}}function openBrowserPopup(e){if("undefined"==typeof window||!window?.open)throw new ClientResponseError(new Error("Not in a browser context - please pass a custom urlCallback function."));let t=1024,s=768,i=window.innerWidth,n=window.innerHeight;t=t>i?i:t,s=s>n?n:s;let r=i/2-t/2,o=n/2-s/2;return window.open(e,"popup_window","width="+t+",height="+s+",top="+o+",left="+r+",resizable,menubar=no")}class CollectionService extends CrudService{get baseCrudPath(){return"/api/collections"}async import(e,t=!1,s){return s=Object.assign({method:"PUT",body:{collections:e,deleteMissing:t}},s),this.client.send(this.baseCrudPath+"/import",s).then((()=>!0))}async getScaffolds(e){return e=Object.assign({method:"GET"},e),this.client.send(this.baseCrudPath+"/meta/scaffolds",e)}async truncate(e,t){return t=Object.assign({method:"DELETE"},t),this.client.send(this.baseCrudPath+"/"+encodeURIComponent(e)+"/truncate",t).then((()=>!0))}}class LogService extends BaseService{async getList(e=1,t=30,s){return(s=Object.assign({method:"GET"},s)).query=Object.assign({page:e,perPage:t},s.query),this.client.send("/api/logs",s)}async getOne(e,t){if(!e)throw new ClientResponseError({url:this.client.buildURL("/api/logs/"),status:404,response:{code:404,message:"Missing required log id.",data:{}}});return t=Object.assign({method:"GET"},t),this.client.send("/api/logs/"+encodeURIComponent(e),t)}async getStats(e){return e=Object.assign({method:"GET"},e),this.client.send("/api/logs/stats",e)}}class HealthService extends BaseService{async check(e){return e=Object.assign({method:"GET"},e),this.client.send("/api/health",e)}}class FileService extends BaseService{getUrl(e,t,s={}){return console.warn("Please replace pb.files.getUrl() with pb.files.getURL()"),this.getURL(e,t,s)}getURL(e,t,s={}){if(!t||!e?.id||!e?.collectionId&&!e?.collectionName)return"";const i=[];i.push("api"),i.push("files"),i.push(encodeURIComponent(e.collectionId||e.collectionName)),i.push(encodeURIComponent(e.id)),i.push(encodeURIComponent(t));let n=this.client.buildURL(i.join("/"));if(Object.keys(s).length){!1===s.download&&delete s.download;const e=new URLSearchParams(s);n+=(n.includes("?")?"&":"?")+e}return n}async getToken(e){return e=Object.assign({method:"POST"},e),this.client.send("/api/files/token",e).then((e=>e?.token||""))}}class BackupService extends BaseService{async getFullList(e){return e=Object.assign({method:"GET"},e),this.client.send("/api/backups",e)}async create(e,t){return t=Object.assign({method:"POST",body:{name:e}},t),this.client.send("/api/backups",t).then((()=>!0))}async upload(e,t){return t=Object.assign({method:"POST",body:e},t),this.client.send("/api/backups/upload",t).then((()=>!0))}async delete(e,t){return t=Object.assign({method:"DELETE"},t),this.client.send(`/api/backups/${encodeURIComponent(e)}`,t).then((()=>!0))}async restore(e,t){return t=Object.assign({method:"POST"},t),this.client.send(`/api/backups/${encodeURIComponent(e)}/restore`,t).then((()=>!0))}getDownloadUrl(e,t){return console.warn("Please replace pb.backups.getDownloadUrl() with pb.backups.getDownloadURL()"),this.getDownloadURL(e,t)}getDownloadURL(e,t){return this.client.buildURL(`/api/backups/${encodeURIComponent(t)}?token=${encodeURIComponent(e)}`)}}class CronService extends BaseService{async getFullList(e){return e=Object.assign({method:"GET"},e),this.client.send("/api/crons",e)}async run(e,t){return t=Object.assign({method:"POST"},t),this.client.send(`/api/crons/${encodeURIComponent(e)}`,t).then((()=>!0))}}function isFile(e){return"undefined"!=typeof Blob&&e instanceof Blob||"undefined"!=typeof File&&e instanceof File||null!==e&&"object"==typeof e&&e.uri&&("undefined"!=typeof navigator&&"ReactNative"===navigator.product||"undefined"!=typeof global&&global.HermesInternal)}function isFormData(e){return e&&("FormData"===e.constructor?.name||"undefined"!=typeof FormData&&e instanceof FormData)}function hasFileField(e){for(const t in e){const s=Array.isArray(e[t])?e[t]:[e[t]];for(const e of s)if(isFile(e))return!0}return!1}const r=/^[\-\.\d]+$/;function inferFormDataValue(e){if("string"!=typeof e)return e;if("true"==e)return!0;if("false"==e)return!1;if(("-"===e[0]||e[0]>="0"&&e[0]<="9")&&r.test(e)){let t=+e;if(""+t===e)return t}return e}class BatchService extends BaseService{constructor(){super(...arguments),this.requests=[],this.subs={}}collection(e){return this.subs[e]||(this.subs[e]=new SubBatchService(this.requests,e)),this.subs[e]}async send(e){const t=new FormData,s=[];for(let e=0;e{if("@jsonPayload"===s&&"string"==typeof e)try{let s=JSON.parse(e);Object.assign(t,s)}catch(e){console.warn("@jsonPayload error:",e)}else void 0!==t[s]?(Array.isArray(t[s])||(t[s]=[t[s]]),t[s].push(inferFormDataValue(e))):t[s]=inferFormDataValue(e)})),t}(s));for(const t in s){const i=s[t];if(isFile(i))e.files[t]=e.files[t]||[],e.files[t].push(i);else if(Array.isArray(i)){const s=[],n=[];for(const e of i)isFile(e)?s.push(e):n.push(e);if(s.length>0&&s.length==i.length){e.files[t]=e.files[t]||[];for(let i of s)e.files[t].push(i)}else if(e.json[t]=n,s.length>0){let i=t;t.startsWith("+")||t.endsWith("+")||(i+="+"),e.files[i]=e.files[i]||[];for(let t of s)e.files[i].push(t)}}else e.json[t]=i}}}class Client{get baseUrl(){return this.baseURL}set baseUrl(e){this.baseURL=e}constructor(e="/",t,s="en-US"){this.cancelControllers={},this.recordServices={},this.enableAutoCancellation=!0,this.baseURL=e,this.lang=s,t?this.authStore=t:"undefined"!=typeof window&&window.Deno?this.authStore=new BaseAuthStore:this.authStore=new LocalAuthStore,this.collections=new CollectionService(this),this.files=new FileService(this),this.logs=new LogService(this),this.settings=new SettingsService(this),this.realtime=new RealtimeService(this),this.health=new HealthService(this),this.backups=new BackupService(this),this.crons=new CronService(this)}get admins(){return this.collection("_superusers")}createBatch(){return new BatchService(this)}collection(e){return this.recordServices[e]||(this.recordServices[e]=new RecordService(this,e)),this.recordServices[e]}autoCancellation(e){return this.enableAutoCancellation=!!e,this}cancelRequest(e){return this.cancelControllers[e]&&(this.cancelControllers[e].abort(),delete this.cancelControllers[e]),this}cancelAllRequests(){for(let e in this.cancelControllers)this.cancelControllers[e].abort();return this.cancelControllers={},this}filter(e,t){if(!t)return e;for(let s in t){let i=t[s];switch(typeof i){case"boolean":case"number":i=""+i;break;case"string":i="'"+i.replace(/'/g,"\\'")+"'";break;default:i=null===i?"null":i instanceof Date?"'"+i.toISOString().replace("T"," ")+"'":"'"+JSON.stringify(i).replace(/'/g,"\\'")+"'"}e=e.replaceAll("{:"+s+"}",i)}return e}getFileUrl(e,t,s={}){return console.warn("Please replace pb.getFileUrl() with pb.files.getURL()"),this.files.getURL(e,t,s)}buildUrl(e){return console.warn("Please replace pb.buildUrl() with pb.buildURL()"),this.buildURL(e)}buildURL(e){let t=this.baseURL;return"undefined"==typeof window||!window.location||t.startsWith("https://")||t.startsWith("http://")||(t=window.location.origin?.endsWith("/")?window.location.origin.substring(0,window.location.origin.length-1):window.location.origin||"",this.baseURL.startsWith("/")||(t+=window.location.pathname||"/",t+=t.endsWith("/")?"":"/"),t+=this.baseURL),e&&(t+=t.endsWith("/")?"":"/",t+=e.startsWith("/")?e.substring(1):e),t}async send(e,t){t=this.initSendOptions(e,t);let s=this.buildURL(e);if(this.beforeSend){const e=Object.assign({},await this.beforeSend(s,t));void 0!==e.url||void 0!==e.options?(s=e.url||s,t=e.options||t):Object.keys(e).length&&(t=e,console?.warn&&console.warn("Deprecated format of beforeSend return: please use `return { url, options }`, instead of `return options`."))}if(void 0!==t.query){const e=serializeQueryParams(t.query);e&&(s+=(s.includes("?")?"&":"?")+e),delete t.query}"application/json"==this.getHeader(t.headers,"Content-Type")&&t.body&&"string"!=typeof t.body&&(t.body=JSON.stringify(t.body));return(t.fetch||fetch)(s,t).then((async e=>{let s={};try{s=await e.json()}catch(e){if(t.signal?.aborted||"undefined"!=typeof DOMException&&e instanceof DOMException&&("AbortError"==e.name||20==e.code))throw e}if(this.afterSend&&(s=await this.afterSend(e,s,t)),e.status>=400)throw new ClientResponseError({url:e.url,status:e.status,data:s});return s})).catch((e=>{throw new ClientResponseError(e)}))}initSendOptions(e,t){if((t=Object.assign({method:"GET"},t)).body=function convertToFormDataIfNeeded(e){if("undefined"==typeof FormData||void 0===e||"object"!=typeof e||null===e||isFormData(e)||!hasFileField(e))return e;const t=new FormData;for(const s in e){const i=e[s];if(void 0!==i)if("object"!=typeof i||hasFileField({data:i})){const e=Array.isArray(i)?i:[i];for(let i of e)t.append(s,i)}else{let e={};e[s]=i,t.append("@jsonPayload",JSON.stringify(e))}}return t}(t.body),normalizeUnknownQueryParams(t),t.query=Object.assign({},t.params,t.query),void 0===t.requestKey&&(!1===t.$autoCancel||!1===t.query.$autoCancel?t.requestKey=null:(t.$cancelKey||t.query.$cancelKey)&&(t.requestKey=t.$cancelKey||t.query.$cancelKey)),delete t.$autoCancel,delete t.query.$autoCancel,delete t.$cancelKey,delete t.query.$cancelKey,null!==this.getHeader(t.headers,"Content-Type")||isFormData(t.body)||(t.headers=Object.assign({},t.headers,{"Content-Type":"application/json"})),null===this.getHeader(t.headers,"Accept-Language")&&(t.headers=Object.assign({},t.headers,{"Accept-Language":this.lang})),this.authStore.token&&null===this.getHeader(t.headers,"Authorization")&&(t.headers=Object.assign({},t.headers,{Authorization:this.authStore.token})),this.enableAutoCancellation&&null!==t.requestKey){const s=t.requestKey||(t.method||"GET")+e;delete t.requestKey,this.cancelRequest(s);const i=new AbortController;this.cancelControllers[s]=i,t.signal=i.signal}return t}getHeader(e,t){e=e||{},t=t.toLowerCase();for(let s in e)if(s.toLowerCase()==t)return e[s];return null}}return Client}(); -//# sourceMappingURL=pocketbase.iife.js.map diff --git a/PBandGraphScaffold/node_modules/pocketbase/dist/pocketbase.iife.js.map b/PBandGraphScaffold/node_modules/pocketbase/dist/pocketbase.iife.js.map deleted file mode 100644 index 4d685f7..0000000 --- a/PBandGraphScaffold/node_modules/pocketbase/dist/pocketbase.iife.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"pocketbase.iife.js","sources":["../src/ClientResponseError.ts","../src/tools/cookie.ts","../src/tools/jwt.ts","../src/stores/BaseAuthStore.ts","../src/stores/LocalAuthStore.ts","../src/services/BaseService.ts","../src/services/SettingsService.ts","../src/tools/options.ts","../src/services/RealtimeService.ts","../src/services/CrudService.ts","../src/tools/legacy.ts","../src/tools/refresh.ts","../src/services/RecordService.ts","../src/services/CollectionService.ts","../src/services/LogService.ts","../src/services/HealthService.ts","../src/services/FileService.ts","../src/services/BackupService.ts","../src/services/CronService.ts","../src/tools/formdata.ts","../src/services/BatchService.ts","../src/Client.ts"],"sourcesContent":["/**\n * ClientResponseError is a custom Error class that is intended to wrap\n * and normalize any error thrown by `Client.send()`.\n */\nexport class ClientResponseError extends Error {\n url: string = \"\";\n status: number = 0;\n response: { [key: string]: any } = {};\n isAbort: boolean = false;\n originalError: any = null;\n\n constructor(errData?: any) {\n super(\"ClientResponseError\");\n\n // Set the prototype explicitly.\n // https://github.com/Microsoft/TypeScript-wiki/blob/main/Breaking-Changes.md#extending-built-ins-like-error-array-and-map-may-no-longer-work\n Object.setPrototypeOf(this, ClientResponseError.prototype);\n\n if (errData !== null && typeof errData === \"object\") {\n this.url = typeof errData.url === \"string\" ? errData.url : \"\";\n this.status = typeof errData.status === \"number\" ? errData.status : 0;\n this.isAbort = !!errData.isAbort;\n this.originalError = errData.originalError;\n\n if (errData.response !== null && typeof errData.response === \"object\") {\n this.response = errData.response;\n } else if (errData.data !== null && typeof errData.data === \"object\") {\n this.response = errData.data;\n } else {\n this.response = {};\n }\n }\n\n if (!this.originalError && !(errData instanceof ClientResponseError)) {\n this.originalError = errData;\n }\n\n if (\n typeof DOMException !== \"undefined\" &&\n errData instanceof DOMException &&\n // https://developer.mozilla.org/en-US/docs/Web/API/DOMException#aborterror\n (errData.name == \"AbortError\" || errData.code == 20)\n ) {\n this.isAbort = true;\n }\n\n this.name = \"ClientResponseError \" + this.status;\n this.message = this.response?.message;\n if (!this.message) {\n if (this.isAbort) {\n this.message =\n \"The request was autocancelled. You can find more info in https://github.com/pocketbase/js-sdk#auto-cancellation.\";\n } else if (this.originalError?.cause?.message?.includes(\"ECONNREFUSED ::1\")) {\n this.message =\n \"Failed to connect to the PocketBase server. Try changing the SDK URL from localhost to 127.0.0.1 (https://github.com/pocketbase/js-sdk/issues/21).\";\n } else {\n this.message = \"Something went wrong.\";\n }\n }\n\n // set this.cause so that JS debugging tools can automatically connect\n // the dots between the original error and the wrapped one\n this.cause = this.originalError;\n }\n\n /**\n * Alias for `this.response` for backward compatibility.\n */\n get data() {\n return this.response;\n }\n\n /**\n * Make a POJO's copy of the current error class instance.\n * @see https://github.com/vuex-orm/vuex-orm/issues/255\n */\n toJSON() {\n return { ...this };\n }\n}\n","/**\n * -------------------------------------------------------------------\n * Simple cookie parse and serialize utilities mostly based on the\n * node module https://github.com/jshttp/cookie.\n * -------------------------------------------------------------------\n */\n\n/**\n * RegExp to match field-content in RFC 7230 sec 3.2\n *\n * field-content = field-vchar [ 1*( SP / HTAB ) field-vchar ]\n * field-vchar = VCHAR / obs-text\n * obs-text = %x80-FF\n */\nconst fieldContentRegExp = /^[\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+$/;\n\nexport interface ParseOptions {\n decode?: (val: string) => string;\n}\n\n/**\n * Parses the given cookie header string into an object\n * The object has the various cookies as keys(names) => values\n */\nexport function cookieParse(str: string, options?: ParseOptions): { [key: string]: any } {\n const result: { [key: string]: any } = {};\n\n if (typeof str !== \"string\") {\n return result;\n }\n\n const opt = Object.assign({}, options || {});\n const decode = opt.decode || defaultDecode;\n\n let index = 0;\n while (index < str.length) {\n const eqIdx = str.indexOf(\"=\", index);\n\n // no more cookie pairs\n if (eqIdx === -1) {\n break;\n }\n\n let endIdx = str.indexOf(\";\", index);\n\n if (endIdx === -1) {\n endIdx = str.length;\n } else if (endIdx < eqIdx) {\n // backtrack on prior semicolon\n index = str.lastIndexOf(\";\", eqIdx - 1) + 1;\n continue;\n }\n\n const key = str.slice(index, eqIdx).trim();\n\n // only assign once\n if (undefined === result[key]) {\n let val = str.slice(eqIdx + 1, endIdx).trim();\n\n // quoted values\n if (val.charCodeAt(0) === 0x22) {\n val = val.slice(1, -1);\n }\n\n try {\n result[key] = decode(val);\n } catch (_) {\n result[key] = val; // no decoding\n }\n }\n\n index = endIdx + 1;\n }\n\n return result;\n}\n\nexport interface SerializeOptions {\n encode?: (val: string | number | boolean) => string;\n maxAge?: number;\n domain?: string;\n path?: string;\n expires?: Date;\n httpOnly?: boolean;\n secure?: boolean;\n priority?: string;\n sameSite?: boolean | string;\n}\n\n/**\n * Serialize data into a cookie header.\n *\n * Serialize the a name value pair into a cookie string suitable for\n * http headers. An optional options object specified cookie parameters.\n *\n * ```js\n * cookieSerialize('foo', 'bar', { httpOnly: true }) // \"foo=bar; httpOnly\"\n * ```\n */\nexport function cookieSerialize(\n name: string,\n val: string,\n options?: SerializeOptions,\n): string {\n const opt = Object.assign({}, options || {});\n const encode = opt.encode || defaultEncode;\n\n if (!fieldContentRegExp.test(name)) {\n throw new TypeError(\"argument name is invalid\");\n }\n\n const value = encode(val);\n\n if (value && !fieldContentRegExp.test(value)) {\n throw new TypeError(\"argument val is invalid\");\n }\n\n let result = name + \"=\" + value;\n\n if (opt.maxAge != null) {\n const maxAge = opt.maxAge - 0;\n\n if (isNaN(maxAge) || !isFinite(maxAge)) {\n throw new TypeError(\"option maxAge is invalid\");\n }\n\n result += \"; Max-Age=\" + Math.floor(maxAge);\n }\n\n if (opt.domain) {\n if (!fieldContentRegExp.test(opt.domain)) {\n throw new TypeError(\"option domain is invalid\");\n }\n\n result += \"; Domain=\" + opt.domain;\n }\n\n if (opt.path) {\n if (!fieldContentRegExp.test(opt.path)) {\n throw new TypeError(\"option path is invalid\");\n }\n\n result += \"; Path=\" + opt.path;\n }\n\n if (opt.expires) {\n if (!isDate(opt.expires) || isNaN(opt.expires.valueOf())) {\n throw new TypeError(\"option expires is invalid\");\n }\n\n result += \"; Expires=\" + opt.expires.toUTCString();\n }\n\n if (opt.httpOnly) {\n result += \"; HttpOnly\";\n }\n\n if (opt.secure) {\n result += \"; Secure\";\n }\n\n if (opt.priority) {\n const priority =\n typeof opt.priority === \"string\" ? opt.priority.toLowerCase() : opt.priority;\n\n switch (priority) {\n case \"low\":\n result += \"; Priority=Low\";\n break;\n case \"medium\":\n result += \"; Priority=Medium\";\n break;\n case \"high\":\n result += \"; Priority=High\";\n break;\n default:\n throw new TypeError(\"option priority is invalid\");\n }\n }\n\n if (opt.sameSite) {\n const sameSite =\n typeof opt.sameSite === \"string\" ? opt.sameSite.toLowerCase() : opt.sameSite;\n\n switch (sameSite) {\n case true:\n result += \"; SameSite=Strict\";\n break;\n case \"lax\":\n result += \"; SameSite=Lax\";\n break;\n case \"strict\":\n result += \"; SameSite=Strict\";\n break;\n case \"none\":\n result += \"; SameSite=None\";\n break;\n default:\n throw new TypeError(\"option sameSite is invalid\");\n }\n }\n\n return result;\n}\n\n/**\n * Default URL-decode string value function.\n * Optimized to skip native call when no `%`.\n */\nfunction defaultDecode(val: string): string {\n return val.indexOf(\"%\") !== -1 ? decodeURIComponent(val) : val;\n}\n\n/**\n * Default URL-encode value function.\n */\nfunction defaultEncode(val: string | number | boolean): string {\n return encodeURIComponent(val);\n}\n\n/**\n * Determines if value is a Date.\n */\nfunction isDate(val: any): boolean {\n return Object.prototype.toString.call(val) === \"[object Date]\" || val instanceof Date;\n}\n","// @todo remove after https://github.com/reactwg/react-native-releases/issues/287\nconst isReactNative =\n (typeof navigator !== \"undefined\" && navigator.product === \"ReactNative\") ||\n (typeof global !== \"undefined\" && (global as any).HermesInternal);\n\nlet atobPolyfill: Function;\nif (typeof atob === \"function\" && !isReactNative) {\n atobPolyfill = atob;\n} else {\n /**\n * The code was extracted from:\n * https://github.com/davidchambers/Base64.js\n */\n atobPolyfill = (input: any) => {\n const chars = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\";\n\n let str = String(input).replace(/=+$/, \"\");\n if (str.length % 4 == 1) {\n throw new Error(\n \"'atob' failed: The string to be decoded is not correctly encoded.\",\n );\n }\n\n for (\n // initialize result and counters\n var bc = 0, bs, buffer, idx = 0, output = \"\";\n // get next character\n (buffer = str.charAt(idx++));\n // character found in table? initialize bit storage and add its ascii value;\n ~buffer &&\n ((bs = bc % 4 ? (bs as any) * 64 + buffer : buffer),\n // and if not first of each 4 characters,\n // convert the first 8 bits to one ascii character\n bc++ % 4)\n ? (output += String.fromCharCode(255 & (bs >> ((-2 * bc) & 6))))\n : 0\n ) {\n // try to find character in table (0-63, not found => -1)\n buffer = chars.indexOf(buffer);\n }\n\n return output;\n };\n}\n\n/**\n * Returns JWT token's payload data.\n */\nexport function getTokenPayload(token: string): { [key: string]: any } {\n if (token) {\n try {\n const encodedPayload = decodeURIComponent(\n atobPolyfill(token.split(\".\")[1])\n .split(\"\")\n .map(function (c: string) {\n return \"%\" + (\"00\" + c.charCodeAt(0).toString(16)).slice(-2);\n })\n .join(\"\"),\n );\n\n return JSON.parse(encodedPayload) || {};\n } catch (e) {}\n }\n\n return {};\n}\n\n/**\n * Checks whether a JWT token is expired or not.\n * Tokens without `exp` payload key are considered valid.\n * Tokens with empty payload (eg. invalid token strings) are considered expired.\n *\n * @param token The token to check.\n * @param [expirationThreshold] Time in seconds that will be subtracted from the token `exp` property.\n */\nexport function isTokenExpired(token: string, expirationThreshold = 0): boolean {\n let payload = getTokenPayload(token);\n\n if (\n Object.keys(payload).length > 0 &&\n (!payload.exp || payload.exp - expirationThreshold > Date.now() / 1000)\n ) {\n return false;\n }\n\n return true;\n}\n","import { cookieParse, cookieSerialize, SerializeOptions } from \"@/tools/cookie\";\nimport { isTokenExpired, getTokenPayload } from \"@/tools/jwt\";\nimport { RecordModel } from \"@/tools/dtos\";\n\nexport type AuthRecord = RecordModel | null;\n\nexport type AuthModel = AuthRecord; // for backward compatibility\n\nexport type OnStoreChangeFunc = (token: string, record: AuthRecord) => void;\n\nconst defaultCookieKey = \"pb_auth\";\n\n/**\n * Base AuthStore class that stores the auth state in runtime memory (aka. only for the duration of the store instane).\n *\n * Usually you wouldn't use it directly and instead use the builtin LocalAuthStore, AsyncAuthStore\n * or extend it with your own custom implementation.\n */\nexport class BaseAuthStore {\n protected baseToken: string = \"\";\n protected baseModel: AuthRecord = null;\n\n private _onChangeCallbacks: Array = [];\n\n /**\n * Retrieves the stored token (if any).\n */\n get token(): string {\n return this.baseToken;\n }\n\n /**\n * Retrieves the stored model data (if any).\n */\n get record(): AuthRecord {\n return this.baseModel;\n }\n\n /**\n * @deprecated use `record` instead.\n */\n get model(): AuthRecord {\n return this.baseModel;\n }\n\n /**\n * Loosely checks if the store has valid token (aka. existing and unexpired exp claim).\n */\n get isValid(): boolean {\n return !isTokenExpired(this.token);\n }\n\n /**\n * Loosely checks whether the currently loaded store state is for superuser.\n *\n * Alternatively you can also compare directly `pb.authStore.record?.collectionName`.\n */\n get isSuperuser(): boolean {\n let payload = getTokenPayload(this.token);\n\n return (\n payload.type == \"auth\" &&\n (this.record?.collectionName == \"_superusers\" ||\n // fallback in case the record field is not populated and assuming\n // that the collection crc32 checksum id wasn't manually changed\n (!this.record?.collectionName &&\n payload.collectionId == \"pbc_3142635823\"))\n );\n }\n\n /**\n * @deprecated use `isSuperuser` instead or simply check the record.collectionName property.\n */\n get isAdmin(): boolean {\n console.warn(\n \"Please replace pb.authStore.isAdmin with pb.authStore.isSuperuser OR simply check the value of pb.authStore.record?.collectionName\",\n );\n return this.isSuperuser;\n }\n\n /**\n * @deprecated use `!isSuperuser` instead or simply check the record.collectionName property.\n */\n get isAuthRecord(): boolean {\n console.warn(\n \"Please replace pb.authStore.isAuthRecord with !pb.authStore.isSuperuser OR simply check the value of pb.authStore.record?.collectionName\",\n );\n return getTokenPayload(this.token).type == \"auth\" && !this.isSuperuser;\n }\n\n /**\n * Saves the provided new token and model data in the auth store.\n */\n save(token: string, record?: AuthRecord): void {\n this.baseToken = token || \"\";\n this.baseModel = record || null;\n\n this.triggerChange();\n }\n\n /**\n * Removes the stored token and model data form the auth store.\n */\n clear(): void {\n this.baseToken = \"\";\n this.baseModel = null;\n this.triggerChange();\n }\n\n /**\n * Parses the provided cookie string and updates the store state\n * with the cookie's token and model data.\n *\n * NB! This function doesn't validate the token or its data.\n * Usually this isn't a concern if you are interacting only with the\n * PocketBase API because it has the proper server-side security checks in place,\n * but if you are using the store `isValid` state for permission controls\n * in a node server (eg. SSR), then it is recommended to call `authRefresh()`\n * after loading the cookie to ensure an up-to-date token and model state.\n * For example:\n *\n * ```js\n * pb.authStore.loadFromCookie(\"cookie string...\");\n *\n * try {\n * // get an up-to-date auth store state by veryfing and refreshing the loaded auth model (if any)\n * pb.authStore.isValid && await pb.collection('users').authRefresh();\n * } catch (_) {\n * // clear the auth store on failed refresh\n * pb.authStore.clear();\n * }\n * ```\n */\n loadFromCookie(cookie: string, key = defaultCookieKey): void {\n const rawData = cookieParse(cookie || \"\")[key] || \"\";\n\n let data: { [key: string]: any } = {};\n try {\n data = JSON.parse(rawData);\n // normalize\n if (typeof data === null || typeof data !== \"object\" || Array.isArray(data)) {\n data = {};\n }\n } catch (_) {}\n\n this.save(data.token || \"\", data.record || data.model || null);\n }\n\n /**\n * Exports the current store state as cookie string.\n *\n * By default the following optional attributes are added:\n * - Secure\n * - HttpOnly\n * - SameSite=Strict\n * - Path=/\n * - Expires={the token expiration date}\n *\n * NB! If the generated cookie exceeds 4096 bytes, this method will\n * strip the model data to the bare minimum to try to fit within the\n * recommended size in https://www.rfc-editor.org/rfc/rfc6265#section-6.1.\n */\n exportToCookie(options?: SerializeOptions, key = defaultCookieKey): string {\n const defaultOptions: SerializeOptions = {\n secure: true,\n sameSite: true,\n httpOnly: true,\n path: \"/\",\n };\n\n // extract the token expiration date\n const payload = getTokenPayload(this.token);\n if (payload?.exp) {\n defaultOptions.expires = new Date(payload.exp * 1000);\n } else {\n defaultOptions.expires = new Date(\"1970-01-01\");\n }\n\n // merge with the user defined options\n options = Object.assign({}, defaultOptions, options);\n\n const rawData = {\n token: this.token,\n record: this.record ? JSON.parse(JSON.stringify(this.record)) : null,\n };\n\n let result = cookieSerialize(key, JSON.stringify(rawData), options);\n\n const resultLength =\n typeof Blob !== \"undefined\" ? new Blob([result]).size : result.length;\n\n // strip down the model data to the bare minimum\n if (rawData.record && resultLength > 4096) {\n rawData.record = { id: rawData.record?.id, email: rawData.record?.email };\n const extraProps = [\"collectionId\", \"collectionName\", \"verified\"];\n for (const prop in this.record) {\n if (extraProps.includes(prop)) {\n rawData.record[prop] = this.record[prop];\n }\n }\n result = cookieSerialize(key, JSON.stringify(rawData), options);\n }\n\n return result;\n }\n\n /**\n * Register a callback function that will be called on store change.\n *\n * You can set the `fireImmediately` argument to true in order to invoke\n * the provided callback right after registration.\n *\n * Returns a removal function that you could call to \"unsubscribe\" from the changes.\n */\n onChange(callback: OnStoreChangeFunc, fireImmediately = false): () => void {\n this._onChangeCallbacks.push(callback);\n\n if (fireImmediately) {\n callback(this.token, this.record);\n }\n\n return () => {\n for (let i = this._onChangeCallbacks.length - 1; i >= 0; i--) {\n if (this._onChangeCallbacks[i] == callback) {\n delete this._onChangeCallbacks[i]; // removes the function reference\n this._onChangeCallbacks.splice(i, 1); // reindex the array\n return;\n }\n }\n };\n }\n\n protected triggerChange(): void {\n for (const callback of this._onChangeCallbacks) {\n callback && callback(this.token, this.record);\n }\n }\n}\n","import { BaseAuthStore, AuthRecord } from \"@/stores/BaseAuthStore\";\n\n/**\n * The default token store for browsers with auto fallback\n * to runtime/memory if local storage is undefined (e.g. in node env).\n */\nexport class LocalAuthStore extends BaseAuthStore {\n private storageFallback: { [key: string]: any } = {};\n private storageKey: string;\n\n constructor(storageKey = \"pocketbase_auth\") {\n super();\n\n this.storageKey = storageKey;\n\n this._bindStorageEvent();\n }\n\n /**\n * @inheritdoc\n */\n get token(): string {\n const data = this._storageGet(this.storageKey) || {};\n\n return data.token || \"\";\n }\n\n /**\n * @inheritdoc\n */\n get record(): AuthRecord {\n const data = this._storageGet(this.storageKey) || {};\n\n return data.record || data.model || null;\n }\n\n /**\n * @deprecated use `record` instead.\n */\n get model(): AuthRecord {\n return this.record;\n }\n\n /**\n * @inheritdoc\n */\n save(token: string, record?: AuthRecord) {\n this._storageSet(this.storageKey, {\n token: token,\n record: record,\n });\n\n super.save(token, record);\n }\n\n /**\n * @inheritdoc\n */\n clear() {\n this._storageRemove(this.storageKey);\n\n super.clear();\n }\n\n // ---------------------------------------------------------------\n // Internal helpers:\n // ---------------------------------------------------------------\n\n /**\n * Retrieves `key` from the browser's local storage\n * (or runtime/memory if local storage is undefined).\n */\n private _storageGet(key: string): any {\n if (typeof window !== \"undefined\" && window?.localStorage) {\n const rawValue = window.localStorage.getItem(key) || \"\";\n try {\n return JSON.parse(rawValue);\n } catch (e) {\n // not a json\n return rawValue;\n }\n }\n\n // fallback\n return this.storageFallback[key];\n }\n\n /**\n * Stores a new data in the browser's local storage\n * (or runtime/memory if local storage is undefined).\n */\n private _storageSet(key: string, value: any) {\n if (typeof window !== \"undefined\" && window?.localStorage) {\n // store in local storage\n let normalizedVal = value;\n if (typeof value !== \"string\") {\n normalizedVal = JSON.stringify(value);\n }\n window.localStorage.setItem(key, normalizedVal);\n } else {\n // store in fallback\n this.storageFallback[key] = value;\n }\n }\n\n /**\n * Removes `key` from the browser's local storage and the runtime/memory.\n */\n private _storageRemove(key: string) {\n // delete from local storage\n if (typeof window !== \"undefined\" && window?.localStorage) {\n window.localStorage?.removeItem(key);\n }\n\n // delete from fallback\n delete this.storageFallback[key];\n }\n\n /**\n * Updates the current store state on localStorage change.\n */\n private _bindStorageEvent() {\n if (\n typeof window === \"undefined\" ||\n !window?.localStorage ||\n !window.addEventListener\n ) {\n return;\n }\n\n window.addEventListener(\"storage\", (e) => {\n if (e.key != this.storageKey) {\n return;\n }\n\n const data = this._storageGet(this.storageKey) || {};\n\n super.save(data.token || \"\", data.record || data.model || null);\n });\n }\n}\n","import Client from \"@/Client\";\n\n/**\n * BaseService class that should be inherited from all API services.\n */\nexport abstract class BaseService {\n readonly client: Client;\n\n constructor(client: Client) {\n this.client = client;\n }\n}\n","import { BaseService } from \"@/services/BaseService\";\nimport { CommonOptions } from \"@/tools/options\";\n\ninterface appleClientSecret {\n secret: string;\n}\n\nexport class SettingsService extends BaseService {\n /**\n * Fetch all available app settings.\n *\n * @throws {ClientResponseError}\n */\n async getAll(options?: CommonOptions): Promise<{ [key: string]: any }> {\n options = Object.assign(\n {\n method: \"GET\",\n },\n options,\n );\n\n return this.client.send(\"/api/settings\", options);\n }\n\n /**\n * Bulk updates app settings.\n *\n * @throws {ClientResponseError}\n */\n async update(\n bodyParams?: { [key: string]: any } | FormData,\n options?: CommonOptions,\n ): Promise<{ [key: string]: any }> {\n options = Object.assign(\n {\n method: \"PATCH\",\n body: bodyParams,\n },\n options,\n );\n\n return this.client.send(\"/api/settings\", options);\n }\n\n /**\n * Performs a S3 filesystem connection test.\n *\n * The currently supported `filesystem` are \"storage\" and \"backups\".\n *\n * @throws {ClientResponseError}\n */\n async testS3(\n filesystem: string = \"storage\",\n options?: CommonOptions,\n ): Promise {\n options = Object.assign(\n {\n method: \"POST\",\n body: {\n filesystem: filesystem,\n },\n },\n options,\n );\n\n return this.client.send(\"/api/settings/test/s3\", options).then(() => true);\n }\n\n /**\n * Sends a test email.\n *\n * The possible `emailTemplate` values are:\n * - verification\n * - password-reset\n * - email-change\n *\n * @throws {ClientResponseError}\n */\n async testEmail(\n collectionIdOrName: string,\n toEmail: string,\n emailTemplate: string,\n options?: CommonOptions,\n ): Promise {\n options = Object.assign(\n {\n method: \"POST\",\n body: {\n email: toEmail,\n template: emailTemplate,\n collection: collectionIdOrName,\n },\n },\n options,\n );\n\n return this.client.send(\"/api/settings/test/email\", options).then(() => true);\n }\n\n /**\n * Generates a new Apple OAuth2 client secret.\n *\n * @throws {ClientResponseError}\n */\n async generateAppleClientSecret(\n clientId: string,\n teamId: string,\n keyId: string,\n privateKey: string,\n duration: number,\n options?: CommonOptions,\n ): Promise {\n options = Object.assign(\n {\n method: \"POST\",\n body: {\n clientId,\n teamId,\n keyId,\n privateKey,\n duration,\n },\n },\n options,\n );\n\n return this.client.send(\"/api/settings/apple/generate-client-secret\", options);\n }\n}\n","export interface SendOptions extends RequestInit {\n // for backward compatibility and to minimize the verbosity,\n // any top-level field that doesn't exist in RequestInit or the\n // fields below will be treated as query parameter.\n [key: string]: any;\n\n /**\n * Optional custom fetch function to use for sending the request.\n */\n fetch?: (url: RequestInfo | URL, config?: RequestInit) => Promise;\n\n /**\n * Custom headers to send with the requests.\n */\n headers?: { [key: string]: string };\n\n /**\n * The body of the request (serialized automatically for json requests).\n */\n body?: any;\n\n /**\n * Query parameters that will be appended to the request url.\n */\n query?: { [key: string]: any };\n\n /**\n * @deprecated use `query` instead\n *\n * for backward-compatibility `params` values are merged with `query`,\n * but this option may get removed in the final v1 release\n */\n params?: { [key: string]: any };\n\n /**\n * The request identifier that can be used to cancel pending requests.\n */\n requestKey?: string | null;\n\n /**\n * @deprecated use `requestKey:string` instead\n */\n $cancelKey?: string;\n\n /**\n * @deprecated use `requestKey:null` instead\n */\n $autoCancel?: boolean;\n}\n\nexport interface CommonOptions extends SendOptions {\n fields?: string;\n}\n\nexport interface ListOptions extends CommonOptions {\n page?: number;\n perPage?: number;\n sort?: string;\n filter?: string;\n skipTotal?: boolean;\n}\n\nexport interface FullListOptions extends ListOptions {\n batch?: number;\n}\n\nexport interface RecordOptions extends CommonOptions {\n expand?: string;\n}\n\nexport interface RecordListOptions extends ListOptions, RecordOptions {}\n\nexport interface RecordFullListOptions extends FullListOptions, RecordOptions {}\n\nexport interface RecordSubscribeOptions extends SendOptions {\n fields?: string;\n filter?: string;\n expand?: string;\n}\n\nexport interface LogStatsOptions extends CommonOptions {\n filter?: string;\n}\n\nexport interface FileOptions extends CommonOptions {\n thumb?: string;\n download?: boolean;\n}\n\nexport interface AuthOptions extends CommonOptions {\n /**\n * If autoRefreshThreshold is set it will take care to auto refresh\n * when necessary the auth data before each request to ensure that\n * the auth state is always valid.\n *\n * The value must be in seconds, aka. the amount of seconds\n * that will be subtracted from the current token `exp` claim in order\n * to determine whether it is going to expire within the specified time threshold.\n *\n * For example, if you want to auto refresh the token if it is\n * going to expire in the next 30mins (or already has expired),\n * it can be set to `1800`\n */\n autoRefreshThreshold?: number;\n}\n\n// -------------------------------------------------------------------\n\n// list of known SendOptions keys (everything else is treated as query param)\nconst knownSendOptionsKeys = [\n \"requestKey\",\n \"$cancelKey\",\n \"$autoCancel\",\n \"fetch\",\n \"headers\",\n \"body\",\n \"query\",\n \"params\",\n // ---,\n \"cache\",\n \"credentials\",\n \"headers\",\n \"integrity\",\n \"keepalive\",\n \"method\",\n \"mode\",\n \"redirect\",\n \"referrer\",\n \"referrerPolicy\",\n \"signal\",\n \"window\",\n];\n\n// modifies in place the provided options by moving unknown send options as query parameters.\nexport function normalizeUnknownQueryParams(options?: SendOptions): void {\n if (!options) {\n return;\n }\n\n options.query = options.query || {};\n for (let key in options) {\n if (knownSendOptionsKeys.includes(key)) {\n continue;\n }\n\n options.query[key] = options[key];\n delete options[key];\n }\n}\n\nexport function serializeQueryParams(params: { [key: string]: any }): string {\n const result: Array = [];\n\n for (const key in params) {\n const encodedKey = encodeURIComponent(key);\n const arrValue = Array.isArray(params[key]) ? params[key] : [params[key]];\n\n for (let v of arrValue) {\n v = prepareQueryParamValue(v);\n if (v === null) {\n continue;\n }\n result.push(encodedKey + \"=\" + v);\n }\n }\n\n return result.join(\"&\");\n}\n\n// encodes and normalizes the provided query param value.\nfunction prepareQueryParamValue(value: any): null | string {\n if (value === null || typeof value === \"undefined\") {\n return null;\n }\n\n if (value instanceof Date) {\n return encodeURIComponent(value.toISOString().replace(\"T\", \" \"));\n }\n\n if (typeof value === \"object\") {\n return encodeURIComponent(JSON.stringify(value));\n }\n\n return encodeURIComponent(value);\n}\n","import { ClientResponseError } from \"@/ClientResponseError\";\nimport { BaseService } from \"@/services/BaseService\";\nimport { SendOptions, normalizeUnknownQueryParams } from \"@/tools/options\";\n\ninterface promiseCallbacks {\n resolve: Function;\n reject: Function;\n}\n\ntype Subscriptions = { [key: string]: Array };\n\nexport type UnsubscribeFunc = () => Promise;\n\nexport class RealtimeService extends BaseService {\n clientId: string = \"\";\n\n private eventSource: EventSource | null = null;\n private subscriptions: Subscriptions = {};\n private lastSentSubscriptions: Array = [];\n private connectTimeoutId: any;\n private maxConnectTimeout: number = 15000;\n private reconnectTimeoutId: any;\n private reconnectAttempts: number = 0;\n private maxReconnectAttempts: number = Infinity;\n private predefinedReconnectIntervals: Array = [\n 200, 300, 500, 1000, 1200, 1500, 2000,\n ];\n private pendingConnects: Array = [];\n\n /**\n * Returns whether the realtime connection has been established.\n */\n get isConnected(): boolean {\n return !!this.eventSource && !!this.clientId && !this.pendingConnects.length;\n }\n\n /**\n * An optional hook that is invoked when the realtime client disconnects\n * either when unsubscribing from all subscriptions or when the\n * connection was interrupted or closed by the server.\n *\n * The received argument could be used to determine whether the disconnect\n * is a result from unsubscribing (`activeSubscriptions.length == 0`)\n * or because of network/server error (`activeSubscriptions.length > 0`).\n *\n * If you want to listen for the opposite, aka. when the client connection is established,\n * subscribe to the `PB_CONNECT` event.\n */\n onDisconnect?: (activeSubscriptions: Array) => void;\n\n /**\n * Register the subscription listener.\n *\n * You can subscribe multiple times to the same topic.\n *\n * If the SSE connection is not started yet,\n * this method will also initialize it.\n */\n async subscribe(\n topic: string,\n callback: (data: any) => void,\n options?: SendOptions,\n ): Promise {\n if (!topic) {\n throw new Error(\"topic must be set.\");\n }\n\n let key = topic;\n\n // serialize and append the topic options (if any)\n if (options) {\n options = Object.assign({}, options); // shallow copy\n normalizeUnknownQueryParams(options);\n const serialized =\n \"options=\" +\n encodeURIComponent(\n JSON.stringify({ query: options.query, headers: options.headers }),\n );\n key += (key.includes(\"?\") ? \"&\" : \"?\") + serialized;\n }\n\n const listener = function (e: Event) {\n const msgEvent = e as MessageEvent;\n\n let data;\n try {\n data = JSON.parse(msgEvent?.data);\n } catch {}\n\n callback(data || {});\n };\n\n // store the listener\n if (!this.subscriptions[key]) {\n this.subscriptions[key] = [];\n }\n this.subscriptions[key].push(listener);\n\n if (!this.isConnected) {\n // initialize sse connection\n await this.connect();\n } else if (this.subscriptions[key].length === 1) {\n // send the updated subscriptions (if it is the first for the key)\n await this.submitSubscriptions();\n } else {\n // only register the listener\n this.eventSource?.addEventListener(key, listener);\n }\n\n return async (): Promise => {\n return this.unsubscribeByTopicAndListener(topic, listener);\n };\n }\n\n /**\n * Unsubscribe from all subscription listeners with the specified topic.\n *\n * If `topic` is not provided, then this method will unsubscribe\n * from all active subscriptions.\n *\n * This method is no-op if there are no active subscriptions.\n *\n * The related sse connection will be autoclosed if after the\n * unsubscribe operation there are no active subscriptions left.\n */\n async unsubscribe(topic?: string): Promise {\n let needToSubmit = false;\n\n if (!topic) {\n // remove all subscriptions\n this.subscriptions = {};\n } else {\n // remove all listeners related to the topic\n const subs = this.getSubscriptionsByTopic(topic);\n for (let key in subs) {\n if (!this.hasSubscriptionListeners(key)) {\n continue; // already unsubscribed\n }\n\n for (let listener of this.subscriptions[key]) {\n this.eventSource?.removeEventListener(key, listener);\n }\n delete this.subscriptions[key];\n\n // mark for subscriptions change submit if there are no other listeners\n if (!needToSubmit) {\n needToSubmit = true;\n }\n }\n }\n\n if (!this.hasSubscriptionListeners()) {\n // no other active subscriptions -> close the sse connection\n this.disconnect();\n } else if (needToSubmit) {\n await this.submitSubscriptions();\n }\n }\n\n /**\n * Unsubscribe from all subscription listeners starting with the specified topic prefix.\n *\n * This method is no-op if there are no active subscriptions with the specified topic prefix.\n *\n * The related sse connection will be autoclosed if after the\n * unsubscribe operation there are no active subscriptions left.\n */\n async unsubscribeByPrefix(keyPrefix: string): Promise {\n let hasAtleastOneTopic = false;\n for (let key in this.subscriptions) {\n // \"?\" so that it can be used as end delimiter for the prefix\n if (!(key + \"?\").startsWith(keyPrefix)) {\n continue;\n }\n\n hasAtleastOneTopic = true;\n for (let listener of this.subscriptions[key]) {\n this.eventSource?.removeEventListener(key, listener);\n }\n delete this.subscriptions[key];\n }\n\n if (!hasAtleastOneTopic) {\n return; // nothing to unsubscribe from\n }\n\n if (this.hasSubscriptionListeners()) {\n // submit the deleted subscriptions\n await this.submitSubscriptions();\n } else {\n // no other active subscriptions -> close the sse connection\n this.disconnect();\n }\n }\n\n /**\n * Unsubscribe from all subscriptions matching the specified topic and listener function.\n *\n * This method is no-op if there are no active subscription with\n * the specified topic and listener.\n *\n * The related sse connection will be autoclosed if after the\n * unsubscribe operation there are no active subscriptions left.\n */\n async unsubscribeByTopicAndListener(\n topic: string,\n listener: EventListener,\n ): Promise {\n let needToSubmit = false;\n\n const subs = this.getSubscriptionsByTopic(topic);\n for (let key in subs) {\n if (\n !Array.isArray(this.subscriptions[key]) ||\n !this.subscriptions[key].length\n ) {\n continue; // already unsubscribed\n }\n\n let exist = false;\n for (let i = this.subscriptions[key].length - 1; i >= 0; i--) {\n if (this.subscriptions[key][i] !== listener) {\n continue;\n }\n\n exist = true; // has at least one matching listener\n delete this.subscriptions[key][i]; // removes the function reference\n this.subscriptions[key].splice(i, 1); // reindex the array\n this.eventSource?.removeEventListener(key, listener);\n }\n if (!exist) {\n continue;\n }\n\n // remove the key from the subscriptions list if there are no other listeners\n if (!this.subscriptions[key].length) {\n delete this.subscriptions[key];\n }\n\n // mark for subscriptions change submit if there are no other listeners\n if (!needToSubmit && !this.hasSubscriptionListeners(key)) {\n needToSubmit = true;\n }\n }\n\n if (!this.hasSubscriptionListeners()) {\n // no other active subscriptions -> close the sse connection\n this.disconnect();\n } else if (needToSubmit) {\n await this.submitSubscriptions();\n }\n }\n\n private hasSubscriptionListeners(keyToCheck?: string): boolean {\n this.subscriptions = this.subscriptions || {};\n\n // check the specified key\n if (keyToCheck) {\n return !!this.subscriptions[keyToCheck]?.length;\n }\n\n // check for at least one non-empty subscription\n for (let key in this.subscriptions) {\n if (!!this.subscriptions[key]?.length) {\n return true;\n }\n }\n\n return false;\n }\n\n private async submitSubscriptions(): Promise {\n if (!this.clientId) {\n return; // no client/subscriber\n }\n\n // optimistic update\n this.addAllSubscriptionListeners();\n\n this.lastSentSubscriptions = this.getNonEmptySubscriptionKeys();\n\n return this.client\n .send(\"/api/realtime\", {\n method: \"POST\",\n body: {\n clientId: this.clientId,\n subscriptions: this.lastSentSubscriptions,\n },\n requestKey: this.getSubscriptionsCancelKey(),\n })\n .catch((err) => {\n if (err?.isAbort) {\n return; // silently ignore aborted pending requests\n }\n throw err;\n });\n }\n\n private getSubscriptionsCancelKey(): string {\n return \"realtime_\" + this.clientId;\n }\n\n private getSubscriptionsByTopic(topic: string): Subscriptions {\n const result: Subscriptions = {};\n\n // \"?\" so that it can be used as end delimiter for the topic\n topic = topic.includes(\"?\") ? topic : topic + \"?\";\n\n for (let key in this.subscriptions) {\n if ((key + \"?\").startsWith(topic)) {\n result[key] = this.subscriptions[key];\n }\n }\n\n return result;\n }\n\n private getNonEmptySubscriptionKeys(): Array {\n const result: Array = [];\n\n for (let key in this.subscriptions) {\n if (this.subscriptions[key].length) {\n result.push(key);\n }\n }\n\n return result;\n }\n\n private addAllSubscriptionListeners(): void {\n if (!this.eventSource) {\n return;\n }\n\n this.removeAllSubscriptionListeners();\n\n for (let key in this.subscriptions) {\n for (let listener of this.subscriptions[key]) {\n this.eventSource.addEventListener(key, listener);\n }\n }\n }\n\n private removeAllSubscriptionListeners(): void {\n if (!this.eventSource) {\n return;\n }\n\n for (let key in this.subscriptions) {\n for (let listener of this.subscriptions[key]) {\n this.eventSource.removeEventListener(key, listener);\n }\n }\n }\n\n private async connect(): Promise {\n if (this.reconnectAttempts > 0) {\n // immediately resolve the promise to avoid indefinitely\n // blocking the client during reconnection\n return;\n }\n\n return new Promise((resolve, reject) => {\n this.pendingConnects.push({ resolve, reject });\n\n if (this.pendingConnects.length > 1) {\n // all promises will be resolved once the connection is established\n return;\n }\n\n this.initConnect();\n });\n }\n\n private initConnect() {\n this.disconnect(true);\n\n // wait up to 15s for connect\n clearTimeout(this.connectTimeoutId);\n this.connectTimeoutId = setTimeout(() => {\n this.connectErrorHandler(new Error(\"EventSource connect took too long.\"));\n }, this.maxConnectTimeout);\n\n this.eventSource = new EventSource(this.client.buildURL(\"/api/realtime\"));\n\n this.eventSource.onerror = (_) => {\n this.connectErrorHandler(\n new Error(\"Failed to establish realtime connection.\"),\n );\n };\n\n this.eventSource.addEventListener(\"PB_CONNECT\", (e) => {\n const msgEvent = e as MessageEvent;\n this.clientId = msgEvent?.lastEventId;\n\n this.submitSubscriptions()\n .then(async () => {\n let retries = 3;\n while (this.hasUnsentSubscriptions() && retries > 0) {\n retries--;\n // resubscribe to ensure that the latest topics are submitted\n //\n // This is needed because missed topics could happen on reconnect\n // if after the pending sent `submitSubscriptions()` call another `subscribe()`\n // was made before the submit was able to complete.\n await this.submitSubscriptions();\n }\n })\n .then(() => {\n for (let p of this.pendingConnects) {\n p.resolve();\n }\n\n // reset connect meta\n this.pendingConnects = [];\n this.reconnectAttempts = 0;\n clearTimeout(this.reconnectTimeoutId);\n clearTimeout(this.connectTimeoutId);\n\n // propagate the PB_CONNECT event\n const connectSubs = this.getSubscriptionsByTopic(\"PB_CONNECT\");\n for (let key in connectSubs) {\n for (let listener of connectSubs[key]) {\n listener(e);\n }\n }\n })\n .catch((err) => {\n this.clientId = \"\";\n this.connectErrorHandler(err);\n });\n });\n }\n\n private hasUnsentSubscriptions(): boolean {\n const latestTopics = this.getNonEmptySubscriptionKeys();\n if (latestTopics.length != this.lastSentSubscriptions.length) {\n return true;\n }\n\n for (const t of latestTopics) {\n if (!this.lastSentSubscriptions.includes(t)) {\n return true;\n }\n }\n\n return false;\n }\n\n private connectErrorHandler(err: any) {\n clearTimeout(this.connectTimeoutId);\n clearTimeout(this.reconnectTimeoutId);\n\n if (\n // wasn't previously connected -> direct reject\n (!this.clientId && !this.reconnectAttempts) ||\n // was previously connected but the max reconnection limit has been reached\n this.reconnectAttempts > this.maxReconnectAttempts\n ) {\n for (let p of this.pendingConnects) {\n p.reject(new ClientResponseError(err));\n }\n this.pendingConnects = [];\n this.disconnect();\n return;\n }\n\n // otherwise -> reconnect in the background\n this.disconnect(true);\n const timeout =\n this.predefinedReconnectIntervals[this.reconnectAttempts] ||\n this.predefinedReconnectIntervals[\n this.predefinedReconnectIntervals.length - 1\n ];\n this.reconnectAttempts++;\n this.reconnectTimeoutId = setTimeout(() => {\n this.initConnect();\n }, timeout);\n }\n\n private disconnect(fromReconnect = false): void {\n if (this.clientId && this.onDisconnect) {\n this.onDisconnect(Object.keys(this.subscriptions));\n }\n\n clearTimeout(this.connectTimeoutId);\n clearTimeout(this.reconnectTimeoutId);\n this.removeAllSubscriptionListeners();\n this.client.cancelRequest(this.getSubscriptionsCancelKey());\n this.eventSource?.close();\n this.eventSource = null;\n this.clientId = \"\";\n\n if (!fromReconnect) {\n this.reconnectAttempts = 0;\n\n // resolve any remaining connect promises\n //\n // this is done to avoid unnecessary throwing errors in case\n // unsubscribe is called before the pending connect promises complete\n // (see https://github.com/pocketbase/pocketbase/discussions/2897#discussioncomment-6423818)\n for (let p of this.pendingConnects) {\n p.resolve();\n }\n this.pendingConnects = [];\n }\n }\n}\n","import { BaseService } from \"@/services/BaseService\";\nimport { ClientResponseError } from \"@/ClientResponseError\";\nimport { ListResult } from \"@/tools/dtos\";\nimport { CommonOptions, ListOptions, FullListOptions } from \"@/tools/options\";\n\nexport abstract class CrudService extends BaseService {\n /**\n * Base path for the crud actions (without trailing slash, eg. '/admins').\n */\n abstract get baseCrudPath(): string;\n\n /**\n * Response data decoder.\n */\n decode(data: { [key: string]: any }): T {\n return data as T;\n }\n\n /**\n * Returns a promise with all list items batch fetched at once\n * (by default 500 items per request; to change it set the `batch` query param).\n *\n * You can use the generic T to supply a wrapper type of the crud model.\n *\n * @throws {ClientResponseError}\n */\n async getFullList(options?: FullListOptions): Promise>;\n\n /**\n * Legacy version of getFullList with explicitly specified batch size.\n */\n async getFullList(batch?: number, options?: ListOptions): Promise>;\n\n async getFullList(\n batchOrqueryParams?: number | FullListOptions,\n options?: ListOptions,\n ): Promise> {\n if (typeof batchOrqueryParams == \"number\") {\n return this._getFullList(batchOrqueryParams, options);\n }\n\n options = Object.assign({}, batchOrqueryParams, options);\n\n let batch = 500;\n if (options.batch) {\n batch = options.batch;\n delete options.batch;\n }\n\n return this._getFullList(batch, options);\n }\n\n /**\n * Returns paginated items list.\n *\n * You can use the generic T to supply a wrapper type of the crud model.\n *\n * @throws {ClientResponseError}\n */\n async getList(\n page = 1,\n perPage = 30,\n options?: ListOptions,\n ): Promise> {\n options = Object.assign(\n {\n method: \"GET\",\n },\n options,\n );\n\n options.query = Object.assign(\n {\n page: page,\n perPage: perPage,\n },\n options.query,\n );\n\n return this.client.send(this.baseCrudPath, options).then((responseData: any) => {\n responseData.items =\n responseData.items?.map((item: any) => {\n return this.decode(item);\n }) || [];\n\n return responseData;\n });\n }\n\n /**\n * Returns the first found item by the specified filter.\n *\n * Internally it calls `getList(1, 1, { filter, skipTotal })` and\n * returns the first found item.\n *\n * You can use the generic T to supply a wrapper type of the crud model.\n *\n * For consistency with `getOne`, this method will throw a 404\n * ClientResponseError if no item was found.\n *\n * @throws {ClientResponseError}\n */\n async getFirstListItem(filter: string, options?: CommonOptions): Promise {\n options = Object.assign(\n {\n requestKey: \"one_by_filter_\" + this.baseCrudPath + \"_\" + filter,\n },\n options,\n );\n\n options.query = Object.assign(\n {\n filter: filter,\n skipTotal: 1,\n },\n options.query,\n );\n\n return this.getList(1, 1, options).then((result) => {\n if (!result?.items?.length) {\n throw new ClientResponseError({\n status: 404,\n response: {\n code: 404,\n message: \"The requested resource wasn't found.\",\n data: {},\n },\n });\n }\n\n return result.items[0];\n });\n }\n\n /**\n * Returns single item by its id.\n *\n * You can use the generic T to supply a wrapper type of the crud model.\n *\n * If `id` is empty it will throw a 404 error.\n *\n * @throws {ClientResponseError}\n */\n async getOne(id: string, options?: CommonOptions): Promise {\n if (!id) {\n throw new ClientResponseError({\n url: this.client.buildURL(this.baseCrudPath + \"/\"),\n status: 404,\n response: {\n code: 404,\n message: \"Missing required record id.\",\n data: {},\n },\n });\n }\n\n options = Object.assign(\n {\n method: \"GET\",\n },\n options,\n );\n\n return this.client\n .send(this.baseCrudPath + \"/\" + encodeURIComponent(id), options)\n .then((responseData: any) => this.decode(responseData));\n }\n\n /**\n * Creates a new item.\n *\n * You can use the generic T to supply a wrapper type of the crud model.\n *\n * @throws {ClientResponseError}\n */\n async create(\n bodyParams?: { [key: string]: any } | FormData,\n options?: CommonOptions,\n ): Promise {\n options = Object.assign(\n {\n method: \"POST\",\n body: bodyParams,\n },\n options,\n );\n\n return this.client\n .send(this.baseCrudPath, options)\n .then((responseData: any) => this.decode(responseData));\n }\n\n /**\n * Updates an existing item by its id.\n *\n * You can use the generic T to supply a wrapper type of the crud model.\n *\n * @throws {ClientResponseError}\n */\n async update(\n id: string,\n bodyParams?: { [key: string]: any } | FormData,\n options?: CommonOptions,\n ): Promise {\n options = Object.assign(\n {\n method: \"PATCH\",\n body: bodyParams,\n },\n options,\n );\n\n return this.client\n .send(this.baseCrudPath + \"/\" + encodeURIComponent(id), options)\n .then((responseData: any) => this.decode(responseData));\n }\n\n /**\n * Deletes an existing item by its id.\n *\n * @throws {ClientResponseError}\n */\n async delete(id: string, options?: CommonOptions): Promise {\n options = Object.assign(\n {\n method: \"DELETE\",\n },\n options,\n );\n\n return this.client\n .send(this.baseCrudPath + \"/\" + encodeURIComponent(id), options)\n .then(() => true);\n }\n\n /**\n * Returns a promise with all list items batch fetched at once.\n */\n protected _getFullList(\n batchSize = 500,\n options?: ListOptions,\n ): Promise> {\n options = options || {};\n options.query = Object.assign(\n {\n skipTotal: 1,\n },\n options.query,\n );\n\n let result: Array = [];\n\n let request = async (page: number): Promise> => {\n return this.getList(page, batchSize || 500, options).then((list) => {\n const castedList = list as any as ListResult;\n const items = castedList.items;\n\n result = result.concat(items);\n\n if (items.length == list.perPage) {\n return request(page + 1);\n }\n\n return result;\n });\n };\n\n return request(1);\n }\n}\n","import { SendOptions } from \"@/tools/options\";\n\nexport function normalizeLegacyOptionsArgs(\n legacyWarn: string,\n baseOptions: SendOptions,\n bodyOrOptions?: any,\n query?: any,\n): SendOptions {\n const hasBodyOrOptions = typeof bodyOrOptions !== \"undefined\";\n const hasQuery = typeof query !== \"undefined\";\n\n if (!hasQuery && !hasBodyOrOptions) {\n return baseOptions;\n }\n\n if (hasQuery) {\n console.warn(legacyWarn);\n baseOptions.body = Object.assign({}, baseOptions.body, bodyOrOptions);\n baseOptions.query = Object.assign({}, baseOptions.query, query);\n\n return baseOptions;\n }\n\n return Object.assign(baseOptions, bodyOrOptions);\n}\n","import Client from \"@/Client\";\nimport { isTokenExpired } from \"@/tools/jwt\";\n\n// reset previous auto refresh registrations\nexport function resetAutoRefresh(client: Client) {\n (client as any)._resetAutoRefresh?.();\n}\n\nexport function registerAutoRefresh(\n client: Client,\n threshold: number,\n refreshFunc: () => Promise,\n reauthenticateFunc: () => Promise,\n) {\n resetAutoRefresh(client);\n\n const oldBeforeSend = client.beforeSend;\n const oldModel = client.authStore.record;\n\n // unset the auto refresh in case the auth store was cleared\n // OR a new model was authenticated\n const unsubStoreChange = client.authStore.onChange((newToken, model) => {\n if (\n !newToken ||\n model?.id != oldModel?.id ||\n ((model?.collectionId || oldModel?.collectionId) &&\n model?.collectionId != oldModel?.collectionId)\n ) {\n resetAutoRefresh(client);\n }\n });\n\n // initialize a reset function and attach it dynamically to the client\n (client as any)._resetAutoRefresh = function () {\n unsubStoreChange();\n client.beforeSend = oldBeforeSend;\n delete (client as any)._resetAutoRefresh;\n };\n\n client.beforeSend = async (url, sendOptions) => {\n const oldToken = client.authStore.token;\n\n if (sendOptions.query?.autoRefresh) {\n return oldBeforeSend ? oldBeforeSend(url, sendOptions) : { url, sendOptions };\n }\n\n let isValid = client.authStore.isValid;\n if (\n // is loosely valid\n isValid &&\n // but it is going to expire in the next \"threshold\" seconds\n isTokenExpired(client.authStore.token, threshold)\n ) {\n try {\n await refreshFunc();\n } catch (_) {\n isValid = false;\n }\n }\n\n // still invalid -> reauthenticate\n if (!isValid) {\n await reauthenticateFunc();\n }\n\n // the request wasn't sent with a custom token\n const headers = sendOptions.headers || {};\n for (let key in headers) {\n if (\n key.toLowerCase() == \"authorization\" &&\n // the request wasn't sent with a custom token\n oldToken == headers[key] &&\n client.authStore.token\n ) {\n // set the latest store token\n headers[key] = client.authStore.token;\n break;\n }\n }\n sendOptions.headers = headers;\n\n return oldBeforeSend ? oldBeforeSend(url, sendOptions) : { url, sendOptions };\n };\n}\n","import Client from \"@/Client\";\nimport { ClientResponseError } from \"@/ClientResponseError\";\nimport { RealtimeService, UnsubscribeFunc } from \"@/services/RealtimeService\";\nimport { BaseAuthStore } from \"@/stores/BaseAuthStore\";\nimport { CrudService } from \"@/services/CrudService\";\nimport { ListResult, RecordModel } from \"@/tools/dtos\";\nimport { normalizeLegacyOptionsArgs } from \"@/tools/legacy\";\nimport {\n CommonOptions,\n RecordFullListOptions,\n RecordListOptions,\n RecordOptions,\n SendOptions,\n RecordSubscribeOptions,\n} from \"@/tools/options\";\nimport { getTokenPayload } from \"@/tools/jwt\";\nimport { registerAutoRefresh, resetAutoRefresh } from \"@/tools/refresh\";\n\nexport interface RecordAuthResponse {\n /**\n * The signed PocketBase auth record.\n */\n record: T;\n\n /**\n * The PocketBase record auth token.\n *\n * If you are looking for the OAuth2 access and refresh tokens\n * they are available under the `meta.accessToken` and `meta.refreshToken` props.\n */\n token: string;\n\n /**\n * Auth meta data usually filled when OAuth2 is used.\n */\n meta?: { [key: string]: any };\n}\n\nexport interface AuthProviderInfo {\n name: string;\n displayName: string;\n state: string;\n authURL: string;\n codeVerifier: string;\n codeChallenge: string;\n codeChallengeMethod: string;\n}\n\nexport interface AuthMethodsList {\n mfa: {\n enabled: boolean;\n duration: number;\n };\n otp: {\n enabled: boolean;\n duration: number;\n };\n password: {\n enabled: boolean;\n identityFields: Array;\n };\n oauth2: {\n enabled: boolean;\n providers: Array;\n };\n}\n\nexport interface RecordSubscription {\n action: string; // eg. create, update, delete\n record: T;\n}\n\nexport type OAuth2UrlCallback = (url: string) => void | Promise;\n\nexport interface OAuth2AuthConfig extends SendOptions {\n // the name of the OAuth2 provider (eg. \"google\")\n provider: string;\n\n // custom scopes to overwrite the default ones\n scopes?: Array;\n\n // optional record create data\n createData?: { [key: string]: any };\n\n // optional callback that is triggered after the OAuth2 sign-in/sign-up url generation\n urlCallback?: OAuth2UrlCallback;\n\n // optional query params to send with the PocketBase auth request (eg. fields, expand, etc.)\n query?: RecordOptions;\n}\n\nexport interface OTPResponse {\n otpId: string;\n}\n\nexport class RecordService extends CrudService {\n readonly collectionIdOrName: string;\n\n constructor(client: Client, collectionIdOrName: string) {\n super(client);\n\n this.collectionIdOrName = collectionIdOrName;\n }\n\n /**\n * @inheritdoc\n */\n get baseCrudPath(): string {\n return this.baseCollectionPath + \"/records\";\n }\n\n /**\n * Returns the current collection service base path.\n */\n get baseCollectionPath(): string {\n return \"/api/collections/\" + encodeURIComponent(this.collectionIdOrName);\n }\n\n /**\n * Returns whether the current service collection is superusers.\n */\n get isSuperusers(): boolean {\n return (\n this.collectionIdOrName == \"_superusers\" ||\n this.collectionIdOrName == \"_pbc_2773867675\"\n );\n }\n\n // ---------------------------------------------------------------\n // Realtime handlers\n // ---------------------------------------------------------------\n\n /**\n * Subscribe to realtime changes to the specified topic (\"*\" or record id).\n *\n * If `topic` is the wildcard \"*\", then this method will subscribe to\n * any record changes in the collection.\n *\n * If `topic` is a record id, then this method will subscribe only\n * to changes of the specified record id.\n *\n * It's OK to subscribe multiple times to the same topic.\n * You can use the returned `UnsubscribeFunc` to remove only a single subscription.\n * Or use `unsubscribe(topic)` if you want to remove all subscriptions attached to the topic.\n */\n async subscribe(\n topic: string,\n callback: (data: RecordSubscription) => void,\n options?: RecordSubscribeOptions,\n ): Promise {\n if (!topic) {\n throw new Error(\"Missing topic.\");\n }\n\n if (!callback) {\n throw new Error(\"Missing subscription callback.\");\n }\n\n return this.client.realtime.subscribe(\n this.collectionIdOrName + \"/\" + topic,\n callback,\n options,\n );\n }\n\n /**\n * Unsubscribe from all subscriptions of the specified topic\n * (\"*\" or record id).\n *\n * If `topic` is not set, then this method will unsubscribe from\n * all subscriptions associated to the current collection.\n */\n async unsubscribe(topic?: string): Promise {\n // unsubscribe from the specified topic\n if (topic) {\n return this.client.realtime.unsubscribe(\n this.collectionIdOrName + \"/\" + topic,\n );\n }\n\n // unsubscribe from everything related to the collection\n return this.client.realtime.unsubscribeByPrefix(this.collectionIdOrName);\n }\n\n // ---------------------------------------------------------------\n // Crud handers\n // ---------------------------------------------------------------\n /**\n * @inheritdoc\n */\n async getFullList(options?: RecordFullListOptions): Promise>;\n\n /**\n * @inheritdoc\n */\n async getFullList(\n batch?: number,\n options?: RecordListOptions,\n ): Promise>;\n\n /**\n * @inheritdoc\n */\n async getFullList(\n batchOrOptions?: number | RecordFullListOptions,\n options?: RecordListOptions,\n ): Promise> {\n if (typeof batchOrOptions == \"number\") {\n return super.getFullList(batchOrOptions, options);\n }\n\n const params = Object.assign({}, batchOrOptions, options);\n\n return super.getFullList(params);\n }\n\n /**\n * @inheritdoc\n */\n async getList(\n page = 1,\n perPage = 30,\n options?: RecordListOptions,\n ): Promise> {\n return super.getList(page, perPage, options);\n }\n\n /**\n * @inheritdoc\n */\n async getFirstListItem(\n filter: string,\n options?: RecordListOptions,\n ): Promise {\n return super.getFirstListItem(filter, options);\n }\n\n /**\n * @inheritdoc\n */\n async getOne(id: string, options?: RecordOptions): Promise {\n return super.getOne(id, options);\n }\n\n /**\n * @inheritdoc\n */\n async create(\n bodyParams?: { [key: string]: any } | FormData,\n options?: RecordOptions,\n ): Promise {\n return super.create(bodyParams, options);\n }\n\n /**\n * @inheritdoc\n *\n * If the current `client.authStore.record` matches with the updated id, then\n * on success the `client.authStore.record` will be updated with the new response record fields.\n */\n async update(\n id: string,\n bodyParams?: { [key: string]: any } | FormData,\n options?: RecordOptions,\n ): Promise {\n return super.update(id, bodyParams, options).then((item) => {\n if (\n // is record auth\n this.client.authStore.record?.id === item?.id &&\n (this.client.authStore.record?.collectionId === this.collectionIdOrName ||\n this.client.authStore.record?.collectionName ===\n this.collectionIdOrName)\n ) {\n let authExpand = Object.assign({}, this.client.authStore.record.expand);\n let authRecord = Object.assign({}, this.client.authStore.record, item);\n if (authExpand) {\n // for now \"merge\" only top-level expand\n authRecord.expand = Object.assign(authExpand, item.expand);\n }\n\n this.client.authStore.save(this.client.authStore.token, authRecord);\n }\n\n return item as any as T;\n });\n }\n\n /**\n * @inheritdoc\n *\n * If the current `client.authStore.record` matches with the deleted id,\n * then on success the `client.authStore` will be cleared.\n */\n async delete(id: string, options?: CommonOptions): Promise {\n return super.delete(id, options).then((success) => {\n if (\n success &&\n // is record auth\n this.client.authStore.record?.id === id &&\n (this.client.authStore.record?.collectionId === this.collectionIdOrName ||\n this.client.authStore.record?.collectionName ===\n this.collectionIdOrName)\n ) {\n this.client.authStore.clear();\n }\n\n return success;\n });\n }\n\n // ---------------------------------------------------------------\n // Auth handlers\n // ---------------------------------------------------------------\n\n /**\n * Prepare successful collection authorization response.\n */\n protected authResponse(responseData: any): RecordAuthResponse {\n const record = this.decode(responseData?.record || {});\n\n this.client.authStore.save(responseData?.token, record as any);\n\n return Object.assign({}, responseData, {\n // normalize common fields\n token: responseData?.token || \"\",\n record: record as any as T,\n });\n }\n\n /**\n * Returns all available collection auth methods.\n *\n * @throws {ClientResponseError}\n */\n async listAuthMethods(options?: CommonOptions): Promise {\n options = Object.assign(\n {\n method: \"GET\",\n // @todo remove after deleting the pre v0.23 API response fields\n fields: \"mfa,otp,password,oauth2\",\n },\n options,\n );\n\n return this.client.send(this.baseCollectionPath + \"/auth-methods\", options);\n }\n\n /**\n * Authenticate a single auth collection record via its username/email and password.\n *\n * On success, this method also automatically updates\n * the client's AuthStore data and returns:\n * - the authentication token\n * - the authenticated record model\n *\n * @throws {ClientResponseError}\n */\n async authWithPassword(\n usernameOrEmail: string,\n password: string,\n options?: RecordOptions,\n ): Promise> {\n options = Object.assign(\n {\n method: \"POST\",\n body: {\n identity: usernameOrEmail,\n password: password,\n },\n },\n options,\n );\n\n // note: consider to deprecate\n let autoRefreshThreshold;\n if (this.isSuperusers) {\n autoRefreshThreshold = options.autoRefreshThreshold;\n delete options.autoRefreshThreshold;\n if (!options.autoRefresh) {\n resetAutoRefresh(this.client);\n }\n }\n\n let authData = await this.client.send(\n this.baseCollectionPath + \"/auth-with-password\",\n options,\n );\n\n authData = this.authResponse(authData);\n\n if (autoRefreshThreshold && this.isSuperusers) {\n registerAutoRefresh(\n this.client,\n autoRefreshThreshold,\n () => this.authRefresh({ autoRefresh: true }),\n () =>\n this.authWithPassword(\n usernameOrEmail,\n password,\n Object.assign({ autoRefresh: true }, options),\n ),\n );\n }\n\n return authData;\n }\n\n /**\n * Authenticate a single auth collection record with OAuth2 code.\n *\n * If you don't have an OAuth2 code you may also want to check `authWithOAuth2` method.\n *\n * On success, this method also automatically updates\n * the client's AuthStore data and returns:\n * - the authentication token\n * - the authenticated record model\n * - the OAuth2 account data (eg. name, email, avatar, etc.)\n *\n * @throws {ClientResponseError}\n */\n async authWithOAuth2Code(\n provider: string,\n code: string,\n codeVerifier: string,\n redirectURL: string,\n createData?: { [key: string]: any },\n options?: RecordOptions,\n ): Promise>;\n\n /**\n * @deprecated\n * Consider using authWithOAuth2Code(provider, code, codeVerifier, redirectURL, createdData, options?).\n */\n async authWithOAuth2Code(\n provider: string,\n code: string,\n codeVerifier: string,\n redirectURL: string,\n createData?: { [key: string]: any },\n body?: any,\n query?: any,\n ): Promise>;\n\n async authWithOAuth2Code(\n provider: string,\n code: string,\n codeVerifier: string,\n redirectURL: string,\n createData?: { [key: string]: any },\n bodyOrOptions?: any,\n query?: any,\n ): Promise> {\n let options: any = {\n method: \"POST\",\n body: {\n provider: provider,\n code: code,\n codeVerifier: codeVerifier,\n redirectURL: redirectURL,\n createData: createData,\n },\n };\n\n options = normalizeLegacyOptionsArgs(\n \"This form of authWithOAuth2Code(provider, code, codeVerifier, redirectURL, createData?, body?, query?) is deprecated. Consider replacing it with authWithOAuth2Code(provider, code, codeVerifier, redirectURL, createData?, options?).\",\n options,\n bodyOrOptions,\n query,\n );\n\n return this.client\n .send(this.baseCollectionPath + \"/auth-with-oauth2\", options)\n .then((data) => this.authResponse(data));\n }\n\n /**\n * @deprecated This form of authWithOAuth2 is deprecated.\n *\n * Please use `authWithOAuth2Code()` OR its simplified realtime version\n * as shown in https://pocketbase.io/docs/authentication/#oauth2-integration.\n */\n async authWithOAuth2(\n provider: string,\n code: string,\n codeVerifier: string,\n redirectURL: string,\n createData?: { [key: string]: any },\n bodyParams?: { [key: string]: any },\n queryParams?: RecordOptions,\n ): Promise>;\n\n /**\n * Authenticate a single auth collection record with OAuth2\n * **without custom redirects, deeplinks or even page reload**.\n *\n * This method initializes a one-off realtime subscription and will\n * open a popup window with the OAuth2 vendor page to authenticate.\n * Once the external OAuth2 sign-in/sign-up flow is completed, the popup\n * window will be automatically closed and the OAuth2 data sent back\n * to the user through the previously established realtime connection.\n *\n * You can specify an optional `urlCallback` prop to customize\n * the default url `window.open` behavior.\n *\n * On success, this method also automatically updates\n * the client's AuthStore data and returns:\n * - the authentication token\n * - the authenticated record model\n * - the OAuth2 account data (eg. name, email, avatar, etc.)\n *\n * Example:\n *\n * ```js\n * const authData = await pb.collection(\"users\").authWithOAuth2({\n * provider: \"google\",\n * })\n * ```\n *\n * Note1: When creating the OAuth2 app in the provider dashboard\n * you have to configure `https://yourdomain.com/api/oauth2-redirect`\n * as redirect URL.\n *\n * Note2: Safari may block the default `urlCallback` popup because\n * it doesn't allow `window.open` calls as part of an `async` click functions.\n * To workaround this you can either change your click handler to not be marked as `async`\n * OR manually call `window.open` before your `async` function and use the\n * window reference in your own custom `urlCallback` (see https://github.com/pocketbase/pocketbase/discussions/2429#discussioncomment-5943061).\n * For example:\n * ```js\n * \n * ...\n * document.getElementById(\"btn\").addEventListener(\"click\", () => {\n * pb.collection(\"users\").authWithOAuth2({\n * provider: \"gitlab\",\n * }).then((authData) => {\n * console.log(authData)\n * }).catch((err) => {\n * console.log(err, err.originalError);\n * });\n * })\n * ```\n *\n * @throws {ClientResponseError}\n */\n async authWithOAuth2(\n options: OAuth2AuthConfig,\n ): Promise>;\n\n authWithOAuth2(...args: any): Promise> {\n // fallback to legacy format\n if (args.length > 1 || typeof args?.[0] === \"string\") {\n console.warn(\n \"PocketBase: This form of authWithOAuth2() is deprecated and may get removed in the future. Please replace with authWithOAuth2Code() OR use the authWithOAuth2() realtime form as shown in https://pocketbase.io/docs/authentication/#oauth2-integration.\",\n );\n return this.authWithOAuth2Code(\n args?.[0] || \"\",\n args?.[1] || \"\",\n args?.[2] || \"\",\n args?.[3] || \"\",\n args?.[4] || {},\n args?.[5] || {},\n args?.[6] || {},\n );\n }\n\n const config = args?.[0] || {};\n\n // open a new popup window in case config.urlCallback is not set\n //\n // note: it is opened before any async calls due to Safari restrictions\n // (see https://github.com/pocketbase/pocketbase/discussions/2429#discussioncomment-5943061)\n let eagerDefaultPopup: Window | null = null;\n if (!config.urlCallback) {\n eagerDefaultPopup = openBrowserPopup(undefined);\n }\n\n // initialize a one-off realtime service\n const realtime = new RealtimeService(this.client);\n\n function cleanup() {\n eagerDefaultPopup?.close();\n realtime.unsubscribe();\n }\n\n const requestKeyOptions: SendOptions = {};\n const requestKey = config.requestKey;\n if (requestKey) {\n requestKeyOptions.requestKey = requestKey;\n }\n\n return this.listAuthMethods(requestKeyOptions)\n .then((authMethods) => {\n const provider = authMethods.oauth2.providers.find(\n (p) => p.name === config.provider,\n );\n if (!provider) {\n throw new ClientResponseError(\n new Error(`Missing or invalid provider \"${config.provider}\".`),\n );\n }\n\n const redirectURL = this.client.buildURL(\"/api/oauth2-redirect\");\n\n // find the AbortController associated with the current request key (if any)\n const cancelController = requestKey\n ? this.client[\"cancelControllers\"]?.[requestKey]\n : undefined;\n if (cancelController) {\n cancelController.signal.onabort = () => {\n cleanup();\n };\n }\n\n return new Promise(async (resolve, reject) => {\n try {\n await realtime.subscribe(\"@oauth2\", async (e) => {\n const oldState = realtime.clientId;\n\n try {\n if (!e.state || oldState !== e.state) {\n throw new Error(\"State parameters don't match.\");\n }\n\n if (e.error || !e.code) {\n throw new Error(\n \"OAuth2 redirect error or missing code: \" +\n e.error,\n );\n }\n\n // clear the non SendOptions props\n const options = Object.assign({}, config);\n delete options.provider;\n delete options.scopes;\n delete options.createData;\n delete options.urlCallback;\n\n // reset the cancelController listener as it will be triggered by the next api call\n if (cancelController?.signal?.onabort) {\n cancelController.signal.onabort = null;\n }\n\n const authData = await this.authWithOAuth2Code(\n provider.name,\n e.code,\n provider.codeVerifier,\n redirectURL,\n config.createData,\n options,\n );\n\n resolve(authData);\n } catch (err) {\n reject(new ClientResponseError(err));\n }\n\n cleanup();\n });\n\n const replacements: { [key: string]: any } = {\n state: realtime.clientId,\n };\n if (config.scopes?.length) {\n replacements[\"scope\"] = config.scopes.join(\" \");\n }\n\n const url = this._replaceQueryParams(\n provider.authURL + redirectURL,\n replacements,\n );\n\n let urlCallback =\n config.urlCallback ||\n function (url: string) {\n if (eagerDefaultPopup) {\n eagerDefaultPopup.location.href = url;\n } else {\n // it could have been blocked due to its empty initial url,\n // try again...\n eagerDefaultPopup = openBrowserPopup(url);\n }\n };\n\n await urlCallback(url);\n } catch (err) {\n cleanup();\n reject(new ClientResponseError(err));\n }\n });\n })\n .catch((err) => {\n cleanup();\n throw err; // rethrow\n }) as Promise>;\n }\n\n /**\n * Refreshes the current authenticated record instance and\n * returns a new token and record data.\n *\n * On success this method also automatically updates the client's AuthStore.\n *\n * @throws {ClientResponseError}\n */\n async authRefresh(options?: RecordOptions): Promise>;\n\n /**\n * @deprecated\n * Consider using authRefresh(options?).\n */\n async authRefresh(body?: any, query?: any): Promise>;\n\n async authRefresh(\n bodyOrOptions?: any,\n query?: any,\n ): Promise> {\n let options: any = {\n method: \"POST\",\n };\n\n options = normalizeLegacyOptionsArgs(\n \"This form of authRefresh(body?, query?) is deprecated. Consider replacing it with authRefresh(options?).\",\n options,\n bodyOrOptions,\n query,\n );\n\n return this.client\n .send(this.baseCollectionPath + \"/auth-refresh\", options)\n .then((data) => this.authResponse(data));\n }\n\n /**\n * Sends auth record password reset request.\n *\n * @throws {ClientResponseError}\n */\n async requestPasswordReset(email: string, options?: CommonOptions): Promise;\n\n /**\n * @deprecated\n * Consider using requestPasswordReset(email, options?).\n */\n async requestPasswordReset(email: string, body?: any, query?: any): Promise;\n\n async requestPasswordReset(\n email: string,\n bodyOrOptions?: any,\n query?: any,\n ): Promise {\n let options: any = {\n method: \"POST\",\n body: {\n email: email,\n },\n };\n\n options = normalizeLegacyOptionsArgs(\n \"This form of requestPasswordReset(email, body?, query?) is deprecated. Consider replacing it with requestPasswordReset(email, options?).\",\n options,\n bodyOrOptions,\n query,\n );\n\n return this.client\n .send(this.baseCollectionPath + \"/request-password-reset\", options)\n .then(() => true);\n }\n\n /**\n * Confirms auth record password reset request.\n *\n * @throws {ClientResponseError}\n */\n async confirmPasswordReset(\n passwordResetToken: string,\n password: string,\n passwordConfirm: string,\n options?: CommonOptions,\n ): Promise;\n\n /**\n * @deprecated\n * Consider using confirmPasswordReset(passwordResetToken, password, passwordConfirm, options?).\n */\n async confirmPasswordReset(\n passwordResetToken: string,\n password: string,\n passwordConfirm: string,\n body?: any,\n query?: any,\n ): Promise;\n\n async confirmPasswordReset(\n passwordResetToken: string,\n password: string,\n passwordConfirm: string,\n bodyOrOptions?: any,\n query?: any,\n ): Promise {\n let options: any = {\n method: \"POST\",\n body: {\n token: passwordResetToken,\n password: password,\n passwordConfirm: passwordConfirm,\n },\n };\n\n options = normalizeLegacyOptionsArgs(\n \"This form of confirmPasswordReset(token, password, passwordConfirm, body?, query?) is deprecated. Consider replacing it with confirmPasswordReset(token, password, passwordConfirm, options?).\",\n options,\n bodyOrOptions,\n query,\n );\n\n return this.client\n .send(this.baseCollectionPath + \"/confirm-password-reset\", options)\n .then(() => true);\n }\n\n /**\n * Sends auth record verification email request.\n *\n * @throws {ClientResponseError}\n */\n async requestVerification(email: string, options?: CommonOptions): Promise;\n\n /**\n * @deprecated\n * Consider using requestVerification(email, options?).\n */\n async requestVerification(email: string, body?: any, query?: any): Promise;\n\n async requestVerification(\n email: string,\n bodyOrOptions?: any,\n query?: any,\n ): Promise {\n let options: any = {\n method: \"POST\",\n body: {\n email: email,\n },\n };\n\n options = normalizeLegacyOptionsArgs(\n \"This form of requestVerification(email, body?, query?) is deprecated. Consider replacing it with requestVerification(email, options?).\",\n options,\n bodyOrOptions,\n query,\n );\n\n return this.client\n .send(this.baseCollectionPath + \"/request-verification\", options)\n .then(() => true);\n }\n\n /**\n * Confirms auth record email verification request.\n *\n * If the current `client.authStore.record` matches with the auth record from the token,\n * then on success the `client.authStore.record.verified` will be updated to `true`.\n *\n * @throws {ClientResponseError}\n */\n async confirmVerification(\n verificationToken: string,\n options?: CommonOptions,\n ): Promise;\n\n /**\n * @deprecated\n * Consider using confirmVerification(verificationToken, options?).\n */\n async confirmVerification(\n verificationToken: string,\n body?: any,\n query?: any,\n ): Promise;\n\n async confirmVerification(\n verificationToken: string,\n bodyOrOptions?: any,\n query?: any,\n ): Promise {\n let options: any = {\n method: \"POST\",\n body: {\n token: verificationToken,\n },\n };\n\n options = normalizeLegacyOptionsArgs(\n \"This form of confirmVerification(token, body?, query?) is deprecated. Consider replacing it with confirmVerification(token, options?).\",\n options,\n bodyOrOptions,\n query,\n );\n\n return this.client\n .send(this.baseCollectionPath + \"/confirm-verification\", options)\n .then(() => {\n // on success manually update the current auth record verified state\n const payload = getTokenPayload(verificationToken);\n const model = this.client.authStore.record;\n if (\n model &&\n !model.verified &&\n model.id === payload.id &&\n model.collectionId === payload.collectionId\n ) {\n model.verified = true;\n this.client.authStore.save(this.client.authStore.token, model);\n }\n\n return true;\n });\n }\n\n /**\n * Sends an email change request to the authenticated record model.\n *\n * @throws {ClientResponseError}\n */\n async requestEmailChange(newEmail: string, options?: CommonOptions): Promise;\n\n /**\n * @deprecated\n * Consider using requestEmailChange(newEmail, options?).\n */\n async requestEmailChange(newEmail: string, body?: any, query?: any): Promise;\n\n async requestEmailChange(\n newEmail: string,\n bodyOrOptions?: any,\n query?: any,\n ): Promise {\n let options: any = {\n method: \"POST\",\n body: {\n newEmail: newEmail,\n },\n };\n\n options = normalizeLegacyOptionsArgs(\n \"This form of requestEmailChange(newEmail, body?, query?) is deprecated. Consider replacing it with requestEmailChange(newEmail, options?).\",\n options,\n bodyOrOptions,\n query,\n );\n\n return this.client\n .send(this.baseCollectionPath + \"/request-email-change\", options)\n .then(() => true);\n }\n\n /**\n * Confirms auth record's new email address.\n *\n * If the current `client.authStore.record` matches with the auth record from the token,\n * then on success the `client.authStore` will be cleared.\n *\n * @throws {ClientResponseError}\n */\n async confirmEmailChange(\n emailChangeToken: string,\n password: string,\n options?: CommonOptions,\n ): Promise;\n\n /**\n * @deprecated\n * Consider using confirmEmailChange(emailChangeToken, password, options?).\n */\n async confirmEmailChange(\n emailChangeToken: string,\n password: string,\n body?: any,\n query?: any,\n ): Promise;\n\n async confirmEmailChange(\n emailChangeToken: string,\n password: string,\n bodyOrOptions?: any,\n query?: any,\n ): Promise {\n let options: any = {\n method: \"POST\",\n body: {\n token: emailChangeToken,\n password: password,\n },\n };\n\n options = normalizeLegacyOptionsArgs(\n \"This form of confirmEmailChange(token, password, body?, query?) is deprecated. Consider replacing it with confirmEmailChange(token, password, options?).\",\n options,\n bodyOrOptions,\n query,\n );\n\n return this.client\n .send(this.baseCollectionPath + \"/confirm-email-change\", options)\n .then(() => {\n const payload = getTokenPayload(emailChangeToken);\n const model = this.client.authStore.record;\n if (\n model &&\n model.id === payload.id &&\n model.collectionId === payload.collectionId\n ) {\n this.client.authStore.clear();\n }\n\n return true;\n });\n }\n\n /**\n * @deprecated use collection(\"_externalAuths\").*\n *\n * Lists all linked external auth providers for the specified auth record.\n *\n * @throws {ClientResponseError}\n */\n async listExternalAuths(\n recordId: string,\n options?: CommonOptions,\n ): Promise> {\n return this.client.collection(\"_externalAuths\").getFullList(\n Object.assign({}, options, {\n filter: this.client.filter(\"recordRef = {:id}\", { id: recordId }),\n }),\n );\n }\n\n /**\n * @deprecated use collection(\"_externalAuths\").*\n *\n * Unlink a single external auth provider from the specified auth record.\n *\n * @throws {ClientResponseError}\n */\n async unlinkExternalAuth(\n recordId: string,\n provider: string,\n options?: CommonOptions,\n ): Promise {\n const ea = await this.client.collection(\"_externalAuths\").getFirstListItem(\n this.client.filter(\"recordRef = {:recordId} && provider = {:provider}\", {\n recordId,\n provider,\n }),\n );\n\n return this.client\n .collection(\"_externalAuths\")\n .delete(ea.id, options)\n .then(() => true);\n }\n\n /**\n * Sends auth record OTP to the provided email.\n *\n * @throws {ClientResponseError}\n */\n async requestOTP(email: string, options?: CommonOptions): Promise {\n options = Object.assign(\n {\n method: \"POST\",\n body: { email: email },\n },\n options,\n );\n\n return this.client.send(this.baseCollectionPath + \"/request-otp\", options);\n }\n\n /**\n * Authenticate a single auth collection record via OTP.\n *\n * On success, this method also automatically updates\n * the client's AuthStore data and returns:\n * - the authentication token\n * - the authenticated record model\n *\n * @throws {ClientResponseError}\n */\n async authWithOTP(\n otpId: string,\n password: string,\n options?: CommonOptions,\n ): Promise> {\n options = Object.assign(\n {\n method: \"POST\",\n body: { otpId, password },\n },\n options,\n );\n\n return this.client\n .send(this.baseCollectionPath + \"/auth-with-otp\", options)\n .then((data) => this.authResponse(data));\n }\n\n /**\n * Impersonate authenticates with the specified recordId and\n * returns a new client with the received auth token in a memory store.\n *\n * If `duration` is 0 the generated auth token will fallback\n * to the default collection auth token duration.\n *\n * This action currently requires superusers privileges.\n *\n * @throws {ClientResponseError}\n */\n async impersonate(\n recordId: string,\n duration: number,\n options?: CommonOptions,\n ): Promise {\n options = Object.assign(\n {\n method: \"POST\",\n body: { duration: duration },\n },\n options,\n );\n options.headers = options.headers || {};\n if (!options.headers.Authorization) {\n options.headers.Authorization = this.client.authStore.token;\n }\n\n // create a new client loaded with the impersonated auth state\n // ---\n const client = new Client(\n this.client.baseURL,\n new BaseAuthStore(),\n this.client.lang,\n );\n\n const authData = await client.send(\n this.baseCollectionPath + \"/impersonate/\" + encodeURIComponent(recordId),\n options,\n );\n\n client.authStore.save(authData?.token, this.decode(authData?.record || {}));\n // ---\n\n return client;\n }\n\n // ---------------------------------------------------------------\n\n // very rudimentary url query params replacement because at the moment\n // URL (and URLSearchParams) doesn't seem to be fully supported in React Native\n //\n // note: for details behind some of the decode/encode parsing check https://unixpapa.com/js/querystring.html\n private _replaceQueryParams(\n url: string,\n replacements: { [key: string]: any } = {},\n ): string {\n let urlPath = url;\n let query = \"\";\n\n const queryIndex = url.indexOf(\"?\");\n if (queryIndex >= 0) {\n urlPath = url.substring(0, url.indexOf(\"?\"));\n query = url.substring(url.indexOf(\"?\") + 1);\n }\n\n const parsedParams: { [key: string]: string } = {};\n\n // parse the query parameters\n const rawParams = query.split(\"&\");\n for (const param of rawParams) {\n if (param == \"\") {\n continue;\n }\n\n const pair = param.split(\"=\");\n parsedParams[decodeURIComponent(pair[0].replace(/\\+/g, \" \"))] =\n decodeURIComponent((pair[1] || \"\").replace(/\\+/g, \" \"));\n }\n\n // apply the replacements\n for (let key in replacements) {\n if (!replacements.hasOwnProperty(key)) {\n continue;\n }\n\n if (replacements[key] == null) {\n delete parsedParams[key];\n } else {\n parsedParams[key] = replacements[key];\n }\n }\n\n // construct back the full query string\n query = \"\";\n for (let key in parsedParams) {\n if (!parsedParams.hasOwnProperty(key)) {\n continue;\n }\n\n if (query != \"\") {\n query += \"&\";\n }\n\n query +=\n encodeURIComponent(key.replace(/%20/g, \"+\")) +\n \"=\" +\n encodeURIComponent(parsedParams[key].replace(/%20/g, \"+\"));\n }\n\n return query != \"\" ? urlPath + \"?\" + query : urlPath;\n }\n}\n\nfunction openBrowserPopup(url?: string): Window | null {\n if (typeof window === \"undefined\" || !window?.open) {\n throw new ClientResponseError(\n new Error(\n `Not in a browser context - please pass a custom urlCallback function.`,\n ),\n );\n }\n\n let width = 1024;\n let height = 768;\n\n let windowWidth = window.innerWidth;\n let windowHeight = window.innerHeight;\n\n // normalize window size\n width = width > windowWidth ? windowWidth : width;\n height = height > windowHeight ? windowHeight : height;\n\n let left = windowWidth / 2 - width / 2;\n let top = windowHeight / 2 - height / 2;\n\n // note: we don't use the noopener and noreferrer attributes since\n // for some reason browser blocks such windows then url is undefined/blank\n return window.open(\n url,\n \"popup_window\",\n \"width=\" +\n width +\n \",height=\" +\n height +\n \",top=\" +\n top +\n \",left=\" +\n left +\n \",resizable,menubar=no\",\n );\n}\n","import { CrudService } from \"@/services/CrudService\";\nimport { CollectionModel } from \"@/tools/dtos\";\nimport { CommonOptions } from \"@/tools/options\";\n\nexport class CollectionService extends CrudService {\n /**\n * @inheritdoc\n */\n get baseCrudPath(): string {\n return \"/api/collections\";\n }\n\n /**\n * Imports the provided collections.\n *\n * If `deleteMissing` is `true`, all local collections and their fields,\n * that are not present in the imported configuration, WILL BE DELETED\n * (including their related records data)!\n *\n * @throws {ClientResponseError}\n */\n async import(\n collections: Array,\n deleteMissing: boolean = false,\n options?: CommonOptions,\n ): Promise {\n options = Object.assign(\n {\n method: \"PUT\",\n body: {\n collections: collections,\n deleteMissing: deleteMissing,\n },\n },\n options,\n );\n\n return this.client.send(this.baseCrudPath + \"/import\", options).then(() => true);\n }\n\n /**\n * Returns type indexed map with scaffolded collection models\n * populated with their default field values.\n *\n * @throws {ClientResponseError}\n */\n async getScaffolds(\n options?: CommonOptions,\n ): Promise<{ [key: string]: CollectionModel }> {\n options = Object.assign(\n {\n method: \"GET\",\n },\n options,\n );\n\n return this.client.send(this.baseCrudPath + \"/meta/scaffolds\", options);\n }\n\n /**\n * Deletes all records associated with the specified collection.\n *\n * @throws {ClientResponseError}\n */\n async truncate(collectionIdOrName: string, options?: CommonOptions): Promise {\n options = Object.assign(\n {\n method: \"DELETE\",\n },\n options,\n );\n\n return this.client\n .send(\n this.baseCrudPath +\n \"/\" +\n encodeURIComponent(collectionIdOrName) +\n \"/truncate\",\n options,\n )\n .then(() => true);\n }\n}\n","import { ClientResponseError } from \"@/ClientResponseError\";\nimport { BaseService } from \"@/services/BaseService\";\nimport { ListResult, LogModel } from \"@/tools/dtos\";\nimport { CommonOptions, ListOptions, LogStatsOptions } from \"@/tools/options\";\n\nexport interface HourlyStats {\n total: number;\n date: string;\n}\n\nexport class LogService extends BaseService {\n /**\n * Returns paginated logs list.\n *\n * @throws {ClientResponseError}\n */\n async getList(\n page = 1,\n perPage = 30,\n options?: ListOptions,\n ): Promise> {\n options = Object.assign({ method: \"GET\" }, options);\n\n options.query = Object.assign(\n {\n page: page,\n perPage: perPage,\n },\n options.query,\n );\n\n return this.client.send(\"/api/logs\", options);\n }\n\n /**\n * Returns a single log by its id.\n *\n * If `id` is empty it will throw a 404 error.\n *\n * @throws {ClientResponseError}\n */\n async getOne(id: string, options?: CommonOptions): Promise {\n if (!id) {\n throw new ClientResponseError({\n url: this.client.buildURL(\"/api/logs/\"),\n status: 404,\n response: {\n code: 404,\n message: \"Missing required log id.\",\n data: {},\n },\n });\n }\n\n options = Object.assign(\n {\n method: \"GET\",\n },\n options,\n );\n\n return this.client.send(\"/api/logs/\" + encodeURIComponent(id), options);\n }\n\n /**\n * Returns logs statistics.\n *\n * @throws {ClientResponseError}\n */\n async getStats(options?: LogStatsOptions): Promise> {\n options = Object.assign(\n {\n method: \"GET\",\n },\n options,\n );\n\n return this.client.send(\"/api/logs/stats\", options);\n }\n}\n","import { BaseService } from \"@/services/BaseService\";\nimport { CommonOptions } from \"@/tools/options\";\n\nexport interface HealthCheckResponse {\n code: number;\n message: string;\n data: { [key: string]: any };\n}\n\nexport class HealthService extends BaseService {\n /**\n * Checks the health status of the api.\n *\n * @throws {ClientResponseError}\n */\n async check(options?: CommonOptions): Promise {\n options = Object.assign(\n {\n method: \"GET\",\n },\n options,\n );\n\n return this.client.send(\"/api/health\", options);\n }\n}\n","import { BaseService } from \"@/services/BaseService\";\nimport { CommonOptions, FileOptions } from \"@/tools/options\";\n\nexport class FileService extends BaseService {\n /**\n * @deprecated Please replace with `pb.files.getURL()`.\n */\n getUrl(\n record: { [key: string]: any },\n filename: string,\n queryParams: FileOptions = {},\n ): string {\n console.warn(\"Please replace pb.files.getUrl() with pb.files.getURL()\");\n return this.getURL(record, filename, queryParams);\n }\n\n /**\n * Builds and returns an absolute record file url for the provided filename.\n */\n getURL(\n record: { [key: string]: any },\n filename: string,\n queryParams: FileOptions = {},\n ): string {\n if (\n !filename ||\n !record?.id ||\n !(record?.collectionId || record?.collectionName)\n ) {\n return \"\";\n }\n\n const parts = [];\n parts.push(\"api\");\n parts.push(\"files\");\n parts.push(encodeURIComponent(record.collectionId || record.collectionName));\n parts.push(encodeURIComponent(record.id));\n parts.push(encodeURIComponent(filename));\n\n let result = this.client.buildURL(parts.join(\"/\"));\n\n if (Object.keys(queryParams).length) {\n // normalize the download query param for consistency with the Dart sdk\n if (queryParams.download === false) {\n delete queryParams.download;\n }\n\n const params = new URLSearchParams(queryParams);\n\n result += (result.includes(\"?\") ? \"&\" : \"?\") + params;\n }\n\n return result;\n }\n\n /**\n * Requests a new private file access token for the current auth model.\n *\n * @throws {ClientResponseError}\n */\n async getToken(options?: CommonOptions): Promise {\n options = Object.assign(\n {\n method: \"POST\",\n },\n options,\n );\n\n return this.client\n .send(\"/api/files/token\", options)\n .then((data) => data?.token || \"\");\n }\n}\n","import { BaseService } from \"@/services/BaseService\";\nimport { CommonOptions } from \"@/tools/options\";\n\nexport interface BackupFileInfo {\n key: string;\n size: number;\n modified: string;\n}\n\nexport class BackupService extends BaseService {\n /**\n * Returns list with all available backup files.\n *\n * @throws {ClientResponseError}\n */\n async getFullList(options?: CommonOptions): Promise> {\n options = Object.assign(\n {\n method: \"GET\",\n },\n options,\n );\n\n return this.client.send(\"/api/backups\", options);\n }\n\n /**\n * Initializes a new backup.\n *\n * @throws {ClientResponseError}\n */\n async create(basename: string, options?: CommonOptions): Promise {\n options = Object.assign(\n {\n method: \"POST\",\n body: {\n name: basename,\n },\n },\n options,\n );\n\n return this.client.send(\"/api/backups\", options).then(() => true);\n }\n\n /**\n * Uploads an existing backup file.\n *\n * Example:\n *\n * ```js\n * await pb.backups.upload({\n * file: new Blob([...]),\n * });\n * ```\n *\n * @throws {ClientResponseError}\n */\n async upload(\n bodyParams: { [key: string]: any } | FormData,\n options?: CommonOptions,\n ): Promise {\n options = Object.assign(\n {\n method: \"POST\",\n body: bodyParams,\n },\n options,\n );\n\n return this.client.send(\"/api/backups/upload\", options).then(() => true);\n }\n\n /**\n * Deletes a single backup file.\n *\n * @throws {ClientResponseError}\n */\n async delete(key: string, options?: CommonOptions): Promise {\n options = Object.assign(\n {\n method: \"DELETE\",\n },\n options,\n );\n\n return this.client\n .send(`/api/backups/${encodeURIComponent(key)}`, options)\n .then(() => true);\n }\n\n /**\n * Initializes an app data restore from an existing backup.\n *\n * @throws {ClientResponseError}\n */\n async restore(key: string, options?: CommonOptions): Promise {\n options = Object.assign(\n {\n method: \"POST\",\n },\n options,\n );\n\n return this.client\n .send(`/api/backups/${encodeURIComponent(key)}/restore`, options)\n .then(() => true);\n }\n\n /**\n * @deprecated Please use `getDownloadURL()`.\n */\n getDownloadUrl(token: string, key: string): string {\n console.warn(\n \"Please replace pb.backups.getDownloadUrl() with pb.backups.getDownloadURL()\",\n );\n return this.getDownloadURL(token, key);\n }\n\n /**\n * Builds a download url for a single existing backup using a\n * superuser file token and the backup file key.\n *\n * The file token can be generated via `pb.files.getToken()`.\n */\n getDownloadURL(token: string, key: string): string {\n return this.client.buildURL(\n `/api/backups/${encodeURIComponent(key)}?token=${encodeURIComponent(token)}`,\n );\n }\n}\n","import { BaseService } from \"@/services/BaseService\";\nimport { CommonOptions } from \"@/tools/options\";\n\nexport interface CronJob {\n id: string;\n expression: string;\n}\n\nexport class CronService extends BaseService {\n /**\n * Returns list with all registered cron jobs.\n *\n * @throws {ClientResponseError}\n */\n async getFullList(options?: CommonOptions): Promise> {\n options = Object.assign(\n {\n method: \"GET\",\n },\n options,\n );\n\n return this.client.send(\"/api/crons\", options);\n }\n\n /**\n * Runs the specified cron job.\n *\n * @throws {ClientResponseError}\n */\n async run(jobId: string, options?: CommonOptions): Promise {\n options = Object.assign(\n {\n method: \"POST\",\n },\n options,\n );\n\n return this.client\n .send(`/api/crons/${encodeURIComponent(jobId)}`, options)\n .then(() => true);\n }\n}\n","/**\n * Checks if the specified value is a file (aka. File, Blob, RN file object).\n */\nexport function isFile(val: any): boolean {\n return (\n (typeof Blob !== \"undefined\" && val instanceof Blob) ||\n (typeof File !== \"undefined\" && val instanceof File) ||\n // check for React Native file object format\n // (see https://github.com/pocketbase/pocketbase/discussions/2002#discussioncomment-5254168)\n (val !== null &&\n typeof val === \"object\" &&\n val.uri &&\n ((typeof navigator !== \"undefined\" && navigator.product === \"ReactNative\") ||\n (typeof global !== \"undefined\" && (global as any).HermesInternal)))\n );\n}\n\n/**\n * Loosely checks if the specified body is a FormData instance.\n */\nexport function isFormData(body: any): boolean {\n return (\n body &&\n // we are checking the constructor name because FormData\n // is not available natively in some environments and the\n // polyfill(s) may not be globally accessible\n (body.constructor?.name === \"FormData\" ||\n // fallback to global FormData instance check\n // note: this is needed because the constructor.name could be different in case of\n // custom global FormData implementation, eg. React Native on Android/iOS\n (typeof FormData !== \"undefined\" && body instanceof FormData))\n );\n}\n\n/**\n * Checks if the submitted body object has at least one Blob/File field value.\n */\nexport function hasFileField(body: { [key: string]: any }): boolean {\n for (const key in body) {\n const values = Array.isArray(body[key]) ? body[key] : [body[key]];\n for (const v of values) {\n if (isFile(v)) {\n return true;\n }\n }\n }\n\n return false;\n}\n\n/**\n * Converts analyzes the provided body and converts it to FormData\n * in case a plain object with File/Blob values is used.\n */\nexport function convertToFormDataIfNeeded(body: any): any {\n if (\n typeof FormData === \"undefined\" ||\n typeof body === \"undefined\" ||\n typeof body !== \"object\" ||\n body === null ||\n isFormData(body) ||\n !hasFileField(body)\n ) {\n return body;\n }\n\n const form = new FormData();\n\n for (const key in body) {\n const val = body[key];\n\n // skip undefined values for consistency with JSON.stringify\n // (see https://github.com/pocketbase/pocketbase/issues/6731#issuecomment-2812382827)\n if (typeof val === \"undefined\") {\n continue;\n }\n\n if (typeof val === \"object\" && !hasFileField({ data: val })) {\n // send json-like values as jsonPayload to avoid the implicit string value normalization\n let payload: { [key: string]: any } = {};\n payload[key] = val;\n form.append(\"@jsonPayload\", JSON.stringify(payload));\n } else {\n // in case of mixed string and file/blob\n const normalizedVal = Array.isArray(val) ? val : [val];\n for (let v of normalizedVal) {\n form.append(key, v);\n }\n }\n }\n\n return form;\n}\n\n/**\n * Converts the provided FormData instance into a plain object.\n *\n * For consistency with the server multipart/form-data inferring,\n * the following normalization rules are applied for plain multipart string values:\n * - \"true\" is converted to the json \"true\"\n * - \"false\" is converted to the json \"false\"\n * - numeric strings are converted to json number ONLY if the resulted\n * minimal number string representation is the same as the provided raw string\n * (aka. scientific notations, \"Infinity\", \"0.0\", \"0001\", etc. are kept as string)\n * - any other string (empty string too) is left as it is\n */\nexport function convertFormDataToObject(formData: FormData): { [key: string]: any } {\n let result: { [key: string]: any } = {};\n\n formData.forEach((v, k) => {\n if (k === \"@jsonPayload\" && typeof v == \"string\") {\n try {\n let parsed = JSON.parse(v);\n Object.assign(result, parsed);\n } catch (err) {\n console.warn(\"@jsonPayload error:\", err);\n }\n } else {\n if (typeof result[k] !== \"undefined\") {\n if (!Array.isArray(result[k])) {\n result[k] = [result[k]];\n }\n result[k].push(inferFormDataValue(v));\n } else {\n result[k] = inferFormDataValue(v);\n }\n }\n });\n\n return result;\n}\n\nconst inferNumberCharsRegex = /^[\\-\\.\\d]+$/;\n\nfunction inferFormDataValue(value: any): any {\n if (typeof value != \"string\") {\n return value;\n }\n\n if (value == \"true\") {\n return true;\n }\n\n if (value == \"false\") {\n return false;\n }\n\n // note: expects the provided raw string to match exactly with the minimal string representation of the parsed number\n if (\n (value[0] === \"-\" || (value[0] >= \"0\" && value[0] <= \"9\")) &&\n inferNumberCharsRegex.test(value)\n ) {\n let num = +value;\n if (\"\" + num === value) {\n return num;\n }\n }\n\n return value;\n}\n","import { BaseService } from \"@/services/BaseService\";\nimport { isFile, isFormData, convertFormDataToObject } from \"@/tools/formdata\";\nimport {\n SendOptions,\n RecordOptions,\n normalizeUnknownQueryParams,\n serializeQueryParams,\n} from \"@/tools/options\";\n\nexport interface BatchRequest {\n method: string;\n url: string;\n json?: { [key: string]: any };\n files?: { [key: string]: Array };\n headers?: { [key: string]: string };\n}\n\nexport interface BatchRequestResult {\n status: number;\n body: any;\n}\n\nexport class BatchService extends BaseService {\n private requests: Array = [];\n private subs: { [key: string]: SubBatchService } = {};\n\n /**\n * Starts constructing a batch request entry for the specified collection.\n */\n collection(collectionIdOrName: string): SubBatchService {\n if (!this.subs[collectionIdOrName]) {\n this.subs[collectionIdOrName] = new SubBatchService(\n this.requests,\n collectionIdOrName,\n );\n }\n\n return this.subs[collectionIdOrName];\n }\n\n /**\n * Sends the batch requests.\n *\n * @throws {ClientResponseError}\n */\n async send(options?: SendOptions): Promise> {\n const formData = new FormData();\n\n const jsonData = [];\n\n for (let i = 0; i < this.requests.length; i++) {\n const req = this.requests[i];\n\n jsonData.push({\n method: req.method,\n url: req.url,\n headers: req.headers,\n body: req.json,\n });\n\n if (req.files) {\n for (let key in req.files) {\n const files = req.files[key] || [];\n for (let file of files) {\n formData.append(\"requests.\" + i + \".\" + key, file);\n }\n }\n }\n }\n\n formData.append(\"@jsonPayload\", JSON.stringify({ requests: jsonData }));\n\n options = Object.assign(\n {\n method: \"POST\",\n body: formData,\n },\n options,\n );\n\n return this.client.send(\"/api/batch\", options);\n }\n}\n\nexport class SubBatchService {\n private requests: Array = [];\n private readonly collectionIdOrName: string;\n\n constructor(requests: Array, collectionIdOrName: string) {\n this.requests = requests;\n this.collectionIdOrName = collectionIdOrName;\n }\n\n /**\n * Registers a record upsert request into the current batch queue.\n *\n * The request will be executed as update if `bodyParams` have a valid existing record `id` value, otherwise - create.\n */\n upsert(\n bodyParams?: { [key: string]: any } | FormData,\n options?: RecordOptions,\n ): void {\n options = Object.assign(\n {\n body: bodyParams || {},\n },\n options,\n );\n\n const request: BatchRequest = {\n method: \"PUT\",\n url:\n \"/api/collections/\" +\n encodeURIComponent(this.collectionIdOrName) +\n \"/records\",\n };\n\n this.prepareRequest(request, options);\n\n this.requests.push(request);\n }\n\n /**\n * Registers a record create request into the current batch queue.\n */\n create(\n bodyParams?: { [key: string]: any } | FormData,\n options?: RecordOptions,\n ): void {\n options = Object.assign(\n {\n body: bodyParams || {},\n },\n options,\n );\n\n const request: BatchRequest = {\n method: \"POST\",\n url:\n \"/api/collections/\" +\n encodeURIComponent(this.collectionIdOrName) +\n \"/records\",\n };\n\n this.prepareRequest(request, options);\n\n this.requests.push(request);\n }\n\n /**\n * Registers a record update request into the current batch queue.\n */\n update(\n id: string,\n bodyParams?: { [key: string]: any } | FormData,\n options?: RecordOptions,\n ): void {\n options = Object.assign(\n {\n body: bodyParams || {},\n },\n options,\n );\n\n const request: BatchRequest = {\n method: \"PATCH\",\n url:\n \"/api/collections/\" +\n encodeURIComponent(this.collectionIdOrName) +\n \"/records/\" +\n encodeURIComponent(id),\n };\n\n this.prepareRequest(request, options);\n\n this.requests.push(request);\n }\n\n /**\n * Registers a record delete request into the current batch queue.\n */\n delete(id: string, options?: SendOptions): void {\n options = Object.assign({}, options);\n\n const request: BatchRequest = {\n method: \"DELETE\",\n url:\n \"/api/collections/\" +\n encodeURIComponent(this.collectionIdOrName) +\n \"/records/\" +\n encodeURIComponent(id),\n };\n\n this.prepareRequest(request, options);\n\n this.requests.push(request);\n }\n\n private prepareRequest(request: BatchRequest, options: SendOptions) {\n normalizeUnknownQueryParams(options);\n\n request.headers = options.headers;\n request.json = {};\n request.files = {};\n\n // serialize query parameters\n // -----------------------------------------------------------\n if (typeof options.query !== \"undefined\") {\n const query = serializeQueryParams(options.query);\n if (query) {\n request.url += (request.url.includes(\"?\") ? \"&\" : \"?\") + query;\n }\n }\n\n // extract json and files body data\n // -----------------------------------------------------------\n let body = options.body;\n if (isFormData(body)) {\n body = convertFormDataToObject(body);\n }\n\n for (const key in body) {\n const val = body[key];\n\n if (isFile(val)) {\n request.files[key] = request.files[key] || [];\n request.files[key].push(val);\n } else if (Array.isArray(val)) {\n const foundFiles = [];\n const foundRegular = [];\n for (const v of val) {\n if (isFile(v)) {\n foundFiles.push(v);\n } else {\n foundRegular.push(v);\n }\n }\n\n if (foundFiles.length > 0 && foundFiles.length == val.length) {\n // only files\n // ---\n request.files[key] = request.files[key] || [];\n for (let file of foundFiles) {\n request.files[key].push(file);\n }\n } else {\n // empty or mixed array (both regular and File/Blob values)\n // ---\n request.json[key] = foundRegular;\n\n if (foundFiles.length > 0) {\n // add \"+\" to append if not already since otherwise\n // the existing regular files will be deleted\n // (the mixed values order is preserved only within their corresponding groups)\n let fileKey = key;\n if (!key.startsWith(\"+\") && !key.endsWith(\"+\")) {\n fileKey += \"+\";\n }\n\n request.files[fileKey] = request.files[fileKey] || [];\n for (let file of foundFiles) {\n request.files[fileKey].push(file);\n }\n }\n }\n } else {\n request.json[key] = val;\n }\n }\n }\n}\n","import { ClientResponseError } from \"@/ClientResponseError\";\nimport { BaseAuthStore } from \"@/stores/BaseAuthStore\";\nimport { LocalAuthStore } from \"@/stores/LocalAuthStore\";\nimport { SettingsService } from \"@/services/SettingsService\";\nimport { RecordService } from \"@/services/RecordService\";\nimport { CollectionService } from \"@/services/CollectionService\";\nimport { LogService } from \"@/services/LogService\";\nimport { RealtimeService } from \"@/services/RealtimeService\";\nimport { HealthService } from \"@/services/HealthService\";\nimport { FileService } from \"@/services/FileService\";\nimport { BackupService } from \"@/services/BackupService\";\nimport { CronService } from \"@/services/CronService\";\nimport { BatchService } from \"@/services/BatchService\";\nimport { RecordModel } from \"@/tools/dtos\";\nimport {\n SendOptions,\n FileOptions,\n normalizeUnknownQueryParams,\n serializeQueryParams,\n} from \"@/tools/options\";\nimport { isFormData, convertToFormDataIfNeeded } from \"@/tools/formdata\";\n\nexport interface BeforeSendResult {\n [key: string]: any; // for backward compatibility\n url?: string;\n options?: { [key: string]: any };\n}\n\n/**\n * PocketBase JS Client.\n */\nexport default class Client {\n /**\n * The base PocketBase backend url address (eg. 'http://127.0.0.1.8090').\n */\n baseURL: string;\n\n /**\n * Legacy getter alias for baseURL.\n * @deprecated Please replace with baseURL.\n */\n get baseUrl(): string {\n return this.baseURL;\n }\n\n /**\n * Legacy setter alias for baseURL.\n * @deprecated Please replace with baseURL.\n */\n set baseUrl(v: string) {\n this.baseURL = v;\n }\n\n /**\n * Hook that get triggered right before sending the fetch request,\n * allowing you to inspect and modify the url and request options.\n *\n * For list of the possible options check https://developer.mozilla.org/en-US/docs/Web/API/fetch#options\n *\n * You can return a non-empty result object `{ url, options }` to replace the url and request options entirely.\n *\n * Example:\n * ```js\n * const pb = new PocketBase(\"https://example.com\")\n *\n * pb.beforeSend = function (url, options) {\n * options.headers = Object.assign({}, options.headers, {\n * 'X-Custom-Header': 'example',\n * })\n *\n * return { url, options }\n * }\n *\n * // use the created client as usual...\n * ```\n */\n beforeSend?: (\n url: string,\n options: SendOptions,\n ) => BeforeSendResult | Promise;\n\n /**\n * Hook that get triggered after successfully sending the fetch request,\n * allowing you to inspect/modify the response object and its parsed data.\n *\n * Returns the new Promise resolved `data` that will be returned to the client.\n *\n * Example:\n * ```js\n * const pb = new PocketBase(\"https://example.com\")\n *\n * pb.afterSend = function (response, data, options) {\n * if (response.status != 200) {\n * throw new ClientResponseError({\n * url: response.url,\n * status: response.status,\n * response: { ... },\n * })\n * }\n *\n * return data;\n * }\n *\n * // use the created client as usual...\n * ```\n */\n afterSend?: ((response: Response, data: any) => any) &\n ((response: Response, data: any, options: SendOptions) => any);\n\n /**\n * Optional language code (default to `en-US`) that will be sent\n * with the requests to the server as `Accept-Language` header.\n */\n lang: string;\n\n /**\n * A replaceable instance of the local auth store service.\n */\n authStore: BaseAuthStore;\n\n /**\n * An instance of the service that handles the **Settings APIs**.\n */\n readonly settings: SettingsService;\n\n /**\n * An instance of the service that handles the **Collection APIs**.\n */\n readonly collections: CollectionService;\n\n /**\n * An instance of the service that handles the **File APIs**.\n */\n readonly files: FileService;\n\n /**\n * An instance of the service that handles the **Log APIs**.\n */\n readonly logs: LogService;\n\n /**\n * An instance of the service that handles the **Realtime APIs**.\n */\n readonly realtime: RealtimeService;\n\n /**\n * An instance of the service that handles the **Health APIs**.\n */\n readonly health: HealthService;\n\n /**\n * An instance of the service that handles the **Backup APIs**.\n */\n readonly backups: BackupService;\n\n /**\n * An instance of the service that handles the **Cron APIs**.\n */\n readonly crons: CronService;\n\n private cancelControllers: { [key: string]: AbortController } = {};\n private recordServices: { [key: string]: RecordService } = {};\n private enableAutoCancellation: boolean = true;\n\n constructor(baseURL = \"/\", authStore?: BaseAuthStore | null, lang = \"en-US\") {\n this.baseURL = baseURL;\n this.lang = lang;\n\n if (authStore) {\n this.authStore = authStore;\n } else if (typeof window != \"undefined\" && !!(window as any).Deno) {\n // note: to avoid common security issues we fallback to runtime/memory store in case the code is running in Deno env\n this.authStore = new BaseAuthStore();\n } else {\n this.authStore = new LocalAuthStore();\n }\n\n // common services\n this.collections = new CollectionService(this);\n this.files = new FileService(this);\n this.logs = new LogService(this);\n this.settings = new SettingsService(this);\n this.realtime = new RealtimeService(this);\n this.health = new HealthService(this);\n this.backups = new BackupService(this);\n this.crons = new CronService(this);\n }\n\n /**\n * @deprecated\n * With PocketBase v0.23.0 admins are converted to a regular auth\n * collection named \"_superusers\", aka. you can use directly collection(\"_superusers\").\n */\n get admins(): RecordService {\n return this.collection(\"_superusers\");\n }\n\n /**\n * Creates a new batch handler for sending multiple transactional\n * create/update/upsert/delete collection requests in one network call.\n *\n * Example:\n * ```js\n * const batch = pb.createBatch();\n *\n * batch.collection(\"example1\").create({ ... })\n * batch.collection(\"example2\").update(\"RECORD_ID\", { ... })\n * batch.collection(\"example3\").delete(\"RECORD_ID\")\n * batch.collection(\"example4\").upsert({ ... })\n *\n * await batch.send()\n * ```\n */\n createBatch(): BatchService {\n return new BatchService(this);\n }\n\n /**\n * Returns the RecordService associated to the specified collection.\n */\n collection(idOrName: string): RecordService {\n if (!this.recordServices[idOrName]) {\n this.recordServices[idOrName] = new RecordService(this, idOrName);\n }\n\n return this.recordServices[idOrName];\n }\n\n /**\n * Globally enable or disable auto cancellation for pending duplicated requests.\n */\n autoCancellation(enable: boolean): Client {\n this.enableAutoCancellation = !!enable;\n\n return this;\n }\n\n /**\n * Cancels single request by its cancellation key.\n */\n cancelRequest(requestKey: string): Client {\n if (this.cancelControllers[requestKey]) {\n this.cancelControllers[requestKey].abort();\n delete this.cancelControllers[requestKey];\n }\n\n return this;\n }\n\n /**\n * Cancels all pending requests.\n */\n cancelAllRequests(): Client {\n for (let k in this.cancelControllers) {\n this.cancelControllers[k].abort();\n }\n\n this.cancelControllers = {};\n\n return this;\n }\n\n /**\n * Constructs a filter expression with placeholders populated from a parameters object.\n *\n * Placeholder parameters are defined with the `{:paramName}` notation.\n *\n * The following parameter values are supported:\n *\n * - `string` (_single quotes are autoescaped_)\n * - `number`\n * - `boolean`\n * - `Date` object (_stringified into the PocketBase datetime format_)\n * - `null`\n * - everything else is converted to a string using `JSON.stringify()`\n *\n * Example:\n *\n * ```js\n * pb.collection(\"example\").getFirstListItem(pb.filter(\n * 'title ~ {:title} && created >= {:created}',\n * { title: \"example\", created: new Date()}\n * ))\n * ```\n */\n filter(raw: string, params?: { [key: string]: any }): string {\n if (!params) {\n return raw;\n }\n\n for (let key in params) {\n let val = params[key];\n switch (typeof val) {\n case \"boolean\":\n case \"number\":\n val = \"\" + val;\n break;\n case \"string\":\n val = \"'\" + val.replace(/'/g, \"\\\\'\") + \"'\";\n break;\n default:\n if (val === null) {\n val = \"null\";\n } else if (val instanceof Date) {\n val = \"'\" + val.toISOString().replace(\"T\", \" \") + \"'\";\n } else {\n val = \"'\" + JSON.stringify(val).replace(/'/g, \"\\\\'\") + \"'\";\n }\n }\n raw = raw.replaceAll(\"{:\" + key + \"}\", val);\n }\n\n return raw;\n }\n\n /**\n * @deprecated Please use `pb.files.getURL()`.\n */\n getFileUrl(\n record: { [key: string]: any },\n filename: string,\n queryParams: FileOptions = {},\n ): string {\n console.warn(\"Please replace pb.getFileUrl() with pb.files.getURL()\");\n return this.files.getURL(record, filename, queryParams);\n }\n\n /**\n * @deprecated Please use `pb.buildURL()`.\n */\n buildUrl(path: string): string {\n console.warn(\"Please replace pb.buildUrl() with pb.buildURL()\");\n return this.buildURL(path);\n }\n\n /**\n * Builds a full client url by safely concatenating the provided path.\n */\n buildURL(path: string): string {\n let url = this.baseURL;\n\n // construct an absolute base url if in a browser environment\n if (\n typeof window !== \"undefined\" &&\n !!window.location &&\n !url.startsWith(\"https://\") &&\n !url.startsWith(\"http://\")\n ) {\n url = window.location.origin?.endsWith(\"/\")\n ? window.location.origin.substring(0, window.location.origin.length - 1)\n : window.location.origin || \"\";\n\n if (!this.baseURL.startsWith(\"/\")) {\n url += window.location.pathname || \"/\";\n url += url.endsWith(\"/\") ? \"\" : \"/\";\n }\n\n url += this.baseURL;\n }\n\n // concatenate the path\n if (path) {\n url += url.endsWith(\"/\") ? \"\" : \"/\"; // append trailing slash if missing\n url += path.startsWith(\"/\") ? path.substring(1) : path;\n }\n\n return url;\n }\n\n /**\n * Sends an api http request.\n *\n * @throws {ClientResponseError}\n */\n async send(path: string, options: SendOptions): Promise {\n options = this.initSendOptions(path, options);\n\n // build url + path\n let url = this.buildURL(path);\n\n if (this.beforeSend) {\n const result = Object.assign({}, await this.beforeSend(url, options));\n if (\n typeof result.url !== \"undefined\" ||\n typeof result.options !== \"undefined\"\n ) {\n url = result.url || url;\n options = result.options || options;\n } else if (Object.keys(result).length) {\n // legacy behavior\n options = result as SendOptions;\n console?.warn &&\n console.warn(\n \"Deprecated format of beforeSend return: please use `return { url, options }`, instead of `return options`.\",\n );\n }\n }\n\n // serialize the query parameters\n if (typeof options.query !== \"undefined\") {\n const query = serializeQueryParams(options.query);\n if (query) {\n url += (url.includes(\"?\") ? \"&\" : \"?\") + query;\n }\n delete options.query;\n }\n\n // ensures that the json body is serialized\n if (\n this.getHeader(options.headers, \"Content-Type\") == \"application/json\" &&\n options.body &&\n typeof options.body !== \"string\"\n ) {\n options.body = JSON.stringify(options.body);\n }\n\n // early throw an abort error in case the request was already cancelled\n const fetchFunc = options.fetch || fetch;\n\n // send the request\n return fetchFunc(url, options)\n .then(async (response) => {\n let data: any = {};\n\n try {\n data = await response.json();\n } catch (err) {\n // @todo map against the response content type\n // all api responses are expected to return json\n // with exception of the realtime events and 204\n if (\n options.signal?.aborted ||\n (\n typeof DOMException !== \"undefined\" && err instanceof DOMException &&\n // https://developer.mozilla.org/en-US/docs/Web/API/DOMException#aborterror\n (err.name == \"AbortError\" || err.code == 20)\n )\n ) {\n throw err;\n }\n }\n\n if (this.afterSend) {\n data = await this.afterSend(response, data, options);\n }\n\n if (response.status >= 400) {\n throw new ClientResponseError({\n url: response.url,\n status: response.status,\n data: data,\n });\n }\n\n return data as T;\n })\n .catch((err) => {\n // wrap to normalize all errors\n throw new ClientResponseError(err);\n });\n }\n\n /**\n * Shallow copy the provided object and takes care to initialize\n * any options required to preserve the backward compatability.\n *\n * @param {SendOptions} options\n * @return {SendOptions}\n */\n private initSendOptions(path: string, options: SendOptions): SendOptions {\n options = Object.assign({ method: \"GET\" } as SendOptions, options);\n\n // auto convert the body to FormData, if needed\n options.body = convertToFormDataIfNeeded(options.body);\n\n // move unknown send options as query parameters\n normalizeUnknownQueryParams(options);\n\n // requestKey normalizations for backward-compatibility\n // ---\n options.query = Object.assign({}, options.params, options.query);\n if (typeof options.requestKey === \"undefined\") {\n if (options.$autoCancel === false || options.query.$autoCancel === false) {\n options.requestKey = null;\n } else if (options.$cancelKey || options.query.$cancelKey) {\n options.requestKey = options.$cancelKey || options.query.$cancelKey;\n }\n }\n // remove the deprecated special cancellation params from the other query params\n delete options.$autoCancel;\n delete options.query.$autoCancel;\n delete options.$cancelKey;\n delete options.query.$cancelKey;\n // ---\n\n // add the json header, if not explicitly set\n // (for FormData body the Content-Type header should be skipped since the boundary is autogenerated)\n if (\n this.getHeader(options.headers, \"Content-Type\") === null &&\n !isFormData(options.body)\n ) {\n options.headers = Object.assign({}, options.headers, {\n \"Content-Type\": \"application/json\",\n });\n }\n\n // add Accept-Language header, if not explicitly set\n if (this.getHeader(options.headers, \"Accept-Language\") === null) {\n options.headers = Object.assign({}, options.headers, {\n \"Accept-Language\": this.lang,\n });\n }\n\n // check if Authorization header can be added\n if (\n // has valid token\n this.authStore.token &&\n // auth header is not explicitly set\n this.getHeader(options.headers, \"Authorization\") === null\n ) {\n options.headers = Object.assign({}, options.headers, {\n Authorization: this.authStore.token,\n });\n }\n\n // handle auto cancelation for duplicated pending request\n if (this.enableAutoCancellation && options.requestKey !== null) {\n const requestKey = options.requestKey || (options.method || \"GET\") + path;\n\n delete options.requestKey;\n\n // cancel previous pending requests\n this.cancelRequest(requestKey);\n\n const controller = new AbortController();\n this.cancelControllers[requestKey] = controller;\n options.signal = controller.signal;\n }\n\n return options;\n }\n\n /**\n * Extracts the header with the provided name in case-insensitive manner.\n * Returns `null` if no header matching the name is found.\n */\n private getHeader(\n headers: { [key: string]: string } | undefined,\n name: string,\n ): string | null {\n headers = headers || {};\n name = name.toLowerCase();\n\n for (let key in headers) {\n if (key.toLowerCase() == name) {\n return headers[key];\n }\n }\n\n return null;\n }\n}\n"],"names":["ClientResponseError","Error","constructor","errData","super","this","url","status","response","isAbort","originalError","Object","setPrototypeOf","prototype","data","DOMException","name","code","message","cause","includes","toJSON","fieldContentRegExp","cookieSerialize","val","options","opt","assign","encode","defaultEncode","test","TypeError","value","result","maxAge","isNaN","isFinite","Math","floor","domain","path","expires","isDate","toString","call","Date","valueOf","toUTCString","httpOnly","secure","priority","toLowerCase","sameSite","defaultDecode","indexOf","decodeURIComponent","encodeURIComponent","isReactNative","navigator","product","global","HermesInternal","atobPolyfill","getTokenPayload","token","encodedPayload","split","map","c","charCodeAt","slice","join","JSON","parse","e","isTokenExpired","expirationThreshold","payload","keys","length","exp","now","atob","input","str","String","replace","bs","buffer","bc","idx","output","charAt","fromCharCode","defaultCookieKey","BaseAuthStore","baseToken","baseModel","_onChangeCallbacks","record","model","isValid","isSuperuser","type","collectionName","collectionId","isAdmin","console","warn","isAuthRecord","save","triggerChange","clear","loadFromCookie","cookie","key","rawData","cookieParse","decode","index","eqIdx","endIdx","lastIndexOf","trim","undefined","_","Array","isArray","exportToCookie","defaultOptions","stringify","resultLength","Blob","size","id","email","extraProps","prop","onChange","callback","fireImmediately","push","i","splice","LocalAuthStore","storageKey","storageFallback","_bindStorageEvent","_storageGet","_storageSet","_storageRemove","window","localStorage","rawValue","getItem","normalizedVal","setItem","removeItem","addEventListener","BaseService","client","SettingsService","getAll","method","send","update","bodyParams","body","testS3","filesystem","then","testEmail","collectionIdOrName","toEmail","emailTemplate","template","collection","generateAppleClientSecret","clientId","teamId","keyId","privateKey","duration","knownSendOptionsKeys","normalizeUnknownQueryParams","query","serializeQueryParams","params","encodedKey","arrValue","v","prepareQueryParamValue","toISOString","RealtimeService","eventSource","subscriptions","lastSentSubscriptions","maxConnectTimeout","reconnectAttempts","maxReconnectAttempts","Infinity","predefinedReconnectIntervals","pendingConnects","isConnected","subscribe","topic","serialized","headers","listener","msgEvent","submitSubscriptions","connect","async","unsubscribeByTopicAndListener","unsubscribe","needToSubmit","subs","getSubscriptionsByTopic","hasSubscriptionListeners","removeEventListener","disconnect","unsubscribeByPrefix","keyPrefix","hasAtleastOneTopic","startsWith","exist","keyToCheck","addAllSubscriptionListeners","getNonEmptySubscriptionKeys","requestKey","getSubscriptionsCancelKey","catch","err","removeAllSubscriptionListeners","Promise","resolve","reject","initConnect","clearTimeout","connectTimeoutId","setTimeout","connectErrorHandler","EventSource","buildURL","onerror","lastEventId","retries","hasUnsentSubscriptions","p","reconnectTimeoutId","connectSubs","latestTopics","t","timeout","fromReconnect","onDisconnect","cancelRequest","close","CrudService","getFullList","batchOrqueryParams","_getFullList","batch","getList","page","perPage","baseCrudPath","responseData","items","item","getFirstListItem","filter","skipTotal","getOne","create","batchSize","request","list","concat","normalizeLegacyOptionsArgs","legacyWarn","baseOptions","bodyOrOptions","hasQuery","resetAutoRefresh","_resetAutoRefresh","RecordService","baseCollectionPath","isSuperusers","realtime","batchOrOptions","authStore","authExpand","expand","authRecord","delete","success","authResponse","listAuthMethods","fields","authWithPassword","usernameOrEmail","password","autoRefreshThreshold","identity","autoRefresh","authData","registerAutoRefresh","threshold","refreshFunc","reauthenticateFunc","oldBeforeSend","beforeSend","oldModel","unsubStoreChange","newToken","sendOptions","oldToken","authRefresh","authWithOAuth2Code","provider","codeVerifier","redirectURL","createData","authWithOAuth2","args","config","eagerDefaultPopup","urlCallback","openBrowserPopup","cleanup","requestKeyOptions","authMethods","oauth2","providers","find","cancelController","signal","onabort","oldState","state","error","scopes","replacements","_replaceQueryParams","authURL","location","href","requestPasswordReset","confirmPasswordReset","passwordResetToken","passwordConfirm","requestVerification","confirmVerification","verificationToken","verified","requestEmailChange","newEmail","confirmEmailChange","emailChangeToken","listExternalAuths","recordId","unlinkExternalAuth","ea","requestOTP","authWithOTP","otpId","impersonate","Authorization","Client","baseURL","lang","urlPath","substring","parsedParams","rawParams","param","pair","hasOwnProperty","open","width","height","windowWidth","innerWidth","windowHeight","innerHeight","left","top","CollectionService","import","collections","deleteMissing","getScaffolds","truncate","LogService","getStats","HealthService","check","FileService","getUrl","filename","queryParams","getURL","parts","download","URLSearchParams","getToken","BackupService","basename","upload","restore","getDownloadUrl","getDownloadURL","CronService","run","jobId","isFile","File","uri","isFormData","FormData","hasFileField","values","inferNumberCharsRegex","inferFormDataValue","num","BatchService","requests","SubBatchService","formData","jsonData","req","json","files","file","append","upsert","prepareRequest","convertFormDataToObject","forEach","k","parsed","foundFiles","foundRegular","fileKey","endsWith","baseUrl","cancelControllers","recordServices","enableAutoCancellation","Deno","logs","settings","health","backups","crons","admins","createBatch","idOrName","autoCancellation","enable","abort","cancelAllRequests","raw","replaceAll","getFileUrl","buildUrl","origin","pathname","initSendOptions","getHeader","fetch","aborted","afterSend","convertToFormDataIfNeeded","form","$autoCancel","$cancelKey","controller","AbortController"],"mappings":"uCAIM,MAAOA,4BAA4BC,MAOrC,WAAAC,CAAYC,GACRC,MAAM,uBAPVC,KAAGC,IAAW,GACdD,KAAME,OAAW,EACjBF,KAAQG,SAA2B,GACnCH,KAAOI,SAAY,EACnBJ,KAAaK,cAAQ,KAOjBC,OAAOC,eAAeP,KAAML,oBAAoBa,WAEhC,OAAZV,GAAuC,iBAAZA,IAC3BE,KAAKC,IAA6B,iBAAhBH,EAAQG,IAAmBH,EAAQG,IAAM,GAC3DD,KAAKE,OAAmC,iBAAnBJ,EAAQI,OAAsBJ,EAAQI,OAAS,EACpEF,KAAKI,UAAYN,EAAQM,QACzBJ,KAAKK,cAAgBP,EAAQO,cAEJ,OAArBP,EAAQK,UAAiD,iBAArBL,EAAQK,SAC5CH,KAAKG,SAAWL,EAAQK,SACA,OAAjBL,EAAQW,MAAyC,iBAAjBX,EAAQW,KAC/CT,KAAKG,SAAWL,EAAQW,KAExBT,KAAKG,SAAW,IAInBH,KAAKK,eAAmBP,aAAmBH,sBAC5CK,KAAKK,cAAgBP,GAIG,oBAAjBY,cACPZ,aAAmBY,eAEF,cAAhBZ,EAAQa,MAAwC,IAAhBb,EAAQc,QAEzCZ,KAAKI,SAAU,GAGnBJ,KAAKW,KAAO,uBAAyBX,KAAKE,OAC1CF,KAAKa,QAAUb,KAAKG,UAAUU,QACzBb,KAAKa,UACFb,KAAKI,QACLJ,KAAKa,QACD,mHACGb,KAAKK,eAAeS,OAAOD,SAASE,SAAS,oBACpDf,KAAKa,QACD,qJAEJb,KAAKa,QAAU,yBAMvBb,KAAKc,MAAQd,KAAKK,aACrB,CAKD,QAAII,GACA,OAAOT,KAAKG,QACf,CAMD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ocketbase.umd.d.ts b/PBandGraphScaffold/node_modules/pocketbase/dist/pocketbase.umd.d.ts deleted file mode 100644 index 3cd2c02..0000000 --- a/PBandGraphScaffold/node_modules/pocketbase/dist/pocketbase.umd.d.ts +++ /dev/null @@ -1,1468 +0,0 @@ -interface SerializeOptions { - encode?: (val: string | number | boolean) => string; - maxAge?: number; - domain?: string; - path?: string; - expires?: Date; - httpOnly?: boolean; - secure?: boolean; - priority?: string; - sameSite?: boolean | string; -} -interface ListResult { - page: number; - perPage: number; - totalItems: number; - totalPages: number; - items: Array; -} -interface BaseModel { - [key: string]: any; - id: string; -} -interface LogModel extends BaseModel { - level: string; - message: string; - created: string; - updated: string; - data: { - [key: string]: any; - }; -} -interface RecordModel extends BaseModel { - collectionId: string; - collectionName: string; - expand?: { - [key: string]: any; - }; -} -// ------------------------------------------------------------------- -// Collection types -// ------------------------------------------------------------------- -interface CollectionField { - [key: string]: any; - id: string; - name: string; - type: string; - system: boolean; - hidden: boolean; - presentable: boolean; -} -interface TokenConfig { - duration: number; - secret?: string; -} -interface AuthAlertConfig { - enabled: boolean; - emailTemplate: EmailTemplate; -} -interface OTPConfig { - enabled: boolean; - duration: number; - length: number; - emailTemplate: EmailTemplate; -} -interface MFAConfig { - enabled: boolean; - duration: number; - rule: string; -} -interface PasswordAuthConfig { - enabled: boolean; - identityFields: Array; -} -interface OAuth2Provider { - pkce?: boolean; - clientId: string; - name: string; - clientSecret: string; - authURL: string; - tokenURL: string; - userInfoURL: string; - displayName: string; - extra?: { - [key: string]: any; - }; -} -interface OAuth2Config { - enabled: boolean; - mappedFields: { - [key: string]: string; - }; - providers: Array; -} -interface EmailTemplate { - subject: string; - body: string; -} -interface collection extends BaseModel { - name: string; - fields: Array; - indexes: Array; - system: boolean; - listRule?: string; - viewRule?: string; - createRule?: string; - updateRule?: string; - deleteRule?: string; -} -interface BaseCollectionModel extends collection { - type: "base"; -} -interface ViewCollectionModel extends collection { - type: "view"; - viewQuery: string; -} -interface AuthCollectionModel extends collection { - type: "auth"; - authRule?: string; - manageRule?: string; - authAlert: AuthAlertConfig; - oauth2: OAuth2Config; - passwordAuth: PasswordAuthConfig; - mfa: MFAConfig; - otp: OTPConfig; - authToken: TokenConfig; - passwordResetToken: TokenConfig; - emailChangeToken: TokenConfig; - verificationToken: TokenConfig; - fileToken: TokenConfig; - verificationTemplate: EmailTemplate; - resetPasswordTemplate: EmailTemplate; - confirmEmailChangeTemplate: EmailTemplate; -} -type CollectionModel = BaseCollectionModel | ViewCollectionModel | AuthCollectionModel; -type AuthRecord = RecordModel | null; -// for backward compatibility -type OnStoreChangeFunc = (token: string, record: AuthRecord) => void; -/** - * Base AuthStore class that stores the auth state in runtime memory (aka. only for the duration of the store instane). - * - * Usually you wouldn't use it directly and instead use the builtin LocalAuthStore, AsyncAuthStore - * or extend it with your own custom implementation. - */ -declare class BaseAuthStore { - protected baseToken: string; - protected baseModel: AuthRecord; - private _onChangeCallbacks; - /** - * Retrieves the stored token (if any). - */ - get token(): string; - /** - * Retrieves the stored model data (if any). - */ - get record(): AuthRecord; - /** - * @deprecated use `record` instead. - */ - get model(): AuthRecord; - /** - * Loosely checks if the store has valid token (aka. existing and unexpired exp claim). - */ - get isValid(): boolean; - /** - * Loosely checks whether the currently loaded store state is for superuser. - * - * Alternatively you can also compare directly `pb.authStore.record?.collectionName`. - */ - get isSuperuser(): boolean; - /** - * @deprecated use `isSuperuser` instead or simply check the record.collectionName property. - */ - get isAdmin(): boolean; - /** - * @deprecated use `!isSuperuser` instead or simply check the record.collectionName property. - */ - get isAuthRecord(): boolean; - /** - * Saves the provided new token and model data in the auth store. - */ - save(token: string, record?: AuthRecord): void; - /** - * Removes the stored token and model data form the auth store. - */ - clear(): void; - /** - * Parses the provided cookie string and updates the store state - * with the cookie's token and model data. - * - * NB! This function doesn't validate the token or its data. - * Usually this isn't a concern if you are interacting only with the - * PocketBase API because it has the proper server-side security checks in place, - * but if you are using the store `isValid` state for permission controls - * in a node server (eg. SSR), then it is recommended to call `authRefresh()` - * after loading the cookie to ensure an up-to-date token and model state. - * For example: - * - * ```js - * pb.authStore.loadFromCookie("cookie string..."); - * - * try { - * // get an up-to-date auth store state by veryfing and refreshing the loaded auth model (if any) - * pb.authStore.isValid && await pb.collection('users').authRefresh(); - * } catch (_) { - * // clear the auth store on failed refresh - * pb.authStore.clear(); - * } - * ``` - */ - loadFromCookie(cookie: string, key?: string): void; - /** - * Exports the current store state as cookie string. - * - * By default the following optional attributes are added: - * - Secure - * - HttpOnly - * - SameSite=Strict - * - Path=/ - * - Expires={the token expiration date} - * - * NB! If the generated cookie exceeds 4096 bytes, this method will - * strip the model data to the bare minimum to try to fit within the - * recommended size in https://www.rfc-editor.org/rfc/rfc6265#section-6.1. - */ - exportToCookie(options?: SerializeOptions, key?: string): string; - /** - * Register a callback function that will be called on store change. - * - * You can set the `fireImmediately` argument to true in order to invoke - * the provided callback right after registration. - * - * Returns a removal function that you could call to "unsubscribe" from the changes. - */ - onChange(callback: OnStoreChangeFunc, fireImmediately?: boolean): () => void; - protected triggerChange(): void; -} -/** - * BaseService class that should be inherited from all API services. - */ -declare abstract class BaseService { - readonly client: Client; - constructor(client: Client); -} -interface SendOptions extends RequestInit { - // for backward compatibility and to minimize the verbosity, - // any top-level field that doesn't exist in RequestInit or the - // fields below will be treated as query parameter. - [key: string]: any; - /** - * Optional custom fetch function to use for sending the request. - */ - fetch?: (url: RequestInfo | URL, config?: RequestInit) => Promise; - /** - * Custom headers to send with the requests. - */ - headers?: { - [key: string]: string; - }; - /** - * The body of the request (serialized automatically for json requests). - */ - body?: any; - /** - * Query parameters that will be appended to the request url. - */ - query?: { - [key: string]: any; - }; - /** - * @deprecated use `query` instead - * - * for backward-compatibility `params` values are merged with `query`, - * but this option may get removed in the final v1 release - */ - params?: { - [key: string]: any; - }; - /** - * The request identifier that can be used to cancel pending requests. - */ - requestKey?: string | null; - /** - * @deprecated use `requestKey:string` instead - */ - $cancelKey?: string; - /** - * @deprecated use `requestKey:null` instead - */ - $autoCancel?: boolean; -} -interface CommonOptions extends SendOptions { - fields?: string; -} -interface ListOptions extends CommonOptions { - page?: number; - perPage?: number; - sort?: string; - filter?: string; - skipTotal?: boolean; -} -interface FullListOptions extends ListOptions { - batch?: number; -} -interface RecordOptions extends CommonOptions { - expand?: string; -} -interface RecordListOptions extends ListOptions, RecordOptions { -} -interface RecordFullListOptions extends FullListOptions, RecordOptions { -} -interface RecordSubscribeOptions extends SendOptions { - fields?: string; - filter?: string; - expand?: string; -} -interface LogStatsOptions extends CommonOptions { - filter?: string; -} -interface FileOptions extends CommonOptions { - thumb?: string; - download?: boolean; -} -interface appleClientSecret { - secret: string; -} -declare class SettingsService extends BaseService { - /** - * Fetch all available app settings. - * - * @throws {ClientResponseError} - */ - getAll(options?: CommonOptions): Promise<{ - [key: string]: any; - }>; - /** - * Bulk updates app settings. - * - * @throws {ClientResponseError} - */ - update(bodyParams?: { - [key: string]: any; - } | FormData, options?: CommonOptions): Promise<{ - [key: string]: any; - }>; - /** - * Performs a S3 filesystem connection test. - * - * The currently supported `filesystem` are "storage" and "backups". - * - * @throws {ClientResponseError} - */ - testS3(filesystem?: string, options?: CommonOptions): Promise; - /** - * Sends a test email. - * - * The possible `emailTemplate` values are: - * - verification - * - password-reset - * - email-change - * - * @throws {ClientResponseError} - */ - testEmail(collectionIdOrName: string, toEmail: string, emailTemplate: string, options?: CommonOptions): Promise; - /** - * Generates a new Apple OAuth2 client secret. - * - * @throws {ClientResponseError} - */ - generateAppleClientSecret(clientId: string, teamId: string, keyId: string, privateKey: string, duration: number, options?: CommonOptions): Promise; -} -type UnsubscribeFunc = () => Promise; -declare class RealtimeService extends BaseService { - clientId: string; - private eventSource; - private subscriptions; - private lastSentSubscriptions; - private connectTimeoutId; - private maxConnectTimeout; - private reconnectTimeoutId; - private reconnectAttempts; - private maxReconnectAttempts; - private predefinedReconnectIntervals; - private pendingConnects; - /** - * Returns whether the realtime connection has been established. - */ - get isConnected(): boolean; - /** - * An optional hook that is invoked when the realtime client disconnects - * either when unsubscribing from all subscriptions or when the - * connection was interrupted or closed by the server. - * - * The received argument could be used to determine whether the disconnect - * is a result from unsubscribing (`activeSubscriptions.length == 0`) - * or because of network/server error (`activeSubscriptions.length > 0`). - * - * If you want to listen for the opposite, aka. when the client connection is established, - * subscribe to the `PB_CONNECT` event. - */ - onDisconnect?: (activeSubscriptions: Array) => void; - /** - * Register the subscription listener. - * - * You can subscribe multiple times to the same topic. - * - * If the SSE connection is not started yet, - * this method will also initialize it. - */ - subscribe(topic: string, callback: (data: any) => void, options?: SendOptions): Promise; - /** - * Unsubscribe from all subscription listeners with the specified topic. - * - * If `topic` is not provided, then this method will unsubscribe - * from all active subscriptions. - * - * This method is no-op if there are no active subscriptions. - * - * The related sse connection will be autoclosed if after the - * unsubscribe operation there are no active subscriptions left. - */ - unsubscribe(topic?: string): Promise; - /** - * Unsubscribe from all subscription listeners starting with the specified topic prefix. - * - * This method is no-op if there are no active subscriptions with the specified topic prefix. - * - * The related sse connection will be autoclosed if after the - * unsubscribe operation there are no active subscriptions left. - */ - unsubscribeByPrefix(keyPrefix: string): Promise; - /** - * Unsubscribe from all subscriptions matching the specified topic and listener function. - * - * This method is no-op if there are no active subscription with - * the specified topic and listener. - * - * The related sse connection will be autoclosed if after the - * unsubscribe operation there are no active subscriptions left. - */ - unsubscribeByTopicAndListener(topic: string, listener: EventListener): Promise; - private hasSubscriptionListeners; - private submitSubscriptions; - private getSubscriptionsCancelKey; - private getSubscriptionsByTopic; - private getNonEmptySubscriptionKeys; - private addAllSubscriptionListeners; - private removeAllSubscriptionListeners; - private connect; - private initConnect; - private hasUnsentSubscriptions; - private connectErrorHandler; - private disconnect; -} -declare abstract class CrudService extends BaseService { - /** - * Base path for the crud actions (without trailing slash, eg. '/admins'). - */ - abstract get baseCrudPath(): string; - /** - * Response data decoder. - */ - decode(data: { - [key: string]: any; - }): T; - /** - * Returns a promise with all list items batch fetched at once - * (by default 500 items per request; to change it set the `batch` query param). - * - * You can use the generic T to supply a wrapper type of the crud model. - * - * @throws {ClientResponseError} - */ - getFullList(options?: FullListOptions): Promise>; - /** - * Legacy version of getFullList with explicitly specified batch size. - */ - getFullList(batch?: number, options?: ListOptions): Promise>; - /** - * Returns paginated items list. - * - * You can use the generic T to supply a wrapper type of the crud model. - * - * @throws {ClientResponseError} - */ - getList(page?: number, perPage?: number, options?: ListOptions): Promise>; - /** - * Returns the first found item by the specified filter. - * - * Internally it calls `getList(1, 1, { filter, skipTotal })` and - * returns the first found item. - * - * You can use the generic T to supply a wrapper type of the crud model. - * - * For consistency with `getOne`, this method will throw a 404 - * ClientResponseError if no item was found. - * - * @throws {ClientResponseError} - */ - getFirstListItem(filter: string, options?: CommonOptions): Promise; - /** - * Returns single item by its id. - * - * You can use the generic T to supply a wrapper type of the crud model. - * - * If `id` is empty it will throw a 404 error. - * - * @throws {ClientResponseError} - */ - getOne(id: string, options?: CommonOptions): Promise; - /** - * Creates a new item. - * - * You can use the generic T to supply a wrapper type of the crud model. - * - * @throws {ClientResponseError} - */ - create(bodyParams?: { - [key: string]: any; - } | FormData, options?: CommonOptions): Promise; - /** - * Updates an existing item by its id. - * - * You can use the generic T to supply a wrapper type of the crud model. - * - * @throws {ClientResponseError} - */ - update(id: string, bodyParams?: { - [key: string]: any; - } | FormData, options?: CommonOptions): Promise; - /** - * Deletes an existing item by its id. - * - * @throws {ClientResponseError} - */ - delete(id: string, options?: CommonOptions): Promise; - /** - * Returns a promise with all list items batch fetched at once. - */ - protected _getFullList(batchSize?: number, options?: ListOptions): Promise>; -} -interface RecordAuthResponse { - /** - * The signed PocketBase auth record. - */ - record: T; - /** - * The PocketBase record auth token. - * - * If you are looking for the OAuth2 access and refresh tokens - * they are available under the `meta.accessToken` and `meta.refreshToken` props. - */ - token: string; - /** - * Auth meta data usually filled when OAuth2 is used. - */ - meta?: { - [key: string]: any; - }; -} -interface AuthProviderInfo { - name: string; - displayName: string; - state: string; - authURL: string; - codeVerifier: string; - codeChallenge: string; - codeChallengeMethod: string; -} -interface AuthMethodsList { - mfa: { - enabled: boolean; - duration: number; - }; - otp: { - enabled: boolean; - duration: number; - }; - password: { - enabled: boolean; - identityFields: Array; - }; - oauth2: { - enabled: boolean; - providers: Array; - }; -} -interface RecordSubscription { - action: string; // eg. create, update, delete - record: T; -} -type OAuth2UrlCallback = (url: string) => void | Promise; -interface OAuth2AuthConfig extends SendOptions { - // the name of the OAuth2 provider (eg. "google") - provider: string; - // custom scopes to overwrite the default ones - scopes?: Array; - // optional record create data - createData?: { - [key: string]: any; - }; - // optional callback that is triggered after the OAuth2 sign-in/sign-up url generation - urlCallback?: OAuth2UrlCallback; - // optional query params to send with the PocketBase auth request (eg. fields, expand, etc.) - query?: RecordOptions; -} -interface OTPResponse { - otpId: string; -} -declare class RecordService extends CrudService { - readonly collectionIdOrName: string; - constructor(client: Client, collectionIdOrName: string); - /** - * @inheritdoc - */ - get baseCrudPath(): string; - /** - * Returns the current collection service base path. - */ - get baseCollectionPath(): string; - /** - * Returns whether the current service collection is superusers. - */ - get isSuperusers(): boolean; - // --------------------------------------------------------------- - // Realtime handlers - // --------------------------------------------------------------- - /** - * Subscribe to realtime changes to the specified topic ("*" or record id). - * - * If `topic` is the wildcard "*", then this method will subscribe to - * any record changes in the collection. - * - * If `topic` is a record id, then this method will subscribe only - * to changes of the specified record id. - * - * It's OK to subscribe multiple times to the same topic. - * You can use the returned `UnsubscribeFunc` to remove only a single subscription. - * Or use `unsubscribe(topic)` if you want to remove all subscriptions attached to the topic. - */ - subscribe(topic: string, callback: (data: RecordSubscription) => void, options?: RecordSubscribeOptions): Promise; - /** - * Unsubscribe from all subscriptions of the specified topic - * ("*" or record id). - * - * If `topic` is not set, then this method will unsubscribe from - * all subscriptions associated to the current collection. - */ - unsubscribe(topic?: string): Promise; - // --------------------------------------------------------------- - // Crud handers - // --------------------------------------------------------------- - /** - * @inheritdoc - */ - getFullList(options?: RecordFullListOptions): Promise>; - /** - * @inheritdoc - */ - getFullList(batch?: number, options?: RecordListOptions): Promise>; - /** - * @inheritdoc - */ - getList(page?: number, perPage?: number, options?: RecordListOptions): Promise>; - /** - * @inheritdoc - */ - getFirstListItem(filter: string, options?: RecordListOptions): Promise; - /** - * @inheritdoc - */ - getOne(id: string, options?: RecordOptions): Promise; - /** - * @inheritdoc - */ - create(bodyParams?: { - [key: string]: any; - } | FormData, options?: RecordOptions): Promise; - /** - * @inheritdoc - * - * If the current `client.authStore.record` matches with the updated id, then - * on success the `client.authStore.record` will be updated with the new response record fields. - */ - update(id: string, bodyParams?: { - [key: string]: any; - } | FormData, options?: RecordOptions): Promise; - /** - * @inheritdoc - * - * If the current `client.authStore.record` matches with the deleted id, - * then on success the `client.authStore` will be cleared. - */ - delete(id: string, options?: CommonOptions): Promise; - // --------------------------------------------------------------- - // Auth handlers - // --------------------------------------------------------------- - /** - * Prepare successful collection authorization response. - */ - protected authResponse(responseData: any): RecordAuthResponse; - /** - * Returns all available collection auth methods. - * - * @throws {ClientResponseError} - */ - listAuthMethods(options?: CommonOptions): Promise; - /** - * Authenticate a single auth collection record via its username/email and password. - * - * On success, this method also automatically updates - * the client's AuthStore data and returns: - * - the authentication token - * - the authenticated record model - * - * @throws {ClientResponseError} - */ - authWithPassword(usernameOrEmail: string, password: string, options?: RecordOptions): Promise>; - /** - * Authenticate a single auth collection record with OAuth2 code. - * - * If you don't have an OAuth2 code you may also want to check `authWithOAuth2` method. - * - * On success, this method also automatically updates - * the client's AuthStore data and returns: - * - the authentication token - * - the authenticated record model - * - the OAuth2 account data (eg. name, email, avatar, etc.) - * - * @throws {ClientResponseError} - */ - authWithOAuth2Code(provider: string, code: string, codeVerifier: string, redirectURL: string, createData?: { - [key: string]: any; - }, options?: RecordOptions): Promise>; - /** - * @deprecated - * Consider using authWithOAuth2Code(provider, code, codeVerifier, redirectURL, createdData, options?). - */ - authWithOAuth2Code(provider: string, code: string, codeVerifier: string, redirectURL: string, createData?: { - [key: string]: any; - }, body?: any, query?: any): Promise>; - /** - * @deprecated This form of authWithOAuth2 is deprecated. - * - * Please use `authWithOAuth2Code()` OR its simplified realtime version - * as shown in https://pocketbase.io/docs/authentication/#oauth2-integration. - */ - authWithOAuth2(provider: string, code: string, codeVerifier: string, redirectURL: string, createData?: { - [key: string]: any; - }, bodyParams?: { - [key: string]: any; - }, queryParams?: RecordOptions): Promise>; - /** - * Authenticate a single auth collection record with OAuth2 - * **without custom redirects, deeplinks or even page reload**. - * - * This method initializes a one-off realtime subscription and will - * open a popup window with the OAuth2 vendor page to authenticate. - * Once the external OAuth2 sign-in/sign-up flow is completed, the popup - * window will be automatically closed and the OAuth2 data sent back - * to the user through the previously established realtime connection. - * - * You can specify an optional `urlCallback` prop to customize - * the default url `window.open` behavior. - * - * On success, this method also automatically updates - * the client's AuthStore data and returns: - * - the authentication token - * - the authenticated record model - * - the OAuth2 account data (eg. name, email, avatar, etc.) - * - * Example: - * - * ```js - * const authData = await pb.collection("users").authWithOAuth2({ - * provider: "google", - * }) - * ``` - * - * Note1: When creating the OAuth2 app in the provider dashboard - * you have to configure `https://yourdomain.com/api/oauth2-redirect` - * as redirect URL. - * - * Note2: Safari may block the default `urlCallback` popup because - * it doesn't allow `window.open` calls as part of an `async` click functions. - * To workaround this you can either change your click handler to not be marked as `async` - * OR manually call `window.open` before your `async` function and use the - * window reference in your own custom `urlCallback` (see https://github.com/pocketbase/pocketbase/discussions/2429#discussioncomment-5943061). - * For example: - * ```js - * - * ... - * document.getElementById("btn").addEventListener("click", () => { - * pb.collection("users").authWithOAuth2({ - * provider: "gitlab", - * }).then((authData) => { - * console.log(authData) - * }).catch((err) => { - * console.log(err, err.originalError); - * }); - * }) - * ``` - * - * @throws {ClientResponseError} - */ - authWithOAuth2(options: OAuth2AuthConfig): Promise>; - /** - * Refreshes the current authenticated record instance and - * returns a new token and record data. - * - * On success this method also automatically updates the client's AuthStore. - * - * @throws {ClientResponseError} - */ - authRefresh(options?: RecordOptions): Promise>; - /** - * @deprecated - * Consider using authRefresh(options?). - */ - authRefresh(body?: any, query?: any): Promise>; - /** - * Sends auth record password reset request. - * - * @throws {ClientResponseError} - */ - requestPasswordReset(email: string, options?: CommonOptions): Promise; - /** - * @deprecated - * Consider using requestPasswordReset(email, options?). - */ - requestPasswordReset(email: string, body?: any, query?: any): Promise; - /** - * Confirms auth record password reset request. - * - * @throws {ClientResponseError} - */ - confirmPasswordReset(passwordResetToken: string, password: string, passwordConfirm: string, options?: CommonOptions): Promise; - /** - * @deprecated - * Consider using confirmPasswordReset(passwordResetToken, password, passwordConfirm, options?). - */ - confirmPasswordReset(passwordResetToken: string, password: string, passwordConfirm: string, body?: any, query?: any): Promise; - /** - * Sends auth record verification email request. - * - * @throws {ClientResponseError} - */ - requestVerification(email: string, options?: CommonOptions): Promise; - /** - * @deprecated - * Consider using requestVerification(email, options?). - */ - requestVerification(email: string, body?: any, query?: any): Promise; - /** - * Confirms auth record email verification request. - * - * If the current `client.authStore.record` matches with the auth record from the token, - * then on success the `client.authStore.record.verified` will be updated to `true`. - * - * @throws {ClientResponseError} - */ - confirmVerification(verificationToken: string, options?: CommonOptions): Promise; - /** - * @deprecated - * Consider using confirmVerification(verificationToken, options?). - */ - confirmVerification(verificationToken: string, body?: any, query?: any): Promise; - /** - * Sends an email change request to the authenticated record model. - * - * @throws {ClientResponseError} - */ - requestEmailChange(newEmail: string, options?: CommonOptions): Promise; - /** - * @deprecated - * Consider using requestEmailChange(newEmail, options?). - */ - requestEmailChange(newEmail: string, body?: any, query?: any): Promise; - /** - * Confirms auth record's new email address. - * - * If the current `client.authStore.record` matches with the auth record from the token, - * then on success the `client.authStore` will be cleared. - * - * @throws {ClientResponseError} - */ - confirmEmailChange(emailChangeToken: string, password: string, options?: CommonOptions): Promise; - /** - * @deprecated - * Consider using confirmEmailChange(emailChangeToken, password, options?). - */ - confirmEmailChange(emailChangeToken: string, password: string, body?: any, query?: any): Promise; - /** - * @deprecated use collection("_externalAuths").* - * - * Lists all linked external auth providers for the specified auth record. - * - * @throws {ClientResponseError} - */ - listExternalAuths(recordId: string, options?: CommonOptions): Promise>; - /** - * @deprecated use collection("_externalAuths").* - * - * Unlink a single external auth provider from the specified auth record. - * - * @throws {ClientResponseError} - */ - unlinkExternalAuth(recordId: string, provider: string, options?: CommonOptions): Promise; - /** - * Sends auth record OTP to the provided email. - * - * @throws {ClientResponseError} - */ - requestOTP(email: string, options?: CommonOptions): Promise; - /** - * Authenticate a single auth collection record via OTP. - * - * On success, this method also automatically updates - * the client's AuthStore data and returns: - * - the authentication token - * - the authenticated record model - * - * @throws {ClientResponseError} - */ - authWithOTP(otpId: string, password: string, options?: CommonOptions): Promise>; - /** - * Impersonate authenticates with the specified recordId and - * returns a new client with the received auth token in a memory store. - * - * If `duration` is 0 the generated auth token will fallback - * to the default collection auth token duration. - * - * This action currently requires superusers privileges. - * - * @throws {ClientResponseError} - */ - impersonate(recordId: string, duration: number, options?: CommonOptions): Promise; - // --------------------------------------------------------------- - // very rudimentary url query params replacement because at the moment - // URL (and URLSearchParams) doesn't seem to be fully supported in React Native - // - // note: for details behind some of the decode/encode parsing check https://unixpapa.com/js/querystring.html - private _replaceQueryParams; -} -declare class CollectionService extends CrudService { - /** - * @inheritdoc - */ - get baseCrudPath(): string; - /** - * Imports the provided collections. - * - * If `deleteMissing` is `true`, all local collections and their fields, - * that are not present in the imported configuration, WILL BE DELETED - * (including their related records data)! - * - * @throws {ClientResponseError} - */ - import(collections: Array, deleteMissing?: boolean, options?: CommonOptions): Promise; - /** - * Returns type indexed map with scaffolded collection models - * populated with their default field values. - * - * @throws {ClientResponseError} - */ - getScaffolds(options?: CommonOptions): Promise<{ - [key: string]: CollectionModel; - }>; - /** - * Deletes all records associated with the specified collection. - * - * @throws {ClientResponseError} - */ - truncate(collectionIdOrName: string, options?: CommonOptions): Promise; -} -interface HourlyStats { - total: number; - date: string; -} -declare class LogService extends BaseService { - /** - * Returns paginated logs list. - * - * @throws {ClientResponseError} - */ - getList(page?: number, perPage?: number, options?: ListOptions): Promise>; - /** - * Returns a single log by its id. - * - * If `id` is empty it will throw a 404 error. - * - * @throws {ClientResponseError} - */ - getOne(id: string, options?: CommonOptions): Promise; - /** - * Returns logs statistics. - * - * @throws {ClientResponseError} - */ - getStats(options?: LogStatsOptions): Promise>; -} -interface HealthCheckResponse { - code: number; - message: string; - data: { - [key: string]: any; - }; -} -declare class HealthService extends BaseService { - /** - * Checks the health status of the api. - * - * @throws {ClientResponseError} - */ - check(options?: CommonOptions): Promise; -} -declare class FileService extends BaseService { - /** - * @deprecated Please replace with `pb.files.getURL()`. - */ - getUrl(record: { - [key: string]: any; - }, filename: string, queryParams?: FileOptions): string; - /** - * Builds and returns an absolute record file url for the provided filename. - */ - getURL(record: { - [key: string]: any; - }, filename: string, queryParams?: FileOptions): string; - /** - * Requests a new private file access token for the current auth model. - * - * @throws {ClientResponseError} - */ - getToken(options?: CommonOptions): Promise; -} -interface BackupFileInfo { - key: string; - size: number; - modified: string; -} -declare class BackupService extends BaseService { - /** - * Returns list with all available backup files. - * - * @throws {ClientResponseError} - */ - getFullList(options?: CommonOptions): Promise>; - /** - * Initializes a new backup. - * - * @throws {ClientResponseError} - */ - create(basename: string, options?: CommonOptions): Promise; - /** - * Uploads an existing backup file. - * - * Example: - * - * ```js - * await pb.backups.upload({ - * file: new Blob([...]), - * }); - * ``` - * - * @throws {ClientResponseError} - */ - upload(bodyParams: { - [key: string]: any; - } | FormData, options?: CommonOptions): Promise; - /** - * Deletes a single backup file. - * - * @throws {ClientResponseError} - */ - delete(key: string, options?: CommonOptions): Promise; - /** - * Initializes an app data restore from an existing backup. - * - * @throws {ClientResponseError} - */ - restore(key: string, options?: CommonOptions): Promise; - /** - * @deprecated Please use `getDownloadURL()`. - */ - getDownloadUrl(token: string, key: string): string; - /** - * Builds a download url for a single existing backup using a - * superuser file token and the backup file key. - * - * The file token can be generated via `pb.files.getToken()`. - */ - getDownloadURL(token: string, key: string): string; -} -interface CronJob { - id: string; - expression: string; -} -declare class CronService extends BaseService { - /** - * Returns list with all registered cron jobs. - * - * @throws {ClientResponseError} - */ - getFullList(options?: CommonOptions): Promise>; - /** - * Runs the specified cron job. - * - * @throws {ClientResponseError} - */ - run(jobId: string, options?: CommonOptions): Promise; -} -interface BatchRequest { - method: string; - url: string; - json?: { - [key: string]: any; - }; - files?: { - [key: string]: Array; - }; - headers?: { - [key: string]: string; - }; -} -interface BatchRequestResult { - status: number; - body: any; -} -declare class BatchService extends BaseService { - private requests; - private subs; - /** - * Starts constructing a batch request entry for the specified collection. - */ - collection(collectionIdOrName: string): SubBatchService; - /** - * Sends the batch requests. - * - * @throws {ClientResponseError} - */ - send(options?: SendOptions): Promise>; -} -declare class SubBatchService { - private requests; - private readonly collectionIdOrName; - constructor(requests: Array, collectionIdOrName: string); - /** - * Registers a record upsert request into the current batch queue. - * - * The request will be executed as update if `bodyParams` have a valid existing record `id` value, otherwise - create. - */ - upsert(bodyParams?: { - [key: string]: any; - } | FormData, options?: RecordOptions): void; - /** - * Registers a record create request into the current batch queue. - */ - create(bodyParams?: { - [key: string]: any; - } | FormData, options?: RecordOptions): void; - /** - * Registers a record update request into the current batch queue. - */ - update(id: string, bodyParams?: { - [key: string]: any; - } | FormData, options?: RecordOptions): void; - /** - * Registers a record delete request into the current batch queue. - */ - delete(id: string, options?: SendOptions): void; - private prepareRequest; -} -interface BeforeSendResult { - [key: string]: any; - url?: string; - options?: { - [key: string]: any; - }; -} -/** - * PocketBase JS Client. - */ -declare class Client { - /** - * The base PocketBase backend url address (eg. 'http://127.0.0.1.8090'). - */ - baseURL: string; - /** - * Legacy getter alias for baseURL. - * @deprecated Please replace with baseURL. - */ - get baseUrl(): string; - /** - * Legacy setter alias for baseURL. - * @deprecated Please replace with baseURL. - */ - set baseUrl(v: string); - /** - * Hook that get triggered right before sending the fetch request, - * allowing you to inspect and modify the url and request options. - * - * For list of the possible options check https://developer.mozilla.org/en-US/docs/Web/API/fetch#options - * - * You can return a non-empty result object `{ url, options }` to replace the url and request options entirely. - * - * Example: - * ```js - * const pb = new PocketBase("https://example.com") - * - * pb.beforeSend = function (url, options) { - * options.headers = Object.assign({}, options.headers, { - * 'X-Custom-Header': 'example', - * }) - * - * return { url, options } - * } - * - * // use the created client as usual... - * ``` - */ - beforeSend?: (url: string, options: SendOptions) => BeforeSendResult | Promise; - /** - * Hook that get triggered after successfully sending the fetch request, - * allowing you to inspect/modify the response object and its parsed data. - * - * Returns the new Promise resolved `data` that will be returned to the client. - * - * Example: - * ```js - * const pb = new PocketBase("https://example.com") - * - * pb.afterSend = function (response, data, options) { - * if (response.status != 200) { - * throw new ClientResponseError({ - * url: response.url, - * status: response.status, - * response: { ... }, - * }) - * } - * - * return data; - * } - * - * // use the created client as usual... - * ``` - */ - afterSend?: ((response: Response, data: any) => any) & ((response: Response, data: any, options: SendOptions) => any); - /** - * Optional language code (default to `en-US`) that will be sent - * with the requests to the server as `Accept-Language` header. - */ - lang: string; - /** - * A replaceable instance of the local auth store service. - */ - authStore: BaseAuthStore; - /** - * An instance of the service that handles the **Settings APIs**. - */ - readonly settings: SettingsService; - /** - * An instance of the service that handles the **Collection APIs**. - */ - readonly collections: CollectionService; - /** - * An instance of the service that handles the **File APIs**. - */ - readonly files: FileService; - /** - * An instance of the service that handles the **Log APIs**. - */ - readonly logs: LogService; - /** - * An instance of the service that handles the **Realtime APIs**. - */ - readonly realtime: RealtimeService; - /** - * An instance of the service that handles the **Health APIs**. - */ - readonly health: HealthService; - /** - * An instance of the service that handles the **Backup APIs**. - */ - readonly backups: BackupService; - /** - * An instance of the service that handles the **Cron APIs**. - */ - readonly crons: CronService; - private cancelControllers; - private recordServices; - private enableAutoCancellation; - constructor(baseURL?: string, authStore?: BaseAuthStore | null, lang?: string); - /** - * @deprecated - * With PocketBase v0.23.0 admins are converted to a regular auth - * collection named "_superusers", aka. you can use directly collection("_superusers"). - */ - get admins(): RecordService; - /** - * Creates a new batch handler for sending multiple transactional - * create/update/upsert/delete collection requests in one network call. - * - * Example: - * ```js - * const batch = pb.createBatch(); - * - * batch.collection("example1").create({ ... }) - * batch.collection("example2").update("RECORD_ID", { ... }) - * batch.collection("example3").delete("RECORD_ID") - * batch.collection("example4").upsert({ ... }) - * - * await batch.send() - * ``` - */ - /** - * Creates a new batch handler for sending multiple transactional - * create/update/upsert/delete collection requests in one network call. - * - * Example: - * ```js - * const batch = pb.createBatch(); - * - * batch.collection("example1").create({ ... }) - * batch.collection("example2").update("RECORD_ID", { ... }) - * batch.collection("example3").delete("RECORD_ID") - * batch.collection("example4").upsert({ ... }) - * - * await batch.send() - * ``` - */ - createBatch(): BatchService; - /** - * Returns the RecordService associated to the specified collection. - */ - /** - * Returns the RecordService associated to the specified collection. - */ - collection(idOrName: string): RecordService; - /** - * Globally enable or disable auto cancellation for pending duplicated requests. - */ - /** - * Globally enable or disable auto cancellation for pending duplicated requests. - */ - autoCancellation(enable: boolean): Client; - /** - * Cancels single request by its cancellation key. - */ - /** - * Cancels single request by its cancellation key. - */ - cancelRequest(requestKey: string): Client; - /** - * Cancels all pending requests. - */ - /** - * Cancels all pending requests. - */ - cancelAllRequests(): Client; - /** - * Constructs a filter expression with placeholders populated from a parameters object. - * - * Placeholder parameters are defined with the `{:paramName}` notation. - * - * The following parameter values are supported: - * - * - `string` (_single quotes are autoescaped_) - * - `number` - * - `boolean` - * - `Date` object (_stringified into the PocketBase datetime format_) - * - `null` - * - everything else is converted to a string using `JSON.stringify()` - * - * Example: - * - * ```js - * pb.collection("example").getFirstListItem(pb.filter( - * 'title ~ {:title} && created >= {:created}', - * { title: "example", created: new Date()} - * )) - * ``` - */ - /** - * Constructs a filter expression with placeholders populated from a parameters object. - * - * Placeholder parameters are defined with the `{:paramName}` notation. - * - * The following parameter values are supported: - * - * - `string` (_single quotes are autoescaped_) - * - `number` - * - `boolean` - * - `Date` object (_stringified into the PocketBase datetime format_) - * - `null` - * - everything else is converted to a string using `JSON.stringify()` - * - * Example: - * - * ```js - * pb.collection("example").getFirstListItem(pb.filter( - * 'title ~ {:title} && created >= {:created}', - * { title: "example", created: new Date()} - * )) - * ``` - */ - filter(raw: string, params?: { - [key: string]: any; - }): string; - /** - * @deprecated Please use `pb.files.getURL()`. - */ - /** - * @deprecated Please use `pb.files.getURL()`. - */ - getFileUrl(record: { - [key: string]: any; - }, filename: string, queryParams?: FileOptions): string; - /** - * @deprecated Please use `pb.buildURL()`. - */ - /** - * @deprecated Please use `pb.buildURL()`. - */ - buildUrl(path: string): string; - /** - * Builds a full client url by safely concatenating the provided path. - */ - /** - * Builds a full client url by safely concatenating the provided path. - */ - buildURL(path: string): string; - /** - * Sends an api http request. - * - * @throws {ClientResponseError} - */ - /** - * Sends an api http request. - * - * @throws {ClientResponseError} - */ - send(path: string, options: SendOptions): Promise; - /** - * Shallow copy the provided object and takes care to initialize - * any options required to preserve the backward compatability. - * - * @param {SendOptions} options - * @return {SendOptions} - */ - /** - * Shallow copy the provided object and takes care to initialize - * any options required to preserve the backward compatability. - * - * @param {SendOptions} options - * @return {SendOptions} - */ - private initSendOptions; - /** - * Extracts the header with the provided name in case-insensitive manner. - * Returns `null` if no header matching the name is found. - */ - /** - * Extracts the header with the provided name in case-insensitive manner. - * Returns `null` if no header matching the name is found. - */ - private getHeader; -} -export { BeforeSendResult, Client as default }; diff --git a/PBandGraphScaffold/node_modules/pocketbase/dist/pocketbase.umd.js b/PBandGraphScaffold/node_modules/pocketbase/dist/pocketbase.umd.js deleted file mode 100644 index c95b209..0000000 --- a/PBandGraphScaffold/node_modules/pocketbase/dist/pocketbase.umd.js +++ /dev/null @@ -1,2 +0,0 @@ -!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).PocketBase=t()}(this,(function(){"use strict";class ClientResponseError extends Error{constructor(e){super("ClientResponseError"),this.url="",this.status=0,this.response={},this.isAbort=!1,this.originalError=null,Object.setPrototypeOf(this,ClientResponseError.prototype),null!==e&&"object"==typeof e&&(this.url="string"==typeof e.url?e.url:"",this.status="number"==typeof e.status?e.status:0,this.isAbort=!!e.isAbort,this.originalError=e.originalError,null!==e.response&&"object"==typeof e.response?this.response=e.response:null!==e.data&&"object"==typeof e.data?this.response=e.data:this.response={}),this.originalError||e instanceof ClientResponseError||(this.originalError=e),"undefined"!=typeof DOMException&&e instanceof DOMException&&("AbortError"==e.name||20==e.code)&&(this.isAbort=!0),this.name="ClientResponseError "+this.status,this.message=this.response?.message,this.message||(this.isAbort?this.message="The request was autocancelled. You can find more info in https://github.com/pocketbase/js-sdk#auto-cancellation.":this.originalError?.cause?.message?.includes("ECONNREFUSED ::1")?this.message="Failed to connect to the PocketBase server. Try changing the SDK URL from localhost to 127.0.0.1 (https://github.com/pocketbase/js-sdk/issues/21).":this.message="Something went wrong."),this.cause=this.originalError}get data(){return this.response}toJSON(){return{...this}}}const e=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function cookieSerialize(t,s,i){const n=Object.assign({},i||{}),r=n.encode||defaultEncode;if(!e.test(t))throw new TypeError("argument name is invalid");const o=r(s);if(o&&!e.test(o))throw new TypeError("argument val is invalid");let a=t+"="+o;if(null!=n.maxAge){const e=n.maxAge-0;if(isNaN(e)||!isFinite(e))throw new TypeError("option maxAge is invalid");a+="; Max-Age="+Math.floor(e)}if(n.domain){if(!e.test(n.domain))throw new TypeError("option domain is invalid");a+="; Domain="+n.domain}if(n.path){if(!e.test(n.path))throw new TypeError("option path is invalid");a+="; Path="+n.path}if(n.expires){if(!function isDate(e){return"[object Date]"===Object.prototype.toString.call(e)||e instanceof Date}(n.expires)||isNaN(n.expires.valueOf()))throw new TypeError("option expires is invalid");a+="; Expires="+n.expires.toUTCString()}if(n.httpOnly&&(a+="; HttpOnly"),n.secure&&(a+="; Secure"),n.priority){switch("string"==typeof n.priority?n.priority.toLowerCase():n.priority){case"low":a+="; Priority=Low";break;case"medium":a+="; Priority=Medium";break;case"high":a+="; Priority=High";break;default:throw new TypeError("option priority is invalid")}}if(n.sameSite){switch("string"==typeof n.sameSite?n.sameSite.toLowerCase():n.sameSite){case!0:a+="; SameSite=Strict";break;case"lax":a+="; SameSite=Lax";break;case"strict":a+="; SameSite=Strict";break;case"none":a+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return a}function defaultDecode(e){return-1!==e.indexOf("%")?decodeURIComponent(e):e}function defaultEncode(e){return encodeURIComponent(e)}const t="undefined"!=typeof navigator&&"ReactNative"===navigator.product||"undefined"!=typeof global&&global.HermesInternal;let s;function getTokenPayload(e){if(e)try{const t=decodeURIComponent(s(e.split(".")[1]).split("").map((function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)})).join(""));return JSON.parse(t)||{}}catch(e){}return{}}function isTokenExpired(e,t=0){let s=getTokenPayload(e);return!(Object.keys(s).length>0&&(!s.exp||s.exp-t>Date.now()/1e3))}s="function"!=typeof atob||t?e=>{let t=String(e).replace(/=+$/,"");if(t.length%4==1)throw new Error("'atob' failed: The string to be decoded is not correctly encoded.");for(var s,i,n=0,r=0,o="";i=t.charAt(r++);~i&&(s=n%4?64*s+i:i,n++%4)?o+=String.fromCharCode(255&s>>(-2*n&6)):0)i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(i);return o}:atob;const i="pb_auth";class BaseAuthStore{constructor(){this.baseToken="",this.baseModel=null,this._onChangeCallbacks=[]}get token(){return this.baseToken}get record(){return this.baseModel}get model(){return this.baseModel}get isValid(){return!isTokenExpired(this.token)}get isSuperuser(){let e=getTokenPayload(this.token);return"auth"==e.type&&("_superusers"==this.record?.collectionName||!this.record?.collectionName&&"pbc_3142635823"==e.collectionId)}get isAdmin(){return console.warn("Please replace pb.authStore.isAdmin with pb.authStore.isSuperuser OR simply check the value of pb.authStore.record?.collectionName"),this.isSuperuser}get isAuthRecord(){return console.warn("Please replace pb.authStore.isAuthRecord with !pb.authStore.isSuperuser OR simply check the value of pb.authStore.record?.collectionName"),"auth"==getTokenPayload(this.token).type&&!this.isSuperuser}save(e,t){this.baseToken=e||"",this.baseModel=t||null,this.triggerChange()}clear(){this.baseToken="",this.baseModel=null,this.triggerChange()}loadFromCookie(e,t=i){const s=function cookieParse(e,t){const s={};if("string"!=typeof e)return s;const i=Object.assign({},{}).decode||defaultDecode;let n=0;for(;n4096){r.record={id:r.record?.id,email:r.record?.email};const s=["collectionId","collectionName","verified"];for(const e in this.record)s.includes(e)&&(r.record[e]=this.record[e]);o=cookieSerialize(t,JSON.stringify(r),e)}return o}onChange(e,t=!1){return this._onChangeCallbacks.push(e),t&&e(this.token,this.record),()=>{for(let t=this._onChangeCallbacks.length-1;t>=0;t--)if(this._onChangeCallbacks[t]==e)return delete this._onChangeCallbacks[t],void this._onChangeCallbacks.splice(t,1)}}triggerChange(){for(const e of this._onChangeCallbacks)e&&e(this.token,this.record)}}class LocalAuthStore extends BaseAuthStore{constructor(e="pocketbase_auth"){super(),this.storageFallback={},this.storageKey=e,this._bindStorageEvent()}get token(){return(this._storageGet(this.storageKey)||{}).token||""}get record(){const e=this._storageGet(this.storageKey)||{};return e.record||e.model||null}get model(){return this.record}save(e,t){this._storageSet(this.storageKey,{token:e,record:t}),super.save(e,t)}clear(){this._storageRemove(this.storageKey),super.clear()}_storageGet(e){if("undefined"!=typeof window&&window?.localStorage){const t=window.localStorage.getItem(e)||"";try{return JSON.parse(t)}catch(e){return t}}return this.storageFallback[e]}_storageSet(e,t){if("undefined"!=typeof window&&window?.localStorage){let s=t;"string"!=typeof t&&(s=JSON.stringify(t)),window.localStorage.setItem(e,s)}else this.storageFallback[e]=t}_storageRemove(e){"undefined"!=typeof window&&window?.localStorage&&window.localStorage?.removeItem(e),delete this.storageFallback[e]}_bindStorageEvent(){"undefined"!=typeof window&&window?.localStorage&&window.addEventListener&&window.addEventListener("storage",(e=>{if(e.key!=this.storageKey)return;const t=this._storageGet(this.storageKey)||{};super.save(t.token||"",t.record||t.model||null)}))}}class BaseService{constructor(e){this.client=e}}class SettingsService extends BaseService{async getAll(e){return e=Object.assign({method:"GET"},e),this.client.send("/api/settings",e)}async update(e,t){return t=Object.assign({method:"PATCH",body:e},t),this.client.send("/api/settings",t)}async testS3(e="storage",t){return t=Object.assign({method:"POST",body:{filesystem:e}},t),this.client.send("/api/settings/test/s3",t).then((()=>!0))}async testEmail(e,t,s,i){return i=Object.assign({method:"POST",body:{email:t,template:s,collection:e}},i),this.client.send("/api/settings/test/email",i).then((()=>!0))}async generateAppleClientSecret(e,t,s,i,n,r){return r=Object.assign({method:"POST",body:{clientId:e,teamId:t,keyId:s,privateKey:i,duration:n}},r),this.client.send("/api/settings/apple/generate-client-secret",r)}}const n=["requestKey","$cancelKey","$autoCancel","fetch","headers","body","query","params","cache","credentials","headers","integrity","keepalive","method","mode","redirect","referrer","referrerPolicy","signal","window"];function normalizeUnknownQueryParams(e){if(e){e.query=e.query||{};for(let t in e)n.includes(t)||(e.query[t]=e[t],delete e[t])}}function serializeQueryParams(e){const t=[];for(const s in e){const i=encodeURIComponent(s),n=Array.isArray(e[s])?e[s]:[e[s]];for(let e of n)e=prepareQueryParamValue(e),null!==e&&t.push(i+"="+e)}return t.join("&")}function prepareQueryParamValue(e){return null==e?null:e instanceof Date?encodeURIComponent(e.toISOString().replace("T"," ")):"object"==typeof e?encodeURIComponent(JSON.stringify(e)):encodeURIComponent(e)}class RealtimeService extends BaseService{constructor(){super(...arguments),this.clientId="",this.eventSource=null,this.subscriptions={},this.lastSentSubscriptions=[],this.maxConnectTimeout=15e3,this.reconnectAttempts=0,this.maxReconnectAttempts=1/0,this.predefinedReconnectIntervals=[200,300,500,1e3,1200,1500,2e3],this.pendingConnects=[]}get isConnected(){return!!this.eventSource&&!!this.clientId&&!this.pendingConnects.length}async subscribe(e,t,s){if(!e)throw new Error("topic must be set.");let i=e;if(s){normalizeUnknownQueryParams(s=Object.assign({},s));const e="options="+encodeURIComponent(JSON.stringify({query:s.query,headers:s.headers}));i+=(i.includes("?")?"&":"?")+e}const listener=function(e){const s=e;let i;try{i=JSON.parse(s?.data)}catch{}t(i||{})};return this.subscriptions[i]||(this.subscriptions[i]=[]),this.subscriptions[i].push(listener),this.isConnected?1===this.subscriptions[i].length?await this.submitSubscriptions():this.eventSource?.addEventListener(i,listener):await this.connect(),async()=>this.unsubscribeByTopicAndListener(e,listener)}async unsubscribe(e){let t=!1;if(e){const s=this.getSubscriptionsByTopic(e);for(let e in s)if(this.hasSubscriptionListeners(e)){for(let t of this.subscriptions[e])this.eventSource?.removeEventListener(e,t);delete this.subscriptions[e],t||(t=!0)}}else this.subscriptions={};this.hasSubscriptionListeners()?t&&await this.submitSubscriptions():this.disconnect()}async unsubscribeByPrefix(e){let t=!1;for(let s in this.subscriptions)if((s+"?").startsWith(e)){t=!0;for(let e of this.subscriptions[s])this.eventSource?.removeEventListener(s,e);delete this.subscriptions[s]}t&&(this.hasSubscriptionListeners()?await this.submitSubscriptions():this.disconnect())}async unsubscribeByTopicAndListener(e,t){let s=!1;const i=this.getSubscriptionsByTopic(e);for(let e in i){if(!Array.isArray(this.subscriptions[e])||!this.subscriptions[e].length)continue;let i=!1;for(let s=this.subscriptions[e].length-1;s>=0;s--)this.subscriptions[e][s]===t&&(i=!0,delete this.subscriptions[e][s],this.subscriptions[e].splice(s,1),this.eventSource?.removeEventListener(e,t));i&&(this.subscriptions[e].length||delete this.subscriptions[e],s||this.hasSubscriptionListeners(e)||(s=!0))}this.hasSubscriptionListeners()?s&&await this.submitSubscriptions():this.disconnect()}hasSubscriptionListeners(e){if(this.subscriptions=this.subscriptions||{},e)return!!this.subscriptions[e]?.length;for(let e in this.subscriptions)if(this.subscriptions[e]?.length)return!0;return!1}async submitSubscriptions(){if(this.clientId)return this.addAllSubscriptionListeners(),this.lastSentSubscriptions=this.getNonEmptySubscriptionKeys(),this.client.send("/api/realtime",{method:"POST",body:{clientId:this.clientId,subscriptions:this.lastSentSubscriptions},requestKey:this.getSubscriptionsCancelKey()}).catch((e=>{if(!e?.isAbort)throw e}))}getSubscriptionsCancelKey(){return"realtime_"+this.clientId}getSubscriptionsByTopic(e){const t={};e=e.includes("?")?e:e+"?";for(let s in this.subscriptions)(s+"?").startsWith(e)&&(t[s]=this.subscriptions[s]);return t}getNonEmptySubscriptionKeys(){const e=[];for(let t in this.subscriptions)this.subscriptions[t].length&&e.push(t);return e}addAllSubscriptionListeners(){if(this.eventSource){this.removeAllSubscriptionListeners();for(let e in this.subscriptions)for(let t of this.subscriptions[e])this.eventSource.addEventListener(e,t)}}removeAllSubscriptionListeners(){if(this.eventSource)for(let e in this.subscriptions)for(let t of this.subscriptions[e])this.eventSource.removeEventListener(e,t)}async connect(){if(!(this.reconnectAttempts>0))return new Promise(((e,t)=>{this.pendingConnects.push({resolve:e,reject:t}),this.pendingConnects.length>1||this.initConnect()}))}initConnect(){this.disconnect(!0),clearTimeout(this.connectTimeoutId),this.connectTimeoutId=setTimeout((()=>{this.connectErrorHandler(new Error("EventSource connect took too long."))}),this.maxConnectTimeout),this.eventSource=new EventSource(this.client.buildURL("/api/realtime")),this.eventSource.onerror=e=>{this.connectErrorHandler(new Error("Failed to establish realtime connection."))},this.eventSource.addEventListener("PB_CONNECT",(e=>{const t=e;this.clientId=t?.lastEventId,this.submitSubscriptions().then((async()=>{let e=3;for(;this.hasUnsentSubscriptions()&&e>0;)e--,await this.submitSubscriptions()})).then((()=>{for(let e of this.pendingConnects)e.resolve();this.pendingConnects=[],this.reconnectAttempts=0,clearTimeout(this.reconnectTimeoutId),clearTimeout(this.connectTimeoutId);const t=this.getSubscriptionsByTopic("PB_CONNECT");for(let s in t)for(let i of t[s])i(e)})).catch((e=>{this.clientId="",this.connectErrorHandler(e)}))}))}hasUnsentSubscriptions(){const e=this.getNonEmptySubscriptionKeys();if(e.length!=this.lastSentSubscriptions.length)return!0;for(const t of e)if(!this.lastSentSubscriptions.includes(t))return!0;return!1}connectErrorHandler(e){if(clearTimeout(this.connectTimeoutId),clearTimeout(this.reconnectTimeoutId),!this.clientId&&!this.reconnectAttempts||this.reconnectAttempts>this.maxReconnectAttempts){for(let t of this.pendingConnects)t.reject(new ClientResponseError(e));return this.pendingConnects=[],void this.disconnect()}this.disconnect(!0);const t=this.predefinedReconnectIntervals[this.reconnectAttempts]||this.predefinedReconnectIntervals[this.predefinedReconnectIntervals.length-1];this.reconnectAttempts++,this.reconnectTimeoutId=setTimeout((()=>{this.initConnect()}),t)}disconnect(e=!1){if(this.clientId&&this.onDisconnect&&this.onDisconnect(Object.keys(this.subscriptions)),clearTimeout(this.connectTimeoutId),clearTimeout(this.reconnectTimeoutId),this.removeAllSubscriptionListeners(),this.client.cancelRequest(this.getSubscriptionsCancelKey()),this.eventSource?.close(),this.eventSource=null,this.clientId="",!e){this.reconnectAttempts=0;for(let e of this.pendingConnects)e.resolve();this.pendingConnects=[]}}}class CrudService extends BaseService{decode(e){return e}async getFullList(e,t){if("number"==typeof e)return this._getFullList(e,t);let s=500;return(t=Object.assign({},e,t)).batch&&(s=t.batch,delete t.batch),this._getFullList(s,t)}async getList(e=1,t=30,s){return(s=Object.assign({method:"GET"},s)).query=Object.assign({page:e,perPage:t},s.query),this.client.send(this.baseCrudPath,s).then((e=>(e.items=e.items?.map((e=>this.decode(e)))||[],e)))}async getFirstListItem(e,t){return(t=Object.assign({requestKey:"one_by_filter_"+this.baseCrudPath+"_"+e},t)).query=Object.assign({filter:e,skipTotal:1},t.query),this.getList(1,1,t).then((e=>{if(!e?.items?.length)throw new ClientResponseError({status:404,response:{code:404,message:"The requested resource wasn't found.",data:{}}});return e.items[0]}))}async getOne(e,t){if(!e)throw new ClientResponseError({url:this.client.buildURL(this.baseCrudPath+"/"),status:404,response:{code:404,message:"Missing required record id.",data:{}}});return t=Object.assign({method:"GET"},t),this.client.send(this.baseCrudPath+"/"+encodeURIComponent(e),t).then((e=>this.decode(e)))}async create(e,t){return t=Object.assign({method:"POST",body:e},t),this.client.send(this.baseCrudPath,t).then((e=>this.decode(e)))}async update(e,t,s){return s=Object.assign({method:"PATCH",body:t},s),this.client.send(this.baseCrudPath+"/"+encodeURIComponent(e),s).then((e=>this.decode(e)))}async delete(e,t){return t=Object.assign({method:"DELETE"},t),this.client.send(this.baseCrudPath+"/"+encodeURIComponent(e),t).then((()=>!0))}_getFullList(e=500,t){(t=t||{}).query=Object.assign({skipTotal:1},t.query);let s=[],request=async i=>this.getList(i,e||500,t).then((e=>{const t=e.items;return s=s.concat(t),t.length==e.perPage?request(i+1):s}));return request(1)}}function normalizeLegacyOptionsArgs(e,t,s,i){const n=void 0!==i;return n||void 0!==s?n?(console.warn(e),t.body=Object.assign({},t.body,s),t.query=Object.assign({},t.query,i),t):Object.assign(t,s):t}function resetAutoRefresh(e){e._resetAutoRefresh?.()}class RecordService extends CrudService{constructor(e,t){super(e),this.collectionIdOrName=t}get baseCrudPath(){return this.baseCollectionPath+"/records"}get baseCollectionPath(){return"/api/collections/"+encodeURIComponent(this.collectionIdOrName)}get isSuperusers(){return"_superusers"==this.collectionIdOrName||"_pbc_2773867675"==this.collectionIdOrName}async subscribe(e,t,s){if(!e)throw new Error("Missing topic.");if(!t)throw new Error("Missing subscription callback.");return this.client.realtime.subscribe(this.collectionIdOrName+"/"+e,t,s)}async unsubscribe(e){return e?this.client.realtime.unsubscribe(this.collectionIdOrName+"/"+e):this.client.realtime.unsubscribeByPrefix(this.collectionIdOrName)}async getFullList(e,t){if("number"==typeof e)return super.getFullList(e,t);const s=Object.assign({},e,t);return super.getFullList(s)}async getList(e=1,t=30,s){return super.getList(e,t,s)}async getFirstListItem(e,t){return super.getFirstListItem(e,t)}async getOne(e,t){return super.getOne(e,t)}async create(e,t){return super.create(e,t)}async update(e,t,s){return super.update(e,t,s).then((e=>{if(this.client.authStore.record?.id===e?.id&&(this.client.authStore.record?.collectionId===this.collectionIdOrName||this.client.authStore.record?.collectionName===this.collectionIdOrName)){let t=Object.assign({},this.client.authStore.record.expand),s=Object.assign({},this.client.authStore.record,e);t&&(s.expand=Object.assign(t,e.expand)),this.client.authStore.save(this.client.authStore.token,s)}return e}))}async delete(e,t){return super.delete(e,t).then((t=>(!t||this.client.authStore.record?.id!==e||this.client.authStore.record?.collectionId!==this.collectionIdOrName&&this.client.authStore.record?.collectionName!==this.collectionIdOrName||this.client.authStore.clear(),t)))}authResponse(e){const t=this.decode(e?.record||{});return this.client.authStore.save(e?.token,t),Object.assign({},e,{token:e?.token||"",record:t})}async listAuthMethods(e){return e=Object.assign({method:"GET",fields:"mfa,otp,password,oauth2"},e),this.client.send(this.baseCollectionPath+"/auth-methods",e)}async authWithPassword(e,t,s){let i;s=Object.assign({method:"POST",body:{identity:e,password:t}},s),this.isSuperusers&&(i=s.autoRefreshThreshold,delete s.autoRefreshThreshold,s.autoRefresh||resetAutoRefresh(this.client));let n=await this.client.send(this.baseCollectionPath+"/auth-with-password",s);return n=this.authResponse(n),i&&this.isSuperusers&&function registerAutoRefresh(e,t,s,i){resetAutoRefresh(e);const n=e.beforeSend,r=e.authStore.record,o=e.authStore.onChange(((t,s)=>{(!t||s?.id!=r?.id||(s?.collectionId||r?.collectionId)&&s?.collectionId!=r?.collectionId)&&resetAutoRefresh(e)}));e._resetAutoRefresh=function(){o(),e.beforeSend=n,delete e._resetAutoRefresh},e.beforeSend=async(r,o)=>{const a=e.authStore.token;if(o.query?.autoRefresh)return n?n(r,o):{url:r,sendOptions:o};let c=e.authStore.isValid;if(c&&isTokenExpired(e.authStore.token,t))try{await s()}catch(e){c=!1}c||await i();const l=o.headers||{};for(let t in l)if("authorization"==t.toLowerCase()&&a==l[t]&&e.authStore.token){l[t]=e.authStore.token;break}return o.headers=l,n?n(r,o):{url:r,sendOptions:o}}}(this.client,i,(()=>this.authRefresh({autoRefresh:!0})),(()=>this.authWithPassword(e,t,Object.assign({autoRefresh:!0},s)))),n}async authWithOAuth2Code(e,t,s,i,n,r,o){let a={method:"POST",body:{provider:e,code:t,codeVerifier:s,redirectURL:i,createData:n}};return a=normalizeLegacyOptionsArgs("This form of authWithOAuth2Code(provider, code, codeVerifier, redirectURL, createData?, body?, query?) is deprecated. Consider replacing it with authWithOAuth2Code(provider, code, codeVerifier, redirectURL, createData?, options?).",a,r,o),this.client.send(this.baseCollectionPath+"/auth-with-oauth2",a).then((e=>this.authResponse(e)))}authWithOAuth2(...e){if(e.length>1||"string"==typeof e?.[0])return console.warn("PocketBase: This form of authWithOAuth2() is deprecated and may get removed in the future. Please replace with authWithOAuth2Code() OR use the authWithOAuth2() realtime form as shown in https://pocketbase.io/docs/authentication/#oauth2-integration."),this.authWithOAuth2Code(e?.[0]||"",e?.[1]||"",e?.[2]||"",e?.[3]||"",e?.[4]||{},e?.[5]||{},e?.[6]||{});const t=e?.[0]||{};let s=null;t.urlCallback||(s=openBrowserPopup(void 0));const i=new RealtimeService(this.client);function cleanup(){s?.close(),i.unsubscribe()}const n={},r=t.requestKey;return r&&(n.requestKey=r),this.listAuthMethods(n).then((e=>{const n=e.oauth2.providers.find((e=>e.name===t.provider));if(!n)throw new ClientResponseError(new Error(`Missing or invalid provider "${t.provider}".`));const o=this.client.buildURL("/api/oauth2-redirect"),a=r?this.client.cancelControllers?.[r]:void 0;return a&&(a.signal.onabort=()=>{cleanup()}),new Promise((async(e,r)=>{try{await i.subscribe("@oauth2",(async s=>{const c=i.clientId;try{if(!s.state||c!==s.state)throw new Error("State parameters don't match.");if(s.error||!s.code)throw new Error("OAuth2 redirect error or missing code: "+s.error);const i=Object.assign({},t);delete i.provider,delete i.scopes,delete i.createData,delete i.urlCallback,a?.signal?.onabort&&(a.signal.onabort=null);const r=await this.authWithOAuth2Code(n.name,s.code,n.codeVerifier,o,t.createData,i);e(r)}catch(e){r(new ClientResponseError(e))}cleanup()}));const c={state:i.clientId};t.scopes?.length&&(c.scope=t.scopes.join(" "));const l=this._replaceQueryParams(n.authURL+o,c);let h=t.urlCallback||function(e){s?s.location.href=e:s=openBrowserPopup(e)};await h(l)}catch(e){cleanup(),r(new ClientResponseError(e))}}))})).catch((e=>{throw cleanup(),e}))}async authRefresh(e,t){let s={method:"POST"};return s=normalizeLegacyOptionsArgs("This form of authRefresh(body?, query?) is deprecated. Consider replacing it with authRefresh(options?).",s,e,t),this.client.send(this.baseCollectionPath+"/auth-refresh",s).then((e=>this.authResponse(e)))}async requestPasswordReset(e,t,s){let i={method:"POST",body:{email:e}};return i=normalizeLegacyOptionsArgs("This form of requestPasswordReset(email, body?, query?) is deprecated. Consider replacing it with requestPasswordReset(email, options?).",i,t,s),this.client.send(this.baseCollectionPath+"/request-password-reset",i).then((()=>!0))}async confirmPasswordReset(e,t,s,i,n){let r={method:"POST",body:{token:e,password:t,passwordConfirm:s}};return r=normalizeLegacyOptionsArgs("This form of confirmPasswordReset(token, password, passwordConfirm, body?, query?) is deprecated. Consider replacing it with confirmPasswordReset(token, password, passwordConfirm, options?).",r,i,n),this.client.send(this.baseCollectionPath+"/confirm-password-reset",r).then((()=>!0))}async requestVerification(e,t,s){let i={method:"POST",body:{email:e}};return i=normalizeLegacyOptionsArgs("This form of requestVerification(email, body?, query?) is deprecated. Consider replacing it with requestVerification(email, options?).",i,t,s),this.client.send(this.baseCollectionPath+"/request-verification",i).then((()=>!0))}async confirmVerification(e,t,s){let i={method:"POST",body:{token:e}};return i=normalizeLegacyOptionsArgs("This form of confirmVerification(token, body?, query?) is deprecated. Consider replacing it with confirmVerification(token, options?).",i,t,s),this.client.send(this.baseCollectionPath+"/confirm-verification",i).then((()=>{const t=getTokenPayload(e),s=this.client.authStore.record;return s&&!s.verified&&s.id===t.id&&s.collectionId===t.collectionId&&(s.verified=!0,this.client.authStore.save(this.client.authStore.token,s)),!0}))}async requestEmailChange(e,t,s){let i={method:"POST",body:{newEmail:e}};return i=normalizeLegacyOptionsArgs("This form of requestEmailChange(newEmail, body?, query?) is deprecated. Consider replacing it with requestEmailChange(newEmail, options?).",i,t,s),this.client.send(this.baseCollectionPath+"/request-email-change",i).then((()=>!0))}async confirmEmailChange(e,t,s,i){let n={method:"POST",body:{token:e,password:t}};return n=normalizeLegacyOptionsArgs("This form of confirmEmailChange(token, password, body?, query?) is deprecated. Consider replacing it with confirmEmailChange(token, password, options?).",n,s,i),this.client.send(this.baseCollectionPath+"/confirm-email-change",n).then((()=>{const t=getTokenPayload(e),s=this.client.authStore.record;return s&&s.id===t.id&&s.collectionId===t.collectionId&&this.client.authStore.clear(),!0}))}async listExternalAuths(e,t){return this.client.collection("_externalAuths").getFullList(Object.assign({},t,{filter:this.client.filter("recordRef = {:id}",{id:e})}))}async unlinkExternalAuth(e,t,s){const i=await this.client.collection("_externalAuths").getFirstListItem(this.client.filter("recordRef = {:recordId} && provider = {:provider}",{recordId:e,provider:t}));return this.client.collection("_externalAuths").delete(i.id,s).then((()=>!0))}async requestOTP(e,t){return t=Object.assign({method:"POST",body:{email:e}},t),this.client.send(this.baseCollectionPath+"/request-otp",t)}async authWithOTP(e,t,s){return s=Object.assign({method:"POST",body:{otpId:e,password:t}},s),this.client.send(this.baseCollectionPath+"/auth-with-otp",s).then((e=>this.authResponse(e)))}async impersonate(e,t,s){(s=Object.assign({method:"POST",body:{duration:t}},s)).headers=s.headers||{},s.headers.Authorization||(s.headers.Authorization=this.client.authStore.token);const i=new Client(this.client.baseURL,new BaseAuthStore,this.client.lang),n=await i.send(this.baseCollectionPath+"/impersonate/"+encodeURIComponent(e),s);return i.authStore.save(n?.token,this.decode(n?.record||{})),i}_replaceQueryParams(e,t={}){let s=e,i="";e.indexOf("?")>=0&&(s=e.substring(0,e.indexOf("?")),i=e.substring(e.indexOf("?")+1));const n={},r=i.split("&");for(const e of r){if(""==e)continue;const t=e.split("=");n[decodeURIComponent(t[0].replace(/\+/g," "))]=decodeURIComponent((t[1]||"").replace(/\+/g," "))}for(let e in t)t.hasOwnProperty(e)&&(null==t[e]?delete n[e]:n[e]=t[e]);i="";for(let e in n)n.hasOwnProperty(e)&&(""!=i&&(i+="&"),i+=encodeURIComponent(e.replace(/%20/g,"+"))+"="+encodeURIComponent(n[e].replace(/%20/g,"+")));return""!=i?s+"?"+i:s}}function openBrowserPopup(e){if("undefined"==typeof window||!window?.open)throw new ClientResponseError(new Error("Not in a browser context - please pass a custom urlCallback function."));let t=1024,s=768,i=window.innerWidth,n=window.innerHeight;t=t>i?i:t,s=s>n?n:s;let r=i/2-t/2,o=n/2-s/2;return window.open(e,"popup_window","width="+t+",height="+s+",top="+o+",left="+r+",resizable,menubar=no")}class CollectionService extends CrudService{get baseCrudPath(){return"/api/collections"}async import(e,t=!1,s){return s=Object.assign({method:"PUT",body:{collections:e,deleteMissing:t}},s),this.client.send(this.baseCrudPath+"/import",s).then((()=>!0))}async getScaffolds(e){return e=Object.assign({method:"GET"},e),this.client.send(this.baseCrudPath+"/meta/scaffolds",e)}async truncate(e,t){return t=Object.assign({method:"DELETE"},t),this.client.send(this.baseCrudPath+"/"+encodeURIComponent(e)+"/truncate",t).then((()=>!0))}}class LogService extends BaseService{async getList(e=1,t=30,s){return(s=Object.assign({method:"GET"},s)).query=Object.assign({page:e,perPage:t},s.query),this.client.send("/api/logs",s)}async getOne(e,t){if(!e)throw new ClientResponseError({url:this.client.buildURL("/api/logs/"),status:404,response:{code:404,message:"Missing required log id.",data:{}}});return t=Object.assign({method:"GET"},t),this.client.send("/api/logs/"+encodeURIComponent(e),t)}async getStats(e){return e=Object.assign({method:"GET"},e),this.client.send("/api/logs/stats",e)}}class HealthService extends BaseService{async check(e){return e=Object.assign({method:"GET"},e),this.client.send("/api/health",e)}}class FileService extends BaseService{getUrl(e,t,s={}){return console.warn("Please replace pb.files.getUrl() with pb.files.getURL()"),this.getURL(e,t,s)}getURL(e,t,s={}){if(!t||!e?.id||!e?.collectionId&&!e?.collectionName)return"";const i=[];i.push("api"),i.push("files"),i.push(encodeURIComponent(e.collectionId||e.collectionName)),i.push(encodeURIComponent(e.id)),i.push(encodeURIComponent(t));let n=this.client.buildURL(i.join("/"));if(Object.keys(s).length){!1===s.download&&delete s.download;const e=new URLSearchParams(s);n+=(n.includes("?")?"&":"?")+e}return n}async getToken(e){return e=Object.assign({method:"POST"},e),this.client.send("/api/files/token",e).then((e=>e?.token||""))}}class BackupService extends BaseService{async getFullList(e){return e=Object.assign({method:"GET"},e),this.client.send("/api/backups",e)}async create(e,t){return t=Object.assign({method:"POST",body:{name:e}},t),this.client.send("/api/backups",t).then((()=>!0))}async upload(e,t){return t=Object.assign({method:"POST",body:e},t),this.client.send("/api/backups/upload",t).then((()=>!0))}async delete(e,t){return t=Object.assign({method:"DELETE"},t),this.client.send(`/api/backups/${encodeURIComponent(e)}`,t).then((()=>!0))}async restore(e,t){return t=Object.assign({method:"POST"},t),this.client.send(`/api/backups/${encodeURIComponent(e)}/restore`,t).then((()=>!0))}getDownloadUrl(e,t){return console.warn("Please replace pb.backups.getDownloadUrl() with pb.backups.getDownloadURL()"),this.getDownloadURL(e,t)}getDownloadURL(e,t){return this.client.buildURL(`/api/backups/${encodeURIComponent(t)}?token=${encodeURIComponent(e)}`)}}class CronService extends BaseService{async getFullList(e){return e=Object.assign({method:"GET"},e),this.client.send("/api/crons",e)}async run(e,t){return t=Object.assign({method:"POST"},t),this.client.send(`/api/crons/${encodeURIComponent(e)}`,t).then((()=>!0))}}function isFile(e){return"undefined"!=typeof Blob&&e instanceof Blob||"undefined"!=typeof File&&e instanceof File||null!==e&&"object"==typeof e&&e.uri&&("undefined"!=typeof navigator&&"ReactNative"===navigator.product||"undefined"!=typeof global&&global.HermesInternal)}function isFormData(e){return e&&("FormData"===e.constructor?.name||"undefined"!=typeof FormData&&e instanceof FormData)}function hasFileField(e){for(const t in e){const s=Array.isArray(e[t])?e[t]:[e[t]];for(const e of s)if(isFile(e))return!0}return!1}const r=/^[\-\.\d]+$/;function inferFormDataValue(e){if("string"!=typeof e)return e;if("true"==e)return!0;if("false"==e)return!1;if(("-"===e[0]||e[0]>="0"&&e[0]<="9")&&r.test(e)){let t=+e;if(""+t===e)return t}return e}class BatchService extends BaseService{constructor(){super(...arguments),this.requests=[],this.subs={}}collection(e){return this.subs[e]||(this.subs[e]=new SubBatchService(this.requests,e)),this.subs[e]}async send(e){const t=new FormData,s=[];for(let e=0;e{if("@jsonPayload"===s&&"string"==typeof e)try{let s=JSON.parse(e);Object.assign(t,s)}catch(e){console.warn("@jsonPayload error:",e)}else void 0!==t[s]?(Array.isArray(t[s])||(t[s]=[t[s]]),t[s].push(inferFormDataValue(e))):t[s]=inferFormDataValue(e)})),t}(s));for(const t in s){const i=s[t];if(isFile(i))e.files[t]=e.files[t]||[],e.files[t].push(i);else if(Array.isArray(i)){const s=[],n=[];for(const e of i)isFile(e)?s.push(e):n.push(e);if(s.length>0&&s.length==i.length){e.files[t]=e.files[t]||[];for(let i of s)e.files[t].push(i)}else if(e.json[t]=n,s.length>0){let i=t;t.startsWith("+")||t.endsWith("+")||(i+="+"),e.files[i]=e.files[i]||[];for(let t of s)e.files[i].push(t)}}else e.json[t]=i}}}class Client{get baseUrl(){return this.baseURL}set baseUrl(e){this.baseURL=e}constructor(e="/",t,s="en-US"){this.cancelControllers={},this.recordServices={},this.enableAutoCancellation=!0,this.baseURL=e,this.lang=s,t?this.authStore=t:"undefined"!=typeof window&&window.Deno?this.authStore=new BaseAuthStore:this.authStore=new LocalAuthStore,this.collections=new CollectionService(this),this.files=new FileService(this),this.logs=new LogService(this),this.settings=new SettingsService(this),this.realtime=new RealtimeService(this),this.health=new HealthService(this),this.backups=new BackupService(this),this.crons=new CronService(this)}get admins(){return this.collection("_superusers")}createBatch(){return new BatchService(this)}collection(e){return this.recordServices[e]||(this.recordServices[e]=new RecordService(this,e)),this.recordServices[e]}autoCancellation(e){return this.enableAutoCancellation=!!e,this}cancelRequest(e){return this.cancelControllers[e]&&(this.cancelControllers[e].abort(),delete this.cancelControllers[e]),this}cancelAllRequests(){for(let e in this.cancelControllers)this.cancelControllers[e].abort();return this.cancelControllers={},this}filter(e,t){if(!t)return e;for(let s in t){let i=t[s];switch(typeof i){case"boolean":case"number":i=""+i;break;case"string":i="'"+i.replace(/'/g,"\\'")+"'";break;default:i=null===i?"null":i instanceof Date?"'"+i.toISOString().replace("T"," ")+"'":"'"+JSON.stringify(i).replace(/'/g,"\\'")+"'"}e=e.replaceAll("{:"+s+"}",i)}return e}getFileUrl(e,t,s={}){return console.warn("Please replace pb.getFileUrl() with pb.files.getURL()"),this.files.getURL(e,t,s)}buildUrl(e){return console.warn("Please replace pb.buildUrl() with pb.buildURL()"),this.buildURL(e)}buildURL(e){let t=this.baseURL;return"undefined"==typeof window||!window.location||t.startsWith("https://")||t.startsWith("http://")||(t=window.location.origin?.endsWith("/")?window.location.origin.substring(0,window.location.origin.length-1):window.location.origin||"",this.baseURL.startsWith("/")||(t+=window.location.pathname||"/",t+=t.endsWith("/")?"":"/"),t+=this.baseURL),e&&(t+=t.endsWith("/")?"":"/",t+=e.startsWith("/")?e.substring(1):e),t}async send(e,t){t=this.initSendOptions(e,t);let s=this.buildURL(e);if(this.beforeSend){const e=Object.assign({},await this.beforeSend(s,t));void 0!==e.url||void 0!==e.options?(s=e.url||s,t=e.options||t):Object.keys(e).length&&(t=e,console?.warn&&console.warn("Deprecated format of beforeSend return: please use `return { url, options }`, instead of `return options`."))}if(void 0!==t.query){const e=serializeQueryParams(t.query);e&&(s+=(s.includes("?")?"&":"?")+e),delete t.query}"application/json"==this.getHeader(t.headers,"Content-Type")&&t.body&&"string"!=typeof t.body&&(t.body=JSON.stringify(t.body));return(t.fetch||fetch)(s,t).then((async e=>{let s={};try{s=await e.json()}catch(e){if(t.signal?.aborted||"undefined"!=typeof DOMException&&e instanceof DOMException&&("AbortError"==e.name||20==e.code))throw e}if(this.afterSend&&(s=await this.afterSend(e,s,t)),e.status>=400)throw new ClientResponseError({url:e.url,status:e.status,data:s});return s})).catch((e=>{throw new ClientResponseError(e)}))}initSendOptions(e,t){if((t=Object.assign({method:"GET"},t)).body=function convertToFormDataIfNeeded(e){if("undefined"==typeof FormData||void 0===e||"object"!=typeof e||null===e||isFormData(e)||!hasFileField(e))return e;const t=new FormData;for(const s in e){const i=e[s];if(void 0!==i)if("object"!=typeof i||hasFileField({data:i})){const e=Array.isArray(i)?i:[i];for(let i of e)t.append(s,i)}else{let e={};e[s]=i,t.append("@jsonPayload",JSON.stringify(e))}}return t}(t.body),normalizeUnknownQueryParams(t),t.query=Object.assign({},t.params,t.query),void 0===t.requestKey&&(!1===t.$autoCancel||!1===t.query.$autoCancel?t.requestKey=null:(t.$cancelKey||t.query.$cancelKey)&&(t.requestKey=t.$cancelKey||t.query.$cancelKey)),delete t.$autoCancel,delete t.query.$autoCancel,delete t.$cancelKey,delete t.query.$cancelKey,null!==this.getHeader(t.headers,"Content-Type")||isFormData(t.body)||(t.headers=Object.assign({},t.headers,{"Content-Type":"application/json"})),null===this.getHeader(t.headers,"Accept-Language")&&(t.headers=Object.assign({},t.headers,{"Accept-Language":this.lang})),this.authStore.token&&null===this.getHeader(t.headers,"Authorization")&&(t.headers=Object.assign({},t.headers,{Authorization:this.authStore.token})),this.enableAutoCancellation&&null!==t.requestKey){const s=t.requestKey||(t.method||"GET")+e;delete t.requestKey,this.cancelRequest(s);const i=new AbortController;this.cancelControllers[s]=i,t.signal=i.signal}return t}getHeader(e,t){e=e||{},t=t.toLowerCase();for(let s in e)if(s.toLowerCase()==t)return e[s];return null}}return Client})); -//# sourceMappingURL=pocketbase.umd.js.map diff --git a/PBandGraphScaffold/node_modules/pocketbase/dist/pocketbase.umd.js.map b/PBandGraphScaffold/node_modules/pocketbase/dist/pocketbase.umd.js.map deleted file mode 100644 index 15114be..0000000 --- a/PBandGraphScaffold/node_modules/pocketbase/dist/pocketbase.umd.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"pocketbase.umd.js","sources":["../src/ClientResponseError.ts","../src/tools/cookie.ts","../src/tools/jwt.ts","../src/stores/BaseAuthStore.ts","../src/stores/LocalAuthStore.ts","../src/services/BaseService.ts","../src/services/SettingsService.ts","../src/tools/options.ts","../src/services/RealtimeService.ts","../src/services/CrudService.ts","../src/tools/legacy.ts","../src/tools/refresh.ts","../src/services/RecordService.ts","../src/services/CollectionService.ts","../src/services/LogService.ts","../src/services/HealthService.ts","../src/services/FileService.ts","../src/services/BackupService.ts","../src/services/CronService.ts","../src/tools/formdata.ts","../src/services/BatchService.ts","../src/Client.ts"],"sourcesContent":["/**\n * ClientResponseError is a custom Error class that is intended to wrap\n * and normalize any error thrown by `Client.send()`.\n */\nexport class ClientResponseError extends Error {\n url: string = \"\";\n status: number = 0;\n response: { [key: string]: any } = {};\n isAbort: boolean = false;\n originalError: any = null;\n\n constructor(errData?: any) {\n super(\"ClientResponseError\");\n\n // Set the prototype explicitly.\n // https://github.com/Microsoft/TypeScript-wiki/blob/main/Breaking-Changes.md#extending-built-ins-like-error-array-and-map-may-no-longer-work\n Object.setPrototypeOf(this, ClientResponseError.prototype);\n\n if (errData !== null && typeof errData === \"object\") {\n this.url = typeof errData.url === \"string\" ? errData.url : \"\";\n this.status = typeof errData.status === \"number\" ? errData.status : 0;\n this.isAbort = !!errData.isAbort;\n this.originalError = errData.originalError;\n\n if (errData.response !== null && typeof errData.response === \"object\") {\n this.response = errData.response;\n } else if (errData.data !== null && typeof errData.data === \"object\") {\n this.response = errData.data;\n } else {\n this.response = {};\n }\n }\n\n if (!this.originalError && !(errData instanceof ClientResponseError)) {\n this.originalError = errData;\n }\n\n if (\n typeof DOMException !== \"undefined\" &&\n errData instanceof DOMException &&\n // https://developer.mozilla.org/en-US/docs/Web/API/DOMException#aborterror\n (errData.name == \"AbortError\" || errData.code == 20)\n ) {\n this.isAbort = true;\n }\n\n this.name = \"ClientResponseError \" + this.status;\n this.message = this.response?.message;\n if (!this.message) {\n if (this.isAbort) {\n this.message =\n \"The request was autocancelled. You can find more info in https://github.com/pocketbase/js-sdk#auto-cancellation.\";\n } else if (this.originalError?.cause?.message?.includes(\"ECONNREFUSED ::1\")) {\n this.message =\n \"Failed to connect to the PocketBase server. Try changing the SDK URL from localhost to 127.0.0.1 (https://github.com/pocketbase/js-sdk/issues/21).\";\n } else {\n this.message = \"Something went wrong.\";\n }\n }\n\n // set this.cause so that JS debugging tools can automatically connect\n // the dots between the original error and the wrapped one\n this.cause = this.originalError;\n }\n\n /**\n * Alias for `this.response` for backward compatibility.\n */\n get data() {\n return this.response;\n }\n\n /**\n * Make a POJO's copy of the current error class instance.\n * @see https://github.com/vuex-orm/vuex-orm/issues/255\n */\n toJSON() {\n return { ...this };\n }\n}\n","/**\n * -------------------------------------------------------------------\n * Simple cookie parse and serialize utilities mostly based on the\n * node module https://github.com/jshttp/cookie.\n * -------------------------------------------------------------------\n */\n\n/**\n * RegExp to match field-content in RFC 7230 sec 3.2\n *\n * field-content = field-vchar [ 1*( SP / HTAB ) field-vchar ]\n * field-vchar = VCHAR / obs-text\n * obs-text = %x80-FF\n */\nconst fieldContentRegExp = /^[\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+$/;\n\nexport interface ParseOptions {\n decode?: (val: string) => string;\n}\n\n/**\n * Parses the given cookie header string into an object\n * The object has the various cookies as keys(names) => values\n */\nexport function cookieParse(str: string, options?: ParseOptions): { [key: string]: any } {\n const result: { [key: string]: any } = {};\n\n if (typeof str !== \"string\") {\n return result;\n }\n\n const opt = Object.assign({}, options || {});\n const decode = opt.decode || defaultDecode;\n\n let index = 0;\n while (index < str.length) {\n const eqIdx = str.indexOf(\"=\", index);\n\n // no more cookie pairs\n if (eqIdx === -1) {\n break;\n }\n\n let endIdx = str.indexOf(\";\", index);\n\n if (endIdx === -1) {\n endIdx = str.length;\n } else if (endIdx < eqIdx) {\n // backtrack on prior semicolon\n index = str.lastIndexOf(\";\", eqIdx - 1) + 1;\n continue;\n }\n\n const key = str.slice(index, eqIdx).trim();\n\n // only assign once\n if (undefined === result[key]) {\n let val = str.slice(eqIdx + 1, endIdx).trim();\n\n // quoted values\n if (val.charCodeAt(0) === 0x22) {\n val = val.slice(1, -1);\n }\n\n try {\n result[key] = decode(val);\n } catch (_) {\n result[key] = val; // no decoding\n }\n }\n\n index = endIdx + 1;\n }\n\n return result;\n}\n\nexport interface SerializeOptions {\n encode?: (val: string | number | boolean) => string;\n maxAge?: number;\n domain?: string;\n path?: string;\n expires?: Date;\n httpOnly?: boolean;\n secure?: boolean;\n priority?: string;\n sameSite?: boolean | string;\n}\n\n/**\n * Serialize data into a cookie header.\n *\n * Serialize the a name value pair into a cookie string suitable for\n * http headers. An optional options object specified cookie parameters.\n *\n * ```js\n * cookieSerialize('foo', 'bar', { httpOnly: true }) // \"foo=bar; httpOnly\"\n * ```\n */\nexport function cookieSerialize(\n name: string,\n val: string,\n options?: SerializeOptions,\n): string {\n const opt = Object.assign({}, options || {});\n const encode = opt.encode || defaultEncode;\n\n if (!fieldContentRegExp.test(name)) {\n throw new TypeError(\"argument name is invalid\");\n }\n\n const value = encode(val);\n\n if (value && !fieldContentRegExp.test(value)) {\n throw new TypeError(\"argument val is invalid\");\n }\n\n let result = name + \"=\" + value;\n\n if (opt.maxAge != null) {\n const maxAge = opt.maxAge - 0;\n\n if (isNaN(maxAge) || !isFinite(maxAge)) {\n throw new TypeError(\"option maxAge is invalid\");\n }\n\n result += \"; Max-Age=\" + Math.floor(maxAge);\n }\n\n if (opt.domain) {\n if (!fieldContentRegExp.test(opt.domain)) {\n throw new TypeError(\"option domain is invalid\");\n }\n\n result += \"; Domain=\" + opt.domain;\n }\n\n if (opt.path) {\n if (!fieldContentRegExp.test(opt.path)) {\n throw new TypeError(\"option path is invalid\");\n }\n\n result += \"; Path=\" + opt.path;\n }\n\n if (opt.expires) {\n if (!isDate(opt.expires) || isNaN(opt.expires.valueOf())) {\n throw new TypeError(\"option expires is invalid\");\n }\n\n result += \"; Expires=\" + opt.expires.toUTCString();\n }\n\n if (opt.httpOnly) {\n result += \"; HttpOnly\";\n }\n\n if (opt.secure) {\n result += \"; Secure\";\n }\n\n if (opt.priority) {\n const priority =\n typeof opt.priority === \"string\" ? opt.priority.toLowerCase() : opt.priority;\n\n switch (priority) {\n case \"low\":\n result += \"; Priority=Low\";\n break;\n case \"medium\":\n result += \"; Priority=Medium\";\n break;\n case \"high\":\n result += \"; Priority=High\";\n break;\n default:\n throw new TypeError(\"option priority is invalid\");\n }\n }\n\n if (opt.sameSite) {\n const sameSite =\n typeof opt.sameSite === \"string\" ? opt.sameSite.toLowerCase() : opt.sameSite;\n\n switch (sameSite) {\n case true:\n result += \"; SameSite=Strict\";\n break;\n case \"lax\":\n result += \"; SameSite=Lax\";\n break;\n case \"strict\":\n result += \"; SameSite=Strict\";\n break;\n case \"none\":\n result += \"; SameSite=None\";\n break;\n default:\n throw new TypeError(\"option sameSite is invalid\");\n }\n }\n\n return result;\n}\n\n/**\n * Default URL-decode string value function.\n * Optimized to skip native call when no `%`.\n */\nfunction defaultDecode(val: string): string {\n return val.indexOf(\"%\") !== -1 ? decodeURIComponent(val) : val;\n}\n\n/**\n * Default URL-encode value function.\n */\nfunction defaultEncode(val: string | number | boolean): string {\n return encodeURIComponent(val);\n}\n\n/**\n * Determines if value is a Date.\n */\nfunction isDate(val: any): boolean {\n return Object.prototype.toString.call(val) === \"[object Date]\" || val instanceof Date;\n}\n","// @todo remove after https://github.com/reactwg/react-native-releases/issues/287\nconst isReactNative =\n (typeof navigator !== \"undefined\" && navigator.product === \"ReactNative\") ||\n (typeof global !== \"undefined\" && (global as any).HermesInternal);\n\nlet atobPolyfill: Function;\nif (typeof atob === \"function\" && !isReactNative) {\n atobPolyfill = atob;\n} else {\n /**\n * The code was extracted from:\n * https://github.com/davidchambers/Base64.js\n */\n atobPolyfill = (input: any) => {\n const chars = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\";\n\n let str = String(input).replace(/=+$/, \"\");\n if (str.length % 4 == 1) {\n throw new Error(\n \"'atob' failed: The string to be decoded is not correctly encoded.\",\n );\n }\n\n for (\n // initialize result and counters\n var bc = 0, bs, buffer, idx = 0, output = \"\";\n // get next character\n (buffer = str.charAt(idx++));\n // character found in table? initialize bit storage and add its ascii value;\n ~buffer &&\n ((bs = bc % 4 ? (bs as any) * 64 + buffer : buffer),\n // and if not first of each 4 characters,\n // convert the first 8 bits to one ascii character\n bc++ % 4)\n ? (output += String.fromCharCode(255 & (bs >> ((-2 * bc) & 6))))\n : 0\n ) {\n // try to find character in table (0-63, not found => -1)\n buffer = chars.indexOf(buffer);\n }\n\n return output;\n };\n}\n\n/**\n * Returns JWT token's payload data.\n */\nexport function getTokenPayload(token: string): { [key: string]: any } {\n if (token) {\n try {\n const encodedPayload = decodeURIComponent(\n atobPolyfill(token.split(\".\")[1])\n .split(\"\")\n .map(function (c: string) {\n return \"%\" + (\"00\" + c.charCodeAt(0).toString(16)).slice(-2);\n })\n .join(\"\"),\n );\n\n return JSON.parse(encodedPayload) || {};\n } catch (e) {}\n }\n\n return {};\n}\n\n/**\n * Checks whether a JWT token is expired or not.\n * Tokens without `exp` payload key are considered valid.\n * Tokens with empty payload (eg. invalid token strings) are considered expired.\n *\n * @param token The token to check.\n * @param [expirationThreshold] Time in seconds that will be subtracted from the token `exp` property.\n */\nexport function isTokenExpired(token: string, expirationThreshold = 0): boolean {\n let payload = getTokenPayload(token);\n\n if (\n Object.keys(payload).length > 0 &&\n (!payload.exp || payload.exp - expirationThreshold > Date.now() / 1000)\n ) {\n return false;\n }\n\n return true;\n}\n","import { cookieParse, cookieSerialize, SerializeOptions } from \"@/tools/cookie\";\nimport { isTokenExpired, getTokenPayload } from \"@/tools/jwt\";\nimport { RecordModel } from \"@/tools/dtos\";\n\nexport type AuthRecord = RecordModel | null;\n\nexport type AuthModel = AuthRecord; // for backward compatibility\n\nexport type OnStoreChangeFunc = (token: string, record: AuthRecord) => void;\n\nconst defaultCookieKey = \"pb_auth\";\n\n/**\n * Base AuthStore class that stores the auth state in runtime memory (aka. only for the duration of the store instane).\n *\n * Usually you wouldn't use it directly and instead use the builtin LocalAuthStore, AsyncAuthStore\n * or extend it with your own custom implementation.\n */\nexport class BaseAuthStore {\n protected baseToken: string = \"\";\n protected baseModel: AuthRecord = null;\n\n private _onChangeCallbacks: Array = [];\n\n /**\n * Retrieves the stored token (if any).\n */\n get token(): string {\n return this.baseToken;\n }\n\n /**\n * Retrieves the stored model data (if any).\n */\n get record(): AuthRecord {\n return this.baseModel;\n }\n\n /**\n * @deprecated use `record` instead.\n */\n get model(): AuthRecord {\n return this.baseModel;\n }\n\n /**\n * Loosely checks if the store has valid token (aka. existing and unexpired exp claim).\n */\n get isValid(): boolean {\n return !isTokenExpired(this.token);\n }\n\n /**\n * Loosely checks whether the currently loaded store state is for superuser.\n *\n * Alternatively you can also compare directly `pb.authStore.record?.collectionName`.\n */\n get isSuperuser(): boolean {\n let payload = getTokenPayload(this.token);\n\n return (\n payload.type == \"auth\" &&\n (this.record?.collectionName == \"_superusers\" ||\n // fallback in case the record field is not populated and assuming\n // that the collection crc32 checksum id wasn't manually changed\n (!this.record?.collectionName &&\n payload.collectionId == \"pbc_3142635823\"))\n );\n }\n\n /**\n * @deprecated use `isSuperuser` instead or simply check the record.collectionName property.\n */\n get isAdmin(): boolean {\n console.warn(\n \"Please replace pb.authStore.isAdmin with pb.authStore.isSuperuser OR simply check the value of pb.authStore.record?.collectionName\",\n );\n return this.isSuperuser;\n }\n\n /**\n * @deprecated use `!isSuperuser` instead or simply check the record.collectionName property.\n */\n get isAuthRecord(): boolean {\n console.warn(\n \"Please replace pb.authStore.isAuthRecord with !pb.authStore.isSuperuser OR simply check the value of pb.authStore.record?.collectionName\",\n );\n return getTokenPayload(this.token).type == \"auth\" && !this.isSuperuser;\n }\n\n /**\n * Saves the provided new token and model data in the auth store.\n */\n save(token: string, record?: AuthRecord): void {\n this.baseToken = token || \"\";\n this.baseModel = record || null;\n\n this.triggerChange();\n }\n\n /**\n * Removes the stored token and model data form the auth store.\n */\n clear(): void {\n this.baseToken = \"\";\n this.baseModel = null;\n this.triggerChange();\n }\n\n /**\n * Parses the provided cookie string and updates the store state\n * with the cookie's token and model data.\n *\n * NB! This function doesn't validate the token or its data.\n * Usually this isn't a concern if you are interacting only with the\n * PocketBase API because it has the proper server-side security checks in place,\n * but if you are using the store `isValid` state for permission controls\n * in a node server (eg. SSR), then it is recommended to call `authRefresh()`\n * after loading the cookie to ensure an up-to-date token and model state.\n * For example:\n *\n * ```js\n * pb.authStore.loadFromCookie(\"cookie string...\");\n *\n * try {\n * // get an up-to-date auth store state by veryfing and refreshing the loaded auth model (if any)\n * pb.authStore.isValid && await pb.collection('users').authRefresh();\n * } catch (_) {\n * // clear the auth store on failed refresh\n * pb.authStore.clear();\n * }\n * ```\n */\n loadFromCookie(cookie: string, key = defaultCookieKey): void {\n const rawData = cookieParse(cookie || \"\")[key] || \"\";\n\n let data: { [key: string]: any } = {};\n try {\n data = JSON.parse(rawData);\n // normalize\n if (typeof data === null || typeof data !== \"object\" || Array.isArray(data)) {\n data = {};\n }\n } catch (_) {}\n\n this.save(data.token || \"\", data.record || data.model || null);\n }\n\n /**\n * Exports the current store state as cookie string.\n *\n * By default the following optional attributes are added:\n * - Secure\n * - HttpOnly\n * - SameSite=Strict\n * - Path=/\n * - Expires={the token expiration date}\n *\n * NB! If the generated cookie exceeds 4096 bytes, this method will\n * strip the model data to the bare minimum to try to fit within the\n * recommended size in https://www.rfc-editor.org/rfc/rfc6265#section-6.1.\n */\n exportToCookie(options?: SerializeOptions, key = defaultCookieKey): string {\n const defaultOptions: SerializeOptions = {\n secure: true,\n sameSite: true,\n httpOnly: true,\n path: \"/\",\n };\n\n // extract the token expiration date\n const payload = getTokenPayload(this.token);\n if (payload?.exp) {\n defaultOptions.expires = new Date(payload.exp * 1000);\n } else {\n defaultOptions.expires = new Date(\"1970-01-01\");\n }\n\n // merge with the user defined options\n options = Object.assign({}, defaultOptions, options);\n\n const rawData = {\n token: this.token,\n record: this.record ? JSON.parse(JSON.stringify(this.record)) : null,\n };\n\n let result = cookieSerialize(key, JSON.stringify(rawData), options);\n\n const resultLength =\n typeof Blob !== \"undefined\" ? new Blob([result]).size : result.length;\n\n // strip down the model data to the bare minimum\n if (rawData.record && resultLength > 4096) {\n rawData.record = { id: rawData.record?.id, email: rawData.record?.email };\n const extraProps = [\"collectionId\", \"collectionName\", \"verified\"];\n for (const prop in this.record) {\n if (extraProps.includes(prop)) {\n rawData.record[prop] = this.record[prop];\n }\n }\n result = cookieSerialize(key, JSON.stringify(rawData), options);\n }\n\n return result;\n }\n\n /**\n * Register a callback function that will be called on store change.\n *\n * You can set the `fireImmediately` argument to true in order to invoke\n * the provided callback right after registration.\n *\n * Returns a removal function that you could call to \"unsubscribe\" from the changes.\n */\n onChange(callback: OnStoreChangeFunc, fireImmediately = false): () => void {\n this._onChangeCallbacks.push(callback);\n\n if (fireImmediately) {\n callback(this.token, this.record);\n }\n\n return () => {\n for (let i = this._onChangeCallbacks.length - 1; i >= 0; i--) {\n if (this._onChangeCallbacks[i] == callback) {\n delete this._onChangeCallbacks[i]; // removes the function reference\n this._onChangeCallbacks.splice(i, 1); // reindex the array\n return;\n }\n }\n };\n }\n\n protected triggerChange(): void {\n for (const callback of this._onChangeCallbacks) {\n callback && callback(this.token, this.record);\n }\n }\n}\n","import { BaseAuthStore, AuthRecord } from \"@/stores/BaseAuthStore\";\n\n/**\n * The default token store for browsers with auto fallback\n * to runtime/memory if local storage is undefined (e.g. in node env).\n */\nexport class LocalAuthStore extends BaseAuthStore {\n private storageFallback: { [key: string]: any } = {};\n private storageKey: string;\n\n constructor(storageKey = \"pocketbase_auth\") {\n super();\n\n this.storageKey = storageKey;\n\n this._bindStorageEvent();\n }\n\n /**\n * @inheritdoc\n */\n get token(): string {\n const data = this._storageGet(this.storageKey) || {};\n\n return data.token || \"\";\n }\n\n /**\n * @inheritdoc\n */\n get record(): AuthRecord {\n const data = this._storageGet(this.storageKey) || {};\n\n return data.record || data.model || null;\n }\n\n /**\n * @deprecated use `record` instead.\n */\n get model(): AuthRecord {\n return this.record;\n }\n\n /**\n * @inheritdoc\n */\n save(token: string, record?: AuthRecord) {\n this._storageSet(this.storageKey, {\n token: token,\n record: record,\n });\n\n super.save(token, record);\n }\n\n /**\n * @inheritdoc\n */\n clear() {\n this._storageRemove(this.storageKey);\n\n super.clear();\n }\n\n // ---------------------------------------------------------------\n // Internal helpers:\n // ---------------------------------------------------------------\n\n /**\n * Retrieves `key` from the browser's local storage\n * (or runtime/memory if local storage is undefined).\n */\n private _storageGet(key: string): any {\n if (typeof window !== \"undefined\" && window?.localStorage) {\n const rawValue = window.localStorage.getItem(key) || \"\";\n try {\n return JSON.parse(rawValue);\n } catch (e) {\n // not a json\n return rawValue;\n }\n }\n\n // fallback\n return this.storageFallback[key];\n }\n\n /**\n * Stores a new data in the browser's local storage\n * (or runtime/memory if local storage is undefined).\n */\n private _storageSet(key: string, value: any) {\n if (typeof window !== \"undefined\" && window?.localStorage) {\n // store in local storage\n let normalizedVal = value;\n if (typeof value !== \"string\") {\n normalizedVal = JSON.stringify(value);\n }\n window.localStorage.setItem(key, normalizedVal);\n } else {\n // store in fallback\n this.storageFallback[key] = value;\n }\n }\n\n /**\n * Removes `key` from the browser's local storage and the runtime/memory.\n */\n private _storageRemove(key: string) {\n // delete from local storage\n if (typeof window !== \"undefined\" && window?.localStorage) {\n window.localStorage?.removeItem(key);\n }\n\n // delete from fallback\n delete this.storageFallback[key];\n }\n\n /**\n * Updates the current store state on localStorage change.\n */\n private _bindStorageEvent() {\n if (\n typeof window === \"undefined\" ||\n !window?.localStorage ||\n !window.addEventListener\n ) {\n return;\n }\n\n window.addEventListener(\"storage\", (e) => {\n if (e.key != this.storageKey) {\n return;\n }\n\n const data = this._storageGet(this.storageKey) || {};\n\n super.save(data.token || \"\", data.record || data.model || null);\n });\n }\n}\n","import Client from \"@/Client\";\n\n/**\n * BaseService class that should be inherited from all API services.\n */\nexport abstract class BaseService {\n readonly client: Client;\n\n constructor(client: Client) {\n this.client = client;\n }\n}\n","import { BaseService } from \"@/services/BaseService\";\nimport { CommonOptions } from \"@/tools/options\";\n\ninterface appleClientSecret {\n secret: string;\n}\n\nexport class SettingsService extends BaseService {\n /**\n * Fetch all available app settings.\n *\n * @throws {ClientResponseError}\n */\n async getAll(options?: CommonOptions): Promise<{ [key: string]: any }> {\n options = Object.assign(\n {\n method: \"GET\",\n },\n options,\n );\n\n return this.client.send(\"/api/settings\", options);\n }\n\n /**\n * Bulk updates app settings.\n *\n * @throws {ClientResponseError}\n */\n async update(\n bodyParams?: { [key: string]: any } | FormData,\n options?: CommonOptions,\n ): Promise<{ [key: string]: any }> {\n options = Object.assign(\n {\n method: \"PATCH\",\n body: bodyParams,\n },\n options,\n );\n\n return this.client.send(\"/api/settings\", options);\n }\n\n /**\n * Performs a S3 filesystem connection test.\n *\n * The currently supported `filesystem` are \"storage\" and \"backups\".\n *\n * @throws {ClientResponseError}\n */\n async testS3(\n filesystem: string = \"storage\",\n options?: CommonOptions,\n ): Promise {\n options = Object.assign(\n {\n method: \"POST\",\n body: {\n filesystem: filesystem,\n },\n },\n options,\n );\n\n return this.client.send(\"/api/settings/test/s3\", options).then(() => true);\n }\n\n /**\n * Sends a test email.\n *\n * The possible `emailTemplate` values are:\n * - verification\n * - password-reset\n * - email-change\n *\n * @throws {ClientResponseError}\n */\n async testEmail(\n collectionIdOrName: string,\n toEmail: string,\n emailTemplate: string,\n options?: CommonOptions,\n ): Promise {\n options = Object.assign(\n {\n method: \"POST\",\n body: {\n email: toEmail,\n template: emailTemplate,\n collection: collectionIdOrName,\n },\n },\n options,\n );\n\n return this.client.send(\"/api/settings/test/email\", options).then(() => true);\n }\n\n /**\n * Generates a new Apple OAuth2 client secret.\n *\n * @throws {ClientResponseError}\n */\n async generateAppleClientSecret(\n clientId: string,\n teamId: string,\n keyId: string,\n privateKey: string,\n duration: number,\n options?: CommonOptions,\n ): Promise {\n options = Object.assign(\n {\n method: \"POST\",\n body: {\n clientId,\n teamId,\n keyId,\n privateKey,\n duration,\n },\n },\n options,\n );\n\n return this.client.send(\"/api/settings/apple/generate-client-secret\", options);\n }\n}\n","export interface SendOptions extends RequestInit {\n // for backward compatibility and to minimize the verbosity,\n // any top-level field that doesn't exist in RequestInit or the\n // fields below will be treated as query parameter.\n [key: string]: any;\n\n /**\n * Optional custom fetch function to use for sending the request.\n */\n fetch?: (url: RequestInfo | URL, config?: RequestInit) => Promise;\n\n /**\n * Custom headers to send with the requests.\n */\n headers?: { [key: string]: string };\n\n /**\n * The body of the request (serialized automatically for json requests).\n */\n body?: any;\n\n /**\n * Query parameters that will be appended to the request url.\n */\n query?: { [key: string]: any };\n\n /**\n * @deprecated use `query` instead\n *\n * for backward-compatibility `params` values are merged with `query`,\n * but this option may get removed in the final v1 release\n */\n params?: { [key: string]: any };\n\n /**\n * The request identifier that can be used to cancel pending requests.\n */\n requestKey?: string | null;\n\n /**\n * @deprecated use `requestKey:string` instead\n */\n $cancelKey?: string;\n\n /**\n * @deprecated use `requestKey:null` instead\n */\n $autoCancel?: boolean;\n}\n\nexport interface CommonOptions extends SendOptions {\n fields?: string;\n}\n\nexport interface ListOptions extends CommonOptions {\n page?: number;\n perPage?: number;\n sort?: string;\n filter?: string;\n skipTotal?: boolean;\n}\n\nexport interface FullListOptions extends ListOptions {\n batch?: number;\n}\n\nexport interface RecordOptions extends CommonOptions {\n expand?: string;\n}\n\nexport interface RecordListOptions extends ListOptions, RecordOptions {}\n\nexport interface RecordFullListOptions extends FullListOptions, RecordOptions {}\n\nexport interface RecordSubscribeOptions extends SendOptions {\n fields?: string;\n filter?: string;\n expand?: string;\n}\n\nexport interface LogStatsOptions extends CommonOptions {\n filter?: string;\n}\n\nexport interface FileOptions extends CommonOptions {\n thumb?: string;\n download?: boolean;\n}\n\nexport interface AuthOptions extends CommonOptions {\n /**\n * If autoRefreshThreshold is set it will take care to auto refresh\n * when necessary the auth data before each request to ensure that\n * the auth state is always valid.\n *\n * The value must be in seconds, aka. the amount of seconds\n * that will be subtracted from the current token `exp` claim in order\n * to determine whether it is going to expire within the specified time threshold.\n *\n * For example, if you want to auto refresh the token if it is\n * going to expire in the next 30mins (or already has expired),\n * it can be set to `1800`\n */\n autoRefreshThreshold?: number;\n}\n\n// -------------------------------------------------------------------\n\n// list of known SendOptions keys (everything else is treated as query param)\nconst knownSendOptionsKeys = [\n \"requestKey\",\n \"$cancelKey\",\n \"$autoCancel\",\n \"fetch\",\n \"headers\",\n \"body\",\n \"query\",\n \"params\",\n // ---,\n \"cache\",\n \"credentials\",\n \"headers\",\n \"integrity\",\n \"keepalive\",\n \"method\",\n \"mode\",\n \"redirect\",\n \"referrer\",\n \"referrerPolicy\",\n \"signal\",\n \"window\",\n];\n\n// modifies in place the provided options by moving unknown send options as query parameters.\nexport function normalizeUnknownQueryParams(options?: SendOptions): void {\n if (!options) {\n return;\n }\n\n options.query = options.query || {};\n for (let key in options) {\n if (knownSendOptionsKeys.includes(key)) {\n continue;\n }\n\n options.query[key] = options[key];\n delete options[key];\n }\n}\n\nexport function serializeQueryParams(params: { [key: string]: any }): string {\n const result: Array = [];\n\n for (const key in params) {\n const encodedKey = encodeURIComponent(key);\n const arrValue = Array.isArray(params[key]) ? params[key] : [params[key]];\n\n for (let v of arrValue) {\n v = prepareQueryParamValue(v);\n if (v === null) {\n continue;\n }\n result.push(encodedKey + \"=\" + v);\n }\n }\n\n return result.join(\"&\");\n}\n\n// encodes and normalizes the provided query param value.\nfunction prepareQueryParamValue(value: any): null | string {\n if (value === null || typeof value === \"undefined\") {\n return null;\n }\n\n if (value instanceof Date) {\n return encodeURIComponent(value.toISOString().replace(\"T\", \" \"));\n }\n\n if (typeof value === \"object\") {\n return encodeURIComponent(JSON.stringify(value));\n }\n\n return encodeURIComponent(value);\n}\n","import { ClientResponseError } from \"@/ClientResponseError\";\nimport { BaseService } from \"@/services/BaseService\";\nimport { SendOptions, normalizeUnknownQueryParams } from \"@/tools/options\";\n\ninterface promiseCallbacks {\n resolve: Function;\n reject: Function;\n}\n\ntype Subscriptions = { [key: string]: Array };\n\nexport type UnsubscribeFunc = () => Promise;\n\nexport class RealtimeService extends BaseService {\n clientId: string = \"\";\n\n private eventSource: EventSource | null = null;\n private subscriptions: Subscriptions = {};\n private lastSentSubscriptions: Array = [];\n private connectTimeoutId: any;\n private maxConnectTimeout: number = 15000;\n private reconnectTimeoutId: any;\n private reconnectAttempts: number = 0;\n private maxReconnectAttempts: number = Infinity;\n private predefinedReconnectIntervals: Array = [\n 200, 300, 500, 1000, 1200, 1500, 2000,\n ];\n private pendingConnects: Array = [];\n\n /**\n * Returns whether the realtime connection has been established.\n */\n get isConnected(): boolean {\n return !!this.eventSource && !!this.clientId && !this.pendingConnects.length;\n }\n\n /**\n * An optional hook that is invoked when the realtime client disconnects\n * either when unsubscribing from all subscriptions or when the\n * connection was interrupted or closed by the server.\n *\n * The received argument could be used to determine whether the disconnect\n * is a result from unsubscribing (`activeSubscriptions.length == 0`)\n * or because of network/server error (`activeSubscriptions.length > 0`).\n *\n * If you want to listen for the opposite, aka. when the client connection is established,\n * subscribe to the `PB_CONNECT` event.\n */\n onDisconnect?: (activeSubscriptions: Array) => void;\n\n /**\n * Register the subscription listener.\n *\n * You can subscribe multiple times to the same topic.\n *\n * If the SSE connection is not started yet,\n * this method will also initialize it.\n */\n async subscribe(\n topic: string,\n callback: (data: any) => void,\n options?: SendOptions,\n ): Promise {\n if (!topic) {\n throw new Error(\"topic must be set.\");\n }\n\n let key = topic;\n\n // serialize and append the topic options (if any)\n if (options) {\n options = Object.assign({}, options); // shallow copy\n normalizeUnknownQueryParams(options);\n const serialized =\n \"options=\" +\n encodeURIComponent(\n JSON.stringify({ query: options.query, headers: options.headers }),\n );\n key += (key.includes(\"?\") ? \"&\" : \"?\") + serialized;\n }\n\n const listener = function (e: Event) {\n const msgEvent = e as MessageEvent;\n\n let data;\n try {\n data = JSON.parse(msgEvent?.data);\n } catch {}\n\n callback(data || {});\n };\n\n // store the listener\n if (!this.subscriptions[key]) {\n this.subscriptions[key] = [];\n }\n this.subscriptions[key].push(listener);\n\n if (!this.isConnected) {\n // initialize sse connection\n await this.connect();\n } else if (this.subscriptions[key].length === 1) {\n // send the updated subscriptions (if it is the first for the key)\n await this.submitSubscriptions();\n } else {\n // only register the listener\n this.eventSource?.addEventListener(key, listener);\n }\n\n return async (): Promise => {\n return this.unsubscribeByTopicAndListener(topic, listener);\n };\n }\n\n /**\n * Unsubscribe from all subscription listeners with the specified topic.\n *\n * If `topic` is not provided, then this method will unsubscribe\n * from all active subscriptions.\n *\n * This method is no-op if there are no active subscriptions.\n *\n * The related sse connection will be autoclosed if after the\n * unsubscribe operation there are no active subscriptions left.\n */\n async unsubscribe(topic?: string): Promise {\n let needToSubmit = false;\n\n if (!topic) {\n // remove all subscriptions\n this.subscriptions = {};\n } else {\n // remove all listeners related to the topic\n const subs = this.getSubscriptionsByTopic(topic);\n for (let key in subs) {\n if (!this.hasSubscriptionListeners(key)) {\n continue; // already unsubscribed\n }\n\n for (let listener of this.subscriptions[key]) {\n this.eventSource?.removeEventListener(key, listener);\n }\n delete this.subscriptions[key];\n\n // mark for subscriptions change submit if there are no other listeners\n if (!needToSubmit) {\n needToSubmit = true;\n }\n }\n }\n\n if (!this.hasSubscriptionListeners()) {\n // no other active subscriptions -> close the sse connection\n this.disconnect();\n } else if (needToSubmit) {\n await this.submitSubscriptions();\n }\n }\n\n /**\n * Unsubscribe from all subscription listeners starting with the specified topic prefix.\n *\n * This method is no-op if there are no active subscriptions with the specified topic prefix.\n *\n * The related sse connection will be autoclosed if after the\n * unsubscribe operation there are no active subscriptions left.\n */\n async unsubscribeByPrefix(keyPrefix: string): Promise {\n let hasAtleastOneTopic = false;\n for (let key in this.subscriptions) {\n // \"?\" so that it can be used as end delimiter for the prefix\n if (!(key + \"?\").startsWith(keyPrefix)) {\n continue;\n }\n\n hasAtleastOneTopic = true;\n for (let listener of this.subscriptions[key]) {\n this.eventSource?.removeEventListener(key, listener);\n }\n delete this.subscriptions[key];\n }\n\n if (!hasAtleastOneTopic) {\n return; // nothing to unsubscribe from\n }\n\n if (this.hasSubscriptionListeners()) {\n // submit the deleted subscriptions\n await this.submitSubscriptions();\n } else {\n // no other active subscriptions -> close the sse connection\n this.disconnect();\n }\n }\n\n /**\n * Unsubscribe from all subscriptions matching the specified topic and listener function.\n *\n * This method is no-op if there are no active subscription with\n * the specified topic and listener.\n *\n * The related sse connection will be autoclosed if after the\n * unsubscribe operation there are no active subscriptions left.\n */\n async unsubscribeByTopicAndListener(\n topic: string,\n listener: EventListener,\n ): Promise {\n let needToSubmit = false;\n\n const subs = this.getSubscriptionsByTopic(topic);\n for (let key in subs) {\n if (\n !Array.isArray(this.subscriptions[key]) ||\n !this.subscriptions[key].length\n ) {\n continue; // already unsubscribed\n }\n\n let exist = false;\n for (let i = this.subscriptions[key].length - 1; i >= 0; i--) {\n if (this.subscriptions[key][i] !== listener) {\n continue;\n }\n\n exist = true; // has at least one matching listener\n delete this.subscriptions[key][i]; // removes the function reference\n this.subscriptions[key].splice(i, 1); // reindex the array\n this.eventSource?.removeEventListener(key, listener);\n }\n if (!exist) {\n continue;\n }\n\n // remove the key from the subscriptions list if there are no other listeners\n if (!this.subscriptions[key].length) {\n delete this.subscriptions[key];\n }\n\n // mark for subscriptions change submit if there are no other listeners\n if (!needToSubmit && !this.hasSubscriptionListeners(key)) {\n needToSubmit = true;\n }\n }\n\n if (!this.hasSubscriptionListeners()) {\n // no other active subscriptions -> close the sse connection\n this.disconnect();\n } else if (needToSubmit) {\n await this.submitSubscriptions();\n }\n }\n\n private hasSubscriptionListeners(keyToCheck?: string): boolean {\n this.subscriptions = this.subscriptions || {};\n\n // check the specified key\n if (keyToCheck) {\n return !!this.subscriptions[keyToCheck]?.length;\n }\n\n // check for at least one non-empty subscription\n for (let key in this.subscriptions) {\n if (!!this.subscriptions[key]?.length) {\n return true;\n }\n }\n\n return false;\n }\n\n private async submitSubscriptions(): Promise {\n if (!this.clientId) {\n return; // no client/subscriber\n }\n\n // optimistic update\n this.addAllSubscriptionListeners();\n\n this.lastSentSubscriptions = this.getNonEmptySubscriptionKeys();\n\n return this.client\n .send(\"/api/realtime\", {\n method: \"POST\",\n body: {\n clientId: this.clientId,\n subscriptions: this.lastSentSubscriptions,\n },\n requestKey: this.getSubscriptionsCancelKey(),\n })\n .catch((err) => {\n if (err?.isAbort) {\n return; // silently ignore aborted pending requests\n }\n throw err;\n });\n }\n\n private getSubscriptionsCancelKey(): string {\n return \"realtime_\" + this.clientId;\n }\n\n private getSubscriptionsByTopic(topic: string): Subscriptions {\n const result: Subscriptions = {};\n\n // \"?\" so that it can be used as end delimiter for the topic\n topic = topic.includes(\"?\") ? topic : topic + \"?\";\n\n for (let key in this.subscriptions) {\n if ((key + \"?\").startsWith(topic)) {\n result[key] = this.subscriptions[key];\n }\n }\n\n return result;\n }\n\n private getNonEmptySubscriptionKeys(): Array {\n const result: Array = [];\n\n for (let key in this.subscriptions) {\n if (this.subscriptions[key].length) {\n result.push(key);\n }\n }\n\n return result;\n }\n\n private addAllSubscriptionListeners(): void {\n if (!this.eventSource) {\n return;\n }\n\n this.removeAllSubscriptionListeners();\n\n for (let key in this.subscriptions) {\n for (let listener of this.subscriptions[key]) {\n this.eventSource.addEventListener(key, listener);\n }\n }\n }\n\n private removeAllSubscriptionListeners(): void {\n if (!this.eventSource) {\n return;\n }\n\n for (let key in this.subscriptions) {\n for (let listener of this.subscriptions[key]) {\n this.eventSource.removeEventListener(key, listener);\n }\n }\n }\n\n private async connect(): Promise {\n if (this.reconnectAttempts > 0) {\n // immediately resolve the promise to avoid indefinitely\n // blocking the client during reconnection\n return;\n }\n\n return new Promise((resolve, reject) => {\n this.pendingConnects.push({ resolve, reject });\n\n if (this.pendingConnects.length > 1) {\n // all promises will be resolved once the connection is established\n return;\n }\n\n this.initConnect();\n });\n }\n\n private initConnect() {\n this.disconnect(true);\n\n // wait up to 15s for connect\n clearTimeout(this.connectTimeoutId);\n this.connectTimeoutId = setTimeout(() => {\n this.connectErrorHandler(new Error(\"EventSource connect took too long.\"));\n }, this.maxConnectTimeout);\n\n this.eventSource = new EventSource(this.client.buildURL(\"/api/realtime\"));\n\n this.eventSource.onerror = (_) => {\n this.connectErrorHandler(\n new Error(\"Failed to establish realtime connection.\"),\n );\n };\n\n this.eventSource.addEventListener(\"PB_CONNECT\", (e) => {\n const msgEvent = e as MessageEvent;\n this.clientId = msgEvent?.lastEventId;\n\n this.submitSubscriptions()\n .then(async () => {\n let retries = 3;\n while (this.hasUnsentSubscriptions() && retries > 0) {\n retries--;\n // resubscribe to ensure that the latest topics are submitted\n //\n // This is needed because missed topics could happen on reconnect\n // if after the pending sent `submitSubscriptions()` call another `subscribe()`\n // was made before the submit was able to complete.\n await this.submitSubscriptions();\n }\n })\n .then(() => {\n for (let p of this.pendingConnects) {\n p.resolve();\n }\n\n // reset connect meta\n this.pendingConnects = [];\n this.reconnectAttempts = 0;\n clearTimeout(this.reconnectTimeoutId);\n clearTimeout(this.connectTimeoutId);\n\n // propagate the PB_CONNECT event\n const connectSubs = this.getSubscriptionsByTopic(\"PB_CONNECT\");\n for (let key in connectSubs) {\n for (let listener of connectSubs[key]) {\n listener(e);\n }\n }\n })\n .catch((err) => {\n this.clientId = \"\";\n this.connectErrorHandler(err);\n });\n });\n }\n\n private hasUnsentSubscriptions(): boolean {\n const latestTopics = this.getNonEmptySubscriptionKeys();\n if (latestTopics.length != this.lastSentSubscriptions.length) {\n return true;\n }\n\n for (const t of latestTopics) {\n if (!this.lastSentSubscriptions.includes(t)) {\n return true;\n }\n }\n\n return false;\n }\n\n private connectErrorHandler(err: any) {\n clearTimeout(this.connectTimeoutId);\n clearTimeout(this.reconnectTimeoutId);\n\n if (\n // wasn't previously connected -> direct reject\n (!this.clientId && !this.reconnectAttempts) ||\n // was previously connected but the max reconnection limit has been reached\n this.reconnectAttempts > this.maxReconnectAttempts\n ) {\n for (let p of this.pendingConnects) {\n p.reject(new ClientResponseError(err));\n }\n this.pendingConnects = [];\n this.disconnect();\n return;\n }\n\n // otherwise -> reconnect in the background\n this.disconnect(true);\n const timeout =\n this.predefinedReconnectIntervals[this.reconnectAttempts] ||\n this.predefinedReconnectIntervals[\n this.predefinedReconnectIntervals.length - 1\n ];\n this.reconnectAttempts++;\n this.reconnectTimeoutId = setTimeout(() => {\n this.initConnect();\n }, timeout);\n }\n\n private disconnect(fromReconnect = false): void {\n if (this.clientId && this.onDisconnect) {\n this.onDisconnect(Object.keys(this.subscriptions));\n }\n\n clearTimeout(this.connectTimeoutId);\n clearTimeout(this.reconnectTimeoutId);\n this.removeAllSubscriptionListeners();\n this.client.cancelRequest(this.getSubscriptionsCancelKey());\n this.eventSource?.close();\n this.eventSource = null;\n this.clientId = \"\";\n\n if (!fromReconnect) {\n this.reconnectAttempts = 0;\n\n // resolve any remaining connect promises\n //\n // this is done to avoid unnecessary throwing errors in case\n // unsubscribe is called before the pending connect promises complete\n // (see https://github.com/pocketbase/pocketbase/discussions/2897#discussioncomment-6423818)\n for (let p of this.pendingConnects) {\n p.resolve();\n }\n this.pendingConnects = [];\n }\n }\n}\n","import { BaseService } from \"@/services/BaseService\";\nimport { ClientResponseError } from \"@/ClientResponseError\";\nimport { ListResult } from \"@/tools/dtos\";\nimport { CommonOptions, ListOptions, FullListOptions } from \"@/tools/options\";\n\nexport abstract class CrudService extends BaseService {\n /**\n * Base path for the crud actions (without trailing slash, eg. '/admins').\n */\n abstract get baseCrudPath(): string;\n\n /**\n * Response data decoder.\n */\n decode(data: { [key: string]: any }): T {\n return data as T;\n }\n\n /**\n * Returns a promise with all list items batch fetched at once\n * (by default 500 items per request; to change it set the `batch` query param).\n *\n * You can use the generic T to supply a wrapper type of the crud model.\n *\n * @throws {ClientResponseError}\n */\n async getFullList(options?: FullListOptions): Promise>;\n\n /**\n * Legacy version of getFullList with explicitly specified batch size.\n */\n async getFullList(batch?: number, options?: ListOptions): Promise>;\n\n async getFullList(\n batchOrqueryParams?: number | FullListOptions,\n options?: ListOptions,\n ): Promise> {\n if (typeof batchOrqueryParams == \"number\") {\n return this._getFullList(batchOrqueryParams, options);\n }\n\n options = Object.assign({}, batchOrqueryParams, options);\n\n let batch = 500;\n if (options.batch) {\n batch = options.batch;\n delete options.batch;\n }\n\n return this._getFullList(batch, options);\n }\n\n /**\n * Returns paginated items list.\n *\n * You can use the generic T to supply a wrapper type of the crud model.\n *\n * @throws {ClientResponseError}\n */\n async getList(\n page = 1,\n perPage = 30,\n options?: ListOptions,\n ): Promise> {\n options = Object.assign(\n {\n method: \"GET\",\n },\n options,\n );\n\n options.query = Object.assign(\n {\n page: page,\n perPage: perPage,\n },\n options.query,\n );\n\n return this.client.send(this.baseCrudPath, options).then((responseData: any) => {\n responseData.items =\n responseData.items?.map((item: any) => {\n return this.decode(item);\n }) || [];\n\n return responseData;\n });\n }\n\n /**\n * Returns the first found item by the specified filter.\n *\n * Internally it calls `getList(1, 1, { filter, skipTotal })` and\n * returns the first found item.\n *\n * You can use the generic T to supply a wrapper type of the crud model.\n *\n * For consistency with `getOne`, this method will throw a 404\n * ClientResponseError if no item was found.\n *\n * @throws {ClientResponseError}\n */\n async getFirstListItem(filter: string, options?: CommonOptions): Promise {\n options = Object.assign(\n {\n requestKey: \"one_by_filter_\" + this.baseCrudPath + \"_\" + filter,\n },\n options,\n );\n\n options.query = Object.assign(\n {\n filter: filter,\n skipTotal: 1,\n },\n options.query,\n );\n\n return this.getList(1, 1, options).then((result) => {\n if (!result?.items?.length) {\n throw new ClientResponseError({\n status: 404,\n response: {\n code: 404,\n message: \"The requested resource wasn't found.\",\n data: {},\n },\n });\n }\n\n return result.items[0];\n });\n }\n\n /**\n * Returns single item by its id.\n *\n * You can use the generic T to supply a wrapper type of the crud model.\n *\n * If `id` is empty it will throw a 404 error.\n *\n * @throws {ClientResponseError}\n */\n async getOne(id: string, options?: CommonOptions): Promise {\n if (!id) {\n throw new ClientResponseError({\n url: this.client.buildURL(this.baseCrudPath + \"/\"),\n status: 404,\n response: {\n code: 404,\n message: \"Missing required record id.\",\n data: {},\n },\n });\n }\n\n options = Object.assign(\n {\n method: \"GET\",\n },\n options,\n );\n\n return this.client\n .send(this.baseCrudPath + \"/\" + encodeURIComponent(id), options)\n .then((responseData: any) => this.decode(responseData));\n }\n\n /**\n * Creates a new item.\n *\n * You can use the generic T to supply a wrapper type of the crud model.\n *\n * @throws {ClientResponseError}\n */\n async create(\n bodyParams?: { [key: string]: any } | FormData,\n options?: CommonOptions,\n ): Promise {\n options = Object.assign(\n {\n method: \"POST\",\n body: bodyParams,\n },\n options,\n );\n\n return this.client\n .send(this.baseCrudPath, options)\n .then((responseData: any) => this.decode(responseData));\n }\n\n /**\n * Updates an existing item by its id.\n *\n * You can use the generic T to supply a wrapper type of the crud model.\n *\n * @throws {ClientResponseError}\n */\n async update(\n id: string,\n bodyParams?: { [key: string]: any } | FormData,\n options?: CommonOptions,\n ): Promise {\n options = Object.assign(\n {\n method: \"PATCH\",\n body: bodyParams,\n },\n options,\n );\n\n return this.client\n .send(this.baseCrudPath + \"/\" + encodeURIComponent(id), options)\n .then((responseData: any) => this.decode(responseData));\n }\n\n /**\n * Deletes an existing item by its id.\n *\n * @throws {ClientResponseError}\n */\n async delete(id: string, options?: CommonOptions): Promise {\n options = Object.assign(\n {\n method: \"DELETE\",\n },\n options,\n );\n\n return this.client\n .send(this.baseCrudPath + \"/\" + encodeURIComponent(id), options)\n .then(() => true);\n }\n\n /**\n * Returns a promise with all list items batch fetched at once.\n */\n protected _getFullList(\n batchSize = 500,\n options?: ListOptions,\n ): Promise> {\n options = options || {};\n options.query = Object.assign(\n {\n skipTotal: 1,\n },\n options.query,\n );\n\n let result: Array = [];\n\n let request = async (page: number): Promise> => {\n return this.getList(page, batchSize || 500, options).then((list) => {\n const castedList = list as any as ListResult;\n const items = castedList.items;\n\n result = result.concat(items);\n\n if (items.length == list.perPage) {\n return request(page + 1);\n }\n\n return result;\n });\n };\n\n return request(1);\n }\n}\n","import { SendOptions } from \"@/tools/options\";\n\nexport function normalizeLegacyOptionsArgs(\n legacyWarn: string,\n baseOptions: SendOptions,\n bodyOrOptions?: any,\n query?: any,\n): SendOptions {\n const hasBodyOrOptions = typeof bodyOrOptions !== \"undefined\";\n const hasQuery = typeof query !== \"undefined\";\n\n if (!hasQuery && !hasBodyOrOptions) {\n return baseOptions;\n }\n\n if (hasQuery) {\n console.warn(legacyWarn);\n baseOptions.body = Object.assign({}, baseOptions.body, bodyOrOptions);\n baseOptions.query = Object.assign({}, baseOptions.query, query);\n\n return baseOptions;\n }\n\n return Object.assign(baseOptions, bodyOrOptions);\n}\n","import Client from \"@/Client\";\nimport { isTokenExpired } from \"@/tools/jwt\";\n\n// reset previous auto refresh registrations\nexport function resetAutoRefresh(client: Client) {\n (client as any)._resetAutoRefresh?.();\n}\n\nexport function registerAutoRefresh(\n client: Client,\n threshold: number,\n refreshFunc: () => Promise,\n reauthenticateFunc: () => Promise,\n) {\n resetAutoRefresh(client);\n\n const oldBeforeSend = client.beforeSend;\n const oldModel = client.authStore.record;\n\n // unset the auto refresh in case the auth store was cleared\n // OR a new model was authenticated\n const unsubStoreChange = client.authStore.onChange((newToken, model) => {\n if (\n !newToken ||\n model?.id != oldModel?.id ||\n ((model?.collectionId || oldModel?.collectionId) &&\n model?.collectionId != oldModel?.collectionId)\n ) {\n resetAutoRefresh(client);\n }\n });\n\n // initialize a reset function and attach it dynamically to the client\n (client as any)._resetAutoRefresh = function () {\n unsubStoreChange();\n client.beforeSend = oldBeforeSend;\n delete (client as any)._resetAutoRefresh;\n };\n\n client.beforeSend = async (url, sendOptions) => {\n const oldToken = client.authStore.token;\n\n if (sendOptions.query?.autoRefresh) {\n return oldBeforeSend ? oldBeforeSend(url, sendOptions) : { url, sendOptions };\n }\n\n let isValid = client.authStore.isValid;\n if (\n // is loosely valid\n isValid &&\n // but it is going to expire in the next \"threshold\" seconds\n isTokenExpired(client.authStore.token, threshold)\n ) {\n try {\n await refreshFunc();\n } catch (_) {\n isValid = false;\n }\n }\n\n // still invalid -> reauthenticate\n if (!isValid) {\n await reauthenticateFunc();\n }\n\n // the request wasn't sent with a custom token\n const headers = sendOptions.headers || {};\n for (let key in headers) {\n if (\n key.toLowerCase() == \"authorization\" &&\n // the request wasn't sent with a custom token\n oldToken == headers[key] &&\n client.authStore.token\n ) {\n // set the latest store token\n headers[key] = client.authStore.token;\n break;\n }\n }\n sendOptions.headers = headers;\n\n return oldBeforeSend ? oldBeforeSend(url, sendOptions) : { url, sendOptions };\n };\n}\n","import Client from \"@/Client\";\nimport { ClientResponseError } from \"@/ClientResponseError\";\nimport { RealtimeService, UnsubscribeFunc } from \"@/services/RealtimeService\";\nimport { BaseAuthStore } from \"@/stores/BaseAuthStore\";\nimport { CrudService } from \"@/services/CrudService\";\nimport { ListResult, RecordModel } from \"@/tools/dtos\";\nimport { normalizeLegacyOptionsArgs } from \"@/tools/legacy\";\nimport {\n CommonOptions,\n RecordFullListOptions,\n RecordListOptions,\n RecordOptions,\n SendOptions,\n RecordSubscribeOptions,\n} from \"@/tools/options\";\nimport { getTokenPayload } from \"@/tools/jwt\";\nimport { registerAutoRefresh, resetAutoRefresh } from \"@/tools/refresh\";\n\nexport interface RecordAuthResponse {\n /**\n * The signed PocketBase auth record.\n */\n record: T;\n\n /**\n * The PocketBase record auth token.\n *\n * If you are looking for the OAuth2 access and refresh tokens\n * they are available under the `meta.accessToken` and `meta.refreshToken` props.\n */\n token: string;\n\n /**\n * Auth meta data usually filled when OAuth2 is used.\n */\n meta?: { [key: string]: any };\n}\n\nexport interface AuthProviderInfo {\n name: string;\n displayName: string;\n state: string;\n authURL: string;\n codeVerifier: string;\n codeChallenge: string;\n codeChallengeMethod: string;\n}\n\nexport interface AuthMethodsList {\n mfa: {\n enabled: boolean;\n duration: number;\n };\n otp: {\n enabled: boolean;\n duration: number;\n };\n password: {\n enabled: boolean;\n identityFields: Array;\n };\n oauth2: {\n enabled: boolean;\n providers: Array;\n };\n}\n\nexport interface RecordSubscription {\n action: string; // eg. create, update, delete\n record: T;\n}\n\nexport type OAuth2UrlCallback = (url: string) => void | Promise;\n\nexport interface OAuth2AuthConfig extends SendOptions {\n // the name of the OAuth2 provider (eg. \"google\")\n provider: string;\n\n // custom scopes to overwrite the default ones\n scopes?: Array;\n\n // optional record create data\n createData?: { [key: string]: any };\n\n // optional callback that is triggered after the OAuth2 sign-in/sign-up url generation\n urlCallback?: OAuth2UrlCallback;\n\n // optional query params to send with the PocketBase auth request (eg. fields, expand, etc.)\n query?: RecordOptions;\n}\n\nexport interface OTPResponse {\n otpId: string;\n}\n\nexport class RecordService extends CrudService {\n readonly collectionIdOrName: string;\n\n constructor(client: Client, collectionIdOrName: string) {\n super(client);\n\n this.collectionIdOrName = collectionIdOrName;\n }\n\n /**\n * @inheritdoc\n */\n get baseCrudPath(): string {\n return this.baseCollectionPath + \"/records\";\n }\n\n /**\n * Returns the current collection service base path.\n */\n get baseCollectionPath(): string {\n return \"/api/collections/\" + encodeURIComponent(this.collectionIdOrName);\n }\n\n /**\n * Returns whether the current service collection is superusers.\n */\n get isSuperusers(): boolean {\n return (\n this.collectionIdOrName == \"_superusers\" ||\n this.collectionIdOrName == \"_pbc_2773867675\"\n );\n }\n\n // ---------------------------------------------------------------\n // Realtime handlers\n // ---------------------------------------------------------------\n\n /**\n * Subscribe to realtime changes to the specified topic (\"*\" or record id).\n *\n * If `topic` is the wildcard \"*\", then this method will subscribe to\n * any record changes in the collection.\n *\n * If `topic` is a record id, then this method will subscribe only\n * to changes of the specified record id.\n *\n * It's OK to subscribe multiple times to the same topic.\n * You can use the returned `UnsubscribeFunc` to remove only a single subscription.\n * Or use `unsubscribe(topic)` if you want to remove all subscriptions attached to the topic.\n */\n async subscribe(\n topic: string,\n callback: (data: RecordSubscription) => void,\n options?: RecordSubscribeOptions,\n ): Promise {\n if (!topic) {\n throw new Error(\"Missing topic.\");\n }\n\n if (!callback) {\n throw new Error(\"Missing subscription callback.\");\n }\n\n return this.client.realtime.subscribe(\n this.collectionIdOrName + \"/\" + topic,\n callback,\n options,\n );\n }\n\n /**\n * Unsubscribe from all subscriptions of the specified topic\n * (\"*\" or record id).\n *\n * If `topic` is not set, then this method will unsubscribe from\n * all subscriptions associated to the current collection.\n */\n async unsubscribe(topic?: string): Promise {\n // unsubscribe from the specified topic\n if (topic) {\n return this.client.realtime.unsubscribe(\n this.collectionIdOrName + \"/\" + topic,\n );\n }\n\n // unsubscribe from everything related to the collection\n return this.client.realtime.unsubscribeByPrefix(this.collectionIdOrName);\n }\n\n // ---------------------------------------------------------------\n // Crud handers\n // ---------------------------------------------------------------\n /**\n * @inheritdoc\n */\n async getFullList(options?: RecordFullListOptions): Promise>;\n\n /**\n * @inheritdoc\n */\n async getFullList(\n batch?: number,\n options?: RecordListOptions,\n ): Promise>;\n\n /**\n * @inheritdoc\n */\n async getFullList(\n batchOrOptions?: number | RecordFullListOptions,\n options?: RecordListOptions,\n ): Promise> {\n if (typeof batchOrOptions == \"number\") {\n return super.getFullList(batchOrOptions, options);\n }\n\n const params = Object.assign({}, batchOrOptions, options);\n\n return super.getFullList(params);\n }\n\n /**\n * @inheritdoc\n */\n async getList(\n page = 1,\n perPage = 30,\n options?: RecordListOptions,\n ): Promise> {\n return super.getList(page, perPage, options);\n }\n\n /**\n * @inheritdoc\n */\n async getFirstListItem(\n filter: string,\n options?: RecordListOptions,\n ): Promise {\n return super.getFirstListItem(filter, options);\n }\n\n /**\n * @inheritdoc\n */\n async getOne(id: string, options?: RecordOptions): Promise {\n return super.getOne(id, options);\n }\n\n /**\n * @inheritdoc\n */\n async create(\n bodyParams?: { [key: string]: any } | FormData,\n options?: RecordOptions,\n ): Promise {\n return super.create(bodyParams, options);\n }\n\n /**\n * @inheritdoc\n *\n * If the current `client.authStore.record` matches with the updated id, then\n * on success the `client.authStore.record` will be updated with the new response record fields.\n */\n async update(\n id: string,\n bodyParams?: { [key: string]: any } | FormData,\n options?: RecordOptions,\n ): Promise {\n return super.update(id, bodyParams, options).then((item) => {\n if (\n // is record auth\n this.client.authStore.record?.id === item?.id &&\n (this.client.authStore.record?.collectionId === this.collectionIdOrName ||\n this.client.authStore.record?.collectionName ===\n this.collectionIdOrName)\n ) {\n let authExpand = Object.assign({}, this.client.authStore.record.expand);\n let authRecord = Object.assign({}, this.client.authStore.record, item);\n if (authExpand) {\n // for now \"merge\" only top-level expand\n authRecord.expand = Object.assign(authExpand, item.expand);\n }\n\n this.client.authStore.save(this.client.authStore.token, authRecord);\n }\n\n return item as any as T;\n });\n }\n\n /**\n * @inheritdoc\n *\n * If the current `client.authStore.record` matches with the deleted id,\n * then on success the `client.authStore` will be cleared.\n */\n async delete(id: string, options?: CommonOptions): Promise {\n return super.delete(id, options).then((success) => {\n if (\n success &&\n // is record auth\n this.client.authStore.record?.id === id &&\n (this.client.authStore.record?.collectionId === this.collectionIdOrName ||\n this.client.authStore.record?.collectionName ===\n this.collectionIdOrName)\n ) {\n this.client.authStore.clear();\n }\n\n return success;\n });\n }\n\n // ---------------------------------------------------------------\n // Auth handlers\n // ---------------------------------------------------------------\n\n /**\n * Prepare successful collection authorization response.\n */\n protected authResponse(responseData: any): RecordAuthResponse {\n const record = this.decode(responseData?.record || {});\n\n this.client.authStore.save(responseData?.token, record as any);\n\n return Object.assign({}, responseData, {\n // normalize common fields\n token: responseData?.token || \"\",\n record: record as any as T,\n });\n }\n\n /**\n * Returns all available collection auth methods.\n *\n * @throws {ClientResponseError}\n */\n async listAuthMethods(options?: CommonOptions): Promise {\n options = Object.assign(\n {\n method: \"GET\",\n // @todo remove after deleting the pre v0.23 API response fields\n fields: \"mfa,otp,password,oauth2\",\n },\n options,\n );\n\n return this.client.send(this.baseCollectionPath + \"/auth-methods\", options);\n }\n\n /**\n * Authenticate a single auth collection record via its username/email and password.\n *\n * On success, this method also automatically updates\n * the client's AuthStore data and returns:\n * - the authentication token\n * - the authenticated record model\n *\n * @throws {ClientResponseError}\n */\n async authWithPassword(\n usernameOrEmail: string,\n password: string,\n options?: RecordOptions,\n ): Promise> {\n options = Object.assign(\n {\n method: \"POST\",\n body: {\n identity: usernameOrEmail,\n password: password,\n },\n },\n options,\n );\n\n // note: consider to deprecate\n let autoRefreshThreshold;\n if (this.isSuperusers) {\n autoRefreshThreshold = options.autoRefreshThreshold;\n delete options.autoRefreshThreshold;\n if (!options.autoRefresh) {\n resetAutoRefresh(this.client);\n }\n }\n\n let authData = await this.client.send(\n this.baseCollectionPath + \"/auth-with-password\",\n options,\n );\n\n authData = this.authResponse(authData);\n\n if (autoRefreshThreshold && this.isSuperusers) {\n registerAutoRefresh(\n this.client,\n autoRefreshThreshold,\n () => this.authRefresh({ autoRefresh: true }),\n () =>\n this.authWithPassword(\n usernameOrEmail,\n password,\n Object.assign({ autoRefresh: true }, options),\n ),\n );\n }\n\n return authData;\n }\n\n /**\n * Authenticate a single auth collection record with OAuth2 code.\n *\n * If you don't have an OAuth2 code you may also want to check `authWithOAuth2` method.\n *\n * On success, this method also automatically updates\n * the client's AuthStore data and returns:\n * - the authentication token\n * - the authenticated record model\n * - the OAuth2 account data (eg. name, email, avatar, etc.)\n *\n * @throws {ClientResponseError}\n */\n async authWithOAuth2Code(\n provider: string,\n code: string,\n codeVerifier: string,\n redirectURL: string,\n createData?: { [key: string]: any },\n options?: RecordOptions,\n ): Promise>;\n\n /**\n * @deprecated\n * Consider using authWithOAuth2Code(provider, code, codeVerifier, redirectURL, createdData, options?).\n */\n async authWithOAuth2Code(\n provider: string,\n code: string,\n codeVerifier: string,\n redirectURL: string,\n createData?: { [key: string]: any },\n body?: any,\n query?: any,\n ): Promise>;\n\n async authWithOAuth2Code(\n provider: string,\n code: string,\n codeVerifier: string,\n redirectURL: string,\n createData?: { [key: string]: any },\n bodyOrOptions?: any,\n query?: any,\n ): Promise> {\n let options: any = {\n method: \"POST\",\n body: {\n provider: provider,\n code: code,\n codeVerifier: codeVerifier,\n redirectURL: redirectURL,\n createData: createData,\n },\n };\n\n options = normalizeLegacyOptionsArgs(\n \"This form of authWithOAuth2Code(provider, code, codeVerifier, redirectURL, createData?, body?, query?) is deprecated. Consider replacing it with authWithOAuth2Code(provider, code, codeVerifier, redirectURL, createData?, options?).\",\n options,\n bodyOrOptions,\n query,\n );\n\n return this.client\n .send(this.baseCollectionPath + \"/auth-with-oauth2\", options)\n .then((data) => this.authResponse(data));\n }\n\n /**\n * @deprecated This form of authWithOAuth2 is deprecated.\n *\n * Please use `authWithOAuth2Code()` OR its simplified realtime version\n * as shown in https://pocketbase.io/docs/authentication/#oauth2-integration.\n */\n async authWithOAuth2(\n provider: string,\n code: string,\n codeVerifier: string,\n redirectURL: string,\n createData?: { [key: string]: any },\n bodyParams?: { [key: string]: any },\n queryParams?: RecordOptions,\n ): Promise>;\n\n /**\n * Authenticate a single auth collection record with OAuth2\n * **without custom redirects, deeplinks or even page reload**.\n *\n * This method initializes a one-off realtime subscription and will\n * open a popup window with the OAuth2 vendor page to authenticate.\n * Once the external OAuth2 sign-in/sign-up flow is completed, the popup\n * window will be automatically closed and the OAuth2 data sent back\n * to the user through the previously established realtime connection.\n *\n * You can specify an optional `urlCallback` prop to customize\n * the default url `window.open` behavior.\n *\n * On success, this method also automatically updates\n * the client's AuthStore data and returns:\n * - the authentication token\n * - the authenticated record model\n * - the OAuth2 account data (eg. name, email, avatar, etc.)\n *\n * Example:\n *\n * ```js\n * const authData = await pb.collection(\"users\").authWithOAuth2({\n * provider: \"google\",\n * })\n * ```\n *\n * Note1: When creating the OAuth2 app in the provider dashboard\n * you have to configure `https://yourdomain.com/api/oauth2-redirect`\n * as redirect URL.\n *\n * Note2: Safari may block the default `urlCallback` popup because\n * it doesn't allow `window.open` calls as part of an `async` click functions.\n * To workaround this you can either change your click handler to not be marked as `async`\n * OR manually call `window.open` before your `async` function and use the\n * window reference in your own custom `urlCallback` (see https://github.com/pocketbase/pocketbase/discussions/2429#discussioncomment-5943061).\n * For example:\n * ```js\n * \n * ...\n * document.getElementById(\"btn\").addEventListener(\"click\", () => {\n * pb.collection(\"users\").authWithOAuth2({\n * provider: \"gitlab\",\n * }).then((authData) => {\n * console.log(authData)\n * }).catch((err) => {\n * console.log(err, err.originalError);\n * });\n * })\n * ```\n *\n * @throws {ClientResponseError}\n */\n async authWithOAuth2(\n options: OAuth2AuthConfig,\n ): Promise>;\n\n authWithOAuth2(...args: any): Promise> {\n // fallback to legacy format\n if (args.length > 1 || typeof args?.[0] === \"string\") {\n console.warn(\n \"PocketBase: This form of authWithOAuth2() is deprecated and may get removed in the future. Please replace with authWithOAuth2Code() OR use the authWithOAuth2() realtime form as shown in https://pocketbase.io/docs/authentication/#oauth2-integration.\",\n );\n return this.authWithOAuth2Code(\n args?.[0] || \"\",\n args?.[1] || \"\",\n args?.[2] || \"\",\n args?.[3] || \"\",\n args?.[4] || {},\n args?.[5] || {},\n args?.[6] || {},\n );\n }\n\n const config = args?.[0] || {};\n\n // open a new popup window in case config.urlCallback is not set\n //\n // note: it is opened before any async calls due to Safari restrictions\n // (see https://github.com/pocketbase/pocketbase/discussions/2429#discussioncomment-5943061)\n let eagerDefaultPopup: Window | null = null;\n if (!config.urlCallback) {\n eagerDefaultPopup = openBrowserPopup(undefined);\n }\n\n // initialize a one-off realtime service\n const realtime = new RealtimeService(this.client);\n\n function cleanup() {\n eagerDefaultPopup?.close();\n realtime.unsubscribe();\n }\n\n const requestKeyOptions: SendOptions = {};\n const requestKey = config.requestKey;\n if (requestKey) {\n requestKeyOptions.requestKey = requestKey;\n }\n\n return this.listAuthMethods(requestKeyOptions)\n .then((authMethods) => {\n const provider = authMethods.oauth2.providers.find(\n (p) => p.name === config.provider,\n );\n if (!provider) {\n throw new ClientResponseError(\n new Error(`Missing or invalid provider \"${config.provider}\".`),\n );\n }\n\n const redirectURL = this.client.buildURL(\"/api/oauth2-redirect\");\n\n // find the AbortController associated with the current request key (if any)\n const cancelController = requestKey\n ? this.client[\"cancelControllers\"]?.[requestKey]\n : undefined;\n if (cancelController) {\n cancelController.signal.onabort = () => {\n cleanup();\n };\n }\n\n return new Promise(async (resolve, reject) => {\n try {\n await realtime.subscribe(\"@oauth2\", async (e) => {\n const oldState = realtime.clientId;\n\n try {\n if (!e.state || oldState !== e.state) {\n throw new Error(\"State parameters don't match.\");\n }\n\n if (e.error || !e.code) {\n throw new Error(\n \"OAuth2 redirect error or missing code: \" +\n e.error,\n );\n }\n\n // clear the non SendOptions props\n const options = Object.assign({}, config);\n delete options.provider;\n delete options.scopes;\n delete options.createData;\n delete options.urlCallback;\n\n // reset the cancelController listener as it will be triggered by the next api call\n if (cancelController?.signal?.onabort) {\n cancelController.signal.onabort = null;\n }\n\n const authData = await this.authWithOAuth2Code(\n provider.name,\n e.code,\n provider.codeVerifier,\n redirectURL,\n config.createData,\n options,\n );\n\n resolve(authData);\n } catch (err) {\n reject(new ClientResponseError(err));\n }\n\n cleanup();\n });\n\n const replacements: { [key: string]: any } = {\n state: realtime.clientId,\n };\n if (config.scopes?.length) {\n replacements[\"scope\"] = config.scopes.join(\" \");\n }\n\n const url = this._replaceQueryParams(\n provider.authURL + redirectURL,\n replacements,\n );\n\n let urlCallback =\n config.urlCallback ||\n function (url: string) {\n if (eagerDefaultPopup) {\n eagerDefaultPopup.location.href = url;\n } else {\n // it could have been blocked due to its empty initial url,\n // try again...\n eagerDefaultPopup = openBrowserPopup(url);\n }\n };\n\n await urlCallback(url);\n } catch (err) {\n cleanup();\n reject(new ClientResponseError(err));\n }\n });\n })\n .catch((err) => {\n cleanup();\n throw err; // rethrow\n }) as Promise>;\n }\n\n /**\n * Refreshes the current authenticated record instance and\n * returns a new token and record data.\n *\n * On success this method also automatically updates the client's AuthStore.\n *\n * @throws {ClientResponseError}\n */\n async authRefresh(options?: RecordOptions): Promise>;\n\n /**\n * @deprecated\n * Consider using authRefresh(options?).\n */\n async authRefresh(body?: any, query?: any): Promise>;\n\n async authRefresh(\n bodyOrOptions?: any,\n query?: any,\n ): Promise> {\n let options: any = {\n method: \"POST\",\n };\n\n options = normalizeLegacyOptionsArgs(\n \"This form of authRefresh(body?, query?) is deprecated. Consider replacing it with authRefresh(options?).\",\n options,\n bodyOrOptions,\n query,\n );\n\n return this.client\n .send(this.baseCollectionPath + \"/auth-refresh\", options)\n .then((data) => this.authResponse(data));\n }\n\n /**\n * Sends auth record password reset request.\n *\n * @throws {ClientResponseError}\n */\n async requestPasswordReset(email: string, options?: CommonOptions): Promise;\n\n /**\n * @deprecated\n * Consider using requestPasswordReset(email, options?).\n */\n async requestPasswordReset(email: string, body?: any, query?: any): Promise;\n\n async requestPasswordReset(\n email: string,\n bodyOrOptions?: any,\n query?: any,\n ): Promise {\n let options: any = {\n method: \"POST\",\n body: {\n email: email,\n },\n };\n\n options = normalizeLegacyOptionsArgs(\n \"This form of requestPasswordReset(email, body?, query?) is deprecated. Consider replacing it with requestPasswordReset(email, options?).\",\n options,\n bodyOrOptions,\n query,\n );\n\n return this.client\n .send(this.baseCollectionPath + \"/request-password-reset\", options)\n .then(() => true);\n }\n\n /**\n * Confirms auth record password reset request.\n *\n * @throws {ClientResponseError}\n */\n async confirmPasswordReset(\n passwordResetToken: string,\n password: string,\n passwordConfirm: string,\n options?: CommonOptions,\n ): Promise;\n\n /**\n * @deprecated\n * Consider using confirmPasswordReset(passwordResetToken, password, passwordConfirm, options?).\n */\n async confirmPasswordReset(\n passwordResetToken: string,\n password: string,\n passwordConfirm: string,\n body?: any,\n query?: any,\n ): Promise;\n\n async confirmPasswordReset(\n passwordResetToken: string,\n password: string,\n passwordConfirm: string,\n bodyOrOptions?: any,\n query?: any,\n ): Promise {\n let options: any = {\n method: \"POST\",\n body: {\n token: passwordResetToken,\n password: password,\n passwordConfirm: passwordConfirm,\n },\n };\n\n options = normalizeLegacyOptionsArgs(\n \"This form of confirmPasswordReset(token, password, passwordConfirm, body?, query?) is deprecated. Consider replacing it with confirmPasswordReset(token, password, passwordConfirm, options?).\",\n options,\n bodyOrOptions,\n query,\n );\n\n return this.client\n .send(this.baseCollectionPath + \"/confirm-password-reset\", options)\n .then(() => true);\n }\n\n /**\n * Sends auth record verification email request.\n *\n * @throws {ClientResponseError}\n */\n async requestVerification(email: string, options?: CommonOptions): Promise;\n\n /**\n * @deprecated\n * Consider using requestVerification(email, options?).\n */\n async requestVerification(email: string, body?: any, query?: any): Promise;\n\n async requestVerification(\n email: string,\n bodyOrOptions?: any,\n query?: any,\n ): Promise {\n let options: any = {\n method: \"POST\",\n body: {\n email: email,\n },\n };\n\n options = normalizeLegacyOptionsArgs(\n \"This form of requestVerification(email, body?, query?) is deprecated. Consider replacing it with requestVerification(email, options?).\",\n options,\n bodyOrOptions,\n query,\n );\n\n return this.client\n .send(this.baseCollectionPath + \"/request-verification\", options)\n .then(() => true);\n }\n\n /**\n * Confirms auth record email verification request.\n *\n * If the current `client.authStore.record` matches with the auth record from the token,\n * then on success the `client.authStore.record.verified` will be updated to `true`.\n *\n * @throws {ClientResponseError}\n */\n async confirmVerification(\n verificationToken: string,\n options?: CommonOptions,\n ): Promise;\n\n /**\n * @deprecated\n * Consider using confirmVerification(verificationToken, options?).\n */\n async confirmVerification(\n verificationToken: string,\n body?: any,\n query?: any,\n ): Promise;\n\n async confirmVerification(\n verificationToken: string,\n bodyOrOptions?: any,\n query?: any,\n ): Promise {\n let options: any = {\n method: \"POST\",\n body: {\n token: verificationToken,\n },\n };\n\n options = normalizeLegacyOptionsArgs(\n \"This form of confirmVerification(token, body?, query?) is deprecated. Consider replacing it with confirmVerification(token, options?).\",\n options,\n bodyOrOptions,\n query,\n );\n\n return this.client\n .send(this.baseCollectionPath + \"/confirm-verification\", options)\n .then(() => {\n // on success manually update the current auth record verified state\n const payload = getTokenPayload(verificationToken);\n const model = this.client.authStore.record;\n if (\n model &&\n !model.verified &&\n model.id === payload.id &&\n model.collectionId === payload.collectionId\n ) {\n model.verified = true;\n this.client.authStore.save(this.client.authStore.token, model);\n }\n\n return true;\n });\n }\n\n /**\n * Sends an email change request to the authenticated record model.\n *\n * @throws {ClientResponseError}\n */\n async requestEmailChange(newEmail: string, options?: CommonOptions): Promise;\n\n /**\n * @deprecated\n * Consider using requestEmailChange(newEmail, options?).\n */\n async requestEmailChange(newEmail: string, body?: any, query?: any): Promise;\n\n async requestEmailChange(\n newEmail: string,\n bodyOrOptions?: any,\n query?: any,\n ): Promise {\n let options: any = {\n method: \"POST\",\n body: {\n newEmail: newEmail,\n },\n };\n\n options = normalizeLegacyOptionsArgs(\n \"This form of requestEmailChange(newEmail, body?, query?) is deprecated. Consider replacing it with requestEmailChange(newEmail, options?).\",\n options,\n bodyOrOptions,\n query,\n );\n\n return this.client\n .send(this.baseCollectionPath + \"/request-email-change\", options)\n .then(() => true);\n }\n\n /**\n * Confirms auth record's new email address.\n *\n * If the current `client.authStore.record` matches with the auth record from the token,\n * then on success the `client.authStore` will be cleared.\n *\n * @throws {ClientResponseError}\n */\n async confirmEmailChange(\n emailChangeToken: string,\n password: string,\n options?: CommonOptions,\n ): Promise;\n\n /**\n * @deprecated\n * Consider using confirmEmailChange(emailChangeToken, password, options?).\n */\n async confirmEmailChange(\n emailChangeToken: string,\n password: string,\n body?: any,\n query?: any,\n ): Promise;\n\n async confirmEmailChange(\n emailChangeToken: string,\n password: string,\n bodyOrOptions?: any,\n query?: any,\n ): Promise {\n let options: any = {\n method: \"POST\",\n body: {\n token: emailChangeToken,\n password: password,\n },\n };\n\n options = normalizeLegacyOptionsArgs(\n \"This form of confirmEmailChange(token, password, body?, query?) is deprecated. Consider replacing it with confirmEmailChange(token, password, options?).\",\n options,\n bodyOrOptions,\n query,\n );\n\n return this.client\n .send(this.baseCollectionPath + \"/confirm-email-change\", options)\n .then(() => {\n const payload = getTokenPayload(emailChangeToken);\n const model = this.client.authStore.record;\n if (\n model &&\n model.id === payload.id &&\n model.collectionId === payload.collectionId\n ) {\n this.client.authStore.clear();\n }\n\n return true;\n });\n }\n\n /**\n * @deprecated use collection(\"_externalAuths\").*\n *\n * Lists all linked external auth providers for the specified auth record.\n *\n * @throws {ClientResponseError}\n */\n async listExternalAuths(\n recordId: string,\n options?: CommonOptions,\n ): Promise> {\n return this.client.collection(\"_externalAuths\").getFullList(\n Object.assign({}, options, {\n filter: this.client.filter(\"recordRef = {:id}\", { id: recordId }),\n }),\n );\n }\n\n /**\n * @deprecated use collection(\"_externalAuths\").*\n *\n * Unlink a single external auth provider from the specified auth record.\n *\n * @throws {ClientResponseError}\n */\n async unlinkExternalAuth(\n recordId: string,\n provider: string,\n options?: CommonOptions,\n ): Promise {\n const ea = await this.client.collection(\"_externalAuths\").getFirstListItem(\n this.client.filter(\"recordRef = {:recordId} && provider = {:provider}\", {\n recordId,\n provider,\n }),\n );\n\n return this.client\n .collection(\"_externalAuths\")\n .delete(ea.id, options)\n .then(() => true);\n }\n\n /**\n * Sends auth record OTP to the provided email.\n *\n * @throws {ClientResponseError}\n */\n async requestOTP(email: string, options?: CommonOptions): Promise {\n options = Object.assign(\n {\n method: \"POST\",\n body: { email: email },\n },\n options,\n );\n\n return this.client.send(this.baseCollectionPath + \"/request-otp\", options);\n }\n\n /**\n * Authenticate a single auth collection record via OTP.\n *\n * On success, this method also automatically updates\n * the client's AuthStore data and returns:\n * - the authentication token\n * - the authenticated record model\n *\n * @throws {ClientResponseError}\n */\n async authWithOTP(\n otpId: string,\n password: string,\n options?: CommonOptions,\n ): Promise> {\n options = Object.assign(\n {\n method: \"POST\",\n body: { otpId, password },\n },\n options,\n );\n\n return this.client\n .send(this.baseCollectionPath + \"/auth-with-otp\", options)\n .then((data) => this.authResponse(data));\n }\n\n /**\n * Impersonate authenticates with the specified recordId and\n * returns a new client with the received auth token in a memory store.\n *\n * If `duration` is 0 the generated auth token will fallback\n * to the default collection auth token duration.\n *\n * This action currently requires superusers privileges.\n *\n * @throws {ClientResponseError}\n */\n async impersonate(\n recordId: string,\n duration: number,\n options?: CommonOptions,\n ): Promise {\n options = Object.assign(\n {\n method: \"POST\",\n body: { duration: duration },\n },\n options,\n );\n options.headers = options.headers || {};\n if (!options.headers.Authorization) {\n options.headers.Authorization = this.client.authStore.token;\n }\n\n // create a new client loaded with the impersonated auth state\n // ---\n const client = new Client(\n this.client.baseURL,\n new BaseAuthStore(),\n this.client.lang,\n );\n\n const authData = await client.send(\n this.baseCollectionPath + \"/impersonate/\" + encodeURIComponent(recordId),\n options,\n );\n\n client.authStore.save(authData?.token, this.decode(authData?.record || {}));\n // ---\n\n return client;\n }\n\n // ---------------------------------------------------------------\n\n // very rudimentary url query params replacement because at the moment\n // URL (and URLSearchParams) doesn't seem to be fully supported in React Native\n //\n // note: for details behind some of the decode/encode parsing check https://unixpapa.com/js/querystring.html\n private _replaceQueryParams(\n url: string,\n replacements: { [key: string]: any } = {},\n ): string {\n let urlPath = url;\n let query = \"\";\n\n const queryIndex = url.indexOf(\"?\");\n if (queryIndex >= 0) {\n urlPath = url.substring(0, url.indexOf(\"?\"));\n query = url.substring(url.indexOf(\"?\") + 1);\n }\n\n const parsedParams: { [key: string]: string } = {};\n\n // parse the query parameters\n const rawParams = query.split(\"&\");\n for (const param of rawParams) {\n if (param == \"\") {\n continue;\n }\n\n const pair = param.split(\"=\");\n parsedParams[decodeURIComponent(pair[0].replace(/\\+/g, \" \"))] =\n decodeURIComponent((pair[1] || \"\").replace(/\\+/g, \" \"));\n }\n\n // apply the replacements\n for (let key in replacements) {\n if (!replacements.hasOwnProperty(key)) {\n continue;\n }\n\n if (replacements[key] == null) {\n delete parsedParams[key];\n } else {\n parsedParams[key] = replacements[key];\n }\n }\n\n // construct back the full query string\n query = \"\";\n for (let key in parsedParams) {\n if (!parsedParams.hasOwnProperty(key)) {\n continue;\n }\n\n if (query != \"\") {\n query += \"&\";\n }\n\n query +=\n encodeURIComponent(key.replace(/%20/g, \"+\")) +\n \"=\" +\n encodeURIComponent(parsedParams[key].replace(/%20/g, \"+\"));\n }\n\n return query != \"\" ? urlPath + \"?\" + query : urlPath;\n }\n}\n\nfunction openBrowserPopup(url?: string): Window | null {\n if (typeof window === \"undefined\" || !window?.open) {\n throw new ClientResponseError(\n new Error(\n `Not in a browser context - please pass a custom urlCallback function.`,\n ),\n );\n }\n\n let width = 1024;\n let height = 768;\n\n let windowWidth = window.innerWidth;\n let windowHeight = window.innerHeight;\n\n // normalize window size\n width = width > windowWidth ? windowWidth : width;\n height = height > windowHeight ? windowHeight : height;\n\n let left = windowWidth / 2 - width / 2;\n let top = windowHeight / 2 - height / 2;\n\n // note: we don't use the noopener and noreferrer attributes since\n // for some reason browser blocks such windows then url is undefined/blank\n return window.open(\n url,\n \"popup_window\",\n \"width=\" +\n width +\n \",height=\" +\n height +\n \",top=\" +\n top +\n \",left=\" +\n left +\n \",resizable,menubar=no\",\n );\n}\n","import { CrudService } from \"@/services/CrudService\";\nimport { CollectionModel } from \"@/tools/dtos\";\nimport { CommonOptions } from \"@/tools/options\";\n\nexport class CollectionService extends CrudService {\n /**\n * @inheritdoc\n */\n get baseCrudPath(): string {\n return \"/api/collections\";\n }\n\n /**\n * Imports the provided collections.\n *\n * If `deleteMissing` is `true`, all local collections and their fields,\n * that are not present in the imported configuration, WILL BE DELETED\n * (including their related records data)!\n *\n * @throws {ClientResponseError}\n */\n async import(\n collections: Array,\n deleteMissing: boolean = false,\n options?: CommonOptions,\n ): Promise {\n options = Object.assign(\n {\n method: \"PUT\",\n body: {\n collections: collections,\n deleteMissing: deleteMissing,\n },\n },\n options,\n );\n\n return this.client.send(this.baseCrudPath + \"/import\", options).then(() => true);\n }\n\n /**\n * Returns type indexed map with scaffolded collection models\n * populated with their default field values.\n *\n * @throws {ClientResponseError}\n */\n async getScaffolds(\n options?: CommonOptions,\n ): Promise<{ [key: string]: CollectionModel }> {\n options = Object.assign(\n {\n method: \"GET\",\n },\n options,\n );\n\n return this.client.send(this.baseCrudPath + \"/meta/scaffolds\", options);\n }\n\n /**\n * Deletes all records associated with the specified collection.\n *\n * @throws {ClientResponseError}\n */\n async truncate(collectionIdOrName: string, options?: CommonOptions): Promise {\n options = Object.assign(\n {\n method: \"DELETE\",\n },\n options,\n );\n\n return this.client\n .send(\n this.baseCrudPath +\n \"/\" +\n encodeURIComponent(collectionIdOrName) +\n \"/truncate\",\n options,\n )\n .then(() => true);\n }\n}\n","import { ClientResponseError } from \"@/ClientResponseError\";\nimport { BaseService } from \"@/services/BaseService\";\nimport { ListResult, LogModel } from \"@/tools/dtos\";\nimport { CommonOptions, ListOptions, LogStatsOptions } from \"@/tools/options\";\n\nexport interface HourlyStats {\n total: number;\n date: string;\n}\n\nexport class LogService extends BaseService {\n /**\n * Returns paginated logs list.\n *\n * @throws {ClientResponseError}\n */\n async getList(\n page = 1,\n perPage = 30,\n options?: ListOptions,\n ): Promise> {\n options = Object.assign({ method: \"GET\" }, options);\n\n options.query = Object.assign(\n {\n page: page,\n perPage: perPage,\n },\n options.query,\n );\n\n return this.client.send(\"/api/logs\", options);\n }\n\n /**\n * Returns a single log by its id.\n *\n * If `id` is empty it will throw a 404 error.\n *\n * @throws {ClientResponseError}\n */\n async getOne(id: string, options?: CommonOptions): Promise {\n if (!id) {\n throw new ClientResponseError({\n url: this.client.buildURL(\"/api/logs/\"),\n status: 404,\n response: {\n code: 404,\n message: \"Missing required log id.\",\n data: {},\n },\n });\n }\n\n options = Object.assign(\n {\n method: \"GET\",\n },\n options,\n );\n\n return this.client.send(\"/api/logs/\" + encodeURIComponent(id), options);\n }\n\n /**\n * Returns logs statistics.\n *\n * @throws {ClientResponseError}\n */\n async getStats(options?: LogStatsOptions): Promise> {\n options = Object.assign(\n {\n method: \"GET\",\n },\n options,\n );\n\n return this.client.send(\"/api/logs/stats\", options);\n }\n}\n","import { BaseService } from \"@/services/BaseService\";\nimport { CommonOptions } from \"@/tools/options\";\n\nexport interface HealthCheckResponse {\n code: number;\n message: string;\n data: { [key: string]: any };\n}\n\nexport class HealthService extends BaseService {\n /**\n * Checks the health status of the api.\n *\n * @throws {ClientResponseError}\n */\n async check(options?: CommonOptions): Promise {\n options = Object.assign(\n {\n method: \"GET\",\n },\n options,\n );\n\n return this.client.send(\"/api/health\", options);\n }\n}\n","import { BaseService } from \"@/services/BaseService\";\nimport { CommonOptions, FileOptions } from \"@/tools/options\";\n\nexport class FileService extends BaseService {\n /**\n * @deprecated Please replace with `pb.files.getURL()`.\n */\n getUrl(\n record: { [key: string]: any },\n filename: string,\n queryParams: FileOptions = {},\n ): string {\n console.warn(\"Please replace pb.files.getUrl() with pb.files.getURL()\");\n return this.getURL(record, filename, queryParams);\n }\n\n /**\n * Builds and returns an absolute record file url for the provided filename.\n */\n getURL(\n record: { [key: string]: any },\n filename: string,\n queryParams: FileOptions = {},\n ): string {\n if (\n !filename ||\n !record?.id ||\n !(record?.collectionId || record?.collectionName)\n ) {\n return \"\";\n }\n\n const parts = [];\n parts.push(\"api\");\n parts.push(\"files\");\n parts.push(encodeURIComponent(record.collectionId || record.collectionName));\n parts.push(encodeURIComponent(record.id));\n parts.push(encodeURIComponent(filename));\n\n let result = this.client.buildURL(parts.join(\"/\"));\n\n if (Object.keys(queryParams).length) {\n // normalize the download query param for consistency with the Dart sdk\n if (queryParams.download === false) {\n delete queryParams.download;\n }\n\n const params = new URLSearchParams(queryParams);\n\n result += (result.includes(\"?\") ? \"&\" : \"?\") + params;\n }\n\n return result;\n }\n\n /**\n * Requests a new private file access token for the current auth model.\n *\n * @throws {ClientResponseError}\n */\n async getToken(options?: CommonOptions): Promise {\n options = Object.assign(\n {\n method: \"POST\",\n },\n options,\n );\n\n return this.client\n .send(\"/api/files/token\", options)\n .then((data) => data?.token || \"\");\n }\n}\n","import { BaseService } from \"@/services/BaseService\";\nimport { CommonOptions } from \"@/tools/options\";\n\nexport interface BackupFileInfo {\n key: string;\n size: number;\n modified: string;\n}\n\nexport class BackupService extends BaseService {\n /**\n * Returns list with all available backup files.\n *\n * @throws {ClientResponseError}\n */\n async getFullList(options?: CommonOptions): Promise> {\n options = Object.assign(\n {\n method: \"GET\",\n },\n options,\n );\n\n return this.client.send(\"/api/backups\", options);\n }\n\n /**\n * Initializes a new backup.\n *\n * @throws {ClientResponseError}\n */\n async create(basename: string, options?: CommonOptions): Promise {\n options = Object.assign(\n {\n method: \"POST\",\n body: {\n name: basename,\n },\n },\n options,\n );\n\n return this.client.send(\"/api/backups\", options).then(() => true);\n }\n\n /**\n * Uploads an existing backup file.\n *\n * Example:\n *\n * ```js\n * await pb.backups.upload({\n * file: new Blob([...]),\n * });\n * ```\n *\n * @throws {ClientResponseError}\n */\n async upload(\n bodyParams: { [key: string]: any } | FormData,\n options?: CommonOptions,\n ): Promise {\n options = Object.assign(\n {\n method: \"POST\",\n body: bodyParams,\n },\n options,\n );\n\n return this.client.send(\"/api/backups/upload\", options).then(() => true);\n }\n\n /**\n * Deletes a single backup file.\n *\n * @throws {ClientResponseError}\n */\n async delete(key: string, options?: CommonOptions): Promise {\n options = Object.assign(\n {\n method: \"DELETE\",\n },\n options,\n );\n\n return this.client\n .send(`/api/backups/${encodeURIComponent(key)}`, options)\n .then(() => true);\n }\n\n /**\n * Initializes an app data restore from an existing backup.\n *\n * @throws {ClientResponseError}\n */\n async restore(key: string, options?: CommonOptions): Promise {\n options = Object.assign(\n {\n method: \"POST\",\n },\n options,\n );\n\n return this.client\n .send(`/api/backups/${encodeURIComponent(key)}/restore`, options)\n .then(() => true);\n }\n\n /**\n * @deprecated Please use `getDownloadURL()`.\n */\n getDownloadUrl(token: string, key: string): string {\n console.warn(\n \"Please replace pb.backups.getDownloadUrl() with pb.backups.getDownloadURL()\",\n );\n return this.getDownloadURL(token, key);\n }\n\n /**\n * Builds a download url for a single existing backup using a\n * superuser file token and the backup file key.\n *\n * The file token can be generated via `pb.files.getToken()`.\n */\n getDownloadURL(token: string, key: string): string {\n return this.client.buildURL(\n `/api/backups/${encodeURIComponent(key)}?token=${encodeURIComponent(token)}`,\n );\n }\n}\n","import { BaseService } from \"@/services/BaseService\";\nimport { CommonOptions } from \"@/tools/options\";\n\nexport interface CronJob {\n id: string;\n expression: string;\n}\n\nexport class CronService extends BaseService {\n /**\n * Returns list with all registered cron jobs.\n *\n * @throws {ClientResponseError}\n */\n async getFullList(options?: CommonOptions): Promise> {\n options = Object.assign(\n {\n method: \"GET\",\n },\n options,\n );\n\n return this.client.send(\"/api/crons\", options);\n }\n\n /**\n * Runs the specified cron job.\n *\n * @throws {ClientResponseError}\n */\n async run(jobId: string, options?: CommonOptions): Promise {\n options = Object.assign(\n {\n method: \"POST\",\n },\n options,\n );\n\n return this.client\n .send(`/api/crons/${encodeURIComponent(jobId)}`, options)\n .then(() => true);\n }\n}\n","/**\n * Checks if the specified value is a file (aka. File, Blob, RN file object).\n */\nexport function isFile(val: any): boolean {\n return (\n (typeof Blob !== \"undefined\" && val instanceof Blob) ||\n (typeof File !== \"undefined\" && val instanceof File) ||\n // check for React Native file object format\n // (see https://github.com/pocketbase/pocketbase/discussions/2002#discussioncomment-5254168)\n (val !== null &&\n typeof val === \"object\" &&\n val.uri &&\n ((typeof navigator !== \"undefined\" && navigator.product === \"ReactNative\") ||\n (typeof global !== \"undefined\" && (global as any).HermesInternal)))\n );\n}\n\n/**\n * Loosely checks if the specified body is a FormData instance.\n */\nexport function isFormData(body: any): boolean {\n return (\n body &&\n // we are checking the constructor name because FormData\n // is not available natively in some environments and the\n // polyfill(s) may not be globally accessible\n (body.constructor?.name === \"FormData\" ||\n // fallback to global FormData instance check\n // note: this is needed because the constructor.name could be different in case of\n // custom global FormData implementation, eg. React Native on Android/iOS\n (typeof FormData !== \"undefined\" && body instanceof FormData))\n );\n}\n\n/**\n * Checks if the submitted body object has at least one Blob/File field value.\n */\nexport function hasFileField(body: { [key: string]: any }): boolean {\n for (const key in body) {\n const values = Array.isArray(body[key]) ? body[key] : [body[key]];\n for (const v of values) {\n if (isFile(v)) {\n return true;\n }\n }\n }\n\n return false;\n}\n\n/**\n * Converts analyzes the provided body and converts it to FormData\n * in case a plain object with File/Blob values is used.\n */\nexport function convertToFormDataIfNeeded(body: any): any {\n if (\n typeof FormData === \"undefined\" ||\n typeof body === \"undefined\" ||\n typeof body !== \"object\" ||\n body === null ||\n isFormData(body) ||\n !hasFileField(body)\n ) {\n return body;\n }\n\n const form = new FormData();\n\n for (const key in body) {\n const val = body[key];\n\n // skip undefined values for consistency with JSON.stringify\n // (see https://github.com/pocketbase/pocketbase/issues/6731#issuecomment-2812382827)\n if (typeof val === \"undefined\") {\n continue;\n }\n\n if (typeof val === \"object\" && !hasFileField({ data: val })) {\n // send json-like values as jsonPayload to avoid the implicit string value normalization\n let payload: { [key: string]: any } = {};\n payload[key] = val;\n form.append(\"@jsonPayload\", JSON.stringify(payload));\n } else {\n // in case of mixed string and file/blob\n const normalizedVal = Array.isArray(val) ? val : [val];\n for (let v of normalizedVal) {\n form.append(key, v);\n }\n }\n }\n\n return form;\n}\n\n/**\n * Converts the provided FormData instance into a plain object.\n *\n * For consistency with the server multipart/form-data inferring,\n * the following normalization rules are applied for plain multipart string values:\n * - \"true\" is converted to the json \"true\"\n * - \"false\" is converted to the json \"false\"\n * - numeric strings are converted to json number ONLY if the resulted\n * minimal number string representation is the same as the provided raw string\n * (aka. scientific notations, \"Infinity\", \"0.0\", \"0001\", etc. are kept as string)\n * - any other string (empty string too) is left as it is\n */\nexport function convertFormDataToObject(formData: FormData): { [key: string]: any } {\n let result: { [key: string]: any } = {};\n\n formData.forEach((v, k) => {\n if (k === \"@jsonPayload\" && typeof v == \"string\") {\n try {\n let parsed = JSON.parse(v);\n Object.assign(result, parsed);\n } catch (err) {\n console.warn(\"@jsonPayload error:\", err);\n }\n } else {\n if (typeof result[k] !== \"undefined\") {\n if (!Array.isArray(result[k])) {\n result[k] = [result[k]];\n }\n result[k].push(inferFormDataValue(v));\n } else {\n result[k] = inferFormDataValue(v);\n }\n }\n });\n\n return result;\n}\n\nconst inferNumberCharsRegex = /^[\\-\\.\\d]+$/;\n\nfunction inferFormDataValue(value: any): any {\n if (typeof value != \"string\") {\n return value;\n }\n\n if (value == \"true\") {\n return true;\n }\n\n if (value == \"false\") {\n return false;\n }\n\n // note: expects the provided raw string to match exactly with the minimal string representation of the parsed number\n if (\n (value[0] === \"-\" || (value[0] >= \"0\" && value[0] <= \"9\")) &&\n inferNumberCharsRegex.test(value)\n ) {\n let num = +value;\n if (\"\" + num === value) {\n return num;\n }\n }\n\n return value;\n}\n","import { BaseService } from \"@/services/BaseService\";\nimport { isFile, isFormData, convertFormDataToObject } from \"@/tools/formdata\";\nimport {\n SendOptions,\n RecordOptions,\n normalizeUnknownQueryParams,\n serializeQueryParams,\n} from \"@/tools/options\";\n\nexport interface BatchRequest {\n method: string;\n url: string;\n json?: { [key: string]: any };\n files?: { [key: string]: Array };\n headers?: { [key: string]: string };\n}\n\nexport interface BatchRequestResult {\n status: number;\n body: any;\n}\n\nexport class BatchService extends BaseService {\n private requests: Array = [];\n private subs: { [key: string]: SubBatchService } = {};\n\n /**\n * Starts constructing a batch request entry for the specified collection.\n */\n collection(collectionIdOrName: string): SubBatchService {\n if (!this.subs[collectionIdOrName]) {\n this.subs[collectionIdOrName] = new SubBatchService(\n this.requests,\n collectionIdOrName,\n );\n }\n\n return this.subs[collectionIdOrName];\n }\n\n /**\n * Sends the batch requests.\n *\n * @throws {ClientResponseError}\n */\n async send(options?: SendOptions): Promise> {\n const formData = new FormData();\n\n const jsonData = [];\n\n for (let i = 0; i < this.requests.length; i++) {\n const req = this.requests[i];\n\n jsonData.push({\n method: req.method,\n url: req.url,\n headers: req.headers,\n body: req.json,\n });\n\n if (req.files) {\n for (let key in req.files) {\n const files = req.files[key] || [];\n for (let file of files) {\n formData.append(\"requests.\" + i + \".\" + key, file);\n }\n }\n }\n }\n\n formData.append(\"@jsonPayload\", JSON.stringify({ requests: jsonData }));\n\n options = Object.assign(\n {\n method: \"POST\",\n body: formData,\n },\n options,\n );\n\n return this.client.send(\"/api/batch\", options);\n }\n}\n\nexport class SubBatchService {\n private requests: Array = [];\n private readonly collectionIdOrName: string;\n\n constructor(requests: Array, collectionIdOrName: string) {\n this.requests = requests;\n this.collectionIdOrName = collectionIdOrName;\n }\n\n /**\n * Registers a record upsert request into the current batch queue.\n *\n * The request will be executed as update if `bodyParams` have a valid existing record `id` value, otherwise - create.\n */\n upsert(\n bodyParams?: { [key: string]: any } | FormData,\n options?: RecordOptions,\n ): void {\n options = Object.assign(\n {\n body: bodyParams || {},\n },\n options,\n );\n\n const request: BatchRequest = {\n method: \"PUT\",\n url:\n \"/api/collections/\" +\n encodeURIComponent(this.collectionIdOrName) +\n \"/records\",\n };\n\n this.prepareRequest(request, options);\n\n this.requests.push(request);\n }\n\n /**\n * Registers a record create request into the current batch queue.\n */\n create(\n bodyParams?: { [key: string]: any } | FormData,\n options?: RecordOptions,\n ): void {\n options = Object.assign(\n {\n body: bodyParams || {},\n },\n options,\n );\n\n const request: BatchRequest = {\n method: \"POST\",\n url:\n \"/api/collections/\" +\n encodeURIComponent(this.collectionIdOrName) +\n \"/records\",\n };\n\n this.prepareRequest(request, options);\n\n this.requests.push(request);\n }\n\n /**\n * Registers a record update request into the current batch queue.\n */\n update(\n id: string,\n bodyParams?: { [key: string]: any } | FormData,\n options?: RecordOptions,\n ): void {\n options = Object.assign(\n {\n body: bodyParams || {},\n },\n options,\n );\n\n const request: BatchRequest = {\n method: \"PATCH\",\n url:\n \"/api/collections/\" +\n encodeURIComponent(this.collectionIdOrName) +\n \"/records/\" +\n encodeURIComponent(id),\n };\n\n this.prepareRequest(request, options);\n\n this.requests.push(request);\n }\n\n /**\n * Registers a record delete request into the current batch queue.\n */\n delete(id: string, options?: SendOptions): void {\n options = Object.assign({}, options);\n\n const request: BatchRequest = {\n method: \"DELETE\",\n url:\n \"/api/collections/\" +\n encodeURIComponent(this.collectionIdOrName) +\n \"/records/\" +\n encodeURIComponent(id),\n };\n\n this.prepareRequest(request, options);\n\n this.requests.push(request);\n }\n\n private prepareRequest(request: BatchRequest, options: SendOptions) {\n normalizeUnknownQueryParams(options);\n\n request.headers = options.headers;\n request.json = {};\n request.files = {};\n\n // serialize query parameters\n // -----------------------------------------------------------\n if (typeof options.query !== \"undefined\") {\n const query = serializeQueryParams(options.query);\n if (query) {\n request.url += (request.url.includes(\"?\") ? \"&\" : \"?\") + query;\n }\n }\n\n // extract json and files body data\n // -----------------------------------------------------------\n let body = options.body;\n if (isFormData(body)) {\n body = convertFormDataToObject(body);\n }\n\n for (const key in body) {\n const val = body[key];\n\n if (isFile(val)) {\n request.files[key] = request.files[key] || [];\n request.files[key].push(val);\n } else if (Array.isArray(val)) {\n const foundFiles = [];\n const foundRegular = [];\n for (const v of val) {\n if (isFile(v)) {\n foundFiles.push(v);\n } else {\n foundRegular.push(v);\n }\n }\n\n if (foundFiles.length > 0 && foundFiles.length == val.length) {\n // only files\n // ---\n request.files[key] = request.files[key] || [];\n for (let file of foundFiles) {\n request.files[key].push(file);\n }\n } else {\n // empty or mixed array (both regular and File/Blob values)\n // ---\n request.json[key] = foundRegular;\n\n if (foundFiles.length > 0) {\n // add \"+\" to append if not already since otherwise\n // the existing regular files will be deleted\n // (the mixed values order is preserved only within their corresponding groups)\n let fileKey = key;\n if (!key.startsWith(\"+\") && !key.endsWith(\"+\")) {\n fileKey += \"+\";\n }\n\n request.files[fileKey] = request.files[fileKey] || [];\n for (let file of foundFiles) {\n request.files[fileKey].push(file);\n }\n }\n }\n } else {\n request.json[key] = val;\n }\n }\n }\n}\n","import { ClientResponseError } from \"@/ClientResponseError\";\nimport { BaseAuthStore } from \"@/stores/BaseAuthStore\";\nimport { LocalAuthStore } from \"@/stores/LocalAuthStore\";\nimport { SettingsService } from \"@/services/SettingsService\";\nimport { RecordService } from \"@/services/RecordService\";\nimport { CollectionService } from \"@/services/CollectionService\";\nimport { LogService } from \"@/services/LogService\";\nimport { RealtimeService } from \"@/services/RealtimeService\";\nimport { HealthService } from \"@/services/HealthService\";\nimport { FileService } from \"@/services/FileService\";\nimport { BackupService } from \"@/services/BackupService\";\nimport { CronService } from \"@/services/CronService\";\nimport { BatchService } from \"@/services/BatchService\";\nimport { RecordModel } from \"@/tools/dtos\";\nimport {\n SendOptions,\n FileOptions,\n normalizeUnknownQueryParams,\n serializeQueryParams,\n} from \"@/tools/options\";\nimport { isFormData, convertToFormDataIfNeeded } from \"@/tools/formdata\";\n\nexport interface BeforeSendResult {\n [key: string]: any; // for backward compatibility\n url?: string;\n options?: { [key: string]: any };\n}\n\n/**\n * PocketBase JS Client.\n */\nexport default class Client {\n /**\n * The base PocketBase backend url address (eg. 'http://127.0.0.1.8090').\n */\n baseURL: string;\n\n /**\n * Legacy getter alias for baseURL.\n * @deprecated Please replace with baseURL.\n */\n get baseUrl(): string {\n return this.baseURL;\n }\n\n /**\n * Legacy setter alias for baseURL.\n * @deprecated Please replace with baseURL.\n */\n set baseUrl(v: string) {\n this.baseURL = v;\n }\n\n /**\n * Hook that get triggered right before sending the fetch request,\n * allowing you to inspect and modify the url and request options.\n *\n * For list of the possible options check https://developer.mozilla.org/en-US/docs/Web/API/fetch#options\n *\n * You can return a non-empty result object `{ url, options }` to replace the url and request options entirely.\n *\n * Example:\n * ```js\n * const pb = new PocketBase(\"https://example.com\")\n *\n * pb.beforeSend = function (url, options) {\n * options.headers = Object.assign({}, options.headers, {\n * 'X-Custom-Header': 'example',\n * })\n *\n * return { url, options }\n * }\n *\n * // use the created client as usual...\n * ```\n */\n beforeSend?: (\n url: string,\n options: SendOptions,\n ) => BeforeSendResult | Promise;\n\n /**\n * Hook that get triggered after successfully sending the fetch request,\n * allowing you to inspect/modify the response object and its parsed data.\n *\n * Returns the new Promise resolved `data` that will be returned to the client.\n *\n * Example:\n * ```js\n * const pb = new PocketBase(\"https://example.com\")\n *\n * pb.afterSend = function (response, data, options) {\n * if (response.status != 200) {\n * throw new ClientResponseError({\n * url: response.url,\n * status: response.status,\n * response: { ... },\n * })\n * }\n *\n * return data;\n * }\n *\n * // use the created client as usual...\n * ```\n */\n afterSend?: ((response: Response, data: any) => any) &\n ((response: Response, data: any, options: SendOptions) => any);\n\n /**\n * Optional language code (default to `en-US`) that will be sent\n * with the requests to the server as `Accept-Language` header.\n */\n lang: string;\n\n /**\n * A replaceable instance of the local auth store service.\n */\n authStore: BaseAuthStore;\n\n /**\n * An instance of the service that handles the **Settings APIs**.\n */\n readonly settings: SettingsService;\n\n /**\n * An instance of the service that handles the **Collection APIs**.\n */\n readonly collections: CollectionService;\n\n /**\n * An instance of the service that handles the **File APIs**.\n */\n readonly files: FileService;\n\n /**\n * An instance of the service that handles the **Log APIs**.\n */\n readonly logs: LogService;\n\n /**\n * An instance of the service that handles the **Realtime APIs**.\n */\n readonly realtime: RealtimeService;\n\n /**\n * An instance of the service that handles the **Health APIs**.\n */\n readonly health: HealthService;\n\n /**\n * An instance of the service that handles the **Backup APIs**.\n */\n readonly backups: BackupService;\n\n /**\n * An instance of the service that handles the **Cron APIs**.\n */\n readonly crons: CronService;\n\n private cancelControllers: { [key: string]: AbortController } = {};\n private recordServices: { [key: string]: RecordService } = {};\n private enableAutoCancellation: boolean = true;\n\n constructor(baseURL = \"/\", authStore?: BaseAuthStore | null, lang = \"en-US\") {\n this.baseURL = baseURL;\n this.lang = lang;\n\n if (authStore) {\n this.authStore = authStore;\n } else if (typeof window != \"undefined\" && !!(window as any).Deno) {\n // note: to avoid common security issues we fallback to runtime/memory store in case the code is running in Deno env\n this.authStore = new BaseAuthStore();\n } else {\n this.authStore = new LocalAuthStore();\n }\n\n // common services\n this.collections = new CollectionService(this);\n this.files = new FileService(this);\n this.logs = new LogService(this);\n this.settings = new SettingsService(this);\n this.realtime = new RealtimeService(this);\n this.health = new HealthService(this);\n this.backups = new BackupService(this);\n this.crons = new CronService(this);\n }\n\n /**\n * @deprecated\n * With PocketBase v0.23.0 admins are converted to a regular auth\n * collection named \"_superusers\", aka. you can use directly collection(\"_superusers\").\n */\n get admins(): RecordService {\n return this.collection(\"_superusers\");\n }\n\n /**\n * Creates a new batch handler for sending multiple transactional\n * create/update/upsert/delete collection requests in one network call.\n *\n * Example:\n * ```js\n * const batch = pb.createBatch();\n *\n * batch.collection(\"example1\").create({ ... })\n * batch.collection(\"example2\").update(\"RECORD_ID\", { ... })\n * batch.collection(\"example3\").delete(\"RECORD_ID\")\n * batch.collection(\"example4\").upsert({ ... })\n *\n * await batch.send()\n * ```\n */\n createBatch(): BatchService {\n return new BatchService(this);\n }\n\n /**\n * Returns the RecordService associated to the specified collection.\n */\n collection(idOrName: string): RecordService {\n if (!this.recordServices[idOrName]) {\n this.recordServices[idOrName] = new RecordService(this, idOrName);\n }\n\n return this.recordServices[idOrName];\n }\n\n /**\n * Globally enable or disable auto cancellation for pending duplicated requests.\n */\n autoCancellation(enable: boolean): Client {\n this.enableAutoCancellation = !!enable;\n\n return this;\n }\n\n /**\n * Cancels single request by its cancellation key.\n */\n cancelRequest(requestKey: string): Client {\n if (this.cancelControllers[requestKey]) {\n this.cancelControllers[requestKey].abort();\n delete this.cancelControllers[requestKey];\n }\n\n return this;\n }\n\n /**\n * Cancels all pending requests.\n */\n cancelAllRequests(): Client {\n for (let k in this.cancelControllers) {\n this.cancelControllers[k].abort();\n }\n\n this.cancelControllers = {};\n\n return this;\n }\n\n /**\n * Constructs a filter expression with placeholders populated from a parameters object.\n *\n * Placeholder parameters are defined with the `{:paramName}` notation.\n *\n * The following parameter values are supported:\n *\n * - `string` (_single quotes are autoescaped_)\n * - `number`\n * - `boolean`\n * - `Date` object (_stringified into the PocketBase datetime format_)\n * - `null`\n * - everything else is converted to a string using `JSON.stringify()`\n *\n * Example:\n *\n * ```js\n * pb.collection(\"example\").getFirstListItem(pb.filter(\n * 'title ~ {:title} && created >= {:created}',\n * { title: \"example\", created: new Date()}\n * ))\n * ```\n */\n filter(raw: string, params?: { [key: string]: any }): string {\n if (!params) {\n return raw;\n }\n\n for (let key in params) {\n let val = params[key];\n switch (typeof val) {\n case \"boolean\":\n case \"number\":\n val = \"\" + val;\n break;\n case \"string\":\n val = \"'\" + val.replace(/'/g, \"\\\\'\") + \"'\";\n break;\n default:\n if (val === null) {\n val = \"null\";\n } else if (val instanceof Date) {\n val = \"'\" + val.toISOString().replace(\"T\", \" \") + \"'\";\n } else {\n val = \"'\" + JSON.stringify(val).replace(/'/g, \"\\\\'\") + \"'\";\n }\n }\n raw = raw.replaceAll(\"{:\" + key + \"}\", val);\n }\n\n return raw;\n }\n\n /**\n * @deprecated Please use `pb.files.getURL()`.\n */\n getFileUrl(\n record: { [key: string]: any },\n filename: string,\n queryParams: FileOptions = {},\n ): string {\n console.warn(\"Please replace pb.getFileUrl() with pb.files.getURL()\");\n return this.files.getURL(record, filename, queryParams);\n }\n\n /**\n * @deprecated Please use `pb.buildURL()`.\n */\n buildUrl(path: string): string {\n console.warn(\"Please replace pb.buildUrl() with pb.buildURL()\");\n return this.buildURL(path);\n }\n\n /**\n * Builds a full client url by safely concatenating the provided path.\n */\n buildURL(path: string): string {\n let url = this.baseURL;\n\n // construct an absolute base url if in a browser environment\n if (\n typeof window !== \"undefined\" &&\n !!window.location &&\n !url.startsWith(\"https://\") &&\n !url.startsWith(\"http://\")\n ) {\n url = window.location.origin?.endsWith(\"/\")\n ? window.location.origin.substring(0, window.location.origin.length - 1)\n : window.location.origin || \"\";\n\n if (!this.baseURL.startsWith(\"/\")) {\n url += window.location.pathname || \"/\";\n url += url.endsWith(\"/\") ? \"\" : \"/\";\n }\n\n url += this.baseURL;\n }\n\n // concatenate the path\n if (path) {\n url += url.endsWith(\"/\") ? \"\" : \"/\"; // append trailing slash if missing\n url += path.startsWith(\"/\") ? path.substring(1) : path;\n }\n\n return url;\n }\n\n /**\n * Sends an api http request.\n *\n * @throws {ClientResponseError}\n */\n async send(path: string, options: SendOptions): Promise {\n options = this.initSendOptions(path, options);\n\n // build url + path\n let url = this.buildURL(path);\n\n if (this.beforeSend) {\n const result = Object.assign({}, await this.beforeSend(url, options));\n if (\n typeof result.url !== \"undefined\" ||\n typeof result.options !== \"undefined\"\n ) {\n url = result.url || url;\n options = result.options || options;\n } else if (Object.keys(result).length) {\n // legacy behavior\n options = result as SendOptions;\n console?.warn &&\n console.warn(\n \"Deprecated format of beforeSend return: please use `return { url, options }`, instead of `return options`.\",\n );\n }\n }\n\n // serialize the query parameters\n if (typeof options.query !== \"undefined\") {\n const query = serializeQueryParams(options.query);\n if (query) {\n url += (url.includes(\"?\") ? \"&\" : \"?\") + query;\n }\n delete options.query;\n }\n\n // ensures that the json body is serialized\n if (\n this.getHeader(options.headers, \"Content-Type\") == \"application/json\" &&\n options.body &&\n typeof options.body !== \"string\"\n ) {\n options.body = JSON.stringify(options.body);\n }\n\n // early throw an abort error in case the request was already cancelled\n const fetchFunc = options.fetch || fetch;\n\n // send the request\n return fetchFunc(url, options)\n .then(async (response) => {\n let data: any = {};\n\n try {\n data = await response.json();\n } catch (err) {\n // @todo map against the response content type\n // all api responses are expected to return json\n // with exception of the realtime events and 204\n if (\n options.signal?.aborted ||\n (\n typeof DOMException !== \"undefined\" && err instanceof DOMException &&\n // https://developer.mozilla.org/en-US/docs/Web/API/DOMException#aborterror\n (err.name == \"AbortError\" || err.code == 20)\n )\n ) {\n throw err;\n }\n }\n\n if (this.afterSend) {\n data = await this.afterSend(response, data, options);\n }\n\n if (response.status >= 400) {\n throw new ClientResponseError({\n url: response.url,\n status: response.status,\n data: data,\n });\n }\n\n return data as T;\n })\n .catch((err) => {\n // wrap to normalize all errors\n throw new ClientResponseError(err);\n });\n }\n\n /**\n * Shallow copy the provided object and takes care to initialize\n * any options required to preserve the backward compatability.\n *\n * @param {SendOptions} options\n * @return {SendOptions}\n */\n private initSendOptions(path: string, options: SendOptions): SendOptions {\n options = Object.assign({ method: \"GET\" } as SendOptions, options);\n\n // auto convert the body to FormData, if needed\n options.body = convertToFormDataIfNeeded(options.body);\n\n // move unknown send options as query parameters\n normalizeUnknownQueryParams(options);\n\n // requestKey normalizations for backward-compatibility\n // ---\n options.query = Object.assign({}, options.params, options.query);\n if (typeof options.requestKey === \"undefined\") {\n if (options.$autoCancel === false || options.query.$autoCancel === false) {\n options.requestKey = null;\n } else if (options.$cancelKey || options.query.$cancelKey) {\n options.requestKey = options.$cancelKey || options.query.$cancelKey;\n }\n }\n // remove the deprecated special cancellation params from the other query params\n delete options.$autoCancel;\n delete options.query.$autoCancel;\n delete options.$cancelKey;\n delete options.query.$cancelKey;\n // ---\n\n // add the json header, if not explicitly set\n // (for FormData body the Content-Type header should be skipped since the boundary is autogenerated)\n if (\n this.getHeader(options.headers, \"Content-Type\") === null &&\n !isFormData(options.body)\n ) {\n options.headers = Object.assign({}, options.headers, {\n \"Content-Type\": \"application/json\",\n });\n }\n\n // add Accept-Language header, if not explicitly set\n if (this.getHeader(options.headers, \"Accept-Language\") === null) {\n options.headers = Object.assign({}, options.headers, {\n \"Accept-Language\": this.lang,\n });\n }\n\n // check if Authorization header can be added\n if (\n // has valid token\n this.authStore.token &&\n // auth header is not explicitly set\n this.getHeader(options.headers, \"Authorization\") === null\n ) {\n options.headers = Object.assign({}, options.headers, {\n Authorization: this.authStore.token,\n });\n }\n\n // handle auto cancelation for duplicated pending request\n if (this.enableAutoCancellation && options.requestKey !== null) {\n const requestKey = options.requestKey || (options.method || \"GET\") + path;\n\n delete options.requestKey;\n\n // cancel previous pending requests\n this.cancelRequest(requestKey);\n\n const controller = new AbortController();\n this.cancelControllers[requestKey] = controller;\n options.signal = controller.signal;\n }\n\n return options;\n }\n\n /**\n * Extracts the header with the provided name in case-insensitive manner.\n * Returns `null` if no header matching the name is found.\n */\n private getHeader(\n headers: { [key: string]: string } | undefined,\n name: string,\n ): string | null {\n headers = headers || {};\n name = name.toLowerCase();\n\n for (let key in headers) {\n if (key.toLowerCase() == name) {\n return headers[key];\n }\n }\n\n return null;\n }\n}\n"],"names":["ClientResponseError","Error","constructor","errData","super","this","url","status","response","isAbort","originalError","Object","setPrototypeOf","prototype","data","DOMException","name","code","message","cause","includes","toJSON","fieldContentRegExp","cookieSerialize","val","options","opt","assign","encode","defaultEncode","test","TypeError","value","result","maxAge","isNaN","isFinite","Math","floor","domain","path","expires","isDate","toString","call","Date","valueOf","toUTCString","httpOnly","secure","priority","toLowerCase","sameSite","defaultDecode","indexOf","decodeURIComponent","encodeURIComponent","isReactNative","navigator","product","global","HermesInternal","atobPolyfill","getTokenPayload","token","encodedPayload","split","map","c","charCodeAt","slice","join","JSON","parse","e","isTokenExpired","expirationThreshold","payload","keys","length","exp","now","atob","input","str","String","replace","bs","buffer","bc","idx","output","charAt","fromCharCode","defaultCookieKey","BaseAuthStore","baseToken","baseModel","_onChangeCallbacks","record","model","isValid","isSuperuser","type","collectionName","collectionId","isAdmin","console","warn","isAuthRecord","save","triggerChange","clear","loadFromCookie","cookie","key","rawData","cookieParse","decode","index","eqIdx","endIdx","lastIndexOf","trim","undefined","_","Array","isArray","exportToCookie","defaultOptions","stringify","resultLength","Blob","size","id","email","extraProps","prop","onChange","callback","fireImmediately","push","i","splice","LocalAuthStore","storageKey","storageFallback","_bindStorageEvent","_storageGet","_storageSet","_storageRemove","window","localStorage","rawValue","getItem","normalizedVal","setItem","removeItem","addEventListener","BaseService","client","SettingsService","getAll","method","send","update","bodyParams","body","testS3","filesystem","then","testEmail","collectionIdOrName","toEmail","emailTemplate","template","collection","generateAppleClientSecret","clientId","teamId","keyId","privateKey","duration","knownSendOptionsKeys","normalizeUnknownQueryParams","query","serializeQueryParams","params","encodedKey","arrValue","v","prepareQueryParamValue","toISOString","RealtimeService","eventSource","subscriptions","lastSentSubscriptions","maxConnectTimeout","reconnectAttempts","maxReconnectAttempts","Infinity","predefinedReconnectIntervals","pendingConnects","isConnected","subscribe","topic","serialized","headers","listener","msgEvent","submitSubscriptions","connect","async","unsubscribeByTopicAndListener","unsubscribe","needToSubmit","subs","getSubscriptionsByTopic","hasSubscriptionListeners","removeEventListener","disconnect","unsubscribeByPrefix","keyPrefix","hasAtleastOneTopic","startsWith","exist","keyToCheck","addAllSubscriptionListeners","getNonEmptySubscriptionKeys","requestKey","getSubscriptionsCancelKey","catch","err","removeAllSubscriptionListeners","Promise","resolve","reject","initConnect","clearTimeout","connectTimeoutId","setTimeout","connectErrorHandler","EventSource","buildURL","onerror","lastEventId","retries","hasUnsentSubscriptions","p","reconnectTimeoutId","connectSubs","latestTopics","t","timeout","fromReconnect","onDisconnect","cancelRequest","close","CrudService","getFullList","batchOrqueryParams","_getFullList","batch","getList","page","perPage","baseCrudPath","responseData","items","item","getFirstListItem","filter","skipTotal","getOne","create","batchSize","request","list","concat","normalizeLegacyOptionsArgs","legacyWarn","baseOptions","bodyOrOptions","hasQuery","resetAutoRefresh","_resetAutoRefresh","RecordService","baseCollectionPath","isSuperusers","realtime","batchOrOptions","authStore","authExpand","expand","authRecord","delete","success","authResponse","listAuthMethods","fields","authWithPassword","usernameOrEmail","password","autoRefreshThreshold","identity","autoRefresh","authData","registerAutoRefresh","threshold","refreshFunc","reauthenticateFunc","oldBeforeSend","beforeSend","oldModel","unsubStoreChange","newToken","sendOptions","oldToken","authRefresh","authWithOAuth2Code","provider","codeVerifier","redirectURL","createData","authWithOAuth2","args","config","eagerDefaultPopup","urlCallback","openBrowserPopup","cleanup","requestKeyOptions","authMethods","oauth2","providers","find","cancelController","signal","onabort","oldState","state","error","scopes","replacements","_replaceQueryParams","authURL","location","href","requestPasswordReset","confirmPasswordReset","passwordResetToken","passwordConfirm","requestVerification","confirmVerification","verificationToken","verified","requestEmailChange","newEmail","confirmEmailChange","emailChangeToken","listExternalAuths","recordId","unlinkExternalAuth","ea","requestOTP","authWithOTP","otpId","impersonate","Authorization","Client","baseURL","lang","urlPath","substring","parsedParams","rawParams","param","pair","hasOwnProperty","open","width","height","windowWidth","innerWidth","windowHeight","innerHeight","left","top","CollectionService","import","collections","deleteMissing","getScaffolds","truncate","LogService","getStats","HealthService","check","FileService","getUrl","filename","queryParams","getURL","parts","download","URLSearchParams","getToken","BackupService","basename","upload","restore","getDownloadUrl","getDownloadURL","CronService","run","jobId","isFile","File","uri","isFormData","FormData","hasFileField","values","inferNumberCharsRegex","inferFormDataValue","num","BatchService","requests","SubBatchService","formData","jsonData","req","json","files","file","append","upsert","prepareRequest","convertFormDataToObject","forEach","k","parsed","foundFiles","foundRegular","fileKey","endsWith","baseUrl","cancelControllers","recordServices","enableAutoCancellation","Deno","logs","settings","health","backups","crons","admins","createBatch","idOrName","autoCancellation","enable","abort","cancelAllRequests","raw","replaceAll","getFileUrl","buildUrl","origin","pathname","initSendOptions","getHeader","fetch","aborted","afterSend","convertToFormDataIfNeeded","form","$autoCancel","$cancelKey","controller","AbortController"],"mappings":"2OAIM,MAAOA,4BAA4BC,MAOrC,WAAAC,CAAYC,GACRC,MAAM,uBAPVC,KAAGC,IAAW,GACdD,KAAME,OAAW,EACjBF,KAAQG,SAA2B,GACnCH,KAAOI,SAAY,EACnBJ,KAAaK,cAAQ,KAOjBC,OAAOC,eAAeP,KAAML,oBAAoBa,WAEhC,OAAZV,GAAuC,iBAAZA,IAC3BE,KAAKC,IAA6B,iBAAhBH,EAAQG,IAAmBH,EAAQG,IAA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AEF,EAAQsL,QAAS,CACjD,kBAAmB1M,KAAK8W,QAO5B9W,KAAK8R,UAAUnO,OAEsC,OAArD3D,KAAKid,UAAU7b,EAAQsL,QAAS,mBAEhCtL,EAAQsL,QAAUpM,OAAOgB,OAAO,CAAE,EAAEF,EAAQsL,QAAS,CACjDiK,cAAe3W,KAAK8R,UAAUnO,SAKlC3D,KAAK4b,wBAAiD,OAAvBxa,EAAQ4M,WAAqB,CAC5D,MAAMA,EAAa5M,EAAQ4M,aAAe5M,EAAQ0I,QAAU,OAAS3H,SAE9Df,EAAQ4M,WAGfhO,KAAK2P,cAAc3B,GAEnB,MAAMyP,EAAa,IAAIC,gBACvB1d,KAAK0b,kBAAkB1N,GAAcyP,EACrCrc,EAAQwT,OAAS6I,EAAW7I,MAC/B,CAED,OAAOxT,CACV,CAMO,SAAA6b,CACJvQ,EACA/L,GAEA+L,EAAUA,GAAW,GACrB/L,EAAOA,EAAKmC,cAEZ,IAAK,IAAIgE,KAAO4F,EACZ,GAAI5F,EAAIhE,eAAiBnC,EACrB,OAAO+L,EAAQ5F,GAIvB,OAAO,IACV"} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/pocketbase/package.json b/PBandGraphScaffold/node_modules/pocketbase/package.json deleted file mode 100644 index 3bfa6e9..0000000 --- a/PBandGraphScaffold/node_modules/pocketbase/package.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "version": "0.26.5", - "name": "pocketbase", - "description": "PocketBase JavaScript SDK", - "author": "Gani Georgiev", - "license": "MIT", - "repository": { - "type": "git", - "url": "git://github.com/pocketbase/js-sdk.git" - }, - "exports": { - ".": "./dist/pocketbase.es.mjs", - "./cjs": "./dist/pocketbase.cjs.js", - "./umd": "./dist/pocketbase.umd.js" - }, - "main": "./dist/pocketbase.es.mjs", - "module": "./dist/pocketbase.es.mjs", - "react-native": "./dist/pocketbase.es.js", - "types": "./dist/pocketbase.es.d.mts", - "keywords": [ - "pocketbase", - "pocketbase-js", - "js-sdk", - "javascript-sdk", - "pocketbase-sdk" - ], - "prettier": { - "tabWidth": 4, - "printWidth": 90, - "bracketSameLine": true - }, - "scripts": { - "format": "npx prettier ./src ./tests --write", - "build": "rm -rf dist && rollup -c", - "dev": "rollup -c -w", - "test": "vitest", - "prepublishOnly": "npm run build" - }, - "devDependencies": { - "@rollup/plugin-terser": "^0.4.3", - "prettier": "3.2.4", - "rollup": "^4.0.0", - "rollup-plugin-ts": "^3.0.0", - "typescript": "^5.1.6", - "vitest": "^2.0.0" - } -} diff --git a/PBandGraphScaffold/node_modules/safe-buffer/LICENSE b/PBandGraphScaffold/node_modules/safe-buffer/LICENSE deleted file mode 100644 index 0c068ce..0000000 --- a/PBandGraphScaffold/node_modules/safe-buffer/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Feross Aboukhadijeh - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/PBandGraphScaffold/node_modules/safe-buffer/README.md b/PBandGraphScaffold/node_modules/safe-buffer/README.md deleted file mode 100644 index e9a81af..0000000 --- a/PBandGraphScaffold/node_modules/safe-buffer/README.md +++ /dev/null @@ -1,584 +0,0 @@ -# safe-buffer [![travis][travis-image]][travis-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][downloads-url] [![javascript style guide][standard-image]][standard-url] - -[travis-image]: https://img.shields.io/travis/feross/safe-buffer/master.svg -[travis-url]: https://travis-ci.org/feross/safe-buffer -[npm-image]: https://img.shields.io/npm/v/safe-buffer.svg -[npm-url]: https://npmjs.org/package/safe-buffer -[downloads-image]: https://img.shields.io/npm/dm/safe-buffer.svg -[downloads-url]: https://npmjs.org/package/safe-buffer -[standard-image]: https://img.shields.io/badge/code_style-standard-brightgreen.svg -[standard-url]: https://standardjs.com - -#### Safer Node.js Buffer API - -**Use the new Node.js Buffer APIs (`Buffer.from`, `Buffer.alloc`, -`Buffer.allocUnsafe`, `Buffer.allocUnsafeSlow`) in all versions of Node.js.** - -**Uses the built-in implementation when available.** - -## install - -``` -npm install safe-buffer -``` - -## usage - -The goal of this package is to provide a safe replacement for the node.js `Buffer`. - -It's a drop-in replacement for `Buffer`. You can use it by adding one `require` line to -the top of your node.js modules: - -```js -var Buffer = require('safe-buffer').Buffer - -// Existing buffer code will continue to work without issues: - -new Buffer('hey', 'utf8') -new Buffer([1, 2, 3], 'utf8') -new Buffer(obj) -new Buffer(16) // create an uninitialized buffer (potentially unsafe) - -// But you can use these new explicit APIs to make clear what you want: - -Buffer.from('hey', 'utf8') // convert from many types to a Buffer -Buffer.alloc(16) // create a zero-filled buffer (safe) -Buffer.allocUnsafe(16) // create an uninitialized buffer (potentially unsafe) -``` - -## api - -### Class Method: Buffer.from(array) - - -* `array` {Array} - -Allocates a new `Buffer` using an `array` of octets. - -```js -const buf = Buffer.from([0x62,0x75,0x66,0x66,0x65,0x72]); - // creates a new Buffer containing ASCII bytes - // ['b','u','f','f','e','r'] -``` - -A `TypeError` will be thrown if `array` is not an `Array`. - -### Class Method: Buffer.from(arrayBuffer[, byteOffset[, length]]) - - -* `arrayBuffer` {ArrayBuffer} The `.buffer` property of a `TypedArray` or - a `new ArrayBuffer()` -* `byteOffset` {Number} Default: `0` -* `length` {Number} Default: `arrayBuffer.length - byteOffset` - -When passed a reference to the `.buffer` property of a `TypedArray` instance, -the newly created `Buffer` will share the same allocated memory as the -TypedArray. - -```js -const arr = new Uint16Array(2); -arr[0] = 5000; -arr[1] = 4000; - -const buf = Buffer.from(arr.buffer); // shares the memory with arr; - -console.log(buf); - // Prints: - -// changing the TypedArray changes the Buffer also -arr[1] = 6000; - -console.log(buf); - // Prints: -``` - -The optional `byteOffset` and `length` arguments specify a memory range within -the `arrayBuffer` that will be shared by the `Buffer`. - -```js -const ab = new ArrayBuffer(10); -const buf = Buffer.from(ab, 0, 2); -console.log(buf.length); - // Prints: 2 -``` - -A `TypeError` will be thrown if `arrayBuffer` is not an `ArrayBuffer`. - -### Class Method: Buffer.from(buffer) - - -* `buffer` {Buffer} - -Copies the passed `buffer` data onto a new `Buffer` instance. - -```js -const buf1 = Buffer.from('buffer'); -const buf2 = Buffer.from(buf1); - -buf1[0] = 0x61; -console.log(buf1.toString()); - // 'auffer' -console.log(buf2.toString()); - // 'buffer' (copy is not changed) -``` - -A `TypeError` will be thrown if `buffer` is not a `Buffer`. - -### Class Method: Buffer.from(str[, encoding]) - - -* `str` {String} String to encode. -* `encoding` {String} Encoding to use, Default: `'utf8'` - -Creates a new `Buffer` containing the given JavaScript string `str`. If -provided, the `encoding` parameter identifies the character encoding. -If not provided, `encoding` defaults to `'utf8'`. - -```js -const buf1 = Buffer.from('this is a tést'); -console.log(buf1.toString()); - // prints: this is a tést -console.log(buf1.toString('ascii')); - // prints: this is a tC)st - -const buf2 = Buffer.from('7468697320697320612074c3a97374', 'hex'); -console.log(buf2.toString()); - // prints: this is a tést -``` - -A `TypeError` will be thrown if `str` is not a string. - -### Class Method: Buffer.alloc(size[, fill[, encoding]]) - - -* `size` {Number} -* `fill` {Value} Default: `undefined` -* `encoding` {String} Default: `utf8` - -Allocates a new `Buffer` of `size` bytes. If `fill` is `undefined`, the -`Buffer` will be *zero-filled*. - -```js -const buf = Buffer.alloc(5); -console.log(buf); - // -``` - -The `size` must be less than or equal to the value of -`require('buffer').kMaxLength` (on 64-bit architectures, `kMaxLength` is -`(2^31)-1`). Otherwise, a [`RangeError`][] is thrown. A zero-length Buffer will -be created if a `size` less than or equal to 0 is specified. - -If `fill` is specified, the allocated `Buffer` will be initialized by calling -`buf.fill(fill)`. See [`buf.fill()`][] for more information. - -```js -const buf = Buffer.alloc(5, 'a'); -console.log(buf); - // -``` - -If both `fill` and `encoding` are specified, the allocated `Buffer` will be -initialized by calling `buf.fill(fill, encoding)`. For example: - -```js -const buf = Buffer.alloc(11, 'aGVsbG8gd29ybGQ=', 'base64'); -console.log(buf); - // -``` - -Calling `Buffer.alloc(size)` can be significantly slower than the alternative -`Buffer.allocUnsafe(size)` but ensures that the newly created `Buffer` instance -contents will *never contain sensitive data*. - -A `TypeError` will be thrown if `size` is not a number. - -### Class Method: Buffer.allocUnsafe(size) - - -* `size` {Number} - -Allocates a new *non-zero-filled* `Buffer` of `size` bytes. The `size` must -be less than or equal to the value of `require('buffer').kMaxLength` (on 64-bit -architectures, `kMaxLength` is `(2^31)-1`). Otherwise, a [`RangeError`][] is -thrown. A zero-length Buffer will be created if a `size` less than or equal to -0 is specified. - -The underlying memory for `Buffer` instances created in this way is *not -initialized*. The contents of the newly created `Buffer` are unknown and -*may contain sensitive data*. Use [`buf.fill(0)`][] to initialize such -`Buffer` instances to zeroes. - -```js -const buf = Buffer.allocUnsafe(5); -console.log(buf); - // - // (octets will be different, every time) -buf.fill(0); -console.log(buf); - // -``` - -A `TypeError` will be thrown if `size` is not a number. - -Note that the `Buffer` module pre-allocates an internal `Buffer` instance of -size `Buffer.poolSize` that is used as a pool for the fast allocation of new -`Buffer` instances created using `Buffer.allocUnsafe(size)` (and the deprecated -`new Buffer(size)` constructor) only when `size` is less than or equal to -`Buffer.poolSize >> 1` (floor of `Buffer.poolSize` divided by two). The default -value of `Buffer.poolSize` is `8192` but can be modified. - -Use of this pre-allocated internal memory pool is a key difference between -calling `Buffer.alloc(size, fill)` vs. `Buffer.allocUnsafe(size).fill(fill)`. -Specifically, `Buffer.alloc(size, fill)` will *never* use the internal Buffer -pool, while `Buffer.allocUnsafe(size).fill(fill)` *will* use the internal -Buffer pool if `size` is less than or equal to half `Buffer.poolSize`. The -difference is subtle but can be important when an application requires the -additional performance that `Buffer.allocUnsafe(size)` provides. - -### Class Method: Buffer.allocUnsafeSlow(size) - - -* `size` {Number} - -Allocates a new *non-zero-filled* and non-pooled `Buffer` of `size` bytes. The -`size` must be less than or equal to the value of -`require('buffer').kMaxLength` (on 64-bit architectures, `kMaxLength` is -`(2^31)-1`). Otherwise, a [`RangeError`][] is thrown. A zero-length Buffer will -be created if a `size` less than or equal to 0 is specified. - -The underlying memory for `Buffer` instances created in this way is *not -initialized*. The contents of the newly created `Buffer` are unknown and -*may contain sensitive data*. Use [`buf.fill(0)`][] to initialize such -`Buffer` instances to zeroes. - -When using `Buffer.allocUnsafe()` to allocate new `Buffer` instances, -allocations under 4KB are, by default, sliced from a single pre-allocated -`Buffer`. This allows applications to avoid the garbage collection overhead of -creating many individually allocated Buffers. This approach improves both -performance and memory usage by eliminating the need to track and cleanup as -many `Persistent` objects. - -However, in the case where a developer may need to retain a small chunk of -memory from a pool for an indeterminate amount of time, it may be appropriate -to create an un-pooled Buffer instance using `Buffer.allocUnsafeSlow()` then -copy out the relevant bits. - -```js -// need to keep around a few small chunks of memory -const store = []; - -socket.on('readable', () => { - const data = socket.read(); - // allocate for retained data - const sb = Buffer.allocUnsafeSlow(10); - // copy the data into the new allocation - data.copy(sb, 0, 0, 10); - store.push(sb); -}); -``` - -Use of `Buffer.allocUnsafeSlow()` should be used only as a last resort *after* -a developer has observed undue memory retention in their applications. - -A `TypeError` will be thrown if `size` is not a number. - -### All the Rest - -The rest of the `Buffer` API is exactly the same as in node.js. -[See the docs](https://nodejs.org/api/buffer.html). - - -## Related links - -- [Node.js issue: Buffer(number) is unsafe](https://github.com/nodejs/node/issues/4660) -- [Node.js Enhancement Proposal: Buffer.from/Buffer.alloc/Buffer.zalloc/Buffer() soft-deprecate](https://github.com/nodejs/node-eps/pull/4) - -## Why is `Buffer` unsafe? - -Today, the node.js `Buffer` constructor is overloaded to handle many different argument -types like `String`, `Array`, `Object`, `TypedArrayView` (`Uint8Array`, etc.), -`ArrayBuffer`, and also `Number`. - -The API is optimized for convenience: you can throw any type at it, and it will try to do -what you want. - -Because the Buffer constructor is so powerful, you often see code like this: - -```js -// Convert UTF-8 strings to hex -function toHex (str) { - return new Buffer(str).toString('hex') -} -``` - -***But what happens if `toHex` is called with a `Number` argument?*** - -### Remote Memory Disclosure - -If an attacker can make your program call the `Buffer` constructor with a `Number` -argument, then they can make it allocate uninitialized memory from the node.js process. -This could potentially disclose TLS private keys, user data, or database passwords. - -When the `Buffer` constructor is passed a `Number` argument, it returns an -**UNINITIALIZED** block of memory of the specified `size`. When you create a `Buffer` like -this, you **MUST** overwrite the contents before returning it to the user. - -From the [node.js docs](https://nodejs.org/api/buffer.html#buffer_new_buffer_size): - -> `new Buffer(size)` -> -> - `size` Number -> -> The underlying memory for `Buffer` instances created in this way is not initialized. -> **The contents of a newly created `Buffer` are unknown and could contain sensitive -> data.** Use `buf.fill(0)` to initialize a Buffer to zeroes. - -(Emphasis our own.) - -Whenever the programmer intended to create an uninitialized `Buffer` you often see code -like this: - -```js -var buf = new Buffer(16) - -// Immediately overwrite the uninitialized buffer with data from another buffer -for (var i = 0; i < buf.length; i++) { - buf[i] = otherBuf[i] -} -``` - - -### Would this ever be a problem in real code? - -Yes. It's surprisingly common to forget to check the type of your variables in a -dynamically-typed language like JavaScript. - -Usually the consequences of assuming the wrong type is that your program crashes with an -uncaught exception. But the failure mode for forgetting to check the type of arguments to -the `Buffer` constructor is more catastrophic. - -Here's an example of a vulnerable service that takes a JSON payload and converts it to -hex: - -```js -// Take a JSON payload {str: "some string"} and convert it to hex -var server = http.createServer(function (req, res) { - var data = '' - req.setEncoding('utf8') - req.on('data', function (chunk) { - data += chunk - }) - req.on('end', function () { - var body = JSON.parse(data) - res.end(new Buffer(body.str).toString('hex')) - }) -}) - -server.listen(8080) -``` - -In this example, an http client just has to send: - -```json -{ - "str": 1000 -} -``` - -and it will get back 1,000 bytes of uninitialized memory from the server. - -This is a very serious bug. It's similar in severity to the -[the Heartbleed bug](http://heartbleed.com/) that allowed disclosure of OpenSSL process -memory by remote attackers. - - -### Which real-world packages were vulnerable? - -#### [`bittorrent-dht`](https://www.npmjs.com/package/bittorrent-dht) - -[Mathias Buus](https://github.com/mafintosh) and I -([Feross Aboukhadijeh](http://feross.org/)) found this issue in one of our own packages, -[`bittorrent-dht`](https://www.npmjs.com/package/bittorrent-dht). The bug would allow -anyone on the internet to send a series of messages to a user of `bittorrent-dht` and get -them to reveal 20 bytes at a time of uninitialized memory from the node.js process. - -Here's -[the commit](https://github.com/feross/bittorrent-dht/commit/6c7da04025d5633699800a99ec3fbadf70ad35b8) -that fixed it. We released a new fixed version, created a -[Node Security Project disclosure](https://nodesecurity.io/advisories/68), and deprecated all -vulnerable versions on npm so users will get a warning to upgrade to a newer version. - -#### [`ws`](https://www.npmjs.com/package/ws) - -That got us wondering if there were other vulnerable packages. Sure enough, within a short -period of time, we found the same issue in [`ws`](https://www.npmjs.com/package/ws), the -most popular WebSocket implementation in node.js. - -If certain APIs were called with `Number` parameters instead of `String` or `Buffer` as -expected, then uninitialized server memory would be disclosed to the remote peer. - -These were the vulnerable methods: - -```js -socket.send(number) -socket.ping(number) -socket.pong(number) -``` - -Here's a vulnerable socket server with some echo functionality: - -```js -server.on('connection', function (socket) { - socket.on('message', function (message) { - message = JSON.parse(message) - if (message.type === 'echo') { - socket.send(message.data) // send back the user's message - } - }) -}) -``` - -`socket.send(number)` called on the server, will disclose server memory. - -Here's [the release](https://github.com/websockets/ws/releases/tag/1.0.1) where the issue -was fixed, with a more detailed explanation. Props to -[Arnout Kazemier](https://github.com/3rd-Eden) for the quick fix. Here's the -[Node Security Project disclosure](https://nodesecurity.io/advisories/67). - - -### What's the solution? - -It's important that node.js offers a fast way to get memory otherwise performance-critical -applications would needlessly get a lot slower. - -But we need a better way to *signal our intent* as programmers. **When we want -uninitialized memory, we should request it explicitly.** - -Sensitive functionality should not be packed into a developer-friendly API that loosely -accepts many different types. This type of API encourages the lazy practice of passing -variables in without checking the type very carefully. - -#### A new API: `Buffer.allocUnsafe(number)` - -The functionality of creating buffers with uninitialized memory should be part of another -API. We propose `Buffer.allocUnsafe(number)`. This way, it's not part of an API that -frequently gets user input of all sorts of different types passed into it. - -```js -var buf = Buffer.allocUnsafe(16) // careful, uninitialized memory! - -// Immediately overwrite the uninitialized buffer with data from another buffer -for (var i = 0; i < buf.length; i++) { - buf[i] = otherBuf[i] -} -``` - - -### How do we fix node.js core? - -We sent [a PR to node.js core](https://github.com/nodejs/node/pull/4514) (merged as -`semver-major`) which defends against one case: - -```js -var str = 16 -new Buffer(str, 'utf8') -``` - -In this situation, it's implied that the programmer intended the first argument to be a -string, since they passed an encoding as a second argument. Today, node.js will allocate -uninitialized memory in the case of `new Buffer(number, encoding)`, which is probably not -what the programmer intended. - -But this is only a partial solution, since if the programmer does `new Buffer(variable)` -(without an `encoding` parameter) there's no way to know what they intended. If `variable` -is sometimes a number, then uninitialized memory will sometimes be returned. - -### What's the real long-term fix? - -We could deprecate and remove `new Buffer(number)` and use `Buffer.allocUnsafe(number)` when -we need uninitialized memory. But that would break 1000s of packages. - -~~We believe the best solution is to:~~ - -~~1. Change `new Buffer(number)` to return safe, zeroed-out memory~~ - -~~2. Create a new API for creating uninitialized Buffers. We propose: `Buffer.allocUnsafe(number)`~~ - -#### Update - -We now support adding three new APIs: - -- `Buffer.from(value)` - convert from any type to a buffer -- `Buffer.alloc(size)` - create a zero-filled buffer -- `Buffer.allocUnsafe(size)` - create an uninitialized buffer with given size - -This solves the core problem that affected `ws` and `bittorrent-dht` which is -`Buffer(variable)` getting tricked into taking a number argument. - -This way, existing code continues working and the impact on the npm ecosystem will be -minimal. Over time, npm maintainers can migrate performance-critical code to use -`Buffer.allocUnsafe(number)` instead of `new Buffer(number)`. - - -### Conclusion - -We think there's a serious design issue with the `Buffer` API as it exists today. It -promotes insecure software by putting high-risk functionality into a convenient API -with friendly "developer ergonomics". - -This wasn't merely a theoretical exercise because we found the issue in some of the -most popular npm packages. - -Fortunately, there's an easy fix that can be applied today. Use `safe-buffer` in place of -`buffer`. - -```js -var Buffer = require('safe-buffer').Buffer -``` - -Eventually, we hope that node.js core can switch to this new, safer behavior. We believe -the impact on the ecosystem would be minimal since it's not a breaking change. -Well-maintained, popular packages would be updated to use `Buffer.alloc` quickly, while -older, insecure packages would magically become safe from this attack vector. - - -## links - -- [Node.js PR: buffer: throw if both length and enc are passed](https://github.com/nodejs/node/pull/4514) -- [Node Security Project disclosure for `ws`](https://nodesecurity.io/advisories/67) -- [Node Security Project disclosure for`bittorrent-dht`](https://nodesecurity.io/advisories/68) - - -## credit - -The original issues in `bittorrent-dht` -([disclosure](https://nodesecurity.io/advisories/68)) and -`ws` ([disclosure](https://nodesecurity.io/advisories/67)) were discovered by -[Mathias Buus](https://github.com/mafintosh) and -[Feross Aboukhadijeh](http://feross.org/). - -Thanks to [Adam Baldwin](https://github.com/evilpacket) for helping disclose these issues -and for his work running the [Node Security Project](https://nodesecurity.io/). - -Thanks to [John Hiesey](https://github.com/jhiesey) for proofreading this README and -auditing the code. - - -## license - -MIT. Copyright (C) [Feross Aboukhadijeh](http://feross.org) diff --git a/PBandGraphScaffold/node_modules/safe-buffer/index.d.ts b/PBandGraphScaffold/node_modules/safe-buffer/index.d.ts deleted file mode 100644 index e9fed80..0000000 --- a/PBandGraphScaffold/node_modules/safe-buffer/index.d.ts +++ /dev/null @@ -1,187 +0,0 @@ -declare module "safe-buffer" { - export class Buffer { - length: number - write(string: string, offset?: number, length?: number, encoding?: string): number; - toString(encoding?: string, start?: number, end?: number): string; - toJSON(): { type: 'Buffer', data: any[] }; - equals(otherBuffer: Buffer): boolean; - compare(otherBuffer: Buffer, targetStart?: number, targetEnd?: number, sourceStart?: number, sourceEnd?: number): number; - copy(targetBuffer: Buffer, targetStart?: number, sourceStart?: number, sourceEnd?: number): number; - slice(start?: number, end?: number): Buffer; - writeUIntLE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; - writeUIntBE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; - writeIntLE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; - writeIntBE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; - readUIntLE(offset: number, byteLength: number, noAssert?: boolean): number; - readUIntBE(offset: number, byteLength: number, noAssert?: boolean): number; - readIntLE(offset: number, byteLength: number, noAssert?: boolean): number; - readIntBE(offset: number, byteLength: number, noAssert?: boolean): number; - readUInt8(offset: number, noAssert?: boolean): number; - readUInt16LE(offset: number, noAssert?: boolean): number; - readUInt16BE(offset: number, noAssert?: boolean): number; - readUInt32LE(offset: number, noAssert?: boolean): number; - readUInt32BE(offset: number, noAssert?: boolean): number; - readInt8(offset: number, noAssert?: boolean): number; - readInt16LE(offset: number, noAssert?: boolean): number; - readInt16BE(offset: number, noAssert?: boolean): number; - readInt32LE(offset: number, noAssert?: boolean): number; - readInt32BE(offset: number, noAssert?: boolean): number; - readFloatLE(offset: number, noAssert?: boolean): number; - readFloatBE(offset: number, noAssert?: boolean): number; - readDoubleLE(offset: number, noAssert?: boolean): number; - readDoubleBE(offset: number, noAssert?: boolean): number; - swap16(): Buffer; - swap32(): Buffer; - swap64(): Buffer; - writeUInt8(value: number, offset: number, noAssert?: boolean): number; - writeUInt16LE(value: number, offset: number, noAssert?: boolean): number; - writeUInt16BE(value: number, offset: number, noAssert?: boolean): number; - writeUInt32LE(value: number, offset: number, noAssert?: boolean): number; - writeUInt32BE(value: number, offset: number, noAssert?: boolean): number; - writeInt8(value: number, offset: number, noAssert?: boolean): number; - writeInt16LE(value: number, offset: number, noAssert?: boolean): number; - writeInt16BE(value: number, offset: number, noAssert?: boolean): number; - writeInt32LE(value: number, offset: number, noAssert?: boolean): number; - writeInt32BE(value: number, offset: number, noAssert?: boolean): number; - writeFloatLE(value: number, offset: number, noAssert?: boolean): number; - writeFloatBE(value: number, offset: number, noAssert?: boolean): number; - writeDoubleLE(value: number, offset: number, noAssert?: boolean): number; - writeDoubleBE(value: number, offset: number, noAssert?: boolean): number; - fill(value: any, offset?: number, end?: number): this; - indexOf(value: string | number | Buffer, byteOffset?: number, encoding?: string): number; - lastIndexOf(value: string | number | Buffer, byteOffset?: number, encoding?: string): number; - includes(value: string | number | Buffer, byteOffset?: number, encoding?: string): boolean; - - /** - * Allocates a new buffer containing the given {str}. - * - * @param str String to store in buffer. - * @param encoding encoding to use, optional. Default is 'utf8' - */ - constructor (str: string, encoding?: string); - /** - * Allocates a new buffer of {size} octets. - * - * @param size count of octets to allocate. - */ - constructor (size: number); - /** - * Allocates a new buffer containing the given {array} of octets. - * - * @param array The octets to store. - */ - constructor (array: Uint8Array); - /** - * Produces a Buffer backed by the same allocated memory as - * the given {ArrayBuffer}. - * - * - * @param arrayBuffer The ArrayBuffer with which to share memory. - */ - constructor (arrayBuffer: ArrayBuffer); - /** - * Allocates a new buffer containing the given {array} of octets. - * - * @param array The octets to store. - */ - constructor (array: any[]); - /** - * Copies the passed {buffer} data onto a new {Buffer} instance. - * - * @param buffer The buffer to copy. - */ - constructor (buffer: Buffer); - prototype: Buffer; - /** - * Allocates a new Buffer using an {array} of octets. - * - * @param array - */ - static from(array: any[]): Buffer; - /** - * When passed a reference to the .buffer property of a TypedArray instance, - * the newly created Buffer will share the same allocated memory as the TypedArray. - * The optional {byteOffset} and {length} arguments specify a memory range - * within the {arrayBuffer} that will be shared by the Buffer. - * - * @param arrayBuffer The .buffer property of a TypedArray or a new ArrayBuffer() - * @param byteOffset - * @param length - */ - static from(arrayBuffer: ArrayBuffer, byteOffset?: number, length?: number): Buffer; - /** - * Copies the passed {buffer} data onto a new Buffer instance. - * - * @param buffer - */ - static from(buffer: Buffer): Buffer; - /** - * Creates a new Buffer containing the given JavaScript string {str}. - * If provided, the {encoding} parameter identifies the character encoding. - * If not provided, {encoding} defaults to 'utf8'. - * - * @param str - */ - static from(str: string, encoding?: string): Buffer; - /** - * Returns true if {obj} is a Buffer - * - * @param obj object to test. - */ - static isBuffer(obj: any): obj is Buffer; - /** - * Returns true if {encoding} is a valid encoding argument. - * Valid string encodings in Node 0.12: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'binary'(deprecated)|'hex' - * - * @param encoding string to test. - */ - static isEncoding(encoding: string): boolean; - /** - * Gives the actual byte length of a string. encoding defaults to 'utf8'. - * This is not the same as String.prototype.length since that returns the number of characters in a string. - * - * @param string string to test. - * @param encoding encoding used to evaluate (defaults to 'utf8') - */ - static byteLength(string: string, encoding?: string): number; - /** - * Returns a buffer which is the result of concatenating all the buffers in the list together. - * - * If the list has no items, or if the totalLength is 0, then it returns a zero-length buffer. - * If the list has exactly one item, then the first item of the list is returned. - * If the list has more than one item, then a new Buffer is created. - * - * @param list An array of Buffer objects to concatenate - * @param totalLength Total length of the buffers when concatenated. - * If totalLength is not provided, it is read from the buffers in the list. However, this adds an additional loop to the function, so it is faster to provide the length explicitly. - */ - static concat(list: Buffer[], totalLength?: number): Buffer; - /** - * The same as buf1.compare(buf2). - */ - static compare(buf1: Buffer, buf2: Buffer): number; - /** - * Allocates a new buffer of {size} octets. - * - * @param size count of octets to allocate. - * @param fill if specified, buffer will be initialized by calling buf.fill(fill). - * If parameter is omitted, buffer will be filled with zeros. - * @param encoding encoding used for call to buf.fill while initalizing - */ - static alloc(size: number, fill?: string | Buffer | number, encoding?: string): Buffer; - /** - * Allocates a new buffer of {size} octets, leaving memory not initialized, so the contents - * of the newly created Buffer are unknown and may contain sensitive data. - * - * @param size count of octets to allocate - */ - static allocUnsafe(size: number): Buffer; - /** - * Allocates a new non-pooled buffer of {size} octets, leaving memory not initialized, so the contents - * of the newly created Buffer are unknown and may contain sensitive data. - * - * @param size count of octets to allocate - */ - static allocUnsafeSlow(size: number): Buffer; - } -} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/safe-buffer/index.js b/PBandGraphScaffold/node_modules/safe-buffer/index.js deleted file mode 100644 index f8d3ec9..0000000 --- a/PBandGraphScaffold/node_modules/safe-buffer/index.js +++ /dev/null @@ -1,65 +0,0 @@ -/*! safe-buffer. MIT License. Feross Aboukhadijeh */ -/* eslint-disable node/no-deprecated-api */ -var buffer = require('buffer') -var Buffer = buffer.Buffer - -// alternative to using Object.keys for old browsers -function copyProps (src, dst) { - for (var key in src) { - dst[key] = src[key] - } -} -if (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) { - module.exports = buffer -} else { - // Copy properties from require('buffer') - copyProps(buffer, exports) - exports.Buffer = SafeBuffer -} - -function SafeBuffer (arg, encodingOrOffset, length) { - return Buffer(arg, encodingOrOffset, length) -} - -SafeBuffer.prototype = Object.create(Buffer.prototype) - -// Copy static methods from Buffer -copyProps(Buffer, SafeBuffer) - -SafeBuffer.from = function (arg, encodingOrOffset, length) { - if (typeof arg === 'number') { - throw new TypeError('Argument must not be a number') - } - return Buffer(arg, encodingOrOffset, length) -} - -SafeBuffer.alloc = function (size, fill, encoding) { - if (typeof size !== 'number') { - throw new TypeError('Argument must be a number') - } - var buf = Buffer(size) - if (fill !== undefined) { - if (typeof encoding === 'string') { - buf.fill(fill, encoding) - } else { - buf.fill(fill) - } - } else { - buf.fill(0) - } - return buf -} - -SafeBuffer.allocUnsafe = function (size) { - if (typeof size !== 'number') { - throw new TypeError('Argument must be a number') - } - return Buffer(size) -} - -SafeBuffer.allocUnsafeSlow = function (size) { - if (typeof size !== 'number') { - throw new TypeError('Argument must be a number') - } - return buffer.SlowBuffer(size) -} diff --git a/PBandGraphScaffold/node_modules/safe-buffer/package.json b/PBandGraphScaffold/node_modules/safe-buffer/package.json deleted file mode 100644 index f2869e2..0000000 --- a/PBandGraphScaffold/node_modules/safe-buffer/package.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "name": "safe-buffer", - "description": "Safer Node.js Buffer API", - "version": "5.2.1", - "author": { - "name": "Feross Aboukhadijeh", - "email": "feross@feross.org", - "url": "https://feross.org" - }, - "bugs": { - "url": "https://github.com/feross/safe-buffer/issues" - }, - "devDependencies": { - "standard": "*", - "tape": "^5.0.0" - }, - "homepage": "https://github.com/feross/safe-buffer", - "keywords": [ - "buffer", - "buffer allocate", - "node security", - "safe", - "safe-buffer", - "security", - "uninitialized" - ], - "license": "MIT", - "main": "index.js", - "types": "index.d.ts", - "repository": { - "type": "git", - "url": "git://github.com/feross/safe-buffer.git" - }, - "scripts": { - "test": "standard && tape test/*.js" - }, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] -} diff --git a/PBandGraphScaffold/node_modules/semver/LICENSE b/PBandGraphScaffold/node_modules/semver/LICENSE deleted file mode 100644 index 19129e3..0000000 --- a/PBandGraphScaffold/node_modules/semver/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/PBandGraphScaffold/node_modules/semver/README.md b/PBandGraphScaffold/node_modules/semver/README.md deleted file mode 100644 index e952215..0000000 --- a/PBandGraphScaffold/node_modules/semver/README.md +++ /dev/null @@ -1,664 +0,0 @@ -semver(1) -- The semantic versioner for npm -=========================================== - -## Install - -```bash -npm install semver -```` - -## Usage - -As a node module: - -```js -const semver = require('semver') - -semver.valid('1.2.3') // '1.2.3' -semver.valid('a.b.c') // null -semver.clean(' =v1.2.3 ') // '1.2.3' -semver.satisfies('1.2.3', '1.x || >=2.5.0 || 5.0.0 - 7.2.3') // true -semver.gt('1.2.3', '9.8.7') // false -semver.lt('1.2.3', '9.8.7') // true -semver.minVersion('>=1.0.0') // '1.0.0' -semver.valid(semver.coerce('v2')) // '2.0.0' -semver.valid(semver.coerce('42.6.7.9.3-alpha')) // '42.6.7' -``` - -You can also just load the module for the function that you care about if -you'd like to minimize your footprint. - -```js -// load the whole API at once in a single object -const semver = require('semver') - -// or just load the bits you need -// all of them listed here, just pick and choose what you want - -// classes -const SemVer = require('semver/classes/semver') -const Comparator = require('semver/classes/comparator') -const Range = require('semver/classes/range') - -// functions for working with versions -const semverParse = require('semver/functions/parse') -const semverValid = require('semver/functions/valid') -const semverClean = require('semver/functions/clean') -const semverInc = require('semver/functions/inc') -const semverDiff = require('semver/functions/diff') -const semverMajor = require('semver/functions/major') -const semverMinor = require('semver/functions/minor') -const semverPatch = require('semver/functions/patch') -const semverPrerelease = require('semver/functions/prerelease') -const semverCompare = require('semver/functions/compare') -const semverRcompare = require('semver/functions/rcompare') -const semverCompareLoose = require('semver/functions/compare-loose') -const semverCompareBuild = require('semver/functions/compare-build') -const semverSort = require('semver/functions/sort') -const semverRsort = require('semver/functions/rsort') - -// low-level comparators between versions -const semverGt = require('semver/functions/gt') -const semverLt = require('semver/functions/lt') -const semverEq = require('semver/functions/eq') -const semverNeq = require('semver/functions/neq') -const semverGte = require('semver/functions/gte') -const semverLte = require('semver/functions/lte') -const semverCmp = require('semver/functions/cmp') -const semverCoerce = require('semver/functions/coerce') - -// working with ranges -const semverSatisfies = require('semver/functions/satisfies') -const semverMaxSatisfying = require('semver/ranges/max-satisfying') -const semverMinSatisfying = require('semver/ranges/min-satisfying') -const semverToComparators = require('semver/ranges/to-comparators') -const semverMinVersion = require('semver/ranges/min-version') -const semverValidRange = require('semver/ranges/valid') -const semverOutside = require('semver/ranges/outside') -const semverGtr = require('semver/ranges/gtr') -const semverLtr = require('semver/ranges/ltr') -const semverIntersects = require('semver/ranges/intersects') -const semverSimplifyRange = require('semver/ranges/simplify') -const semverRangeSubset = require('semver/ranges/subset') -``` - -As a command-line utility: - -``` -$ semver -h - -A JavaScript implementation of the https://semver.org/ specification -Copyright Isaac Z. Schlueter - -Usage: semver [options] [ [...]] -Prints valid versions sorted by SemVer precedence - -Options: --r --range - Print versions that match the specified range. - --i --increment [] - Increment a version by the specified level. Level can - be one of: major, minor, patch, premajor, preminor, - prepatch, prerelease, or release. Default level is 'patch'. - Only one version may be specified. - ---preid - Identifier to be used to prefix premajor, preminor, - prepatch or prerelease version increments. - --l --loose - Interpret versions and ranges loosely - --n <0|1> - This is the base to be used for the prerelease identifier. - --p --include-prerelease - Always include prerelease versions in range matching - --c --coerce - Coerce a string into SemVer if possible - (does not imply --loose) - ---rtl - Coerce version strings right to left - ---ltr - Coerce version strings left to right (default) - -Program exits successfully if any valid version satisfies -all supplied ranges, and prints all satisfying versions. - -If no satisfying versions are found, then exits failure. - -Versions are printed in ascending order, so supplying -multiple versions to the utility will just sort them. -``` - -## Versions - -A "version" is described by the `v2.0.0` specification found at -. - -A leading `"="` or `"v"` character is stripped off and ignored. -Support for stripping a leading "v" is kept for compatibility with `v1.0.0` of the SemVer -specification but should not be used anymore. - -## Ranges - -A `version range` is a set of `comparators` that specify versions -that satisfy the range. - -A `comparator` is composed of an `operator` and a `version`. The set -of primitive `operators` is: - -* `<` Less than -* `<=` Less than or equal to -* `>` Greater than -* `>=` Greater than or equal to -* `=` Equal. If no operator is specified, then equality is assumed, - so this operator is optional but MAY be included. - -For example, the comparator `>=1.2.7` would match the versions -`1.2.7`, `1.2.8`, `2.5.3`, and `1.3.9`, but not the versions `1.2.6` -or `1.1.0`. The comparator `>1` is equivalent to `>=2.0.0` and -would match the versions `2.0.0` and `3.1.0`, but not the versions -`1.0.1` or `1.1.0`. - -Comparators can be joined by whitespace to form a `comparator set`, -which is satisfied by the **intersection** of all of the comparators -it includes. - -A range is composed of one or more comparator sets, joined by `||`. A -version matches a range if and only if every comparator in at least -one of the `||`-separated comparator sets is satisfied by the version. - -For example, the range `>=1.2.7 <1.3.0` would match the versions -`1.2.7`, `1.2.8`, and `1.2.99`, but not the versions `1.2.6`, `1.3.0`, -or `1.1.0`. - -The range `1.2.7 || >=1.2.9 <2.0.0` would match the versions `1.2.7`, -`1.2.9`, and `1.4.6`, but not the versions `1.2.8` or `2.0.0`. - -### Prerelease Tags - -If a version has a prerelease tag (for example, `1.2.3-alpha.3`) then -it will only be allowed to satisfy comparator sets if at least one -comparator with the same `[major, minor, patch]` tuple also has a -prerelease tag. - -For example, the range `>1.2.3-alpha.3` would be allowed to match the -version `1.2.3-alpha.7`, but it would *not* be satisfied by -`3.4.5-alpha.9`, even though `3.4.5-alpha.9` is technically "greater -than" `1.2.3-alpha.3` according to the SemVer sort rules. The version -range only accepts prerelease tags on the `1.2.3` version. -Version `3.4.5` *would* satisfy the range because it does not have a -prerelease flag, and `3.4.5` is greater than `1.2.3-alpha.7`. - -The purpose of this behavior is twofold. First, prerelease versions -frequently are updated very quickly, and contain many breaking changes -that are (by the author's design) not yet fit for public consumption. -Therefore, by default, they are excluded from range-matching -semantics. - -Second, a user who has opted into using a prerelease version has -indicated the intent to use *that specific* set of -alpha/beta/rc versions. By including a prerelease tag in the range, -the user is indicating that they are aware of the risk. However, it -is still not appropriate to assume that they have opted into taking a -similar risk on the *next* set of prerelease versions. - -Note that this behavior can be suppressed (treating all prerelease -versions as if they were normal versions, for range-matching) -by setting the `includePrerelease` flag on the options -object to any -[functions](https://github.com/npm/node-semver#functions) that do -range matching. - -#### Prerelease Identifiers - -The method `.inc` takes an additional `identifier` string argument that -will append the value of the string as a prerelease identifier: - -```javascript -semver.inc('1.2.3', 'prerelease', 'beta') -// '1.2.4-beta.0' -``` - -command-line example: - -```bash -$ semver 1.2.3 -i prerelease --preid beta -1.2.4-beta.0 -``` - -Which then can be used to increment further: - -```bash -$ semver 1.2.4-beta.0 -i prerelease -1.2.4-beta.1 -``` - -To get out of the prerelease phase, use the `release` option: - -```bash -$ semver 1.2.4-beta.1 -i release -1.2.4 -``` - -#### Prerelease Identifier Base - -The method `.inc` takes an optional parameter 'identifierBase' string -that will let you let your prerelease number as zero-based or one-based. -Set to `false` to omit the prerelease number altogether. -If you do not specify this parameter, it will default to zero-based. - -```javascript -semver.inc('1.2.3', 'prerelease', 'beta', '1') -// '1.2.4-beta.1' -``` - -```javascript -semver.inc('1.2.3', 'prerelease', 'beta', false) -// '1.2.4-beta' -``` - -command-line example: - -```bash -$ semver 1.2.3 -i prerelease --preid beta -n 1 -1.2.4-beta.1 -``` - -```bash -$ semver 1.2.3 -i prerelease --preid beta -n false -1.2.4-beta -``` - -### Advanced Range Syntax - -Advanced range syntax desugars to primitive comparators in -deterministic ways. - -Advanced ranges may be combined in the same way as primitive -comparators using white space or `||`. - -#### Hyphen Ranges `X.Y.Z - A.B.C` - -Specifies an inclusive set. - -* `1.2.3 - 2.3.4` := `>=1.2.3 <=2.3.4` - -If a partial version is provided as the first version in the inclusive -range, then the missing pieces are replaced with zeroes. - -* `1.2 - 2.3.4` := `>=1.2.0 <=2.3.4` - -If a partial version is provided as the second version in the -inclusive range, then all versions that start with the supplied parts -of the tuple are accepted, but nothing that would be greater than the -provided tuple parts. - -* `1.2.3 - 2.3` := `>=1.2.3 <2.4.0-0` -* `1.2.3 - 2` := `>=1.2.3 <3.0.0-0` - -#### X-Ranges `1.2.x` `1.X` `1.2.*` `*` - -Any of `X`, `x`, or `*` may be used to "stand in" for one of the -numeric values in the `[major, minor, patch]` tuple. - -* `*` := `>=0.0.0` (Any non-prerelease version satisfies, unless - `includePrerelease` is specified, in which case any version at all - satisfies) -* `1.x` := `>=1.0.0 <2.0.0-0` (Matching major version) -* `1.2.x` := `>=1.2.0 <1.3.0-0` (Matching major and minor versions) - -A partial version range is treated as an X-Range, so the special -character is in fact optional. - -* `""` (empty string) := `*` := `>=0.0.0` -* `1` := `1.x.x` := `>=1.0.0 <2.0.0-0` -* `1.2` := `1.2.x` := `>=1.2.0 <1.3.0-0` - -#### Tilde Ranges `~1.2.3` `~1.2` `~1` - -Allows patch-level changes if a minor version is specified on the -comparator. Allows minor-level changes if not. - -* `~1.2.3` := `>=1.2.3 <1.(2+1).0` := `>=1.2.3 <1.3.0-0` -* `~1.2` := `>=1.2.0 <1.(2+1).0` := `>=1.2.0 <1.3.0-0` (Same as `1.2.x`) -* `~1` := `>=1.0.0 <(1+1).0.0` := `>=1.0.0 <2.0.0-0` (Same as `1.x`) -* `~0.2.3` := `>=0.2.3 <0.(2+1).0` := `>=0.2.3 <0.3.0-0` -* `~0.2` := `>=0.2.0 <0.(2+1).0` := `>=0.2.0 <0.3.0-0` (Same as `0.2.x`) -* `~0` := `>=0.0.0 <(0+1).0.0` := `>=0.0.0 <1.0.0-0` (Same as `0.x`) -* `~1.2.3-beta.2` := `>=1.2.3-beta.2 <1.3.0-0` Note that prereleases in - the `1.2.3` version will be allowed, if they are greater than or - equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but - `1.2.4-beta.2` would not, because it is a prerelease of a - different `[major, minor, patch]` tuple. - -#### Caret Ranges `^1.2.3` `^0.2.5` `^0.0.4` - -Allows changes that do not modify the left-most non-zero element in the -`[major, minor, patch]` tuple. In other words, this allows patch and -minor updates for versions `1.0.0` and above, patch updates for -versions `0.X >=0.1.0`, and *no* updates for versions `0.0.X`. - -Many authors treat a `0.x` version as if the `x` were the major -"breaking-change" indicator. - -Caret ranges are ideal when an author may make breaking changes -between `0.2.4` and `0.3.0` releases, which is a common practice. -However, it presumes that there will *not* be breaking changes between -`0.2.4` and `0.2.5`. It allows for changes that are presumed to be -additive (but non-breaking), according to commonly observed practices. - -* `^1.2.3` := `>=1.2.3 <2.0.0-0` -* `^0.2.3` := `>=0.2.3 <0.3.0-0` -* `^0.0.3` := `>=0.0.3 <0.0.4-0` -* `^1.2.3-beta.2` := `>=1.2.3-beta.2 <2.0.0-0` Note that prereleases in - the `1.2.3` version will be allowed, if they are greater than or - equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but - `1.2.4-beta.2` would not, because it is a prerelease of a - different `[major, minor, patch]` tuple. -* `^0.0.3-beta` := `>=0.0.3-beta <0.0.4-0` Note that prereleases in the - `0.0.3` version *only* will be allowed, if they are greater than or - equal to `beta`. So, `0.0.3-pr.2` would be allowed. - -When parsing caret ranges, a missing `patch` value desugars to the -number `0`, but will allow flexibility within that value, even if the -major and minor versions are both `0`. - -* `^1.2.x` := `>=1.2.0 <2.0.0-0` -* `^0.0.x` := `>=0.0.0 <0.1.0-0` -* `^0.0` := `>=0.0.0 <0.1.0-0` - -A missing `minor` and `patch` values will desugar to zero, but also -allow flexibility within those values, even if the major version is -zero. - -* `^1.x` := `>=1.0.0 <2.0.0-0` -* `^0.x` := `>=0.0.0 <1.0.0-0` - -### Range Grammar - -Putting all this together, here is a Backus-Naur grammar for ranges, -for the benefit of parser authors: - -```bnf -range-set ::= range ( logical-or range ) * -logical-or ::= ( ' ' ) * '||' ( ' ' ) * -range ::= hyphen | simple ( ' ' simple ) * | '' -hyphen ::= partial ' - ' partial -simple ::= primitive | partial | tilde | caret -primitive ::= ( '<' | '>' | '>=' | '<=' | '=' ) partial -partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )? -xr ::= 'x' | 'X' | '*' | nr -nr ::= '0' | ['1'-'9'] ( ['0'-'9'] ) * -tilde ::= '~' partial -caret ::= '^' partial -qualifier ::= ( '-' pre )? ( '+' build )? -pre ::= parts -build ::= parts -parts ::= part ( '.' part ) * -part ::= nr | [-0-9A-Za-z]+ -``` - -## Functions - -All methods and classes take a final `options` object argument. All -options in this object are `false` by default. The options supported -are: - -- `loose`: Be more forgiving about not-quite-valid semver strings. - (Any resulting output will always be 100% strict compliant, of - course.) For backwards compatibility reasons, if the `options` - argument is a boolean value instead of an object, it is interpreted - to be the `loose` param. -- `includePrerelease`: Set to suppress the [default - behavior](https://github.com/npm/node-semver#prerelease-tags) of - excluding prerelease tagged versions from ranges unless they are - explicitly opted into. - -Strict-mode Comparators and Ranges will be strict about the SemVer -strings that they parse. - -* `valid(v)`: Return the parsed version, or null if it's not valid. -* `inc(v, releaseType, options, identifier, identifierBase)`: - Return the version incremented by the release - type (`major`, `premajor`, `minor`, `preminor`, `patch`, - `prepatch`, `prerelease`, or `release`), or null if it's not valid - * `premajor` in one call will bump the version up to the next major - version and down to a prerelease of that major version. - `preminor`, and `prepatch` work the same way. - * If called from a non-prerelease version, `prerelease` will work the - same as `prepatch`. It increments the patch version and then makes a - prerelease. If the input version is already a prerelease it simply - increments it. - * `release` will remove any prerelease part of the version. - * `identifier` can be used to prefix `premajor`, `preminor`, - `prepatch`, or `prerelease` version increments. `identifierBase` - is the base to be used for the `prerelease` identifier. -* `prerelease(v)`: Returns an array of prerelease components, or null - if none exist. Example: `prerelease('1.2.3-alpha.1') -> ['alpha', 1]` -* `major(v)`: Return the major version number. -* `minor(v)`: Return the minor version number. -* `patch(v)`: Return the patch version number. -* `intersects(r1, r2, loose)`: Return true if the two supplied ranges - or comparators intersect. -* `parse(v)`: Attempt to parse a string as a semantic version, returning either - a `SemVer` object or `null`. - -### Comparison - -* `gt(v1, v2)`: `v1 > v2` -* `gte(v1, v2)`: `v1 >= v2` -* `lt(v1, v2)`: `v1 < v2` -* `lte(v1, v2)`: `v1 <= v2` -* `eq(v1, v2)`: `v1 == v2` This is true if they're logically equivalent, - even if they're not the same string. You already know how to - compare strings. -* `neq(v1, v2)`: `v1 != v2` The opposite of `eq`. -* `cmp(v1, comparator, v2)`: Pass in a comparison string, and it'll call - the corresponding function above. `"==="` and `"!=="` do simple - string comparison, but are included for completeness. Throws if an - invalid comparison string is provided. -* `compare(v1, v2)`: Return `0` if `v1 == v2`, or `1` if `v1` is greater, or `-1` if - `v2` is greater. Sorts in ascending order if passed to `Array.sort()`. -* `rcompare(v1, v2)`: The reverse of `compare`. Sorts an array of versions - in descending order when passed to `Array.sort()`. -* `compareBuild(v1, v2)`: The same as `compare` but considers `build` when two versions - are equal. Sorts in ascending order if passed to `Array.sort()`. -* `compareLoose(v1, v2)`: Short for `compare(v1, v2, { loose: true })`. -* `diff(v1, v2)`: Returns the difference between two versions by the release type - (`major`, `premajor`, `minor`, `preminor`, `patch`, `prepatch`, or `prerelease`), - or null if the versions are the same. - -### Sorting - -* `sort(versions)`: Returns a sorted array of versions based on the `compareBuild` - function. -* `rsort(versions)`: The reverse of `sort`. Returns an array of versions based on - the `compareBuild` function in descending order. - -### Comparators - -* `intersects(comparator)`: Return true if the comparators intersect - -### Ranges - -* `validRange(range)`: Return the valid range or null if it's not valid. -* `satisfies(version, range)`: Return true if the version satisfies the - range. -* `maxSatisfying(versions, range)`: Return the highest version in the list - that satisfies the range, or `null` if none of them do. -* `minSatisfying(versions, range)`: Return the lowest version in the list - that satisfies the range, or `null` if none of them do. -* `minVersion(range)`: Return the lowest version that can match - the given range. -* `gtr(version, range)`: Return `true` if the version is greater than all the - versions possible in the range. -* `ltr(version, range)`: Return `true` if the version is less than all the - versions possible in the range. -* `outside(version, range, hilo)`: Return true if the version is outside - the bounds of the range in either the high or low direction. The - `hilo` argument must be either the string `'>'` or `'<'`. (This is - the function called by `gtr` and `ltr`.) -* `intersects(range)`: Return true if any of the range comparators intersect. -* `simplifyRange(versions, range)`: Return a "simplified" range that - matches the same items in the `versions` list as the range specified. Note - that it does *not* guarantee that it would match the same versions in all - cases, only for the set of versions provided. This is useful when - generating ranges by joining together multiple versions with `||` - programmatically, to provide the user with something a bit more - ergonomic. If the provided range is shorter in string-length than the - generated range, then that is returned. -* `subset(subRange, superRange)`: Return `true` if the `subRange` range is - entirely contained by the `superRange` range. - -Note that, since ranges may be non-contiguous, a version might not be -greater than a range, less than a range, *or* satisfy a range! For -example, the range `1.2 <1.2.9 || >2.0.0` would have a hole from `1.2.9` -until `2.0.0`, so version `1.2.10` would not be greater than the -range (because `2.0.1` satisfies, which is higher), nor less than the -range (since `1.2.8` satisfies, which is lower), and it also does not -satisfy the range. - -If you want to know if a version satisfies or does not satisfy a -range, use the `satisfies(version, range)` function. - -### Coercion - -* `coerce(version, options)`: Coerces a string to semver if possible - -This aims to provide a very forgiving translation of a non-semver string to -semver. It looks for the first digit in a string and consumes all -remaining characters which satisfy at least a partial semver (e.g., `1`, -`1.2`, `1.2.3`) up to the max permitted length (256 characters). Longer -versions are simply truncated (`4.6.3.9.2-alpha2` becomes `4.6.3`). All -surrounding text is simply ignored (`v3.4 replaces v3.3.1` becomes -`3.4.0`). Only text which lacks digits will fail coercion (`version one` -is not valid). The maximum length for any semver component considered for -coercion is 16 characters; longer components will be ignored -(`10000000000000000.4.7.4` becomes `4.7.4`). The maximum value for any -semver component is `Number.MAX_SAFE_INTEGER || (2**53 - 1)`; higher value -components are invalid (`9999999999999999.4.7.4` is likely invalid). - -If the `options.rtl` flag is set, then `coerce` will return the right-most -coercible tuple that does not share an ending index with a longer coercible -tuple. For example, `1.2.3.4` will return `2.3.4` in rtl mode, not -`4.0.0`. `1.2.3/4` will return `4.0.0`, because the `4` is not a part of -any other overlapping SemVer tuple. - -If the `options.includePrerelease` flag is set, then the `coerce` result will contain -prerelease and build parts of a version. For example, `1.2.3.4-rc.1+rev.2` -will preserve prerelease `rc.1` and build `rev.2` in the result. - -### Clean - -* `clean(version)`: Clean a string to be a valid semver if possible - -This will return a cleaned and trimmed semver version. If the provided -version is not valid a null will be returned. This does not work for -ranges. - -ex. -* `s.clean(' = v 2.1.5foo')`: `null` -* `s.clean(' = v 2.1.5foo', { loose: true })`: `'2.1.5-foo'` -* `s.clean(' = v 2.1.5-foo')`: `null` -* `s.clean(' = v 2.1.5-foo', { loose: true })`: `'2.1.5-foo'` -* `s.clean('=v2.1.5')`: `'2.1.5'` -* `s.clean(' =v2.1.5')`: `'2.1.5'` -* `s.clean(' 2.1.5 ')`: `'2.1.5'` -* `s.clean('~1.0.0')`: `null` - -## Constants - -As a convenience, helper constants are exported to provide information about what `node-semver` supports: - -### `RELEASE_TYPES` - -- major -- premajor -- minor -- preminor -- patch -- prepatch -- prerelease - -``` -const semver = require('semver'); - -if (semver.RELEASE_TYPES.includes(arbitraryUserInput)) { - console.log('This is a valid release type!'); -} else { - console.warn('This is NOT a valid release type!'); -} -``` - -### `SEMVER_SPEC_VERSION` - -2.0.0 - -``` -const semver = require('semver'); - -console.log('We are currently using the semver specification version:', semver.SEMVER_SPEC_VERSION); -``` - -## Exported Modules - - - -You may pull in just the part of this semver utility that you need if you -are sensitive to packing and tree-shaking concerns. The main -`require('semver')` export uses getter functions to lazily load the parts -of the API that are used. - -The following modules are available: - -* `require('semver')` -* `require('semver/classes')` -* `require('semver/classes/comparator')` -* `require('semver/classes/range')` -* `require('semver/classes/semver')` -* `require('semver/functions/clean')` -* `require('semver/functions/cmp')` -* `require('semver/functions/coerce')` -* `require('semver/functions/compare')` -* `require('semver/functions/compare-build')` -* `require('semver/functions/compare-loose')` -* `require('semver/functions/diff')` -* `require('semver/functions/eq')` -* `require('semver/functions/gt')` -* `require('semver/functions/gte')` -* `require('semver/functions/inc')` -* `require('semver/functions/lt')` -* `require('semver/functions/lte')` -* `require('semver/functions/major')` -* `require('semver/functions/minor')` -* `require('semver/functions/neq')` -* `require('semver/functions/parse')` -* `require('semver/functions/patch')` -* `require('semver/functions/prerelease')` -* `require('semver/functions/rcompare')` -* `require('semver/functions/rsort')` -* `require('semver/functions/satisfies')` -* `require('semver/functions/sort')` -* `require('semver/functions/valid')` -* `require('semver/ranges/gtr')` -* `require('semver/ranges/intersects')` -* `require('semver/ranges/ltr')` -* `require('semver/ranges/max-satisfying')` -* `require('semver/ranges/min-satisfying')` -* `require('semver/ranges/min-version')` -* `require('semver/ranges/outside')` -* `require('semver/ranges/simplify')` -* `require('semver/ranges/subset')` -* `require('semver/ranges/to-comparators')` -* `require('semver/ranges/valid')` - diff --git a/PBandGraphScaffold/node_modules/semver/bin/semver.js b/PBandGraphScaffold/node_modules/semver/bin/semver.js deleted file mode 100755 index dbb1bf5..0000000 --- a/PBandGraphScaffold/node_modules/semver/bin/semver.js +++ /dev/null @@ -1,191 +0,0 @@ -#!/usr/bin/env node -// Standalone semver comparison program. -// Exits successfully and prints matching version(s) if -// any supplied version is valid and passes all tests. - -'use strict' - -const argv = process.argv.slice(2) - -let versions = [] - -const range = [] - -let inc = null - -const version = require('../package.json').version - -let loose = false - -let includePrerelease = false - -let coerce = false - -let rtl = false - -let identifier - -let identifierBase - -const semver = require('../') -const parseOptions = require('../internal/parse-options') - -let reverse = false - -let options = {} - -const main = () => { - if (!argv.length) { - return help() - } - while (argv.length) { - let a = argv.shift() - const indexOfEqualSign = a.indexOf('=') - if (indexOfEqualSign !== -1) { - const value = a.slice(indexOfEqualSign + 1) - a = a.slice(0, indexOfEqualSign) - argv.unshift(value) - } - switch (a) { - case '-rv': case '-rev': case '--rev': case '--reverse': - reverse = true - break - case '-l': case '--loose': - loose = true - break - case '-p': case '--include-prerelease': - includePrerelease = true - break - case '-v': case '--version': - versions.push(argv.shift()) - break - case '-i': case '--inc': case '--increment': - switch (argv[0]) { - case 'major': case 'minor': case 'patch': case 'prerelease': - case 'premajor': case 'preminor': case 'prepatch': - case 'release': - inc = argv.shift() - break - default: - inc = 'patch' - break - } - break - case '--preid': - identifier = argv.shift() - break - case '-r': case '--range': - range.push(argv.shift()) - break - case '-n': - identifierBase = argv.shift() - if (identifierBase === 'false') { - identifierBase = false - } - break - case '-c': case '--coerce': - coerce = true - break - case '--rtl': - rtl = true - break - case '--ltr': - rtl = false - break - case '-h': case '--help': case '-?': - return help() - default: - versions.push(a) - break - } - } - - options = parseOptions({ loose, includePrerelease, rtl }) - - versions = versions.map((v) => { - return coerce ? (semver.coerce(v, options) || { version: v }).version : v - }).filter((v) => { - return semver.valid(v) - }) - if (!versions.length) { - return fail() - } - if (inc && (versions.length !== 1 || range.length)) { - return failInc() - } - - for (let i = 0, l = range.length; i < l; i++) { - versions = versions.filter((v) => { - return semver.satisfies(v, range[i], options) - }) - if (!versions.length) { - return fail() - } - } - versions - .sort((a, b) => semver[reverse ? 'rcompare' : 'compare'](a, b, options)) - .map(v => semver.clean(v, options)) - .map(v => inc ? semver.inc(v, inc, options, identifier, identifierBase) : v) - .forEach(v => console.log(v)) -} - -const failInc = () => { - console.error('--inc can only be used on a single version with no range') - fail() -} - -const fail = () => process.exit(1) - -const help = () => console.log( -`SemVer ${version} - -A JavaScript implementation of the https://semver.org/ specification -Copyright Isaac Z. Schlueter - -Usage: semver [options] [ [...]] -Prints valid versions sorted by SemVer precedence - -Options: --r --range - Print versions that match the specified range. - --i --increment [] - Increment a version by the specified level. Level can - be one of: major, minor, patch, premajor, preminor, - prepatch, prerelease, or release. Default level is 'patch'. - Only one version may be specified. - ---preid - Identifier to be used to prefix premajor, preminor, - prepatch or prerelease version increments. - --l --loose - Interpret versions and ranges loosely - --p --include-prerelease - Always include prerelease versions in range matching - --c --coerce - Coerce a string into SemVer if possible - (does not imply --loose) - ---rtl - Coerce version strings right to left - ---ltr - Coerce version strings left to right (default) - --n - Base number to be used for the prerelease identifier. - Can be either 0 or 1, or false to omit the number altogether. - Defaults to 0. - -Program exits successfully if any valid version satisfies -all supplied ranges, and prints all satisfying versions. - -If no satisfying versions are found, then exits failure. - -Versions are printed in ascending order, so supplying -multiple versions to the utility will just sort them.`) - -main() diff --git a/PBandGraphScaffold/node_modules/semver/classes/comparator.js b/PBandGraphScaffold/node_modules/semver/classes/comparator.js deleted file mode 100644 index 647c1f0..0000000 --- a/PBandGraphScaffold/node_modules/semver/classes/comparator.js +++ /dev/null @@ -1,143 +0,0 @@ -'use strict' - -const ANY = Symbol('SemVer ANY') -// hoisted class for cyclic dependency -class Comparator { - static get ANY () { - return ANY - } - - constructor (comp, options) { - options = parseOptions(options) - - if (comp instanceof Comparator) { - if (comp.loose === !!options.loose) { - return comp - } else { - comp = comp.value - } - } - - comp = comp.trim().split(/\s+/).join(' ') - debug('comparator', comp, options) - this.options = options - this.loose = !!options.loose - this.parse(comp) - - if (this.semver === ANY) { - this.value = '' - } else { - this.value = this.operator + this.semver.version - } - - debug('comp', this) - } - - parse (comp) { - const r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR] - const m = comp.match(r) - - if (!m) { - throw new TypeError(`Invalid comparator: ${comp}`) - } - - this.operator = m[1] !== undefined ? m[1] : '' - if (this.operator === '=') { - this.operator = '' - } - - // if it literally is just '>' or '' then allow anything. - if (!m[2]) { - this.semver = ANY - } else { - this.semver = new SemVer(m[2], this.options.loose) - } - } - - toString () { - return this.value - } - - test (version) { - debug('Comparator.test', version, this.options.loose) - - if (this.semver === ANY || version === ANY) { - return true - } - - if (typeof version === 'string') { - try { - version = new SemVer(version, this.options) - } catch (er) { - return false - } - } - - return cmp(version, this.operator, this.semver, this.options) - } - - intersects (comp, options) { - if (!(comp instanceof Comparator)) { - throw new TypeError('a Comparator is required') - } - - if (this.operator === '') { - if (this.value === '') { - return true - } - return new Range(comp.value, options).test(this.value) - } else if (comp.operator === '') { - if (comp.value === '') { - return true - } - return new Range(this.value, options).test(comp.semver) - } - - options = parseOptions(options) - - // Special cases where nothing can possibly be lower - if (options.includePrerelease && - (this.value === '<0.0.0-0' || comp.value === '<0.0.0-0')) { - return false - } - if (!options.includePrerelease && - (this.value.startsWith('<0.0.0') || comp.value.startsWith('<0.0.0'))) { - return false - } - - // Same direction increasing (> or >=) - if (this.operator.startsWith('>') && comp.operator.startsWith('>')) { - return true - } - // Same direction decreasing (< or <=) - if (this.operator.startsWith('<') && comp.operator.startsWith('<')) { - return true - } - // same SemVer and both sides are inclusive (<= or >=) - if ( - (this.semver.version === comp.semver.version) && - this.operator.includes('=') && comp.operator.includes('=')) { - return true - } - // opposite directions less than - if (cmp(this.semver, '<', comp.semver, options) && - this.operator.startsWith('>') && comp.operator.startsWith('<')) { - return true - } - // opposite directions greater than - if (cmp(this.semver, '>', comp.semver, options) && - this.operator.startsWith('<') && comp.operator.startsWith('>')) { - return true - } - return false - } -} - -module.exports = Comparator - -const parseOptions = require('../internal/parse-options') -const { safeRe: re, t } = require('../internal/re') -const cmp = require('../functions/cmp') -const debug = require('../internal/debug') -const SemVer = require('./semver') -const Range = require('./range') diff --git a/PBandGraphScaffold/node_modules/semver/classes/index.js b/PBandGraphScaffold/node_modules/semver/classes/index.js deleted file mode 100644 index 91c24ec..0000000 --- a/PBandGraphScaffold/node_modules/semver/classes/index.js +++ /dev/null @@ -1,7 +0,0 @@ -'use strict' - -module.exports = { - SemVer: require('./semver.js'), - Range: require('./range.js'), - Comparator: require('./comparator.js'), -} diff --git a/PBandGraphScaffold/node_modules/semver/classes/range.js b/PBandGraphScaffold/node_modules/semver/classes/range.js deleted file mode 100644 index 94629ce..0000000 --- a/PBandGraphScaffold/node_modules/semver/classes/range.js +++ /dev/null @@ -1,557 +0,0 @@ -'use strict' - -const SPACE_CHARACTERS = /\s+/g - -// hoisted class for cyclic dependency -class Range { - constructor (range, options) { - options = parseOptions(options) - - if (range instanceof Range) { - if ( - range.loose === !!options.loose && - range.includePrerelease === !!options.includePrerelease - ) { - return range - } else { - return new Range(range.raw, options) - } - } - - if (range instanceof Comparator) { - // just put it in the set and return - this.raw = range.value - this.set = [[range]] - this.formatted = undefined - return this - } - - this.options = options - this.loose = !!options.loose - this.includePrerelease = !!options.includePrerelease - - // First reduce all whitespace as much as possible so we do not have to rely - // on potentially slow regexes like \s*. This is then stored and used for - // future error messages as well. - this.raw = range.trim().replace(SPACE_CHARACTERS, ' ') - - // First, split on || - this.set = this.raw - .split('||') - // map the range to a 2d array of comparators - .map(r => this.parseRange(r.trim())) - // throw out any comparator lists that are empty - // this generally means that it was not a valid range, which is allowed - // in loose mode, but will still throw if the WHOLE range is invalid. - .filter(c => c.length) - - if (!this.set.length) { - throw new TypeError(`Invalid SemVer Range: ${this.raw}`) - } - - // if we have any that are not the null set, throw out null sets. - if (this.set.length > 1) { - // keep the first one, in case they're all null sets - const first = this.set[0] - this.set = this.set.filter(c => !isNullSet(c[0])) - if (this.set.length === 0) { - this.set = [first] - } else if (this.set.length > 1) { - // if we have any that are *, then the range is just * - for (const c of this.set) { - if (c.length === 1 && isAny(c[0])) { - this.set = [c] - break - } - } - } - } - - this.formatted = undefined - } - - get range () { - if (this.formatted === undefined) { - this.formatted = '' - for (let i = 0; i < this.set.length; i++) { - if (i > 0) { - this.formatted += '||' - } - const comps = this.set[i] - for (let k = 0; k < comps.length; k++) { - if (k > 0) { - this.formatted += ' ' - } - this.formatted += comps[k].toString().trim() - } - } - } - return this.formatted - } - - format () { - return this.range - } - - toString () { - return this.range - } - - parseRange (range) { - // memoize range parsing for performance. - // this is a very hot path, and fully deterministic. - const memoOpts = - (this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) | - (this.options.loose && FLAG_LOOSE) - const memoKey = memoOpts + ':' + range - const cached = cache.get(memoKey) - if (cached) { - return cached - } - - const loose = this.options.loose - // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4` - const hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE] - range = range.replace(hr, hyphenReplace(this.options.includePrerelease)) - debug('hyphen replace', range) - - // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5` - range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace) - debug('comparator trim', range) - - // `~ 1.2.3` => `~1.2.3` - range = range.replace(re[t.TILDETRIM], tildeTrimReplace) - debug('tilde trim', range) - - // `^ 1.2.3` => `^1.2.3` - range = range.replace(re[t.CARETTRIM], caretTrimReplace) - debug('caret trim', range) - - // At this point, the range is completely trimmed and - // ready to be split into comparators. - - let rangeList = range - .split(' ') - .map(comp => parseComparator(comp, this.options)) - .join(' ') - .split(/\s+/) - // >=0.0.0 is equivalent to * - .map(comp => replaceGTE0(comp, this.options)) - - if (loose) { - // in loose mode, throw out any that are not valid comparators - rangeList = rangeList.filter(comp => { - debug('loose invalid filter', comp, this.options) - return !!comp.match(re[t.COMPARATORLOOSE]) - }) - } - debug('range list', rangeList) - - // if any comparators are the null set, then replace with JUST null set - // if more than one comparator, remove any * comparators - // also, don't include the same comparator more than once - const rangeMap = new Map() - const comparators = rangeList.map(comp => new Comparator(comp, this.options)) - for (const comp of comparators) { - if (isNullSet(comp)) { - return [comp] - } - rangeMap.set(comp.value, comp) - } - if (rangeMap.size > 1 && rangeMap.has('')) { - rangeMap.delete('') - } - - const result = [...rangeMap.values()] - cache.set(memoKey, result) - return result - } - - intersects (range, options) { - if (!(range instanceof Range)) { - throw new TypeError('a Range is required') - } - - return this.set.some((thisComparators) => { - return ( - isSatisfiable(thisComparators, options) && - range.set.some((rangeComparators) => { - return ( - isSatisfiable(rangeComparators, options) && - thisComparators.every((thisComparator) => { - return rangeComparators.every((rangeComparator) => { - return thisComparator.intersects(rangeComparator, options) - }) - }) - ) - }) - ) - }) - } - - // if ANY of the sets match ALL of its comparators, then pass - test (version) { - if (!version) { - return false - } - - if (typeof version === 'string') { - try { - version = new SemVer(version, this.options) - } catch (er) { - return false - } - } - - for (let i = 0; i < this.set.length; i++) { - if (testSet(this.set[i], version, this.options)) { - return true - } - } - return false - } -} - -module.exports = Range - -const LRU = require('../internal/lrucache') -const cache = new LRU() - -const parseOptions = require('../internal/parse-options') -const Comparator = require('./comparator') -const debug = require('../internal/debug') -const SemVer = require('./semver') -const { - safeRe: re, - t, - comparatorTrimReplace, - tildeTrimReplace, - caretTrimReplace, -} = require('../internal/re') -const { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = require('../internal/constants') - -const isNullSet = c => c.value === '<0.0.0-0' -const isAny = c => c.value === '' - -// take a set of comparators and determine whether there -// exists a version which can satisfy it -const isSatisfiable = (comparators, options) => { - let result = true - const remainingComparators = comparators.slice() - let testComparator = remainingComparators.pop() - - while (result && remainingComparators.length) { - result = remainingComparators.every((otherComparator) => { - return testComparator.intersects(otherComparator, options) - }) - - testComparator = remainingComparators.pop() - } - - return result -} - -// comprised of xranges, tildes, stars, and gtlt's at this point. -// already replaced the hyphen ranges -// turn into a set of JUST comparators. -const parseComparator = (comp, options) => { - comp = comp.replace(re[t.BUILD], '') - debug('comp', comp, options) - comp = replaceCarets(comp, options) - debug('caret', comp) - comp = replaceTildes(comp, options) - debug('tildes', comp) - comp = replaceXRanges(comp, options) - debug('xrange', comp) - comp = replaceStars(comp, options) - debug('stars', comp) - return comp -} - -const isX = id => !id || id.toLowerCase() === 'x' || id === '*' - -// ~, ~> --> * (any, kinda silly) -// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0-0 -// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0-0 -// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0-0 -// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0-0 -// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0-0 -// ~0.0.1 --> >=0.0.1 <0.1.0-0 -const replaceTildes = (comp, options) => { - return comp - .trim() - .split(/\s+/) - .map((c) => replaceTilde(c, options)) - .join(' ') -} - -const replaceTilde = (comp, options) => { - const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE] - return comp.replace(r, (_, M, m, p, pr) => { - debug('tilde', comp, _, M, m, p, pr) - let ret - - if (isX(M)) { - ret = '' - } else if (isX(m)) { - ret = `>=${M}.0.0 <${+M + 1}.0.0-0` - } else if (isX(p)) { - // ~1.2 == >=1.2.0 <1.3.0-0 - ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0-0` - } else if (pr) { - debug('replaceTilde pr', pr) - ret = `>=${M}.${m}.${p}-${pr - } <${M}.${+m + 1}.0-0` - } else { - // ~1.2.3 == >=1.2.3 <1.3.0-0 - ret = `>=${M}.${m}.${p - } <${M}.${+m + 1}.0-0` - } - - debug('tilde return', ret) - return ret - }) -} - -// ^ --> * (any, kinda silly) -// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0-0 -// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0-0 -// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0-0 -// ^1.2.3 --> >=1.2.3 <2.0.0-0 -// ^1.2.0 --> >=1.2.0 <2.0.0-0 -// ^0.0.1 --> >=0.0.1 <0.0.2-0 -// ^0.1.0 --> >=0.1.0 <0.2.0-0 -const replaceCarets = (comp, options) => { - return comp - .trim() - .split(/\s+/) - .map((c) => replaceCaret(c, options)) - .join(' ') -} - -const replaceCaret = (comp, options) => { - debug('caret', comp, options) - const r = options.loose ? re[t.CARETLOOSE] : re[t.CARET] - const z = options.includePrerelease ? '-0' : '' - return comp.replace(r, (_, M, m, p, pr) => { - debug('caret', comp, _, M, m, p, pr) - let ret - - if (isX(M)) { - ret = '' - } else if (isX(m)) { - ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0` - } else if (isX(p)) { - if (M === '0') { - ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0` - } else { - ret = `>=${M}.${m}.0${z} <${+M + 1}.0.0-0` - } - } else if (pr) { - debug('replaceCaret pr', pr) - if (M === '0') { - if (m === '0') { - ret = `>=${M}.${m}.${p}-${pr - } <${M}.${m}.${+p + 1}-0` - } else { - ret = `>=${M}.${m}.${p}-${pr - } <${M}.${+m + 1}.0-0` - } - } else { - ret = `>=${M}.${m}.${p}-${pr - } <${+M + 1}.0.0-0` - } - } else { - debug('no pr') - if (M === '0') { - if (m === '0') { - ret = `>=${M}.${m}.${p - }${z} <${M}.${m}.${+p + 1}-0` - } else { - ret = `>=${M}.${m}.${p - }${z} <${M}.${+m + 1}.0-0` - } - } else { - ret = `>=${M}.${m}.${p - } <${+M + 1}.0.0-0` - } - } - - debug('caret return', ret) - return ret - }) -} - -const replaceXRanges = (comp, options) => { - debug('replaceXRanges', comp, options) - return comp - .split(/\s+/) - .map((c) => replaceXRange(c, options)) - .join(' ') -} - -const replaceXRange = (comp, options) => { - comp = comp.trim() - const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE] - return comp.replace(r, (ret, gtlt, M, m, p, pr) => { - debug('xRange', comp, ret, gtlt, M, m, p, pr) - const xM = isX(M) - const xm = xM || isX(m) - const xp = xm || isX(p) - const anyX = xp - - if (gtlt === '=' && anyX) { - gtlt = '' - } - - // if we're including prereleases in the match, then we need - // to fix this to -0, the lowest possible prerelease value - pr = options.includePrerelease ? '-0' : '' - - if (xM) { - if (gtlt === '>' || gtlt === '<') { - // nothing is allowed - ret = '<0.0.0-0' - } else { - // nothing is forbidden - ret = '*' - } - } else if (gtlt && anyX) { - // we know patch is an x, because we have any x at all. - // replace X with 0 - if (xm) { - m = 0 - } - p = 0 - - if (gtlt === '>') { - // >1 => >=2.0.0 - // >1.2 => >=1.3.0 - gtlt = '>=' - if (xm) { - M = +M + 1 - m = 0 - p = 0 - } else { - m = +m + 1 - p = 0 - } - } else if (gtlt === '<=') { - // <=0.7.x is actually <0.8.0, since any 0.7.x should - // pass. Similarly, <=7.x is actually <8.0.0, etc. - gtlt = '<' - if (xm) { - M = +M + 1 - } else { - m = +m + 1 - } - } - - if (gtlt === '<') { - pr = '-0' - } - - ret = `${gtlt + M}.${m}.${p}${pr}` - } else if (xm) { - ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0` - } else if (xp) { - ret = `>=${M}.${m}.0${pr - } <${M}.${+m + 1}.0-0` - } - - debug('xRange return', ret) - - return ret - }) -} - -// Because * is AND-ed with everything else in the comparator, -// and '' means "any version", just remove the *s entirely. -const replaceStars = (comp, options) => { - debug('replaceStars', comp, options) - // Looseness is ignored here. star is always as loose as it gets! - return comp - .trim() - .replace(re[t.STAR], '') -} - -const replaceGTE0 = (comp, options) => { - debug('replaceGTE0', comp, options) - return comp - .trim() - .replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], '') -} - -// This function is passed to string.replace(re[t.HYPHENRANGE]) -// M, m, patch, prerelease, build -// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5 -// 1.2.3 - 3.4 => >=1.2.0 <3.5.0-0 Any 3.4.x will do -// 1.2 - 3.4 => >=1.2.0 <3.5.0-0 -// TODO build? -const hyphenReplace = incPr => ($0, - from, fM, fm, fp, fpr, fb, - to, tM, tm, tp, tpr) => { - if (isX(fM)) { - from = '' - } else if (isX(fm)) { - from = `>=${fM}.0.0${incPr ? '-0' : ''}` - } else if (isX(fp)) { - from = `>=${fM}.${fm}.0${incPr ? '-0' : ''}` - } else if (fpr) { - from = `>=${from}` - } else { - from = `>=${from}${incPr ? '-0' : ''}` - } - - if (isX(tM)) { - to = '' - } else if (isX(tm)) { - to = `<${+tM + 1}.0.0-0` - } else if (isX(tp)) { - to = `<${tM}.${+tm + 1}.0-0` - } else if (tpr) { - to = `<=${tM}.${tm}.${tp}-${tpr}` - } else if (incPr) { - to = `<${tM}.${tm}.${+tp + 1}-0` - } else { - to = `<=${to}` - } - - return `${from} ${to}`.trim() -} - -const testSet = (set, version, options) => { - for (let i = 0; i < set.length; i++) { - if (!set[i].test(version)) { - return false - } - } - - if (version.prerelease.length && !options.includePrerelease) { - // Find the set of versions that are allowed to have prereleases - // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0 - // That should allow `1.2.3-pr.2` to pass. - // However, `1.2.4-alpha.notready` should NOT be allowed, - // even though it's within the range set by the comparators. - for (let i = 0; i < set.length; i++) { - debug(set[i].semver) - if (set[i].semver === Comparator.ANY) { - continue - } - - if (set[i].semver.prerelease.length > 0) { - const allowed = set[i].semver - if (allowed.major === version.major && - allowed.minor === version.minor && - allowed.patch === version.patch) { - return true - } - } - } - - // Version has a -pre, but it's not one of the ones we like. - return false - } - - return true -} diff --git a/PBandGraphScaffold/node_modules/semver/classes/semver.js b/PBandGraphScaffold/node_modules/semver/classes/semver.js deleted file mode 100644 index 92254be..0000000 --- a/PBandGraphScaffold/node_modules/semver/classes/semver.js +++ /dev/null @@ -1,333 +0,0 @@ -'use strict' - -const debug = require('../internal/debug') -const { MAX_LENGTH, MAX_SAFE_INTEGER } = require('../internal/constants') -const { safeRe: re, t } = require('../internal/re') - -const parseOptions = require('../internal/parse-options') -const { compareIdentifiers } = require('../internal/identifiers') -class SemVer { - constructor (version, options) { - options = parseOptions(options) - - if (version instanceof SemVer) { - if (version.loose === !!options.loose && - version.includePrerelease === !!options.includePrerelease) { - return version - } else { - version = version.version - } - } else if (typeof version !== 'string') { - throw new TypeError(`Invalid version. Must be a string. Got type "${typeof version}".`) - } - - if (version.length > MAX_LENGTH) { - throw new TypeError( - `version is longer than ${MAX_LENGTH} characters` - ) - } - - debug('SemVer', version, options) - this.options = options - this.loose = !!options.loose - // this isn't actually relevant for versions, but keep it so that we - // don't run into trouble passing this.options around. - this.includePrerelease = !!options.includePrerelease - - const m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL]) - - if (!m) { - throw new TypeError(`Invalid Version: ${version}`) - } - - this.raw = version - - // these are actually numbers - this.major = +m[1] - this.minor = +m[2] - this.patch = +m[3] - - if (this.major > MAX_SAFE_INTEGER || this.major < 0) { - throw new TypeError('Invalid major version') - } - - if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) { - throw new TypeError('Invalid minor version') - } - - if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) { - throw new TypeError('Invalid patch version') - } - - // numberify any prerelease numeric ids - if (!m[4]) { - this.prerelease = [] - } else { - this.prerelease = m[4].split('.').map((id) => { - if (/^[0-9]+$/.test(id)) { - const num = +id - if (num >= 0 && num < MAX_SAFE_INTEGER) { - return num - } - } - return id - }) - } - - this.build = m[5] ? m[5].split('.') : [] - this.format() - } - - format () { - this.version = `${this.major}.${this.minor}.${this.patch}` - if (this.prerelease.length) { - this.version += `-${this.prerelease.join('.')}` - } - return this.version - } - - toString () { - return this.version - } - - compare (other) { - debug('SemVer.compare', this.version, this.options, other) - if (!(other instanceof SemVer)) { - if (typeof other === 'string' && other === this.version) { - return 0 - } - other = new SemVer(other, this.options) - } - - if (other.version === this.version) { - return 0 - } - - return this.compareMain(other) || this.comparePre(other) - } - - compareMain (other) { - if (!(other instanceof SemVer)) { - other = new SemVer(other, this.options) - } - - if (this.major < other.major) { - return -1 - } - if (this.major > other.major) { - return 1 - } - if (this.minor < other.minor) { - return -1 - } - if (this.minor > other.minor) { - return 1 - } - if (this.patch < other.patch) { - return -1 - } - if (this.patch > other.patch) { - return 1 - } - return 0 - } - - comparePre (other) { - if (!(other instanceof SemVer)) { - other = new SemVer(other, this.options) - } - - // NOT having a prerelease is > having one - if (this.prerelease.length && !other.prerelease.length) { - return -1 - } else if (!this.prerelease.length && other.prerelease.length) { - return 1 - } else if (!this.prerelease.length && !other.prerelease.length) { - return 0 - } - - let i = 0 - do { - const a = this.prerelease[i] - const b = other.prerelease[i] - debug('prerelease compare', i, a, b) - if (a === undefined && b === undefined) { - return 0 - } else if (b === undefined) { - return 1 - } else if (a === undefined) { - return -1 - } else if (a === b) { - continue - } else { - return compareIdentifiers(a, b) - } - } while (++i) - } - - compareBuild (other) { - if (!(other instanceof SemVer)) { - other = new SemVer(other, this.options) - } - - let i = 0 - do { - const a = this.build[i] - const b = other.build[i] - debug('build compare', i, a, b) - if (a === undefined && b === undefined) { - return 0 - } else if (b === undefined) { - return 1 - } else if (a === undefined) { - return -1 - } else if (a === b) { - continue - } else { - return compareIdentifiers(a, b) - } - } while (++i) - } - - // preminor will bump the version up to the next minor release, and immediately - // down to pre-release. premajor and prepatch work the same way. - inc (release, identifier, identifierBase) { - if (release.startsWith('pre')) { - if (!identifier && identifierBase === false) { - throw new Error('invalid increment argument: identifier is empty') - } - // Avoid an invalid semver results - if (identifier) { - const match = `-${identifier}`.match(this.options.loose ? re[t.PRERELEASELOOSE] : re[t.PRERELEASE]) - if (!match || match[1] !== identifier) { - throw new Error(`invalid identifier: ${identifier}`) - } - } - } - - switch (release) { - case 'premajor': - this.prerelease.length = 0 - this.patch = 0 - this.minor = 0 - this.major++ - this.inc('pre', identifier, identifierBase) - break - case 'preminor': - this.prerelease.length = 0 - this.patch = 0 - this.minor++ - this.inc('pre', identifier, identifierBase) - break - case 'prepatch': - // If this is already a prerelease, it will bump to the next version - // drop any prereleases that might already exist, since they are not - // relevant at this point. - this.prerelease.length = 0 - this.inc('patch', identifier, identifierBase) - this.inc('pre', identifier, identifierBase) - break - // If the input is a non-prerelease version, this acts the same as - // prepatch. - case 'prerelease': - if (this.prerelease.length === 0) { - this.inc('patch', identifier, identifierBase) - } - this.inc('pre', identifier, identifierBase) - break - case 'release': - if (this.prerelease.length === 0) { - throw new Error(`version ${this.raw} is not a prerelease`) - } - this.prerelease.length = 0 - break - - case 'major': - // If this is a pre-major version, bump up to the same major version. - // Otherwise increment major. - // 1.0.0-5 bumps to 1.0.0 - // 1.1.0 bumps to 2.0.0 - if ( - this.minor !== 0 || - this.patch !== 0 || - this.prerelease.length === 0 - ) { - this.major++ - } - this.minor = 0 - this.patch = 0 - this.prerelease = [] - break - case 'minor': - // If this is a pre-minor version, bump up to the same minor version. - // Otherwise increment minor. - // 1.2.0-5 bumps to 1.2.0 - // 1.2.1 bumps to 1.3.0 - if (this.patch !== 0 || this.prerelease.length === 0) { - this.minor++ - } - this.patch = 0 - this.prerelease = [] - break - case 'patch': - // If this is not a pre-release version, it will increment the patch. - // If it is a pre-release it will bump up to the same patch version. - // 1.2.0-5 patches to 1.2.0 - // 1.2.0 patches to 1.2.1 - if (this.prerelease.length === 0) { - this.patch++ - } - this.prerelease = [] - break - // This probably shouldn't be used publicly. - // 1.0.0 'pre' would become 1.0.0-0 which is the wrong direction. - case 'pre': { - const base = Number(identifierBase) ? 1 : 0 - - if (this.prerelease.length === 0) { - this.prerelease = [base] - } else { - let i = this.prerelease.length - while (--i >= 0) { - if (typeof this.prerelease[i] === 'number') { - this.prerelease[i]++ - i = -2 - } - } - if (i === -1) { - // didn't increment anything - if (identifier === this.prerelease.join('.') && identifierBase === false) { - throw new Error('invalid increment argument: identifier already exists') - } - this.prerelease.push(base) - } - } - if (identifier) { - // 1.2.0-beta.1 bumps to 1.2.0-beta.2, - // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0 - let prerelease = [identifier, base] - if (identifierBase === false) { - prerelease = [identifier] - } - if (compareIdentifiers(this.prerelease[0], identifier) === 0) { - if (isNaN(this.prerelease[1])) { - this.prerelease = prerelease - } - } else { - this.prerelease = prerelease - } - } - break - } - default: - throw new Error(`invalid increment argument: ${release}`) - } - this.raw = this.format() - if (this.build.length) { - this.raw += `+${this.build.join('.')}` - } - return this - } -} - -module.exports = SemVer diff --git a/PBandGraphScaffold/node_modules/semver/functions/clean.js b/PBandGraphScaffold/node_modules/semver/functions/clean.js deleted file mode 100644 index 79703d6..0000000 --- a/PBandGraphScaffold/node_modules/semver/functions/clean.js +++ /dev/null @@ -1,8 +0,0 @@ -'use strict' - -const parse = require('./parse') -const clean = (version, options) => { - const s = parse(version.trim().replace(/^[=v]+/, ''), options) - return s ? s.version : null -} -module.exports = clean diff --git a/PBandGraphScaffold/node_modules/semver/functions/cmp.js b/PBandGraphScaffold/node_modules/semver/functions/cmp.js deleted file mode 100644 index 77487dc..0000000 --- a/PBandGraphScaffold/node_modules/semver/functions/cmp.js +++ /dev/null @@ -1,54 +0,0 @@ -'use strict' - -const eq = require('./eq') -const neq = require('./neq') -const gt = require('./gt') -const gte = require('./gte') -const lt = require('./lt') -const lte = require('./lte') - -const cmp = (a, op, b, loose) => { - switch (op) { - case '===': - if (typeof a === 'object') { - a = a.version - } - if (typeof b === 'object') { - b = b.version - } - return a === b - - case '!==': - if (typeof a === 'object') { - a = a.version - } - if (typeof b === 'object') { - b = b.version - } - return a !== b - - case '': - case '=': - case '==': - return eq(a, b, loose) - - case '!=': - return neq(a, b, loose) - - case '>': - return gt(a, b, loose) - - case '>=': - return gte(a, b, loose) - - case '<': - return lt(a, b, loose) - - case '<=': - return lte(a, b, loose) - - default: - throw new TypeError(`Invalid operator: ${op}`) - } -} -module.exports = cmp diff --git a/PBandGraphScaffold/node_modules/semver/functions/coerce.js b/PBandGraphScaffold/node_modules/semver/functions/coerce.js deleted file mode 100644 index cfe0275..0000000 --- a/PBandGraphScaffold/node_modules/semver/functions/coerce.js +++ /dev/null @@ -1,62 +0,0 @@ -'use strict' - -const SemVer = require('../classes/semver') -const parse = require('./parse') -const { safeRe: re, t } = require('../internal/re') - -const coerce = (version, options) => { - if (version instanceof SemVer) { - return version - } - - if (typeof version === 'number') { - version = String(version) - } - - if (typeof version !== 'string') { - return null - } - - options = options || {} - - let match = null - if (!options.rtl) { - match = version.match(options.includePrerelease ? re[t.COERCEFULL] : re[t.COERCE]) - } else { - // Find the right-most coercible string that does not share - // a terminus with a more left-ward coercible string. - // Eg, '1.2.3.4' wants to coerce '2.3.4', not '3.4' or '4' - // With includePrerelease option set, '1.2.3.4-rc' wants to coerce '2.3.4-rc', not '2.3.4' - // - // Walk through the string checking with a /g regexp - // Manually set the index so as to pick up overlapping matches. - // Stop when we get a match that ends at the string end, since no - // coercible string can be more right-ward without the same terminus. - const coerceRtlRegex = options.includePrerelease ? re[t.COERCERTLFULL] : re[t.COERCERTL] - let next - while ((next = coerceRtlRegex.exec(version)) && - (!match || match.index + match[0].length !== version.length) - ) { - if (!match || - next.index + next[0].length !== match.index + match[0].length) { - match = next - } - coerceRtlRegex.lastIndex = next.index + next[1].length + next[2].length - } - // leave it in a clean state - coerceRtlRegex.lastIndex = -1 - } - - if (match === null) { - return null - } - - const major = match[2] - const minor = match[3] || '0' - const patch = match[4] || '0' - const prerelease = options.includePrerelease && match[5] ? `-${match[5]}` : '' - const build = options.includePrerelease && match[6] ? `+${match[6]}` : '' - - return parse(`${major}.${minor}.${patch}${prerelease}${build}`, options) -} -module.exports = coerce diff --git a/PBandGraphScaffold/node_modules/semver/functions/compare-build.js b/PBandGraphScaffold/node_modules/semver/functions/compare-build.js deleted file mode 100644 index 99157cf..0000000 --- a/PBandGraphScaffold/node_modules/semver/functions/compare-build.js +++ /dev/null @@ -1,9 +0,0 @@ -'use strict' - -const SemVer = require('../classes/semver') -const compareBuild = (a, b, loose) => { - const versionA = new SemVer(a, loose) - const versionB = new SemVer(b, loose) - return versionA.compare(versionB) || versionA.compareBuild(versionB) -} -module.exports = compareBuild diff --git a/PBandGraphScaffold/node_modules/semver/functions/compare-loose.js b/PBandGraphScaffold/node_modules/semver/functions/compare-loose.js deleted file mode 100644 index 7531634..0000000 --- a/PBandGraphScaffold/node_modules/semver/functions/compare-loose.js +++ /dev/null @@ -1,5 +0,0 @@ -'use strict' - -const compare = require('./compare') -const compareLoose = (a, b) => compare(a, b, true) -module.exports = compareLoose diff --git a/PBandGraphScaffold/node_modules/semver/functions/compare.js b/PBandGraphScaffold/node_modules/semver/functions/compare.js deleted file mode 100644 index 63d8090..0000000 --- a/PBandGraphScaffold/node_modules/semver/functions/compare.js +++ /dev/null @@ -1,7 +0,0 @@ -'use strict' - -const SemVer = require('../classes/semver') -const compare = (a, b, loose) => - new SemVer(a, loose).compare(new SemVer(b, loose)) - -module.exports = compare diff --git a/PBandGraphScaffold/node_modules/semver/functions/diff.js b/PBandGraphScaffold/node_modules/semver/functions/diff.js deleted file mode 100644 index 04e064e..0000000 --- a/PBandGraphScaffold/node_modules/semver/functions/diff.js +++ /dev/null @@ -1,60 +0,0 @@ -'use strict' - -const parse = require('./parse.js') - -const diff = (version1, version2) => { - const v1 = parse(version1, null, true) - const v2 = parse(version2, null, true) - const comparison = v1.compare(v2) - - if (comparison === 0) { - return null - } - - const v1Higher = comparison > 0 - const highVersion = v1Higher ? v1 : v2 - const lowVersion = v1Higher ? v2 : v1 - const highHasPre = !!highVersion.prerelease.length - const lowHasPre = !!lowVersion.prerelease.length - - if (lowHasPre && !highHasPre) { - // Going from prerelease -> no prerelease requires some special casing - - // If the low version has only a major, then it will always be a major - // Some examples: - // 1.0.0-1 -> 1.0.0 - // 1.0.0-1 -> 1.1.1 - // 1.0.0-1 -> 2.0.0 - if (!lowVersion.patch && !lowVersion.minor) { - return 'major' - } - - // If the main part has no difference - if (lowVersion.compareMain(highVersion) === 0) { - if (lowVersion.minor && !lowVersion.patch) { - return 'minor' - } - return 'patch' - } - } - - // add the `pre` prefix if we are going to a prerelease version - const prefix = highHasPre ? 'pre' : '' - - if (v1.major !== v2.major) { - return prefix + 'major' - } - - if (v1.minor !== v2.minor) { - return prefix + 'minor' - } - - if (v1.patch !== v2.patch) { - return prefix + 'patch' - } - - // high and low are preleases - return 'prerelease' -} - -module.exports = diff diff --git a/PBandGraphScaffold/node_modules/semver/functions/eq.js b/PBandGraphScaffold/node_modules/semver/functions/eq.js deleted file mode 100644 index 5f0eead..0000000 --- a/PBandGraphScaffold/node_modules/semver/functions/eq.js +++ /dev/null @@ -1,5 +0,0 @@ -'use strict' - -const compare = require('./compare') -const eq = (a, b, loose) => compare(a, b, loose) === 0 -module.exports = eq diff --git a/PBandGraphScaffold/node_modules/semver/functions/gt.js b/PBandGraphScaffold/node_modules/semver/functions/gt.js deleted file mode 100644 index 84a57dd..0000000 --- a/PBandGraphScaffold/node_modules/semver/functions/gt.js +++ /dev/null @@ -1,5 +0,0 @@ -'use strict' - -const compare = require('./compare') -const gt = (a, b, loose) => compare(a, b, loose) > 0 -module.exports = gt diff --git a/PBandGraphScaffold/node_modules/semver/functions/gte.js b/PBandGraphScaffold/node_modules/semver/functions/gte.js deleted file mode 100644 index 7c52bdf..0000000 --- a/PBandGraphScaffold/node_modules/semver/functions/gte.js +++ /dev/null @@ -1,5 +0,0 @@ -'use strict' - -const compare = require('./compare') -const gte = (a, b, loose) => compare(a, b, loose) >= 0 -module.exports = gte diff --git a/PBandGraphScaffold/node_modules/semver/functions/inc.js b/PBandGraphScaffold/node_modules/semver/functions/inc.js deleted file mode 100644 index ff999e9..0000000 --- a/PBandGraphScaffold/node_modules/semver/functions/inc.js +++ /dev/null @@ -1,21 +0,0 @@ -'use strict' - -const SemVer = require('../classes/semver') - -const inc = (version, release, options, identifier, identifierBase) => { - if (typeof (options) === 'string') { - identifierBase = identifier - identifier = options - options = undefined - } - - try { - return new SemVer( - version instanceof SemVer ? version.version : version, - options - ).inc(release, identifier, identifierBase).version - } catch (er) { - return null - } -} -module.exports = inc diff --git a/PBandGraphScaffold/node_modules/semver/functions/lt.js b/PBandGraphScaffold/node_modules/semver/functions/lt.js deleted file mode 100644 index 2fb32a0..0000000 --- a/PBandGraphScaffold/node_modules/semver/functions/lt.js +++ /dev/null @@ -1,5 +0,0 @@ -'use strict' - -const compare = require('./compare') -const lt = (a, b, loose) => compare(a, b, loose) < 0 -module.exports = lt diff --git a/PBandGraphScaffold/node_modules/semver/functions/lte.js b/PBandGraphScaffold/node_modules/semver/functions/lte.js deleted file mode 100644 index da9ee8f..0000000 --- a/PBandGraphScaffold/node_modules/semver/functions/lte.js +++ /dev/null @@ -1,5 +0,0 @@ -'use strict' - -const compare = require('./compare') -const lte = (a, b, loose) => compare(a, b, loose) <= 0 -module.exports = lte diff --git a/PBandGraphScaffold/node_modules/semver/functions/major.js b/PBandGraphScaffold/node_modules/semver/functions/major.js deleted file mode 100644 index e6d08dc..0000000 --- a/PBandGraphScaffold/node_modules/semver/functions/major.js +++ /dev/null @@ -1,5 +0,0 @@ -'use strict' - -const SemVer = require('../classes/semver') -const major = (a, loose) => new SemVer(a, loose).major -module.exports = major diff --git a/PBandGraphScaffold/node_modules/semver/functions/minor.js b/PBandGraphScaffold/node_modules/semver/functions/minor.js deleted file mode 100644 index 9e70ffd..0000000 --- a/PBandGraphScaffold/node_modules/semver/functions/minor.js +++ /dev/null @@ -1,5 +0,0 @@ -'use strict' - -const SemVer = require('../classes/semver') -const minor = (a, loose) => new SemVer(a, loose).minor -module.exports = minor diff --git a/PBandGraphScaffold/node_modules/semver/functions/neq.js b/PBandGraphScaffold/node_modules/semver/functions/neq.js deleted file mode 100644 index 84326b7..0000000 --- a/PBandGraphScaffold/node_modules/semver/functions/neq.js +++ /dev/null @@ -1,5 +0,0 @@ -'use strict' - -const compare = require('./compare') -const neq = (a, b, loose) => compare(a, b, loose) !== 0 -module.exports = neq diff --git a/PBandGraphScaffold/node_modules/semver/functions/parse.js b/PBandGraphScaffold/node_modules/semver/functions/parse.js deleted file mode 100644 index d544d33..0000000 --- a/PBandGraphScaffold/node_modules/semver/functions/parse.js +++ /dev/null @@ -1,18 +0,0 @@ -'use strict' - -const SemVer = require('../classes/semver') -const parse = (version, options, throwErrors = false) => { - if (version instanceof SemVer) { - return version - } - try { - return new SemVer(version, options) - } catch (er) { - if (!throwErrors) { - return null - } - throw er - } -} - -module.exports = parse diff --git a/PBandGraphScaffold/node_modules/semver/functions/patch.js b/PBandGraphScaffold/node_modules/semver/functions/patch.js deleted file mode 100644 index 7675162..0000000 --- a/PBandGraphScaffold/node_modules/semver/functions/patch.js +++ /dev/null @@ -1,5 +0,0 @@ -'use strict' - -const SemVer = require('../classes/semver') -const patch = (a, loose) => new SemVer(a, loose).patch -module.exports = patch diff --git a/PBandGraphScaffold/node_modules/semver/functions/prerelease.js b/PBandGraphScaffold/node_modules/semver/functions/prerelease.js deleted file mode 100644 index b8fe1db..0000000 --- a/PBandGraphScaffold/node_modules/semver/functions/prerelease.js +++ /dev/null @@ -1,8 +0,0 @@ -'use strict' - -const parse = require('./parse') -const prerelease = (version, options) => { - const parsed = parse(version, options) - return (parsed && parsed.prerelease.length) ? parsed.prerelease : null -} -module.exports = prerelease diff --git a/PBandGraphScaffold/node_modules/semver/functions/rcompare.js b/PBandGraphScaffold/node_modules/semver/functions/rcompare.js deleted file mode 100644 index 8e1c222..0000000 --- a/PBandGraphScaffold/node_modules/semver/functions/rcompare.js +++ /dev/null @@ -1,5 +0,0 @@ -'use strict' - -const compare = require('./compare') -const rcompare = (a, b, loose) => compare(b, a, loose) -module.exports = rcompare diff --git a/PBandGraphScaffold/node_modules/semver/functions/rsort.js b/PBandGraphScaffold/node_modules/semver/functions/rsort.js deleted file mode 100644 index 5d3d200..0000000 --- a/PBandGraphScaffold/node_modules/semver/functions/rsort.js +++ /dev/null @@ -1,5 +0,0 @@ -'use strict' - -const compareBuild = require('./compare-build') -const rsort = (list, loose) => list.sort((a, b) => compareBuild(b, a, loose)) -module.exports = rsort diff --git a/PBandGraphScaffold/node_modules/semver/functions/satisfies.js b/PBandGraphScaffold/node_modules/semver/functions/satisfies.js deleted file mode 100644 index a0264a2..0000000 --- a/PBandGraphScaffold/node_modules/semver/functions/satisfies.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict' - -const Range = require('../classes/range') -const satisfies = (version, range, options) => { - try { - range = new Range(range, options) - } catch (er) { - return false - } - return range.test(version) -} -module.exports = satisfies diff --git a/PBandGraphScaffold/node_modules/semver/functions/sort.js b/PBandGraphScaffold/node_modules/semver/functions/sort.js deleted file mode 100644 index edb24b1..0000000 --- a/PBandGraphScaffold/node_modules/semver/functions/sort.js +++ /dev/null @@ -1,5 +0,0 @@ -'use strict' - -const compareBuild = require('./compare-build') -const sort = (list, loose) => list.sort((a, b) => compareBuild(a, b, loose)) -module.exports = sort diff --git a/PBandGraphScaffold/node_modules/semver/functions/valid.js b/PBandGraphScaffold/node_modules/semver/functions/valid.js deleted file mode 100644 index 0db67ed..0000000 --- a/PBandGraphScaffold/node_modules/semver/functions/valid.js +++ /dev/null @@ -1,8 +0,0 @@ -'use strict' - -const parse = require('./parse') -const valid = (version, options) => { - const v = parse(version, options) - return v ? v.version : null -} -module.exports = valid diff --git a/PBandGraphScaffold/node_modules/semver/index.js b/PBandGraphScaffold/node_modules/semver/index.js deleted file mode 100644 index 285662a..0000000 --- a/PBandGraphScaffold/node_modules/semver/index.js +++ /dev/null @@ -1,91 +0,0 @@ -'use strict' - -// just pre-load all the stuff that index.js lazily exports -const internalRe = require('./internal/re') -const constants = require('./internal/constants') -const SemVer = require('./classes/semver') -const identifiers = require('./internal/identifiers') -const parse = require('./functions/parse') -const valid = require('./functions/valid') -const clean = require('./functions/clean') -const inc = require('./functions/inc') -const diff = require('./functions/diff') -const major = require('./functions/major') -const minor = require('./functions/minor') -const patch = require('./functions/patch') -const prerelease = require('./functions/prerelease') -const compare = require('./functions/compare') -const rcompare = require('./functions/rcompare') -const compareLoose = require('./functions/compare-loose') -const compareBuild = require('./functions/compare-build') -const sort = require('./functions/sort') -const rsort = require('./functions/rsort') -const gt = require('./functions/gt') -const lt = require('./functions/lt') -const eq = require('./functions/eq') -const neq = require('./functions/neq') -const gte = require('./functions/gte') -const lte = require('./functions/lte') -const cmp = require('./functions/cmp') -const coerce = require('./functions/coerce') -const Comparator = require('./classes/comparator') -const Range = require('./classes/range') -const satisfies = require('./functions/satisfies') -const toComparators = require('./ranges/to-comparators') -const maxSatisfying = require('./ranges/max-satisfying') -const minSatisfying = require('./ranges/min-satisfying') -const minVersion = require('./ranges/min-version') -const validRange = require('./ranges/valid') -const outside = require('./ranges/outside') -const gtr = require('./ranges/gtr') -const ltr = require('./ranges/ltr') -const intersects = require('./ranges/intersects') -const simplifyRange = require('./ranges/simplify') -const subset = require('./ranges/subset') -module.exports = { - parse, - valid, - clean, - inc, - diff, - major, - minor, - patch, - prerelease, - compare, - rcompare, - compareLoose, - compareBuild, - sort, - rsort, - gt, - lt, - eq, - neq, - gte, - lte, - cmp, - coerce, - Comparator, - Range, - satisfies, - toComparators, - maxSatisfying, - minSatisfying, - minVersion, - validRange, - outside, - gtr, - ltr, - intersects, - simplifyRange, - subset, - SemVer, - re: internalRe.re, - src: internalRe.src, - tokens: internalRe.t, - SEMVER_SPEC_VERSION: constants.SEMVER_SPEC_VERSION, - RELEASE_TYPES: constants.RELEASE_TYPES, - compareIdentifiers: identifiers.compareIdentifiers, - rcompareIdentifiers: identifiers.rcompareIdentifiers, -} diff --git a/PBandGraphScaffold/node_modules/semver/internal/constants.js b/PBandGraphScaffold/node_modules/semver/internal/constants.js deleted file mode 100644 index 6d1db91..0000000 --- a/PBandGraphScaffold/node_modules/semver/internal/constants.js +++ /dev/null @@ -1,37 +0,0 @@ -'use strict' - -// Note: this is the semver.org version of the spec that it implements -// Not necessarily the package version of this code. -const SEMVER_SPEC_VERSION = '2.0.0' - -const MAX_LENGTH = 256 -const MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || -/* istanbul ignore next */ 9007199254740991 - -// Max safe segment length for coercion. -const MAX_SAFE_COMPONENT_LENGTH = 16 - -// Max safe length for a build identifier. The max length minus 6 characters for -// the shortest version with a build 0.0.0+BUILD. -const MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6 - -const RELEASE_TYPES = [ - 'major', - 'premajor', - 'minor', - 'preminor', - 'patch', - 'prepatch', - 'prerelease', -] - -module.exports = { - MAX_LENGTH, - MAX_SAFE_COMPONENT_LENGTH, - MAX_SAFE_BUILD_LENGTH, - MAX_SAFE_INTEGER, - RELEASE_TYPES, - SEMVER_SPEC_VERSION, - FLAG_INCLUDE_PRERELEASE: 0b001, - FLAG_LOOSE: 0b010, -} diff --git a/PBandGraphScaffold/node_modules/semver/internal/debug.js b/PBandGraphScaffold/node_modules/semver/internal/debug.js deleted file mode 100644 index 20d1e9d..0000000 --- a/PBandGraphScaffold/node_modules/semver/internal/debug.js +++ /dev/null @@ -1,11 +0,0 @@ -'use strict' - -const debug = ( - typeof process === 'object' && - process.env && - process.env.NODE_DEBUG && - /\bsemver\b/i.test(process.env.NODE_DEBUG) -) ? (...args) => console.error('SEMVER', ...args) - : () => {} - -module.exports = debug diff --git a/PBandGraphScaffold/node_modules/semver/internal/identifiers.js b/PBandGraphScaffold/node_modules/semver/internal/identifiers.js deleted file mode 100644 index d053472..0000000 --- a/PBandGraphScaffold/node_modules/semver/internal/identifiers.js +++ /dev/null @@ -1,29 +0,0 @@ -'use strict' - -const numeric = /^[0-9]+$/ -const compareIdentifiers = (a, b) => { - if (typeof a === 'number' && typeof b === 'number') { - return a === b ? 0 : a < b ? -1 : 1 - } - - const anum = numeric.test(a) - const bnum = numeric.test(b) - - if (anum && bnum) { - a = +a - b = +b - } - - return a === b ? 0 - : (anum && !bnum) ? -1 - : (bnum && !anum) ? 1 - : a < b ? -1 - : 1 -} - -const rcompareIdentifiers = (a, b) => compareIdentifiers(b, a) - -module.exports = { - compareIdentifiers, - rcompareIdentifiers, -} diff --git a/PBandGraphScaffold/node_modules/semver/internal/lrucache.js b/PBandGraphScaffold/node_modules/semver/internal/lrucache.js deleted file mode 100644 index b8bf526..0000000 --- a/PBandGraphScaffold/node_modules/semver/internal/lrucache.js +++ /dev/null @@ -1,42 +0,0 @@ -'use strict' - -class LRUCache { - constructor () { - this.max = 1000 - this.map = new Map() - } - - get (key) { - const value = this.map.get(key) - if (value === undefined) { - return undefined - } else { - // Remove the key from the map and add it to the end - this.map.delete(key) - this.map.set(key, value) - return value - } - } - - delete (key) { - return this.map.delete(key) - } - - set (key, value) { - const deleted = this.delete(key) - - if (!deleted && value !== undefined) { - // If cache is full, delete the least recently used item - if (this.map.size >= this.max) { - const firstKey = this.map.keys().next().value - this.delete(firstKey) - } - - this.map.set(key, value) - } - - return this - } -} - -module.exports = LRUCache diff --git a/PBandGraphScaffold/node_modules/semver/internal/parse-options.js b/PBandGraphScaffold/node_modules/semver/internal/parse-options.js deleted file mode 100644 index 5295454..0000000 --- a/PBandGraphScaffold/node_modules/semver/internal/parse-options.js +++ /dev/null @@ -1,17 +0,0 @@ -'use strict' - -// parse out just the options we care about -const looseOption = Object.freeze({ loose: true }) -const emptyOpts = Object.freeze({ }) -const parseOptions = options => { - if (!options) { - return emptyOpts - } - - if (typeof options !== 'object') { - return looseOption - } - - return options -} -module.exports = parseOptions diff --git a/PBandGraphScaffold/node_modules/semver/internal/re.js b/PBandGraphScaffold/node_modules/semver/internal/re.js deleted file mode 100644 index 4758c58..0000000 --- a/PBandGraphScaffold/node_modules/semver/internal/re.js +++ /dev/null @@ -1,223 +0,0 @@ -'use strict' - -const { - MAX_SAFE_COMPONENT_LENGTH, - MAX_SAFE_BUILD_LENGTH, - MAX_LENGTH, -} = require('./constants') -const debug = require('./debug') -exports = module.exports = {} - -// The actual regexps go on exports.re -const re = exports.re = [] -const safeRe = exports.safeRe = [] -const src = exports.src = [] -const safeSrc = exports.safeSrc = [] -const t = exports.t = {} -let R = 0 - -const LETTERDASHNUMBER = '[a-zA-Z0-9-]' - -// Replace some greedy regex tokens to prevent regex dos issues. These regex are -// used internally via the safeRe object since all inputs in this library get -// normalized first to trim and collapse all extra whitespace. The original -// regexes are exported for userland consumption and lower level usage. A -// future breaking change could export the safer regex only with a note that -// all input should have extra whitespace removed. -const safeRegexReplacements = [ - ['\\s', 1], - ['\\d', MAX_LENGTH], - [LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH], -] - -const makeSafeRegex = (value) => { - for (const [token, max] of safeRegexReplacements) { - value = value - .split(`${token}*`).join(`${token}{0,${max}}`) - .split(`${token}+`).join(`${token}{1,${max}}`) - } - return value -} - -const createToken = (name, value, isGlobal) => { - const safe = makeSafeRegex(value) - const index = R++ - debug(name, index, value) - t[name] = index - src[index] = value - safeSrc[index] = safe - re[index] = new RegExp(value, isGlobal ? 'g' : undefined) - safeRe[index] = new RegExp(safe, isGlobal ? 'g' : undefined) -} - -// The following Regular Expressions can be used for tokenizing, -// validating, and parsing SemVer version strings. - -// ## Numeric Identifier -// A single `0`, or a non-zero digit followed by zero or more digits. - -createToken('NUMERICIDENTIFIER', '0|[1-9]\\d*') -createToken('NUMERICIDENTIFIERLOOSE', '\\d+') - -// ## Non-numeric Identifier -// Zero or more digits, followed by a letter or hyphen, and then zero or -// more letters, digits, or hyphens. - -createToken('NONNUMERICIDENTIFIER', `\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`) - -// ## Main Version -// Three dot-separated numeric identifiers. - -createToken('MAINVERSION', `(${src[t.NUMERICIDENTIFIER]})\\.` + - `(${src[t.NUMERICIDENTIFIER]})\\.` + - `(${src[t.NUMERICIDENTIFIER]})`) - -createToken('MAINVERSIONLOOSE', `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.` + - `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.` + - `(${src[t.NUMERICIDENTIFIERLOOSE]})`) - -// ## Pre-release Version Identifier -// A numeric identifier, or a non-numeric identifier. -// Non-numberic identifiers include numberic identifiers but can be longer. -// Therefore non-numberic identifiers must go first. - -createToken('PRERELEASEIDENTIFIER', `(?:${src[t.NONNUMERICIDENTIFIER] -}|${src[t.NUMERICIDENTIFIER]})`) - -createToken('PRERELEASEIDENTIFIERLOOSE', `(?:${src[t.NONNUMERICIDENTIFIER] -}|${src[t.NUMERICIDENTIFIERLOOSE]})`) - -// ## Pre-release Version -// Hyphen, followed by one or more dot-separated pre-release version -// identifiers. - -createToken('PRERELEASE', `(?:-(${src[t.PRERELEASEIDENTIFIER] -}(?:\\.${src[t.PRERELEASEIDENTIFIER]})*))`) - -createToken('PRERELEASELOOSE', `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE] -}(?:\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`) - -// ## Build Metadata Identifier -// Any combination of digits, letters, or hyphens. - -createToken('BUILDIDENTIFIER', `${LETTERDASHNUMBER}+`) - -// ## Build Metadata -// Plus sign, followed by one or more period-separated build metadata -// identifiers. - -createToken('BUILD', `(?:\\+(${src[t.BUILDIDENTIFIER] -}(?:\\.${src[t.BUILDIDENTIFIER]})*))`) - -// ## Full Version String -// A main version, followed optionally by a pre-release version and -// build metadata. - -// Note that the only major, minor, patch, and pre-release sections of -// the version string are capturing groups. The build metadata is not a -// capturing group, because it should not ever be used in version -// comparison. - -createToken('FULLPLAIN', `v?${src[t.MAINVERSION] -}${src[t.PRERELEASE]}?${ - src[t.BUILD]}?`) - -createToken('FULL', `^${src[t.FULLPLAIN]}$`) - -// like full, but allows v1.2.3 and =1.2.3, which people do sometimes. -// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty -// common in the npm registry. -createToken('LOOSEPLAIN', `[v=\\s]*${src[t.MAINVERSIONLOOSE] -}${src[t.PRERELEASELOOSE]}?${ - src[t.BUILD]}?`) - -createToken('LOOSE', `^${src[t.LOOSEPLAIN]}$`) - -createToken('GTLT', '((?:<|>)?=?)') - -// Something like "2.*" or "1.2.x". -// Note that "x.x" is a valid xRange identifer, meaning "any version" -// Only the first item is strictly required. -createToken('XRANGEIDENTIFIERLOOSE', `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`) -createToken('XRANGEIDENTIFIER', `${src[t.NUMERICIDENTIFIER]}|x|X|\\*`) - -createToken('XRANGEPLAIN', `[v=\\s]*(${src[t.XRANGEIDENTIFIER]})` + - `(?:\\.(${src[t.XRANGEIDENTIFIER]})` + - `(?:\\.(${src[t.XRANGEIDENTIFIER]})` + - `(?:${src[t.PRERELEASE]})?${ - src[t.BUILD]}?` + - `)?)?`) - -createToken('XRANGEPLAINLOOSE', `[v=\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})` + - `(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` + - `(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` + - `(?:${src[t.PRERELEASELOOSE]})?${ - src[t.BUILD]}?` + - `)?)?`) - -createToken('XRANGE', `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAIN]}$`) -createToken('XRANGELOOSE', `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAINLOOSE]}$`) - -// Coercion. -// Extract anything that could conceivably be a part of a valid semver -createToken('COERCEPLAIN', `${'(^|[^\\d])' + - '(\\d{1,'}${MAX_SAFE_COMPONENT_LENGTH}})` + - `(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?` + - `(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?`) -createToken('COERCE', `${src[t.COERCEPLAIN]}(?:$|[^\\d])`) -createToken('COERCEFULL', src[t.COERCEPLAIN] + - `(?:${src[t.PRERELEASE]})?` + - `(?:${src[t.BUILD]})?` + - `(?:$|[^\\d])`) -createToken('COERCERTL', src[t.COERCE], true) -createToken('COERCERTLFULL', src[t.COERCEFULL], true) - -// Tilde ranges. -// Meaning is "reasonably at or greater than" -createToken('LONETILDE', '(?:~>?)') - -createToken('TILDETRIM', `(\\s*)${src[t.LONETILDE]}\\s+`, true) -exports.tildeTrimReplace = '$1~' - -createToken('TILDE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`) -createToken('TILDELOOSE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`) - -// Caret ranges. -// Meaning is "at least and backwards compatible with" -createToken('LONECARET', '(?:\\^)') - -createToken('CARETTRIM', `(\\s*)${src[t.LONECARET]}\\s+`, true) -exports.caretTrimReplace = '$1^' - -createToken('CARET', `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`) -createToken('CARETLOOSE', `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`) - -// A simple gt/lt/eq thing, or just "" to indicate "any version" -createToken('COMPARATORLOOSE', `^${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]})$|^$`) -createToken('COMPARATOR', `^${src[t.GTLT]}\\s*(${src[t.FULLPLAIN]})$|^$`) - -// An expression to strip any whitespace between the gtlt and the thing -// it modifies, so that `> 1.2.3` ==> `>1.2.3` -createToken('COMPARATORTRIM', `(\\s*)${src[t.GTLT] -}\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true) -exports.comparatorTrimReplace = '$1$2$3' - -// Something like `1.2.3 - 1.2.4` -// Note that these all use the loose form, because they'll be -// checked against either the strict or loose comparator form -// later. -createToken('HYPHENRANGE', `^\\s*(${src[t.XRANGEPLAIN]})` + - `\\s+-\\s+` + - `(${src[t.XRANGEPLAIN]})` + - `\\s*$`) - -createToken('HYPHENRANGELOOSE', `^\\s*(${src[t.XRANGEPLAINLOOSE]})` + - `\\s+-\\s+` + - `(${src[t.XRANGEPLAINLOOSE]})` + - `\\s*$`) - -// Star ranges basically just allow anything at all. -createToken('STAR', '(<|>)?=?\\s*\\*') -// >=0.0.0 is like a star -createToken('GTE0', '^\\s*>=\\s*0\\.0\\.0\\s*$') -createToken('GTE0PRE', '^\\s*>=\\s*0\\.0\\.0-0\\s*$') diff --git a/PBandGraphScaffold/node_modules/semver/package.json b/PBandGraphScaffold/node_modules/semver/package.json deleted file mode 100644 index 2b8cada..0000000 --- a/PBandGraphScaffold/node_modules/semver/package.json +++ /dev/null @@ -1,78 +0,0 @@ -{ - "name": "semver", - "version": "7.7.3", - "description": "The semantic version parser used by npm.", - "main": "index.js", - "scripts": { - "test": "tap", - "snap": "tap", - "lint": "npm run eslint", - "postlint": "template-oss-check", - "lintfix": "npm run eslint -- --fix", - "posttest": "npm run lint", - "template-oss-apply": "template-oss-apply --force", - "eslint": "eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\"" - }, - "devDependencies": { - "@npmcli/eslint-config": "^5.0.0", - "@npmcli/template-oss": "4.25.1", - "benchmark": "^2.1.4", - "tap": "^16.0.0" - }, - "license": "ISC", - "repository": { - "type": "git", - "url": "git+https://github.com/npm/node-semver.git" - }, - "bin": { - "semver": "bin/semver.js" - }, - "files": [ - "bin/", - "lib/", - "classes/", - "functions/", - "internal/", - "ranges/", - "index.js", - "preload.js", - "range.bnf" - ], - "tap": { - "timeout": 30, - "coverage-map": "map.js", - "nyc-arg": [ - "--exclude", - "tap-snapshots/**" - ] - }, - "engines": { - "node": ">=10" - }, - "author": "GitHub Inc.", - "templateOSS": { - "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.25.1", - "engines": ">=10", - "distPaths": [ - "classes/", - "functions/", - "internal/", - "ranges/", - "index.js", - "preload.js", - "range.bnf" - ], - "allowPaths": [ - "/classes/", - "/functions/", - "/internal/", - "/ranges/", - "/index.js", - "/preload.js", - "/range.bnf", - "/benchmarks" - ], - "publish": "true" - } -} diff --git a/PBandGraphScaffold/node_modules/semver/preload.js b/PBandGraphScaffold/node_modules/semver/preload.js deleted file mode 100644 index e6c47b9..0000000 --- a/PBandGraphScaffold/node_modules/semver/preload.js +++ /dev/null @@ -1,4 +0,0 @@ -'use strict' - -// XXX remove in v8 or beyond -module.exports = require('./index.js') diff --git a/PBandGraphScaffold/node_modules/semver/range.bnf b/PBandGraphScaffold/node_modules/semver/range.bnf deleted file mode 100644 index d4c6ae0..0000000 --- a/PBandGraphScaffold/node_modules/semver/range.bnf +++ /dev/null @@ -1,16 +0,0 @@ -range-set ::= range ( logical-or range ) * -logical-or ::= ( ' ' ) * '||' ( ' ' ) * -range ::= hyphen | simple ( ' ' simple ) * | '' -hyphen ::= partial ' - ' partial -simple ::= primitive | partial | tilde | caret -primitive ::= ( '<' | '>' | '>=' | '<=' | '=' ) partial -partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )? -xr ::= 'x' | 'X' | '*' | nr -nr ::= '0' | [1-9] ( [0-9] ) * -tilde ::= '~' partial -caret ::= '^' partial -qualifier ::= ( '-' pre )? ( '+' build )? -pre ::= parts -build ::= parts -parts ::= part ( '.' part ) * -part ::= nr | [-0-9A-Za-z]+ diff --git a/PBandGraphScaffold/node_modules/semver/ranges/gtr.js b/PBandGraphScaffold/node_modules/semver/ranges/gtr.js deleted file mode 100644 index 0e7601f..0000000 --- a/PBandGraphScaffold/node_modules/semver/ranges/gtr.js +++ /dev/null @@ -1,6 +0,0 @@ -'use strict' - -// Determine if version is greater than all the versions possible in the range. -const outside = require('./outside') -const gtr = (version, range, options) => outside(version, range, '>', options) -module.exports = gtr diff --git a/PBandGraphScaffold/node_modules/semver/ranges/intersects.js b/PBandGraphScaffold/node_modules/semver/ranges/intersects.js deleted file mode 100644 index 917be7e..0000000 --- a/PBandGraphScaffold/node_modules/semver/ranges/intersects.js +++ /dev/null @@ -1,9 +0,0 @@ -'use strict' - -const Range = require('../classes/range') -const intersects = (r1, r2, options) => { - r1 = new Range(r1, options) - r2 = new Range(r2, options) - return r1.intersects(r2, options) -} -module.exports = intersects diff --git a/PBandGraphScaffold/node_modules/semver/ranges/ltr.js b/PBandGraphScaffold/node_modules/semver/ranges/ltr.js deleted file mode 100644 index aa5e568..0000000 --- a/PBandGraphScaffold/node_modules/semver/ranges/ltr.js +++ /dev/null @@ -1,6 +0,0 @@ -'use strict' - -const outside = require('./outside') -// Determine if version is less than all the versions possible in the range -const ltr = (version, range, options) => outside(version, range, '<', options) -module.exports = ltr diff --git a/PBandGraphScaffold/node_modules/semver/ranges/max-satisfying.js b/PBandGraphScaffold/node_modules/semver/ranges/max-satisfying.js deleted file mode 100644 index 01fe5ae..0000000 --- a/PBandGraphScaffold/node_modules/semver/ranges/max-satisfying.js +++ /dev/null @@ -1,27 +0,0 @@ -'use strict' - -const SemVer = require('../classes/semver') -const Range = require('../classes/range') - -const maxSatisfying = (versions, range, options) => { - let max = null - let maxSV = null - let rangeObj = null - try { - rangeObj = new Range(range, options) - } catch (er) { - return null - } - versions.forEach((v) => { - if (rangeObj.test(v)) { - // satisfies(v, range, options) - if (!max || maxSV.compare(v) === -1) { - // compare(max, v, true) - max = v - maxSV = new SemVer(max, options) - } - } - }) - return max -} -module.exports = maxSatisfying diff --git a/PBandGraphScaffold/node_modules/semver/ranges/min-satisfying.js b/PBandGraphScaffold/node_modules/semver/ranges/min-satisfying.js deleted file mode 100644 index af89c8e..0000000 --- a/PBandGraphScaffold/node_modules/semver/ranges/min-satisfying.js +++ /dev/null @@ -1,26 +0,0 @@ -'use strict' - -const SemVer = require('../classes/semver') -const Range = require('../classes/range') -const minSatisfying = (versions, range, options) => { - let min = null - let minSV = null - let rangeObj = null - try { - rangeObj = new Range(range, options) - } catch (er) { - return null - } - versions.forEach((v) => { - if (rangeObj.test(v)) { - // satisfies(v, range, options) - if (!min || minSV.compare(v) === 1) { - // compare(min, v, true) - min = v - minSV = new SemVer(min, options) - } - } - }) - return min -} -module.exports = minSatisfying diff --git a/PBandGraphScaffold/node_modules/semver/ranges/min-version.js b/PBandGraphScaffold/node_modules/semver/ranges/min-version.js deleted file mode 100644 index 09a65aa..0000000 --- a/PBandGraphScaffold/node_modules/semver/ranges/min-version.js +++ /dev/null @@ -1,63 +0,0 @@ -'use strict' - -const SemVer = require('../classes/semver') -const Range = require('../classes/range') -const gt = require('../functions/gt') - -const minVersion = (range, loose) => { - range = new Range(range, loose) - - let minver = new SemVer('0.0.0') - if (range.test(minver)) { - return minver - } - - minver = new SemVer('0.0.0-0') - if (range.test(minver)) { - return minver - } - - minver = null - for (let i = 0; i < range.set.length; ++i) { - const comparators = range.set[i] - - let setMin = null - comparators.forEach((comparator) => { - // Clone to avoid manipulating the comparator's semver object. - const compver = new SemVer(comparator.semver.version) - switch (comparator.operator) { - case '>': - if (compver.prerelease.length === 0) { - compver.patch++ - } else { - compver.prerelease.push(0) - } - compver.raw = compver.format() - /* fallthrough */ - case '': - case '>=': - if (!setMin || gt(compver, setMin)) { - setMin = compver - } - break - case '<': - case '<=': - /* Ignore maximum versions */ - break - /* istanbul ignore next */ - default: - throw new Error(`Unexpected operation: ${comparator.operator}`) - } - }) - if (setMin && (!minver || gt(minver, setMin))) { - minver = setMin - } - } - - if (minver && range.test(minver)) { - return minver - } - - return null -} -module.exports = minVersion diff --git a/PBandGraphScaffold/node_modules/semver/ranges/outside.js b/PBandGraphScaffold/node_modules/semver/ranges/outside.js deleted file mode 100644 index ca74421..0000000 --- a/PBandGraphScaffold/node_modules/semver/ranges/outside.js +++ /dev/null @@ -1,82 +0,0 @@ -'use strict' - -const SemVer = require('../classes/semver') -const Comparator = require('../classes/comparator') -const { ANY } = Comparator -const Range = require('../classes/range') -const satisfies = require('../functions/satisfies') -const gt = require('../functions/gt') -const lt = require('../functions/lt') -const lte = require('../functions/lte') -const gte = require('../functions/gte') - -const outside = (version, range, hilo, options) => { - version = new SemVer(version, options) - range = new Range(range, options) - - let gtfn, ltefn, ltfn, comp, ecomp - switch (hilo) { - case '>': - gtfn = gt - ltefn = lte - ltfn = lt - comp = '>' - ecomp = '>=' - break - case '<': - gtfn = lt - ltefn = gte - ltfn = gt - comp = '<' - ecomp = '<=' - break - default: - throw new TypeError('Must provide a hilo val of "<" or ">"') - } - - // If it satisfies the range it is not outside - if (satisfies(version, range, options)) { - return false - } - - // From now on, variable terms are as if we're in "gtr" mode. - // but note that everything is flipped for the "ltr" function. - - for (let i = 0; i < range.set.length; ++i) { - const comparators = range.set[i] - - let high = null - let low = null - - comparators.forEach((comparator) => { - if (comparator.semver === ANY) { - comparator = new Comparator('>=0.0.0') - } - high = high || comparator - low = low || comparator - if (gtfn(comparator.semver, high.semver, options)) { - high = comparator - } else if (ltfn(comparator.semver, low.semver, options)) { - low = comparator - } - }) - - // If the edge version comparator has a operator then our version - // isn't outside it - if (high.operator === comp || high.operator === ecomp) { - return false - } - - // If the lowest version comparator has an operator and our version - // is less than it then it isn't higher than the range - if ((!low.operator || low.operator === comp) && - ltefn(version, low.semver)) { - return false - } else if (low.operator === ecomp && ltfn(version, low.semver)) { - return false - } - } - return true -} - -module.exports = outside diff --git a/PBandGraphScaffold/node_modules/semver/ranges/simplify.js b/PBandGraphScaffold/node_modules/semver/ranges/simplify.js deleted file mode 100644 index 262732e..0000000 --- a/PBandGraphScaffold/node_modules/semver/ranges/simplify.js +++ /dev/null @@ -1,49 +0,0 @@ -'use strict' - -// given a set of versions and a range, create a "simplified" range -// that includes the same versions that the original range does -// If the original range is shorter than the simplified one, return that. -const satisfies = require('../functions/satisfies.js') -const compare = require('../functions/compare.js') -module.exports = (versions, range, options) => { - const set = [] - let first = null - let prev = null - const v = versions.sort((a, b) => compare(a, b, options)) - for (const version of v) { - const included = satisfies(version, range, options) - if (included) { - prev = version - if (!first) { - first = version - } - } else { - if (prev) { - set.push([first, prev]) - } - prev = null - first = null - } - } - if (first) { - set.push([first, null]) - } - - const ranges = [] - for (const [min, max] of set) { - if (min === max) { - ranges.push(min) - } else if (!max && min === v[0]) { - ranges.push('*') - } else if (!max) { - ranges.push(`>=${min}`) - } else if (min === v[0]) { - ranges.push(`<=${max}`) - } else { - ranges.push(`${min} - ${max}`) - } - } - const simplified = ranges.join(' || ') - const original = typeof range.raw === 'string' ? range.raw : String(range) - return simplified.length < original.length ? simplified : range -} diff --git a/PBandGraphScaffold/node_modules/semver/ranges/subset.js b/PBandGraphScaffold/node_modules/semver/ranges/subset.js deleted file mode 100644 index 2c49aef..0000000 --- a/PBandGraphScaffold/node_modules/semver/ranges/subset.js +++ /dev/null @@ -1,249 +0,0 @@ -'use strict' - -const Range = require('../classes/range.js') -const Comparator = require('../classes/comparator.js') -const { ANY } = Comparator -const satisfies = require('../functions/satisfies.js') -const compare = require('../functions/compare.js') - -// Complex range `r1 || r2 || ...` is a subset of `R1 || R2 || ...` iff: -// - Every simple range `r1, r2, ...` is a null set, OR -// - Every simple range `r1, r2, ...` which is not a null set is a subset of -// some `R1, R2, ...` -// -// Simple range `c1 c2 ...` is a subset of simple range `C1 C2 ...` iff: -// - If c is only the ANY comparator -// - If C is only the ANY comparator, return true -// - Else if in prerelease mode, return false -// - else replace c with `[>=0.0.0]` -// - If C is only the ANY comparator -// - if in prerelease mode, return true -// - else replace C with `[>=0.0.0]` -// - Let EQ be the set of = comparators in c -// - If EQ is more than one, return true (null set) -// - Let GT be the highest > or >= comparator in c -// - Let LT be the lowest < or <= comparator in c -// - If GT and LT, and GT.semver > LT.semver, return true (null set) -// - If any C is a = range, and GT or LT are set, return false -// - If EQ -// - If GT, and EQ does not satisfy GT, return true (null set) -// - If LT, and EQ does not satisfy LT, return true (null set) -// - If EQ satisfies every C, return true -// - Else return false -// - If GT -// - If GT.semver is lower than any > or >= comp in C, return false -// - If GT is >=, and GT.semver does not satisfy every C, return false -// - If GT.semver has a prerelease, and not in prerelease mode -// - If no C has a prerelease and the GT.semver tuple, return false -// - If LT -// - If LT.semver is greater than any < or <= comp in C, return false -// - If LT is <=, and LT.semver does not satisfy every C, return false -// - If GT.semver has a prerelease, and not in prerelease mode -// - If no C has a prerelease and the LT.semver tuple, return false -// - Else return true - -const subset = (sub, dom, options = {}) => { - if (sub === dom) { - return true - } - - sub = new Range(sub, options) - dom = new Range(dom, options) - let sawNonNull = false - - OUTER: for (const simpleSub of sub.set) { - for (const simpleDom of dom.set) { - const isSub = simpleSubset(simpleSub, simpleDom, options) - sawNonNull = sawNonNull || isSub !== null - if (isSub) { - continue OUTER - } - } - // the null set is a subset of everything, but null simple ranges in - // a complex range should be ignored. so if we saw a non-null range, - // then we know this isn't a subset, but if EVERY simple range was null, - // then it is a subset. - if (sawNonNull) { - return false - } - } - return true -} - -const minimumVersionWithPreRelease = [new Comparator('>=0.0.0-0')] -const minimumVersion = [new Comparator('>=0.0.0')] - -const simpleSubset = (sub, dom, options) => { - if (sub === dom) { - return true - } - - if (sub.length === 1 && sub[0].semver === ANY) { - if (dom.length === 1 && dom[0].semver === ANY) { - return true - } else if (options.includePrerelease) { - sub = minimumVersionWithPreRelease - } else { - sub = minimumVersion - } - } - - if (dom.length === 1 && dom[0].semver === ANY) { - if (options.includePrerelease) { - return true - } else { - dom = minimumVersion - } - } - - const eqSet = new Set() - let gt, lt - for (const c of sub) { - if (c.operator === '>' || c.operator === '>=') { - gt = higherGT(gt, c, options) - } else if (c.operator === '<' || c.operator === '<=') { - lt = lowerLT(lt, c, options) - } else { - eqSet.add(c.semver) - } - } - - if (eqSet.size > 1) { - return null - } - - let gtltComp - if (gt && lt) { - gtltComp = compare(gt.semver, lt.semver, options) - if (gtltComp > 0) { - return null - } else if (gtltComp === 0 && (gt.operator !== '>=' || lt.operator !== '<=')) { - return null - } - } - - // will iterate one or zero times - for (const eq of eqSet) { - if (gt && !satisfies(eq, String(gt), options)) { - return null - } - - if (lt && !satisfies(eq, String(lt), options)) { - return null - } - - for (const c of dom) { - if (!satisfies(eq, String(c), options)) { - return false - } - } - - return true - } - - let higher, lower - let hasDomLT, hasDomGT - // if the subset has a prerelease, we need a comparator in the superset - // with the same tuple and a prerelease, or it's not a subset - let needDomLTPre = lt && - !options.includePrerelease && - lt.semver.prerelease.length ? lt.semver : false - let needDomGTPre = gt && - !options.includePrerelease && - gt.semver.prerelease.length ? gt.semver : false - // exception: <1.2.3-0 is the same as <1.2.3 - if (needDomLTPre && needDomLTPre.prerelease.length === 1 && - lt.operator === '<' && needDomLTPre.prerelease[0] === 0) { - needDomLTPre = false - } - - for (const c of dom) { - hasDomGT = hasDomGT || c.operator === '>' || c.operator === '>=' - hasDomLT = hasDomLT || c.operator === '<' || c.operator === '<=' - if (gt) { - if (needDomGTPre) { - if (c.semver.prerelease && c.semver.prerelease.length && - c.semver.major === needDomGTPre.major && - c.semver.minor === needDomGTPre.minor && - c.semver.patch === needDomGTPre.patch) { - needDomGTPre = false - } - } - if (c.operator === '>' || c.operator === '>=') { - higher = higherGT(gt, c, options) - if (higher === c && higher !== gt) { - return false - } - } else if (gt.operator === '>=' && !satisfies(gt.semver, String(c), options)) { - return false - } - } - if (lt) { - if (needDomLTPre) { - if (c.semver.prerelease && c.semver.prerelease.length && - c.semver.major === needDomLTPre.major && - c.semver.minor === needDomLTPre.minor && - c.semver.patch === needDomLTPre.patch) { - needDomLTPre = false - } - } - if (c.operator === '<' || c.operator === '<=') { - lower = lowerLT(lt, c, options) - if (lower === c && lower !== lt) { - return false - } - } else if (lt.operator === '<=' && !satisfies(lt.semver, String(c), options)) { - return false - } - } - if (!c.operator && (lt || gt) && gtltComp !== 0) { - return false - } - } - - // if there was a < or >, and nothing in the dom, then must be false - // UNLESS it was limited by another range in the other direction. - // Eg, >1.0.0 <1.0.1 is still a subset of <2.0.0 - if (gt && hasDomLT && !lt && gtltComp !== 0) { - return false - } - - if (lt && hasDomGT && !gt && gtltComp !== 0) { - return false - } - - // we needed a prerelease range in a specific tuple, but didn't get one - // then this isn't a subset. eg >=1.2.3-pre is not a subset of >=1.0.0, - // because it includes prereleases in the 1.2.3 tuple - if (needDomGTPre || needDomLTPre) { - return false - } - - return true -} - -// >=1.2.3 is lower than >1.2.3 -const higherGT = (a, b, options) => { - if (!a) { - return b - } - const comp = compare(a.semver, b.semver, options) - return comp > 0 ? a - : comp < 0 ? b - : b.operator === '>' && a.operator === '>=' ? b - : a -} - -// <=1.2.3 is higher than <1.2.3 -const lowerLT = (a, b, options) => { - if (!a) { - return b - } - const comp = compare(a.semver, b.semver, options) - return comp < 0 ? a - : comp > 0 ? b - : b.operator === '<' && a.operator === '<=' ? b - : a -} - -module.exports = subset diff --git a/PBandGraphScaffold/node_modules/semver/ranges/to-comparators.js b/PBandGraphScaffold/node_modules/semver/ranges/to-comparators.js deleted file mode 100644 index 5be2519..0000000 --- a/PBandGraphScaffold/node_modules/semver/ranges/to-comparators.js +++ /dev/null @@ -1,10 +0,0 @@ -'use strict' - -const Range = require('../classes/range') - -// Mostly just for testing and legacy API reasons -const toComparators = (range, options) => - new Range(range, options).set - .map(comp => comp.map(c => c.value).join(' ').trim().split(' ')) - -module.exports = toComparators diff --git a/PBandGraphScaffold/node_modules/semver/ranges/valid.js b/PBandGraphScaffold/node_modules/semver/ranges/valid.js deleted file mode 100644 index cc6b0e9..0000000 --- a/PBandGraphScaffold/node_modules/semver/ranges/valid.js +++ /dev/null @@ -1,13 +0,0 @@ -'use strict' - -const Range = require('../classes/range') -const validRange = (range, options) => { - try { - // Return '*' instead of '' so that truthiness works. - // This will throw if it's invalid anyway - return new Range(range, options).range || '*' - } catch (er) { - return null - } -} -module.exports = validRange diff --git a/PBandGraphScaffold/node_modules/tslib/CopyrightNotice.txt b/PBandGraphScaffold/node_modules/tslib/CopyrightNotice.txt deleted file mode 100644 index 0e42542..0000000 --- a/PBandGraphScaffold/node_modules/tslib/CopyrightNotice.txt +++ /dev/null @@ -1,15 +0,0 @@ -/****************************************************************************** -Copyright (c) Microsoft Corporation. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */ - diff --git a/PBandGraphScaffold/node_modules/tslib/LICENSE.txt b/PBandGraphScaffold/node_modules/tslib/LICENSE.txt deleted file mode 100644 index bfe6430..0000000 --- a/PBandGraphScaffold/node_modules/tslib/LICENSE.txt +++ /dev/null @@ -1,12 +0,0 @@ -Copyright (c) Microsoft Corporation. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/tslib/README.md b/PBandGraphScaffold/node_modules/tslib/README.md deleted file mode 100644 index 290cc61..0000000 --- a/PBandGraphScaffold/node_modules/tslib/README.md +++ /dev/null @@ -1,164 +0,0 @@ -# tslib - -This is a runtime library for [TypeScript](https://www.typescriptlang.org/) that contains all of the TypeScript helper functions. - -This library is primarily used by the `--importHelpers` flag in TypeScript. -When using `--importHelpers`, a module that uses helper functions like `__extends` and `__assign` in the following emitted file: - -```ts -var __assign = (this && this.__assign) || Object.assign || function(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) - t[p] = s[p]; - } - return t; -}; -exports.x = {}; -exports.y = __assign({}, exports.x); - -``` - -will instead be emitted as something like the following: - -```ts -var tslib_1 = require("tslib"); -exports.x = {}; -exports.y = tslib_1.__assign({}, exports.x); -``` - -Because this can avoid duplicate declarations of things like `__extends`, `__assign`, etc., this means delivering users smaller files on average, as well as less runtime overhead. -For optimized bundles with TypeScript, you should absolutely consider using `tslib` and `--importHelpers`. - -# Installing - -For the latest stable version, run: - -## npm - -```sh -# TypeScript 3.9.2 or later -npm install tslib - -# TypeScript 3.8.4 or earlier -npm install tslib@^1 - -# TypeScript 2.3.2 or earlier -npm install tslib@1.6.1 -``` - -## yarn - -```sh -# TypeScript 3.9.2 or later -yarn add tslib - -# TypeScript 3.8.4 or earlier -yarn add tslib@^1 - -# TypeScript 2.3.2 or earlier -yarn add tslib@1.6.1 -``` - -## bower - -```sh -# TypeScript 3.9.2 or later -bower install tslib - -# TypeScript 3.8.4 or earlier -bower install tslib@^1 - -# TypeScript 2.3.2 or earlier -bower install tslib@1.6.1 -``` - -## JSPM - -```sh -# TypeScript 3.9.2 or later -jspm install tslib - -# TypeScript 3.8.4 or earlier -jspm install tslib@^1 - -# TypeScript 2.3.2 or earlier -jspm install tslib@1.6.1 -``` - -# Usage - -Set the `importHelpers` compiler option on the command line: - -``` -tsc --importHelpers file.ts -``` - -or in your tsconfig.json: - -```json -{ - "compilerOptions": { - "importHelpers": true - } -} -``` - -#### For bower and JSPM users - -You will need to add a `paths` mapping for `tslib`, e.g. For Bower users: - -```json -{ - "compilerOptions": { - "module": "amd", - "importHelpers": true, - "baseUrl": "./", - "paths": { - "tslib" : ["bower_components/tslib/tslib.d.ts"] - } - } -} -``` - -For JSPM users: - -```json -{ - "compilerOptions": { - "module": "system", - "importHelpers": true, - "baseUrl": "./", - "paths": { - "tslib" : ["jspm_packages/npm/tslib@2.x.y/tslib.d.ts"] - } - } -} -``` - -## Deployment - -- Choose your new version number -- Set it in `package.json` and `bower.json` -- Create a tag: `git tag [version]` -- Push the tag: `git push --tags` -- Create a [release in GitHub](https://github.com/microsoft/tslib/releases) -- Run the [publish to npm](https://github.com/microsoft/tslib/actions?query=workflow%3A%22Publish+to+NPM%22) workflow - -Done. - -# Contribute - -There are many ways to [contribute](https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md) to TypeScript. - -* [Submit bugs](https://github.com/Microsoft/TypeScript/issues) and help us verify fixes as they are checked in. -* Review the [source code changes](https://github.com/Microsoft/TypeScript/pulls). -* Engage with other TypeScript users and developers on [StackOverflow](http://stackoverflow.com/questions/tagged/typescript). -* Join the [#typescript](http://twitter.com/#!/search/realtime/%23typescript) discussion on Twitter. -* [Contribute bug fixes](https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md). - -# Documentation - -* [Quick tutorial](http://www.typescriptlang.org/Tutorial) -* [Programming handbook](http://www.typescriptlang.org/Handbook) -* [Homepage](http://www.typescriptlang.org/) diff --git a/PBandGraphScaffold/node_modules/tslib/SECURITY.md b/PBandGraphScaffold/node_modules/tslib/SECURITY.md deleted file mode 100644 index 869fdfe..0000000 --- a/PBandGraphScaffold/node_modules/tslib/SECURITY.md +++ /dev/null @@ -1,41 +0,0 @@ - - -## Security - -Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/Microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet), [Xamarin](https://github.com/xamarin), and [our GitHub organizations](https://opensource.microsoft.com/). - -If you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://aka.ms/opensource/security/definition), please report it to us as described below. - -## Reporting Security Issues - -**Please do not report security vulnerabilities through public GitHub issues.** - -Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://aka.ms/opensource/security/create-report). - -If you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://aka.ms/opensource/security/pgpkey). - -You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://aka.ms/opensource/security/msrc). - -Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue: - - * Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.) - * Full paths of source file(s) related to the manifestation of the issue - * The location of the affected source code (tag/branch/commit or direct URL) - * Any special configuration required to reproduce the issue - * Step-by-step instructions to reproduce the issue - * Proof-of-concept or exploit code (if possible) - * Impact of the issue, including how an attacker might exploit the issue - -This information will help us triage your report more quickly. - -If you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://aka.ms/opensource/security/bounty) page for more details about our active programs. - -## Preferred Languages - -We prefer all communications to be in English. - -## Policy - -Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://aka.ms/opensource/security/cvd). - - diff --git a/PBandGraphScaffold/node_modules/tslib/modules/index.d.ts b/PBandGraphScaffold/node_modules/tslib/modules/index.d.ts deleted file mode 100644 index 3244fab..0000000 --- a/PBandGraphScaffold/node_modules/tslib/modules/index.d.ts +++ /dev/null @@ -1,38 +0,0 @@ -// Note: named reexports are used instead of `export *` because -// TypeScript itself doesn't resolve the `export *` when checking -// if a particular helper exists. -export { - __extends, - __assign, - __rest, - __decorate, - __param, - __esDecorate, - __runInitializers, - __propKey, - __setFunctionName, - __metadata, - __awaiter, - __generator, - __exportStar, - __values, - __read, - __spread, - __spreadArrays, - __spreadArray, - __await, - __asyncGenerator, - __asyncDelegator, - __asyncValues, - __makeTemplateObject, - __importStar, - __importDefault, - __classPrivateFieldGet, - __classPrivateFieldSet, - __classPrivateFieldIn, - __createBinding, - __addDisposableResource, - __disposeResources, - __rewriteRelativeImportExtension, -} from '../tslib.js'; -export * as default from '../tslib.js'; diff --git a/PBandGraphScaffold/node_modules/tslib/modules/index.js b/PBandGraphScaffold/node_modules/tslib/modules/index.js deleted file mode 100644 index c91f618..0000000 --- a/PBandGraphScaffold/node_modules/tslib/modules/index.js +++ /dev/null @@ -1,70 +0,0 @@ -import tslib from '../tslib.js'; -const { - __extends, - __assign, - __rest, - __decorate, - __param, - __esDecorate, - __runInitializers, - __propKey, - __setFunctionName, - __metadata, - __awaiter, - __generator, - __exportStar, - __createBinding, - __values, - __read, - __spread, - __spreadArrays, - __spreadArray, - __await, - __asyncGenerator, - __asyncDelegator, - __asyncValues, - __makeTemplateObject, - __importStar, - __importDefault, - __classPrivateFieldGet, - __classPrivateFieldSet, - __classPrivateFieldIn, - __addDisposableResource, - __disposeResources, - __rewriteRelativeImportExtension, -} = tslib; -export { - __extends, - __assign, - __rest, - __decorate, - __param, - __esDecorate, - __runInitializers, - __propKey, - __setFunctionName, - __metadata, - __awaiter, - __generator, - __exportStar, - __createBinding, - __values, - __read, - __spread, - __spreadArrays, - __spreadArray, - __await, - __asyncGenerator, - __asyncDelegator, - __asyncValues, - __makeTemplateObject, - __importStar, - __importDefault, - __classPrivateFieldGet, - __classPrivateFieldSet, - __classPrivateFieldIn, - __addDisposableResource, - __disposeResources, - __rewriteRelativeImportExtension, -}; -export default tslib; diff --git a/PBandGraphScaffold/node_modules/tslib/modules/package.json b/PBandGraphScaffold/node_modules/tslib/modules/package.json deleted file mode 100644 index aafa0e4..0000000 --- a/PBandGraphScaffold/node_modules/tslib/modules/package.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "type": "module" -} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/tslib/package.json b/PBandGraphScaffold/node_modules/tslib/package.json deleted file mode 100644 index 57d0578..0000000 --- a/PBandGraphScaffold/node_modules/tslib/package.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "name": "tslib", - "author": "Microsoft Corp.", - "homepage": "https://www.typescriptlang.org/", - "version": "2.8.1", - "license": "0BSD", - "description": "Runtime library for TypeScript helper functions", - "keywords": [ - "TypeScript", - "Microsoft", - "compiler", - "language", - "javascript", - "tslib", - "runtime" - ], - "bugs": { - "url": "https://github.com/Microsoft/TypeScript/issues" - }, - "repository": { - "type": "git", - "url": "https://github.com/Microsoft/tslib.git" - }, - "main": "tslib.js", - "module": "tslib.es6.js", - "jsnext:main": "tslib.es6.js", - "typings": "tslib.d.ts", - "sideEffects": false, - "exports": { - ".": { - "module": { - "types": "./modules/index.d.ts", - "default": "./tslib.es6.mjs" - }, - "import": { - "node": "./modules/index.js", - "default": { - "types": "./modules/index.d.ts", - "default": "./tslib.es6.mjs" - } - }, - "default": "./tslib.js" - }, - "./*": "./*", - "./": "./" - } -} diff --git a/PBandGraphScaffold/node_modules/tslib/tslib.d.ts b/PBandGraphScaffold/node_modules/tslib/tslib.d.ts deleted file mode 100644 index f23df55..0000000 --- a/PBandGraphScaffold/node_modules/tslib/tslib.d.ts +++ /dev/null @@ -1,460 +0,0 @@ -/****************************************************************************** -Copyright (c) Microsoft Corporation. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */ - -/** - * Used to shim class extends. - * - * @param d The derived class. - * @param b The base class. - */ -export declare function __extends(d: Function, b: Function): void; - -/** - * Copy the values of all of the enumerable own properties from one or more source objects to a - * target object. Returns the target object. - * - * @param t The target object to copy to. - * @param sources One or more source objects from which to copy properties - */ -export declare function __assign(t: any, ...sources: any[]): any; - -/** - * Performs a rest spread on an object. - * - * @param t The source value. - * @param propertyNames The property names excluded from the rest spread. - */ -export declare function __rest(t: any, propertyNames: (string | symbol)[]): any; - -/** - * Applies decorators to a target object - * - * @param decorators The set of decorators to apply. - * @param target The target object. - * @param key If specified, the own property to apply the decorators to. - * @param desc The property descriptor, defaults to fetching the descriptor from the target object. - * @experimental - */ -export declare function __decorate(decorators: Function[], target: any, key?: string | symbol, desc?: any): any; - -/** - * Creates an observing function decorator from a parameter decorator. - * - * @param paramIndex The parameter index to apply the decorator to. - * @param decorator The parameter decorator to apply. Note that the return value is ignored. - * @experimental - */ -export declare function __param(paramIndex: number, decorator: Function): Function; - -/** - * Applies decorators to a class or class member, following the native ECMAScript decorator specification. - * @param ctor For non-field class members, the class constructor. Otherwise, `null`. - * @param descriptorIn The `PropertyDescriptor` to use when unable to look up the property from `ctor`. - * @param decorators The decorators to apply - * @param contextIn The `DecoratorContext` to clone for each decorator application. - * @param initializers An array of field initializer mutation functions into which new initializers are written. - * @param extraInitializers An array of extra initializer functions into which new initializers are written. - */ -export declare function __esDecorate(ctor: Function | null, descriptorIn: object | null, decorators: Function[], contextIn: object, initializers: Function[] | null, extraInitializers: Function[]): void; - -/** - * Runs field initializers or extra initializers generated by `__esDecorate`. - * @param thisArg The `this` argument to use. - * @param initializers The array of initializers to evaluate. - * @param value The initial value to pass to the initializers. - */ -export declare function __runInitializers(thisArg: unknown, initializers: Function[], value?: any): any; - -/** - * Converts a computed property name into a `string` or `symbol` value. - */ -export declare function __propKey(x: any): string | symbol; - -/** - * Assigns the name of a function derived from the left-hand side of an assignment. - * @param f The function to rename. - * @param name The new name for the function. - * @param prefix A prefix (such as `"get"` or `"set"`) to insert before the name. - */ -export declare function __setFunctionName(f: Function, name: string | symbol, prefix?: string): Function; - -/** - * Creates a decorator that sets metadata. - * - * @param metadataKey The metadata key - * @param metadataValue The metadata value - * @experimental - */ -export declare function __metadata(metadataKey: any, metadataValue: any): Function; - -/** - * Converts a generator function into a pseudo-async function, by treating each `yield` as an `await`. - * - * @param thisArg The reference to use as the `this` value in the generator function - * @param _arguments The optional arguments array - * @param P The optional promise constructor argument, defaults to the `Promise` property of the global object. - * @param generator The generator function - */ -export declare function __awaiter(thisArg: any, _arguments: any, P: Function, generator: Function): any; - -/** - * Creates an Iterator object using the body as the implementation. - * - * @param thisArg The reference to use as the `this` value in the function - * @param body The generator state-machine based implementation. - * - * @see [./docs/generator.md] - */ -export declare function __generator(thisArg: any, body: Function): any; - -/** - * Creates bindings for all enumerable properties of `m` on `exports` - * - * @param m The source object - * @param o The `exports` object. - */ -export declare function __exportStar(m: any, o: any): void; - -/** - * Creates a value iterator from an `Iterable` or `ArrayLike` object. - * - * @param o The object. - * @throws {TypeError} If `o` is neither `Iterable`, nor an `ArrayLike`. - */ -export declare function __values(o: any): any; - -/** - * Reads values from an `Iterable` or `ArrayLike` object and returns the resulting array. - * - * @param o The object to read from. - * @param n The maximum number of arguments to read, defaults to `Infinity`. - */ -export declare function __read(o: any, n?: number): any[]; - -/** - * Creates an array from iterable spread. - * - * @param args The Iterable objects to spread. - * @deprecated since TypeScript 4.2 - Use `__spreadArray` - */ -export declare function __spread(...args: any[][]): any[]; - -/** - * Creates an array from array spread. - * - * @param args The ArrayLikes to spread into the resulting array. - * @deprecated since TypeScript 4.2 - Use `__spreadArray` - */ -export declare function __spreadArrays(...args: any[][]): any[]; - -/** - * Spreads the `from` array into the `to` array. - * - * @param pack Replace empty elements with `undefined`. - */ -export declare function __spreadArray(to: any[], from: any[], pack?: boolean): any[]; - -/** - * Creates an object that signals to `__asyncGenerator` that it shouldn't be yielded, - * and instead should be awaited and the resulting value passed back to the generator. - * - * @param v The value to await. - */ -export declare function __await(v: any): any; - -/** - * Converts a generator function into an async generator function, by using `yield __await` - * in place of normal `await`. - * - * @param thisArg The reference to use as the `this` value in the generator function - * @param _arguments The optional arguments array - * @param generator The generator function - */ -export declare function __asyncGenerator(thisArg: any, _arguments: any, generator: Function): any; - -/** - * Used to wrap a potentially async iterator in such a way so that it wraps the result - * of calling iterator methods of `o` in `__await` instances, and then yields the awaited values. - * - * @param o The potentially async iterator. - * @returns A synchronous iterator yielding `__await` instances on every odd invocation - * and returning the awaited `IteratorResult` passed to `next` every even invocation. - */ -export declare function __asyncDelegator(o: any): any; - -/** - * Creates a value async iterator from an `AsyncIterable`, `Iterable` or `ArrayLike` object. - * - * @param o The object. - * @throws {TypeError} If `o` is neither `AsyncIterable`, `Iterable`, nor an `ArrayLike`. - */ -export declare function __asyncValues(o: any): any; - -/** - * Creates a `TemplateStringsArray` frozen object from the `cooked` and `raw` arrays. - * - * @param cooked The cooked possibly-sparse array. - * @param raw The raw string content. - */ -export declare function __makeTemplateObject(cooked: string[], raw: string[]): TemplateStringsArray; - -/** - * Used to shim default and named imports in ECMAScript Modules transpiled to CommonJS. - * - * ```js - * import Default, { Named, Other } from "mod"; - * // or - * import { default as Default, Named, Other } from "mod"; - * ``` - * - * @param mod The CommonJS module exports object. - */ -export declare function __importStar(mod: T): T; - -/** - * Used to shim default imports in ECMAScript Modules transpiled to CommonJS. - * - * ```js - * import Default from "mod"; - * ``` - * - * @param mod The CommonJS module exports object. - */ -export declare function __importDefault(mod: T): T | { default: T }; - -/** - * Emulates reading a private instance field. - * - * @param receiver The instance from which to read the private field. - * @param state A WeakMap containing the private field value for an instance. - * @param kind Either `"f"` for a field, `"a"` for an accessor, or `"m"` for a method. - * - * @throws {TypeError} If `state` doesn't have an entry for `receiver`. - */ -export declare function __classPrivateFieldGet( - receiver: T, - state: { has(o: T): boolean, get(o: T): V | undefined }, - kind?: "f" -): V; - -/** - * Emulates reading a private static field. - * - * @param receiver The object from which to read the private static field. - * @param state The class constructor containing the definition of the static field. - * @param kind Either `"f"` for a field, `"a"` for an accessor, or `"m"` for a method. - * @param f The descriptor that holds the static field value. - * - * @throws {TypeError} If `receiver` is not `state`. - */ -export declare function __classPrivateFieldGet unknown, V>( - receiver: T, - state: T, - kind: "f", - f: { value: V } -): V; - -/** - * Emulates evaluating a private instance "get" accessor. - * - * @param receiver The instance on which to evaluate the private "get" accessor. - * @param state A WeakSet used to verify an instance supports the private "get" accessor. - * @param kind Either `"f"` for a field, `"a"` for an accessor, or `"m"` for a method. - * @param f The "get" accessor function to evaluate. - * - * @throws {TypeError} If `state` doesn't have an entry for `receiver`. - */ -export declare function __classPrivateFieldGet( - receiver: T, - state: { has(o: T): boolean }, - kind: "a", - f: () => V -): V; - -/** - * Emulates evaluating a private static "get" accessor. - * - * @param receiver The object on which to evaluate the private static "get" accessor. - * @param state The class constructor containing the definition of the static "get" accessor. - * @param kind Either `"f"` for a field, `"a"` for an accessor, or `"m"` for a method. - * @param f The "get" accessor function to evaluate. - * - * @throws {TypeError} If `receiver` is not `state`. - */ -export declare function __classPrivateFieldGet unknown, V>( - receiver: T, - state: T, - kind: "a", - f: () => V -): V; - -/** - * Emulates reading a private instance method. - * - * @param receiver The instance from which to read a private method. - * @param state A WeakSet used to verify an instance supports the private method. - * @param kind Either `"f"` for a field, `"a"` for an accessor, or `"m"` for a method. - * @param f The function to return as the private instance method. - * - * @throws {TypeError} If `state` doesn't have an entry for `receiver`. - */ -export declare function __classPrivateFieldGet unknown>( - receiver: T, - state: { has(o: T): boolean }, - kind: "m", - f: V -): V; - -/** - * Emulates reading a private static method. - * - * @param receiver The object from which to read the private static method. - * @param state The class constructor containing the definition of the static method. - * @param kind Either `"f"` for a field, `"a"` for an accessor, or `"m"` for a method. - * @param f The function to return as the private static method. - * - * @throws {TypeError} If `receiver` is not `state`. - */ -export declare function __classPrivateFieldGet unknown, V extends (...args: any[]) => unknown>( - receiver: T, - state: T, - kind: "m", - f: V -): V; - -/** - * Emulates writing to a private instance field. - * - * @param receiver The instance on which to set a private field value. - * @param state A WeakMap used to store the private field value for an instance. - * @param value The value to store in the private field. - * @param kind Either `"f"` for a field, `"a"` for an accessor, or `"m"` for a method. - * - * @throws {TypeError} If `state` doesn't have an entry for `receiver`. - */ -export declare function __classPrivateFieldSet( - receiver: T, - state: { has(o: T): boolean, set(o: T, value: V): unknown }, - value: V, - kind?: "f" -): V; - -/** - * Emulates writing to a private static field. - * - * @param receiver The object on which to set the private static field. - * @param state The class constructor containing the definition of the private static field. - * @param value The value to store in the private field. - * @param kind Either `"f"` for a field, `"a"` for an accessor, or `"m"` for a method. - * @param f The descriptor that holds the static field value. - * - * @throws {TypeError} If `receiver` is not `state`. - */ -export declare function __classPrivateFieldSet unknown, V>( - receiver: T, - state: T, - value: V, - kind: "f", - f: { value: V } -): V; - -/** - * Emulates writing to a private instance "set" accessor. - * - * @param receiver The instance on which to evaluate the private instance "set" accessor. - * @param state A WeakSet used to verify an instance supports the private "set" accessor. - * @param value The value to store in the private accessor. - * @param kind Either `"f"` for a field, `"a"` for an accessor, or `"m"` for a method. - * @param f The "set" accessor function to evaluate. - * - * @throws {TypeError} If `state` doesn't have an entry for `receiver`. - */ -export declare function __classPrivateFieldSet( - receiver: T, - state: { has(o: T): boolean }, - value: V, - kind: "a", - f: (v: V) => void -): V; - -/** - * Emulates writing to a private static "set" accessor. - * - * @param receiver The object on which to evaluate the private static "set" accessor. - * @param state The class constructor containing the definition of the static "set" accessor. - * @param value The value to store in the private field. - * @param kind Either `"f"` for a field, `"a"` for an accessor, or `"m"` for a method. - * @param f The "set" accessor function to evaluate. - * - * @throws {TypeError} If `receiver` is not `state`. - */ -export declare function __classPrivateFieldSet unknown, V>( - receiver: T, - state: T, - value: V, - kind: "a", - f: (v: V) => void -): V; - -/** - * Checks for the existence of a private field/method/accessor. - * - * @param state The class constructor containing the static member, or the WeakMap or WeakSet associated with a private instance member. - * @param receiver The object for which to test the presence of the private member. - */ -export declare function __classPrivateFieldIn( - state: (new (...args: any[]) => unknown) | { has(o: any): boolean }, - receiver: unknown, -): boolean; - -/** - * Creates a re-export binding on `object` with key `objectKey` that references `target[key]`. - * - * @param object The local `exports` object. - * @param target The object to re-export from. - * @param key The property key of `target` to re-export. - * @param objectKey The property key to re-export as. Defaults to `key`. - */ -export declare function __createBinding(object: object, target: object, key: PropertyKey, objectKey?: PropertyKey): void; - -/** - * Adds a disposable resource to a resource-tracking environment object. - * @param env A resource-tracking environment object. - * @param value Either a Disposable or AsyncDisposable object, `null`, or `undefined`. - * @param async When `true`, `AsyncDisposable` resources can be added. When `false`, `AsyncDisposable` resources cannot be added. - * @returns The {@link value} argument. - * - * @throws {TypeError} If {@link value} is not an object, or if either `Symbol.dispose` or `Symbol.asyncDispose` are not - * defined, or if {@link value} does not have an appropriate `Symbol.dispose` or `Symbol.asyncDispose` method. - */ -export declare function __addDisposableResource(env: { stack: { value?: unknown, dispose?: Function, async: boolean }[]; error: unknown; hasError: boolean; }, value: T, async: boolean): T; - -/** - * Disposes all resources in a resource-tracking environment object. - * @param env A resource-tracking environment object. - * @returns A {@link Promise} if any resources in the environment were marked as `async` when added; otherwise, `void`. - * - * @throws {SuppressedError} if an error thrown during disposal would have suppressed a prior error from disposal or the - * error recorded in the resource-tracking environment object. - * @seealso {@link __addDisposableResource} - */ -export declare function __disposeResources(env: { stack: { value?: unknown, dispose?: Function, async: boolean }[]; error: unknown; hasError: boolean; }): any; - -/** - * Transforms a relative import specifier ending in a non-declaration TypeScript file extension to its JavaScript file extension counterpart. - * @param path The import specifier. - * @param preserveJsx Causes '*.tsx' to transform to '*.jsx' instead of '*.js'. Should be true when `--jsx` is set to `preserve`. - */ -export declare function __rewriteRelativeImportExtension(path: string, preserveJsx?: boolean): string; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/tslib/tslib.es6.html b/PBandGraphScaffold/node_modules/tslib/tslib.es6.html deleted file mode 100644 index b122e41..0000000 --- a/PBandGraphScaffold/node_modules/tslib/tslib.es6.html +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/tslib/tslib.es6.js b/PBandGraphScaffold/node_modules/tslib/tslib.es6.js deleted file mode 100644 index 6c1739b..0000000 --- a/PBandGraphScaffold/node_modules/tslib/tslib.es6.js +++ /dev/null @@ -1,402 +0,0 @@ -/****************************************************************************** -Copyright (c) Microsoft Corporation. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */ -/* global Reflect, Promise, SuppressedError, Symbol, Iterator */ - -var extendStatics = function(d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; - return extendStatics(d, b); -}; - -export function __extends(d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -} - -export var __assign = function() { - __assign = Object.assign || function __assign(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; - } - return t; - } - return __assign.apply(this, arguments); -} - -export function __rest(s, e) { - var t = {}; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) - t[p] = s[p]; - if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) - t[p[i]] = s[p[i]]; - } - return t; -} - -export function __decorate(decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -} - -export function __param(paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } -} - -export function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) { - function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; } - var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value"; - var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null; - var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {}); - var _, done = false; - for (var i = decorators.length - 1; i >= 0; i--) { - var context = {}; - for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p]; - for (var p in contextIn.access) context.access[p] = contextIn.access[p]; - context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); }; - var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context); - if (kind === "accessor") { - if (result === void 0) continue; - if (result === null || typeof result !== "object") throw new TypeError("Object expected"); - if (_ = accept(result.get)) descriptor.get = _; - if (_ = accept(result.set)) descriptor.set = _; - if (_ = accept(result.init)) initializers.unshift(_); - } - else if (_ = accept(result)) { - if (kind === "field") initializers.unshift(_); - else descriptor[key] = _; - } - } - if (target) Object.defineProperty(target, contextIn.name, descriptor); - done = true; -}; - -export function __runInitializers(thisArg, initializers, value) { - var useValue = arguments.length > 2; - for (var i = 0; i < initializers.length; i++) { - value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg); - } - return useValue ? value : void 0; -}; - -export function __propKey(x) { - return typeof x === "symbol" ? x : "".concat(x); -}; - -export function __setFunctionName(f, name, prefix) { - if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : ""; - return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name }); -}; - -export function __metadata(metadataKey, metadataValue) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); -} - -export function __awaiter(thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -} - -export function __generator(thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); - return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (g && (g = 0, op[0] && (_ = 0)), _) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -} - -export var __createBinding = Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -}); - -export function __exportStar(m, o) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); -} - -export function __values(o) { - var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; - if (m) return m.call(o); - if (o && typeof o.length === "number") return { - next: function () { - if (o && i >= o.length) o = void 0; - return { value: o && o[i++], done: !o }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); -} - -export function __read(o, n) { - var m = typeof Symbol === "function" && o[Symbol.iterator]; - if (!m) return o; - var i = m.call(o), r, ar = [], e; - try { - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); - } - catch (error) { e = { error: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.call(i); - } - finally { if (e) throw e.error; } - } - return ar; -} - -/** @deprecated */ -export function __spread() { - for (var ar = [], i = 0; i < arguments.length; i++) - ar = ar.concat(__read(arguments[i])); - return ar; -} - -/** @deprecated */ -export function __spreadArrays() { - for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; - for (var r = Array(s), k = 0, i = 0; i < il; i++) - for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) - r[k] = a[j]; - return r; -} - -export function __spreadArray(to, from, pack) { - if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { - if (ar || !(i in from)) { - if (!ar) ar = Array.prototype.slice.call(from, 0, i); - ar[i] = from[i]; - } - } - return to.concat(ar || Array.prototype.slice.call(from)); -} - -export function __await(v) { - return this instanceof __await ? (this.v = v, this) : new __await(v); -} - -export function __asyncGenerator(thisArg, _arguments, generator) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; - function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; } - function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } } - function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } - function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } - function fulfill(value) { resume("next", value); } - function reject(value) { resume("throw", value); } - function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } -} - -export function __asyncDelegator(o) { - var i, p; - return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; - function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; } -} - -export function __asyncValues(o) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var m = o[Symbol.asyncIterator], i; - return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); - function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } - function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } -} - -export function __makeTemplateObject(cooked, raw) { - if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } - return cooked; -}; - -var __setModuleDefault = Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}; - -var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function (o) { - var ar = []; - for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; - return ar; - }; - return ownKeys(o); -}; - -export function __importStar(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); - __setModuleDefault(result, mod); - return result; -} - -export function __importDefault(mod) { - return (mod && mod.__esModule) ? mod : { default: mod }; -} - -export function __classPrivateFieldGet(receiver, state, kind, f) { - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); -} - -export function __classPrivateFieldSet(receiver, state, value, kind, f) { - if (kind === "m") throw new TypeError("Private method is not writable"); - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; -} - -export function __classPrivateFieldIn(state, receiver) { - if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function")) throw new TypeError("Cannot use 'in' operator on non-object"); - return typeof state === "function" ? receiver === state : state.has(receiver); -} - -export function __addDisposableResource(env, value, async) { - if (value !== null && value !== void 0) { - if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); - var dispose, inner; - if (async) { - if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); - dispose = value[Symbol.asyncDispose]; - } - if (dispose === void 0) { - if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined."); - dispose = value[Symbol.dispose]; - if (async) inner = dispose; - } - if (typeof dispose !== "function") throw new TypeError("Object not disposable."); - if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } }; - env.stack.push({ value: value, dispose: dispose, async: async }); - } - else if (async) { - env.stack.push({ async: true }); - } - return value; - -} - -var _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) { - var e = new Error(message); - return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; -}; - -export function __disposeResources(env) { - function fail(e) { - env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e; - env.hasError = true; - } - var r, s = 0; - function next() { - while (r = env.stack.pop()) { - try { - if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next); - if (r.dispose) { - var result = r.dispose.call(r.value); - if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); - } - else s |= 1; - } - catch (e) { - fail(e); - } - } - if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve(); - if (env.hasError) throw env.error; - } - return next(); -} - -export function __rewriteRelativeImportExtension(path, preserveJsx) { - if (typeof path === "string" && /^\.\.?\//.test(path)) { - return path.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) { - return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : (d + ext + "." + cm.toLowerCase() + "js"); - }); - } - return path; -} - -export default { - __extends: __extends, - __assign: __assign, - __rest: __rest, - __decorate: __decorate, - __param: __param, - __esDecorate: __esDecorate, - __runInitializers: __runInitializers, - __propKey: __propKey, - __setFunctionName: __setFunctionName, - __metadata: __metadata, - __awaiter: __awaiter, - __generator: __generator, - __createBinding: __createBinding, - __exportStar: __exportStar, - __values: __values, - __read: __read, - __spread: __spread, - __spreadArrays: __spreadArrays, - __spreadArray: __spreadArray, - __await: __await, - __asyncGenerator: __asyncGenerator, - __asyncDelegator: __asyncDelegator, - __asyncValues: __asyncValues, - __makeTemplateObject: __makeTemplateObject, - __importStar: __importStar, - __importDefault: __importDefault, - __classPrivateFieldGet: __classPrivateFieldGet, - __classPrivateFieldSet: __classPrivateFieldSet, - __classPrivateFieldIn: __classPrivateFieldIn, - __addDisposableResource: __addDisposableResource, - __disposeResources: __disposeResources, - __rewriteRelativeImportExtension: __rewriteRelativeImportExtension, -}; diff --git a/PBandGraphScaffold/node_modules/tslib/tslib.es6.mjs b/PBandGraphScaffold/node_modules/tslib/tslib.es6.mjs deleted file mode 100644 index c17990a..0000000 --- a/PBandGraphScaffold/node_modules/tslib/tslib.es6.mjs +++ /dev/null @@ -1,401 +0,0 @@ -/****************************************************************************** -Copyright (c) Microsoft Corporation. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */ -/* global Reflect, Promise, SuppressedError, Symbol, Iterator */ - -var extendStatics = function(d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; - return extendStatics(d, b); -}; - -export function __extends(d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -} - -export var __assign = function() { - __assign = Object.assign || function __assign(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; - } - return t; - } - return __assign.apply(this, arguments); -} - -export function __rest(s, e) { - var t = {}; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) - t[p] = s[p]; - if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) - t[p[i]] = s[p[i]]; - } - return t; -} - -export function __decorate(decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -} - -export function __param(paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } -} - -export function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) { - function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; } - var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value"; - var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null; - var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {}); - var _, done = false; - for (var i = decorators.length - 1; i >= 0; i--) { - var context = {}; - for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p]; - for (var p in contextIn.access) context.access[p] = contextIn.access[p]; - context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); }; - var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context); - if (kind === "accessor") { - if (result === void 0) continue; - if (result === null || typeof result !== "object") throw new TypeError("Object expected"); - if (_ = accept(result.get)) descriptor.get = _; - if (_ = accept(result.set)) descriptor.set = _; - if (_ = accept(result.init)) initializers.unshift(_); - } - else if (_ = accept(result)) { - if (kind === "field") initializers.unshift(_); - else descriptor[key] = _; - } - } - if (target) Object.defineProperty(target, contextIn.name, descriptor); - done = true; -}; - -export function __runInitializers(thisArg, initializers, value) { - var useValue = arguments.length > 2; - for (var i = 0; i < initializers.length; i++) { - value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg); - } - return useValue ? value : void 0; -}; - -export function __propKey(x) { - return typeof x === "symbol" ? x : "".concat(x); -}; - -export function __setFunctionName(f, name, prefix) { - if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : ""; - return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name }); -}; - -export function __metadata(metadataKey, metadataValue) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); -} - -export function __awaiter(thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -} - -export function __generator(thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); - return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (g && (g = 0, op[0] && (_ = 0)), _) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -} - -export var __createBinding = Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -}); - -export function __exportStar(m, o) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); -} - -export function __values(o) { - var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; - if (m) return m.call(o); - if (o && typeof o.length === "number") return { - next: function () { - if (o && i >= o.length) o = void 0; - return { value: o && o[i++], done: !o }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); -} - -export function __read(o, n) { - var m = typeof Symbol === "function" && o[Symbol.iterator]; - if (!m) return o; - var i = m.call(o), r, ar = [], e; - try { - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); - } - catch (error) { e = { error: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.call(i); - } - finally { if (e) throw e.error; } - } - return ar; -} - -/** @deprecated */ -export function __spread() { - for (var ar = [], i = 0; i < arguments.length; i++) - ar = ar.concat(__read(arguments[i])); - return ar; -} - -/** @deprecated */ -export function __spreadArrays() { - for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; - for (var r = Array(s), k = 0, i = 0; i < il; i++) - for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) - r[k] = a[j]; - return r; -} - -export function __spreadArray(to, from, pack) { - if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { - if (ar || !(i in from)) { - if (!ar) ar = Array.prototype.slice.call(from, 0, i); - ar[i] = from[i]; - } - } - return to.concat(ar || Array.prototype.slice.call(from)); -} - -export function __await(v) { - return this instanceof __await ? (this.v = v, this) : new __await(v); -} - -export function __asyncGenerator(thisArg, _arguments, generator) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; - function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; } - function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } } - function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } - function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } - function fulfill(value) { resume("next", value); } - function reject(value) { resume("throw", value); } - function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } -} - -export function __asyncDelegator(o) { - var i, p; - return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; - function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; } -} - -export function __asyncValues(o) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var m = o[Symbol.asyncIterator], i; - return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); - function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } - function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } -} - -export function __makeTemplateObject(cooked, raw) { - if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } - return cooked; -}; - -var __setModuleDefault = Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}; - -var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function (o) { - var ar = []; - for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; - return ar; - }; - return ownKeys(o); -}; - -export function __importStar(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); - __setModuleDefault(result, mod); - return result; -} - -export function __importDefault(mod) { - return (mod && mod.__esModule) ? mod : { default: mod }; -} - -export function __classPrivateFieldGet(receiver, state, kind, f) { - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); -} - -export function __classPrivateFieldSet(receiver, state, value, kind, f) { - if (kind === "m") throw new TypeError("Private method is not writable"); - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; -} - -export function __classPrivateFieldIn(state, receiver) { - if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function")) throw new TypeError("Cannot use 'in' operator on non-object"); - return typeof state === "function" ? receiver === state : state.has(receiver); -} - -export function __addDisposableResource(env, value, async) { - if (value !== null && value !== void 0) { - if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); - var dispose, inner; - if (async) { - if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); - dispose = value[Symbol.asyncDispose]; - } - if (dispose === void 0) { - if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined."); - dispose = value[Symbol.dispose]; - if (async) inner = dispose; - } - if (typeof dispose !== "function") throw new TypeError("Object not disposable."); - if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } }; - env.stack.push({ value: value, dispose: dispose, async: async }); - } - else if (async) { - env.stack.push({ async: true }); - } - return value; -} - -var _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) { - var e = new Error(message); - return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; -}; - -export function __disposeResources(env) { - function fail(e) { - env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e; - env.hasError = true; - } - var r, s = 0; - function next() { - while (r = env.stack.pop()) { - try { - if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next); - if (r.dispose) { - var result = r.dispose.call(r.value); - if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); - } - else s |= 1; - } - catch (e) { - fail(e); - } - } - if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve(); - if (env.hasError) throw env.error; - } - return next(); -} - -export function __rewriteRelativeImportExtension(path, preserveJsx) { - if (typeof path === "string" && /^\.\.?\//.test(path)) { - return path.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) { - return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : (d + ext + "." + cm.toLowerCase() + "js"); - }); - } - return path; -} - -export default { - __extends, - __assign, - __rest, - __decorate, - __param, - __esDecorate, - __runInitializers, - __propKey, - __setFunctionName, - __metadata, - __awaiter, - __generator, - __createBinding, - __exportStar, - __values, - __read, - __spread, - __spreadArrays, - __spreadArray, - __await, - __asyncGenerator, - __asyncDelegator, - __asyncValues, - __makeTemplateObject, - __importStar, - __importDefault, - __classPrivateFieldGet, - __classPrivateFieldSet, - __classPrivateFieldIn, - __addDisposableResource, - __disposeResources, - __rewriteRelativeImportExtension, -}; diff --git a/PBandGraphScaffold/node_modules/tslib/tslib.html b/PBandGraphScaffold/node_modules/tslib/tslib.html deleted file mode 100644 index 44c9ba5..0000000 --- a/PBandGraphScaffold/node_modules/tslib/tslib.html +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/tslib/tslib.js b/PBandGraphScaffold/node_modules/tslib/tslib.js deleted file mode 100644 index 5e12ace..0000000 --- a/PBandGraphScaffold/node_modules/tslib/tslib.js +++ /dev/null @@ -1,484 +0,0 @@ -/****************************************************************************** -Copyright (c) Microsoft Corporation. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */ -/* global global, define, Symbol, Reflect, Promise, SuppressedError, Iterator */ -var __extends; -var __assign; -var __rest; -var __decorate; -var __param; -var __esDecorate; -var __runInitializers; -var __propKey; -var __setFunctionName; -var __metadata; -var __awaiter; -var __generator; -var __exportStar; -var __values; -var __read; -var __spread; -var __spreadArrays; -var __spreadArray; -var __await; -var __asyncGenerator; -var __asyncDelegator; -var __asyncValues; -var __makeTemplateObject; -var __importStar; -var __importDefault; -var __classPrivateFieldGet; -var __classPrivateFieldSet; -var __classPrivateFieldIn; -var __createBinding; -var __addDisposableResource; -var __disposeResources; -var __rewriteRelativeImportExtension; -(function (factory) { - var root = typeof global === "object" ? global : typeof self === "object" ? self : typeof this === "object" ? this : {}; - if (typeof define === "function" && define.amd) { - define("tslib", ["exports"], function (exports) { factory(createExporter(root, createExporter(exports))); }); - } - else if (typeof module === "object" && typeof module.exports === "object") { - factory(createExporter(root, createExporter(module.exports))); - } - else { - factory(createExporter(root)); - } - function createExporter(exports, previous) { - if (exports !== root) { - if (typeof Object.create === "function") { - Object.defineProperty(exports, "__esModule", { value: true }); - } - else { - exports.__esModule = true; - } - } - return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; - } -}) -(function (exporter) { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; - - __extends = function (d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; - - __assign = Object.assign || function (t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; - } - return t; - }; - - __rest = function (s, e) { - var t = {}; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) - t[p] = s[p]; - if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) - t[p[i]] = s[p[i]]; - } - return t; - }; - - __decorate = function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; - }; - - __param = function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } - }; - - __esDecorate = function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) { - function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; } - var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value"; - var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null; - var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {}); - var _, done = false; - for (var i = decorators.length - 1; i >= 0; i--) { - var context = {}; - for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p]; - for (var p in contextIn.access) context.access[p] = contextIn.access[p]; - context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); }; - var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context); - if (kind === "accessor") { - if (result === void 0) continue; - if (result === null || typeof result !== "object") throw new TypeError("Object expected"); - if (_ = accept(result.get)) descriptor.get = _; - if (_ = accept(result.set)) descriptor.set = _; - if (_ = accept(result.init)) initializers.unshift(_); - } - else if (_ = accept(result)) { - if (kind === "field") initializers.unshift(_); - else descriptor[key] = _; - } - } - if (target) Object.defineProperty(target, contextIn.name, descriptor); - done = true; - }; - - __runInitializers = function (thisArg, initializers, value) { - var useValue = arguments.length > 2; - for (var i = 0; i < initializers.length; i++) { - value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg); - } - return useValue ? value : void 0; - }; - - __propKey = function (x) { - return typeof x === "symbol" ? x : "".concat(x); - }; - - __setFunctionName = function (f, name, prefix) { - if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : ""; - return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name }); - }; - - __metadata = function (metadataKey, metadataValue) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); - }; - - __awaiter = function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - - __generator = function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); - return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (g && (g = 0, op[0] && (_ = 0)), _) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } - }; - - __exportStar = function(m, o) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); - }; - - __createBinding = Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; - }); - - __values = function (o) { - var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; - if (m) return m.call(o); - if (o && typeof o.length === "number") return { - next: function () { - if (o && i >= o.length) o = void 0; - return { value: o && o[i++], done: !o }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); - }; - - __read = function (o, n) { - var m = typeof Symbol === "function" && o[Symbol.iterator]; - if (!m) return o; - var i = m.call(o), r, ar = [], e; - try { - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); - } - catch (error) { e = { error: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.call(i); - } - finally { if (e) throw e.error; } - } - return ar; - }; - - /** @deprecated */ - __spread = function () { - for (var ar = [], i = 0; i < arguments.length; i++) - ar = ar.concat(__read(arguments[i])); - return ar; - }; - - /** @deprecated */ - __spreadArrays = function () { - for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; - for (var r = Array(s), k = 0, i = 0; i < il; i++) - for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) - r[k] = a[j]; - return r; - }; - - __spreadArray = function (to, from, pack) { - if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { - if (ar || !(i in from)) { - if (!ar) ar = Array.prototype.slice.call(from, 0, i); - ar[i] = from[i]; - } - } - return to.concat(ar || Array.prototype.slice.call(from)); - }; - - __await = function (v) { - return this instanceof __await ? (this.v = v, this) : new __await(v); - }; - - __asyncGenerator = function (thisArg, _arguments, generator) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; - function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; } - function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } } - function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } - function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } - function fulfill(value) { resume("next", value); } - function reject(value) { resume("throw", value); } - function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } - }; - - __asyncDelegator = function (o) { - var i, p; - return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; - function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; } - }; - - __asyncValues = function (o) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var m = o[Symbol.asyncIterator], i; - return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); - function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } - function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } - }; - - __makeTemplateObject = function (cooked, raw) { - if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } - return cooked; - }; - - var __setModuleDefault = Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }; - - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function (o) { - var ar = []; - for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; - return ar; - }; - return ownKeys(o); - }; - - __importStar = function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); - __setModuleDefault(result, mod); - return result; - }; - - __importDefault = function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; - }; - - __classPrivateFieldGet = function (receiver, state, kind, f) { - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); - }; - - __classPrivateFieldSet = function (receiver, state, value, kind, f) { - if (kind === "m") throw new TypeError("Private method is not writable"); - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; - }; - - __classPrivateFieldIn = function (state, receiver) { - if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function")) throw new TypeError("Cannot use 'in' operator on non-object"); - return typeof state === "function" ? receiver === state : state.has(receiver); - }; - - __addDisposableResource = function (env, value, async) { - if (value !== null && value !== void 0) { - if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); - var dispose, inner; - if (async) { - if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); - dispose = value[Symbol.asyncDispose]; - } - if (dispose === void 0) { - if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined."); - dispose = value[Symbol.dispose]; - if (async) inner = dispose; - } - if (typeof dispose !== "function") throw new TypeError("Object not disposable."); - if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } }; - env.stack.push({ value: value, dispose: dispose, async: async }); - } - else if (async) { - env.stack.push({ async: true }); - } - return value; - }; - - var _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) { - var e = new Error(message); - return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; - }; - - __disposeResources = function (env) { - function fail(e) { - env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e; - env.hasError = true; - } - var r, s = 0; - function next() { - while (r = env.stack.pop()) { - try { - if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next); - if (r.dispose) { - var result = r.dispose.call(r.value); - if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); - } - else s |= 1; - } - catch (e) { - fail(e); - } - } - if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve(); - if (env.hasError) throw env.error; - } - return next(); - }; - - __rewriteRelativeImportExtension = function (path, preserveJsx) { - if (typeof path === "string" && /^\.\.?\//.test(path)) { - return path.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) { - return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : (d + ext + "." + cm.toLowerCase() + "js"); - }); - } - return path; - }; - - exporter("__extends", __extends); - exporter("__assign", __assign); - exporter("__rest", __rest); - exporter("__decorate", __decorate); - exporter("__param", __param); - exporter("__esDecorate", __esDecorate); - exporter("__runInitializers", __runInitializers); - exporter("__propKey", __propKey); - exporter("__setFunctionName", __setFunctionName); - exporter("__metadata", __metadata); - exporter("__awaiter", __awaiter); - exporter("__generator", __generator); - exporter("__exportStar", __exportStar); - exporter("__createBinding", __createBinding); - exporter("__values", __values); - exporter("__read", __read); - exporter("__spread", __spread); - exporter("__spreadArrays", __spreadArrays); - exporter("__spreadArray", __spreadArray); - exporter("__await", __await); - exporter("__asyncGenerator", __asyncGenerator); - exporter("__asyncDelegator", __asyncDelegator); - exporter("__asyncValues", __asyncValues); - exporter("__makeTemplateObject", __makeTemplateObject); - exporter("__importStar", __importStar); - exporter("__importDefault", __importDefault); - exporter("__classPrivateFieldGet", __classPrivateFieldGet); - exporter("__classPrivateFieldSet", __classPrivateFieldSet); - exporter("__classPrivateFieldIn", __classPrivateFieldIn); - exporter("__addDisposableResource", __addDisposableResource); - exporter("__disposeResources", __disposeResources); - exporter("__rewriteRelativeImportExtension", __rewriteRelativeImportExtension); -}); - -0 && (module.exports = { - __extends: __extends, - __assign: __assign, - __rest: __rest, - __decorate: __decorate, - __param: __param, - __esDecorate: __esDecorate, - __runInitializers: __runInitializers, - __propKey: __propKey, - __setFunctionName: __setFunctionName, - __metadata: __metadata, - __awaiter: __awaiter, - __generator: __generator, - __exportStar: __exportStar, - __createBinding: __createBinding, - __values: __values, - __read: __read, - __spread: __spread, - __spreadArrays: __spreadArrays, - __spreadArray: __spreadArray, - __await: __await, - __asyncGenerator: __asyncGenerator, - __asyncDelegator: __asyncDelegator, - __asyncValues: __asyncValues, - __makeTemplateObject: __makeTemplateObject, - __importStar: __importStar, - __importDefault: __importDefault, - __classPrivateFieldGet: __classPrivateFieldGet, - __classPrivateFieldSet: __classPrivateFieldSet, - __classPrivateFieldIn: __classPrivateFieldIn, - __addDisposableResource: __addDisposableResource, - __disposeResources: __disposeResources, - __rewriteRelativeImportExtension: __rewriteRelativeImportExtension, -}); diff --git a/PBandGraphScaffold/node_modules/undici-types/LICENSE b/PBandGraphScaffold/node_modules/undici-types/LICENSE deleted file mode 100644 index e7323bb..0000000 --- a/PBandGraphScaffold/node_modules/undici-types/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) Matteo Collina and Undici contributors - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/PBandGraphScaffold/node_modules/undici-types/README.md b/PBandGraphScaffold/node_modules/undici-types/README.md deleted file mode 100644 index 20a721c..0000000 --- a/PBandGraphScaffold/node_modules/undici-types/README.md +++ /dev/null @@ -1,6 +0,0 @@ -# undici-types - -This package is a dual-publish of the [undici](https://www.npmjs.com/package/undici) library types. The `undici` package **still contains types**. This package is for users who _only_ need undici types (such as for `@types/node`). It is published alongside every release of `undici`, so you can always use the same version. - -- [GitHub nodejs/undici](https://github.com/nodejs/undici) -- [Undici Documentation](https://undici.nodejs.org/#/) diff --git a/PBandGraphScaffold/node_modules/undici-types/agent.d.ts b/PBandGraphScaffold/node_modules/undici-types/agent.d.ts deleted file mode 100644 index 4bb3512..0000000 --- a/PBandGraphScaffold/node_modules/undici-types/agent.d.ts +++ /dev/null @@ -1,32 +0,0 @@ -import { URL } from 'url' -import Pool from './pool' -import Dispatcher from './dispatcher' -import TClientStats from './client-stats' -import TPoolStats from './pool-stats' - -export default Agent - -declare class Agent extends Dispatcher { - constructor (opts?: Agent.Options) - /** `true` after `dispatcher.close()` has been called. */ - closed: boolean - /** `true` after `dispatcher.destroyed()` has been called or `dispatcher.close()` has been called and the dispatcher shutdown has completed. */ - destroyed: boolean - /** Dispatches a request. */ - dispatch (options: Agent.DispatchOptions, handler: Dispatcher.DispatchHandler): boolean - /** Aggregate stats for a Agent by origin. */ - readonly stats: Record -} - -declare namespace Agent { - export interface Options extends Pool.Options { - /** Default: `(origin, opts) => new Pool(origin, opts)`. */ - factory?(origin: string | URL, opts: Object): Dispatcher; - - interceptors?: { Agent?: readonly Dispatcher.DispatchInterceptor[] } & Pool.Options['interceptors'] - maxOrigins?: number - } - - export interface DispatchOptions extends Dispatcher.DispatchOptions { - } -} diff --git a/PBandGraphScaffold/node_modules/undici-types/api.d.ts b/PBandGraphScaffold/node_modules/undici-types/api.d.ts deleted file mode 100644 index e58d08f..0000000 --- a/PBandGraphScaffold/node_modules/undici-types/api.d.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { URL, UrlObject } from 'url' -import { Duplex } from 'stream' -import Dispatcher from './dispatcher' - -/** Performs an HTTP request. */ -declare function request ( - url: string | URL | UrlObject, - options?: { dispatcher?: Dispatcher } & Omit, 'origin' | 'path' | 'method'> & Partial>, -): Promise> - -/** A faster version of `request`. */ -declare function stream ( - url: string | URL | UrlObject, - options: { dispatcher?: Dispatcher } & Omit, 'origin' | 'path'>, - factory: Dispatcher.StreamFactory -): Promise> - -/** For easy use with `stream.pipeline`. */ -declare function pipeline ( - url: string | URL | UrlObject, - options: { dispatcher?: Dispatcher } & Omit, 'origin' | 'path'>, - handler: Dispatcher.PipelineHandler -): Duplex - -/** Starts two-way communications with the requested resource. */ -declare function connect ( - url: string | URL | UrlObject, - options?: { dispatcher?: Dispatcher } & Omit, 'origin' | 'path'> -): Promise> - -/** Upgrade to a different protocol. */ -declare function upgrade ( - url: string | URL | UrlObject, - options?: { dispatcher?: Dispatcher } & Omit -): Promise - -export { - request, - stream, - pipeline, - connect, - upgrade -} diff --git a/PBandGraphScaffold/node_modules/undici-types/balanced-pool.d.ts b/PBandGraphScaffold/node_modules/undici-types/balanced-pool.d.ts deleted file mode 100644 index 733239c..0000000 --- a/PBandGraphScaffold/node_modules/undici-types/balanced-pool.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -import Pool from './pool' -import Dispatcher from './dispatcher' -import { URL } from 'url' - -export default BalancedPool - -type BalancedPoolConnectOptions = Omit - -declare class BalancedPool extends Dispatcher { - constructor (url: string | string[] | URL | URL[], options?: Pool.Options) - - addUpstream (upstream: string | URL): BalancedPool - removeUpstream (upstream: string | URL): BalancedPool - upstreams: Array - - /** `true` after `pool.close()` has been called. */ - closed: boolean - /** `true` after `pool.destroyed()` has been called or `pool.close()` has been called and the pool shutdown has completed. */ - destroyed: boolean - - // Override dispatcher APIs. - override connect ( - options: BalancedPoolConnectOptions - ): Promise - override connect ( - options: BalancedPoolConnectOptions, - callback: (err: Error | null, data: Dispatcher.ConnectData) => void - ): void -} diff --git a/PBandGraphScaffold/node_modules/undici-types/cache-interceptor.d.ts b/PBandGraphScaffold/node_modules/undici-types/cache-interceptor.d.ts deleted file mode 100644 index e53be60..0000000 --- a/PBandGraphScaffold/node_modules/undici-types/cache-interceptor.d.ts +++ /dev/null @@ -1,172 +0,0 @@ -import { Readable, Writable } from 'node:stream' - -export default CacheHandler - -declare namespace CacheHandler { - export type CacheMethods = 'GET' | 'HEAD' | 'OPTIONS' | 'TRACE' - - export interface CacheHandlerOptions { - store: CacheStore - - cacheByDefault?: number - - type?: CacheOptions['type'] - } - - export interface CacheOptions { - store?: CacheStore - - /** - * The methods to cache - * Note we can only cache safe methods. Unsafe methods (i.e. PUT, POST) - * invalidate the cache for a origin. - * @see https://www.rfc-editor.org/rfc/rfc9111.html#name-invalidating-stored-respons - * @see https://www.rfc-editor.org/rfc/rfc9110#section-9.2.1 - */ - methods?: CacheMethods[] - - /** - * RFC9111 allows for caching responses that we aren't explicitly told to - * cache or to not cache. - * @see https://www.rfc-editor.org/rfc/rfc9111.html#section-3-5 - * @default undefined - */ - cacheByDefault?: number - - /** - * TODO docs - * @default 'shared' - */ - type?: 'shared' | 'private' - } - - export interface CacheControlDirectives { - 'max-stale'?: number; - 'min-fresh'?: number; - 'max-age'?: number; - 's-maxage'?: number; - 'stale-while-revalidate'?: number; - 'stale-if-error'?: number; - public?: true; - private?: true | string[]; - 'no-store'?: true; - 'no-cache'?: true | string[]; - 'must-revalidate'?: true; - 'proxy-revalidate'?: true; - immutable?: true; - 'no-transform'?: true; - 'must-understand'?: true; - 'only-if-cached'?: true; - } - - export interface CacheKey { - origin: string - method: string - path: string - headers?: Record - } - - export interface CacheValue { - statusCode: number - statusMessage: string - headers: Record - vary?: Record - etag?: string - cacheControlDirectives?: CacheControlDirectives - cachedAt: number - staleAt: number - deleteAt: number - } - - export interface DeleteByUri { - origin: string - method: string - path: string - } - - type GetResult = { - statusCode: number - statusMessage: string - headers: Record - vary?: Record - etag?: string - body?: Readable | Iterable | AsyncIterable | Buffer | Iterable | AsyncIterable | string - cacheControlDirectives: CacheControlDirectives, - cachedAt: number - staleAt: number - deleteAt: number - } - - /** - * Underlying storage provider for cached responses - */ - export interface CacheStore { - get(key: CacheKey): GetResult | Promise | undefined - - createWriteStream(key: CacheKey, val: CacheValue): Writable | undefined - - delete(key: CacheKey): void | Promise - } - - export interface MemoryCacheStoreOpts { - /** - * @default Infinity - */ - maxCount?: number - - /** - * @default Infinity - */ - maxSize?: number - - /** - * @default Infinity - */ - maxEntrySize?: number - - errorCallback?: (err: Error) => void - } - - export class MemoryCacheStore implements CacheStore { - constructor (opts?: MemoryCacheStoreOpts) - - get (key: CacheKey): GetResult | Promise | undefined - - createWriteStream (key: CacheKey, value: CacheValue): Writable | undefined - - delete (key: CacheKey): void | Promise - } - - export interface SqliteCacheStoreOpts { - /** - * Location of the database - * @default ':memory:' - */ - location?: string - - /** - * @default Infinity - */ - maxCount?: number - - /** - * @default Infinity - */ - maxEntrySize?: number - } - - export class SqliteCacheStore implements CacheStore { - constructor (opts?: SqliteCacheStoreOpts) - - /** - * Closes the connection to the database - */ - close (): void - - get (key: CacheKey): GetResult | Promise | undefined - - createWriteStream (key: CacheKey, value: CacheValue): Writable | undefined - - delete (key: CacheKey): void | Promise - } -} diff --git a/PBandGraphScaffold/node_modules/undici-types/cache.d.ts b/PBandGraphScaffold/node_modules/undici-types/cache.d.ts deleted file mode 100644 index 4c33335..0000000 --- a/PBandGraphScaffold/node_modules/undici-types/cache.d.ts +++ /dev/null @@ -1,36 +0,0 @@ -import type { RequestInfo, Response, Request } from './fetch' - -export interface CacheStorage { - match (request: RequestInfo, options?: MultiCacheQueryOptions): Promise, - has (cacheName: string): Promise, - open (cacheName: string): Promise, - delete (cacheName: string): Promise, - keys (): Promise -} - -declare const CacheStorage: { - prototype: CacheStorage - new(): CacheStorage -} - -export interface Cache { - match (request: RequestInfo, options?: CacheQueryOptions): Promise, - matchAll (request?: RequestInfo, options?: CacheQueryOptions): Promise, - add (request: RequestInfo): Promise, - addAll (requests: RequestInfo[]): Promise, - put (request: RequestInfo, response: Response): Promise, - delete (request: RequestInfo, options?: CacheQueryOptions): Promise, - keys (request?: RequestInfo, options?: CacheQueryOptions): Promise -} - -export interface CacheQueryOptions { - ignoreSearch?: boolean, - ignoreMethod?: boolean, - ignoreVary?: boolean -} - -export interface MultiCacheQueryOptions extends CacheQueryOptions { - cacheName?: string -} - -export declare const caches: CacheStorage diff --git a/PBandGraphScaffold/node_modules/undici-types/client-stats.d.ts b/PBandGraphScaffold/node_modules/undici-types/client-stats.d.ts deleted file mode 100644 index ad9bd84..0000000 --- a/PBandGraphScaffold/node_modules/undici-types/client-stats.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import Client from './client' - -export default ClientStats - -declare class ClientStats { - constructor (pool: Client) - /** If socket has open connection. */ - connected: boolean - /** Number of open socket connections in this client that do not have an active request. */ - pending: number - /** Number of currently active requests of this client. */ - running: number - /** Number of active, pending, or queued requests of this client. */ - size: number -} diff --git a/PBandGraphScaffold/node_modules/undici-types/client.d.ts b/PBandGraphScaffold/node_modules/undici-types/client.d.ts deleted file mode 100644 index bd1a32c..0000000 --- a/PBandGraphScaffold/node_modules/undici-types/client.d.ts +++ /dev/null @@ -1,108 +0,0 @@ -import { URL } from 'url' -import Dispatcher from './dispatcher' -import buildConnector from './connector' -import TClientStats from './client-stats' - -type ClientConnectOptions = Omit - -/** - * A basic HTTP/1.1 client, mapped on top a single TCP/TLS connection. Pipelining is disabled by default. - */ -export class Client extends Dispatcher { - constructor (url: string | URL, options?: Client.Options) - /** Property to get and set the pipelining factor. */ - pipelining: number - /** `true` after `client.close()` has been called. */ - closed: boolean - /** `true` after `client.destroyed()` has been called or `client.close()` has been called and the client shutdown has completed. */ - destroyed: boolean - /** Aggregate stats for a Client. */ - readonly stats: TClientStats - - // Override dispatcher APIs. - override connect ( - options: ClientConnectOptions - ): Promise - override connect ( - options: ClientConnectOptions, - callback: (err: Error | null, data: Dispatcher.ConnectData) => void - ): void -} - -export declare namespace Client { - export interface OptionsInterceptors { - Client: readonly Dispatcher.DispatchInterceptor[]; - } - export interface Options { - /** TODO */ - interceptors?: OptionsInterceptors; - /** The maximum length of request headers in bytes. Default: Node.js' `--max-http-header-size` or `16384` (16KiB). */ - maxHeaderSize?: number; - /** The amount of time, in milliseconds, the parser will wait to receive the complete HTTP headers (Node 14 and above only). Default: `300e3` milliseconds (300s). */ - headersTimeout?: number; - /** @deprecated unsupported socketTimeout, use headersTimeout & bodyTimeout instead */ - socketTimeout?: never; - /** @deprecated unsupported requestTimeout, use headersTimeout & bodyTimeout instead */ - requestTimeout?: never; - /** TODO */ - connectTimeout?: number; - /** The timeout after which a request will time out, in milliseconds. Monitors time between receiving body data. Use `0` to disable it entirely. Default: `300e3` milliseconds (300s). */ - bodyTimeout?: number; - /** @deprecated unsupported idleTimeout, use keepAliveTimeout instead */ - idleTimeout?: never; - /** @deprecated unsupported keepAlive, use pipelining=0 instead */ - keepAlive?: never; - /** the timeout, in milliseconds, after which a socket without active requests will time out. Monitors time between activity on a connected socket. This value may be overridden by *keep-alive* hints from the server. Default: `4e3` milliseconds (4s). */ - keepAliveTimeout?: number; - /** @deprecated unsupported maxKeepAliveTimeout, use keepAliveMaxTimeout instead */ - maxKeepAliveTimeout?: never; - /** the maximum allowed `idleTimeout`, in milliseconds, when overridden by *keep-alive* hints from the server. Default: `600e3` milliseconds (10min). */ - keepAliveMaxTimeout?: number; - /** A number of milliseconds subtracted from server *keep-alive* hints when overriding `idleTimeout` to account for timing inaccuracies caused by e.g. transport latency. Default: `1e3` milliseconds (1s). */ - keepAliveTimeoutThreshold?: number; - /** TODO */ - socketPath?: string; - /** The amount of concurrent requests to be sent over the single TCP/TLS connection according to [RFC7230](https://tools.ietf.org/html/rfc7230#section-6.3.2). Default: `1`. */ - pipelining?: number; - /** @deprecated use the connect option instead */ - tls?: never; - /** If `true`, an error is thrown when the request content-length header doesn't match the length of the request body. Default: `true`. */ - strictContentLength?: boolean; - /** TODO */ - maxCachedSessions?: number; - /** TODO */ - connect?: Partial | buildConnector.connector; - /** TODO */ - maxRequestsPerClient?: number; - /** TODO */ - localAddress?: string; - /** Max response body size in bytes, -1 is disabled */ - maxResponseSize?: number; - /** Enables a family autodetection algorithm that loosely implements section 5 of RFC 8305. */ - autoSelectFamily?: boolean; - /** The amount of time in milliseconds to wait for a connection attempt to finish before trying the next address when using the `autoSelectFamily` option. */ - autoSelectFamilyAttemptTimeout?: number; - /** - * @description Enables support for H2 if the server has assigned bigger priority to it through ALPN negotiation. - * @default false - */ - allowH2?: boolean; - /** - * @description Dictates the maximum number of concurrent streams for a single H2 session. It can be overridden by a SETTINGS remote frame. - * @default 100 - */ - maxConcurrentStreams?: number; - } - export interface SocketInfo { - localAddress?: string - localPort?: number - remoteAddress?: string - remotePort?: number - remoteFamily?: string - timeout?: number - bytesWritten?: number - bytesRead?: number - } -} - -export default Client diff --git a/PBandGraphScaffold/node_modules/undici-types/connector.d.ts b/PBandGraphScaffold/node_modules/undici-types/connector.d.ts deleted file mode 100644 index bd92433..0000000 --- a/PBandGraphScaffold/node_modules/undici-types/connector.d.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { TLSSocket, ConnectionOptions } from 'tls' -import { IpcNetConnectOpts, Socket, TcpNetConnectOpts } from 'net' - -export default buildConnector -declare function buildConnector (options?: buildConnector.BuildOptions): buildConnector.connector - -declare namespace buildConnector { - export type BuildOptions = (ConnectionOptions | TcpNetConnectOpts | IpcNetConnectOpts) & { - allowH2?: boolean; - maxCachedSessions?: number | null; - socketPath?: string | null; - timeout?: number | null; - port?: number; - keepAlive?: boolean | null; - keepAliveInitialDelay?: number | null; - } - - export interface Options { - hostname: string - host?: string - protocol: string - port: string - servername?: string - localAddress?: string | null - httpSocket?: Socket - } - - export type Callback = (...args: CallbackArgs) => void - type CallbackArgs = [null, Socket | TLSSocket] | [Error, null] - - export interface connector { - (options: buildConnector.Options, callback: buildConnector.Callback): void - } -} diff --git a/PBandGraphScaffold/node_modules/undici-types/content-type.d.ts b/PBandGraphScaffold/node_modules/undici-types/content-type.d.ts deleted file mode 100644 index f2a87f1..0000000 --- a/PBandGraphScaffold/node_modules/undici-types/content-type.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -/// - -interface MIMEType { - type: string - subtype: string - parameters: Map - essence: string -} - -/** - * Parse a string to a {@link MIMEType} object. Returns `failure` if the string - * couldn't be parsed. - * @see https://mimesniff.spec.whatwg.org/#parse-a-mime-type - */ -export function parseMIMEType (input: string): 'failure' | MIMEType - -/** - * Convert a MIMEType object to a string. - * @see https://mimesniff.spec.whatwg.org/#serialize-a-mime-type - */ -export function serializeAMimeType (mimeType: MIMEType): string diff --git a/PBandGraphScaffold/node_modules/undici-types/cookies.d.ts b/PBandGraphScaffold/node_modules/undici-types/cookies.d.ts deleted file mode 100644 index f746d35..0000000 --- a/PBandGraphScaffold/node_modules/undici-types/cookies.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -/// - -import type { Headers } from './fetch' - -export interface Cookie { - name: string - value: string - expires?: Date | number - maxAge?: number - domain?: string - path?: string - secure?: boolean - httpOnly?: boolean - sameSite?: 'Strict' | 'Lax' | 'None' - unparsed?: string[] -} - -export function deleteCookie ( - headers: Headers, - name: string, - attributes?: { name?: string, domain?: string } -): void - -export function getCookies (headers: Headers): Record - -export function getSetCookies (headers: Headers): Cookie[] - -export function setCookie (headers: Headers, cookie: Cookie): void - -export function parseCookie (cookie: string): Cookie | null diff --git a/PBandGraphScaffold/node_modules/undici-types/diagnostics-channel.d.ts b/PBandGraphScaffold/node_modules/undici-types/diagnostics-channel.d.ts deleted file mode 100644 index 4925c87..0000000 --- a/PBandGraphScaffold/node_modules/undici-types/diagnostics-channel.d.ts +++ /dev/null @@ -1,74 +0,0 @@ -import { Socket } from 'net' -import { URL } from 'url' -import buildConnector from './connector' -import Dispatcher from './dispatcher' - -declare namespace DiagnosticsChannel { - interface Request { - origin?: string | URL; - completed: boolean; - method?: Dispatcher.HttpMethod; - path: string; - headers: any; - } - interface Response { - statusCode: number; - statusText: string; - headers: Array; - } - interface ConnectParams { - host: URL['host']; - hostname: URL['hostname']; - protocol: URL['protocol']; - port: URL['port']; - servername: string | null; - } - type Connector = buildConnector.connector - export interface RequestCreateMessage { - request: Request; - } - export interface RequestBodySentMessage { - request: Request; - } - - export interface RequestBodyChunkSentMessage { - request: Request; - chunk: Uint8Array | string; - } - export interface RequestBodyChunkReceivedMessage { - request: Request; - chunk: Buffer; - } - export interface RequestHeadersMessage { - request: Request; - response: Response; - } - export interface RequestTrailersMessage { - request: Request; - trailers: Array; - } - export interface RequestErrorMessage { - request: Request; - error: Error; - } - export interface ClientSendHeadersMessage { - request: Request; - headers: string; - socket: Socket; - } - export interface ClientBeforeConnectMessage { - connectParams: ConnectParams; - connector: Connector; - } - export interface ClientConnectedMessage { - socket: Socket; - connectParams: ConnectParams; - connector: Connector; - } - export interface ClientConnectErrorMessage { - error: Error; - socket: Socket; - connectParams: ConnectParams; - connector: Connector; - } -} diff --git a/PBandGraphScaffold/node_modules/undici-types/dispatcher.d.ts b/PBandGraphScaffold/node_modules/undici-types/dispatcher.d.ts deleted file mode 100644 index fffe870..0000000 --- a/PBandGraphScaffold/node_modules/undici-types/dispatcher.d.ts +++ /dev/null @@ -1,276 +0,0 @@ -import { URL } from 'url' -import { Duplex, Readable, Writable } from 'stream' -import { EventEmitter } from 'events' -import { Blob } from 'buffer' -import { IncomingHttpHeaders } from './header' -import BodyReadable from './readable' -import { FormData } from './formdata' -import Errors from './errors' -import { Autocomplete } from './utility' - -type AbortSignal = unknown - -export default Dispatcher - -export type UndiciHeaders = Record | IncomingHttpHeaders | string[] | Iterable<[string, string | string[] | undefined]> | null - -/** Dispatcher is the core API used to dispatch requests. */ -declare class Dispatcher extends EventEmitter { - /** Dispatches a request. This API is expected to evolve through semver-major versions and is less stable than the preceding higher level APIs. It is primarily intended for library developers who implement higher level APIs on top of this. */ - dispatch (options: Dispatcher.DispatchOptions, handler: Dispatcher.DispatchHandler): boolean - /** Starts two-way communications with the requested resource. */ - connect(options: Dispatcher.ConnectOptions): Promise> - connect(options: Dispatcher.ConnectOptions, callback: (err: Error | null, data: Dispatcher.ConnectData) => void): void - /** Compose a chain of dispatchers */ - compose (dispatchers: Dispatcher.DispatcherComposeInterceptor[]): Dispatcher.ComposedDispatcher - compose (...dispatchers: Dispatcher.DispatcherComposeInterceptor[]): Dispatcher.ComposedDispatcher - /** Performs an HTTP request. */ - request(options: Dispatcher.RequestOptions): Promise> - request(options: Dispatcher.RequestOptions, callback: (err: Error | null, data: Dispatcher.ResponseData) => void): void - /** For easy use with `stream.pipeline`. */ - pipeline(options: Dispatcher.PipelineOptions, handler: Dispatcher.PipelineHandler): Duplex - /** A faster version of `Dispatcher.request`. */ - stream(options: Dispatcher.RequestOptions, factory: Dispatcher.StreamFactory): Promise> - stream(options: Dispatcher.RequestOptions, factory: Dispatcher.StreamFactory, callback: (err: Error | null, data: Dispatcher.StreamData) => void): void - /** Upgrade to a different protocol. */ - upgrade (options: Dispatcher.UpgradeOptions): Promise - upgrade (options: Dispatcher.UpgradeOptions, callback: (err: Error | null, data: Dispatcher.UpgradeData) => void): void - /** Closes the client and gracefully waits for enqueued requests to complete before invoking the callback (or returning a promise if no callback is provided). */ - close (): Promise - close (callback: () => void): void - /** Destroy the client abruptly with the given err. All the pending and running requests will be asynchronously aborted and error. Waits until socket is closed before invoking the callback (or returning a promise if no callback is provided). Since this operation is asynchronously dispatched there might still be some progress on dispatched requests. */ - destroy (): Promise - destroy (err: Error | null): Promise - destroy (callback: () => void): void - destroy (err: Error | null, callback: () => void): void - - on (eventName: 'connect', callback: (origin: URL, targets: readonly Dispatcher[]) => void): this - on (eventName: 'disconnect', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this - on (eventName: 'connectionError', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this - on (eventName: 'drain', callback: (origin: URL) => void): this - - once (eventName: 'connect', callback: (origin: URL, targets: readonly Dispatcher[]) => void): this - once (eventName: 'disconnect', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this - once (eventName: 'connectionError', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this - once (eventName: 'drain', callback: (origin: URL) => void): this - - off (eventName: 'connect', callback: (origin: URL, targets: readonly Dispatcher[]) => void): this - off (eventName: 'disconnect', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this - off (eventName: 'connectionError', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this - off (eventName: 'drain', callback: (origin: URL) => void): this - - addListener (eventName: 'connect', callback: (origin: URL, targets: readonly Dispatcher[]) => void): this - addListener (eventName: 'disconnect', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this - addListener (eventName: 'connectionError', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this - addListener (eventName: 'drain', callback: (origin: URL) => void): this - - removeListener (eventName: 'connect', callback: (origin: URL, targets: readonly Dispatcher[]) => void): this - removeListener (eventName: 'disconnect', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this - removeListener (eventName: 'connectionError', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this - removeListener (eventName: 'drain', callback: (origin: URL) => void): this - - prependListener (eventName: 'connect', callback: (origin: URL, targets: readonly Dispatcher[]) => void): this - prependListener (eventName: 'disconnect', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this - prependListener (eventName: 'connectionError', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this - prependListener (eventName: 'drain', callback: (origin: URL) => void): this - - prependOnceListener (eventName: 'connect', callback: (origin: URL, targets: readonly Dispatcher[]) => void): this - prependOnceListener (eventName: 'disconnect', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this - prependOnceListener (eventName: 'connectionError', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this - prependOnceListener (eventName: 'drain', callback: (origin: URL) => void): this - - listeners (eventName: 'connect'): ((origin: URL, targets: readonly Dispatcher[]) => void)[] - listeners (eventName: 'disconnect'): ((origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void)[] - listeners (eventName: 'connectionError'): ((origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void)[] - listeners (eventName: 'drain'): ((origin: URL) => void)[] - - rawListeners (eventName: 'connect'): ((origin: URL, targets: readonly Dispatcher[]) => void)[] - rawListeners (eventName: 'disconnect'): ((origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void)[] - rawListeners (eventName: 'connectionError'): ((origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void)[] - rawListeners (eventName: 'drain'): ((origin: URL) => void)[] - - emit (eventName: 'connect', origin: URL, targets: readonly Dispatcher[]): boolean - emit (eventName: 'disconnect', origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError): boolean - emit (eventName: 'connectionError', origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError): boolean - emit (eventName: 'drain', origin: URL): boolean -} - -declare namespace Dispatcher { - export interface ComposedDispatcher extends Dispatcher {} - export type Dispatch = Dispatcher['dispatch'] - export type DispatcherComposeInterceptor = (dispatch: Dispatch) => Dispatch - export interface DispatchOptions { - origin?: string | URL; - path: string; - method: HttpMethod; - /** Default: `null` */ - body?: string | Buffer | Uint8Array | Readable | null | FormData; - /** Default: `null` */ - headers?: UndiciHeaders; - /** Query string params to be embedded in the request URL. Default: `null` */ - query?: Record; - /** Whether the requests can be safely retried or not. If `false` the request won't be sent until all preceding requests in the pipeline have completed. Default: `true` if `method` is `HEAD` or `GET`. */ - idempotent?: boolean; - /** Whether the response is expected to take a long time and would end up blocking the pipeline. When this is set to `true` further pipelining will be avoided on the same connection until headers have been received. Defaults to `method !== 'HEAD'`. */ - blocking?: boolean; - /** Upgrade the request. Should be used to specify the kind of upgrade i.e. `'Websocket'`. Default: `method === 'CONNECT' || null`. */ - upgrade?: boolean | string | null; - /** The amount of time, in milliseconds, the parser will wait to receive the complete HTTP headers. Defaults to 300 seconds. */ - headersTimeout?: number | null; - /** The timeout after which a request will time out, in milliseconds. Monitors time between receiving body data. Use 0 to disable it entirely. Defaults to 300 seconds. */ - bodyTimeout?: number | null; - /** Whether the request should stablish a keep-alive or not. Default `false` */ - reset?: boolean; - /** Whether Undici should throw an error upon receiving a 4xx or 5xx response from the server. Defaults to false */ - throwOnError?: boolean; - /** For H2, it appends the expect: 100-continue header, and halts the request body until a 100-continue is received from the remote server */ - expectContinue?: boolean; - } - export interface ConnectOptions { - origin: string | URL; - path: string; - /** Default: `null` */ - headers?: UndiciHeaders; - /** Default: `null` */ - signal?: AbortSignal | EventEmitter | null; - /** This argument parameter is passed through to `ConnectData` */ - opaque?: TOpaque; - /** Default: false */ - redirectionLimitReached?: boolean; - /** Default: `null` */ - responseHeaders?: 'raw' | null; - } - export interface RequestOptions extends DispatchOptions { - /** Default: `null` */ - opaque?: TOpaque; - /** Default: `null` */ - signal?: AbortSignal | EventEmitter | null; - /** Default: false */ - redirectionLimitReached?: boolean; - /** Default: `null` */ - onInfo?: (info: { statusCode: number, headers: Record }) => void; - /** Default: `null` */ - responseHeaders?: 'raw' | null; - /** Default: `64 KiB` */ - highWaterMark?: number; - } - export interface PipelineOptions extends RequestOptions { - /** `true` if the `handler` will return an object stream. Default: `false` */ - objectMode?: boolean; - } - export interface UpgradeOptions { - path: string; - /** Default: `'GET'` */ - method?: string; - /** Default: `null` */ - headers?: UndiciHeaders; - /** A string of comma separated protocols, in descending preference order. Default: `'Websocket'` */ - protocol?: string; - /** Default: `null` */ - signal?: AbortSignal | EventEmitter | null; - /** Default: false */ - redirectionLimitReached?: boolean; - /** Default: `null` */ - responseHeaders?: 'raw' | null; - } - export interface ConnectData { - statusCode: number; - headers: IncomingHttpHeaders; - socket: Duplex; - opaque: TOpaque; - } - export interface ResponseData { - statusCode: number; - headers: IncomingHttpHeaders; - body: BodyReadable & BodyMixin; - trailers: Record; - opaque: TOpaque; - context: object; - } - export interface PipelineHandlerData { - statusCode: number; - headers: IncomingHttpHeaders; - opaque: TOpaque; - body: BodyReadable; - context: object; - } - export interface StreamData { - opaque: TOpaque; - trailers: Record; - } - export interface UpgradeData { - headers: IncomingHttpHeaders; - socket: Duplex; - opaque: TOpaque; - } - export interface StreamFactoryData { - statusCode: number; - headers: IncomingHttpHeaders; - opaque: TOpaque; - context: object; - } - export type StreamFactory = (data: StreamFactoryData) => Writable - - export interface DispatchController { - get aborted () : boolean - get paused () : boolean - get reason () : Error | null - abort (reason: Error): void - pause(): void - resume(): void - } - - export interface DispatchHandler { - onRequestStart?(controller: DispatchController, context: any): void; - onRequestUpgrade?(controller: DispatchController, statusCode: number, headers: IncomingHttpHeaders, socket: Duplex): void; - onResponseStart?(controller: DispatchController, statusCode: number, headers: IncomingHttpHeaders, statusMessage?: string): void; - onResponseData?(controller: DispatchController, chunk: Buffer): void; - onResponseEnd?(controller: DispatchController, trailers: IncomingHttpHeaders): void; - onResponseError?(controller: DispatchController, error: Error): void; - - /** Invoked before request is dispatched on socket. May be invoked multiple times when a request is retried when the request at the head of the pipeline fails. */ - /** @deprecated */ - onConnect?(abort: (err?: Error) => void): void; - /** Invoked when an error has occurred. */ - /** @deprecated */ - onError?(err: Error): void; - /** Invoked when request is upgraded either due to a `Upgrade` header or `CONNECT` method. */ - /** @deprecated */ - onUpgrade?(statusCode: number, headers: Buffer[] | string[] | null, socket: Duplex): void; - /** Invoked when response is received, before headers have been read. **/ - /** @deprecated */ - onResponseStarted?(): void; - /** Invoked when statusCode and headers have been received. May be invoked multiple times due to 1xx informational headers. */ - /** @deprecated */ - onHeaders?(statusCode: number, headers: Buffer[], resume: () => void, statusText: string): boolean; - /** Invoked when response payload data is received. */ - /** @deprecated */ - onData?(chunk: Buffer): boolean; - /** Invoked when response payload and trailers have been received and the request has completed. */ - /** @deprecated */ - onComplete?(trailers: string[] | null): void; - /** Invoked when a body chunk is sent to the server. May be invoked multiple times for chunked requests */ - /** @deprecated */ - onBodySent?(chunkSize: number, totalBytesSent: number): void; - } - export type PipelineHandler = (data: PipelineHandlerData) => Readable - export type HttpMethod = Autocomplete<'GET' | 'HEAD' | 'POST' | 'PUT' | 'DELETE' | 'CONNECT' | 'OPTIONS' | 'TRACE' | 'PATCH'> - - /** - * @link https://fetch.spec.whatwg.org/#body-mixin - */ - interface BodyMixin { - readonly body?: never; - readonly bodyUsed: boolean; - arrayBuffer(): Promise; - blob(): Promise; - bytes(): Promise; - formData(): Promise; - json(): Promise; - text(): Promise; - } - - export interface DispatchInterceptor { - (dispatch: Dispatch): Dispatch - } -} diff --git a/PBandGraphScaffold/node_modules/undici-types/env-http-proxy-agent.d.ts b/PBandGraphScaffold/node_modules/undici-types/env-http-proxy-agent.d.ts deleted file mode 100644 index 1733d7f..0000000 --- a/PBandGraphScaffold/node_modules/undici-types/env-http-proxy-agent.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -import Agent from './agent' -import ProxyAgent from './proxy-agent' -import Dispatcher from './dispatcher' - -export default EnvHttpProxyAgent - -declare class EnvHttpProxyAgent extends Dispatcher { - constructor (opts?: EnvHttpProxyAgent.Options) - - dispatch (options: Agent.DispatchOptions, handler: Dispatcher.DispatchHandler): boolean -} - -declare namespace EnvHttpProxyAgent { - export interface Options extends Omit { - /** Overrides the value of the HTTP_PROXY environment variable */ - httpProxy?: string; - /** Overrides the value of the HTTPS_PROXY environment variable */ - httpsProxy?: string; - /** Overrides the value of the NO_PROXY environment variable */ - noProxy?: string; - } -} diff --git a/PBandGraphScaffold/node_modules/undici-types/errors.d.ts b/PBandGraphScaffold/node_modules/undici-types/errors.d.ts deleted file mode 100644 index fbf3195..0000000 --- a/PBandGraphScaffold/node_modules/undici-types/errors.d.ts +++ /dev/null @@ -1,161 +0,0 @@ -import { IncomingHttpHeaders } from './header' -import Client from './client' - -export default Errors - -declare namespace Errors { - export class UndiciError extends Error { - name: string - code: string - } - - /** Connect timeout error. */ - export class ConnectTimeoutError extends UndiciError { - name: 'ConnectTimeoutError' - code: 'UND_ERR_CONNECT_TIMEOUT' - } - - /** A header exceeds the `headersTimeout` option. */ - export class HeadersTimeoutError extends UndiciError { - name: 'HeadersTimeoutError' - code: 'UND_ERR_HEADERS_TIMEOUT' - } - - /** Headers overflow error. */ - export class HeadersOverflowError extends UndiciError { - name: 'HeadersOverflowError' - code: 'UND_ERR_HEADERS_OVERFLOW' - } - - /** A body exceeds the `bodyTimeout` option. */ - export class BodyTimeoutError extends UndiciError { - name: 'BodyTimeoutError' - code: 'UND_ERR_BODY_TIMEOUT' - } - - export class ResponseError extends UndiciError { - constructor ( - message: string, - code: number, - options: { - headers?: IncomingHttpHeaders | string[] | null, - body?: null | Record | string - } - ) - name: 'ResponseError' - code: 'UND_ERR_RESPONSE' - statusCode: number - body: null | Record | string - headers: IncomingHttpHeaders | string[] | null - } - - /** Passed an invalid argument. */ - export class InvalidArgumentError extends UndiciError { - name: 'InvalidArgumentError' - code: 'UND_ERR_INVALID_ARG' - } - - /** Returned an invalid value. */ - export class InvalidReturnValueError extends UndiciError { - name: 'InvalidReturnValueError' - code: 'UND_ERR_INVALID_RETURN_VALUE' - } - - /** The request has been aborted by the user. */ - export class RequestAbortedError extends UndiciError { - name: 'AbortError' - code: 'UND_ERR_ABORTED' - } - - /** Expected error with reason. */ - export class InformationalError extends UndiciError { - name: 'InformationalError' - code: 'UND_ERR_INFO' - } - - /** Request body length does not match content-length header. */ - export class RequestContentLengthMismatchError extends UndiciError { - name: 'RequestContentLengthMismatchError' - code: 'UND_ERR_REQ_CONTENT_LENGTH_MISMATCH' - } - - /** Response body length does not match content-length header. */ - export class ResponseContentLengthMismatchError extends UndiciError { - name: 'ResponseContentLengthMismatchError' - code: 'UND_ERR_RES_CONTENT_LENGTH_MISMATCH' - } - - /** Trying to use a destroyed client. */ - export class ClientDestroyedError extends UndiciError { - name: 'ClientDestroyedError' - code: 'UND_ERR_DESTROYED' - } - - /** Trying to use a closed client. */ - export class ClientClosedError extends UndiciError { - name: 'ClientClosedError' - code: 'UND_ERR_CLOSED' - } - - /** There is an error with the socket. */ - export class SocketError extends UndiciError { - name: 'SocketError' - code: 'UND_ERR_SOCKET' - socket: Client.SocketInfo | null - } - - /** Encountered unsupported functionality. */ - export class NotSupportedError extends UndiciError { - name: 'NotSupportedError' - code: 'UND_ERR_NOT_SUPPORTED' - } - - /** No upstream has been added to the BalancedPool. */ - export class BalancedPoolMissingUpstreamError extends UndiciError { - name: 'MissingUpstreamError' - code: 'UND_ERR_BPL_MISSING_UPSTREAM' - } - - export class HTTPParserError extends UndiciError { - name: 'HTTPParserError' - code: string - } - - /** The response exceed the length allowed. */ - export class ResponseExceededMaxSizeError extends UndiciError { - name: 'ResponseExceededMaxSizeError' - code: 'UND_ERR_RES_EXCEEDED_MAX_SIZE' - } - - export class RequestRetryError extends UndiciError { - constructor ( - message: string, - statusCode: number, - headers?: IncomingHttpHeaders | string[] | null, - body?: null | Record | string - ) - name: 'RequestRetryError' - code: 'UND_ERR_REQ_RETRY' - statusCode: number - data: { - count: number; - } - - headers: Record - } - - export class SecureProxyConnectionError extends UndiciError { - constructor ( - cause?: Error, - message?: string, - options?: Record - ) - name: 'SecureProxyConnectionError' - code: 'UND_ERR_PRX_TLS' - } - - class MaxOriginsReachedError extends UndiciError { - name: 'MaxOriginsReachedError' - code: 'UND_ERR_MAX_ORIGINS_REACHED' - } -} diff --git a/PBandGraphScaffold/node_modules/undici-types/eventsource.d.ts b/PBandGraphScaffold/node_modules/undici-types/eventsource.d.ts deleted file mode 100644 index 081ca09..0000000 --- a/PBandGraphScaffold/node_modules/undici-types/eventsource.d.ts +++ /dev/null @@ -1,66 +0,0 @@ -import { MessageEvent, ErrorEvent } from './websocket' -import Dispatcher from './dispatcher' - -import { - EventListenerOptions, - AddEventListenerOptions, - EventListenerOrEventListenerObject -} from './patch' - -interface EventSourceEventMap { - error: ErrorEvent - message: MessageEvent - open: Event -} - -interface EventSource extends EventTarget { - close(): void - readonly CLOSED: 2 - readonly CONNECTING: 0 - readonly OPEN: 1 - onerror: ((this: EventSource, ev: ErrorEvent) => any) | null - onmessage: ((this: EventSource, ev: MessageEvent) => any) | null - onopen: ((this: EventSource, ev: Event) => any) | null - readonly readyState: 0 | 1 | 2 - readonly url: string - readonly withCredentials: boolean - - addEventListener( - type: K, - listener: (this: EventSource, ev: EventSourceEventMap[K]) => any, - options?: boolean | AddEventListenerOptions - ): void - addEventListener( - type: string, - listener: EventListenerOrEventListenerObject, - options?: boolean | AddEventListenerOptions - ): void - removeEventListener( - type: K, - listener: (this: EventSource, ev: EventSourceEventMap[K]) => any, - options?: boolean | EventListenerOptions - ): void - removeEventListener( - type: string, - listener: EventListenerOrEventListenerObject, - options?: boolean | EventListenerOptions - ): void -} - -export declare const EventSource: { - prototype: EventSource - new (url: string | URL, init?: EventSourceInit): EventSource - readonly CLOSED: 2 - readonly CONNECTING: 0 - readonly OPEN: 1 -} - -interface EventSourceInit { - withCredentials?: boolean - // @deprecated use `node.dispatcher` instead - dispatcher?: Dispatcher - node?: { - dispatcher?: Dispatcher - reconnectionTime?: number - } -} diff --git a/PBandGraphScaffold/node_modules/undici-types/fetch.d.ts b/PBandGraphScaffold/node_modules/undici-types/fetch.d.ts deleted file mode 100644 index 2cf5029..0000000 --- a/PBandGraphScaffold/node_modules/undici-types/fetch.d.ts +++ /dev/null @@ -1,211 +0,0 @@ -// based on https://github.com/Ethan-Arrowood/undici-fetch/blob/249269714db874351589d2d364a0645d5160ae71/index.d.ts (MIT license) -// and https://github.com/node-fetch/node-fetch/blob/914ce6be5ec67a8bab63d68510aabf07cb818b6d/index.d.ts (MIT license) -/// - -import { Blob } from 'buffer' -import { URL, URLSearchParams } from 'url' -import { ReadableStream } from 'stream/web' -import { FormData } from './formdata' -import { HeaderRecord } from './header' -import Dispatcher from './dispatcher' - -export type RequestInfo = string | URL | Request - -export declare function fetch ( - input: RequestInfo, - init?: RequestInit -): Promise - -export type BodyInit = - | ArrayBuffer - | AsyncIterable - | Blob - | FormData - | Iterable - | NodeJS.ArrayBufferView - | URLSearchParams - | null - | string - -export class BodyMixin { - readonly body: ReadableStream | null - readonly bodyUsed: boolean - - readonly arrayBuffer: () => Promise - readonly blob: () => Promise - readonly bytes: () => Promise - /** - * @deprecated This method is not recommended for parsing multipart/form-data bodies in server environments. - * It is recommended to use a library such as [@fastify/busboy](https://www.npmjs.com/package/@fastify/busboy) as follows: - * - * @example - * ```js - * import { Busboy } from '@fastify/busboy' - * import { Readable } from 'node:stream' - * - * const response = await fetch('...') - * const busboy = new Busboy({ headers: { 'content-type': response.headers.get('content-type') } }) - * - * // handle events emitted from `busboy` - * - * Readable.fromWeb(response.body).pipe(busboy) - * ``` - */ - readonly formData: () => Promise - readonly json: () => Promise - readonly text: () => Promise -} - -export interface SpecIterator { - next(...args: [] | [TNext]): IteratorResult; -} - -export interface SpecIterableIterator extends SpecIterator { - [Symbol.iterator](): SpecIterableIterator; -} - -export interface SpecIterable { - [Symbol.iterator](): SpecIterator; -} - -export type HeadersInit = [string, string][] | HeaderRecord | Headers - -export declare class Headers implements SpecIterable<[string, string]> { - constructor (init?: HeadersInit) - readonly append: (name: string, value: string) => void - readonly delete: (name: string) => void - readonly get: (name: string) => string | null - readonly has: (name: string) => boolean - readonly set: (name: string, value: string) => void - readonly getSetCookie: () => string[] - readonly forEach: ( - callbackfn: (value: string, key: string, iterable: Headers) => void, - thisArg?: unknown - ) => void - - readonly keys: () => SpecIterableIterator - readonly values: () => SpecIterableIterator - readonly entries: () => SpecIterableIterator<[string, string]> - readonly [Symbol.iterator]: () => SpecIterableIterator<[string, string]> -} - -export type RequestCache = - | 'default' - | 'force-cache' - | 'no-cache' - | 'no-store' - | 'only-if-cached' - | 'reload' - -export type RequestCredentials = 'omit' | 'include' | 'same-origin' - -type RequestDestination = - | '' - | 'audio' - | 'audioworklet' - | 'document' - | 'embed' - | 'font' - | 'image' - | 'manifest' - | 'object' - | 'paintworklet' - | 'report' - | 'script' - | 'sharedworker' - | 'style' - | 'track' - | 'video' - | 'worker' - | 'xslt' - -export interface RequestInit { - body?: BodyInit | null - cache?: RequestCache - credentials?: RequestCredentials - dispatcher?: Dispatcher - duplex?: RequestDuplex - headers?: HeadersInit - integrity?: string - keepalive?: boolean - method?: string - mode?: RequestMode - redirect?: RequestRedirect - referrer?: string - referrerPolicy?: ReferrerPolicy - signal?: AbortSignal | null - window?: null -} - -export type ReferrerPolicy = - | '' - | 'no-referrer' - | 'no-referrer-when-downgrade' - | 'origin' - | 'origin-when-cross-origin' - | 'same-origin' - | 'strict-origin' - | 'strict-origin-when-cross-origin' - | 'unsafe-url' - -export type RequestMode = 'cors' | 'navigate' | 'no-cors' | 'same-origin' - -export type RequestRedirect = 'error' | 'follow' | 'manual' - -export type RequestDuplex = 'half' - -export declare class Request extends BodyMixin { - constructor (input: RequestInfo, init?: RequestInit) - - readonly cache: RequestCache - readonly credentials: RequestCredentials - readonly destination: RequestDestination - readonly headers: Headers - readonly integrity: string - readonly method: string - readonly mode: RequestMode - readonly redirect: RequestRedirect - readonly referrer: string - readonly referrerPolicy: ReferrerPolicy - readonly url: string - - readonly keepalive: boolean - readonly signal: AbortSignal - readonly duplex: RequestDuplex - - readonly clone: () => Request -} - -export interface ResponseInit { - readonly status?: number - readonly statusText?: string - readonly headers?: HeadersInit -} - -export type ResponseType = - | 'basic' - | 'cors' - | 'default' - | 'error' - | 'opaque' - | 'opaqueredirect' - -export type ResponseRedirectStatus = 301 | 302 | 303 | 307 | 308 - -export declare class Response extends BodyMixin { - constructor (body?: BodyInit, init?: ResponseInit) - - readonly headers: Headers - readonly ok: boolean - readonly status: number - readonly statusText: string - readonly type: ResponseType - readonly url: string - readonly redirected: boolean - - readonly clone: () => Response - - static error (): Response - static json (data: any, init?: ResponseInit): Response - static redirect (url: string | URL, status: ResponseRedirectStatus): Response -} diff --git a/PBandGraphScaffold/node_modules/undici-types/formdata.d.ts b/PBandGraphScaffold/node_modules/undici-types/formdata.d.ts deleted file mode 100644 index 030f548..0000000 --- a/PBandGraphScaffold/node_modules/undici-types/formdata.d.ts +++ /dev/null @@ -1,108 +0,0 @@ -// Based on https://github.com/octet-stream/form-data/blob/2d0f0dc371517444ce1f22cdde13f51995d0953a/lib/FormData.ts (MIT) -/// - -import { File } from 'buffer' -import { SpecIterableIterator } from './fetch' - -/** - * A `string` or `File` that represents a single value from a set of `FormData` key-value pairs. - */ -declare type FormDataEntryValue = string | File - -/** - * Provides a way to easily construct a set of key/value pairs representing form fields and their values, which can then be easily sent using fetch(). - */ -export declare class FormData { - /** - * Appends a new value onto an existing key inside a FormData object, - * or adds the key if it does not already exist. - * - * The difference between `set()` and `append()` is that if the specified key already exists, `set()` will overwrite all existing values with the new one, whereas `append()` will append the new value onto the end of the existing set of values. - * - * @param name The name of the field whose data is contained in `value`. - * @param value The field's value. This can be [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob) - or [`File`](https://developer.mozilla.org/en-US/docs/Web/API/File). If none of these are specified the value is converted to a string. - * @param fileName The filename reported to the server, when a Blob or File is passed as the second parameter. The default filename for Blob objects is "blob". The default filename for File objects is the file's filename. - */ - append (name: string, value: unknown, fileName?: string): void - - /** - * Set a new value for an existing key inside FormData, - * or add the new field if it does not already exist. - * - * @param name The name of the field whose data is contained in `value`. - * @param value The field's value. This can be [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob) - or [`File`](https://developer.mozilla.org/en-US/docs/Web/API/File). If none of these are specified the value is converted to a string. - * @param fileName The filename reported to the server, when a Blob or File is passed as the second parameter. The default filename for Blob objects is "blob". The default filename for File objects is the file's filename. - * - */ - set (name: string, value: unknown, fileName?: string): void - - /** - * Returns the first value associated with a given key from within a `FormData` object. - * If you expect multiple values and want all of them, use the `getAll()` method instead. - * - * @param {string} name A name of the value you want to retrieve. - * - * @returns A `FormDataEntryValue` containing the value. If the key doesn't exist, the method returns null. - */ - get (name: string): FormDataEntryValue | null - - /** - * Returns all the values associated with a given key from within a `FormData` object. - * - * @param {string} name A name of the value you want to retrieve. - * - * @returns An array of `FormDataEntryValue` whose key matches the value passed in the `name` parameter. If the key doesn't exist, the method returns an empty list. - */ - getAll (name: string): FormDataEntryValue[] - - /** - * Returns a boolean stating whether a `FormData` object contains a certain key. - * - * @param name A string representing the name of the key you want to test for. - * - * @return A boolean value. - */ - has (name: string): boolean - - /** - * Deletes a key and its value(s) from a `FormData` object. - * - * @param name The name of the key you want to delete. - */ - delete (name: string): void - - /** - * Executes given callback function for each field of the FormData instance - */ - forEach: ( - callbackfn: (value: FormDataEntryValue, key: string, iterable: FormData) => void, - thisArg?: unknown - ) => void - - /** - * Returns an [`iterator`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols) allowing to go through all keys contained in this `FormData` object. - * Each key is a `string`. - */ - keys: () => SpecIterableIterator - - /** - * Returns an [`iterator`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols) allowing to go through all values contained in this object `FormData` object. - * Each value is a [`FormDataValue`](https://developer.mozilla.org/en-US/docs/Web/API/FormDataEntryValue). - */ - values: () => SpecIterableIterator - - /** - * Returns an [`iterator`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols) allowing to go through the `FormData` key/value pairs. - * The key of each pair is a string; the value is a [`FormDataValue`](https://developer.mozilla.org/en-US/docs/Web/API/FormDataEntryValue). - */ - entries: () => SpecIterableIterator<[string, FormDataEntryValue]> - - /** - * An alias for FormData#entries() - */ - [Symbol.iterator]: () => SpecIterableIterator<[string, FormDataEntryValue]> - - readonly [Symbol.toStringTag]: string -} diff --git a/PBandGraphScaffold/node_modules/undici-types/global-dispatcher.d.ts b/PBandGraphScaffold/node_modules/undici-types/global-dispatcher.d.ts deleted file mode 100644 index 2760e13..0000000 --- a/PBandGraphScaffold/node_modules/undici-types/global-dispatcher.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import Dispatcher from './dispatcher' - -declare function setGlobalDispatcher (dispatcher: DispatcherImplementation): void -declare function getGlobalDispatcher (): Dispatcher - -export { - getGlobalDispatcher, - setGlobalDispatcher -} diff --git a/PBandGraphScaffold/node_modules/undici-types/global-origin.d.ts b/PBandGraphScaffold/node_modules/undici-types/global-origin.d.ts deleted file mode 100644 index 265769b..0000000 --- a/PBandGraphScaffold/node_modules/undici-types/global-origin.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -declare function setGlobalOrigin (origin: string | URL | undefined): void -declare function getGlobalOrigin (): URL | undefined - -export { - setGlobalOrigin, - getGlobalOrigin -} diff --git a/PBandGraphScaffold/node_modules/undici-types/h2c-client.d.ts b/PBandGraphScaffold/node_modules/undici-types/h2c-client.d.ts deleted file mode 100644 index e7a6808..0000000 --- a/PBandGraphScaffold/node_modules/undici-types/h2c-client.d.ts +++ /dev/null @@ -1,73 +0,0 @@ -import { URL } from 'url' -import Dispatcher from './dispatcher' -import buildConnector from './connector' - -type H2ClientOptions = Omit - -/** - * A basic H2C client, mapped on top a single TCP connection. Pipelining is disabled by default. - */ -export class H2CClient extends Dispatcher { - constructor (url: string | URL, options?: H2CClient.Options) - /** Property to get and set the pipelining factor. */ - pipelining: number - /** `true` after `client.close()` has been called. */ - closed: boolean - /** `true` after `client.destroyed()` has been called or `client.close()` has been called and the client shutdown has completed. */ - destroyed: boolean - - // Override dispatcher APIs. - override connect ( - options: H2ClientOptions - ): Promise - override connect ( - options: H2ClientOptions, - callback: (err: Error | null, data: Dispatcher.ConnectData) => void - ): void -} - -export declare namespace H2CClient { - export interface Options { - /** The maximum length of request headers in bytes. Default: Node.js' `--max-http-header-size` or `16384` (16KiB). */ - maxHeaderSize?: number; - /** The amount of time, in milliseconds, the parser will wait to receive the complete HTTP headers (Node 14 and above only). Default: `300e3` milliseconds (300s). */ - headersTimeout?: number; - /** TODO */ - connectTimeout?: number; - /** The timeout after which a request will time out, in milliseconds. Monitors time between receiving body data. Use `0` to disable it entirely. Default: `300e3` milliseconds (300s). */ - bodyTimeout?: number; - /** the timeout, in milliseconds, after which a socket without active requests will time out. Monitors time between activity on a connected socket. This value may be overridden by *keep-alive* hints from the server. Default: `4e3` milliseconds (4s). */ - keepAliveTimeout?: number; - /** the maximum allowed `idleTimeout`, in milliseconds, when overridden by *keep-alive* hints from the server. Default: `600e3` milliseconds (10min). */ - keepAliveMaxTimeout?: number; - /** A number of milliseconds subtracted from server *keep-alive* hints when overriding `idleTimeout` to account for timing inaccuracies caused by e.g. transport latency. Default: `1e3` milliseconds (1s). */ - keepAliveTimeoutThreshold?: number; - /** TODO */ - socketPath?: string; - /** The amount of concurrent requests to be sent over the single TCP/TLS connection according to [RFC7230](https://tools.ietf.org/html/rfc7230#section-6.3.2). Default: `1`. */ - pipelining?: number; - /** If `true`, an error is thrown when the request content-length header doesn't match the length of the request body. Default: `true`. */ - strictContentLength?: boolean; - /** TODO */ - maxCachedSessions?: number; - /** TODO */ - connect?: Omit, 'allowH2'> | buildConnector.connector; - /** TODO */ - maxRequestsPerClient?: number; - /** TODO */ - localAddress?: string; - /** Max response body size in bytes, -1 is disabled */ - maxResponseSize?: number; - /** Enables a family autodetection algorithm that loosely implements section 5 of RFC 8305. */ - autoSelectFamily?: boolean; - /** The amount of time in milliseconds to wait for a connection attempt to finish before trying the next address when using the `autoSelectFamily` option. */ - autoSelectFamilyAttemptTimeout?: number; - /** - * @description Dictates the maximum number of concurrent streams for a single H2 session. It can be overridden by a SETTINGS remote frame. - * @default 100 - */ - maxConcurrentStreams?: number - } -} - -export default H2CClient diff --git a/PBandGraphScaffold/node_modules/undici-types/handlers.d.ts b/PBandGraphScaffold/node_modules/undici-types/handlers.d.ts deleted file mode 100644 index 8007dbf..0000000 --- a/PBandGraphScaffold/node_modules/undici-types/handlers.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import Dispatcher from './dispatcher' - -export declare class RedirectHandler implements Dispatcher.DispatchHandler { - constructor ( - dispatch: Dispatcher.Dispatch, - maxRedirections: number, - opts: Dispatcher.DispatchOptions, - handler: Dispatcher.DispatchHandler, - redirectionLimitReached: boolean - ) -} - -export declare class DecoratorHandler implements Dispatcher.DispatchHandler { - constructor (handler: Dispatcher.DispatchHandler) -} diff --git a/PBandGraphScaffold/node_modules/undici-types/header.d.ts b/PBandGraphScaffold/node_modules/undici-types/header.d.ts deleted file mode 100644 index efd7b1d..0000000 --- a/PBandGraphScaffold/node_modules/undici-types/header.d.ts +++ /dev/null @@ -1,160 +0,0 @@ -import { Autocomplete } from './utility' - -/** - * The header type declaration of `undici`. - */ -export type IncomingHttpHeaders = Record - -type HeaderNames = Autocomplete< - | 'Accept' - | 'Accept-CH' - | 'Accept-Charset' - | 'Accept-Encoding' - | 'Accept-Language' - | 'Accept-Patch' - | 'Accept-Post' - | 'Accept-Ranges' - | 'Access-Control-Allow-Credentials' - | 'Access-Control-Allow-Headers' - | 'Access-Control-Allow-Methods' - | 'Access-Control-Allow-Origin' - | 'Access-Control-Expose-Headers' - | 'Access-Control-Max-Age' - | 'Access-Control-Request-Headers' - | 'Access-Control-Request-Method' - | 'Age' - | 'Allow' - | 'Alt-Svc' - | 'Alt-Used' - | 'Authorization' - | 'Cache-Control' - | 'Clear-Site-Data' - | 'Connection' - | 'Content-Disposition' - | 'Content-Encoding' - | 'Content-Language' - | 'Content-Length' - | 'Content-Location' - | 'Content-Range' - | 'Content-Security-Policy' - | 'Content-Security-Policy-Report-Only' - | 'Content-Type' - | 'Cookie' - | 'Cross-Origin-Embedder-Policy' - | 'Cross-Origin-Opener-Policy' - | 'Cross-Origin-Resource-Policy' - | 'Date' - | 'Device-Memory' - | 'ETag' - | 'Expect' - | 'Expect-CT' - | 'Expires' - | 'Forwarded' - | 'From' - | 'Host' - | 'If-Match' - | 'If-Modified-Since' - | 'If-None-Match' - | 'If-Range' - | 'If-Unmodified-Since' - | 'Keep-Alive' - | 'Last-Modified' - | 'Link' - | 'Location' - | 'Max-Forwards' - | 'Origin' - | 'Permissions-Policy' - | 'Priority' - | 'Proxy-Authenticate' - | 'Proxy-Authorization' - | 'Range' - | 'Referer' - | 'Referrer-Policy' - | 'Retry-After' - | 'Sec-Fetch-Dest' - | 'Sec-Fetch-Mode' - | 'Sec-Fetch-Site' - | 'Sec-Fetch-User' - | 'Sec-Purpose' - | 'Sec-WebSocket-Accept' - | 'Server' - | 'Server-Timing' - | 'Service-Worker-Navigation-Preload' - | 'Set-Cookie' - | 'SourceMap' - | 'Strict-Transport-Security' - | 'TE' - | 'Timing-Allow-Origin' - | 'Trailer' - | 'Transfer-Encoding' - | 'Upgrade' - | 'Upgrade-Insecure-Requests' - | 'User-Agent' - | 'Vary' - | 'Via' - | 'WWW-Authenticate' - | 'X-Content-Type-Options' - | 'X-Frame-Options' -> - -type IANARegisteredMimeType = Autocomplete< - | 'audio/aac' - | 'video/x-msvideo' - | 'image/avif' - | 'video/av1' - | 'application/octet-stream' - | 'image/bmp' - | 'text/css' - | 'text/csv' - | 'application/vnd.ms-fontobject' - | 'application/epub+zip' - | 'image/gif' - | 'application/gzip' - | 'text/html' - | 'image/x-icon' - | 'text/calendar' - | 'image/jpeg' - | 'text/javascript' - | 'application/json' - | 'application/ld+json' - | 'audio/x-midi' - | 'audio/mpeg' - | 'video/mp4' - | 'video/mpeg' - | 'audio/ogg' - | 'video/ogg' - | 'application/ogg' - | 'audio/opus' - | 'font/otf' - | 'application/pdf' - | 'image/png' - | 'application/rtf' - | 'image/svg+xml' - | 'image/tiff' - | 'video/mp2t' - | 'font/ttf' - | 'text/plain' - | 'application/wasm' - | 'video/webm' - | 'audio/webm' - | 'image/webp' - | 'font/woff' - | 'font/woff2' - | 'application/xhtml+xml' - | 'application/xml' - | 'application/zip' - | 'video/3gpp' - | 'video/3gpp2' - | 'model/gltf+json' - | 'model/gltf-binary' -> - -type KnownHeaderValues = { - 'content-type': IANARegisteredMimeType -} - -export type HeaderRecord = { - [K in HeaderNames | Lowercase]?: Lowercase extends keyof KnownHeaderValues - ? KnownHeaderValues[Lowercase] - : string -} diff --git a/PBandGraphScaffold/node_modules/undici-types/index.d.ts b/PBandGraphScaffold/node_modules/undici-types/index.d.ts deleted file mode 100644 index be0bc28..0000000 --- a/PBandGraphScaffold/node_modules/undici-types/index.d.ts +++ /dev/null @@ -1,80 +0,0 @@ -import Dispatcher from './dispatcher' -import { setGlobalDispatcher, getGlobalDispatcher } from './global-dispatcher' -import { setGlobalOrigin, getGlobalOrigin } from './global-origin' -import Pool from './pool' -import { RedirectHandler, DecoratorHandler } from './handlers' - -import BalancedPool from './balanced-pool' -import Client from './client' -import H2CClient from './h2c-client' -import buildConnector from './connector' -import errors from './errors' -import Agent from './agent' -import MockClient from './mock-client' -import MockPool from './mock-pool' -import MockAgent from './mock-agent' -import { SnapshotAgent } from './snapshot-agent' -import { MockCallHistory, MockCallHistoryLog } from './mock-call-history' -import mockErrors from './mock-errors' -import ProxyAgent from './proxy-agent' -import EnvHttpProxyAgent from './env-http-proxy-agent' -import RetryHandler from './retry-handler' -import RetryAgent from './retry-agent' -import { request, pipeline, stream, connect, upgrade } from './api' -import interceptors from './interceptors' - -export * from './util' -export * from './cookies' -export * from './eventsource' -export * from './fetch' -export * from './formdata' -export * from './diagnostics-channel' -export * from './websocket' -export * from './content-type' -export * from './cache' -export { Interceptable } from './mock-interceptor' - -declare function globalThisInstall (): void - -export { Dispatcher, BalancedPool, Pool, Client, buildConnector, errors, Agent, request, stream, pipeline, connect, upgrade, setGlobalDispatcher, getGlobalDispatcher, setGlobalOrigin, getGlobalOrigin, interceptors, MockClient, MockPool, MockAgent, SnapshotAgent, MockCallHistory, MockCallHistoryLog, mockErrors, ProxyAgent, EnvHttpProxyAgent, RedirectHandler, DecoratorHandler, RetryHandler, RetryAgent, H2CClient, globalThisInstall as install } -export default Undici - -declare namespace Undici { - const Dispatcher: typeof import('./dispatcher').default - const Pool: typeof import('./pool').default - const RedirectHandler: typeof import ('./handlers').RedirectHandler - const DecoratorHandler: typeof import ('./handlers').DecoratorHandler - const RetryHandler: typeof import ('./retry-handler').default - const BalancedPool: typeof import('./balanced-pool').default - const Client: typeof import('./client').default - const H2CClient: typeof import('./h2c-client').default - const buildConnector: typeof import('./connector').default - const errors: typeof import('./errors').default - const Agent: typeof import('./agent').default - const setGlobalDispatcher: typeof import('./global-dispatcher').setGlobalDispatcher - const getGlobalDispatcher: typeof import('./global-dispatcher').getGlobalDispatcher - const request: typeof import('./api').request - const stream: typeof import('./api').stream - const pipeline: typeof import('./api').pipeline - const connect: typeof import('./api').connect - const upgrade: typeof import('./api').upgrade - const MockClient: typeof import('./mock-client').default - const MockPool: typeof import('./mock-pool').default - const MockAgent: typeof import('./mock-agent').default - const SnapshotAgent: typeof import('./snapshot-agent').SnapshotAgent - const MockCallHistory: typeof import('./mock-call-history').MockCallHistory - const MockCallHistoryLog: typeof import('./mock-call-history').MockCallHistoryLog - const mockErrors: typeof import('./mock-errors').default - const fetch: typeof import('./fetch').fetch - const Headers: typeof import('./fetch').Headers - const Response: typeof import('./fetch').Response - const Request: typeof import('./fetch').Request - const FormData: typeof import('./formdata').FormData - const caches: typeof import('./cache').caches - const interceptors: typeof import('./interceptors').default - const cacheStores: { - MemoryCacheStore: typeof import('./cache-interceptor').default.MemoryCacheStore, - SqliteCacheStore: typeof import('./cache-interceptor').default.SqliteCacheStore - } - const install: typeof globalThisInstall -} diff --git a/PBandGraphScaffold/node_modules/undici-types/interceptors.d.ts b/PBandGraphScaffold/node_modules/undici-types/interceptors.d.ts deleted file mode 100644 index 74389db..0000000 --- a/PBandGraphScaffold/node_modules/undici-types/interceptors.d.ts +++ /dev/null @@ -1,39 +0,0 @@ -import CacheHandler from './cache-interceptor' -import Dispatcher from './dispatcher' -import RetryHandler from './retry-handler' -import { LookupOptions } from 'node:dns' - -export default Interceptors - -declare namespace Interceptors { - export type DumpInterceptorOpts = { maxSize?: number } - export type RetryInterceptorOpts = RetryHandler.RetryOptions - export type RedirectInterceptorOpts = { maxRedirections?: number } - export type DecompressInterceptorOpts = { - skipErrorResponses?: boolean - skipStatusCodes?: number[] - } - - export type ResponseErrorInterceptorOpts = { throwOnError: boolean } - export type CacheInterceptorOpts = CacheHandler.CacheOptions - - // DNS interceptor - export type DNSInterceptorRecord = { address: string, ttl: number, family: 4 | 6 } - export type DNSInterceptorOriginRecords = { 4: { ips: DNSInterceptorRecord[] } | null, 6: { ips: DNSInterceptorRecord[] } | null } - export type DNSInterceptorOpts = { - maxTTL?: number - maxItems?: number - lookup?: (hostname: string, options: LookupOptions, callback: (err: NodeJS.ErrnoException | null, addresses: DNSInterceptorRecord[]) => void) => void - pick?: (origin: URL, records: DNSInterceptorOriginRecords, affinity: 4 | 6) => DNSInterceptorRecord - dualStack?: boolean - affinity?: 4 | 6 - } - - export function dump (opts?: DumpInterceptorOpts): Dispatcher.DispatcherComposeInterceptor - export function retry (opts?: RetryInterceptorOpts): Dispatcher.DispatcherComposeInterceptor - export function redirect (opts?: RedirectInterceptorOpts): Dispatcher.DispatcherComposeInterceptor - export function decompress (opts?: DecompressInterceptorOpts): Dispatcher.DispatcherComposeInterceptor - export function responseError (opts?: ResponseErrorInterceptorOpts): Dispatcher.DispatcherComposeInterceptor - export function dns (opts?: DNSInterceptorOpts): Dispatcher.DispatcherComposeInterceptor - export function cache (opts?: CacheInterceptorOpts): Dispatcher.DispatcherComposeInterceptor -} diff --git a/PBandGraphScaffold/node_modules/undici-types/mock-agent.d.ts b/PBandGraphScaffold/node_modules/undici-types/mock-agent.d.ts deleted file mode 100644 index 330926b..0000000 --- a/PBandGraphScaffold/node_modules/undici-types/mock-agent.d.ts +++ /dev/null @@ -1,68 +0,0 @@ -import Agent from './agent' -import Dispatcher from './dispatcher' -import { Interceptable, MockInterceptor } from './mock-interceptor' -import MockDispatch = MockInterceptor.MockDispatch -import { MockCallHistory } from './mock-call-history' - -export default MockAgent - -interface PendingInterceptor extends MockDispatch { - origin: string; -} - -/** A mocked Agent class that implements the Agent API. It allows one to intercept HTTP requests made through undici and return mocked responses instead. */ -declare class MockAgent extends Dispatcher { - constructor (options?: TMockAgentOptions) - /** Creates and retrieves mock Dispatcher instances which can then be used to intercept HTTP requests. If the number of connections on the mock agent is set to 1, a MockClient instance is returned. Otherwise a MockPool instance is returned. */ - get(origin: string): TInterceptable - get(origin: RegExp): TInterceptable - get(origin: ((origin: string) => boolean)): TInterceptable - /** Dispatches a mocked request. */ - dispatch (options: Agent.DispatchOptions, handler: Dispatcher.DispatchHandler): boolean - /** Closes the mock agent and waits for registered mock pools and clients to also close before resolving. */ - close (): Promise - /** Disables mocking in MockAgent. */ - deactivate (): void - /** Enables mocking in a MockAgent instance. When instantiated, a MockAgent is automatically activated. Therefore, this method is only effective after `MockAgent.deactivate` has been called. */ - activate (): void - /** Define host matchers so only matching requests that aren't intercepted by the mock dispatchers will be attempted. */ - enableNetConnect (): void - enableNetConnect (host: string): void - enableNetConnect (host: RegExp): void - enableNetConnect (host: ((host: string) => boolean)): void - /** Causes all requests to throw when requests are not matched in a MockAgent intercept. */ - disableNetConnect (): void - /** get call history. returns the MockAgent call history or undefined if the option is not enabled. */ - getCallHistory (): MockCallHistory | undefined - /** clear every call history. Any MockCallHistoryLog will be deleted on the MockCallHistory instance */ - clearCallHistory (): void - /** Enable call history. Any subsequence calls will then be registered. */ - enableCallHistory (): this - /** Disable call history. Any subsequence calls will then not be registered. */ - disableCallHistory (): this - pendingInterceptors (): PendingInterceptor[] - assertNoPendingInterceptors (options?: { - pendingInterceptorsFormatter?: PendingInterceptorsFormatter; - }): void -} - -interface PendingInterceptorsFormatter { - format(pendingInterceptors: readonly PendingInterceptor[]): string; -} - -declare namespace MockAgent { - /** MockAgent options. */ - export interface Options extends Agent.Options { - /** A custom agent to be encapsulated by the MockAgent. */ - agent?: Dispatcher; - - /** Ignore trailing slashes in the path */ - ignoreTrailingSlash?: boolean; - - /** Accept URLs with search parameters using non standard syntaxes. default false */ - acceptNonStandardSearchParameters?: boolean; - - /** Enable call history. you can either call MockAgent.enableCallHistory(). default false */ - enableCallHistory?: boolean - } -} diff --git a/PBandGraphScaffold/node_modules/undici-types/mock-call-history.d.ts b/PBandGraphScaffold/node_modules/undici-types/mock-call-history.d.ts deleted file mode 100644 index df07fa0..0000000 --- a/PBandGraphScaffold/node_modules/undici-types/mock-call-history.d.ts +++ /dev/null @@ -1,111 +0,0 @@ -import Dispatcher from './dispatcher' - -declare namespace MockCallHistoryLog { - /** request's configuration properties */ - export type MockCallHistoryLogProperties = 'protocol' | 'host' | 'port' | 'origin' | 'path' | 'hash' | 'fullUrl' | 'method' | 'searchParams' | 'body' | 'headers' -} - -/** a log reflecting request configuration */ -declare class MockCallHistoryLog { - constructor (requestInit: Dispatcher.DispatchOptions) - /** protocol used. ie. 'https:' or 'http:' etc... */ - protocol: string - /** request's host. */ - host: string - /** request's port. */ - port: string - /** request's origin. ie. https://localhost:3000. */ - origin: string - /** path. never contains searchParams. */ - path: string - /** request's hash. */ - hash: string - /** the full url requested. */ - fullUrl: string - /** request's method. */ - method: string - /** search params. */ - searchParams: Record - /** request's body */ - body: string | null | undefined - /** request's headers */ - headers: Record | null | undefined - - /** returns an Map of property / value pair */ - toMap (): Map | null | undefined> - - /** returns a string computed with all key value pair */ - toString (): string -} - -declare namespace MockCallHistory { - export type FilterCallsOperator = 'AND' | 'OR' - - /** modify the filtering behavior */ - export interface FilterCallsOptions { - /** the operator to apply when filtering. 'OR' will adds any MockCallHistoryLog matching any criteria given. 'AND' will adds only MockCallHistoryLog matching every criteria given. (default 'OR') */ - operator?: FilterCallsOperator | Lowercase - } - /** a function to be executed for filtering MockCallHistoryLog */ - export type FilterCallsFunctionCriteria = (log: MockCallHistoryLog) => boolean - - /** parameter to filter MockCallHistoryLog */ - export type FilterCallsParameter = string | RegExp | undefined | null - - /** an object to execute multiple filtering at once */ - export interface FilterCallsObjectCriteria extends Record { - /** filter by request protocol. ie https: */ - protocol?: FilterCallsParameter; - /** filter by request host. */ - host?: FilterCallsParameter; - /** filter by request port. */ - port?: FilterCallsParameter; - /** filter by request origin. */ - origin?: FilterCallsParameter; - /** filter by request path. */ - path?: FilterCallsParameter; - /** filter by request hash. */ - hash?: FilterCallsParameter; - /** filter by request fullUrl. */ - fullUrl?: FilterCallsParameter; - /** filter by request method. */ - method?: FilterCallsParameter; - } -} - -/** a call history to track requests configuration */ -declare class MockCallHistory { - constructor (name: string) - /** returns an array of MockCallHistoryLog. */ - calls (): Array - /** returns the first MockCallHistoryLog */ - firstCall (): MockCallHistoryLog | undefined - /** returns the last MockCallHistoryLog. */ - lastCall (): MockCallHistoryLog | undefined - /** returns the nth MockCallHistoryLog. */ - nthCall (position: number): MockCallHistoryLog | undefined - /** return all MockCallHistoryLog matching any of criteria given. if an object is used with multiple properties, you can change the operator to apply during filtering on options */ - filterCalls (criteria: MockCallHistory.FilterCallsFunctionCriteria | MockCallHistory.FilterCallsObjectCriteria | RegExp, options?: MockCallHistory.FilterCallsOptions): Array - /** return all MockCallHistoryLog matching the given protocol. if a string is given, it is matched with includes */ - filterCallsByProtocol (protocol: MockCallHistory.FilterCallsParameter): Array - /** return all MockCallHistoryLog matching the given host. if a string is given, it is matched with includes */ - filterCallsByHost (host: MockCallHistory.FilterCallsParameter): Array - /** return all MockCallHistoryLog matching the given port. if a string is given, it is matched with includes */ - filterCallsByPort (port: MockCallHistory.FilterCallsParameter): Array - /** return all MockCallHistoryLog matching the given origin. if a string is given, it is matched with includes */ - filterCallsByOrigin (origin: MockCallHistory.FilterCallsParameter): Array - /** return all MockCallHistoryLog matching the given path. if a string is given, it is matched with includes */ - filterCallsByPath (path: MockCallHistory.FilterCallsParameter): Array - /** return all MockCallHistoryLog matching the given hash. if a string is given, it is matched with includes */ - filterCallsByHash (hash: MockCallHistory.FilterCallsParameter): Array - /** return all MockCallHistoryLog matching the given fullUrl. if a string is given, it is matched with includes */ - filterCallsByFullUrl (fullUrl: MockCallHistory.FilterCallsParameter): Array - /** return all MockCallHistoryLog matching the given method. if a string is given, it is matched with includes */ - filterCallsByMethod (method: MockCallHistory.FilterCallsParameter): Array - /** clear all MockCallHistoryLog on this MockCallHistory. */ - clear (): void - /** use it with for..of loop or spread operator */ - [Symbol.iterator]: () => Generator -} - -export { MockCallHistoryLog, MockCallHistory } diff --git a/PBandGraphScaffold/node_modules/undici-types/mock-client.d.ts b/PBandGraphScaffold/node_modules/undici-types/mock-client.d.ts deleted file mode 100644 index 702e824..0000000 --- a/PBandGraphScaffold/node_modules/undici-types/mock-client.d.ts +++ /dev/null @@ -1,27 +0,0 @@ -import Client from './client' -import Dispatcher from './dispatcher' -import MockAgent from './mock-agent' -import { MockInterceptor, Interceptable } from './mock-interceptor' - -export default MockClient - -/** MockClient extends the Client API and allows one to mock requests. */ -declare class MockClient extends Client implements Interceptable { - constructor (origin: string, options: MockClient.Options) - /** Intercepts any matching requests that use the same origin as this mock client. */ - intercept (options: MockInterceptor.Options): MockInterceptor - /** Dispatches a mocked request. */ - dispatch (options: Dispatcher.DispatchOptions, handlers: Dispatcher.DispatchHandler): boolean - /** Closes the mock client and gracefully waits for enqueued requests to complete. */ - close (): Promise - /** Clean up all the prepared mocks. */ - cleanMocks (): void -} - -declare namespace MockClient { - /** MockClient options. */ - export interface Options extends Client.Options { - /** The agent to associate this MockClient with. */ - agent: MockAgent; - } -} diff --git a/PBandGraphScaffold/node_modules/undici-types/mock-errors.d.ts b/PBandGraphScaffold/node_modules/undici-types/mock-errors.d.ts deleted file mode 100644 index eefeecd..0000000 --- a/PBandGraphScaffold/node_modules/undici-types/mock-errors.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import Errors from './errors' - -export default MockErrors - -declare namespace MockErrors { - /** The request does not match any registered mock dispatches. */ - export class MockNotMatchedError extends Errors.UndiciError { - constructor (message?: string) - name: 'MockNotMatchedError' - code: 'UND_MOCK_ERR_MOCK_NOT_MATCHED' - } -} diff --git a/PBandGraphScaffold/node_modules/undici-types/mock-interceptor.d.ts b/PBandGraphScaffold/node_modules/undici-types/mock-interceptor.d.ts deleted file mode 100644 index a48d715..0000000 --- a/PBandGraphScaffold/node_modules/undici-types/mock-interceptor.d.ts +++ /dev/null @@ -1,94 +0,0 @@ -import { IncomingHttpHeaders } from './header' -import Dispatcher from './dispatcher' -import { BodyInit, Headers } from './fetch' - -/** The scope associated with a mock dispatch. */ -declare class MockScope { - constructor (mockDispatch: MockInterceptor.MockDispatch) - /** Delay a reply by a set amount of time in ms. */ - delay (waitInMs: number): MockScope - /** Persist the defined mock data for the associated reply. It will return the defined mock data indefinitely. */ - persist (): MockScope - /** Define a reply for a set amount of matching requests. */ - times (repeatTimes: number): MockScope -} - -/** The interceptor for a Mock. */ -declare class MockInterceptor { - constructor (options: MockInterceptor.Options, mockDispatches: MockInterceptor.MockDispatch[]) - /** Mock an undici request with the defined reply. */ - reply(replyOptionsCallback: MockInterceptor.MockReplyOptionsCallback): MockScope - reply( - statusCode: number, - data?: TData | Buffer | string | MockInterceptor.MockResponseDataHandler, - responseOptions?: MockInterceptor.MockResponseOptions - ): MockScope - /** Mock an undici request by throwing the defined reply error. */ - replyWithError(error: TError): MockScope - /** Set default reply headers on the interceptor for subsequent mocked replies. */ - defaultReplyHeaders (headers: IncomingHttpHeaders): MockInterceptor - /** Set default reply trailers on the interceptor for subsequent mocked replies. */ - defaultReplyTrailers (trailers: Record): MockInterceptor - /** Set automatically calculated content-length header on subsequent mocked replies. */ - replyContentLength (): MockInterceptor -} - -declare namespace MockInterceptor { - /** MockInterceptor options. */ - export interface Options { - /** Path to intercept on. */ - path: string | RegExp | ((path: string) => boolean); - /** Method to intercept on. Defaults to GET. */ - method?: string | RegExp | ((method: string) => boolean); - /** Body to intercept on. */ - body?: string | RegExp | ((body: string) => boolean); - /** Headers to intercept on. */ - headers?: Record boolean)> | ((headers: Record) => boolean); - /** Query params to intercept on */ - query?: Record; - } - export interface MockDispatch extends Options { - times: number | null; - persist: boolean; - consumed: boolean; - data: MockDispatchData; - } - export interface MockDispatchData extends MockResponseOptions { - error: TError | null; - statusCode?: number; - data?: TData | string; - } - export interface MockResponseOptions { - headers?: IncomingHttpHeaders; - trailers?: Record; - } - - export interface MockResponseCallbackOptions { - path: string; - method: string; - headers?: Headers | Record; - origin?: string; - body?: BodyInit | Dispatcher.DispatchOptions['body'] | null; - } - - export type MockResponseDataHandler = ( - opts: MockResponseCallbackOptions - ) => TData | Buffer | string - - export type MockReplyOptionsCallback = ( - opts: MockResponseCallbackOptions - ) => { statusCode: number, data?: TData | Buffer | string, responseOptions?: MockResponseOptions } -} - -interface Interceptable extends Dispatcher { - /** Intercepts any matching requests that use the same origin as this mock client. */ - intercept(options: MockInterceptor.Options): MockInterceptor; - /** Clean up all the prepared mocks. */ - cleanMocks (): void -} - -export { - Interceptable, - MockInterceptor, - MockScope -} diff --git a/PBandGraphScaffold/node_modules/undici-types/mock-pool.d.ts b/PBandGraphScaffold/node_modules/undici-types/mock-pool.d.ts deleted file mode 100644 index f35f357..0000000 --- a/PBandGraphScaffold/node_modules/undici-types/mock-pool.d.ts +++ /dev/null @@ -1,27 +0,0 @@ -import Pool from './pool' -import MockAgent from './mock-agent' -import { Interceptable, MockInterceptor } from './mock-interceptor' -import Dispatcher from './dispatcher' - -export default MockPool - -/** MockPool extends the Pool API and allows one to mock requests. */ -declare class MockPool extends Pool implements Interceptable { - constructor (origin: string, options: MockPool.Options) - /** Intercepts any matching requests that use the same origin as this mock pool. */ - intercept (options: MockInterceptor.Options): MockInterceptor - /** Dispatches a mocked request. */ - dispatch (options: Dispatcher.DispatchOptions, handlers: Dispatcher.DispatchHandler): boolean - /** Closes the mock pool and gracefully waits for enqueued requests to complete. */ - close (): Promise - /** Clean up all the prepared mocks. */ - cleanMocks (): void -} - -declare namespace MockPool { - /** MockPool options. */ - export interface Options extends Pool.Options { - /** The agent to associate this MockPool with. */ - agent: MockAgent; - } -} diff --git a/PBandGraphScaffold/node_modules/undici-types/package.json b/PBandGraphScaffold/node_modules/undici-types/package.json deleted file mode 100644 index a5e7d9d..0000000 --- a/PBandGraphScaffold/node_modules/undici-types/package.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "name": "undici-types", - "version": "7.16.0", - "description": "A stand-alone types package for Undici", - "homepage": "https://undici.nodejs.org", - "bugs": { - "url": "https://github.com/nodejs/undici/issues" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/nodejs/undici.git" - }, - "license": "MIT", - "types": "index.d.ts", - "files": [ - "*.d.ts" - ], - "contributors": [ - { - "name": "Daniele Belardi", - "url": "https://github.com/dnlup", - "author": true - }, - { - "name": "Ethan Arrowood", - "url": "https://github.com/ethan-arrowood", - "author": true - }, - { - "name": "Matteo Collina", - "url": "https://github.com/mcollina", - "author": true - }, - { - "name": "Matthew Aitken", - "url": "https://github.com/KhafraDev", - "author": true - }, - { - "name": "Robert Nagy", - "url": "https://github.com/ronag", - "author": true - }, - { - "name": "Szymon Marczak", - "url": "https://github.com/szmarczak", - "author": true - }, - { - "name": "Tomas Della Vedova", - "url": "https://github.com/delvedor", - "author": true - } - ] -} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/undici-types/patch.d.ts b/PBandGraphScaffold/node_modules/undici-types/patch.d.ts deleted file mode 100644 index 8f7acbb..0000000 --- a/PBandGraphScaffold/node_modules/undici-types/patch.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -/// - -// See https://github.com/nodejs/undici/issues/1740 - -export interface EventInit { - bubbles?: boolean - cancelable?: boolean - composed?: boolean -} - -export interface EventListenerOptions { - capture?: boolean -} - -export interface AddEventListenerOptions extends EventListenerOptions { - once?: boolean - passive?: boolean - signal?: AbortSignal -} - -export type EventListenerOrEventListenerObject = EventListener | EventListenerObject - -export interface EventListenerObject { - handleEvent (object: Event): void -} - -export interface EventListener { - (evt: Event): void -} diff --git a/PBandGraphScaffold/node_modules/undici-types/pool-stats.d.ts b/PBandGraphScaffold/node_modules/undici-types/pool-stats.d.ts deleted file mode 100644 index f76a5f6..0000000 --- a/PBandGraphScaffold/node_modules/undici-types/pool-stats.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -import Pool from './pool' - -export default PoolStats - -declare class PoolStats { - constructor (pool: Pool) - /** Number of open socket connections in this pool. */ - connected: number - /** Number of open socket connections in this pool that do not have an active request. */ - free: number - /** Number of pending requests across all clients in this pool. */ - pending: number - /** Number of queued requests across all clients in this pool. */ - queued: number - /** Number of currently active requests across all clients in this pool. */ - running: number - /** Number of active, pending, or queued requests across all clients in this pool. */ - size: number -} diff --git a/PBandGraphScaffold/node_modules/undici-types/pool.d.ts b/PBandGraphScaffold/node_modules/undici-types/pool.d.ts deleted file mode 100644 index 5198476..0000000 --- a/PBandGraphScaffold/node_modules/undici-types/pool.d.ts +++ /dev/null @@ -1,41 +0,0 @@ -import Client from './client' -import TPoolStats from './pool-stats' -import { URL } from 'url' -import Dispatcher from './dispatcher' - -export default Pool - -type PoolConnectOptions = Omit - -declare class Pool extends Dispatcher { - constructor (url: string | URL, options?: Pool.Options) - /** `true` after `pool.close()` has been called. */ - closed: boolean - /** `true` after `pool.destroyed()` has been called or `pool.close()` has been called and the pool shutdown has completed. */ - destroyed: boolean - /** Aggregate stats for a Pool. */ - readonly stats: TPoolStats - - // Override dispatcher APIs. - override connect ( - options: PoolConnectOptions - ): Promise - override connect ( - options: PoolConnectOptions, - callback: (err: Error | null, data: Dispatcher.ConnectData) => void - ): void -} - -declare namespace Pool { - export type PoolStats = TPoolStats - export interface Options extends Client.Options { - /** Default: `(origin, opts) => new Client(origin, opts)`. */ - factory?(origin: URL, opts: object): Dispatcher; - /** The max number of clients to create. `null` if no limit. Default `null`. */ - connections?: number | null; - /** The amount of time before a client is removed from the pool and closed. `null` if no time limit. Default `null` */ - clientTtl?: number | null; - - interceptors?: { Pool?: readonly Dispatcher.DispatchInterceptor[] } & Client.Options['interceptors'] - } -} diff --git a/PBandGraphScaffold/node_modules/undici-types/proxy-agent.d.ts b/PBandGraphScaffold/node_modules/undici-types/proxy-agent.d.ts deleted file mode 100644 index 4155542..0000000 --- a/PBandGraphScaffold/node_modules/undici-types/proxy-agent.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -import Agent from './agent' -import buildConnector from './connector' -import Dispatcher from './dispatcher' -import { IncomingHttpHeaders } from './header' - -export default ProxyAgent - -declare class ProxyAgent extends Dispatcher { - constructor (options: ProxyAgent.Options | string) - - dispatch (options: Agent.DispatchOptions, handler: Dispatcher.DispatchHandler): boolean - close (): Promise -} - -declare namespace ProxyAgent { - export interface Options extends Agent.Options { - uri: string; - /** - * @deprecated use opts.token - */ - auth?: string; - token?: string; - headers?: IncomingHttpHeaders; - requestTls?: buildConnector.BuildOptions; - proxyTls?: buildConnector.BuildOptions; - clientFactory?(origin: URL, opts: object): Dispatcher; - proxyTunnel?: boolean; - } -} diff --git a/PBandGraphScaffold/node_modules/undici-types/readable.d.ts b/PBandGraphScaffold/node_modules/undici-types/readable.d.ts deleted file mode 100644 index e4f314b..0000000 --- a/PBandGraphScaffold/node_modules/undici-types/readable.d.ts +++ /dev/null @@ -1,68 +0,0 @@ -import { Readable } from 'stream' -import { Blob } from 'buffer' - -export default BodyReadable - -declare class BodyReadable extends Readable { - constructor (opts: { - resume: (this: Readable, size: number) => void | null; - abort: () => void | null; - contentType?: string; - contentLength?: number; - highWaterMark?: number; - }) - - /** Consumes and returns the body as a string - * https://fetch.spec.whatwg.org/#dom-body-text - */ - text (): Promise - - /** Consumes and returns the body as a JavaScript Object - * https://fetch.spec.whatwg.org/#dom-body-json - */ - json (): Promise - - /** Consumes and returns the body as a Blob - * https://fetch.spec.whatwg.org/#dom-body-blob - */ - blob (): Promise - - /** Consumes and returns the body as an Uint8Array - * https://fetch.spec.whatwg.org/#dom-body-bytes - */ - bytes (): Promise - - /** Consumes and returns the body as an ArrayBuffer - * https://fetch.spec.whatwg.org/#dom-body-arraybuffer - */ - arrayBuffer (): Promise - - /** Not implemented - * - * https://fetch.spec.whatwg.org/#dom-body-formdata - */ - formData (): Promise - - /** Returns true if the body is not null and the body has been consumed - * - * Otherwise, returns false - * - * https://fetch.spec.whatwg.org/#dom-body-bodyused - */ - readonly bodyUsed: boolean - - /** - * If body is null, it should return null as the body - * - * If body is not null, should return the body as a ReadableStream - * - * https://fetch.spec.whatwg.org/#dom-body-body - */ - readonly body: never | undefined - - /** Dumps the response body by reading `limit` number of bytes. - * @param opts.limit Number of bytes to read (optional) - Default: 131072 - * @param opts.signal AbortSignal to cancel the operation (optional) - */ - dump (opts?: { limit: number; signal?: AbortSignal }): Promise -} diff --git a/PBandGraphScaffold/node_modules/undici-types/retry-agent.d.ts b/PBandGraphScaffold/node_modules/undici-types/retry-agent.d.ts deleted file mode 100644 index 82268c3..0000000 --- a/PBandGraphScaffold/node_modules/undici-types/retry-agent.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import Dispatcher from './dispatcher' -import RetryHandler from './retry-handler' - -export default RetryAgent - -declare class RetryAgent extends Dispatcher { - constructor (dispatcher: Dispatcher, options?: RetryHandler.RetryOptions) -} diff --git a/PBandGraphScaffold/node_modules/undici-types/retry-handler.d.ts b/PBandGraphScaffold/node_modules/undici-types/retry-handler.d.ts deleted file mode 100644 index 3bc484b..0000000 --- a/PBandGraphScaffold/node_modules/undici-types/retry-handler.d.ts +++ /dev/null @@ -1,125 +0,0 @@ -import Dispatcher from './dispatcher' - -export default RetryHandler - -declare class RetryHandler implements Dispatcher.DispatchHandler { - constructor ( - options: Dispatcher.DispatchOptions & { - retryOptions?: RetryHandler.RetryOptions; - }, - retryHandlers: RetryHandler.RetryHandlers - ) -} - -declare namespace RetryHandler { - export type RetryState = { counter: number; } - - export type RetryContext = { - state: RetryState; - opts: Dispatcher.DispatchOptions & { - retryOptions?: RetryHandler.RetryOptions; - }; - } - - export type OnRetryCallback = (result?: Error | null) => void - - export type RetryCallback = ( - err: Error, - context: { - state: RetryState; - opts: Dispatcher.DispatchOptions & { - retryOptions?: RetryHandler.RetryOptions; - }; - }, - callback: OnRetryCallback - ) => void - - export interface RetryOptions { - /** - * If true, the retry handler will throw an error if the request fails, - * this will prevent the folling handlers from being called, and will destroy the socket. - * - * @type {boolean} - * @memberof RetryOptions - * @default true - */ - throwOnError?: boolean; - /** - * Callback to be invoked on every retry iteration. - * It receives the error, current state of the retry object and the options object - * passed when instantiating the retry handler. - * - * @type {RetryCallback} - * @memberof RetryOptions - */ - retry?: RetryCallback; - /** - * Maximum number of retries to allow. - * - * @type {number} - * @memberof RetryOptions - * @default 5 - */ - maxRetries?: number; - /** - * Max number of milliseconds allow between retries - * - * @type {number} - * @memberof RetryOptions - * @default 30000 - */ - maxTimeout?: number; - /** - * Initial number of milliseconds to wait before retrying for the first time. - * - * @type {number} - * @memberof RetryOptions - * @default 500 - */ - minTimeout?: number; - /** - * Factior to multiply the timeout factor between retries. - * - * @type {number} - * @memberof RetryOptions - * @default 2 - */ - timeoutFactor?: number; - /** - * It enables to automatically infer timeout between retries based on the `Retry-After` header. - * - * @type {boolean} - * @memberof RetryOptions - * @default true - */ - retryAfter?: boolean; - /** - * HTTP methods to retry. - * - * @type {Dispatcher.HttpMethod[]} - * @memberof RetryOptions - * @default ['GET', 'HEAD', 'OPTIONS', 'PUT', 'DELETE', 'TRACE'], - */ - methods?: Dispatcher.HttpMethod[]; - /** - * Error codes to be retried. e.g. `ECONNRESET`, `ENOTFOUND`, `ETIMEDOUT`, `ECONNREFUSED`, etc. - * - * @type {string[]} - * @default ['ECONNRESET','ECONNREFUSED','ENOTFOUND','ENETDOWN','ENETUNREACH','EHOSTDOWN','EHOSTUNREACH','EPIPE'] - */ - errorCodes?: string[]; - /** - * HTTP status codes to be retried. - * - * @type {number[]} - * @memberof RetryOptions - * @default [500, 502, 503, 504, 429], - */ - statusCodes?: number[]; - } - - export interface RetryHandlers { - dispatch: Dispatcher['dispatch']; - handler: Dispatcher.DispatchHandler; - } -} diff --git a/PBandGraphScaffold/node_modules/undici-types/snapshot-agent.d.ts b/PBandGraphScaffold/node_modules/undici-types/snapshot-agent.d.ts deleted file mode 100644 index f1d1ccd..0000000 --- a/PBandGraphScaffold/node_modules/undici-types/snapshot-agent.d.ts +++ /dev/null @@ -1,109 +0,0 @@ -import MockAgent from './mock-agent' - -declare class SnapshotRecorder { - constructor (options?: SnapshotRecorder.Options) - - record (requestOpts: any, response: any): Promise - findSnapshot (requestOpts: any): SnapshotRecorder.Snapshot | undefined - loadSnapshots (filePath?: string): Promise - saveSnapshots (filePath?: string): Promise - clear (): void - getSnapshots (): SnapshotRecorder.Snapshot[] - size (): number - resetCallCounts (): void - deleteSnapshot (requestOpts: any): boolean - getSnapshotInfo (requestOpts: any): SnapshotRecorder.SnapshotInfo | null - replaceSnapshots (snapshotData: SnapshotRecorder.SnapshotData[]): void - destroy (): void -} - -declare namespace SnapshotRecorder { - type SnapshotRecorderMode = 'record' | 'playback' | 'update' - - export interface Options { - snapshotPath?: string - mode?: SnapshotRecorderMode - maxSnapshots?: number - autoFlush?: boolean - flushInterval?: number - matchHeaders?: string[] - ignoreHeaders?: string[] - excludeHeaders?: string[] - matchBody?: boolean - matchQuery?: boolean - caseSensitive?: boolean - shouldRecord?: (requestOpts: any) => boolean - shouldPlayback?: (requestOpts: any) => boolean - excludeUrls?: (string | RegExp)[] - } - - export interface Snapshot { - request: { - method: string - url: string - headers: Record - body?: string - } - responses: { - statusCode: number - headers: Record - body: string - trailers: Record - }[] - callCount: number - timestamp: string - } - - export interface SnapshotInfo { - hash: string - request: { - method: string - url: string - headers: Record - body?: string - } - responseCount: number - callCount: number - timestamp: string - } - - export interface SnapshotData { - hash: string - snapshot: Snapshot - } -} - -declare class SnapshotAgent extends MockAgent { - constructor (options?: SnapshotAgent.Options) - - saveSnapshots (filePath?: string): Promise - loadSnapshots (filePath?: string): Promise - getRecorder (): SnapshotRecorder - getMode (): SnapshotRecorder.SnapshotRecorderMode - clearSnapshots (): void - resetCallCounts (): void - deleteSnapshot (requestOpts: any): boolean - getSnapshotInfo (requestOpts: any): SnapshotRecorder.SnapshotInfo | null - replaceSnapshots (snapshotData: SnapshotRecorder.SnapshotData[]): void -} - -declare namespace SnapshotAgent { - export interface Options extends MockAgent.Options { - mode?: SnapshotRecorder.SnapshotRecorderMode - snapshotPath?: string - maxSnapshots?: number - autoFlush?: boolean - flushInterval?: number - matchHeaders?: string[] - ignoreHeaders?: string[] - excludeHeaders?: string[] - matchBody?: boolean - matchQuery?: boolean - caseSensitive?: boolean - shouldRecord?: (requestOpts: any) => boolean - shouldPlayback?: (requestOpts: any) => boolean - excludeUrls?: (string | RegExp)[] - } -} - -export { SnapshotAgent, SnapshotRecorder } diff --git a/PBandGraphScaffold/node_modules/undici-types/util.d.ts b/PBandGraphScaffold/node_modules/undici-types/util.d.ts deleted file mode 100644 index 8fc50cc..0000000 --- a/PBandGraphScaffold/node_modules/undici-types/util.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -export namespace util { - /** - * Retrieves a header name and returns its lowercase value. - * @param value Header name - */ - export function headerNameToString (value: string | Buffer): string - - /** - * Receives a header object and returns the parsed value. - * @param headers Header object - * @param obj Object to specify a proxy object. Used to assign parsed values. - * @returns If `obj` is specified, it is equivalent to `obj`. - */ - export function parseHeaders ( - headers: (Buffer | string | (Buffer | string)[])[], - obj?: Record - ): Record -} diff --git a/PBandGraphScaffold/node_modules/undici-types/utility.d.ts b/PBandGraphScaffold/node_modules/undici-types/utility.d.ts deleted file mode 100644 index bfb3ca7..0000000 --- a/PBandGraphScaffold/node_modules/undici-types/utility.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -type AutocompletePrimitiveBaseType = - T extends string ? string : - T extends number ? number : - T extends boolean ? boolean : - never - -export type Autocomplete = T | (AutocompletePrimitiveBaseType & Record) diff --git a/PBandGraphScaffold/node_modules/undici-types/webidl.d.ts b/PBandGraphScaffold/node_modules/undici-types/webidl.d.ts deleted file mode 100644 index d2a8eb9..0000000 --- a/PBandGraphScaffold/node_modules/undici-types/webidl.d.ts +++ /dev/null @@ -1,341 +0,0 @@ -// These types are not exported, and are only used internally -import * as undici from './index' - -/** - * Take in an unknown value and return one that is of type T - */ -type Converter = (object: unknown) => T - -type SequenceConverter = (object: unknown, iterable?: IterableIterator) => T[] - -type RecordConverter = (object: unknown) => Record - -interface WebidlErrors { - /** - * @description Instantiate an error - */ - exception (opts: { header: string, message: string }): TypeError - /** - * @description Instantiate an error when conversion from one type to another has failed - */ - conversionFailed (opts: { - prefix: string - argument: string - types: string[] - }): TypeError - /** - * @description Throw an error when an invalid argument is provided - */ - invalidArgument (opts: { - prefix: string - value: string - type: string - }): TypeError -} - -interface WebIDLTypes { - UNDEFINED: 1, - BOOLEAN: 2, - STRING: 3, - SYMBOL: 4, - NUMBER: 5, - BIGINT: 6, - NULL: 7 - OBJECT: 8 -} - -interface WebidlUtil { - /** - * @see https://tc39.es/ecma262/#sec-ecmascript-data-types-and-values - */ - Type (object: unknown): WebIDLTypes[keyof WebIDLTypes] - - TypeValueToString (o: unknown): - | 'Undefined' - | 'Boolean' - | 'String' - | 'Symbol' - | 'Number' - | 'BigInt' - | 'Null' - | 'Object' - - Types: WebIDLTypes - - /** - * @see https://webidl.spec.whatwg.org/#abstract-opdef-converttoint - */ - ConvertToInt ( - V: unknown, - bitLength: number, - signedness: 'signed' | 'unsigned', - flags?: number - ): number - - /** - * @see https://webidl.spec.whatwg.org/#abstract-opdef-integerpart - */ - IntegerPart (N: number): number - - /** - * Stringifies {@param V} - */ - Stringify (V: any): string - - MakeTypeAssertion (I: I): (arg: any) => arg is I - - /** - * Mark a value as uncloneable for Node.js. - * This is only effective in some newer Node.js versions. - */ - markAsUncloneable (V: any): void - - IsResizableArrayBuffer (V: ArrayBufferLike): boolean - - HasFlag (flag: number, attributes: number): boolean -} - -interface WebidlConverters { - /** - * @see https://webidl.spec.whatwg.org/#es-DOMString - */ - DOMString (V: unknown, prefix: string, argument: string, flags?: number): string - - /** - * @see https://webidl.spec.whatwg.org/#es-ByteString - */ - ByteString (V: unknown, prefix: string, argument: string): string - - /** - * @see https://webidl.spec.whatwg.org/#es-USVString - */ - USVString (V: unknown): string - - /** - * @see https://webidl.spec.whatwg.org/#es-boolean - */ - boolean (V: unknown): boolean - - /** - * @see https://webidl.spec.whatwg.org/#es-any - */ - any (V: Value): Value - - /** - * @see https://webidl.spec.whatwg.org/#es-long-long - */ - ['long long'] (V: unknown): number - - /** - * @see https://webidl.spec.whatwg.org/#es-unsigned-long-long - */ - ['unsigned long long'] (V: unknown): number - - /** - * @see https://webidl.spec.whatwg.org/#es-unsigned-long - */ - ['unsigned long'] (V: unknown): number - - /** - * @see https://webidl.spec.whatwg.org/#es-unsigned-short - */ - ['unsigned short'] (V: unknown, flags?: number): number - - /** - * @see https://webidl.spec.whatwg.org/#idl-ArrayBuffer - */ - ArrayBuffer ( - V: unknown, - prefix: string, - argument: string, - options?: { allowResizable: boolean } - ): ArrayBuffer - - /** - * @see https://webidl.spec.whatwg.org/#idl-SharedArrayBuffer - */ - SharedArrayBuffer ( - V: unknown, - prefix: string, - argument: string, - options?: { allowResizable: boolean } - ): SharedArrayBuffer - - /** - * @see https://webidl.spec.whatwg.org/#es-buffer-source-types - */ - TypedArray ( - V: unknown, - T: new () => NodeJS.TypedArray, - prefix: string, - argument: string, - flags?: number - ): NodeJS.TypedArray - - /** - * @see https://webidl.spec.whatwg.org/#es-buffer-source-types - */ - DataView ( - V: unknown, - prefix: string, - argument: string, - flags?: number - ): DataView - - /** - * @see https://webidl.spec.whatwg.org/#es-buffer-source-types - */ - ArrayBufferView ( - V: unknown, - prefix: string, - argument: string, - flags?: number - ): NodeJS.ArrayBufferView - - /** - * @see https://webidl.spec.whatwg.org/#BufferSource - */ - BufferSource ( - V: unknown, - prefix: string, - argument: string, - flags?: number - ): ArrayBuffer | NodeJS.ArrayBufferView - - /** - * @see https://webidl.spec.whatwg.org/#AllowSharedBufferSource - */ - AllowSharedBufferSource ( - V: unknown, - prefix: string, - argument: string, - flags?: number - ): ArrayBuffer | SharedArrayBuffer | NodeJS.ArrayBufferView - - ['sequence']: SequenceConverter - - ['sequence>']: SequenceConverter - - ['record']: RecordConverter - - /** - * @see https://fetch.spec.whatwg.org/#requestinfo - */ - RequestInfo (V: unknown): undici.Request | string - - /** - * @see https://fetch.spec.whatwg.org/#requestinit - */ - RequestInit (V: unknown): undici.RequestInit - - /** - * @see https://html.spec.whatwg.org/multipage/webappapis.html#eventhandlernonnull - */ - EventHandlerNonNull (V: unknown): Function | null - - WebSocketStreamWrite (V: unknown): ArrayBuffer | NodeJS.TypedArray | string - - [Key: string]: (...args: any[]) => unknown -} - -type WebidlIsFunction = (arg: any) => arg is T - -interface WebidlIs { - Request: WebidlIsFunction - Response: WebidlIsFunction - ReadableStream: WebidlIsFunction - Blob: WebidlIsFunction - URLSearchParams: WebidlIsFunction - File: WebidlIsFunction - FormData: WebidlIsFunction - URL: WebidlIsFunction - WebSocketError: WebidlIsFunction - AbortSignal: WebidlIsFunction - MessagePort: WebidlIsFunction - USVString: WebidlIsFunction - /** - * @see https://webidl.spec.whatwg.org/#BufferSource - */ - BufferSource: WebidlIsFunction -} - -export interface Webidl { - errors: WebidlErrors - util: WebidlUtil - converters: WebidlConverters - is: WebidlIs - attributes: WebIDLExtendedAttributes - - /** - * @description Performs a brand-check on {@param V} to ensure it is a - * {@param cls} object. - */ - brandCheck unknown>(V: unknown, cls: Interface): asserts V is Interface - - brandCheckMultiple unknown)[]> (list: Interfaces): (V: any) => asserts V is Interfaces[number] - - /** - * @see https://webidl.spec.whatwg.org/#es-sequence - * @description Convert a value, V, to a WebIDL sequence type. - */ - sequenceConverter (C: Converter): SequenceConverter - - illegalConstructor (): never - - /** - * @see https://webidl.spec.whatwg.org/#es-to-record - * @description Convert a value, V, to a WebIDL record type. - */ - recordConverter ( - keyConverter: Converter, - valueConverter: Converter - ): RecordConverter - - /** - * Similar to {@link Webidl.brandCheck} but allows skipping the check if third party - * interfaces are allowed. - */ - interfaceConverter (typeCheck: WebidlIsFunction, name: string): ( - V: unknown, - prefix: string, - argument: string - ) => asserts V is Interface - - // TODO(@KhafraDev): a type could likely be implemented that can infer the return type - // from the converters given? - /** - * Converts a value, V, to a WebIDL dictionary types. Allows limiting which keys are - * allowed, values allowed, optional and required keys. Auto converts the value to - * a type given a converter. - */ - dictionaryConverter (converters: { - key: string, - defaultValue?: () => unknown, - required?: boolean, - converter: (...args: unknown[]) => unknown, - allowedValues?: unknown[] - }[]): (V: unknown) => Record - - /** - * @see https://webidl.spec.whatwg.org/#idl-nullable-type - * @description allows a type, V, to be null - */ - nullableConverter ( - converter: Converter - ): (V: unknown) => ReturnType | null - - argumentLengthCheck (args: { length: number }, min: number, context: string): void -} - -interface WebIDLExtendedAttributes { - /** https://webidl.spec.whatwg.org/#Clamp */ - Clamp: number - /** https://webidl.spec.whatwg.org/#EnforceRange */ - EnforceRange: number - /** https://webidl.spec.whatwg.org/#AllowShared */ - AllowShared: number - /** https://webidl.spec.whatwg.org/#AllowResizable */ - AllowResizable: number - /** https://webidl.spec.whatwg.org/#LegacyNullToEmptyString */ - LegacyNullToEmptyString: number -} diff --git a/PBandGraphScaffold/node_modules/undici-types/websocket.d.ts b/PBandGraphScaffold/node_modules/undici-types/websocket.d.ts deleted file mode 100644 index a8477c1..0000000 --- a/PBandGraphScaffold/node_modules/undici-types/websocket.d.ts +++ /dev/null @@ -1,186 +0,0 @@ -/// - -import type { Blob } from 'buffer' -import type { ReadableStream, WritableStream } from 'stream/web' -import type { MessagePort } from 'worker_threads' -import { - EventInit, - EventListenerOptions, - AddEventListenerOptions, - EventListenerOrEventListenerObject -} from './patch' -import Dispatcher from './dispatcher' -import { HeadersInit } from './fetch' - -export type BinaryType = 'blob' | 'arraybuffer' - -interface WebSocketEventMap { - close: CloseEvent - error: ErrorEvent - message: MessageEvent - open: Event -} - -interface WebSocket extends EventTarget { - binaryType: BinaryType - - readonly bufferedAmount: number - readonly extensions: string - - onclose: ((this: WebSocket, ev: WebSocketEventMap['close']) => any) | null - onerror: ((this: WebSocket, ev: WebSocketEventMap['error']) => any) | null - onmessage: ((this: WebSocket, ev: WebSocketEventMap['message']) => any) | null - onopen: ((this: WebSocket, ev: WebSocketEventMap['open']) => any) | null - - readonly protocol: string - readonly readyState: number - readonly url: string - - close(code?: number, reason?: string): void - send(data: string | ArrayBufferLike | Blob | ArrayBufferView): void - - readonly CLOSED: number - readonly CLOSING: number - readonly CONNECTING: number - readonly OPEN: number - - addEventListener( - type: K, - listener: (this: WebSocket, ev: WebSocketEventMap[K]) => any, - options?: boolean | AddEventListenerOptions - ): void - addEventListener( - type: string, - listener: EventListenerOrEventListenerObject, - options?: boolean | AddEventListenerOptions - ): void - removeEventListener( - type: K, - listener: (this: WebSocket, ev: WebSocketEventMap[K]) => any, - options?: boolean | EventListenerOptions - ): void - removeEventListener( - type: string, - listener: EventListenerOrEventListenerObject, - options?: boolean | EventListenerOptions - ): void -} - -export declare const WebSocket: { - prototype: WebSocket - new (url: string | URL, protocols?: string | string[] | WebSocketInit): WebSocket - readonly CLOSED: number - readonly CLOSING: number - readonly CONNECTING: number - readonly OPEN: number -} - -interface CloseEventInit extends EventInit { - code?: number - reason?: string - wasClean?: boolean -} - -interface CloseEvent extends Event { - readonly code: number - readonly reason: string - readonly wasClean: boolean -} - -export declare const CloseEvent: { - prototype: CloseEvent - new (type: string, eventInitDict?: CloseEventInit): CloseEvent -} - -interface MessageEventInit extends EventInit { - data?: T - lastEventId?: string - origin?: string - ports?: (typeof MessagePort)[] - source?: typeof MessagePort | null -} - -interface MessageEvent extends Event { - readonly data: T - readonly lastEventId: string - readonly origin: string - readonly ports: ReadonlyArray - readonly source: typeof MessagePort | null - initMessageEvent( - type: string, - bubbles?: boolean, - cancelable?: boolean, - data?: any, - origin?: string, - lastEventId?: string, - source?: typeof MessagePort | null, - ports?: (typeof MessagePort)[] - ): void; -} - -export declare const MessageEvent: { - prototype: MessageEvent - new(type: string, eventInitDict?: MessageEventInit): MessageEvent -} - -interface ErrorEventInit extends EventInit { - message?: string - filename?: string - lineno?: number - colno?: number - error?: any -} - -interface ErrorEvent extends Event { - readonly message: string - readonly filename: string - readonly lineno: number - readonly colno: number - readonly error: Error -} - -export declare const ErrorEvent: { - prototype: ErrorEvent - new (type: string, eventInitDict?: ErrorEventInit): ErrorEvent -} - -interface WebSocketInit { - protocols?: string | string[], - dispatcher?: Dispatcher, - headers?: HeadersInit -} - -interface WebSocketStreamOptions { - protocols?: string | string[] - signal?: AbortSignal -} - -interface WebSocketCloseInfo { - closeCode: number - reason: string -} - -interface WebSocketStream { - closed: Promise - opened: Promise<{ - extensions: string - protocol: string - readable: ReadableStream - writable: WritableStream - }> - url: string -} - -export declare const WebSocketStream: { - prototype: WebSocketStream - new (url: string | URL, options?: WebSocketStreamOptions): WebSocketStream -} - -interface WebSocketError extends Event, WebSocketCloseInfo {} - -export declare const WebSocketError: { - prototype: WebSocketError - new (type: string, init?: WebSocketCloseInfo): WebSocketError -} - -export declare const ping: (ws: WebSocket, body?: Buffer) => void diff --git a/PBandGraphScaffold/node_modules/uuid/CHANGELOG.md b/PBandGraphScaffold/node_modules/uuid/CHANGELOG.md deleted file mode 100644 index 7519d19..0000000 --- a/PBandGraphScaffold/node_modules/uuid/CHANGELOG.md +++ /dev/null @@ -1,229 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. - -### [8.3.2](https://github.com/uuidjs/uuid/compare/v8.3.1...v8.3.2) (2020-12-08) - -### Bug Fixes - -- lazy load getRandomValues ([#537](https://github.com/uuidjs/uuid/issues/537)) ([16c8f6d](https://github.com/uuidjs/uuid/commit/16c8f6df2f6b09b4d6235602d6a591188320a82e)), closes [#536](https://github.com/uuidjs/uuid/issues/536) - -### [8.3.1](https://github.com/uuidjs/uuid/compare/v8.3.0...v8.3.1) (2020-10-04) - -### Bug Fixes - -- support expo>=39.0.0 ([#515](https://github.com/uuidjs/uuid/issues/515)) ([c65a0f3](https://github.com/uuidjs/uuid/commit/c65a0f3fa73b901959d638d1e3591dfacdbed867)), closes [#375](https://github.com/uuidjs/uuid/issues/375) - -## [8.3.0](https://github.com/uuidjs/uuid/compare/v8.2.0...v8.3.0) (2020-07-27) - -### Features - -- add parse/stringify/validate/version/NIL APIs ([#479](https://github.com/uuidjs/uuid/issues/479)) ([0e6c10b](https://github.com/uuidjs/uuid/commit/0e6c10ba1bf9517796ff23c052fc0468eedfd5f4)), closes [#475](https://github.com/uuidjs/uuid/issues/475) [#478](https://github.com/uuidjs/uuid/issues/478) [#480](https://github.com/uuidjs/uuid/issues/480) [#481](https://github.com/uuidjs/uuid/issues/481) [#180](https://github.com/uuidjs/uuid/issues/180) - -## [8.2.0](https://github.com/uuidjs/uuid/compare/v8.1.0...v8.2.0) (2020-06-23) - -### Features - -- improve performance of v1 string representation ([#453](https://github.com/uuidjs/uuid/issues/453)) ([0ee0b67](https://github.com/uuidjs/uuid/commit/0ee0b67c37846529c66089880414d29f3ae132d5)) -- remove deprecated v4 string parameter ([#454](https://github.com/uuidjs/uuid/issues/454)) ([88ce3ca](https://github.com/uuidjs/uuid/commit/88ce3ca0ba046f60856de62c7ce03f7ba98ba46c)), closes [#437](https://github.com/uuidjs/uuid/issues/437) -- support jspm ([#473](https://github.com/uuidjs/uuid/issues/473)) ([e9f2587](https://github.com/uuidjs/uuid/commit/e9f2587a92575cac31bc1d4ae944e17c09756659)) - -### Bug Fixes - -- prepare package exports for webpack 5 ([#468](https://github.com/uuidjs/uuid/issues/468)) ([8d6e6a5](https://github.com/uuidjs/uuid/commit/8d6e6a5f8965ca9575eb4d92e99a43435f4a58a8)) - -## [8.1.0](https://github.com/uuidjs/uuid/compare/v8.0.0...v8.1.0) (2020-05-20) - -### Features - -- improve v4 performance by reusing random number array ([#435](https://github.com/uuidjs/uuid/issues/435)) ([bf4af0d](https://github.com/uuidjs/uuid/commit/bf4af0d711b4d2ed03d1f74fd12ad0baa87dc79d)) -- optimize V8 performance of bytesToUuid ([#434](https://github.com/uuidjs/uuid/issues/434)) ([e156415](https://github.com/uuidjs/uuid/commit/e156415448ec1af2351fa0b6660cfb22581971f2)) - -### Bug Fixes - -- export package.json required by react-native and bundlers ([#449](https://github.com/uuidjs/uuid/issues/449)) ([be1c8fe](https://github.com/uuidjs/uuid/commit/be1c8fe9a3206c358e0059b52fafd7213aa48a52)), closes [ai/nanoevents#44](https://github.com/ai/nanoevents/issues/44#issuecomment-602010343) [#444](https://github.com/uuidjs/uuid/issues/444) - -## [8.0.0](https://github.com/uuidjs/uuid/compare/v7.0.3...v8.0.0) (2020-04-29) - -### ⚠ BREAKING CHANGES - -- For native ECMAScript Module (ESM) usage in Node.js only named exports are exposed, there is no more default export. - - ```diff - -import uuid from 'uuid'; - -console.log(uuid.v4()); // -> 'cd6c3b08-0adc-4f4b-a6ef-36087a1c9869' - +import { v4 as uuidv4 } from 'uuid'; - +uuidv4(); // ⇨ '9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d' - ``` - -- Deep requiring specific algorithms of this library like `require('uuid/v4')`, which has been deprecated in `uuid@7`, is no longer supported. - - Instead use the named exports that this module exports. - - For ECMAScript Modules (ESM): - - ```diff - -import uuidv4 from 'uuid/v4'; - +import { v4 as uuidv4 } from 'uuid'; - uuidv4(); - ``` - - For CommonJS: - - ```diff - -const uuidv4 = require('uuid/v4'); - +const { v4: uuidv4 } = require('uuid'); - uuidv4(); - ``` - -### Features - -- native Node.js ES Modules (wrapper approach) ([#423](https://github.com/uuidjs/uuid/issues/423)) ([2d9f590](https://github.com/uuidjs/uuid/commit/2d9f590ad9701d692625c07ed62f0a0f91227991)), closes [#245](https://github.com/uuidjs/uuid/issues/245) [#419](https://github.com/uuidjs/uuid/issues/419) [#342](https://github.com/uuidjs/uuid/issues/342) -- remove deep requires ([#426](https://github.com/uuidjs/uuid/issues/426)) ([daf72b8](https://github.com/uuidjs/uuid/commit/daf72b84ceb20272a81bb5fbddb05dd95922cbba)) - -### Bug Fixes - -- add CommonJS syntax example to README quickstart section ([#417](https://github.com/uuidjs/uuid/issues/417)) ([e0ec840](https://github.com/uuidjs/uuid/commit/e0ec8402c7ad44b7ef0453036c612f5db513fda0)) - -### [7.0.3](https://github.com/uuidjs/uuid/compare/v7.0.2...v7.0.3) (2020-03-31) - -### Bug Fixes - -- make deep require deprecation warning work in browsers ([#409](https://github.com/uuidjs/uuid/issues/409)) ([4b71107](https://github.com/uuidjs/uuid/commit/4b71107d8c0d2ef56861ede6403fc9dc35a1e6bf)), closes [#408](https://github.com/uuidjs/uuid/issues/408) - -### [7.0.2](https://github.com/uuidjs/uuid/compare/v7.0.1...v7.0.2) (2020-03-04) - -### Bug Fixes - -- make access to msCrypto consistent ([#393](https://github.com/uuidjs/uuid/issues/393)) ([8bf2a20](https://github.com/uuidjs/uuid/commit/8bf2a20f3565df743da7215eebdbada9d2df118c)) -- simplify link in deprecation warning ([#391](https://github.com/uuidjs/uuid/issues/391)) ([bb2c8e4](https://github.com/uuidjs/uuid/commit/bb2c8e4e9f4c5f9c1eaaf3ea59710c633cd90cb7)) -- update links to match content in readme ([#386](https://github.com/uuidjs/uuid/issues/386)) ([44f2f86](https://github.com/uuidjs/uuid/commit/44f2f86e9d2bbf14ee5f0f00f72a3db1292666d4)) - -### [7.0.1](https://github.com/uuidjs/uuid/compare/v7.0.0...v7.0.1) (2020-02-25) - -### Bug Fixes - -- clean up esm builds for node and browser ([#383](https://github.com/uuidjs/uuid/issues/383)) ([59e6a49](https://github.com/uuidjs/uuid/commit/59e6a49e7ce7b3e8fb0f3ee52b9daae72af467dc)) -- provide browser versions independent from module system ([#380](https://github.com/uuidjs/uuid/issues/380)) ([4344a22](https://github.com/uuidjs/uuid/commit/4344a22e7aed33be8627eeaaf05360f256a21753)), closes [#378](https://github.com/uuidjs/uuid/issues/378) - -## [7.0.0](https://github.com/uuidjs/uuid/compare/v3.4.0...v7.0.0) (2020-02-24) - -### ⚠ BREAKING CHANGES - -- The default export, which used to be the v4() method but which was already discouraged in v3.x of this library, has been removed. -- Explicitly note that deep imports of the different uuid version functions are deprecated and no longer encouraged and that ECMAScript module named imports should be used instead. Emit a deprecation warning for people who deep-require the different algorithm variants. -- Remove builtin support for insecure random number generators in the browser. Users who want that will have to supply their own random number generator function. -- Remove support for generating v3 and v5 UUIDs in Node.js<4.x -- Convert code base to ECMAScript Modules (ESM) and release CommonJS build for node and ESM build for browser bundlers. - -### Features - -- add UMD build to npm package ([#357](https://github.com/uuidjs/uuid/issues/357)) ([4e75adf](https://github.com/uuidjs/uuid/commit/4e75adf435196f28e3fbbe0185d654b5ded7ca2c)), closes [#345](https://github.com/uuidjs/uuid/issues/345) -- add various es module and CommonJS examples ([b238510](https://github.com/uuidjs/uuid/commit/b238510bf352463521f74bab175a3af9b7a42555)) -- ensure that docs are up-to-date in CI ([ee5e77d](https://github.com/uuidjs/uuid/commit/ee5e77db547474f5a8f23d6c857a6d399209986b)) -- hybrid CommonJS & ECMAScript modules build ([a3f078f](https://github.com/uuidjs/uuid/commit/a3f078faa0baff69ab41aed08e041f8f9c8993d0)) -- remove insecure fallback random number generator ([3a5842b](https://github.com/uuidjs/uuid/commit/3a5842b141a6e5de0ae338f391661e6b84b167c9)), closes [#173](https://github.com/uuidjs/uuid/issues/173) -- remove support for pre Node.js v4 Buffer API ([#356](https://github.com/uuidjs/uuid/issues/356)) ([b59b5c5](https://github.com/uuidjs/uuid/commit/b59b5c5ecad271c5453f1a156f011671f6d35627)) -- rename repository to github:uuidjs/uuid ([#351](https://github.com/uuidjs/uuid/issues/351)) ([c37a518](https://github.com/uuidjs/uuid/commit/c37a518e367ac4b6d0aa62dba1bc6ce9e85020f7)), closes [#338](https://github.com/uuidjs/uuid/issues/338) - -### Bug Fixes - -- add deep-require proxies for local testing and adjust tests ([#365](https://github.com/uuidjs/uuid/issues/365)) ([7fedc79](https://github.com/uuidjs/uuid/commit/7fedc79ac8fda4bfd1c566c7f05ef4ac13b2db48)) -- add note about removal of default export ([#372](https://github.com/uuidjs/uuid/issues/372)) ([12749b7](https://github.com/uuidjs/uuid/commit/12749b700eb49db8a9759fd306d8be05dbfbd58c)), closes [#370](https://github.com/uuidjs/uuid/issues/370) -- deprecated deep requiring of the different algorithm versions ([#361](https://github.com/uuidjs/uuid/issues/361)) ([c0bdf15](https://github.com/uuidjs/uuid/commit/c0bdf15e417639b1aeb0b247b2fb11f7a0a26b23)) - -## [3.4.0](https://github.com/uuidjs/uuid/compare/v3.3.3...v3.4.0) (2020-01-16) - -### Features - -- rename repository to github:uuidjs/uuid ([#351](https://github.com/uuidjs/uuid/issues/351)) ([e2d7314](https://github.com/uuidjs/uuid/commit/e2d7314)), closes [#338](https://github.com/uuidjs/uuid/issues/338) - -## [3.3.3](https://github.com/uuidjs/uuid/compare/v3.3.2...v3.3.3) (2019-08-19) - -### Bug Fixes - -- no longer run ci tests on node v4 -- upgrade dependencies - -## [3.3.2](https://github.com/uuidjs/uuid/compare/v3.3.1...v3.3.2) (2018-06-28) - -### Bug Fixes - -- typo ([305d877](https://github.com/uuidjs/uuid/commit/305d877)) - -## [3.3.1](https://github.com/uuidjs/uuid/compare/v3.3.0...v3.3.1) (2018-06-28) - -### Bug Fixes - -- fix [#284](https://github.com/uuidjs/uuid/issues/284) by setting function name in try-catch ([f2a60f2](https://github.com/uuidjs/uuid/commit/f2a60f2)) - -# [3.3.0](https://github.com/uuidjs/uuid/compare/v3.2.1...v3.3.0) (2018-06-22) - -### Bug Fixes - -- assignment to readonly property to allow running in strict mode ([#270](https://github.com/uuidjs/uuid/issues/270)) ([d062fdc](https://github.com/uuidjs/uuid/commit/d062fdc)) -- fix [#229](https://github.com/uuidjs/uuid/issues/229) ([c9684d4](https://github.com/uuidjs/uuid/commit/c9684d4)) -- Get correct version of IE11 crypto ([#274](https://github.com/uuidjs/uuid/issues/274)) ([153d331](https://github.com/uuidjs/uuid/commit/153d331)) -- mem issue when generating uuid ([#267](https://github.com/uuidjs/uuid/issues/267)) ([c47702c](https://github.com/uuidjs/uuid/commit/c47702c)) - -### Features - -- enforce Conventional Commit style commit messages ([#282](https://github.com/uuidjs/uuid/issues/282)) ([cc9a182](https://github.com/uuidjs/uuid/commit/cc9a182)) - -## [3.2.1](https://github.com/uuidjs/uuid/compare/v3.2.0...v3.2.1) (2018-01-16) - -### Bug Fixes - -- use msCrypto if available. Fixes [#241](https://github.com/uuidjs/uuid/issues/241) ([#247](https://github.com/uuidjs/uuid/issues/247)) ([1fef18b](https://github.com/uuidjs/uuid/commit/1fef18b)) - -# [3.2.0](https://github.com/uuidjs/uuid/compare/v3.1.0...v3.2.0) (2018-01-16) - -### Bug Fixes - -- remove mistakenly added typescript dependency, rollback version (standard-version will auto-increment) ([09fa824](https://github.com/uuidjs/uuid/commit/09fa824)) -- use msCrypto if available. Fixes [#241](https://github.com/uuidjs/uuid/issues/241) ([#247](https://github.com/uuidjs/uuid/issues/247)) ([1fef18b](https://github.com/uuidjs/uuid/commit/1fef18b)) - -### Features - -- Add v3 Support ([#217](https://github.com/uuidjs/uuid/issues/217)) ([d94f726](https://github.com/uuidjs/uuid/commit/d94f726)) - -# [3.1.0](https://github.com/uuidjs/uuid/compare/v3.1.0...v3.0.1) (2017-06-17) - -### Bug Fixes - -- (fix) Add .npmignore file to exclude test/ and other non-essential files from packing. (#183) -- Fix typo (#178) -- Simple typo fix (#165) - -### Features - -- v5 support in CLI (#197) -- V5 support (#188) - -# 3.0.1 (2016-11-28) - -- split uuid versions into separate files - -# 3.0.0 (2016-11-17) - -- remove .parse and .unparse - -# 2.0.0 - -- Removed uuid.BufferClass - -# 1.4.0 - -- Improved module context detection -- Removed public RNG functions - -# 1.3.2 - -- Improve tests and handling of v1() options (Issue #24) -- Expose RNG option to allow for perf testing with different generators - -# 1.3.0 - -- Support for version 1 ids, thanks to [@ctavan](https://github.com/ctavan)! -- Support for node.js crypto API -- De-emphasizing performance in favor of a) cryptographic quality PRNGs where available and b) more manageable code diff --git a/PBandGraphScaffold/node_modules/uuid/CONTRIBUTING.md b/PBandGraphScaffold/node_modules/uuid/CONTRIBUTING.md deleted file mode 100644 index 4a4503d..0000000 --- a/PBandGraphScaffold/node_modules/uuid/CONTRIBUTING.md +++ /dev/null @@ -1,18 +0,0 @@ -# Contributing - -Please feel free to file GitHub Issues or propose Pull Requests. We're always happy to discuss improvements to this library! - -## Testing - -```shell -npm test -``` - -## Releasing - -Releases are supposed to be done from master, version bumping is automated through [`standard-version`](https://github.com/conventional-changelog/standard-version): - -```shell -npm run release -- --dry-run # verify output manually -npm run release # follow the instructions from the output of this command -``` diff --git a/PBandGraphScaffold/node_modules/uuid/LICENSE.md b/PBandGraphScaffold/node_modules/uuid/LICENSE.md deleted file mode 100644 index 3934168..0000000 --- a/PBandGraphScaffold/node_modules/uuid/LICENSE.md +++ /dev/null @@ -1,9 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2010-2020 Robert Kieffer and other contributors - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/PBandGraphScaffold/node_modules/uuid/README.md b/PBandGraphScaffold/node_modules/uuid/README.md deleted file mode 100644 index ed27e57..0000000 --- a/PBandGraphScaffold/node_modules/uuid/README.md +++ /dev/null @@ -1,505 +0,0 @@ - - -# uuid [![CI](https://github.com/uuidjs/uuid/workflows/CI/badge.svg)](https://github.com/uuidjs/uuid/actions?query=workflow%3ACI) [![Browser](https://github.com/uuidjs/uuid/workflows/Browser/badge.svg)](https://github.com/uuidjs/uuid/actions?query=workflow%3ABrowser) - -For the creation of [RFC4122](http://www.ietf.org/rfc/rfc4122.txt) UUIDs - -- **Complete** - Support for RFC4122 version 1, 3, 4, and 5 UUIDs -- **Cross-platform** - Support for ... - - CommonJS, [ECMAScript Modules](#ecmascript-modules) and [CDN builds](#cdn-builds) - - Node 8, 10, 12, 14 - - Chrome, Safari, Firefox, Edge, IE 11 browsers - - Webpack and rollup.js module bundlers - - [React Native / Expo](#react-native--expo) -- **Secure** - Cryptographically-strong random values -- **Small** - Zero-dependency, small footprint, plays nice with "tree shaking" packagers -- **CLI** - Includes the [`uuid` command line](#command-line) utility - -**Upgrading from `uuid@3.x`?** Your code is probably okay, but check out [Upgrading From `uuid@3.x`](#upgrading-from-uuid3x) for details. - -## Quickstart - -To create a random UUID... - -**1. Install** - -```shell -npm install uuid -``` - -**2. Create a UUID** (ES6 module syntax) - -```javascript -import { v4 as uuidv4 } from 'uuid'; -uuidv4(); // ⇨ '9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d' -``` - -... or using CommonJS syntax: - -```javascript -const { v4: uuidv4 } = require('uuid'); -uuidv4(); // ⇨ '1b9d6bcd-bbfd-4b2d-9b5d-ab8dfbbd4bed' -``` - -For timestamp UUIDs, namespace UUIDs, and other options read on ... - -## API Summary - -| | | | -| --- | --- | --- | -| [`uuid.NIL`](#uuidnil) | The nil UUID string (all zeros) | New in `uuid@8.3` | -| [`uuid.parse()`](#uuidparsestr) | Convert UUID string to array of bytes | New in `uuid@8.3` | -| [`uuid.stringify()`](#uuidstringifyarr-offset) | Convert array of bytes to UUID string | New in `uuid@8.3` | -| [`uuid.v1()`](#uuidv1options-buffer-offset) | Create a version 1 (timestamp) UUID | | -| [`uuid.v3()`](#uuidv3name-namespace-buffer-offset) | Create a version 3 (namespace w/ MD5) UUID | | -| [`uuid.v4()`](#uuidv4options-buffer-offset) | Create a version 4 (random) UUID | | -| [`uuid.v5()`](#uuidv5name-namespace-buffer-offset) | Create a version 5 (namespace w/ SHA-1) UUID | | -| [`uuid.validate()`](#uuidvalidatestr) | Test a string to see if it is a valid UUID | New in `uuid@8.3` | -| [`uuid.version()`](#uuidversionstr) | Detect RFC version of a UUID | New in `uuid@8.3` | - -## API - -### uuid.NIL - -The nil UUID string (all zeros). - -Example: - -```javascript -import { NIL as NIL_UUID } from 'uuid'; - -NIL_UUID; // ⇨ '00000000-0000-0000-0000-000000000000' -``` - -### uuid.parse(str) - -Convert UUID string to array of bytes - -| | | -| --------- | ---------------------------------------- | -| `str` | A valid UUID `String` | -| _returns_ | `Uint8Array[16]` | -| _throws_ | `TypeError` if `str` is not a valid UUID | - -Note: Ordering of values in the byte arrays used by `parse()` and `stringify()` follows the left ↠ right order of hex-pairs in UUID strings. As shown in the example below. - -Example: - -```javascript -import { parse as uuidParse } from 'uuid'; - -// Parse a UUID -const bytes = uuidParse('6ec0bd7f-11c0-43da-975e-2a8ad9ebae0b'); - -// Convert to hex strings to show byte order (for documentation purposes) -[...bytes].map((v) => v.toString(16).padStart(2, '0')); // ⇨ - // [ - // '6e', 'c0', 'bd', '7f', - // '11', 'c0', '43', 'da', - // '97', '5e', '2a', '8a', - // 'd9', 'eb', 'ae', '0b' - // ] -``` - -### uuid.stringify(arr[, offset]) - -Convert array of bytes to UUID string - -| | | -| -------------- | ---------------------------------------------------------------------------- | -| `arr` | `Array`-like collection of 16 values (starting from `offset`) between 0-255. | -| [`offset` = 0] | `Number` Starting index in the Array | -| _returns_ | `String` | -| _throws_ | `TypeError` if a valid UUID string cannot be generated | - -Note: Ordering of values in the byte arrays used by `parse()` and `stringify()` follows the left ↠ right order of hex-pairs in UUID strings. As shown in the example below. - -Example: - -```javascript -import { stringify as uuidStringify } from 'uuid'; - -const uuidBytes = [ - 0x6e, - 0xc0, - 0xbd, - 0x7f, - 0x11, - 0xc0, - 0x43, - 0xda, - 0x97, - 0x5e, - 0x2a, - 0x8a, - 0xd9, - 0xeb, - 0xae, - 0x0b, -]; - -uuidStringify(uuidBytes); // ⇨ '6ec0bd7f-11c0-43da-975e-2a8ad9ebae0b' -``` - -### uuid.v1([options[, buffer[, offset]]]) - -Create an RFC version 1 (timestamp) UUID - -| | | -| --- | --- | -| [`options`] | `Object` with one or more of the following properties: | -| [`options.node` ] | RFC "node" field as an `Array[6]` of byte values (per 4.1.6) | -| [`options.clockseq`] | RFC "clock sequence" as a `Number` between 0 - 0x3fff | -| [`options.msecs`] | RFC "timestamp" field (`Number` of milliseconds, unix epoch) | -| [`options.nsecs`] | RFC "timestamp" field (`Number` of nanseconds to add to `msecs`, should be 0-10,000) | -| [`options.random`] | `Array` of 16 random bytes (0-255) | -| [`options.rng`] | Alternative to `options.random`, a `Function` that returns an `Array` of 16 random bytes (0-255) | -| [`buffer`] | `Array \| Buffer` If specified, uuid will be written here in byte-form, starting at `offset` | -| [`offset` = 0] | `Number` Index to start writing UUID bytes in `buffer` | -| _returns_ | UUID `String` if no `buffer` is specified, otherwise returns `buffer` | -| _throws_ | `Error` if more than 10M UUIDs/sec are requested | - -Note: The default [node id](https://tools.ietf.org/html/rfc4122#section-4.1.6) (the last 12 digits in the UUID) is generated once, randomly, on process startup, and then remains unchanged for the duration of the process. - -Note: `options.random` and `options.rng` are only meaningful on the very first call to `v1()`, where they may be passed to initialize the internal `node` and `clockseq` fields. - -Example: - -```javascript -import { v1 as uuidv1 } from 'uuid'; - -uuidv1(); // ⇨ '2c5ea4c0-4067-11e9-8bad-9b1deb4d3b7d' -``` - -Example using `options`: - -```javascript -import { v1 as uuidv1 } from 'uuid'; - -const v1options = { - node: [0x01, 0x23, 0x45, 0x67, 0x89, 0xab], - clockseq: 0x1234, - msecs: new Date('2011-11-01').getTime(), - nsecs: 5678, -}; -uuidv1(v1options); // ⇨ '710b962e-041c-11e1-9234-0123456789ab' -``` - -### uuid.v3(name, namespace[, buffer[, offset]]) - -Create an RFC version 3 (namespace w/ MD5) UUID - -API is identical to `v5()`, but uses "v3" instead. - -⚠️ Note: Per the RFC, "_If backward compatibility is not an issue, SHA-1 [Version 5] is preferred_." - -### uuid.v4([options[, buffer[, offset]]]) - -Create an RFC version 4 (random) UUID - -| | | -| --- | --- | -| [`options`] | `Object` with one or more of the following properties: | -| [`options.random`] | `Array` of 16 random bytes (0-255) | -| [`options.rng`] | Alternative to `options.random`, a `Function` that returns an `Array` of 16 random bytes (0-255) | -| [`buffer`] | `Array \| Buffer` If specified, uuid will be written here in byte-form, starting at `offset` | -| [`offset` = 0] | `Number` Index to start writing UUID bytes in `buffer` | -| _returns_ | UUID `String` if no `buffer` is specified, otherwise returns `buffer` | - -Example: - -```javascript -import { v4 as uuidv4 } from 'uuid'; - -uuidv4(); // ⇨ '1b9d6bcd-bbfd-4b2d-9b5d-ab8dfbbd4bed' -``` - -Example using predefined `random` values: - -```javascript -import { v4 as uuidv4 } from 'uuid'; - -const v4options = { - random: [ - 0x10, - 0x91, - 0x56, - 0xbe, - 0xc4, - 0xfb, - 0xc1, - 0xea, - 0x71, - 0xb4, - 0xef, - 0xe1, - 0x67, - 0x1c, - 0x58, - 0x36, - ], -}; -uuidv4(v4options); // ⇨ '109156be-c4fb-41ea-b1b4-efe1671c5836' -``` - -### uuid.v5(name, namespace[, buffer[, offset]]) - -Create an RFC version 5 (namespace w/ SHA-1) UUID - -| | | -| --- | --- | -| `name` | `String \| Array` | -| `namespace` | `String \| Array[16]` Namespace UUID | -| [`buffer`] | `Array \| Buffer` If specified, uuid will be written here in byte-form, starting at `offset` | -| [`offset` = 0] | `Number` Index to start writing UUID bytes in `buffer` | -| _returns_ | UUID `String` if no `buffer` is specified, otherwise returns `buffer` | - -Note: The RFC `DNS` and `URL` namespaces are available as `v5.DNS` and `v5.URL`. - -Example with custom namespace: - -```javascript -import { v5 as uuidv5 } from 'uuid'; - -// Define a custom namespace. Readers, create your own using something like -// https://www.uuidgenerator.net/ -const MY_NAMESPACE = '1b671a64-40d5-491e-99b0-da01ff1f3341'; - -uuidv5('Hello, World!', MY_NAMESPACE); // ⇨ '630eb68f-e0fa-5ecc-887a-7c7a62614681' -``` - -Example with RFC `URL` namespace: - -```javascript -import { v5 as uuidv5 } from 'uuid'; - -uuidv5('https://www.w3.org/', uuidv5.URL); // ⇨ 'c106a26a-21bb-5538-8bf2-57095d1976c1' -``` - -### uuid.validate(str) - -Test a string to see if it is a valid UUID - -| | | -| --------- | --------------------------------------------------- | -| `str` | `String` to validate | -| _returns_ | `true` if string is a valid UUID, `false` otherwise | - -Example: - -```javascript -import { validate as uuidValidate } from 'uuid'; - -uuidValidate('not a UUID'); // ⇨ false -uuidValidate('6ec0bd7f-11c0-43da-975e-2a8ad9ebae0b'); // ⇨ true -``` - -Using `validate` and `version` together it is possible to do per-version validation, e.g. validate for only v4 UUIds. - -```javascript -import { version as uuidVersion } from 'uuid'; -import { validate as uuidValidate } from 'uuid'; - -function uuidValidateV4(uuid) { - return uuidValidate(uuid) && uuidVersion(uuid) === 4; -} - -const v1Uuid = 'd9428888-122b-11e1-b85c-61cd3cbb3210'; -const v4Uuid = '109156be-c4fb-41ea-b1b4-efe1671c5836'; - -uuidValidateV4(v4Uuid); // ⇨ true -uuidValidateV4(v1Uuid); // ⇨ false -``` - -### uuid.version(str) - -Detect RFC version of a UUID - -| | | -| --------- | ---------------------------------------- | -| `str` | A valid UUID `String` | -| _returns_ | `Number` The RFC version of the UUID | -| _throws_ | `TypeError` if `str` is not a valid UUID | - -Example: - -```javascript -import { version as uuidVersion } from 'uuid'; - -uuidVersion('45637ec4-c85f-11ea-87d0-0242ac130003'); // ⇨ 1 -uuidVersion('6ec0bd7f-11c0-43da-975e-2a8ad9ebae0b'); // ⇨ 4 -``` - -## Command Line - -UUIDs can be generated from the command line using `uuid`. - -```shell -$ uuid -ddeb27fb-d9a0-4624-be4d-4615062daed4 -``` - -The default is to generate version 4 UUIDS, however the other versions are supported. Type `uuid --help` for details: - -```shell -$ uuid --help - -Usage: - uuid - uuid v1 - uuid v3 - uuid v4 - uuid v5 - uuid --help - -Note: may be "URL" or "DNS" to use the corresponding UUIDs -defined by RFC4122 -``` - -## ECMAScript Modules - -This library comes with [ECMAScript Modules](https://www.ecma-international.org/ecma-262/6.0/#sec-modules) (ESM) support for Node.js versions that support it ([example](./examples/node-esmodules/)) as well as bundlers like [rollup.js](https://rollupjs.org/guide/en/#tree-shaking) ([example](./examples/browser-rollup/)) and [webpack](https://webpack.js.org/guides/tree-shaking/) ([example](./examples/browser-webpack/)) (targeting both, Node.js and browser environments). - -```javascript -import { v4 as uuidv4 } from 'uuid'; -uuidv4(); // ⇨ '1b9d6bcd-bbfd-4b2d-9b5d-ab8dfbbd4bed' -``` - -To run the examples you must first create a dist build of this library in the module root: - -```shell -npm run build -``` - -## CDN Builds - -### ECMAScript Modules - -To load this module directly into modern browsers that [support loading ECMAScript Modules](https://caniuse.com/#feat=es6-module) you can make use of [jspm](https://jspm.org/): - -```html - -``` - -### UMD - -To load this module directly into older browsers you can use the [UMD (Universal Module Definition)](https://github.com/umdjs/umd) builds from any of the following CDNs: - -**Using [UNPKG](https://unpkg.com/uuid@latest/dist/umd/)**: - -```html - -``` - -**Using [jsDelivr](https://cdn.jsdelivr.net/npm/uuid@latest/dist/umd/)**: - -```html - -``` - -**Using [cdnjs](https://cdnjs.com/libraries/uuid)**: - -```html - -``` - -These CDNs all provide the same [`uuidv4()`](#uuidv4options-buffer-offset) method: - -```html - -``` - -Methods for the other algorithms ([`uuidv1()`](#uuidv1options-buffer-offset), [`uuidv3()`](#uuidv3name-namespace-buffer-offset) and [`uuidv5()`](#uuidv5name-namespace-buffer-offset)) are available from the files `uuidv1.min.js`, `uuidv3.min.js` and `uuidv5.min.js` respectively. - -## "getRandomValues() not supported" - -This error occurs in environments where the standard [`crypto.getRandomValues()`](https://developer.mozilla.org/en-US/docs/Web/API/Crypto/getRandomValues) API is not supported. This issue can be resolved by adding an appropriate polyfill: - -### React Native / Expo - -1. Install [`react-native-get-random-values`](https://github.com/LinusU/react-native-get-random-values#readme) -1. Import it _before_ `uuid`. Since `uuid` might also appear as a transitive dependency of some other imports it's safest to just import `react-native-get-random-values` as the very first thing in your entry point: - -```javascript -import 'react-native-get-random-values'; -import { v4 as uuidv4 } from 'uuid'; -``` - -Note: If you are using Expo, you must be using at least `react-native-get-random-values@1.5.0` and `expo@39.0.0`. - -### Web Workers / Service Workers (Edge <= 18) - -[In Edge <= 18, Web Crypto is not supported in Web Workers or Service Workers](https://caniuse.com/#feat=cryptography) and we are not aware of a polyfill (let us know if you find one, please). - -## Upgrading From `uuid@7.x` - -### Only Named Exports Supported When Using with Node.js ESM - -`uuid@7.x` did not come with native ECMAScript Module (ESM) support for Node.js. Importing it in Node.js ESM consequently imported the CommonJS source with a default export. This library now comes with true Node.js ESM support and only provides named exports. - -Instead of doing: - -```javascript -import uuid from 'uuid'; -uuid.v4(); -``` - -you will now have to use the named exports: - -```javascript -import { v4 as uuidv4 } from 'uuid'; -uuidv4(); -``` - -### Deep Requires No Longer Supported - -Deep requires like `require('uuid/v4')` [which have been deprecated in `uuid@7.x`](#deep-requires-now-deprecated) are no longer supported. - -## Upgrading From `uuid@3.x` - -"_Wait... what happened to `uuid@4.x` - `uuid@6.x`?!?_" - -In order to avoid confusion with RFC [version 4](#uuidv4options-buffer-offset) and [version 5](#uuidv5name-namespace-buffer-offset) UUIDs, and a possible [version 6](http://gh.peabody.io/uuidv6/), releases 4 thru 6 of this module have been skipped. - -### Deep Requires Now Deprecated - -`uuid@3.x` encouraged the use of deep requires to minimize the bundle size of browser builds: - -```javascript -const uuidv4 = require('uuid/v4'); // <== NOW DEPRECATED! -uuidv4(); -``` - -As of `uuid@7.x` this library now provides ECMAScript modules builds, which allow packagers like Webpack and Rollup to do "tree-shaking" to remove dead code. Instead, use the `import` syntax: - -```javascript -import { v4 as uuidv4 } from 'uuid'; -uuidv4(); -``` - -... or for CommonJS: - -```javascript -const { v4: uuidv4 } = require('uuid'); -uuidv4(); -``` - -### Default Export Removed - -`uuid@3.x` was exporting the Version 4 UUID method as a default export: - -```javascript -const uuid = require('uuid'); // <== REMOVED! -``` - -This usage pattern was already discouraged in `uuid@3.x` and has been removed in `uuid@7.x`. - ----- -Markdown generated from [README_js.md](README_js.md) by [![RunMD Logo](http://i.imgur.com/h0FVyzU.png)](https://github.com/broofa/runmd) \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/uuid/dist/bin/uuid b/PBandGraphScaffold/node_modules/uuid/dist/bin/uuid deleted file mode 100755 index f38d2ee..0000000 --- a/PBandGraphScaffold/node_modules/uuid/dist/bin/uuid +++ /dev/null @@ -1,2 +0,0 @@ -#!/usr/bin/env node -require('../uuid-bin'); diff --git a/PBandGraphScaffold/node_modules/uuid/dist/esm-browser/index.js b/PBandGraphScaffold/node_modules/uuid/dist/esm-browser/index.js deleted file mode 100644 index 1db6f6d..0000000 --- a/PBandGraphScaffold/node_modules/uuid/dist/esm-browser/index.js +++ /dev/null @@ -1,9 +0,0 @@ -export { default as v1 } from './v1.js'; -export { default as v3 } from './v3.js'; -export { default as v4 } from './v4.js'; -export { default as v5 } from './v5.js'; -export { default as NIL } from './nil.js'; -export { default as version } from './version.js'; -export { default as validate } from './validate.js'; -export { default as stringify } from './stringify.js'; -export { default as parse } from './parse.js'; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/uuid/dist/esm-browser/md5.js b/PBandGraphScaffold/node_modules/uuid/dist/esm-browser/md5.js deleted file mode 100644 index 8b5d46a..0000000 --- a/PBandGraphScaffold/node_modules/uuid/dist/esm-browser/md5.js +++ /dev/null @@ -1,215 +0,0 @@ -/* - * Browser-compatible JavaScript MD5 - * - * Modification of JavaScript MD5 - * https://github.com/blueimp/JavaScript-MD5 - * - * Copyright 2011, Sebastian Tschan - * https://blueimp.net - * - * Licensed under the MIT license: - * https://opensource.org/licenses/MIT - * - * Based on - * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message - * Digest Algorithm, as defined in RFC 1321. - * Version 2.2 Copyright (C) Paul Johnston 1999 - 2009 - * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet - * Distributed under the BSD License - * See http://pajhome.org.uk/crypt/md5 for more info. - */ -function md5(bytes) { - if (typeof bytes === 'string') { - var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape - - bytes = new Uint8Array(msg.length); - - for (var i = 0; i < msg.length; ++i) { - bytes[i] = msg.charCodeAt(i); - } - } - - return md5ToHexEncodedArray(wordsToMd5(bytesToWords(bytes), bytes.length * 8)); -} -/* - * Convert an array of little-endian words to an array of bytes - */ - - -function md5ToHexEncodedArray(input) { - var output = []; - var length32 = input.length * 32; - var hexTab = '0123456789abcdef'; - - for (var i = 0; i < length32; i += 8) { - var x = input[i >> 5] >>> i % 32 & 0xff; - var hex = parseInt(hexTab.charAt(x >>> 4 & 0x0f) + hexTab.charAt(x & 0x0f), 16); - output.push(hex); - } - - return output; -} -/** - * Calculate output length with padding and bit length - */ - - -function getOutputLength(inputLength8) { - return (inputLength8 + 64 >>> 9 << 4) + 14 + 1; -} -/* - * Calculate the MD5 of an array of little-endian words, and a bit length. - */ - - -function wordsToMd5(x, len) { - /* append padding */ - x[len >> 5] |= 0x80 << len % 32; - x[getOutputLength(len) - 1] = len; - var a = 1732584193; - var b = -271733879; - var c = -1732584194; - var d = 271733878; - - for (var i = 0; i < x.length; i += 16) { - var olda = a; - var oldb = b; - var oldc = c; - var oldd = d; - a = md5ff(a, b, c, d, x[i], 7, -680876936); - d = md5ff(d, a, b, c, x[i + 1], 12, -389564586); - c = md5ff(c, d, a, b, x[i + 2], 17, 606105819); - b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330); - a = md5ff(a, b, c, d, x[i + 4], 7, -176418897); - d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426); - c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341); - b = md5ff(b, c, d, a, x[i + 7], 22, -45705983); - a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416); - d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417); - c = md5ff(c, d, a, b, x[i + 10], 17, -42063); - b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162); - a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682); - d = md5ff(d, a, b, c, x[i + 13], 12, -40341101); - c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290); - b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329); - a = md5gg(a, b, c, d, x[i + 1], 5, -165796510); - d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632); - c = md5gg(c, d, a, b, x[i + 11], 14, 643717713); - b = md5gg(b, c, d, a, x[i], 20, -373897302); - a = md5gg(a, b, c, d, x[i + 5], 5, -701558691); - d = md5gg(d, a, b, c, x[i + 10], 9, 38016083); - c = md5gg(c, d, a, b, x[i + 15], 14, -660478335); - b = md5gg(b, c, d, a, x[i + 4], 20, -405537848); - a = md5gg(a, b, c, d, x[i + 9], 5, 568446438); - d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690); - c = md5gg(c, d, a, b, x[i + 3], 14, -187363961); - b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501); - a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467); - d = md5gg(d, a, b, c, x[i + 2], 9, -51403784); - c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473); - b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734); - a = md5hh(a, b, c, d, x[i + 5], 4, -378558); - d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463); - c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562); - b = md5hh(b, c, d, a, x[i + 14], 23, -35309556); - a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060); - d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353); - c = md5hh(c, d, a, b, x[i + 7], 16, -155497632); - b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640); - a = md5hh(a, b, c, d, x[i + 13], 4, 681279174); - d = md5hh(d, a, b, c, x[i], 11, -358537222); - c = md5hh(c, d, a, b, x[i + 3], 16, -722521979); - b = md5hh(b, c, d, a, x[i + 6], 23, 76029189); - a = md5hh(a, b, c, d, x[i + 9], 4, -640364487); - d = md5hh(d, a, b, c, x[i + 12], 11, -421815835); - c = md5hh(c, d, a, b, x[i + 15], 16, 530742520); - b = md5hh(b, c, d, a, x[i + 2], 23, -995338651); - a = md5ii(a, b, c, d, x[i], 6, -198630844); - d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415); - c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905); - b = md5ii(b, c, d, a, x[i + 5], 21, -57434055); - a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571); - d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606); - c = md5ii(c, d, a, b, x[i + 10], 15, -1051523); - b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799); - a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359); - d = md5ii(d, a, b, c, x[i + 15], 10, -30611744); - c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380); - b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649); - a = md5ii(a, b, c, d, x[i + 4], 6, -145523070); - d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379); - c = md5ii(c, d, a, b, x[i + 2], 15, 718787259); - b = md5ii(b, c, d, a, x[i + 9], 21, -343485551); - a = safeAdd(a, olda); - b = safeAdd(b, oldb); - c = safeAdd(c, oldc); - d = safeAdd(d, oldd); - } - - return [a, b, c, d]; -} -/* - * Convert an array bytes to an array of little-endian words - * Characters >255 have their high-byte silently ignored. - */ - - -function bytesToWords(input) { - if (input.length === 0) { - return []; - } - - var length8 = input.length * 8; - var output = new Uint32Array(getOutputLength(length8)); - - for (var i = 0; i < length8; i += 8) { - output[i >> 5] |= (input[i / 8] & 0xff) << i % 32; - } - - return output; -} -/* - * Add integers, wrapping at 2^32. This uses 16-bit operations internally - * to work around bugs in some JS interpreters. - */ - - -function safeAdd(x, y) { - var lsw = (x & 0xffff) + (y & 0xffff); - var msw = (x >> 16) + (y >> 16) + (lsw >> 16); - return msw << 16 | lsw & 0xffff; -} -/* - * Bitwise rotate a 32-bit number to the left. - */ - - -function bitRotateLeft(num, cnt) { - return num << cnt | num >>> 32 - cnt; -} -/* - * These functions implement the four basic operations the algorithm uses. - */ - - -function md5cmn(q, a, b, x, s, t) { - return safeAdd(bitRotateLeft(safeAdd(safeAdd(a, q), safeAdd(x, t)), s), b); -} - -function md5ff(a, b, c, d, x, s, t) { - return md5cmn(b & c | ~b & d, a, b, x, s, t); -} - -function md5gg(a, b, c, d, x, s, t) { - return md5cmn(b & d | c & ~d, a, b, x, s, t); -} - -function md5hh(a, b, c, d, x, s, t) { - return md5cmn(b ^ c ^ d, a, b, x, s, t); -} - -function md5ii(a, b, c, d, x, s, t) { - return md5cmn(c ^ (b | ~d), a, b, x, s, t); -} - -export default md5; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/uuid/dist/esm-browser/nil.js b/PBandGraphScaffold/node_modules/uuid/dist/esm-browser/nil.js deleted file mode 100644 index b36324c..0000000 --- a/PBandGraphScaffold/node_modules/uuid/dist/esm-browser/nil.js +++ /dev/null @@ -1 +0,0 @@ -export default '00000000-0000-0000-0000-000000000000'; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/uuid/dist/esm-browser/parse.js b/PBandGraphScaffold/node_modules/uuid/dist/esm-browser/parse.js deleted file mode 100644 index 7c5b1d5..0000000 --- a/PBandGraphScaffold/node_modules/uuid/dist/esm-browser/parse.js +++ /dev/null @@ -1,35 +0,0 @@ -import validate from './validate.js'; - -function parse(uuid) { - if (!validate(uuid)) { - throw TypeError('Invalid UUID'); - } - - var v; - var arr = new Uint8Array(16); // Parse ########-....-....-....-............ - - arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24; - arr[1] = v >>> 16 & 0xff; - arr[2] = v >>> 8 & 0xff; - arr[3] = v & 0xff; // Parse ........-####-....-....-............ - - arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8; - arr[5] = v & 0xff; // Parse ........-....-####-....-............ - - arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8; - arr[7] = v & 0xff; // Parse ........-....-....-####-............ - - arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8; - arr[9] = v & 0xff; // Parse ........-....-....-....-############ - // (Use "/" to avoid 32-bit truncation when bit-shifting high-order bytes) - - arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff; - arr[11] = v / 0x100000000 & 0xff; - arr[12] = v >>> 24 & 0xff; - arr[13] = v >>> 16 & 0xff; - arr[14] = v >>> 8 & 0xff; - arr[15] = v & 0xff; - return arr; -} - -export default parse; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/uuid/dist/esm-browser/regex.js b/PBandGraphScaffold/node_modules/uuid/dist/esm-browser/regex.js deleted file mode 100644 index 3da8673..0000000 --- a/PBandGraphScaffold/node_modules/uuid/dist/esm-browser/regex.js +++ /dev/null @@ -1 +0,0 @@ -export default /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/uuid/dist/esm-browser/rng.js b/PBandGraphScaffold/node_modules/uuid/dist/esm-browser/rng.js deleted file mode 100644 index 8abbf2e..0000000 --- a/PBandGraphScaffold/node_modules/uuid/dist/esm-browser/rng.js +++ /dev/null @@ -1,19 +0,0 @@ -// Unique ID creation requires a high quality random # generator. In the browser we therefore -// require the crypto API and do not support built-in fallback to lower quality random number -// generators (like Math.random()). -var getRandomValues; -var rnds8 = new Uint8Array(16); -export default function rng() { - // lazy load so that environments that need to polyfill have a chance to do so - if (!getRandomValues) { - // getRandomValues needs to be invoked in a context where "this" is a Crypto implementation. Also, - // find the complete implementation of crypto (msCrypto) on IE11. - getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== 'undefined' && typeof msCrypto.getRandomValues === 'function' && msCrypto.getRandomValues.bind(msCrypto); - - if (!getRandomValues) { - throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported'); - } - } - - return getRandomValues(rnds8); -} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/uuid/dist/esm-browser/sha1.js b/PBandGraphScaffold/node_modules/uuid/dist/esm-browser/sha1.js deleted file mode 100644 index 940548b..0000000 --- a/PBandGraphScaffold/node_modules/uuid/dist/esm-browser/sha1.js +++ /dev/null @@ -1,96 +0,0 @@ -// Adapted from Chris Veness' SHA1 code at -// http://www.movable-type.co.uk/scripts/sha1.html -function f(s, x, y, z) { - switch (s) { - case 0: - return x & y ^ ~x & z; - - case 1: - return x ^ y ^ z; - - case 2: - return x & y ^ x & z ^ y & z; - - case 3: - return x ^ y ^ z; - } -} - -function ROTL(x, n) { - return x << n | x >>> 32 - n; -} - -function sha1(bytes) { - var K = [0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62c1d6]; - var H = [0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0]; - - if (typeof bytes === 'string') { - var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape - - bytes = []; - - for (var i = 0; i < msg.length; ++i) { - bytes.push(msg.charCodeAt(i)); - } - } else if (!Array.isArray(bytes)) { - // Convert Array-like to Array - bytes = Array.prototype.slice.call(bytes); - } - - bytes.push(0x80); - var l = bytes.length / 4 + 2; - var N = Math.ceil(l / 16); - var M = new Array(N); - - for (var _i = 0; _i < N; ++_i) { - var arr = new Uint32Array(16); - - for (var j = 0; j < 16; ++j) { - arr[j] = bytes[_i * 64 + j * 4] << 24 | bytes[_i * 64 + j * 4 + 1] << 16 | bytes[_i * 64 + j * 4 + 2] << 8 | bytes[_i * 64 + j * 4 + 3]; - } - - M[_i] = arr; - } - - M[N - 1][14] = (bytes.length - 1) * 8 / Math.pow(2, 32); - M[N - 1][14] = Math.floor(M[N - 1][14]); - M[N - 1][15] = (bytes.length - 1) * 8 & 0xffffffff; - - for (var _i2 = 0; _i2 < N; ++_i2) { - var W = new Uint32Array(80); - - for (var t = 0; t < 16; ++t) { - W[t] = M[_i2][t]; - } - - for (var _t = 16; _t < 80; ++_t) { - W[_t] = ROTL(W[_t - 3] ^ W[_t - 8] ^ W[_t - 14] ^ W[_t - 16], 1); - } - - var a = H[0]; - var b = H[1]; - var c = H[2]; - var d = H[3]; - var e = H[4]; - - for (var _t2 = 0; _t2 < 80; ++_t2) { - var s = Math.floor(_t2 / 20); - var T = ROTL(a, 5) + f(s, b, c, d) + e + K[s] + W[_t2] >>> 0; - e = d; - d = c; - c = ROTL(b, 30) >>> 0; - b = a; - a = T; - } - - H[0] = H[0] + a >>> 0; - H[1] = H[1] + b >>> 0; - H[2] = H[2] + c >>> 0; - H[3] = H[3] + d >>> 0; - H[4] = H[4] + e >>> 0; - } - - return [H[0] >> 24 & 0xff, H[0] >> 16 & 0xff, H[0] >> 8 & 0xff, H[0] & 0xff, H[1] >> 24 & 0xff, H[1] >> 16 & 0xff, H[1] >> 8 & 0xff, H[1] & 0xff, H[2] >> 24 & 0xff, H[2] >> 16 & 0xff, H[2] >> 8 & 0xff, H[2] & 0xff, H[3] >> 24 & 0xff, H[3] >> 16 & 0xff, H[3] >> 8 & 0xff, H[3] & 0xff, H[4] >> 24 & 0xff, H[4] >> 16 & 0xff, H[4] >> 8 & 0xff, H[4] & 0xff]; -} - -export default sha1; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/uuid/dist/esm-browser/stringify.js b/PBandGraphScaffold/node_modules/uuid/dist/esm-browser/stringify.js deleted file mode 100644 index 3102111..0000000 --- a/PBandGraphScaffold/node_modules/uuid/dist/esm-browser/stringify.js +++ /dev/null @@ -1,30 +0,0 @@ -import validate from './validate.js'; -/** - * Convert array of 16 byte values to UUID string format of the form: - * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX - */ - -var byteToHex = []; - -for (var i = 0; i < 256; ++i) { - byteToHex.push((i + 0x100).toString(16).substr(1)); -} - -function stringify(arr) { - var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; - // Note: Be careful editing this code! It's been tuned for performance - // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434 - var uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one - // of the following: - // - One or more input array values don't map to a hex octet (leading to - // "undefined" in the uuid) - // - Invalid input values for the RFC `version` or `variant` fields - - if (!validate(uuid)) { - throw TypeError('Stringified UUID is invalid'); - } - - return uuid; -} - -export default stringify; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/uuid/dist/esm-browser/v1.js b/PBandGraphScaffold/node_modules/uuid/dist/esm-browser/v1.js deleted file mode 100644 index 1a22591..0000000 --- a/PBandGraphScaffold/node_modules/uuid/dist/esm-browser/v1.js +++ /dev/null @@ -1,95 +0,0 @@ -import rng from './rng.js'; -import stringify from './stringify.js'; // **`v1()` - Generate time-based UUID** -// -// Inspired by https://github.com/LiosK/UUID.js -// and http://docs.python.org/library/uuid.html - -var _nodeId; - -var _clockseq; // Previous uuid creation time - - -var _lastMSecs = 0; -var _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details - -function v1(options, buf, offset) { - var i = buf && offset || 0; - var b = buf || new Array(16); - options = options || {}; - var node = options.node || _nodeId; - var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not - // specified. We do this lazily to minimize issues related to insufficient - // system entropy. See #189 - - if (node == null || clockseq == null) { - var seedBytes = options.random || (options.rng || rng)(); - - if (node == null) { - // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1) - node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]]; - } - - if (clockseq == null) { - // Per 4.2.2, randomize (14 bit) clockseq - clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff; - } - } // UUID timestamps are 100 nano-second units since the Gregorian epoch, - // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so - // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs' - // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00. - - - var msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock - // cycle to simulate higher resolution clock - - var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs) - - var dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression - - if (dt < 0 && options.clockseq === undefined) { - clockseq = clockseq + 1 & 0x3fff; - } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new - // time interval - - - if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) { - nsecs = 0; - } // Per 4.2.1.2 Throw error if too many uuids are requested - - - if (nsecs >= 10000) { - throw new Error("uuid.v1(): Can't create more than 10M uuids/sec"); - } - - _lastMSecs = msecs; - _lastNSecs = nsecs; - _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch - - msecs += 12219292800000; // `time_low` - - var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000; - b[i++] = tl >>> 24 & 0xff; - b[i++] = tl >>> 16 & 0xff; - b[i++] = tl >>> 8 & 0xff; - b[i++] = tl & 0xff; // `time_mid` - - var tmh = msecs / 0x100000000 * 10000 & 0xfffffff; - b[i++] = tmh >>> 8 & 0xff; - b[i++] = tmh & 0xff; // `time_high_and_version` - - b[i++] = tmh >>> 24 & 0xf | 0x10; // include version - - b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant) - - b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low` - - b[i++] = clockseq & 0xff; // `node` - - for (var n = 0; n < 6; ++n) { - b[i + n] = node[n]; - } - - return buf || stringify(b); -} - -export default v1; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/uuid/dist/esm-browser/v3.js b/PBandGraphScaffold/node_modules/uuid/dist/esm-browser/v3.js deleted file mode 100644 index c9ab9a4..0000000 --- a/PBandGraphScaffold/node_modules/uuid/dist/esm-browser/v3.js +++ /dev/null @@ -1,4 +0,0 @@ -import v35 from './v35.js'; -import md5 from './md5.js'; -var v3 = v35('v3', 0x30, md5); -export default v3; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/uuid/dist/esm-browser/v35.js b/PBandGraphScaffold/node_modules/uuid/dist/esm-browser/v35.js deleted file mode 100644 index 31dd8a1..0000000 --- a/PBandGraphScaffold/node_modules/uuid/dist/esm-browser/v35.js +++ /dev/null @@ -1,64 +0,0 @@ -import stringify from './stringify.js'; -import parse from './parse.js'; - -function stringToBytes(str) { - str = unescape(encodeURIComponent(str)); // UTF8 escape - - var bytes = []; - - for (var i = 0; i < str.length; ++i) { - bytes.push(str.charCodeAt(i)); - } - - return bytes; -} - -export var DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8'; -export var URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8'; -export default function (name, version, hashfunc) { - function generateUUID(value, namespace, buf, offset) { - if (typeof value === 'string') { - value = stringToBytes(value); - } - - if (typeof namespace === 'string') { - namespace = parse(namespace); - } - - if (namespace.length !== 16) { - throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)'); - } // Compute hash of namespace and value, Per 4.3 - // Future: Use spread syntax when supported on all platforms, e.g. `bytes = - // hashfunc([...namespace, ... value])` - - - var bytes = new Uint8Array(16 + value.length); - bytes.set(namespace); - bytes.set(value, namespace.length); - bytes = hashfunc(bytes); - bytes[6] = bytes[6] & 0x0f | version; - bytes[8] = bytes[8] & 0x3f | 0x80; - - if (buf) { - offset = offset || 0; - - for (var i = 0; i < 16; ++i) { - buf[offset + i] = bytes[i]; - } - - return buf; - } - - return stringify(bytes); - } // Function#name is not settable on some platforms (#270) - - - try { - generateUUID.name = name; // eslint-disable-next-line no-empty - } catch (err) {} // For CommonJS default export support - - - generateUUID.DNS = DNS; - generateUUID.URL = URL; - return generateUUID; -} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/uuid/dist/esm-browser/v4.js b/PBandGraphScaffold/node_modules/uuid/dist/esm-browser/v4.js deleted file mode 100644 index 404810a..0000000 --- a/PBandGraphScaffold/node_modules/uuid/dist/esm-browser/v4.js +++ /dev/null @@ -1,24 +0,0 @@ -import rng from './rng.js'; -import stringify from './stringify.js'; - -function v4(options, buf, offset) { - options = options || {}; - var rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` - - rnds[6] = rnds[6] & 0x0f | 0x40; - rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided - - if (buf) { - offset = offset || 0; - - for (var i = 0; i < 16; ++i) { - buf[offset + i] = rnds[i]; - } - - return buf; - } - - return stringify(rnds); -} - -export default v4; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/uuid/dist/esm-browser/v5.js b/PBandGraphScaffold/node_modules/uuid/dist/esm-browser/v5.js deleted file mode 100644 index c08d96b..0000000 --- a/PBandGraphScaffold/node_modules/uuid/dist/esm-browser/v5.js +++ /dev/null @@ -1,4 +0,0 @@ -import v35 from './v35.js'; -import sha1 from './sha1.js'; -var v5 = v35('v5', 0x50, sha1); -export default v5; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/uuid/dist/esm-browser/validate.js b/PBandGraphScaffold/node_modules/uuid/dist/esm-browser/validate.js deleted file mode 100644 index f1cdc7a..0000000 --- a/PBandGraphScaffold/node_modules/uuid/dist/esm-browser/validate.js +++ /dev/null @@ -1,7 +0,0 @@ -import REGEX from './regex.js'; - -function validate(uuid) { - return typeof uuid === 'string' && REGEX.test(uuid); -} - -export default validate; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/uuid/dist/esm-browser/version.js b/PBandGraphScaffold/node_modules/uuid/dist/esm-browser/version.js deleted file mode 100644 index 77530e9..0000000 --- a/PBandGraphScaffold/node_modules/uuid/dist/esm-browser/version.js +++ /dev/null @@ -1,11 +0,0 @@ -import validate from './validate.js'; - -function version(uuid) { - if (!validate(uuid)) { - throw TypeError('Invalid UUID'); - } - - return parseInt(uuid.substr(14, 1), 16); -} - -export default version; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/uuid/dist/esm-node/index.js b/PBandGraphScaffold/node_modules/uuid/dist/esm-node/index.js deleted file mode 100644 index 1db6f6d..0000000 --- a/PBandGraphScaffold/node_modules/uuid/dist/esm-node/index.js +++ /dev/null @@ -1,9 +0,0 @@ -export { default as v1 } from './v1.js'; -export { default as v3 } from './v3.js'; -export { default as v4 } from './v4.js'; -export { default as v5 } from './v5.js'; -export { default as NIL } from './nil.js'; -export { default as version } from './version.js'; -export { default as validate } from './validate.js'; -export { default as stringify } from './stringify.js'; -export { default as parse } from './parse.js'; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/uuid/dist/esm-node/md5.js b/PBandGraphScaffold/node_modules/uuid/dist/esm-node/md5.js deleted file mode 100644 index 4d68b04..0000000 --- a/PBandGraphScaffold/node_modules/uuid/dist/esm-node/md5.js +++ /dev/null @@ -1,13 +0,0 @@ -import crypto from 'crypto'; - -function md5(bytes) { - if (Array.isArray(bytes)) { - bytes = Buffer.from(bytes); - } else if (typeof bytes === 'string') { - bytes = Buffer.from(bytes, 'utf8'); - } - - return crypto.createHash('md5').update(bytes).digest(); -} - -export default md5; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/uuid/dist/esm-node/nil.js b/PBandGraphScaffold/node_modules/uuid/dist/esm-node/nil.js deleted file mode 100644 index b36324c..0000000 --- a/PBandGraphScaffold/node_modules/uuid/dist/esm-node/nil.js +++ /dev/null @@ -1 +0,0 @@ -export default '00000000-0000-0000-0000-000000000000'; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/uuid/dist/esm-node/parse.js b/PBandGraphScaffold/node_modules/uuid/dist/esm-node/parse.js deleted file mode 100644 index 6421c5d..0000000 --- a/PBandGraphScaffold/node_modules/uuid/dist/esm-node/parse.js +++ /dev/null @@ -1,35 +0,0 @@ -import validate from './validate.js'; - -function parse(uuid) { - if (!validate(uuid)) { - throw TypeError('Invalid UUID'); - } - - let v; - const arr = new Uint8Array(16); // Parse ########-....-....-....-............ - - arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24; - arr[1] = v >>> 16 & 0xff; - arr[2] = v >>> 8 & 0xff; - arr[3] = v & 0xff; // Parse ........-####-....-....-............ - - arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8; - arr[5] = v & 0xff; // Parse ........-....-####-....-............ - - arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8; - arr[7] = v & 0xff; // Parse ........-....-....-####-............ - - arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8; - arr[9] = v & 0xff; // Parse ........-....-....-....-############ - // (Use "/" to avoid 32-bit truncation when bit-shifting high-order bytes) - - arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff; - arr[11] = v / 0x100000000 & 0xff; - arr[12] = v >>> 24 & 0xff; - arr[13] = v >>> 16 & 0xff; - arr[14] = v >>> 8 & 0xff; - arr[15] = v & 0xff; - return arr; -} - -export default parse; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/uuid/dist/esm-node/regex.js b/PBandGraphScaffold/node_modules/uuid/dist/esm-node/regex.js deleted file mode 100644 index 3da8673..0000000 --- a/PBandGraphScaffold/node_modules/uuid/dist/esm-node/regex.js +++ /dev/null @@ -1 +0,0 @@ -export default /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/uuid/dist/esm-node/rng.js b/PBandGraphScaffold/node_modules/uuid/dist/esm-node/rng.js deleted file mode 100644 index 8006244..0000000 --- a/PBandGraphScaffold/node_modules/uuid/dist/esm-node/rng.js +++ /dev/null @@ -1,12 +0,0 @@ -import crypto from 'crypto'; -const rnds8Pool = new Uint8Array(256); // # of random values to pre-allocate - -let poolPtr = rnds8Pool.length; -export default function rng() { - if (poolPtr > rnds8Pool.length - 16) { - crypto.randomFillSync(rnds8Pool); - poolPtr = 0; - } - - return rnds8Pool.slice(poolPtr, poolPtr += 16); -} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/uuid/dist/esm-node/sha1.js b/PBandGraphScaffold/node_modules/uuid/dist/esm-node/sha1.js deleted file mode 100644 index e23850b..0000000 --- a/PBandGraphScaffold/node_modules/uuid/dist/esm-node/sha1.js +++ /dev/null @@ -1,13 +0,0 @@ -import crypto from 'crypto'; - -function sha1(bytes) { - if (Array.isArray(bytes)) { - bytes = Buffer.from(bytes); - } else if (typeof bytes === 'string') { - bytes = Buffer.from(bytes, 'utf8'); - } - - return crypto.createHash('sha1').update(bytes).digest(); -} - -export default sha1; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/uuid/dist/esm-node/stringify.js b/PBandGraphScaffold/node_modules/uuid/dist/esm-node/stringify.js deleted file mode 100644 index f9bca12..0000000 --- a/PBandGraphScaffold/node_modules/uuid/dist/esm-node/stringify.js +++ /dev/null @@ -1,29 +0,0 @@ -import validate from './validate.js'; -/** - * Convert array of 16 byte values to UUID string format of the form: - * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX - */ - -const byteToHex = []; - -for (let i = 0; i < 256; ++i) { - byteToHex.push((i + 0x100).toString(16).substr(1)); -} - -function stringify(arr, offset = 0) { - // Note: Be careful editing this code! It's been tuned for performance - // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434 - const uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one - // of the following: - // - One or more input array values don't map to a hex octet (leading to - // "undefined" in the uuid) - // - Invalid input values for the RFC `version` or `variant` fields - - if (!validate(uuid)) { - throw TypeError('Stringified UUID is invalid'); - } - - return uuid; -} - -export default stringify; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/uuid/dist/esm-node/v1.js b/PBandGraphScaffold/node_modules/uuid/dist/esm-node/v1.js deleted file mode 100644 index ebf81ac..0000000 --- a/PBandGraphScaffold/node_modules/uuid/dist/esm-node/v1.js +++ /dev/null @@ -1,95 +0,0 @@ -import rng from './rng.js'; -import stringify from './stringify.js'; // **`v1()` - Generate time-based UUID** -// -// Inspired by https://github.com/LiosK/UUID.js -// and http://docs.python.org/library/uuid.html - -let _nodeId; - -let _clockseq; // Previous uuid creation time - - -let _lastMSecs = 0; -let _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details - -function v1(options, buf, offset) { - let i = buf && offset || 0; - const b = buf || new Array(16); - options = options || {}; - let node = options.node || _nodeId; - let clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not - // specified. We do this lazily to minimize issues related to insufficient - // system entropy. See #189 - - if (node == null || clockseq == null) { - const seedBytes = options.random || (options.rng || rng)(); - - if (node == null) { - // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1) - node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]]; - } - - if (clockseq == null) { - // Per 4.2.2, randomize (14 bit) clockseq - clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff; - } - } // UUID timestamps are 100 nano-second units since the Gregorian epoch, - // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so - // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs' - // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00. - - - let msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock - // cycle to simulate higher resolution clock - - let nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs) - - const dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression - - if (dt < 0 && options.clockseq === undefined) { - clockseq = clockseq + 1 & 0x3fff; - } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new - // time interval - - - if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) { - nsecs = 0; - } // Per 4.2.1.2 Throw error if too many uuids are requested - - - if (nsecs >= 10000) { - throw new Error("uuid.v1(): Can't create more than 10M uuids/sec"); - } - - _lastMSecs = msecs; - _lastNSecs = nsecs; - _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch - - msecs += 12219292800000; // `time_low` - - const tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000; - b[i++] = tl >>> 24 & 0xff; - b[i++] = tl >>> 16 & 0xff; - b[i++] = tl >>> 8 & 0xff; - b[i++] = tl & 0xff; // `time_mid` - - const tmh = msecs / 0x100000000 * 10000 & 0xfffffff; - b[i++] = tmh >>> 8 & 0xff; - b[i++] = tmh & 0xff; // `time_high_and_version` - - b[i++] = tmh >>> 24 & 0xf | 0x10; // include version - - b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant) - - b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low` - - b[i++] = clockseq & 0xff; // `node` - - for (let n = 0; n < 6; ++n) { - b[i + n] = node[n]; - } - - return buf || stringify(b); -} - -export default v1; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/uuid/dist/esm-node/v3.js b/PBandGraphScaffold/node_modules/uuid/dist/esm-node/v3.js deleted file mode 100644 index 09063b8..0000000 --- a/PBandGraphScaffold/node_modules/uuid/dist/esm-node/v3.js +++ /dev/null @@ -1,4 +0,0 @@ -import v35 from './v35.js'; -import md5 from './md5.js'; -const v3 = v35('v3', 0x30, md5); -export default v3; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/uuid/dist/esm-node/v35.js b/PBandGraphScaffold/node_modules/uuid/dist/esm-node/v35.js deleted file mode 100644 index 22f6a19..0000000 --- a/PBandGraphScaffold/node_modules/uuid/dist/esm-node/v35.js +++ /dev/null @@ -1,64 +0,0 @@ -import stringify from './stringify.js'; -import parse from './parse.js'; - -function stringToBytes(str) { - str = unescape(encodeURIComponent(str)); // UTF8 escape - - const bytes = []; - - for (let i = 0; i < str.length; ++i) { - bytes.push(str.charCodeAt(i)); - } - - return bytes; -} - -export const DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8'; -export const URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8'; -export default function (name, version, hashfunc) { - function generateUUID(value, namespace, buf, offset) { - if (typeof value === 'string') { - value = stringToBytes(value); - } - - if (typeof namespace === 'string') { - namespace = parse(namespace); - } - - if (namespace.length !== 16) { - throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)'); - } // Compute hash of namespace and value, Per 4.3 - // Future: Use spread syntax when supported on all platforms, e.g. `bytes = - // hashfunc([...namespace, ... value])` - - - let bytes = new Uint8Array(16 + value.length); - bytes.set(namespace); - bytes.set(value, namespace.length); - bytes = hashfunc(bytes); - bytes[6] = bytes[6] & 0x0f | version; - bytes[8] = bytes[8] & 0x3f | 0x80; - - if (buf) { - offset = offset || 0; - - for (let i = 0; i < 16; ++i) { - buf[offset + i] = bytes[i]; - } - - return buf; - } - - return stringify(bytes); - } // Function#name is not settable on some platforms (#270) - - - try { - generateUUID.name = name; // eslint-disable-next-line no-empty - } catch (err) {} // For CommonJS default export support - - - generateUUID.DNS = DNS; - generateUUID.URL = URL; - return generateUUID; -} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/uuid/dist/esm-node/v4.js b/PBandGraphScaffold/node_modules/uuid/dist/esm-node/v4.js deleted file mode 100644 index efad926..0000000 --- a/PBandGraphScaffold/node_modules/uuid/dist/esm-node/v4.js +++ /dev/null @@ -1,24 +0,0 @@ -import rng from './rng.js'; -import stringify from './stringify.js'; - -function v4(options, buf, offset) { - options = options || {}; - const rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` - - rnds[6] = rnds[6] & 0x0f | 0x40; - rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided - - if (buf) { - offset = offset || 0; - - for (let i = 0; i < 16; ++i) { - buf[offset + i] = rnds[i]; - } - - return buf; - } - - return stringify(rnds); -} - -export default v4; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/uuid/dist/esm-node/v5.js b/PBandGraphScaffold/node_modules/uuid/dist/esm-node/v5.js deleted file mode 100644 index e87fe31..0000000 --- a/PBandGraphScaffold/node_modules/uuid/dist/esm-node/v5.js +++ /dev/null @@ -1,4 +0,0 @@ -import v35 from './v35.js'; -import sha1 from './sha1.js'; -const v5 = v35('v5', 0x50, sha1); -export default v5; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/uuid/dist/esm-node/validate.js b/PBandGraphScaffold/node_modules/uuid/dist/esm-node/validate.js deleted file mode 100644 index f1cdc7a..0000000 --- a/PBandGraphScaffold/node_modules/uuid/dist/esm-node/validate.js +++ /dev/null @@ -1,7 +0,0 @@ -import REGEX from './regex.js'; - -function validate(uuid) { - return typeof uuid === 'string' && REGEX.test(uuid); -} - -export default validate; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/uuid/dist/esm-node/version.js b/PBandGraphScaffold/node_modules/uuid/dist/esm-node/version.js deleted file mode 100644 index 77530e9..0000000 --- a/PBandGraphScaffold/node_modules/uuid/dist/esm-node/version.js +++ /dev/null @@ -1,11 +0,0 @@ -import validate from './validate.js'; - -function version(uuid) { - if (!validate(uuid)) { - throw TypeError('Invalid UUID'); - } - - return parseInt(uuid.substr(14, 1), 16); -} - -export default version; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/uuid/dist/index.js b/PBandGraphScaffold/node_modules/uuid/dist/index.js deleted file mode 100644 index bf13b10..0000000 --- a/PBandGraphScaffold/node_modules/uuid/dist/index.js +++ /dev/null @@ -1,79 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -Object.defineProperty(exports, "v1", { - enumerable: true, - get: function () { - return _v.default; - } -}); -Object.defineProperty(exports, "v3", { - enumerable: true, - get: function () { - return _v2.default; - } -}); -Object.defineProperty(exports, "v4", { - enumerable: true, - get: function () { - return _v3.default; - } -}); -Object.defineProperty(exports, "v5", { - enumerable: true, - get: function () { - return _v4.default; - } -}); -Object.defineProperty(exports, "NIL", { - enumerable: true, - get: function () { - return _nil.default; - } -}); -Object.defineProperty(exports, "version", { - enumerable: true, - get: function () { - return _version.default; - } -}); -Object.defineProperty(exports, "validate", { - enumerable: true, - get: function () { - return _validate.default; - } -}); -Object.defineProperty(exports, "stringify", { - enumerable: true, - get: function () { - return _stringify.default; - } -}); -Object.defineProperty(exports, "parse", { - enumerable: true, - get: function () { - return _parse.default; - } -}); - -var _v = _interopRequireDefault(require("./v1.js")); - -var _v2 = _interopRequireDefault(require("./v3.js")); - -var _v3 = _interopRequireDefault(require("./v4.js")); - -var _v4 = _interopRequireDefault(require("./v5.js")); - -var _nil = _interopRequireDefault(require("./nil.js")); - -var _version = _interopRequireDefault(require("./version.js")); - -var _validate = _interopRequireDefault(require("./validate.js")); - -var _stringify = _interopRequireDefault(require("./stringify.js")); - -var _parse = _interopRequireDefault(require("./parse.js")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/uuid/dist/md5-browser.js b/PBandGraphScaffold/node_modules/uuid/dist/md5-browser.js deleted file mode 100644 index 7a4582a..0000000 --- a/PBandGraphScaffold/node_modules/uuid/dist/md5-browser.js +++ /dev/null @@ -1,223 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; - -/* - * Browser-compatible JavaScript MD5 - * - * Modification of JavaScript MD5 - * https://github.com/blueimp/JavaScript-MD5 - * - * Copyright 2011, Sebastian Tschan - * https://blueimp.net - * - * Licensed under the MIT license: - * https://opensource.org/licenses/MIT - * - * Based on - * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message - * Digest Algorithm, as defined in RFC 1321. - * Version 2.2 Copyright (C) Paul Johnston 1999 - 2009 - * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet - * Distributed under the BSD License - * See http://pajhome.org.uk/crypt/md5 for more info. - */ -function md5(bytes) { - if (typeof bytes === 'string') { - const msg = unescape(encodeURIComponent(bytes)); // UTF8 escape - - bytes = new Uint8Array(msg.length); - - for (let i = 0; i < msg.length; ++i) { - bytes[i] = msg.charCodeAt(i); - } - } - - return md5ToHexEncodedArray(wordsToMd5(bytesToWords(bytes), bytes.length * 8)); -} -/* - * Convert an array of little-endian words to an array of bytes - */ - - -function md5ToHexEncodedArray(input) { - const output = []; - const length32 = input.length * 32; - const hexTab = '0123456789abcdef'; - - for (let i = 0; i < length32; i += 8) { - const x = input[i >> 5] >>> i % 32 & 0xff; - const hex = parseInt(hexTab.charAt(x >>> 4 & 0x0f) + hexTab.charAt(x & 0x0f), 16); - output.push(hex); - } - - return output; -} -/** - * Calculate output length with padding and bit length - */ - - -function getOutputLength(inputLength8) { - return (inputLength8 + 64 >>> 9 << 4) + 14 + 1; -} -/* - * Calculate the MD5 of an array of little-endian words, and a bit length. - */ - - -function wordsToMd5(x, len) { - /* append padding */ - x[len >> 5] |= 0x80 << len % 32; - x[getOutputLength(len) - 1] = len; - let a = 1732584193; - let b = -271733879; - let c = -1732584194; - let d = 271733878; - - for (let i = 0; i < x.length; i += 16) { - const olda = a; - const oldb = b; - const oldc = c; - const oldd = d; - a = md5ff(a, b, c, d, x[i], 7, -680876936); - d = md5ff(d, a, b, c, x[i + 1], 12, -389564586); - c = md5ff(c, d, a, b, x[i + 2], 17, 606105819); - b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330); - a = md5ff(a, b, c, d, x[i + 4], 7, -176418897); - d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426); - c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341); - b = md5ff(b, c, d, a, x[i + 7], 22, -45705983); - a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416); - d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417); - c = md5ff(c, d, a, b, x[i + 10], 17, -42063); - b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162); - a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682); - d = md5ff(d, a, b, c, x[i + 13], 12, -40341101); - c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290); - b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329); - a = md5gg(a, b, c, d, x[i + 1], 5, -165796510); - d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632); - c = md5gg(c, d, a, b, x[i + 11], 14, 643717713); - b = md5gg(b, c, d, a, x[i], 20, -373897302); - a = md5gg(a, b, c, d, x[i + 5], 5, -701558691); - d = md5gg(d, a, b, c, x[i + 10], 9, 38016083); - c = md5gg(c, d, a, b, x[i + 15], 14, -660478335); - b = md5gg(b, c, d, a, x[i + 4], 20, -405537848); - a = md5gg(a, b, c, d, x[i + 9], 5, 568446438); - d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690); - c = md5gg(c, d, a, b, x[i + 3], 14, -187363961); - b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501); - a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467); - d = md5gg(d, a, b, c, x[i + 2], 9, -51403784); - c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473); - b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734); - a = md5hh(a, b, c, d, x[i + 5], 4, -378558); - d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463); - c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562); - b = md5hh(b, c, d, a, x[i + 14], 23, -35309556); - a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060); - d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353); - c = md5hh(c, d, a, b, x[i + 7], 16, -155497632); - b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640); - a = md5hh(a, b, c, d, x[i + 13], 4, 681279174); - d = md5hh(d, a, b, c, x[i], 11, -358537222); - c = md5hh(c, d, a, b, x[i + 3], 16, -722521979); - b = md5hh(b, c, d, a, x[i + 6], 23, 76029189); - a = md5hh(a, b, c, d, x[i + 9], 4, -640364487); - d = md5hh(d, a, b, c, x[i + 12], 11, -421815835); - c = md5hh(c, d, a, b, x[i + 15], 16, 530742520); - b = md5hh(b, c, d, a, x[i + 2], 23, -995338651); - a = md5ii(a, b, c, d, x[i], 6, -198630844); - d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415); - c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905); - b = md5ii(b, c, d, a, x[i + 5], 21, -57434055); - a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571); - d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606); - c = md5ii(c, d, a, b, x[i + 10], 15, -1051523); - b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799); - a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359); - d = md5ii(d, a, b, c, x[i + 15], 10, -30611744); - c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380); - b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649); - a = md5ii(a, b, c, d, x[i + 4], 6, -145523070); - d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379); - c = md5ii(c, d, a, b, x[i + 2], 15, 718787259); - b = md5ii(b, c, d, a, x[i + 9], 21, -343485551); - a = safeAdd(a, olda); - b = safeAdd(b, oldb); - c = safeAdd(c, oldc); - d = safeAdd(d, oldd); - } - - return [a, b, c, d]; -} -/* - * Convert an array bytes to an array of little-endian words - * Characters >255 have their high-byte silently ignored. - */ - - -function bytesToWords(input) { - if (input.length === 0) { - return []; - } - - const length8 = input.length * 8; - const output = new Uint32Array(getOutputLength(length8)); - - for (let i = 0; i < length8; i += 8) { - output[i >> 5] |= (input[i / 8] & 0xff) << i % 32; - } - - return output; -} -/* - * Add integers, wrapping at 2^32. This uses 16-bit operations internally - * to work around bugs in some JS interpreters. - */ - - -function safeAdd(x, y) { - const lsw = (x & 0xffff) + (y & 0xffff); - const msw = (x >> 16) + (y >> 16) + (lsw >> 16); - return msw << 16 | lsw & 0xffff; -} -/* - * Bitwise rotate a 32-bit number to the left. - */ - - -function bitRotateLeft(num, cnt) { - return num << cnt | num >>> 32 - cnt; -} -/* - * These functions implement the four basic operations the algorithm uses. - */ - - -function md5cmn(q, a, b, x, s, t) { - return safeAdd(bitRotateLeft(safeAdd(safeAdd(a, q), safeAdd(x, t)), s), b); -} - -function md5ff(a, b, c, d, x, s, t) { - return md5cmn(b & c | ~b & d, a, b, x, s, t); -} - -function md5gg(a, b, c, d, x, s, t) { - return md5cmn(b & d | c & ~d, a, b, x, s, t); -} - -function md5hh(a, b, c, d, x, s, t) { - return md5cmn(b ^ c ^ d, a, b, x, s, t); -} - -function md5ii(a, b, c, d, x, s, t) { - return md5cmn(c ^ (b | ~d), a, b, x, s, t); -} - -var _default = md5; -exports.default = _default; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/uuid/dist/md5.js b/PBandGraphScaffold/node_modules/uuid/dist/md5.js deleted file mode 100644 index 824d481..0000000 --- a/PBandGraphScaffold/node_modules/uuid/dist/md5.js +++ /dev/null @@ -1,23 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; - -var _crypto = _interopRequireDefault(require("crypto")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function md5(bytes) { - if (Array.isArray(bytes)) { - bytes = Buffer.from(bytes); - } else if (typeof bytes === 'string') { - bytes = Buffer.from(bytes, 'utf8'); - } - - return _crypto.default.createHash('md5').update(bytes).digest(); -} - -var _default = md5; -exports.default = _default; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/uuid/dist/nil.js b/PBandGraphScaffold/node_modules/uuid/dist/nil.js deleted file mode 100644 index 7ade577..0000000 --- a/PBandGraphScaffold/node_modules/uuid/dist/nil.js +++ /dev/null @@ -1,8 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; -var _default = '00000000-0000-0000-0000-000000000000'; -exports.default = _default; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/uuid/dist/parse.js b/PBandGraphScaffold/node_modules/uuid/dist/parse.js deleted file mode 100644 index 4c69fc3..0000000 --- a/PBandGraphScaffold/node_modules/uuid/dist/parse.js +++ /dev/null @@ -1,45 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; - -var _validate = _interopRequireDefault(require("./validate.js")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function parse(uuid) { - if (!(0, _validate.default)(uuid)) { - throw TypeError('Invalid UUID'); - } - - let v; - const arr = new Uint8Array(16); // Parse ########-....-....-....-............ - - arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24; - arr[1] = v >>> 16 & 0xff; - arr[2] = v >>> 8 & 0xff; - arr[3] = v & 0xff; // Parse ........-####-....-....-............ - - arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8; - arr[5] = v & 0xff; // Parse ........-....-####-....-............ - - arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8; - arr[7] = v & 0xff; // Parse ........-....-....-####-............ - - arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8; - arr[9] = v & 0xff; // Parse ........-....-....-....-############ - // (Use "/" to avoid 32-bit truncation when bit-shifting high-order bytes) - - arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff; - arr[11] = v / 0x100000000 & 0xff; - arr[12] = v >>> 24 & 0xff; - arr[13] = v >>> 16 & 0xff; - arr[14] = v >>> 8 & 0xff; - arr[15] = v & 0xff; - return arr; -} - -var _default = parse; -exports.default = _default; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/uuid/dist/regex.js b/PBandGraphScaffold/node_modules/uuid/dist/regex.js deleted file mode 100644 index 1ef91d6..0000000 --- a/PBandGraphScaffold/node_modules/uuid/dist/regex.js +++ /dev/null @@ -1,8 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; -var _default = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i; -exports.default = _default; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/uuid/dist/rng-browser.js b/PBandGraphScaffold/node_modules/uuid/dist/rng-browser.js deleted file mode 100644 index 91faeae..0000000 --- a/PBandGraphScaffold/node_modules/uuid/dist/rng-browser.js +++ /dev/null @@ -1,26 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = rng; -// Unique ID creation requires a high quality random # generator. In the browser we therefore -// require the crypto API and do not support built-in fallback to lower quality random number -// generators (like Math.random()). -let getRandomValues; -const rnds8 = new Uint8Array(16); - -function rng() { - // lazy load so that environments that need to polyfill have a chance to do so - if (!getRandomValues) { - // getRandomValues needs to be invoked in a context where "this" is a Crypto implementation. Also, - // find the complete implementation of crypto (msCrypto) on IE11. - getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== 'undefined' && typeof msCrypto.getRandomValues === 'function' && msCrypto.getRandomValues.bind(msCrypto); - - if (!getRandomValues) { - throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported'); - } - } - - return getRandomValues(rnds8); -} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/uuid/dist/rng.js b/PBandGraphScaffold/node_modules/uuid/dist/rng.js deleted file mode 100644 index 3507f93..0000000 --- a/PBandGraphScaffold/node_modules/uuid/dist/rng.js +++ /dev/null @@ -1,24 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = rng; - -var _crypto = _interopRequireDefault(require("crypto")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -const rnds8Pool = new Uint8Array(256); // # of random values to pre-allocate - -let poolPtr = rnds8Pool.length; - -function rng() { - if (poolPtr > rnds8Pool.length - 16) { - _crypto.default.randomFillSync(rnds8Pool); - - poolPtr = 0; - } - - return rnds8Pool.slice(poolPtr, poolPtr += 16); -} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/uuid/dist/sha1-browser.js b/PBandGraphScaffold/node_modules/uuid/dist/sha1-browser.js deleted file mode 100644 index 24cbced..0000000 --- a/PBandGraphScaffold/node_modules/uuid/dist/sha1-browser.js +++ /dev/null @@ -1,104 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; - -// Adapted from Chris Veness' SHA1 code at -// http://www.movable-type.co.uk/scripts/sha1.html -function f(s, x, y, z) { - switch (s) { - case 0: - return x & y ^ ~x & z; - - case 1: - return x ^ y ^ z; - - case 2: - return x & y ^ x & z ^ y & z; - - case 3: - return x ^ y ^ z; - } -} - -function ROTL(x, n) { - return x << n | x >>> 32 - n; -} - -function sha1(bytes) { - const K = [0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62c1d6]; - const H = [0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0]; - - if (typeof bytes === 'string') { - const msg = unescape(encodeURIComponent(bytes)); // UTF8 escape - - bytes = []; - - for (let i = 0; i < msg.length; ++i) { - bytes.push(msg.charCodeAt(i)); - } - } else if (!Array.isArray(bytes)) { - // Convert Array-like to Array - bytes = Array.prototype.slice.call(bytes); - } - - bytes.push(0x80); - const l = bytes.length / 4 + 2; - const N = Math.ceil(l / 16); - const M = new Array(N); - - for (let i = 0; i < N; ++i) { - const arr = new Uint32Array(16); - - for (let j = 0; j < 16; ++j) { - arr[j] = bytes[i * 64 + j * 4] << 24 | bytes[i * 64 + j * 4 + 1] << 16 | bytes[i * 64 + j * 4 + 2] << 8 | bytes[i * 64 + j * 4 + 3]; - } - - M[i] = arr; - } - - M[N - 1][14] = (bytes.length - 1) * 8 / Math.pow(2, 32); - M[N - 1][14] = Math.floor(M[N - 1][14]); - M[N - 1][15] = (bytes.length - 1) * 8 & 0xffffffff; - - for (let i = 0; i < N; ++i) { - const W = new Uint32Array(80); - - for (let t = 0; t < 16; ++t) { - W[t] = M[i][t]; - } - - for (let t = 16; t < 80; ++t) { - W[t] = ROTL(W[t - 3] ^ W[t - 8] ^ W[t - 14] ^ W[t - 16], 1); - } - - let a = H[0]; - let b = H[1]; - let c = H[2]; - let d = H[3]; - let e = H[4]; - - for (let t = 0; t < 80; ++t) { - const s = Math.floor(t / 20); - const T = ROTL(a, 5) + f(s, b, c, d) + e + K[s] + W[t] >>> 0; - e = d; - d = c; - c = ROTL(b, 30) >>> 0; - b = a; - a = T; - } - - H[0] = H[0] + a >>> 0; - H[1] = H[1] + b >>> 0; - H[2] = H[2] + c >>> 0; - H[3] = H[3] + d >>> 0; - H[4] = H[4] + e >>> 0; - } - - return [H[0] >> 24 & 0xff, H[0] >> 16 & 0xff, H[0] >> 8 & 0xff, H[0] & 0xff, H[1] >> 24 & 0xff, H[1] >> 16 & 0xff, H[1] >> 8 & 0xff, H[1] & 0xff, H[2] >> 24 & 0xff, H[2] >> 16 & 0xff, H[2] >> 8 & 0xff, H[2] & 0xff, H[3] >> 24 & 0xff, H[3] >> 16 & 0xff, H[3] >> 8 & 0xff, H[3] & 0xff, H[4] >> 24 & 0xff, H[4] >> 16 & 0xff, H[4] >> 8 & 0xff, H[4] & 0xff]; -} - -var _default = sha1; -exports.default = _default; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/uuid/dist/sha1.js b/PBandGraphScaffold/node_modules/uuid/dist/sha1.js deleted file mode 100644 index 03bdd63..0000000 --- a/PBandGraphScaffold/node_modules/uuid/dist/sha1.js +++ /dev/null @@ -1,23 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; - -var _crypto = _interopRequireDefault(require("crypto")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function sha1(bytes) { - if (Array.isArray(bytes)) { - bytes = Buffer.from(bytes); - } else if (typeof bytes === 'string') { - bytes = Buffer.from(bytes, 'utf8'); - } - - return _crypto.default.createHash('sha1').update(bytes).digest(); -} - -var _default = sha1; -exports.default = _default; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/uuid/dist/stringify.js b/PBandGraphScaffold/node_modules/uuid/dist/stringify.js deleted file mode 100644 index b8e7519..0000000 --- a/PBandGraphScaffold/node_modules/uuid/dist/stringify.js +++ /dev/null @@ -1,39 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; - -var _validate = _interopRequireDefault(require("./validate.js")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Convert array of 16 byte values to UUID string format of the form: - * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX - */ -const byteToHex = []; - -for (let i = 0; i < 256; ++i) { - byteToHex.push((i + 0x100).toString(16).substr(1)); -} - -function stringify(arr, offset = 0) { - // Note: Be careful editing this code! It's been tuned for performance - // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434 - const uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one - // of the following: - // - One or more input array values don't map to a hex octet (leading to - // "undefined" in the uuid) - // - Invalid input values for the RFC `version` or `variant` fields - - if (!(0, _validate.default)(uuid)) { - throw TypeError('Stringified UUID is invalid'); - } - - return uuid; -} - -var _default = stringify; -exports.default = _default; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/uuid/dist/umd/uuid.min.js b/PBandGraphScaffold/node_modules/uuid/dist/umd/uuid.min.js deleted file mode 100644 index 639ca2f..0000000 --- a/PBandGraphScaffold/node_modules/uuid/dist/umd/uuid.min.js +++ /dev/null @@ -1 +0,0 @@ -!function(r,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((r="undefined"!=typeof globalThis?globalThis:r||self).uuid={})}(this,(function(r){"use strict";var e,n=new Uint8Array(16);function t(){if(!e&&!(e="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return e(n)}var o=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function a(r){return"string"==typeof r&&o.test(r)}for(var i,u,f=[],s=0;s<256;++s)f.push((s+256).toString(16).substr(1));function c(r){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(f[r[e+0]]+f[r[e+1]]+f[r[e+2]]+f[r[e+3]]+"-"+f[r[e+4]]+f[r[e+5]]+"-"+f[r[e+6]]+f[r[e+7]]+"-"+f[r[e+8]]+f[r[e+9]]+"-"+f[r[e+10]]+f[r[e+11]]+f[r[e+12]]+f[r[e+13]]+f[r[e+14]]+f[r[e+15]]).toLowerCase();if(!a(n))throw TypeError("Stringified UUID is invalid");return n}var l=0,d=0;function v(r){if(!a(r))throw TypeError("Invalid UUID");var e,n=new Uint8Array(16);return n[0]=(e=parseInt(r.slice(0,8),16))>>>24,n[1]=e>>>16&255,n[2]=e>>>8&255,n[3]=255&e,n[4]=(e=parseInt(r.slice(9,13),16))>>>8,n[5]=255&e,n[6]=(e=parseInt(r.slice(14,18),16))>>>8,n[7]=255&e,n[8]=(e=parseInt(r.slice(19,23),16))>>>8,n[9]=255&e,n[10]=(e=parseInt(r.slice(24,36),16))/1099511627776&255,n[11]=e/4294967296&255,n[12]=e>>>24&255,n[13]=e>>>16&255,n[14]=e>>>8&255,n[15]=255&e,n}function p(r,e,n){function t(r,t,o,a){if("string"==typeof r&&(r=function(r){r=unescape(encodeURIComponent(r));for(var e=[],n=0;n>>9<<4)+1}function y(r,e){var n=(65535&r)+(65535&e);return(r>>16)+(e>>16)+(n>>16)<<16|65535&n}function g(r,e,n,t,o,a){return y((i=y(y(e,r),y(t,a)))<<(u=o)|i>>>32-u,n);var i,u}function m(r,e,n,t,o,a,i){return g(e&n|~e&t,r,e,o,a,i)}function w(r,e,n,t,o,a,i){return g(e&t|n&~t,r,e,o,a,i)}function b(r,e,n,t,o,a,i){return g(e^n^t,r,e,o,a,i)}function A(r,e,n,t,o,a,i){return g(n^(e|~t),r,e,o,a,i)}var U=p("v3",48,(function(r){if("string"==typeof r){var e=unescape(encodeURIComponent(r));r=new Uint8Array(e.length);for(var n=0;n>5]>>>o%32&255,i=parseInt(t.charAt(a>>>4&15)+t.charAt(15&a),16);e.push(i)}return e}(function(r,e){r[e>>5]|=128<>5]|=(255&r[t/8])<>>32-e}var R=p("v5",80,(function(r){var e=[1518500249,1859775393,2400959708,3395469782],n=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof r){var t=unescape(encodeURIComponent(r));r=[];for(var o=0;o>>0;w=m,m=g,g=C(y,30)>>>0,y=h,h=U}n[0]=n[0]+h>>>0,n[1]=n[1]+y>>>0,n[2]=n[2]+g>>>0,n[3]=n[3]+m>>>0,n[4]=n[4]+w>>>0}return[n[0]>>24&255,n[0]>>16&255,n[0]>>8&255,255&n[0],n[1]>>24&255,n[1]>>16&255,n[1]>>8&255,255&n[1],n[2]>>24&255,n[2]>>16&255,n[2]>>8&255,255&n[2],n[3]>>24&255,n[3]>>16&255,n[3]>>8&255,255&n[3],n[4]>>24&255,n[4]>>16&255,n[4]>>8&255,255&n[4]]}));r.NIL="00000000-0000-0000-0000-000000000000",r.parse=v,r.stringify=c,r.v1=function(r,e,n){var o=e&&n||0,a=e||new Array(16),f=(r=r||{}).node||i,s=void 0!==r.clockseq?r.clockseq:u;if(null==f||null==s){var v=r.random||(r.rng||t)();null==f&&(f=i=[1|v[0],v[1],v[2],v[3],v[4],v[5]]),null==s&&(s=u=16383&(v[6]<<8|v[7]))}var p=void 0!==r.msecs?r.msecs:Date.now(),h=void 0!==r.nsecs?r.nsecs:d+1,y=p-l+(h-d)/1e4;if(y<0&&void 0===r.clockseq&&(s=s+1&16383),(y<0||p>l)&&void 0===r.nsecs&&(h=0),h>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");l=p,d=h,u=s;var g=(1e4*(268435455&(p+=122192928e5))+h)%4294967296;a[o++]=g>>>24&255,a[o++]=g>>>16&255,a[o++]=g>>>8&255,a[o++]=255&g;var m=p/4294967296*1e4&268435455;a[o++]=m>>>8&255,a[o++]=255&m,a[o++]=m>>>24&15|16,a[o++]=m>>>16&255,a[o++]=s>>>8|128,a[o++]=255&s;for(var w=0;w<6;++w)a[o+w]=f[w];return e||c(a)},r.v3=U,r.v4=function(r,e,n){var o=(r=r||{}).random||(r.rng||t)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,e){n=n||0;for(var a=0;a<16;++a)e[n+a]=o[a];return e}return c(o)},r.v5=R,r.validate=a,r.version=function(r){if(!a(r))throw TypeError("Invalid UUID");return parseInt(r.substr(14,1),16)},Object.defineProperty(r,"__esModule",{value:!0})})); \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/uuid/dist/umd/uuidNIL.min.js b/PBandGraphScaffold/node_modules/uuid/dist/umd/uuidNIL.min.js deleted file mode 100644 index 30b28a7..0000000 --- a/PBandGraphScaffold/node_modules/uuid/dist/umd/uuidNIL.min.js +++ /dev/null @@ -1 +0,0 @@ -!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):(e="undefined"!=typeof globalThis?globalThis:e||self).uuidNIL=n()}(this,(function(){"use strict";return"00000000-0000-0000-0000-000000000000"})); \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/uuid/dist/umd/uuidParse.min.js b/PBandGraphScaffold/node_modules/uuid/dist/umd/uuidParse.min.js deleted file mode 100644 index d48ea6a..0000000 --- a/PBandGraphScaffold/node_modules/uuid/dist/umd/uuidParse.min.js +++ /dev/null @@ -1 +0,0 @@ -!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):(e="undefined"!=typeof globalThis?globalThis:e||self).uuidParse=n()}(this,(function(){"use strict";var e=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;return function(n){if(!function(n){return"string"==typeof n&&e.test(n)}(n))throw TypeError("Invalid UUID");var t,i=new Uint8Array(16);return i[0]=(t=parseInt(n.slice(0,8),16))>>>24,i[1]=t>>>16&255,i[2]=t>>>8&255,i[3]=255&t,i[4]=(t=parseInt(n.slice(9,13),16))>>>8,i[5]=255&t,i[6]=(t=parseInt(n.slice(14,18),16))>>>8,i[7]=255&t,i[8]=(t=parseInt(n.slice(19,23),16))>>>8,i[9]=255&t,i[10]=(t=parseInt(n.slice(24,36),16))/1099511627776&255,i[11]=t/4294967296&255,i[12]=t>>>24&255,i[13]=t>>>16&255,i[14]=t>>>8&255,i[15]=255&t,i}})); \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/uuid/dist/umd/uuidStringify.min.js b/PBandGraphScaffold/node_modules/uuid/dist/umd/uuidStringify.min.js deleted file mode 100644 index fd39adc..0000000 --- a/PBandGraphScaffold/node_modules/uuid/dist/umd/uuidStringify.min.js +++ /dev/null @@ -1 +0,0 @@ -!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).uuidStringify=t()}(this,(function(){"use strict";var e=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function t(t){return"string"==typeof t&&e.test(t)}for(var i=[],n=0;n<256;++n)i.push((n+256).toString(16).substr(1));return function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,f=(i[e[n+0]]+i[e[n+1]]+i[e[n+2]]+i[e[n+3]]+"-"+i[e[n+4]]+i[e[n+5]]+"-"+i[e[n+6]]+i[e[n+7]]+"-"+i[e[n+8]]+i[e[n+9]]+"-"+i[e[n+10]]+i[e[n+11]]+i[e[n+12]]+i[e[n+13]]+i[e[n+14]]+i[e[n+15]]).toLowerCase();if(!t(f))throw TypeError("Stringified UUID is invalid");return f}})); \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/uuid/dist/umd/uuidValidate.min.js b/PBandGraphScaffold/node_modules/uuid/dist/umd/uuidValidate.min.js deleted file mode 100644 index 378e5b9..0000000 --- a/PBandGraphScaffold/node_modules/uuid/dist/umd/uuidValidate.min.js +++ /dev/null @@ -1 +0,0 @@ -!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).uuidValidate=t()}(this,(function(){"use strict";var e=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;return function(t){return"string"==typeof t&&e.test(t)}})); \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/uuid/dist/umd/uuidVersion.min.js b/PBandGraphScaffold/node_modules/uuid/dist/umd/uuidVersion.min.js deleted file mode 100644 index 274bb09..0000000 --- a/PBandGraphScaffold/node_modules/uuid/dist/umd/uuidVersion.min.js +++ /dev/null @@ -1 +0,0 @@ -!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).uuidVersion=t()}(this,(function(){"use strict";var e=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;return function(t){if(!function(t){return"string"==typeof t&&e.test(t)}(t))throw TypeError("Invalid UUID");return parseInt(t.substr(14,1),16)}})); \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/uuid/dist/umd/uuidv1.min.js b/PBandGraphScaffold/node_modules/uuid/dist/umd/uuidv1.min.js deleted file mode 100644 index 2622889..0000000 --- a/PBandGraphScaffold/node_modules/uuid/dist/umd/uuidv1.min.js +++ /dev/null @@ -1 +0,0 @@ -!function(e,o){"object"==typeof exports&&"undefined"!=typeof module?module.exports=o():"function"==typeof define&&define.amd?define(o):(e="undefined"!=typeof globalThis?globalThis:e||self).uuidv1=o()}(this,(function(){"use strict";var e,o=new Uint8Array(16);function t(){if(!e&&!(e="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return e(o)}var n=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function r(e){return"string"==typeof e&&n.test(e)}for(var i,u,s=[],a=0;a<256;++a)s.push((a+256).toString(16).substr(1));var d=0,f=0;return function(e,o,n){var a=o&&n||0,c=o||new Array(16),l=(e=e||{}).node||i,p=void 0!==e.clockseq?e.clockseq:u;if(null==l||null==p){var v=e.random||(e.rng||t)();null==l&&(l=i=[1|v[0],v[1],v[2],v[3],v[4],v[5]]),null==p&&(p=u=16383&(v[6]<<8|v[7]))}var y=void 0!==e.msecs?e.msecs:Date.now(),m=void 0!==e.nsecs?e.nsecs:f+1,g=y-d+(m-f)/1e4;if(g<0&&void 0===e.clockseq&&(p=p+1&16383),(g<0||y>d)&&void 0===e.nsecs&&(m=0),m>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");d=y,f=m,u=p;var h=(1e4*(268435455&(y+=122192928e5))+m)%4294967296;c[a++]=h>>>24&255,c[a++]=h>>>16&255,c[a++]=h>>>8&255,c[a++]=255&h;var w=y/4294967296*1e4&268435455;c[a++]=w>>>8&255,c[a++]=255&w,c[a++]=w>>>24&15|16,c[a++]=w>>>16&255,c[a++]=p>>>8|128,c[a++]=255&p;for(var b=0;b<6;++b)c[a+b]=l[b];return o||function(e){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,t=(s[e[o+0]]+s[e[o+1]]+s[e[o+2]]+s[e[o+3]]+"-"+s[e[o+4]]+s[e[o+5]]+"-"+s[e[o+6]]+s[e[o+7]]+"-"+s[e[o+8]]+s[e[o+9]]+"-"+s[e[o+10]]+s[e[o+11]]+s[e[o+12]]+s[e[o+13]]+s[e[o+14]]+s[e[o+15]]).toLowerCase();if(!r(t))throw TypeError("Stringified UUID is invalid");return t}(c)}})); \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/uuid/dist/umd/uuidv3.min.js b/PBandGraphScaffold/node_modules/uuid/dist/umd/uuidv3.min.js deleted file mode 100644 index 8d37b62..0000000 --- a/PBandGraphScaffold/node_modules/uuid/dist/umd/uuidv3.min.js +++ /dev/null @@ -1 +0,0 @@ -!function(n,r){"object"==typeof exports&&"undefined"!=typeof module?module.exports=r():"function"==typeof define&&define.amd?define(r):(n="undefined"!=typeof globalThis?globalThis:n||self).uuidv3=r()}(this,(function(){"use strict";var n=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function r(r){return"string"==typeof r&&n.test(r)}for(var e=[],t=0;t<256;++t)e.push((t+256).toString(16).substr(1));function i(n){return 14+(n+64>>>9<<4)+1}function o(n,r){var e=(65535&n)+(65535&r);return(n>>16)+(r>>16)+(e>>16)<<16|65535&e}function a(n,r,e,t,i,a){return o((f=o(o(r,n),o(t,a)))<<(u=i)|f>>>32-u,e);var f,u}function f(n,r,e,t,i,o,f){return a(r&e|~r&t,n,r,i,o,f)}function u(n,r,e,t,i,o,f){return a(r&t|e&~t,n,r,i,o,f)}function c(n,r,e,t,i,o,f){return a(r^e^t,n,r,i,o,f)}function s(n,r,e,t,i,o,f){return a(e^(r|~t),n,r,i,o,f)}return function(n,t,i){function o(n,o,a,f){if("string"==typeof n&&(n=function(n){n=unescape(encodeURIComponent(n));for(var r=[],e=0;e>>24,t[1]=e>>>16&255,t[2]=e>>>8&255,t[3]=255&e,t[4]=(e=parseInt(n.slice(9,13),16))>>>8,t[5]=255&e,t[6]=(e=parseInt(n.slice(14,18),16))>>>8,t[7]=255&e,t[8]=(e=parseInt(n.slice(19,23),16))>>>8,t[9]=255&e,t[10]=(e=parseInt(n.slice(24,36),16))/1099511627776&255,t[11]=e/4294967296&255,t[12]=e>>>24&255,t[13]=e>>>16&255,t[14]=e>>>8&255,t[15]=255&e,t}(o)),16!==o.length)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");var u=new Uint8Array(16+n.length);if(u.set(o),u.set(n,o.length),(u=i(u))[6]=15&u[6]|t,u[8]=63&u[8]|128,a){f=f||0;for(var c=0;c<16;++c)a[f+c]=u[c];return a}return function(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=(e[n[t+0]]+e[n[t+1]]+e[n[t+2]]+e[n[t+3]]+"-"+e[n[t+4]]+e[n[t+5]]+"-"+e[n[t+6]]+e[n[t+7]]+"-"+e[n[t+8]]+e[n[t+9]]+"-"+e[n[t+10]]+e[n[t+11]]+e[n[t+12]]+e[n[t+13]]+e[n[t+14]]+e[n[t+15]]).toLowerCase();if(!r(i))throw TypeError("Stringified UUID is invalid");return i}(u)}try{o.name=n}catch(n){}return o.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",o.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",o}("v3",48,(function(n){if("string"==typeof n){var r=unescape(encodeURIComponent(n));n=new Uint8Array(r.length);for(var e=0;e>5]>>>i%32&255,a=parseInt(t.charAt(o>>>4&15)+t.charAt(15&o),16);r.push(a)}return r}(function(n,r){n[r>>5]|=128<>5]|=(255&n[t/8])<1&&void 0!==arguments[1]?arguments[1]:0,o=(i[t[e+0]]+i[t[e+1]]+i[t[e+2]]+i[t[e+3]]+"-"+i[t[e+4]]+i[t[e+5]]+"-"+i[t[e+6]]+i[t[e+7]]+"-"+i[t[e+8]]+i[t[e+9]]+"-"+i[t[e+10]]+i[t[e+11]]+i[t[e+12]]+i[t[e+13]]+i[t[e+14]]+i[t[e+15]]).toLowerCase();if(!r(o))throw TypeError("Stringified UUID is invalid");return o}(u)}})); \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/uuid/dist/umd/uuidv5.min.js b/PBandGraphScaffold/node_modules/uuid/dist/umd/uuidv5.min.js deleted file mode 100644 index ba6fc63..0000000 --- a/PBandGraphScaffold/node_modules/uuid/dist/umd/uuidv5.min.js +++ /dev/null @@ -1 +0,0 @@ -!function(r,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(r="undefined"!=typeof globalThis?globalThis:r||self).uuidv5=e()}(this,(function(){"use strict";var r=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function e(e){return"string"==typeof e&&r.test(e)}for(var t=[],n=0;n<256;++n)t.push((n+256).toString(16).substr(1));function a(r,e,t,n){switch(r){case 0:return e&t^~e&n;case 1:return e^t^n;case 2:return e&t^e&n^t&n;case 3:return e^t^n}}function o(r,e){return r<>>32-e}return function(r,n,a){function o(r,o,i,f){if("string"==typeof r&&(r=function(r){r=unescape(encodeURIComponent(r));for(var e=[],t=0;t>>24,n[1]=t>>>16&255,n[2]=t>>>8&255,n[3]=255&t,n[4]=(t=parseInt(r.slice(9,13),16))>>>8,n[5]=255&t,n[6]=(t=parseInt(r.slice(14,18),16))>>>8,n[7]=255&t,n[8]=(t=parseInt(r.slice(19,23),16))>>>8,n[9]=255&t,n[10]=(t=parseInt(r.slice(24,36),16))/1099511627776&255,n[11]=t/4294967296&255,n[12]=t>>>24&255,n[13]=t>>>16&255,n[14]=t>>>8&255,n[15]=255&t,n}(o)),16!==o.length)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");var s=new Uint8Array(16+r.length);if(s.set(o),s.set(r,o.length),(s=a(s))[6]=15&s[6]|n,s[8]=63&s[8]|128,i){f=f||0;for(var u=0;u<16;++u)i[f+u]=s[u];return i}return function(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,a=(t[r[n+0]]+t[r[n+1]]+t[r[n+2]]+t[r[n+3]]+"-"+t[r[n+4]]+t[r[n+5]]+"-"+t[r[n+6]]+t[r[n+7]]+"-"+t[r[n+8]]+t[r[n+9]]+"-"+t[r[n+10]]+t[r[n+11]]+t[r[n+12]]+t[r[n+13]]+t[r[n+14]]+t[r[n+15]]).toLowerCase();if(!e(a))throw TypeError("Stringified UUID is invalid");return a}(s)}try{o.name=r}catch(r){}return o.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",o.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",o}("v5",80,(function(r){var e=[1518500249,1859775393,2400959708,3395469782],t=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof r){var n=unescape(encodeURIComponent(r));r=[];for(var i=0;i>>0;A=U,U=w,w=o(b,30)>>>0,b=g,g=C}t[0]=t[0]+g>>>0,t[1]=t[1]+b>>>0,t[2]=t[2]+w>>>0,t[3]=t[3]+U>>>0,t[4]=t[4]+A>>>0}return[t[0]>>24&255,t[0]>>16&255,t[0]>>8&255,255&t[0],t[1]>>24&255,t[1]>>16&255,t[1]>>8&255,255&t[1],t[2]>>24&255,t[2]>>16&255,t[2]>>8&255,255&t[2],t[3]>>24&255,t[3]>>16&255,t[3]>>8&255,255&t[3],t[4]>>24&255,t[4]>>16&255,t[4]>>8&255,255&t[4]]}))})); \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/uuid/dist/uuid-bin.js b/PBandGraphScaffold/node_modules/uuid/dist/uuid-bin.js deleted file mode 100644 index 50a7a9f..0000000 --- a/PBandGraphScaffold/node_modules/uuid/dist/uuid-bin.js +++ /dev/null @@ -1,85 +0,0 @@ -"use strict"; - -var _assert = _interopRequireDefault(require("assert")); - -var _v = _interopRequireDefault(require("./v1.js")); - -var _v2 = _interopRequireDefault(require("./v3.js")); - -var _v3 = _interopRequireDefault(require("./v4.js")); - -var _v4 = _interopRequireDefault(require("./v5.js")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function usage() { - console.log('Usage:'); - console.log(' uuid'); - console.log(' uuid v1'); - console.log(' uuid v3 '); - console.log(' uuid v4'); - console.log(' uuid v5 '); - console.log(' uuid --help'); - console.log('\nNote: may be "URL" or "DNS" to use the corresponding UUIDs defined by RFC4122'); -} - -const args = process.argv.slice(2); - -if (args.indexOf('--help') >= 0) { - usage(); - process.exit(0); -} - -const version = args.shift() || 'v4'; - -switch (version) { - case 'v1': - console.log((0, _v.default)()); - break; - - case 'v3': - { - const name = args.shift(); - let namespace = args.shift(); - (0, _assert.default)(name != null, 'v3 name not specified'); - (0, _assert.default)(namespace != null, 'v3 namespace not specified'); - - if (namespace === 'URL') { - namespace = _v2.default.URL; - } - - if (namespace === 'DNS') { - namespace = _v2.default.DNS; - } - - console.log((0, _v2.default)(name, namespace)); - break; - } - - case 'v4': - console.log((0, _v3.default)()); - break; - - case 'v5': - { - const name = args.shift(); - let namespace = args.shift(); - (0, _assert.default)(name != null, 'v5 name not specified'); - (0, _assert.default)(namespace != null, 'v5 namespace not specified'); - - if (namespace === 'URL') { - namespace = _v4.default.URL; - } - - if (namespace === 'DNS') { - namespace = _v4.default.DNS; - } - - console.log((0, _v4.default)(name, namespace)); - break; - } - - default: - usage(); - process.exit(1); -} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/uuid/dist/v1.js b/PBandGraphScaffold/node_modules/uuid/dist/v1.js deleted file mode 100644 index abb9b3d..0000000 --- a/PBandGraphScaffold/node_modules/uuid/dist/v1.js +++ /dev/null @@ -1,107 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; - -var _rng = _interopRequireDefault(require("./rng.js")); - -var _stringify = _interopRequireDefault(require("./stringify.js")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -// **`v1()` - Generate time-based UUID** -// -// Inspired by https://github.com/LiosK/UUID.js -// and http://docs.python.org/library/uuid.html -let _nodeId; - -let _clockseq; // Previous uuid creation time - - -let _lastMSecs = 0; -let _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details - -function v1(options, buf, offset) { - let i = buf && offset || 0; - const b = buf || new Array(16); - options = options || {}; - let node = options.node || _nodeId; - let clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not - // specified. We do this lazily to minimize issues related to insufficient - // system entropy. See #189 - - if (node == null || clockseq == null) { - const seedBytes = options.random || (options.rng || _rng.default)(); - - if (node == null) { - // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1) - node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]]; - } - - if (clockseq == null) { - // Per 4.2.2, randomize (14 bit) clockseq - clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff; - } - } // UUID timestamps are 100 nano-second units since the Gregorian epoch, - // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so - // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs' - // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00. - - - let msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock - // cycle to simulate higher resolution clock - - let nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs) - - const dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression - - if (dt < 0 && options.clockseq === undefined) { - clockseq = clockseq + 1 & 0x3fff; - } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new - // time interval - - - if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) { - nsecs = 0; - } // Per 4.2.1.2 Throw error if too many uuids are requested - - - if (nsecs >= 10000) { - throw new Error("uuid.v1(): Can't create more than 10M uuids/sec"); - } - - _lastMSecs = msecs; - _lastNSecs = nsecs; - _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch - - msecs += 12219292800000; // `time_low` - - const tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000; - b[i++] = tl >>> 24 & 0xff; - b[i++] = tl >>> 16 & 0xff; - b[i++] = tl >>> 8 & 0xff; - b[i++] = tl & 0xff; // `time_mid` - - const tmh = msecs / 0x100000000 * 10000 & 0xfffffff; - b[i++] = tmh >>> 8 & 0xff; - b[i++] = tmh & 0xff; // `time_high_and_version` - - b[i++] = tmh >>> 24 & 0xf | 0x10; // include version - - b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant) - - b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low` - - b[i++] = clockseq & 0xff; // `node` - - for (let n = 0; n < 6; ++n) { - b[i + n] = node[n]; - } - - return buf || (0, _stringify.default)(b); -} - -var _default = v1; -exports.default = _default; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/uuid/dist/v3.js b/PBandGraphScaffold/node_modules/uuid/dist/v3.js deleted file mode 100644 index 6b47ff5..0000000 --- a/PBandGraphScaffold/node_modules/uuid/dist/v3.js +++ /dev/null @@ -1,16 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; - -var _v = _interopRequireDefault(require("./v35.js")); - -var _md = _interopRequireDefault(require("./md5.js")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -const v3 = (0, _v.default)('v3', 0x30, _md.default); -var _default = v3; -exports.default = _default; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/uuid/dist/v35.js b/PBandGraphScaffold/node_modules/uuid/dist/v35.js deleted file mode 100644 index f784c63..0000000 --- a/PBandGraphScaffold/node_modules/uuid/dist/v35.js +++ /dev/null @@ -1,78 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = _default; -exports.URL = exports.DNS = void 0; - -var _stringify = _interopRequireDefault(require("./stringify.js")); - -var _parse = _interopRequireDefault(require("./parse.js")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function stringToBytes(str) { - str = unescape(encodeURIComponent(str)); // UTF8 escape - - const bytes = []; - - for (let i = 0; i < str.length; ++i) { - bytes.push(str.charCodeAt(i)); - } - - return bytes; -} - -const DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8'; -exports.DNS = DNS; -const URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8'; -exports.URL = URL; - -function _default(name, version, hashfunc) { - function generateUUID(value, namespace, buf, offset) { - if (typeof value === 'string') { - value = stringToBytes(value); - } - - if (typeof namespace === 'string') { - namespace = (0, _parse.default)(namespace); - } - - if (namespace.length !== 16) { - throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)'); - } // Compute hash of namespace and value, Per 4.3 - // Future: Use spread syntax when supported on all platforms, e.g. `bytes = - // hashfunc([...namespace, ... value])` - - - let bytes = new Uint8Array(16 + value.length); - bytes.set(namespace); - bytes.set(value, namespace.length); - bytes = hashfunc(bytes); - bytes[6] = bytes[6] & 0x0f | version; - bytes[8] = bytes[8] & 0x3f | 0x80; - - if (buf) { - offset = offset || 0; - - for (let i = 0; i < 16; ++i) { - buf[offset + i] = bytes[i]; - } - - return buf; - } - - return (0, _stringify.default)(bytes); - } // Function#name is not settable on some platforms (#270) - - - try { - generateUUID.name = name; // eslint-disable-next-line no-empty - } catch (err) {} // For CommonJS default export support - - - generateUUID.DNS = DNS; - generateUUID.URL = URL; - return generateUUID; -} \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/uuid/dist/v4.js b/PBandGraphScaffold/node_modules/uuid/dist/v4.js deleted file mode 100644 index 838ce0b..0000000 --- a/PBandGraphScaffold/node_modules/uuid/dist/v4.js +++ /dev/null @@ -1,37 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; - -var _rng = _interopRequireDefault(require("./rng.js")); - -var _stringify = _interopRequireDefault(require("./stringify.js")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function v4(options, buf, offset) { - options = options || {}; - - const rnds = options.random || (options.rng || _rng.default)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` - - - rnds[6] = rnds[6] & 0x0f | 0x40; - rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided - - if (buf) { - offset = offset || 0; - - for (let i = 0; i < 16; ++i) { - buf[offset + i] = rnds[i]; - } - - return buf; - } - - return (0, _stringify.default)(rnds); -} - -var _default = v4; -exports.default = _default; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/uuid/dist/v5.js b/PBandGraphScaffold/node_modules/uuid/dist/v5.js deleted file mode 100644 index 99d615e..0000000 --- a/PBandGraphScaffold/node_modules/uuid/dist/v5.js +++ /dev/null @@ -1,16 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; - -var _v = _interopRequireDefault(require("./v35.js")); - -var _sha = _interopRequireDefault(require("./sha1.js")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -const v5 = (0, _v.default)('v5', 0x50, _sha.default); -var _default = v5; -exports.default = _default; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/uuid/dist/validate.js b/PBandGraphScaffold/node_modules/uuid/dist/validate.js deleted file mode 100644 index fd05215..0000000 --- a/PBandGraphScaffold/node_modules/uuid/dist/validate.js +++ /dev/null @@ -1,17 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; - -var _regex = _interopRequireDefault(require("./regex.js")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function validate(uuid) { - return typeof uuid === 'string' && _regex.default.test(uuid); -} - -var _default = validate; -exports.default = _default; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/uuid/dist/version.js b/PBandGraphScaffold/node_modules/uuid/dist/version.js deleted file mode 100644 index b72949c..0000000 --- a/PBandGraphScaffold/node_modules/uuid/dist/version.js +++ /dev/null @@ -1,21 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; - -var _validate = _interopRequireDefault(require("./validate.js")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function version(uuid) { - if (!(0, _validate.default)(uuid)) { - throw TypeError('Invalid UUID'); - } - - return parseInt(uuid.substr(14, 1), 16); -} - -var _default = version; -exports.default = _default; \ No newline at end of file diff --git a/PBandGraphScaffold/node_modules/uuid/package.json b/PBandGraphScaffold/node_modules/uuid/package.json deleted file mode 100644 index f0ab371..0000000 --- a/PBandGraphScaffold/node_modules/uuid/package.json +++ /dev/null @@ -1,135 +0,0 @@ -{ - "name": "uuid", - "version": "8.3.2", - "description": "RFC4122 (v1, v4, and v5) UUIDs", - "commitlint": { - "extends": [ - "@commitlint/config-conventional" - ] - }, - "keywords": [ - "uuid", - "guid", - "rfc4122" - ], - "license": "MIT", - "bin": { - "uuid": "./dist/bin/uuid" - }, - "sideEffects": false, - "main": "./dist/index.js", - "exports": { - ".": { - "node": { - "module": "./dist/esm-node/index.js", - "require": "./dist/index.js", - "import": "./wrapper.mjs" - }, - "default": "./dist/esm-browser/index.js" - }, - "./package.json": "./package.json" - }, - "module": "./dist/esm-node/index.js", - "browser": { - "./dist/md5.js": "./dist/md5-browser.js", - "./dist/rng.js": "./dist/rng-browser.js", - "./dist/sha1.js": "./dist/sha1-browser.js", - "./dist/esm-node/index.js": "./dist/esm-browser/index.js" - }, - "files": [ - "CHANGELOG.md", - "CONTRIBUTING.md", - "LICENSE.md", - "README.md", - "dist", - "wrapper.mjs" - ], - "devDependencies": { - "@babel/cli": "7.11.6", - "@babel/core": "7.11.6", - "@babel/preset-env": "7.11.5", - "@commitlint/cli": "11.0.0", - "@commitlint/config-conventional": "11.0.0", - "@rollup/plugin-node-resolve": "9.0.0", - "babel-eslint": "10.1.0", - "bundlewatch": "0.3.1", - "eslint": "7.10.0", - "eslint-config-prettier": "6.12.0", - "eslint-config-standard": "14.1.1", - "eslint-plugin-import": "2.22.1", - "eslint-plugin-node": "11.1.0", - "eslint-plugin-prettier": "3.1.4", - "eslint-plugin-promise": "4.2.1", - "eslint-plugin-standard": "4.0.1", - "husky": "4.3.0", - "jest": "25.5.4", - "lint-staged": "10.4.0", - "npm-run-all": "4.1.5", - "optional-dev-dependency": "2.0.1", - "prettier": "2.1.2", - "random-seed": "0.3.0", - "rollup": "2.28.2", - "rollup-plugin-terser": "7.0.2", - "runmd": "1.3.2", - "standard-version": "9.0.0" - }, - "optionalDevDependencies": { - "@wdio/browserstack-service": "6.4.0", - "@wdio/cli": "6.4.0", - "@wdio/jasmine-framework": "6.4.0", - "@wdio/local-runner": "6.4.0", - "@wdio/spec-reporter": "6.4.0", - "@wdio/static-server-service": "6.4.0", - "@wdio/sync": "6.4.0" - }, - "scripts": { - "examples:browser:webpack:build": "cd examples/browser-webpack && npm install && npm run build", - "examples:browser:rollup:build": "cd examples/browser-rollup && npm install && npm run build", - "examples:node:commonjs:test": "cd examples/node-commonjs && npm install && npm test", - "examples:node:esmodules:test": "cd examples/node-esmodules && npm install && npm test", - "lint": "npm run eslint:check && npm run prettier:check", - "eslint:check": "eslint src/ test/ examples/ *.js", - "eslint:fix": "eslint --fix src/ test/ examples/ *.js", - "pretest": "[ -n $CI ] || npm run build", - "test": "BABEL_ENV=commonjs node --throw-deprecation node_modules/.bin/jest test/unit/", - "pretest:browser": "optional-dev-dependency && npm run build && npm-run-all --parallel examples:browser:**", - "test:browser": "wdio run ./wdio.conf.js", - "pretest:node": "npm run build", - "test:node": "npm-run-all --parallel examples:node:**", - "test:pack": "./scripts/testpack.sh", - "pretest:benchmark": "npm run build", - "test:benchmark": "cd examples/benchmark && npm install && npm test", - "prettier:check": "prettier --ignore-path .prettierignore --check '**/*.{js,jsx,json,md}'", - "prettier:fix": "prettier --ignore-path .prettierignore --write '**/*.{js,jsx,json,md}'", - "bundlewatch": "npm run pretest:browser && bundlewatch --config bundlewatch.config.json", - "md": "runmd --watch --output=README.md README_js.md", - "docs": "( node --version | grep -q 'v12' ) && ( npm run build && runmd --output=README.md README_js.md )", - "docs:diff": "npm run docs && git diff --quiet README.md", - "build": "./scripts/build.sh", - "prepack": "npm run build", - "release": "standard-version --no-verify" - }, - "repository": { - "type": "git", - "url": "https://github.com/uuidjs/uuid.git" - }, - "husky": { - "hooks": { - "commit-msg": "commitlint -E HUSKY_GIT_PARAMS", - "pre-commit": "lint-staged" - } - }, - "lint-staged": { - "*.{js,jsx,json,md}": [ - "prettier --write" - ], - "*.{js,jsx}": [ - "eslint --fix" - ] - }, - "standard-version": { - "scripts": { - "postchangelog": "prettier --write CHANGELOG.md" - } - } -} diff --git a/PBandGraphScaffold/node_modules/uuid/wrapper.mjs b/PBandGraphScaffold/node_modules/uuid/wrapper.mjs deleted file mode 100644 index c31e9ce..0000000 --- a/PBandGraphScaffold/node_modules/uuid/wrapper.mjs +++ /dev/null @@ -1,10 +0,0 @@ -import uuid from './dist/index.js'; -export const v1 = uuid.v1; -export const v3 = uuid.v3; -export const v4 = uuid.v4; -export const v5 = uuid.v5; -export const NIL = uuid.NIL; -export const version = uuid.version; -export const validate = uuid.validate; -export const stringify = uuid.stringify; -export const parse = uuid.parse; diff --git a/PBandGraphScaffold/package.json b/PBandGraphScaffold/package.json deleted file mode 100644 index 2e0702e..0000000 --- a/PBandGraphScaffold/package.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "name": "pbandgraph-scaffold", - "version": "1.0.0-alpha1", - "description": "PocketBase + Microsoft Graph OAuth scaffold (PBandGraphOauth)", - "type": "module", - "scripts": { - "dev": "PORT=5500 bun run server.ts", - "start": "bun run server.ts" - }, - "dependencies": { - "@azure/msal-node": "^2.6.7", - "@microsoft/microsoft-graph-client": "^3.0.7", - "dotenv": "^17.2.3", - "hono": "^4.10.8", - "pocketbase": "^0.26.5" - }, - "devDependencies": { - "@types/bun": "latest", - "@types/node": "latest" - } -} diff --git a/PBandGraphScaffold/server.ts b/PBandGraphScaffold/server.ts deleted file mode 100644 index 95b0c02..0000000 --- a/PBandGraphScaffold/server.ts +++ /dev/null @@ -1,116 +0,0 @@ -import { Hono } from 'hono'; -import { serveStatic } from 'hono/bun'; -import { cors } from 'hono/cors'; -import PocketBase from 'pocketbase'; -import { ConfidentialClientApplication } from '@azure/msal-node'; -import { readFileSync } from 'fs'; -import { join } from 'path'; - -// Load env from local .env -const envPath = join(import.meta.dir, '.env'); -try { - const envContent = readFileSync(envPath, 'utf-8'); - envContent.split('\n').forEach(line => { - const trimmed = line.trim(); - if (trimmed && !trimmed.startsWith('#')) { - const [key, ...valueParts] = trimmed.split('='); - if (key && valueParts.length > 0) { - process.env[key.trim()] = valueParts.join('=').trim(); - } - } - }); - console.log('✓ Loaded env from .env'); -} catch (e) { - console.warn('⚠ Could not load .env:', (e as Error).message); -} - -const app = new Hono(); - -// Enable CORS -app.use('/*', cors({ - origin: '*', - credentials: true, -})); - -// PocketBase client -const pb = new PocketBase(process.env.PB_DB || 'http://127.0.0.1:8090'); - -// Use user's PocketBase token -function setUserPocketBaseAuth(token: string) { - pb.authStore.save(token, null); -} - -// MSAL config for Graph token (client credentials) -const msalConfig = { - auth: { - clientId: process.env.CLIENT_ID || '', - authority: `https://login.microsoftonline.com/${process.env.TENANT_ID}`, - clientSecret: process.env.CLIENT_SECRET || '', - }, -}; -const cca = new ConfidentialClientApplication(msalConfig); - -async function getGraphToken(): Promise { - const result = await cca.acquireTokenByClientCredential({ - scopes: ['https://graph.microsoft.com/.default'], - }); - if (!result || !result.accessToken) { - throw new Error('Failed to acquire Graph token'); - } - return result.accessToken; -} - -// Health check -app.get('/health', (c) => { - return c.json({ ok: true, pbDB: process.env.PB_DB }); -}); - -// Submit endpoint (example) -app.post('/api/submit', async (c) => { - try { - const body = await c.req.json(); - const pbToken = body.pbToken; - - if (!pbToken) { - return c.json({ success: false, message: 'Missing pbToken' }, 401); - } - - // Validate user token - setUserPocketBaseAuth(pbToken); - try { - await pb.collection(process.env.PB_AUTH_COLLECTION || 'Users').authRefresh(); - } catch (e) { - console.error('auth_validation_failed', { message: (e as Error)?.message }); - return c.json({ success: false, message: 'Invalid token' }, 401); - } - - // Store in PocketBase collection (adjust fields as needed) - const record = await pb - .collection(process.env.PB_COLLECTION || 'Job_Info_TestEnv') - .create({ - ...body, - submittedBy: pb.authStore.model?.email || 'unknown', - submittedAt: new Date().toISOString(), - }); - - console.log('submission_success', { recordId: record.id }); - return c.json({ success: true, message: 'Feedback submitted successfully', recordId: record.id }); - } catch (err) { - console.error('submit_error', { message: (err as Error)?.message }); - return c.json({ success: false, message: 'Internal error' }, 500); - } -}); - -// Serve static index.html -app.get('/', async (c) => { - const html = await Bun.file(new URL('./index.html', import.meta.url)).text(); - return c.html(html); -}); - -const PORT = Number(process.env.PORT || 5500); -console.log(`PBandGraph server running at http://localhost:${PORT}`); - -export default { - port: PORT, - fetch: app.fetch, -}; diff --git a/PBandGraphScaffold/tsconfig.json b/PBandGraphScaffold/tsconfig.json deleted file mode 100644 index 6f0efe0..0000000 --- a/PBandGraphScaffold/tsconfig.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "compilerOptions": { - "target": "ESNext", - "module": "ESNext", - "lib": ["ESNext", "DOM", "DOM.Iterable"], - "types": ["bun-types", "node", "bun"], - "moduleResolution": "bundler", - "allowImportingTsExtensions": true, - "moduleDetection": "force", - "noEmit": true, - "composite": true, - "strict": true, - "downlevelIteration": true, - "skipLibCheck": true, - "jsx": "react-jsx", - "allowSyntheticDefaultImports": true, - "forceConsistentCasingInFileNames": true, - "allowJs": true, - "esModuleInterop": true, - "resolveJsonModule": true - } -} diff --git a/admin.html b/admin.html deleted file mode 100644 index 1dcb760..0000000 --- a/admin.html +++ /dev/null @@ -1,399 +0,0 @@ - - - - - - Admin - Schema Viewer - - - - - -
-
-

Admin Login

-

Superuser access

-
- -
-
- - -
- -
- - -
- - -
- - -
- - - - - - - diff --git a/index.html b/index.html deleted file mode 100644 index 60e93aa..0000000 --- a/index.html +++ /dev/null @@ -1,191 +0,0 @@ - - - - - - Idea & Feedback Form - - - - - - - - - - - -
- v1.0.0-alpha1 -
- - -
-
-

Cardoza Construction

-

Idea & Feedback Form

-
- -
-

Sign in with your Microsoft account to access the Idea & Feedback Form

- -
- - -
- - - - -